File Explorer

/var/runtime/node_modules/@aws-sdk/client-rekognitionstreaming/dist-cjs

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

2 dirs
3 files
index.js41.2 KB · 977 lines
"use strict";var __defProp = Object.defineProperty;var __getOwnPropDesc = Object.getOwnPropertyDescriptor;var __getOwnPropNames = Object.getOwnPropertyNames;var __hasOwnProp = Object.prototype.hasOwnProperty;var __name = (target, value) => __defProp(target, "name", { value, configurable: true });var __export = (target, all) => {  for (var name in all)    __defProp(target, name, { get: all[name], enumerable: true });};var __copyProps = (to, from, except, desc) => {  if (from && typeof from === "object" || typeof from === "function") {    for (let key of __getOwnPropNames(from))      if (!__hasOwnProp.call(to, key) && key !== except)        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });  }  return to;};var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.tsvar index_exports = {};__export(index_exports, {  $Command: () => import_smithy_client.Command,  AccessDeniedException: () => AccessDeniedException,  ChallengeType: () => ChallengeType,  ClientChallenge: () => ClientChallenge,  InternalServerException: () => InternalServerException,  LightChallengeType: () => LightChallengeType,  LivenessRequestStream: () => LivenessRequestStream,  LivenessRequestStreamFilterSensitiveLog: () => LivenessRequestStreamFilterSensitiveLog,  LivenessResponseStream: () => LivenessResponseStream,  LivenessResponseStreamFilterSensitiveLog: () => LivenessResponseStreamFilterSensitiveLog,  RekognitionStreaming: () => RekognitionStreaming,  RekognitionStreamingClient: () => RekognitionStreamingClient,  RekognitionStreamingServiceException: () => RekognitionStreamingServiceException,  ServerChallenge: () => ServerChallenge,  ServiceQuotaExceededException: () => ServiceQuotaExceededException,  ServiceUnavailableException: () => ServiceUnavailableException,  SessionNotFoundException: () => SessionNotFoundException,  StartFaceLivenessSessionCommand: () => StartFaceLivenessSessionCommand,  StartFaceLivenessSessionRequestFilterSensitiveLog: () => StartFaceLivenessSessionRequestFilterSensitiveLog,  StartFaceLivenessSessionResponseFilterSensitiveLog: () => StartFaceLivenessSessionResponseFilterSensitiveLog,  ThrottlingException: () => ThrottlingException,  ValidationException: () => ValidationException,  __Client: () => import_smithy_client.Client});module.exports = __toCommonJS(index_exports); // src/RekognitionStreamingClient.tsvar import_middleware_eventstream = require("@aws-sdk/middleware-eventstream");var import_middleware_host_header = require("@aws-sdk/middleware-host-header");var import_middleware_logger = require("@aws-sdk/middleware-logger");var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");var import_middleware_websocket = require("@aws-sdk/middleware-websocket");var import_config_resolver = require("@smithy/config-resolver");var import_core = require("@smithy/core");var import_eventstream_serde_config_resolver = require("@smithy/eventstream-serde-config-resolver");var import_middleware_content_length = require("@smithy/middleware-content-length");var import_middleware_endpoint = require("@smithy/middleware-endpoint");var import_middleware_retry = require("@smithy/middleware-retry"); var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider"); // src/endpoint/EndpointParameters.tsvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {  return Object.assign(options, {    useDualstackEndpoint: options.useDualstackEndpoint ?? false,    useFipsEndpoint: options.useFipsEndpoint ?? false,    defaultSigningName: "rekognition"  });}, "resolveClientEndpointParameters");var commonParams = {  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },  Endpoint: { type: "builtInParams", name: "endpoint" },  Region: { type: "builtInParams", name: "region" },  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }}; // src/RekognitionStreamingClient.tsvar import_runtimeConfig = require("././runtimeConfig"); // src/runtimeExtensions.tsvar import_region_config_resolver = require("@aws-sdk/region-config-resolver");var import_protocol_http = require("@smithy/protocol-http");var import_smithy_client = require("@smithy/smithy-client"); // src/auth/httpAuthExtensionConfiguration.tsvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __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__ */ __name((config) => {  return {    httpAuthSchemes: config.httpAuthSchemes(),    httpAuthSchemeProvider: config.httpAuthSchemeProvider(),    credentials: config.credentials()  };}, "resolveHttpAuthRuntimeConfig"); // src/runtimeExtensions.tsvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {  const extensionConfiguration = Object.assign(    (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),    (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),    (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),    getHttpAuthExtensionConfiguration(runtimeConfig)  );  extensions.forEach((extension) => extension.configure(extensionConfiguration));  return Object.assign(    runtimeConfig,    (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),    (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),    (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),    resolveHttpAuthRuntimeConfig(extensionConfiguration)  );}, "resolveRuntimeExtensions"); // src/RekognitionStreamingClient.tsvar RekognitionStreamingClient = class extends import_smithy_client.Client {  static {    __name(this, "RekognitionStreamingClient");  }  /**   * The resolved configuration of RekognitionStreamingClient class. This is resolved and normalized from the {@link RekognitionStreamingClientConfig | constructor configuration interface}.   */  config;  constructor(...[configuration]) {    const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});    super(_config_0);    this.initConfig = _config_0;    const _config_1 = resolveClientEndpointParameters(_config_0);    const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);    const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);    const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);    const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);    const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);    const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6);    const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7);    const _config_9 = (0, import_middleware_eventstream.resolveEventStreamConfig)(_config_8);    const _config_10 = (0, import_middleware_websocket.resolveWebSocketConfig)(_config_9);    const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);    this.config = _config_11;    this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));    this.middlewareStack.use(      (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {        httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultRekognitionStreamingHttpAuthSchemeParametersProvider,        identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({          "aws.auth#sigv4": config.credentials        }), "identityProviderConfigProvider")      })    );    this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));  }  /**   * Destroy underlying resources, like sockets. It's usually not necessary to do this.   * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.   * Otherwise, sockets might stay open for quite a long time before the server terminates them.   */  destroy() {    super.destroy();  }}; // src/RekognitionStreaming.ts  // src/commands/StartFaceLivenessSessionCommand.ts   var import_middleware_serde = require("@smithy/middleware-serde");  // src/models/RekognitionStreamingServiceException.ts var RekognitionStreamingServiceException = class _RekognitionStreamingServiceException extends import_smithy_client.ServiceException {  static {    __name(this, "RekognitionStreamingServiceException");  }  /**   * @internal   */  constructor(options) {    super(options);    Object.setPrototypeOf(this, _RekognitionStreamingServiceException.prototype);  }}; // src/models/models_0.tsvar AccessDeniedException = class _AccessDeniedException extends RekognitionStreamingServiceException {  static {    __name(this, "AccessDeniedException");  }  name = "AccessDeniedException";  $fault = "client";  Message;  Code;  /**   * @internal   */  constructor(opts) {    super({      name: "AccessDeniedException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _AccessDeniedException.prototype);    this.Message = opts.Message;    this.Code = opts.Code;  }};var ChallengeType = {  FACE_MOVEMENT_AND_LIGHT_CHALLENGE: "FaceMovementAndLightChallenge",  FACE_MOVEMENT_CHALLENGE: "FaceMovementChallenge"};var ClientChallenge;((ClientChallenge2) => {  ClientChallenge2.visit = /* @__PURE__ */ __name((value, visitor) => {    if (value.FaceMovementAndLightChallenge !== void 0)      return visitor.FaceMovementAndLightChallenge(value.FaceMovementAndLightChallenge);    if (value.FaceMovementChallenge !== void 0) return visitor.FaceMovementChallenge(value.FaceMovementChallenge);    return visitor._(value.$unknown[0], value.$unknown[1]);  }, "visit");})(ClientChallenge || (ClientChallenge = {}));var LightChallengeType = {  SEQUENTIAL: "SEQUENTIAL"};var InternalServerException = class _InternalServerException extends RekognitionStreamingServiceException {  static {    __name(this, "InternalServerException");  }  name = "InternalServerException";  $fault = "server";  Message;  Code;  /**   * @internal   */  constructor(opts) {    super({      name: "InternalServerException",      $fault: "server",      ...opts    });    Object.setPrototypeOf(this, _InternalServerException.prototype);    this.Message = opts.Message;    this.Code = opts.Code;  }};var LivenessRequestStream;((LivenessRequestStream2) => {  LivenessRequestStream2.visit = /* @__PURE__ */ __name((value, visitor) => {    if (value.VideoEvent !== void 0) return visitor.VideoEvent(value.VideoEvent);    if (value.ClientSessionInformationEvent !== void 0)      return visitor.ClientSessionInformationEvent(value.ClientSessionInformationEvent);    return visitor._(value.$unknown[0], value.$unknown[1]);  }, "visit");})(LivenessRequestStream || (LivenessRequestStream = {}));var ServerChallenge;((ServerChallenge3) => {  ServerChallenge3.visit = /* @__PURE__ */ __name((value, visitor) => {    if (value.FaceMovementAndLightChallenge !== void 0)      return visitor.FaceMovementAndLightChallenge(value.FaceMovementAndLightChallenge);    if (value.FaceMovementChallenge !== void 0) return visitor.FaceMovementChallenge(value.FaceMovementChallenge);    return visitor._(value.$unknown[0], value.$unknown[1]);  }, "visit");})(ServerChallenge || (ServerChallenge = {}));var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends RekognitionStreamingServiceException {  static {    __name(this, "ServiceQuotaExceededException");  }  name = "ServiceQuotaExceededException";  $fault = "client";  Message;  Code;  /**   * @internal   */  constructor(opts) {    super({      name: "ServiceQuotaExceededException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);    this.Message = opts.Message;    this.Code = opts.Code;  }};var ServiceUnavailableException = class _ServiceUnavailableException extends RekognitionStreamingServiceException {  static {    __name(this, "ServiceUnavailableException");  }  name = "ServiceUnavailableException";  $fault = "server";  Message;  Code;  /**   * @internal   */  constructor(opts) {    super({      name: "ServiceUnavailableException",      $fault: "server",      ...opts    });    Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);    this.Message = opts.Message;    this.Code = opts.Code;  }};var ThrottlingException = class _ThrottlingException extends RekognitionStreamingServiceException {  static {    __name(this, "ThrottlingException");  }  name = "ThrottlingException";  $fault = "client";  Message;  Code;  /**   * @internal   */  constructor(opts) {    super({      name: "ThrottlingException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ThrottlingException.prototype);    this.Message = opts.Message;    this.Code = opts.Code;  }};var ValidationException = class _ValidationException extends RekognitionStreamingServiceException {  static {    __name(this, "ValidationException");  }  name = "ValidationException";  $fault = "client";  Message;  Code;  /**   * @internal   */  constructor(opts) {    super({      name: "ValidationException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ValidationException.prototype);    this.Message = opts.Message;    this.Code = opts.Code;  }};var LivenessResponseStream;((LivenessResponseStream3) => {  LivenessResponseStream3.visit = /* @__PURE__ */ __name((value, visitor) => {    if (value.ServerSessionInformationEvent !== void 0)      return visitor.ServerSessionInformationEvent(value.ServerSessionInformationEvent);    if (value.DisconnectionEvent !== void 0) return visitor.DisconnectionEvent(value.DisconnectionEvent);    if (value.ChallengeEvent !== void 0) return visitor.ChallengeEvent(value.ChallengeEvent);    if (value.ValidationException !== void 0) return visitor.ValidationException(value.ValidationException);    if (value.InternalServerException !== void 0)      return visitor.InternalServerException(value.InternalServerException);    if (value.ThrottlingException !== void 0) return visitor.ThrottlingException(value.ThrottlingException);    if (value.ServiceQuotaExceededException !== void 0)      return visitor.ServiceQuotaExceededException(value.ServiceQuotaExceededException);    if (value.ServiceUnavailableException !== void 0)      return visitor.ServiceUnavailableException(value.ServiceUnavailableException);    return visitor._(value.$unknown[0], value.$unknown[1]);  }, "visit");})(LivenessResponseStream || (LivenessResponseStream = {}));var SessionNotFoundException = class _SessionNotFoundException extends RekognitionStreamingServiceException {  static {    __name(this, "SessionNotFoundException");  }  name = "SessionNotFoundException";  $fault = "client";  Message;  Code;  /**   * @internal   */  constructor(opts) {    super({      name: "SessionNotFoundException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _SessionNotFoundException.prototype);    this.Message = opts.Message;    this.Code = opts.Code;  }};var LivenessRequestStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {  if (obj.VideoEvent !== void 0) return { VideoEvent: obj.VideoEvent };  if (obj.ClientSessionInformationEvent !== void 0)    return { ClientSessionInformationEvent: obj.ClientSessionInformationEvent };  if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };}, "LivenessRequestStreamFilterSensitiveLog");var LivenessResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {  if (obj.ServerSessionInformationEvent !== void 0)    return { ServerSessionInformationEvent: obj.ServerSessionInformationEvent };  if (obj.DisconnectionEvent !== void 0) return { DisconnectionEvent: obj.DisconnectionEvent };  if (obj.ChallengeEvent !== void 0) return { ChallengeEvent: obj.ChallengeEvent };  if (obj.ValidationException !== void 0) return { ValidationException: obj.ValidationException };  if (obj.InternalServerException !== void 0) return { InternalServerException: obj.InternalServerException };  if (obj.ThrottlingException !== void 0) return { ThrottlingException: obj.ThrottlingException };  if (obj.ServiceQuotaExceededException !== void 0)    return { ServiceQuotaExceededException: obj.ServiceQuotaExceededException };  if (obj.ServiceUnavailableException !== void 0)    return { ServiceUnavailableException: obj.ServiceUnavailableException };  if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };}, "LivenessResponseStreamFilterSensitiveLog");var StartFaceLivenessSessionRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.LivenessRequestStream && { LivenessRequestStream: "STREAMING_CONTENT" }}), "StartFaceLivenessSessionRequestFilterSensitiveLog");var StartFaceLivenessSessionResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({  ...obj,  ...obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }}), "StartFaceLivenessSessionResponseFilterSensitiveLog"); // src/protocols/Aws_restJson1.tsvar import_core2 = require("@aws-sdk/core");  var se_StartFaceLivenessSessionCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {    "content-type": "application/json",    [_xarslsi]: input[_SI],    [_xarslvw]: input[_VW],    [_xarslvh]: input[_VH],    [_xarslcv]: input[_CV]  });  b.bp("/start-face-liveness-session");  let body;  if (input.LivenessRequestStream !== void 0) {    body = se_LivenessRequestStream(input.LivenessRequestStream, context);  }  b.m("POST").h(headers).b(body);  return b.build();}, "se_StartFaceLivenessSessionCommand");var de_StartFaceLivenessSessionCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output),    [_SI]: [, output.headers[_xarslsi]]  });  const data = output.body;  contents.LivenessResponseStream = de_LivenessResponseStream(data, context);  return contents;}, "de_StartFaceLivenessSessionCommand");var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonErrorBody)(output.body, context)  };  const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);  switch (errorCode) {    case "AccessDeniedException":    case "com.amazonaws.rekognitionstreaming#AccessDeniedException":      throw await de_AccessDeniedExceptionRes(parsedOutput, context);    case "InternalServerException":    case "com.amazonaws.rekognitionstreaming#InternalServerException":      throw await de_InternalServerExceptionRes(parsedOutput, context);    case "ServiceQuotaExceededException":    case "com.amazonaws.rekognitionstreaming#ServiceQuotaExceededException":      throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);    case "ServiceUnavailableException":    case "com.amazonaws.rekognitionstreaming#ServiceUnavailableException":      throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);    case "SessionNotFoundException":    case "com.amazonaws.rekognitionstreaming#SessionNotFoundException":      throw await de_SessionNotFoundExceptionRes(parsedOutput, context);    case "ThrottlingException":    case "com.amazonaws.rekognitionstreaming#ThrottlingException":      throw await de_ThrottlingExceptionRes(parsedOutput, context);    case "ValidationException":    case "com.amazonaws.rekognitionstreaming#ValidationException":      throw await de_ValidationExceptionRes(parsedOutput, context);    default:      const parsedBody = parsedOutput.body;      return throwDefaultError({        output,        parsedBody,        errorCode      });  }}, "de_CommandError");var throwDefaultError = (0, import_smithy_client.withBaseException)(RekognitionStreamingServiceException);var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Code: import_smithy_client.expectString,    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new AccessDeniedException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_AccessDeniedExceptionRes");var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Code: import_smithy_client.expectString,    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new InternalServerException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_InternalServerExceptionRes");var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Code: import_smithy_client.expectString,    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ServiceQuotaExceededException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ServiceQuotaExceededExceptionRes");var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Code: import_smithy_client.expectString,    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ServiceUnavailableException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ServiceUnavailableExceptionRes");var de_SessionNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Code: import_smithy_client.expectString,    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new SessionNotFoundException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_SessionNotFoundExceptionRes");var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Code: import_smithy_client.expectString,    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ThrottlingException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ThrottlingExceptionRes");var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    Code: import_smithy_client.expectString,    Message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ValidationException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ValidationExceptionRes");var se_LivenessRequestStream = /* @__PURE__ */ __name((input, context) => {  const eventMarshallingVisitor = /* @__PURE__ */ __name((event) => LivenessRequestStream.visit(event, {    VideoEvent: /* @__PURE__ */ __name((value) => se_VideoEvent_event(value, context), "VideoEvent"),    ClientSessionInformationEvent: /* @__PURE__ */ __name((value) => se_ClientSessionInformationEvent_event(value, context), "ClientSessionInformationEvent"),    _: /* @__PURE__ */ __name((value) => value, "_")  }), "eventMarshallingVisitor");  return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);}, "se_LivenessRequestStream");var se_ClientSessionInformationEvent_event = /* @__PURE__ */ __name((input, context) => {  const headers = {    ":event-type": { type: "string", value: "ClientSessionInformationEvent" },    ":message-type": { type: "string", value: "event" },    ":content-type": { type: "string", value: "application/json" }  };  let body = new Uint8Array();  body = se_ClientSessionInformationEvent(input, context);  body = context.utf8Decoder(JSON.stringify(body));  return { headers, body };}, "se_ClientSessionInformationEvent_event");var se_VideoEvent_event = /* @__PURE__ */ __name((input, context) => {  const headers = {    ":event-type": { type: "string", value: "VideoEvent" },    ":message-type": { type: "string", value: "event" },    ":content-type": { type: "string", value: "application/json" }  };  let body = new Uint8Array();  body = se_VideoEvent(input, context);  body = context.utf8Decoder(JSON.stringify(body));  return { headers, body };}, "se_VideoEvent_event");var de_LivenessResponseStream = /* @__PURE__ */ __name((output, context) => {  return context.eventStreamMarshaller.deserialize(output, async (event) => {    if (event["ServerSessionInformationEvent"] != null) {      return {        ServerSessionInformationEvent: await de_ServerSessionInformationEvent_event(          event["ServerSessionInformationEvent"],          context        )      };    }    if (event["DisconnectionEvent"] != null) {      return {        DisconnectionEvent: await de_DisconnectionEvent_event(event["DisconnectionEvent"], context)      };    }    if (event["ChallengeEvent"] != null) {      return {        ChallengeEvent: await de_ChallengeEvent_event(event["ChallengeEvent"], context)      };    }    if (event["ValidationException"] != null) {      return {        ValidationException: await de_ValidationException_event(event["ValidationException"], context)      };    }    if (event["InternalServerException"] != null) {      return {        InternalServerException: await de_InternalServerException_event(event["InternalServerException"], context)      };    }    if (event["ThrottlingException"] != null) {      return {        ThrottlingException: await de_ThrottlingException_event(event["ThrottlingException"], context)      };    }    if (event["ServiceQuotaExceededException"] != null) {      return {        ServiceQuotaExceededException: await de_ServiceQuotaExceededException_event(          event["ServiceQuotaExceededException"],          context        )      };    }    if (event["ServiceUnavailableException"] != null) {      return {        ServiceUnavailableException: await de_ServiceUnavailableException_event(          event["ServiceUnavailableException"],          context        )      };    }    return { $unknown: event };  });}, "de_LivenessResponseStream");var de_ChallengeEvent_event = /* @__PURE__ */ __name(async (output, context) => {  const contents = {};  const data = await (0, import_core2.parseJsonBody)(output.body, context);  Object.assign(contents, (0, import_smithy_client._json)(data));  return contents;}, "de_ChallengeEvent_event");var de_DisconnectionEvent_event = /* @__PURE__ */ __name(async (output, context) => {  const contents = {};  const data = await (0, import_core2.parseJsonBody)(output.body, context);  Object.assign(contents, (0, import_smithy_client._json)(data));  return contents;}, "de_DisconnectionEvent_event");var de_InternalServerException_event = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonBody)(output.body, context)  };  return de_InternalServerExceptionRes(parsedOutput, context);}, "de_InternalServerException_event");var de_ServerSessionInformationEvent_event = /* @__PURE__ */ __name(async (output, context) => {  const contents = {};  const data = await (0, import_core2.parseJsonBody)(output.body, context);  Object.assign(contents, de_ServerSessionInformationEvent(data, context));  return contents;}, "de_ServerSessionInformationEvent_event");var de_ServiceQuotaExceededException_event = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonBody)(output.body, context)  };  return de_ServiceQuotaExceededExceptionRes(parsedOutput, context);}, "de_ServiceQuotaExceededException_event");var de_ServiceUnavailableException_event = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonBody)(output.body, context)  };  return de_ServiceUnavailableExceptionRes(parsedOutput, context);}, "de_ServiceUnavailableException_event");var de_ThrottlingException_event = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonBody)(output.body, context)  };  return de_ThrottlingExceptionRes(parsedOutput, context);}, "de_ThrottlingException_event");var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonBody)(output.body, context)  };  return de_ValidationExceptionRes(parsedOutput, context);}, "de_ValidationException_event");var se_BoundingBox = /* @__PURE__ */ __name((input, context) => {  return (0, import_smithy_client.take)(input, {    Height: import_smithy_client.serializeFloat,    Left: import_smithy_client.serializeFloat,    Top: import_smithy_client.serializeFloat,    Width: import_smithy_client.serializeFloat  });}, "se_BoundingBox");var se_ClientChallenge = /* @__PURE__ */ __name((input, context) => {  return ClientChallenge.visit(input, {    FaceMovementAndLightChallenge: /* @__PURE__ */ __name((value) => ({      FaceMovementAndLightChallenge: se_FaceMovementAndLightClientChallenge(value, context)    }), "FaceMovementAndLightChallenge"),    FaceMovementChallenge: /* @__PURE__ */ __name((value) => ({ FaceMovementChallenge: se_FaceMovementClientChallenge(value, context) }), "FaceMovementChallenge"),    _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_")  });}, "se_ClientChallenge");var se_ClientSessionInformationEvent = /* @__PURE__ */ __name((input, context) => {  return (0, import_smithy_client.take)(input, {    Challenge: /* @__PURE__ */ __name((_) => se_ClientChallenge(_, context), "Challenge")  });}, "se_ClientSessionInformationEvent");var se_FaceMovementAndLightClientChallenge = /* @__PURE__ */ __name((input, context) => {  return (0, import_smithy_client.take)(input, {    ChallengeId: [],    ColorDisplayed: import_smithy_client._json,    InitialFace: /* @__PURE__ */ __name((_) => se_InitialFace(_, context), "InitialFace"),    TargetFace: /* @__PURE__ */ __name((_) => se_TargetFace(_, context), "TargetFace"),    VideoEndTimestamp: [],    VideoStartTimestamp: []  });}, "se_FaceMovementAndLightClientChallenge");var se_FaceMovementClientChallenge = /* @__PURE__ */ __name((input, context) => {  return (0, import_smithy_client.take)(input, {    ChallengeId: [],    InitialFace: /* @__PURE__ */ __name((_) => se_InitialFace(_, context), "InitialFace"),    TargetFace: /* @__PURE__ */ __name((_) => se_TargetFace(_, context), "TargetFace"),    VideoEndTimestamp: [],    VideoStartTimestamp: []  });}, "se_FaceMovementClientChallenge");var se_InitialFace = /* @__PURE__ */ __name((input, context) => {  return (0, import_smithy_client.take)(input, {    BoundingBox: /* @__PURE__ */ __name((_) => se_BoundingBox(_, context), "BoundingBox"),    InitialFaceDetectedTimestamp: []  });}, "se_InitialFace");var se_TargetFace = /* @__PURE__ */ __name((input, context) => {  return (0, import_smithy_client.take)(input, {    BoundingBox: /* @__PURE__ */ __name((_) => se_BoundingBox(_, context), "BoundingBox"),    FaceDetectedInTargetPositionEndTimestamp: [],    FaceDetectedInTargetPositionStartTimestamp: []  });}, "se_TargetFace");var se_VideoEvent = /* @__PURE__ */ __name((input, context) => {  return (0, import_smithy_client.take)(input, {    TimestampMillis: [],    VideoChunk: context.base64Encoder  });}, "se_VideoEvent");var de_ChallengeConfig = /* @__PURE__ */ __name((output, context) => {  return (0, import_smithy_client.take)(output, {    BlazeFaceDetectionThreshold: import_smithy_client.limitedParseFloat32,    FaceDistanceThreshold: import_smithy_client.limitedParseFloat32,    FaceDistanceThresholdMax: import_smithy_client.limitedParseFloat32,    FaceDistanceThresholdMin: import_smithy_client.limitedParseFloat32,    FaceIouHeightThreshold: import_smithy_client.limitedParseFloat32,    FaceIouWidthThreshold: import_smithy_client.limitedParseFloat32,    OvalFitTimeout: import_smithy_client.expectInt32,    OvalHeightWidthRatio: import_smithy_client.limitedParseFloat32,    OvalIouHeightThreshold: import_smithy_client.limitedParseFloat32,    OvalIouThreshold: import_smithy_client.limitedParseFloat32,    OvalIouWidthThreshold: import_smithy_client.limitedParseFloat32  });}, "de_ChallengeConfig");var de_ColorSequence = /* @__PURE__ */ __name((output, context) => {  return (0, import_smithy_client.take)(output, {    DownscrollDuration: import_smithy_client.limitedParseFloat32,    FlatDisplayDuration: import_smithy_client.limitedParseFloat32,    FreshnessColor: import_smithy_client._json  });}, "de_ColorSequence");var de_ColorSequences = /* @__PURE__ */ __name((output, context) => {  const retVal = (output || []).filter((e) => e != null).map((entry) => {    return de_ColorSequence(entry, context);  });  return retVal;}, "de_ColorSequences");var de_FaceMovementAndLightServerChallenge = /* @__PURE__ */ __name((output, context) => {  return (0, import_smithy_client.take)(output, {    ChallengeConfig: /* @__PURE__ */ __name((_) => de_ChallengeConfig(_, context), "ChallengeConfig"),    ColorSequences: /* @__PURE__ */ __name((_) => de_ColorSequences(_, context), "ColorSequences"),    LightChallengeType: import_smithy_client.expectString,    OvalParameters: /* @__PURE__ */ __name((_) => de_OvalParameters(_, context), "OvalParameters")  });}, "de_FaceMovementAndLightServerChallenge");var de_FaceMovementServerChallenge = /* @__PURE__ */ __name((output, context) => {  return (0, import_smithy_client.take)(output, {    ChallengeConfig: /* @__PURE__ */ __name((_) => de_ChallengeConfig(_, context), "ChallengeConfig"),    OvalParameters: /* @__PURE__ */ __name((_) => de_OvalParameters(_, context), "OvalParameters")  });}, "de_FaceMovementServerChallenge");var de_OvalParameters = /* @__PURE__ */ __name((output, context) => {  return (0, import_smithy_client.take)(output, {    CenterX: import_smithy_client.limitedParseFloat32,    CenterY: import_smithy_client.limitedParseFloat32,    Height: import_smithy_client.limitedParseFloat32,    Width: import_smithy_client.limitedParseFloat32  });}, "de_OvalParameters");var de_ServerChallenge = /* @__PURE__ */ __name((output, context) => {  if (output.FaceMovementAndLightChallenge != null) {    return {      FaceMovementAndLightChallenge: de_FaceMovementAndLightServerChallenge(        output.FaceMovementAndLightChallenge,        context      )    };  }  if (output.FaceMovementChallenge != null) {    return {      FaceMovementChallenge: de_FaceMovementServerChallenge(output.FaceMovementChallenge, context)    };  }  return { $unknown: Object.entries(output)[0] };}, "de_ServerChallenge");var de_ServerSessionInformationEvent = /* @__PURE__ */ __name((output, context) => {  return (0, import_smithy_client.take)(output, {    SessionInformation: /* @__PURE__ */ __name((_) => de_SessionInformation(_, context), "SessionInformation")  });}, "de_ServerSessionInformationEvent");var de_SessionInformation = /* @__PURE__ */ __name((output, context) => {  return (0, import_smithy_client.take)(output, {    Challenge: /* @__PURE__ */ __name((_) => de_ServerChallenge((0, import_core2.awsExpectUnion)(_), context), "Challenge")  });}, "de_SessionInformation");var deserializeMetadata = /* @__PURE__ */ __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");var _CV = "ChallengeVersions";var _SI = "SessionId";var _VH = "VideoHeight";var _VW = "VideoWidth";var _xarslcv = "x-amz-rekognition-streaming-liveness-challenge-versions";var _xarslsi = "x-amz-rekognition-streaming-liveness-session-id";var _xarslvh = "x-amz-rekognition-streaming-liveness-video-height";var _xarslvw = "x-amz-rekognition-streaming-liveness-video-width"; // src/commands/StartFaceLivenessSessionCommand.tsvar StartFaceLivenessSessionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),    (0, import_middleware_eventstream.getEventStreamPlugin)(config),    (0, import_middleware_websocket.getWebSocketPlugin)(config, {      headerPrefix: "x-amz-rekognition-streaming-liveness-"    })  ];}).s("RekognitionStreamingService", "StartFaceLivenessSession", {  /**   * @internal   */  eventStream: {    input: true,    output: true  }}).n("RekognitionStreamingClient", "StartFaceLivenessSessionCommand").f(StartFaceLivenessSessionRequestFilterSensitiveLog, StartFaceLivenessSessionResponseFilterSensitiveLog).ser(se_StartFaceLivenessSessionCommand).de(de_StartFaceLivenessSessionCommand).build() {  static {    __name(this, "StartFaceLivenessSessionCommand");  }}; // src/RekognitionStreaming.tsvar commands = {  StartFaceLivenessSessionCommand};var RekognitionStreaming = class extends RekognitionStreamingClient {  static {    __name(this, "RekognitionStreaming");  }};(0, import_smithy_client.createAggregatedClient)(commands, RekognitionStreaming);// Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = {  RekognitionStreamingServiceException,  __Client,  RekognitionStreamingClient,  RekognitionStreaming,  $Command,  StartFaceLivenessSessionCommand,  AccessDeniedException,  ChallengeType,  ClientChallenge,  LightChallengeType,  InternalServerException,  LivenessRequestStream,  ServerChallenge,  ServiceQuotaExceededException,  ServiceUnavailableException,  ThrottlingException,  ValidationException,  LivenessResponseStream,  SessionNotFoundException,  LivenessRequestStreamFilterSensitiveLog,  LivenessResponseStreamFilterSensitiveLog,  StartFaceLivenessSessionRequestFilterSensitiveLog,  StartFaceLivenessSessionResponseFilterSensitiveLog});