create-sailor 1.9.1 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/aws-kms-FFRN23DK.js +1 -0
  2. package/dist/bowser-2VXD6AQS.js +11 -0
  3. package/dist/chunk-6MSNEPUX.js +0 -0
  4. package/dist/chunk-A3H5SUSR.js +8 -0
  5. package/dist/chunk-AN6QWW3N.js +1 -0
  6. package/dist/chunk-CVCZBECH.js +1 -0
  7. package/dist/chunk-GA44DNS2.js +1 -0
  8. package/dist/chunk-LDZWCNWB.js +0 -0
  9. package/dist/chunk-M3NEWJ7L.js +1 -0
  10. package/dist/{chunk-P2WEIQRQ.js → chunk-MGGNSWUA.js} +1 -1
  11. package/dist/chunk-MYIHTCRS.js +4 -0
  12. package/dist/chunk-PA4CKDRJ.js +1 -0
  13. package/dist/chunk-SYWJHPRX.js +0 -0
  14. package/dist/chunk-UWHWNXNX.js +19 -0
  15. package/dist/chunk-X6LE6K3W.js +0 -0
  16. package/dist/chunk-Z4YWESTY.js +2 -0
  17. package/dist/chunk-ZJ3BTCD6.js +17 -0
  18. package/dist/{credits-OHCRPX6E.js → credits-UUPQKRQZ.js} +2 -2
  19. package/dist/dist-23KDUT4O.js +1 -0
  20. package/dist/{dist-NHX3PJTW.js → dist-ZZCU5PKC.js} +2 -2
  21. package/dist/dist-es-7HF5URFJ.js +1 -0
  22. package/dist/dist-es-BORZTE76.js +1 -0
  23. package/dist/dist-es-CN2GMFBK.js +1 -0
  24. package/dist/dist-es-FQ6CEUEU.js +1 -0
  25. package/dist/dist-es-FSE4MSDA.js +5 -0
  26. package/dist/dist-es-H47VUS6Q.js +2 -0
  27. package/dist/dist-es-JCIK4C4M.js +2 -0
  28. package/dist/dist-es-MFZXYPBY.js +1 -0
  29. package/dist/dist-es-PREZ4TU2.js +1 -0
  30. package/dist/dist-es-TCZQ4KMP.js +2 -0
  31. package/dist/dist-es-Y7VP7FI6.js +2 -0
  32. package/dist/dist-es-YN4LRIZR.js +5 -0
  33. package/dist/event-streams-TNY7XPBF.js +1 -0
  34. package/dist/index.js +71 -71
  35. package/dist/loadSso-2XZQIDZP.js +1 -0
  36. package/dist/loadSso-FBBI5PDJ.js +1 -0
  37. package/dist/signin-CJMG23UU.js +1 -0
  38. package/dist/sso-oidc-26OCCRMC.js +1 -0
  39. package/dist/sts-4U2U3ZK4.js +1 -0
  40. package/dist/sts-CP4OREEC.js +1 -0
  41. package/package.json +14 -15
  42. package/dist/aws-kms-3GX7ZOSJ.js +0 -1
  43. package/dist/chunk-FNDUJLS6.js +0 -1
  44. package/dist/chunk-HGJYEXMU.js +0 -1
  45. package/dist/chunk-HX3EZBGO.js +0 -30
  46. package/dist/chunk-JTXBZ2SU.js +0 -1
  47. package/dist/chunk-KRX2KWWT.js +0 -1
  48. package/dist/chunk-OIQB5F6Y.js +0 -1
  49. package/dist/chunk-RH2FFVSB.js +0 -1
  50. package/dist/chunk-SPHQRDN5.js +0 -1
  51. package/dist/chunk-STX7THHW.js +0 -21
  52. package/dist/chunk-TX7AAHER.js +0 -1
  53. package/dist/chunk-VFREGXHN.js +0 -1
  54. package/dist/chunk-W5TBFCWY.js +0 -4
  55. package/dist/chunk-WU3IV4WF.js +0 -1
  56. package/dist/chunk-XB6R2VIU.js +0 -1
  57. package/dist/chunk-ZCWB3HFB.js +0 -1
  58. package/dist/dist-UXDXDLES.js +0 -1
  59. package/dist/dist-es-B5M7V6O6.js +0 -1
  60. package/dist/dist-es-FU66ZQS5.js +0 -1
  61. package/dist/dist-es-KE65J6GC.js +0 -1
  62. package/dist/dist-es-PFLN3FTL.js +0 -5
  63. package/dist/dist-es-U3NYQORW.js +0 -1
  64. package/dist/dist-es-VG3XXJ7M.js +0 -2
  65. package/dist/dist-es-WAHVDQ3F.js +0 -2
  66. package/dist/event-streams-BXAP5G2H.js +0 -1
  67. package/dist/event-streams-SGW54BDO.js +0 -1
  68. package/dist/loadSso-WRXP2HXL.js +0 -1
  69. package/dist/signin-JB7STGTR.js +0 -1
  70. package/dist/sso-oidc-LTNOJMPI.js +0 -1
  71. package/dist/sts-RKUL4Q47.js +0 -5
