bry-biometric-collector 3.3.0-RC08 → 3.3.0-RC09

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