UNPKG

@regulaforensics/face-sdk

Version:

This is an npm module for Regula Face SDK. It allows you to easily compaire faces using your phone's camera.

1,414 lines (1,167 loc) • 155 kB
/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "./src/customization/camera_position.js": /*!**********************************************!*\ !*** ./src/customization/camera_position.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CameraPosition: () => (/* binding */ CameraPosition) /* harmony export */ }); const CameraPosition = { FRONT: 0, BACK: 1, } /***/ }), /***/ "./src/customization/customization.js": /*!********************************************!*\ !*** ./src/customization/customization.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Customization: () => (/* binding */ Customization) /* harmony export */ }); /* harmony import */ var _customization_colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./customization_colors */ "./src/customization/customization_colors.js"); /* harmony import */ var _customization_fonts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./customization_fonts */ "./src/customization/customization_fonts.js"); /* harmony import */ var _customization_images__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./customization_images */ "./src/customization/customization_images.js"); /* harmony import */ var _internal_bridge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/bridge */ "./src/internal/bridge.js"); /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../index */ "./src/index.js"); class Customization { get colors() { return this._colors } _colors = new _customization_colors__WEBPACK_IMPORTED_MODULE_0__.CustomizationColors() set colors(val) { (this._colors = val)._apply(this) } get fonts() { return this._fonts } _fonts = new _customization_fonts__WEBPACK_IMPORTED_MODULE_1__.CustomizationFonts() set fonts(val) { (this._fonts = val)._apply(this) } get images() { return this._images } _images = new _customization_images__WEBPACK_IMPORTED_MODULE_2__.CustomizationImages() set images(val) { (this._images = val)._apply(this) } get uiCustomizationLayer() { return this._uiCustomizationLayer } _uiCustomizationLayer set uiCustomizationLayer(val) { var temp = Object.assign({}, val); Object.freeze(temp); this._uiCustomizationLayer = temp this._set({ "uiCustomizationLayer": val }) } set onCustomButtonTapped(completion) { (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_3__._setCustomButtonTappedCompletion)(completion) } static fromJson(jsonObject) { var result = new Customization() result.colors = _customization_colors__WEBPACK_IMPORTED_MODULE_0__.CustomizationColors.fromJson(jsonObject["colors"]) result.fonts = _customization_fonts__WEBPACK_IMPORTED_MODULE_1__.CustomizationFonts.fromJson(jsonObject["fonts"]) result.images = _customization_images__WEBPACK_IMPORTED_MODULE_2__.CustomizationImages.fromJson(jsonObject["images"]) result._uiCustomizationLayer = jsonObject["uiCustomizationLayer"] return result } toJson() { return { "colors": this.colors.toJson(), "fonts": this.fonts.toJson(), "images": this.images.toJson(), "uiCustomizationLayer": this.uiCustomizationLayer } } _set(json) { if (this === _index__WEBPACK_IMPORTED_MODULE_4__.FaceSDK.instance.customization) { (0,_internal_bridge__WEBPACK_IMPORTED_MODULE_3__.exec)("setCustomization", [json]) } } _apply() { this._set(toJson()) } } /***/ }), /***/ "./src/customization/customization_colors.js": /*!***************************************************!*\ !*** ./src/customization/customization_colors.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CustomizationColors: () => (/* binding */ CustomizationColors) /* harmony export */ }); /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index */ "./src/index.js"); class CustomizationColors { _onboardingScreenStartButtonBackground set onboardingScreenStartButtonBackground(val) { this._onboardingScreenStartButtonBackground = val this._set({ "100": val }) } _onboardingScreenStartButtonTitle set onboardingScreenStartButtonTitle(val) { this._onboardingScreenStartButtonTitle = val this._set({ "101": val }) } _onboardingScreenBackground set onboardingScreenBackground(val) { this._onboardingScreenBackground = val this._set({ "102": val }) } _onboardingScreenTitleLabelText set onboardingScreenTitleLabelText(val) { this._onboardingScreenTitleLabelText = val this._set({ "103": val }) } _onboardingScreenSubtitleLabelText set onboardingScreenSubtitleLabelText(val) { this._onboardingScreenSubtitleLabelText = val this._set({ "104": val }) } _onboardingScreenMessageLabelsText set onboardingScreenMessageLabelsText(val) { this._onboardingScreenMessageLabelsText = val this._set({ "105": val }) } _cameraScreenStrokeNormal set cameraScreenStrokeNormal(val) { this._cameraScreenStrokeNormal = val this._set({ "200": val }) } _cameraScreenStrokeActive set cameraScreenStrokeActive(val) { this._cameraScreenStrokeActive = val this._set({ "201": val }) } _cameraScreenSectorTarget set cameraScreenSectorTarget(val) { this._cameraScreenSectorTarget = val this._set({ "202": val }) } _cameraScreenSectorActive set cameraScreenSectorActive(val) { this._cameraScreenSectorActive = val this._set({ "203": val }) } _cameraScreenFrontHintLabelBackground set cameraScreenFrontHintLabelBackground(val) { this._cameraScreenFrontHintLabelBackground = val this._set({ "204": val }) } _cameraScreenFrontHintLabelText set cameraScreenFrontHintLabelText(val) { this._cameraScreenFrontHintLabelText = val this._set({ "205": val }) } _cameraScreenBackHintLabelBackground set cameraScreenBackHintLabelBackground(val) { this._cameraScreenBackHintLabelBackground = val this._set({ "206": val }) } _cameraScreenBackHintLabelText set cameraScreenBackHintLabelText(val) { this._cameraScreenBackHintLabelText = val this._set({ "207": val }) } _cameraScreenLightToolbarTint set cameraScreenLightToolbarTint(val) { this._cameraScreenLightToolbarTint = val this._set({ "208": val }) } _cameraScreenDarkToolbarTint set cameraScreenDarkToolbarTint(val) { this._cameraScreenDarkToolbarTint = val this._set({ "209": val }) } _retryScreenBackground set retryScreenBackground(val) { this._retryScreenBackground = val this._set({ "300": val }) } _retryScreenRetryButtonBackground set retryScreenRetryButtonBackground(val) { this._retryScreenRetryButtonBackground = val this._set({ "301": val }) } _retryScreenRetryButtonTitle set retryScreenRetryButtonTitle(val) { this._retryScreenRetryButtonTitle = val this._set({ "302": val }) } _retryScreenTitleLabelText set retryScreenTitleLabelText(val) { this._retryScreenTitleLabelText = val this._set({ "303": val }) } _retryScreenSubtitleLabelText set retryScreenSubtitleLabelText(val) { this._retryScreenSubtitleLabelText = val this._set({ "304": val }) } _retryScreenHintLabelsText set retryScreenHintLabelsText(val) { this._retryScreenHintLabelsText = val this._set({ "305": val }) } _processingScreenBackground set processingScreenBackground(val) { this._processingScreenBackground = val this._set({ "400": val }) } _processingScreenProgress set processingScreenProgress(val) { this._processingScreenProgress = val this._set({ "401": val }) } _processingScreenTitleLabel set processingScreenTitleLabel(val) { this._processingScreenTitleLabel = val this._set({ "402": val }) } _successScreenBackground set successScreenBackground(val) { this._successScreenBackground = val this._set({ "500": val }) } static fromJson(jsonObject) { var result = new CustomizationColors() result._onboardingScreenStartButtonBackground = jsonObject["100"] result._onboardingScreenStartButtonTitle = jsonObject["101"] result._onboardingScreenBackground = jsonObject["102"] result._onboardingScreenTitleLabelText = jsonObject["103"] result._onboardingScreenSubtitleLabelText = jsonObject["104"] result._onboardingScreenMessageLabelsText = jsonObject["105"] result._cameraScreenStrokeNormal = jsonObject["200"] result._cameraScreenStrokeActive = jsonObject["201"] result._cameraScreenSectorTarget = jsonObject["202"] result._cameraScreenSectorActive = jsonObject["203"] result._cameraScreenFrontHintLabelBackground = jsonObject["204"] result._cameraScreenFrontHintLabelText = jsonObject["205"] result._cameraScreenBackHintLabelBackground = jsonObject["206"] result._cameraScreenBackHintLabelText = jsonObject["207"] result._cameraScreenLightToolbarTint = jsonObject["208"] result._cameraScreenDarkToolbarTint = jsonObject["209"] result._retryScreenBackground = jsonObject["300"] result._retryScreenRetryButtonBackground = jsonObject["301"] result._retryScreenRetryButtonTitle = jsonObject["302"] result._retryScreenTitleLabelText = jsonObject["303"] result._retryScreenSubtitleLabelText = jsonObject["304"] result._retryScreenHintLabelsText = jsonObject["305"] result._processingScreenBackground = jsonObject["400"] result._processingScreenProgress = jsonObject["401"] result._processingScreenTitleLabel = jsonObject["402"] result._successScreenBackground = jsonObject["500"] return result } toJson() { return { "100": this._onboardingScreenStartButtonBackground, "101": this._onboardingScreenStartButtonTitle, "102": this._onboardingScreenBackground, "103": this._onboardingScreenTitleLabelText, "104": this._onboardingScreenSubtitleLabelText, "105": this._onboardingScreenMessageLabelsText, "200": this._cameraScreenStrokeNormal, "201": this._cameraScreenStrokeActive, "202": this._cameraScreenSectorTarget, "203": this._cameraScreenSectorActive, "204": this._cameraScreenFrontHintLabelBackground, "205": this._cameraScreenFrontHintLabelText, "206": this._cameraScreenBackHintLabelBackground, "207": this._cameraScreenBackHintLabelText, "208": this._cameraScreenLightToolbarTint, "209": this._cameraScreenDarkToolbarTint, "300": this._retryScreenBackground, "301": this._retryScreenRetryButtonBackground, "302": this._retryScreenRetryButtonTitle, "303": this._retryScreenTitleLabelText, "304": this._retryScreenSubtitleLabelText, "305": this._retryScreenHintLabelsText, "400": this._processingScreenBackground, "401": this._processingScreenProgress, "402": this._processingScreenTitleLabel, "500": this._successScreenBackground, } } _set(json) { var parentJson = { "colors": json } var parent = _index__WEBPACK_IMPORTED_MODULE_0__.FaceSDK.instance.customization if (this === parent.colors) parent._set(parentJson) } _apply() { this._set(this.toJson()) } } /***/ }), /***/ "./src/customization/customization_fonts.js": /*!**************************************************!*\ !*** ./src/customization/customization_fonts.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CustomizationFonts: () => (/* binding */ CustomizationFonts) /* harmony export */ }); /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index */ "./src/index.js"); /* harmony import */ var _font__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./font */ "./src/customization/font.js"); class CustomizationFonts { _onboardingScreenStartButton set onboardingScreenStartButton(val) { this._onboardingScreenStartButton = val this._set({ "100": val }) } _onboardingScreenTitleLabel set onboardingScreenTitleLabel(val) { this._onboardingScreenTitleLabel = val this._set({ "101": val }) } _onboardingScreenSubtitleLabel set onboardingScreenSubtitleLabel(val) { this._onboardingScreenSubtitleLabel = val this._set({ "102": val }) } _onboardingScreenMessageLabels set onboardingScreenMessageLabels(val) { this._onboardingScreenMessageLabels = val this._set({ "103": val }) } _cameraScreenHintLabel set cameraScreenHintLabel(val) { this._cameraScreenHintLabel = val this._set({ "200": val }) } _retryScreenRetryButton set retryScreenRetryButton(val) { this._retryScreenRetryButton = val this._set({ "300": val }) } _retryScreenTitleLabel set retryScreenTitleLabel(val) { this._retryScreenTitleLabel = val this._set({ "301": val }) } _retryScreenSubtitleLabel set retryScreenSubtitleLabel(val) { this._retryScreenSubtitleLabel = val this._set({ "302": val }) } _retryScreenHintLabels set retryScreenHintLabels(val) { this._retryScreenHintLabels = val this._set({ "303": val }) } _processingScreenLabel set processingScreenLabel(val) { this._processingScreenLabel = val this._set({ "400": val }) } static fromJson(jsonObject) { var result = new CustomizationFonts() result._onboardingScreenStartButton = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["100"]) result._onboardingScreenTitleLabel = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["101"]) result._onboardingScreenSubtitleLabel = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["102"]) result._onboardingScreenMessageLabels = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["103"]) result._cameraScreenHintLabel = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["200"]) result._retryScreenRetryButton = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["300"]) result._retryScreenTitleLabel = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["301"]) result._retryScreenSubtitleLabel = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["302"]) result._retryScreenHintLabels = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["303"]) result._processingScreenLabel = _font__WEBPACK_IMPORTED_MODULE_1__.Font.fromJson(jsonObject["400"]) return result } toJson() { return { "100": this._onboardingScreenStartButton, "101": this._onboardingScreenTitleLabel, "102": this._onboardingScreenSubtitleLabel, "103": this._onboardingScreenMessageLabels, "200": this._cameraScreenHintLabel, "300": this._retryScreenRetryButton, "301": this._retryScreenTitleLabel, "302": this._retryScreenSubtitleLabel, "303": this._retryScreenHintLabels, "400": this._processingScreenLabel, } } _set(json) { var parentJson = { "fonts": json } var parent = _index__WEBPACK_IMPORTED_MODULE_0__.FaceSDK.instance.customization if (this === parent.fonts) parent._set(parentJson) } _apply() { this._set(toJson()) } } /***/ }), /***/ "./src/customization/customization_images.js": /*!***************************************************!*\ !*** ./src/customization/customization_images.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CustomizationImages: () => (/* binding */ CustomizationImages) /* harmony export */ }); /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index */ "./src/index.js"); class CustomizationImages { _onboardingScreenCloseButton set onboardingScreenCloseButton(val) { this._onboardingScreenCloseButton = val this._set({ "100": val }) } _onboardingScreenIllumination set onboardingScreenIllumination(val) { this._onboardingScreenIllumination = val this._set({ "101": val }) } _onboardingScreenAccessories set onboardingScreenAccessories(val) { this._onboardingScreenAccessories = val this._set({ "102": val }) } _onboardingScreenCameraLevel set onboardingScreenCameraLevel(val) { this._onboardingScreenCameraLevel = val this._set({ "103": val }) } _cameraScreenCloseButton set cameraScreenCloseButton(val) { this._cameraScreenCloseButton = val this._set({ "200": val }) } _cameraScreenLightOnButton set cameraScreenLightOnButton(val) { this._cameraScreenLightOnButton = val this._set({ "201": val }) } _cameraScreenLightOffButton set cameraScreenLightOffButton(val) { this._cameraScreenLightOffButton = val this._set({ "202": val }) } _cameraScreenSwitchButton set cameraScreenSwitchButton(val) { this._cameraScreenSwitchButton = val this._set({ "203": val }) } _retryScreenCloseButton set retryScreenCloseButton(val) { this._retryScreenCloseButton = val this._set({ "300": val }) } _retryScreenHintEnvironment set retryScreenHintEnvironment(val) { this._retryScreenHintEnvironment = val this._set({ "301": val }) } _retryScreenHintSubject set retryScreenHintSubject(val) { this._retryScreenHintSubject = val this._set({ "302": val }) } _processingScreenCloseButton set processingScreenCloseButton(val) { this._processingScreenCloseButton = val this._set({ "400": val }) } _successScreenImage set successScreenImage(val) { this._successScreenImage = val this._set({ "500": val }) } static fromJson(jsonObject) { var result = new CustomizationImages() result._onboardingScreenCloseButton = jsonObject["100"] result._onboardingScreenIllumination = jsonObject["101"] result._onboardingScreenAccessories = jsonObject["102"] result._onboardingScreenCameraLevel = jsonObject["103"] result._cameraScreenCloseButton = jsonObject["200"] result._cameraScreenLightOnButton = jsonObject["201"] result._cameraScreenLightOffButton = jsonObject["202"] result._cameraScreenSwitchButton = jsonObject["203"] result._retryScreenCloseButton = jsonObject["300"] result._retryScreenHintEnvironment = jsonObject["301"] result._retryScreenHintSubject = jsonObject["302"] result._processingScreenCloseButton = jsonObject["400"] result._successScreenImage = jsonObject["500"] return result } toJson() { return { "100": this._onboardingScreenCloseButton, "101": this._onboardingScreenIllumination, "102": this._onboardingScreenAccessories, "103": this._onboardingScreenCameraLevel, "200": this._cameraScreenCloseButton, "201": this._cameraScreenLightOnButton, "202": this._cameraScreenLightOffButton, "203": this._cameraScreenSwitchButton, "300": this._retryScreenCloseButton, "301": this._retryScreenHintEnvironment, "302": this._retryScreenHintSubject, "400": this._processingScreenCloseButton, "500": this._successScreenImage, } } _set(json) { var parentJson = { "images": json } var parent = _index__WEBPACK_IMPORTED_MODULE_0__.FaceSDK.instance.customization if (this === parent.images) parent._set(parentJson) } _apply() { this._set(toJson()) } } /***/ }), /***/ "./src/customization/font.js": /*!***********************************!*\ !*** ./src/customization/font.js ***! \***********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Font: () => (/* binding */ Font), /* harmony export */ FontStyle: () => (/* binding */ FontStyle) /* harmony export */ }); class Font { name size style constructor(name, params) { this.name = name this.size = params?.size this.style = params?.style } static fromJson(jsonObject) { if (jsonObject == null) return null const result = new Font() result.name = jsonObject["name"] result.size = jsonObject["size"] result.style = jsonObject["style"] return result } } const FontStyle = { NORMAL: 0, BOLD: 1, ITALIC: 2, BOLD_ITALIC: 3, } /***/ }), /***/ "./src/customization/screen_orientation.js": /*!*************************************************!*\ !*** ./src/customization/screen_orientation.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ScreenOrientation: () => (/* binding */ ScreenOrientation) /* harmony export */ }); const ScreenOrientation = { PORTRAIT: 0, LANDSCAPE: 1, } /***/ }), /***/ "./src/detect_faces/detect_face_result.js": /*!************************************************!*\ !*** ./src/detect_faces/detect_face_result.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFaceResult: () => (/* binding */ DetectFaceResult) /* harmony export */ }); /* harmony import */ var _detect_faces_attribute_result__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./detect_faces_attribute_result */ "./src/detect_faces/detect_faces_attribute_result.js"); /* harmony import */ var _image_quality_image_quality_result__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../image_quality/image_quality_result */ "./src/image_quality/image_quality_result.js"); /* harmony import */ var _image_params_rect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../image_params/rect */ "./src/image_params/rect.js"); /* harmony import */ var _image_params_point__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../image_params/point */ "./src/image_params/point.js"); class DetectFaceResult { quality attributes crop faceRect originalRect landmarks isQualityCompliant static fromJson(jsonObject) { if (jsonObject == null) return null const result = new DetectFaceResult() result.quality = [] if (jsonObject["quality"] != null) for (const item of jsonObject["quality"]) result.quality.push(_image_quality_image_quality_result__WEBPACK_IMPORTED_MODULE_1__.ImageQualityResult.fromJson(item)) result.attributes = [] if (jsonObject["attributes"] != null) for (const item of jsonObject["attributes"]) result.attributes.push(_detect_faces_attribute_result__WEBPACK_IMPORTED_MODULE_0__.DetectFacesAttributeResult.fromJson(item)) result.crop = jsonObject["crop"] result.faceRect = _image_params_rect__WEBPACK_IMPORTED_MODULE_2__.Rect.fromJson(jsonObject["faceRect"]) result.originalRect = _image_params_rect__WEBPACK_IMPORTED_MODULE_2__.Rect.fromJson(jsonObject["originalRect"]) result.landmarks = [] if (jsonObject["landmarks"] != null) for (const item of jsonObject["landmarks"]) result.landmarks.push(_image_params_point__WEBPACK_IMPORTED_MODULE_3__.Point.fromJson(item)) result.isQualityCompliant = jsonObject["isQualityCompliant"] return result } } /***/ }), /***/ "./src/detect_faces/detect_faces_attribute.js": /*!****************************************************!*\ !*** ./src/detect_faces/detect_faces_attribute.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFacesAttribute: () => (/* binding */ DetectFacesAttribute) /* harmony export */ }); const DetectFacesAttribute = { AGE: "Age", EYE_RIGHT: "EyeRight", EYE_LEFT: "EyeLeft", EMOTION: "Emotion", SMILE: "Smile", GLASSES: "Glasses", HEAD_COVERING: "HeadCovering", FOREHEAD_COVERING: "ForeheadCovering", MOUTH: "Mouth", MEDICAL_MASK: "MedicalMask", OCCLUSION: "Occlusion", STRONG_MAKEUP: "StrongMakeup", HEADPHONES: "Headphones", } /***/ }), /***/ "./src/detect_faces/detect_faces_attribute_result.js": /*!***********************************************************!*\ !*** ./src/detect_faces/detect_faces_attribute_result.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFacesAttributeResult: () => (/* binding */ DetectFacesAttributeResult) /* harmony export */ }); /* harmony import */ var _image_quality_image_quality_range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../image_quality/image_quality_range */ "./src/image_quality/image_quality_range.js"); class DetectFacesAttributeResult { attribute value range confidence static fromJson(jsonObject) { if (jsonObject == null) return null const result = new DetectFacesAttributeResult() result.attribute = jsonObject["attribute"] result.value = jsonObject["value"] result.range = _image_quality_image_quality_range__WEBPACK_IMPORTED_MODULE_0__.ImageQualityRange.fromJson(jsonObject["range"]) result.confidence = jsonObject["confidence"] return result } } /***/ }), /***/ "./src/detect_faces/detect_faces_backend_exception.js": /*!************************************************************!*\ !*** ./src/detect_faces/detect_faces_backend_exception.js ***! \************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFacesBackendErrorCode: () => (/* binding */ DetectFacesBackendErrorCode), /* harmony export */ DetectFacesBackendException: () => (/* binding */ DetectFacesBackendException) /* harmony export */ }); class DetectFacesBackendException { code message static fromJson(jsonObject) { if (jsonObject == null) return null const result = new DetectFacesBackendException() result.code = jsonObject["code"] result.message = jsonObject["message"] ?? "" return result } } const DetectFacesBackendErrorCode = { FR_FACE_NOT_DETECTED: 2, FACER_NO_LICENSE: 200, FACER_IS_NOT_INITIALIZED: 201, FACER_COMMAND_IS_NOT_SUPPORTED: 202, FACER_COMMAND_PARAMS_READ_ERROR: 203, UNDEFINED: -1, } /***/ }), /***/ "./src/detect_faces/detect_faces_config.js": /*!*************************************************!*\ !*** ./src/detect_faces/detect_faces_config.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFacesConfig: () => (/* binding */ DetectFacesConfig) /* harmony export */ }); class DetectFacesConfig { attributes customQuality outputImageParams onlyCentralFace constructor(params) { this.onlyCentralFace = false this.attributes = params?.attributes this.customQuality = params?.customQuality this.outputImageParams = params?.outputImageParams this.onlyCentralFace = params?.onlyCentralFace ?? this.onlyCentralFace } } /***/ }), /***/ "./src/detect_faces/detect_faces_exception.js": /*!****************************************************!*\ !*** ./src/detect_faces/detect_faces_exception.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFacesErrorCode: () => (/* binding */ DetectFacesErrorCode), /* harmony export */ DetectFacesException: () => (/* binding */ DetectFacesException) /* harmony export */ }); /* harmony import */ var _detect_faces_backend_exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./detect_faces_backend_exception */ "./src/detect_faces/detect_faces_backend_exception.js"); class DetectFacesException { code message underlyingError static fromJson(jsonObject) { if (jsonObject == null) return null const result = new DetectFacesException() result.code = jsonObject["code"] result.message = jsonObject["message"] ?? "" result.underlyingError = _detect_faces_backend_exception__WEBPACK_IMPORTED_MODULE_0__.DetectFacesBackendException.fromJson(jsonObject["underlyingError"]) return result } } const DetectFacesErrorCode = { IMAGE_EMPTY: 0, FR_FACE_NOT_DETECTED: 1, FACER_NO_LICENSE: 2, FACER_IS_NOT_INITIALIZED: 3, FACER_COMMAND_IS_NOT_SUPPORTED: 4, FACER_COMMAND_PARAMS_READ_ERROR: 5, PROCESSING_FAILED: 6, REQUEST_FAILED: 7, API_CALL_FAILED: 8, } /***/ }), /***/ "./src/detect_faces/detect_faces_request.js": /*!**************************************************!*\ !*** ./src/detect_faces/detect_faces_request.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFacesRequest: () => (/* binding */ DetectFacesRequest) /* harmony export */ }); /* harmony import */ var _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./detect_faces_scenario */ "./src/detect_faces/detect_faces_scenario.js"); class DetectFacesRequest { image configuration tag constructor(image, configuration, params) { this.image = image this.configuration = configuration this.tag = params?.tag } static qualityFull(image) { const result = new DetectFacesRequest() result.image = image result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.QUALITY_FULL return result } static qualityICAO(image) { const result = new DetectFacesRequest() result.image = image result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.QUALITY_ICAO return result } static qualityVisaSchengen(image) { const result = new DetectFacesRequest() result.image = image result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.QUALITY_VISA_SCHENGEN return result } static qualityVisaUSA(image) { const result = new DetectFacesRequest() result.image = image result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.QUALITY_VISA_USA return result } static cropCentralFace(image) { const result = new DetectFacesRequest() result.image = image result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.CROP_CENTRAL_FACE return result } static cropAllFaces(image) { const result = new DetectFacesRequest() result.image = image result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.CROP_ALL_FACES return result } static thumbnail(image) { const result = new DetectFacesRequest() result.image = image result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.THUMBNAIL return result } static allAttributes(image) { const result = new DetectFacesRequest() result.image = image result.scenario = _detect_faces_scenario__WEBPACK_IMPORTED_MODULE_0__.DetectFacesScenario.ATTRIBUTES_ALL return result } } /***/ }), /***/ "./src/detect_faces/detect_faces_response.js": /*!***************************************************!*\ !*** ./src/detect_faces/detect_faces_response.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFacesResponse: () => (/* binding */ DetectFacesResponse) /* harmony export */ }); /* harmony import */ var _detect_face_result__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./detect_face_result */ "./src/detect_faces/detect_face_result.js"); /* harmony import */ var _detect_faces_exception__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./detect_faces_exception */ "./src/detect_faces/detect_faces_exception.js"); class DetectFacesResponse { detection scenario error allDetections static fromJson(jsonObject) { if (jsonObject == null) return null const result = new DetectFacesResponse() result.detection = _detect_face_result__WEBPACK_IMPORTED_MODULE_0__.DetectFaceResult.fromJson(jsonObject["detection"]) result.scenario = jsonObject["scenario"] result.error = _detect_faces_exception__WEBPACK_IMPORTED_MODULE_1__.DetectFacesException.fromJson(jsonObject["error"]) result.allDetections = [] if (jsonObject["allDetections"] != null) for (const item of jsonObject["allDetections"]) result.allDetections.push(_detect_face_result__WEBPACK_IMPORTED_MODULE_0__.DetectFaceResult.fromJson(item)) return result } } /***/ }), /***/ "./src/detect_faces/detect_faces_scenario.js": /*!***************************************************!*\ !*** ./src/detect_faces/detect_faces_scenario.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DetectFacesScenario: () => (/* binding */ DetectFacesScenario) /* harmony export */ }); const DetectFacesScenario = { CROP_CENTRAL_FACE: "CropCentralFace", CROP_ALL_FACES: "CropAllFaces", THUMBNAIL: "Thumbnail", ATTRIBUTES_ALL: "AttributesAll", QUALITY_FULL: "QualityFull", QUALITY_ICAO: "QualityICAO", QUALITY_VISA_SCHENGEN: "QualityVisaSchengen", QUALITY_VISA_USA: "QualityVisaUSA", } /***/ }), /***/ "./src/face_capture/face_capture_config.js": /*!*************************************************!*\ !*** ./src/face_capture/face_capture_config.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FaceCaptureConfig: () => (/* binding */ FaceCaptureConfig) /* harmony export */ }); /* harmony import */ var _customization_camera_position__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../customization/camera_position */ "./src/customization/camera_position.js"); /* harmony import */ var _customization_screen_orientation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../customization/screen_orientation */ "./src/customization/screen_orientation.js"); class FaceCaptureConfig { copyright cameraSwitchEnabled closeButtonEnabled torchButtonEnabled vibrateOnSteps detectOcclusion showFaceAnimation cameraPositionIOS cameraPositionAndroid screenOrientation timeout holdStillDuration constructor(params) { this.copyright = params?.copyright ?? true this.cameraSwitchEnabled = params?.cameraSwitchEnabled ?? false this.closeButtonEnabled = params?.closeButtonEnabled ?? true this.torchButtonEnabled = params?.torchButtonEnabled ?? true this.vibrateOnSteps = params?.vibrateOnSteps ?? true this.detectOcclusion = params?.detectOcclusion ?? true this.showFaceAnimation = params?.showFaceAnimation ?? true this.cameraPositionIOS = params?.cameraPositionIOS ?? _customization_camera_position__WEBPACK_IMPORTED_MODULE_0__.CameraPosition.FRONT this.cameraPositionAndroid = params?.cameraPositionAndroid this.screenOrientation = params?.screenOrientation ?? [_customization_screen_orientation__WEBPACK_IMPORTED_MODULE_1__.ScreenOrientation.PORTRAIT] this.timeout = params?.timeout this.holdStillDuration = params?.holdStillDuration } } /***/ }), /***/ "./src/face_capture/face_capture_exception.js": /*!****************************************************!*\ !*** ./src/face_capture/face_capture_exception.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FaceCaptureErrorCode: () => (/* binding */ FaceCaptureErrorCode), /* harmony export */ FaceCaptureException: () => (/* binding */ FaceCaptureException) /* harmony export */ }); class FaceCaptureException { code message static fromJson(jsonObject) { if (jsonObject == null) return null const result = new FaceCaptureException() result.code = jsonObject["code"] result.message = jsonObject["message"] ?? "" return result } } const FaceCaptureErrorCode = { CANCEL: 0, TIMEOUT: 1, NOT_INITIALIZED: 2, SESSION_START_FAILED: 3, CAMERA_NOT_AVAILABLE: 4, CAMERA_NO_PERMISSION: 5, IN_PROGRESS_ALREADY: 6, CONTEXT_IS_NULL: 7, } /***/ }), /***/ "./src/face_capture/face_capture_image.js": /*!************************************************!*\ !*** ./src/face_capture/face_capture_image.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FaceCaptureImage: () => (/* binding */ FaceCaptureImage), /* harmony export */ ImageType: () => (/* binding */ ImageType) /* harmony export */ }); class FaceCaptureImage { imageType image tag static fromJson(jsonObject) { if (jsonObject == null) return null const result = new FaceCaptureImage() result.imageType = jsonObject["imageType"] result.image = jsonObject["image"] result.tag = jsonObject["tag"] return result } } const ImageType = { PRINTED: 1, RFID: 2, LIVE: 3, DOCUMENT_WITH_LIVE: 4, EXTERNAL: 5, GHOST_PORTRAIT: 6, BARCODE: 7, } /***/ }), /***/ "./src/face_capture/face_capture_response.js": /*!***************************************************!*\ !*** ./src/face_capture/face_capture_response.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FaceCaptureResponse: () => (/* binding */ FaceCaptureResponse) /* harmony export */ }); /* harmony import */ var _face_capture_image__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./face_capture_image */ "./src/face_capture/face_capture_image.js"); /* harmony import */ var _face_capture_exception__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./face_capture_exception */ "./src/face_capture/face_capture_exception.js"); class FaceCaptureResponse { error image static fromJson(jsonObject) { if (jsonObject == null) return null const result = new FaceCaptureResponse() result.error = _face_capture_exception__WEBPACK_IMPORTED_MODULE_1__.FaceCaptureException.fromJson(jsonObject["error"]) result.image = _face_capture_image__WEBPACK_IMPORTED_MODULE_0__.FaceCaptureImage.fromJson(jsonObject["image"]) return result } } /***/ }), /***/ "./src/image_params/output_image_crop.js": /*!***********************************************!*\ !*** ./src/image_params/output_image_crop.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ OutputImageCrop: () => (/* binding */ OutputImageCrop), /* harmony export */ OutputImageCropAspectRatio: () => (/* binding */ OutputImageCropAspectRatio) /* harmony export */ }); class OutputImageCrop { type size padColor returnOriginalRect constructor(type, params) { this.type = type this.size = params?.size this.padColor = params?.padColor this.returnOriginalRect = params?.returnOriginalRect ?? false } } const OutputImageCropAspectRatio = { RATIO_3X4: 0, RATIO_4X5: 1, RATIO_2X3: 2, RATIO_1X1: 3, RATIO_7X9: 4, } /***/ }), /***/ "./src/image_params/output_image_params.js": /*!*************************************************!*\ !*** ./src/image_params/output_image_params.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ OutputImageParams: () => (/* binding */ OutputImageParams) /* harmony export */ }); class OutputImageParams { crop backgroundColor constructor(params) { this.crop = params?.crop this.backgroundColor = params?.backgroundColor } } /***/ }), /***/ "./src/image_params/point.js": /*!***********************************!*\ !*** ./src/image_params/point.js ***! \***********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Point: () => (/* binding */ Point) /* harmony export */ }); class Point { x y static fromJson(jsonObject) { if (jsonObject == null) return null const result = new Point() result.x = jsonObject["x"] result.y = jsonObject["y"] return result } } /***/ }), /***/ "./src/image_params/rect.js": /*!**********************************!*\ !*** ./src/image_params/rect.js ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Rect: () => (/* binding */ Rect) /* harmony export */ }); class Rect { bottom top left right static fromJson(jsonObject) { if (jsonObject == null) return null const result = new Rect() result.bottom = jsonObject["bottom"] result.top = jsonObject["top"] result.left = jsonObject["left"] result.right = jsonObject["right"] return result } } /***/ }), /***/ "./src/image_params/size.js": /*!**********************************!*\ !*** ./src/image_params/size.js ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Size: () => (/* binding */ Size) /* harmony export */ }); class Size { width height constructor(width, height) { this.width = width this.height = height } } /***/ }), /***/ "./src/image_quality/image_quality_characteristic.js": /*!***********************************************************!*\ !*** ./src/image_quality/image_quality_characteristic.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ImageQualityCharacteristic: () => (/* binding */ ImageQualityCharacteristic) /* harmony export */ }); /* harmony import */ var _image_quality_range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./image_quality_range */ "./src/image_quality/image_quality_range.js"); class ImageQualityCharacteristic { characteristicName recommendedRange customRange color static _create(name, params) { var result = new ImageQualityCharacteristic() result.characteristicName = name result.recommendedRange = params?.recommended result.customRange = params?.custom result.color = params?.color return result } withCustomRange(min, max) { this.customRange = new _image_quality_range__WEBPACK_IMPORTED_MODULE_0__.ImageQualityRange(min, max) return this } withCustomValue(value) { this.customRange = _image_quality_range__WEBPACK_IMPORTED_MODULE_0__.ImageQualityRange.withValue(value) return this } } /***/ }), /***/ "./src/image_quality/image_quality_characteristic_name.js": /*!****************************************************************!*\ !*** ./src/image_quality/image_quality_characteristic_name.js ***! \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ImageQualityCharacteristicName: () => (/* binding */ ImageQualityCharacteristicName) /* harmony export */ }); const ImageQualityCharacteristicName = { IMAGE_WIDTH: "ImageWidth", IMAGE_HEIGHT: "ImageHeight", IMAGE_WIDTH_TO_HEIGHT: "ImageWidthToHeight", IMAGE_CHANNELS_NUMBER: "ImageChannelsNumber", ART_FACE: "ArtFace", PADDING_RATIO: "PaddingRatio", FACE_MID_POINT_HORIZONTAL_POSITION: "FaceMidPointHorizontalPosition", FACE_MID_POINT_VERTICAL_POSITION: "FaceMidPointVerticalPosition", HEAD_WIDTH_RATIO: "HeadWidthRatio", HEAD_HEIGHT_RATIO: "HeadHeightRatio", EYES_DISTANCE: "EyesDistance", YAW: "Yaw", PITCH: "Pitch", ROLL: "Roll", BLUR_LEVEL: "BlurLevel", NOISE_LEVEL: "NoiseLevel", UNNATURAL_SKIN_TONE: "UnnaturalSkinTone", FACE_DYNAMIC_RANGE: "FaceDynamicRange", EYE_RIGHT_CLOSED: "Eye