@stacksjs/buddy 0.68.2 → 0.69.2

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.
Files changed (188) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-0ara6h0a.js +2 -0
  3. package/dist/chunk-0pxb6cz2.js +3 -0
  4. package/dist/chunk-1v5v7cn7.js +2 -0
  5. package/dist/chunk-3v3zq8w4.js +2 -0
  6. package/dist/{chunk-jr4naxsv.js → chunk-3yp4xe8e.js} +1 -1
  7. package/dist/{chunk-3wpw5xgd.js → chunk-5d1pmfaj.js} +1 -1
  8. package/dist/chunk-7dhp3rzj.js +61 -0
  9. package/dist/chunk-8y9rns0z.js +2 -0
  10. package/dist/chunk-c0awzy8k.js +10 -0
  11. package/dist/chunk-c6ermrr1.js +3 -0
  12. package/dist/{chunk-8gx9at51.js → chunk-cdnqz7bt.js} +1 -1
  13. package/dist/{chunk-27ksm11g.js → chunk-f0ywgmn1.js} +2 -2
  14. package/dist/chunk-fzqy272g.js +2 -0
  15. package/dist/chunk-hmvbpz4z.js +25 -0
  16. package/dist/chunk-kqn7aa4r.js +5442 -0
  17. package/dist/chunk-n337bav6.js +5 -0
  18. package/dist/chunk-rez6aknn.js +29 -0
  19. package/dist/chunk-rvzykrtp.js +10 -0
  20. package/dist/{chunk-b3wr7cpk.js → chunk-tnqbven5.js} +2 -2
  21. package/dist/{chunk-25nxsybw.js → chunk-vs0pve8j.js} +2 -2
  22. package/dist/{chunk-hgrs6wcy.js → chunk-x4zbf5c8.js} +1 -1
  23. package/dist/{chunk-z1h35hsa.js → chunk-xqcyxfy4.js} +2 -1
  24. package/dist/{chunk-0q0jn0kk.js → chunk-yajm5bx9.js} +1 -1
  25. package/dist/chunk-ybkvyfqx.js +2 -0
  26. package/dist/{chunk-f0ksrase.js → chunk-zmz07e1t.js} +2 -2
  27. package/dist/chunk-zxexe5eh.js +2 -0
  28. package/dist/cli.js +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/ports.d.ts +0 -1
  31. package/dist/queue.d.ts +3 -0
  32. package/dist/schedule.d.ts +3 -0
  33. package/dist/search.d.ts +3 -0
  34. package/package.json +54 -55
  35. package/dist/chunk-06g79v9j.js +0 -2
  36. package/dist/chunk-08bm2xax.js +0 -2
  37. package/dist/chunk-0enrsn65.js +0 -978
  38. package/dist/chunk-0m218zhk.js +0 -2
  39. package/dist/chunk-0qvaepnz.js +0 -2
  40. package/dist/chunk-0yyhz107.js +0 -2
  41. package/dist/chunk-11vhe2za.js +0 -2
  42. package/dist/chunk-13143jmy.js +0 -3
  43. package/dist/chunk-1agj4qty.js +0 -2
  44. package/dist/chunk-1c4yywmn.js +0 -9
  45. package/dist/chunk-1e2f0z80.js +0 -2
  46. package/dist/chunk-1v13dkfw.js +0 -2
  47. package/dist/chunk-20e0mpcw.js +0 -9
  48. package/dist/chunk-2mhj5ght.js +0 -2
  49. package/dist/chunk-2wrs9p57.js +0 -1
  50. package/dist/chunk-2yj4j69j.js +0 -2
  51. package/dist/chunk-2ymn50ck.js +0 -2
  52. package/dist/chunk-3vjfkr7v.js +0 -978
  53. package/dist/chunk-3y0gapf6.js +0 -2
  54. package/dist/chunk-4rb5r88h.js +0 -978
  55. package/dist/chunk-4wb68jfr.js +0 -2
  56. package/dist/chunk-5ewcj9vd.js +0 -2
  57. package/dist/chunk-5fm9mfqs.js +0 -2
  58. package/dist/chunk-5jhkn5by.js +0 -2
  59. package/dist/chunk-5m9xts4v.js +0 -2
  60. package/dist/chunk-63pxna7y.js +0 -978
  61. package/dist/chunk-6sqy7049.js +0 -2
  62. package/dist/chunk-6yazdvb4.js +0 -2
  63. package/dist/chunk-746p83dw.js +0 -2
  64. package/dist/chunk-76g7tr80.js +0 -2
  65. package/dist/chunk-7fz1p8p3.js +0 -10
  66. package/dist/chunk-814adsn3.js +0 -2
  67. package/dist/chunk-831wk0b3.js +0 -2
  68. package/dist/chunk-833tanrb.js +0 -2
  69. package/dist/chunk-8cx90pvv.js +0 -2
  70. package/dist/chunk-8yky4bsd.js +0 -10
  71. package/dist/chunk-91pnyybg.js +0 -9
  72. package/dist/chunk-99syj1p0.js +0 -2
  73. package/dist/chunk-9bxh78vd.js +0 -5
  74. package/dist/chunk-9jaqey2q.js +0 -2
  75. package/dist/chunk-9tyaew40.js +0 -2
  76. package/dist/chunk-9zcyq5gh.js +0 -2
  77. package/dist/chunk-a4g1e1n0.js +0 -2
  78. package/dist/chunk-a6g2jk1y.js +0 -2
  79. package/dist/chunk-aaqd43t5.js +0 -2
  80. package/dist/chunk-adswb3gq.js +0 -2
  81. package/dist/chunk-akkmfscs.js +0 -978
  82. package/dist/chunk-atnw2cq3.js +0 -2
  83. package/dist/chunk-avdharmq.js +0 -2
  84. package/dist/chunk-b13gbfg3.js +0 -2
  85. package/dist/chunk-bngyck4v.js +0 -2
  86. package/dist/chunk-brb5zthb.js +0 -1
  87. package/dist/chunk-bx2vf8g7.js +0 -5
  88. package/dist/chunk-c343n0yt.js +0 -2
  89. package/dist/chunk-c4msw6hf.js +0 -2
  90. package/dist/chunk-cdwpqzrw.js +0 -2
  91. package/dist/chunk-cm7bwdk9.js +0 -2
  92. package/dist/chunk-cs5k02gt.js +0 -1
  93. package/dist/chunk-cv8f2v27.js +0 -2
  94. package/dist/chunk-d2dbhn2h.js +0 -2
  95. package/dist/chunk-d3awsfqm.js +0 -9
  96. package/dist/chunk-d9q17hb8.js +0 -2
  97. package/dist/chunk-dw62d69f.js +0 -2
  98. package/dist/chunk-e8p8v7ca.js +0 -978
  99. package/dist/chunk-ehhrhkwe.js +0 -9
  100. package/dist/chunk-enhf12a1.js +0 -2
  101. package/dist/chunk-f2d9w3nr.js +0 -2
  102. package/dist/chunk-f3y73e4b.js +0 -6
  103. package/dist/chunk-fe3xb8z9.js +0 -2
  104. package/dist/chunk-fg5gh4dn.js +0 -2
  105. package/dist/chunk-fh4rw8kr.js +0 -5
  106. package/dist/chunk-fxsv4p5c.js +0 -8
  107. package/dist/chunk-gezc36zy.js +0 -2
  108. package/dist/chunk-gg80s18j.js +0 -2
  109. package/dist/chunk-gjefq0nq.js +0 -2
  110. package/dist/chunk-h5saw32v.js +0 -2
  111. package/dist/chunk-ha75r57f.js +0 -8
  112. package/dist/chunk-hrsat16n.js +0 -8
  113. package/dist/chunk-hxy5t7tm.js +0 -10
  114. package/dist/chunk-hzfqtj82.js +0 -2
  115. package/dist/chunk-j2n86dsz.js +0 -2
  116. package/dist/chunk-jbpgmjzs.js +0 -2
  117. package/dist/chunk-jg68fsnk.js +0 -10
  118. package/dist/chunk-jhvjhf1j.js +0 -2
  119. package/dist/chunk-jms0s1vh.js +0 -6
  120. package/dist/chunk-js6y6fm1.js +0 -2
  121. package/dist/chunk-jtax0mpm.js +0 -2
  122. package/dist/chunk-k59kbbvm.js +0 -2
  123. package/dist/chunk-kanz993c.js +0 -2
  124. package/dist/chunk-kg9abatp.js +0 -2
  125. package/dist/chunk-kvghsjg7.js +0 -5
  126. package/dist/chunk-ky8p46ae.js +0 -5
  127. package/dist/chunk-kzm498bh.js +0 -2
  128. package/dist/chunk-m4gwjnfh.js +0 -6
  129. package/dist/chunk-m6regb6b.js +0 -2
  130. package/dist/chunk-mevackhg.js +0 -9
  131. package/dist/chunk-msv6dcc2.js +0 -2
  132. package/dist/chunk-mxdajhb4.js +0 -10
  133. package/dist/chunk-mxzjn2gs.js +0 -978
  134. package/dist/chunk-n1bqkqk7.js +0 -10
  135. package/dist/chunk-n2c2dcxa.js +0 -2
  136. package/dist/chunk-njtyervf.js +0 -1
  137. package/dist/chunk-nx1598yr.js +0 -2
  138. package/dist/chunk-p18kqenr.js +0 -1
  139. package/dist/chunk-p23aswbf.js +0 -2
  140. package/dist/chunk-p55ntqj0.js +0 -2
  141. package/dist/chunk-p5va3trj.js +0 -2
  142. package/dist/chunk-p88bsqtc.js +0 -10
  143. package/dist/chunk-p9z7f8c8.js +0 -2
  144. package/dist/chunk-ppkzf21q.js +0 -8
  145. package/dist/chunk-prqq5zw2.js +0 -2
  146. package/dist/chunk-pv6hp18q.js +0 -10
  147. package/dist/chunk-q9ycfthp.js +0 -2
  148. package/dist/chunk-qhcx6dmf.js +0 -2
  149. package/dist/chunk-qma4ysd8.js +0 -9
  150. package/dist/chunk-qpdxnnf8.js +0 -10
  151. package/dist/chunk-qq851psj.js +0 -6
  152. package/dist/chunk-qqp394c2.js +0 -2
  153. package/dist/chunk-qzxab3cn.js +0 -2
  154. package/dist/chunk-r6rhrt1p.js +0 -2
  155. package/dist/chunk-ra5sfgg4.js +0 -2
  156. package/dist/chunk-rfd43z7p.js +0 -5
  157. package/dist/chunk-rtfeef82.js +0 -2
  158. package/dist/chunk-ryjbc6dz.js +0 -5
  159. package/dist/chunk-s2n3hw0a.js +0 -2
  160. package/dist/chunk-scc3z70n.js +0 -2
  161. package/dist/chunk-sk3x55wm.js +0 -2
  162. package/dist/chunk-sm7vvfqf.js +0 -2
  163. package/dist/chunk-sqbdav33.js +0 -2
  164. package/dist/chunk-sy4d4hnx.js +0 -2
  165. package/dist/chunk-t0b356bb.js +0 -978
  166. package/dist/chunk-t9wdnzz4.js +0 -6
  167. package/dist/chunk-v25g7h01.js +0 -2
  168. package/dist/chunk-v7zy7xda.js +0 -1
  169. package/dist/chunk-v9kknk69.js +0 -2
  170. package/dist/chunk-vg4vfkzk.js +0 -6
  171. package/dist/chunk-vgcre8jy.js +0 -2
  172. package/dist/chunk-vqyngnj0.js +0 -9
  173. package/dist/chunk-w17d2rbd.js +0 -6
  174. package/dist/chunk-x22v9kvb.js +0 -2
  175. package/dist/chunk-xacjs4ar.js +0 -6
  176. package/dist/chunk-xmdbxa8w.js +0 -1
  177. package/dist/chunk-xy6hjazn.js +0 -978
  178. package/dist/chunk-y0m35t3m.js +0 -2
  179. package/dist/chunk-y1tre8v8.js +0 -8
  180. package/dist/chunk-y50mc7dt.js +0 -2
  181. package/dist/chunk-y5vqt054.js +0 -5
  182. package/dist/chunk-y93ke5m6.js +0 -2
  183. package/dist/chunk-yktee4wv.js +0 -1
  184. package/dist/chunk-yvmyw2r2.js +0 -2
  185. package/dist/chunk-z6xydw90.js +0 -2
  186. package/dist/chunk-zak32nab.js +0 -2
  187. package/dist/chunk-zanq4wm3.js +0 -9
  188. package/dist/stacks +0 -0
