gemi 0.4.95 → 0.4.97

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/App.d.ts +0 -2
  2. package/dist/app/App.d.ts.map +1 -1
  3. package/dist/app/index.js +2 -2
  4. package/dist/app/index.js.map +3 -3
  5. package/dist/auth/AuthenticationServiceContainer.d.ts +1 -1
  6. package/dist/auth/AuthenticationServiceContainer.d.ts.map +1 -1
  7. package/dist/{chunk-cd9c5e8a6c80384f.js → chunk-16e332f85eb5447c.js} +2 -2
  8. package/dist/{chunk-cd9c5e8a6c80384f.js.map → chunk-16e332f85eb5447c.js.map} +1 -1
  9. package/dist/{chunk-201c5005a90452fa.js → chunk-1fa979880960fe7a.js} +3 -3
  10. package/dist/{chunk-201c5005a90452fa.js.map → chunk-1fa979880960fe7a.js.map} +1 -1
  11. package/dist/chunk-23556f614d648677.js +7 -0
  12. package/dist/chunk-23556f614d648677.js.map +65 -0
  13. package/dist/{chunk-bace428bfab523c4.js → chunk-2b057d120d3e2288.js} +2 -2
  14. package/dist/{chunk-bace428bfab523c4.js.map → chunk-2b057d120d3e2288.js.map} +1 -1
  15. package/dist/{chunk-11de5b0adccef35c.js → chunk-2e57c40ceaac60c2.js} +2 -2
  16. package/dist/{chunk-11de5b0adccef35c.js.map → chunk-2e57c40ceaac60c2.js.map} +1 -1
  17. package/dist/chunk-31e1d73a34421a5b.js +4 -0
  18. package/dist/{chunk-278677330e53423b.js.map → chunk-31e1d73a34421a5b.js.map} +2 -2
  19. package/dist/chunk-53884af8a953deb7.js +3 -0
  20. package/dist/chunk-53884af8a953deb7.js.map +16 -0
  21. package/dist/chunk-72261e13831ada52.js +4 -0
  22. package/dist/{chunk-9ff3d7096b6de8eb.js.map → chunk-72261e13831ada52.js.map} +2 -2
  23. package/dist/chunk-797989fd6dd03d3e.js +4 -0
  24. package/dist/{chunk-b84d011a2972c7d1.js.map → chunk-797989fd6dd03d3e.js.map} +3 -3
  25. package/dist/chunk-860a94f3e2c4139f.js +4 -0
  26. package/dist/{chunk-57ba59dd008d6e0e.js.map → chunk-860a94f3e2c4139f.js.map} +2 -2
  27. package/dist/{chunk-d5b8023c223e3a60.js → chunk-8cdd9673266b7058.js} +2 -2
  28. package/dist/{chunk-d5b8023c223e3a60.js.map → chunk-8cdd9673266b7058.js.map} +1 -1
  29. package/dist/{chunk-9f9e21f9fd0d6af1.js → chunk-a0a73bf4d58b0b0b.js} +2 -2
  30. package/dist/{chunk-9f9e21f9fd0d6af1.js.map → chunk-a0a73bf4d58b0b0b.js.map} +1 -1
  31. package/dist/{chunk-18a59fffad60f059.js → chunk-a0c7eacf736f38e3.js} +2 -2
  32. package/dist/{chunk-18a59fffad60f059.js.map → chunk-a0c7eacf736f38e3.js.map} +1 -1
  33. package/dist/chunk-a32dc07245e51d1d.js +4 -0
  34. package/dist/chunk-a32dc07245e51d1d.js.map +11 -0
  35. package/dist/chunk-ae350f23e76a92c8.js +18 -0
  36. package/dist/{chunk-c8c4a1285a266c51.js.map → chunk-ae350f23e76a92c8.js.map} +6 -28
  37. package/dist/{chunk-cd4bfdd46ec4cbb8.js → chunk-b451a72475db69ef.js} +2 -2
  38. package/dist/{chunk-cd4bfdd46ec4cbb8.js.map → chunk-b451a72475db69ef.js.map} +1 -1
  39. package/dist/{chunk-e4961d79807acd3d.js → chunk-b9c722a5cdfab5dd.js} +2 -2
  40. package/dist/{chunk-e4961d79807acd3d.js.map → chunk-b9c722a5cdfab5dd.js.map} +3 -3
  41. package/dist/chunk-d437e2b6b4671cbb.js +8 -0
  42. package/dist/{chunk-9be25fac5f76b2f7.js.map → chunk-d437e2b6b4671cbb.js.map} +2 -2
  43. package/dist/{chunk-07f44e411ae4ea5e.js → chunk-e78cce2c4522cf91.js} +2 -2
  44. package/dist/{chunk-07f44e411ae4ea5e.js.map → chunk-e78cce2c4522cf91.js.map} +1 -1
  45. package/dist/chunk-ebe083591d3f0e78.js +4 -0
  46. package/dist/{chunk-a7d87b5d6d789781.js.map → chunk-ebe083591d3f0e78.js.map} +4 -4
  47. package/dist/email/index.js +1 -1
  48. package/dist/facades/index.js +2 -2
  49. package/dist/facades/index.js.map +7 -7
  50. package/dist/http/I18nServiceContainer.d.ts +1 -1
  51. package/dist/http/I18nServiceContainer.d.ts.map +1 -1
  52. package/dist/http/index.js +2 -2
  53. package/dist/http/index.js.map +4 -4
  54. package/dist/kernel/Kernel.d.ts +0 -1
  55. package/dist/kernel/Kernel.d.ts.map +1 -1
  56. package/dist/kernel/index.js +2 -2
  57. package/dist/kernel/index.js.map +3 -3
  58. package/dist/services/ServiceContainer.d.ts +1 -1
  59. package/dist/services/ServiceContainer.d.ts.map +1 -1
  60. package/dist/services/email/EmailServiceContainer.d.ts +1 -1
  61. package/dist/services/email/EmailServiceContainer.d.ts.map +1 -1
  62. package/dist/services/file-storage/FileStorageServiceContainer.d.ts +1 -1
  63. package/dist/services/file-storage/FileStorageServiceContainer.d.ts.map +1 -1
  64. package/dist/services/index.js +5 -5
  65. package/dist/services/index.js.map +4 -3
  66. package/dist/services/middleware/MiddlewareServiceContainer.d.ts +1 -1
  67. package/dist/services/middleware/MiddlewareServiceContainer.d.ts.map +1 -1
  68. package/dist/services/pubsub/BroadcastingServiceContainer.d.ts +1 -1
  69. package/dist/services/pubsub/BroadcastingServiceContainer.d.ts.map +1 -1
  70. package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts +1 -1
  71. package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts.map +1 -1
  72. package/dist/services/router/ApiRouterServiceContainer.d.ts +1 -1
  73. package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
  74. package/dist/services/router/ViewRouterServiceContainer.d.ts +1 -1
  75. package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
  76. package/package.json +1 -1
  77. package/dist/chunk-278677330e53423b.js +0 -4
  78. package/dist/chunk-57ba59dd008d6e0e.js +0 -4
  79. package/dist/chunk-642b04056dab5d64.js +0 -4
  80. package/dist/chunk-642b04056dab5d64.js.map +0 -11
  81. package/dist/chunk-683905a55f8da1ad.js +0 -5
  82. package/dist/chunk-683905a55f8da1ad.js.map +0 -64
  83. package/dist/chunk-9be25fac5f76b2f7.js +0 -8
  84. package/dist/chunk-9ff3d7096b6de8eb.js +0 -4
  85. package/dist/chunk-a7d87b5d6d789781.js +0 -4
  86. package/dist/chunk-b84d011a2972c7d1.js +0 -4
  87. package/dist/chunk-bd708d3c982948aa.js +0 -4
  88. package/dist/chunk-bd708d3c982948aa.js.map +0 -16
  89. package/dist/chunk-c8c4a1285a266c51.js +0 -20
package/dist/app/App.d.ts CHANGED
@@ -4,8 +4,6 @@ interface AppParams {
4
4
  kernel: new () => Kernel;
5
5
  }
