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