bry-biometric-collector 3.3.0-RC05 → 3.3.0-RC07

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.
Files changed (24) hide show
  1. package/README.md +3 -3
  2. package/dist/CaptureBar_bbb41c40_3.3.0-RC07.js +893 -0
  3. package/dist/{DocumentCollector_fac8e88e_3.3.0-RC05.js → DocumentCollector_39a1a662_3.3.0-RC07.js} +161 -160
  4. package/dist/FaceCollector_5e696802_3.3.0-RC07.js +2391 -0
  5. package/dist/StreamCollector_89664342_3.3.0-RC07.js +348 -0
  6. package/dist/ValidationAlert_81eae4eb_3.3.0-RC07.js +847 -0
  7. package/dist/{___vite-browser-external_commonjs-proxy_9c968044_3.3.0-RC05.js → ___vite-browser-external_commonjs-proxy_d99dffb1_3.3.0-RC07.js} +3 -3
  8. package/dist/bry-biometric-collector-main.js +2 -2
  9. package/dist/{en-us_e83efd5d_3.3.0-RC05.js → en-us_c02e99cd_3.3.0-RC07.js} +3 -2
  10. package/dist/{es-cl_5939150a_3.3.0-RC05.js → es-cl_6f3eda53_3.3.0-RC07.js} +3 -2
  11. package/dist/{fingersApi_22e412a3_3.3.0-RC05.js → fingersApi_0f644f7a_3.3.0-RC07.js} +2 -2
  12. package/dist/index.js +2 -2
  13. package/dist/{index_a05d6356_3.3.0-RC05.js → index_8a654b33_3.3.0-RC07.js} +3 -3
  14. package/dist/{index_8a9061ba_3.3.0-RC05.js → index_b0b3c37a_3.3.0-RC07.js} +3 -3
  15. package/dist/{main_35f2cba0_3.3.0-RC05.js → main_866e3050_3.3.0-RC07.js} +6190 -6023
  16. package/dist/{pt-br_fae15356_3.3.0-RC05.js → pt-br_e7d46668_3.3.0-RC07.js} +9 -8
  17. package/dist/style.css +1 -1
  18. package/package.json +1 -1
  19. package/dist/FaceCollector_d7a5f6dd_3.3.0-RC05.js +0 -2387
  20. package/dist/ValidationAlert_51a3395e_3.3.0-RC05.js +0 -1657
  21. package/dist/faceApi_a8b6f8d4_3.3.0-RC05.js +0 -15
  22. /package/dist/{face_api_0e3ce8c8_3.3.0-RC05.js → face_api_0e3ce8c8_3.3.0-RC07.js} +0 -0
  23. /package/dist/{index-idlf-detector_39cfdffa_3.3.0-RC05.js → index-idlf-detector_39cfdffa_3.3.0-RC07.js} +0 -0
  24. /package/dist/{index-idlf-detector_a819b3c8_3.3.0-RC05.js → index-idlf-detector_a819b3c8_3.3.0-RC07.js} +0 -0
