@kya-os/mcp-i 1.9.0 → 1.11.0

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 (62) hide show
  1. package/dist/227.js +1 -0
  2. package/dist/{263.js → 242.js} +1 -1
  3. package/dist/283.js +1 -0
  4. package/dist/317.js +1 -0
  5. package/dist/354.js +1 -0
  6. package/dist/361.js +1 -0
  7. package/dist/452.js +1 -0
  8. package/dist/533.js +1 -0
  9. package/dist/622.js +1 -0
  10. package/dist/65.js +1 -0
  11. package/dist/839.js +1 -0
  12. package/dist/843.js +1 -0
  13. package/dist/{644.js → 861.js} +1 -1
  14. package/dist/914.js +1 -0
  15. package/dist/95.js +1 -0
  16. package/dist/cli-adapter/index.js +1 -1
  17. package/dist/runtime/102.js +1 -0
  18. package/dist/runtime/adapter-express.js +3 -3
  19. package/dist/runtime/adapter-nextjs.js +5 -5
  20. package/dist/runtime/audit.d.ts +1 -1
  21. package/dist/runtime/debug.d.ts +1 -1
  22. package/dist/runtime/debug.js +3 -2
  23. package/dist/runtime/delegation-hooks.d.ts +1 -1
  24. package/dist/runtime/http.js +3 -3
  25. package/dist/runtime/identity.d.ts +4 -4
  26. package/dist/runtime/identity.js +4 -4
  27. package/dist/runtime/index.d.ts +6 -2
  28. package/dist/runtime/index.js +10 -2
  29. package/dist/runtime/mcpi-runtime.d.ts +9 -1
  30. package/dist/runtime/mcpi-runtime.js +20 -3
  31. package/dist/runtime/outbound-delegation.d.ts +5 -3
  32. package/dist/runtime/outbound-delegation.js +14 -8
  33. package/dist/runtime/outbound-identity-bridge.d.ts +40 -0
  34. package/dist/runtime/outbound-identity-bridge.js +114 -0
  35. package/dist/runtime/proof-batch-queue.d.ts +1 -1
  36. package/dist/runtime/request-context.d.ts +10 -0
  37. package/dist/runtime/request-context.js +4 -0
  38. package/dist/runtime/resume-token-store-kv.d.ts +44 -0
  39. package/dist/runtime/resume-token-store-kv.js +93 -0
  40. package/dist/runtime/resume-token-store.d.ts +30 -0
  41. package/dist/runtime/resume-token-store.js +46 -0
  42. package/dist/runtime/session.js +6 -0
  43. package/dist/runtime/stdio.js +3 -3
  44. package/dist/runtime/utils/tools.d.ts +1 -1
  45. package/dist/runtime/utils/tools.js +29 -7
  46. package/dist/runtime/well-known.d.ts +12 -1
  47. package/dist/runtime/well-known.js +13 -2
  48. package/package.json +7 -5
  49. package/dist/114.js +0 -1
  50. package/dist/139.js +0 -1
  51. package/dist/200.js +0 -1
  52. package/dist/202.js +0 -1
  53. package/dist/238.js +0 -1
  54. package/dist/294.js +0 -1
  55. package/dist/374.js +0 -1
  56. package/dist/529.js +0 -1
  57. package/dist/627.js +0 -1
  58. package/dist/669.js +0 -1
  59. package/dist/857.js +0 -1
  60. package/dist/997.js +0 -1
  61. package/dist/runtime/verifier-middleware.d.ts +0 -99
  62. package/dist/runtime/verifier-middleware.js +0 -416
@@ -2,7 +2,7 @@ import { Server as McpServer } from "@modelcontextprotocol/sdk/server/index.js";
2
2
  import { ZodTypeAny } from "zod";
3
3
  import { ToolFile } from "./server";
4
4
  import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
5
- import { DetachedProof } from "@kya-os/contracts/proof";
5
+ import type { DetachedProof } from "@kya-os/mcp/types" with { "resolution-mode": "import" };
6
6
  import { type ClientMessagesConfig } from "@kya-os/mcp-i-core";