6
6
  export declare class App {
7
- name: string;
8
- devVersion: number;
9
7
  private kernel;
10
8
  constructor(params: AppParams);
11
9
  getComponentTree(): any;
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../app/App.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAKnC,UAAU,SAAS;IACjB,MAAM,EAAE,UAAU,MAAM,CAAC;CAC1B;AAED,qBAAa,GAAG;IACP,IAAI,SAAS;IACb,UAAU,SAAK;IACtB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,SAAS;IAKtB,gBAAgB;IAMhB,oBAAoB;IAMd,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;IAY5C,SAAS,EAAE,gBAAgB,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAoBtD;IAEK,SAAS,CACd,EAAE,EAAE,CACF,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,WAAW,GAAG,iBAAiB,EAChE,QAAQ,CAAC,EAAE,OAAO,KACf,IAAI;CAIZ"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../app/App.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAInC,UAAU,SAAS;IACjB,MAAM,EAAE,UAAU,MAAM,CAAC;CAC1B;AAED,qBAAa,GAAG;IACd,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,SAAS;IAKtB,gBAAgB;IAMhB,oBAAoB;IAMd,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;IAY5C,SAAS,EAAE,gBAAgB,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAoBtD;IAEK,SAAS,CACd,EAAE,EAAE,CACF,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,WAAW,GAAG,iBAAiB,EAChE,QAAQ,CAAC,EAAE,OAAO,KACf,IAAI;CAIZ"}
package/dist/app/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import"../http/index.js";import{w as L} from"../facades/index.js";import"../chunk-642b04056dab5d64.js";import"../chunk-99c32e4d937131e0.js";import{J as q,K as T} from"../chunk-0d97333b6af9fc45.js";import{L as F} from"../chunk-e4961d79807acd3d.js";import"../chunk-643529c2ad120db7.js";import"../chunk-2f8cf8372320b622.js";var Y=T((w,X)=>{var h=function(b){if(typeof b==="function")return b;return(j)=>j.$extends(b)},k=function(b){return b},H=Object.defineProperty,D=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyNames,K=Object.prototype.hasOwnProperty,M=(b,j)=>{for(var z in j)H(b,z,{get:j[z],enumerable:!0})},N=(b,j,z,G)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of I(j))if(!K.call(b,B)&&B!==z)H(b,B,{get:()=>j[B],enumerable:!(G=D(j,B))||G.enumerable})}return b},J=(b)=>N(H({},"__esModule",{value:!0}),b),U={};M(U,{Prisma:()=>W,PrismaClient:()=>V,default:()=>g});X.exports=J(U);var E={enginesVersion:"393aa359c9ad4a4bb28630fb5613f9c281cde053"},O="5.17.0",R=O,V=class{constructor(){throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.')}},W={defineExtension:h,getExtensionContext:k,prismaVersion:{client:R,engine:E.enginesVersion}},g={Prisma:W}});var $=T((u,Z)=>{Z.exports={...Y()}});class Q{name="APP";devVersion=0;kernel;constructor(b){this.kernel=new b.kernel,this.kernel.boot.call(this.kernel)}getComponentTree(){return this.kernel.run.call(this.kernel,()=>{return F.use().componentTree})}getFlatComponentTree(){return this.kernel.run.call(this.kernel,()=>{return F.use().flatComponentTree})}async fetch(b){const j=new URL(b.url);return this.kernel.run.call(this.kernel,async()=>{if(j.pathname.startsWith("/api"))return await L.use().handleApiRequest(b);else return await F.use().handleViewRequest(b)})}websocket={message:(b,j)=>{const z=this.kernel.run.bind(this.kernel)},open:(b)=>{},close:(b)=>{console.log("closed ws"),b.terminate()}};onPublish(b){}}var A=q($(),1),v=A.Prisma.defineExtension({name:"Gemi Policies",query:{async $allOperations({args:b,operation:j,query:z,model:G}){return await z(b)}}});export{v as prismaExtension,Q as App};
2
+ import"../http/index.js";import{w as L} from"../facades/index.js";import"../chunk-a32dc07245e51d1d.js";import"../chunk-99c32e4d937131e0.js";import{J as q,K as T} from"../chunk-0d97333b6af9fc45.js";import{L as F} from"../chunk-b9c722a5cdfab5dd.js";import"../chunk-643529c2ad120db7.js";import"../chunk-2f8cf8372320b622.js";var Y=T((w,X)=>{var h=function(b){if(typeof b==="function")return b;return(j)=>j.$extends(b)},k=function(b){return b},H=Object.defineProperty,D=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyNames,K=Object.prototype.hasOwnProperty,M=(b,j)=>{for(var z in j)H(b,z,{get:j[z],enumerable:!0})},N=(b,j,z,G)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of I(j))if(!K.call(b,B)&&B!==z)H(b,B,{get:()=>j[B],enumerable:!(G=D(j,B))||G.enumerable})}return b},J=(b)=>N(H({},"__esModule",{value:!0}),b),U={};M(U,{Prisma:()=>W,PrismaClient:()=>V,default:()=>g});X.exports=J(U);var E={enginesVersion:"393aa359c9ad4a4bb28630fb5613f9c281cde053"},O="5.17.0",R=O,V=class{constructor(){throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.')}},W={defineExtension:h,getExtensionContext:k,prismaVersion:{client:R,engine:E.enginesVersion}},g={Prisma:W}});var $=T((u,Z)=>{Z.exports={...Y()}});class Q{kernel;constructor(b){this.kernel=new b.kernel,this.kernel.boot.call(this.kernel)}getComponentTree(){return this.kernel.run.call(this.kernel,()=>{return F.use().componentTree})}getFlatComponentTree(){return this.kernel.run.call(this.kernel,()=>{return F.use().flatComponentTree})}async fetch(b){const j=new URL(b.url);return this.kernel.run.call(this.kernel,async()=>{if(j.pathname.startsWith("/api"))return await L.use().handleApiRequest(b);else return await F.use().handleViewRequest(b)})}websocket={message:(b,j)=>{const z=this.kernel.run.bind(this.kernel)},open:(b)=>{},close:(b)=>{console.log("closed ws"),b.terminate()}};onPublish(b){}}var A=q($(),1),v=A.Prisma.defineExtension({name:"Gemi Policies",query:{async $allOperations({args:b,operation:j,query:z,model:G}){return await z(b)}}});export{v as prismaExtension,Q as App};
3
3
 
4
- //# debugId=E8F99D773B3AE3BC64756e2164756e21
4
+ //# debugId=AE7E913B0527741164756e2164756e21
@@ -4,10 +4,10 @@
4
4
  "sourcesContent": [
5
5
  "\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/scripts/default-index.ts\nvar default_index_exports = {};\n__export(default_index_exports, {\n Prisma: () => Prisma,\n PrismaClient: () => PrismaClient,\n default: () => default_index_default\n});\nmodule.exports = __toCommonJS(default_index_exports);\n\n// ../../node_modules/.pnpm/@prisma+engines-version@5.17.0-31.393aa359c9ad4a4bb28630fb5613f9c281cde053/node_modules/@prisma/engines-version/package.json\nvar prisma = {\n enginesVersion: \"393aa359c9ad4a4bb28630fb5613f9c281cde053\"\n};\n\n// package.json\nvar version = \"5.17.0\";\n\n// src/runtime/utils/clientVersion.ts\nvar clientVersion = version;\n\n// src/scripts/default-index.ts\nvar PrismaClient = class {\n constructor() {\n throw new Error('@prisma/client did not initialize yet. Please run \"prisma generate\" and try to import it again.');\n }\n};\nfunction defineExtension(ext) {\n if (typeof ext === \"function\") {\n return ext;\n }\n return (client) => client.$extends(ext);\n}\nfunction getExtensionContext(that) {\n return that;\n}\nvar Prisma = {\n defineExtension,\n getExtensionContext,\n prismaVersion: { client: clientVersion, engine: prisma.enginesVersion }\n};\nvar default_index_default = { Prisma };\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Prisma,\n PrismaClient\n});\n",
6
6
  "module.exports = {\n ...require('.prisma/client/default'),\n}\n",
7
- "import type { WebSocketHandler } from \"bun\";\nimport { Kernel } from \"../kernel\";\nimport { KernelContext } from \"../kernel/KernelContext\";\nimport { ApiRouterServiceContainer } from \"../services/router/ApiRouterServiceContainer\";\nimport { ViewRouterServiceContainer } from \"../services/router/ViewRouterServiceContainer\";\n\ninterface AppParams {\n kernel: new () => Kernel;\n}\n\nexport class App {\n public name = \"APP\";\n public devVersion = 0;\n private kernel: Kernel;\n\n constructor(params: AppParams) {\n this.kernel = new params.kernel();\n this.kernel.boot.call(this.kernel);\n }\n\n public getComponentTree() {\n return this.kernel.run.call(this.kernel, () => {\n return ViewRouterServiceContainer.use().componentTree;\n });\n }\n\n public getFlatComponentTree() {\n return this.kernel.run.call(this.kernel, () => {\n return ViewRouterServiceContainer.use().flatComponentTree;\n });\n }\n\n public async fetch(req: Request): Promise<Response> {\n const url = new URL(req.url);\n\n return this.kernel.run.call(this.kernel, async () => {\n if (url.pathname.startsWith(\"/api\")) {\n return await ApiRouterServiceContainer.use().handleApiRequest(req);\n } else {\n return await ViewRouterServiceContainer.use().handleViewRequest(req);\n }\n });\n }\n\n public websocket: WebSocketHandler<{ headers: Headers }> = {\n message: (ws, message) => {\n const kernelRun = this.kernel.run.bind(this.kernel);\n // kernelRun(() => {\n // KernelContext.getStore().broadcastingServiceContainer.run(\n // ws.data.headers,\n // () => {\n // KernelContext.getStore().broadcastingServiceContainer.handleMessage(\n // ws,\n // message,\n // );\n // },\n // );\n // });\n },\n open: (_ws) => {},\n close: (ws) => {\n console.log(\"closed ws\");\n ws.terminate();\n },\n };\n\n public onPublish(\n fn: (\n topic: string,\n data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer,\n compress?: boolean,\n ) => void,\n ) {\n // this.kernel.services.broadcastingServiceContainer.onPublish(fn);\n }\n}\n",
7
+ "import type { WebSocketHandler } from \"bun\";\nimport { Kernel } from \"../kernel\";\nimport { ApiRouterServiceContainer } from \"../services/router/ApiRouterServiceContainer\";\nimport { ViewRouterServiceContainer } from \"../services/router/ViewRouterServiceContainer\";\n\ninterface AppParams {\n kernel: new () => Kernel;\n}\n\nexport class App {\n private kernel: Kernel;\n\n constructor(params: AppParams) {\n this.kernel = new params.kernel();\n this.kernel.boot.call(this.kernel);\n }\n\n public getComponentTree() {\n return this.kernel.run.call(this.kernel, () => {\n return ViewRouterServiceContainer.use().componentTree;\n });\n }\n\n public getFlatComponentTree() {\n return this.kernel.run.call(this.kernel, () => {\n return ViewRouterServiceContainer.use().flatComponentTree;\n });\n }\n\n public async fetch(req: Request): Promise<Response> {\n const url = new URL(req.url);\n\n return this.kernel.run.call(this.kernel, async () => {\n if (url.pathname.startsWith(\"/api\")) {\n return await ApiRouterServiceContainer.use().handleApiRequest(req);\n } else {\n return await ViewRouterServiceContainer.use().handleViewRequest(req);\n }\n });\n }\n\n public websocket: WebSocketHandler<{ headers: Headers }> = {\n message: (ws, message) => {\n const kernelRun = this.kernel.run.bind(this.kernel);\n // kernelRun(() => {\n // KernelContext.getStore().broadcastingServiceContainer.run(\n // ws.data.headers,\n // () => {\n // KernelContext.getStore().broadcastingServiceContainer.handleMessage(\n // ws,\n // message,\n // );\n // },\n // );\n // });\n },\n open: (_ws) => {},\n close: (ws) => {\n console.log(\"closed ws\");\n ws.terminate();\n },\n };\n\n public onPublish(\n fn: (\n topic: string,\n data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer,\n compress?: boolean,\n ) => void,\n ) {\n // this.kernel.services.broadcastingServiceContainer.onPublish(fn);\n }\n}\n",
8
8
  "import { Prisma } from \"@prisma/client\";\nimport { KernelContext } from \"../kernel/KernelContext\";\nimport { InsufficientPermissionsError } from \"../http/errors\";\n\nexport const prismaExtension = Prisma.defineExtension({\n name: \"Gemi Policies\",\n\n query: {\n async $allOperations({ args, operation, query, model }) {\n // const provider = KernelContext.getStore().policiesServiceProvider;\n\n // const policies = provider.policiesList[`${model}Policies`];\n\n // if (!policies) {\n // return await query(args);\n // }\n\n // const isPassed = await policies.all.call(policies, operation, args);\n // if (!isPassed) {\n // throw new InsufficientPermissionsError();\n // }\n\n return await query(args);\n },\n },\n});\n"
9
9
  ],
10
- "mappings": ";qUA6CA,FAAS,aAAe,IAAC,KAAK,IAC5B,aAAW,OAAQ,WACjB,OAAO,EAET,MAAO,CAAC,IAAW,EAAO,SAAS,CAAG,GAE/B,UAAmB,CAAC,EAAM,CACjC,OAAO,GAnDL,EAAY,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AAW,MAAM,EAChC,OAAO,MAAM,EAA0B,IAAI,EAAE,iBAAiB,CAAG,MAEjE,QAAO,MAAM,EAA2B,IAAI,EAAE,kBAAkB,CAAG,EAEtE,EAGI,UAAoD,CACzD,QAAS,CAAC,EAAI,IAAY,CACxB,MAAM,EAAY,KAAK,OAAO,IAAI,KAAK,KAAK,MAAM,GAapD,KAAM,CAAC,IAAQ,GACf,MAAO,CAAC,IAAO,CACb,QAAQ,IAAI,WAAW,EACvB,EAAG,UAAU,EAEjB,EAEO,SAAS,CACd,EAKA,EAGJ,CCxEA,eAIa,EAAkB,SAAO,gBAAgB,CACpD,KAAM,gBAEN,MAAO,MACC,eAAc,EAAG,OAAM,YAAW,QAAO,SAAS,CActD,OAAO,MAAM,EAAM,CAAI,EAE3B,CACF,CAAC",
11
+ "debugId": "AE7E913B0527741164756e2164756e21",
12
12
  "names": []
13
13
  }
@@ -2,7 +2,7 @@ import { ServiceContainer } from "../services/ServiceContainer";
2
2
  import { AuthenticationServiceProvider } from "./AuthenticationServiceProvider";
3
3
  export declare class AuthenticationServiceContainer extends ServiceContainer {
4
4
  provider: AuthenticationServiceProvider;
5
- name: string;
5
+ static _name: string;
6
6
  constructor(provider: AuthenticationServiceProvider);
7
7
  getSession(token: string, userAgent: string): Promise<import("./adapters/types").SessionWithUser>;
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationServiceContainer.d.ts","sourceRoot":"","sources":["../../auth/AuthenticationServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,qBAAa,8BAA+B,SAAQ,gBAAgB;IAG/C,QAAQ,EAAE,6BAA6B;IAF1D,IAAI,SAAoC;gBAErB,QAAQ,EAAE,6BAA6B;IAIpD,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAYlD"}
1
+ {"version":3,"file":"AuthenticationServiceContainer.d.ts","sourceRoot":"","sources":["../../auth/AuthenticationServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,qBAAa,8BAA+B,SAAQ,gBAAgB;IAG/C,QAAQ,EAAE,6BAA6B;IAF1D,MAAM,CAAC,KAAK,SAAoC;gBAE7B,QAAQ,EAAE,6BAA6B;IAIpD,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAYlD"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{J as h} from"./chunk-0d97333b6af9fc45.js";import"./chunk-9f9e21f9fd0d6af1.js";import{Fb as _} from"./chunk-cd4bfdd46ec4cbb8.js";import{Ib as N,Jb as W,Kb as I,Nb as v,Ob as P} from"./chunk-bace428bfab523c4.js";var T=h(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=h(_(),1);var K=300000,g="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-278677330e53423b.js");if(R[e])return R[e];const s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-278677330e53423b.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=h(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${g}`,!1)};var q=h(_(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${g}`,!1)};import{promises as B} from"fs";var{writeFile:Q}=B,j=(e,r)=>{const s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);const i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);const{sso_start_url:l,sso_region:f}=a;let o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${g}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);const{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());const n=await G(o,f);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);const w=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:w.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:w}}catch(n){return D(c),c}};var k=h(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:S,clientConfig:a,profile:l,logger:f})=>{let o;const E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const d=await z({profile:l})();o={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:y,logger:f})}else try{o=await I(e)}catch(d){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f});const{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-9ff3d7096b6de8eb.js"),w=S||new c(Object.assign({},a??{},{region:a?.region??t}));let C;try{C=await w.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:y,logger:f})}const{roleCredentials:{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!m||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:f});return{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=h(_(),1),V=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:S}=e;if(!s||!t||!i||!S)throw new J.CredentialsProviderError('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:S}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!S){const o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const m=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=m.sso_region,o.sso_start_url=m.sso_start_url}const{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:w}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:w,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:S,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
2
+ import{J as h} from"./chunk-0d97333b6af9fc45.js";import"./chunk-a0a73bf4d58b0b0b.js";import{Ab as _} from"./chunk-b451a72475db69ef.js";import{Db as N,Eb as W,Fb as I,Ib as v,Jb as P} from"./chunk-2b057d120d3e2288.js";var T=h(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=h(_(),1);var K=300000,g="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-31e1d73a34421a5b.js");if(R[e])return R[e];const s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-31e1d73a34421a5b.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=h(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${g}`,!1)};var q=h(_(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${g}`,!1)};import{promises as B} from"fs";var{writeFile:Q}=B,j=(e,r)=>{const s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);const i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);const{sso_start_url:l,sso_region:f}=a;let o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${g}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);const{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());const n=await G(o,f);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);const w=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:w.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:w}}catch(n){return D(c),c}};var k=h(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:S,clientConfig:a,profile:l,logger:f})=>{let o;const E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const d=await z({profile:l})();o={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:y,logger:f})}else try{o=await I(e)}catch(d){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f});const{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-72261e13831ada52.js"),w=S||new c(Object.assign({},a??{},{region:a?.region??t}));let C;try{C=await w.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:y,logger:f})}const{roleCredentials:{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!m||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:f});return{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=h(_(),1),V=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:S}=e;if(!s||!t||!i||!S)throw new J.CredentialsProviderError('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:S}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!S){const o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const m=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=m.sso_region,o.sso_start_url=m.sso_start_url}const{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:w}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:w,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:S,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
3
3
 
4
- //# debugId=CD9C5E8A6C80384F64756e2164756e21
4
+ //# debugId=16E332F85EB5447C64756e2164756e21
@@ -15,6 +15,6 @@
15
15
  "import { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n"
16
16
  ],
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1E,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EAEL,EAAQ,WAAa,EAAQ,WAC7B,EAAQ,cAAgB,EAAQ,cAEpC,MAAQ,gBAAe,iBAAgB,aAAY,gBAAe,eAAgB,EAAmB,EAAS,EAAK,MAAM,EACzH,OAAO,EAAsB,CACzB,YAAa,EACb,WAAY,EACZ,aAAc,EACd,UAAW,EACX,YAAa,EACb,UAAW,EACX,aAAc,EAAK,aACnB,QAAS,CACb,CAAC,WAEK,IAAgB,IAAiB,IAAc,EACrD,MAAM,IAAI,2BAAyB,+HAC8B,CAAE,YAAa,GAAO,OAAQ,EAAK,MAAO,CAAC,MAG5G,QAAO,EAAsB,CACzB,cACA,aACA,eACA,YACA,cACA,YACA,aAAc,EAAK,aACnB,QAAS,CACb,CAAC",
18
- "debugId": "CD9C5E8A6C80384F64756e2164756e21",
18
+ "debugId": "16E332F85EB5447C64756e2164756e21",
19
19
  "names": []
