bry-biometric-collector 3.1.0 → 3.2.0-RC01
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/README.md +17 -0
- package/dist/DocumentCollector_d1c59f5a_3.2.0-RC01.js +1228 -0
- package/dist/FaceCollector_68279b2b_3.2.0-RC01.js +2350 -0
- package/dist/{ValidationAlert_15dcf5cc_3.1.0.js → ValidationAlert_524c32bf_3.2.0-RC01.js} +40 -40
- package/dist/{___vite-browser-external_commonjs-proxy_e49f2f2d_3.1.0.js → ___vite-browser-external_commonjs-proxy_34cd71cb_3.2.0-RC01.js} +1 -1
- package/dist/bry-biometric-collector-main.js +2 -2
- package/dist/{en-us_793b081f_3.1.0.js → en-us_e83efd5d_3.2.0-RC01.js} +1 -1
- package/dist/{es-cl_b2f1fc4e_3.1.0.js → es-cl_5939150a_3.2.0-RC01.js} +1 -1
- package/dist/{fingersApi_2c740dd1_3.1.0.js → fingersApi_8a169eff_3.2.0-RC01.js} +2 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +2 -2
- package/dist/{index_248edde3_3.1.0.js → index_992033ae_3.2.0-RC01.js} +3 -3
- package/dist/{index_554a0a33_3.1.0.js → index_a6e5c99a_3.2.0-RC01.js} +3 -3
- package/dist/{main_297fa10f_3.1.0.js → main_e8bc3f80_3.2.0-RC01.js} +4938 -4835
- package/dist/{pt-br_b093cbbf_3.1.0.js → pt-br_fae15356_3.2.0-RC01.js} +7 -7
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/DocumentCollector_2a473026_3.1.0.js +0 -1174
- package/dist/FaceCollector_81109b31_3.1.0.js +0 -2189
- /package/dist/{face_api_0e3ce8c8_3.1.0.js → face_api_0e3ce8c8_3.2.0-RC01.js} +0 -0
- /package/dist/{index-idlf-detector_39cfdffa_3.1.0.js → index-idlf-detector_39cfdffa_3.2.0-RC01.js} +0 -0
- /package/dist/{index-idlf-detector_a819b3c8_3.1.0.js → index-idlf-detector_a819b3c8_3.2.0-RC01.js} +0 -0
@@ -0,0 +1,2350 @@
|
|
1
|
+
import { w as jt, S as ut, q as ft, r as dt, t as ht, x as R, y as V, z as p, B as X, C as d, D as H, E as Ke, G as Q, H as ze, I as D, J as I, K as We, L as je, M as re, N as g, O as ue, P as fe, Q as de, R as K, T as M, U as N, V as ji, $ as Ki, W as zi, X as q, Y as Ts, Z as Ve, _ as P, a0 as He, a1 as zt, a2 as b, a3 as B, a4 as Ft, a5 as xe, a6 as Os, a7 as $e, a8 as _e, a9 as Rs, aa as Oe, ab as gi, ac as St, ad as bi, ae as Is, af as Be, ag as pe, ah as Ds, ai as As, aj as Nt, ak as Pt, al as ce, am as $, an as we, ao as vi, ap as et, aq as Wt, ar as Ls, as as tt, at as pi, au as wi, av as Fs, aw as Ss, ax as Ns, ay as Ps, az as Ws, aA as Bs, aB as Bt, aC as z, j as rt, aD as Mt, aE as Ms, aF as Ci, aG as Us, aH as it, aI as st, aJ as Ei, aK as Vs, aL as ot, A as Ut, aM as Ce, aN as js, aO as Me, aP as Ks, aQ as yi, d as Re, aR as Vt, aS as nt, aT as zs, aU as Hs, aV as qs, aW as Js, aX as Qs, aY as Xs, aZ as Gs, a_ as Ue, a$ as Ys, b0 as Zs, b1 as at, b2 as oe, b3 as mt, b4 as xs, b5 as $s, b6 as eo, b7 as to, b8 as lt, b9 as se, ba as io, bb as so, bc as ki, bd as Hi, be as ct, bf as oo } from "./main_e8bc3f80_3.2.0-RC01.js";
|
2
|
+
import { W as no, C as ao, V as lo, a as ro } from "./ValidationAlert_524c32bf_3.2.0-RC01.js";
|
3
|
+
import { detectSingleFace as co, matchDimensions as uo, resizeResults as fo } from "./face_api_0e3ce8c8_3.2.0-RC01.js";
|
4
|
+
const Kt = jt(!1);
|
5
|
+
class ho {
|
6
|
+
isDevToolsOpen = !1;
|
7
|
+
detectionCount = 0;
|
8
|
+
checkSizeTimeout = null;
|
9
|
+
detectionInterval = null;
|
10
|
+
detectDevToolsBySize() {
|
11
|
+
const e = window.outerWidth - window.innerWidth > 200, t = window.outerHeight - window.innerHeight > 200;
|
12
|
+
return e || t;
|
13
|
+
}
|
14
|
+
checkForDevTools = () => {
|
15
|
+
this.detectDevToolsBySize() ? (this.detectionCount++, this.detectionCount >= 2 && !this.isDevToolsOpen && (this.isDevToolsOpen = !0, Kt.set(this.isDevToolsOpen))) : (this.detectionCount = 0, this.isDevToolsOpen && (this.isDevToolsOpen = !1, Kt.set(this.isDevToolsOpen)));
|
16
|
+
};
|
17
|
+
startDetection() {
|
18
|
+
this.stopDetection(), window.addEventListener("resize", () => {
|
19
|
+
this.checkSizeTimeout && clearTimeout(this.checkSizeTimeout), this.checkSizeTimeout = window.setTimeout(this.checkForDevTools, 500);
|
20
|
+
}), window.addEventListener("focus", () => setTimeout(this.checkForDevTools, 300)), this.detectionInterval = window.setInterval(this.checkForDevTools, 1e3), this.checkForDevTools();
|
21
|
+
}
|
22
|
+
stopDetection() {
|
23
|
+
this.detectionInterval && (clearInterval(this.detectionInterval), this.detectionInterval = null), this.checkSizeTimeout && (clearTimeout(this.checkSizeTimeout), this.checkSizeTimeout = null);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
function Ti(i) {
|
27
|
+
let e, t;
|
28
|
+
return e = new no({}), {
|
29
|
+
c() {
|
30
|
+
ue(e.$$.fragment);
|
31
|
+
},
|
32
|
+
m(o, n) {
|
33
|
+
fe(e, o, n), t = !0;
|
34
|
+
},
|
35
|
+
i(o) {
|
36
|
+
t || (H(e.$$.fragment, o), t = !0);
|
37
|
+
},
|
38
|
+
o(o) {
|
39
|
+
Q(e.$$.fragment, o), t = !1;
|
40
|
+
},
|
41
|
+
d(o) {
|
42
|
+
de(e, o);
|
43
|
+
}
|
44
|
+
};
|
45
|
+
}
|
46
|
+
function mo(i) {
|
47
|
+
let e, t, o, n = (
|
48
|
+
/*showWatermark*/
|
49
|
+
i[1] && Ti()
|
50
|
+
);
|
51
|
+
return {
|
52
|
+
c() {
|
53
|
+
e = p("div"), n && n.c(), this.c = X, d(e, "id", "face-oval"), d(e, "class", t = "loader " + /*loading*/
|
54
|
+
(i[0] ? "loading" : "") + " z-10"), d(
|
55
|
+
e,
|
56
|
+
"style",
|
57
|
+
/*styleVars*/
|
58
|
+
i[2]
|
59
|
+
);
|
60
|
+
},
|
61
|
+
m(r, l) {
|
62
|
+
R(r, e, l), n && n.m(e, null), o = !0;
|
63
|
+
},
|
64
|
+
p(r, [l]) {
|
65
|
+
/*showWatermark*/
|
66
|
+
r[1] ? n ? l & /*showWatermark*/
|
67
|
+
2 && H(n, 1) : (n = Ti(), n.c(), H(n, 1), n.m(e, null)) : n && (Ke(), Q(n, 1, 1, () => {
|
68
|
+
n = null;
|
69
|
+
}), ze()), (!o || l & /*loading*/
|
70
|
+
1 && t !== (t = "loader " + /*loading*/
|
71
|
+
(r[0] ? "loading" : "") + " z-10")) && d(e, "class", t), (!o || l & /*styleVars*/
|
72
|
+
4) && d(
|
73
|
+
e,
|
74
|
+
"style",
|
75
|
+
/*styleVars*/
|
76
|
+
r[2]
|
77
|
+
);
|
78
|
+
},
|
79
|
+
i(r) {
|
80
|
+
o || (H(n), o = !0);
|
81
|
+
},
|
82
|
+
o(r) {
|
83
|
+
Q(n), o = !1;
|
84
|
+
},
|
85
|
+
d(r) {
|
86
|
+
r && D(e), n && n.d();
|
87
|
+
}
|
88
|
+
};
|
89
|
+
}
|
90
|
+
const _o = "hsl(var(--p))", go = "hsl(var(--su))";
|
91
|
+
function bo(i, e, t) {
|
92
|
+
let o, n, r;
|
93
|
+
I(i, We, (_) => t(8, n = _)), I(i, je, (_) => t(9, r = _));
|
94
|
+
let { loading: l } = e, { showWatermark: a } = e, u, f, c = 0.8, h = 8, m = 0.15;
|
95
|
+
return re() && (c = 0.65, h = 10, m = 0.25), i.$$set = (_) => {
|
96
|
+
"loading" in _ && t(0, l = _.loading), "showWatermark" in _ && t(1, a = _.showWatermark);
|
97
|
+
}, i.$$.update = () => {
|
98
|
+
if (i.$$.dirty & /*$videoStore, percentage, ovalHeight, ovalWidth, $ovalDimensions, captureBarPercentage*/
|
99
|
+
952 && r) {
|
100
|
+
t(4, f = r.videoHeight * c), t(3, u = f / 1.45), g(We, n.width = u, n), g(We, n.height = f, n), g(We, n.x = (r.videoWidth - n.width) / 2, n);
|
101
|
+
let _ = r.videoHeight - r.videoHeight * m;
|
102
|
+
g(We, n.y = _ - n.height, n);
|
103
|
+
}
|
104
|
+
i.$$.dirty & /*ovalWidth, ovalHeight, borderWidth*/
|
105
|
+
88 && t(2, o = `
|
106
|
+
--oval-width: ${u}px;
|
107
|
+
--oval-height: ${f}px;
|
108
|
+
--border-color: ${_o};
|
109
|
+
--border-color-animation: ${go};
|
110
|
+
--oval-border: ${h}px;
|
111
|
+
`);
|
112
|
+
}, [
|
113
|
+
l,
|
114
|
+
a,
|
115
|
+
o,
|
116
|
+
u,
|
117
|
+
f,
|
118
|
+
c,
|
119
|
+
h,
|
120
|
+
m,
|
121
|
+
n,
|
122
|
+
r
|
123
|
+
];
|
124
|
+
}
|
125
|
+
class qi extends ut {
|
126
|
+
constructor(e) {
|
127
|
+
super(), ft(
|
128
|
+
this,
|
129
|
+
{
|
130
|
+
target: this.shadowRoot,
|
131
|
+
props: ht(this.attributes),
|
132
|
+
customElement: !0
|
133
|
+
},
|
134
|
+
bo,
|
135
|
+
mo,
|
136
|
+
dt,
|
137
|
+
{ loading: 0, showWatermark: 1 },
|
138
|
+
null
|
139
|
+
), e && (e.target && R(e.target, this, e.anchor), e.props && (this.$set(e.props), V()));
|
140
|
+
}
|
141
|
+
static get observedAttributes() {
|
142
|
+
return ["loading", "showWatermark"];
|
143
|
+
}
|
144
|
+
get loading() {
|
145
|
+
return this.$$.ctx[0];
|
146
|
+
}
|
147
|
+
set loading(e) {
|
148
|
+
this.$$set({ loading: e }), V();
|
149
|
+
}
|
150
|
+
get showWatermark() {
|
151
|
+
return this.$$.ctx[1];
|
152
|
+
}
|
153
|
+
set showWatermark(e) {
|
154
|
+
this.$$set({ showWatermark: e }), V();
|
155
|
+
}
|
156
|
+
}
|
157
|
+
customElements.define("face-oval", qi);
|
158
|
+
function vo(i) {
|
159
|
+
let e;
|
160
|
+
return {
|
161
|
+
c() {
|
162
|
+
e = p("div"), this.c = X, d(e, "class", "video-overlay z-0"), d(
|
163
|
+
e,
|
164
|
+
"style",
|
165
|
+
/*styleVars*/
|
166
|
+
i[0]
|
167
|
+
);
|
168
|
+
},
|
169
|
+
m(t, o) {
|
170
|
+
R(t, e, o);
|
171
|
+
},
|
172
|
+
p(t, [o]) {
|
173
|
+
o & /*styleVars*/
|
174
|
+
1 && d(
|
175
|
+
e,
|
176
|
+
"style",
|
177
|
+
/*styleVars*/
|
178
|
+
t[0]
|
179
|
+
);
|
180
|
+
},
|
181
|
+
i: X,
|
182
|
+
o: X,
|
183
|
+
d(t) {
|
184
|
+
t && D(e);
|
185
|
+
}
|
186
|
+
};
|
187
|
+
}
|
188
|
+
function po(i, e, t) {
|
189
|
+
let o, n;
|
190
|
+
I(i, je, (c) => t(6, n = c));
|
191
|
+
let r, l, a = 0.8, { overlayColor: u } = e, { overlayTransparency: f } = e;
|
192
|
+
return re() && (a = 0.65), i.$$set = (c) => {
|
193
|
+
"overlayColor" in c && t(1, u = c.overlayColor), "overlayTransparency" in c && t(2, f = c.overlayTransparency);
|
194
|
+
}, i.$$.update = () => {
|
195
|
+
i.$$.dirty & /*$videoStore, percentage, ovalHeight*/
|
196
|
+
112 && n && (t(4, l = n.videoHeight * a), t(3, r = l / 1.45)), i.$$.dirty & /*ovalWidth, ovalHeight, overlayColor, overlayTransparency*/
|
197
|
+
30 && t(0, o = `
|
198
|
+
--oval-width: ${r}px;
|
199
|
+
--oval-height: ${l}px;
|
200
|
+
--overlay-color: ${u};
|
201
|
+
--overlay-transparency: ${f};
|
202
|
+
`);
|
203
|
+
}, [
|
204
|
+
o,
|
205
|
+
u,
|
206
|
+
f,
|
207
|
+
r,
|
208
|
+
l,
|
209
|
+
a,
|
210
|
+
n
|
211
|
+
];
|
212
|
+
}
|
213
|
+
class Ji extends ut {
|
214
|
+
constructor(e) {
|
215
|
+
super(), ft(
|
216
|
+
this,
|
217
|
+
{
|
218
|
+
target: this.shadowRoot,
|
219
|
+
props: ht(this.attributes),
|
220
|
+
customElement: !0
|
221
|
+
},
|
222
|
+
po,
|
223
|
+
vo,
|
224
|
+
dt,
|
225
|
+
{ overlayColor: 1, overlayTransparency: 2 },
|
226
|
+
null
|
227
|
+
), e && (e.target && R(e.target, this, e.anchor), e.props && (this.$set(e.props), V()));
|
228
|
+
}
|
229
|
+
static get observedAttributes() {
|
230
|
+
return ["overlayColor", "overlayTransparency"];
|
231
|
+
}
|
232
|
+
get overlayColor() {
|
233
|
+
return this.$$.ctx[1];
|
234
|
+
}
|
235
|
+
set overlayColor(e) {
|
236
|
+
this.$$set({ overlayColor: e }), V();
|
237
|
+
}
|
238
|
+
get overlayTransparency() {
|
239
|
+
return this.$$.ctx[2];
|
240
|
+
}
|
241
|
+
set overlayTransparency(e) {
|
242
|
+
this.$$set({ overlayTransparency: e }), V();
|
243
|
+
}
|
244
|
+
}
|
245
|
+
customElements.define("overlay-oval", Ji);
|
246
|
+
function Oi(i) {
|
247
|
+
let e, t, o, n, r, l, a = (
|
248
|
+
/*$_*/
|
249
|
+
i[2]("faceCollector.obtainingPicture") + ""
|
250
|
+
), u;
|
251
|
+
return {
|
252
|
+
c() {
|
253
|
+
e = p("slot"), t = p("div"), o = p("img"), r = N(), l = p("span"), u = P(a), He(o.src, n = zt) || d(o, "src", n), d(o, "alt", "loading gif"), d(o, "class", "m-auto h-[10em] lg:h-[12em]"), d(l, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center"), d(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), d(e, "name", "loading-camera-gif"), d(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
254
|
+
},
|
255
|
+
m(f, c) {
|
256
|
+
R(f, e, c), b(e, t), b(t, o), b(t, r), b(t, l), b(l, u);
|
257
|
+
},
|
258
|
+
p(f, c) {
|
259
|
+
c & /*$_*/
|
260
|
+
4 && a !== (a = /*$_*/
|
261
|
+
f[2]("faceCollector.obtainingPicture") + "") && B(u, a);
|
262
|
+
},
|
263
|
+
d(f) {
|
264
|
+
f && D(e);
|
265
|
+
}
|
266
|
+
};
|
267
|
+
}
|
268
|
+
function Ri(i) {
|
269
|
+
let e, t, o, n, r, l;
|
270
|
+
function a(c, h) {
|
271
|
+
return (
|
272
|
+
/*$isLoading*/
|
273
|
+
c[5] ? Co : wo
|
274
|
+
);
|
275
|
+
}
|
276
|
+
let u = a(i), f = u(i);
|
277
|
+
return {
|
278
|
+
c() {
|
279
|
+
e = p("div"), t = p("slot"), o = p("div"), n = p("img"), l = N(), f.c(), He(n.src, r = zt) || d(n, "src", r), d(n, "alt", "loading gif"), d(n, "class", "m-auto h-[10em] lg:h-[12em]"), d(o, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), d(t, "name", "loading-camera-gif"), d(t, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]"), d(e, "class", "bg-white absolute inset-0 z-10 flex items-center justify-center");
|
280
|
+
},
|
281
|
+
m(c, h) {
|
282
|
+
R(c, e, h), b(e, t), b(t, o), b(o, n), b(o, l), f.m(o, null);
|
283
|
+
},
|
284
|
+
p(c, h) {
|
285
|
+
u === (u = a(c)) && f ? f.p(c, h) : (f.d(1), f = u(c), f && (f.c(), f.m(o, null)));
|
286
|
+
},
|
287
|
+
d(c) {
|
288
|
+
c && D(e), f.d();
|
289
|
+
}
|
290
|
+
};
|
291
|
+
}
|
292
|
+
function wo(i) {
|
293
|
+
let e, t = (
|
294
|
+
/*$_*/
|
295
|
+
i[2]("faceCollector.obtainingPicture") + ""
|
296
|
+
), o;
|
297
|
+
return {
|
298
|
+
c() {
|
299
|
+
e = p("span"), o = P(t), d(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
300
|
+
},
|
301
|
+
m(n, r) {
|
302
|
+
R(n, e, r), b(e, o);
|
303
|
+
},
|
304
|
+
p(n, r) {
|
305
|
+
r & /*$_*/
|
306
|
+
4 && t !== (t = /*$_*/
|
307
|
+
n[2]("faceCollector.obtainingPicture") + "") && B(o, t);
|
308
|
+
},
|
309
|
+
d(n) {
|
310
|
+
n && D(e);
|
311
|
+
}
|
312
|
+
};
|
313
|
+
}
|
314
|
+
function Co(i) {
|
315
|
+
let e;
|
316
|
+
return {
|
317
|
+
c() {
|
318
|
+
e = p("span"), e.textContent = "Obtaining photo...", d(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
319
|
+
},
|
320
|
+
m(t, o) {
|
321
|
+
R(t, e, o);
|
322
|
+
},
|
323
|
+
p: X,
|
324
|
+
d(t) {
|
325
|
+
t && D(e);
|
326
|
+
}
|
327
|
+
};
|
328
|
+
}
|
329
|
+
function Ii(i) {
|
330
|
+
let e, t, o, n, r;
|
331
|
+
function l(f, c) {
|
332
|
+
return (
|
333
|
+
/*$isLoading*/
|
334
|
+
f[5] ? yo : Eo
|
335
|
+
);
|
336
|
+
}
|
337
|
+
let a = l(i), u = a(i);
|
338
|
+
return {
|
339
|
+
c() {
|
340
|
+
e = p("slot"), t = p("div"), o = p("img"), r = N(), u.c(), He(o.src, n = zt) || d(o, "src", n), d(o, "alt", "loading gif"), d(o, "class", "m-auto h-[10em] lg:h-[12em]"), d(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), d(e, "name", "loading-camera-gif"), d(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
341
|
+
},
|
342
|
+
m(f, c) {
|
343
|
+
R(f, e, c), b(e, t), b(t, o), b(t, r), u.m(t, null);
|
344
|
+
},
|
345
|
+
p(f, c) {
|
346
|
+
a === (a = l(f)) && u ? u.p(f, c) : (u.d(1), u = a(f), u && (u.c(), u.m(t, null)));
|
347
|
+
},
|
348
|
+
d(f) {
|
349
|
+
f && D(e), u.d();
|
350
|
+
}
|
351
|
+
};
|
352
|
+
}
|
353
|
+
function Eo(i) {
|
354
|
+
let e, t = (
|
355
|
+
/*$_*/
|
356
|
+
i[2]("faceCollector.initiatingCamera") + ""
|
357
|
+
), o;
|
358
|
+
return {
|
359
|
+
c() {
|
360
|
+
e = p("span"), o = P(t), d(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
361
|
+
},
|
362
|
+
m(n, r) {
|
363
|
+
R(n, e, r), b(e, o);
|
364
|
+
},
|
365
|
+
p(n, r) {
|
366
|
+
r & /*$_*/
|
367
|
+
4 && t !== (t = /*$_*/
|
368
|
+
n[2]("faceCollector.initiatingCamera") + "") && B(o, t);
|
369
|
+
},
|
370
|
+
d(n) {
|
371
|
+
n && D(e);
|
372
|
+
}
|
373
|
+
};
|
374
|
+
}
|
375
|
+
function yo(i) {
|
376
|
+
let e;
|
377
|
+
return {
|
378
|
+
c() {
|
379
|
+
e = p("span"), e.textContent = "Loading camera...", d(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
380
|
+
},
|
381
|
+
m(t, o) {
|
382
|
+
R(t, e, o);
|
383
|
+
},
|
384
|
+
p: X,
|
385
|
+
d(t) {
|
386
|
+
t && D(e);
|
387
|
+
}
|
388
|
+
};
|
389
|
+
}
|
390
|
+
function ko(i) {
|
391
|
+
let e = K() && /*waitingIdrndCaptureEvent*/
|
392
|
+
i[0], t, o, n = (K() && /*idrndLoading*/
|
393
|
+
(i[1] || !/*$ready*/
|
394
|
+
i[6]) || !K() && !/*$ready*/
|
395
|
+
i[6]) && /*$cameraStatusStore*/
|
396
|
+
i[4] === M.OK, r, l = e && Oi(i), a = (
|
397
|
+
/*$detectingFace*/
|
398
|
+
i[3] && /*$cameraStatusStore*/
|
399
|
+
i[4] === M.OK && Ri(i)
|
400
|
+
), u = n && Ii(i);
|
401
|
+
return {
|
402
|
+
c() {
|
403
|
+
l && l.c(), t = N(), a && a.c(), o = N(), u && u.c(), r = ji(), this.c = X;
|
404
|
+
},
|
405
|
+
m(f, c) {
|
406
|
+
l && l.m(f, c), R(f, t, c), a && a.m(f, c), R(f, o, c), u && u.m(f, c), R(f, r, c);
|
407
|
+
},
|
408
|
+
p(f, [c]) {
|
409
|
+
c & /*waitingIdrndCaptureEvent*/
|
410
|
+
1 && (e = K() && /*waitingIdrndCaptureEvent*/
|
411
|
+
f[0]), e ? l ? l.p(f, c) : (l = Oi(f), l.c(), l.m(t.parentNode, t)) : l && (l.d(1), l = null), /*$detectingFace*/
|
412
|
+
f[3] && /*$cameraStatusStore*/
|
413
|
+
f[4] === M.OK ? a ? a.p(f, c) : (a = Ri(f), a.c(), a.m(o.parentNode, o)) : a && (a.d(1), a = null), c & /*idrndLoading, $ready, $cameraStatusStore*/
|
414
|
+
82 && (n = (K() && /*idrndLoading*/
|
415
|
+
(f[1] || !/*$ready*/
|
416
|
+
f[6]) || !K() && !/*$ready*/
|
417
|
+
f[6]) && /*$cameraStatusStore*/
|
418
|
+
f[4] === M.OK), n ? u ? u.p(f, c) : (u = Ii(f), u.c(), u.m(r.parentNode, r)) : u && (u.d(1), u = null);
|
419
|
+
},
|
420
|
+
i: X,
|
421
|
+
o: X,
|
422
|
+
d(f) {
|
423
|
+
l && l.d(f), f && D(t), a && a.d(f), f && D(o), u && u.d(f), f && D(r);
|
424
|
+
}
|
425
|
+
};
|
426
|
+
}
|
427
|
+
function To(i, e, t) {
|
428
|
+
let o, n, r, l, a;
|
429
|
+
I(i, Ki, (c) => t(2, o = c)), I(i, zi, (c) => t(3, n = c)), I(i, q, (c) => t(4, r = c)), I(i, Ts, (c) => t(5, l = c)), I(i, Ve, (c) => t(6, a = c));
|
430
|
+
let { waitingIdrndCaptureEvent: u } = e, { idrndLoading: f } = e;
|
431
|
+
return i.$$set = (c) => {
|
432
|
+
"waitingIdrndCaptureEvent" in c && t(0, u = c.waitingIdrndCaptureEvent), "idrndLoading" in c && t(1, f = c.idrndLoading);
|
433
|
+
}, [
|
434
|
+
u,
|
435
|
+
f,
|
436
|
+
o,
|
437
|
+
n,
|
438
|
+
r,
|
439
|
+
l,
|
440
|
+
a
|
441
|
+
];
|
442
|
+
}
|
443
|
+
class Qi extends ut {
|
444
|
+
constructor(e) {
|
445
|
+
super(), ft(
|
446
|
+
this,
|
447
|
+
{
|
448
|
+
target: this.shadowRoot,
|
449
|
+
props: ht(this.attributes),
|
450
|
+
customElement: !0
|
451
|
+
},
|
452
|
+
To,
|
453
|
+
ko,
|
454
|
+
dt,
|
455
|
+
{
|
456
|
+
waitingIdrndCaptureEvent: 0,
|
457
|
+
idrndLoading: 1
|
458
|
+
},
|
459
|
+
null
|
460
|
+
), e && (e.target && R(e.target, this, e.anchor), e.props && (this.$set(e.props), V()));
|
461
|
+
}
|
462
|
+
static get observedAttributes() {
|
463
|
+
return ["waitingIdrndCaptureEvent", "idrndLoading"];
|
464
|
+
}
|
465
|
+
get waitingIdrndCaptureEvent() {
|
466
|
+
return this.$$.ctx[0];
|
467
|
+
}
|
468
|
+
set waitingIdrndCaptureEvent(e) {
|
469
|
+
this.$$set({ waitingIdrndCaptureEvent: e }), V();
|
470
|
+
}
|
471
|
+
get idrndLoading() {
|
472
|
+
return this.$$.ctx[1];
|
473
|
+
}
|
474
|
+
set idrndLoading(e) {
|
475
|
+
this.$$set({ idrndLoading: e }), V();
|
476
|
+
}
|
477
|
+
}
|
478
|
+
customElements.define("loading-component", Qi);
|
479
|
+
function Di(i, e, t) {
|
480
|
+
const o = i.slice();
|
481
|
+
return o[120] = e[t], o;
|
482
|
+
}
|
483
|
+
function Ai(i, e, t) {
|
484
|
+
const o = i.slice();
|
485
|
+
return o[120] = e[t], o;
|
486
|
+
}
|
487
|
+
function Li(i) {
|
488
|
+
let e, t, o = K(), n, r, l, a, u, f, c, h, m, _, y, w, v, E, k, F, Ee, ne = o && Oo(i), j = (
|
489
|
+
/*$ready*/
|
490
|
+
i[22] && !/*$detectingFace*/
|
491
|
+
i[25] && Fi(i)
|
492
|
+
);
|
493
|
+
return _ = new Zs({}), w = new ao({
|
494
|
+
props: {
|
495
|
+
showConfigButton: (
|
496
|
+
/*showConfigButton*/
|
497
|
+
i[4]
|
498
|
+
),
|
499
|
+
showAutoCaptureButton: (
|
500
|
+
/*showAutoCaptureButton*/
|
501
|
+
i[5]
|
502
|
+
),
|
503
|
+
showCaptureButton: (
|
504
|
+
/*showCaptureButton*/
|
505
|
+
i[0]
|
506
|
+
),
|
507
|
+
showCameraButton: (
|
508
|
+
/*showCameraButton*/
|
509
|
+
i[6]
|
510
|
+
),
|
511
|
+
enableCaptureButton: (
|
512
|
+
/*enableCaptureButton*/
|
513
|
+
i[16]
|
514
|
+
),
|
515
|
+
videoOverlay: (
|
516
|
+
/*videoOverlay*/
|
517
|
+
i[9]
|
518
|
+
),
|
519
|
+
videoOverlayTransparency: (
|
520
|
+
/*videoOverlayTransparency*/
|
521
|
+
i[10]
|
522
|
+
),
|
523
|
+
idrndClosed: (
|
524
|
+
/*idrndClosed*/
|
525
|
+
i[18]
|
526
|
+
),
|
527
|
+
idrndLoading: (
|
528
|
+
/*idrndLoading*/
|
529
|
+
i[17]
|
530
|
+
),
|
531
|
+
waitingIdrndCaptureEvent: (
|
532
|
+
/*waitingIdrndCaptureEvent*/
|
533
|
+
i[19]
|
534
|
+
),
|
535
|
+
handler: (
|
536
|
+
/*capture*/
|
537
|
+
i[38]
|
538
|
+
)
|
539
|
+
}
|
540
|
+
}), {
|
541
|
+
c() {
|
542
|
+
e = p("div"), t = p("div"), ne && ne.c(), n = N(), r = p("video"), a = N(), u = p("canvas"), f = N(), c = p("div"), h = p("div"), j && j.c(), m = N(), ue(_.$$.fragment), y = N(), ue(w.$$.fragment), d(r, "id", "bry-cc-camera-video-tag"), d(r, "class", l = /*$ready*/
|
543
|
+
i[22] ? re() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0"), r.playsInline = !0, r.muted = !0, r.autoplay = !0, d(u, "id", "bry-ce-detectionsCanvas"), d(u, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), d(t, "class", "overflow-hidden"), at(
|
544
|
+
t,
|
545
|
+
"width",
|
546
|
+
/*$videoStore*/
|
547
|
+
i[33].videoWidth + "px"
|
548
|
+
), at(
|
549
|
+
t,
|
550
|
+
"height",
|
551
|
+
/*$videoStore*/
|
552
|
+
i[33].videoHeight + "px"
|
553
|
+
), d(h, "class", "flex flex-grow w-full items-center justify-center relative"), d(c, "class", "absolute inset-0 flex flex-col items-center justify-between w-full h-full"), d(e, "class", v = /*$ready*/
|
554
|
+
i[22] ? "relative" : "relative w-0 h-0"), e.hidden = E = /*$cameraStatusStore*/
|
555
|
+
i[21] !== M.OK || K() && /*idrndLoading*/
|
556
|
+
(i[17] || /*idrndClosed*/
|
557
|
+
i[18] || /*waitingIdrndCaptureEvent*/
|
558
|
+
i[19]);
|
559
|
+
},
|
560
|
+
m(L, A) {
|
561
|
+
R(L, e, A), b(e, t), ne && ne.m(t, null), b(t, n), b(t, r), i[49](r), b(t, a), b(t, u), i[51](u), b(e, f), b(e, c), b(c, h), j && j.m(h, null), b(c, m), fe(_, c, null), b(c, y), fe(w, c, null), k = !0, F || (Ee = [
|
562
|
+
oe(
|
563
|
+
r,
|
564
|
+
"canplay",
|
565
|
+
/*canplay_handler*/
|
566
|
+
i[50]
|
567
|
+
),
|
568
|
+
oe(
|
569
|
+
r,
|
570
|
+
"play",
|
571
|
+
/*play*/
|
572
|
+
i[11],
|
573
|
+
{ once: !0 }
|
574
|
+
)
|
575
|
+
], F = !0);
|
576
|
+
},
|
577
|
+
p(L, A) {
|
578
|
+
o && ne.p(L, A), (!k || A[0] & /*$ready*/
|
579
|
+
4194304 && l !== (l = /*$ready*/
|
580
|
+
L[22] ? re() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0")) && d(r, "class", l), (!k || A[1] & /*$videoStore*/
|
581
|
+
4) && at(
|
582
|
+
t,
|
583
|
+
"width",
|
584
|
+
/*$videoStore*/
|
585
|
+
L[33].videoWidth + "px"
|
586
|
+
), (!k || A[1] & /*$videoStore*/
|
587
|
+
4) && at(
|
588
|
+
t,
|
589
|
+
"height",
|
590
|
+
/*$videoStore*/
|
591
|
+
L[33].videoHeight + "px"
|
592
|
+
), /*$ready*/
|
593
|
+
L[22] && !/*$detectingFace*/
|
594
|
+
L[25] ? j ? (j.p(L, A), A[0] & /*$ready, $detectingFace*/
|
595
|
+
37748736 && H(j, 1)) : (j = Fi(L), j.c(), H(j, 1), j.m(h, null)) : j && (Ke(), Q(j, 1, 1, () => {
|
596
|
+
j = null;
|
597
|
+
}), ze());
|
598
|
+
const O = {};
|
599
|
+
A[0] & /*showConfigButton*/
|
600
|
+
16 && (O.showConfigButton = /*showConfigButton*/
|
601
|
+
L[4]), A[0] & /*showAutoCaptureButton*/
|
602
|
+
32 && (O.showAutoCaptureButton = /*showAutoCaptureButton*/
|
603
|
+
L[5]), A[0] & /*showCaptureButton*/
|
604
|
+
1 && (O.showCaptureButton = /*showCaptureButton*/
|
605
|
+
L[0]), A[0] & /*showCameraButton*/
|
606
|
+
64 && (O.showCameraButton = /*showCameraButton*/
|
607
|
+
L[6]), A[0] & /*enableCaptureButton*/
|
608
|
+
65536 && (O.enableCaptureButton = /*enableCaptureButton*/
|
609
|
+
L[16]), A[0] & /*videoOverlay*/
|
610
|
+
512 && (O.videoOverlay = /*videoOverlay*/
|
611
|
+
L[9]), A[0] & /*videoOverlayTransparency*/
|
612
|
+
1024 && (O.videoOverlayTransparency = /*videoOverlayTransparency*/
|
613
|
+
L[10]), A[0] & /*idrndClosed*/
|
614
|
+
262144 && (O.idrndClosed = /*idrndClosed*/
|
615
|
+
L[18]), A[0] & /*idrndLoading*/
|
616
|
+
131072 && (O.idrndLoading = /*idrndLoading*/
|
617
|
+
L[17]), A[0] & /*waitingIdrndCaptureEvent*/
|
618
|
+
524288 && (O.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/
|
619
|
+
L[19]), w.$set(O), (!k || A[0] & /*$ready*/
|
620
|
+
4194304 && v !== (v = /*$ready*/
|
621
|
+
L[22] ? "relative" : "relative w-0 h-0")) && d(e, "class", v), (!k || A[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
622
|
+
3014656 && E !== (E = /*$cameraStatusStore*/
|
623
|
+
L[21] !== M.OK || K() && /*idrndLoading*/
|
624
|
+
(L[17] || /*idrndClosed*/
|
625
|
+
L[18] || /*waitingIdrndCaptureEvent*/
|
626
|
+
L[19]))) && (e.hidden = E);
|
627
|
+
},
|
628
|
+
i(L) {
|
629
|
+
k || (H(j), H(_.$$.fragment, L), H(w.$$.fragment, L), k = !0);
|
630
|
+
},
|
631
|
+
o(L) {
|
632
|
+
Q(j), Q(_.$$.fragment, L), Q(w.$$.fragment, L), k = !1;
|
633
|
+
},
|
634
|
+
d(L) {
|
635
|
+
L && D(e), ne && ne.d(), i[49](null), i[51](null), j && j.d(), de(_), de(w), F = !1, mt(Ee);
|
636
|
+
}
|
637
|
+
};
|
638
|
+
}
|
639
|
+
function Oo(i) {
|
640
|
+
let e;
|
641
|
+
return {
|
642
|
+
c() {
|
643
|
+
e = p("idlive-face-capture"), e.hidden = !0, se(e, "mask_hidden", ""), se(e, "auto_capture_disabled", ""), se(e, "auto_close_disabled", ""), se(
|
644
|
+
e,
|
645
|
+
"device_id",
|
646
|
+
/*$selectedVideoDeviceId*/
|
647
|
+
i[23]
|
648
|
+
), se(e, "face_not_centered_check_enabled", ""), se(e, "sunglasses_detected_check_enabled", ""), se(e, "mouth_open_check_enabled", ""), se(e, "face_blurry_check_enabled", ""), se(e, "dark_image_check_enabled", ""), se(e, "eyes_closed_check_enabled", "");
|
649
|
+
},
|
650
|
+
m(t, o) {
|
651
|
+
R(t, e, o), i[48](e);
|
652
|
+
},
|
653
|
+
p(t, o) {
|
654
|
+
o[0] & /*$selectedVideoDeviceId*/
|
655
|
+
8388608 && se(
|
656
|
+
e,
|
657
|
+
"device_id",
|
658
|
+
/*$selectedVideoDeviceId*/
|
659
|
+
t[23]
|
660
|
+
);
|
661
|
+
},
|
662
|
+
d(t) {
|
663
|
+
t && D(e), i[48](null);
|
664
|
+
}
|
665
|
+
};
|
666
|
+
}
|
667
|
+
function Fi(i) {
|
668
|
+
let e, t, o, n, r, l;
|
669
|
+
return e = new lo({
|
670
|
+
props: {
|
671
|
+
isCountingDown: (
|
672
|
+
/*isCountingDown*/
|
673
|
+
i[15]
|
674
|
+
)
|
675
|
+
}
|
676
|
+
}), o = new qi({
|
677
|
+
props: {
|
678
|
+
loading: (
|
679
|
+
/*isCountingDown*/
|
680
|
+
i[15]
|
681
|
+
),
|
682
|
+
showWatermark: (
|
683
|
+
/*showWatermark*/
|
684
|
+
i[8]
|
685
|
+
)
|
686
|
+
}
|
687
|
+
}), r = new Ji({
|
688
|
+
props: {
|
689
|
+
overlayColor: (
|
690
|
+
/*videoOverlay*/
|
691
|
+
i[9]
|
692
|
+
),
|
693
|
+
overlayTransparency: (
|
694
|
+
/*videoOverlayTransparency*/
|
695
|
+
i[10]
|
696
|
+
)
|
697
|
+
}
|
698
|
+
}), {
|
699
|
+
c() {
|
700
|
+
ue(e.$$.fragment), t = N(), ue(o.$$.fragment), n = N(), ue(r.$$.fragment);
|
701
|
+
},
|
702
|
+
m(a, u) {
|
703
|
+
fe(e, a, u), R(a, t, u), fe(o, a, u), R(a, n, u), fe(r, a, u), l = !0;
|
704
|
+
},
|
705
|
+
p(a, u) {
|
706
|
+
const f = {};
|
707
|
+
u[0] & /*isCountingDown*/
|
708
|
+
32768 && (f.isCountingDown = /*isCountingDown*/
|
709
|
+
a[15]), e.$set(f);
|
710
|
+
const c = {};
|
711
|
+
u[0] & /*isCountingDown*/
|
712
|
+
32768 && (c.loading = /*isCountingDown*/
|
713
|
+
a[15]), u[0] & /*showWatermark*/
|
714
|
+
256 && (c.showWatermark = /*showWatermark*/
|
715
|
+
a[8]), o.$set(c);
|
716
|
+
const h = {};
|
717
|
+
u[0] & /*videoOverlay*/
|
718
|
+
512 && (h.overlayColor = /*videoOverlay*/
|
719
|
+
a[9]), u[0] & /*videoOverlayTransparency*/
|
720
|
+
1024 && (h.overlayTransparency = /*videoOverlayTransparency*/
|
721
|
+
a[10]), r.$set(h);
|
722
|
+
},
|
723
|
+
i(a) {
|
724
|
+
l || (H(e.$$.fragment, a), H(o.$$.fragment, a), H(r.$$.fragment, a), l = !0);
|
725
|
+
},
|
726
|
+
o(a) {
|
727
|
+
Q(e.$$.fragment, a), Q(o.$$.fragment, a), Q(r.$$.fragment, a), l = !1;
|
728
|
+
},
|
729
|
+
d(a) {
|
730
|
+
de(e, a), a && D(t), de(o, a), a && D(n), de(r, a);
|
731
|
+
}
|
732
|
+
};
|
733
|
+
}
|
734
|
+
function Si(i) {
|
735
|
+
let e, t, o = (
|
736
|
+
/*$_*/
|
737
|
+
i[30]("faceCollector.finish") + ""
|
738
|
+
), n, r, l, a, u = (
|
739
|
+
/*$_*/
|
740
|
+
i[30]("faceCollector.retakePhoto") + ""
|
741
|
+
), f, c, h;
|
742
|
+
return {
|
743
|
+
c() {
|
744
|
+
e = p("div"), t = p("button"), n = P(o), l = N(), a = p("button"), f = P(u), t.disabled = r = /*$justification*/
|
745
|
+
i[27].length === 0, d(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), d(a, "id", "bry-cc-retake-button"), d(a, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), d(e, "class", "ce-dui-btn-group flex");
|
746
|
+
},
|
747
|
+
m(m, _) {
|
748
|
+
R(m, e, _), b(e, t), b(t, n), b(e, l), b(e, a), b(a, f), c || (h = [
|
749
|
+
oe(
|
750
|
+
t,
|
751
|
+
"click",
|
752
|
+
/*click_handler*/
|
753
|
+
i[52]
|
754
|
+
),
|
755
|
+
oe(
|
756
|
+
a,
|
757
|
+
"click",
|
758
|
+
/*click_handler_1*/
|
759
|
+
i[53]
|
760
|
+
)
|
761
|
+
], c = !0);
|
762
|
+
},
|
763
|
+
p(m, _) {
|
764
|
+
_[0] & /*$_*/
|
765
|
+
1073741824 && o !== (o = /*$_*/
|
766
|
+
m[30]("faceCollector.finish") + "") && B(n, o), _[0] & /*$justification*/
|
767
|
+
134217728 && r !== (r = /*$justification*/
|
768
|
+
m[27].length === 0) && (t.disabled = r), _[0] & /*$_*/
|
769
|
+
1073741824 && u !== (u = /*$_*/
|
770
|
+
m[30]("faceCollector.retakePhoto") + "") && B(f, u);
|
771
|
+
},
|
772
|
+
d(m) {
|
773
|
+
m && D(e), c = !1, mt(h);
|
774
|
+
}
|
775
|
+
};
|
776
|
+
}
|
777
|
+
function Ro(i) {
|
778
|
+
let e, t;
|
779
|
+
return e = new ro({ props: { handler: (
|
780
|
+
/*func*/
|
781
|
+
i[62]
|
782
|
+
) } }), {
|
783
|
+
c() {
|
784
|
+
ue(e.$$.fragment);
|
785
|
+
},
|
786
|
+
m(o, n) {
|
787
|
+
fe(e, o, n), t = !0;
|
788
|
+
},
|
789
|
+
p: X,
|
790
|
+
i(o) {
|
791
|
+
t || (H(e.$$.fragment, o), t = !0);
|
792
|
+
},
|
793
|
+
o(o) {
|
794
|
+
Q(e.$$.fragment, o), t = !1;
|
795
|
+
},
|
796
|
+
d(o) {
|
797
|
+
de(e, o);
|
798
|
+
}
|
799
|
+
};
|
800
|
+
}
|
801
|
+
function Io(i) {
|
802
|
+
let e, t, o, n, r, l, a, u, f;
|
803
|
+
const c = [
|
804
|
+
So,
|
805
|
+
Fo,
|
806
|
+
Lo,
|
807
|
+
Ao,
|
808
|
+
Do
|
809
|
+
], h = [];
|
810
|
+
function m(_, y) {
|
811
|
+
return (
|
812
|
+
/*$captured*/
|
813
|
+
_[24] ? (
|
814
|
+
/*$unconformitiesStore*/
|
815
|
+
_[31].isLoading ? 1 : (
|
816
|
+
/*$requestResult*/
|
817
|
+
_[29] !== z.OK ? 2 : (
|
818
|
+
/*$saved*/
|
819
|
+
_[26] ? 4 : 3
|
820
|
+
)
|
821
|
+
)
|
822
|
+
) : 0
|
823
|
+
);
|
824
|
+
}
|
825
|
+
return l = m(i), a = h[l] = c[l](i), {
|
826
|
+
c() {
|
827
|
+
e = p("div"), t = p("img"), r = N(), a.c(), d(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), He(t.src, o = /*$dataTypePrefix*/
|
828
|
+
i[32] + "," + /*$image*/
|
829
|
+
i[28]) || d(t, "src", o), t.hidden = n = !/*$captured*/
|
830
|
+
i[24] || !/*$showFaceWhileValidating*/
|
831
|
+
i[34] && /*$unconformitiesStore*/
|
832
|
+
i[31].isLoading, d(t, "alt", ""), d(e, "class", u = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
833
|
+
i[34] && /*$unconformitiesStore*/
|
834
|
+
i[31].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid overflow-hidden"));
|
835
|
+
},
|
836
|
+
m(_, y) {
|
837
|
+
R(_, e, y), b(e, t), b(e, r), h[l].m(e, null), f = !0;
|
838
|
+
},
|
839
|
+
p(_, y) {
|
840
|
+
(!f || y[0] & /*$image*/
|
841
|
+
268435456 | y[1] & /*$dataTypePrefix*/
|
842
|
+
2 && !He(t.src, o = /*$dataTypePrefix*/
|
843
|
+
_[32] + "," + /*$image*/
|
844
|
+
_[28])) && d(t, "src", o), (!f || y[0] & /*$captured*/
|
845
|
+
16777216 | y[1] & /*$showFaceWhileValidating, $unconformitiesStore*/
|
846
|
+
9 && n !== (n = !/*$captured*/
|
847
|
+
_[24] || !/*$showFaceWhileValidating*/
|
848
|
+
_[34] && /*$unconformitiesStore*/
|
849
|
+
_[31].isLoading)) && (t.hidden = n);
|
850
|
+
let w = l;
|
851
|
+
l = m(_), l === w ? h[l].p(_, y) : (Ke(), Q(h[w], 1, 1, () => {
|
852
|
+
h[w] = null;
|
853
|
+
}), ze(), a = h[l], a ? a.p(_, y) : (a = h[l] = c[l](_), a.c()), H(a, 1), a.m(e, null)), (!f || y[1] & /*$showFaceWhileValidating, $unconformitiesStore*/
|
854
|
+
9 && u !== (u = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
855
|
+
_[34] && /*$unconformitiesStore*/
|
856
|
+
_[31].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid overflow-hidden"))) && d(e, "class", u);
|
857
|
+
},
|
858
|
+
i(_) {
|
859
|
+
f || (H(a), f = !0);
|
860
|
+
},
|
861
|
+
o(_) {
|
862
|
+
Q(a), f = !1;
|
863
|
+
},
|
864
|
+
d(_) {
|
865
|
+
_ && D(e), h[l].d();
|
866
|
+
}
|
867
|
+
};
|
868
|
+
}
|
869
|
+
function Do(i) {
|
870
|
+
let e, t, o = (
|
871
|
+
/*$_*/
|
872
|
+
i[30]("faceCollector.captured") + ""
|
873
|
+
), n, r, l, a, u, f = (
|
874
|
+
/*$_*/
|
875
|
+
i[30]("faceCollector.retakePhoto") + ""
|
876
|
+
), c, h, m = rt(io).faceStrategy !== so.DISABLED, _, y, w, v = (
|
877
|
+
/*$unconformitiesStore*/
|
878
|
+
i[31].unconformities.length !== 0 && Ni(i)
|
879
|
+
), E = m && No();
|
880
|
+
return {
|
881
|
+
c() {
|
882
|
+
e = p("div"), t = p("h1"), n = P(o), r = N(), v && v.c(), l = N(), a = p("div"), u = p("button"), c = P(f), h = N(), E && E.c(), d(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), d(u, "id", "bry-cc-retake-button"), d(u, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), d(a, "class", "flex flex-row"), ki(a, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
883
|
+
i[35]);
|
884
|
+
},
|
885
|
+
m(k, F) {
|
886
|
+
R(k, e, F), b(e, t), b(t, n), b(e, r), v && v.m(e, null), b(e, l), b(e, a), b(a, u), b(u, c), b(a, h), E && E.m(a, null), _ = !0, y || (w = oe(
|
887
|
+
u,
|
888
|
+
"click",
|
889
|
+
/*click_handler_6*/
|
890
|
+
i[61]
|
891
|
+
), y = !0);
|
892
|
+
},
|
893
|
+
p(k, F) {
|
894
|
+
(!_ || F[0] & /*$_*/
|
895
|
+
1073741824) && o !== (o = /*$_*/
|
896
|
+
k[30]("faceCollector.captured") + "") && B(n, o), /*$unconformitiesStore*/
|
897
|
+
k[31].unconformities.length !== 0 ? v ? v.p(k, F) : (v = Ni(k), v.c(), v.m(e, l)) : v && (v.d(1), v = null), (!_ || F[0] & /*$_*/
|
898
|
+
1073741824) && f !== (f = /*$_*/
|
899
|
+
k[30]("faceCollector.retakePhoto") + "") && B(c, f), (!_ || F[1] & /*$exportButtonDisabled*/
|
900
|
+
16) && ki(a, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
901
|
+
k[35]);
|
902
|
+
},
|
903
|
+
i(k) {
|
904
|
+
_ || (H(E), _ = !0);
|
905
|
+
},
|
906
|
+
o(k) {
|
907
|
+
Q(E), _ = !1;
|
908
|
+
},
|
909
|
+
d(k) {
|
910
|
+
k && D(e), v && v.d(), E && E.d(), y = !1, w();
|
911
|
+
}
|
912
|
+
};
|
913
|
+
}
|
914
|
+
function Ao(i) {
|
915
|
+
let e, t, o = (
|
916
|
+
/*evaluatePhoto*/
|
917
|
+
(i[2] ? (
|
918
|
+
/*$unconformitiesStore*/
|
919
|
+
i[31].unconformities.length === 0 ? (
|
920
|
+
/*$_*/
|
921
|
+
i[30]("faceCollector.everythingOk")
|
922
|
+
) : (
|
923
|
+
/*$_*/
|
924
|
+
i[30]("faceCollector.unconformities")
|
925
|
+
)
|
926
|
+
) : (
|
927
|
+
/*$_*/
|
928
|
+
i[30]("faceCollector.previewCapture")
|
929
|
+
)) + ""
|
930
|
+
), n, r, l, a, u, f, c = (
|
931
|
+
/*$unconformitiesStore*/
|
932
|
+
i[31].unconformities
|
933
|
+
), h = [];
|
934
|
+
for (let w = 0; w < c.length; w += 1)
|
935
|
+
h[w] = Pi(Di(i, c, w));
|
936
|
+
let m = (
|
937
|
+
/*evaluatePhoto*/
|
938
|
+
i[2] && /*$unconformitiesStore*/
|
939
|
+
i[31].unconformities.length == 0 && Wi(i)
|
940
|
+
), _ = (
|
941
|
+
/*showJustificationField*/
|
942
|
+
i[7] && /*$unconformitiesStore*/
|
943
|
+
i[31].unconformities.length > 0 && Bi(i)
|
944
|
+
), y = (
|
945
|
+
/*$captured*/
|
946
|
+
i[24] && Mi(i)
|
947
|
+
);
|
948
|
+
return {
|
949
|
+
c() {
|
950
|
+
e = p("div"), t = p("h1"), n = P(o), r = N(), l = p("div");
|
951
|
+
for (let w = 0; w < h.length; w += 1)
|
952
|
+
h[w].c();
|
953
|
+
a = N(), m && m.c(), u = N(), _ && _.c(), f = N(), y && y.c(), d(t, "class", "text-3xl font-bold transition-opacity"), d(l, "class", "flex flex-wrap"), d(e, "class", "flex flex-col justify-between");
|
954
|
+
},
|
955
|
+
m(w, v) {
|
956
|
+
R(w, e, v), b(e, t), b(t, n), b(e, r), b(e, l);
|
957
|
+
for (let E = 0; E < h.length; E += 1)
|
958
|
+
h[E] && h[E].m(l, null);
|
959
|
+
b(l, a), m && m.m(l, null), b(e, u), _ && _.m(e, null), b(e, f), y && y.m(e, null);
|
960
|
+
},
|
961
|
+
p(w, v) {
|
962
|
+
if (v[0] & /*evaluatePhoto, $_*/
|
963
|
+
1073741828 | v[1] & /*$unconformitiesStore*/
|
964
|
+
1 && o !== (o = /*evaluatePhoto*/
|
965
|
+
(w[2] ? (
|
966
|
+
/*$unconformitiesStore*/
|
967
|
+
w[31].unconformities.length === 0 ? (
|
968
|
+
/*$_*/
|
969
|
+
w[30]("faceCollector.everythingOk")
|
970
|
+
) : (
|
971
|
+
/*$_*/
|
972
|
+
w[30]("faceCollector.unconformities")
|
973
|
+
)
|
974
|
+
) : (
|
975
|
+
/*$_*/
|
976
|
+
w[30]("faceCollector.previewCapture")
|
977
|
+
)) + "") && B(n, o), v[1] & /*$unconformitiesStore*/
|
978
|
+
1) {
|
979
|
+
c = /*$unconformitiesStore*/
|
980
|
+
w[31].unconformities;
|
981
|
+
let E;
|
982
|
+
for (E = 0; E < c.length; E += 1) {
|
983
|
+
const k = Di(w, c, E);
|
984
|
+
h[E] ? h[E].p(k, v) : (h[E] = Pi(k), h[E].c(), h[E].m(l, a));
|
985
|
+
}
|
986
|
+
for (; E < h.length; E += 1)
|
987
|
+
h[E].d(1);
|
988
|
+
h.length = c.length;
|
989
|
+
}
|
990
|
+
/*evaluatePhoto*/
|
991
|
+
w[2] && /*$unconformitiesStore*/
|
992
|
+
w[31].unconformities.length == 0 ? m ? m.p(w, v) : (m = Wi(w), m.c(), m.m(l, null)) : m && (m.d(1), m = null), /*showJustificationField*/
|
993
|
+
w[7] && /*$unconformitiesStore*/
|
994
|
+
w[31].unconformities.length > 0 ? _ ? _.p(w, v) : (_ = Bi(w), _.c(), _.m(e, f)) : _ && (_.d(1), _ = null), /*$captured*/
|
995
|
+
w[24] ? y ? y.p(w, v) : (y = Mi(w), y.c(), y.m(e, null)) : y && (y.d(1), y = null);
|
996
|
+
},
|
997
|
+
i: X,
|
998
|
+
o: X,
|
999
|
+
d(w) {
|
1000
|
+
w && D(e), Hi(h, w), m && m.d(), _ && _.d(), y && y.d();
|
1001
|
+
}
|
1002
|
+
};
|
1003
|
+
}
|
1004
|
+
function Lo(i) {
|
1005
|
+
let e, t, o, n, r = (
|
1006
|
+
/*$_*/
|
1007
|
+
i[30]("faceCollector.finish") + ""
|
1008
|
+
), l, a, u, f = (
|
1009
|
+
/*$_*/
|
1010
|
+
i[30]("faceCollector.retakePhoto") + ""
|
1011
|
+
), c, h, m;
|
1012
|
+
function _(v, E) {
|
1013
|
+
return (
|
1014
|
+
/*$requestResult*/
|
1015
|
+
v[29] === z.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
|
1016
|
+
v[29] === z.UNKNOWN_LIVENESS_ERROR ? jo : (
|
1017
|
+
/*$requestResult*/
|
1018
|
+
v[29] === z.LOW_LIVENESS_SCORE ? Vo : (
|
1019
|
+
/*$requestResult*/
|
1020
|
+
v[29] === z.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
|
1021
|
+
v[29] === z.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? Uo : (
|
1022
|
+
/*$requestResult*/
|
1023
|
+
v[29] === z.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? Mo : (
|
1024
|
+
/*$requestResult*/
|
1025
|
+
v[29] === z.LIVENESS_EVALUATION_ERROR ? Bo : (
|
1026
|
+
/*$requestResult*/
|
1027
|
+
v[29] === z.INSUFFICIENT_FACE_QUALITY ? Wo : Po
|
1028
|
+
)
|
1029
|
+
)
|
1030
|
+
)
|
1031
|
+
)
|
1032
|
+
)
|
1033
|
+
);
|
1034
|
+
}
|
1035
|
+
let y = _(i), w = y(i);
|
1036
|
+
return {
|
1037
|
+
c() {
|
1038
|
+
e = p("div"), w.c(), t = N(), o = p("div"), n = p("button"), l = P(r), a = N(), u = p("button"), c = P(f), n.disabled = !0, d(n, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), d(u, "id", "bry-cc-retake-button"), d(u, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), d(o, "class", "ce-dui-btn-group flex"), d(e, "class", "flex flex-col justify-between");
|
1039
|
+
},
|
1040
|
+
m(v, E) {
|
1041
|
+
R(v, e, E), w.m(e, null), b(e, t), b(e, o), b(o, n), b(n, l), b(o, a), b(o, u), b(u, c), h || (m = [
|
1042
|
+
oe(
|
1043
|
+
n,
|
1044
|
+
"click",
|
1045
|
+
/*click_handler_2*/
|
1046
|
+
i[55]
|
1047
|
+
),
|
1048
|
+
oe(
|
1049
|
+
u,
|
1050
|
+
"click",
|
1051
|
+
/*click_handler_3*/
|
1052
|
+
i[56]
|
1053
|
+
)
|
1054
|
+
], h = !0);
|
1055
|
+
},
|
1056
|
+
p(v, E) {
|
1057
|
+
y === (y = _(v)) && w ? w.p(v, E) : (w.d(1), w = y(v), w && (w.c(), w.m(e, t))), E[0] & /*$_*/
|
1058
|
+
1073741824 && r !== (r = /*$_*/
|
1059
|
+
v[30]("faceCollector.finish") + "") && B(l, r), E[0] & /*$_*/
|
1060
|
+
1073741824 && f !== (f = /*$_*/
|
1061
|
+
v[30]("faceCollector.retakePhoto") + "") && B(c, f);
|
1062
|
+
},
|
1063
|
+
i: X,
|
1064
|
+
o: X,
|
1065
|
+
d(v) {
|
1066
|
+
v && D(e), w.d(), h = !1, mt(m);
|
1067
|
+
}
|
1068
|
+
};
|
1069
|
+
}
|
1070
|
+
function Fo(i) {
|
1071
|
+
let e, t, o = (
|
1072
|
+
/*$_*/
|
1073
|
+
i[30]("faceCollector.validating") + ""
|
1074
|
+
), n, r, l;
|
1075
|
+
return {
|
1076
|
+
c() {
|
1077
|
+
e = p("div"), t = p("h1"), n = P(o), r = N(), l = p("div"), d(t, "class", "inline-block text-3xl font-bold pb-[1em] transition-opacity"), d(l, "class", "ml-6 inline-block dot-typing"), d(e, "class", "min-w-[200px]");
|
1078
|
+
},
|
1079
|
+
m(a, u) {
|
1080
|
+
R(a, e, u), b(e, t), b(t, n), b(e, r), b(e, l);
|
1081
|
+
},
|
1082
|
+
p(a, u) {
|
1083
|
+
u[0] & /*$_*/
|
1084
|
+
1073741824 && o !== (o = /*$_*/
|
1085
|
+
a[30]("faceCollector.validating") + "") && B(n, o);
|
1086
|
+
},
|
1087
|
+
i: X,
|
1088
|
+
o: X,
|
1089
|
+
d(a) {
|
1090
|
+
a && D(e);
|
1091
|
+
}
|
1092
|
+
};
|
1093
|
+
}
|
1094
|
+
function So(i) {
|
1095
|
+
let e;
|
1096
|
+
return {
|
1097
|
+
c() {
|
1098
|
+
e = p("div"), d(e, "class", "");
|
1099
|
+
},
|
1100
|
+
m(t, o) {
|
1101
|
+
R(t, e, o);
|
1102
|
+
},
|
1103
|
+
p: X,
|
1104
|
+
i: X,
|
1105
|
+
o: X,
|
1106
|
+
d(t) {
|
1107
|
+
t && D(e);
|
1108
|
+
}
|
1109
|
+
};
|
1110
|
+
}
|
1111
|
+
function Ni(i) {
|
1112
|
+
let e, t, o = (
|
1113
|
+
/*$_*/
|
1114
|
+
i[30]("faceCollector.justification") + ""
|
1115
|
+
), n, r, l, a, u;
|
1116
|
+
return {
|
1117
|
+
c() {
|
1118
|
+
e = p("label"), t = p("span"), n = P(o), r = N(), l = p("textarea"), d(t, "class", "ce-dui-label-text text-base"), d(e, "class", "ce-dui-label"), d(e, "for", "justification"), d(l, "contenteditable", ""), d(l, "id", "justification"), d(l, "class", "ce-dui-textarea ce-dui-textarea-bordered textarea-ghost h-[6em] w-full text-base");
|
1119
|
+
},
|
1120
|
+
m(f, c) {
|
1121
|
+
R(f, e, c), b(e, t), b(t, n), R(f, r, c), R(f, l, c), ct(
|
1122
|
+
l,
|
1123
|
+
/*$justification*/
|
1124
|
+
i[27]
|
1125
|
+
), a || (u = oe(
|
1126
|
+
l,
|
1127
|
+
"input",
|
1128
|
+
/*textarea_input_handler_1*/
|
1129
|
+
i[60]
|
1130
|
+
), a = !0);
|
1131
|
+
},
|
1132
|
+
p(f, c) {
|
1133
|
+
c[0] & /*$_*/
|
1134
|
+
1073741824 && o !== (o = /*$_*/
|
1135
|
+
f[30]("faceCollector.justification") + "") && B(n, o), c[0] & /*$justification*/
|
1136
|
+
134217728 && ct(
|
1137
|
+
l,
|
1138
|
+
/*$justification*/
|
1139
|
+
f[27]
|
1140
|
+
);
|
1141
|
+
},
|
1142
|
+
d(f) {
|
1143
|
+
f && D(e), f && D(r), f && D(l), a = !1, u();
|
1144
|
+
}
|
1145
|
+
};
|
1146
|
+
}
|
1147
|
+
function No(i) {
|
1148
|
+
let e, t;
|
1149
|
+
return e = new oo({
|
1150
|
+
props: { cssClass: "ce-dui-btn-block flex-shrink" }
|
1151
|
+
}), {
|
1152
|
+
c() {
|
1153
|
+
ue(e.$$.fragment);
|
1154
|
+
},
|
1155
|
+
m(o, n) {
|
1156
|
+
fe(e, o, n), t = !0;
|
1157
|
+
},
|
1158
|
+
i(o) {
|
1159
|
+
t || (H(e.$$.fragment, o), t = !0);
|
1160
|
+
},
|
1161
|
+
o(o) {
|
1162
|
+
Q(e.$$.fragment, o), t = !1;
|
1163
|
+
},
|
1164
|
+
d(o) {
|
1165
|
+
de(e, o);
|
1166
|
+
}
|
1167
|
+
};
|
1168
|
+
}
|
1169
|
+
function Pi(i) {
|
1170
|
+
let e, t = (
|
1171
|
+
/*unconformity*/
|
1172
|
+
i[120] + ""
|
1173
|
+
), o;
|
1174
|
+
return {
|
1175
|
+
c() {
|
1176
|
+
e = p("div"), o = P(t), d(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]");
|
1177
|
+
},
|
1178
|
+
m(n, r) {
|
1179
|
+
R(n, e, r), b(e, o);
|
1180
|
+
},
|
1181
|
+
p(n, r) {
|
1182
|
+
r[1] & /*$unconformitiesStore*/
|
1183
|
+
1 && t !== (t = /*unconformity*/
|
1184
|
+
n[120] + "") && B(o, t);
|
1185
|
+
},
|
1186
|
+
d(n) {
|
1187
|
+
n && D(e);
|
1188
|
+
}
|
1189
|
+
};
|
1190
|
+
}
|
1191
|
+
function Wi(i) {
|
1192
|
+
let e, t = (
|
1193
|
+
/*$_*/
|
1194
|
+
i[30]("faceCollector.noNonconformity") + ""
|
1195
|
+
), o;
|
1196
|
+
return {
|
1197
|
+
c() {
|
1198
|
+
e = p("div"), o = P(t), d(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-info text-xl pb-[.25em] m-[.5em]");
|
1199
|
+
},
|
1200
|
+
m(n, r) {
|
1201
|
+
R(n, e, r), b(e, o);
|
1202
|
+
},
|
1203
|
+
p(n, r) {
|
1204
|
+
r[0] & /*$_*/
|
1205
|
+
1073741824 && t !== (t = /*$_*/
|
1206
|
+
n[30]("faceCollector.noNonconformity") + "") && B(o, t);
|
1207
|
+
},
|
1208
|
+
d(n) {
|
1209
|
+
n && D(e);
|
1210
|
+
}
|
1211
|
+
};
|
1212
|
+
}
|
1213
|
+
function Bi(i) {
|
1214
|
+
let e, t, o, n = (
|
1215
|
+
/*$_*/
|
1216
|
+
i[30]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
1217
|
+
), r, l, a, u, f, c, h, m, _ = (
|
1218
|
+
/*$_*/
|
1219
|
+
i[30]("faceCollector.thisInformationIsRequired") + ""
|
1220
|
+
), y, w, v, E;
|
1221
|
+
return {
|
1222
|
+
c() {
|
1223
|
+
e = p("div"), t = p("label"), o = p("span"), r = P(n), l = N(), a = p("textarea"), f = N(), c = p("label"), h = p("span"), m = P("("), y = P(_), w = P(")"), d(o, "class", "ce-dui-label-text text-base"), d(t, "class", "ce-dui-label"), d(t, "for", "justification"), d(a, "contenteditable", ""), d(a, "id", "justification"), d(a, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), d(a, "placeholder", u = /*$_*/
|
1224
|
+
i[30]("faceCollector.yourJustification")), d(h, "class", "ce-dui-label-text-alt text-base"), d(c, "class", "ce-dui-label"), d(c, "for", "justification"), d(e, "class", "ce-dui-form-control");
|
1225
|
+
},
|
1226
|
+
m(k, F) {
|
1227
|
+
R(k, e, F), b(e, t), b(t, o), b(o, r), b(e, l), b(e, a), ct(
|
1228
|
+
a,
|
1229
|
+
/*$justification*/
|
1230
|
+
i[27]
|
1231
|
+
), b(e, f), b(e, c), b(c, h), b(h, m), b(h, y), b(h, w), v || (E = oe(
|
1232
|
+
a,
|
1233
|
+
"input",
|
1234
|
+
/*textarea_input_handler*/
|
1235
|
+
i[57]
|
1236
|
+
), v = !0);
|
1237
|
+
},
|
1238
|
+
p(k, F) {
|
1239
|
+
F[0] & /*$_*/
|
1240
|
+
1073741824 && n !== (n = /*$_*/
|
1241
|
+
k[30]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && B(r, n), F[0] & /*$_*/
|
1242
|
+
1073741824 && u !== (u = /*$_*/
|
1243
|
+
k[30]("faceCollector.yourJustification")) && d(a, "placeholder", u), F[0] & /*$justification*/
|
1244
|
+
134217728 && ct(
|
1245
|
+
a,
|
1246
|
+
/*$justification*/
|
1247
|
+
k[27]
|
1248
|
+
), F[0] & /*$_*/
|
1249
|
+
1073741824 && _ !== (_ = /*$_*/
|
1250
|
+
k[30]("faceCollector.thisInformationIsRequired") + "") && B(y, _);
|
1251
|
+
},
|
1252
|
+
d(k) {
|
1253
|
+
k && D(e), v = !1, E();
|
1254
|
+
}
|
1255
|
+
};
|
1256
|
+
}
|
1257
|
+
function Mi(i) {
|
1258
|
+
let e, t, o = (
|
1259
|
+
/*$_*/
|
1260
|
+
i[30]("faceCollector.finish") + ""
|
1261
|
+
), n, r, l, a, u = (
|
1262
|
+
/*$_*/
|
1263
|
+
i[30]("faceCollector.retakePhoto") + ""
|
1264
|
+
), f, c, h;
|
1265
|
+
return {
|
1266
|
+
c() {
|
1267
|
+
e = p("div"), t = p("button"), n = P(o), l = N(), a = p("button"), f = P(u), t.disabled = r = /*evaluatePhoto*/
|
1268
|
+
i[2] && /*showJustificationField*/
|
1269
|
+
i[7] && /*$justification*/
|
1270
|
+
i[27].length === 0 && /*$unconformitiesStore*/
|
1271
|
+
i[31].unconformities.length !== 0, d(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), d(a, "id", "bry-cc-retake-button"), d(a, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), d(e, "class", "ce-dui-btn-group flex");
|
1272
|
+
},
|
1273
|
+
m(m, _) {
|
1274
|
+
R(m, e, _), b(e, t), b(t, n), b(e, l), b(e, a), b(a, f), c || (h = [
|
1275
|
+
oe(
|
1276
|
+
t,
|
1277
|
+
"click",
|
1278
|
+
/*click_handler_4*/
|
1279
|
+
i[58]
|
1280
|
+
),
|
1281
|
+
oe(
|
1282
|
+
a,
|
1283
|
+
"click",
|
1284
|
+
/*click_handler_5*/
|
1285
|
+
i[59]
|
1286
|
+
)
|
1287
|
+
], c = !0);
|
1288
|
+
},
|
1289
|
+
p(m, _) {
|
1290
|
+
_[0] & /*$_*/
|
1291
|
+
1073741824 && o !== (o = /*$_*/
|
1292
|
+
m[30]("faceCollector.finish") + "") && B(n, o), _[0] & /*evaluatePhoto, showJustificationField, $justification*/
|
1293
|
+
134217860 | _[1] & /*$unconformitiesStore*/
|
1294
|
+
1 && r !== (r = /*evaluatePhoto*/
|
1295
|
+
m[2] && /*showJustificationField*/
|
1296
|
+
m[7] && /*$justification*/
|
1297
|
+
m[27].length === 0 && /*$unconformitiesStore*/
|
1298
|
+
m[31].unconformities.length !== 0) && (t.disabled = r), _[0] & /*$_*/
|
1299
|
+
1073741824 && u !== (u = /*$_*/
|
1300
|
+
m[30]("faceCollector.retakePhoto") + "") && B(f, u);
|
1301
|
+
},
|
1302
|
+
d(m) {
|
1303
|
+
m && D(e), c = !1, mt(h);
|
1304
|
+
}
|
1305
|
+
};
|
1306
|
+
}
|
1307
|
+
function Po(i) {
|
1308
|
+
let e, t = (
|
1309
|
+
/*$_*/
|
1310
|
+
i[30]("faceCollector.everythingOk") + ""
|
1311
|
+
), o;
|
1312
|
+
return {
|
1313
|
+
c() {
|
1314
|
+
e = p("h1"), o = P(t), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
|
1315
|
+
},
|
1316
|
+
m(n, r) {
|
1317
|
+
R(n, e, r), b(e, o);
|
1318
|
+
},
|
1319
|
+
p(n, r) {
|
1320
|
+
r[0] & /*$_*/
|
1321
|
+
1073741824 && t !== (t = /*$_*/
|
1322
|
+
n[30]("faceCollector.everythingOk") + "") && B(o, t);
|
1323
|
+
},
|
1324
|
+
d(n) {
|
1325
|
+
n && D(e);
|
1326
|
+
}
|
1327
|
+
};
|
1328
|
+
}
|
1329
|
+
function Wo(i) {
|
1330
|
+
let e, t, o, n, r = (
|
1331
|
+
/*$_*/
|
1332
|
+
i[30]("liveness.error.faceQualityInsufficient") + ""
|
1333
|
+
), l, a = (
|
1334
|
+
/*$unconformitiesStore*/
|
1335
|
+
i[31].unconformities
|
1336
|
+
), u = [];
|
1337
|
+
for (let c = 0; c < a.length; c += 1)
|
1338
|
+
u[c] = Ui(Ai(i, a, c));
|
1339
|
+
let f = (
|
1340
|
+
/*evaluatePhoto*/
|
1341
|
+
i[2] && /*$unconformitiesStore*/
|
1342
|
+
i[31].unconformities.length == 0 && Vi(i)
|
1343
|
+
);
|
1344
|
+
return {
|
1345
|
+
c() {
|
1346
|
+
e = p("div");
|
1347
|
+
for (let c = 0; c < u.length; c += 1)
|
1348
|
+
u[c].c();
|
1349
|
+
t = N(), f && f.c(), o = N(), n = p("h1"), l = P(r), d(e, "class", "flex flex-wrap"), d(n, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1350
|
+
},
|
1351
|
+
m(c, h) {
|
1352
|
+
R(c, e, h);
|
1353
|
+
for (let m = 0; m < u.length; m += 1)
|
1354
|
+
u[m] && u[m].m(e, null);
|
1355
|
+
b(e, t), f && f.m(e, null), R(c, o, h), R(c, n, h), b(n, l);
|
1356
|
+
},
|
1357
|
+
p(c, h) {
|
1358
|
+
if (h[1] & /*$unconformitiesStore*/
|
1359
|
+
1) {
|
1360
|
+
a = /*$unconformitiesStore*/
|
1361
|
+
c[31].unconformities;
|
1362
|
+
let m;
|
1363
|
+
for (m = 0; m < a.length; m += 1) {
|
1364
|
+
const _ = Ai(c, a, m);
|
1365
|
+
u[m] ? u[m].p(_, h) : (u[m] = Ui(_), u[m].c(), u[m].m(e, t));
|
1366
|
+
}
|
1367
|
+
for (; m < u.length; m += 1)
|
1368
|
+
u[m].d(1);
|
1369
|
+
u.length = a.length;
|
1370
|
+
}
|
1371
|
+
/*evaluatePhoto*/
|
1372
|
+
c[2] && /*$unconformitiesStore*/
|
1373
|
+
c[31].unconformities.length == 0 ? f ? f.p(c, h) : (f = Vi(c), f.c(), f.m(e, null)) : f && (f.d(1), f = null), h[0] & /*$_*/
|
1374
|
+
1073741824 && r !== (r = /*$_*/
|
1375
|
+
c[30]("liveness.error.faceQualityInsufficient") + "") && B(l, r);
|
1376
|
+
},
|
1377
|
+
d(c) {
|
1378
|
+
c && D(e), Hi(u, c), f && f.d(), c && D(o), c && D(n);
|
1379
|
+
}
|
1380
|
+
};
|
1381
|
+
}
|
1382
|
+
function Bo(i) {
|
1383
|
+
let e, t = (
|
1384
|
+
/*$_*/
|
1385
|
+
i[30]("liveness.error.evaluationError") + ""
|
1386
|
+
), o;
|
1387
|
+
return {
|
1388
|
+
c() {
|
1389
|
+
e = p("h1"), o = P(t), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1390
|
+
},
|
1391
|
+
m(n, r) {
|
1392
|
+
R(n, e, r), b(e, o);
|
1393
|
+
},
|
1394
|
+
p(n, r) {
|
1395
|
+
r[0] & /*$_*/
|
1396
|
+
1073741824 && t !== (t = /*$_*/
|
1397
|
+
n[30]("liveness.error.evaluationError") + "") && B(o, t);
|
1398
|
+
},
|
1399
|
+
d(n) {
|
1400
|
+
n && D(e);
|
1401
|
+
}
|
1402
|
+
};
|
1403
|
+
}
|
1404
|
+
function Mo(i) {
|
1405
|
+
let e, t = (
|
1406
|
+
/*$_*/
|
1407
|
+
i[30]("faceCollector.unableToCompleteRequest") + ""
|
1408
|
+
), o;
|
1409
|
+
return {
|
1410
|
+
c() {
|
1411
|
+
e = p("h1"), o = P(t), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1412
|
+
},
|
1413
|
+
m(n, r) {
|
1414
|
+
R(n, e, r), b(e, o);
|
1415
|
+
},
|
1416
|
+
p(n, r) {
|
1417
|
+
r[0] & /*$_*/
|
1418
|
+
1073741824 && t !== (t = /*$_*/
|
1419
|
+
n[30]("faceCollector.unableToCompleteRequest") + "") && B(o, t);
|
1420
|
+
},
|
1421
|
+
d(n) {
|
1422
|
+
n && D(e);
|
1423
|
+
}
|
1424
|
+
};
|
1425
|
+
}
|
1426
|
+
function Uo(i) {
|
1427
|
+
let e, t = (
|
1428
|
+
/*$_*/
|
1429
|
+
i[30]("faceCollector.lowQualityCapture") + ""
|
1430
|
+
), o;
|
1431
|
+
return {
|
1432
|
+
c() {
|
1433
|
+
e = p("h1"), o = P(t), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1434
|
+
},
|
1435
|
+
m(n, r) {
|
1436
|
+
R(n, e, r), b(e, o);
|
1437
|
+
},
|
1438
|
+
p(n, r) {
|
1439
|
+
r[0] & /*$_*/
|
1440
|
+
1073741824 && t !== (t = /*$_*/
|
1441
|
+
n[30]("faceCollector.lowQualityCapture") + "") && B(o, t);
|
1442
|
+
},
|
1443
|
+
d(n) {
|
1444
|
+
n && D(e);
|
1445
|
+
}
|
1446
|
+
};
|
1447
|
+
}
|
1448
|
+
function Vo(i) {
|
1449
|
+
let e, t = (
|
1450
|
+
/*$_*/
|
1451
|
+
i[30]("liveness.error.error") + ""
|
1452
|
+
), o, n, r = (
|
1453
|
+
/*$_*/
|
1454
|
+
i[30]("faceCollector.unaliveCapture") + ""
|
1455
|
+
), l;
|
1456
|
+
return {
|
1457
|
+
c() {
|
1458
|
+
e = p("h1"), o = P(t), n = P(": "), l = P(r), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1459
|
+
},
|
1460
|
+
m(a, u) {
|
1461
|
+
R(a, e, u), b(e, o), b(e, n), b(e, l);
|
1462
|
+
},
|
1463
|
+
p(a, u) {
|
1464
|
+
u[0] & /*$_*/
|
1465
|
+
1073741824 && t !== (t = /*$_*/
|
1466
|
+
a[30]("liveness.error.error") + "") && B(o, t), u[0] & /*$_*/
|
1467
|
+
1073741824 && r !== (r = /*$_*/
|
1468
|
+
a[30]("faceCollector.unaliveCapture") + "") && B(l, r);
|
1469
|
+
},
|
1470
|
+
d(a) {
|
1471
|
+
a && D(e);
|
1472
|
+
}
|
1473
|
+
};
|
1474
|
+
}
|
1475
|
+
function jo(i) {
|
1476
|
+
let e, t = (
|
1477
|
+
/*$_*/
|
1478
|
+
i[30]("liveness.error.error") + ""
|
1479
|
+
), o, n, r = (
|
1480
|
+
/*$_*/
|
1481
|
+
i[30](
|
1482
|
+
/*livenessError*/
|
1483
|
+
i[20]
|
1484
|
+
) + ""
|
1485
|
+
), l;
|
1486
|
+
return {
|
1487
|
+
c() {
|
1488
|
+
e = p("h1"), o = P(t), n = P(": "), l = P(r), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1489
|
+
},
|
1490
|
+
m(a, u) {
|
1491
|
+
R(a, e, u), b(e, o), b(e, n), b(e, l);
|
1492
|
+
},
|
1493
|
+
p(a, u) {
|
1494
|
+
u[0] & /*$_*/
|
1495
|
+
1073741824 && t !== (t = /*$_*/
|
1496
|
+
a[30]("liveness.error.error") + "") && B(o, t), u[0] & /*$_, livenessError*/
|
1497
|
+
1074790400 && r !== (r = /*$_*/
|
1498
|
+
a[30](
|
1499
|
+
/*livenessError*/
|
1500
|
+
a[20]
|
1501
|
+
) + "") && B(l, r);
|
1502
|
+
},
|
1503
|
+
d(a) {
|
1504
|
+
a && D(e);
|
1505
|
+
}
|
1506
|
+
};
|
1507
|
+
}
|
1508
|
+
function Ui(i) {
|
1509
|
+
let e, t = (
|
1510
|
+
/*unconformity*/
|
1511
|
+
i[120] + ""
|
1512
|
+
), o;
|
1513
|
+
return {
|
1514
|
+
c() {
|
1515
|
+
e = p("div"), o = P(t), d(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]");
|
1516
|
+
},
|
1517
|
+
m(n, r) {
|
1518
|
+
R(n, e, r), b(e, o);
|
1519
|
+
},
|
1520
|
+
p(n, r) {
|
1521
|
+
r[1] & /*$unconformitiesStore*/
|
1522
|
+
1 && t !== (t = /*unconformity*/
|
1523
|
+
n[120] + "") && B(o, t);
|
1524
|
+
},
|
1525
|
+
d(n) {
|
1526
|
+
n && D(e);
|
1527
|
+
}
|
1528
|
+
};
|
1529
|
+
}
|
1530
|
+
function Vi(i) {
|
1531
|
+
let e, t = (
|
1532
|
+
/*$_*/
|
1533
|
+
i[30]("faceCollector.noNonconformity") + ""
|
1534
|
+
), o;
|
1535
|
+
return {
|
1536
|
+
c() {
|
1537
|
+
e = p("div"), o = P(t), d(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-info text-xl pb-[.25em] m-[.5em]");
|
1538
|
+
},
|
1539
|
+
m(n, r) {
|
1540
|
+
R(n, e, r), b(e, o);
|
1541
|
+
},
|
1542
|
+
p(n, r) {
|
1543
|
+
r[0] & /*$_*/
|
1544
|
+
1073741824 && t !== (t = /*$_*/
|
1545
|
+
n[30]("faceCollector.noNonconformity") + "") && B(o, t);
|
1546
|
+
},
|
1547
|
+
d(n) {
|
1548
|
+
n && D(e);
|
1549
|
+
}
|
1550
|
+
};
|
1551
|
+
}
|
1552
|
+
function Ko(i) {
|
1553
|
+
let e, t, o, n, r, l, a, u, f, c, h = (
|
1554
|
+
/*$videoStore*/
|
1555
|
+
i[33] && Li(i)
|
1556
|
+
);
|
1557
|
+
n = new Qi({
|
1558
|
+
props: {
|
1559
|
+
waitingIdrndCaptureEvent: (
|
1560
|
+
/*waitingIdrndCaptureEvent*/
|
1561
|
+
i[19]
|
1562
|
+
),
|
1563
|
+
idrndLoading: (
|
1564
|
+
/*idrndLoading*/
|
1565
|
+
i[17]
|
1566
|
+
)
|
1567
|
+
}
|
1568
|
+
});
|
1569
|
+
let m = (
|
1570
|
+
/*$captured*/
|
1571
|
+
i[24] && Si(i)
|
1572
|
+
);
|
1573
|
+
const _ = [Io, Ro], y = [];
|
1574
|
+
function w(v, E) {
|
1575
|
+
return (!/*idrndClosed*/
|
1576
|
+
v[18] || /*$captured*/
|
1577
|
+
v[24]) && /*showUnconformities*/
|
1578
|
+
v[3] ? 0 : (
|
1579
|
+
/*$cameraStatusStore*/
|
1580
|
+
v[21] !== M.OK ? 1 : -1
|
1581
|
+
);
|
1582
|
+
}
|
1583
|
+
return ~(a = w(i)) && (u = y[a] = _[a](i)), {
|
1584
|
+
c() {
|
1585
|
+
e = p("div"), t = p("div"), h && h.c(), o = N(), ue(n.$$.fragment), r = N(), m && m.c(), l = N(), u && u.c(), f = ji(), this.c = X, d(t, "class", "relative mx-auto"), d(e, "class", "flex flex-col justify-between");
|
1586
|
+
},
|
1587
|
+
m(v, E) {
|
1588
|
+
R(v, e, E), b(e, t), h && h.m(t, null), b(t, o), fe(n, t, null), b(t, r), m && m.m(t, null), i[54](e), R(v, l, E), ~a && y[a].m(v, E), R(v, f, E), c = !0;
|
1589
|
+
},
|
1590
|
+
p(v, E) {
|
1591
|
+
/*$videoStore*/
|
1592
|
+
v[33] ? h ? (h.p(v, E), E[1] & /*$videoStore*/
|
1593
|
+
4 && H(h, 1)) : (h = Li(v), h.c(), H(h, 1), h.m(t, o)) : h && (Ke(), Q(h, 1, 1, () => {
|
1594
|
+
h = null;
|
1595
|
+
}), ze());
|
1596
|
+
const k = {};
|
1597
|
+
E[0] & /*waitingIdrndCaptureEvent*/
|
1598
|
+
524288 && (k.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/
|
1599
|
+
v[19]), E[0] & /*idrndLoading*/
|
1600
|
+
131072 && (k.idrndLoading = /*idrndLoading*/
|
1601
|
+
v[17]), n.$set(k), /*$captured*/
|
1602
|
+
v[24] ? m ? m.p(v, E) : (m = Si(v), m.c(), m.m(t, null)) : m && (m.d(1), m = null);
|
1603
|
+
let F = a;
|
1604
|
+
a = w(v), a === F ? ~a && y[a].p(v, E) : (u && (Ke(), Q(y[F], 1, 1, () => {
|
1605
|
+
y[F] = null;
|
1606
|
+
}), ze()), ~a ? (u = y[a], u ? u.p(v, E) : (u = y[a] = _[a](v), u.c()), H(u, 1), u.m(f.parentNode, f)) : u = null);
|
1607
|
+
},
|
1608
|
+
i(v) {
|
1609
|
+
c || (H(h), H(n.$$.fragment, v), H(u), c = !0);
|
1610
|
+
},
|
1611
|
+
o(v) {
|
1612
|
+
Q(h), Q(n.$$.fragment, v), Q(u), c = !1;
|
1613
|
+
},
|
1614
|
+
d(v) {
|
1615
|
+
v && D(e), h && h.d(), de(n), m && m.d(), i[54](null), v && D(l), ~a && y[a].d(v), v && D(f);
|
1616
|
+
}
|
1617
|
+
};
|
1618
|
+
}
|
1619
|
+
let zo = 0, Ho = 3e3;
|
1620
|
+
function qo() {
|
1621
|
+
({}).VITE_USE_DEV === "true" ? import("./index-idlf-detector_39cfdffa_3.2.0-RC01.js") : import("./index-idlf-detector_a819b3c8_3.2.0-RC01.js");
|
1622
|
+
}
|
1623
|
+
function Jo(i, e, t) {
|
1624
|
+
let o, n, r, l, a, u, f, c, h, m, _, y, w, v, E, k, F, Ee, ne, j, L, A, O, ye, Z, ae, ge, Ie, _t, te, Ht, gt, bt, vt, qt, Jt;
|
1625
|
+
I(i, Ft, (s) => t(74, o = s)), I(i, xe, (s) => t(76, r = s)), I(i, q, (s) => t(21, l = s)), I(i, Ve, (s) => t(22, a = s)), I(i, Os, (s) => t(77, u = s)), I(i, $e, (s) => t(78, f = s)), I(i, _e, (s) => t(23, c = s)), I(i, Rs, (s) => t(79, h = s)), I(i, Oe, (s) => t(24, m = s)), I(i, gi, (s) => t(80, _ = s)), I(i, St, (s) => t(81, y = s)), I(i, zi, (s) => t(25, w = s)), I(i, bi, (s) => t(82, v = s)), I(i, Is, (s) => t(83, E = s)), I(i, Be, (s) => t(84, k = s)), I(i, pe, (s) => t(85, F = s)), I(i, Ds, (s) => t(86, Ee = s)), I(i, As, (s) => t(87, ne = s)), I(i, Nt, (s) => t(26, j = s)), I(i, Pt, (s) => t(27, L = s)), I(i, ce, (s) => t(28, A = s)), I(i, $, (s) => t(29, O = s)), I(i, Ki, (s) => t(30, ye = s)), I(i, we, (s) => t(31, Z = s)), I(i, vi, (s) => t(88, ge = s)), I(i, et, (s) => t(89, Ie = s)), I(i, Wt, (s) => t(90, _t = s)), I(i, je, (s) => t(33, te = s)), I(i, Ls, (s) => t(91, Ht = s)), I(i, tt, (s) => t(92, gt = s)), I(i, pi, (s) => t(93, bt = s)), I(i, wi, (s) => t(94, vt = s)), I(i, Fs, (s) => t(34, qt = s)), I(i, Ss, (s) => t(35, Jt = s));
|
1626
|
+
let S, ee, he, Qt, Xt = !1, De = !1, pt = !1, wt = !1, Ct = (/* @__PURE__ */ new Date()).getTime(), { enableMinutiae: Et } = e, { videoDimensions: yt } = e, { noTabs: kt } = e, { weightsPath: Tt } = e, { evaluatePhoto: me } = e, { showCaptureButton: Ot } = e, { showUnconformities: Gt } = e, { showConfigButton: Yt } = e, { showAutoCaptureButton: Rt } = e, { showCameraButton: Zt } = e, { showJustificationField: xt } = e, { minEyeToEyeDist: Ae } = e, { showWatermark: $t } = e, { videoOverlay: ei } = e, { videoOverlayTransparency: ti } = e, { faceDetectionSensitivity: It } = e;
|
1627
|
+
const qe = jt(!1);
|
1628
|
+
I(i, qe, (s) => t(75, n = s));
|
1629
|
+
const ke = jt("data:image/png;base64");
|
1630
|
+
I(i, ke, (s) => t(32, ae = s));
|
1631
|
+
let { widgetInstance: J } = e, ii = new ho(), Le = !1, Dt = !1, Je = !0, le = !0, Fe = !1, si = 0, x = "", At = 0, Qe = !0, oi = 0;
|
1632
|
+
const Xe = Ns.mixin({
|
1633
|
+
toast: !0,
|
1634
|
+
position: "bottom-left",
|
1635
|
+
timer: 13e3,
|
1636
|
+
timerProgressBar: !0
|
1637
|
+
});
|
1638
|
+
Ps(async () => {
|
1639
|
+
if (g(et, Ie = !0, Ie), g(Ve, a = !1, a), ai(), ge)
|
1640
|
+
try {
|
1641
|
+
await Ws(Tt), Xt = !0, Qt = await Bs();
|
1642
|
+
} catch {
|
1643
|
+
g(vi, ge = !1, ge), t(0, Ot = !0);
|
1644
|
+
}
|
1645
|
+
K() ? (qo(), Xi(), ii.startDetection()) : await be(), re() || Yi();
|
1646
|
+
});
|
1647
|
+
async function ni() {
|
1648
|
+
const [s, C] = (yt ?? "")?.replaceAll(" ", "")?.split("x")?.map((T) => T ? parseInt(T) : void 0);
|
1649
|
+
!s || !C || (re() ? (await xs(), g(
|
1650
|
+
je,
|
1651
|
+
te = {
|
1652
|
+
videoWidth: window.innerWidth,
|
1653
|
+
videoHeight: window.innerHeight
|
1654
|
+
},
|
1655
|
+
te
|
1656
|
+
)) : g(je, te = { videoWidth: s, videoHeight: C }, te));
|
1657
|
+
}
|
1658
|
+
function ai() {
|
1659
|
+
g(xe, r = !1, r), g(Oe, m = !1, m), g($e, f = Bt.FRONT_CAMERA, f), Rt && g(bi, v = !1, v), g(Nt, j = !1, j), g($, O = z.OK, O), g(Be, k = "", k), g(we, Z.unconformities = [], Z);
|
1660
|
+
const s = rt(Mt);
|
1661
|
+
s.closedMouth = !1, s.isPersonCloseEnough = !1, s.isPersonTooclose = !0, s.isPersonInFrame = !1, Mt.set(s), g(pe, F = "", F);
|
1662
|
+
}
|
1663
|
+
function Xi() {
|
1664
|
+
J.addEventListener("open", (s) => {
|
1665
|
+
const C = s.detail[0].video;
|
1666
|
+
g(
|
1667
|
+
wi,
|
1668
|
+
vt = {
|
1669
|
+
width: C.videoWidth,
|
1670
|
+
height: C.videoHeight
|
1671
|
+
},
|
1672
|
+
vt
|
1673
|
+
), t(12, S.srcObject = C.srcObject, S), t(17, Je = !1), Ms(J);
|
1674
|
+
function T() {
|
1675
|
+
le || Ue(S, T, !0);
|
1676
|
+
}
|
1677
|
+
T();
|
1678
|
+
}), J.addEventListener("error", (s) => {
|
1679
|
+
console.error(s), s.detail[0].message.toLowerCase().includes("device in use") ? g(q, l = M.CAMERA_IN_USE_ERROR, l) : s.detail[0].message.toLowerCase().includes("permission") ? g(q, l = M.CAMERA_DENIED_ERROR, l) : s.detail[0].message.toLowerCase().includes("not found") && !re() ? g(q, l = M.DEVICE_NOT_FOUND_ERROR, l) : g(q, l = M.CAMERA_DENIED_ERROR, l), t(17, Je = !1);
|
1680
|
+
}), J.addEventListener("faceDetection", (s) => {
|
1681
|
+
s.detail[0].errors.length > 0 && Ci(s.detail[0].errors);
|
1682
|
+
}), J.addEventListener("detection", (s) => {
|
1683
|
+
s.detail[0].errors.length > 0 && Ci(s.detail[0].errors);
|
1684
|
+
}), J.addEventListener("close", async (s) => {
|
1685
|
+
m || (Le = !1), t(18, le = !0), t(19, Fe = !1), l === M.OK && g(q, l = M.CAMERA_CLOSED_ERROR, l);
|
1686
|
+
}), J.addEventListener("initialize", async (s) => {
|
1687
|
+
Dt = !0, g(pi, bt = !0, bt);
|
1688
|
+
try {
|
1689
|
+
J.setLicense(Us, "faceDetector");
|
1690
|
+
} catch (C) {
|
1691
|
+
console.error("Error setting license:", C);
|
1692
|
+
}
|
1693
|
+
_t === it.Face && !Le && !m && Dt && await Lt();
|
1694
|
+
}), J.addEventListener("capture", async (s) => {
|
1695
|
+
t(20, x = "");
|
1696
|
+
const { encryptedFile: C, photo: T } = s.detail[0];
|
1697
|
+
g(tt, gt = C, gt);
|
1698
|
+
const W = (await st(T)).split(",");
|
1699
|
+
if (t(19, Fe = !1), g($, O = z.OK, O), g(we, Z.isLoading = !0, Z), g(Oe, m = !0, m), Le = !1, g(ke, ae = W[0], ae), g(ce, A = W[1], A), g(Be, k = W[1], k), !Ht) {
|
1700
|
+
let ie, Ne, hi, mi;
|
1701
|
+
try {
|
1702
|
+
if (!Ei(Ae))
|
1703
|
+
throw new Error("FACE_TOO_SMALL");
|
1704
|
+
const Y = Vs();
|
1705
|
+
if (Y)
|
1706
|
+
throw new Error(Y);
|
1707
|
+
({ bodyParts: ie, icaoWarnings: Ne } = await ot(k, me, (await st(C)).split(",")[1])), window.dispatchEvent(new CustomEvent(
|
1708
|
+
"face-unconformities-validated",
|
1709
|
+
{
|
1710
|
+
detail: {
|
1711
|
+
bodyParts: ie,
|
1712
|
+
icaoWarnings: Ne,
|
1713
|
+
status: O
|
1714
|
+
}
|
1715
|
+
}
|
1716
|
+
));
|
1717
|
+
} catch (Y) {
|
1718
|
+
console.error(Y);
|
1719
|
+
let ve = Ce.UNKNOWN, Pe = [], _i = [];
|
1720
|
+
Y instanceof Ut && Y.response?.status === 400 ? Y.response.data && Array.isArray(Y.response.data.bodyParts) ? (Pe = Y.response.data.bodyParts, _i = Y.response.data.icaoWarnings, hi = Y.response.data.invalidLivenessCounter, mi = Y.response.data.invalidLivenessLimit, ve = Pe.find((ks) => ks.livenessResult.error)?.livenessResult.error_code, g($, O = z.LIVENESS_DETECTION_FAILURE, O), t(20, x = Ce[ve]), console.error("Liveness error:", ve)) : g($, O = z.TEMPLATE_EXTRACTION_ERROR, O) : Y instanceof Error && js.includes(Y.message) ? (g($, O = z.UNKNOWN_LIVENESS_ERROR, O), ve = Y.message, t(20, x = Ce[ve]), Pe = ui(), Pe[0].livenessResult = {
|
1721
|
+
error: x,
|
1722
|
+
error_code: ve
|
1723
|
+
}) : me && Xe.fire({
|
1724
|
+
icon: "error",
|
1725
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1726
|
+
}), g(we, Z.isLoading = !1, Z), window.dispatchEvent(new CustomEvent(
|
1727
|
+
"face-unconformities-validated",
|
1728
|
+
{
|
1729
|
+
detail: {
|
1730
|
+
bodyParts: Pe,
|
1731
|
+
errorCode: ve,
|
1732
|
+
translatedError: ye(x),
|
1733
|
+
status: O,
|
1734
|
+
icaoWarnings: _i,
|
1735
|
+
invalidLivenessCounter: hi,
|
1736
|
+
invalidLivenessLimit: mi
|
1737
|
+
}
|
1738
|
+
}
|
1739
|
+
));
|
1740
|
+
return;
|
1741
|
+
}
|
1742
|
+
if (O !== z.OK) {
|
1743
|
+
Ne && Me(Ne), g(we, Z.isLoading = !1, Z);
|
1744
|
+
return;
|
1745
|
+
}
|
1746
|
+
ie[0].livenessResult && ri(ie[0].livenessResult), ie.length !== 0 && ie[0].data && g(ce, A = ie[0].data, A), Me(Ne);
|
1747
|
+
return;
|
1748
|
+
}
|
1749
|
+
let U, G;
|
1750
|
+
try {
|
1751
|
+
G = await Ks(C), ri(G.data);
|
1752
|
+
} catch (ie) {
|
1753
|
+
g($, O = z.UNKNOWN_LIVENESS_ERROR, O), console.error(ie), ie instanceof Ut && ie.response?.status === 400 ? (U = ie.response.data.error_code, t(20, x = Ce[U]), console.error("Liveness error:", U), g($, O = z.LIVENESS_DETECTION_FAILURE, O)) : Xe.fire({
|
1754
|
+
icon: "error",
|
1755
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1756
|
+
});
|
1757
|
+
}
|
1758
|
+
if (O !== z.OK) {
|
1759
|
+
g(we, Z.isLoading = !1, Z), window.dispatchEvent(new CustomEvent(
|
1760
|
+
"face-unconformities-validated",
|
1761
|
+
{
|
1762
|
+
detail: {
|
1763
|
+
bodyParts: [
|
1764
|
+
{
|
1765
|
+
bodyPart: "FACE",
|
1766
|
+
data: k,
|
1767
|
+
livenessBlob: (await st(C)).split(",")[1],
|
1768
|
+
...G && { livenessResult: G }
|
1769
|
+
}
|
1770
|
+
],
|
1771
|
+
...U && { errorCode: U },
|
1772
|
+
...x && { translatedError: ye(x) },
|
1773
|
+
status: O
|
1774
|
+
}
|
1775
|
+
}
|
1776
|
+
));
|
1777
|
+
return;
|
1778
|
+
}
|
1779
|
+
let { bodyParts: Se, icaoWarnings: di } = await ot(k, me);
|
1780
|
+
window.dispatchEvent(new CustomEvent(
|
1781
|
+
"face-unconformities-validated",
|
1782
|
+
{
|
1783
|
+
detail: {
|
1784
|
+
bodyParts: Se,
|
1785
|
+
icaoWarnings: di,
|
1786
|
+
status: O,
|
1787
|
+
errorCode: U,
|
1788
|
+
...x && { translatedError: ye(x) }
|
1789
|
+
}
|
1790
|
+
}
|
1791
|
+
)), Se[0].data && g(ce, A = Se[0].data, A), Me(di);
|
1792
|
+
});
|
1793
|
+
}
|
1794
|
+
async function be(s) {
|
1795
|
+
if (!Qe) {
|
1796
|
+
g(q, l = M.CAMERA_ORIENTATION_PORTRAIT, l);
|
1797
|
+
return;
|
1798
|
+
}
|
1799
|
+
await ni(), K() ? Lt() : await Gi(te.videoWidth, te.videoHeight, s);
|
1800
|
+
}
|
1801
|
+
async function Lt() {
|
1802
|
+
if (K()) {
|
1803
|
+
if (await ni(), !h[0]?.deviceId) {
|
1804
|
+
try {
|
1805
|
+
await yi(640, 480);
|
1806
|
+
} catch (s) {
|
1807
|
+
const C = s, T = Re(s) && s.constraint ? s.constraint : "";
|
1808
|
+
console.error(C.message, T), Re(C) && "message" in C && C.message.includes("Requested device not found") && g(q, l = M.DEVICE_NOT_FOUND_ERROR, l);
|
1809
|
+
}
|
1810
|
+
await Vt(), g(_e, c = h[0].deviceId, c);
|
1811
|
+
}
|
1812
|
+
g(q, l = M.OK, l), J && "openCamera" in J && J.openCamera(), Le = !0, t(18, le = !1), t(17, Je = !0);
|
1813
|
+
}
|
1814
|
+
}
|
1815
|
+
async function Ge() {
|
1816
|
+
if (ge && !Xt)
|
1817
|
+
return Ue(S, Ge);
|
1818
|
+
if (S) {
|
1819
|
+
if (_t !== it.Face && !kt)
|
1820
|
+
return Ue(S, Ge);
|
1821
|
+
g(Ve, a = !0, a), g(et, Ie = !1, Ie), ge && (n || g(qe, n = !0, n)), Ue(S, Ge);
|
1822
|
+
}
|
1823
|
+
}
|
1824
|
+
async function li() {
|
1825
|
+
if (g($, O = z.OK, O), K()) {
|
1826
|
+
t(19, Fe = !0), J.takePhoto();
|
1827
|
+
return;
|
1828
|
+
}
|
1829
|
+
let s = null;
|
1830
|
+
try {
|
1831
|
+
if (ge) {
|
1832
|
+
const C = await $s(S, It);
|
1833
|
+
if (s = C.canvas, g(Oe, m = !0, m), !C.result) {
|
1834
|
+
const G = s.toDataURL("image/jpeg").split(",");
|
1835
|
+
throw g(ke, ae = G[0], ae), g(ce, A = G[1], A), new Error("FACE_NOT_FOUND");
|
1836
|
+
}
|
1837
|
+
const T = s.toDataURL("image/jpeg").split(",");
|
1838
|
+
g(ke, ae = T[0], ae), g(ce, A = T[1], A), g(Be, k = T[1], k);
|
1839
|
+
let W, U;
|
1840
|
+
if (!Ei(Ae))
|
1841
|
+
throw new Error("FACE_TOO_SMALL");
|
1842
|
+
({ bodyParts: W, icaoWarnings: U } = await ot(A, me)), window.dispatchEvent(new CustomEvent(
|
1843
|
+
"face-unconformities-validated",
|
1844
|
+
{
|
1845
|
+
detail: {
|
1846
|
+
bodyParts: W,
|
1847
|
+
icaoWarnings: U,
|
1848
|
+
status: O
|
1849
|
+
}
|
1850
|
+
}
|
1851
|
+
)), W.length !== 0 && W[0].data && g(ce, A = W[0].data, A), Me(U);
|
1852
|
+
} else {
|
1853
|
+
g(Oe, m = !0, m);
|
1854
|
+
const C = await Zi();
|
1855
|
+
g(ke, ae = C[0], ae), g(ce, A = C[1], A), g(Be, k = C[1], k);
|
1856
|
+
let { bodyParts: T, icaoWarnings: W } = await ot(A, me);
|
1857
|
+
window.dispatchEvent(new CustomEvent(
|
1858
|
+
"face-unconformities-validated",
|
1859
|
+
{
|
1860
|
+
detail: {
|
1861
|
+
bodyParts: T,
|
1862
|
+
icaoWarnings: W,
|
1863
|
+
status: O
|
1864
|
+
}
|
1865
|
+
}
|
1866
|
+
)), T.length !== 0 && T[0].data && g(ce, A = T[0].data, A), Me(W);
|
1867
|
+
}
|
1868
|
+
} catch (C) {
|
1869
|
+
console.error(C);
|
1870
|
+
let T = Ce.UNKNOWN, W = [], U = [];
|
1871
|
+
if (C instanceof Ut && C.response?.status === 400)
|
1872
|
+
if (C.response.data && Array.isArray(C.response.data.bodyParts)) {
|
1873
|
+
W = C.response.data.bodyParts, U = C.response.data.icaoWarnings;
|
1874
|
+
const G = W.find((Se) => Se.livenessResult.error);
|
1875
|
+
T = G?.livenessResult.error_code, g($, O = z.LIVENESS_DETECTION_FAILURE, O), G?.livenessResult.error_code || g($, O = z.UNKNOWN_LIVENESS_ERROR, O), t(20, x = Ce[T]), console.error("Liveness error:", T);
|
1876
|
+
} else
|
1877
|
+
g($, O = z.TEMPLATE_EXTRACTION_ERROR, O);
|
1878
|
+
else
|
1879
|
+
C instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(C.message) ? (g($, O = z.LIVENESS_DETECTION_FAILURE, O), T = C.message, t(20, x = Ce[T]), W = ui()) : (g($, O = z.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE, O), me && Xe.fire({
|
1880
|
+
icon: "error",
|
1881
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1882
|
+
}));
|
1883
|
+
g(we, Z.isLoading = !1, Z), window.dispatchEvent(new CustomEvent(
|
1884
|
+
"face-unconformities-validated",
|
1885
|
+
{
|
1886
|
+
detail: {
|
1887
|
+
bodyParts: W,
|
1888
|
+
errorCode: T,
|
1889
|
+
translatedError: ye(x),
|
1890
|
+
status: O,
|
1891
|
+
icaoWarnings: U
|
1892
|
+
}
|
1893
|
+
}
|
1894
|
+
));
|
1895
|
+
}
|
1896
|
+
}
|
1897
|
+
function Ye() {
|
1898
|
+
const s = {
|
1899
|
+
bodyPart: "FACE",
|
1900
|
+
data: A,
|
1901
|
+
justification: L
|
1902
|
+
};
|
1903
|
+
g(Nt, j = !0, j), rt(tt) && st(rt(tt)).then((C) => {
|
1904
|
+
s.livenessBlob = C.split(",")[1];
|
1905
|
+
}), window.dispatchEvent(new CustomEvent("export-face", { detail: s }));
|
1906
|
+
}
|
1907
|
+
function Te() {
|
1908
|
+
window.dispatchEvent(new CustomEvent("face-scrapped")), ai(), le && Lt();
|
1909
|
+
}
|
1910
|
+
function ri(s) {
|
1911
|
+
let C = "", T = "success";
|
1912
|
+
s.isAlive ? C = `Vivacidade de face (${s.face_liveness.probability.toFixed(2)}) e de captura (${s.capture_liveness.probability}, ${s.capture_liveness.score.toFixed(2)}) verificados!` : s?.face_liveness?.probability && (T = "error", C = `Vivacidade de face (${s.face_liveness.probability.toFixed(2)}) e de captura (${s.capture_liveness.probability}, ${s.capture_liveness.score.toFixed(2)}) insuficientes!`), ne && Xe.fire({ icon: T, title: C });
|
1913
|
+
}
|
1914
|
+
async function Gi(s, C, T) {
|
1915
|
+
try {
|
1916
|
+
const { stream: W, deviceId: U } = await yi(Ee.width, Ee.height, f, T);
|
1917
|
+
g(gi, _ = W, _), g(_e, c = U || h[0].deviceId, c);
|
1918
|
+
} catch (W) {
|
1919
|
+
const U = W, G = Re(W) && W.constraint ? W.constraint : "";
|
1920
|
+
console.error(U.message, G), Re(U) && "message" in U && U.message.toLowerCase().includes("permission") ? (console.error("User didn't give permission to use camera!"), g(q, l = M.CAMERA_DENIED_ERROR, l)) : Re(U) && "message" in U && U.message.toLowerCase().includes("not found") && !re() ? g(q, l = M.DEVICE_NOT_FOUND_ERROR, l) : G.includes("width") || G.includes("height") ? (console.error(`Camera does not meet the minimum supported requirements! (${G})`), g(q, l = M.CAMERA_UNSUPPORTED, l)) : (g(q, l = M.CAMERA_DENIED_ERROR, l), console.error("Unable to open camera!"));
|
1921
|
+
}
|
1922
|
+
}
|
1923
|
+
async function Ze() {
|
1924
|
+
g(_e, c = "", c), await be();
|
1925
|
+
}
|
1926
|
+
function Yi() {
|
1927
|
+
navigator.mediaDevices.ondevicechange = async (s) => {
|
1928
|
+
s.type == "devicechange" && (await Vt(), l !== M.OK ? await Ze() : (!K() && !_.active || K() && !le) && (nt(J), g(q, l = M.DEVICE_NOT_FOUND_ERROR, l), t(18, le = !0)));
|
1929
|
+
};
|
1930
|
+
}
|
1931
|
+
async function ci() {
|
1932
|
+
g(xe, r = !1, r);
|
1933
|
+
const s = (/* @__PURE__ */ new Date()).getTime();
|
1934
|
+
if (s - Ct > 5e3) {
|
1935
|
+
Ct = s;
|
1936
|
+
try {
|
1937
|
+
if (S.width === 0 || S.height === 0)
|
1938
|
+
return;
|
1939
|
+
const T = await eo(S);
|
1940
|
+
if (T < 50) {
|
1941
|
+
g(pe, F = "faceCollector.illuminationTooLow", F);
|
1942
|
+
return;
|
1943
|
+
}
|
1944
|
+
if (T > 180) {
|
1945
|
+
g(pe, F = "faceCollector.illuminationTooHigh", F);
|
1946
|
+
return;
|
1947
|
+
}
|
1948
|
+
} catch (T) {
|
1949
|
+
console.warn("An error occurred while getting the video lighting level: ", T);
|
1950
|
+
}
|
1951
|
+
try {
|
1952
|
+
if (await to(S) < 4.5) {
|
1953
|
+
g(pe, F = "faceCollector.lowSharpness", F);
|
1954
|
+
return;
|
1955
|
+
}
|
1956
|
+
} catch (T) {
|
1957
|
+
console.warn("An error occurred while getting the video sharpness level: ", T);
|
1958
|
+
}
|
1959
|
+
g(pe, F = "faceCollector.faceWasNotFound", F);
|
1960
|
+
} else
|
1961
|
+
pt || (pt = !0, setTimeout(
|
1962
|
+
() => {
|
1963
|
+
let T = [
|
1964
|
+
"faceCollector.faceWasNotFound",
|
1965
|
+
"faceCollector.illuminationTooLow",
|
1966
|
+
"faceCollector.lowSharpness",
|
1967
|
+
"faceCollector.illuminationTooHigh"
|
1968
|
+
];
|
1969
|
+
pt = !1, t(16, wt = !1), F && !T.includes(F) && g(pe, F = "", F);
|
1970
|
+
},
|
1971
|
+
1500
|
1972
|
+
));
|
1973
|
+
}
|
1974
|
+
function ui() {
|
1975
|
+
return [
|
1976
|
+
{
|
1977
|
+
bodyPart: "FACE",
|
1978
|
+
data: k,
|
1979
|
+
format: "jpg",
|
1980
|
+
capturedEyeToEyeDist: E,
|
1981
|
+
minEyeToEyeDist: Ae
|
1982
|
+
}
|
1983
|
+
];
|
1984
|
+
}
|
1985
|
+
async function Zi() {
|
1986
|
+
const s = document.createElement("canvas"), C = s.getContext("2d");
|
1987
|
+
return s.width = S.width, s.height = S.height, C?.drawImage(S, 0, 0, s.width, s.height), s.toDataURL("image/jpeg").split(",");
|
1988
|
+
}
|
1989
|
+
const xi = Mt.subscribe((s) => {
|
1990
|
+
let C = "";
|
1991
|
+
if (s.isPersonCloseEnough ? s.isPersonTooclose ? C = "faceCollector.moveAwayCamera" : s.isPersonInFrame ? s.closedMouth || (C = "faceCollector.dontOpenMouth") : C = "faceCollector.stayInFrame" : C = "faceCollector.comeCloserCamera", r && zs(C), !m && v && r && !w && !De && s.isPersonInFrame && s.closedMouth && !(!s.isPersonCloseEnough || s.isPersonTooclose)) {
|
1992
|
+
t(15, De = !0), oi = (/* @__PURE__ */ new Date()).getTime() + Ho;
|
1993
|
+
const T = setInterval(
|
1994
|
+
async () => {
|
1995
|
+
if (!v || m || w || Fe || K() && le || !s.isPersonCloseEnough || s.isPersonTooclose || !s.closedMouth || !s.isPersonInFrame) {
|
1996
|
+
t(15, De = !1), setTimeout(
|
1997
|
+
() => {
|
1998
|
+
},
|
1999
|
+
1500
|
2000
|
+
), clearInterval(T);
|
2001
|
+
return;
|
2002
|
+
}
|
2003
|
+
const W = (/* @__PURE__ */ new Date()).getTime();
|
2004
|
+
Math.floor((oi - W) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(T), t(15, De = !1), li());
|
2005
|
+
},
|
2006
|
+
100
|
2007
|
+
);
|
2008
|
+
}
|
2009
|
+
}), $i = Oe.subscribe((s) => {
|
2010
|
+
he && (s ? (he.classList.remove("flex"), he.classList.add("hidden")) : (he.classList.add("flex"), he.classList.remove("hidden")));
|
2011
|
+
}), es = St.subscribe((s) => {
|
2012
|
+
S && s && (console.log("setting null in video srcObject"), t(12, S.srcObject = null, S), t(12, S.src = "", S), g(_e, c = null, c));
|
2013
|
+
});
|
2014
|
+
Wt.subscribe(async (s) => {
|
2015
|
+
s === it.Face && (await Vt(), K() && g(_e, c = h[0]?.deviceId, c));
|
2016
|
+
});
|
2017
|
+
const ts = _e.subscribe(async (s) => {
|
2018
|
+
if (!(!K() && !_ || !s || K() && le))
|
2019
|
+
try {
|
2020
|
+
if (K()) {
|
2021
|
+
await nt(J), await be();
|
2022
|
+
return;
|
2023
|
+
}
|
2024
|
+
t(12, S.srcObject = _, S), g(St, y = !1, y), Qe ? g(q, l = M.OK, l) : g(q, l = M.CAMERA_ORIENTATION_PORTRAIT, l), _.getTracks().forEach((C) => {
|
2025
|
+
C.readyState === "live" && console.log(`Camera ${C.label} opened successfully!`);
|
2026
|
+
}), g(q, l = M.OK, l), Hs(S);
|
2027
|
+
} catch (C) {
|
2028
|
+
const T = C;
|
2029
|
+
t(18, le = !0), Re(T) && "message" in T && T.message.includes("Requested device not found") && g(q, l = M.DEVICE_NOT_FOUND_ERROR, l);
|
2030
|
+
}
|
2031
|
+
}), is = Wt.subscribe(async (s) => {
|
2032
|
+
s === it.Face && K() && !Le && !m && Dt && await be();
|
2033
|
+
}), ss = qe.subscribe(async (s) => {
|
2034
|
+
s && fi();
|
2035
|
+
}), os = qs.subscribe(async (s) => {
|
2036
|
+
if (h[0]?.deviceId) {
|
2037
|
+
if (nt(), !re() || K()) {
|
2038
|
+
const T = (h.findIndex((U) => U.deviceId === c) + 1) % h.length, W = h[T].deviceId;
|
2039
|
+
K() ? g(_e, c = W, c) : await be(W);
|
2040
|
+
return;
|
2041
|
+
}
|
2042
|
+
s ? (g($e, f = Bt.REAR_CAMERA, f), await be()) : (g($e, f = Bt.FRONT_CAMERA, f), await be());
|
2043
|
+
}
|
2044
|
+
}), ns = Js.subscribe(async (s) => {
|
2045
|
+
!s.isSupported || !re() || u != "FACE" || (Qe = s.orientation.includes("portrait"), Qe ? S && !a ? await Ze() : a && g(q, l = M.OK, l) : g(q, l = M.CAMERA_ORIENTATION_PORTRAIT, l));
|
2046
|
+
}), as = Kt.subscribe((s) => {
|
2047
|
+
s && window.dispatchEvent(new CustomEvent("console-open-status", { detail: { isOpen: s } }));
|
2048
|
+
});
|
2049
|
+
async function fi() {
|
2050
|
+
let s;
|
2051
|
+
try {
|
2052
|
+
if (At >= zo) {
|
2053
|
+
At = 0;
|
2054
|
+
let C;
|
2055
|
+
if (C = co(S, Qt), s = await C.withFaceLandmarks(), ee.getContext("2d")?.clearRect(0, 0, ee.width, ee.height), s != null) {
|
2056
|
+
const T = uo(ee, S, !0);
|
2057
|
+
Qs(ee, S, T);
|
2058
|
+
const W = fo(s, T);
|
2059
|
+
Xs(W) ? (Gs(W, ee, Et), g(xe, r = !0, r), t(16, wt = !0), Ct = (/* @__PURE__ */ new Date()).getTime()) : ci();
|
2060
|
+
} else
|
2061
|
+
ci();
|
2062
|
+
} else
|
2063
|
+
At++;
|
2064
|
+
} catch {
|
2065
|
+
} finally {
|
2066
|
+
n && Ue(S, fi);
|
2067
|
+
}
|
2068
|
+
}
|
2069
|
+
Ft.subscribe(async (s) => {
|
2070
|
+
s && (Te(), g(Ft, o = !1, o));
|
2071
|
+
});
|
2072
|
+
const ls = Ve.subscribe((s) => {
|
2073
|
+
s && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
2074
|
+
}), rs = et.subscribe((s) => {
|
2075
|
+
s && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
|
2076
|
+
});
|
2077
|
+
Ys(() => {
|
2078
|
+
console.log("Destroying face collector"), nt(J), $i(), xi(), es(), ts(), is(), clearInterval(si), ss(), os(), ns(), as(), ls(), rs(), si = 0, ii.stopDetection();
|
2079
|
+
});
|
2080
|
+
function cs(s) {
|
2081
|
+
lt[s ? "unshift" : "push"](() => {
|
2082
|
+
J = s, t(1, J);
|
2083
|
+
});
|
2084
|
+
}
|
2085
|
+
function us(s) {
|
2086
|
+
lt[s ? "unshift" : "push"](() => {
|
2087
|
+
S = s, t(12, S);
|
2088
|
+
});
|
2089
|
+
}
|
2090
|
+
const fs = () => {
|
2091
|
+
K() || (t(12, S.width = te.videoWidth, S), t(12, S.height = te.videoHeight, S), t(13, ee.width = te.videoWidth, ee), t(13, ee.height = te.videoHeight, ee));
|
2092
|
+
};
|
2093
|
+
function ds(s) {
|
2094
|
+
lt[s ? "unshift" : "push"](() => {
|
2095
|
+
ee = s, t(13, ee);
|
2096
|
+
});
|
2097
|
+
}
|
2098
|
+
const hs = () => Ye(), ms = () => Te();
|
2099
|
+
function _s(s) {
|
2100
|
+
lt[s ? "unshift" : "push"](() => {
|
2101
|
+
he = s, t(14, he);
|
2102
|
+
});
|
2103
|
+
}
|
2104
|
+
const gs = () => Ye(), bs = () => Te();
|
2105
|
+
function vs() {
|
2106
|
+
L = this.value, Pt.set(L);
|
2107
|
+
}
|
2108
|
+
const ps = () => Ye(), ws = () => Te();
|
2109
|
+
function Cs() {
|
2110
|
+
L = this.value, Pt.set(L);
|
2111
|
+
}
|
2112
|
+
const Es = () => Te(), ys = async () => {
|
2113
|
+
await Ze();
|
2114
|
+
};
|
2115
|
+
return i.$$set = (s) => {
|
2116
|
+
"enableMinutiae" in s && t(42, Et = s.enableMinutiae), "videoDimensions" in s && t(43, yt = s.videoDimensions), "noTabs" in s && t(44, kt = s.noTabs), "weightsPath" in s && t(45, Tt = s.weightsPath), "evaluatePhoto" in s && t(2, me = s.evaluatePhoto), "showCaptureButton" in s && t(0, Ot = s.showCaptureButton), "showUnconformities" in s && t(3, Gt = s.showUnconformities), "showConfigButton" in s && t(4, Yt = s.showConfigButton), "showAutoCaptureButton" in s && t(5, Rt = s.showAutoCaptureButton), "showCameraButton" in s && t(6, Zt = s.showCameraButton), "showJustificationField" in s && t(7, xt = s.showJustificationField), "minEyeToEyeDist" in s && t(46, Ae = s.minEyeToEyeDist), "showWatermark" in s && t(8, $t = s.showWatermark), "videoOverlay" in s && t(9, ei = s.videoOverlay), "videoOverlayTransparency" in s && t(10, ti = s.videoOverlayTransparency), "faceDetectionSensitivity" in s && t(47, It = s.faceDetectionSensitivity), "widgetInstance" in s && t(1, J = s.widgetInstance);
|
2117
|
+
}, [
|
2118
|
+
Ot,
|
2119
|
+
J,
|
2120
|
+
me,
|
2121
|
+
Gt,
|
2122
|
+
Yt,
|
2123
|
+
Rt,
|
2124
|
+
Zt,
|
2125
|
+
xt,
|
2126
|
+
$t,
|
2127
|
+
ei,
|
2128
|
+
ti,
|
2129
|
+
Ge,
|
2130
|
+
S,
|
2131
|
+
ee,
|
2132
|
+
he,
|
2133
|
+
De,
|
2134
|
+
wt,
|
2135
|
+
Je,
|
2136
|
+
le,
|
2137
|
+
Fe,
|
2138
|
+
x,
|
2139
|
+
l,
|
2140
|
+
a,
|
2141
|
+
c,
|
2142
|
+
m,
|
2143
|
+
w,
|
2144
|
+
j,
|
2145
|
+
L,
|
2146
|
+
A,
|
2147
|
+
O,
|
2148
|
+
ye,
|
2149
|
+
Z,
|
2150
|
+
ae,
|
2151
|
+
te,
|
2152
|
+
qt,
|
2153
|
+
Jt,
|
2154
|
+
qe,
|
2155
|
+
ke,
|
2156
|
+
li,
|
2157
|
+
Ye,
|
2158
|
+
Te,
|
2159
|
+
Ze,
|
2160
|
+
Et,
|
2161
|
+
yt,
|
2162
|
+
kt,
|
2163
|
+
Tt,
|
2164
|
+
Ae,
|
2165
|
+
It,
|
2166
|
+
cs,
|
2167
|
+
us,
|
2168
|
+
fs,
|
2169
|
+
ds,
|
2170
|
+
hs,
|
2171
|
+
ms,
|
2172
|
+
_s,
|
2173
|
+
gs,
|
2174
|
+
bs,
|
2175
|
+
vs,
|
2176
|
+
ps,
|
2177
|
+
ws,
|
2178
|
+
Cs,
|
2179
|
+
Es,
|
2180
|
+
ys
|
2181
|
+
];
|
2182
|
+
}
|
2183
|
+
class Qo extends ut {
|
2184
|
+
constructor(e) {
|
2185
|
+
super(), ft(
|
2186
|
+
this,
|
2187
|
+
{
|
2188
|
+
target: this.shadowRoot,
|
2189
|
+
props: ht(this.attributes),
|
2190
|
+
customElement: !0
|
2191
|
+
},
|
2192
|
+
Jo,
|
2193
|
+
Ko,
|
2194
|
+
dt,
|
2195
|
+
{
|
2196
|
+
enableMinutiae: 42,
|
2197
|
+
videoDimensions: 43,
|
2198
|
+
noTabs: 44,
|
2199
|
+
weightsPath: 45,
|
2200
|
+
evaluatePhoto: 2,
|
2201
|
+
showCaptureButton: 0,
|
2202
|
+
showUnconformities: 3,
|
2203
|
+
showConfigButton: 4,
|
2204
|
+
showAutoCaptureButton: 5,
|
2205
|
+
showCameraButton: 6,
|
2206
|
+
showJustificationField: 7,
|
2207
|
+
minEyeToEyeDist: 46,
|
2208
|
+
showWatermark: 8,
|
2209
|
+
videoOverlay: 9,
|
2210
|
+
videoOverlayTransparency: 10,
|
2211
|
+
faceDetectionSensitivity: 47,
|
2212
|
+
widgetInstance: 1,
|
2213
|
+
play: 11
|
2214
|
+
},
|
2215
|
+
null,
|
2216
|
+
[-1, -1, -1, -1, -1]
|
2217
|
+
), e && (e.target && R(e.target, this, e.anchor), e.props && (this.$set(e.props), V()));
|
2218
|
+
}
|
2219
|
+
static get observedAttributes() {
|
2220
|
+
return [
|
2221
|
+
"enableMinutiae",
|
2222
|
+
"videoDimensions",
|
2223
|
+
"noTabs",
|
2224
|
+
"weightsPath",
|
2225
|
+
"evaluatePhoto",
|
2226
|
+
"showCaptureButton",
|
2227
|
+
"showUnconformities",
|
2228
|
+
"showConfigButton",
|
2229
|
+
"showAutoCaptureButton",
|
2230
|
+
"showCameraButton",
|
2231
|
+
"showJustificationField",
|
2232
|
+
"minEyeToEyeDist",
|
2233
|
+
"showWatermark",
|
2234
|
+
"videoOverlay",
|
2235
|
+
"videoOverlayTransparency",
|
2236
|
+
"faceDetectionSensitivity",
|
2237
|
+
"widgetInstance",
|
2238
|
+
"play"
|
2239
|
+
];
|
2240
|
+
}
|
2241
|
+
get enableMinutiae() {
|
2242
|
+
return this.$$.ctx[42];
|
2243
|
+
}
|
2244
|
+
set enableMinutiae(e) {
|
2245
|
+
this.$$set({ enableMinutiae: e }), V();
|
2246
|
+
}
|
2247
|
+
get videoDimensions() {
|
2248
|
+
return this.$$.ctx[43];
|
2249
|
+
}
|
2250
|
+
set videoDimensions(e) {
|
2251
|
+
this.$$set({ videoDimensions: e }), V();
|
2252
|
+
}
|
2253
|
+
get noTabs() {
|
2254
|
+
return this.$$.ctx[44];
|
2255
|
+
}
|
2256
|
+
set noTabs(e) {
|
2257
|
+
this.$$set({ noTabs: e }), V();
|
2258
|
+
}
|
2259
|
+
get weightsPath() {
|
2260
|
+
return this.$$.ctx[45];
|
2261
|
+
}
|
2262
|
+
set weightsPath(e) {
|
2263
|
+
this.$$set({ weightsPath: e }), V();
|
2264
|
+
}
|
2265
|
+
get evaluatePhoto() {
|
2266
|
+
return this.$$.ctx[2];
|
2267
|
+
}
|
2268
|
+
set evaluatePhoto(e) {
|
2269
|
+
this.$$set({ evaluatePhoto: e }), V();
|
2270
|
+
}
|
2271
|
+
get showCaptureButton() {
|
2272
|
+
return this.$$.ctx[0];
|
2273
|
+
}
|
2274
|
+
set showCaptureButton(e) {
|
2275
|
+
this.$$set({ showCaptureButton: e }), V();
|
2276
|
+
}
|
2277
|
+
get showUnconformities() {
|
2278
|
+
return this.$$.ctx[3];
|
2279
|
+
}
|
2280
|
+
set showUnconformities(e) {
|
2281
|
+
this.$$set({ showUnconformities: e }), V();
|
2282
|
+
}
|
2283
|
+
get showConfigButton() {
|
2284
|
+
return this.$$.ctx[4];
|
2285
|
+
}
|
2286
|
+
set showConfigButton(e) {
|
2287
|
+
this.$$set({ showConfigButton: e }), V();
|
2288
|
+
}
|
2289
|
+
get showAutoCaptureButton() {
|
2290
|
+
return this.$$.ctx[5];
|
2291
|
+
}
|
2292
|
+
set showAutoCaptureButton(e) {
|
2293
|
+
this.$$set({ showAutoCaptureButton: e }), V();
|
2294
|
+
}
|
2295
|
+
get showCameraButton() {
|
2296
|
+
return this.$$.ctx[6];
|
2297
|
+
}
|
2298
|
+
set showCameraButton(e) {
|
2299
|
+
this.$$set({ showCameraButton: e }), V();
|
2300
|
+
}
|
2301
|
+
get showJustificationField() {
|
2302
|
+
return this.$$.ctx[7];
|
2303
|
+
}
|
2304
|
+
set showJustificationField(e) {
|
2305
|
+
this.$$set({ showJustificationField: e }), V();
|
2306
|
+
}
|
2307
|
+
get minEyeToEyeDist() {
|
2308
|
+
return this.$$.ctx[46];
|
2309
|
+
}
|
2310
|
+
set minEyeToEyeDist(e) {
|
2311
|
+
this.$$set({ minEyeToEyeDist: e }), V();
|
2312
|
+
}
|
2313
|
+
get showWatermark() {
|
2314
|
+
return this.$$.ctx[8];
|
2315
|
+
}
|
2316
|
+
set showWatermark(e) {
|
2317
|
+
this.$$set({ showWatermark: e }), V();
|
2318
|
+
}
|
2319
|
+
get videoOverlay() {
|
2320
|
+
return this.$$.ctx[9];
|
2321
|
+
}
|
2322
|
+
set videoOverlay(e) {
|
2323
|
+
this.$$set({ videoOverlay: e }), V();
|
2324
|
+
}
|
2325
|
+
get videoOverlayTransparency() {
|
2326
|
+
return this.$$.ctx[10];
|
2327
|
+
}
|
2328
|
+
set videoOverlayTransparency(e) {
|
2329
|
+
this.$$set({ videoOverlayTransparency: e }), V();
|
2330
|
+
}
|
2331
|
+
get faceDetectionSensitivity() {
|
2332
|
+
return this.$$.ctx[47];
|
2333
|
+
}
|
2334
|
+
set faceDetectionSensitivity(e) {
|
2335
|
+
this.$$set({ faceDetectionSensitivity: e }), V();
|
2336
|
+
}
|
2337
|
+
get widgetInstance() {
|
2338
|
+
return this.$$.ctx[1];
|
2339
|
+
}
|
2340
|
+
set widgetInstance(e) {
|
2341
|
+
this.$$set({ widgetInstance: e }), V();
|
2342
|
+
}
|
2343
|
+
get play() {
|
2344
|
+
return this.$$.ctx[11];
|
2345
|
+
}
|
2346
|
+
}
|
2347
|
+
customElements.define("face-collector", Qo);
|
2348
|
+
export {
|
2349
|
+
Qo as default
|
2350
|
+
};
|