'use strict';

var WH45T4LS_cjs = require('./WH45T4LS.cjs');
var AOG2M3LV_cjs = require('./AOG2M3LV.cjs');
var AHQNBZE4_cjs = require('./AHQNBZE4.cjs');
var ZQFCLTYU_cjs = require('./ZQFCLTYU.cjs');
var _7ZH64OYR_cjs = require('./7ZH64OYR.cjs');
var OT5L7ME6_cjs = require('./OT5L7ME6.cjs');
var OWTMHDOF_cjs = require('./OWTMHDOF.cjs');
require('./7WVEMAKW.cjs');
var F7OAIAEX_cjs = require('./F7OAIAEX.cjs');
require('./P5BPMTGP.cjs');
require('./WDSPHVPJ.cjs');
require('./JGLHYXTW.cjs');
var U7VZULNU_cjs = require('./U7VZULNU.cjs');

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js
U7VZULNU_cjs.init_cjs_shims();
var defaultSSOOIDCHttpAuthSchemeParametersProvider = /* @__PURE__ */ U7VZULNU_cjs.__name(async (config, context, input) => {
  return {
    operation: _7ZH64OYR_cjs.getSmithyContext(context).operation,
    region: await _7ZH64OYR_cjs.normalizeProvider(config.region)() || (() => {
      throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
    })()
  };
}, "defaultSSOOIDCHttpAuthSchemeParametersProvider");
function createAwsAuthSigv4HttpAuthOption(authParameters) {
  return {
    schemeId: "aws.auth#sigv4",
    signingProperties: {
      name: "sso-oauth",
      region: authParameters.region
    },
    propertiesExtractor: /* @__PURE__ */ U7VZULNU_cjs.__name((config, context) => ({
      signingProperties: {
        config,
        context
      }
    }), "propertiesExtractor")
  };
}
U7VZULNU_cjs.__name(createAwsAuthSigv4HttpAuthOption, "createAwsAuthSigv4HttpAuthOption");
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
  return {
    schemeId: "smithy.api#noAuth"
  };
}
U7VZULNU_cjs.__name(createSmithyApiNoAuthHttpAuthOption, "createSmithyApiNoAuthHttpAuthOption");
var defaultSSOOIDCHttpAuthSchemeProvider = /* @__PURE__ */ U7VZULNU_cjs.__name((authParameters) => {
  const options = [];
  switch (authParameters.operation) {
    case "CreateToken": {
      options.push(createSmithyApiNoAuthHttpAuthOption());
      break;
    }
    default: {
      options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
    }
  }
  return options;
}, "defaultSSOOIDCHttpAuthSchemeProvider");
var resolveHttpAuthSchemeConfig = /* @__PURE__ */ U7VZULNU_cjs.__name((config) => {
  const config_0 = _7ZH64OYR_cjs.resolveAwsSdkSigV4Config(config);
  return Object.assign(config_0, {
    authSchemePreference: _7ZH64OYR_cjs.normalizeProvider(config.authSchemePreference ?? [])
  });
}, "resolveHttpAuthSchemeConfig");

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js
U7VZULNU_cjs.init_cjs_shims();
var resolveClientEndpointParameters = /* @__PURE__ */ U7VZULNU_cjs.__name((options) => {
  return Object.assign(options, {
    useDualstackEndpoint: options.useDualstackEndpoint ?? false,
    useFipsEndpoint: options.useFipsEndpoint ?? false,
    defaultSigningName: "sso-oauth"
  });
}, "resolveClientEndpointParameters");
var commonParams = {
  UseFIPS: {
    type: "builtInParams",
    name: "useFipsEndpoint"
  },
  Endpoint: {
    type: "builtInParams",
    name: "endpoint"
  },
  Region: {
    type: "builtInParams",
    name: "region"
  },
  UseDualStack: {
    type: "builtInParams",
    name: "useDualstackEndpoint"
  }
};

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js
U7VZULNU_cjs.init_cjs_shims();
var u = "required";
var v = "fn";
var w = "argv";
var x = "ref";
var a = true;
var b = "isSet";
var c = "booleanEquals";
var d = "error";
var e = "endpoint";
var f = "tree";
var g = "PartitionResult";
var h = "getAttr";
var i = {
  [u]: false,
  "type": "String"
};
var j = {
  [u]: true,
  "default": false,
  "type": "Boolean"
};
var k = {
  [x]: "Endpoint"
};
var l = {
  [v]: c,
  [w]: [
    {
      [x]: "UseFIPS"
    },
    true
  ]
};
var m = {
  [v]: c,
  [w]: [
    {
      [x]: "UseDualStack"
    },
    true
  ]
};
var n = {};
var o = {
  [v]: h,
  [w]: [
    {
      [x]: g
    },
    "supportsFIPS"
  ]
};
var p = {
  [x]: g
};
var q = {
  [v]: c,
  [w]: [
    true,
    {
      [v]: h,
      [w]: [
        p,
        "supportsDualStack"
      ]
    }
  ]
};
var r = [
  l
];
var s = [
  m
];
var t = [
  {
    [x]: "Region"
  }
];
var _data = {
  version: "1.0",
  parameters: {
    Region: i,
    UseDualStack: j,
    UseFIPS: j,
    Endpoint: i
  },
  rules: [
    {
      conditions: [
        {
          [v]: b,
          [w]: [
            k
          ]
        }
      ],
      rules: [
        {
          conditions: r,
          error: "Invalid Configuration: FIPS and custom endpoint are not supported",
          type: d
        },
        {
          conditions: s,
          error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
          type: d
        },
        {
          endpoint: {
            url: k,
            properties: n,
            headers: n
          },
          type: e
        }
      ],
      type: f
    },
    {
      conditions: [
        {
          [v]: b,
          [w]: t
        }
      ],
      rules: [
        {
          conditions: [
            {
              [v]: "aws.partition",
              [w]: t,
              assign: g
            }
          ],
          rules: [
            {
              conditions: [
                l,
                m
              ],
              rules: [
                {
                  conditions: [
                    {
                      [v]: c,
                      [w]: [
                        a,
                        o
                      ]
                    },
                    q
                  ],
                  rules: [
                    {
                      endpoint: {
                        url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
                        properties: n,
                        headers: n
                      },
                      type: e
                    }
                  ],
                  type: f
                },
                {
                  error: "FIPS and DualStack are enabled, but this partition does not support one or both",
                  type: d
                }
              ],
              type: f
            },
            {
              conditions: r,
              rules: [
                {
                  conditions: [
                    {
                      [v]: c,
                      [w]: [
                        o,
                        a
                      ]
                    }
                  ],
                  rules: [
                    {
                      conditions: [
                        {
                          [v]: "stringEquals",
                          [w]: [
                            {
                              [v]: h,
                              [w]: [
                                p,
                                "name"
                              ]
                            },
                            "aws-us-gov"
                          ]
                        }
                      ],
                      endpoint: {
                        url: "https://oidc.{Region}.amazonaws.com",
                        properties: n,
                        headers: n
                      },
                      type: e
                    },
                    {
                      endpoint: {
                        url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",
                        properties: n,
                        headers: n
                      },
                      type: e
                    }
                  ],
                  type: f
                },
                {
                  error: "FIPS is enabled but this partition does not support FIPS",
                  type: d
                }
              ],
              type: f
            },
            {
              conditions: s,
              rules: [
                {
                  conditions: [
                    q
                  ],
                  rules: [
                    {
                      endpoint: {
                        url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",
                        properties: n,
                        headers: n
                      },
                      type: e
                    }
                  ],
                  type: f
                },
                {
                  error: "DualStack is enabled but this partition does not support DualStack",
                  type: d
                }
              ],
              type: f
            },
            {
              endpoint: {
                url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}",
                properties: n,
                headers: n
              },
              type: e
            }
          ],
          type: f
        }
      ],
      type: f
    },
    {
      error: "Invalid Configuration: Missing Region",
      type: d
    }
  ]
};
var ruleSet = _data;

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js
var cache = new _7ZH64OYR_cjs.EndpointCache({
  size: 50,
  params: [
    "Endpoint",
    "Region",
    "UseDualStack",
    "UseFIPS"
  ]
});
var defaultEndpointResolver = /* @__PURE__ */ U7VZULNU_cjs.__name((endpointParams, context = {}) => {
  return cache.get(endpointParams, () => _7ZH64OYR_cjs.resolveEndpoint(ruleSet, {
    endpointParams,
    logger: context.logger
  }));
}, "defaultEndpointResolver");
_7ZH64OYR_cjs.customEndpointFunctions.aws = _7ZH64OYR_cjs.awsEndpointFunctions;

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js
var getRuntimeConfig = /* @__PURE__ */ U7VZULNU_cjs.__name((config) => {
  return {
    apiVersion: "2019-06-10",
    base64Decoder: config?.base64Decoder ?? OT5L7ME6_cjs.fromBase64,
    base64Encoder: config?.base64Encoder ?? OT5L7ME6_cjs.toBase64,
    disableHostPrefix: config?.disableHostPrefix ?? false,
    endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
    extensions: config?.extensions ?? [],
    httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,
    httpAuthSchemes: config?.httpAuthSchemes ?? [
      {
        schemeId: "aws.auth#sigv4",
        identityProvider: /* @__PURE__ */ U7VZULNU_cjs.__name((ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), "identityProvider"),
        signer: new _7ZH64OYR_cjs.AwsSdkSigV4Signer()
      },
      {
        schemeId: "smithy.api#noAuth",
        identityProvider: /* @__PURE__ */ U7VZULNU_cjs.__name((ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), "identityProvider"),
        signer: new AHQNBZE4_cjs.NoAuthSigner()
      }
    ],
    logger: config?.logger ?? new OT5L7ME6_cjs.NoOpLogger(),
    serviceId: config?.serviceId ?? "SSO OIDC",
    urlParser: config?.urlParser ?? F7OAIAEX_cjs.parseUrl,
    utf8Decoder: config?.utf8Decoder ?? OWTMHDOF_cjs.fromUtf8,
    utf8Encoder: config?.utf8Encoder ?? OWTMHDOF_cjs.toUtf8
  };
}, "getRuntimeConfig");

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js
var getRuntimeConfig2 = /* @__PURE__ */ U7VZULNU_cjs.__name((config) => {
  OT5L7ME6_cjs.emitWarningIfUnsupportedVersion(process.version);
  const defaultsMode = _7ZH64OYR_cjs.resolveDefaultsModeConfig(config);
  const defaultConfigProvider = /* @__PURE__ */ U7VZULNU_cjs.__name(() => defaultsMode().then(OT5L7ME6_cjs.loadConfigsForDefaultMode), "defaultConfigProvider");
  const clientSharedValues = getRuntimeConfig(config);
  _7ZH64OYR_cjs.emitWarningIfUnsupportedVersion(process.version);
  const loaderConfig = {
    profile: config?.profile,
    logger: clientSharedValues.logger
  };
  return {
    ...clientSharedValues,
    ...config,
    runtime: "node",
    defaultsMode,
    authSchemePreference: config?.authSchemePreference ?? F7OAIAEX_cjs.loadConfig(_7ZH64OYR_cjs.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
    bodyLengthChecker: config?.bodyLengthChecker ?? _7ZH64OYR_cjs.calculateBodyLength,
    defaultUserAgentProvider: config?.defaultUserAgentProvider ?? _7ZH64OYR_cjs.createDefaultUserAgentProvider({
      serviceId: clientSharedValues.serviceId,
      clientVersion: AOG2M3LV_cjs.package_default.version
    }),
    maxAttempts: config?.maxAttempts ?? F7OAIAEX_cjs.loadConfig(_7ZH64OYR_cjs.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
    region: config?.region ?? F7OAIAEX_cjs.loadConfig(_7ZH64OYR_cjs.NODE_REGION_CONFIG_OPTIONS, {
      ..._7ZH64OYR_cjs.NODE_REGION_CONFIG_FILE_OPTIONS,
      ...loaderConfig
    }),
    requestHandler: OT5L7ME6_cjs.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
    retryMode: config?.retryMode ?? F7OAIAEX_cjs.loadConfig({
      ..._7ZH64OYR_cjs.NODE_RETRY_MODE_CONFIG_OPTIONS,
      default: /* @__PURE__ */ U7VZULNU_cjs.__name(async () => (await defaultConfigProvider()).retryMode || _7ZH64OYR_cjs.DEFAULT_RETRY_MODE, "default")
    }, config),
    sha256: config?.sha256 ?? _7ZH64OYR_cjs.Hash.bind(null, "sha256"),
    streamCollector: config?.streamCollector ?? OT5L7ME6_cjs.streamCollector,
    useDualstackEndpoint: config?.useDualstackEndpoint ?? F7OAIAEX_cjs.loadConfig(_7ZH64OYR_cjs.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
    useFipsEndpoint: config?.useFipsEndpoint ?? F7OAIAEX_cjs.loadConfig(_7ZH64OYR_cjs.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
    userAgentAppId: config?.userAgentAppId ?? F7OAIAEX_cjs.loadConfig(_7ZH64OYR_cjs.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
  };
}, "getRuntimeConfig");

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js
U7VZULNU_cjs.init_cjs_shims();
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ U7VZULNU_cjs.__name((runtimeConfig) => {
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
  let _credentials = runtimeConfig.credentials;
  return {
    setHttpAuthScheme(httpAuthScheme) {
      const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
      if (index === -1) {
        _httpAuthSchemes.push(httpAuthScheme);
      } else {
        _httpAuthSchemes.splice(index, 1, httpAuthScheme);
      }
    },
    httpAuthSchemes() {
      return _httpAuthSchemes;
    },
    setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
      _httpAuthSchemeProvider = httpAuthSchemeProvider;
    },
    httpAuthSchemeProvider() {
      return _httpAuthSchemeProvider;
    },
    setCredentials(credentials) {
      _credentials = credentials;
    },
    credentials() {
      return _credentials;
    }
  };
}, "getHttpAuthExtensionConfiguration");
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ U7VZULNU_cjs.__name((config) => {
  return {
    httpAuthSchemes: config.httpAuthSchemes(),
    httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
    credentials: config.credentials()
  };
}, "resolveHttpAuthRuntimeConfig");

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js
var resolveRuntimeExtensions = /* @__PURE__ */ U7VZULNU_cjs.__name((runtimeConfig, extensions) => {
  const extensionConfiguration = Object.assign(_7ZH64OYR_cjs.getAwsRegionExtensionConfiguration(runtimeConfig), OT5L7ME6_cjs.getDefaultExtensionConfiguration(runtimeConfig), OT5L7ME6_cjs.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
  return Object.assign(runtimeConfig, _7ZH64OYR_cjs.resolveAwsRegionExtensionConfiguration(extensionConfiguration), OT5L7ME6_cjs.resolveDefaultRuntimeConfig(extensionConfiguration), OT5L7ME6_cjs.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
}, "resolveRuntimeExtensions");

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js
var SSOOIDCClient = class extends OT5L7ME6_cjs.Client {
  static {
    U7VZULNU_cjs.__name(this, "SSOOIDCClient");
  }
  config;
  constructor(...[configuration]) {
    const _config_0 = getRuntimeConfig2(configuration || {});
    super(_config_0);
    this.initConfig = _config_0;
    const _config_1 = resolveClientEndpointParameters(_config_0);
    const _config_2 = _7ZH64OYR_cjs.resolveUserAgentConfig(_config_1);
    const _config_3 = _7ZH64OYR_cjs.resolveRetryConfig(_config_2);
    const _config_4 = _7ZH64OYR_cjs.resolveRegionConfig(_config_3);
    const _config_5 = _7ZH64OYR_cjs.resolveHostHeaderConfig(_config_4);
    const _config_6 = _7ZH64OYR_cjs.resolveEndpointConfig(_config_5);
    const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
    const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
    this.config = _config_8;
    this.middlewareStack.use(_7ZH64OYR_cjs.getUserAgentPlugin(this.config));
    this.middlewareStack.use(_7ZH64OYR_cjs.getRetryPlugin(this.config));
    this.middlewareStack.use(_7ZH64OYR_cjs.getContentLengthPlugin(this.config));
    this.middlewareStack.use(_7ZH64OYR_cjs.getHostHeaderPlugin(this.config));
    this.middlewareStack.use(_7ZH64OYR_cjs.getLoggerPlugin(this.config));
    this.middlewareStack.use(_7ZH64OYR_cjs.getRecursionDetectionPlugin(this.config));
    this.middlewareStack.use(_7ZH64OYR_cjs.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
      httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,
      identityProviderConfigProvider: /* @__PURE__ */ U7VZULNU_cjs.__name(async (config) => new _7ZH64OYR_cjs.DefaultIdentityProviderConfig({
        "aws.auth#sigv4": config.credentials
      }), "identityProviderConfigProvider")
    }));
    this.middlewareStack.use(_7ZH64OYR_cjs.getHttpSigningPlugin(this.config));
  }
  destroy() {
    super.destroy();
  }
};

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js
U7VZULNU_cjs.init_cjs_shims();
var SSOOIDCServiceException = class _SSOOIDCServiceException extends OT5L7ME6_cjs.ServiceException {
  static {
    U7VZULNU_cjs.__name(this, "SSOOIDCServiceException");
  }
  constructor(options) {
    super(options);
    Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);
  }
};

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js
var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "AccessDeniedException");
  }
  name = "AccessDeniedException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "AccessDeniedException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _AccessDeniedException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "AuthorizationPendingException");
  }
  name = "AuthorizationPendingException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "AuthorizationPendingException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ U7VZULNU_cjs.__name((obj) => ({
  ...obj,
  ...obj.clientSecret && {
    clientSecret: OT5L7ME6_cjs.SENSITIVE_STRING
  },
  ...obj.refreshToken && {
    refreshToken: OT5L7ME6_cjs.SENSITIVE_STRING
  },
  ...obj.codeVerifier && {
    codeVerifier: OT5L7ME6_cjs.SENSITIVE_STRING
  }
}), "CreateTokenRequestFilterSensitiveLog");
var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ U7VZULNU_cjs.__name((obj) => ({
  ...obj,
  ...obj.accessToken && {
    accessToken: OT5L7ME6_cjs.SENSITIVE_STRING
  },
  ...obj.refreshToken && {
    refreshToken: OT5L7ME6_cjs.SENSITIVE_STRING
  },
  ...obj.idToken && {
    idToken: OT5L7ME6_cjs.SENSITIVE_STRING
  }
}), "CreateTokenResponseFilterSensitiveLog");
var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "ExpiredTokenException");
  }
  name = "ExpiredTokenException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "ExpiredTokenException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var InternalServerException = class _InternalServerException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "InternalServerException");
  }
  name = "InternalServerException";
  $fault = "server";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "InternalServerException",
      $fault: "server",
      ...opts
    });
    Object.setPrototypeOf(this, _InternalServerException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "InvalidClientException");
  }
  name = "InvalidClientException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "InvalidClientException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _InvalidClientException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "InvalidGrantException");
  }
  name = "InvalidGrantException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "InvalidGrantException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _InvalidGrantException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "InvalidRequestException");
  }
  name = "InvalidRequestException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "InvalidRequestException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _InvalidRequestException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "InvalidScopeException");
  }
  name = "InvalidScopeException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "InvalidScopeException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _InvalidScopeException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var SlowDownException = class _SlowDownException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "SlowDownException");
  }
  name = "SlowDownException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "SlowDownException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _SlowDownException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "UnauthorizedClientException");
  }
  name = "UnauthorizedClientException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "UnauthorizedClientException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};
