'use strict';

var Z7BVBO5K_cjs = require('./Z7BVBO5K.cjs');
var AOG2M3LV_cjs = require('./AOG2M3LV.cjs');
var VGCATKI5_cjs = require('./VGCATKI5.cjs');
var L34TQNQN_cjs = require('./L34TQNQN.cjs');
var _2ASNEWIN_cjs = require('./2ASNEWIN.cjs');
var W7QMZBXR_cjs = require('./W7QMZBXR.cjs');
var HHS2B7YE_cjs = require('./HHS2B7YE.cjs');
require('./OAYLBSRH.cjs');
require('./VVTDADG7.cjs');
require('./DPDVRYLI.cjs');
require('./BXO3RC75.cjs');
var NEQ3DTUV_cjs = require('./NEQ3DTUV.cjs');
var VO65XOWD_cjs = require('./VO65XOWD.cjs');

// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.879.0/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js
VO65XOWD_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
VO65XOWD_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
VO65XOWD_cjs.init_cjs_shims();
var defaultSSOOIDCHttpAuthSchemeParametersProvider = /* @__PURE__ */ VO65XOWD_cjs.__name(async (config, context, input) => {
  return {
    operation: _2ASNEWIN_cjs.getSmithyContext(context).operation,
    region: await _2ASNEWIN_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__ */ VO65XOWD_cjs.__name((config, context) => ({
      signingProperties: {
        config,
        context
      }
    }), "propertiesExtractor")
  };
}
VO65XOWD_cjs.__name(createAwsAuthSigv4HttpAuthOption, "createAwsAuthSigv4HttpAuthOption");
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
  return {
    schemeId: "smithy.api#noAuth"
  };
}
VO65XOWD_cjs.__name(createSmithyApiNoAuthHttpAuthOption, "createSmithyApiNoAuthHttpAuthOption");
var defaultSSOOIDCHttpAuthSchemeProvider = /* @__PURE__ */ VO65XOWD_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__ */ VO65XOWD_cjs.__name((config) => {
  const config_0 = _2ASNEWIN_cjs.resolveAwsSdkSigV4Config(config);
  return Object.assign(config_0, {
    authSchemePreference: _2ASNEWIN_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
VO65XOWD_cjs.init_cjs_shims();
var resolveClientEndpointParameters = /* @__PURE__ */ VO65XOWD_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
VO65XOWD_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
VO65XOWD_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
VO65XOWD_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
VO65XOWD_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 _2ASNEWIN_cjs.EndpointCache({
  size: 50,
  params: [
    "Endpoint",
    "Region",
    "UseDualStack",
    "UseFIPS"
  ]
});
var defaultEndpointResolver = /* @__PURE__ */ VO65XOWD_cjs.__name((endpointParams, context = {}) => {
  return cache.get(endpointParams, () => _2ASNEWIN_cjs.resolveEndpoint(ruleSet, {
    endpointParams,
    logger: context.logger
  }));
}, "defaultEndpointResolver");
_2ASNEWIN_cjs.customEndpointFunctions.aws = _2ASNEWIN_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__ */ VO65XOWD_cjs.__name((config) => {
  return {
    apiVersion: "2019-06-10",
    base64Decoder: config?.base64Decoder ?? HHS2B7YE_cjs.fromBase64,
    base64Encoder: config?.base64Encoder ?? HHS2B7YE_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__ */ VO65XOWD_cjs.__name((ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), "identityProvider"),
        signer: new _2ASNEWIN_cjs.AwsSdkSigV4Signer()
      },
      {
        schemeId: "smithy.api#noAuth",
        identityProvider: /* @__PURE__ */ VO65XOWD_cjs.__name((ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), "identityProvider"),
        signer: new VGCATKI5_cjs.NoAuthSigner()
      }
    ],
    logger: config?.logger ?? new HHS2B7YE_cjs.NoOpLogger(),
    serviceId: config?.serviceId ?? "SSO OIDC",
    urlParser: config?.urlParser ?? W7QMZBXR_cjs.parseUrl,
    utf8Decoder: config?.utf8Decoder ?? NEQ3DTUV_cjs.fromUtf8,
    utf8Encoder: config?.utf8Encoder ?? NEQ3DTUV_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__ */ VO65XOWD_cjs.__name((config) => {
  HHS2B7YE_cjs.emitWarningIfUnsupportedVersion(process.version);
  const defaultsMode = _2ASNEWIN_cjs.resolveDefaultsModeConfig(config);
  const defaultConfigProvider = /* @__PURE__ */ VO65XOWD_cjs.__name(() => defaultsMode().then(HHS2B7YE_cjs.loadConfigsForDefaultMode), "defaultConfigProvider");
  const clientSharedValues = getRuntimeConfig(config);
  _2ASNEWIN_cjs.emitWarningIfUnsupportedVersion(process.version);
  const loaderConfig = {
    profile: config?.profile,
    logger: clientSharedValues.logger
  };
  return {
    ...clientSharedValues,
    ...config,
    runtime: "node",
    defaultsMode,
    authSchemePreference: config?.authSchemePreference ?? W7QMZBXR_cjs.loadConfig(_2ASNEWIN_cjs.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
    bodyLengthChecker: config?.bodyLengthChecker ?? _2ASNEWIN_cjs.calculateBodyLength,
    defaultUserAgentProvider: config?.defaultUserAgentProvider ?? _2ASNEWIN_cjs.createDefaultUserAgentProvider({
      serviceId: clientSharedValues.serviceId,
      clientVersion: AOG2M3LV_cjs.package_default.version
    }),
    maxAttempts: config?.maxAttempts ?? W7QMZBXR_cjs.loadConfig(_2ASNEWIN_cjs.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
    region: config?.region ?? W7QMZBXR_cjs.loadConfig(_2ASNEWIN_cjs.NODE_REGION_CONFIG_OPTIONS, {
      ..._2ASNEWIN_cjs.NODE_REGION_CONFIG_FILE_OPTIONS,
      ...loaderConfig
    }),
    requestHandler: HHS2B7YE_cjs.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
    retryMode: config?.retryMode ?? W7QMZBXR_cjs.loadConfig({
      ..._2ASNEWIN_cjs.NODE_RETRY_MODE_CONFIG_OPTIONS,
      default: /* @__PURE__ */ VO65XOWD_cjs.__name(async () => (await defaultConfigProvider()).retryMode || _2ASNEWIN_cjs.DEFAULT_RETRY_MODE, "default")
    }, config),
    sha256: config?.sha256 ?? _2ASNEWIN_cjs.Hash.bind(null, "sha256"),
    streamCollector: config?.streamCollector ?? HHS2B7YE_cjs.streamCollector,
    useDualstackEndpoint: config?.useDualstackEndpoint ?? W7QMZBXR_cjs.loadConfig(_2ASNEWIN_cjs.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
    useFipsEndpoint: config?.useFipsEndpoint ?? W7QMZBXR_cjs.loadConfig(_2ASNEWIN_cjs.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
    userAgentAppId: config?.userAgentAppId ?? W7QMZBXR_cjs.loadConfig(_2ASNEWIN_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
VO65XOWD_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
VO65XOWD_cjs.init_cjs_shims();
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ VO65XOWD_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__ */ VO65XOWD_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__ */ VO65XOWD_cjs.__name((runtimeConfig, extensions) => {
  const extensionConfiguration = Object.assign(_2ASNEWIN_cjs.getAwsRegionExtensionConfiguration(runtimeConfig), HHS2B7YE_cjs.getDefaultExtensionConfiguration(runtimeConfig), HHS2B7YE_cjs.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
  return Object.assign(runtimeConfig, _2ASNEWIN_cjs.resolveAwsRegionExtensionConfiguration(extensionConfiguration), HHS2B7YE_cjs.resolveDefaultRuntimeConfig(extensionConfiguration), HHS2B7YE_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 HHS2B7YE_cjs.Client {
  static {
    VO65XOWD_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 = _2ASNEWIN_cjs.resolveUserAgentConfig(_config_1);
    const _config_3 = _2ASNEWIN_cjs.resolveRetryConfig(_config_2);
    const _config_4 = _2ASNEWIN_cjs.resolveRegionConfig(_config_3);
    const _config_5 = _2ASNEWIN_cjs.resolveHostHeaderConfig(_config_4);
    const _config_6 = _2ASNEWIN_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(_2ASNEWIN_cjs.getUserAgentPlugin(this.config));
    this.middlewareStack.use(_2ASNEWIN_cjs.getRetryPlugin(this.config));
    this.middlewareStack.use(_2ASNEWIN_cjs.getContentLengthPlugin(this.config));
    this.middlewareStack.use(_2ASNEWIN_cjs.getHostHeaderPlugin(this.config));
    this.middlewareStack.use(_2ASNEWIN_cjs.getLoggerPlugin(this.config));
    this.middlewareStack.use(_2ASNEWIN_cjs.getRecursionDetectionPlugin(this.config));
    this.middlewareStack.use(_2ASNEWIN_cjs.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
      httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,
      identityProviderConfigProvider: /* @__PURE__ */ VO65XOWD_cjs.__name(async (config) => new _2ASNEWIN_cjs.DefaultIdentityProviderConfig({
        "aws.auth#sigv4": config.credentials
      }), "identityProviderConfigProvider")
    }));
    this.middlewareStack.use(_2ASNEWIN_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
VO65XOWD_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
VO65XOWD_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
VO65XOWD_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
VO65XOWD_cjs.init_cjs_shims();
var SSOOIDCServiceException = class _SSOOIDCServiceException extends HHS2B7YE_cjs.ServiceException {
  static {
    VO65XOWD_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 {
    VO65XOWD_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 {
    VO65XOWD_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__ */ VO65XOWD_cjs.__name((obj) => ({
  ...obj,
  ...obj.clientSecret && {
    clientSecret: HHS2B7YE_cjs.SENSITIVE_STRING
  },
  ...obj.refreshToken && {
    refreshToken: HHS2B7YE_cjs.SENSITIVE_STRING
  },
  ...obj.codeVerifier && {
    codeVerifier: HHS2B7YE_cjs.SENSITIVE_STRING
  }
}), "CreateTokenRequestFilterSensitiveLog");
var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ VO65XOWD_cjs.__name((obj) => ({
  ...obj,
  ...obj.accessToken && {
    accessToken: HHS2B7YE_cjs.SENSITIVE_STRING
  },
  ...obj.refreshToken && {
    refreshToken: HHS2B7YE_cjs.SENSITIVE_STRING
  },
  ...obj.idToken && {
    idToken: HHS2B7YE_cjs.SENSITIVE_STRING
  }
}), "CreateTokenResponseFilterSensitiveLog");
var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {
  static {
    VO65XOWD_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 {
    VO65XOWD_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 {
    VO65XOWD_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 {
    VO65XOWD_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 {
    VO65XOWD_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 {
    VO65XOWD_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 {
    VO65XOWD_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 {
    VO65XOWD_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 {
    VO65XOWD_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
VO65XOWD_cjs.init_cjs_shims();
var se_CreateTokenCommand = /* @__PURE__ */ VO65XOWD_cjs.__name(async (input, context) => {
  const b2 = Z7BVBO5K_cjs.requestBuilder(input, context);
  const headers = {
    "content-type": "application/json"
  };
  b2.bp("/token");
  let body;
  body = JSON.stringify(HHS2B7YE_cjs.take(input, {
    clientId: [],
    clientSecret: [],
    code: [],
    codeVerifier: [],
    deviceCode: [],
    grantType: [],
    redirectUri: [],
    refreshToken: [],
    scope: /* @__PURE__ */ VO65XOWD_cjs.__name((_) => HHS2B7YE_cjs._json(_), "scope")
  }));
  b2.m("POST").h(headers).b(body);
  return b2.build();
}, "se_CreateTokenCommand");
var de_CreateTokenCommand = /* @__PURE__ */ VO65XOWD_cjs.__name(async (output, context) => {
  if (output.statusCode !== 200 && output.statusCode >= 300) {
    return de_CommandError(output, context);
  }
  const contents = HHS2B7YE_cjs.map({
    $metadata: deserializeMetadata(output)
  });
  const data = HHS2B7YE_cjs.expectNonNull(HHS2B7YE_cjs.expectObject(await L34TQNQN_cjs.parseJsonBody(output.body, context)), "body");
  const doc = HHS2B7YE_cjs.take(data, {
    accessToken: HHS2B7YE_cjs.expectString,
    expiresIn: HHS2B7YE_cjs.expectInt32,
    idToken: HHS2B7YE_cjs.expectString,
    refreshToken: HHS2B7YE_cjs.expectString,
    tokenType: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  return contents;
}, "de_CreateTokenCommand");
var de_CommandError = /* @__PURE__ */ VO65XOWD_cjs.__name(async (output, context) => {
  const parsedOutput = {
    ...output,
    body: await L34TQNQN_cjs.parseJsonErrorBody(output.body, context)
  };
  const errorCode = L34TQNQN_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 = HHS2B7YE_cjs.withBaseException(SSOOIDCServiceException);
var de_AccessDeniedExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new AccessDeniedException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_AccessDeniedExceptionRes");
var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new AuthorizationPendingException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_AuthorizationPendingExceptionRes");
var de_ExpiredTokenExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new ExpiredTokenException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_ExpiredTokenExceptionRes");
var de_InternalServerExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InternalServerException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InternalServerExceptionRes");
var de_InvalidClientExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InvalidClientException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InvalidClientExceptionRes");
var de_InvalidGrantExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InvalidGrantException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InvalidGrantExceptionRes");
var de_InvalidRequestExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InvalidRequestException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InvalidRequestExceptionRes");
var de_InvalidScopeExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new InvalidScopeException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_InvalidScopeExceptionRes");
var de_SlowDownExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new SlowDownException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_SlowDownExceptionRes");
var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new UnauthorizedClientException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_UnauthorizedClientExceptionRes");
var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ VO65XOWD_cjs.__name(async (parsedOutput, context) => {
  const contents = HHS2B7YE_cjs.map({});
  const data = parsedOutput.body;
  const doc = HHS2B7YE_cjs.take(data, {
    error: HHS2B7YE_cjs.expectString,
    error_description: HHS2B7YE_cjs.expectString
  });
  Object.assign(contents, doc);
  const exception = new UnsupportedGrantTypeException({
    $metadata: deserializeMetadata(parsedOutput),
    ...contents
  });
  return HHS2B7YE_cjs.decorateServiceException(exception, parsedOutput.body);
}, "de_UnsupportedGrantTypeExceptionRes");
var deserializeMetadata = /* @__PURE__ */ VO65XOWD_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 HHS2B7YE_cjs.Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
  return [
    _2ASNEWIN_cjs.getSerdePlugin(config, this.serialize, this.deserialize),
    _2ASNEWIN_cjs.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
  ];
}).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {
  static {
    VO65XOWD_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 {
    VO65XOWD_cjs.__name(this, "SSOOIDC");
  }
};
HHS2B7YE_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
VO65XOWD_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
VO65XOWD_cjs.init_cjs_shims();

Object.defineProperty(exports, "$Command", {
  enumerable: true,
  get: function () { return HHS2B7YE_cjs.Command; }
});
Object.defineProperty(exports, "__Client", {
  enumerable: true,
  get: function () { return HHS2B7YE_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=VYFY2754.cjs.map
//# sourceMappingURL=VYFY2754.cjs.map