@stacksjs/buddy 0.68.1 → 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.
- package/README.md +1 -1
- package/dist/chunk-0ara6h0a.js +2 -0
- package/dist/chunk-0pxb6cz2.js +3 -0
- package/dist/chunk-1v5v7cn7.js +2 -0
- package/dist/chunk-3v3zq8w4.js +2 -0
- package/dist/{chunk-jr4naxsv.js → chunk-3yp4xe8e.js} +1 -1
- package/dist/{chunk-3wpw5xgd.js → chunk-5d1pmfaj.js} +1 -1
- package/dist/chunk-7dhp3rzj.js +61 -0
- package/dist/chunk-8y9rns0z.js +2 -0
- package/dist/chunk-c0awzy8k.js +10 -0
- package/dist/chunk-c6ermrr1.js +3 -0
- package/dist/{chunk-8gx9at51.js → chunk-cdnqz7bt.js} +1 -1
- package/dist/{chunk-27ksm11g.js → chunk-f0ywgmn1.js} +2 -2
- package/dist/chunk-fzqy272g.js +2 -0
- package/dist/chunk-hmvbpz4z.js +25 -0
- package/dist/chunk-kqn7aa4r.js +5442 -0
- package/dist/chunk-n337bav6.js +5 -0
- package/dist/chunk-rez6aknn.js +29 -0
- package/dist/chunk-rvzykrtp.js +10 -0
- package/dist/{chunk-b3wr7cpk.js → chunk-tnqbven5.js} +2 -2
- package/dist/{chunk-25nxsybw.js → chunk-vs0pve8j.js} +2 -2
- package/dist/{chunk-hgrs6wcy.js → chunk-x4zbf5c8.js} +1 -1
- package/dist/{chunk-z1h35hsa.js → chunk-xqcyxfy4.js} +2 -1
- package/dist/{chunk-0q0jn0kk.js → chunk-yajm5bx9.js} +1 -1
- package/dist/chunk-ybkvyfqx.js +2 -0
- package/dist/{chunk-f0ksrase.js → chunk-zmz07e1t.js} +2 -2
- package/dist/chunk-zxexe5eh.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/ports.d.ts +0 -1
- package/dist/queue.d.ts +3 -0
- package/dist/schedule.d.ts +3 -0
- package/dist/search.d.ts +3 -0
- package/package.json +54 -55
- package/dist/chunk-06g79v9j.js +0 -2
- package/dist/chunk-08bm2xax.js +0 -2
- package/dist/chunk-0enrsn65.js +0 -978
- package/dist/chunk-0m218zhk.js +0 -2
- package/dist/chunk-0qvaepnz.js +0 -2
- package/dist/chunk-0yyhz107.js +0 -2
- package/dist/chunk-11vhe2za.js +0 -2
- package/dist/chunk-13143jmy.js +0 -3
- package/dist/chunk-1agj4qty.js +0 -2
- package/dist/chunk-1c4yywmn.js +0 -9
- package/dist/chunk-1e2f0z80.js +0 -2
- package/dist/chunk-1v13dkfw.js +0 -2
- package/dist/chunk-20e0mpcw.js +0 -9
- package/dist/chunk-2mhj5ght.js +0 -2
- package/dist/chunk-2wrs9p57.js +0 -1
- package/dist/chunk-2yj4j69j.js +0 -2
- package/dist/chunk-2ymn50ck.js +0 -2
- package/dist/chunk-3vjfkr7v.js +0 -978
- package/dist/chunk-3y0gapf6.js +0 -2
- package/dist/chunk-4rb5r88h.js +0 -978
- package/dist/chunk-4wb68jfr.js +0 -2
- package/dist/chunk-5ewcj9vd.js +0 -2
- package/dist/chunk-5fm9mfqs.js +0 -2
- package/dist/chunk-5jhkn5by.js +0 -2
- package/dist/chunk-5m9xts4v.js +0 -2
- package/dist/chunk-63pxna7y.js +0 -978
- package/dist/chunk-6sqy7049.js +0 -2
- package/dist/chunk-6yazdvb4.js +0 -2
- package/dist/chunk-746p83dw.js +0 -2
- package/dist/chunk-76g7tr80.js +0 -2
- package/dist/chunk-7fz1p8p3.js +0 -10
- package/dist/chunk-814adsn3.js +0 -2
- package/dist/chunk-831wk0b3.js +0 -2
- package/dist/chunk-833tanrb.js +0 -2
- package/dist/chunk-8cx90pvv.js +0 -2
- package/dist/chunk-8yky4bsd.js +0 -10
- package/dist/chunk-91pnyybg.js +0 -9
- package/dist/chunk-99syj1p0.js +0 -2
- package/dist/chunk-9bxh78vd.js +0 -5
- package/dist/chunk-9jaqey2q.js +0 -2
- package/dist/chunk-9tyaew40.js +0 -2
- package/dist/chunk-9zcyq5gh.js +0 -2
- package/dist/chunk-a4g1e1n0.js +0 -2
- package/dist/chunk-a6g2jk1y.js +0 -2
- package/dist/chunk-aaqd43t5.js +0 -2
- package/dist/chunk-adswb3gq.js +0 -2
- package/dist/chunk-atnw2cq3.js +0 -2
- package/dist/chunk-avdharmq.js +0 -2
- package/dist/chunk-b13gbfg3.js +0 -2
- package/dist/chunk-bngyck4v.js +0 -2
- package/dist/chunk-brb5zthb.js +0 -1
- package/dist/chunk-bx2vf8g7.js +0 -5
- package/dist/chunk-c343n0yt.js +0 -2
- package/dist/chunk-cdwpqzrw.js +0 -2
- package/dist/chunk-cm7bwdk9.js +0 -2
- package/dist/chunk-cs5k02gt.js +0 -1
- package/dist/chunk-cv8f2v27.js +0 -2
- package/dist/chunk-d2dbhn2h.js +0 -2
- package/dist/chunk-d3awsfqm.js +0 -9
- package/dist/chunk-d9q17hb8.js +0 -2
- package/dist/chunk-dw62d69f.js +0 -2
- package/dist/chunk-e8p8v7ca.js +0 -978
- package/dist/chunk-ehhrhkwe.js +0 -9
- package/dist/chunk-enhf12a1.js +0 -2
- package/dist/chunk-f2d9w3nr.js +0 -2
- package/dist/chunk-f3y73e4b.js +0 -6
- package/dist/chunk-fe3xb8z9.js +0 -2
- package/dist/chunk-fg5gh4dn.js +0 -2
- package/dist/chunk-fh4rw8kr.js +0 -5
- package/dist/chunk-fxsv4p5c.js +0 -8
- package/dist/chunk-gg80s18j.js +0 -2
- package/dist/chunk-gjefq0nq.js +0 -2
- package/dist/chunk-h5saw32v.js +0 -2
- package/dist/chunk-ha75r57f.js +0 -8
- package/dist/chunk-hrsat16n.js +0 -8
- package/dist/chunk-hxy5t7tm.js +0 -10
- package/dist/chunk-hzfqtj82.js +0 -2
- package/dist/chunk-j2n86dsz.js +0 -2
- package/dist/chunk-jg68fsnk.js +0 -10
- package/dist/chunk-jhvjhf1j.js +0 -2
- package/dist/chunk-js6y6fm1.js +0 -2
- package/dist/chunk-jtax0mpm.js +0 -2
- package/dist/chunk-k59kbbvm.js +0 -2
- package/dist/chunk-kanz993c.js +0 -2
- package/dist/chunk-kg9abatp.js +0 -2
- package/dist/chunk-kvghsjg7.js +0 -5
- package/dist/chunk-ky8p46ae.js +0 -5
- package/dist/chunk-kzm498bh.js +0 -2
- package/dist/chunk-m4gwjnfh.js +0 -6
- package/dist/chunk-mevackhg.js +0 -9
- package/dist/chunk-msv6dcc2.js +0 -2
- package/dist/chunk-mxdajhb4.js +0 -10
- package/dist/chunk-mxzjn2gs.js +0 -978
- package/dist/chunk-n1bqkqk7.js +0 -10
- package/dist/chunk-n2c2dcxa.js +0 -2
- package/dist/chunk-njtyervf.js +0 -1
- package/dist/chunk-nx1598yr.js +0 -2
- package/dist/chunk-p18kqenr.js +0 -1
- package/dist/chunk-p23aswbf.js +0 -2
- package/dist/chunk-p55ntqj0.js +0 -2
- package/dist/chunk-p5va3trj.js +0 -2
- package/dist/chunk-p88bsqtc.js +0 -10
- package/dist/chunk-p9z7f8c8.js +0 -2
- package/dist/chunk-ppkzf21q.js +0 -8
- package/dist/chunk-prqq5zw2.js +0 -2
- package/dist/chunk-pv6hp18q.js +0 -10
- package/dist/chunk-q9ycfthp.js +0 -2
- package/dist/chunk-qhcx6dmf.js +0 -2
- package/dist/chunk-qma4ysd8.js +0 -9
- package/dist/chunk-qq851psj.js +0 -6
- package/dist/chunk-qqp394c2.js +0 -2
- package/dist/chunk-r6rhrt1p.js +0 -2
- package/dist/chunk-ra5sfgg4.js +0 -2
- package/dist/chunk-rfd43z7p.js +0 -5
- package/dist/chunk-rtfeef82.js +0 -2
- package/dist/chunk-ryjbc6dz.js +0 -5
- package/dist/chunk-s2n3hw0a.js +0 -2
- package/dist/chunk-sk3x55wm.js +0 -2
- package/dist/chunk-sm7vvfqf.js +0 -2
- package/dist/chunk-sqbdav33.js +0 -2
- package/dist/chunk-sy4d4hnx.js +0 -2
- package/dist/chunk-t0b356bb.js +0 -978
- package/dist/chunk-t9wdnzz4.js +0 -6
- package/dist/chunk-v25g7h01.js +0 -2
- package/dist/chunk-v7zy7xda.js +0 -1
- package/dist/chunk-v9kknk69.js +0 -2
- package/dist/chunk-vg4vfkzk.js +0 -6
- package/dist/chunk-vgcre8jy.js +0 -2
- package/dist/chunk-vqyngnj0.js +0 -9
- package/dist/chunk-w17d2rbd.js +0 -6
- package/dist/chunk-x22v9kvb.js +0 -2
- package/dist/chunk-xacjs4ar.js +0 -6
- package/dist/chunk-xmdbxa8w.js +0 -1
- package/dist/chunk-xy6hjazn.js +0 -978
- package/dist/chunk-y0m35t3m.js +0 -2
- package/dist/chunk-y1tre8v8.js +0 -8
- package/dist/chunk-y50mc7dt.js +0 -2
- package/dist/chunk-y93ke5m6.js +0 -2
- package/dist/chunk-yktee4wv.js +0 -1
- package/dist/chunk-yvmyw2r2.js +0 -2
- package/dist/chunk-z6xydw90.js +0 -2
- package/dist/chunk-zak32nab.js +0 -2
- package/dist/stacks +0 -0
package/dist/chunk-r6rhrt1p.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{L as vh}from"./chunk-mevackhg.js";import{$ as Cl,M as E0,N as Q0,O as X0,P as Y0,Q as Fw,R as b,S as Vh,T as Z0,U as Wl,V as Nl,W as Tl,X as Al,Y as Gh,Z as y0,_ as fl,aa as Ol,ba as gl,ca as F0,da as $0,ea as E,fa as V0,ga as xl,ha as il,ia as v0,ja as cl,ka as P0,la as ul,ma as tl,na as h0,oa as l0,pa as al,qa as sl,ra as w0,sa as k0,ta as K0}from"./chunk-8yky4bsd.js";import{ua as f,va as Ll}from"./chunk-sk3x55wm.js";import{$a as J0,Da as qw,Ja as U0,Ka as Q,La as mh,Ma as Jw,Pa as R0,Ra as S,Sa as u,Ua as a0,Va as q0,Wa as T,Xa as s0,Ya as el,Za as pl,_a as uh,ab as D0,db as Rl,hb as ol,ib as nl,wa as S0,xa as m0,ya as L0}from"./chunk-ryjbc6dz.js";import"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import"./chunk-cm7bwdk9.js";import{vb as VG}from"./chunk-ha75r57f.js";import"./chunk-gg80s18j.js";import{xb as J}from"./chunk-d2dbhn2h.js";var O=J(Vh(),1);var Sl=J(Gh(),1),Ih=J(Fw(),1);var ml=async(h,w,l)=>{return{operation:Ih.getSmithyContext(w).operation,region:await Ih.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function $w(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}}function Hl(h){return{schemeId:"smithy.api#noAuth"}}var Jl=(h)=>{let w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(Hl(h));break}case"AssumeRoleWithWebIdentity":{w.push(Hl(h));break}default:w.push($w(h))}return w},Vw=(h)=>({...h,stsClientCtor:A}),Dl=(h)=>{let w=Vw(h);return{...Sl.resolveAwsSdkSigV4Config(w)}};var kl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},k={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Kl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.679.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"vitest run","test:watch":"vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.679.0","@aws-sdk/core":"3.679.0","@aws-sdk/credential-provider-node":"3.679.0","@aws-sdk/middleware-host-header":"3.679.0","@aws-sdk/middleware-logger":"3.679.0","@aws-sdk/middleware-recursion-detection":"3.679.0","@aws-sdk/middleware-user-agent":"3.679.0","@aws-sdk/region-config-resolver":"3.679.0","@aws-sdk/types":"3.679.0","@aws-sdk/util-endpoints":"3.679.0","@aws-sdk/util-user-agent-browser":"3.679.0","@aws-sdk/util-user-agent-node":"3.679.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var Hh=J(Gh(),1);var G0=J(Vh(),1);var rl=J(Gh(),1),_l=J(Vh(),1);var dh=J(qw(),1);var Bl={["required"]:!1,["type"]:"String"},$h={["required"]:!0,default:!1,["type"]:"Boolean"},Vl={["ref"]:"Endpoint"},El={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},D={["ref"]:"Region"},Ql={["fn"]:"aws.partition",["argv"]:[D],assign:"PartitionResult"},vl={["ref"]:"UseFIPS"},Ul={["ref"]:"UseDualStack"},K={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},F={},Xl={conditions:[{["fn"]:"stringEquals",["argv"]:[D,"aws-global"]}],["endpoint"]:K,["type"]:"endpoint"},Pl={["fn"]:"booleanEquals",["argv"]:[vl,!0]},ql={["fn"]:"booleanEquals",["argv"]:[Ul,!0]},Yl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},zl={["ref"]:"PartitionResult"},Zl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[zl,"supportsDualStack"]}]},yl=[{["fn"]:"isSet",["argv"]:[Vl]}],Fl=[Pl],$l=[ql],Uw={version:"1.0",parameters:{Region:Bl,UseDualStack:$h,UseFIPS:$h,Endpoint:Bl,UseGlobalEndpoint:$h},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:yl},El,Ql,{["fn"]:"booleanEquals",["argv"]:[vl,!1]},{["fn"]:"booleanEquals",["argv"]:[Ul,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-northeast-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-south-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-southeast-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-southeast-2"]}],endpoint:K,["type"]:"endpoint"},Xl,{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ca-central-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-central-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-north-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-2"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-3"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"sa-east-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-east-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-east-2"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-west-1"]}],endpoint:K,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-west-2"]}],endpoint:K,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:F},["type"]:"endpoint"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:Fl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:$l,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Vl,properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[El],rules:[{conditions:[Ql],rules:[{conditions:[Pl,ql],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Yl]},Zl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:Fl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Yl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[zl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:F,headers:F},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:$l,rules:[{conditions:[Zl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Xl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:F,headers:F},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Ml=Uw;var Pw=new Wl({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),jl=(h,w={})=>{return Pw.get(h,()=>Tl(Ml,{endpointParams:h,logger:w.logger}))};Nl.aws=Al;var bl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??al,base64Encoder:h?.base64Encoder??sl,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??jl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Jl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new rl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new _l.NoAuthSigner}],logger:h?.logger??new Rl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??Ll,utf8Decoder:h?.utf8Decoder??dh.fromUtf8,utf8Encoder:h?.utf8Encoder??dh.toUtf8}};var I0=(h)=>{pl(process.version);let w=w0(h),l=()=>w().then(el),G=bl(h);return Hh.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??l0,credentialDefaultProvider:h?.credentialDefaultProvider??vh,defaultUserAgentProvider:h?.defaultUserAgentProvider??ul({serviceId:G.serviceId,clientVersion:Kl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(I)=>I.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await vh(H?.__config||{})()),signer:new Hh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new G0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(il),region:h?.region??f(Ol,gl),requestHandler:ol.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...cl,default:async()=>(await l()).retryMode||xl}),sha256:h?.sha256??h0.bind(null,"sha256"),streamCollector:h?.streamCollector??nl,useDualstackEndpoint:h?.useDualstackEndpoint??f(fl),useFipsEndpoint:h?.useFipsEndpoint??f(Cl),userAgentAppId:h?.userAgentAppId??f(tl)}};var d0=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(I){let H=w.findIndex((d)=>d.schemeId===I.schemeId);if(H===-1)w.push(I);else w.splice(H,1,I)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){G=I},credentials(){return G}}},H0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Sh=(h)=>h,B0=(h,w)=>{let l={...Sh(k0(h)),...Sh(J0(h)),...Sh(S0(h)),...Sh(d0(h))};return w.forEach((G)=>G.configure(l)),{...h,...K0(l),...D0(l),...m0(l),...H0(l)}};class A extends U0{constructor(...[h]){let w=I0(h||{}),l=kl(w),G=Z0(l),I=v0(G),H=F0(I),d=E0(H),X=V0(d),z=Dl(X),P=B0(z,h?.extensions||[]);super(P);this.config=P,this.middlewareStack.use(y0(this.config)),this.middlewareStack.use(P0(this.config)),this.middlewareStack.use($0(this.config)),this.middlewareStack.use(Q0(this.config)),this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(Y0(this.config)),this.middlewareStack.use(O.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ml,identityProviderConfigProvider:async(C)=>new O.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(O.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var lw=J(b(),1);class y extends q0{constructor(h){super(h);Object.setPrototypeOf(this,y.prototype)}}class Jh extends y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class kh extends y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Bh extends y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Bh.prototype)}}class Eh extends y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class Qh extends y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Qh.prototype)}}class Xh extends y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Xh.prototype)}}var n=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:mh}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),M0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:mh}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),N0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:mh}}),T0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),A0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}}),j0=(h)=>({...h,...h.Credentials&&{Credentials:n(h.Credentials)}});var q=J(Gh(),1);var r0=async(h,w)=>{let l=R,G;return G=_({...Rw(h,w),[s]:KG,[r]:a}),L(w,l,"/",void 0,G)},_0=async(h,w)=>{let l=R,G;return G=_({...aw(h,w),[s]:BG,[r]:a}),L(w,l,"/",void 0,G)},b0=async(h,w)=>{let l=R,G;return G=_({...sw(h,w),[s]:EG,[r]:a}),L(w,l,"/",void 0,G)},f0=async(h,w)=>{let l=R,G;return G=_({...rw(h,w),[s]:QG,[r]:a}),L(w,l,"/",void 0,G)},C0=async(h,w)=>{let l=R,G;return G=_({..._w(h,w),[s]:XG,[r]:a}),L(w,l,"/",void 0,G)},O0=async(h,w)=>{let l=R,G;return G=_({...bw(h,w),[s]:YG,[r]:a}),L(w,l,"/",void 0,G)},g0=async(h,w)=>{let l=R,G;return G=_({...fw(h,w),[s]:ZG,[r]:a}),L(w,l,"/",void 0,G)},x0=async(h,w)=>{let l=R,G;return G=_({...Cw(h,w),[s]:yG,[r]:a}),L(w,l,"/",void 0,G)},i0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=ew(l.AssumeRoleResult,w),{$metadata:B(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=pw(l.AssumeRoleWithSAMLResult,w),{$metadata:B(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=ow(l.AssumeRoleWithWebIdentityResult,w),{$metadata:B(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=nw(l.DecodeAuthorizationMessageResult,w),{$metadata:B(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=hG(l.GetAccessKeyInfoResult,w),{$metadata:B(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=lG(l.GetCallerIdentityResult,w),{$metadata:B(h),...G}},u0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=wG(l.GetFederationTokenResult,w),{$metadata:B(h),...G}},t0=async(h,w)=>{if(h.statusCode>=300)return j(h,w);let l=await q.parseXmlBody(h.body,w),G={};return G=GG(l.GetSessionTokenResult,w),{$metadata:B(h),...G}},j=async(h,w)=>{let l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=FG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await zw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Aw(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await jw(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Lw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Ww(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Tw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Mw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Nw(l,w);default:let I=l.body;return kG({output:h,parsedBody:I.Error,errorCode:G})}},zw=async(h,w)=>{let l=h.body,G=uw(l.Error,w),I=new Jh({$metadata:B(h),...G});return T(I,l)},Mw=async(h,w)=>{let l=h.body,G=IG(l.Error,w),I=new Qh({$metadata:B(h),...G});return T(I,l)},Ww=async(h,w)=>{let l=h.body,G=dG(l.Error,w),I=new Bh({$metadata:B(h),...G});return T(I,l)},Nw=async(h,w)=>{let l=h.body,G=HG(l.Error,w),I=new Xh({$metadata:B(h),...G});return T(I,l)},Tw=async(h,w)=>{let l=h.body,G=SG(l.Error,w),I=new Eh({$metadata:B(h),...G});return T(I,l)},Aw=async(h,w)=>{let l=h.body,G=mG(l.Error,w),I=new Dh({$metadata:B(h),...G});return T(I,l)},jw=async(h,w)=>{let l=h.body,G=JG(l.Error,w),I=new kh({$metadata:B(h),...G});return T(I,l)},Lw=async(h,w)=>{let l=h.body,G=DG(l.Error,w),I=new Kh({$metadata:B(h),...G});return T(I,l)},Rw=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[c]!=null)l[c]=h[c];if(h[V]!=null){let G=Yh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];if(h[p]!=null){let G=hw(h[p],w);if(h[p]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,H])=>{let d=`Tags.${I}`;l[d]=H})}if(h[ch]!=null){let G=cw(h[ch],w);if(h[ch]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([I,H])=>{let d=`TransitiveTagKeys.${I}`;l[d]=H})}if(h[Mh]!=null)l[Mh]=h[Mh];if(h[e]!=null)l[e]=h[e];if(h[o]!=null)l[o]=h[o];if(h[U]!=null)l[U]=h[U];if(h[rh]!=null){let G=xw(h[rh],w);if(h[rh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([I,H])=>{let d=`ProvidedContexts.${I}`;l[d]=H})}return l},aw=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[ah]!=null)l[ah]=h[ah];if(h[Oh]!=null)l[Oh]=h[Oh];if(h[V]!=null){let G=Yh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];return l},sw=(h,w)=>{let l={};if(h[N]!=null)l[N]=h[N];if(h[c]!=null)l[c]=h[c];if(h[oh]!=null)l[oh]=h[oh];if(h[_h]!=null)l[_h]=h[_h];if(h[V]!=null){let G=Yh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[$]!=null)l[$]=h[$];if(h[Z]!=null)l[Z]=h[Z];return l},rw=(h,w)=>{let l={};if(h[Wh]!=null)l[Wh]=h[Wh];return l},_w=(h,w)=>{let l={};if(h[g]!=null)l[g]=h[g];return l},bw=(h,w)=>{return{}},fw=(h,w)=>{let l={};if(h[Lh]!=null)l[Lh]=h[Lh];if(h[$]!=null)l[$]=h[$];if(h[V]!=null){let G=Yh(h[V],w);if(h[V]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,H])=>{let d=`PolicyArns.${I}`;l[d]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[p]!=null){let G=hw(h[p],w);if(h[p]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,H])=>{let d=`Tags.${I}`;l[d]=H})}return l},Cw=(h,w)=>{let l={};if(h[Z]!=null)l[Z]=h[Z];if(h[e]!=null)l[e]=h[e];if(h[o]!=null)l[o]=h[o];return l},Yh=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=Ow(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},Ow=(h,w)=>{let l={};if(h[nh]!=null)l[nh]=h[nh];return l},gw=(h,w)=>{let l={};if(h[sh]!=null)l[sh]=h[sh];if(h[Ph]!=null)l[Ph]=h[Ph];return l},xw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=gw(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},iw=(h,w)=>{let l={};if(h[jh]!=null)l[jh]=h[jh];if(h[ph]!=null)l[ph]=h[ph];return l},cw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;l[`member.${G}`]=I,G++}return l},hw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let H=iw(I,w);Object.entries(H).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},th=(h,w)=>{let l={};if(h[Uh]!=null)l[Uh]=S(h[Uh]);if(h[W]!=null)l[W]=S(h[W]);return l},ew=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[M]!=null)l[M]=th(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[U]!=null)l[U]=S(h[U]);return l},pw=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[M]!=null)l[M]=th(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[fh]!=null)l[fh]=S(h[fh]);if(h[xh]!=null)l[xh]=S(h[xh]);if(h[Ah]!=null)l[Ah]=S(h[Ah]);if(h[i]!=null)l[i]=S(h[i]);if(h[Rh]!=null)l[Rh]=S(h[Rh]);if(h[U]!=null)l[U]=S(h[U]);return l},ow=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[gh]!=null)l[gh]=S(h[gh]);if(h[M]!=null)l[M]=th(h[M],w);if(h[v]!=null)l[v]=u(h[v]);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[i]!=null)l[i]=S(h[i]);if(h[U]!=null)l[U]=S(h[U]);return l},t=(h,w)=>{let l={};if(h[g]!=null)l[g]=S(h[g]);if(h[Ch]!=null)l[Ch]=S(h[Ch]);if(h[ih]!=null)l[ih]=S(h[ih]);if(h[zh]!=null)l[zh]=R0(a0(h[zh]));return l},nw=(h,w)=>{let l={};if(h[qh]!=null)l[qh]=S(h[qh]);return l},uw=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},tw=(h,w)=>{let l={};if(h[Th]!=null)l[Th]=S(h[Th]);if(h[W]!=null)l[W]=S(h[W]);return l},hG=(h,w)=>{let l={};if(h[x]!=null)l[x]=S(h[x]);return l},lG=(h,w)=>{let l={};if(h[eh]!=null)l[eh]=S(h[eh]);if(h[x]!=null)l[x]=S(h[x]);if(h[W]!=null)l[W]=S(h[W]);return l},wG=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);if(h[Nh]!=null)l[Nh]=tw(h[Nh],w);if(h[v]!=null)l[v]=u(h[v]);return l},GG=(h,w)=>{let l={};if(h[Y]!=null)l[Y]=t(h[Y],w);return l},IG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},dG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},HG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},SG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},mG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},JG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},DG=(h,w)=>{let l={};if(h[m]!=null)l[m]=S(h[m]);return l},B=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var kG=s0(y),L=async(h,w,l,G,I)=>{let{hostname:H,protocol:d="https",port:X,path:z}=await h.endpoint(),P={protocol:d,hostname:H,port:X,method:"POST",path:z.endsWith("/")?z.slice(0,-1)+l:z+l,headers:w};if(G!==void 0)P.hostname=G;if(I!==void 0)P.body=I;return new L0(P)},R={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",s="Action",g="AccessKeyId",KG="AssumeRole",Uh="AssumedRoleId",M="AssumedRoleUser",BG="AssumeRoleWithSAML",EG="AssumeRoleWithWebIdentity",x="Account",W="Arn",i="Audience",Y="Credentials",Ph="ContextAssertion",QG="DecodeAuthorizationMessage",qh="DecodedMessage",Z="DurationSeconds",zh="Expiration",Mh="ExternalId",Wh="EncodedMessage",Nh="FederatedUser",Th="FederatedUserId",XG="GetAccessKeyInfo",YG="GetCallerIdentity",ZG="GetFederationToken",yG="GetSessionToken",Ah="Issuer",jh="Key",Lh="Name",Rh="NameQualifier",$="Policy",V="PolicyArns",ah="PrincipalArn",sh="ProviderArn",rh="ProvidedContexts",_h="ProviderId",v="PackedPolicySize",bh="Provider",N="RoleArn",c="RoleSessionName",fh="Subject",Ch="SecretAccessKey",Oh="SAMLAssertion",gh="SubjectFromWebIdentityToken",U="SourceIdentity",e="SerialNumber",xh="SubjectType",ih="SessionToken",p="Tags",o="TokenCode",ch="TransitiveTagKeys",eh="UserId",r="Version",ph="Value",oh="WebIdentityToken",nh="arn",m="message",_=(h)=>Object.entries(h).map(([w,l])=>uh.extendedEncodeURIComponent(w)+"="+uh.extendedEncodeURIComponent(l)).join("&"),FG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[lw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,z0).ser(r0).de(i0).build(){}var ww=J(b(),1);class hl extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[ww.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(M0,W0).ser(_0).de(c0).build(){}var Gw=J(b(),1);class lh extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Gw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(N0,T0).ser(b0).de(e0).build(){}var Iw=J(b(),1);class ll extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Iw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(f0).de(p0).build(){}var dw=J(b(),1);class wl extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[dw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(C0).de(o0).build(){}var Hw=J(b(),1);class Gl extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Hw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(O0).de(n0).build(){}var Sw=J(b(),1);class Il extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[Sw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,A0).ser(g0).de(u0).build(){}var mw=J(b(),1);class dl extends Q.classBuilder().ep(k).m(function(h,w,l,G){return[mw.getSerdePlugin(l,this.serialize,this.deserialize),E(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,j0).ser(x0).de(t0).build(){}var $G={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:hl,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:ll,GetAccessKeyInfoCommand:wl,GetCallerIdentityCommand:Gl,GetFederationTokenCommand:Il,GetSessionTokenCommand:dl};class Dw extends A{}Jw($G,Dw);var Zh=J(VG(),1);var kw="us-east-1",Kw=(h)=>{if(typeof h?.Arn==="string"){let w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Bw=async(h,w,l)=>{let G=typeof h==="function"?await h():h,I=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${I} (parent client)`,`${kw} (STS default)`),G??I??kw},Ew=(h,w)=>{let l,G;return async(I,H)=>{if(G=I,!l){let{logger:C=h?.parentClientConfig?.logger,region:yh,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Fh}=h,Zw=await Bw(yh,h?.parentClientConfig?.region,Fh),yw=!Xw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:Zw,requestHandler:yw?wh:void 0,logger:C})}let{Credentials:d,AssumedRoleUser:X}=await l.send(new hh(H));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);let z=Kw(X),P={accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...z&&{accountId:z}};return Zh.setCredentialFeature(P,"CREDENTIALS_STS_ASSUME_ROLE","i"),P}},Qw=(h,w)=>{let l;return async(G)=>{if(!l){let{logger:z=h?.parentClientConfig?.logger,region:P,requestHandler:C=h?.parentClientConfig?.requestHandler,credentialProviderLogger:yh}=h,wh=await Bw(P,h?.parentClientConfig?.region,yh),Fh=!Xw(C);l=new w({region:wh,requestHandler:Fh?C:void 0,logger:z})}let{Credentials:I,AssumedRoleUser:H}=await l.send(new lh(G));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);let d=Kw(H),X={accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...d&&{accountId:d}};if(d)Zh.setCredentialFeature(X,"RESOLVED_ACCOUNT_ID","T");return Zh.setCredentialFeature(X,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),X}};var Xw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var Yw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let I of w)this.middlewareStack.use(I)}}},vG=(h={},w)=>Ew(h,Yw(A,w)),UG=(h={},w)=>Qw(h,Yw(A,w)),_3=(h)=>(w)=>h({roleAssumer:vG(w),roleAssumerWithWebIdentity:UG(w),...w});export{UG as getDefaultRoleAssumerWithWebIdentity,vG as getDefaultRoleAssumer,_3 as decorateDefaultCredentialProvider,U0 as __Client,y as STSServiceException,A as STSClient,Dw as STS,Kh as RegionDisabledException,kh as PackedPolicyTooLargeException,Dh as MalformedPolicyDocumentException,Eh as InvalidIdentityTokenException,Xh as InvalidAuthorizationMessageException,Bh as IDPRejectedClaimException,Qh as IDPCommunicationErrorException,j0 as GetSessionTokenResponseFilterSensitiveLog,dl as GetSessionTokenCommand,A0 as GetFederationTokenResponseFilterSensitiveLog,Il as GetFederationTokenCommand,Gl as GetCallerIdentityCommand,wl as GetAccessKeyInfoCommand,Jh as ExpiredTokenException,ll as DecodeAuthorizationMessageCommand,n as CredentialsFilterSensitiveLog,T0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,N0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,W0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,M0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,hl as AssumeRoleWithSAMLCommand,z0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,Q as $Command};
|
package/dist/chunk-ra5sfgg4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Fb as D}from"./chunk-yvmyw2r2.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{let j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{_checksumAlgorithms:j,addChecksumAlgorithm(z){this._checksumAlgorithms.push(z)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),F=Q((b)=>{let j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return{...E(b)}},"getDefaultClientConfiguration"),k=Q((b)=>{return{...F(b)}},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
|
|
2
|
-
export{S as sb};
|
package/dist/chunk-rfd43z7p.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{rb as J}from"./chunk-6yazdvb4.js";import{xb as A,zb as g}from"./chunk-d2dbhn2h.js";var Ht=g((rf,kt)=>{var{defineProperty:B,getOwnPropertyDescriptor:Li,getOwnPropertyNames:zi}=Object,Mi=Object.prototype.hasOwnProperty,bi=(t,n)=>B(t,"name",{value:n,configurable:!0}),Ri=(t,n)=>{for(var e in n)B(t,e,{get:n[e],enumerable:!0})},Ui=(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)=>Ui(B({},"__esModule",{value:!0}),t),pt={};Ri(pt,{isArrayBuffer:()=>Ai});kt.exports=Di(pt);var Ai=bi((t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]","isArrayBuffer")});var V=g((sf,Pt)=>{var{defineProperty:p,getOwnPropertyDescriptor:Yi,getOwnPropertyNames:Wi}=Object,Zi=Object.prototype.hasOwnProperty,Ot=(t,n)=>p(t,"name",{value:n,configurable:!0}),Qi=(t,n)=>{for(var e in n)p(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)p(t,r,{get:()=>n[r],enumerable:!(i=Yi(n,r))||i.enumerable})}return t},Vi=(t)=>Ki(p({},"__esModule",{value:!0}),t),vt={};Qi(vt,{fromArrayBuffer:()=>Gi,fromString:()=>ji});Pt.exports=Vi(vt);var Xi=Ht(),ft=import.meta.require("buffer"),Gi=Ot((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=Ot((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 _t=g((mt)=>{Object.defineProperty(mt,"__esModule",{value:!0});mt.fromBase64=void 0;var Ji=V(),Bi=/^[A-Za-z0-9+/]*={0,2}$/,pi=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Bi.exec(t))throw new TypeError("Invalid base64 string.");let n=Ji.fromString(t,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)};mt.fromBase64=pi});var H=g((ff,rn)=>{var{defineProperty:k,getOwnPropertyDescriptor:ki,getOwnPropertyNames:Hi}=Object,Oi=Object.prototype.hasOwnProperty,ht=(t,n)=>k(t,"name",{value:n,configurable:!0}),vi=(t,n)=>{for(var e in n)k(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)k(t,r,{get:()=>n[r],enumerable:!(i=ki(n,r))||i.enumerable})}return t},mi=(t)=>Pi(k({},"__esModule",{value:!0}),t),tn={};vi(tn,{fromUtf8:()=>en,toUint8Array:()=>qi,toUtf8:()=>_i});rn.exports=mi(tn);var nn=V(),en=ht((t)=>{let n=nn.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 en(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 nn.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("utf8")},"toUtf8")});var fn=g((sn)=>{Object.defineProperty(sn,"__esModule",{value:!0});sn.toBase64=void 0;var tr=V(),nr=H(),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")};sn.toBase64=er});var X=g((of,O)=>{var{defineProperty:hn,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)hn(t,r,{get:()=>n[r],enumerable:!(i=ir(n,r))||i.enumerable})}return t},on=(t,n,e)=>(ot(t,n,"default"),e&&ot(e,n,"default")),cr=(t)=>ot(hn({},"__esModule",{value:!0}),t),dt={};O.exports=cr(dt);on(dt,_t(),O.exports);on(dt,fn(),O.exports)});var ln=g((dn)=>{Object.defineProperty(dn,"__esModule",{value:!0});dn.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};dn.getAwsChunkedEncodingStream=hr});var P=g((uf,gn)=>{var{defineProperty:v,getOwnPropertyDescriptor:or,getOwnPropertyNames:dr}=Object,ur=Object.prototype.hasOwnProperty,U=(t,n)=>v(t,"name",{value:n,configurable:!0}),lr=(t,n)=>{for(var e in n)v(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)v(t,r,{get:()=>n[r],enumerable:!(i=or(n,r))||i.enumerable})}return t},wr=(t)=>ar(v({},"__esModule",{value:!0}),t),an={};lr(an,{Field:()=>Er,Fields:()=>xr,HttpRequest:()=>Tr,HttpResponse:()=>Cr,IHttpRequest:()=>wn.HttpRequest,getHttpHandlerExtensionConfiguration:()=>yr,isValidHostname:()=>Cn,resolveHttpHandlerRuntimeConfig:()=>$r});gn.exports=wr(an);var yr=U((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=U((t)=>{return{httpHandler:t.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),wn=J(),yn=class t{constructor({name:n,kind:e=wn.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}};U(yn,"Field");var Er=yn,$n=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)}};U($n,"Fields");var xr=$n,En=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=xn(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)}};U(En,"HttpRequest");var Tr=En;function xn(t){return Object.keys(t).reduce((n,e)=>{let i=t[e];return{...n,[e]:Array.isArray(i)?[...i]:i}},{})}U(xn,"cloneQuery");var Tn=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"}};U(Tn,"HttpResponse");var Cr=Tn;function Cn(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)}U(Cn,"isValidHostname")});var lt=g((lf,In)=>{var{defineProperty:m,getOwnPropertyDescriptor:gr,getOwnPropertyNames:Sr}=Object,Fr=Object.prototype.hasOwnProperty,ut=(t,n)=>m(t,"name",{value:n,configurable:!0}),Ir=(t,n)=>{for(var e in n)m(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)m(t,r,{get:()=>n[r],enumerable:!(i=gr(n,r))||i.enumerable})}return t},Lr=(t)=>Nr(m({},"__esModule",{value:!0}),t),Sn={};Ir(Sn,{escapeUri:()=>Fn,escapeUriPath:()=>Mr});In.exports=Lr(Sn);var Fn=ut((t)=>encodeURIComponent(t).replace(/[!'()*]/g,zr),"escapeUri"),zr=ut((t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Mr=ut((t)=>t.split("/").map(Fn).join("/"),"escapeUriPath")});var wt=g((af,zn)=>{var{defineProperty:q,getOwnPropertyDescriptor:br,getOwnPropertyNames:Rr}=Object,Ur=Object.prototype.hasOwnProperty,Dr=(t,n)=>q(t,"name",{value:n,configurable:!0}),Ar=(t,n)=>{for(var e in n)q(t,e,{get:n[e],enumerable:!0})},Yr=(t,n,e,i)=>{if(n&&typeof n==="object"||typeof n==="function"){for(let r of Rr(n))if(!Ur.call(t,r)&&r!==e)q(t,r,{get:()=>n[r],enumerable:!(i=br(n,r))||i.enumerable})}return t},Wr=(t)=>Yr(q({},"__esModule",{value:!0}),t),Nn={};Ar(Nn,{buildQueryString:()=>Ln});zn.exports=Wr(Nn);var at=lt();function Ln(t){let n=[];for(let e of Object.keys(t).sort()){let i=t[e];if(e=at.escapeUri(e),Array.isArray(i))for(let r=0,s=i.length;r<s;r++)n.push(`${e}=${at.escapeUri(i[r])}`);else{let r=e;if(i||typeof i==="string")r+=`=${at.escapeUri(i)}`;n.push(r)}}return n.join("&")}Dr(Ln,"buildQueryString")});var kn=g((wf,pn)=>{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});pn.exports=Jr(An);var Yn=P(),Wn=wt(),yt=import.meta.require("http"),$t=import.meta.require("https"),Br=["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,pr=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"),bn=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:bn),bn)},"setSocketTimeout"),Qn=import.meta.require("stream"),Rn=1000;async function Et(t,n,e=Rn){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(Rn,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(Et,"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 yt.Agent||typeof(s==null?void 0:s.destroy)==="function")return s;return new yt.Agent({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(c instanceof $t.Agent||typeof(c==null?void 0:c.destroy)==="function")return c;return new $t.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?$t.request:yt.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(Br.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(pr($,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=Et($,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,Un=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,[Un.constants.HTTP2_HEADER_PATH]:ct,[Un.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=Et(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 Bn(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 Bn(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(Bn,"collectReadableStream")});var _n=g((yf,qn)=>{var{defineProperty:tt,getOwnPropertyDescriptor:rs,getOwnPropertyNames:ss}=Object,cs=Object.prototype.hasOwnProperty,Y=(t,n)=>tt(t,"name",{value:n,configurable:!0}),fs=(t,n)=>{for(var e in n)tt(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)tt(t,r,{get:()=>n[r],enumerable:!(i=rs(n,r))||i.enumerable})}return t},os=(t)=>hs(tt({},"__esModule",{value:!0}),t),On={};fs(On,{FetchHttpHandler:()=>us,keepAliveSupport:()=>_,streamCollector:()=>ls});qn.exports=os(On);var Hn=P(),ds=wt();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)})}Y(vn,"requestTimeout");var _={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(_.supported===void 0)_.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(_.supported)E.keepalive=s;if(typeof this.config.requestInit==="function")Object.assign(E,this.config.requestInit(n));let C=Y(()=>{},"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=Y(()=>{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=Y(()=>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??{}}};Y(Pn,"FetchHttpHandler");var us=Pn,ls=Y(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}Y(mn,"collectStream")});var ce=g(($f,se)=>{var{defineProperty:nt,getOwnPropertyDescriptor:as,getOwnPropertyNames:ws}=Object,ys=Object.prototype.hasOwnProperty,te=(t,n)=>nt(t,"name",{value:n,configurable:!0}),$s=(t,n)=>{for(var e in n)nt(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)nt(t,r,{get:()=>n[r],enumerable:!(i=as(n,r))||i.enumerable})}return t},xs=(t)=>Es(nt({},"__esModule",{value:!0}),t),ne={};$s(ne,{fromHex:()=>ie,toHex:()=>re});se.exports=xs(ne);var ee={},xt={};for(let t=0;t<256;t++){let n=t.toString(16).toLowerCase();if(n.length===1)n=`0${n}`;ee[t]=n,xt[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 xt)n[e/2]=xt[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 W=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=H(),oe=W(),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(),Tt=import.meta.require("stream"),zs=import.meta.require("util"),Ms=we(),ye="The stream has already been transformed.",bs=(t)=>{var n,e;if(!(t instanceof Tt.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 Tt.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,Tt.Readable.toWeb(t)}})};$e.sdkStreamMixin=bs});var ge=g((Te)=>{Object.defineProperty(Te,"__esModule",{value:!0});Te.splitStream=void 0;async function Rs(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}Te.splitStream=Rs});var Ne=g((Fe)=>{Object.defineProperty(Fe,"__esModule",{value:!0});Fe.splitStream=void 0;var Se=import.meta.require("stream"),Us=ge(),Ds=W();async function As(t){if(Ds.isReadableStream(t))return Us.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((Re)=>{Object.defineProperty(Re,"__esModule",{value:!0});Re.headStream=void 0;var Ws=import.meta.require("stream"),Zs=Me(),Qs=W(),Ks=(t,n)=>{if(Qs.isReadableStream(t))return Zs.headStream(t,n);return new Promise((e,i)=>{let r=new be;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)})})};Re.headStream=Ks;class be 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 Ct=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=W(),Bs=Ve(),ps=({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,Bs.ChecksumStream.prototype),a};Xe.createChecksumStream=ps});var pe=g((Je)=>{Object.defineProperty(Je,"__esModule",{value:!0});Je.createChecksumStream=void 0;var ks=W(),Hs=Ct(),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((Mf,b)=>{var{defineProperty:et,getOwnPropertyDescriptor:Ps,getOwnPropertyNames:ms}=Object,qs=Object.prototype.hasOwnProperty,Ft=(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})},gt=(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)et(t,r,{get:()=>n[r],enumerable:!(i=Ps(n,r))||i.enumerable})}return t},Z=(t,n,e)=>(gt(t,n,"default"),e&>(e,n,"default")),tc=(t)=>gt(et({},"__esModule",{value:!0}),t),M={};_s(M,{Uint8ArrayBlobAdapter:()=>St});b.exports=tc(M);var ke=X(),He=H();function Oe(t,n="utf-8"){if(n==="base64")return ke.toBase64(t);return He.toUtf8(t)}Ft(Oe,"transformToString");function ve(t,n){if(n==="base64")return St.mutate(ke.fromBase64(t));return St.mutate(He.fromUtf8(t))}Ft(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)}};Ft(Pe,"Uint8ArrayBlobAdapter");var St=Pe;Z(M,ln(),b.exports);Z(M,xe(),b.exports);Z(M,Ne(),b.exports);Z(M,De(),b.exports);Z(M,W(),b.exports);Z(M,pe(),b.exports);Z(M,Ct(),b.exports)});var j=g((bf,ti)=>{var{defineProperty:Lt,getOwnPropertyDescriptor:nc,getOwnPropertyNames:ec}=Object,ic=Object.prototype.hasOwnProperty,rc=(t,n)=>{for(var e in n)Lt(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)Lt(t,r,{get:()=>n[r],enumerable:!(i=nc(n,r))||i.enumerable})}return t},cc=(t)=>sc(Lt({},"__esModule",{value:!0}),t),qe={};rc(qe,{RequestBuilder:()=>_e,collectBody:()=>fc,extendedEncodeURIComponent:()=>Nt,requestBuilder:()=>dc,resolvedPath:()=>uc});ti.exports=cc(qe);var It=me(),fc=async(t=new Uint8Array,n)=>{if(t instanceof Uint8Array)return It.Uint8ArrayBlobAdapter.mutate(t);if(!t)return It.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let e=n.streamCollector(t);return It.Uint8ArrayBlobAdapter.mutate(await e)};function Nt(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})}var hc=j(),oc=P();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)=>Nt(f)).join("/"):Nt(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},R=(t,n)=>{return`${t||"anonymous"}${n&&n.length>0?` (a.k.a. ${n.join(",")})`:""}`},K=()=>{let t=[],n=[],e=!1,i=new Set,r=(h)=>h.sort((u,l)=>Kt[l.step]-Kt[u.step]||Vt[l.priority||"normal"]-Vt[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 ${R(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 '${R(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(`"${R(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${R(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 '${R(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(`"${R(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${R(l,C)}" middleware ${y.relation} "${y.toMiddleware}" middleware.`);n.splice(w,1)}}for(let d of $)i.add(d)}n.push(y)},clone:()=>f(K()),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(K());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 R(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},Kt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Vt={high:3,normal:2,low:1};class Ni{constructor(t){this.config=t,this.middlewareStack=K()}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 Xt=A(J(),1);class Gt{constructor(){this.middlewareStack=K()}static classBuilder(){return new jt}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,[Xt.SMITHY_CONTEXT_KEY]:{commandInstance:this,...o},...a},{requestHandler:E}=n;return h.resolve((C)=>E.handle(C.request,e||{}),l)}}class jt{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 Gt{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 qc="***SensitiveInformation***";var tf=(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 Bt=(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=A(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)=>zt(t,32),ii=(t)=>zt(t,16),ri=(t)=>zt(t,8),zt=(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]}},Df=(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},Af=(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}`)},Yf=(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(it(t));return ni(t)},Ec=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,it=(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 Wf=(t)=>{if(typeof t==="string")return ei(it(t));return ei(t)},Mt=(t)=>{if(typeof t==="string")return ii(it(t));return ii(t)},ci=(t)=>{if(typeof t==="string")return ri(it(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]$/),Vf=(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=Mt(bt(i)),h=Q(r,"month",1,12),u=Q(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])$/),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=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=Mt(bt(i)),u=Q(r,"month",1,12),l=Q(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},Gf=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$/),Jf=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,Q(i.hours,"hour",0,23),Q(i.minutes,"minute",0,59),Q(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)},Q=(t,n,e,i)=>{let r=ci(bt(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},bt=(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 Bt(c,n)},kf=(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 Of=(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,Pf=(t)=>{if(t&&!di&&parseInt(t.substring(1,t.indexOf(".")))<16)di=!0};var Mc=A(j(),1);var Rt=A(J(),1);var ui=(t)=>{let n=[];for(let e in Rt.AlgorithmId){let i=Rt.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 ih=(t)=>{return{...ui(t),...ai(t)}};var rh=(t)=>{return{...li(t),...wi(t)}};var hh=(t)=>Array.isArray(t)?t:[t];var uh=(t)=>{return t!=null};var Ut=function(){let t=Object.getPrototypeOf(this).constructor,e=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(e,t.prototype),e};Ut.prototype=Object.create(String.prototype,{constructor:{value:Ut,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Ut,String);class bc{trace(){}debug(){}info(){}warn(){}error(){}}function Rc(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,Uc(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 yh=(t,n)=>{let e={};for(let i in n)yi(e,t,n,i);return e},Uc=(t,n,e)=>{return Rc(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=A(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 vh=(t)=>{let n=t.httpHandler;return{setHttpHandler(e){n=e},httpHandler(){return n},updateHttpClientConfig(e,i){n.updateHttpClientConfig(e,i)},httpHandlerConfigs(){return n.httpHandlerConfigs()}}},Ph=(t)=>{return{httpHandler:t.httpHandler()}};var Wc=A(J(),1);class Dt{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 Dt({...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 Dt.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 rt{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 st=A(lt(),1);function At(t){let n=[];for(let e of Object.keys(t).sort()){let i=t[e];if(e=st.escapeUri(e),Array.isArray(i))for(let r=0,s=i.length;r<s;r++)n.push(`${e}=${st.escapeUri(i[r])}`);else{let r=e;if(i||typeof i==="string")r+=`=${st.escapeUri(i)}`;n.push(r)}}return n.join("&")}import{Agent as Si,request as Vc}from"http";import{Agent as Fi,request as Xc}from"https";var Ei=["ECONNRESET","EPIPE","ETIMEDOUT"];var Yt=(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 Qc}from"stream";var gi=1000;async function Wt(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)Kc(t,n.body)}function Kc(t,n){if(n instanceof Qc){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 Zt{static create(t){if(typeof t?.handle==="function")return t;return new Zt(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=Zt.checkSocketUsage(a,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let x=At(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?Xc:Vc)(E,(d)=>{let w=new rt({statusCode:d.statusCode||-1,reason:d.statusMessage,headers:Yt(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=Wt(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 Gc}from"stream";class Qt extends Gc{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,n,e){this.bufferedBytes.push(t),e()}}var Oo=(t)=>{if(jc(t))return Jc(t);return new Promise((n,e)=>{let i=new Qt;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 Jc(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{vh as ya,Ph as za,Dt as Aa,rt as Ba,P as Ca,Ht as Da,H as Ea,lt as Fa,ce as Ga,me as Ha,j as Ia,Ni as Ja,Gt as Ka,qc as La,tf as Ma,yc as Na,ei as Oa,Df as Pa,Af as Qa,Yf as Ra,Wf as Sa,Vf as Ta,Xf as Ua,Jt as Va,Bt as Wa,kf as Xa,Of as Ya,Pf as Za,Mc as _a,ih as $a,rh as ab,hh as bb,uh as cb,bc as db,Rc as eb,yh as fb,$i as gb,Zt as hb,Oo as ib};
|
package/dist/chunk-rtfeef82.js
DELETED
|
@@ -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-v9kknk69.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-v9kknk69.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-js6y6fm1.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};
|
package/dist/chunk-ryjbc6dz.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{rb as P}from"./chunk-6yazdvb4.js";import{xb as Z,zb as U}from"./chunk-d2dbhn2h.js";var $n=U((hs,Pn)=>{var{defineProperty:k,getOwnPropertyDescriptor:Vi,getOwnPropertyNames:Xi}=Object,Gi=Object.prototype.hasOwnProperty,Y=(n,c)=>k(n,"name",{value:c,configurable:!0}),ji=(n,c)=>{for(var t in c)k(n,t,{get:c[t],enumerable:!0})},Wi=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Xi(c))if(!Gi.call(n,h)&&h!==t)k(n,h,{get:()=>c[h],enumerable:!(i=Vi(c,h))||i.enumerable})}return n},Ji=(n)=>Wi(k({},"__esModule",{value:!0}),n),kn={};ji(kn,{constructStack:()=>wn});Pn.exports=Ji(kn);var j=Y((n,c)=>{let t=[];if(n)t.push(n);if(c)for(let i of c)t.push(i);return t},"getAllAliases"),V=Y((n,c)=>{return`${n||"anonymous"}${c&&c.length>0?` (a.k.a. ${c.join(",")})`:""}`},"getMiddlewareNameWithAliases"),wn=Y(()=>{let n=[],c=[],t=!1,i=new Set,h=Y((u)=>u.sort((d,$)=>Bn[$.step]-Bn[d.step]||Hn[$.priority||"normal"]-Hn[d.priority||"normal"]),"sort"),f=Y((u)=>{let d=!1,$=Y((E)=>{let I=j(E.name,E.aliases);if(I.includes(u)){d=!0;for(let e of I)i.delete(e);return!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),d},"removeByName"),r=Y((u)=>{let d=!1,$=Y((E)=>{if(E.middleware===u){d=!0;for(let I of j(E.name,E.aliases))i.delete(I);return!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),d},"removeByReference"),s=Y((u)=>{var d;return n.forEach(($)=>{u.add($.middleware,{...$})}),c.forEach(($)=>{u.addRelativeTo($.middleware,{...$})}),(d=u.identifyOnResolve)==null||d.call(u,S.identifyOnResolve()),u},"cloneTo"),w=Y((u)=>{let d=[];return u.before.forEach(($)=>{if($.before.length===0&&$.after.length===0)d.push($);else d.push(...w($))}),d.push(u),u.after.reverse().forEach(($)=>{if($.before.length===0&&$.after.length===0)d.push($);else d.push(...w($))}),d},"expandRelativeMiddlewareList"),x=Y((u=!1)=>{let d=[],$=[],E={};return n.forEach((e)=>{let F={...e,before:[],after:[]};for(let T of j(F.name,F.aliases))E[T]=F;d.push(F)}),c.forEach((e)=>{let F={...e,before:[],after:[]};for(let T of j(F.name,F.aliases))E[T]=F;$.push(F)}),$.forEach((e)=>{if(e.toMiddleware){let F=E[e.toMiddleware];if(F===void 0){if(u)return;throw new Error(`${e.toMiddleware} is not found when adding ${V(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}if(e.relation==="after")F.after.push(e);if(e.relation==="before")F.before.push(e)}}),h(d).map(w).reduce((e,F)=>{return e.push(...F),e},[])},"getMiddlewareList"),S={add:(u,d={})=>{let{name:$,override:E,aliases:I}=d,e={step:"initialize",priority:"normal",middleware:u,...d},F=j($,I);if(F.length>0){if(F.some((T)=>i.has(T))){if(!E)throw new Error(`Duplicate middleware name '${V($,I)}'`);for(let T of F){let C=n.findIndex((g)=>{var o;return g.name===T||((o=g.aliases)==null?void 0:o.some((G)=>G===T))});if(C===-1)continue;let y=n[C];if(y.step!==e.step||e.priority!==y.priority)throw new Error(`"${V(y.name,y.aliases)}" middleware with ${y.priority} priority in ${y.step} step cannot be overridden by "${V($,I)}" middleware with ${e.priority} priority in ${e.step} step.`);n.splice(C,1)}}for(let T of F)i.add(T)}n.push(e)},addRelativeTo:(u,d)=>{let{name:$,override:E,aliases:I}=d,e={middleware:u,...d},F=j($,I);if(F.length>0){if(F.some((T)=>i.has(T))){if(!E)throw new Error(`Duplicate middleware name '${V($,I)}'`);for(let T of F){let C=c.findIndex((g)=>{var o;return g.name===T||((o=g.aliases)==null?void 0:o.some((G)=>G===T))});if(C===-1)continue;let y=c[C];if(y.toMiddleware!==e.toMiddleware||y.relation!==e.relation)throw new Error(`"${V(y.name,y.aliases)}" middleware ${y.relation} "${y.toMiddleware}" middleware cannot be overridden by "${V($,I)}" middleware ${e.relation} "${e.toMiddleware}" middleware.`);c.splice(C,1)}}for(let T of F)i.add(T)}c.push(e)},clone:()=>s(wn()),use:(u)=>{u.applyToStack(S)},remove:(u)=>{if(typeof u==="string")return f(u);else return r(u)},removeByTag:(u)=>{let d=!1,$=Y((E)=>{let{tags:I,name:e,aliases:F}=E;if(I&&I.includes(u)){let T=j(e,F);for(let C of T)i.delete(C);return d=!0,!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),d},concat:(u)=>{var d;let $=s(wn());return $.use(u),$.identifyOnResolve(t||$.identifyOnResolve()||(((d=u.identifyOnResolve)==null?void 0:d.call(u))??!1)),$},applyToStack:s,identify:()=>{return x(!0).map((u)=>{let d=u.step??u.relation+" "+u.toMiddleware;return V(u.name,u.aliases)+" - "+d})},identifyOnResolve(u){if(typeof u==="boolean")t=u;return t},resolve:(u,d)=>{for(let $ of x().map((E)=>E.middleware).reverse())u=$(u,d);if(t)console.log(S.identify());return u}};return S},"constructStack"),Bn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Hn={high:3,normal:2,low:1}});var cc=U((xs,nc)=>{var{defineProperty:l,getOwnPropertyDescriptor:bi,getOwnPropertyNames:Ai}=Object,Ri=Object.prototype.hasOwnProperty,Bi=(n,c)=>l(n,"name",{value:c,configurable:!0}),Hi=(n,c)=>{for(var t in c)l(n,t,{get:c[t],enumerable:!0})},ki=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Ai(c))if(!Ri.call(n,h)&&h!==t)l(n,h,{get:()=>c[h],enumerable:!(i=bi(c,h))||i.enumerable})}return n},Pi=(n)=>ki(l({},"__esModule",{value:!0}),n),_n={};Hi(_n,{isArrayBuffer:()=>li});nc.exports=Pi(_n);var li=Bi((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var A=U((Cs,hc)=>{var{defineProperty:O,getOwnPropertyDescriptor:Oi,getOwnPropertyNames:pi}=Object,vi=Object.prototype.hasOwnProperty,tc=(n,c)=>O(n,"name",{value:c,configurable:!0}),qi=(n,c)=>{for(var t in c)O(n,t,{get:c[t],enumerable:!0})},ai=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of pi(c))if(!vi.call(n,h)&&h!==t)O(n,h,{get:()=>c[h],enumerable:!(i=Oi(c,h))||i.enumerable})}return n},mi=(n)=>ai(O({},"__esModule",{value:!0}),n),ic={};qi(ic,{fromArrayBuffer:()=>nh,fromString:()=>ch});hc.exports=mi(ic);var _i=cc(),Tn=import.meta.require("buffer"),nh=tc((n,c=0,t=n.byteLength-c)=>{if(!_i.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return Tn.Buffer.from(n,c,t)},"fromArrayBuffer"),ch=tc((n,c)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return c?Tn.Buffer.from(n,c):Tn.Buffer.from(n)},"fromString")});var sc=U((fc)=>{Object.defineProperty(fc,"__esModule",{value:!0});fc.fromBase64=void 0;var th=A(),ih=/^[A-Za-z0-9+/]*={0,2}$/,hh=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ih.exec(n))throw new TypeError("Invalid base64 string.");let c=th.fromString(n,"base64");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)};fc.fromBase64=hh});var v=U((Fs,Tc)=>{var{defineProperty:p,getOwnPropertyDescriptor:fh,getOwnPropertyNames:rh}=Object,sh=Object.prototype.hasOwnProperty,dn=(n,c)=>p(n,"name",{value:c,configurable:!0}),uh=(n,c)=>{for(var t in c)p(n,t,{get:c[t],enumerable:!0})},wh=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of rh(c))if(!sh.call(n,h)&&h!==t)p(n,h,{get:()=>c[h],enumerable:!(i=fh(c,h))||i.enumerable})}return n},$h=(n)=>wh(p({},"__esModule",{value:!0}),n),uc={};uh(uc,{fromUtf8:()=>$c,toUint8Array:()=>Th,toUtf8:()=>dh});Tc.exports=$h(uc);var wc=A(),$c=dn((n)=>{let c=wc.fromString(n,"utf8");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Th=dn((n)=>{if(typeof n==="string")return $c(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),dh=dn((n)=>{if(typeof n==="string")return n;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return wc.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var Cc=U((dc)=>{Object.defineProperty(dc,"__esModule",{value:!0});dc.toBase64=void 0;var xh=A(),Ch=v(),eh=(n)=>{let c;if(typeof n==="string")c=Ch.fromUtf8(n);else c=n;if(typeof c!=="object"||typeof c.byteOffset!=="number"||typeof c.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return xh.fromArrayBuffer(c.buffer,c.byteOffset,c.byteLength).toString("base64")};dc.toBase64=eh});var R=U((Ss,q)=>{var{defineProperty:ec,getOwnPropertyDescriptor:Fh,getOwnPropertyNames:Eh}=Object,Sh=Object.prototype.hasOwnProperty,xn=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Eh(c))if(!Sh.call(n,h)&&h!==t)ec(n,h,{get:()=>c[h],enumerable:!(i=Fh(c,h))||i.enumerable})}return n},Fc=(n,c,t)=>(xn(n,c,"default"),t&&xn(t,c,"default")),yh=(n)=>xn(ec({},"__esModule",{value:!0}),n),Cn={};q.exports=yh(Cn);Fc(Cn,sc(),q.exports);Fc(Cn,Cc(),q.exports)});var yc=U((Ec)=>{Object.defineProperty(Ec,"__esModule",{value:!0});Ec.getAwsChunkedEncodingStream=void 0;var Ih=import.meta.require("stream"),Uh=(n,c)=>{let{base64Encoder:t,bodyLengthChecker:i,checksumAlgorithmFn:h,checksumLocationName:f,streamHasher:r}=c,s=t!==void 0&&h!==void 0&&f!==void 0&&r!==void 0,w=s?r(h,n):void 0,x=new Ih.Readable({read:()=>{}});return n.on("data",(S)=>{let u=i(S)||0;x.push(`${u.toString(16)}\r\n`),x.push(S),x.push("\r\n")}),n.on("end",async()=>{if(x.push("0\r\n"),s){let S=t(await w);x.push(`${f}:${S}\r\n`),x.push("\r\n")}x.push(null)}),x};Ec.getAwsChunkedEncodingStream=Uh});var m=U((Is,zc)=>{var{defineProperty:a,getOwnPropertyDescriptor:Dh,getOwnPropertyNames:Lh}=Object,gh=Object.prototype.hasOwnProperty,X=(n,c)=>a(n,"name",{value:c,configurable:!0}),oh=(n,c)=>{for(var t in c)a(n,t,{get:c[t],enumerable:!0})},Nh=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Lh(c))if(!gh.call(n,h)&&h!==t)a(n,h,{get:()=>c[h],enumerable:!(i=Dh(c,h))||i.enumerable})}return n},Yh=(n)=>Nh(a({},"__esModule",{value:!0}),n),Ic={};oh(Ic,{Field:()=>Qh,Fields:()=>Kh,HttpRequest:()=>Vh,HttpResponse:()=>Xh,IHttpRequest:()=>Uc.HttpRequest,getHttpHandlerExtensionConfiguration:()=>zh,isValidHostname:()=>Yc,resolveHttpHandlerRuntimeConfig:()=>Zh});zc.exports=Yh(Ic);var zh=X((n)=>{let c=n.httpHandler;return{setHttpHandler(t){c=t},httpHandler(){return c},updateHttpClientConfig(t,i){c.updateHttpClientConfig(t,i)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Zh=X((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),Uc=P(),Dc=class n{constructor({name:c,kind:t=Uc.FieldPosition.HEADER,values:i=[]}){this.name=c,this.kind=t,this.values=i}add(c){this.values.push(c)}set(c){this.values=c}remove(c){this.values=this.values.filter((t)=>t!==c)}toString(){return this.values.map((c)=>c.includes(",")||c.includes(" ")?`"${c}"`:c).join(", ")}get(){return this.values}};X(Dc,"Field");var Qh=Dc,Lc=class n{constructor({fields:c=[],encoding:t="utf-8"}){this.entries={},c.forEach(this.setField.bind(this)),this.encoding=t}setField(c){this.entries[c.name.toLowerCase()]=c}getField(c){return this.entries[c.toLowerCase()]}removeField(c){delete this.entries[c.toLowerCase()]}getByType(c){return Object.values(this.entries).filter((t)=>t.kind===c)}};X(Lc,"Fields");var Kh=Lc,gc=class n{constructor(c){this.method=c.method||"GET",this.hostname=c.hostname||"localhost",this.port=c.port,this.query=c.query||{},this.headers=c.headers||{},this.body=c.body,this.protocol=c.protocol?c.protocol.slice(-1)!==":"?`${c.protocol}:`:c.protocol:"https:",this.path=c.path?c.path.charAt(0)!=="/"?`/${c.path}`:c.path:"/",this.username=c.username,this.password=c.password,this.fragment=c.fragment}static clone(c){let t=new n({...c,headers:{...c.headers}});if(t.query)t.query=oc(t.query);return t}static isInstance(c){if(!c)return!1;let t=c;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return n.clone(this)}};X(gc,"HttpRequest");var Vh=gc;function oc(n){return Object.keys(n).reduce((c,t)=>{let i=n[t];return{...c,[t]:Array.isArray(i)?[...i]:i}},{})}X(oc,"cloneQuery");var Nc=class n{constructor(c){this.statusCode=c.statusCode,this.reason=c.reason,this.headers=c.headers||{},this.body=c.body}static isInstance(c){if(!c)return!1;let t=c;return typeof t.statusCode==="number"&&typeof t.headers==="object"}};X(Nc,"HttpResponse");var Xh=Nc;function Yc(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)}X(Yc,"isValidHostname")});var Fn=U((Us,Kc)=>{var{defineProperty:_,getOwnPropertyDescriptor:Gh,getOwnPropertyNames:jh}=Object,Wh=Object.prototype.hasOwnProperty,en=(n,c)=>_(n,"name",{value:c,configurable:!0}),Jh=(n,c)=>{for(var t in c)_(n,t,{get:c[t],enumerable:!0})},Mh=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of jh(c))if(!Wh.call(n,h)&&h!==t)_(n,h,{get:()=>c[h],enumerable:!(i=Gh(c,h))||i.enumerable})}return n},bh=(n)=>Mh(_({},"__esModule",{value:!0}),n),Zc={};Jh(Zc,{escapeUri:()=>Qc,escapeUriPath:()=>Rh});Kc.exports=bh(Zc);var Qc=en((n)=>encodeURIComponent(n).replace(/[!'()*]/g,Ah),"escapeUri"),Ah=en((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Rh=en((n)=>n.split("/").map(Qc).join("/"),"escapeUriPath")});var Sn=U((Ds,Gc)=>{var{defineProperty:nn,getOwnPropertyDescriptor:Bh,getOwnPropertyNames:Hh}=Object,kh=Object.prototype.hasOwnProperty,Ph=(n,c)=>nn(n,"name",{value:c,configurable:!0}),lh=(n,c)=>{for(var t in c)nn(n,t,{get:c[t],enumerable:!0})},Oh=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Hh(c))if(!kh.call(n,h)&&h!==t)nn(n,h,{get:()=>c[h],enumerable:!(i=Bh(c,h))||i.enumerable})}return n},ph=(n)=>Oh(nn({},"__esModule",{value:!0}),n),Vc={};lh(Vc,{buildQueryString:()=>Xc});Gc.exports=ph(Vc);var En=Fn();function Xc(n){let c=[];for(let t of Object.keys(n).sort()){let i=n[t];if(t=En.escapeUri(t),Array.isArray(i))for(let h=0,f=i.length;h<f;h++)c.push(`${t}=${En.escapeUri(i[h])}`);else{let h=t;if(i||typeof i==="string")h+=`=${En.escapeUri(i)}`;c.push(h)}}return c.join("&")}Ph(Xc,"buildQueryString")});var _c=U((Ls,mc)=>{var{create:vh,defineProperty:B,getOwnPropertyDescriptor:qh,getOwnPropertyNames:ah,getPrototypeOf:mh}=Object,_h=Object.prototype.hasOwnProperty,D=(n,c)=>B(n,"name",{value:c,configurable:!0}),nf=(n,c)=>{for(var t in c)B(n,t,{get:c[t],enumerable:!0})},bc=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of ah(c))if(!_h.call(n,h)&&h!==t)B(n,h,{get:()=>c[h],enumerable:!(i=qh(c,h))||i.enumerable})}return n},cf=(n,c,t)=>(t=n!=null?vh(mh(n)):{},bc(c||!n||!n.__esModule?B(t,"default",{value:n,enumerable:!0}):t,n)),tf=(n)=>bc(B({},"__esModule",{value:!0}),n),Ac={};nf(Ac,{DEFAULT_REQUEST_TIMEOUT:()=>wf,NodeHttp2Handler:()=>Cf,NodeHttpHandler:()=>$f,streamCollector:()=>Ff});mc.exports=tf(Ac);var Rc=m(),Bc=Sn(),yn=import.meta.require("http"),In=import.meta.require("https"),hf=["ECONNRESET","EPIPE","ETIMEDOUT"],Hc=D((n)=>{let c={};for(let t of Object.keys(n)){let i=n[t];c[t]=Array.isArray(i)?i.join(","):i}return c},"getTransformedHeaders"),jc=1000,ff=D((n,c,t=0)=>{if(!t)return-1;let i=D((h)=>{let f=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${t} ms`),{name:"TimeoutError"}))},t-h),r=D((s)=>{if(s==null?void 0:s.connecting)s.on("connect",()=>{clearTimeout(f)});else clearTimeout(f)},"doWithSocket");if(n.socket)r(n.socket);else n.on("socket",r)},"registerTimeout");if(t<2000)return i(0),0;return setTimeout(i.bind(null,jc),jc)},"setConnectionTimeout"),rf=3000,sf=D((n,{keepAlive:c,keepAliveMsecs:t},i=rf)=>{if(c!==!0)return-1;let h=D(()=>{if(n.socket)n.socket.setKeepAlive(c,t||0);else n.on("socket",(f)=>{f.setKeepAlive(c,t||0)})},"registerListener");if(i===0)return h(),0;return setTimeout(h,i)},"setSocketKeepAlive"),Wc=3000,uf=D((n,c,t=0)=>{let i=D((h)=>{n.setTimeout(t-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${t} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<t&&t<6000)return i(0),0;return setTimeout(i.bind(null,t===0?0:Wc),Wc)},"setSocketTimeout"),kc=import.meta.require("stream"),Jc=1000;async function Un(n,c,t=Jc){let i=c.headers??{},h=i.Expect||i.expect,f=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{f=Number(setTimeout(s,Math.max(Jc,t)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(f),s()}),n.on("error",()=>{r=!0,clearTimeout(f),s()})})]);if(!r)Pc(n,c.body)}D(Un,"writeRequestBody");function Pc(n,c){if(c instanceof kc.Readable){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}let t=c;if(typeof t==="object"&&t.buffer&&typeof t.byteOffset==="number"&&typeof t.byteLength==="number"){n.end(Buffer.from(t.buffer,t.byteOffset,t.byteLength));return}n.end(Buffer.from(c));return}n.end()}D(Pc,"writeBody");var wf=0,lc=class n{constructor(c){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,i)=>{if(typeof c==="function")c().then((h)=>{t(this.resolveDefaultConfig(h))}).catch(i);else t(this.resolveDefaultConfig(c))})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}static checkSocketUsage(c,t,i=console){var h,f,r;let{sockets:s,requests:w,maxSockets:x}=c;if(typeof x!=="number"||x===1/0)return t;let S=15000;if(Date.now()-S<t)return t;if(s&&w)for(let u in s){let d=((h=s[u])==null?void 0:h.length)??0,$=((f=w[u])==null?void 0:f.length)??0;if(d>=x&&$>=2*x)return(r=i==null?void 0:i.warn)==null||r.call(i,`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${$} 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 t}resolveDefaultConfig(c){let{requestTimeout:t,connectionTimeout:i,socketTimeout:h,httpAgent:f,httpsAgent:r}=c||{},s=!0,w=50;return{connectionTimeout:i,requestTimeout:t??h,httpAgent:(()=>{if(f instanceof yn.Agent||typeof(f==null?void 0:f.destroy)==="function")return f;return new yn.Agent({keepAlive:!0,maxSockets:50,...f})})(),httpsAgent:(()=>{if(r instanceof In.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new In.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var c,t,i,h;(t=(c=this.config)==null?void 0:c.httpAgent)==null||t.destroy(),(h=(i=this.config)==null?void 0:i.httpsAgent)==null||h.destroy()}async handle(c,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;return new Promise((i,h)=>{let f=void 0,r=[],s=D(async(C)=>{await f,r.forEach(clearTimeout),i(C)},"resolve"),w=D(async(C)=>{await f,r.forEach(clearTimeout),h(C)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t==null?void 0:t.aborted){let C=new Error("Request aborted");C.name="AbortError",w(C);return}let x=c.protocol==="https:",S=x?this.config.httpsAgent:this.config.httpAgent;r.push(setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(S,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let u=Bc.buildQueryString(c.query||{}),d=void 0;if(c.username!=null||c.password!=null){let C=c.username??"",y=c.password??"";d=`${C}:${y}`}let $=c.path;if(u)$+=`?${u}`;if(c.fragment)$+=`#${c.fragment}`;let E=c.hostname??"";if(E[0]==="["&&E.endsWith("]"))E=c.hostname.slice(1,-1);else E=c.hostname;let I={headers:c.headers,host:E,method:c.method,path:$,port:c.port,agent:S,auth:d},F=(x?In.request:yn.request)(I,(C)=>{let y=new Rc.HttpResponse({statusCode:C.statusCode||-1,reason:C.statusMessage,headers:Hc(C.headers),body:C});s({response:y})});if(F.on("error",(C)=>{if(hf.includes(C.code))w(Object.assign(C,{name:"TimeoutError"}));else w(C)}),t){let C=D(()=>{F.destroy();let y=new Error("Request aborted");y.name="AbortError",w(y)},"onAbort");if(typeof t.addEventListener==="function"){let y=t;y.addEventListener("abort",C,{once:!0}),F.once("close",()=>y.removeEventListener("abort",C))}else t.onabort=C}r.push(ff(F,w,this.config.connectionTimeout)),r.push(uf(F,w,this.config.requestTimeout));let T=I.agent;if(typeof T==="object"&&"keepAlive"in T)r.push(sf(F,{keepAlive:T.keepAlive,keepAliveMsecs:T.keepAliveMsecs}));f=Un(F,c,this.config.requestTimeout).catch((C)=>{return r.forEach(clearTimeout),h(C)})})}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[c]:t}})}httpHandlerConfigs(){return this.config??{}}};D(lc,"NodeHttpHandler");var $f=lc,Mc=import.meta.require("http2"),Tf=cf(import.meta.require("http2")),Oc=class n{constructor(c){this.sessions=[],this.sessions=c??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(c){this.sessions.push(c)}contains(c){return this.sessions.includes(c)}remove(c){this.sessions=this.sessions.filter((t)=>t!==c)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(c){for(let t of this.sessions)if(t===c){if(!t.destroyed)t.destroy()}}};D(Oc,"NodeHttp2ConnectionPool");var df=Oc,pc=class n{constructor(c){if(this.sessionCache=new Map,this.config=c,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(c,t){let i=this.getUrlString(c),h=this.sessionCache.get(i);if(h){let w=h.poll();if(w&&!this.config.disableConcurrency)return w}let f=Tf.default.connect(i);if(this.config.maxConcurrency)f.settings({maxConcurrentStreams:this.config.maxConcurrency},(w)=>{if(w)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+c.destination.toString())});f.unref();let r=D(()=>{f.destroy(),this.deleteSession(i,f)},"destroySessionCb");if(f.on("goaway",r),f.on("error",r),f.on("frameError",r),f.on("close",()=>this.deleteSession(i,f)),t.requestTimeout)f.setTimeout(t.requestTimeout,r);let s=this.sessionCache.get(i)||new df;return s.offerLast(f),this.sessionCache.set(i,s),f}deleteSession(c,t){let i=this.sessionCache.get(c);if(!i)return;if(!i.contains(t))return;i.remove(t),this.sessionCache.set(c,i)}release(c,t){var i;let h=this.getUrlString(c);(i=this.sessionCache.get(h))==null||i.offerLast(t)}destroy(){for(let[c,t]of this.sessionCache){for(let i of t){if(!i.destroyed)i.destroy();t.remove(i)}this.sessionCache.delete(c)}}setMaxConcurrentStreams(c){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=c}setDisableConcurrentStreams(c){this.config.disableConcurrency=c}getUrlString(c){return c.destination.toString()}};D(pc,"NodeHttp2ConnectionManager");var xf=pc,vc=class n{constructor(c){this.metadata={handlerProtocol:"h2"},this.connectionManager=new xf({}),this.configProvider=new Promise((t,i)=>{if(typeof c==="function")c().then((h)=>{t(h||{})}).catch(i);else t(c||{})})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}destroy(){this.connectionManager.destroy()}async handle(c,{abortSignal:t}={}){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:h}=this.config;return new Promise((f,r)=>{var s;let w=!1,x=void 0,S=D(async(L)=>{await x,f(L)},"resolve"),u=D(async(L)=>{await x,r(L)},"reject");if(t==null?void 0:t.aborted){w=!0;let L=new Error("Request aborted");L.name="AbortError",u(L);return}let{hostname:d,method:$,port:E,protocol:I,query:e}=c,F="";if(c.username!=null||c.password!=null){let L=c.username??"",z=c.password??"";F=`${L}:${z}@`}let T=`${I}//${F}${d}${E?`:${E}`:""}`,C={destination:new URL(T)},y=this.connectionManager.lease(C,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:h||!1}),g=D((L)=>{if(h)this.destroySession(y);w=!0,u(L)},"rejectWithDestroy"),o=Bc.buildQueryString(e||{}),G=c.path;if(o)G+=`?${o}`;if(c.fragment)G+=`#${c.fragment}`;let N=y.request({...c.headers,[Mc.constants.HTTP2_HEADER_PATH]:G,[Mc.constants.HTTP2_HEADER_METHOD]:$});if(y.ref(),N.on("response",(L)=>{let z=new Rc.HttpResponse({statusCode:L[":status"]||-1,headers:Hc(L),body:N});if(w=!0,S({response:z}),h)y.close(),this.connectionManager.deleteSession(T,y)}),i)N.setTimeout(i,()=>{N.close();let L=new Error(`Stream timed out because of no activity for ${i} ms`);L.name="TimeoutError",g(L)});if(t){let L=D(()=>{N.close();let z=new Error("Request aborted");z.name="AbortError",g(z)},"onAbort");if(typeof t.addEventListener==="function"){let z=t;z.addEventListener("abort",L,{once:!0}),N.once("close",()=>z.removeEventListener("abort",L))}else t.onabort=L}N.on("frameError",(L,z,Ki)=>{g(new Error(`Frame type id ${L} in stream id ${Ki} has failed with code ${z}.`))}),N.on("error",g),N.on("aborted",()=>{g(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${N.rstCode}.`))}),N.on("close",()=>{if(y.unref(),h)y.destroy();if(!w)g(new Error("Unexpected error: http2 request did not get a response"))}),x=Un(N,c,i)})}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[c]:t}})}httpHandlerConfigs(){return this.config??{}}destroySession(c){if(!c.destroyed)c.destroy()}};D(vc,"NodeHttp2Handler");var Cf=vc,qc=class n extends kc.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(c,t,i){this.bufferedBytes.push(c),i()}};D(qc,"Collector");var ef=qc,Ff=D((n)=>{if(Ef(n))return ac(n);return new Promise((c,t)=>{let i=new ef;n.pipe(i),n.on("error",(h)=>{i.end(),t(h)}),i.on("error",t),i.on("finish",function(){let h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},"streamCollector"),Ef=D((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");async function ac(n){let c=[],t=n.getReader(),i=!1,h=0;while(!i){let{done:s,value:w}=await t.read();if(w)c.push(w),h+=w.length;i=s}let f=new Uint8Array(h),r=0;for(let s of c)f.set(s,r),r+=s.length;return f}D(ac,"collectReadableStream")});var rt=U((gs,ft)=>{var{defineProperty:tn,getOwnPropertyDescriptor:Sf,getOwnPropertyNames:yf}=Object,If=Object.prototype.hasOwnProperty,W=(n,c)=>tn(n,"name",{value:c,configurable:!0}),Uf=(n,c)=>{for(var t in c)tn(n,t,{get:c[t],enumerable:!0})},Df=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of yf(c))if(!If.call(n,h)&&h!==t)tn(n,h,{get:()=>c[h],enumerable:!(i=Sf(c,h))||i.enumerable})}return n},Lf=(n)=>Df(tn({},"__esModule",{value:!0}),n),ct={};Uf(ct,{FetchHttpHandler:()=>of,keepAliveSupport:()=>cn,streamCollector:()=>Nf});ft.exports=Lf(ct);var nt=m(),gf=Sn();function tt(n=0){return new Promise((c,t)=>{if(n)setTimeout(()=>{let i=new Error(`Request did not complete within ${n} ms`);i.name="TimeoutError",t(i)},n)})}W(tt,"requestTimeout");var cn={supported:void 0},it=class n{static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}constructor(c){if(typeof c==="function")this.configProvider=c().then((t)=>t||{});else this.config=c??{},this.configProvider=Promise.resolve(this.config);if(cn.supported===void 0)cn.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(c,{abortSignal:t}={}){var i;if(!this.config)this.config=await this.configProvider;let h=this.config.requestTimeout,f=this.config.keepAlive===!0,r=this.config.credentials;if(t==null?void 0:t.aborted){let T=new Error("Request aborted");return T.name="AbortError",Promise.reject(T)}let s=c.path,w=gf.buildQueryString(c.query||{});if(w)s+=`?${w}`;if(c.fragment)s+=`#${c.fragment}`;let x="";if(c.username!=null||c.password!=null){let T=c.username??"",C=c.password??"";x=`${T}:${C}@`}let{port:S,method:u}=c,d=`${c.protocol}//${x}${c.hostname}${S?`:${S}`:""}${s}`,$=u==="GET"||u==="HEAD"?void 0:c.body,E={body:$,headers:new Headers(c.headers),method:u,credentials:r};if((i=this.config)==null?void 0:i.cache)E.cache=this.config.cache;if($)E.duplex="half";if(typeof AbortController!=="undefined")E.signal=t;if(cn.supported)E.keepalive=f;if(typeof this.config.requestInit==="function")Object.assign(E,this.config.requestInit(c));let I=W(()=>{},"removeSignalEventListener"),e=new Request(d,E),F=[fetch(e).then((T)=>{let C=T.headers,y={};for(let o of C.entries())y[o[0]]=o[1];if(T.body==null)return T.blob().then((o)=>({response:new nt.HttpResponse({headers:y,reason:T.statusText,statusCode:T.status,body:o})}));return{response:new nt.HttpResponse({headers:y,reason:T.statusText,statusCode:T.status,body:T.body})}}),tt(h)];if(t)F.push(new Promise((T,C)=>{let y=W(()=>{let g=new Error("Request aborted");g.name="AbortError",C(g)},"onAbort");if(typeof t.addEventListener==="function"){let g=t;g.addEventListener("abort",y,{once:!0}),I=W(()=>g.removeEventListener("abort",y),"removeSignalEventListener")}else t.onabort=y}));return Promise.race(F).finally(I)}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return i[c]=t,i})}httpHandlerConfigs(){return this.config??{}}};W(it,"FetchHttpHandler");var of=it,Nf=W(async(n)=>{if(typeof Blob==="function"&&n instanceof Blob)return new Uint8Array(await n.arrayBuffer());return ht(n)},"streamCollector");async function ht(n){let c=[],t=n.getReader(),i=!1,h=0;while(!i){let{done:s,value:w}=await t.read();if(w)c.push(w),h+=w.length;i=s}let f=new Uint8Array(h),r=0;for(let s of c)f.set(s,r),r+=s.length;return f}W(ht,"collectStream")});var xt=U((os,dt)=>{var{defineProperty:hn,getOwnPropertyDescriptor:Yf,getOwnPropertyNames:zf}=Object,Zf=Object.prototype.hasOwnProperty,st=(n,c)=>hn(n,"name",{value:c,configurable:!0}),Qf=(n,c)=>{for(var t in c)hn(n,t,{get:c[t],enumerable:!0})},Kf=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of zf(c))if(!Zf.call(n,h)&&h!==t)hn(n,h,{get:()=>c[h],enumerable:!(i=Yf(c,h))||i.enumerable})}return n},Vf=(n)=>Kf(hn({},"__esModule",{value:!0}),n),ut={};Qf(ut,{fromHex:()=>$t,toHex:()=>Tt});dt.exports=Vf(ut);var wt={},Dn={};for(let n=0;n<256;n++){let c=n.toString(16).toLowerCase();if(c.length===1)c=`0${c}`;wt[n]=c,Dn[c]=n}function $t(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let c=new Uint8Array(n.length/2);for(let t=0;t<n.length;t+=2){let i=n.slice(t,t+2).toLowerCase();if(i in Dn)c[t/2]=Dn[i];else throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return c}st($t,"fromHex");function Tt(n){let c="";for(let t=0;t<n.byteLength;t++)c+=wt[n[t]];return c}st(Tt,"toHex")});var J=U((Ct)=>{Object.defineProperty(Ct,"__esModule",{value:!0});Ct.isReadableStream=void 0;var Xf=(n)=>{var c;return typeof ReadableStream==="function"&&(((c=n===null||n===void 0?void 0:n.constructor)===null||c===void 0?void 0:c.name)===ReadableStream.name||n instanceof ReadableStream)};Ct.isReadableStream=Xf});var Ut=U((yt)=>{Object.defineProperty(yt,"__esModule",{value:!0});yt.sdkStreamMixin=void 0;var Gf=rt(),jf=R(),Wf=xt(),Jf=v(),Ft=J(),Et="The stream has already been transformed.",Mf=(n)=>{var c,t;if(!St(n)&&!Ft.isReadableStream(n)){let r=((t=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||t===void 0?void 0:t.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let i=!1,h=async()=>{if(i)throw new Error(Et);return i=!0,await Gf.streamCollector(n)},f=(r)=>{if(typeof r.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 r.stream()};return Object.assign(n,{transformToByteArray:h,transformToString:async(r)=>{let s=await h();if(r==="base64")return jf.toBase64(s);else if(r==="hex")return Wf.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return Jf.toUtf8(s);else if(typeof TextDecoder==="function")return new TextDecoder(r).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(i)throw new Error(Et);if(i=!0,St(n))return f(n);else if(Ft.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};yt.sdkStreamMixin=Mf;var St=(n)=>typeof Blob==="function"&&n instanceof Blob});var ot=U((Lt)=>{Object.defineProperty(Lt,"__esModule",{value:!0});Lt.sdkStreamMixin=void 0;var bf=_c(),Af=A(),Ln=import.meta.require("stream"),Rf=import.meta.require("util"),Bf=Ut(),Dt="The stream has already been transformed.",Hf=(n)=>{var c,t;if(!(n instanceof Ln.Readable))try{return Bf.sdkStreamMixin(n)}catch(f){let r=((t=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||t===void 0?void 0:t.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let i=!1,h=async()=>{if(i)throw new Error(Dt);return i=!0,await bf.streamCollector(n)};return Object.assign(n,{transformToByteArray:h,transformToString:async(f)=>{let r=await h();if(f===void 0||Buffer.isEncoding(f))return Af.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(f);else return new Rf.TextDecoder(f).decode(r)},transformToWebStream:()=>{if(i)throw new Error(Dt);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Ln.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,Ln.Readable.toWeb(n)}})};Lt.sdkStreamMixin=Hf});var zt=U((Nt)=>{Object.defineProperty(Nt,"__esModule",{value:!0});Nt.splitStream=void 0;async function kf(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Nt.splitStream=kf});var Vt=U((Qt)=>{Object.defineProperty(Qt,"__esModule",{value:!0});Qt.splitStream=void 0;var Zt=import.meta.require("stream"),Pf=zt(),lf=J();async function Of(n){if(lf.isReadableStream(n))return Pf.splitStream(n);let c=new Zt.PassThrough,t=new Zt.PassThrough;return n.pipe(c),n.pipe(t),[c,t]}Qt.splitStream=Of});var jt=U((Xt)=>{Object.defineProperty(Xt,"__esModule",{value:!0});Xt.headStream=void 0;async function pf(n,c){var t;let i=0,h=[],f=n.getReader(),r=!1;while(!r){let{done:x,value:S}=await f.read();if(S)h.push(S),i+=(t=S===null||S===void 0?void 0:S.byteLength)!==null&&t!==void 0?t:0;if(i>=c)break;r=x}f.releaseLock();let s=new Uint8Array(Math.min(c,i)),w=0;for(let x of h){if(x.byteLength>s.byteLength-w){s.set(x.subarray(0,s.byteLength-w),w);break}else s.set(x,w);w+=x.length}return s}Xt.headStream=pf});var bt=U((Jt)=>{Object.defineProperty(Jt,"__esModule",{value:!0});Jt.headStream=void 0;var vf=import.meta.require("stream"),qf=jt(),af=J(),mf=(n,c)=>{if(af.isReadableStream(n))return qf.headStream(n,c);return new Promise((t,i)=>{let h=new Wt;h.limit=c,n.pipe(h),n.on("error",(f)=>{h.end(),i(f)}),h.on("error",i),h.on("finish",function(){let f=new Uint8Array(Buffer.concat(this.buffers));t(f)})})};Jt.headStream=mf;class Wt extends vf.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(n,c,t){var i;if(this.buffers.push(n),this.bytesBuffered+=(i=n.byteLength)!==null&&i!==void 0?i:0,this.bytesBuffered>=this.limit){let h=this.bytesBuffered-this.limit,f=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=f.subarray(0,f.byteLength-h),this.emit("finish")}t()}}});var gn=U((Rt)=>{Object.defineProperty(Rt,"__esModule",{value:!0});Rt.ChecksumStream=void 0;var _f=R(),nr=import.meta.require("stream");class At extends nr.Duplex{constructor({expectedChecksum:n,checksum:c,source:t,checksumSourceLocation:i,base64Encoder:h}){var f,r;super();if(typeof t.pipe==="function")this.source=t;else throw new Error(`@smithy/util-stream: unsupported source type ${(r=(f=t===null||t===void 0?void 0:t.constructor)===null||f===void 0?void 0:f.name)!==null&&r!==void 0?r:t} in ChecksumStream.`);this.base64Encoder=h!==null&&h!==void 0?h:_f.toBase64,this.expectedChecksum=n,this.checksum=c,this.checksumSourceLocation=i,this.source.pipe(this)}_read(n){}_write(n,c,t){try{this.checksum.update(n),this.push(n)}catch(i){return t(i)}return t()}async _final(n){try{let c=await this.checksum.digest(),t=this.base64Encoder(c);if(this.expectedChecksum!==t)return n(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${t}" in response header "${this.checksumSourceLocation}".`))}catch(c){return n(c)}return this.push(null),n()}}Rt.ChecksumStream=At});var lt=U((kt)=>{Object.defineProperty(kt,"__esModule",{value:!0});kt.ChecksumStream=void 0;var cr=typeof ReadableStream==="function"?ReadableStream:function(){};class Ht extends cr{}kt.ChecksumStream=Ht});var vt=U((Ot)=>{Object.defineProperty(Ot,"__esModule",{value:!0});Ot.createChecksumStream=void 0;var tr=R(),ir=J(),hr=lt(),fr=({expectedChecksum:n,checksum:c,source:t,checksumSourceLocation:i,base64Encoder:h})=>{var f,r;if(!ir.isReadableStream(t))throw new Error(`@smithy/util-stream: unsupported source type ${(r=(f=t===null||t===void 0?void 0:t.constructor)===null||f===void 0?void 0:f.name)!==null&&r!==void 0?r:t} in ChecksumStream.`);let s=h!==null&&h!==void 0?h:tr.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let w=new TransformStream({start(){},async transform(S,u){c.update(S),u.enqueue(S)},async flush(S){let u=await c.digest(),d=s(u);if(n!==d){let $=new Error(`Checksum mismatch: expected "${n}" but received "${d}" in response header "${i}".`);S.error($)}else S.terminate()}});t.pipeThrough(w);let x=w.readable;return Object.setPrototypeOf(x,hr.ChecksumStream.prototype),x};Ot.createChecksumStream=fr});var mt=U((qt)=>{Object.defineProperty(qt,"__esModule",{value:!0});qt.createChecksumStream=void 0;var rr=J(),sr=gn(),ur=vt();function wr(n){if(typeof ReadableStream==="function"&&rr.isReadableStream(n.source))return ur.createChecksumStream(n);return new sr.ChecksumStream(n)}qt.createChecksumStream=wr});var hi=U((Js,K)=>{var{defineProperty:fn,getOwnPropertyDescriptor:$r,getOwnPropertyNames:Tr}=Object,dr=Object.prototype.hasOwnProperty,Yn=(n,c)=>fn(n,"name",{value:c,configurable:!0}),xr=(n,c)=>{for(var t in c)fn(n,t,{get:c[t],enumerable:!0})},on=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Tr(c))if(!dr.call(n,h)&&h!==t)fn(n,h,{get:()=>c[h],enumerable:!(i=$r(c,h))||i.enumerable})}return n},M=(n,c,t)=>(on(n,c,"default"),t&&on(t,c,"default")),Cr=(n)=>on(fn({},"__esModule",{value:!0}),n),Q={};xr(Q,{Uint8ArrayBlobAdapter:()=>Nn});K.exports=Cr(Q);var _t=R(),ni=v();function ci(n,c="utf-8"){if(c==="base64")return _t.toBase64(n);return ni.toUtf8(n)}Yn(ci,"transformToString");function ti(n,c){if(c==="base64")return Nn.mutate(_t.fromBase64(n));return Nn.mutate(ni.fromUtf8(n))}Yn(ti,"transformFromString");var ii=class n extends Uint8Array{static fromString(c,t="utf-8"){switch(typeof c){case"string":return ti(c,t);default:throw new Error(`Unsupported conversion from ${typeof c} to Uint8ArrayBlobAdapter.`)}}static mutate(c){return Object.setPrototypeOf(c,n.prototype),c}transformToString(c="utf-8"){return ci(this,c)}};Yn(ii,"Uint8ArrayBlobAdapter");var Nn=ii;M(Q,yc(),K.exports);M(Q,ot(),K.exports);M(Q,Vt(),K.exports);M(Q,bt(),K.exports);M(Q,J(),K.exports);M(Q,mt(),K.exports);M(Q,gn(),K.exports)});var H=U((Ms,si)=>{var{defineProperty:Qn,getOwnPropertyDescriptor:er,getOwnPropertyNames:Fr}=Object,Er=Object.prototype.hasOwnProperty,Sr=(n,c)=>{for(var t in c)Qn(n,t,{get:c[t],enumerable:!0})},yr=(n,c,t,i)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Fr(c))if(!Er.call(n,h)&&h!==t)Qn(n,h,{get:()=>c[h],enumerable:!(i=er(c,h))||i.enumerable})}return n},Ir=(n)=>yr(Qn({},"__esModule",{value:!0}),n),fi={};Sr(fi,{RequestBuilder:()=>ri,collectBody:()=>Ur,extendedEncodeURIComponent:()=>Zn,requestBuilder:()=>gr,resolvedPath:()=>or});si.exports=Ir(fi);var zn=hi(),Ur=async(n=new Uint8Array,c)=>{if(n instanceof Uint8Array)return zn.Uint8ArrayBlobAdapter.mutate(n);if(!n)return zn.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let t=c.streamCollector(n);return zn.Uint8ArrayBlobAdapter.mutate(await t)};function Zn(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})}var Dr=H(),Lr=m();function gr(n,c){return new ri(n,c)}var ri=class{constructor(n,c){this.input=n,this.context=c,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:n,protocol:c="https",port:t,path:i}=await this.context.endpoint();this.path=i;for(let h of this.resolvePathStack)h(this.path);return new Lr.HttpRequest({protocol:c,hostname:this.hostname||n,port:t,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(n){return this.hostname=n,this}bp(n){return this.resolvePathStack.push((c)=>{this.path=`${(c==null?void 0:c.endsWith("/"))?c.slice(0,-1):c||""}`+n}),this}p(n,c,t,i){return this.resolvePathStack.push((h)=>{this.path=Dr.resolvedPath(h,this.input,n,c,t,i)}),this}h(n){return this.headers=n,this}q(n){return this.query=n,this}b(n){return this.body=n,this}m(n){return this.method=n,this}},or=(n,c,t,i,h,f)=>{if(c!=null&&c[t]!==void 0){let r=i();if(r.length<=0)throw new Error("Empty value provided for input HTTP label: "+t+".");n=n.replace(h,f?r.split("/").map((s)=>Zn(s)).join("/"):Zn(r))}else throw new Error("No value provided for input HTTP label: "+t+".");return n}});var ln=Z($n(),1);class Mi{constructor(n){this.config=n,this.middlewareStack=ln.constructStack()}send(n,c,t){let i=typeof c!=="function"?c:void 0,h=typeof c==="function"?c:t,f=i===void 0&&this.config.cacheMiddleware===!0,r;if(f){if(!this.handlers)this.handlers=new WeakMap;let s=this.handlers;if(s.has(n.constructor))r=s.get(n.constructor);else r=n.resolveMiddleware(this.middlewareStack,this.config,i),s.set(n.constructor,r)}else delete this.handlers,r=n.resolveMiddleware(this.middlewareStack,this.config,i);if(h)r(n).then((s)=>h(null,s.output),(s)=>h(s)).catch(()=>{});else return r(n).then((s)=>s.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var On=Z($n(),1),pn=Z(P(),1);class vn{constructor(){this.middlewareStack=On.constructStack()}static classBuilder(){return new qn}resolveMiddlewareWithContext(n,c,t,{middlewareFn:i,clientName:h,commandName:f,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:w,additionalContext:x,CommandCtor:S}){for(let I of i.bind(this)(S,n,c,t))this.middlewareStack.use(I);let u=n.concat(this.middlewareStack),{logger:d}=c,$={logger:d,clientName:h,commandName:f,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[pn.SMITHY_CONTEXT_KEY]:{commandInstance:this,...w},...x},{requestHandler:E}=c;return u.resolve((I)=>E.handle(I.request,t||{}),$)}}class qn{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(n)=>n,this._outputFilterSensitiveLog=(n)=>n,this._serializer=null,this._deserializer=null}init(n){this._init=n}ep(n){return this._ep=n,this}m(n){return this._middlewareFn=n,this}s(n,c,t={}){return this._smithyContext={service:n,operation:c,...t},this}c(n={}){return this._additionalContext=n,this}n(n,c){return this._clientName=n,this._commandName=c,this}f(n=(t)=>t,c=(t)=>t){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=c,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){let n=this,c;return c=class extends vn{static getEndpointParameterInstructions(){return n._ep}constructor(...[t]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=t??{},n._init(this)}resolveMiddleware(t,i,h){return this.resolveMiddlewareWithContext(t,i,h,{CommandCtor:c,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var us="***SensitiveInformation***";var $s=(n,c)=>{for(let t of Object.keys(n)){let i=n[t],h=async function(r,s,w){let x=new i(r);if(typeof s==="function")this.send(x,s);else if(typeof w==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(x,s||{},w)}else return this.send(x,s)},f=(t[0].toLowerCase()+t.slice(1)).replace(/Command$/,"");c.prototype[f]=h}};class an extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,an.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var mn=(n,c={})=>{Object.entries(c).filter(([,i])=>i!==void 0).forEach(([i,h])=>{if(n[i]==null||n[i]==="")n[i]=h});let t=n.message||n.Message||"UnknownError";return n.message=t,delete n.Message,n};var Nr=Z(H(),1);var Yr=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){let c=parseFloat(n);if(!Number.isNaN(c)){if(String(c)!==String(n))ei.warn(Ci(`Expected number but observed string: ${n}`));return c}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},zr=Math.ceil(340282346638528860000000000000000000000),ui=(n)=>{let c=Yr(n);if(c!==void 0&&!Number.isNaN(c)&&c!==1/0&&c!==-1/0){if(Math.abs(c)>zr)throw new TypeError(`Expected 32-bit float, got ${n}`)}return c},Zr=(n)=>{if(n===null||n===void 0)return;if(Number.isInteger(n)&&!Number.isNaN(n))return n;throw new TypeError(`Expected integer, got ${typeof n}: ${n}`)};var wi=(n)=>Kn(n,32),$i=(n)=>Kn(n,16),Ti=(n)=>Kn(n,8),Kn=(n,c)=>{let t=Zr(n);if(t!==void 0&&Qr(t,c)!==t)throw new TypeError(`Expected ${c}-bit integer, got ${n}`);return t},Qr=(n,c)=>{switch(c){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},Rs=(n,c)=>{if(n===null||n===void 0){if(c)throw new TypeError(`Expected a non-null value for ${c}`);throw new TypeError("Expected a non-null value")}return n},Bs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;let c=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${c}: ${n}`)},Hs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return ei.warn(Ci(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var di=(n)=>{if(typeof n=="string")return ui(rn(n));return ui(n)},Kr=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,rn=(n)=>{let c=n.match(Kr);if(c===null||c[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var ks=(n)=>{if(typeof n==="string")return wi(rn(n));return wi(n)},Vn=(n)=>{if(typeof n==="string")return $i(rn(n));return $i(n)},xi=(n)=>{if(typeof n==="string")return Ti(rn(n));return Ti(n)},Ci=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((c)=>!c.includes("stackTraceWarning")).join("\n")},ei={warn:console.warn};var Vr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var Xr=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ps=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let c=Xr.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");let[t,i,h,f,r,s,w,x]=c,S=Vn(Xn(i)),u=b(h,"month",1,12),d=b(f,"day",1,31);return Fi(S,u,d,{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x})},Gr=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),vs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let c=Gr.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");let[t,i,h,f,r,s,w,x,S]=c,u=Vn(Xn(i)),d=b(h,"month",1,12),$=b(f,"day",1,31),E=Fi(u,d,$,{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x});if(S.toUpperCase()!="Z")E.setTime(E.getTime()-br(S));return E},qs=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$/),as=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$/),ms=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 Fi=(n,c,t,i)=>{let h=c-1;return Wr(n,h,t),new Date(Date.UTC(n,h,t,b(i.hours,"hour",0,23),b(i.minutes,"minute",0,59),b(i.seconds,"seconds",0,60),Mr(i.fractionalMilliseconds)))};var jr=[31,28,31,30,31,30,31,31,30,31,30,31],Wr=(n,c,t)=>{let i=jr[c];if(c===1&&Jr(n))i=29;if(t>i)throw new TypeError(`Invalid day for ${Vr[c]} in ${n}: ${t}`)},Jr=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},b=(n,c,t,i)=>{let h=xi(Xn(n));if(h<t||h>i)throw new TypeError(`${c} must be between ${t} and ${i}, inclusive`);return h},Mr=(n)=>{if(n===null||n===void 0)return 0;return di("0."+n)*1000},br=(n)=>{let c=n[0],t=1;if(c=="+")t=1;else if(c=="-")t=-1;else throw new TypeError(`Offset direction, ${c}, must be "+" or "-"`);let i=Number(n.substring(1,3)),h=Number(n.substring(4,6));return t*(i*60+h)*60*1000},Xn=(n)=>{let c=0;while(c<n.length-1&&n.charAt(c)==="0")c++;if(c===0)return n;return n.slice(c)};var Ar=({output:n,parsedBody:c,exceptionCtor:t,errorCode:i})=>{let h=Rr(n),f=h.httpStatusCode?h.httpStatusCode+"":void 0,r=new t({name:c?.code||c?.Code||i||f||"UnknownError",$fault:"client",$metadata:h});throw mn(r,c)},cu=(n)=>{return({output:c,parsedBody:t,errorCode:i})=>{Ar({output:c,parsedBody:t,exceptionCtor:n,errorCode:i})}},Rr=(n)=>({httpStatusCode:n.statusCode,requestId:n.headers["x-amzn-requestid"]??n.headers["x-amzn-request-id"]??n.headers["x-amz-request-id"],extendedRequestId:n.headers["x-amz-id-2"],cfId:n.headers["x-amz-cf-id"]});var iu=(n)=>{switch(n){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 Ei=!1,fu=(n)=>{if(n&&!Ei&&parseInt(n.substring(1,n.indexOf(".")))<16)Ei=!0};var Br=Z(H(),1);var Gn=Z(P(),1);var Si=(n)=>{let c=[];for(let t in Gn.AlgorithmId){let i=Gn.AlgorithmId[t];if(n[i]===void 0)continue;c.push({algorithmId:()=>i,checksumConstructor:()=>n[i]})}return{_checksumAlgorithms:c,addChecksumAlgorithm(t){this._checksumAlgorithms.push(t)},checksumAlgorithms(){return this._checksumAlgorithms}}},yi=(n)=>{let c={};return n.checksumAlgorithms().forEach((t)=>{c[t.algorithmId()]=t.checksumConstructor()}),c};var Ii=(n)=>{let c=n.retryStrategy;return{setRetryStrategy(t){c=t},retryStrategy(){return c}}},Ui=(n)=>{let c={};return c.retryStrategy=n.retryStrategy(),c};var du=(n)=>{return{...Si(n),...Ii(n)}};var xu=(n)=>{return{...yi(n),...Ui(n)}};var Eu=(n)=>Array.isArray(n)?n:[n];var Iu=(n)=>{return n!=null};var jn=function(){let n=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,n.prototype),t};jn.prototype=Object.create(String.prototype,{constructor:{value:jn,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(jn,String);class Hr{trace(){}debug(){}info(){}warn(){}error(){}}function kr(n,c,t){let i,h,f;if(typeof c==="undefined"&&typeof t==="undefined")i={},f=n;else if(i=n,typeof c==="function")return h=c,f=t,Pr(i,h,f);else f=c;for(let r of Object.keys(f)){if(!Array.isArray(f[r])){i[r]=f[r];continue}Di(i,null,f,r)}return i}var gu=(n,c)=>{let t={};for(let i in c)Di(t,n,c,i);return t},Pr=(n,c,t)=>{return kr(n,Object.entries(t).reduce((i,[h,f])=>{if(Array.isArray(f))i[h]=f;else if(typeof f==="function")i[h]=[c,f()];else i[h]=[c,f];return i},{}))},Di=(n,c,t,i)=>{if(c!==null){let r=t[i];if(typeof r==="function")r=[,r];let[s=lr,w=Or,x=i]=r;if(typeof s==="function"&&s(c[x])||typeof s!=="function"&&!!s)n[i]=w(c[x]);return}let[h,f]=t[i];if(typeof f==="function"){let r,s=h===void 0&&(r=f())!=null,w=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(s)n[i]=r;else if(w)n[i]=f()}else{let r=h===void 0&&f!=null,s=typeof h==="function"&&!!h(f)||typeof h!=="function"&&!!h;if(r||s)n[i]=f}},lr=(n)=>n!=null,Or=(n)=>n;var pr=Z(H(),1);var Li=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((c)=>c!=null).map(Li);if(typeof n==="object"){let c={};for(let t of Object.keys(n)){if(n[t]==null)continue;c[t]=Li(n[t])}return c}return n};var h0=(n)=>{let c=n.httpHandler;return{setHttpHandler(t){c=t},httpHandler(){return c},updateHttpClientConfig(t,i){c.updateHttpClientConfig(t,i)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},f0=(n)=>{return{httpHandler:n.httpHandler()}};var vr=Z(P(),1);class Wn{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 c=new Wn({...n,headers:{...n.headers}});if(c.query)c.query=qr(c.query);return c}static isInstance(n){if(!n)return!1;let c=n;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return Wn.clone(this)}}function qr(n){return Object.keys(n).reduce((c,t)=>{let i=n[t];return{...c,[t]:Array.isArray(i)?[...i]:i}},{})}class sn{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 c=n;return typeof c.statusCode==="number"&&typeof c.headers==="object"}}var un=Z(Fn(),1);function Jn(n){let c=[];for(let t of Object.keys(n).sort()){let i=n[t];if(t=un.escapeUri(t),Array.isArray(i))for(let h=0,f=i.length;h<f;h++)c.push(`${t}=${un.escapeUri(i[h])}`);else{let h=t;if(i||typeof i==="string")h+=`=${un.escapeUri(i)}`;c.push(h)}}return c.join("&")}import{Agent as Zi,request as _r}from"http";import{Agent as Qi,request as ns}from"https";var gi=["ECONNRESET","EPIPE","ETIMEDOUT"];var Mn=(n)=>{let c={};for(let t of Object.keys(n)){let i=n[t];c[t]=Array.isArray(i)?i.join(","):i}return c};var oi=(n,c,t=0)=>{if(!t)return-1;let i=(h)=>{let f=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${t} ms`),{name:"TimeoutError"}))},t-h),r=(s)=>{if(s?.connecting)s.on("connect",()=>{clearTimeout(f)});else clearTimeout(f)};if(n.socket)r(n.socket);else n.on("socket",r)};if(t<2000)return i(0),0;return setTimeout(i.bind(null,1000),1000)};var Ni=(n,{keepAlive:c,keepAliveMsecs:t},i=3000)=>{if(c!==!0)return-1;let h=()=>{if(n.socket)n.socket.setKeepAlive(c,t||0);else n.on("socket",(f)=>{f.setKeepAlive(c,t||0)})};if(i===0)return h(),0;return setTimeout(h,i)};var Yi=(n,c,t=0)=>{let i=(h)=>{n.setTimeout(t-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${t} ms`),{name:"TimeoutError"}))})};if(0<t&&t<6000)return i(0),0;return setTimeout(i.bind(null,t===0?0:3000),3000)};import{Readable as ar}from"stream";var zi=1000;async function bn(n,c,t=zi){let i=c.headers??{},h=i.Expect||i.expect,f=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{f=Number(setTimeout(s,Math.max(zi,t)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(f),s()}),n.on("error",()=>{r=!0,clearTimeout(f),s()})})]);if(!r)mr(n,c.body)}function mr(n,c){if(c instanceof ar){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}let t=c;if(typeof t==="object"&&t.buffer&&typeof t.byteOffset==="number"&&typeof t.byteLength==="number"){n.end(Buffer.from(t.buffer,t.byteOffset,t.byteLength));return}n.end(Buffer.from(c));return}n.end()}class An{static create(n){if(typeof n?.handle==="function")return n;return new An(n)}static checkSocketUsage(n,c,t=console){let{sockets:i,requests:h,maxSockets:f}=n;if(typeof f!=="number"||f===1/0)return c;let r=15000;if(Date.now()-r<c)return c;if(i&&h)for(let s in i){let w=i[s]?.length??0,x=h[s]?.length??0;if(w>=f&&x>=2*f)return t?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${w} and ${x} 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 c}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,t)=>{if(typeof n==="function")n().then((i)=>{c(this.resolveDefaultConfig(i))}).catch(t);else c(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){let{requestTimeout:c,connectionTimeout:t,socketTimeout:i,httpAgent:h,httpsAgent:f}=n||{},r=!0,s=50;return{connectionTimeout:t,requestTimeout:c??i,httpAgent:(()=>{if(h instanceof Zi||typeof h?.destroy==="function")return h;return new Zi({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(f instanceof Qi||typeof f?.destroy==="function")return f;return new Qi({keepAlive:!0,maxSockets:50,...f})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;return new Promise((t,i)=>{let h=void 0,f=[],r=async(T)=>{await h,f.forEach(clearTimeout),t(T)},s=async(T)=>{await h,f.forEach(clearTimeout),i(T)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c?.aborted){let T=new Error("Request aborted");T.name="AbortError",s(T);return}let w=n.protocol==="https:",x=w?this.config.httpsAgent:this.config.httpAgent;f.push(setTimeout(()=>{this.socketWarningTimestamp=An.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let S=Jn(n.query||{}),u=void 0;if(n.username!=null||n.password!=null){let T=n.username??"",C=n.password??"";u=`${T}:${C}`}let d=n.path;if(S)d+=`?${S}`;if(n.fragment)d+=`#${n.fragment}`;let $=n.hostname??"";if($[0]==="["&&$.endsWith("]"))$=n.hostname.slice(1,-1);else $=n.hostname;let E={headers:n.headers,host:$,method:n.method,path:d,port:n.port,agent:x,auth:u},e=(w?ns:_r)(E,(T)=>{let C=new sn({statusCode:T.statusCode||-1,reason:T.statusMessage,headers:Mn(T.headers),body:T});r({response:C})});if(e.on("error",(T)=>{if(gi.includes(T.code))s(Object.assign(T,{name:"TimeoutError"}));else s(T)}),c){let T=()=>{e.destroy();let C=new Error("Request aborted");C.name="AbortError",s(C)};if(typeof c.addEventListener==="function"){let C=c;C.addEventListener("abort",T,{once:!0}),e.once("close",()=>C.removeEventListener("abort",T))}else c.onabort=T}f.push(oi(e,s,this.config.connectionTimeout)),f.push(Yi(e,s,this.config.requestTimeout));let F=E.agent;if(typeof F==="object"&&"keepAlive"in F)f.push(Ni(e,{keepAlive:F.keepAlive,keepAliveMsecs:F.keepAliveMsecs}));h=bn(e,n,this.config.requestTimeout).catch((T)=>{return f.forEach(clearTimeout),i(T)})})}updateHttpClientConfig(n,c){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return{...t,[n]:c}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as cs}from"stream";class Rn extends cs{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,c,t){this.bufferedBytes.push(n),t()}}var tw=(n)=>{if(ts(n))return is(n);return new Promise((c,t)=>{let i=new Rn;n.pipe(i),n.on("error",(h)=>{i.end(),t(h)}),i.on("error",t),i.on("finish",function(){let h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},ts=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;async function is(n){let c=[],t=n.getReader(),i=!1,h=0;while(!i){let{done:s,value:w}=await t.read();if(w)c.push(w),h+=w.length;i=s}let f=new Uint8Array(h),r=0;for(let s of c)f.set(s,r),r+=s.length;return f}export{h0 as wa,f0 as xa,Wn as ya,sn as za,m as Aa,cc as Ba,A as Ca,v as Da,Fn as Ea,xt as Fa,hi as Ga,H as Ha,$n as Ia,Mi as Ja,vn as Ka,us as La,$s as Ma,Zr as Na,wi as Oa,Rs as Pa,Bs as Qa,Hs as Ra,ks as Sa,ps as Ta,vs as Ua,an as Va,mn as Wa,cu as Xa,iu as Ya,fu as Za,Br as _a,du as $a,xu as ab,Eu as bb,Iu as cb,Hr as db,kr as eb,gu as fb,Li as gb,An as hb,tw as ib};
|
package/dist/chunk-s2n3hw0a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ta as z,ua as P}from"./chunk-4wb68jfr.js";import"./chunk-p18kqenr.js";import"./chunk-25nxsybw.js";import{ub as D}from"./chunk-08bm2xax.js";import{vb as _}from"./chunk-qqp394c2.js";var m=_(D(),1);import{parse as o}from"url";var K=_(D(),1);import{Buffer as a}from"buffer";import{request as n}from"http";function u(c){return new Promise((I,x)=>{let T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let E=[];N.on("data",(y)=>{E.push(y)}),N.on("end",()=>{I(a.concat(E)),T.destroy()})}),T.end()})}var G=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",Q=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var uc=1000,Ec=0,X=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var f=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{let{timeout:I,maxRetries:x}=X(c);return()=>f(async()=>{let T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!G(N))throw new m.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return Q(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await u({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[v]){let I=o(process.env[v]);if(!I.hostname||!(I.hostname in l))throw new m.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new m.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new m.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${L} or ${v} environment variable is set`,{tryNextLink:!1,logger:c})};var q=_(D(),1);var U=_(D(),1);class Z extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Z.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var t={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P(await cc()||await Ic()),cc=async()=>z(t)(),Ic=async()=>{let c=await z(F)();switch(c){case S.IPv4:return A.IPv4;case S.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(S)}`)}};var b=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Tc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(Nc(c),{logger:c.logger}),Nc=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=X(c),E=async(y,$)=>{if(I||$.headers?.[M]==null){let w=!1,h=!1,C=await z({environmentVariableSelector:(Y)=>{let j=Y[H];if(h=!!j&&j!=="false",j===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{let j=Y[R];return w=!!j&&j!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){let Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new Z(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let p=(await f(async()=>{let w;try{w=await Oc($)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return f(async()=>{let w;try{w=await yc(p,$,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{let y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...y,timeout:N});else{let $;try{$=(await xc({...y,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...y,timeout:N})}return E(O,{...y,headers:{[M]:$},timeout:N})}}},xc=async(c)=>u({...c,path:Tc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Oc=async(c)=>(await u({...c,path:k})).toString(),yc=async(c,I,x)=>{let T=JSON.parse((await u({...I,path:k+c})).toString());if(!G(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return Q(T)};export{X as providerConfigFromInit,u as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,Kc as fromContainerMetadata,A as Endpoint,L as ENV_CMDS_RELATIVE_URI,v as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,uc as DEFAULT_TIMEOUT,Ec as DEFAULT_MAX_RETRIES};
|
package/dist/chunk-sk3x55wm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{kb as u,ob as w}from"./chunk-8gx9at51.js";import{wb as m}from"./chunk-gg80s18j.js";import{xb as s}from"./chunk-d2dbhn2h.js";var a=s(m(),1);var g=s(m(),1);function c(o){try{let r=new Set(Array.from(o.match(/([A-Z_]){3,}/g)??[]));return r.delete("CONFIG"),r.delete("CONFIG_PREFIX_SEPARATOR"),r.delete("ENV"),[...r].join(", ")}catch(r){return o}}var h=(o,r)=>async()=>{try{let t=o(process.env);if(t===void 0)throw new Error;return t}catch(t){throw new g.CredentialsProviderError(t.message||`Not found in ENV: ${c(o.toString())}`,{logger:r})}};var y=s(m(),1);var C=(o,{preferredFile:r="config",...t}={})=>async()=>{let e=u(t),{configFile:n,credentialsFile:i}=await w(t),f=i[e]||{},p=n[e]||{},N=r==="config"?{...f,...p}:{...p,...f};try{let d=o(N,r==="config"?n:i);if(d===void 0)throw new Error;return d}catch(l){throw new y.CredentialsProviderError(l.message||`Not found in config files w/ profile [${e}]: ${c(o.toString())}`,{logger:t.logger})}};var F=s(m(),1),x=(o)=>typeof o==="function",S=(o)=>x(o)?async()=>await o():F.fromStatic(o);var T=({environmentVariableSelector:o,configFileSelector:r,default:t},e={})=>a.memoize(a.chain(h(o),C(r,e),S(t)));function E(o){let r={};if(o=o.replace(/^\?/,""),o)for(let t of o.split("&")){let[e,n=null]=t.split("=");if(e=decodeURIComponent(e),n)n=decodeURIComponent(n);if(!(e in r))r[e]=n;else if(Array.isArray(r[e]))r[e].push(n);else r[e]=[r[e],n]}return r}var v=(o)=>{if(typeof o==="string")return v(new URL(o));let{hostname:r,pathname:t,port:e,protocol:n,search:i}=o,f;if(i)f=E(i);return{hostname:r,port:e?parseInt(e):void 0,protocol:n,path:t,query:f}};
|
|
2
|
-
export{T as ua,v as va};
|
package/dist/chunk-sm7vvfqf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{L as ge}from"./chunk-91pnyybg.js";import{$ as Ve,M as or,N as dr,O as yr,P as cr,Q as Zr,R as f,S as N,T as tr,U as $e,V as Ie,W as Re,X as Pe,Y as D,Z as ar,_ as Je,aa as We,ba as Ae,ca as mr,da as vr,ea as E,fa as wr,ga as Ke,ha as Me,ia as kr,ja as Be,ka as Sr,la as Ze,ma as fe,na as Fe,oa as De,pa as He,qa as Ne,ra as Ue,sa as qe,ta as _e,ua as lr,va as hr}from"./chunk-jg68fsnk.js";import{wa as $,xa as be}from"./chunk-b13gbfg3.js";import{$a as sr,Ja as Er,Ka as S,La as t,Ma as Br,Na as p,Oa as T,Pa as b,Qa as j,Ra as h,Va as $r,Wa as a,Xa as Fr,Ya as Le,Za as Qe,ab as ir,db as je,eb as y,fb as o,gb as I,hb as Xe,ib as Ye,ya as er,za as rr}from"./chunk-rfd43z7p.js";import"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import"./chunk-cm7bwdk9.js";import"./chunk-ha75r57f.js";import"./chunk-gg80s18j.js";import{xb as m}from"./chunk-d2dbhn2h.js";var R=m(N(),1);var re=m(D(),1),U=m(Zr(),1),se=async(e,s,r)=>{return{operation:U.getSmithyContext(s).operation,region:await U.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function fr(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}}function H(e){return{schemeId:"smithy.api#noAuth"}}var ie=(e)=>{let s=[];switch(e.operation){case"CreateToken":{s.push(H(e));break}case"RegisterClient":{s.push(H(e));break}case"StartDeviceAuthorization":{s.push(H(e));break}default:s.push(fr(e))}return s},le=(e)=>{return{...re.resolveAwsSdkSigV4Config(e)}};var he=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ne={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.679.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.679.0","@aws-sdk/credential-provider-node":"3.679.0","@aws-sdk/middleware-host-header":"3.679.0","@aws-sdk/middleware-logger":"3.679.0","@aws-sdk/middleware-recursion-detection":"3.679.0","@aws-sdk/middleware-user-agent":"3.679.0","@aws-sdk/region-config-resolver":"3.679.0","@aws-sdk/types":"3.679.0","@aws-sdk/util-endpoints":"3.679.0","@aws-sdk/util-user-agent-browser":"3.679.0","@aws-sdk/util-user-agent-node":"3.679.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.679.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var pe=m(D(),1);var xe=m(D(),1),ze=m(N(),1);var oe={["required"]:!1,type:"String"},de={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},we={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ke={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},v={},ce={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ee={["ref"]:"PartitionResult"},te={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ee,"supportsDualStack"]}]},ae=[we],me=[ke],ve=[{["ref"]:"Region"}],Nr={version:"1.0",parameters:{Region:oe,UseDualStack:de,UseFIPS:de,Endpoint:oe},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:me,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:v,headers:v},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ve}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ve,assign:"PartitionResult"}],rules:[{conditions:[we,ke],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,ce]},te],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:v,headers:v},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:ae,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[ce,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ee,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:v,headers:v},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:v,headers:v},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[te],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:v,headers:v},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:v,headers:v},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},Se=Nr;var _r=new $e({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Te=(e,s={})=>{return _r.get(e,()=>Re(Se,{endpointParams:e,logger:s.logger}))};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ue,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ie,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new xe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze.NoAuthSigner}],logger:e?.logger??new je,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??be,utf8Decoder:e?.utf8Decoder??Fe,utf8Encoder:e?.utf8Encoder??De}};var Ce=(e)=>{Qe(process.version);let s=_e(e),r=()=>s().then(Le),i=Ge(e);return pe.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ne,credentialDefaultProvider:e?.credentialDefaultProvider??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ze({serviceId:i.serviceId,clientVersion:ne.version}),maxAttempts:e?.maxAttempts??$(Me),region:e?.region??$(We,Ae),requestHandler:Xe.create(e?.requestHandler??r),retryMode:e?.retryMode??$({...Be,default:async()=>(await r()).retryMode||Ke}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??Ye,useDualstackEndpoint:e?.useDualstackEndpoint??$(Je),useFipsEndpoint:e?.useFipsEndpoint??$(Ve),userAgentAppId:e?.userAgentAppId??$(fe)}};var Oe=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){let n=s.findIndex((P)=>P.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},ue=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var q=(e)=>e,nr=(e,s)=>{let r={...q(lr(e)),...q(sr(e)),...q(er(e)),...q(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class _ extends Er{constructor(...[e]){let s=Ce(e||{}),r=he(s),i=tr(r),l=kr(i),n=mr(l),P=or(n),Qr=wr(P),Xr=le(Qr),ee=nr(Xr,e?.extensions||[]);super(ee);this.config=ee,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Sr(this.config)),this.middlewareStack.use(vr(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(R.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async(Yr)=>new R.DefaultIdentityProviderConfig({"aws.auth#sigv4":Yr.credentials})})),this.middlewareStack.use(R.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var Wr=m(f(),1);class d extends $r{constructor(e){super(e);Object.setPrototypeOf(this,d.prototype)}}class x extends d{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends d{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends d{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends d{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends d{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends d{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends d{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends d{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends d{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends d{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends d{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends d{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class X extends d{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}class Y extends d{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}var Ir=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Tr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),jr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=m(D(),1),F=m(N(),1);var Dr=async(e,s)=>{let r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{let r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l=y({[cs]:[,"t"]}),n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(P)=>I(P),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{let r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{let r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);let r=y({$metadata:c(e)}),i=b(j(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);let r=y({$metadata:c(e)}),i=b(j(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);let r=y({$metadata:c(e)}),i=b(j(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:p,clientSecret:h,clientSecretExpiresAt:p,tokenEndpoint:h});return Object.assign(r,l),r},Vr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);let r=y({$metadata:c(e)}),i=b(j(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:T,interval:T,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Z=async(e,s)=>{let r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Cr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await gr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Or(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await ur(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await es(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await ss(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ls(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ns(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await os(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ds(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ys(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await hs(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await rs(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await is(r,s);default:let l=r.body;return pr({output:e,parsedBody:l,errorCode:i})}},pr=Fr(d),Cr=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new x({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new z({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new G({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new J({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new V({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new X({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new W({$metadata:c(e),...r});return a(n,e.body)},is=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new Y({$metadata:c(e),...r});return a(n,e.body)},ls=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new A({$metadata:c(e),...r});return a(n,e.body)},hs=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);let n=new Q({$metadata:c(e),...r});return a(n,e.body)},ns=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new K({$metadata:c(e),...r});return a(n,e.body)},os=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new M({$metadata:c(e),...r});return a(n,e.body)},ds=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new B({$metadata:c(e),...r});return a(n,e.body)},ys=async(e,s)=>{let r=y({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new L({$metadata:c(e),...r});return a(n,e.body)},c=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var cs="aws_iam";class C extends S.classBuilder().ep(k).m(function(e,s,r,i){return[Wr.getSerdePlugin(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}var Ar=m(f(),1);class g extends S.classBuilder().ep(k).m(function(e,s,r,i){return[Ar.getSerdePlugin(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}var Kr=m(f(),1);class O extends S.classBuilder().ep(k).m(function(e,s,r,i){return[Kr.getSerdePlugin(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}var Mr=m(f(),1);class u extends S.classBuilder().ep(k).m(function(e,s,r,i){return[Mr.getSerdePlugin(r,this.serialize,this.deserialize),E(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var ts={CreateTokenCommand:C,CreateTokenWithIAMCommand:g,RegisterClientCommand:O,StartDeviceAuthorizationCommand:u};class Lr extends _{}Br(ts,Lr);export{Er as __Client,L as UnsupportedGrantTypeException,B as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,u as StartDeviceAuthorizationCommand,M as SlowDownException,d as SSOOIDCServiceException,_ as SSOOIDCClient,Lr as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,O as RegisterClientCommand,K as InvalidScopeException,Q as InvalidRequestRegionException,A as InvalidRequestException,Y as InvalidRedirectUriException,W as InvalidGrantException,X as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,g as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,C as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,S as $Command};
|
package/dist/chunk-sqbdav33.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{wb as a}from"./chunk-hrsat16n.js";import{yb as c}from"./chunk-yktee4wv.js";import{Db as E}from"./chunk-yvmyw2r2.js";var N=E(a(),1);import{readFileSync as p}from"fs";var i=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:s,providerId:n,policyArns:S,policy:d,durationSeconds:l}=e,{roleAssumerWithWebIdentity:t}=e;if(!t){let{getDefaultRoleAssumerWithWebIdentity:m}=await import("./chunk-06g79v9j.js");t=m({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return t({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:s,ProviderId:n,PolicyArns:S,Policy:d,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",T="AWS_ROLE_ARN",f="AWS_ROLE_SESSION_NAME",w=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[T],s=e?.roleSessionName??process.env[f];if(!o||!r)throw new c("Web identity configuration not specified",{logger:e.logger});let n=await i({...e,webIdentityToken:p(o,{encoding:"ascii"}),roleArn:r,roleSessionName:s})();if(o===process.env[_])N.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as fromWebToken,w as fromTokenFile};
|