@agentlang/lstudio 0.4.9 → 0.5.1

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.
@@ -1 +1 @@
1
- import{f as x,b as H,H as k,n as y,c as ee,t as te,h as se}from"./normalizeProvider-CtDY37Q6.js";import{Y as re,N as S,h as W,L as ie,f as G,i as ne,a as oe,c as ae,S as $,m as ce,d as ue,b as de,T as N,e as I,v as le,R as ge,j as fe,g as P}from"./resolveDefaultsModeConfig-CdugAlDm.js";function U(s){return encodeURIComponent(s).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}const R="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",M="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",O="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",K="(\\d?\\d)",Q="(\\d{4})",me=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),pe=new RegExp(`^${R}, ${K} ${M} ${Q} ${O} GMT$`),he=new RegExp(`^${R}, ${K}-${M}-(\\d\\d) ${O} GMT$`),we=new RegExp(`^${R} ${M} ( [1-9]|\\d\\d) ${O} ${Q}$`),Se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ye=s=>{if(s==null)return;let e=NaN;if(typeof s=="number")e=s;else if(typeof s=="string"){if(!/^-?\d*\.?\d+$/.test(s))throw new TypeError("parseEpochTimestamp - numeric string invalid.");e=Number.parseFloat(s)}else typeof s=="object"&&s.tag===1&&(e=s.value);if(isNaN(e)||Math.abs(e)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(e*1e3))},Ee=s=>{if(s==null)return;if(typeof s!="string")throw new TypeError("RFC3339 timestamps must be strings");const e=me.exec(s);if(!e)throw new TypeError(`Invalid RFC3339 timestamp format ${s}`);const[,t,r,i,n,o,a,,u,c]=e;w(r,1,12),w(i,1,31),w(n,0,23),w(o,0,59),w(a,0,60);const d=new Date(Date.UTC(Number(t),Number(r)-1,Number(i),Number(n),Number(o),Number(a),Number(u)?Math.round(parseFloat(`0.${u}`)*1e3):0));if(d.setUTCFullYear(Number(t)),c.toUpperCase()!="Z"){const[,l,g,f]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],m=l==="-"?1:-1;d.setTime(d.getTime()+m*(Number(g)*60*60*1e3+Number(f)*60*1e3))}return d},be=s=>{if(s==null)return;if(typeof s!="string")throw new TypeError("RFC7231 timestamps must be strings.");let e,t,r,i,n,o,a,u;if((u=pe.exec(s))?[,e,t,r,i,n,o,a]=u:(u=he.exec(s))?([,e,t,r,i,n,o,a]=u,r=(Number(r)+1900).toString()):(u=we.exec(s))&&([,t,e,i,n,o,a,r]=u),r&&o){const c=Date.UTC(Number(r),Se.indexOf(t),Number(e),Number(i),Number(n),Number(o),a?Math.round(parseFloat(`0.${a}`)*1e3):0);w(e,1,31),w(i,0,23),w(n,0,59),w(o,0,60);const d=new Date(c);return d.setUTCFullYear(Number(r)),d}throw new TypeError(`Invalid RFC7231 date-time value ${s}.`)};function w(s,e,t){const r=Number(s);if(r<e||r>t)throw new Error(`Value ${r} out of range [${e}, ${t}]`)}const Ce=s=>{const e=s.length,t=[];let r=!1,i,n=0;for(let o=0;o<e;++o){const a=s[o];switch(a){case'"':i!=="\\"&&(r=!r);break;case",":r||(t.push(s.slice(n,o)),n=o+1);break}i=a}return t.push(s.slice(n)),t.map(o=>{o=o.trim();const a=o.length;return a<2?o:(o[0]==='"'&&o[a-1]==='"'&&(o=o.slice(1,a-1)),o.replace(/\\"/g,'"'))})};class Ae extends re{settings;constructor(e){super(),this.settings=e}read(e,t){const r=S.of(e);if(r.isListSchema())return Ce(t).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??x)(t);if(r.isTimestampSchema())switch(W(r,this.settings)){case 5:return Ee(t);case 6:return be(t);case 7:return ye(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let n=t;if(i)return r.getMergedTraits().httpHeader&&(n=this.base64ToUtf8(n)),(i==="application/json"||i.endsWith("+json"))&&(n=ie.from(n)),n}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new G(t,"bigDecimal"):r.isBooleanSchema()?String(t).toLowerCase()==="true":t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??H)((this.serdeContext?.base64Decoder??x)(e))}}const q=s=>{const e="#text";for(const t in s)s.hasOwnProperty(t)&&s[t][e]!==void 0?s[t]=s[t][e]:typeof s[t]=="object"&&s[t]!==null&&(s[t]=q(s[t]));return s};function ot(s){return s}const Te=s=>e=>async t=>{if(!k.isInstance(t.request))return e(t);const{request:r}=t,{handlerProtocol:i=""}=s.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let n=r.hostname;r.port!=null&&(n+=`:${r.port}`),r.headers.host=n}return e(t)},Ne={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},at=s=>({applyToStack:e=>{e.add(Te(s),Ne)}}),ke=()=>(s,e)=>async t=>{try{const r=await s(t),{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,l=c??e.outputFilterSensitiveLog,{$metadata:g,...f}=r.output;return o?.info?.({clientName:i,commandName:n,input:d(t.input),output:l(f),metadata:g}),r}catch(r){const{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:n,input:c(t.input),error:r,metadata:r.$metadata}),r}},Re={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ct=s=>({applyToStack:e=>{e.add(ke(),Re)}}),Me={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Oe=()=>s=>async e=>s(e),ut=s=>({applyToStack:e=>{e.add(Oe(),Me)}}),De=void 0;function _e(s){return s===void 0?!0:typeof s=="string"&&s.length<=50}function dt(s){const e=y(s.userAgentAppId??De),{customUserAgent:t}=s;return Object.assign(s,{customUserAgent:typeof t=="string"?[[t]]:t,userAgentAppId:async()=>{const r=await e();if(!_e(r)){const i=s.logger?.constructor?.name==="NoOpLogger"||!s.logger?console:s.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const X=(s,e=!1)=>{if(e){for(const t of s.split("."))if(!X(t))return!1;return!0}return!(!ne(s)||s.length<3||s.length>63||s!==s.toLowerCase()||oe(s))},F=":",xe="/",$e=s=>{const e=s.split(F);if(e.length<6)return null;const[t,r,i,n,o,...a]=e;if(t!=="arn"||r===""||i===""||a.join(F)==="")return null;const u=a.map(c=>c.split(xe)).flat();return{partition:r,service:i,region:n,accountId:o,resourceId:u}},Ie=[{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)"}}}],Pe={partitions:Ie};let Ue=Pe;const Fe=s=>{const{partitions:e}=Ue;for(const r of e){const{regions:i,outputs:n}=r;for(const[o,a]of Object.entries(i))if(o===s)return{...n,...a}}for(const r of e){const{regionRegex:i,outputs:n}=r;if(new RegExp(i).test(s))return{...n}}const t=e.find(r=>r.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}},ze={isVirtualHostableS3Bucket:X,parseArn:$e,partition:Fe};ae.aws=ze;function Le(s,e,t){return s.$source||(s.$source={}),s.$source[e]=t,s}function h(s,e,t){s.__aws_sdk_context?s.__aws_sdk_context.features||(s.__aws_sdk_context.features={}):s.__aws_sdk_context={features:{}},s.__aws_sdk_context.features[e]=t}const z=s=>ee.isInstance(s)?s.headers?.date??s.headers?.Date:void 0,J=s=>new Date(Date.now()+s),ve=(s,e)=>Math.abs(J(e).getTime()-s)>=3e5,L=(s,e)=>{const t=Date.parse(s);return ve(t,e)?t-Date.now():e},E=(s,e)=>{if(!e)throw new Error(`Property \`${s}\` is not resolved for AWS SDK SigV4Auth`);return e},Ve=async s=>{const e=E("context",s.context),t=E("config",s.config),r=e.endpointV2?.properties?.authSchemes?.[0],n=await E("signer",t.signer)(r),o=s?.signingRegion,a=s?.signingRegionSet,u=s?.signingName;return{config:t,signer:n,signingRegion:o,signingRegionSet:a,signingName:u}};class lt{async sign(e,t,r){if(!k.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await Ve(r),{config:n,signer:o}=i;let{signingRegion:a,signingName:u}=i;const c=r.context;if(c?.authSchemes?.length??!1){const[l,g]=c.authSchemes;l?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:J(n.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return t=>{const r=t.ServerTime??z(t.$response);if(r){const i=E("config",e.config),n=i.systemClockOffset;i.systemClockOffset=L(r,i.systemClockOffset),i.systemClockOffset!==n&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=z(e);if(r){const i=E("config",t.config);i.systemClockOffset=L(r,i.systemClockOffset)}}}const gt=s=>{let e=s.credentials,t=!!s.credentials,r;Object.defineProperty(s,"credentials",{set(c){c&&c!==e&&c!==r&&(t=!0),e=c;const d=je(s,{credentials:e,credentialDefaultProvider:s.credentialDefaultProvider}),l=Be(s,d);if(t&&!l.attributed){const g=typeof e=="object"&&e!==null;r=async f=>{const p=await l(f);return g&&(!p.$source||Object.keys(p.$source).length===0)?Le(p,"CREDENTIALS_CODE","e"):p},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),s.credentials=e;const{signingEscapePath:i=!0,systemClockOffset:n=s.systemClockOffset||0,sha256:o}=s;let a;return s.signer?a=y(s.signer):s.regionInfoProvider?a=()=>y(s.region)().then(async c=>[await s.regionInfoProvider(c,{useFipsEndpoint:await s.useFipsEndpoint(),useDualstackEndpoint:await s.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:l,signingService:g}=c;s.signingRegion=s.signingRegion||l||d,s.signingName=s.signingName||g||s.serviceId;const f={...s,credentials:s.credentials,region:s.signingRegion,service:s.signingName,sha256:o,uriEscapePath:i},m=s.signerConstructor||$;return new m(f)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:s.signingName||s.defaultSigningName,signingRegion:await y(s.region)(),properties:{}},c);const d=c.signingRegion,l=c.signingName;s.signingRegion=s.signingRegion||d,s.signingName=s.signingName||l||s.serviceId;const g={...s,credentials:s.credentials,region:s.signingRegion,service:s.signingName,sha256:o,uriEscapePath:i},f=s.signerConstructor||$;return new f(g)},Object.assign(s,{systemClockOffset:n,signingEscapePath:i,signer:a})};function je(s,{credentials:e,credentialDefaultProvider:t}){let r;return e?e?.memoized?r=e:r=ce(e,de,ue):t?r=y(t(Object.assign({},s,{parentClientConfig:s}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Be(s,e){if(e.configBound)return e;const t=async r=>e({...r,callerClientConfig:s});return t.memoized=e.memoized,t.configBound=!0,t}class He{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const r=t.getMemberSchemas(),i=Object.values(r).find(n=>!!n.getMergedTraits().httpPayload);if(i){const n=i.getMergedTraits().mediaType;return n||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":e)}else if(!t.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!u&&!c&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,t,r,i,n,o){let a=t,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:n,$fault:r.statusCode<500?"client":"server"},d=N.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{i.message=i.message??i.Message??"UnknownError";const g=N.for("smithy.ts.sdk.synthetic."+a),f=g.getBaseException();if(f){const m=g.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:u}),c),i)}throw this.decorateServiceException(Object.assign(new Error(u),c),i)}}decorateServiceException(e,t={}){if(this.queryCompat){const r=e.Message??t.Message,i=I(e,t);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const n=i.$metadata.requestId;return n&&(i.RequestId=n),i}return I(e,t)}setQueryCompatError(e,t){const r=t.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[i,n]=r.split(";"),o=Object.entries(e),a={Code:i,Type:n};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch{return e.find(i=>S.of(i).getMergedTraits().awsQueryError?.[0]===t)}}}class Y{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*We(s,e){if(s.isUnitSchema())return;const t=s.getSchema();for(let r=0;r<t[4].length;++r){const i=t[4][r],n=t[5][r],o=new S([n,0],i);!(i in e)&&!o.isIdempotencyToken()||(yield[i,o])}}class Ge{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}let C;function Ke(s){C||(C=new DOMParser);const e=C.parseFromString(s,"application/xml");if(e.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const t=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const n={},o=Array.from(i.attributes);for(const u of o)n[`${u.name}`]=u.value;const a=Array.from(i.childNodes);for(const u of a){const c=t(u);if(c!=null){const d=u.nodeName;if(a.length===1&&o.length===0&&d==="#text")return c;n[d]?Array.isArray(n[d])?n[d].push(c):n[d]=[n[d],c]:n[d]=c}else if(a.length===1&&o.length===0)return i.textContent}return n}return null};return{[e.documentElement.nodeName]:t(e.documentElement)}}class Qe extends Y{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new Ae(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,r){const i=S.of(e),n=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(n).find(c=>!!c.getMemberTraits().eventPayload)){const c={},d=Object.keys(n)[0];return n[d].isBlobSchema()?c[d]=t:c[d]=this.read(n[d],t),c}const a=(this.serdeContext?.utf8Encoder??H)(t),u=this.parseXml(a);return this.readSchema(e,r?u[r]:u)}readSchema(e,t){const r=S.of(e);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(t))return this.readSchema(r,[t]);if(t==null)return t;if(typeof t=="object"){const n=!!i.sparse,o=!!i.xmlFlattened;if(r.isListSchema()){const u=r.getValueSchema(),c=[],d=u.getMergedTraits().xmlName??"member",l=o?t:(t[0]??t)[d],g=Array.isArray(l)?l:[l];for(const f of g)(f!=null||n)&&c.push(this.readSchema(u,f));return c}const a={};if(r.isMapSchema()){const u=r.getKeySchema(),c=r.getValueSchema();let d;o?d=Array.isArray(t)?t:[t]:d=Array.isArray(t.entry)?t.entry:[t.entry];const l=u.getMergedTraits().xmlName??"key",g=c.getMergedTraits().xmlName??"value";for(const f of d){const m=f[l],p=f[g];(p!=null||n)&&(a[m]=this.readSchema(c,p))}return a}if(r.isStructSchema()){const u=r.isUnionSchema();let c;u&&(c=new Ge(t,a));for(const[d,l]of r.structIterator()){const g=l.getMergedTraits(),f=g.httpPayload?g.xmlName??l.getName():l.getMemberTraits().xmlName??d;u&&c.mark(f),t[f]!=null&&(a[d]=this.readSchema(l,t[f]))}return u&&c.writeUnknown(),a}if(r.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,t)}parseXml(e){if(e.length){let t;try{t=Ke(e)}catch(o){throw o&&typeof o=="object"&&Object.defineProperty(o,"$responseBodyText",{value:e}),o}const r="#text",i=Object.keys(t)[0],n=t[i];return n[r]&&(n[i]=n[r],delete n[r]),q(n)}return{}}}class qe extends Y{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,r=""){this.buffer===void 0&&(this.buffer="");const i=S.of(e);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof t=="string"||t instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??te)(t)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())t!=null?(this.writeKey(r),this.writeValue(String(t))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(le()));else if(i.isBigIntegerSchema())t!=null&&(this.writeKey(r),this.writeValue(String(t)));else if(i.isBigDecimalSchema())t!=null&&(this.writeKey(r),this.writeValue(t instanceof G?t.string:String(t)));else if(i.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(r),W(i,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(se(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(t)?this.write(79,t,r):t instanceof Date?this.write(4,t,r):t instanceof Uint8Array?this.write(21,t,r):t&&typeof t=="object"?this.write(143,t,r):(this.writeKey(r),this.writeValue(String(t)));else if(i.isListSchema()){if(Array.isArray(t))if(t.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const n=i.getValueSchema(),o=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let a=1;for(const u of t){if(u==null)continue;const c=this.getKey("member",n.getMergedTraits().xmlName),d=o?`${r}${a}`:`${r}${c}.${a}`;this.write(n,u,d),++a}}}else if(i.isMapSchema()){if(t&&typeof t=="object"){const n=i.getKeySchema(),o=i.getValueSchema(),a=i.getMergedTraits().xmlFlattened;let u=1;for(const[c,d]of Object.entries(t)){if(d==null)continue;const l=this.getKey("key",n.getMergedTraits().xmlName),g=a?`${r}${u}.${l}`:`${r}entry.${u}.${l}`,f=this.getKey("value",o.getMergedTraits().xmlName),m=a?`${r}${u}.${f}`:`${r}entry.${u}.${f}`;this.write(n,c,g),this.write(o,d,m),++u}}}else if(i.isStructSchema()){if(t&&typeof t=="object"){let n=!1;for(const[o,a]of We(i,t)){if(t[o]==null&&!a.isIdempotencyToken())continue;const u=this.getKey(o,a.getMergedTraits().xmlName),c=`${r}${u}`;this.write(a,t[o],c),n=!0}if(!n&&i.isUnionSchema()){const{$unknown:o}=t;if(Array.isArray(o)){const[a,u]=o,c=`${r}${a}`;this.write(15,u,c)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t){const r=t??e;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${U(e)}=`}writeValue(e){this.buffer+=U(e)}}class ft extends ge{options;serializer;deserializer;mixin=new He;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new qe(t),this.deserializer=new Qe(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,r){const i=await super.serializeRequest(e,t,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(fe(e.input)==="unit"||!i.body)&&(i.body="");const n=e.name.split("#")[1]??e.name;return i.body=`Action=${n}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(e,t,r){const i=this.deserializer,n=S.of(e.output),o={};if(r.statusCode>=300){const l=await P(r.body,t);l.byteLength>0&&Object.assign(o,await i.read(15,l)),await this.handleError(e,t,r,o,this.deserializeMetadata(r))}for(const l in r.headers){const g=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=g}const a=e.name.split("#")[1]??e.name,u=n.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await P(r.body,t);return c.byteLength>0&&Object.assign(o,await i.read(n,c,u)),{$metadata:this.deserializeMetadata(r),...o}}useNestedResult(){return!0}async handleError(e,t,r,i,n){const o=this.loadQueryErrorCode(r,i)??"Unknown",a=this.loadQueryError(i),u=this.loadQueryErrorMessage(i);a.message=u,a.Error={Type:a.Type,Code:a.Code,Message:u};const{errorSchema:c,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,a,n,this.mixin.findQueryCompatibleError),l=S.of(c),g=N.for(c[1]).getErrorCtor(c)??Error,f=new g(u),m={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[p,D]of l.structIterator()){const _=D.getMergedTraits().xmlName??p,Z=a[_]??i[_];m[p]=this.deserializer.readSchema(D,Z)}throw this.mixin.decorateServiceException(Object.assign(f,d,{$fault:l.getMergedTraits().error,message:u},m),i)}loadQueryErrorCode(e,t){const r=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(r!==void 0)return r;if(e.statusCode==404)return"NotFound"}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Xe=/\d{12}\.ddb/;async function Je(s,e,t){if(t.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&h(s,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const n=await e.retryStrategy();typeof n.acquireInitialRetryToken=="function"?n.constructor?.name?.includes("Adaptive")?h(s,"RETRY_MODE_ADAPTIVE","F"):h(s,"RETRY_MODE_STANDARD","E"):h(s,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const n=s.endpointV2;switch(String(n?.url?.hostname).match(Xe)&&h(s,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":h(s,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":h(s,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":h(s,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=s.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const n=i;n.accountId&&h(s,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(n.$source??{}))h(s,o,a)}}const v="user-agent",A="x-amz-user-agent",V=" ",T="/",Ye=/[^!$%&'*+\-.^_`|~\w]/g,Ze=/[^!$%&'*+\-.^_`|~\w#]/g,j="-",et=1024;function tt(s){let e="";for(const t in s){const r=s[t];if(e.length+r.length+1<=et){e.length?e+=","+r:e+=r;continue}break}return e}const st=s=>(e,t)=>async r=>{const{request:i}=r;if(!k.isInstance(i))return e(r);const{headers:n}=i,o=t?.userAgent?.map(b)||[],a=(await s.defaultUserAgentProvider()).map(b);await Je(t,s,r);const u=t;a.push(`m/${tt(Object.assign({},t.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=s?.customUserAgent?.map(b)||[],d=await s.userAgentAppId();d&&a.push(b(["app",`${d}`]));const l=[].concat([...a,...o,...c]).join(V),g=[...a.filter(f=>f.startsWith("aws-sdk-")),...c].join(V);return s.runtime!=="browser"?(g&&(n[A]=n[A]?`${n[v]} ${g}`:g),n[v]=l):n[A]=l,e({...r,request:i})},b=s=>{const e=s[0].split(T).map(o=>o.replace(Ye,j)).join(T),t=s[1]?.replace(Ze,j),r=e.indexOf(T),i=e.substring(0,r);let n=e.substring(r+1);return i==="api"&&(n=n.toLowerCase()),[i,n,t].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},rt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},mt=s=>({applyToStack:e=>{e.add(st(s),rt)}}),pt=({serviceId:s,clientVersion:e})=>async t=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",n=r?.userAgentData?.platform??B.os(i)??"other",o=void 0,a=r?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??B.browser(i)??"unknown",d=u?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${n}`,o],["lang/js"],["md/browser",`${c}_${d}`]];s&&l.push([`api/${s}`,e]);const g=await t?.userAgentAppId?.();return g&&l.push([`app/${g}`]),l},B={os(s){if(/iPhone|iPad|iPod/.test(s))return"iOS";if(/Macintosh|Mac OS X/.test(s))return"macOS";if(/Windows NT/.test(s))return"Windows";if(/Android/.test(s))return"Android";if(/Linux/.test(s))return"Linux"},browser(s){if(/EdgiOS|EdgA|Edg\//.test(s))return"Microsoft Edge";if(/Firefox\//.test(s))return"Firefox";if(/Chrome\//.test(s))return"Chrome";if(/Safari\//.test(s))return"Safari"}},ht=s=>({setRegion(e){s.region=e},region(){return s.region}}),wt=s=>({region:s.region()});export{ft as A,ze as a,lt as b,pt as c,wt as d,dt as e,mt as f,ht as g,at as h,ct as i,ut as j,ot as k,gt as r,Le as s};
1
+ import{f as x,b as H,H as k,n as y,c as ee,t as te,h as se}from"./normalizeProvider-CtDY37Q6.js";import{Y as re,N as S,h as W,L as ie,f as G,i as ne,a as oe,c as ae,S as $,m as ce,d as ue,b as de,T as N,e as I,v as le,R as ge,j as fe,g as P}from"./resolveDefaultsModeConfig-tQhK1DqL.js";function U(s){return encodeURIComponent(s).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}const R="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",M="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",O="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",K="(\\d?\\d)",Q="(\\d{4})",me=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),pe=new RegExp(`^${R}, ${K} ${M} ${Q} ${O} GMT$`),he=new RegExp(`^${R}, ${K}-${M}-(\\d\\d) ${O} GMT$`),we=new RegExp(`^${R} ${M} ( [1-9]|\\d\\d) ${O} ${Q}$`),Se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ye=s=>{if(s==null)return;let e=NaN;if(typeof s=="number")e=s;else if(typeof s=="string"){if(!/^-?\d*\.?\d+$/.test(s))throw new TypeError("parseEpochTimestamp - numeric string invalid.");e=Number.parseFloat(s)}else typeof s=="object"&&s.tag===1&&(e=s.value);if(isNaN(e)||Math.abs(e)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(e*1e3))},Ee=s=>{if(s==null)return;if(typeof s!="string")throw new TypeError("RFC3339 timestamps must be strings");const e=me.exec(s);if(!e)throw new TypeError(`Invalid RFC3339 timestamp format ${s}`);const[,t,r,i,n,o,a,,u,c]=e;w(r,1,12),w(i,1,31),w(n,0,23),w(o,0,59),w(a,0,60);const d=new Date(Date.UTC(Number(t),Number(r)-1,Number(i),Number(n),Number(o),Number(a),Number(u)?Math.round(parseFloat(`0.${u}`)*1e3):0));if(d.setUTCFullYear(Number(t)),c.toUpperCase()!="Z"){const[,l,g,f]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],m=l==="-"?1:-1;d.setTime(d.getTime()+m*(Number(g)*60*60*1e3+Number(f)*60*1e3))}return d},be=s=>{if(s==null)return;if(typeof s!="string")throw new TypeError("RFC7231 timestamps must be strings.");let e,t,r,i,n,o,a,u;if((u=pe.exec(s))?[,e,t,r,i,n,o,a]=u:(u=he.exec(s))?([,e,t,r,i,n,o,a]=u,r=(Number(r)+1900).toString()):(u=we.exec(s))&&([,t,e,i,n,o,a,r]=u),r&&o){const c=Date.UTC(Number(r),Se.indexOf(t),Number(e),Number(i),Number(n),Number(o),a?Math.round(parseFloat(`0.${a}`)*1e3):0);w(e,1,31),w(i,0,23),w(n,0,59),w(o,0,60);const d=new Date(c);return d.setUTCFullYear(Number(r)),d}throw new TypeError(`Invalid RFC7231 date-time value ${s}.`)};function w(s,e,t){const r=Number(s);if(r<e||r>t)throw new Error(`Value ${r} out of range [${e}, ${t}]`)}const Ce=s=>{const e=s.length,t=[];let r=!1,i,n=0;for(let o=0;o<e;++o){const a=s[o];switch(a){case'"':i!=="\\"&&(r=!r);break;case",":r||(t.push(s.slice(n,o)),n=o+1);break}i=a}return t.push(s.slice(n)),t.map(o=>{o=o.trim();const a=o.length;return a<2?o:(o[0]==='"'&&o[a-1]==='"'&&(o=o.slice(1,a-1)),o.replace(/\\"/g,'"'))})};class Ae extends re{settings;constructor(e){super(),this.settings=e}read(e,t){const r=S.of(e);if(r.isListSchema())return Ce(t).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??x)(t);if(r.isTimestampSchema())switch(W(r,this.settings)){case 5:return Ee(t);case 6:return be(t);case 7:return ye(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let n=t;if(i)return r.getMergedTraits().httpHeader&&(n=this.base64ToUtf8(n)),(i==="application/json"||i.endsWith("+json"))&&(n=ie.from(n)),n}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new G(t,"bigDecimal"):r.isBooleanSchema()?String(t).toLowerCase()==="true":t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??H)((this.serdeContext?.base64Decoder??x)(e))}}const q=s=>{const e="#text";for(const t in s)s.hasOwnProperty(t)&&s[t][e]!==void 0?s[t]=s[t][e]:typeof s[t]=="object"&&s[t]!==null&&(s[t]=q(s[t]));return s};function ot(s){return s}const Te=s=>e=>async t=>{if(!k.isInstance(t.request))return e(t);const{request:r}=t,{handlerProtocol:i=""}=s.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let n=r.hostname;r.port!=null&&(n+=`:${r.port}`),r.headers.host=n}return e(t)},Ne={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},at=s=>({applyToStack:e=>{e.add(Te(s),Ne)}}),ke=()=>(s,e)=>async t=>{try{const r=await s(t),{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,l=c??e.outputFilterSensitiveLog,{$metadata:g,...f}=r.output;return o?.info?.({clientName:i,commandName:n,input:d(t.input),output:l(f),metadata:g}),r}catch(r){const{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:n,input:c(t.input),error:r,metadata:r.$metadata}),r}},Re={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ct=s=>({applyToStack:e=>{e.add(ke(),Re)}}),Me={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Oe=()=>s=>async e=>s(e),ut=s=>({applyToStack:e=>{e.add(Oe(),Me)}}),De=void 0;function _e(s){return s===void 0?!0:typeof s=="string"&&s.length<=50}function dt(s){const e=y(s.userAgentAppId??De),{customUserAgent:t}=s;return Object.assign(s,{customUserAgent:typeof t=="string"?[[t]]:t,userAgentAppId:async()=>{const r=await e();if(!_e(r)){const i=s.logger?.constructor?.name==="NoOpLogger"||!s.logger?console:s.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const X=(s,e=!1)=>{if(e){for(const t of s.split("."))if(!X(t))return!1;return!0}return!(!ne(s)||s.length<3||s.length>63||s!==s.toLowerCase()||oe(s))},F=":",xe="/",$e=s=>{const e=s.split(F);if(e.length<6)return null;const[t,r,i,n,o,...a]=e;if(t!=="arn"||r===""||i===""||a.join(F)==="")return null;const u=a.map(c=>c.split(xe)).flat();return{partition:r,service:i,region:n,accountId:o,resourceId:u}},Ie=[{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)"}}}],Pe={partitions:Ie};let Ue=Pe;const Fe=s=>{const{partitions:e}=Ue;for(const r of e){const{regions:i,outputs:n}=r;for(const[o,a]of Object.entries(i))if(o===s)return{...n,...a}}for(const r of e){const{regionRegex:i,outputs:n}=r;if(new RegExp(i).test(s))return{...n}}const t=e.find(r=>r.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}},ze={isVirtualHostableS3Bucket:X,parseArn:$e,partition:Fe};ae.aws=ze;function Le(s,e,t){return s.$source||(s.$source={}),s.$source[e]=t,s}function h(s,e,t){s.__aws_sdk_context?s.__aws_sdk_context.features||(s.__aws_sdk_context.features={}):s.__aws_sdk_context={features:{}},s.__aws_sdk_context.features[e]=t}const z=s=>ee.isInstance(s)?s.headers?.date??s.headers?.Date:void 0,J=s=>new Date(Date.now()+s),ve=(s,e)=>Math.abs(J(e).getTime()-s)>=3e5,L=(s,e)=>{const t=Date.parse(s);return ve(t,e)?t-Date.now():e},E=(s,e)=>{if(!e)throw new Error(`Property \`${s}\` is not resolved for AWS SDK SigV4Auth`);return e},Ve=async s=>{const e=E("context",s.context),t=E("config",s.config),r=e.endpointV2?.properties?.authSchemes?.[0],n=await E("signer",t.signer)(r),o=s?.signingRegion,a=s?.signingRegionSet,u=s?.signingName;return{config:t,signer:n,signingRegion:o,signingRegionSet:a,signingName:u}};class lt{async sign(e,t,r){if(!k.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await Ve(r),{config:n,signer:o}=i;let{signingRegion:a,signingName:u}=i;const c=r.context;if(c?.authSchemes?.length??!1){const[l,g]=c.authSchemes;l?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:J(n.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return t=>{const r=t.ServerTime??z(t.$response);if(r){const i=E("config",e.config),n=i.systemClockOffset;i.systemClockOffset=L(r,i.systemClockOffset),i.systemClockOffset!==n&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=z(e);if(r){const i=E("config",t.config);i.systemClockOffset=L(r,i.systemClockOffset)}}}const gt=s=>{let e=s.credentials,t=!!s.credentials,r;Object.defineProperty(s,"credentials",{set(c){c&&c!==e&&c!==r&&(t=!0),e=c;const d=je(s,{credentials:e,credentialDefaultProvider:s.credentialDefaultProvider}),l=Be(s,d);if(t&&!l.attributed){const g=typeof e=="object"&&e!==null;r=async f=>{const p=await l(f);return g&&(!p.$source||Object.keys(p.$source).length===0)?Le(p,"CREDENTIALS_CODE","e"):p},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),s.credentials=e;const{signingEscapePath:i=!0,systemClockOffset:n=s.systemClockOffset||0,sha256:o}=s;let a;return s.signer?a=y(s.signer):s.regionInfoProvider?a=()=>y(s.region)().then(async c=>[await s.regionInfoProvider(c,{useFipsEndpoint:await s.useFipsEndpoint(),useDualstackEndpoint:await s.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:l,signingService:g}=c;s.signingRegion=s.signingRegion||l||d,s.signingName=s.signingName||g||s.serviceId;const f={...s,credentials:s.credentials,region:s.signingRegion,service:s.signingName,sha256:o,uriEscapePath:i},m=s.signerConstructor||$;return new m(f)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:s.signingName||s.defaultSigningName,signingRegion:await y(s.region)(),properties:{}},c);const d=c.signingRegion,l=c.signingName;s.signingRegion=s.signingRegion||d,s.signingName=s.signingName||l||s.serviceId;const g={...s,credentials:s.credentials,region:s.signingRegion,service:s.signingName,sha256:o,uriEscapePath:i},f=s.signerConstructor||$;return new f(g)},Object.assign(s,{systemClockOffset:n,signingEscapePath:i,signer:a})};function je(s,{credentials:e,credentialDefaultProvider:t}){let r;return e?e?.memoized?r=e:r=ce(e,de,ue):t?r=y(t(Object.assign({},s,{parentClientConfig:s}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Be(s,e){if(e.configBound)return e;const t=async r=>e({...r,callerClientConfig:s});return t.memoized=e.memoized,t.configBound=!0,t}class He{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const r=t.getMemberSchemas(),i=Object.values(r).find(n=>!!n.getMergedTraits().httpPayload);if(i){const n=i.getMergedTraits().mediaType;return n||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":e)}else if(!t.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!u&&!c&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,t,r,i,n,o){let a=t,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:n,$fault:r.statusCode<500?"client":"server"},d=N.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{i.message=i.message??i.Message??"UnknownError";const g=N.for("smithy.ts.sdk.synthetic."+a),f=g.getBaseException();if(f){const m=g.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:u}),c),i)}throw this.decorateServiceException(Object.assign(new Error(u),c),i)}}decorateServiceException(e,t={}){if(this.queryCompat){const r=e.Message??t.Message,i=I(e,t);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const n=i.$metadata.requestId;return n&&(i.RequestId=n),i}return I(e,t)}setQueryCompatError(e,t){const r=t.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[i,n]=r.split(";"),o=Object.entries(e),a={Code:i,Type:n};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch{return e.find(i=>S.of(i).getMergedTraits().awsQueryError?.[0]===t)}}}class Y{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*We(s,e){if(s.isUnitSchema())return;const t=s.getSchema();for(let r=0;r<t[4].length;++r){const i=t[4][r],n=t[5][r],o=new S([n,0],i);!(i in e)&&!o.isIdempotencyToken()||(yield[i,o])}}class Ge{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}let C;function Ke(s){C||(C=new DOMParser);const e=C.parseFromString(s,"application/xml");if(e.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const t=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const n={},o=Array.from(i.attributes);for(const u of o)n[`${u.name}`]=u.value;const a=Array.from(i.childNodes);for(const u of a){const c=t(u);if(c!=null){const d=u.nodeName;if(a.length===1&&o.length===0&&d==="#text")return c;n[d]?Array.isArray(n[d])?n[d].push(c):n[d]=[n[d],c]:n[d]=c}else if(a.length===1&&o.length===0)return i.textContent}return n}return null};return{[e.documentElement.nodeName]:t(e.documentElement)}}class Qe extends Y{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new Ae(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,r){const i=S.of(e),n=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(n).find(c=>!!c.getMemberTraits().eventPayload)){const c={},d=Object.keys(n)[0];return n[d].isBlobSchema()?c[d]=t:c[d]=this.read(n[d],t),c}const a=(this.serdeContext?.utf8Encoder??H)(t),u=this.parseXml(a);return this.readSchema(e,r?u[r]:u)}readSchema(e,t){const r=S.of(e);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(t))return this.readSchema(r,[t]);if(t==null)return t;if(typeof t=="object"){const n=!!i.sparse,o=!!i.xmlFlattened;if(r.isListSchema()){const u=r.getValueSchema(),c=[],d=u.getMergedTraits().xmlName??"member",l=o?t:(t[0]??t)[d],g=Array.isArray(l)?l:[l];for(const f of g)(f!=null||n)&&c.push(this.readSchema(u,f));return c}const a={};if(r.isMapSchema()){const u=r.getKeySchema(),c=r.getValueSchema();let d;o?d=Array.isArray(t)?t:[t]:d=Array.isArray(t.entry)?t.entry:[t.entry];const l=u.getMergedTraits().xmlName??"key",g=c.getMergedTraits().xmlName??"value";for(const f of d){const m=f[l],p=f[g];(p!=null||n)&&(a[m]=this.readSchema(c,p))}return a}if(r.isStructSchema()){const u=r.isUnionSchema();let c;u&&(c=new Ge(t,a));for(const[d,l]of r.structIterator()){const g=l.getMergedTraits(),f=g.httpPayload?g.xmlName??l.getName():l.getMemberTraits().xmlName??d;u&&c.mark(f),t[f]!=null&&(a[d]=this.readSchema(l,t[f]))}return u&&c.writeUnknown(),a}if(r.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,t)}parseXml(e){if(e.length){let t;try{t=Ke(e)}catch(o){throw o&&typeof o=="object"&&Object.defineProperty(o,"$responseBodyText",{value:e}),o}const r="#text",i=Object.keys(t)[0],n=t[i];return n[r]&&(n[i]=n[r],delete n[r]),q(n)}return{}}}class qe extends Y{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,r=""){this.buffer===void 0&&(this.buffer="");const i=S.of(e);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof t=="string"||t instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??te)(t)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())t!=null?(this.writeKey(r),this.writeValue(String(t))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(le()));else if(i.isBigIntegerSchema())t!=null&&(this.writeKey(r),this.writeValue(String(t)));else if(i.isBigDecimalSchema())t!=null&&(this.writeKey(r),this.writeValue(t instanceof G?t.string:String(t)));else if(i.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(r),W(i,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(se(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(t)?this.write(79,t,r):t instanceof Date?this.write(4,t,r):t instanceof Uint8Array?this.write(21,t,r):t&&typeof t=="object"?this.write(143,t,r):(this.writeKey(r),this.writeValue(String(t)));else if(i.isListSchema()){if(Array.isArray(t))if(t.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const n=i.getValueSchema(),o=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let a=1;for(const u of t){if(u==null)continue;const c=this.getKey("member",n.getMergedTraits().xmlName),d=o?`${r}${a}`:`${r}${c}.${a}`;this.write(n,u,d),++a}}}else if(i.isMapSchema()){if(t&&typeof t=="object"){const n=i.getKeySchema(),o=i.getValueSchema(),a=i.getMergedTraits().xmlFlattened;let u=1;for(const[c,d]of Object.entries(t)){if(d==null)continue;const l=this.getKey("key",n.getMergedTraits().xmlName),g=a?`${r}${u}.${l}`:`${r}entry.${u}.${l}`,f=this.getKey("value",o.getMergedTraits().xmlName),m=a?`${r}${u}.${f}`:`${r}entry.${u}.${f}`;this.write(n,c,g),this.write(o,d,m),++u}}}else if(i.isStructSchema()){if(t&&typeof t=="object"){let n=!1;for(const[o,a]of We(i,t)){if(t[o]==null&&!a.isIdempotencyToken())continue;const u=this.getKey(o,a.getMergedTraits().xmlName),c=`${r}${u}`;this.write(a,t[o],c),n=!0}if(!n&&i.isUnionSchema()){const{$unknown:o}=t;if(Array.isArray(o)){const[a,u]=o,c=`${r}${a}`;this.write(15,u,c)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t){const r=t??e;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${U(e)}=`}writeValue(e){this.buffer+=U(e)}}class ft extends ge{options;serializer;deserializer;mixin=new He;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new qe(t),this.deserializer=new Qe(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,r){const i=await super.serializeRequest(e,t,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(fe(e.input)==="unit"||!i.body)&&(i.body="");const n=e.name.split("#")[1]??e.name;return i.body=`Action=${n}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(e,t,r){const i=this.deserializer,n=S.of(e.output),o={};if(r.statusCode>=300){const l=await P(r.body,t);l.byteLength>0&&Object.assign(o,await i.read(15,l)),await this.handleError(e,t,r,o,this.deserializeMetadata(r))}for(const l in r.headers){const g=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=g}const a=e.name.split("#")[1]??e.name,u=n.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await P(r.body,t);return c.byteLength>0&&Object.assign(o,await i.read(n,c,u)),{$metadata:this.deserializeMetadata(r),...o}}useNestedResult(){return!0}async handleError(e,t,r,i,n){const o=this.loadQueryErrorCode(r,i)??"Unknown",a=this.loadQueryError(i),u=this.loadQueryErrorMessage(i);a.message=u,a.Error={Type:a.Type,Code:a.Code,Message:u};const{errorSchema:c,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,a,n,this.mixin.findQueryCompatibleError),l=S.of(c),g=N.for(c[1]).getErrorCtor(c)??Error,f=new g(u),m={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[p,D]of l.structIterator()){const _=D.getMergedTraits().xmlName??p,Z=a[_]??i[_];m[p]=this.deserializer.readSchema(D,Z)}throw this.mixin.decorateServiceException(Object.assign(f,d,{$fault:l.getMergedTraits().error,message:u},m),i)}loadQueryErrorCode(e,t){const r=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(r!==void 0)return r;if(e.statusCode==404)return"NotFound"}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Xe=/\d{12}\.ddb/;async function Je(s,e,t){if(t.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&h(s,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const n=await e.retryStrategy();typeof n.acquireInitialRetryToken=="function"?n.constructor?.name?.includes("Adaptive")?h(s,"RETRY_MODE_ADAPTIVE","F"):h(s,"RETRY_MODE_STANDARD","E"):h(s,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const n=s.endpointV2;switch(String(n?.url?.hostname).match(Xe)&&h(s,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":h(s,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":h(s,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":h(s,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=s.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const n=i;n.accountId&&h(s,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(n.$source??{}))h(s,o,a)}}const v="user-agent",A="x-amz-user-agent",V=" ",T="/",Ye=/[^!$%&'*+\-.^_`|~\w]/g,Ze=/[^!$%&'*+\-.^_`|~\w#]/g,j="-",et=1024;function tt(s){let e="";for(const t in s){const r=s[t];if(e.length+r.length+1<=et){e.length?e+=","+r:e+=r;continue}break}return e}const st=s=>(e,t)=>async r=>{const{request:i}=r;if(!k.isInstance(i))return e(r);const{headers:n}=i,o=t?.userAgent?.map(b)||[],a=(await s.defaultUserAgentProvider()).map(b);await Je(t,s,r);const u=t;a.push(`m/${tt(Object.assign({},t.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=s?.customUserAgent?.map(b)||[],d=await s.userAgentAppId();d&&a.push(b(["app",`${d}`]));const l=[].concat([...a,...o,...c]).join(V),g=[...a.filter(f=>f.startsWith("aws-sdk-")),...c].join(V);return s.runtime!=="browser"?(g&&(n[A]=n[A]?`${n[v]} ${g}`:g),n[v]=l):n[A]=l,e({...r,request:i})},b=s=>{const e=s[0].split(T).map(o=>o.replace(Ye,j)).join(T),t=s[1]?.replace(Ze,j),r=e.indexOf(T),i=e.substring(0,r);let n=e.substring(r+1);return i==="api"&&(n=n.toLowerCase()),[i,n,t].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},rt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},mt=s=>({applyToStack:e=>{e.add(st(s),rt)}}),pt=({serviceId:s,clientVersion:e})=>async t=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",n=r?.userAgentData?.platform??B.os(i)??"other",o=void 0,a=r?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??B.browser(i)??"unknown",d=u?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${n}`,o],["lang/js"],["md/browser",`${c}_${d}`]];s&&l.push([`api/${s}`,e]);const g=await t?.userAgentAppId?.();return g&&l.push([`app/${g}`]),l},B={os(s){if(/iPhone|iPad|iPod/.test(s))return"iOS";if(/Macintosh|Mac OS X/.test(s))return"macOS";if(/Windows NT/.test(s))return"Windows";if(/Android/.test(s))return"Android";if(/Linux/.test(s))return"Linux"},browser(s){if(/EdgiOS|EdgA|Edg\//.test(s))return"Microsoft Edge";if(/Firefox\//.test(s))return"Firefox";if(/Chrome\//.test(s))return"Chrome";if(/Safari\//.test(s))return"Safari"}},ht=s=>({setRegion(e){s.region=e},region(){return s.region}}),wt=s=>({region:s.region()});export{ft as A,ze as a,lt as b,pt as c,wt as d,dt as e,mt as f,ht as g,at as h,ct as i,ut as j,ot as k,gt as r,Le as s};
@@ -1,4 +1,4 @@
1
- import{f as Er,l as Nr}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{y as Or,t as Lr,N as Ar,L as Cn,v as Fr}from"./winston-1qzyIKCb-CBXeuxcc.js";import{c as We}from"./__vite-browser-external-DLjrMatA.js";import{r as it}from"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import{E as Rt}from"./inherits_browser-nmOknR35-Bp0mvRSL.js";import{Y as Ir}from"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./util-DtOepkNk.js";import"./index-B_J_G8RH.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";function Cr(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var kn={exports:{}},Yn;function Ur(){return Yn||(Yn=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,s,u){function y(C,P){if(!s[C]){if(!r[C]){var ee=typeof it=="function"&&it;if(!P&&ee)return ee(C,!0);if(E)return E(C,!0);throw new Error("Cannot find module '"+C+"'")}P=s[C]={exports:{}},r[C][0].call(P.exports,function(M){var Q=r[C][1][M];return y(Q||M)},P,P.exports,n,r,s,u)}return s[C].exports}for(var E=typeof it=="function"&&it,F=0;F<u.length;F++)y(u[F]);return y})({1:[function(n,r,s){(function(u,y,E,F,C,P,ee,M,Q){var k=n("crypto");function g(d,_){_=v(d,_);var o;return(o=_.algorithm!=="passthrough"?k.createHash(_.algorithm):new D).write===void 0&&(o.write=o.update,o.end=o.update),b(_,o).dispatch(d),o.update||o.end(""),o.digest?o.digest(_.encoding==="buffer"?void 0:_.encoding):(d=o.read(),_.encoding!=="buffer"?d.toString(_.encoding):d)}(s=r.exports=g).sha1=function(d){return g(d)},s.keys=function(d){return g(d,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(d){return g(d,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(d){return g(d,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var c=k.getHashes?k.getHashes().slice():["sha1","md5"],p=(c.push("passthrough"),["buffer","hex","binary","base64"]);function v(d,_){var o={};if(o.algorithm=(_=_||{}).algorithm||"sha1",o.encoding=_.encoding||"hex",o.excludeValues=!!_.excludeValues,o.algorithm=o.algorithm.toLowerCase(),o.encoding=o.encoding.toLowerCase(),o.ignoreUnknown=_.ignoreUnknown===!0,o.respectType=_.respectType!==!1,o.respectFunctionNames=_.respectFunctionNames!==!1,o.respectFunctionProperties=_.respectFunctionProperties!==!1,o.unorderedArrays=_.unorderedArrays===!0,o.unorderedSets=_.unorderedSets!==!1,o.unorderedObjects=_.unorderedObjects!==!1,o.replacer=_.replacer||void 0,o.excludeKeys=_.excludeKeys||void 0,d===void 0)throw new Error("Object argument required.");for(var f=0;f<c.length;++f)c[f].toLowerCase()===o.algorithm.toLowerCase()&&(o.algorithm=c[f]);if(c.indexOf(o.algorithm)===-1)throw new Error('Algorithm "'+o.algorithm+'" not supported. supported values: '+c.join(", "));if(p.indexOf(o.encoding)===-1&&o.algorithm!=="passthrough")throw new Error('Encoding "'+o.encoding+'" not supported. supported values: '+p.join(", "));return o}function S(d){if(typeof d=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(d))!=null}function b(d,_,o){o=o||[];function f(a){return _.update?_.update(a,"utf8"):_.write(a,"utf8")}return{dispatch:function(a){return this["_"+((a=d.replacer?d.replacer(a):a)===null?"null":typeof a)](a)},_object:function(a){var m,w=Object.prototype.toString.call(a),W=/\[object (.*)\]/i.exec(w);if(W=(W=W?W[1]:"unknown:["+w+"]").toLowerCase(),0<=(w=o.indexOf(a)))return this.dispatch("[CIRCULAR:"+w+"]");if(o.push(a),E!==void 0&&E.isBuffer&&E.isBuffer(a))return f("buffer:"),f(a);if(W==="object"||W==="function"||W==="asyncfunction")return w=Object.keys(a),d.unorderedObjects&&(w=w.sort()),d.respectType===!1||S(a)||w.splice(0,0,"prototype","__proto__","constructor"),d.excludeKeys&&(w=w.filter(function(R){return!d.excludeKeys(R)})),f("object:"+w.length+":"),m=this,w.forEach(function(R){m.dispatch(R),f(":"),d.excludeValues||m.dispatch(a[R]),f(",")});if(!this["_"+W]){if(d.ignoreUnknown)return f("["+W+"]");throw new Error('Unknown object type "'+W+'"')}this["_"+W](a)},_array:function(a,R){R=R!==void 0?R:d.unorderedArrays!==!1;var w=this;if(f("array:"+a.length+":"),!R||a.length<=1)return a.forEach(function(j){return w.dispatch(j)});var W=[],R=a.map(function(j){var I=new D,B=o.slice();return b(d,I,B).dispatch(j),W=W.concat(B.slice(o.length)),I.read().toString()});return o=o.concat(W),R.sort(),this._array(R,!1)},_date:function(a){return f("date:"+a.toJSON())},_symbol:function(a){return f("symbol:"+a.toString())},_error:function(a){return f("error:"+a.toString())},_boolean:function(a){return f("bool:"+a.toString())},_string:function(a){f("string:"+a.length+":"),f(a.toString())},_function:function(a){f("fn:"),S(a)?this.dispatch("[native]"):this.dispatch(a.toString()),d.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(a.name)),d.respectFunctionProperties&&this._object(a)},_number:function(a){return f("number:"+a.toString())},_xml:function(a){return f("xml:"+a.toString())},_null:function(){return f("Null")},_undefined:function(){return f("Undefined")},_regexp:function(a){return f("regex:"+a.toString())},_uint8array:function(a){return f("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return f("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return f("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return f("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return f("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return f("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return f("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return f("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return f("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return f("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return f("url:"+a.toString())},_map:function(a){return f("map:"),a=Array.from(a),this._array(a,d.unorderedSets!==!1)},_set:function(a){return f("set:"),a=Array.from(a),this._array(a,d.unorderedSets!==!1)},_file:function(a){return f("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(d.ignoreUnknown)return f("[blob]");throw Error(`Hashing Blob objects is currently not supported
1
+ import{f as Er,l as Nr}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{y as Or,t as Lr,N as Ar,L as Cn,v as Fr}from"./winston-1qzyIKCb-DDRDQd62.js";import{c as We}from"./__vite-browser-external-DLjrMatA.js";import{r as it}from"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import{E as Rt}from"./inherits_browser-nmOknR35-Bp0mvRSL.js";import{Y as Ir}from"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./util-BtFUhH79.js";import"./index-V-xWzSNb.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";function Cr(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var kn={exports:{}},Yn;function Ur(){return Yn||(Yn=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,s,u){function y(C,P){if(!s[C]){if(!r[C]){var ee=typeof it=="function"&&it;if(!P&&ee)return ee(C,!0);if(E)return E(C,!0);throw new Error("Cannot find module '"+C+"'")}P=s[C]={exports:{}},r[C][0].call(P.exports,function(M){var Q=r[C][1][M];return y(Q||M)},P,P.exports,n,r,s,u)}return s[C].exports}for(var E=typeof it=="function"&&it,F=0;F<u.length;F++)y(u[F]);return y})({1:[function(n,r,s){(function(u,y,E,F,C,P,ee,M,Q){var k=n("crypto");function g(d,_){_=v(d,_);var o;return(o=_.algorithm!=="passthrough"?k.createHash(_.algorithm):new D).write===void 0&&(o.write=o.update,o.end=o.update),b(_,o).dispatch(d),o.update||o.end(""),o.digest?o.digest(_.encoding==="buffer"?void 0:_.encoding):(d=o.read(),_.encoding!=="buffer"?d.toString(_.encoding):d)}(s=r.exports=g).sha1=function(d){return g(d)},s.keys=function(d){return g(d,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(d){return g(d,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(d){return g(d,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var c=k.getHashes?k.getHashes().slice():["sha1","md5"],p=(c.push("passthrough"),["buffer","hex","binary","base64"]);function v(d,_){var o={};if(o.algorithm=(_=_||{}).algorithm||"sha1",o.encoding=_.encoding||"hex",o.excludeValues=!!_.excludeValues,o.algorithm=o.algorithm.toLowerCase(),o.encoding=o.encoding.toLowerCase(),o.ignoreUnknown=_.ignoreUnknown===!0,o.respectType=_.respectType!==!1,o.respectFunctionNames=_.respectFunctionNames!==!1,o.respectFunctionProperties=_.respectFunctionProperties!==!1,o.unorderedArrays=_.unorderedArrays===!0,o.unorderedSets=_.unorderedSets!==!1,o.unorderedObjects=_.unorderedObjects!==!1,o.replacer=_.replacer||void 0,o.excludeKeys=_.excludeKeys||void 0,d===void 0)throw new Error("Object argument required.");for(var f=0;f<c.length;++f)c[f].toLowerCase()===o.algorithm.toLowerCase()&&(o.algorithm=c[f]);if(c.indexOf(o.algorithm)===-1)throw new Error('Algorithm "'+o.algorithm+'" not supported. supported values: '+c.join(", "));if(p.indexOf(o.encoding)===-1&&o.algorithm!=="passthrough")throw new Error('Encoding "'+o.encoding+'" not supported. supported values: '+p.join(", "));return o}function S(d){if(typeof d=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(d))!=null}function b(d,_,o){o=o||[];function f(a){return _.update?_.update(a,"utf8"):_.write(a,"utf8")}return{dispatch:function(a){return this["_"+((a=d.replacer?d.replacer(a):a)===null?"null":typeof a)](a)},_object:function(a){var m,w=Object.prototype.toString.call(a),W=/\[object (.*)\]/i.exec(w);if(W=(W=W?W[1]:"unknown:["+w+"]").toLowerCase(),0<=(w=o.indexOf(a)))return this.dispatch("[CIRCULAR:"+w+"]");if(o.push(a),E!==void 0&&E.isBuffer&&E.isBuffer(a))return f("buffer:"),f(a);if(W==="object"||W==="function"||W==="asyncfunction")return w=Object.keys(a),d.unorderedObjects&&(w=w.sort()),d.respectType===!1||S(a)||w.splice(0,0,"prototype","__proto__","constructor"),d.excludeKeys&&(w=w.filter(function(R){return!d.excludeKeys(R)})),f("object:"+w.length+":"),m=this,w.forEach(function(R){m.dispatch(R),f(":"),d.excludeValues||m.dispatch(a[R]),f(",")});if(!this["_"+W]){if(d.ignoreUnknown)return f("["+W+"]");throw new Error('Unknown object type "'+W+'"')}this["_"+W](a)},_array:function(a,R){R=R!==void 0?R:d.unorderedArrays!==!1;var w=this;if(f("array:"+a.length+":"),!R||a.length<=1)return a.forEach(function(j){return w.dispatch(j)});var W=[],R=a.map(function(j){var I=new D,B=o.slice();return b(d,I,B).dispatch(j),W=W.concat(B.slice(o.length)),I.read().toString()});return o=o.concat(W),R.sort(),this._array(R,!1)},_date:function(a){return f("date:"+a.toJSON())},_symbol:function(a){return f("symbol:"+a.toString())},_error:function(a){return f("error:"+a.toString())},_boolean:function(a){return f("bool:"+a.toString())},_string:function(a){f("string:"+a.length+":"),f(a.toString())},_function:function(a){f("fn:"),S(a)?this.dispatch("[native]"):this.dispatch(a.toString()),d.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(a.name)),d.respectFunctionProperties&&this._object(a)},_number:function(a){return f("number:"+a.toString())},_xml:function(a){return f("xml:"+a.toString())},_null:function(){return f("Null")},_undefined:function(){return f("Undefined")},_regexp:function(a){return f("regex:"+a.toString())},_uint8array:function(a){return f("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return f("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return f("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return f("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return f("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return f("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return f("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return f("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return f("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return f("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return f("url:"+a.toString())},_map:function(a){return f("map:"),a=Array.from(a),this._array(a,d.unorderedSets!==!1)},_set:function(a){return f("set:"),a=Array.from(a),this._array(a,d.unorderedSets!==!1)},_file:function(a){return f("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(d.ignoreUnknown)return f("[blob]");throw Error(`Hashing Blob objects is currently not supported
2
2
  (see https://github.com/puleos/object-hash/issues/26)
3
3
  Use "options.replacer" or "options.ignoreUnknown"
4
4
  `)},_domwindow:function(){return f("domwindow")},_bigint:function(a){return f("bigint:"+a.toString())},_process:function(){return f("process")},_timer:function(){return f("timer")},_pipe:function(){return f("pipe")},_tcp:function(){return f("tcp")},_udp:function(){return f("udp")},_tty:function(){return f("tty")},_statwatcher:function(){return f("statwatcher")},_securecontext:function(){return f("securecontext")},_connection:function(){return f("connection")},_zlib:function(){return f("zlib")},_context:function(){return f("context")},_nodescript:function(){return f("nodescript")},_httpparser:function(){return f("httpparser")},_dataview:function(){return f("dataview")},_signal:function(){return f("signal")},_fsevent:function(){return f("fsevent")},_tlswrap:function(){return f("tlswrap")}}}function D(){return{buf:"",write:function(d){this.buf+=d},end:function(d){this.buf+=d},read:function(){return this.buf}}}s.writeToStream=function(d,_,o){return o===void 0&&(o=_,_={}),b(_=v(d,_),o).dispatch(d)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(n,r,s){(function(u,y,E,F,C,P,ee,M,Q){(function(k){var g=typeof Uint8Array<"u"?Uint8Array:Array,c=43,p=47,v=48,S=97,b=65,D=45,d=95;function _(o){return o=o.charCodeAt(0),o===c||o===D?62:o===p||o===d?63:o<v?-1:o<v+10?o-v+26+26:o<b+26?o-b:o<S+26?o-S+26:void 0}k.toByteArray=function(o){var f,a;if(0<o.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var m=o.length,m=o.charAt(m-2)==="="?2:o.charAt(m-1)==="="?1:0,w=new g(3*o.length/4-m),W=0<m?o.length-4:o.length,R=0;function j(I){w[R++]=I}for(f=0;f<W;f+=4,0)j((16711680&(a=_(o.charAt(f))<<18|_(o.charAt(f+1))<<12|_(o.charAt(f+2))<<6|_(o.charAt(f+3))))>>16),j((65280&a)>>8),j(255&a);return m==2?j(255&(a=_(o.charAt(f))<<2|_(o.charAt(f+1))>>4)):m==1&&(j((a=_(o.charAt(f))<<10|_(o.charAt(f+1))<<4|_(o.charAt(f+2))>>2)>>8&255),j(255&a)),w},k.fromByteArray=function(o){var f,a,m,w,W=o.length%3,R="";function j(I){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(I)}for(f=0,m=o.length-W;f<m;f+=3)a=(o[f]<<16)+(o[f+1]<<8)+o[f+2],R+=j((w=a)>>18&63)+j(w>>12&63)+j(w>>6&63)+j(63&w);switch(W){case 1:R=(R+=j((a=o[o.length-1])>>2))+j(a<<4&63)+"==";break;case 2:R=(R=(R+=j((a=(o[o.length-2]<<8)+o[o.length-1])>>10))+j(a>>4&63))+j(a<<2&63)+"="}return R}})(s===void 0?this.base64js={}:s)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,s){(function(u,y,c,F,C,P,ee,M,Q){var k=n("base64-js"),g=n("ieee754");function c(i,l,h){if(!(this instanceof c))return new c(i,l,h);var T,Y,L,$,se=typeof i;if(l==="base64"&&se=="string")for(i=($=i).trim?$.trim():$.replace(/^\s+|\s+$/g,"");i.length%4!=0;)i+="=";if(se=="number")T=z(i);else if(se=="string")T=c.byteLength(i,l);else{if(se!="object")throw new Error("First argument needs to be a number, array or string.");T=z(i.length)}if(c._useTypedArrays?Y=c._augment(new Uint8Array(T)):((Y=this).length=T,Y._isBuffer=!0),c._useTypedArrays&&typeof i.byteLength=="number")Y._set(i);else if(X($=i)||c.isBuffer($)||$&&typeof $=="object"&&typeof $.length=="number")for(L=0;L<T;L++)c.isBuffer(i)?Y[L]=i.readUInt8(L):Y[L]=i[L];else if(se=="string")Y.write(i,0,l);else if(se=="number"&&!c._useTypedArrays&&!h)for(L=0;L<T;L++)Y[L]=0;return Y}function p(i,l,h,T){return c._charsWritten=ge((function(Y){for(var L=[],$=0;$<Y.length;$++)L.push(255&Y.charCodeAt($));return L})(l),i,h,T)}function v(i,l,h,T){return c._charsWritten=ge((function(Y){for(var L,$,se=[],ue=0;ue<Y.length;ue++)$=Y.charCodeAt(ue),L=$>>8,$=$%256,se.push($),se.push(L);return se})(l),i,h,T)}function S(i,l,h){var T="";h=Math.min(i.length,h);for(var Y=l;Y<h;Y++)T+=String.fromCharCode(i[Y]);return T}function b(i,l,h,L){L||(N(typeof h=="boolean","missing or invalid endian"),N(l!=null,"missing offset"),N(l+1<i.length,"Trying to read beyond buffer length"));var Y,L=i.length;if(!(L<=l))return h?(Y=i[l],l+1<L&&(Y|=i[l+1]<<8)):(Y=i[l]<<8,l+1<L&&(Y|=i[l+1])),Y}function D(i,l,h,L){L||(N(typeof h=="boolean","missing or invalid endian"),N(l!=null,"missing offset"),N(l+3<i.length,"Trying to read beyond buffer length"));var Y,L=i.length;if(!(L<=l))return h?(l+2<L&&(Y=i[l+2]<<16),l+1<L&&(Y|=i[l+1]<<8),Y|=i[l],l+3<L&&(Y+=i[l+3]<<24>>>0)):(l+1<L&&(Y=i[l+1]<<16),l+2<L&&(Y|=i[l+2]<<8),l+3<L&&(Y|=i[l+3]),Y+=i[l]<<24>>>0),Y}function d(i,l,h,T){if(T||(N(typeof h=="boolean","missing or invalid endian"),N(l!=null,"missing offset"),N(l+1<i.length,"Trying to read beyond buffer length")),!(i.length<=l))return T=b(i,l,h,!0),32768&T?-1*(65535-T+1):T}function _(i,l,h,T){if(T||(N(typeof h=="boolean","missing or invalid endian"),N(l!=null,"missing offset"),N(l+3<i.length,"Trying to read beyond buffer length")),!(i.length<=l))return T=D(i,l,h,!0),2147483648&T?-1*(4294967295-T+1):T}function o(i,l,h,T){return T||(N(typeof h=="boolean","missing or invalid endian"),N(l+3<i.length,"Trying to read beyond buffer length")),g.read(i,l,h,23,4)}function f(i,l,h,T){return T||(N(typeof h=="boolean","missing or invalid endian"),N(l+7<i.length,"Trying to read beyond buffer length")),g.read(i,l,h,52,8)}function a(i,l,h,T,Y){if(Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+1<i.length,"trying to write beyond buffer length"),Ct(l,65535)),Y=i.length,!(Y<=h))for(var L=0,$=Math.min(Y-h,2);L<$;L++)i[h+L]=(l&255<<8*(T?L:1-L))>>>8*(T?L:1-L)}function m(i,l,h,T,Y){if(Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+3<i.length,"trying to write beyond buffer length"),Ct(l,4294967295)),Y=i.length,!(Y<=h))for(var L=0,$=Math.min(Y-h,4);L<$;L++)i[h+L]=l>>>8*(T?L:3-L)&255}function w(i,l,h,T,Y){Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+1<i.length,"Trying to write beyond buffer length"),Ut(l,32767,-32768)),i.length<=h||a(i,0<=l?l:65535+l+1,h,T,Y)}function W(i,l,h,T,Y){Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+3<i.length,"Trying to write beyond buffer length"),Ut(l,2147483647,-2147483648)),i.length<=h||m(i,0<=l?l:4294967295+l+1,h,T,Y)}function R(i,l,h,T,Y){Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+3<i.length,"Trying to write beyond buffer length"),Mn(l,34028234663852886e22,-34028234663852886e22)),i.length<=h||g.write(i,l,h,T,23,4)}function j(i,l,h,T,Y){Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+7<i.length,"Trying to write beyond buffer length"),Mn(l,17976931348623157e292,-17976931348623157e292)),i.length<=h||g.write(i,l,h,T,52,8)}s.Buffer=c,s.SlowBuffer=c,s.INSPECT_MAX_BYTES=50,c.poolSize=8192,c._useTypedArrays=(function(){try{var i=new ArrayBuffer(0),l=new Uint8Array(i);return l.foo=function(){return 42},l.foo()===42&&typeof l.subarray=="function"}catch{return!1}})(),c.isEncoding=function(i){switch(String(i).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.isBuffer=function(i){return!(i==null||!i._isBuffer)},c.byteLength=function(i,l){var h;switch(i+="",l||"utf8"){case"hex":h=i.length/2;break;case"utf8":case"utf-8":h=ce(i).length;break;case"ascii":case"binary":case"raw":h=i.length;break;case"base64":h=Ee(i).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=2*i.length;break;default:throw new Error("Unknown encoding")}return h},c.concat=function(i,l){if(N(X(i),`Usage: Buffer.concat(list, [totalLength])