20
20
  }
@@ -1,4 +1,4 @@
1
- import{D as w,E as z,F as B} from"./chunk-d5b8023c223e3a60.js";import{J as Q} from"./chunk-0d97333b6af9fc45.js";import{Fb as X} from"./chunk-cd4bfdd46ec4cbb8.js";import{Hb as $} from"./chunk-bace428bfab523c4.js";var q=Q(X(),1);var G=Q(X(),1),k="AWS_EC2_METADATA_DISABLED",Y=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-a7d87b5d6d789781.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-9be25fac5f76b2f7.js");return G.chain(K(b),y(b))}if(process.env[k])return async()=>{throw new G.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),J(b)};var Z=!1,T=(b={})=>q.memoize(q.chain(async()=>{if(b.profile??process.env[$]){if(process.env[w]&&process.env[z]){if(!Z)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
1
+ import{D as w,E as z,F as B} from"./chunk-8cdd9673266b7058.js";import{J as Q} from"./chunk-0d97333b6af9fc45.js";import{Ab as X} from"./chunk-b451a72475db69ef.js";import{Cb as $} from"./chunk-2b057d120d3e2288.js";var q=Q(X(),1);var G=Q(X(),1),k="AWS_EC2_METADATA_DISABLED",Y=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-ebe083591d3f0e78.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-d437e2b6b4671cbb.js");return G.chain(K(b),y(b))}if(process.env[k])return async()=>{throw new G.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),J(b)};var Z=!1,T=(b={})=>q.memoize(q.chain(async()=>{if(b.profile??process.env[$]){if(process.env[w]&&process.env[z]){if(!Z)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
2
2
  Multiple credential sources detected:
3
3
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
4
4
  This SDK will proceed with the AWS_PROFILE value.
@@ -6,6 +6,6 @@ import{D as w,E as z,F as B} from"./chunk-d5b8023c223e3a60.js";import{J as Q} fr
6
6
  However, a future version may change this behavior to prefer the ENV static credentials.
7
7
  Please ensure that your environment only sets either the AWS_PROFILE or the
8
8
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
9
- `),Z=!0}throw new q.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:x,ssoRegion:y,ssoRoleName:J,ssoSession:K}=b;if(!j&&!x&&!y&&!J&&!K)throw new q.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:H}=await import("./chunk-cd9c5e8a6c80384f.js");return H(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:j}=await import("./chunk-11de5b0adccef35c.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:j}=await import("./chunk-18a59fffad60f059.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:j}=await import("./chunk-07f44e411ae4ea5e.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y(b))()},async()=>{throw new q.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),O,v),v=(b)=>b?.expiration!==void 0,O=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{T as Gb};
9
+ `),Z=!0}throw new q.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:x,ssoRegion:y,ssoRoleName:J,ssoSession:K}=b;if(!j&&!x&&!y&&!J&&!K)throw new q.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:H}=await import("./chunk-16e332f85eb5447c.js");return H(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:j}=await import("./chunk-2e57c40ceaac60c2.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:j}=await import("./chunk-a0c7eacf736f38e3.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:j}=await import("./chunk-e78cce2c4522cf91.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y(b))()},async()=>{throw new q.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),O,v),v=(b)=>b?.expiration!==void 0,O=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{T as Bb};
10
10
 
11
- //# debugId=201C5005A90452FA64756e2164756e21
11
+ //# debugId=1FA979880960FE7A64756e2164756e21
@@ -6,6 +6,6 @@
6
6
  "import { chain, CredentialsProviderError } from \"@smithy/property-provider\";\nexport const ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nexport const remoteProvider = async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n return chain(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED]) {\n return async () => {\n throw new CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node -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AAO,EAAQ,CAAI,EAAE,GACtB,SAAY,CACX,EAAK,QAAQ,MAAM,8DAA8D,EACjF,MAAQ,WAAY,KAAa,uCACjC,OAAO,EAAQ,CAAI,EAAE,GACtB,SAAY,CACX,EAAK,QAAQ,MAAM,kEAAkE,EACrF,MAAQ,eAAgB,KAAa,uCACrC,OAAO,EAAY,CAAI,EAAE,GAC1B,SAAY,CACX,EAAK,QAAQ,MAAM,oEAAoE,EACvF,MAAQ,iBAAkB,KAAa,uCACvC,OAAO,EAAc,CAAI,EAAE,GAC5B,SAAY,CAEX,OADA,EAAK,QAAQ,MAAM,qEAAqE,GAChF,MAAM,EAAe,CAAI,GAAG,GACrC,SAAY,CACX,MAAM,IAAI,2BAAyB,gDAAiD,CAChF,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EACJ,EAAG,EAA6B,CAA0B,EAC9C,EAA6B,CAAC,IAAgB,GAAa,aAAe,OAC1E,EAA8B,CAAC,IAAgB,GAAa,aAAe,QAAa,EAAY,WAAW,QAAQ,EAAI,KAAK,IAAI,EAAI",
9
- "debugId": "201C5005A90452FA64756e2164756e21",
9
+ "debugId": "1FA979880960FE7A64756e2164756e21",
10
10
  "names": []
11
11
  }
