gemi 0.10.3 → 0.10.4

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 (89) hide show
  1. package/dist/app/index.js +2 -2
  2. package/dist/app/index.js.map +1 -1
  3. package/dist/broadcasting/index.js +1 -1
  4. package/dist/{chunk-j7dp3ybs.js → chunk-0z6ff9e0.js} +2 -2
  5. package/dist/{chunk-j7dp3ybs.js.map → chunk-0z6ff9e0.js.map} +1 -1
  6. package/dist/{chunk-bq1en2df.js → chunk-2a0gv505.js} +3 -3
  7. package/dist/{chunk-bq1en2df.js.map → chunk-2a0gv505.js.map} +1 -1
  8. package/dist/chunk-33r34393.js +4 -0
  9. package/dist/{chunk-h6a9nyz3.js.map → chunk-33r34393.js.map} +1 -1
  10. package/dist/{chunk-3kyzvpxm.js → chunk-3rne5hgg.js} +2 -2
  11. package/dist/{chunk-3kyzvpxm.js.map → chunk-3rne5hgg.js.map} +1 -1
  12. package/dist/{chunk-7rpnpk1z.js → chunk-7ay7yt2j.js} +2 -2
  13. package/dist/{chunk-7rpnpk1z.js.map → chunk-7ay7yt2j.js.map} +1 -1
  14. package/dist/chunk-7c0ker8f.js +4 -0
  15. package/dist/chunk-7c0ker8f.js.map +10 -0
  16. package/dist/chunk-90wq9bk4.js +4 -0
  17. package/dist/{chunk-33nha0s0.js.map → chunk-90wq9bk4.js.map} +2 -2
  18. package/dist/chunk-a2b9d074.js +41 -0
  19. package/dist/{chunk-jf4cn9js.js.map → chunk-a2b9d074.js.map} +5 -6
  20. package/dist/chunk-ar7jn8qf.js +11 -0
  21. package/dist/{chunk-q9cmjch9.js.map → chunk-ar7jn8qf.js.map} +5 -5
  22. package/dist/chunk-b5mhzpz2.js +5 -0
  23. package/dist/{chunk-stmtmnqh.js.map → chunk-b5mhzpz2.js.map} +5 -5
  24. package/dist/chunk-bcyqtgcc.js +8 -0
  25. package/dist/{chunk-vwh3ggkh.js.map → chunk-bcyqtgcc.js.map} +2 -2
  26. package/dist/{chunk-cj0fmywk.js → chunk-bfmx3ept.js} +2 -2
  27. package/dist/{chunk-cj0fmywk.js.map → chunk-bfmx3ept.js.map} +1 -1
  28. package/dist/chunk-gw1yyfk8.js +5 -0
  29. package/dist/{chunk-90qqbngb.js.map → chunk-gw1yyfk8.js.map} +6 -6
  30. package/dist/chunk-j7rp9bfr.js +4 -0
  31. package/dist/{chunk-wzax4kjq.js.map → chunk-j7rp9bfr.js.map} +2 -2
  32. package/dist/{chunk-hkysyhdx.js → chunk-k8xgjdj1.js} +3 -3
  33. package/dist/{chunk-hkysyhdx.js.map → chunk-k8xgjdj1.js.map} +1 -1
  34. package/dist/chunk-mjw9eypm.js +13 -0
  35. package/dist/{chunk-s6b848wp.js.map → chunk-mjw9eypm.js.map} +5 -5
  36. package/dist/{chunk-6q78ag9e.js → chunk-mqdg2jq8.js} +3 -3
  37. package/dist/{chunk-6q78ag9e.js.map → chunk-mqdg2jq8.js.map} +1 -1
  38. package/dist/{chunk-ndhecb99.js → chunk-qnpctk8n.js} +2 -2
  39. package/dist/{chunk-ndhecb99.js.map → chunk-qnpctk8n.js.map} +1 -1
  40. package/dist/{chunk-fx6rsjzz.js → chunk-qyg03m1k.js} +3 -3
  41. package/dist/{chunk-fx6rsjzz.js.map → chunk-qyg03m1k.js.map} +1 -1
  42. package/dist/chunk-s8071mrg.js +4 -0
  43. package/dist/{chunk-4b3akwfv.js.map → chunk-s8071mrg.js.map} +5 -5
  44. package/dist/chunk-smxwz2cj.js +4 -0
  45. package/dist/{chunk-qywtzrf0.js.map → chunk-smxwz2cj.js.map} +5 -5
  46. package/dist/chunk-tcrnsk8p.js +4 -0
  47. package/dist/{chunk-2nrspkzr.js.map → chunk-tcrnsk8p.js.map} +2 -2
  48. package/dist/{chunk-spw59mrv.js → chunk-vxyr3gq3.js} +2 -2
  49. package/dist/{chunk-spw59mrv.js.map → chunk-vxyr3gq3.js.map} +1 -1
  50. package/dist/chunk-w8j4rmwj.js +4 -0
  51. package/dist/{chunk-ean0tyqg.js.map → chunk-w8j4rmwj.js.map} +2 -2
  52. package/dist/chunk-wr4ks2dq.js +4 -0
  53. package/dist/{chunk-4n2ggg2n.js.map → chunk-wr4ks2dq.js.map} +2 -2
  54. package/dist/chunk-ycjpgm9z.js +4 -0
  55. package/dist/{chunk-n5bvdddm.js.map → chunk-ycjpgm9z.js.map} +2 -2
  56. package/dist/{chunk-6vc15rqe.js → chunk-z1j6j14y.js} +2 -2
  57. package/dist/{chunk-6vc15rqe.js.map → chunk-z1j6j14y.js.map} +3 -3
  58. package/dist/email/index.js +2 -2
  59. package/dist/email/index.js.map +1 -1
  60. package/dist/facades/index.js +3 -3
  61. package/dist/facades/index.js.map +1 -1
  62. package/dist/http/Controller.d.ts.map +1 -1
  63. package/dist/http/index.js +2 -2
  64. package/dist/http/index.js.map +3 -3
  65. package/dist/kernel/index.js +2 -2
  66. package/dist/kernel/index.js.map +1 -1
  67. package/dist/server/index.js +2 -2
  68. package/dist/server/index.js.map +1 -1
  69. package/dist/services/index.js +52 -63
  70. package/dist/services/index.js.map +5 -16
  71. package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
  72. package/package.json +2 -2
  73. package/dist/chunk-0v0x0g72.js +0 -3
  74. package/dist/chunk-0v0x0g72.js.map +0 -15
  75. package/dist/chunk-2nrspkzr.js +0 -4
  76. package/dist/chunk-33nha0s0.js +0 -4
  77. package/dist/chunk-4b3akwfv.js +0 -4
  78. package/dist/chunk-4n2ggg2n.js +0 -4
  79. package/dist/chunk-90qqbngb.js +0 -5
  80. package/dist/chunk-ean0tyqg.js +0 -4
  81. package/dist/chunk-h6a9nyz3.js +0 -4
  82. package/dist/chunk-jf4cn9js.js +0 -41
  83. package/dist/chunk-n5bvdddm.js +0 -4
  84. package/dist/chunk-q9cmjch9.js +0 -11
  85. package/dist/chunk-qywtzrf0.js +0 -4
  86. package/dist/chunk-s6b848wp.js +0 -13
  87. package/dist/chunk-stmtmnqh.js +0 -5
  88. package/dist/chunk-vwh3ggkh.js +0 -8
  89. package/dist/chunk-wzax4kjq.js +0 -4
