bry-biometric-collector 2.2.1 → 2.2.3

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