var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {
  static {
    U7VZULNU_cjs.__name(this, "UnsupportedGrantTypeException");
  }
  name = "UnsupportedGrantTypeException";
  $fault = "client";
  error;
  error_description;
  constructor(opts) {
    super({
      name: "UnsupportedGrantTypeException",
      $fault: "client",
      ...opts
    });
    Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);
    this.error = opts.error;
    this.error_description = opts.error_description;
  }
};

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/protocols/Aws_restJson1.js
U7VZULNU_cjs.init_cjs_shims();
var se_CreateTokenCommand = /* @__PURE__ */ U7VZULNU_cjs.__name(async (input, context) => {
  const b2 = WH45T4LS_cjs.requestBuilder(input, context);
  const headers = {
    "content-type": "application/json"
  };
  b2.bp("/token");
  let body;
  body = JSON.stringify(OT5L7ME6_cjs.take(input, {
    clientId: [],
    clientSecret: [],
    code: [],
    codeVerifier: [],
    deviceCode: [],
    grantType: [],
    redirectUri: [],
    refreshToken: [],
    scope: /* @__PURE__ */ U7VZULNU_cjs.__name((_) => OT5L7ME6_cjs._json(_), "scope")
  }));
  b2.m("POST").h(headers).b(body);
  return b2.build();
}, "se_CreateTokenCommand");
var de_CreateTokenCommand = /* @__PURE__ */ U7VZULNU_cjs.__name(async (output, context) => {
  if (output.statusCode !== 200 && output.statusCode >= 300) {
    return de_CommandError(output, context);
  }
  const contents = OT5L7ME6_cjs.map({
    $metadata: deserializeMetadata(output)
  });
  const data = OT5L7ME6_cjs.expectNonNull(OT5L7ME6_cjs.expectObject(await ZQFCLTYU_cjs.parseJsonBody(output.body, context)), "body");
  const doc = OT5L7ME6_cjs.take(data, {
    accessToken: OT5L7ME6_cjs.expectString,
    expiresIn: OT5L7ME6_cjs.expectInt32,
    idToken: OT5L7ME6_cjs.expectString,
    refreshToken: OT5L7ME6_cjs.expectString,
    tokenType: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  return contents;
}, "de_CreateTokenCommand");
var de_CommandError = /* @__PURE__ */ U7VZULNU_cjs.__name(async (output, context) => {
  const parsedOutput = {
    ...output,
    body: await ZQFCLTYU_cjs.parseJsonErrorBody(output.body, context)
  };
  const errorCode = ZQFCLTYU_cjs.loadRestJsonErrorCode(output, parsedOutput.body);
  switch (errorCode) {
    case "AccessDeniedException":
    case "com.amazonaws.ssooidc#AccessDeniedException":
      throw await de_AccessDeniedExceptionRes(parsedOutput, context);
    case "AuthorizationPendingException":
    case "com.amazonaws.ssooidc#AuthorizationPendingException":
      throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
    case "ExpiredTokenException":
    case "com.amazonaws.ssooidc#ExpiredTokenException":
      throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
    case "InternalServerException":
    case "com.amazonaws.ssooidc#InternalServerException":
      throw await de_InternalServerExceptionRes(parsedOutput, context);
    case "InvalidClientException":
    case "com.amazonaws.ssooidc#InvalidClientException":
      throw await de_InvalidClientExceptionRes(parsedOutput, context);
    case "InvalidGrantException":
    case "com.amazonaws.ssooidc#InvalidGrantException":
      throw await de_InvalidGrantExceptionRes(parsedOutput, context);
    case "InvalidRequestException":
    case "com.amazonaws.ssooidc#InvalidRequestException":
      throw await de_InvalidRequestExceptionRes(parsedOutput, context);
    case "InvalidScopeException":
    case "com.amazonaws.ssooidc#InvalidScopeException":
      throw await de_InvalidScopeExceptionRes(parsedOutput, context);
    case "SlowDownException":
    case "com.amazonaws.ssooidc#SlowDownException":
      throw await de_SlowDownExceptionRes(parsedOutput, context);
    case "UnauthorizedClientException":
    case "com.amazonaws.ssooidc#UnauthorizedClientException":
      throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
    case "UnsupportedGrantTypeException":
    case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
      throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
    default:
      const parsedBody = parsedOutput.body;
      return throwDefaultError({
        output,
        parsedBody,
        errorCode
      });
  }
}, "de_CommandError");
var throwDefaultError = OT5L7ME6_cjs.withBaseException(SSOOIDCServiceException);
var de_AccessDeniedExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new AccessDeniedException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_AccessDeniedExceptionRes");
var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new AuthorizationPendingException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_AuthorizationPendingExceptionRes");
var de_ExpiredTokenExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new ExpiredTokenException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_ExpiredTokenExceptionRes");
var de_InternalServerExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InternalServerException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InternalServerExceptionRes");
var de_InvalidClientExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InvalidClientException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InvalidClientExceptionRes");
var de_InvalidGrantExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InvalidGrantException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InvalidGrantExceptionRes");
var de_InvalidRequestExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InvalidRequestException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InvalidRequestExceptionRes");
var de_InvalidScopeExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InvalidScopeException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InvalidScopeExceptionRes");
var de_SlowDownExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new SlowDownException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_SlowDownExceptionRes");
var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new UnauthorizedClientException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_UnauthorizedClientExceptionRes");
var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ U7VZULNU_cjs.__name(async (parsedOutput, context) => {
  const contents = OT5L7ME6_cjs.map({});
  const data = parsedOutput.body;
  const doc = OT5L7ME6_cjs.take(data, {
    error: OT5L7ME6_cjs.expectString,
    error_description: OT5L7ME6_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new UnsupportedGrantTypeException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return OT5L7ME6_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_UnsupportedGrantTypeExceptionRes");
var deserializeMetadata = /* @__PURE__ */ U7VZULNU_cjs.__name((output) => ({
  httpStatusCode: output.statusCode,
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
  extendedRequestId: output.headers["x-amz-id-2"],
  cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js
var CreateTokenCommand = class extends OT5L7ME6_cjs.Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
  return [
    _7ZH64OYR_cjs.getSerdePlugin(config, this.serialize, this.deserialize),
    _7ZH64OYR_cjs.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
  ];
}).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {
  static {
    U7VZULNU_cjs.__name(this, "CreateTokenCommand");
  }
};

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js
var commands = {
  CreateTokenCommand
};
var SSOOIDC = class extends SSOOIDCClient {
  static {
    U7VZULNU_cjs.__name(this, "SSOOIDC");
  }
};
OT5L7ME6_cjs.createAggregatedClient(commands, SSOOIDC);

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/index.js
U7VZULNU_cjs.init_cjs_shims();

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/index.js
U7VZULNU_cjs.init_cjs_shims();

Object.defineProperty(exports, "$Command", {
  enumerable: true,
  get: function () { return OT5L7ME6_cjs.Command; }
});
Object.defineProperty(exports, "__Client", {
  enumerable: true,
  get: function () { return OT5L7ME6_cjs.Client; }
});
exports.AccessDeniedException = AccessDeniedException;
exports.AuthorizationPendingException = AuthorizationPendingException;
exports.CreateTokenCommand = CreateTokenCommand;
exports.CreateTokenRequestFilterSensitiveLog = CreateTokenRequestFilterSensitiveLog;
exports.CreateTokenResponseFilterSensitiveLog = CreateTokenResponseFilterSensitiveLog;
exports.ExpiredTokenException = ExpiredTokenException;
exports.InternalServerException = InternalServerException;
exports.InvalidClientException = InvalidClientException;
exports.InvalidGrantException = InvalidGrantException;
exports.InvalidRequestException = InvalidRequestException;
exports.InvalidScopeException = InvalidScopeException;
exports.SSOOIDC = SSOOIDC;
exports.SSOOIDCClient = SSOOIDCClient;
exports.SSOOIDCServiceException = SSOOIDCServiceException;
exports.SlowDownException = SlowDownException;
exports.UnauthorizedClientException = UnauthorizedClientException;
exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException;
//# sourceMappingURL=ASYXJJD4.cjs.map
//# sourceMappingURL=ASYXJJD4.cjs.map