@@ -0,0 +1,348 @@
1
+ import { S as Ie, x as Le, y as De, z as Se, B as oe, C as j, D as Q, X as Y, E as ze, be as f, G as ke, a5 as P, H as y, I as Z, J as I, K as x, L as Fe, M as w, ab as R, ac as z, ad as Ae, ao as $, ae as K, aw as ee, ax as te, aj as B, a1 as k, at as V, aC as Re, f as ae, Q as c, P as se, aG as U, aL as Be, l as G, aN as ne, aV as H, e as Ve, aW as re, aX as M, a$ as Me, b5 as Oe, R as le, T as ue, U as de, w as Te, aR as Ne, bd as We } from "./main_866e3050_3.3.0-RC07.js";
2
+ import { V as je, C as Pe } from "./ValidationAlert_81eae4eb_3.3.0-RC07.js";
3
+ import "./face_api_0e3ce8c8_3.3.0-RC07.js";
4
+ function ie(n) {
5
+ let s, t;
6
+ return s = new je({ props: { isCountingDown: !1 } }), {
7
+ c() {
8
+ le(s.$$.fragment);
9
+ },
10
+ m(a, l) {
11
+ ue(s, a, l), t = !0;
12
+ },
13
+ i(a) {
14
+ t || (y(s.$$.fragment, a), t = !0);
15
+ },
16
+ o(a) {
17
+ I(s.$$.fragment, a), t = !1;
18
+ },
19
+ d(a) {
20
+ de(s, a);
21
+ }
22
+ };
23
+ }
24
+ function ce(n) {
25
+ let s, t;
26
+ return s = new Pe({}), {
27
+ c() {
28
+ le(s.$$.fragment);
29
+ },
30
+ m(a, l) {
31
+ ue(s, a, l), t = !0;
32
+ },
33
+ i(a) {
34
+ t || (y(s.$$.fragment, a), t = !0);
35
+ },
36
+ o(a) {
37
+ I(s.$$.fragment, a), t = !1;
38
+ },
39
+ d(a) {
40
+ de(s, a);
41
+ }
42
+ };
43
+ }
44
+ function Ke(n) {
45
+ let s, t, a, l, g, m, i = (
46
+ /*$ready*/
47
+ n[5] && !/*idrndClosed*/
48
+ n[2] && !/*idrndLoading*/
49
+ n[3] && ie()
50
+ ), r = (
51
+ /*idrndClosed*/
52
+ n[2] && !/*idrndLoading*/
53
+ n[3] && ce()
54
+ );
55
+ return {
56
+ c() {
57
+ s = Q("div"), i && i.c(), t = Y(), a = Q("idlive-face-capture"), g = Y(), r && r.c(), this.c = ze, f(a, "class", "w-full h-full"), f(a, "auto_close_disabled", ""), f(
58
+ a,
59
+ "device_id",
60
+ /*$selectedVideoDeviceId*/
61
+ n[4]
62
+ ), f(a, "face_not_centered_check_enabled", ""), f(a, "sunglasses_detected_check_enabled", ""), f(a, "mouth_open_check_enabled", ""), f(a, "face_blurry_check_enabled", ""), f(a, "dark_image_check_enabled", ""), f(a, "eyes_closed_check_enabled", ""), f(
63
+ a,
64
+ "payload_size",
65
+ /*livenessBlobSize*/
66
+ n[1]
67
+ ), f(a, "style", l = /*idrndClosed*/
68
+ n[2] ? "opacity: 0; pointer-events: none;" : "opacity: 1;"), ke(s, "class", "flex justify-center w-full h-full relative bg-black");
69
+ },
70
+ m(u, p) {
71
+ oe(u, s, p), i && i.m(s, null), P(s, t), P(s, a), n[9](a), P(s, g), r && r.m(s, null), m = !0;
72
+ },
73
+ p(u, p) {
74
+ /*$ready*/
75
+ u[5] && !/*idrndClosed*/
76
+ u[2] && !/*idrndLoading*/
77
+ u[3] ? i ? p[0] & /*$ready, idrndClosed, idrndLoading*/
78
+ 44 && y(i, 1) : (i = ie(), i.c(), y(i, 1), i.m(s, t)) : i && (Z(), I(i, 1, 1, () => {
79
+ i = null;
80
+ }), x()), (!m || p[0] & /*$selectedVideoDeviceId*/
81
+ 16) && f(
82
+ a,
83
+ "device_id",
84
+ /*$selectedVideoDeviceId*/
85
+ u[4]
86
+ ), (!m || p[0] & /*livenessBlobSize*/
87
+ 2) && f(
88
+ a,
89
+ "payload_size",
90
+ /*livenessBlobSize*/
91
+ u[1]
92
+ ), (!m || p[0] & /*idrndClosed*/
93
+ 4 && l !== (l = /*idrndClosed*/
94
+ u[2] ? "opacity: 0; pointer-events: none;" : "opacity: 1;")) && f(a, "style", l), /*idrndClosed*/
95
+ u[2] && !/*idrndLoading*/
96
+ u[3] ? r ? p[0] & /*idrndClosed, idrndLoading*/
97
+ 12 && y(r, 1) : (r = ce(), r.c(), y(r, 1), r.m(s, null)) : r && (Z(), I(r, 1, 1, () => {
98
+ r = null;
99
+ }), x());
100
+ },
101
+ i(u) {
102
+ m || (y(i), y(r), m = !0);
103
+ },
104
+ o(u) {
105
+ I(i), I(r), m = !1;
106
+ },
107
+ d(u) {
108
+ u && Fe(s), i && i.d(), n[9](null), r && r.d();
109
+ }
110
+ };
111
+ }
112
+ function Ue() {
113
+ ({}).VITE_USE_DEV === "true" ? import("./index-idlf-detector_39cfdffa_3.3.0-RC07.js") : import("./index-idlf-detector_a819b3c8_3.3.0-RC07.js");
114
+ }
115
+ function Ge(n, s, t) {
116
+ let a, l, g, m, i, r, u, p, C, v, L;
117
+ w(n, R, (e) => t(14, a = e)), w(n, z, (e) => t(4, l = e)), w(n, Ae, (e) => t(15, g = e)), w(n, $, (e) => t(16, m = e)), w(n, K, (e) => t(18, r = e)), w(n, ee, (e) => t(19, u = e)), w(n, te, (e) => t(20, p = e)), w(n, B, (e) => t(21, C = e)), w(n, k, (e) => t(5, v = e)), w(n, V, (e) => t(22, L = e));
118
+ let { livenessBlobSize: X } = s;
119
+ const O = Te("data:image/png;base64");
120
+ w(n, O, (e) => t(17, i = e));
121
+ let { widgetInstance: o } = s, F = !1, b = !0, _ = !0, T = !0, h = !1;
122
+ Re(async () => {
123
+ ae("Mounting Stream Collector!"), c(V, L = !0, L), c(k, v = !1, v), fe(), Ue(), pe(), W = me(), se() || ge();
124
+ });
125
+ function fe() {
126
+ c(K, r = !1, r), c(R, a = U.FRONT_CAMERA, a), T = document.hasFocus(), h = !1, c(B, C = "faceCollector.stayInFrame", C);
127
+ }
128
+ function me() {
129
+ const e = () => N(document.visibilityState === "visible"), d = () => N(!0), E = () => N(!1);
130
+ return document.addEventListener("visibilitychange", e), window.addEventListener("focus", d), window.addEventListener("blur", E), () => {
131
+ document.removeEventListener("visibilitychange", e), window.removeEventListener("focus", d), window.removeEventListener("blur", E);
132
+ };
133
+ }
134
+ function N(e) {
135
+ T = e, !e && !b && F ? h = !0 : e && h && b && F && be();
136
+ }
137
+ async function be() {
138
+ try {
139
+ document.hasFocus() && b && h && (h = !1, await q(), window.dispatchEvent(new CustomEvent(
140
+ "stream-auto-reopened",
141
+ {
142
+ detail: {
143
+ message: "Câmera reaberta automaticamente após retorno do foco"
144
+ }
145
+ }
146
+ )));
147
+ } catch (e) {
148
+ G("Error during automatic camera reopen:", e), h = !1;
149
+ }
150
+ }
151
+ function pe() {
152
+ o.addEventListener("open", async (e) => {
153
+ t(2, b = !1), t(3, _ = !1), c(k, v = !0, v), c(V, L = !1, L), h = !1, window.dispatchEvent(new CustomEvent(
154
+ "stream-ready",
155
+ {
156
+ detail: {
157
+ message: "Stream de vídeo pronto para captura"
158
+ }
159
+ }
160
+ ));
161
+ }), o.addEventListener("error", (e) => {
162
+ ae("Stream Collector error:", e), t(2, b = !0), t(3, _ = !1), c(k, v = !1, v), window.dispatchEvent(new CustomEvent(
163
+ "stream-error",
164
+ {
165
+ detail: {
166
+ message: e.detail[0]?.message || "Erro na câmera",
167
+ error: e
168
+ }
169
+ }
170
+ ));
171
+ }), o.addEventListener("faceDetection", (e) => {
172
+ c(
173
+ B,
174
+ C = e.detail[0].errors[0] ? "faceCollector.stayInFrame" : "faceCollector.capturing",
175
+ C
176
+ );
177
+ }), o.addEventListener("detection", (e) => {
178
+ c(
179
+ B,
180
+ C = e.detail[0].errors[0] ? "faceCollector.stayInFrame" : "faceCollector.capturing",
181
+ C
182
+ );
183
+ }), o.addEventListener("close", async (e) => {
184
+ t(2, b = !0), t(3, _ = !1), T || (h = !0, window.dispatchEvent(new CustomEvent(
185
+ "stream-lost-focus",
186
+ {
187
+ detail: { message: "Stream de vídeo foi fechado" }
188
+ }
189
+ )));
190
+ }), o.addEventListener("initialize", async (e) => {
191
+ F = !0, c(te, p = !0, p);
192
+ try {
193
+ o.setLicense(Be, "faceDetector");
194
+ } catch (d) {
195
+ G("Error setting license:", d);
196
+ }
197
+ !r && F && await D();
198
+ }), o.addEventListener("capture", async (e) => {
199
+ const { encryptedFile: d, photo: E } = e.detail[0];
200
+ c(ee, u = d, u);
201
+ const S = (await ne(E)).split(",");
202
+ c(K, r = !0, r), c(O, i = S[0], i), c($, m = S[1], m);
203
+ try {
204
+ window.dispatchEvent(new CustomEvent(
205
+ "stream-capture",
206
+ {
207
+ detail: {
208
+ image: m,
209
+ blob: (await ne(d)).split(",")[1],
210
+ status: "success"
211
+ }
212
+ }
213
+ ));
214
+ } catch (A) {
215
+ let J = A instanceof Error ? A.message : "UNKNOWN", Ce = Ne[J] || "Erro desconhecido";
216
+ window.dispatchEvent(new CustomEvent(
217
+ "stream-capture",
218
+ {
219
+ detail: {
220
+ errorCode: J,
221
+ translatedError: Ce,
222
+ status: "error"
223
+ }
224
+ }
225
+ ));
226
+ }
227
+ });
228
+ }
229
+ async function D() {
230
+ if (!g[0]?.deviceId) {
231
+ try {
232
+ await H(1920, 1080);
233
+ } catch (e) {
234
+ try {
235
+ await H(1280, 720);
236
+ } catch {
237
+ await H(640, 480);
238
+ }
239
+ const d = e, E = Ve(d) && "constraint" in d ? d.constraint : "";
240
+ G(d.message, E);
241
+ }
242
+ await re(), c(z, l = g[0].deviceId, l);
243
+ }
244
+ t(3, _ = !0), o && "openCamera" in o && o.openCamera(), t(2, b = !1);
245
+ }
246
+ async function we() {
247
+ o.takePhoto();
248
+ }
249
+ async function q() {
250
+ t(3, _ = !0), c(z, l = "", l), h = !1, await D();
251
+ }
252
+ function ge() {
253
+ navigator.mediaDevices.ondevicechange = async (e) => {
254
+ e.type == "devicechange" && (await re(), b || (M(o), t(2, b = !0)));
255
+ };
256
+ }
257
+ let W = null;
258
+ const _e = z.subscribe(async (e) => {
259
+ if (!b)
260
+ try {
261
+ t(3, _ = !0), await M(o), await D();
262
+ } catch {
263
+ t(2, b = !0), t(3, _ = !1);
264
+ }
265
+ }), he = Me.subscribe(async (e) => {
266
+ if (g[0]?.deviceId) {
267
+ if (t(3, _ = !0), M(), !se()) {
268
+ const E = (g.findIndex((A) => A.deviceId === l) + 1) % g.length, S = g[E].deviceId;
269
+ c(z, l = S, l);
270
+ }
271
+ e ? (c(R, a = U.REAR_CAMERA, a), await D()) : (c(R, a = U.FRONT_CAMERA, a), await D());
272
+ }
273
+ }), ve = k.subscribe((e) => {
274
+ e && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
275
+ }), Ee = V.subscribe((e) => {
276
+ e && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
277
+ });
278
+ Oe(() => {
279
+ M(o), _e(), he(), ve(), Ee(), W && W();
280
+ });
281
+ function ye(e) {
282
+ We[e ? "unshift" : "push"](() => {
283
+ o = e, t(0, o);
284
+ });
285
+ }
286
+ return n.$$set = (e) => {
287
+ "livenessBlobSize" in e && t(1, X = e.livenessBlobSize), "widgetInstance" in e && t(0, o = e.widgetInstance);
288
+ }, [
289
+ o,
290
+ X,
291
+ b,
292
+ _,
293
+ l,
294
+ v,
295
+ O,
296
+ we,
297
+ q,
298
+ ye
299
+ ];
300
+ }
301
+ class He extends Ie {
302
+ constructor(s) {
303
+ super(), Le(
304
+ this,
305
+ {
306
+ target: this.shadowRoot,
307
+ props: Se(this.attributes),
308
+ customElement: !0
309
+ },
310
+ Ge,
311
+ Ke,
312
+ De,
313
+ {
314
+ livenessBlobSize: 1,
315
+ widgetInstance: 0,
316
+ capture: 7,
317
+ reOpenCamera: 8
318
+ },
319
+ null,
320
+ [-1, -1]
321
+ ), s && (s.target && oe(s.target, this, s.anchor), s.props && (this.$set(s.props), j()));
322
+ }
323
+ static get observedAttributes() {
324
+ return ["livenessBlobSize", "widgetInstance", "capture", "reOpenCamera"];
325
+ }
326
+ get livenessBlobSize() {
327
+ return this.$$.ctx[1];
328
+ }
329
+ set livenessBlobSize(s) {
330
+ this.$$set({ livenessBlobSize: s }), j();
331
+ }
332
+ get widgetInstance() {
333
+ return this.$$.ctx[0];
334
+ }
335
+ set widgetInstance(s) {
336
+ this.$$set({ widgetInstance: s }), j();
337
+ }
338
+ get capture() {
339
+ return this.$$.ctx[7];
340
+ }
341
+ get reOpenCamera() {
342
+ return this.$$.ctx[8];
343
+ }
344
+ }
345
+ customElements.define("stream-collector", He);
346
+ export {
347
+ He as default
348
+ };