@@ -1,13 +0,0 @@
1
- import{ib as Q}from"./chunk-7rpnpk1z.js";import{ac as I,bc as at}from"./chunk-spw59mrv.js";var Z=at((pr,dt)=>{var{defineProperty:H,getOwnPropertyDescriptor:he,getOwnPropertyNames:ae}=Object,pe=Object.prototype.hasOwnProperty,E=(t,e)=>H(t,"name",{value:e,configurable:!0}),de=(t,e)=>{for(var r in e)H(t,r,{get:e[r],enumerable:!0})},le=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of ae(e))if(!pe.call(t,o)&&o!==r)H(t,o,{get:()=>e[o],enumerable:!(n=he(e,o))||n.enumerable})}return t},me=(t)=>le(H({},"__esModule",{value:!0}),t),pt={};de(pt,{constructStack:()=>z});dt.exports=me(pt);var $=E((t,e)=>{let r=[];if(t)r.push(t);if(e)for(let n of e)r.push(n);return r},"getAllAliases"),C=E((t,e)=>{return`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`},"getMiddlewareNameWithAliases"),z=E(()=>{let t=[],e=[],r=!1,n=new Set,o=E((f)=>f.sort((a,u)=>ut[u.step]-ut[a.step]||ht[u.priority||"normal"]-ht[a.priority||"normal"]),"sort"),s=E((f)=>{let a=!1,u=E((g)=>{let w=$(g.name,g.aliases);if(w.includes(f)){a=!0;for(let l of w)n.delete(l);return!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),a},"removeByName"),c=E((f)=>{let a=!1,u=E((g)=>{if(g.middleware===f){a=!0;for(let w of $(g.name,g.aliases))n.delete(w);return!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),a},"removeByReference"),i=E((f)=>{var a;return t.forEach((u)=>{f.add(u.middleware,{...u})}),e.forEach((u)=>{f.addRelativeTo(u.middleware,{...u})}),(a=f.identifyOnResolve)==null||a.call(f,y.identifyOnResolve()),f},"cloneTo"),h=E((f)=>{let a=[];return f.before.forEach((u)=>{if(u.before.length===0&&u.after.length===0)a.push(u);else a.push(...h(u))}),a.push(f),f.after.reverse().forEach((u)=>{if(u.before.length===0&&u.after.length===0)a.push(u);else a.push(...h(u))}),a},"expandRelativeMiddlewareList"),d=E((f=!1)=>{let a=[],u=[],g={};return t.forEach((l)=>{let m={...l,before:[],after:[]};for(let p of $(m.name,m.aliases))g[p]=m;a.push(m)}),e.forEach((l)=>{let m={...l,before:[],after:[]};for(let p of $(m.name,m.aliases))g[p]=m;u.push(m)}),u.forEach((l)=>{if(l.toMiddleware){let m=g[l.toMiddleware];if(m===void 0){if(f)return;throw new Error(`${l.toMiddleware} is not found when adding ${C(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")m.after.push(l);if(l.relation==="before")m.before.push(l)}}),o(a).map(h).reduce((l,m)=>{return l.push(...m),l},[])},"getMiddlewareList"),y={add:(f,a={})=>{let{name:u,override:g,aliases:w}=a,l={step:"initialize",priority:"normal",middleware:f,...a},m=$(u,w);if(m.length>0){if(m.some((p)=>n.has(p))){if(!g)throw new Error(`Duplicate middleware name '${C(u,w)}'`);for(let p of m){let x=t.findIndex((k)=>{var D;return k.name===p||((D=k.aliases)==null?void 0:D.some((W)=>W===p))});if(x===-1)continue;let T=t[x];if(T.step!==l.step||l.priority!==T.priority)throw new Error(`"${C(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${C(u,w)}" middleware with ${l.priority} priority in ${l.step} step.`);t.splice(x,1)}}for(let p of m)n.add(p)}t.push(l)},addRelativeTo:(f,a)=>{let{name:u,override:g,aliases:w}=a,l={middleware:f,...a},m=$(u,w);if(m.length>0){if(m.some((p)=>n.has(p))){if(!g)throw new Error(`Duplicate middleware name '${C(u,w)}'`);for(let p of m){let x=e.findIndex((k)=>{var D;return k.name===p||((D=k.aliases)==null?void 0:D.some((W)=>W===p))});if(x===-1)continue;let T=e[x];if(T.toMiddleware!==l.toMiddleware||T.relation!==l.relation)throw new Error(`"${C(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${C(u,w)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);e.splice(x,1)}}for(let p of m)n.add(p)}e.push(l)},clone:()=>i(z()),use:(f)=>{f.applyToStack(y)},remove:(f)=>{if(typeof f==="string")return s(f);else return c(f)},removeByTag:(f)=>{let a=!1,u=E((g)=>{let{tags:w,name:l,aliases:m}=g;if(w&&w.includes(f)){let p=$(l,m);for(let x of p)n.delete(x);return a=!0,!1}return!0},"filterCb");return t=t.filter(u),e=e.filter(u),a},concat:(f)=>{var a;let u=i(z());return u.use(f),u.identifyOnResolve(r||u.identifyOnResolve()||(((a=f.identifyOnResolve)==null?void 0:a.call(f))??!1)),u},applyToStack:i,identify:()=>{return d(!0).map((f)=>{let a=f.step??f.relation+" "+f.toMiddleware;return C(f.name,f.aliases)+" - "+a})},identifyOnResolve(f){if(typeof f==="boolean")r=f;return r},resolve:(f,a)=>{for(let u of d().map((g)=>g.middleware).reverse())f=u(f,a);if(r)console.log(y.identify());return f}};return y},"constructStack"),ut={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ht={high:3,normal:2,low:1}});var jt=at((So,Ht)=>{var{defineProperty:J,getOwnPropertyDescriptor:De,getOwnPropertyNames:Le}=Object,Re=Object.prototype.hasOwnProperty,Dt=(t,e)=>J(t,"name",{value:e,configurable:!0}),Me=(t,e)=>{for(var r in e)J(t,r,{get:e[r],enumerable:!0})},Be=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of Le(e))if(!Re.call(t,o)&&o!==r)J(t,o,{get:()=>e[o],enumerable:!(n=De(e,o))||n.enumerable})}return t},He=(t)=>Be(J({},"__esModule",{value:!0}),t),Lt={};Me(Lt,{fromHex:()=>Mt,toHex:()=>Bt});Ht.exports=He(Lt);var Rt={},et={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();if(e.length===1)e=`0${e}`;Rt[t]=e,et[e]=t}function Mt(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2){let n=t.slice(r,r+2).toLowerCase();if(n in et)e[r/2]=et[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e}Dt(Mt,"fromHex");function Bt(t){let e="";for(let r=0;r<t.byteLength;r++)e+=Rt[t[r]];return e}Dt(Bt,"toHex")});var lt=I(Z(),1);class ge{constructor(t){this.config=t,this.middlewareStack=lt.constructStack()}send(t,e,r){let n=typeof e!=="function"?e:void 0,o=typeof e==="function"?e:r,s=n===void 0&&this.config.cacheMiddleware===!0,c;if(s){if(!this.handlers)this.handlers=new WeakMap;let i=this.handlers;if(i.has(t.constructor))c=i.get(t.constructor);else c=t.resolveMiddleware(this.middlewareStack,this.config,n),i.set(t.constructor,c)}else delete this.handlers,c=t.resolveMiddleware(this.middlewareStack,this.config,n);if(o)c(t).then((i)=>o(null,i.output),(i)=>o(i)).catch(()=>{});else return c(t).then((i)=>i.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var mt=I(Z(),1),gt=I(Q(),1);class yt{constructor(){this.middlewareStack=mt.constructStack()}static classBuilder(){return new wt}resolveMiddlewareWithContext(t,e,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:h,additionalContext:d,CommandCtor:y}){for(let w of n.bind(this)(y,t,e,r))this.middlewareStack.use(w);let f=t.concat(this.middlewareStack),{logger:a}=e,u={logger:a,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[gt.SMITHY_CONTEXT_KEY]:{commandInstance:this,...h},...d},{requestHandler:g}=e;return f.resolve((w)=>g.handle(w.request,r||{}),u)}}class wt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(t)=>t,this._outputFilterSensitiveLog=(t)=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,e,r={}){return this._smithyContext={service:t,operation:e,...r},this}c(t={}){return this._additionalContext=t,this}n(t,e){return this._clientName=t,this._commandName=e,this}f(t=(r)=>r,e=(r)=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=e,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){let t=this,e;return e=class extends yt{static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super();this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=r??{},t._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:e,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}var gr=(t)=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},yr=(t)=>{return{httpHandler:t.httpHandler()}};var ye=I(Q(),1);class G{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){let e=new G({...t,headers:{...t.headers}});if(e.query)e.query=we(e.query);return e}static isInstance(t){if(!t)return!1;let e=t;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query==="object"&&typeof e.headers==="object"}clone(){return G.clone(this)}}function we(t){return Object.keys(t).reduce((e,r)=>{let n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class L{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let e=t;return typeof e.statusCode==="number"&&typeof e.headers==="object"}}var R=(t)=>encodeURIComponent(t).replace(/[!'()*]/g,xe),xe=(t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function j(t){let e=[];for(let r of Object.keys(t).sort()){let n=t[r];if(r=R(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)e.push(`${r}=${R(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${R(n)}`;e.push(o)}}return e.join("&")}import{Agent as Ct,request as be}from"http";import{Agent as $t,request as Se}from"https";var xt=["ECONNRESET","EPIPE","ETIMEDOUT"];var K=(t)=>{let e={};for(let r of Object.keys(t)){let n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return e};var Tt=(t,e,r=0)=>{if(!r)return-1;let n=(o)=>{let s=setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r-o),c=(i)=>{if(i?.connecting)i.on("connect",()=>{clearTimeout(s)});else clearTimeout(s)};if(t.socket)c(t.socket);else t.on("socket",c)};if(r<2000)return n(0),0;return setTimeout(n.bind(null,1000),1000)};var Et=(t,{keepAlive:e,keepAliveMsecs:r},n=3000)=>{if(e!==!0)return-1;let o=()=>{if(t.socket)t.socket.setKeepAlive(e,r||0);else t.on("socket",(s)=>{s.setKeepAlive(e,r||0)})};if(n===0)return o(),0;return setTimeout(o,n)};var bt=(t,e,r=0)=>{let n=(o)=>{t.setTimeout(r-o,()=>{t.destroy(),e(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};if(0<r&&r<6000)return n(0),0;return setTimeout(n.bind(null,r===0?0:3000),3000)};import{Readable as Te}from"stream";var St=1000;async function X(t,e,r=St){let n=e.headers??{},o=n.Expect||n.expect,s=-1,c=!1;if(o==="100-continue")await Promise.race([new Promise((i)=>{s=Number(setTimeout(i,Math.max(St,r)))}),new Promise((i)=>{t.on("continue",()=>{clearTimeout(s),i()}),t.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)Ee(t,e.body)}function Ee(t,e){if(e instanceof Te){e.pipe(t);return}if(e){if(Buffer.isBuffer(e)||typeof e==="string"){t.end(e);return}let r=e;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){t.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}t.end(Buffer.from(e));return}t.end()}class _{static create(t){if(typeof t?.handle==="function")return t;return new _(t)}static checkSocketUsage(t,e,r=console){let{sockets:n,requests:o,maxSockets:s}=t;if(typeof s!=="number"||s===1/0)return e;let c=15000;if(Date.now()-c<e)return e;if(n&&o)for(let i in n){let h=n[i]?.length??0,d=o[i]?.length??0;if(h>=s&&d>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${h} and ${d} additional requests are enqueued.
2
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return e}constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,r)=>{if(typeof t==="function")t().then((n)=>{e(this.resolveDefaultConfig(n))}).catch(r);else e(this.resolveDefaultConfig(t))})}resolveDefaultConfig(t){let{requestTimeout:e,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=t||{},c=!0,i=50;return{connectionTimeout:r,requestTimeout:e??n,httpAgent:(()=>{if(o instanceof Ct||typeof o?.destroy==="function")return o;return new Ct({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof $t||typeof s?.destroy==="function")return s;return new $t({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:e}={}){if(!this.config)this.config=await this.configProvider;return new Promise((r,n)=>{let o=void 0,s=[],c=async(p)=>{await o,s.forEach(clearTimeout),r(p)},i=async(p)=>{await o,s.forEach(clearTimeout),n(p)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e?.aborted){let p=new Error("Request aborted");p.name="AbortError",i(p);return}let h=t.protocol==="https:",d=h?this.config.httpsAgent:this.config.httpAgent;s.push(setTimeout(()=>{this.socketWarningTimestamp=_.checkSocketUsage(d,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let y=j(t.query||{}),f=void 0;if(t.username!=null||t.password!=null){let p=t.username??"",x=t.password??"";f=`${p}:${x}`}let a=t.path;if(y)a+=`?${y}`;if(t.fragment)a+=`#${t.fragment}`;let u=t.hostname??"";if(u[0]==="["&&u.endsWith("]"))u=t.hostname.slice(1,-1);else u=t.hostname;let g={headers:t.headers,host:u,method:t.method,path:a,port:t.port,agent:d,auth:f},l=(h?Se:be)(g,(p)=>{let x=new L({statusCode:p.statusCode||-1,reason:p.statusMessage,headers:K(p.headers),body:p});c({response:x})});if(l.on("error",(p)=>{if(xt.includes(p.code))i(Object.assign(p,{name:"TimeoutError"}));else i(p)}),e){let p=()=>{l.destroy();let x=new Error("Request aborted");x.name="AbortError",i(x)};if(typeof e.addEventListener==="function"){let x=e;x.addEventListener("abort",p,{once:!0}),l.once("close",()=>x.removeEventListener("abort",p))}else e.onabort=p}s.push(Tt(l,i,this.config.connectionTimeout)),s.push(bt(l,i,this.config.requestTimeout));let m=g.agent;if(typeof m==="object"&&"keepAlive"in m)s.push(Et(l,{keepAlive:m.keepAlive,keepAliveMsecs:m.keepAliveMsecs}));o=X(l,t,this.config.requestTimeout).catch((p)=>{return s.forEach(clearTimeout),n(p)})})}updateHttpClientConfig(t,e){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[t]:e}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as Ce}from"stream";class v extends Ce{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,e,r){this.bufferedBytes.push(t),r()}}var At=(t)=>{if($e(t))return Ae(t);return new Promise((e,r)=>{let n=new v;t.pipe(n),t.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){let o=new Uint8Array(Buffer.concat(this.bufferedBytes));e(o)})})},$e=(t)=>typeof ReadableStream==="function"&&t instanceof ReadableStream;async function Ae(t){let e=[],r=t.getReader(),n=!1,o=0;while(!n){let{done:i,value:h}=await r.read();if(h)e.push(h),o+=h.length;n=i}let s=new Uint8Array(o),c=0;for(let i of e)s.set(i,c),c+=i.length;return s}var In="***SensitiveInformation***";var Fn=(t,e)=>{for(let r of Object.keys(t)){let n=t[r],o=async function(c,i,h){let d=new n(c);if(typeof i==="function")this.send(d,i);else if(typeof h==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(d,i||{},h)}else return this.send(d,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");e.prototype[s]=o}};class It extends Error{constructor(t){super(t.message);Object.setPrototypeOf(this,It.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}}var Ut=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(t[n]==null||t[n]==="")t[n]=o});let r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t};class Ie{trace(){}debug(){}info(){}warn(){}error(){}}var Ft=(t)=>typeof ArrayBuffer==="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";import{Buffer as tt}from"buffer";var U=(t,e=0,r=t.byteLength-e)=>{if(!Ft(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return tt.from(t,e,r)},O=(t,e)=>{if(typeof t!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?tt.from(t,e):tt.from(t)};var Ue=/^[A-Za-z0-9+/]*={0,2}$/,q=(t)=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Ue.exec(t))throw new TypeError("Invalid base64 string.");let e=O(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};var F=(t)=>{let e=O(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Vn=(t)=>{if(typeof t==="string")return F(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)};var V=(t)=>{if(typeof t==="string")return t;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return U(t.buffer,t.byteOffset,t.byteLength).toString("utf8")};var Y=(t)=>{let e;if(typeof t==="string")e=F(t);else e=t;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return U(e.buffer,e.byteOffset,e.byteLength).toString("base64")};function Nt(t,e="utf-8"){if(e==="base64")return Y(t);return V(t)}function Pt(t,e){if(e==="base64")return S.mutate(q(t));return S.mutate(F(t))}class S extends Uint8Array{static fromString(t,e="utf-8"){switch(typeof t){case"string":return Pt(t,e);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,S.prototype),t}transformToString(t="utf-8"){return Nt(this,t)}}import{Readable as Fe}from"stream";var uo=(t,e)=>{let{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:s,streamHasher:c}=e,i=r!==void 0&&o!==void 0&&s!==void 0&&c!==void 0,h=i?c(o,t):void 0,d=new Fe({read:()=>{}});return t.on("data",(y)=>{let f=n(y)||0;d.push(`${f.toString(16)}\r
4
- `),d.push(y),d.push(`\r
5
- `)}),t.on("end",async()=>{if(d.push(`0\r
6
- `),i){let y=r(await h);d.push(`${s}:${y}\r
7
- `),d.push(`\r
8
- `)}d.push(null)}),d};import{Readable as rt}from"stream";import{TextDecoder as je}from"util";var kt=(t)=>{if(typeof Blob==="function"&&t instanceof Blob)return Ne(t);return Pe(t)};async function Ne(t){let e=await ke(t),r=q(e);return new Uint8Array(r)}async function Pe(t){let e=[],r=t.getReader(),n=!1,o=0;while(!n){let{done:i,value:h}=await r.read();if(h)e.push(h),o+=h.length;n=i}let s=new Uint8Array(o),c=0;for(let i of e)s.set(i,c),c+=i.length;return s}function ke(t){return new Promise((e,r)=>{let n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));let o=n.result??"",s=o.indexOf(","),c=s>-1?s+1:o.length;e(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})}var Vt=I(jt(),1);var A=(t)=>typeof ReadableStream==="function"&&(t?.constructor?.name===ReadableStream.name||t instanceof ReadableStream);var Ot="The stream has already been transformed.",Yt=(t)=>{if(!qt(t)&&!A(t)){let o=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let e=!1,r=async()=>{if(e)throw new Error(Ot);return e=!0,await kt(t)},n=(o)=>{if(typeof o.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
9
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return o.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async(o)=>{let s=await r();if(o==="base64")return Y(s);else if(o==="hex")return Vt.toHex(s);else if(o===void 0||o==="utf8"||o==="utf-8")return V(s);else if(typeof TextDecoder==="function")return new TextDecoder(o).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(e)throw new Error(Ot);if(e=!0,qt(t))return n(t);else if(A(t))return t;else throw new Error(`Cannot transform payload to web stream, got ${t}`)}})},qt=(t)=>typeof Blob==="function"&&t instanceof Blob;var Jt="The stream has already been transformed.",Ro=(t)=>{if(!(t instanceof rt))try{return Yt(t)}catch(n){let o=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let e=!1,r=async()=>{if(e)throw new Error(Jt);return e=!0,await At(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async(n)=>{let o=await r();if(n===void 0||Buffer.isEncoding(n))return U(o.buffer,o.byteOffset,o.byteLength).toString(n);else return new je(n).decode(o)},transformToWebStream:()=>{if(e)throw new Error(Jt);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof rt.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return e=!0,rt.toWeb(t)}})};import{PassThrough as zt}from"stream";async function Wt(t){if(typeof t.stream==="function")t=t.stream();return t.tee()}async function qo(t){if(A(t))return Wt(t);let e=new zt,r=new zt;return t.pipe(e),t.pipe(r),[e,r]}import{Writable as Oe}from"stream";async function Zt(t,e){let r=0,n=[],o=t.getReader(),s=!1;while(!s){let{done:h,value:d}=await o.read();if(d)n.push(d),r+=d?.byteLength??0;if(r>=e)break;s=h}o.releaseLock();let c=new Uint8Array(Math.min(e,r)),i=0;for(let h of n){if(h.byteLength>c.byteLength-i){c.set(h.subarray(0,c.byteLength-i),i);break}else c.set(h,i);i+=h.length}return c}var Zo=(t,e)=>{if(A(t))return Zt(t,e);return new Promise((r,n)=>{let o=new Qt;o.limit=e,t.pipe(o),t.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){let s=new Uint8Array(Buffer.concat(this.buffers));r(s)})})};class Qt extends Oe{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(t,e,r){if(this.buffers.push(t),this.bytesBuffered+=t.byteLength??0,this.bytesBuffered>=this.limit){let n=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-n),this.emit("finish")}r()}}var ns=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return S.mutate(t);if(!t)return S.mutate(new Uint8Array);let r=e.streamCollector(t);return S.mutate(await r)};var ss=(t)=>{switch(t){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${t}"`)}};var qe=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string"){let e=parseFloat(t);if(!Number.isNaN(e)){if(String(e)!==String(t))re.warn(ee(`Expected number but observed string: ${t}`));return e}}if(typeof t==="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)},Ve=Math.ceil(340282346638528860000000000000000000000),Gt=(t)=>{let e=qe(t);if(e!==void 0&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0){if(Math.abs(e)>Ve)throw new TypeError(`Expected 32-bit float, got ${t}`)}return e},nt=(t)=>{if(t===null||t===void 0)return;if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)};var Kt=(t)=>ot(t,32),Xt=(t)=>ot(t,16),_t=(t)=>ot(t,8),ot=(t,e)=>{let r=nt(t);if(r!==void 0&&Ye(r,e)!==r)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return r},Ye=(t,e)=>{switch(e){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},is=(t,e)=>{if(t===null||t===void 0){if(e)throw new TypeError(`Expected a non-null value for ${e}`);throw new TypeError("Expected a non-null value")}return t},cs=(t)=>{if(t===null||t===void 0)return;if(typeof t==="object"&&!Array.isArray(t))return t;let e=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${e}: ${t}`)},fs=(t)=>{if(t===null||t===void 0)return;if(typeof t==="string")return t;if(["boolean","number","bigint"].includes(typeof t))return re.warn(ee(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)};var vt=(t)=>{if(typeof t=="string")return Gt(M(t));return Gt(t)},Je=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,M=(t)=>{let e=t.match(Je);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)};var us=(t)=>{if(typeof t==="string")return nt(M(t));return nt(t)};var hs=(t)=>{if(typeof t==="string")return Kt(M(t));return Kt(t)},N=(t)=>{if(typeof t==="string")return Xt(M(t));return Xt(t)},te=(t)=>{if(typeof t==="string")return _t(M(t));return _t(t)},ee=(t)=>{return String(new TypeError(t).stack||t).split(`
10
- `).slice(0,5).filter((e)=>!e.includes("stackTraceWarning")).join(`
11
- `)},re={warn:console.warn};var We=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],it=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ls(t){let e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),o=t.getUTCDate(),s=t.getUTCHours(),c=t.getUTCMinutes(),i=t.getUTCSeconds(),h=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,y=c<10?`0${c}`:`${c}`,f=i<10?`0${i}`:`${i}`;return`${We[n]}, ${h} ${it[r]} ${e} ${d}:${y}:${f} GMT`}var ze=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ms=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let e=ze.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,c,i,h,d]=e,y=N(P(n)),f=b(o,"month",1,12),a=b(s,"day",1,31);return B(y,f,a,{hours:c,minutes:i,seconds:h,fractionalMilliseconds:d})},Ze=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),gs=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let e=Ze.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,c,i,h,d,y]=e,f=N(P(n)),a=b(o,"month",1,12),u=b(s,"day",1,31),g=B(f,a,u,{hours:c,minutes:i,seconds:h,fractionalMilliseconds:d});if(y.toUpperCase()!="Z")g.setTime(g.getTime()-or(y));return g},Qe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ge=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ke=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),ys=(t)=>{if(t===null||t===void 0)return;if(typeof t!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=Qe.exec(t);if(e){let[r,n,o,s,c,i,h,d]=e;return B(N(P(s)),st(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:h,fractionalMilliseconds:d})}if(e=Ge.exec(t),e){let[r,n,o,s,c,i,h,d]=e;return ve(B(Xe(s),st(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:h,fractionalMilliseconds:d}))}if(e=Ke.exec(t),e){let[r,n,o,s,c,i,h,d]=e;return B(N(P(d)),st(n),b(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:h})}throw new TypeError("Invalid RFC-7231 date-time value")};var B=(t,e,r,n)=>{let o=e-1;return er(t,o,r),new Date(Date.UTC(t,o,r,b(n.hours,"hour",0,23),b(n.minutes,"minute",0,59),b(n.seconds,"seconds",0,60),nr(n.fractionalMilliseconds)))},Xe=(t)=>{let e=new Date().getUTCFullYear(),r=Math.floor(e/100)*100+N(P(t));if(r<e)return r+100;return r},_e=1576800000000,ve=(t)=>{if(t.getTime()-new Date().getTime()>_e)return new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()));return t},st=(t)=>{let e=it.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},tr=[31,28,31,30,31,30,31,31,30,31,30,31],er=(t,e,r)=>{let n=tr[e];if(e===1&&rr(t))n=29;if(r>n)throw new TypeError(`Invalid day for ${it[e]} in ${t}: ${r}`)},rr=(t)=>{return t%4===0&&(t%100!==0||t%400===0)},b=(t,e,r,n)=>{let o=te(P(t));if(o<r||o>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return o},nr=(t)=>{if(t===null||t===void 0)return 0;return vt("0."+t)*1000},or=(t)=>{let e=t[0],r=1;if(e=="+")r=1;else if(e=="-")r=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);let n=Number(t.substring(1,3)),o=Number(t.substring(4,6));return r*(n*60+o)*60*1000},P=(t)=>{let e=0;while(e<t.length-1&&t.charAt(e)==="0")e++;if(e===0)return t;return t.slice(e)};var sr=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{let o=ir(t),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:e?.code||e?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw Ut(c,e)},Ts=(t)=>{return({output:e,parsedBody:r,errorCode:n})=>{sr({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})}},ir=(t)=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]});var bs=(t)=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var ne=!1,Cs=(t)=>{if(t&&!ne&&parseInt(t.substring(1,t.indexOf(".")))<16)ne=!0};var ct=I(Q(),1);var oe=(t)=>{let e=[];for(let r in ct.AlgorithmId){let n=ct.AlgorithmId[r];if(t[n]===void 0)continue;e.push({algorithmId:()=>n,checksumConstructor:()=>t[n]})}return{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},se=(t)=>{let e={};return t.checksumAlgorithms().forEach((r)=>{e[r.algorithmId()]=r.checksumConstructor()}),e};var ie=(t)=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},ce=(t)=>{let e={};return e.retryStrategy=t.retryStrategy(),e};var Ns=(t)=>{return{...oe(t),...ie(t)}};var Ps=(t)=>{return{...se(t),...ce(t)}};function cr(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}var Ms=(t)=>Array.isArray(t)?t:[t];var ft=function(){let t=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,t.prototype),r};ft.prototype=Object.create(String.prototype,{constructor:{value:ft,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(ft,String);function fr(t,e,r){let n,o,s;if(typeof e==="undefined"&&typeof r==="undefined")n={},s=t;else if(n=t,typeof e==="function")return o=e,s=r,ur(n,o,s);else s=e;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}fe(n,null,s,c)}return n}var Os=(t,e)=>{let r={};for(let n in e)fe(r,t,e,n);return r},ur=(t,e,r)=>{return fr(t,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[e,s()];else n[o]=[e,s];return n},{}))},fe=(t,e,r,n)=>{if(e!==null){let c=r[n];if(typeof c==="function")c=[,c];let[i=hr,h=ar,d=n]=c;if(typeof i==="function"&&i(e[d])||typeof i!=="function"&&!!i)t[n]=h(e[d]);return}let[o,s]=r[n];if(typeof s==="function"){let c,i=o===void 0&&(c=s())!=null,h=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)t[n]=c;else if(h)t[n]=s()}else{let c=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(c||i)t[n]=s}},hr=(t)=>t!=null,ar=(t)=>t;var Js=(t)=>t.toISOString().replace(".000Z","Z");var ue=(t)=>{if(t==null)return{};if(Array.isArray(t))return t.filter((e)=>e!=null).map(ue);if(typeof t==="object"){let e={};for(let r of Object.keys(t)){if(t[r]==null)continue;e[r]=ue(t[r])}return e}return t};export{gr as ca,yr as da,G as ea,L as fa,Ft as ga,U as ha,O as ia,F as ja,Vn as ka,V as la,Ie as ma,Z as na,ge as oa,q as pa,Y as qa,uo as ra,R as sa,_ as ta,At as ua,jt as va,Ro as wa,qo as xa,Zo as ya,ns as za,yt as Aa,In as Ba,Fn as Ca,ss as Da,nt as Ea,Kt as Fa,is as Ga,cs as Ha,fs as Ia,us as Ja,hs as Ka,ls as La,ms as Ma,gs as Na,ys as Oa,It as Pa,Ut as Qa,Ts as Ra,bs as Sa,Cs as Ta,Ns as Ua,Ps as Va,cr as Wa,Ms as Xa,fr as Ya,Os as Za,Js as _a,ue as $a};
12
-
13
- //# debugId=5F9B8960105F381364756E2164756E21
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{aa as z,ba as B}from"./chunk-4b3akwfv.js";import"./chunk-3kyzvpxm.js";import"./chunk-7rpnpk1z.js";import{mb as K,nb as y}from"./chunk-0v0x0g72.js";import"./chunk-spw59mrv.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{let T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{let{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{let T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){let I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{let c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.
3
- For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1,R=await z({environmentVariableSelector:(S)=>{let A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{let A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){let S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}let V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{let w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{let T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
4
-
5
- //# debugId=CF990D15B49899C364756E2164756E21
@@ -1,8 +0,0 @@
1
- // @bun
2
- import{Ma as C,ea as i,ta as I,wa as y}from"./chunk-s6b848wp.js";import"./chunk-7rpnpk1z.js";import{nb as n}from"./chunk-0v0x0g72.js";import"./chunk-spw59mrv.js";import u from"fs/promises";var T="169.254.170.2",x="169.254.170.23",P="[fd00:ec2::23]",d=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===T||e.hostname===x||e.hostname===P)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let a=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
3
- - loopback CIDR 127.0.0.0/8 or [::1/128]
4
- - ECS container host 169.254.170.2
5
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};function S(e){return new i({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function g(e,c){let r=await y(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:c})}var w=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var E="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",R="http://169.254.170.2",p="AWS_CONTAINER_CREDENTIALS_FULL_URI",A="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",O="AWS_CONTAINER_AUTHORIZATION_TOKEN",b=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c,a=e.awsContainerCredentialsRelativeUri??process.env[E],r=e.awsContainerCredentialsFullUri??process.env[p],t=e.awsContainerAuthorizationToken??process.env[O],s=e.awsContainerAuthorizationTokenFile??process.env[A],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${R}${a}`;else throw new n(`No HTTP credential provider host provided.
6
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let h=new URL(c);d(h,e.logger);let K=new I({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return w(async()=>{let o=S(h);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await u.readFile(s)).toString();try{let f=await K.handle(o);return g(f.response)}catch(f){throw new n(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{b as fromHttp};
7
-
8
- //# debugId=BA061FC5C18A426A64756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{q as ge}from"./chunk-q9cmjch9.js";import{$ as hr,A as ar,B as Ie,C as Re,D as Pe,E as Te,F as mr,G as Ke,H as Me,I as Be,J as Le,K as wr,L as kr,N as E,O as S,P as vr,Q as Qe,R as Xe,S as Er,T as Ye,U as Sr,V as U,W as Ze,X as He,Y as Ne,Z as _e,_ as lr,r as ee,s as re,t as or,u as dr,v as cr,w as yr,z as H}from"./chunk-jf4cn9js.js";import{aa as R,ba as xe}from"./chunk-4b3akwfv.js";import{$a as I,Aa as v,Ba as t,Ca as Wr,Ea as _,Fa as b,Ga as j,Ha as F,Ia as h,Pa as $r,Qa as a,Ra as Fr,Sa as fe,Ta as Ae,Ua as sr,Va as ir,Ya as c,Za as o,ca as er,da as rr,ja as je,la as Fe,ma as De,oa as tr,pa as Ue,qa as qe,ta as Ve,ua as We}from"./chunk-s6b848wp.js";import"./chunk-3kyzvpxm.js";import"./chunk-7rpnpk1z.js";import"./chunk-33nha0s0.js";import"./chunk-0v0x0g72.js";import"./chunk-6q78ag9e.js";import"./chunk-fx6rsjzz.js";import{ac as $}from"./chunk-spw59mrv.js";var P=$(H(),1);var se=$(U(),1);var ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Br(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}}function Z(e){return{schemeId:"smithy.api#noAuth"}}var le=(e)=>{let s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Br(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.654.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var pe=$(U(),1);var ze=$(U(),1),Ge=$(H(),1);var de={["required"]:!1,type:"String"},ce={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Qr={version:"1.0",parameters:{Region:de,UseDualStack:ce,UseFIPS:ce,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Qr;var Xr=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,s={})=>{return Xr.get(e,()=>Pe($e,{endpointParams:e,logger:s.logger}))};Re.aws=Te;var Je=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ue,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??be,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ze.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ge.NoAuthSigner}],logger:e?.logger??new De,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var Ce=(e)=>{Ae(process.version);let s=_e(e),r=()=>s().then(fe),i=Je(e);return pe.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ne,credentialDefaultProvider:e?.credentialDefaultProvider??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ze({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Xe),region:e?.region??R(Be,Le),requestHandler:Ve.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Ye,default:async()=>(await r()).retryMode||Qe}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??We,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ke),useFipsEndpoint:e?.useFipsEndpoint??R(Me)}};var Oe=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){let n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},ue=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var q=(e)=>e,nr=(e,s)=>{let r={...q(lr(e)),...q(sr(e)),...q(er(e)),...q(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class N extends tr{constructor(...[e]){let s=Ce(e||{}),r=ne(s),i=ar(r),l=Er(i),n=wr(l),T=or(n),Ar=vr(T),Kr=he(Ar),u=nr(Kr,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(Sr(this.config)),this.middlewareStack.use(kr(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Mr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Mr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends $r{constructor(e){super(e);Object.setPrototypeOf(this,d.prototype)}}class x extends d{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends d{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends d{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends d{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends d{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends d{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends d{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends d{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends d{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends d{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends d{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends d{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends d{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends d{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var Ir=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Tr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),jr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(U(),1),D=$(H(),1);var Dr=async(e,s)=>{let r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{let r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l=c({[hs]:[,"t"]}),n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{let r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{let r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);let r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);let r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);let r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Vr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);let r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{let r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Zr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Hr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Nr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await _r(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await pr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await gr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ur(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await rs(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await ss(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await is(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ls(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await es(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Cr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Or(r,s);default:let l=r.body;return Yr({output:e,parsedBody:l,errorCode:i})}},Yr=Fr(d),Zr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new x({$metadata:y(e),...r});return a(n,e.body)},Hr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new z({$metadata:y(e),...r});return a(n,e.body)},Nr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new G({$metadata:y(e),...r});return a(n,e.body)},_r=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new J({$metadata:y(e),...r});return a(n,e.body)},pr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new V({$metadata:y(e),...r});return a(n,e.body)},Cr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new Q({$metadata:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new W({$metadata:y(e),...r});return a(n,e.body)},Or=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new X({$metadata:y(e),...r});return a(n,e.body)},ur=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new f({$metadata:y(e),...r});return a(n,e.body)},es=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);let n=new L({$metadata:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new A({$metadata:y(e),...r});return a(n,e.body)},ss=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new K({$metadata:y(e),...r});return a(n,e.body)},is=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new M({$metadata:y(e),...r});return a(n,e.body)},ls=async(e,s)=>{let r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);let n=new B({$metadata:y(e),...r});return a(n,e.body)},y=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var hs="aws_iam";class p extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}class C extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}class g extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}class O extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var ns={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class fr extends N{}Wr(ns,fr);export{tr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,d as SSOOIDCServiceException,N as SSOOIDCClient,fr as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,v as $Command};
3
-
4
- //# debugId=D7A8E96B1D4D1F0364756E2164756E21