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