@mongosh/node-runtime-worker-thread 3.3.6 → 3.3.9

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.
@@ -1855,13 +1855,13 @@
1855
1855
  },
1856
1856
  {
1857
1857
  "name": "fs-extra",
1858
- "version": "11.2.0",
1858
+ "version": "11.3.0",
1859
1859
  "license": "MIT",
1860
1860
  "path": "/home/runner/work/mongosh/mongosh/node_modules/fs-extra",
1861
1861
  "licenseFiles": [
1862
1862
  {
1863
1863
  "filename": "LICENSE",
1864
- "content": "(The MIT License)\n\nCopyright (c) 2011-2017 JP Richardson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files\n(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,\n merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
1864
+ "content": "(The MIT License)\n\nCopyright (c) 2011-2024 JP Richardson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files\n(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,\n merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
1865
1865
  }
1866
1866
  ]
1867
1867
  },
@@ -2527,7 +2527,7 @@
2527
2527
  },
2528
2528
  {
2529
2529
  "name": "mongodb",
2530
- "version": "6.14.2",
2530
+ "version": "6.16.0",
2531
2531
  "license": "Apache-2.0",
2532
2532
  "path": "/home/runner/work/mongosh/mongosh/node_modules/mongodb",
2533
2533
  "licenseFiles": [
@@ -3413,7 +3413,7 @@
3413
3413
  },
3414
3414
  {
3415
3415
  "name": "webpack",
3416
- "version": "5.94.0",
3416
+ "version": "5.99.8",
3417
3417
  "license": "MIT",
3418
3418
  "path": "/home/runner/work/mongosh/mongosh/node_modules/webpack",
3419
3419
  "licenseFiles": [
package/dist/41.js CHANGED
@@ -1 +1 @@
1
- "use strict";exports.id=41,exports.ids=[41],exports.modules={81830:(e,t,n)=>{n.d(t,{CG:()=>r,Y2:()=>i,cJ:()=>s});var o=n(53127);const i=(e,t)=>(0,o.w)(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),r=async(e,t)=>{const n=await i(e,t);return n.message=n.message??n.Message,n},s=(e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(i=e.headers,r="x-amzn-errortype",Object.keys(i).find((e=>e.toLowerCase()===r.toLowerCase())));var i,r;return void 0!==o?n(e.headers[o]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0}},40041:(e,t,n)=>{n.d(t,{CognitoIdentityClient:()=>CognitoIdentityClient,GetCredentialsForIdentityCommand:()=>GetCredentialsForIdentityCommand,GetIdCommand:()=>GetIdCommand});var o=n(31758),i=n(46170),r=n(96692),s=n(33202),a=n(20512),c=n(97882),d=n(51320),p=n(34546),u=n(2103),l=n(1802),y=n(71383),h=n(42952);const m=async(e,t,n)=>({operation:(0,h.u)(t).operation,region:await(0,h.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const x=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},E={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},g="3.621.0";var f=n(68227),v=n(34054),I=n(62438),S=n(25708),w=n(75854),C=n(3337),P=n(88226),b=n(94134),A=n(59065),R=n(42640),$=n(50563),O=n(67670),D=n(6775),M=n(96954);const k="required",z="fn",F="argv",N="ref",q=!0,G="isSet",j="booleanEquals",T="error",U="endpoint",L="tree",K="PartitionResult",H={[k]:!1,type:"String"},B={[k]:!0,default:!1,type:"Boolean"},J={[N]:"Endpoint"},W={[z]:j,[F]:[{[N]:"UseFIPS"},!0]},Y={[z]:j,[F]:[{[N]:"UseDualStack"},!0]},Z={},V={[z]:"getAttr",[F]:[{[N]:K},"supportsFIPS"]},_={[z]:j,[F]:[!0,{[z]:"getAttr",[F]:[{[N]:K},"supportsDualStack"]}]},Q=[W],X=[Y],ee=[{[N]:"Region"}],te={version:"1.0",parameters:{Region:H,UseDualStack:B,UseFIPS:B,Endpoint:H},rules:[{conditions:[{[z]:G,[F]:[J]}],rules:[{conditions:Q,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:T},{conditions:X,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:T},{endpoint:{url:J,properties:Z,headers:Z},type:U}],type:L},{conditions:[{[z]:G,[F]:ee}],rules:[{conditions:[{[z]:"aws.partition",[F]:ee,assign:K}],rules:[{conditions:[W,Y],rules:[{conditions:[{[z]:j,[F]:[q,V]},_],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z,headers:Z},type:U}],type:L},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:T}],type:L},{conditions:Q,rules:[{conditions:[{[z]:j,[F]:[V,q]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Z,headers:Z},type:U}],type:L},{error:"FIPS is enabled but this partition does not support FIPS",type:T}],type:L},{conditions:X,rules:[{conditions:[_],rules:[{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z,headers:Z},type:U}],type:L},{error:"DualStack is enabled but this partition does not support DualStack",type:T}],type:L},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:Z,headers:Z},type:U}],type:L}],type:L},{error:"Invalid Configuration: Missing Region",type:T}]},ne=(e,t={})=>(0,M.sO)(te,{endpointParams:e,logger:t.logger});M.mw.aws=D.UF;var oe=n(12165);const ie=e=>{(0,l.I9)(process.version);const t=(0,oe.I)(e),n=()=>t().then(l.lT),o=(e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??$.E,base64Encoder:e?.base64Encoder??$.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ne,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??x,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new A.f},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.mR}],logger:e?.logger??new l.N4,serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??R.D,utf8Decoder:e?.utf8Decoder??O.ar,utf8Encoder:e?.utf8Encoder??O.Pq}))(e);return(0,f.I)(process.version),{...o,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??P.n,credentialDefaultProvider:e?.credentialDefaultProvider??v.v6,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,I.mJ)({serviceId:o.serviceId,clientVersion:g}),maxAttempts:e?.maxAttempts??(0,w.Z)(u.qs),region:e?.region??(0,w.Z)(a.GG,a.zH),requestHandler:C.$c.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,w.Z)({...u.kN,default:async()=>(await n()).retryMode||b.L0}),sha256:e?.sha256??S.V.bind(null,"sha256"),streamCollector:e?.streamCollector??C.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(0,w.Z)(a.e$),useFipsEndpoint:e?.useFipsEndpoint??(0,w.Z)(a.Ko)}};var re=n(3119),se=n(47624);const ae=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){o=e},credentials:()=>o}};class CognitoIdentityClient extends l.Kj{constructor(...[e]){const t=ie(e||{}),n=(h=t,{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"});var h;const m=(0,a.TD)(n),x=(0,p.Co)(m),E=(0,o.OV)(x),g=(0,s.Dc)(E),f=(0,u.$z)(g);var v;const I=((e,t)=>{const n={...(0,re.Rq)(e),...(0,l.xA)(e),...(0,se.eS)(e),...ae(e)};return t.forEach((e=>e.configure(n))),{...e,...(0,re.$3)(n),...(0,l.uv)(n),...(0,se.jt)(n),...(o=n,{httpAuthSchemes:o.httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()})};var o})((v=f,{...(0,y.h)(v)}),e?.extensions||[]);super(I),this.config=I,this.middlewareStack.use((0,o.TC)(this.config)),this.middlewareStack.use((0,i.Y7)(this.config)),this.middlewareStack.use((0,r.n4)(this.config)),this.middlewareStack.use((0,s.sM)(this.config)),this.middlewareStack.use((0,u.ey)(this.config)),this.middlewareStack.use((0,d.vK)(this.config)),this.middlewareStack.use((0,c.wB)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,c.lW)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return m}getIdentityProviderConfigProvider(){return async e=>new c.h$({"aws.auth#sigv4":e.credentials})}}var ce=n(8029),de=n(81830);class CognitoIdentityServiceException extends l.TJ{constructor(e){super(e),Object.setPrototypeOf(this,CognitoIdentityServiceException.prototype)}}class InternalErrorException extends CognitoIdentityServiceException{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,InternalErrorException.prototype)}}class InvalidParameterException extends CognitoIdentityServiceException{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,InvalidParameterException.prototype)}}class LimitExceededException extends CognitoIdentityServiceException{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,LimitExceededException.prototype)}}class NotAuthorizedException extends CognitoIdentityServiceException{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,NotAuthorizedException.prototype)}}class ResourceConflictException extends CognitoIdentityServiceException{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,ResourceConflictException.prototype)}}class TooManyRequestsException extends CognitoIdentityServiceException{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,TooManyRequestsException.prototype)}}class ResourceNotFoundException extends CognitoIdentityServiceException{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ResourceNotFoundException.prototype)}}class ExternalServiceException extends CognitoIdentityServiceException{constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),this.name="ExternalServiceException",this.$fault="client",Object.setPrototypeOf(this,ExternalServiceException.prototype)}}class InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException{constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),this.name="InvalidIdentityPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,InvalidIdentityPoolConfigurationException.prototype)}}class DeveloperUserAlreadyRegisteredException extends CognitoIdentityServiceException{constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),this.name="DeveloperUserAlreadyRegisteredException",this.$fault="client",Object.setPrototypeOf(this,DeveloperUserAlreadyRegisteredException.prototype)}}class ConcurrentModificationException extends CognitoIdentityServiceException{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,ConcurrentModificationException.prototype)}}const pe=async(e,t)=>{const n=Oe("GetCredentialsForIdentity");let o;return o=JSON.stringify((0,l.Ss)(e)),$e(t,n,"/",void 0,o)},ue=async(e,t)=>{const n=Oe("GetId");let o;return o=JSON.stringify((0,l.Ss)(e)),$e(t,n,"/",void 0,o)},le=async(e,t)=>{if(e.statusCode>=300)return he(e,t);const n=await(0,de.Y2)(e.body,t);let o={};o=be(n,t);return{$metadata:Ae(e),...o}},ye=async(e,t)=>{if(e.statusCode>=300)return he(e,t);const n=await(0,de.Y2)(e.body,t);let o={};o=(0,l.Ss)(n);return{$metadata:Ae(e),...o}},he=async(e,t)=>{const n={...e,body:await(0,de.CG)(e.body,t)},o=(0,de.cJ)(e,n.body);switch(o){case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await ge(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await ve(n,t);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await Ie(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await Se(n,t);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await we(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await Pe(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await Ce(n,t);case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await Ee(n,t);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await fe(n,t);case"DeveloperUserAlreadyRegisteredException":case"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":throw await xe(n,t);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentity#ConcurrentModificationException":throw await me(n,t);default:const i=n.body;return Re({output:e,parsedBody:i,errorCode:o})}},me=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new ConcurrentModificationException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},xe=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new DeveloperUserAlreadyRegisteredException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Ee=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new ExternalServiceException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},ge=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new InternalErrorException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},fe=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new InvalidIdentityPoolConfigurationException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},ve=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new InvalidParameterException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Ie=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new LimitExceededException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Se=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new NotAuthorizedException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},we=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new ResourceConflictException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Ce=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new ResourceNotFoundException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Pe=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new TooManyRequestsException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},be=(e,t)=>(0,l.s)(e,{Credentials:e=>(e=>(0,l.s)(e,{AccessKeyId:l.lK,Expiration:e=>(0,l.Y0)((0,l.l3)((0,l.r$)(e))),SecretKey:l.lK,SessionToken:l.lK}))(e),IdentityId:l.lK}),Ae=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Re=(0,l.jr)(CognitoIdentityServiceException),$e=async(e,t,n,o,i)=>{const{hostname:r,protocol:s="https",port:a,path:c}=await e.endpoint(),d={protocol:s,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==o&&(d.hostname=o),void 0!==i&&(d.body=i),new se.Kd(d)};function Oe(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}}class GetCredentialsForIdentityCommand extends(l.uB.classBuilder().ep({...E}).m((function(e,t,n,o){return[(0,ce.TM)(n,this.serialize,this.deserialize),(0,p.rD)(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").f(void 0,void 0).ser(pe).de(le).build()){}class GetIdCommand extends(l.uB.classBuilder().ep({...E}).m((function(e,t,n,o){return[(0,ce.TM)(n,this.serialize,this.deserialize),(0,p.rD)(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").f(void 0,void 0).ser(ue).de(ye).build()){}}};
1
+ "use strict";exports.id=41,exports.ids=[41],exports.modules={40041:(e,t,n)=>{n.d(t,{CognitoIdentityClient:()=>CognitoIdentityClient,GetCredentialsForIdentityCommand:()=>GetCredentialsForIdentityCommand,GetIdCommand:()=>GetIdCommand});var o=n(31758),i=n(46170),r=n(96692),s=n(33202),a=n(20512),c=n(97882),d=n(51320),p=n(34546),u=n(2103),l=n(1802),y=n(71383),h=n(42952);const m=async(e,t,n)=>({operation:(0,h.u)(t).operation,region:await(0,h.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const x=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},E={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},g="3.621.0";var f=n(68227),v=n(34054),I=n(62438),S=n(25708),w=n(75854),C=n(3337),P=n(88226),b=n(94134),A=n(59065),R=n(42640),$=n(50563),O=n(67670),D=n(6775),M=n(96954);const k="required",z="fn",F="argv",N="ref",q=!0,G="isSet",j="booleanEquals",T="error",U="endpoint",L="tree",K="PartitionResult",H={[k]:!1,type:"String"},B={[k]:!0,default:!1,type:"Boolean"},J={[N]:"Endpoint"},W={[z]:j,[F]:[{[N]:"UseFIPS"},!0]},Y={[z]:j,[F]:[{[N]:"UseDualStack"},!0]},Z={},V={[z]:"getAttr",[F]:[{[N]:K},"supportsFIPS"]},_={[z]:j,[F]:[!0,{[z]:"getAttr",[F]:[{[N]:K},"supportsDualStack"]}]},Q=[W],X=[Y],ee=[{[N]:"Region"}],te={version:"1.0",parameters:{Region:H,UseDualStack:B,UseFIPS:B,Endpoint:H},rules:[{conditions:[{[z]:G,[F]:[J]}],rules:[{conditions:Q,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:T},{conditions:X,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:T},{endpoint:{url:J,properties:Z,headers:Z},type:U}],type:L},{conditions:[{[z]:G,[F]:ee}],rules:[{conditions:[{[z]:"aws.partition",[F]:ee,assign:K}],rules:[{conditions:[W,Y],rules:[{conditions:[{[z]:j,[F]:[q,V]},_],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z,headers:Z},type:U}],type:L},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:T}],type:L},{conditions:Q,rules:[{conditions:[{[z]:j,[F]:[V,q]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Z,headers:Z},type:U}],type:L},{error:"FIPS is enabled but this partition does not support FIPS",type:T}],type:L},{conditions:X,rules:[{conditions:[_],rules:[{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z,headers:Z},type:U}],type:L},{error:"DualStack is enabled but this partition does not support DualStack",type:T}],type:L},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:Z,headers:Z},type:U}],type:L}],type:L},{error:"Invalid Configuration: Missing Region",type:T}]},ne=(e,t={})=>(0,M.sO)(te,{endpointParams:e,logger:t.logger});M.mw.aws=D.UF;var oe=n(12165);const ie=e=>{(0,l.I9)(process.version);const t=(0,oe.I)(e),n=()=>t().then(l.lT),o=(e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??$.E,base64Encoder:e?.base64Encoder??$.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ne,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??x,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new A.f},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.mR}],logger:e?.logger??new l.N4,serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??R.D,utf8Decoder:e?.utf8Decoder??O.ar,utf8Encoder:e?.utf8Encoder??O.Pq}))(e);return(0,f.I)(process.version),{...o,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??P.n,credentialDefaultProvider:e?.credentialDefaultProvider??v.v6,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,I.mJ)({serviceId:o.serviceId,clientVersion:g}),maxAttempts:e?.maxAttempts??(0,w.Z)(u.qs),region:e?.region??(0,w.Z)(a.GG,a.zH),requestHandler:C.$c.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,w.Z)({...u.kN,default:async()=>(await n()).retryMode||b.L0}),sha256:e?.sha256??S.V.bind(null,"sha256"),streamCollector:e?.streamCollector??C.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(0,w.Z)(a.e$),useFipsEndpoint:e?.useFipsEndpoint??(0,w.Z)(a.Ko)}};var re=n(3119),se=n(47624);const ae=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){o=e},credentials:()=>o}};class CognitoIdentityClient extends l.Kj{constructor(...[e]){const t=ie(e||{}),n=(h=t,{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"});var h;const m=(0,a.TD)(n),x=(0,p.Co)(m),E=(0,o.OV)(x),g=(0,s.Dc)(E),f=(0,u.$z)(g);var v;const I=((e,t)=>{const n={...(0,re.Rq)(e),...(0,l.xA)(e),...(0,se.eS)(e),...ae(e)};return t.forEach((e=>e.configure(n))),{...e,...(0,re.$3)(n),...(0,l.uv)(n),...(0,se.jt)(n),...(o=n,{httpAuthSchemes:o.httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()})};var o})((v=f,{...(0,y.h)(v)}),e?.extensions||[]);super(I),this.config=I,this.middlewareStack.use((0,o.TC)(this.config)),this.middlewareStack.use((0,i.Y7)(this.config)),this.middlewareStack.use((0,r.n4)(this.config)),this.middlewareStack.use((0,s.sM)(this.config)),this.middlewareStack.use((0,u.ey)(this.config)),this.middlewareStack.use((0,d.vK)(this.config)),this.middlewareStack.use((0,c.wB)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,c.lW)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return m}getIdentityProviderConfigProvider(){return async e=>new c.h$({"aws.auth#sigv4":e.credentials})}}var ce=n(8029),de=n(81830);class CognitoIdentityServiceException extends l.TJ{constructor(e){super(e),Object.setPrototypeOf(this,CognitoIdentityServiceException.prototype)}}class InternalErrorException extends CognitoIdentityServiceException{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,InternalErrorException.prototype)}}class InvalidParameterException extends CognitoIdentityServiceException{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,InvalidParameterException.prototype)}}class LimitExceededException extends CognitoIdentityServiceException{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,LimitExceededException.prototype)}}class NotAuthorizedException extends CognitoIdentityServiceException{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,NotAuthorizedException.prototype)}}class ResourceConflictException extends CognitoIdentityServiceException{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,ResourceConflictException.prototype)}}class TooManyRequestsException extends CognitoIdentityServiceException{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,TooManyRequestsException.prototype)}}class ResourceNotFoundException extends CognitoIdentityServiceException{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ResourceNotFoundException.prototype)}}class ExternalServiceException extends CognitoIdentityServiceException{constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),this.name="ExternalServiceException",this.$fault="client",Object.setPrototypeOf(this,ExternalServiceException.prototype)}}class InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException{constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),this.name="InvalidIdentityPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,InvalidIdentityPoolConfigurationException.prototype)}}class DeveloperUserAlreadyRegisteredException extends CognitoIdentityServiceException{constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),this.name="DeveloperUserAlreadyRegisteredException",this.$fault="client",Object.setPrototypeOf(this,DeveloperUserAlreadyRegisteredException.prototype)}}class ConcurrentModificationException extends CognitoIdentityServiceException{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,ConcurrentModificationException.prototype)}}const pe=async(e,t)=>{const n=Oe("GetCredentialsForIdentity");let o;return o=JSON.stringify((0,l.Ss)(e)),$e(t,n,"/",void 0,o)},ue=async(e,t)=>{const n=Oe("GetId");let o;return o=JSON.stringify((0,l.Ss)(e)),$e(t,n,"/",void 0,o)},le=async(e,t)=>{if(e.statusCode>=300)return he(e,t);const n=await(0,de.Y2)(e.body,t);let o={};o=be(n,t);return{$metadata:Ae(e),...o}},ye=async(e,t)=>{if(e.statusCode>=300)return he(e,t);const n=await(0,de.Y2)(e.body,t);let o={};o=(0,l.Ss)(n);return{$metadata:Ae(e),...o}},he=async(e,t)=>{const n={...e,body:await(0,de.CG)(e.body,t)},o=(0,de.cJ)(e,n.body);switch(o){case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await ge(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await ve(n,t);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await Ie(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await Se(n,t);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await we(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await Pe(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await Ce(n,t);case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await Ee(n,t);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await fe(n,t);case"DeveloperUserAlreadyRegisteredException":case"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":throw await xe(n,t);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentity#ConcurrentModificationException":throw await me(n,t);default:const i=n.body;return Re({output:e,parsedBody:i,errorCode:o})}},me=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new ConcurrentModificationException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},xe=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new DeveloperUserAlreadyRegisteredException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Ee=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new ExternalServiceException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},ge=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new InternalErrorException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},fe=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new InvalidIdentityPoolConfigurationException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},ve=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new InvalidParameterException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Ie=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new LimitExceededException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Se=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new NotAuthorizedException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},we=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new ResourceConflictException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Ce=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new ResourceNotFoundException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},Pe=async(e,t)=>{const n=e.body,o=(0,l.Ss)(n),i=new TooManyRequestsException({$metadata:Ae(e),...o});return(0,l.Mw)(i,n)},be=(e,t)=>(0,l.s)(e,{Credentials:e=>(e=>(0,l.s)(e,{AccessKeyId:l.lK,Expiration:e=>(0,l.Y0)((0,l.l3)((0,l.r$)(e))),SecretKey:l.lK,SessionToken:l.lK}))(e),IdentityId:l.lK}),Ae=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Re=(0,l.jr)(CognitoIdentityServiceException),$e=async(e,t,n,o,i)=>{const{hostname:r,protocol:s="https",port:a,path:c}=await e.endpoint(),d={protocol:s,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==o&&(d.hostname=o),void 0!==i&&(d.body=i),new se.Kd(d)};function Oe(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}}class GetCredentialsForIdentityCommand extends(l.uB.classBuilder().ep({...E}).m((function(e,t,n,o){return[(0,ce.TM)(n,this.serialize,this.deserialize),(0,p.rD)(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").f(void 0,void 0).ser(pe).de(le).build()){}class GetIdCommand extends(l.uB.classBuilder().ep({...E}).m((function(e,t,n,o){return[(0,ce.TM)(n,this.serialize,this.deserialize),(0,p.rD)(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").f(void 0,void 0).ser(ue).de(ye).build()){}},81830:(e,t,n)=>{n.d(t,{CG:()=>r,Y2:()=>i,cJ:()=>s});var o=n(53127);const i=(e,t)=>(0,o.w)(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),r=async(e,t)=>{const n=await i(e,t);return n.message=n.message??n.Message,n},s=(e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(i=e.headers,r="x-amzn-errortype",Object.keys(i).find((e=>e.toLowerCase()===r.toLowerCase())));var i,r;return void 0!==o?n(e.headers[o]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0}}};
package/dist/502.js CHANGED
@@ -1 +1 @@
1
- "use strict";exports.id=502,exports.ids=[502],exports.modules={68227:(e,t,r)=>{r.d(t,{I:()=>s});let n=!1;const s=e=>{e&&!n&&parseInt(e.substring(1,e.indexOf(".")))<18&&(n=!0,process.emitWarning("NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 16.x on January 6, 2025.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/74kJMmI"))}},59065:(e,t,r)=>{r.d(t,{f:()=>AwsSdkSigV4Signer});var n=r(47624);const s=e=>new Date(Date.now()+e),i=e=>n.cS.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,o=(e,t)=>{const r=Date.parse(e);return((e,t)=>Math.abs(s(t).getTime()-e)>=3e5)(r,t)?r-Date.now():t},a=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class AwsSdkSigV4Signer{async sign(e,t,r){if(!n.Kd.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:o,signingRegion:c,signingName:u}=await(async e=>{const t=a("context",e.context),r=a("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],s=a("signer",r.signer),i=await s(n),o=e?.signingRegion,c=e?.signingName;return{config:r,signer:i,signingRegion:o,signingName:c}})(r);return await o.sign(e,{signingDate:s(i.systemClockOffset),signingRegion:c,signingService:u})}errorHandler(e){return t=>{const r=t.ServerTime??i(t.$response);if(r){const n=a("config",e.config),s=n.systemClockOffset;n.systemClockOffset=o(r,n.systemClockOffset);n.systemClockOffset!==s&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=i(e);if(r){const e=a("config",t.config);e.systemClockOffset=o(r,e.systemClockOffset)}}}},71383:(e,t,r)=>{r.d(t,{h:()=>q});var n=r(97882),s=r(82369),i=r(42952),o=r(30548),a=r(67670);const c="X-Amz-Date",u="X-Amz-Signature",d="X-Amz-Security-Token",l="authorization",g=c.toLowerCase(),p=[l,g,"date"],h=u.toLowerCase(),f="x-amz-content-sha256",m=d.toLowerCase(),y={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},w=/^proxy-/,S=/^sec-/,v="AWS4-HMAC-SHA256",b="AWS4-HMAC-SHA256-PAYLOAD",R="aws4_request",E={},A=[],T=(e,t,r)=>`${e}/${t}/${r}/${R}`,C=(e,t,r)=>{const n=new e(t);return n.update((0,a.Fo)(r)),n.digest()},$=({headers:e},t,r)=>{const n={};for(const s of Object.keys(e).sort()){if(null==e[s])continue;const i=s.toLowerCase();(i in y||t?.has(i)||w.test(i)||S.test(i))&&(!r||r&&!r.has(i))||(n[i]=e[s].trim().replace(/\s+/g," "))}return n};var P=r(41150);const I=async({headers:e,body:t},r)=>{for(const t of Object.keys(e))if(t.toLowerCase()===f)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(0,P.m)(t)){const e=new r;return e.update((0,a.Fo)(t)),(0,s.n)(await e.digest())}return"UNSIGNED-PAYLOAD"};class HeaderFormatter{format(e){const t=[];for(const r of Object.keys(e)){const n=(0,a.ar)(r);t.push(Uint8Array.from([n.byteLength]),n,this.formatHeaderValue(e[r]))}const r=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const e of t)r.set(e,n),n+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const c=(0,a.ar)(e.value),u=new DataView(new ArrayBuffer(3+c.byteLength));u.setUint8(0,7),u.setUint16(1,c.byteLength,!1);const d=new Uint8Array(u.buffer);return d.set(c,3),d;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(Int64.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!D.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=9,g.set((0,s.a)(e.value.replace(/\-/g,"")),1),g}}}var k;!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"}(k||(k={}));const D=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Int64{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&x(t),new Int64(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&x(e),parseInt((0,s.n)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function x(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}var N=r(47624);const O=e=>{e=N.Kd.clone(e);for(const t of Object.keys(e.headers))p.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},U=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class SignatureV4{constructor({applyChecksum:e,credentials:t,region:r,service:n,sha256:s,uriEscapePath:o=!0}){this.headerFormatter=new HeaderFormatter,this.service=n,this.sha256=s,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,i.t)(r),this.credentialProvider=(0,i.t)(t)}async presign(e,t={}){const{signingDate:r=new Date,expiresIn:n=3600,unsignableHeaders:s,unhoistableHeaders:i,signableHeaders:o,signingRegion:a,signingService:l}=t,g=await this.credentialProvider();this.validateResolvedCredentials(g);const p=a??await this.regionProvider(),{longDate:h,shortDate:f}=L(r);if(n>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const m=T(f,p,l??this.service),y=((e,t={})=>{const{headers:r,query:n={}}=N.Kd.clone(e);for(const e of Object.keys(r)){const s=e.toLowerCase();"x-amz-"!==s.slice(0,6)||t.unhoistableHeaders?.has(s)||(n[e]=r[e],delete r[e])}return{...e,headers:r,query:n}})(O(e),{unhoistableHeaders:i});g.sessionToken&&(y.query[d]=g.sessionToken),y.query["X-Amz-Algorithm"]=v,y.query["X-Amz-Credential"]=`${g.accessKeyId}/${m}`,y.query[c]=h,y.query["X-Amz-Expires"]=n.toString(10);const w=$(y,s,o);return y.query["X-Amz-SignedHeaders"]=M(w),y.query[u]=await this.getSignature(h,m,this.getSigningKey(g,p,f,l),this.createCanonicalRequest(y,w,await I(e,this.sha256))),y}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:r=new Date,priorSignature:n,signingRegion:i,signingService:o}){const a=i??await this.regionProvider(),{shortDate:c,longDate:u}=L(r),d=T(c,a,o??this.service),l=await I({headers:{},body:t},this.sha256),g=new this.sha256;g.update(e);const p=(0,s.n)(await g.digest()),h=[b,u,d,n,p,l].join("\n");return this.signString(h,{signingDate:r,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:r,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:r,signingService:n,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:r,signingService:n}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=r??await this.regionProvider(),{shortDate:c}=L(t),u=new this.sha256(await this.getSigningKey(i,o,c,n));return u.update((0,a.Fo)(e)),(0,s.n)(await u.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:r,unsignableHeaders:n,signingRegion:s,signingService:i}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=s??await this.regionProvider(),c=O(e),{longDate:u,shortDate:d}=L(t),p=T(d,a,i??this.service);c.headers[g]=u,o.sessionToken&&(c.headers[m]=o.sessionToken);const h=await I(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1})(f,c.headers)&&this.applyChecksum&&(c.headers[f]=h);const y=$(c,n,r),w=await this.getSignature(u,p,this.getSigningKey(o,a,d,i),this.createCanonicalRequest(c,y,h));return c.headers[l]=`${v} Credential=${o.accessKeyId}/${p}, SignedHeaders=${M(y)}, Signature=${w}`,c}createCanonicalRequest(e,t,r){const n=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e).sort()){if(n.toLowerCase()===h)continue;t.push(n);const s=e[n];"string"==typeof s?r[n]=`${(0,o.o)(n)}=${(0,o.o)(s)}`:Array.isArray(s)&&(r[n]=s.slice(0).reduce(((e,t)=>e.concat([`${(0,o.o)(n)}=${(0,o.o)(t)}`])),[]).sort().join("&"))}return t.map((e=>r[e])).filter((e=>e)).join("&")})(e)}\n${n.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${n.join(";")}\n${r}`}async createStringToSign(e,t,r){const n=new this.sha256;n.update((0,a.Fo)(r));const i=await n.digest();return`${v}\n${e}\n${t}\n${(0,s.n)(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const r of e.split("/"))0!==r?.length&&"."!==r&&(".."===r?t.pop():t.push(r));const r=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return(0,o.o)(r).replace(/%2F/g,"/")}return e}async getSignature(e,t,r,n){const i=await this.createStringToSign(e,t,n),o=new this.sha256(await r);return o.update((0,a.Fo)(i)),(0,s.n)(await o.digest())}getSigningKey(e,t,r,n){return(async(e,t,r,n,i)=>{const o=await C(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${n}:${i}:${(0,s.n)(o)}:${t.sessionToken}`;if(a in E)return E[a];for(A.push(a);A.length>50;)delete E[A.shift()];let c=`AWS4${t.secretAccessKey}`;for(const t of[r,n,i,R])c=await C(e,c,t);return E[a]=c})(this.sha256,e,r,t,n||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const L=e=>{const t=(r=e,U(r).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var r;return{longDate:t,shortDate:t.slice(0,8)}},M=e=>Object.keys(e).sort().join(";"),q=e=>{let t;e.credentials&&(t=(0,n.K4)(e.credentials,n.OC,n.e)),t||(t=e.credentialDefaultProvider?(0,n.te)(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:r=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:i}=e;let o;return o=e.signer?(0,n.te)(e.signer):e.regionInfoProvider?()=>(0,n.te)(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,s])=>{const{signingRegion:o,signingService:a}=n;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r};return new(e.signerConstructor||SignatureV4)(c)})):async s=>{const o=(s=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await(0,n.te)(e.region)(),properties:{}},s)).signingRegion,a=s.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r};return new(e.signerConstructor||SignatureV4)(c)},{...e,systemClockOffset:s,signingEscapePath:r,credentials:t,signer:o}}},53127:(e,t,r)=>{r.d(t,{w:()=>s});var n=r(1802);const s=(e,t)=>(0,n.Px)(e,t).then((e=>t.utf8Encoder(e)))},31758:(e,t,r)=>{r.d(t,{OV:()=>s,TC:()=>o});var n=r(47624);function s(e){return e}const i={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},o=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{if(!n.Kd.isInstance(r.request))return t(r);const{request:s}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let e=s.hostname;null!=s.port&&(e+=`:${s.port}`),s.headers.host=e}return t(r)})(e),i)}})},46170:(e,t,r)=>{r.d(t,{Y7:()=>s});const n={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},s=e=>({applyToStack:e=>{e.add(((e,t)=>async r=>{try{const n=await e(r),{clientName:s,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:g,...p}=n.output;return o?.info?.({clientName:s,commandName:i,input:d(r.input),output:l(p),metadata:g}),n}catch(e){const{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:c(r.input),error:e,metadata:e.$metadata}),e}}),n)}})},96692:(e,t,r)=>{r.d(t,{n4:()=>o});var n=r(47624);const s="X-Amzn-Trace-Id",i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},o=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{const{request:i}=r;if(!n.Kd.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(s))return t(r);const o=process.env.AWS_LAMBDA_FUNCTION_NAME,a=process.env._X_AMZN_TRACE_ID,c=e=>"string"==typeof e&&e.length>0;return c(o)&&c(a)&&(i.headers[s]=a),t({...r,request:i})})(e),i)}})},33202:(e,t,r)=>{function n(e){return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent}}r.d(t,{sM:()=>g,Dc:()=>n});var s=r(6775),i=r(47624);const o="user-agent",a="x-amz-user-agent",c=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,u=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,d=e=>{const t=e[0].split("/").map((e=>e.replace(c,"-"))).join("/"),r=e[1]?.replace(u,"-"),n=t.indexOf("/"),s=t.substring(0,n);let i=t.substring(n+1);return"api"===s&&(i=i.toLowerCase()),[s,i,r].filter((e=>e&&e.length>0)).reduce(((e,t,r)=>{switch(r){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},l={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},g=e=>({applyToStack:t=>{var r;t.add((r=e,(e,t)=>async n=>{const{request:c}=n;if(!i.Kd.isInstance(c))return e(n);const{headers:u}=c,l=t?.userAgent?.map(d)||[],g=(await r.defaultUserAgentProvider()).map(d),p=r?.customUserAgent?.map(d)||[],h=(0,s.vL)(),f=(h?[h]:[]).concat([...g,...l,...p]).join(" "),m=[...g.filter((e=>e.startsWith("aws-sdk-"))),...p].join(" ");return"browser"!==r.runtime?(m&&(u[a]=u[a]?`${u[o]} ${m}`:m),u[o]=f):u[a]=f,e({...n,request:c})}),l)}})},3119:(e,t,r)=>{r.d(t,{Rq:()=>n,$3:()=>s});const n=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},s=e=>({region:e.region()})},6775:(e,t,r)=>{r.d(t,{UF:()=>c,vL:()=>a});var n=r(96954);const s=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!s(t))return!1;return!0}return!!(0,n.X8)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,n.oX)(e)))};let i=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}'),o="";const a=()=>o,c={isVirtualHostableS3Bucket:s,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[r,n,s,i,o,...a]=t;return"arn"!==r||""===n||""===s||""===a[0]?null:{partition:n,service:s,region:i,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},partition:e=>{const{partitions:t}=i;for(const r of t){const{regions:t,outputs:n}=r;for(const[r,s]of Object.entries(t))if(r===e)return{...n,...s}}for(const r of t){const{regionRegex:t,outputs:n}=r;if(new RegExp(t).test(e))return{...n}}const r=t.find((e=>"aws"===e.id));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}}};n.mw.aws=c},62438:(e,t,r)=>{r.d(t,{mJ:()=>a});var n=r(75854),s=r(70857),i=r(932);const o=!1,a=({serviceId:e,clientVersion:t})=>{const r=[["aws-sdk-js",t],["ua","2.0"],[`os/${(0,s.platform)()}`,(0,s.release)()],["lang/js"],["md/nodejs",`${i.versions.node}`]],a=o?["md/crt-avail"]:null;a&&r.push(a),e&&r.push([`api/${e}`,t]),i.env.AWS_EXECUTION_ENV&&r.push([`exec-env/${i.env.AWS_EXECUTION_ENV}`]);const c=(0,n.Z)({environmentVariableSelector:e=>e.AWS_SDK_UA_APP_ID,configFileSelector:e=>e["sdk-ua-app-id"],default:void 0})();let u;return async()=>{if(!u){const e=await c;u=e?[...r,[`app/${e}`]]:[...r]}return u}}},20512:(e,t,r)=>{r.d(t,{zH:()=>c,GG:()=>a,e$:()=>i,Ko:()=>o,TD:()=>l});const n=(e,t,r)=>{if(t in e){if("true"===e[t])return!0;if("false"===e[t])return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)}};var s;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(s||(s={}));const i={environmentVariableSelector:e=>n(e,"AWS_USE_DUALSTACK_ENDPOINT",s.ENV),configFileSelector:e=>n(e,"use_dualstack_endpoint",s.CONFIG),default:!1},o={environmentVariableSelector:e=>n(e,"AWS_USE_FIPS_ENDPOINT",s.ENV),configFileSelector:e=>n(e,"use_fips_endpoint",s.CONFIG),default:!1};r(42952);const a={environmentVariableSelector:e=>e.AWS_REGION,configFileSelector:e=>e.region,default:()=>{throw new Error("Region is missing")}},c={preferredFile:"credentials"},u=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),d=e=>u(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,l=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return d(t);const e=await t();return d(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!u(e)||("function"!=typeof r?Promise.resolve(!!r):r())}}}},97882:(e,t,r)=>{r.d(t,{h$:()=>DefaultIdentityProviderConfig,mR:()=>NoAuthSigner,e:()=>h,wB:()=>o,lW:()=>l,OC:()=>g,K4:()=>f,te:()=>m,lI:()=>w});r(31932);var n=r(42952);const s=(e,t)=>(r,s)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,s,i.input)),a=function(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}(e.httpAuthSchemes),c=(0,n.u)(s),u=[];for(const r of o){const n=a.get(r.schemeId);if(!n){u.push(`HttpAuthScheme \`${r.schemeId}\` was not enabled for this service.`);continue}const i=n.identityProvider(await t.identityProviderConfigProvider(e));if(!i){u.push(`HttpAuthScheme \`${r.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:o={},signingProperties:d={}}=r.propertiesExtractor?.(e,s)||{};r.identityProperties=Object.assign(r.identityProperties||{},o),r.signingProperties=Object.assign(r.signingProperties||{},d),c.selectedHttpAuthScheme={httpAuthOption:r,identity:await i(r.identityProperties),signer:n.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(u.join("\n"));return r(i)};const i={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:r(34546).ko.name},o=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(s(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),i)}});r(8029).Ou.name;var a=r(47624);const c=e=>e=>{throw e},u=(e,t)=>{};const d={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:r(2103).j7.name},l=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async r=>{if(!a.Kd.isInstance(r.request))return e(r);const s=(0,n.u)(t).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:d}=s,l=await e({...r,request:await d.sign(r.request,o,i)}).catch((d.errorHandler||c)(i));return(d.successHandler||u)(l.response,i),l}),d)}});class DefaultIdentityProviderConfig{constructor(e){this.authSchemes=new Map;for(const[t,r]of Object.entries(e))void 0!==r&&this.authSchemes.set(t,r)}getIdentityProvider(e){return this.authSchemes.get(e)}}class NoAuthSigner{async sign(e,t,r){return e}}const g=(p=3e5,e=>h(e)&&e.expiration.getTime()-Date.now()<p);var p;const h=e=>void 0!==e.expiration,f=(e,t,r)=>{if(void 0===e)return;const n="function"!=typeof e?async()=>Promise.resolve(e):e;let s,i,o,a=!1;const c=async e=>{i||(i=n(e));try{s=await i,o=!0,a=!1}finally{i=void 0}return s};return void 0===t?async e=>(o&&!e?.forceRefresh||(s=await c(e)),s):async e=>(o&&!e?.forceRefresh||(s=await c(e)),a?s:r(s)?t(s)?(await c(e),s):s:(a=!0,s))},m=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};var y=r(1802);function w(e,t){return new RequestBuilder(e,t)}class RequestBuilder{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:r,path:n}=await this.context.endpoint();this.path=n;for(const e of this.resolvePathStack)e(this.path);return new a.Kd({protocol:t,hostname:this.hostname||e,port:r,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,r,n){return this.resolvePathStack.push((s=>{this.path=(0,y.un)(s,this.input,e,t,r,n)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}},25708:(e,t,r)=>{r.d(t,{V:()=>Hash});var n=r(96385),s=r(67670),i=r(20181),o=r(76982);class Hash{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update((0,s.Fo)(a(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?(0,o.createHmac)(this.algorithmIdentifier,a(this.secret)):(0,o.createHash)(this.algorithmIdentifier)}}function a(e,t){return i.Buffer.isBuffer(e)?e:"string"==typeof e?(0,n.s)(e,t):ArrayBuffer.isView(e)?(0,n.Q)(e.buffer,e.byteOffset,e.byteLength):(0,n.Q)(e)}},51320:(e,t,r)=>{r.d(t,{vK:()=>o});var n=r(47624);const s="content-length";const i={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},o=e=>({applyToStack:t=>{var r;t.add((r=e.bodyLengthChecker,e=>async t=>{const i=t.request;if(n.Kd.isInstance(i)){const{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(s))try{const t=r(e);i.headers={...i.headers,[s]:String(t)}}catch(e){}}return e({...t,request:i})}),i)}})},34546:(e,t,r)=>{r.d(t,{ko:()=>S,rD:()=>v,Co:()=>b});const n=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,s=/(\d+\.){3}\d+/,i=/\.\./,o=e=>n.test(e)&&!s.test(e)&&!i.test(e),a=e=>{const[t,r,n,,,s]=e.split(":"),i="arn"===t&&e.split(":").length>=6,o=Boolean(i&&r&&n&&s);if(i&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},c=(e,t,r)=>{const n=async()=>{const n=r[e]??r[t];return"function"==typeof n?n():n};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await n();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:r,port:n,path:s}=e;return`${t}//${r}${n?":"+n:""}${s}`}}return e}:n};var u=r(75854),d=r(70619);const l="AWS_ENDPOINT_URL",g="endpoint_url",p=async e=>(0,u.Z)((e=>({environmentVariableSelector:t=>{const r=e.split(" ").map((e=>e.toUpperCase())),n=t[[l,...r].join("_")];if(n)return n;return t[l]||void 0},configFileSelector:(t,r)=>{if(r&&t.services){const n=r[["services",t.services].join(d.QD)];if(n){const t=n[[e.split(" ").map((e=>e.toLowerCase())).join("_"),g].join(d.QD)];if(t)return t}}const n=t[g];if(n)return n},default:void 0}))(e))();var h=r(42640);const f=e=>"object"==typeof e?"url"in e?(0,h.D)(e.url):e:(0,h.D)(e),m=async(e,t,r)=>{const n={},s=t?.getEndpointParameterInstructions?.()||{};for(const[t,i]of Object.entries(s))switch(i.type){case"staticContextParams":n[t]=i.value;break;case"contextParams":n[t]=e[i.name];break;case"clientContextParams":case"builtInParams":n[t]=await c(i.name,t,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}return 0===Object.keys(s).length&&Object.assign(n,r),"s3"===String(r.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),a(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!o(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(n),n};var y=r(42952);const w=({config:e,instructions:t})=>(r,n)=>async s=>{const i=await(async(e,t,r,n)=>{if(!r.endpoint){const e=await p(r.serviceId||"");e&&(r.endpoint=()=>Promise.resolve(f(e)))}const s=await m(e,t,r);if("function"!=typeof r.endpointProvider)throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)})(s.input,{getEndpointParameterInstructions:()=>t},{...e},n);n.endpointV2=i,n.authSchemes=i.properties?.authSchemes;const o=n.authSchemes?.[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const e=(0,y.u)(n),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return r({...s})};const S={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:r(8029).Ou.name},v=(e,t)=>({applyToStack:r=>{r.addRelativeTo(w({config:e,instructions:t}),S)}}),b=e=>{const t=e.tls??!0,{endpoint:r}=e,n=null!=r?async()=>f(await(0,y.t)(r)()):void 0,s=!!r;return{...e,endpoint:n,tls:t,isCustomEndpoint:s,useDualstackEndpoint:(0,y.t)(e.useDualstackEndpoint??!1),useFipsEndpoint:(0,y.t)(e.useFipsEndpoint??!1)}}},2103:(e,t,r)=>{r.d(t,{qs:()=>S,kN:()=>b,ey:()=>I,$z:()=>v,j7:()=>P});var n=r(94134),s=r(47624),i=r(1535),o=r(76982),a=r.n(o);const c={randomUUID:a().randomUUID},u=new Uint8Array(256);let d=u.length;function l(){return d>u.length-16&&(a().randomFillSync(u),d=0),u.slice(d,d+=16)}const g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).slice(1));function p(e,t=0){return g[e[t+0]]+g[e[t+1]]+g[e[t+2]]+g[e[t+3]]+"-"+g[e[t+4]]+g[e[t+5]]+"-"+g[e[t+6]]+g[e[t+7]]+"-"+g[e[t+8]]+g[e[t+9]]+"-"+g[e[t+10]]+g[e[t+11]]+g[e[t+12]]+g[e[t+13]]+g[e[t+14]]+g[e[t+15]]}const h=function(e,t,r){if(c.randomUUID&&!t&&!e)return c.randomUUID();const n=(e=e||{}).random||(e.rng||l)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return p(n)},f=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);var m=r(42952);const y="AWS_MAX_ATTEMPTS",w="max_attempts",S={environmentVariableSelector:e=>{const t=e[y];if(!t)return;const r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${y} mast be a number, got "${t}"`);return r},configFileSelector:e=>{const t=e[w];if(!t)return;const r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${w} mast be a number, got "${t}"`);return r},default:n.Gz},v=e=>{const{retryStrategy:t}=e,r=(0,m.t)(e.maxAttempts??n.Gz);return{...e,maxAttempts:r,retryStrategy:async()=>{if(t)return t;return await(0,m.t)(e.retryMode)()===n.cm.ADAPTIVE?new n.Y(r):new n.ru(r)}}},b={environmentVariableSelector:e=>e.AWS_RETRY_MODE,configFileSelector:e=>e.retry_mode,default:n.L0};var R=r(1802),E=r(2203);const A=e=>e?.body instanceof E.Readable||"undefined"!=typeof ReadableStream&&e?.body instanceof ReadableStream,T=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,C=e=>{const t={error:e,errorType:$(e)},r=k(e.$response);return r&&(t.retryAfterHint=r),t},$=e=>(0,i.Qb)(e)?"THROTTLING":(0,i.bV)(e)?"TRANSIENT":(0,i.GQ)(e)?"SERVER_ERROR":"CLIENT_ERROR",P={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},I=e=>({applyToStack:t=>{t.add((e=>(t,r)=>async i=>{let o=await e.retryStrategy();const a=await e.maxAttempts();if(!T(o))return o?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",o.mode]]),o.retry(t,i);{let e=await o.acquireInitialRetryToken(r.partition_id),c=new Error,u=0,d=0;const{request:l}=i,g=s.Kd.isInstance(l);for(g&&(l.headers[n.l5]=h());;)try{g&&(l.headers[n.ok]=`attempt=${u+1}; max=${a}`);const{response:r,output:s}=await t(i);return o.recordSuccess(e),s.$metadata.attempts=u+1,s.$metadata.totalRetryDelay=d,{response:r,output:s}}catch(t){const n=C(t);if(c=f(t),g&&A(l))throw(r.logger instanceof R.N4?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),c;try{e=await o.refreshRetryTokenForRetry(e,n)}catch(e){throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=d,c}u=e.getRetryCount();const s=e.getRetryDelay();d+=s,await new Promise((e=>setTimeout(e,s)))}}})(e),P)}}),k=e=>{if(!s.cS.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const r=e.headers[t],n=Number(r);if(!Number.isNaN(n))return new Date(1e3*n);return new Date(r)}},8029:(e,t,r)=>{r.d(t,{TM:()=>a,Ou:()=>o});const n=(e,t)=>r=>async n=>{const{response:s}=await r(n);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}},s=(e,t)=>(r,n)=>async s=>{const i=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;if(!i)throw new Error("No valid endpoint provider available.");const o=await t(s.input,{...e,endpoint:i});return r({...s,request:o})},i={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},o={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function a(e,t,r){return{applyToStack:a=>{a.add(n(e,r),i),a.add(s(e,t),o)}}}},1535:(e,t,r)=>{r.d(t,{h5:()=>u,S0:()=>c,GQ:()=>g,Qb:()=>d,bV:()=>l});const n=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],s=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],i=["TimeoutError","RequestTimeout","RequestTimeoutException"],o=[500,502,503,504],a=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],c=e=>void 0!==e.$retryable,u=e=>n.includes(e.name),d=e=>429===e.$metadata?.httpStatusCode||s.includes(e.name)||1==e.$retryable?.throttling,l=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||i.includes(e.name)||a.includes(e?.code||"")||o.includes(e.$metadata?.httpStatusCode||0),g=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!l(e)}return!1}},88226:(e,t,r)=>{r.d(t,{n:()=>s});var n=r(79896);const s=e=>{if(!e)return 0;if("string"==typeof e)return Buffer.byteLength(e);if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;if("number"==typeof e.start&&"number"==typeof e.end)return e.end+1-e.start;if("string"==typeof e.path||Buffer.isBuffer(e.path))return(0,n.lstatSync)(e.path).size;if("number"==typeof e.fd)return(0,n.fstatSync)(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)}},12165:(e,t,r)=>{r.d(t,{I:()=>d});var n=r(20512),s=r(75854),i=r(3631);const o="AWS_REGION",a="AWS_DEFAULT_REGION",c=["in-region","cross-region","mobile","standard","legacy"],u={environmentVariableSelector:e=>e.AWS_DEFAULTS_MODE,configFileSelector:e=>e.defaults_mode,default:"legacy"},d=({region:e=(0,s.Z)(n.GG),defaultsMode:t=(0,s.Z)(u)}={})=>(0,i.Bj)((async()=>{const r="function"==typeof t?await t():t;switch(r?.toLowerCase()){case"auto":return l(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${c.join(", ")}, got ${r}`)}})),l=async e=>{if(e){const t="function"==typeof e?await e():e,r=await g();return r?t===r?"in-region":"cross-region":"standard"}return"standard"},g=async()=>{if(process.env.AWS_EXECUTION_ENV&&(process.env[o]||process.env[a]))return process.env[o]??process.env[a];if(!process.env.AWS_EC2_METADATA_DISABLED)try{const{getInstanceMetadataEndpoint:e,httpRequest:t}=await Promise.resolve().then(r.bind(r,40728)),n=await e();return(await t({...n,path:"/latest/meta-data/placement/region"})).toString()}catch(e){}}},96954:(e,t,r)=>{r.d(t,{mw:()=>a,oX:()=>s,X8:()=>o,sO:()=>$});const n=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}$"),s=e=>n.test(e)||e.startsWith("[")&&e.endsWith("]"),i=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),o=(e,t=!1)=>{if(!t)return i.test(e);const r=e.split(".");for(const e of r)if(!o(e))return!1;return!0},a={},c="endpoints";function u(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${u(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(u).join(", ")})`:JSON.stringify(e,null,2)}class EndpointError extends Error{constructor(e){super(e),this.name="EndpointError"}}const d=(e,t)=>(e=>{const t=e.split("."),r=[];for(const n of t){const t=n.indexOf("[");if(-1!==t){if(n.indexOf("]")!==n.length-1)throw new EndpointError(`Path: '${e}' does not end with ']'`);const s=n.slice(t+1,-1);if(Number.isNaN(parseInt(s)))throw new EndpointError(`Invalid array index: '${s}' in path: '${e}'`);0!==t&&r.push(n.slice(0,t)),r.push(s)}else r.push(n)}return r})(t).reduce(((r,n)=>{if("object"!=typeof r)throw new EndpointError(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]}),e);var l=r(31932);const g={[l.Ue.HTTP]:80,[l.Ue.HTTPS]:443},p={booleanEquals:(e,t)=>e===t,getAttr:d,isSet:e=>null!=e,isValidHostLabel:o,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:r,protocol:n="",path:s="",query:i={}}=e,o=new URL(`${n}//${t}${r?`:${r}`:""}${s}`);return o.search=Object.entries(i).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:c}=t;if(c)return null;const u=a.slice(0,-1);if(!Object.values(l.Ue).includes(u))return null;const d=s(i);return{scheme:u,authority:`${n}${r.includes(`${n}:${g[u]}`)||"string"==typeof e&&e.includes(`${n}:${g[u]}`)?`:${g[u]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:d}},stringEquals:(e,t)=>e===t,substring:(e,t,r,n)=>t>=r||e.length<r?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},h=(e,t)=>{const r=[],n={...t.endpointParams,...t.referenceRecord};let s=0;for(;s<e.length;){const t=e.indexOf("{",s);if(-1===t){r.push(e.slice(s));break}r.push(e.slice(s,t));const i=e.indexOf("}",t);if(-1===i){r.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[i+1]&&(r.push(e.slice(t+1,i)),s=i+2);const o=e.substring(t+1,i);if(o.includes("#")){const[e,t]=o.split("#");r.push(d(n[e],t))}else r.push(n[o]);s=i+1}return r.join("")},f=(e,t,r)=>{if("string"==typeof e)return h(e,r);if(e.fn)return m(e,r);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,r);throw new EndpointError(`'${t}': ${String(e)} is not a string, function or reference.`)},m=({fn:e,argv:t},r)=>{const n=t.map((e=>["boolean","number"].includes(typeof e)?e:f(e,"arg",r))),s=e.split(".");return s[0]in a&&null!=s[1]?a[s[0]][s[1]](...n):p[e](...n)},y=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new EndpointError(`'${e}' is already defined in Reference Record.`);const n=m(t,r);return r.logger?.debug?.(`${c} evaluateCondition: ${u(t)} = ${u(n)}`),{result:""===n||!!n,...null!=e&&{toAssign:{name:e,value:n}}}},w=(e=[],t)=>{const r={};for(const n of e){const{result:e,toAssign:s}=y(n,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!e)return{result:e};s&&(r[s.name]=s.value,t.logger?.debug?.(`${c} assign: ${s.name} := ${u(s.value)}`))}return{result:!0,referenceRecord:r}},S=(e,t)=>Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:n.map((e=>{const n=f(e,"Header value entry",t);if("string"!=typeof n)throw new EndpointError(`Header '${r}' value '${n}' is not a string`);return n}))})),{}),v=(e,t)=>{if(Array.isArray(e))return e.map((e=>v(e,t)));switch(typeof e){case"string":return h(e,t);case"object":if(null===e)throw new EndpointError(`Unexpected endpoint property: ${e}`);return b(e,t);case"boolean":return e;default:throw new EndpointError("Unexpected endpoint property type: "+typeof e)}},b=(e,t)=>Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:v(n,t)})),{}),R=(e,t)=>{const r=f(e,"Endpoint URL",t);if("string"==typeof r)try{return new URL(r)}catch(e){throw console.error(`Failed to construct URL with ${r}`,e),e}throw new EndpointError("Endpoint URL must be a string, got "+typeof r)},E=(e,t)=>{const{conditions:r,endpoint:n}=e,{result:s,referenceRecord:i}=w(r,t);if(!s)return;const o={...t,referenceRecord:{...t.referenceRecord,...i}},{url:a,properties:d,headers:l}=n;return t.logger?.debug?.(`${c} Resolving endpoint from template: ${u(n)}`),{...null!=l&&{headers:S(l,o)},...null!=d&&{properties:b(d,o)},url:R(a,o)}},A=(e,t)=>{const{conditions:r,error:n}=e,{result:s,referenceRecord:i}=w(r,t);if(s)throw new EndpointError(f(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},T=(e,t)=>{const{conditions:r,rules:n}=e,{result:s,referenceRecord:i}=w(r,t);if(s)return C(n,{...t,referenceRecord:{...t.referenceRecord,...i}})},C=(e,t)=>{for(const r of e)if("endpoint"===r.type){const e=E(r,t);if(e)return e}else if("error"===r.type)A(r,t);else{if("tree"!==r.type)throw new EndpointError(`Unknown endpoint rule: ${r}`);{const e=T(r,t);if(e)return e}}throw new EndpointError("Rules evaluation failed")},$=(e,t)=>{const{endpointParams:r,logger:n}=t,{parameters:s,rules:i}=e;t.logger?.debug?.(`${c} Initial EndpointParams: ${u(r)}`);const o=Object.entries(s).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)r[e]=r[e]??t;const a=Object.entries(s).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==r[e])throw new EndpointError(`Missing required parameter: '${e}'`);const d=C(i,{endpointParams:r,logger:n,referenceRecord:{}});if(t.endpointParams?.Endpoint)try{const e=new URL(t.endpointParams.Endpoint),{protocol:r,port:n}=e;d.url.protocol=r,d.url.port=n}catch(e){}return t.logger?.debug?.(`${c} Resolved endpoint: ${u(d)}`),d}},42952:(e,t,r)=>{r.d(t,{u:()=>s,t:()=>i});var n=r(31932);const s=e=>e[n.Vf]||(e[n.Vf]={}),i=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t}},94134:(e,t,r)=>{var n;r.d(t,{Y:()=>AdaptiveRetryStrategy,Gz:()=>s,bp:()=>a,L0:()=>i,QJ:()=>DefaultRateLimiter,Df:()=>d,l5:()=>h,G8:()=>c,XP:()=>p,ok:()=>f,XS:()=>l,cm:()=>n,ru:()=>StandardRetryStrategy,jh:()=>u,Rn:()=>g}),function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(n||(n={}));const s=3,i=n.STANDARD;var o=r(1535);class DefaultRateLimiter{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),(0,o.Qb)(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const a=100,c=2e4,u=500,d=500,l=5,g=10,p=1,h="amz-sdk-invocation-id",f="amz-sdk-request",m=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(c,e),getRetryCost:()=>r});class StandardRetryStrategy{constructor(e){this.maxAttempts=e,this.mode=n.STANDARD,this.capacity=d,this.retryBackoffStrategy=(()=>{let e=a;return{computeNextBackoffDelay:t=>Math.floor(Math.min(c,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return m({retryDelay:a,retryCount:0})}async refreshRetryTokenForRetry(e,t){const r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){const r=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===r?u:a);const n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(r);return this.capacity-=i,m({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(d,this.capacity+(e.getRetryCost()??p))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${s}`),s}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?g:l}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class AdaptiveRetryStrategy{constructor(e,t){this.maxAttemptsProvider=e,this.mode=n.ADAPTIVE;const{rateLimiter:r}=t??{};this.rateLimiter=r??new DefaultRateLimiter,this.standardRetryStrategy=new StandardRetryStrategy(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}}};
1
+ "use strict";exports.id=502,exports.ids=[502],exports.modules={1535:(e,t,r)=>{r.d(t,{h5:()=>u,S0:()=>c,GQ:()=>g,Qb:()=>d,bV:()=>l});const n=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],s=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],i=["TimeoutError","RequestTimeout","RequestTimeoutException"],o=[500,502,503,504],a=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],c=e=>void 0!==e.$retryable,u=e=>n.includes(e.name),d=e=>429===e.$metadata?.httpStatusCode||s.includes(e.name)||1==e.$retryable?.throttling,l=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||i.includes(e.name)||a.includes(e?.code||"")||o.includes(e.$metadata?.httpStatusCode||0),g=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!l(e)}return!1}},2103:(e,t,r)=>{r.d(t,{qs:()=>S,kN:()=>b,ey:()=>I,$z:()=>v,j7:()=>P});var n=r(94134),s=r(47624),i=r(1535),o=r(76982),a=r.n(o);const c={randomUUID:a().randomUUID},u=new Uint8Array(256);let d=u.length;function l(){return d>u.length-16&&(a().randomFillSync(u),d=0),u.slice(d,d+=16)}const g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).slice(1));function p(e,t=0){return g[e[t+0]]+g[e[t+1]]+g[e[t+2]]+g[e[t+3]]+"-"+g[e[t+4]]+g[e[t+5]]+"-"+g[e[t+6]]+g[e[t+7]]+"-"+g[e[t+8]]+g[e[t+9]]+"-"+g[e[t+10]]+g[e[t+11]]+g[e[t+12]]+g[e[t+13]]+g[e[t+14]]+g[e[t+15]]}const h=function(e,t,r){if(c.randomUUID&&!t&&!e)return c.randomUUID();const n=(e=e||{}).random||(e.rng||l)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return p(n)},f=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);var m=r(42952);const y="AWS_MAX_ATTEMPTS",w="max_attempts",S={environmentVariableSelector:e=>{const t=e[y];if(!t)return;const r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${y} mast be a number, got "${t}"`);return r},configFileSelector:e=>{const t=e[w];if(!t)return;const r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${w} mast be a number, got "${t}"`);return r},default:n.Gz},v=e=>{const{retryStrategy:t}=e,r=(0,m.t)(e.maxAttempts??n.Gz);return{...e,maxAttempts:r,retryStrategy:async()=>{if(t)return t;return await(0,m.t)(e.retryMode)()===n.cm.ADAPTIVE?new n.Y(r):new n.ru(r)}}},b={environmentVariableSelector:e=>e.AWS_RETRY_MODE,configFileSelector:e=>e.retry_mode,default:n.L0};var R=r(1802),E=r(2203);const A=e=>e?.body instanceof E.Readable||"undefined"!=typeof ReadableStream&&e?.body instanceof ReadableStream,T=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,C=e=>{const t={error:e,errorType:$(e)},r=k(e.$response);return r&&(t.retryAfterHint=r),t},$=e=>(0,i.Qb)(e)?"THROTTLING":(0,i.bV)(e)?"TRANSIENT":(0,i.GQ)(e)?"SERVER_ERROR":"CLIENT_ERROR",P={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},I=e=>({applyToStack:t=>{t.add((e=>(t,r)=>async i=>{let o=await e.retryStrategy();const a=await e.maxAttempts();if(!T(o))return o?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",o.mode]]),o.retry(t,i);{let e=await o.acquireInitialRetryToken(r.partition_id),c=new Error,u=0,d=0;const{request:l}=i,g=s.Kd.isInstance(l);for(g&&(l.headers[n.l5]=h());;)try{g&&(l.headers[n.ok]=`attempt=${u+1}; max=${a}`);const{response:r,output:s}=await t(i);return o.recordSuccess(e),s.$metadata.attempts=u+1,s.$metadata.totalRetryDelay=d,{response:r,output:s}}catch(t){const n=C(t);if(c=f(t),g&&A(l))throw(r.logger instanceof R.N4?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),c;try{e=await o.refreshRetryTokenForRetry(e,n)}catch(e){throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=d,c}u=e.getRetryCount();const s=e.getRetryDelay();d+=s,await new Promise((e=>setTimeout(e,s)))}}})(e),P)}}),k=e=>{if(!s.cS.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const r=e.headers[t],n=Number(r);if(!Number.isNaN(n))return new Date(1e3*n);return new Date(r)}},3119:(e,t,r)=>{r.d(t,{Rq:()=>n,$3:()=>s});const n=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},s=e=>({region:e.region()})},6775:(e,t,r)=>{r.d(t,{UF:()=>c,vL:()=>a});var n=r(96954);const s=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!s(t))return!1;return!0}return!!(0,n.X8)(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!(0,n.oX)(e)))};let i=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}'),o="";const a=()=>o,c={isVirtualHostableS3Bucket:s,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[r,n,s,i,o,...a]=t;return"arn"!==r||""===n||""===s||""===a[0]?null:{partition:n,service:s,region:i,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},partition:e=>{const{partitions:t}=i;for(const r of t){const{regions:t,outputs:n}=r;for(const[r,s]of Object.entries(t))if(r===e)return{...n,...s}}for(const r of t){const{regionRegex:t,outputs:n}=r;if(new RegExp(t).test(e))return{...n}}const r=t.find((e=>"aws"===e.id));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}}};n.mw.aws=c},8029:(e,t,r)=>{r.d(t,{TM:()=>a,Ou:()=>o});const n=(e,t)=>r=>async n=>{const{response:s}=await r(n);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}},s=(e,t)=>(r,n)=>async s=>{const i=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;if(!i)throw new Error("No valid endpoint provider available.");const o=await t(s.input,{...e,endpoint:i});return r({...s,request:o})},i={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},o={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function a(e,t,r){return{applyToStack:a=>{a.add(n(e,r),i),a.add(s(e,t),o)}}}},12165:(e,t,r)=>{r.d(t,{I:()=>d});var n=r(20512),s=r(75854),i=r(3631);const o="AWS_REGION",a="AWS_DEFAULT_REGION",c=["in-region","cross-region","mobile","standard","legacy"],u={environmentVariableSelector:e=>e.AWS_DEFAULTS_MODE,configFileSelector:e=>e.defaults_mode,default:"legacy"},d=({region:e=(0,s.Z)(n.GG),defaultsMode:t=(0,s.Z)(u)}={})=>(0,i.Bj)((async()=>{const r="function"==typeof t?await t():t;switch(r?.toLowerCase()){case"auto":return l(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${c.join(", ")}, got ${r}`)}})),l=async e=>{if(e){const t="function"==typeof e?await e():e,r=await g();return r?t===r?"in-region":"cross-region":"standard"}return"standard"},g=async()=>{if(process.env.AWS_EXECUTION_ENV&&(process.env[o]||process.env[a]))return process.env[o]??process.env[a];if(!process.env.AWS_EC2_METADATA_DISABLED)try{const{getInstanceMetadataEndpoint:e,httpRequest:t}=await Promise.resolve().then(r.bind(r,40728)),n=await e();return(await t({...n,path:"/latest/meta-data/placement/region"})).toString()}catch(e){}}},20512:(e,t,r)=>{r.d(t,{zH:()=>c,GG:()=>a,e$:()=>i,Ko:()=>o,TD:()=>l});const n=(e,t,r)=>{if(t in e){if("true"===e[t])return!0;if("false"===e[t])return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)}};var s;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(s||(s={}));const i={environmentVariableSelector:e=>n(e,"AWS_USE_DUALSTACK_ENDPOINT",s.ENV),configFileSelector:e=>n(e,"use_dualstack_endpoint",s.CONFIG),default:!1},o={environmentVariableSelector:e=>n(e,"AWS_USE_FIPS_ENDPOINT",s.ENV),configFileSelector:e=>n(e,"use_fips_endpoint",s.CONFIG),default:!1};r(42952);const a={environmentVariableSelector:e=>e.AWS_REGION,configFileSelector:e=>e.region,default:()=>{throw new Error("Region is missing")}},c={preferredFile:"credentials"},u=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),d=e=>u(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,l=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return d(t);const e=await t();return d(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!u(e)||("function"!=typeof r?Promise.resolve(!!r):r())}}}},25708:(e,t,r)=>{r.d(t,{V:()=>Hash});var n=r(96385),s=r(67670),i=r(20181),o=r(76982);class Hash{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update((0,s.Fo)(a(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?(0,o.createHmac)(this.algorithmIdentifier,a(this.secret)):(0,o.createHash)(this.algorithmIdentifier)}}function a(e,t){return i.Buffer.isBuffer(e)?e:"string"==typeof e?(0,n.s)(e,t):ArrayBuffer.isView(e)?(0,n.Q)(e.buffer,e.byteOffset,e.byteLength):(0,n.Q)(e)}},31758:(e,t,r)=>{r.d(t,{OV:()=>s,TC:()=>o});var n=r(47624);function s(e){return e}const i={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},o=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{if(!n.Kd.isInstance(r.request))return t(r);const{request:s}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let e=s.hostname;null!=s.port&&(e+=`:${s.port}`),s.headers.host=e}return t(r)})(e),i)}})},33202:(e,t,r)=>{function n(e){return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent}}r.d(t,{sM:()=>g,Dc:()=>n});var s=r(6775),i=r(47624);const o="user-agent",a="x-amz-user-agent",c=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,u=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,d=e=>{const t=e[0].split("/").map((e=>e.replace(c,"-"))).join("/"),r=e[1]?.replace(u,"-"),n=t.indexOf("/"),s=t.substring(0,n);let i=t.substring(n+1);return"api"===s&&(i=i.toLowerCase()),[s,i,r].filter((e=>e&&e.length>0)).reduce(((e,t,r)=>{switch(r){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},l={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},g=e=>({applyToStack:t=>{var r;t.add((r=e,(e,t)=>async n=>{const{request:c}=n;if(!i.Kd.isInstance(c))return e(n);const{headers:u}=c,l=t?.userAgent?.map(d)||[],g=(await r.defaultUserAgentProvider()).map(d),p=r?.customUserAgent?.map(d)||[],h=(0,s.vL)(),f=(h?[h]:[]).concat([...g,...l,...p]).join(" "),m=[...g.filter((e=>e.startsWith("aws-sdk-"))),...p].join(" ");return"browser"!==r.runtime?(m&&(u[a]=u[a]?`${u[o]} ${m}`:m),u[o]=f):u[a]=f,e({...n,request:c})}),l)}})},34546:(e,t,r)=>{r.d(t,{ko:()=>S,rD:()=>v,Co:()=>b});const n=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,s=/(\d+\.){3}\d+/,i=/\.\./,o=e=>n.test(e)&&!s.test(e)&&!i.test(e),a=e=>{const[t,r,n,,,s]=e.split(":"),i="arn"===t&&e.split(":").length>=6,o=Boolean(i&&r&&n&&s);if(i&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},c=(e,t,r)=>{const n=async()=>{const n=r[e]??r[t];return"function"==typeof n?n():n};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await n();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:r,port:n,path:s}=e;return`${t}//${r}${n?":"+n:""}${s}`}}return e}:n};var u=r(75854),d=r(70619);const l="AWS_ENDPOINT_URL",g="endpoint_url",p=async e=>(0,u.Z)((e=>({environmentVariableSelector:t=>{const r=e.split(" ").map((e=>e.toUpperCase())),n=t[[l,...r].join("_")];if(n)return n;return t[l]||void 0},configFileSelector:(t,r)=>{if(r&&t.services){const n=r[["services",t.services].join(d.QD)];if(n){const t=n[[e.split(" ").map((e=>e.toLowerCase())).join("_"),g].join(d.QD)];if(t)return t}}const n=t[g];if(n)return n},default:void 0}))(e))();var h=r(42640);const f=e=>"object"==typeof e?"url"in e?(0,h.D)(e.url):e:(0,h.D)(e),m=async(e,t,r)=>{const n={},s=t?.getEndpointParameterInstructions?.()||{};for(const[t,i]of Object.entries(s))switch(i.type){case"staticContextParams":n[t]=i.value;break;case"contextParams":n[t]=e[i.name];break;case"clientContextParams":case"builtInParams":n[t]=await c(i.name,t,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}return 0===Object.keys(s).length&&Object.assign(n,r),"s3"===String(r.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),a(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!o(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(n),n};var y=r(42952);const w=({config:e,instructions:t})=>(r,n)=>async s=>{const i=await(async(e,t,r,n)=>{if(!r.endpoint){const e=await p(r.serviceId||"");e&&(r.endpoint=()=>Promise.resolve(f(e)))}const s=await m(e,t,r);if("function"!=typeof r.endpointProvider)throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)})(s.input,{getEndpointParameterInstructions:()=>t},{...e},n);n.endpointV2=i,n.authSchemes=i.properties?.authSchemes;const o=n.authSchemes?.[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const e=(0,y.u)(n),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return r({...s})};const S={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:r(8029).Ou.name},v=(e,t)=>({applyToStack:r=>{r.addRelativeTo(w({config:e,instructions:t}),S)}}),b=e=>{const t=e.tls??!0,{endpoint:r}=e,n=null!=r?async()=>f(await(0,y.t)(r)()):void 0,s=!!r;return{...e,endpoint:n,tls:t,isCustomEndpoint:s,useDualstackEndpoint:(0,y.t)(e.useDualstackEndpoint??!1),useFipsEndpoint:(0,y.t)(e.useFipsEndpoint??!1)}}},42952:(e,t,r)=>{r.d(t,{u:()=>s,t:()=>i});var n=r(31932);const s=e=>e[n.Vf]||(e[n.Vf]={}),i=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t}},46170:(e,t,r)=>{r.d(t,{Y7:()=>s});const n={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},s=e=>({applyToStack:e=>{e.add(((e,t)=>async r=>{try{const n=await e(r),{clientName:s,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:g,...p}=n.output;return o?.info?.({clientName:s,commandName:i,input:d(r.input),output:l(p),metadata:g}),n}catch(e){const{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:c(r.input),error:e,metadata:e.$metadata}),e}}),n)}})},51320:(e,t,r)=>{r.d(t,{vK:()=>o});var n=r(47624);const s="content-length";const i={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},o=e=>({applyToStack:t=>{var r;t.add((r=e.bodyLengthChecker,e=>async t=>{const i=t.request;if(n.Kd.isInstance(i)){const{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(s))try{const t=r(e);i.headers={...i.headers,[s]:String(t)}}catch(e){}}return e({...t,request:i})}),i)}})},53127:(e,t,r)=>{r.d(t,{w:()=>s});var n=r(1802);const s=(e,t)=>(0,n.Px)(e,t).then((e=>t.utf8Encoder(e)))},59065:(e,t,r)=>{r.d(t,{f:()=>AwsSdkSigV4Signer});var n=r(47624);const s=e=>new Date(Date.now()+e),i=e=>n.cS.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,o=(e,t)=>{const r=Date.parse(e);return((e,t)=>Math.abs(s(t).getTime()-e)>=3e5)(r,t)?r-Date.now():t},a=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class AwsSdkSigV4Signer{async sign(e,t,r){if(!n.Kd.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:o,signingRegion:c,signingName:u}=await(async e=>{const t=a("context",e.context),r=a("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],s=a("signer",r.signer),i=await s(n),o=e?.signingRegion,c=e?.signingName;return{config:r,signer:i,signingRegion:o,signingName:c}})(r);return await o.sign(e,{signingDate:s(i.systemClockOffset),signingRegion:c,signingService:u})}errorHandler(e){return t=>{const r=t.ServerTime??i(t.$response);if(r){const n=a("config",e.config),s=n.systemClockOffset;n.systemClockOffset=o(r,n.systemClockOffset);n.systemClockOffset!==s&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=i(e);if(r){const e=a("config",t.config);e.systemClockOffset=o(r,e.systemClockOffset)}}}},62438:(e,t,r)=>{r.d(t,{mJ:()=>a});var n=r(75854),s=r(70857),i=r(932);const o=!1,a=({serviceId:e,clientVersion:t})=>{const r=[["aws-sdk-js",t],["ua","2.0"],[`os/${(0,s.platform)()}`,(0,s.release)()],["lang/js"],["md/nodejs",`${i.versions.node}`]],a=o?["md/crt-avail"]:null;a&&r.push(a),e&&r.push([`api/${e}`,t]),i.env.AWS_EXECUTION_ENV&&r.push([`exec-env/${i.env.AWS_EXECUTION_ENV}`]);const c=(0,n.Z)({environmentVariableSelector:e=>e.AWS_SDK_UA_APP_ID,configFileSelector:e=>e["sdk-ua-app-id"],default:void 0})();let u;return async()=>{if(!u){const e=await c;u=e?[...r,[`app/${e}`]]:[...r]}return u}}},68227:(e,t,r)=>{r.d(t,{I:()=>s});let n=!1;const s=e=>{e&&!n&&parseInt(e.substring(1,e.indexOf(".")))<18&&(n=!0,process.emitWarning("NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 16.x on January 6, 2025.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/74kJMmI"))}},71383:(e,t,r)=>{r.d(t,{h:()=>q});var n=r(97882),s=r(82369),i=r(42952),o=r(30548),a=r(67670);const c="X-Amz-Date",u="X-Amz-Signature",d="X-Amz-Security-Token",l="authorization",g=c.toLowerCase(),p=[l,g,"date"],h=u.toLowerCase(),f="x-amz-content-sha256",m=d.toLowerCase(),y={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},w=/^proxy-/,S=/^sec-/,v="AWS4-HMAC-SHA256",b="AWS4-HMAC-SHA256-PAYLOAD",R="aws4_request",E={},A=[],T=(e,t,r)=>`${e}/${t}/${r}/${R}`,C=(e,t,r)=>{const n=new e(t);return n.update((0,a.Fo)(r)),n.digest()},$=({headers:e},t,r)=>{const n={};for(const s of Object.keys(e).sort()){if(null==e[s])continue;const i=s.toLowerCase();(i in y||t?.has(i)||w.test(i)||S.test(i))&&(!r||r&&!r.has(i))||(n[i]=e[s].trim().replace(/\s+/g," "))}return n};var P=r(41150);const I=async({headers:e,body:t},r)=>{for(const t of Object.keys(e))if(t.toLowerCase()===f)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(0,P.m)(t)){const e=new r;return e.update((0,a.Fo)(t)),(0,s.n)(await e.digest())}return"UNSIGNED-PAYLOAD"};class HeaderFormatter{format(e){const t=[];for(const r of Object.keys(e)){const n=(0,a.ar)(r);t.push(Uint8Array.from([n.byteLength]),n,this.formatHeaderValue(e[r]))}const r=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const e of t)r.set(e,n),n+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const c=(0,a.ar)(e.value),u=new DataView(new ArrayBuffer(3+c.byteLength));u.setUint8(0,7),u.setUint16(1,c.byteLength,!1);const d=new Uint8Array(u.buffer);return d.set(c,3),d;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(Int64.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!D.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=9,g.set((0,s.a)(e.value.replace(/\-/g,"")),1),g}}}var k;!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"}(k||(k={}));const D=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Int64{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&x(t),new Int64(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&x(e),parseInt((0,s.n)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function x(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}var N=r(47624);const O=e=>{e=N.Kd.clone(e);for(const t of Object.keys(e.headers))p.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},U=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class SignatureV4{constructor({applyChecksum:e,credentials:t,region:r,service:n,sha256:s,uriEscapePath:o=!0}){this.headerFormatter=new HeaderFormatter,this.service=n,this.sha256=s,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,i.t)(r),this.credentialProvider=(0,i.t)(t)}async presign(e,t={}){const{signingDate:r=new Date,expiresIn:n=3600,unsignableHeaders:s,unhoistableHeaders:i,signableHeaders:o,signingRegion:a,signingService:l}=t,g=await this.credentialProvider();this.validateResolvedCredentials(g);const p=a??await this.regionProvider(),{longDate:h,shortDate:f}=L(r);if(n>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const m=T(f,p,l??this.service),y=((e,t={})=>{const{headers:r,query:n={}}=N.Kd.clone(e);for(const e of Object.keys(r)){const s=e.toLowerCase();"x-amz-"!==s.slice(0,6)||t.unhoistableHeaders?.has(s)||(n[e]=r[e],delete r[e])}return{...e,headers:r,query:n}})(O(e),{unhoistableHeaders:i});g.sessionToken&&(y.query[d]=g.sessionToken),y.query["X-Amz-Algorithm"]=v,y.query["X-Amz-Credential"]=`${g.accessKeyId}/${m}`,y.query[c]=h,y.query["X-Amz-Expires"]=n.toString(10);const w=$(y,s,o);return y.query["X-Amz-SignedHeaders"]=M(w),y.query[u]=await this.getSignature(h,m,this.getSigningKey(g,p,f,l),this.createCanonicalRequest(y,w,await I(e,this.sha256))),y}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:r=new Date,priorSignature:n,signingRegion:i,signingService:o}){const a=i??await this.regionProvider(),{shortDate:c,longDate:u}=L(r),d=T(c,a,o??this.service),l=await I({headers:{},body:t},this.sha256),g=new this.sha256;g.update(e);const p=(0,s.n)(await g.digest()),h=[b,u,d,n,p,l].join("\n");return this.signString(h,{signingDate:r,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:r,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:r,signingService:n,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:r,signingService:n}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=r??await this.regionProvider(),{shortDate:c}=L(t),u=new this.sha256(await this.getSigningKey(i,o,c,n));return u.update((0,a.Fo)(e)),(0,s.n)(await u.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:r,unsignableHeaders:n,signingRegion:s,signingService:i}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=s??await this.regionProvider(),c=O(e),{longDate:u,shortDate:d}=L(t),p=T(d,a,i??this.service);c.headers[g]=u,o.sessionToken&&(c.headers[m]=o.sessionToken);const h=await I(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1})(f,c.headers)&&this.applyChecksum&&(c.headers[f]=h);const y=$(c,n,r),w=await this.getSignature(u,p,this.getSigningKey(o,a,d,i),this.createCanonicalRequest(c,y,h));return c.headers[l]=`${v} Credential=${o.accessKeyId}/${p}, SignedHeaders=${M(y)}, Signature=${w}`,c}createCanonicalRequest(e,t,r){const n=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e).sort()){if(n.toLowerCase()===h)continue;t.push(n);const s=e[n];"string"==typeof s?r[n]=`${(0,o.o)(n)}=${(0,o.o)(s)}`:Array.isArray(s)&&(r[n]=s.slice(0).reduce(((e,t)=>e.concat([`${(0,o.o)(n)}=${(0,o.o)(t)}`])),[]).sort().join("&"))}return t.map((e=>r[e])).filter((e=>e)).join("&")})(e)}\n${n.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${n.join(";")}\n${r}`}async createStringToSign(e,t,r){const n=new this.sha256;n.update((0,a.Fo)(r));const i=await n.digest();return`${v}\n${e}\n${t}\n${(0,s.n)(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const r of e.split("/"))0!==r?.length&&"."!==r&&(".."===r?t.pop():t.push(r));const r=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return(0,o.o)(r).replace(/%2F/g,"/")}return e}async getSignature(e,t,r,n){const i=await this.createStringToSign(e,t,n),o=new this.sha256(await r);return o.update((0,a.Fo)(i)),(0,s.n)(await o.digest())}getSigningKey(e,t,r,n){return(async(e,t,r,n,i)=>{const o=await C(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${n}:${i}:${(0,s.n)(o)}:${t.sessionToken}`;if(a in E)return E[a];for(A.push(a);A.length>50;)delete E[A.shift()];let c=`AWS4${t.secretAccessKey}`;for(const t of[r,n,i,R])c=await C(e,c,t);return E[a]=c})(this.sha256,e,r,t,n||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const L=e=>{const t=(r=e,U(r).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var r;return{longDate:t,shortDate:t.slice(0,8)}},M=e=>Object.keys(e).sort().join(";"),q=e=>{let t;e.credentials&&(t=(0,n.K4)(e.credentials,n.OC,n.e)),t||(t=e.credentialDefaultProvider?(0,n.te)(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:r=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:i}=e;let o;return o=e.signer?(0,n.te)(e.signer):e.regionInfoProvider?()=>(0,n.te)(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,s])=>{const{signingRegion:o,signingService:a}=n;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r};return new(e.signerConstructor||SignatureV4)(c)})):async s=>{const o=(s=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await(0,n.te)(e.region)(),properties:{}},s)).signingRegion,a=s.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r};return new(e.signerConstructor||SignatureV4)(c)},{...e,systemClockOffset:s,signingEscapePath:r,credentials:t,signer:o}}},88226:(e,t,r)=>{r.d(t,{n:()=>s});var n=r(79896);const s=e=>{if(!e)return 0;if("string"==typeof e)return Buffer.byteLength(e);if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;if("number"==typeof e.start&&"number"==typeof e.end)return e.end+1-e.start;if("string"==typeof e.path||Buffer.isBuffer(e.path))return(0,n.lstatSync)(e.path).size;if("number"==typeof e.fd)return(0,n.fstatSync)(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)}},94134:(e,t,r)=>{var n;r.d(t,{Y:()=>AdaptiveRetryStrategy,Gz:()=>s,bp:()=>a,L0:()=>i,QJ:()=>DefaultRateLimiter,Df:()=>d,l5:()=>h,G8:()=>c,XP:()=>p,ok:()=>f,XS:()=>l,cm:()=>n,ru:()=>StandardRetryStrategy,jh:()=>u,Rn:()=>g}),function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(n||(n={}));const s=3,i=n.STANDARD;var o=r(1535);class DefaultRateLimiter{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),(0,o.Qb)(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const a=100,c=2e4,u=500,d=500,l=5,g=10,p=1,h="amz-sdk-invocation-id",f="amz-sdk-request",m=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(c,e),getRetryCost:()=>r});class StandardRetryStrategy{constructor(e){this.maxAttempts=e,this.mode=n.STANDARD,this.capacity=d,this.retryBackoffStrategy=(()=>{let e=a;return{computeNextBackoffDelay:t=>Math.floor(Math.min(c,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return m({retryDelay:a,retryCount:0})}async refreshRetryTokenForRetry(e,t){const r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){const r=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===r?u:a);const n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(r);return this.capacity-=i,m({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(d,this.capacity+(e.getRetryCost()??p))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${s}`),s}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?g:l}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class AdaptiveRetryStrategy{constructor(e,t){this.maxAttemptsProvider=e,this.mode=n.ADAPTIVE;const{rateLimiter:r}=t??{};this.rateLimiter=r??new DefaultRateLimiter,this.standardRetryStrategy=new StandardRetryStrategy(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}},96692:(e,t,r)=>{r.d(t,{n4:()=>o});var n=r(47624);const s="X-Amzn-Trace-Id",i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},o=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{const{request:i}=r;if(!n.Kd.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(s))return t(r);const o=process.env.AWS_LAMBDA_FUNCTION_NAME,a=process.env._X_AMZN_TRACE_ID,c=e=>"string"==typeof e&&e.length>0;return c(o)&&c(a)&&(i.headers[s]=a),t({...r,request:i})})(e),i)}})},96954:(e,t,r)=>{r.d(t,{mw:()=>a,oX:()=>s,X8:()=>o,sO:()=>$});const n=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}$"),s=e=>n.test(e)||e.startsWith("[")&&e.endsWith("]"),i=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),o=(e,t=!1)=>{if(!t)return i.test(e);const r=e.split(".");for(const e of r)if(!o(e))return!1;return!0},a={},c="endpoints";function u(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${u(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(u).join(", ")})`:JSON.stringify(e,null,2)}class EndpointError extends Error{constructor(e){super(e),this.name="EndpointError"}}const d=(e,t)=>(e=>{const t=e.split("."),r=[];for(const n of t){const t=n.indexOf("[");if(-1!==t){if(n.indexOf("]")!==n.length-1)throw new EndpointError(`Path: '${e}' does not end with ']'`);const s=n.slice(t+1,-1);if(Number.isNaN(parseInt(s)))throw new EndpointError(`Invalid array index: '${s}' in path: '${e}'`);0!==t&&r.push(n.slice(0,t)),r.push(s)}else r.push(n)}return r})(t).reduce(((r,n)=>{if("object"!=typeof r)throw new EndpointError(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]}),e);var l=r(31932);const g={[l.Ue.HTTP]:80,[l.Ue.HTTPS]:443},p={booleanEquals:(e,t)=>e===t,getAttr:d,isSet:e=>null!=e,isValidHostLabel:o,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:r,protocol:n="",path:s="",query:i={}}=e,o=new URL(`${n}//${t}${r?`:${r}`:""}${s}`);return o.search=Object.entries(i).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:c}=t;if(c)return null;const u=a.slice(0,-1);if(!Object.values(l.Ue).includes(u))return null;const d=s(i);return{scheme:u,authority:`${n}${r.includes(`${n}:${g[u]}`)||"string"==typeof e&&e.includes(`${n}:${g[u]}`)?`:${g[u]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:d}},stringEquals:(e,t)=>e===t,substring:(e,t,r,n)=>t>=r||e.length<r?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},h=(e,t)=>{const r=[],n={...t.endpointParams,...t.referenceRecord};let s=0;for(;s<e.length;){const t=e.indexOf("{",s);if(-1===t){r.push(e.slice(s));break}r.push(e.slice(s,t));const i=e.indexOf("}",t);if(-1===i){r.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[i+1]&&(r.push(e.slice(t+1,i)),s=i+2);const o=e.substring(t+1,i);if(o.includes("#")){const[e,t]=o.split("#");r.push(d(n[e],t))}else r.push(n[o]);s=i+1}return r.join("")},f=(e,t,r)=>{if("string"==typeof e)return h(e,r);if(e.fn)return m(e,r);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,r);throw new EndpointError(`'${t}': ${String(e)} is not a string, function or reference.`)},m=({fn:e,argv:t},r)=>{const n=t.map((e=>["boolean","number"].includes(typeof e)?e:f(e,"arg",r))),s=e.split(".");return s[0]in a&&null!=s[1]?a[s[0]][s[1]](...n):p[e](...n)},y=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new EndpointError(`'${e}' is already defined in Reference Record.`);const n=m(t,r);return r.logger?.debug?.(`${c} evaluateCondition: ${u(t)} = ${u(n)}`),{result:""===n||!!n,...null!=e&&{toAssign:{name:e,value:n}}}},w=(e=[],t)=>{const r={};for(const n of e){const{result:e,toAssign:s}=y(n,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!e)return{result:e};s&&(r[s.name]=s.value,t.logger?.debug?.(`${c} assign: ${s.name} := ${u(s.value)}`))}return{result:!0,referenceRecord:r}},S=(e,t)=>Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:n.map((e=>{const n=f(e,"Header value entry",t);if("string"!=typeof n)throw new EndpointError(`Header '${r}' value '${n}' is not a string`);return n}))})),{}),v=(e,t)=>{if(Array.isArray(e))return e.map((e=>v(e,t)));switch(typeof e){case"string":return h(e,t);case"object":if(null===e)throw new EndpointError(`Unexpected endpoint property: ${e}`);return b(e,t);case"boolean":return e;default:throw new EndpointError("Unexpected endpoint property type: "+typeof e)}},b=(e,t)=>Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:v(n,t)})),{}),R=(e,t)=>{const r=f(e,"Endpoint URL",t);if("string"==typeof r)try{return new URL(r)}catch(e){throw console.error(`Failed to construct URL with ${r}`,e),e}throw new EndpointError("Endpoint URL must be a string, got "+typeof r)},E=(e,t)=>{const{conditions:r,endpoint:n}=e,{result:s,referenceRecord:i}=w(r,t);if(!s)return;const o={...t,referenceRecord:{...t.referenceRecord,...i}},{url:a,properties:d,headers:l}=n;return t.logger?.debug?.(`${c} Resolving endpoint from template: ${u(n)}`),{...null!=l&&{headers:S(l,o)},...null!=d&&{properties:b(d,o)},url:R(a,o)}},A=(e,t)=>{const{conditions:r,error:n}=e,{result:s,referenceRecord:i}=w(r,t);if(s)throw new EndpointError(f(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},T=(e,t)=>{const{conditions:r,rules:n}=e,{result:s,referenceRecord:i}=w(r,t);if(s)return C(n,{...t,referenceRecord:{...t.referenceRecord,...i}})},C=(e,t)=>{for(const r of e)if("endpoint"===r.type){const e=E(r,t);if(e)return e}else if("error"===r.type)A(r,t);else{if("tree"!==r.type)throw new EndpointError(`Unknown endpoint rule: ${r}`);{const e=T(r,t);if(e)return e}}throw new EndpointError("Rules evaluation failed")},$=(e,t)=>{const{endpointParams:r,logger:n}=t,{parameters:s,rules:i}=e;t.logger?.debug?.(`${c} Initial EndpointParams: ${u(r)}`);const o=Object.entries(s).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)r[e]=r[e]??t;const a=Object.entries(s).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==r[e])throw new EndpointError(`Missing required parameter: '${e}'`);const d=C(i,{endpointParams:r,logger:n,referenceRecord:{}});if(t.endpointParams?.Endpoint)try{const e=new URL(t.endpointParams.Endpoint),{protocol:r,port:n}=e;d.url.protocol=r,d.url.port=n}catch(e){}return t.logger?.debug?.(`${c} Resolved endpoint: ${u(d)}`),d}},97882:(e,t,r)=>{r.d(t,{h$:()=>DefaultIdentityProviderConfig,mR:()=>NoAuthSigner,e:()=>h,wB:()=>o,lW:()=>l,OC:()=>g,K4:()=>f,te:()=>m,lI:()=>w});r(31932);var n=r(42952);const s=(e,t)=>(r,s)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,s,i.input)),a=function(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}(e.httpAuthSchemes),c=(0,n.u)(s),u=[];for(const r of o){const n=a.get(r.schemeId);if(!n){u.push(`HttpAuthScheme \`${r.schemeId}\` was not enabled for this service.`);continue}const i=n.identityProvider(await t.identityProviderConfigProvider(e));if(!i){u.push(`HttpAuthScheme \`${r.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:o={},signingProperties:d={}}=r.propertiesExtractor?.(e,s)||{};r.identityProperties=Object.assign(r.identityProperties||{},o),r.signingProperties=Object.assign(r.signingProperties||{},d),c.selectedHttpAuthScheme={httpAuthOption:r,identity:await i(r.identityProperties),signer:n.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(u.join("\n"));return r(i)};const i={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:r(34546).ko.name},o=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(s(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),i)}});r(8029).Ou.name;var a=r(47624);const c=e=>e=>{throw e},u=(e,t)=>{};const d={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:r(2103).j7.name},l=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async r=>{if(!a.Kd.isInstance(r.request))return e(r);const s=(0,n.u)(t).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:d}=s,l=await e({...r,request:await d.sign(r.request,o,i)}).catch((d.errorHandler||c)(i));return(d.successHandler||u)(l.response,i),l}),d)}});class DefaultIdentityProviderConfig{constructor(e){this.authSchemes=new Map;for(const[t,r]of Object.entries(e))void 0!==r&&this.authSchemes.set(t,r)}getIdentityProvider(e){return this.authSchemes.get(e)}}class NoAuthSigner{async sign(e,t,r){return e}}const g=(p=3e5,e=>h(e)&&e.expiration.getTime()-Date.now()<p);var p;const h=e=>void 0!==e.expiration,f=(e,t,r)=>{if(void 0===e)return;const n="function"!=typeof e?async()=>Promise.resolve(e):e;let s,i,o,a=!1;const c=async e=>{i||(i=n(e));try{s=await i,o=!0,a=!1}finally{i=void 0}return s};return void 0===t?async e=>(o&&!e?.forceRefresh||(s=await c(e)),s):async e=>(o&&!e?.forceRefresh||(s=await c(e)),a?s:r(s)?t(s)?(await c(e),s):s:(a=!0,s))},m=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};var y=r(1802);function w(e,t){return new RequestBuilder(e,t)}class RequestBuilder{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:r,path:n}=await this.context.endpoint();this.path=n;for(const e of this.resolvePathStack)e(this.path);return new a.Kd({protocol:t,hostname:this.hostname||e,port:r,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,r,n){return this.resolvePathStack.push((s=>{this.path=(0,y.un)(s,this.input,e,t,r,n)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}}};