@@ -1,10 +0,0 @@
1
- import{ua as Kf,va as fR}from"./chunk-sk3x55wm.js";import{Aa as wf,Ba as Y1,Ca as ZR,Da as ff,Ea as X1,Fa as Z1,Ha as bR,Ia as Fw,db as E$,ya as k,za as YR}from"./chunk-ryjbc6dz.js";import{nb as aE}from"./chunk-8gx9at51.js";import{rb as Pf}from"./chunk-6yazdvb4.js";import{vb as XA}from"./chunk-ha75r57f.js";import{wb as ZA}from"./chunk-gg80s18j.js";import{xb as q,zb as X}from"./chunk-d2dbhn2h.js";var YE=X((VW,PR)=>{var{defineProperty:Hf,getOwnPropertyDescriptor:q$,getOwnPropertyNames:V$}=Object,C$=Object.prototype.hasOwnProperty,OE=(f,E)=>Hf(f,"name",{value:E,configurable:!0}),H$=(f,E)=>{for(var R in E)Hf(f,R,{get:E[R],enumerable:!0})},P$=(f,E,R,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let A of V$(E))if(!C$.call(f,A)&&A!==R)Hf(f,A,{get:()=>E[A],enumerable:!(U=q$(E,A))||U.enumerable})}return f},S$=(f)=>P$(Hf({},"__esModule",{value:!0}),f),KR={};H$(KR,{deserializerMiddleware:()=>zR,deserializerMiddlewareOption:()=>VR,getSerdePlugin:()=>HR,serializerMiddleware:()=>qR,serializerMiddlewareOption:()=>CR});PR.exports=S$(KR);var zR=OE((f,E)=>(R)=>async(U)=>{let{response:A}=await R(U);try{let T=await E(A,f);return{response:A,output:T}}catch(T){if(Object.defineProperty(T,"$response",{value:A}),!("$metadata"in T)){if(T.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof T.$responseBodyText!=="undefined"){if(T.$response)T.$response.body=T.$responseBodyText}}throw T}},"deserializerMiddleware"),qR=OE((f,E)=>(R,U)=>async(A)=>{var T;let $=((T=U.endpointV2)==null?void 0:T.url)&&f.urlParser?async()=>f.urlParser(U.endpointV2.url):f.endpoint;if(!$)throw new Error("No valid endpoint provider available.");let w=await E(A.input,{...f,endpoint:$});return R({...A,request:w})},"serializerMiddleware"),VR={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},CR={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function HR(f,E,R){return{applyToStack:(U)=>{U.add(zR(f,R),VR),U.add(qR(f,E),CR)}}}OE(HR,"getSerdePlugin")});var d=X((CW,kR)=>{var{defineProperty:Sf,getOwnPropertyDescriptor:N$,getOwnPropertyNames:_$}=Object,k$=Object.prototype.hasOwnProperty,NR=(f,E)=>Sf(f,"name",{value:E,configurable:!0}),b$=(f,E)=>{for(var R in E)Sf(f,R,{get:E[R],enumerable:!0})},h$=(f,E,R,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let A of _$(E))if(!k$.call(f,A)&&A!==R)Sf(f,A,{get:()=>E[A],enumerable:!(U=N$(E,A))||U.enumerable})}return f},j$=(f)=>h$(Sf({},"__esModule",{value:!0}),f),_R={};b$(_R,{getSmithyContext:()=>c$,normalizeProvider:()=>D$});kR.exports=j$(_R);var SR=Pf(),c$=NR((f)=>f[SR.SMITHY_CONTEXT_KEY]||(f[SR.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),D$=NR((f)=>{if(typeof f==="function")return f;let E=Promise.resolve(f);return()=>E},"normalizeProvider")});var If=X((HW,lR)=>{var{defineProperty:_f,getOwnPropertyDescriptor:y$,getOwnPropertyNames:u$}=Object,p$=Object.prototype.hasOwnProperty,K=(f,E)=>_f(f,"name",{value:E,configurable:!0}),x$=(f,E)=>{for(var R in E)_f(f,R,{get:E[R],enumerable:!0})},d$=(f,E,R,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let A of u$(E))if(!p$.call(f,A)&&A!==R)_f(f,A,{get:()=>E[A],enumerable:!(U=y$(E,A))||U.enumerable})}return f},v$=(f)=>d$(_f({},"__esModule",{value:!0}),f),hR={};x$(hR,{DefaultIdentityProviderConfig:()=>f1,EXPIRATION_MS:()=>mR,HttpApiKeyAuthSigner:()=>E1,HttpBearerAuthSigner:()=>R1,NoAuthSigner:()=>A1,createIsIdentityExpiredFunction:()=>rR,createPaginator:()=>xR,doesIdentityRequireRefresh:()=>oR,getHttpAuthSchemeEndpointRuleSetPlugin:()=>s$,getHttpAuthSchemePlugin:()=>r$,getHttpSigningPlugin:()=>l$,getSmithyContext:()=>g$,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>DR,httpAuthSchemeMiddleware:()=>XE,httpAuthSchemeMiddlewareOptions:()=>yR,httpSigningMiddleware:()=>uR,httpSigningMiddlewareOptions:()=>pR,isIdentityExpired:()=>U1,memoizeIdentityProvider:()=>T1,normalizeProvider:()=>i$,requestBuilder:()=>a$.requestBuilder,setFeature:()=>dR});lR.exports=v$(hR);var Nf=Pf(),g$=K((f)=>f[Nf.SMITHY_CONTEXT_KEY]||(f[Nf.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),jR=d();function cR(f){let E=new Map;for(let R of f)E.set(R.schemeId,R);return E}K(cR,"convertHttpAuthSchemesToMap");var XE=K((f,E)=>(R,U)=>async(A)=>{var T;let $=f.httpAuthSchemeProvider(await E.httpAuthSchemeParametersProvider(f,U,A.input)),w=cR(f.httpAuthSchemes),I=jR.getSmithyContext(U),L=[];for(let G of $){let M=w.get(G.schemeId);if(!M){L.push(`HttpAuthScheme \`${G.schemeId}\` was not enabled for this service.`);continue}let F=M.identityProvider(await E.identityProviderConfigProvider(f));if(!F){L.push(`HttpAuthScheme \`${G.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:W={},signingProperties:Y={}}=((T=G.propertiesExtractor)==null?void 0:T.call(G,f,U))||{};G.identityProperties=Object.assign(G.identityProperties||{},W),G.signingProperties=Object.assign(G.signingProperties||{},Y),I.selectedHttpAuthScheme={httpAuthOption:G,identity:await F(G.identityProperties),signer:M.signer};break}if(!I.selectedHttpAuthScheme)throw new Error(L.join("\n"));return R(A)},"httpAuthSchemeMiddleware"),DR={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},s$=K((f,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:R})=>({applyToStack:(U)=>{U.addRelativeTo(XE(f,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:R}),DR)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),n$=YE(),yR={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:n$.serializerMiddlewareOption.name},r$=K((f,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:R})=>({applyToStack:(U)=>{U.addRelativeTo(XE(f,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:R}),yR)}}),"getHttpAuthSchemePlugin"),ZE=wf(),m$=K((f)=>(E)=>{throw E},"defaultErrorHandler"),o$=K((f,E)=>{},"defaultSuccessHandler"),uR=K((f)=>(E,R)=>async(U)=>{if(!ZE.HttpRequest.isInstance(U.request))return E(U);let T=jR.getSmithyContext(R).selectedHttpAuthScheme;if(!T)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:$={}},identity:w,signer:I}=T,L=await E({...U,request:await I.sign(U.request,w,$)}).catch((I.errorHandler||m$)($));return(I.successHandler||o$)(L.response,$),L},"httpSigningMiddleware"),pR={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},l$=K((f)=>({applyToStack:(E)=>{E.addRelativeTo(uR(f),pR)}}),"getHttpSigningPlugin"),i$=K((f)=>{if(typeof f==="function")return f;let E=Promise.resolve(f);return()=>E},"normalizeProvider"),t$=K(async(f,E,R,...U)=>{return await E.send(new f(R),...U)},"makePagedClientRequest");function xR(f,E,R,U,A){return K(async function*T($,w,...I){let L=$.startingToken||void 0,G=!0,M;while(G){if(w[R]=L,A)w[A]=w[A]??$.pageSize;if($.client instanceof f)M=await t$(E,$.client,w,...I);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield M;let F=L;L=e$(M,U),G=!!(L&&(!$.stopOnSameToken||L!==F))}return},"paginateOperation")}K(xR,"createPaginator");var e$=K((f,E)=>{let R=f,U=E.split(".");for(let A of U){if(!R||typeof R!=="object")return;R=R[A]}return R},"get"),a$=bR();function dR(f,E,R){if(!f.__smithy_context)f.__smithy_context={features:{}};else if(!f.__smithy_context.features)f.__smithy_context.features={};f.__smithy_context.features[E]=R}K(dR,"setFeature");var vR=class f{constructor(E){this.authSchemes=new Map;for(let[R,U]of Object.entries(E))if(U!==void 0)this.authSchemes.set(R,U)}getIdentityProvider(E){return this.authSchemes.get(E)}};K(vR,"DefaultIdentityProviderConfig");var f1=vR,gR=class f{async sign(E,R,U){if(!U)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!U.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!U.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!R.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let A=ZE.HttpRequest.clone(E);if(U.in===Nf.HttpApiKeyAuthLocation.QUERY)A.query[U.name]=R.apiKey;else if(U.in===Nf.HttpApiKeyAuthLocation.HEADER)A.headers[U.name]=U.scheme?`${U.scheme} ${R.apiKey}`:R.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+U.in+"`");return A}};K(gR,"HttpApiKeyAuthSigner");var E1=gR,sR=class f{async sign(E,R,U){let A=ZE.HttpRequest.clone(E);if(!R.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return A.headers.Authorization=`Bearer ${R.token}`,A}};K(sR,"HttpBearerAuthSigner");var R1=sR,nR=class f{async sign(E,R,U){return E}};K(nR,"NoAuthSigner");var A1=nR,rR=K((f)=>(E)=>oR(E)&&E.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),mR=300000,U1=rR(mR),oR=K((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),T1=K((f,E,R)=>{if(f===void 0)return;let U=typeof f!=="function"?async()=>Promise.resolve(f):f,A,T,$,w=!1,I=K(async(L)=>{if(!T)T=U(L);try{A=await T,$=!0,w=!1}finally{T=void 0}return A},"coalesceProvider");if(E===void 0)return async(L)=>{if(!$||(L==null?void 0:L.forceRefresh))A=await I(L);return A};return async(L)=>{if(!$||(L==null?void 0:L.forceRefresh))A=await I(L);if(w)return A;if(!R(A))return w=!0,A;if(E(A))return await I(L),A;return A}},"memoizeIdentityProvider")});var n0=X((UY,pf)=>{var Z0,J0,Q0,B0,K0,z0,q0,V0,C0,H0,P0,S0,N0,yf,zE,_0,k0,b0,e,h0,j0,c0,D0,y0,u0,p0,x0,d0,uf,v0,g0,s0;(function(f){var E=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(U){f(R(E,R(U)))});else if(typeof pf==="object"&&typeof UY==="object")f(R(E,R(UY)));else f(R(E));function R(U,A){if(U!==E)if(typeof Object.create==="function")Object.defineProperty(U,"__esModule",{value:!0});else U.__esModule=!0;return function(T,$){return U[T]=A?A(T,$):$}}})(function(f){var E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,T){A.__proto__=T}||function(A,T){for(var $ in T)if(Object.prototype.hasOwnProperty.call(T,$))A[$]=T[$]};Z0=function(A,T){if(typeof T!=="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");E(A,T);function $(){this.constructor=A}A.prototype=T===null?Object.create(T):($.prototype=T.prototype,new $)},J0=Object.assign||function(A){for(var T,$=1,w=arguments.length;$<w;$++){T=arguments[$];for(var I in T)if(Object.prototype.hasOwnProperty.call(T,I))A[I]=T[I]}return A},Q0=function(A,T){var $={};for(var w in A)if(Object.prototype.hasOwnProperty.call(A,w)&&T.indexOf(w)<0)$[w]=A[w];if(A!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var I=0,w=Object.getOwnPropertySymbols(A);I<w.length;I++)if(T.indexOf(w[I])<0&&Object.prototype.propertyIsEnumerable.call(A,w[I]))$[w[I]]=A[w[I]]}return $},B0=function(A,T,$,w){var I=arguments.length,L=I<3?T:w===null?w=Object.getOwnPropertyDescriptor(T,$):w,G;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")L=Reflect.decorate(A,T,$,w);else for(var M=A.length-1;M>=0;M--)if(G=A[M])L=(I<3?G(L):I>3?G(T,$,L):G(T,$))||L;return I>3&&L&&Object.defineProperty(T,$,L),L},K0=function(A,T){return function($,w){T($,w,A)}},z0=function(A,T,$,w,I,L){function G(r){if(r!==void 0&&typeof r!=="function")throw new TypeError("Function expected");return r}var M=w.kind,F=M==="getter"?"get":M==="setter"?"set":"value",W=!T&&A?w.static?A:A.prototype:null,Y=T||(W?Object.getOwnPropertyDescriptor(W,w.name):{}),Z,J=!1;for(var Q=$.length-1;Q>=0;Q--){var H={};for(var S in w)H[S]=S==="access"?{}:w[S];for(var S in w.access)H.access[S]=w.access[S];H.addInitializer=function(r){if(J)throw new TypeError("Cannot add initializers after decoration has completed");L.push(G(r||null))};var u=$[Q](M==="accessor"?{get:Y.get,set:Y.set}:Y[F],H);if(M==="accessor"){if(u===void 0)continue;if(u===null||typeof u!=="object")throw new TypeError("Object expected");if(Z=G(u.get))Y.get=Z;if(Z=G(u.set))Y.set=Z;if(Z=G(u.init))I.unshift(Z)}else if(Z=G(u))if(M==="field")I.unshift(Z);else Y[F]=Z}if(W)Object.defineProperty(W,w.name,Y);J=!0},q0=function(A,T,$){var w=arguments.length>2;for(var I=0;I<T.length;I++)$=w?T[I].call(A,$):T[I].call(A);return w?$:void 0},V0=function(A){return typeof A==="symbol"?A:"".concat(A)},C0=function(A,T,$){if(typeof T==="symbol")T=T.description?"[".concat(T.description,"]"):"";return Object.defineProperty(A,"name",{configurable:!0,value:$?"".concat($," ",T):T})},H0=function(A,T){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(A,T)},P0=function(A,T,$,w){function I(L){return L instanceof $?L:new $(function(G){G(L)})}return new($||($=Promise))(function(L,G){function M(Y){try{W(w.next(Y))}catch(Z){G(Z)}}function F(Y){try{W(w.throw(Y))}catch(Z){G(Z)}}function W(Y){Y.done?L(Y.value):I(Y.value).then(M,F)}W((w=w.apply(A,T||[])).next())})},S0=function(A,T){var $={label:0,sent:function(){if(L[0]&1)throw L[1];return L[1]},trys:[],ops:[]},w,I,L,G=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return G.next=M(0),G.throw=M(1),G.return=M(2),typeof Symbol==="function"&&(G[Symbol.iterator]=function(){return this}),G;function M(W){return function(Y){return F([W,Y])}}function F(W){if(w)throw new TypeError("Generator is already executing.");while(G&&(G=0,W[0]&&($=0)),$)try{if(w=1,I&&(L=W[0]&2?I.return:W[0]?I.throw||((L=I.return)&&L.call(I),0):I.next)&&!(L=L.call(I,W[1])).done)return L;if(I=0,L)W=[W[0]&2,L.value];switch(W[0]){case 0:case 1:L=W;break;case 4:return $.label++,{value:W[1],done:!1};case 5:$.label++,I=W[1],W=[0];continue;case 7:W=$.ops.pop(),$.trys.pop();continue;default:if((L=$.trys,!(L=L.length>0&&L[L.length-1]))&&(W[0]===6||W[0]===2)){$=0;continue}if(W[0]===3&&(!L||W[1]>L[0]&&W[1]<L[3])){$.label=W[1];break}if(W[0]===6&&$.label<L[1]){$.label=L[1],L=W;break}if(L&&$.label<L[2]){$.label=L[2],$.ops.push(W);break}if(L[2])$.ops.pop();$.trys.pop();continue}W=T.call(A,$)}catch(Y){W=[6,Y],I=0}finally{w=L=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},N0=function(A,T){for(var $ in A)if($!=="default"&&!Object.prototype.hasOwnProperty.call(T,$))uf(T,A,$)},uf=Object.create?function(A,T,$,w){if(w===void 0)w=$;var I=Object.getOwnPropertyDescriptor(T,$);if(!I||("get"in I?!T.__esModule:I.writable||I.configurable))I={enumerable:!0,get:function(){return T[$]}};Object.defineProperty(A,w,I)}:function(A,T,$,w){if(w===void 0)w=$;A[w]=T[$]},yf=function(A){var T=typeof Symbol==="function"&&Symbol.iterator,$=T&&A[T],w=0;if($)return $.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&w>=A.length)A=void 0;return{value:A&&A[w++],done:!A}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")},zE=function(A,T){var $=typeof Symbol==="function"&&A[Symbol.iterator];if(!$)return A;var w=$.call(A),I,L=[],G;try{while((T===void 0||T-- >0)&&!(I=w.next()).done)L.push(I.value)}catch(M){G={error:M}}finally{try{if(I&&!I.done&&($=w.return))$.call(w)}finally{if(G)throw G.error}}return L},_0=function(){for(var A=[],T=0;T<arguments.length;T++)A=A.concat(zE(arguments[T]));return A},k0=function(){for(var A=0,T=0,$=arguments.length;T<$;T++)A+=arguments[T].length;for(var w=Array(A),I=0,T=0;T<$;T++)for(var L=arguments[T],G=0,M=L.length;G<M;G++,I++)w[I]=L[G];return w},b0=function(A,T,$){if($||arguments.length===2){for(var w=0,I=T.length,L;w<I;w++)if(L||!(w in T)){if(!L)L=Array.prototype.slice.call(T,0,w);L[w]=T[w]}}return A.concat(L||Array.prototype.slice.call(T))},e=function(A){return this instanceof e?(this.v=A,this):new e(A)},h0=function(A,T,$){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var w=$.apply(A,T||[]),I,L=[];return I=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),M("next"),M("throw"),M("return",G),I[Symbol.asyncIterator]=function(){return this},I;function G(Q){return function(H){return Promise.resolve(H).then(Q,Z)}}function M(Q,H){if(w[Q]){if(I[Q]=function(S){return new Promise(function(u,r){L.push([Q,S,u,r])>1||F(Q,S)})},H)I[Q]=H(I[Q])}}function F(Q,H){try{W(w[Q](H))}catch(S){J(L[0][3],S)}}function W(Q){Q.value instanceof e?Promise.resolve(Q.value.v).then(Y,Z):J(L[0][2],Q)}function Y(Q){F("next",Q)}function Z(Q){F("throw",Q)}function J(Q,H){if(Q(H),L.shift(),L.length)F(L[0][0],L[0][1])}},j0=function(A){var T,$;return T={},w("next"),w("throw",function(I){throw I}),w("return"),T[Symbol.iterator]=function(){return this},T;function w(I,L){T[I]=A[I]?function(G){return($=!$)?{value:e(A[I](G)),done:!1}:L?L(G):G}:L}},c0=function(A){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=A[Symbol.asyncIterator],$;return T?T.call(A):(A=typeof yf==="function"?yf(A):A[Symbol.iterator](),$={},w("next"),w("throw"),w("return"),$[Symbol.asyncIterator]=function(){return this},$);function w(L){$[L]=A[L]&&function(G){return new Promise(function(M,F){G=A[L](G),I(M,F,G.done,G.value)})}}function I(L,G,M,F){Promise.resolve(F).then(function(W){L({value:W,done:M})},G)}},D0=function(A,T){if(Object.defineProperty)Object.defineProperty(A,"raw",{value:T});else A.raw=T;return A};var R=Object.create?function(A,T){Object.defineProperty(A,"default",{enumerable:!0,value:T})}:function(A,T){A.default=T};y0=function(A){if(A&&A.__esModule)return A;var T={};if(A!=null){for(var $ in A)if($!=="default"&&Object.prototype.hasOwnProperty.call(A,$))uf(T,A,$)}return R(T,A),T},u0=function(A){return A&&A.__esModule?A:{default:A}},p0=function(A,T,$,w){if($==="a"&&!w)throw new TypeError("Private accessor was defined without a getter");if(typeof T==="function"?A!==T||!w:!T.has(A))throw new TypeError("Cannot read private member from an object whose class did not declare it");return $==="m"?w:$==="a"?w.call(A):w?w.value:T.get(A)},x0=function(A,T,$,w,I){if(w==="m")throw new TypeError("Private method is not writable");if(w==="a"&&!I)throw new TypeError("Private accessor was defined without a setter");if(typeof T==="function"?A!==T||!I:!T.has(A))throw new TypeError("Cannot write private member to an object whose class did not declare it");return w==="a"?I.call(A,$):I?I.value=$:T.set(A,$),$},d0=function(A,T){if(T===null||typeof T!=="object"&&typeof T!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof A==="function"?T===A:A.has(T)},v0=function(A,T,$){if(T!==null&&T!==void 0){if(typeof T!=="object"&&typeof T!=="function")throw new TypeError("Object expected.");var w,I;if($){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");w=T[Symbol.asyncDispose]}if(w===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(w=T[Symbol.dispose],$)I=w}if(typeof w!=="function")throw new TypeError("Object not disposable.");if(I)w=function(){try{I.call(this)}catch(L){return Promise.reject(L)}};A.stack.push({value:T,dispose:w,async:$})}else if($)A.stack.push({async:!0});return T};var U=typeof SuppressedError==="function"?SuppressedError:function(A,T,$){var w=new Error($);return w.name="SuppressedError",w.error=A,w.suppressed=T,w};g0=function(A){function T(L){A.error=A.hasError?new U(L,A.error,"An error was suppressed during disposal."):L,A.hasError=!0}var $,w=0;function I(){while($=A.stack.pop())try{if(!$.async&&w===1)return w=0,A.stack.push($),Promise.resolve().then(I);if($.dispose){var L=$.dispose.call($.value);if($.async)return w|=2,Promise.resolve(L).then(I,function(G){return T(G),I()})}else w|=1}catch(G){T(G)}if(w===1)return A.hasError?Promise.reject(A.error):Promise.resolve();if(A.hasError)throw A.error}return I()},s0=function(A,T){if(typeof A==="string"&&/^\.\.?\//.test(A))return A.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function($,w,I,L,G){return w?T?".jsx":".js":I&&(!L||!G)?$:I+L+"."+G.toLowerCase()+"js"});return A},f("__extends",Z0),f("__assign",J0),f("__rest",Q0),f("__decorate",B0),f("__param",K0),f("__esDecorate",z0),f("__runInitializers",q0),f("__propKey",V0),f("__setFunctionName",C0),f("__metadata",H0),f("__awaiter",P0),f("__generator",S0),f("__exportStar",N0),f("__createBinding",uf),f("__values",yf),f("__read",zE),f("__spread",_0),f("__spreadArrays",k0),f("__spreadArray",b0),f("__await",e),f("__asyncGenerator",h0),f("__asyncDelegator",j0),f("__asyncValues",c0),f("__makeTemplateObject",D0),f("__importStar",y0),f("__importDefault",u0),f("__classPrivateFieldGet",p0),f("__classPrivateFieldSet",x0),f("__classPrivateFieldIn",d0),f("__addDisposableResource",v0),f("__disposeResources",g0),f("__rewriteRelativeImportExtension",s0)})});var MA=X((TY,GA)=>{var{defineProperty:nf,getOwnPropertyDescriptor:J1,getOwnPropertyNames:Q1}=Object,B1=Object.prototype.hasOwnProperty,V=(f,E)=>nf(f,"name",{value:E,configurable:!0}),K1=(f,E)=>{for(var R in E)nf(f,R,{get:E[R],enumerable:!0})},z1=(f,E,R,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let A of Q1(E))if(!B1.call(f,A)&&A!==R)nf(f,A,{get:()=>E[A],enumerable:!(U=J1(E,A))||U.enumerable})}return f},q1=(f)=>z1(nf({},"__esModule",{value:!0}),f),i0={};K1(i0,{SignatureV4:()=>l1,clearCredentialCache:()=>x1,createScope:()=>vf,getCanonicalHeaders:()=>HE,getCanonicalQuery:()=>UA,getPayloadHash:()=>sf,getSigningKey:()=>AA,moveHeadersToQuery:()=>IA,prepareRequest:()=>SE});GA.exports=q1(i0);var r0=d(),qE=ff(),V1="X-Amz-Algorithm",C1="X-Amz-Credential",t0="X-Amz-Date",H1="X-Amz-SignedHeaders",P1="X-Amz-Expires",e0="X-Amz-Signature",a0="X-Amz-Security-Token",fA="authorization",EA=t0.toLowerCase(),S1="date",N1=[fA,EA,S1],_1=e0.toLowerCase(),CE="x-amz-content-sha256",k1=a0.toLowerCase(),b1={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},h1=/^proxy-/,j1=/^sec-/,VE="AWS4-HMAC-SHA256",c1="AWS4-HMAC-SHA256-PAYLOAD",D1="UNSIGNED-PAYLOAD",y1=50,RA="aws4_request",u1=604800,g=Z1(),p1=ff(),a={},df=[],vf=V((f,E,R)=>`${f}/${E}/${R}/${RA}`,"createScope"),AA=V(async(f,E,R,U,A)=>{let T=await m0(f,E.secretAccessKey,E.accessKeyId),$=`${R}:${U}:${A}:${g.toHex(T)}:${E.sessionToken}`;if($ in a)return a[$];df.push($);while(df.length>y1)delete a[df.shift()];let w=`AWS4${E.secretAccessKey}`;for(let I of[R,U,A,RA])w=await m0(f,w,I);return a[$]=w},"getSigningKey"),x1=V(()=>{df.length=0,Object.keys(a).forEach((f)=>{delete a[f]})},"clearCredentialCache"),m0=V((f,E,R)=>{let U=new f(E);return U.update(p1.toUint8Array(R)),U.digest()},"hmac"),HE=V(({headers:f},E,R)=>{let U={};for(let A of Object.keys(f).sort()){if(f[A]==null)continue;let T=A.toLowerCase();if(T in b1||(E==null?void 0:E.has(T))||h1.test(T)||j1.test(T)){if(!R||R&&!R.has(T))continue}U[T]=f[A].trim().replace(/\s+/g," ")}return U},"getCanonicalHeaders"),gf=X1(),UA=V(({query:f={}})=>{let E=[],R={};for(let U of Object.keys(f)){if(U.toLowerCase()===_1)continue;let A=gf.escapeUri(U);E.push(A);let T=f[U];if(typeof T==="string")R[A]=`${A}=${gf.escapeUri(T)}`;else if(Array.isArray(T))R[A]=T.slice(0).reduce(($,w)=>$.concat([`${A}=${gf.escapeUri(w)}`]),[]).sort().join("&")}return E.sort().map((U)=>R[U]).filter((U)=>U).join("&")},"getCanonicalQuery"),d1=Y1(),v1=ff(),sf=V(async({headers:f,body:E},R)=>{for(let U of Object.keys(f))if(U.toLowerCase()===CE)return f[U];if(E==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof E==="string"||ArrayBuffer.isView(E)||d1.isArrayBuffer(E)){let U=new R;return U.update(v1.toUint8Array(E)),g.toHex(await U.digest())}return D1},"getPayloadHash"),o0=ff(),TA=class f{format(E){let R=[];for(let T of Object.keys(E)){let $=o0.fromUtf8(T);R.push(Uint8Array.from([$.byteLength]),$,this.formatHeaderValue(E[T]))}let U=new Uint8Array(R.reduce((T,$)=>T+$.byteLength,0)),A=0;for(let T of R)U.set(T,A),A+=T.byteLength;return U}formatHeaderValue(E){switch(E.type){case"boolean":return Uint8Array.from([E.value?0:1]);case"byte":return Uint8Array.from([2,E.value]);case"short":let R=new DataView(new ArrayBuffer(3));return R.setUint8(0,3),R.setInt16(1,E.value,!1),new Uint8Array(R.buffer);case"integer":let U=new DataView(new ArrayBuffer(5));return U.setUint8(0,4),U.setInt32(1,E.value,!1),new Uint8Array(U.buffer);case"long":let A=new Uint8Array(9);return A[0]=5,A.set(E.value.bytes,1),A;case"binary":let T=new DataView(new ArrayBuffer(3+E.value.byteLength));T.setUint8(0,6),T.setUint16(1,E.value.byteLength,!1);let $=new Uint8Array(T.buffer);return $.set(E.value,3),$;case"string":let w=o0.fromUtf8(E.value),I=new DataView(new ArrayBuffer(3+w.byteLength));I.setUint8(0,7),I.setUint16(1,w.byteLength,!1);let L=new Uint8Array(I.buffer);return L.set(w,3),L;case"timestamp":let G=new Uint8Array(9);return G[0]=8,G.set(n1.fromNumber(E.value.valueOf()).bytes,1),G;case"uuid":if(!s1.test(E.value))throw new Error(`Invalid UUID received: ${E.value}`);let M=new Uint8Array(17);return M[0]=9,M.set(g.fromHex(E.value.replace(/\-/g,"")),1),M}}};V(TA,"HeaderFormatter");var g1=TA,s1=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,$A=class f{constructor(E){if(this.bytes=E,E.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(E){if(E>9223372036854776000||E<-9223372036854776000)throw new Error(`${E} is too large (or, if negative, too small) to represent as an Int64`);let R=new Uint8Array(8);for(let U=7,A=Math.abs(Math.round(E));U>-1&&A>0;U--,A/=256)R[U]=A;if(E<0)PE(R);return new f(R)}valueOf(){let E=this.bytes.slice(0),R=E[0]&128;if(R)PE(E);return parseInt(g.toHex(E),16)*(R?-1:1)}toString(){return String(this.valueOf())}};V($A,"Int64");var n1=$A;function PE(f){for(let E=0;E<8;E++)f[E]^=255;for(let E=7;E>-1;E--)if(f[E]++,f[E]!==0)break}V(PE,"negate");var r1=V((f,E)=>{f=f.toLowerCase();for(let R of Object.keys(E))if(f===R.toLowerCase())return!0;return!1},"hasHeader"),wA=wf(),IA=V((f,E={})=>{var R,U;let{headers:A,query:T={}}=wA.HttpRequest.clone(f);for(let $ of Object.keys(A)){let w=$.toLowerCase();if(w.slice(0,6)==="x-amz-"&&!((R=E.unhoistableHeaders)==null?void 0:R.has(w))||((U=E.hoistableHeaders)==null?void 0:U.has(w)))T[$]=A[$],delete A[$]}return{...f,headers:A,query:T}},"moveHeadersToQuery"),SE=V((f)=>{f=wA.HttpRequest.clone(f);for(let E of Object.keys(f.headers))if(N1.indexOf(E.toLowerCase())>-1)delete f.headers[E];return f},"prepareRequest"),m1=V((f)=>o1(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),o1=V((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),LA=class f{constructor({applyChecksum:E,credentials:R,region:U,service:A,sha256:T,uriEscapePath:$=!0}){this.headerFormatter=new g1,this.service=A,this.sha256=T,this.uriEscapePath=$,this.applyChecksum=typeof E==="boolean"?E:!0,this.regionProvider=r0.normalizeProvider(U),this.credentialProvider=r0.normalizeProvider(R)}async presign(E,R={}){let{signingDate:U=new Date,expiresIn:A=3600,unsignableHeaders:T,unhoistableHeaders:$,signableHeaders:w,hoistableHeaders:I,signingRegion:L,signingService:G}=R,M=await this.credentialProvider();this.validateResolvedCredentials(M);let F=L??await this.regionProvider(),{longDate:W,shortDate:Y}=xf(U);if(A>u1)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let Z=vf(Y,F,G??this.service),J=IA(SE(E),{unhoistableHeaders:$,hoistableHeaders:I});if(M.sessionToken)J.query[a0]=M.sessionToken;J.query[V1]=VE,J.query[C1]=`${M.accessKeyId}/${Z}`,J.query[t0]=W,J.query[P1]=A.toString(10);let Q=HE(J,T,w);return J.query[H1]=l0(Q),J.query[e0]=await this.getSignature(W,Z,this.getSigningKey(M,F,Y,G),this.createCanonicalRequest(J,Q,await sf(E,this.sha256))),J}async sign(E,R){if(typeof E==="string")return this.signString(E,R);else if(E.headers&&E.payload)return this.signEvent(E,R);else if(E.message)return this.signMessage(E,R);else return this.signRequest(E,R)}async signEvent({headers:E,payload:R},{signingDate:U=new Date,priorSignature:A,signingRegion:T,signingService:$}){let w=T??await this.regionProvider(),{shortDate:I,longDate:L}=xf(U),G=vf(I,w,$??this.service),M=await sf({headers:{},body:R},this.sha256),F=new this.sha256;F.update(E);let W=g.toHex(await F.digest()),Y=[c1,L,G,A,W,M].join("\n");return this.signString(Y,{signingDate:U,signingRegion:w,signingService:$})}async signMessage(E,{signingDate:R=new Date,signingRegion:U,signingService:A}){return this.signEvent({headers:this.headerFormatter.format(E.message.headers),payload:E.message.body},{signingDate:R,signingRegion:U,signingService:A,priorSignature:E.priorSignature}).then(($)=>{return{message:E.message,signature:$}})}async signString(E,{signingDate:R=new Date,signingRegion:U,signingService:A}={}){let T=await this.credentialProvider();this.validateResolvedCredentials(T);let $=U??await this.regionProvider(),{shortDate:w}=xf(R),I=new this.sha256(await this.getSigningKey(T,$,w,A));return I.update(qE.toUint8Array(E)),g.toHex(await I.digest())}async signRequest(E,{signingDate:R=new Date,signableHeaders:U,unsignableHeaders:A,signingRegion:T,signingService:$}={}){let w=await this.credentialProvider();this.validateResolvedCredentials(w);let I=T??await this.regionProvider(),L=SE(E),{longDate:G,shortDate:M}=xf(R),F=vf(M,I,$??this.service);if(L.headers[EA]=G,w.sessionToken)L.headers[k1]=w.sessionToken;let W=await sf(L,this.sha256);if(!r1(CE,L.headers)&&this.applyChecksum)L.headers[CE]=W;let Y=HE(L,A,U),Z=await this.getSignature(G,F,this.getSigningKey(w,I,M,$),this.createCanonicalRequest(L,Y,W));return L.headers[fA]=`${VE} Credential=${w.accessKeyId}/${F}, SignedHeaders=${l0(Y)}, Signature=${Z}`,L}createCanonicalRequest(E,R,U){let A=Object.keys(R).sort();return`${E.method}
2
- ${this.getCanonicalPath(E)}
3
- ${UA(E)}
4
- ${A.map((T)=>`${T}:${R[T]}`).join("\n")}
5
-
6
- ${A.join(";")}
7
- ${U}`}async createStringToSign(E,R,U){let A=new this.sha256;A.update(qE.toUint8Array(U));let T=await A.digest();return`${VE}
8
- ${E}
9
- ${R}
10
- ${g.toHex(T)}`}getCanonicalPath({path:E}){if(this.uriEscapePath){let R=[];for(let T of E.split("/")){if((T==null?void 0:T.length)===0)continue;if(T===".")continue;if(T==="..")R.pop();else R.push(T)}let U=`${(E==null?void 0:E.startsWith("/"))?"/":""}${R.join("/")}${R.length>0&&(E==null?void 0:E.endsWith("/"))?"/":""}`;return gf.escapeUri(U).replace(/%2F/g,"/")}return E}async getSignature(E,R,U,A){let T=await this.createStringToSign(E,R,A),$=new this.sha256(await U);return $.update(qE.toUint8Array(T)),g.toHex(await $.digest())}getSigningKey(E,R,U,A){return AA(this.sha256,E,U,R,A||this.service)}validateResolvedCredentials(E){if(typeof E!=="object"||typeof E.accessKeyId!=="string"||typeof E.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};V(LA,"SignatureV4");var l1=LA,xf=V((f)=>{let E=m1(f).replace(/[\-:]/g,"");return{longDate:E,shortDate:E.slice(0,8)}},"formatDate"),l0=V((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var qA=X(($Y,zA)=>{var{defineProperty:rf,getOwnPropertyDescriptor:i1,getOwnPropertyNames:t1}=Object,e1=Object.prototype.hasOwnProperty,N=(f,E)=>rf(f,"name",{value:E,configurable:!0}),a1=(f,E)=>{for(var R in E)rf(f,R,{get:E[R],enumerable:!0})},fw=(f,E,R,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let A of t1(E))if(!e1.call(f,A)&&A!==R)rf(f,A,{get:()=>E[A],enumerable:!(U=i1(E,A))||U.enumerable})}return f},Ew=(f)=>fw(rf({},"__esModule",{value:!0}),f),JA={};a1(JA,{AWSSDKSigV4Signer:()=>Tw,AwsSdkSigV4ASigner:()=>ww,AwsSdkSigV4Signer:()=>kE,NODE_SIGV4A_CONFIG_OPTIONS:()=>Gw,resolveAWSSDKSigV4Config:()=>Ww,resolveAwsSdkSigV4AConfig:()=>Lw,resolveAwsSdkSigV4Config:()=>KA,validateSigningProperties:()=>_E});zA.exports=Ew(JA);var Rw=wf(),Aw=wf(),WA=N((f)=>{var E,R;return Aw.HttpResponse.isInstance(f)?((E=f.headers)==null?void 0:E.date)??((R=f.headers)==null?void 0:R.Date):void 0},"getDateHeader"),NE=N((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),Uw=N((f,E)=>Math.abs(NE(E).getTime()-f)>=300000,"isClockSkewed"),FA=N((f,E)=>{let R=Date.parse(f);if(Uw(R,E))return R-Date.now();return E},"getUpdatedSystemClockOffset"),Wf=N((f,E)=>{if(!E)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return E},"throwSigningPropertyError"),_E=N(async(f)=>{var E,R,U;let A=Wf("context",f.context),T=Wf("config",f.config),$=(U=(R=(E=A.endpointV2)==null?void 0:E.properties)==null?void 0:R.authSchemes)==null?void 0:U[0],I=await Wf("signer",T.signer)($),L=f==null?void 0:f.signingRegion,G=f==null?void 0:f.signingRegionSet,M=f==null?void 0:f.signingName;return{config:T,signer:I,signingRegion:L,signingRegionSet:G,signingName:M}},"validateSigningProperties"),QA=class f{async sign(E,R,U){var A;if(!Rw.HttpRequest.isInstance(E))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let T=await _E(U),{config:$,signer:w}=T,{signingRegion:I,signingName:L}=T,G=U.context;if(((A=G==null?void 0:G.authSchemes)==null?void 0:A.length)??0>1){let[F,W]=G.authSchemes;if((F==null?void 0:F.name)==="sigv4a"&&(W==null?void 0:W.name)==="sigv4")I=(W==null?void 0:W.signingRegion)??I,L=(W==null?void 0:W.signingName)??L}return await w.sign(E,{signingDate:NE($.systemClockOffset),signingRegion:I,signingService:L})}errorHandler(E){return(R)=>{let U=R.ServerTime??WA(R.$response);if(U){let A=Wf("config",E.config),T=A.systemClockOffset;if(A.systemClockOffset=FA(U,A.systemClockOffset),A.systemClockOffset!==T&&R.$metadata)R.$metadata.clockSkewCorrected=!0}throw R}}successHandler(E,R){let U=WA(E);if(U){let A=Wf("config",R.config);A.systemClockOffset=FA(U,A.systemClockOffset)}}};N(QA,"AwsSdkSigV4Signer");var kE=QA,Tw=kE,$w=wf(),BA=class f extends kE{async sign(E,R,U){var A;if(!$w.HttpRequest.isInstance(E))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:T,signer:$,signingRegion:w,signingRegionSet:I,signingName:L}=await _E(U),M=(await((A=T.sigv4aSigningRegionSet)==null?void 0:A.call(T))??I??[w]).join(",");return await $.sign(E,{signingDate:NE(T.systemClockOffset),signingRegion:M,signingService:L})}};N(BA,"AwsSdkSigV4ASigner");var ww=BA,Iw=If(),OA=ZA(),Lw=N((f)=>{return f.sigv4aSigningRegionSet=Iw.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),Gw={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((E)=>E.trim());throw new OA.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map((E)=>E.trim());throw new OA.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},Mw=XA(),m=If(),YA=MA(),KA=N((f)=>{let E=!1,R;if(f.credentials)E=!0,R=m.memoizeIdentityProvider(f.credentials,m.isIdentityExpired,m.doesIdentityRequireRefresh);if(!R)if(f.credentialDefaultProvider)R=m.normalizeProvider(f.credentialDefaultProvider(Object.assign({},f,{parentClientConfig:f})));else R=N(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");let{signingEscapePath:U=!0,systemClockOffset:A=f.systemClockOffset||0,sha256:T}=f,$;if(f.signer)$=m.normalizeProvider(f.signer);else if(f.regionInfoProvider)$=N(()=>m.normalizeProvider(f.region)().then(async(w)=>[await f.regionInfoProvider(w,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},w]).then(([w,I])=>{let{signingRegion:L,signingService:G}=w;f.signingRegion=f.signingRegion||L||I,f.signingName=f.signingName||G||f.serviceId;let M={...f,credentials:R,region:f.signingRegion,service:f.signingName,sha256:T,uriEscapePath:U};return new(f.signerConstructor||YA.SignatureV4)(M)}),"signer");else $=N(async(w)=>{w=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await m.normalizeProvider(f.region)(),properties:{}},w);let{signingRegion:I,signingName:L}=w;f.signingRegion=f.signingRegion||I,f.signingName=f.signingName||L||f.serviceId;let G={...f,credentials:R,region:f.signingRegion,service:f.signingName,sha256:T,uriEscapePath:U};return new(f.signerConstructor||YA.SignatureV4)(G)},"signer");return{...f,systemClockOffset:A,signingEscapePath:U,credentials:E?async()=>R().then((w)=>Mw.setCredentialFeature(w,"CREDENTIALS_CODE","e")):R,signer:$}},"resolveAwsSdkSigV4Config"),Ww=KA});var tf=X((wY,mA)=>{var{defineProperty:lf,getOwnPropertyDescriptor:Ow,getOwnPropertyNames:Yw}=Object,Xw=Object.prototype.hasOwnProperty,O=(f,E)=>lf(f,"name",{value:E,configurable:!0}),Zw=(f,E)=>{for(var R in E)lf(f,R,{get:E[R],enumerable:!0})},Jw=(f,E,R,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let A of Yw(E))if(!Xw.call(f,A)&&A!==R)lf(f,A,{get:()=>E[A],enumerable:!(U=Ow(E,A))||U.enumerable})}return f},Qw=(f)=>Jw(lf({},"__esModule",{value:!0}),f),CA={};Zw(CA,{Client:()=>Bw,Command:()=>NA,LazyJsonString:()=>XI,NoOpLogger:()=>ZI,SENSITIVE_STRING:()=>zw,ServiceException:()=>AI,StringWrapper:()=>Zf,_json:()=>uE,collectBody:()=>bE.collectBody,convertMap:()=>JI,createAggregatedClient:()=>qw,dateToUtcString:()=>DA,decorateServiceException:()=>uA,emitWarningIfUnsupportedVersion:()=>wI,expectBoolean:()=>Cw,expectByte:()=>yE,expectFloat32:()=>mf,expectInt:()=>Pw,expectInt32:()=>cE,expectLong:()=>Yf,expectNonNull:()=>Nw,expectNumber:()=>Of,expectObject:()=>kA,expectShort:()=>DE,expectString:()=>_w,expectUnion:()=>kw,extendedEncodeURIComponent:()=>bE.extendedEncodeURIComponent,getArrayIfSingleItem:()=>OI,getDefaultClientConfiguration:()=>WI,getDefaultExtensionConfiguration:()=>xA,getValueFromTextNode:()=>dA,handleFloat:()=>jw,isSerializableHeaderValue:()=>YI,limitedParseDouble:()=>dE,limitedParseFloat:()=>cw,limitedParseFloat32:()=>Dw,loadConfigsForDefaultMode:()=>$I,logger:()=>Xf,map:()=>gE,parseBoolean:()=>Vw,parseEpochTimestamp:()=>ow,parseRfc3339DateTime:()=>dw,parseRfc3339DateTimeWithOffset:()=>gw,parseRfc7231DateTime:()=>mw,quoteHeader:()=>nA,resolveDefaultRuntimeConfig:()=>FI,resolvedPath:()=>bE.resolvedPath,serializeDateTime:()=>VI,serializeFloat:()=>qI,splitEvery:()=>rA,splitHeader:()=>CI,strictParseByte:()=>cA,strictParseDouble:()=>xE,strictParseFloat:()=>bw,strictParseFloat32:()=>bA,strictParseInt:()=>yw,strictParseInt32:()=>uw,strictParseLong:()=>jA,strictParseShort:()=>Ef,take:()=>QI,throwDefaultError:()=>pA,withBaseException:()=>UI});mA.exports=Qw(CA);var HA=Fw(),PA=class f{constructor(E){this.config=E,this.middlewareStack=HA.constructStack()}send(E,R,U){let A=typeof R!=="function"?R:void 0,T=typeof R==="function"?R:U,$=A===void 0&&this.config.cacheMiddleware===!0,w;if($){if(!this.handlers)this.handlers=new WeakMap;let I=this.handlers;if(I.has(E.constructor))w=I.get(E.constructor);else w=E.resolveMiddleware(this.middlewareStack,this.config,A),I.set(E.constructor,w)}else delete this.handlers,w=E.resolveMiddleware(this.middlewareStack,this.config,A);if(T)w(E).then((I)=>T(null,I.output),(I)=>T(I)).catch(()=>{});else return w(E).then((I)=>I.output)}destroy(){var E,R,U;(U=(R=(E=this.config)==null?void 0:E.requestHandler)==null?void 0:R.destroy)==null||U.call(R),delete this.handlers}};O(PA,"Client");var Bw=PA,bE=bR(),jE=Pf(),SA=class f{constructor(){this.middlewareStack=HA.constructStack()}static classBuilder(){return new Kw}resolveMiddlewareWithContext(E,R,U,{middlewareFn:A,clientName:T,commandName:$,inputFilterSensitiveLog:w,outputFilterSensitiveLog:I,smithyContext:L,additionalContext:G,CommandCtor:M}){for(let J of A.bind(this)(M,E,R,U))this.middlewareStack.use(J);let F=E.concat(this.middlewareStack),{logger:W}=R,Y={logger:W,clientName:T,commandName:$,inputFilterSensitiveLog:w,outputFilterSensitiveLog:I,[jE.SMITHY_CONTEXT_KEY]:{commandInstance:this,...L},...G},{requestHandler:Z}=R;return F.resolve((J)=>Z.handle(J.request,U||{}),Y)}};O(SA,"Command");var NA=SA,_A=class f{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(E)=>E,this._outputFilterSensitiveLog=(E)=>E,this._serializer=null,this._deserializer=null}init(E){this._init=E}ep(E){return this._ep=E,this}m(E){return this._middlewareFn=E,this}s(E,R,U={}){return this._smithyContext={service:E,operation:R,...U},this}c(E={}){return this._additionalContext=E,this}n(E,R){return this._clientName=E,this._commandName=R,this}f(E=(U)=>U,R=(U)=>U){return this._inputFilterSensitiveLog=E,this._outputFilterSensitiveLog=R,this}ser(E){return this._serializer=E,this}de(E){return this._deserializer=E,this}build(){var E;let R=this,U;return U=(E=class extends NA{constructor(...[A]){super();this.serialize=R._serializer,this.deserialize=R._deserializer,this.input=A??{},R._init(this)}static getEndpointParameterInstructions(){return R._ep}resolveMiddleware(A,T,$){return this.resolveMiddlewareWithContext(A,T,$,{CommandCtor:U,middlewareFn:R._middlewareFn,clientName:R._clientName,commandName:R._commandName,inputFilterSensitiveLog:R._inputFilterSensitiveLog,outputFilterSensitiveLog:R._outputFilterSensitiveLog,smithyContext:R._smithyContext,additionalContext:R._additionalContext})}},O(E,"CommandRef"),E)}};O(_A,"ClassBuilder");var Kw=_A,zw="***SensitiveInformation***",qw=O((f,E)=>{for(let R of Object.keys(f)){let U=f[R],A=O(async function($,w,I){let L=new U($);if(typeof w==="function")this.send(L,w);else if(typeof I==="function"){if(typeof w!=="object")throw new Error(`Expected http options but got ${typeof w}`);this.send(L,w||{},I)}else return this.send(L,w)},"methodImpl"),T=(R[0].toLowerCase()+R.slice(1)).replace(/Command$/,"");E.prototype[T]=A}},"createAggregatedClient"),Vw=O((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),Cw=O((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)Xf.warn(of(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let E=f.toLowerCase();if(E==="false"||E==="true")Xf.warn(of(`Expected boolean, got ${typeof f}: ${f}`));if(E==="false")return!1;if(E==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),Of=O((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let E=parseFloat(f);if(!Number.isNaN(E)){if(String(E)!==String(f))Xf.warn(of(`Expected number but observed string: ${f}`));return E}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),Hw=Math.ceil(340282346638528860000000000000000000000),mf=O((f)=>{let E=Of(f);if(E!==void 0&&!Number.isNaN(E)&&E!==1/0&&E!==-1/0){if(Math.abs(E)>Hw)throw new TypeError(`Expected 32-bit float, got ${f}`)}return E},"expectFloat32"),Yf=O((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),Pw=Yf,cE=O((f)=>pE(f,32),"expectInt32"),DE=O((f)=>pE(f,16),"expectShort"),yE=O((f)=>pE(f,8),"expectByte"),pE=O((f,E)=>{let R=Yf(f);if(R!==void 0&&Sw(R,E)!==R)throw new TypeError(`Expected ${E}-bit integer, got ${f}`);return R},"expectSizedInt"),Sw=O((f,E)=>{switch(E){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),Nw=O((f,E)=>{if(f===null||f===void 0){if(E)throw new TypeError(`Expected a non-null value for ${E}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),kA=O((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let E=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${E}: ${f}`)},"expectObject"),_w=O((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return Xf.warn(of(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),kw=O((f)=>{if(f===null||f===void 0)return;let E=kA(f),R=Object.entries(E).filter(([,U])=>U!=null).map(([U])=>U);if(R.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(R.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${R} were not null.`);return E},"expectUnion"),xE=O((f)=>{if(typeof f=="string")return Of(Af(f));return Of(f)},"strictParseDouble"),bw=xE,bA=O((f)=>{if(typeof f=="string")return mf(Af(f));return mf(f)},"strictParseFloat32"),hw=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Af=O((f)=>{let E=f.match(hw);if(E===null||E[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),dE=O((f)=>{if(typeof f=="string")return hA(f);return Of(f)},"limitedParseDouble"),jw=dE,cw=dE,Dw=O((f)=>{if(typeof f=="string")return hA(f);return mf(f)},"limitedParseFloat32"),hA=O((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),jA=O((f)=>{if(typeof f==="string")return Yf(Af(f));return Yf(f)},"strictParseLong"),yw=jA,uw=O((f)=>{if(typeof f==="string")return cE(Af(f));return cE(f)},"strictParseInt32"),Ef=O((f)=>{if(typeof f==="string")return DE(Af(f));return DE(f)},"strictParseShort"),cA=O((f)=>{if(typeof f==="string")return yE(Af(f));return yE(f)},"strictParseByte"),of=O((f)=>{return String(new TypeError(f).stack||f).split("\n").slice(0,5).filter((E)=>!E.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),Xf={warn:console.warn},pw=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],vE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function DA(f){let E=f.getUTCFullYear(),R=f.getUTCMonth(),U=f.getUTCDay(),A=f.getUTCDate(),T=f.getUTCHours(),$=f.getUTCMinutes(),w=f.getUTCSeconds(),I=A<10?`0${A}`:`${A}`,L=T<10?`0${T}`:`${T}`,G=$<10?`0${$}`:`${$}`,M=w<10?`0${w}`:`${w}`;return`${pw[U]}, ${I} ${vE[R]} ${E} ${L}:${G}:${M} GMT`}O(DA,"dateToUtcString");var xw=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),dw=O((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let E=xw.exec(f);if(!E)throw new TypeError("Invalid RFC-3339 date-time value");let[R,U,A,T,$,w,I,L]=E,G=Ef(Rf(U)),M=D(A,"month",1,12),F=D(T,"day",1,31);return Ff(G,M,F,{hours:$,minutes:w,seconds:I,fractionalMilliseconds:L})},"parseRfc3339DateTime"),vw=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),gw=O((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let E=vw.exec(f);if(!E)throw new TypeError("Invalid RFC-3339 date-time value");let[R,U,A,T,$,w,I,L,G]=E,M=Ef(Rf(U)),F=D(A,"month",1,12),W=D(T,"day",1,31),Y=Ff(M,F,W,{hours:$,minutes:w,seconds:I,fractionalMilliseconds:L});if(G.toUpperCase()!="Z")Y.setTime(Y.getTime()-RI(G));return Y},"parseRfc3339DateTimeWithOffset"),sw=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),nw=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),rw=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),mw=O((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let E=sw.exec(f);if(E){let[R,U,A,T,$,w,I,L]=E;return Ff(Ef(Rf(T)),hE(A),D(U,"day",1,31),{hours:$,minutes:w,seconds:I,fractionalMilliseconds:L})}if(E=nw.exec(f),E){let[R,U,A,T,$,w,I,L]=E;return tw(Ff(lw(T),hE(A),D(U,"day",1,31),{hours:$,minutes:w,seconds:I,fractionalMilliseconds:L}))}if(E=rw.exec(f),E){let[R,U,A,T,$,w,I,L]=E;return Ff(Ef(Rf(L)),hE(U),D(A.trimLeft(),"day",1,31),{hours:T,minutes:$,seconds:w,fractionalMilliseconds:I})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),ow=O((f)=>{if(f===null||f===void 0)return;let E;if(typeof f==="number")E=f;else if(typeof f==="string")E=xE(f);else if(typeof f==="object"&&f.tag===1)E=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(E)||E===1/0||E===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(E*1000))},"parseEpochTimestamp"),Ff=O((f,E,R,U)=>{let A=E-1;return aw(f,A,R),new Date(Date.UTC(f,A,R,D(U.hours,"hour",0,23),D(U.minutes,"minute",0,59),D(U.seconds,"seconds",0,60),EI(U.fractionalMilliseconds)))},"buildDate"),lw=O((f)=>{let E=new Date().getUTCFullYear(),R=Math.floor(E/100)*100+Ef(Rf(f));if(R<E)return R+100;return R},"parseTwoDigitYear"),iw=1576800000000,tw=O((f)=>{if(f.getTime()-new Date().getTime()>iw)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),hE=O((f)=>{let E=vE.indexOf(f);if(E<0)throw new TypeError(`Invalid month: ${f}`);return E+1},"parseMonthByShortName"),ew=[31,28,31,30,31,30,31,31,30,31,30,31],aw=O((f,E,R)=>{let U=ew[E];if(E===1&&fI(f))U=29;if(R>U)throw new TypeError(`Invalid day for ${vE[E]} in ${f}: ${R}`)},"validateDayOfMonth"),fI=O((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),D=O((f,E,R,U)=>{let A=cA(Rf(f));if(A<R||A>U)throw new TypeError(`${E} must be between ${R} and ${U}, inclusive`);return A},"parseDateValue"),EI=O((f)=>{if(f===null||f===void 0)return 0;return bA("0."+f)*1000},"parseMilliseconds"),RI=O((f)=>{let E=f[0],R=1;if(E=="+")R=1;else if(E=="-")R=-1;else throw new TypeError(`Offset direction, ${E}, must be "+" or "-"`);let U=Number(f.substring(1,3)),A=Number(f.substring(4,6));return R*(U*60+A)*60*1000},"parseOffsetToMilliseconds"),Rf=O((f)=>{let E=0;while(E<f.length-1&&f.charAt(E)==="0")E++;if(E===0)return f;return f.slice(E)},"stripLeadingZeroes"),yA=class f extends Error{constructor(E){super(E.message);Object.setPrototypeOf(this,f.prototype),this.name=E.name,this.$fault=E.$fault,this.$metadata=E.$metadata}};O(yA,"ServiceException");var AI=yA,uA=O((f,E={})=>{Object.entries(E).filter(([,U])=>U!==void 0).forEach(([U,A])=>{if(f[U]==null||f[U]==="")f[U]=A});let R=f.message||f.Message||"UnknownError";return f.message=R,delete f.Message,f},"decorateServiceException"),pA=O(({output:f,parsedBody:E,exceptionCtor:R,errorCode:U})=>{let A=TI(f),T=A.httpStatusCode?A.httpStatusCode+"":void 0,$=new R({name:(E==null?void 0:E.code)||(E==null?void 0:E.Code)||U||T||"UnknownError",$fault:"client",$metadata:A});throw uA($,E)},"throwDefaultError"),UI=O((f)=>{return({output:E,parsedBody:R,errorCode:U})=>{pA({output:E,parsedBody:R,exceptionCtor:f,errorCode:U})}},"withBaseException"),TI=O((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),$I=O((f)=>{switch(f){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),VA=!1,wI=O((f)=>{if(f&&!VA&&parseInt(f.substring(1,f.indexOf(".")))<16)VA=!0},"emitWarningIfUnsupportedVersion"),II=O((f)=>{let E=[];for(let R in jE.AlgorithmId){let U=jE.AlgorithmId[R];if(f[U]===void 0)continue;E.push({algorithmId:()=>U,checksumConstructor:()=>f[U]})}return{_checksumAlgorithms:E,addChecksumAlgorithm(R){this._checksumAlgorithms.push(R)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),LI=O((f)=>{let E={};return f.checksumAlgorithms().forEach((R)=>{E[R.algorithmId()]=R.checksumConstructor()}),E},"resolveChecksumRuntimeConfig"),GI=O((f)=>{let E=f.retryStrategy;return{setRetryStrategy(R){E=R},retryStrategy(){return E}}},"getRetryConfiguration"),MI=O((f)=>{let E={};return E.retryStrategy=f.retryStrategy(),E},"resolveRetryRuntimeConfig"),xA=O((f)=>{return{...II(f),...GI(f)}},"getDefaultExtensionConfiguration"),WI=xA,FI=O((f)=>{return{...LI(f),...MI(f)}},"resolveDefaultRuntimeConfig"),OI=O((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),dA=O((f)=>{for(let R in f)if(f.hasOwnProperty(R)&&f[R]["#text"]!==void 0)f[R]=f[R]["#text"];else if(typeof f[R]==="object"&&f[R]!==null)f[R]=dA(f[R]);return f},"getValueFromTextNode"),YI=O((f)=>{return f!=null},"isSerializableHeaderValue"),Zf=O(function(){let f=Object.getPrototypeOf(this).constructor,R=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(R,f.prototype),R},"StringWrapper");Zf.prototype=Object.create(String.prototype,{constructor:{value:Zf,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Zf,String);var vA=class f extends Zf{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(E){if(E instanceof f)return E;else if(E instanceof String||typeof E==="string")return new f(E);return new f(JSON.stringify(E))}};O(vA,"LazyJsonString");var XI=vA,gA=class f{trace(){}debug(){}info(){}warn(){}error(){}};O(gA,"NoOpLogger");var ZI=gA;function gE(f,E,R){let U,A,T;if(typeof E==="undefined"&&typeof R==="undefined")U={},T=f;else if(U=f,typeof E==="function")return A=E,T=R,BI(U,A,T);else T=E;for(let $ of Object.keys(T)){if(!Array.isArray(T[$])){U[$]=T[$];continue}sA(U,null,T,$)}return U}O(gE,"map");var JI=O((f)=>{let E={};for(let[R,U]of Object.entries(f||{}))E[R]=[,U];return E},"convertMap"),QI=O((f,E)=>{let R={};for(let U in E)sA(R,f,E,U);return R},"take"),BI=O((f,E,R)=>{return gE(f,Object.entries(R).reduce((U,[A,T])=>{if(Array.isArray(T))U[A]=T;else if(typeof T==="function")U[A]=[E,T()];else U[A]=[E,T];return U},{}))},"mapWithFilter"),sA=O((f,E,R,U)=>{if(E!==null){let $=R[U];if(typeof $==="function")$=[,$];let[w=KI,I=zI,L=U]=$;if(typeof w==="function"&&w(E[L])||typeof w!=="function"&&!!w)f[U]=I(E[L]);return}let[A,T]=R[U];if(typeof T==="function"){let $,w=A===void 0&&($=T())!=null,I=typeof A==="function"&&!!A(void 0)||typeof A!=="function"&&!!A;if(w)f[U]=$;else if(I)f[U]=T()}else{let $=A===void 0&&T!=null,w=typeof A==="function"&&!!A(T)||typeof A!=="function"&&!!A;if($||w)f[U]=T}},"applyInstruction"),KI=O((f)=>f!=null,"nonNullish"),zI=O((f)=>f,"pass");function nA(f){if(f.includes(",")||f.includes('"'))f=`"${f.replace(/"/g,'\\"')}"`;return f}O(nA,"quoteHeader");var qI=O((f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}},"serializeFloat"),VI=O((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),uE=O((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((E)=>E!=null).map(uE);if(typeof f==="object"){let E={};for(let R of Object.keys(f)){if(f[R]==null)continue;E[R]=uE(f[R])}return E}return f},"_json");function rA(f,E,R){if(R<=0||!Number.isInteger(R))throw new Error("Invalid number of delimiters ("+R+") for splitEvery.");let U=f.split(E);if(R===1)return U;let A=[],T="";for(let $=0;$<U.length;$++){if(T==="")T=U[$];else T+=E+U[$];if(($+1)%R===0)A.push(T),T=""}if(T!=="")A.push(T);return A}O(rA,"splitEvery");var CI=O((f)=>{let E=f.length,R=[],U=!1,A=void 0,T=0;for(let $=0;$<E;++$){let w=f[$];switch(w){case'"':if(A!=="\\")U=!U;break;case",":if(!U)R.push(f.slice(T,$)),T=$+1;break;default:}A=w}return R.push(f.slice(T)),R.map(($)=>{$=$.trim();let w=$.length;if(w<2)return $;if($[0]==='"'&&$[w-1]==='"')$=$.slice(1,w-1);return $.replace(/\\"/g,'"')})},"splitHeader")});var ef=X((_I)=>{var HI=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",oA="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+HI+"]*",PI=new RegExp("^"+oA+"$"),SI=function(f,E){let R=[],U=E.exec(f);while(U){let A=[];A.startIndex=E.lastIndex-U[0].length;let T=U.length;for(let $=0;$<T;$++)A.push(U[$]);R.push(A),U=E.exec(f)}return R},NI=function(f){let E=PI.exec(f);return!(E===null||typeof E==="undefined")};_I.isExist=function(f){return typeof f!=="undefined"};_I.isEmptyObject=function(f){return Object.keys(f).length===0};_I.merge=function(f,E,R){if(E){let U=Object.keys(E),A=U.length;for(let T=0;T<A;T++)if(R==="strict")f[U[T]]=[E[U[T]]];else f[U[T]]=E[U[T]]}};_I.getValue=function(f){if(_I.isExist(f))return f;else return""};_I.isName=NI;_I.getAllMatches=SI;_I.nameRegexp=oA});var nE=X((rI)=>{var sE=ef(),yI={allowBooleanAttributes:!1,unpairedTags:[]};rI.validate=function(f,E){E=Object.assign({},yI,E);let R=[],U=!1,A=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let T=0;T<f.length;T++)if(f[T]==="<"&&f[T+1]==="?"){if(T+=2,T=tA(f,T),T.err)return T}else if(f[T]==="<"){let $=T;if(T++,f[T]==="!"){T=eA(f,T);continue}else{let w=!1;if(f[T]==="/")w=!0,T++;let I="";for(;T<f.length&&f[T]!==">"&&f[T]!==" "&&f[T]!=="\t"&&f[T]!=="\n"&&f[T]!=="\r";T++)I+=f[T];if(I=I.trim(),I[I.length-1]==="/")I=I.substring(0,I.length-1),T--;if(!nI(I)){let M;if(I.trim().length===0)M="Invalid space after '<'.";else M="Tag '"+I+"' is an invalid name.";return z("InvalidTag",M,P(f,T))}let L=xI(f,T);if(L===!1)return z("InvalidAttr","Attributes for '"+I+"' have open quote.",P(f,T));let G=L.value;if(T=L.index,G[G.length-1]==="/"){let M=T-G.length;G=G.substring(0,G.length-1);let F=aA(G,E);if(F===!0)U=!0;else return z(F.err.code,F.err.msg,P(f,M+F.err.line))}else if(w)if(!L.tagClosed)return z("InvalidTag","Closing tag '"+I+"' doesn't have proper closing.",P(f,T));else if(G.trim().length>0)return z("InvalidTag","Closing tag '"+I+"' can't have attributes or invalid starting.",P(f,$));else if(R.length===0)return z("InvalidTag","Closing tag '"+I+"' has not been opened.",P(f,$));else{let M=R.pop();if(I!==M.tagName){let F=P(f,M.tagStartPos);return z("InvalidTag","Expected closing tag '"+M.tagName+"' (opened in line "+F.line+", col "+F.col+") instead of closing tag '"+I+"'.",P(f,$))}if(R.length==0)A=!0}else{let M=aA(G,E);if(M!==!0)return z(M.err.code,M.err.msg,P(f,T-G.length+M.err.line));if(A===!0)return z("InvalidXml","Multiple possible root nodes found.",P(f,T));else if(E.unpairedTags.indexOf(I)!==-1);else R.push({tagName:I,tagStartPos:$});U=!0}for(T++;T<f.length;T++)if(f[T]==="<")if(f[T+1]==="!"){T++,T=eA(f,T);continue}else if(f[T+1]==="?"){if(T=tA(f,++T),T.err)return T}else break;else if(f[T]==="&"){let M=gI(f,T);if(M==-1)return z("InvalidChar","char '&' is not expected.",P(f,T));T=M}else if(A===!0&&!iA(f[T]))return z("InvalidXml","Extra text at the end",P(f,T));if(f[T]==="<")T--}}else{if(iA(f[T]))continue;return z("InvalidChar","char '"+f[T]+"' is not expected.",P(f,T))}if(!U)return z("InvalidXml","Start tag expected.",1);else if(R.length==1)return z("InvalidTag","Unclosed tag '"+R[0].tagName+"'.",P(f,R[0].tagStartPos));else if(R.length>0)return z("InvalidXml","Invalid '"+JSON.stringify(R.map((T)=>T.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function iA(f){return f===" "||f==="\t"||f==="\n"||f==="\r"}function tA(f,E){let R=E;for(;E<f.length;E++)if(f[E]=="?"||f[E]==" "){let U=f.substr(R,E-R);if(E>5&&U==="xml")return z("InvalidXml","XML declaration allowed only at the start of the document.",P(f,E));else if(f[E]=="?"&&f[E+1]==">"){E++;break}else continue}return E}function eA(f,E){if(f.length>E+5&&f[E+1]==="-"&&f[E+2]==="-"){for(E+=3;E<f.length;E++)if(f[E]==="-"&&f[E+1]==="-"&&f[E+2]===">"){E+=2;break}}else if(f.length>E+8&&f[E+1]==="D"&&f[E+2]==="O"&&f[E+3]==="C"&&f[E+4]==="T"&&f[E+5]==="Y"&&f[E+6]==="P"&&f[E+7]==="E"){let R=1;for(E+=8;E<f.length;E++)if(f[E]==="<")R++;else if(f[E]===">"){if(R--,R===0)break}}else if(f.length>E+9&&f[E+1]==="["&&f[E+2]==="C"&&f[E+3]==="D"&&f[E+4]==="A"&&f[E+5]==="T"&&f[E+6]==="A"&&f[E+7]==="["){for(E+=8;E<f.length;E++)if(f[E]==="]"&&f[E+1]==="]"&&f[E+2]===">"){E+=2;break}}return E}var uI='"',pI="'";function xI(f,E){let R="",U="",A=!1;for(;E<f.length;E++){if(f[E]===uI||f[E]===pI)if(U==="")U=f[E];else if(U!==f[E]);else U="";else if(f[E]===">"){if(U===""){A=!0;break}}R+=f[E]}if(U!=="")return!1;return{value:R,index:E,tagClosed:A}}var dI=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g");function aA(f,E){let R=sE.getAllMatches(f,dI),U={};for(let A=0;A<R.length;A++){if(R[A][1].length===0)return z("InvalidAttr","Attribute '"+R[A][2]+"' has no space in starting.",Jf(R[A]));else if(R[A][3]!==void 0&&R[A][4]===void 0)return z("InvalidAttr","Attribute '"+R[A][2]+"' is without value.",Jf(R[A]));else if(R[A][3]===void 0&&!E.allowBooleanAttributes)return z("InvalidAttr","boolean attribute '"+R[A][2]+"' is not allowed.",Jf(R[A]));let T=R[A][2];if(!sI(T))return z("InvalidAttr","Attribute '"+T+"' is an invalid name.",Jf(R[A]));if(!U.hasOwnProperty(T))U[T]=1;else return z("InvalidAttr","Attribute '"+T+"' is repeated.",Jf(R[A]))}return!0}function vI(f,E){let R=/\d/;if(f[E]==="x")E++,R=/[\da-fA-F]/;for(;E<f.length;E++){if(f[E]===";")return E;if(!f[E].match(R))break}return-1}function gI(f,E){if(E++,f[E]===";")return-1;if(f[E]==="#")return E++,vI(f,E);let R=0;for(;E<f.length;E++,R++){if(f[E].match(/\w/)&&R<20)continue;if(f[E]===";")break;return-1}return E}function z(f,E,R){return{err:{code:f,msg:E,line:R.line||R,col:R.col}}}function sI(f){return sE.isName(f)}function nI(f){return sE.isName(f)}function P(f,E){let R=f.substring(0,E).split(/\r?\n/);return{line:R.length,col:R[R.length-1].length+1}}function Jf(f){return f.startIndex+f[1].length}});var EU=X((lI)=>{var fU={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(f,E){return E},attributeValueProcessor:function(f,E){return E},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,E,R){return f}},oI=function(f){return Object.assign({},fU,f)};lI.buildOptions=oI;lI.defaultOptions=fU});var UU=X((WY,AU)=>{class RU{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,E){if(f==="__proto__")f="#__proto__";this.child.push({[f]:E})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}AU.exports=RU});var $U=X((FY,TU)=>{var eI=ef();function aI(f,E){let R={};if(f[E+3]==="O"&&f[E+4]==="C"&&f[E+5]==="T"&&f[E+6]==="Y"&&f[E+7]==="P"&&f[E+8]==="E"){E=E+9;let U=1,A=!1,T=!1,$="";for(;E<f.length;E++)if(f[E]==="<"&&!T){if(A&&RL(f,E)){if(E+=7,[entityName,val,E]=fL(f,E+1),val.indexOf("&")===-1)R[$L(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(A&&AL(f,E))E+=8;else if(A&&UL(f,E))E+=8;else if(A&&TL(f,E))E+=9;else if(EL)T=!0;else throw new Error("Invalid DOCTYPE");U++,$=""}else if(f[E]===">"){if(T){if(f[E-1]==="-"&&f[E-2]==="-")T=!1,U--}else U--;if(U===0)break}else if(f[E]==="[")A=!0;else $+=f[E];if(U!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:R,i:E}}function fL(f,E){let R="";for(;E<f.length&&(f[E]!=="'"&&f[E]!=='"');E++)R+=f[E];if(R=R.trim(),R.indexOf(" ")!==-1)throw new Error("External entites are not supported");let U=f[E++],A="";for(;E<f.length&&f[E]!==U;E++)A+=f[E];return[R,A,E]}function EL(f,E){if(f[E+1]==="!"&&f[E+2]==="-"&&f[E+3]==="-")return!0;return!1}function RL(f,E){if(f[E+1]==="!"&&f[E+2]==="E"&&f[E+3]==="N"&&f[E+4]==="T"&&f[E+5]==="I"&&f[E+6]==="T"&&f[E+7]==="Y")return!0;return!1}function AL(f,E){if(f[E+1]==="!"&&f[E+2]==="E"&&f[E+3]==="L"&&f[E+4]==="E"&&f[E+5]==="M"&&f[E+6]==="E"&&f[E+7]==="N"&&f[E+8]==="T")return!0;return!1}function UL(f,E){if(f[E+1]==="!"&&f[E+2]==="A"&&f[E+3]==="T"&&f[E+4]==="T"&&f[E+5]==="L"&&f[E+6]==="I"&&f[E+7]==="S"&&f[E+8]==="T")return!0;return!1}function TL(f,E){if(f[E+1]==="!"&&f[E+2]==="N"&&f[E+3]==="O"&&f[E+4]==="T"&&f[E+5]==="A"&&f[E+6]==="T"&&f[E+7]==="I"&&f[E+8]==="O"&&f[E+9]==="N")return!0;return!1}function $L(f){if(eI.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)}TU.exports=aI});var IU=X((OY,wU)=>{var wL=/^[-+]?0x[a-fA-F0-9]+$/,IL=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var LL={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function GL(f,E={}){if(E=Object.assign({},LL,E),!f||typeof f!=="string")return f;let R=f.trim();if(E.skipLike!==void 0&&E.skipLike.test(R))return f;else if(E.hex&&wL.test(R))return Number.parseInt(R,16);else{let U=IL.exec(R);if(U){let A=U[1],T=U[2],$=ML(U[3]),w=U[4]||U[6];if(!E.leadingZeros&&T.length>0&&A&&R[2]!==".")return f;else if(!E.leadingZeros&&T.length>0&&!A&&R[1]!==".")return f;else{let I=Number(R),L=""+I;if(L.search(/[eE]/)!==-1)if(E.eNotation)return I;else return f;else if(w)if(E.eNotation)return I;else return f;else if(R.indexOf(".")!==-1)if(L==="0"&&$==="")return I;else if(L===$)return I;else if(A&&L==="-"+$)return I;else return f;if(T)if($===L)return I;else if(A+$===L)return I;else return f;if(R===L)return I;else if(R===A+L)return I;return f}}else return f}}function ML(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f}wU.exports=GL});var WU=X((YY,MU)=>{var LU=ef(),Qf=UU(),WL=$U(),FL=IU();class GU{constructor(f){this.options=f,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(E,R)=>String.fromCharCode(Number.parseInt(R,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(E,R)=>String.fromCharCode(Number.parseInt(R,16))}},this.addExternalEntities=OL,this.parseXml=QL,this.parseTextData=YL,this.resolveNameSpace=XL,this.buildAttributesMap=JL,this.isItStopNode=qL,this.replaceEntitiesValue=KL,this.readStopNodeData=CL,this.saveTextToParentTag=zL,this.addChild=BL}}function OL(f){let E=Object.keys(f);for(let R=0;R<E.length;R++){let U=E[R];this.lastEntities[U]={regex:new RegExp("&"+U+";","g"),val:f[U]}}}function YL(f,E,R,U,A,T,$){if(f!==void 0){if(this.options.trimValues&&!U)f=f.trim();if(f.length>0){if(!$)f=this.replaceEntitiesValue(f);let w=this.options.tagValueProcessor(E,f,R,A,T);if(w===null||w===void 0)return f;else if(typeof w!==typeof f||w!==f)return w;else if(this.options.trimValues)return mE(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return mE(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}}function XL(f){if(this.options.removeNSPrefix){let E=f.split(":"),R=f.charAt(0)==="/"?"/":"";if(E[0]==="xmlns")return"";if(E.length===2)f=R+E[1]}return f}var ZL=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm");function JL(f,E,R){if(!this.options.ignoreAttributes&&typeof f==="string"){let U=LU.getAllMatches(f,ZL),A=U.length,T={};for(let $=0;$<A;$++){let w=this.resolveNameSpace(U[$][1]),I=U[$][4],L=this.options.attributeNamePrefix+w;if(w.length){if(this.options.transformAttributeName)L=this.options.transformAttributeName(L);if(L==="__proto__")L="#__proto__";if(I!==void 0){if(this.options.trimValues)I=I.trim();I=this.replaceEntitiesValue(I);let G=this.options.attributeValueProcessor(w,I,E);if(G===null||G===void 0)T[L]=I;else if(typeof G!==typeof I||G!==I)T[L]=G;else T[L]=mE(I,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)T[L]=!0}}if(!Object.keys(T).length)return;if(this.options.attributesGroupName){let $={};return $[this.options.attributesGroupName]=T,$}return T}}var QL=function(f){f=f.replace(/\r\n?/g,"\n");let E=new Qf("!xml"),R=E,U="",A="";for(let T=0;T<f.length;T++)if(f[T]==="<")if(f[T+1]==="/"){let w=o(f,">",T,"Closing Tag is not closed."),I=f.substring(T+2,w).trim();if(this.options.removeNSPrefix){let M=I.indexOf(":");if(M!==-1)I=I.substr(M+1)}if(this.options.transformTagName)I=this.options.transformTagName(I);if(R)U=this.saveTextToParentTag(U,R,A);let L=A.substring(A.lastIndexOf(".")+1);if(I&&this.options.unpairedTags.indexOf(I)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${I}>`);let G=0;if(L&&this.options.unpairedTags.indexOf(L)!==-1)G=A.lastIndexOf(".",A.lastIndexOf(".")-1),this.tagsNodeStack.pop();else G=A.lastIndexOf(".");A=A.substring(0,G),R=this.tagsNodeStack.pop(),U="",T=w}else if(f[T+1]==="?"){let w=rE(f,T,!1,"?>");if(!w)throw new Error("Pi Tag is not closed.");if(U=this.saveTextToParentTag(U,R,A),this.options.ignoreDeclaration&&w.tagName==="?xml"||this.options.ignorePiTags);else{let I=new Qf(w.tagName);if(I.add(this.options.textNodeName,""),w.tagName!==w.tagExp&&w.attrExpPresent)I[":@"]=this.buildAttributesMap(w.tagExp,A,w.tagName);this.addChild(R,I,A)}T=w.closeIndex+1}else if(f.substr(T+1,3)==="!--"){let w=o(f,"-->",T+4,"Comment is not closed.");if(this.options.commentPropName){let I=f.substring(T+4,w-2);U=this.saveTextToParentTag(U,R,A),R.add(this.options.commentPropName,[{[this.options.textNodeName]:I}])}T=w}else if(f.substr(T+1,2)==="!D"){let w=WL(f,T);this.docTypeEntities=w.entities,T=w.i}else if(f.substr(T+1,2)==="!["){let w=o(f,"]]>",T,"CDATA is not closed.")-2,I=f.substring(T+9,w);U=this.saveTextToParentTag(U,R,A);let L=this.parseTextData(I,R.tagname,A,!0,!1,!0,!0);if(L==null)L="";if(this.options.cdataPropName)R.add(this.options.cdataPropName,[{[this.options.textNodeName]:I}]);else R.add(this.options.textNodeName,L);T=w+2}else{let w=rE(f,T,this.options.removeNSPrefix),I=w.tagName,L=w.rawTagName,G=w.tagExp,M=w.attrExpPresent,F=w.closeIndex;if(this.options.transformTagName)I=this.options.transformTagName(I);if(R&&U){if(R.tagname!=="!xml")U=this.saveTextToParentTag(U,R,A,!1)}let W=R;if(W&&this.options.unpairedTags.indexOf(W.tagname)!==-1)R=this.tagsNodeStack.pop(),A=A.substring(0,A.lastIndexOf("."));if(I!==E.tagname)A+=A?"."+I:I;if(this.isItStopNode(this.options.stopNodes,A,I)){let Y="";if(G.length>0&&G.lastIndexOf("/")===G.length-1){if(I[I.length-1]==="/")I=I.substr(0,I.length-1),A=A.substr(0,A.length-1),G=I;else G=G.substr(0,G.length-1);T=w.closeIndex}else if(this.options.unpairedTags.indexOf(I)!==-1)T=w.closeIndex;else{let J=this.readStopNodeData(f,L,F+1);if(!J)throw new Error(`Unexpected end of ${L}`);T=J.i,Y=J.tagContent}let Z=new Qf(I);if(I!==G&&M)Z[":@"]=this.buildAttributesMap(G,A,I);if(Y)Y=this.parseTextData(Y,I,A,!0,M,!0,!0);A=A.substr(0,A.lastIndexOf(".")),Z.add(this.options.textNodeName,Y),this.addChild(R,Z,A)}else{if(G.length>0&&G.lastIndexOf("/")===G.length-1){if(I[I.length-1]==="/")I=I.substr(0,I.length-1),A=A.substr(0,A.length-1),G=I;else G=G.substr(0,G.length-1);if(this.options.transformTagName)I=this.options.transformTagName(I);let Y=new Qf(I);if(I!==G&&M)Y[":@"]=this.buildAttributesMap(G,A,I);this.addChild(R,Y,A),A=A.substr(0,A.lastIndexOf("."))}else{let Y=new Qf(I);if(this.tagsNodeStack.push(R),I!==G&&M)Y[":@"]=this.buildAttributesMap(G,A,I);this.addChild(R,Y,A),R=Y}U="",T=F}}else U+=f[T];return E.child};function BL(f,E,R){let U=this.options.updateTag(E.tagname,R,E[":@"]);if(U===!1);else if(typeof U==="string")E.tagname=U,f.addChild(E);else f.addChild(E)}var KL=function(f){if(this.options.processEntities){for(let E in this.docTypeEntities){let R=this.docTypeEntities[E];f=f.replace(R.regx,R.val)}for(let E in this.lastEntities){let R=this.lastEntities[E];f=f.replace(R.regex,R.val)}if(this.options.htmlEntities)for(let E in this.htmlEntities){let R=this.htmlEntities[E];f=f.replace(R.regex,R.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};function zL(f,E,R,U){if(f){if(U===void 0)U=Object.keys(E.child).length===0;if(f=this.parseTextData(f,E.tagname,R,!1,E[":@"]?Object.keys(E[":@"]).length!==0:!1,U),f!==void 0&&f!=="")E.add(this.options.textNodeName,f);f=""}return f}function qL(f,E,R){let U="*."+R;for(let A in f){let T=f[A];if(U===T||E===T)return!0}return!1}function VL(f,E,R=">"){let U,A="";for(let T=E;T<f.length;T++){let $=f[T];if(U){if($===U)U=""}else if($==='"'||$==="'")U=$;else if($===R[0])if(R[1]){if(f[T+1]===R[1])return{data:A,index:T}}else return{data:A,index:T};else if($==="\t")$=" ";A+=$}}function o(f,E,R,U){let A=f.indexOf(E,R);if(A===-1)throw new Error(U);else return A+E.length-1}function rE(f,E,R,U=">"){let A=VL(f,E+1,U);if(!A)return;let{data:T,index:$}=A,w=T.search(/\s/),I=T,L=!0;if(w!==-1)I=T.substring(0,w),T=T.substring(w+1).trimStart();let G=I;if(R){let M=I.indexOf(":");if(M!==-1)I=I.substr(M+1),L=I!==A.data.substr(M+1)}return{tagName:I,tagExp:T,closeIndex:$,attrExpPresent:L,rawTagName:G}}function CL(f,E,R){let U=R,A=1;for(;R<f.length;R++)if(f[R]==="<")if(f[R+1]==="/"){let T=o(f,">",R,`${E} is not closed`);if(f.substring(R+2,T).trim()===E){if(A--,A===0)return{tagContent:f.substring(U,R),i:T}}R=T}else if(f[R+1]==="?")R=o(f,"?>",R+1,"StopNode is not closed.");else if(f.substr(R+1,3)==="!--")R=o(f,"-->",R+3,"StopNode is not closed.");else if(f.substr(R+1,2)==="![")R=o(f,"]]>",R,"StopNode is not closed.")-2;else{let T=rE(f,R,">");if(T){if((T&&T.tagName)===E&&T.tagExp[T.tagExp.length-1]!=="/")A++;R=T.closeIndex}}}function mE(f,E,R){if(E&&typeof f==="string"){let U=f.trim();if(U==="true")return!0;else if(U==="false")return!1;else return FL(f,R)}else if(LU.isExist(f))return f;else return""}MU.exports=GU});var OU=X((_L)=>{function HL(f,E){return FU(f,E)}function FU(f,E,R){let U,A={};for(let T=0;T<f.length;T++){let $=f[T],w=PL($),I="";if(R===void 0)I=w;else I=R+"."+w;if(w===E.textNodeName)if(U===void 0)U=$[w];else U+=""+$[w];else if(w===void 0)continue;else if($[w]){let L=FU($[w],E,I),G=NL(L,E);if($[":@"])SL(L,$[":@"],I,E);else if(Object.keys(L).length===1&&L[E.textNodeName]!==void 0&&!E.alwaysCreateTextNode)L=L[E.textNodeName];else if(Object.keys(L).length===0)if(E.alwaysCreateTextNode)L[E.textNodeName]="";else L="";if(A[w]!==void 0&&A.hasOwnProperty(w)){if(!Array.isArray(A[w]))A[w]=[A[w]];A[w].push(L)}else if(E.isArray(w,I,G))A[w]=[L];else A[w]=L}}if(typeof U==="string"){if(U.length>0)A[E.textNodeName]=U}else if(U!==void 0)A[E.textNodeName]=U;return A}function PL(f){let E=Object.keys(f);for(let R=0;R<E.length;R++){let U=E[R];if(U!==":@")return U}}function SL(f,E,R,U){if(E){let A=Object.keys(E),T=A.length;for(let $=0;$<T;$++){let w=A[$];if(U.isArray(w,R+"."+w,!0,!0))f[w]=[E[w]];else f[w]=E[w]}}}function NL(f,E){let{textNodeName:R}=E,U=Object.keys(f).length;if(U===0)return!0;if(U===1&&(f[R]||typeof f[R]==="boolean"||f[R]===0))return!0;return!1}_L.prettify=HL});var ZU=X((ZY,XU)=>{var{buildOptions:bL}=EU(),hL=WU(),{prettify:jL}=OU(),cL=nE();class YU{constructor(f){this.externalEntities={},this.options=bL(f)}parse(f,E){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(E){if(E===!0)E={};let A=cL.validate(f,E);if(A!==!0)throw Error(`${A.err.msg}:${A.err.line}:${A.err.col}`)}let R=new hL(this.options);R.addExternalEntities(this.externalEntities);let U=R.parseXml(f);if(this.options.preserveOrder||U===void 0)return U;else return jL(U,this.options)}addEntity(f,E){if(E.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(E==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=E}}XU.exports=YU});var zU=X((JY,KU)=>{function DL(f,E){let R="";if(E.format&&E.indentBy.length>0)R="\n";return QU(f,E,"",R)}function QU(f,E,R,U){let A="",T=!1;for(let $=0;$<f.length;$++){let w=f[$],I=yL(w);if(I===void 0)continue;let L="";if(R.length===0)L=I;else L=`${R}.${I}`;if(I===E.textNodeName){let Y=w[I];if(!uL(L,E))Y=E.tagValueProcessor(I,Y),Y=BU(Y,E);if(T)A+=U;A+=Y,T=!1;continue}else if(I===E.cdataPropName){if(T)A+=U;A+=`<![CDATA[${w[I][0][E.textNodeName]}]]>`,T=!1;continue}else if(I===E.commentPropName){A+=U+`<!--${w[I][0][E.textNodeName]}-->`,T=!0;continue}else if(I[0]==="?"){let Y=JU(w[":@"],E),Z=I==="?xml"?"":U,J=w[I][0][E.textNodeName];J=J.length!==0?" "+J:"",A+=Z+`<${I}${J}${Y}?>`,T=!0;continue}let G=U;if(G!=="")G+=E.indentBy;let M=JU(w[":@"],E),F=U+`<${I}${M}`,W=QU(w[I],E,L,G);if(E.unpairedTags.indexOf(I)!==-1)if(E.suppressUnpairedNode)A+=F+">";else A+=F+"/>";else if((!W||W.length===0)&&E.suppressEmptyNode)A+=F+"/>";else if(W&&W.endsWith(">"))A+=F+`>${W}${U}</${I}>`;else{if(A+=F+">",W&&U!==""&&(W.includes("/>")||W.includes("</")))A+=U+E.indentBy+W+U;else A+=W;A+=`</${I}>`}T=!0}return A}function yL(f){let E=Object.keys(f);for(let R=0;R<E.length;R++){let U=E[R];if(!f.hasOwnProperty(U))continue;if(U!==":@")return U}}function JU(f,E){let R="";if(f&&!E.ignoreAttributes)for(let U in f){if(!f.hasOwnProperty(U))continue;let A=E.attributeValueProcessor(U,f[U]);if(A=BU(A,E),A===!0&&E.suppressBooleanAttributes)R+=` ${U.substr(E.attributeNamePrefix.length)}`;else R+=` ${U.substr(E.attributeNamePrefix.length)}="${A}"`}return R}function uL(f,E){f=f.substr(0,f.length-E.textNodeName.length-1);let R=f.substr(f.lastIndexOf(".")+1);for(let U in E.stopNodes)if(E.stopNodes[U]===f||E.stopNodes[U]==="*."+R)return!0;return!1}function BU(f,E){if(f&&f.length>0&&E.processEntities)for(let R=0;R<E.entities.length;R++){let U=E.entities[R];f=f.replace(U.regex,U.val)}return f}KU.exports=DL});var VU=X((QY,qU)=>{var pL=zU(),xL={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,E){return E},attributeValueProcessor:function(f,E){return E},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function s(f){if(this.options=Object.assign({},xL,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=gL;if(this.processTextOrObjNode=dL,this.options.format)this.indentate=vL,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}s.prototype.build=function(f){if(this.options.preserveOrder)return pL(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};s.prototype.j2x=function(f,E){let R="",U="";for(let A in f){if(!Object.prototype.hasOwnProperty.call(f,A))continue;if(typeof f[A]==="undefined"){if(this.isAttribute(A))U+=""}else if(f[A]===null)if(this.isAttribute(A))U+="";else if(A[0]==="?")U+=this.indentate(E)+"<"+A+"?"+this.tagEndChar;else U+=this.indentate(E)+"<"+A+"/"+this.tagEndChar;else if(f[A]instanceof Date)U+=this.buildTextValNode(f[A],A,"",E);else if(typeof f[A]!=="object"){let T=this.isAttribute(A);if(T)R+=this.buildAttrPairStr(T,""+f[A]);else if(A===this.options.textNodeName){let $=this.options.tagValueProcessor(A,""+f[A]);U+=this.replaceEntitiesValue($)}else U+=this.buildTextValNode(f[A],A,"",E)}else if(Array.isArray(f[A])){let T=f[A].length,$="",w="";for(let I=0;I<T;I++){let L=f[A][I];if(typeof L==="undefined");else if(L===null)if(A[0]==="?")U+=this.indentate(E)+"<"+A+"?"+this.tagEndChar;else U+=this.indentate(E)+"<"+A+"/"+this.tagEndChar;else if(typeof L==="object")if(this.options.oneListGroup){let G=this.j2x(L,E+1);if($+=G.val,this.options.attributesGroupName&&L.hasOwnProperty(this.options.attributesGroupName))w+=G.attrStr}else $+=this.processTextOrObjNode(L,A,E);else if(this.options.oneListGroup){let G=this.options.tagValueProcessor(A,L);G=this.replaceEntitiesValue(G),$+=G}else $+=this.buildTextValNode(L,A,"",E)}if(this.options.oneListGroup)$=this.buildObjectNode($,A,w,E);U+=$}else if(this.options.attributesGroupName&&A===this.options.attributesGroupName){let T=Object.keys(f[A]),$=T.length;for(let w=0;w<$;w++)R+=this.buildAttrPairStr(T[w],""+f[A][T[w]])}else U+=this.processTextOrObjNode(f[A],A,E)}return{attrStr:R,val:U}};s.prototype.buildAttrPairStr=function(f,E){if(E=this.options.attributeValueProcessor(f,""+E),E=this.replaceEntitiesValue(E),this.options.suppressBooleanAttributes&&E==="true")return" "+f;else return" "+f+'="'+E+'"'};function dL(f,E,R){let U=this.j2x(f,R+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],E,U.attrStr,R);else return this.buildObjectNode(U.val,E,U.attrStr,R)}s.prototype.buildObjectNode=function(f,E,R,U){if(f==="")if(E[0]==="?")return this.indentate(U)+"<"+E+R+"?"+this.tagEndChar;else return this.indentate(U)+"<"+E+R+this.closeTag(E)+this.tagEndChar;else{let A="</"+E+this.tagEndChar,T="";if(E[0]==="?")T="?",A="";if((R||R==="")&&f.indexOf("<")===-1)return this.indentate(U)+"<"+E+R+T+">"+f+A;else if(this.options.commentPropName!==!1&&E===this.options.commentPropName&&T.length===0)return this.indentate(U)+`<!--${f}-->`+this.newLine;else return this.indentate(U)+"<"+E+R+T+this.tagEndChar+f+this.indentate(U)+A}};s.prototype.closeTag=function(f){let E="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)E="/"}else if(this.options.suppressEmptyNode)E="/";else E=`></${f}`;return E};s.prototype.buildTextValNode=function(f,E,R,U){if(this.options.cdataPropName!==!1&&E===this.options.cdataPropName)return this.indentate(U)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&E===this.options.commentPropName)return this.indentate(U)+`<!--${f}-->`+this.newLine;else if(E[0]==="?")return this.indentate(U)+"<"+E+R+"?"+this.tagEndChar;else{let A=this.options.tagValueProcessor(E,f);if(A=this.replaceEntitiesValue(A),A==="")return this.indentate(U)+"<"+E+R+this.closeTag(E)+this.tagEndChar;else return this.indentate(U)+"<"+E+R+">"+A+"</"+E+this.tagEndChar}};s.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let E=0;E<this.options.entities.length;E++){let R=this.options.entities[E];f=f.replace(R.regex,R.val)}return f};function vL(f){return this.options.indentBy.repeat(f)}function gL(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1}qU.exports=s});var HU=X((BY,CU)=>{var sL=nE(),nL=ZU(),rL=VU();CU.exports={XMLParser:nL,XMLValidator:sL,XMLBuilder:rL}});var bU=X((KY,kU)=>{var{defineProperty:af,getOwnPropertyDescriptor:mL,getOwnPropertyNames:oL}=Object,lL=Object.prototype.hasOwnProperty,_=(f,E)=>af(f,"name",{value:E,configurable:!0}),iL=(f,E)=>{for(var R in E)af(f,R,{get:E[R],enumerable:!0})},tL=(f,E,R,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let A of oL(E))if(!lL.call(f,A)&&A!==R)af(f,A,{get:()=>E[A],enumerable:!(U=mL(E,A))||U.enumerable})}return f},eL=(f)=>tL(af({},"__esModule",{value:!0}),f),PU={};iL(PU,{_toBool:()=>fG,_toNum:()=>EG,_toStr:()=>aL,awsExpectUnion:()=>AG,loadRestJsonErrorCode:()=>$G,loadRestXmlErrorCode:()=>GG,parseJsonBody:()=>NU,parseJsonErrorBody:()=>TG,parseXmlBody:()=>_U,parseXmlErrorBody:()=>LG});kU.exports=eL(PU);var aL=_((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){let E=new Error(`Received number ${f} where a string was expected.`);return E.name="Warning",console.warn(E),String(f)}if(typeof f==="boolean"){let E=new Error(`Received boolean ${f} where a string was expected.`);return E.name="Warning",console.warn(E),String(f)}return f},"_toStr"),fG=_((f)=>{if(f==null)return f;if(typeof f==="string"){let E=f.toLowerCase();if(f!==""&&E!=="false"&&E!=="true"){let R=new Error(`Received string "${f}" where a boolean was expected.`);R.name="Warning",console.warn(R)}return f!==""&&E!=="false"}return f},"_toBool"),EG=_((f)=>{if(f==null)return f;if(typeof f==="string"){let E=Number(f);if(E.toString()!==f){let R=new Error(`Received string "${f}" where a number was expected.`);return R.name="Warning",console.warn(R),f}return E}return f},"_toNum"),RG=tf(),AG=_((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return RG.expectUnion(f)},"awsExpectUnion"),UG=tf(),SU=_((f,E)=>UG.collectBody(f,E).then((R)=>E.utf8Encoder(R)),"collectBodyString"),NU=_((f,E)=>SU(f,E).then((R)=>{if(R.length)try{return JSON.parse(R)}catch(U){if((U==null?void 0:U.name)==="SyntaxError")Object.defineProperty(U,"$responseBodyText",{value:R});throw U}return{}}),"parseJsonBody"),TG=_(async(f,E)=>{let R=await NU(f,E);return R.message=R.message??R.Message,R},"parseJsonErrorBody"),$G=_((f,E)=>{let R=_((T,$)=>Object.keys(T).find((w)=>w.toLowerCase()===$.toLowerCase()),"findKey"),U=_((T)=>{let $=T;if(typeof $==="number")$=$.toString();if($.indexOf(",")>=0)$=$.split(",")[0];if($.indexOf(":")>=0)$=$.split(":")[0];if($.indexOf("#")>=0)$=$.split("#")[1];return $},"sanitizeErrorCode"),A=R(f.headers,"x-amzn-errortype");if(A!==void 0)return U(f.headers[A]);if(E.code!==void 0)return U(E.code);if(E.__type!==void 0)return U(E.__type)},"loadRestJsonErrorCode"),wG=tf(),IG=HU(),_U=_((f,E)=>SU(f,E).then((R)=>{if(R.length){let U=new IG.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(I,L)=>L.trim()===""&&L.includes("\n")?"":void 0});U.addEntity("#xD","\r"),U.addEntity("#10","\n");let A;try{A=U.parse(R,!0)}catch(I){if(I&&typeof I==="object")Object.defineProperty(I,"$responseBodyText",{value:R});throw I}let T="#text",$=Object.keys(A)[0],w=A[$];if(w[T])w[$]=w[T],delete w[T];return wG.getValueFromTextNode(w)}return{}}),"parseXmlBody"),LG=_(async(f,E)=>{let R=await _U(f,E);if(R.Error)R.Error.message=R.Error.message??R.Error.Message;return R},"parseXmlErrorBody"),GG=_((f,E)=>{var R;if(((R=E==null?void 0:E.Error)==null?void 0:R.Code)!==void 0)return E.Error.Code;if((E==null?void 0:E.Code)!==void 0)return E.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var hU=X((Bf)=>{Object.defineProperty(Bf,"__esModule",{value:!0});var oE=n0();oE.__exportStar(XA(),Bf);oE.__exportStar(qA(),Bf);oE.__exportStar(bU(),Bf)});var IR=X((TT)=>{Object.defineProperty(TT,"__esModule",{value:!0});TT.default=jG;var bG=hG(import.meta.require("crypto"));function hG(f){return f&&f.__esModule?f:{default:f}}var FE=new Uint8Array(256),WE=FE.length;function jG(){if(WE>FE.length-16)bG.default.randomFillSync(FE),WE=0;return FE.slice(WE,WE+=16)}});var IT=X(($T)=>{Object.defineProperty($T,"__esModule",{value:!0});$T.default=void 0;var DG=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;$T.default=DG});var qf=X((LT)=>{Object.defineProperty(LT,"__esModule",{value:!0});LT.default=void 0;var yG=uG(IT());function uG(f){return f&&f.__esModule?f:{default:f}}function pG(f){return typeof f==="string"&&yG.default.test(f)}var xG=pG;LT.default=xG});var Vf=X((WT)=>{Object.defineProperty(WT,"__esModule",{value:!0});WT.default=void 0;WT.unsafeStringify=MT;var dG=vG(qf());function vG(f){return f&&f.__esModule?f:{default:f}}var C=[];for(let f=0;f<256;++f)C.push((f+256).toString(16).slice(1));function MT(f,E=0){return C[f[E+0]]+C[f[E+1]]+C[f[E+2]]+C[f[E+3]]+"-"+C[f[E+4]]+C[f[E+5]]+"-"+C[f[E+6]]+C[f[E+7]]+"-"+C[f[E+8]]+C[f[E+9]]+"-"+C[f[E+10]]+C[f[E+11]]+C[f[E+12]]+C[f[E+13]]+C[f[E+14]]+C[f[E+15]]}function gG(f,E=0){let R=MT(f,E);if(!dG.default(R))throw TypeError("Stringified UUID is invalid");return R}var sG=gG;WT.default=sG});var ZT=X((YT)=>{Object.defineProperty(YT,"__esModule",{value:!0});YT.default=void 0;var rG=oG(IR()),mG=Vf();function oG(f){return f&&f.__esModule?f:{default:f}}var OT,LR,GR=0,MR=0;function lG(f,E,R){let U=E&&R||0,A=E||new Array(16);f=f||{};let T=f.node||OT,$=f.clockseq!==void 0?f.clockseq:LR;if(T==null||$==null){let F=f.random||(f.rng||rG.default)();if(T==null)T=OT=[F[0]|1,F[1],F[2],F[3],F[4],F[5]];if($==null)$=LR=(F[6]<<8|F[7])&16383}let w=f.msecs!==void 0?f.msecs:Date.now(),I=f.nsecs!==void 0?f.nsecs:MR+1,L=w-GR+(I-MR)/1e4;if(L<0&&f.clockseq===void 0)$=$+1&16383;if((L<0||w>GR)&&f.nsecs===void 0)I=0;if(I>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");GR=w,MR=I,LR=$,w+=12219292800000;let G=((w&268435455)*1e4+I)%4294967296;A[U++]=G>>>24&255,A[U++]=G>>>16&255,A[U++]=G>>>8&255,A[U++]=G&255;let M=w/4294967296*1e4&268435455;A[U++]=M>>>8&255,A[U++]=M&255,A[U++]=M>>>24&15|16,A[U++]=M>>>16&255,A[U++]=$>>>8|128,A[U++]=$&255;for(let F=0;F<6;++F)A[U+F]=T[F];return E||mG.unsafeStringify(A)}var iG=lG;YT.default=iG});var WR=X((JT)=>{Object.defineProperty(JT,"__esModule",{value:!0});JT.default=void 0;var tG=eG(qf());function eG(f){return f&&f.__esModule?f:{default:f}}function aG(f){if(!tG.default(f))throw TypeError("Invalid UUID");let E,R=new Uint8Array(16);return R[0]=(E=parseInt(f.slice(0,8),16))>>>24,R[1]=E>>>16&255,R[2]=E>>>8&255,R[3]=E&255,R[4]=(E=parseInt(f.slice(9,13),16))>>>8,R[5]=E&255,R[6]=(E=parseInt(f.slice(14,18),16))>>>8,R[7]=E&255,R[8]=(E=parseInt(f.slice(19,23),16))>>>8,R[9]=E&255,R[10]=(E=parseInt(f.slice(24,36),16))/1099511627776&255,R[11]=E/4294967296&255,R[12]=E>>>24&255,R[13]=E>>>16&255,R[14]=E>>>8&255,R[15]=E&255,R}var fM=aG;JT.default=fM});var FR=X((zT)=>{Object.defineProperty(zT,"__esModule",{value:!0});zT.URL=zT.DNS=void 0;zT.default=TM;var EM=Vf(),RM=AM(WR());function AM(f){return f&&f.__esModule?f:{default:f}}function UM(f){f=unescape(encodeURIComponent(f));let E=[];for(let R=0;R<f.length;++R)E.push(f.charCodeAt(R));return E}var BT="6ba7b810-9dad-11d1-80b4-00c04fd430c8";zT.DNS=BT;var KT="6ba7b811-9dad-11d1-80b4-00c04fd430c8";zT.URL=KT;function TM(f,E,R){function U(A,T,$,w){var I;if(typeof A==="string")A=UM(A);if(typeof T==="string")T=RM.default(T);if(((I=T)===null||I===void 0?void 0:I.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let L=new Uint8Array(16+A.length);if(L.set(T),L.set(A,T.length),L=R(L),L[6]=L[6]&15|E,L[8]=L[8]&63|128,$){w=w||0;for(let G=0;G<16;++G)$[w+G]=L[G];return $}return EM.unsafeStringify(L)}try{U.name=f}catch(A){}return U.DNS=BT,U.URL=KT,U}});var HT=X((VT)=>{Object.defineProperty(VT,"__esModule",{value:!0});VT.default=void 0;var IM=LM(import.meta.require("crypto"));function LM(f){return f&&f.__esModule?f:{default:f}}function GM(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return IM.default.createHash("md5").update(f).digest()}var MM=GM;VT.default=MM});var _T=X((ST)=>{Object.defineProperty(ST,"__esModule",{value:!0});ST.default=void 0;var WM=PT(FR()),FM=PT(HT());function PT(f){return f&&f.__esModule?f:{default:f}}var OM=WM.default("v3",48,FM.default),YM=OM;ST.default=YM});var hT=X((kT)=>{Object.defineProperty(kT,"__esModule",{value:!0});kT.default=void 0;var XM=ZM(import.meta.require("crypto"));function ZM(f){return f&&f.__esModule?f:{default:f}}var JM={randomUUID:XM.default.randomUUID};kT.default=JM});var uT=X((DT)=>{Object.defineProperty(DT,"__esModule",{value:!0});DT.default=void 0;var jT=cT(hT()),QM=cT(IR()),BM=Vf();function cT(f){return f&&f.__esModule?f:{default:f}}function KM(f,E,R){if(jT.default.randomUUID&&!E&&!f)return jT.default.randomUUID();f=f||{};let U=f.random||(f.rng||QM.default)();if(U[6]=U[6]&15|64,U[8]=U[8]&63|128,E){R=R||0;for(let A=0;A<16;++A)E[R+A]=U[A];return E}return BM.unsafeStringify(U)}var zM=KM;DT.default=zM});var dT=X((pT)=>{Object.defineProperty(pT,"__esModule",{value:!0});pT.default=void 0;var qM=VM(import.meta.require("crypto"));function VM(f){return f&&f.__esModule?f:{default:f}}function CM(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return qM.default.createHash("sha1").update(f).digest()}var HM=CM;pT.default=HM});var nT=X((gT)=>{Object.defineProperty(gT,"__esModule",{value:!0});gT.default=void 0;var PM=vT(FR()),SM=vT(dT());function vT(f){return f&&f.__esModule?f:{default:f}}var NM=PM.default("v5",80,SM.default),_M=NM;gT.default=_M});var oT=X((rT)=>{Object.defineProperty(rT,"__esModule",{value:!0});rT.default=void 0;var kM="00000000-0000-0000-0000-000000000000";rT.default=kM});var tT=X((lT)=>{Object.defineProperty(lT,"__esModule",{value:!0});lT.default=void 0;var bM=hM(qf());function hM(f){return f&&f.__esModule?f:{default:f}}function jM(f){if(!bM.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)}var cM=jM;lT.default=cM});var eT=X((c)=>{Object.defineProperty(c,"__esModule",{value:!0});Object.defineProperty(c,"NIL",{enumerable:!0,get:function(){return xM.default}});Object.defineProperty(c,"parse",{enumerable:!0,get:function(){return sM.default}});Object.defineProperty(c,"stringify",{enumerable:!0,get:function(){return gM.default}});Object.defineProperty(c,"v1",{enumerable:!0,get:function(){return DM.default}});Object.defineProperty(c,"v3",{enumerable:!0,get:function(){return yM.default}});Object.defineProperty(c,"v4",{enumerable:!0,get:function(){return uM.default}});Object.defineProperty(c,"v5",{enumerable:!0,get:function(){return pM.default}});Object.defineProperty(c,"validate",{enumerable:!0,get:function(){return vM.default}});Object.defineProperty(c,"version",{enumerable:!0,get:function(){return dM.default}});var DM=x(ZT()),yM=x(_T()),uM=x(uT()),pM=x(nT()),xM=x(oT()),dM=x(tT()),vM=x(qf()),gM=x(Vf()),sM=x(WR());function x(f){return f&&f.__esModule?f:{default:f}}});function OW(f){return f}var Y$=(f)=>(E)=>async(R)=>{if(!k.isInstance(R.request))return E(R);let{request:U}=R,{handlerProtocol:A=""}=f.requestHandler.metadata||{};if(A.indexOf("h2")>=0&&!U.headers[":authority"])delete U.headers.host,U.headers[":authority"]=U.hostname+(U.port?":"+U.port:"");else if(!U.headers.host){let T=U.hostname;if(U.port!=null)T+=`:${U.port}`;U.headers.host=T}return E(R)},X$={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},YW=(f)=>({applyToStack:(E)=>{E.add(Y$(f),X$)}});var Z$=()=>(f,E)=>async(R)=>{try{let U=await f(R),{clientName:A,commandName:T,logger:$,dynamoDbDocumentClientOptions:w={}}=E,{overrideInputFilterSensitiveLog:I,overrideOutputFilterSensitiveLog:L}=w,G=I??E.inputFilterSensitiveLog,M=L??E.outputFilterSensitiveLog,{$metadata:F,...W}=U.output;return $?.info?.({clientName:A,commandName:T,input:G(R.input),output:M(W),metadata:F}),U}catch(U){let{clientName:A,commandName:T,logger:$,dynamoDbDocumentClientOptions:w={}}=E,{overrideInputFilterSensitiveLog:I}=w,L=I??E.inputFilterSensitiveLog;throw $?.error?.({clientName:A,commandName:T,input:L(R.input),error:U,metadata:U.$metadata}),U}},J$={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ZW=(f)=>({applyToStack:(E)=>{E.add(Z$(),J$)}});var BR="X-Amzn-Trace-Id",Q$="AWS_LAMBDA_FUNCTION_NAME",B$="_X_AMZN_TRACE_ID",K$=(f)=>(E)=>async(R)=>{let{request:U}=R;if(!k.isInstance(U)||f.runtime!=="node"||U.headers.hasOwnProperty(BR))return E(R);let A=process.env[Q$],T=process.env[B$],$=(w)=>typeof w==="string"&&w.length>0;if($(A)&&$(T))U.headers[BR]=T;return E({...R,request:U})},z$={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},zW=(f)=>({applyToStack:(E)=>{E.add(K$(f),z$)}});var iR=q(If(),1),JE=void 0;function $1(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}function PW(f){let E=iR.normalizeProvider(f.userAgentAppId??JE);return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent,userAgentAppId:async()=>{let R=await E();if(!$1(R)){let U=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof R!=="string")U?.warn("userAgentAppId must be a string or undefined.");else if(R.length>50)U?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return R}}}class w1{constructor({size:f,params:E}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,E)this.parameters=E}get(f,E){let R=this.hash(f);if(R===!1)return E();if(!this.data.has(R)){if(this.data.size>this.capacity+10){let U=this.data.keys(),A=0;while(!0){let{value:T,done:$}=U.next();if(this.data.delete(T),$||++A>10)break}}this.data.set(R,E())}return this.data.get(R)}size(){return this.data.size}hash(f){let E="",{parameters:R}=this;if(R.length===0)return!1;for(let U of R){let A=String(f[U]??"");if(A.includes("|;"))return!1;E+=A+"|;"}return E}}var I1=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}$"),Lf=(f)=>I1.test(f)||f.startsWith("[")&&f.endsWith("]");var L1=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Gf=(f,E=!1)=>{if(!E)return L1.test(f);let R=f.split(".");for(let U of R)if(!Gf(U))return!1;return!0};var Mf={};var p="endpoints";function b(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`\$${b(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(b).join(", ")})`;return JSON.stringify(f,null,2)}class B extends Error{constructor(f){super(f);this.name="EndpointError"}}var tR=(f,E)=>f===E;var eR=(f)=>{let E=f.split("."),R=[];for(let U of E){let A=U.indexOf("[");if(A!==-1){if(U.indexOf("]")!==U.length-1)throw new B(`Path: '${f}' does not end with ']'`);let T=U.slice(A+1,-1);if(Number.isNaN(parseInt(T)))throw new B(`Invalid array index: '${T}' in path: '${f}'`);if(A!==0)R.push(U.slice(0,A));R.push(T)}else R.push(U)}return R};var kf=(f,E)=>eR(E).reduce((R,U)=>{if(typeof R!=="object")throw new B(`Index '${U}' in '${E}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(R))return R[parseInt(U)];return R[U]},f);var aR=(f)=>f!=null;var f0=(f)=>!f;var bf=q(Pf(),1);var QE={[bf.EndpointURLScheme.HTTP]:80,[bf.EndpointURLScheme.HTTPS]:443},E0=(f)=>{let E=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:F,port:W,protocol:Y="",path:Z="",query:J={}}=f,Q=new URL(`${Y}//${F}${W?`:${W}`:""}${Z}`);return Q.search=Object.entries(J).map(([H,S])=>`${H}=${S}`).join("&"),Q}return new URL(f)}catch(F){return null}})();if(!E)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let R=E.href,{host:U,hostname:A,pathname:T,protocol:$,search:w}=E;if(w)return null;let I=$.slice(0,-1);if(!Object.values(bf.EndpointURLScheme).includes(I))return null;let L=Lf(A),G=R.includes(`${U}:${QE[I]}`)||typeof f==="string"&&f.includes(`${U}:${QE[I]}`),M=`${U}${G?`:${QE[I]}`:""}`;return{scheme:I,authority:M,path:T,normalizedPath:T.endsWith("/")?T:`${T}/`,isIp:L}};var R0=(f,E)=>f===E;var A0=(f,E,R,U)=>{if(E>=R||f.length<R)return null;if(!U)return f.substring(E,R);return f.substring(f.length-R,f.length-E)};var U0=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(E)=>`%${E.charCodeAt(0).toString(16).toUpperCase()}`);var T0={booleanEquals:tR,getAttr:kf,isSet:aR,isValidHostLabel:Gf,not:f0,parseURL:E0,stringEquals:R0,substring:A0,uriEncode:U0};var hf=(f,E)=>{let R=[],U={...E.endpointParams,...E.referenceRecord},A=0;while(A<f.length){let T=f.indexOf("{",A);if(T===-1){R.push(f.slice(A));break}R.push(f.slice(A,T));let $=f.indexOf("}",T);if($===-1){R.push(f.slice(T));break}if(f[T+1]==="{"&&f[$+1]==="}")R.push(f.slice(T+1,$)),A=$+2;let w=f.substring(T+1,$);if(w.includes("#")){let[I,L]=w.split("#");R.push(kf(U[I],L))}else R.push(U[w]);A=$+1}return R.join("")};var $0=({ref:f},E)=>{return{...E.endpointParams,...E.referenceRecord}[f]};var v=(f,E,R)=>{if(typeof f==="string")return hf(f,R);else if(f.fn)return jf(f,R);else if(f.ref)return $0(f,R);throw new B(`'${E}': ${String(f)} is not a string, function or reference.`)};var jf=({fn:f,argv:E},R)=>{let U=E.map((T)=>["boolean","number"].includes(typeof T)?T:v(T,"arg",R)),A=f.split(".");if(A[0]in Mf&&A[1]!=null)return Mf[A[0]][A[1]](...U);return T0[f](...U)};var w0=({assign:f,...E},R)=>{if(f&&f in R.referenceRecord)throw new B(`'${f}' is already defined in Reference Record.`);let U=jf(E,R);return R.logger?.debug?.(`${p} evaluateCondition: ${b(E)} = ${b(U)}`),{result:U===""?!0:!!U,...f!=null&&{toAssign:{name:f,value:U}}}};var t=(f=[],E)=>{let R={};for(let U of f){let{result:A,toAssign:T}=w0(U,{...E,referenceRecord:{...E.referenceRecord,...R}});if(!A)return{result:A};if(T)R[T.name]=T.value,E.logger?.debug?.(`${p} assign: ${T.name} := ${b(T.value)}`)}return{result:!0,referenceRecord:R}};var I0=(f,E)=>Object.entries(f).reduce((R,[U,A])=>({...R,[U]:A.map((T)=>{let $=v(T,"Header value entry",E);if(typeof $!=="string")throw new B(`Header '${U}' value '${$}' is not a string`);return $})}),{});var BE=(f,E)=>{if(Array.isArray(f))return f.map((R)=>BE(R,E));switch(typeof f){case"string":return hf(f,E);case"object":if(f===null)throw new B(`Unexpected endpoint property: ${f}`);return cf(f,E);case"boolean":return f;default:throw new B(`Unexpected endpoint property type: ${typeof f}`)}};var cf=(f,E)=>Object.entries(f).reduce((R,[U,A])=>({...R,[U]:BE(A,E)}),{});var L0=(f,E)=>{let R=v(f,"Endpoint URL",E);if(typeof R==="string")try{return new URL(R)}catch(U){throw console.error(`Failed to construct URL with ${R}`,U),U}throw new B(`Endpoint URL must be a string, got ${typeof R}`)};var G0=(f,E)=>{let{conditions:R,endpoint:U}=f,{result:A,referenceRecord:T}=t(R,E);if(!A)return;let $={...E,referenceRecord:{...E.referenceRecord,...T}},{url:w,properties:I,headers:L}=U;return E.logger?.debug?.(`${p} Resolving endpoint from template: ${b(U)}`),{...L!=null&&{headers:I0(L,$)},...I!=null&&{properties:cf(I,$)},url:L0(w,$)}};var M0=(f,E)=>{let{conditions:R,error:U}=f,{result:A,referenceRecord:T}=t(R,E);if(!A)return;throw new B(v(U,"Error",{...E,referenceRecord:{...E.referenceRecord,...T}}))};var W0=(f,E)=>{let{conditions:R,rules:U}=f,{result:A,referenceRecord:T}=t(R,E);if(!A)return;return Df(U,{...E,referenceRecord:{...E.referenceRecord,...T}})};var Df=(f,E)=>{for(let R of f)if(R.type==="endpoint"){let U=G0(R,E);if(U)return U}else if(R.type==="error")M0(R,E);else if(R.type==="tree"){let U=W0(R,E);if(U)return U}else throw new B(`Unknown endpoint rule: ${R}`);throw new B("Rules evaluation failed")};var G1=(f,E)=>{let{endpointParams:R,logger:U}=E,{parameters:A,rules:T}=f;E.logger?.debug?.(`${p} Initial EndpointParams: ${b(R)}`);let $=Object.entries(A).filter(([,L])=>L.default!=null).map(([L,G])=>[L,G.default]);if($.length>0)for(let[L,G]of $)R[L]=R[L]??G;let w=Object.entries(A).filter(([,L])=>L.required).map(([L])=>L);for(let L of w)if(R[L]==null)throw new B(`Missing required parameter: '${L}'`);let I=Df(T,{endpointParams:R,logger:U,referenceRecord:{}});return E.logger?.debug?.(`${p} Resolved endpoint: ${b(I)}`),I};var KE=(f,E=!1)=>{if(E){for(let R of f.split("."))if(!KE(R))return!1;return!0}if(!Gf(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(Lf(f))return!1;return!0};var F0=(f)=>{let E=f.split(":");if(E.length<6)return null;let[R,U,A,T,$,...w]=E;if(R!=="arn"||U===""||A===""||w.join(":")==="")return null;let I=w.map((L)=>L.split("/")).flat();return{partition:U,service:A,region:T,accountId:$,resourceId:I}};var O0={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var W1=O0,F1="",Y0=(f)=>{let{partitions:E}=W1;for(let U of E){let{regions:A,outputs:T}=U;for(let[$,w]of Object.entries(A))if($===f)return{...T,...w}}for(let U of E){let{regionRegex:A,outputs:T}=U;if(new RegExp(A).test(f))return{...T}}let R=E.find((U)=>U.id==="aws");if(!R)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...R.outputs}};var X0=()=>F1;var O1={isVirtualHostableS3Bucket:KE,parseArn:F0,partition:Y0};Mf.aws=O1;var j=q(hU(),1),MG=/\d{12}\.ddb/;async function jU(f,E,R){if(R.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")j.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof E.retryStrategy==="function"){let T=await E.retryStrategy();if(typeof T.acquireInitialRetryToken==="function")if(T.constructor?.name?.includes("Adaptive"))j.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else j.setFeature(f,"RETRY_MODE_STANDARD","E");else j.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof E.accountIdEndpointMode==="function"){let T=f.endpointV2;if(String(T?.url?.hostname).match(MG))j.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await E.accountIdEndpointMode?.()){case"disabled":j.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":j.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":j.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let A=f.__smithy_context?.selectedHttpAuthScheme?.identity;if(A?.$source){let T=A;if(T.accountId)j.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[$,w]of Object.entries(T.$source??{}))j.setFeature(f,$,w)}}var lE="user-agent",fE="x-amz-user-agent",iE=" ",EE="/",cU=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,DU=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,tE="-";function yU(f){let E="";for(let R in f){let U=f[R];if(E.length+U.length+1<=1024){if(E.length)E+=","+U;else E+=U;continue}break}return E}var WG=(f)=>(E,R)=>async(U)=>{let{request:A}=U;if(!k.isInstance(A))return E(U);let{headers:T}=A,$=R?.userAgent?.map(RE)||[],w=(await f.defaultUserAgentProvider()).map(RE);await jU(R,f,U);let I=R;w.push(`m/${yU(Object.assign({},R.__smithy_context?.features,I.__aws_sdk_context?.features))}`);let L=f?.customUserAgent?.map(RE)||[],G=await f.userAgentAppId();if(G)w.push(RE([`app/${G}`]));let M=X0(),F=(M?[M]:[]).concat([...w,...$,...L]).join(iE),W=[...w.filter((Y)=>Y.startsWith("aws-sdk-")),...L].join(iE);if(f.runtime!=="browser"){if(W)T[fE]=T[fE]?`${T[lE]} ${W}`:W;T[lE]=F}else T[fE]=F;return E({...U,request:A})},RE=(f)=>{let E=f[0].split(EE).map(($)=>$.replace(cU,tE)).join(EE),R=f[1]?.replace(DU,tE),U=E.indexOf(EE),A=E.substring(0,U),T=E.substring(U+1);if(A==="api")T=T.toLowerCase();return[A,T,R].filter(($)=>$&&$.length>0).reduce(($,w,I)=>{switch(I){case 0:return w;case 1:return`${$}/${w}`;default:return`${$}#${w}`}},"")},FG={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},kY=(f)=>({applyToStack:(E)=>{E.add(WG(f),FG)}});var AE=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var eE=(f)=>AE(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var dY=(f)=>{let{region:E,useFipsEndpoint:R}=f;if(!E)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof E==="string")return eE(E);let U=await E();return eE(U)},useFipsEndpoint:async()=>{let U=typeof E==="string"?E:await E();if(AE(U))return!0;return typeof R!=="function"?Promise.resolve(!!R):R()}}};var Uf=(f,E,R)=>{if(!(E in f))return;if(f[E]==="true")return!0;if(f[E]==="false")return!1;throw new Error(`Cannot load ${R} "${E}". Expected "true" or "false", got ${f[E]}.`)};var n;(function(f){f.ENV="env",f.CONFIG="shared config entry"})(n||(n={}));var OG="AWS_USE_DUALSTACK_ENDPOINT",YG="use_dualstack_endpoint";var tY={environmentVariableSelector:(f)=>Uf(f,OG,n.ENV),configFileSelector:(f)=>Uf(f,YG,n.CONFIG),default:!1};var XG="AWS_USE_FIPS_ENDPOINT",ZG="use_fips_endpoint";var f2={environmentVariableSelector:(f)=>Uf(f,XG,n.ENV),configFileSelector:(f)=>Uf(f,ZG,n.CONFIG),default:!1};var JG=q(d(),1);var QG=q(d(),1);var uU={environmentVariableSelector:(f)=>f.AWS_REGION,configFileSelector:(f)=>f.region,default:()=>{throw new Error("Region is missing")}},W2={preferredFile:"credentials"};var pU="content-length";function BG(f){return(E)=>async(R)=>{let U=R.request;if(k.isInstance(U)){let{body:A,headers:T}=U;if(A&&Object.keys(T).map(($)=>$.toLowerCase()).indexOf(pU)===-1)try{let $=f(A);U.headers={...U.headers,[pU]:String($)}}catch($){}}return E({...R,request:U})}}var KG={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},p2=(f)=>({applyToStack:(E)=>{E.add(BG(f.bodyLengthChecker),KG)}});var lU=q(YE(),1);var rU=q(If(),1),mU=q(d(),1);var xU=async(f)=>{let E=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=E.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(HG(E)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!CG(E)||E.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||E.toLowerCase()!==E||E.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},zG=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,qG=/(\d+\.){3}\d+/,VG=/\.\./;var CG=(f)=>zG.test(f)&&!qG.test(f)&&!VG.test(f),HG=(f)=>{let[E,R,U,,,A]=f.split(":"),T=E==="arn"&&f.split(":").length>=6,$=Boolean(T&&R&&U&&A);if(T&&!$)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return $};var dU=(f,E,R)=>{let U=async()=>{let A=R[f]??R[E];if(typeof A==="function")return A();return A};if(f==="credentialScope"||E==="CredentialScope")return async()=>{let A=typeof R.credentials==="function"?await R.credentials():R.credentials;return A?.credentialScope??A?.CredentialScope};if(f==="accountId"||E==="AccountId")return async()=>{let A=typeof R.credentials==="function"?await R.credentials():R.credentials;return A?.accountId??A?.AccountId};if(f==="endpoint"||E==="endpoint")return async()=>{let A=await U();if(A&&typeof A==="object"){if("url"in A)return A.url.href;if("hostname"in A){let{protocol:T,hostname:$,port:w,path:I}=A;return`${T}//${$}${w?":"+w:""}${I}`}}return A};return U};var vU="AWS_ENDPOINT_URL",gU="endpoint_url",sU=(f)=>({environmentVariableSelector:(E)=>{let R=f.split(" ").map((T)=>T.toUpperCase()),U=E[[vU,...R].join("_")];if(U)return U;let A=E[vU];if(A)return A;return},configFileSelector:(E,R)=>{if(R&&E.services){let A=R[["services",E.services].join(aE)];if(A){let T=f.split(" ").map((w)=>w.toLowerCase()),$=A[[T.join("_"),gU].join(aE)];if($)return $}}let U=E[gU];if(U)return U;return},default:void 0});var UE=async(f)=>Kf(sU(f??""))();var TE=(f)=>{if(typeof f==="object"){if("url"in f)return fR(f.url);return f}return fR(f)};var nU=async(f,E,R,U)=>{if(!R.endpoint){let $;if(R.serviceConfiguredEndpoint)$=await R.serviceConfiguredEndpoint();else $=await UE(R.serviceId);if($)R.endpoint=()=>Promise.resolve(TE($))}let A=await PG(f,E,R);if(typeof R.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return R.endpointProvider(A,U)},PG=async(f,E,R)=>{let U={},A=E?.getEndpointParameterInstructions?.()||{};for(let[T,$]of Object.entries(A))switch($.type){case"staticContextParams":U[T]=$.value;break;case"contextParams":U[T]=f[$.name];break;case"clientContextParams":case"builtInParams":U[T]=await dU($.name,T,R)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify($))}if(Object.keys(A).length===0)Object.assign(U,R);if(String(R.serviceId).toLowerCase()==="s3")await xU(U);return U};var oU=({config:f,instructions:E})=>{return(R,U)=>async(A)=>{if(f.endpoint)rU.setFeature(U,"ENDPOINT_OVERRIDE","N");let T=await nU(A.input,{getEndpointParameterInstructions(){return E}},{...f},U);U.endpointV2=T,U.authSchemes=T.properties?.authSchemes;let $=U.authSchemes?.[0];if($){U.signing_region=$.signingRegion,U.signing_service=$.signingName;let I=mU.getSmithyContext(U)?.selectedHttpAuthScheme?.httpAuthOption;if(I)I.signingProperties=Object.assign(I.signingProperties||{},{signing_region:$.signingRegion,signingRegion:$.signingRegion,signing_service:$.signingName,signingName:$.signingName,signingRegionSet:$.signingRegionSet},$.properties)}return R({...A})}};var SG={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:lU.serializerMiddlewareOption.name},$X=(f,E)=>({applyToStack:(R)=>{R.addRelativeTo(oU({config:f,instructions:E}),SG)}});var $E=q(d(),1);var GX=(f)=>{let E=f.tls??!0,{endpoint:R}=f,U=R!=null?async()=>TE(await $E.normalizeProvider(R)()):void 0,T={...f,endpoint:U,tls:E,isCustomEndpoint:!!R,useDualstackEndpoint:$E.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:$E.normalizeProvider(f.useFipsEndpoint??!1)},$=void 0;return T.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!$)$=UE(f.serviceId);return $},T};var wR=q(d(),1);var h;(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(h||(h={}));var l=3,iU=h.STANDARD;var tU=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],eU=["TimeoutError","RequestTimeout","RequestTimeoutException"],aU=[500,502,503,504],fT=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var NG=(f)=>f.$metadata?.clockSkewCorrected,Tf=(f)=>f.$metadata?.httpStatusCode===429||tU.includes(f.name)||f.$retryable?.throttling==!0,wE=(f)=>NG(f)||eU.includes(f.name)||fT.includes(f?.code||"")||aU.includes(f.$metadata?.httpStatusCode||0),ET=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){let E=f.$metadata.httpStatusCode;if(500<=E&&E<=599&&!wE(f))return!0;return!1}return!1};class IE{constructor(f){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=f?.beta??0.7,this.minCapacity=f?.minCapacity??1,this.minFillRate=f?.minFillRate??0.5,this.scaleConstant=f?.scaleConstant??0.4,this.smooth=f?.smooth??0.8;let E=this.getCurrentTimeInSeconds();this.lastThrottleTime=E,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(f){if(!this.enabled)return;if(this.refillTokenBucket(),f>this.currentCapacity){let E=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((R)=>setTimeout(R,E))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){let f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}let E=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+E),this.lastTimestamp=f}updateClientSendingRate(f){let E;if(this.updateMeasuredRate(),Tf(f)){let U=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=U,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),E=this.cubicThrottle(U),this.enableTokenBucket()}else this.calculateTimeWindow(),E=this.cubicSuccess(this.getCurrentTimeInSeconds());let R=Math.min(E,2*this.measuredTxRate);this.updateTokenBucketRate(R)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let f=this.getCurrentTimeInSeconds(),E=Math.floor(f*2)/2;if(this.requestCount++,E>this.lastTxRateBucket){let R=this.requestCount/(E-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(R*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=E}}getPrecise(f){return parseFloat(f.toFixed(8))}}var i=100,zf=20000,ER=500,LE=500,RR=5,AR=10,UR=1,GE="amz-sdk-invocation-id",ME="amz-sdk-request";var RT=()=>{let f=i;return{computeNextBackoffDelay:(U)=>{return Math.floor(Math.min(zf,Math.random()*2**U*f))},setDelayBase:(U)=>{f=U}}};var TR=({retryDelay:f,retryCount:E,retryCost:R})=>{return{getRetryCount:()=>E,getRetryDelay:()=>Math.min(zf,f),getRetryCost:()=>R}};class $f{constructor(f){this.maxAttempts=f,this.mode=h.STANDARD,this.capacity=LE,this.retryBackoffStrategy=RT(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return TR({retryDelay:i,retryCount:0})}async refreshRetryTokenForRetry(f,E){let R=await this.getMaxAttempts();if(this.shouldRetry(f,E,R)){let U=E.errorType;this.retryBackoffStrategy.setDelayBase(U==="THROTTLING"?ER:i);let A=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),T=E.retryAfterHint?Math.max(E.retryAfterHint.getTime()-Date.now()||0,A):A,$=this.getCapacityCost(U);return this.capacity-=$,TR({retryDelay:T,retryCount:f.getRetryCount()+1,retryCost:$})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(LE,this.capacity+(f.getRetryCost()??UR))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${l}`),l}}shouldRetry(f,E,R){return f.getRetryCount()+1<R&&this.capacity>=this.getCapacityCost(E.errorType)&&this.isRetryableError(E.errorType)}getCapacityCost(f){return f==="TRANSIENT"?AR:RR}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}class $R{constructor(f,E){this.maxAttemptsProvider=f,this.mode=h.ADAPTIVE;let{rateLimiter:R}=E??{};this.rateLimiter=R??new IE,this.standardRetryStrategy=new $f(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,E){return this.rateLimiter.updateClientSendingRate(E),this.standardRetryStrategy.refreshRetryTokenForRetry(f,E)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var AT="AWS_MAX_ATTEMPTS",UT="max_attempts",f8={environmentVariableSelector:(f)=>{let E=f[AT];if(!E)return;let R=parseInt(E);if(Number.isNaN(R))throw new Error(`Environment variable ${AT} mast be a number, got "${E}"`);return R},configFileSelector:(f)=>{let E=f[UT];if(!E)return;let R=parseInt(E);if(Number.isNaN(R))throw new Error(`Shared config file entry ${UT} mast be a number, got "${E}"`);return R},default:l},E8=(f)=>{let{retryStrategy:E}=f,R=wR.normalizeProvider(f.maxAttempts??l);return{...f,maxAttempts:R,retryStrategy:async()=>{if(E)return E;if(await wR.normalizeProvider(f.retryMode)()===h.ADAPTIVE)return new $R(R);return new $f(R)}}},_G="AWS_RETRY_MODE",kG="retry_mode",R8={environmentVariableSelector:(f)=>f[_G],configFileSelector:(f)=>f[kG],default:iU};var y=q(eT(),1),B8=y.default.v1,K8=y.default.v3,aT=y.default.v4,z8=y.default.v5,q8=y.default.NIL,V8=y.default.version,C8=y.default.validate,H8=y.default.stringify,P8=y.default.parse;import{Readable as nM}from"stream";var f$=(f)=>f?.body instanceof nM||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var OR=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var rM=(f)=>(E,R)=>async(U)=>{let A=await f.retryStrategy(),T=await f.maxAttempts();if(mM(A)){A=A;let $=await A.acquireInitialRetryToken(R.partition_id),w=new Error,I=0,L=0,{request:G}=U,M=k.isInstance(G);if(M)G.headers[GE]=aT();while(!0)try{if(M)G.headers[ME]=`attempt=${I+1}; max=${T}`;let{response:F,output:W}=await E(U);return A.recordSuccess($),W.$metadata.attempts=I+1,W.$metadata.totalRetryDelay=L,{response:F,output:W}}catch(F){let W=oM(F);if(w=OR(F),M&&f$(G))throw(R.logger instanceof E$?console:R.logger)?.warn("An error was encountered in a non-retryable streaming request."),w;try{$=await A.refreshRetryTokenForRetry($,W)}catch(Z){if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=I+1,w.$metadata.totalRetryDelay=L,w}I=$.getRetryCount();let Y=$.getRetryDelay();L+=Y,await new Promise((Z)=>setTimeout(Z,Y))}}else{if(A=A,A?.mode)R.userAgent=[...R.userAgent||[],["cfg/retry-mode",A.mode]];return A.retry(E,U)}},mM=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",oM=(f)=>{let E={error:f,errorType:lM(f)},R=tM(f.$response);if(R)E.retryAfterHint=R;return E},lM=(f)=>{if(Tf(f))return"THROTTLING";if(wE(f))return"TRANSIENT";if(ET(f))return"SERVER_ERROR";return"CLIENT_ERROR"},iM={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},p8=(f)=>({applyToStack:(E)=>{E.add(rM(f),iM)}}),tM=(f)=>{if(!YR.isInstance(f))return;let E=Object.keys(f.headers).find((T)=>T.toLowerCase()==="retry-after");if(!E)return;let R=f.headers[E],U=Number(R);if(!Number.isNaN(U))return new Date(U*1000);return new Date(R)};import{platform as eM,release as aM}from"os";import{env as A$,versions as fW}from"process";var XR={isCrtAvailable:!1};var R$=()=>{if(XR.isCrtAvailable)return["md/crt-avail"];return null};var P4=({serviceId:f,clientVersion:E})=>{return async(R)=>{let U=[["aws-sdk-js",E],["ua","2.1"],[`os/${eM()}`,aM()],["lang/js"],["md/nodejs",`${fW.node}`]],A=R$();if(A)U.push(A);if(f)U.push([`api/${f}`,E]);if(A$.AWS_EXECUTION_ENV)U.push([`exec-env/${A$.AWS_EXECUTION_ENV}`]);let T=await R?.userAgentAppId?.();return T?[...U,[`app/${T}`]]:[...U]}};var EW="AWS_SDK_UA_APP_ID",RW="sdk-ua-app-id",k4={environmentVariableSelector:(f)=>f[EW],configFileSelector:(f)=>f[RW],default:JE};var Cf=q(ZR(),1),T$=q(ff(),1);import{Buffer as AW}from"buffer";import{createHash as UW,createHmac as TW}from"crypto";class $W{constructor(f,E){this.algorithmIdentifier=f,this.secret=E,this.reset()}update(f,E){this.hash.update(T$.toUint8Array(U$(f,E)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?TW(this.algorithmIdentifier,U$(this.secret)):UW(this.algorithmIdentifier)}}function U$(f,E){if(AW.isBuffer(f))return f;if(typeof f==="string")return Cf.fromString(f,E);if(ArrayBuffer.isView(f))return Cf.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength);return Cf.fromArrayBuffer(f)}import{fstatSync as wW,lstatSync as IW}from"fs";var x4=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return IW(f.path).size;else if(typeof f.fd==="number")return wW(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var M$=q(ZA(),1);var $$="AWS_EXECUTION_ENV",JR="AWS_REGION",QR="AWS_DEFAULT_REGION",w$="AWS_EC2_METADATA_DISABLED",I$=["in-region","cross-region","mobile","standard","legacy"],L$="/latest/meta-data/placement/region";var G$={environmentVariableSelector:(f)=>{return f.AWS_DEFAULTS_MODE},configFileSelector:(f)=>{return f.defaults_mode},default:"legacy"};var i4=({region:f=Kf(uU),defaultsMode:E=Kf(G$)}={})=>M$.memoize(async()=>{let R=typeof E==="function"?await E():E;switch(R?.toLowerCase()){case"auto":return LW(f);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 ${I$.join(", ")}, got ${R}`)}}),LW=async(f)=>{if(f){let E=typeof f==="function"?await f():f,R=await GW();if(!R)return"standard";if(E===R)return"in-region";else return"cross-region"}return"standard"},GW=async()=>{if(process.env[$$]&&(process.env[JR]||process.env[QR]))return process.env[JR]??process.env[QR];if(!process.env[w$])try{let{getInstanceMetadataEndpoint:f,httpRequest:E}=await import("./chunk-n2c2dcxa.js"),R=await f();return(await E({...R,path:L$})).toString()}catch(f){}};var f6=(f)=>{let E=async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");let R=f.region;if(typeof R==="string")return R;return R()};return{setRegion(R){E=R},region(){return E}}},E6=(f)=>{return{region:f.region()}};var W$=q(ZR(),1),WW=/^[A-Za-z0-9+/]*={0,2}$/,Z6=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!WW.exec(f))throw new TypeError("Invalid base64 string.");let E=W$.fromString(f,"base64");return new Uint8Array(E.buffer,E.byteOffset,E.byteLength)};var F$=q(ZR(),1),O$=q(ff(),1),Q6=(f)=>{let E;if(typeof f==="string")E=O$.fromUtf8(f);else E=f;if(typeof E!=="object"||typeof E.byteOffset!=="number"||typeof E.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return F$.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString("base64")};export{OW as M,YW as N,ZW as O,zW as P,d as Q,YE as R,If as S,PW as T,w1 as U,Mf as V,G1 as W,O1 as X,hU as Y,kY as Z,tY as _,f2 as $,uU as aa,W2 as ba,dY as ca,p2 as da,$X as ea,GX as fa,iU as ga,f8 as ha,E8 as ia,R8 as ja,p8 as ka,P4 as la,k4 as ma,$W as na,x4 as oa,Z6 as pa,Q6 as qa,i4 as ra,f6 as sa,E6 as ta};
@@ -1,9 +0,0 @@
1
- import{jb as $}from"./chunk-8gx9at51.js";import{sb as w,tb as z,ub as B}from"./chunk-cm7bwdk9.js";import{wb as X}from"./chunk-gg80s18j.js";import{xb as q}from"./chunk-d2dbhn2h.js";var x=q(X(),1);var J=q(X(),1),k="AWS_EC2_METADATA_DISABLED",Y=async(b)=>{let{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:y,fromContainerMetadata:G,fromInstanceMetadata:K}=await import("./chunk-y0m35t3m.js");if(process.env[y]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:Q}=await import("./chunk-w17d2rbd.js");return J.chain(Q(b),G(b))}if(process.env[k])return async()=>{throw new J.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),K(b)};var Z=!1,T=(b={})=>x.memoize(x.chain(async()=>{if(b.profile??process.env[$]){if(process.env[w]&&process.env[z]){if(!Z)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
2
- Multiple credential sources detected:
3
- Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
4
- This SDK will proceed with the AWS_PROFILE value.
5
-
6
- However, a future version may change this behavior to prefer the ENV static credentials.
7
- Please ensure that your environment only sets either the AWS_PROFILE or the
8
- AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
9
- `),Z=!0}throw new x.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:j,ssoAccountId:y,ssoRegion:G,ssoRoleName:K,ssoSession:Q}=b;if(!j&&!y&&!G&&!K&&!Q)throw new x.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});let{fromSSO:H}=await import("./chunk-y93ke5m6.js");return H(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:j}=await import("./chunk-9zcyq5gh.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:j}=await import("./chunk-5ewcj9vd.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:j}=await import("./chunk-atnw2cq3.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y(b))()},async()=>{throw new x.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),O,v),v=(b)=>b?.expiration!==void 0,O=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{T as L};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{lb as L,rb as M}from"./chunk-cs5k02gt.js";import"./chunk-2wrs9p57.js";import{zb as j}from"./chunk-ppkzf21q.js";import{Bb as O,Db as D}from"./chunk-3wpw5xgd.js";import{Gb as k}from"./chunk-0m218zhk.js";var R=k(j(),1);var G=k(j(),1);var J=(y,w,_)=>{let I={EcsContainer:async(b)=>{let{fromHttp:x}=await import("./chunk-0q0jn0kk.js"),{fromContainerMetadata:E}=await import("./chunk-v25g7h01.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>D(x(b??{}),E(b))().then(C)},Ec2InstanceMetadata:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:x}=await import("./chunk-v25g7h01.js");return async()=>x(b)().then(C)},Environment:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:x}=await import("./chunk-2mhj5ght.js");return async()=>x(b)().then(C)}};if(y in I)return I[y];else throw new O(`Unsupported credential source in profile ${w}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})},C=(y)=>G.setCredentialFeature(y,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var T=(y,{profile:w="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(u(y,{profile:w,logger:_})||v(y,{profile:w,logger:_}))},u=(y,{profile:w,logger:_})=>{let I=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(I)_?.debug?.(` ${w} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return I},v=(y,{profile:w,logger:_})=>{let I=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(I)_?.debug?.(` ${w} isCredentialSourceProfile credential_source=${y.credential_source}`);return I},U=async(y,w,_,I={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let b=w[y];if(!_.roleAssumer){let{getDefaultRoleAssumer:K}=await import("./chunk-dw62d69f.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}let{source_profile:x}=b;if(x&&x in I)throw new O(`Detected a cycle attempting to resolve credentials for profile ${L(_)}. Profiles visited: `+Object.keys(I).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${x?`source_profile=[${x}]`:`profile=[${y}]`}`);let E=x?A(x,w,_,{...I,[x]:!0},Q(w[x]??{})):(await J(b.credential_source,y,_.logger)(_))();if(Q(b))return E.then((K)=>R.setCredentialFeature(K,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let K={RoleArn:b.role_arn,RoleSessionName:b.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:b.external_id,DurationSeconds:parseInt(b.duration_seconds||"3600",10)},{mfa_serial:B}=b;if(B){if(!_.mfaCodeProvider)throw new O(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});K.SerialNumber=B,K.TokenCode=await _.mfaCodeProvider(B)}let h=await E;return _.roleAssumer(h,K).then((m)=>R.setCredentialFeature(m,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},Q=(y)=>{return!y.role_arn&&!!y.credential_source};var V=k(j(),1),W=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",X=async(y,w)=>import("./chunk-hgrs6wcy.js").then(({fromProcess:_})=>_({...y,profile:w})().then((I)=>V.setCredentialFeature(I,"CREDENTIALS_PROFILE_PROCESS","v")));var $=k(j(),1),Y=async(y,w,_={})=>{let{fromSSO:I}=await import("./chunk-9tyaew40.js");return I({profile:y,logger:_.logger})().then((b)=>{if(w.sso_session)return $.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO","r");else return $.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},Z=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var H=k(j(),1),q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,z=async(y,w)=>{w?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let _={accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}};return H.setCredentialFeature(_,"CREDENTIALS_PROFILE","n")};var c=k(j(),1),S=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,F=async(y,w)=>import("./chunk-h5saw32v.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:w.roleAssumerWithWebIdentity,logger:w.logger,parentClientConfig:w.parentClientConfig})().then((I)=>c.setCredentialFeature(I,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var A=async(y,w,_,I={},b=!1)=>{let x=w[y];if(Object.keys(I).length>0&&q(x))return z(x,_);if(b||T(x,{profile:y,logger:_.logger}))return U(y,w,_,I);if(q(x))return z(x,_);if(S(x))return F(x,_);if(W(x))return X(_,y);if(Z(x))return await Y(y,x,_);throw new O(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var by=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let w=await M(y);return A(L(y),w,y)};export{by as fromIni};
@@ -1,5 +0,0 @@
1
- import{sb as p}from"./chunk-ra5sfgg4.js";import{Db as K,Fb as g}from"./chunk-yvmyw2r2.js";var kt=g((sf,Bt)=>{var{defineProperty:B,getOwnPropertyDescriptor:Li,getOwnPropertyNames:zi}=Object,Mi=Object.prototype.hasOwnProperty,Ui=(t,n)=>B(t,"name",{value:n,configurable:!0}),bi=(t,n)=>{for(var e in n)B(t,e,{get:n[e],enumerable:!0})},Ri=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of zi(n))if(!Mi.call(t,r)&&r!==e)B(t,r,{get:()=>n[r],enumerable:!(i=Li(n,r))||i.enumerable})}return t},Di=(t)=>Ri(B({},"__esModule",{value:!0}),t),pt={};bi(pt,{isArrayBuffer:()=>Ai});Bt.exports=Di(pt);var Ai=Ui((t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]","isArrayBuffer")});var V=g((cf,vt)=>{var{defineProperty:k,getOwnPropertyDescriptor:Yi,getOwnPropertyNames:Wi}=Object,Zi=Object.prototype.hasOwnProperty,Ht=(t,n)=>k(t,"name",{value:n,configurable:!0}),Qi=(t,n)=>{for(var e in n)k(t,e,{get:n[e],enumerable:!0})},Ki=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Wi(n))if(!Zi.call(t,r)&&r!==e)k(t,r,{get:()=>n[r],enumerable:!(i=Yi(n,r))||i.enumerable})}return t},Vi=(t)=>Ki(k({},"__esModule",{value:!0}),t),Ot={};Qi(Ot,{fromArrayBuffer:()=>Gi,fromString:()=>ji});vt.exports=Vi(Ot);var Xi=kt(),ft=import.meta.require("buffer"),Gi=Ht((t,n=0,e=t.byteLength-n)=>{if(!Xi.isArrayBuffer(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return ft.Buffer.from(t,n,e)},"fromArrayBuffer"),ji=Ht((t,n)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return n?ft.Buffer.from(t,n):ft.Buffer.from(t)},"fromString")});var qt=g((Pt)=>{Object.defineProperty(Pt,"__esModule",{value:!0});Pt.fromBase64=void 0;var Ji=V(),pi=/^[A-Za-z0-9+/]*={0,2}$/,Bi=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!pi.exec(t))throw new TypeError("Invalid base64 string.");let n=Ji.fromString(t,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)};Pt.fromBase64=Bi});var O=g((hf,en)=>{var{defineProperty:H,getOwnPropertyDescriptor:ki,getOwnPropertyNames:Hi}=Object,Oi=Object.prototype.hasOwnProperty,ht=(t,n)=>H(t,"name",{value:n,configurable:!0}),vi=(t,n)=>{for(var e in n)H(t,e,{get:n[e],enumerable:!0})},Pi=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Hi(n))if(!Oi.call(t,r)&&r!==e)H(t,r,{get:()=>n[r],enumerable:!(i=ki(n,r))||i.enumerable})}return t},mi=(t)=>Pi(H({},"__esModule",{value:!0}),t),_t={};vi(_t,{fromUtf8:()=>nn,toUint8Array:()=>qi,toUtf8:()=>_i});en.exports=mi(_t);var tn=V(),nn=ht((t)=>{let n=tn.fromString(t,"utf8");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),qi=ht((t)=>{if(typeof t==="string")return nn(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)},"toUint8Array"),_i=ht((t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return tn.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("utf8")},"toUtf8")});var cn=g((rn)=>{Object.defineProperty(rn,"__esModule",{value:!0});rn.toBase64=void 0;var tr=V(),nr=O(),er=(t)=>{let n;if(typeof t==="string")n=nr.fromUtf8(t);else n=t;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return tr.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("base64")};rn.toBase64=er});var X=g((df,v)=>{var{defineProperty:fn,getOwnPropertyDescriptor:ir,getOwnPropertyNames:rr}=Object,sr=Object.prototype.hasOwnProperty,ot=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of rr(n))if(!sr.call(t,r)&&r!==e)fn(t,r,{get:()=>n[r],enumerable:!(i=ir(n,r))||i.enumerable})}return t},hn=(t,n,e)=>(ot(t,n,"default"),e&&ot(e,n,"default")),cr=(t)=>ot(fn({},"__esModule",{value:!0}),t),dt={};v.exports=cr(dt);hn(dt,qt(),v.exports);hn(dt,cn(),v.exports)});var un=g((on)=>{Object.defineProperty(on,"__esModule",{value:!0});on.getAwsChunkedEncodingStream=void 0;var fr=import.meta.require("stream"),hr=(t,n)=>{let{base64Encoder:e,bodyLengthChecker:i,checksumAlgorithmFn:r,checksumLocationName:s,streamHasher:c}=n,f=e!==void 0&&r!==void 0&&s!==void 0&&c!==void 0,o=f?c(r,t):void 0,a=new fr.Readable({read:()=>{}});return t.on("data",(x)=>{let h=i(x)||0;a.push(`${h.toString(16)}\r\n`),a.push(x),a.push("\r\n")}),t.on("end",async()=>{if(a.push("0\r\n"),f){let x=e(await o);a.push(`${s}:${x}\r\n`),a.push("\r\n")}a.push(null)}),a};on.getAwsChunkedEncodingStream=hr});var m=g((lf,Cn)=>{var{defineProperty:P,getOwnPropertyDescriptor:or,getOwnPropertyNames:dr}=Object,ur=Object.prototype.hasOwnProperty,R=(t,n)=>P(t,"name",{value:n,configurable:!0}),lr=(t,n)=>{for(var e in n)P(t,e,{get:n[e],enumerable:!0})},ar=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of dr(n))if(!ur.call(t,r)&&r!==e)P(t,r,{get:()=>n[r],enumerable:!(i=or(n,r))||i.enumerable})}return t},wr=(t)=>ar(P({},"__esModule",{value:!0}),t),ln={};lr(ln,{Field:()=>Er,Fields:()=>xr,HttpRequest:()=>Tr,HttpResponse:()=>Cr,IHttpRequest:()=>an.HttpRequest,getHttpHandlerExtensionConfiguration:()=>yr,isValidHostname:()=>Tn,resolveHttpHandlerRuntimeConfig:()=>$r});Cn.exports=wr(ln);var yr=R((t)=>{let n=t.httpHandler;return{setHttpHandler(e){n=e},httpHandler(){return n},updateHttpClientConfig(e,i){n.updateHttpClientConfig(e,i)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),$r=R((t)=>{return{httpHandler:t.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),an=p(),wn=class t{constructor({name:n,kind:e=an.FieldPosition.HEADER,values:i=[]}){this.name=n,this.kind=e,this.values=i}add(n){this.values.push(n)}set(n){this.values=n}remove(n){this.values=this.values.filter((e)=>e!==n)}toString(){return this.values.map((n)=>n.includes(",")||n.includes(" ")?`"${n}"`:n).join(", ")}get(){return this.values}};R(wn,"Field");var Er=wn,yn=class t{constructor({fields:n=[],encoding:e="utf-8"}){this.entries={},n.forEach(this.setField.bind(this)),this.encoding=e}setField(n){this.entries[n.name.toLowerCase()]=n}getField(n){return this.entries[n.toLowerCase()]}removeField(n){delete this.entries[n.toLowerCase()]}getByType(n){return Object.values(this.entries).filter((e)=>e.kind===n)}};R(yn,"Fields");var xr=yn,$n=class t{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){let e=new t({...n,headers:{...n.headers}});if(e.query)e.query=En(e.query);return e}static isInstance(n){if(!n)return!1;let e=n;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query==="object"&&typeof e.headers==="object"}clone(){return t.clone(this)}};R($n,"HttpRequest");var Tr=$n;function En(t){return Object.keys(t).reduce((n,e)=>{let i=t[e];return{...n,[e]:Array.isArray(i)?[...i]:i}},{})}R(En,"cloneQuery");var xn=class t{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;let e=n;return typeof e.statusCode==="number"&&typeof e.headers==="object"}};R(xn,"HttpResponse");var Cr=xn;function Tn(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)}R(Tn,"isValidHostname")});var In=g((af,Fn)=>{var{defineProperty:q,getOwnPropertyDescriptor:gr,getOwnPropertyNames:Sr}=Object,Fr=Object.prototype.hasOwnProperty,ut=(t,n)=>q(t,"name",{value:n,configurable:!0}),Ir=(t,n)=>{for(var e in n)q(t,e,{get:n[e],enumerable:!0})},Nr=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Sr(n))if(!Fr.call(t,r)&&r!==e)q(t,r,{get:()=>n[r],enumerable:!(i=gr(n,r))||i.enumerable})}return t},Lr=(t)=>Nr(q({},"__esModule",{value:!0}),t),gn={};Ir(gn,{escapeUri:()=>Sn,escapeUriPath:()=>Mr});Fn.exports=Lr(gn);var Sn=ut((t)=>encodeURIComponent(t).replace(/[!'()*]/g,zr),"escapeUri"),zr=ut((t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Mr=ut((t)=>t.split("/").map(Sn).join("/"),"escapeUriPath")});var at=g((wf,zn)=>{var{defineProperty:_,getOwnPropertyDescriptor:Ur,getOwnPropertyNames:br}=Object,Rr=Object.prototype.hasOwnProperty,Dr=(t,n)=>_(t,"name",{value:n,configurable:!0}),Ar=(t,n)=>{for(var e in n)_(t,e,{get:n[e],enumerable:!0})},Yr=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of br(n))if(!Rr.call(t,r)&&r!==e)_(t,r,{get:()=>n[r],enumerable:!(i=Ur(n,r))||i.enumerable})}return t},Wr=(t)=>Yr(_({},"__esModule",{value:!0}),t),Nn={};Ar(Nn,{buildQueryString:()=>Ln});zn.exports=Wr(Nn);var lt=In();function Ln(t){let n=[];for(let e of Object.keys(t).sort()){let i=t[e];if(e=lt.escapeUri(e),Array.isArray(i))for(let r=0,s=i.length;r<s;r++)n.push(`${e}=${lt.escapeUri(i[r])}`);else{let r=e;if(i||typeof i==="string")r+=`=${lt.escapeUri(i)}`;n.push(r)}}return n.join("&")}Dr(Ln,"buildQueryString")});var kn=g((yf,Bn)=>{var{create:Zr,defineProperty:G,getOwnPropertyDescriptor:Qr,getOwnPropertyNames:Kr,getPrototypeOf:Vr}=Object,Xr=Object.prototype.hasOwnProperty,S=(t,n)=>G(t,"name",{value:n,configurable:!0}),Gr=(t,n)=>{for(var e in n)G(t,e,{get:n[e],enumerable:!0})},Dn=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Kr(n))if(!Xr.call(t,r)&&r!==e)G(t,r,{get:()=>n[r],enumerable:!(i=Qr(n,r))||i.enumerable})}return t},jr=(t,n,e)=>(e=t!=null?Zr(Vr(t)):{},Dn(n||!t||!t.__esModule?G(e,"default",{value:t,enumerable:!0}):e,t)),Jr=(t)=>Dn(G({},"__esModule",{value:!0}),t),An={};Gr(An,{DEFAULT_REQUEST_TIMEOUT:()=>vr,NodeHttp2Handler:()=>ts,NodeHttpHandler:()=>Pr,streamCollector:()=>es});Bn.exports=Jr(An);var Yn=m(),Wn=at(),wt=import.meta.require("http"),yt=import.meta.require("https"),pr=["ECONNRESET","EPIPE","ETIMEDOUT"],Zn=S((t)=>{let n={};for(let e of Object.keys(t)){let i=t[e];n[e]=Array.isArray(i)?i.join(","):i}return n},"getTransformedHeaders"),Mn=1000,Br=S((t,n,e=0)=>{if(!e)return-1;let i=S((r)=>{let s=setTimeout(()=>{t.destroy(),n(Object.assign(new Error(`Socket timed out without establishing a connection within ${e} ms`),{name:"TimeoutError"}))},e-r),c=S((f)=>{if(f==null?void 0:f.connecting)f.on("connect",()=>{clearTimeout(s)});else clearTimeout(s)},"doWithSocket");if(t.socket)c(t.socket);else t.on("socket",c)},"registerTimeout");if(e<2000)return i(0),0;return setTimeout(i.bind(null,Mn),Mn)},"setConnectionTimeout"),kr=3000,Hr=S((t,{keepAlive:n,keepAliveMsecs:e},i=kr)=>{if(n!==!0)return-1;let r=S(()=>{if(t.socket)t.socket.setKeepAlive(n,e||0);else t.on("socket",(s)=>{s.setKeepAlive(n,e||0)})},"registerListener");if(i===0)return r(),0;return setTimeout(r,i)},"setSocketKeepAlive"),Un=3000,Or=S((t,n,e=0)=>{let i=S((r)=>{t.setTimeout(e-r,()=>{t.destroy(),n(Object.assign(new Error(`Connection timed out after ${e} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<e&&e<6000)return i(0),0;return setTimeout(i.bind(null,e===0?0:Un),Un)},"setSocketTimeout"),Qn=import.meta.require("stream"),bn=1000;async function $t(t,n,e=bn){let i=n.headers??{},r=i.Expect||i.expect,s=-1,c=!1;if(r==="100-continue")await Promise.race([new Promise((f)=>{s=Number(setTimeout(f,Math.max(bn,e)))}),new Promise((f)=>{t.on("continue",()=>{clearTimeout(s),f()}),t.on("error",()=>{c=!0,clearTimeout(s),f()})})]);if(!c)Kn(t,n.body)}S($t,"writeRequestBody");function Kn(t,n){if(n instanceof Qn.Readable){n.pipe(t);return}if(n){if(Buffer.isBuffer(n)||typeof n==="string"){t.end(n);return}let e=n;if(typeof e==="object"&&e.buffer&&typeof e.byteOffset==="number"&&typeof e.byteLength==="number"){t.end(Buffer.from(e.buffer,e.byteOffset,e.byteLength));return}t.end(Buffer.from(n));return}t.end()}S(Kn,"writeBody");var vr=0,Vn=class t{constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,i)=>{if(typeof n==="function")n().then((r)=>{e(this.resolveDefaultConfig(r))}).catch(i);else e(this.resolveDefaultConfig(n))})}static create(n){if(typeof(n==null?void 0:n.handle)==="function")return n;return new t(n)}static checkSocketUsage(n,e,i=console){var r,s,c;let{sockets:f,requests:o,maxSockets:a}=n;if(typeof a!=="number"||a===1/0)return e;let x=15000;if(Date.now()-x<e)return e;if(f&&o)for(let h in f){let u=((r=f[h])==null?void 0:r.length)??0,l=((s=o[h])==null?void 0:s.length)??0;if(u>=a&&l>=2*a)return(c=i==null?void 0:i.warn)==null||c.call(i,`@smithy/node-http-handler:WARN - socket usage at capacity=${u} and ${l} additional requests are enqueued.
2
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return e}resolveDefaultConfig(n){let{requestTimeout:e,connectionTimeout:i,socketTimeout:r,httpAgent:s,httpsAgent:c}=n||{},f=!0,o=50;return{connectionTimeout:i,requestTimeout:e??r,httpAgent:(()=>{if(s instanceof wt.Agent||typeof(s==null?void 0:s.destroy)==="function")return s;return new wt.Agent({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(c instanceof yt.Agent||typeof(c==null?void 0:c.destroy)==="function")return c;return new yt.Agent({keepAlive:!0,maxSockets:50,...c})})(),logger:console}}destroy(){var n,e,i,r;(e=(n=this.config)==null?void 0:n.httpAgent)==null||e.destroy(),(r=(i=this.config)==null?void 0:i.httpsAgent)==null||r.destroy()}async handle(n,{abortSignal:e}={}){if(!this.config)this.config=await this.configProvider;return new Promise((i,r)=>{let s=void 0,c=[],f=S(async(w)=>{await s,c.forEach(clearTimeout),i(w)},"resolve"),o=S(async(w)=>{await s,c.forEach(clearTimeout),r(w)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e==null?void 0:e.aborted){let w=new Error("Request aborted");w.name="AbortError",o(w);return}let a=n.protocol==="https:",x=a?this.config.httpsAgent:this.config.httpAgent;c.push(setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let h=Wn.buildQueryString(n.query||{}),u=void 0;if(n.username!=null||n.password!=null){let w=n.username??"",T=n.password??"";u=`${w}:${T}`}let l=n.path;if(h)l+=`?${h}`;if(n.fragment)l+=`#${n.fragment}`;let E=n.hostname??"";if(E[0]==="["&&E.endsWith("]"))E=n.hostname.slice(1,-1);else E=n.hostname;let C={headers:n.headers,host:E,method:n.method,path:l,port:n.port,agent:x,auth:u},$=(a?yt.request:wt.request)(C,(w)=>{let T=new Yn.HttpResponse({statusCode:w.statusCode||-1,reason:w.statusMessage,headers:Zn(w.headers),body:w});f({response:T})});if($.on("error",(w)=>{if(pr.includes(w.code))o(Object.assign(w,{name:"TimeoutError"}));else o(w)}),e){let w=S(()=>{$.destroy();let T=new Error("Request aborted");T.name="AbortError",o(T)},"onAbort");if(typeof e.addEventListener==="function"){let T=e;T.addEventListener("abort",w,{once:!0}),$.once("close",()=>T.removeEventListener("abort",w))}else e.onabort=w}c.push(Br($,o,this.config.connectionTimeout)),c.push(Or($,o,this.config.requestTimeout));let d=C.agent;if(typeof d==="object"&&"keepAlive"in d)c.push(Hr($,{keepAlive:d.keepAlive,keepAliveMsecs:d.keepAliveMsecs}));s=$t($,n,this.config.requestTimeout).catch((w)=>{return c.forEach(clearTimeout),r(w)})})}updateHttpClientConfig(n,e){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[n]:e}})}httpHandlerConfigs(){return this.config??{}}};S(Vn,"NodeHttpHandler");var Pr=Vn,Rn=import.meta.require("http2"),mr=jr(import.meta.require("http2")),Xn=class t{constructor(n){this.sessions=[],this.sessions=n??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(n){this.sessions.push(n)}contains(n){return this.sessions.includes(n)}remove(n){this.sessions=this.sessions.filter((e)=>e!==n)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(n){for(let e of this.sessions)if(e===n){if(!e.destroyed)e.destroy()}}};S(Xn,"NodeHttp2ConnectionPool");var qr=Xn,Gn=class t{constructor(n){if(this.sessionCache=new Map,this.config=n,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(n,e){let i=this.getUrlString(n),r=this.sessionCache.get(i);if(r){let o=r.poll();if(o&&!this.config.disableConcurrency)return o}let s=mr.default.connect(i);if(this.config.maxConcurrency)s.settings({maxConcurrentStreams:this.config.maxConcurrency},(o)=>{if(o)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+n.destination.toString())});s.unref();let c=S(()=>{s.destroy(),this.deleteSession(i,s)},"destroySessionCb");if(s.on("goaway",c),s.on("error",c),s.on("frameError",c),s.on("close",()=>this.deleteSession(i,s)),e.requestTimeout)s.setTimeout(e.requestTimeout,c);let f=this.sessionCache.get(i)||new qr;return f.offerLast(s),this.sessionCache.set(i,f),s}deleteSession(n,e){let i=this.sessionCache.get(n);if(!i)return;if(!i.contains(e))return;i.remove(e),this.sessionCache.set(n,i)}release(n,e){var i;let r=this.getUrlString(n);(i=this.sessionCache.get(r))==null||i.offerLast(e)}destroy(){for(let[n,e]of this.sessionCache){for(let i of e){if(!i.destroyed)i.destroy();e.remove(i)}this.sessionCache.delete(n)}}setMaxConcurrentStreams(n){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=n}setDisableConcurrentStreams(n){this.config.disableConcurrency=n}getUrlString(n){return n.destination.toString()}};S(Gn,"NodeHttp2ConnectionManager");var _r=Gn,jn=class t{constructor(n){this.metadata={handlerProtocol:"h2"},this.connectionManager=new _r({}),this.configProvider=new Promise((e,i)=>{if(typeof n==="function")n().then((r)=>{e(r||{})}).catch(i);else e(n||{})})}static create(n){if(typeof(n==null?void 0:n.handle)==="function")return n;return new t(n)}destroy(){this.connectionManager.destroy()}async handle(n,{abortSignal:e}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:i,disableConcurrentStreams:r}=this.config;return new Promise((s,c)=>{var f;let o=!1,a=void 0,x=S(async(F)=>{await a,s(F)},"resolve"),h=S(async(F)=>{await a,c(F)},"reject");if(e==null?void 0:e.aborted){o=!0;let F=new Error("Request aborted");F.name="AbortError",h(F);return}let{hostname:u,method:l,port:E,protocol:C,query:y}=n,$="";if(n.username!=null||n.password!=null){let F=n.username??"",z=n.password??"";$=`${F}:${z}@`}let d=`${C}//${$}${u}${E?`:${E}`:""}`,w={destination:new URL(d)},T=this.connectionManager.lease(w,{requestTimeout:(f=this.config)==null?void 0:f.sessionTimeout,disableConcurrentStreams:r||!1}),I=S((F)=>{if(r)this.destroySession(T);o=!0,h(F)},"rejectWithDestroy"),L=Wn.buildQueryString(y||{}),ct=n.path;if(L)ct+=`?${L}`;if(n.fragment)ct+=`#${n.fragment}`;let N=T.request({...n.headers,[Rn.constants.HTTP2_HEADER_PATH]:ct,[Rn.constants.HTTP2_HEADER_METHOD]:l});if(T.ref(),N.on("response",(F)=>{let z=new Yn.HttpResponse({statusCode:F[":status"]||-1,headers:Zn(F),body:N});if(o=!0,x({response:z}),r)T.close(),this.connectionManager.deleteSession(d,T)}),i)N.setTimeout(i,()=>{N.close();let F=new Error(`Stream timed out because of no activity for ${i} ms`);F.name="TimeoutError",I(F)});if(e){let F=S(()=>{N.close();let z=new Error("Request aborted");z.name="AbortError",I(z)},"onAbort");if(typeof e.addEventListener==="function"){let z=e;z.addEventListener("abort",F,{once:!0}),N.once("close",()=>z.removeEventListener("abort",F))}else e.onabort=F}N.on("frameError",(F,z,Ii)=>{I(new Error(`Frame type id ${F} in stream id ${Ii} has failed with code ${z}.`))}),N.on("error",I),N.on("aborted",()=>{I(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${N.rstCode}.`))}),N.on("close",()=>{if(T.unref(),r)T.destroy();if(!o)I(new Error("Unexpected error: http2 request did not get a response"))}),a=$t(N,n,i)})}updateHttpClientConfig(n,e){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[n]:e}})}httpHandlerConfigs(){return this.config??{}}destroySession(n){if(!n.destroyed)n.destroy()}};S(jn,"NodeHttp2Handler");var ts=jn,Jn=class t extends Qn.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,e,i){this.bufferedBytes.push(n),i()}};S(Jn,"Collector");var ns=Jn,es=S((t)=>{if(is(t))return pn(t);return new Promise((n,e)=>{let i=new ns;t.pipe(i),t.on("error",(r)=>{i.end(),e(r)}),i.on("error",e),i.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.bufferedBytes));n(r)})})},"streamCollector"),is=S((t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream,"isReadableStreamInstance");async function pn(t){let n=[],e=t.getReader(),i=!1,r=0;while(!i){let{done:f,value:o}=await e.read();if(o)n.push(o),r+=o.length;i=f}let s=new Uint8Array(r),c=0;for(let f of n)s.set(f,c),c+=f.length;return s}S(pn,"collectReadableStream")});var _n=g(($f,qn)=>{var{defineProperty:nt,getOwnPropertyDescriptor:rs,getOwnPropertyNames:ss}=Object,cs=Object.prototype.hasOwnProperty,A=(t,n)=>nt(t,"name",{value:n,configurable:!0}),fs=(t,n)=>{for(var e in n)nt(t,e,{get:n[e],enumerable:!0})},hs=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of ss(n))if(!cs.call(t,r)&&r!==e)nt(t,r,{get:()=>n[r],enumerable:!(i=rs(n,r))||i.enumerable})}return t},os=(t)=>hs(nt({},"__esModule",{value:!0}),t),On={};fs(On,{FetchHttpHandler:()=>us,keepAliveSupport:()=>tt,streamCollector:()=>ls});qn.exports=os(On);var Hn=m(),ds=at();function vn(t=0){return new Promise((n,e)=>{if(t)setTimeout(()=>{let i=new Error(`Request did not complete within ${t} ms`);i.name="TimeoutError",e(i)},t)})}A(vn,"requestTimeout");var tt={supported:void 0},Pn=class t{static create(n){if(typeof(n==null?void 0:n.handle)==="function")return n;return new t(n)}constructor(n){if(typeof n==="function")this.configProvider=n().then((e)=>e||{});else this.config=n??{},this.configProvider=Promise.resolve(this.config);if(tt.supported===void 0)tt.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(n,{abortSignal:e}={}){var i;if(!this.config)this.config=await this.configProvider;let r=this.config.requestTimeout,s=this.config.keepAlive===!0,c=this.config.credentials;if(e==null?void 0:e.aborted){let d=new Error("Request aborted");return d.name="AbortError",Promise.reject(d)}let f=n.path,o=ds.buildQueryString(n.query||{});if(o)f+=`?${o}`;if(n.fragment)f+=`#${n.fragment}`;let a="";if(n.username!=null||n.password!=null){let d=n.username??"",w=n.password??"";a=`${d}:${w}@`}let{port:x,method:h}=n,u=`${n.protocol}//${a}${n.hostname}${x?`:${x}`:""}${f}`,l=h==="GET"||h==="HEAD"?void 0:n.body,E={body:l,headers:new Headers(n.headers),method:h,credentials:c};if((i=this.config)==null?void 0:i.cache)E.cache=this.config.cache;if(l)E.duplex="half";if(typeof AbortController!=="undefined")E.signal=e;if(tt.supported)E.keepalive=s;if(typeof this.config.requestInit==="function")Object.assign(E,this.config.requestInit(n));let C=A(()=>{},"removeSignalEventListener"),y=new Request(u,E),$=[fetch(y).then((d)=>{let w=d.headers,T={};for(let L of w.entries())T[L[0]]=L[1];if(d.body==null)return d.blob().then((L)=>({response:new Hn.HttpResponse({headers:T,reason:d.statusText,statusCode:d.status,body:L})}));return{response:new Hn.HttpResponse({headers:T,reason:d.statusText,statusCode:d.status,body:d.body})}}),vn(r)];if(e)$.push(new Promise((d,w)=>{let T=A(()=>{let I=new Error("Request aborted");I.name="AbortError",w(I)},"onAbort");if(typeof e.addEventListener==="function"){let I=e;I.addEventListener("abort",T,{once:!0}),C=A(()=>I.removeEventListener("abort",T),"removeSignalEventListener")}else e.onabort=T}));return Promise.race($).finally(C)}updateHttpClientConfig(n,e){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return i[n]=e,i})}httpHandlerConfigs(){return this.config??{}}};A(Pn,"FetchHttpHandler");var us=Pn,ls=A(async(t)=>{if(typeof Blob==="function"&&t instanceof Blob)return new Uint8Array(await t.arrayBuffer());return mn(t)},"streamCollector");async function mn(t){let n=[],e=t.getReader(),i=!1,r=0;while(!i){let{done:f,value:o}=await e.read();if(o)n.push(o),r+=o.length;i=f}let s=new Uint8Array(r),c=0;for(let f of n)s.set(f,c),c+=f.length;return s}A(mn,"collectStream")});var ce=g((Ef,se)=>{var{defineProperty:et,getOwnPropertyDescriptor:as,getOwnPropertyNames:ws}=Object,ys=Object.prototype.hasOwnProperty,te=(t,n)=>et(t,"name",{value:n,configurable:!0}),$s=(t,n)=>{for(var e in n)et(t,e,{get:n[e],enumerable:!0})},Es=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of ws(n))if(!ys.call(t,r)&&r!==e)et(t,r,{get:()=>n[r],enumerable:!(i=as(n,r))||i.enumerable})}return t},xs=(t)=>Es(et({},"__esModule",{value:!0}),t),ne={};$s(ne,{fromHex:()=>ie,toHex:()=>re});se.exports=xs(ne);var ee={},Et={};for(let t=0;t<256;t++){let n=t.toString(16).toLowerCase();if(n.length===1)n=`0${n}`;ee[t]=n,Et[n]=t}function ie(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2){let i=t.slice(e,e+2).toLowerCase();if(i in Et)n[e/2]=Et[i];else throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return n}te(ie,"fromHex");function re(t){let n="";for(let e=0;e<t.byteLength;e++)n+=ee[t[e]];return n}te(re,"toHex")});var Y=g((fe)=>{Object.defineProperty(fe,"__esModule",{value:!0});fe.isReadableStream=void 0;var Ts=(t)=>{var n;return typeof ReadableStream==="function"&&(((n=t===null||t===void 0?void 0:t.constructor)===null||n===void 0?void 0:n.name)===ReadableStream.name||t instanceof ReadableStream)};fe.isReadableStream=Ts});var we=g((le)=>{Object.defineProperty(le,"__esModule",{value:!0});le.sdkStreamMixin=void 0;var Cs=_n(),gs=X(),Ss=ce(),Fs=O(),oe=Y(),de="The stream has already been transformed.",Is=(t)=>{var n,e;if(!ue(t)&&!oe.isReadableStream(t)){let c=((e=(n=t===null||t===void 0?void 0:t.__proto__)===null||n===void 0?void 0:n.constructor)===null||e===void 0?void 0:e.name)||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${c}`)}let i=!1,r=async()=>{if(i)throw new Error(de);return i=!0,await Cs.streamCollector(t)},s=(c)=>{if(typeof c.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return c.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async(c)=>{let f=await r();if(c==="base64")return gs.toBase64(f);else if(c==="hex")return Ss.toHex(f);else if(c===void 0||c==="utf8"||c==="utf-8")return Fs.toUtf8(f);else if(typeof TextDecoder==="function")return new TextDecoder(c).decode(f);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(i)throw new Error(de);if(i=!0,ue(t))return s(t);else if(oe.isReadableStream(t))return t;else throw new Error(`Cannot transform payload to web stream, got ${t}`)}})};le.sdkStreamMixin=Is;var ue=(t)=>typeof Blob==="function"&&t instanceof Blob});var xe=g(($e)=>{Object.defineProperty($e,"__esModule",{value:!0});$e.sdkStreamMixin=void 0;var Ns=kn(),Ls=V(),xt=import.meta.require("stream"),zs=import.meta.require("util"),Ms=we(),ye="The stream has already been transformed.",Us=(t)=>{var n,e;if(!(t instanceof xt.Readable))try{return Ms.sdkStreamMixin(t)}catch(s){let c=((e=(n=t===null||t===void 0?void 0:t.__proto__)===null||n===void 0?void 0:n.constructor)===null||e===void 0?void 0:e.name)||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${c}`)}let i=!1,r=async()=>{if(i)throw new Error(ye);return i=!0,await Ns.streamCollector(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async(s)=>{let c=await r();if(s===void 0||Buffer.isEncoding(s))return Ls.fromArrayBuffer(c.buffer,c.byteOffset,c.byteLength).toString(s);else return new zs.TextDecoder(s).decode(c)},transformToWebStream:()=>{if(i)throw new Error(ye);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof xt.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return i=!0,xt.Readable.toWeb(t)}})};$e.sdkStreamMixin=Us});var ge=g((Te)=>{Object.defineProperty(Te,"__esModule",{value:!0});Te.splitStream=void 0;async function bs(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}Te.splitStream=bs});var Ne=g((Fe)=>{Object.defineProperty(Fe,"__esModule",{value:!0});Fe.splitStream=void 0;var Se=import.meta.require("stream"),Rs=ge(),Ds=Y();async function As(t){if(Ds.isReadableStream(t))return Rs.splitStream(t);let n=new Se.PassThrough,e=new Se.PassThrough;return t.pipe(n),t.pipe(e),[n,e]}Fe.splitStream=As});var Me=g((Le)=>{Object.defineProperty(Le,"__esModule",{value:!0});Le.headStream=void 0;async function Ys(t,n){var e;let i=0,r=[],s=t.getReader(),c=!1;while(!c){let{done:a,value:x}=await s.read();if(x)r.push(x),i+=(e=x===null||x===void 0?void 0:x.byteLength)!==null&&e!==void 0?e:0;if(i>=n)break;c=a}s.releaseLock();let f=new Uint8Array(Math.min(n,i)),o=0;for(let a of r){if(a.byteLength>f.byteLength-o){f.set(a.subarray(0,f.byteLength-o),o);break}else f.set(a,o);o+=a.length}return f}Le.headStream=Ys});var De=g((be)=>{Object.defineProperty(be,"__esModule",{value:!0});be.headStream=void 0;var Ws=import.meta.require("stream"),Zs=Me(),Qs=Y(),Ks=(t,n)=>{if(Qs.isReadableStream(t))return Zs.headStream(t,n);return new Promise((e,i)=>{let r=new Ue;r.limit=n,t.pipe(r),t.on("error",(s)=>{r.end(),i(s)}),r.on("error",i),r.on("finish",function(){let s=new Uint8Array(Buffer.concat(this.buffers));e(s)})})};be.headStream=Ks;class Ue extends Ws.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(t,n,e){var i;if(this.buffers.push(t),this.bytesBuffered+=(i=t.byteLength)!==null&&i!==void 0?i:0,this.bytesBuffered>=this.limit){let r=this.bytesBuffered-this.limit,s=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=s.subarray(0,s.byteLength-r),this.emit("finish")}e()}}});var Tt=g((Ye)=>{Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ChecksumStream=void 0;var Vs=X(),Xs=import.meta.require("stream");class Ae extends Xs.Duplex{constructor({expectedChecksum:t,checksum:n,source:e,checksumSourceLocation:i,base64Encoder:r}){var s,c;super();if(typeof e.pipe==="function")this.source=e;else throw new Error(`@smithy/util-stream: unsupported source type ${(c=(s=e===null||e===void 0?void 0:e.constructor)===null||s===void 0?void 0:s.name)!==null&&c!==void 0?c:e} in ChecksumStream.`);this.base64Encoder=r!==null&&r!==void 0?r:Vs.toBase64,this.expectedChecksum=t,this.checksum=n,this.checksumSourceLocation=i,this.source.pipe(this)}_read(t){}_write(t,n,e){try{this.checksum.update(t),this.push(t)}catch(i){return e(i)}return e()}async _final(t){try{let n=await this.checksum.digest(),e=this.base64Encoder(n);if(this.expectedChecksum!==e)return t(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${e}" in response header "${this.checksumSourceLocation}".`))}catch(n){return t(n)}return this.push(null),t()}}Ye.ChecksumStream=Ae});var Ve=g((Qe)=>{Object.defineProperty(Qe,"__esModule",{value:!0});Qe.ChecksumStream=void 0;var Gs=typeof ReadableStream==="function"?ReadableStream:function(){};class Ze extends Gs{}Qe.ChecksumStream=Ze});var je=g((Xe)=>{Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createChecksumStream=void 0;var js=X(),Js=Y(),ps=Ve(),Bs=({expectedChecksum:t,checksum:n,source:e,checksumSourceLocation:i,base64Encoder:r})=>{var s,c;if(!Js.isReadableStream(e))throw new Error(`@smithy/util-stream: unsupported source type ${(c=(s=e===null||e===void 0?void 0:e.constructor)===null||s===void 0?void 0:s.name)!==null&&c!==void 0?c:e} in ChecksumStream.`);let f=r!==null&&r!==void 0?r:js.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let o=new TransformStream({start(){},async transform(x,h){n.update(x),h.enqueue(x)},async flush(x){let h=await n.digest(),u=f(h);if(t!==u){let l=new Error(`Checksum mismatch: expected "${t}" but received "${u}" in response header "${i}".`);x.error(l)}else x.terminate()}});e.pipeThrough(o);let a=o.readable;return Object.setPrototypeOf(a,ps.ChecksumStream.prototype),a};Xe.createChecksumStream=Bs});var Be=g((Je)=>{Object.defineProperty(Je,"__esModule",{value:!0});Je.createChecksumStream=void 0;var ks=Y(),Hs=Tt(),Os=je();function vs(t){if(typeof ReadableStream==="function"&&ks.isReadableStream(t.source))return Os.createChecksumStream(t);return new Hs.ChecksumStream(t)}Je.createChecksumStream=vs});var me=g((Uf,U)=>{var{defineProperty:it,getOwnPropertyDescriptor:Ps,getOwnPropertyNames:ms}=Object,qs=Object.prototype.hasOwnProperty,St=(t,n)=>it(t,"name",{value:n,configurable:!0}),_s=(t,n)=>{for(var e in n)it(t,e,{get:n[e],enumerable:!0})},Ct=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of ms(n))if(!qs.call(t,r)&&r!==e)it(t,r,{get:()=>n[r],enumerable:!(i=Ps(n,r))||i.enumerable})}return t},W=(t,n,e)=>(Ct(t,n,"default"),e&&Ct(e,n,"default")),tc=(t)=>Ct(it({},"__esModule",{value:!0}),t),M={};_s(M,{Uint8ArrayBlobAdapter:()=>gt});U.exports=tc(M);var ke=X(),He=O();function Oe(t,n="utf-8"){if(n==="base64")return ke.toBase64(t);return He.toUtf8(t)}St(Oe,"transformToString");function ve(t,n){if(n==="base64")return gt.mutate(ke.fromBase64(t));return gt.mutate(He.fromUtf8(t))}St(ve,"transformFromString");var Pe=class t extends Uint8Array{static fromString(n,e="utf-8"){switch(typeof n){case"string":return ve(n,e);default:throw new Error(`Unsupported conversion from ${typeof n} to Uint8ArrayBlobAdapter.`)}}static mutate(n){return Object.setPrototypeOf(n,t.prototype),n}transformToString(n="utf-8"){return Oe(this,n)}};St(Pe,"Uint8ArrayBlobAdapter");var gt=Pe;W(M,un(),U.exports);W(M,xe(),U.exports);W(M,Ne(),U.exports);W(M,De(),U.exports);W(M,Y(),U.exports);W(M,Be(),U.exports);W(M,Tt(),U.exports)});var j=g((bf,ti)=>{var{defineProperty:Nt,getOwnPropertyDescriptor:nc,getOwnPropertyNames:ec}=Object,ic=Object.prototype.hasOwnProperty,rc=(t,n)=>{for(var e in n)Nt(t,e,{get:n[e],enumerable:!0})},sc=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of ec(n))if(!ic.call(t,r)&&r!==e)Nt(t,r,{get:()=>n[r],enumerable:!(i=nc(n,r))||i.enumerable})}return t},cc=(t)=>sc(Nt({},"__esModule",{value:!0}),t),qe={};rc(qe,{RequestBuilder:()=>_e,collectBody:()=>fc,extendedEncodeURIComponent:()=>It,requestBuilder:()=>dc,resolvedPath:()=>uc});ti.exports=cc(qe);var Ft=me(),fc=async(t=new Uint8Array,n)=>{if(t instanceof Uint8Array)return Ft.Uint8ArrayBlobAdapter.mutate(t);if(!t)return Ft.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let e=n.streamCollector(t);return Ft.Uint8ArrayBlobAdapter.mutate(await e)};function It(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})}var hc=j(),oc=m();function dc(t,n){return new _e(t,n)}var _e=class{constructor(t,n){this.input=t,this.context=n,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:t,protocol:n="https",port:e,path:i}=await this.context.endpoint();this.path=i;for(let r of this.resolvePathStack)r(this.path);return new oc.HttpRequest({protocol:n,hostname:this.hostname||t,port:e,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(t){return this.hostname=t,this}bp(t){return this.resolvePathStack.push((n)=>{this.path=`${(n==null?void 0:n.endsWith("/"))?n.slice(0,-1):n||""}`+t}),this}p(t,n,e,i){return this.resolvePathStack.push((r)=>{this.path=hc.resolvedPath(r,this.input,t,n,e,i)}),this}h(t){return this.headers=t,this}q(t){return this.query=t,this}b(t){return this.body=t,this}m(t){return this.method=t,this}},uc=(t,n,e,i,r,s)=>{if(n!=null&&n[e]!==void 0){let c=i();if(c.length<=0)throw new Error("Empty value provided for input HTTP label: "+e+".");t=t.replace(r,s?c.split("/").map((f)=>It(f)).join("/"):It(c))}else throw new Error("No value provided for input HTTP label: "+e+".");return t}});var D=(t,n)=>{let e=[];if(t)e.push(t);if(n)for(let i of n)e.push(i);return e},b=(t,n)=>{return`${t||"anonymous"}${n&&n.length>0?` (a.k.a. ${n.join(",")})`:""}`},Q=()=>{let t=[],n=[],e=!1,i=new Set,r=(h)=>h.sort((u,l)=>Qt[l.step]-Qt[u.step]||Kt[l.priority||"normal"]-Kt[u.priority||"normal"]),s=(h)=>{let u=!1,l=(E)=>{let C=D(E.name,E.aliases);if(C.includes(h)){u=!0;for(let y of C)i.delete(y);return!1}return!0};return t=t.filter(l),n=n.filter(l),u},c=(h)=>{let u=!1,l=(E)=>{if(E.middleware===h){u=!0;for(let C of D(E.name,E.aliases))i.delete(C);return!1}return!0};return t=t.filter(l),n=n.filter(l),u},f=(h)=>{return t.forEach((u)=>{h.add(u.middleware,{...u})}),n.forEach((u)=>{h.addRelativeTo(u.middleware,{...u})}),h.identifyOnResolve?.(x.identifyOnResolve()),h},o=(h)=>{let u=[];return h.before.forEach((l)=>{if(l.before.length===0&&l.after.length===0)u.push(l);else u.push(...o(l))}),u.push(h),h.after.reverse().forEach((l)=>{if(l.before.length===0&&l.after.length===0)u.push(l);else u.push(...o(l))}),u},a=(h=!1)=>{let u=[],l=[],E={};return t.forEach((y)=>{let $={...y,before:[],after:[]};for(let d of D($.name,$.aliases))E[d]=$;u.push($)}),n.forEach((y)=>{let $={...y,before:[],after:[]};for(let d of D($.name,$.aliases))E[d]=$;l.push($)}),l.forEach((y)=>{if(y.toMiddleware){let $=E[y.toMiddleware];if($===void 0){if(h)return;throw new Error(`${y.toMiddleware} is not found when adding ${b(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}if(y.relation==="after")$.after.push(y);if(y.relation==="before")$.before.push(y)}}),r(u).map(o).reduce((y,$)=>{return y.push(...$),y},[])},x={add:(h,u={})=>{let{name:l,override:E,aliases:C}=u,y={step:"initialize",priority:"normal",middleware:h,...u},$=D(l,C);if($.length>0){if($.some((d)=>i.has(d))){if(!E)throw new Error(`Duplicate middleware name '${b(l,C)}'`);for(let d of $){let w=t.findIndex((I)=>I.name===d||I.aliases?.some((L)=>L===d));if(w===-1)continue;let T=t[w];if(T.step!==y.step||y.priority!==T.priority)throw new Error(`"${b(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${b(l,C)}" middleware with ${y.priority} priority in ${y.step} step.`);t.splice(w,1)}}for(let d of $)i.add(d)}t.push(y)},addRelativeTo:(h,u)=>{let{name:l,override:E,aliases:C}=u,y={middleware:h,...u},$=D(l,C);if($.length>0){if($.some((d)=>i.has(d))){if(!E)throw new Error(`Duplicate middleware name '${b(l,C)}'`);for(let d of $){let w=n.findIndex((I)=>I.name===d||I.aliases?.some((L)=>L===d));if(w===-1)continue;let T=n[w];if(T.toMiddleware!==y.toMiddleware||T.relation!==y.relation)throw new Error(`"${b(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${b(l,C)}" middleware ${y.relation} "${y.toMiddleware}" middleware.`);n.splice(w,1)}}for(let d of $)i.add(d)}n.push(y)},clone:()=>f(Q()),use:(h)=>{h.applyToStack(x)},remove:(h)=>{if(typeof h==="string")return s(h);else return c(h)},removeByTag:(h)=>{let u=!1,l=(E)=>{let{tags:C,name:y,aliases:$}=E;if(C&&C.includes(h)){let d=D(y,$);for(let w of d)i.delete(w);return u=!0,!1}return!0};return t=t.filter(l),n=n.filter(l),u},concat:(h)=>{let u=f(Q());return u.use(h),u.identifyOnResolve(e||u.identifyOnResolve()||(h.identifyOnResolve?.()??!1)),u},applyToStack:f,identify:()=>{return a(!0).map((h)=>{let u=h.step??h.relation+" "+h.toMiddleware;return b(h.name,h.aliases)+" - "+u})},identifyOnResolve(h){if(typeof h==="boolean")e=h;return e},resolve:(h,u)=>{for(let l of a().map((E)=>E.middleware).reverse())h=l(h,u);if(e)console.log(x.identify());return h}};return x},Qt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Kt={high:3,normal:2,low:1};class Ni{constructor(t){this.config=t,this.middlewareStack=Q()}send(t,n,e){let i=typeof n!=="function"?n:void 0,r=typeof n==="function"?n:e,s=i===void 0&&this.config.cacheMiddleware===!0,c;if(s){if(!this.handlers)this.handlers=new WeakMap;let f=this.handlers;if(f.has(t.constructor))c=f.get(t.constructor);else c=t.resolveMiddleware(this.middlewareStack,this.config,i),f.set(t.constructor,c)}else delete this.handlers,c=t.resolveMiddleware(this.middlewareStack,this.config,i);if(r)c(t).then((f)=>r(null,f.output),(f)=>r(f)).catch(()=>{});else return c(t).then((f)=>f.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var Vt=K(p(),1);class Xt{constructor(){this.middlewareStack=Q()}static classBuilder(){return new Gt}resolveMiddlewareWithContext(t,n,e,{middlewareFn:i,clientName:r,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:f,smithyContext:o,additionalContext:a,CommandCtor:x}){for(let C of i.bind(this)(x,t,n,e))this.middlewareStack.use(C);let h=t.concat(this.middlewareStack),{logger:u}=n,l={logger:u,clientName:r,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:f,[Vt.SMITHY_CONTEXT_KEY]:{commandInstance:this,...o},...a},{requestHandler:E}=n;return h.resolve((C)=>E.handle(C.request,e||{}),l)}}class Gt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(t)=>t,this._outputFilterSensitiveLog=(t)=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,e={}){return this._smithyContext={service:t,operation:n,...e},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=(e)=>e,n=(e)=>e){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){let t=this,n;return n=class extends Xt{static getEndpointParameterInstructions(){return t._ep}constructor(...[e]){super();this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=e??{},t._init(this)}resolveMiddleware(e,i,r){return this.resolveMiddlewareWithContext(e,i,r,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}var _c="***SensitiveInformation***";var nf=(t,n)=>{for(let e of Object.keys(t)){let i=t[e],r=async function(c,f,o){let a=new i(c);if(typeof f==="function")this.send(a,f);else if(typeof o==="function"){if(typeof f!=="object")throw new Error(`Expected http options but got ${typeof f}`);this.send(a,f||{},o)}else return this.send(a,f)},s=(e[0].toLowerCase()+e.slice(1)).replace(/Command$/,"");n.prototype[s]=r}};class jt extends Error{constructor(t){super(t.message);Object.setPrototypeOf(this,jt.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}}var Jt=(t,n={})=>{Object.entries(n).filter(([,i])=>i!==void 0).forEach(([i,r])=>{if(t[i]==null||t[i]==="")t[i]=r});let e=t.message||t.Message||"UnknownError";return t.message=e,delete t.Message,t};var lc=K(j(),1);var ac=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string"){let n=parseFloat(t);if(!Number.isNaN(n)){if(String(n)!==String(t))hi.warn(fi(`Expected number but observed string: ${t}`));return n}}if(typeof t==="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)},wc=Math.ceil(340282346638528860000000000000000000000),ni=(t)=>{let n=ac(t);if(n!==void 0&&!Number.isNaN(n)&&n!==1/0&&n!==-1/0){if(Math.abs(n)>wc)throw new TypeError(`Expected 32-bit float, got ${t}`)}return n},yc=(t)=>{if(t===null||t===void 0)return;if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)};var ei=(t)=>Lt(t,32),ii=(t)=>Lt(t,16),ri=(t)=>Lt(t,8),Lt=(t,n)=>{let e=yc(t);if(e!==void 0&&$c(e,n)!==e)throw new TypeError(`Expected ${n}-bit integer, got ${t}`);return e},$c=(t,n)=>{switch(n){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},Af=(t,n)=>{if(t===null||t===void 0){if(n)throw new TypeError(`Expected a non-null value for ${n}`);throw new TypeError("Expected a non-null value")}return t},Yf=(t)=>{if(t===null||t===void 0)return;if(typeof t==="object"&&!Array.isArray(t))return t;let n=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${n}: ${t}`)},Wf=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string")return t;if(["boolean","number","bigint"].includes(typeof t))return hi.warn(fi(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)};var si=(t)=>{if(typeof t=="string")return ni(rt(t));return ni(t)},Ec=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,rt=(t)=>{let n=t.match(Ec);if(n===null||n[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)};var Zf=(t)=>{if(typeof t==="string")return ei(rt(t));return ei(t)},zt=(t)=>{if(typeof t==="string")return ii(rt(t));return ii(t)},ci=(t)=>{if(typeof t==="string")return ri(rt(t));return ri(t)},fi=(t)=>{return String(new TypeError(t).stack||t).split("\n").slice(0,5).filter((n)=>!n.includes("stackTraceWarning")).join("\n")},hi={warn:console.warn};var xc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var Tc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Xf=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let n=Tc.exec(t);if(!n)throw new TypeError("Invalid RFC-3339 date-time value");let[e,i,r,s,c,f,o,a]=n,x=zt(Mt(i)),h=Z(r,"month",1,12),u=Z(s,"day",1,31);return oi(x,h,u,{hours:c,minutes:f,seconds:o,fractionalMilliseconds:a})},Cc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Gf=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let n=Cc.exec(t);if(!n)throw new TypeError("Invalid RFC-3339 date-time value");let[e,i,r,s,c,f,o,a,x]=n,h=zt(Mt(i)),u=Z(r,"month",1,12),l=Z(s,"day",1,31),E=oi(h,u,l,{hours:c,minutes:f,seconds:o,fractionalMilliseconds:a});if(x.toUpperCase()!="Z")E.setTime(E.getTime()-Nc(x));return E},jf=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Jf=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),pf=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);var oi=(t,n,e,i)=>{let r=n-1;return Sc(t,r,e),new Date(Date.UTC(t,r,e,Z(i.hours,"hour",0,23),Z(i.minutes,"minute",0,59),Z(i.seconds,"seconds",0,60),Ic(i.fractionalMilliseconds)))};var gc=[31,28,31,30,31,30,31,31,30,31,30,31],Sc=(t,n,e)=>{let i=gc[n];if(n===1&&Fc(t))i=29;if(e>i)throw new TypeError(`Invalid day for ${xc[n]} in ${t}: ${e}`)},Fc=(t)=>{return t%4===0&&(t%100!==0||t%400===0)},Z=(t,n,e,i)=>{let r=ci(Mt(t));if(r<e||r>i)throw new TypeError(`${n} must be between ${e} and ${i}, inclusive`);return r},Ic=(t)=>{if(t===null||t===void 0)return 0;return si("0."+t)*1000},Nc=(t)=>{let n=t[0],e=1;if(n=="+")e=1;else if(n=="-")e=-1;else throw new TypeError(`Offset direction, ${n}, must be "+" or "-"`);let i=Number(t.substring(1,3)),r=Number(t.substring(4,6));return e*(i*60+r)*60*1000},Mt=(t)=>{let n=0;while(n<t.length-1&&t.charAt(n)==="0")n++;if(n===0)return t;return t.slice(n)};var Lc=({output:t,parsedBody:n,exceptionCtor:e,errorCode:i})=>{let r=zc(t),s=r.httpStatusCode?r.httpStatusCode+"":void 0,c=new e({name:n?.code||n?.Code||i||s||"UnknownError",$fault:"client",$metadata:r});throw Jt(c,n)},Hf=(t)=>{return({output:n,parsedBody:e,errorCode:i})=>{Lc({output:n,parsedBody:e,exceptionCtor:t,errorCode:i})}},zc=(t)=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]});var vf=(t)=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var di=!1,mf=(t)=>{if(t&&!di&&parseInt(t.substring(1,t.indexOf(".")))<16)di=!0};var Mc=K(j(),1);var Ut=K(p(),1);var ui=(t)=>{let n=[];for(let e in Ut.AlgorithmId){let i=Ut.AlgorithmId[e];if(t[i]===void 0)continue;n.push({algorithmId:()=>i,checksumConstructor:()=>t[i]})}return{_checksumAlgorithms:n,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},li=(t)=>{let n={};return t.checksumAlgorithms().forEach((e)=>{n[e.algorithmId()]=e.checksumConstructor()}),n};var ai=(t)=>{let n=t.retryStrategy;return{setRetryStrategy(e){n=e},retryStrategy(){return n}}},wi=(t)=>{let n={};return n.retryStrategy=t.retryStrategy(),n};var rh=(t)=>{return{...ui(t),...ai(t)}};var sh=(t)=>{return{...li(t),...wi(t)}};var oh=(t)=>Array.isArray(t)?t:[t];var lh=(t)=>{return t!=null};var bt=function(){let t=Object.getPrototypeOf(this).constructor,e=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(e,t.prototype),e};bt.prototype=Object.create(String.prototype,{constructor:{value:bt,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(bt,String);class Uc{trace(){}debug(){}info(){}warn(){}error(){}}function bc(t,n,e){let i,r,s;if(typeof n==="undefined"&&typeof e==="undefined")i={},s=t;else if(i=t,typeof n==="function")return r=n,s=e,Rc(i,r,s);else s=n;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){i[c]=s[c];continue}yi(i,null,s,c)}return i}var $h=(t,n)=>{let e={};for(let i in n)yi(e,t,n,i);return e},Rc=(t,n,e)=>{return bc(t,Object.entries(e).reduce((i,[r,s])=>{if(Array.isArray(s))i[r]=s;else if(typeof s==="function")i[r]=[n,s()];else i[r]=[n,s];return i},{}))},yi=(t,n,e,i)=>{if(n!==null){let c=e[i];if(typeof c==="function")c=[,c];let[f=Dc,o=Ac,a=i]=c;if(typeof f==="function"&&f(n[a])||typeof f!=="function"&&!!f)t[i]=o(n[a]);return}let[r,s]=e[i];if(typeof s==="function"){let c,f=r===void 0&&(c=s())!=null,o=typeof r==="function"&&!!r(void 0)||typeof r!=="function"&&!!r;if(f)t[i]=c;else if(o)t[i]=s()}else{let c=r===void 0&&s!=null,f=typeof r==="function"&&!!r(s)||typeof r!=="function"&&!!r;if(c||f)t[i]=s}},Dc=(t)=>t!=null,Ac=(t)=>t;var Yc=K(j(),1);var $i=(t)=>{if(t==null)return{};if(Array.isArray(t))return t.filter((n)=>n!=null).map($i);if(typeof t==="object"){let n={};for(let e of Object.keys(t)){if(t[e]==null)continue;n[e]=$i(t[e])}return n}return t};var Ph=(t)=>{let n=t.httpHandler;return{setHttpHandler(e){n=e},httpHandler(){return n},updateHttpClientConfig(e,i){n.updateHttpClientConfig(e,i)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},mh=(t)=>{return{httpHandler:t.httpHandler()}};var Wc=K(p(),1);class Rt{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){let n=new Rt({...t,headers:{...t.headers}});if(n.query)n.query=Zc(n.query);return n}static isInstance(t){if(!t)return!1;let n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query==="object"&&typeof n.headers==="object"}clone(){return Rt.clone(this)}}function Zc(t){return Object.keys(t).reduce((n,e)=>{let i=t[e];return{...n,[e]:Array.isArray(i)?[...i]:i}},{})}class st{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let n=t;return typeof n.statusCode==="number"&&typeof n.headers==="object"}}var J=(t)=>encodeURIComponent(t).replace(/[!'()*]/g,Qc),Qc=(t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function Dt(t){let n=[];for(let e of Object.keys(t).sort()){let i=t[e];if(e=J(e),Array.isArray(i))for(let r=0,s=i.length;r<s;r++)n.push(`${e}=${J(i[r])}`);else{let r=e;if(i||typeof i==="string")r+=`=${J(i)}`;n.push(r)}}return n.join("&")}import{Agent as Si,request as Xc}from"http";import{Agent as Fi,request as Gc}from"https";var Ei=["ECONNRESET","EPIPE","ETIMEDOUT"];var At=(t)=>{let n={};for(let e of Object.keys(t)){let i=t[e];n[e]=Array.isArray(i)?i.join(","):i}return n};var xi=(t,n,e=0)=>{if(!e)return-1;let i=(r)=>{let s=setTimeout(()=>{t.destroy(),n(Object.assign(new Error(`Socket timed out without establishing a connection within ${e} ms`),{name:"TimeoutError"}))},e-r),c=(f)=>{if(f?.connecting)f.on("connect",()=>{clearTimeout(s)});else clearTimeout(s)};if(t.socket)c(t.socket);else t.on("socket",c)};if(e<2000)return i(0),0;return setTimeout(i.bind(null,1000),1000)};var Ti=(t,{keepAlive:n,keepAliveMsecs:e},i=3000)=>{if(n!==!0)return-1;let r=()=>{if(t.socket)t.socket.setKeepAlive(n,e||0);else t.on("socket",(s)=>{s.setKeepAlive(n,e||0)})};if(i===0)return r(),0;return setTimeout(r,i)};var Ci=(t,n,e=0)=>{let i=(r)=>{t.setTimeout(e-r,()=>{t.destroy(),n(Object.assign(new Error(`Connection timed out after ${e} ms`),{name:"TimeoutError"}))})};if(0<e&&e<6000)return i(0),0;return setTimeout(i.bind(null,e===0?0:3000),3000)};import{Readable as Kc}from"stream";var gi=1000;async function Yt(t,n,e=gi){let i=n.headers??{},r=i.Expect||i.expect,s=-1,c=!1;if(r==="100-continue")await Promise.race([new Promise((f)=>{s=Number(setTimeout(f,Math.max(gi,e)))}),new Promise((f)=>{t.on("continue",()=>{clearTimeout(s),f()}),t.on("error",()=>{c=!0,clearTimeout(s),f()})})]);if(!c)Vc(t,n.body)}function Vc(t,n){if(n instanceof Kc){n.pipe(t);return}if(n){if(Buffer.isBuffer(n)||typeof n==="string"){t.end(n);return}let e=n;if(typeof e==="object"&&e.buffer&&typeof e.byteOffset==="number"&&typeof e.byteLength==="number"){t.end(Buffer.from(e.buffer,e.byteOffset,e.byteLength));return}t.end(Buffer.from(n));return}t.end()}class Wt{static create(t){if(typeof t?.handle==="function")return t;return new Wt(t)}static checkSocketUsage(t,n,e=console){let{sockets:i,requests:r,maxSockets:s}=t;if(typeof s!=="number"||s===1/0)return n;let c=15000;if(Date.now()-c<n)return n;if(i&&r)for(let f in i){let o=i[f]?.length??0,a=r[f]?.length??0;if(o>=s&&a>=2*s)return e?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${o} and ${a} additional requests are enqueued.
4
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
5
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return n}constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((n,e)=>{if(typeof t==="function")t().then((i)=>{n(this.resolveDefaultConfig(i))}).catch(e);else n(this.resolveDefaultConfig(t))})}resolveDefaultConfig(t){let{requestTimeout:n,connectionTimeout:e,socketTimeout:i,httpAgent:r,httpsAgent:s}=t||{},c=!0,f=50;return{connectionTimeout:e,requestTimeout:n??i,httpAgent:(()=>{if(r instanceof Si||typeof r?.destroy==="function")return r;return new Si({keepAlive:!0,maxSockets:50,...r})})(),httpsAgent:(()=>{if(s instanceof Fi||typeof s?.destroy==="function")return s;return new Fi({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:n}={}){if(!this.config)this.config=await this.configProvider;return new Promise((e,i)=>{let r=void 0,s=[],c=async(d)=>{await r,s.forEach(clearTimeout),e(d)},f=async(d)=>{await r,s.forEach(clearTimeout),i(d)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(n?.aborted){let d=new Error("Request aborted");d.name="AbortError",f(d);return}let o=t.protocol==="https:",a=o?this.config.httpsAgent:this.config.httpAgent;s.push(setTimeout(()=>{this.socketWarningTimestamp=Wt.checkSocketUsage(a,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let x=Dt(t.query||{}),h=void 0;if(t.username!=null||t.password!=null){let d=t.username??"",w=t.password??"";h=`${d}:${w}`}let u=t.path;if(x)u+=`?${x}`;if(t.fragment)u+=`#${t.fragment}`;let l=t.hostname??"";if(l[0]==="["&&l.endsWith("]"))l=t.hostname.slice(1,-1);else l=t.hostname;let E={headers:t.headers,host:l,method:t.method,path:u,port:t.port,agent:a,auth:h},y=(o?Gc:Xc)(E,(d)=>{let w=new st({statusCode:d.statusCode||-1,reason:d.statusMessage,headers:At(d.headers),body:d});c({response:w})});if(y.on("error",(d)=>{if(Ei.includes(d.code))f(Object.assign(d,{name:"TimeoutError"}));else f(d)}),n){let d=()=>{y.destroy();let w=new Error("Request aborted");w.name="AbortError",f(w)};if(typeof n.addEventListener==="function"){let w=n;w.addEventListener("abort",d,{once:!0}),y.once("close",()=>w.removeEventListener("abort",d))}else n.onabort=d}s.push(xi(y,f,this.config.connectionTimeout)),s.push(Ci(y,f,this.config.requestTimeout));let $=E.agent;if(typeof $==="object"&&"keepAlive"in $)s.push(Ti(y,{keepAlive:$.keepAlive,keepAliveMsecs:$.keepAliveMsecs}));r=Yt(y,t,this.config.requestTimeout).catch((d)=>{return s.forEach(clearTimeout),i(d)})})}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then((e)=>{return{...e,[t]:n}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as jc}from"stream";class Zt extends jc{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,n,e){this.bufferedBytes.push(t),e()}}var ed=(t)=>{if(Jc(t))return pc(t);return new Promise((n,e)=>{let i=new Zt;t.pipe(i),t.on("error",(r)=>{i.end(),e(r)}),i.on("error",e),i.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.bufferedBytes));n(r)})})},Jc=(t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream;async function pc(t){let n=[],e=t.getReader(),i=!1,r=0;while(!i){let{done:f,value:o}=await e.read();if(o)n.push(o),r+=o.length;i=f}let s=new Uint8Array(r),c=0;for(let f of n)s.set(f,c),c+=f.length;return s}export{Ph as za,mh as Aa,Rt as Ba,st as Ca,m as Da,kt as Ea,O as Fa,In as Ga,ce as Ha,me as Ia,j as Ja,Ni as Ka,Xt as La,_c as Ma,nf as Na,yc as Oa,ei as Pa,Af as Qa,Yf as Ra,Wf as Sa,Zf as Ta,Xf as Ua,Gf as Va,jt as Wa,Jt as Xa,Hf as Ya,vf as Za,mf as _a,Mc as $a,rh as ab,sh as bb,oh as cb,lh as db,Uc as eb,bc as fb,$h as gb,$i as hb,Wt as ib,ed as jb};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kb as N,lb as X,mb as I,pb as R,qb as v}from"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import{vb as ee}from"./chunk-ha75r57f.js";import{wb as h}from"./chunk-gg80s18j.js";import{xb as l}from"./chunk-d2dbhn2h.js";var T=l(h(),1);var K=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var $=l(ee(),1);var u=l(h(),1);var b=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var D={},U=async(e)=>{let{SSOOIDCClient:r}=await import("./chunk-jhvjhf1j.js");if(D[e])return D[e];let s=new r({region:e});return D[e]=s,s};var q=async(e,r)=>{let{CreateTokenCommand:s}=await import("./chunk-jhvjhf1j.js");return(await U(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var W=l(h(),1);var P=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new W.TokenProviderError(`Token is expired. ${_}`,!1)};var j=l(h(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new j.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${_}`,!1)};import{promises as Q}from"fs";var{writeFile:Z}=Q,z=(e,r)=>{let s=X(e),t=JSON.stringify(r,null,2);return Z(s,t)};var J=new Date(0),V=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await v(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);let i=t.sso_session,a=(await R(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);let{sso_start_url:f,sso_region:S}=a,o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${_}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);let{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>b)return c;if(Date.now()-J.getTime()<30000)return P(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{J.setTime(Date.now());let n=await q(o,S);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);let g=new Date(Date.now()+n.expiresIn*1000);try{await z(i,{...o,accessToken:n.accessToken,expiresAt:g.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:g}}catch(n){return P(c),c}};var k=l(h(),1);var y=!1,F=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:m,clientConfig:a,profile:f,logger:S})=>{let o,E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{let w=await V({profile:f})();o={accessToken:w.token,expiresAt:new Date(w.expiration).toISOString()}}catch(w){throw new k.CredentialsProviderError(w.message,{tryNextLink:y,logger:S})}else try{o=await I(e)}catch(w){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:S})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:S});let{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-76g7tr80.js"),g=m||new c(Object.assign({},a??{},{region:a?.region??t})),C;try{C=await g.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(w){throw new k.CredentialsProviderError(w,{tryNextLink:y,logger:S})}let{roleCredentials:{accessKeyId:d,secretAccessKey:O,sessionToken:L,expiration:M,credentialScope:G,accountId:H}={}}=C;if(!d||!O||!L||!M)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:S});let A={accessKeyId:d,secretAccessKey:O,sessionToken:L,expiration:new Date(M),...G&&{credentialScope:G},...H&&{accountId:H}};if(r)$.setCredentialFeature(A,"CREDENTIALS_SSO","s");else $.setCredentialFeature(A,"CREDENTIALS_SSO_LEGACY","u");return A};var Y=l(h(),1),B=(e,r)=>{let{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:m}=e;if(!s||!t||!i||!m)throw new Y.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ie=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:m}=e,{ssoClient:a}=e,f=N(e);if(!r&&!s&&!t&&!i&&!m){let o=(await v(e))[f];if(!o)throw new T.CredentialsProviderError(`Profile ${f} was not found.`,{logger:e.logger});if(!K(o))throw new T.CredentialsProviderError(`Profile ${f} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){let d=(await R(e))[o.sso_session],O=` configurations in profile ${f} and sso-session ${o.sso_session}`;if(t&&t!==d.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==d.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=d.sso_region,o.sso_start_url=d.sso_start_url}let{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:g}=B(o,e.logger);return F({ssoStartUrl:E,ssoSession:g,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:f})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return F({ssoStartUrl:r,ssoSession:m,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:f})};export{B as validateSsoProfile,K as isSsoProfile,Ie as fromSSO};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{lb as E,mb as U,nb as C,qb as N,rb as I}from"./chunk-cs5k02gt.js";import"./chunk-2wrs9p57.js";import{zb as V}from"./chunk-ppkzf21q.js";import{Bb as i,Cb as f}from"./chunk-3wpw5xgd.js";import{Gb as y}from"./chunk-0m218zhk.js";var G=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var D=y(V(),1);var H=300000,h="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var v={},K=async(e)=>{let{SSOOIDCClient:r}=await import("./chunk-5jhkn5by.js");if(v[e])return v[e];let s=new r({region:e});return v[e]=s,s};var b=async(e,r)=>{let{CreateTokenCommand:s}=await import("./chunk-5jhkn5by.js");return(await K(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var A=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new f(`Token is expired. ${h}`,!1)};var m=(e,r,s=!1)=>{if(typeof r==="undefined")throw new f(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${h}`,!1)};import{promises as z}from"fs";var{writeFile:J}=z,q=(e,r)=>{let s=U(e),t=JSON.stringify(r,null,2);return J(s,t)};var W=new Date(0),j=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await I(e),s=E(e),t=r[s];if(!t)throw new f(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new f(`Profile '${s}' is missing required property 'sso_session'.`);let a=t.sso_session,c=(await N(e))[a];if(!c)throw new f(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!c[n])throw new f(`Sso session '${a}' is missing required property '${n}'.`,!1);let{sso_start_url:S,sso_region:p}=c,o;try{o=await C(a)}catch(n){throw new f(`The SSO session token associated with profile=${s} was not found or is invalid. ${h}`,!1)}m("accessToken",o.accessToken),m("expiresAt",o.expiresAt);let{accessToken:x,expiresAt:u}=o,l={token:x,expiration:new Date(u)};if(l.expiration.getTime()-Date.now()>H)return l;if(Date.now()-W.getTime()<30000)return A(l),l;m("clientId",o.clientId,!0),m("clientSecret",o.clientSecret,!0),m("refreshToken",o.refreshToken,!0);try{W.setTime(Date.now());let n=await b(o,p);m("accessToken",n.accessToken),m("expiresIn",n.expiresIn);let _=new Date(Date.now()+n.expiresIn*1000);try{await q(a,{...o,accessToken:n.accessToken,expiresAt:_.toISOString(),refreshToken:n.refreshToken})}catch(O){}return{token:n.accessToken,expiration:_}}catch(n){return A(l),l}};var T=!1,P=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:d,clientConfig:c,profile:S,logger:p})=>{let o,x="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{let g=await j({profile:S})();o={accessToken:g.token,expiresAt:new Date(g.expiration).toISOString()}}catch(g){throw new i(g.message,{tryNextLink:T,logger:p})}else try{o=await C(e)}catch(g){throw new i("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:p})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new i("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:p});let{accessToken:u}=o,{SSOClient:l,GetRoleCredentialsCommand:n}=await import("./chunk-k59kbbvm.js"),_=d||new l(Object.assign({},c??{},{region:c?.region??t})),O;try{O=await _.send(new n({accountId:s,roleName:a,accessToken:u}))}catch(g){throw new i(g,{tryNextLink:T,logger:p})}let{roleCredentials:{accessKeyId:w,secretAccessKey:k,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=O;if(!w||!k||!$||!F)throw new i("SSO returns an invalid temporary credential.",{tryNextLink:T,logger:p});let R={accessKeyId:w,secretAccessKey:k,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}};if(r)D.setCredentialFeature(R,"CREDENTIALS_SSO","s");else D.setCredentialFeature(R,"CREDENTIALS_SSO_LEGACY","u");return R};var X=(e,r)=>{let{sso_start_url:s,sso_account_id:t,sso_region:a,sso_role_name:d}=e;if(!s||!t||!a||!d)throw new i(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Re=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoSession:d}=e,{ssoClient:c}=e,S=E(e);if(!r&&!s&&!t&&!a&&!d){let o=(await I(e))[S];if(!o)throw new i(`Profile ${S} was not found.`,{logger:e.logger});if(!G(o))throw new i(`Profile ${S} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){let w=(await N(e))[o.sso_session],k=` configurations in profile ${S} and sso-session ${o.sso_session}`;if(t&&t!==w.sso_region)throw new i("Conflicting SSO region"+k,{tryNextLink:!1,logger:e.logger});if(r&&r!==w.sso_start_url)throw new i("Conflicting SSO start_url"+k,{tryNextLink:!1,logger:e.logger});o.sso_region=w.sso_region,o.sso_start_url=w.sso_start_url}let{sso_start_url:x,sso_account_id:u,sso_region:l,sso_role_name:n,sso_session:_}=X(o,e.logger);return P({ssoStartUrl:x,ssoSession:_,ssoAccountId:u,ssoRegion:l,ssoRoleName:n,ssoClient:c,clientConfig:e.clientConfig,profile:S})}else if(!r||!s||!t||!a)throw new i('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return P({ssoStartUrl:r,ssoSession:d,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:c,clientConfig:e.clientConfig,profile:S})};export{X as validateSsoProfile,G as isSsoProfile,Re as fromSSO};