@innovatrics/dot-document-auto-capture
Version:
Digital onboarding document capture
2 lines (1 loc) • 2.37 kB
JavaScript
(function(t,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(t=typeof globalThis<"u"?globalThis:t||self,o(t["@innovatrics/dot-events-auto-capture"]={}))})(this,(function(t){"use strict";const o={};o.CONTINUE_DETECTION="continue-detection",o.SWITCH_CAMERA="switch-camera",o.TOGGLE_MIRROR="toggle-mirror";const S=o,a={};a.FIRST_FRAME="first-frame",a.FIRST_VALID_FRAME="first-valid-frame";const R=a,_={};_.REQUEST_CAPTURE="dot-custom-event:request-capture";const T=_,r=(e,i)=>{const E={};E.detail=i,document.dispatchEvent(new CustomEvent(e,E))},m=(e,i)=>{const E={};E.instruction=i,r(e,E)};function I(e){const i={};i.instruction=e;const E=i;r(T.REQUEST_CAPTURE,E)}const u={};u.LOADING="loading",u.ERROR="error",u.WAITING="waiting",u.RUNNING="running",u.COMPLETE="complete",u.BLURRED="blurred";const d=u,O={...d};O.DONE="done";const p=O,C={};C.EYE_NOT_PRESENT="eye_not_present";const l=C,n={};n.CANDIDATE_SELECTION="candidate_selection",n.DOCUMENT_CENTERING="document_centering",n.DOCUMENT_NOT_PRESENT="document_not_present",n.DOCUMENT_TOO_FAR="document_too_far",n.SHARPNESS_TOO_LOW="sharpness_too_low",n.BRIGHTNESS_TOO_LOW="brightness_too_low",n.BRIGHTNESS_TOO_HIGH="brightness_too_high",n.HOTSPOTS_PRESENT="hotspots_present";const c=n,s={};s.isPresent=c.DOCUMENT_NOT_PRESENT,s.isNotSmall=c.DOCUMENT_TOO_FAR,s.isNotOutOfBounds=c.DOCUMENT_CENTERING,s.isSharp=c.SHARPNESS_TOO_LOW,s.isNotDim=c.BRIGHTNESS_TOO_LOW,s.isNotBright=c.BRIGHTNESS_TOO_HIGH,s.noHotspots=c.HOTSPOTS_PRESENT;const D=s;var N=(e=>(e.CAMERA_PROPS_CHANGED="document-auto-capture:camera-props-changed",e.CONTROL="document-auto-capture:control",e.DETECTION_CHANGED="document-auto-capture:detection-changed",e.INSTRUCTION_CHANGED="document-auto-capture:instruction-changed",e.INSTRUCTION_ESCALATED="document-auto-capture:instruction-escalated",e.STATE_CHANGED="document-auto-capture:state-changed",e.VIDEO_ELEMENT_SIZE="document-auto-capture:video-element-size",e))(N||{});t.AppStateValues=d,t.ComponentCustomEvent=T,t.ControlEventInstruction=S,t.DocumentCheckToInstructionCodeMap=D,t.DocumentCustomEvent=N,t.DocumentInstructionCodeValues=c,t.EyeInstructionCodeValues=l,t.LivenessStateValues=p,t.RequestCaptureInstruction=R,t.dispatchCaptureEvent=I,t.dispatchControlEvent=m,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));