7
7
  export type ZodRawShape = {
8
8
  [k: string]: ZodTypeAny;
@@ -8,7 +8,9 @@ const tool_protection_registry_1 = require("../tool-protection-registry");
8
8
  const auth_handshake_1 = require("../auth-handshake");
9
9
  const session_1 = require("../session");
10
10
  const request_context_1 = require("../request-context");
11
+ const outbound_identity_bridge_1 = require("../outbound-identity-bridge");
11
12
  const mcp_i_core_1 = require("@kya-os/mcp-i-core");
13
+ // C2/C3: @kya-os/mcp-i is CJS; @kya-os/mcp is ESM-only (TS1479 blocks static import).
12
14
  const proof_batch_queue_1 = require("../proof-batch-queue");
13
15
  const mcp_i_core_2 = require("@kya-os/mcp-i-core");
14
16
  /**
@@ -18,13 +20,13 @@ const mcp_i_core_2 = require("@kya-os/mcp-i-core");
18
20
  */
19
21
  function formatAuthInfo(auth) {
20
22
  let result = auth.type;
21
- if ('provider' in auth && auth.provider) {
23
+ if ("provider" in auth && auth.provider) {
22
24
  result += `:${auth.provider}`;
23
25
  }
24
- if ('issuer' in auth && auth.issuer) {
26
+ if ("issuer" in auth && auth.issuer) {
25
27
  result += `:${auth.issuer}`;
26
28
  }
27
- if ('credentialType' in auth && auth.credentialType) {
29
+ if ("credentialType" in auth && auth.credentialType) {
28
30
  result += `:${auth.credentialType}`;
29
31
  }
30
32
  return result;
@@ -251,7 +253,7 @@ async function addToolsToServer(server, toolModules, identityConfig, clientMessa
251
253
  // Add internal handshake tool for MCP-I session establishment
252
254
  // This allows MCP clients to perform a handshake and receive a sessionId
253
255
  const handshakeTool = {
254
- name: "_mcpi_handshake",
256
+ name: "_kyaos_handshake",
255
257
  description: "Internal MCP-I handshake tool for session establishment. Clients should call this before protected tools.",
256
258
  inputSchema: {
257
259
  type: "object",
@@ -293,8 +295,10 @@ async function addToolsToServer(server, toolModules, identityConfig, clientMessa
293
295
  },
294
296
  };
295
297
  tools.push(handshakeTool);
296
- // Handshake tool handler
297
- toolHandlers.set("_mcpi_handshake", async (args) => {
298
+ // Handshake tool handler. Registered under the canonical `_kyaos_` name; the
299
+ // dispatch lookup normalizes a legacy `_mcpi_handshake` call to this key
300
+ // (C4 #2918 dual-accept).
301
+ toolHandlers.set("_kyaos_handshake", async (args) => {
298
302
  // Validate required fields explicitly before conversion
299
303
  const missingFields = [];
300
304
  if (!args.nonce ||
@@ -427,7 +431,16 @@ async function addToolsToServer(server, toolModules, identityConfig, clientMessa
427
431
  requestId: request._meta?.requestId,
428
432
  startTime: Date.now(),
429
433
  }, async () => {
430
- const { name, arguments: args } = request.params;
434
+ const { name: rawName, arguments: args } = request.params;
435
+ // C4 (#2918) dual-accept: normalize a legacy `_mcpi_*` internal tool
436
+ // name to its canonical `_kyaos_*` form before dispatch, and count the
437
+ // wire form for the sunset gate. Ordinary tool names pass through.
438
+ const name = (0, mcp_i_core_2.normalizeInternalToolName)(rawName);
439
+ if ((0, mcp_i_core_2.isInternalToolName)(rawName)) {
440
+ (0, mcp_i_core_2.recordWireForm)("tool_name", name === rawName ? "new" : "old", {
441
+ tool: name,
442
+ });
443
+ }
431
444
  const handler = toolHandlers.get(name);
432
445
  if (!handler) {
433
446
  return {
@@ -626,9 +639,18 @@ async function addToolsToServer(server, toolModules, identityConfig, clientMessa
626
639
  delegationId: verifyResult.delegation.id,
627
640
  delegationChain: (0, mcp_i_core_1.buildChainString)(verifyResult.delegation),
628
641
  delegationScopes: toolProtection.requiredScopes || [],
642
+ // JWS-compact DelegationCredential VC from the verified
643
+ // result — emitted on KYA-OS-Delegation-Credential when the
644
+ // verifier returned a presentable credential.
645
+ delegationCredential: verifyResult.credential?.credential_jwt,
629
646
  identity: identity ?? null,
630
647
  });
631
648
  }
649
+ // Bridge this AsyncLocalStorage context into the compute
650
+ // outbound-identity interceptor (OpenClaw sidecar path) when it is
651
+ // present in-process. Idempotent + best-effort: a no-op on
652
+ // deployments without the compute interceptor.
653
+ (0, outbound_identity_bridge_1.ensureOutboundIdentityBridge)();
632
654
  }
633
655
  try {
634
656
  // Execute the tool handler
@@ -1,8 +1,19 @@
1
1
  /**
2
- * Well-Known Endpoints for XMCP-I Runtime
2
+ * Well-Known Endpoints for the KYA-OS / MCP Runtime
3
3
  *
4
4
  * Handles /.well-known/did.json and /.well-known/agent.json endpoints
5
5
  * according to requirements 7.1, 7.2, 7.3, 7.4, 7.5.
6
+ *
7
+ * C2 (#2916) classification: **product-layer, stays product-side.** The DIF
8
+ * `@kya-os/mcp` core does not generate `.well-known` manifests, and its
9
+ * `buildDidWebDocument` is intentionally NOT adopted here: it produces a
10
+ * byte-different DID document (full `kid` rather than a `#fragment`
11
+ * verification-method id, emits both `publicKeyJwk` and `publicKeyMultibase`,
12
+ * and requires a `did:web` DID). `did.json` is a W3C-standard wire artifact
13
+ * that must stay byte-stable, so this generator is left in place and its wire
14
+ * output is frozen by `__tests__/well-known-wire-freeze.test.ts`. Any future
15
+ * relocation/rename is gated by the C4 (#2918) dual-accept window — never
16
+ * change the `.well-known/did.json` path.
6
17
  */
7
18
  import { AgentIdentity } from "./identity";
8
19
  /**
@@ -1,9 +1,20 @@
1
1
  "use strict";
2
2
  /**
3
- * Well-Known Endpoints for XMCP-I Runtime
3
+ * Well-Known Endpoints for the KYA-OS / MCP Runtime
4
4
  *
5
5
  * Handles /.well-known/did.json and /.well-known/agent.json endpoints
6
6
  * according to requirements 7.1, 7.2, 7.3, 7.4, 7.5.
7
+ *
8
+ * C2 (#2916) classification: **product-layer, stays product-side.** The DIF
9
+ * `@kya-os/mcp` core does not generate `.well-known` manifests, and its
10
+ * `buildDidWebDocument` is intentionally NOT adopted here: it produces a
11
+ * byte-different DID document (full `kid` rather than a `#fragment`
12
+ * verification-method id, emits both `publicKeyJwk` and `publicKeyMultibase`,
13
+ * and requires a `did:web` DID). `did.json` is a W3C-standard wire artifact
14
+ * that must stay byte-stable, so this generator is left in place and its wire
15
+ * output is frozen by `__tests__/well-known-wire-freeze.test.ts`. Any future
16
+ * relocation/rename is gated by the C4 (#2918) dual-accept window — never
17
+ * change the `.well-known/did.json` path.
7
18
  */
8
19
  Object.defineProperty(exports, "__esModule", { value: true });
9
20
  exports.WellKnownManager = void 0;
@@ -15,7 +26,7 @@ exports.extractDIDFromPath = extractDIDFromPath;
15
26
  // eslint-disable-next-line @typescript-eslint/no-var-requires
16
27
  const baseX = require("base-x");
17
28
  const base58 = baseX.default || baseX;
18
- const base58Encoder = base58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');
29
+ const base58Encoder = base58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
19
30
  /**
20
31
  * Well-known endpoints manager
21
32
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/mcp-i",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "description": "The TypeScript MCP framework with identity features built-in",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -63,14 +63,15 @@
63
63
  "model-context-protocol"
64
64
  ],
65
65
  "dependencies": {
66
- "@kya-os/contracts": "^1.7.26",
67
- "@kya-os/mcp-i-core": "^1.6.0",
66
+ "@kya-os/contracts": "^1.8.0",
67
+ "@kya-os/mcp-i-core": "^1.7.0",
68
+ "@kya-os/mcp-i-runtime": "^1.0.0",
68
69
  "@modelcontextprotocol/sdk": "^1.11.4",
69
70
  "@swc/core": "^1.15.11",
70
71
  "@types/express": "^5.0.6",
71
72
  "@types/webpack-node-externals": "^3.0.4",
72
73
  "@vercel/mcp-adapter": "^0.11.1",
73
- "axios": "^1.13.5",
74
+ "axios": "^1.16.1",
74
75
  "base-x": "^5.0.1",
75
76
  "chalk": "^5.2.0",
76
77
  "chokidar": "^3.6.0",
@@ -85,7 +86,7 @@
85
86
  "fork-ts-checker-webpack-plugin": "^8.0.0",
86
87
  "fs-extra": "^11.3.3",
87
88
  "glob": "^13.0.3",
88
- "handlebars": "^4.7.7",
89
+ "handlebars": "^4.7.9",
89
90
  "jose": "^5.2.0",
90
91
  "json-canonicalize": "^2.0.0",
91
92
  "json5": "^2.2.3",
@@ -102,6 +103,7 @@
102
103
  "@modelcontextprotocol/inspector": "^0.20.0"
103
104
  },
104
105
  "devDependencies": {
106
+ "@kya-os/mcp": "^1.6.1",
105
107
  "@aws-sdk/client-dynamodb": "^3.992.0",
106
108
  "@types/content-type": "^1.1.9",
107
109
  "@types/fs-extra": "^11.0.4",
package/dist/114.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=114,exports.ids=[114],exports.modules={2114:(e,t,s)=>{s.d(t,{GetRoleCredentialsCommand:()=>z,SSOClient:()=>pt});var r=s(66686),o=s(22869);const n={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var i=s(51453),a=s(6723);class c extends a.T{constructor(e){super(e),Object.setPrototypeOf(this,c.prototype)}}class p extends c{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,p.prototype)}}class d extends c{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,d.prototype)}}class u extends c{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype)}}class l extends c{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,l.prototype)}}const h="client",g="error",m="http",f="httpError",y="httpHeader",S="httpQuery",v="message",P="smithy.ts.sdk.synthetic.com.amazonaws.sso",E="com.amazonaws.sso",x=i.O.for(P);var I=[-3,P,"SSOServiceException",0,[],[]];x.registerError(I,c);const k=i.O.for(E);var R=[-3,E,"InvalidRequestException",{[g]:h,[f]:400},[v],[0]];k.registerError(R,p);var b=[-3,E,"ResourceNotFoundException",{[g]:h,[f]:404},[v],[0]];k.registerError(b,d);var w=[-3,E,"TooManyRequestsException",{[g]:h,[f]:429},[v],[0]];k.registerError(w,u);var A=[-3,E,"UnauthorizedException",{[g]:h,[f]:401},[v],[0]];k.registerError(A,l);const C=[x,k];var D=[0,E,"AccessTokenType",8,0],O=[0,E,"SecretAccessKeyType",8,0],F=[0,E,"SessionTokenType",8,0],T=[3,E,"GetRoleCredentialsRequest",0,["roleName","accountId","accessToken"],[[0,{[S]:"role_name"}],[0,{[S]:"account_id"}],[()=>D,{[y]:"x-amz-sso_bearer_token"}]],3],q=[3,E,"GetRoleCredentialsResponse",0,["roleCredentials"],[[()=>U,0]]],U=[3,E,"RoleCredentials",0,["accessKeyId","secretAccessKey","sessionToken","expiration"],[0,[()=>O,0],[()=>F,0],1]],$=[9,E,"GetRoleCredentials",{[m]:["GET","/federation/credentials",200]},()=>T,()=>q];class z extends(o.u.classBuilder().ep(n).m(function(e,t,s,o){return[(0,r.r)(s,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc($).build()){}var j=s(97040),G=s(74534),M=s(70775),H=s(86693),N=s(66575),Z=s(94615),K=s(45326),L=s(9575),V=s(68249),_=s(75279),B=s(10860),W=s(39412),Y=s(72084),Q=s(10773),J=s(9942),X=s(63089),ee=s(45547),te=s(81974);const se=async(e,t,s)=>({operation:(0,ee.u)(t).operation,region:await(0,te.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),re=e=>{const t=[];switch(e.operation){case"GetRoleCredentials":case"ListAccountRoles":case"ListAccounts":case"Logout":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t};var oe=s(10706),ne=s(56232),ie=s(60803),ae=s(52005),ce=s(96901),pe=s(24661),de=s(46109),ue=s(5012),le=s(7387),he=s(24176),ge=s(64327),me=s(34338),fe=s(57815),ye=s(55425),Se=s(99816),ve=s(48828),Pe=s(70868),Ee=s(80843),xe=s(14433),Ie=s(3761),ke=s(67933),Re=s(12544),be=s(39181),we=s(40935),Ae=s(2914),Ce=s(53037),De=s(48105),Oe=s(1034),Fe=s(7856);const Te="required",qe="fn",Ue="argv",$e="ref",ze=!0,je="isSet",Ge="booleanEquals",Me="error",He="endpoint",Ne="tree",Ze="PartitionResult",Ke="getAttr",Le={[Te]:!1,type:"string"},Ve={[Te]:!0,default:!1,type:"boolean"},_e={[$e]:"Endpoint"},Be={[qe]:Ge,[Ue]:[{[$e]:"UseFIPS"},!0]},We={[qe]:Ge,[Ue]:[{[$e]:"UseDualStack"},!0]},Ye={},Qe={[qe]:Ke,[Ue]:[{[$e]:Ze},"supportsFIPS"]},Je={[$e]:Ze},Xe={[qe]:Ge,[Ue]:[!0,{[qe]:Ke,[Ue]:[Je,"supportsDualStack"]}]},et=[Be],tt=[We],st=[{[$e]:"Region"}],rt={version:"1.0",parameters:{Region:Le,UseDualStack:Ve,UseFIPS:Ve,Endpoint:Le},rules:[{conditions:[{[qe]:je,[Ue]:[_e]}],rules:[{conditions:et,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Me},{conditions:tt,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Me},{endpoint:{url:_e,properties:Ye,headers:Ye},type:He}],type:Ne},{conditions:[{[qe]:je,[Ue]:st}],rules:[{conditions:[{[qe]:"aws.partition",[Ue]:st,assign:Ze}],rules:[{conditions:[Be,We],rules:[{conditions:[{[qe]:Ge,[Ue]:[ze,Qe]},Xe],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ye,headers:Ye},type:He}],type:Ne},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Me}],type:Ne},{conditions:et,rules:[{conditions:[{[qe]:Ge,[Ue]:[Qe,ze]}],rules:[{conditions:[{[qe]:"stringEquals",[Ue]:[{[qe]:Ke,[Ue]:[Je,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:Ye,headers:Ye},type:He},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ye,headers:Ye},type:He}],type:Ne},{error:"FIPS is enabled but this partition does not support FIPS",type:Me}],type:Ne},{conditions:tt,rules:[{conditions:[Xe],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ye,headers:Ye},type:He}],type:Ne},{error:"DualStack is enabled but this partition does not support DualStack",type:Me}],type:Ne},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:Ye,headers:Ye},type:He}],type:Ne}],type:Ne},{error:"Invalid Configuration: Missing Region",type:Me}]},ot=new De.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),nt=(e,t={})=>ot.get(e,()=>(0,Oe.s)(rt,{endpointParams:e,logger:t.logger}));Fe.m.aws=Ce.UF;var it=s(93673),at=s(78646),ct=s(18081);class pt extends J.K{config;constructor(...[e]){const t=(e=>{(0,me.I)(process.version);const t=(0,Se.I)(e),s=()=>t().then(fe.l),r=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Re.E,base64Encoder:e?.base64Encoder??be.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??nt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??re,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Pe.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new xe.m}],logger:e?.logger??new Ie.N,protocol:e?.protocol??Ee.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:C,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ke.D,utf8Decoder:e?.utf8Decoder??we.a,utf8Encoder:e?.utf8Encoder??Ae.P}))(e);(0,oe.I)(process.version);const o={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,le.Z)(ne.$,o),bodyLengthChecker:e?.bodyLengthChecker??ye.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,ie.pf)({serviceId:r.serviceId,clientVersion:"3.990.0"}),maxAttempts:e?.maxAttempts??(0,le.Z)(Y.qs,e),region:e?.region??(0,le.Z)(ce.GG,{...ce.zH,...o}),requestHandler:he.$.create(e?.requestHandler??s),retryMode:e?.retryMode??(0,le.Z)({...Y.kN,default:async()=>(await s()).retryMode||ve.L0},e),sha256:e?.sha256??ue.V.bind(null,"sha256"),streamCollector:e?.streamCollector??ge.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,le.Z)(pe.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,le.Z)(de.Ko,o),userAgentAppId:e?.userAgentAppId??(0,le.Z)(ae.hV,o)}})(e||{});super(t),this.initConfig=t;const s=(r=t,Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}));var r;const o=(0,H.D)(s),n=(0,Y.$z)(o),i=(0,Z.T)(n),a=(0,j.OV)(i),c=((e,t)=>{const s=Object.assign((0,it.R)(e),(0,ct.xA)(e),(0,at.e)(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex(t=>t.schemeId===e.schemeId);-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(s)),Object.assign(e,(0,it.$)(s),(0,ct.uv)(s),(0,at.j)(s),{httpAuthSchemes:(r=s).httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()});var r})((e=>{const t=(0,X.h)(e);return Object.assign(t,{authSchemePreference:(0,te.t)(e.authSchemePreference??[])})})((0,W.C)(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use((0,_.wq)(this.config)),this.middlewareStack.use((0,N.sM)(this.config)),this.middlewareStack.use((0,Q.ey)(this.config)),this.middlewareStack.use((0,B.vK)(this.config)),this.middlewareStack.use((0,j.TC)(this.config)),this.middlewareStack.use((0,G.Y7)(this.config)),this.middlewareStack.use((0,M.n)(this.config)),this.middlewareStack.use((0,K.w)(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async e=>new L.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,V.l)(this.config))}destroy(){super.destroy()}}}};
package/dist/139.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=139,exports.ids=[139],exports.modules={2840:(e,t,r)=>{r.d(t,{k:()=>x});var s=r(50469),i=r(69700);const a="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",n="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",o="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",c="(\\d?\\d)",d="(\\d{4})",l=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),u=new RegExp(`^${a}, ${c} ${n} ${d} ${o} GMT$`),h=new RegExp(`^${a}, ${c}-${n}-(\\d\\d) ${o} GMT$`),f=new RegExp(`^${a} ${n} ( [1-9]|\\d\\d) ${o} ${d}$`),p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function m(e,t,r){const s=Number(e);if(s<t||s>r)throw new Error(`Value ${s} out of range [${t}, ${r}]`)}var g=r(84651),w=r(70764),b=r(12544),y=r(2914),S=r(63282),T=r(26144);class x extends S.f{settings;constructor(e){super(),this.settings=e}read(e,t){const r=s.l.of(e);if(r.isListSchema())return(0,i.G)(t).map(e=>this.read(r.getValueSchema(),e));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??b.E)(t);if(r.isTimestampSchema())switch((0,T.V)(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=l.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,s,i,a,n,o,,c,d]=t;m(s,1,12),m(i,1,31),m(a,0,23),m(n,0,59),m(o,0,60);const u=new Date(Date.UTC(Number(r),Number(s)-1,Number(i),Number(a),Number(n),Number(o),Number(c)?Math.round(1e3*parseFloat(`0.${c}`)):0));if(u.setUTCFullYear(Number(r)),"Z"!=d.toUpperCase()){const[,e,t,r]=/([+-])(\d\d):(\d\d)/.exec(d)||[void 0,"+",0,0],s="-"===e?1:-1;u.setTime(u.getTime()+s*(60*Number(t)*60*1e3+60*Number(r)*1e3))}return u})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,r,s,i,a,n,o,c;if((c=u.exec(e))?[,t,r,s,i,a,n,o]=c:(c=h.exec(e))?([,t,r,s,i,a,n,o]=c,s=(Number(s)+1900).toString()):(c=f.exec(e))&&([,r,t,i,a,n,o,s]=c),s&&n){const e=Date.UTC(Number(s),p.indexOf(r),Number(t),Number(i),Number(a),Number(n),o?Math.round(1e3*parseFloat(`0.${o}`)):0);m(t,1,31),m(i,0,23),m(a,0,59),m(n,0,60);const c=new Date(e);return c.setUTCFullYear(Number(s)),c}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){const e=r.getMergedTraits().mediaType;let s=t;if(e)return r.getMergedTraits().httpHeader&&(s=this.base64ToUtf8(s)),("application/json"===e||e.endsWith("+json"))&&(s=g.A.from(s)),s}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new w.D(t,"bigDecimal"):r.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??y.P)((this.serdeContext?.base64Decoder??b.E)(e))}}},14433:(e,t,r)=>{r.d(t,{m:()=>s});class s{async sign(e,t,r){return e}}},30259:(e,t,r)=>{function s(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}r.d(t,{$:()=>s})},44128:(e,t,r)=>{r.d(t,{c:()=>m});var s=r(64327),i=r(25272),a=r(2203),n=r(12544);var o=r(39181),c=r(92278),d=r(2914);const l=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),u="The stream has already been transformed.",h=e=>{if(!f(e)&&!l(e))throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`);let t=!1;const r=async()=>{if(t)throw new Error(u);return t=!0,await(async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,r)=>{const s=new FileReader;s.onloadend=()=>{if(2!==s.readyState)return r(new Error("Reader aborted too early"));const e=s.result??"",i=e.indexOf(","),a=i>-1?i+1:e.length;t(e.substring(a))},s.onabort=()=>r(new Error("Read aborted")),s.onerror=()=>r(s.error),s.readAsDataURL(e)})}(e),r=(0,n.E)(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let s=!1,i=0;for(;!s;){const{done:e,value:a}=await r.read();a&&(t.push(a),i+=a.length),s=e}const a=new Uint8Array(i);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}(e))(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if("base64"===e)return(0,o.n)(t);if("hex"===e)return(0,c.n)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,d.P)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(u);if(t=!0,f(e))return(e=>{if("function"!=typeof e.stream)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 e.stream()})(e);if(l(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},f=e=>"function"==typeof Blob&&e instanceof Blob,p="The stream has already been transformed.",m=e=>{if(!(e instanceof a.Readable))try{return h(e)}catch(t){throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(p);return t=!0,await(0,s.k)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();return void 0===e||Buffer.isEncoding(e)?(0,i.Q)(t.buffer,t.byteOffset,t.byteLength).toString(e):new TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw new Error(p);if(null!==e.readableFlowing)throw new Error("The stream has been consumed by other callbacks.");if("function"!=typeof a.Readable.toWeb)throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,a.Readable.toWeb(e)}})}},69700:(e,t,r)=>{r.d(t,{G:()=>s});const s=e=>{const t=e.length,r=[];let s,i=!1,a=0;for(let n=0;n<t;++n){const t=e[n];switch(t){case'"':"\\"!==s&&(i=!i);break;case",":i||(r.push(e.slice(a,n)),a=n+1)}s=t}return r.push(e.slice(a)),r.map(e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))})}},80843:(e,t,r)=>{r.d(t,{Y:()=>N});var s=r(50469),i=r(76460);function a(e,t,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const s=e.split(t);if(1===r)return s;const i=[];let a="";for(let e=0;e<s.length;e++)""===a?a=s[e]:a+=t+s[e],(e+1)%r===0&&(i.push(a),a="");return""!==a&&i.push(a),i}var n=r(69700),o=r(81781),c=r(44128),d=r(78607),l=r(30259),u=r(98314);class h extends u.t{async serializeRequest(e,t,r){const a={...t??{}},n=this.serializer,c={},d={},u=await r.endpoint(),h=s.l.of(e?.input),f=h.getSchema();let p,m=!1;const g=new o.K({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:c,headers:d,body:void 0});if(u){this.updateServiceEndpoint(g,u),this.setHostPrefix(g,e,a);const t=(0,i.c)(e.traits);if(t.http){g.method=t.http[0];const[e,r]=t.http[1].split("?");"/"==g.path?g.path=e:g.path+=e;const s=new URLSearchParams(r??"");Object.assign(c,Object.fromEntries(s))}}for(const[e,t]of h.structIterator()){const r=t.getMergedTraits()??{},s=a[e];if(null!=s||t.isIdempotencyToken())if(r.httpPayload)t.isStreaming()?t.isStructSchema()?a[e]&&(p=await this.serializeEventStream({eventStream:a[e],requestSchema:h})):p=s:(n.write(t,s),p=n.flush()),delete a[e];else if(r.httpLabel){n.write(t,s);const r=n.flush();g.path.includes(`{${e}+}`)?g.path=g.path.replace(`{${e}+}`,r.split("/").map(l.$).join("/")):g.path.includes(`{${e}}`)&&(g.path=g.path.replace(`{${e}}`,(0,l.$)(r))),delete a[e]}else if(r.httpHeader)n.write(t,s),d[r.httpHeader.toLowerCase()]=String(n.flush()),delete a[e];else if("string"==typeof r.httpPrefixHeaders){for(const[e,i]of Object.entries(s)){const s=r.httpPrefixHeaders+e;n.write([t.getValueSchema(),{httpHeader:s}],i),d[s.toLowerCase()]=n.flush()}delete a[e]}else r.httpQuery||r.httpQueryParams?(this.serializeQuery(t,s,c),delete a[e]):m=!0;else if(r.httpLabel&&(g.path.includes(`{${e}+}`)||g.path.includes(`{${e}}`)))throw new Error(`No value provided for input HTTP label: ${e}.`)}return m&&a&&(n.write(f,a),p=n.flush()),g.headers=d,g.query=c,g.body=p,g}serializeQuery(e,t,r){const s=this.serializer,i=e.getMergedTraits();if(i.httpQueryParams){for(const[s,a]of Object.entries(t))if(!(s in r)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...i,httpQuery:s,httpQueryParams:void 0}),this.serializeQuery(t,a,r)}}else if(e.isListSchema()){const a=!!e.getMergedTraits().sparse,n=[];for(const r of t){s.write([e.getValueSchema(),i],r);const t=s.flush();(a||void 0!==t)&&n.push(t)}r[i.httpQuery]=n}else s.write([e,i],t),r[i.httpQuery]=s.flush()}async deserializeResponse(e,t,r){const i=this.deserializer,a=s.l.of(e.output),n={};if(r.statusCode>=300){const s=await(0,d.P)(r.body,t);throw s.byteLength>0&&Object.assign(n,await i.read(15,s)),await this.handleError(e,t,r,n,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in r.headers){const t=r.headers[e];delete r.headers[e],r.headers[e.toLowerCase()]=t}const o=await this.deserializeHttpMessage(a,t,r,n);if(o.length){const e=await(0,d.P)(r.body,t);if(e.byteLength>0){const t=await i.read(a,e);for(const e of o)null!=t[e]&&(n[e]=t[e])}}else o.discardResponseBody&&await(0,d.P)(r.body,t);return n.$metadata=this.deserializeMetadata(r),n}async deserializeHttpMessage(e,t,r,i,o){let l;l=i instanceof Set?o:i;let u=!0;const h=this.deserializer,f=s.l.of(e),p=[];for(const[e,s]of f.structIterator()){const i=s.getMemberTraits();if(i.httpPayload){if(u=!1,s.isStreaming()){const t=s.isStructSchema();l[e]=t?await this.deserializeEventStream({response:r,responseSchema:f}):(0,c.c)(r.body)}else if(r.body){const i=await(0,d.P)(r.body,t);i.byteLength>0&&(l[e]=await h.read(s,i))}}else if(i.httpHeader){const t=String(i.httpHeader).toLowerCase(),o=r.headers[t];if(null!=o)if(s.isListSchema()){const r=s.getValueSchema();let i;r.getMergedTraits().httpHeader=t,i=r.isTimestampSchema()&&4===r.getSchema()?a(o,",",2):(0,n.G)(o);const c=[];for(const e of i)c.push(await h.read(r,e.trim()));l[e]=c}else l[e]=await h.read(s,o)}else if(void 0!==i.httpPrefixHeaders){l[e]={};for(const[t,a]of Object.entries(r.headers))if(t.startsWith(i.httpPrefixHeaders)){const r=s.getValueSchema();r.getMergedTraits().httpHeader=t,l[e][t.slice(i.httpPrefixHeaders.length)]=await h.read(r,a)}}else i.httpResponseCode?l[e]=r.statusCode:p.push(e)}return p.discardResponseBody=u,p}}var f=r(10015);function p(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}var m=r(84651),g=r(34708),w=r(39181),b=r(63282),y=r(26144);class S extends b.f{settings;stringBuffer="";constructor(e){super(),this.settings=e}write(e,t){const r=s.l.of(e);switch(typeof t){case"object":if(null===t)return void(this.stringBuffer="null");if(r.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${r.getName(!0)}`);switch((0,y.V)(r,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=(0,f.JV)(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in t)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??w.n)(t));if(r.isListSchema()&&Array.isArray(t)){let e="";for(const s of t){this.write([r.getValueSchema(),r.getMergedTraits()],s);const t=this.flush();""!==e&&(e+=", "),e+=r.getValueSchema().isTimestampSchema()?t:p(t)}return void(this.stringBuffer=e)}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=r.getMergedTraits().mediaType;let s=t;if(e&&(("application/json"===e||e.endsWith("+json"))&&(s=m.A.from(s)),r.getMergedTraits().httpHeader))return void(this.stringBuffer=(this.serdeContext?.base64Encoder??w.n)(s.toString()));this.stringBuffer=t;break;default:r.isIdempotencyToken()?this.stringBuffer=(0,g.v4)():this.stringBuffer=String(t)}}flush(){const e=this.stringBuffer;return this.stringBuffer="",e}}class T{codecSerializer;stringSerializer;buffer;constructor(e,t,r=new S(t)){this.codecSerializer=e,this.stringSerializer=r}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){const r=s.l.of(e),i=r.getMergedTraits();return i.httpHeader||i.httpLabel||i.httpQuery?(this.stringSerializer.write(r,t),void(this.buffer=this.stringSerializer.flush())):this.codecSerializer.write(r,t)}flush(){if(void 0!==this.buffer){const e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}var x=r(2914),v=r(40935),E=r(2840);class z extends b.f{codecDeserializer;stringDeserializer;constructor(e,t){super(),this.codecDeserializer=e,this.stringDeserializer=new E.k(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){const r=s.l.of(e),i=r.getMergedTraits(),a=this.serdeContext?.utf8Encoder??x.P;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(r,a(t));if(i.httpPayload){if(r.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??v.a;return"string"==typeof t?e(t):t}if(r.isStringSchema())return"byteLength"in t?a(t):t}return this.codecDeserializer.read(r,t)}}var C=r(51453),$=r(27696),B=r(60262),M=r(66230);class N extends h{serializer;deserializer;codec;mixin=new $.U;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new B.V(t),this.serializer=new T(this.codec.createSerializer(),t),this.deserializer=new z(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,r){const i=await super.serializeRequest(e,t,r),a=s.l.of(e.input);if(!i.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),a);e&&(i.headers["content-type"]=e)}return null==i.body&&i.headers["content-type"]===this.getDefaultContentType()&&(i.body="{}"),i}async deserializeResponse(e,t,r){const i=await super.deserializeResponse(e,t,r),a=s.l.of(e.output);for(const[e,t]of a.structIterator())t.getMemberTraits().httpPayload&&!(e in i)&&(i[e]=null);return i}async handleError(e,t,r,i,a){const n=(0,M.cJ)(r,i)??"Unknown",{errorSchema:o,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(n,this.options.defaultNamespace,r,i,a),d=s.l.of(o),l=i.message??i.Message??"Unknown",u=new(C.O.for(o[1]).getErrorCtor(o)??Error)(l);await this.deserializeHttpMessage(o,t,r,i);const h={};for(const[e,t]of d.structIterator()){const r=t.getMergedTraits().jsonName??e;h[e]=this.codec.createDeserializer().readObject(t,i[r])}throw this.mixin.decorateServiceException(Object.assign(u,c,{$fault:d.getMergedTraits().error,message:l},h),i)}getDefaultContentType(){return"application/json"}}}};
package/dist/200.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=200,exports.ids=[200],exports.modules={2840:(e,t,r)=>{r.d(t,{k:()=>S});var n=r(50469),s=r(69700);const i="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",o="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",a="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",l="(\\d?\\d)",c="(\\d{4})",d=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),u=new RegExp(`^${i}, ${l} ${o} ${c} ${a} GMT$`),p=new RegExp(`^${i}, ${l}-${o}-(\\d\\d) ${a} GMT$`),h=new RegExp(`^${i} ${o} ( [1-9]|\\d\\d) ${a} ${c}$`),g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function f(e,t,r){const n=Number(e);if(n<t||n>r)throw new Error(`Value ${n} out of range [${t}, ${r}]`)}var m=r(84651),x=r(70764),E=r(12544),y=r(2914),b=r(63282),w=r(26144);class S extends b.f{settings;constructor(e){super(),this.settings=e}read(e,t){const r=n.l.of(e);if(r.isListSchema())return(0,s.G)(t).map(e=>this.read(r.getValueSchema(),e));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??E.E)(t);if(r.isTimestampSchema())switch((0,w.V)(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=d.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,n,s,i,o,a,,l,c]=t;f(n,1,12),f(s,1,31),f(i,0,23),f(o,0,59),f(a,0,60);const u=new Date(Date.UTC(Number(r),Number(n)-1,Number(s),Number(i),Number(o),Number(a),Number(l)?Math.round(1e3*parseFloat(`0.${l}`)):0));if(u.setUTCFullYear(Number(r)),"Z"!=c.toUpperCase()){const[,e,t,r]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],n="-"===e?1:-1;u.setTime(u.getTime()+n*(60*Number(t)*60*1e3+60*Number(r)*1e3))}return u})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,r,n,s,i,o,a,l;if((l=u.exec(e))?[,t,r,n,s,i,o,a]=l:(l=p.exec(e))?([,t,r,n,s,i,o,a]=l,n=(Number(n)+1900).toString()):(l=h.exec(e))&&([,r,t,s,i,o,a,n]=l),n&&o){const e=Date.UTC(Number(n),g.indexOf(r),Number(t),Number(s),Number(i),Number(o),a?Math.round(1e3*parseFloat(`0.${a}`)):0);f(t,1,31),f(s,0,23),f(i,0,59),f(o,0,60);const l=new Date(e);return l.setUTCFullYear(Number(n)),l}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){const e=r.getMergedTraits().mediaType;let n=t;if(e)return r.getMergedTraits().httpHeader&&(n=this.base64ToUtf8(n)),("application/json"===e||e.endsWith("+json"))&&(n=m.A.from(n)),n}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new x.D(t,"bigDecimal"):r.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??y.P)((this.serdeContext?.base64Decoder??E.E)(e))}}},6200:(e,t,r)=>{r.d(t,{getDefaultRoleAssumer:()=>hn,getDefaultRoleAssumerWithWebIdentity:()=>gn});var n=r(3748),s=r(96901),i=r(7387);const o=!1;var a=r(66686),l=r(22869);const c={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var d=r(51453),u=r(6723);class p extends u.T{constructor(e){super(e),Object.setPrototypeOf(this,p.prototype)}}class h extends p{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,h.prototype)}}class g extends p{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,g.prototype)}}class f extends p{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,f.prototype)}}class m extends p{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,m.prototype)}}class x extends p{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,x.prototype)}}class E extends p{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,E.prototype)}}class y extends p{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,y.prototype)}}const b="AssumedRoleUser",w="Credentials",S="DurationSeconds",v="Policy",T="PolicyArns",N="PackedPolicySize",I="RoleArn",A="RoleSessionName",P="SourceIdentity",C="awsQueryError",D="client",$="error",k="httpError",O="message",R="smithy.ts.sdk.synthetic.com.amazonaws.sts",M="com.amazonaws.sts",F=d.O.for(R);var V=[-3,R,"STSServiceException",0,[],[]];F.registerError(V,p);const U=d.O.for(M);var L=[-3,M,"ExpiredTokenException",{[C]:["ExpiredTokenException",400],[$]:D,[k]:400},[O],[0]];U.registerError(L,h);var j=[-3,M,"IDPCommunicationErrorException",{[C]:["IDPCommunicationError",400],[$]:D,[k]:400},[O],[0]];U.registerError(j,y);var z=[-3,M,"IDPRejectedClaimException",{[C]:["IDPRejectedClaim",403],[$]:D,[k]:403},[O],[0]];U.registerError(z,x);var _=[-3,M,"InvalidIdentityTokenException",{[C]:["InvalidIdentityToken",400],[$]:D,[k]:400},[O],[0]];U.registerError(_,E);var K=[-3,M,"MalformedPolicyDocumentException",{[C]:["MalformedPolicyDocument",400],[$]:D,[k]:400},[O],[0]];U.registerError(K,g);var W=[-3,M,"PackedPolicyTooLargeException",{[C]:["PackedPolicyTooLarge",400],[$]:D,[k]:400},[O],[0]];U.registerError(W,f);var B=[-3,M,"RegionDisabledException",{[C]:["RegionDisabledException",403],[$]:D,[k]:403},[O],[0]];U.registerError(B,m);const q=[F,U];var G=[0,M,"accessKeySecretType",8,0],Q=[0,M,"clientTokenType",8,0],Y=[3,M,b,0,["AssumedRoleId","Arn"],[0,0],2],Z=[3,M,"AssumeRoleRequest",0,[I,A,T,v,S,"Tags","TransitiveTagKeys","ExternalId","SerialNumber","TokenCode",P,"ProvidedContexts"],[0,0,()=>se,0,1,()=>oe,64,0,0,0,0,()=>ie],2],H=[3,M,"AssumeRoleResponse",0,[w,b,N,P],[[()=>ee,0],()=>Y,1,0]],X=[3,M,"AssumeRoleWithWebIdentityRequest",0,[I,A,"WebIdentityToken","ProviderId",T,v,S],[0,0,[()=>Q,0],0,()=>se,0,1],3],J=[3,M,"AssumeRoleWithWebIdentityResponse",0,[w,"SubjectFromWebIdentityToken",b,N,"Provider","Audience",P],[[()=>ee,0],0,()=>Y,1,0,0,0]],ee=[3,M,w,0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[0,[()=>G,0],0,4],4],te=[3,M,"PolicyDescriptorType",0,["arn"],[0]],re=[3,M,"ProvidedContext",0,["ProviderArn","ContextAssertion"],[0,0]],ne=[3,M,"Tag",0,["Key","Value"],[0,0],2],se=[1,M,"policyDescriptorListType",0,()=>te],ie=[1,M,"ProvidedContextsListType",0,()=>re],oe=[1,M,"tagListType",0,()=>ne],ae=[9,M,"AssumeRole",0,()=>Z,()=>H],le=[9,M,"AssumeRoleWithWebIdentity",0,()=>X,()=>J];class ce extends(l.u.classBuilder().ep(c).m(function(e,t,r,n){return[(0,a.r)(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(ae).build()){}class de extends(l.u.classBuilder().ep(c).m(function(e,t,r,n){return[(0,a.r)(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(le).build()){}const ue=e=>{if("string"==typeof e?.Arn){const t=e.Arn.split(":");if(t.length>4&&""!==t[4])return t[4]}},pe=async(e,t,r,n={})=>{const a="function"==typeof e?await e():e,l="function"==typeof t?await t():t;let c="";const d=a??l??(c=await function(e={}){return(0,i.Z)({...s.GG,default:async()=>(o||console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly."),"us-east-1")},{...s.zH,...e})}(n)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${a} (credential provider clientConfig)`,`${l} (contextual client)`,`${c} (STS default: AWS_REGION, profile region, or us-east-1)`),d},he=e=>"h2"===e?.metadata?.handlerProtocol;var ge=r(97040),fe=r(74534),me=r(70775),xe=r(86693),Ee=r(66575),ye=r(94615),be=r(45326),we=r(9575),Se=r(68249),ve=r(75279),Te=r(10860),Ne=r(39412),Ie=r(72084),Ae=r(10773),Pe=r(9942),Ce=r(63089),De=r(45547),$e=r(81974);const ke=async(e,t,r)=>({operation:(0,De.u)(t).operation,region:await(0,$e.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Oe=e=>{const t=[];return"AssumeRoleWithWebIdentity"===e.operation?t.push({schemeId:"smithy.api#noAuth"}):t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t};var Re=r(90966),Me=r(10706),Fe=r(56232),Ve=r(70868),Ue=r(60803),Le=r(52005),je=r(24661),ze=r(46109),_e=r(14433),Ke=r(5012),We=r(24176),Be=r(64327),qe=r(34338),Ge=r(57815),Qe=r(55425),Ye=r(99816),Ze=r(48828),He=r(63139),Xe=r(78607),Je=r(59772),et=r(50469),tt=r(27696);const rt={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e},captureMetaData:!1};function nt(e){return"boolean"==typeof e?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:"object"==typeof e&&null!==e?{enabled:!1!==e.enabled,maxEntitySize:e.maxEntitySize??1e4,maxExpansionDepth:e.maxExpansionDepth??10,maxTotalExpansions:e.maxTotalExpansions??1e3,maxExpandedLength:e.maxExpandedLength??1e5,allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:nt(!0)}const st=function(e){const t=Object.assign({},rt,e);return t.processEntities=nt(t.processEntities),t},it=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ot=new RegExp("^["+it+"]["+it+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function at(e,t){const r=[];let n=t.exec(e);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)s.push(n[e]);r.push(s),n=t.exec(e)}return r}const lt=function(e){return!(null==ot.exec(e))};let ct;ct="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class dt{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==t&&(this.child[this.child.length-1][ct]={startIndex:t})}static getMetaDataSymbol(){return ct}}class ut{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,s=!1,i=!1,o="";for(;t<e.length;t++)if("<"!==e[t]||i)if(">"===e[t]){if(i?"-"===e[t-1]&&"-"===e[t-2]&&(i=!1,n--):n--,0===n)break}else"["===e[t]?s=!0:o+=e[t];else{if(s&&ht(e,"!ENTITY",t)){let n,s;if(t+=7,[n,s,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),-1===s.indexOf("&")){const e=n.replace(/[.\-+*:]/g,"\\.");r[n]={regx:RegExp(`&${e};`,"g"),val:s}}}else if(s&&ht(e,"!ELEMENT",t)){t+=8;const{index:r}=this.readElementExp(e,t+1);t=r}else if(s&&ht(e,"!ATTLIST",t))t+=8;else if(s&&ht(e,"!NOTATION",t)){t+=9;const{index:r}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=r}else{if(!ht(e,"!--",t))throw new Error("Invalid DOCTYPE");i=!0}n++,o=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}readEntityExp(e,t){t=pt(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t])&&'"'!==e[t]&&"'"!==e[t];)r+=e[t],t++;if(gt(r),t=pt(e,t),!this.suppressValidationErr){if("SYSTEM"===e.substring(t,t+6).toUpperCase())throw new Error("External entities are not supported");if("%"===e[t])throw new Error("Parameter entities are not supported")}let n="";if([t,n]=this.readIdentifierVal(e,t,"entity"),!1!==this.options.enabled&&this.options.maxEntitySize&&n.length>this.options.maxEntitySize)throw new Error(`Entity "${r}" size (${n.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[r,n,--t]}readNotationExp(e,t){t=pt(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;!this.suppressValidationErr&&gt(r),t=pt(e,t);const n=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==n&&"PUBLIC"!==n)throw new Error(`Expected SYSTEM or PUBLIC, found "${n}"`);t+=n.length,t=pt(e,t);let s=null,i=null;if("PUBLIC"===n)[t,s]=this.readIdentifierVal(e,t,"publicIdentifier"),'"'!==e[t=pt(e,t)]&&"'"!==e[t]||([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"));else if("SYSTEM"===n&&([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:s,systemIdentifier:i,index:--t}}readIdentifierVal(e,t,r){let n="";const s=e[t];if('"'!==s&&"'"!==s)throw new Error(`Expected quoted string, found "${s}"`);for(t++;t<e.length&&e[t]!==s;)n+=e[t],t++;if(e[t]!==s)throw new Error(`Unterminated ${r} value`);return[++t,n]}readElementExp(e,t){t=pt(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!this.suppressValidationErr&&!lt(r))throw new Error(`Invalid element name: "${r}"`);let n="";if("E"===e[t=pt(e,t)]&&ht(e,"MPTY",t))t+=4;else if("A"===e[t]&&ht(e,"NY",t))t+=2;else if("("===e[t]){for(t++;t<e.length&&")"!==e[t];)n+=e[t],t++;if(")"!==e[t])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:n.trim(),index:t}}readAttlistExp(e,t){t=pt(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;gt(r),t=pt(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!gt(n))throw new Error(`Invalid attribute name: "${n}"`);t=pt(e,t);let s="";if("NOTATION"===e.substring(t,t+8).toUpperCase()){if(s="NOTATION","("!==e[t=pt(e,t+=8)])throw new Error(`Expected '(', found "${e[t]}"`);t++;let r=[];for(;t<e.length&&")"!==e[t];){let n="";for(;t<e.length&&"|"!==e[t]&&")"!==e[t];)n+=e[t],t++;if(n=n.trim(),!gt(n))throw new Error(`Invalid notation name: "${n}"`);r.push(n),"|"===e[t]&&(t++,t=pt(e,t))}if(")"!==e[t])throw new Error("Unterminated list of notations");t++,s+=" ("+r.join("|")+")"}else{for(;t<e.length&&!/\s/.test(e[t]);)s+=e[t],t++;const r=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!r.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}t=pt(e,t);let i="";return"#REQUIRED"===e.substring(t,t+8).toUpperCase()?(i="#REQUIRED",t+=8):"#IMPLIED"===e.substring(t,t+7).toUpperCase()?(i="#IMPLIED",t+=7):[t,i]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:r,attributeName:n,attributeType:s,defaultValue:i,index:t}}}const pt=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function ht(e,t,r){for(let n=0;n<t.length;n++)if(t[n]!==e[r+n+1])return!1;return!0}function gt(e){if(lt(e))return e;throw new Error(`Invalid entity name ${e}`)}const ft=/^[-+]?0x[a-fA-F0-9]+$/,mt=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,xt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const Et=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class yt{constructor(e){var t;if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>Rt(t,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>Rt(t,16,"&#x")}},this.addExternalEntities=bt,this.parseXml=Nt,this.parseTextData=wt,this.resolveNameSpace=St,this.buildAttributesMap=Tt,this.isItStopNode=Ct,this.replaceEntitiesValue=At,this.readStopNodeData=kt,this.saveTextToParentTag=Pt,this.addChild=It,this.ignoreAttributesFn="function"==typeof(t=this.options.ignoreAttributes)?t:Array.isArray(t)?e=>{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t&&(t.startsWith("*.")?this.stopNodesWildcard.add(t.substring(2)):this.stopNodesExact.add(t))}}}}function bt(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r],s=n.replace(/[.\-+*:]/g,"\\.");this.lastEntities[n]={regex:new RegExp("&"+s+";","g"),val:e[n]}}}function wt(e,t,r,n,s,i,o){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e,t,r));const n=this.options.tagValueProcessor(t,e,r,s,i);return null==n?e:typeof n!=typeof e||n!==e?n:this.options.trimValues||e.trim()===e?Ot(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function St(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const vt=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Tt(e,t,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=at(e,vt),s=n.length,i={};for(let e=0;e<s;e++){const s=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(s,t))continue;let o=n[e][4],a=this.options.attributeNamePrefix+s;if(s.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o,r,t);const e=this.options.attributeValueProcessor(s,o,t);i[a]=null==e?o:typeof e!=typeof o||e!==o?e:Ot(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[a]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const Nt=function(e){e=e.replace(/\r\n?/g,"\n");const t=new dt("!xml");let r=t,n="",s="";this.entityExpansionCount=0,this.currentExpandedLength=0;const i=new ut(this.options.processEntities);for(let o=0;o<e.length;o++)if("<"===e[o])if("/"===e[o+1]){const t=Dt(e,">",o,"Closing Tag is not closed.");let i=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(n=this.saveTextToParentTag(n,r,s));const a=s.substring(s.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),r=this.tagsNodeStack.pop(),n="",o=t}else if("?"===e[o+1]){let t=$t(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,s),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new dt(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,s,t.tagName)),this.addChild(r,e,s,o)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=Dt(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(o+4,t-2);n=this.saveTextToParentTag(n,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}o=t}else if("!D"===e.substr(o+1,2)){const t=i.readDocType(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=Dt(e,"]]>",o,"CDATA is not closed.")-2,i=e.substring(o+9,t);n=this.saveTextToParentTag(n,r,s);let a=this.parseTextData(i,r.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,a),o=t+2}else{let i=$t(e,o,this.options.removeNSPrefix),a=i.tagName;const l=i.rawTagName;let c=i.tagExp,d=i.attrExpPresent,u=i.closeIndex;if(this.options.transformTagName){const e=this.options.transformTagName(a);c===a&&(c=e),a=e}r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,s,!1));const p=r;p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==t.tagname&&(s+=s?"."+a:a);const h=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,a)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),c=a):c=c.substr(0,c.length-1),o=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=i.closeIndex;else{const r=this.readStopNodeData(e,l,u+1);if(!r)throw new Error(`Unexpected end of ${l}`);o=r.i,t=r.tagContent}const n=new dt(a);a!==c&&d&&(n[":@"]=this.buildAttributesMap(c,s,a)),t&&(t=this.parseTextData(t,a,s,!0,d,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,s,h)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){if("/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),c=a):c=c.substr(0,c.length-1),this.options.transformTagName){const e=this.options.transformTagName(a);c===a&&(c=e),a=e}const e=new dt(a);a!==c&&d&&(e[":@"]=this.buildAttributesMap(c,s,a)),this.addChild(r,e,s,h),s=s.substr(0,s.lastIndexOf("."))}else{const e=new dt(a);this.tagsNodeStack.push(r),a!==c&&d&&(e[":@"]=this.buildAttributesMap(c,s,a)),this.addChild(r,e,s,h),r=e}n="",o=u}}else n+=e[o];return t.child};function It(e,t,r,n){this.options.captureMetaData||(n=void 0);const s=this.options.updateTag(t.tagname,r,t[":@"]);!1===s||("string"==typeof s?(t.tagname=s,e.addChild(t,n)):e.addChild(t,n))}const At=function(e,t,r){if(-1===e.indexOf("&"))return e;const n=this.options.processEntities;if(!n.enabled)return e;if(n.allowedTags&&!n.allowedTags.includes(t))return e;if(n.tagFilter&&!n.tagFilter(t,r))return e;for(let t in this.docTypeEntities){const r=this.docTypeEntities[t],s=e.match(r.regx);if(s){if(this.entityExpansionCount+=s.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const t=e.length;if(e=e.replace(r.regx,r.val),n.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}if(-1===e.indexOf("&"))return e;for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(-1===e.indexOf("&"))return e;if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}return e.replace(this.ampEntity.regex,this.ampEntity.val)};function Pt(e,t,r,n){return e&&(void 0===n&&(n=0===t.child.length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function Ct(e,t,r,n){return!(!t||!t.has(n))||!(!e||!e.has(r))}function Dt(e,t,r,n){const s=e.indexOf(t,r);if(-1===s)throw new Error(n);return s+t.length-1}function $t(e,t,r,n=">"){const s=function(e,t,r=">"){let n,s="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:s,index:i};if(e[i+1]===r[1])return{data:s,index:i}}else"\t"===t&&(t=" ");s+=t}}(e,t+1,n);if(!s)return;let i=s.data;const o=s.index,a=i.search(/\s/);let l=i,c=!0;-1!==a&&(l=i.substring(0,a),i=i.substring(a+1).trimStart());const d=l;if(r){const e=l.indexOf(":");-1!==e&&(l=l.substr(e+1),c=l!==s.data.substr(e+1))}return{tagName:l,tagExp:i,closeIndex:o,attrExpPresent:c,rawTagName:d}}function kt(e,t,r){const n=r;let s=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=Dt(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(s--,0===s))return{tagContent:e.substring(n,r),i};r=i}else if("?"===e[r+1])r=Dt(e,"?>",r+1,"StopNode is not closed.");else if("!--"===e.substr(r+1,3))r=Dt(e,"--\x3e",r+3,"StopNode is not closed.");else if("!["===e.substr(r+1,2))r=Dt(e,"]]>",r,"StopNode is not closed.")-2;else{const n=$t(e,r,">");n&&((n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,r=n.closeIndex)}}function Ot(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&function(e,t={}){if(t=Object.assign({},xt,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if("0"===e)return 0;if(t.hex&&ft.test(r))return function(e){if(parseInt)return parseInt(e,16);if(Number.parseInt)return Number.parseInt(e,16);if(window&&window.parseInt)return window.parseInt(e,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r);if(r.includes("e")||r.includes("E"))return function(e,t,r){if(!r.eNotation)return e;const n=t.match(Et);if(n){let s=n[1]||"";const i=-1===n[3].indexOf("e")?"E":"e",o=n[2],a=s?e[o.length+1]===i:e[o.length]===i;return o.length>1&&a?e:1!==o.length||!n[3].startsWith(`.${i}`)&&n[3][0]!==i?r.leadingZeros&&!a?(t=(n[1]||"")+n[3],Number(t)):e:Number(t)}return e}(e,r,t);{const s=mt.exec(r);if(s){const i=s[1]||"",o=s[2];let a=(n=s[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n):n;const l=i?"."===e[o.length+1]:"."===e[o.length];if(!t.leadingZeros&&(o.length>1||1===o.length&&!l))return e;{const n=Number(r),s=String(n);if(0===n)return n;if(-1!==s.search(/[eE]/))return t.eNotation?n:e;if(-1!==r.indexOf("."))return"0"===s||s===a||s===`${i}${a}`?n:e;let l=o?a:r;return o?l===s||i+l===s?n:e:l===s||l===i+s?n:e}}return e}var n}(e,r)}return function(e){return void 0!==e}(e)?e:""}function Rt(e,t,r){const n=Number.parseInt(e,t);return n>=0&&n<=1114111?String.fromCodePoint(n):r+e+";"}const Mt=dt.getMetaDataSymbol();function Ft(e,t){return Vt(e,t)}function Vt(e,t,r){let n;const s={};for(let i=0;i<e.length;i++){const o=e[i],a=Ut(o);let l="";if(l=void 0===r?a:r+"."+a,a===t.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let e=Vt(o[a],t,l);const r=jt(e,t);void 0!==o[Mt]&&(e[Mt]=o[Mt]),o[":@"]?Lt(e,o[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==s[a]&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(e)):t.isArray(a,l,r)?s[a]=[e]:s[a]=e}}}return"string"==typeof n?n.length>0&&(s[t.textNodeName]=n):void 0!==n&&(s[t.textNodeName]=n),s}function Ut(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function Lt(e,t,r,n){if(t){const s=Object.keys(t),i=s.length;for(let o=0;o<i;o++){const i=s[o];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function jt(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}const zt={allowBooleanAttributes:!1,unpairedTags:[]};function _t(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function Kt(e,t){const r=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const n=e.substr(r,t-r);if(t>5&&"xml"===n)return Yt("InvalidXml","XML declaration allowed only at the start of the document.",Xt(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function Wt(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}function Bt(e,t){let r="",n="",s=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){s=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:s}}const qt=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function Gt(e,t){const r=at(e,qt),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return Yt("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",Jt(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return Yt("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",Jt(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return Yt("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",Jt(r[e]));const s=r[e][2];if(!Zt(s))return Yt("InvalidAttr","Attribute '"+s+"' is an invalid name.",Jt(r[e]));if(n.hasOwnProperty(s))return Yt("InvalidAttr","Attribute '"+s+"' is repeated.",Jt(r[e]));n[s]=1}return!0}function Qt(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function Yt(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function Zt(e){return lt(e)}function Ht(e){return lt(e)}function Xt(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Jt(e){return e.startIndex+e[1].length}const er=new class{constructor(e){this.externalEntities={},this.options=st(e)}parse(e,t){if("string"!=typeof e&&e.toString)e=e.toString();else if("string"!=typeof e)throw new Error("XML data is accepted in String or Bytes[] form.");if(t){!0===t&&(t={});const r=function(e,t){t=Object.assign({},zt,t);const r=[];let n=!1,s=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=Kt(e,i),i.err)return i}else{if("<"!==e[i]){if(_t(e[i]))continue;return Yt("InvalidChar","char '"+e[i]+"' is not expected.",Xt(e,i))}{let o=i;if(i++,"!"===e[i]){i=Wt(e,i);continue}{let a=!1;"/"===e[i]&&(a=!0,i++);let l="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)l+=e[i];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),i--),!Ht(l)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",Yt("InvalidTag",t,Xt(e,i))}const c=Bt(e,i);if(!1===c)return Yt("InvalidAttr","Attributes for '"+l+"' have open quote.",Xt(e,i));let d=c.value;if(i=c.index,"/"===d[d.length-1]){const r=i-d.length;d=d.substring(0,d.length-1);const s=Gt(d,t);if(!0!==s)return Yt(s.err.code,s.err.msg,Xt(e,r+s.err.line));n=!0}else if(a){if(!c.tagClosed)return Yt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Xt(e,i));if(d.trim().length>0)return Yt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Xt(e,o));if(0===r.length)return Yt("InvalidTag","Closing tag '"+l+"' has not been opened.",Xt(e,o));{const t=r.pop();if(l!==t.tagName){let r=Xt(e,t.tagStartPos);return Yt("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+l+"'.",Xt(e,o))}0==r.length&&(s=!0)}}else{const a=Gt(d,t);if(!0!==a)return Yt(a.err.code,a.err.msg,Xt(e,i-d.length+a.err.line));if(!0===s)return Yt("InvalidXml","Multiple possible root nodes found.",Xt(e,i));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:o}),n=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=Wt(e,i);continue}if("?"!==e[i+1])break;if(i=Kt(e,++i),i.err)return i}else if("&"===e[i]){const t=Qt(e,i);if(-1==t)return Yt("InvalidChar","char '&' is not expected.",Xt(e,i));i=t}else if(!0===s&&!_t(e[i]))return Yt("InvalidXml","Extra text at the end",Xt(e,i));"<"===e[i]&&i--}}}return n?1==r.length?Yt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Xt(e,r[0].tagStartPos)):!(r.length>0)||Yt("InvalidXml","Invalid '"+JSON.stringify(r.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):Yt("InvalidXml","Start tag expected.",1)}(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new yt(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:Ft(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return dt.getMetaDataSymbol()}}({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});er.addEntity("#xD","\r"),er.addEntity("#10","\n");var tr=r(2840);const rr=e=>{const t="#text";for(const r in e)e.hasOwnProperty(r)&&void 0!==e[r][t]?e[r]=e[r][t]:"object"==typeof e[r]&&null!==e[r]&&(e[r]=rr(e[r]));return e};var nr=r(2914),sr=r(75426),ir=r(98223);class or extends sr.B{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new tr.k(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,r){const n=et.l.of(e),s=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&Object.values(s).find(e=>!!e.getMemberTraits().eventPayload)){const e={},r=Object.keys(s)[0];return s[r].isBlobSchema()?e[r]=t:e[r]=this.read(s[r],t),e}const i=(this.serdeContext?.utf8Encoder??nr.P)(t),o=this.parseXml(i);return this.readSchema(e,r?o[r]:o)}readSchema(e,t){const r=et.l.of(e);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(t))return this.readSchema(r,[t]);if(null==t)return t;if("object"==typeof t){const e=!!n.sparse,s=!!n.xmlFlattened;if(r.isListSchema()){const n=r.getValueSchema(),i=[],o=n.getMergedTraits().xmlName??"member",a=s?t:(t[0]??t)[o],l=Array.isArray(a)?a:[a];for(const t of l)(null!=t||e)&&i.push(this.readSchema(n,t));return i}const i={};if(r.isMapSchema()){const n=r.getKeySchema(),o=r.getValueSchema();let a;a=s?Array.isArray(t)?t:[t]:Array.isArray(t.entry)?t.entry:[t.entry];const l=n.getMergedTraits().xmlName??"key",c=o.getMergedTraits().xmlName??"value";for(const t of a){const r=t[l],n=t[c];(null!=n||e)&&(i[r]=this.readSchema(o,n))}return i}if(r.isStructSchema()){const e=r.isUnionSchema();let n;e&&(n=new ir.F(t,i));for(const[s,o]of r.structIterator()){const r=o.getMergedTraits(),a=r.httpPayload?r.xmlName??o.getName():o.getMemberTraits().xmlName??s;e&&n.mark(a),null!=t[a]&&(i[s]=this.readSchema(o,t[a]))}return e&&n.writeUnknown(),i}if(r.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,t)}parseXml(e){if(e.length){let r;try{t=e,r=er.parse(t,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const n="#text",s=Object.keys(r)[0],i=r[s];return i[n]&&(i[s]=i[n],delete i[n]),rr(i)}var t;return{}}}var ar=r(26144),lr=r(30259),cr=r(34708),dr=r(70764),ur=r(10015),pr=r(39181);class hr extends sr.B{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,r=""){void 0===this.buffer&&(this.buffer="");const n=et.l.of(e);if(r&&!r.endsWith(".")&&(r+="."),n.isBlobSchema())("string"==typeof t||t instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??pr.n)(t)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())null!=t?(this.writeKey(r),this.writeValue(String(t))):n.isIdempotencyToken()&&(this.writeKey(r),this.writeValue((0,cr.v4)()));else if(n.isBigIntegerSchema())null!=t&&(this.writeKey(r),this.writeValue(String(t)));else if(n.isBigDecimalSchema())null!=t&&(this.writeKey(r),this.writeValue(t instanceof dr.D?t.string:String(t)));else if(n.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(r),(0,ar.V)(n,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue((0,ur.JV)(t));break;case 7:this.writeValue(String(t.getTime()/1e3))}}else if(n.isDocumentSchema())Array.isArray(t)?this.write(79,t,r):t instanceof Date?this.write(4,t,r):t instanceof Uint8Array?this.write(21,t,r):t&&"object"==typeof t?this.write(143,t,r):(this.writeKey(r),this.writeValue(String(t)));else if(n.isListSchema()){if(Array.isArray(t))if(0===t.length)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const e=n.getValueSchema(),s=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let i=1;for(const n of t){if(null==n)continue;const t=e.getMergedTraits(),o=this.getKey("member",t.xmlName,t.ec2QueryName),a=s?`${r}${i}`:`${r}${o}.${i}`;this.write(e,n,a),++i}}}else if(n.isMapSchema()){if(t&&"object"==typeof t){const e=n.getKeySchema(),s=n.getValueSchema(),i=n.getMergedTraits().xmlFlattened;let o=1;for(const[n,a]of Object.entries(t)){if(null==a)continue;const t=e.getMergedTraits(),l=this.getKey("key",t.xmlName,t.ec2QueryName),c=i?`${r}${o}.${l}`:`${r}entry.${o}.${l}`,d=s.getMergedTraits(),u=this.getKey("value",d.xmlName,d.ec2QueryName),p=i?`${r}${o}.${u}`:`${r}entry.${o}.${u}`;this.write(e,n,c),this.write(s,a,p),++o}}}else if(n.isStructSchema()){if(t&&"object"==typeof t){let e=!1;for(const[s,i]of n.structIterator()){if(null==t[s]&&!i.isIdempotencyToken())continue;const n=i.getMergedTraits(),o=`${r}${this.getKey(s,n.xmlName,n.ec2QueryName,"struct")}`;this.write(i,t[s],o),e=!0}if(!e&&n.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,n]=e,s=`${r}${t}`;this.write(15,n,s)}}}}else if(!n.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${n.getName(!0)}`)}flush(){if(void 0===this.buffer)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t,r,n){const{ec2:s,capitalizeKeys:i}=this.settings;if(s&&r)return r;const o=t??e;return i&&"struct"===n?o[0].toUpperCase()+o.slice(1):o}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${(0,lr.$)(e)}=`}writeValue(e){this.buffer+=(0,lr.$)(e)}}class gr extends He.M{options;serializer;deserializer;mixin=new tt.U;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new hr(t),this.deserializer=new or(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,r){const n=await super.serializeRequest(e,t,r);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),"unit"!==(0,Je.L)(e.input)&&n.body||(n.body="");const s=e.name.split("#")[1]??e.name;return n.body=`Action=${s}&Version=${this.options.version}`+n.body,n.body.endsWith("&")&&(n.body=n.body.slice(-1)),n}async deserializeResponse(e,t,r){const n=this.deserializer,s=et.l.of(e.output),i={};if(r.statusCode>=300){const s=await(0,Xe.P)(r.body,t);s.byteLength>0&&Object.assign(i,await n.read(15,s)),await this.handleError(e,t,r,i,this.deserializeMetadata(r))}for(const e in r.headers){const t=r.headers[e];delete r.headers[e],r.headers[e.toLowerCase()]=t}const o=e.name.split("#")[1]??e.name,a=s.isStructSchema()&&this.useNestedResult()?o+"Result":void 0,l=await(0,Xe.P)(r.body,t);return l.byteLength>0&&Object.assign(i,await n.read(s,l,a)),{$metadata:this.deserializeMetadata(r),...i}}useNestedResult(){return!0}async handleError(e,t,r,n,s){const i=this.loadQueryErrorCode(r,n)??"Unknown",o=this.loadQueryError(n),a=this.loadQueryErrorMessage(n);o.message=a,o.Error={Type:o.Type,Code:o.Code,Message:a};const{errorSchema:l,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,r,o,s,this.mixin.findQueryCompatibleError),u=et.l.of(l),p=new(d.O.for(l[1]).getErrorCtor(l)??Error)(a),h={Type:o.Error.Type,Code:o.Error.Code,Error:o.Error};for(const[e,t]of u.structIterator()){const r=t.getMergedTraits().xmlName??e,s=o[r]??n[r];h[e]=this.deserializer.readSchema(t,s)}throw this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:a},h),n)}loadQueryErrorCode(e,t){const r=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;return void 0!==r?r:404==e.statusCode?"NotFound":void 0}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}var fr=r(3761),mr=r(67933),xr=r(12544),Er=r(40935),yr=r(53037),br=r(48105),wr=r(1034),Sr=r(7856);const vr="required",Tr="type",Nr="fn",Ir="argv",Ar="ref",Pr=!1,Cr=!0,Dr="booleanEquals",$r="stringEquals",kr="sigv4",Or="us-east-1",Rr="endpoint",Mr="https://sts.{Region}.{PartitionResult#dnsSuffix}",Fr="tree",Vr="error",Ur="getAttr",Lr={[vr]:!1,[Tr]:"string"},jr={[vr]:!0,default:!1,[Tr]:"boolean"},zr={[Ar]:"Endpoint"},_r={[Nr]:"isSet",[Ir]:[{[Ar]:"Region"}]},Kr={[Ar]:"Region"},Wr={[Nr]:"aws.partition",[Ir]:[Kr],assign:"PartitionResult"},Br={[Ar]:"UseFIPS"},qr={[Ar]:"UseDualStack"},Gr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:kr,signingName:"sts",signingRegion:Or}]},headers:{}},Qr={},Yr={conditions:[{[Nr]:$r,[Ir]:[Kr,"aws-global"]}],[Rr]:Gr,[Tr]:Rr},Zr={[Nr]:Dr,[Ir]:[Br,!0]},Hr={[Nr]:Dr,[Ir]:[qr,!0]},Xr={[Nr]:Ur,[Ir]:[{[Ar]:"PartitionResult"},"supportsFIPS"]},Jr={[Ar]:"PartitionResult"},en={[Nr]:Dr,[Ir]:[!0,{[Nr]:Ur,[Ir]:[Jr,"supportsDualStack"]}]},tn=[{[Nr]:"isSet",[Ir]:[zr]}],rn=[Zr],nn=[Hr],sn={version:"1.0",parameters:{Region:Lr,UseDualStack:jr,UseFIPS:jr,Endpoint:Lr,UseGlobalEndpoint:jr},rules:[{conditions:[{[Nr]:Dr,[Ir]:[{[Ar]:"UseGlobalEndpoint"},Cr]},{[Nr]:"not",[Ir]:tn},_r,Wr,{[Nr]:Dr,[Ir]:[Br,Pr]},{[Nr]:Dr,[Ir]:[qr,Pr]}],rules:[{conditions:[{[Nr]:$r,[Ir]:[Kr,"ap-northeast-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"ap-south-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"ap-southeast-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"ap-southeast-2"]}],endpoint:Gr,[Tr]:Rr},Yr,{conditions:[{[Nr]:$r,[Ir]:[Kr,"ca-central-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-central-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-north-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-west-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-west-2"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"eu-west-3"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"sa-east-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,Or]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"us-east-2"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"us-west-1"]}],endpoint:Gr,[Tr]:Rr},{conditions:[{[Nr]:$r,[Ir]:[Kr,"us-west-2"]}],endpoint:Gr,[Tr]:Rr},{endpoint:{url:Mr,properties:{authSchemes:[{name:kr,signingName:"sts",signingRegion:"{Region}"}]},headers:Qr},[Tr]:Rr}],[Tr]:Fr},{conditions:tn,rules:[{conditions:rn,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Tr]:Vr},{conditions:nn,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Tr]:Vr},{endpoint:{url:zr,properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr},{conditions:[_r],rules:[{conditions:[Wr],rules:[{conditions:[Zr,Hr],rules:[{conditions:[{[Nr]:Dr,[Ir]:[Cr,Xr]},en],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Tr]:Vr}],[Tr]:Fr},{conditions:rn,rules:[{conditions:[{[Nr]:Dr,[Ir]:[Xr,Cr]}],rules:[{conditions:[{[Nr]:$r,[Ir]:[{[Nr]:Ur,[Ir]:[Jr,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Qr,headers:Qr},[Tr]:Rr},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr},{error:"FIPS is enabled but this partition does not support FIPS",[Tr]:Vr}],[Tr]:Fr},{conditions:nn,rules:[{conditions:[en],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr},{error:"DualStack is enabled but this partition does not support DualStack",[Tr]:Vr}],[Tr]:Fr},Yr,{endpoint:{url:Mr,properties:Qr,headers:Qr},[Tr]:Rr}],[Tr]:Fr}],[Tr]:Fr},{error:"Invalid Configuration: Missing Region",[Tr]:Vr}]},on=new br.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),an=(e,t={})=>on.get(e,()=>(0,wr.s)(sn,{endpointParams:e,logger:t.logger}));Sr.m.aws=yr.UF;var ln=r(93673),cn=r(78646),dn=r(18081);class un extends Pe.K{config;constructor(...[e]){const t=(e=>{(0,qe.I)(process.version);const t=(0,Ye.I)(e),r=()=>t().then(Ge.l),n=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??xr.E,base64Encoder:e?.base64Encoder??pr.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??an,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Oe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ve.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new _e.m}],logger:e?.logger??new fr.N,protocol:e?.protocol??gr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:q,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??mr.D,utf8Decoder:e?.utf8Decoder??Er.a,utf8Encoder:e?.utf8Encoder??nr.P}))(e);(0,Me.I)(process.version);const o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,i.Z)(Fe.$,o),bodyLengthChecker:e?.bodyLengthChecker??Qe.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Ue.pf)({serviceId:n.serviceId,clientVersion:Re.rE}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4")||(async t=>await e.credentialDefaultProvider(t?.__config||{})()),signer:new Ve.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new _e.m}],maxAttempts:e?.maxAttempts??(0,i.Z)(Ie.qs,e),region:e?.region??(0,i.Z)(s.GG,{...s.zH,...o}),requestHandler:We.$.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,i.Z)({...Ie.kN,default:async()=>(await r()).retryMode||Ze.L0},e),sha256:e?.sha256??Ke.V.bind(null,"sha256"),streamCollector:e?.streamCollector??Be.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,i.Z)(je.e$,o),useFipsEndpoint:e?.useFipsEndpoint??(0,i.Z)(ze.Ko,o),userAgentAppId:e?.userAgentAppId??(0,i.Z)(Le.hV,o)}})(e||{});super(t),this.initConfig=t;const r=(n=t,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,useGlobalEndpoint:n.useGlobalEndpoint??!1,defaultSigningName:"sts"}));var n;const o=(0,xe.D)(r),a=(0,Ie.$z)(o),l=(0,ye.T)(a),c=(0,ge.OV)(l),d=((e,t)=>{const r=Object.assign((0,ln.R)(e),(0,dn.xA)(e),(0,cn.e)(e),(e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex(t=>t.schemeId===e.schemeId);-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){n=e},credentials:()=>n}})(e));return t.forEach(e=>e.configure(r)),Object.assign(e,(0,ln.$)(r),(0,dn.uv)(r),(0,cn.j)(r),{httpAuthSchemes:(n=r).httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()});var n})((e=>{const t=(r=e,Object.assign(r,{stsClientCtor:un}));var r;const n=(0,Ce.h)(t);return Object.assign(n,{authSchemePreference:(0,$e.t)(e.authSchemePreference??[])})})((0,Ne.C)(c)),e?.extensions||[]);this.config=d,this.middlewareStack.use((0,ve.wq)(this.config)),this.middlewareStack.use((0,Ee.sM)(this.config)),this.middlewareStack.use((0,Ae.ey)(this.config)),this.middlewareStack.use((0,Te.vK)(this.config)),this.middlewareStack.use((0,ge.TC)(this.config)),this.middlewareStack.use((0,fe.Y7)(this.config)),this.middlewareStack.use((0,me.n)(this.config)),this.middlewareStack.use((0,be.w)(this.config,{httpAuthSchemeParametersProvider:ke,identityProviderConfigProvider:async e=>new we.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,Se.l)(this.config))}destroy(){super.destroy()}}const pn=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e,hn=(e={},t)=>((e,t)=>{let r,s;return async(i,o)=>{if(s=i,!r){const{logger:n=e?.parentClientConfig?.logger,profile:i=e?.parentClientConfig?.profile,region:o,requestHandler:a=e?.parentClientConfig?.requestHandler,credentialProviderLogger:l,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,d=await pe(o,e?.parentClientConfig?.region,l,{logger:n,profile:i}),u=!he(a);r=new t({...e,userAgentAppId:c,profile:i,credentialDefaultProvider:()=>async()=>s,region:d,requestHandler:u?a:void 0,logger:n})}const{Credentials:a,AssumedRoleUser:l}=await r.send(new ce(o));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${o.RoleArn}`);const c=ue(l),d={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...c&&{accountId:c}};return(0,n.g)(d,"CREDENTIALS_STS_ASSUME_ROLE","i"),d}})(e,pn(un,t)),gn=(e={},t)=>((e,t)=>{let r;return async s=>{if(!r){const{logger:n=e?.parentClientConfig?.logger,profile:s=e?.parentClientConfig?.profile,region:i,requestHandler:o=e?.parentClientConfig?.requestHandler,credentialProviderLogger:a,userAgentAppId:l=e?.parentClientConfig?.userAgentAppId}=e,c=await pe(i,e?.parentClientConfig?.region,a,{logger:n,profile:s}),d=!he(o);r=new t({...e,userAgentAppId:l,profile:s,region:c,requestHandler:d?o:void 0,logger:n})}const{Credentials:i,AssumedRoleUser:o}=await r.send(new de(s));if(!i||!i.AccessKeyId||!i.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${s.RoleArn}`);const a=ue(o),l={accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,sessionToken:i.SessionToken,expiration:i.Expiration,...i.CredentialScope&&{credentialScope:i.CredentialScope},...a&&{accountId:a}};return a&&(0,n.g)(l,"RESOLVED_ACCOUNT_ID","T"),(0,n.g)(l,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),l}})(e,pn(un,t))},14433:(e,t,r)=>{r.d(t,{m:()=>n});class n{async sign(e,t,r){return e}}},30259:(e,t,r)=>{function n(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}r.d(t,{$:()=>n})},69700:(e,t,r)=>{r.d(t,{G:()=>n});const n=e=>{const t=e.length,r=[];let n,s=!1,i=0;for(let o=0;o<t;++o){const t=e[o];switch(t){case'"':"\\"!==n&&(s=!s);break;case",":s||(r.push(e.slice(i,o)),i=o+1)}n=t}return r.push(e.slice(i)),r.map(e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))})}},90966:e=>{e.exports={rE:"3.990.0"}}};
package/dist/202.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=202,exports.ids=[202],exports.modules={9202:(e,r,t)=>{t.d(r,{CreateTokenCommand:()=>Or,SSOOIDCClient:()=>Pr});var o=t(97040),i=t(74534),n=t(70775),s=t(86693),c=t(66575),a=t(94615),p=t(45326),d=t(9575),u=t(68249),l=t(75279),h=t(10860),g=t(39412),m=t(72084),f=t(10773),S=t(9942),v=t(63089),y=t(45547),E=t(81974);const x=async(e,r,t)=>({operation:(0,y.u)(r).operation,region:await(0,E.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),P=e=>{const r=[];return"CreateToken"===e.operation?r.push({schemeId:"smithy.api#noAuth"}):r.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}(e)),r},I={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var k=t(90966),O=t(10706),b=t(56232),w=t(60803),C=t(52005),A=t(96901),D=t(24661),_=t(46109),T=t(5012),$=t(7387),R=t(24176),U=t(64327),j=t(34338),F=t(57815),z=t(55425),q=t(99816),G=t(48828),H=t(70868),V=t(80843),Z=t(14433),M=t(3761),N=t(67933),K=t(12544),L=t(39181),W=t(40935),Y=t(2914),B=t(53037),J=t(48105),Q=t(1034),X=t(7856);const ee="required",re="fn",te="argv",oe="ref",ie=!0,ne="isSet",se="booleanEquals",ce="error",ae="endpoint",pe="tree",de="PartitionResult",ue="getAttr",le={[ee]:!1,type:"string"},he={[ee]:!0,default:!1,type:"boolean"},ge={[oe]:"Endpoint"},me={[re]:se,[te]:[{[oe]:"UseFIPS"},!0]},fe={[re]:se,[te]:[{[oe]:"UseDualStack"},!0]},Se={},ve={[re]:ue,[te]:[{[oe]:de},"supportsFIPS"]},ye={[oe]:de},Ee={[re]:se,[te]:[!0,{[re]:ue,[te]:[ye,"supportsDualStack"]}]},xe=[me],Pe=[fe],Ie=[{[oe]:"Region"}],ke={version:"1.0",parameters:{Region:le,UseDualStack:he,UseFIPS:he,Endpoint:le},rules:[{conditions:[{[re]:ne,[te]:[ge]}],rules:[{conditions:xe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ce},{conditions:Pe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ce},{endpoint:{url:ge,properties:Se,headers:Se},type:ae}],type:pe},{conditions:[{[re]:ne,[te]:Ie}],rules:[{conditions:[{[re]:"aws.partition",[te]:Ie,assign:de}],rules:[{conditions:[me,fe],rules:[{conditions:[{[re]:se,[te]:[ie,ve]},Ee],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Se,headers:Se},type:ae}],type:pe},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ce}],type:pe},{conditions:xe,rules:[{conditions:[{[re]:se,[te]:[ve,ie]}],rules:[{conditions:[{[re]:"stringEquals",[te]:[{[re]:ue,[te]:[ye,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:Se,headers:Se},type:ae},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Se,headers:Se},type:ae}],type:pe},{error:"FIPS is enabled but this partition does not support FIPS",type:ce}],type:pe},{conditions:Pe,rules:[{conditions:[Ee],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Se,headers:Se},type:ae}],type:pe},{error:"DualStack is enabled but this partition does not support DualStack",type:ce}],type:pe},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:Se,headers:Se},type:ae}],type:pe}],type:pe},{error:"Invalid Configuration: Missing Region",type:ce}]},Oe=new J.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,r={})=>Oe.get(e,()=>(0,Q.s)(ke,{endpointParams:e,logger:r.logger}));X.m.aws=B.UF;var we=t(51453),Ce=t(6723);class Ae extends Ce.T{constructor(e){super(e),Object.setPrototypeOf(this,Ae.prototype)}}class De extends Ae{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,De.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class _e extends Ae{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,_e.prototype),this.error=e.error,this.error_description=e.error_description}}class Te extends Ae{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,Te.prototype),this.error=e.error,this.error_description=e.error_description}}class $e extends Ae{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,$e.prototype),this.error=e.error,this.error_description=e.error_description}}class Re extends Ae{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,Re.prototype),this.error=e.error,this.error_description=e.error_description}}class Ue extends Ae{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,Ue.prototype),this.error=e.error,this.error_description=e.error_description}}class je extends Ae{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,je.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class Fe extends Ae{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,Fe.prototype),this.error=e.error,this.error_description=e.error_description}}class ze extends Ae{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,ze.prototype),this.error=e.error,this.error_description=e.error_description}}class qe extends Ae{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e}),Object.setPrototypeOf(this,qe.prototype),this.error=e.error,this.error_description=e.error_description}}class Ge extends Ae{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype),this.error=e.error,this.error_description=e.error_description}}const He="client",Ve="error",Ze="error_description",Me="http",Ne="httpError",Ke="reason",Le="refreshToken",We="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",Ye="com.amazonaws.ssooidc",Be=we.O.for(We);var Je=[-3,We,"SSOOIDCServiceException",0,[],[]];Be.registerError(Je,Ae);const Qe=we.O.for(Ye);var Xe=[-3,Ye,"AccessDeniedException",{[Ve]:He,[Ne]:400},[Ve,Ke,Ze],[0,0,0]];Qe.registerError(Xe,De);var er=[-3,Ye,"AuthorizationPendingException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(er,_e);var rr=[-3,Ye,"ExpiredTokenException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(rr,Te);var tr=[-3,Ye,"InternalServerException",{[Ve]:"server",[Ne]:500},[Ve,Ze],[0,0]];Qe.registerError(tr,$e);var or=[-3,Ye,"InvalidClientException",{[Ve]:He,[Ne]:401},[Ve,Ze],[0,0]];Qe.registerError(or,Re);var ir=[-3,Ye,"InvalidGrantException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(ir,Ue);var nr=[-3,Ye,"InvalidRequestException",{[Ve]:He,[Ne]:400},[Ve,Ke,Ze],[0,0,0]];Qe.registerError(nr,je);var sr=[-3,Ye,"InvalidScopeException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(sr,Fe);var cr=[-3,Ye,"SlowDownException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(cr,ze);var ar=[-3,Ye,"UnauthorizedClientException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(ar,qe);var pr=[-3,Ye,"UnsupportedGrantTypeException",{[Ve]:He,[Ne]:400},[Ve,Ze],[0,0]];Qe.registerError(pr,Ge);const dr=[Be,Qe];var ur=[0,Ye,"AccessToken",8,0],lr=[0,Ye,"ClientSecret",8,0],hr=[0,Ye,"CodeVerifier",8,0],gr=[0,Ye,"IdToken",8,0],mr=[0,Ye,"RefreshToken",8,0],fr=[3,Ye,"CreateTokenRequest",0,["clientId","clientSecret","grantType","deviceCode","code",Le,"scope","redirectUri","codeVerifier"],[0,[()=>lr,0],0,0,0,[()=>mr,0],64,0,[()=>hr,0]],3],Sr=[3,Ye,"CreateTokenResponse",0,["accessToken","tokenType","expiresIn",Le,"idToken"],[[()=>ur,0],0,1,[()=>mr,0],[()=>gr,0]]],vr=[9,Ye,"CreateToken",{[Me]:["POST","/token",200]},()=>fr,()=>Sr];var yr=t(93673),Er=t(78646),xr=t(18081);class Pr extends S.K{config;constructor(...[e]){const r=(e=>{(0,j.I)(process.version);const r=(0,q.I)(e),t=()=>r().then(F.l),o=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??K.E,base64Encoder:e?.base64Encoder??L.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??be,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??P,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new H.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Z.m}],logger:e?.logger??new M.N,protocol:e?.protocol??V.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:dr,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??N.D,utf8Decoder:e?.utf8Decoder??W.a,utf8Encoder:e?.utf8Encoder??Y.P}))(e);(0,O.I)(process.version);const i={profile:e?.profile,logger:o.logger};return{...o,...e,runtime:"node",defaultsMode:r,authSchemePreference:e?.authSchemePreference??(0,$.Z)(b.$,i),bodyLengthChecker:e?.bodyLengthChecker??z.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,w.pf)({serviceId:o.serviceId,clientVersion:k.rE}),maxAttempts:e?.maxAttempts??(0,$.Z)(m.qs,e),region:e?.region??(0,$.Z)(A.GG,{...A.zH,...i}),requestHandler:R.$.create(e?.requestHandler??t),retryMode:e?.retryMode??(0,$.Z)({...m.kN,default:async()=>(await t()).retryMode||G.L0},e),sha256:e?.sha256??T.V.bind(null,"sha256"),streamCollector:e?.streamCollector??U.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,$.Z)(D.e$,i),useFipsEndpoint:e?.useFipsEndpoint??(0,$.Z)(_.Ko,i),userAgentAppId:e?.userAgentAppId??(0,$.Z)(C.hV,i)}})(e||{});super(r),this.initConfig=r;const t=(S=r,Object.assign(S,{useDualstackEndpoint:S.useDualstackEndpoint??!1,useFipsEndpoint:S.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}));var S;const y=(0,s.D)(t),I=(0,m.$z)(y),B=(0,a.T)(I),J=(0,o.OV)(B),Q=((e,r)=>{const t=Object.assign((0,yr.R)(e),(0,xr.xA)(e),(0,Er.e)(e),(e=>{const r=e.httpAuthSchemes;let t=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(e){const t=r.findIndex(r=>r.schemeId===e.schemeId);-1===t?r.push(e):r.splice(t,1,e)},httpAuthSchemes:()=>r,setHttpAuthSchemeProvider(e){t=e},httpAuthSchemeProvider:()=>t,setCredentials(e){o=e},credentials:()=>o}})(e));return r.forEach(e=>e.configure(t)),Object.assign(e,(0,yr.$)(t),(0,xr.uv)(t),(0,Er.j)(t),{httpAuthSchemes:(o=t).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const r=(0,v.h)(e);return Object.assign(r,{authSchemePreference:(0,E.t)(e.authSchemePreference??[])})})((0,g.C)(J)),e?.extensions||[]);this.config=Q,this.middlewareStack.use((0,l.wq)(this.config)),this.middlewareStack.use((0,c.sM)(this.config)),this.middlewareStack.use((0,f.ey)(this.config)),this.middlewareStack.use((0,h.vK)(this.config)),this.middlewareStack.use((0,o.TC)(this.config)),this.middlewareStack.use((0,i.Y7)(this.config)),this.middlewareStack.use((0,n.n)(this.config)),this.middlewareStack.use((0,p.w)(this.config,{httpAuthSchemeParametersProvider:x,identityProviderConfigProvider:async e=>new d.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,u.l)(this.config))}destroy(){super.destroy()}}var Ir=t(66686),kr=t(22869);class Or extends(kr.u.classBuilder().ep(I).m(function(e,r,t,o){return[(0,Ir.r)(t,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(vr).build()){}},90966:e=>{e.exports={rE:"3.990.0"}}};
package/dist/238.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=238,exports.ids=[238,857],exports.modules={1238:(e,s,o)=>{o.d(s,{fromSSO:()=>v});var n=o(43281),t=o(98229),i=o(32410),r=o(40768),a=o(90814),c=o(46086);const l=e=>Object.entries(e).filter(([e])=>e.startsWith(a.I.SSO_SESSION+c.Q)).reduce((e,[s,o])=>({...e,[s.substring(s.indexOf(c.Q)+1)]:o}),{});var g=o(41844),f=o(35789);const p=()=>({}),d=async(e={})=>(0,f.TA)(e.configFilepath??(0,r.g)()).then(g.A).then(l).catch(p);var h=o(3748),w=o(68413);class u extends w.m{name="TokenProviderError";constructor(e,s=!0){super(e,s),Object.setPrototypeOf(this,u.prototype)}}var C=o(78405);const S="To refresh this SSO session run 'aws sso login' with the corresponding profile.",_=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new u(`Token is expired. ${S}`,!1)},k=(e,s,o=!1)=>{if(void 0===s)throw new u(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${S}`,!1)};var m=o(28226),y=o(79896);const{writeFile:T}=y.promises,x=new Date(0),O=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const n=await(0,i.Y)(e),r=(0,t.Bz)({profile:e.profile??s?.profile}),a=n[r];if(!a)throw new u(`Profile '${r}' could not be found in shared credentials file.`,!1);if(!a.sso_session)throw new u(`Profile '${r}' is missing required property 'sso_session'.`);const c=a.sso_session,l=(await d(e))[c];if(!l)throw new u(`Sso session '${c}' could not be found in shared credentials file.`,!1);for(const e of["sso_start_url","sso_region"])if(!l[e])throw new u(`Sso session '${c}' is missing required property '${e}'.`,!1);l.sso_start_url;const g=l.sso_region;let f;try{f=await(0,C.v)(c)}catch(e){throw new u(`The SSO session token associated with profile=${r} was not found or is invalid. ${S}`,!1)}k("accessToken",f.accessToken),k("expiresAt",f.expiresAt);const{accessToken:p,expiresAt:h}=f,w={token:p,expiration:new Date(h)};if(w.expiration.getTime()-Date.now()>3e5)return w;if(Date.now()-x.getTime()<3e4)return _(w),w;k("clientId",f.clientId,!0),k("clientSecret",f.clientSecret,!0),k("refreshToken",f.refreshToken,!0);try{x.setTime(Date.now());const n=await(async(e,s,n={},t)=>{const{CreateTokenCommand:i}=await Promise.all([o.e(139),o.e(202)]).then(o.bind(o,9202)),r=await(async(e,s={},n)=>{const{SSOOIDCClient:t}=await Promise.all([o.e(139),o.e(202)]).then(o.bind(o,9202)),i=e=>s.clientConfig?.[e]??s.parentClientConfig?.[e]??n?.[e];return new t(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:i("logger"),userAgentAppId:i("userAgentAppId")}))})(s,n,t);return r.send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))})(f,g,e,s);k("accessToken",n.accessToken),k("expiresIn",n.expiresIn);const t=new Date(Date.now()+1e3*n.expiresIn);try{await((e,s)=>{const o=(0,m.C)(e),n=JSON.stringify(s,null,2);return T(o,n)})(c,{...f,accessToken:n.accessToken,expiresAt:t.toISOString(),refreshToken:n.refreshToken})}catch(e){}return{token:n.accessToken,expiration:t}}catch(e){return _(w),w}},I=!1,A=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:t,ssoRegion:i,ssoRoleName:r,ssoClient:a,clientConfig:c,parentClientConfig:l,callerClientConfig:g,profile:f,filepath:p,configFilepath:d,ignoreCache:w,logger:u})=>{let S;const _="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const e=await O({profile:f,filepath:p,configFilepath:d,ignoreCache:w})();S={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new n.C(e.message,{tryNextLink:I,logger:u})}else try{S=await(0,C.v)(e)}catch(e){throw new n.C(`The SSO session associated with this profile is invalid. ${_}`,{tryNextLink:I,logger:u})}if(new Date(S.expiresAt).getTime()-Date.now()<=0)throw new n.C(`The SSO session associated with this profile has expired. ${_}`,{tryNextLink:I,logger:u});const{accessToken:k}=S,{SSOClient:m,GetRoleCredentialsCommand:y}=await Promise.all([o.e(139),o.e(114)]).then(o.bind(o,2114)),T=a||new m(Object.assign({},c??{},{logger:c?.logger??g?.logger??l?.logger,region:c?.region??i,userAgentAppId:c?.userAgentAppId??g?.userAgentAppId??l?.userAgentAppId}));let x;try{x=await T.send(new y({accountId:t,roleName:r,accessToken:k}))}catch(e){throw new n.C(e,{tryNextLink:I,logger:u})}const{roleCredentials:{accessKeyId:A,secretAccessKey:v,sessionToken:N,expiration:$,credentialScope:R,accountId:b}={}}=x;if(!(A&&v&&N&&$))throw new n.C("SSO returns an invalid temporary credential.",{tryNextLink:I,logger:u});const D={accessKeyId:A,secretAccessKey:v,sessionToken:N,expiration:new Date($),...R&&{credentialScope:R},...b&&{accountId:b}};return s?(0,h.g)(D,"CREDENTIALS_SSO","s"):(0,h.g)(D,"CREDENTIALS_SSO_LEGACY","u"),D},v=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:o,ssoAccountId:r,ssoRegion:a,ssoRoleName:c,ssoSession:l}=e,{ssoClient:g}=e,f=(0,t.Bz)({profile:e.profile??s?.profile});if(o||r||a||c||l){if(o&&r&&a&&c)return A({ssoStartUrl:o,ssoSession:l,ssoAccountId:r,ssoRegion:a,ssoRoleName:c,ssoClient:g,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:f,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger});throw new n.C('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger})}{const s=(await(0,i.Y)(e))[f];if(!s)throw new n.C(`Profile ${f} was not found.`,{logger:e.logger});if(!(p=s)||"string"!=typeof p.sso_start_url&&"string"!=typeof p.sso_account_id&&"string"!=typeof p.sso_session&&"string"!=typeof p.sso_region&&"string"!=typeof p.sso_role_name)throw new n.C(`Profile ${f} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){const t=(await d(e))[s.sso_session],i=` configurations in profile ${f} and sso-session ${s.sso_session}`;if(a&&a!==t.sso_region)throw new n.C("Conflicting SSO region"+i,{tryNextLink:!1,logger:e.logger});if(o&&o!==t.sso_start_url)throw new n.C("Conflicting SSO start_url"+i,{tryNextLink:!1,logger:e.logger});s.sso_region=t.sso_region,s.sso_start_url=t.sso_start_url}const{sso_start_url:t,sso_account_id:r,sso_region:c,sso_role_name:l,sso_session:h}=((e,s)=>{const{sso_start_url:o,sso_account_id:t,sso_region:i,sso_role_name:r}=e;if(!(o&&t&&i&&r))throw new n.C(`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:s});return e})(s,e.logger);return A({ssoStartUrl:t,ssoSession:h,ssoAccountId:r,ssoRegion:c,ssoRoleName:l,ssoClient:g,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:f,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}var p}},28226:(e,s,o)=>{o.d(s,{C:()=>r});var n=o(76982),t=o(16928),i=o(14581);const r=e=>{const s=(0,n.createHash)("sha1").update(e).digest("hex");return(0,t.join)((0,i.R)(),".aws","sso","cache",`${s}.json`)}},32410:(e,s,o)=>{o.d(s,{Y:()=>t});var n=o(13770);const t=async e=>{const s=await(0,n.p)(e);return((...e)=>{const s={};for(const o of e)for(const[e,n]of Object.entries(o))void 0!==s[e]?Object.assign(s[e],n):s[e]=n;return s})(s.configFile,s.credentialsFile)}},78405:(e,s,o)=>{o.d(s,{a:()=>i,v:()=>r});var n=o(91943),t=o(28226);const i={},r=async e=>{if(i[e])return i[e];const s=(0,t.C)(e),o=await(0,n.readFile)(s,"utf8");return JSON.parse(o)}}};
package/dist/294.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=294,exports.ids=[294],exports.modules={44128:(e,t,r)=>{r.d(t,{c:()=>p});var o=r(64327),n=r(25272),a=r(2203),s=r(12544);var i=r(39181),c=r(92278),l=r(2914);const d=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),u="The stream has already been transformed.",f=e=>{if(!h(e)&&!d(e))throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`);let t=!1;const r=async()=>{if(t)throw new Error(u);return t=!0,await(async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,r)=>{const o=new FileReader;o.onloadend=()=>{if(2!==o.readyState)return r(new Error("Reader aborted too early"));const e=o.result??"",n=e.indexOf(","),a=n>-1?n+1:e.length;t(e.substring(a))},o.onabort=()=>r(new Error("Read aborted")),o.onerror=()=>r(o.error),o.readAsDataURL(e)})}(e),r=(0,s.E)(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let o=!1,n=0;for(;!o;){const{done:e,value:a}=await r.read();a&&(t.push(a),n+=a.length),o=e}const a=new Uint8Array(n);let s=0;for(const e of t)a.set(e,s),s+=e.length;return a}(e))(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();if("base64"===e)return(0,i.n)(t);if("hex"===e)return(0,c.n)(t);if(void 0===e||"utf8"===e||"utf-8"===e)return(0,l.P)(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(u);if(t=!0,h(e))return(e=>{if("function"!=typeof e.stream)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 e.stream()})(e);if(d(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},h=e=>"function"==typeof Blob&&e instanceof Blob,w="The stream has already been transformed.",p=e=>{if(!(e instanceof a.Readable))try{return f(e)}catch(t){throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const r=async()=>{if(t)throw new Error(w);return t=!0,await(0,o.k)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async e=>{const t=await r();return void 0===e||Buffer.isEncoding(e)?(0,n.Q)(t.buffer,t.byteOffset,t.byteLength).toString(e):new TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw new Error(w);if(null!==e.readableFlowing)throw new Error("The stream has been consumed by other callbacks.");if("function"!=typeof a.Readable.toWeb)throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,a.Readable.toWeb(e)}})}},77294:(e,t,r)=>{r.d(t,{fromHttp:()=>u});var o=r(3748),n=r(24176),a=r(43281),s=r(91943),i=r.n(s),c=r(81781),l=r(10015),d=r(44128);const u=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const r=e.awsContainerCredentialsRelativeUri??process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,s=e.awsContainerCredentialsFullUri??process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI,u=e.awsContainerAuthorizationToken??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN,f=e.awsContainerAuthorizationTokenFile??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE,h="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?.warn?e.logger.warn.bind(e.logger):console.warn;if(r&&s&&(h("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),h("awsContainerCredentialsFullUri will take precedence.")),u&&f&&(h("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),h("awsContainerAuthorizationToken will take precedence.")),s)t=s;else{if(!r)throw new a.C("No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.",{logger:e.logger});t=`http://169.254.170.2${r}`}const w=new URL(t);((e,t)=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),r=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&r(t[1])&&r(t[2])&&r(t[3])&&4===t.length)return}throw new a.C("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]",{logger:t})}})(w,e.logger);const p=n.$.create({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return m=async()=>{const t=function(e){return new c.K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((e,[t,r])=>(e[t]=r,e),{}),fragment:e.hash})}(w);u?t.headers.Authorization=u:f&&(t.headers.Authorization=(await i().readFile(f)).toString());try{return async function(e,t){const r=(0,d.c)(e.body),o=await r.transformToString();if(200===e.statusCode){const e=JSON.parse(o);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new a.C("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:(0,l.EI)(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(o)}catch(e){}throw Object.assign(new a.C(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new a.C(`Server responded with status: ${e.statusCode}`,{logger:t})}((await p.handle(t)).response).then(e=>(0,o.g)(e,"CREDENTIALS_HTTP","z"))}catch(t){throw new a.C(String(t),{logger:e.logger})}},g=e.maxRetries??3,y=e.timeout??1e3,async()=>{for(let e=0;e<g;++e)try{return await m()}catch(e){await new Promise(e=>setTimeout(e,y))}return await m()};var m,g,y}}};
package/dist/374.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=374,exports.ids=[374],exports.modules={37374:(e,t,r)=>{r.d(t,{CreateOAuth2TokenCommand:()=>kt,SigninClient:()=>St});var s=r(97040),n=r(74534),o=r(70775),i=r(86693),a=r(66575),c=r(94615),p=r(45326),u=r(9575),d=r(68249),h=r(75279),l=r(10860),g=r(39412),m=r(72084),f=r(10773),y=r(9942),S=r(63089),v=r(45547),P=r(81974);const k=async(e,t,r)=>({operation:(0,v.u)(t).operation,region:await(0,P.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),E=e=>{const t=[];return"CreateOAuth2Token"===e.operation?t.push({schemeId:"smithy.api#noAuth"}):t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},A={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var I=r(90966),x=r(10706),w=r(56232),b=r(60803),O=r(52005),R=r(96901),D=r(24661),T=r(46109),C=r(5012),F=r(7387),U=r(24176),$=r(64327),q=r(34338),j=r(57815),z=r(55425),M=r(99816),V=r(48828),H=r(70868),Z=r(80843),K=r(14433),N=r(3761),B=r(67933),L=r(12544),G=r(39181),Y=r(40935),J=r(2914),Q=r(53037),W=r(48105),X=r(1034),_=r(7856);const ee="required",te="fn",re="argv",se="ref",ne=!0,oe="isSet",ie="booleanEquals",ae="error",ce="endpoint",pe="tree",ue="PartitionResult",de="stringEquals",he={[ee]:!0,default:!1,type:"boolean"},le={[ee]:!1,type:"string"},ge={[se]:"Endpoint"},me={[te]:ie,[re]:[{[se]:"UseFIPS"},!0]},fe={[te]:ie,[re]:[{[se]:"UseDualStack"},!0]},ye={},Se={[te]:"getAttr",[re]:[{[se]:ue},"name"]},ve={[te]:ie,[re]:[{[se]:"UseFIPS"},!1]},Pe={[te]:ie,[re]:[{[se]:"UseDualStack"},!1]},ke={[te]:"getAttr",[re]:[{[se]:ue},"supportsFIPS"]},Ee={[te]:ie,[re]:[!0,{[te]:"getAttr",[re]:[{[se]:ue},"supportsDualStack"]}]},Ae=[{[se]:"Region"}],Ie={version:"1.0",parameters:{UseDualStack:he,UseFIPS:he,Endpoint:le,Region:le},rules:[{conditions:[{[te]:oe,[re]:[ge]}],rules:[{conditions:[me],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ae},{rules:[{conditions:[fe],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ae},{endpoint:{url:ge,properties:ye,headers:ye},type:ce}],type:pe}],type:pe},{rules:[{conditions:[{[te]:oe,[re]:Ae}],rules:[{conditions:[{[te]:"aws.partition",[re]:Ae,assign:ue}],rules:[{conditions:[{[te]:de,[re]:[Se,"aws"]},ve,Pe],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:ye,headers:ye},type:ce},{conditions:[{[te]:de,[re]:[Se,"aws-cn"]},ve,Pe],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:ye,headers:ye},type:ce},{conditions:[{[te]:de,[re]:[Se,"aws-us-gov"]},ve,Pe],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:ye,headers:ye},type:ce},{conditions:[me,fe],rules:[{conditions:[{[te]:ie,[re]:[ne,ke]},Ee],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ye,headers:ye},type:ce}],type:pe},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ae}],type:pe},{conditions:[me,Pe],rules:[{conditions:[{[te]:ie,[re]:[ke,ne]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ye,headers:ye},type:ce}],type:pe},{error:"FIPS is enabled but this partition does not support FIPS",type:ae}],type:pe},{conditions:[ve,fe],rules:[{conditions:[Ee],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ye,headers:ye},type:ce}],type:pe},{error:"DualStack is enabled but this partition does not support DualStack",type:ae}],type:pe},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:ye,headers:ye},type:ce}],type:pe}],type:pe},{error:"Invalid Configuration: Missing Region",type:ae}],type:pe}]},xe=new W.k({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),we=(e,t={})=>xe.get(e,()=>(0,X.s)(Ie,{endpointParams:e,logger:t.logger}));_.m.aws=Q.UF;var be=r(51453),Oe=r(6723);class Re extends Oe.T{constructor(e){super(e),Object.setPrototypeOf(this,Re.prototype)}}class De extends Re{name="AccessDeniedException";$fault="client";error;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,De.prototype),this.error=e.error}}class Te extends Re{name="InternalServerException";$fault="server";error;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Te.prototype),this.error=e.error}}class Ce extends Re{name="TooManyRequestsError";$fault="client";error;constructor(e){super({name:"TooManyRequestsError",$fault:"client",...e}),Object.setPrototypeOf(this,Ce.prototype),this.error=e.error}}class Fe extends Re{name="ValidationException";$fault="client";error;constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,Fe.prototype),this.error=e.error}}const Ue="accessKeyId",$e="accessToken",qe="client",je="clientId",ze="codeVerifier",Me="error",Ve="expiresIn",He="grantType",Ze="http",Ke="httpError",Ne="idToken",Be="jsonName",Le="message",Ge="refreshToken",Ye="redirectUri",Je="smithy.ts.sdk.synthetic.com.amazonaws.signin",Qe="secretAccessKey",We="sessionToken",Xe="tokenType",_e="com.amazonaws.signin",et=be.O.for(Je);var tt=[-3,Je,"SigninServiceException",0,[],[]];et.registerError(tt,Re);const rt=be.O.for(_e);var st=[-3,_e,"AccessDeniedException",{[Me]:qe},[Me,Le],[0,0],2];rt.registerError(st,De);var nt=[-3,_e,"InternalServerException",{[Me]:"server",[Ke]:500},[Me,Le],[0,0],2];rt.registerError(nt,Te);var ot=[-3,_e,"TooManyRequestsError",{[Me]:qe,[Ke]:429},[Me,Le],[0,0],2];rt.registerError(ot,Ce);var it=[-3,_e,"ValidationException",{[Me]:qe,[Ke]:400},[Me,Le],[0,0],2];rt.registerError(it,Fe);const at=[et,rt];var ct=[0,_e,"RefreshToken",8,0],pt=[3,_e,"AccessToken",8,[Ue,Qe,We],[[0,{[Be]:Ue}],[0,{[Be]:Qe}],[0,{[Be]:We}]],3],ut=[3,_e,"CreateOAuth2TokenRequest",0,["tokenInput"],[[()=>dt,16]],1],dt=[3,_e,"CreateOAuth2TokenRequestBody",0,[je,He,"code",Ye,ze,Ge],[[0,{[Be]:je}],[0,{[Be]:He}],0,[0,{[Be]:Ye}],[0,{[Be]:ze}],[()=>ct,{[Be]:Ge}]],2],ht=[3,_e,"CreateOAuth2TokenResponse",0,["tokenOutput"],[[()=>lt,16]],1],lt=[3,_e,"CreateOAuth2TokenResponseBody",0,[$e,Xe,Ve,Ge,Ne],[[()=>pt,{[Be]:$e}],[0,{[Be]:Xe}],[1,{[Be]:Ve}],[()=>ct,{[Be]:Ge}],[0,{[Be]:Ne}]],4],gt=[9,_e,"CreateOAuth2Token",{[Ze]:["POST","/v1/token",200]},()=>ut,()=>ht];var mt=r(93673),ft=r(78646),yt=r(18081);class St extends y.K{config;constructor(...[e]){const t=(e=>{(0,q.I)(process.version);const t=(0,M.I)(e),r=()=>t().then(j.l),s=(e=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??L.E,base64Encoder:e?.base64Encoder??G.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??we,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??E,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new H.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new K.m}],logger:e?.logger??new N.N,protocol:e?.protocol??Z.Y,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:at,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??B.D,utf8Decoder:e?.utf8Decoder??Y.a,utf8Encoder:e?.utf8Encoder??J.P}))(e);(0,x.I)(process.version);const n={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,F.Z)(w.$,n),bodyLengthChecker:e?.bodyLengthChecker??z.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,b.pf)({serviceId:s.serviceId,clientVersion:I.rE}),maxAttempts:e?.maxAttempts??(0,F.Z)(m.qs,e),region:e?.region??(0,F.Z)(R.GG,{...R.zH,...n}),requestHandler:U.$.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,F.Z)({...m.kN,default:async()=>(await r()).retryMode||V.L0},e),sha256:e?.sha256??C.V.bind(null,"sha256"),streamCollector:e?.streamCollector??$.k,useDualstackEndpoint:e?.useDualstackEndpoint??(0,F.Z)(D.e$,n),useFipsEndpoint:e?.useFipsEndpoint??(0,F.Z)(T.Ko,n),userAgentAppId:e?.userAgentAppId??(0,F.Z)(O.hV,n)}})(e||{});super(t),this.initConfig=t;const r=(y=t,Object.assign(y,{useDualstackEndpoint:y.useDualstackEndpoint??!1,useFipsEndpoint:y.useFipsEndpoint??!1,defaultSigningName:"signin"}));var y;const v=(0,i.D)(r),A=(0,m.$z)(v),Q=(0,c.T)(A),W=(0,s.OV)(Q),X=((e,t)=>{const r=Object.assign((0,mt.R)(e),(0,yt.xA)(e),(0,ft.e)(e),(e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,s=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex(t=>t.schemeId===e.schemeId);-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){s=e},credentials:()=>s}})(e));return t.forEach(e=>e.configure(r)),Object.assign(e,(0,mt.$)(r),(0,yt.uv)(r),(0,ft.j)(r),{httpAuthSchemes:(s=r).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=(0,S.h)(e);return Object.assign(t,{authSchemePreference:(0,P.t)(e.authSchemePreference??[])})})((0,g.C)(W)),e?.extensions||[]);this.config=X,this.middlewareStack.use((0,h.wq)(this.config)),this.middlewareStack.use((0,a.sM)(this.config)),this.middlewareStack.use((0,f.ey)(this.config)),this.middlewareStack.use((0,l.vK)(this.config)),this.middlewareStack.use((0,s.TC)(this.config)),this.middlewareStack.use((0,n.Y7)(this.config)),this.middlewareStack.use((0,o.n)(this.config)),this.middlewareStack.use((0,p.w)(this.config,{httpAuthSchemeParametersProvider:k,identityProviderConfigProvider:async e=>new u.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,d.l)(this.config))}destroy(){super.destroy()}}var vt=r(66686),Pt=r(22869);class kt extends(Pt.u.classBuilder().ep(A).m(function(e,t,r,s){return[(0,vt.r)(r,e.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(gt).build()){}},90966:e=>{e.exports={rE:"3.990.0"}}};
package/dist/529.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=529,exports.ids=[529],exports.modules={28226:(e,n,o)=>{o.d(n,{C:()=>s});var r=o(76982),t=o(16928),i=o(14581);const s=e=>{const n=(0,r.createHash)("sha1").update(e).digest("hex");return(0,t.join)((0,i.R)(),".aws","sso","cache",`${n}.json`)}},34529:(e,n,o)=>{o.d(n,{fromTokenFile:()=>d});var r=o(3748),t=o(43281),i=o(70737),s=o(79896);const a="AWS_WEB_IDENTITY_TOKEN_FILE",d=(e={})=>async n=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const d=e?.webIdentityTokenFile??process.env[a],c=e?.roleArn??process.env.AWS_ROLE_ARN,l=e?.roleSessionName??process.env.AWS_ROLE_SESSION_NAME;if(!d||!c)throw new t.C("Web identity configuration not specified",{logger:e.logger});const g=await(e=>async n=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:r,roleSessionName:t,webIdentityToken:i,providerId:s,policyArns:a,policy:d,durationSeconds:c}=e;let{roleAssumerWithWebIdentity:l}=e;if(!l){const{getDefaultRoleAssumerWithWebIdentity:r}=await o.e(200).then(o.bind(o,6200));l=r({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...n?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return l({RoleArn:r,RoleSessionName:t??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:s,PolicyArns:a,Policy:d,DurationSeconds:c})})({...e,webIdentityToken:i.Z?.getTokenRecord?.()[d]??(0,s.readFileSync)(d,{encoding:"ascii"}),roleArn:c,roleSessionName:l})(n);return d===process.env[a]&&(0,r.g)(g,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),g}},70737:(e,n,o)=>{o.d(n,{Z:()=>i});var r=o(78405),t=o(35789);const i={getFileRecord:()=>t.Jj,interceptFile(e,n){t.Jj[e]=Promise.resolve(n)},getTokenRecord:()=>r.a,interceptToken(e,n){r.a[e]=n}}},78405:(e,n,o)=>{o.d(n,{a:()=>i,v:()=>s});var r=o(91943),t=o(28226);const i={},s=async e=>{if(i[e])return i[e];const n=(0,t.C)(e),o=await(0,r.readFile)(n,"utf8");return JSON.parse(o)}}};
package/dist/627.js DELETED
@@ -1 +0,0 @@
1
- "use strict";exports.id=627,exports.ids=[627],exports.modules={32410:(e,t,n)=>{n.d(t,{Y:()=>o});var r=n(13770);const o=async e=>{const t=await(0,r.p)(e);return((...e)=>{const t={};for(const n of e)for(const[e,r]of Object.entries(n))void 0!==t[e]?Object.assign(t[e],r):t[e]=r;return t})(t.configFile,t.credentialsFile)}},93008:(e,t,n)=>{n.d(t,{fromIni:()=>k});var r=n(32410),o=n(98229),i=n(43281),s=n(3748),a=n(53433);const c=e=>(0,s.g)(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),l=e=>!e.role_arn&&!!e.credential_source;var g=n(81781),d=n(35789),f=n(77598),u=n(73024),p=n(48161),h=n(76760);class _{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=3e5;constructor(e,t,n){this.profileData=e,this.init=t,this.callerClientConfig=n}async loadCredentials(){const e=await this.loadToken();if(!e)throw new i.C(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});const t=e.accessToken,n=Date.now();return new Date(t.expiresAt).getTime()-n<=_.REFRESH_THRESHOLD?this.refresh(e):{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,accountId:t.accountId,expiration:new Date(t.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){const{SigninClient:t,CreateOAuth2TokenCommand:r}=await Promise.all([n.e(139),n.e(374)]).then(n.bind(n,37374)),{logger:o,userAgentAppId:s}=this.callerClientConfig??{},a=(e=>"h2"===e?.metadata?.handlerProtocol)(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,c=new t({credentials:{accessKeyId:"",secretAccessKey:""},region:this.profileData.region??await(this.callerClientConfig?.region?.())??process.env.AWS_REGION,requestHandler:a,logger:o,userAgentAppId:s,...this.init?.clientConfig});this.createDPoPInterceptor(c.middlewareStack);const l={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:"refresh_token"}};try{const t=await c.send(new r(l)),{accessKeyId:n,secretAccessKey:o,sessionToken:s}=t.tokenOutput?.accessToken??{},{refreshToken:a,expiresIn:g}=t.tokenOutput??{};if(!(n&&o&&s&&a))throw new i.C("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});const d=1e3*(g??900),f=new Date(Date.now()+d),u={...e,accessToken:{...e.accessToken,accessKeyId:n,secretAccessKey:o,sessionToken:s,expiresAt:f.toISOString()},refreshToken:a};await this.saveToken(u);const p=u.accessToken;return{accessKeyId:p.accessKeyId,secretAccessKey:p.secretAccessKey,sessionToken:p.sessionToken,accountId:p.accountId,expiration:f}}catch(e){if("AccessDeniedException"===e.name){let t;switch(e.error){case"TOKEN_EXPIRED":t="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":t="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":t="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:t=`Failed to refresh token: ${String(e)}. Please re-authenticate using \`aws login\``}throw new i.C(t,{logger:this.logger,tryNextLink:!1})}throw new i.C(`Failed to refresh token: ${String(e)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){const e=this.getTokenFilePath();try{let t;try{t=await(0,d.TA)(e,{ignoreCache:this.init?.ignoreCache})}catch{t=await u.promises.readFile(e,"utf8")}const n=JSON.parse(t),r=["accessToken","clientId","refreshToken","dpopKey"].filter(e=>!n[e]);if(n.accessToken?.accountId||r.push("accountId"),r.length>0)throw new i.C(`Token validation failed, missing fields: ${r.join(", ")}`,{logger:this.logger,tryNextLink:!1});return n}catch(t){throw new i.C(`Failed to load token from ${e}: ${String(t)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){const t=this.getTokenFilePath(),n=(0,h.dirname)(t);try{await u.promises.mkdir(n,{recursive:!0})}catch(e){}await u.promises.writeFile(t,JSON.stringify(e,null,2),"utf8")}getTokenFilePath(){const e=process.env.AWS_LOGIN_CACHE_DIRECTORY??(0,h.join)((0,p.homedir)(),".aws","login","cache"),t=Buffer.from(this.loginSession,"utf8"),n=(0,f.createHash)("sha256").update(t).digest("hex");return(0,h.join)(e,`${n}.json`)}derToRawSignature(e){let t=2;if(2!==e[t])throw new Error("Invalid DER signature");t++;const n=e[t++];let r=e.subarray(t,t+n);if(t+=n,2!==e[t])throw new Error("Invalid DER signature");t++;const o=e[t++];let i=e.subarray(t,t+o);r=0===r[0]?r.subarray(1):r,i=0===i[0]?i.subarray(1):i;const s=Buffer.concat([Buffer.alloc(32-r.length),r]),a=Buffer.concat([Buffer.alloc(32-i.length),i]);return Buffer.concat([s,a])}createDPoPInterceptor(e){e.add(e=>async t=>{if(g.K.isInstance(t.request)){const e=t.request,n=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}${e.path}`,r=await this.generateDpop(e.method,n);e.headers={...e.headers,DPoP:r}}return e(t)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(e="POST",t){const n=await this.loadToken();try{const r=(0,f.createPrivateKey)({key:n.dpopKey,format:"pem",type:"sec1"}),o=(0,f.createPublicKey)(r).export({format:"der",type:"spki"});let i=-1;for(let e=0;e<o.length;e++)if(4===o[e]){i=e;break}const s=o.slice(i+1,i+33),a=o.slice(i+33,i+65),c={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:s.toString("base64url"),y:a.toString("base64url")}},l={jti:crypto.randomUUID(),htm:e,htu:t,iat:Math.floor(Date.now()/1e3)},g=`${Buffer.from(JSON.stringify(c)).toString("base64url")}.${Buffer.from(JSON.stringify(l)).toString("base64url")}`,d=(0,f.sign)("sha256",Buffer.from(g),r);return`${g}.${this.derToRawSignature(d).toString("base64url")}`}catch(e){throw new i.C(`Failed to generate Dpop proof: ${e instanceof Error?e.message:String(e)}`,{logger:this.logger,tryNextLink:!1})}}}const y=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.aws_access_key_id&&"string"==typeof e.aws_secret_access_key&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,w=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const n={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return(0,s.g)(n,"CREDENTIALS_PROFILE","n")},C=async(e,t,g,d,f={},u=!1)=>{const p=t[e];if(Object.keys(f).length>0&&y(p))return w(p,g);if(u||((e,{profile:t="default",logger:n}={})=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.role_arn&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(((e,{profile:t,logger:n})=>{const r="string"==typeof e.source_profile&&void 0===e.credential_source;return r&&n?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),r})(e,{profile:t,logger:n})||((e,{profile:t,logger:n})=>{const r="string"==typeof e.credential_source&&void 0===e.source_profile;return r&&n?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),r})(e,{profile:t,logger:n})))(p,{profile:e,logger:g.logger}))return(async(e,t,r,g,d={},f)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const u=t[e],{source_profile:p,region:h}=u;if(!r.roleAssumer){const{getDefaultRoleAssumer:e}=await n.e(200).then(n.bind(n,6200));r.roleAssumer=e({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...g,...r?.parentClientConfig,region:h??r?.parentClientConfig?.region??g?.region}},r.clientPlugins)}if(p&&p in d)throw new i.C(`Detected a cycle attempting to resolve credentials for profile ${(0,o.Bz)(r)}. Profiles visited: `+Object.keys(d).join(", "),{logger:r.logger});r.logger?.debug("@aws-sdk/credential-provider-ini - finding credential resolver using "+(p?`source_profile=[${p}]`:`profile=[${e}]`));const _=p?f(p,t,r,g,{...d,[p]:!0},l(t[p]??{})):(await((e,t,r)=>{const o={EcsContainer:async e=>{const{fromHttp:t}=await n.e(294).then(n.bind(n,77294)),{fromContainerMetadata:o}=await n.e(866).then(n.bind(n,8866));return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>(0,a.c)(t(e??{}),o(e))().then(c)},Ec2InstanceMetadata:async e=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:t}=await n.e(866).then(n.bind(n,8866));return async()=>t(e)().then(c)},Environment:async e=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:t}=await n.e(997).then(n.bind(n,98997));return async()=>t(e)().then(c)}};if(e in o)return o[e];throw new i.C(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})})(u.credential_source,e,r.logger)(r))();if(l(u))return _.then(e=>(0,s.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));{const t={RoleArn:u.role_arn,RoleSessionName:u.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:u.external_id,DurationSeconds:parseInt(u.duration_seconds||"3600",10)},{mfa_serial:n}=u;if(n){if(!r.mfaCodeProvider)throw new i.C(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});t.SerialNumber=n,t.TokenCode=await r.mfaCodeProvider(n)}const o=await _;return r.roleAssumer(o,t).then(e=>(0,s.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}})(e,t,g,d,f,C);if(y(p))return w(p,g);if(h=p,Boolean(h)&&"object"==typeof h&&"string"==typeof h.web_identity_token_file&&"string"==typeof h.role_arn&&["undefined","string"].indexOf(typeof h.role_session_name)>-1)return(async(e,t,r)=>n.e(529).then(n.bind(n,34529)).then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r}).then(e=>(0,s.g)(e,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q"))))(p,g,d);var h;if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.credential_process)(p))return(async(e,t)=>n.e(644).then(n.bind(n,78263)).then(({fromProcess:n})=>n({...e,profile:t})().then(e=>(0,s.g)(e,"CREDENTIALS_PROFILE_PROCESS","v"))))(g,e);if((e=>e&&("string"==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))(p))return await(async(e,t,r={},o)=>{const{fromSSO:i}=await n.e(857).then(n.bind(n,1238));return i({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then(e=>t.sso_session?(0,s.g)(e,"CREDENTIALS_PROFILE_SSO","r"):(0,s.g)(e,"CREDENTIALS_PROFILE_SSO_LEGACY","t"))})(e,p,g,d);if((e=>Boolean(e&&e.login_session))(p))return(async(e,t,n)=>{const a=await(c={...t,profile:e},async({callerClientConfig:e}={})=>{c?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");const t=await(0,r.Y)(c||{}),n=(0,o.Bz)({profile:c?.profile??e?.profile}),a=t[n];if(!a?.login_session)throw new i.C(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:c?.logger});const l=new _(a,c,e),g=await l.loadCredentials();return(0,s.g)(g,"CREDENTIALS_LOGIN","AD")})({callerClientConfig:n});var c;return(0,s.g)(a,"CREDENTIALS_PROFILE_LOGIN","AC")})(e,g,d);throw new i.C(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:g.logger})},k=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const n=await(0,r.Y)(e);return C((0,o.Bz)({profile:e.profile??t?.profile}),n,e,t)}}};