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