UNPKG

@innovatrics/dot-face-auto-capture

Version:
2 lines (1 loc) 2.79 kB
(function(t,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(t=typeof globalThis<"u"?globalThis:t||self,_(t["@innovatrics/dot-events-auto-capture"]={}))})(this,(function(t){"use strict";const _={};_.CONTINUE_DETECTION="continue-detection",_.SWITCH_CAMERA="switch-camera",_.TOGGLE_MIRROR="toggle-mirror";const I=_,a={};a.FIRST_FRAME="first-frame",a.FIRST_VALID_FRAME="first-valid-frame";const d=a,O={};O.REQUEST_CAPTURE="dot-custom-event:request-capture";const u=O,r=(E,T)=>{const s={};s.detail=T,document.dispatchEvent(new CustomEvent(E,s))},f=(E,T)=>{const s={};s.instruction=T,r(E,s)};function h(E){const T={};T.instruction=E;const s=T;r(u.REQUEST_CAPTURE,s)}const c={};c.LOADING="loading",c.ERROR="error",c.WAITING="waiting",c.RUNNING="running",c.COMPLETE="complete",c.BLURRED="blurred";const C=c,N={...C};N.DONE="done";const l=N,R={};R.EYE_NOT_PRESENT="eye_not_present";const i=R,e={};e.CANDIDATE_SELECTION="candidate_selection",e.FACE_TOO_CLOSE="face_too_close",e.FACE_TOO_FAR="face_too_far",e.FACE_CENTERING="face_centering",e.FACE_NOT_PRESENT="face_not_present",e.SHARPNESS_TOO_LOW="sharpness_too_low",e.BRIGHTNESS_TOO_LOW="brightness_too_low",e.BRIGHTNESS_TOO_HIGH="brightness_too_high",e.DEVICE_PITCHED="device_pitched",e.LEFT_EYE_NOT_PRESENT="left_"+i.EYE_NOT_PRESENT,e.RIGHT_EYE_NOT_PRESENT="right_"+i.EYE_NOT_PRESENT,e.MOUTH_NOT_PRESENT="mouth_not_present",e.MOUTH_SCORE_TOO_HIGH="mouth_score_too_high",e.MOUTH_SCORE_TOO_LOW="mouth_score_too_low";const o=e,n={};n.isPresent=o.FACE_NOT_PRESENT,n.isNotPitched=o.DEVICE_PITCHED,n.isNotSmall=o.FACE_TOO_FAR,n.isNotLarge=o.FACE_TOO_CLOSE,n.isNotOutOfBounds=o.FACE_CENTERING,n.isNotDim=o.BRIGHTNESS_TOO_LOW,n.isNotBright=o.BRIGHTNESS_TOO_HIGH,n.isSharp=o.SHARPNESS_TOO_LOW,n.isLeftEyePresent=o.LEFT_EYE_NOT_PRESENT,n.isRightEyePresent=o.RIGHT_EYE_NOT_PRESENT,n.isMouthPresent=o.MOUTH_NOT_PRESENT,n.isMouthScoreNotTooHigh=o.MOUTH_SCORE_TOO_HIGH,n.isMouthScoreNotTooLow=o.MOUTH_SCORE_TOO_LOW;const p=n;var S=(E=>(E.CAMERA_PROPS_CHANGED="face-auto-capture:camera-props-changed",E.CONTROL="face-auto-capture:control",E.DETECTION_CHANGED="face-auto-capture:detection-changed",E.FACE_DETECTION="face-auto-capture:face-detection",E.INSTRUCTION_CHANGED="face-auto-capture:instruction-changed",E.STATE_CHANGED="face-auto-capture:state-changed",E.VIDEO_ELEMENT_SIZE="face-auto-capture:video-element-size",E))(S||{});t.AppStateValues=C,t.ComponentCustomEvent=u,t.ControlEventInstruction=I,t.EyeInstructionCodeValues=i,t.FaceCheckToInstructionCodeMap=p,t.FaceCustomEvent=S,t.FaceInstructionCodeValues=o,t.LivenessStateValues=l,t.RequestCaptureInstruction=d,t.dispatchCaptureEvent=h,t.dispatchControlEvent=f,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));