@ahmed_hani/dot-document-auto-capture 8.0.0 → 8.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/events.mjs CHANGED
@@ -1,44 +1,44 @@
1
1
  const _ = {};
2
2
  _.CONTINUE_DETECTION = "continue-detection", _.SWITCH_CAMERA = "switch-camera", _.TOGGLE_MIRROR = "toggle-mirror";
3
- const S = _, T = {};
3
+ const R = _, T = {};
4
4
  T.FIRST_FRAME = "first-frame", T.FIRST_VALID_FRAME = "first-valid-frame";
5
- const R = T, u = {};
5
+ const I = T, u = {};
6
6
  u.REQUEST_CAPTURE = "dot-custom-event:request-capture";
7
- const N = u, a = (t, s) => {
7
+ const N = u, r = (t, s) => {
8
8
  const n = {};
9
9
  n.detail = s, document.dispatchEvent(new CustomEvent(t, n));
10
- }, I = (t, s) => {
10
+ }, d = (t, s) => {
11
11
  const n = {};
12
- n.instruction = s, a(t, n);
12
+ n.instruction = s, r(t, n);
13
13
  };
14
14
  function m(t) {
15
15
  const s = {};
16
16
  s.instruction = t;
17
17
  const n = s;
18
- a(N.REQUEST_CAPTURE, n);
18
+ r(N.REQUEST_CAPTURE, n);
19
19
  }
20
20
  const E = {};
21
21
  E.LOADING = "loading", E.ERROR = "error", E.WAITING = "waiting", E.RUNNING = "running", E.COMPLETE = "complete";
22
- const i = E, r = { ...i };
23
- r.DONE = "done";
24
- const p = r, O = {};
25
- O.EYE_NOT_PRESENT = "eye_not_present";
26
- const A = O, e = {};
27
- e.CANDIDATE_SELECTION = "candidate_selection", e.DOCUMENT_CENTERING = "document_centering", e.DOCUMENT_NOT_PRESENT = "document_not_present", e.DOCUMENT_TOO_FAR = "document_too_far", e.SHARPNESS_TOO_LOW = "sharpness_too_low", e.BRIGHTNESS_TOO_LOW = "brightness_too_low", e.BRIGHTNESS_TOO_HIGH = "brightness_too_high", e.HOTSPOTS_PRESENT = "hotspots_present";
28
- const c = e, o = {};
29
- o.isPresent = c.DOCUMENT_NOT_PRESENT, o.isNotSmall = c.DOCUMENT_TOO_FAR, o.isNotOutOfBounds = c.DOCUMENT_CENTERING, o.isSharp = c.SHARPNESS_TOO_LOW, o.isNotDim = c.BRIGHTNESS_TOO_LOW, o.isNotBright = c.BRIGHTNESS_TOO_HIGH, o.noHotspots = c.HOTSPOTS_PRESENT;
30
- const D = o;
22
+ const i = E, O = { ...i };
23
+ O.DONE = "done";
24
+ const p = O, a = {};
25
+ a.EYE_NOT_PRESENT = "eye_not_present";
26
+ const A = a, o = {};
27
+ o.CANDIDATE_SELECTION = "candidate_selection", o.DOCUMENT_CENTERING = "document_centering", o.DOCUMENT_NOT_PRESENT = "document_not_present", o.DOCUMENT_TOO_FAR = "document_too_far", o.SHARPNESS_TOO_LOW = "sharpness_too_low", o.BRIGHTNESS_TOO_LOW = "brightness_too_low", o.BRIGHTNESS_TOO_HIGH = "brightness_too_high", o.HOTSPOTS_PRESENT = "hotspots_present";
28
+ const c = o, e = {};
29
+ e.isPresent = c.DOCUMENT_NOT_PRESENT, e.isNotSmall = c.DOCUMENT_TOO_FAR, e.isNotOutOfBounds = c.DOCUMENT_CENTERING, e.isSharp = c.SHARPNESS_TOO_LOW, e.isNotDim = c.BRIGHTNESS_TOO_LOW, e.isNotBright = c.BRIGHTNESS_TOO_HIGH, e.noHotspots = c.HOTSPOTS_PRESENT;
30
+ const D = e;
31
31
  var C = ((t) => (t.CAMERA_PROPS_CHANGED = "document-auto-capture:camera-props-changed", t.CONTROL = "document-auto-capture:control", t.DETECTION_CHANGED = "document-auto-capture:detection-changed", 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))(C || {});
32
32
  export {
33
33
  i as AppStateValues,
34
34
  N as ComponentCustomEvent,
35
- S as ControlEventInstruction,
35
+ R as ControlEventInstruction,
36
36
  D as DocumentCheckToInstructionCodeMap,
37
37
  C as DocumentCustomEvent,
38
38
  c as DocumentInstructionCodeValues,
39
39
  A as EyeInstructionCodeValues,
40
40
  p as LivenessStateValues,
41
- R as RequestCaptureInstruction,
41
+ I as RequestCaptureInstruction,
42
42
  m as dispatchCaptureEvent,
43
- I as dispatchControlEvent
43
+ d as dispatchControlEvent
44
44
  };
package/events.umd.js CHANGED
@@ -1 +1 @@
1
- (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 m=a,_={};_.REQUEST_CAPTURE="dot-custom-event:request-capture";const T=_,d=(e,i)=>{const u={};u.detail=i,document.dispatchEvent(new CustomEvent(e,u))},I=(e,i)=>{const u={};u.instruction=i,d(e,u)};function R(e){const i={};i.instruction=e;const u=i;d(T.REQUEST_CAPTURE,u)}const E={};E.LOADING="loading",E.ERROR="error",E.WAITING="waiting",E.RUNNING="running",E.COMPLETE="complete";const r=E,O={...r};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 A=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=r,t.ComponentCustomEvent=T,t.ControlEventInstruction=S,t.DocumentCheckToInstructionCodeMap=A,t.DocumentCustomEvent=N,t.DocumentInstructionCodeValues=c,t.EyeInstructionCodeValues=l,t.LivenessStateValues=p,t.RequestCaptureInstruction=m,t.dispatchCaptureEvent=R,t.dispatchControlEvent=I,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (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 m=a,_={};_.REQUEST_CAPTURE="dot-custom-event:request-capture";const T=_,r=(e,i)=>{const u={};u.detail=i,document.dispatchEvent(new CustomEvent(e,u))},I=(e,i)=>{const u={};u.instruction=i,r(e,u)};function R(e){const i={};i.instruction=e;const u=i;r(T.REQUEST_CAPTURE,u)}const E={};E.LOADING="loading",E.ERROR="error",E.WAITING="waiting",E.RUNNING="running",E.COMPLETE="complete";const O=E,C={...O};C.DONE="done";const p=C,N={};N.EYE_NOT_PRESENT="eye_not_present";const l=N,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 f=s;var d=(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))(d||{});t.AppStateValues=O,t.ComponentCustomEvent=T,t.ControlEventInstruction=S,t.DocumentCheckToInstructionCodeMap=f,t.DocumentCustomEvent=d,t.DocumentInstructionCodeValues=c,t.EyeInstructionCodeValues=l,t.LivenessStateValues=p,t.RequestCaptureInstruction=m,t.dispatchCaptureEvent=R,t.dispatchControlEvent=I,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});