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