bry-biometric-collector
Version:
BRy web-collector component for biometric capture.
1,175 lines (1,174 loc) • 41.1 kB
JavaScript
import { S as st, q as ot, r as nt, t as rt, w as j, x as S, y as p, bc as se, B as Y, C as g, aV as oe, bd as Ot, T as I, H as E, J as M, be as q, bf as hi, L as ne, Q as F, z as $, aY as _e, D as ee, E as L, G as U, I as te, M as X, N as v, P as W, R as mi, U as it, V as at, W as Ge, X as be, Y as G, Z as ve, _ as bi, a0 as Ie, a2 as vi, a1 as de, a3 as we, a4 as Ye, a5 as Qe, a6 as Nt, aa as Ce, ac as Xe, ad as Ii, ae as zt, af as ye, $ as wi, a9 as Ve, ah as jt, aj as Je, ao as Ci, ap as yi, ar as Mi, as as pi, at as _i, av as xe, aw as re, j as Di, ax as Ke, aI as kt, d as Me, aJ as Rt, aK as qe, aL as Ti, az as $e, bg as Ai, aM as Oi, aN as Ni, aO as zi, au as ji, aP as ki, bh as Ri, aR as Ei, aS as pe, aT as Si, aU as Zi, aW as le, aX as lt, aZ as Pi, a_ as V, a$ as J, b0 as Et, b1 as Wi, aC as Li, b4 as et, bi as Fi } from "./main_379f7152_3.0.0.js";
import { W as Hi, C as Ui, V as Bi, a as Gi } from "./ValidationAlert_f97e5664_3.0.0.js";
import { matchDimensions as Yi, resizeResults as Qi } from "./face_api_0e3ce8c8_3.0.0.js";
const Xi = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwNiIgaGVpZ2h0PSI4OTAiIHZpZXdCb3g9IjAgMCAxMjA2IDg5MCIgZmlsbD0ibm9uZSIgb3BhY2l0eT0iMC4yIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xOF80KSIgb3BhY2l0eT0iMCI+CiAgICA8bWFzayBpZD0icGF0aC0xLWluc2lkZS0xXzE4XzQiIGZpbGw9IndoaXRlIj4KICAgIDxyZWN0IHg9IjQiIHdpZHRoPSIxMTk4IiBoZWlnaHQ9Ijg4MiIgcng9IjYiLz4KICAgIDwvbWFzaz4KICAgIDxyZWN0IHg9IjQiIHdpZHRoPSIxMTk4IiBoZWlnaHQ9Ijg4MiIgcng9IjYiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aWR0aD0iMTYiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIgbWFzaz0idXJsKCNwYXRoLTEtaW5zaWRlLTFfMThfNCkiLz4KICAgIDwvZz4KICAgIDxtYXNrIGlkPSJwYXRoLTItaW5zaWRlLTJfMThfNCIgZmlsbD0id2hpdGUiPgogICAgPHJlY3QgeD0iMjE5LjI3OCIgeT0iMjk2IiB3aWR0aD0iMzM4Ljg2MyIgaGVpZ2h0PSI0NjgiIHJ4PSI3Ii8+CiAgICA8L21hc2s+CiAgICA8cmVjdCB4PSIyMTkuMjc4IiB5PSIyOTYiIHdpZHRoPSIzMzguODYzIiBoZWlnaHQ9IjQ2OCIgcng9IjciIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aWR0aD0iMTYiIG1hc2s9InVybCgjcGF0aC0yLWluc2lkZS0yXzE4XzQpIi8+CiAgICA8ZWxsaXBzZSBjeD0iMzg5LjIzOCIgY3k9IjUxMS4yMjgiIHJ4PSI4Ni4yMzc2IiByeT0iODUuMjI4NCIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4wOCIvPgogICAgPHBhdGggZD0iTTQ3MS40NzUgNTExLjIyOEM0NzEuNDc1IDU1Ni4wNDUgNDM0LjcwMSA1OTIuNDU3IDM4OS4yMzggNTkyLjQ1N0MzNDMuNzc0IDU5Mi40NTcgMzA3IDU1Ni4wNDUgMzA3IDUxMS4yMjhDMzA3IDQ2Ni40MTEgMzQzLjc3NCA0MzAgMzg5LjIzOCA0MzBDNDM0LjcwMSA0MzAgNDcxLjQ3NSA0NjYuNDExIDQ3MS40NzUgNTExLjIyOFoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aWR0aD0iOCIvPgogICAgPHBhdGggZD0iTTM4Ny4zOCA2MDhDNTM1LjI2IDYwOCA1MzkuODggNzQzLjQ3MyA1MzkuODggNzQzLjQ3M0wyMzkgNzQzLjVDMjM5IDc0My41IDIzOS41IDYwOCAzODcuMzggNjA4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4wOCIvPgogICAgPHBhdGggZD0iTTM4Ny4zOCA2MTJDNDU5Ljc5NCA2MTIgNDk2LjY0OSA2NDUuMDIgNTE1LjYyNSA2NzcuNzQzQzUyNS4xOCA2OTQuMjIgNTMwLjI1NSA3MTAuNzMzIDUzMi45MzggNzIzLjE1QzUzNC4yNzggNzI5LjM1MSA1MzUuMDE2IDczNC41MDggNTM1LjQxOCA3MzguMDk4QzUzNS40NzMgNzM4LjU4NiA1MzUuNTIxIDczOS4wNDUgNTM1LjU2NCA3MzkuNDc0TDI0My4xODQgNzM5LjVDMjQzLjIxNiA3MzkuMDM3IDI0My4yNTMgNzM4LjUzOCAyNDMuMjk3IDczOC4wMDNDMjQzLjU5IDczNC40MTQgMjQ0LjE3MSA3MjkuMjU4IDI0NS4zMjIgNzIzLjA1OEMyNDcuNjI2IDcxMC42NDIgMjUyLjE5NyA2OTQuMTM4IDI2MS4yNDEgNjc3LjY3NkMyNzAuMjczIDY2MS4yMzYgMjgzLjc0OCA2NDQuODY0IDMwMy44OTEgNjMyLjU4N0MzMjQuMDI0IDYyMC4zMTYgMzUxLjA0MiA2MTIgMzg3LjM4IDYxMloiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aWR0aD0iOCIvPgogICAgPGRlZnM+CiAgICA8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RfMThfNCIgeD0iMCIgeT0iMCIgd2lkdGg9IjEyMDYiIGhlaWdodD0iODkwIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CiAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgogICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CiAgICA8ZmVPZmZzZXQgZHk9IjQiLz4KICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiLz4KICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgogICAgPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMjUgMCIvPgogICAgPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJlZmZlY3QxX2Ryb3BTaGFkb3dfMThfNCIvPgogICAgPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMThfNCIgcmVzdWx0PSJzaGFwZSIvPgogICAgPC9maWx0ZXI+CiAgICA8L2RlZnM+CiAgICA8L3N2Zz4KICAgIA==";
function Vi(a) {
let e, t, s, o, r, n, u, f, d, l, h;
return {
c() {
e = p("div"), t = se("svg"), s = se("defs"), o = se("mask"), r = se("rect"), n = se("rect"), h = se("rect"), this.c = Y, g(r, "width", "100%"), g(r, "height", "100%"), g(r, "fill", "white"), g(n, "id", "transparent-rect"), g(n, "x", u = "calc((100% - " + /*$docDimensions*/
a[2].width + "px) / 2)"), g(n, "y", f = "calc(" + /*y*/
a[3] + ")"), g(n, "width", d = /*$docDimensions*/
a[2].width), g(n, "height", l = /*$docDimensions*/
a[2].height), g(n, "fill", "black"), g(o, "id", "transparentAreaMask"), g(h, "width", "100%"), g(h, "height", "100%"), oe(h, "fill", "rgba(" + Ot(
/*videoOverlay*/
a[0]
) + ", " + (1 - /*videoOverlayTransparency*/
a[1] / 100) + ")"), g(h, "mask", "url(#transparentAreaMask)"), g(t, "class", "absolute w-full h-full"), g(t, "xmlns", "http://www.w3.org/2000/svg"), g(e, "id", "overlay-container"), g(e, "class", "flex items-center justify-center absolute inset-0");
},
m(c, m) {
j(c, e, m), I(e, t), I(t, s), I(s, o), I(o, r), I(o, n), I(t, h);
},
p(c, [m]) {
m & /*$docDimensions*/
4 && u !== (u = "calc((100% - " + /*$docDimensions*/
c[2].width + "px) / 2)") && g(n, "x", u), m & /*y*/
8 && f !== (f = "calc(" + /*y*/
c[3] + ")") && g(n, "y", f), m & /*$docDimensions*/
4 && d !== (d = /*$docDimensions*/
c[2].width) && g(n, "width", d), m & /*$docDimensions*/
4 && l !== (l = /*$docDimensions*/
c[2].height) && g(n, "height", l), m & /*videoOverlay, videoOverlayTransparency*/
3 && oe(h, "fill", "rgba(" + Ot(
/*videoOverlay*/
c[0]
) + ", " + (1 - /*videoOverlayTransparency*/
c[1] / 100) + ")");
},
i: Y,
o: Y,
d(c) {
c && E(e);
}
};
}
function Ji(a, e, t) {
let s, o, r;
M(a, q, (l) => t(2, s = l)), M(a, hi, (l) => t(5, o = l)), M(a, ne, (l) => t(6, r = l));
let { videoOverlay: n } = e, { videoOverlayTransparency: u } = e, f, d;
return a.$$set = (l) => {
"videoOverlay" in l && t(0, n = l.videoOverlay), "videoOverlayTransparency" in l && t(1, u = l.videoOverlayTransparency);
}, a.$$.update = () => {
a.$$.dirty & /*$videoStore, $docDimensions, $captureBarHeight, divHeight*/
116 && r && s && (t(4, f = r.videoHeight - o), t(3, d = (f - s.height) / 2 + "px"));
}, [
n,
u,
s,
d,
f,
o,
r
];
}
class Lt extends st {
constructor(e) {
super(), ot(
this,
{
target: this.shadowRoot,
props: rt(this.attributes),
customElement: !0
},
Ji,
Vi,
nt,
{
videoOverlay: 0,
videoOverlayTransparency: 1
},
null
), e && (e.target && j(e.target, this, e.anchor), e.props && (this.$set(e.props), S()));
}
static get observedAttributes() {
return ["videoOverlay", "videoOverlayTransparency"];
}
get videoOverlay() {
return this.$$.ctx[0];
}
set videoOverlay(e) {
this.$$set({ videoOverlay: e }), S();
}
get videoOverlayTransparency() {
return this.$$.ctx[1];
}
set videoOverlayTransparency(e) {
this.$$set({ videoOverlayTransparency: e }), S();
}
}
customElements.define("document-overlay", Lt);
function xi(a) {
let e, t, s, o, r, n, u, f, d, l, h;
return u = new Hi({}), l = new Lt({
props: {
videoOverlay: (
/*videoOverlay*/
a[1]
),
videoOverlayTransparency: (
/*videoOverlayTransparency*/
a[2]
),
borderWidth: (
/*borderWidth*/
a[3]
)
}
}), {
c() {
e = p("div"), t = p("div"), s = p("div"), o = p("img"), n = F(), $(u.$$.fragment), d = F(), $(l.$$.fragment), this.c = Y, _e(o.src, r = Xi) || g(o, "src", r), g(o, "alt", "document"), g(s, "class", "w-full h-full relative"), g(t, "class", "absolute inset-0 flex justify-center"), g(e, "id", "doc-rectangle"), g(e, "class", f = "doc-loader " + /*loading*/
(a[0] ? "doc-loading" : "") + " z-10"), g(
e,
"style",
/*styleVars*/
a[4]
);
},
m(c, m) {
j(c, e, m), I(e, t), I(t, s), I(s, o), I(e, n), ee(u, e, null), j(c, d, m), ee(l, c, m), h = !0;
},
p(c, [m]) {
(!h || m & /*loading*/
1 && f !== (f = "doc-loader " + /*loading*/
(c[0] ? "doc-loading" : "") + " z-10")) && g(e, "class", f), (!h || m & /*styleVars*/
16) && g(
e,
"style",
/*styleVars*/
c[4]
);
const y = {};
m & /*videoOverlay*/
2 && (y.videoOverlay = /*videoOverlay*/
c[1]), m & /*videoOverlayTransparency*/
4 && (y.videoOverlayTransparency = /*videoOverlayTransparency*/
c[2]), m & /*borderWidth*/
8 && (y.borderWidth = /*borderWidth*/
c[3]), l.$set(y);
},
i(c) {
h || (L(u.$$.fragment, c), L(l.$$.fragment, c), h = !0);
},
o(c) {
U(u.$$.fragment, c), U(l.$$.fragment, c), h = !1;
},
d(c) {
c && E(e), te(u), c && E(d), te(l, c);
}
};
}
const tt = 1.36, Ki = "hsl(var(--p))", qi = "hsl(var(--su))";
function $i(a, e, t) {
let s, o, r;
M(a, q, (m) => t(8, o = m)), M(a, ne, (m) => t(9, r = m));
let { loading: n } = e, { videoOverlay: u = "" } = e, { videoOverlayTransparency: f = 100 } = e, d, l, h = 6, c = 0.7;
return X() && (c = 0.85, h = 5), a.$$set = (m) => {
"loading" in m && t(0, n = m.loading), "videoOverlay" in m && t(1, u = m.videoOverlay), "videoOverlayTransparency" in m && t(2, f = m.videoOverlayTransparency);
}, a.$$.update = () => {
a.$$.dirty & /*$videoStore, percentage, rectangleHeight, rectangleWidth, $docDimensions*/
992 && r && (r.videoWidth / r.videoHeight > tt ? (t(6, l = r.videoHeight * c), t(5, d = l * tt)) : (t(5, d = r.videoWidth * c), t(6, l = d / tt)), v(q, o.width = d, o), v(q, o.height = l, o), v(q, o.x = (r.videoWidth - o.width) / 2, o), v(q, o.y = (r.videoHeight - o.height) / 2, o)), a.$$.dirty & /*rectangleWidth, rectangleHeight, borderWidth*/
104 && t(4, s = `
--rectangle-width: ${d}px;
--rectangle-height: ${l}px;
--border-color: ${Ki};
--border-color-animation: ${qi};
--rectangle-border: ${h}px;
`);
}, [
n,
u,
f,
h,
s,
d,
l,
c,
o,
r
];
}
class Ft extends st {
constructor(e) {
super(), ot(
this,
{
target: this.shadowRoot,
props: rt(this.attributes),
customElement: !0
},
$i,
xi,
nt,
{
loading: 0,
videoOverlay: 1,
videoOverlayTransparency: 2
},
null
), e && (e.target && j(e.target, this, e.anchor), e.props && (this.$set(e.props), S()));
}
static get observedAttributes() {
return ["loading", "videoOverlay", "videoOverlayTransparency"];
}
get loading() {
return this.$$.ctx[0];
}
set loading(e) {
this.$$set({ loading: e }), S();
}
get videoOverlay() {
return this.$$.ctx[1];
}
set videoOverlay(e) {
this.$$set({ videoOverlay: e }), S();
}
get videoOverlayTransparency() {
return this.$$.ctx[2];
}
set videoOverlayTransparency(e) {
this.$$set({ videoOverlayTransparency: e }), S();
}
}
customElements.define("doc-rectangle", Ft);
function St(a) {
let e, t, s, o, r, n, u, f, d, l, h, c, m, y, Z, b, C, O, A = (
/*$ready*/
a[11] && Zt(a)
);
return h = new Zi({}), m = new Ui({
props: {
showConfigButton: (
/*showConfigButton*/
a[1]
),
showCameraButton: (
/*showCameraButton*/
a[2]
),
videoOverlay: (
/*videoOverlay*/
a[3]
),
videoOverlayTransparency: (
/*videoOverlayTransparency*/
a[4]
),
handler: (
/*capture*/
a[24]
)
}
}), {
c() {
e = p("div"), t = p("div"), s = p("video"), r = F(), n = p("canvas"), u = F(), f = p("div"), d = p("div"), A && A.c(), l = F(), $(h.$$.fragment), c = F(), $(m.$$.fragment), g(s, "id", "bry-cc-camera-video-tag"), g(s, "class", o = /*$ready*/
a[11] ? X() ? "absolute inset-0" : "w-full h-full object-cover" : "w-0 h-0"), s.playsInline = !0, s.muted = !0, s.autoplay = !0, g(n, "id", "bry-ce-detectionsCanvas"), g(n, "class", "absolute top-0 left-0 max-w-full"), g(t, "class", "overflow-hidden"), oe(
t,
"width",
/*$videoStore*/
a[12].videoWidth + "px"
), oe(
t,
"height",
/*$videoStore*/
a[12].videoHeight + "px"
), g(d, "class", "flex flex-grow w-full items-center justify-center relative"), g(f, "class", "absolute inset-0 flex flex-col items-center justify-between w-full h-full"), g(e, "class", y = /*$ready*/
a[11] ? "relative" : "relative w-0 h-0"), e.hidden = Z = /*$cameraStatusStore*/
a[10] !== W.OK;
},
m(T, k) {
j(T, e, k), I(e, t), I(t, s), a[32](s), I(t, r), I(t, n), a[34](n), I(e, u), I(e, f), I(f, d), A && A.m(d, null), I(f, l), ee(h, f, null), I(f, c), ee(m, f, null), b = !0, C || (O = [
le(
s,
"canplay",
/*canplay_handler*/
a[33]
),
le(
s,
"play",
/*play*/
a[5],
{ once: !0 }
)
], C = !0);
},
p(T, k) {
(!b || k[0] & /*$ready*/
2048 && o !== (o = /*$ready*/
T[11] ? X() ? "absolute inset-0" : "w-full h-full object-cover" : "w-0 h-0")) && g(s, "class", o), (!b || k[0] & /*$videoStore*/
4096) && oe(
t,
"width",
/*$videoStore*/
T[12].videoWidth + "px"
), (!b || k[0] & /*$videoStore*/
4096) && oe(
t,
"height",
/*$videoStore*/
T[12].videoHeight + "px"
), /*$ready*/
T[11] ? A ? (A.p(T, k), k[0] & /*$ready*/
2048 && L(A, 1)) : (A = Zt(T), A.c(), L(A, 1), A.m(d, null)) : A && (it(), U(A, 1, 1, () => {
A = null;
}), at());
const P = {};
k[0] & /*showConfigButton*/
2 && (P.showConfigButton = /*showConfigButton*/
T[1]), k[0] & /*showCameraButton*/
4 && (P.showCameraButton = /*showCameraButton*/
T[2]), k[0] & /*videoOverlay*/
8 && (P.videoOverlay = /*videoOverlay*/
T[3]), k[0] & /*videoOverlayTransparency*/
16 && (P.videoOverlayTransparency = /*videoOverlayTransparency*/
T[4]), m.$set(P), (!b || k[0] & /*$ready*/
2048 && y !== (y = /*$ready*/
T[11] ? "relative" : "relative w-0 h-0")) && g(e, "class", y), (!b || k[0] & /*$cameraStatusStore*/
1024 && Z !== (Z = /*$cameraStatusStore*/
T[10] !== W.OK)) && (e.hidden = Z);
},
i(T) {
b || (L(A), L(h.$$.fragment, T), L(m.$$.fragment, T), b = !0);
},
o(T) {
U(A), U(h.$$.fragment, T), U(m.$$.fragment, T), b = !1;
},
d(T) {
T && E(e), a[32](null), a[34](null), A && A.d(), te(h), te(m), C = !1, lt(O);
}
};
}
function Zt(a) {
let e, t, s, o;
return e = new Bi({
props: {
isCountingDown: (
/*isCountingDown*/
a[9]
)
}
}), s = new Ft({
props: {
loading: (
/*isCountingDown*/
a[9]
),
videoOverlay: (
/*videoOverlay*/
a[3]
),
videoOverlayTransparency: (
/*videoOverlayTransparency*/
a[4]
)
}
}), {
c() {
$(e.$$.fragment), t = F(), $(s.$$.fragment);
},
m(r, n) {
ee(e, r, n), j(r, t, n), ee(s, r, n), o = !0;
},
p(r, n) {
const u = {};
n[0] & /*isCountingDown*/
512 && (u.isCountingDown = /*isCountingDown*/
r[9]), e.$set(u);
const f = {};
n[0] & /*isCountingDown*/
512 && (f.loading = /*isCountingDown*/
r[9]), n[0] & /*videoOverlay*/
8 && (f.videoOverlay = /*videoOverlay*/
r[3]), n[0] & /*videoOverlayTransparency*/
16 && (f.videoOverlayTransparency = /*videoOverlayTransparency*/
r[4]), s.$set(f);
},
i(r) {
o || (L(e.$$.fragment, r), L(s.$$.fragment, r), o = !0);
},
o(r) {
U(e.$$.fragment, r), U(s.$$.fragment, r), o = !1;
},
d(r) {
te(e, r), r && E(t), te(s, r);
}
};
}
function Pt(a) {
let e, t, s, o, r;
function n(d, l) {
return (
/*$isLoading*/
d[20] ? ta : ea
);
}
let u = n(a), f = u(a);
return {
c() {
e = p("slot"), t = p("div"), s = p("img"), r = F(), f.c(), _e(s.src, o = Pi) || g(s, "src", o), g(s, "alt", "loading gif"), g(s, "class", "m-auto h-[10em] lg:h-[12em]"), g(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), g(e, "name", "loading-camera-gif"), g(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
},
m(d, l) {
j(d, e, l), I(e, t), I(t, s), I(t, r), f.m(t, null);
},
p(d, l) {
u === (u = n(d)) && f ? f.p(d, l) : (f.d(1), f = u(d), f && (f.c(), f.m(t, null)));
},
d(d) {
d && E(e), f.d();
}
};
}
function ea(a) {
let e, t = (
/*$_*/
a[18]("faceCollector.initiatingCamera") + ""
), s;
return {
c() {
e = p("span"), s = V(t), g(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
},
m(o, r) {
j(o, e, r), I(e, s);
},
p(o, r) {
r[0] & /*$_*/
262144 && t !== (t = /*$_*/
o[18]("faceCollector.initiatingCamera") + "") && J(s, t);
},
d(o) {
o && E(e);
}
};
}
function ta(a) {
let e;
return {
c() {
e = p("span"), e.textContent = "Loading camera...", g(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
},
m(t, s) {
j(t, e, s);
},
p: Y,
d(t) {
t && E(e);
}
};
}
function Wt(a) {
let e, t, s = (
/*$_*/
a[18]("faceCollector.finish") + ""
), o, r, n, u, f = (
/*$_*/
a[18]("faceCollector.retakePhoto") + ""
), d, l, h;
return {
c() {
e = p("div"), t = p("button"), o = V(s), n = F(), u = p("button"), d = V(f), t.disabled = r = /*$justification*/
a[15].length === 0, g(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), g(u, "id", "bry-cc-retake-button"), g(u, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), g(e, "class", "ce-dui-btn-group flex");
},
m(c, m) {
j(c, e, m), I(e, t), I(t, o), I(e, n), I(e, u), I(u, d), l || (h = [
le(
t,
"click",
/*click_handler*/
a[35]
),
le(
u,
"click",
/*click_handler_1*/
a[36]
)
], l = !0);
},
p(c, m) {
m[0] & /*$_*/
262144 && s !== (s = /*$_*/
c[18]("faceCollector.finish") + "") && J(o, s), m[0] & /*$justification*/
32768 && r !== (r = /*$justification*/
c[15].length === 0) && (t.disabled = r), m[0] & /*$_*/
262144 && f !== (f = /*$_*/
c[18]("faceCollector.retakePhoto") + "") && J(d, f);
},
d(c) {
c && E(e), l = !1, lt(h);
}
};
}
function ia(a) {
let e, t;
return e = new Gi({ props: { handler: (
/*func*/
a[40]
) } }), {
c() {
$(e.$$.fragment);
},
m(s, o) {
ee(e, s, o), t = !0;
},
p: Y,
i(s) {
t || (L(e.$$.fragment, s), t = !0);
},
o(s) {
U(e.$$.fragment, s), t = !1;
},
d(s) {
te(e, s);
}
};
}
function aa(a) {
let e, t, s, o, r, n;
function u(l, h) {
return (
/*$captured*/
l[13] ? sa : oa
);
}
let f = u(a), d = f(a);
return {
c() {
e = p("div"), t = p("img"), r = F(), d.c(), g(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), _e(t.src, s = /*$dataTypePrefix*/
a[19] + "," + /*$image*/
a[16]) || g(t, "src", s), t.hidden = o = !/*$captured*/
a[13] || !/*$showFaceWhileValidating*/
a[21], g(t, "alt", ""), g(e, "class", n = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
a[21] ? "grid overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"));
},
m(l, h) {
j(l, e, h), I(e, t), I(e, r), d.m(e, null);
},
p(l, h) {
h[0] & /*$dataTypePrefix, $image*/
589824 && !_e(t.src, s = /*$dataTypePrefix*/
l[19] + "," + /*$image*/
l[16]) && g(t, "src", s), h[0] & /*$captured, $showFaceWhileValidating*/
2105344 && o !== (o = !/*$captured*/
l[13] || !/*$showFaceWhileValidating*/
l[21]) && (t.hidden = o), f === (f = u(l)) && d ? d.p(l, h) : (d.d(1), d = f(l), d && (d.c(), d.m(e, null))), h[0] & /*$showFaceWhileValidating*/
2097152 && n !== (n = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
l[21] ? "grid overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible")) && g(e, "class", n);
},
i: Y,
o: Y,
d(l) {
l && E(e), d.d();
}
};
}
function sa(a) {
let e, t, s, o, r = (
/*$_*/
a[18]("faceCollector.finish") + ""
), n, u, f, d, l = (
/*$_*/
a[18]("faceCollector.retakePhoto") + ""
), h, c, m;
function y(C, O) {
return (
/*$requestResult*/
C[17] === re.TEMPLATE_EXTRACTION_ERROR ? la : (
/*$saved*/
C[14] ? na : ra
)
);
}
let Z = y(a), b = Z(a);
return {
c() {
e = p("div"), b.c(), t = F(), s = p("div"), o = p("button"), n = V(r), f = F(), d = p("button"), h = V(l), o.disabled = u = /*$saved*/
a[14] || /*$requestResult*/
a[17] !== re.OK, g(o, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), g(d, "id", "bry-cc-retake-button"), g(d, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), g(s, "class", "ce-dui-btn-group flex"), g(e, "class", "flex flex-col justify-between");
},
m(C, O) {
j(C, e, O), b.m(e, null), I(e, t), I(e, s), I(s, o), I(o, n), I(s, f), I(s, d), I(d, h), c || (m = [
le(
o,
"click",
/*click_handler_2*/
a[38]
),
le(
d,
"click",
/*click_handler_3*/
a[39]
)
], c = !0);
},
p(C, O) {
Z === (Z = y(C)) && b ? b.p(C, O) : (b.d(1), b = Z(C), b && (b.c(), b.m(e, t))), O[0] & /*$_*/
262144 && r !== (r = /*$_*/
C[18]("faceCollector.finish") + "") && J(n, r), O[0] & /*$saved, $requestResult*/
147456 && u !== (u = /*$saved*/
C[14] || /*$requestResult*/
C[17] !== re.OK) && (o.disabled = u), O[0] & /*$_*/
262144 && l !== (l = /*$_*/
C[18]("faceCollector.retakePhoto") + "") && J(h, l);
},
d(C) {
C && E(e), b.d(), c = !1, lt(m);
}
};
}
function oa(a) {
let e;
return {
c() {
e = p("div"), g(e, "class", "");
},
m(t, s) {
j(t, e, s);
},
p: Y,
d(t) {
t && E(e);
}
};
}
function na(a) {
let e, t = (
/*$_*/
a[18]("docCollector.captured") + ""
), s;
return {
c() {
e = p("h1"), s = V(t), g(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
},
m(o, r) {
j(o, e, r), I(e, s);
},
p(o, r) {
r[0] & /*$_*/
262144 && t !== (t = /*$_*/
o[18]("docCollector.captured") + "") && J(s, t);
},
d(o) {
o && E(e);
}
};
}
function ra(a) {
let e, t = (
/*$_*/
a[18]("faceCollector.everythingOk") + ""
), s;
return {
c() {
e = p("h1"), s = V(t), g(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
},
m(o, r) {
j(o, e, r), I(e, s);
},
p(o, r) {
r[0] & /*$_*/
262144 && t !== (t = /*$_*/
o[18]("faceCollector.everythingOk") + "") && J(s, t);
},
d(o) {
o && E(e);
}
};
}
function la(a) {
let e, t = (
/*$_*/
a[18]("docCollector.docNotFound") + ""
), s;
return {
c() {
e = p("h1"), s = V(t), g(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
},
m(o, r) {
j(o, e, r), I(e, s);
},
p(o, r) {
r[0] & /*$_*/
262144 && t !== (t = /*$_*/
o[18]("docCollector.docNotFound") + "") && J(s, t);
},
d(o) {
o && E(e);
}
};
}
function ca(a) {
let e, t, s, o, r, n, u, f, d, l = (
/*$videoStore*/
a[12] && St(a)
), h = !/*$ready*/
a[11] && /*$cameraStatusStore*/
a[10] === W.OK && Pt(a), c = (
/*$captured*/
a[13] && Wt(a)
);
const m = [aa, ia], y = [];
function Z(b, C) {
return (
/*showUnconformities*/
b[0] && /*$captured*/
b[13] ? 0 : (
/*$cameraStatusStore*/
b[10] !== W.OK ? 1 : -1
)
);
}
return ~(n = Z(a)) && (u = y[n] = m[n](a)), {
c() {
e = p("div"), t = p("div"), l && l.c(), s = F(), h && h.c(), o = F(), c && c.c(), r = F(), u && u.c(), f = mi(), this.c = Y, g(t, "class", "relative mx-auto"), g(e, "class", "flex flex-col justify-between");
},
m(b, C) {
j(b, e, C), I(e, t), l && l.m(t, null), I(t, s), h && h.m(t, null), I(t, o), c && c.m(t, null), a[37](e), j(b, r, C), ~n && y[n].m(b, C), j(b, f, C), d = !0;
},
p(b, C) {
/*$videoStore*/
b[12] ? l ? (l.p(b, C), C[0] & /*$videoStore*/
4096 && L(l, 1)) : (l = St(b), l.c(), L(l, 1), l.m(t, s)) : l && (it(), U(l, 1, 1, () => {
l = null;
}), at()), !/*$ready*/
b[11] && /*$cameraStatusStore*/
b[10] === W.OK ? h ? h.p(b, C) : (h = Pt(b), h.c(), h.m(t, o)) : h && (h.d(1), h = null), /*$captured*/
b[13] ? c ? c.p(b, C) : (c = Wt(b), c.c(), c.m(t, null)) : c && (c.d(1), c = null);
let O = n;
n = Z(b), n === O ? ~n && y[n].p(b, C) : (u && (it(), U(y[O], 1, 1, () => {
y[O] = null;
}), at()), ~n ? (u = y[n], u ? u.p(b, C) : (u = y[n] = m[n](b), u.c()), L(u, 1), u.m(f.parentNode, f)) : u = null);
},
i(b) {
d || (L(l), L(u), d = !0);
},
o(b) {
U(l), U(u), d = !1;
},
d(b) {
b && E(e), l && l.d(), h && h.d(), c && c.d(), a[37](null), b && E(r), ~n && y[n].d(b), b && E(f);
}
};
}
let da = !1, ua = 0;
function ga(a, e, t) {
const s = e.videoWidth / e.videoHeight, o = t.width / t.height;
let r = 0, n = 0, u = e.videoWidth, f = e.videoHeight;
s > o ? (u = e.videoHeight * o, r = (e.videoWidth - u) / 2) : s < o && (f = e.videoWidth / o, n = (e.videoHeight - f) / 2), a.drawImage(e, r, n, u, f, 0, 0, t.width, t.height);
}
function fa(a, e, t) {
let s, o, r, n, u, f, d, l, h, c, m, y, Z, b, C, O, A, T, k, P, De, x, ue, K, ct, dt, ut;
M(a, Ge, (i) => t(54, s = i)), M(a, be, (i) => t(56, r = i)), M(a, G, (i) => t(10, n = i)), M(a, ve, (i) => t(11, u = i)), M(a, bi, (i) => t(57, f = i)), M(a, Ie, (i) => t(58, d = i)), M(a, vi, (i) => t(59, l = i)), M(a, de, (i) => t(60, h = i)), M(a, ne, (i) => t(12, c = i)), M(a, we, (i) => t(13, m = i)), M(a, Ye, (i) => t(61, y = i)), M(a, Qe, (i) => t(62, Z = i)), M(a, Nt, (i) => t(63, b = i)), M(a, q, (i) => t(64, C = i)), M(a, Ce, (i) => t(65, O = i)), M(a, Xe, (i) => t(14, A = i)), M(a, Ii, (i) => t(15, T = i)), M(a, zt, (i) => t(16, k = i)), M(a, ye, (i) => t(17, P = i)), M(a, wi, (i) => t(18, De = i)), M(a, Ve, (i) => t(66, x = i)), M(a, jt, (i) => t(67, K = i)), M(a, Je, (i) => t(68, ct = i)), M(a, Ci, (i) => t(20, dt = i)), M(a, yi, (i) => t(21, ut = i));
let _, R, Q, ce = !1, gt = !1, H = {
width: 2560,
height: 1440,
aspectRatio: -1
};
const Ht = { width: 2560, height: 1440 };
let { enableMinutiae: Te } = e, { videoDimensions: Ae } = e, { noTabs: Oe } = e, { weightsPath: Ne } = e, { showUnconformities: ft } = e, { showConfigButton: ht } = e, { showCameraButton: mt } = e, { videoOverlay: bt } = e, { videoOverlayTransparency: vt } = e;
const ge = Et(!1);
M(a, ge, (i) => t(55, o = i));
const ze = Et("data:image/png;base64");
M(a, ze, (i) => t(19, ue = i));
let It = !1, fe = !0, wt = 0, je = 0, ke = !0, Ct = 0, Re = (/* @__PURE__ */ new Date()).getTime(), Ee = !1;
Mi.mixin({
toast: !0,
position: "bottom-left",
timer: 13e3,
timerProgressBar: !0
}), pi(async () => {
if (v(ve, u = !1, u), yt(), K)
try {
await _i(Ne), gt = !0;
} catch {
v(jt, K = !1, K);
}
await Ze(), Bt();
});
function yt() {
v(we, m = !1, m), v(Nt, b = !0, b), v(Ce, O = "", O), v(Ie, d = xe.REAR_CAMERA, d), v(be, r = !1, r), v(Xe, A = !1, A), v(ye, P = re.OK, P), v(Ve, x = "", x);
const i = Di(Ke);
i.closedMouth = !1, i.isPersonCloseEnough = !1, i.isPersonTooclose = !0, i.isPersonInFrame = !1, Ke.set(i);
}
async function Ut() {
const [i, D] = (Ae ?? "")?.replaceAll(" ", "")?.split("x")?.map((w) => w ? parseInt(w) : void 0);
!i || !D || (X() ? (await Wi(), v(
ne,
c = {
videoWidth: window.innerWidth,
videoHeight: window.innerHeight
},
c
)) : v(ne, c = { videoWidth: i, videoHeight: D }, c));
}
function Mt() {
v(G, n = W.OK, n), It = !0, fe = !1;
}
async function he() {
if (K && !gt)
return pe(_, he);
if (_) {
if (ct !== $e.Document && !Oe)
return pe(_, he);
v(ve, u = !0, u), K && (o || v(ge, o = !0, o)), pe(_, he);
}
}
async function pt() {
let i = Gt();
if (K && !await Li(i)) {
console.warn("Document capture - document not detected! Resetting capture.");
return;
}
v(we, m = !0, m);
let D = [];
try {
const w = i.toDataURL("image/jpeg").split(",");
v(ze, ue = w[0], ue), v(zt, k = w[1], k), v(Ve, x = w[1], x), D = [
{
bodyPart: "DOCUMENT",
data: x
}
], v(ye, P = re.OK, P), window.dispatchEvent(new CustomEvent(
"document-unconformities-validated",
{
detail: { bodyParts: D, status: P }
}
));
} catch (w) {
console.error(w);
let N, z = Fi.DOCUMENT_NOT_FOUND, B = [];
w instanceof Error && ["DOCUMENT_NOT_FOUND"].includes(w.message) && (v(ye, P = re.TEMPLATE_EXTRACTION_ERROR, P), N = w.message, B = [
{
bodyPart: "DOCUMENT",
data: x,
format: "jpg"
}
]), window.dispatchEvent(new CustomEvent(
"document-unconformities-validated",
{
detail: {
bodyParts: B,
errorCode: N,
translatedError: De(z),
status: P
}
}
));
}
}
function Se() {
const i = {
bodyPart: "DOCUMENT",
data: k,
justification: T
};
v(Xe, A = !0, A), window.dispatchEvent(new CustomEvent("export-document", { detail: i }));
}
function me() {
window.dispatchEvent(new CustomEvent("document-scrapped")), yt(), fe && Mt();
}
async function Ze(i) {
if (!ke) {
v(G, n = W.CAMERA_ORIENTATION_PORTRAIT, n);
return;
}
await Ut();
try {
let { stream: D, deviceId: w, width: N, height: z, aspectRatio: B } = await kt(H.width, H.height, d, i);
if (v(Ye, y = D, y), H.aspectRatio = B || N / z, H.aspectRatio > 1 && N < H.width || H.aspectRatio < 1 && z < H.width) {
H.width = N, H.height = N / 1.7777, y.getTracks()?.forEach((We) => We?.stop());
const { stream: Pe } = await kt(H.width, H.height, d, i);
v(Ye, y = Pe, y);
}
v(de, h = w || l[0].deviceId, h);
} catch (D) {
const w = D;
fe = !0;
const N = Me(D) && D.constraint ? D.constraint : "";
console.error(w, N), Me(w) && "message" in w && w.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), v(G, n = W.CAMERA_DENIED_ERROR, n)), Me(w) && "message" in w && w.message.includes("Requested device not found") && v(G, n = W.DEVICE_NOT_FOUND_ERROR, n), (N.includes("width") || N.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${N})`), v(G, n = W.CAMERA_UNSUPPORTED, n));
}
}
async function ie() {
v(de, h = "", h), await Ze();
}
function Bt() {
navigator.mediaDevices.ondevicechange = async (i) => {
await Rt(), n !== W.OK ? await ie() : y.active || (qe(), v(G, n = W.DEVICE_NOT_FOUND_ERROR, n));
};
}
function _t() {
v(be, r = !1, r);
const i = (/* @__PURE__ */ new Date()).getTime();
i - Re > 5e3 ? (Re = i, v(Ce, O = "docCollector.docWasNotFound", O)) : Ee || (Ee = !0, setTimeout(
() => {
Ee = !1, O != "docCollector.docWasNotFound" && v(Ce, O = "", O);
},
1500
));
}
function Gt() {
const i = c.videoWidth, D = c.videoHeight, w = Ht.width, N = D / i * w, z = document.createElement("canvas"), B = z.getContext("2d");
z.width = w, z.height = N, B && ga(B, _, z);
const Pe = z.width / c.videoWidth, We = z.height / c.videoHeight, di = X() ? 0.25 : 0.15, ui = Math.round(z.height * di), Le = C.width * Pe, Fe = C.height * We, Tt = (X() ? 0.15 : 0.2) * Le, At = 0.2 * Fe, gi = (z.width - Le) / 2 - Tt / 2, fi = (z.height - ui - Fe) / 2 - At / 2, He = Le + Tt, Ue = Fe + At, ae = document.createElement("canvas");
ae.width = He, ae.height = Ue;
const Be = ae.getContext("2d");
return Be?.clearRect(0, 0, ae.width, ae.height), Be?.drawImage(z, gi, fi, He, Ue, 0, 0, He, Ue), Be?.save(), ae;
}
const Yt = ne.subscribe((i) => {
_ && R && (t(6, _.width = i.videoWidth, _), t(6, _.height = i.videoHeight, _), t(7, R.width = i.videoWidth, R), t(7, R.height = i.videoHeight, R));
}), Qt = Ke.subscribe((i) => {
let D = "";
if (i.isPersonCloseEnough ? i.isPersonTooclose ? D = "docCollector.moveAwayCamera" : i.isPersonInFrame || (D = "docCollector.stayInFrame") : D = "docCollector.comeCloserCamera", r && Ti(D), !m && b && r && !ce && i.isPersonInFrame && !(!i.isPersonCloseEnough || i.isPersonTooclose)) {
t(9, ce = !0), Ct = (/* @__PURE__ */ new Date()).getTime() + 4500;
const w = setInterval(
async () => {
if (!b || m || !i.isPersonCloseEnough || i.isPersonTooclose || !i.isPersonInFrame) {
t(9, ce = !1), setTimeout(
() => {
},
1500
), clearInterval(w);
return;
}
const N = (/* @__PURE__ */ new Date()).getTime();
Math.floor((Ct - N) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(w), t(9, ce = !1), pt());
},
100
);
}
}), Xt = we.subscribe((i) => {
Q && (i ? (Q.classList.remove("flex"), Q.classList.add("hidden")) : (Q.classList.add("flex"), Q.classList.remove("hidden")));
}), Vt = Qe.subscribe((i) => {
_ && i && (console.log("setting null in video srcObject"), t(6, _.srcObject = null, _), t(6, _.src = "", _), v(de, h = null, h));
});
Je.subscribe(async (i) => {
i === $e.Document && await Rt();
});
const Jt = de.subscribe(async (i) => {
if (!(!y || !i))
try {
const D = await Ai(H.width, H.height, i);
t(6, _.srcObject = y, _), v(Qe, Z = !1, Z), y.getTracks().forEach((w) => {
w.readyState === "live" && console.log(`Camera ${w.label} opened successfully!`);
}), v(G, n = W.OK, n), Oi(_);
} catch (D) {
const w = D;
fe = !0, Me(w) && "message" in w && w.message.includes("Requested device not found") && v(G, n = W.DEVICE_NOT_FOUND_ERROR, n);
}
}), xt = Je.subscribe(async (i) => {
i === $e.Document && !It && !m && da && await Mt();
}), Kt = ge.subscribe(async (i) => {
i && Dt();
}), qt = ve.subscribe((i) => {
i && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
}), $t = Ni.subscribe(async (i) => {
if (!(!c || l.length <= 1)) {
if (qe(), !X()) {
const w = (l.findIndex((z) => z.deviceId === h) + 1) % l.length, N = l[w].deviceId;
await Ze(N);
return;
}
i ? (v(Ie, d = xe.FRONT_CAMERA, d), await ie()) : (v(Ie, d = xe.REAR_CAMERA, d), await ie());
}
}), ei = zi.subscribe(async (i) => {
!i.isSupported || !X() || f != "DOCUMENT" || (ke = i.orientation.includes("portrait"), ke ? _ && !u ? await ie() : v(G, n = W.OK, n) : v(G, n = W.CAMERA_ORIENTATION_PORTRAIT, n));
});
async function Dt() {
let i;
try {
if (je >= ua) {
je = 0;
const D = await ji(), w = await import("./face_api_0e3ce8c8_3.0.0.js");
let N;
if (N = w.detectSingleFace(_, D), i = await N.withFaceLandmarks(), R.getContext("2d")?.clearRect(0, 0, R.width, R.height), i != null) {
const z = Yi(R, _, !0);
ki(R, _, z);
const B = Qi(i, z);
Ri(B) ? (Ei(B, R, Te, !0), v(be, r = !0, r), Re = (/* @__PURE__ */ new Date()).getTime()) : _t();
} else
_t();
} else
je++;
} catch (D) {
console.warn(`FaceapiLoop: ${D}`);
} finally {
o && pe(_, Dt);
}
}
Ge.subscribe(async (i) => {
i && (me(), v(Ge, s = !1, s));
}), Si(() => {
console.log("Destroying document collector"), qe(), Xt(), Qt(), Yt(), Vt(), Jt(), xt(), clearInterval(wt), Kt(), $t(), qt(), ei(), wt = 0;
});
function ti(i) {
et[i ? "unshift" : "push"](() => {
_ = i, t(6, _);
});
}
const ii = () => {
t(6, _.width = c.videoWidth, _), t(6, _.height = c.videoHeight, _), t(7, R.width = c.videoWidth, R), t(7, R.height = c.videoHeight, R);
};
function ai(i) {
et[i ? "unshift" : "push"](() => {
R = i, t(7, R);
});
}
const si = () => Se(), oi = () => me();
function ni(i) {
et[i ? "unshift" : "push"](() => {
Q = i, t(8, Q);
});
}
const ri = () => Se(), li = () => me(), ci = async () => {
await ie();
};
return a.$$set = (i) => {
"enableMinutiae" in i && t(28, Te = i.enableMinutiae), "videoDimensions" in i && t(29, Ae = i.videoDimensions), "noTabs" in i && t(30, Oe = i.noTabs), "weightsPath" in i && t(31, Ne = i.weightsPath), "showUnconformities" in i && t(0, ft = i.showUnconformities), "showConfigButton" in i && t(1, ht = i.showConfigButton), "showCameraButton" in i && t(2, mt = i.showCameraButton), "videoOverlay" in i && t(3, bt = i.videoOverlay), "videoOverlayTransparency" in i && t(4, vt = i.videoOverlayTransparency);
}, [
ft,
ht,
mt,
bt,
vt,
he,
_,
R,
Q,
ce,
n,
u,
c,
m,
A,
T,
k,
P,
De,
ue,
dt,
ut,
ge,
ze,
pt,
Se,
me,
ie,
Te,
Ae,
Oe,
Ne,
ti,
ii,
ai,
si,
oi,
ni,
ri,
li,
ci
];
}
class ha extends st {
constructor(e) {
super(), ot(
this,
{
target: this.shadowRoot,
props: rt(this.attributes),
customElement: !0
},
fa,
ca,
nt,
{
enableMinutiae: 28,
videoDimensions: 29,
noTabs: 30,
weightsPath: 31,
showUnconformities: 0,
showConfigButton: 1,
showCameraButton: 2,
videoOverlay: 3,
videoOverlayTransparency: 4,
play: 5
},
null,
[-1, -1, -1]
), e && (e.target && j(e.target, this, e.anchor), e.props && (this.$set(e.props), S()));
}
static get observedAttributes() {
return [
"enableMinutiae",
"videoDimensions",
"noTabs",
"weightsPath",
"showUnconformities",
"showConfigButton",
"showCameraButton",
"videoOverlay",
"videoOverlayTransparency",
"play"
];
}
get enableMinutiae() {
return this.$$.ctx[28];
}
set enableMinutiae(e) {
this.$$set({ enableMinutiae: e }), S();
}
get videoDimensions() {
return this.$$.ctx[29];
}
set videoDimensions(e) {
this.$$set({ videoDimensions: e }), S();
}
get noTabs() {
return this.$$.ctx[30];
}
set noTabs(e) {
this.$$set({ noTabs: e }), S();
}
get weightsPath() {
return this.$$.ctx[31];
}
set weightsPath(e) {
this.$$set({ weightsPath: e }), S();
}
get showUnconformities() {
return this.$$.ctx[0];
}
set showUnconformities(e) {
this.$$set({ showUnconformities: e }), S();
}
get showConfigButton() {
return this.$$.ctx[1];
}
set showConfigButton(e) {
this.$$set({ showConfigButton: e }), S();
}
get showCameraButton() {
return this.$$.ctx[2];
}
set showCameraButton(e) {
this.$$set({ showCameraButton: e }), S();
}
get videoOverlay() {
return this.$$.ctx[3];
}
set videoOverlay(e) {
this.$$set({ videoOverlay: e }), S();
}
get videoOverlayTransparency() {
return this.$$.ctx[4];
}
set videoOverlayTransparency(e) {
this.$$set({ videoOverlayTransparency: e }), S();
}
get play() {
return this.$$.ctx[5];
}
}
customElements.define("document-collector", ha);
export {
ha as default
};