@exige/web-scanner-sdk 0.2.39 → 0.2.40

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/react.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { B as e, E as t, G as n, J as r, M as i, R as a, T as o, U as s, Y as c, Z as l, a as u, b as d, m as f, o as p, p as ee, q as te, r as m, s as ne, z as re } from "./driver-license-BmeEh0a_.js";
3
- import { createContext as ie, useCallback as h, useContext as ae, useEffect as g, useLayoutEffect as oe, useMemo as se, useRef as _, useState as v } from "react";
4
- import { Fragment as ce, jsx as y, jsxs as b } from "react/jsx-runtime";
2
+ import { H as e, J as t, K as n, L as r, R as i, T as a, W as o, X as s, a as c, f as l, j as u, o as d, p as f, q as p, r as m, w as ee, y as h, z as te } from "./driver-license-BV2-PjpZ.js";
3
+ import { createContext as g, useCallback as _, useContext as ne, useEffect as v, useLayoutEffect as re, useMemo as ie, useRef as y, useState as b } from "react";
4
+ import { Fragment as ae, jsx as x, jsxs as S } from "react/jsx-runtime";
5
5
  //#region src/sdk/display-quad.ts
6
- function x(e) {
6
+ function C(e) {
7
7
  return [
8
8
  e.topLeft,
9
9
  e.topRight,
@@ -11,7 +11,7 @@ function x(e) {
11
11
  e.bottomLeft
12
12
  ];
13
13
  }
14
- function S(e) {
14
+ function w(e) {
15
15
  let [t, n, r, i] = e;
16
16
  return {
17
17
  topLeft: t,
@@ -38,10 +38,10 @@ function S(e) {
38
38
  }
39
39
  };
40
40
  }
41
- function C(e) {
42
- return S(x(e).map((e) => ({ ...e })));
41
+ function T(e) {
42
+ return w(C(e).map((e) => ({ ...e })));
43
43
  }
44
- var le = class {
44
+ var oe = class {
45
45
  current;
46
46
  target;
47
47
  response;
@@ -50,11 +50,11 @@ var le = class {
50
50
  this.response = e.response ?? 14, this.snapDistance = e.snapDistance ?? .1;
51
51
  }
52
52
  setTarget(e, t, n) {
53
- let r = Math.max(1, Math.hypot(t, n)), i = !this.current || x(e).some((e, t) => {
54
- let n = x(this.current)[t];
53
+ let r = Math.max(1, Math.hypot(t, n)), i = !this.current || C(e).some((e, t) => {
54
+ let n = C(this.current)[t];
55
55
  return Math.hypot(e.x - n.x, e.y - n.y) / r > this.snapDistance;
56
56
  });
57
- return this.target = C(e), i && (this.current = C(e)), {
57
+ return this.target = T(e), i && (this.current = T(e)), {
58
58
  quad: this.current,
59
59
  snapped: i
60
60
  };
@@ -62,8 +62,8 @@ var le = class {
62
62
  step(e) {
63
63
  if (!this.current || !this.target) return this.current;
64
64
  let t = 1 - Math.exp(-this.response * Math.max(0, e) / 1e3);
65
- return this.current = S(x(this.current).map((e, n) => {
66
- let r = x(this.target)[n];
65
+ return this.current = w(C(this.current).map((e, n) => {
66
+ let r = C(this.target)[n];
67
67
  return {
68
68
  x: e.x + (r.x - e.x) * t,
69
69
  y: e.y + (r.y - e.y) * t
@@ -76,13 +76,13 @@ var le = class {
76
76
  getCurrent() {
77
77
  return this.current;
78
78
  }
79
- }, ue = ie(null);
79
+ }, se = g(null);
80
80
  //#endregion
81
81
  //#region src/react/context.tsx
82
- function de(e) {
82
+ function ce(e) {
83
83
  e?.startsWith("blob:") && URL.revokeObjectURL(e);
84
84
  }
85
- function fe() {
85
+ function le() {
86
86
  return new Promise((e) => {
87
87
  if (typeof requestAnimationFrame == "function") {
88
88
  requestAnimationFrame(() => requestAnimationFrame(() => e()));
@@ -91,7 +91,7 @@ function fe() {
91
91
  setTimeout(e, 0);
92
92
  });
93
93
  }
94
- function pe(e) {
94
+ function ue(e) {
95
95
  try {
96
96
  let t = e.toDataURL("image/jpeg", .92);
97
97
  return t.startsWith("data:image/") ? t : void 0;
@@ -99,84 +99,96 @@ function pe(e) {
99
99
  return;
100
100
  }
101
101
  }
102
- function me(e, t) {
102
+ function de(e, t) {
103
103
  if (typeof e == "function") return e(t);
104
104
  }
105
- function he({ open: d, useCase: m = "document", autoCapture: ie = "defaultOn", captureMode: ae = "auto", torch: ce = "defaultOff", onCapture: b, onDriverLicense: x, onCancel: S, onError: C, onSettings: he, onFinderStatus: ge, modelUrl: w, ortWasmPaths: T, detectionIntervalMs: _e, apiRef: E, children: ve }) {
106
- let D = r(ae), O = _(void 0), k = _(void 0), ye = _(void 0), A = _(void 0), j = _({}), M = _(new le()), N = _(!1), be = _(!1), P = _({
107
- onCapture: b,
108
- onDriverLicense: x,
109
- onCancel: S,
110
- onError: C,
111
- onSettings: he,
112
- onFinderStatus: ge,
113
- useCase: m
114
- }), xe = _(void 0), Se = _(void 0), F = _(async () => void 0), I = _(!1), L = _(void 0), R = _(void 0), Ce = _(null), [z, we] = v(null), [Te, B] = v(D && d ? "capturing" : D ? "ready" : "starting"), [V, H] = v(), [Ee, U] = v(), [De, W] = v(), [Oe, ke] = v({
105
+ function fe({ open: m, useCase: h = "document", autoCapture: g = "defaultOn", captureMode: ne = "auto", torch: ae = "defaultOff", onCapture: S, onDriverLicense: C, onCancel: w, onError: T, onSettings: fe, onFinderStatus: pe, modelUrl: E, ortWasmPaths: D, detectionIntervalMs: me, apiRef: he, children: ge }) {
106
+ let O = p(ne), k = y(void 0), A = y(void 0), j = y(void 0), M = y(void 0), N = y({}), P = y(new oe()), F = y(!1), _e = y(!1), I = y({
107
+ onCapture: S,
108
+ onDriverLicense: C,
109
+ onCancel: w,
110
+ onError: T,
111
+ onSettings: fe,
112
+ onFinderStatus: pe,
113
+ useCase: h
114
+ }), ve = y(void 0), ye = y(void 0), L = y(async () => void 0), R = y(!1), be = y(void 0), xe = y(void 0), Se = _((e) => {
115
+ let t = xe.current;
116
+ xe.current = void 0, t?.reject(e ?? new DOMException("The license flip was cancelled.", "AbortError"));
117
+ }, []), Ce = _(() => {
118
+ let e = xe.current;
119
+ e && (xe.current = void 0, e.resolve());
120
+ }, []), we = _(() => (Se(), new Promise((e, t) => {
121
+ xe.current = {
122
+ resolve: e,
123
+ reject: t
124
+ };
125
+ })), [Se]), Te = y(null), [z, Ee] = b(null), [De, B] = b(O && m ? "capturing" : O ? "ready" : "starting"), [V, H] = b(), [Oe, U] = b(), [ke, W] = b(), [Ae, je] = b({
115
126
  width: 1,
116
127
  height: 1
117
- }), [Ae, je] = v(), [Me, G] = v(), [Ne, K] = v(""), [Pe, Fe] = v(0), [Ie, q] = v(), [Le, J] = v(), [Re, ze] = v("idle"), [Be, Ve] = v(), He = _(void 0), [Ue, We] = v("front"), Y = _("front"), [Ge, Ke] = v(!1), [qe, Je] = v({
128
+ }), [Me, Ne] = b(), [Pe, G] = b(), [Fe, K] = b(""), [Ie, Le] = b(0), [Re, q] = b(), [ze, J] = b(), [Be, Ve] = b("idle"), [He, Ue] = b(), We = y(void 0), [Ge, Ke] = b("front"), Y = y("front"), [qe, Je] = b(!1), [Ye, Xe] = b({
118
129
  downloading: !1,
119
130
  loaded: 0,
120
131
  total: null
121
- }), X = h(() => {
122
- de(He.current), He.current = void 0, Ve(void 0);
123
- }, []), Z = h((e, t) => {
124
- let n = pe(e);
125
- de(He.current), He.current = n, Ve(n), t?.pause();
126
- }, []), Q = h(async (e, t) => {
132
+ }), X = _(() => {
133
+ ce(We.current), We.current = void 0, Ue(void 0);
134
+ }, []), Z = _((e, t) => {
135
+ let n = ue(e);
136
+ ce(We.current), We.current = n, Ue(n), t?.pause();
137
+ }, []), Q = _(async (e, t) => {
127
138
  t && (W({
128
139
  width: e.width,
129
140
  height: e.height
130
- }), U(t), await fe(), await new Promise((e) => {
141
+ }), U(t), await le(), await new Promise((e) => {
131
142
  window.setTimeout(e, 280);
132
143
  }));
133
144
  }, []);
134
- oe(() => {
135
- P.current = {
136
- onCapture: b,
137
- onDriverLicense: x,
138
- onCancel: S,
139
- onError: C,
140
- onSettings: he,
141
- onFinderStatus: ge,
142
- useCase: m
145
+ re(() => {
146
+ I.current = {
147
+ onCapture: S,
148
+ onDriverLicense: C,
149
+ onCancel: w,
150
+ onError: T,
151
+ onSettings: fe,
152
+ onFinderStatus: pe,
153
+ useCase: h
143
154
  };
144
155
  }, [
145
- b,
146
- x,
147
156
  S,
148
157
  C,
149
- he,
150
- ge,
151
- m
152
- ]), g(() => l(Je), []), g(() => {
153
- if (!d || m !== "drivers-license") {
154
- R.current?.abort(), R.current = void 0, Se.current = void 0, xe.current = void 0, I.current = !1, Y.current = "front", We("front"), Ke(!1);
158
+ w,
159
+ T,
160
+ fe,
161
+ pe,
162
+ h
163
+ ]), v(() => s(Xe), []), v(() => {
164
+ if (!m || h !== "drivers-license") {
165
+ Se(), ye.current = void 0, ve.current = void 0, R.current = !1, Y.current = "front", Ke("front"), Je(!1);
155
166
  return;
156
167
  }
157
- let e = u({ scan: {
158
- modelUrl: w,
159
- ortWasmPaths: T
168
+ let e = c({ scan: {
169
+ modelUrl: E,
170
+ ortWasmPaths: D
160
171
  } });
161
- return Se.current = e, e.then((e) => {
162
- xe.current = e;
172
+ return ye.current = e, e.then((e) => {
173
+ ve.current = e;
163
174
  }), () => {
164
- R.current?.abort(), R.current = void 0, e.then((e) => e.cancel()), xe.current &&= void 0, Se.current = void 0;
175
+ Se(), e.then((e) => e.cancel()), ve.current &&= void 0, ye.current = void 0;
165
176
  };
166
177
  }, [
167
- d,
168
178
  m,
169
- w,
170
- T
179
+ h,
180
+ E,
181
+ D,
182
+ Se
171
183
  ]);
172
- let Ye = h((e) => {
173
- we(e);
184
+ let Ze = _((e) => {
185
+ Ee(e);
174
186
  }, []);
175
- g(() => {
176
- if (!d || !z) return;
187
+ v(() => {
188
+ if (!m || !z) return;
177
189
  let e = () => {
178
190
  let e = z.getBoundingClientRect();
179
- ke({
191
+ je({
180
192
  width: e.width,
181
193
  height: e.height
182
194
  });
@@ -184,307 +196,305 @@ function he({ open: d, useCase: m = "document", autoCapture: ie = "defaultOn", c
184
196
  if (e(), typeof ResizeObserver > "u") return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
185
197
  let t = new ResizeObserver(e);
186
198
  return t.observe(z), () => t.disconnect();
187
- }, [d, z]), g(() => {
188
- if (!d) return;
199
+ }, [m, z]), v(() => {
200
+ if (!m) return;
189
201
  let e = window.setInterval(() => {
190
- let e = O.current?.getDiagnostics();
202
+ let e = k.current?.getDiagnostics();
191
203
  e && q(e);
192
204
  }, 500);
193
205
  return () => window.clearInterval(e);
194
- }, [d, Pe]), g(() => {
195
- if (!d) return;
206
+ }, [m, Ie]), v(() => {
207
+ if (!m) return;
196
208
  let e = 0, t = performance.now(), n = (r) => {
197
- let i = M.current.step(r - t);
209
+ let i = P.current.step(r - t);
198
210
  t = r, i && U(i), e = requestAnimationFrame(n);
199
211
  };
200
212
  return e = requestAnimationFrame(n), () => cancelAnimationFrame(e);
201
- }, [d]), g(() => {
202
- if (!d || D || !z) return;
203
- let e = !1, n = new AbortController();
204
- L.current = n;
205
- let r = () => {
206
- n.abort(), L.current === n && (L.current = void 0), k.current?.stop(), k.current = void 0, O.current?.stop(), O.current = void 0, A.current = void 0, ye.current = void 0, j.current = {}, X();
213
+ }, [m]), v(() => {
214
+ if (!m || O || !z) return;
215
+ let e = !1, i = new AbortController();
216
+ be.current = i;
217
+ let o = () => {
218
+ i.abort(), be.current === i && (be.current = void 0), A.current?.stop(), A.current = void 0, k.current?.stop(), k.current = void 0, M.current = void 0, j.current = void 0, N.current = {}, X();
207
219
  };
208
220
  return (async () => {
209
- r(), n = new AbortController(), L.current = n, N.current = !1, B("starting"), K(""), H(void 0), G(void 0), J(void 0), ze("idle"), X();
221
+ o(), i = new AbortController(), be.current = i, F.current = !1, B("starting"), K(""), H(void 0), G(void 0), J(void 0), Ve("idle"), X();
210
222
  try {
211
- let r = await c(z, { torch: ce });
223
+ let o = await t(z, { torch: ae });
212
224
  if (e) {
213
- r.stop();
225
+ o.stop();
214
226
  return;
215
227
  }
216
- O.current = r;
217
- let i = r.getSettings();
218
- if (je(i), P.current.onSettings?.(i), console.info("[ScannerProvider] camera settings", i), P.current.useCase === "drivers-license" && Y.current === "back") {
219
- H(void 0), U(void 0), W(void 0), M.current.clear(), B("ready"), (async () => {
228
+ k.current = o;
229
+ let s = o.getSettings();
230
+ if (Ne(s), I.current.onSettings?.(s), console.info("[ScannerProvider] camera settings", s), I.current.useCase === "drivers-license" && Y.current === "back") {
231
+ H(void 0), U(void 0), W(void 0), P.current.clear(), B("ready"), (async () => {
220
232
  try {
221
- let t = 0, i = await p(async () => {
233
+ let t = 0, a = await d(async () => {
222
234
  t += 1;
223
- let e = a();
224
- if (t % 4 == 0 && te(e, "ImageCapture" in globalThis)) try {
225
- let e = await r.capturePhoto();
235
+ let e = r();
236
+ if (t % 4 == 0 && n(e, "ImageCapture" in globalThis)) try {
237
+ let e = await o.capturePhoto();
226
238
  if (e.frame && e.luminance > 10) return e.frame;
227
239
  } catch {}
228
240
  try {
229
- return await r.captureLiveFrame(ee);
241
+ return await o.captureLiveFrame(l);
230
242
  } catch {
231
243
  return;
232
244
  }
233
245
  }, {
234
- intervalMs: _e ?? 140,
235
- signal: n.signal
246
+ intervalMs: me ?? 140,
247
+ signal: i.signal
236
248
  });
237
- if (e || n.signal.aborted || I.current || (I.current = !0, Z(i.frame, z), G("live-mirror"), B("captured"), await Q(i.frame, i.quad), e || n.signal.aborted)) return;
238
- await F.current({
239
- frame: i.frame,
249
+ if (e || i.signal.aborted || R.current || (R.current = !0, Z(a.frame, z), G("live-mirror"), B("captured"), await Q(a.frame, a.quad), e || i.signal.aborted)) return;
250
+ await L.current({
251
+ frame: a.frame,
240
252
  reason: "auto",
241
253
  method: "live-mirror",
242
- settings: r.getSettings()
254
+ settings: o.getSettings()
243
255
  });
244
256
  } catch (t) {
245
- if (e || n.signal.aborted || t instanceof DOMException && t.name === "AbortError") return;
246
- let r = t instanceof Error ? t : /* @__PURE__ */ Error("Could not read the barcode.");
247
- N.current = !0, K(r.message), B("error"), P.current.onError?.(r);
257
+ if (e || i.signal.aborted || t instanceof DOMException && t.name === "AbortError") return;
258
+ let n = t instanceof Error ? t : /* @__PURE__ */ Error("Could not read the barcode.");
259
+ F.current = !0, K(n.message), B("error"), I.current.onError?.(n);
248
260
  }
249
261
  })();
250
262
  return;
251
263
  }
252
- k.current = await t({
264
+ A.current = await a({
253
265
  source: z,
254
- autoCapture: ie,
255
- intervalMs: _e,
266
+ autoCapture: g,
267
+ intervalMs: me,
256
268
  detection: {
257
- modelUrl: w,
258
- ortWasmPaths: T
269
+ modelUrl: E,
270
+ ortWasmPaths: D
259
271
  },
260
272
  onStatus: (e) => {
261
- if (ye.current = e, H(e), P.current.onFinderStatus?.(e), e.quad && e.sourceWidth && e.sourceHeight) {
262
- let t = M.current.setTarget(e.quad, e.sourceWidth, e.sourceHeight);
273
+ if (j.current = e, H(e), I.current.onFinderStatus?.(e), e.quad && e.sourceWidth && e.sourceHeight) {
274
+ let t = P.current.setTarget(e.quad, e.sourceWidth, e.sourceHeight);
263
275
  U(t.quad);
264
- } else M.current.clear(), U(void 0);
265
- e.state !== "captured" && !N.current && B("ready");
276
+ } else P.current.clear(), U(void 0);
277
+ e.state !== "captured" && !F.current && B("ready");
266
278
  },
267
279
  captureFrame: async () => {
268
- B("capturing"), j.current = {
269
- quad: M.current.getCurrent(),
270
- sourceWidth: ye.current?.sourceWidth,
271
- sourceHeight: ye.current?.sourceHeight
280
+ B("capturing"), N.current = {
281
+ quad: P.current.getCurrent(),
282
+ sourceWidth: j.current?.sourceWidth,
283
+ sourceHeight: j.current?.sourceHeight
272
284
  };
273
- let e = await r.capturePhoto();
274
- if (A.current = e, G(e.method), J(e.diagnostics), q(e.diagnostics), e.luminance <= 10) throw Error(`The captured frame was blank (luminance ${e.luminance.toFixed(1)} via ${e.method}). Keep the scanner visible while capturing and retake.`);
285
+ let e = await o.capturePhoto();
286
+ if (M.current = e, G(e.method), J(e.diagnostics), q(e.diagnostics), e.luminance <= 10) throw Error(`The captured frame was blank (luminance ${e.luminance.toFixed(1)} via ${e.method}). Keep the scanner visible while capturing and retake.`);
275
287
  return Z(e.frame, z), B("captured"), e.frame;
276
288
  },
277
289
  onCaptureError: (e) => {
278
- N.current = !0, B("error"), K(e.message);
279
- let t = O.current?.getDiagnostics();
280
- t && q(t), P.current.onError?.(e);
290
+ F.current = !0, B("error"), K(e.message);
291
+ let t = k.current?.getDiagnostics();
292
+ t && q(t), I.current.onError?.(e);
281
293
  },
282
294
  onCapture: async (e) => {
283
- let t = A.current;
295
+ let t = M.current;
284
296
  await new Promise((e) => window.setTimeout(e, 140));
285
297
  let n = {
286
298
  ...e,
287
299
  method: t?.method ?? "video-frame",
288
- settings: t?.settings ?? r.getSettings(),
300
+ settings: t?.settings ?? o.getSettings(),
289
301
  fallbackReason: t?.fallbackReason,
290
302
  luminance: t?.luminance,
291
303
  diagnostics: t?.diagnostics,
292
- displayedQuad: j.current.quad,
293
- displaySourceWidth: j.current.sourceWidth,
294
- displaySourceHeight: j.current.sourceHeight
304
+ displayedQuad: N.current.quad,
305
+ displaySourceWidth: N.current.sourceWidth,
306
+ displaySourceHeight: N.current.sourceHeight
295
307
  };
296
- if (P.current.useCase === "drivers-license") {
297
- await F.current(n);
308
+ if (I.current.useCase === "drivers-license") {
309
+ await L.current(n);
298
310
  return;
299
311
  }
300
- await me(P.current.onCapture, n);
312
+ await de(I.current.onCapture, n);
301
313
  }
302
314
  });
303
315
  } catch (t) {
304
316
  if (e) return;
305
- r();
317
+ o();
306
318
  let n = t instanceof Error ? t : /* @__PURE__ */ Error("Camera access failed.");
307
- K(n.message), B("error"), P.current.onError?.(n);
319
+ K(n.message), B("error"), I.current.onError?.(n);
308
320
  }
309
321
  })(), () => {
310
- e = !0, r();
322
+ e = !0, o();
311
323
  };
312
324
  }, [
313
- d,
325
+ m,
314
326
  z,
327
+ O,
328
+ g,
329
+ ae,
330
+ E,
315
331
  D,
316
- ie,
317
- ce,
318
- w,
319
- T,
320
- _e,
321
- Pe,
332
+ me,
333
+ Ie,
322
334
  X,
323
335
  Z,
324
336
  Q
325
337
  ]);
326
- let Xe = {
327
- open: d,
328
- phase: Te,
329
- autoCapture: ie,
330
- captureMode: ae,
331
- usingSystemCamera: D,
338
+ let Qe = {
339
+ open: m,
340
+ phase: De,
341
+ autoCapture: g,
342
+ captureMode: ne,
343
+ usingSystemCamera: O,
332
344
  finderStatus: V,
333
- displayQuad: Ee,
334
- barcodeOverlay: De,
335
- previewSize: Oe,
336
- settings: Ae,
337
- captureMethod: Me,
338
- error: Ne,
339
- diagnostics: Ie,
340
- shutterDiagnostics: Le,
341
- copyState: Re,
342
- guidanceHint: V ? o(V.guidance, V.lighting) : void 0,
343
- detectorStatus: m === "drivers-license" && Ue === "back" && !D ? "zxing" : V?.modelStatus === "failed" ? `ML failed${V.modelError ? `: ${V.modelError}` : ""}` : V?.detector === "ml" ? `ML ${V.modelProvider ?? ""}`.trim() : "ML loading",
344
- modelDownload: qe,
345
- frozenPreviewUrl: Be,
346
- useCase: m,
347
- licenseSide: m === "drivers-license" ? Ue : void 0,
348
- licenseBusy: m === "drivers-license" ? Ge : void 0
345
+ displayQuad: Oe,
346
+ barcodeOverlay: ke,
347
+ previewSize: Ae,
348
+ settings: Me,
349
+ captureMethod: Pe,
350
+ error: Fe,
351
+ diagnostics: Re,
352
+ shutterDiagnostics: ze,
353
+ copyState: Be,
354
+ guidanceHint: V ? ee(V.guidance, V.lighting) : void 0,
355
+ detectorStatus: h === "drivers-license" && Ge === "back" && !O ? "zxing" : V?.modelStatus === "failed" ? `ML failed${V.modelError ? `: ${V.modelError}` : ""}` : V?.detector === "ml" ? `ML ${V.modelProvider ?? ""}`.trim() : "ML loading",
356
+ modelDownload: Ye,
357
+ frozenPreviewUrl: He,
358
+ useCase: h,
359
+ licenseSide: h === "drivers-license" ? Ge : void 0,
360
+ licenseBusy: h === "drivers-license" ? qe : void 0
349
361
  };
350
- g(() => {
351
- Ce.current = Xe;
362
+ v(() => {
363
+ Te.current = Qe;
352
364
  });
353
- let Ze = h(() => {
354
- P.current.onCancel();
355
- }, []), $ = h(async () => {
356
- if (!be.current) {
357
- be.current = !0, N.current = !1, K(""), U(void 0), W(void 0), M.current.clear(), B("capturing");
365
+ let $e = _(() => {
366
+ I.current.onCancel();
367
+ }, []), $ = _(async () => {
368
+ if (!_e.current) {
369
+ _e.current = !0, F.current = !1, K(""), U(void 0), W(void 0), P.current.clear(), B("capturing");
358
370
  try {
359
- let e = await n();
360
- Z(e);
361
- let t = {
362
- width: e.width,
363
- height: e.height
371
+ let t = await o();
372
+ Z(t);
373
+ let n = {
374
+ width: t.width,
375
+ height: t.height
364
376
  };
365
- je(t), P.current.onSettings?.(t), G("system-camera");
377
+ Ne(n), I.current.onSettings?.(n), G("system-camera");
366
378
  let r;
367
379
  try {
368
- let t = e.getContext("2d", { willReadFrequently: !0 })?.getImageData(0, 0, e.width, e.height).data;
369
- t && (r = s(t));
380
+ let n = t.getContext("2d", { willReadFrequently: !0 })?.getImageData(0, 0, t.width, t.height).data;
381
+ n && (r = e(n));
370
382
  } catch {
371
383
  r = void 0;
372
384
  }
373
- if (P.current.useCase === "drivers-license" && Y.current === "back") {
374
- U(void 0), W(void 0), M.current.clear(), j.current = {}, B("captured");
375
- let n = await f(e);
376
- await Q(e, n?.quad), await F.current({
377
- frame: e,
385
+ if (I.current.useCase === "drivers-license" && Y.current === "back") {
386
+ U(void 0), W(void 0), P.current.clear(), N.current = {}, B("captured");
387
+ let e = await f(t);
388
+ await Q(t, e?.quad), await L.current({
389
+ frame: t,
378
390
  reason: "manual",
379
391
  method: "system-camera",
380
- settings: t,
392
+ settings: n,
381
393
  luminance: r
382
394
  });
383
395
  return;
384
396
  }
385
- let a = await i(e, {
386
- modelUrl: w,
387
- ortWasmPaths: T
397
+ let i = await u(t, {
398
+ modelUrl: E,
399
+ ortWasmPaths: D
388
400
  });
389
- if (a.status !== "success" || !a.corners || !a.quad) {
390
- N.current = !0, B("error"), K(a.message), P.current.onError?.(Error(a.message));
401
+ if (i.status !== "success" || !i.corners || !i.quad) {
402
+ F.current = !0, B("error"), K(i.message), I.current.onError?.(Error(i.message));
391
403
  return;
392
404
  }
393
- j.current = {
394
- quad: a.quad,
395
- sourceWidth: a.sourceWidth,
396
- sourceHeight: a.sourceHeight
397
- }, a.quad && U(a.quad), B("captured");
398
- let o = {
399
- frame: e,
400
- detection: a,
405
+ N.current = {
406
+ quad: i.quad,
407
+ sourceWidth: i.sourceWidth,
408
+ sourceHeight: i.sourceHeight
409
+ }, i.quad && U(i.quad), B("captured");
410
+ let a = {
411
+ frame: t,
412
+ detection: i,
401
413
  reason: "manual",
402
414
  method: "system-camera",
403
- settings: t,
415
+ settings: n,
404
416
  luminance: r,
405
- displayedQuad: a.quad,
406
- displaySourceWidth: a.sourceWidth,
407
- displaySourceHeight: a.sourceHeight
417
+ displayedQuad: i.quad,
418
+ displaySourceWidth: i.sourceWidth,
419
+ displaySourceHeight: i.sourceHeight
408
420
  };
409
- if (P.current.useCase === "drivers-license") {
410
- await F.current(o);
421
+ if (I.current.useCase === "drivers-license") {
422
+ await L.current(a);
411
423
  return;
412
424
  }
413
- await me(P.current.onCapture, o);
425
+ await de(I.current.onCapture, a);
414
426
  } catch (e) {
415
427
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Could not take a photo.");
416
428
  if (t.message === "No photo was selected.") {
417
- if (He.current) {
429
+ if (We.current) {
418
430
  B("error");
419
431
  return;
420
432
  }
421
- P.current.onCancel();
433
+ I.current.onCancel();
422
434
  return;
423
435
  }
424
- N.current = !0, K(t.message), B("error"), P.current.onError?.(t);
436
+ F.current = !0, K(t.message), B("error"), I.current.onError?.(t);
425
437
  } finally {
426
- be.current = !1;
438
+ _e.current = !1;
427
439
  }
428
440
  }
429
441
  }, [
430
442
  Z,
431
- w,
432
- T,
443
+ E,
444
+ D,
433
445
  Q
434
- ]), Qe = h(async (e) => {
435
- let t = await Se.current;
446
+ ]), et = _(async (e) => {
447
+ let t = await ye.current;
436
448
  if (t) {
437
- Ke(!0);
449
+ Je(!0);
438
450
  try {
439
451
  let n = await t.submitStill(e.frame, e.detection);
440
452
  if (n.kind === "need-back") {
441
- R.current?.abort();
442
- let e = new AbortController();
443
- R.current = e, k.current?.stop(), k.current = void 0, Y.current = "front", I.current = !1, We("flip"), N.current = !1, K(""), H(void 0), U(void 0), W(void 0), M.current.clear(), B("ready"), Ke(!1);
453
+ A.current?.stop(), A.current = void 0, Y.current = "front", R.current = !1, Ke("flip"), F.current = !1, K(""), H(void 0), U(void 0), W(void 0), P.current.clear(), B("ready"), Je(!1);
444
454
  try {
445
- await ne(e.signal);
455
+ await we();
446
456
  } catch {
447
457
  return;
448
458
  }
449
- if (R.current !== e || e.signal.aborted) return;
450
- if (R.current = void 0, Y.current = "back", We("back"), X(), D) {
459
+ if (Y.current = "back", Ke("back"), X(), O) {
451
460
  B("ready");
452
461
  return;
453
462
  }
454
- z?.paused && z.play(), B("starting"), Fe((e) => e + 1);
463
+ z?.paused && z.play(), B("starting"), Le((e) => e + 1);
455
464
  return;
456
465
  }
457
466
  if (n.kind === "retry") {
458
- N.current = !0, K(n.message), B("error");
467
+ F.current = !0, K(n.message), B("error");
459
468
  return;
460
469
  }
461
- await me(P.current.onDriverLicense, n.result);
470
+ await de(I.current.onDriverLicense, n.result);
462
471
  } catch (e) {
463
472
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Driver’s license scan failed.");
464
- N.current = !0, K(t.message), B("error"), P.current.onError?.(t);
473
+ F.current = !0, K(t.message), B("error"), I.current.onError?.(t);
465
474
  } finally {
466
- Ke(!1);
475
+ Je(!1);
467
476
  }
468
477
  }
469
478
  }, [
470
479
  X,
471
480
  z,
472
- D
481
+ O,
482
+ we
473
483
  ]);
474
- oe(() => {
475
- F.current = Qe;
476
- }, [Qe]);
477
- let $e = h(async () => {
478
- if (D) {
484
+ re(() => {
485
+ L.current = et;
486
+ }, [et]);
487
+ let tt = _(async () => {
488
+ if (O) {
479
489
  await $();
480
490
  return;
481
491
  }
482
- let e = O.current;
483
- if (e && P.current.useCase === "drivers-license" && Y.current === "back") {
492
+ let e = k.current;
493
+ if (e && I.current.useCase === "drivers-license" && Y.current === "back") {
484
494
  try {
485
495
  let t = await e.capturePhoto(), n = await f(t.frame);
486
- if (!n?.text || I.current) return;
487
- I.current = !0, L.current?.abort(), A.current = t, G(t.method), J(t.diagnostics), q(t.diagnostics), Z(t.frame, z), B("captured"), await Q(t.frame, n.quad), await F.current({
496
+ if (!n?.text || R.current) return;
497
+ R.current = !0, be.current?.abort(), M.current = t, G(t.method), J(t.diagnostics), q(t.diagnostics), Z(t.frame, z), B("captured"), await Q(t.frame, n.quad), await L.current({
488
498
  frame: t.frame,
489
499
  reason: "manual",
490
500
  method: t.method,
@@ -495,75 +505,75 @@ function he({ open: d, useCase: m = "document", autoCapture: ie = "defaultOn", c
495
505
  });
496
506
  } catch (e) {
497
507
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Could not capture the camera frame.");
498
- N.current = !0, K(t.message);
499
- let n = O.current?.getDiagnostics();
500
- n && q(n), A.current?.diagnostics && J(A.current.diagnostics), B("error"), P.current.onError?.(t);
508
+ F.current = !0, K(t.message);
509
+ let n = k.current?.getDiagnostics();
510
+ n && q(n), M.current?.diagnostics && J(M.current.diagnostics), B("error"), I.current.onError?.(t);
501
511
  }
502
512
  return;
503
513
  }
504
514
  try {
505
- await k.current?.capture();
515
+ await A.current?.capture();
506
516
  } catch (e) {
507
517
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Could not capture the camera frame.");
508
- N.current = !0, K(t.message);
509
- let n = O.current?.getDiagnostics();
510
- n && q(n), A.current?.diagnostics && J(A.current.diagnostics), B("error"), P.current.onError?.(t);
518
+ F.current = !0, K(t.message);
519
+ let n = k.current?.getDiagnostics();
520
+ n && q(n), M.current?.diagnostics && J(M.current.diagnostics), B("error"), I.current.onError?.(t);
511
521
  }
512
522
  }, [
513
523
  $,
514
524
  Z,
515
525
  z,
516
526
  Q,
517
- D
518
- ]), et = _($);
519
- et.current = $;
520
- let tt = _(!1);
521
- oe(() => {
522
- if (!d || !D) {
523
- tt.current = !1;
527
+ O
528
+ ]), nt = y($);
529
+ nt.current = $;
530
+ let rt = y(!1);
531
+ re(() => {
532
+ if (!m || !O) {
533
+ rt.current = !1;
524
534
  return;
525
535
  }
526
- if (!tt.current) {
527
- if (tt.current = !0, N.current = !1, K(""), H(void 0), G(void 0), J(void 0), ze("idle"), U(void 0), W(void 0), M.current.clear(), X(), !e()) {
536
+ if (!rt.current) {
537
+ if (rt.current = !0, F.current = !1, K(""), H(void 0), G(void 0), J(void 0), Ve("idle"), U(void 0), W(void 0), P.current.clear(), X(), !te()) {
528
538
  B("ready");
529
539
  return;
530
540
  }
531
- et.current();
541
+ nt.current();
532
542
  }
533
543
  }, [
534
- d,
535
- D,
544
+ m,
545
+ O,
536
546
  X
537
547
  ]);
538
- let nt = h(() => {
539
- if (N.current = !1, I.current = !1, K(""), J(void 0), ze("idle"), H(void 0), U(void 0), W(void 0), M.current.clear(), D) {
548
+ let it = _(() => {
549
+ if (F.current = !1, R.current = !1, K(""), J(void 0), Ve("idle"), H(void 0), U(void 0), W(void 0), P.current.clear(), O) {
540
550
  $();
541
551
  return;
542
552
  }
543
- if (X(), m === "drivers-license") {
544
- B("starting"), Fe((e) => e + 1);
553
+ if (X(), h === "drivers-license") {
554
+ B("starting"), Le((e) => e + 1);
545
555
  return;
546
556
  }
547
- let e = O.current;
548
- z?.paused && z.play(), B(e ? "ready" : "starting"), e || Fe((e) => e + 1);
557
+ let e = k.current;
558
+ z?.paused && z.play(), B(e ? "ready" : "starting"), e || Le((e) => e + 1);
549
559
  }, [
550
560
  $,
551
561
  X,
552
562
  z,
553
- m,
554
- D
555
- ]), rt = h(async (e) => {
556
- let t = O.current;
563
+ h,
564
+ O
565
+ ]), at = _(async (e) => {
566
+ let t = k.current;
557
567
  t && (await t.setTorch(e), q(t.getDiagnostics()));
558
- }, []), it = h((e) => {
559
- k.current?.setAutoCapture(e);
560
- }, []), at = h(async () => {
561
- let e = Ce.current, t = O.current?.getDiagnostics() ?? e.diagnostics, n = e.finderStatus, r = re({
568
+ }, []), ot = _((e) => {
569
+ A.current?.setAutoCapture(e);
570
+ }, []), st = _(async () => {
571
+ let e = Te.current, t = k.current?.getDiagnostics() ?? e.diagnostics, n = e.finderStatus, r = i({
562
572
  error: e.error || void 0,
563
573
  captureMethod: e.captureMethod,
564
- luminance: A.current?.luminance,
565
- fallbackReason: A.current?.fallbackReason,
566
- shutter: e.shutterDiagnostics ?? A.current?.diagnostics,
574
+ luminance: M.current?.luminance,
575
+ fallbackReason: M.current?.fallbackReason,
576
+ shutter: e.shutterDiagnostics ?? M.current?.diagnostics,
567
577
  live: t,
568
578
  finder: n ? {
569
579
  state: n.state,
@@ -588,55 +598,57 @@ function he({ open: d, useCase: m = "document", autoCapture: ie = "defaultOn", c
588
598
  let t = document.execCommand("copy");
589
599
  if (e.remove(), !t) throw Error("Clipboard copy is unavailable.");
590
600
  }
591
- ze("copied");
601
+ Ve("copied");
592
602
  } catch {
593
- ze("failed");
603
+ Ve("failed");
594
604
  }
595
- }, []), ot = h(() => Ce.current, []), st = se(() => ({
596
- capture: $e,
597
- cancel: Ze,
598
- retry: nt,
599
- setTorch: rt,
600
- setAutoCapture: it,
601
- copyReport: at,
602
- getState: ot
605
+ }, []), ct = _(() => Te.current, []), lt = ie(() => ({
606
+ capture: tt,
607
+ cancel: $e,
608
+ retry: it,
609
+ continueLicenseFlip: Ce,
610
+ setTorch: at,
611
+ setAutoCapture: ot,
612
+ copyReport: st,
613
+ getState: ct
603
614
  }), [
615
+ tt,
604
616
  $e,
605
- Ze,
606
- nt,
607
- rt,
608
617
  it,
618
+ Ce,
609
619
  at,
610
- ot
620
+ ot,
621
+ st,
622
+ ct
611
623
  ]);
612
- g(() => {
613
- if (E) return E.current = st, () => {
614
- E.current = null;
624
+ v(() => {
625
+ if (he) return he.current = lt, () => {
626
+ he.current = null;
615
627
  };
616
- }, [st, E]);
617
- let ct = {
618
- ...Xe,
619
- ...st,
620
- bindPreview: Ye
628
+ }, [lt, he]);
629
+ let ut = {
630
+ ...Qe,
631
+ ...lt,
632
+ bindPreview: Ze
621
633
  };
622
- return /* @__PURE__ */ y(ue.Provider, {
623
- value: ct,
624
- children: ve
634
+ return /* @__PURE__ */ x(se.Provider, {
635
+ value: ut,
636
+ children: ge
625
637
  });
626
638
  }
627
639
  //#endregion
628
640
  //#region src/react/hooks.ts
629
- function ge() {
630
- return _(null);
641
+ function pe() {
642
+ return y(null);
631
643
  }
632
- function w() {
633
- let e = ae(ue);
644
+ function E() {
645
+ let e = ne(se);
634
646
  if (!e) throw Error("useScanner must be used within ScannerProvider.");
635
647
  return e;
636
648
  }
637
649
  //#endregion
638
650
  //#region src/live-overlay-geometry.ts
639
- function T(e, t, n, r, i) {
651
+ function D(e, t, n, r, i) {
640
652
  let a = Math.max(1, e), o = Math.max(1, t), s = Math.max(1, n), c = Math.max(1, r), l = s / a, u = c / o, d = i === "cover" ? Math.max(l, u) : Math.min(l, u), f = (s - a * d) / 2, p = (c - o * d) / 2;
641
653
  if (i === "contain") return {
642
654
  viewBox: `0 0 ${a} ${o}`,
@@ -645,9 +657,9 @@ function T(e, t, n, r, i) {
645
657
  offsetX: f,
646
658
  offsetY: p
647
659
  };
648
- let ee = s / d, te = c / d;
660
+ let m = s / d, ee = c / d;
649
661
  return {
650
- viewBox: `${-f / d} ${-p / d} ${ee} ${te}`,
662
+ viewBox: `${-f / d} ${-p / d} ${m} ${ee}`,
651
663
  preserveAspectRatio: "none",
652
664
  scale: d,
653
665
  offsetX: f,
@@ -656,10 +668,10 @@ function T(e, t, n, r, i) {
656
668
  }
657
669
  //#endregion
658
670
  //#region src/components/ModelDownloadRing.tsx
659
- function _e({ snapshot: e }) {
671
+ function me({ snapshot: e }) {
660
672
  if (!e.downloading) return null;
661
673
  let t = e.total && e.total > 0 ? Math.min(1, e.loaded / e.total) : null, n = t === null ? null : Math.round(t * 100), r = 2 * Math.PI * 28;
662
- return /* @__PURE__ */ b("div", {
674
+ return /* @__PURE__ */ S("div", {
663
675
  className: `model-download-ring${t === null ? " is-indeterminate" : ""}`,
664
676
  role: "progressbar",
665
677
  "aria-label": "Model download",
@@ -668,15 +680,15 @@ function _e({ snapshot: e }) {
668
680
  "aria-valuenow": n ?? void 0,
669
681
  "data-loaded": e.loaded,
670
682
  "data-total": e.total ?? "",
671
- children: [/* @__PURE__ */ b("svg", {
683
+ children: [/* @__PURE__ */ S("svg", {
672
684
  viewBox: "0 0 72 72",
673
685
  "aria-hidden": "true",
674
- children: [/* @__PURE__ */ y("circle", {
686
+ children: [/* @__PURE__ */ x("circle", {
675
687
  className: "track",
676
688
  cx: "36",
677
689
  cy: "36",
678
690
  r: 28
679
- }), /* @__PURE__ */ y("circle", {
691
+ }), /* @__PURE__ */ x("circle", {
680
692
  className: "value",
681
693
  cx: "36",
682
694
  cy: "36",
@@ -684,20 +696,20 @@ function _e({ snapshot: e }) {
684
696
  strokeDasharray: t === null ? void 0 : `${r} ${r}`,
685
697
  strokeDashoffset: t === null ? void 0 : r * (1 - t)
686
698
  })]
687
- }), n === null ? /* @__PURE__ */ y("strong", {
699
+ }), n === null ? /* @__PURE__ */ x("strong", {
688
700
  className: "model-download-ring__pending",
689
701
  children: "…"
690
- }) : /* @__PURE__ */ b("strong", { children: [n, "%"] })]
702
+ }) : /* @__PURE__ */ S("strong", { children: [n, "%"] })]
691
703
  });
692
704
  }
693
705
  //#endregion
694
706
  //#region src/react/guidance.ts
695
- function E(e) {
696
- if (!(e.usingSystemCamera || e.licenseBusy) && e.phase !== "error") return e.licenseFlipCue || e.phase === "starting" ? e.licenseHeadline : e.phase === "capturing" ? "Capturing full resolution…" : e.phase === "captured" ? "Document captured" : e.holdStillSeconds && e.holdStillSeconds > 0 ? d(e.holdStillSeconds) : e.guidanceHint && e.guidanceReason && e.guidanceReason !== "place-document" ? e.guidanceHint : e.licenseHeadline ?? e.guidanceHint ?? "Place the document in the frame";
707
+ function he(e) {
708
+ if (!(e.usingSystemCamera || e.licenseBusy) && e.phase !== "error" && !e.licenseFlipCue) return e.phase === "starting" ? e.licenseHeadline : e.phase === "capturing" ? "Capturing full resolution…" : e.phase === "captured" ? "Document captured" : e.holdStillSeconds && e.holdStillSeconds > 0 ? h(e.holdStillSeconds) : e.guidanceHint && e.guidanceReason && e.guidanceReason !== "place-document" ? e.guidanceHint : e.licenseHeadline ?? e.guidanceHint ?? "Place the document in the frame";
697
709
  }
698
710
  //#endregion
699
711
  //#region src/react/parts.tsx
700
- var ve = {
712
+ var ge = {
701
713
  primaryColorHex: "--scanner-overlay-primary",
702
714
  seekingColorHex: "--scanner-overlay-seeking",
703
715
  detectingColorHex: "--scanner-overlay-detecting",
@@ -705,46 +717,46 @@ var ve = {
705
717
  readyColorHex: "--scanner-overlay-ready",
706
718
  capturedColorHex: "--scanner-overlay-captured"
707
719
  };
708
- function D(e) {
720
+ function O(e) {
709
721
  if (!e) return;
710
722
  let t = {};
711
- for (let [n, r] of Object.entries(ve)) {
723
+ for (let [n, r] of Object.entries(ge)) {
712
724
  let i = e[n]?.trim();
713
725
  i && (t[r] = i);
714
726
  }
715
727
  return Object.keys(t).length > 0 ? t : void 0;
716
728
  }
717
- function O({ theme: e, style: t, title: n, children: r }) {
718
- let i = w();
729
+ function k({ theme: e, style: t, title: n, children: r }) {
730
+ let i = E();
719
731
  if (!i.open) return null;
720
- let a = n ?? (i.useCase === "drivers-license" ? "Scan a driver’s license" : "Scan a document"), o = D(e), s = o ? {
732
+ let a = n ?? (i.useCase === "drivers-license" ? "Scan a driver’s license" : "Scan a document"), o = O(e), s = o ? {
721
733
  ...t,
722
734
  ...o
723
735
  } : t;
724
- return /* @__PURE__ */ b("div", {
736
+ return /* @__PURE__ */ S("div", {
725
737
  className: `scanner-camera-overlay ${i.phase === "captured" || i.finderStatus?.state === "captured" ? "is-captured" : ""} ${i.usingSystemCamera ? "is-system-camera" : ""}`.trim(),
726
738
  style: s,
727
739
  role: "dialog",
728
740
  "aria-modal": "true",
729
741
  "aria-label": a,
730
- children: [r, /* @__PURE__ */ y(P, {})]
742
+ children: [r, /* @__PURE__ */ x(I, {})]
731
743
  });
732
744
  }
733
- function k() {
734
- let { bindPreview: e, frozenPreviewUrl: t, usingSystemCamera: n } = w(), r = _(null), i = h((t) => {
745
+ function A() {
746
+ let { bindPreview: e, frozenPreviewUrl: t, usingSystemCamera: n } = E(), r = y(null), i = _((t) => {
735
747
  r.current = t, e(t);
736
748
  }, [e]);
737
- return g(() => {
749
+ return v(() => {
738
750
  t && r.current?.pause();
739
- }, [t]), n ? t ? /* @__PURE__ */ y("img", {
751
+ }, [t]), n ? t ? /* @__PURE__ */ x("img", {
740
752
  src: t,
741
753
  className: "scanner-camera-overlay__video scanner-camera-overlay__still",
742
754
  alt: "",
743
755
  "aria-label": "Captured document"
744
- }) : /* @__PURE__ */ y("div", {
756
+ }) : /* @__PURE__ */ x("div", {
745
757
  className: "scanner-camera-overlay__video",
746
758
  "aria-hidden": "true"
747
- }) : /* @__PURE__ */ b(ce, { children: [/* @__PURE__ */ y("video", {
759
+ }) : /* @__PURE__ */ S(ae, { children: [/* @__PURE__ */ x("video", {
748
760
  ref: i,
749
761
  className: "scanner-camera-overlay__video",
750
762
  muted: !0,
@@ -753,36 +765,36 @@ function k() {
753
765
  style: { objectFit: "cover" },
754
766
  "aria-hidden": !!t,
755
767
  "aria-label": "Rear camera preview"
756
- }), t ? /* @__PURE__ */ y("img", {
768
+ }), t ? /* @__PURE__ */ x("img", {
757
769
  src: t,
758
770
  className: "scanner-camera-overlay__video scanner-camera-overlay__still",
759
771
  alt: "",
760
772
  "aria-label": "Captured document"
761
773
  }) : null] });
762
774
  }
763
- function ye() {
764
- let { finderStatus: e, displayQuad: t, previewSize: n, barcodeOverlay: r } = w(), i = e?.sourceWidth ?? r?.width, a = e?.sourceHeight ?? r?.height;
775
+ function j() {
776
+ let { finderStatus: e, displayQuad: t, previewSize: n, barcodeOverlay: r } = E(), i = e?.sourceWidth ?? r?.width, a = e?.sourceHeight ?? r?.height;
765
777
  if (!t || !i || !a) return null;
766
- let o = T(i, a, n.width, n.height, "cover"), s = r ? "ready" : e?.state;
767
- return /* @__PURE__ */ y("svg", {
778
+ let o = D(i, a, n.width, n.height, "cover"), s = r ? "ready" : e?.state;
779
+ return /* @__PURE__ */ x("svg", {
768
780
  className: `scanner-camera-overlay__quad ${s ?? ""}`.trim(),
769
781
  viewBox: o.viewBox,
770
782
  preserveAspectRatio: o.preserveAspectRatio,
771
783
  "aria-label": r ? "PDF417 barcode boundary" : `${e?.state ?? "document"} document boundary`,
772
- children: /* @__PURE__ */ y("polygon", { points: `${t.topLeft.x},${t.topLeft.y} ${t.topRight.x},${t.topRight.y} ${t.bottomRight.x},${t.bottomRight.y} ${t.bottomLeft.x},${t.bottomLeft.y}` })
784
+ children: /* @__PURE__ */ x("polygon", { points: `${t.topLeft.x},${t.topLeft.y} ${t.topRight.x},${t.topRight.y} ${t.bottomRight.x},${t.bottomRight.y} ${t.bottomLeft.x},${t.bottomLeft.y}` })
773
785
  });
774
786
  }
775
- function A({ title: e }) {
776
- let { phase: t, cancel: n, usingSystemCamera: r, useCase: i, licenseSide: a, licenseBusy: o } = w(), s = i === "drivers-license" ? m(a ?? "front", r) : void 0, c = e ?? s?.title ?? "Scan a document";
777
- return /* @__PURE__ */ b("div", {
787
+ function M({ title: e }) {
788
+ let { phase: t, cancel: n, usingSystemCamera: r, useCase: i, licenseSide: a, licenseBusy: o } = E(), s = i === "drivers-license" ? m(a ?? "front", r) : void 0, c = e ?? s?.title ?? "Scan a document";
789
+ return /* @__PURE__ */ S("div", {
778
790
  className: "scanner-camera-overlay__topbar",
779
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("strong", { children: c }), /* @__PURE__ */ b("span", {
791
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("strong", { children: c }), /* @__PURE__ */ S("span", {
780
792
  "aria-live": "polite",
781
793
  children: [
782
794
  o && (a === "back" ? "Reading the barcode…" : "Reading the front…"),
783
795
  !o && s && a === "flip" && "Turn the license over",
784
796
  !o && s && t === "error" && (a === "back" ? "Could not read the back" : "Could not read the front"),
785
- !o && !s && r && /* @__PURE__ */ b(ce, { children: [
797
+ !o && !s && r && /* @__PURE__ */ S(ae, { children: [
786
798
  t === "starting" && "Preparing the system camera…",
787
799
  t === "ready" && "Take a photo. There is no live document guide.",
788
800
  t === "capturing" && "Looking for a document…",
@@ -791,7 +803,7 @@ function A({ title: e }) {
791
803
  ] }),
792
804
  !o && !s && !r && t === "error" && "Camera unavailable"
793
805
  ]
794
- })] }), /* @__PURE__ */ y("button", {
806
+ })] }), /* @__PURE__ */ x("button", {
795
807
  type: "button",
796
808
  onClick: n,
797
809
  "aria-label": "Close camera",
@@ -799,75 +811,95 @@ function A({ title: e }) {
799
811
  })]
800
812
  });
801
813
  }
802
- function j() {
803
- let { phase: e, error: t, diagnostics: n, copyState: r, retry: i, copyReport: a, cancel: o, usingSystemCamera: s, frozenPreviewUrl: c, useCase: l, licenseSide: u, licenseBusy: d } = w(), f = l === "drivers-license" ? m(u ?? "front", s) : void 0;
804
- return u === "flip" && f ? s ? /* @__PURE__ */ b("div", {
805
- className: "scanner-camera-overlay__message",
806
- "aria-live": "polite",
807
- children: [/* @__PURE__ */ y("strong", { children: f.headline }), /* @__PURE__ */ y("p", { children: f.detail })]
808
- }) : null : e === "error" ? /* @__PURE__ */ b("div", {
814
+ function N() {
815
+ let { phase: e, error: t, diagnostics: n, copyState: r, retry: i, copyReport: a, cancel: o, usingSystemCamera: s, frozenPreviewUrl: c, useCase: l, licenseSide: u, licenseBusy: d, continueLicenseFlip: f } = E(), p = l === "drivers-license" ? m(u ?? "front", s) : void 0;
816
+ return u === "flip" && p ? /* @__PURE__ */ x("div", {
817
+ className: "scanner-camera-overlay__flip",
818
+ role: "dialog",
819
+ "aria-modal": "true",
820
+ "aria-labelledby": "scanner-license-flip-title",
821
+ "aria-describedby": "scanner-license-flip-detail",
822
+ children: /* @__PURE__ */ S("div", {
823
+ className: "scanner-camera-overlay__message",
824
+ children: [
825
+ /* @__PURE__ */ x("strong", {
826
+ id: "scanner-license-flip-title",
827
+ children: p.headline
828
+ }),
829
+ /* @__PURE__ */ x("p", {
830
+ id: "scanner-license-flip-detail",
831
+ children: p.detail
832
+ }),
833
+ /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x("button", {
834
+ type: "button",
835
+ onClick: f,
836
+ children: "Continue"
837
+ }) })
838
+ ]
839
+ })
840
+ }) : e === "error" ? /* @__PURE__ */ S("div", {
809
841
  className: "scanner-camera-overlay__message",
810
842
  role: "alert",
811
843
  children: [
812
- /* @__PURE__ */ y("strong", { children: f ? u === "back" ? "Could not read the back" : "Could not read the front" : s ? c ? "No document found" : "Could not take a photo" : n ? "Capture failed" : "Could not open the camera" }),
813
- /* @__PURE__ */ y("p", { children: t }),
814
- /* @__PURE__ */ b("div", { children: [
815
- /* @__PURE__ */ y("button", {
844
+ /* @__PURE__ */ x("strong", { children: p ? u === "back" ? "Could not read the back" : "Could not read the front" : s ? c ? "No document found" : "Could not take a photo" : n ? "Capture failed" : "Could not open the camera" }),
845
+ /* @__PURE__ */ x("p", { children: t }),
846
+ /* @__PURE__ */ S("div", { children: [
847
+ /* @__PURE__ */ x("button", {
816
848
  type: "button",
817
849
  onClick: i,
818
850
  children: "Try again"
819
851
  }),
820
- /* @__PURE__ */ y("button", {
852
+ /* @__PURE__ */ x("button", {
821
853
  type: "button",
822
854
  onClick: () => void a(),
823
855
  children: r === "copied" ? "Copied" : r === "failed" ? "Copy failed" : "Copy report"
824
856
  }),
825
- /* @__PURE__ */ y("button", {
857
+ /* @__PURE__ */ x("button", {
826
858
  type: "button",
827
859
  onClick: o,
828
860
  children: "Cancel"
829
861
  })
830
862
  ] })
831
863
  ]
832
- }) : d ? /* @__PURE__ */ b("div", {
864
+ }) : d ? /* @__PURE__ */ S("div", {
833
865
  className: "scanner-camera-overlay__message",
834
866
  "aria-live": "polite",
835
867
  children: [
836
- /* @__PURE__ */ y("span", { className: "scanner-camera-overlay__spinner" }),
837
- /* @__PURE__ */ y("strong", { children: u === "back" ? "Reading the barcode" : "Reading the front" }),
838
- /* @__PURE__ */ y("p", { children: u === "back" ? "Decoding the AAMVA PDF417 on the back." : "Finding the card and reading the front with OCR." })
868
+ /* @__PURE__ */ x("span", { className: "scanner-camera-overlay__spinner" }),
869
+ /* @__PURE__ */ x("strong", { children: u === "back" ? "Reading the barcode" : "Reading the front" }),
870
+ /* @__PURE__ */ x("p", { children: u === "back" ? "Decoding the AAMVA PDF417 on the back." : "Finding the card and reading the front with OCR." })
839
871
  ]
840
- }) : s && e === "capturing" && !c ? /* @__PURE__ */ b("div", {
872
+ }) : s && e === "capturing" && !c ? /* @__PURE__ */ S("div", {
841
873
  className: "scanner-camera-overlay__message",
842
874
  "aria-live": "polite",
843
875
  children: [
844
- /* @__PURE__ */ y("span", { className: "scanner-camera-overlay__spinner" }),
845
- /* @__PURE__ */ y("strong", { children: f ? f.headline : "Opening the system camera" }),
846
- /* @__PURE__ */ y("p", { children: f ? f.detail : "There is no live document guide. We find the page after you take the photo." })
876
+ /* @__PURE__ */ x("span", { className: "scanner-camera-overlay__spinner" }),
877
+ /* @__PURE__ */ x("strong", { children: p ? p.headline : "Opening the system camera" }),
878
+ /* @__PURE__ */ x("p", { children: p ? p.detail : "There is no live document guide. We find the page after you take the photo." })
847
879
  ]
848
- }) : s && e === "ready" && !c ? /* @__PURE__ */ b("div", {
880
+ }) : s && e === "ready" && !c ? /* @__PURE__ */ S("div", {
849
881
  className: "scanner-camera-overlay__message",
850
882
  "aria-live": "polite",
851
- children: [/* @__PURE__ */ y("strong", { children: f ? f.headline : "System camera" }), /* @__PURE__ */ y("p", { children: f ? f.detail : "Tap the shutter to open the Camera app. There is no live document guide." })]
852
- }) : e === "starting" && !s ? /* @__PURE__ */ b("div", {
883
+ children: [/* @__PURE__ */ x("strong", { children: p ? p.headline : "System camera" }), /* @__PURE__ */ x("p", { children: p ? p.detail : "Tap the shutter to open the Camera app. There is no live document guide." })]
884
+ }) : e === "starting" && !s ? /* @__PURE__ */ S("div", {
853
885
  className: "scanner-camera-overlay__message",
854
886
  "aria-live": "polite",
855
887
  children: [
856
- /* @__PURE__ */ y("span", { className: "scanner-camera-overlay__spinner" }),
857
- /* @__PURE__ */ y("strong", { children: "Requesting the highest practical resolution" }),
858
- /* @__PURE__ */ y("p", { children: "Allow camera access to continue." })
888
+ /* @__PURE__ */ x("span", { className: "scanner-camera-overlay__spinner" }),
889
+ /* @__PURE__ */ x("strong", { children: "Requesting the highest practical resolution" }),
890
+ /* @__PURE__ */ x("p", { children: "Allow camera access to continue." })
859
891
  ]
860
892
  }) : null;
861
893
  }
862
- function M() {
863
- let { finderStatus: e, detectorStatus: t, settings: n, usingSystemCamera: r, captureMethod: i, phase: a, useCase: o, licenseSide: s } = w(), c = n?.width, l = n?.height, u = o === "drivers-license" ? ` · ${s === "back" ? "back" : s === "flip" ? "flip" : "front"}` : "";
864
- if (r) return /* @__PURE__ */ y("div", {
894
+ function P() {
895
+ let { finderStatus: e, detectorStatus: t, settings: n, usingSystemCamera: r, captureMethod: i, phase: a, useCase: o, licenseSide: s } = E(), c = n?.width, l = n?.height, u = o === "drivers-license" ? ` · ${s === "back" ? "back" : s === "flip" ? "flip" : "front"}` : "";
896
+ if (r) return /* @__PURE__ */ x("div", {
865
897
  className: "scanner-camera-overlay__status",
866
898
  "aria-live": "polite",
867
- children: /* @__PURE__ */ b("div", {
899
+ children: /* @__PURE__ */ S("div", {
868
900
  className: "scanner-camera-overlay__status-line",
869
901
  children: [
870
- /* @__PURE__ */ y("span", { className: a === "captured" ? "ready" : a === "error" ? "seeking" : "detecting" }),
902
+ /* @__PURE__ */ x("span", { className: a === "captured" ? "ready" : a === "error" ? "seeking" : "detecting" }),
871
903
  i === "system-camera" ? "system camera" : "system camera · waiting",
872
904
  u,
873
905
  c && l ? ` · ${c}×${l}` : ""
@@ -875,13 +907,13 @@ function M() {
875
907
  })
876
908
  });
877
909
  let d = o === "drivers-license" && s === "back", f = d && !e ? "reading" : e?.state ?? "detecting";
878
- return /* @__PURE__ */ y("div", {
910
+ return /* @__PURE__ */ x("div", {
879
911
  className: "scanner-camera-overlay__status",
880
912
  "aria-live": "polite",
881
- children: /* @__PURE__ */ b("div", {
913
+ children: /* @__PURE__ */ S("div", {
882
914
  className: "scanner-camera-overlay__status-line",
883
915
  children: [
884
- /* @__PURE__ */ y("span", { className: d && !e ? "detecting" : e?.state ?? "detecting" }),
916
+ /* @__PURE__ */ x("span", { className: d && !e ? "detecting" : e?.state ?? "detecting" }),
885
917
  f,
886
918
  u,
887
919
  e ? ` · ${Math.round(e.confidence * 100)}% · ${e.stableFrames}/${e.requiredStableFrames}` : "",
@@ -892,78 +924,78 @@ function M() {
892
924
  })
893
925
  });
894
926
  }
895
- function N() {
896
- let { diagnostics: e, shutterDiagnostics: t, captureMethod: n, copyState: r, copyReport: i } = w(), o = e?.engine ?? a();
897
- return /* @__PURE__ */ b("dl", {
927
+ function F() {
928
+ let { diagnostics: e, shutterDiagnostics: t, captureMethod: n, copyState: i, copyReport: a } = E(), o = e?.engine ?? r();
929
+ return /* @__PURE__ */ S("dl", {
898
930
  className: "scanner-camera-overlay__diagnostics",
899
931
  "aria-label": "Camera diagnostics",
900
932
  children: [
901
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", { children: "engine" }), /* @__PURE__ */ b("dd", { children: [
933
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", { children: "engine" }), /* @__PURE__ */ S("dd", { children: [
902
934
  o.engine,
903
935
  "/",
904
936
  o.browser,
905
937
  o.iosWebKit ? " ios" : ""
906
938
  ] })] }),
907
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", { children: "video" }), /* @__PURE__ */ y("dd", { children: e ? `${e.videoWidth}×${e.videoHeight} rs${e.readyState}${e.paused ? " paused" : ""}${e.rendered ? "" : " hidden"}` : "starting" })] }),
908
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", { children: "track" }), /* @__PURE__ */ y("dd", { children: e ? `${e.trackReadyState}${e.trackMuted ? " muted" : ""}${e.trackEnabled ? "" : " disabled"}` : "—" })] }),
909
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", { children: "torch" }), /* @__PURE__ */ y("dd", { children: e ? `${e.torch.mode} · ${e.torch.supported ? e.torch.on ? "on" : "off" : "unsupported"}` : "starting" })] }),
910
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", { children: "luma" }), /* @__PURE__ */ y("dd", { children: e ? `live ${e.liveLuminance.toFixed(1)} · mirror ${e.mirrorLuminance.toFixed(1)}${Number.isFinite(e.mirrorAgeMs) ? ` (${Math.round(e.mirrorAgeMs)}ms)` : " (none)"}` : "—" })] }),
911
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", { children: "path" }), /* @__PURE__ */ y("dd", { children: n ?? "video-frame / live-mirror" })] }),
912
- t ? /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", { children: "shutter" }), /* @__PURE__ */ y("dd", { children: `live ${t.liveLuminance.toFixed(1)} · mirror ${t.mirrorLuminance.toFixed(1)}${Number.isFinite(t.mirrorAgeMs) ? ` (${Math.round(t.mirrorAgeMs)}ms)` : " (none)"}` })] }) : null,
913
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("dt", { children: "share" }), /* @__PURE__ */ y("dd", { children: /* @__PURE__ */ y("button", {
939
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", { children: "video" }), /* @__PURE__ */ x("dd", { children: e ? `${e.videoWidth}×${e.videoHeight} rs${e.readyState}${e.paused ? " paused" : ""}${e.rendered ? "" : " hidden"}` : "starting" })] }),
940
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", { children: "track" }), /* @__PURE__ */ x("dd", { children: e ? `${e.trackReadyState}${e.trackMuted ? " muted" : ""}${e.trackEnabled ? "" : " disabled"}` : "—" })] }),
941
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", { children: "torch" }), /* @__PURE__ */ x("dd", { children: e ? `${e.torch.mode} · ${e.torch.supported ? e.torch.on ? "on" : "off" : "unsupported"}` : "starting" })] }),
942
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", { children: "luma" }), /* @__PURE__ */ x("dd", { children: e ? `live ${e.liveLuminance.toFixed(1)} · mirror ${e.mirrorLuminance.toFixed(1)}${Number.isFinite(e.mirrorAgeMs) ? ` (${Math.round(e.mirrorAgeMs)}ms)` : " (none)"}` : "—" })] }),
943
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", { children: "path" }), /* @__PURE__ */ x("dd", { children: n ?? "video-frame / live-mirror" })] }),
944
+ t ? /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", { children: "shutter" }), /* @__PURE__ */ x("dd", { children: `live ${t.liveLuminance.toFixed(1)} · mirror ${t.mirrorLuminance.toFixed(1)}${Number.isFinite(t.mirrorAgeMs) ? ` (${Math.round(t.mirrorAgeMs)}ms)` : " (none)"}` })] }) : null,
945
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", { children: "share" }), /* @__PURE__ */ x("dd", { children: /* @__PURE__ */ x("button", {
914
946
  type: "button",
915
947
  className: "scanner-camera-overlay__copy",
916
- onClick: () => void i(),
917
- children: r === "copied" ? "Copied report" : r === "failed" ? "Copy failed" : "Copy report"
948
+ onClick: () => void a(),
949
+ children: i === "copied" ? "Copied report" : i === "failed" ? "Copy failed" : "Copy report"
918
950
  }) })] })
919
951
  ]
920
952
  });
921
953
  }
922
- function be() {
923
- let { autoCapture: e, phase: t, finderStatus: n, diagnostics: r, captureMethod: i, settings: a, cancel: o, capture: s, setAutoCapture: c, setTorch: l, usingSystemCamera: u, licenseBusy: d, useCase: f, licenseSide: p, guidanceHint: ee } = w(), te = a?.width, ne = a?.height, re = p !== "flip" && (u ? t === "ready" : e !== "only"), ie = f === "drivers-license" ? m(p ?? "front", u) : void 0, h = E({
954
+ function _e() {
955
+ let { autoCapture: e, phase: t, finderStatus: n, diagnostics: r, captureMethod: i, settings: a, cancel: o, capture: s, setAutoCapture: c, setTorch: l, usingSystemCamera: u, licenseBusy: d, useCase: f, licenseSide: p, guidanceHint: ee } = E(), h = a?.width, te = a?.height, g = p !== "flip" && (u ? t === "ready" : e !== "only"), _ = f === "drivers-license" ? m(p ?? "front", u) : void 0, ne = he({
924
956
  usingSystemCamera: u,
925
957
  phase: t,
926
958
  licenseBusy: d,
927
959
  holdStillSeconds: n?.holdStillSeconds,
928
960
  guidanceHint: ee,
929
961
  guidanceReason: n?.guidance.reason,
930
- licenseHeadline: ie?.headline,
962
+ licenseHeadline: _?.headline,
931
963
  licenseFlipCue: p === "flip"
932
- }), ae = !!n?.holdStillSeconds;
933
- return /* @__PURE__ */ b("div", {
964
+ }), v = !!n?.holdStillSeconds;
965
+ return /* @__PURE__ */ S("div", {
934
966
  className: "scanner-camera-overlay__controls",
935
967
  children: [
936
- /* @__PURE__ */ y("button", {
968
+ /* @__PURE__ */ x("button", {
937
969
  type: "button",
938
970
  className: "scanner-camera-overlay__cancel",
939
971
  onClick: o,
940
972
  children: "Cancel"
941
973
  }),
942
- /* @__PURE__ */ b("div", {
974
+ /* @__PURE__ */ S("div", {
943
975
  className: "scanner-camera-overlay__capture",
944
976
  children: [
945
- h && /* @__PURE__ */ y("p", {
946
- className: `scanner-camera-overlay__guidance${ae ? " is-ready" : ""}`,
977
+ ne && /* @__PURE__ */ x("p", {
978
+ className: `scanner-camera-overlay__guidance${v ? " is-ready" : ""}`,
947
979
  "aria-live": "polite",
948
- children: h
980
+ children: ne
949
981
  }),
950
- re && /* @__PURE__ */ y("button", {
982
+ g && /* @__PURE__ */ x("button", {
951
983
  type: "button",
952
984
  className: "scanner-camera-overlay__shutter",
953
985
  onClick: () => void s(),
954
986
  disabled: t !== "ready" || !!d,
955
987
  "aria-label": u ? "Take a photo with the system camera" : "Capture full-resolution photo",
956
- children: /* @__PURE__ */ y("span", {})
988
+ children: /* @__PURE__ */ x("span", {})
957
989
  }),
958
- !u && /* @__PURE__ */ b("div", {
990
+ !u && /* @__PURE__ */ S("div", {
959
991
  className: "scanner-camera-overlay__toggles",
960
- children: [n?.autoCapture.visible && /* @__PURE__ */ b("label", { children: [/* @__PURE__ */ y("input", {
992
+ children: [n?.autoCapture.visible && /* @__PURE__ */ S("label", { children: [/* @__PURE__ */ x("input", {
961
993
  type: "checkbox",
962
994
  checked: n.autoCapture.checked,
963
995
  onChange: (e) => c(e.target.checked)
964
- }), "Auto-capture"] }), r?.torch.visible && /* @__PURE__ */ b("label", {
996
+ }), "Auto-capture"] }), r?.torch.visible && /* @__PURE__ */ S("label", {
965
997
  title: r.torch.automatic ? "Torch is controlled automatically from scene brightness" : void 0,
966
- children: [/* @__PURE__ */ y("input", {
998
+ children: [/* @__PURE__ */ x("input", {
967
999
  type: "checkbox",
968
1000
  checked: r.torch.on,
969
1001
  disabled: !r.torch.mutable,
@@ -973,18 +1005,18 @@ function be() {
973
1005
  })
974
1006
  ]
975
1007
  }),
976
- /* @__PURE__ */ b("div", {
1008
+ /* @__PURE__ */ S("div", {
977
1009
  className: "scanner-camera-overlay__quality",
978
- children: [/* @__PURE__ */ y("span", { children: u ? "System camera" : i === "live-mirror" ? "Mirror" : "Camera" }), /* @__PURE__ */ y("strong", { children: te && ne ? `${te} × ${ne}` : u ? "Tap to photograph" : "Measuring…" })]
1010
+ children: [/* @__PURE__ */ x("span", { children: u ? "System camera" : i === "live-mirror" ? "Mirror" : "Camera" }), /* @__PURE__ */ x("strong", { children: h && te ? `${h} × ${te}` : u ? "Tap to photograph" : "Measuring…" })]
979
1011
  })
980
1012
  ]
981
1013
  });
982
1014
  }
983
- function P({ snapshot: e }) {
984
- let { modelDownload: t } = w();
985
- return /* @__PURE__ */ y(_e, { snapshot: e ?? t });
1015
+ function I({ snapshot: e }) {
1016
+ let { modelDownload: t } = E();
1017
+ return /* @__PURE__ */ x(me, { snapshot: e ?? t });
986
1018
  }
987
1019
  //#endregion
988
- export { be as ScannerControls, N as ScannerDiagnostics, O as ScannerFrame, P as ScannerModelDownload, j as ScannerNotice, k as ScannerPreview, he as ScannerProvider, ye as ScannerQuad, M as ScannerStatus, A as ScannerTopBar, w as useScanner, ge as useScannerRef };
1020
+ export { _e as ScannerControls, F as ScannerDiagnostics, k as ScannerFrame, I as ScannerModelDownload, N as ScannerNotice, A as ScannerPreview, fe as ScannerProvider, j as ScannerQuad, P as ScannerStatus, M as ScannerTopBar, E as useScanner, pe as useScannerRef };
989
1021
 
990
1022
  //# sourceMappingURL=react.js.map