UNPKG

bry-biometric-collector

Version:

BRy web-collector component for biometric capture.

700 lines (699 loc) 14.3 kB
import { bu as D, bv as V } from "./main_f7bde95f_3.2.1.js"; function H(e, t) { for (var n = 0; n < t.length; n++) { const r = t[n]; if (typeof r != "string" && !Array.isArray(r)) { for (const s in r) if (s !== "default" && !(s in e)) { const h = Object.getOwnPropertyDescriptor(r, s); h && Object.defineProperty(e, s, h.get ? h : { enumerable: !0, get: () => r[s] }); } } } return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" })); } var W = f, v = null; try { v = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([ 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11 ])), {}).exports; } catch { } function f(e, t, n) { this.low = e | 0, this.high = t | 0, this.unsigned = !!n; } f.prototype.__isLong__; Object.defineProperty(f.prototype, "__isLong__", { value: !0 }); function w(e) { return (e && e.__isLong__) === !0; } f.isLong = w; var I = {}, B = {}; function q(e, t) { var n, r, s; return t ? (e >>>= 0, (s = 0 <= e && e < 256) && (r = B[e], r) ? r : (n = o(e, (e | 0) < 0 ? -1 : 0, !0), s && (B[e] = n), n)) : (e |= 0, (s = -128 <= e && e < 128) && (r = I[e], r) ? r : (n = o(e, e < 0 ? -1 : 0, !1), s && (I[e] = n), n)); } f.fromInt = q; function O(e, t) { if (isNaN(e)) return t ? m : L; if (t) { if (e < 0) return m; if (e >= Z) return j; } else { if (e <= -P) return c; if (e + 1 >= P) return R; } return e < 0 ? O(-e, t).neg() : o(e % d | 0, e / d | 0, t); } f.fromNumber = O; function o(e, t, n) { return new f(e, t, n); } f.fromBits = o; var T = Math.pow; function A(e, t, n) { if (e.length === 0) throw Error("empty string"); if (e === "NaN" || e === "Infinity" || e === "+Infinity" || e === "-Infinity") return L; if (typeof t == "number" ? (n = t, t = !1) : t = !!t, n = n || 10, n < 2 || 36 < n) throw RangeError("radix"); var r; if ((r = e.indexOf("-")) > 0) throw Error("interior hyphen"); if (r === 0) return A(e.substring(1), t, n).neg(); for (var s = O(T(n, 8)), h = L, u = 0; u < e.length; u += 8) { var F = Math.min(8, e.length - u), E = parseInt(e.substring(u, u + F), n); if (F < 8) { var l = O(T(n, F)); h = h.mul(l).add(O(E)); } else h = h.mul(s), h = h.add(O(E)); } return h.unsigned = t, h; } f.fromString = A; function b(e, t) { return typeof e == "number" ? O(e, t) : typeof e == "string" ? A(e, t) : o(e.low, e.high, typeof t == "boolean" ? t : e.unsigned); } f.fromValue = b; var M = 65536, C = 1 << 24, d = M * M, Z = d * d, P = Z / 2, S = q(C), L = q(0); f.ZERO = L; var m = q(0, !0); f.UZERO = m; var y = q(1); f.ONE = y; var p = q(1, !0); f.UONE = p; var U = q(-1); f.NEG_ONE = U; var R = o(-1, 2147483647, !1); f.MAX_VALUE = R; var j = o(-1, -1, !0); f.MAX_UNSIGNED_VALUE = j; var c = o(0, -2147483648, !1); f.MIN_VALUE = c; var i = f.prototype; i.toInt = function() { return this.unsigned ? this.low >>> 0 : this.low; }; i.toNumber = function() { return this.unsigned ? (this.high >>> 0) * d + (this.low >>> 0) : this.high * d + (this.low >>> 0); }; i.toString = function(t) { if (t = t || 10, t < 2 || 36 < t) throw RangeError("radix"); if (this.isZero()) return "0"; if (this.isNegative()) if (this.eq(c)) { var n = O(t), r = this.div(n), s = r.mul(n).sub(this); return r.toString(t) + s.toInt().toString(t); } else return "-" + this.neg().toString(t); for (var h = O(T(t, 6), this.unsigned), u = this, F = ""; ; ) { var E = u.div(h), l = u.sub(E.mul(h)).toInt() >>> 0, g = l.toString(t); if (u = E, u.isZero()) return g + F; for (; g.length < 6; ) g = "0" + g; F = "" + g + F; } }; i.getHighBits = function() { return this.high; }; i.getHighBitsUnsigned = function() { return this.high >>> 0; }; i.getLowBits = function() { return this.low; }; i.getLowBitsUnsigned = function() { return this.low >>> 0; }; i.getNumBitsAbs = function() { if (this.isNegative()) return this.eq(c) ? 64 : this.neg().getNumBitsAbs(); for (var t = this.high != 0 ? this.high : this.low, n = 31; n > 0 && !(t & 1 << n); n--) ; return this.high != 0 ? n + 33 : n + 1; }; i.isZero = function() { return this.high === 0 && this.low === 0; }; i.eqz = i.isZero; i.isNegative = function() { return !this.unsigned && this.high < 0; }; i.isPositive = function() { return this.unsigned || this.high >= 0; }; i.isOdd = function() { return (this.low & 1) === 1; }; i.isEven = function() { return (this.low & 1) === 0; }; i.equals = function(t) { return w(t) || (t = b(t)), this.unsigned !== t.unsigned && this.high >>> 31 === 1 && t.high >>> 31 === 1 ? !1 : this.high === t.high && this.low === t.low; }; i.eq = i.equals; i.notEquals = function(t) { return !this.eq( /* validates */ t ); }; i.neq = i.notEquals; i.ne = i.notEquals; i.lessThan = function(t) { return this.comp( /* validates */ t ) < 0; }; i.lt = i.lessThan; i.lessThanOrEqual = function(t) { return this.comp( /* validates */ t ) <= 0; }; i.lte = i.lessThanOrEqual; i.le = i.lessThanOrEqual; i.greaterThan = function(t) { return this.comp( /* validates */ t ) > 0; }; i.gt = i.greaterThan; i.greaterThanOrEqual = function(t) { return this.comp( /* validates */ t ) >= 0; }; i.gte = i.greaterThanOrEqual; i.ge = i.greaterThanOrEqual; i.compare = function(t) { if (w(t) || (t = b(t)), this.eq(t)) return 0; var n = this.isNegative(), r = t.isNegative(); return n && !r ? -1 : !n && r ? 1 : this.unsigned ? t.high >>> 0 > this.high >>> 0 || t.high === this.high && t.low >>> 0 > this.low >>> 0 ? -1 : 1 : this.sub(t).isNegative() ? -1 : 1; }; i.comp = i.compare; i.negate = function() { return !this.unsigned && this.eq(c) ? c : this.not().add(y); }; i.neg = i.negate; i.add = function(t) { w(t) || (t = b(t)); var n = this.high >>> 16, r = this.high & 65535, s = this.low >>> 16, h = this.low & 65535, u = t.high >>> 16, F = t.high & 65535, E = t.low >>> 16, l = t.low & 65535, g = 0, N = 0, a = 0, _ = 0; return _ += h + l, a += _ >>> 16, _ &= 65535, a += s + E, N += a >>> 16, a &= 65535, N += r + F, g += N >>> 16, N &= 65535, g += n + u, g &= 65535, o(a << 16 | _, g << 16 | N, this.unsigned); }; i.subtract = function(t) { return w(t) || (t = b(t)), this.add(t.neg()); }; i.sub = i.subtract; i.multiply = function(t) { if (this.isZero()) return L; if (w(t) || (t = b(t)), v) { var n = v.mul( this.low, this.high, t.low, t.high ); return o(n, v.get_high(), this.unsigned); } if (t.isZero()) return L; if (this.eq(c)) return t.isOdd() ? c : L; if (t.eq(c)) return this.isOdd() ? c : L; if (this.isNegative()) return t.isNegative() ? this.neg().mul(t.neg()) : this.neg().mul(t).neg(); if (t.isNegative()) return this.mul(t.neg()).neg(); if (this.lt(S) && t.lt(S)) return O(this.toNumber() * t.toNumber(), this.unsigned); var r = this.high >>> 16, s = this.high & 65535, h = this.low >>> 16, u = this.low & 65535, F = t.high >>> 16, E = t.high & 65535, l = t.low >>> 16, g = t.low & 65535, N = 0, a = 0, _ = 0, x = 0; return x += u * g, _ += x >>> 16, x &= 65535, _ += h * g, a += _ >>> 16, _ &= 65535, _ += u * l, a += _ >>> 16, _ &= 65535, a += s * g, N += a >>> 16, a &= 65535, a += h * l, N += a >>> 16, a &= 65535, a += u * E, N += a >>> 16, a &= 65535, N += r * g + s * l + h * E + u * F, N &= 65535, o(_ << 16 | x, N << 16 | a, this.unsigned); }; i.mul = i.multiply; i.divide = function(t) { if (w(t) || (t = b(t)), t.isZero()) throw Error("division by zero"); if (v) { if (!this.unsigned && this.high === -2147483648 && t.low === -1 && t.high === -1) return this; var n = (this.unsigned ? v.div_u : v.div_s)( this.low, this.high, t.low, t.high ); return o(n, v.get_high(), this.unsigned); } if (this.isZero()) return this.unsigned ? m : L; var r, s, h; if (this.unsigned) { if (t.unsigned || (t = t.toUnsigned()), t.gt(this)) return m; if (t.gt(this.shru(1))) return p; h = m; } else { if (this.eq(c)) { if (t.eq(y) || t.eq(U)) return c; if (t.eq(c)) return y; var u = this.shr(1); return r = u.div(t).shl(1), r.eq(L) ? t.isNegative() ? y : U : (s = this.sub(t.mul(r)), h = r.add(s.div(t)), h); } else if (t.eq(c)) return this.unsigned ? m : L; if (this.isNegative()) return t.isNegative() ? this.neg().div(t.neg()) : this.neg().div(t).neg(); if (t.isNegative()) return this.div(t.neg()).neg(); h = L; } for (s = this; s.gte(t); ) { r = Math.max(1, Math.floor(s.toNumber() / t.toNumber())); for (var F = Math.ceil(Math.log(r) / Math.LN2), E = F <= 48 ? 1 : T(2, F - 48), l = O(r), g = l.mul(t); g.isNegative() || g.gt(s); ) r -= E, l = O(r, this.unsigned), g = l.mul(t); l.isZero() && (l = y), h = h.add(l), s = s.sub(g); } return h; }; i.div = i.divide; i.modulo = function(t) { if (w(t) || (t = b(t)), v) { var n = (this.unsigned ? v.rem_u : v.rem_s)( this.low, this.high, t.low, t.high ); return o(n, v.get_high(), this.unsigned); } return this.sub(this.div(t).mul(t)); }; i.mod = i.modulo; i.rem = i.modulo; i.not = function() { return o(~this.low, ~this.high, this.unsigned); }; i.and = function(t) { return w(t) || (t = b(t)), o(this.low & t.low, this.high & t.high, this.unsigned); }; i.or = function(t) { return w(t) || (t = b(t)), o(this.low | t.low, this.high | t.high, this.unsigned); }; i.xor = function(t) { return w(t) || (t = b(t)), o(this.low ^ t.low, this.high ^ t.high, this.unsigned); }; i.shiftLeft = function(t) { return w(t) && (t = t.toInt()), (t &= 63) === 0 ? this : t < 32 ? o(this.low << t, this.high << t | this.low >>> 32 - t, this.unsigned) : o(0, this.low << t - 32, this.unsigned); }; i.shl = i.shiftLeft; i.shiftRight = function(t) { return w(t) && (t = t.toInt()), (t &= 63) === 0 ? this : t < 32 ? o(this.low >>> t | this.high << 32 - t, this.high >> t, this.unsigned) : o(this.high >> t - 32, this.high >= 0 ? 0 : -1, this.unsigned); }; i.shr = i.shiftRight; i.shiftRightUnsigned = function(t) { if (w(t) && (t = t.toInt()), t &= 63, t === 0) return this; var n = this.high; if (t < 32) { var r = this.low; return o(r >>> t | n << 32 - t, n >>> t, this.unsigned); } else return t === 32 ? o(n, 0, this.unsigned) : o(n >>> t - 32, 0, this.unsigned); }; i.shru = i.shiftRightUnsigned; i.shr_u = i.shiftRightUnsigned; i.toSigned = function() { return this.unsigned ? o(this.low, this.high, !1) : this; }; i.toUnsigned = function() { return this.unsigned ? this : o(this.low, this.high, !0); }; i.toBytes = function(t) { return t ? this.toBytesLE() : this.toBytesBE(); }; i.toBytesLE = function() { var t = this.high, n = this.low; return [ n & 255, n >>> 8 & 255, n >>> 16 & 255, n >>> 24, t & 255, t >>> 8 & 255, t >>> 16 & 255, t >>> 24 ]; }; i.toBytesBE = function() { var t = this.high, n = this.low; return [ t >>> 24, t >>> 16 & 255, t >>> 8 & 255, t & 255, n >>> 24, n >>> 16 & 255, n >>> 8 & 255, n & 255 ]; }; f.fromBytes = function(t, n, r) { return r ? f.fromBytesLE(t, n) : f.fromBytesBE(t, n); }; f.fromBytesLE = function(t, n) { return new f( t[0] | t[1] << 8 | t[2] << 16 | t[3] << 24, t[4] | t[5] << 8 | t[6] << 16 | t[7] << 24, n ); }; f.fromBytesBE = function(t, n) { return new f( t[4] << 24 | t[5] << 16 | t[6] << 8 | t[7], t[0] << 24 | t[1] << 16 | t[2] << 8 | t[3], n ); }; const G = /* @__PURE__ */ D(W), z = /* @__PURE__ */ H({ __proto__: null, default: G }, [W]), X = {}, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: X }, Symbol.toStringTag, { value: "Module" })), J = /* @__PURE__ */ V($); export { z as L, G as l, J as r };