bry-biometric-collector 2.0.3
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 +597 -0
- package/dist/FaceCollector_93d41450_2.0.3.js +1874 -0
- package/dist/bry-biometric-collector-main.js +4 -0
- package/dist/en-us_360d5d87_2.0.3.js +234 -0
- package/dist/face_api_0e3ce8c8_2.0.3.js +36288 -0
- package/dist/fingersApi_7384225f_2.0.3.js +146 -0
- package/dist/index-no-detector_c7c1d3a2_2.0.3.js +10402 -0
- package/dist/main_4a3321b2_2.0.3.js +23283 -0
- package/dist/pt-br_c3fe6b06_2.0.3.js +234 -0
- package/dist/style.css +1 -0
- package/dist/weights/face_landmark_68_model-shard1 +0 -0
- package/dist/weights/face_landmark_68_model-weights_manifest.json +1 -0
- package/dist/weights/tiny_face_detector_model-shard1 +0 -0
- package/dist/weights/tiny_face_detector_model-weights_manifest.json +1 -0
- package/package.json +82 -0
@@ -0,0 +1,1874 @@
|
|
1
|
+
import { w as yt, S as tl, r as ll, t as Ot, x as il, y as p, z as Te, B as h, C as ee, D as o, E as w, G as S, H as Ye, I as Nt, J, K as L, L as Me, M as u, N as oe, O as _t, P as Z, Q as Bl, R as It, T, U as At, V as sl, W as xe, X as al, Y as De, Z as St, _ as gt, a0 as et, a1 as vt, a2 as Ft, a3 as Xe, a4 as Hl, $ as Ul, a5 as Vl, a6 as ge, a7 as Kl, a8 as Je, a9 as tt, aa as wt, ab as kt, ac as Se, ad as jl, ae as ql, af as ot, ag as Ct, ah as zl, ai as nt, aj as Wt, ak as Bt, al as Ht, am as Zl, an as Et, ao as Ut, ap as Vt, aq as Ql, ar as Xl, as as Jl, at as Gl, au as Yl, av as k, aw as Kt, ax as jt, f as $l, ay as ei, az as rt, aA as $, aB as ct, aC as ut, A as qt, aD as Rt, aE as dt, aF as ti, aG as li, aH as ii, aI as si, aJ as Ge, aK as ai, aL as oi, aM as bt, aN as ft, aO as ol, l as Pt, aP as Le, aQ as Lt, aR as W, aS as ni, aT as ri, aU as zt, aV as mt, aW as ci, aX as ui } from "./main_4a3321b2_2.0.3.js";
|
2
|
+
var ce = /* @__PURE__ */ ((l) => (l.OK = "OK", l.DEVICE_NOT_FOUND_ERROR = "DEVICE_NOT_FOUND_ERROR", l.CAMERA_DENIED_ERROR = "CAMERA_DENIED_ERROR", l.CAMERA_IN_USE_ERROR = "CAMERA_IN_USE_ERROR", l.CAMERA_CLOSED_ERROR = "CAMERA_CLOSED_ERROR", l))(ce || {});
|
3
|
+
const Ue = yt(
|
4
|
+
"OK"
|
5
|
+
/* OK */
|
6
|
+
);
|
7
|
+
function di(l) {
|
8
|
+
let e, t, s, a, c, f, m, n, d, g, C = [
|
9
|
+
{ class: "text-[8em] mx-auto" },
|
10
|
+
{ xmlns: "http://www.w3.org/2000/svg" },
|
11
|
+
{ width: "1em" },
|
12
|
+
{ height: "1em" },
|
13
|
+
{ viewBox: "0 0 256 256" },
|
14
|
+
/*$$props*/
|
15
|
+
l[2]
|
16
|
+
], b = {};
|
17
|
+
for (let r = 0; r < C.length; r += 1)
|
18
|
+
b = Ye(b, C[r]);
|
19
|
+
return {
|
20
|
+
c() {
|
21
|
+
e = J("svg"), t = J("path"), s = L(), a = h("span"), a.textContent = "Por favor, permaneça na mesma aba durante a coleta biométrica.", c = L(), f = h("span"), f.textContent = "Clique no botão Reiniciar para capturar novamente.", m = L(), n = h("button"), n.textContent = "Reiniciar", o(t, "fill", "currentColor"), o(t, "d", "M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12"), Me(e, b), o(a, "class", "text-xl font-bold text-center"), o(f, "class", "m-auto text-base block text-center"), o(n, "class", "z-20 ce-dui-btn ce-dui-btn-outline ce-dui-btn-primary m-auto");
|
22
|
+
},
|
23
|
+
m(r, _) {
|
24
|
+
p(r, e, _), u(e, t), p(r, s, _), p(r, a, _), p(r, c, _), p(r, f, _), p(r, m, _), p(r, n, _), d || (g = oe(
|
25
|
+
n,
|
26
|
+
"click",
|
27
|
+
/*click_handler_3*/
|
28
|
+
l[6]
|
29
|
+
), d = !0);
|
30
|
+
},
|
31
|
+
p(r, _) {
|
32
|
+
Me(e, b = _t(C, [
|
33
|
+
{ class: "text-[8em] mx-auto" },
|
34
|
+
{ xmlns: "http://www.w3.org/2000/svg" },
|
35
|
+
{ width: "1em" },
|
36
|
+
{ height: "1em" },
|
37
|
+
{ viewBox: "0 0 256 256" },
|
38
|
+
_ & /*$$props*/
|
39
|
+
4 && /*$$props*/
|
40
|
+
r[2]
|
41
|
+
]));
|
42
|
+
},
|
43
|
+
d(r) {
|
44
|
+
r && w(e), r && w(s), r && w(a), r && w(c), r && w(f), r && w(m), r && w(n), d = !1, g();
|
45
|
+
}
|
46
|
+
};
|
47
|
+
}
|
48
|
+
function fi(l) {
|
49
|
+
let e, t, s, a, c, f, m, n, d, g, C = [
|
50
|
+
{ class: "text-[8em] mx-auto" },
|
51
|
+
{ xmlns: "http://www.w3.org/2000/svg" },
|
52
|
+
{ width: "1em" },
|
53
|
+
{ height: "1em" },
|
54
|
+
{ viewBox: "0 0 256 256" },
|
55
|
+
/*$$props*/
|
56
|
+
l[2]
|
57
|
+
], b = {};
|
58
|
+
for (let r = 0; r < C.length; r += 1)
|
59
|
+
b = Ye(b, C[r]);
|
60
|
+
return {
|
61
|
+
c() {
|
62
|
+
e = J("svg"), t = J("path"), s = L(), a = h("span"), a.textContent = "A câmera está em uso.", c = L(), f = h("span"), f.textContent = "Certifique-se de que a câmera não está sendo utilizada por nenhuma outra aplicação e clique no botão abaixo.", m = L(), n = h("button"), n.textContent = "Reiniciar", o(t, "fill", "currentColor"), o(t, "d", "M56.88 31.93a12 12 0 1 0-17.76 16.14l4 4.37A28 28 0 0 0 20 80v112a28 28 0 0 0 28 28h147.42l3.7 4.07a12 12 0 0 0 17.76-16.14Zm49.35 90L136 154.64a24 24 0 0 1-29.77-32.75ZM48 196a4 4 0 0 1-4-4V80a4 4 0 0 1 4-4h16.51l24.92 27.41a48 48 0 0 0 63.34 69.67L173.6 196ZM236 80v94.14a12 12 0 0 1-24 0V80a4 4 0 0 0-4-4h-32a12 12 0 0 1-10-5.34L153.57 52h-51.51a12 12 0 0 1 0-24H160a12 12 0 0 1 10 5.34L182.42 52H208a28 28 0 0 1 28 28"), Me(e, b), o(a, "class", "text-xl font-bold text-center"), o(f, "class", "m-auto text-base block text-center"), o(n, "class", "z-20 ce-dui-btn ce-dui-btn-outline ce-dui-btn-primary m-auto");
|
63
|
+
},
|
64
|
+
m(r, _) {
|
65
|
+
p(r, e, _), u(e, t), p(r, s, _), p(r, a, _), p(r, c, _), p(r, f, _), p(r, m, _), p(r, n, _), d || (g = oe(
|
66
|
+
n,
|
67
|
+
"click",
|
68
|
+
/*click_handler_2*/
|
69
|
+
l[5]
|
70
|
+
), d = !0);
|
71
|
+
},
|
72
|
+
p(r, _) {
|
73
|
+
Me(e, b = _t(C, [
|
74
|
+
{ class: "text-[8em] mx-auto" },
|
75
|
+
{ xmlns: "http://www.w3.org/2000/svg" },
|
76
|
+
{ width: "1em" },
|
77
|
+
{ height: "1em" },
|
78
|
+
{ viewBox: "0 0 256 256" },
|
79
|
+
_ & /*$$props*/
|
80
|
+
4 && /*$$props*/
|
81
|
+
r[2]
|
82
|
+
]));
|
83
|
+
},
|
84
|
+
d(r) {
|
85
|
+
r && w(e), r && w(s), r && w(a), r && w(c), r && w(f), r && w(m), r && w(n), d = !1, g();
|
86
|
+
}
|
87
|
+
};
|
88
|
+
}
|
89
|
+
function mi(l) {
|
90
|
+
let e, t, s, a, c, f, m, n, d, g, C = [
|
91
|
+
{ class: "text-[8em] mx-auto" },
|
92
|
+
{ xmlns: "http://www.w3.org/2000/svg" },
|
93
|
+
{ width: "1em" },
|
94
|
+
{ height: "1em" },
|
95
|
+
{ viewBox: "0 0 256 256" },
|
96
|
+
/*$$props*/
|
97
|
+
l[2]
|
98
|
+
], b = {};
|
99
|
+
for (let r = 0; r < C.length; r += 1)
|
100
|
+
b = Ye(b, C[r]);
|
101
|
+
return {
|
102
|
+
c() {
|
103
|
+
e = J("svg"), t = J("path"), s = L(), a = h("span"), a.textContent = "A câmera não foi detectada.", c = L(), f = h("span"), f.textContent = "Por favor, conecte a sua câmera, espere alguns instantes e clique no botão Reiniciar.", m = L(), n = h("button"), n.textContent = "Reiniciar", o(t, "fill", "currentColor"), o(t, "d", "m137 168l11.52-11.51a12 12 0 0 0-17-17L120 151l-15-15l11.52-11.51a12 12 0 0 0-17-17L88 119l-15.51-15.49a12 12 0 0 0-17 17L59 124l-20.46 20.49a36 36 0 0 0 0 50.91l2.55 2.54l-25.58 25.57a12 12 0 0 0 17 17l25.57-25.58l2.54 2.55a36.06 36.06 0 0 0 50.91 0L132 197l3.51 3.52a12 12 0 0 0 17-17Zm-42.46 32.49a12 12 0 0 1-17 0l-22.03-22.06a12 12 0 0 1 0-17L76 141l39 39Zm146-185a12 12 0 0 0-17 0l-25.6 25.6l-2.54-2.55a36.05 36.05 0 0 0-50.91 0L124 59l-3.51-3.52a12 12 0 0 0-17 17l80 80a12 12 0 0 0 17-17L197 132l20.49-20.49a36 36 0 0 0 0-50.91l-2.55-2.54l25.58-25.57a12 12 0 0 0-.03-16.98Zm-40 79L180 115l-39-39l20.49-20.49a12 12 0 0 1 17 0l22.06 22.06a12 12 0 0 1 0 17Z"), Me(e, b), o(a, "class", "text-xl font-bold text-center"), o(f, "class", "m-auto text-base block text-center"), o(n, "class", "z-20 ce-dui-btn ce-dui-btn-outline ce-dui-btn-primary m-auto");
|
104
|
+
},
|
105
|
+
m(r, _) {
|
106
|
+
p(r, e, _), u(e, t), p(r, s, _), p(r, a, _), p(r, c, _), p(r, f, _), p(r, m, _), p(r, n, _), d || (g = oe(
|
107
|
+
n,
|
108
|
+
"click",
|
109
|
+
/*click_handler_1*/
|
110
|
+
l[4]
|
111
|
+
), d = !0);
|
112
|
+
},
|
113
|
+
p(r, _) {
|
114
|
+
Me(e, b = _t(C, [
|
115
|
+
{ class: "text-[8em] mx-auto" },
|
116
|
+
{ xmlns: "http://www.w3.org/2000/svg" },
|
117
|
+
{ width: "1em" },
|
118
|
+
{ height: "1em" },
|
119
|
+
{ viewBox: "0 0 256 256" },
|
120
|
+
_ & /*$$props*/
|
121
|
+
4 && /*$$props*/
|
122
|
+
r[2]
|
123
|
+
]));
|
124
|
+
},
|
125
|
+
d(r) {
|
126
|
+
r && w(e), r && w(s), r && w(a), r && w(c), r && w(f), r && w(m), r && w(n), d = !1, g();
|
127
|
+
}
|
128
|
+
};
|
129
|
+
}
|
130
|
+
function _i(l) {
|
131
|
+
let e, t, s, a, c, f, m, n, d, g, C = [
|
132
|
+
{ class: "text-[8em] mx-auto" },
|
133
|
+
{ xmlns: "http://www.w3.org/2000/svg" },
|
134
|
+
{ width: "1em" },
|
135
|
+
{ height: "1em" },
|
136
|
+
{ viewBox: "0 0 256 256" },
|
137
|
+
/*$$props*/
|
138
|
+
l[2]
|
139
|
+
], b = {};
|
140
|
+
for (let r = 0; r < C.length; r += 1)
|
141
|
+
b = Ye(b, C[r]);
|
142
|
+
return {
|
143
|
+
c() {
|
144
|
+
e = J("svg"), t = J("path"), s = L(), a = h("span"), a.textContent = "Por favor, conceda permissão de acesso à câmera.", c = L(), f = h("span"), f.textContent = "Após conceder a permissão, clique no botão Reiniciar.", m = L(), n = h("button"), n.textContent = "Reiniciar", o(t, "fill", "currentColor"), o(t, "d", "M249.45 69.31a12 12 0 0 0-12.51 1L212 88.43V72a20 20 0 0 0-20-20h-68.12a12 12 0 0 0 0 24H188v68a12 12 0 0 0 4.46 9.33c.15.13.31.25.48.38l44 32A12 12 0 0 0 256 176V80a12 12 0 0 0-6.55-10.69M232 152.43l-20-14.54v-19.78l20-14.54ZM56.88 31.93a12 12 0 1 0-17.76 16.14L42.69 52H32a20 20 0 0 0-20 20v112a20 20 0 0 0 20 20h148.87l18.25 20.07a12 12 0 0 0 17.76-16.14ZM36 180V76h28.51l94.55 104Z"), Me(e, b), o(a, "class", "text-xl font-bold text-center"), o(f, "class", "m-auto text-base block text-center"), o(n, "class", "z-20 ce-dui-btn ce-dui-btn-outline ce-dui-btn-primary m-auto");
|
145
|
+
},
|
146
|
+
m(r, _) {
|
147
|
+
p(r, e, _), u(e, t), p(r, s, _), p(r, a, _), p(r, c, _), p(r, f, _), p(r, m, _), p(r, n, _), d || (g = oe(
|
148
|
+
n,
|
149
|
+
"click",
|
150
|
+
/*click_handler*/
|
151
|
+
l[3]
|
152
|
+
), d = !0);
|
153
|
+
},
|
154
|
+
p(r, _) {
|
155
|
+
Me(e, b = _t(C, [
|
156
|
+
{ class: "text-[8em] mx-auto" },
|
157
|
+
{ xmlns: "http://www.w3.org/2000/svg" },
|
158
|
+
{ width: "1em" },
|
159
|
+
{ height: "1em" },
|
160
|
+
{ viewBox: "0 0 256 256" },
|
161
|
+
_ & /*$$props*/
|
162
|
+
4 && /*$$props*/
|
163
|
+
r[2]
|
164
|
+
]));
|
165
|
+
},
|
166
|
+
d(r) {
|
167
|
+
r && w(e), r && w(s), r && w(a), r && w(c), r && w(f), r && w(m), r && w(n), d = !1, g();
|
168
|
+
}
|
169
|
+
};
|
170
|
+
}
|
171
|
+
function bi(l) {
|
172
|
+
let e;
|
173
|
+
function t(c, f) {
|
174
|
+
if (
|
175
|
+
/*$cameraStatusStore*/
|
176
|
+
c[1] === ce.CAMERA_DENIED_ERROR
|
177
|
+
)
|
178
|
+
return _i;
|
179
|
+
if (
|
180
|
+
/*$cameraStatusStore*/
|
181
|
+
c[1] === ce.DEVICE_NOT_FOUND_ERROR
|
182
|
+
)
|
183
|
+
return mi;
|
184
|
+
if (
|
185
|
+
/*$cameraStatusStore*/
|
186
|
+
c[1] === ce.CAMERA_IN_USE_ERROR
|
187
|
+
)
|
188
|
+
return fi;
|
189
|
+
if (
|
190
|
+
/*$cameraStatusStore*/
|
191
|
+
c[1] === ce.CAMERA_CLOSED_ERROR
|
192
|
+
)
|
193
|
+
return di;
|
194
|
+
}
|
195
|
+
let s = t(l), a = s && s(l);
|
196
|
+
return {
|
197
|
+
c() {
|
198
|
+
e = h("div"), a && a.c(), this.c = ee, o(e, "class", "flex flex-col gap-4 justify-center absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible text-nowrap");
|
199
|
+
},
|
200
|
+
m(c, f) {
|
201
|
+
p(c, e, f), a && a.m(e, null);
|
202
|
+
},
|
203
|
+
p(c, [f]) {
|
204
|
+
s === (s = t(c)) && a ? a.p(c, f) : (a && a.d(1), a = s && s(c), a && (a.c(), a.m(e, null)));
|
205
|
+
},
|
206
|
+
i: ee,
|
207
|
+
o: ee,
|
208
|
+
d(c) {
|
209
|
+
c && w(e), a && a.d();
|
210
|
+
}
|
211
|
+
};
|
212
|
+
}
|
213
|
+
function hi(l, e, t) {
|
214
|
+
let s;
|
215
|
+
S(l, Ue, (d) => t(1, s = d));
|
216
|
+
let { handler: a = () => {
|
217
|
+
} } = e;
|
218
|
+
const c = () => {
|
219
|
+
a(), console.log("canicna", a);
|
220
|
+
}, f = () => {
|
221
|
+
a(), console.log("canicna", a);
|
222
|
+
}, m = () => {
|
223
|
+
a(), console.log("canicna", a);
|
224
|
+
}, n = () => {
|
225
|
+
a();
|
226
|
+
};
|
227
|
+
return l.$$set = (d) => {
|
228
|
+
t(2, e = Ye(Ye({}, e), Nt(d))), "handler" in d && t(0, a = d.handler);
|
229
|
+
}, e = Nt(e), [
|
230
|
+
a,
|
231
|
+
s,
|
232
|
+
e,
|
233
|
+
c,
|
234
|
+
f,
|
235
|
+
m,
|
236
|
+
n
|
237
|
+
];
|
238
|
+
}
|
239
|
+
class nl extends tl {
|
240
|
+
constructor(e) {
|
241
|
+
super(), ll(
|
242
|
+
this,
|
243
|
+
{
|
244
|
+
target: this.shadowRoot,
|
245
|
+
props: il(this.attributes),
|
246
|
+
customElement: !0
|
247
|
+
},
|
248
|
+
hi,
|
249
|
+
bi,
|
250
|
+
Ot,
|
251
|
+
{ handler: 0 },
|
252
|
+
null
|
253
|
+
), e && (e.target && p(e.target, this, e.anchor), e.props && (this.$set(e.props), Te()));
|
254
|
+
}
|
255
|
+
static get observedAttributes() {
|
256
|
+
return ["handler"];
|
257
|
+
}
|
258
|
+
get handler() {
|
259
|
+
return this.$$.ctx[0];
|
260
|
+
}
|
261
|
+
set handler(e) {
|
262
|
+
this.$$set({ handler: e }), Te();
|
263
|
+
}
|
264
|
+
}
|
265
|
+
customElements.define("camera-status", nl);
|
266
|
+
function Zt(l, e, t) {
|
267
|
+
const s = l.slice();
|
268
|
+
return s[102] = e[t], s;
|
269
|
+
}
|
270
|
+
function pi(l) {
|
271
|
+
let e;
|
272
|
+
return {
|
273
|
+
c() {
|
274
|
+
e = h("idlive-face-capture"), e.hidden = !0, Lt(e, "mask_hidden", ""), Lt(e, "auto_capture_disabled", ""), Lt(e, "auto_close_disabled", "");
|
275
|
+
},
|
276
|
+
m(t, s) {
|
277
|
+
p(t, e, s), l[46](e);
|
278
|
+
},
|
279
|
+
p: ee,
|
280
|
+
d(t) {
|
281
|
+
t && w(e), l[46](null);
|
282
|
+
}
|
283
|
+
};
|
284
|
+
}
|
285
|
+
function Qt(l) {
|
286
|
+
let e, t, s;
|
287
|
+
return {
|
288
|
+
c() {
|
289
|
+
e = h("video"), o(e, "id", "bry-cc-camera-video-tag"), o(e, "class", "invisible absolute -z-10"), e.playsInline = !0, e.muted = !0, e.autoplay = !0;
|
290
|
+
},
|
291
|
+
m(a, c) {
|
292
|
+
p(a, e, c), l[47](e), t || (s = [
|
293
|
+
oe(
|
294
|
+
e,
|
295
|
+
"canplay",
|
296
|
+
/*canplay_handler*/
|
297
|
+
l[48]
|
298
|
+
),
|
299
|
+
oe(
|
300
|
+
e,
|
301
|
+
"play",
|
302
|
+
/*play*/
|
303
|
+
l[1],
|
304
|
+
{ once: !0 }
|
305
|
+
)
|
306
|
+
], t = !0);
|
307
|
+
},
|
308
|
+
p: ee,
|
309
|
+
d(a) {
|
310
|
+
a && w(e), l[47](null), t = !1, bt(s);
|
311
|
+
}
|
312
|
+
};
|
313
|
+
}
|
314
|
+
function gi(l) {
|
315
|
+
let e, t;
|
316
|
+
return {
|
317
|
+
c() {
|
318
|
+
e = J("svg"), t = J("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");
|
319
|
+
},
|
320
|
+
m(s, a) {
|
321
|
+
p(s, e, a), u(e, t);
|
322
|
+
},
|
323
|
+
d(s) {
|
324
|
+
s && w(e);
|
325
|
+
}
|
326
|
+
};
|
327
|
+
}
|
328
|
+
function vi(l) {
|
329
|
+
let e, t;
|
330
|
+
return {
|
331
|
+
c() {
|
332
|
+
e = J("svg"), t = J("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");
|
333
|
+
},
|
334
|
+
m(s, a) {
|
335
|
+
p(s, e, a), u(e, t);
|
336
|
+
},
|
337
|
+
d(s) {
|
338
|
+
s && w(e);
|
339
|
+
}
|
340
|
+
};
|
341
|
+
}
|
342
|
+
function wi(l) {
|
343
|
+
let e, t;
|
344
|
+
return {
|
345
|
+
c() {
|
346
|
+
e = J("svg"), t = J("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");
|
347
|
+
},
|
348
|
+
m(s, a) {
|
349
|
+
p(s, e, a), u(e, t);
|
350
|
+
},
|
351
|
+
d(s) {
|
352
|
+
s && w(e);
|
353
|
+
}
|
354
|
+
};
|
355
|
+
}
|
356
|
+
function ki(l) {
|
357
|
+
let e, t;
|
358
|
+
return {
|
359
|
+
c() {
|
360
|
+
e = J("svg"), t = J("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");
|
361
|
+
},
|
362
|
+
m(s, a) {
|
363
|
+
p(s, e, a), u(e, t);
|
364
|
+
},
|
365
|
+
d(s) {
|
366
|
+
s && w(e);
|
367
|
+
}
|
368
|
+
};
|
369
|
+
}
|
370
|
+
function Ci(l) {
|
371
|
+
let e = (
|
372
|
+
/*$_*/
|
373
|
+
l[20]("faceCollector.framing") + ""
|
374
|
+
), t;
|
375
|
+
return {
|
376
|
+
c() {
|
377
|
+
t = T(e);
|
378
|
+
},
|
379
|
+
m(s, a) {
|
380
|
+
p(s, t, a);
|
381
|
+
},
|
382
|
+
p(s, a) {
|
383
|
+
a[0] & /*$_*/
|
384
|
+
1048576 && e !== (e = /*$_*/
|
385
|
+
s[20]("faceCollector.framing") + "") && W(t, e);
|
386
|
+
},
|
387
|
+
d(s) {
|
388
|
+
s && w(t);
|
389
|
+
}
|
390
|
+
};
|
391
|
+
}
|
392
|
+
function Ei(l) {
|
393
|
+
let e;
|
394
|
+
return {
|
395
|
+
c() {
|
396
|
+
e = T("Framing");
|
397
|
+
},
|
398
|
+
m(t, s) {
|
399
|
+
p(t, e, s);
|
400
|
+
},
|
401
|
+
p: ee,
|
402
|
+
d(t) {
|
403
|
+
t && w(e);
|
404
|
+
}
|
405
|
+
};
|
406
|
+
}
|
407
|
+
function Ri(l) {
|
408
|
+
let e, t;
|
409
|
+
return {
|
410
|
+
c() {
|
411
|
+
e = J("svg"), t = J("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");
|
412
|
+
},
|
413
|
+
m(s, a) {
|
414
|
+
p(s, e, a), u(e, t);
|
415
|
+
},
|
416
|
+
d(s) {
|
417
|
+
s && w(e);
|
418
|
+
}
|
419
|
+
};
|
420
|
+
}
|
421
|
+
function Li(l) {
|
422
|
+
let e, t;
|
423
|
+
return {
|
424
|
+
c() {
|
425
|
+
e = J("svg"), t = J("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");
|
426
|
+
},
|
427
|
+
m(s, a) {
|
428
|
+
p(s, e, a), u(e, t);
|
429
|
+
},
|
430
|
+
d(s) {
|
431
|
+
s && w(e);
|
432
|
+
}
|
433
|
+
};
|
434
|
+
}
|
435
|
+
function Xt(l) {
|
436
|
+
let e, t, s, a, c;
|
437
|
+
function f(d, g) {
|
438
|
+
return (
|
439
|
+
/*$isLoading*/
|
440
|
+
d[33] ? Pi : yi
|
441
|
+
);
|
442
|
+
}
|
443
|
+
let m = f(l), n = m(l);
|
444
|
+
return {
|
445
|
+
c() {
|
446
|
+
e = h("slot"), t = h("div"), s = h("img"), c = L(), n.c(), ft(s.src, a = ol) || o(s, "src", a), o(s, "alt", "loading gif"), o(s, "class", "m-auto h-[10em] lg:h-[12em]"), o(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), o(e, "name", "obtaining-photo-gif"), o(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
447
|
+
},
|
448
|
+
m(d, g) {
|
449
|
+
p(d, e, g), u(e, t), u(t, s), u(t, c), n.m(t, null);
|
450
|
+
},
|
451
|
+
p(d, g) {
|
452
|
+
m === (m = f(d)) && n ? n.p(d, g) : (n.d(1), n = m(d), n && (n.c(), n.m(t, null)));
|
453
|
+
},
|
454
|
+
d(d) {
|
455
|
+
d && w(e), n.d();
|
456
|
+
}
|
457
|
+
};
|
458
|
+
}
|
459
|
+
function yi(l) {
|
460
|
+
let e, t = (
|
461
|
+
/*$_*/
|
462
|
+
l[20]("faceCollector.obtainingPicture") + ""
|
463
|
+
), s;
|
464
|
+
return {
|
465
|
+
c() {
|
466
|
+
e = h("span"), s = T(t), o(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
467
|
+
},
|
468
|
+
m(a, c) {
|
469
|
+
p(a, e, c), u(e, s);
|
470
|
+
},
|
471
|
+
p(a, c) {
|
472
|
+
c[0] & /*$_*/
|
473
|
+
1048576 && t !== (t = /*$_*/
|
474
|
+
a[20]("faceCollector.obtainingPicture") + "") && W(s, t);
|
475
|
+
},
|
476
|
+
d(a) {
|
477
|
+
a && w(e);
|
478
|
+
}
|
479
|
+
};
|
480
|
+
}
|
481
|
+
function Pi(l) {
|
482
|
+
let e;
|
483
|
+
return {
|
484
|
+
c() {
|
485
|
+
e = h("span"), e.textContent = "Obtaining photo...", o(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
486
|
+
},
|
487
|
+
m(t, s) {
|
488
|
+
p(t, e, s);
|
489
|
+
},
|
490
|
+
p: ee,
|
491
|
+
d(t) {
|
492
|
+
t && w(e);
|
493
|
+
}
|
494
|
+
};
|
495
|
+
}
|
496
|
+
function Jt(l) {
|
497
|
+
let e, t, s, a, c;
|
498
|
+
function f(d, g) {
|
499
|
+
return (
|
500
|
+
/*$isLoading*/
|
501
|
+
d[33] ? Ii : Oi
|
502
|
+
);
|
503
|
+
}
|
504
|
+
let m = f(l), n = m(l);
|
505
|
+
return {
|
506
|
+
c() {
|
507
|
+
e = h("slot"), t = h("div"), s = h("img"), c = L(), n.c(), ft(s.src, a = ol) || o(s, "src", a), o(s, "alt", "loading gif"), o(s, "class", "m-auto h-[10em] lg:h-[12em]"), o(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), o(e, "name", "loading-camera-gif"), o(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
508
|
+
},
|
509
|
+
m(d, g) {
|
510
|
+
p(d, e, g), u(e, t), u(t, s), u(t, c), n.m(t, null);
|
511
|
+
},
|
512
|
+
p(d, g) {
|
513
|
+
m === (m = f(d)) && n ? n.p(d, g) : (n.d(1), n = m(d), n && (n.c(), n.m(t, null)));
|
514
|
+
},
|
515
|
+
d(d) {
|
516
|
+
d && w(e), n.d();
|
517
|
+
}
|
518
|
+
};
|
519
|
+
}
|
520
|
+
function Oi(l) {
|
521
|
+
let e, t = (
|
522
|
+
/*$_*/
|
523
|
+
l[20]("faceCollector.initiatingCamera") + ""
|
524
|
+
), s;
|
525
|
+
return {
|
526
|
+
c() {
|
527
|
+
e = h("span"), s = T(t), o(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
528
|
+
},
|
529
|
+
m(a, c) {
|
530
|
+
p(a, e, c), u(e, s);
|
531
|
+
},
|
532
|
+
p(a, c) {
|
533
|
+
c[0] & /*$_*/
|
534
|
+
1048576 && t !== (t = /*$_*/
|
535
|
+
a[20]("faceCollector.initiatingCamera") + "") && W(s, t);
|
536
|
+
},
|
537
|
+
d(a) {
|
538
|
+
a && w(e);
|
539
|
+
}
|
540
|
+
};
|
541
|
+
}
|
542
|
+
function Ii(l) {
|
543
|
+
let e;
|
544
|
+
return {
|
545
|
+
c() {
|
546
|
+
e = h("span"), e.textContent = "Loading camera...", o(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
547
|
+
},
|
548
|
+
m(t, s) {
|
549
|
+
p(t, e, s);
|
550
|
+
},
|
551
|
+
p: ee,
|
552
|
+
d(t) {
|
553
|
+
t && w(e);
|
554
|
+
}
|
555
|
+
};
|
556
|
+
}
|
557
|
+
function Ai(l) {
|
558
|
+
let e, t, s = (
|
559
|
+
/*$_*/
|
560
|
+
l[20]("faceCollector.finish") + ""
|
561
|
+
), a, c, f, m, n = (
|
562
|
+
/*$_*/
|
563
|
+
l[20]("faceCollector.retakePhoto") + ""
|
564
|
+
), d, g, C;
|
565
|
+
return {
|
566
|
+
c() {
|
567
|
+
e = h("div"), t = h("button"), a = T(s), f = L(), m = h("button"), d = T(n), t.disabled = c = /*$justification*/
|
568
|
+
l[25].length === 0, o(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), o(m, "id", "bry-cc-retake-button"), o(m, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), o(e, "class", "ce-dui-btn-group flex");
|
569
|
+
},
|
570
|
+
m(b, r) {
|
571
|
+
p(b, e, r), u(e, t), u(t, a), u(e, f), u(e, m), u(m, d), g || (C = [
|
572
|
+
oe(
|
573
|
+
t,
|
574
|
+
"click",
|
575
|
+
/*click_handler_1*/
|
576
|
+
l[57]
|
577
|
+
),
|
578
|
+
oe(
|
579
|
+
m,
|
580
|
+
"click",
|
581
|
+
/*click_handler_2*/
|
582
|
+
l[58]
|
583
|
+
)
|
584
|
+
], g = !0);
|
585
|
+
},
|
586
|
+
p(b, r) {
|
587
|
+
r[0] & /*$_*/
|
588
|
+
1048576 && s !== (s = /*$_*/
|
589
|
+
b[20]("faceCollector.finish") + "") && W(a, s), r[0] & /*$justification*/
|
590
|
+
33554432 && c !== (c = /*$justification*/
|
591
|
+
b[25].length === 0) && (t.disabled = c), r[0] & /*$_*/
|
592
|
+
1048576 && n !== (n = /*$_*/
|
593
|
+
b[20]("faceCollector.retakePhoto") + "") && W(d, n);
|
594
|
+
},
|
595
|
+
d(b) {
|
596
|
+
b && w(e), g = !1, bt(C);
|
597
|
+
}
|
598
|
+
};
|
599
|
+
}
|
600
|
+
function Si(l) {
|
601
|
+
let e, t, s, a;
|
602
|
+
function c(n, d) {
|
603
|
+
return (
|
604
|
+
/*$isLoading*/
|
605
|
+
n[33] ? xi : Ti
|
606
|
+
);
|
607
|
+
}
|
608
|
+
let f = c(l), m = f(l);
|
609
|
+
return {
|
610
|
+
c() {
|
611
|
+
e = h("button"), m.c(), o(e, "id", "bry-cc-capture-btn"), e.disabled = t = !/*$faceFound*/
|
612
|
+
l[31] && /*$enableFaceApi*/
|
613
|
+
l[28] || !/*$ready*/
|
614
|
+
l[29] && !/*$enableFaceApi*/
|
615
|
+
l[28], o(e, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-primary text-xl");
|
616
|
+
},
|
617
|
+
m(n, d) {
|
618
|
+
p(n, e, d), m.m(e, null), s || (a = oe(
|
619
|
+
e,
|
620
|
+
"click",
|
621
|
+
/*click_handler*/
|
622
|
+
l[56]
|
623
|
+
), s = !0);
|
624
|
+
},
|
625
|
+
p(n, d) {
|
626
|
+
f === (f = c(n)) && m ? m.p(n, d) : (m.d(1), m = f(n), m && (m.c(), m.m(e, null))), d[0] & /*$enableFaceApi, $ready*/
|
627
|
+
805306368 | d[1] & /*$faceFound*/
|
628
|
+
1 && t !== (t = !/*$faceFound*/
|
629
|
+
n[31] && /*$enableFaceApi*/
|
630
|
+
n[28] || !/*$ready*/
|
631
|
+
n[29] && !/*$enableFaceApi*/
|
632
|
+
n[28]) && (e.disabled = t);
|
633
|
+
},
|
634
|
+
d(n) {
|
635
|
+
n && w(e), m.d(), s = !1, a();
|
636
|
+
}
|
637
|
+
};
|
638
|
+
}
|
639
|
+
function Ti(l) {
|
640
|
+
let e = (
|
641
|
+
/*$_*/
|
642
|
+
l[20]("faceCollector.takePicture") + ""
|
643
|
+
), t;
|
644
|
+
return {
|
645
|
+
c() {
|
646
|
+
t = T(e);
|
647
|
+
},
|
648
|
+
m(s, a) {
|
649
|
+
p(s, t, a);
|
650
|
+
},
|
651
|
+
p(s, a) {
|
652
|
+
a[0] & /*$_*/
|
653
|
+
1048576 && e !== (e = /*$_*/
|
654
|
+
s[20]("faceCollector.takePicture") + "") && W(t, e);
|
655
|
+
},
|
656
|
+
d(s) {
|
657
|
+
s && w(t);
|
658
|
+
}
|
659
|
+
};
|
660
|
+
}
|
661
|
+
function xi(l) {
|
662
|
+
let e;
|
663
|
+
return {
|
664
|
+
c() {
|
665
|
+
e = T("Take picture");
|
666
|
+
},
|
667
|
+
m(t, s) {
|
668
|
+
p(t, e, s);
|
669
|
+
},
|
670
|
+
p: ee,
|
671
|
+
d(t) {
|
672
|
+
t && w(e);
|
673
|
+
}
|
674
|
+
};
|
675
|
+
}
|
676
|
+
function Di(l) {
|
677
|
+
let e, t;
|
678
|
+
return e = new nl({ props: { handler: (
|
679
|
+
/*func*/
|
680
|
+
l[67]
|
681
|
+
) } }), {
|
682
|
+
c() {
|
683
|
+
It(e.$$.fragment);
|
684
|
+
},
|
685
|
+
m(s, a) {
|
686
|
+
At(e, s, a), t = !0;
|
687
|
+
},
|
688
|
+
p(s, a) {
|
689
|
+
const c = {};
|
690
|
+
a[0] & /*capturing*/
|
691
|
+
8192 && (c.handler = /*func*/
|
692
|
+
s[67]), e.$set(c);
|
693
|
+
},
|
694
|
+
i(s) {
|
695
|
+
t || (De(e.$$.fragment, s), t = !0);
|
696
|
+
},
|
697
|
+
o(s) {
|
698
|
+
xe(e.$$.fragment, s), t = !1;
|
699
|
+
},
|
700
|
+
d(s) {
|
701
|
+
St(e, s);
|
702
|
+
}
|
703
|
+
};
|
704
|
+
}
|
705
|
+
function Mi(l) {
|
706
|
+
let e, t, s, a, c, f, m, n, d;
|
707
|
+
const g = [
|
708
|
+
Hi,
|
709
|
+
Bi,
|
710
|
+
Wi,
|
711
|
+
Fi,
|
712
|
+
Ni
|
713
|
+
], C = [];
|
714
|
+
function b(r, _) {
|
715
|
+
return (
|
716
|
+
/*$captured*/
|
717
|
+
r[18] ? (
|
718
|
+
/*$unconformitiesStore*/
|
719
|
+
r[23].isLoading ? 1 : (
|
720
|
+
/*$requestResult*/
|
721
|
+
r[21] !== $.OK ? 2 : (
|
722
|
+
/*$saved*/
|
723
|
+
r[24] ? 4 : 3
|
724
|
+
)
|
725
|
+
)
|
726
|
+
) : 0
|
727
|
+
);
|
728
|
+
}
|
729
|
+
return f = b(l), m = C[f] = g[f](l), {
|
730
|
+
c() {
|
731
|
+
e = h("div"), t = h("img"), c = L(), m.c(), o(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), ft(t.src, s = /*$dataTypePrefix*/
|
732
|
+
l[27] + "," + /*$image*/
|
733
|
+
l[26]) || o(t, "src", s), t.hidden = a = !/*$captured*/
|
734
|
+
l[18] || !/*$showFaceWhileValidating*/
|
735
|
+
l[34] && /*$unconformitiesStore*/
|
736
|
+
l[23].isLoading, o(t, "alt", ""), o(e, "class", n = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
737
|
+
l[34] && /*$unconformitiesStore*/
|
738
|
+
l[23].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid m-[1em] overflow-hidden"));
|
739
|
+
},
|
740
|
+
m(r, _) {
|
741
|
+
p(r, e, _), u(e, t), u(e, c), C[f].m(e, null), d = !0;
|
742
|
+
},
|
743
|
+
p(r, _) {
|
744
|
+
(!d || _[0] & /*$dataTypePrefix, $image*/
|
745
|
+
201326592 && !ft(t.src, s = /*$dataTypePrefix*/
|
746
|
+
r[27] + "," + /*$image*/
|
747
|
+
r[26])) && o(t, "src", s), (!d || _[0] & /*$captured, $unconformitiesStore*/
|
748
|
+
8650752 | _[1] & /*$showFaceWhileValidating*/
|
749
|
+
8 && a !== (a = !/*$captured*/
|
750
|
+
r[18] || !/*$showFaceWhileValidating*/
|
751
|
+
r[34] && /*$unconformitiesStore*/
|
752
|
+
r[23].isLoading)) && (t.hidden = a);
|
753
|
+
let y = f;
|
754
|
+
f = b(r), f === y ? C[f].p(r, _) : (sl(), xe(C[y], 1, 1, () => {
|
755
|
+
C[y] = null;
|
756
|
+
}), al(), m = C[f], m ? m.p(r, _) : (m = C[f] = g[f](r), m.c()), De(m, 1), m.m(e, null)), (!d || _[0] & /*$unconformitiesStore*/
|
757
|
+
8388608 | _[1] & /*$showFaceWhileValidating*/
|
758
|
+
8 && n !== (n = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
759
|
+
r[34] && /*$unconformitiesStore*/
|
760
|
+
r[23].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid m-[1em] overflow-hidden"))) && o(e, "class", n);
|
761
|
+
},
|
762
|
+
i(r) {
|
763
|
+
d || (De(m), d = !0);
|
764
|
+
},
|
765
|
+
o(r) {
|
766
|
+
xe(m), d = !1;
|
767
|
+
},
|
768
|
+
d(r) {
|
769
|
+
r && w(e), C[f].d();
|
770
|
+
}
|
771
|
+
};
|
772
|
+
}
|
773
|
+
function Ni(l) {
|
774
|
+
let e, t, s = (
|
775
|
+
/*$_*/
|
776
|
+
l[20]("faceCollector.captured") + ""
|
777
|
+
), a, c, f, m, n, d = (
|
778
|
+
/*$_*/
|
779
|
+
l[20]("faceCollector.retakePhoto") + ""
|
780
|
+
), g, C, b = Pt(ni).faceStrategy !== ri.DISABLED, r, _, y, O = (
|
781
|
+
/*$unconformitiesStore*/
|
782
|
+
l[23].unconformities.length !== 0 && Gt(l)
|
783
|
+
), R = b && Ui();
|
784
|
+
return {
|
785
|
+
c() {
|
786
|
+
e = h("div"), t = h("h1"), a = T(s), c = L(), O && O.c(), f = L(), m = h("div"), n = h("button"), g = T(d), C = L(), R && R.c(), o(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), o(n, "id", "bry-cc-retake-button"), o(n, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), o(m, "class", "flex flex-row"), zt(m, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
787
|
+
l[35]);
|
788
|
+
},
|
789
|
+
m(E, U) {
|
790
|
+
p(E, e, U), u(e, t), u(t, a), u(e, c), O && O.m(e, null), u(e, f), u(e, m), u(m, n), u(n, g), u(m, C), R && R.m(m, null), r = !0, _ || (y = oe(
|
791
|
+
n,
|
792
|
+
"click",
|
793
|
+
/*click_handler_7*/
|
794
|
+
l[66]
|
795
|
+
), _ = !0);
|
796
|
+
},
|
797
|
+
p(E, U) {
|
798
|
+
(!r || U[0] & /*$_*/
|
799
|
+
1048576) && s !== (s = /*$_*/
|
800
|
+
E[20]("faceCollector.captured") + "") && W(a, s), /*$unconformitiesStore*/
|
801
|
+
E[23].unconformities.length !== 0 ? O ? O.p(E, U) : (O = Gt(E), O.c(), O.m(e, f)) : O && (O.d(1), O = null), (!r || U[0] & /*$_*/
|
802
|
+
1048576) && d !== (d = /*$_*/
|
803
|
+
E[20]("faceCollector.retakePhoto") + "") && W(g, d), (!r || U[1] & /*$exportButtonDisabled*/
|
804
|
+
16) && zt(m, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
805
|
+
E[35]);
|
806
|
+
},
|
807
|
+
i(E) {
|
808
|
+
r || (De(R), r = !0);
|
809
|
+
},
|
810
|
+
o(E) {
|
811
|
+
xe(R), r = !1;
|
812
|
+
},
|
813
|
+
d(E) {
|
814
|
+
E && w(e), O && O.d(), R && R.d(), _ = !1, y();
|
815
|
+
}
|
816
|
+
};
|
817
|
+
}
|
818
|
+
function Fi(l) {
|
819
|
+
let e, t, s = (
|
820
|
+
/*$_*/
|
821
|
+
l[20]("faceCollector.unconformities") + ""
|
822
|
+
), a, c, f, m, n, d, g, C = (
|
823
|
+
/*$_*/
|
824
|
+
l[20]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
825
|
+
), b, r, _, y, O, R, E, U, ve = (
|
826
|
+
/*$_*/
|
827
|
+
l[20]("faceCollector.thisInformationIsRequired") + ""
|
828
|
+
), Q, te, we, X, Pe, G = (
|
829
|
+
/*$unconformitiesStore*/
|
830
|
+
l[23].unconformities
|
831
|
+
), B = [];
|
832
|
+
for (let x = 0; x < G.length; x += 1)
|
833
|
+
B[x] = Yt(Zt(l, G, x));
|
834
|
+
let q = (
|
835
|
+
/*$captured*/
|
836
|
+
l[18] && $t(l)
|
837
|
+
);
|
838
|
+
return {
|
839
|
+
c() {
|
840
|
+
e = h("div"), t = h("h1"), a = T(s), c = L(), f = h("div");
|
841
|
+
for (let x = 0; x < B.length; x += 1)
|
842
|
+
B[x].c();
|
843
|
+
m = L(), n = h("div"), d = h("label"), g = h("span"), b = T(C), r = L(), _ = h("textarea"), O = L(), R = h("label"), E = h("span"), U = T("("), Q = T(ve), te = T(")"), we = L(), q && q.c(), o(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), o(f, "class", "flex flex-wrap"), o(g, "class", "ce-dui-label-text text-base"), o(d, "class", "ce-dui-label"), o(d, "for", "justification"), o(_, "contenteditable", ""), o(_, "id", "justification"), o(_, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), o(_, "placeholder", y = /*$_*/
|
844
|
+
l[20]("faceCollector.yourJustification")), o(E, "class", "ce-dui-label-text-alt text-base"), o(R, "class", "ce-dui-label"), o(R, "for", "justification"), o(n, "class", "ce-dui-form-control mt-[2.5em]");
|
845
|
+
},
|
846
|
+
m(x, K) {
|
847
|
+
p(x, e, K), u(e, t), u(t, a), u(e, c), u(e, f);
|
848
|
+
for (let N = 0; N < B.length; N += 1)
|
849
|
+
B[N] && B[N].m(f, null);
|
850
|
+
u(e, m), u(e, n), u(n, d), u(d, g), u(g, b), u(n, r), u(n, _), mt(
|
851
|
+
_,
|
852
|
+
/*$justification*/
|
853
|
+
l[25]
|
854
|
+
), u(n, O), u(n, R), u(R, E), u(E, U), u(E, Q), u(E, te), u(e, we), q && q.m(e, null), X || (Pe = oe(
|
855
|
+
_,
|
856
|
+
"input",
|
857
|
+
/*textarea_input_handler*/
|
858
|
+
l[62]
|
859
|
+
), X = !0);
|
860
|
+
},
|
861
|
+
p(x, K) {
|
862
|
+
if (K[0] & /*$_*/
|
863
|
+
1048576 && s !== (s = /*$_*/
|
864
|
+
x[20]("faceCollector.unconformities") + "") && W(a, s), K[0] & /*$unconformitiesStore*/
|
865
|
+
8388608) {
|
866
|
+
G = /*$unconformitiesStore*/
|
867
|
+
x[23].unconformities;
|
868
|
+
let N;
|
869
|
+
for (N = 0; N < G.length; N += 1) {
|
870
|
+
const ke = Zt(x, G, N);
|
871
|
+
B[N] ? B[N].p(ke, K) : (B[N] = Yt(ke), B[N].c(), B[N].m(f, null));
|
872
|
+
}
|
873
|
+
for (; N < B.length; N += 1)
|
874
|
+
B[N].d(1);
|
875
|
+
B.length = G.length;
|
876
|
+
}
|
877
|
+
K[0] & /*$_*/
|
878
|
+
1048576 && C !== (C = /*$_*/
|
879
|
+
x[20]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && W(b, C), K[0] & /*$_*/
|
880
|
+
1048576 && y !== (y = /*$_*/
|
881
|
+
x[20]("faceCollector.yourJustification")) && o(_, "placeholder", y), K[0] & /*$justification*/
|
882
|
+
33554432 && mt(
|
883
|
+
_,
|
884
|
+
/*$justification*/
|
885
|
+
x[25]
|
886
|
+
), K[0] & /*$_*/
|
887
|
+
1048576 && ve !== (ve = /*$_*/
|
888
|
+
x[20]("faceCollector.thisInformationIsRequired") + "") && W(Q, ve), /*$captured*/
|
889
|
+
x[18] ? q ? q.p(x, K) : (q = $t(x), q.c(), q.m(e, null)) : q && (q.d(1), q = null);
|
890
|
+
},
|
891
|
+
i: ee,
|
892
|
+
o: ee,
|
893
|
+
d(x) {
|
894
|
+
x && w(e), ci(B, x), q && q.d(), X = !1, Pe();
|
895
|
+
}
|
896
|
+
};
|
897
|
+
}
|
898
|
+
function Wi(l) {
|
899
|
+
let e, t, s, a, c, f = (
|
900
|
+
/*$_*/
|
901
|
+
l[20]("faceCollector.finish") + ""
|
902
|
+
), m, n, d, g = (
|
903
|
+
/*$_*/
|
904
|
+
l[20]("faceCollector.retakePhoto") + ""
|
905
|
+
), C, b, r;
|
906
|
+
function _(R, E) {
|
907
|
+
return E[0] & /*$requestResult, $rejectOnFailLiveness*/
|
908
|
+
6291456 && (t = null), /*$requestResult*/
|
909
|
+
R[21] === $.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
|
910
|
+
R[21] === $.UNKNOWN_LIVENESS_ERROR ? zi : (t == null && (t = !!/*$requestResult*/
|
911
|
+
(R[21] === $.LOW_LIVENESS_SCORE && Z() && /*$rejectOnFailLiveness*/
|
912
|
+
R[22])), t ? qi : (
|
913
|
+
/*$requestResult*/
|
914
|
+
R[21] === $.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
|
915
|
+
R[21] === $.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? ji : (
|
916
|
+
/*$requestResult*/
|
917
|
+
R[21] === $.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? Ki : Vi
|
918
|
+
)
|
919
|
+
));
|
920
|
+
}
|
921
|
+
let y = _(l, [-1, -1, -1, -1]), O = y(l);
|
922
|
+
return {
|
923
|
+
c() {
|
924
|
+
e = h("div"), O.c(), s = L(), a = h("div"), c = h("button"), m = T(f), n = L(), d = h("button"), C = T(g), c.disabled = !0, o(c, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), o(d, "id", "bry-cc-retake-button"), o(d, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), o(a, "class", "ce-dui-btn-group flex"), o(e, "class", "flex flex-col justify-between");
|
925
|
+
},
|
926
|
+
m(R, E) {
|
927
|
+
p(R, e, E), O.m(e, null), u(e, s), u(e, a), u(a, c), u(c, m), u(a, n), u(a, d), u(d, C), b || (r = [
|
928
|
+
oe(
|
929
|
+
c,
|
930
|
+
"click",
|
931
|
+
/*click_handler_3*/
|
932
|
+
l[60]
|
933
|
+
),
|
934
|
+
oe(
|
935
|
+
d,
|
936
|
+
"click",
|
937
|
+
/*click_handler_4*/
|
938
|
+
l[61]
|
939
|
+
)
|
940
|
+
], b = !0);
|
941
|
+
},
|
942
|
+
p(R, E) {
|
943
|
+
y === (y = _(R, E)) && O ? O.p(R, E) : (O.d(1), O = y(R), O && (O.c(), O.m(e, s))), E[0] & /*$_*/
|
944
|
+
1048576 && f !== (f = /*$_*/
|
945
|
+
R[20]("faceCollector.finish") + "") && W(m, f), E[0] & /*$_*/
|
946
|
+
1048576 && g !== (g = /*$_*/
|
947
|
+
R[20]("faceCollector.retakePhoto") + "") && W(C, g);
|
948
|
+
},
|
949
|
+
i: ee,
|
950
|
+
o: ee,
|
951
|
+
d(R) {
|
952
|
+
R && w(e), O.d(), b = !1, bt(r);
|
953
|
+
}
|
954
|
+
};
|
955
|
+
}
|
956
|
+
function Bi(l) {
|
957
|
+
let e, t, s = (
|
958
|
+
/*$_*/
|
959
|
+
l[20]("faceCollector.validating") + ""
|
960
|
+
), a, c, f;
|
961
|
+
return {
|
962
|
+
c() {
|
963
|
+
e = h("div"), t = h("h1"), a = T(s), c = L(), f = h("div"), o(t, "class", "inline-block text-3xl font-bold pb-[1em] transition-opacity"), o(f, "class", "ml-6 inline-block dot-typing"), o(e, "class", "min-w-[200px]");
|
964
|
+
},
|
965
|
+
m(m, n) {
|
966
|
+
p(m, e, n), u(e, t), u(t, a), u(e, c), u(e, f);
|
967
|
+
},
|
968
|
+
p(m, n) {
|
969
|
+
n[0] & /*$_*/
|
970
|
+
1048576 && s !== (s = /*$_*/
|
971
|
+
m[20]("faceCollector.validating") + "") && W(a, s);
|
972
|
+
},
|
973
|
+
i: ee,
|
974
|
+
o: ee,
|
975
|
+
d(m) {
|
976
|
+
m && w(e);
|
977
|
+
}
|
978
|
+
};
|
979
|
+
}
|
980
|
+
function Hi(l) {
|
981
|
+
let e;
|
982
|
+
return {
|
983
|
+
c() {
|
984
|
+
e = h("div"), o(e, "class", "");
|
985
|
+
},
|
986
|
+
m(t, s) {
|
987
|
+
p(t, e, s);
|
988
|
+
},
|
989
|
+
p: ee,
|
990
|
+
i: ee,
|
991
|
+
o: ee,
|
992
|
+
d(t) {
|
993
|
+
t && w(e);
|
994
|
+
}
|
995
|
+
};
|
996
|
+
}
|
997
|
+
function Gt(l) {
|
998
|
+
let e, t, s = (
|
999
|
+
/*$_*/
|
1000
|
+
l[20]("faceCollector.justification") + ""
|
1001
|
+
), a, c, f, m, n;
|
1002
|
+
return {
|
1003
|
+
c() {
|
1004
|
+
e = h("label"), t = h("span"), a = T(s), c = L(), f = h("textarea"), o(t, "class", "ce-dui-label-text text-base"), o(e, "class", "ce-dui-label"), o(e, "for", "justification"), o(f, "contenteditable", ""), o(f, "id", "justification"), o(f, "class", "ce-dui-textarea ce-dui-textarea-bordered textarea-ghost h-[6em] w-full text-base");
|
1005
|
+
},
|
1006
|
+
m(d, g) {
|
1007
|
+
p(d, e, g), u(e, t), u(t, a), p(d, c, g), p(d, f, g), mt(
|
1008
|
+
f,
|
1009
|
+
/*$justification*/
|
1010
|
+
l[25]
|
1011
|
+
), m || (n = oe(
|
1012
|
+
f,
|
1013
|
+
"input",
|
1014
|
+
/*textarea_input_handler_1*/
|
1015
|
+
l[65]
|
1016
|
+
), m = !0);
|
1017
|
+
},
|
1018
|
+
p(d, g) {
|
1019
|
+
g[0] & /*$_*/
|
1020
|
+
1048576 && s !== (s = /*$_*/
|
1021
|
+
d[20]("faceCollector.justification") + "") && W(a, s), g[0] & /*$justification*/
|
1022
|
+
33554432 && mt(
|
1023
|
+
f,
|
1024
|
+
/*$justification*/
|
1025
|
+
d[25]
|
1026
|
+
);
|
1027
|
+
},
|
1028
|
+
d(d) {
|
1029
|
+
d && w(e), d && w(c), d && w(f), m = !1, n();
|
1030
|
+
}
|
1031
|
+
};
|
1032
|
+
}
|
1033
|
+
function Ui(l) {
|
1034
|
+
let e, t;
|
1035
|
+
return e = new ui({
|
1036
|
+
props: { cssClass: "ce-dui-btn-block flex-shrink" }
|
1037
|
+
}), {
|
1038
|
+
c() {
|
1039
|
+
It(e.$$.fragment);
|
1040
|
+
},
|
1041
|
+
m(s, a) {
|
1042
|
+
At(e, s, a), t = !0;
|
1043
|
+
},
|
1044
|
+
i(s) {
|
1045
|
+
t || (De(e.$$.fragment, s), t = !0);
|
1046
|
+
},
|
1047
|
+
o(s) {
|
1048
|
+
xe(e.$$.fragment, s), t = !1;
|
1049
|
+
},
|
1050
|
+
d(s) {
|
1051
|
+
St(e, s);
|
1052
|
+
}
|
1053
|
+
};
|
1054
|
+
}
|
1055
|
+
function Yt(l) {
|
1056
|
+
let e, t = (
|
1057
|
+
/*unconformity*/
|
1058
|
+
l[102] + ""
|
1059
|
+
), s, a;
|
1060
|
+
return {
|
1061
|
+
c() {
|
1062
|
+
e = h("div"), s = T(t), a = L(), o(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]");
|
1063
|
+
},
|
1064
|
+
m(c, f) {
|
1065
|
+
p(c, e, f), u(e, s), u(e, a);
|
1066
|
+
},
|
1067
|
+
p(c, f) {
|
1068
|
+
f[0] & /*$unconformitiesStore*/
|
1069
|
+
8388608 && t !== (t = /*unconformity*/
|
1070
|
+
c[102] + "") && W(s, t);
|
1071
|
+
},
|
1072
|
+
d(c) {
|
1073
|
+
c && w(e);
|
1074
|
+
}
|
1075
|
+
};
|
1076
|
+
}
|
1077
|
+
function $t(l) {
|
1078
|
+
let e, t, s = (
|
1079
|
+
/*$_*/
|
1080
|
+
l[20]("faceCollector.finish") + ""
|
1081
|
+
), a, c, f, m, n = (
|
1082
|
+
/*$_*/
|
1083
|
+
l[20]("faceCollector.retakePhoto") + ""
|
1084
|
+
), d, g, C;
|
1085
|
+
return {
|
1086
|
+
c() {
|
1087
|
+
e = h("div"), t = h("button"), a = T(s), f = L(), m = h("button"), d = T(n), t.disabled = c = /*$justification*/
|
1088
|
+
l[25].length === 0, o(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), o(m, "id", "bry-cc-retake-button"), o(m, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), o(e, "class", "ce-dui-btn-group flex");
|
1089
|
+
},
|
1090
|
+
m(b, r) {
|
1091
|
+
p(b, e, r), u(e, t), u(t, a), u(e, f), u(e, m), u(m, d), g || (C = [
|
1092
|
+
oe(
|
1093
|
+
t,
|
1094
|
+
"click",
|
1095
|
+
/*click_handler_5*/
|
1096
|
+
l[63]
|
1097
|
+
),
|
1098
|
+
oe(
|
1099
|
+
m,
|
1100
|
+
"click",
|
1101
|
+
/*click_handler_6*/
|
1102
|
+
l[64]
|
1103
|
+
)
|
1104
|
+
], g = !0);
|
1105
|
+
},
|
1106
|
+
p(b, r) {
|
1107
|
+
r[0] & /*$_*/
|
1108
|
+
1048576 && s !== (s = /*$_*/
|
1109
|
+
b[20]("faceCollector.finish") + "") && W(a, s), r[0] & /*$justification*/
|
1110
|
+
33554432 && c !== (c = /*$justification*/
|
1111
|
+
b[25].length === 0) && (t.disabled = c), r[0] & /*$_*/
|
1112
|
+
1048576 && n !== (n = /*$_*/
|
1113
|
+
b[20]("faceCollector.retakePhoto") + "") && W(d, n);
|
1114
|
+
},
|
1115
|
+
d(b) {
|
1116
|
+
b && w(e), g = !1, bt(C);
|
1117
|
+
}
|
1118
|
+
};
|
1119
|
+
}
|
1120
|
+
function Vi(l) {
|
1121
|
+
let e, t = (
|
1122
|
+
/*$_*/
|
1123
|
+
l[20]("faceCollector.everythingOk") + ""
|
1124
|
+
), s;
|
1125
|
+
return {
|
1126
|
+
c() {
|
1127
|
+
e = h("h1"), s = T(t), o(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
|
1128
|
+
},
|
1129
|
+
m(a, c) {
|
1130
|
+
p(a, e, c), u(e, s);
|
1131
|
+
},
|
1132
|
+
p(a, c) {
|
1133
|
+
c[0] & /*$_*/
|
1134
|
+
1048576 && t !== (t = /*$_*/
|
1135
|
+
a[20]("faceCollector.everythingOk") + "") && W(s, t);
|
1136
|
+
},
|
1137
|
+
d(a) {
|
1138
|
+
a && w(e);
|
1139
|
+
}
|
1140
|
+
};
|
1141
|
+
}
|
1142
|
+
function Ki(l) {
|
1143
|
+
let e, t = (
|
1144
|
+
/*$_*/
|
1145
|
+
l[20]("faceCollector.unableToCompleteRequest") + ""
|
1146
|
+
), s;
|
1147
|
+
return {
|
1148
|
+
c() {
|
1149
|
+
e = h("h1"), s = T(t), o(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1150
|
+
},
|
1151
|
+
m(a, c) {
|
1152
|
+
p(a, e, c), u(e, s);
|
1153
|
+
},
|
1154
|
+
p(a, c) {
|
1155
|
+
c[0] & /*$_*/
|
1156
|
+
1048576 && t !== (t = /*$_*/
|
1157
|
+
a[20]("faceCollector.unableToCompleteRequest") + "") && W(s, t);
|
1158
|
+
},
|
1159
|
+
d(a) {
|
1160
|
+
a && w(e);
|
1161
|
+
}
|
1162
|
+
};
|
1163
|
+
}
|
1164
|
+
function ji(l) {
|
1165
|
+
let e, t = (
|
1166
|
+
/*$_*/
|
1167
|
+
l[20]("faceCollector.lowQualityCapture") + ""
|
1168
|
+
), s;
|
1169
|
+
return {
|
1170
|
+
c() {
|
1171
|
+
e = h("h1"), s = T(t), o(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1172
|
+
},
|
1173
|
+
m(a, c) {
|
1174
|
+
p(a, e, c), u(e, s);
|
1175
|
+
},
|
1176
|
+
p(a, c) {
|
1177
|
+
c[0] & /*$_*/
|
1178
|
+
1048576 && t !== (t = /*$_*/
|
1179
|
+
a[20]("faceCollector.lowQualityCapture") + "") && W(s, t);
|
1180
|
+
},
|
1181
|
+
d(a) {
|
1182
|
+
a && w(e);
|
1183
|
+
}
|
1184
|
+
};
|
1185
|
+
}
|
1186
|
+
function qi(l) {
|
1187
|
+
let e, t = (
|
1188
|
+
/*$_*/
|
1189
|
+
l[20]("liveness.error.error") + ""
|
1190
|
+
), s, a, c = (
|
1191
|
+
/*$_*/
|
1192
|
+
l[20]("faceCollector.unaliveCapture") + ""
|
1193
|
+
), f;
|
1194
|
+
return {
|
1195
|
+
c() {
|
1196
|
+
e = h("h1"), s = T(t), a = T(": "), f = T(c), o(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1197
|
+
},
|
1198
|
+
m(m, n) {
|
1199
|
+
p(m, e, n), u(e, s), u(e, a), u(e, f);
|
1200
|
+
},
|
1201
|
+
p(m, n) {
|
1202
|
+
n[0] & /*$_*/
|
1203
|
+
1048576 && t !== (t = /*$_*/
|
1204
|
+
m[20]("liveness.error.error") + "") && W(s, t), n[0] & /*$_*/
|
1205
|
+
1048576 && c !== (c = /*$_*/
|
1206
|
+
m[20]("faceCollector.unaliveCapture") + "") && W(f, c);
|
1207
|
+
},
|
1208
|
+
d(m) {
|
1209
|
+
m && w(e);
|
1210
|
+
}
|
1211
|
+
};
|
1212
|
+
}
|
1213
|
+
function zi(l) {
|
1214
|
+
let e, t = (
|
1215
|
+
/*$_*/
|
1216
|
+
l[20]("liveness.error.error") + ""
|
1217
|
+
), s, a, c = (
|
1218
|
+
/*$_*/
|
1219
|
+
l[20](
|
1220
|
+
/*livenessError*/
|
1221
|
+
l[17]
|
1222
|
+
) + ""
|
1223
|
+
), f, m;
|
1224
|
+
return {
|
1225
|
+
c() {
|
1226
|
+
e = h("h1"), s = T(t), a = T(": "), f = T(c), m = T("."), o(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1227
|
+
},
|
1228
|
+
m(n, d) {
|
1229
|
+
p(n, e, d), u(e, s), u(e, a), u(e, f), u(e, m);
|
1230
|
+
},
|
1231
|
+
p(n, d) {
|
1232
|
+
d[0] & /*$_*/
|
1233
|
+
1048576 && t !== (t = /*$_*/
|
1234
|
+
n[20]("liveness.error.error") + "") && W(s, t), d[0] & /*$_, livenessError*/
|
1235
|
+
1179648 && c !== (c = /*$_*/
|
1236
|
+
n[20](
|
1237
|
+
/*livenessError*/
|
1238
|
+
n[17]
|
1239
|
+
) + "") && W(f, c);
|
1240
|
+
},
|
1241
|
+
d(n) {
|
1242
|
+
n && w(e);
|
1243
|
+
}
|
1244
|
+
};
|
1245
|
+
}
|
1246
|
+
function Zi(l) {
|
1247
|
+
let e, t, s, a, c = Z(), f, m = (
|
1248
|
+
/*unique*/
|
1249
|
+
l[10]
|
1250
|
+
), n, d, g, C, b, r, _, y, O, R, E, U, ve, Q, te, we, X, Pe, G, B, q, x, K, N, ke, Ne, Fe, $e, Ve = Z() && /*waitingIdrndCaptureEvent*/
|
1251
|
+
l[16], I, ae = Z() && /*idrndLoading*/
|
1252
|
+
l[14] && /*$cameraStatusStore*/
|
1253
|
+
l[30] === ce.OK, Oe, j, ie, be, F, z, he, Ce = c && pi(l), ue = Qt(l);
|
1254
|
+
d = new Bl({ props: { className: "bottom-0" } });
|
1255
|
+
function Ke(v, D) {
|
1256
|
+
return !/*$faceValidationsStore*/
|
1257
|
+
v[32].isPersonCloseEnough || /*$faceValidationsStore*/
|
1258
|
+
v[32].isPersonTooclose ? vi : gi;
|
1259
|
+
}
|
1260
|
+
let Ie = Ke(l), de = Ie(l);
|
1261
|
+
function We(v, D) {
|
1262
|
+
return (
|
1263
|
+
/*$faceValidationsStore*/
|
1264
|
+
v[32].closedMouth ? ki : wi
|
1265
|
+
);
|
1266
|
+
}
|
1267
|
+
let Ee = We(l), V = Ee(l);
|
1268
|
+
function Re(v, D) {
|
1269
|
+
return (
|
1270
|
+
/*$isLoading*/
|
1271
|
+
v[33] ? Ei : Ci
|
1272
|
+
);
|
1273
|
+
}
|
1274
|
+
let H = Re(l), le = H(l);
|
1275
|
+
function Be(v, D) {
|
1276
|
+
return (
|
1277
|
+
/*$faceValidationsStore*/
|
1278
|
+
v[32].isPersonInFrame ? Li : Ri
|
1279
|
+
);
|
1280
|
+
}
|
1281
|
+
let ye = Be(l), ne = ye(l), Y = Ve && Xt(l), se = ae && Jt(l);
|
1282
|
+
function fe(v, D) {
|
1283
|
+
return (
|
1284
|
+
/*$captured*/
|
1285
|
+
v[18] ? Ai : Si
|
1286
|
+
);
|
1287
|
+
}
|
1288
|
+
let Ae = fe(l), re = Ae(l);
|
1289
|
+
const je = [Mi, Di], me = [];
|
1290
|
+
function lt(v, D) {
|
1291
|
+
return !/*idrndClosed*/
|
1292
|
+
v[15] || /*$captured*/
|
1293
|
+
v[18] ? 0 : (
|
1294
|
+
/*$cameraStatusStore*/
|
1295
|
+
v[30] !== ce.OK ? 1 : -1
|
1296
|
+
);
|
1297
|
+
}
|
1298
|
+
return ~(F = lt(l)) && (z = me[F] = je[F](l)), {
|
1299
|
+
c() {
|
1300
|
+
e = h("div"), t = h("div"), s = h("div"), a = h("div"), Ce && Ce.c(), f = L(), ue.c(), n = L(), It(d.$$.fragment), g = L(), C = h("canvas"), b = L(), r = h("canvas"), _ = L(), y = h("canvas"), O = L(), R = h("span"), E = T("Capturando"), ve = L(), Q = h("div"), te = h("div"), we = h("span"), we.textContent = "Longe", X = L(), de.c(), Pe = L(), G = h("div"), B = h("span"), B.textContent = "Boca Aberta", q = L(), V.c(), x = L(), K = h("div"), N = h("span"), le.c(), ke = L(), ne.c(), $e = L(), Y && Y.c(), I = L(), se && se.c(), Oe = L(), j = h("div"), re.c(), be = L(), z && z.c(), this.c = ee, o(C, "id", "bry-ce-displayCanvas"), o(C, "class", "max-w-full -scale-x-100"), o(r, "id", "bry-ce-detectionsCanvas"), o(r, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), o(y, "id", "bry-ce-maskCanvas"), o(y, "class", "absolute top-0 left-0 max-w-full"), R.hidden = U = !/*isCountingDown*/
|
1301
|
+
l[9], o(R, "class", "absolute left-1/2 -translate-x-1/2 top-[85%] text-[1.5rem] bg-info text-info-content p-1 rounded-md"), o(te, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] text-2xs sm:text-base w-[10.1em]"), o(G, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] text-[.1em] 2xs:text-2xs sm:text-base w-[9.6em]"), o(K, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] text-2xs sm:text-base w-[10em]"), o(Q, "class", Ne = "absolute " + /*$enableFaceApi*/
|
1302
|
+
(l[28] ? "flex" : "hidden") + " justify-around w-full top-[5%]"), o(a, "class", "relative"), a.hidden = Fe = Z() && /*idrndLoading*/
|
1303
|
+
(l[14] || /*idrndClosed*/
|
1304
|
+
l[15] || /*waitingIdrndCaptureEvent*/
|
1305
|
+
l[16]), o(j, "class", "px-4 sm:px-0 mt-[1em]"), j.hidden = ie = Z() && /*idrndLoading*/
|
1306
|
+
(l[14] || /*idrndClosed*/
|
1307
|
+
l[15] || /*waitingIdrndCaptureEvent*/
|
1308
|
+
l[16]), o(s, "class", "relative mx-auto"), o(t, "class", "flex flex-col justify-between");
|
1309
|
+
},
|
1310
|
+
m(v, D) {
|
1311
|
+
p(v, e, D), u(e, t), u(t, s), u(s, a), Ce && Ce.m(a, null), u(a, f), ue.m(a, null), u(a, n), At(d, a, null), u(a, g), u(a, C), l[49](C), u(a, b), u(a, r), l[50](r), u(a, _), u(a, y), l[51](y), u(a, O), u(a, R), u(R, E), l[52](R), u(a, ve), u(a, Q), u(Q, te), u(te, we), u(te, X), de.m(te, null), l[53](te), u(Q, Pe), u(Q, G), u(G, B), u(G, q), V.m(G, null), l[54](G), u(Q, x), u(Q, K), u(K, N), le.m(N, null), u(K, ke), ne.m(K, null), l[55](K), u(s, $e), Y && Y.m(s, null), u(s, I), se && se.m(s, null), u(s, Oe), u(s, j), re.m(j, null), l[59](t), u(e, be), ~F && me[F].m(e, null), he = !0;
|
1312
|
+
},
|
1313
|
+
p(v, D) {
|
1314
|
+
c && Ce.p(v, D), D[0] & /*unique*/
|
1315
|
+
1024 && Ot(m, m = /*unique*/
|
1316
|
+
v[10]) ? (ue.d(1), ue = Qt(v), ue.c(), ue.m(a, n)) : ue.p(v, D), (!he || D[0] & /*isCountingDown*/
|
1317
|
+
512 && U !== (U = !/*isCountingDown*/
|
1318
|
+
v[9])) && (R.hidden = U), Ie !== (Ie = Ke(v)) && (de.d(1), de = Ie(v), de && (de.c(), de.m(te, null))), Ee !== (Ee = We(v)) && (V.d(1), V = Ee(v), V && (V.c(), V.m(G, null))), H === (H = Re(v)) && le ? le.p(v, D) : (le.d(1), le = H(v), le && (le.c(), le.m(N, null))), ye !== (ye = Be(v)) && (ne.d(1), ne = ye(v), ne && (ne.c(), ne.m(K, null))), (!he || D[0] & /*$enableFaceApi*/
|
1319
|
+
268435456 && Ne !== (Ne = "absolute " + /*$enableFaceApi*/
|
1320
|
+
(v[28] ? "flex" : "hidden") + " justify-around w-full top-[5%]")) && o(Q, "class", Ne), (!he || D[0] & /*idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
1321
|
+
114688 && Fe !== (Fe = Z() && /*idrndLoading*/
|
1322
|
+
(v[14] || /*idrndClosed*/
|
1323
|
+
v[15] || /*waitingIdrndCaptureEvent*/
|
1324
|
+
v[16]))) && (a.hidden = Fe), D[0] & /*waitingIdrndCaptureEvent*/
|
1325
|
+
65536 && (Ve = Z() && /*waitingIdrndCaptureEvent*/
|
1326
|
+
v[16]), Ve ? Y ? Y.p(v, D) : (Y = Xt(v), Y.c(), Y.m(s, I)) : Y && (Y.d(1), Y = null), D[0] & /*idrndLoading, $cameraStatusStore*/
|
1327
|
+
1073758208 && (ae = Z() && /*idrndLoading*/
|
1328
|
+
v[14] && /*$cameraStatusStore*/
|
1329
|
+
v[30] === ce.OK), ae ? se ? se.p(v, D) : (se = Jt(v), se.c(), se.m(s, Oe)) : se && (se.d(1), se = null), Ae === (Ae = fe(v)) && re ? re.p(v, D) : (re.d(1), re = Ae(v), re && (re.c(), re.m(j, null))), (!he || D[0] & /*idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
1330
|
+
114688 && ie !== (ie = Z() && /*idrndLoading*/
|
1331
|
+
(v[14] || /*idrndClosed*/
|
1332
|
+
v[15] || /*waitingIdrndCaptureEvent*/
|
1333
|
+
v[16]))) && (j.hidden = ie);
|
1334
|
+
let qe = F;
|
1335
|
+
F = lt(v), F === qe ? ~F && me[F].p(v, D) : (z && (sl(), xe(me[qe], 1, 1, () => {
|
1336
|
+
me[qe] = null;
|
1337
|
+
}), al()), ~F ? (z = me[F], z ? z.p(v, D) : (z = me[F] = je[F](v), z.c()), De(z, 1), z.m(e, null)) : z = null);
|
1338
|
+
},
|
1339
|
+
i(v) {
|
1340
|
+
he || (De(d.$$.fragment, v), De(z), he = !0);
|
1341
|
+
},
|
1342
|
+
o(v) {
|
1343
|
+
xe(d.$$.fragment, v), xe(z), he = !1;
|
1344
|
+
},
|
1345
|
+
d(v) {
|
1346
|
+
v && w(e), Ce && Ce.d(), ue.d(v), St(d), l[49](null), l[50](null), l[51](null), l[52](null), de.d(), l[53](null), V.d(), l[54](null), le.d(), ne.d(), l[55](null), Y && Y.d(), se && se.d(), re.d(), l[59](null), ~F && me[F].d();
|
1347
|
+
}
|
1348
|
+
};
|
1349
|
+
}
|
1350
|
+
function el(l, e, t) {
|
1351
|
+
const s = e.videoHeight >= e.videoWidth && t.height >= t.width || e.videoHeight < e.videoWidth && t.height < t.width;
|
1352
|
+
l.drawImage(
|
1353
|
+
e,
|
1354
|
+
s ? 0 : e.videoWidth / 2 - t.width,
|
1355
|
+
0,
|
1356
|
+
s ? e.videoWidth : e.videoHeight * (t.width / t.height),
|
1357
|
+
e.videoHeight,
|
1358
|
+
0,
|
1359
|
+
0,
|
1360
|
+
t.width,
|
1361
|
+
t.height
|
1362
|
+
);
|
1363
|
+
}
|
1364
|
+
function Qi(l, e, t) {
|
1365
|
+
let s, a, c, f, m, n, d, g, C, b, r, _, y, O, R, E, U, ve, Q, te, we, X, Pe, G, B, q, x, K, N, ke, Ne, Fe, $e, Ve;
|
1366
|
+
S(l, gt, (i) => t(73, s = i)), S(l, et, (i) => t(18, c = i)), S(l, vt, (i) => t(75, f = i)), S(l, Ft, (i) => t(76, m = i)), S(l, Xe, (i) => t(19, n = i)), S(l, Hl, (i) => t(77, d = i)), S(l, Ul, (i) => t(20, g = i)), S(l, Vl, (i) => t(78, C = i)), S(l, ge, (i) => t(21, b = i)), S(l, Kl, (i) => t(22, r = i)), S(l, Je, (i) => t(23, _ = i)), S(l, tt, (i) => t(79, y = i)), S(l, wt, (i) => t(24, O = i)), S(l, kt, (i) => t(25, R = i)), S(l, Se, (i) => t(26, E = i)), S(l, jl, (i) => t(80, ve = i)), S(l, ql, (i) => t(28, Q = i)), S(l, ot, (i) => t(29, te = i)), S(l, Ct, (i) => t(81, we = i)), S(l, Ue, (i) => t(30, X = i)), S(l, zl, (i) => t(82, Pe = i)), S(l, nt, (i) => t(83, G = i)), S(l, Wt, (i) => t(84, B = i)), S(l, Bt, (i) => t(85, q = i)), S(l, Ht, (i) => t(86, x = i)), S(l, Zl, (i) => t(87, K = i)), S(l, Et, (i) => t(88, N = i)), S(l, Ut, (i) => t(31, ke = i)), S(l, Vt, (i) => t(32, Ne = i)), S(l, Ql, (i) => t(33, Fe = i)), S(l, Xl, (i) => t(34, $e = i)), S(l, Jl, (i) => t(35, Ve = i));
|
1367
|
+
let I, ae, Oe, j, ie, be, F, z = !1, he = {}, Ce = !1, { enableMinutiae: ue } = e, { videoDimensions: Ke } = e, { noTabs: Ie } = e, { weightsPath: de } = e;
|
1368
|
+
const We = yt(!1);
|
1369
|
+
S(l, We, (i) => t(74, a = i));
|
1370
|
+
const Ee = yt("data:image/png;base64");
|
1371
|
+
S(l, Ee, (i) => t(27, U = i));
|
1372
|
+
let { widgetInstance: V } = e, Re, H, le = !1, Be = !1, ye = !0, ne = !1, Y = !1, se = 0, fe = "", Ae = 0, re = !1;
|
1373
|
+
const je = Gl.mixin({
|
1374
|
+
toast: !0,
|
1375
|
+
position: "bottom-left",
|
1376
|
+
timer: 13e3,
|
1377
|
+
timerProgressBar: !0
|
1378
|
+
});
|
1379
|
+
Yl(async () => {
|
1380
|
+
k(ot, te = !1, te), k(Ut, ke = !1, ke);
|
1381
|
+
const [i, P] = (Ke ?? "")?.replaceAll(" ", "")?.split("x")?.map((A) => A ? parseInt(A) : void 0);
|
1382
|
+
if (!(!i || !P)) {
|
1383
|
+
if (P > i && !Z() && Kt() ? k(Xe, n = { videoWidth: P, videoHeight: i }, n) : Z() && P < i && Kt() ? k(Xe, n = { videoWidth: P, videoHeight: i }, n) : k(Xe, n = { videoWidth: i, videoHeight: P }, n), !Z())
|
1384
|
+
try {
|
1385
|
+
await jt(), (await navigator.mediaDevices.getUserMedia({
|
1386
|
+
video: {
|
1387
|
+
height: { exact: P },
|
1388
|
+
width: { exact: i }
|
1389
|
+
},
|
1390
|
+
audio: !1
|
1391
|
+
}))?.getTracks()?.forEach((M) => M?.stop()), k(Et, N = K[0].deviceId, N);
|
1392
|
+
} catch (A) {
|
1393
|
+
const M = A;
|
1394
|
+
console.error(M), $l(M) && "message" in M && M.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), k(Ht, x = !0, x));
|
1395
|
+
}
|
1396
|
+
Z() && (import("./index-no-detector_c7c1d3a2_2.0.3.js"), lt()), Q && (await ei(de), Ce = !0), Z() && !Be && B && v();
|
1397
|
+
}
|
1398
|
+
});
|
1399
|
+
function me(i, P) {
|
1400
|
+
i.clearRect(0, 0, H.width, H.height), i.save(), i.filter = "blur(7px)", i.beginPath(), i.rect(0, 0, H.width, H.height);
|
1401
|
+
let A = 200;
|
1402
|
+
n.videoWidth > n.videoHeight ? A = 1.1 * (100 * n.videoWidth) / n.videoHeight * 1.1 : A = 1.1 * (100 * n.videoHeight * 1.1) / n.videoWidth;
|
1403
|
+
const M = A * 1.45;
|
1404
|
+
i.ellipse(n.videoWidth / 2, n.videoHeight / 2, A / 2, M / 2, 0, 0, 2 * Math.PI, !0), i.clip(), el(i, P, H), i.restore(), i.save(), i.beginPath();
|
1405
|
+
const _e = window.getComputedStyle(H).getPropertyValue("--p"), Ze = window.getComputedStyle(H).getPropertyValue("--su");
|
1406
|
+
if (i.strokeStyle = `hsl(${_e})`, i.lineWidth = 16, i.ellipse(n.videoWidth / 2, n.videoHeight / 2, A / 2, M / 2, 0, 0, 2 * Math.PI), i.stroke(), z && !re) {
|
1407
|
+
const st = 1 - (Ae - (/* @__PURE__ */ new Date()).getTime()) / 4500;
|
1408
|
+
i.save(), i.beginPath(), i.lineWidth = 16, i.strokeStyle = `hsl(${Ze})`, i.ellipse(n.videoWidth / 2, n.videoHeight / 2, A / 2, M / 2, 0, 0 - Math.PI / 2, 1.25 * (Math.PI * 2 * st) - Math.PI / 2), i.stroke();
|
1409
|
+
}
|
1410
|
+
i.beginPath();
|
1411
|
+
const Qe = new Path2D();
|
1412
|
+
Qe.ellipse(n.videoWidth / 2, n.videoHeight / 2, A / 2, M / 2, 0, 0, 2 * Math.PI), i.clip(Qe), el(i, P, H), i.restore();
|
1413
|
+
}
|
1414
|
+
function lt() {
|
1415
|
+
V.addEventListener("open", (i) => {
|
1416
|
+
const P = i.detail[0].video;
|
1417
|
+
k(
|
1418
|
+
Bt,
|
1419
|
+
q = {
|
1420
|
+
width: P.videoWidth,
|
1421
|
+
height: P.videoHeight
|
1422
|
+
},
|
1423
|
+
q
|
1424
|
+
), t(2, I.srcObject = P.srcObject, I), t(14, ye = !1);
|
1425
|
+
function A() {
|
1426
|
+
ne || (me(H.getContext("2d"), P), Ge(I, A, !0));
|
1427
|
+
}
|
1428
|
+
A();
|
1429
|
+
}), V.addEventListener("error", (i) => {
|
1430
|
+
console.error(i), i.detail[0].message === "Device in use" ? k(Ue, X = ce.CAMERA_IN_USE_ERROR, X) : i.detail[0].message === "Permission denied" || i.detail[0].message === "Permission dismissed" ? k(Ue, X = ce.CAMERA_DENIED_ERROR, X) : i.detail[0].message === "Requested device not found" && k(Ue, X = ce.DEVICE_NOT_FOUND_ERROR, X), t(14, ye = !1);
|
1431
|
+
}), V.addEventListener("faceDetection", (i) => {
|
1432
|
+
}), V.addEventListener("close", async (i) => {
|
1433
|
+
c || t(13, le = !1), t(15, ne = !0), t(16, Y = !1), X === ce.OK && k(Ue, X = ce.CAMERA_CLOSED_ERROR, X);
|
1434
|
+
}), V.addEventListener("initialize", async (i) => {
|
1435
|
+
Be = !0, k(Wt, B = !0, B), we === rt.Face && !le && !c && Be && await v();
|
1436
|
+
}), V.addEventListener("capture", async (i) => {
|
1437
|
+
t(17, fe = "");
|
1438
|
+
const { encryptedFile: P, photo: A } = i.detail[0];
|
1439
|
+
k(nt, G = P, G), t(16, Y = !1), k(ge, b = $.OK, b), k(Je, _.isLoading = !0, _), k(et, c = !0, c), t(13, le = !1);
|
1440
|
+
const M = (await ct(A)).split(",");
|
1441
|
+
if (k(Ee, U = M[0], U), k(Se, E = M[1], E), k(tt, y = M[1], y), !Pe) {
|
1442
|
+
let pe, ht;
|
1443
|
+
try {
|
1444
|
+
({ bodyParts: pe, icaoWarnings: ht } = await ut(y, (await ct(P)).split(",")[1])), window.dispatchEvent(new CustomEvent(
|
1445
|
+
"face-unconformities-validated",
|
1446
|
+
{
|
1447
|
+
detail: {
|
1448
|
+
bodyParts: pe,
|
1449
|
+
icaoWarnings: ht,
|
1450
|
+
status: b
|
1451
|
+
}
|
1452
|
+
}
|
1453
|
+
));
|
1454
|
+
} catch (He) {
|
1455
|
+
console.error(He);
|
1456
|
+
let at = Rt.UNKNOWN, pt = [], Dt = [];
|
1457
|
+
if (He instanceof qt && He.response?.status === 400)
|
1458
|
+
if (He.response.data && Array.isArray(He.response.data.bodyParts)) {
|
1459
|
+
pt = He.response.data.bodyParts, Dt = He.response.data.icaoWarnings;
|
1460
|
+
const Mt = pt.find((Wl) => Wl.livenessResult.error);
|
1461
|
+
at = Mt?.livenessResult.error_code, k(ge, b = $.LIVENESS_DETECTION_FAILURE, b), Mt?.livenessResult.error_code || k(ge, b = $.UNKNOWN_LIVENESS_ERROR, b), t(17, fe = Rt[at]), console.error("Liveness error:", at);
|
1462
|
+
} else
|
1463
|
+
k(ge, b = $.TEMPLATE_EXTRACTION_ERROR, b);
|
1464
|
+
else
|
1465
|
+
k(ge, b = $.UNKNOWN_LIVENESS_ERROR, b), je.fire({
|
1466
|
+
icon: "error",
|
1467
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1468
|
+
});
|
1469
|
+
k(Je, _.isLoading = !1, _), window.dispatchEvent(new CustomEvent(
|
1470
|
+
"face-unconformities-validated",
|
1471
|
+
{
|
1472
|
+
detail: {
|
1473
|
+
bodyParts: pt,
|
1474
|
+
errorCode: at,
|
1475
|
+
translatedError: g(fe),
|
1476
|
+
status: b,
|
1477
|
+
icaoWarnings: Dt
|
1478
|
+
}
|
1479
|
+
}
|
1480
|
+
));
|
1481
|
+
return;
|
1482
|
+
}
|
1483
|
+
if (b !== $.OK) {
|
1484
|
+
k(Je, _.isLoading = !1, _);
|
1485
|
+
return;
|
1486
|
+
}
|
1487
|
+
Tt(pe[0].livenessResult), pe.length !== 0 && pe[0].data && k(Se, E = pe[0].data, E), dt(ht);
|
1488
|
+
return;
|
1489
|
+
}
|
1490
|
+
let _e, Ze;
|
1491
|
+
try {
|
1492
|
+
Ze = await ti(P), Tt(Ze.data);
|
1493
|
+
} catch (pe) {
|
1494
|
+
k(ge, b = $.UNKNOWN_LIVENESS_ERROR, b), console.error(pe), pe instanceof qt && pe.response?.status === 400 ? (_e = pe.response.data.error_code, t(17, fe = Rt[_e]), console.error("Liveness error:", _e), k(ge, b = $.LIVENESS_DETECTION_FAILURE, b)) : je.fire({
|
1495
|
+
icon: "error",
|
1496
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1497
|
+
});
|
1498
|
+
}
|
1499
|
+
if (b !== $.OK) {
|
1500
|
+
k(Je, _.isLoading = !1, _), window.dispatchEvent(new CustomEvent(
|
1501
|
+
"face-unconformities-validated",
|
1502
|
+
{
|
1503
|
+
detail: {
|
1504
|
+
bodyParts: [
|
1505
|
+
{
|
1506
|
+
bodyPart: "FACE",
|
1507
|
+
data: y,
|
1508
|
+
livenessBlob: (await ct(P)).split(",")[1],
|
1509
|
+
...Ze && { livenessResult: Ze }
|
1510
|
+
}
|
1511
|
+
],
|
1512
|
+
..._e && { errorCode: _e },
|
1513
|
+
...fe && { translatedError: g(fe) },
|
1514
|
+
status: b
|
1515
|
+
}
|
1516
|
+
}
|
1517
|
+
));
|
1518
|
+
return;
|
1519
|
+
}
|
1520
|
+
let { bodyParts: Qe, icaoWarnings: st } = await ut(y);
|
1521
|
+
window.dispatchEvent(new CustomEvent(
|
1522
|
+
"face-unconformities-validated",
|
1523
|
+
{
|
1524
|
+
detail: {
|
1525
|
+
bodyParts: Qe,
|
1526
|
+
icaoWarnings: st,
|
1527
|
+
status: b,
|
1528
|
+
errorCode: _e,
|
1529
|
+
...fe && { translatedError: g(fe) }
|
1530
|
+
}
|
1531
|
+
}
|
1532
|
+
)), Qe[0].data && k(Se, E = Qe[0].data, E), dt(st);
|
1533
|
+
});
|
1534
|
+
}
|
1535
|
+
function v() {
|
1536
|
+
k(Ue, X = ce.OK, X), V && "openCamera" in V && V.openCamera(), t(13, le = !0), t(15, ne = !1), t(14, ye = !0);
|
1537
|
+
}
|
1538
|
+
async function D() {
|
1539
|
+
if (Q && !Ce)
|
1540
|
+
return Ge(I, D);
|
1541
|
+
if (I) {
|
1542
|
+
if (we !== rt.Face && !Ie)
|
1543
|
+
return Ge(I, D);
|
1544
|
+
k(ot, te = !0, te), Q ? (a || k(We, a = !0, a), Z() || me(H.getContext("2d"), I), Ge(I, D)) : (me(H.getContext("2d"), I), Ge(I, D));
|
1545
|
+
}
|
1546
|
+
}
|
1547
|
+
async function qe() {
|
1548
|
+
if (k(ge, b = $.OK, b), Z()) {
|
1549
|
+
t(16, Y = !0), V.takePhoto();
|
1550
|
+
return;
|
1551
|
+
}
|
1552
|
+
if (k(et, c = !0, c), Q) {
|
1553
|
+
const [i] = await (await import("./face_api_0e3ce8c8_2.0.3.js")).extractFaces(I, [ve]), P = i.toDataURL("image/jpeg").split(",");
|
1554
|
+
k(Ee, U = P[0], U), k(Se, E = P[1], E), k(tt, y = P[1], y);
|
1555
|
+
let { bodyParts: A, icaoWarnings: M } = await ut(E);
|
1556
|
+
window.dispatchEvent(new CustomEvent(
|
1557
|
+
"face-unconformities-validated",
|
1558
|
+
{
|
1559
|
+
detail: {
|
1560
|
+
bodyParts: [{ bodyPart: "FACE", data: y }],
|
1561
|
+
icaoWarnings: M,
|
1562
|
+
status: b
|
1563
|
+
}
|
1564
|
+
}
|
1565
|
+
)), A.length !== 0 && A[0].data && k(Se, E = A[0].data, E), dt(M);
|
1566
|
+
} else {
|
1567
|
+
const i = document.createElement("canvas"), P = i.getContext("2d");
|
1568
|
+
i.width = I.width, i.height = I.height, P?.drawImage(I, 0, 0, i.width, i.height);
|
1569
|
+
const A = i.toDataURL("image/jpeg").split(",");
|
1570
|
+
k(Ee, U = A[0], U), k(Se, E = A[1], E), k(tt, y = A[1], y);
|
1571
|
+
let { bodyParts: M, icaoWarnings: _e } = await ut(E);
|
1572
|
+
window.dispatchEvent(new CustomEvent(
|
1573
|
+
"face-unconformities-validated",
|
1574
|
+
{
|
1575
|
+
detail: {
|
1576
|
+
bodyParts: [{ bodyPart: "FACE", data: y }],
|
1577
|
+
icaoWarnings: _e,
|
1578
|
+
status: b
|
1579
|
+
}
|
1580
|
+
}
|
1581
|
+
)), M.length !== 0 && M[0].data && k(Se, E = M[0].data, E), dt(_e);
|
1582
|
+
}
|
1583
|
+
}
|
1584
|
+
function it() {
|
1585
|
+
const i = {
|
1586
|
+
bodyPart: "FACE",
|
1587
|
+
data: y || E,
|
1588
|
+
justification: R
|
1589
|
+
};
|
1590
|
+
k(wt, O = !0, O), Pt(nt) && ct(Pt(nt)).then((P) => {
|
1591
|
+
i.livenessBlob = P.split(",")[1];
|
1592
|
+
}), window.dispatchEvent(new CustomEvent("export-face", { detail: i }));
|
1593
|
+
}
|
1594
|
+
function ze() {
|
1595
|
+
window.dispatchEvent(new CustomEvent("face-scrapped")), k(wt, O = !1, O), k(ge, b = $.OK, b), k(et, c = !1, c), k(tt, y = "", y), k(Je, _.unconformities = [], _), ne && v();
|
1596
|
+
}
|
1597
|
+
function Tt(i) {
|
1598
|
+
let P = "", A = "success";
|
1599
|
+
i.isAlive ? P = `Vivacidade de face (${i.face_liveness.probability.toFixed(2)}) e de captura (${i.capture_liveness.probability}, ${i.capture_liveness.score.toFixed(2)}) verificados!` : i?.face_liveness?.probability && (A = "error", P = `Vivacidade de face (${i.face_liveness.probability.toFixed(2)}) e de captura (${i.capture_liveness.probability}, ${i.capture_liveness.score.toFixed(2)}) insuficientes!`, r && k(ge, b = $.LOW_LIVENESS_SCORE, b)), C && je.fire({ icon: A, title: P });
|
1600
|
+
}
|
1601
|
+
const rl = Xe.subscribe((i) => {
|
1602
|
+
I && ae && (t(2, I.width = i.videoWidth, I), t(2, I.height = i.videoHeight, I), t(3, ae.width = i.videoWidth, ae), t(3, ae.height = i.videoHeight, ae), t(11, Re.width = i.videoWidth, Re), t(11, Re.height = i.videoHeight, Re), t(12, H.width = i.videoWidth, H), t(12, H.height = i.videoHeight, H));
|
1603
|
+
}), cl = Vt.subscribe((i) => {
|
1604
|
+
if (!(!j || !ie || !be) && (i.closedMouth ? (ie.classList.add("ce-dui-badge-success"), ie.classList.remove("ce-dui-badge-error"), t(6, ie.firstChild.textContent = g("faceCollector.closedMouth"), ie)) : (ie.classList.remove("ce-dui-badge-success"), ie.classList.add("ce-dui-badge-error"), t(6, ie.firstChild.textContent = g("faceCollector.mouthOpen"), ie)), !i.isPersonCloseEnough || i.isPersonTooclose ? (j.classList.remove("ce-dui-badge-success"), j.classList.add("ce-dui-badge-error"), i.isPersonCloseEnough ? i.isPersonTooclose && t(5, j.firstChild.textContent = g("faceCollector.tooClose"), j) : t(5, j.firstChild.textContent = g("faceCollector.tooFar"), j)) : (j.classList.add("ce-dui-badge-success"), j.classList.remove("ce-dui-badge-error"), t(5, j.firstChild.textContent = g("faceCollector.okDistance"), j)), i.isPersonInFrame ? (be.classList.add("ce-dui-badge-success"), be.classList.remove("ce-dui-badge-error")) : (be.classList.remove("ce-dui-badge-success"), be.classList.add("ce-dui-badge-error")), !c && d && !z && Oe && i.isPersonInFrame && i.closedMouth && !(!i.isPersonCloseEnough || i.isPersonTooclose))) {
|
1605
|
+
t(9, z = !0), Ae = (/* @__PURE__ */ new Date()).getTime() + 4500;
|
1606
|
+
const P = setInterval(
|
1607
|
+
() => {
|
1608
|
+
if (!d || c || Z() && ne || !i.isPersonCloseEnough || i.isPersonTooclose || !i.closedMouth || !i.isPersonInFrame) {
|
1609
|
+
t(9, z = !1), re = !0, setTimeout(
|
1610
|
+
() => {
|
1611
|
+
re = !1;
|
1612
|
+
},
|
1613
|
+
1500
|
1614
|
+
), clearInterval(P);
|
1615
|
+
return;
|
1616
|
+
}
|
1617
|
+
const A = (/* @__PURE__ */ new Date()).getTime();
|
1618
|
+
Math.floor((Ae - A) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(P), t(9, z = !1), document.getElementsByTagName("biometric-collector")?.[0]?.shadowRoot?.getElementById("bry-cc-capture-btn")?.click());
|
1619
|
+
},
|
1620
|
+
250
|
1621
|
+
);
|
1622
|
+
}
|
1623
|
+
}), ul = et.subscribe((i) => {
|
1624
|
+
F && (i ? (F.classList.remove("flex"), F.classList.add("hidden")) : (F.classList.add("flex"), F.classList.remove("hidden")));
|
1625
|
+
}), dl = vt.subscribe((i) => {
|
1626
|
+
I && i && (console.log("setting null in video srcObject"), t(2, I.srcObject = null, I), t(2, I.src = "", I));
|
1627
|
+
});
|
1628
|
+
Ct.subscribe(async (i) => {
|
1629
|
+
i === rt.Face && await jt();
|
1630
|
+
});
|
1631
|
+
const fl = Et.subscribe(async (i) => {
|
1632
|
+
if (Z() || !i)
|
1633
|
+
return;
|
1634
|
+
I || t(10, he = {});
|
1635
|
+
const { videoHeight: P, videoWidth: A } = n, M = await li(A, P, i);
|
1636
|
+
t(2, I.srcObject = M, I), k(Ft, m = M, m), k(vt, f = !1, f);
|
1637
|
+
}), ml = Ct.subscribe(async (i) => {
|
1638
|
+
i === rt.Face && Z() && !le && !c && Be && await v();
|
1639
|
+
}), _l = We.subscribe(async (i) => {
|
1640
|
+
i && xt();
|
1641
|
+
});
|
1642
|
+
async function xt() {
|
1643
|
+
const i = await ii(), P = await import("./face_api_0e3ce8c8_2.0.3.js");
|
1644
|
+
let A;
|
1645
|
+
A = P.detectSingleFace(H, i);
|
1646
|
+
const M = await A.withFaceLandmarks();
|
1647
|
+
ae.getContext("2d")?.clearRect(0, 0, ae.width, ae.height), M && si(M, ae, ue), a && Ge(I, xt);
|
1648
|
+
}
|
1649
|
+
gt.subscribe(async (i) => {
|
1650
|
+
i && (ze(), k(gt, s = !1, s));
|
1651
|
+
});
|
1652
|
+
const bl = ot.subscribe((i) => {
|
1653
|
+
i && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
1654
|
+
});
|
1655
|
+
ai(() => {
|
1656
|
+
oi(), ul(), cl(), rl(), dl(), fl(), ml(), clearInterval(se), _l(), bl(), se = 0;
|
1657
|
+
});
|
1658
|
+
function hl(i) {
|
1659
|
+
Le[i ? "unshift" : "push"](() => {
|
1660
|
+
V = i, t(0, V);
|
1661
|
+
});
|
1662
|
+
}
|
1663
|
+
function pl(i) {
|
1664
|
+
Le[i ? "unshift" : "push"](() => {
|
1665
|
+
I = i, t(2, I);
|
1666
|
+
});
|
1667
|
+
}
|
1668
|
+
const gl = () => {
|
1669
|
+
Z() || k(
|
1670
|
+
Xe,
|
1671
|
+
n = {
|
1672
|
+
videoHeight: I.videoHeight,
|
1673
|
+
videoWidth: I.videoWidth
|
1674
|
+
},
|
1675
|
+
n
|
1676
|
+
);
|
1677
|
+
};
|
1678
|
+
function vl(i) {
|
1679
|
+
Le[i ? "unshift" : "push"](() => {
|
1680
|
+
H = i, t(12, H);
|
1681
|
+
});
|
1682
|
+
}
|
1683
|
+
function wl(i) {
|
1684
|
+
Le[i ? "unshift" : "push"](() => {
|
1685
|
+
ae = i, t(3, ae);
|
1686
|
+
});
|
1687
|
+
}
|
1688
|
+
function kl(i) {
|
1689
|
+
Le[i ? "unshift" : "push"](() => {
|
1690
|
+
Re = i, t(11, Re);
|
1691
|
+
});
|
1692
|
+
}
|
1693
|
+
function Cl(i) {
|
1694
|
+
Le[i ? "unshift" : "push"](() => {
|
1695
|
+
Oe = i, t(4, Oe);
|
1696
|
+
});
|
1697
|
+
}
|
1698
|
+
function El(i) {
|
1699
|
+
Le[i ? "unshift" : "push"](() => {
|
1700
|
+
j = i, t(5, j);
|
1701
|
+
});
|
1702
|
+
}
|
1703
|
+
function Rl(i) {
|
1704
|
+
Le[i ? "unshift" : "push"](() => {
|
1705
|
+
ie = i, t(6, ie);
|
1706
|
+
});
|
1707
|
+
}
|
1708
|
+
function Ll(i) {
|
1709
|
+
Le[i ? "unshift" : "push"](() => {
|
1710
|
+
be = i, t(7, be);
|
1711
|
+
});
|
1712
|
+
}
|
1713
|
+
const yl = () => qe(), Pl = () => it(), Ol = () => ze();
|
1714
|
+
function Il(i) {
|
1715
|
+
Le[i ? "unshift" : "push"](() => {
|
1716
|
+
F = i, t(8, F);
|
1717
|
+
});
|
1718
|
+
}
|
1719
|
+
const Al = () => it(), Sl = () => ze();
|
1720
|
+
function Tl() {
|
1721
|
+
R = this.value, kt.set(R);
|
1722
|
+
}
|
1723
|
+
const xl = () => it(), Dl = () => ze();
|
1724
|
+
function Ml() {
|
1725
|
+
R = this.value, kt.set(R);
|
1726
|
+
}
|
1727
|
+
const Nl = () => ze(), Fl = () => {
|
1728
|
+
t(13, le = !0), v();
|
1729
|
+
};
|
1730
|
+
return l.$$set = (i) => {
|
1731
|
+
"enableMinutiae" in i && t(42, ue = i.enableMinutiae), "videoDimensions" in i && t(43, Ke = i.videoDimensions), "noTabs" in i && t(44, Ie = i.noTabs), "weightsPath" in i && t(45, de = i.weightsPath), "widgetInstance" in i && t(0, V = i.widgetInstance);
|
1732
|
+
}, [
|
1733
|
+
V,
|
1734
|
+
D,
|
1735
|
+
I,
|
1736
|
+
ae,
|
1737
|
+
Oe,
|
1738
|
+
j,
|
1739
|
+
ie,
|
1740
|
+
be,
|
1741
|
+
F,
|
1742
|
+
z,
|
1743
|
+
he,
|
1744
|
+
Re,
|
1745
|
+
H,
|
1746
|
+
le,
|
1747
|
+
ye,
|
1748
|
+
ne,
|
1749
|
+
Y,
|
1750
|
+
fe,
|
1751
|
+
c,
|
1752
|
+
n,
|
1753
|
+
g,
|
1754
|
+
b,
|
1755
|
+
r,
|
1756
|
+
_,
|
1757
|
+
O,
|
1758
|
+
R,
|
1759
|
+
E,
|
1760
|
+
U,
|
1761
|
+
Q,
|
1762
|
+
te,
|
1763
|
+
X,
|
1764
|
+
ke,
|
1765
|
+
Ne,
|
1766
|
+
Fe,
|
1767
|
+
$e,
|
1768
|
+
Ve,
|
1769
|
+
We,
|
1770
|
+
Ee,
|
1771
|
+
v,
|
1772
|
+
qe,
|
1773
|
+
it,
|
1774
|
+
ze,
|
1775
|
+
ue,
|
1776
|
+
Ke,
|
1777
|
+
Ie,
|
1778
|
+
de,
|
1779
|
+
hl,
|
1780
|
+
pl,
|
1781
|
+
gl,
|
1782
|
+
vl,
|
1783
|
+
wl,
|
1784
|
+
kl,
|
1785
|
+
Cl,
|
1786
|
+
El,
|
1787
|
+
Rl,
|
1788
|
+
Ll,
|
1789
|
+
yl,
|
1790
|
+
Pl,
|
1791
|
+
Ol,
|
1792
|
+
Il,
|
1793
|
+
Al,
|
1794
|
+
Sl,
|
1795
|
+
Tl,
|
1796
|
+
xl,
|
1797
|
+
Dl,
|
1798
|
+
Ml,
|
1799
|
+
Nl,
|
1800
|
+
Fl
|
1801
|
+
];
|
1802
|
+
}
|
1803
|
+
class Xi extends tl {
|
1804
|
+
constructor(e) {
|
1805
|
+
super(), ll(
|
1806
|
+
this,
|
1807
|
+
{
|
1808
|
+
target: this.shadowRoot,
|
1809
|
+
props: il(this.attributes),
|
1810
|
+
customElement: !0
|
1811
|
+
},
|
1812
|
+
Qi,
|
1813
|
+
Zi,
|
1814
|
+
Ot,
|
1815
|
+
{
|
1816
|
+
enableMinutiae: 42,
|
1817
|
+
videoDimensions: 43,
|
1818
|
+
noTabs: 44,
|
1819
|
+
weightsPath: 45,
|
1820
|
+
widgetInstance: 0,
|
1821
|
+
play: 1
|
1822
|
+
},
|
1823
|
+
null,
|
1824
|
+
[-1, -1, -1, -1]
|
1825
|
+
), e && (e.target && p(e.target, this, e.anchor), e.props && (this.$set(e.props), Te()));
|
1826
|
+
}
|
1827
|
+
static get observedAttributes() {
|
1828
|
+
return [
|
1829
|
+
"enableMinutiae",
|
1830
|
+
"videoDimensions",
|
1831
|
+
"noTabs",
|
1832
|
+
"weightsPath",
|
1833
|
+
"widgetInstance",
|
1834
|
+
"play"
|
1835
|
+
];
|
1836
|
+
}
|
1837
|
+
get enableMinutiae() {
|
1838
|
+
return this.$$.ctx[42];
|
1839
|
+
}
|
1840
|
+
set enableMinutiae(e) {
|
1841
|
+
this.$$set({ enableMinutiae: e }), Te();
|
1842
|
+
}
|
1843
|
+
get videoDimensions() {
|
1844
|
+
return this.$$.ctx[43];
|
1845
|
+
}
|
1846
|
+
set videoDimensions(e) {
|
1847
|
+
this.$$set({ videoDimensions: e }), Te();
|
1848
|
+
}
|
1849
|
+
get noTabs() {
|
1850
|
+
return this.$$.ctx[44];
|
1851
|
+
}
|
1852
|
+
set noTabs(e) {
|
1853
|
+
this.$$set({ noTabs: e }), Te();
|
1854
|
+
}
|
1855
|
+
get weightsPath() {
|
1856
|
+
return this.$$.ctx[45];
|
1857
|
+
}
|
1858
|
+
set weightsPath(e) {
|
1859
|
+
this.$$set({ weightsPath: e }), Te();
|
1860
|
+
}
|
1861
|
+
get widgetInstance() {
|
1862
|
+
return this.$$.ctx[0];
|
1863
|
+
}
|
1864
|
+
set widgetInstance(e) {
|
1865
|
+
this.$$set({ widgetInstance: e }), Te();
|
1866
|
+
}
|
1867
|
+
get play() {
|
1868
|
+
return this.$$.ctx[1];
|
1869
|
+
}
|
1870
|
+
}
|
1871
|
+
customElements.define("face-collector", Xi);
|
1872
|
+
export {
|
1873
|
+
Xi as default
|
1874
|
+
};
|