@@ -0,0 +1,7 @@
1
+ import{J as Q,K as N} from"./chunk-0d97333b6af9fc45.js";import{xb as p} from"./chunk-a0a73bf4d58b0b0b.js";var xn=N((Sr,Hn)=>{var{defineProperty:O,getOwnPropertyDescriptor:Uf,getOwnPropertyNames:If}=Object,yf=Object.prototype.hasOwnProperty,z=(n,c)=>O(n,"name",{value:c,configurable:!0}),of=(n,c)=>{for(var t in c)O(n,t,{get:c[t],enumerable:!0})},Lf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of If(c))if(!yf.call(n,h)&&h!==t)O(n,h,{get:()=>c[h],enumerable:!(f=Uf(c,h))||f.enumerable})}return n},Df=(n)=>Lf(O({},"__esModule",{value:!0}),n),jn={};of(jn,{constructStack:()=>$n});Hn.exports=Df(jn);var A=z((n,c)=>{const t=[];if(n)t.push(n);if(c)for(let f of c)t.push(f);return t},"getAllAliases"),K=z((n,c)=>{return`${n||"anonymous"}${c&&c.length>0?` (a.k.a. ${c.join(",")})`:""}`},"getMiddlewareNameWithAliases"),$n=z(()=>{let n=[],c=[],t=!1;const f=new Set,h=z((w)=>w.sort((d,T)=>Mn[T.step]-Mn[d.step]||Rn[T.priority||"normal"]-Rn[d.priority||"normal"]),"sort"),i=z((w)=>{let d=!1;const T=z((U)=>{const o=A(U.name,U.aliases);if(o.includes(w)){d=!0;for(let F of o)f.delete(F);return!1}return!0},"filterCb");return n=n.filter(T),c=c.filter(T),d},"removeByName"),r=z((w)=>{let d=!1;const T=z((U)=>{if(U.middleware===w){d=!0;for(let o of A(U.name,U.aliases))f.delete(o);return!1}return!0},"filterCb");return n=n.filter(T),c=c.filter(T),d},"removeByReference"),s=z((w)=>{var d;return n.forEach((T)=>{w.add(T.middleware,{...T})}),c.forEach((T)=>{w.addRelativeTo(T.middleware,{...T})}),(d=w.identifyOnResolve)==null||d.call(w,y.identifyOnResolve()),w},"cloneTo"),u=z((w)=>{const d=[];return w.before.forEach((T)=>{if(T.before.length===0&&T.after.length===0)d.push(T);else d.push(...u(T))}),d.push(w),w.after.reverse().forEach((T)=>{if(T.before.length===0&&T.after.length===0)d.push(T);else d.push(...u(T))}),d},"expandRelativeMiddlewareList"),x=z((w=!1)=>{const d=[],T=[],U={};return n.forEach((F)=>{const C={...F,before:[],after:[]};for(let $ of A(C.name,C.aliases))U[$]=C;d.push(C)}),c.forEach((F)=>{const C={...F,before:[],after:[]};for(let $ of A(C.name,C.aliases))U[$]=C;T.push(C)}),T.forEach((F)=>{if(F.toMiddleware){const C=U[F.toMiddleware];if(C===void 0){if(w)return;throw new Error(`${F.toMiddleware} is not found when adding ${K(F.name,F.aliases)} middleware ${F.relation} ${F.toMiddleware}`)}if(F.relation==="after")C.after.push(F);if(F.relation==="before")C.before.push(F)}}),h(d).map(u).reduce((F,C)=>{return F.push(...C),F},[])},"getMiddlewareList"),y={add:(w,d={})=>{const{name:T,override:U,aliases:o}=d,F={step:"initialize",priority:"normal",middleware:w,...d},C=A(T,o);if(C.length>0){if(C.some(($)=>f.has($))){if(!U)throw new Error(`Duplicate middleware name '${K(T,o)}'`);for(let $ of C){const E=n.findIndex((g)=>{var S;return g.name===$||((S=g.aliases)==null?void 0:S.some((J)=>J===$))});if(E===-1)continue;const I=n[E];if(I.step!==F.step||F.priority!==I.priority)throw new Error(`"${K(I.name,I.aliases)}" middleware with ${I.priority} priority in ${I.step} step cannot be overridden by "${K(T,o)}" middleware with ${F.priority} priority in ${F.step} step.`);n.splice(E,1)}}for(let $ of C)f.add($)}n.push(F)},addRelativeTo:(w,d)=>{const{name:T,override:U,aliases:o}=d,F={middleware:w,...d},C=A(T,o);if(C.length>0){if(C.some(($)=>f.has($))){if(!U)throw new Error(`Duplicate middleware name '${K(T,o)}'`);for(let $ of C){const E=c.findIndex((g)=>{var S;return g.name===$||((S=g.aliases)==null?void 0:S.some((J)=>J===$))});if(E===-1)continue;const I=c[E];if(I.toMiddleware!==F.toMiddleware||I.relation!==F.relation)throw new Error(`"${K(I.name,I.aliases)}" middleware ${I.relation} "${I.toMiddleware}" middleware cannot be overridden by "${K(T,o)}" middleware ${F.relation} "${F.toMiddleware}" middleware.`);c.splice(E,1)}}for(let $ of C)f.add($)}c.push(F)},clone:()=>s($n()),use:(w)=>{w.applyToStack(y)},remove:(w)=>{if(typeof w==="string")return i(w);else return r(w)},removeByTag:(w)=>{let d=!1;const T=z((U)=>{const{tags:o,name:F,aliases:C}=U;if(o&&o.includes(w)){const $=A(F,C);for(let E of $)f.delete(E);return d=!0,!1}return!0},"filterCb");return n=n.filter(T),c=c.filter(T),d},concat:(w)=>{var d;const T=s($n());return T.use(w),T.identifyOnResolve(t||T.identifyOnResolve()||(((d=w.identifyOnResolve)==null?void 0:d.call(w))??!1)),T},applyToStack:s,identify:()=>{return x(!0).map((w)=>{const d=w.step??w.relation+" "+w.toMiddleware;return K(w.name,w.aliases)+" - "+d})},identifyOnResolve(w){if(typeof w==="boolean")t=w;return t},resolve:(w,d)=>{for(let T of x().map((U)=>U.middleware).reverse())w=T(w,d);if(t)console.log(y.identify());return w}};return y},"constructStack"),Mn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Rn={high:3,normal:2,low:1}});var mn=N((Ar,an)=>{var{defineProperty:v,getOwnPropertyDescriptor:Sf,getOwnPropertyNames:Yf}=Object,zf=Object.prototype.hasOwnProperty,Vf=(n,c)=>v(n,"name",{value:c,configurable:!0}),Zf=(n,c)=>{for(var t in c)v(n,t,{get:c[t],enumerable:!0})},Gf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Yf(c))if(!zf.call(n,h)&&h!==t)v(n,h,{get:()=>c[h],enumerable:!(f=Sf(c,h))||f.enumerable})}return n},Kf=(n)=>Gf(v({},"__esModule",{value:!0}),n),qn={};Zf(qn,{isArrayBuffer:()=>Qf});an.exports=Kf(qn);var Qf=Vf((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var R=N((Wr,cc)=>{var{defineProperty:q,getOwnPropertyDescriptor:Xf,getOwnPropertyNames:Jf}=Object,Af=Object.prototype.hasOwnProperty,_n=(n,c)=>q(n,"name",{value:c,configurable:!0}),Wf=(n,c)=>{for(var t in c)q(n,t,{get:c[t],enumerable:!0})},bf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Jf(c))if(!Af.call(n,h)&&h!==t)q(n,h,{get:()=>c[h],enumerable:!(f=Xf(c,h))||f.enumerable})}return n},Bf=(n)=>bf(q({},"__esModule",{value:!0}),n),nc={};Wf(nc,{fromArrayBuffer:()=>Rf,fromString:()=>jf});cc.exports=Bf(nc);var Mf=mn(),dn=import.meta.require("buffer"),Rf=_n((n,c=0,t=n.byteLength-c)=>{if(!Mf.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return dn.Buffer.from(n,c,t)},"fromArrayBuffer"),jf=_n((n,c)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return c?dn.Buffer.from(n,c):dn.Buffer.from(n)},"fromString")});var hc=N((tc)=>{Object.defineProperty(tc,"__esModule",{value:!0});tc.fromBase64=void 0;var Hf=R(),Pf=/^[A-Za-z0-9+/]*={0,2}$/,ef=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Pf.exec(n))throw new TypeError("Invalid base64 string.");const c=Hf.fromString(n,"base64");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)};tc.fromBase64=ef});var m=N((Br,uc)=>{var{defineProperty:a,getOwnPropertyDescriptor:lf,getOwnPropertyNames:kf}=Object,Of=Object.prototype.hasOwnProperty,En=(n,c)=>a(n,"name",{value:c,configurable:!0}),pf=(n,c)=>{for(var t in c)a(n,t,{get:c[t],enumerable:!0})},vf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of kf(c))if(!Of.call(n,h)&&h!==t)a(n,h,{get:()=>c[h],enumerable:!(f=lf(c,h))||f.enumerable})}return n},qf=(n)=>vf(a({},"__esModule",{value:!0}),n),ic={};pf(ic,{fromUtf8:()=>sc,toUint8Array:()=>af,toUtf8:()=>mf});uc.exports=qf(ic);var rc=R(),sc=En((n)=>{const c=rc.fromString(n,"utf8");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),af=En((n)=>{if(typeof n==="string")return sc(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),mf=En((n)=>{if(typeof n==="string")return n;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return rc.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var $c=N((wc)=>{Object.defineProperty(wc,"__esModule",{value:!0});wc.toBase64=void 0;var _f=R(),nh=m(),ch=(n)=>{let c;if(typeof n==="string")c=nh.fromUtf8(n);else c=n;if(typeof c!=="object"||typeof c.byteOffset!=="number"||typeof c.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return _f.fromArrayBuffer(c.buffer,c.byteOffset,c.byteLength).toString("base64")};wc.toBase64=ch});var nn=N((Rr,_)=>{var{defineProperty:xc,getOwnPropertyDescriptor:th,getOwnPropertyNames:fh}=Object,hh=Object.prototype.hasOwnProperty,Fn=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of fh(c))if(!hh.call(n,h)&&h!==t)xc(n,h,{get:()=>c[h],enumerable:!(f=th(c,h))||f.enumerable})}return n},dc=(n,c,t)=>(Fn(n,c,"default"),t&&Fn(t,c,"default")),ih=(n)=>Fn(xc({},"__esModule",{value:!0}),n),Cn={};_.exports=ih(Cn);dc(Cn,hc(),_.exports);dc(Cn,$c(),_.exports)});var Cc=N((Ec)=>{Object.defineProperty(Ec,"__esModule",{value:!0});Ec.getAwsChunkedEncodingStream=void 0;var rh=import.meta.require("stream"),sh=(n,c)=>{const{base64Encoder:t,bodyLengthChecker:f,checksumAlgorithmFn:h,checksumLocationName:i,streamHasher:r}=c,s=t!==void 0&&h!==void 0&&i!==void 0&&r!==void 0,u=s?r(h,n):void 0,x=new rh.Readable({read:()=>{}});return n.on("data",(y)=>{const w=f(y)||0;x.push(`${w.toString(16)}\r\n`),x.push(y),x.push("\r\n")}),n.on("end",async()=>{if(x.push("0\r\n"),s){const y=t(await u);x.push(`${i}:${y}\r\n`),x.push("\r\n")}x.push(null)}),x};Ec.getAwsChunkedEncodingStream=sh});var Un=N((Hr,Sc)=>{var Dc=function(n){return Object.keys(n).reduce((c,t)=>{const f=n[t];return{...c,[t]:Array.isArray(f)?[...f]:f}},{})},gc=function(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)},cn=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,wh=Object.getOwnPropertyNames,Th=Object.prototype.hasOwnProperty,X=(n,c)=>cn(n,"name",{value:c,configurable:!0}),$h=(n,c)=>{for(var t in c)cn(n,t,{get:c[t],enumerable:!0})},xh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of wh(c))if(!Th.call(n,h)&&h!==t)cn(n,h,{get:()=>c[h],enumerable:!(f=uh(c,h))||f.enumerable})}return n},dh=(n)=>xh(cn({},"__esModule",{value:!0}),n),Uc={};$h(Uc,{Field:()=>Ch,Fields:()=>Uh,HttpRequest:()=>Ih,HttpResponse:()=>yh,IHttpRequest:()=>Ic.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Eh,isValidHostname:()=>gc,resolveHttpHandlerRuntimeConfig:()=>Fh});Sc.exports=dh(Uc);var Eh=X((n)=>{let c=n.httpHandler;return{setHttpHandler(t){c=t},httpHandler(){return c},updateHttpClientConfig(t,f){c.updateHttpClientConfig(t,f)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Fh=X((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),Ic=p(),yc=class n{constructor({name:c,kind:t=Ic.FieldPosition.HEADER,values:f=[]}){this.name=c,this.kind=t,this.values=f}add(c){this.values.push(c)}set(c){this.values=c}remove(c){this.values=this.values.filter((t)=>t!==c)}toString(){return this.values.map((c)=>c.includes(",")||c.includes(" ")?`"${c}"`:c).join(", ")}get(){return this.values}};X(yc,"Field");var Ch=yc,oc=class n{constructor({fields:c=[],encoding:t="utf-8"}){this.entries={},c.forEach(this.setField.bind(this)),this.encoding=t}setField(c){this.entries[c.name.toLowerCase()]=c}getField(c){return this.entries[c.toLowerCase()]}removeField(c){delete this.entries[c.toLowerCase()]}getByType(c){return Object.values(this.entries).filter((t)=>t.kind===c)}};X(oc,"Fields");var Uh=oc,Lc=class n{constructor(c){this.method=c.method||"GET",this.hostname=c.hostname||"localhost",this.port=c.port,this.query=c.query||{},this.headers=c.headers||{},this.body=c.body,this.protocol=c.protocol?c.protocol.slice(-1)!==":"?`${c.protocol}:`:c.protocol:"https:",this.path=c.path?c.path.charAt(0)!=="/"?`/${c.path}`:c.path:"/",this.username=c.username,this.password=c.password,this.fragment=c.fragment}static clone(c){const t=new n({...c,headers:{...c.headers}});if(t.query)t.query=Dc(t.query);return t}static isInstance(c){if(!c)return!1;const t=c;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return n.clone(this)}};X(Lc,"HttpRequest");var Ih=Lc;X(Dc,"cloneQuery");var Nc=class n{constructor(c){this.statusCode=c.statusCode,this.reason=c.reason,this.headers=c.headers||{},this.body=c.body}static isInstance(c){if(!c)return!1;const t=c;return typeof t.statusCode==="number"&&typeof t.headers==="object"}};X(Nc,"HttpResponse");var yh=Nc;X(gc,"isValidHostname")});var Zc=N((Pr,Vc)=>{var{defineProperty:tn,getOwnPropertyDescriptor:oh,getOwnPropertyNames:Lh}=Object,Dh=Object.prototype.hasOwnProperty,In=(n,c)=>tn(n,"name",{value:c,configurable:!0}),Nh=(n,c)=>{for(var t in c)tn(n,t,{get:c[t],enumerable:!0})},gh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Lh(c))if(!Dh.call(n,h)&&h!==t)tn(n,h,{get:()=>c[h],enumerable:!(f=oh(c,h))||f.enumerable})}return n},Sh=(n)=>gh(tn({},"__esModule",{value:!0}),n),Yc={};Nh(Yc,{escapeUri:()=>zc,escapeUriPath:()=>zh});Vc.exports=Sh(Yc);var zc=In((n)=>encodeURIComponent(n).replace(/[!'()*]/g,Yh),"escapeUri"),Yh=In((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),zh=In((n)=>n.split("/").map(zc).join("/"),"escapeUriPath")});var j=N((er,Qc)=>{var Kc=function(n){const c=[];for(let t of Object.keys(n).sort()){const f=n[t];if(t=yn.escapeUri(t),Array.isArray(f))for(let h=0,i=f.length;h<i;h++)c.push(`${t}=${yn.escapeUri(f[h])}`);else{let h=t;if(f||typeof f==="string")h+=`=${yn.escapeUri(f)}`;c.push(h)}}return c.join("&")},fn=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,Zh=Object.getOwnPropertyNames,Gh=Object.prototype.hasOwnProperty,Kh=(n,c)=>fn(n,"name",{value:c,configurable:!0}),Qh=(n,c)=>{for(var t in c)fn(n,t,{get:c[t],enumerable:!0})},Xh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Zh(c))if(!Gh.call(n,h)&&h!==t)fn(n,h,{get:()=>c[h],enumerable:!(f=Vh(c,h))||f.enumerable})}return n},Jh=(n)=>Xh(fn({},"__esModule",{value:!0}),n),Gc={};Qh(Gc,{buildQueryString:()=>Kc});Qc.exports=Jh(Gc);var yn=Zc();Kh(Kc,"buildQueryString")});var ac=N((lr,qc)=>{async function Dn(n,c,t=Ac){const f=c.headers??{},h=f.Expect||f.expect;let i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(Ac,t)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)Pc(n,c.body)}var Pc=function(n,c){if(c instanceof Hc.Readable){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}const t=c;if(typeof t==="object"&&t.buffer&&typeof t.byteOffset==="number"&&typeof t.byteLength==="number"){n.end(Buffer.from(t.buffer,t.byteOffset,t.byteLength));return}n.end(Buffer.from(c));return}n.end()};async function vc(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var{create:Ah,defineProperty:H,getOwnPropertyDescriptor:Wh,getOwnPropertyNames:bh,getPrototypeOf:Bh}=Object,Mh=Object.prototype.hasOwnProperty,L=(n,c)=>H(n,"name",{value:c,configurable:!0}),Rh=(n,c)=>{for(var t in c)H(n,t,{get:c[t],enumerable:!0})},bc=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of bh(c))if(!Mh.call(n,h)&&h!==t)H(n,h,{get:()=>c[h],enumerable:!(f=Wh(c,h))||f.enumerable})}return n},jh=(n,c,t)=>(t=n!=null?Ah(Bh(n)):{},bc(c||!n||!n.__esModule?H(t,"default",{value:n,enumerable:!0}):t,n)),Hh=(n)=>bc(H({},"__esModule",{value:!0}),n),Bc={};Rh(Bc,{DEFAULT_REQUEST_TIMEOUT:()=>ph,NodeHttp2Handler:()=>_h,NodeHttpHandler:()=>vh,streamCollector:()=>ci});qc.exports=Hh(Bc);var Mc=Un(),Rc=j(),on=import.meta.require("http"),Ln=import.meta.require("https"),Ph=["ECONNRESET","EPIPE","ETIMEDOUT"],jc=L((n)=>{const c={};for(let t of Object.keys(n)){const f=n[t];c[t]=Array.isArray(f)?f.join(","):f}return c},"getTransformedHeaders"),Xc=1000,eh=L((n,c,t=0)=>{if(!t)return-1;const f=L((h)=>{const i=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${t} ms`),{name:"TimeoutError"}))},t-h),r=L((s)=>{if(s==null?void 0:s.connecting)s.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)},"doWithSocket");if(n.socket)r(n.socket);else n.on("socket",r)},"registerTimeout");if(t<2000)return f(0),0;return setTimeout(f.bind(null,Xc),Xc)},"setConnectionTimeout"),lh=3000,kh=L((n,{keepAlive:c,keepAliveMsecs:t},f=lh)=>{if(c!==!0)return-1;const h=L(()=>{if(n.socket)n.socket.setKeepAlive(c,t||0);else n.on("socket",(i)=>{i.setKeepAlive(c,t||0)})},"registerListener");if(f===0)return h(),0;return setTimeout(h,f)},"setSocketKeepAlive"),Jc=3000,Oh=L((n,c,t=0)=>{const f=L((h)=>{n.setTimeout(t-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${t} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<t&&t<6000)return f(0),0;return setTimeout(f.bind(null,t===0?0:Jc),Jc)},"setSocketTimeout"),Hc=import.meta.require("stream"),Ac=1000;L(Dn,"writeRequestBody");L(Pc,"writeBody");var ph=0,ec=class n{constructor(c){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,f)=>{if(typeof c==="function")c().then((h)=>{t(this.resolveDefaultConfig(h))}).catch(f);else t(this.resolveDefaultConfig(c))})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}static checkSocketUsage(c,t,f=console){var h,i,r;const{sockets:s,requests:u,maxSockets:x}=c;if(typeof x!=="number"||x===Infinity)return t;const y=15000;if(Date.now()-y<t)return t;if(s&&u)for(let w in s){const d=((h=s[w])==null?void 0:h.length)??0,T=((i=u[w])==null?void 0:i.length)??0;if(d>=x&&T>=2*x)return(r=f==null?void 0:f.warn)==null||r.call(f,`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${T} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}resolveDefaultConfig(c){const{requestTimeout:t,connectionTimeout:f,socketTimeout:h,httpAgent:i,httpsAgent:r}=c||{};return{connectionTimeout:f,requestTimeout:t??h,httpAgent:(()=>{if(i instanceof on.Agent||typeof(i==null?void 0:i.destroy)==="function")return i;return new on.Agent({keepAlive:!0,maxSockets:50,...i})})(),httpsAgent:(()=>{if(r instanceof Ln.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new Ln.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var c,t,f,h;(t=(c=this.config)==null?void 0:c.httpAgent)==null||t.destroy(),(h=(f=this.config)==null?void 0:f.httpsAgent)==null||h.destroy()}async handle(c,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;return new Promise((f,h)=>{let i=void 0;const r=[],s=L(async(E)=>{await i,r.forEach(clearTimeout),f(E)},"resolve"),u=L(async(E)=>{await i,r.forEach(clearTimeout),h(E)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t==null?void 0:t.aborted){const E=new Error("Request aborted");E.name="AbortError",u(E);return}const x=c.protocol==="https:",y=x?this.config.httpsAgent:this.config.httpAgent;r.push(setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(y,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const w=Rc.buildQueryString(c.query||{});let d=void 0;if(c.username!=null||c.password!=null){const E=c.username??"",I=c.password??"";d=`${E}:${I}`}let T=c.path;if(w)T+=`?${w}`;if(c.fragment)T+=`#${c.fragment}`;let U=c.hostname??"";if(U[0]==="["&&U.endsWith("]"))U=c.hostname.slice(1,-1);else U=c.hostname;const o={headers:c.headers,host:U,method:c.method,path:T,port:c.port,agent:y,auth:d},C=(x?Ln.request:on.request)(o,(E)=>{const I=new Mc.HttpResponse({statusCode:E.statusCode||-1,reason:E.statusMessage,headers:jc(E.headers),body:E});s({response:I})});if(C.on("error",(E)=>{if(Ph.includes(E.code))u(Object.assign(E,{name:"TimeoutError"}));else u(E)}),t){const E=L(()=>{C.destroy();const I=new Error("Request aborted");I.name="AbortError",u(I)},"onAbort");if(typeof t.addEventListener==="function"){const I=t;I.addEventListener("abort",E,{once:!0}),C.once("close",()=>I.removeEventListener("abort",E))}else t.onabort=E}r.push(eh(C,u,this.config.connectionTimeout)),r.push(Oh(C,u,this.config.requestTimeout));const $=o.agent;if(typeof $==="object"&&"keepAlive"in $)r.push(kh(C,{keepAlive:$.keepAlive,keepAliveMsecs:$.keepAliveMsecs}));i=Dn(C,c,this.config.requestTimeout).catch((E)=>{return r.forEach(clearTimeout),h(E)})})}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[c]:t}})}httpHandlerConfigs(){return this.config??{}}};L(ec,"NodeHttpHandler");var vh=ec,Wc=import.meta.require("http2"),qh=jh(import.meta.require("http2")),lc=class n{constructor(c){this.sessions=[],this.sessions=c??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(c){this.sessions.push(c)}contains(c){return this.sessions.includes(c)}remove(c){this.sessions=this.sessions.filter((t)=>t!==c)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(c){for(let t of this.sessions)if(t===c){if(!t.destroyed)t.destroy()}}};L(lc,"NodeHttp2ConnectionPool");var ah=lc,kc=class n{constructor(c){if(this.sessionCache=new Map,this.config=c,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(c,t){const f=this.getUrlString(c),h=this.sessionCache.get(f);if(h){const u=h.poll();if(u&&!this.config.disableConcurrency)return u}const i=qh.default.connect(f);if(this.config.maxConcurrency)i.settings({maxConcurrentStreams:this.config.maxConcurrency},(u)=>{if(u)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+c.destination.toString())});i.unref();const r=L(()=>{i.destroy(),this.deleteSession(f,i)},"destroySessionCb");if(i.on("goaway",r),i.on("error",r),i.on("frameError",r),i.on("close",()=>this.deleteSession(f,i)),t.requestTimeout)i.setTimeout(t.requestTimeout,r);const s=this.sessionCache.get(f)||new ah;return s.offerLast(i),this.sessionCache.set(f,s),i}deleteSession(c,t){const f=this.sessionCache.get(c);if(!f)return;if(!f.contains(t))return;f.remove(t),this.sessionCache.set(c,f)}release(c,t){var f;const h=this.getUrlString(c);(f=this.sessionCache.get(h))==null||f.offerLast(t)}destroy(){for(let[c,t]of this.sessionCache){for(let f of t){if(!f.destroyed)f.destroy();t.remove(f)}this.sessionCache.delete(c)}}setMaxConcurrentStreams(c){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=c}setDisableConcurrentStreams(c){this.config.disableConcurrency=c}getUrlString(c){return c.destination.toString()}};L(kc,"NodeHttp2ConnectionManager");var mh=kc,Oc=class n{constructor(c){this.metadata={handlerProtocol:"h2"},this.connectionManager=new mh({}),this.configProvider=new Promise((t,f)=>{if(typeof c==="function")c().then((h)=>{t(h||{})}).catch(f);else t(c||{})})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}destroy(){this.connectionManager.destroy()}async handle(c,{abortSignal:t}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:f,disableConcurrentStreams:h}=this.config;return new Promise((i,r)=>{var s;let u=!1,x=void 0;const y=L(async(D)=>{await x,i(D)},"resolve"),w=L(async(D)=>{await x,r(D)},"reject");if(t==null?void 0:t.aborted){u=!0;const D=new Error("Request aborted");D.name="AbortError",w(D);return}const{hostname:d,method:T,port:U,protocol:o,query:F}=c;let C="";if(c.username!=null||c.password!=null){const D=c.username??"",V=c.password??"";C=`${D}:${V}@`}const $=`${o}//${C}${d}${U?`:${U}`:""}`,E={destination:new URL($)},I=this.connectionManager.lease(E,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:h||!1}),g=L((D)=>{if(h)this.destroySession(I);u=!0,w(D)},"rejectWithDestroy"),S=Rc.buildQueryString(F||{});let J=c.path;if(S)J+=`?${S}`;if(c.fragment)J+=`#${c.fragment}`;const Y=I.request({...c.headers,[Wc.constants.HTTP2_HEADER_PATH]:J,[Wc.constants.HTTP2_HEADER_METHOD]:T});if(I.ref(),Y.on("response",(D)=>{const V=new Mc.HttpResponse({statusCode:D[":status"]||-1,headers:jc(D),body:Y});if(u=!0,y({response:V}),h)I.close(),this.connectionManager.deleteSession($,I)}),f)Y.setTimeout(f,()=>{Y.close();const D=new Error(`Stream timed out because of no activity for ${f} ms`);D.name="TimeoutError",g(D)});if(t){const D=L(()=>{Y.close();const V=new Error("Request aborted");V.name="AbortError",g(V)},"onAbort");if(typeof t.addEventListener==="function"){const V=t;V.addEventListener("abort",D,{once:!0}),Y.once("close",()=>V.removeEventListener("abort",D))}else t.onabort=D}Y.on("frameError",(D,V,Cf)=>{g(new Error(`Frame type id ${D} in stream id ${Cf} has failed with code ${V}.`))}),Y.on("error",g),Y.on("aborted",()=>{g(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Y.rstCode}.`))}),Y.on("close",()=>{if(I.unref(),h)I.destroy();if(!u)g(new Error("Unexpected error: http2 request did not get a response"))}),x=Dn(Y,c,f)})}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[c]:t}})}httpHandlerConfigs(){return this.config??{}}destroySession(c){if(!c.destroyed)c.destroy()}};L(Oc,"NodeHttp2Handler");var _h=Oc,pc=class n extends Hc.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(c,t,f){this.bufferedBytes.push(c),f()}};L(pc,"Collector");var ni=pc,ci=L((n)=>{if(ti(n))return vc(n);return new Promise((c,t)=>{const f=new ni;n.pipe(f),n.on("error",(h)=>{f.end(),t(h)}),f.on("error",t),f.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},"streamCollector"),ti=L((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");L(vc,"collectReadableStream")});var rt=N((kr,it)=>{var nt=function(n=0){return new Promise((c,t)=>{if(n)setTimeout(()=>{const f=new Error(`Request did not complete within ${n} ms`);f.name="TimeoutError",t(f)},n)})};async function tt(n){const c=await ht(n),t=$i.fromBase64(c);return new Uint8Array(t)}async function ft(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var ht=function(n){return new Promise((c,t)=>{const f=new FileReader;f.onloadend=()=>{if(f.readyState!==2)return t(new Error("Reader aborted too early"));const h=f.result??"",i=h.indexOf(","),r=i>-1?i+1:h.length;c(h.substring(r))},f.onabort=()=>t(new Error("Read aborted")),f.onerror=()=>t(f.error),f.readAsDataURL(n)})},rn=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,hi=Object.getOwnPropertyNames,ii=Object.prototype.hasOwnProperty,G=(n,c)=>rn(n,"name",{value:c,configurable:!0}),ri=(n,c)=>{for(var t in c)rn(n,t,{get:c[t],enumerable:!0})},si=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of hi(c))if(!ii.call(n,h)&&h!==t)rn(n,h,{get:()=>c[h],enumerable:!(f=fi(c,h))||f.enumerable})}return n},ui=(n)=>si(rn({},"__esModule",{value:!0}),n),_c={};ri(_c,{FetchHttpHandler:()=>Ti,keepAliveSupport:()=>hn,streamCollector:()=>xi});it.exports=ui(_c);var mc=Un(),wi=j();G(nt,"requestTimeout");var hn={supported:void 0},ct=class n{static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}constructor(c){if(typeof c==="function")this.configProvider=c().then((t)=>t||{});else this.config=c??{},this.configProvider=Promise.resolve(this.config);if(hn.supported===void 0)hn.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(c,{abortSignal:t}={}){var f;if(!this.config)this.config=await this.configProvider;const h=this.config.requestTimeout,i=this.config.keepAlive===!0,r=this.config.credentials;if(t==null?void 0:t.aborted){const $=new Error("Request aborted");return $.name="AbortError",Promise.reject($)}let s=c.path;const u=wi.buildQueryString(c.query||{});if(u)s+=`?${u}`;if(c.fragment)s+=`#${c.fragment}`;let x="";if(c.username!=null||c.password!=null){const $=c.username??"",E=c.password??"";x=`${$}:${E}@`}const{port:y,method:w}=c,d=`${c.protocol}//${x}${c.hostname}${y?`:${y}`:""}${s}`,T=w==="GET"||w==="HEAD"?void 0:c.body,U={body:T,headers:new Headers(c.headers),method:w,credentials:r};if((f=this.config)==null?void 0:f.cache)U.cache=this.config.cache;if(T)U.duplex="half";if(typeof AbortController!=="undefined")U.signal=t;if(hn.supported)U.keepalive=i;if(typeof this.config.requestInit==="function")Object.assign(U,this.config.requestInit(c));let o=G(()=>{},"removeSignalEventListener");const F=new Request(d,U),C=[fetch(F).then(($)=>{const E=$.headers,I={};for(let S of E.entries())I[S[0]]=S[1];if($.body==null)return $.blob().then((S)=>({response:new mc.HttpResponse({headers:I,reason:$.statusText,statusCode:$.status,body:S})}));return{response:new mc.HttpResponse({headers:I,reason:$.statusText,statusCode:$.status,body:$.body})}}),nt(h)];if(t)C.push(new Promise(($,E)=>{const I=G(()=>{const g=new Error("Request aborted");g.name="AbortError",E(g)},"onAbort");if(typeof t.addEventListener==="function"){const g=t;g.addEventListener("abort",I,{once:!0}),o=G(()=>g.removeEventListener("abort",I),"removeSignalEventListener")}else t.onabort=I}));return Promise.race(C).finally(o)}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return f[c]=t,f})}httpHandlerConfigs(){return this.config??{}}};G(ct,"FetchHttpHandler");var Ti=ct,$i=nn(),xi=G((n)=>{if(typeof Blob==="function"&&n instanceof Blob)return tt(n);return ft(n)},"streamCollector");G(tt,"collectBlob");G(ft,"collectStream");G(ht,"readToBase64")});var dt=N((Or,xt)=>{var Tt=function(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const c=new Uint8Array(n.length/2);for(let t=0;t<n.length;t+=2){const f=n.slice(t,t+2).toLowerCase();if(f in Nn)c[t/2]=Nn[f];else throw new Error(`Cannot decode unrecognized sequence ${f} as hexadecimal`)}return c},$t=function(n){let c="";for(let t=0;t<n.byteLength;t++)c+=wt[n[t]];return c},sn=Object.defineProperty,di=Object.getOwnPropertyDescriptor,Ei=Object.getOwnPropertyNames,Fi=Object.prototype.hasOwnProperty,st=(n,c)=>sn(n,"name",{value:c,configurable:!0}),Ci=(n,c)=>{for(var t in c)sn(n,t,{get:c[t],enumerable:!0})},Ui=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Ei(c))if(!Fi.call(n,h)&&h!==t)sn(n,h,{get:()=>c[h],enumerable:!(f=di(c,h))||f.enumerable})}return n},Ii=(n)=>Ui(sn({},"__esModule",{value:!0}),n),ut={};Ci(ut,{fromHex:()=>Tt,toHex:()=>$t});xt.exports=Ii(ut);var wt={},Nn={};for(let n=0;n<256;n++){let c=n.toString(16).toLowerCase();if(c.length===1)c=`0${c}`;wt[n]=c,Nn[c]=n}st(Tt,"fromHex");st($t,"toHex")});var P=N((Et)=>{Object.defineProperty(Et,"__esModule",{value:!0});Et.isReadableStream=void 0;var yi=(n)=>{var c;return typeof ReadableStream==="function"&&(((c=n===null||n===void 0?void 0:n.constructor)===null||c===void 0?void 0:c.name)===ReadableStream.name||n instanceof ReadableStream)};Et.isReadableStream=yi});var Lt=N((yt)=>{Object.defineProperty(yt,"__esModule",{value:!0});yt.sdkStreamMixin=void 0;var oi=rt(),Li=nn(),Di=dt(),Ni=m(),Ct=P(),Ut="The stream has already been transformed.",gi=(n)=>{var c,t;if(!It(n)&&!Ct.isReadableStream(n)){const r=((t=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||t===void 0?void 0:t.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let f=!1;const h=async()=>{if(f)throw new Error(Ut);return f=!0,await oi.streamCollector(n)},i=(r)=>{if(typeof r.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return r.stream()};return Object.assign(n,{transformToByteArray:h,transformToString:async(r)=>{const s=await h();if(r==="base64")return Li.toBase64(s);else if(r==="hex")return Di.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return Ni.toUtf8(s);else if(typeof TextDecoder==="function")return new TextDecoder(r).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(f)throw new Error(Ut);if(f=!0,It(n))return i(n);else if(Ct.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};yt.sdkStreamMixin=gi;var It=(n)=>typeof Blob==="function"&&n instanceof Blob});var St=N((Nt)=>{Object.defineProperty(Nt,"__esModule",{value:!0});Nt.sdkStreamMixin=void 0;var Si=ac(),Yi=R(),gn=import.meta.require("stream"),zi=import.meta.require("util"),Vi=Lt(),Dt="The stream has already been transformed.",Zi=(n)=>{var c,t;if(!(n instanceof gn.Readable))try{return Vi.sdkStreamMixin(n)}catch(i){const r=((t=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||t===void 0?void 0:t.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let f=!1;const h=async()=>{if(f)throw new Error(Dt);return f=!0,await Si.streamCollector(n)};return Object.assign(n,{transformToByteArray:h,transformToString:async(i)=>{const r=await h();if(i===void 0||Buffer.isEncoding(i))return Yi.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(i);else return new zi.TextDecoder(i).decode(r)},transformToWebStream:()=>{if(f)throw new Error(Dt);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof gn.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return f=!0,gn.Readable.toWeb(n)}})};Nt.sdkStreamMixin=Zi});var Vt=N((Yt)=>{async function Gi(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Object.defineProperty(Yt,"__esModule",{value:!0});Yt.splitStream=void 0;Yt.splitStream=Gi});var Qt=N((Gt)=>{async function Xi(n){if(Qi.isReadableStream(n))return Ki.splitStream(n);const c=new Zt.PassThrough,t=new Zt.PassThrough;return n.pipe(c),n.pipe(t),[c,t]}Object.defineProperty(Gt,"__esModule",{value:!0});Gt.splitStream=void 0;var Zt=import.meta.require("stream"),Ki=Vt(),Qi=P();Gt.splitStream=Xi});var At=N((Xt)=>{async function Ji(n,c){var t;let f=0;const h=[],i=n.getReader();let r=!1;while(!r){const{done:x,value:y}=await i.read();if(y)h.push(y),f+=(t=y===null||y===void 0?void 0:y.byteLength)!==null&&t!==void 0?t:0;if(f>=c)break;r=x}i.releaseLock();const s=new Uint8Array(Math.min(c,f));let u=0;for(let x of h){if(x.byteLength>s.byteLength-u){s.set(x.subarray(0,s.byteLength-u),u);break}else s.set(x,u);u+=x.length}return s}Object.defineProperty(Xt,"__esModule",{value:!0});Xt.headStream=void 0;Xt.headStream=Ji});var Mt=N((bt)=>{Object.defineProperty(bt,"__esModule",{value:!0});bt.headStream=void 0;var Ai=import.meta.require("stream"),Wi=At(),bi=P(),Bi=(n,c)=>{if(bi.isReadableStream(n))return Wi.headStream(n,c);return new Promise((t,f)=>{const h=new Wt;h.limit=c,n.pipe(h),n.on("error",(i)=>{h.end(),f(i)}),h.on("error",f),h.on("finish",function(){const i=new Uint8Array(Buffer.concat(this.buffers));t(i)})})};bt.headStream=Bi;class Wt extends Ai.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(n,c,t){var f;if(this.buffers.push(n),this.bytesBuffered+=(f=n.byteLength)!==null&&f!==void 0?f:0,this.bytesBuffered>=this.limit){const h=this.bytesBuffered-this.limit,i=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=i.subarray(0,i.byteLength-h),this.emit("finish")}t()}}});var lt=N((cs,b)=>{var Ht=function(n,c="utf-8"){if(c==="base64")return Rt.toBase64(n);return jt.toUtf8(n)},Pt=function(n,c){if(c==="base64")return Yn.mutate(Rt.fromBase64(n));return Yn.mutate(jt.fromUtf8(n))},un=Object.defineProperty,Mi=Object.getOwnPropertyDescriptor,Ri=Object.getOwnPropertyNames,ji=Object.prototype.hasOwnProperty,zn=(n,c)=>un(n,"name",{value:c,configurable:!0}),Hi=(n,c)=>{for(var t in c)un(n,t,{get:c[t],enumerable:!0})},Sn=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Ri(c))if(!ji.call(n,h)&&h!==t)un(n,h,{get:()=>c[h],enumerable:!(f=Mi(c,h))||f.enumerable})}return n},e=(n,c,t)=>(Sn(n,c,"default"),t&&Sn(t,c,"default")),Pi=(n)=>Sn(un({},"__esModule",{value:!0}),n),W={};Hi(W,{Uint8ArrayBlobAdapter:()=>Yn});b.exports=Pi(W);var Rt=nn(),jt=m();zn(Ht,"transformToString");zn(Pt,"transformFromString");var et=class n extends Uint8Array{static fromString(c,t="utf-8"){switch(typeof c){case"string":return Pt(c,t);default:throw new Error(`Unsupported conversion from ${typeof c} to Uint8ArrayBlobAdapter.`)}}static mutate(c){return Object.setPrototypeOf(c,n.prototype),c}transformToString(c="utf-8"){return Ht(this,c)}};zn(et,"Uint8ArrayBlobAdapter");var Yn=et;e(W,Cc(),b.exports);e(W,St(),b.exports);e(W,Qt(),b.exports);e(W,Mt(),b.exports);e(W,P(),b.exports)});var Pn=Q(xn(),1);class Nf{constructor(n){this.config=n,this.middlewareStack=Pn.constructStack()}send(n,c,t){const f=typeof c!=="function"?c:void 0,h=typeof c==="function"?c:t,i=f===void 0&&this.config.cacheMiddleware===!0;let r;if(i){if(!this.handlers)this.handlers=new WeakMap;const s=this.handlers;if(s.has(n.constructor))r=s.get(n.constructor);else r=n.resolveMiddleware(this.middlewareStack,this.config,f),s.set(n.constructor,r)}else delete this.handlers,r=n.resolveMiddleware(this.middlewareStack,this.config,f);if(h)r(n).then((s)=>h(null,s.output),(s)=>h(s)).catch(()=>{});else return r(n).then((s)=>s.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var en=Q(xn(),1),ln=Q(p(),1);class kn{constructor(){this.middlewareStack=en.constructStack()}static classBuilder(){return new On}resolveMiddlewareWithContext(n,c,t,{middlewareFn:f,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:u,additionalContext:x,CommandCtor:y}){for(let o of f.bind(this)(y,n,c,t))this.middlewareStack.use(o);const w=n.concat(this.middlewareStack),{logger:d}=c,T={logger:d,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[ln.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...x},{requestHandler:U}=c;return w.resolve((o)=>U.handle(o.request,t||{}),T)}}class On{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(n)=>n,this._outputFilterSensitiveLog=(n)=>n,this._serializer=null,this._deserializer=null}init(n){this._init=n}ep(n){return this._ep=n,this}m(n){return this._middlewareFn=n,this}s(n,c,t={}){return this._smithyContext={service:n,operation:c,...t},this}c(n={}){return this._additionalContext=n,this}n(n,c){return this._clientName=n,this._commandName=c,this}f(n=(t)=>t,c=(t)=>t){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=c,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){const n=this;let c;return c=class extends kn{static getEndpointParameterInstructions(){return n._ep}constructor(...[t]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=t??{},n._init(this)}resolveMiddleware(t,f,h){return this.resolveMiddlewareWithContext(t,f,h,{CommandCtor:c,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var Zr="***SensitiveInformation***";var Kr=(n,c)=>{for(let t of Object.keys(n)){const f=n[t],h=async function(r,s,u){const x=new f(r);if(typeof s==="function")this.send(x,s);else if(typeof u==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(x,s||{},u)}else return this.send(x,s)},i=(t[0].toLowerCase()+t.slice(1)).replace(/Command$/,"");c.prototype[i]=h}};class pn extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,pn.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var vn=(n,c={})=>{Object.entries(c).filter(([,f])=>f!==void 0).forEach(([f,h])=>{if(n[f]==null||n[f]==="")n[f]=h});const t=n.message||n.Message||"UnknownError";return n.message=t,delete n.Message,n};class gf{trace(){}debug(){}info(){}warn(){}error(){}}var wn=Q(lt(),1),ts=async(n=new Uint8Array,c)=>{if(n instanceof Uint8Array)return wn.Uint8ArrayBlobAdapter.mutate(n);if(!n)return wn.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const t=c.streamCollector(n);return wn.Uint8ArrayBlobAdapter.mutate(await t)};var hs=(n)=>{switch(n){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${n}"`)}};var ei=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){const c=parseFloat(n);if(!Number.isNaN(c)){if(String(c)!==String(n))_t.warn(mt(`Expected number but observed string: ${n}`));return c}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},li=Math.ceil(340282346638528860000000000000000000000),kt=(n)=>{const c=ei(n);if(c!==void 0&&!Number.isNaN(c)&&c!==Infinity&&c!==(-Infinity)){if(Math.abs(c)>li)throw new TypeError(`Expected 32-bit float, got ${n}`)}return c},Vn=(n)=>{if(n===null||n===void 0)return;if(Number.isInteger(n)&&!Number.isNaN(n))return n;throw new TypeError(`Expected integer, got ${typeof n}: ${n}`)};var Ot=(n)=>Zn(n,32),pt=(n)=>Zn(n,16),vt=(n)=>Zn(n,8),Zn=(n,c)=>{const t=Vn(n);if(t!==void 0&&ki(t,c)!==t)throw new TypeError(`Expected ${c}-bit integer, got ${n}`);return t},ki=(n,c)=>{switch(c){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},is=(n,c)=>{if(n===null||n===void 0){if(c)throw new TypeError(`Expected a non-null value for ${c}`);throw new TypeError("Expected a non-null value")}return n},rs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;const c=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${c}: ${n}`)},ss=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return _t.warn(mt(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var qt=(n)=>{if(typeof n=="string")return kt(l(n));return kt(n)},Oi=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,l=(n)=>{const c=n.match(Oi);if(c===null||c[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var us=(n)=>{if(typeof n==="string")return Vn(l(n));return Vn(n)};var ws=(n)=>{if(typeof n==="string")return Ot(l(n));return Ot(n)},B=(n)=>{if(typeof n==="string")return pt(l(n));return pt(n)},at=(n)=>{if(typeof n==="string")return vt(l(n));return vt(n)},mt=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((c)=>!c.includes("stackTraceWarning")).join("\n")},_t={warn:console.warn};function ds(n){const c=n.getUTCFullYear(),t=n.getUTCMonth(),f=n.getUTCDay(),h=n.getUTCDate(),i=n.getUTCHours(),r=n.getUTCMinutes(),s=n.getUTCSeconds(),u=h<10?`0${h}`:`${h}`,x=i<10?`0${i}`:`${i}`,y=r<10?`0${r}`:`${r}`,w=s<10?`0${s}`:`${s}`;return`${pi[f]}, ${u} ${Kn[t]} ${c} ${x}:${y}:${w} GMT`}var pi=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Kn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],vi=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Es=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const c=vi.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");const[t,f,h,i,r,s,u,x]=c,y=B(M(f)),w=Z(h,"month",1,12),d=Z(i,"day",1,31);return k(y,w,d,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:x})},qi=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Fs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const c=qi.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");const[t,f,h,i,r,s,u,x,y]=c,w=B(M(f)),d=Z(h,"month",1,12),T=Z(i,"day",1,31),U=k(w,d,T,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:x});if(y.toUpperCase()!="Z")U.setTime(U.getTime()-sr(y));return U},ai=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$/),mi=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$/),_i=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})$/),Cs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let c=ai.exec(n);if(c){const[t,f,h,i,r,s,u,x]=c;return k(B(M(i)),Gn(h),Z(f,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:x})}if(c=mi.exec(n),c){const[t,f,h,i,r,s,u,x]=c;return tr(k(nr(i),Gn(h),Z(f,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:x}))}if(c=_i.exec(n),c){const[t,f,h,i,r,s,u,x]=c;return k(B(M(x)),Gn(f),Z(h.trimLeft(),"day",1,31),{hours:i,minutes:r,seconds:s,fractionalMilliseconds:u})}throw new TypeError("Invalid RFC-7231 date-time value")};var k=(n,c,t,f)=>{const h=c-1;return hr(n,h,t),new Date(Date.UTC(n,h,t,Z(f.hours,"hour",0,23),Z(f.minutes,"minute",0,59),Z(f.seconds,"seconds",0,60),rr(f.fractionalMilliseconds)))},nr=(n)=>{const c=(new Date()).getUTCFullYear(),t=Math.floor(c/100)*100+B(M(n));if(t<c)return t+100;return t},cr=1576800000000,tr=(n)=>{if(n.getTime()-(new Date()).getTime()>cr)return new Date(Date.UTC(n.getUTCFullYear()-100,n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()));return n},Gn=(n)=>{const c=Kn.indexOf(n);if(c<0)throw new TypeError(`Invalid month: ${n}`);return c+1},fr=[31,28,31,30,31,30,31,31,30,31,30,31],hr=(n,c,t)=>{let f=fr[c];if(c===1&&ir(n))f=29;if(t>f)throw new TypeError(`Invalid day for ${Kn[c]} in ${n}: ${t}`)},ir=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},Z=(n,c,t,f)=>{const h=at(M(n));if(h<t||h>f)throw new TypeError(`${c} must be between ${t} and ${f}, inclusive`);return h},rr=(n)=>{if(n===null||n===void 0)return 0;return qt("0."+n)*1000},sr=(n)=>{const c=n[0];let t=1;if(c=="+")t=1;else if(c=="-")t=-1;else throw new TypeError(`Offset direction, ${c}, must be "+" or "-"`);const f=Number(n.substring(1,3)),h=Number(n.substring(4,6));return t*(f*60+h)*60*1000},M=(n)=>{let c=0;while(c<n.length-1&&n.charAt(c)==="0")c++;if(c===0)return n;return n.slice(c)};var ur=({output:n,parsedBody:c,exceptionCtor:t,errorCode:f})=>{const h=wr(n),i=h.httpStatusCode?h.httpStatusCode+"":void 0,r=new t({name:c?.code||c?.Code||f||i||"UnknownError",$fault:"client",$metadata:h});throw vn(r,c)},ys=(n)=>{return({output:c,parsedBody:t,errorCode:f})=>{ur({output:c,parsedBody:t,exceptionCtor:n,errorCode:f})}},wr=(n)=>({httpStatusCode:n.statusCode,requestId:n.headers["x-amzn-requestid"]??n.headers["x-amzn-request-id"]??n.headers["x-amz-request-id"],extendedRequestId:n.headers["x-amz-id-2"],cfId:n.headers["x-amz-cf-id"]});var Ls=(n)=>{switch(n){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var nf=!1,Ns=(n)=>{if(n&&!nf&&parseInt(n.substring(1,n.indexOf(".")))<16)nf=!0};var Qn=Q(p(),1);var cf=(n)=>{const c=[];for(let t in Qn.AlgorithmId){const f=Qn.AlgorithmId[t];if(n[f]===void 0)continue;c.push({algorithmId:()=>f,checksumConstructor:()=>n[f]})}return{_checksumAlgorithms:c,addChecksumAlgorithm(t){this._checksumAlgorithms.push(t)},checksumAlgorithms(){return this._checksumAlgorithms}}},tf=(n)=>{const c={};return n.checksumAlgorithms().forEach((t)=>{c[t.algorithmId()]=t.checksumConstructor()}),c};var ff=(n)=>{let c=n.retryStrategy;return{setRetryStrategy(t){c=t},retryStrategy(){return c}}},hf=(n)=>{const c={};return c.retryStrategy=n.retryStrategy(),c};var Zs=(n)=>{return{...cf(n),...ff(n)}};var Gs=(n)=>{return{...tf(n),...hf(n)}};function Tr(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})}var Xn=function(){const n=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,n.prototype),t};Xn.prototype=Object.create(String.prototype,{constructor:{value:Xn,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Xn,String);function $r(n,c,t){let f,h,i;if(typeof c==="undefined"&&typeof t==="undefined")f={},i=n;else if(f=n,typeof c==="function")return h=c,i=t,xr(f,h,i);else i=c;for(let r of Object.keys(i)){if(!Array.isArray(i[r])){f[r]=i[r];continue}rf(f,null,i,r)}return f}var Bs=(n,c)=>{const t={};for(let f in c)rf(t,n,c,f);return t},xr=(n,c,t)=>{return $r(n,Object.entries(t).reduce((f,[h,i])=>{if(Array.isArray(i))f[h]=i;else if(typeof i==="function")f[h]=[c,i()];else f[h]=[c,i];return f},{}))},rf=(n,c,t,f)=>{if(c!==null){let r=t[f];if(typeof r==="function")r=[,r];const[s=dr,u=Er,x=f]=r;if(typeof s==="function"&&s(c[x])||typeof s!=="function"&&!!s)n[f]=u(c[x]);return}let[h,i]=t[f];if(typeof i==="function"){let r;const s=h===void 0&&(r=i())!=null,u=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(s)n[f]=r;else if(u)n[f]=i()}else{const r=h===void 0&&i!=null,s=typeof h==="function"&&!!h(i)||typeof h!=="function"&&!!h;if(r||s)n[f]=i}},dr=(n)=>n!=null,Er=(n)=>n;var Hs=(n)=>n.toISOString().replace(".000Z","Z");var sf=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((c)=>c!=null).map(sf);if(typeof n==="object"){const c={};for(let t of Object.keys(n)){if(n[t]==null)continue;c[t]=sf(n[t])}return c}return n};var F0=(n)=>{let c=n.httpHandler;return{setHttpHandler(t){c=t},httpHandler(){return c},updateHttpClientConfig(t,f){c.updateHttpClientConfig(t,f)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},C0=(n)=>{return{httpHandler:n.httpHandler()}};var Fr=Q(p(),1);var Cr=function(n){return Object.keys(n).reduce((c,t)=>{const f=n[t];return{...c,[t]:Array.isArray(f)?[...f]:f}},{})};class Jn{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){const c=new Jn({...n,headers:{...n.headers}});if(c.query)c.query=Cr(c.query);return c}static isInstance(n){if(!n)return!1;const c=n;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return Jn.clone(this)}}class Tn{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;const c=n;return typeof c.statusCode==="number"&&typeof c.headers==="object"}}var Ff=Q(j(),1);import{Agent as df,request as yr} from"http";import{Agent as Ef,request as or} from"https";var uf=["ECONNRESET","EPIPE","ETIMEDOUT"];var An=(n)=>{const c={};for(let t of Object.keys(n)){const f=n[t];c[t]=Array.isArray(f)?f.join(","):f}return c};var wf=(n,c,t=0)=>{if(!t)return-1;const f=(h)=>{const i=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${t} ms`),{name:"TimeoutError"}))},t-h),r=(s)=>{if(s?.connecting)s.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)};if(n.socket)r(n.socket);else n.on("socket",r)};if(t<2000)return f(0),0;return setTimeout(f.bind(null,1000),1000)};var Tf=(n,{keepAlive:c,keepAliveMsecs:t},f=3000)=>{if(c!==!0)return-1;const h=()=>{if(n.socket)n.socket.setKeepAlive(c,t||0);else n.on("socket",(i)=>{i.setKeepAlive(c,t||0)})};if(f===0)return h(),0;return setTimeout(h,f)};var $f=(n,c,t=0)=>{const f=(h)=>{n.setTimeout(t-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${t} ms`),{name:"TimeoutError"}))})};if(0<t&&t<6000)return f(0),0;return setTimeout(f.bind(null,t===0?0:3000),3000)};import{Readable as Ur} from"stream";async function Wn(n,c,t=xf){const f=c.headers??{},h=f.Expect||f.expect;let i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(xf,t)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)Ir(n,c.body)}var Ir=function(n,c){if(c instanceof Ur){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}const t=c;if(typeof t==="object"&&t.buffer&&typeof t.byteOffset==="number"&&typeof t.byteLength==="number"){n.end(Buffer.from(t.buffer,t.byteOffset,t.byteLength));return}n.end(Buffer.from(c));return}n.end()},xf=1000;class bn{static create(n){if(typeof n?.handle==="function")return n;return new bn(n)}static checkSocketUsage(n,c,t=console){const{sockets:f,requests:h,maxSockets:i}=n;if(typeof i!=="number"||i===Infinity)return c;const r=15000;if(Date.now()-r<c)return c;if(f&&h)for(let s in f){const u=f[s]?.length??0,x=h[s]?.length??0;if(u>=i&&x>=2*i)return t?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${u} and ${x} additional requests are enqueued.
4
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
5
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return c}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,t)=>{if(typeof n==="function")n().then((f)=>{c(this.resolveDefaultConfig(f))}).catch(t);else c(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){const{requestTimeout:c,connectionTimeout:t,socketTimeout:f,httpAgent:h,httpsAgent:i}=n||{};return{connectionTimeout:t,requestTimeout:c??f,httpAgent:(()=>{if(h instanceof df||typeof h?.destroy==="function")return h;return new df({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(i instanceof Ef||typeof i?.destroy==="function")return i;return new Ef({keepAlive:!0,maxSockets:50,...i})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;return new Promise((t,f)=>{let h=void 0;const i=[],r=async($)=>{await h,i.forEach(clearTimeout),t($)},s=async($)=>{await h,i.forEach(clearTimeout),f($)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c?.aborted){const $=new Error("Request aborted");$.name="AbortError",s($);return}const u=n.protocol==="https:",x=u?this.config.httpsAgent:this.config.httpAgent;i.push(setTimeout(()=>{this.socketWarningTimestamp=bn.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const y=Ff.buildQueryString(n.query||{});let w=void 0;if(n.username!=null||n.password!=null){const $=n.username??"",E=n.password??"";w=`${$}:${E}`}let d=n.path;if(y)d+=`?${y}`;if(n.fragment)d+=`#${n.fragment}`;let T=n.hostname??"";if(T[0]==="["&&T.endsWith("]"))T=n.hostname.slice(1,-1);else T=n.hostname;const U={headers:n.headers,host:T,method:n.method,path:d,port:n.port,agent:x,auth:w},F=(u?or:yr)(U,($)=>{const E=new Tn({statusCode:$.statusCode||-1,reason:$.statusMessage,headers:An($.headers),body:$});r({response:E})});if(F.on("error",($)=>{if(uf.includes($.code))s(Object.assign($,{name:"TimeoutError"}));else s($)}),c){const $=()=>{F.destroy();const E=new Error("Request aborted");E.name="AbortError",s(E)};if(typeof c.addEventListener==="function"){const E=c;E.addEventListener("abort",$,{once:!0}),F.once("close",()=>E.removeEventListener("abort",$))}else c.onabort=$}i.push(wf(F,s,this.config.connectionTimeout)),i.push($f(F,s,this.config.requestTimeout));const C=U.agent;if(typeof C==="object"&&"keepAlive"in C)i.push(Tf(F,{keepAlive:C.keepAlive,keepAliveMsecs:C.keepAliveMsecs}));h=Wn(F,n,this.config.requestTimeout).catch(($)=>{return i.forEach(clearTimeout),f($)})})}updateHttpClientConfig(n,c){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return{...t,[n]:c}})}httpHandlerConfigs(){return this.config??{}}}var Lr=Q(j(),1);import{Writable as Dr} from"stream";class Bn extends Dr{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,c,t){this.bufferedBytes.push(n),t()}}async function gr(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var Tu=(n)=>{if(Nr(n))return gr(n);return new Promise((c,t)=>{const f=new Bn;n.pipe(f),n.on("error",(h)=>{f.end(),t(h)}),f.on("error",t),f.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},Nr=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;export{F0 as Ga,C0 as Ha,Jn as Ia,Tn as Ja,mn as Ka,R as La,m as Ma,gf as Na,xn as Oa,Nf as Pa,nn as Qa,Un as Ra,Zc as Sa,dt as Ta,lt as Ua,ts as Va,kn as Wa,Zr as Xa,Kr as Ya,hs as Za,Vn as _a,Ot as $a,is as ab,rs as bb,ss as cb,us as db,ws as eb,ds as fb,Es as gb,Fs as hb,Cs as ib,pn as jb,vn as kb,ys as lb,Ls as mb,Ns as nb,Zs as ob,Gs as pb,Tr as qb,$r as rb,Bs as sb,Hs as tb,sf as ub,bn as vb,Tu as wb};
6
+
7
+ //# debugId=23556F614D64867764756e2164756e21