youverify-liveness-web 1.0.4 → 1.0.6

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/dist/index.js CHANGED
@@ -124,7 +124,7 @@ function Wn(e) {
124
124
  };
125
125
  }
126
126
  function _n(e, t, n, r, o, i, s, a, l, u) {
127
- var d, c, f, p, _, y, m, v, g, $, T, S, M, A, W, F, b = t.type;
127
+ var d, c, f, p, _, y, m, v, g, $, T, S, M, A, W, C, b = t.type;
128
128
  if (t.constructor !== void 0) return null;
129
129
  128 & n.__u && (l = !!(32 & n.__u), i = [a = t.__e = n.__e]), (d = O.__b) && d(t);
130
130
  e: if (typeof b == "function") try {
@@ -147,7 +147,7 @@ function _n(e, t, n, r, o, i, s, a, l, u) {
147
147
  } else do
148
148
  c.__d = !1, M && M(t), d = c.render(c.props, c.state, c.context), c.state = c.__s;
149
149
  while (c.__d && ++A < 25);
150
- c.state = c.__s, c.getChildContext != null && (r = me(me({}, r), c.getChildContext())), g && !f && c.getSnapshotBeforeUpdate != null && (y = c.getSnapshotBeforeUpdate(p, _)), Rr(e, Tt(F = d != null && d.type === q && d.key == null ? d.props.children : d) ? F : [F], t, n, r, o, i, s, a, l, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), m && (c.__E = c.__ = null);
150
+ c.state = c.__s, c.getChildContext != null && (r = me(me({}, r), c.getChildContext())), g && !f && c.getSnapshotBeforeUpdate != null && (y = c.getSnapshotBeforeUpdate(p, _)), Rr(e, Tt(C = d != null && d.type === q && d.key == null ? d.props.children : d) ? C : [C], t, n, r, o, i, s, a, l, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), m && (c.__E = c.__ = null);
151
151
  } catch (R) {
152
152
  if (t.__v = null, l || i != null) {
153
153
  for (t.__u |= l ? 160 : 32; a && a.nodeType === 8 && a.nextSibling; ) a = a.nextSibling;
@@ -684,7 +684,7 @@ O.diffed = function(e) {
684
684
  };
685
685
  var Zr = { ReactCurrentDispatcher: { current: { readContext: function(e) {
686
686
  return $n.__n[e.__c].props.value;
687
- }, useCallback: U, useContext: te, useDebugValue: wn, useDeferredValue: Sn, useEffect: H, useId: ke, useImperativeHandle: gn, useInsertionEffect: Fn, useLayoutEffect: De, useMemo: z, useReducer: it, useRef: w, useState: x, useSyncExternalStore: St, useTransition: Cn } } }, yi = "17.0.2";
687
+ }, useCallback: U, useContext: te, useDebugValue: wn, useDeferredValue: Sn, useEffect: H, useId: ke, useImperativeHandle: gn, useInsertionEffect: Cn, useLayoutEffect: De, useMemo: z, useReducer: it, useRef: w, useState: x, useSyncExternalStore: St, useTransition: Fn } } }, yi = "17.0.2";
688
688
  function Jr(e) {
689
689
  return de.bind(null, e);
690
690
  }
