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