bry-biometric-collector 2.2.22 → 2.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -19
- package/dist/DocumentCollector_f0541f51_2.2.23.js +1025 -0
- package/dist/FaceCollector_e8de37d8_2.2.23.js +1887 -0
- package/dist/WaterMark_99037cc5_2.2.23.js +1014 -0
- package/dist/bry-biometric-collector-main.js +1 -1
- package/dist/{en-us_901680c0_2.2.22.js → en-us_178afe03_2.2.23.js} +7 -8
- package/dist/{es-cl_1fe1aaa9_2.2.22.js → es-cl_ff8fb88a_2.2.23.js} +1 -2
- package/dist/{fingersApi_2ff95966_2.2.22.js → fingersApi_ddc728a6_2.2.23.js} +1 -1
- package/dist/index.d.ts +3 -13
- package/dist/index.js +1 -1
- package/dist/{main_140d65a3_2.2.22.js → main_af3a4af6_2.2.23.js} +3702 -3718
- package/dist/{pt-br_bef1149f_2.2.22.js → pt-br_feaadca5_2.2.23.js} +2 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/DocumentCollector_1f5cf5e8_2.2.22.js +0 -1023
- package/dist/FaceCollector_657bc65e_2.2.22.js +0 -2000
- package/dist/TakePictureBtn_98c2ad5f_2.2.22.js +0 -848
- /package/dist/{face_api_0e3ce8c8_2.2.22.js → face_api_0e3ce8c8_2.2.23.js} +0 -0
- /package/dist/{index-no-detector_4b302e78_2.2.22.js → index-no-detector_4b302e78_2.2.23.js} +0 -0
@@ -1,1023 +0,0 @@
|
|
1
|
-
import { S as ci, q as ui, r as Lt, t as fi, w as x, L as se, x as v, N as V, z as Z, B as f, D as l, O as Y, P as ke, Q as X, R as ye, H as oe, I as T, T as Xe, U as di, V as Se, X as hi, W as pe, Y as de, Z as we, _ as Je, a0 as dt, J as ht, a1 as Qe, a3 as mt, a5 as ze, a6 as Ge, a7 as Le, a8 as bt, a9 as gt, ad as _t, ab as mi, af as Ie, ag as Ze, b4 as Fe, am as pt, $ as bi, ao as gi, ap as _i, aq as pi, ar as wi, K as h, as as xe, at as vi, aA as Ci, C as $e, d as Be, aB as wt, aC as We, aD as ki, aE as yi, aF as et, aG as Ei, aH as Di, aI as Oi, aX as Ri, aJ as ve, aK as Ti, aL as vt, E as ae, aM as Me, aN as Ai, aO as Ee, aP as De, aQ as Oe, y as J, G as Q, aT as Ct, au as tt, aV as Pi, aW as Si, aY as Ce, aR as kt, j as Li, a_ as Ii, a$ as Fi, b0 as yt, b2 as Et, b3 as Bi } from "./main_140d65a3_2.2.22.js";
|
2
|
-
import { C as j, c as G, a as Wi, T as Mi, b as Ni } from "./TakePictureBtn_98c2ad5f_2.2.22.js";
|
3
|
-
function Dt(s) {
|
4
|
-
let t, i, o;
|
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(a, n) {
|
10
|
-
x(a, t, n), s[41](t), i || (o = [
|
11
|
-
ae(
|
12
|
-
t,
|
13
|
-
"canplay",
|
14
|
-
/*canplay_handler*/
|
15
|
-
s[42]
|
16
|
-
),
|
17
|
-
ae(
|
18
|
-
t,
|
19
|
-
"play",
|
20
|
-
/*play*/
|
21
|
-
s[4],
|
22
|
-
{ once: !0 }
|
23
|
-
)
|
24
|
-
], i = !0);
|
25
|
-
},
|
26
|
-
p: Z,
|
27
|
-
d(a) {
|
28
|
-
a && oe(t), s[41](null), i = !1, Me(o);
|
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(o, a) {
|
39
|
-
De(t, o, a), i = !0;
|
40
|
-
},
|
41
|
-
i(o) {
|
42
|
-
i || (Y(t.$$.fragment, o), i = !0);
|
43
|
-
},
|
44
|
-
o(o) {
|
45
|
-
X(t.$$.fragment, o), i = !1;
|
46
|
-
},
|
47
|
-
d(o) {
|
48
|
-
Oe(t, o);
|
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(o, a) {
|
59
|
-
De(t, o, a), i = !0;
|
60
|
-
},
|
61
|
-
i(o) {
|
62
|
-
i || (Y(t.$$.fragment, o), i = !0);
|
63
|
-
},
|
64
|
-
o(o) {
|
65
|
-
X(t.$$.fragment, o), i = !1;
|
66
|
-
},
|
67
|
-
d(o) {
|
68
|
-
Oe(t, o);
|
69
|
-
}
|
70
|
-
};
|
71
|
-
}
|
72
|
-
function Tt(s) {
|
73
|
-
let t, i = (
|
74
|
-
/*$_*/
|
75
|
-
s[26]("faceCollector.stayStill") + ""
|
76
|
-
), o;
|
77
|
-
return {
|
78
|
-
c() {
|
79
|
-
t = v("span"), o = 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(a, n) {
|
82
|
-
x(a, t, n), l(t, o);
|
83
|
-
},
|
84
|
-
p(a, n) {
|
85
|
-
n[0] & /*$_*/
|
86
|
-
67108864 && i !== (i = /*$_*/
|
87
|
-
a[26]("faceCollector.stayStill") + "") && Q(o, i);
|
88
|
-
},
|
89
|
-
d(a) {
|
90
|
-
a && oe(t);
|
91
|
-
}
|
92
|
-
};
|
93
|
-
}
|
94
|
-
function At(s) {
|
95
|
-
let t, i = (
|
96
|
-
/*$_*/
|
97
|
-
s[26](`${/*$faceValidationAlert*/
|
98
|
-
s[17]}`) + ""
|
99
|
-
), o;
|
100
|
-
return {
|
101
|
-
c() {
|
102
|
-
t = v("span"), o = 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(a, n) {
|
105
|
-
x(a, t, n), l(t, o);
|
106
|
-
},
|
107
|
-
p(a, n) {
|
108
|
-
n[0] & /*$_, $faceValidationAlert*/
|
109
|
-
67239936 && i !== (i = /*$_*/
|
110
|
-
a[26](`${/*$faceValidationAlert*/
|
111
|
-
a[17]}`) + "") && Q(o, i);
|
112
|
-
},
|
113
|
-
d(a) {
|
114
|
-
a && oe(t);
|
115
|
-
}
|
116
|
-
};
|
117
|
-
}
|
118
|
-
function Hi(s) {
|
119
|
-
let t, i, o = (
|
120
|
-
/*$_*/
|
121
|
-
s[26]("faceCollector.finish") + ""
|
122
|
-
), a, n, u, r, _ = (
|
123
|
-
/*$_*/
|
124
|
-
s[26]("faceCollector.retakePhoto") + ""
|
125
|
-
), g, p, b;
|
126
|
-
return {
|
127
|
-
c() {
|
128
|
-
t = v("div"), i = v("button"), a = J(o), u = V(), 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, a), l(t, u), l(t, r), l(r, g), p || (b = [
|
133
|
-
ae(
|
134
|
-
i,
|
135
|
-
"click",
|
136
|
-
/*click_handler*/
|
137
|
-
s[46]
|
138
|
-
),
|
139
|
-
ae(
|
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 && o !== (o = /*$_*/
|
150
|
-
d[26]("faceCollector.finish") + "") && Q(a, o), 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") + "") && Q(g, _);
|
155
|
-
},
|
156
|
-
i: Z,
|
157
|
-
o: Z,
|
158
|
-
d(d) {
|
159
|
-
d && oe(t), p = !1, Me(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] !== j.OK
|
176
|
-
),
|
177
|
-
handler: (
|
178
|
-
/*capture*/
|
179
|
-
s[31]
|
180
|
-
)
|
181
|
-
}
|
182
|
-
}), {
|
183
|
-
c() {
|
184
|
-
Ee(t.$$.fragment);
|
185
|
-
},
|
186
|
-
m(o, a) {
|
187
|
-
De(t, o, a), i = !0;
|
188
|
-
},
|
189
|
-
p(o, a) {
|
190
|
-
const n = {};
|
191
|
-
a[0] & /*$faceFound, $enableFaceApi, $ready*/
|
192
|
-
58720256 && (n.disabled = !/*$faceFound*/
|
193
|
-
o[25] && /*$enableFaceApi*/
|
194
|
-
o[23] || !/*$ready*/
|
195
|
-
o[24] && !/*$enableFaceApi*/
|
196
|
-
o[23]), a[0] & /*$cameraStatusStore*/
|
197
|
-
8192 && (n.hidden = /*$cameraStatusStore*/
|
198
|
-
o[13] !== j.OK), t.$set(n);
|
199
|
-
},
|
200
|
-
i(o) {
|
201
|
-
i || (Y(t.$$.fragment, o), i = !0);
|
202
|
-
},
|
203
|
-
o(o) {
|
204
|
-
X(t.$$.fragment, o), i = !1;
|
205
|
-
},
|
206
|
-
d(o) {
|
207
|
-
Oe(t, o);
|
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(o, a) {
|
221
|
-
De(t, o, a), i = !0;
|
222
|
-
},
|
223
|
-
p: Z,
|
224
|
-
i(o) {
|
225
|
-
i || (Y(t.$$.fragment, o), i = !0);
|
226
|
-
},
|
227
|
-
o(o) {
|
228
|
-
X(t.$$.fragment, o), i = !1;
|
229
|
-
},
|
230
|
-
d(o) {
|
231
|
-
Oe(t, o);
|
232
|
-
}
|
233
|
-
};
|
234
|
-
}
|
235
|
-
function Ki(s) {
|
236
|
-
let t, i, o, a, n, u, r, _, g;
|
237
|
-
const p = [Xi, ji, Yi, qi], b = [];
|
238
|
-
function d(c, A) {
|
239
|
-
return (
|
240
|
-
/*$captured*/
|
241
|
-
c[15] ? (
|
242
|
-
/*$requestResult*/
|
243
|
-
c[18] !== tt.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 = V(), r.c(), f(i, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), kt(i.src, o = /*$dataTypePrefix*/
|
253
|
-
s[22] + "," + /*$image*/
|
254
|
-
s[21]) || f(i, "src", o), i.hidden = a = !/*$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, o = /*$dataTypePrefix*/
|
265
|
-
c[22] + "," + /*$image*/
|
266
|
-
c[21])) && f(i, "src", o), (!g || A[0] & /*$captured, $showFaceWhileValidating*/
|
267
|
-
134250496 && a !== (a = !/*$captured*/
|
268
|
-
c[15] || !/*$showFaceWhileValidating*/
|
269
|
-
c[27])) && (i.hidden = a);
|
270
|
-
let y = u;
|
271
|
-
u = d(c), u === y ? b[u].p(c, A) : (ke(), X(b[y], 1, 1, () => {
|
272
|
-
b[y] = null;
|
273
|
-
}), ye(), r = b[u], r ? r.p(c, A) : (r = b[u] = p[u](c), r.c()), Y(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 || (Y(r), g = !0);
|
279
|
-
},
|
280
|
-
o(c) {
|
281
|
-
X(r), g = !1;
|
282
|
-
},
|
283
|
-
d(c) {
|
284
|
-
c && oe(t), b[u].d();
|
285
|
-
}
|
286
|
-
};
|
287
|
-
}
|
288
|
-
function qi(s) {
|
289
|
-
let t, i, o = (
|
290
|
-
/*$_*/
|
291
|
-
s[26]("docCollector.captured") + ""
|
292
|
-
), a, n, u, r, _ = (
|
293
|
-
/*$_*/
|
294
|
-
s[26]("faceCollector.retakePhoto") + ""
|
295
|
-
), g, p, b = Li(Ii).faceStrategy !== Fi.DISABLED, d, c, A, y = b && Ji();
|
296
|
-
return {
|
297
|
-
c() {
|
298
|
-
t = v("div"), i = v("h1"), a = J(o), n = V(), u = v("div"), r = v("button"), g = J(_), p = V(), y && y.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(k, L) {
|
302
|
-
x(k, t, L), l(t, i), l(i, a), l(t, n), l(t, u), l(u, r), l(r, g), l(u, p), y && y.m(u, null), d = !0, c || (A = ae(
|
303
|
-
r,
|
304
|
-
"click",
|
305
|
-
/*click_handler_6*/
|
306
|
-
s[54]
|
307
|
-
), c = !0);
|
308
|
-
},
|
309
|
-
p(k, L) {
|
310
|
-
(!d || L[0] & /*$_*/
|
311
|
-
67108864) && o !== (o = /*$_*/
|
312
|
-
k[26]("docCollector.captured") + "") && Q(a, o), (!d || L[0] & /*$_*/
|
313
|
-
67108864) && _ !== (_ = /*$_*/
|
314
|
-
k[26]("faceCollector.retakePhoto") + "") && Q(g, _), (!d || L[0] & /*$exportButtonDisabled*/
|
315
|
-
268435456) && yt(u, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
316
|
-
k[28]);
|
317
|
-
},
|
318
|
-
i(k) {
|
319
|
-
d || (Y(y), d = !0);
|
320
|
-
},
|
321
|
-
o(k) {
|
322
|
-
X(y), d = !1;
|
323
|
-
},
|
324
|
-
d(k) {
|
325
|
-
k && oe(t), y && y.d(), c = !1, A();
|
326
|
-
}
|
327
|
-
};
|
328
|
-
}
|
329
|
-
function Yi(s) {
|
330
|
-
let t, i, o = (
|
331
|
-
/*$_*/
|
332
|
-
s[26]("faceCollector.unconformities") + ""
|
333
|
-
), a, n, u, r, _, g = (
|
334
|
-
/*$_*/
|
335
|
-
s[26]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
336
|
-
), p, b, d, c, A, y, k, L, P = (
|
337
|
-
/*$_*/
|
338
|
-
s[26]("faceCollector.thisInformationIsRequired") + ""
|
339
|
-
), I, $, S, F, z, O = (
|
340
|
-
/*$captured*/
|
341
|
-
s[15] && Pt(s)
|
342
|
-
);
|
343
|
-
return {
|
344
|
-
c() {
|
345
|
-
t = v("div"), i = v("h1"), a = J(o), n = V(), u = v("div"), r = v("label"), _ = v("span"), p = J(g), b = V(), d = v("textarea"), A = V(), y = v("label"), k = v("span"), L = J("("), I = J(P), $ = J(")"), S = V(), 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(k, "class", "ce-dui-label-text-alt text-base"), f(y, "class", "ce-dui-label"), f(y, "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, a), 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, y), l(y, k), l(k, L), l(k, I), l(k, $), l(t, S), O && O.m(t, null), F || (z = ae(
|
354
|
-
d,
|
355
|
-
"input",
|
356
|
-
/*textarea_input_handler*/
|
357
|
-
s[51]
|
358
|
-
), F = !0);
|
359
|
-
},
|
360
|
-
p(w, R) {
|
361
|
-
R[0] & /*$_*/
|
362
|
-
67108864 && o !== (o = /*$_*/
|
363
|
-
w[26]("faceCollector.unconformities") + "") && Q(a, o), R[0] & /*$_*/
|
364
|
-
67108864 && g !== (g = /*$_*/
|
365
|
-
w[26]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && Q(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") + "") && Q(I, 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 && oe(t), O && O.d(), F = !1, z();
|
381
|
-
}
|
382
|
-
};
|
383
|
-
}
|
384
|
-
function ji(s) {
|
385
|
-
let t, i, o = (
|
386
|
-
/*$_*/
|
387
|
-
s[26]("faceCollector.everythingOk") + ""
|
388
|
-
), a, n, u, r, _ = (
|
389
|
-
/*$_*/
|
390
|
-
s[26]("faceCollector.finish") + ""
|
391
|
-
), g, p, b, d = (
|
392
|
-
/*$_*/
|
393
|
-
s[26]("faceCollector.retakePhoto") + ""
|
394
|
-
), c, A, y;
|
395
|
-
return {
|
396
|
-
c() {
|
397
|
-
t = v("div"), i = v("h1"), a = J(o), n = V(), u = v("div"), r = v("button"), g = J(_), p = V(), 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(k, L) {
|
400
|
-
x(k, t, L), l(t, i), l(i, a), l(t, n), l(t, u), l(u, r), l(r, g), l(u, p), l(u, b), l(b, c), A || (y = [
|
401
|
-
ae(
|
402
|
-
r,
|
403
|
-
"click",
|
404
|
-
/*click_handler_2*/
|
405
|
-
s[49]
|
406
|
-
),
|
407
|
-
ae(
|
408
|
-
b,
|
409
|
-
"click",
|
410
|
-
/*click_handler_3*/
|
411
|
-
s[50]
|
412
|
-
)
|
413
|
-
], A = !0);
|
414
|
-
},
|
415
|
-
p(k, L) {
|
416
|
-
L[0] & /*$_*/
|
417
|
-
67108864 && o !== (o = /*$_*/
|
418
|
-
k[26]("faceCollector.everythingOk") + "") && Q(a, o), L[0] & /*$_*/
|
419
|
-
67108864 && _ !== (_ = /*$_*/
|
420
|
-
k[26]("faceCollector.finish") + "") && Q(g, _), L[0] & /*$_*/
|
421
|
-
67108864 && d !== (d = /*$_*/
|
422
|
-
k[26]("faceCollector.retakePhoto") + "") && Q(c, d);
|
423
|
-
},
|
424
|
-
i: Z,
|
425
|
-
o: Z,
|
426
|
-
d(k) {
|
427
|
-
k && oe(t), A = !1, Me(y);
|
428
|
-
}
|
429
|
-
};
|
430
|
-
}
|
431
|
-
function Xi(s) {
|
432
|
-
let t;
|
433
|
-
return {
|
434
|
-
c() {
|
435
|
-
t = v("div"), f(t, "class", "");
|
436
|
-
},
|
437
|
-
m(i, o) {
|
438
|
-
x(i, t, o);
|
439
|
-
},
|
440
|
-
p: Z,
|
441
|
-
i: Z,
|
442
|
-
o: Z,
|
443
|
-
d(i) {
|
444
|
-
i && oe(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(o, a) {
|
457
|
-
De(t, o, a), i = !0;
|
458
|
-
},
|
459
|
-
i(o) {
|
460
|
-
i || (Y(t.$$.fragment, o), i = !0);
|
461
|
-
},
|
462
|
-
o(o) {
|
463
|
-
X(t.$$.fragment, o), i = !1;
|
464
|
-
},
|
465
|
-
d(o) {
|
466
|
-
Oe(t, o);
|
467
|
-
}
|
468
|
-
};
|
469
|
-
}
|
470
|
-
function Pt(s) {
|
471
|
-
let t, i, o = (
|
472
|
-
/*$_*/
|
473
|
-
s[26]("faceCollector.finish") + ""
|
474
|
-
), a, n, u, r, _ = (
|
475
|
-
/*$_*/
|
476
|
-
s[26]("faceCollector.retakePhoto") + ""
|
477
|
-
), g, p, b;
|
478
|
-
return {
|
479
|
-
c() {
|
480
|
-
t = v("div"), i = v("button"), a = J(o), u = V(), 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, a), l(t, u), l(t, r), l(r, g), p || (b = [
|
485
|
-
ae(
|
486
|
-
i,
|
487
|
-
"click",
|
488
|
-
/*click_handler_4*/
|
489
|
-
s[52]
|
490
|
-
),
|
491
|
-
ae(
|
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 && o !== (o = /*$_*/
|
502
|
-
d[26]("faceCollector.finish") + "") && Q(a, o), 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") + "") && Q(g, _);
|
507
|
-
},
|
508
|
-
d(d) {
|
509
|
-
d && oe(t), p = !1, Me(b);
|
510
|
-
}
|
511
|
-
};
|
512
|
-
}
|
513
|
-
function Qi(s) {
|
514
|
-
let t, i, o, a, n = (
|
515
|
-
/*unique*/
|
516
|
-
s[9]
|
517
|
-
), u, r, _, g, p, b, d, c, A, y, k, L, P, I, $, S, F, z, O = Dt(s), w = (
|
518
|
-
/*showConfigButton*/
|
519
|
-
s[1] && Ot()
|
520
|
-
), R = (
|
521
|
-
/*showCameraButton*/
|
522
|
-
s[2] && Rt()
|
523
|
-
), W = (
|
524
|
-
/*isCountingDown*/
|
525
|
-
s[8] && Tt(s)
|
526
|
-
), K = (
|
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(m, q) {
|
536
|
-
return !/*$captured*/
|
537
|
-
m[15] || !/*showAutoCaptureButton*/
|
538
|
-
m[3] ? 0 : 1;
|
539
|
-
}
|
540
|
-
P = me(s), I = ee[P] = he[P](s);
|
541
|
-
const D = [Ki, Vi], N = [];
|
542
|
-
function te(m, q) {
|
543
|
-
return (
|
544
|
-
/*showUnconformities*/
|
545
|
-
m[0] && (!/*idrndClosed*/
|
546
|
-
m[12] || /*$captured*/
|
547
|
-
m[15]) ? 0 : (
|
548
|
-
/*$cameraStatusStore*/
|
549
|
-
m[13] !== j.OK ? 1 : -1
|
550
|
-
)
|
551
|
-
);
|
552
|
-
}
|
553
|
-
return ~(S = te(s)) && (F = N[S] = D[S](s)), {
|
554
|
-
c() {
|
555
|
-
t = v("div"), i = v("div"), o = v("div"), a = v("div"), O.c(), u = V(), w && w.c(), r = V(), R && R.c(), _ = V(), g = v("canvas"), p = V(), b = v("canvas"), d = V(), c = v("canvas"), A = V(), W && W.c(), y = V(), K && K.c(), L = V(), I.c(), $ = V(), F && F.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(a, "class", "relative"), a.hidden = k = /*$cameraStatusStore*/
|
556
|
-
s[13] !== j.OK, f(o, "class", "relative mx-auto"), f(i, "class", "flex flex-col justify-between");
|
557
|
-
},
|
558
|
-
m(m, q) {
|
559
|
-
x(m, t, q), l(t, i), l(i, o), l(o, a), O.m(a, null), l(a, u), w && w.m(a, null), l(a, r), R && R.m(a, null), l(a, _), l(a, g), s[43](g), l(a, p), l(a, b), s[44](b), l(a, d), l(a, c), s[45](c), l(a, A), W && W.m(a, null), l(a, y), K && K.m(a, null), l(o, L), ee[P].m(o, null), s[48](i), l(t, $), ~S && N[S].m(t, null), z = !0;
|
560
|
-
},
|
561
|
-
p(m, q) {
|
562
|
-
q[0] & /*unique*/
|
563
|
-
512 && Lt(n, n = /*unique*/
|
564
|
-
m[9]) ? (O.d(1), O = Dt(m), O.c(), O.m(a, u)) : O.p(m, q), /*showConfigButton*/
|
565
|
-
m[1] ? w ? q[0] & /*showConfigButton*/
|
566
|
-
2 && Y(w, 1) : (w = Ot(), w.c(), Y(w, 1), w.m(a, r)) : w && (ke(), X(w, 1, 1, () => {
|
567
|
-
w = null;
|
568
|
-
}), ye()), /*showCameraButton*/
|
569
|
-
m[2] ? R ? q[0] & /*showCameraButton*/
|
570
|
-
4 && Y(R, 1) : (R = Rt(), R.c(), Y(R, 1), R.m(a, _)) : R && (ke(), X(R, 1, 1, () => {
|
571
|
-
R = null;
|
572
|
-
}), ye()), /*isCountingDown*/
|
573
|
-
m[8] ? W ? W.p(m, q) : (W = Tt(m), W.c(), W.m(a, y)) : W && (W.d(1), W = null), /*$enableFaceApi*/
|
574
|
-
m[23] && !/*isCountingDown*/
|
575
|
-
m[8] && /*$faceFound*/
|
576
|
-
m[25] && !/*$faceValidated*/
|
577
|
-
m[16] && /*$faceValidationAlert*/
|
578
|
-
m[17] ? K ? K.p(m, q) : (K = At(m), K.c(), K.m(a, null)) : K && (K.d(1), K = null), (!z || q[0] & /*$cameraStatusStore*/
|
579
|
-
8192 && k !== (k = /*$cameraStatusStore*/
|
580
|
-
m[13] !== j.OK)) && (a.hidden = k);
|
581
|
-
let re = P;
|
582
|
-
P = me(m), P === re ? ee[P].p(m, q) : (ke(), X(ee[re], 1, 1, () => {
|
583
|
-
ee[re] = null;
|
584
|
-
}), ye(), I = ee[P], I ? I.p(m, q) : (I = ee[P] = he[P](m), I.c()), Y(I, 1), I.m(o, null));
|
585
|
-
let ne = S;
|
586
|
-
S = te(m), S === ne ? ~S && N[S].p(m, q) : (F && (ke(), X(N[ne], 1, 1, () => {
|
587
|
-
N[ne] = null;
|
588
|
-
}), ye()), ~S ? (F = N[S], F ? F.p(m, q) : (F = N[S] = D[S](m), F.c()), Y(F, 1), F.m(t, null)) : F = null);
|
589
|
-
},
|
590
|
-
i(m) {
|
591
|
-
z || (Y(w), Y(R), Y(I), Y(F), z = !0);
|
592
|
-
},
|
593
|
-
o(m) {
|
594
|
-
X(w), X(R), X(I), X(F), z = !1;
|
595
|
-
},
|
596
|
-
d(m) {
|
597
|
-
m && oe(t), O.d(m), w && w.d(), R && R.d(), s[43](null), s[44](null), s[45](null), W && W.d(), K && K.d(), ee[P].d(), s[48](null), ~S && N[S].d();
|
598
|
-
}
|
599
|
-
};
|
600
|
-
}
|
601
|
-
let zi = !1, Gi = 5;
|
602
|
-
function St(s, t, i) {
|
603
|
-
const o = t.videoHeight >= t.videoWidth && i.height >= i.width || t.videoHeight < t.videoWidth && i.height < i.width;
|
604
|
-
s.drawImage(
|
605
|
-
t,
|
606
|
-
o ? 0 : t.videoWidth / 2 - i.width,
|
607
|
-
0,
|
608
|
-
o ? 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 o, a, n, u, r, _, g, p, b, d, c, A, y, k, L, P, I, $, S, F, z, O, w, R, W, K, he, ee, me;
|
618
|
-
T(s, Xe, (e) => i(65, o = 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, Je, (e) => i(71, d = e)), T(s, dt, (e) => i(72, c = e)), T(s, ht, (e) => i(73, A = e)), T(s, Qe, (e) => i(16, y = e)), T(s, mt, (e) => i(17, k = e)), T(s, ze, (e) => i(74, L = e)), T(s, Ge, (e) => i(18, P = e)), T(s, Le, (e) => i(19, I = e)), T(s, bt, (e) => i(20, $ = e)), T(s, gt, (e) => i(21, S = e)), T(s, _t, (e) => i(75, z = e)), T(s, mi, (e) => i(23, O = e)), T(s, Ie, (e) => i(24, w = e)), T(s, Ze, (e) => i(76, R = e)), T(s, Fe, (e) => i(77, W = e)), T(s, pt, (e) => i(25, K = 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, N, te, m = !1, q = {}, re = !1, { enableMinutiae: ne } = t, { videoDimensions: Ne } = t, { noTabs: He } = t, { weightsPath: Ue } = t, { showUnconformities: it } = t, { videoOverlay: Re } = t, { videoOverlayTransparency: be } = t, { showConfigButton: st } = t, { showCameraButton: ot } = t, { showAutoCaptureButton: at } = t;
|
620
|
-
const Te = Ct(!1);
|
621
|
-
T(s, Te, (e) => i(66, a = e));
|
622
|
-
const Ve = Ct("data:image/png;base64");
|
623
|
-
T(s, Ve, (e) => i(22, F = e));
|
624
|
-
let le, U, nt = !1, ge = !0, lt = 0, Ke = 0, Ae = !0, qe = 0, Ye = !1, C = {
|
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
|
-
h(Ie, w = !1, w), h(pt, K = !1, K), h(we, b = !1, b), h(ht, A = !0, A), h(Se, r = xe.REAR_CAMERA, r), h(G, n = j.OK, n), await je(), O && (await vi(Ue), re = !0), Bt();
|
637
|
-
});
|
638
|
-
function It() {
|
639
|
-
const e = p.videoWidth, M = p.videoHeight, B = M * 0.75, E = B * 1.36;
|
640
|
-
C.topLeftX = (e - E) / 2, C.topLeftY = (M - B) / 2.5, Ae || (C.topLeftX = (e - E) / 2, C.topLeftY = (M - B) / 2), C.width = E, C.height = B, h(Fe, W.y = C.topLeftY, W), h(Fe, W.height = C.height, W), h(Fe, W.width = C.width, W);
|
641
|
-
}
|
642
|
-
function rt(e, M) {
|
643
|
-
e.clearRect(0, 0, U.width, U.height), e.save(), It(), Re != "none" ? (be > 0 && (e.globalAlpha = be / 100), e.fillStyle = Re, e.fillRect(0, 0, U.width, U.height)) : (e.beginPath(), e.rect(0, 0, U.width, U.height)), e.rect(C.topLeftX, C.topLeftY, C.width, C.height), be == 0 && e.clip(), St(e, M, U), e.restore(), e.save(), e.beginPath();
|
644
|
-
const B = window.getComputedStyle(U).getPropertyValue("--p"), E = window.getComputedStyle(U).getPropertyValue("--su");
|
645
|
-
if (e.strokeStyle = `hsl(${B})`, e.lineWidth = 12, e.lineJoin = "round", e.setLineDash([28, 8]), e.rect(C.topLeftX, C.topLeftY, C.width, C.height), e.stroke(), m && !Ye) {
|
646
|
-
const ie = 1 - (qe - (/* @__PURE__ */ new Date()).getTime()) / 4500;
|
647
|
-
e.save(), e.beginPath(), e.setLineDash([]), e.lineWidth = 14, e.strokeStyle = `hsl(${E})`;
|
648
|
-
const fe = C.width * 3 * ie, ft = C.height * 2 * ie, li = fe < C.width ? fe : C.width, ri = ft < C.height ? ft : C.height;
|
649
|
-
e.rect(C.topLeftX, C.topLeftY, li, ri), e.stroke();
|
650
|
-
}
|
651
|
-
e.beginPath();
|
652
|
-
const H = new Path2D();
|
653
|
-
H.rect(C.topLeftX, C.topLeftY, C.width, C.height), e.clip(H), St(e, M, U), e.restore();
|
654
|
-
}
|
655
|
-
function ct() {
|
656
|
-
h(G, n = j.OK, n), nt = !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 !== et.Document && !He)
|
663
|
-
return ve(D, _e);
|
664
|
-
h(Ie, w = !0, w), O ? (a || h(Te, a = !0, a), rt(U.getContext("2d"), D), ve(D, _e)) : (rt(U.getContext("2d"), D), ve(D, _e));
|
665
|
-
}
|
666
|
-
}
|
667
|
-
async function Ft() {
|
668
|
-
z && (vt(), h(_t, z = !1, z)), h(Ge, P = tt.OK, P), h(we, b = !0, b), h(Le, I = !0, I);
|
669
|
-
const e = document.createElement("canvas"), M = e.getContext("2d");
|
670
|
-
e.width = C.width, e.height = C.height, M?.drawImage(D, C.topLeftX, C.topLeftY, C.width, C.height, 0, 0, e.width, e.height);
|
671
|
-
const B = e.toDataURL("image/jpeg").split(",");
|
672
|
-
h(Ve, F = B[0], F), h(gt, S = B[1], S), h(ze, L = B[1], L);
|
673
|
-
const E = [{ data: L }];
|
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
|
-
h(Le, I = !0, I), window.dispatchEvent(new CustomEvent("export-document", { detail: e }));
|
688
|
-
}
|
689
|
-
function ce() {
|
690
|
-
window.dispatchEvent(new CustomEvent("document-scrapped")), h(Le, I = !1, I), h(Ge, P = tt.OK, P), h(we, b = !1, b), h(ze, L = "", L), h(mt, k = "", k), h(Qe, y = !0, y), ge && ct();
|
691
|
-
}
|
692
|
-
async function je(e) {
|
693
|
-
const [M, B] = (Ne ?? "")?.replaceAll(" ", "")?.split("x")?.map((E) => E ? parseInt(E) : void 0);
|
694
|
-
if (!(!M || !B)) {
|
695
|
-
h(de, p = { videoWidth: M, videoHeight: B }, p);
|
696
|
-
try {
|
697
|
-
const { deviceId: E, width: H, height: ie, aspectRatio: fe } = await Ci(M, B, r, e);
|
698
|
-
fe && fe < 1 && $e() ? h(
|
699
|
-
de,
|
700
|
-
p = {
|
701
|
-
videoWidth: ie,
|
702
|
-
videoHeight: H
|
703
|
-
},
|
704
|
-
p
|
705
|
-
) : h(
|
706
|
-
de,
|
707
|
-
p = {
|
708
|
-
videoWidth: H,
|
709
|
-
videoHeight: ie
|
710
|
-
},
|
711
|
-
p
|
712
|
-
), h(pe, g = E || _[0].deviceId, g), h(G, n = j.OK, n);
|
713
|
-
} catch (E) {
|
714
|
-
const H = E;
|
715
|
-
i(12, ge = !0);
|
716
|
-
const ie = Be(E) && E.constraint ? E.constraint : "";
|
717
|
-
console.error(H, ie), Be(H) && "message" in H && H.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), h(G, n = j.CAMERA_DENIED_ERROR, n)), Be(H) && "message" in H && H.message.includes("Requested device not found") && h(G, n = j.DEVICE_NOT_FOUND_ERROR, n), (ie.includes("width") || ie.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${ie})`), h(G, n = j.CAMERA_UNSUPPORTED, n));
|
718
|
-
}
|
719
|
-
}
|
720
|
-
}
|
721
|
-
async function ue() {
|
722
|
-
h(pe, g = "", g), await je();
|
723
|
-
}
|
724
|
-
function Bt() {
|
725
|
-
navigator.mediaDevices.ondevicechange = async (e) => {
|
726
|
-
await wt(), n !== j.OK ? await ue() : c.active || (We(), h(G, n = j.DEVICE_NOT_FOUND_ERROR, n));
|
727
|
-
};
|
728
|
-
}
|
729
|
-
const Wt = de.subscribe((e) => {
|
730
|
-
D && N && (i(5, D.width = e.videoWidth, D), i(5, D.height = e.videoHeight, D), i(6, N.width = e.videoWidth, N), i(6, N.height = e.videoHeight, N), i(10, le.width = e.videoWidth, le), i(10, le.height = e.videoHeight, le), i(11, U.width = e.videoWidth, U), i(11, U.height = e.videoHeight, U));
|
731
|
-
}), Mt = ki.subscribe((e) => {
|
732
|
-
if (u != "DOCUMENT")
|
733
|
-
return;
|
734
|
-
let M = "", B = !1;
|
735
|
-
if (e.isPersonCloseEnough ? e.isPersonTooclose ? M = "docCollector.moveAwayCamera" : e.isPersonInFrame ? B = !0 : M = "docCollector.stayInFrame" : M = "docCollector.comeCloserCamera", yi(B, M), !b && A && !m && e.isPersonInFrame && !(!e.isPersonCloseEnough || e.isPersonTooclose)) {
|
736
|
-
i(8, m = !0), h(Qe, y = !0, y), qe = (/* @__PURE__ */ new Date()).getTime() + 4500;
|
737
|
-
const E = setInterval(
|
738
|
-
() => {
|
739
|
-
if (!A || b || !e.isPersonCloseEnough || e.isPersonTooclose || !e.isPersonInFrame) {
|
740
|
-
i(8, m = !1), Ye = !0, setTimeout(
|
741
|
-
() => {
|
742
|
-
Ye = !1;
|
743
|
-
},
|
744
|
-
1500
|
745
|
-
), clearInterval(E);
|
746
|
-
return;
|
747
|
-
}
|
748
|
-
const H = (/* @__PURE__ */ new Date()).getTime();
|
749
|
-
Math.floor((qe - H) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(E), i(8, m = !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 = Je.subscribe((e) => {
|
757
|
-
D && e && (console.log("setting null in video srcObject"), i(5, D.srcObject = null, D), i(5, D.src = "", D), h(pe, g = null, g));
|
758
|
-
});
|
759
|
-
Ze.subscribe(async (e) => {
|
760
|
-
e === et.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: B } = p;
|
767
|
-
try {
|
768
|
-
const E = await Ei(B, M, e);
|
769
|
-
i(5, D.srcObject = E, D), h(dt, c = E, c), h(Je, d = !1, d), Ae || h(G, n = j.CAMERA_ORIENTATION_LANDSCAPE, n);
|
770
|
-
} catch (E) {
|
771
|
-
const H = E;
|
772
|
-
i(12, ge = !0), Be(H) && "message" in H && H.message.includes("Requested device not found") && h(G, n = j.DEVICE_NOT_FOUND_ERROR, n);
|
773
|
-
}
|
774
|
-
}), Vt = Ze.subscribe(async (e) => {
|
775
|
-
e === et.Document && !nt && !b && zi && await ct();
|
776
|
-
}), Kt = Te.subscribe(async (e) => {
|
777
|
-
e && ut();
|
778
|
-
}), qt = Ie.subscribe((e) => {
|
779
|
-
e && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
780
|
-
}), Yt = Di.subscribe(async (e) => {
|
781
|
-
if (p) {
|
782
|
-
if (We(), !$e()) {
|
783
|
-
const B = (_.findIndex((H) => H.deviceId === g) + 1) % _.length, E = _[B].deviceId;
|
784
|
-
await je(E);
|
785
|
-
return;
|
786
|
-
}
|
787
|
-
e ? (h(Se, r = xe.FRONT_CAMERA, r), await ue()) : (h(Se, r = xe.REAR_CAMERA, r), await ue());
|
788
|
-
}
|
789
|
-
}), jt = Oi.subscribe(async (e) => {
|
790
|
-
!e.isSupported || !$e() || u != "DOCUMENT" || (We(), Ae = e.orientation.includes("landscape"), Ae ? h(G, n = j.OK, n) : h(G, n = j.CAMERA_ORIENTATION_LANDSCAPE, n), await ue());
|
791
|
-
});
|
792
|
-
async function ut() {
|
793
|
-
let e;
|
794
|
-
if (Ke >= Gi) {
|
795
|
-
Ke = 0;
|
796
|
-
const M = await Pi(), B = await import("./face_api_0e3ce8c8_2.2.22.js");
|
797
|
-
let E;
|
798
|
-
E = B.detectSingleFace(U, M), e = await E.withFaceLandmarks(), N.getContext("2d")?.clearRect(0, 0, N.width, N.height);
|
799
|
-
} else
|
800
|
-
Ke++;
|
801
|
-
e ? Si(e, N, ne, !0) : Ri(), a && ve(D, ut);
|
802
|
-
}
|
803
|
-
Xe.subscribe(async (e) => {
|
804
|
-
e && (ce(), h(Xe, o = !1, o));
|
805
|
-
}), Ti(() => {
|
806
|
-
We(), Nt(), Mt(), Wt(), Ht(), Ut(), Vt(), clearInterval(lt), Kt(), Yt(), qt(), jt(), vt(), lt = 0;
|
807
|
-
});
|
808
|
-
function Xt(e) {
|
809
|
-
Ce[e ? "unshift" : "push"](() => {
|
810
|
-
D = e, i(5, D);
|
811
|
-
});
|
812
|
-
}
|
813
|
-
const Jt = () => {
|
814
|
-
h(
|
815
|
-
de,
|
816
|
-
p = {
|
817
|
-
videoHeight: D.videoHeight,
|
818
|
-
videoWidth: D.videoWidth
|
819
|
-
},
|
820
|
-
p
|
821
|
-
);
|
822
|
-
};
|
823
|
-
function Qt(e) {
|
824
|
-
Ce[e ? "unshift" : "push"](() => {
|
825
|
-
U = e, i(11, U);
|
826
|
-
});
|
827
|
-
}
|
828
|
-
function zt(e) {
|
829
|
-
Ce[e ? "unshift" : "push"](() => {
|
830
|
-
N = e, i(6, N);
|
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, bt.set($);
|
847
|
-
}
|
848
|
-
const si = () => Pe(), oi = () => ce(), ai = () => 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, Ne = e.videoDimensions), "noTabs" in e && i(37, He = e.noTabs), "weightsPath" in e && i(38, Ue = e.weightsPath), "showUnconformities" in e && i(0, it = e.showUnconformities), "videoOverlay" in e && i(39, Re = e.videoOverlay), "videoOverlayTransparency" in e && i(40, be = e.videoOverlayTransparency), "showConfigButton" in e && i(1, st = e.showConfigButton), "showCameraButton" in e && i(2, ot = e.showCameraButton), "showAutoCaptureButton" in e && i(3, at = e.showAutoCaptureButton);
|
853
|
-
}, [
|
854
|
-
it,
|
855
|
-
st,
|
856
|
-
ot,
|
857
|
-
at,
|
858
|
-
_e,
|
859
|
-
D,
|
860
|
-
N,
|
861
|
-
te,
|
862
|
-
m,
|
863
|
-
q,
|
864
|
-
le,
|
865
|
-
U,
|
866
|
-
ge,
|
867
|
-
n,
|
868
|
-
p,
|
869
|
-
b,
|
870
|
-
y,
|
871
|
-
k,
|
872
|
-
P,
|
873
|
-
I,
|
874
|
-
$,
|
875
|
-
S,
|
876
|
-
F,
|
877
|
-
O,
|
878
|
-
w,
|
879
|
-
K,
|
880
|
-
he,
|
881
|
-
ee,
|
882
|
-
me,
|
883
|
-
Te,
|
884
|
-
Ve,
|
885
|
-
Ft,
|
886
|
-
Pe,
|
887
|
-
ce,
|
888
|
-
ue,
|
889
|
-
ne,
|
890
|
-
Ne,
|
891
|
-
He,
|
892
|
-
Ue,
|
893
|
-
Re,
|
894
|
-
be,
|
895
|
-
Xt,
|
896
|
-
Jt,
|
897
|
-
Qt,
|
898
|
-
zt,
|
899
|
-
Gt,
|
900
|
-
Zt,
|
901
|
-
xt,
|
902
|
-
$t,
|
903
|
-
ei,
|
904
|
-
ti,
|
905
|
-
ii,
|
906
|
-
si,
|
907
|
-
oi,
|
908
|
-
ai,
|
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
|
-
Qi,
|
923
|
-
Lt,
|
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
|
-
};
|