bry-biometric-collector 2.2.14-RC02 → 2.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DocumentCollector_e1cfb10a_2.2.14.js +1023 -0
- package/dist/FaceCollector_3d35777e_2.2.14.js +1825 -0
- package/dist/TakePictureBtn_72ee96e8_2.2.14.js +848 -0
- package/dist/bry-biometric-collector-main.js +1 -2
- package/dist/{en-us_44aea54f_2.2.14-RC02.js → en-us_44aea54f_2.2.14.js} +0 -1
- package/dist/{es-cl_d02e5eb9_2.2.14-RC02.js → es-cl_d02e5eb9_2.2.14.js} +0 -1
- package/dist/face_api_0e3ce8c8_2.2.14.js +36288 -0
- package/dist/fingersApi_05957c8a_2.2.14.js +132 -0
- package/dist/index-no-detector_acb82d83_2.2.14.js +10395 -0
- package/dist/index.js +1 -2
- package/dist/main_2ef04e89_2.2.14.js +23830 -0
- package/dist/{pt-br_9f08429d_2.2.14-RC02.js → pt-br_9f08429d_2.2.14.js} +0 -1
- package/package.json +1 -1
- package/dist/DocumentCollector_e779391c_2.2.14-RC02.js +0 -1357
- package/dist/FaceCollector_fd81b727_2.2.14-RC02.js +0 -2352
- package/dist/TakePictureBtn_d4de0ae1_2.2.14-RC02.js +0 -1066
- package/dist/face_api_0e3ce8c8_2.2.14-RC02.js +0 -36289
- package/dist/fingersApi_720e79f3_2.2.14-RC02.js +0 -133
- package/dist/index-no-detector_acb82d83_2.2.14-RC02.js +0 -10396
- package/dist/main_2d280af8_2.2.14-RC02.js +0 -25621
@@ -0,0 +1,1023 @@
|
|
1
|
+
import { S as ci, q as ui, r as It, t as fi, w as x, L as se, x as v, N as U, z as Z, B as f, D as l, O as j, P as ke, Q as Y, R as ye, H as ae, I as T, T as Xe, U as di, V as Se, W as hi, X as pe, Y as de, Z as we, _ as Ye, a0 as ft, J as dt, a1 as Je, a3 as ht, a5 as ze, a6 as Qe, a7 as Ie, a8 as mt, a9 as bt, ac as gt, ab as mi, ad as Le, ae as Ge, b1 as _t, ak as pt, $ as bi, am as gi, an as _i, ao as pi, ap as wi, K as m, aq as Ze, ar as vi, az as Ci, C as xe, d as Fe, aA as wt, aB as Be, aC as ki, aD as yi, as as $e, aE as Ei, aF as Di, aG as Oi, aU as Ri, aH as ve, aI as Ti, aJ as vt, E as oe, aK as We, aL as Ai, aM as Ee, aN as De, aO as Oe, y as J, G as z, aR as Ct, at as et, aS as Pi, aT as Si, aV as Ce, aP as kt, j as Ii, aX as Li, aY as Fi, aZ as yt, a$ as Et, b0 as Bi } from "./main_2ef04e89_2.2.14.js";
|
2
|
+
import { C as X, c as G, a as Wi, T as Mi, b as Ni } from "./TakePictureBtn_72ee96e8_2.2.14.js";
|
3
|
+
function Dt(s) {
|
4
|
+
let t, i, a;
|
5
|
+
return {
|
6
|
+
c() {
|
7
|
+
t = v("video"), f(t, "id", "bry-cc-camera-video-tag"), f(t, "class", "absolute -z-10"), t.playsInline = !0, t.muted = !0, t.autoplay = !0;
|
8
|
+
},
|
9
|
+
m(o, n) {
|
10
|
+
x(o, t, n), s[41](t), i || (a = [
|
11
|
+
oe(
|
12
|
+
t,
|
13
|
+
"canplay",
|
14
|
+
/*canplay_handler*/
|
15
|
+
s[42]
|
16
|
+
),
|
17
|
+
oe(
|
18
|
+
t,
|
19
|
+
"play",
|
20
|
+
/*play*/
|
21
|
+
s[4],
|
22
|
+
{ once: !0 }
|
23
|
+
)
|
24
|
+
], i = !0);
|
25
|
+
},
|
26
|
+
p: Z,
|
27
|
+
d(o) {
|
28
|
+
o && ae(t), s[41](null), i = !1, We(a);
|
29
|
+
}
|
30
|
+
};
|
31
|
+
}
|
32
|
+
function Ot(s) {
|
33
|
+
let t, i;
|
34
|
+
return t = new Ai({}), {
|
35
|
+
c() {
|
36
|
+
Ee(t.$$.fragment);
|
37
|
+
},
|
38
|
+
m(a, o) {
|
39
|
+
De(t, a, o), i = !0;
|
40
|
+
},
|
41
|
+
i(a) {
|
42
|
+
i || (j(t.$$.fragment, a), i = !0);
|
43
|
+
},
|
44
|
+
o(a) {
|
45
|
+
Y(t.$$.fragment, a), i = !1;
|
46
|
+
},
|
47
|
+
d(a) {
|
48
|
+
Oe(t, a);
|
49
|
+
}
|
50
|
+
};
|
51
|
+
}
|
52
|
+
function Rt(s) {
|
53
|
+
let t, i;
|
54
|
+
return t = new Wi({}), {
|
55
|
+
c() {
|
56
|
+
Ee(t.$$.fragment);
|
57
|
+
},
|
58
|
+
m(a, o) {
|
59
|
+
De(t, a, o), i = !0;
|
60
|
+
},
|
61
|
+
i(a) {
|
62
|
+
i || (j(t.$$.fragment, a), i = !0);
|
63
|
+
},
|
64
|
+
o(a) {
|
65
|
+
Y(t.$$.fragment, a), i = !1;
|
66
|
+
},
|
67
|
+
d(a) {
|
68
|
+
Oe(t, a);
|
69
|
+
}
|
70
|
+
};
|
71
|
+
}
|
72
|
+
function Tt(s) {
|
73
|
+
let t, i = (
|
74
|
+
/*$_*/
|
75
|
+
s[26]("faceCollector.stayStill") + ""
|
76
|
+
), a;
|
77
|
+
return {
|
78
|
+
c() {
|
79
|
+
t = v("span"), a = J(i), f(t, "class", "absolute left-1/2 -translate-x-1/2 top-[7%] ce-dui-badge ce-dui-badge-lg h-[2em] text-2xl xl:text-base w-[12.1em]");
|
80
|
+
},
|
81
|
+
m(o, n) {
|
82
|
+
x(o, t, n), l(t, a);
|
83
|
+
},
|
84
|
+
p(o, n) {
|
85
|
+
n[0] & /*$_*/
|
86
|
+
67108864 && i !== (i = /*$_*/
|
87
|
+
o[26]("faceCollector.stayStill") + "") && z(a, i);
|
88
|
+
},
|
89
|
+
d(o) {
|
90
|
+
o && ae(t);
|
91
|
+
}
|
92
|
+
};
|
93
|
+
}
|
94
|
+
function At(s) {
|
95
|
+
let t, i = (
|
96
|
+
/*$_*/
|
97
|
+
s[26](`${/*$faceValidationAlert*/
|
98
|
+
s[17]}`) + ""
|
99
|
+
), a;
|
100
|
+
return {
|
101
|
+
c() {
|
102
|
+
t = v("span"), a = J(i), f(t, "class", "absolute left-1/2 -translate-x-1/2 top-[7%] ce-dui-badge ce-dui-badge-lg h-[2em] text-2xl xl:text-base w-[12.1em]");
|
103
|
+
},
|
104
|
+
m(o, n) {
|
105
|
+
x(o, t, n), l(t, a);
|
106
|
+
},
|
107
|
+
p(o, n) {
|
108
|
+
n[0] & /*$_, $faceValidationAlert*/
|
109
|
+
67239936 && i !== (i = /*$_*/
|
110
|
+
o[26](`${/*$faceValidationAlert*/
|
111
|
+
o[17]}`) + "") && z(a, i);
|
112
|
+
},
|
113
|
+
d(o) {
|
114
|
+
o && ae(t);
|
115
|
+
}
|
116
|
+
};
|
117
|
+
}
|
118
|
+
function Hi(s) {
|
119
|
+
let t, i, a = (
|
120
|
+
/*$_*/
|
121
|
+
s[26]("faceCollector.finish") + ""
|
122
|
+
), o, n, u, r, _ = (
|
123
|
+
/*$_*/
|
124
|
+
s[26]("faceCollector.retakePhoto") + ""
|
125
|
+
), g, p, b;
|
126
|
+
return {
|
127
|
+
c() {
|
128
|
+
t = v("div"), i = v("button"), o = J(a), u = U(), r = v("button"), g = J(_), i.disabled = n = /*$justification*/
|
129
|
+
s[20].length === 0, f(i, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), f(r, "id", "bry-cc-retake-button"), f(r, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), f(t, "class", "ce-dui-btn-group flex");
|
130
|
+
},
|
131
|
+
m(d, c) {
|
132
|
+
x(d, t, c), l(t, i), l(i, o), l(t, u), l(t, r), l(r, g), p || (b = [
|
133
|
+
oe(
|
134
|
+
i,
|
135
|
+
"click",
|
136
|
+
/*click_handler*/
|
137
|
+
s[46]
|
138
|
+
),
|
139
|
+
oe(
|
140
|
+
r,
|
141
|
+
"click",
|
142
|
+
/*click_handler_1*/
|
143
|
+
s[47]
|
144
|
+
)
|
145
|
+
], p = !0);
|
146
|
+
},
|
147
|
+
p(d, c) {
|
148
|
+
c[0] & /*$_*/
|
149
|
+
67108864 && a !== (a = /*$_*/
|
150
|
+
d[26]("faceCollector.finish") + "") && z(o, a), c[0] & /*$justification*/
|
151
|
+
1048576 && n !== (n = /*$justification*/
|
152
|
+
d[20].length === 0) && (i.disabled = n), c[0] & /*$_*/
|
153
|
+
67108864 && _ !== (_ = /*$_*/
|
154
|
+
d[26]("faceCollector.retakePhoto") + "") && z(g, _);
|
155
|
+
},
|
156
|
+
i: Z,
|
157
|
+
o: Z,
|
158
|
+
d(d) {
|
159
|
+
d && ae(t), p = !1, We(b);
|
160
|
+
}
|
161
|
+
};
|
162
|
+
}
|
163
|
+
function Ui(s) {
|
164
|
+
let t, i;
|
165
|
+
return t = new Mi({
|
166
|
+
props: {
|
167
|
+
id: "bry-cc-capture-btn",
|
168
|
+
disabled: !/*$faceFound*/
|
169
|
+
s[25] && /*$enableFaceApi*/
|
170
|
+
s[23] || !/*$ready*/
|
171
|
+
s[24] && !/*$enableFaceApi*/
|
172
|
+
s[23],
|
173
|
+
hidden: (
|
174
|
+
/*$cameraStatusStore*/
|
175
|
+
s[13] !== X.OK
|
176
|
+
),
|
177
|
+
handler: (
|
178
|
+
/*capture*/
|
179
|
+
s[31]
|
180
|
+
)
|
181
|
+
}
|
182
|
+
}), {
|
183
|
+
c() {
|
184
|
+
Ee(t.$$.fragment);
|
185
|
+
},
|
186
|
+
m(a, o) {
|
187
|
+
De(t, a, o), i = !0;
|
188
|
+
},
|
189
|
+
p(a, o) {
|
190
|
+
const n = {};
|
191
|
+
o[0] & /*$faceFound, $enableFaceApi, $ready*/
|
192
|
+
58720256 && (n.disabled = !/*$faceFound*/
|
193
|
+
a[25] && /*$enableFaceApi*/
|
194
|
+
a[23] || !/*$ready*/
|
195
|
+
a[24] && !/*$enableFaceApi*/
|
196
|
+
a[23]), o[0] & /*$cameraStatusStore*/
|
197
|
+
8192 && (n.hidden = /*$cameraStatusStore*/
|
198
|
+
a[13] !== X.OK), t.$set(n);
|
199
|
+
},
|
200
|
+
i(a) {
|
201
|
+
i || (j(t.$$.fragment, a), i = !0);
|
202
|
+
},
|
203
|
+
o(a) {
|
204
|
+
Y(t.$$.fragment, a), i = !1;
|
205
|
+
},
|
206
|
+
d(a) {
|
207
|
+
Oe(t, a);
|
208
|
+
}
|
209
|
+
};
|
210
|
+
}
|
211
|
+
function Vi(s) {
|
212
|
+
let t, i;
|
213
|
+
return t = new Ni({ props: { handler: (
|
214
|
+
/*func*/
|
215
|
+
s[55]
|
216
|
+
) } }), {
|
217
|
+
c() {
|
218
|
+
Ee(t.$$.fragment);
|
219
|
+
},
|
220
|
+
m(a, o) {
|
221
|
+
De(t, a, o), i = !0;
|
222
|
+
},
|
223
|
+
p: Z,
|
224
|
+
i(a) {
|
225
|
+
i || (j(t.$$.fragment, a), i = !0);
|
226
|
+
},
|
227
|
+
o(a) {
|
228
|
+
Y(t.$$.fragment, a), i = !1;
|
229
|
+
},
|
230
|
+
d(a) {
|
231
|
+
Oe(t, a);
|
232
|
+
}
|
233
|
+
};
|
234
|
+
}
|
235
|
+
function Ki(s) {
|
236
|
+
let t, i, a, o, n, u, r, _, g;
|
237
|
+
const p = [Yi, Xi, ji, qi], b = [];
|
238
|
+
function d(c, A) {
|
239
|
+
return (
|
240
|
+
/*$captured*/
|
241
|
+
c[15] ? (
|
242
|
+
/*$requestResult*/
|
243
|
+
c[18] !== et.OK ? 1 : (
|
244
|
+
/*$saved*/
|
245
|
+
c[19] ? 3 : 2
|
246
|
+
)
|
247
|
+
) : 0
|
248
|
+
);
|
249
|
+
}
|
250
|
+
return u = d(s), r = b[u] = p[u](s), {
|
251
|
+
c() {
|
252
|
+
t = v("div"), i = v("img"), n = U(), r.c(), f(i, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), kt(i.src, a = /*$dataTypePrefix*/
|
253
|
+
s[22] + "," + /*$image*/
|
254
|
+
s[21]) || f(i, "src", a), i.hidden = o = !/*$captured*/
|
255
|
+
s[15] || !/*$showFaceWhileValidating*/
|
256
|
+
s[27], f(i, "alt", ""), f(t, "class", _ = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
|
257
|
+
s[27] ? "grid m-[1em] overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"));
|
258
|
+
},
|
259
|
+
m(c, A) {
|
260
|
+
x(c, t, A), l(t, i), l(t, n), b[u].m(t, null), g = !0;
|
261
|
+
},
|
262
|
+
p(c, A) {
|
263
|
+
(!g || A[0] & /*$dataTypePrefix, $image*/
|
264
|
+
6291456 && !kt(i.src, a = /*$dataTypePrefix*/
|
265
|
+
c[22] + "," + /*$image*/
|
266
|
+
c[21])) && f(i, "src", a), (!g || A[0] & /*$captured, $showFaceWhileValidating*/
|
267
|
+
134250496 && o !== (o = !/*$captured*/
|
268
|
+
c[15] || !/*$showFaceWhileValidating*/
|
269
|
+
c[27])) && (i.hidden = o);
|
270
|
+
let k = u;
|
271
|
+
u = d(c), u === k ? b[u].p(c, A) : (ke(), Y(b[k], 1, 1, () => {
|
272
|
+
b[k] = null;
|
273
|
+
}), ye(), r = b[u], r ? r.p(c, A) : (r = b[u] = p[u](c), r.c()), j(r, 1), r.m(t, null)), (!g || A[0] & /*$showFaceWhileValidating*/
|
274
|
+
134217728 && _ !== (_ = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
|
275
|
+
c[27] ? "grid m-[1em] overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"))) && f(t, "class", _);
|
276
|
+
},
|
277
|
+
i(c) {
|
278
|
+
g || (j(r), g = !0);
|
279
|
+
},
|
280
|
+
o(c) {
|
281
|
+
Y(r), g = !1;
|
282
|
+
},
|
283
|
+
d(c) {
|
284
|
+
c && ae(t), b[u].d();
|
285
|
+
}
|
286
|
+
};
|
287
|
+
}
|
288
|
+
function qi(s) {
|
289
|
+
let t, i, a = (
|
290
|
+
/*$_*/
|
291
|
+
s[26]("docCollector.captured") + ""
|
292
|
+
), o, n, u, r, _ = (
|
293
|
+
/*$_*/
|
294
|
+
s[26]("faceCollector.retakePhoto") + ""
|
295
|
+
), g, p, b = Ii(Li).faceStrategy !== Fi.DISABLED, d, c, A, k = b && Ji();
|
296
|
+
return {
|
297
|
+
c() {
|
298
|
+
t = v("div"), i = v("h1"), o = J(a), n = U(), u = v("div"), r = v("button"), g = J(_), p = U(), k && k.c(), f(i, "class", "text-3xl font-bold pb-[1em] transition-opacity"), f(r, "id", "bry-cc-retake-button"), f(r, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), f(u, "class", "flex flex-row"), yt(u, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
299
|
+
s[28]);
|
300
|
+
},
|
301
|
+
m(C, I) {
|
302
|
+
x(C, t, I), l(t, i), l(i, o), l(t, n), l(t, u), l(u, r), l(r, g), l(u, p), k && k.m(u, null), d = !0, c || (A = oe(
|
303
|
+
r,
|
304
|
+
"click",
|
305
|
+
/*click_handler_6*/
|
306
|
+
s[54]
|
307
|
+
), c = !0);
|
308
|
+
},
|
309
|
+
p(C, I) {
|
310
|
+
(!d || I[0] & /*$_*/
|
311
|
+
67108864) && a !== (a = /*$_*/
|
312
|
+
C[26]("docCollector.captured") + "") && z(o, a), (!d || I[0] & /*$_*/
|
313
|
+
67108864) && _ !== (_ = /*$_*/
|
314
|
+
C[26]("faceCollector.retakePhoto") + "") && z(g, _), (!d || I[0] & /*$exportButtonDisabled*/
|
315
|
+
268435456) && yt(u, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
316
|
+
C[28]);
|
317
|
+
},
|
318
|
+
i(C) {
|
319
|
+
d || (j(k), d = !0);
|
320
|
+
},
|
321
|
+
o(C) {
|
322
|
+
Y(k), d = !1;
|
323
|
+
},
|
324
|
+
d(C) {
|
325
|
+
C && ae(t), k && k.d(), c = !1, A();
|
326
|
+
}
|
327
|
+
};
|
328
|
+
}
|
329
|
+
function ji(s) {
|
330
|
+
let t, i, a = (
|
331
|
+
/*$_*/
|
332
|
+
s[26]("faceCollector.unconformities") + ""
|
333
|
+
), o, n, u, r, _, g = (
|
334
|
+
/*$_*/
|
335
|
+
s[26]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
336
|
+
), p, b, d, c, A, k, C, I, P = (
|
337
|
+
/*$_*/
|
338
|
+
s[26]("faceCollector.thisInformationIsRequired") + ""
|
339
|
+
), L, $, S, B, Q, O = (
|
340
|
+
/*$captured*/
|
341
|
+
s[15] && Pt(s)
|
342
|
+
);
|
343
|
+
return {
|
344
|
+
c() {
|
345
|
+
t = v("div"), i = v("h1"), o = J(a), n = U(), u = v("div"), r = v("label"), _ = v("span"), p = J(g), b = U(), d = v("textarea"), A = U(), k = v("label"), C = v("span"), I = J("("), L = J(P), $ = J(")"), S = U(), O && O.c(), f(i, "class", "text-3xl font-bold pb-[1em] transition-opacity"), f(_, "class", "ce-dui-label-text text-base"), f(r, "class", "ce-dui-label"), f(r, "for", "justification"), f(d, "contenteditable", ""), f(d, "id", "justification"), f(d, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), f(d, "placeholder", c = /*$_*/
|
346
|
+
s[26]("faceCollector.yourJustification")), f(C, "class", "ce-dui-label-text-alt text-base"), f(k, "class", "ce-dui-label"), f(k, "for", "justification"), f(u, "class", "ce-dui-form-control mt-[2.5em]");
|
347
|
+
},
|
348
|
+
m(w, R) {
|
349
|
+
x(w, t, R), l(t, i), l(i, o), l(t, n), l(t, u), l(u, r), l(r, _), l(_, p), l(u, b), l(u, d), Et(
|
350
|
+
d,
|
351
|
+
/*$justification*/
|
352
|
+
s[20]
|
353
|
+
), l(u, A), l(u, k), l(k, C), l(C, I), l(C, L), l(C, $), l(t, S), O && O.m(t, null), B || (Q = oe(
|
354
|
+
d,
|
355
|
+
"input",
|
356
|
+
/*textarea_input_handler*/
|
357
|
+
s[51]
|
358
|
+
), B = !0);
|
359
|
+
},
|
360
|
+
p(w, R) {
|
361
|
+
R[0] & /*$_*/
|
362
|
+
67108864 && a !== (a = /*$_*/
|
363
|
+
w[26]("faceCollector.unconformities") + "") && z(o, a), R[0] & /*$_*/
|
364
|
+
67108864 && g !== (g = /*$_*/
|
365
|
+
w[26]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && z(p, g), R[0] & /*$_*/
|
366
|
+
67108864 && c !== (c = /*$_*/
|
367
|
+
w[26]("faceCollector.yourJustification")) && f(d, "placeholder", c), R[0] & /*$justification*/
|
368
|
+
1048576 && Et(
|
369
|
+
d,
|
370
|
+
/*$justification*/
|
371
|
+
w[20]
|
372
|
+
), R[0] & /*$_*/
|
373
|
+
67108864 && P !== (P = /*$_*/
|
374
|
+
w[26]("faceCollector.thisInformationIsRequired") + "") && z(L, P), /*$captured*/
|
375
|
+
w[15] ? O ? O.p(w, R) : (O = Pt(w), O.c(), O.m(t, null)) : O && (O.d(1), O = null);
|
376
|
+
},
|
377
|
+
i: Z,
|
378
|
+
o: Z,
|
379
|
+
d(w) {
|
380
|
+
w && ae(t), O && O.d(), B = !1, Q();
|
381
|
+
}
|
382
|
+
};
|
383
|
+
}
|
384
|
+
function Xi(s) {
|
385
|
+
let t, i, a = (
|
386
|
+
/*$_*/
|
387
|
+
s[26]("faceCollector.everythingOk") + ""
|
388
|
+
), o, n, u, r, _ = (
|
389
|
+
/*$_*/
|
390
|
+
s[26]("faceCollector.finish") + ""
|
391
|
+
), g, p, b, d = (
|
392
|
+
/*$_*/
|
393
|
+
s[26]("faceCollector.retakePhoto") + ""
|
394
|
+
), c, A, k;
|
395
|
+
return {
|
396
|
+
c() {
|
397
|
+
t = v("div"), i = v("h1"), o = J(a), n = U(), u = v("div"), r = v("button"), g = J(_), p = U(), b = v("button"), c = J(d), f(i, "class", "text-3xl font-bold pb-[1em] transition-opacity"), r.disabled = !0, f(r, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), f(b, "id", "bry-cc-retake-button"), f(b, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), f(u, "class", "ce-dui-btn-group flex"), f(t, "class", "flex flex-col justify-between");
|
398
|
+
},
|
399
|
+
m(C, I) {
|
400
|
+
x(C, t, I), l(t, i), l(i, o), l(t, n), l(t, u), l(u, r), l(r, g), l(u, p), l(u, b), l(b, c), A || (k = [
|
401
|
+
oe(
|
402
|
+
r,
|
403
|
+
"click",
|
404
|
+
/*click_handler_2*/
|
405
|
+
s[49]
|
406
|
+
),
|
407
|
+
oe(
|
408
|
+
b,
|
409
|
+
"click",
|
410
|
+
/*click_handler_3*/
|
411
|
+
s[50]
|
412
|
+
)
|
413
|
+
], A = !0);
|
414
|
+
},
|
415
|
+
p(C, I) {
|
416
|
+
I[0] & /*$_*/
|
417
|
+
67108864 && a !== (a = /*$_*/
|
418
|
+
C[26]("faceCollector.everythingOk") + "") && z(o, a), I[0] & /*$_*/
|
419
|
+
67108864 && _ !== (_ = /*$_*/
|
420
|
+
C[26]("faceCollector.finish") + "") && z(g, _), I[0] & /*$_*/
|
421
|
+
67108864 && d !== (d = /*$_*/
|
422
|
+
C[26]("faceCollector.retakePhoto") + "") && z(c, d);
|
423
|
+
},
|
424
|
+
i: Z,
|
425
|
+
o: Z,
|
426
|
+
d(C) {
|
427
|
+
C && ae(t), A = !1, We(k);
|
428
|
+
}
|
429
|
+
};
|
430
|
+
}
|
431
|
+
function Yi(s) {
|
432
|
+
let t;
|
433
|
+
return {
|
434
|
+
c() {
|
435
|
+
t = v("div"), f(t, "class", "");
|
436
|
+
},
|
437
|
+
m(i, a) {
|
438
|
+
x(i, t, a);
|
439
|
+
},
|
440
|
+
p: Z,
|
441
|
+
i: Z,
|
442
|
+
o: Z,
|
443
|
+
d(i) {
|
444
|
+
i && ae(t);
|
445
|
+
}
|
446
|
+
};
|
447
|
+
}
|
448
|
+
function Ji(s) {
|
449
|
+
let t, i;
|
450
|
+
return t = new Bi({
|
451
|
+
props: { cssClass: "ce-dui-btn-block flex-shrink" }
|
452
|
+
}), {
|
453
|
+
c() {
|
454
|
+
Ee(t.$$.fragment);
|
455
|
+
},
|
456
|
+
m(a, o) {
|
457
|
+
De(t, a, o), i = !0;
|
458
|
+
},
|
459
|
+
i(a) {
|
460
|
+
i || (j(t.$$.fragment, a), i = !0);
|
461
|
+
},
|
462
|
+
o(a) {
|
463
|
+
Y(t.$$.fragment, a), i = !1;
|
464
|
+
},
|
465
|
+
d(a) {
|
466
|
+
Oe(t, a);
|
467
|
+
}
|
468
|
+
};
|
469
|
+
}
|
470
|
+
function Pt(s) {
|
471
|
+
let t, i, a = (
|
472
|
+
/*$_*/
|
473
|
+
s[26]("faceCollector.finish") + ""
|
474
|
+
), o, n, u, r, _ = (
|
475
|
+
/*$_*/
|
476
|
+
s[26]("faceCollector.retakePhoto") + ""
|
477
|
+
), g, p, b;
|
478
|
+
return {
|
479
|
+
c() {
|
480
|
+
t = v("div"), i = v("button"), o = J(a), u = U(), r = v("button"), g = J(_), i.disabled = n = /*$justification*/
|
481
|
+
s[20].length === 0, f(i, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), f(r, "id", "bry-cc-retake-button"), f(r, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), f(t, "class", "ce-dui-btn-group flex");
|
482
|
+
},
|
483
|
+
m(d, c) {
|
484
|
+
x(d, t, c), l(t, i), l(i, o), l(t, u), l(t, r), l(r, g), p || (b = [
|
485
|
+
oe(
|
486
|
+
i,
|
487
|
+
"click",
|
488
|
+
/*click_handler_4*/
|
489
|
+
s[52]
|
490
|
+
),
|
491
|
+
oe(
|
492
|
+
r,
|
493
|
+
"click",
|
494
|
+
/*click_handler_5*/
|
495
|
+
s[53]
|
496
|
+
)
|
497
|
+
], p = !0);
|
498
|
+
},
|
499
|
+
p(d, c) {
|
500
|
+
c[0] & /*$_*/
|
501
|
+
67108864 && a !== (a = /*$_*/
|
502
|
+
d[26]("faceCollector.finish") + "") && z(o, a), c[0] & /*$justification*/
|
503
|
+
1048576 && n !== (n = /*$justification*/
|
504
|
+
d[20].length === 0) && (i.disabled = n), c[0] & /*$_*/
|
505
|
+
67108864 && _ !== (_ = /*$_*/
|
506
|
+
d[26]("faceCollector.retakePhoto") + "") && z(g, _);
|
507
|
+
},
|
508
|
+
d(d) {
|
509
|
+
d && ae(t), p = !1, We(b);
|
510
|
+
}
|
511
|
+
};
|
512
|
+
}
|
513
|
+
function zi(s) {
|
514
|
+
let t, i, a, o, n = (
|
515
|
+
/*unique*/
|
516
|
+
s[9]
|
517
|
+
), u, r, _, g, p, b, d, c, A, k, C, I, P, L, $, S, B, Q, O = Dt(s), w = (
|
518
|
+
/*showConfigButton*/
|
519
|
+
s[1] && Ot()
|
520
|
+
), R = (
|
521
|
+
/*showCameraButton*/
|
522
|
+
s[2] && Rt()
|
523
|
+
), K = (
|
524
|
+
/*isCountingDown*/
|
525
|
+
s[8] && Tt(s)
|
526
|
+
), V = (
|
527
|
+
/*$enableFaceApi*/
|
528
|
+
s[23] && !/*isCountingDown*/
|
529
|
+
s[8] && /*$faceFound*/
|
530
|
+
s[25] && !/*$faceValidated*/
|
531
|
+
s[16] && /*$faceValidationAlert*/
|
532
|
+
s[17] && At(s)
|
533
|
+
);
|
534
|
+
const he = [Ui, Hi], ee = [];
|
535
|
+
function me(h, q) {
|
536
|
+
return !/*$captured*/
|
537
|
+
h[15] || !/*showAutoCaptureButton*/
|
538
|
+
h[3] ? 0 : 1;
|
539
|
+
}
|
540
|
+
P = me(s), L = ee[P] = he[P](s);
|
541
|
+
const D = [Ki, Vi], W = [];
|
542
|
+
function te(h, q) {
|
543
|
+
return (
|
544
|
+
/*showUnconformities*/
|
545
|
+
h[0] && (!/*idrndClosed*/
|
546
|
+
h[12] || /*$captured*/
|
547
|
+
h[15]) ? 0 : (
|
548
|
+
/*$cameraStatusStore*/
|
549
|
+
h[13] !== X.OK ? 1 : -1
|
550
|
+
)
|
551
|
+
);
|
552
|
+
}
|
553
|
+
return ~(S = te(s)) && (B = W[S] = D[S](s)), {
|
554
|
+
c() {
|
555
|
+
t = v("div"), i = v("div"), a = v("div"), o = v("div"), O.c(), u = U(), w && w.c(), r = U(), R && R.c(), _ = U(), g = v("canvas"), p = U(), b = v("canvas"), d = U(), c = v("canvas"), A = U(), K && K.c(), k = U(), V && V.c(), I = U(), L.c(), $ = U(), B && B.c(), this.c = Z, f(g, "id", "bry-ce-displayCanvas"), f(g, "class", "max-w-full"), f(b, "id", "bry-ce-detectionsCanvas"), f(b, "class", "absolute top-0 left-0 max-w-full"), f(c, "id", "bry-ce-maskCanvas"), f(c, "class", "absolute top-0 left-0 max-w-full"), f(o, "class", "relative"), o.hidden = C = /*$cameraStatusStore*/
|
556
|
+
s[13] !== X.OK, f(a, "class", "relative mx-auto"), f(i, "class", "flex flex-col justify-between");
|
557
|
+
},
|
558
|
+
m(h, q) {
|
559
|
+
x(h, t, q), l(t, i), l(i, a), l(a, o), O.m(o, null), l(o, u), w && w.m(o, null), l(o, r), R && R.m(o, null), l(o, _), l(o, g), s[43](g), l(o, p), l(o, b), s[44](b), l(o, d), l(o, c), s[45](c), l(o, A), K && K.m(o, null), l(o, k), V && V.m(o, null), l(a, I), ee[P].m(a, null), s[48](i), l(t, $), ~S && W[S].m(t, null), Q = !0;
|
560
|
+
},
|
561
|
+
p(h, q) {
|
562
|
+
q[0] & /*unique*/
|
563
|
+
512 && It(n, n = /*unique*/
|
564
|
+
h[9]) ? (O.d(1), O = Dt(h), O.c(), O.m(o, u)) : O.p(h, q), /*showConfigButton*/
|
565
|
+
h[1] ? w ? q[0] & /*showConfigButton*/
|
566
|
+
2 && j(w, 1) : (w = Ot(), w.c(), j(w, 1), w.m(o, r)) : w && (ke(), Y(w, 1, 1, () => {
|
567
|
+
w = null;
|
568
|
+
}), ye()), /*showCameraButton*/
|
569
|
+
h[2] ? R ? q[0] & /*showCameraButton*/
|
570
|
+
4 && j(R, 1) : (R = Rt(), R.c(), j(R, 1), R.m(o, _)) : R && (ke(), Y(R, 1, 1, () => {
|
571
|
+
R = null;
|
572
|
+
}), ye()), /*isCountingDown*/
|
573
|
+
h[8] ? K ? K.p(h, q) : (K = Tt(h), K.c(), K.m(o, k)) : K && (K.d(1), K = null), /*$enableFaceApi*/
|
574
|
+
h[23] && !/*isCountingDown*/
|
575
|
+
h[8] && /*$faceFound*/
|
576
|
+
h[25] && !/*$faceValidated*/
|
577
|
+
h[16] && /*$faceValidationAlert*/
|
578
|
+
h[17] ? V ? V.p(h, q) : (V = At(h), V.c(), V.m(o, null)) : V && (V.d(1), V = null), (!Q || q[0] & /*$cameraStatusStore*/
|
579
|
+
8192 && C !== (C = /*$cameraStatusStore*/
|
580
|
+
h[13] !== X.OK)) && (o.hidden = C);
|
581
|
+
let re = P;
|
582
|
+
P = me(h), P === re ? ee[P].p(h, q) : (ke(), Y(ee[re], 1, 1, () => {
|
583
|
+
ee[re] = null;
|
584
|
+
}), ye(), L = ee[P], L ? L.p(h, q) : (L = ee[P] = he[P](h), L.c()), j(L, 1), L.m(a, null));
|
585
|
+
let ne = S;
|
586
|
+
S = te(h), S === ne ? ~S && W[S].p(h, q) : (B && (ke(), Y(W[ne], 1, 1, () => {
|
587
|
+
W[ne] = null;
|
588
|
+
}), ye()), ~S ? (B = W[S], B ? B.p(h, q) : (B = W[S] = D[S](h), B.c()), j(B, 1), B.m(t, null)) : B = null);
|
589
|
+
},
|
590
|
+
i(h) {
|
591
|
+
Q || (j(w), j(R), j(L), j(B), Q = !0);
|
592
|
+
},
|
593
|
+
o(h) {
|
594
|
+
Y(w), Y(R), Y(L), Y(B), Q = !1;
|
595
|
+
},
|
596
|
+
d(h) {
|
597
|
+
h && ae(t), O.d(h), w && w.d(), R && R.d(), s[43](null), s[44](null), s[45](null), K && K.d(), V && V.d(), ee[P].d(), s[48](null), ~S && W[S].d();
|
598
|
+
}
|
599
|
+
};
|
600
|
+
}
|
601
|
+
let Qi = !1, Gi = 5;
|
602
|
+
function St(s, t, i) {
|
603
|
+
const a = t.videoHeight >= t.videoWidth && i.height >= i.width || t.videoHeight < t.videoWidth && i.height < i.width;
|
604
|
+
s.drawImage(
|
605
|
+
t,
|
606
|
+
a ? 0 : t.videoWidth / 2 - i.width,
|
607
|
+
0,
|
608
|
+
a ? t.videoWidth : t.videoHeight * (i.width / i.height),
|
609
|
+
t.videoHeight,
|
610
|
+
0,
|
611
|
+
0,
|
612
|
+
i.width,
|
613
|
+
i.height
|
614
|
+
);
|
615
|
+
}
|
616
|
+
function Zi(s, t, i) {
|
617
|
+
let a, o, n, u, r, _, g, p, b, d, c, A, k, C, I, P, L, $, S, B, Q, O, w, R, K, V, he, ee, me;
|
618
|
+
T(s, Xe, (e) => i(65, a = e)), T(s, G, (e) => i(13, n = e)), T(s, di, (e) => i(67, u = e)), T(s, Se, (e) => i(68, r = e)), T(s, hi, (e) => i(69, _ = e)), T(s, pe, (e) => i(70, g = e)), T(s, de, (e) => i(14, p = e)), T(s, we, (e) => i(15, b = e)), T(s, Ye, (e) => i(71, d = e)), T(s, ft, (e) => i(72, c = e)), T(s, dt, (e) => i(73, A = e)), T(s, Je, (e) => i(16, k = e)), T(s, ht, (e) => i(17, C = e)), T(s, ze, (e) => i(74, I = e)), T(s, Qe, (e) => i(18, P = e)), T(s, Ie, (e) => i(19, L = e)), T(s, mt, (e) => i(20, $ = e)), T(s, bt, (e) => i(21, S = e)), T(s, gt, (e) => i(75, Q = e)), T(s, mi, (e) => i(23, O = e)), T(s, Le, (e) => i(24, w = e)), T(s, Ge, (e) => i(76, R = e)), T(s, _t, (e) => i(77, K = e)), T(s, pt, (e) => i(25, V = e)), T(s, bi, (e) => i(26, he = e)), T(s, gi, (e) => i(27, ee = e)), T(s, _i, (e) => i(28, me = e));
|
619
|
+
let D, W, te, h = !1, q = {}, re = !1, { enableMinutiae: ne } = t, { videoDimensions: Me } = t, { noTabs: Ne } = t, { weightsPath: He } = t, { showUnconformities: tt } = t, { videoOverlay: Re } = t, { videoOverlayTransparency: be } = t, { showConfigButton: it } = t, { showCameraButton: st } = t, { showAutoCaptureButton: at } = t;
|
620
|
+
const Te = Ct(!1);
|
621
|
+
T(s, Te, (e) => i(66, o = e));
|
622
|
+
const Ue = Ct("data:image/png;base64");
|
623
|
+
T(s, Ue, (e) => i(22, B = e));
|
624
|
+
let le, H, ot = !1, ge = !0, nt = 0, Ve = 0, Ae = !0, Ke = 0, qe = !1, y = {
|
625
|
+
topLeftX: 130,
|
626
|
+
topLeftY: 70,
|
627
|
+
width: 540,
|
628
|
+
height: 400
|
629
|
+
};
|
630
|
+
pi.mixin({
|
631
|
+
toast: !0,
|
632
|
+
position: "bottom-left",
|
633
|
+
timer: 13e3,
|
634
|
+
timerProgressBar: !0
|
635
|
+
}), wi(async () => {
|
636
|
+
m(Le, w = !1, w), m(pt, V = !1, V), m(we, b = !1, b), m(dt, A = !0, A), m(Se, r = Ze.REAR_CAMERA, r), m(G, n = X.OK, n), await je(), O && (await vi(He), re = !0), Bt();
|
637
|
+
});
|
638
|
+
function Lt() {
|
639
|
+
const e = p.videoWidth, M = p.videoHeight, F = e * 0.85, E = F * 0.6;
|
640
|
+
y.topLeftX = (e - F) / 2, y.topLeftY = (M - E) / 1.42, Ae || (y.topLeftX = (e - F) / 2, y.topLeftY = (M - E) / 2), y.width = F, y.height = E, m(_t, K.width = F, K);
|
641
|
+
}
|
642
|
+
function lt(e, M) {
|
643
|
+
e.clearRect(0, 0, H.width, H.height), e.save(), Lt(), Re != "none" ? (be > 0 && (e.globalAlpha = be / 100), e.fillStyle = Re, e.fillRect(0, 0, H.width, H.height)) : (e.beginPath(), e.rect(0, 0, H.width, H.height)), e.rect(y.topLeftX, y.topLeftY, y.width, y.height), be == 0 && e.clip(), St(e, M, H), e.restore(), e.save(), e.beginPath();
|
644
|
+
const F = window.getComputedStyle(H).getPropertyValue("--p"), E = window.getComputedStyle(H).getPropertyValue("--su");
|
645
|
+
if (e.strokeStyle = `hsl(${F})`, e.lineWidth = 12, e.lineJoin = "round", e.setLineDash([28, 8]), e.rect(y.topLeftX, y.topLeftY, y.width, y.height), e.stroke(), h && !qe) {
|
646
|
+
const ie = 1 - (Ke - (/* @__PURE__ */ new Date()).getTime()) / 4500;
|
647
|
+
e.save(), e.beginPath(), e.setLineDash([]), e.lineWidth = 14, e.strokeStyle = `hsl(${E})`;
|
648
|
+
const fe = y.width * 3 * ie, ut = y.height * 2 * ie, li = fe < y.width ? fe : y.width, ri = ut < y.height ? ut : y.height;
|
649
|
+
e.rect(y.topLeftX, y.topLeftY, li, ri), e.stroke();
|
650
|
+
}
|
651
|
+
e.beginPath();
|
652
|
+
const N = new Path2D();
|
653
|
+
N.rect(y.topLeftX, y.topLeftY, y.width, y.height), e.clip(N), St(e, M, H), e.restore();
|
654
|
+
}
|
655
|
+
function rt() {
|
656
|
+
m(G, n = X.OK, n), ot = !0, i(12, ge = !1);
|
657
|
+
}
|
658
|
+
async function _e() {
|
659
|
+
if (O && !re)
|
660
|
+
return ve(D, _e);
|
661
|
+
if (D) {
|
662
|
+
if (R !== $e.Document && !Ne)
|
663
|
+
return ve(D, _e);
|
664
|
+
m(Le, w = !0, w), O ? (o || m(Te, o = !0, o), lt(H.getContext("2d"), D), ve(D, _e)) : (lt(H.getContext("2d"), D), ve(D, _e));
|
665
|
+
}
|
666
|
+
}
|
667
|
+
async function Ft() {
|
668
|
+
Q && (vt(), m(gt, Q = !1, Q)), m(Qe, P = et.OK, P), m(we, b = !0, b), m(Ie, L = !0, L);
|
669
|
+
const e = document.createElement("canvas"), M = e.getContext("2d");
|
670
|
+
e.width = y.width, e.height = y.height, M?.drawImage(D, y.topLeftX, y.topLeftY, y.width, y.height, 0, 0, e.width, e.height);
|
671
|
+
const F = e.toDataURL("image/jpeg").split(",");
|
672
|
+
m(Ue, B = F[0], B), m(bt, S = F[1], S), m(ze, I = F[1], I);
|
673
|
+
const E = [{ data: I }];
|
674
|
+
window.dispatchEvent(new CustomEvent(
|
675
|
+
"document-unconformities-validated",
|
676
|
+
{
|
677
|
+
detail: { bodyParts: E, status: P }
|
678
|
+
}
|
679
|
+
));
|
680
|
+
}
|
681
|
+
function Pe() {
|
682
|
+
const e = {
|
683
|
+
bodyPart: "DOCUMENT",
|
684
|
+
data: S,
|
685
|
+
justification: $
|
686
|
+
};
|
687
|
+
m(Ie, L = !0, L), window.dispatchEvent(new CustomEvent("export-document", { detail: e }));
|
688
|
+
}
|
689
|
+
function ce() {
|
690
|
+
window.dispatchEvent(new CustomEvent("document-scrapped")), m(Ie, L = !1, L), m(Qe, P = et.OK, P), m(we, b = !1, b), m(ze, I = "", I), m(ht, C = "", C), m(Je, k = !0, k), ge && rt();
|
691
|
+
}
|
692
|
+
async function je(e) {
|
693
|
+
const [M, F] = (Me ?? "")?.replaceAll(" ", "")?.split("x")?.map((E) => E ? parseInt(E) : void 0);
|
694
|
+
if (!(!M || !F)) {
|
695
|
+
m(de, p = { videoWidth: M, videoHeight: F }, p);
|
696
|
+
try {
|
697
|
+
const { deviceId: E, width: N, height: ie, aspectRatio: fe } = await Ci(M, F, r, e);
|
698
|
+
fe && fe < 1 && xe() ? m(
|
699
|
+
de,
|
700
|
+
p = {
|
701
|
+
videoWidth: ie,
|
702
|
+
videoHeight: N
|
703
|
+
},
|
704
|
+
p
|
705
|
+
) : m(
|
706
|
+
de,
|
707
|
+
p = {
|
708
|
+
videoWidth: N,
|
709
|
+
videoHeight: ie
|
710
|
+
},
|
711
|
+
p
|
712
|
+
), m(pe, g = E || _[0].deviceId, g), m(G, n = X.OK, n);
|
713
|
+
} catch (E) {
|
714
|
+
const N = E;
|
715
|
+
i(12, ge = !0);
|
716
|
+
const ie = Fe(E) && E.constraint ? E.constraint : "";
|
717
|
+
console.error(N, ie), Fe(N) && "message" in N && N.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), m(G, n = X.CAMERA_DENIED_ERROR, n)), Fe(N) && "message" in N && N.message.includes("Requested device not found") && m(G, n = X.DEVICE_NOT_FOUND_ERROR, n), (ie.includes("width") || ie.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${ie})`), m(G, n = X.CAMERA_UNSUPPORTED, n));
|
718
|
+
}
|
719
|
+
}
|
720
|
+
}
|
721
|
+
async function ue() {
|
722
|
+
m(pe, g = "", g), await je();
|
723
|
+
}
|
724
|
+
function Bt() {
|
725
|
+
navigator.mediaDevices.ondevicechange = async (e) => {
|
726
|
+
await wt(), n !== X.OK ? await ue() : c.active || (Be(), m(G, n = X.DEVICE_NOT_FOUND_ERROR, n));
|
727
|
+
};
|
728
|
+
}
|
729
|
+
const Wt = de.subscribe((e) => {
|
730
|
+
D && W && (i(5, D.width = e.videoWidth, D), i(5, D.height = e.videoHeight, D), i(6, W.width = e.videoWidth, W), i(6, W.height = e.videoHeight, W), i(10, le.width = e.videoWidth, le), i(10, le.height = e.videoHeight, le), i(11, H.width = e.videoWidth, H), i(11, H.height = e.videoHeight, H));
|
731
|
+
}), Mt = ki.subscribe((e) => {
|
732
|
+
if (u != "DOCUMENT")
|
733
|
+
return;
|
734
|
+
let M = "", F = !1;
|
735
|
+
if (e.isPersonCloseEnough ? e.isPersonTooclose ? M = "docCollector.moveAwayCamera" : e.isPersonInFrame ? F = !0 : M = "docCollector.stayInFrame" : M = "docCollector.comeCloserCamera", yi(F, M), !b && A && !h && e.isPersonInFrame && !(!e.isPersonCloseEnough || e.isPersonTooclose)) {
|
736
|
+
i(8, h = !0), m(Je, k = !0, k), Ke = (/* @__PURE__ */ new Date()).getTime() + 4500;
|
737
|
+
const E = setInterval(
|
738
|
+
() => {
|
739
|
+
if (!A || b || !e.isPersonCloseEnough || e.isPersonTooclose || !e.isPersonInFrame) {
|
740
|
+
i(8, h = !1), qe = !0, setTimeout(
|
741
|
+
() => {
|
742
|
+
qe = !1;
|
743
|
+
},
|
744
|
+
1500
|
745
|
+
), clearInterval(E);
|
746
|
+
return;
|
747
|
+
}
|
748
|
+
const N = (/* @__PURE__ */ new Date()).getTime();
|
749
|
+
Math.floor((Ke - N) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(E), i(8, h = !1), document.getElementsByTagName("biometric-collector")?.[0]?.shadowRoot?.getElementById("bry-cc-capture-btn")?.click());
|
750
|
+
},
|
751
|
+
250
|
752
|
+
);
|
753
|
+
}
|
754
|
+
}), Nt = we.subscribe((e) => {
|
755
|
+
te && (e ? (te.classList.remove("flex"), te.classList.add("hidden")) : (te.classList.add("flex"), te.classList.remove("hidden")));
|
756
|
+
}), Ht = Ye.subscribe((e) => {
|
757
|
+
D && e && (console.log("setting null in video srcObject"), i(5, D.srcObject = null, D), i(5, D.src = "", D), m(pe, g = null, g));
|
758
|
+
});
|
759
|
+
Ge.subscribe(async (e) => {
|
760
|
+
e === $e.Document && await wt();
|
761
|
+
});
|
762
|
+
const Ut = pe.subscribe(async (e) => {
|
763
|
+
if (!e || u != "DOCUMENT")
|
764
|
+
return;
|
765
|
+
D || i(9, q = {});
|
766
|
+
const { videoHeight: M, videoWidth: F } = p;
|
767
|
+
try {
|
768
|
+
const E = await Ei(F, M, e);
|
769
|
+
i(5, D.srcObject = E, D), m(ft, c = E, c), m(Ye, d = !1, d), Ae || m(G, n = X.CAMERA_ORIENTATION_LANDSCAPE, n);
|
770
|
+
} catch (E) {
|
771
|
+
const N = E;
|
772
|
+
i(12, ge = !0), Fe(N) && "message" in N && N.message.includes("Requested device not found") && m(G, n = X.DEVICE_NOT_FOUND_ERROR, n);
|
773
|
+
}
|
774
|
+
}), Vt = Ge.subscribe(async (e) => {
|
775
|
+
e === $e.Document && !ot && !b && Qi && await rt();
|
776
|
+
}), Kt = Te.subscribe(async (e) => {
|
777
|
+
e && ct();
|
778
|
+
}), qt = Le.subscribe((e) => {
|
779
|
+
e && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
780
|
+
}), jt = Di.subscribe(async (e) => {
|
781
|
+
if (p) {
|
782
|
+
if (Be(), !xe()) {
|
783
|
+
const F = (_.findIndex((N) => N.deviceId === g) + 1) % _.length, E = _[F].deviceId;
|
784
|
+
await je(E);
|
785
|
+
return;
|
786
|
+
}
|
787
|
+
e ? (m(Se, r = Ze.FRONT_CAMERA, r), await ue()) : (m(Se, r = Ze.REAR_CAMERA, r), await ue());
|
788
|
+
}
|
789
|
+
}), Xt = Oi.subscribe(async (e) => {
|
790
|
+
!e.isSupported || !xe() || u != "DOCUMENT" || (Be(), Ae = e.orientation.includes("landscape"), Ae ? m(G, n = X.OK, n) : m(G, n = X.CAMERA_ORIENTATION_LANDSCAPE, n), await ue());
|
791
|
+
});
|
792
|
+
async function ct() {
|
793
|
+
let e;
|
794
|
+
if (Ve >= Gi) {
|
795
|
+
Ve = 0;
|
796
|
+
const M = await Pi(), F = await import("./face_api_0e3ce8c8_2.2.14.js");
|
797
|
+
let E;
|
798
|
+
E = F.detectSingleFace(H, M), e = await E.withFaceLandmarks(), W.getContext("2d")?.clearRect(0, 0, W.width, W.height);
|
799
|
+
} else
|
800
|
+
Ve++;
|
801
|
+
e ? Si(e, W, ne, !0) : Ri(), o && ve(D, ct);
|
802
|
+
}
|
803
|
+
Xe.subscribe(async (e) => {
|
804
|
+
e && (ce(), m(Xe, a = !1, a));
|
805
|
+
}), Ti(() => {
|
806
|
+
Be(), Nt(), Mt(), Wt(), Ht(), Ut(), Vt(), clearInterval(nt), Kt(), jt(), qt(), Xt(), vt(), nt = 0;
|
807
|
+
});
|
808
|
+
function Yt(e) {
|
809
|
+
Ce[e ? "unshift" : "push"](() => {
|
810
|
+
D = e, i(5, D);
|
811
|
+
});
|
812
|
+
}
|
813
|
+
const Jt = () => {
|
814
|
+
m(
|
815
|
+
de,
|
816
|
+
p = {
|
817
|
+
videoHeight: D.videoHeight,
|
818
|
+
videoWidth: D.videoWidth
|
819
|
+
},
|
820
|
+
p
|
821
|
+
);
|
822
|
+
};
|
823
|
+
function zt(e) {
|
824
|
+
Ce[e ? "unshift" : "push"](() => {
|
825
|
+
H = e, i(11, H);
|
826
|
+
});
|
827
|
+
}
|
828
|
+
function Qt(e) {
|
829
|
+
Ce[e ? "unshift" : "push"](() => {
|
830
|
+
W = e, i(6, W);
|
831
|
+
});
|
832
|
+
}
|
833
|
+
function Gt(e) {
|
834
|
+
Ce[e ? "unshift" : "push"](() => {
|
835
|
+
le = e, i(10, le);
|
836
|
+
});
|
837
|
+
}
|
838
|
+
const Zt = () => Pe(), xt = () => ce();
|
839
|
+
function $t(e) {
|
840
|
+
Ce[e ? "unshift" : "push"](() => {
|
841
|
+
te = e, i(7, te);
|
842
|
+
});
|
843
|
+
}
|
844
|
+
const ei = () => Pe(), ti = () => ce();
|
845
|
+
function ii() {
|
846
|
+
$ = this.value, mt.set($);
|
847
|
+
}
|
848
|
+
const si = () => Pe(), ai = () => ce(), oi = () => ce(), ni = async () => {
|
849
|
+
await ue();
|
850
|
+
};
|
851
|
+
return s.$$set = (e) => {
|
852
|
+
"enableMinutiae" in e && i(35, ne = e.enableMinutiae), "videoDimensions" in e && i(36, Me = e.videoDimensions), "noTabs" in e && i(37, Ne = e.noTabs), "weightsPath" in e && i(38, He = e.weightsPath), "showUnconformities" in e && i(0, tt = e.showUnconformities), "videoOverlay" in e && i(39, Re = e.videoOverlay), "videoOverlayTransparency" in e && i(40, be = e.videoOverlayTransparency), "showConfigButton" in e && i(1, it = e.showConfigButton), "showCameraButton" in e && i(2, st = e.showCameraButton), "showAutoCaptureButton" in e && i(3, at = e.showAutoCaptureButton);
|
853
|
+
}, [
|
854
|
+
tt,
|
855
|
+
it,
|
856
|
+
st,
|
857
|
+
at,
|
858
|
+
_e,
|
859
|
+
D,
|
860
|
+
W,
|
861
|
+
te,
|
862
|
+
h,
|
863
|
+
q,
|
864
|
+
le,
|
865
|
+
H,
|
866
|
+
ge,
|
867
|
+
n,
|
868
|
+
p,
|
869
|
+
b,
|
870
|
+
k,
|
871
|
+
C,
|
872
|
+
P,
|
873
|
+
L,
|
874
|
+
$,
|
875
|
+
S,
|
876
|
+
B,
|
877
|
+
O,
|
878
|
+
w,
|
879
|
+
V,
|
880
|
+
he,
|
881
|
+
ee,
|
882
|
+
me,
|
883
|
+
Te,
|
884
|
+
Ue,
|
885
|
+
Ft,
|
886
|
+
Pe,
|
887
|
+
ce,
|
888
|
+
ue,
|
889
|
+
ne,
|
890
|
+
Me,
|
891
|
+
Ne,
|
892
|
+
He,
|
893
|
+
Re,
|
894
|
+
be,
|
895
|
+
Yt,
|
896
|
+
Jt,
|
897
|
+
zt,
|
898
|
+
Qt,
|
899
|
+
Gt,
|
900
|
+
Zt,
|
901
|
+
xt,
|
902
|
+
$t,
|
903
|
+
ei,
|
904
|
+
ti,
|
905
|
+
ii,
|
906
|
+
si,
|
907
|
+
ai,
|
908
|
+
oi,
|
909
|
+
ni
|
910
|
+
];
|
911
|
+
}
|
912
|
+
class xi extends ci {
|
913
|
+
constructor(t) {
|
914
|
+
super(), ui(
|
915
|
+
this,
|
916
|
+
{
|
917
|
+
target: this.shadowRoot,
|
918
|
+
props: fi(this.attributes),
|
919
|
+
customElement: !0
|
920
|
+
},
|
921
|
+
Zi,
|
922
|
+
zi,
|
923
|
+
It,
|
924
|
+
{
|
925
|
+
enableMinutiae: 35,
|
926
|
+
videoDimensions: 36,
|
927
|
+
noTabs: 37,
|
928
|
+
weightsPath: 38,
|
929
|
+
showUnconformities: 0,
|
930
|
+
videoOverlay: 39,
|
931
|
+
videoOverlayTransparency: 40,
|
932
|
+
showConfigButton: 1,
|
933
|
+
showCameraButton: 2,
|
934
|
+
showAutoCaptureButton: 3,
|
935
|
+
play: 4
|
936
|
+
},
|
937
|
+
null,
|
938
|
+
[-1, -1, -1, -1]
|
939
|
+
), t && (t.target && x(t.target, this, t.anchor), t.props && (this.$set(t.props), se()));
|
940
|
+
}
|
941
|
+
static get observedAttributes() {
|
942
|
+
return [
|
943
|
+
"enableMinutiae",
|
944
|
+
"videoDimensions",
|
945
|
+
"noTabs",
|
946
|
+
"weightsPath",
|
947
|
+
"showUnconformities",
|
948
|
+
"videoOverlay",
|
949
|
+
"videoOverlayTransparency",
|
950
|
+
"showConfigButton",
|
951
|
+
"showCameraButton",
|
952
|
+
"showAutoCaptureButton",
|
953
|
+
"play"
|
954
|
+
];
|
955
|
+
}
|
956
|
+
get enableMinutiae() {
|
957
|
+
return this.$$.ctx[35];
|
958
|
+
}
|
959
|
+
set enableMinutiae(t) {
|
960
|
+
this.$$set({ enableMinutiae: t }), se();
|
961
|
+
}
|
962
|
+
get videoDimensions() {
|
963
|
+
return this.$$.ctx[36];
|
964
|
+
}
|
965
|
+
set videoDimensions(t) {
|
966
|
+
this.$$set({ videoDimensions: t }), se();
|
967
|
+
}
|
968
|
+
get noTabs() {
|
969
|
+
return this.$$.ctx[37];
|
970
|
+
}
|
971
|
+
set noTabs(t) {
|
972
|
+
this.$$set({ noTabs: t }), se();
|
973
|
+
}
|
974
|
+
get weightsPath() {
|
975
|
+
return this.$$.ctx[38];
|
976
|
+
}
|
977
|
+
set weightsPath(t) {
|
978
|
+
this.$$set({ weightsPath: t }), se();
|
979
|
+
}
|
980
|
+
get showUnconformities() {
|
981
|
+
return this.$$.ctx[0];
|
982
|
+
}
|
983
|
+
set showUnconformities(t) {
|
984
|
+
this.$$set({ showUnconformities: t }), se();
|
985
|
+
}
|
986
|
+
get videoOverlay() {
|
987
|
+
return this.$$.ctx[39];
|
988
|
+
}
|
989
|
+
set videoOverlay(t) {
|
990
|
+
this.$$set({ videoOverlay: t }), se();
|
991
|
+
}
|
992
|
+
get videoOverlayTransparency() {
|
993
|
+
return this.$$.ctx[40];
|
994
|
+
}
|
995
|
+
set videoOverlayTransparency(t) {
|
996
|
+
this.$$set({ videoOverlayTransparency: t }), se();
|
997
|
+
}
|
998
|
+
get showConfigButton() {
|
999
|
+
return this.$$.ctx[1];
|
1000
|
+
}
|
1001
|
+
set showConfigButton(t) {
|
1002
|
+
this.$$set({ showConfigButton: t }), se();
|
1003
|
+
}
|
1004
|
+
get showCameraButton() {
|
1005
|
+
return this.$$.ctx[2];
|
1006
|
+
}
|
1007
|
+
set showCameraButton(t) {
|
1008
|
+
this.$$set({ showCameraButton: t }), se();
|
1009
|
+
}
|
1010
|
+
get showAutoCaptureButton() {
|
1011
|
+
return this.$$.ctx[3];
|
1012
|
+
}
|
1013
|
+
set showAutoCaptureButton(t) {
|
1014
|
+
this.$$set({ showAutoCaptureButton: t }), se();
|
1015
|
+
}
|
1016
|
+
get play() {
|
1017
|
+
return this.$$.ctx[4];
|
1018
|
+
}
|
1019
|
+
}
|
1020
|
+
customElements.define("document-collector", xi);
|
1021
|
+
export {
|
1022
|
+
xi as default
|
1023
|
+
};
|