UNPKG

@innovatrics/dot-face-auto-capture

Version:
2 lines (1 loc) 4.02 kB
(function(e,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(e=typeof globalThis<"u"?globalThis:e||self,c(e["@innovatrics/dot-events-auto-capture"]={}))})(this,function(e){"use strict";const c={};c.CONTINUE_DETECTION="continue-detection",c.SWITCH_CAMERA="switch-camera",c.TOGGLE_MIRROR="toggle-mirror";const A=c,_={};_.FIRST_FRAME="first-frame",_.FIRST_VALID_FRAME="first-valid-frame";const S=_,i={};i.REQUEST_CAPTURE="dot-custom-event:request-capture";const C=i;var I=(t=>(t.CAMERA_PROPS_CHANGED="document-auto-capture:camera-props-changed",t.CONTROL="document-auto-capture:control",t.DETECTED_DOCUMENT_CHANGED="document-auto-capture:detected-document-changed",t.DOCUMENT_DETECTION="document-auto-capture:document-detection",t.INSTRUCTION_CHANGED="document-auto-capture:instruction-changed",t.INSTRUCTION_ESCALATED="document-auto-capture:instruction-escalated",t.STATE_CHANGED="document-auto-capture:state-changed",t.VIDEO_ELEMENT_SIZE="document-auto-capture:video-element-size",t))(I||{}),O=(t=>(t.CAMERA_PROPS_CHANGED="face-auto-capture:camera-props-changed",t.CONTROL="face-auto-capture:control",t.DETECTED_FACE_CHANGED="face-auto-capture:detected-face-changed",t.FACE_DETECTION="face-auto-capture:face-detection",t.INSTRUCTION_CHANGED="face-auto-capture:instruction-changed",t.STATE_CHANGED="face-auto-capture:state-changed",t.VIDEO_ELEMENT_SIZE="face-auto-capture:video-element-size",t))(O||{}),p=(t=>(t.ANIMATION_END="magnifeye-auto-capture:animation-end",t.STATUS_CHANGED="magnifeye-auto-capture:status-changed",t))(p||{}),m=(t=>(t.INSTRUCTION_ESCALATED="smile:instruction-escalated",t.STATUS_CHANGED="smile-auto-capture:status-changed",t))(m||{}),h=(t=>(t.CAMERA_PROPS_CHANGED="palm-capture:camera-props-changed",t.CONTROL="palm-capture:control",t.DETECTED_PALM_CHANGED="palm-capture:detected-palm-changed",t.INSTRUCTION_CHANGED="palm-capture:instruction-changed",t.STATE_CHANGED="palm-capture:state-changed",t.VIDEO_ELEMENT_SIZE="palm-capture:video-element-size",t))(h||{}),l=(t=>(t.STATUS_CHANGED="eye-gaze-auto-capture:status-changed",t))(l||{});const N=(t,u)=>{const a={};a.detail=u,document.dispatchEvent(new CustomEvent(t,a))},D=(t,u)=>{const a={};a.instruction=u,N(t,a)};function H(t){const u={};u.instruction=t;const a=u;N(C.REQUEST_CAPTURE,a)}const s={};s.FRONT="user",s.REAR="environment";const f=s,r={};r.AUTO_CAPTURE="AUTO_CAPTURE",r.WAIT_FOR_REQUEST="WAIT_FOR_REQUEST";const G=r,T={};T.LOADING="LOADING",T.ERROR="ERROR",T.WAITING="WAITING",T.RUNNING="RUNNING";const g=T,d={};d.EYE_NOT_PRESENT="eye_not_present";const R=d,o={};o.CANDIDATE_SELECTION="candidate_selection",o.FACE_TOO_CLOSE="face_too_close",o.FACE_TOO_FAR="face_too_far",o.FACE_CENTERING="face_centering",o.FACE_NOT_PRESENT="face_not_present",o.SHARPNESS_TOO_LOW="sharpness_too_low",o.BRIGHTNESS_TOO_LOW="brightness_too_low",o.BRIGHTNESS_TOO_HIGH="brightness_too_high",o.DEVICE_PITCHED="device_pitched",o.LEFT_EYE_NOT_PRESENT="left_"+R.EYE_NOT_PRESENT,o.RIGHT_EYE_NOT_PRESENT="right_"+R.EYE_NOT_PRESENT,o.MOUTH_NOT_PRESENT="mouth_not_present",o.MOUTH_SCORE_TOO_HIGH="mouth_score_too_high",o.MOUTH_SCORE_TOO_LOW="mouth_score_too_low";const n=o,E={};E.isPresent=n.FACE_NOT_PRESENT,E.isNotPitched=n.DEVICE_PITCHED,E.isNotSmall=n.FACE_TOO_FAR,E.isNotLarge=n.FACE_TOO_CLOSE,E.isNotOutOfBounds=n.FACE_CENTERING,E.isNotDim=n.BRIGHTNESS_TOO_LOW,E.isNotBright=n.BRIGHTNESS_TOO_HIGH,E.isSharp=n.SHARPNESS_TOO_LOW,E.isLeftEyePresent=n.LEFT_EYE_NOT_PRESENT,E.isRightEyePresent=n.RIGHT_EYE_NOT_PRESENT,E.isMouthPresent=n.MOUTH_NOT_PRESENT,E.isMouthScoreNotTooHigh=n.MOUTH_SCORE_TOO_HIGH,E.isMouthScoreNotTooLow=n.MOUTH_SCORE_TOO_LOW;const v=E;e.AppStateValues=g,e.CaptureMode=G,e.ComponentCustomEvent=C,e.ControlEventInstruction=A,e.FaceCheckToInstructionCodeMap=v,e.FaceCustomEvent=O,e.FaceInstructionCodeValues=n,e.FacingMode=f,e.RequestCaptureInstruction=S,e.dispatchCaptureEvent=H,e.dispatchControlEvent=D,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});