@@ -717,10 +717,10 @@ function kn(e) {
717
717
  function Sn(e) {
718
718
  return e;
719
719
  }
720
- function Cn() {
720
+ function Fn() {
721
721
  return [!1, kn];
722
722
  }
723
- var Fn = De, so = je;
723
+ var Cn = De, so = je;
724
724
  function St(e, t) {
725
725
  var n = t(), r = x({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
726
726
  return De(function() {
@@ -740,7 +740,7 @@ function Wt(e) {
740
740
  return !0;
741
741
  }
742
742
  }
743
- var L = { useState: x, useId: ke, useReducer: it, useEffect: H, useLayoutEffect: De, useInsertionEffect: Fn, useTransition: Cn, useDeferredValue: Sn, useSyncExternalStore: St, startTransition: kn, useRef: w, useImperativeHandle: gn, useMemo: z, useCallback: U, useContext: te, useDebugValue: wn, version: "17.0.2", Children: Vr, render: Kr, hydrate: Xr, unmountComponentAtNode: to, createPortal: kt, createElement: de, createContext: ie, createFactory: Jr, cloneElement: Tn, createRef: mn, Fragment: q, isValidElement: je, isElement: so, isFragment: Qr, isMemo: eo, findDOMNode: no, Component: ue, PureComponent: yt, memo: zr, forwardRef: En, flushSync: oo, unstable_batchedUpdates: ro, StrictMode: io, Suspense: Qe, SuspenseList: We, lazy: Yr, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Zr };
743
+ var L = { useState: x, useId: ke, useReducer: it, useEffect: H, useLayoutEffect: De, useInsertionEffect: Cn, useTransition: Fn, useDeferredValue: Sn, useSyncExternalStore: St, startTransition: kn, useRef: w, useImperativeHandle: gn, useMemo: z, useCallback: U, useContext: te, useDebugValue: wn, version: "17.0.2", Children: Vr, render: Kr, hydrate: Xr, unmountComponentAtNode: to, createPortal: kt, createElement: de, createContext: ie, createFactory: Jr, cloneElement: Tn, createRef: mn, Fragment: q, isValidElement: je, isElement: so, isFragment: Qr, isMemo: eo, findDOMNode: no, Component: ue, PureComponent: yt, memo: zr, forwardRef: En, flushSync: oo, unstable_batchedUpdates: ro, StrictMode: io, Suspense: Qe, SuspenseList: We, lazy: Yr, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Zr };
744
744
  const rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
745
745
  __proto__: null,
746
746
  Children: Vr,
@@ -780,14 +780,14 @@ const rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
780
780
  useErrorBoundary: ni,
781
781
  useId: ke,
782
782
  useImperativeHandle: gn,
783
- useInsertionEffect: Fn,
783
+ useInsertionEffect: Cn,
784
784
  useLayoutEffect: De,
785
785
  useMemo: z,
786
786
  useReducer: it,
787
787
  useRef: w,
788
788
  useState: x,
789
789
  useSyncExternalStore: St,
790
- useTransition: Cn,
790
+ useTransition: Fn,
791
791
  version: yi
792
792
  }, Symbol.toStringTag, { value: "Module" })), ao = typeof document < "u" ? L.useLayoutEffect : () => {
793
793
  };
@@ -911,18 +911,18 @@ function Si(e) {
911
911
  };
912
912
  }
913
913
  let at = null, rn = /* @__PURE__ */ new Set(), et = /* @__PURE__ */ new Map(), Re = !1, on = !1;
914
- const Ci = {
914
+ const Fi = {
915
915
  Tab: !0,
916
916
  Escape: !0
917
917
  };
918
918
  function xn(e, t) {
919
919
  for (let n of rn) n(e, t);
920
920
  }
921
- function Fi(e) {
921
+ function Ci(e) {
922
922
  return !(e.metaKey || !Ei() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
923
923
  }
924
924
  function gt(e) {
925
- Re = !0, Fi(e) && (at = "keyboard", xn("keyboard", e));
925
+ Re = !0, Ci(e) && (at = "keyboard", xn("keyboard", e));
926
926
  }
927
927
  function le(e) {
928
928
  at = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (Re = !0, xn("pointer", e));
@@ -979,7 +979,7 @@ const Mi = /* @__PURE__ */ new Set([
979
979
  function Pi(e, t, n) {
980
980
  var r;
981
981
  const o = typeof window < "u" ? Pe(n == null ? void 0 : n.target).HTMLInputElement : HTMLInputElement, i = typeof window < "u" ? Pe(n == null ? void 0 : n.target).HTMLTextAreaElement : HTMLTextAreaElement, s = typeof window < "u" ? Pe(n == null ? void 0 : n.target).HTMLElement : HTMLElement, a = typeof window < "u" ? Pe(n == null ? void 0 : n.target).KeyboardEvent : KeyboardEvent;
982
- return e = e || (n == null ? void 0 : n.target) instanceof o && !Mi.has(n == null || (r = n.target) === null || r === void 0 ? void 0 : r.type) || (n == null ? void 0 : n.target) instanceof i || (n == null ? void 0 : n.target) instanceof s && (n == null ? void 0 : n.target.isContentEditable), !(e && t === "keyboard" && n instanceof a && !Ci[n.key]);
982
+ return e = e || (n == null ? void 0 : n.target) instanceof o && !Mi.has(n == null || (r = n.target) === null || r === void 0 ? void 0 : r.type) || (n == null ? void 0 : n.target) instanceof i || (n == null ? void 0 : n.target) instanceof s && (n == null ? void 0 : n.target.isContentEditable), !(e && t === "keyboard" && n instanceof a && !Fi[n.key]);
983
983
  }
984
984
  function Ni(e, t, n) {
985
985
  sn(), H(() => {
@@ -1152,10 +1152,10 @@ let Hi = class {
1152
1152
  return this.handoffState === "complete";
1153
1153
  }
1154
1154
  }, Le = new Hi();
1155
- function Ct(e) {
1155
+ function Ft(e) {
1156
1156
  return Le.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
1157
1157
  }
1158
- function Ft(e) {
1158
+ function Ct(e) {
1159
1159
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
1160
1160
  throw t;
1161
1161
  }));
@@ -1173,7 +1173,7 @@ function Se() {
1173
1173
  return t.add(() => clearTimeout(r));
1174
1174
  }, microTask(...n) {
1175
1175
  let r = { current: !0 };
1176
- return Ft(() => {
1176
+ return Ct(() => {
1177
1177
  r.current && n[0]();
1178
1178
  }), t.add(() => {
1179
1179
  r.current = !1;
@@ -1227,7 +1227,7 @@ function zi({ disabled: e = !1 } = {}) {
1227
1227
  if (o.dispose(), t.current === null) {
1228
1228
  t.current = a.currentTarget, r(!0);
1229
1229
  {
1230
- let l = Ct(a.currentTarget);
1230
+ let l = Ft(a.currentTarget);
1231
1231
  o.addEventListener(l, "pointerup", i, !1), o.addEventListener(l, "pointermove", (u) => {
1232
1232
  if (t.current) {
1233
1233
  let d = Wi(u);
@@ -1286,13 +1286,13 @@ function pt(e, t = {}, n, r, o) {
1286
1286
  for (let _ of p) c[`data-${_}`] = "";
1287
1287
  }
1288
1288
  }
1289
- if (i === q && (Object.keys(Fe(l)).length > 0 || Object.keys(Fe(c)).length > 0)) if (!je(d) || Array.isArray(d) && d.length > 1) {
1290
- if (Object.keys(Fe(l)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(Fe(l)).concat(Object.keys(Fe(c))).map((f) => ` - ${f}`).join(`
1289
+ if (i === q && (Object.keys(Ce(l)).length > 0 || Object.keys(Ce(c)).length > 0)) if (!je(d) || Array.isArray(d) && d.length > 1) {
1290
+ if (Object.keys(Ce(l)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(Ce(l)).concat(Object.keys(Ce(c))).map((f) => ` - ${f}`).join(`
1291
1291
  `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((f) => ` - ${f}`).join(`
1292
1292
  `)].join(`
1293
1293
  `));
1294
1294
  } else {
1295
- let f = d.props, p = f == null ? void 0 : f.className, _ = typeof p == "function" ? (...v) => ln(p(...v), l.className) : ln(p, l.className), y = _ ? { className: _ } : {}, m = mo(d.props, Fe(Vt(l, ["ref"])));
1295
+ let f = d.props, p = f == null ? void 0 : f.className, _ = typeof p == "function" ? (...v) => ln(p(...v), l.className) : ln(p, l.className), y = _ ? { className: _ } : {}, m = mo(d.props, Ce(Vt(l, ["ref"])));
1296
1296
  for (let v in c) v in m && delete c[v];
1297
1297
  return Tn(d, Object.assign({}, m, c, u, { ref: o(d.ref, u.ref) }, y));
1298
1298
  }
@@ -1336,7 +1336,7 @@ function oe(e) {
1336
1336
  var t;
1337
1337
  return Object.assign(En(e), { displayName: (t = e.displayName) != null ? t : e.name });
1338
1338
  }
1339
- function Fe(e) {
1339
+ function Ce(e) {
1340
1340
  let t = Object.assign({}, e);
1341
1341
  for (let n in t) t[n] === void 0 && delete t[n];
1342
1342
  return t;
@@ -1476,7 +1476,7 @@ function cs(e, { allowed: t, disallowed: n } = {}) {
1476
1476
  let a = (i = t == null ? void 0 : t()) != null ? i : [];
1477
1477
  for (let l of a) {
1478
1478
  if (!l) continue;
1479
- let u = Ct(l);
1479
+ let u = Ft(l);
1480
1480
  if (!u) continue;
1481
1481
  let d = l.parentElement;
1482
1482
  for (; d && d !== u.body; ) {
@@ -1519,7 +1519,7 @@ function ps(e = document.body) {
1519
1519
  var $o = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))($o || {});
1520
1520
  function hs(e, t = 0) {
1521
1521
  var n;
1522
- return e === ((n = Ct(e)) == null ? void 0 : n.body) ? !1 : Te(t, { 0() {
1522
+ return e === ((n = Ft(e)) == null ? void 0 : n.body) ? !1 : Te(t, { 0() {
1523
1523
  return e.matches(dn);
1524
1524
  }, 1() {
1525
1525
  let r = e;
@@ -1641,7 +1641,7 @@ function bs(e, t, n) {
1641
1641
  }, !0), ko(r, "blur", (l) => i(l, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
1642
1642
  }
1643
1643
  function lt(...e) {
1644
- return z(() => Ct(...e), [...e]);
1644
+ return z(() => Ft(...e), [...e]);
1645
1645
  }
1646
1646
  function So(e, t, n, r) {
1647
1647
  let o = Oe(n);
@@ -1746,14 +1746,14 @@ function Ss(e, t, n = () => ({ containers: [] })) {
1746
1746
  if (!(!t || !e)) return Ne.dispatch("PUSH", t, n), () => Ne.dispatch("POP", t, n);
1747
1747
  }, [e, t]), i;
1748
1748
  }
1749
- function Cs(e, t, n = () => [document.body]) {
1749
+ function Fs(e, t, n = () => [document.body]) {
1750
1750
  let r = Be(e, "scroll-lock");
1751
1751
  Ss(r, t, (o) => {
1752
1752
  var i;
1753
1753
  return { containers: [...(i = o.containers) != null ? i : [], n] };
1754
1754
  });
1755
1755
  }
1756
- function Fs(e) {
1756
+ function Cs(e) {
1757
1757
  let t = { called: !1 };
1758
1758
  return (...n) => {
1759
1759
  if (!t.called) return t.called = !0, e(...n);
@@ -1793,7 +1793,7 @@ function Ls(e, { prepare: t, run: n, done: r, inFlight: o }) {
1793
1793
  }), i.dispose;
1794
1794
  }
1795
1795
  function As(e, t) {
1796
- let n = Fs(t), r = Se();
1796
+ let n = Cs(t), r = Se();
1797
1797
  if (!e) return r.dispose;
1798
1798
  let { transitionDuration: o, transitionDelay: i } = getComputedStyle(e), [s, a] = [o, i].map((u) => {
1799
1799
  let [d = 0] = u.split(",").filter(Boolean).map((c) => c.includes("ms") ? parseFloat(c) : parseFloat(c) * 1e3).sort((c, f) => f - c);
@@ -1859,10 +1859,10 @@ Os(() => {
1859
1859
  }
1860
1860
  window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
1861
1861
  });
1862
- function Co(e) {
1862
+ function Fo(e) {
1863
1863
  let t = G(e), n = w(!1);
1864
1864
  H(() => (n.current = !1, () => {
1865
- n.current = !0, Ft(() => {
1865
+ n.current = !0, Ct(() => {
1866
1866
  n.current && t();
1867
1867
  });
1868
1868
  }), [t]);
@@ -1878,12 +1878,12 @@ function ct() {
1878
1878
  t !== !0 && n(!0);
1879
1879
  }, [t]), H(() => Le.handoff(), []), e ? !1 : t;
1880
1880
  }
1881
- let Fo = ie(!1);
1881
+ let Co = ie(!1);
1882
1882
  function Ws() {
1883
- return te(Fo);
1883
+ return te(Co);
1884
1884
  }
1885
1885
  function lr(e) {
1886
- return L.createElement(Fo.Provider, { value: e.force }, e.children);
1886
+ return L.createElement(Co.Provider, { value: e.force }, e.children);
1887
1887
  }
1888
1888
  function Us(e) {
1889
1889
  let t = Ws(), n = te(Mo), r = lt(e), [o, i] = x(() => {
@@ -1913,7 +1913,7 @@ let xo = q, zs = oe(function(e, t) {
1913
1913
  !s || !a || s.contains(a) || (a.setAttribute("data-headlessui-portal", ""), s.appendChild(a));
1914
1914
  }, [s, a]), re(() => {
1915
1915
  if (a && l) return l.register(a);
1916
- }, [l, a]), Co(() => {
1916
+ }, [l, a]), Fo(() => {
1917
1917
  var d;
1918
1918
  !s || !a || (a instanceof Node && s.contains(a) && s.removeChild(a), s.childNodes.length <= 0 && ((d = s.parentElement) == null || d.removeChild(s)));
1919
1919
  }), u ? !s || !a ? null : kt(ae({ ourProps: { ref: o }, theirProps: n, slot: {}, defaultTag: xo, name: "Portal" }), a) : null;
@@ -2024,7 +2024,7 @@ let ta = oe(ea), na = Object.assign(ta, { features: Me });
2024
2024
  function ra(e = !0) {
2025
2025
  let t = w(be.slice());
2026
2026
  return Pn(([n], [r]) => {
2027
- r === !0 && n === !1 && Ft(() => {
2027
+ r === !0 && n === !1 && Ct(() => {
2028
2028
  t.current.splice(0);
2029
2029
  }), r === !1 && n === !0 && (t.current = be.slice());
2030
2030
  }, [e, be, t]), G(() => {
@@ -2036,7 +2036,7 @@ function oa(e, { ownerDocument: t }) {
2036
2036
  let n = !!(e & 8), r = ra(n);
2037
2037
  Pn(() => {
2038
2038
  n || (t == null ? void 0 : t.activeElement) === (t == null ? void 0 : t.body) && ye(r());
2039
- }, [n]), Co(() => {
2039
+ }, [n]), Fo(() => {
2040
2040
  n && ye(r());
2041
2041
  });
2042
2042
  }
@@ -2049,7 +2049,7 @@ function ia(e, { ownerDocument: t, container: n, initialFocus: r, initialFocusFa
2049
2049
  return;
2050
2050
  }
2051
2051
  let l = n.current;
2052
- l && Ft(() => {
2052
+ l && Ct(() => {
2053
2053
  if (!a.current) return;
2054
2054
  let u = t == null ? void 0 : t.activeElement;
2055
2055
  if (r != null && r.current) {
@@ -2142,11 +2142,11 @@ function Ro(e, t) {
2142
2142
  let Io = q, Do = bt.RenderStrategy;
2143
2143
  function ua(e, t) {
2144
2144
  var n, r;
2145
- let { transition: o = !0, beforeEnter: i, afterEnter: s, beforeLeave: a, afterLeave: l, enter: u, enterFrom: d, enterTo: c, entered: f, leave: p, leaveFrom: _, leaveTo: y, ...m } = e, v = w(null), g = Ao(e), $ = he(...g ? [v, t] : t === null ? [] : [t]), T = (n = m.unmount) == null || n ? Ee.Unmount : Ee.Hidden, { show: S, appear: M, initial: A } = la(), [W, F] = x(S ? "visible" : "hidden"), b = ca(), { register: R, unregister: j } = b;
2145
+ let { transition: o = !0, beforeEnter: i, afterEnter: s, beforeLeave: a, afterLeave: l, enter: u, enterFrom: d, enterTo: c, entered: f, leave: p, leaveFrom: _, leaveTo: y, ...m } = e, v = w(null), g = Ao(e), $ = he(...g ? [v, t] : t === null ? [] : [t]), T = (n = m.unmount) == null || n ? Ee.Unmount : Ee.Hidden, { show: S, appear: M, initial: A } = la(), [W, C] = x(S ? "visible" : "hidden"), b = ca(), { register: R, unregister: j } = b;
2146
2146
  re(() => R(v), [R, v]), re(() => {
2147
2147
  if (T === Ee.Hidden && v.current) {
2148
2148
  if (S && W !== "visible") {
2149
- F("visible");
2149
+ C("visible");
2150
2150
  return;
2151
2151
  }
2152
2152
  return Te(W, { hidden: () => j(v), visible: () => R(v) });
@@ -2157,8 +2157,8 @@ function ua(e, t) {
2157
2157
  if (g && I && W === "visible" && v.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
2158
2158
  }, [v, W, I, g]);
2159
2159
  let Y = A && !M, Q = M && S && A, X = w(!1), k = Ro(() => {
2160
- X.current || (F("hidden"), j(v));
2161
- }, b), C = G((Z) => {
2160
+ X.current || (C("hidden"), j(v));
2161
+ }, b), F = G((Z) => {
2162
2162
  X.current = !0;
2163
2163
  let J = Z ? "enter" : "leave";
2164
2164
  k.onStart(v, J, (ee) => {
@@ -2168,12 +2168,12 @@ function ua(e, t) {
2168
2168
  let J = Z ? "enter" : "leave";
2169
2169
  X.current = !1, k.onStop(v, J, (ee) => {
2170
2170
  ee === "enter" ? s == null || s() : ee === "leave" && (l == null || l());
2171
- }), J === "leave" && !At(k) && (F("hidden"), j(v));
2171
+ }), J === "leave" && !At(k) && (C("hidden"), j(v));
2172
2172
  });
2173
2173
  H(() => {
2174
- g && o || (C(S), N(S));
2174
+ g && o || (F(S), N(S));
2175
2175
  }, [S, g, o]);
2176
- let P = !(!o || !g || !I || Y), [, E] = Ns(P, v, S, { start: C, end: N }), D = Fe({ ref: $, className: ((r = ln(m.className, Q && u, Q && d, E.enter && u, E.enter && E.closed && d, E.enter && !E.closed && c, E.leave && p, E.leave && !E.closed && _, E.leave && E.closed && y, !E.transition && S && f)) == null ? void 0 : r.trim()) || void 0, ...Ps(E) }), V = 0;
2176
+ let P = !(!o || !g || !I || Y), [, E] = Ns(P, v, S, { start: F, end: N }), D = Ce({ ref: $, className: ((r = ln(m.className, Q && u, Q && d, E.enter && u, E.enter && E.closed && d, E.enter && !E.closed && c, E.leave && p, E.leave && !E.closed && _, E.leave && E.closed && y, !E.transition && S && f)) == null ? void 0 : r.trim()) || void 0, ...Ps(E) }), V = 0;
2177
2177
  return W === "visible" && (V |= ce.Open), W === "hidden" && (V |= ce.Closed), E.enter && (V |= ce.Opening), E.leave && (V |= ce.Closing), L.createElement(Lt.Provider, { value: k }, L.createElement(Is, { value: V }, ae({ ourProps: D, theirProps: m, defaultTag: Io, features: Do, visible: W === "visible", name: "Transition.Child" })));
2178
2178
  }
2179
2179
  function da(e, t) {
@@ -2231,20 +2231,20 @@ let cr = oe(function(e, t) {
2231
2231
  let p = w(null), _ = he(p, t), y = lt(p), m = o ? 0 : 1, [v, g] = it(ma, { titleId: null, descriptionId: null, panelRef: mn() }), $ = G(() => i(!1)), T = G((P) => g({ type: 0, id: P })), S = ct() ? m === 0 : !1, [M, A] = qs(), W = { get current() {
2232
2232
  var P;
2233
2233
  return (P = v.panelRef.current) != null ? P : p.current;
2234
- } }, { resolveContainers: F, mainTreeNodeRef: b, MainTreeNode: R } = Zs({ portals: M, defaultContainers: [W] }), j = f !== null ? (f & ce.Closing) === ce.Closing : !1;
2234
+ } }, { resolveContainers: C, mainTreeNodeRef: b, MainTreeNode: R } = Zs({ portals: M, defaultContainers: [W] }), j = f !== null ? (f & ce.Closing) === ce.Closing : !1;
2235
2235
  cs(u || j ? !1 : S, { allowed: G(() => {
2236
2236
  var P, E;
2237
2237
  return [(E = (P = p.current) == null ? void 0 : P.closest("[data-headlessui-portal]")) != null ? E : null];
2238
2238
  }), disallowed: G(() => {
2239
2239
  var P, E;
2240
2240
  return [(E = (P = b.current) == null ? void 0 : P.closest("body > *:not(#headlessui-portal-root)")) != null ? E : null];
2241
- }) }), bs(S, F, (P) => {
2241
+ }) }), bs(S, C, (P) => {
2242
2242
  P.preventDefault(), $();
2243
2243
  }), Ks(S, y == null ? void 0 : y.defaultView, (P) => {
2244
2244
  P.preventDefault(), P.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), $();
2245
- }), Cs(u || j ? !1 : S, y, F), Eo(S, p, $);
2246
- let [I, Y] = es(), Q = z(() => [{ dialogState: m, close: $, setTitleId: T }, v], [m, v, $, T]), X = z(() => ({ open: m === 0 }), [m]), k = { ref: _, id: r, role: a, tabIndex: -1, "aria-modal": u ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": v.titleId, "aria-describedby": I }, C = !Xs(), N = Me.None;
2247
- return S && !u && (N |= Me.RestoreFocus, N |= Me.TabLock, l && (N |= Me.AutoFocus), C && (N |= Me.InitialFocus)), L.createElement(Ds, null, L.createElement(lr, { force: !0 }, L.createElement(Gs, null, L.createElement(An.Provider, { value: Q }, L.createElement(Po, { target: p }, L.createElement(lr, { force: !1 }, L.createElement(Y, { slot: X }, L.createElement(A, null, L.createElement(na, { initialFocus: s, initialFocusFallback: p, containers: F, features: N }, L.createElement(ss, { value: $ }, ae({ ourProps: k, theirProps: d, slot: X, defaultTag: _a, features: ya, visible: m === 0, name: "Dialog" })))))))))), L.createElement(Ji, null, L.createElement(R, null)));
2245
+ }), Fs(u || j ? !1 : S, y, C), Eo(S, p, $);
2246
+ let [I, Y] = es(), Q = z(() => [{ dialogState: m, close: $, setTitleId: T }, v], [m, v, $, T]), X = z(() => ({ open: m === 0 }), [m]), k = { ref: _, id: r, role: a, tabIndex: -1, "aria-modal": u ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": v.titleId, "aria-describedby": I }, F = !Xs(), N = Me.None;
2247
+ return S && !u && (N |= Me.RestoreFocus, N |= Me.TabLock, l && (N |= Me.AutoFocus), F && (N |= Me.InitialFocus)), L.createElement(Ds, null, L.createElement(lr, { force: !0 }, L.createElement(Gs, null, L.createElement(An.Provider, { value: Q }, L.createElement(Po, { target: p }, L.createElement(lr, { force: !1 }, L.createElement(Y, { slot: X }, L.createElement(A, null, L.createElement(na, { initialFocus: s, initialFocusFallback: p, containers: C, features: N }, L.createElement(ss, { value: $ }, ae({ ourProps: k, theirProps: d, slot: X, defaultTag: _a, features: ya, visible: m === 0, name: "Dialog" })))))))))), L.createElement(Ji, null, L.createElement(R, null)));
2248
2248
  }), _a = "div", ya = bt.RenderStrategy | bt.Static;
2249
2249
  function ga(e, t) {
2250
2250
  let { transition: n = !1, open: r, ...o } = e, i = Pt(), s = e.hasOwnProperty("open") || i !== null, a = e.hasOwnProperty("onClose");
@@ -2276,7 +2276,7 @@ function ka(e, t) {
2276
2276
  }
2277
2277
  let Sa = oe(ga), Ho = oe(ba);
2278
2278
  oe($a);
2279
- let Ca = oe(ka), Fa = Object.assign(Sa, { Panel: Ho, Title: Ca, Description: os });
2279
+ let Fa = oe(ka), Ca = Object.assign(Sa, { Panel: Ho, Title: Fa, Description: os });
2280
2280
  const xa = "_root_1duny_1", Ma = "_modal_1duny_10", Pa = "_container_1duny_13", Na = "_page_1duny_18", La = "_close_1duny_21", ht = {
2281
2281
  root: xa,
2282
2282
  modal: Ma,
@@ -2320,7 +2320,7 @@ const xa = "_root_1duny_1", Ma = "_modal_1duny_10", Pa = "_container_1duny_13",
2320
2320
  children: t
2321
2321
  }
2322
2322
  );
2323
- }, Ia = () => /* @__PURE__ */ h(we, { children: /* @__PURE__ */ h("path", { d: "M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z" }) }), Wo = (e) => /* @__PURE__ */ h(we, { ...e, children: /* @__PURE__ */ h(
2323
+ }, Ia = (e) => /* @__PURE__ */ h(we, { ...e, children: /* @__PURE__ */ h("path", { d: "M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z" }) }), Wo = (e) => /* @__PURE__ */ h(we, { ...e, children: /* @__PURE__ */ h(
2324
2324
  "path",
2325
2325
  {
2326
2326
  fillRule: "evenodd",
@@ -2730,7 +2730,7 @@ function tl(e) {
2730
2730
  sessionId: _,
2731
2731
  sessionToken: y,
2732
2732
  forceDevUrl: m
2733
- } = e, [v, g] = x(0), [$, T] = x(0), [S, M] = x(null), [A, W] = x(!1), { saveStream: F, savePhoto: b, savedPhoto: R, clearSavedPhoto: j, savedStreams: I } = zo(), { postData: Y, validateSessionId: Q } = Ka(
2733
+ } = e, [v, g] = x(0), [$, T] = x(0), [S, M] = x(null), [A, W] = x(!1), { saveStream: C, savePhoto: b, savedPhoto: R, clearSavedPhoto: j, savedStreams: I } = zo(), { postData: Y, validateSessionId: Q } = Ka(
2734
2734
  f,
2735
2735
  m,
2736
2736
  t,
@@ -2740,7 +2740,7 @@ function tl(e) {
2740
2740
  [n, $]
2741
2741
  ), k = () => {
2742
2742
  T((E) => E + 1), g((E) => E + 1);
2743
- }, C = (E) => {
2743
+ }, F = (E) => {
2744
2744
  const D = new Image();
2745
2745
  D.crossOrigin = "Anonymous", D.src = Ja, D.onload = () => {
2746
2746
  const V = Rn(D, D.width, D.height);
@@ -2803,7 +2803,7 @@ function tl(e) {
2803
2803
  return;
2804
2804
  }
2805
2805
  const E = await $e.loadDetector();
2806
- pr = E, C(E), M(E);
2806
+ pr = E, F(E), M(E);
2807
2807
  };
2808
2808
  return H(() => {
2809
2809
  if (hr) {
@@ -2834,7 +2834,7 @@ function tl(e) {
2834
2834
  },
2835
2835
  onRequestClose: a,
2836
2836
  faceDetector: S,
2837
- saveStream: F,
2837
+ saveStream: C,
2838
2838
  savePhoto: b,
2839
2839
  clearSavedPhoto: j,
2840
2840
  onComplete: N,
@@ -2896,10 +2896,7 @@ function ml() {
2896
2896
  }
2897
2897
  const vr = "colorScheme";
2898
2898
  function jo() {
2899
- const { namespace: e } = fe(), t = () => {
2900
- const o = localStorage.getItem(vr);
2901
- return !o && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : o;
2902
- }, n = (o = null) => {
2899
+ const { namespace: e } = fe(), t = () => localStorage.getItem(vr), n = (o = null) => {
2903
2900
  o && localStorage.setItem(vr, o);
2904
2901
  const i = `${e}-color-scheme`, s = document.documentElement;
2905
2902
  o && o === "dark" ? s == null || s.setAttribute(i, "dark") : s == null || s.removeAttribute(i);
@@ -3112,9 +3109,9 @@ function It(e = {}) {
3112
3109
  d(g.faces);
3113
3110
  } };
3114
3111
  }
3115
- const Cl = "_root_5hgaj_1", Fl = "_container_5hgaj_4", xl = "_progress_5hgaj_7", Ml = "_intro_5hgaj_12", Pl = "_content_5hgaj_15", Nl = "_branding_5hgaj_18", Ll = "_instructionsContainer_5hgaj_22", Al = "_instructions_5hgaj_22", se = {
3116
- root: Cl,
3117
- container: Fl,
3112
+ const Fl = "_root_5hgaj_1", Cl = "_container_5hgaj_4", xl = "_progress_5hgaj_7", Ml = "_intro_5hgaj_12", Pl = "_content_5hgaj_15", Nl = "_branding_5hgaj_18", Ll = "_instructionsContainer_5hgaj_22", Al = "_instructions_5hgaj_22", se = {
3113
+ root: Fl,
3114
+ container: Cl,
3118
3115
  progress: xl,
3119
3116
  intro: Ml,
3120
3117
  content: Pl,
@@ -3304,8 +3301,8 @@ function zl(e) {
3304
3301
  return 10;
3305
3302
  }
3306
3303
  }, []), A = (b) => {
3307
- const { keypoints: R, box: j } = b, I = { x: j.width * 0.5, y: j.height * 0.5 }, Y = R[Ul], Q = { y: Y.y - j.yMin, x: Y.x - j.xMin }, X = I.x - Q.x, k = Q.y - I.y, C = M();
3308
- return Math.abs(X) < C && Math.abs(k) < C ? null : S(X, k);
3304
+ const { keypoints: R, box: j } = b, I = { x: j.width * 0.5, y: j.height * 0.5 }, Y = R[Ul], Q = { y: Y.y - j.yMin, x: Y.x - j.xMin }, X = I.x - Q.x, k = Q.y - I.y, F = M();
3305
+ return Math.abs(X) < F && Math.abs(k) < F ? null : S(X, k);
3309
3306
  }, { detectFaces: W } = It({
3310
3307
  frameSize: 280,
3311
3308
  validations: ["zoom", "in-frame"],
@@ -3385,13 +3382,13 @@ function Xl(e) {
3385
3382
  }), M = () => {
3386
3383
  i($r), a(!1), u(!1), c.current = "inactive", f.current = 0, p.current = !1, g();
3387
3384
  }, A = (I) => {
3388
- const { keypoints: Y } = I, Q = Y[1], X = Y[9], k = Q.x - X.x, C = Q.y - X.y;
3389
- return 90 - Math.atan2(C, k) * (180 / Math.PI);
3385
+ const { keypoints: Y } = I, Q = Y[1], X = Y[9], k = Q.x - X.x, F = Q.y - X.y;
3386
+ return 90 - Math.atan2(F, k) * (180 / Math.PI);
3390
3387
  }, W = (I) => {
3391
3388
  c.current = "inactive", i(n[I].question), _.current = setTimeout(() => {
3392
3389
  c.current = "active";
3393
3390
  }, 2e3);
3394
- }, F = z(() => {
3391
+ }, C = z(() => {
3395
3392
  switch (t) {
3396
3393
  case "easy":
3397
3394
  return 2;
@@ -3402,7 +3399,7 @@ function Xl(e) {
3402
3399
  }
3403
3400
  }, []), b = (I) => {
3404
3401
  try {
3405
- if (c.current = "inactive", Math.abs(I) < F)
3402
+ if (c.current = "inactive", Math.abs(I) < C)
3406
3403
  throw new Error("Tilt head further to answer");
3407
3404
  const Y = I > 0, Q = n[f.current].answer;
3408
3405
  if (Y === Q)
@@ -3478,7 +3475,7 @@ function Jl(e) {
3478
3475
  }
3479
3476
  return t;
3480
3477
  }
3481
- const Ce = (e, t) => {
3478
+ const Fe = (e, t) => {
3482
3479
  for (const [n, r] of Object.entries(e))
3483
3480
  if (r === t) return n;
3484
3481
  return null;
@@ -3688,7 +3685,7 @@ function nc(e) {
3688
3685
  await M({ ref: b, frameSize: R, throttleInterval: 500 });
3689
3686
  } catch {
3690
3687
  }
3691
- }, F = async () => {
3688
+ }, C = async () => {
3692
3689
  };
3693
3690
  return /* @__PURE__ */ h(
3694
3691
  Dt,
@@ -3702,7 +3699,7 @@ function nc(e) {
3702
3699
  onReset: A,
3703
3700
  completed: l,
3704
3701
  onStart: async () => {
3705
- await F(), y();
3702
+ await C(), y();
3706
3703
  },
3707
3704
  children: d ? /* @__PURE__ */ h(q, {}) : /* @__PURE__ */ h(ut, { onStream: W, onRecord: p })
3708
3705
  }
@@ -3763,7 +3760,7 @@ const Yt = {
3763
3760
  LEFT_EYE: [36, 37, 38, 39, 40, 41],
3764
3761
  RIGHT_EYE: [42, 43, 44, 45, 46, 47],
3765
3762
  MOUTH: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
3766
- }, mt = (e, t) => Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2), Cr = (e) => {
3763
+ }, mt = (e, t) => Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2), Fr = (e) => {
3767
3764
  if (e.length !== 6) return 0;
3768
3765
  const t = mt(e[1], e[5]), n = mt(e[2], e[4]), r = mt(e[0], e[3]);
3769
3766
  return (t + n) / (2 * r);
@@ -3779,7 +3776,7 @@ const Yt = {
3779
3776
  (A) => e[A]
3780
3777
  ), v = Yt.RIGHT_EYE.map(
3781
3778
  (A) => e[A]
3782
- ), g = Yt.MOUTH.map((A) => e[A]), $ = Cr(m), T = Cr(v), S = oc(g);
3779
+ ), g = Yt.MOUTH.map((A) => e[A]), $ = Fr(m), T = Fr(v), S = oc(g);
3783
3780
  o = ($ + T) / 2 > 1, i = S < 73.24, o || t("Please look at the camera!"), i || t("Please close your mouth!");
3784
3781
  }
3785
3782
  const s = 0.5, a = 0.12, l = ((c = r == null ? void 0 : r.find((_) => _.categoryName === "eyeBlinkLeft")) == null ? void 0 : c.score) ?? 0, u = ((f = r == null ? void 0 : r.find((_) => _.categoryName === "eyeBlinkRight")) == null ? void 0 : f.score) ?? 0, d = ((p = r == null ? void 0 : r.find((_) => _.categoryName === "jawOpen")) == null ? void 0 : p.score) ?? 0;
@@ -3801,26 +3798,26 @@ function sc(e = {}) {
3801
3798
  livenessTimeout: s
3802
3799
  } = e, { faceDetector: a, savePhoto: l } = fe(), { checkFacialFeatures: u, checkZoomLevel: d, checkInFrame: c } = Bo(), f = w(null), p = w(null), _ = w(!1), y = w(null), m = w(!1), v = w([]), g = U(() => {
3803
3800
  p.current && clearTimeout(p.current), y.current && clearTimeout(y.current), v.current.forEach(clearTimeout), m.current = !1, _.current = !0;
3804
- }, []), $ = w(null), T = w(null), S = w([]), M = 10, A = 7.5, W = 2, F = w({
3801
+ }, []), $ = w(null), T = w(null), S = w([]), M = 10, A = 7.5, W = 2, C = w({
3805
3802
  sharpness: 0,
3806
3803
  data: null
3807
- }), b = (k, C) => {
3804
+ }), b = (k, F) => {
3808
3805
  const N = k.getContext("2d");
3809
- if (!N || C.width === 0 || C.height === 0 || !N || C.width === 0 || C.height === 0)
3806
+ if (!N || F.width === 0 || F.height === 0 || !N || F.width === 0 || F.height === 0)
3810
3807
  return !1;
3811
3808
  const P = N.getImageData(
3812
- C.xMin,
3813
- C.yMin,
3814
- C.width,
3815
- C.height
3809
+ F.xMin,
3810
+ F.yMin,
3811
+ F.width,
3812
+ F.height
3816
3813
  ), { data: E } = P;
3817
3814
  let D = 0, V = 0;
3818
3815
  for (let J = 0; J < E.length; J += 4)
3819
3816
  0.299 * E[J] + 0.587 * E[J + 1] + 0.114 * E[J + 2] > 250 && V++;
3820
3817
  const Z = E.length / 4;
3821
3818
  return D = V / Z, D > 0.01;
3822
- }, R = (k, C, N, P) => {
3823
- const E = C.current, D = E == null ? void 0 : E.parentElement;
3819
+ }, R = (k, F, N, P) => {
3820
+ const E = F.current, D = E == null ? void 0 : E.parentElement;
3824
3821
  if (!(!E || !D))
3825
3822
  for (const V of P)
3826
3823
  switch (V) {
@@ -3848,7 +3845,7 @@ function sc(e = {}) {
3848
3845
  break;
3849
3846
  }
3850
3847
  }, j = (k) => {
3851
- const C = [
3848
+ const F = [
3852
3849
  33,
3853
3850
  // Left eye inner corner
3854
3851
  133,
@@ -3862,21 +3859,21 @@ function sc(e = {}) {
3862
3859
  386
3863
3860
  // Right eye pupil area
3864
3861
  ], N = 0.5;
3865
- for (const P of C) {
3862
+ for (const P of F) {
3866
3863
  const E = k[P];
3867
3864
  if (!E || E.score && E.score < N)
3868
3865
  return !1;
3869
3866
  }
3870
3867
  return !0;
3871
- }, I = (k, C) => {
3868
+ }, I = (k, F) => {
3872
3869
  const N = k.getContext("2d");
3873
- if (!N || C.width === 0 || C.height === 0)
3870
+ if (!N || F.width === 0 || F.height === 0)
3874
3871
  return !1;
3875
3872
  const P = N.getImageData(
3876
- C.xMin,
3877
- C.yMin,
3878
- C.width,
3879
- C.height
3873
+ F.xMin,
3874
+ F.yMin,
3875
+ F.width,
3876
+ F.height
3880
3877
  ), { data: E } = P;
3881
3878
  let D = 0;
3882
3879
  for (let Z = 0; Z < E.length; Z += 4) {
@@ -3885,11 +3882,11 @@ function sc(e = {}) {
3885
3882
  }
3886
3883
  return D / (E.length / 4) < 60;
3887
3884
  }, Y = (k) => {
3888
- const C = {
3885
+ const F = {
3889
3886
  x: k.box.xMin + (k.box.width ?? 0) / 2,
3890
3887
  y: k.box.yMin + (k.box.height ?? 0) / 2
3891
3888
  };
3892
- if (S.current.push(C), S.current.length > M && S.current.shift(), S.current.length < M) return !1;
3889
+ if (S.current.push(F), S.current.length > M && S.current.shift(), S.current.length < M) return !1;
3893
3890
  let N = 0, P = 0, E = 0;
3894
3891
  for (let ee = 1; ee < S.current.length; ee++) {
3895
3892
  const He = S.current[ee - 1], dt = S.current[ee], qe = dt.x - He.x, In = dt.y - He.y, Dn = Math.sqrt(qe * qe + In * In);
@@ -3897,7 +3894,7 @@ function sc(e = {}) {
3897
3894
  }
3898
3895
  const V = N / (M - 1) > A, Z = P >= W, J = V || Z;
3899
3896
  return J && i("🚨 Head shake detected!"), J;
3900
- }, Q = (k, C, N, P) => {
3897
+ }, Q = (k, F, N, P) => {
3901
3898
  try {
3902
3899
  if (k.length === 0 || k.length > 1) {
3903
3900
  p.current && (clearTimeout(p.current), p.current = null), i(
@@ -3933,20 +3930,20 @@ function sc(e = {}) {
3933
3930
  i("Too much glare. Please avoid direct light on your face.");
3934
3931
  return;
3935
3932
  }
3936
- i("Hold still..."), F.current = { sharpness: 0, data: null }, v.current.forEach(clearTimeout);
3933
+ i("Hold still..."), C.current = { sharpness: 0, data: null }, v.current.forEach(clearTimeout);
3937
3934
  const ee = setTimeout(() => i("Almost there..."), 400), He = setTimeout(
3938
3935
  () => i("Detecting liveness..."),
3939
3936
  700
3940
3937
  );
3941
3938
  v.current = [ee, He], p.current = setTimeout(() => {
3942
- F.current.data ? (l(F.current.data), r(E, !0, N, !0)) : o("Could not capture a clear photo. Please try again.");
3939
+ C.current.data ? (l(C.current.data), r(E, !0, N, !0)) : o("Could not capture a clear photo. Please try again.");
3943
3940
  }, 1e3);
3944
3941
  }
3945
3942
  if (p.current) {
3946
- const ee = ja(C);
3947
- ee > F.current.sharpness && (F.current = {
3943
+ const ee = ja(F);
3944
+ ee > C.current.sharpness && (C.current = {
3948
3945
  sharpness: ee,
3949
- data: C
3946
+ data: F
3950
3947
  });
3951
3948
  }
3952
3949
  } catch (E) {
@@ -3956,16 +3953,16 @@ function sc(e = {}) {
3956
3953
  return { detectFaces: async (k) => {
3957
3954
  if (!a) return;
3958
3955
  f.current = k.ref.current;
3959
- const C = f.current;
3960
- if (!C || C.videoWidth === 0) return;
3956
+ const F = f.current;
3957
+ if (!F || F.videoWidth === 0) return;
3961
3958
  $.current || ($.current = document.createElement("canvas"), T.current = $.current.getContext("2d", {
3962
3959
  willReadFrequently: !0
3963
3960
  }));
3964
3961
  const N = $.current, P = T.current;
3965
3962
  if (!N || !P) return;
3966
- N.width = C.videoWidth, N.height = C.videoHeight, P.drawImage(C, 0, 0, N.width, N.height);
3963
+ N.width = F.videoWidth, N.height = F.videoHeight, P.drawImage(F, 0, 0, N.width, N.height);
3967
3964
  const E = P.getImageData(0, 0, N.width, N.height);
3968
- !m.current && C.readyState >= 2 && !_.current && (m.current = !0, y.current = setTimeout(() => {
3965
+ !m.current && F.readyState >= 2 && !_.current && (m.current = !0, y.current = setTimeout(() => {
3969
3966
  o("Liveness check TIMED OUT. Please try again."), g();
3970
3967
  }, s));
3971
3968
  const { faces: D, blendShapes: V, inBox: Z } = await $e.detectFaces(
@@ -4040,12 +4037,12 @@ function pc(e) {
4040
4037
  s.current.setToken(m);
4041
4038
  let $ = "", T = "", S, M = 0;
4042
4039
  if (v.length === 3) {
4043
- const F = JSON.parse(atob(v[1]));
4044
- if (F.face) {
4045
- const b = JSON.parse(F.face), R = /^https:\/\/[^/:]+\.(api\.cognitive\.microsoft|cognitiveservices\.azure)\.com$/;
4040
+ const C = JSON.parse(atob(v[1]));
4041
+ if (C.face) {
4042
+ const b = JSON.parse(C.face), R = /^https:\/\/[^/:]+\.(api\.cognitive\.microsoft|cognitiveservices\.azure)\.com$/;
4046
4043
  if (b.endpoint && (R.test(b.endpoint) || b.endpoint === "https://virginia.api.cognitive.microsoft.us")) {
4047
4044
  s.current.setEndpoint(b.endpoint);
4048
- const I = JSON.parse(F["allowed-paths"]);
4045
+ const I = JSON.parse(C["allowed-paths"]);
4049
4046
  if (I) {
4050
4047
  const Y = (A = I.find(
4051
4048
  (P) => P.path.toLocaleLowerCase().endsWith("/session/start")
@@ -4065,7 +4062,7 @@ function pc(e) {
4065
4062
  k && ({ path: T, quota: M } = k, s.current.setLivenessWithVerifyPath(
4066
4063
  T
4067
4064
  ));
4068
- const C = new Set(
4065
+ const F = new Set(
4069
4066
  I.map(
4070
4067
  (P) => {
4071
4068
  var E;
@@ -4073,8 +4070,8 @@ function pc(e) {
4073
4070
  }
4074
4071
  )
4075
4072
  );
4076
- if (C.size === 1 && (X || k)) {
4077
- const P = C.values().next().value;
4073
+ if (F.size === 1 && (X || k)) {
4074
+ const P = F.values().next().value;
4078
4075
  s.current.setApiVersion(P), g = !0, S = b.clientClaims.livenessOperationMode;
4079
4076
  }
4080
4077
  }
@@ -4082,28 +4079,28 @@ function pc(e) {
4082
4079
  }
4083
4080
  s.current.setOperationQuota(M), s.current.setOperationMode(
4084
4081
  window.Module.LivenessOperationMode[S]
4085
- ), F.sid && s.current.setSid(F.sid), F["azure-resource-id"] && s.current.setResourceId(F["azure-resource-id"]);
4082
+ ), C.sid && s.current.setSid(C.sid), C["azure-resource-id"] && s.current.setResourceId(C["azure-resource-id"]);
4086
4083
  }
4087
4084
  if (g)
4088
4085
  s.current.initialize();
4089
4086
  else {
4090
- const F = {
4091
- livenessError: Ce(
4087
+ const C = {
4088
+ livenessError: Fe(
4092
4089
  window.Module.LivenessFailureReason,
4093
4090
  window.Module.LivenessFailureReason.InvalidToken
4094
4091
  ),
4095
- recognitionError: Ce(
4092
+ recognitionError: Fe(
4096
4093
  window.Module.RecognitionFailureReason,
4097
4094
  window.Module.RecognitionFailureReason.None
4098
4095
  )
4099
4096
  };
4100
4097
  r(
4101
- F.livenessError ? Kt[F.livenessError] || F.livenessError : "Something went wrong"
4098
+ C.livenessError ? Kt[C.livenessError] || C.livenessError : "Something went wrong"
4102
4099
  ), u();
4103
4100
  }
4104
4101
  }, f = (m) => {
4105
4102
  try {
4106
- s.current = new window.Module.FaceRecoEngineAdapter(), c(m);
4103
+ o("light"), s.current = new window.Module.FaceRecoEngineAdapter(), c(m);
4107
4104
  } catch (v) {
4108
4105
  r(`Could not start liveness test: ${v.message}`), l();
4109
4106
  }
@@ -4121,7 +4118,7 @@ function pc(e) {
4121
4118
  break;
4122
4119
  }
4123
4120
  if (!a.current && g) {
4124
- const T = Ce(
4121
+ const T = Fe(
4125
4122
  window.Module.FeedbackForFace,
4126
4123
  $
4127
4124
  );
@@ -4143,11 +4140,11 @@ function pc(e) {
4143
4140
  ]);
4144
4141
  if ($) {
4145
4142
  const A = {
4146
- livenessError: Ce(
4143
+ livenessError: Fe(
4147
4144
  window.Module.LivenessFailureReason,
4148
4145
  v.failureReason
4149
4146
  ),
4150
- recognitionError: Ce(
4147
+ recognitionError: Fe(
4151
4148
  window.Module.RecognitionFailureReason,
4152
4149
  g.failureReason
4153
4150
  )
@@ -4157,12 +4154,12 @@ function pc(e) {
4157
4154
  );
4158
4155
  } else {
4159
4156
  const A = {
4160
- livenessStatus: Ce(
4157
+ livenessStatus: Fe(
4161
4158
  window.Module.LivenessStatus,
4162
4159
  v.status
4163
4160
  ),
4164
4161
  recognitionResult: {
4165
- status: Ce(
4162
+ status: Fe(
4166
4163
  window.Module.RecognitionStatus,
4167
4164
  g.status
4168
4165
  ),
@@ -4205,7 +4202,7 @@ function pc(e) {
4205
4202
  destroy: u
4206
4203
  };
4207
4204
  }
4208
- const Fr = "Detecting face...";
4205
+ const Cr = "Detecting face...";
4209
4206
  function hc({
4210
4207
  onImageCaptured: e,
4211
4208
  fetchAzureSessionToken: t,
@@ -4214,22 +4211,22 @@ function hc({
4214
4211
  onReset: o,
4215
4212
  onFailure: i
4216
4213
  }) {
4217
- const [s, a] = x(Fr), [l, u] = x(!1), d = w("findingFace"), c = w(null), f = w(), p = w(!1), [_, y] = x(0), m = w(!1), [v, g] = x(!1);
4214
+ const [s, a] = x(Cr), [l, u] = x(!1), d = w("findingFace"), c = w(null), f = w(), p = w(!1), [_, y] = x(0), m = w(!1), [v, g] = x(!1);
4218
4215
  H(() => {
4219
4216
  y(Math.min(window.innerWidth, window.innerHeight) * 0.6);
4220
4217
  }, []), H(() => {
4221
4218
  n(), t();
4222
4219
  }, []);
4223
4220
  const $ = pc({
4224
- onMessage: (F) => {
4225
- d.current === "analyzingLiveness" && a(F);
4221
+ onMessage: (C) => {
4222
+ d.current === "analyzingLiveness" && a(C);
4226
4223
  },
4227
4224
  onComplete: () => {
4228
4225
  d.current = "done", e(!0);
4229
4226
  },
4230
- onError: (F) => {
4231
- const b = Ql(F);
4232
- a(b.message), d.current = "done", u(!0), r && r(F), i({
4227
+ onError: (C) => {
4228
+ const b = Ql(C);
4229
+ a(b.message), d.current = "done", u(!0), r && r(C), i({
4233
4230
  faceImage: "",
4234
4231
  passed: !1,
4235
4232
  metadata: {},
@@ -4237,21 +4234,21 @@ function hc({
4237
4234
  });
4238
4235
  }
4239
4236
  }), T = () => {
4240
- m.current = !1, a(Fr), d.current = "findingFace", c.current = null, $.reset(), f.current && cancelAnimationFrame(f.current), u(!1), o();
4237
+ m.current = !1, a(Cr), d.current = "findingFace", c.current = null, $.reset(), f.current && cancelAnimationFrame(f.current), u(!1), o();
4241
4238
  }, { detectFaces: S, cleanup: M } = sc({
4242
4239
  validations: ["zoom", "features"],
4243
4240
  frameSize: _,
4244
4241
  livenessTimeout: 1e4,
4245
- onFace: async (F, b, R) => {
4242
+ onFace: async (C, b, R) => {
4246
4243
  p.current = b, b && d.current === "findingFace" && !m.current && R && (m.current = !0, g(!0));
4247
4244
  },
4248
4245
  onPhotoSaved: () => {
4249
4246
  },
4250
- onMessage: (F) => {
4251
- d.current === "findingFace" && a(F);
4247
+ onMessage: (C) => {
4248
+ d.current === "findingFace" && a(C);
4252
4249
  },
4253
- onError: (F) => {
4254
- a(F), u(!0), r && r(F);
4250
+ onError: (C) => {
4251
+ a(C), u(!0), r && r(C);
4255
4252
  }
4256
4253
  });
4257
4254
  H(
@@ -4289,8 +4286,8 @@ function hc({
4289
4286
  }
4290
4287
  })();
4291
4288
  }, [v]);
4292
- const W = (F) => {
4293
- F.current && (c.current = F.current, A());
4289
+ const W = (C) => {
4290
+ C.current && (c.current = C.current, A());
4294
4291
  };
4295
4292
  return H(
4296
4293
  () => () => {
@@ -4364,7 +4361,7 @@ function mc() {
4364
4361
  clearSavedPhoto: c,
4365
4362
  branding: f,
4366
4363
  isMobileAppWebView: p
4367
- } = fe(), [_, y] = x(!1), [m, v] = x(!1), [g, $] = x(null), [T, S] = x(!1), [M, A] = x(!1), [W, F] = x(0), [b, R] = x(null);
4364
+ } = fe(), [_, y] = x(!1), [m, v] = x(!1), [g, $] = x(null), [T, S] = x(!1), [M, A] = x(!1), [W, C] = x(0), [b, R] = x(null);
4368
4365
  H(() => {
4369
4366
  const k = t();
4370
4367
  n(k);
@@ -4388,7 +4385,7 @@ function mc() {
4388
4385
  return;
4389
4386
  }
4390
4387
  const k = setTimeout(() => {
4391
- R((C) => (C ?? 1) - 1);
4388
+ R((F) => (F ?? 1) - 1);
4392
4389
  }, 1e3);
4393
4390
  return () => {
4394
4391
  clearTimeout(k);
@@ -4408,7 +4405,7 @@ function mc() {
4408
4405
  /* @__PURE__ */ h(ml, {}),
4409
4406
  /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h("p", { className: "yvlw-text-xs yvlw-m-0 yvlw-p-0 subtext", children: "You have been given this set of tasks to complete. They are pretty easy to do but we will be guiding you every step of the way." }) }),
4410
4407
  /* @__PURE__ */ h("ol", { children: [
4411
- o.map((k, C) => /* @__PURE__ */ h("li", { className: Q(C), children: el[k.id].name }, `task-${C}`)),
4408
+ o.map((k, F) => /* @__PURE__ */ h("li", { className: Q(F), children: el[k.id].name }, `task-${F}`)),
4412
4409
  /* @__PURE__ */ h("li", { className: s ? ne.active : "", children: "Complete! 🎉" })
4413
4410
  ] })
4414
4411
  ] }),
@@ -4475,7 +4472,7 @@ function mc() {
4475
4472
  },
4476
4473
  onError: (k) => $(k),
4477
4474
  onReset: () => {
4478
- Xe = null, A(!1), F((k) => k + 1), c();
4475
+ Xe = null, A(!1), C((k) => k + 1), c();
4479
4476
  },
4480
4477
  onFailure: l
4481
4478
  },
@@ -4483,7 +4480,7 @@ function mc() {
4483
4480
  ) })
4484
4481
  }
4485
4482
  ),
4486
- o.map((k, C) => {
4483
+ o.map((k, F) => {
4487
4484
  let N;
4488
4485
  switch (k.id) {
4489
4486
  case "complete-the-circle":
@@ -4505,7 +4502,7 @@ function mc() {
4505
4502
  return /* @__PURE__ */ h(
4506
4503
  pe,
4507
4504
  {
4508
- show: m && M && !s && i === C,
4505
+ show: m && M && !s && i === F,
4509
4506
  appear: !0,
4510
4507
  as: "div",
4511
4508
  leave: "yvlw-transform yvlw-transition yvlw-duration-300",
@@ -4516,7 +4513,7 @@ function mc() {
4516
4513
  className: "yvlw-h-full",
4517
4514
  children: N
4518
4515
  },
4519
- `task-${C}`
4516
+ `task-${F}`
4520
4517
  );
4521
4518
  }),
4522
4519
  /* @__PURE__ */ h(
@@ -4534,8 +4531,8 @@ function mc() {
4534
4531
  $t,
4535
4532
  {
4536
4533
  Icon: Wa,
4537
- title: T ? "All Set!" : "Completed",
4538
- description: T ? "You can now close or exit the window" : "Your Identity verification has been completed successfully. Thanks for your patience",
4534
+ title: T ? "All Set!" : "Please click the button below to complete your verification",
4535
+ description: T ? "You can now close or exit the window" : "Your identity has been verified. You must click the button below to submit and finalize the process.",
4539
4536
  actionText: b !== null && b > 0 ? `Finish in (${b}s)` : "Finish",
4540
4537
  loading: _,
4541
4538
  onActionClick: j,
@@ -4602,7 +4599,7 @@ function _c(e) {
4602
4599
  sessionToken: _,
4603
4600
  forceDevUrl: y,
4604
4601
  children: /* @__PURE__ */ h(
4605
- Fa,
4602
+ Ca,
4606
4603
  {
4607
4604
  id: n,
4608
4605
  open: u === "page" ? !0 : m,
@@ -4629,7 +4626,7 @@ class wc {
4629
4626
  this.presentation = n, this.props = t, t.tasks && (this.tasks = t.tasks), n === "page" && this.start();
4630
4627
  }
4631
4628
  validateOptions() {
4632
- if (!this.tasks)
4629
+ if (!this.tasks || this.tasks.length === 0)
4633
4630
  throw new Error("Tasks cannot be empty");
4634
4631
  if (this.props.user && !this.props.user.firstName)
4635
4632
  throw new Error("First Name is required when User object is supplied");