@@ -0,0 +1 @@
1
+ import{a as Ie}from"./chunk-M3NEWJ7L.js";import{a as Pe,b as ve,c as xe,d as Re,e as Ae,f as ye,g as Oe,h as be,i as He}from"./chunk-GA44DNS2.js";import{A as Te,D as Ne,E as De,F as we,G as ke,b as se,c as ne,f as ie,g as ae,l as pe,m as fe,o as ge,t as Se,u as Ee,z as Ce}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as _e}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as ue,E as me,F as de,G as le,H as he,b as H,c as U,e as G,g as $,h as M,i as q,j as z,l as j,n as W,o as Q,p as Y,r as J,t as X,u as Z,v as ce}from"./chunk-A3H5SUSR.js";import{A as b,C as F,E as I,F as L,G as B,H as K,I as V,R as te,S as oe,T as re,e as D,i as A,j as w,y as p,z as k}from"./chunk-Z4YWESTY.js";import{w as ee}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var Fe=async(e,t,o)=>({operation:D(t).operation,region:await A(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function ct(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(t,o)=>({signingProperties:{config:t,context:o}})}}function ut(e){return{schemeId:"smithy.api#noAuth"}}var Ue=e=>{let t=[];return e.operation==="GetRoleCredentials"?t.push(ut(e)):t.push(ct(e)),t},Ge=e=>{let t=Se(e);return Object.assign(t,{authSchemePreference:A(e.authSchemePreference??[])})};var $e=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),Me={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var m="ref",c=-1,h=!0,qe="isSet",Be="PartitionResult",f="booleanEquals",y="getAttr",ze={[m]:"Endpoint"},O={[m]:Be},u={},je=[{[m]:"Region"}],Le={conditions:[[qe,[ze]],[qe,je],["aws.partition",je,Be],[f,[{[m]:"UseFIPS"},h]],[f,[{[m]:"UseDualStack"},h]],[f,[{fn:y,argv:[O,"supportsDualStack"]},h]],[f,[{fn:y,argv:[O,"supportsFIPS"]},h]],["stringEquals",[{fn:y,argv:[O,"name"]},"aws-us-gov"]]],results:[[c],[c,"Invalid Configuration: FIPS and custom endpoint are not supported"],[c,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[ze,u],["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",u],[c,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://portal.sso.{Region}.amazonaws.com",u],["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",u],[c,"FIPS is enabled but this partition does not support FIPS"],["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",u],[c,"DualStack is enabled but this partition does not support DualStack"],["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",u],[c,"Invalid Configuration: Missing Region"]]},mt=2,s=1e8,dt=new Int32Array([-1,1,-1,0,13,3,1,4,s+12,2,5,s+12,3,8,6,4,7,s+11,5,s+9,s+10,4,11,9,6,10,s+8,7,s+6,s+7,5,12,s+5,6,s+4,s+5,3,s+1,14,4,s+2,s+3]),Ke=W.from(dt,mt,Le.conditions,Le.results);var lt=new Q({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ve=(e,t={})=>lt.get(e,()=>J(Ke,{endpointParams:e,logger:t.logger}));Y.aws=pe;var a=class e extends G{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var g=class e extends a{name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},S=class e extends a{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},E=class e extends a{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},_=class e extends a{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var ht="AccessTokenType",ft="GetRoleCredentials",gt="GetRoleCredentialsRequest",St="GetRoleCredentialsResponse",Et="InvalidRequestException",_t="RoleCredentials",Pt="ResourceNotFoundException",vt="SecretAccessKeyType",xt="SessionTokenType",Rt="TooManyRequestsException",Ct="UnauthorizedException",At="accountId",It="accessKeyId",yt="accessToken",Ot="account_id",P="client",v="error",Tt="expiration",Nt="http",x="httpError",Dt="httpHeader",We="httpQuery",R="message",wt="roleCredentials",kt="roleName",bt="role_name",Qe="smithy.ts.sdk.synthetic.com.amazonaws.sso",Ht="secretAccessKey",Ft="sessionToken",Ut="x-amz-sso_bearer_token",i="com.amazonaws.sso",Ye=I.for(Qe),Gt=[-3,Qe,"SSOServiceException",0,[],[]];Ye.registerError(Gt,a);var d=I.for(i),$t=[-3,i,Et,{[v]:P,[x]:400},[R],[0]];d.registerError($t,g);var Mt=[-3,i,Pt,{[v]:P,[x]:404},[R],[0]];d.registerError(Mt,S);var qt=[-3,i,Rt,{[v]:P,[x]:429},[R],[0]];d.registerError(qt,E);var zt=[-3,i,Ct,{[v]:P,[x]:401},[R],[0]];d.registerError(zt,_);var Je=[Ye,d],jt=[0,i,ht,8,0],Lt=[0,i,vt,8,0],Bt=[0,i,xt,8,0],Kt=[3,i,gt,0,[kt,At,yt],[[0,{[We]:bt}],[0,{[We]:Ot}],[()=>jt,{[Dt]:Ut}]],3],Vt=[3,i,St,0,[wt],[[()=>Wt,0]]],Wt=[3,i,_t,0,[It,Ht,Ft,Tt],[0,[()=>Lt,0],[()=>Bt,0],1]],Xe=[9,i,ft,{[Nt]:["GET","/federation/credentials",200]},()=>Kt,()=>Vt];var Ze=e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ne,base64Encoder:e?.base64Encoder??ke,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ve,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ue,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new fe},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ae}],logger:e?.logger??new j,protocol:e?.protocol??Ee,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:Je,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??w,utf8Decoder:e?.utf8Decoder??De,utf8Encoder:e?.utf8Encoder??we});var et=e=>{M(process.version);let t=V(e),o=()=>t().then($),n=Ze(e);ce(process.version);let r={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??p(ge,r),bodyLengthChecker:e?.bodyLengthChecker??Te,defaultUserAgentProvider:e?.defaultUserAgentProvider??ye({serviceId:n.serviceId,clientVersion:Ie.version}),maxAttempts:e?.maxAttempts??p(me,e),region:e?.region??p(L,{...B,...r}),requestHandler:_e.create(e?.requestHandler??o),retryMode:e?.retryMode??p({...le,default:async()=>(await o()).retryMode||ue},e),sha256:e?.sha256??ee.bind(null,"sha256"),streamCollector:e?.streamCollector??Pe,useDualstackEndpoint:e?.useDualstackEndpoint??p(k,r),useFipsEndpoint:e?.useFipsEndpoint??p(b,r),userAgentAppId:e?.userAgentAppId??p(Oe,r)}};var tt=e=>{let t=e.httpAuthSchemes,o=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(r){let l=t.findIndex(C=>C.schemeId===r.schemeId);l===-1?t.push(r):t.splice(l,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){o=r},httpAuthSchemeProvider(){return o},setCredentials(r){n=r},credentials(){return n}}},ot=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var rt=(e,t)=>{let o=Object.assign(be(e),q(e),te(e),tt(e));return t.forEach(n=>n.configure(o)),Object.assign(e,He(o),z(o),oe(o),ot(o))};var T=class extends H{config;constructor(...[t]){let o=et(t||{});super(o),this.initConfig=o;let n=$e(o),r=Ce(n),l=de(r),C=K(l),st=C,nt=X(st),it=Ge(nt),at=rt(it,t?.extensions||[]);this.config=at,this.middlewareStack.use(F(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(he(this.config)),this.middlewareStack.use(re(this.config)),this.middlewareStack.use(ve(this.config)),this.middlewareStack.use(xe(this.config)),this.middlewareStack.use(Re(this.config)),this.middlewareStack.use(se(this.config,{httpAuthSchemeParametersProvider:Fe,identityProviderConfigProvider:async pt=>new ie({"aws.auth#sigv4":pt.credentials})})),this.middlewareStack.use(ne(this.config))}destroy(){super.destroy()}};var N=class extends U.classBuilder().ep(Me).m(function(t,o,n,r){return[Z(n,t.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(Xe).build(){};export{N as GetRoleCredentialsCommand,T as SSOClient};
@@ -0,0 +1 @@
1
+ import{a as be}from"./chunk-CVCZBECH.js";import{a as Ee,b as xe,c as _e,d as Pe,e as ye,f as Ce,g as Ae,h as De,i as ke}from"./chunk-GA44DNS2.js";import{A as Ie,D as Oe,E as Te,F as Ne,G as we,b as re,c as se,f as ne,g as ie,l as ae,m as he,o as fe,t as ge,u as Se,z as Re}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as ve}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as ce,E as ue,F as de,G as le,H as me,b as H,c as U,e as G,g as $,h as q,i as M,j as z,l as j,o as W,p as Q,s as Y,t as J,u as X,v as pe}from"./chunk-A3H5SUSR.js";import{A as b,C as F,E as A,F as L,G as K,H as V,I as B,R as ee,S as te,T as oe,e as w,i as C,j as D,y as u,z as k}from"./chunk-Z4YWESTY.js";import{w as Z}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var He=async(e,t,o)=>({operation:w(t).operation,region:await C(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function gt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(t,o)=>({signingProperties:{config:t,context:o}})}}function St(e){return{schemeId:"smithy.api#noAuth"}}var Fe=e=>{let t=[];return e.operation==="GetRoleCredentials"?t.push(St(e)):t.push(gt(e)),t},Ue=e=>{let t=ge(e);return Object.assign(t,{authSchemePreference:C(e.authSchemePreference??[])})};var Ge=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),$e={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Qe="required";var i="argv";var qe="isSet",m="booleanEquals",d="error",l="endpoint",p="tree",I="PartitionResult",O="getAttr",Me={[Qe]:!1,type:"string"},ze={[Qe]:!0,default:!1,type:"boolean"},je={ref:"Endpoint"},Ye={fn:m,[i]:[{ref:"UseFIPS"},!0]},Je={fn:m,[i]:[{ref:"UseDualStack"},!0]},n={},Le={fn:O,[i]:[{ref:I},"supportsFIPS"]},Xe={ref:I},Ke={fn:m,[i]:[!0,{fn:O,[i]:[Xe,"supportsDualStack"]}]},Ve=[Ye],Be=[Je],We=[{ref:"Region"}],vt={version:"1.0",parameters:{Region:Me,UseDualStack:ze,UseFIPS:ze,Endpoint:Me},rules:[{conditions:[{fn:qe,[i]:[je]}],rules:[{conditions:Ve,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:Be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:je,properties:n,headers:n},type:l}],type:p},{conditions:[{fn:qe,[i]:We}],rules:[{conditions:[{fn:"aws.partition",[i]:We,assign:I}],rules:[{conditions:[Ye,Je],rules:[{conditions:[{fn:m,[i]:[!0,Le]},Ke],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:p},{conditions:Ve,rules:[{conditions:[{fn:m,[i]:[Le,!0]}],rules:[{conditions:[{fn:"stringEquals",[i]:[{fn:O,[i]:[Xe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:n,headers:n},type:l},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:p},{conditions:Be,rules:[{conditions:[Ke],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:p},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:l}],type:p}],type:p},{error:"Invalid Configuration: Missing Region",type:d}]},Ze=vt;var Et=new W({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),et=(e,t={})=>Et.get(e,()=>Y(Ze,{endpointParams:e,logger:t.logger}));Q.aws=ae;var c=class e extends G{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var g=class e extends c{name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},S=class e extends c{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},v=class e extends c{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},E=class e extends c{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var xt="AccessTokenType",_t="GetRoleCredentials",Pt="GetRoleCredentialsRequest",Rt="GetRoleCredentialsResponse",yt="InvalidRequestException",Ct="RoleCredentials",At="ResourceNotFoundException",It="SecretAccessKeyType",Ot="SessionTokenType",Tt="TooManyRequestsException",Nt="UnauthorizedException",wt="accountId",Dt="accessKeyId",kt="accessToken",bt="account_id",x="client",_="error",Ht="expiration",Ft="http",P="httpError",Ut="httpHeader",tt="httpQuery",R="message",Gt="roleCredentials",$t="roleName",qt="role_name",ot="smithy.ts.sdk.synthetic.com.amazonaws.sso",Mt="secretAccessKey",zt="sessionToken",jt="x-amz-sso_bearer_token",a="com.amazonaws.sso",rt=A.for(ot),Lt=[-3,ot,"SSOServiceException",0,[],[]];rt.registerError(Lt,c);var h=A.for(a),Kt=[-3,a,yt,{[_]:x,[P]:400},[R],[0]];h.registerError(Kt,g);var Vt=[-3,a,At,{[_]:x,[P]:404},[R],[0]];h.registerError(Vt,S);var Bt=[-3,a,Tt,{[_]:x,[P]:429},[R],[0]];h.registerError(Bt,v);var Wt=[-3,a,Nt,{[_]:x,[P]:401},[R],[0]];h.registerError(Wt,E);var st=[rt,h],Qt=[0,a,xt,8,0],Yt=[0,a,It,8,0],Jt=[0,a,Ot,8,0],Xt=[3,a,Pt,0,[$t,wt,kt],[[0,{[tt]:qt}],[0,{[tt]:bt}],[()=>Qt,{[Ut]:jt}]],3],Zt=[3,a,Rt,0,[Gt],[[()=>eo,0]]],eo=[3,a,Ct,0,[Dt,Mt,zt,Ht],[0,[()=>Yt,0],[()=>Jt,0],1]],nt=[9,a,_t,{[Ft]:["GET","/federation/credentials",200]},()=>Xt,()=>Zt];var it=e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Oe,base64Encoder:e?.base64Encoder??we,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??et,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new he},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ie}],logger:e?.logger??new j,protocol:e?.protocol??Se,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:st,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??D,utf8Decoder:e?.utf8Decoder??Te,utf8Encoder:e?.utf8Encoder??Ne});var at=e=>{q(process.version);let t=B(e),o=()=>t().then($),s=it(e);pe(process.version);let r={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??u(fe,r),bodyLengthChecker:e?.bodyLengthChecker??Ie,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ce({serviceId:s.serviceId,clientVersion:be.version}),maxAttempts:e?.maxAttempts??u(ue,e),region:e?.region??u(L,{...K,...r}),requestHandler:ve.create(e?.requestHandler??o),retryMode:e?.retryMode??u({...le,default:async()=>(await o()).retryMode||ce},e),sha256:e?.sha256??Z.bind(null,"sha256"),streamCollector:e?.streamCollector??Ee,useDualstackEndpoint:e?.useDualstackEndpoint??u(k,r),useFipsEndpoint:e?.useFipsEndpoint??u(b,r),userAgentAppId:e?.userAgentAppId??u(Ae,r)}};var pt=e=>{let t=e.httpAuthSchemes,o=e.httpAuthSchemeProvider,s=e.credentials;return{setHttpAuthScheme(r){let f=t.findIndex(y=>y.schemeId===r.schemeId);f===-1?t.push(r):t.splice(f,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){o=r},httpAuthSchemeProvider(){return o},setCredentials(r){s=r},credentials(){return s}}},ct=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var ut=(e,t)=>{let o=Object.assign(De(e),M(e),ee(e),pt(e));return t.forEach(s=>s.configure(o)),Object.assign(e,ke(o),z(o),te(o),ct(o))};var T=class extends H{config;constructor(...[t]){let o=at(t||{});super(o),this.initConfig=o;let s=Ge(o),r=Re(s),f=de(r),y=V(f),dt=y,lt=J(dt),mt=Ue(lt),ht=ut(mt,t?.extensions||[]);this.config=ht,this.middlewareStack.use(F(this.config)),this.middlewareStack.use(ye(this.config)),this.middlewareStack.use(me(this.config)),this.middlewareStack.use(oe(this.config)),this.middlewareStack.use(xe(this.config)),this.middlewareStack.use(_e(this.config)),this.middlewareStack.use(Pe(this.config)),this.middlewareStack.use(re(this.config,{httpAuthSchemeParametersProvider:He,identityProviderConfigProvider:async ft=>new ne({"aws.auth#sigv4":ft.credentials})})),this.middlewareStack.use(se(this.config))}destroy(){super.destroy()}};var N=class extends U.classBuilder().ep($e).m(function(t,o,s,r){return[X(s,t.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(nt).build(){};export{N as GetRoleCredentialsCommand,T as SSOClient};
@@ -0,0 +1 @@
1
+ import{a as Ne}from"./chunk-M3NEWJ7L.js";import{a as Re,b as Oe,c as Te,d as ye,e as ke,f as we,g as He,h as Ve,i as qe}from"./chunk-GA44DNS2.js";import{A as be,D as Fe,E as Ue,F as $e,G as Me,b as me,c as ue,f as de,g as le,l as ge,m as Pe,o as ve,t as xe,u as Ie,z as De}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as Ce}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as fe,E as Ee,F as Se,G as _e,H as Ae,b as V,c as L,d as j,e as B,g as G,h as z,i as K,j as X,l as Q,n as ee,o as te,p as re,r as oe,t as ne,u as se,v as he}from"./chunk-A3H5SUSR.js";import{A as M,C as q,E as T,F as W,G as Y,H as J,I as Z,R as ae,S as ce,T as pe,e as F,i as O,j as U,y as p,z as $}from"./chunk-Z4YWESTY.js";import{w as ie}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var Le=async(e,t,r)=>({operation:F(t).operation,region:await O(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Rt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Ot(e){return{schemeId:"smithy.api#noAuth"}}var je=e=>{let t=[];return e.operation==="CreateOAuth2Token"?t.push(Ot(e)):t.push(Rt(e)),t},Be=e=>{let t=xe(e);return Object.assign(t,{authSchemePreference:O(e.authSchemePreference??[])})};var Ge=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"}),ze={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var l="ref",d=-1,f=!0,Ke="isSet",Ye="PartitionResult",E="booleanEquals",k="getAttr",y="stringEquals",Xe={[l]:"Endpoint"},N={[l]:Ye},D={fn:k,argv:[N,"name"]},m={},Qe=[{[l]:"Region"}],We={conditions:[[Ke,[Xe]],[Ke,Qe],["aws.partition",Qe,Ye],[E,[{[l]:"UseFIPS"},f]],[E,[{[l]:"UseDualStack"},f]],[E,[{fn:k,argv:[N,"supportsDualStack"]},f]],[E,[{fn:k,argv:[N,"supportsFIPS"]},f]],[y,[D,"aws"]],[y,[D,"aws-cn"]],[y,[D,"aws-us-gov"]]],results:[[d],[d,"Invalid Configuration: FIPS and custom endpoint are not supported"],[d,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Xe,m],["https://{Region}.signin.aws.amazon.com",m],["https://{Region}.signin.amazonaws.cn",m],["https://{Region}.signin.amazonaws-us-gov.com",m],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",m],[d,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",m],[d,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",m],[d,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",m],[d,"Invalid Configuration: Missing Region"]]},Tt=2,n=1e8,yt=new Int32Array([-1,1,-1,0,15,3,1,4,n+14,2,5,n+14,3,11,6,4,10,7,7,n+4,8,8,n+5,9,9,n+6,n+13,5,n+11,n+12,4,13,12,6,n+9,n+10,5,14,n+8,6,n+7,n+8,3,n+1,16,4,n+2,n+3]),Je=ee.from(yt,Tt,We.conditions,We.results);var Dt=new te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ze=(e,t={})=>Dt.get(e,()=>oe(Je,{endpointParams:e,logger:t.logger}));re.aws=ge;var c=class e extends B{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var S=class e extends c{name="AccessDeniedException";$fault="client";error;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},_=class e extends c{name="InternalServerException";$fault="server";error;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},A=class e extends c{name="TooManyRequestsError";$fault="client";error;constructor(t){super({name:"TooManyRequestsError",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},P=class e extends c{name="ValidationException";$fault="client";error;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}};var kt="AccessDeniedException",Nt="AccessToken",wt="CreateOAuth2Token",Ht="CreateOAuth2TokenRequest",bt="CreateOAuth2TokenRequestBody",Ft="CreateOAuth2TokenResponseBody",Ut="CreateOAuth2TokenResponse",$t="InternalServerException",Mt="RefreshToken",Vt="TooManyRequestsError",qt="ValidationException",et="accessKeyId",tt="accessToken",w="client",rt="clientId",ot="codeVerifier",Lt="code",u="error",nt="expiresIn",st="grantType",jt="http",H="httpError",it="idToken",s="jsonName",x="message",v="refreshToken",at="redirectUri",ut="smithy.ts.sdk.synthetic.com.amazonaws.signin",ct="secretAccessKey",pt="sessionToken",Bt="server",Gt="tokenInput",zt="tokenOutput",mt="tokenType",a="com.amazonaws.signin",dt=T.for(ut),Kt=[-3,ut,"SigninServiceException",0,[],[]];dt.registerError(Kt,c);var g=T.for(a),Xt=[-3,a,kt,{[u]:w},[u,x],[0,0],2];g.registerError(Xt,S);var Qt=[-3,a,$t,{[u]:Bt,[H]:500},[u,x],[0,0],2];g.registerError(Qt,_);var Wt=[-3,a,Vt,{[u]:w,[H]:429},[u,x],[0,0],2];g.registerError(Wt,A);var Yt=[-3,a,qt,{[u]:w,[H]:400},[u,x],[0,0],2];g.registerError(Yt,P);var lt=[dt,g],gt=[0,a,Mt,8,0],Jt=[3,a,Nt,8,[et,ct,pt],[[0,{[s]:et}],[0,{[s]:ct}],[0,{[s]:pt}]],3],Zt=[3,a,Ht,0,[Gt],[[()=>er,16]],1],er=[3,a,bt,0,[rt,st,Lt,at,ot,v],[[0,{[s]:rt}],[0,{[s]:st}],0,[0,{[s]:at}],[0,{[s]:ot}],[()=>gt,{[s]:v}]],2],tr=[3,a,Ut,0,[zt],[[()=>rr,16]],1],rr=[3,a,Ft,0,[tt,mt,nt,v,it],[[()=>Jt,{[s]:tt}],[0,{[s]:mt}],[1,{[s]:nt}],[()=>gt,{[s]:v}],[0,{[s]:it}]],4],ht=[9,a,wt,{[jt]:["POST","/v1/token",200]},()=>Zt,()=>tr];var ft=e=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Fe,base64Encoder:e?.base64Encoder??Me,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ze,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??je,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Pe},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new le}],logger:e?.logger??new Q,protocol:e?.protocol??Ie,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:lt,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??U,utf8Decoder:e?.utf8Decoder??Ue,utf8Encoder:e?.utf8Encoder??$e});var Et=e=>{z(process.version);let t=Z(e),r=()=>t().then(G),i=ft(e);he(process.version);let o={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??p(ve,o),bodyLengthChecker:e?.bodyLengthChecker??be,defaultUserAgentProvider:e?.defaultUserAgentProvider??we({serviceId:i.serviceId,clientVersion:Ne.version}),maxAttempts:e?.maxAttempts??p(Ee,e),region:e?.region??p(W,{...Y,...o}),requestHandler:Ce.create(e?.requestHandler??r),retryMode:e?.retryMode??p({..._e,default:async()=>(await r()).retryMode||fe},e),sha256:e?.sha256??ie.bind(null,"sha256"),streamCollector:e?.streamCollector??Re,useDualstackEndpoint:e?.useDualstackEndpoint??p($,o),useFipsEndpoint:e?.useFipsEndpoint??p(M,o),userAgentAppId:e?.userAgentAppId??p(He,o)}};var St=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(o){let h=t.findIndex(R=>R.schemeId===o.schemeId);h===-1?t.push(o):t.splice(h,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){i=o},credentials(){return i}}},_t=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var At=(e,t)=>{let r=Object.assign(Ve(e),K(e),ae(e),St(e));return t.forEach(i=>i.configure(r)),Object.assign(e,qe(r),X(r),ce(r),_t(r))};var I=class extends V{config;constructor(...[t]){let r=Et(t||{});super(r),this.initConfig=r;let i=Ge(r),o=De(i),h=Se(o),R=J(h),Pt=R,vt=ne(Pt),xt=Be(vt),It=At(xt,t?.extensions||[]);this.config=It,this.middlewareStack.use(q(this.config)),this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(pe(this.config)),this.middlewareStack.use(Oe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(ye(this.config)),this.middlewareStack.use(me(this.config,{httpAuthSchemeParametersProvider:Le,identityProviderConfigProvider:async Ct=>new de({"aws.auth#sigv4":Ct.credentials})})),this.middlewareStack.use(ue(this.config))}destroy(){super.destroy()}};var C=class extends L.classBuilder().ep(ze).m(function(t,r,i,o){return[se(i,t.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(ht).build(){};var or={CreateOAuth2TokenCommand:C},b=class extends I{};j(or,b);var Oo={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};export{L as $Command,S as AccessDeniedException,Xt as AccessDeniedException$,Jt as AccessToken$,ht as CreateOAuth2Token$,C as CreateOAuth2TokenCommand,Zt as CreateOAuth2TokenRequest$,er as CreateOAuth2TokenRequestBody$,tr as CreateOAuth2TokenResponse$,rr as CreateOAuth2TokenResponseBody$,_ as InternalServerException,Qt as InternalServerException$,Oo as OAuth2ErrorCode,b as Signin,I as SigninClient,c as SigninServiceException,Kt as SigninServiceException$,A as TooManyRequestsError,Wt as TooManyRequestsError$,P as ValidationException,Yt as ValidationException$,V as __Client,lt as errorTypeRegistries};
@@ -0,0 +1 @@
1
+ import{a as $e}from"./chunk-M3NEWJ7L.js";import{a as Te,b as Re,c as ke,d as we,e as Ne,f as Ue,g as He,h as Ve,i as ze}from"./chunk-GA44DNS2.js";import{A as Fe,D as Me,E as Ge,F as je,G as Ke,b as le,c as he,f as fe,g as ge,l as Ee,m as Ce,o as Oe,t as Ae,u as De,z as be}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as ye}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as Se,E as _e,F as ve,G as Ie,H as Pe,b as V,c as q,d as L,e as B,g as Y,h as W,i as J,j as X,l as Q,n as oe,o as ne,p as ie,r as se,t as ce,u as ae,v as xe}from"./chunk-A3H5SUSR.js";import{A as K,C as z,E as $,F as Z,G as ee,H as te,I as re,R as de,S as ue,T as me,e as M,i as N,j as G,y as l,z as j}from"./chunk-Z4YWESTY.js";import{w as pe}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var qe=async(e,t,n)=>({operation:M(t).operation,region:await N(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function _t(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function vt(e){return{schemeId:"smithy.api#noAuth"}}var Le=e=>{let t=[];return e.operation==="CreateToken"?t.push(vt(e)):t.push(_t(e)),t},Be=e=>{let t=Ae(e);return Object.assign(t,{authSchemePreference:N(e.authSchemePreference??[])})};var Ye=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),We={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var g="ref",h=-1,x=!0,Je="isSet",et="PartitionResult",S="booleanEquals",U="getAttr",Xe={[g]:"Endpoint"},H={[g]:et},f={},Qe=[{[g]:"Region"}],Ze={conditions:[[Je,[Xe]],[Je,Qe],["aws.partition",Qe,et],[S,[{[g]:"UseFIPS"},x]],[S,[{[g]:"UseDualStack"},x]],[S,[{fn:U,argv:[H,"supportsDualStack"]},x]],[S,[{fn:U,argv:[H,"supportsFIPS"]},x]],["stringEquals",[{fn:U,argv:[H,"name"]},"aws-us-gov"]]],results:[[h],[h,"Invalid Configuration: FIPS and custom endpoint are not supported"],[h,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Xe,f],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",f],[h,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",f],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",f],[h,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",f],[h,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",f],[h,"Invalid Configuration: Missing Region"]]},It=2,c=1e8,Pt=new Int32Array([-1,1,-1,0,13,3,1,4,c+12,2,5,c+12,3,8,6,4,7,c+11,5,c+9,c+10,4,11,9,6,10,c+8,7,c+6,c+7,5,12,c+5,6,c+4,c+5,3,c+1,14,4,c+2,c+3]),tt=oe.from(Pt,It,Ze.conditions,Ze.results);var Ct=new ne({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),rt=(e,t={})=>Ct.get(e,()=>se(tt,{endpointParams:e,logger:t.logger}));ie.aws=Ee;var i=class e extends B{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var _=class e extends i{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},v=class e extends i{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(t){super({name:"AuthorizationPendingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},I=class e extends i{name="ExpiredTokenException";$fault="client";error;error_description;constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},P=class e extends i{name="InternalServerException";$fault="server";error;error_description;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},C=class e extends i{name="InvalidClientException";$fault="client";error;error_description;constructor(t){super({name:"InvalidClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},O=class e extends i{name="InvalidGrantException";$fault="client";error;error_description;constructor(t){super({name:"InvalidGrantException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},A=class e extends i{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},D=class e extends i{name="InvalidScopeException";$fault="client";error;error_description;constructor(t){super({name:"InvalidScopeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},y=class e extends i{name="SlowDownException";$fault="client";error;error_description;constructor(t){super({name:"SlowDownException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},T=class e extends i{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(t){super({name:"UnauthorizedClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},R=class e extends i{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(t){super({name:"UnsupportedGrantTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}};var Ot="AccessDeniedException",At="AuthorizationPendingException",Dt="AccessToken",yt="ClientSecret",Tt="CreateToken",Rt="CreateTokenRequest",kt="CreateTokenResponse",wt="CodeVerifier",bt="ExpiredTokenException",Nt="InvalidClientException",$t="InvalidGrantException",Ut="InvalidRequestException",Ht="InternalServerException",Ft="InvalidScopeException",Mt="IdToken",Gt="RefreshToken",jt="SlowDownException",Kt="UnauthorizedClientException",Vt="UnsupportedGrantTypeException",zt="accessToken",m="client",qt="clientId",Lt="clientSecret",Bt="codeVerifier",Yt="code",Wt="deviceCode",r="error",Jt="expiresIn",d="error_description",Xt="grantType",Qt="http",u="httpError",Zt="idToken",ot="reason",nt="refreshToken",er="redirectUri",it="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",tr="scope",rr="server",or="tokenType",o="com.amazonaws.ssooidc",st=$.for(it),nr=[-3,it,"SSOOIDCServiceException",0,[],[]];st.registerError(nr,i);var p=$.for(o),ir=[-3,o,Ot,{[r]:m,[u]:400},[r,ot,d],[0,0,0]];p.registerError(ir,_);var sr=[-3,o,At,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(sr,v);var cr=[-3,o,bt,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(cr,I);var ar=[-3,o,Ht,{[r]:rr,[u]:500},[r,d],[0,0]];p.registerError(ar,P);var pr=[-3,o,Nt,{[r]:m,[u]:401},[r,d],[0,0]];p.registerError(pr,C);var dr=[-3,o,$t,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(dr,O);var ur=[-3,o,Ut,{[r]:m,[u]:400},[r,ot,d],[0,0,0]];p.registerError(ur,A);var mr=[-3,o,Ft,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(mr,D);var lr=[-3,o,jt,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(lr,y);var hr=[-3,o,Kt,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(hr,T);var fr=[-3,o,Vt,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(fr,R);var ct=[st,p],gr=[0,o,Dt,8,0],Er=[0,o,yt,8,0],xr=[0,o,wt,8,0],Sr=[0,o,Mt,8,0],at=[0,o,Gt,8,0],_r=[3,o,Rt,0,[qt,Lt,Xt,Wt,Yt,nt,tr,er,Bt],[0,[()=>Er,0],0,0,0,[()=>at,0],64,0,[()=>xr,0]],3],vr=[3,o,kt,0,[zt,or,Jt,nt,Zt],[[()=>gr,0],0,1,[()=>at,0],[()=>Sr,0]]];var pt=[9,o,Tt,{[Qt]:["POST","/token",200]},()=>_r,()=>vr];var dt=e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Me,base64Encoder:e?.base64Encoder??Ke,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??rt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Ce},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ge}],logger:e?.logger??new Q,protocol:e?.protocol??De,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:ct,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??G,utf8Decoder:e?.utf8Decoder??Ge,utf8Encoder:e?.utf8Encoder??je});var ut=e=>{W(process.version);let t=re(e),n=()=>t().then(Y),a=dt(e);xe(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??l(Oe,s),bodyLengthChecker:e?.bodyLengthChecker??Fe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ue({serviceId:a.serviceId,clientVersion:$e.version}),maxAttempts:e?.maxAttempts??l(_e,e),region:e?.region??l(Z,{...ee,...s}),requestHandler:ye.create(e?.requestHandler??n),retryMode:e?.retryMode??l({...Ie,default:async()=>(await n()).retryMode||Se},e),sha256:e?.sha256??pe.bind(null,"sha256"),streamCollector:e?.streamCollector??Te,useDualstackEndpoint:e?.useDualstackEndpoint??l(j,s),useFipsEndpoint:e?.useFipsEndpoint??l(K,s),userAgentAppId:e?.userAgentAppId??l(He,s)}};var mt=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,a=e.credentials;return{setHttpAuthScheme(s){let E=t.findIndex(b=>b.schemeId===s.schemeId);E===-1?t.push(s):t.splice(E,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){n=s},httpAuthSchemeProvider(){return n},setCredentials(s){a=s},credentials(){return a}}},lt=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var ht=(e,t)=>{let n=Object.assign(Ve(e),J(e),de(e),mt(e));return t.forEach(a=>a.configure(n)),Object.assign(e,ze(n),X(n),ue(n),lt(n))};var k=class extends V{config;constructor(...[t]){let n=ut(t||{});super(n),this.initConfig=n;let a=Ye(n),s=be(a),E=ve(s),b=te(E),ft=b,gt=ce(ft),Et=Be(gt),xt=ht(Et,t?.extensions||[]);this.config=xt,this.middlewareStack.use(z(this.config)),this.middlewareStack.use(Ne(this.config)),this.middlewareStack.use(Pe(this.config)),this.middlewareStack.use(me(this.config)),this.middlewareStack.use(Re(this.config)),this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(we(this.config)),this.middlewareStack.use(le(this.config,{httpAuthSchemeParametersProvider:qe,identityProviderConfigProvider:async St=>new fe({"aws.auth#sigv4":St.credentials})})),this.middlewareStack.use(he(this.config))}destroy(){super.destroy()}};var w=class extends q.classBuilder().ep(We).m(function(t,n,a,s){return[ae(a,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(pt).build(){};var Ir={CreateTokenCommand:w},F=class extends k{};L(Ir,F);var Lo={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},Bo={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};export{q as $Command,_ as AccessDeniedException,ir as AccessDeniedException$,Lo as AccessDeniedExceptionReason,v as AuthorizationPendingException,sr as AuthorizationPendingException$,pt as CreateToken$,w as CreateTokenCommand,_r as CreateTokenRequest$,vr as CreateTokenResponse$,I as ExpiredTokenException,cr as ExpiredTokenException$,P as InternalServerException,ar as InternalServerException$,C as InvalidClientException,pr as InvalidClientException$,O as InvalidGrantException,dr as InvalidGrantException$,A as InvalidRequestException,ur as InvalidRequestException$,Bo as InvalidRequestExceptionReason,D as InvalidScopeException,mr as InvalidScopeException$,F as SSOOIDC,k as SSOOIDCClient,i as SSOOIDCServiceException,nr as SSOOIDCServiceException$,y as SlowDownException,lr as SlowDownException$,T as UnauthorizedClientException,hr as UnauthorizedClientException$,R as UnsupportedGrantTypeException,fr as UnsupportedGrantTypeException$,V as __Client,ct as errorTypeRegistries};
@@ -0,0 +1 @@
1
+ import{a as At}from"./chunk-AN6QWW3N.js";import{a as ut}from"./chunk-M3NEWJ7L.js";import{a as st,b as it,c as at,d as ct,e as lt,f as dt,g as mt,h as vt,i as Pt}from"./chunk-GA44DNS2.js";import{A as gt,D as ht,E as St,F as ft,G as Et,b as Ke,c as Me,f as je,g as L,l as qe,m as M,n as j,o as Je,p as Ze,q as et,r as tt,s as ie,t as rt,v as ot,z as pt}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as nt}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as Be,E as ze,F as Xe,G as Ye,H as Qe,b as ve,c as U,d as Ae,e as ye,g as xe,h as Ce,i as _e,j as Ie,l as Re,m as be,n as Oe,o as Ne,p as We,r as He,t as $e,u as F,v as Ge,w as K}from"./chunk-A3H5SUSR.js";import{A as Ee,C as Pe,E as se,F as we,G as Te,H as De,I as ke,R as Ue,S as Fe,T as Le,e as oe,i as ne,j as Se,y as E,z as fe}from"./chunk-Z4YWESTY.js";import{w as Ve}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var q="X-Amz-S3session-Token",ae=q.toLowerCase();var W=class extends tt{async signWithCredentials(t,r,n){let o=yt(r);t.headers[ae]=r.sessionToken;let i=this;return xt(i,o),i.signRequest(t,n??{})}async presignWithCredentials(t,r,n){let o=yt(r);return delete t.headers[ae],t.headers[q]=r.sessionToken,t.query=t.query??{},t.query[q]=r.sessionToken,xt(this,o),this.presign(t,n)}};function yt(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function xt(e,t){let r=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),n=e.credentialProvider,o=()=>(clearTimeout(r),e.credentialProvider=n,Promise.resolve(t));e.credentialProvider=o}var H={CrtSignerV4:null};var D=class{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return typeof H.CrtSignerV4=="function"?"crt":typeof ie.SignatureV4a=="function"?"js":"none"}constructor(t){this.sigv4Signer=new W(t),this.signerOptions=t}async sign(t,r={}){return r.signingRegion==="*"?this.getSigv4aSigner().sign(t,r):this.sigv4Signer.sign(t,r)}async signWithCredentials(t,r,n={}){if(n.signingRegion==="*"){let o=this.getSigv4aSigner(),i=H.CrtSignerV4;if(i&&o instanceof i)return o.signWithCredentials(t,r,n);throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(t,r,n)}async presign(t,r={}){if(r.signingRegion==="*"){let n=this.getSigv4aSigner(),o=H.CrtSignerV4;if(o&&n instanceof o)return n.presign(t,r);throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(t,r)}async presignWithCredentials(t,r,n={}){if(n.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,r,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let t=H.CrtSignerV4,r=ie.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!t&&!r)throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");if(t&&typeof t=="function")this.sigv4aSigner=new t({...this.signerOptions,signingAlgorithm:1});else if(r&&typeof r=="function")this.sigv4aSigner=new r({...this.signerOptions});else throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{if(!r||typeof r!="function")throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");this.sigv4aSigner=new r({...this.signerOptions})}}return this.sigv4aSigner}};var b="ref",x=-1,$=!0,Ct="isSet",bt="PartitionResult",V="booleanEquals",p="stringEquals",ce="getAttr",_t="us-east-1",It="sigv4",Rt="sts",wt="https://sts.{Region}.{PartitionResult#dnsSuffix}",Tt={[b]:"Endpoint"},l={[b]:"Region"},pe={[b]:bt},k={},Dt=[l],kt={conditions:[[Ct,[Tt]],[Ct,Dt],["aws.partition",Dt,bt],[V,[{[b]:"UseFIPS"},$]],[V,[{[b]:"UseDualStack"},$]],[p,[l,"aws-global"]],[V,[{[b]:"UseGlobalEndpoint"},$]],[p,[l,"eu-central-1"]],[V,[{fn:ce,argv:[pe,"supportsDualStack"]},$]],[V,[{fn:ce,argv:[pe,"supportsFIPS"]},$]],[p,[l,"ap-south-1"]],[p,[l,"eu-north-1"]],[p,[l,"eu-west-1"]],[p,[l,"eu-west-2"]],[p,[l,"eu-west-3"]],[p,[l,"sa-east-1"]],[p,[l,_t]],[p,[l,"us-east-2"]],[p,[l,"us-west-2"]],[p,[l,"us-west-1"]],[p,[l,"ca-central-1"]],[p,[l,"ap-southeast-1"]],[p,[l,"ap-northeast-1"]],[p,[l,"ap-southeast-2"]],[p,[{fn:ce,argv:[pe,"name"]},"aws-us-gov"]]],results:[[x],["https://sts.amazonaws.com",{authSchemes:[{name:It,signingName:Rt,signingRegion:_t}]}],[wt,{authSchemes:[{name:It,signingName:Rt,signingRegion:"{Region}"}]}],[x,"Invalid Configuration: FIPS and custom endpoint are not supported"],[x,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Tt,k],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",k],[x,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",k],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",k],[x,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",k],[x,"DualStack is enabled but this partition does not support DualStack"],[wt,k],[x,"Invalid Configuration: Missing Region"]]},ur=2,s=1e8,dr=new Int32Array([-1,1,-1,0,30,3,1,4,s+14,2,5,s+14,3,25,6,4,24,7,5,s+1,8,6,9,s+13,7,s+1,10,10,s+1,11,11,s+1,12,12,s+1,13,13,s+1,14,14,s+1,15,15,s+1,16,16,s+1,17,17,s+1,18,18,s+1,19,19,s+1,20,20,s+1,21,21,s+1,22,22,s+1,23,23,s+1,s+2,8,s+11,s+12,4,28,26,9,27,s+10,24,s+8,s+9,8,29,s+7,9,s+6,s+7,3,s+3,31,4,s+4,s+5]),Ot=Oe.from(dr,ur,kt.conditions,kt.results);var mr=new Ne({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),G=(e,t={})=>mr.get(e,()=>He(Ot,{endpointParams:e,logger:t.logger}));We.aws=qe;var gr=e=>async(t,r,n)=>{if(!n)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let o=await e(t,r,n),i=oe(r)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!i)throw new Error(`getEndpointParameterInstructions() is not defined on '${r.commandName}'`);let a=await be(n,{getEndpointParameterInstructions:i},t);return Object.assign(o,a)},hr=async(e,t,r)=>({operation:oe(t).operation,region:await ne(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Nt=gr(hr);function Wt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function le(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Ht(e){return{schemeId:"smithy.api#noAuth"}}var Sr=(e,t,r)=>o=>{let a=e(o).properties?.authSchemes;if(!a)return t(o);let d=[];for(let S of a){let{name:m,properties:P={},...g}=S,f=m.toLowerCase();m!==f&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${m}' to '${f}'`);let h;if(f==="sigv4a"){h="aws.auth#sigv4a";let te=a.find(re=>{let he=re.name.toLowerCase();return he!=="sigv4a"&&he.startsWith("sigv4")});if(D.sigv4aDependency()==="none"&&te)continue}else if(f.startsWith("sigv4"))h="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${f}'`);let T=r[h];if(!T)throw new Error(`Could not find HttpAuthOption create function for '${h}'`);let A=T(o);A.schemeId=h,A.signingProperties={...A.signingProperties||{},...g,...P},d.push(A)}return d},fr=e=>{let t=[];return e.operation==="AssumeRoleWithWebIdentity"?(t.push(Ht(e)),t.push(le(e))):(t.push(Wt(e)),t.push(le(e))),t},$t=Sr(G,fr,{"aws.auth#sigv4":Wt,"aws.auth#sigv4a":le,"smithy.api#noAuth":Ht}),Er=e=>Object.assign(e,{stsClientCtor:v}),Vt=e=>{let t=Er(e),r=rt(t),n=Ze(r);return Object.assign(n,{authSchemePreference:ne(e.authSchemePreference??[])})};var Ut=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),B={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 u=class e extends ye{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var z=class e extends u{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},X=class e extends u{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Y=class e extends u{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Q=class e extends u{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},J=class e extends u{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Z=class e extends u{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ee=class e extends u{name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var vr="Arn",Pr="AccessKeyId",Ar="AssumeRole",yr="AssumedRoleId",xr="AssumeRoleRequest",Cr="AssumeRoleResponse",ue="AssumedRoleUser",_r="AssumeRoleWithWebIdentity",Ir="AssumeRoleWithWebIdentityRequest",Rr="AssumeRoleWithWebIdentityResponse",wr="Audience",de="Credentials",Tr="ContextAssertion",Ft="DurationSeconds",Dr="Expiration",kr="ExternalId",br="ExpiredTokenException",Or="IDPCommunicationErrorException",Nr="IDPRejectedClaimException",Wr="InvalidIdentityTokenException",Hr="Key",$r="MalformedPolicyDocumentException",Lt="Policy",Kt="PolicyArns",Vr="ProviderArn",Ur="ProvidedContexts",Fr="ProvidedContextsListType",Lr="ProvidedContext",Kr="PolicyDescriptorType",Mr="ProviderId",Mt="PackedPolicySize",jr="PackedPolicyTooLargeException",qr="Provider",jt="RoleArn",Gr="RegionDisabledException",qt="RoleSessionName",Br="SecretAccessKey",zr="SubjectFromWebIdentityToken",me="SourceIdentity",Xr="SerialNumber",Yr="SessionToken",Qr="Tags",Jr="TokenCode",Zr="TransitiveTagKeys",eo="Tag",to="Value",ro="WebIdentityToken",oo="arn",no="accessKeySecretType",C="awsQueryError",_="client",so="clientTokenType",I="error",R="httpError",w="message",io="policyDescriptorListType",Gt="smithy.ts.sdk.synthetic.com.amazonaws.sts",ao="tagListType",c="com.amazonaws.sts",Bt=se.for(Gt),co=[-3,Gt,"STSServiceException",0,[],[]];Bt.registerError(co,u);var y=se.for(c),po=[-3,c,br,{[C]:["ExpiredTokenException",400],[I]:_,[R]:400},[w],[0]];y.registerError(po,z);var lo=[-3,c,Or,{[C]:["IDPCommunicationError",400],[I]:_,[R]:400},[w],[0]];y.registerError(lo,ee);var uo=[-3,c,Nr,{[C]:["IDPRejectedClaim",403],[I]:_,[R]:403},[w],[0]];y.registerError(uo,J);var mo=[-3,c,Wr,{[C]:["InvalidIdentityToken",400],[I]:_,[R]:400},[w],[0]];y.registerError(mo,Z);var go=[-3,c,$r,{[C]:["MalformedPolicyDocument",400],[I]:_,[R]:400},[w],[0]];y.registerError(go,X);var ho=[-3,c,jr,{[C]:["PackedPolicyTooLarge",400],[I]:_,[R]:400},[w],[0]];y.registerError(ho,Y);var So=[-3,c,Gr,{[C]:["RegionDisabledException",403],[I]:_,[R]:403},[w],[0]];y.registerError(So,Q);var zt=[Bt,y],fo=[0,c,no,8,0],Eo=[0,c,so,8,0],Xt=[3,c,ue,0,[yr,vr],[0,0],2],vo=[3,c,xr,0,[jt,qt,Kt,Lt,Ft,Qr,Zr,kr,Xr,Jr,me,Ur],[0,0,()=>Qt,0,1,()=>Ro,64,0,0,0,0,()=>Io],2],Po=[3,c,Cr,0,[de,ue,Mt,me],[[()=>Yt,0],()=>Xt,1,0]],Ao=[3,c,Ir,0,[jt,qt,ro,Mr,Kt,Lt,Ft],[0,0,[()=>Eo,0],0,()=>Qt,0,1],3],yo=[3,c,Rr,0,[de,zr,ue,Mt,qr,wr,me],[[()=>Yt,0],0,()=>Xt,1,0,0,0]],Yt=[3,c,de,0,[Pr,Br,Yr,Dr],[0,[()=>fo,0],0,4],4],xo=[3,c,Kr,0,[oo],[0]],Co=[3,c,Lr,0,[Vr,Tr],[0,0]],_o=[3,c,eo,0,[Hr,to],[0,0],2],Qt=[1,c,io,0,()=>xo],Io=[1,c,Fr,0,()=>Co];var Ro=[1,c,ao,0,()=>_o],Jt=[9,c,Ar,0,()=>vo,()=>Po],Zt=[9,c,_r,0,()=>Ao,()=>yo];var er=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??ht,base64Encoder:e?.base64Encoder??Et,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??G,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??$t,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new M},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new j},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new L}],logger:e?.logger??new Re,protocol:e?.protocol??ot,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:zt,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",signerConstructor:e?.signerConstructor??D,urlParser:e?.urlParser??Se,utf8Decoder:e?.utf8Decoder??St,utf8Encoder:e?.utf8Encoder??ft});var tr=e=>{Ce(process.version);let t=ke(e),r=()=>t().then(xe),n=er(e);Ge(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??E(Je,o),bodyLengthChecker:e?.bodyLengthChecker??gt,defaultUserAgentProvider:e?.defaultUserAgentProvider??dt({serviceId:n.serviceId,clientVersion:ut.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i=>i.getIdentityProvider("aws.auth#sigv4")||(async a=>await e.credentialDefaultProvider(a?.__config||{})()),signer:new M},{schemeId:"aws.auth#sigv4a",identityProvider:i=>i.getIdentityProvider("aws.auth#sigv4a"),signer:new j},{schemeId:"smithy.api#noAuth",identityProvider:i=>i.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new L}],maxAttempts:e?.maxAttempts??E(ze,e),region:e?.region??E(we,{...Te,...o}),requestHandler:nt.create(e?.requestHandler??r),retryMode:e?.retryMode??E({...Ye,default:async()=>(await r()).retryMode||Be},e),sha256:e?.sha256??Ve.bind(null,"sha256"),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??E(et,o),streamCollector:e?.streamCollector??st,useDualstackEndpoint:e?.useDualstackEndpoint??E(fe,o),useFipsEndpoint:e?.useFipsEndpoint??E(Ee,o),userAgentAppId:e?.userAgentAppId??E(mt,o)}};var rr=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let i=t.findIndex(a=>a.schemeId===o.schemeId);i===-1?t.push(o):t.splice(i,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},or=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var nr=(e,t)=>{let r=Object.assign(vt(e),_e(e),Ue(e),rr(e));return t.forEach(n=>n.configure(r)),Object.assign(e,Pt(r),Ie(r),Fe(r),or(r))};var v=class extends ve{config;constructor(...[t]){let r=tr(t||{});super(r),this.initConfig=r;let n=Ut(r),o=pt(n),i=Xe(o),a=De(i),d=a,S=$e(d),m=Vt(S),P=nr(m,t?.extensions||[]);this.config=P,this.middlewareStack.use(Pe(this.config)),this.middlewareStack.use(lt(this.config)),this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(it(this.config)),this.middlewareStack.use(at(this.config)),this.middlewareStack.use(ct(this.config)),this.middlewareStack.use(Ke(this.config,{httpAuthSchemeParametersProvider:Nt,identityProviderConfigProvider:async g=>new je({"aws.auth#sigv4":g.credentials,"aws.auth#sigv4a":g.credentials})})),this.middlewareStack.use(Me(this.config))}destroy(){super.destroy()}};var O=class extends U.classBuilder().ep(B).m(function(t,r,n,o){return[F(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Jt).build(){};var N=class extends U.classBuilder().ep(B).m(function(t,r,n,o){return[F(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Zt).build(){};var wo={AssumeRoleCommand:O,AssumeRoleWithWebIdentityCommand:N},ge=class extends v{};Ae(wo,ge);var sr=e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},ir=async(e,t,r,n={})=>{let o=typeof e=="function"?await e():e,i=typeof t=="function"?await t():t,a="",d=o??i??(a=await At(n)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${o} (credential provider clientConfig)`,`${i} (contextual client)`,`${a} (STS default: AWS_REGION, profile region, or us-east-1)`),d},ar=(e,t)=>{let r,n;return async(o,i)=>{if(n=o,!r){let{logger:P=e?.parentClientConfig?.logger,profile:g=e?.parentClientConfig?.profile,region:f,requestHandler:h=e?.parentClientConfig?.requestHandler,credentialProviderLogger:T,userAgentAppId:A=e?.parentClientConfig?.userAgentAppId}=e,te=await ir(f,e?.parentClientConfig?.region,T,{logger:P,profile:g}),re=!pr(h);r=new t({...e,userAgentAppId:A,profile:g,credentialDefaultProvider:()=>async()=>n,region:te,requestHandler:re?h:void 0,logger:P})}let{Credentials:a,AssumedRoleUser:d}=await r.send(new O(i));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${i.RoleArn}`);let S=sr(d),m={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...S&&{accountId:S}};return K(m,"CREDENTIALS_STS_ASSUME_ROLE","i"),m}},cr=(e,t)=>{let r;return async n=>{if(!r){let{logger:S=e?.parentClientConfig?.logger,profile:m=e?.parentClientConfig?.profile,region:P,requestHandler:g=e?.parentClientConfig?.requestHandler,credentialProviderLogger:f,userAgentAppId:h=e?.parentClientConfig?.userAgentAppId}=e,T=await ir(P,e?.parentClientConfig?.region,f,{logger:S,profile:m}),A=!pr(g);r=new t({...e,userAgentAppId:h,profile:m,region:T,requestHandler:A?g:void 0,logger:S})}let{Credentials:o,AssumedRoleUser:i}=await r.send(new N(n));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${n.RoleArn}`);let a=sr(i),d={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...a&&{accountId:a}};return a&&K(d,"RESOLVED_ACCOUNT_ID","T"),K(d,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),d}};var pr=e=>e?.metadata?.handlerProtocol==="h2";var lr=(e,t)=>t?class extends e{constructor(n){super(n);for(let o of t)this.middlewareStack.use(o)}}:e,To=(e={},t)=>ar(e,lr(v,t)),Do=(e={},t)=>cr(e,lr(v,t)),ks=e=>t=>e({roleAssumer:To(t),roleAssumerWithWebIdentity:Do(t),...t});export{U as $Command,Jt as AssumeRole$,O as AssumeRoleCommand,vo as AssumeRoleRequest$,Po as AssumeRoleResponse$,Zt as AssumeRoleWithWebIdentity$,N as AssumeRoleWithWebIdentityCommand,Ao as AssumeRoleWithWebIdentityRequest$,yo as AssumeRoleWithWebIdentityResponse$,Xt as AssumedRoleUser$,Yt as Credentials$,z as ExpiredTokenException,po as ExpiredTokenException$,ee as IDPCommunicationErrorException,lo as IDPCommunicationErrorException$,J as IDPRejectedClaimException,uo as IDPRejectedClaimException$,Z as InvalidIdentityTokenException,mo as InvalidIdentityTokenException$,X as MalformedPolicyDocumentException,go as MalformedPolicyDocumentException$,Y as PackedPolicyTooLargeException,ho as PackedPolicyTooLargeException$,xo as PolicyDescriptorType$,Co as ProvidedContext$,Q as RegionDisabledException,So as RegionDisabledException$,ge as STS,v as STSClient,u as STSServiceException,co as STSServiceException$,_o as Tag$,ve as __Client,ks as decorateDefaultCredentialProvider,zt as errorTypeRegistries,To as getDefaultRoleAssumer,Do as getDefaultRoleAssumerWithWebIdentity};
@@ -0,0 +1 @@
1
+ import{a as st}from"./chunk-AN6QWW3N.js";import{a as it}from"./chunk-CVCZBECH.js";import{a as Me,b as qe,c as Ve,d as ze,e as Be,f as Qe,g as Ye,h as rt,i as nt}from"./chunk-GA44DNS2.js";import{A as Xe,D as Ze,E as et,F as tt,G as ot,b as be,c as He,f as we,g as $,l as ke,m as F,o as Le,t as Ke,v as je,z as Je}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as Ge}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as We,E as Ne,F as $e,G as Ue,H as Fe,b as pe,c as W,d as de,e as ue,g as me,h as ge,i as fe,j as he,l as Se,o as ye,p as Ce,s as Ie,t as Re,u as N,v as Oe,w as U}from"./chunk-A3H5SUSR.js";import{A as ce,C as le,E as X,F as Ee,G as Pe,H as Ae,I as xe,R as _e,S as Te,T as De,e as se,i as Y,j as ie,y as P,z as ae}from"./chunk-Z4YWESTY.js";import{w as ve}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var at=async(e,t,n)=>({operation:se(t).operation,region:await Y(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function so(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function io(e){return{schemeId:"smithy.api#noAuth"}}var ct=e=>{let t=[];return e.operation==="AssumeRoleWithWebIdentity"?t.push(io(e)):t.push(so(e)),t},ao=e=>Object.assign(e,{stsClientCtor:E}),pt=e=>{let t=ao(e),n=Ke(t);return Object.assign(n,{authSchemePreference:Y(e.authSchemePreference??[])})};var lt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),L={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 xt="required",o="type";var s="argv";var A="booleanEquals",l="stringEquals",yt="sigv4";var Ct="us-east-1",a="endpoint",dt="https://sts.{Region}.{PartitionResult#dnsSuffix}",h="tree",H="error",ee="getAttr",ut={[xt]:!1,[o]:"string"},Z={[xt]:!0,default:!1,[o]:"boolean"},It={ref:"Endpoint"},mt={fn:"isSet",[s]:[{ref:"Region"}]},d={ref:"Region"},gt={fn:"aws.partition",[s]:[d],assign:"PartitionResult"},Rt={ref:"UseFIPS"},vt={ref:"UseDualStack"},m={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:yt,signingName:"sts",signingRegion:Ct}]},headers:{}},g={},ft={conditions:[{fn:l,[s]:[d,"aws-global"]}],[a]:m,[o]:a},_t={fn:A,[s]:[Rt,!0]},Tt={fn:A,[s]:[vt,!0]},ht={fn:ee,[s]:[{ref:"PartitionResult"},"supportsFIPS"]},Dt={ref:"PartitionResult"},St={fn:A,[s]:[!0,{fn:ee,[s]:[Dt,"supportsDualStack"]}]},Et=[{fn:"isSet",[s]:[It]}],Pt=[_t],At=[Tt],co={version:"1.0",parameters:{Region:ut,UseDualStack:Z,UseFIPS:Z,Endpoint:ut,UseGlobalEndpoint:Z},rules:[{conditions:[{fn:A,[s]:[{ref:"UseGlobalEndpoint"},!0]},{fn:"not",[s]:Et},mt,gt,{fn:A,[s]:[Rt,!1]},{fn:A,[s]:[vt,!1]}],rules:[{conditions:[{fn:l,[s]:[d,"ap-northeast-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"ap-south-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"ap-southeast-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"ap-southeast-2"]}],endpoint:m,[o]:a},ft,{conditions:[{fn:l,[s]:[d,"ca-central-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-central-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-north-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-west-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-west-2"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-west-3"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"sa-east-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,Ct]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"us-east-2"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"us-west-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"us-west-2"]}],endpoint:m,[o]:a},{endpoint:{url:dt,properties:{authSchemes:[{name:yt,signingName:"sts",signingRegion:"{Region}"}]},headers:g},[o]:a}],[o]:h},{conditions:Et,rules:[{conditions:Pt,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[o]:H},{conditions:At,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[o]:H},{endpoint:{url:It,properties:g,headers:g},[o]:a}],[o]:h},{conditions:[mt],rules:[{conditions:[gt],rules:[{conditions:[_t,Tt],rules:[{conditions:[{fn:A,[s]:[!0,ht]},St],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},[o]:a}],[o]:h},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[o]:H}],[o]:h},{conditions:Pt,rules:[{conditions:[{fn:A,[s]:[ht,!0]}],rules:[{conditions:[{fn:l,[s]:[{fn:ee,[s]:[Dt,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:g,headers:g},[o]:a},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},[o]:a}],[o]:h},{error:"FIPS is enabled but this partition does not support FIPS",[o]:H}],[o]:h},{conditions:At,rules:[{conditions:[St],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},[o]:a}],[o]:h},{error:"DualStack is enabled but this partition does not support DualStack",[o]:H}],[o]:h},ft,{endpoint:{url:dt,properties:g,headers:g},[o]:a}],[o]:h}],[o]:h},{error:"Invalid Configuration: Missing Region",[o]:H}]},bt=co;var po=new ye({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Ht=(e,t={})=>po.get(e,()=>Ie(bt,{endpointParams:e,logger:t.logger}));Ce.aws=ke;var f=class e extends ue{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var K=class e extends f{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},j=class e extends f{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},G=class e extends f{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},M=class e extends f{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},q=class e extends f{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},V=class e extends f{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},z=class e extends f{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var lo="Arn",uo="AccessKeyId",mo="AssumeRole",go="AssumedRoleId",fo="AssumeRoleRequest",ho="AssumeRoleResponse",te="AssumedRoleUser",So="AssumeRoleWithWebIdentity",Eo="AssumeRoleWithWebIdentityRequest",Po="AssumeRoleWithWebIdentityResponse",Ao="Audience",oe="Credentials",xo="ContextAssertion",wt="DurationSeconds",yo="Expiration",Co="ExternalId",Io="ExpiredTokenException",Ro="IDPCommunicationErrorException",vo="IDPRejectedClaimException",_o="InvalidIdentityTokenException",To="Key",Do="MalformedPolicyDocumentException",kt="Policy",Ot="PolicyArns",bo="ProviderArn",Ho="ProvidedContexts",wo="ProvidedContextsListType",ko="ProvidedContext",Oo="PolicyDescriptorType",Wo="ProviderId",Wt="PackedPolicySize",No="PackedPolicyTooLargeException",$o="Provider",Nt="RoleArn",Uo="RegionDisabledException",$t="RoleSessionName",Fo="SecretAccessKey",Lo="SubjectFromWebIdentityToken",re="SourceIdentity",Ko="SerialNumber",jo="SessionToken",Go="Tags",Mo="TokenCode",qo="TransitiveTagKeys",Vo="Tag",zo="Value",Jo="WebIdentityToken",Bo="arn",Qo="accessKeySecretType",R="awsQueryError",v="client",Yo="clientTokenType",_="error",T="httpError",D="message",Xo="policyDescriptorListType",Ut="smithy.ts.sdk.synthetic.com.amazonaws.sts",Zo="tagListType",c="com.amazonaws.sts",Ft=X.for(Ut),er=[-3,Ut,"STSServiceException",0,[],[]];Ft.registerError(er,f);var x=X.for(c),tr=[-3,c,Io,{[R]:["ExpiredTokenException",400],[_]:v,[T]:400},[D],[0]];x.registerError(tr,K);var or=[-3,c,Ro,{[R]:["IDPCommunicationError",400],[_]:v,[T]:400},[D],[0]];x.registerError(or,z);var rr=[-3,c,vo,{[R]:["IDPRejectedClaim",403],[_]:v,[T]:403},[D],[0]];x.registerError(rr,q);var nr=[-3,c,_o,{[R]:["InvalidIdentityToken",400],[_]:v,[T]:400},[D],[0]];x.registerError(nr,V);var sr=[-3,c,Do,{[R]:["MalformedPolicyDocument",400],[_]:v,[T]:400},[D],[0]];x.registerError(sr,j);var ir=[-3,c,No,{[R]:["PackedPolicyTooLarge",400],[_]:v,[T]:400},[D],[0]];x.registerError(ir,G);var ar=[-3,c,Uo,{[R]:["RegionDisabledException",403],[_]:v,[T]:403},[D],[0]];x.registerError(ar,M);var Lt=[Ft,x],cr=[0,c,Qo,8,0],pr=[0,c,Yo,8,0],Kt=[3,c,te,0,[go,lo],[0,0],2],lr=[3,c,fo,0,[Nt,$t,Ot,kt,wt,Go,qo,Co,Ko,Mo,re,Ho],[0,0,()=>Gt,0,1,()=>Er,64,0,0,0,0,()=>Sr],2],dr=[3,c,ho,0,[oe,te,Wt,re],[[()=>jt,0],()=>Kt,1,0]],ur=[3,c,Eo,0,[Nt,$t,Jo,Wo,Ot,kt,wt],[0,0,[()=>pr,0],0,()=>Gt,0,1],3],mr=[3,c,Po,0,[oe,Lo,te,Wt,$o,Ao,re],[[()=>jt,0],0,()=>Kt,1,0,0,0]],jt=[3,c,oe,0,[uo,Fo,jo,yo],[0,[()=>cr,0],0,4],4],gr=[3,c,Oo,0,[Bo],[0]],fr=[3,c,ko,0,[bo,xo],[0,0]],hr=[3,c,Vo,0,[To,zo],[0,0],2],Gt=[1,c,Xo,0,()=>gr],Sr=[1,c,wo,0,()=>fr];var Er=[1,c,Zo,0,()=>hr],Mt=[9,c,mo,0,()=>lr,()=>dr],qt=[9,c,So,0,()=>ur,()=>mr];var Vt=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??Ze,base64Encoder:e?.base64Encoder??ot,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ht,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ct,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new F},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new $}],logger:e?.logger??new Se,protocol:e?.protocol??je,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:Lt,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??ie,utf8Decoder:e?.utf8Decoder??et,utf8Encoder:e?.utf8Encoder??tt});var zt=e=>{ge(process.version);let t=xe(e),n=()=>t().then(me),i=Vt(e);Oe(process.version);let r={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??P(Le,r),bodyLengthChecker:e?.bodyLengthChecker??Xe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Qe({serviceId:i.serviceId,clientVersion:it.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:u=>u.getIdentityProvider("aws.auth#sigv4")||(async p=>await e.credentialDefaultProvider(p?.__config||{})()),signer:new F},{schemeId:"smithy.api#noAuth",identityProvider:u=>u.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new $}],maxAttempts:e?.maxAttempts??P(Ne,e),region:e?.region??P(Ee,{...Pe,...r}),requestHandler:Ge.create(e?.requestHandler??n),retryMode:e?.retryMode??P({...Ue,default:async()=>(await n()).retryMode||We},e),sha256:e?.sha256??ve.bind(null,"sha256"),streamCollector:e?.streamCollector??Me,useDualstackEndpoint:e?.useDualstackEndpoint??P(ae,r),useFipsEndpoint:e?.useFipsEndpoint??P(ce,r),userAgentAppId:e?.userAgentAppId??P(Ye,r)}};var Jt=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(r){let u=t.findIndex(p=>p.schemeId===r.schemeId);u===-1?t.push(r):t.splice(u,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){n=r},httpAuthSchemeProvider(){return n},setCredentials(r){i=r},credentials(){return i}}},Bt=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var Qt=(e,t)=>{let n=Object.assign(rt(e),fe(e),_e(e),Jt(e));return t.forEach(i=>i.configure(n)),Object.assign(e,nt(n),he(n),Te(n),Bt(n))};var E=class extends pe{config;constructor(...[t]){let n=zt(t||{});super(n),this.initConfig=n;let i=lt(n),r=Je(i),u=$e(r),p=Ae(u),S=p,y=Re(S),C=pt(y),b=Qt(C,t?.extensions||[]);this.config=b,this.middlewareStack.use(le(this.config)),this.middlewareStack.use(Be(this.config)),this.middlewareStack.use(Fe(this.config)),this.middlewareStack.use(De(this.config)),this.middlewareStack.use(qe(this.config)),this.middlewareStack.use(Ve(this.config)),this.middlewareStack.use(ze(this.config)),this.middlewareStack.use(be(this.config,{httpAuthSchemeParametersProvider:at,identityProviderConfigProvider:async I=>new we({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(He(this.config))}destroy(){super.destroy()}};var w=class extends W.classBuilder().ep(L).m(function(t,n,i,r){return[N(i,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Mt).build(){};var k=class extends W.classBuilder().ep(L).m(function(t,n,i,r){return[N(i,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(qt).build(){};var Pr={AssumeRoleCommand:w,AssumeRoleWithWebIdentityCommand:k},ne=class extends E{};de(Pr,ne);var Yt=e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},Xt=async(e,t,n,i={})=>{let r=typeof e=="function"?await e():e,u=typeof t=="function"?await t():t,p="",S=r??u??(p=await st(i)());return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${r} (credential provider clientConfig)`,`${u} (contextual client)`,`${p} (STS default: AWS_REGION, profile region, or us-east-1)`),S},Zt=(e,t)=>{let n,i;return async(r,u)=>{if(i=r,!n){let{logger:b=e?.parentClientConfig?.logger,profile:I=e?.parentClientConfig?.profile,region:J,requestHandler:O=e?.parentClientConfig?.requestHandler,credentialProviderLogger:B,userAgentAppId:Q=e?.parentClientConfig?.userAgentAppId}=e,ro=await Xt(J,e?.parentClientConfig?.region,B,{logger:b,profile:I}),no=!to(O);n=new t({...e,userAgentAppId:Q,profile:I,credentialDefaultProvider:()=>async()=>i,region:ro,requestHandler:no?O:void 0,logger:b})}let{Credentials:p,AssumedRoleUser:S}=await n.send(new w(u));if(!p||!p.AccessKeyId||!p.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`);let y=Yt(S),C={accessKeyId:p.AccessKeyId,secretAccessKey:p.SecretAccessKey,sessionToken:p.SessionToken,expiration:p.Expiration,...p.CredentialScope&&{credentialScope:p.CredentialScope},...y&&{accountId:y}};return U(C,"CREDENTIALS_STS_ASSUME_ROLE","i"),C}},eo=(e,t)=>{let n;return async i=>{if(!n){let{logger:y=e?.parentClientConfig?.logger,profile:C=e?.parentClientConfig?.profile,region:b,requestHandler:I=e?.parentClientConfig?.requestHandler,credentialProviderLogger:J,userAgentAppId:O=e?.parentClientConfig?.userAgentAppId}=e,B=await Xt(b,e?.parentClientConfig?.region,J,{logger:y,profile:C}),Q=!to(I);n=new t({...e,userAgentAppId:O,profile:C,region:B,requestHandler:Q?I:void 0,logger:y})}let{Credentials:r,AssumedRoleUser:u}=await n.send(new k(i));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${i.RoleArn}`);let p=Yt(u),S={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...p&&{accountId:p}};return p&&U(S,"RESOLVED_ACCOUNT_ID","T"),U(S,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),S}};var to=e=>e?.metadata?.handlerProtocol==="h2";var oo=(e,t)=>t?class extends e{constructor(i){super(i);for(let r of t)this.middlewareStack.use(r)}}:e,Ar=(e={},t)=>Zt(e,oo(E,t)),xr=(e={},t)=>eo(e,oo(E,t)),is=e=>t=>e({roleAssumer:Ar(t),roleAssumerWithWebIdentity:xr(t),...t});export{W as $Command,Mt as AssumeRole$,w as AssumeRoleCommand,lr as AssumeRoleRequest$,dr as AssumeRoleResponse$,qt as AssumeRoleWithWebIdentity$,k as AssumeRoleWithWebIdentityCommand,ur as AssumeRoleWithWebIdentityRequest$,mr as AssumeRoleWithWebIdentityResponse$,Kt as AssumedRoleUser$,jt as Credentials$,K as ExpiredTokenException,tr as ExpiredTokenException$,z as IDPCommunicationErrorException,or as IDPCommunicationErrorException$,q as IDPRejectedClaimException,rr as IDPRejectedClaimException$,V as InvalidIdentityTokenException,nr as InvalidIdentityTokenException$,j as MalformedPolicyDocumentException,sr as MalformedPolicyDocumentException$,G as PackedPolicyTooLargeException,ir as PackedPolicyTooLargeException$,gr as PolicyDescriptorType$,fr as ProvidedContext$,M as RegionDisabledException,ar as RegionDisabledException$,ne as STS,E as STSClient,f as STSServiceException,er as STSServiceException$,hr as Tag$,pe as __Client,is as decorateDefaultCredentialProvider,Lt as errorTypeRegistries,Ar as getDefaultRoleAssumer,xr as getDefaultRoleAssumerWithWebIdentity};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sailor",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "Governed AI-native SaaS scaffolder for Nebutra Sailor. Bootstrap a production-ready Next.js + Hono + Prisma monorepo with multi-tenant foundations, region-aware defaults, and AI integrations.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,18 +13,9 @@
13
13
  "README.md",
14
14
  "LICENSE"
15
15
  ],
16
- "scripts": {
17
- "dev": "tsup --watch",
18
- "build": "tsup",
19
- "prepublishOnly": "pnpm run build",
20
- "start": "node dist/index.js",
21
- "test": "vitest run",
22
- "test:watch": "vitest"
23
- },
24
16
  "dependencies": {
25
17
  "@clack/prompts": "^1.5.0",
26
18
  "@mrleebo/prisma-ast": "^0.16.0",
27
- "@nebutra/brand": "workspace:*",
28
19
  "cfonts": "^3.3.0",
29
20
  "commander": "^15.0.0",
30
21
  "gradient-string": "^3.0.0",
@@ -33,11 +24,12 @@
33
24
  "update-notifier": "^7.3.1"
34
25
  },
35
26
  "devDependencies": {
36
- "@types/node": "catalog:",
27
+ "@types/node": "^25.9.1",
37
28
  "@types/update-notifier": "^6.0.8",
38
- "tsup": "catalog:",
39
- "typescript": "catalog:",
40
- "vitest": "catalog:"
29
+ "tsup": "^8.5.1",
30
+ "typescript": "^5.9.3",
31
+ "vitest": "^4.1.4",
32
+ "@nebutra/brand": "0.1.2"
41
33
  },
42
34
  "engines": {
43
35
  "node": ">=20.9.0"
@@ -81,5 +73,12 @@
81
73
  "publishConfig": {
82
74
  "access": "public",
83
75
  "registry": "https://registry.npmjs.org/"
76
+ },
77
+ "scripts": {
78
+ "dev": "tsup --watch",
79
+ "build": "tsup",
80
+ "start": "node dist/index.js",
81
+ "test": "vitest run",
82
+ "test:watch": "vitest"
84
83
  }
85
- }
84
+ }
@@ -1 +0,0 @@
1
- import{a}from"./chunk-HX3EZBGO.js";import"./chunk-QSLKOXQ6.js";import"./chunk-ZIBRKYXP.js";import"./chunk-VFREGXHN.js";import"./chunk-ZCWB3HFB.js";import"./chunk-WU3IV4WF.js";import"./chunk-XB6R2VIU.js";import"./chunk-KRX2KWWT.js";import"./chunk-OIQB5F6Y.js";import"./chunk-JTXBZ2SU.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import"./chunk-SPHQRDN5.js";import"./chunk-FNDUJLS6.js";import"./chunk-HGJYEXMU.js";import"./chunk-W5TBFCWY.js";import"./chunk-TX7AAHER.js";import"./chunk-IYWUY3VA.js";export{a as AWSKMSProvider};
@@ -1 +0,0 @@
1
- import{b as F}from"./chunk-HGJYEXMU.js";var C=(t,e)=>{let r=[];if(t&&r.push(t),e)for(let o of e)r.push(o);return r},S=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,_=()=>{let t=[],e=[],r=!1,o=new Set,h=i=>i.sort((s,a)=>A[a.step]-A[s.step]||D[a.priority||"normal"]-D[s.priority||"normal"]),d=i=>{let s=!1,a=m=>{let g=C(m.name,m.aliases);if(g.includes(i)){s=!0;for(let n of g)o.delete(n);return!1}return!0};return t=t.filter(a),e=e.filter(a),s},f=i=>{let s=!1,a=m=>{if(m.middleware===i){s=!0;for(let g of C(m.name,m.aliases))o.delete(g);return!1}return!0};return t=t.filter(a),e=e.filter(a),s},u=i=>(t.forEach(s=>{i.add(s.middleware,{...s})}),e.forEach(s=>{i.addRelativeTo(s.middleware,{...s})}),i.identifyOnResolve?.(x.identifyOnResolve()),i),l=i=>{let s=[];return i.before.forEach(a=>{a.before.length===0&&a.after.length===0?s.push(a):s.push(...l(a))}),s.push(i),i.after.reverse().forEach(a=>{a.before.length===0&&a.after.length===0?s.push(a):s.push(...l(a))}),s},v=(i=!1)=>{let s=[],a=[],m={};return t.forEach(n=>{let c={...n,before:[],after:[]};for(let p of C(c.name,c.aliases))m[p]=c;s.push(c)}),e.forEach(n=>{let c={...n,before:[],after:[]};for(let p of C(c.name,c.aliases))m[p]=c;a.push(c)}),a.forEach(n=>{if(n.toMiddleware){let c=m[n.toMiddleware];if(c===void 0){if(i)return;throw new Error(`${n.toMiddleware} is not found when adding ${S(n.name,n.aliases)} middleware ${n.relation} ${n.toMiddleware}`)}n.relation==="after"&&c.after.push(n),n.relation==="before"&&c.before.push(n)}}),h(s).map(l).reduce((n,c)=>(n.push(...c),n),[])},x={add:(i,s={})=>{let{name:a,override:m,aliases:g}=s,n={step:"initialize",priority:"normal",middleware:i,...s},c=C(a,g);if(c.length>0){if(c.some(p=>o.has(p))){if(!m)throw new Error(`Duplicate middleware name '${S(a,g)}'`);for(let p of c){let w=t.findIndex(k=>k.name===p||k.aliases?.some($=>$===p));if(w===-1)continue;let y=t[w];if(y.step!==n.step||n.priority!==y.priority)throw new Error(`"${S(y.name,y.aliases)}" middleware with ${y.priority} priority in ${y.step} step cannot be overridden by "${S(a,g)}" middleware with ${n.priority} priority in ${n.step} step.`);t.splice(w,1)}}for(let p of c)o.add(p)}t.push(n)},addRelativeTo:(i,s)=>{let{name:a,override:m,aliases:g}=s,n={middleware:i,...s},c=C(a,g);if(c.length>0){if(c.some(p=>o.has(p))){if(!m)throw new Error(`Duplicate middleware name '${S(a,g)}'`);for(let p of c){let w=e.findIndex(k=>k.name===p||k.aliases?.some($=>$===p));if(w===-1)continue;let y=e[w];if(y.toMiddleware!==n.toMiddleware||y.relation!==n.relation)throw new Error(`"${S(y.name,y.aliases)}" middleware ${y.relation} "${y.toMiddleware}" middleware cannot be overridden by "${S(a,g)}" middleware ${n.relation} "${n.toMiddleware}" middleware.`);e.splice(w,1)}}for(let p of c)o.add(p)}e.push(n)},clone:()=>u(_()),use:i=>{i.applyToStack(x)},remove:i=>typeof i=="string"?d(i):f(i),removeByTag:i=>{let s=!1,a=m=>{let{tags:g,name:n,aliases:c}=m;if(g&&g.includes(i)){let p=C(n,c);for(let w of p)o.delete(w);return s=!0,!1}return!0};return t=t.filter(a),e=e.filter(a),s},concat:i=>{let s=u(_());return s.use(i),s.identifyOnResolve(r||s.identifyOnResolve()||(i.identifyOnResolve?.()??!1)),s},applyToStack:u,identify:()=>v(!0).map(i=>{let s=i.step??i.relation+" "+i.toMiddleware;return S(i.name,i.aliases)+" - "+s}),identifyOnResolve(i){return typeof i=="boolean"&&(r=i),r},resolve:(i,s)=>{for(let a of v().map(m=>m.middleware).reverse())i=a(i,s);return r&&console.log(x.identify()),i}};return x},A={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},D={high:3,normal:2,low:1};var T=class{config;middlewareStack=_();initConfig;handlers;constructor(e){this.config=e;let{protocol:r,protocolSettings:o}=e;o&&typeof r=="function"&&(e.protocol=new r(o))}send(e,r,o){let h=typeof r!="function"?r:void 0,d=typeof r=="function"?r:o,f=h===void 0&&this.config.cacheMiddleware===!0,u;if(f){this.handlers||(this.handlers=new WeakMap);let l=this.handlers;l.has(e.constructor)?u=l.get(e.constructor):(u=e.resolveMiddleware(this.middlewareStack,this.config,h),l.set(e.constructor,u))}else delete this.handlers,u=e.resolveMiddleware(this.middlewareStack,this.config,h);if(d)u(e).then(l=>d(null,l.output),l=>d(l)).catch(()=>{});else return u(e).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}};var E;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(E||(E={}));var M="__smithy_context";var Y=t=>t[M]||(t[M]={});var q=t=>{if(typeof t=="function")return t;let e=Promise.resolve(t);return()=>e};var K=(t,e,r)=>{for(let[d,f]of Object.entries(t)){let u=async function(v,x,i){let s=new f(v);if(typeof x=="function")this.send(s,x);else if(typeof i=="function"){if(typeof x!="object")throw new Error(`Expected http options but got ${typeof x}`);this.send(s,x||{},i)}else return this.send(s,x)},l=(d[0].toLowerCase()+d.slice(1)).replace(/Command$/,"");e.prototype[l]=u}let{paginators:o={},waiters:h={}}=r??{};for(let[d,f]of Object.entries(o))e.prototype[d]===void 0&&(e.prototype[d]=function(u={},l,...v){return f({...l,client:this},u,...v)});for(let[d,f]of Object.entries(h))e.prototype[d]===void 0&&(e.prototype[d]=async function(u={},l,...v){let x=l;return typeof l=="number"&&(x={maxWaitTime:l}),f({...x,client:this},u,...v)})};var b=class t extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;let r=e;return t.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;let r=e;return this===t?t.isInstance(e):t.isInstance(e)?r.name&&this.name?this.prototype.isPrototypeOf(e)||r.name===this.name:this.prototype.isPrototypeOf(e):!1}},U=(t,e={})=>{Object.entries(e).filter(([,o])=>o!==void 0).forEach(([o,h])=>{(t[o]==null||t[o]==="")&&(t[o]=h)});let r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t};var X=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:3e4};default:return{}}};var L=!1,G=t=>{t&&!L&&parseInt(t.substring(1,t.indexOf(".")))<16&&(L=!0)};var P=Object.values(E),W=t=>{let e=[];for(let r in E){let o=E[r];t[o]!==void 0&&e.push({algorithmId:()=>o,checksumConstructor:()=>t[o]})}for(let[r,o]of Object.entries(t.checksumAlgorithms??{}))e.push({algorithmId:()=>r,checksumConstructor:()=>o});return{addChecksumAlgorithm(r){t.checksumAlgorithms=t.checksumAlgorithms??{};let o=r.algorithmId(),h=r.checksumConstructor();P.includes(o)?t.checksumAlgorithms[o.toUpperCase()]=h:t.checksumAlgorithms[o]=h,e.push(r)},checksumAlgorithms(){return e}}},H=t=>{let e={};return t.checksumAlgorithms().forEach(r=>{let o=r.algorithmId();P.includes(o)&&(e[o]=r.checksumConstructor())}),e};var V=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),j=t=>{let e={};return e.retryStrategy=t.retryStrategy(),e};var J=t=>Object.assign(W(t),V(t));var Q=t=>Object.assign(H(t),j(t));var B=t=>{let e="#text";for(let r in t)t.hasOwnProperty(r)&&t[r][e]!==void 0?t[r]=t[r][e]:typeof t[r]=="object"&&t[r]!==null&&(t[r]=B(t[r]));return t};var N=class{trace(){}debug(){}info(){}warn(){}error(){}};var O="***SensitiveInformation***";function R(t,e){if(e==null)return e;let r=F.of(t);if(r.getMergedTraits().sensitive)return O;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return O}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return O}else if(r.isStructSchema()&&typeof e=="object"){let o=e,h={};for(let[d,f]of r.structIterator())o[d]!=null&&(h[d]=R(f,o[d]));return h}return e}var I=class{middlewareStack=_();schema;static classBuilder(){return new z}resolveMiddlewareWithContext(e,r,o,{middlewareFn:h,clientName:d,commandName:f,inputFilterSensitiveLog:u,outputFilterSensitiveLog:l,smithyContext:v,additionalContext:x,CommandCtor:i}){for(let c of h.bind(this)(i,e,r,o))this.middlewareStack.use(c);let s=e.concat(this.middlewareStack),{logger:a}=r,m={logger:a,clientName:d,commandName:f,inputFilterSensitiveLog:u,outputFilterSensitiveLog:l,[M]:{commandInstance:this,...v},...x},{requestHandler:g}=r,n=o??{};return v.eventStream&&(n={isEventStream:!0,...n}),s.resolve(c=>g.handle(c.request,n),m)}},z=class{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,r,o={}){return this._smithyContext={service:e,operation:r,...o},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=o=>o,r=o=>o){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=r,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){let e=this,r;return r=class extends I{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[o]){super(),this.input=o??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(o,h,d){let f=e._operationSchema,u=f?.[4]??f?.input,l=f?.[5]??f?.output;return this.resolveMiddlewareWithContext(o,h,d,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(f?R.bind(null,u):v=>v),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(f?R.bind(null,l):v=>v),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}};export{E as a,M as b,_ as c,Y as d,q as e,T as f,I as g,K as h,b as i,U as j,X as k,G as l,J as m,Q as n,B as o,N as p};
@@ -1 +0,0 @@
1
- import{A as se,a as G,f as B,g as K,h as Z,i as X,j as Y,k as _,l as j,m as ee,q as A,r as te,s as I,u as k,x as P,y as re}from"./chunk-W5TBFCWY.js";var R=class i{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,r=new Map){this.namespace=e,this.schemas=t,this.exceptions=r}static for(e){return i.registries.has(e)||i.registries.set(e,new i(e)),i.registries.get(e)}copyFrom(e){let{schemas:t,exceptions:r}=this;for(let[s,o]of e.schemas)t.has(s)||t.set(s,o);for(let[s,o]of e.exceptions)r.has(s)||r.set(s,o)}register(e,t){let r=this.normalizeShapeId(e);for(let s of[this,i.for(r.split("#")[0])])s.schemas.set(r,t)}getSchema(e){let t=this.normalizeShapeId(e);if(!this.schemas.has(t)){if(!e.includes("#")){let r="#"+e,s=[];for(let[o,a]of this.schemas.entries())o.endsWith(r)&&s.push(a);if(s.length===1)return s[0]}throw new Error(`@smithy/core/schema - schema not found for ${t}`)}return this.schemas.get(t)}registerError(e,t){let r=e,s=r[1];for(let o of[this,i.for(s)])o.schemas.set(s+"#"+r[2],r),o.exceptions.set(r,t)}getErrorCtor(e){let t=e;return this.exceptions.has(t)?this.exceptions.get(t):i.for(t[1]).exceptions.get(t)}getBaseException(){for(let e of this.exceptions.keys())if(Array.isArray(e)){let[,t,r]=e,s=t+"#"+r;if(s.startsWith("smithy.ts.sdk.synthetic.")&&s.endsWith("ServiceException"))return e}}find(e){for(let t of this.schemas.values())if(e(t))return t}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}};function Q(i){return encodeURIComponent(i).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}var O=i=>typeof i=="function"?i():i;var q=[];function C(i){if(typeof i=="object")return i;if(i=i|0,q[i])return q[i];let e={},t=0;for(let r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(i>>t++&1)===1&&(e[r]=1);return q[i]=e}var E={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},V=[],F={},l=class i{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=i.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;let r=[],s=e,o=e;for(this._isMemberSchema=!1;J(s);)r.push(s[1]),s=s[0],o=O(s),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let a=r.length-1;a>=0;--a){let h=r[a];Object.assign(this.memberTraits,C(h))}}else this.memberTraits=0;if(o instanceof i){let a=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},a,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=t??o.memberName;return}if(this.schema=O(o),le(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){let t=this.prototype.isPrototypeOf(e);return!t&&typeof e=="object"&&e!==null?e.symbol===this.symbol:t}static of(e){let t=typeof e=="function"||typeof e=="object"&&e!==null;if(typeof e=="number"){if(V[e])return V[e]}else if(typeof e=="string"){if(F[e])return F[e]}else if(t&&e[E.ns])return e[E.ns];let r=O(e);if(r instanceof i)return r;if(J(r)){let[o,a]=r;if(o instanceof i)return Object.assign(o.getMergedTraits(),C(a)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}let s=new i(r);return t?e[E.ns]=s:typeof r=="string"?F[r]=s:typeof r=="number"?V[r]=s:s}getSchema(){let e=this.schema;return Array.isArray(e)&&e[0]===0?e[4]:e}getName(e=!1){let{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let e=this.getSchema();return typeof e=="number"?e>=64&&e<128:e[0]===1}isMapSchema(){let e=this.getSchema();return typeof e=="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){let e=this.getSchema();if(typeof e!="object")return!1;let t=e[0];return t===3||t===-3||t===4}isUnionSchema(){let e=this.getSchema();return typeof e!="object"?!1:e[0]===4}isBlobSchema(){let e=this.getSchema();return e===21||e===42}isTimestampSchema(){let e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){let{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return C(this.memberTraits)}getOwnTraits(){return C(this.traits)}getKeySchema(){let[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let r=this.getSchema(),s=e?15:r[4]??0;return H([s,0],"key")}getValueSchema(){let e=this.getSchema(),[t,r,s]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],o=typeof e=="number"?63&e:e&&typeof e=="object"&&(r||s)?e[3+e[0]]:t?15:void 0;if(o!=null)return H([o,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){let t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){let r=t[4].indexOf(e),s=t[5][r];return H(J(s)?s:[s,0],e)}if(this.isDocumentSchema())return H([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){let e={};try{for(let[t,r]of this.structIterator())e[t]=r}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(let[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");let e=this.getSchema(),t=e[4].length,r=e[E.it];if(r&&t===r.length){yield*r;return}r=Array(t);for(let s=0;s<t;++s){let o=e[4][s],a=H([e[5][s],0],o);yield r[s]=[o,a]}e[E.it]=r}};function H(i,e){if(i instanceof l)return Object.assign(i,{memberName:e,_isMemberSchema:!0});let t=l;return new t(i,e)}var J=i=>Array.isArray(i)&&i.length===2,le=i=>Array.isArray(i)&&i.length>=5;var T=class{serdeContext;setSerdeContext(e){this.serdeContext=e}};var x=class i{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){let t=new i({...e,headers:{...e.headers}});return t.query&&(t.query=ue(t.query)),t}static isInstance(e){if(!e)return!1;let t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query=="object"&&typeof t.headers=="object"}clone(){return i.clone(this)}};function ue(i){return Object.keys(i).reduce((e,t)=>{let r=i[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{})}var v=class{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let t=e;return typeof t.statusCode=="number"&&typeof t.headers=="object"}};var M=class extends T{options;compositeErrorRegistry;constructor(e){super(),this.options=e,this.compositeErrorRegistry=R.for(e.defaultNamespace);for(let t of e.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return x}getResponseType(){return v}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(let[r,s]of t.url.searchParams.entries())e.query[r]=s;if(t.headers)for(let r in t.headers)e.headers[r]=t.headers[r].join(", ");return e}else{if(e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},t.headers)for(let r in t.headers)e.headers[r]=t.headers[r];return e}}setHostPrefix(e,t,r){if(this.serdeContext?.disableHostPrefix)return;let s=l.of(t.input),o=C(t.traits??{});if(o.endpoint){let a=o.endpoint?.[0];if(typeof a=="string"){for(let[h,n]of s.structIterator()){if(!n.getMergedTraits().hostLabel)continue;let f=r[h];if(typeof f!="string")throw new Error(`@smithy/core/schema - ${h} in input must be a string as hostLabel.`);a=a.replace(`{${h}}`,f)}e.hostname=a+e.hostname}}}deserializeMetadata(e){return{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"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r})}async loadEventStreamCapability(){let{EventStreamSerde:e}=await import("./event-streams-SGW54BDO.js");return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,r,s,o){return[]}getEventStreamMarshaller(){let e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}};var ie=class extends M{async serializeRequest(e,t,r){let s=t&&typeof t=="object"?t:{},o=this.serializer,a={},h={},n=await r.endpoint(),f=l.of(e?.input),b=[],u=[],p=!1,g,m=new x({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:a,headers:h,body:void 0});if(n){this.updateServiceEndpoint(m,n),this.setHostPrefix(m,e,s);let c=C(e.traits);if(c.http){m.method=c.http[0];let[d,S]=c.http[1].split("?");m.path=="/"?m.path=d:m.path+=d;let y=new URLSearchParams(S??"");for(let[w,N]of y)a[w]=N}}for(let[c,d]of f.structIterator()){let S=d.getMergedTraits()??{},y=s[c];if(y==null&&!d.isIdempotencyToken()){if(S.httpLabel&&(m.path.includes(`{${c}+}`)||m.path.includes(`{${c}}`)))throw new Error(`No value provided for input HTTP label: ${c}.`);continue}if(S.httpPayload)d.isStreaming()?d.isStructSchema()?s[c]&&(g=await this.serializeEventStream({eventStream:s[c],requestSchema:f})):g=y:(o.write(d,y),g=o.flush());else if(S.httpLabel){o.write(d,y);let w=o.flush();m.path.includes(`{${c}+}`)?m.path=m.path.replace(`{${c}+}`,w.split("/").map(Q).join("/")):m.path.includes(`{${c}}`)&&(m.path=m.path.replace(`{${c}}`,Q(w)))}else if(S.httpHeader)o.write(d,y),h[S.httpHeader.toLowerCase()]=String(o.flush());else if(typeof S.httpPrefixHeaders=="string")for(let w in y){let N=y[w],W=S.httpPrefixHeaders+w;o.write([d.getValueSchema(),{httpHeader:W}],N),h[W.toLowerCase()]=o.flush()}else S.httpQuery||S.httpQueryParams?this.serializeQuery(d,y,a):(p=!0,b.push(c),u.push(d))}if(p&&s){let[c,d]=(f.getName(!0)??"#Unknown").split("#"),S=f.getSchema()[6],y=[3,c,d,f.getMergedTraits(),b,u,void 0];S?y[6]=S:y.pop(),o.write(y,s),g=o.flush()}return m.headers=h,m.query=a,m.body=g,m}serializeQuery(e,t,r){let s=this.serializer,o=e.getMergedTraits();if(o.httpQueryParams){for(let a in t)if(!(a in r)){let h=t[a],n=e.getValueSchema();Object.assign(n.getMergedTraits(),{...o,httpQuery:a,httpQueryParams:void 0}),this.serializeQuery(n,h,r)}return}if(e.isListSchema()){let a=!!e.getMergedTraits().sparse,h=[];for(let n of t){s.write([e.getValueSchema(),o],n);let f=s.flush();(a||f!==void 0)&&h.push(f)}r[o.httpQuery]=h}else s.write([e,o],t),r[o.httpQuery]=s.flush()}async deserializeResponse(e,t,r){let s=this.deserializer,o=l.of(e.output),a={};if(r.statusCode>=300){let n=await z(r.body,t);throw n.byteLength>0&&Object.assign(a,await s.read(15,n)),await this.handleError(e,t,r,a,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(let n in r.headers){let f=r.headers[n];delete r.headers[n],r.headers[n.toLowerCase()]=f}let h=await this.deserializeHttpMessage(o,t,r,a);if(h.length){let n=await z(r.body,t);if(n.byteLength>0){let f=await s.read(o,n);for(let b of h)f[b]!=null&&(a[b]=f[b])}}else h.discardResponseBody&&await z(r.body,t);return a.$metadata=this.deserializeMetadata(r),a}async deserializeHttpMessage(e,t,r,s,o){let a;s instanceof Set?a=o:a=s;let h=!0,n=this.deserializer,f=l.of(e),b=[];for(let[u,p]of f.structIterator()){let g=p.getMemberTraits();if(g.httpPayload){if(h=!1,p.isStreaming())p.isStructSchema()?a[u]=await this.deserializeEventStream({response:r,responseSchema:f}):a[u]=re(r.body);else if(r.body){let c=await z(r.body,t);c.byteLength>0&&(a[u]=await n.read(p,c))}}else if(g.httpHeader){let m=String(g.httpHeader).toLowerCase(),c=r.headers[m];if(c!=null)if(p.isListSchema()){let d=p.getValueSchema();d.getMergedTraits().httpHeader=m;let S;d.isTimestampSchema()&&d.getSchema()===4?S=_(c,",",2):S=j(c);let y=[];for(let w of S)y.push(await n.read(d,w.trim()));a[u]=y}else a[u]=await n.read(p,c)}else if(g.httpPrefixHeaders!==void 0){a[u]={};for(let m in r.headers)if(m.startsWith(g.httpPrefixHeaders)){let c=r.headers[m],d=p.getValueSchema();d.getMergedTraits().httpHeader=m,a[u][m.slice(g.httpPrefixHeaders.length)]=await n.read(d,c)}}else g.httpResponseCode?a[u]=r.statusCode:b.push(u)}return b.discardResponseBody=h,b}};var oe=class extends M{async serializeRequest(e,t,r){let s=this.serializer,o={},a={},h=await r.endpoint(),n=l.of(e?.input),f=n.getSchema(),b,u=t&&typeof t=="object"?t:{},p=new x({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:o,headers:a,body:void 0});if(h&&(this.updateServiceEndpoint(p,h),this.setHostPrefix(p,e,u)),u){let g=n.getEventStreamMember();if(g){if(u[g]){let m={};for(let[c,d]of n.structIterator())c!==g&&u[c]&&(s.write(d,u[c]),m[c]=s.flush());b=await this.serializeEventStream({eventStream:u[g],requestSchema:n,initialRequest:m})}}else s.write(f,u),b=s.flush()}return p.headers=Object.assign(p.headers,a),p.query=o,p.body=b,p.method="POST",p}async deserializeResponse(e,t,r){let s=this.deserializer,o=l.of(e.output),a={};if(r.statusCode>=300){let n=await z(r.body,t);throw n.byteLength>0&&Object.assign(a,await s.read(15,n)),await this.handleError(e,t,r,a,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(let n in r.headers){let f=r.headers[n];delete r.headers[n],r.headers[n.toLowerCase()]=f}let h=o.getEventStreamMember();if(h)a[h]=await this.deserializeEventStream({response:r,responseSchema:o,initialResponseContainer:a});else{let n=await z(r.body,t);n.byteLength>0&&Object.assign(a,await s.read(o,n))}return a.$metadata=this.deserializeMetadata(r),a}};function $(i,e){if(e.timestampFormat.useTrait&&i.isTimestampSchema()&&(i.getSchema()===5||i.getSchema()===6||i.getSchema()===7))return i.getSchema();let{httpLabel:t,httpPrefixHeaders:r,httpHeader:s,httpQuery:o}=i.getMergedTraits();return(e.httpBindings?typeof r=="string"||s?6:o||t?5:void 0:void 0)??e.timestampFormat.default}var D=class extends T{settings;constructor(e){super(),this.settings=e}read(e,t){let r=l.of(e);if(r.isListSchema())return j(t).map(s=>this.read(r.getValueSchema(),s));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??A)(t);if(r.isTimestampSchema())switch($(r,this.settings)){case 5:return X(t);case 6:return Y(t);case 7:return Z(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){let s=r.getMergedTraits().mediaType,o=t;if(s)return r.getMergedTraits().httpHeader&&(o=this.base64ToUtf8(o)),(s==="application/json"||s.endsWith("+json"))&&(o=B.from(o)),o}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new ee(t,"bigDecimal"):r.isBooleanSchema()?String(t).toLowerCase()==="true":t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??k)((this.serdeContext?.base64Decoder??A)(e))}};var ae=class extends T{codecDeserializer;stringDeserializer;constructor(e,t){super(),this.codecDeserializer=e,this.stringDeserializer=new D(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){let r=l.of(e),s=r.getMergedTraits(),o=this.serdeContext?.utf8Encoder??k;if(s.httpHeader||s.httpResponseCode)return this.stringDeserializer.read(r,o(t));if(s.httpPayload){if(r.isBlobSchema()){let a=this.serdeContext?.utf8Decoder??te;return typeof t=="string"?a(t):t}else if(r.isStringSchema())return"byteLength"in t?o(t):t}return this.codecDeserializer.read(r,t)}};var U=class extends T{settings;stringBuffer="";constructor(e){super(),this.settings=e}write(e,t){let r=l.of(e);switch(typeof t){case"object":if(t===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${r.getName(!0)}`);switch($(r,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=G(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in t){this.stringBuffer=(this.serdeContext?.base64Encoder??I)(t);return}if(r.isListSchema()&&Array.isArray(t)){let a="";for(let h of t){this.write([r.getValueSchema(),r.getMergedTraits()],h);let n=this.flush(),f=r.getValueSchema().isTimestampSchema()?n:K(n);a!==""&&(a+=", "),a+=f}this.stringBuffer=a;return}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":let s=r.getMergedTraits().mediaType,o=t;if(s&&((s==="application/json"||s.endsWith("+json"))&&(o=B.from(o)),r.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??I)(o.toString());return}this.stringBuffer=t;break;default:r.isIdempotencyToken()?this.stringBuffer=se():this.stringBuffer=String(t)}}flush(){let e=this.stringBuffer;return this.stringBuffer="",e}};var ne=class{codecSerializer;stringSerializer;buffer;constructor(e,t,r=new U(t)){this.codecSerializer=e,this.stringSerializer=r}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){let r=l.of(e),s=r.getMergedTraits();if(s.httpHeader||s.httpLabel||s.httpQuery){this.stringSerializer.write(r,t),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,t)}flush(){if(this.buffer!==void 0){let e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}};var pe=i=>({setHttpHandler(e){i.httpHandler=e},httpHandler(){return i.httpHandler},updateHttpClientConfig(e,t){i.httpHandler?.updateHttpClientConfig(e,t)},httpHandlerConfigs(){return i.httpHandler.httpHandlerConfigs()}}),ge=i=>({httpHandler:i.httpHandler()});var ce="content-length";function he(i){return e=>async t=>{let r=t.request;if(x.isInstance(r)){let{body:s,headers:o}=r;if(s&&Object.keys(o).map(a=>a.toLowerCase()).indexOf(ce)===-1)try{let a=i(s);r.headers={...r.headers,[ce]:String(a)}}catch{}}return e({...t,request:r})}}var me={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Se=i=>({applyToStack:e=>{e.add(he(i.bodyLengthChecker),me)}});var L=i=>encodeURIComponent(i).replace(/[!'()*]/g,ye),ye=i=>`%${i.charCodeAt(0).toString(16).toUpperCase()}`;function be(i){let e=[];for(let t of Object.keys(i).sort()){let r=i[t];if(t=L(t),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${t}=${L(r[s])}`);else{let s=t;(r||typeof r=="string")&&(s+=`=${L(r)}`),e.push(s)}}return e.join("&")}function fe(i){let e={};if(i=i.replace(/^\?/,""),i)for(let t of i.split("&")){let[r,s=null]=t.split("=");r=decodeURIComponent(r),s&&(s=decodeURIComponent(s)),r in e?Array.isArray(e[r])?e[r].push(s):e[r]=[e[r],s]:e[r]=s}return e}var de=i=>{if(typeof i=="string")return de(new URL(i));let{hostname:e,pathname:t,port:r,protocol:s,search:o}=i,a;return o&&(a=fe(o)),{hostname:e,port:r?parseInt(r):void 0,protocol:s,path:t,query:a}};var z=async(i=new Uint8Array,e)=>{if(i instanceof Uint8Array)return P.mutate(i);if(!i)return P.mutate(new Uint8Array);let t=e.streamCollector(i);return P.mutate(await t)};export{O as a,l as b,R as c,z as d,Q as e,x as f,v as g,ie as h,oe as i,$ as j,D as k,ae as l,ne as m,pe as n,ge as o,Se as p,L as q,be as r,de as s};