@baas-id/react 0.3.5 → 0.3.7
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/README.md +27 -3
- package/dist/esm/baas-id-react.css +1 -1
- package/dist/esm/chunks/ContinueFlow-BzKnkzHf.js +11597 -0
- package/dist/esm/chunks/provider-DqpgUBfH.js +87 -0
- package/dist/esm/continue.js +11 -7
- package/dist/esm/index.js +156 -119
- package/dist/esm/native.js +91 -0
- package/dist/esm/preview.js +220 -181
- package/dist/types/continue.d.ts +3 -0
- package/dist/types/index.d.ts +10 -1
- package/dist/types/native.d.ts +38 -0
- package/dist/types/react/DocumentCapture.d.ts +1 -0
- package/dist/types/react/FingerCapture.d.ts +20 -0
- package/dist/types/react/capture/api.d.ts +53 -0
- package/dist/types/react/capture/camera.d.ts +1 -1
- package/dist/types/react/capture/demo.d.ts +10 -0
- package/dist/types/react/capture/index.d.ts +3 -2
- package/dist/types/react/capture/torch.d.ts +14 -0
- package/dist/types/react/chip/ChipRead.d.ts +21 -0
- package/dist/types/react/chip/capability.d.ts +11 -0
- package/dist/types/react/chip/evidence.d.ts +9 -0
- package/dist/types/react/chip/provider.d.ts +42 -0
- package/dist/types/react/chip/useChipRead.d.ts +32 -0
- package/dist/types/react/chip/webNfcPresence.d.ts +2 -0
- package/dist/types/react/document/DocumentParts.d.ts +1 -0
- package/dist/types/react/face/useFaceCapture.d.ts +6 -0
- package/dist/types/react/finger/FingerGuide.d.ts +14 -0
- package/dist/types/react/finger/detector.d.ts +39 -0
- package/dist/types/react/finger/qualityGate.d.ts +37 -0
- package/dist/types/react/finger/runFingerCapture.d.ts +77 -0
- package/dist/types/react/finger/upload.d.ts +10 -0
- package/dist/types/react/finger/useFingerCapture.d.ts +31 -0
- package/dist/types/react/flows/experience.d.ts +4 -0
- package/dist/types/react/flows/index.d.ts +1 -1
- package/dist/types/react/flows/renewal.d.ts +27 -0
- package/dist/types/react/flows/session.d.ts +5 -1
- package/dist/types/react/flows/state.d.ts +34 -2
- package/dist/types/react/flows/types.d.ts +57 -0
- package/dist/types/react/flows/useFlowSession.d.ts +12 -2
- package/dist/types/react/handoff/ContinueFlow.d.ts +6 -2
- package/dist/types/react/handoff/api.d.ts +3 -2
- package/dist/types/react/handoff/phoneLink.d.ts +2 -1
- package/dist/types/react/i18n/types.d.ts +40 -3
- package/dist/types/react/preview/FlowPreview.d.ts +1 -0
- package/dist/types/react/telemetry/bus.d.ts +1 -1
- package/dist/types/react/version.d.ts +1 -1
- package/dist/types/react/vision/resample.d.ts +7 -0
- package/package.json +6 -1
- package/dist/esm/chunks/ContinueFlow-C2PNt2ZN.js +0 -10122
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var A = Object.defineProperty;
|
|
2
|
+
var I = (r, e, t) => e in r ? A(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var C = (r, e, t) => I(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const S = ["ACCESS_DENIED", "TIMEOUT", "NFC_OFF", "NO_CHIP", "READ_FAILED"];
|
|
5
|
+
class _ extends Error {
|
|
6
|
+
constructor(t, n) {
|
|
7
|
+
super(n ?? t);
|
|
8
|
+
C(this, "code");
|
|
9
|
+
this.name = "ChipReadError", this.code = t;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const N = {
|
|
13
|
+
ACCESS_DENIED: "ACCESS_DENIED",
|
|
14
|
+
BAC_DENIED: "ACCESS_DENIED",
|
|
15
|
+
PACE_DENIED: "ACCESS_DENIED",
|
|
16
|
+
AUTH_FAILED: "ACCESS_DENIED",
|
|
17
|
+
INVALID_MRZ_KEY: "ACCESS_DENIED",
|
|
18
|
+
WRONG_MRZ: "ACCESS_DENIED",
|
|
19
|
+
SECURITY_STATUS_NOT_SATISFIED: "ACCESS_DENIED",
|
|
20
|
+
TIMEOUT: "TIMEOUT",
|
|
21
|
+
TIMED_OUT: "TIMEOUT",
|
|
22
|
+
SESSION_TIMEOUT: "TIMEOUT",
|
|
23
|
+
TAG_LOST: "TIMEOUT",
|
|
24
|
+
NFC_OFF: "NFC_OFF",
|
|
25
|
+
NFC_DISABLED: "NFC_OFF",
|
|
26
|
+
NFC_NOT_ENABLED: "NFC_OFF",
|
|
27
|
+
NO_CHIP: "NO_CHIP",
|
|
28
|
+
NOT_SUPPORTED: "NO_CHIP",
|
|
29
|
+
NO_NFC: "NO_CHIP",
|
|
30
|
+
NFC_UNSUPPORTED: "NO_CHIP",
|
|
31
|
+
TAG_NOT_SUPPORTED: "NO_CHIP",
|
|
32
|
+
READ_FAILED: "READ_FAILED"
|
|
33
|
+
};
|
|
34
|
+
function O(r) {
|
|
35
|
+
if (r instanceof _ || r?.name === "AbortError") return r;
|
|
36
|
+
const t = r?.code ?? (typeof r == "string" ? r : r?.message), n = typeof t == "string" ? t.trim().toUpperCase().replace(/[\s-]+/g, "_") : "", E = N[n] ?? (S.includes(n) ? n : "READ_FAILED");
|
|
37
|
+
return new _(E, typeof r?.message == "string" ? r.message : void 0);
|
|
38
|
+
}
|
|
39
|
+
function D(r) {
|
|
40
|
+
if (r instanceof Uint8Array) return r;
|
|
41
|
+
if (r instanceof ArrayBuffer) return new Uint8Array(r);
|
|
42
|
+
if (Array.isArray(r) && r.every((e) => typeof e == "number")) return Uint8Array.from(r);
|
|
43
|
+
if (typeof r == "string" && r)
|
|
44
|
+
try {
|
|
45
|
+
const e = atob(r.replace(/-/g, "+").replace(/_/g, "/"));
|
|
46
|
+
return Uint8Array.from(e, (t) => t.charCodeAt(0));
|
|
47
|
+
} catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
function f(r, e) {
|
|
53
|
+
return {
|
|
54
|
+
name: r,
|
|
55
|
+
async read(t) {
|
|
56
|
+
if (t.signal.aborted) throw new DOMException("aborted", "AbortError");
|
|
57
|
+
let n;
|
|
58
|
+
try {
|
|
59
|
+
n = await new Promise((a, i) => {
|
|
60
|
+
const o = () => i(new DOMException("aborted", "AbortError"));
|
|
61
|
+
t.signal.addEventListener("abort", o, { once: !0 }), e(t).then(a, i).finally(() => t.signal.removeEventListener("abort", o));
|
|
62
|
+
});
|
|
63
|
+
} catch (a) {
|
|
64
|
+
throw O(a);
|
|
65
|
+
}
|
|
66
|
+
const E = D(n?.sod), s = {};
|
|
67
|
+
for (const [a, i] of Object.entries(n?.dataGroups ?? {})) {
|
|
68
|
+
const o = D(i);
|
|
69
|
+
o && (s[a.toUpperCase()] = o);
|
|
70
|
+
}
|
|
71
|
+
if (!E || !s.DG1 || !s.DG2) throw new _("READ_FAILED", "the reader returned no SOD, DG1 or DG2");
|
|
72
|
+
const c = n.aaSignature != null ? D(n.aaSignature) : null;
|
|
73
|
+
return {
|
|
74
|
+
access: n.access === "pace" ? "pace" : "bac",
|
|
75
|
+
dataGroups: s,
|
|
76
|
+
sod: E,
|
|
77
|
+
...c ? { aaSignature: c } : {},
|
|
78
|
+
...n.timings && typeof n.timings == "object" ? { timings: n.timings } : {}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
_ as C,
|
|
85
|
+
O as a,
|
|
86
|
+
f as n
|
|
87
|
+
};
|
package/dist/esm/continue.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import "./baas-id-react.css";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as e, D as s, L as o, M as i, c as C, g as t, r as L } from "./chunks/ContinueFlow-BzKnkzHf.js";
|
|
3
|
+
import { C as p, n as E } from "./chunks/provider-DqpgUBfH.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
p as ChipReadError,
|
|
6
|
+
e as ContinueFlow,
|
|
7
|
+
s as DEFAULT_MODELS_URL,
|
|
8
|
+
o as LOCALES,
|
|
9
|
+
i as MODELS_VERSION,
|
|
10
|
+
C as chipCapability,
|
|
11
|
+
t as getStrings,
|
|
12
|
+
E as nativeChipReader,
|
|
13
|
+
L as readHandoffCode
|
|
10
14
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
import "./baas-id-react.css";
|
|
2
|
-
/* empty css
|
|
3
|
-
import { Y as D,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { Y as D, Z as S, _ as P, $ as p } from "./chunks/ContinueFlow-BzKnkzHf.js";
|
|
4
|
+
import { a0 as aa, a1 as ea, a2 as ta, C as sa, a3 as ra, a4 as na, a5 as oa, D as ia, a6 as ca, a7 as la, a8 as da, a9 as ua, aa as pa, ab as fa, ac as ha, ad as ma, ae as Ca, af as Ea, ag as ga, H as ba, L as Ma, M as _a, ah as Aa, ai as Na, aj as Sa, ak as Oa, al as Ra, am as Fa, an as va, ao as La, c as ya, ap as wa, aq as Ta, ar as xa, as as Ia, at as Da, au as Pa, av as Ya, aw as ka, ax as Xa, ay as Ga, az as Ha, aA as Ua, aB as Wa, aC as Va, A as Ba, aD as Qa, aE as $a, f as ja, g as za, aF as qa, aG as Ka, aH as Za, aI as Ja, aJ as ae, aK as ee, aL as te, aM as se, aN as re, aO as ne, aP as oe, aQ as ie, aR as ce, aS as le, r as de, aT as ue, aU as pe, aV as fe, aW as he, aX as me, aY as Ce, aZ as Ee, a_ as ge, a$ as be, b0 as Me, b1 as _e, b2 as Ae, b3 as Ne, b4 as Se, b5 as Oe, b6 as Re, b7 as Fe, b8 as ve, b9 as Le } from "./chunks/ContinueFlow-BzKnkzHf.js";
|
|
5
|
+
import { C as we, n as Te, a as xe } from "./chunks/provider-DqpgUBfH.js";
|
|
6
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
6
7
|
function V({
|
|
7
8
|
direction: a,
|
|
8
|
-
progress:
|
|
9
|
-
wrongWay:
|
|
10
|
-
confidence:
|
|
11
|
-
strings:
|
|
9
|
+
progress: s,
|
|
10
|
+
wrongWay: t,
|
|
11
|
+
confidence: o = 1,
|
|
12
|
+
strings: r
|
|
12
13
|
}) {
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */ e("span", { className: "rpid-turn-arrows", "aria-hidden": "true", children: [0, 1, 2].map((
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */ e("span", { className: "rpid-turn-label", children:
|
|
18
|
-
/* @__PURE__ */
|
|
14
|
+
const i = Math.round(Math.min(1, Math.max(0, s)) * 100), l = o < S, h = l ? "unreadable" : t ? "wrong" : i >= 100 ? "pass" : "active", m = l ? r.guide.turn_hold_steady : i >= 100 ? r.guide.turn_complete : i >= 65 ? r.guide.turn_almost : i >= 25 ? r.guide.turn_going_well : a === "left" ? r.turn.turningLeft : r.turn.turningRight;
|
|
15
|
+
return /* @__PURE__ */ c("div", { className: "rpid-turn", "data-dir": a, "data-state": h, children: [
|
|
16
|
+
/* @__PURE__ */ e("span", { className: "rpid-turn-arrows", "aria-hidden": "true", children: [0, 1, 2].map((d) => /* @__PURE__ */ e(Y, { direction: a, lit: i > d * 30, delay: d * 90 }, d)) }),
|
|
17
|
+
/* @__PURE__ */ c("div", { className: "rpid-turn-body", children: [
|
|
18
|
+
/* @__PURE__ */ e("span", { className: "rpid-turn-label", children: t && !l ? a === "left" ? r.turn.towardLeft : r.turn.towardRight : m }),
|
|
19
|
+
/* @__PURE__ */ c(
|
|
19
20
|
"div",
|
|
20
21
|
{
|
|
21
22
|
className: "rpid-turn-track",
|
|
22
23
|
role: "progressbar",
|
|
23
24
|
"aria-valuemin": 0,
|
|
24
25
|
"aria-valuemax": 100,
|
|
25
|
-
"aria-valuenow":
|
|
26
|
-
"aria-label":
|
|
26
|
+
"aria-valuenow": i,
|
|
27
|
+
"aria-label": r.turn.progressAria,
|
|
27
28
|
children: [
|
|
28
|
-
/* @__PURE__ */ e("i", { style: { width: `${
|
|
29
|
+
/* @__PURE__ */ e("i", { style: { width: `${i}%` } }),
|
|
29
30
|
/* @__PURE__ */ e("span", { className: "rpid-turn-mark", style: { left: "25%" } }),
|
|
30
31
|
/* @__PURE__ */ e("span", { className: "rpid-turn-mark", style: { left: "65%" } })
|
|
31
32
|
]
|
|
32
33
|
}
|
|
33
34
|
)
|
|
34
35
|
] }),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
36
|
+
/* @__PURE__ */ c("span", { className: "rpid-turn-pct rpid-num", children: [
|
|
37
|
+
i,
|
|
37
38
|
"%"
|
|
38
39
|
] })
|
|
39
40
|
] });
|
|
40
41
|
}
|
|
41
42
|
function Y({
|
|
42
43
|
direction: a,
|
|
43
|
-
lit:
|
|
44
|
-
delay:
|
|
44
|
+
lit: s,
|
|
45
|
+
delay: t
|
|
45
46
|
}) {
|
|
46
47
|
return /* @__PURE__ */ e(
|
|
47
48
|
"svg",
|
|
@@ -54,147 +55,183 @@ function Y({
|
|
|
54
55
|
strokeWidth: "2.4",
|
|
55
56
|
strokeLinecap: "round",
|
|
56
57
|
strokeLinejoin: "round",
|
|
57
|
-
className: `rpid-chevron${
|
|
58
|
-
style: { animationDelay: `${
|
|
58
|
+
className: `rpid-chevron${s ? " lit" : ""}`,
|
|
59
|
+
style: { animationDelay: `${t}ms` },
|
|
59
60
|
"aria-hidden": "true",
|
|
60
61
|
children: /* @__PURE__ */ e("path", { d: a === "left" ? "M15 5 8 12l7 7" : "M9 5l7 7-7 7" })
|
|
61
62
|
}
|
|
62
63
|
);
|
|
63
64
|
}
|
|
64
|
-
function B(a,
|
|
65
|
-
const
|
|
65
|
+
function B(a, s) {
|
|
66
|
+
const t = s === P ? a : -a;
|
|
66
67
|
return {
|
|
67
|
-
progress: Math.min(1, Math.max(0,
|
|
68
|
-
wrongWay:
|
|
68
|
+
progress: Math.min(1, Math.max(0, t / D)),
|
|
69
|
+
wrongWay: t < -0.12
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
72
|
function Q({
|
|
72
73
|
yaw: a,
|
|
73
|
-
target:
|
|
74
|
-
reached:
|
|
75
|
-
confidence:
|
|
74
|
+
target: s,
|
|
75
|
+
reached: t,
|
|
76
|
+
confidence: o = 1
|
|
76
77
|
}) {
|
|
77
|
-
const f = Math.max(-1.35, Math.min(1.35, a / (
|
|
78
|
+
const f = Math.max(-1.35, Math.min(1.35, a / (s || 0.42))) * 66 * 1, C = o < S, E = [];
|
|
78
79
|
for (let n = -78; n <= 78; n += 6) {
|
|
79
|
-
const
|
|
80
|
-
|
|
80
|
+
const g = n * Math.PI / 180, b = Math.sin(g), M = Math.cos(g), _ = 1, A = n === 0 ? 1.13 : 1.08, L = 50 + 44 * _ * b, y = 60 - 56 * _ * M, w = 50 + 44 * A * b, T = 60 - 56 * A * M, N = n === 0 || Math.sign(n) === Math.sign(f) && Math.abs(n) <= Math.abs(f), x = Math.abs(Math.abs(n) - 66) < 6 / 2, I = t && N ? "done" : N ? "lit" : x ? "goal" : "idle";
|
|
81
|
+
E.push(
|
|
81
82
|
/* @__PURE__ */ e(
|
|
82
83
|
"line",
|
|
83
84
|
{
|
|
84
|
-
x1:
|
|
85
|
-
y1:
|
|
86
|
-
x2:
|
|
87
|
-
y2:
|
|
85
|
+
x1: L,
|
|
86
|
+
y1: y,
|
|
87
|
+
x2: w,
|
|
88
|
+
y2: T,
|
|
88
89
|
className: "rpid-dial-tick",
|
|
89
|
-
"data-state":
|
|
90
|
+
"data-state": I,
|
|
90
91
|
"data-axis": n === 0 ? "center" : void 0
|
|
91
92
|
},
|
|
92
93
|
n
|
|
93
94
|
)
|
|
94
95
|
);
|
|
95
96
|
}
|
|
96
|
-
const
|
|
97
|
-
return /* @__PURE__ */
|
|
97
|
+
const u = f * Math.PI / 180, O = 50 + 44 * 0.99 * Math.sin(u), R = 60 - 56 * 0.99 * Math.cos(u), F = 50 + 44 * 1.17 * Math.sin(u), v = 60 - 56 * 1.17 * Math.cos(u);
|
|
98
|
+
return /* @__PURE__ */ c(
|
|
98
99
|
"svg",
|
|
99
100
|
{
|
|
100
101
|
className: "rpid-dial",
|
|
101
102
|
viewBox: "0 0 100 125",
|
|
102
103
|
"aria-hidden": "true",
|
|
103
|
-
"data-state":
|
|
104
|
+
"data-state": C ? "unreadable" : t ? "done" : "active",
|
|
104
105
|
children: [
|
|
105
|
-
|
|
106
|
-
!
|
|
106
|
+
E,
|
|
107
|
+
!C && /* @__PURE__ */ e("line", { x1: O, y1: R, x2: F, y2: v, className: "rpid-dial-cursor" })
|
|
107
108
|
]
|
|
108
109
|
}
|
|
109
110
|
);
|
|
110
111
|
}
|
|
112
|
+
function $(a) {
|
|
113
|
+
return /* @__PURE__ */ e(p, { ...a, purpose: "enrollment" });
|
|
114
|
+
}
|
|
111
115
|
function j(a) {
|
|
112
|
-
return /* @__PURE__ */ e(
|
|
116
|
+
return /* @__PURE__ */ e(p, { ...a, purpose: "signin" });
|
|
113
117
|
}
|
|
114
|
-
function
|
|
115
|
-
return /* @__PURE__ */ e(
|
|
118
|
+
function z(a) {
|
|
119
|
+
return /* @__PURE__ */ e(p, { ...a, purpose: "reverification" });
|
|
116
120
|
}
|
|
117
121
|
function q(a) {
|
|
118
|
-
return /* @__PURE__ */ e(
|
|
122
|
+
return /* @__PURE__ */ e(p, { ...a, purpose: "identify" });
|
|
119
123
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
124
|
+
async function K(a, s) {
|
|
125
|
+
try {
|
|
126
|
+
const t = globalThis.NDEFReader;
|
|
127
|
+
if (!t || a.aborted) return !1;
|
|
128
|
+
const o = new t();
|
|
129
|
+
return o.onreadingerror = () => {
|
|
130
|
+
a.aborted || s("tag_suspected");
|
|
131
|
+
}, o.onreading = () => {
|
|
132
|
+
a.aborted || s("ndef_tag");
|
|
133
|
+
}, a.addEventListener("abort", () => {
|
|
134
|
+
o.onreading = null, o.onreadingerror = null;
|
|
135
|
+
}, { once: !0 }), await o.scan({ signal: a }), !0;
|
|
136
|
+
} catch {
|
|
137
|
+
return !1;
|
|
138
|
+
}
|
|
122
139
|
}
|
|
123
140
|
export {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
oa as
|
|
132
|
-
ia as
|
|
133
|
-
ca as
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
ua as
|
|
138
|
-
pa as
|
|
139
|
-
fa as
|
|
140
|
-
ha as
|
|
141
|
-
ma as
|
|
142
|
-
|
|
141
|
+
aa as CENTER_MIN,
|
|
142
|
+
ea as CONTAIN_MIN,
|
|
143
|
+
ta as ChipRead,
|
|
144
|
+
we as ChipReadError,
|
|
145
|
+
sa as ContinueFlow,
|
|
146
|
+
ra as ContinueOnPhone,
|
|
147
|
+
na as DEFAULT_DETECTOR,
|
|
148
|
+
oa as DEFAULT_LOCALE,
|
|
149
|
+
ia as DEFAULT_MODELS_URL,
|
|
150
|
+
ca as DocumentCapture,
|
|
151
|
+
la as ES_FORMAL,
|
|
152
|
+
da as EngineLoading,
|
|
153
|
+
$ as EnrollmentFlow,
|
|
154
|
+
ua as FACE_W_COMFORT_MAX,
|
|
155
|
+
pa as FACE_W_COMFORT_MIN,
|
|
156
|
+
fa as FACE_W_MAX,
|
|
157
|
+
ha as FACE_W_MIN,
|
|
158
|
+
ma as FINGER_FLOORS,
|
|
159
|
+
Ca as FaceCapture,
|
|
160
|
+
Ea as FingerCapture,
|
|
161
|
+
ga as HandoffPanel,
|
|
162
|
+
ba as HandoffView,
|
|
163
|
+
q as IdentifyFlow,
|
|
143
164
|
Ma as LOCALES,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
165
|
+
_a as MODELS_VERSION,
|
|
166
|
+
Aa as ProcessingOverlay,
|
|
167
|
+
Na as ProximityMeter,
|
|
168
|
+
z as ReverificationFlow,
|
|
169
|
+
Sa as SDK_VERSION,
|
|
170
|
+
Oa as SELFIE_QUALITY_DEFAULTS,
|
|
171
|
+
j as SignInFlow,
|
|
151
172
|
V as TurnGauge,
|
|
152
173
|
D as YAW_TARGET,
|
|
153
174
|
Q as YawDial,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
175
|
+
Ra as browserLocale,
|
|
176
|
+
Fa as captureNonceOf,
|
|
177
|
+
va as centerBlocker,
|
|
157
178
|
La as centeringFrom,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
179
|
+
ya as chipCapability,
|
|
180
|
+
wa as claimHandoff,
|
|
181
|
+
Ta as collectSnapshot,
|
|
182
|
+
xa as cornerRadius,
|
|
183
|
+
Ia as createHandoff,
|
|
184
|
+
Da as cropQuality,
|
|
185
|
+
Pa as detectDevice,
|
|
186
|
+
Ya as distanceHintOf,
|
|
187
|
+
ka as distanceTrackPos,
|
|
188
|
+
Xa as encodeQr,
|
|
189
|
+
Ga as faceCropStats,
|
|
190
|
+
Ha as faceWidthOf,
|
|
191
|
+
Ua as finalizeSession,
|
|
192
|
+
Wa as fingerGate,
|
|
193
|
+
Va as fingerGroups,
|
|
194
|
+
Ba as fingerSlots,
|
|
195
|
+
Qa as fingertipStats,
|
|
196
|
+
$a as floorsFrom,
|
|
197
|
+
ja as formalityOverrides,
|
|
198
|
+
za as getStrings,
|
|
199
|
+
qa as gridPeriodicity,
|
|
200
|
+
Ka as handoffStatus,
|
|
201
|
+
Za as inAppBrowser,
|
|
202
|
+
Ja as loadDocumentEngine,
|
|
203
|
+
ae as loadFaceEngine,
|
|
204
|
+
ee as modelsUrlOf,
|
|
205
|
+
te as nativeAttestation,
|
|
206
|
+
Te as nativeChipReader,
|
|
207
|
+
xe as normalizeChipError,
|
|
208
|
+
se as normalizeSession,
|
|
209
|
+
re as parseUserAgent,
|
|
210
|
+
ne as peekHandoff,
|
|
211
|
+
oe as preload,
|
|
212
|
+
ie as probeDocument,
|
|
213
|
+
ce as proximityOf,
|
|
214
|
+
le as qrPath,
|
|
215
|
+
de as readHandoffCode,
|
|
216
|
+
ue as reasonEntry,
|
|
217
|
+
pe as reportChipUnavailable,
|
|
218
|
+
fe as reportClient,
|
|
219
|
+
he as requestHash,
|
|
220
|
+
me as resolveLocale,
|
|
221
|
+
Ce as revokeHandoff,
|
|
222
|
+
Ee as selfieQualityIssue,
|
|
223
|
+
ge as setTorch,
|
|
224
|
+
be as sideOutcomeOf,
|
|
225
|
+
Me as silhouetteDetector,
|
|
226
|
+
_e as specularSignature,
|
|
227
|
+
Ae as subscribeClient,
|
|
228
|
+
Ne as torchSupported,
|
|
197
229
|
B as turnGaugeFrom,
|
|
198
|
-
|
|
199
|
-
|
|
230
|
+
Se as unavailableReason,
|
|
231
|
+
Oe as uploadCapture,
|
|
232
|
+
Re as uploadChip,
|
|
233
|
+
Fe as uploadFinger,
|
|
234
|
+
K as watchChipPresence,
|
|
235
|
+
ve as webAttestation,
|
|
236
|
+
Le as webNfcAvailable
|
|
200
237
|
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { C as f } from "./chunks/provider-DqpgUBfH.js";
|
|
2
|
+
const b = {
|
|
3
|
+
ACCESS_DENIED: "ACCESS_DENIED",
|
|
4
|
+
TIMEOUT: "TIMEOUT",
|
|
5
|
+
NFC_OFF: "NFC_OFF",
|
|
6
|
+
NO_NFC: "NFC_OFF",
|
|
7
|
+
NO_CHIP: "NO_CHIP"
|
|
8
|
+
};
|
|
9
|
+
function C(r) {
|
|
10
|
+
if (r instanceof f) return r;
|
|
11
|
+
const n = r?.code, t = typeof n == "string" ? n.trim().toUpperCase() : "", e = r?.message;
|
|
12
|
+
return new f(b[t] ?? "READ_FAILED", typeof e == "string" && e ? e : void 0);
|
|
13
|
+
}
|
|
14
|
+
function d(r) {
|
|
15
|
+
if (typeof r != "string" || !r) return null;
|
|
16
|
+
try {
|
|
17
|
+
const n = atob(r.replace(/\s+/g, "").replace(/-/g, "+").replace(/_/g, "/"));
|
|
18
|
+
return Uint8Array.from(n, (t) => t.charCodeAt(0));
|
|
19
|
+
} catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const g = () => new DOMException("aborted", "AbortError");
|
|
24
|
+
function y(r, n, t = {}) {
|
|
25
|
+
return {
|
|
26
|
+
name: n,
|
|
27
|
+
async read(e) {
|
|
28
|
+
const { signal: i } = e;
|
|
29
|
+
if (i.aborted) throw g();
|
|
30
|
+
let l = null;
|
|
31
|
+
if (e.onProgress) {
|
|
32
|
+
const a = e.onProgress;
|
|
33
|
+
try {
|
|
34
|
+
l = await r.addListener("progress", (s) => {
|
|
35
|
+
i.aborted || a(s);
|
|
36
|
+
});
|
|
37
|
+
} catch {
|
|
38
|
+
l = null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const E = {
|
|
42
|
+
dataGroups: [...e.dataGroups],
|
|
43
|
+
...e.mrz ? { mrz: { documentNumber: e.mrz.documentNumber, birthDate: e.mrz.birthDate, expiryDate: e.mrz.expiryDate } } : {},
|
|
44
|
+
...e.can ? { can: e.can } : {},
|
|
45
|
+
...e.aaChallenge ? { aaChallenge: e.aaChallenge } : {},
|
|
46
|
+
...t.timeoutMs != null ? { timeoutMs: t.timeoutMs } : {},
|
|
47
|
+
...t.sessionMessage ? { sessionMessage: t.sessionMessage } : {},
|
|
48
|
+
...t.chipAuthentication != null ? { chipAuthentication: t.chipAuthentication } : {},
|
|
49
|
+
...t.preferPace != null ? { preferPace: t.preferPace } : {}
|
|
50
|
+
};
|
|
51
|
+
let o;
|
|
52
|
+
try {
|
|
53
|
+
o = await new Promise((a, s) => {
|
|
54
|
+
const c = () => {
|
|
55
|
+
r.cancel().catch(() => {
|
|
56
|
+
}), s(g());
|
|
57
|
+
};
|
|
58
|
+
if (i.aborted) return c();
|
|
59
|
+
i.addEventListener("abort", c, { once: !0 }), r.readDocument(E).then(a, s).finally(() => i.removeEventListener("abort", c));
|
|
60
|
+
});
|
|
61
|
+
} catch (a) {
|
|
62
|
+
throw a?.name === "AbortError" ? a : C(a);
|
|
63
|
+
} finally {
|
|
64
|
+
if (l)
|
|
65
|
+
try {
|
|
66
|
+
await l.remove();
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const h = d(o?.sod), m = {};
|
|
71
|
+
for (const [a, s] of Object.entries(o?.dataGroups ?? {})) {
|
|
72
|
+
const c = d(s);
|
|
73
|
+
c && (m[a.toUpperCase()] = c);
|
|
74
|
+
}
|
|
75
|
+
if (!h || !m.DG1 || !m.DG2) throw new f("READ_FAILED", "the reader returned no SOD, DG1 or DG2");
|
|
76
|
+
const u = d(o.aaSignature);
|
|
77
|
+
return {
|
|
78
|
+
access: o.access === "pace" ? "pace" : "bac",
|
|
79
|
+
dataGroups: m,
|
|
80
|
+
sod: h,
|
|
81
|
+
...u ? { aaSignature: u } : {},
|
|
82
|
+
...o.timings && typeof o.timings == "object" ? { timings: { ...o.timings } } : {}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
f as ChipReadError,
|
|
89
|
+
y as capacitorChipReader,
|
|
90
|
+
C as chipErrorFromPlugin
|
|
91
|
+
};
|