dynamic-mui 2.0.18 → 2.0.19

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.
@@ -449,7 +449,7 @@ ${f}\r
449
449
  If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return i.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async i=>{const s=await r();if(i==="base64")return oc(s);if(i==="hex")return Ci(s);if(i===void 0||i==="utf8"||i==="utf-8")return zu(s);if(typeof TextDecoder=="function")return new TextDecoder(i).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error($V);if(t=!0,jV(e))return o(e);if(VP(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},jV=e=>typeof Blob=="function"&&e instanceof Blob;async function cze(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const fh=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return iu.mutate(e);if(!e)return iu.mutate(new Uint8Array);const r=t.streamCollector(e);return iu.mutate(await r)};function BV(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Xv=e=>typeof e=="function"?e():e,YW=(e,t,r,o,i)=>({name:t,namespace:e,traits:r,input:o,output:i}),uze=e=>(t,r)=>async o=>{const{response:i}=await t(o),{operationSchema:s}=gl(r),[,a,l,c,u,d]=s??[];try{const f=await e.protocol.deserializeResponse(YW(a,l,c,u,d),{...e,...r},i);return{response:i,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){const p="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{f.message+=`
450
450
  `+p}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(p):r.logger?.warn?.(p)}typeof f.$responseBodyText<"u"&&f.$response&&(f.$response.body=f.$responseBodyText);try{if(wu.isInstance(i)){const{headers:h={}}=i,b=Object.entries(h);f.$metadata={httpStatusCode:i.statusCode,requestId:VO(/^x-[\w-]+-request-?id$/,b),extendedRequestId:VO(/^x-[\w-]+-id-2$/,b),cfId:VO(/^x-[\w-]+-cf-id$/,b)}}}catch{}}throw f}},VO=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1],dze=e=>(t,r)=>async o=>{const{operationSchema:i}=gl(r),[,s,a,l,c,u]=i??[],d=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint,f=await e.protocol.serializeRequest(YW(s,a,l,c,u),o.input,{...e,...r,endpoint:d});return t({...o,request:f})},fze={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},pze={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function ZW(e){return{applyToStack:t=>{t.add(dze(e),pze),t.add(uze(e),fze),e.protocol.setSerdeContext(e)}}}function Jd(e){if(typeof e=="object")return e;e=e|0;const t={};let r=0;for(const o of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[o]=1);return t}const VV={it:Symbol.for("@smithy/nor-struct-it")};class or{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=or.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;const o=[];let i=t,s=t;for(this._isMemberSchema=!1;HO(i);)o.push(i[1]),i=i[0],s=Xv(i),this._isMemberSchema=!0;if(o.length>0){this.memberTraits={};for(let a=o.length-1;a>=0;--a){const l=o[a];Object.assign(this.memberTraits,Jd(l))}}else this.memberTraits=0;if(s instanceof or){const a=this.memberTraits;Object.assign(this,s),this.memberTraits=Object.assign({},a,s.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??s.memberName;return}if(this.schema=Xv(s),hze(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(s),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){const r=Xv(t);if(r instanceof or)return r;if(HO(r)){const[o,i]=r;if(o instanceof or)return Object.assign(o.getMergedTraits(),Jd(i)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new or(r)}getSchema(){const t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){const{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const t=this.getSchema();if(typeof t!="object")return!1;const r=t[0];return r===3||r===-3||r===4}isUnionSchema(){const t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Jd(this.memberTraits)}getOwnTraits(){return Jd(this.traits)}getKeySchema(){const[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const o=this.getSchema(),i=t?15:o[4]??0;return Zp([i,0],"key")}getValueSchema(){const t=this.getSchema(),[r,o,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],s=typeof t=="number"?63&t:t&&typeof t=="object"&&(o||i)?t[3+t[0]]:r?15:void 0;if(s!=null)return Zp([s,0],o?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){const o=r[4].indexOf(t),i=r[5][o];return Zp(HO(i)?i:[i,0],t)}if(this.isDocumentSchema())return Zp([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[r,o]of this.structIterator())t[r]=o}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),r=t[4].length;let o=t[VV.it];if(o&&r===o.length){yield*o;return}o=Array(r);for(let i=0;i<r;++i){const s=t[4][i],a=Zp([t[5][i],0],s);yield o[i]=[s,a]}t[VV.it]=o}}function Zp(e,t){if(e instanceof or)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=or;return new r(e,t)}const HO=e=>Array.isArray(e)&&e.length===2,hze=e=>Array.isArray(e)&&e.length>=5;class ti{namespace;schemas;exceptions;static registries=new Map;constructor(t,r=new Map,o=new Map){this.namespace=t,this.schemas=r,this.exceptions=o}static for(t){return ti.registries.has(t)||ti.registries.set(t,new ti(t)),ti.registries.get(t)}copyFrom(t){const{schemas:r,exceptions:o}=this;for(const[i,s]of t.schemas)r.has(i)||r.set(i,s);for(const[i,s]of t.exceptions)o.has(i)||o.set(i,s)}register(t,r){const o=this.normalizeShapeId(t);for(const i of[this,ti.for(o.split("#")[0])])i.schemas.set(o,r)}getSchema(t){const r=this.normalizeShapeId(t);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(t,r){const o=t,i=o[1];for(const s of[this,ti.for(i)])s.schemas.set(i+"#"+o[2],o),s.exceptions.set(o,r)}getErrorCtor(t){const r=t;return this.exceptions.has(r)?this.exceptions.get(r):ti.for(r[1]).exceptions.get(r)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,r,o]=t,i=r+"#"+o;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const zP=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&wze.warn(Cze(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},mze=Math.ceil(2**127*(2-2**-23)),HV=e=>{const t=zP(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>mze)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},gze=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},zV=e=>XW(e,16),qV=e=>XW(e,8),XW=(e,t)=>{const r=gze(e);if(r!==void 0&&bze(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},bze=(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]}},yze=e=>zP(typeof e=="string"?TC(e):e),vze=e=>HV(typeof e=="string"?TC(e):e),xze=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,TC=e=>{const t=e.match(xze);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},o0=e=>zV(typeof e=="string"?TC(e):e),Sze=e=>qV(typeof e=="string"?TC(e):e),Cze=e=>String(new TypeError(e).stack||e).split(`
451
451
  `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
452
- `),wze={warn:console.warn},Tze=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function i0(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),o=e.getUTCDay(),i=e.getUTCDate(),s=e.getUTCHours(),a=e.getUTCMinutes(),l=e.getUTCSeconds(),c=i<10?`0${i}`:`${i}`,u=s<10?`0${s}`:`${s}`,d=a<10?`0${a}`:`${a}`,f=l<10?`0${l}`:`${l}`;return`${Tze[o]}, ${c} ${SM[r]} ${t} ${u}:${d}:${f} GMT`}const Oze=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Pze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Oze.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,o,i,s,a,l,c,u,d]=t,f=o0(um(o)),p=Ql(i,"month",1,12),h=Ql(s,"day",1,31),b=Qv(f,p,h,{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&b.setTime(b.getTime()-jze(d)),b},Eze=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ize=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),kze=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Rze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Eze.exec(e);if(t){const[r,o,i,s,a,l,c,u]=t;return Qv(o0(um(s)),zO(i),Ql(o,"day",1,31),{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u})}if(t=Ize.exec(e),t){const[r,o,i,s,a,l,c,u]=t;return _ze(Qv(Aze(s),zO(i),Ql(o,"day",1,31),{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u}))}if(t=kze.exec(e),t){const[r,o,i,s,a,l,c,u]=t;return Qv(o0(um(u)),zO(o),Ql(i.trimLeft(),"day",1,31),{hours:s,minutes:a,seconds:l,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},Mze=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=yze(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");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(t*1e3))},Qv=(e,t,r,o)=>{const i=t-1;return Fze(e,i,r),new Date(Date.UTC(e,i,r,Ql(o.hours,"hour",0,23),Ql(o.minutes,"minute",0,59),Ql(o.seconds,"seconds",0,60),$ze(o.fractionalMilliseconds)))},Aze=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+o0(um(e));return r<t?r+100:r},Dze=50*365*24*60*60*1e3,_ze=e=>e.getTime()-new Date().getTime()>Dze?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,zO=e=>{const t=SM.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Nze=[31,28,31,30,31,30,31,31,30,31,30,31],Fze=(e,t,r)=>{let o=Nze[t];if(t===1&&Lze(e)&&(o=29),r>o)throw new TypeError(`Invalid day for ${SM[t]} in ${e}: ${r}`)},Lze=e=>e%4===0&&(e%100!==0||e%400===0),Ql=(e,t,r,o)=>{const i=Sze(um(e));if(i<r||i>o)throw new TypeError(`${t} must be between ${r} and ${o}, inclusive`);return i},$ze=e=>e==null?0:vze("0."+e)*1e3,jze=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const o=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(o*60+i)*60*1e3},um=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},UV=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ao=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),OC=()=>{if(UV)return UV();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Ao[e[0]]+Ao[e[1]]+Ao[e[2]]+Ao[e[3]]+"-"+Ao[e[4]]+Ao[e[5]]+"-"+Ao[e[6]]+Ao[e[7]]+"-"+Ao[e[8]]+Ao[e[9]]+"-"+Ao[e[10]]+Ao[e[11]]+Ao[e[12]]+Ao[e[13]]+Ao[e[14]]+Ao[e[15]]},Qa=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Qa.from=e=>e&&typeof e=="object"&&(e instanceof Qa||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Qa(String(e)):Qa(JSON.stringify(e));Qa.fromObject=Qa.from;function Bze(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const CM="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",wM="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",TM="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",QW="(\\d?\\d)",JW="(\\d{4})",Vze=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Hze=new RegExp(`^${CM}, ${QW} ${wM} ${JW} ${TM} GMT$`),zze=new RegExp(`^${CM}, ${QW}-${wM}-(\\d\\d) ${TM} GMT$`),qze=new RegExp(`^${CM} ${wM} ( [1-9]|\\d\\d) ${TM} ${JW}$`),Uze=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Gze=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},Wze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=Vze.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,o,i,s,a,l,,c,u]=t;Ya(o,1,12),Ya(i,1,31),Ya(s,0,23),Ya(a,0,59),Ya(l,0,60);const d=new Date(Date.UTC(Number(r),Number(o)-1,Number(i),Number(s),Number(a),Number(l),Number(c)?Math.round(parseFloat(`0.${c}`)*1e3):0));if(d.setUTCFullYear(Number(r)),u.toUpperCase()!="Z"){const[,f,p,h]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],b=f==="-"?1:-1;d.setTime(d.getTime()+b*(Number(p)*60*60*1e3+Number(h)*60*1e3))}return d},Kze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,r,o,i,s,a,l,c;if((c=Hze.exec(e))?[,t,r,o,i,s,a,l]=c:(c=zze.exec(e))?([,t,r,o,i,s,a,l]=c,o=(Number(o)+1900).toString()):(c=qze.exec(e))&&([,r,t,i,s,a,l,o]=c),o&&a){const u=Date.UTC(Number(o),Uze.indexOf(r),Number(t),Number(i),Number(s),Number(a),l?Math.round(parseFloat(`0.${l}`)*1e3):0);Ya(t,1,31),Ya(i,0,23),Ya(s,0,59),Ya(a,0,60);const d=new Date(u);return d.setUTCFullYear(Number(o)),d}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function Ya(e,t,r){const o=Number(e);if(o<t||o>r)throw new Error(`Value ${o} out of range [${t}, ${r}]`)}function Yze(e,t,r){if(!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const o=e.split(t),i=[];let s="";for(let a=0;a<o.length;a++)s===""?s=o[a]:s+=t+o[a],(a+1)%r===0&&(i.push(s),s="");return s!==""&&i.push(s),i}const e7=e=>{const t=e.length,r=[];let o=!1,i,s=0;for(let a=0;a<t;++a){const l=e[a];switch(l){case'"':i!=="\\"&&(o=!o);break;case",":o||(r.push(e.slice(s,a)),s=a+1);break}i=l}return r.push(e.slice(s)),r.map(a=>{a=a.trim();const l=a.length;return l<2?a:(a[0]==='"'&&a[l-1]==='"'&&(a=a.slice(1,l-1)),a.replace(/\\"/g,'"'))})},GV=/^-?\d*(\.\d+)?$/;class fg{string;type;constructor(t,r){if(this.string=t,this.type=r,!GV.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const r=t;return fg.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&GV.test(r.string)}}class PC{serdeContext;setSerdeContext(t){this.serdeContext=t}}class t7 extends PC{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=ti.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Br}getResponseType(){return wu}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(const[o,i]of r.url.searchParams.entries())t.query[o]=i;return t}else return t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},t}setHostPrefix(t,r,o){if(this.serdeContext?.disableHostPrefix)return;const i=or.of(r.input),s=Jd(r.traits??{});if(s.endpoint){let a=s.endpoint?.[0];if(typeof a=="string"){const l=[...i.structIterator()].filter(([,c])=>c.getMergedTraits().hostLabel);for(const[c]of l){const u=o[c];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${c} in input must be a string as hostLabel.`);a=a.replace(`{${c}}`,u)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:o}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:o})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:o}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:o})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await Promise.resolve().then(()=>require("./index-Du-I4xgT.js"));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,o,i,s){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class Zze extends t7{async serializeRequest(t,r,o){const i={...r??{}},s=this.serializer,a={},l={},c=await o.endpoint(),u=or.of(t?.input),d=u.getSchema();let f=!1,p;const h=new Br({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:a,headers:l,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,t,i);const b=Jd(t.traits);if(b.http){h.method=b.http[0];const[g,y]=b.http[1].split("?");h.path=="/"?h.path=g:h.path+=g;const v=new URLSearchParams(y??"");Object.assign(a,Object.fromEntries(v))}}for(const[b,g]of u.structIterator()){const y=g.getMergedTraits()??{},v=i[b];if(v==null&&!g.isIdempotencyToken()){if(y.httpLabel&&(h.path.includes(`{${b}+}`)||h.path.includes(`{${b}}`)))throw new Error(`No value provided for input HTTP label: ${b}.`);continue}if(y.httpPayload)g.isStreaming()?g.isStructSchema()?i[b]&&(p=await this.serializeEventStream({eventStream:i[b],requestSchema:u})):p=v:(s.write(g,v),p=s.flush()),delete i[b];else if(y.httpLabel){s.write(g,v);const C=s.flush();h.path.includes(`{${b}+}`)?h.path=h.path.replace(`{${b}+}`,C.split("/").map(BV).join("/")):h.path.includes(`{${b}}`)&&(h.path=h.path.replace(`{${b}}`,BV(C))),delete i[b]}else if(y.httpHeader)s.write(g,v),l[y.httpHeader.toLowerCase()]=String(s.flush()),delete i[b];else if(typeof y.httpPrefixHeaders=="string"){for(const[C,O]of Object.entries(v)){const T=y.httpPrefixHeaders+C;s.write([g.getValueSchema(),{httpHeader:T}],O),l[T.toLowerCase()]=s.flush()}delete i[b]}else y.httpQuery||y.httpQueryParams?(this.serializeQuery(g,v,a),delete i[b]):f=!0}return f&&i&&(s.write(d,i),p=s.flush()),h.headers=l,h.query=a,h.body=p,h}serializeQuery(t,r,o){const i=this.serializer,s=t.getMergedTraits();if(s.httpQueryParams){for(const[a,l]of Object.entries(r))if(!(a in o)){const c=t.getValueSchema();Object.assign(c.getMergedTraits(),{...s,httpQuery:a,httpQueryParams:void 0}),this.serializeQuery(c,l,o)}return}if(t.isListSchema()){const a=!!t.getMergedTraits().sparse,l=[];for(const c of r){i.write([t.getValueSchema(),s],c);const u=i.flush();(a||u!==void 0)&&l.push(u)}o[s.httpQuery]=l}else i.write([t,s],r),o[s.httpQuery]=i.flush()}async deserializeResponse(t,r,o){const i=this.deserializer,s=or.of(t.output),a={};if(o.statusCode>=300){const c=await fh(o.body,r);throw c.byteLength>0&&Object.assign(a,await i.read(15,c)),await this.handleError(t,r,o,a,this.deserializeMetadata(o)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const c in o.headers){const u=o.headers[c];delete o.headers[c],o.headers[c.toLowerCase()]=u}const l=await this.deserializeHttpMessage(s,r,o,a);if(l.length){const c=await fh(o.body,r);if(c.byteLength>0){const u=await i.read(s,c);for(const d of l)u[d]!=null&&(a[d]=u[d])}}else l.discardResponseBody&&await fh(o.body,r);return a.$metadata=this.deserializeMetadata(o),a}async deserializeHttpMessage(t,r,o,i,s){let a;i instanceof Set?a=s:a=i;let l=!0;const c=this.deserializer,u=or.of(t),d=[];for(const[f,p]of u.structIterator()){const h=p.getMemberTraits();if(h.httpPayload){if(l=!1,p.isStreaming())p.isStructSchema()?a[f]=await this.deserializeEventStream({response:o,responseSchema:u}):a[f]=KW(o.body);else if(o.body){const g=await fh(o.body,r);g.byteLength>0&&(a[f]=await c.read(p,g))}}else if(h.httpHeader){const b=String(h.httpHeader).toLowerCase(),g=o.headers[b];if(g!=null)if(p.isListSchema()){const y=p.getValueSchema();y.getMergedTraits().httpHeader=b;let v;y.isTimestampSchema()&&y.getSchema()===4?v=Yze(g,",",2):v=e7(g);const C=[];for(const O of v)C.push(await c.read(y,O.trim()));a[f]=C}else a[f]=await c.read(p,g)}else if(h.httpPrefixHeaders!==void 0){a[f]={};for(const[b,g]of Object.entries(o.headers))if(b.startsWith(h.httpPrefixHeaders)){const y=p.getValueSchema();y.getMergedTraits().httpHeader=b,a[f][b.slice(h.httpPrefixHeaders.length)]=await c.read(y,g)}}else h.httpResponseCode?a[f]=o.statusCode:d.push(f)}return d.discardResponseBody=l,d}}function EC(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:o,httpHeader:i,httpQuery:s}=e.getMergedTraits();return(t.httpBindings?typeof o=="string"||i?6:s||r?5:void 0:void 0)??t.timestampFormat.default}class n7 extends PC{settings;constructor(t){super(),this.settings=t}read(t,r){const o=or.of(t);if(o.isListSchema())return e7(r).map(i=>this.read(o.getValueSchema(),i));if(o.isBlobSchema())return(this.serdeContext?.base64Decoder??Tu)(r);if(o.isTimestampSchema())switch(EC(o,this.settings)){case 5:return Wze(r);case 6:return Kze(r);case 7:return Gze(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(o.isStringSchema()){const i=o.getMergedTraits().mediaType;let s=r;if(i)return o.getMergedTraits().httpHeader&&(s=this.base64ToUtf8(s)),(i==="application/json"||i.endsWith("+json"))&&(s=Qa.from(s)),s}return o.isNumericSchema()?Number(r):o.isBigIntegerSchema()?BigInt(r):o.isBigDecimalSchema()?new fg(r,"bigDecimal"):o.isBooleanSchema()?String(r).toLowerCase()==="true":r}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??zu)((this.serdeContext?.base64Decoder??Tu)(t))}}class Xze extends PC{codecDeserializer;stringDeserializer;constructor(t,r){super(),this.codecDeserializer=t,this.stringDeserializer=new n7(r)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,r){const o=or.of(t),i=o.getMergedTraits(),s=this.serdeContext?.utf8Encoder??zu;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(o,s(r));if(i.httpPayload){if(o.isBlobSchema()){const a=this.serdeContext?.utf8Decoder??cl;return typeof r=="string"?a(r):r}else if(o.isStringSchema())return"byteLength"in r?s(r):r}return this.codecDeserializer.read(o,r)}}class Qze extends PC{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,r){const o=or.of(t);switch(typeof r){case"object":if(r===null){this.stringBuffer="null";return}if(o.isTimestampSchema()){if(!(r instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${r} when schema expected Date in ${o.getName(!0)}`);switch(EC(o,this.settings)){case 5:this.stringBuffer=r.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=i0(r);break;case 7:this.stringBuffer=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",r),this.stringBuffer=String(r.getTime()/1e3)}return}if(o.isBlobSchema()&&"byteLength"in r){this.stringBuffer=(this.serdeContext?.base64Encoder??oc)(r);return}if(o.isListSchema()&&Array.isArray(r)){let a="";for(const l of r){this.write([o.getValueSchema(),o.getMergedTraits()],l);const c=this.flush(),u=o.getValueSchema().isTimestampSchema()?c:Bze(c);a!==""&&(a+=", "),a+=u}this.stringBuffer=a;return}this.stringBuffer=JSON.stringify(r,null,2);break;case"string":const i=o.getMergedTraits().mediaType;let s=r;if(i&&((i==="application/json"||i.endsWith("+json"))&&(s=Qa.from(s)),o.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??oc)(s.toString());return}this.stringBuffer=r;break;default:o.isIdempotencyToken()?this.stringBuffer=OC():this.stringBuffer=String(r)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class Jze{codecSerializer;stringSerializer;buffer;constructor(t,r,o=new Qze(r)){this.codecSerializer=t,this.stringSerializer=o}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,r){const o=or.of(t),i=o.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(o,r),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(o,r)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function eqe(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}class r7{authSchemes=new Map;constructor(t){for(const[r,o]of Object.entries(t))o!==void 0&&this.authSchemes.set(r,o)}getIdentityProvider(t){return this.authSchemes.get(t)}}const tqe=e=>function(r){return o7(r)&&r.expiration.getTime()-Date.now()<e},nqe=3e5,rqe=tqe(nqe),o7=e=>e.expiration!==void 0,oqe=(e,t,r)=>{if(e===void 0)return;const o=typeof e!="function"?async()=>Promise.resolve(e):e;let i,s,a,l=!1;const c=async u=>{s||(s=o(u));try{i=await s,a=!0,l=!1}finally{s=void 0}return i};return t===void 0?async u=>((!a||u?.forceRefresh)&&(i=await c(u)),i):async u=>((!a||u?.forceRefresh)&&(i=await c(u)),l?i:r(i)?(t(i)&&await c(u),i):(l=!0,i))};class OM extends Error{name="ProviderError";tryNextLink;constructor(t,r=!0){let o,i=!0;typeof r=="boolean"?(o=void 0,i=r):r!=null&&typeof r=="object"&&(o=r.logger,i=r.tryNextLink??!0),super(t),this.tryNextLink=i,Object.setPrototypeOf(this,OM.prototype),o?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${t}`)}static from(t,r=!0){return Object.assign(new this(t.message,r),t)}}class fp extends OM{name="CredentialsProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,fp.prototype)}}const iqe=(e,t,r)=>{let o,i,s,a=!1;const l=async()=>{i||(i=e());try{o=await i,s=!0,a=!1}finally{i=void 0}return o};return async c=>((!s||c?.forceRefresh)&&(o=await l()),o)},sqe=e=>(e.sigv4aSigningRegionSet=hf(e.sigv4aSigningRegionSet),e),aqe="X-Amz-Algorithm",lqe="X-Amz-Credential",i7="X-Amz-Date",cqe="X-Amz-SignedHeaders",uqe="X-Amz-Expires",s7="X-Amz-Signature",a7="X-Amz-Security-Token",l7="authorization",c7=i7.toLowerCase(),dqe="date",fqe=[l7,c7,dqe],pqe=s7.toLowerCase(),qP="x-amz-content-sha256",hqe=a7.toLowerCase(),mqe={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},gqe=/^proxy-/,bqe=/^sec-/,qO="AWS4-HMAC-SHA256",yqe="AWS4-HMAC-SHA256-PAYLOAD",vqe="UNSIGNED-PAYLOAD",xqe=50,u7="aws4_request",Sqe=3600*24*7,Pv={},UO=[],GO=(e,t,r)=>`${e}/${t}/${r}/${u7}`,Cqe=async(e,t,r,o,i)=>{const s=await WV(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${o}:${i}:${Ci(s)}:${t.sessionToken}`;if(a in Pv)return Pv[a];for(UO.push(a);UO.length>xqe;)delete Pv[UO.shift()];let l=`AWS4${t.secretAccessKey}`;for(const c of[r,o,i,u7])l=await WV(e,l,c);return Pv[a]=l},WV=(e,t,r)=>{const o=new e(t);return o.update(Bf(r)),o.digest()},KV=({headers:e},t,r)=>{const o={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const s=i.toLowerCase();(s in mqe||t?.has(s)||gqe.test(s)||bqe.test(s))&&(!r||r&&!r.has(s))||(o[s]=e[i].trim().replace(/\s+/g," "))}return o},d7=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",WO=async({headers:e,body:t},r)=>{for(const o of Object.keys(e))if(o.toLowerCase()===qP)return e[o];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||d7(t)){const o=new r;return o.update(Bf(t)),Ci(await o.digest())}return vqe};class wqe{format(t){const r=[];for(const s of Object.keys(t)){const a=cl(s);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const o=new Uint8Array(r.reduce((s,a)=>s+a.byteLength,0));let i=0;for(const s of r)o.set(s,i),i+=s.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,6),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const l=cl(t.value),c=new DataView(new ArrayBuffer(3+l.byteLength));c.setUint8(0,7),c.setUint16(1,l.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(l,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Oqe.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!Tqe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(WW(t.value.replace(/\-/g,"")),1),f}}}var YV;(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"})(YV||(YV={}));const Tqe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Oqe=class f7{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let o=7,i=Math.abs(Math.round(t));o>-1&&i>0;o--,i/=256)r[o]=i;return t<0&&ZV(r),new f7(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&ZV(t),parseInt(Ci(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function ZV(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const Pqe=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},Eqe=(e,t={})=>{const{headers:r,query:o={}}=Br.clone(e);for(const i of Object.keys(r)){const s=i.toLowerCase();(s.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(o[i]=r[i],delete r[i])}return{...e,headers:r,query:o}},XV=e=>{e=Br.clone(e);for(const t of Object.keys(e.headers))fqe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Iqe=({query:e={}})=>{const t=[],r={};for(const o of Object.keys(e)){if(o.toLowerCase()===pqe)continue;const i=su(o);t.push(i);const s=e[o];typeof s=="string"?r[i]=`${i}=${su(s)}`:Array.isArray(s)&&(r[i]=s.slice(0).reduce((a,l)=>a.concat([`${i}=${su(l)}`]),[]).sort().join("&"))}return t.sort().map(o=>r[o]).filter(o=>o).join("&")},kqe=e=>Rqe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),Rqe=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class Mqe{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:o,service:i,sha256:s,uriEscapePath:a=!0}){this.service=i,this.sha256=s,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Rs(o),this.credentialProvider=Rs(r)}createCanonicalRequest(t,r,o){const i=Object.keys(r).sort();return`${t.method}
452
+ `),wze={warn:console.warn},Tze=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function i0(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),o=e.getUTCDay(),i=e.getUTCDate(),s=e.getUTCHours(),a=e.getUTCMinutes(),l=e.getUTCSeconds(),c=i<10?`0${i}`:`${i}`,u=s<10?`0${s}`:`${s}`,d=a<10?`0${a}`:`${a}`,f=l<10?`0${l}`:`${l}`;return`${Tze[o]}, ${c} ${SM[r]} ${t} ${u}:${d}:${f} GMT`}const Oze=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Pze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Oze.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,o,i,s,a,l,c,u,d]=t,f=o0(um(o)),p=Ql(i,"month",1,12),h=Ql(s,"day",1,31),b=Qv(f,p,h,{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&b.setTime(b.getTime()-jze(d)),b},Eze=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ize=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),kze=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Rze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Eze.exec(e);if(t){const[r,o,i,s,a,l,c,u]=t;return Qv(o0(um(s)),zO(i),Ql(o,"day",1,31),{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u})}if(t=Ize.exec(e),t){const[r,o,i,s,a,l,c,u]=t;return _ze(Qv(Aze(s),zO(i),Ql(o,"day",1,31),{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u}))}if(t=kze.exec(e),t){const[r,o,i,s,a,l,c,u]=t;return Qv(o0(um(u)),zO(o),Ql(i.trimLeft(),"day",1,31),{hours:s,minutes:a,seconds:l,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},Mze=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=yze(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");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(t*1e3))},Qv=(e,t,r,o)=>{const i=t-1;return Fze(e,i,r),new Date(Date.UTC(e,i,r,Ql(o.hours,"hour",0,23),Ql(o.minutes,"minute",0,59),Ql(o.seconds,"seconds",0,60),$ze(o.fractionalMilliseconds)))},Aze=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+o0(um(e));return r<t?r+100:r},Dze=50*365*24*60*60*1e3,_ze=e=>e.getTime()-new Date().getTime()>Dze?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,zO=e=>{const t=SM.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Nze=[31,28,31,30,31,30,31,31,30,31,30,31],Fze=(e,t,r)=>{let o=Nze[t];if(t===1&&Lze(e)&&(o=29),r>o)throw new TypeError(`Invalid day for ${SM[t]} in ${e}: ${r}`)},Lze=e=>e%4===0&&(e%100!==0||e%400===0),Ql=(e,t,r,o)=>{const i=Sze(um(e));if(i<r||i>o)throw new TypeError(`${t} must be between ${r} and ${o}, inclusive`);return i},$ze=e=>e==null?0:vze("0."+e)*1e3,jze=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const o=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(o*60+i)*60*1e3},um=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},UV=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ao=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),OC=()=>{if(UV)return UV();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Ao[e[0]]+Ao[e[1]]+Ao[e[2]]+Ao[e[3]]+"-"+Ao[e[4]]+Ao[e[5]]+"-"+Ao[e[6]]+Ao[e[7]]+"-"+Ao[e[8]]+Ao[e[9]]+"-"+Ao[e[10]]+Ao[e[11]]+Ao[e[12]]+Ao[e[13]]+Ao[e[14]]+Ao[e[15]]},Qa=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Qa.from=e=>e&&typeof e=="object"&&(e instanceof Qa||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Qa(String(e)):Qa(JSON.stringify(e));Qa.fromObject=Qa.from;function Bze(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const CM="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",wM="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",TM="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",QW="(\\d?\\d)",JW="(\\d{4})",Vze=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Hze=new RegExp(`^${CM}, ${QW} ${wM} ${JW} ${TM} GMT$`),zze=new RegExp(`^${CM}, ${QW}-${wM}-(\\d\\d) ${TM} GMT$`),qze=new RegExp(`^${CM} ${wM} ( [1-9]|\\d\\d) ${TM} ${JW}$`),Uze=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Gze=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},Wze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=Vze.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,o,i,s,a,l,,c,u]=t;Ya(o,1,12),Ya(i,1,31),Ya(s,0,23),Ya(a,0,59),Ya(l,0,60);const d=new Date(Date.UTC(Number(r),Number(o)-1,Number(i),Number(s),Number(a),Number(l),Number(c)?Math.round(parseFloat(`0.${c}`)*1e3):0));if(d.setUTCFullYear(Number(r)),u.toUpperCase()!="Z"){const[,f,p,h]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],b=f==="-"?1:-1;d.setTime(d.getTime()+b*(Number(p)*60*60*1e3+Number(h)*60*1e3))}return d},Kze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,r,o,i,s,a,l,c;if((c=Hze.exec(e))?[,t,r,o,i,s,a,l]=c:(c=zze.exec(e))?([,t,r,o,i,s,a,l]=c,o=(Number(o)+1900).toString()):(c=qze.exec(e))&&([,r,t,i,s,a,l,o]=c),o&&a){const u=Date.UTC(Number(o),Uze.indexOf(r),Number(t),Number(i),Number(s),Number(a),l?Math.round(parseFloat(`0.${l}`)*1e3):0);Ya(t,1,31),Ya(i,0,23),Ya(s,0,59),Ya(a,0,60);const d=new Date(u);return d.setUTCFullYear(Number(o)),d}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function Ya(e,t,r){const o=Number(e);if(o<t||o>r)throw new Error(`Value ${o} out of range [${t}, ${r}]`)}function Yze(e,t,r){if(!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const o=e.split(t),i=[];let s="";for(let a=0;a<o.length;a++)s===""?s=o[a]:s+=t+o[a],(a+1)%r===0&&(i.push(s),s="");return s!==""&&i.push(s),i}const e7=e=>{const t=e.length,r=[];let o=!1,i,s=0;for(let a=0;a<t;++a){const l=e[a];switch(l){case'"':i!=="\\"&&(o=!o);break;case",":o||(r.push(e.slice(s,a)),s=a+1);break}i=l}return r.push(e.slice(s)),r.map(a=>{a=a.trim();const l=a.length;return l<2?a:(a[0]==='"'&&a[l-1]==='"'&&(a=a.slice(1,l-1)),a.replace(/\\"/g,'"'))})},GV=/^-?\d*(\.\d+)?$/;class fg{string;type;constructor(t,r){if(this.string=t,this.type=r,!GV.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const r=t;return fg.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&GV.test(r.string)}}class PC{serdeContext;setSerdeContext(t){this.serdeContext=t}}class t7 extends PC{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=ti.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Br}getResponseType(){return wu}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(const[o,i]of r.url.searchParams.entries())t.query[o]=i;return t}else return t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},t}setHostPrefix(t,r,o){if(this.serdeContext?.disableHostPrefix)return;const i=or.of(r.input),s=Jd(r.traits??{});if(s.endpoint){let a=s.endpoint?.[0];if(typeof a=="string"){const l=[...i.structIterator()].filter(([,c])=>c.getMergedTraits().hostLabel);for(const[c]of l){const u=o[c];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${c} in input must be a string as hostLabel.`);a=a.replace(`{${c}}`,u)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:o}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:o})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:o}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:o})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await Promise.resolve().then(()=>require("./index-Cz-oc-wF.js"));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,o,i,s){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class Zze extends t7{async serializeRequest(t,r,o){const i={...r??{}},s=this.serializer,a={},l={},c=await o.endpoint(),u=or.of(t?.input),d=u.getSchema();let f=!1,p;const h=new Br({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:a,headers:l,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,t,i);const b=Jd(t.traits);if(b.http){h.method=b.http[0];const[g,y]=b.http[1].split("?");h.path=="/"?h.path=g:h.path+=g;const v=new URLSearchParams(y??"");Object.assign(a,Object.fromEntries(v))}}for(const[b,g]of u.structIterator()){const y=g.getMergedTraits()??{},v=i[b];if(v==null&&!g.isIdempotencyToken()){if(y.httpLabel&&(h.path.includes(`{${b}+}`)||h.path.includes(`{${b}}`)))throw new Error(`No value provided for input HTTP label: ${b}.`);continue}if(y.httpPayload)g.isStreaming()?g.isStructSchema()?i[b]&&(p=await this.serializeEventStream({eventStream:i[b],requestSchema:u})):p=v:(s.write(g,v),p=s.flush()),delete i[b];else if(y.httpLabel){s.write(g,v);const C=s.flush();h.path.includes(`{${b}+}`)?h.path=h.path.replace(`{${b}+}`,C.split("/").map(BV).join("/")):h.path.includes(`{${b}}`)&&(h.path=h.path.replace(`{${b}}`,BV(C))),delete i[b]}else if(y.httpHeader)s.write(g,v),l[y.httpHeader.toLowerCase()]=String(s.flush()),delete i[b];else if(typeof y.httpPrefixHeaders=="string"){for(const[C,O]of Object.entries(v)){const T=y.httpPrefixHeaders+C;s.write([g.getValueSchema(),{httpHeader:T}],O),l[T.toLowerCase()]=s.flush()}delete i[b]}else y.httpQuery||y.httpQueryParams?(this.serializeQuery(g,v,a),delete i[b]):f=!0}return f&&i&&(s.write(d,i),p=s.flush()),h.headers=l,h.query=a,h.body=p,h}serializeQuery(t,r,o){const i=this.serializer,s=t.getMergedTraits();if(s.httpQueryParams){for(const[a,l]of Object.entries(r))if(!(a in o)){const c=t.getValueSchema();Object.assign(c.getMergedTraits(),{...s,httpQuery:a,httpQueryParams:void 0}),this.serializeQuery(c,l,o)}return}if(t.isListSchema()){const a=!!t.getMergedTraits().sparse,l=[];for(const c of r){i.write([t.getValueSchema(),s],c);const u=i.flush();(a||u!==void 0)&&l.push(u)}o[s.httpQuery]=l}else i.write([t,s],r),o[s.httpQuery]=i.flush()}async deserializeResponse(t,r,o){const i=this.deserializer,s=or.of(t.output),a={};if(o.statusCode>=300){const c=await fh(o.body,r);throw c.byteLength>0&&Object.assign(a,await i.read(15,c)),await this.handleError(t,r,o,a,this.deserializeMetadata(o)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const c in o.headers){const u=o.headers[c];delete o.headers[c],o.headers[c.toLowerCase()]=u}const l=await this.deserializeHttpMessage(s,r,o,a);if(l.length){const c=await fh(o.body,r);if(c.byteLength>0){const u=await i.read(s,c);for(const d of l)u[d]!=null&&(a[d]=u[d])}}else l.discardResponseBody&&await fh(o.body,r);return a.$metadata=this.deserializeMetadata(o),a}async deserializeHttpMessage(t,r,o,i,s){let a;i instanceof Set?a=s:a=i;let l=!0;const c=this.deserializer,u=or.of(t),d=[];for(const[f,p]of u.structIterator()){const h=p.getMemberTraits();if(h.httpPayload){if(l=!1,p.isStreaming())p.isStructSchema()?a[f]=await this.deserializeEventStream({response:o,responseSchema:u}):a[f]=KW(o.body);else if(o.body){const g=await fh(o.body,r);g.byteLength>0&&(a[f]=await c.read(p,g))}}else if(h.httpHeader){const b=String(h.httpHeader).toLowerCase(),g=o.headers[b];if(g!=null)if(p.isListSchema()){const y=p.getValueSchema();y.getMergedTraits().httpHeader=b;let v;y.isTimestampSchema()&&y.getSchema()===4?v=Yze(g,",",2):v=e7(g);const C=[];for(const O of v)C.push(await c.read(y,O.trim()));a[f]=C}else a[f]=await c.read(p,g)}else if(h.httpPrefixHeaders!==void 0){a[f]={};for(const[b,g]of Object.entries(o.headers))if(b.startsWith(h.httpPrefixHeaders)){const y=p.getValueSchema();y.getMergedTraits().httpHeader=b,a[f][b.slice(h.httpPrefixHeaders.length)]=await c.read(y,g)}}else h.httpResponseCode?a[f]=o.statusCode:d.push(f)}return d.discardResponseBody=l,d}}function EC(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:o,httpHeader:i,httpQuery:s}=e.getMergedTraits();return(t.httpBindings?typeof o=="string"||i?6:s||r?5:void 0:void 0)??t.timestampFormat.default}class n7 extends PC{settings;constructor(t){super(),this.settings=t}read(t,r){const o=or.of(t);if(o.isListSchema())return e7(r).map(i=>this.read(o.getValueSchema(),i));if(o.isBlobSchema())return(this.serdeContext?.base64Decoder??Tu)(r);if(o.isTimestampSchema())switch(EC(o,this.settings)){case 5:return Wze(r);case 6:return Kze(r);case 7:return Gze(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(o.isStringSchema()){const i=o.getMergedTraits().mediaType;let s=r;if(i)return o.getMergedTraits().httpHeader&&(s=this.base64ToUtf8(s)),(i==="application/json"||i.endsWith("+json"))&&(s=Qa.from(s)),s}return o.isNumericSchema()?Number(r):o.isBigIntegerSchema()?BigInt(r):o.isBigDecimalSchema()?new fg(r,"bigDecimal"):o.isBooleanSchema()?String(r).toLowerCase()==="true":r}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??zu)((this.serdeContext?.base64Decoder??Tu)(t))}}class Xze extends PC{codecDeserializer;stringDeserializer;constructor(t,r){super(),this.codecDeserializer=t,this.stringDeserializer=new n7(r)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,r){const o=or.of(t),i=o.getMergedTraits(),s=this.serdeContext?.utf8Encoder??zu;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(o,s(r));if(i.httpPayload){if(o.isBlobSchema()){const a=this.serdeContext?.utf8Decoder??cl;return typeof r=="string"?a(r):r}else if(o.isStringSchema())return"byteLength"in r?s(r):r}return this.codecDeserializer.read(o,r)}}class Qze extends PC{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,r){const o=or.of(t);switch(typeof r){case"object":if(r===null){this.stringBuffer="null";return}if(o.isTimestampSchema()){if(!(r instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${r} when schema expected Date in ${o.getName(!0)}`);switch(EC(o,this.settings)){case 5:this.stringBuffer=r.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=i0(r);break;case 7:this.stringBuffer=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",r),this.stringBuffer=String(r.getTime()/1e3)}return}if(o.isBlobSchema()&&"byteLength"in r){this.stringBuffer=(this.serdeContext?.base64Encoder??oc)(r);return}if(o.isListSchema()&&Array.isArray(r)){let a="";for(const l of r){this.write([o.getValueSchema(),o.getMergedTraits()],l);const c=this.flush(),u=o.getValueSchema().isTimestampSchema()?c:Bze(c);a!==""&&(a+=", "),a+=u}this.stringBuffer=a;return}this.stringBuffer=JSON.stringify(r,null,2);break;case"string":const i=o.getMergedTraits().mediaType;let s=r;if(i&&((i==="application/json"||i.endsWith("+json"))&&(s=Qa.from(s)),o.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??oc)(s.toString());return}this.stringBuffer=r;break;default:o.isIdempotencyToken()?this.stringBuffer=OC():this.stringBuffer=String(r)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class Jze{codecSerializer;stringSerializer;buffer;constructor(t,r,o=new Qze(r)){this.codecSerializer=t,this.stringSerializer=o}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,r){const o=or.of(t),i=o.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(o,r),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(o,r)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function eqe(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}class r7{authSchemes=new Map;constructor(t){for(const[r,o]of Object.entries(t))o!==void 0&&this.authSchemes.set(r,o)}getIdentityProvider(t){return this.authSchemes.get(t)}}const tqe=e=>function(r){return o7(r)&&r.expiration.getTime()-Date.now()<e},nqe=3e5,rqe=tqe(nqe),o7=e=>e.expiration!==void 0,oqe=(e,t,r)=>{if(e===void 0)return;const o=typeof e!="function"?async()=>Promise.resolve(e):e;let i,s,a,l=!1;const c=async u=>{s||(s=o(u));try{i=await s,a=!0,l=!1}finally{s=void 0}return i};return t===void 0?async u=>((!a||u?.forceRefresh)&&(i=await c(u)),i):async u=>((!a||u?.forceRefresh)&&(i=await c(u)),l?i:r(i)?(t(i)&&await c(u),i):(l=!0,i))};class OM extends Error{name="ProviderError";tryNextLink;constructor(t,r=!0){let o,i=!0;typeof r=="boolean"?(o=void 0,i=r):r!=null&&typeof r=="object"&&(o=r.logger,i=r.tryNextLink??!0),super(t),this.tryNextLink=i,Object.setPrototypeOf(this,OM.prototype),o?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${t}`)}static from(t,r=!0){return Object.assign(new this(t.message,r),t)}}class fp extends OM{name="CredentialsProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,fp.prototype)}}const iqe=(e,t,r)=>{let o,i,s,a=!1;const l=async()=>{i||(i=e());try{o=await i,s=!0,a=!1}finally{i=void 0}return o};return async c=>((!s||c?.forceRefresh)&&(o=await l()),o)},sqe=e=>(e.sigv4aSigningRegionSet=hf(e.sigv4aSigningRegionSet),e),aqe="X-Amz-Algorithm",lqe="X-Amz-Credential",i7="X-Amz-Date",cqe="X-Amz-SignedHeaders",uqe="X-Amz-Expires",s7="X-Amz-Signature",a7="X-Amz-Security-Token",l7="authorization",c7=i7.toLowerCase(),dqe="date",fqe=[l7,c7,dqe],pqe=s7.toLowerCase(),qP="x-amz-content-sha256",hqe=a7.toLowerCase(),mqe={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},gqe=/^proxy-/,bqe=/^sec-/,qO="AWS4-HMAC-SHA256",yqe="AWS4-HMAC-SHA256-PAYLOAD",vqe="UNSIGNED-PAYLOAD",xqe=50,u7="aws4_request",Sqe=3600*24*7,Pv={},UO=[],GO=(e,t,r)=>`${e}/${t}/${r}/${u7}`,Cqe=async(e,t,r,o,i)=>{const s=await WV(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${o}:${i}:${Ci(s)}:${t.sessionToken}`;if(a in Pv)return Pv[a];for(UO.push(a);UO.length>xqe;)delete Pv[UO.shift()];let l=`AWS4${t.secretAccessKey}`;for(const c of[r,o,i,u7])l=await WV(e,l,c);return Pv[a]=l},WV=(e,t,r)=>{const o=new e(t);return o.update(Bf(r)),o.digest()},KV=({headers:e},t,r)=>{const o={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const s=i.toLowerCase();(s in mqe||t?.has(s)||gqe.test(s)||bqe.test(s))&&(!r||r&&!r.has(s))||(o[s]=e[i].trim().replace(/\s+/g," "))}return o},d7=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",WO=async({headers:e,body:t},r)=>{for(const o of Object.keys(e))if(o.toLowerCase()===qP)return e[o];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||d7(t)){const o=new r;return o.update(Bf(t)),Ci(await o.digest())}return vqe};class wqe{format(t){const r=[];for(const s of Object.keys(t)){const a=cl(s);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const o=new Uint8Array(r.reduce((s,a)=>s+a.byteLength,0));let i=0;for(const s of r)o.set(s,i),i+=s.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,6),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const l=cl(t.value),c=new DataView(new ArrayBuffer(3+l.byteLength));c.setUint8(0,7),c.setUint16(1,l.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(l,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Oqe.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!Tqe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(WW(t.value.replace(/\-/g,"")),1),f}}}var YV;(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"})(YV||(YV={}));const Tqe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Oqe=class f7{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let o=7,i=Math.abs(Math.round(t));o>-1&&i>0;o--,i/=256)r[o]=i;return t<0&&ZV(r),new f7(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&ZV(t),parseInt(Ci(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function ZV(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const Pqe=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},Eqe=(e,t={})=>{const{headers:r,query:o={}}=Br.clone(e);for(const i of Object.keys(r)){const s=i.toLowerCase();(s.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(o[i]=r[i],delete r[i])}return{...e,headers:r,query:o}},XV=e=>{e=Br.clone(e);for(const t of Object.keys(e.headers))fqe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Iqe=({query:e={}})=>{const t=[],r={};for(const o of Object.keys(e)){if(o.toLowerCase()===pqe)continue;const i=su(o);t.push(i);const s=e[o];typeof s=="string"?r[i]=`${i}=${su(s)}`:Array.isArray(s)&&(r[i]=s.slice(0).reduce((a,l)=>a.concat([`${i}=${su(l)}`]),[]).sort().join("&"))}return t.sort().map(o=>r[o]).filter(o=>o).join("&")},kqe=e=>Rqe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),Rqe=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class Mqe{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:o,service:i,sha256:s,uriEscapePath:a=!0}){this.service=i,this.sha256=s,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Rs(o),this.credentialProvider=Rs(r)}createCanonicalRequest(t,r,o){const i=Object.keys(r).sort();return`${t.method}
453
453
  ${this.getCanonicalPath(t)}
454
454
  ${Iqe(t)}
455
455
  ${i.map(s=>`${s}:${r[s]}`).join(`
@@ -461,5 +461,5 @@ ${t}
461
461
  ${r}
462
462
  ${Ci(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const r=[];for(const s of t.split("/"))s?.length!==0&&s!=="."&&(s===".."?r.pop():r.push(s));const o=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return su(o).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const r=kqe(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class UP extends Mqe{headerFormatter=new wqe;constructor({applyChecksum:t,credentials:r,region:o,service:i,sha256:s,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:r,region:o,service:i,sha256:s,uriEscapePath:a})}async presign(t,r={}){const{signingDate:o=new Date,expiresIn:i=3600,unsignableHeaders:s,unhoistableHeaders:a,signableHeaders:l,hoistableHeaders:c,signingRegion:u,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const p=u??await this.regionProvider(),{longDate:h,shortDate:b}=this.formatDate(o);if(i>Sqe)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=GO(b,p,d??this.service),y=Eqe(XV(t),{unhoistableHeaders:a,hoistableHeaders:c});f.sessionToken&&(y.query[a7]=f.sessionToken),y.query[aqe]=qO,y.query[lqe]=`${f.accessKeyId}/${g}`,y.query[i7]=h,y.query[uqe]=i.toString(10);const v=KV(y,s,l);return y.query[cqe]=this.getCanonicalHeaderList(v),y.query[s7]=await this.getSignature(h,g,this.getSigningKey(f,p,b,d),this.createCanonicalRequest(y,v,await WO(t,this.sha256))),y}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:o=new Date,priorSignature:i,signingRegion:s,signingService:a}){const l=s??await this.regionProvider(),{shortDate:c,longDate:u}=this.formatDate(o),d=GO(c,l,a??this.service),f=await WO({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const h=Ci(await p.digest()),b=[yqe,u,d,i,h,f].join(`
463
463
  `);return this.signString(b,{signingDate:o,signingRegion:l,signingService:a})}async signMessage(t,{signingDate:r=new Date,signingRegion:o,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:o,signingService:i,priorSignature:t.priorSignature}).then(a=>({message:t.message,signature:a}))}async signString(t,{signingDate:r=new Date,signingRegion:o,signingService:i}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=o??await this.regionProvider(),{shortDate:l}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(s,a,l,i));return c.update(Bf(t)),Ci(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:o,unsignableHeaders:i,signingRegion:s,signingService:a}={}){const l=await this.credentialProvider();this.validateResolvedCredentials(l);const c=s??await this.regionProvider(),u=XV(t),{longDate:d,shortDate:f}=this.formatDate(r),p=GO(f,c,a??this.service);u.headers[c7]=d,l.sessionToken&&(u.headers[hqe]=l.sessionToken);const h=await WO(u,this.sha256);!Pqe(qP,u.headers)&&this.applyChecksum&&(u.headers[qP]=h);const b=KV(u,i,o),g=await this.getSignature(d,p,this.getSigningKey(l,c,f,a),this.createCanonicalRequest(u,b,h));return u.headers[l7]=`${qO} Credential=${l.accessKeyId}/${p}, SignedHeaders=${this.getCanonicalHeaderList(b)}, Signature=${g}`,u}async getSignature(t,r,o,i){const s=await this.createStringToSign(t,r,i,qO),a=new this.sha256(await o);return a.update(Bf(s)),Ci(await a.digest())}getSigningKey(t,r,o,i){return Cqe(this.sha256,t,o,r,i||this.service)}}const p7=e=>{let t=e.credentials,r=!!e.credentials,o;Object.defineProperty(e,"credentials",{set(u){u&&u!==t&&u!==o&&(r=!0),t=u;const d=Aqe(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=Dqe(e,d);if(r&&!f.attributed){const p=typeof t=="object"&&t!==null;o=async h=>{const g=await f(h);return p&&(!g.$source||Object.keys(g.$source).length===0)?_He(g,"CREDENTIALS_CODE","e"):g},o.memoized=f.memoized,o.configBound=f.configBound,o.attributed=!0}else o=f},get(){return o},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:a}=e;let l;return e.signer?l=hf(e.signer):e.regionInfoProvider?l=()=>hf(e.region)().then(async u=>[await e.regionInfoProvider(u,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:f,signingService:p}=u;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||p||e.serviceId;const h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},b=e.signerConstructor||UP;return new b(h)}):l=async u=>{u=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await hf(e.region)(),properties:{}},u);const d=u.signingRegion,f=u.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;const p={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},h=e.signerConstructor||UP;return new h(p)},Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:l})};function Aqe(e,{credentials:t,credentialDefaultProvider:r}){let o;return t?t?.memoized?o=t:o=oqe(t,rqe,o7):r?o=hf(r(Object.assign({},e,{parentClientConfig:e}))):o=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},o.memoized=!0,o}function Dqe(e,t){if(t.configBound)return t;const r=async o=>t({...o,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}const QV=typeof TextEncoder=="function"?new TextEncoder:null,h7=e=>{if(typeof e=="string"){if(QV)return QV.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const o=e.charCodeAt(r);o>127&&o<=2047?t++:o>2047&&o<=65535&&(t+=2),o>=56320&&o<=57343&&r--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},$c=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const o of t)r.push(o);return r},Al=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,s0=()=>{let e=[],t=[],r=!1;const o=new Set,i=f=>f.sort((p,h)=>JV[h.step]-JV[p.step]||eH[h.priority||"normal"]-eH[p.priority||"normal"]),s=f=>{let p=!1;const h=b=>{const g=$c(b.name,b.aliases);if(g.includes(f)){p=!0;for(const y of g)o.delete(y);return!1}return!0};return e=e.filter(h),t=t.filter(h),p},a=f=>{let p=!1;const h=b=>{if(b.middleware===f){p=!0;for(const g of $c(b.name,b.aliases))o.delete(g);return!1}return!0};return e=e.filter(h),t=t.filter(h),p},l=f=>(e.forEach(p=>{f.add(p.middleware,{...p})}),t.forEach(p=>{f.addRelativeTo(p.middleware,{...p})}),f.identifyOnResolve?.(d.identifyOnResolve()),f),c=f=>{const p=[];return f.before.forEach(h=>{h.before.length===0&&h.after.length===0?p.push(h):p.push(...c(h))}),p.push(f),f.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?p.push(h):p.push(...c(h))}),p},u=(f=!1)=>{const p=[],h=[],b={};return e.forEach(y=>{const v={...y,before:[],after:[]};for(const C of $c(v.name,v.aliases))b[C]=v;p.push(v)}),t.forEach(y=>{const v={...y,before:[],after:[]};for(const C of $c(v.name,v.aliases))b[C]=v;h.push(v)}),h.forEach(y=>{if(y.toMiddleware){const v=b[y.toMiddleware];if(v===void 0){if(f)return;throw new Error(`${y.toMiddleware} is not found when adding ${Al(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}y.relation==="after"&&v.after.push(y),y.relation==="before"&&v.before.push(y)}}),i(p).map(c).reduce((y,v)=>(y.push(...v),y),[])},d={add:(f,p={})=>{const{name:h,override:b,aliases:g}=p,y={step:"initialize",priority:"normal",middleware:f,...p},v=$c(h,g);if(v.length>0){if(v.some(C=>o.has(C))){if(!b)throw new Error(`Duplicate middleware name '${Al(h,g)}'`);for(const C of v){const O=e.findIndex(P=>P.name===C||P.aliases?.some(k=>k===C));if(O===-1)continue;const T=e[O];if(T.step!==y.step||y.priority!==T.priority)throw new Error(`"${Al(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${Al(h,g)}" middleware with ${y.priority} priority in ${y.step} step.`);e.splice(O,1)}}for(const C of v)o.add(C)}e.push(y)},addRelativeTo:(f,p)=>{const{name:h,override:b,aliases:g}=p,y={middleware:f,...p},v=$c(h,g);if(v.length>0){if(v.some(C=>o.has(C))){if(!b)throw new Error(`Duplicate middleware name '${Al(h,g)}'`);for(const C of v){const O=t.findIndex(P=>P.name===C||P.aliases?.some(k=>k===C));if(O===-1)continue;const T=t[O];if(T.toMiddleware!==y.toMiddleware||T.relation!==y.relation)throw new Error(`"${Al(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${Al(h,g)}" middleware ${y.relation} "${y.toMiddleware}" middleware.`);t.splice(O,1)}}for(const C of v)o.add(C)}t.push(y)},clone:()=>l(s0()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?s(f):a(f),removeByTag:f=>{let p=!1;const h=b=>{const{tags:g,name:y,aliases:v}=b;if(g&&g.includes(f)){const C=$c(y,v);for(const O of C)o.delete(O);return p=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),p},concat:f=>{const p=l(s0());return p.use(f),p.identifyOnResolve(r||p.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),p},applyToStack:l,identify:()=>u(!0).map(f=>{const p=f.step??f.relation+" "+f.toMiddleware;return Al(f.name,f.aliases)+" - "+p}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,p)=>{for(const h of u().map(b=>b.middleware).reverse())f=h(f,p);return r&&console.log(d.identify()),f}};return d},JV={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},eH={high:3,normal:2,low:1};class m7{config;middlewareStack=s0();initConfig;handlers;constructor(t){this.config=t;const{protocol:r,protocolSettings:o}=t;o&&typeof r=="function"&&(t.protocol=new r(o))}send(t,r,o){const i=typeof r!="function"?r:void 0,s=typeof r=="function"?r:o,a=i===void 0&&this.config.cacheMiddleware===!0;let l;if(a){this.handlers||(this.handlers=new WeakMap);const c=this.handlers;c.has(t.constructor)?l=c.get(t.constructor):(l=t.resolveMiddleware(this.middlewareStack,this.config,i),c.set(t.constructor,l))}else delete this.handlers,l=t.resolveMiddleware(this.middlewareStack,this.config,i);if(s)l(t).then(c=>s(null,c.output),c=>s(c)).catch(()=>{});else return l(t).then(c=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const KO="***SensitiveInformation***";function GP(e,t){if(t==null)return t;const r=or.of(e);if(r.getMergedTraits().sensitive)return KO;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return KO}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return KO}else if(r.isStructSchema()&&typeof t=="object"){const o=t,i={};for(const[s,a]of r.structIterator())o[s]!=null&&(i[s]=GP(a,o[s]));return i}return t}class IC{middlewareStack=s0();schema;static classBuilder(){return new _qe}resolveMiddlewareWithContext(t,r,o,{middlewareFn:i,clientName:s,commandName:a,inputFilterSensitiveLog:l,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:d,CommandCtor:f}){for(const y of i.bind(this)(f,t,r,o))this.middlewareStack.use(y);const p=t.concat(this.middlewareStack),{logger:h}=r,b={logger:h,clientName:s,commandName:a,inputFilterSensitiveLog:l,outputFilterSensitiveLog:c,[jP]:{commandInstance:this,...u},...d},{requestHandler:g}=r;return p.resolve(y=>g.handle(y.request,o||{}),b)}}class _qe{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,o={}){return this._smithyContext={service:t,operation:r,...o},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=o=>o,r=o=>o){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let r;return r=class extends IC{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[o]){super(),this.input=o??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(o,i,s){const a=t._operationSchema,l=a?.[4]??a?.input,c=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(o,i,s,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(a?GP.bind(null,l):u=>u),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(a?GP.bind(null,c):u=>u),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class Qc extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const r=t;return Qc.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const r=t;return this===Qc?Qc.isInstance(t):Qc.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const tH=(e,t={})=>{Object.entries(t).filter(([,o])=>o!==void 0).forEach(([o,i])=>{(e[o]==null||e[o]==="")&&(e[o]=i)});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},g7=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Nqe=e=>{const t=[];for(const r in r0){const o=r0[r];e[o]!==void 0&&t.push({algorithmId:()=>o,checksumConstructor:()=>e[o]})}return{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},Fqe=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{t[r.algorithmId()]=r.checksumConstructor()}),t},Lqe=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),$qe=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},b7=e=>Object.assign(Nqe(e),Lqe(e)),y7=e=>Object.assign(Fqe(e),$qe(e)),v7=e=>{const t="#text";for(const r in e)e.hasOwnProperty(r)&&e[r][t]!==void 0?e[r]=e[r][t]:typeof e[r]=="object"&&e[r]!==null&&(e[r]=v7(e[r]));return e};class kC{trace(){}debug(){}info(){}warn(){}error(){}}class x7{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){const o=r.getMemberSchemas(),i=Object.values(o).find(s=>!!s.getMergedTraits().httpPayload);if(i){const s=i.getMergedTraits().mediaType;return s||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(o).find(a=>{const{httpQuery:l,httpQueryParams:c,httpHeader:u,httpLabel:d,httpPrefixHeaders:f}=a.getMergedTraits();return!l&&!c&&!u&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,o,i,s,a){let l=r,c=t;t.includes("#")&&([l,c]=t.split("#"));const u={$metadata:s,$fault:o.statusCode<500?"client":"server"},d=ti.for(l);try{return{errorSchema:a?.(d,c)??d.getSchema(t),errorMetadata:u}}catch{i.message=i.message??i.Message??"UnknownError";const p=ti.for("smithy.ts.sdk.synthetic."+l),h=p.getBaseException();if(h){const b=p.getErrorCtor(h)??Error;throw this.decorateServiceException(Object.assign(new b({name:c}),u),i)}throw this.decorateServiceException(Object.assign(new Error(c),u),i)}}decorateServiceException(t,r={}){if(this.queryCompat){const o=t.Message??r.Message,i=tH(t,r);o&&(i.message=o),i.Error={...i.Error,Type:i.Error?.Type,Code:i.Error?.Code,Message:i.Error?.message??i.Error?.Message??o};const s=i.$metadata.requestId;return s&&(i.RequestId=s),i}return tH(t,r)}setQueryCompatError(t,r){const o=r.headers?.["x-amzn-query-error"];if(t!==void 0&&o!=null){const[i,s]=o.split(";"),a=Object.entries(t),l={Code:i,Type:s};Object.assign(t,l);for(const[c,u]of a)l[c==="message"?"Message":c]=u;delete l.__type,t.Error=l}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(i=>or.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class RC{serdeContext;setSerdeContext(t){this.serdeContext=t}}class S7{from;to;keys;constructor(t,r){this.from=t,this.to=r,this.keys=new Set(Object.keys(this.from).filter(o=>o!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,r=this.from[t];this.to.$unknown=[t,r]}}}function jqe(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Bqe(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class WP{value;constructor(t){this.value=t}toString(){return Bqe(""+this.value)}}class Jo{name;children;attributes={};static of(t,r,o){const i=new Jo(t);return r!==void 0&&i.addChildNode(new WP(r)),o!==void 0&&i.withName(o),i}constructor(t,r=[]){this.name=t,this.children=r}withName(t){return this.name=t,this}addAttribute(t,r){return this.attributes[t]=r,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,r){return r!=null&&(this.attributes[t]=r),this}cc(t,r,o=r){if(t[r]!=null){const i=Jo.of(r,t[r]).withName(o);this.c(i)}}l(t,r,o,i){t[r]!=null&&i().map(a=>{a.withName(o),this.c(a)})}lc(t,r,o,i){if(t[r]!=null){const s=i(),a=new Jo(o);s.map(l=>{a.c(l)}),this.c(a)}}toString(){const t=!!this.children.length;let r=`<${this.name}`;const o=this.attributes;for(const i of Object.keys(o)){const s=o[i];s!=null&&(r+=` ${i}="${jqe(""+s)}"`)}return r+=t?`>${this.children.map(i=>i.toString()).join("")}</${this.name}>`:"/>"}}let YO;function Vqe(e){YO||(YO=new DOMParser);const t=YO.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const r=o=>{if(o.nodeType===Node.TEXT_NODE&&o.textContent?.trim())return o.textContent;if(o.nodeType===Node.ELEMENT_NODE){const i=o;if(i.attributes.length===0&&i.childNodes.length===0)return"";const s={},a=Array.from(i.attributes);for(const c of a)s[`${c.name}`]=c.value;const l=Array.from(i.childNodes);for(const c of l){const u=r(c);if(u!=null){const d=c.nodeName;if(l.length===1&&a.length===0&&d==="#text")return u;s[d]?Array.isArray(s[d])?s[d].push(u):s[d]=[s[d],u]:s[d]=u}else if(l.length===1&&a.length===0)return i.textContent}return s}return null};return{[t.documentElement.nodeName]:r(t.documentElement)}}class Hqe extends RC{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new n7(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,r,o){const i=or.of(t),s=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(s).find(u=>!!u.getMemberTraits().eventPayload)){const u={},d=Object.keys(s)[0];return s[d].isBlobSchema()?u[d]=r:u[d]=this.read(s[d],r),u}const l=(this.serdeContext?.utf8Encoder??zu)(r),c=this.parseXml(l);return this.readSchema(t,o?c[o]:c)}readSchema(t,r){const o=or.of(t);if(o.isUnitSchema())return;const i=o.getMergedTraits();if(o.isListSchema()&&!Array.isArray(r))return this.readSchema(o,[r]);if(r==null)return r;if(typeof r=="object"){const s=!!i.sparse,a=!!i.xmlFlattened;if(o.isListSchema()){const c=o.getValueSchema(),u=[],d=c.getMergedTraits().xmlName??"member",f=a?r:(r[0]??r)[d],p=Array.isArray(f)?f:[f];for(const h of p)(h!=null||s)&&u.push(this.readSchema(c,h));return u}const l={};if(o.isMapSchema()){const c=o.getKeySchema(),u=o.getValueSchema();let d;a?d=Array.isArray(r)?r:[r]:d=Array.isArray(r.entry)?r.entry:[r.entry];const f=c.getMergedTraits().xmlName??"key",p=u.getMergedTraits().xmlName??"value";for(const h of d){const b=h[f],g=h[p];(g!=null||s)&&(l[b]=this.readSchema(u,g))}return l}if(o.isStructSchema()){const c=o.isUnionSchema();let u;c&&(u=new S7(r,l));for(const[d,f]of o.structIterator()){const p=f.getMergedTraits(),h=p.httpPayload?p.xmlName??f.getName():f.getMemberTraits().xmlName??d;c&&u.mark(h),r[h]!=null&&(l[d]=this.readSchema(f,r[h]))}return c&&u.writeUnknown(),l}if(o.isDocumentSchema())return r;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${o.getName(!0)}`)}return o.isListSchema()?[]:o.isMapSchema()||o.isStructSchema()?{}:this.stringDeserializer.read(o,r)}parseXml(t){if(t.length){let r;try{r=Vqe(t)}catch(a){throw a&&typeof a=="object"&&Object.defineProperty(a,"$responseBodyText",{value:t}),a}const o="#text",i=Object.keys(r)[0],s=r[i];return s[o]&&(s[i]=s[o],delete s[o]),v7(s)}return{}}}const zqe=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"};class qqe extends RC{settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,r){const o=or.of(t);if(o.isStringSchema()&&typeof r=="string")this.stringBuffer=r;else if(o.isBlobSchema())this.byteBuffer="byteLength"in r?r:(this.serdeContext?.base64Decoder??Tu)(r);else{this.buffer=this.writeStruct(o,r,void 0);const i=o.getMergedTraits();i.httpPayload&&!i.xmlName&&this.buffer.withName(o.getName())}}flush(){if(this.byteBuffer!==void 0){const r=this.byteBuffer;return delete this.byteBuffer,r}if(this.stringBuffer!==void 0){const r=this.stringBuffer;return delete this.stringBuffer,r}const t=this.buffer;return this.settings.xmlNamespace&&(t?.attributes?.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,r,o){const i=t.getMergedTraits(),s=t.isMemberSchema()&&!i.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():i.xmlName??t.getName();if(!s||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);const a=Jo.of(s),[l,c]=this.getXmlnsAttribute(t,o);for(const[d,f]of t.structIterator()){const p=r[d];if(p!=null||f.isIdempotencyToken()){if(f.getMergedTraits().xmlAttribute){a.addAttribute(f.getMergedTraits().xmlName??d,this.writeSimple(f,p));continue}if(f.isListSchema())this.writeList(f,p,a,c);else if(f.isMapSchema())this.writeMap(f,p,a,c);else if(f.isStructSchema())a.addChildNode(this.writeStruct(f,p,c));else{const h=Jo.of(f.getMergedTraits().xmlName??f.getMemberName());this.writeSimpleInto(f,p,h,c),a.addChildNode(h)}}}const{$unknown:u}=r;if(u&&t.isUnionSchema()&&Array.isArray(u)&&Object.keys(r).length===1){const[d,f]=u,p=Jo.of(d);if(typeof f!="string")if(r instanceof Jo||r instanceof WP)a.addChildNode(r);else throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");this.writeSimpleInto(0,f,p,c),a.addChildNode(p)}return c&&a.addAttribute(l,c),a}writeList(t,r,o,i){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);const s=t.getMergedTraits(),a=t.getValueSchema(),l=a.getMergedTraits(),c=!!l.sparse,u=!!s.xmlFlattened,[d,f]=this.getXmlnsAttribute(t,i),p=(h,b)=>{if(a.isListSchema())this.writeList(a,Array.isArray(b)?b:[b],h,f);else if(a.isMapSchema())this.writeMap(a,b,h,f);else if(a.isStructSchema()){const g=this.writeStruct(a,b,f);h.addChildNode(g.withName(u?s.xmlName??t.getMemberName():l.xmlName??"member"))}else{const g=Jo.of(u?s.xmlName??t.getMemberName():l.xmlName??"member");this.writeSimpleInto(a,b,g,f),h.addChildNode(g)}};if(u)for(const h of r)(c||h!=null)&&p(o,h);else{const h=Jo.of(s.xmlName??t.getMemberName());f&&h.addAttribute(d,f);for(const b of r)(c||b!=null)&&p(h,b);o.addChildNode(h)}}writeMap(t,r,o,i,s=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);const a=t.getMergedTraits(),l=t.getKeySchema(),u=l.getMergedTraits().xmlName??"key",d=t.getValueSchema(),f=d.getMergedTraits(),p=f.xmlName??"value",h=!!f.sparse,b=!!a.xmlFlattened,[g,y]=this.getXmlnsAttribute(t,i),v=(C,O,T)=>{const P=Jo.of(u,O),[k,M]=this.getXmlnsAttribute(l,y);M&&P.addAttribute(k,M),C.addChildNode(P);let _=Jo.of(p);d.isListSchema()?this.writeList(d,T,_,y):d.isMapSchema()?this.writeMap(d,T,_,y,!0):d.isStructSchema()?_=this.writeStruct(d,T,y):this.writeSimpleInto(d,T,_,y),C.addChildNode(_)};if(b){for(const[C,O]of Object.entries(r))if(h||O!=null){const T=Jo.of(a.xmlName??t.getMemberName());v(T,C,O),o.addChildNode(T)}}else{let C;s||(C=Jo.of(a.xmlName??t.getMemberName()),y&&C.addAttribute(g,y),o.addChildNode(C));for(const[O,T]of Object.entries(r))if(h||T!=null){const P=Jo.of("entry");v(P,O,T),(s?o:C).addChildNode(P)}}}writeSimple(t,r){if(r===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");const o=or.of(t);let i=null;if(r&&typeof r=="object")if(o.isBlobSchema())i=(this.serdeContext?.base64Encoder??oc)(r);else if(o.isTimestampSchema()&&r instanceof Date)switch(EC(o,this.settings)){case 5:i=r.toISOString().replace(".000Z","Z");break;case 6:i=i0(r);break;case 7:i=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",r),i=i0(r);break}else{if(o.isBigDecimalSchema()&&r)return r instanceof fg?r.string:String(r);throw o.isMapSchema()||o.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${o.getName(!0)}`)}if((o.isBooleanSchema()||o.isNumericSchema()||o.isBigIntegerSchema()||o.isBigDecimalSchema())&&(i=String(r)),o.isStringSchema()&&(r===void 0&&o.isIdempotencyToken()?i=OC():i=String(r)),i===null)throw new Error(`Unhandled schema-value pair ${o.getName(!0)}=${r}`);return i}writeSimpleInto(t,r,o,i){const s=this.writeSimple(t,r),a=or.of(t),l=new WP(s),[c,u]=this.getXmlnsAttribute(a,i);u&&o.addAttribute(c,u),o.addChildNode(l)}getXmlnsAttribute(t,r){const o=t.getMergedTraits(),[i,s]=o.xmlNamespace??[];return s&&s!==r?[i?`xmlns:${i}`:"xmlns",s]:[void 0,void 0]}}class Uqe extends RC{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new qqe(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Hqe(this.settings);return t.setSerdeContext(this.serdeContext),t}}class Gqe extends Zze{codec;serializer;deserializer;mixin=new x7;constructor(t){super(t);const r={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new Uqe(r),this.serializer=new Jze(this.codec.createSerializer(),r),this.deserializer=new Xze(this.codec.createDeserializer(),r)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,r,o){const i=await super.serializeRequest(t,r,o),s=or.of(t.input);if(!i.headers["content-type"]){const a=this.mixin.resolveRestContentType(this.getDefaultContentType(),s);a&&(i.headers["content-type"]=a)}return typeof i.body=="string"&&i.headers["content-type"]===this.getDefaultContentType()&&!i.body.startsWith("<?xml ")&&!this.hasUnstructuredPayloadBinding(s)&&(i.body='<?xml version="1.0" encoding="UTF-8"?>'+i.body),i}async deserializeResponse(t,r,o){return super.deserializeResponse(t,r,o)}async handleError(t,r,o,i,s){const a=zqe(o,i)??"Unknown";if(i.Error&&typeof i.Error=="object")for(const b of Object.keys(i.Error))i[b]=i.Error[b],b.toLowerCase()==="message"&&(i.message=i.Error[b]);i.RequestId&&!s.requestId&&(s.requestId=i.RequestId);const{errorSchema:l,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,o,i,s),u=or.of(l),d=i.Error?.message??i.Error?.Message??i.message??i.Message??"Unknown",f=ti.for(l[1]).getErrorCtor(l)??Error,p=new f(d);await this.deserializeHttpMessage(l,r,o,i);const h={};for(const[b,g]of u.structIterator()){const y=g.getMergedTraits().xmlName??b,v=i.Error?.[y]??i[y];h[b]=this.codec.createDeserializer().readSchema(g,v)}throw this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:d},h),i)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(const[,r]of t.structIterator())if(r.getMergedTraits().httpPayload)return!(r.isStructSchema()||r.isMapSchema()||r.isListSchema());return!1}}const KP=[Jn.CRC32,Jn.CRC32C,Jn.CRC64NVME,Jn.SHA1,Jn.SHA256],Wqe=[Jn.SHA256,Jn.SHA1,Jn.CRC32,Jn.CRC32C,Jn.CRC64NVME],Kqe=(e,{requestChecksumRequired:t,requestAlgorithmMember:r,requestChecksumCalculation:o})=>{if(!r)return o===jf.WHEN_SUPPORTED||t?BP:void 0;if(!e[r])return;const i=e[r];if(!KP.includes(i))throw new Error(`The checksum algorithm "${i}" is not supported by the client. Select one of ${KP}.`);return i},PM=e=>e===Jn.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,Yqe=(e,t)=>{const r=e.toLowerCase();for(const o of Object.keys(t))if(r===o.toLowerCase())return!0;return!1},Zqe=(e,t)=>{const r=e.toLowerCase();for(const o of Object.keys(t))if(o.toLowerCase().startsWith(r))return!0;return!1},C7=e=>e!==void 0&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!d7(e);function EM(e,t,r,o){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(d){try{u(o.next(d))}catch(f){a(f)}}function c(d){try{u(o.throw(d))}catch(f){a(f)}}function u(d){d.done?s(d.value):i(d.value).then(l,c)}u((o=o.apply(e,t||[])).next())})}function IM(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(u){return function(d){return c([u,d])}}function c(u){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(o=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{o=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function w7(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const Xqe=e=>new TextEncoder().encode(e);var Qqe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:Xqe;function ic(e){return e instanceof Uint8Array?e:typeof e=="string"?Qqe(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function dm(e){return typeof e=="string"?e.length===0:e.byteLength===0}function T7(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function O7(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}var Jqe=(function(){function e(){this.crc32c=new nH}return e.prototype.update=function(t){dm(t)||this.crc32c.update(ic(t))},e.prototype.digest=function(){return EM(this,void 0,void 0,function(){return IM(this,function(t){return[2,T7(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new nH},e})(),nH=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,o;try{for(var i=w7(t),s=i.next();!s.done;s=i.next()){var a=s.value;this.checksum=this.checksum>>>8^t3e[(this.checksum^a)&255]}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),e3e=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],t3e=O7(e3e);const n3e=()=>{const t=new Array(8);for(let r=0;r<8;r++){const o=new Array(512);for(let i=0;i<256;i++){let s=BigInt(i);for(let a=0;a<8*(r+1);a++)s&1n?s=s>>1n^0x9a6c9329ac4bc9b5n:s=s>>1n;o[i*2]=Number(s>>32n&0xffffffffn),o[i*2+1]=Number(s&0xffffffffn)}t[r]=new Uint32Array(o)}return t};let ZO,ph,YP,ZP,XP,QP,JP,eE,tE;const r3e=()=>{ZO||(ZO=n3e(),[ph,YP,ZP,XP,QP,JP,eE,tE]=ZO)};class o3e{c1=0;c2=0;constructor(){r3e(),this.reset()}update(t){const r=t.length;let o=0,i=this.c1,s=this.c2;for(;o+8<=r;){const a=((s^t[o++])&255)<<1,l=((s>>>8^t[o++])&255)<<1,c=((s>>>16^t[o++])&255)<<1,u=((s>>>24^t[o++])&255)<<1,d=((i^t[o++])&255)<<1,f=((i>>>8^t[o++])&255)<<1,p=((i>>>16^t[o++])&255)<<1,h=((i>>>24^t[o++])&255)<<1;i=tE[a]^eE[l]^JP[c]^QP[u]^XP[d]^ZP[f]^YP[p]^ph[h],s=tE[a+1]^eE[l+1]^JP[c+1]^QP[u+1]^XP[d+1]^ZP[f+1]^YP[p+1]^ph[h+1]}for(;o<r;){const a=((s^t[o])&255)<<1;s=(s>>>8|(i&255)<<24)>>>0,i=i>>>8^ph[a],s^=ph[a+1],o++}this.c1=i,this.c2=s}async digest(){const t=this.c1^4294967295,r=this.c2^4294967295;return new Uint8Array([t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255])}reset(){this.c1=4294967295,this.c2=4294967295}}var i3e=(function(){function e(){this.crc32=new a0}return e.prototype.update=function(t){dm(t)||this.crc32.update(ic(t))},e.prototype.digest=function(){return EM(this,void 0,void 0,function(){return IM(this,function(t){return[2,T7(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new a0},e})(),a0=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,o;try{for(var i=w7(t),s=i.next();!s.done;s=i.next()){var a=s.value;this.checksum=this.checksum>>>8^a3e[(this.checksum^a)&255]}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),s3e=[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],a3e=O7(s3e);const l3e=()=>i3e,P7=(e,t)=>{switch(e){case Jn.MD5:return t.md5;case Jn.CRC32:return l3e();case Jn.CRC32C:return Jqe;case Jn.CRC64NVME:return o3e;case Jn.SHA1:return t.sha1;case Jn.SHA256:return t.sha256;default:throw new Error(`Unsupported checksum algorithm: ${e}`)}},E7=(e,t)=>{const r=new e;return r.update(Bf(t||"")),r.digest()},c3e={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},u3e=(e,t)=>(r,o)=>async i=>{if(!Br.isInstance(i.request)||Zqe("x-amz-checksum-",i.request.headers))return r(i);const{request:s,input:a}=i,{body:l,headers:c}=s,{base64Encoder:u,streamHasher:d}=e,{requestChecksumRequired:f,requestAlgorithmMember:p}=t,h=await e.requestChecksumCalculation(),b=p?.name,g=p?.httpHeader;b&&!a[b]&&(h===jf.WHEN_SUPPORTED||f)&&(a[b]=BP,g&&(c[g]=BP));const y=Kqe(a,{requestChecksumRequired:f,requestAlgorithmMember:p?.name,requestChecksumCalculation:h});let v=l,C=c;if(y){switch(y){case Jn.CRC32:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case Jn.CRC32C:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case Jn.CRC64NVME:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case Jn.SHA1:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case Jn.SHA256:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const O=PM(y),T=P7(y,e);if(C7(l)){const{getAwsChunkedEncodingStream:P,bodyLengthChecker:k}=e;v=P(typeof e.requestStreamBufferSize=="number"&&e.requestStreamBufferSize>=8*1024?QHe(l,e.requestStreamBufferSize,o.logger):l,{base64Encoder:u,bodyLengthChecker:k,checksumLocationName:O,checksumAlgorithmFn:T,streamHasher:d}),C={...c,"content-encoding":c["content-encoding"]?`${c["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":c["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":O},delete C["content-length"]}else if(!Yqe(O,c)){const P=await E7(T,l);C={...c,[O]:u(P)}}}try{return await r({...i,request:{...s,headers:C,body:v}})}catch(O){if(O instanceof Error&&O.name==="InvalidChunkSizeError")try{O.message.endsWith(".")||(O.message+="."),O.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw O}},d3e={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},f3e=(e,t)=>(r,o)=>async i=>{const s=i.input,{requestValidationModeMember:a}=t,l=await e.requestChecksumCalculation(),c=await e.responseChecksumValidation();switch(l){case jf.WHEN_REQUIRED:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case jf.WHEN_SUPPORTED:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(c){case $O.WHEN_REQUIRED:Gr(o,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case $O.WHEN_SUPPORTED:Gr(o,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return a&&!s[a]&&c===$O.WHEN_SUPPORTED&&(s[a]="ENABLED"),r(i)},I7=(e=[])=>{const t=[];for(const r of Wqe)!e.includes(r)||!KP.includes(r)||t.push(r);return t},p3e=e=>{const t=e.lastIndexOf("-");if(t!==-1){const r=e.slice(t+1);if(!r.startsWith("0")){const o=parseInt(r,10);if(!isNaN(o)&&o>=1&&o<=1e4)return!0}}return!1},h3e=async(e,{checksumAlgorithmFn:t,base64Encoder:r})=>r(await E7(t,e)),m3e=async(e,{config:t,responseAlgorithms:r,logger:o})=>{const i=I7(r),{body:s,headers:a}=e;for(const l of i){const c=PM(l),u=a[c];if(u){let d;try{d=P7(l,t)}catch(h){if(l===Jn.CRC64NVME){o?.warn(`Skipping ${Jn.CRC64NVME} checksum validation: ${h.message}`);continue}throw h}const{base64Encoder:f}=t;if(C7(s)){e.body=YHe({expectedChecksum:u,checksumSourceLocation:c,checksum:new d,source:s,base64Encoder:f});return}const p=await h3e(s,{checksumAlgorithmFn:d,base64Encoder:f});if(p===u)break;throw new Error(`Checksum mismatch: expected "${p}" but received "${u}" in response header "${c}".`)}}},g3e={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},b3e=(e,t)=>(r,o)=>async i=>{if(!Br.isInstance(i.request))return r(i);const s=i.input,a=await r(i),l=a.response,{requestValidationModeMember:c,responseAlgorithms:u}=t;if(c&&s[c]==="ENABLED"){const{clientName:d,commandName:f}=o;if(d==="S3Client"&&f==="GetObjectCommand"&&I7(u).every(h=>{const b=PM(h),g=l.headers[b];return!g||p3e(g)}))return a;await m3e(l,{config:e,responseAlgorithms:u,logger:o.logger})}return a},y3e=(e,t)=>({applyToStack:r=>{r.add(u3e(e,t),c3e),r.addRelativeTo(f3e(e,t),d3e),r.addRelativeTo(b3e(e,t),g3e)}}),v3e=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:r,requestStreamBufferSize:o}=e;return Object.assign(e,{requestChecksumCalculation:Rs(t??AHe),responseChecksumValidation:Rs(r??DHe),requestStreamBufferSize:Number(o??0)})};function x3e(e){return e}const S3e=e=>t=>async r=>{if(!Br.isInstance(r.request))return t(r);const{request:o}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]=o.hostname+(o.port?":"+o.port:"");else if(!o.headers.host){let s=o.hostname;o.port!=null&&(s+=`:${o.port}`),o.headers.host=s}return t(r)},C3e={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},k7=e=>({applyToStack:t=>{t.add(S3e(e),C3e)}}),w3e=()=>(e,t)=>async r=>{try{const o=await e(r),{clientName:i,commandName:s,logger:a,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=l,d=c??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=o.output;return a?.info?.({clientName:i,commandName:s,input:d(r.input),output:f(h),metadata:p}),o}catch(o){const{clientName:i,commandName:s,logger:a,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:c}=l,u=c??t.inputFilterSensitiveLog;throw a?.error?.({clientName:i,commandName:s,input:u(r.input),error:o,metadata:o.$metadata}),o}},T3e={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},R7=e=>({applyToStack:t=>{t.add(w3e(),T3e)}}),O3e={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},P3e=()=>e=>async t=>e(t),M7=e=>({applyToStack:t=>{t.add(P3e(),O3e)}}),E3e="content-length",I3e="x-amz-decoded-content-length";function k3e(){return(e,t)=>async r=>{const{request:o}=r;if(Br.isInstance(o)&&!(E3e in o.headers)&&!(I3e in o.headers)){const i="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof t?.logger?.warn=="function"&&!(t.logger instanceof kC)?t.logger.warn(i):console.warn(i)}return e({...r})}}const R3e={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},M3e=e=>({applyToStack:t=>{t.add(k3e(),R3e)}}),A3e=e=>(t,r)=>async o=>{const i=await e.region(),s=e.region;let a=()=>{};r.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:async()=>r.__s3RegionRedirect}),a=()=>Object.defineProperty(e,"region",{writable:!0,value:s}));try{const l=await t(o);if(r.__s3RegionRedirect){a();const c=await e.region();if(i!==c)throw new Error("Region was not restored following S3 region redirect.")}return l}catch(l){throw a(),l}},D3e={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function _3e(e){return(t,r)=>async o=>{try{return await t(o)}catch(i){if(e.followRegionRedirects){const s=i?.$metadata?.httpStatusCode,a=r.commandName==="HeadBucketCommand",l=i?.$response?.headers?.["x-amz-bucket-region"];if(l&&(s===301||s===400&&(i?.name==="IllegalLocationConstraintException"||a))){try{const c=l;r.logger?.debug(`Redirecting from ${await e.region()} to ${c}`),r.__s3RegionRedirect=c}catch(c){throw new Error("Region redirect failed: "+c)}return t(o)}}throw i}}}const N3e={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},F3e=e=>({applyToStack:t=>{t.add(_3e(e),N3e),t.addRelativeTo(A3e(e),D3e)}});class kM{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){const r=this.data[t];if(r)return r}set(t,r){return this.data[t]=r,r}delete(t){delete this.data[t]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+kM.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const r in this.data){const o=this.data[r];if(!o.isRefreshing){const i=await o.identity;i.expiration&&i.expiration.getTime()<t&&delete this.data[r]}}}}class XO{_identity;isRefreshing;accessed;constructor(t,r=!1,o=Date.now()){this._identity=t,this.isRefreshing=r,this.accessed=o}get identity(){return this.accessed=Date.now(),this._identity}}class RM{createSessionFn;cache;static REFRESH_WINDOW_MS=6e4;constructor(t,r=new kM){this.createSessionFn=t,this.cache=r}async getS3ExpressIdentity(t,r){const o=r.Bucket,{cache:i}=this,s=i.get(o);return s?s.identity.then(a=>(a.expiration?.getTime()??0)<Date.now()?i.set(o,new XO(this.getIdentity(o))).identity:((a.expiration?.getTime()??0)<Date.now()+RM.REFRESH_WINDOW_MS&&!s.isRefreshing&&(s.isRefreshing=!0,this.getIdentity(o).then(u=>{i.set(o,new XO(Promise.resolve(u)))})),a)):i.set(o,new XO(this.getIdentity(o))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(i=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
464
- `+i)});const r=await this.createSessionFn(t);if(!r.Credentials?.AccessKeyId||!r.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:r.Credentials.AccessKeyId,secretAccessKey:r.Credentials.SecretAccessKey,sessionToken:r.Credentials.SessionToken,expiration:r.Credentials.Expiration?new Date(r.Credentials.Expiration):void 0}}}const L3e="Directory",$3e="S3Express",j3e="sigv4-s3express",nE="X-Amz-S3session-Token",rE=nE.toLowerCase();class B3e extends UP{async signWithCredentials(t,r,o){const i=rH(r);t.headers[rE]=r.sessionToken;const s=this;return oH(s,i),s.signRequest(t,o??{})}async presignWithCredentials(t,r,o){const i=rH(r);return delete t.headers[rE],t.headers[nE]=r.sessionToken,t.query=t.query??{},t.query[nE]=r.sessionToken,oH(this,i),this.presign(t,o)}}function rH(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function oH(e,t){const r=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),o=e.credentialProvider,i=()=>(clearTimeout(r),e.credentialProvider=o,Promise.resolve(t));e.credentialProvider=i}const V3e=e=>(t,r)=>async o=>{if(r.endpointV2){const i=r.endpointV2,s=i.properties?.authSchemes?.[0]?.name===j3e;if((i.properties?.backend===$3e||i.properties?.bucketType===L3e)&&(Gr(r,"S3_EXPRESS_BUCKET","J"),r.isS3ExpressBucket=!0),s){const l=o.input.Bucket;if(l){const c=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:l});r.s3ExpressIdentity=c,Br.isInstance(o.request)&&c.sessionToken&&(o.request.headers[rE]=c.sessionToken)}}}return t(o)},H3e={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},z3e=e=>({applyToStack:t=>{t.add(V3e(e),H3e)}}),q3e=async(e,t,r,o)=>{const i=await o.signWithCredentials(r,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},U3e=e=>t=>{throw t},G3e=(e,t)=>{},W3e=e=>(t,r)=>async o=>{if(!Br.isInstance(o.request))return t(o);const s=gl(r).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:l,signer:c}=s;let u;r.s3ExpressIdentity?u=await q3e(r.s3ExpressIdentity,a,o.request,await e.signer()):u=await c.sign(o.request,l,a);const d=await t({...o,request:u}).catch((c.errorHandler||U3e)(a));return(c.successHandler||G3e)(d.response,a),d},K3e=e=>({applyToStack:t=>{t.addRelativeTo(W3e(e),zW)}}),Y3e=(e,{session:t})=>{const[r,o]=t,{forcePathStyle:i,useAccelerateEndpoint:s,disableMultiregionAccessPoints:a,followRegionRedirects:l,s3ExpressIdentityProvider:c,bucketEndpoint:u,expectContinueHeader:d}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:s??!1,disableMultiregionAccessPoints:a??!1,followRegionRedirects:l??!1,s3ExpressIdentityProvider:c??new RM(async f=>r().send(new o({Bucket:f}))),bucketEndpoint:u??!1,expectContinueHeader:d??2097152})},Z3e={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},X3e=3e3,Q3e=e=>(t,r)=>async o=>{const i=await t(o),{response:s}=i;if(!wu.isInstance(s))return i;const{statusCode:a,body:l}=s;if(a<200||a>=300||!(typeof l?.stream=="function"||typeof l?.pipe=="function"||typeof l?.tee=="function"))return i;let u=l,d=l;l&&typeof l=="object"&&!(l instanceof Uint8Array)&&([u,d]=await cze(l)),s.body=d;const f=await J3e(u,{streamCollector:async h=>nze(h,X3e)});typeof u?.destroy=="function"&&u.destroy();const p=e.utf8Encoder(f.subarray(f.length-16));if(f.length===0&&Z3e[r.commandName]){const h=new Error("S3 aborted request");throw h.name="InternalError",h}return p&&p.endsWith("</Error>")&&(s.statusCode=400),i},J3e=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),e5e={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},A7=e=>({applyToStack:t=>{t.addRelativeTo(Q3e(e),e5e)}}),t5e=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function n5e(e){return(t,r)=>async o=>{if(e.bucketEndpoint){const i=r.endpointV2;if(i){const s=o.input.Bucket;if(typeof s=="string")try{const a=new URL(s);r.endpointV2={...i,url:a}}catch(a){const l=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${s} could not be parsed as URL.`;throw r.logger?.constructor?.name==="NoOpLogger"?console.warn(l):r.logger?.warn?.(l),a}}}return t(o)}}const r5e={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function o5e({bucketEndpoint:e}){return t=>async r=>{const{input:{Bucket:o}}=r;if(!e&&typeof o=="string"&&!t5e(o)&&o.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${o}'`);throw i.name="InvalidBucketName",i}return t({...r})}}const i5e={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},s5e=e=>({applyToStack:t=>{t.add(o5e(e),i5e),t.addRelativeTo(n5e(e),r5e)}}),a5e=void 0;function l5e(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function D7(e){const t=hf(e.userAgentAppId??a5e),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const o=await t();if(!l5e(o)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof o!="string"?i?.warn("userAgentAppId must be a string or undefined."):o.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return o}})}class _7{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const o=this.hash(t);if(o===!1)return r();if(!this.data.has(o)){if(this.data.size>this.capacity+10){const i=this.data.keys();let s=0;for(;;){const{value:a,done:l}=i.next();if(this.data.delete(a),l||++s>10)break}}this.data.set(o,r())}return this.data.get(o)}size(){return this.data.size}hash(t){let r="";const{parameters:o}=this;if(o.length===0)return!1;for(const i of o){const s=String(t[i]??"");if(s.includes("|;"))return!1;r+=s+"|;"}return r}}const c5e=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}$"),MM=e=>c5e.test(e)||e.startsWith("[")&&e.endsWith("]"),u5e=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),pg=(e,t=!1)=>{if(!t)return u5e.test(e);const r=e.split(".");for(const o of r)if(!pg(o))return!1;return!0},fm={},pm="endpoints";function sc(e){return typeof e!="object"||e==null?e:"ref"in e?`$${sc(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(sc).join(", ")})`:JSON.stringify(e,null,2)}class Xi extends Error{constructor(t){super(t),this.name="EndpointError"}}const d5e=(e,t)=>e===t,f5e=e=>{const t=e.split("."),r=[];for(const o of t){const i=o.indexOf("[");if(i!==-1){if(o.indexOf("]")!==o.length-1)throw new Xi(`Path: '${e}' does not end with ']'`);const s=o.slice(i+1,-1);if(Number.isNaN(parseInt(s)))throw new Xi(`Invalid array index: '${s}' in path: '${e}'`);i!==0&&r.push(o.slice(0,i)),r.push(s)}else r.push(o)}return r},N7=(e,t)=>f5e(t).reduce((r,o)=>{if(typeof r!="object")throw new Xi(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(o)]:r[o]},e),p5e=e=>e!=null,h5e=e=>!e,QO={[cm.HTTP]:80,[cm.HTTPS]:443},m5e=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:p,port:h,protocol:b="",path:g="",query:y={}}=e,v=new URL(`${b}//${p}${h?`:${h}`:""}${g}`);return v.search=Object.entries(y).map(([C,O])=>`${C}=${O}`).join("&"),v}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:o,hostname:i,pathname:s,protocol:a,search:l}=t;if(l)return null;const c=a.slice(0,-1);if(!Object.values(cm).includes(c))return null;const u=MM(i),d=r.includes(`${o}:${QO[c]}`)||typeof e=="string"&&e.includes(`${o}:${QO[c]}`),f=`${o}${d?`:${QO[c]}`:""}`;return{scheme:c,authority:f,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},g5e=(e,t)=>e===t,b5e=(e,t,r,o)=>t>=r||e.length<r?null:o?e.substring(e.length-r,e.length-t):e.substring(t,r),y5e=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),v5e={booleanEquals:d5e,getAttr:N7,isSet:p5e,isValidHostLabel:pg,not:h5e,parseURL:m5e,stringEquals:g5e,substring:b5e,uriEncode:y5e},F7=(e,t)=>{const r=[],o={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const s=e.indexOf("{",i);if(s===-1){r.push(e.slice(i));break}r.push(e.slice(i,s));const a=e.indexOf("}",s);if(a===-1){r.push(e.slice(s));break}e[s+1]==="{"&&e[a+1]==="}"&&(r.push(e.slice(s+1,a)),i=a+2);const l=e.substring(s+1,a);if(l.includes("#")){const[c,u]=l.split("#");r.push(N7(o[c],u))}else r.push(o[l]);i=a+1}return r.join("")},x5e=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],MC=(e,t,r)=>{if(typeof e=="string")return F7(e,r);if(e.fn)return $7.callFunction(e,r);if(e.ref)return x5e(e,r);throw new Xi(`'${t}': ${String(e)} is not a string, function or reference.`)},L7=({fn:e,argv:t},r)=>{const o=t.map(s=>["boolean","number"].includes(typeof s)?s:$7.evaluateExpression(s,"arg",r)),i=e.split(".");return i[0]in fm&&i[1]!=null?fm[i[0]][i[1]](...o):v5e[e](...o)},$7={evaluateExpression:MC,callFunction:L7},S5e=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new Xi(`'${e}' is already defined in Reference Record.`);const o=L7(t,r);return r.logger?.debug?.(`${pm} evaluateCondition: ${sc(t)} = ${sc(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}},AM=(e=[],t)=>{const r={};for(const o of e){const{result:i,toAssign:s}=S5e(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!i)return{result:i};s&&(r[s.name]=s.value,t.logger?.debug?.(`${pm} assign: ${s.name} := ${sc(s.value)}`))}return{result:!0,referenceRecord:r}},C5e=(e,t)=>Object.entries(e).reduce((r,[o,i])=>({...r,[o]:i.map(s=>{const a=MC(s,"Header value entry",t);if(typeof a!="string")throw new Xi(`Header '${o}' value '${a}' is not a string`);return a})}),{}),j7=(e,t)=>Object.entries(e).reduce((r,[o,i])=>({...r,[o]:V7.getEndpointProperty(i,t)}),{}),B7=(e,t)=>{if(Array.isArray(e))return e.map(r=>B7(r,t));switch(typeof e){case"string":return F7(e,t);case"object":if(e===null)throw new Xi(`Unexpected endpoint property: ${e}`);return V7.getEndpointProperties(e,t);case"boolean":return e;default:throw new Xi(`Unexpected endpoint property type: ${typeof e}`)}},V7={getEndpointProperty:B7,getEndpointProperties:j7},w5e=(e,t)=>{const r=MC(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new Xi(`Endpoint URL must be a string, got ${typeof r}`)},T5e=(e,t)=>{const{conditions:r,endpoint:o}=e,{result:i,referenceRecord:s}=AM(r,t);if(!i)return;const a={...t,referenceRecord:{...t.referenceRecord,...s}},{url:l,properties:c,headers:u}=o;return t.logger?.debug?.(`${pm} Resolving endpoint from template: ${sc(o)}`),{...u!=null&&{headers:C5e(u,a)},...c!=null&&{properties:j7(c,a)},url:w5e(l,a)}},O5e=(e,t)=>{const{conditions:r,error:o}=e,{result:i,referenceRecord:s}=AM(r,t);if(i)throw new Xi(MC(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},H7=(e,t)=>{for(const r of e)if(r.type==="endpoint"){const o=T5e(r,t);if(o)return o}else if(r.type==="error")O5e(r,t);else if(r.type==="tree"){const o=z7.evaluateTreeRule(r,t);if(o)return o}else throw new Xi(`Unknown endpoint rule: ${r}`);throw new Xi("Rules evaluation failed")},P5e=(e,t)=>{const{conditions:r,rules:o}=e,{result:i,referenceRecord:s}=AM(r,t);if(i)return z7.evaluateRules(o,{...t,referenceRecord:{...t.referenceRecord,...s}})},z7={evaluateRules:H7,evaluateTreeRule:P5e},q7=(e,t)=>{const{endpointParams:r,logger:o}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${pm} Initial EndpointParams: ${sc(r)}`);const a=Object.entries(i).filter(([,u])=>u.default!=null).map(([u,d])=>[u,d.default]);if(a.length>0)for(const[u,d]of a)r[u]=r[u]??d;const l=Object.entries(i).filter(([,u])=>u.required).map(([u])=>u);for(const u of l)if(r[u]==null)throw new Xi(`Missing required parameter: '${u}'`);const c=H7(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${pm} Resolved endpoint: ${sc(c)}`),c},U7=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!U7(r))return!1;return!0}return!(!pg(e)||e.length<3||e.length>63||e!==e.toLowerCase()||MM(e))},iH=":",E5e="/",I5e=e=>{const t=e.split(iH);if(t.length<6)return null;const[r,o,i,s,a,...l]=t;if(r!=="arn"||o===""||i===""||l.join(iH)==="")return null;const c=l.map(u=>u.split(E5e)).flat();return{partition:o,service:i,region:s,accountId:a,resourceId:c}},k5e=[{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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],R5e={partitions:k5e};let M5e=R5e;const A5e=e=>{const{partitions:t}=M5e;for(const o of t){const{regions:i,outputs:s}=o;for(const[a,l]of Object.entries(i))if(a===e)return{...s,...l}}for(const o of t){const{regionRegex:i,outputs:s}=o;if(new RegExp(i).test(e))return{...s}}const r=t.find(o=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},G7={isVirtualHostableS3Bucket:U7,parseArn:I5e,partition:A5e};fm.aws=G7;function D5e(e){const t={};if(e=e.replace(/^\?/,""),e)for(const r of e.split("&")){let[o,i=null]=r.split("=");o=decodeURIComponent(o),i&&(i=decodeURIComponent(i)),o in t?Array.isArray(t[o])?t[o].push(i):t[o]=[t[o],i]:t[o]=i}return t}const hm=e=>{if(typeof e=="string")return hm(new URL(e));const{hostname:t,pathname:r,port:o,protocol:i,search:s}=e;let a;return s&&(a=D5e(s)),{hostname:t,port:o?parseInt(o):void 0,protocol:i,path:r,query:a}},_5e=/\d{12}\.ddb/;async function N5e(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Gr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const s=await t.retryStrategy();typeof s.acquireInitialRetryToken=="function"?s.constructor?.name?.includes("Adaptive")?Gr(e,"RETRY_MODE_ADAPTIVE","F"):Gr(e,"RETRY_MODE_STANDARD","E"):Gr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const s=e.endpointV2;switch(String(s?.url?.hostname).match(_5e)&&Gr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":Gr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Gr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Gr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const s=i;s.accountId&&Gr(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,l]of Object.entries(s.$source??{}))Gr(e,a,l)}}const sH="user-agent",JO="x-amz-user-agent",aH=" ",e1="/",F5e=/[^!$%&'*+\-.^_`|~\w]/g,L5e=/[^!$%&'*+\-.^_`|~\w#]/g,lH="-",$5e=1024;function j5e(e){let t="";for(const r in e){const o=e[r];if(t.length+o.length+1<=$5e){t.length?t+=","+o:t+=o;continue}break}return t}const B5e=e=>(t,r)=>async o=>{const{request:i}=o;if(!Br.isInstance(i))return t(o);const{headers:s}=i,a=r?.userAgent?.map(Ev)||[],l=(await e.defaultUserAgentProvider()).map(Ev);await N5e(r,e,o);const c=r;l.push(`m/${j5e(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Ev)||[],d=await e.userAgentAppId();d&&l.push(Ev(["app",`${d}`]));const f=[].concat([...l,...a,...u]).join(aH),p=[...l.filter(h=>h.startsWith("aws-sdk-")),...u].join(aH);return e.runtime!=="browser"?(p&&(s[JO]=s[JO]?`${s[sH]} ${p}`:p),s[sH]=f):s[JO]=f,t({...o,request:i})},Ev=e=>{const t=e[0].split(e1).map(a=>a.replace(F5e,lH)).join(e1),r=e[1]?.replace(L5e,lH),o=t.indexOf(e1),i=t.substring(0,o);let s=t.substring(o+1);return i==="api"&&(s=s.toLowerCase()),[i,s,r].filter(a=>a&&a.length>0).reduce((a,l,c)=>{switch(c){case 0:return l;case 1:return`${a}/${l}`;default:return`${a}#${l}`}},"")},V5e={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},W7=e=>({applyToStack:t=>{t.add(B5e(e),V5e)}}),K7=!1,Y7=!1,cH=new Set,H5e=(e,t=pg)=>{if(!cH.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else cH.add(e)},Z7=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),z5e=e=>Z7(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,X7=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const o=typeof t=="function"?await t():t,i=z5e(o);return H5e(i),i},useFipsEndpoint:async()=>{const o=typeof t=="string"?t:await t();return Z7(o)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},q5e=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),uH="content-length";function U5e(e){return t=>async r=>{const o=r.request;if(Br.isInstance(o)){const{body:i,headers:s}=o;if(i&&Object.keys(s).map(a=>a.toLowerCase()).indexOf(uH)===-1)try{const a=e(i);o.headers={...o.headers,[uH]:String(a)}}catch{}}return t({...r,request:o})}}const G5e={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Q7=e=>({applyToStack:t=>{t.add(U5e(e.bodyLengthChecker),G5e)}}),W5e=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Q5e(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!X5e(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},K5e=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Y5e=/(\d+\.){3}\d+/,Z5e=/\.\./,X5e=e=>K5e.test(e)&&!Y5e.test(e)&&!Z5e.test(e),Q5e=e=>{const[t,r,o,,,i]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,a=!!(s&&r&&o&&i);if(s&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},J5e=(e,t,r,o=!1)=>{const i=async()=>{let s;return o?s=r.clientContextParams?.[e]??r[e]??r[t]:s=r[e]??r[t],typeof s=="function"?s():s};return e==="credentialScope"||t==="CredentialScope"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.credentialScope??s?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.accountId??s?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const s=await i();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:a,hostname:l,port:c,path:u}=s;return`${a}//${l}${c?":"+c:""}${u}`}}return s}:i},J7=async e=>{},eK=e=>typeof e=="object"?"url"in e?hm(e.url):e:hm(e),e4e=async(e,t,r,o)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await J7(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(eK(a)),r.isCustomEndpoint=!0)}const i=await tK(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(i,o)},tK=async(e,t,r)=>{const o={},i=t?.getEndpointParameterInstructions?.()||{};for(const[s,a]of Object.entries(i))switch(a.type){case"staticContextParams":o[s]=a.value;break;case"contextParams":o[s]=e[a.name];break;case"clientContextParams":case"builtInParams":o[s]=await J5e(a.name,s,r,a.type!=="builtInParams")();break;case"operationContextParams":o[s]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(o,r),String(r.serviceId).toLowerCase()==="s3"&&await W5e(o),o},t4e=({config:e,instructions:t})=>(r,o)=>async i=>{e.isCustomEndpoint&&eqe(o,"ENDPOINT_OVERRIDE","N");const s=await e4e(i.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;const a=o.authSchemes?.[0];if(a){o.signing_region=a.signingRegion,o.signing_service=a.signingName;const c=gl(o)?.selectedHttpAuthScheme?.httpAuthOption;c&&(c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},n4e={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:VHe.name},DM=(e,t)=>({applyToStack:r=>{r.addRelativeTo(t4e({config:e,instructions:t}),n4e)}}),nK=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:i}=e,s=r!=null?async()=>eK(await Rs(r)()):void 0,l=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:Rs(o??!1),useFipsEndpoint:Rs(i??!1)});let c;return l.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=J7(e.serviceId)),c),l};var Vf;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Vf||(Vf={}));const mm=3,rK=Vf.STANDARD,r4e=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],o4e=["TimeoutError","RequestTimeout","RequestTimeoutException"],i4e=[500,502,503,504],s4e=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],a4e=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],l4e=e=>e?.$retryable!==void 0,c4e=e=>e.$metadata?.clockSkewCorrected,u4e=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},oK=e=>e.$metadata?.httpStatusCode===429||r4e.includes(e.name)||e.$retryable?.throttling==!0,_M=(e,t=0)=>l4e(e)||c4e(e)||o4e.includes(e.name)||s4e.includes(e?.code||"")||a4e.includes(e?.code||"")||i4e.includes(e.$metadata?.httpStatusCode||0)||u4e(e)||e.cause!==void 0&&t<=10&&_M(e.cause,t+1),d4e=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!_M(e)}return!1};class NM{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,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(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const r=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(o=>NM.setTimeoutFn(o,r))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const r=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=t}updateClientSendingRate(t){let r;if(this.updateMeasuredRate(),oK(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const o=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(o*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}}const oE=100,iK=20*1e3,f4e=500,dH=500,p4e=5,h4e=10,m4e=1,g4e="amz-sdk-invocation-id",b4e="amz-sdk-request",y4e=()=>{let e=oE;return{computeNextBackoffDelay:o=>Math.floor(Math.min(iK,Math.random()*2**o*e)),setDelayBase:o=>{e=o}}},fH=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(iK,e),getRetryCost:()=>r});class sK{maxAttempts;mode=Vf.STANDARD;capacity=dH;retryBackoffStrategy=y4e();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return fH({retryDelay:oE,retryCount:0})}async refreshRetryTokenForRetry(t,r){const o=await this.getMaxAttempts();if(this.shouldRetry(t,r,o)){const i=r.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?f4e:oE);const s=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),a=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,s):s,l=this.getCapacityCost(i);return this.capacity-=l,fH({retryDelay:a,retryCount:t.getRetryCount()+1,retryCost:l})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(dH,this.capacity+(t.getRetryCost()??m4e))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${mm}`),mm}}shouldRetry(t,r,o){return t.getRetryCount()+1<o&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t==="TRANSIENT"?h4e:p4e}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class v4e{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=Vf.ADAPTIVE;constructor(t,r){this.maxAttemptsProvider=t;const{rateLimiter:o}=r??{};this.rateLimiter=o??new NM,this.standardRetryStrategy=new sK(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const x4e=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),aK=e=>{const{retryStrategy:t,retryMode:r,maxAttempts:o}=e,i=Rs(o??mm);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Rs(r)()===Vf.ADAPTIVE?new v4e(i):new sK(i))})},S4e=e=>e?.body instanceof ReadableStream,C4e=e=>(t,r)=>async o=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(w4e(i)){i=i;let a=await i.acquireInitialRetryToken(r.partition_id),l=new Error,c=0,u=0;const{request:d}=o,f=Br.isInstance(d);for(f&&(d.headers[g4e]=OC());;)try{f&&(d.headers[b4e]=`attempt=${c+1}; max=${s}`);const{response:p,output:h}=await t(o);return i.recordSuccess(a),h.$metadata.attempts=c+1,h.$metadata.totalRetryDelay=u,{response:p,output:h}}catch(p){const h=T4e(p);if(l=x4e(p),f&&S4e(d))throw(r.logger instanceof kC?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),l;try{a=await i.refreshRetryTokenForRetry(a,h)}catch{throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=c+1,l.$metadata.totalRetryDelay=u,l}c=a.getRetryCount();const b=a.getRetryDelay();u+=b,await new Promise(g=>setTimeout(g,b))}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,o)},w4e=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",T4e=e=>{const t={error:e,errorType:O4e(e)},r=E4e(e.$response);return r&&(t.retryAfterHint=r),t},O4e=e=>oK(e)?"THROTTLING":_M(e)?"TRANSIENT":d4e(e)?"SERVER_ERROR":"CLIENT_ERROR",P4e={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},lK=e=>({applyToStack:t=>{t.add(C4e(e),P4e)}}),E4e=e=>{if(!wu.isInstance(e))return;const t=Object.keys(e.headers).find(s=>s.toLowerCase()==="retry-after");if(!t)return;const r=e.headers[t],o=Number(r);return Number.isNaN(o)?new Date(r):new Date(o*1e3)};class cK{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new B3e(t),this.signerOptions=t}async sign(t,r={}){return r.signingRegion==="*"?this.getSigv4aSigner().sign(t,r):this.sigv4Signer.sign(t,r)}async signWithCredentials(t,r,o={}){if(o.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,r,o)}async presign(t,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,r)}async presignWithCredentials(t,r,o={}){if(o.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,r,o)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const FM="required",ue="type",Be="rules",be="conditions",ke="fn",Re="argv",Et="ref",tn="assign",dt="url",ft="properties",Ja="backend",go="authSchemes",Wr="disableDoubleEncoding",Kr="signingName",Eo="signingRegion",pt="headers",LM="signingRegionSet",I4e=6,k4e=!1,ua=!0,qi="isSet",jr="booleanEquals",xt="error",l0="aws.partition",wn="stringEquals",wr="getAttr",Or="name",Qn="substring",pH="bucketSuffix",$M="parseURL",Ye="endpoint",Ve="tree",c0="aws.isVirtualHostableS3Bucket",u0="{url#scheme}://{Bucket}.{url#authority}{url#path}",Ca="not",hH="accessPointSuffix",Jv="{url#scheme}://{url#authority}{url#path}",uK="hardwareType",dK="regionPrefix",mH="bucketAliasSuffix",iE="outpostId",qu="isValidHostLabel",jM="sigv4a",gm="s3-outposts",Hf="s3",fK="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",pK="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",gH="https://{Bucket}.s3.{partitionResult#dnsSuffix}",hK="aws.parseArn",mK="bucketArn",gK="arnType",d0="",BM="s3-object-lambda",bK="accesspoint",VM="accessPointName",bH="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",yH="mrapPartition",vH="outpostType",xH="arnPrefix",yK="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",SH="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",CH="https://s3.{partitionResult#dnsSuffix}",Fd={[FM]:!1,[ue]:"string"},Ld={[FM]:!0,default:!1,[ue]:"boolean"},Xp={[FM]:!1,[ue]:"boolean"},gs={[ke]:jr,[Re]:[{[Et]:"Accelerate"},!0]},rr={[ke]:jr,[Re]:[{[Et]:"UseFIPS"},!0]},Yn={[ke]:jr,[Re]:[{[Et]:"UseDualStack"},!0]},Lr={[ke]:qi,[Re]:[{[Et]:"Endpoint"}]},vK={[ke]:l0,[Re]:[{[Et]:"Region"}],[tn]:"partitionResult"},wH={[ke]:wn,[Re]:[{[ke]:wr,[Re]:[{[Et]:"partitionResult"},Or]},"aws-cn"]},Mh={[ke]:qi,[Re]:[{[Et]:"Bucket"}]},xn={[Et]:"Bucket"},TH={[be]:[gs],[xt]:"S3Express does not support S3 Accelerate.",[ue]:xt},OH={[be]:[Lr,{[ke]:$M,[Re]:[{[Et]:"Endpoint"}],[tn]:"url"}],[Be]:[{[be]:[{[ke]:qi,[Re]:[{[Et]:"DisableS3ExpressSessionAuth"}]},{[ke]:jr,[Re]:[{[Et]:"DisableS3ExpressSessionAuth"},!0]}],[Be]:[{[be]:[{[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Et]:"url"},"isIp"]},!0]}],[Be]:[{[be]:[{[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"}],[Be]:[{[Ye]:{[dt]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:c0,[Re]:[xn,!1]}],[Be]:[{[Ye]:{[dt]:u0,[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],[ue]:Ve},{[xt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:xt}],[ue]:Ve},{[be]:[{[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Et]:"url"},"isIp"]},!0]}],[Be]:[{[be]:[{[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"}],[Be]:[{[Ye]:{[dt]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:c0,[Re]:[xn,!1]}],[Be]:[{[Ye]:{[dt]:u0,[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],[ue]:Ve},{[xt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:xt}],[ue]:Ve},Xo={[ke]:$M,[Re]:[{[Et]:"Endpoint"}],[tn]:"url"},t1={[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Et]:"url"},"isIp"]},!0]},xK={[Et]:"url"},SK={[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"},ji={[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},qt={},CK={[ke]:c0,[Re]:[xn,!1]},PH={[xt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:xt},EH={[ke]:qi,[Re]:[{[Et]:"UseS3ExpressControlEndpoint"}]},IH={[ke]:jr,[Re]:[{[Et]:"UseS3ExpressControlEndpoint"},!0]},Qt={[ke]:Ca,[Re]:[Lr]},hn={[ke]:jr,[Re]:[{[Et]:"UseDualStack"},!1]},an={[ke]:jr,[Re]:[{[Et]:"UseFIPS"},!1]},Iv={[xt]:"Unrecognized S3Express bucket name format.",[ue]:xt},kH={[ke]:Ca,[Re]:[Mh]},RH={[Et]:uK},MH={[be]:[Qt],[xt]:"Expected a endpoint to be specified but no endpoint was found",[ue]:xt},kv={[go]:[{[Wr]:!0,[Or]:jM,[Kr]:gm,[LM]:["*"]},{[Wr]:!0,[Or]:"sigv4",[Kr]:gm,[Eo]:"{Region}"}]},n1={[ke]:jr,[Re]:[{[Et]:"ForcePathStyle"},!1]},R4e={[Et]:"ForcePathStyle"},Ur={[ke]:jr,[Re]:[{[Et]:"Accelerate"},!1]},to={[ke]:wn,[Re]:[{[Et]:"Region"},"aws-global"]},fo={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Hf,[Eo]:"us-east-1"}]},bn={[ke]:Ca,[Re]:[to]},po={[ke]:jr,[Re]:[{[Et]:"UseGlobalEndpoint"},!0]},AH={[dt]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Hf,[Eo]:"{Region}"}]},[pt]:{}},Yr={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Hf,[Eo]:"{Region}"}]},ho={[ke]:jr,[Re]:[{[Et]:"UseGlobalEndpoint"},!1]},DH={[dt]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},_H={[dt]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},NH={[dt]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},r1={[ke]:jr,[Re]:[{[ke]:wr,[Re]:[xK,"isIp"]},!1]},o1={[dt]:fK,[ft]:Yr,[pt]:{}},sE={[dt]:u0,[ft]:Yr,[pt]:{}},FH={[Ye]:sE,[ue]:Ye},i1={[dt]:pK,[ft]:Yr,[pt]:{}},LH={[dt]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},Rv={[xt]:"Invalid region: region was not a valid DNS name.",[ue]:xt},Ti={[Et]:mK},wK={[Et]:gK},s1={[ke]:wr,[Re]:[Ti,"service"]},HM={[Et]:VM},$H={[be]:[Yn],[xt]:"S3 Object Lambda does not support Dual-stack",[ue]:xt},jH={[be]:[gs],[xt]:"S3 Object Lambda does not support S3 Accelerate",[ue]:xt},BH={[be]:[{[ke]:qi,[Re]:[{[Et]:"DisableAccessPoints"}]},{[ke]:jr,[Re]:[{[Et]:"DisableAccessPoints"},!0]}],[xt]:"Access points are not supported for this operation",[ue]:xt},a1={[be]:[{[ke]:qi,[Re]:[{[Et]:"UseArnRegion"}]},{[ke]:jr,[Re]:[{[Et]:"UseArnRegion"},!1]},{[ke]:Ca,[Re]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},"{Region}"]}]}],[xt]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[ue]:xt},TK={[ke]:wr,[Re]:[{[Et]:"bucketPartition"},Or]},OK={[ke]:wr,[Re]:[Ti,"accountId"]},l1={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:BM,[Eo]:"{bucketArn#region}"}]},VH={[xt]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[ue]:xt},c1={[xt]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[ue]:xt},u1={[xt]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[ue]:xt},d1={[xt]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[ue]:xt},HH={[xt]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[ue]:xt},zH={[xt]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[ue]:xt},Qp={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Hf,[Eo]:"{bucketArn#region}"}]},qH={[go]:[{[Wr]:!0,[Or]:jM,[Kr]:gm,[LM]:["*"]},{[Wr]:!0,[Or]:"sigv4",[Kr]:gm,[Eo]:"{bucketArn#region}"}]},UH={[ke]:hK,[Re]:[xn]},GH={[dt]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},WH={[dt]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},KH={[dt]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},f1={[dt]:yK,[ft]:Yr,[pt]:{}},YH={[dt]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},ZH={[Et]:"UseObjectLambdaEndpoint"},p1={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:BM,[Eo]:"{Region}"}]},XH={[dt]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},QH={[dt]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},JH={[dt]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},h1={[dt]:Jv,[ft]:Yr,[pt]:{}},ez={[dt]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},m1=[{[Et]:"Region"}],M4e=[{[Et]:"Endpoint"}],A4e=[xn],g1=[gs],$d=[Lr,Xo],tz=[{[ke]:qi,[Re]:[{[Et]:"DisableS3ExpressSessionAuth"}]},{[ke]:jr,[Re]:[{[Et]:"DisableS3ExpressSessionAuth"},!0]}],D4e=[SK],b1=[CK],hs=[vK],y1=[rr,Yn],Ah=[rr,hn],Dh=[an,Yn],_h=[an,hn],nz=[{[ke]:Qn,[Re]:[xn,6,14,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,14,16,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],da=[{[be]:[rr,Yn],[Ye]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ye},{[be]:Ah,[Ye]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ye},{[be]:Dh,[Ye]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ye},{[be]:_h,[Ye]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ye}],rz=[{[ke]:Qn,[Re]:[xn,6,15,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,15,17,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],oz=[{[ke]:Qn,[Re]:[xn,6,19,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,19,21,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],iz=[{[ke]:Qn,[Re]:[xn,6,20,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,20,22,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],sz=[{[ke]:Qn,[Re]:[xn,6,26,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,26,28,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],fa=[{[be]:[rr,Yn],[Ye]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye},{[be]:Ah,[Ye]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye},{[be]:Dh,[Ye]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye},{[be]:_h,[Ye]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],az=[xn,0,7,!0],lz=[{[ke]:Qn,[Re]:[xn,7,15,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,15,17,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],cz=[{[ke]:Qn,[Re]:[xn,7,16,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,16,18,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],uz=[{[ke]:Qn,[Re]:[xn,7,20,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,20,22,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],dz=[{[ke]:Qn,[Re]:[xn,7,21,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,21,23,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],fz=[{[ke]:Qn,[Re]:[xn,7,27,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,27,29,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],_4e=[Mh],pz=[{[ke]:qu,[Re]:[{[Et]:iE},!1]}],hz=[{[ke]:wn,[Re]:[{[Et]:dK},"beta"]}],N4e=["*"],mz=[{[ke]:qu,[Re]:[{[Et]:"Region"},!1]}],Dl=[{[ke]:wn,[Re]:[{[Et]:"Region"},"us-east-1"]}],v1=[{[ke]:wn,[Re]:[wK,bK]}],gz=[{[ke]:wr,[Re]:[Ti,"resourceId[1]"],[tn]:VM},{[ke]:Ca,[Re]:[{[ke]:wn,[Re]:[HM,d0]}]}],F4e=[Ti,"resourceId[1]"],bz=[Yn],x1=[{[ke]:Ca,[Re]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},d0]}]}],yz=[{[ke]:Ca,[Re]:[{[ke]:qi,[Re]:[{[ke]:wr,[Re]:[Ti,"resourceId[2]"]}]}]}],L4e=[Ti,"resourceId[2]"],S1=[{[ke]:l0,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]}],[tn]:"bucketPartition"}],vz=[{[ke]:wn,[Re]:[TK,{[ke]:wr,[Re]:[{[Et]:"partitionResult"},Or]}]}],C1=[{[ke]:qu,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},!0]}],w1=[{[ke]:qu,[Re]:[OK,!1]}],xz=[{[ke]:qu,[Re]:[HM,!1]}],Mv=[rr],Sz=[{[ke]:qu,[Re]:[{[Et]:"Region"},!0]}],$4e={parameters:{Bucket:Fd,Region:Fd,UseFIPS:Ld,UseDualStack:Ld,Endpoint:Fd,ForcePathStyle:Ld,Accelerate:Ld,UseGlobalEndpoint:Ld,UseObjectLambdaEndpoint:Xp,Key:Fd,Prefix:Fd,CopySource:Fd,DisableAccessPoints:Xp,DisableMultiRegionAccessPoints:Ld,UseArnRegion:Xp,UseS3ExpressControlEndpoint:Xp,DisableS3ExpressSessionAuth:Xp},[Be]:[{[be]:[{[ke]:qi,[Re]:m1}],[Be]:[{[be]:[gs,rr],error:"Accelerate cannot be used with FIPS",[ue]:xt},{[be]:[Yn,Lr],error:"Cannot set dual-stack in combination with a custom endpoint.",[ue]:xt},{[be]:[Lr,rr],error:"A custom endpoint cannot be combined with FIPS",[ue]:xt},{[be]:[Lr,gs],error:"A custom endpoint cannot be combined with S3 Accelerate",[ue]:xt},{[be]:[rr,vK,wH],error:"Partition does not support FIPS",[ue]:xt},{[be]:[Mh,{[ke]:Qn,[Re]:[xn,0,I4e,ua],[tn]:pH},{[ke]:wn,[Re]:[{[Et]:pH},"--x-s3"]}],[Be]:[TH,OH,{[be]:[EH,IH],[Be]:[{[be]:hs,[Be]:[{[be]:[SK,Qt],[Be]:[{[be]:y1,endpoint:{[dt]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:Ah,endpoint:{[dt]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:Dh,endpoint:{[dt]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:_h,endpoint:{[dt]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ye}],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:b1,[Be]:[{[be]:hs,[Be]:[{[be]:tz,[Be]:[{[be]:nz,[Be]:da,[ue]:Ve},{[be]:rz,[Be]:da,[ue]:Ve},{[be]:oz,[Be]:da,[ue]:Ve},{[be]:iz,[Be]:da,[ue]:Ve},{[be]:sz,[Be]:da,[ue]:Ve},Iv],[ue]:Ve},{[be]:nz,[Be]:fa,[ue]:Ve},{[be]:rz,[Be]:fa,[ue]:Ve},{[be]:oz,[Be]:fa,[ue]:Ve},{[be]:iz,[Be]:fa,[ue]:Ve},{[be]:sz,[Be]:fa,[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},PH],[ue]:Ve},{[be]:[Mh,{[ke]:Qn,[Re]:az,[tn]:hH},{[ke]:wn,[Re]:[{[Et]:hH},"--xa-s3"]}],[Be]:[TH,OH,{[be]:b1,[Be]:[{[be]:hs,[Be]:[{[be]:tz,[Be]:[{[be]:lz,[Be]:da,[ue]:Ve},{[be]:cz,[Be]:da,[ue]:Ve},{[be]:uz,[Be]:da,[ue]:Ve},{[be]:dz,[Be]:da,[ue]:Ve},{[be]:fz,[Be]:da,[ue]:Ve},Iv],[ue]:Ve},{[be]:lz,[Be]:fa,[ue]:Ve},{[be]:cz,[Be]:fa,[ue]:Ve},{[be]:uz,[Be]:fa,[ue]:Ve},{[be]:dz,[Be]:fa,[ue]:Ve},{[be]:fz,[Be]:fa,[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},PH],[ue]:Ve},{[be]:[kH,EH,IH],[Be]:[{[be]:hs,[Be]:[{[be]:$d,endpoint:{[dt]:Jv,[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:y1,endpoint:{[dt]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:Ah,endpoint:{[dt]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:Dh,endpoint:{[dt]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:_h,endpoint:{[dt]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ye}],[ue]:Ve}],[ue]:Ve},{[be]:[Mh,{[ke]:Qn,[Re]:[xn,49,50,ua],[tn]:uK},{[ke]:Qn,[Re]:[xn,8,12,ua],[tn]:dK},{[ke]:Qn,[Re]:az,[tn]:mH},{[ke]:Qn,[Re]:[xn,32,49,ua],[tn]:iE},{[ke]:l0,[Re]:m1,[tn]:"regionPartition"},{[ke]:wn,[Re]:[{[Et]:mH},"--op-s3"]}],[Be]:[{[be]:pz,[Be]:[{[be]:b1,[Be]:[{[be]:[{[ke]:wn,[Re]:[RH,"e"]}],[Be]:[{[be]:hz,[Be]:[MH,{[be]:$d,endpoint:{[dt]:"https://{Bucket}.ec2.{url#authority}",[ft]:kv,[pt]:qt},[ue]:Ye}],[ue]:Ve},{endpoint:{[dt]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[ft]:kv,[pt]:qt},[ue]:Ye}],[ue]:Ve},{[be]:[{[ke]:wn,[Re]:[RH,"o"]}],[Be]:[{[be]:hz,[Be]:[MH,{[be]:$d,endpoint:{[dt]:"https://{Bucket}.op-{outpostId}.{url#authority}",[ft]:kv,[pt]:qt},[ue]:Ye}],[ue]:Ve},{endpoint:{[dt]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[ft]:kv,[pt]:qt},[ue]:Ye}],[ue]:Ve},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[ue]:xt}],[ue]:Ve},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[ue]:xt}],[ue]:Ve},{[be]:_4e,[Be]:[{[be]:[Lr,{[ke]:Ca,[Re]:[{[ke]:qi,[Re]:[{[ke]:$M,[Re]:M4e}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[ue]:xt},{[be]:[n1,CK],[Be]:[{[be]:hs,[Be]:[{[be]:mz,[Be]:[{[be]:[gs,wH],error:"S3 Accelerate cannot be used in this region",[ue]:xt},{[be]:[Yn,rr,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,rr,Ur,Qt,bn,po],[Be]:[{endpoint:AH,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,rr,Ur,Qt,bn,ho],endpoint:AH,[ue]:Ye},{[be]:[hn,rr,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,rr,Ur,Qt,bn,po],[Be]:[{endpoint:DH,[ue]:Ye}],[ue]:Ve},{[be]:[hn,rr,Ur,Qt,bn,ho],endpoint:DH,[ue]:Ye},{[be]:[Yn,an,gs,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,an,gs,Qt,bn,po],[Be]:[{endpoint:_H,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,an,gs,Qt,bn,ho],endpoint:_H,[ue]:Ye},{[be]:[Yn,an,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,an,Ur,Qt,bn,po],[Be]:[{endpoint:NH,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,an,Ur,Qt,bn,ho],endpoint:NH,[ue]:Ye},{[be]:[hn,an,Ur,Lr,Xo,t1,to],endpoint:{[dt]:fK,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,an,Ur,Lr,Xo,r1,to],endpoint:{[dt]:u0,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,an,Ur,Lr,Xo,t1,bn,po],[Be]:[{[be]:Dl,endpoint:o1,[ue]:Ye},{endpoint:o1,[ue]:Ye}],[ue]:Ve},{[be]:[hn,an,Ur,Lr,Xo,r1,bn,po],[Be]:[{[be]:Dl,endpoint:sE,[ue]:Ye},FH],[ue]:Ve},{[be]:[hn,an,Ur,Lr,Xo,t1,bn,ho],endpoint:o1,[ue]:Ye},{[be]:[hn,an,Ur,Lr,Xo,r1,bn,ho],endpoint:sE,[ue]:Ye},{[be]:[hn,an,gs,Qt,to],endpoint:{[dt]:pK,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,an,gs,Qt,bn,po],[Be]:[{[be]:Dl,endpoint:i1,[ue]:Ye},{endpoint:i1,[ue]:Ye}],[ue]:Ve},{[be]:[hn,an,gs,Qt,bn,ho],endpoint:i1,[ue]:Ye},{[be]:[hn,an,Ur,Qt,to],endpoint:{[dt]:gH,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,an,Ur,Qt,bn,po],[Be]:[{[be]:Dl,endpoint:{[dt]:gH,[ft]:Yr,[pt]:qt},[ue]:Ye},{endpoint:LH,[ue]:Ye}],[ue]:Ve},{[be]:[hn,an,Ur,Qt,bn,ho],endpoint:LH,[ue]:Ye}],[ue]:Ve},Rv],[ue]:Ve}],[ue]:Ve},{[be]:[Lr,Xo,{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[xK,"scheme"]},"http"]},{[ke]:c0,[Re]:[xn,ua]},n1,an,hn,Ur],[Be]:[{[be]:hs,[Be]:[{[be]:mz,[Be]:[FH],[ue]:Ve},Rv],[ue]:Ve}],[ue]:Ve},{[be]:[n1,{[ke]:hK,[Re]:A4e,[tn]:mK}],[Be]:[{[be]:[{[ke]:wr,[Re]:[Ti,"resourceId[0]"],[tn]:gK},{[ke]:Ca,[Re]:[{[ke]:wn,[Re]:[wK,d0]}]}],[Be]:[{[be]:[{[ke]:wn,[Re]:[s1,BM]}],[Be]:[{[be]:v1,[Be]:[{[be]:gz,[Be]:[$H,jH,{[be]:x1,[Be]:[BH,{[be]:yz,[Be]:[a1,{[be]:S1,[Be]:[{[be]:hs,[Be]:[{[be]:vz,[Be]:[{[be]:C1,[Be]:[{[be]:[{[ke]:wn,[Re]:[OK,d0]}],error:"Invalid ARN: Missing account id",[ue]:xt},{[be]:w1,[Be]:[{[be]:xz,[Be]:[{[be]:$d,endpoint:{[dt]:bH,[ft]:l1,[pt]:qt},[ue]:Ye},{[be]:Mv,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:l1,[pt]:qt},[ue]:Ye},{endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:l1,[pt]:qt},[ue]:Ye}],[ue]:Ve},VH],[ue]:Ve},c1],[ue]:Ve},u1],[ue]:Ve},d1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},HH],[ue]:Ve},{error:"Invalid ARN: bucket ARN is missing a region",[ue]:xt}],[ue]:Ve},zH],[ue]:Ve},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[ue]:xt}],[ue]:Ve},{[be]:v1,[Be]:[{[be]:gz,[Be]:[{[be]:x1,[Be]:[{[be]:v1,[Be]:[{[be]:x1,[Be]:[BH,{[be]:yz,[Be]:[a1,{[be]:S1,[Be]:[{[be]:hs,[Be]:[{[be]:[{[ke]:wn,[Re]:[TK,"{partitionResult#name}"]}],[Be]:[{[be]:C1,[Be]:[{[be]:[{[ke]:wn,[Re]:[s1,Hf]}],[Be]:[{[be]:w1,[Be]:[{[be]:xz,[Be]:[{[be]:g1,error:"Access Points do not support S3 Accelerate",[ue]:xt},{[be]:y1,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Qp,[pt]:qt},[ue]:Ye},{[be]:Ah,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Qp,[pt]:qt},[ue]:Ye},{[be]:Dh,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Qp,[pt]:qt},[ue]:Ye},{[be]:[an,hn,Lr,Xo],endpoint:{[dt]:bH,[ft]:Qp,[pt]:qt},[ue]:Ye},{[be]:_h,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Qp,[pt]:qt},[ue]:Ye}],[ue]:Ve},VH],[ue]:Ve},c1],[ue]:Ve},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[ue]:xt}],[ue]:Ve},u1],[ue]:Ve},d1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},HH],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:qu,[Re]:[HM,ua]}],[Be]:[{[be]:bz,error:"S3 MRAP does not support dual-stack",[ue]:xt},{[be]:Mv,error:"S3 MRAP does not support FIPS",[ue]:xt},{[be]:g1,error:"S3 MRAP does not support S3 Accelerate",[ue]:xt},{[be]:[{[ke]:jr,[Re]:[{[Et]:"DisableMultiRegionAccessPoints"},ua]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[ue]:xt},{[be]:[{[ke]:l0,[Re]:m1,[tn]:yH}],[Be]:[{[be]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[{[Et]:yH},Or]},{[ke]:wr,[Re]:[Ti,"partition"]}]}],[Be]:[{endpoint:{[dt]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[ft]:{[go]:[{[Wr]:ua,name:jM,[Kr]:Hf,[LM]:N4e}]},[pt]:qt},[ue]:Ye}],[ue]:Ve},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[ue]:xt}],[ue]:Ve}],[ue]:Ve},{error:"Invalid Access Point Name",[ue]:xt}],[ue]:Ve},zH],[ue]:Ve},{[be]:[{[ke]:wn,[Re]:[s1,gm]}],[Be]:[{[be]:bz,error:"S3 Outposts does not support Dual-stack",[ue]:xt},{[be]:Mv,error:"S3 Outposts does not support FIPS",[ue]:xt},{[be]:g1,error:"S3 Outposts does not support S3 Accelerate",[ue]:xt},{[be]:[{[ke]:qi,[Re]:[{[ke]:wr,[Re]:[Ti,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[ue]:xt},{[be]:[{[ke]:wr,[Re]:F4e,[tn]:iE}],[Be]:[{[be]:pz,[Be]:[a1,{[be]:S1,[Be]:[{[be]:hs,[Be]:[{[be]:vz,[Be]:[{[be]:C1,[Be]:[{[be]:w1,[Be]:[{[be]:[{[ke]:wr,[Re]:L4e,[tn]:vH}],[Be]:[{[be]:[{[ke]:wr,[Re]:[Ti,"resourceId[3]"],[tn]:VM}],[Be]:[{[be]:[{[ke]:wn,[Re]:[{[Et]:vH},bK]}],[Be]:[{[be]:$d,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[ft]:qH,[pt]:qt},[ue]:Ye},{endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:qH,[pt]:qt},[ue]:Ye}],[ue]:Ve},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: expected an access point name",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: Expected a 4-component resource",[ue]:xt}],[ue]:Ve},c1],[ue]:Ve},u1],[ue]:Ve},d1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: The Outpost Id was not set",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: No ARN type specified",[ue]:xt}],[ue]:Ve},{[be]:[{[ke]:Qn,[Re]:[xn,0,4,k4e],[tn]:xH},{[ke]:wn,[Re]:[{[Et]:xH},"arn:"]},{[ke]:Ca,[Re]:[{[ke]:qi,[Re]:[UH]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[ue]:xt},{[be]:[{[ke]:jr,[Re]:[R4e,ua]},UH],error:"Path-style addressing cannot be used with ARN buckets",[ue]:xt},{[be]:D4e,[Be]:[{[be]:hs,[Be]:[{[be]:[Ur],[Be]:[{[be]:[Yn,Qt,rr,to],endpoint:{[dt]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,Qt,rr,bn,po],[Be]:[{endpoint:GH,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,Qt,rr,bn,ho],endpoint:GH,[ue]:Ye},{[be]:[hn,Qt,rr,to],endpoint:{[dt]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,Qt,rr,bn,po],[Be]:[{endpoint:WH,[ue]:Ye}],[ue]:Ve},{[be]:[hn,Qt,rr,bn,ho],endpoint:WH,[ue]:Ye},{[be]:[Yn,Qt,an,to],endpoint:{[dt]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,Qt,an,bn,po],[Be]:[{endpoint:KH,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,Qt,an,bn,ho],endpoint:KH,[ue]:Ye},{[be]:[hn,Lr,Xo,an,to],endpoint:{[dt]:yK,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,Lr,Xo,an,bn,po],[Be]:[{[be]:Dl,endpoint:f1,[ue]:Ye},{endpoint:f1,[ue]:Ye}],[ue]:Ve},{[be]:[hn,Lr,Xo,an,bn,ho],endpoint:f1,[ue]:Ye},{[be]:[hn,Qt,an,to],endpoint:{[dt]:SH,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,Qt,an,bn,po],[Be]:[{[be]:Dl,endpoint:{[dt]:SH,[ft]:Yr,[pt]:qt},[ue]:Ye},{endpoint:YH,[ue]:Ye}],[ue]:Ve},{[be]:[hn,Qt,an,bn,ho],endpoint:YH,[ue]:Ye}],[ue]:Ve},{error:"Path-style addressing cannot be used with S3 Accelerate",[ue]:xt}],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:qi,[Re]:[ZH]},{[ke]:jr,[Re]:[ZH,ua]}],[Be]:[{[be]:hs,[Be]:[{[be]:Sz,[Be]:[$H,jH,{[be]:$d,endpoint:{[dt]:Jv,[ft]:p1,[pt]:qt},[ue]:Ye},{[be]:Mv,endpoint:{[dt]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:p1,[pt]:qt},[ue]:Ye},{endpoint:{[dt]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[ft]:p1,[pt]:qt},[ue]:Ye}],[ue]:Ve},Rv],[ue]:Ve}],[ue]:Ve},{[be]:[kH],[Be]:[{[be]:hs,[Be]:[{[be]:Sz,[Be]:[{[be]:[rr,Yn,Qt,to],endpoint:{[dt]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[rr,Yn,Qt,bn,po],[Be]:[{endpoint:XH,[ue]:Ye}],[ue]:Ve},{[be]:[rr,Yn,Qt,bn,ho],endpoint:XH,[ue]:Ye},{[be]:[rr,hn,Qt,to],endpoint:{[dt]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[rr,hn,Qt,bn,po],[Be]:[{endpoint:QH,[ue]:Ye}],[ue]:Ve},{[be]:[rr,hn,Qt,bn,ho],endpoint:QH,[ue]:Ye},{[be]:[an,Yn,Qt,to],endpoint:{[dt]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[an,Yn,Qt,bn,po],[Be]:[{endpoint:JH,[ue]:Ye}],[ue]:Ve},{[be]:[an,Yn,Qt,bn,ho],endpoint:JH,[ue]:Ye},{[be]:[an,hn,Lr,Xo,to],endpoint:{[dt]:Jv,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[an,hn,Lr,Xo,bn,po],[Be]:[{[be]:Dl,endpoint:h1,[ue]:Ye},{endpoint:h1,[ue]:Ye}],[ue]:Ve},{[be]:[an,hn,Lr,Xo,bn,ho],endpoint:h1,[ue]:Ye},{[be]:[an,hn,Qt,to],endpoint:{[dt]:CH,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[an,hn,Qt,bn,po],[Be]:[{[be]:Dl,endpoint:{[dt]:CH,[ft]:Yr,[pt]:qt},[ue]:Ye},{endpoint:ez,[ue]:Ye}],[ue]:Ve},{[be]:[an,hn,Qt,bn,ho],endpoint:ez,[ue]:Ye}],[ue]:Ve},Rv],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{error:"A region must be set when sending requests to S3.",[ue]:xt}]},j4e=$4e,B4e=new _7({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),PK=(e,t={})=>B4e.get(e,()=>q7(j4e,{endpointParams:e,logger:t.logger}));fm.aws=G7;const V4e=e=>async(t,r,o)=>{if(!o)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,r,o),s=gl(r)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!s)throw new Error(`getEndpointParameterInstructions() is not defined on '${r.commandName}'`);const a=await tK(o,{getEndpointParameterInstructions:s},t);return Object.assign(i,a)},H4e=async(e,t,r)=>({operation:gl(t).operation,region:await Rs(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),z4e=V4e(H4e);function EK(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function IK(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}const q4e=(e,t,r)=>i=>{const a=e(i).properties?.authSchemes;if(!a)return t(i);const l=[];for(const c of a){const{name:u,properties:d={},...f}=c,p=u.toLowerCase();u!==p&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${u}' to '${p}'`);let h;if(p==="sigv4a"){h="aws.auth#sigv4a";const y=a.find(v=>{const C=v.name.toLowerCase();return C!=="sigv4a"&&C.startsWith("sigv4")});if(cK.sigv4aDependency()==="none"&&y)continue}else if(p.startsWith("sigv4"))h="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${p}'`);const b=r[h];if(!b)throw new Error(`Could not find HttpAuthOption create function for '${h}'`);const g=b(i);g.schemeId=h,g.signingProperties={...g.signingProperties||{},...f,...d},l.push(g)}return l},U4e=e=>{const t=[];switch(e.operation){default:t.push(EK(e)),t.push(IK(e))}return t},G4e=q4e(PK,U4e,{"aws.auth#sigv4":EK,"aws.auth#sigv4a":IK}),W4e=e=>{const t=p7(e),r=sqe(t);return Object.assign(r,{authSchemePreference:Rs(e.authSchemePreference??[])})},K4e=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),kK={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class xo extends Qc{constructor(t){super(t),Object.setPrototypeOf(this,xo.prototype)}}class zM extends xo{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,zM.prototype)}}class qM extends xo{name="AccessDenied";$fault="client";constructor(t){super({name:"AccessDenied",$fault:"client",...t}),Object.setPrototypeOf(this,qM.prototype)}}class UM extends xo{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,UM.prototype)}}class GM extends xo{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,GM.prototype)}}class WM extends xo{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,WM.prototype)}}class KM extends xo{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,KM.prototype)}}class YM extends xo{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,YM.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class ZM extends xo{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,ZM.prototype)}}class XM extends xo{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,XM.prototype)}}class QM extends xo{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,QM.prototype)}}class JM extends xo{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,JM.prototype)}}class eA extends xo{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,eA.prototype)}}class tA extends xo{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,tA.prototype)}}class nA extends xo{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,nA.prototype)}}class rA extends xo{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,rA.prototype)}}const Y4e="ACL",Z4e="AccessDenied",Cz="AccessKeyId",X4e="AccessTier",RK="Bucket",Q4e="BucketAlreadyExists",J4e="BucketAlreadyOwnedByYou",AC="BucketKeyEnabled",eUe="Body",tUe="ChecksumAlgorithm",nUe="CacheControl",MK="ChecksumCRC32",AK="ChecksumCRC32C",DK="ChecksumCRC64NVME",rUe="Cache-Control",oUe="Content-Disposition",iUe="ContentDisposition",sUe="Content-Encoding",aUe="ContentEncoding",lUe="ContentLanguage",cUe="Content-Language",uUe="Content-Length",dUe="ContentLength",fUe="Content-MD5",pUe="ContentMD5",_K="ChecksumSHA1",NK="ChecksumSHA256",hUe="CreateSessionOutput",mUe="CreateSessionResult",gUe="CreateSessionRequest",bUe="CreateSession",yUe="ChecksumType",vUe="Content-Type",xUe="ContentType",wz="Credentials",aE="Expiration",SUe="ExpectedBucketOwner",CUe="EncryptionTypeMismatch",Tz="ETag",Oz="Expires",wUe="GrantFullControl",TUe="GrantRead",OUe="GrantReadACP",PUe="GrantWriteACP",EUe="IfMatch",IUe="If-Match",kUe="IfNoneMatch",RUe="If-None-Match",MUe="InvalidObjectState",AUe="IdempotencyParameterMismatch",DUe="InvalidRequest",_Ue="InvalidWriteOffset",NUe="Key",FUe="Metadata",LUe="NotFound",$Ue="NoSuchBucket",jUe="NoSuchKey",BUe="NoSuchUpload",VUe="ObjectAlreadyInActiveTierError",HUe="ObjectLockLegalHoldStatus",zUe="ObjectLockMode",qUe="ObjectLockRetainUntilDate",UUe="ObjectNotInActiveTierError",GUe="PutObject",WUe="PutObjectOutput",KUe="PutObjectRequest",YUe="RequestCharged",ZUe="RequestPayer",Pz="SecretAccessKey",XUe="StreamingBlob",FK="StorageClass",QUe="SessionCredentialValue",JUe="SessionCredentials",e9e="SessionMode",DC="ServerSideEncryption",LK="SSECustomerAlgorithm",$K="SSECustomerKey",jK="SSECustomerKeyMD5",hg="SSEKMSEncryptionContext",mg="SSEKMSKeyId",Ez="SessionToken",t9e="Size",n9e="TooManyParts",r9e="Tagging",o9e="VersionId",i9e="WriteOffsetBytes",s9e="WebsiteRedirectLocation",di="client",fi="error",BK="http",a9e="httpChecksum",Ii="httpError",Pt="httpHeader",l9e="httpPrefixHeaders",VK="smithy.ts.sdk.synthetic.com.amazonaws.s3",c9e="streaming",ef="xmlName",u9e="x-amz-acl",HK="x-amz-checksum-crc32",zK="x-amz-checksum-crc32c",qK="x-amz-checksum-crc64nvme",UK="x-amz-checksum-sha1",GK="x-amz-checksum-sha256",d9e="x-amz-create-session-mode",f9e="x-amz-checksum-type",p9e="x-amz-expiration",h9e="x-amz-expected-bucket-owner",m9e="x-amz-grant-full-control",g9e="x-amz-grant-read",b9e="x-amz-grant-read-acp",y9e="x-amz-grant-write-acp",v9e="x-amz-meta-",x9e="x-amz-object-lock-legal-hold",S9e="x-amz-object-lock-mode",C9e="x-amz-object-lock-retain-until-date",w9e="x-amz-object-size",T9e="x-amz-request-charged",O9e="x-amz-request-payer",P9e="x-amz-storage-class",E9e="x-amz-sdk-checksum-algorithm",_C="x-amz-server-side-encryption",NC="x-amz-server-side-encryption-aws-kms-key-id",FC="x-amz-server-side-encryption-bucket-key-enabled",LC="x-amz-server-side-encryption-context",WK="x-amz-server-side-encryption-customer-algorithm",I9e="x-amz-server-side-encryption-customer-key",KK="x-amz-server-side-encryption-customer-key-MD5",k9e="x-amz-tagging",R9e="x-amz-version-id",M9e="x-amz-write-offset-bytes",A9e="x-amz-website-redirect-location",Zn="com.amazonaws.s3",YK=ti.for(VK);var D9e=[-3,VK,"S3ServiceException",0,[],[]];YK.registerError(D9e,xo);const Go=ti.for(Zn);var _9e=[-3,Zn,Z4e,{[fi]:di,[Ii]:403},[],[]];Go.registerError(_9e,qM);var N9e=[-3,Zn,Q4e,{[fi]:di,[Ii]:409},[],[]];Go.registerError(N9e,GM);var F9e=[-3,Zn,J4e,{[fi]:di,[Ii]:409},[],[]];Go.registerError(F9e,WM);var L9e=[-3,Zn,CUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(L9e,QM);var $9e=[-3,Zn,AUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError($9e,nA);var j9e=[-3,Zn,MUe,{[fi]:di,[Ii]:403},[FK,X4e],[0,0]];Go.registerError(j9e,YM);var B9e=[-3,Zn,DUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(B9e,JM);var V9e=[-3,Zn,_Ue,{[fi]:di,[Ii]:400},[],[]];Go.registerError(V9e,eA);var H9e=[-3,Zn,$Ue,{[fi]:di,[Ii]:404},[],[]];Go.registerError(H9e,KM);var z9e=[-3,Zn,jUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(z9e,ZM);var q9e=[-3,Zn,BUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(q9e,zM);var U9e=[-3,Zn,LUe,{[fi]:di},[],[]];Go.registerError(U9e,XM);var G9e=[-3,Zn,VUe,{[fi]:di,[Ii]:403},[],[]];Go.registerError(G9e,rA);var W9e=[-3,Zn,UUe,{[fi]:di,[Ii]:403},[],[]];Go.registerError(W9e,UM);var K9e=[-3,Zn,n9e,{[fi]:di,[Ii]:400},[],[]];Go.registerError(K9e,tA);const Y9e=[YK,Go];var Iz=[0,Zn,QUe,8,0],Z9e=[0,Zn,$K,8,0],$C=[0,Zn,hg,8,0],jC=[0,Zn,mg,8,0],X9e=[0,Zn,XUe,{[c9e]:1},42],Q9e=[3,Zn,hUe,{[ef]:mUe},[wz,DC,mg,hg,AC],[[()=>n6e,{[ef]:wz}],[0,{[Pt]:_C}],[()=>jC,{[Pt]:NC}],[()=>$C,{[Pt]:LC}],[2,{[Pt]:FC}]],1],J9e=[3,Zn,gUe,0,[RK,e9e,DC,mg,hg,AC],[[0,1],[0,{[Pt]:d9e}],[0,{[Pt]:_C}],[()=>jC,{[Pt]:NC}],[()=>$C,{[Pt]:LC}],[2,{[Pt]:FC}]],1],e6e=[3,Zn,WUe,0,[aE,Tz,MK,AK,DK,_K,NK,yUe,DC,o9e,LK,jK,mg,hg,AC,t9e,YUe],[[0,{[Pt]:p9e}],[0,{[Pt]:Tz}],[0,{[Pt]:HK}],[0,{[Pt]:zK}],[0,{[Pt]:qK}],[0,{[Pt]:UK}],[0,{[Pt]:GK}],[0,{[Pt]:f9e}],[0,{[Pt]:_C}],[0,{[Pt]:R9e}],[0,{[Pt]:WK}],[0,{[Pt]:KK}],[()=>jC,{[Pt]:NC}],[()=>$C,{[Pt]:LC}],[2,{[Pt]:FC}],[1,{[Pt]:w9e}],[0,{[Pt]:T9e}]]],t6e=[3,Zn,KUe,0,[RK,NUe,Y4e,eUe,nUe,iUe,aUe,lUe,dUe,pUe,xUe,tUe,MK,AK,DK,_K,NK,Oz,EUe,kUe,wUe,TUe,OUe,PUe,i9e,FUe,DC,FK,s9e,LK,$K,jK,mg,hg,AC,ZUe,r9e,zUe,qUe,HUe,SUe],[[0,1],[0,1],[0,{[Pt]:u9e}],[()=>X9e,16],[0,{[Pt]:rUe}],[0,{[Pt]:oUe}],[0,{[Pt]:sUe}],[0,{[Pt]:cUe}],[1,{[Pt]:uUe}],[0,{[Pt]:fUe}],[0,{[Pt]:vUe}],[0,{[Pt]:E9e}],[0,{[Pt]:HK}],[0,{[Pt]:zK}],[0,{[Pt]:qK}],[0,{[Pt]:UK}],[0,{[Pt]:GK}],[4,{[Pt]:Oz}],[0,{[Pt]:IUe}],[0,{[Pt]:RUe}],[0,{[Pt]:m9e}],[0,{[Pt]:g9e}],[0,{[Pt]:b9e}],[0,{[Pt]:y9e}],[1,{[Pt]:M9e}],[128,{[l9e]:v9e}],[0,{[Pt]:_C}],[0,{[Pt]:P9e}],[0,{[Pt]:A9e}],[0,{[Pt]:WK}],[()=>Z9e,{[Pt]:I9e}],[0,{[Pt]:KK}],[()=>jC,{[Pt]:NC}],[()=>$C,{[Pt]:LC}],[2,{[Pt]:FC}],[0,{[Pt]:O9e}],[0,{[Pt]:k9e}],[0,{[Pt]:S9e}],[5,{[Pt]:C9e}],[0,{[Pt]:x9e}],[0,{[Pt]:h9e}]],2],n6e=[3,Zn,JUe,0,[Cz,Pz,Ez,aE],[[0,{[ef]:Cz}],[()=>Iz,{[ef]:Pz}],[()=>Iz,{[ef]:Ez}],[4,{[ef]:aE}]],4],r6e=[9,Zn,bUe,{[BK]:["GET","/?session",200]},()=>J9e,()=>Q9e],o6e=[9,Zn,GUe,{[a9e]:"-",[BK]:["PUT","/{Key+}?x-id=PutObject",200]},()=>t6e,()=>e6e];class i6e extends IC.classBuilder().ep({...kK,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,r,o,i){return[DM(o,t.getEndpointParameterInstructions()),A7(o)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(r6e).build(){}const s6e="3.996.0",a6e={version:s6e},l6e=e=>new TextEncoder().encode(e);function kz(e){return typeof e=="string"?e.length===0:e.byteLength===0}var ZK={name:"SHA-1"},Rz={name:"HMAC",hash:ZK},c6e=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const u6e={};function Jl(){return typeof window<"u"?window:typeof self<"u"?self:u6e}var d6e=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(r,o){Jl().crypto.subtle.importKey("raw",Mz(t),Rz,!1,["sign"]).then(r,o)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!kz(t)){var r=Mz(t),o=new Uint8Array(this.toHash.byteLength+r.byteLength);o.set(this.toHash,0),o.set(r,this.toHash.byteLength),this.toHash=o}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return Jl().crypto.subtle.sign(Rz,r,t.toHash).then(function(o){return new Uint8Array(o)})}):kz(this.toHash)?Promise.resolve(c6e):Promise.resolve().then(function(){return Jl().crypto.subtle.digest(ZK,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function Mz(e){return typeof e=="string"?l6e(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var f6e=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function XK(e){if(p6e(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return h6e(t)}return!1}function p6e(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function h6e(e){return e&&f6e.every(function(t){return typeof e[t]=="function"})}var m6e=(function(){function e(t){if(XK(Jl()))this.hash=new d6e(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,r){this.hash.update(ic(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})(),QK={name:"SHA-256"},Az={name:"HMAC",hash:QK},g6e=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]),b6e=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!dm(t)){var r=ic(t),o=new Uint8Array(this.toHash.byteLength+r.byteLength);o.set(this.toHash,0),o.set(r,this.toHash.byteLength),this.toHash=o}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return Jl().crypto.subtle.sign(Az,r,t.toHash).then(function(o){return new Uint8Array(o)})}):dm(this.toHash)?Promise.resolve(g6e):Promise.resolve().then(function(){return Jl().crypto.subtle.digest(QK,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,o){Jl().crypto.subtle.importKey("raw",ic(t.secret),Az,!1,["sign"]).then(r,o)}),this.key.catch(function(){}))},e})(),ys=64,y6e=32,v6e=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]),x6e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],S6e=Math.pow(2,53)-1,ex=(function(){function e(){this.state=Int32Array.from(x6e),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,o=t.byteLength;if(this.bytesHashed+=o,this.bytesHashed*8>S6e)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;o>0;)this.buffer[this.bufferLength++]=t[r++],o--,this.bufferLength===ys&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),o=this.bufferLength;if(r.setUint8(this.bufferLength++,128),o%ys>=ys-8){for(var i=this.bufferLength;i<ys;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<ys-8;i++)r.setUint8(i,0);r.setUint32(ys-8,Math.floor(t/4294967296),!0),r.setUint32(ys-4,t),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(y6e),i=0;i<8;i++)s[i*4]=this.state[i]>>>24&255,s[i*4+1]=this.state[i]>>>16&255,s[i*4+2]=this.state[i]>>>8&255,s[i*4+3]=this.state[i]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,o=t.state,i=o[0],s=o[1],a=o[2],l=o[3],c=o[4],u=o[5],d=o[6],f=o[7],p=0;p<ys;p++){if(p<16)this.temp[p]=(r[p*4]&255)<<24|(r[p*4+1]&255)<<16|(r[p*4+2]&255)<<8|r[p*4+3]&255;else{var h=this.temp[p-2],b=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[p-15];var g=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[p]=(b+this.temp[p-7]|0)+(g+this.temp[p-16]|0)}var y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&d)|0)+(f+(v6e[p]+this.temp[p]|0)|0)|0,v=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&a^s&a)|0;f=d,d=u,u=c,c=l+y|0,l=a,a=s,s=i,i=y+v|0}o[0]+=i,o[1]+=s,o[2]+=a,o[3]+=l,o[4]+=c,o[5]+=u,o[6]+=d,o[7]+=f},e})(),C6e=(function(){function e(t){this.secret=t,this.hash=new ex,this.reset()}return e.prototype.update=function(t){if(!(dm(t)||this.error))try{this.hash.update(ic(t))}catch(r){this.error=r}},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 EM(this,void 0,void 0,function(){return IM(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ex,this.secret){this.outer=new ex;var t=w6e(this.secret),r=new Uint8Array(ys);r.set(t);for(var o=0;o<ys;o++)t[o]^=54,r[o]^=92;this.hash.update(t),this.outer.update(r);for(var o=0;o<t.byteLength;o++)t[o]=0}},e})();function w6e(e){var t=ic(e);if(t.byteLength>ys){var r=new ex;r.update(t),t=r.digest()}var o=new Uint8Array(ys);return o.set(t),o}var JK=(function(){function e(t){XK(Jl())?this.hash=new b6e(t):this.hash=new C6e(t)}return e.prototype.update=function(t,r){this.hash.update(ic(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const eY=({serviceId:e,clientVersion:t})=>async r=>{const o=typeof window<"u"?window.navigator:void 0,i=o?.userAgent??"",s=o?.userAgentData?.platform??Dz.os(i)??"other",a=void 0,l=o?.userAgentData?.brands??[],c=l[l.length-1],u=c?.brand??Dz.browser(i)??"unknown",d=c?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${s}`,a],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const p=await r?.userAgentAppId?.();return p&&f.push([`app/${p}`]),f},Dz={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}};class Nh{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let o=7,i=Math.abs(Math.round(t));o>-1&&i>0;o--,i/=256)r[o]=i;return t<0&&_z(r),new Nh(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&_z(t),parseInt(Ci(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function _z(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class T6e{toUtf8;fromUtf8;constructor(t,r){this.toUtf8=t,this.fromUtf8=r}format(t){const r=[];for(const s of Object.keys(t)){const a=this.fromUtf8(s);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const o=new Uint8Array(r.reduce((s,a)=>s+a.byteLength,0));let i=0;for(const s of r)o.set(s,i),i+=s.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,6),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const l=this.fromUtf8(t.value),c=new DataView(new ArrayBuffer(3+l.byteLength));c.setUint8(0,7),c.setUint16(1,l.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(l,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Nh.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!D6e.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(WW(t.value.replace(/\-/g,"")),1),f}}parse(t){const r={};let o=0;for(;o<t.byteLength;){const i=t.getUint8(o++),s=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+o,i));switch(o+=i,t.getUint8(o++)){case 0:r[s]={type:Fz,value:!0};break;case 1:r[s]={type:Fz,value:!1};break;case 2:r[s]={type:O6e,value:t.getInt8(o++)};break;case 3:r[s]={type:P6e,value:t.getInt16(o,!1)},o+=2;break;case 4:r[s]={type:E6e,value:t.getInt32(o,!1)},o+=4;break;case 5:r[s]={type:I6e,value:new Nh(new Uint8Array(t.buffer,t.byteOffset+o,8))},o+=8;break;case 6:const a=t.getUint16(o,!1);o+=2,r[s]={type:k6e,value:new Uint8Array(t.buffer,t.byteOffset+o,a)},o+=a;break;case 7:const l=t.getUint16(o,!1);o+=2,r[s]={type:R6e,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+o,l))},o+=l;break;case 8:r[s]={type:M6e,value:new Date(new Nh(new Uint8Array(t.buffer,t.byteOffset+o,8)).valueOf())},o+=8;break;case 9:const c=new Uint8Array(t.buffer,t.byteOffset+o,16);o+=16,r[s]={type:A6e,value:`${Ci(c.subarray(0,4))}-${Ci(c.subarray(4,6))}-${Ci(c.subarray(6,8))}-${Ci(c.subarray(8,10))}-${Ci(c.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return r}}var Nz;(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"})(Nz||(Nz={}));const Fz="boolean",O6e="byte",P6e="short",E6e="integer",I6e="long",k6e="binary",R6e="string",M6e="timestamp",A6e="uuid",D6e=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,tY=4,Fl=tY*2,zc=4,_6e=Fl+zc*2;function N6e({byteLength:e,byteOffset:t,buffer:r}){if(e<_6e)throw new Error("Provided message too short to accommodate event stream message overhead");const o=new DataView(r,t,e),i=o.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=o.getUint32(tY,!1),a=o.getUint32(Fl,!1),l=o.getUint32(e-zc,!1),c=new a0().update(new Uint8Array(r,t,Fl));if(a!==c.digest())throw new Error(`The prelude checksum specified in the message (${a}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(r,t+Fl,e-(Fl+zc))),l!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${l}`);return{headers:new DataView(r,t+Fl+zc,s),body:new Uint8Array(r,t+Fl+zc+s,i-s-(Fl+zc+zc))}}class F6e{headerMarshaller;messageBuffer;isEndOfStream;constructor(t,r){this.headerMarshaller=new T6e(t,r),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){const t=this.messageBuffer.pop(),r=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return r}}}getAvailableMessages(){const t=this.messageBuffer;this.messageBuffer=[];const r=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return r}}}encode({headers:t,body:r}){const o=this.headerMarshaller.format(t),i=o.byteLength+r.byteLength+16,s=new Uint8Array(i),a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=new a0;return a.setUint32(0,i,!1),a.setUint32(4,o.byteLength,!1),a.setUint32(8,l.update(s.subarray(0,8)).digest(),!1),s.set(o,12),s.set(r,o.byteLength+12),a.setUint32(i-4,l.update(s.subarray(8,i-4)).digest(),!1),s}decode(t){const{headers:r,body:o}=N6e(t);return{headers:this.headerMarshaller.parse(r),body:o}}formatHeaders(t){return this.headerMarshaller.format(t)}}class L6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.decoder.decode(t)}}class $6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream)yield this.options.encoder.encode(t);this.options.includeEndFrame&&(yield new Uint8Array(0))}}class j6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream){const r=await this.options.deserializer(t);r!==void 0&&(yield r)}}}class B6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.serializer(t)}}function V6e(e){let t=0,r=0,o=null,i=null;const s=l=>{if(typeof l!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+l);t=l,r=4,o=new Uint8Array(l),new DataView(o.buffer).setUint32(0,l,!1)},a=async function*(){const l=e[Symbol.asyncIterator]();for(;;){const{value:c,done:u}=await l.next();if(u){if(t)if(t===r)yield o;else throw new Error("Truncated event message received.");else return;return}const d=c.length;let f=0;for(;f<d;){if(!o){const h=d-f;i||(i=new Uint8Array(4));const b=Math.min(4-r,h);if(i.set(c.slice(f,f+b),r),r+=b,f+=b,r<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const p=Math.min(t-r,d-f);o.set(c.slice(f,f+p),r),r+=p,f+=p,t&&t===r&&(yield o,o=null,t=0,r=0)}}};return{[Symbol.asyncIterator]:a}}function H6e(e,t){return async function(r){const{value:o}=r.headers[":message-type"];if(o==="error"){const i=new Error(r.headers[":error-message"].value||"UnknownError");throw i.name=r.headers[":error-code"].value,i}else if(o==="exception"){const i=r.headers[":exception-type"].value,s={[i]:r},a=await e(s);if(a.$unknown){const l=new Error(t(r.body));throw l.name=i,l}throw a[i]}else if(o==="event"){const i={[r.headers[":event-type"].value]:r},s=await e(i);return s.$unknown?void 0:s}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}let z6e=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new F6e(t,r),this.utfEncoder=t}deserialize(t,r){const o=V6e(t);return new j6e({messageStream:new L6e({inputStream:o,decoder:this.eventStreamCodec}),deserializer:H6e(r,this.utfEncoder)})}serialize(t,r){return new $6e({messageStream:new B6e({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const q6e=e=>({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)return;yield o}}finally{t.releaseLock()}}}),U6e=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){const{done:o,value:i}=await t.next();if(o)return r.close();r.enqueue(i)}})};class G6e{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:r}){this.universalMarshaller=new z6e({utf8Decoder:r,utf8Encoder:t})}deserialize(t,r){const o=W6e(t)?q6e(t):t;return this.universalMarshaller.deserialize(o,r)}serialize(t,r){const o=this.universalMarshaller.serialize(t,r);return typeof ReadableStream=="function"?U6e(o):o}}const W6e=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,K6e=e=>new G6e(e);async function Y6e(e,t,r=1024*1024){const o=e.size;let i=0;for(;i<o;){const s=e.slice(i,Math.min(o,i+r));t(new Uint8Array(await s.arrayBuffer())),i+=s.size}}const Z6e=async function(t,r){const o=new t;return await Y6e(r,i=>{o.update(i)}),o.digest()},nY=e=>()=>Promise.reject(e),_l=64,X6e=16,Q6e=[1732584193,4023233417,2562383102,271733878];class J6e{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(eGe(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const r=tGe(t);let o=0,{byteLength:i}=r;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,r[o++]),i--,this.bufferLength===_l&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:r,bufferLength:o,bytesHashed:i}=this,s=i*8;if(r.setUint8(this.bufferLength++,128),o%_l>=_l-8){for(let a=this.bufferLength;a<_l;a++)r.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(let a=this.bufferLength;a<_l-8;a++)r.setUint8(a,0);r.setUint32(_l-8,s>>>0,!0),r.setUint32(_l-4,Math.floor(s/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(X6e));for(let r=0;r<4;r++)t.setUint32(r*4,this.state[r],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:r}=this;let o=r[0],i=r[1],s=r[2],a=r[3];o=Do(o,i,s,a,t.getUint32(0,!0),7,3614090360),a=Do(a,o,i,s,t.getUint32(4,!0),12,3905402710),s=Do(s,a,o,i,t.getUint32(8,!0),17,606105819),i=Do(i,s,a,o,t.getUint32(12,!0),22,3250441966),o=Do(o,i,s,a,t.getUint32(16,!0),7,4118548399),a=Do(a,o,i,s,t.getUint32(20,!0),12,1200080426),s=Do(s,a,o,i,t.getUint32(24,!0),17,2821735955),i=Do(i,s,a,o,t.getUint32(28,!0),22,4249261313),o=Do(o,i,s,a,t.getUint32(32,!0),7,1770035416),a=Do(a,o,i,s,t.getUint32(36,!0),12,2336552879),s=Do(s,a,o,i,t.getUint32(40,!0),17,4294925233),i=Do(i,s,a,o,t.getUint32(44,!0),22,2304563134),o=Do(o,i,s,a,t.getUint32(48,!0),7,1804603682),a=Do(a,o,i,s,t.getUint32(52,!0),12,4254626195),s=Do(s,a,o,i,t.getUint32(56,!0),17,2792965006),i=Do(i,s,a,o,t.getUint32(60,!0),22,1236535329),o=_o(o,i,s,a,t.getUint32(4,!0),5,4129170786),a=_o(a,o,i,s,t.getUint32(24,!0),9,3225465664),s=_o(s,a,o,i,t.getUint32(44,!0),14,643717713),i=_o(i,s,a,o,t.getUint32(0,!0),20,3921069994),o=_o(o,i,s,a,t.getUint32(20,!0),5,3593408605),a=_o(a,o,i,s,t.getUint32(40,!0),9,38016083),s=_o(s,a,o,i,t.getUint32(60,!0),14,3634488961),i=_o(i,s,a,o,t.getUint32(16,!0),20,3889429448),o=_o(o,i,s,a,t.getUint32(36,!0),5,568446438),a=_o(a,o,i,s,t.getUint32(56,!0),9,3275163606),s=_o(s,a,o,i,t.getUint32(12,!0),14,4107603335),i=_o(i,s,a,o,t.getUint32(32,!0),20,1163531501),o=_o(o,i,s,a,t.getUint32(52,!0),5,2850285829),a=_o(a,o,i,s,t.getUint32(8,!0),9,4243563512),s=_o(s,a,o,i,t.getUint32(28,!0),14,1735328473),i=_o(i,s,a,o,t.getUint32(48,!0),20,2368359562),o=No(o,i,s,a,t.getUint32(20,!0),4,4294588738),a=No(a,o,i,s,t.getUint32(32,!0),11,2272392833),s=No(s,a,o,i,t.getUint32(44,!0),16,1839030562),i=No(i,s,a,o,t.getUint32(56,!0),23,4259657740),o=No(o,i,s,a,t.getUint32(4,!0),4,2763975236),a=No(a,o,i,s,t.getUint32(16,!0),11,1272893353),s=No(s,a,o,i,t.getUint32(28,!0),16,4139469664),i=No(i,s,a,o,t.getUint32(40,!0),23,3200236656),o=No(o,i,s,a,t.getUint32(52,!0),4,681279174),a=No(a,o,i,s,t.getUint32(0,!0),11,3936430074),s=No(s,a,o,i,t.getUint32(12,!0),16,3572445317),i=No(i,s,a,o,t.getUint32(24,!0),23,76029189),o=No(o,i,s,a,t.getUint32(36,!0),4,3654602809),a=No(a,o,i,s,t.getUint32(48,!0),11,3873151461),s=No(s,a,o,i,t.getUint32(60,!0),16,530742520),i=No(i,s,a,o,t.getUint32(8,!0),23,3299628645),o=Fo(o,i,s,a,t.getUint32(0,!0),6,4096336452),a=Fo(a,o,i,s,t.getUint32(28,!0),10,1126891415),s=Fo(s,a,o,i,t.getUint32(56,!0),15,2878612391),i=Fo(i,s,a,o,t.getUint32(20,!0),21,4237533241),o=Fo(o,i,s,a,t.getUint32(48,!0),6,1700485571),a=Fo(a,o,i,s,t.getUint32(12,!0),10,2399980690),s=Fo(s,a,o,i,t.getUint32(40,!0),15,4293915773),i=Fo(i,s,a,o,t.getUint32(4,!0),21,2240044497),o=Fo(o,i,s,a,t.getUint32(32,!0),6,1873313359),a=Fo(a,o,i,s,t.getUint32(60,!0),10,4264355552),s=Fo(s,a,o,i,t.getUint32(24,!0),15,2734768916),i=Fo(i,s,a,o,t.getUint32(52,!0),21,1309151649),o=Fo(o,i,s,a,t.getUint32(16,!0),6,4149444226),a=Fo(a,o,i,s,t.getUint32(44,!0),10,3174756917),s=Fo(s,a,o,i,t.getUint32(8,!0),15,718787259),i=Fo(i,s,a,o,t.getUint32(36,!0),21,3951481745),r[0]=o+r[0]&4294967295,r[1]=i+r[1]&4294967295,r[2]=s+r[2]&4294967295,r[3]=a+r[3]&4294967295}reset(){this.state=Uint32Array.from(Q6e),this.buffer=new DataView(new ArrayBuffer(_l)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function BC(e,t,r,o,i,s){return t=(t+e&4294967295)+(o+s&4294967295)&4294967295,(t<<i|t>>>32-i)+r&4294967295}function Do(e,t,r,o,i,s,a){return BC(t&r|~t&o,e,t,i,s,a)}function _o(e,t,r,o,i,s,a){return BC(t&o|r&~o,e,t,i,s,a)}function No(e,t,r,o,i,s,a){return BC(t^r^o,e,t,i,s,a)}function Fo(e,t,r,o,i,s,a){return BC(r^(t|~o),e,t,i,s,a)}function eGe(e){return typeof e=="string"?e.length===0:e.byteLength===0}function tGe(e){return typeof e=="string"?cl(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const nGe=["in-region","cross-region","mobile","standard","legacy"],rY=({defaultsMode:e}={})=>iqe(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(rGe()?"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 ${nGe.join(", ")}, got ${t}`)}}),rGe=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:r,downlink:o}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(r)>100||Number(o)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},oGe=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Tu,base64Encoder:e?.base64Encoder??oc,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??PK,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??tze,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??G4e,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new vM},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new FHe}],logger:e?.logger??new kC,protocol:e?.protocol??Gqe,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",errorTypeRegistries:Y9e,xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??KW,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??cK,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??hm,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??cl,utf8Encoder:e?.utf8Encoder??zu}),iGe=e=>{const t=rY(e),r=()=>t().then(g7),o=oGe(e);return{...o,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??h7,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??eY({serviceId:o.serviceId,clientVersion:a6e.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??K6e,maxAttempts:e?.maxAttempts??mm,md5:e?.md5??J6e,region:e?.region??nY("Region is missing"),requestHandler:wC.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||rK),sha1:e?.sha1??m6e,sha256:e?.sha256??JK,streamCollector:e?.streamCollector??xM,streamHasher:e?.streamHasher??Z6e,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(K7)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Y7))}},oY=e=>({setRegion(t){e.region=t},region(){return e.region}}),iY=e=>({region:e.region()}),sGe=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(i){const s=t.findIndex(a=>a.schemeId===i.schemeId);s===-1?t.push(i):t.splice(s,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){o=i},credentials(){return o}}},aGe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),lGe=(e,t)=>{const r=Object.assign(oY(e),b7(e),jW(e),sGe(e));return t.forEach(o=>o.configure(r)),Object.assign(e,iY(r),y7(r),BW(r),aGe(r))};class cGe extends m7{config;constructor(...[t]){const r=iGe(t||{});super(r),this.initConfig=r;const o=K4e(r),i=D7(o),s=v3e(i),a=aK(s),l=X7(a),c=l,u=nK(c),d=q5e(u),f=W4e(d),p=Y3e(f,{session:[()=>this,i6e]}),h=lGe(p,t?.extensions||[]);this.config=h,this.middlewareStack.use(ZW(this.config)),this.middlewareStack.use(W7(this.config)),this.middlewareStack.use(lK(this.config)),this.middlewareStack.use(Q7(this.config)),this.middlewareStack.use(k7(this.config)),this.middlewareStack.use(R7(this.config)),this.middlewareStack.use(M7(this.config)),this.middlewareStack.use(HW(this.config,{httpAuthSchemeParametersProvider:z4e,identityProviderConfigProvider:async b=>new r7({"aws.auth#sigv4":b.credentials,"aws.auth#sigv4a":b.credentials})})),this.middlewareStack.use(qW(this.config)),this.middlewareStack.use(s5e(this.config)),this.middlewareStack.use(MHe(this.config)),this.middlewareStack.use(F3e(this.config)),this.middlewareStack.use(z3e(this.config)),this.middlewareStack.use(K3e(this.config))}destroy(){super.destroy()}}function uGe(e){return t=>async r=>{const o={...r.input},i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const s of i){const a=o[s.target];if(a){let l;typeof a=="string"?pGe(a,e)?l=e.base64Decoder(a):(l=e.utf8Decoder(a),o[s.target]=e.base64Encoder(l)):(l=ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a),o[s.target]=e.base64Encoder(l));const c=new e.md5;c.update(l),o[s.hash]=e.base64Encoder(await c.digest())}}return t({...r,input:o})}}const dGe={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},fGe=e=>({applyToStack:t=>{t.add(uGe(e),dGe)}});function pGe(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}class hGe extends IC.classBuilder().ep({...kK,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,r,o,i){return[DM(o,t.getEndpointParameterInstructions()),y3e(o,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),M3e(),A7(o),fGe(o)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(o6e).build(){}function sY(e){return Promise.all(Object.keys(e).reduce((t,r)=>{const o=e[r];return typeof o=="string"?t.push([r,o]):t.push(o().then(i=>[r,i])),t},[])).then(t=>t.reduce((r,[o,i])=>(r[o]=i,r),{}))}function mGe(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:r,CognitoIdentityClient:o}=await Promise.resolve().then(()=>require("./loadCognitoIdentity-DrcsByX4.js")),i=u=>e.clientConfig?.[u]??e.parentClientConfig?.[u]??t?.callerClientConfig?.[u],{Credentials:{AccessKeyId:s=gGe(e.logger),Expiration:a,SecretKey:l=yGe(e.logger),SessionToken:c}=bGe(e.logger)}=await(e.client??new o(Object.assign({},e.clientConfig??{},{region:i("region"),profile:i("profile"),userAgentAppId:i("userAgentAppId")}))).send(new r({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await sY(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:l,sessionToken:c,expiration:a}}}function gGe(e){throw new fp("Response from Amazon Cognito contained no access key ID",{logger:e})}function bGe(e){throw new fp("Response from Amazon Cognito contained no credentials",{logger:e})}function yGe(e){throw new fp("Response from Amazon Cognito contained no secret key",{logger:e})}const T1="IdentityIds";class vGe{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",r=>{const o=r.get(t);return new Promise(i=>{o.onerror=()=>i(null),o.onsuccess=()=>i(o.result?o.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",r=>{const o=r.delete(t);return new Promise((i,s)=>{o.onerror=()=>s(o.error),o.onsuccess=()=>i()})})}setItem(t,r){return this.withObjectStore("readwrite",o=>{const i=o.put({id:t,value:r});return new Promise((s,a)=>{i.onerror=()=>a(i.error),i.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((r,o)=>{t.onsuccess=()=>{r(t.result)},t.onerror=()=>{o(t.error)},t.onblocked=()=>{o(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const i=t.result;i.onerror=()=>{o(new Error("Failed to create object store"))},i.createObjectStore(T1,{keyPath:"id"})}})}withObjectStore(t,r){return this.getDb().then(o=>{const i=o.transaction(T1,t);return i.oncomplete=()=>o.close(),new Promise((s,a)=>{i.onerror=()=>a(i.error),s(r(i.objectStore(T1)))}).catch(s=>{throw o.close(),s})})}}class xGe{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,r){this.store[t]=r}}const SGe=new xGe;function CGe(){return typeof self=="object"&&self.indexedDB?new vGe:typeof window=="object"&&window.localStorage?window.localStorage:SGe}function wGe({accountId:e,cache:t=CGe(),client:r,clientConfig:o,customRoleArn:i,identityPoolId:s,logins:a,userIdentifier:l=!a||Object.keys(a).length===0?"ANONYMOUS":void 0,logger:c,parentClientConfig:u}){c?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const d=l?`aws:cognito-identity-credentials:${s}:${l}`:void 0;let f=async p=>{const{GetIdCommand:h,CognitoIdentityClient:b}=await Promise.resolve().then(()=>require("./loadCognitoIdentity-DrcsByX4.js")),g=C=>o?.[C]??u?.[C]??p?.callerClientConfig?.[C],y=r??new b(Object.assign({},o??{},{region:g("region"),profile:g("profile"),userAgentAppId:g("userAgentAppId")}));let v=d&&await t.getItem(d);if(!v){const{IdentityId:C=TGe(c)}=await y.send(new h({AccountId:e,IdentityPoolId:s,Logins:a?await sY(a):void 0}));v=C,d&&Promise.resolve(t.setItem(d,v)).catch(()=>{})}return f=mGe({client:y,customRoleArn:i,logins:a,identityId:v}),f(p)};return p=>f(p).catch(async h=>{throw d&&Promise.resolve(t.removeItem(d)).catch(()=>{}),h})}function TGe(e){throw new fp("Response from Amazon Cognito contained no identity ID",{logger:e})}const OGe=e=>wGe({...e});function PGe(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],o=atob(t[1]);let i=o.length;const s=new Uint8Array(i);for(;i--;)s[i]=o.charCodeAt(i);return new Blob([s],{type:r})}async function EGe(e,t,r,o,i,s=""){if(!i||!r||!o)return console.warn("Missing AWS Config (Pool ID, Bucket, or Region). Returning data URL as fallback."),e;try{const a=new cGe({region:o,credentials:OGe({clientConfig:{region:o},identityPoolId:i}),requestChecksumCalculation:"WHEN_REQUIRED",forcePathStyle:!0}),l=PGe(e);let c=s.trim();c&&!c.endsWith("/")&&(c+="/");const u=c?`${c}${t}`:`signatures/${t}`,d=new hGe({Bucket:r,Key:u,Body:l,ContentType:l.type});return await a.send(d),`https://${r}/${u}`}catch(a){throw console.error("Error uploading to S3:",a),a}}function IGe({attributes:e={},rules:t={},onChange:r}){const{id:o="",MuiAttributes:i={},label:s="Signature",bucket:a="",region:l="",identityPoolId:c="",path:u="",disabled:d=!1,CanvasProps:f={}}=e,p=Ue.useRef(null),h=Ue.useRef(null),[b,g]=Ue.useState(!1),[y,v]=Ue.useState(e.value||null),[C,O]=Ue.useState(400),[T,P]=Ue.useState(!1),k=t?.validation?.some(A=>A.rule==="mandatory")||!1,M=f?.style?.height||150;Ue.useEffect(()=>{const A=h.current;if(!A)return;const F=new ResizeObserver(I=>{const N=I[0]?.contentRect?.width;N&&N>0&&O(Math.floor(N))});return F.observe(A),()=>F.disconnect()},[]),Ue.useEffect(()=>{e.value&&p.current&&p.current.fromDataURL(e.value,{width:C,height:M})},[e.value,C,M]);const _=()=>{p.current&&p.current.clear(),v(null),P(!1),r&&r({id:o,value:""})},D=async()=>{if(!p.current||p.current.isEmpty())return;g(!0);const A=p.current.getTrimmedCanvas().toDataURL("image/png"),F=`${o}-${Date.now()}.png`;try{const I=await EGe(A,F,a,l,c,u);v(I),P(!0),r&&r({id:o,value:I})}catch(I){console.error("Signature upload failed",I)}finally{g(!1)}};return w.jsxs(ht.Box,{sx:{width:"100%",...i.sx},children:[w.jsxs(ht.Typography,{variant:"subtitle2",gutterBottom:!0,sx:{display:"flex"},children:[s,k&&w.jsx(ht.Box,{component:"span",sx:{color:"error.main",ml:.5},children:"*"})]}),w.jsx(ht.Box,{ref:h,sx:{border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",bgcolor:"background.paper"},children:w.jsx(CC,{ref:p,penColor:"black",canvasProps:{className:"sigCanvas",width:C,height:M,style:{display:"block",pointerEvents:d?"none":"auto",...f?.style,width:"100%",height:M}},backgroundColor:"transparent"})}),w.jsxs(ht.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1,alignItems:"center",mt:1},children:[w.jsx(ht.Button,{variant:"outlined",color:"secondary",onClick:_,size:"small",disabled:d||b,children:"Clear"}),w.jsx(ht.Button,{variant:"contained",color:"primary",onClick:D,size:"small",disabled:d||b||y!==null,startIcon:b?w.jsx(ht.CircularProgress,{size:16,color:"inherit"}):null,children:y?"Saved":"Save"}),T&&y&&w.jsx(ht.Typography,{variant:"caption",color:"success.main",children:"Signature Saved!"})]})]})}function kGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},label:i="Group",subFields:s=[]}=e,a=Ue.useMemo(()=>SC(),[]);return w.jsxs(ht.Paper,{elevation:1,sx:{p:2,mb:2,...o.sx},...o,children:[w.jsx(ht.Typography,{variant:"subtitle1",gutterBottom:!0,sx:{fontWeight:600},children:i}),w.jsx(ht.Box,{children:w.jsx(pp,{guid:a,data:s,patch:t,onChange:r})})]})}function RGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},label:i="Accordion",subFields:s=[]}=e,a=Ue.useMemo(()=>SC(),[]);return w.jsxs(ht.Accordion,{...o,children:[w.jsx(ht.AccordionSummary,{expandIcon:w.jsx(ht.Icon,{children:"expand_more"}),children:w.jsx(ht.Typography,{children:i})}),w.jsx(ht.AccordionDetails,{children:w.jsx(pp,{guid:a,data:s,patch:t,onChange:r})})]})}function MGe(e){const{children:t,value:r,index:o,...i}=e;return w.jsx("div",{role:"tabpanel",hidden:r!==o,id:`simple-tabpanel-${o}`,"aria-labelledby":`simple-tab-${o}`,...i,children:r===o&&w.jsx(ht.Box,{sx:{p:3},children:t})})}function AGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},tabs:i=[]}=e,[s,a]=Ue.useState(0),l=Ue.useMemo(()=>i.map(()=>SC()),[i.length]),c=(u,d)=>{a(d)};return w.jsxs(ht.Box,{sx:{width:"100%"},children:[w.jsx(ht.Box,{sx:{borderBottom:1,borderColor:"divider"},children:w.jsx(ht.Tabs,{value:s,onChange:c,...o,children:i.map((u,d)=>w.jsx(ht.Tab,{label:u.label},d))})}),i.map((u,d)=>w.jsx(MGe,{value:s,index:d,children:w.jsx(pp,{guid:l[d],data:u.subFields||[],patch:t,onChange:r})},d))]})}function DGe({attributes:e={},rules:t={},onChange:r}){const{MuiAttributes:o={},id:i="",options:s=[],label:a="Combo Box"}=e,[l,c]=Ue.useState(e.value||null),[u,d]=Ue.useState(!1),[f,p]=Ue.useState("");Ue.useEffect(()=>{e.value&&c(e.value)},[]),oa(()=>{c(e.value)},[e.value]);const h=v=>{let C=!0,O="";if(t?.validation){for(const T of t.validation)if(T.rule==="mandatory"&&!v){C=!1,O=T.message||"Required";break}}return{isValid:C,message:O}},b=(v,C)=>{c(C);const O=h(C);d(!O.isValid),p(O.message),r&&r({id:i,value:C})},g=()=>{const v=h(l);d(!v.isValid),p(v.message)},y=t?.validation?.some(v=>v.rule==="mandatory")||!1;return w.jsx(hS,{disablePortal:!0,id:i,options:s,value:l,onChange:b,fullWidth:!0,renderInput:v=>w.jsx(dl,{...v,label:a,required:y,error:u,helperText:f,onBlur:g}),...o})}function _Ge(e){return Je("MuiImageList",e)}Ze("MuiImageList",["root","masonry","quilted","standard","woven"]);const oA=S.createContext({});process.env.NODE_ENV!=="production"&&(oA.displayName="ImageListContext");const NGe=e=>{const{classes:t,variant:r}=e;return Ie({root:["root",r]},_Ge,t)},FGe=ie("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),aY=S.forwardRef(function(t,r){const o=Dt({props:t,name:"MuiImageList"}),{children:i,className:s,cols:a=2,component:l="ul",rowHeight:c="auto",gap:u=4,style:d,variant:f="standard",...p}=o,h=S.useMemo(()=>({rowHeight:c,gap:u,variant:f}),[c,u,f]),b=f==="masonry"?{columnCount:a,columnGap:u,...d}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:u,...d},g={...o,component:l,gap:u,rowHeight:c,variant:f},y=NGe(g);return w.jsx(FGe,{as:l,className:Te(y.root,y[f],s),ref:r,style:b,ownerState:g,...p,children:w.jsx(oA.Provider,{value:h,children:i})})});process.env.NODE_ENV!=="production"&&(aY.propTypes={children:n.node.isRequired,classes:n.object,className:n.string,cols:el,component:n.elementType,gap:n.number,rowHeight:n.oneOfType([n.oneOf(["auto"]),n.number]),style:n.object,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object]),variant:n.oneOfType([n.oneOf(["masonry","quilted","standard","woven"]),n.string])});function LGe(e){return Je("MuiImageListItem",e)}const O1=Ze("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),$Ge=e=>{const{classes:t,variant:r}=e;return Ie({root:["root",r],img:["img"]},LGe,t)},jGe=ie("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${O1.img}`]:t.img},t.root,t[r.variant]]}})({display:"block",position:"relative",[`& .${O1.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${O1.img}`]:{height:"auto",flexGrow:1}}}]}),lY=S.forwardRef(function(t,r){const o=Dt({props:t,name:"MuiImageListItem"}),{children:i,className:s,cols:a=1,component:l="li",rows:c=1,style:u,...d}=o,{rowHeight:f="auto",gap:p,variant:h}=S.useContext(oA);let b="auto";h==="woven"?b=void 0:f!=="auto"&&(b=f*c+p*(c-1));const g={...o,cols:a,component:l,gap:p,rowHeight:f,rows:c,variant:h},y=$Ge(g);return w.jsx(jGe,{as:l,className:Te(y.root,y[h],s),ref:r,style:{height:b,gridColumnEnd:h!=="masonry"?`span ${a}`:void 0,gridRowEnd:h!=="masonry"?`span ${c}`:void 0,marginBottom:h==="masonry"?p:void 0,breakInside:h==="masonry"?"avoid":void 0,...u},ownerState:g,...d,children:S.Children.map(i,v=>S.isValidElement(v)?(process.env.NODE_ENV!=="production"&&Tm.isFragment(v)&&console.error(["MUI: The ImageListItem component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
465
- `)),v.type==="img"||nf(v,["Image"])?S.cloneElement(v,{className:Te(y.img,v.props.className)}):v):null)})});process.env.NODE_ENV!=="production"&&(lY.propTypes={children:n.node,classes:n.object,className:n.string,cols:el,component:n.elementType,rows:el,style:n.object,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object])});function BGe({attributes:e={}}){const{MuiAttributes:t={},items:r=[],width:o=500,height:i=450,cols:s=3,rowHeight:a=164}=e;return w.jsx(aY,{sx:{width:o,height:i},cols:s,rowHeight:a,...t,children:r.map(l=>w.jsx(lY,{children:w.jsx("img",{srcSet:`${l.img}?w=${a}&h=${a}&fit=crop&auto=format&dpr=2 2x`,src:`${l.img}?w=${a}&h=${a}&fit=crop&auto=format`,alt:l.title,loading:"lazy"})},l.img))})}function VGe({attributes:e={},rules:t={}}){const{label:r="",value:o="",MuiAttributes:i={},url:s="",target:a="_blank",displayText:l=""}=e,c=t?.validation?.some(f=>f.rule==="mandatory")||!1,u=s||o||"#",d=l||r||u;return w.jsxs(ht.Box,{sx:{width:"100%"},...i.container,children:[r&&l&&w.jsxs(ht.Typography,{variant:"subtitle2",gutterBottom:!0,sx:{display:"flex"},...i.displayText,children:[r,c&&w.jsx(ht.Box,{component:"span",sx:{color:"error.main",ml:.5},children:"*"})]}),w.jsx(ht.Link,{href:u,target:a,rel:a==="_blank"?"noopener noreferrer":void 0,...i.link,children:d})]})}function HGe({attributes:e={},rules:t={},onChange:r}){const{id:o="",MuiAttributes:i={},InputProps:s={},format:a="",buttonText:l="Update Location",buttonIcon:c="location_on",buttonDisplay:u="both",MuiButtonAttributes:d={},disabled:f=!1}=e,[p,h]=Ue.useState({value:e.value!==void 0?e.value:"",helperText:i.helperText||"",error:!1});Ue.useEffect(()=>{e.value!==void 0&&e.value!==p.value&&h(I=>({...I,value:e.value}))},[e.value]);const b=I=>a?yE(I).format(a):I,g=I=>{const{validation:N}=t;if(N)for(let j=0;j<N.length;j+=1){const H=N[j];if(!Uh[H.rule](I,H.value))return{isValid:!1,message:H.message}}return{isValid:!0,message:""}},y=I=>{const{value:N}=I.target,j=g(N);h({value:N,helperText:j.message,error:!j.isValid})},v=I=>{const{value:N}=I.target,j=b(N),H=g(j);h({value:j,helperText:H.message,error:!H.isValid}),typeof r=="function"&&r({id:o,value:j})},C=()=>{r&&r({id:o,value:p.value,option:"location_update_request"})},O=()=>{const I=u,N=w.jsx(ht.Icon,{children:c});switch(I){case"icon":return N;case"text":return w.jsx(w.Fragment,{children:l});default:return w.jsxs(w.Fragment,{children:[N,w.jsx(uf,{component:"span",sx:{ml:.5},children:l})]})}},T=t?.validation?.some(I=>I.rule==="mandatory")||!1,P=!!i?.slotProps,k={...i};let M,_;if(P){const I=i.slotProps&&i.slotProps.input||{};_={...i.slotProps||{},input:{...I}},delete k.slotProps}else M={...i.inputProps||{}},delete k.inputProps;const D=i.variant||"outlined",A=i.size||"medium",F=A==="small"?D==="outlined"?40:48:56;return w.jsxs(uf,{sx:{display:"flex",gap:1,alignItems:"flex-start",width:"100%"},children:[w.jsx(uf,{sx:{flex:1,minWidth:0},children:w.jsx(dl,{fullWidth:!0,...k,required:T,inputProps:P?void 0:M,slotProps:P?_:void 0,InputProps:PI(s),onChange:y,onBlur:v,value:p.value,error:p.error,helperText:p.helperText,disabled:f})}),w.jsx(xs,{variant:"outlined",color:"primary",size:A==="small"?"small":"medium",onClick:C,disabled:f,...d,sx:{whiteSpace:"nowrap",minWidth:"auto",height:F,flexShrink:0,...d?.sx},children:O()})]})}const iA={Typography:Pie,TextField:lye,Table:Qke,DateTime:ORe,DateTimePicker:PRe,TimePicker:ERe,Select:ARe,CheckBox:DRe,Switch:NRe,Radio:tMe,Stepper:iMe,Bar:EBe,Line:lVe,Pie:RVe,MixChart:MVe,Divider:AVe,Chip:DVe,List:_Ve,NumberField:sHe,MultiTextbox:aHe,LineItemList:cHe,FormRepeater:mHe,Signature:IGe,Group:kGe,Accordion:RGe,Tabs:AGe,AutoComplete:DGe,ImgList:BGe,Hyperlink:VGe,LocationField:HGe};function cY(e){const{map:t}=e;if(!t)return w.jsx("div",{});const r=iA[t];return r?w.jsx(r,{...e}):w.jsx("div",{})}const zGe={MUI:{map:uE}},Si={},uY=e=>e?Si[e]:Si,qGe=e=>{const t=Object.keys(Si);e?delete Si[e]:t.forEach(r=>delete Si[r])},UGe=e=>e?.filter(t=>t?.rules?.validation?.some(r=>r.rule==="mandatory")),GGe=(e,t)=>UGe(e)?.reduce((o,i)=>(i?.rules?.validation?.forEach(s=>{const a=i?.id||i?.props?.id;if(!a)return;const l=Si[t]?.[a]?.toString();l&&Uh[s.rule](l,s.value)||o.push({...s,id:i.id})}),o),[]),WGe={};function pp({data:e=[],patch:t=WGe,guid:r,formRef:o,onSubmit:i,onChange:s,onStepChange:a,MuiGridAttributes:l={spacing:2},activeStep:c=0,onFieldClick:u,onFieldDoubleClick:d,onFieldContextMenu:f}){const[p,h]=Ue.useState(t),[b,g]=Ue.useState(0),y=zGe.MUI,v=Ue.useMemo(()=>Ege(P5(e,p,r,Si)),[p,e,r]);Ue.useEffect(()=>{P1(Si[r])&&(Si[r]=t)},[]),oa(()=>{h({...t})},[t]);const C=Ue.useCallback(({id:k,value:M,option:_})=>{Si[r]||(Si[r]={}),Si[r][k]=M,g(D=>D+1),typeof s=="function"&&s({id:k,value:M,option:_})},[r,s]),O=Ue.useCallback((k,M,_)=>{if(typeof k=="function"){const D=GGe(M,_);k(Si,D,M,_)}},[]),T=(k,M,_)=>{typeof a=="function"&&a(k,M,_)},P=(k,M)=>{const{type:_="",style:D={},className:A="",visible:F=!1,rules:I={},subforms:N=[]}=k,j=k.props||{},H=k.layout||{},$=k?.id||j?.id,B=y.map[_]||{},{options:q={}}=B,U=$?Si[r]?.[$]:void 0,V=N.find(L=>Array.isArray(U)?U.includes(L.conditionValue):L.conditionValue===U);return w.jsxs(ht.Grid,{style:{...D,cursor:u?"pointer":"default",position:"relative",transition:"background-color 0.2s, box-shadow 0.2s",borderRadius:4},...H,className:`${A} ${F?"show":"hidden"}`,onClick:L=>{},onDoubleClick:L=>{d&&(L.stopPropagation(),d(k))},onContextMenu:L=>{f&&(L.preventDefault(),L.stopPropagation(),f(L,k))},children:[w.jsx(cY,{map:B.map,option:q.type||"",control:k,attributes:j,rules:I,onChange:C,onStepUpdate:T,currentStep:c,patch:t},`dynamic-comp-${$||M}`),V&&V.data&&w.jsx(ht.Box,{sx:{mt:2,pl:2,borderLeft:"2px solid",borderColor:"divider",width:"100%"},children:w.jsx(pp,{guid:`${r}-subform-${$}`,data:V.data,patch:t,onChange:C,MuiGridAttributes:{spacing:1}})})]},$||`layout-comp-${M}`)};return w.jsxs(w.Fragment,{children:[w.jsx(ht.Grid,{container:!0,...l,children:v.wrows.map((k,M)=>w.jsx(Ue.Fragment,{children:k.map(P)},`row-${M}`))},`layout-grid-${r}`),v.worows.length>0&&w.jsx(ht.Grid,{container:!0,...l,children:v.worows.map((k,M)=>P(k,M))},`layout-grid-worows-${r}`),w.jsx("button",{"aria-label":"button",type:"button",ref:o||null,onClick:()=>O(i,e,r),style:{display:"none"}})]})}exports.AwsSdkSigV4Signer=vM;exports.ClearFormData=qGe;exports.Client=m7;exports.Command=IC;exports.Controls=iA;exports.DEFAULT_MAX_ATTEMPTS=mm;exports.DEFAULT_RETRY_MODE=rK;exports.DEFAULT_USE_DUALSTACK_ENDPOINT=K7;exports.DEFAULT_USE_FIPS_ENDPOINT=Y7;exports.DefaultIdentityProviderConfig=r7;exports.DynamicComponent=cY;exports.EndpointCache=_7;exports.FetchHttpHandler=wC;exports.FormData=uY;exports.FormGenerator=pp;exports.HttpProtocol=t7;exports.HttpRequest=Br;exports.LazyJsonString=Qa;exports.NoOpLogger=kC;exports.NormalizedSchema=or;exports.NumericValue=fg;exports.ProtocolLib=x7;exports.SerdeContextConfig=RC;exports.ServiceException=Qc;exports.Sha256=JK;exports.TypeRegistry=ti;exports.UnionSerde=S7;exports.calculateBodyLength=h7;exports.collectBody=fh;exports.createDefaultUserAgentProvider=eY;exports.customEndpointFunctions=fm;exports.dateToUtcString=i0;exports.deref=Xv;exports.determineTimestampFormat=EC;exports.fromBase64=Tu;exports.fromUtf8=cl;exports.getAwsRegionExtensionConfiguration=oY;exports.getContentLengthPlugin=Q7;exports.getDefaultExtensionConfiguration=b7;exports.getEndpointPlugin=DM;exports.getHostHeaderPlugin=k7;exports.getHttpAuthSchemeEndpointRuleSetPlugin=HW;exports.getHttpHandlerExtensionConfiguration=jW;exports.getHttpSigningPlugin=qW;exports.getLoggerPlugin=R7;exports.getRecursionDetectionPlugin=M7;exports.getRetryPlugin=lK;exports.getSchemaSerdePlugin=ZW;exports.getSmithyContext=gl;exports.getUserAgentPlugin=W7;exports.invalidProvider=nY;exports.isIpAddress=MM;exports.isValidHostLabel=pg;exports.loadConfigsForDefaultMode=g7;exports.mui=uE;exports.normalizeProvider=Rs;exports.parseEpochTimestamp=Mze;exports.parseRfc3339DateTimeWithOffset=Pze;exports.parseRfc7231DateTime=Rze;exports.parseUrl=hm;exports.resolveAwsRegionExtensionConfiguration=iY;exports.resolveAwsSdkSigV4Config=p7;exports.resolveDefaultRuntimeConfig=y7;exports.resolveDefaultsModeConfig=rY;exports.resolveEndpoint=q7;exports.resolveEndpointConfig=nK;exports.resolveHostHeaderConfig=x3e;exports.resolveHttpHandlerRuntimeConfig=BW;exports.resolveRegionConfig=X7;exports.resolveRetryConfig=aK;exports.resolveUserAgentConfig=D7;exports.streamCollector=xM;exports.toBase64=oc;exports.toUtf8=zu;exports.v4=OC;
464
+ `+i)});const r=await this.createSessionFn(t);if(!r.Credentials?.AccessKeyId||!r.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:r.Credentials.AccessKeyId,secretAccessKey:r.Credentials.SecretAccessKey,sessionToken:r.Credentials.SessionToken,expiration:r.Credentials.Expiration?new Date(r.Credentials.Expiration):void 0}}}const L3e="Directory",$3e="S3Express",j3e="sigv4-s3express",nE="X-Amz-S3session-Token",rE=nE.toLowerCase();class B3e extends UP{async signWithCredentials(t,r,o){const i=rH(r);t.headers[rE]=r.sessionToken;const s=this;return oH(s,i),s.signRequest(t,o??{})}async presignWithCredentials(t,r,o){const i=rH(r);return delete t.headers[rE],t.headers[nE]=r.sessionToken,t.query=t.query??{},t.query[nE]=r.sessionToken,oH(this,i),this.presign(t,o)}}function rH(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function oH(e,t){const r=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),o=e.credentialProvider,i=()=>(clearTimeout(r),e.credentialProvider=o,Promise.resolve(t));e.credentialProvider=i}const V3e=e=>(t,r)=>async o=>{if(r.endpointV2){const i=r.endpointV2,s=i.properties?.authSchemes?.[0]?.name===j3e;if((i.properties?.backend===$3e||i.properties?.bucketType===L3e)&&(Gr(r,"S3_EXPRESS_BUCKET","J"),r.isS3ExpressBucket=!0),s){const l=o.input.Bucket;if(l){const c=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:l});r.s3ExpressIdentity=c,Br.isInstance(o.request)&&c.sessionToken&&(o.request.headers[rE]=c.sessionToken)}}}return t(o)},H3e={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},z3e=e=>({applyToStack:t=>{t.add(V3e(e),H3e)}}),q3e=async(e,t,r,o)=>{const i=await o.signWithCredentials(r,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},U3e=e=>t=>{throw t},G3e=(e,t)=>{},W3e=e=>(t,r)=>async o=>{if(!Br.isInstance(o.request))return t(o);const s=gl(r).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:l,signer:c}=s;let u;r.s3ExpressIdentity?u=await q3e(r.s3ExpressIdentity,a,o.request,await e.signer()):u=await c.sign(o.request,l,a);const d=await t({...o,request:u}).catch((c.errorHandler||U3e)(a));return(c.successHandler||G3e)(d.response,a),d},K3e=e=>({applyToStack:t=>{t.addRelativeTo(W3e(e),zW)}}),Y3e=(e,{session:t})=>{const[r,o]=t,{forcePathStyle:i,useAccelerateEndpoint:s,disableMultiregionAccessPoints:a,followRegionRedirects:l,s3ExpressIdentityProvider:c,bucketEndpoint:u,expectContinueHeader:d}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:s??!1,disableMultiregionAccessPoints:a??!1,followRegionRedirects:l??!1,s3ExpressIdentityProvider:c??new RM(async f=>r().send(new o({Bucket:f}))),bucketEndpoint:u??!1,expectContinueHeader:d??2097152})},Z3e={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},X3e=3e3,Q3e=e=>(t,r)=>async o=>{const i=await t(o),{response:s}=i;if(!wu.isInstance(s))return i;const{statusCode:a,body:l}=s;if(a<200||a>=300||!(typeof l?.stream=="function"||typeof l?.pipe=="function"||typeof l?.tee=="function"))return i;let u=l,d=l;l&&typeof l=="object"&&!(l instanceof Uint8Array)&&([u,d]=await cze(l)),s.body=d;const f=await J3e(u,{streamCollector:async h=>nze(h,X3e)});typeof u?.destroy=="function"&&u.destroy();const p=e.utf8Encoder(f.subarray(f.length-16));if(f.length===0&&Z3e[r.commandName]){const h=new Error("S3 aborted request");throw h.name="InternalError",h}return p&&p.endsWith("</Error>")&&(s.statusCode=400),i},J3e=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),e5e={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},A7=e=>({applyToStack:t=>{t.addRelativeTo(Q3e(e),e5e)}}),t5e=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function n5e(e){return(t,r)=>async o=>{if(e.bucketEndpoint){const i=r.endpointV2;if(i){const s=o.input.Bucket;if(typeof s=="string")try{const a=new URL(s);r.endpointV2={...i,url:a}}catch(a){const l=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${s} could not be parsed as URL.`;throw r.logger?.constructor?.name==="NoOpLogger"?console.warn(l):r.logger?.warn?.(l),a}}}return t(o)}}const r5e={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function o5e({bucketEndpoint:e}){return t=>async r=>{const{input:{Bucket:o}}=r;if(!e&&typeof o=="string"&&!t5e(o)&&o.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${o}'`);throw i.name="InvalidBucketName",i}return t({...r})}}const i5e={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},s5e=e=>({applyToStack:t=>{t.add(o5e(e),i5e),t.addRelativeTo(n5e(e),r5e)}}),a5e=void 0;function l5e(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function D7(e){const t=hf(e.userAgentAppId??a5e),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const o=await t();if(!l5e(o)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof o!="string"?i?.warn("userAgentAppId must be a string or undefined."):o.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return o}})}class _7{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const o=this.hash(t);if(o===!1)return r();if(!this.data.has(o)){if(this.data.size>this.capacity+10){const i=this.data.keys();let s=0;for(;;){const{value:a,done:l}=i.next();if(this.data.delete(a),l||++s>10)break}}this.data.set(o,r())}return this.data.get(o)}size(){return this.data.size}hash(t){let r="";const{parameters:o}=this;if(o.length===0)return!1;for(const i of o){const s=String(t[i]??"");if(s.includes("|;"))return!1;r+=s+"|;"}return r}}const c5e=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}$"),MM=e=>c5e.test(e)||e.startsWith("[")&&e.endsWith("]"),u5e=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),pg=(e,t=!1)=>{if(!t)return u5e.test(e);const r=e.split(".");for(const o of r)if(!pg(o))return!1;return!0},fm={},pm="endpoints";function sc(e){return typeof e!="object"||e==null?e:"ref"in e?`$${sc(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(sc).join(", ")})`:JSON.stringify(e,null,2)}class Xi extends Error{constructor(t){super(t),this.name="EndpointError"}}const d5e=(e,t)=>e===t,f5e=e=>{const t=e.split("."),r=[];for(const o of t){const i=o.indexOf("[");if(i!==-1){if(o.indexOf("]")!==o.length-1)throw new Xi(`Path: '${e}' does not end with ']'`);const s=o.slice(i+1,-1);if(Number.isNaN(parseInt(s)))throw new Xi(`Invalid array index: '${s}' in path: '${e}'`);i!==0&&r.push(o.slice(0,i)),r.push(s)}else r.push(o)}return r},N7=(e,t)=>f5e(t).reduce((r,o)=>{if(typeof r!="object")throw new Xi(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(o)]:r[o]},e),p5e=e=>e!=null,h5e=e=>!e,QO={[cm.HTTP]:80,[cm.HTTPS]:443},m5e=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:p,port:h,protocol:b="",path:g="",query:y={}}=e,v=new URL(`${b}//${p}${h?`:${h}`:""}${g}`);return v.search=Object.entries(y).map(([C,O])=>`${C}=${O}`).join("&"),v}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:o,hostname:i,pathname:s,protocol:a,search:l}=t;if(l)return null;const c=a.slice(0,-1);if(!Object.values(cm).includes(c))return null;const u=MM(i),d=r.includes(`${o}:${QO[c]}`)||typeof e=="string"&&e.includes(`${o}:${QO[c]}`),f=`${o}${d?`:${QO[c]}`:""}`;return{scheme:c,authority:f,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},g5e=(e,t)=>e===t,b5e=(e,t,r,o)=>t>=r||e.length<r?null:o?e.substring(e.length-r,e.length-t):e.substring(t,r),y5e=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),v5e={booleanEquals:d5e,getAttr:N7,isSet:p5e,isValidHostLabel:pg,not:h5e,parseURL:m5e,stringEquals:g5e,substring:b5e,uriEncode:y5e},F7=(e,t)=>{const r=[],o={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const s=e.indexOf("{",i);if(s===-1){r.push(e.slice(i));break}r.push(e.slice(i,s));const a=e.indexOf("}",s);if(a===-1){r.push(e.slice(s));break}e[s+1]==="{"&&e[a+1]==="}"&&(r.push(e.slice(s+1,a)),i=a+2);const l=e.substring(s+1,a);if(l.includes("#")){const[c,u]=l.split("#");r.push(N7(o[c],u))}else r.push(o[l]);i=a+1}return r.join("")},x5e=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],MC=(e,t,r)=>{if(typeof e=="string")return F7(e,r);if(e.fn)return $7.callFunction(e,r);if(e.ref)return x5e(e,r);throw new Xi(`'${t}': ${String(e)} is not a string, function or reference.`)},L7=({fn:e,argv:t},r)=>{const o=t.map(s=>["boolean","number"].includes(typeof s)?s:$7.evaluateExpression(s,"arg",r)),i=e.split(".");return i[0]in fm&&i[1]!=null?fm[i[0]][i[1]](...o):v5e[e](...o)},$7={evaluateExpression:MC,callFunction:L7},S5e=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new Xi(`'${e}' is already defined in Reference Record.`);const o=L7(t,r);return r.logger?.debug?.(`${pm} evaluateCondition: ${sc(t)} = ${sc(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}},AM=(e=[],t)=>{const r={};for(const o of e){const{result:i,toAssign:s}=S5e(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!i)return{result:i};s&&(r[s.name]=s.value,t.logger?.debug?.(`${pm} assign: ${s.name} := ${sc(s.value)}`))}return{result:!0,referenceRecord:r}},C5e=(e,t)=>Object.entries(e).reduce((r,[o,i])=>({...r,[o]:i.map(s=>{const a=MC(s,"Header value entry",t);if(typeof a!="string")throw new Xi(`Header '${o}' value '${a}' is not a string`);return a})}),{}),j7=(e,t)=>Object.entries(e).reduce((r,[o,i])=>({...r,[o]:V7.getEndpointProperty(i,t)}),{}),B7=(e,t)=>{if(Array.isArray(e))return e.map(r=>B7(r,t));switch(typeof e){case"string":return F7(e,t);case"object":if(e===null)throw new Xi(`Unexpected endpoint property: ${e}`);return V7.getEndpointProperties(e,t);case"boolean":return e;default:throw new Xi(`Unexpected endpoint property type: ${typeof e}`)}},V7={getEndpointProperty:B7,getEndpointProperties:j7},w5e=(e,t)=>{const r=MC(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new Xi(`Endpoint URL must be a string, got ${typeof r}`)},T5e=(e,t)=>{const{conditions:r,endpoint:o}=e,{result:i,referenceRecord:s}=AM(r,t);if(!i)return;const a={...t,referenceRecord:{...t.referenceRecord,...s}},{url:l,properties:c,headers:u}=o;return t.logger?.debug?.(`${pm} Resolving endpoint from template: ${sc(o)}`),{...u!=null&&{headers:C5e(u,a)},...c!=null&&{properties:j7(c,a)},url:w5e(l,a)}},O5e=(e,t)=>{const{conditions:r,error:o}=e,{result:i,referenceRecord:s}=AM(r,t);if(i)throw new Xi(MC(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},H7=(e,t)=>{for(const r of e)if(r.type==="endpoint"){const o=T5e(r,t);if(o)return o}else if(r.type==="error")O5e(r,t);else if(r.type==="tree"){const o=z7.evaluateTreeRule(r,t);if(o)return o}else throw new Xi(`Unknown endpoint rule: ${r}`);throw new Xi("Rules evaluation failed")},P5e=(e,t)=>{const{conditions:r,rules:o}=e,{result:i,referenceRecord:s}=AM(r,t);if(i)return z7.evaluateRules(o,{...t,referenceRecord:{...t.referenceRecord,...s}})},z7={evaluateRules:H7,evaluateTreeRule:P5e},q7=(e,t)=>{const{endpointParams:r,logger:o}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${pm} Initial EndpointParams: ${sc(r)}`);const a=Object.entries(i).filter(([,u])=>u.default!=null).map(([u,d])=>[u,d.default]);if(a.length>0)for(const[u,d]of a)r[u]=r[u]??d;const l=Object.entries(i).filter(([,u])=>u.required).map(([u])=>u);for(const u of l)if(r[u]==null)throw new Xi(`Missing required parameter: '${u}'`);const c=H7(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${pm} Resolved endpoint: ${sc(c)}`),c},U7=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!U7(r))return!1;return!0}return!(!pg(e)||e.length<3||e.length>63||e!==e.toLowerCase()||MM(e))},iH=":",E5e="/",I5e=e=>{const t=e.split(iH);if(t.length<6)return null;const[r,o,i,s,a,...l]=t;if(r!=="arn"||o===""||i===""||l.join(iH)==="")return null;const c=l.map(u=>u.split(E5e)).flat();return{partition:o,service:i,region:s,accountId:a,resourceId:c}},k5e=[{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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],R5e={partitions:k5e};let M5e=R5e;const A5e=e=>{const{partitions:t}=M5e;for(const o of t){const{regions:i,outputs:s}=o;for(const[a,l]of Object.entries(i))if(a===e)return{...s,...l}}for(const o of t){const{regionRegex:i,outputs:s}=o;if(new RegExp(i).test(e))return{...s}}const r=t.find(o=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},G7={isVirtualHostableS3Bucket:U7,parseArn:I5e,partition:A5e};fm.aws=G7;function D5e(e){const t={};if(e=e.replace(/^\?/,""),e)for(const r of e.split("&")){let[o,i=null]=r.split("=");o=decodeURIComponent(o),i&&(i=decodeURIComponent(i)),o in t?Array.isArray(t[o])?t[o].push(i):t[o]=[t[o],i]:t[o]=i}return t}const hm=e=>{if(typeof e=="string")return hm(new URL(e));const{hostname:t,pathname:r,port:o,protocol:i,search:s}=e;let a;return s&&(a=D5e(s)),{hostname:t,port:o?parseInt(o):void 0,protocol:i,path:r,query:a}},_5e=/\d{12}\.ddb/;async function N5e(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Gr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const s=await t.retryStrategy();typeof s.acquireInitialRetryToken=="function"?s.constructor?.name?.includes("Adaptive")?Gr(e,"RETRY_MODE_ADAPTIVE","F"):Gr(e,"RETRY_MODE_STANDARD","E"):Gr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const s=e.endpointV2;switch(String(s?.url?.hostname).match(_5e)&&Gr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":Gr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Gr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Gr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const s=i;s.accountId&&Gr(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,l]of Object.entries(s.$source??{}))Gr(e,a,l)}}const sH="user-agent",JO="x-amz-user-agent",aH=" ",e1="/",F5e=/[^!$%&'*+\-.^_`|~\w]/g,L5e=/[^!$%&'*+\-.^_`|~\w#]/g,lH="-",$5e=1024;function j5e(e){let t="";for(const r in e){const o=e[r];if(t.length+o.length+1<=$5e){t.length?t+=","+o:t+=o;continue}break}return t}const B5e=e=>(t,r)=>async o=>{const{request:i}=o;if(!Br.isInstance(i))return t(o);const{headers:s}=i,a=r?.userAgent?.map(Ev)||[],l=(await e.defaultUserAgentProvider()).map(Ev);await N5e(r,e,o);const c=r;l.push(`m/${j5e(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Ev)||[],d=await e.userAgentAppId();d&&l.push(Ev(["app",`${d}`]));const f=[].concat([...l,...a,...u]).join(aH),p=[...l.filter(h=>h.startsWith("aws-sdk-")),...u].join(aH);return e.runtime!=="browser"?(p&&(s[JO]=s[JO]?`${s[sH]} ${p}`:p),s[sH]=f):s[JO]=f,t({...o,request:i})},Ev=e=>{const t=e[0].split(e1).map(a=>a.replace(F5e,lH)).join(e1),r=e[1]?.replace(L5e,lH),o=t.indexOf(e1),i=t.substring(0,o);let s=t.substring(o+1);return i==="api"&&(s=s.toLowerCase()),[i,s,r].filter(a=>a&&a.length>0).reduce((a,l,c)=>{switch(c){case 0:return l;case 1:return`${a}/${l}`;default:return`${a}#${l}`}},"")},V5e={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},W7=e=>({applyToStack:t=>{t.add(B5e(e),V5e)}}),K7=!1,Y7=!1,cH=new Set,H5e=(e,t=pg)=>{if(!cH.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else cH.add(e)},Z7=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),z5e=e=>Z7(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,X7=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const o=typeof t=="function"?await t():t,i=z5e(o);return H5e(i),i},useFipsEndpoint:async()=>{const o=typeof t=="string"?t:await t();return Z7(o)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},q5e=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),uH="content-length";function U5e(e){return t=>async r=>{const o=r.request;if(Br.isInstance(o)){const{body:i,headers:s}=o;if(i&&Object.keys(s).map(a=>a.toLowerCase()).indexOf(uH)===-1)try{const a=e(i);o.headers={...o.headers,[uH]:String(a)}}catch{}}return t({...r,request:o})}}const G5e={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Q7=e=>({applyToStack:t=>{t.add(U5e(e.bodyLengthChecker),G5e)}}),W5e=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Q5e(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!X5e(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},K5e=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Y5e=/(\d+\.){3}\d+/,Z5e=/\.\./,X5e=e=>K5e.test(e)&&!Y5e.test(e)&&!Z5e.test(e),Q5e=e=>{const[t,r,o,,,i]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,a=!!(s&&r&&o&&i);if(s&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},J5e=(e,t,r,o=!1)=>{const i=async()=>{let s;return o?s=r.clientContextParams?.[e]??r[e]??r[t]:s=r[e]??r[t],typeof s=="function"?s():s};return e==="credentialScope"||t==="CredentialScope"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.credentialScope??s?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.accountId??s?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const s=await i();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:a,hostname:l,port:c,path:u}=s;return`${a}//${l}${c?":"+c:""}${u}`}}return s}:i},J7=async e=>{},eK=e=>typeof e=="object"?"url"in e?hm(e.url):e:hm(e),e4e=async(e,t,r,o)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await J7(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(eK(a)),r.isCustomEndpoint=!0)}const i=await tK(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(i,o)},tK=async(e,t,r)=>{const o={},i=t?.getEndpointParameterInstructions?.()||{};for(const[s,a]of Object.entries(i))switch(a.type){case"staticContextParams":o[s]=a.value;break;case"contextParams":o[s]=e[a.name];break;case"clientContextParams":case"builtInParams":o[s]=await J5e(a.name,s,r,a.type!=="builtInParams")();break;case"operationContextParams":o[s]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(o,r),String(r.serviceId).toLowerCase()==="s3"&&await W5e(o),o},t4e=({config:e,instructions:t})=>(r,o)=>async i=>{e.isCustomEndpoint&&eqe(o,"ENDPOINT_OVERRIDE","N");const s=await e4e(i.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;const a=o.authSchemes?.[0];if(a){o.signing_region=a.signingRegion,o.signing_service=a.signingName;const c=gl(o)?.selectedHttpAuthScheme?.httpAuthOption;c&&(c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},n4e={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:VHe.name},DM=(e,t)=>({applyToStack:r=>{r.addRelativeTo(t4e({config:e,instructions:t}),n4e)}}),nK=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:i}=e,s=r!=null?async()=>eK(await Rs(r)()):void 0,l=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:Rs(o??!1),useFipsEndpoint:Rs(i??!1)});let c;return l.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=J7(e.serviceId)),c),l};var Vf;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Vf||(Vf={}));const mm=3,rK=Vf.STANDARD,r4e=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],o4e=["TimeoutError","RequestTimeout","RequestTimeoutException"],i4e=[500,502,503,504],s4e=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],a4e=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],l4e=e=>e?.$retryable!==void 0,c4e=e=>e.$metadata?.clockSkewCorrected,u4e=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},oK=e=>e.$metadata?.httpStatusCode===429||r4e.includes(e.name)||e.$retryable?.throttling==!0,_M=(e,t=0)=>l4e(e)||c4e(e)||o4e.includes(e.name)||s4e.includes(e?.code||"")||a4e.includes(e?.code||"")||i4e.includes(e.$metadata?.httpStatusCode||0)||u4e(e)||e.cause!==void 0&&t<=10&&_M(e.cause,t+1),d4e=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!_M(e)}return!1};class NM{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,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(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const r=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(o=>NM.setTimeoutFn(o,r))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const r=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=t}updateClientSendingRate(t){let r;if(this.updateMeasuredRate(),oK(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const o=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(o*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}}const oE=100,iK=20*1e3,f4e=500,dH=500,p4e=5,h4e=10,m4e=1,g4e="amz-sdk-invocation-id",b4e="amz-sdk-request",y4e=()=>{let e=oE;return{computeNextBackoffDelay:o=>Math.floor(Math.min(iK,Math.random()*2**o*e)),setDelayBase:o=>{e=o}}},fH=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(iK,e),getRetryCost:()=>r});class sK{maxAttempts;mode=Vf.STANDARD;capacity=dH;retryBackoffStrategy=y4e();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return fH({retryDelay:oE,retryCount:0})}async refreshRetryTokenForRetry(t,r){const o=await this.getMaxAttempts();if(this.shouldRetry(t,r,o)){const i=r.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?f4e:oE);const s=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),a=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,s):s,l=this.getCapacityCost(i);return this.capacity-=l,fH({retryDelay:a,retryCount:t.getRetryCount()+1,retryCost:l})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(dH,this.capacity+(t.getRetryCost()??m4e))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${mm}`),mm}}shouldRetry(t,r,o){return t.getRetryCount()+1<o&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t==="TRANSIENT"?h4e:p4e}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class v4e{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=Vf.ADAPTIVE;constructor(t,r){this.maxAttemptsProvider=t;const{rateLimiter:o}=r??{};this.rateLimiter=o??new NM,this.standardRetryStrategy=new sK(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const x4e=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),aK=e=>{const{retryStrategy:t,retryMode:r,maxAttempts:o}=e,i=Rs(o??mm);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Rs(r)()===Vf.ADAPTIVE?new v4e(i):new sK(i))})},S4e=e=>e?.body instanceof ReadableStream,C4e=e=>(t,r)=>async o=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(w4e(i)){i=i;let a=await i.acquireInitialRetryToken(r.partition_id),l=new Error,c=0,u=0;const{request:d}=o,f=Br.isInstance(d);for(f&&(d.headers[g4e]=OC());;)try{f&&(d.headers[b4e]=`attempt=${c+1}; max=${s}`);const{response:p,output:h}=await t(o);return i.recordSuccess(a),h.$metadata.attempts=c+1,h.$metadata.totalRetryDelay=u,{response:p,output:h}}catch(p){const h=T4e(p);if(l=x4e(p),f&&S4e(d))throw(r.logger instanceof kC?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),l;try{a=await i.refreshRetryTokenForRetry(a,h)}catch{throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=c+1,l.$metadata.totalRetryDelay=u,l}c=a.getRetryCount();const b=a.getRetryDelay();u+=b,await new Promise(g=>setTimeout(g,b))}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,o)},w4e=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",T4e=e=>{const t={error:e,errorType:O4e(e)},r=E4e(e.$response);return r&&(t.retryAfterHint=r),t},O4e=e=>oK(e)?"THROTTLING":_M(e)?"TRANSIENT":d4e(e)?"SERVER_ERROR":"CLIENT_ERROR",P4e={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},lK=e=>({applyToStack:t=>{t.add(C4e(e),P4e)}}),E4e=e=>{if(!wu.isInstance(e))return;const t=Object.keys(e.headers).find(s=>s.toLowerCase()==="retry-after");if(!t)return;const r=e.headers[t],o=Number(r);return Number.isNaN(o)?new Date(r):new Date(o*1e3)};class cK{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new B3e(t),this.signerOptions=t}async sign(t,r={}){return r.signingRegion==="*"?this.getSigv4aSigner().sign(t,r):this.sigv4Signer.sign(t,r)}async signWithCredentials(t,r,o={}){if(o.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,r,o)}async presign(t,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,r)}async presignWithCredentials(t,r,o={}){if(o.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,r,o)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const FM="required",ue="type",Be="rules",be="conditions",ke="fn",Re="argv",Et="ref",tn="assign",dt="url",ft="properties",Ja="backend",go="authSchemes",Wr="disableDoubleEncoding",Kr="signingName",Eo="signingRegion",pt="headers",LM="signingRegionSet",I4e=6,k4e=!1,ua=!0,qi="isSet",jr="booleanEquals",xt="error",l0="aws.partition",wn="stringEquals",wr="getAttr",Or="name",Qn="substring",pH="bucketSuffix",$M="parseURL",Ye="endpoint",Ve="tree",c0="aws.isVirtualHostableS3Bucket",u0="{url#scheme}://{Bucket}.{url#authority}{url#path}",Ca="not",hH="accessPointSuffix",Jv="{url#scheme}://{url#authority}{url#path}",uK="hardwareType",dK="regionPrefix",mH="bucketAliasSuffix",iE="outpostId",qu="isValidHostLabel",jM="sigv4a",gm="s3-outposts",Hf="s3",fK="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",pK="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",gH="https://{Bucket}.s3.{partitionResult#dnsSuffix}",hK="aws.parseArn",mK="bucketArn",gK="arnType",d0="",BM="s3-object-lambda",bK="accesspoint",VM="accessPointName",bH="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",yH="mrapPartition",vH="outpostType",xH="arnPrefix",yK="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",SH="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",CH="https://s3.{partitionResult#dnsSuffix}",Fd={[FM]:!1,[ue]:"string"},Ld={[FM]:!0,default:!1,[ue]:"boolean"},Xp={[FM]:!1,[ue]:"boolean"},gs={[ke]:jr,[Re]:[{[Et]:"Accelerate"},!0]},rr={[ke]:jr,[Re]:[{[Et]:"UseFIPS"},!0]},Yn={[ke]:jr,[Re]:[{[Et]:"UseDualStack"},!0]},Lr={[ke]:qi,[Re]:[{[Et]:"Endpoint"}]},vK={[ke]:l0,[Re]:[{[Et]:"Region"}],[tn]:"partitionResult"},wH={[ke]:wn,[Re]:[{[ke]:wr,[Re]:[{[Et]:"partitionResult"},Or]},"aws-cn"]},Mh={[ke]:qi,[Re]:[{[Et]:"Bucket"}]},xn={[Et]:"Bucket"},TH={[be]:[gs],[xt]:"S3Express does not support S3 Accelerate.",[ue]:xt},OH={[be]:[Lr,{[ke]:$M,[Re]:[{[Et]:"Endpoint"}],[tn]:"url"}],[Be]:[{[be]:[{[ke]:qi,[Re]:[{[Et]:"DisableS3ExpressSessionAuth"}]},{[ke]:jr,[Re]:[{[Et]:"DisableS3ExpressSessionAuth"},!0]}],[Be]:[{[be]:[{[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Et]:"url"},"isIp"]},!0]}],[Be]:[{[be]:[{[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"}],[Be]:[{[Ye]:{[dt]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:c0,[Re]:[xn,!1]}],[Be]:[{[Ye]:{[dt]:u0,[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],[ue]:Ve},{[xt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:xt}],[ue]:Ve},{[be]:[{[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Et]:"url"},"isIp"]},!0]}],[Be]:[{[be]:[{[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"}],[Be]:[{[Ye]:{[dt]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:c0,[Re]:[xn,!1]}],[Be]:[{[Ye]:{[dt]:u0,[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],[ue]:Ve},{[xt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:xt}],[ue]:Ve},Xo={[ke]:$M,[Re]:[{[Et]:"Endpoint"}],[tn]:"url"},t1={[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Et]:"url"},"isIp"]},!0]},xK={[Et]:"url"},SK={[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"},ji={[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},qt={},CK={[ke]:c0,[Re]:[xn,!1]},PH={[xt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:xt},EH={[ke]:qi,[Re]:[{[Et]:"UseS3ExpressControlEndpoint"}]},IH={[ke]:jr,[Re]:[{[Et]:"UseS3ExpressControlEndpoint"},!0]},Qt={[ke]:Ca,[Re]:[Lr]},hn={[ke]:jr,[Re]:[{[Et]:"UseDualStack"},!1]},an={[ke]:jr,[Re]:[{[Et]:"UseFIPS"},!1]},Iv={[xt]:"Unrecognized S3Express bucket name format.",[ue]:xt},kH={[ke]:Ca,[Re]:[Mh]},RH={[Et]:uK},MH={[be]:[Qt],[xt]:"Expected a endpoint to be specified but no endpoint was found",[ue]:xt},kv={[go]:[{[Wr]:!0,[Or]:jM,[Kr]:gm,[LM]:["*"]},{[Wr]:!0,[Or]:"sigv4",[Kr]:gm,[Eo]:"{Region}"}]},n1={[ke]:jr,[Re]:[{[Et]:"ForcePathStyle"},!1]},R4e={[Et]:"ForcePathStyle"},Ur={[ke]:jr,[Re]:[{[Et]:"Accelerate"},!1]},to={[ke]:wn,[Re]:[{[Et]:"Region"},"aws-global"]},fo={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Hf,[Eo]:"us-east-1"}]},bn={[ke]:Ca,[Re]:[to]},po={[ke]:jr,[Re]:[{[Et]:"UseGlobalEndpoint"},!0]},AH={[dt]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Hf,[Eo]:"{Region}"}]},[pt]:{}},Yr={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Hf,[Eo]:"{Region}"}]},ho={[ke]:jr,[Re]:[{[Et]:"UseGlobalEndpoint"},!1]},DH={[dt]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},_H={[dt]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},NH={[dt]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},r1={[ke]:jr,[Re]:[{[ke]:wr,[Re]:[xK,"isIp"]},!1]},o1={[dt]:fK,[ft]:Yr,[pt]:{}},sE={[dt]:u0,[ft]:Yr,[pt]:{}},FH={[Ye]:sE,[ue]:Ye},i1={[dt]:pK,[ft]:Yr,[pt]:{}},LH={[dt]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},Rv={[xt]:"Invalid region: region was not a valid DNS name.",[ue]:xt},Ti={[Et]:mK},wK={[Et]:gK},s1={[ke]:wr,[Re]:[Ti,"service"]},HM={[Et]:VM},$H={[be]:[Yn],[xt]:"S3 Object Lambda does not support Dual-stack",[ue]:xt},jH={[be]:[gs],[xt]:"S3 Object Lambda does not support S3 Accelerate",[ue]:xt},BH={[be]:[{[ke]:qi,[Re]:[{[Et]:"DisableAccessPoints"}]},{[ke]:jr,[Re]:[{[Et]:"DisableAccessPoints"},!0]}],[xt]:"Access points are not supported for this operation",[ue]:xt},a1={[be]:[{[ke]:qi,[Re]:[{[Et]:"UseArnRegion"}]},{[ke]:jr,[Re]:[{[Et]:"UseArnRegion"},!1]},{[ke]:Ca,[Re]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},"{Region}"]}]}],[xt]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[ue]:xt},TK={[ke]:wr,[Re]:[{[Et]:"bucketPartition"},Or]},OK={[ke]:wr,[Re]:[Ti,"accountId"]},l1={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:BM,[Eo]:"{bucketArn#region}"}]},VH={[xt]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[ue]:xt},c1={[xt]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[ue]:xt},u1={[xt]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[ue]:xt},d1={[xt]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[ue]:xt},HH={[xt]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[ue]:xt},zH={[xt]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[ue]:xt},Qp={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Hf,[Eo]:"{bucketArn#region}"}]},qH={[go]:[{[Wr]:!0,[Or]:jM,[Kr]:gm,[LM]:["*"]},{[Wr]:!0,[Or]:"sigv4",[Kr]:gm,[Eo]:"{bucketArn#region}"}]},UH={[ke]:hK,[Re]:[xn]},GH={[dt]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},WH={[dt]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},KH={[dt]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},f1={[dt]:yK,[ft]:Yr,[pt]:{}},YH={[dt]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},ZH={[Et]:"UseObjectLambdaEndpoint"},p1={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:BM,[Eo]:"{Region}"}]},XH={[dt]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},QH={[dt]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},JH={[dt]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},h1={[dt]:Jv,[ft]:Yr,[pt]:{}},ez={[dt]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},m1=[{[Et]:"Region"}],M4e=[{[Et]:"Endpoint"}],A4e=[xn],g1=[gs],$d=[Lr,Xo],tz=[{[ke]:qi,[Re]:[{[Et]:"DisableS3ExpressSessionAuth"}]},{[ke]:jr,[Re]:[{[Et]:"DisableS3ExpressSessionAuth"},!0]}],D4e=[SK],b1=[CK],hs=[vK],y1=[rr,Yn],Ah=[rr,hn],Dh=[an,Yn],_h=[an,hn],nz=[{[ke]:Qn,[Re]:[xn,6,14,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,14,16,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],da=[{[be]:[rr,Yn],[Ye]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ye},{[be]:Ah,[Ye]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ye},{[be]:Dh,[Ye]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ye},{[be]:_h,[Ye]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ye}],rz=[{[ke]:Qn,[Re]:[xn,6,15,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,15,17,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],oz=[{[ke]:Qn,[Re]:[xn,6,19,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,19,21,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],iz=[{[ke]:Qn,[Re]:[xn,6,20,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,20,22,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],sz=[{[ke]:Qn,[Re]:[xn,6,26,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,26,28,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],fa=[{[be]:[rr,Yn],[Ye]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye},{[be]:Ah,[Ye]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye},{[be]:Dh,[Ye]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye},{[be]:_h,[Ye]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ye}],az=[xn,0,7,!0],lz=[{[ke]:Qn,[Re]:[xn,7,15,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,15,17,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],cz=[{[ke]:Qn,[Re]:[xn,7,16,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,16,18,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],uz=[{[ke]:Qn,[Re]:[xn,7,20,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,20,22,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],dz=[{[ke]:Qn,[Re]:[xn,7,21,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,21,23,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],fz=[{[ke]:Qn,[Re]:[xn,7,27,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,27,29,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Et]:"s3expressAvailabilityZoneDelim"},"--"]}],_4e=[Mh],pz=[{[ke]:qu,[Re]:[{[Et]:iE},!1]}],hz=[{[ke]:wn,[Re]:[{[Et]:dK},"beta"]}],N4e=["*"],mz=[{[ke]:qu,[Re]:[{[Et]:"Region"},!1]}],Dl=[{[ke]:wn,[Re]:[{[Et]:"Region"},"us-east-1"]}],v1=[{[ke]:wn,[Re]:[wK,bK]}],gz=[{[ke]:wr,[Re]:[Ti,"resourceId[1]"],[tn]:VM},{[ke]:Ca,[Re]:[{[ke]:wn,[Re]:[HM,d0]}]}],F4e=[Ti,"resourceId[1]"],bz=[Yn],x1=[{[ke]:Ca,[Re]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},d0]}]}],yz=[{[ke]:Ca,[Re]:[{[ke]:qi,[Re]:[{[ke]:wr,[Re]:[Ti,"resourceId[2]"]}]}]}],L4e=[Ti,"resourceId[2]"],S1=[{[ke]:l0,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]}],[tn]:"bucketPartition"}],vz=[{[ke]:wn,[Re]:[TK,{[ke]:wr,[Re]:[{[Et]:"partitionResult"},Or]}]}],C1=[{[ke]:qu,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},!0]}],w1=[{[ke]:qu,[Re]:[OK,!1]}],xz=[{[ke]:qu,[Re]:[HM,!1]}],Mv=[rr],Sz=[{[ke]:qu,[Re]:[{[Et]:"Region"},!0]}],$4e={parameters:{Bucket:Fd,Region:Fd,UseFIPS:Ld,UseDualStack:Ld,Endpoint:Fd,ForcePathStyle:Ld,Accelerate:Ld,UseGlobalEndpoint:Ld,UseObjectLambdaEndpoint:Xp,Key:Fd,Prefix:Fd,CopySource:Fd,DisableAccessPoints:Xp,DisableMultiRegionAccessPoints:Ld,UseArnRegion:Xp,UseS3ExpressControlEndpoint:Xp,DisableS3ExpressSessionAuth:Xp},[Be]:[{[be]:[{[ke]:qi,[Re]:m1}],[Be]:[{[be]:[gs,rr],error:"Accelerate cannot be used with FIPS",[ue]:xt},{[be]:[Yn,Lr],error:"Cannot set dual-stack in combination with a custom endpoint.",[ue]:xt},{[be]:[Lr,rr],error:"A custom endpoint cannot be combined with FIPS",[ue]:xt},{[be]:[Lr,gs],error:"A custom endpoint cannot be combined with S3 Accelerate",[ue]:xt},{[be]:[rr,vK,wH],error:"Partition does not support FIPS",[ue]:xt},{[be]:[Mh,{[ke]:Qn,[Re]:[xn,0,I4e,ua],[tn]:pH},{[ke]:wn,[Re]:[{[Et]:pH},"--x-s3"]}],[Be]:[TH,OH,{[be]:[EH,IH],[Be]:[{[be]:hs,[Be]:[{[be]:[SK,Qt],[Be]:[{[be]:y1,endpoint:{[dt]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:Ah,endpoint:{[dt]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:Dh,endpoint:{[dt]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:_h,endpoint:{[dt]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ye}],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:b1,[Be]:[{[be]:hs,[Be]:[{[be]:tz,[Be]:[{[be]:nz,[Be]:da,[ue]:Ve},{[be]:rz,[Be]:da,[ue]:Ve},{[be]:oz,[Be]:da,[ue]:Ve},{[be]:iz,[Be]:da,[ue]:Ve},{[be]:sz,[Be]:da,[ue]:Ve},Iv],[ue]:Ve},{[be]:nz,[Be]:fa,[ue]:Ve},{[be]:rz,[Be]:fa,[ue]:Ve},{[be]:oz,[Be]:fa,[ue]:Ve},{[be]:iz,[Be]:fa,[ue]:Ve},{[be]:sz,[Be]:fa,[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},PH],[ue]:Ve},{[be]:[Mh,{[ke]:Qn,[Re]:az,[tn]:hH},{[ke]:wn,[Re]:[{[Et]:hH},"--xa-s3"]}],[Be]:[TH,OH,{[be]:b1,[Be]:[{[be]:hs,[Be]:[{[be]:tz,[Be]:[{[be]:lz,[Be]:da,[ue]:Ve},{[be]:cz,[Be]:da,[ue]:Ve},{[be]:uz,[Be]:da,[ue]:Ve},{[be]:dz,[Be]:da,[ue]:Ve},{[be]:fz,[Be]:da,[ue]:Ve},Iv],[ue]:Ve},{[be]:lz,[Be]:fa,[ue]:Ve},{[be]:cz,[Be]:fa,[ue]:Ve},{[be]:uz,[Be]:fa,[ue]:Ve},{[be]:dz,[Be]:fa,[ue]:Ve},{[be]:fz,[Be]:fa,[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},PH],[ue]:Ve},{[be]:[kH,EH,IH],[Be]:[{[be]:hs,[Be]:[{[be]:$d,endpoint:{[dt]:Jv,[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:y1,endpoint:{[dt]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:Ah,endpoint:{[dt]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:Dh,endpoint:{[dt]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ye},{[be]:_h,endpoint:{[dt]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ye}],[ue]:Ve}],[ue]:Ve},{[be]:[Mh,{[ke]:Qn,[Re]:[xn,49,50,ua],[tn]:uK},{[ke]:Qn,[Re]:[xn,8,12,ua],[tn]:dK},{[ke]:Qn,[Re]:az,[tn]:mH},{[ke]:Qn,[Re]:[xn,32,49,ua],[tn]:iE},{[ke]:l0,[Re]:m1,[tn]:"regionPartition"},{[ke]:wn,[Re]:[{[Et]:mH},"--op-s3"]}],[Be]:[{[be]:pz,[Be]:[{[be]:b1,[Be]:[{[be]:[{[ke]:wn,[Re]:[RH,"e"]}],[Be]:[{[be]:hz,[Be]:[MH,{[be]:$d,endpoint:{[dt]:"https://{Bucket}.ec2.{url#authority}",[ft]:kv,[pt]:qt},[ue]:Ye}],[ue]:Ve},{endpoint:{[dt]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[ft]:kv,[pt]:qt},[ue]:Ye}],[ue]:Ve},{[be]:[{[ke]:wn,[Re]:[RH,"o"]}],[Be]:[{[be]:hz,[Be]:[MH,{[be]:$d,endpoint:{[dt]:"https://{Bucket}.op-{outpostId}.{url#authority}",[ft]:kv,[pt]:qt},[ue]:Ye}],[ue]:Ve},{endpoint:{[dt]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[ft]:kv,[pt]:qt},[ue]:Ye}],[ue]:Ve},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[ue]:xt}],[ue]:Ve},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[ue]:xt}],[ue]:Ve},{[be]:_4e,[Be]:[{[be]:[Lr,{[ke]:Ca,[Re]:[{[ke]:qi,[Re]:[{[ke]:$M,[Re]:M4e}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[ue]:xt},{[be]:[n1,CK],[Be]:[{[be]:hs,[Be]:[{[be]:mz,[Be]:[{[be]:[gs,wH],error:"S3 Accelerate cannot be used in this region",[ue]:xt},{[be]:[Yn,rr,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,rr,Ur,Qt,bn,po],[Be]:[{endpoint:AH,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,rr,Ur,Qt,bn,ho],endpoint:AH,[ue]:Ye},{[be]:[hn,rr,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,rr,Ur,Qt,bn,po],[Be]:[{endpoint:DH,[ue]:Ye}],[ue]:Ve},{[be]:[hn,rr,Ur,Qt,bn,ho],endpoint:DH,[ue]:Ye},{[be]:[Yn,an,gs,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,an,gs,Qt,bn,po],[Be]:[{endpoint:_H,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,an,gs,Qt,bn,ho],endpoint:_H,[ue]:Ye},{[be]:[Yn,an,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,an,Ur,Qt,bn,po],[Be]:[{endpoint:NH,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,an,Ur,Qt,bn,ho],endpoint:NH,[ue]:Ye},{[be]:[hn,an,Ur,Lr,Xo,t1,to],endpoint:{[dt]:fK,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,an,Ur,Lr,Xo,r1,to],endpoint:{[dt]:u0,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,an,Ur,Lr,Xo,t1,bn,po],[Be]:[{[be]:Dl,endpoint:o1,[ue]:Ye},{endpoint:o1,[ue]:Ye}],[ue]:Ve},{[be]:[hn,an,Ur,Lr,Xo,r1,bn,po],[Be]:[{[be]:Dl,endpoint:sE,[ue]:Ye},FH],[ue]:Ve},{[be]:[hn,an,Ur,Lr,Xo,t1,bn,ho],endpoint:o1,[ue]:Ye},{[be]:[hn,an,Ur,Lr,Xo,r1,bn,ho],endpoint:sE,[ue]:Ye},{[be]:[hn,an,gs,Qt,to],endpoint:{[dt]:pK,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,an,gs,Qt,bn,po],[Be]:[{[be]:Dl,endpoint:i1,[ue]:Ye},{endpoint:i1,[ue]:Ye}],[ue]:Ve},{[be]:[hn,an,gs,Qt,bn,ho],endpoint:i1,[ue]:Ye},{[be]:[hn,an,Ur,Qt,to],endpoint:{[dt]:gH,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,an,Ur,Qt,bn,po],[Be]:[{[be]:Dl,endpoint:{[dt]:gH,[ft]:Yr,[pt]:qt},[ue]:Ye},{endpoint:LH,[ue]:Ye}],[ue]:Ve},{[be]:[hn,an,Ur,Qt,bn,ho],endpoint:LH,[ue]:Ye}],[ue]:Ve},Rv],[ue]:Ve}],[ue]:Ve},{[be]:[Lr,Xo,{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[xK,"scheme"]},"http"]},{[ke]:c0,[Re]:[xn,ua]},n1,an,hn,Ur],[Be]:[{[be]:hs,[Be]:[{[be]:mz,[Be]:[FH],[ue]:Ve},Rv],[ue]:Ve}],[ue]:Ve},{[be]:[n1,{[ke]:hK,[Re]:A4e,[tn]:mK}],[Be]:[{[be]:[{[ke]:wr,[Re]:[Ti,"resourceId[0]"],[tn]:gK},{[ke]:Ca,[Re]:[{[ke]:wn,[Re]:[wK,d0]}]}],[Be]:[{[be]:[{[ke]:wn,[Re]:[s1,BM]}],[Be]:[{[be]:v1,[Be]:[{[be]:gz,[Be]:[$H,jH,{[be]:x1,[Be]:[BH,{[be]:yz,[Be]:[a1,{[be]:S1,[Be]:[{[be]:hs,[Be]:[{[be]:vz,[Be]:[{[be]:C1,[Be]:[{[be]:[{[ke]:wn,[Re]:[OK,d0]}],error:"Invalid ARN: Missing account id",[ue]:xt},{[be]:w1,[Be]:[{[be]:xz,[Be]:[{[be]:$d,endpoint:{[dt]:bH,[ft]:l1,[pt]:qt},[ue]:Ye},{[be]:Mv,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:l1,[pt]:qt},[ue]:Ye},{endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:l1,[pt]:qt},[ue]:Ye}],[ue]:Ve},VH],[ue]:Ve},c1],[ue]:Ve},u1],[ue]:Ve},d1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},HH],[ue]:Ve},{error:"Invalid ARN: bucket ARN is missing a region",[ue]:xt}],[ue]:Ve},zH],[ue]:Ve},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[ue]:xt}],[ue]:Ve},{[be]:v1,[Be]:[{[be]:gz,[Be]:[{[be]:x1,[Be]:[{[be]:v1,[Be]:[{[be]:x1,[Be]:[BH,{[be]:yz,[Be]:[a1,{[be]:S1,[Be]:[{[be]:hs,[Be]:[{[be]:[{[ke]:wn,[Re]:[TK,"{partitionResult#name}"]}],[Be]:[{[be]:C1,[Be]:[{[be]:[{[ke]:wn,[Re]:[s1,Hf]}],[Be]:[{[be]:w1,[Be]:[{[be]:xz,[Be]:[{[be]:g1,error:"Access Points do not support S3 Accelerate",[ue]:xt},{[be]:y1,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Qp,[pt]:qt},[ue]:Ye},{[be]:Ah,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Qp,[pt]:qt},[ue]:Ye},{[be]:Dh,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Qp,[pt]:qt},[ue]:Ye},{[be]:[an,hn,Lr,Xo],endpoint:{[dt]:bH,[ft]:Qp,[pt]:qt},[ue]:Ye},{[be]:_h,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Qp,[pt]:qt},[ue]:Ye}],[ue]:Ve},VH],[ue]:Ve},c1],[ue]:Ve},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[ue]:xt}],[ue]:Ve},u1],[ue]:Ve},d1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},HH],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:qu,[Re]:[HM,ua]}],[Be]:[{[be]:bz,error:"S3 MRAP does not support dual-stack",[ue]:xt},{[be]:Mv,error:"S3 MRAP does not support FIPS",[ue]:xt},{[be]:g1,error:"S3 MRAP does not support S3 Accelerate",[ue]:xt},{[be]:[{[ke]:jr,[Re]:[{[Et]:"DisableMultiRegionAccessPoints"},ua]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[ue]:xt},{[be]:[{[ke]:l0,[Re]:m1,[tn]:yH}],[Be]:[{[be]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[{[Et]:yH},Or]},{[ke]:wr,[Re]:[Ti,"partition"]}]}],[Be]:[{endpoint:{[dt]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[ft]:{[go]:[{[Wr]:ua,name:jM,[Kr]:Hf,[LM]:N4e}]},[pt]:qt},[ue]:Ye}],[ue]:Ve},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[ue]:xt}],[ue]:Ve}],[ue]:Ve},{error:"Invalid Access Point Name",[ue]:xt}],[ue]:Ve},zH],[ue]:Ve},{[be]:[{[ke]:wn,[Re]:[s1,gm]}],[Be]:[{[be]:bz,error:"S3 Outposts does not support Dual-stack",[ue]:xt},{[be]:Mv,error:"S3 Outposts does not support FIPS",[ue]:xt},{[be]:g1,error:"S3 Outposts does not support S3 Accelerate",[ue]:xt},{[be]:[{[ke]:qi,[Re]:[{[ke]:wr,[Re]:[Ti,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[ue]:xt},{[be]:[{[ke]:wr,[Re]:F4e,[tn]:iE}],[Be]:[{[be]:pz,[Be]:[a1,{[be]:S1,[Be]:[{[be]:hs,[Be]:[{[be]:vz,[Be]:[{[be]:C1,[Be]:[{[be]:w1,[Be]:[{[be]:[{[ke]:wr,[Re]:L4e,[tn]:vH}],[Be]:[{[be]:[{[ke]:wr,[Re]:[Ti,"resourceId[3]"],[tn]:VM}],[Be]:[{[be]:[{[ke]:wn,[Re]:[{[Et]:vH},bK]}],[Be]:[{[be]:$d,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[ft]:qH,[pt]:qt},[ue]:Ye},{endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:qH,[pt]:qt},[ue]:Ye}],[ue]:Ve},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: expected an access point name",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: Expected a 4-component resource",[ue]:xt}],[ue]:Ve},c1],[ue]:Ve},u1],[ue]:Ve},d1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: The Outpost Id was not set",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[ue]:xt}],[ue]:Ve},{error:"Invalid ARN: No ARN type specified",[ue]:xt}],[ue]:Ve},{[be]:[{[ke]:Qn,[Re]:[xn,0,4,k4e],[tn]:xH},{[ke]:wn,[Re]:[{[Et]:xH},"arn:"]},{[ke]:Ca,[Re]:[{[ke]:qi,[Re]:[UH]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[ue]:xt},{[be]:[{[ke]:jr,[Re]:[R4e,ua]},UH],error:"Path-style addressing cannot be used with ARN buckets",[ue]:xt},{[be]:D4e,[Be]:[{[be]:hs,[Be]:[{[be]:[Ur],[Be]:[{[be]:[Yn,Qt,rr,to],endpoint:{[dt]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,Qt,rr,bn,po],[Be]:[{endpoint:GH,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,Qt,rr,bn,ho],endpoint:GH,[ue]:Ye},{[be]:[hn,Qt,rr,to],endpoint:{[dt]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,Qt,rr,bn,po],[Be]:[{endpoint:WH,[ue]:Ye}],[ue]:Ve},{[be]:[hn,Qt,rr,bn,ho],endpoint:WH,[ue]:Ye},{[be]:[Yn,Qt,an,to],endpoint:{[dt]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[Yn,Qt,an,bn,po],[Be]:[{endpoint:KH,[ue]:Ye}],[ue]:Ve},{[be]:[Yn,Qt,an,bn,ho],endpoint:KH,[ue]:Ye},{[be]:[hn,Lr,Xo,an,to],endpoint:{[dt]:yK,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,Lr,Xo,an,bn,po],[Be]:[{[be]:Dl,endpoint:f1,[ue]:Ye},{endpoint:f1,[ue]:Ye}],[ue]:Ve},{[be]:[hn,Lr,Xo,an,bn,ho],endpoint:f1,[ue]:Ye},{[be]:[hn,Qt,an,to],endpoint:{[dt]:SH,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[hn,Qt,an,bn,po],[Be]:[{[be]:Dl,endpoint:{[dt]:SH,[ft]:Yr,[pt]:qt},[ue]:Ye},{endpoint:YH,[ue]:Ye}],[ue]:Ve},{[be]:[hn,Qt,an,bn,ho],endpoint:YH,[ue]:Ye}],[ue]:Ve},{error:"Path-style addressing cannot be used with S3 Accelerate",[ue]:xt}],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:qi,[Re]:[ZH]},{[ke]:jr,[Re]:[ZH,ua]}],[Be]:[{[be]:hs,[Be]:[{[be]:Sz,[Be]:[$H,jH,{[be]:$d,endpoint:{[dt]:Jv,[ft]:p1,[pt]:qt},[ue]:Ye},{[be]:Mv,endpoint:{[dt]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:p1,[pt]:qt},[ue]:Ye},{endpoint:{[dt]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[ft]:p1,[pt]:qt},[ue]:Ye}],[ue]:Ve},Rv],[ue]:Ve}],[ue]:Ve},{[be]:[kH],[Be]:[{[be]:hs,[Be]:[{[be]:Sz,[Be]:[{[be]:[rr,Yn,Qt,to],endpoint:{[dt]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[rr,Yn,Qt,bn,po],[Be]:[{endpoint:XH,[ue]:Ye}],[ue]:Ve},{[be]:[rr,Yn,Qt,bn,ho],endpoint:XH,[ue]:Ye},{[be]:[rr,hn,Qt,to],endpoint:{[dt]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[rr,hn,Qt,bn,po],[Be]:[{endpoint:QH,[ue]:Ye}],[ue]:Ve},{[be]:[rr,hn,Qt,bn,ho],endpoint:QH,[ue]:Ye},{[be]:[an,Yn,Qt,to],endpoint:{[dt]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[an,Yn,Qt,bn,po],[Be]:[{endpoint:JH,[ue]:Ye}],[ue]:Ve},{[be]:[an,Yn,Qt,bn,ho],endpoint:JH,[ue]:Ye},{[be]:[an,hn,Lr,Xo,to],endpoint:{[dt]:Jv,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[an,hn,Lr,Xo,bn,po],[Be]:[{[be]:Dl,endpoint:h1,[ue]:Ye},{endpoint:h1,[ue]:Ye}],[ue]:Ve},{[be]:[an,hn,Lr,Xo,bn,ho],endpoint:h1,[ue]:Ye},{[be]:[an,hn,Qt,to],endpoint:{[dt]:CH,[ft]:fo,[pt]:qt},[ue]:Ye},{[be]:[an,hn,Qt,bn,po],[Be]:[{[be]:Dl,endpoint:{[dt]:CH,[ft]:Yr,[pt]:qt},[ue]:Ye},{endpoint:ez,[ue]:Ye}],[ue]:Ve},{[be]:[an,hn,Qt,bn,ho],endpoint:ez,[ue]:Ye}],[ue]:Ve},Rv],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{error:"A region must be set when sending requests to S3.",[ue]:xt}]},j4e=$4e,B4e=new _7({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),PK=(e,t={})=>B4e.get(e,()=>q7(j4e,{endpointParams:e,logger:t.logger}));fm.aws=G7;const V4e=e=>async(t,r,o)=>{if(!o)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,r,o),s=gl(r)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!s)throw new Error(`getEndpointParameterInstructions() is not defined on '${r.commandName}'`);const a=await tK(o,{getEndpointParameterInstructions:s},t);return Object.assign(i,a)},H4e=async(e,t,r)=>({operation:gl(t).operation,region:await Rs(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),z4e=V4e(H4e);function EK(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function IK(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}const q4e=(e,t,r)=>i=>{const a=e(i).properties?.authSchemes;if(!a)return t(i);const l=[];for(const c of a){const{name:u,properties:d={},...f}=c,p=u.toLowerCase();u!==p&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${u}' to '${p}'`);let h;if(p==="sigv4a"){h="aws.auth#sigv4a";const y=a.find(v=>{const C=v.name.toLowerCase();return C!=="sigv4a"&&C.startsWith("sigv4")});if(cK.sigv4aDependency()==="none"&&y)continue}else if(p.startsWith("sigv4"))h="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${p}'`);const b=r[h];if(!b)throw new Error(`Could not find HttpAuthOption create function for '${h}'`);const g=b(i);g.schemeId=h,g.signingProperties={...g.signingProperties||{},...f,...d},l.push(g)}return l},U4e=e=>{const t=[];switch(e.operation){default:t.push(EK(e)),t.push(IK(e))}return t},G4e=q4e(PK,U4e,{"aws.auth#sigv4":EK,"aws.auth#sigv4a":IK}),W4e=e=>{const t=p7(e),r=sqe(t);return Object.assign(r,{authSchemePreference:Rs(e.authSchemePreference??[])})},K4e=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),kK={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class xo extends Qc{constructor(t){super(t),Object.setPrototypeOf(this,xo.prototype)}}class zM extends xo{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,zM.prototype)}}class qM extends xo{name="AccessDenied";$fault="client";constructor(t){super({name:"AccessDenied",$fault:"client",...t}),Object.setPrototypeOf(this,qM.prototype)}}class UM extends xo{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,UM.prototype)}}class GM extends xo{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,GM.prototype)}}class WM extends xo{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,WM.prototype)}}class KM extends xo{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,KM.prototype)}}class YM extends xo{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,YM.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class ZM extends xo{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,ZM.prototype)}}class XM extends xo{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,XM.prototype)}}class QM extends xo{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,QM.prototype)}}class JM extends xo{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,JM.prototype)}}class eA extends xo{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,eA.prototype)}}class tA extends xo{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,tA.prototype)}}class nA extends xo{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,nA.prototype)}}class rA extends xo{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,rA.prototype)}}const Y4e="ACL",Z4e="AccessDenied",Cz="AccessKeyId",X4e="AccessTier",RK="Bucket",Q4e="BucketAlreadyExists",J4e="BucketAlreadyOwnedByYou",AC="BucketKeyEnabled",eUe="Body",tUe="ChecksumAlgorithm",nUe="CacheControl",MK="ChecksumCRC32",AK="ChecksumCRC32C",DK="ChecksumCRC64NVME",rUe="Cache-Control",oUe="Content-Disposition",iUe="ContentDisposition",sUe="Content-Encoding",aUe="ContentEncoding",lUe="ContentLanguage",cUe="Content-Language",uUe="Content-Length",dUe="ContentLength",fUe="Content-MD5",pUe="ContentMD5",_K="ChecksumSHA1",NK="ChecksumSHA256",hUe="CreateSessionOutput",mUe="CreateSessionResult",gUe="CreateSessionRequest",bUe="CreateSession",yUe="ChecksumType",vUe="Content-Type",xUe="ContentType",wz="Credentials",aE="Expiration",SUe="ExpectedBucketOwner",CUe="EncryptionTypeMismatch",Tz="ETag",Oz="Expires",wUe="GrantFullControl",TUe="GrantRead",OUe="GrantReadACP",PUe="GrantWriteACP",EUe="IfMatch",IUe="If-Match",kUe="IfNoneMatch",RUe="If-None-Match",MUe="InvalidObjectState",AUe="IdempotencyParameterMismatch",DUe="InvalidRequest",_Ue="InvalidWriteOffset",NUe="Key",FUe="Metadata",LUe="NotFound",$Ue="NoSuchBucket",jUe="NoSuchKey",BUe="NoSuchUpload",VUe="ObjectAlreadyInActiveTierError",HUe="ObjectLockLegalHoldStatus",zUe="ObjectLockMode",qUe="ObjectLockRetainUntilDate",UUe="ObjectNotInActiveTierError",GUe="PutObject",WUe="PutObjectOutput",KUe="PutObjectRequest",YUe="RequestCharged",ZUe="RequestPayer",Pz="SecretAccessKey",XUe="StreamingBlob",FK="StorageClass",QUe="SessionCredentialValue",JUe="SessionCredentials",e9e="SessionMode",DC="ServerSideEncryption",LK="SSECustomerAlgorithm",$K="SSECustomerKey",jK="SSECustomerKeyMD5",hg="SSEKMSEncryptionContext",mg="SSEKMSKeyId",Ez="SessionToken",t9e="Size",n9e="TooManyParts",r9e="Tagging",o9e="VersionId",i9e="WriteOffsetBytes",s9e="WebsiteRedirectLocation",di="client",fi="error",BK="http",a9e="httpChecksum",Ii="httpError",Pt="httpHeader",l9e="httpPrefixHeaders",VK="smithy.ts.sdk.synthetic.com.amazonaws.s3",c9e="streaming",ef="xmlName",u9e="x-amz-acl",HK="x-amz-checksum-crc32",zK="x-amz-checksum-crc32c",qK="x-amz-checksum-crc64nvme",UK="x-amz-checksum-sha1",GK="x-amz-checksum-sha256",d9e="x-amz-create-session-mode",f9e="x-amz-checksum-type",p9e="x-amz-expiration",h9e="x-amz-expected-bucket-owner",m9e="x-amz-grant-full-control",g9e="x-amz-grant-read",b9e="x-amz-grant-read-acp",y9e="x-amz-grant-write-acp",v9e="x-amz-meta-",x9e="x-amz-object-lock-legal-hold",S9e="x-amz-object-lock-mode",C9e="x-amz-object-lock-retain-until-date",w9e="x-amz-object-size",T9e="x-amz-request-charged",O9e="x-amz-request-payer",P9e="x-amz-storage-class",E9e="x-amz-sdk-checksum-algorithm",_C="x-amz-server-side-encryption",NC="x-amz-server-side-encryption-aws-kms-key-id",FC="x-amz-server-side-encryption-bucket-key-enabled",LC="x-amz-server-side-encryption-context",WK="x-amz-server-side-encryption-customer-algorithm",I9e="x-amz-server-side-encryption-customer-key",KK="x-amz-server-side-encryption-customer-key-MD5",k9e="x-amz-tagging",R9e="x-amz-version-id",M9e="x-amz-write-offset-bytes",A9e="x-amz-website-redirect-location",Zn="com.amazonaws.s3",YK=ti.for(VK);var D9e=[-3,VK,"S3ServiceException",0,[],[]];YK.registerError(D9e,xo);const Go=ti.for(Zn);var _9e=[-3,Zn,Z4e,{[fi]:di,[Ii]:403},[],[]];Go.registerError(_9e,qM);var N9e=[-3,Zn,Q4e,{[fi]:di,[Ii]:409},[],[]];Go.registerError(N9e,GM);var F9e=[-3,Zn,J4e,{[fi]:di,[Ii]:409},[],[]];Go.registerError(F9e,WM);var L9e=[-3,Zn,CUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(L9e,QM);var $9e=[-3,Zn,AUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError($9e,nA);var j9e=[-3,Zn,MUe,{[fi]:di,[Ii]:403},[FK,X4e],[0,0]];Go.registerError(j9e,YM);var B9e=[-3,Zn,DUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(B9e,JM);var V9e=[-3,Zn,_Ue,{[fi]:di,[Ii]:400},[],[]];Go.registerError(V9e,eA);var H9e=[-3,Zn,$Ue,{[fi]:di,[Ii]:404},[],[]];Go.registerError(H9e,KM);var z9e=[-3,Zn,jUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(z9e,ZM);var q9e=[-3,Zn,BUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(q9e,zM);var U9e=[-3,Zn,LUe,{[fi]:di},[],[]];Go.registerError(U9e,XM);var G9e=[-3,Zn,VUe,{[fi]:di,[Ii]:403},[],[]];Go.registerError(G9e,rA);var W9e=[-3,Zn,UUe,{[fi]:di,[Ii]:403},[],[]];Go.registerError(W9e,UM);var K9e=[-3,Zn,n9e,{[fi]:di,[Ii]:400},[],[]];Go.registerError(K9e,tA);const Y9e=[YK,Go];var Iz=[0,Zn,QUe,8,0],Z9e=[0,Zn,$K,8,0],$C=[0,Zn,hg,8,0],jC=[0,Zn,mg,8,0],X9e=[0,Zn,XUe,{[c9e]:1},42],Q9e=[3,Zn,hUe,{[ef]:mUe},[wz,DC,mg,hg,AC],[[()=>n6e,{[ef]:wz}],[0,{[Pt]:_C}],[()=>jC,{[Pt]:NC}],[()=>$C,{[Pt]:LC}],[2,{[Pt]:FC}]],1],J9e=[3,Zn,gUe,0,[RK,e9e,DC,mg,hg,AC],[[0,1],[0,{[Pt]:d9e}],[0,{[Pt]:_C}],[()=>jC,{[Pt]:NC}],[()=>$C,{[Pt]:LC}],[2,{[Pt]:FC}]],1],e6e=[3,Zn,WUe,0,[aE,Tz,MK,AK,DK,_K,NK,yUe,DC,o9e,LK,jK,mg,hg,AC,t9e,YUe],[[0,{[Pt]:p9e}],[0,{[Pt]:Tz}],[0,{[Pt]:HK}],[0,{[Pt]:zK}],[0,{[Pt]:qK}],[0,{[Pt]:UK}],[0,{[Pt]:GK}],[0,{[Pt]:f9e}],[0,{[Pt]:_C}],[0,{[Pt]:R9e}],[0,{[Pt]:WK}],[0,{[Pt]:KK}],[()=>jC,{[Pt]:NC}],[()=>$C,{[Pt]:LC}],[2,{[Pt]:FC}],[1,{[Pt]:w9e}],[0,{[Pt]:T9e}]]],t6e=[3,Zn,KUe,0,[RK,NUe,Y4e,eUe,nUe,iUe,aUe,lUe,dUe,pUe,xUe,tUe,MK,AK,DK,_K,NK,Oz,EUe,kUe,wUe,TUe,OUe,PUe,i9e,FUe,DC,FK,s9e,LK,$K,jK,mg,hg,AC,ZUe,r9e,zUe,qUe,HUe,SUe],[[0,1],[0,1],[0,{[Pt]:u9e}],[()=>X9e,16],[0,{[Pt]:rUe}],[0,{[Pt]:oUe}],[0,{[Pt]:sUe}],[0,{[Pt]:cUe}],[1,{[Pt]:uUe}],[0,{[Pt]:fUe}],[0,{[Pt]:vUe}],[0,{[Pt]:E9e}],[0,{[Pt]:HK}],[0,{[Pt]:zK}],[0,{[Pt]:qK}],[0,{[Pt]:UK}],[0,{[Pt]:GK}],[4,{[Pt]:Oz}],[0,{[Pt]:IUe}],[0,{[Pt]:RUe}],[0,{[Pt]:m9e}],[0,{[Pt]:g9e}],[0,{[Pt]:b9e}],[0,{[Pt]:y9e}],[1,{[Pt]:M9e}],[128,{[l9e]:v9e}],[0,{[Pt]:_C}],[0,{[Pt]:P9e}],[0,{[Pt]:A9e}],[0,{[Pt]:WK}],[()=>Z9e,{[Pt]:I9e}],[0,{[Pt]:KK}],[()=>jC,{[Pt]:NC}],[()=>$C,{[Pt]:LC}],[2,{[Pt]:FC}],[0,{[Pt]:O9e}],[0,{[Pt]:k9e}],[0,{[Pt]:S9e}],[5,{[Pt]:C9e}],[0,{[Pt]:x9e}],[0,{[Pt]:h9e}]],2],n6e=[3,Zn,JUe,0,[Cz,Pz,Ez,aE],[[0,{[ef]:Cz}],[()=>Iz,{[ef]:Pz}],[()=>Iz,{[ef]:Ez}],[4,{[ef]:aE}]],4],r6e=[9,Zn,bUe,{[BK]:["GET","/?session",200]},()=>J9e,()=>Q9e],o6e=[9,Zn,GUe,{[a9e]:"-",[BK]:["PUT","/{Key+}?x-id=PutObject",200]},()=>t6e,()=>e6e];class i6e extends IC.classBuilder().ep({...kK,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,r,o,i){return[DM(o,t.getEndpointParameterInstructions()),A7(o)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(r6e).build(){}const s6e="3.996.0",a6e={version:s6e},l6e=e=>new TextEncoder().encode(e);function kz(e){return typeof e=="string"?e.length===0:e.byteLength===0}var ZK={name:"SHA-1"},Rz={name:"HMAC",hash:ZK},c6e=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const u6e={};function Jl(){return typeof window<"u"?window:typeof self<"u"?self:u6e}var d6e=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(r,o){Jl().crypto.subtle.importKey("raw",Mz(t),Rz,!1,["sign"]).then(r,o)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!kz(t)){var r=Mz(t),o=new Uint8Array(this.toHash.byteLength+r.byteLength);o.set(this.toHash,0),o.set(r,this.toHash.byteLength),this.toHash=o}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return Jl().crypto.subtle.sign(Rz,r,t.toHash).then(function(o){return new Uint8Array(o)})}):kz(this.toHash)?Promise.resolve(c6e):Promise.resolve().then(function(){return Jl().crypto.subtle.digest(ZK,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function Mz(e){return typeof e=="string"?l6e(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var f6e=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function XK(e){if(p6e(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return h6e(t)}return!1}function p6e(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function h6e(e){return e&&f6e.every(function(t){return typeof e[t]=="function"})}var m6e=(function(){function e(t){if(XK(Jl()))this.hash=new d6e(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,r){this.hash.update(ic(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})(),QK={name:"SHA-256"},Az={name:"HMAC",hash:QK},g6e=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]),b6e=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!dm(t)){var r=ic(t),o=new Uint8Array(this.toHash.byteLength+r.byteLength);o.set(this.toHash,0),o.set(r,this.toHash.byteLength),this.toHash=o}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return Jl().crypto.subtle.sign(Az,r,t.toHash).then(function(o){return new Uint8Array(o)})}):dm(this.toHash)?Promise.resolve(g6e):Promise.resolve().then(function(){return Jl().crypto.subtle.digest(QK,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,o){Jl().crypto.subtle.importKey("raw",ic(t.secret),Az,!1,["sign"]).then(r,o)}),this.key.catch(function(){}))},e})(),ys=64,y6e=32,v6e=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]),x6e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],S6e=Math.pow(2,53)-1,ex=(function(){function e(){this.state=Int32Array.from(x6e),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,o=t.byteLength;if(this.bytesHashed+=o,this.bytesHashed*8>S6e)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;o>0;)this.buffer[this.bufferLength++]=t[r++],o--,this.bufferLength===ys&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),o=this.bufferLength;if(r.setUint8(this.bufferLength++,128),o%ys>=ys-8){for(var i=this.bufferLength;i<ys;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<ys-8;i++)r.setUint8(i,0);r.setUint32(ys-8,Math.floor(t/4294967296),!0),r.setUint32(ys-4,t),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(y6e),i=0;i<8;i++)s[i*4]=this.state[i]>>>24&255,s[i*4+1]=this.state[i]>>>16&255,s[i*4+2]=this.state[i]>>>8&255,s[i*4+3]=this.state[i]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,o=t.state,i=o[0],s=o[1],a=o[2],l=o[3],c=o[4],u=o[5],d=o[6],f=o[7],p=0;p<ys;p++){if(p<16)this.temp[p]=(r[p*4]&255)<<24|(r[p*4+1]&255)<<16|(r[p*4+2]&255)<<8|r[p*4+3]&255;else{var h=this.temp[p-2],b=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[p-15];var g=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[p]=(b+this.temp[p-7]|0)+(g+this.temp[p-16]|0)}var y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&d)|0)+(f+(v6e[p]+this.temp[p]|0)|0)|0,v=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&a^s&a)|0;f=d,d=u,u=c,c=l+y|0,l=a,a=s,s=i,i=y+v|0}o[0]+=i,o[1]+=s,o[2]+=a,o[3]+=l,o[4]+=c,o[5]+=u,o[6]+=d,o[7]+=f},e})(),C6e=(function(){function e(t){this.secret=t,this.hash=new ex,this.reset()}return e.prototype.update=function(t){if(!(dm(t)||this.error))try{this.hash.update(ic(t))}catch(r){this.error=r}},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 EM(this,void 0,void 0,function(){return IM(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ex,this.secret){this.outer=new ex;var t=w6e(this.secret),r=new Uint8Array(ys);r.set(t);for(var o=0;o<ys;o++)t[o]^=54,r[o]^=92;this.hash.update(t),this.outer.update(r);for(var o=0;o<t.byteLength;o++)t[o]=0}},e})();function w6e(e){var t=ic(e);if(t.byteLength>ys){var r=new ex;r.update(t),t=r.digest()}var o=new Uint8Array(ys);return o.set(t),o}var JK=(function(){function e(t){XK(Jl())?this.hash=new b6e(t):this.hash=new C6e(t)}return e.prototype.update=function(t,r){this.hash.update(ic(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const eY=({serviceId:e,clientVersion:t})=>async r=>{const o=typeof window<"u"?window.navigator:void 0,i=o?.userAgent??"",s=o?.userAgentData?.platform??Dz.os(i)??"other",a=void 0,l=o?.userAgentData?.brands??[],c=l[l.length-1],u=c?.brand??Dz.browser(i)??"unknown",d=c?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${s}`,a],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const p=await r?.userAgentAppId?.();return p&&f.push([`app/${p}`]),f},Dz={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}};class Nh{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let o=7,i=Math.abs(Math.round(t));o>-1&&i>0;o--,i/=256)r[o]=i;return t<0&&_z(r),new Nh(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&_z(t),parseInt(Ci(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function _z(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class T6e{toUtf8;fromUtf8;constructor(t,r){this.toUtf8=t,this.fromUtf8=r}format(t){const r=[];for(const s of Object.keys(t)){const a=this.fromUtf8(s);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const o=new Uint8Array(r.reduce((s,a)=>s+a.byteLength,0));let i=0;for(const s of r)o.set(s,i),i+=s.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,6),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const l=this.fromUtf8(t.value),c=new DataView(new ArrayBuffer(3+l.byteLength));c.setUint8(0,7),c.setUint16(1,l.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(l,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Nh.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!D6e.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(WW(t.value.replace(/\-/g,"")),1),f}}parse(t){const r={};let o=0;for(;o<t.byteLength;){const i=t.getUint8(o++),s=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+o,i));switch(o+=i,t.getUint8(o++)){case 0:r[s]={type:Fz,value:!0};break;case 1:r[s]={type:Fz,value:!1};break;case 2:r[s]={type:O6e,value:t.getInt8(o++)};break;case 3:r[s]={type:P6e,value:t.getInt16(o,!1)},o+=2;break;case 4:r[s]={type:E6e,value:t.getInt32(o,!1)},o+=4;break;case 5:r[s]={type:I6e,value:new Nh(new Uint8Array(t.buffer,t.byteOffset+o,8))},o+=8;break;case 6:const a=t.getUint16(o,!1);o+=2,r[s]={type:k6e,value:new Uint8Array(t.buffer,t.byteOffset+o,a)},o+=a;break;case 7:const l=t.getUint16(o,!1);o+=2,r[s]={type:R6e,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+o,l))},o+=l;break;case 8:r[s]={type:M6e,value:new Date(new Nh(new Uint8Array(t.buffer,t.byteOffset+o,8)).valueOf())},o+=8;break;case 9:const c=new Uint8Array(t.buffer,t.byteOffset+o,16);o+=16,r[s]={type:A6e,value:`${Ci(c.subarray(0,4))}-${Ci(c.subarray(4,6))}-${Ci(c.subarray(6,8))}-${Ci(c.subarray(8,10))}-${Ci(c.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return r}}var Nz;(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"})(Nz||(Nz={}));const Fz="boolean",O6e="byte",P6e="short",E6e="integer",I6e="long",k6e="binary",R6e="string",M6e="timestamp",A6e="uuid",D6e=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,tY=4,Fl=tY*2,zc=4,_6e=Fl+zc*2;function N6e({byteLength:e,byteOffset:t,buffer:r}){if(e<_6e)throw new Error("Provided message too short to accommodate event stream message overhead");const o=new DataView(r,t,e),i=o.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=o.getUint32(tY,!1),a=o.getUint32(Fl,!1),l=o.getUint32(e-zc,!1),c=new a0().update(new Uint8Array(r,t,Fl));if(a!==c.digest())throw new Error(`The prelude checksum specified in the message (${a}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(r,t+Fl,e-(Fl+zc))),l!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${l}`);return{headers:new DataView(r,t+Fl+zc,s),body:new Uint8Array(r,t+Fl+zc+s,i-s-(Fl+zc+zc))}}class F6e{headerMarshaller;messageBuffer;isEndOfStream;constructor(t,r){this.headerMarshaller=new T6e(t,r),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){const t=this.messageBuffer.pop(),r=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return r}}}getAvailableMessages(){const t=this.messageBuffer;this.messageBuffer=[];const r=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return r}}}encode({headers:t,body:r}){const o=this.headerMarshaller.format(t),i=o.byteLength+r.byteLength+16,s=new Uint8Array(i),a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=new a0;return a.setUint32(0,i,!1),a.setUint32(4,o.byteLength,!1),a.setUint32(8,l.update(s.subarray(0,8)).digest(),!1),s.set(o,12),s.set(r,o.byteLength+12),a.setUint32(i-4,l.update(s.subarray(8,i-4)).digest(),!1),s}decode(t){const{headers:r,body:o}=N6e(t);return{headers:this.headerMarshaller.parse(r),body:o}}formatHeaders(t){return this.headerMarshaller.format(t)}}class L6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.decoder.decode(t)}}class $6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream)yield this.options.encoder.encode(t);this.options.includeEndFrame&&(yield new Uint8Array(0))}}class j6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream){const r=await this.options.deserializer(t);r!==void 0&&(yield r)}}}class B6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.serializer(t)}}function V6e(e){let t=0,r=0,o=null,i=null;const s=l=>{if(typeof l!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+l);t=l,r=4,o=new Uint8Array(l),new DataView(o.buffer).setUint32(0,l,!1)},a=async function*(){const l=e[Symbol.asyncIterator]();for(;;){const{value:c,done:u}=await l.next();if(u){if(t)if(t===r)yield o;else throw new Error("Truncated event message received.");else return;return}const d=c.length;let f=0;for(;f<d;){if(!o){const h=d-f;i||(i=new Uint8Array(4));const b=Math.min(4-r,h);if(i.set(c.slice(f,f+b),r),r+=b,f+=b,r<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const p=Math.min(t-r,d-f);o.set(c.slice(f,f+p),r),r+=p,f+=p,t&&t===r&&(yield o,o=null,t=0,r=0)}}};return{[Symbol.asyncIterator]:a}}function H6e(e,t){return async function(r){const{value:o}=r.headers[":message-type"];if(o==="error"){const i=new Error(r.headers[":error-message"].value||"UnknownError");throw i.name=r.headers[":error-code"].value,i}else if(o==="exception"){const i=r.headers[":exception-type"].value,s={[i]:r},a=await e(s);if(a.$unknown){const l=new Error(t(r.body));throw l.name=i,l}throw a[i]}else if(o==="event"){const i={[r.headers[":event-type"].value]:r},s=await e(i);return s.$unknown?void 0:s}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}let z6e=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new F6e(t,r),this.utfEncoder=t}deserialize(t,r){const o=V6e(t);return new j6e({messageStream:new L6e({inputStream:o,decoder:this.eventStreamCodec}),deserializer:H6e(r,this.utfEncoder)})}serialize(t,r){return new $6e({messageStream:new B6e({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const q6e=e=>({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)return;yield o}}finally{t.releaseLock()}}}),U6e=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){const{done:o,value:i}=await t.next();if(o)return r.close();r.enqueue(i)}})};class G6e{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:r}){this.universalMarshaller=new z6e({utf8Decoder:r,utf8Encoder:t})}deserialize(t,r){const o=W6e(t)?q6e(t):t;return this.universalMarshaller.deserialize(o,r)}serialize(t,r){const o=this.universalMarshaller.serialize(t,r);return typeof ReadableStream=="function"?U6e(o):o}}const W6e=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,K6e=e=>new G6e(e);async function Y6e(e,t,r=1024*1024){const o=e.size;let i=0;for(;i<o;){const s=e.slice(i,Math.min(o,i+r));t(new Uint8Array(await s.arrayBuffer())),i+=s.size}}const Z6e=async function(t,r){const o=new t;return await Y6e(r,i=>{o.update(i)}),o.digest()},nY=e=>()=>Promise.reject(e),_l=64,X6e=16,Q6e=[1732584193,4023233417,2562383102,271733878];class J6e{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(eGe(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const r=tGe(t);let o=0,{byteLength:i}=r;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,r[o++]),i--,this.bufferLength===_l&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:r,bufferLength:o,bytesHashed:i}=this,s=i*8;if(r.setUint8(this.bufferLength++,128),o%_l>=_l-8){for(let a=this.bufferLength;a<_l;a++)r.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(let a=this.bufferLength;a<_l-8;a++)r.setUint8(a,0);r.setUint32(_l-8,s>>>0,!0),r.setUint32(_l-4,Math.floor(s/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(X6e));for(let r=0;r<4;r++)t.setUint32(r*4,this.state[r],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:r}=this;let o=r[0],i=r[1],s=r[2],a=r[3];o=Do(o,i,s,a,t.getUint32(0,!0),7,3614090360),a=Do(a,o,i,s,t.getUint32(4,!0),12,3905402710),s=Do(s,a,o,i,t.getUint32(8,!0),17,606105819),i=Do(i,s,a,o,t.getUint32(12,!0),22,3250441966),o=Do(o,i,s,a,t.getUint32(16,!0),7,4118548399),a=Do(a,o,i,s,t.getUint32(20,!0),12,1200080426),s=Do(s,a,o,i,t.getUint32(24,!0),17,2821735955),i=Do(i,s,a,o,t.getUint32(28,!0),22,4249261313),o=Do(o,i,s,a,t.getUint32(32,!0),7,1770035416),a=Do(a,o,i,s,t.getUint32(36,!0),12,2336552879),s=Do(s,a,o,i,t.getUint32(40,!0),17,4294925233),i=Do(i,s,a,o,t.getUint32(44,!0),22,2304563134),o=Do(o,i,s,a,t.getUint32(48,!0),7,1804603682),a=Do(a,o,i,s,t.getUint32(52,!0),12,4254626195),s=Do(s,a,o,i,t.getUint32(56,!0),17,2792965006),i=Do(i,s,a,o,t.getUint32(60,!0),22,1236535329),o=_o(o,i,s,a,t.getUint32(4,!0),5,4129170786),a=_o(a,o,i,s,t.getUint32(24,!0),9,3225465664),s=_o(s,a,o,i,t.getUint32(44,!0),14,643717713),i=_o(i,s,a,o,t.getUint32(0,!0),20,3921069994),o=_o(o,i,s,a,t.getUint32(20,!0),5,3593408605),a=_o(a,o,i,s,t.getUint32(40,!0),9,38016083),s=_o(s,a,o,i,t.getUint32(60,!0),14,3634488961),i=_o(i,s,a,o,t.getUint32(16,!0),20,3889429448),o=_o(o,i,s,a,t.getUint32(36,!0),5,568446438),a=_o(a,o,i,s,t.getUint32(56,!0),9,3275163606),s=_o(s,a,o,i,t.getUint32(12,!0),14,4107603335),i=_o(i,s,a,o,t.getUint32(32,!0),20,1163531501),o=_o(o,i,s,a,t.getUint32(52,!0),5,2850285829),a=_o(a,o,i,s,t.getUint32(8,!0),9,4243563512),s=_o(s,a,o,i,t.getUint32(28,!0),14,1735328473),i=_o(i,s,a,o,t.getUint32(48,!0),20,2368359562),o=No(o,i,s,a,t.getUint32(20,!0),4,4294588738),a=No(a,o,i,s,t.getUint32(32,!0),11,2272392833),s=No(s,a,o,i,t.getUint32(44,!0),16,1839030562),i=No(i,s,a,o,t.getUint32(56,!0),23,4259657740),o=No(o,i,s,a,t.getUint32(4,!0),4,2763975236),a=No(a,o,i,s,t.getUint32(16,!0),11,1272893353),s=No(s,a,o,i,t.getUint32(28,!0),16,4139469664),i=No(i,s,a,o,t.getUint32(40,!0),23,3200236656),o=No(o,i,s,a,t.getUint32(52,!0),4,681279174),a=No(a,o,i,s,t.getUint32(0,!0),11,3936430074),s=No(s,a,o,i,t.getUint32(12,!0),16,3572445317),i=No(i,s,a,o,t.getUint32(24,!0),23,76029189),o=No(o,i,s,a,t.getUint32(36,!0),4,3654602809),a=No(a,o,i,s,t.getUint32(48,!0),11,3873151461),s=No(s,a,o,i,t.getUint32(60,!0),16,530742520),i=No(i,s,a,o,t.getUint32(8,!0),23,3299628645),o=Fo(o,i,s,a,t.getUint32(0,!0),6,4096336452),a=Fo(a,o,i,s,t.getUint32(28,!0),10,1126891415),s=Fo(s,a,o,i,t.getUint32(56,!0),15,2878612391),i=Fo(i,s,a,o,t.getUint32(20,!0),21,4237533241),o=Fo(o,i,s,a,t.getUint32(48,!0),6,1700485571),a=Fo(a,o,i,s,t.getUint32(12,!0),10,2399980690),s=Fo(s,a,o,i,t.getUint32(40,!0),15,4293915773),i=Fo(i,s,a,o,t.getUint32(4,!0),21,2240044497),o=Fo(o,i,s,a,t.getUint32(32,!0),6,1873313359),a=Fo(a,o,i,s,t.getUint32(60,!0),10,4264355552),s=Fo(s,a,o,i,t.getUint32(24,!0),15,2734768916),i=Fo(i,s,a,o,t.getUint32(52,!0),21,1309151649),o=Fo(o,i,s,a,t.getUint32(16,!0),6,4149444226),a=Fo(a,o,i,s,t.getUint32(44,!0),10,3174756917),s=Fo(s,a,o,i,t.getUint32(8,!0),15,718787259),i=Fo(i,s,a,o,t.getUint32(36,!0),21,3951481745),r[0]=o+r[0]&4294967295,r[1]=i+r[1]&4294967295,r[2]=s+r[2]&4294967295,r[3]=a+r[3]&4294967295}reset(){this.state=Uint32Array.from(Q6e),this.buffer=new DataView(new ArrayBuffer(_l)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function BC(e,t,r,o,i,s){return t=(t+e&4294967295)+(o+s&4294967295)&4294967295,(t<<i|t>>>32-i)+r&4294967295}function Do(e,t,r,o,i,s,a){return BC(t&r|~t&o,e,t,i,s,a)}function _o(e,t,r,o,i,s,a){return BC(t&o|r&~o,e,t,i,s,a)}function No(e,t,r,o,i,s,a){return BC(t^r^o,e,t,i,s,a)}function Fo(e,t,r,o,i,s,a){return BC(r^(t|~o),e,t,i,s,a)}function eGe(e){return typeof e=="string"?e.length===0:e.byteLength===0}function tGe(e){return typeof e=="string"?cl(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const nGe=["in-region","cross-region","mobile","standard","legacy"],rY=({defaultsMode:e}={})=>iqe(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(rGe()?"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 ${nGe.join(", ")}, got ${t}`)}}),rGe=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:r,downlink:o}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(r)>100||Number(o)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},oGe=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Tu,base64Encoder:e?.base64Encoder??oc,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??PK,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??tze,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??G4e,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new vM},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new FHe}],logger:e?.logger??new kC,protocol:e?.protocol??Gqe,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",errorTypeRegistries:Y9e,xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??KW,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??cK,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??hm,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??cl,utf8Encoder:e?.utf8Encoder??zu}),iGe=e=>{const t=rY(e),r=()=>t().then(g7),o=oGe(e);return{...o,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??h7,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??eY({serviceId:o.serviceId,clientVersion:a6e.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??K6e,maxAttempts:e?.maxAttempts??mm,md5:e?.md5??J6e,region:e?.region??nY("Region is missing"),requestHandler:wC.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||rK),sha1:e?.sha1??m6e,sha256:e?.sha256??JK,streamCollector:e?.streamCollector??xM,streamHasher:e?.streamHasher??Z6e,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(K7)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Y7))}},oY=e=>({setRegion(t){e.region=t},region(){return e.region}}),iY=e=>({region:e.region()}),sGe=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(i){const s=t.findIndex(a=>a.schemeId===i.schemeId);s===-1?t.push(i):t.splice(s,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){o=i},credentials(){return o}}},aGe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),lGe=(e,t)=>{const r=Object.assign(oY(e),b7(e),jW(e),sGe(e));return t.forEach(o=>o.configure(r)),Object.assign(e,iY(r),y7(r),BW(r),aGe(r))};class cGe extends m7{config;constructor(...[t]){const r=iGe(t||{});super(r),this.initConfig=r;const o=K4e(r),i=D7(o),s=v3e(i),a=aK(s),l=X7(a),c=l,u=nK(c),d=q5e(u),f=W4e(d),p=Y3e(f,{session:[()=>this,i6e]}),h=lGe(p,t?.extensions||[]);this.config=h,this.middlewareStack.use(ZW(this.config)),this.middlewareStack.use(W7(this.config)),this.middlewareStack.use(lK(this.config)),this.middlewareStack.use(Q7(this.config)),this.middlewareStack.use(k7(this.config)),this.middlewareStack.use(R7(this.config)),this.middlewareStack.use(M7(this.config)),this.middlewareStack.use(HW(this.config,{httpAuthSchemeParametersProvider:z4e,identityProviderConfigProvider:async b=>new r7({"aws.auth#sigv4":b.credentials,"aws.auth#sigv4a":b.credentials})})),this.middlewareStack.use(qW(this.config)),this.middlewareStack.use(s5e(this.config)),this.middlewareStack.use(MHe(this.config)),this.middlewareStack.use(F3e(this.config)),this.middlewareStack.use(z3e(this.config)),this.middlewareStack.use(K3e(this.config))}destroy(){super.destroy()}}function uGe(e){return t=>async r=>{const o={...r.input},i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const s of i){const a=o[s.target];if(a){let l;typeof a=="string"?pGe(a,e)?l=e.base64Decoder(a):(l=e.utf8Decoder(a),o[s.target]=e.base64Encoder(l)):(l=ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a),o[s.target]=e.base64Encoder(l));const c=new e.md5;c.update(l),o[s.hash]=e.base64Encoder(await c.digest())}}return t({...r,input:o})}}const dGe={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},fGe=e=>({applyToStack:t=>{t.add(uGe(e),dGe)}});function pGe(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}class hGe extends IC.classBuilder().ep({...kK,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,r,o,i){return[DM(o,t.getEndpointParameterInstructions()),y3e(o,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),M3e(),A7(o),fGe(o)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(o6e).build(){}function sY(e){return Promise.all(Object.keys(e).reduce((t,r)=>{const o=e[r];return typeof o=="string"?t.push([r,o]):t.push(o().then(i=>[r,i])),t},[])).then(t=>t.reduce((r,[o,i])=>(r[o]=i,r),{}))}function mGe(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:r,CognitoIdentityClient:o}=await Promise.resolve().then(()=>require("./loadCognitoIdentity-B2mRTR9b.js")),i=u=>e.clientConfig?.[u]??e.parentClientConfig?.[u]??t?.callerClientConfig?.[u],{Credentials:{AccessKeyId:s=gGe(e.logger),Expiration:a,SecretKey:l=yGe(e.logger),SessionToken:c}=bGe(e.logger)}=await(e.client??new o(Object.assign({},e.clientConfig??{},{region:i("region"),profile:i("profile"),userAgentAppId:i("userAgentAppId")}))).send(new r({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await sY(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:l,sessionToken:c,expiration:a}}}function gGe(e){throw new fp("Response from Amazon Cognito contained no access key ID",{logger:e})}function bGe(e){throw new fp("Response from Amazon Cognito contained no credentials",{logger:e})}function yGe(e){throw new fp("Response from Amazon Cognito contained no secret key",{logger:e})}const T1="IdentityIds";class vGe{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",r=>{const o=r.get(t);return new Promise(i=>{o.onerror=()=>i(null),o.onsuccess=()=>i(o.result?o.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",r=>{const o=r.delete(t);return new Promise((i,s)=>{o.onerror=()=>s(o.error),o.onsuccess=()=>i()})})}setItem(t,r){return this.withObjectStore("readwrite",o=>{const i=o.put({id:t,value:r});return new Promise((s,a)=>{i.onerror=()=>a(i.error),i.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((r,o)=>{t.onsuccess=()=>{r(t.result)},t.onerror=()=>{o(t.error)},t.onblocked=()=>{o(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const i=t.result;i.onerror=()=>{o(new Error("Failed to create object store"))},i.createObjectStore(T1,{keyPath:"id"})}})}withObjectStore(t,r){return this.getDb().then(o=>{const i=o.transaction(T1,t);return i.oncomplete=()=>o.close(),new Promise((s,a)=>{i.onerror=()=>a(i.error),s(r(i.objectStore(T1)))}).catch(s=>{throw o.close(),s})})}}class xGe{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,r){this.store[t]=r}}const SGe=new xGe;function CGe(){return typeof self=="object"&&self.indexedDB?new vGe:typeof window=="object"&&window.localStorage?window.localStorage:SGe}function wGe({accountId:e,cache:t=CGe(),client:r,clientConfig:o,customRoleArn:i,identityPoolId:s,logins:a,userIdentifier:l=!a||Object.keys(a).length===0?"ANONYMOUS":void 0,logger:c,parentClientConfig:u}){c?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const d=l?`aws:cognito-identity-credentials:${s}:${l}`:void 0;let f=async p=>{const{GetIdCommand:h,CognitoIdentityClient:b}=await Promise.resolve().then(()=>require("./loadCognitoIdentity-B2mRTR9b.js")),g=C=>o?.[C]??u?.[C]??p?.callerClientConfig?.[C],y=r??new b(Object.assign({},o??{},{region:g("region"),profile:g("profile"),userAgentAppId:g("userAgentAppId")}));let v=d&&await t.getItem(d);if(!v){const{IdentityId:C=TGe(c)}=await y.send(new h({AccountId:e,IdentityPoolId:s,Logins:a?await sY(a):void 0}));v=C,d&&Promise.resolve(t.setItem(d,v)).catch(()=>{})}return f=mGe({client:y,customRoleArn:i,logins:a,identityId:v}),f(p)};return p=>f(p).catch(async h=>{throw d&&Promise.resolve(t.removeItem(d)).catch(()=>{}),h})}function TGe(e){throw new fp("Response from Amazon Cognito contained no identity ID",{logger:e})}const OGe=e=>wGe({...e});function PGe(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],o=atob(t[1]);let i=o.length;const s=new Uint8Array(i);for(;i--;)s[i]=o.charCodeAt(i);return new Blob([s],{type:r})}async function EGe(e,t,r,o,i,s=""){if(!i||!r||!o)return console.warn("Missing AWS Config (Pool ID, Bucket, or Region). Returning data URL as fallback."),e;try{const a=new cGe({region:o,credentials:OGe({clientConfig:{region:o},identityPoolId:i}),requestChecksumCalculation:"WHEN_REQUIRED",forcePathStyle:!0}),l=PGe(e);let c=s.trim();c&&!c.endsWith("/")&&(c+="/");const u=c?`${c}${t}`:`signatures/${t}`,d=new hGe({Bucket:r,Key:u,Body:l,ContentType:l.type});return await a.send(d),`https://${r}/${u}`}catch(a){throw console.error("Error uploading to S3:",a),a}}function IGe({attributes:e={},rules:t={},onChange:r}){const{id:o="",MuiAttributes:i={},label:s="Signature",bucket:a="",region:l="",identityPoolId:c="",path:u="",disabled:d=!1,CanvasProps:f={}}=e,p=Ue.useRef(null),h=Ue.useRef(null),[b,g]=Ue.useState(!1),[y,v]=Ue.useState(e.value||null),[C,O]=Ue.useState(400),[T,P]=Ue.useState(!1),k=t?.validation?.some(A=>A.rule==="mandatory")||!1,M=f?.style?.height||150;Ue.useEffect(()=>{const A=h.current;if(!A)return;const F=new ResizeObserver(I=>{const N=I[0]?.contentRect?.width;N&&N>0&&O(Math.floor(N))});return F.observe(A),()=>F.disconnect()},[]),Ue.useEffect(()=>{e.value&&p.current&&p.current.fromDataURL(e.value,{width:C,height:M})},[e.value,C,M]);const _=()=>{p.current&&p.current.clear(),v(null),P(!1),r&&r({id:o,value:""})},D=async()=>{if(!p.current||p.current.isEmpty())return;g(!0);const A=p.current.getTrimmedCanvas().toDataURL("image/png"),F=`${o}-${Date.now()}.png`;try{const I=await EGe(A,F,a,l,c,u);v(I),P(!0),r&&r({id:o,value:I})}catch(I){console.error("Signature upload failed",I)}finally{g(!1)}};return w.jsxs(ht.Box,{sx:{width:"100%",...i.sx},children:[w.jsxs(ht.Typography,{variant:"subtitle2",gutterBottom:!0,sx:{display:"flex"},children:[s,k&&w.jsx(ht.Box,{component:"span",sx:{color:"error.main",ml:.5},children:"*"})]}),w.jsx(ht.Box,{ref:h,sx:{border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",bgcolor:"background.paper"},children:w.jsx(CC,{ref:p,penColor:"black",canvasProps:{className:"sigCanvas",width:C,height:M,style:{display:"block",pointerEvents:d?"none":"auto",...f?.style,width:"100%",height:M}},backgroundColor:"transparent"})}),w.jsxs(ht.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1,alignItems:"center",mt:1},children:[w.jsx(ht.Button,{variant:"outlined",color:"secondary",onClick:_,size:"small",disabled:d||b,children:"Clear"}),w.jsx(ht.Button,{variant:"contained",color:"primary",onClick:D,size:"small",disabled:d||b||y!==null,startIcon:b?w.jsx(ht.CircularProgress,{size:16,color:"inherit"}):null,children:y?"Saved":"Save"}),T&&y&&w.jsx(ht.Typography,{variant:"caption",color:"success.main",children:"Signature Saved!"})]})]})}function kGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},label:i="Group",subFields:s=[]}=e,a=Ue.useMemo(()=>SC(),[]);return w.jsxs(ht.Paper,{elevation:1,sx:{p:2,mb:2,...o.sx},...o,children:[w.jsx(ht.Typography,{variant:"subtitle1",gutterBottom:!0,sx:{fontWeight:600},children:i}),w.jsx(ht.Box,{children:w.jsx(pp,{guid:a,data:s,patch:t,onChange:r})})]})}function RGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},label:i="Accordion",subFields:s=[]}=e,a=Ue.useMemo(()=>SC(),[]);return w.jsxs(ht.Accordion,{...o,children:[w.jsx(ht.AccordionSummary,{expandIcon:w.jsx(ht.Icon,{children:"expand_more"}),children:w.jsx(ht.Typography,{children:i})}),w.jsx(ht.AccordionDetails,{children:w.jsx(pp,{guid:a,data:s,patch:t,onChange:r})})]})}function MGe(e){const{children:t,value:r,index:o,...i}=e;return w.jsx("div",{role:"tabpanel",hidden:r!==o,id:`simple-tabpanel-${o}`,"aria-labelledby":`simple-tab-${o}`,...i,children:r===o&&w.jsx(ht.Box,{sx:{p:3},children:t})})}function AGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},tabs:i=[]}=e,[s,a]=Ue.useState(0),l=Ue.useMemo(()=>i.map(()=>SC()),[i.length]),c=(u,d)=>{a(d)};return w.jsxs(ht.Box,{sx:{width:"100%"},children:[w.jsx(ht.Box,{sx:{borderBottom:1,borderColor:"divider"},children:w.jsx(ht.Tabs,{value:s,onChange:c,...o,children:i.map((u,d)=>w.jsx(ht.Tab,{label:u.label},d))})}),i.map((u,d)=>w.jsx(MGe,{value:s,index:d,children:w.jsx(pp,{guid:l[d],data:u.subFields||[],patch:t,onChange:r})},d))]})}function DGe({attributes:e={},rules:t={},onChange:r}){const{MuiAttributes:o={},id:i="",options:s=[],label:a="Combo Box"}=e,[l,c]=Ue.useState(e.value||null),[u,d]=Ue.useState(!1),[f,p]=Ue.useState("");Ue.useEffect(()=>{e.value&&c(e.value)},[]),oa(()=>{c(e.value)},[e.value]);const h=v=>{let C=!0,O="";if(t?.validation){for(const T of t.validation)if(T.rule==="mandatory"&&!v){C=!1,O=T.message||"Required";break}}return{isValid:C,message:O}},b=(v,C)=>{c(C);const O=h(C);d(!O.isValid),p(O.message),r&&r({id:i,value:C})},g=()=>{const v=h(l);d(!v.isValid),p(v.message)},y=t?.validation?.some(v=>v.rule==="mandatory")||!1;return w.jsx(hS,{disablePortal:!0,id:i,options:s,value:l,onChange:b,fullWidth:!0,renderInput:v=>w.jsx(dl,{...v,label:a,required:y,error:u,helperText:f,onBlur:g}),...o})}function _Ge(e){return Je("MuiImageList",e)}Ze("MuiImageList",["root","masonry","quilted","standard","woven"]);const oA=S.createContext({});process.env.NODE_ENV!=="production"&&(oA.displayName="ImageListContext");const NGe=e=>{const{classes:t,variant:r}=e;return Ie({root:["root",r]},_Ge,t)},FGe=ie("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),aY=S.forwardRef(function(t,r){const o=Dt({props:t,name:"MuiImageList"}),{children:i,className:s,cols:a=2,component:l="ul",rowHeight:c="auto",gap:u=4,style:d,variant:f="standard",...p}=o,h=S.useMemo(()=>({rowHeight:c,gap:u,variant:f}),[c,u,f]),b=f==="masonry"?{columnCount:a,columnGap:u,...d}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:u,...d},g={...o,component:l,gap:u,rowHeight:c,variant:f},y=NGe(g);return w.jsx(FGe,{as:l,className:Te(y.root,y[f],s),ref:r,style:b,ownerState:g,...p,children:w.jsx(oA.Provider,{value:h,children:i})})});process.env.NODE_ENV!=="production"&&(aY.propTypes={children:n.node.isRequired,classes:n.object,className:n.string,cols:el,component:n.elementType,gap:n.number,rowHeight:n.oneOfType([n.oneOf(["auto"]),n.number]),style:n.object,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object]),variant:n.oneOfType([n.oneOf(["masonry","quilted","standard","woven"]),n.string])});function LGe(e){return Je("MuiImageListItem",e)}const O1=Ze("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),$Ge=e=>{const{classes:t,variant:r}=e;return Ie({root:["root",r],img:["img"]},LGe,t)},jGe=ie("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${O1.img}`]:t.img},t.root,t[r.variant]]}})({display:"block",position:"relative",[`& .${O1.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${O1.img}`]:{height:"auto",flexGrow:1}}}]}),lY=S.forwardRef(function(t,r){const o=Dt({props:t,name:"MuiImageListItem"}),{children:i,className:s,cols:a=1,component:l="li",rows:c=1,style:u,...d}=o,{rowHeight:f="auto",gap:p,variant:h}=S.useContext(oA);let b="auto";h==="woven"?b=void 0:f!=="auto"&&(b=f*c+p*(c-1));const g={...o,cols:a,component:l,gap:p,rowHeight:f,rows:c,variant:h},y=$Ge(g);return w.jsx(jGe,{as:l,className:Te(y.root,y[h],s),ref:r,style:{height:b,gridColumnEnd:h!=="masonry"?`span ${a}`:void 0,gridRowEnd:h!=="masonry"?`span ${c}`:void 0,marginBottom:h==="masonry"?p:void 0,breakInside:h==="masonry"?"avoid":void 0,...u},ownerState:g,...d,children:S.Children.map(i,v=>S.isValidElement(v)?(process.env.NODE_ENV!=="production"&&Tm.isFragment(v)&&console.error(["MUI: The ImageListItem component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
465
+ `)),v.type==="img"||nf(v,["Image"])?S.cloneElement(v,{className:Te(y.img,v.props.className)}):v):null)})});process.env.NODE_ENV!=="production"&&(lY.propTypes={children:n.node,classes:n.object,className:n.string,cols:el,component:n.elementType,rows:el,style:n.object,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object])});function BGe({attributes:e={}}){const{MuiAttributes:t={},items:r=[],width:o=500,height:i=450,cols:s=3,rowHeight:a=164}=e;return w.jsx(aY,{sx:{width:o,height:i},cols:s,rowHeight:a,...t,children:r.map(l=>w.jsx(lY,{children:w.jsx("img",{srcSet:`${l.img}?w=${a}&h=${a}&fit=crop&auto=format&dpr=2 2x`,src:`${l.img}?w=${a}&h=${a}&fit=crop&auto=format`,alt:l.title,loading:"lazy"})},l.img))})}function VGe({attributes:e={},rules:t={}}){const{label:r="",value:o="",MuiAttributes:i={},url:s="",target:a="_blank",displayText:l=""}=e,c=t?.validation?.some(f=>f.rule==="mandatory")||!1,u=s||o||"#",d=l||r||u;return w.jsxs(ht.Box,{sx:{width:"100%"},...i.container,children:[r&&l&&w.jsxs(ht.Typography,{variant:"subtitle2",gutterBottom:!0,sx:{display:"flex"},...i.displayText,children:[r,c&&w.jsx(ht.Box,{component:"span",sx:{color:"error.main",ml:.5},children:"*"})]}),w.jsx(ht.Link,{href:u,target:a,rel:a==="_blank"?"noopener noreferrer":void 0,...i.link,children:d})]})}function HGe({attributes:e={},rules:t={},onChange:r}){const{id:o="",MuiAttributes:i={},InputProps:s={},format:a="",buttonText:l="Update Location",buttonIcon:c="location_on",buttonDisplay:u="both",MuiButtonAttributes:d={},disabled:f=!1}=e,[p,h]=Ue.useState({value:e.value!==void 0?e.value:"",helperText:i.helperText||"",error:!1});Ue.useEffect(()=>{e.value!==void 0&&e.value!==p.value&&h(I=>({...I,value:e.value}))},[e.value]);const b=I=>a?yE(I).format(a):I,g=I=>{const{validation:N}=t;if(N)for(let j=0;j<N.length;j+=1){const H=N[j];if(!Uh[H.rule](I,H.value))return{isValid:!1,message:H.message}}return{isValid:!0,message:""}},y=I=>{const{value:N}=I.target,j=g(N);h({value:N,helperText:j.message,error:!j.isValid})},v=I=>{const{value:N}=I.target,j=b(N),H=g(j);h({value:j,helperText:H.message,error:!H.isValid}),typeof r=="function"&&r({id:o,value:j})},C=()=>{r&&r({id:o,value:p.value,option:"location_update_request"})},O=()=>{const I=u,N=w.jsx(ht.Icon,{children:c});switch(I){case"icon":return N;case"text":return w.jsx(w.Fragment,{children:l});default:return w.jsxs(w.Fragment,{children:[N,w.jsx(uf,{component:"span",sx:{ml:.5},children:l})]})}},T=t?.validation?.some(I=>I.rule==="mandatory")||!1,P=!!i?.slotProps,k={...i};let M,_;if(P){const I=i.slotProps&&i.slotProps.input||{};_={...i.slotProps||{},input:{...I}},delete k.slotProps}else M={...i.inputProps||{}},delete k.inputProps;const D=i.variant||"outlined",A=i.size||"medium",F=A==="small"?D==="outlined"?40:48:56;return w.jsxs(uf,{sx:{display:"flex",gap:1,alignItems:"flex-start",width:"100%"},children:[w.jsx(uf,{sx:{flex:1,minWidth:0},children:w.jsx(dl,{fullWidth:!0,...k,required:T,inputProps:P?void 0:M,slotProps:P?_:void 0,InputProps:PI(s),onChange:y,onBlur:v,value:p.value,error:p.error,helperText:p.helperText,disabled:f})}),w.jsx(xs,{variant:"outlined",color:"primary",size:A==="small"?"small":"medium",onClick:C,disabled:f,...d,sx:{whiteSpace:"nowrap",minWidth:"auto",height:F,flexShrink:0,...d?.sx},children:O()})]})}const iA={Typography:Pie,TextField:lye,Table:Qke,DateTime:ORe,DateTimePicker:PRe,TimePicker:ERe,Select:ARe,CheckBox:DRe,Switch:NRe,Radio:tMe,Stepper:iMe,Bar:EBe,Line:lVe,Pie:RVe,MixChart:MVe,Divider:AVe,Chip:DVe,List:_Ve,NumberField:sHe,MultiTextbox:aHe,LineItemList:cHe,FormRepeater:mHe,Signature:IGe,Group:kGe,Accordion:RGe,Tabs:AGe,AutoComplete:DGe,ImgList:BGe,Hyperlink:VGe,LocationField:HGe};function cY(e){const{map:t}=e;if(!t)return w.jsx("div",{});const r=iA[t];return r?w.jsx(r,{...e}):w.jsx("div",{})}const zGe={MUI:{map:uE}},Si={},uY=e=>e?Si[e]:Si,qGe=e=>{const t=Object.keys(Si);e?delete Si[e]:t.forEach(r=>delete Si[r])},UGe=e=>e?.filter(t=>t?.rules?.validation?.some(r=>r.rule==="mandatory")),GGe=(e,t)=>UGe(e)?.reduce((o,i)=>(i?.rules?.validation?.forEach(s=>{const a=i?.id||i?.props?.id;if(!a)return;const l=Si[t]?.[a]?.toString();l&&Uh[s.rule](l,s.value)||o.push({...s,id:i.id})}),o),[]),WGe={};function pp({data:e=[],patch:t=WGe,guid:r,formRef:o,onSubmit:i,onChange:s,onStepChange:a,MuiGridAttributes:l={spacing:2},activeStep:c=0,onFieldClick:u,onFieldDoubleClick:d,onFieldContextMenu:f}){const[p,h]=Ue.useState(t),[b,g]=Ue.useState(0),y=zGe.MUI,v=Ue.useMemo(()=>Ege(P5(e,p,r,Si)),[p,e,r]);Ue.useEffect(()=>{P1(Si[r])&&(Si[r]={...t})},[r,t]),oa(()=>{h({...t})},[t]);const C=Ue.useCallback(({id:k,value:M,option:_})=>{Si[r]||(Si[r]={}),Si[r][k]=M,g(D=>D+1),typeof s=="function"&&s({id:k,value:M,option:_})},[r,s]),O=Ue.useCallback((k,M,_)=>{if(typeof k=="function"){const D=GGe(M,_);k(Si,D,M,_)}},[]),T=(k,M,_)=>{typeof a=="function"&&a(k,M,_)},P=(k,M)=>{const{type:_="",style:D={},className:A="",visible:F=!1,rules:I={},subforms:N=[]}=k,j=k.props||{},H=k.layout||{},$=k?.id||j?.id,B=y.map[_]||{},{options:q={}}=B,U=$?Si[r]?.[$]:void 0,V=N.find(L=>Array.isArray(U)?U.includes(L.conditionValue):L.conditionValue===U);return w.jsxs(ht.Grid,{style:{...D,cursor:u?"pointer":"default",position:"relative",transition:"background-color 0.2s, box-shadow 0.2s",borderRadius:4},...H,className:`${A} ${F?"show":"hidden"}`,onClick:L=>{},onDoubleClick:L=>{d&&(L.stopPropagation(),d(k))},onContextMenu:L=>{f&&(L.preventDefault(),L.stopPropagation(),f(L,k))},children:[w.jsx(cY,{map:B.map,option:q.type||"",control:k,attributes:j,rules:I,onChange:C,onStepUpdate:T,currentStep:c,patch:t},`dynamic-comp-${$||M}`),V&&V.data&&w.jsx(ht.Box,{sx:{mt:2,pl:2,borderLeft:"2px solid",borderColor:"divider",width:"100%"},children:w.jsx(pp,{guid:`${r}-subform-${$}`,data:V.data,patch:t,onChange:C,MuiGridAttributes:{spacing:1}})})]},$||`layout-comp-${M}`)};return w.jsxs(w.Fragment,{children:[w.jsx(ht.Grid,{container:!0,...l,children:v.wrows.map((k,M)=>w.jsx(Ue.Fragment,{children:k.map(P)},`row-${M}`))},`layout-grid-${r}`),v.worows.length>0&&w.jsx(ht.Grid,{container:!0,...l,children:v.worows.map((k,M)=>P(k,M))},`layout-grid-worows-${r}`),w.jsx("button",{"aria-label":"button",type:"button",ref:o||null,onClick:()=>O(i,e,r),style:{display:"none"}})]})}exports.AwsSdkSigV4Signer=vM;exports.ClearFormData=qGe;exports.Client=m7;exports.Command=IC;exports.Controls=iA;exports.DEFAULT_MAX_ATTEMPTS=mm;exports.DEFAULT_RETRY_MODE=rK;exports.DEFAULT_USE_DUALSTACK_ENDPOINT=K7;exports.DEFAULT_USE_FIPS_ENDPOINT=Y7;exports.DefaultIdentityProviderConfig=r7;exports.DynamicComponent=cY;exports.EndpointCache=_7;exports.FetchHttpHandler=wC;exports.FormData=uY;exports.FormGenerator=pp;exports.HttpProtocol=t7;exports.HttpRequest=Br;exports.LazyJsonString=Qa;exports.NoOpLogger=kC;exports.NormalizedSchema=or;exports.NumericValue=fg;exports.ProtocolLib=x7;exports.SerdeContextConfig=RC;exports.ServiceException=Qc;exports.Sha256=JK;exports.TypeRegistry=ti;exports.UnionSerde=S7;exports.calculateBodyLength=h7;exports.collectBody=fh;exports.createDefaultUserAgentProvider=eY;exports.customEndpointFunctions=fm;exports.dateToUtcString=i0;exports.deref=Xv;exports.determineTimestampFormat=EC;exports.fromBase64=Tu;exports.fromUtf8=cl;exports.getAwsRegionExtensionConfiguration=oY;exports.getContentLengthPlugin=Q7;exports.getDefaultExtensionConfiguration=b7;exports.getEndpointPlugin=DM;exports.getHostHeaderPlugin=k7;exports.getHttpAuthSchemeEndpointRuleSetPlugin=HW;exports.getHttpHandlerExtensionConfiguration=jW;exports.getHttpSigningPlugin=qW;exports.getLoggerPlugin=R7;exports.getRecursionDetectionPlugin=M7;exports.getRetryPlugin=lK;exports.getSchemaSerdePlugin=ZW;exports.getSmithyContext=gl;exports.getUserAgentPlugin=W7;exports.invalidProvider=nY;exports.isIpAddress=MM;exports.isValidHostLabel=pg;exports.loadConfigsForDefaultMode=g7;exports.mui=uE;exports.normalizeProvider=Rs;exports.parseEpochTimestamp=Mze;exports.parseRfc3339DateTimeWithOffset=Pze;exports.parseRfc7231DateTime=Rze;exports.parseUrl=hm;exports.resolveAwsRegionExtensionConfiguration=iY;exports.resolveAwsSdkSigV4Config=p7;exports.resolveDefaultRuntimeConfig=y7;exports.resolveDefaultsModeConfig=rY;exports.resolveEndpoint=q7;exports.resolveEndpointConfig=nK;exports.resolveHostHeaderConfig=x3e;exports.resolveHttpHandlerRuntimeConfig=BW;exports.resolveRegionConfig=X7;exports.resolveRetryConfig=aK;exports.resolveUserAgentConfig=D7;exports.streamCollector=xM;exports.toBase64=oc;exports.toUtf8=zu;exports.v4=OC;