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