bry-biometric-collector 2.0.4 → 2.0.6

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.
@@ -0,0 +1,1659 @@
1
+ import { S as Ni, r as Ai, t as $t, w as Wi, x as R, y as Fe, z as X, C as Mi, B as m, D as S, E as Rt, G as D, H as le, I as a, J as r, K as Pt, L as B, M as ei, N as Be, O as ti, P as Ue, Q as I, R as It, T as F, U as gt, V as Ge, W as pt, _ as Nt, X as Ye, Y as Bi, $ as Ui, Z as Hi, a0 as Ze, a1 as tt, a2 as Re, a3 as vt, a4 as wt, a5 as Me, a6 as Ki, a7 as ji, a8 as ot, a9 as Ct, aa as Vi, ab as at, ac as At, ad as Wt, ae as qi, af as kt, ag as Mt, ah as Bt, ai as zi, aj as Qi, ak as Xi, al as Ji, am as Gi, an as _, ao as Ut, ap as Ht, aq as Yi, ar as Kt, f as nt, as as Zi, at as rt, au as x, av as ct, aw as ut, A as jt, ax as Et, ay as dt, az as xi, aA as xe, aB as $i, aC as el, aD as ge, aE as mt, aF as ft, aG as ii, aH as Vt, l as Lt, aI as tl, aJ as il, aK as Pe, aL as yt, aM as pe, aN as ll, aO as sl, aP as qt, aQ as ht, aR as ol, aS as al } from "./main_baf553c3_2.0.6.js";
2
+ import { C as ue, c as Ie, a as nl } from "./CameraStatus_449f511b_2.0.6.js";
3
+ function zt(l, e, t) {
4
+ const s = l.slice();
5
+ return s[104] = e[t], s;
6
+ }
7
+ function rl(l) {
8
+ let e;
9
+ return {
10
+ c() {
11
+ e = m("idlive-face-capture"), e.hidden = !0, yt(e, "mask_hidden", ""), yt(e, "auto_capture_disabled", ""), yt(e, "auto_close_disabled", "");
12
+ },
13
+ m(t, s) {
14
+ R(t, e, s), l[48](e);
15
+ },
16
+ p: le,
17
+ d(t) {
18
+ t && I(e), l[48](null);
19
+ }
20
+ };
21
+ }
22
+ function Qt(l) {
23
+ let e, t, s;
24
+ return {
25
+ c() {
26
+ e = m("video"), a(e, "id", "bry-cc-camera-video-tag"), a(e, "class", "absolute -z-10"), e.playsInline = !0, e.muted = !0, e.autoplay = !0;
27
+ },
28
+ m(o, c) {
29
+ R(o, e, c), l[49](e), t || (s = [
30
+ ge(
31
+ e,
32
+ "canplay",
33
+ /*canplay_handler*/
34
+ l[50]
35
+ ),
36
+ ge(
37
+ e,
38
+ "play",
39
+ /*play*/
40
+ l[3],
41
+ { once: !0 }
42
+ )
43
+ ], t = !0);
44
+ },
45
+ p: le,
46
+ d(o) {
47
+ o && I(e), l[49](null), t = !1, mt(s);
48
+ }
49
+ };
50
+ }
51
+ function cl(l) {
52
+ let e, t;
53
+ return {
54
+ c() {
55
+ e = pe("svg"), t = pe("path"), a(t, "fill", "currentColor"), a(t, "d", "M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7l233.4-233.3c12.5-12.5 32.8-12.5 45.3 0z"), a(e, "class", "mt-[1px] ml-[.25em] overflow-visible"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "width", "1em"), a(e, "height", "1em"), a(e, "viewBox", "0 0 512 512");
56
+ },
57
+ m(s, o) {
58
+ R(s, e, o), r(e, t);
59
+ },
60
+ d(s) {
61
+ s && I(e);
62
+ }
63
+ };
64
+ }
65
+ function ul(l) {
66
+ let e, t;
67
+ return {
68
+ c() {
69
+ e = pe("svg"), t = pe("path"), a(t, "fill", "currentColor"), a(t, "d", "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7L54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256L9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256l105.3-105.4z"), a(e, "class", "mt-[2px] ml-[.25em] overflow-visible"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "width", "0.63em"), a(e, "height", "1em"), a(e, "viewBox", "0 0 320 512");
70
+ },
71
+ m(s, o) {
72
+ R(s, e, o), r(e, t);
73
+ },
74
+ d(s) {
75
+ s && I(e);
76
+ }
77
+ };
78
+ }
79
+ function dl(l) {
80
+ let e, t;
81
+ return {
82
+ c() {
83
+ e = pe("svg"), t = pe("path"), a(t, "fill", "currentColor"), a(t, "d", "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7L54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256L9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256l105.3-105.4z"), a(e, "class", "mt-[2px] ml-[.25em] overflow-visible"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "width", "0.63em"), a(e, "height", "1em"), a(e, "viewBox", "0 0 320 512");
84
+ },
85
+ m(s, o) {
86
+ R(s, e, o), r(e, t);
87
+ },
88
+ d(s) {
89
+ s && I(e);
90
+ }
91
+ };
92
+ }
93
+ function fl(l) {
94
+ let e, t;
95
+ return {
96
+ c() {
97
+ e = pe("svg"), t = pe("path"), a(t, "fill", "currentColor"), a(t, "d", "M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7l233.4-233.3c12.5-12.5 32.8-12.5 45.3 0z"), a(e, "class", "mt-[1px] ml-[.25em] overflow-visible"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "width", "1em"), a(e, "height", "1em"), a(e, "viewBox", "0 0 512 512");
98
+ },
99
+ m(s, o) {
100
+ R(s, e, o), r(e, t);
101
+ },
102
+ d(s) {
103
+ s && I(e);
104
+ }
105
+ };
106
+ }
107
+ function hl(l) {
108
+ let e = (
109
+ /*$_*/
110
+ l[23]("faceCollector.framing") + ""
111
+ ), t;
112
+ return {
113
+ c() {
114
+ t = D(e);
115
+ },
116
+ m(s, o) {
117
+ R(s, t, o);
118
+ },
119
+ p(s, o) {
120
+ o[0] & /*$_*/
121
+ 8388608 && e !== (e = /*$_*/
122
+ s[23]("faceCollector.framing") + "") && B(t, e);
123
+ },
124
+ d(s) {
125
+ s && I(t);
126
+ }
127
+ };
128
+ }
129
+ function ml(l) {
130
+ let e;
131
+ return {
132
+ c() {
133
+ e = D("Framing");
134
+ },
135
+ m(t, s) {
136
+ R(t, e, s);
137
+ },
138
+ p: le,
139
+ d(t) {
140
+ t && I(e);
141
+ }
142
+ };
143
+ }
144
+ function bl(l) {
145
+ let e, t;
146
+ return {
147
+ c() {
148
+ e = pe("svg"), t = pe("path"), a(t, "fill", "currentColor"), a(t, "d", "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7L54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256L9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256l105.3-105.4z"), a(e, "class", "mt-[2px] ml-[.25em] overflow-visible"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "width", "0.63em"), a(e, "height", "1em"), a(e, "viewBox", "0 0 320 512");
149
+ },
150
+ m(s, o) {
151
+ R(s, e, o), r(e, t);
152
+ },
153
+ d(s) {
154
+ s && I(e);
155
+ }
156
+ };
157
+ }
158
+ function _l(l) {
159
+ let e, t;
160
+ return {
161
+ c() {
162
+ e = pe("svg"), t = pe("path"), a(t, "fill", "currentColor"), a(t, "d", "M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7l233.4-233.3c12.5-12.5 32.8-12.5 45.3 0z"), a(e, "class", "mt-[1px] ml-[.25em] overflow-visible"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "width", "1em"), a(e, "height", "1em"), a(e, "viewBox", "0 0 512 512");
163
+ },
164
+ m(s, o) {
165
+ R(s, e, o), r(e, t);
166
+ },
167
+ d(s) {
168
+ s && I(e);
169
+ }
170
+ };
171
+ }
172
+ function Xt(l) {
173
+ let e, t, s, o, c;
174
+ function d(n, p) {
175
+ return (
176
+ /*$isLoading*/
177
+ n[34] ? pl : gl
178
+ );
179
+ }
180
+ let f = d(l), u = f(l);
181
+ return {
182
+ c() {
183
+ e = m("slot"), t = m("div"), s = m("img"), c = S(), u.c(), ft(s.src, o = ii) || a(s, "src", o), a(s, "alt", "loading gif"), a(s, "class", "m-auto h-[10em] lg:h-[12em]"), a(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), a(e, "name", "obtaining-photo-gif"), a(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
184
+ },
185
+ m(n, p) {
186
+ R(n, e, p), r(e, t), r(t, s), r(t, c), u.m(t, null);
187
+ },
188
+ p(n, p) {
189
+ f === (f = d(n)) && u ? u.p(n, p) : (u.d(1), u = f(n), u && (u.c(), u.m(t, null)));
190
+ },
191
+ d(n) {
192
+ n && I(e), u.d();
193
+ }
194
+ };
195
+ }
196
+ function gl(l) {
197
+ let e, t = (
198
+ /*$_*/
199
+ l[23]("faceCollector.obtainingPicture") + ""
200
+ ), s;
201
+ return {
202
+ c() {
203
+ e = m("span"), s = D(t), a(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
204
+ },
205
+ m(o, c) {
206
+ R(o, e, c), r(e, s);
207
+ },
208
+ p(o, c) {
209
+ c[0] & /*$_*/
210
+ 8388608 && t !== (t = /*$_*/
211
+ o[23]("faceCollector.obtainingPicture") + "") && B(s, t);
212
+ },
213
+ d(o) {
214
+ o && I(e);
215
+ }
216
+ };
217
+ }
218
+ function pl(l) {
219
+ let e;
220
+ return {
221
+ c() {
222
+ e = m("span"), e.textContent = "Obtaining photo...", a(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
223
+ },
224
+ m(t, s) {
225
+ R(t, e, s);
226
+ },
227
+ p: le,
228
+ d(t) {
229
+ t && I(e);
230
+ }
231
+ };
232
+ }
233
+ function Jt(l) {
234
+ let e, t, s, o, c;
235
+ function d(n, p) {
236
+ return (
237
+ /*$isLoading*/
238
+ n[34] ? wl : vl
239
+ );
240
+ }
241
+ let f = d(l), u = f(l);
242
+ return {
243
+ c() {
244
+ e = m("slot"), t = m("div"), s = m("img"), c = S(), u.c(), ft(s.src, o = ii) || a(s, "src", o), a(s, "alt", "loading gif"), a(s, "class", "m-auto h-[10em] lg:h-[12em]"), a(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), a(e, "name", "loading-camera-gif"), a(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
245
+ },
246
+ m(n, p) {
247
+ R(n, e, p), r(e, t), r(t, s), r(t, c), u.m(t, null);
248
+ },
249
+ p(n, p) {
250
+ f === (f = d(n)) && u ? u.p(n, p) : (u.d(1), u = f(n), u && (u.c(), u.m(t, null)));
251
+ },
252
+ d(n) {
253
+ n && I(e), u.d();
254
+ }
255
+ };
256
+ }
257
+ function vl(l) {
258
+ let e, t = (
259
+ /*$_*/
260
+ l[23]("faceCollector.initiatingCamera") + ""
261
+ ), s;
262
+ return {
263
+ c() {
264
+ e = m("span"), s = D(t), a(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
265
+ },
266
+ m(o, c) {
267
+ R(o, e, c), r(e, s);
268
+ },
269
+ p(o, c) {
270
+ c[0] & /*$_*/
271
+ 8388608 && t !== (t = /*$_*/
272
+ o[23]("faceCollector.initiatingCamera") + "") && B(s, t);
273
+ },
274
+ d(o) {
275
+ o && I(e);
276
+ }
277
+ };
278
+ }
279
+ function wl(l) {
280
+ let e;
281
+ return {
282
+ c() {
283
+ e = m("span"), e.textContent = "Loading camera...", a(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
284
+ },
285
+ m(t, s) {
286
+ R(t, e, s);
287
+ },
288
+ p: le,
289
+ d(t) {
290
+ t && I(e);
291
+ }
292
+ };
293
+ }
294
+ function Cl(l) {
295
+ let e, t, s = (
296
+ /*$_*/
297
+ l[23]("faceCollector.finish") + ""
298
+ ), o, c, d, f, u = (
299
+ /*$_*/
300
+ l[23]("faceCollector.retakePhoto") + ""
301
+ ), n, p, k;
302
+ return {
303
+ c() {
304
+ e = m("div"), t = m("button"), o = D(s), d = S(), f = m("button"), n = D(u), t.disabled = c = /*$justification*/
305
+ l[27].length === 0, a(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), a(f, "id", "bry-cc-retake-button"), a(f, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), a(e, "class", "ce-dui-btn-group flex");
306
+ },
307
+ m(O, h) {
308
+ R(O, e, h), r(e, t), r(t, o), r(e, d), r(e, f), r(f, n), p || (k = [
309
+ ge(
310
+ t,
311
+ "click",
312
+ /*click_handler_1*/
313
+ l[59]
314
+ ),
315
+ ge(
316
+ f,
317
+ "click",
318
+ /*click_handler_2*/
319
+ l[60]
320
+ )
321
+ ], p = !0);
322
+ },
323
+ p(O, h) {
324
+ h[0] & /*$_*/
325
+ 8388608 && s !== (s = /*$_*/
326
+ O[23]("faceCollector.finish") + "") && B(o, s), h[0] & /*$justification*/
327
+ 134217728 && c !== (c = /*$justification*/
328
+ O[27].length === 0) && (t.disabled = c), h[0] & /*$_*/
329
+ 8388608 && u !== (u = /*$_*/
330
+ O[23]("faceCollector.retakePhoto") + "") && B(n, u);
331
+ },
332
+ d(O) {
333
+ O && I(e), p = !1, mt(k);
334
+ }
335
+ };
336
+ }
337
+ function kl(l) {
338
+ let e, t, s, o, c;
339
+ function d(n, p) {
340
+ return (
341
+ /*$isLoading*/
342
+ n[34] ? yl : El
343
+ );
344
+ }
345
+ let f = d(l), u = f(l);
346
+ return {
347
+ c() {
348
+ e = m("button"), u.c(), a(e, "id", "bry-cc-capture-btn"), e.disabled = t = !/*$faceFound*/
349
+ l[32] && /*$enableFaceApi*/
350
+ l[30] || !/*$ready*/
351
+ l[31] && !/*$enableFaceApi*/
352
+ l[30], e.hidden = s = !/*showCaptureButton*/
353
+ l[1], a(e, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-primary text-xl");
354
+ },
355
+ m(n, p) {
356
+ R(n, e, p), u.m(e, null), o || (c = ge(
357
+ e,
358
+ "click",
359
+ /*click_handler*/
360
+ l[58]
361
+ ), o = !0);
362
+ },
363
+ p(n, p) {
364
+ f === (f = d(n)) && u ? u.p(n, p) : (u.d(1), u = f(n), u && (u.c(), u.m(e, null))), p[0] & /*$enableFaceApi*/
365
+ 1073741824 | p[1] & /*$faceFound, $ready*/
366
+ 3 && t !== (t = !/*$faceFound*/
367
+ n[32] && /*$enableFaceApi*/
368
+ n[30] || !/*$ready*/
369
+ n[31] && !/*$enableFaceApi*/
370
+ n[30]) && (e.disabled = t), p[0] & /*showCaptureButton*/
371
+ 2 && s !== (s = !/*showCaptureButton*/
372
+ n[1]) && (e.hidden = s);
373
+ },
374
+ d(n) {
375
+ n && I(e), u.d(), o = !1, c();
376
+ }
377
+ };
378
+ }
379
+ function El(l) {
380
+ let e = (
381
+ /*$_*/
382
+ l[23]("faceCollector.takePicture") + ""
383
+ ), t;
384
+ return {
385
+ c() {
386
+ t = D(e);
387
+ },
388
+ m(s, o) {
389
+ R(s, t, o);
390
+ },
391
+ p(s, o) {
392
+ o[0] & /*$_*/
393
+ 8388608 && e !== (e = /*$_*/
394
+ s[23]("faceCollector.takePicture") + "") && B(t, e);
395
+ },
396
+ d(s) {
397
+ s && I(t);
398
+ }
399
+ };
400
+ }
401
+ function yl(l) {
402
+ let e;
403
+ return {
404
+ c() {
405
+ e = D("Take picture");
406
+ },
407
+ m(t, s) {
408
+ R(t, e, s);
409
+ },
410
+ p: le,
411
+ d(t) {
412
+ t && I(e);
413
+ }
414
+ };
415
+ }
416
+ function Ll(l) {
417
+ let e, t;
418
+ return e = new nl({ props: { handler: (
419
+ /*func*/
420
+ l[69]
421
+ ) } }), {
422
+ c() {
423
+ Rt(e.$$.fragment);
424
+ },
425
+ m(s, o) {
426
+ Pt(e, s, o), t = !0;
427
+ },
428
+ p(s, o) {
429
+ const c = {};
430
+ o[0] & /*capturing*/
431
+ 32768 && (c.handler = /*func*/
432
+ s[69]), e.$set(c);
433
+ },
434
+ i(s) {
435
+ t || (Ue(e.$$.fragment, s), t = !0);
436
+ },
437
+ o(s) {
438
+ Be(e.$$.fragment, s), t = !1;
439
+ },
440
+ d(s) {
441
+ It(e, s);
442
+ }
443
+ };
444
+ }
445
+ function Rl(l) {
446
+ let e, t, s, o, c, d, f, u, n;
447
+ const p = [
448
+ Ol,
449
+ Sl,
450
+ Tl,
451
+ Il,
452
+ Pl
453
+ ], k = [];
454
+ function O(h, v) {
455
+ return (
456
+ /*$captured*/
457
+ h[20] ? (
458
+ /*$unconformitiesStore*/
459
+ h[24].isLoading ? 1 : (
460
+ /*$requestResult*/
461
+ h[25] !== x.OK ? 2 : (
462
+ /*$saved*/
463
+ h[26] ? 4 : 3
464
+ )
465
+ )
466
+ ) : 0
467
+ );
468
+ }
469
+ return d = O(l), f = k[d] = p[d](l), {
470
+ c() {
471
+ e = m("div"), t = m("img"), c = S(), f.c(), a(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), ft(t.src, s = /*$dataTypePrefix*/
472
+ l[29] + "," + /*$image*/
473
+ l[28]) || a(t, "src", s), t.hidden = o = !/*$captured*/
474
+ l[20] || !/*$showFaceWhileValidating*/
475
+ l[35] && /*$unconformitiesStore*/
476
+ l[24].isLoading, a(t, "alt", ""), a(e, "class", u = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
477
+ l[35] && /*$unconformitiesStore*/
478
+ l[24].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid m-[1em] overflow-hidden"));
479
+ },
480
+ m(h, v) {
481
+ R(h, e, v), r(e, t), r(e, c), k[d].m(e, null), n = !0;
482
+ },
483
+ p(h, v) {
484
+ (!n || v[0] & /*$dataTypePrefix, $image*/
485
+ 805306368 && !ft(t.src, s = /*$dataTypePrefix*/
486
+ h[29] + "," + /*$image*/
487
+ h[28])) && a(t, "src", s), (!n || v[0] & /*$captured, $unconformitiesStore*/
488
+ 17825792 | v[1] & /*$showFaceWhileValidating*/
489
+ 16 && o !== (o = !/*$captured*/
490
+ h[20] || !/*$showFaceWhileValidating*/
491
+ h[35] && /*$unconformitiesStore*/
492
+ h[24].isLoading)) && (t.hidden = o);
493
+ let g = d;
494
+ d = O(h), d === g ? k[d].p(h, v) : (ei(), Be(k[g], 1, 1, () => {
495
+ k[g] = null;
496
+ }), ti(), f = k[d], f ? f.p(h, v) : (f = k[d] = p[d](h), f.c()), Ue(f, 1), f.m(e, null)), (!n || v[0] & /*$unconformitiesStore*/
497
+ 16777216 | v[1] & /*$showFaceWhileValidating*/
498
+ 16 && u !== (u = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
499
+ h[35] && /*$unconformitiesStore*/
500
+ h[24].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid m-[1em] overflow-hidden"))) && a(e, "class", u);
501
+ },
502
+ i(h) {
503
+ n || (Ue(f), n = !0);
504
+ },
505
+ o(h) {
506
+ Be(f), n = !1;
507
+ },
508
+ d(h) {
509
+ h && I(e), k[d].d();
510
+ }
511
+ };
512
+ }
513
+ function Pl(l) {
514
+ let e, t, s = (
515
+ /*$_*/
516
+ l[23]("faceCollector.captured") + ""
517
+ ), o, c, d, f, u, n = (
518
+ /*$_*/
519
+ l[23]("faceCollector.retakePhoto") + ""
520
+ ), p, k, O = Lt(ll).faceStrategy !== sl.DISABLED, h, v, g, w = (
521
+ /*$unconformitiesStore*/
522
+ l[24].unconformities.length !== 0 && Gt(l)
523
+ ), P = O && Dl();
524
+ return {
525
+ c() {
526
+ e = m("div"), t = m("h1"), o = D(s), c = S(), w && w.c(), d = S(), f = m("div"), u = m("button"), p = D(n), k = S(), P && P.c(), a(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), a(u, "id", "bry-cc-retake-button"), a(u, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), a(f, "class", "flex flex-row"), qt(f, "ce-dui-btn-group", !/*$exportButtonDisabled*/
527
+ l[36]);
528
+ },
529
+ m(C, j) {
530
+ R(C, e, j), r(e, t), r(t, o), r(e, c), w && w.m(e, null), r(e, d), r(e, f), r(f, u), r(u, p), r(f, k), P && P.m(f, null), h = !0, v || (g = ge(
531
+ u,
532
+ "click",
533
+ /*click_handler_7*/
534
+ l[68]
535
+ ), v = !0);
536
+ },
537
+ p(C, j) {
538
+ (!h || j[0] & /*$_*/
539
+ 8388608) && s !== (s = /*$_*/
540
+ C[23]("faceCollector.captured") + "") && B(o, s), /*$unconformitiesStore*/
541
+ C[24].unconformities.length !== 0 ? w ? w.p(C, j) : (w = Gt(C), w.c(), w.m(e, d)) : w && (w.d(1), w = null), (!h || j[0] & /*$_*/
542
+ 8388608) && n !== (n = /*$_*/
543
+ C[23]("faceCollector.retakePhoto") + "") && B(p, n), (!h || j[1] & /*$exportButtonDisabled*/
544
+ 32) && qt(f, "ce-dui-btn-group", !/*$exportButtonDisabled*/
545
+ C[36]);
546
+ },
547
+ i(C) {
548
+ h || (Ue(P), h = !0);
549
+ },
550
+ o(C) {
551
+ Be(P), h = !1;
552
+ },
553
+ d(C) {
554
+ C && I(e), w && w.d(), P && P.d(), v = !1, g();
555
+ }
556
+ };
557
+ }
558
+ function Il(l) {
559
+ let e, t, s = (
560
+ /*$_*/
561
+ l[23]("faceCollector.unconformities") + ""
562
+ ), o, c, d, f, u, n, p, k = (
563
+ /*$_*/
564
+ l[23]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
565
+ ), O, h, v, g, w, P, C, j, de = (
566
+ /*$_*/
567
+ l[23]("faceCollector.thisInformationIsRequired") + ""
568
+ ), re, q, se, ke, Te, ae = (
569
+ /*$unconformitiesStore*/
570
+ l[24].unconformities
571
+ ), M = [];
572
+ for (let N = 0; N < ae.length; N += 1)
573
+ M[N] = Yt(zt(l, ae, N));
574
+ let V = (
575
+ /*$captured*/
576
+ l[20] && Zt(l)
577
+ );
578
+ return {
579
+ c() {
580
+ e = m("div"), t = m("h1"), o = D(s), c = S(), d = m("div");
581
+ for (let N = 0; N < M.length; N += 1)
582
+ M[N].c();
583
+ f = S(), u = m("div"), n = m("label"), p = m("span"), O = D(k), h = S(), v = m("textarea"), w = S(), P = m("label"), C = m("span"), j = D("("), re = D(de), q = D(")"), se = S(), V && V.c(), a(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), a(d, "class", "flex flex-wrap"), a(p, "class", "ce-dui-label-text text-base"), a(n, "class", "ce-dui-label"), a(n, "for", "justification"), a(v, "contenteditable", ""), a(v, "id", "justification"), a(v, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), a(v, "placeholder", g = /*$_*/
584
+ l[23]("faceCollector.yourJustification")), a(C, "class", "ce-dui-label-text-alt text-base"), a(P, "class", "ce-dui-label"), a(P, "for", "justification"), a(u, "class", "ce-dui-form-control mt-[2.5em]");
585
+ },
586
+ m(N, J) {
587
+ R(N, e, J), r(e, t), r(t, o), r(e, c), r(e, d);
588
+ for (let W = 0; W < M.length; W += 1)
589
+ M[W] && M[W].m(d, null);
590
+ r(e, f), r(e, u), r(u, n), r(n, p), r(p, O), r(u, h), r(u, v), ht(
591
+ v,
592
+ /*$justification*/
593
+ l[27]
594
+ ), r(u, w), r(u, P), r(P, C), r(C, j), r(C, re), r(C, q), r(e, se), V && V.m(e, null), ke || (Te = ge(
595
+ v,
596
+ "input",
597
+ /*textarea_input_handler*/
598
+ l[64]
599
+ ), ke = !0);
600
+ },
601
+ p(N, J) {
602
+ if (J[0] & /*$_*/
603
+ 8388608 && s !== (s = /*$_*/
604
+ N[23]("faceCollector.unconformities") + "") && B(o, s), J[0] & /*$unconformitiesStore*/
605
+ 16777216) {
606
+ ae = /*$unconformitiesStore*/
607
+ N[24].unconformities;
608
+ let W;
609
+ for (W = 0; W < ae.length; W += 1) {
610
+ const Ee = zt(N, ae, W);
611
+ M[W] ? M[W].p(Ee, J) : (M[W] = Yt(Ee), M[W].c(), M[W].m(d, null));
612
+ }
613
+ for (; W < M.length; W += 1)
614
+ M[W].d(1);
615
+ M.length = ae.length;
616
+ }
617
+ J[0] & /*$_*/
618
+ 8388608 && k !== (k = /*$_*/
619
+ N[23]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && B(O, k), J[0] & /*$_*/
620
+ 8388608 && g !== (g = /*$_*/
621
+ N[23]("faceCollector.yourJustification")) && a(v, "placeholder", g), J[0] & /*$justification*/
622
+ 134217728 && ht(
623
+ v,
624
+ /*$justification*/
625
+ N[27]
626
+ ), J[0] & /*$_*/
627
+ 8388608 && de !== (de = /*$_*/
628
+ N[23]("faceCollector.thisInformationIsRequired") + "") && B(re, de), /*$captured*/
629
+ N[20] ? V ? V.p(N, J) : (V = Zt(N), V.c(), V.m(e, null)) : V && (V.d(1), V = null);
630
+ },
631
+ i: le,
632
+ o: le,
633
+ d(N) {
634
+ N && I(e), ol(M, N), V && V.d(), ke = !1, Te();
635
+ }
636
+ };
637
+ }
638
+ function Tl(l) {
639
+ let e, t, s, o, c = (
640
+ /*$_*/
641
+ l[23]("faceCollector.finish") + ""
642
+ ), d, f, u, n = (
643
+ /*$_*/
644
+ l[23]("faceCollector.retakePhoto") + ""
645
+ ), p, k, O;
646
+ function h(w, P) {
647
+ return (
648
+ /*$requestResult*/
649
+ w[25] === x.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
650
+ w[25] === x.UNKNOWN_LIVENESS_ERROR ? Ml : (
651
+ /*$requestResult*/
652
+ w[25] === x.LOW_LIVENESS_SCORE ? Wl : (
653
+ /*$requestResult*/
654
+ w[25] === x.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
655
+ w[25] === x.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? Al : (
656
+ /*$requestResult*/
657
+ w[25] === x.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? Nl : Fl
658
+ )
659
+ )
660
+ )
661
+ );
662
+ }
663
+ let v = h(l), g = v(l);
664
+ return {
665
+ c() {
666
+ e = m("div"), g.c(), t = S(), s = m("div"), o = m("button"), d = D(c), f = S(), u = m("button"), p = D(n), o.disabled = !0, a(o, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), a(u, "id", "bry-cc-retake-button"), a(u, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), a(s, "class", "ce-dui-btn-group flex"), a(e, "class", "flex flex-col justify-between");
667
+ },
668
+ m(w, P) {
669
+ R(w, e, P), g.m(e, null), r(e, t), r(e, s), r(s, o), r(o, d), r(s, f), r(s, u), r(u, p), k || (O = [
670
+ ge(
671
+ o,
672
+ "click",
673
+ /*click_handler_3*/
674
+ l[62]
675
+ ),
676
+ ge(
677
+ u,
678
+ "click",
679
+ /*click_handler_4*/
680
+ l[63]
681
+ )
682
+ ], k = !0);
683
+ },
684
+ p(w, P) {
685
+ v === (v = h(w)) && g ? g.p(w, P) : (g.d(1), g = v(w), g && (g.c(), g.m(e, t))), P[0] & /*$_*/
686
+ 8388608 && c !== (c = /*$_*/
687
+ w[23]("faceCollector.finish") + "") && B(d, c), P[0] & /*$_*/
688
+ 8388608 && n !== (n = /*$_*/
689
+ w[23]("faceCollector.retakePhoto") + "") && B(p, n);
690
+ },
691
+ i: le,
692
+ o: le,
693
+ d(w) {
694
+ w && I(e), g.d(), k = !1, mt(O);
695
+ }
696
+ };
697
+ }
698
+ function Sl(l) {
699
+ let e, t, s = (
700
+ /*$_*/
701
+ l[23]("faceCollector.validating") + ""
702
+ ), o, c, d;
703
+ return {
704
+ c() {
705
+ e = m("div"), t = m("h1"), o = D(s), c = S(), d = m("div"), a(t, "class", "inline-block text-3xl font-bold pb-[1em] transition-opacity"), a(d, "class", "ml-6 inline-block dot-typing"), a(e, "class", "min-w-[200px]");
706
+ },
707
+ m(f, u) {
708
+ R(f, e, u), r(e, t), r(t, o), r(e, c), r(e, d);
709
+ },
710
+ p(f, u) {
711
+ u[0] & /*$_*/
712
+ 8388608 && s !== (s = /*$_*/
713
+ f[23]("faceCollector.validating") + "") && B(o, s);
714
+ },
715
+ i: le,
716
+ o: le,
717
+ d(f) {
718
+ f && I(e);
719
+ }
720
+ };
721
+ }
722
+ function Ol(l) {
723
+ let e;
724
+ return {
725
+ c() {
726
+ e = m("div"), a(e, "class", "");
727
+ },
728
+ m(t, s) {
729
+ R(t, e, s);
730
+ },
731
+ p: le,
732
+ i: le,
733
+ o: le,
734
+ d(t) {
735
+ t && I(e);
736
+ }
737
+ };
738
+ }
739
+ function Gt(l) {
740
+ let e, t, s = (
741
+ /*$_*/
742
+ l[23]("faceCollector.justification") + ""
743
+ ), o, c, d, f, u;
744
+ return {
745
+ c() {
746
+ e = m("label"), t = m("span"), o = D(s), c = S(), d = m("textarea"), a(t, "class", "ce-dui-label-text text-base"), a(e, "class", "ce-dui-label"), a(e, "for", "justification"), a(d, "contenteditable", ""), a(d, "id", "justification"), a(d, "class", "ce-dui-textarea ce-dui-textarea-bordered textarea-ghost h-[6em] w-full text-base");
747
+ },
748
+ m(n, p) {
749
+ R(n, e, p), r(e, t), r(t, o), R(n, c, p), R(n, d, p), ht(
750
+ d,
751
+ /*$justification*/
752
+ l[27]
753
+ ), f || (u = ge(
754
+ d,
755
+ "input",
756
+ /*textarea_input_handler_1*/
757
+ l[67]
758
+ ), f = !0);
759
+ },
760
+ p(n, p) {
761
+ p[0] & /*$_*/
762
+ 8388608 && s !== (s = /*$_*/
763
+ n[23]("faceCollector.justification") + "") && B(o, s), p[0] & /*$justification*/
764
+ 134217728 && ht(
765
+ d,
766
+ /*$justification*/
767
+ n[27]
768
+ );
769
+ },
770
+ d(n) {
771
+ n && I(e), n && I(c), n && I(d), f = !1, u();
772
+ }
773
+ };
774
+ }
775
+ function Dl(l) {
776
+ let e, t;
777
+ return e = new al({
778
+ props: { cssClass: "ce-dui-btn-block flex-shrink" }
779
+ }), {
780
+ c() {
781
+ Rt(e.$$.fragment);
782
+ },
783
+ m(s, o) {
784
+ Pt(e, s, o), t = !0;
785
+ },
786
+ i(s) {
787
+ t || (Ue(e.$$.fragment, s), t = !0);
788
+ },
789
+ o(s) {
790
+ Be(e.$$.fragment, s), t = !1;
791
+ },
792
+ d(s) {
793
+ It(e, s);
794
+ }
795
+ };
796
+ }
797
+ function Yt(l) {
798
+ let e, t = (
799
+ /*unconformity*/
800
+ l[104] + ""
801
+ ), s, o;
802
+ return {
803
+ c() {
804
+ e = m("div"), s = D(t), o = S(), a(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]");
805
+ },
806
+ m(c, d) {
807
+ R(c, e, d), r(e, s), r(e, o);
808
+ },
809
+ p(c, d) {
810
+ d[0] & /*$unconformitiesStore*/
811
+ 16777216 && t !== (t = /*unconformity*/
812
+ c[104] + "") && B(s, t);
813
+ },
814
+ d(c) {
815
+ c && I(e);
816
+ }
817
+ };
818
+ }
819
+ function Zt(l) {
820
+ let e, t, s = (
821
+ /*$_*/
822
+ l[23]("faceCollector.finish") + ""
823
+ ), o, c, d, f, u = (
824
+ /*$_*/
825
+ l[23]("faceCollector.retakePhoto") + ""
826
+ ), n, p, k;
827
+ return {
828
+ c() {
829
+ e = m("div"), t = m("button"), o = D(s), d = S(), f = m("button"), n = D(u), t.disabled = c = /*$justification*/
830
+ l[27].length === 0, a(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), a(f, "id", "bry-cc-retake-button"), a(f, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), a(e, "class", "ce-dui-btn-group flex");
831
+ },
832
+ m(O, h) {
833
+ R(O, e, h), r(e, t), r(t, o), r(e, d), r(e, f), r(f, n), p || (k = [
834
+ ge(
835
+ t,
836
+ "click",
837
+ /*click_handler_5*/
838
+ l[65]
839
+ ),
840
+ ge(
841
+ f,
842
+ "click",
843
+ /*click_handler_6*/
844
+ l[66]
845
+ )
846
+ ], p = !0);
847
+ },
848
+ p(O, h) {
849
+ h[0] & /*$_*/
850
+ 8388608 && s !== (s = /*$_*/
851
+ O[23]("faceCollector.finish") + "") && B(o, s), h[0] & /*$justification*/
852
+ 134217728 && c !== (c = /*$justification*/
853
+ O[27].length === 0) && (t.disabled = c), h[0] & /*$_*/
854
+ 8388608 && u !== (u = /*$_*/
855
+ O[23]("faceCollector.retakePhoto") + "") && B(n, u);
856
+ },
857
+ d(O) {
858
+ O && I(e), p = !1, mt(k);
859
+ }
860
+ };
861
+ }
862
+ function Fl(l) {
863
+ let e, t = (
864
+ /*$_*/
865
+ l[23]("faceCollector.everythingOk") + ""
866
+ ), s;
867
+ return {
868
+ c() {
869
+ e = m("h1"), s = D(t), a(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
870
+ },
871
+ m(o, c) {
872
+ R(o, e, c), r(e, s);
873
+ },
874
+ p(o, c) {
875
+ c[0] & /*$_*/
876
+ 8388608 && t !== (t = /*$_*/
877
+ o[23]("faceCollector.everythingOk") + "") && B(s, t);
878
+ },
879
+ d(o) {
880
+ o && I(e);
881
+ }
882
+ };
883
+ }
884
+ function Nl(l) {
885
+ let e, t = (
886
+ /*$_*/
887
+ l[23]("faceCollector.unableToCompleteRequest") + ""
888
+ ), s;
889
+ return {
890
+ c() {
891
+ e = m("h1"), s = D(t), a(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
892
+ },
893
+ m(o, c) {
894
+ R(o, e, c), r(e, s);
895
+ },
896
+ p(o, c) {
897
+ c[0] & /*$_*/
898
+ 8388608 && t !== (t = /*$_*/
899
+ o[23]("faceCollector.unableToCompleteRequest") + "") && B(s, t);
900
+ },
901
+ d(o) {
902
+ o && I(e);
903
+ }
904
+ };
905
+ }
906
+ function Al(l) {
907
+ let e, t = (
908
+ /*$_*/
909
+ l[23]("faceCollector.lowQualityCapture") + ""
910
+ ), s;
911
+ return {
912
+ c() {
913
+ e = m("h1"), s = D(t), a(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
914
+ },
915
+ m(o, c) {
916
+ R(o, e, c), r(e, s);
917
+ },
918
+ p(o, c) {
919
+ c[0] & /*$_*/
920
+ 8388608 && t !== (t = /*$_*/
921
+ o[23]("faceCollector.lowQualityCapture") + "") && B(s, t);
922
+ },
923
+ d(o) {
924
+ o && I(e);
925
+ }
926
+ };
927
+ }
928
+ function Wl(l) {
929
+ let e, t = (
930
+ /*$_*/
931
+ l[23]("liveness.error.error") + ""
932
+ ), s, o, c = (
933
+ /*$_*/
934
+ l[23]("faceCollector.unaliveCapture") + ""
935
+ ), d;
936
+ return {
937
+ c() {
938
+ e = m("h1"), s = D(t), o = D(": "), d = D(c), a(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
939
+ },
940
+ m(f, u) {
941
+ R(f, e, u), r(e, s), r(e, o), r(e, d);
942
+ },
943
+ p(f, u) {
944
+ u[0] & /*$_*/
945
+ 8388608 && t !== (t = /*$_*/
946
+ f[23]("liveness.error.error") + "") && B(s, t), u[0] & /*$_*/
947
+ 8388608 && c !== (c = /*$_*/
948
+ f[23]("faceCollector.unaliveCapture") + "") && B(d, c);
949
+ },
950
+ d(f) {
951
+ f && I(e);
952
+ }
953
+ };
954
+ }
955
+ function Ml(l) {
956
+ let e, t = (
957
+ /*$_*/
958
+ l[23]("liveness.error.error") + ""
959
+ ), s, o, c = (
960
+ /*$_*/
961
+ l[23](
962
+ /*livenessError*/
963
+ l[19]
964
+ ) + ""
965
+ ), d, f;
966
+ return {
967
+ c() {
968
+ e = m("h1"), s = D(t), o = D(": "), d = D(c), f = D("."), a(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
969
+ },
970
+ m(u, n) {
971
+ R(u, e, n), r(e, s), r(e, o), r(e, d), r(e, f);
972
+ },
973
+ p(u, n) {
974
+ n[0] & /*$_*/
975
+ 8388608 && t !== (t = /*$_*/
976
+ u[23]("liveness.error.error") + "") && B(s, t), n[0] & /*$_, livenessError*/
977
+ 8912896 && c !== (c = /*$_*/
978
+ u[23](
979
+ /*livenessError*/
980
+ u[19]
981
+ ) + "") && B(d, c);
982
+ },
983
+ d(u) {
984
+ u && I(e);
985
+ }
986
+ };
987
+ }
988
+ function Bl(l) {
989
+ let e, t, s, o, c = X(), d, f = (
990
+ /*unique*/
991
+ l[12]
992
+ ), u, n, p, k, O, h, v, g, w, P, C = (
993
+ /*$_*/
994
+ l[23]("faceCollector.capturing") + ""
995
+ ), j, de, re, q, se, ke, Te, ae, M, V, N, J, W, Ee, $e, He, L, oe, Ne = X() && /*waitingIdrndCaptureEvent*/
996
+ l[18], G, te = X() && /*idrndLoading*/
997
+ l[16] && /*$cameraStatusStore*/
998
+ l[21] === ue.OK, fe, ie, ve, et, z, Y, ce, we = c && rl(l), he = Qt(l);
999
+ n = new Mi({ props: { className: "bottom-0" } });
1000
+ function Se(b, A) {
1001
+ return !/*$faceValidationsStore*/
1002
+ b[33].isPersonCloseEnough || /*$faceValidationsStore*/
1003
+ b[33].isPersonTooclose ? ul : cl;
1004
+ }
1005
+ let Ke = Se(l), Ce = Ke(l);
1006
+ function je(b, A) {
1007
+ return (
1008
+ /*$faceValidationsStore*/
1009
+ b[33].closedMouth ? fl : dl
1010
+ );
1011
+ }
1012
+ let ye = je(l), H = ye(l);
1013
+ function Le(b, A) {
1014
+ return (
1015
+ /*$isLoading*/
1016
+ b[34] ? ml : hl
1017
+ );
1018
+ }
1019
+ let U = Le(l), Z = U(l);
1020
+ function Ve(b, A) {
1021
+ return (
1022
+ /*$faceValidationsStore*/
1023
+ b[33].isPersonInFrame ? _l : bl
1024
+ );
1025
+ }
1026
+ let Oe = Ve(l), $ = Oe(l), Q = Ne && Xt(l), ee = te && Jt(l);
1027
+ function me(b, A) {
1028
+ return (
1029
+ /*$captured*/
1030
+ b[20] ? Cl : kl
1031
+ );
1032
+ }
1033
+ let Ae = me(l), ne = Ae(l);
1034
+ const Qe = [Rl, Ll], be = [];
1035
+ function Xe(b, A) {
1036
+ return (!/*idrndClosed*/
1037
+ b[17] || /*$captured*/
1038
+ b[20]) && /*showUnconformities*/
1039
+ b[2] ? 0 : (
1040
+ /*$cameraStatusStore*/
1041
+ b[21] !== ue.OK ? 1 : -1
1042
+ );
1043
+ }
1044
+ return ~(z = Xe(l)) && (Y = be[z] = Qe[z](l)), {
1045
+ c() {
1046
+ e = m("div"), t = m("div"), s = m("div"), o = m("div"), we && we.c(), d = S(), he.c(), u = S(), Rt(n.$$.fragment), p = S(), k = m("canvas"), O = S(), h = m("canvas"), v = S(), g = m("canvas"), w = S(), P = m("span"), j = D(C), re = S(), q = m("div"), se = m("div"), ke = m("span"), ke.textContent = "Longe", Te = S(), Ce.c(), ae = S(), M = m("div"), V = m("span"), V.textContent = "Boca Aberta", N = S(), H.c(), J = S(), W = m("div"), Ee = m("span"), Z.c(), $e = S(), $.c(), oe = S(), Q && Q.c(), G = S(), ee && ee.c(), fe = S(), ie = m("div"), ne.c(), et = S(), Y && Y.c(), this.c = le, a(k, "id", "bry-ce-displayCanvas"), a(k, "class", "max-w-full -scale-x-100"), a(h, "id", "bry-ce-detectionsCanvas"), a(h, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), a(g, "id", "bry-ce-maskCanvas"), a(g, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), P.hidden = de = !/*isCountingDown*/
1047
+ l[11], a(P, "class", "absolute left-1/2 -translate-x-1/2 top-[85%] text-[1.5rem] bg-info text-info-content p-1 rounded-md"), a(se, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] text-2xs sm:text-base w-[10.1em]"), a(M, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] text-[.1em] 2xs:text-2xs sm:text-base w-[9.6em]"), a(W, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] text-2xs sm:text-base w-[10em]"), a(q, "class", He = "absolute " + /*$enableFaceApi*/
1048
+ (l[30] ? "flex" : "hidden") + " justify-around w-full top-[5%]"), a(o, "class", "relative"), o.hidden = L = X() && /*idrndLoading*/
1049
+ (l[16] || /*idrndClosed*/
1050
+ l[17] || /*waitingIdrndCaptureEvent*/
1051
+ l[18]), a(ie, "class", "px-4 sm:px-0 mt-[1em]"), ie.hidden = ve = !/*showCaptureButton*/
1052
+ l[1] || X() && /*idrndLoading*/
1053
+ (l[16] || /*idrndClosed*/
1054
+ l[17] || /*waitingIdrndCaptureEvent*/
1055
+ l[18]), a(s, "class", "relative mx-auto"), a(t, "class", "flex flex-col justify-between");
1056
+ },
1057
+ m(b, A) {
1058
+ R(b, e, A), r(e, t), r(t, s), r(s, o), we && we.m(o, null), r(o, d), he.m(o, null), r(o, u), Pt(n, o, null), r(o, p), r(o, k), l[51](k), r(o, O), r(o, h), l[52](h), r(o, v), r(o, g), l[53](g), r(o, w), r(o, P), r(P, j), l[54](P), r(o, re), r(o, q), r(q, se), r(se, ke), r(se, Te), Ce.m(se, null), l[55](se), r(q, ae), r(q, M), r(M, V), r(M, N), H.m(M, null), l[56](M), r(q, J), r(q, W), r(W, Ee), Z.m(Ee, null), r(W, $e), $.m(W, null), l[57](W), r(s, oe), Q && Q.m(s, null), r(s, G), ee && ee.m(s, null), r(s, fe), r(s, ie), ne.m(ie, null), l[61](t), r(e, et), ~z && be[z].m(e, null), ce = !0;
1059
+ },
1060
+ p(b, A) {
1061
+ c && we.p(b, A), A[0] & /*unique*/
1062
+ 4096 && $t(f, f = /*unique*/
1063
+ b[12]) ? (he.d(1), he = Qt(b), he.c(), he.m(o, u)) : he.p(b, A), (!ce || A[0] & /*$_*/
1064
+ 8388608) && C !== (C = /*$_*/
1065
+ b[23]("faceCollector.capturing") + "") && B(j, C), (!ce || A[0] & /*isCountingDown*/
1066
+ 2048 && de !== (de = !/*isCountingDown*/
1067
+ b[11])) && (P.hidden = de), Ke !== (Ke = Se(b)) && (Ce.d(1), Ce = Ke(b), Ce && (Ce.c(), Ce.m(se, null))), ye !== (ye = je(b)) && (H.d(1), H = ye(b), H && (H.c(), H.m(M, null))), U === (U = Le(b)) && Z ? Z.p(b, A) : (Z.d(1), Z = U(b), Z && (Z.c(), Z.m(Ee, null))), Oe !== (Oe = Ve(b)) && ($.d(1), $ = Oe(b), $ && ($.c(), $.m(W, null))), (!ce || A[0] & /*$enableFaceApi*/
1068
+ 1073741824 && He !== (He = "absolute " + /*$enableFaceApi*/
1069
+ (b[30] ? "flex" : "hidden") + " justify-around w-full top-[5%]")) && a(q, "class", He), (!ce || A[0] & /*idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
1070
+ 458752 && L !== (L = X() && /*idrndLoading*/
1071
+ (b[16] || /*idrndClosed*/
1072
+ b[17] || /*waitingIdrndCaptureEvent*/
1073
+ b[18]))) && (o.hidden = L), A[0] & /*waitingIdrndCaptureEvent*/
1074
+ 262144 && (Ne = X() && /*waitingIdrndCaptureEvent*/
1075
+ b[18]), Ne ? Q ? Q.p(b, A) : (Q = Xt(b), Q.c(), Q.m(s, G)) : Q && (Q.d(1), Q = null), A[0] & /*idrndLoading, $cameraStatusStore*/
1076
+ 2162688 && (te = X() && /*idrndLoading*/
1077
+ b[16] && /*$cameraStatusStore*/
1078
+ b[21] === ue.OK), te ? ee ? ee.p(b, A) : (ee = Jt(b), ee.c(), ee.m(s, fe)) : ee && (ee.d(1), ee = null), Ae === (Ae = me(b)) && ne ? ne.p(b, A) : (ne.d(1), ne = Ae(b), ne && (ne.c(), ne.m(ie, null))), (!ce || A[0] & /*showCaptureButton, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
1079
+ 458754 && ve !== (ve = !/*showCaptureButton*/
1080
+ b[1] || X() && /*idrndLoading*/
1081
+ (b[16] || /*idrndClosed*/
1082
+ b[17] || /*waitingIdrndCaptureEvent*/
1083
+ b[18]))) && (ie.hidden = ve);
1084
+ let De = z;
1085
+ z = Xe(b), z === De ? ~z && be[z].p(b, A) : (Y && (ei(), Be(be[De], 1, 1, () => {
1086
+ be[De] = null;
1087
+ }), ti()), ~z ? (Y = be[z], Y ? Y.p(b, A) : (Y = be[z] = Qe[z](b), Y.c()), Ue(Y, 1), Y.m(e, null)) : Y = null);
1088
+ },
1089
+ i(b) {
1090
+ ce || (Ue(n.$$.fragment, b), Ue(Y), ce = !0);
1091
+ },
1092
+ o(b) {
1093
+ Be(n.$$.fragment, b), Be(Y), ce = !1;
1094
+ },
1095
+ d(b) {
1096
+ b && I(e), we && we.d(), he.d(b), It(n), l[51](null), l[52](null), l[53](null), l[54](null), Ce.d(), l[55](null), H.d(), l[56](null), Z.d(), $.d(), l[57](null), Q && Q.d(), ee && ee.d(), ne.d(), l[61](null), ~z && be[z].d();
1097
+ }
1098
+ };
1099
+ }
1100
+ let Ul = 10;
1101
+ function xt(l, e, t) {
1102
+ const s = e.videoHeight >= e.videoWidth && t.height >= t.width || e.videoHeight < e.videoWidth && t.height < t.width;
1103
+ l.drawImage(
1104
+ e,
1105
+ s ? 0 : e.videoWidth / 2 - t.width,
1106
+ 0,
1107
+ s ? e.videoWidth : e.videoHeight * (t.width / t.height),
1108
+ e.videoHeight,
1109
+ 0,
1110
+ 0,
1111
+ t.width,
1112
+ t.height
1113
+ );
1114
+ }
1115
+ function Hl(l, e, t) {
1116
+ let s, o, c, d, f, u, n, p, k, O, h, v, g, w, P, C, j, de, re, q, se, ke, Te, ae, M, V, N, J, W, Ee, $e, He;
1117
+ F(l, gt, (i) => t(76, s = i)), F(l, Ge, (i) => t(20, c = i)), F(l, Ie, (i) => t(21, d = i)), F(l, pt, (i) => t(78, f = i)), F(l, Nt, (i) => t(79, u = i)), F(l, Ye, (i) => t(22, n = i)), F(l, Bi, (i) => t(80, p = i)), F(l, Ui, (i) => t(23, k = i)), F(l, Hi, (i) => t(81, O = i)), F(l, Ze, (i) => t(24, h = i)), F(l, tt, (i) => t(82, v = i)), F(l, Re, (i) => t(25, g = i)), F(l, vt, (i) => t(26, w = i)), F(l, wt, (i) => t(27, P = i)), F(l, Me, (i) => t(28, C = i)), F(l, Ki, (i) => t(83, de = i)), F(l, ji, (i) => t(30, re = i)), F(l, ot, (i) => t(31, q = i)), F(l, Ct, (i) => t(84, se = i)), F(l, Vi, (i) => t(85, ke = i)), F(l, at, (i) => t(86, Te = i)), F(l, At, (i) => t(87, ae = i)), F(l, Wt, (i) => t(88, M = i)), F(l, qi, (i) => t(89, V = i)), F(l, kt, (i) => t(90, N = i)), F(l, Mt, (i) => t(32, J = i)), F(l, Bt, (i) => t(33, W = i)), F(l, zi, (i) => t(34, Ee = i)), F(l, Qi, (i) => t(35, $e = i)), F(l, Xi, (i) => t(36, He = i));
1118
+ let L, oe, Ne, G, te, fe, ie, ve = !1, et = {}, z = !1, { enableMinutiae: Y } = e, { videoDimensions: ce } = e, { noTabs: we } = e, { weightsPath: he } = e, { evaluatePhoto: Se } = e, { showCaptureButton: Ke } = e, { showUnconformities: Ce } = e;
1119
+ const je = Vt(!1);
1120
+ F(l, je, (i) => t(77, o = i));
1121
+ const ye = Vt("data:image/png;base64");
1122
+ F(l, ye, (i) => t(29, j = i));
1123
+ let { widgetInstance: H } = e, Le, U, Z = !1, Ve = !1, Oe = !0, $ = !0, Q = !1, ee = 0, me = "", Ae = 0, ne = 0, Qe = !1;
1124
+ const be = Ji.mixin({
1125
+ toast: !0,
1126
+ position: "bottom-left",
1127
+ timer: 13e3,
1128
+ timerProgressBar: !0
1129
+ });
1130
+ Gi(async () => {
1131
+ _(ot, q = !1, q), _(Mt, J = !1, J), _(Ge, c = !1, c);
1132
+ const [i, E] = (ce ?? "")?.replaceAll(" ", "")?.split("x")?.map((y) => y ? parseInt(y) : void 0);
1133
+ if (!(!i || !E)) {
1134
+ if (_(Ye, n = { videoWidth: i, videoHeight: E }, n), X() && E < i && Ut() && _(Ye, n = { videoWidth: E, videoHeight: i }, n), !X())
1135
+ try {
1136
+ await Ht();
1137
+ const { width: y, height: T, aspectRatio: K } = await Yi(i, E);
1138
+ K && K > 1 && Ut() && _(Ye, n = { videoWidth: E, videoHeight: i }, n), (await Kt(i, E, "", !0))?.getTracks()?.forEach((We) => We?.stop()), _(kt, N = V[0].deviceId, N);
1139
+ } catch (y) {
1140
+ const T = y;
1141
+ t(17, $ = !0), console.error(T), nt(T) && "message" in T && T.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), _(Ie, d = ue.CAMERA_DENIED_ERROR, d)), nt(T) && "message" in T && T.message.includes("Requested device not found") && _(Ie, d = ue.DEVICE_NOT_FOUND_ERROR, d);
1142
+ const K = nt(y) && y.constraint ? y.constraint : "";
1143
+ (K.includes("width") || K.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${K})`), _(Ie, d = ue.CAMERA_UNSUPPORTED, d));
1144
+ }
1145
+ X() && (import("./index-no-detector_c7c1d3a2_2.0.6.js"), b()), re && (await Zi(he), z = !0), X() && !Ve && ae && A();
1146
+ }
1147
+ });
1148
+ function Xe(i, E) {
1149
+ i.clearRect(0, 0, U.width, U.height), i.save(), i.filter = `blur(${E.width / 60}px)`, i.beginPath(), i.rect(0, 0, U.width, U.height);
1150
+ let y = 200;
1151
+ n.videoWidth > n.videoHeight ? y = n.videoWidth / 4 : y = n.videoHeight / 4;
1152
+ const T = y * 1.45;
1153
+ i.ellipse(n.videoWidth / 2, n.videoHeight / 2, y / 2, T / 2, 0, 0, 2 * Math.PI, !0), i.clip(), xt(i, E, U), i.restore(), i.save(), i.beginPath();
1154
+ const K = window.getComputedStyle(U).getPropertyValue("--p"), qe = window.getComputedStyle(U).getPropertyValue("--su");
1155
+ if (i.strokeStyle = `hsl(${K})`, i.lineWidth = 16, i.ellipse(n.videoWidth / 2, n.videoHeight / 2, y / 2, T / 2, 0, 0, 2 * Math.PI), i.stroke(), ve && !Qe) {
1156
+ const lt = 1 - (ne - (/* @__PURE__ */ new Date()).getTime()) / 4500;
1157
+ i.save(), i.beginPath(), i.lineWidth = 16, i.strokeStyle = `hsl(${qe})`, i.ellipse(n.videoWidth / 2, n.videoHeight / 2, y / 2, T / 2, 0, 0 - Math.PI / 2, 1.25 * (Math.PI * 2 * lt) - Math.PI / 2), i.stroke();
1158
+ }
1159
+ i.beginPath();
1160
+ const We = new Path2D();
1161
+ We.ellipse(n.videoWidth / 2, n.videoHeight / 2, y / 2, T / 2, 0, 0, 2 * Math.PI), i.clip(We), xt(i, E, U), i.restore();
1162
+ }
1163
+ function b() {
1164
+ H.addEventListener("open", (i) => {
1165
+ const E = i.detail[0].video;
1166
+ _(
1167
+ Wt,
1168
+ M = {
1169
+ width: E.videoWidth,
1170
+ height: E.videoHeight
1171
+ },
1172
+ M
1173
+ ), t(4, L.srcObject = E.srcObject, L), t(16, Oe = !1);
1174
+ function y() {
1175
+ $ || (Xe(U.getContext("2d"), E), xe(L, y, !0));
1176
+ }
1177
+ y();
1178
+ }), H.addEventListener("error", (i) => {
1179
+ console.error(i), i.detail[0].message === "Device in use" ? _(Ie, d = ue.CAMERA_IN_USE_ERROR, d) : i.detail[0].message === "Permission denied" || i.detail[0].message === "Permission dismissed" ? _(Ie, d = ue.CAMERA_DENIED_ERROR, d) : i.detail[0].message === "Requested device not found" && _(Ie, d = ue.DEVICE_NOT_FOUND_ERROR, d), t(16, Oe = !1);
1180
+ }), H.addEventListener("faceDetection", (i) => {
1181
+ }), H.addEventListener("close", async (i) => {
1182
+ c || t(15, Z = !1), t(17, $ = !0), t(18, Q = !1), d === ue.OK && _(Ie, d = ue.CAMERA_CLOSED_ERROR, d);
1183
+ }), H.addEventListener("initialize", async (i) => {
1184
+ Ve = !0, _(At, ae = !0, ae), se === rt.Face && !Z && !c && Ve && await A();
1185
+ }), H.addEventListener("capture", async (i) => {
1186
+ t(19, me = "");
1187
+ const { encryptedFile: E, photo: y } = i.detail[0];
1188
+ _(at, Te = E, Te), t(18, Q = !1), _(Re, g = x.OK, g), _(Ze, h.isLoading = !0, h), _(Ge, c = !0, c), t(15, Z = !1);
1189
+ const T = (await ct(y)).split(",");
1190
+ if (_(ye, j = T[0], j), _(Me, C = T[1], C), _(tt, v = T[1], v), !ke) {
1191
+ let _e, bt;
1192
+ try {
1193
+ ({ bodyParts: _e, icaoWarnings: bt } = await ut(v, Se, (await ct(E)).split(",")[1])), window.dispatchEvent(new CustomEvent(
1194
+ "face-unconformities-validated",
1195
+ {
1196
+ detail: {
1197
+ bodyParts: _e,
1198
+ icaoWarnings: bt,
1199
+ status: g
1200
+ }
1201
+ }
1202
+ ));
1203
+ } catch (ze) {
1204
+ console.error(ze);
1205
+ let st = Et.UNKNOWN, _t = [], Dt = [];
1206
+ if (ze instanceof jt && ze.response?.status === 400)
1207
+ if (ze.response.data && Array.isArray(ze.response.data.bodyParts)) {
1208
+ _t = ze.response.data.bodyParts, Dt = ze.response.data.icaoWarnings;
1209
+ const Ft = _t.find((Fi) => Fi.livenessResult.error);
1210
+ st = Ft?.livenessResult.error_code, _(Re, g = x.LIVENESS_DETECTION_FAILURE, g), Ft?.livenessResult.error_code || _(Re, g = x.UNKNOWN_LIVENESS_ERROR, g), t(19, me = Et[st]), console.error("Liveness error:", st);
1211
+ } else
1212
+ _(Re, g = x.TEMPLATE_EXTRACTION_ERROR, g);
1213
+ else
1214
+ _(Re, g = x.UNKNOWN_LIVENESS_ERROR, g), be.fire({
1215
+ icon: "error",
1216
+ title: "Falha ao comunicar com serviço de Liveness"
1217
+ });
1218
+ _(Ze, h.isLoading = !1, h), window.dispatchEvent(new CustomEvent(
1219
+ "face-unconformities-validated",
1220
+ {
1221
+ detail: {
1222
+ bodyParts: _t,
1223
+ errorCode: st,
1224
+ translatedError: k(me),
1225
+ status: g,
1226
+ icaoWarnings: Dt
1227
+ }
1228
+ }
1229
+ ));
1230
+ return;
1231
+ }
1232
+ if (g !== x.OK) {
1233
+ _(Ze, h.isLoading = !1, h);
1234
+ return;
1235
+ }
1236
+ _e[0].livenessResult && St(_e[0].livenessResult), _e.length !== 0 && _e[0].data && _(Me, C = _e[0].data, C), dt(bt);
1237
+ return;
1238
+ }
1239
+ let K, qe;
1240
+ try {
1241
+ qe = await xi(E), St(qe.data);
1242
+ } catch (_e) {
1243
+ _(Re, g = x.UNKNOWN_LIVENESS_ERROR, g), console.error(_e), _e instanceof jt && _e.response?.status === 400 ? (K = _e.response.data.error_code, t(19, me = Et[K]), console.error("Liveness error:", K), _(Re, g = x.LIVENESS_DETECTION_FAILURE, g)) : be.fire({
1244
+ icon: "error",
1245
+ title: "Falha ao comunicar com serviço de Liveness"
1246
+ });
1247
+ }
1248
+ if (g !== x.OK) {
1249
+ _(Ze, h.isLoading = !1, h), window.dispatchEvent(new CustomEvent(
1250
+ "face-unconformities-validated",
1251
+ {
1252
+ detail: {
1253
+ bodyParts: [
1254
+ {
1255
+ bodyPart: "FACE",
1256
+ data: v,
1257
+ livenessBlob: (await ct(E)).split(",")[1],
1258
+ ...qe && { livenessResult: qe }
1259
+ }
1260
+ ],
1261
+ ...K && { errorCode: K },
1262
+ ...me && { translatedError: k(me) },
1263
+ status: g
1264
+ }
1265
+ }
1266
+ ));
1267
+ return;
1268
+ }
1269
+ let { bodyParts: We, icaoWarnings: lt } = await ut(v, Se);
1270
+ window.dispatchEvent(new CustomEvent(
1271
+ "face-unconformities-validated",
1272
+ {
1273
+ detail: {
1274
+ bodyParts: We,
1275
+ icaoWarnings: lt,
1276
+ status: g,
1277
+ errorCode: K,
1278
+ ...me && { translatedError: k(me) }
1279
+ }
1280
+ }
1281
+ )), We[0].data && _(Me, C = We[0].data, C), dt(lt);
1282
+ });
1283
+ }
1284
+ function A() {
1285
+ _(Ie, d = ue.OK, d), H && "openCamera" in H && H.openCamera(), t(15, Z = !0), t(17, $ = !1), t(16, Oe = !0);
1286
+ }
1287
+ async function De() {
1288
+ if (re && !z)
1289
+ return xe(L, De);
1290
+ if (L) {
1291
+ if (se !== rt.Face && !we)
1292
+ return xe(L, De);
1293
+ _(ot, q = !0, q), re ? (o || _(je, o = !0, o), X() || Xe(U.getContext("2d"), L), xe(L, De)) : (Xe(U.getContext("2d"), L), xe(L, De));
1294
+ }
1295
+ }
1296
+ async function Tt() {
1297
+ if (_(Re, g = x.OK, g), X()) {
1298
+ t(18, Q = !0), H.takePhoto();
1299
+ return;
1300
+ }
1301
+ if (_(Ge, c = !0, c), re) {
1302
+ const [i] = await (await import("./face_api_0e3ce8c8_2.0.6.js")).extractFaces(L, [de]), E = i.toDataURL("image/jpeg").split(",");
1303
+ _(ye, j = E[0], j), _(Me, C = E[1], C), _(tt, v = E[1], v);
1304
+ let { bodyParts: y, icaoWarnings: T } = await ut(C, Se);
1305
+ window.dispatchEvent(new CustomEvent(
1306
+ "face-unconformities-validated",
1307
+ {
1308
+ detail: {
1309
+ bodyParts: y,
1310
+ icaoWarnings: T,
1311
+ status: g
1312
+ }
1313
+ }
1314
+ )), y.length !== 0 && y[0].data && _(Me, C = y[0].data, C), dt(T);
1315
+ } else {
1316
+ const i = document.createElement("canvas"), E = i.getContext("2d");
1317
+ i.width = L.width, i.height = L.height, E?.drawImage(L, 0, 0, i.width, i.height);
1318
+ const y = i.toDataURL("image/jpeg").split(",");
1319
+ _(ye, j = y[0], j), _(Me, C = y[1], C), _(tt, v = y[1], v);
1320
+ let { bodyParts: T, icaoWarnings: K } = await ut(C, Se);
1321
+ window.dispatchEvent(new CustomEvent(
1322
+ "face-unconformities-validated",
1323
+ {
1324
+ detail: {
1325
+ bodyParts: T,
1326
+ icaoWarnings: K,
1327
+ status: g
1328
+ }
1329
+ }
1330
+ )), T.length !== 0 && T[0].data && _(Me, C = T[0].data, C), dt(K);
1331
+ }
1332
+ }
1333
+ function it() {
1334
+ const i = {
1335
+ bodyPart: "FACE",
1336
+ data: C,
1337
+ justification: P
1338
+ };
1339
+ _(vt, w = !0, w), Lt(at) && ct(Lt(at)).then((E) => {
1340
+ i.livenessBlob = E.split(",")[1];
1341
+ }), window.dispatchEvent(new CustomEvent("export-face", { detail: i }));
1342
+ }
1343
+ function Je() {
1344
+ window.dispatchEvent(new CustomEvent("face-scrapped")), _(vt, w = !1, w), _(Re, g = x.OK, g), _(Ge, c = !1, c), _(tt, v = "", v), _(Ze, h.unconformities = [], h), $ && A();
1345
+ }
1346
+ function St(i) {
1347
+ let E = "", y = "success";
1348
+ i.isAlive ? E = `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 && (y = "error", E = `Vivacidade de face (${i.face_liveness.probability.toFixed(2)}) e de captura (${i.capture_liveness.probability}, ${i.capture_liveness.score.toFixed(2)}) insuficientes!`), O && be.fire({ icon: y, title: E });
1349
+ }
1350
+ const li = Ye.subscribe((i) => {
1351
+ L && oe && (t(4, L.width = i.videoWidth, L), t(4, L.height = i.videoHeight, L), t(5, oe.width = i.videoWidth, oe), t(5, oe.height = i.videoHeight, oe), t(13, Le.width = i.videoWidth, Le), t(13, Le.height = i.videoHeight, Le), t(14, U.width = i.videoWidth, U), t(14, U.height = i.videoHeight, U));
1352
+ }), si = Bt.subscribe((i) => {
1353
+ if (!(!G || !te || !fe) && (i.closedMouth ? (te.classList.add("ce-dui-badge-success"), te.classList.remove("ce-dui-badge-error"), t(8, te.firstChild.textContent = k("faceCollector.closedMouth"), te)) : (te.classList.remove("ce-dui-badge-success"), te.classList.add("ce-dui-badge-error"), t(8, te.firstChild.textContent = k("faceCollector.mouthOpen"), te)), !i.isPersonCloseEnough || i.isPersonTooclose ? (G.classList.remove("ce-dui-badge-success"), G.classList.add("ce-dui-badge-error"), i.isPersonCloseEnough ? i.isPersonTooclose && t(7, G.firstChild.textContent = k("faceCollector.tooClose"), G) : t(7, G.firstChild.textContent = k("faceCollector.tooFar"), G)) : (G.classList.add("ce-dui-badge-success"), G.classList.remove("ce-dui-badge-error"), t(7, G.firstChild.textContent = k("faceCollector.okDistance"), G)), i.isPersonInFrame ? (fe.classList.add("ce-dui-badge-success"), fe.classList.remove("ce-dui-badge-error")) : (fe.classList.remove("ce-dui-badge-success"), fe.classList.add("ce-dui-badge-error")), !c && p && !ve && Ne && i.isPersonInFrame && i.closedMouth && !(!i.isPersonCloseEnough || i.isPersonTooclose))) {
1354
+ t(11, ve = !0), ne = (/* @__PURE__ */ new Date()).getTime() + 4500;
1355
+ const E = setInterval(
1356
+ () => {
1357
+ if (!p || c || X() && $ || !i.isPersonCloseEnough || i.isPersonTooclose || !i.closedMouth || !i.isPersonInFrame) {
1358
+ t(11, ve = !1), Qe = !0, setTimeout(
1359
+ () => {
1360
+ Qe = !1;
1361
+ },
1362
+ 1500
1363
+ ), clearInterval(E);
1364
+ return;
1365
+ }
1366
+ const y = (/* @__PURE__ */ new Date()).getTime();
1367
+ Math.floor((ne - y) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(E), t(11, ve = !1), document.getElementsByTagName("biometric-collector")?.[0]?.shadowRoot?.getElementById("bry-cc-capture-btn")?.click());
1368
+ },
1369
+ 250
1370
+ );
1371
+ }
1372
+ }), oi = Ge.subscribe((i) => {
1373
+ ie && (i ? (ie.classList.remove("flex"), ie.classList.add("hidden")) : (ie.classList.add("flex"), ie.classList.remove("hidden")));
1374
+ }), ai = pt.subscribe((i) => {
1375
+ L && i && (console.log("setting null in video srcObject"), t(4, L.srcObject = null, L), t(4, L.src = "", L));
1376
+ });
1377
+ Ct.subscribe(async (i) => {
1378
+ i === rt.Face && await Ht();
1379
+ });
1380
+ const ni = kt.subscribe(async (i) => {
1381
+ if (X() || !i)
1382
+ return;
1383
+ L || t(12, et = {});
1384
+ const { videoHeight: E, videoWidth: y } = n;
1385
+ try {
1386
+ const T = await Kt(y, E, i, !0);
1387
+ t(4, L.srcObject = T, L), _(Nt, u = T, u), _(pt, f = !1, f);
1388
+ } catch (T) {
1389
+ const K = T;
1390
+ t(17, $ = !0), nt(K) && "message" in K && K.message.includes("Requested device not found") && _(Ie, d = ue.DEVICE_NOT_FOUND_ERROR, d);
1391
+ }
1392
+ }), ri = Ct.subscribe(async (i) => {
1393
+ i === rt.Face && X() && !Z && !c && Ve && await A();
1394
+ }), ci = je.subscribe(async (i) => {
1395
+ i && Ot();
1396
+ });
1397
+ async function Ot() {
1398
+ let i;
1399
+ if (Ae >= Ul) {
1400
+ Ae = 0;
1401
+ const E = await tl(), y = await import("./face_api_0e3ce8c8_2.0.6.js");
1402
+ let T;
1403
+ T = y.detectSingleFace(U, E), i = await T.withFaceLandmarks(), oe.getContext("2d")?.clearRect(0, 0, oe.width, oe.height);
1404
+ } else
1405
+ Ae++;
1406
+ i && il(i, oe, Y), o && xe(L, Ot);
1407
+ }
1408
+ gt.subscribe(async (i) => {
1409
+ i && (Je(), _(gt, s = !1, s));
1410
+ });
1411
+ const ui = ot.subscribe((i) => {
1412
+ i && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
1413
+ });
1414
+ $i(() => {
1415
+ el(), oi(), si(), li(), ai(), ni(), ri(), clearInterval(ee), ci(), ui(), ee = 0;
1416
+ });
1417
+ function di(i) {
1418
+ Pe[i ? "unshift" : "push"](() => {
1419
+ H = i, t(0, H);
1420
+ });
1421
+ }
1422
+ function fi(i) {
1423
+ Pe[i ? "unshift" : "push"](() => {
1424
+ L = i, t(4, L);
1425
+ });
1426
+ }
1427
+ const hi = () => {
1428
+ X() || _(
1429
+ Ye,
1430
+ n = {
1431
+ videoHeight: L.videoHeight,
1432
+ videoWidth: L.videoWidth
1433
+ },
1434
+ n
1435
+ );
1436
+ };
1437
+ function mi(i) {
1438
+ Pe[i ? "unshift" : "push"](() => {
1439
+ U = i, t(14, U);
1440
+ });
1441
+ }
1442
+ function bi(i) {
1443
+ Pe[i ? "unshift" : "push"](() => {
1444
+ oe = i, t(5, oe);
1445
+ });
1446
+ }
1447
+ function _i(i) {
1448
+ Pe[i ? "unshift" : "push"](() => {
1449
+ Le = i, t(13, Le);
1450
+ });
1451
+ }
1452
+ function gi(i) {
1453
+ Pe[i ? "unshift" : "push"](() => {
1454
+ Ne = i, t(6, Ne);
1455
+ });
1456
+ }
1457
+ function pi(i) {
1458
+ Pe[i ? "unshift" : "push"](() => {
1459
+ G = i, t(7, G);
1460
+ });
1461
+ }
1462
+ function vi(i) {
1463
+ Pe[i ? "unshift" : "push"](() => {
1464
+ te = i, t(8, te);
1465
+ });
1466
+ }
1467
+ function wi(i) {
1468
+ Pe[i ? "unshift" : "push"](() => {
1469
+ fe = i, t(9, fe);
1470
+ });
1471
+ }
1472
+ const Ci = () => Tt(), ki = () => it(), Ei = () => Je();
1473
+ function yi(i) {
1474
+ Pe[i ? "unshift" : "push"](() => {
1475
+ ie = i, t(10, ie);
1476
+ });
1477
+ }
1478
+ const Li = () => it(), Ri = () => Je();
1479
+ function Pi() {
1480
+ P = this.value, wt.set(P);
1481
+ }
1482
+ const Ii = () => it(), Ti = () => Je();
1483
+ function Si() {
1484
+ P = this.value, wt.set(P);
1485
+ }
1486
+ const Oi = () => Je(), Di = () => {
1487
+ t(15, Z = !0), A();
1488
+ };
1489
+ return l.$$set = (i) => {
1490
+ "enableMinutiae" in i && t(43, Y = i.enableMinutiae), "videoDimensions" in i && t(44, ce = i.videoDimensions), "noTabs" in i && t(45, we = i.noTabs), "weightsPath" in i && t(46, he = i.weightsPath), "evaluatePhoto" in i && t(47, Se = i.evaluatePhoto), "showCaptureButton" in i && t(1, Ke = i.showCaptureButton), "showUnconformities" in i && t(2, Ce = i.showUnconformities), "widgetInstance" in i && t(0, H = i.widgetInstance);
1491
+ }, [
1492
+ H,
1493
+ Ke,
1494
+ Ce,
1495
+ De,
1496
+ L,
1497
+ oe,
1498
+ Ne,
1499
+ G,
1500
+ te,
1501
+ fe,
1502
+ ie,
1503
+ ve,
1504
+ et,
1505
+ Le,
1506
+ U,
1507
+ Z,
1508
+ Oe,
1509
+ $,
1510
+ Q,
1511
+ me,
1512
+ c,
1513
+ d,
1514
+ n,
1515
+ k,
1516
+ h,
1517
+ g,
1518
+ w,
1519
+ P,
1520
+ C,
1521
+ j,
1522
+ re,
1523
+ q,
1524
+ J,
1525
+ W,
1526
+ Ee,
1527
+ $e,
1528
+ He,
1529
+ je,
1530
+ ye,
1531
+ A,
1532
+ Tt,
1533
+ it,
1534
+ Je,
1535
+ Y,
1536
+ ce,
1537
+ we,
1538
+ he,
1539
+ Se,
1540
+ di,
1541
+ fi,
1542
+ hi,
1543
+ mi,
1544
+ bi,
1545
+ _i,
1546
+ gi,
1547
+ pi,
1548
+ vi,
1549
+ wi,
1550
+ Ci,
1551
+ ki,
1552
+ Ei,
1553
+ yi,
1554
+ Li,
1555
+ Ri,
1556
+ Pi,
1557
+ Ii,
1558
+ Ti,
1559
+ Si,
1560
+ Oi,
1561
+ Di
1562
+ ];
1563
+ }
1564
+ class Kl extends Ni {
1565
+ constructor(e) {
1566
+ super(), Ai(
1567
+ this,
1568
+ {
1569
+ target: this.shadowRoot,
1570
+ props: Wi(this.attributes),
1571
+ customElement: !0
1572
+ },
1573
+ Hl,
1574
+ Bl,
1575
+ $t,
1576
+ {
1577
+ enableMinutiae: 43,
1578
+ videoDimensions: 44,
1579
+ noTabs: 45,
1580
+ weightsPath: 46,
1581
+ evaluatePhoto: 47,
1582
+ showCaptureButton: 1,
1583
+ showUnconformities: 2,
1584
+ widgetInstance: 0,
1585
+ play: 3
1586
+ },
1587
+ null,
1588
+ [-1, -1, -1, -1]
1589
+ ), e && (e.target && R(e.target, this, e.anchor), e.props && (this.$set(e.props), Fe()));
1590
+ }
1591
+ static get observedAttributes() {
1592
+ return [
1593
+ "enableMinutiae",
1594
+ "videoDimensions",
1595
+ "noTabs",
1596
+ "weightsPath",
1597
+ "evaluatePhoto",
1598
+ "showCaptureButton",
1599
+ "showUnconformities",
1600
+ "widgetInstance",
1601
+ "play"
1602
+ ];
1603
+ }
1604
+ get enableMinutiae() {
1605
+ return this.$$.ctx[43];
1606
+ }
1607
+ set enableMinutiae(e) {
1608
+ this.$$set({ enableMinutiae: e }), Fe();
1609
+ }
1610
+ get videoDimensions() {
1611
+ return this.$$.ctx[44];
1612
+ }
1613
+ set videoDimensions(e) {
1614
+ this.$$set({ videoDimensions: e }), Fe();
1615
+ }
1616
+ get noTabs() {
1617
+ return this.$$.ctx[45];
1618
+ }
1619
+ set noTabs(e) {
1620
+ this.$$set({ noTabs: e }), Fe();
1621
+ }
1622
+ get weightsPath() {
1623
+ return this.$$.ctx[46];
1624
+ }
1625
+ set weightsPath(e) {
1626
+ this.$$set({ weightsPath: e }), Fe();
1627
+ }
1628
+ get evaluatePhoto() {
1629
+ return this.$$.ctx[47];
1630
+ }
1631
+ set evaluatePhoto(e) {
1632
+ this.$$set({ evaluatePhoto: e }), Fe();
1633
+ }
1634
+ get showCaptureButton() {
1635
+ return this.$$.ctx[1];
1636
+ }
1637
+ set showCaptureButton(e) {
1638
+ this.$$set({ showCaptureButton: e }), Fe();
1639
+ }
1640
+ get showUnconformities() {
1641
+ return this.$$.ctx[2];
1642
+ }
1643
+ set showUnconformities(e) {
1644
+ this.$$set({ showUnconformities: e }), Fe();
1645
+ }
1646
+ get widgetInstance() {
1647
+ return this.$$.ctx[0];
1648
+ }
1649
+ set widgetInstance(e) {
1650
+ this.$$set({ widgetInstance: e }), Fe();
1651
+ }
1652
+ get play() {
1653
+ return this.$$.ctx[3];
1654
+ }
1655
+ }
1656
+ customElements.define("face-collector", Kl);
1657
+ export {
1658
+ Kl as default
1659
+ };