bry-biometric-collector 3.3.0-RC07 → 3.3.0-RC09

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