@incodetech/web 0.0.0-dev-20260223-138ae97 → 0.0.0-dev-20260224-1accab3
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/id/id.es.js +251 -243
- package/package.json +2 -2
package/dist/id/id.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { u as e, S as C, B as
|
|
2
|
-
import { createIdCaptureManager as
|
|
3
|
-
import { d as L, y as
|
|
1
|
+
import { u as e, S as C, B as I, c as f, r as A, a as R } from "../incodeModule-DPTWfWvu.js";
|
|
2
|
+
import { createIdCaptureManager as z } from "@incodetech/core/id";
|
|
3
|
+
import { d as L, y as m, k as U, D as N, A as Z } from "../vendor-preact-CjD4WiuC.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
|
-
import { L as b, B as
|
|
6
|
-
import { P as x, I as
|
|
7
|
-
import { P as
|
|
5
|
+
import { L as b, B as O, P as G } from "../baseTutorial-BdLJBzYE.js";
|
|
6
|
+
import { P as x, I as $ } from "../incodeComponent-3T8Qyjnt.js";
|
|
7
|
+
import { P as K } from "../processing-Dnu3slQ9.js";
|
|
8
8
|
import "../instance-B-q0ZREN.js";
|
|
9
9
|
import { u as c } from "../useTranslation-CD9ZxEvP.js";
|
|
10
10
|
import { T as _, S as Q } from "../spinner-C-EwvA9l.js";
|
|
@@ -115,7 +115,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
115
115
|
)
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
|
-
),
|
|
118
|
+
), W = ({
|
|
119
119
|
className: n
|
|
120
120
|
}) => /* @__PURE__ */ e(
|
|
121
121
|
"svg",
|
|
@@ -166,7 +166,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
166
166
|
)
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
|
-
),
|
|
169
|
+
), X = ({ className: n }) => /* @__PURE__ */ e(
|
|
170
170
|
"svg",
|
|
171
171
|
{
|
|
172
172
|
width: "64",
|
|
@@ -187,12 +187,12 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
187
187
|
)
|
|
188
188
|
]
|
|
189
189
|
}
|
|
190
|
-
),
|
|
190
|
+
), Y = ({
|
|
191
191
|
onClose: n,
|
|
192
|
-
onTakeManually:
|
|
192
|
+
onTakeManually: i
|
|
193
193
|
}) => {
|
|
194
|
-
const { t
|
|
195
|
-
|
|
194
|
+
const { t } = c(), r = () => {
|
|
195
|
+
i(), n();
|
|
196
196
|
};
|
|
197
197
|
return /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModal", children: /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModalContent", children: [
|
|
198
198
|
/* @__PURE__ */ e("header", { class: "IncodeCommonIssuesHeader", children: /* @__PURE__ */ e(
|
|
@@ -201,49 +201,49 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
201
201
|
type: "button",
|
|
202
202
|
class: "IncodeCommonIssuesCloseButton",
|
|
203
203
|
onClick: n,
|
|
204
|
-
"aria-label":
|
|
204
|
+
"aria-label": t("commonIssues.close"),
|
|
205
205
|
children: /* @__PURE__ */ e(q, {})
|
|
206
206
|
}
|
|
207
207
|
) }),
|
|
208
208
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesContent", children: [
|
|
209
|
-
/* @__PURE__ */ e(
|
|
209
|
+
/* @__PURE__ */ e(X, { className: "IncodeCommonIssuesQuestionIcon" }),
|
|
210
210
|
/* @__PURE__ */ e(C, { size: 12 }),
|
|
211
|
-
/* @__PURE__ */ e("h2", { class: "IncodeCommonIssuesTitle", children:
|
|
211
|
+
/* @__PURE__ */ e("h2", { class: "IncodeCommonIssuesTitle", children: t("commonIssues.commonIssues") }),
|
|
212
212
|
/* @__PURE__ */ e(C, { size: 24 }),
|
|
213
213
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCards", children: [
|
|
214
214
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
|
|
215
215
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(J, {}) }),
|
|
216
216
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
217
|
-
/* @__PURE__ */ e("h5", { class: "IncodeCommonIssuesCardTitle", children:
|
|
218
|
-
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children:
|
|
217
|
+
/* @__PURE__ */ e("h5", { class: "IncodeCommonIssuesCardTitle", children: t("commonIssues.glarePresent") }),
|
|
218
|
+
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: t("commonIssues.glarePresentDescription") })
|
|
219
219
|
] })
|
|
220
220
|
] }),
|
|
221
221
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
|
|
222
222
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(j, {}) }),
|
|
223
223
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
224
|
-
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children:
|
|
225
|
-
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children:
|
|
224
|
+
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children: t("commonIssues.blurPresent") }),
|
|
225
|
+
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: t("commonIssues.blurPresentDescription") })
|
|
226
226
|
] })
|
|
227
227
|
] }),
|
|
228
228
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
|
|
229
|
-
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(
|
|
229
|
+
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(W, {}) }),
|
|
230
230
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
|
|
231
|
-
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children:
|
|
232
|
-
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children:
|
|
231
|
+
/* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children: t("commonIssues.notReadable") }),
|
|
232
|
+
/* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: t("commonIssues.notReadableDescription") })
|
|
233
233
|
] })
|
|
234
234
|
] })
|
|
235
235
|
] }),
|
|
236
236
|
/* @__PURE__ */ e("div", { class: "IncodeCommonIssuesButtons", children: [
|
|
237
237
|
/* @__PURE__ */ e(
|
|
238
|
-
|
|
238
|
+
I,
|
|
239
239
|
{
|
|
240
240
|
variant: "link",
|
|
241
241
|
onClick: r,
|
|
242
242
|
class: "IncodeCommonIssuesTakeManually",
|
|
243
|
-
children:
|
|
243
|
+
children: t("commonIssues.takeManually")
|
|
244
244
|
}
|
|
245
245
|
),
|
|
246
|
-
/* @__PURE__ */ e(
|
|
246
|
+
/* @__PURE__ */ e(I, { onClick: n, class: "IncodeCommonIssuesTryAgain", children: t("commonIssues.tryAgain") })
|
|
247
247
|
] })
|
|
248
248
|
] })
|
|
249
249
|
] }) });
|
|
@@ -265,18 +265,18 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
265
265
|
}
|
|
266
266
|
)
|
|
267
267
|
}
|
|
268
|
-
),
|
|
268
|
+
), e1 = ({
|
|
269
269
|
orientation: n,
|
|
270
|
-
mode:
|
|
271
|
-
state:
|
|
270
|
+
mode: i,
|
|
271
|
+
state: t,
|
|
272
272
|
children: r,
|
|
273
273
|
className: o
|
|
274
274
|
}) => {
|
|
275
|
-
const l = n !== "vertical" ||
|
|
275
|
+
const l = n !== "vertical" || i === "passport", a = i === "passport", s = `IncodeCaptureFrame${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
276
276
|
return /* @__PURE__ */ e(
|
|
277
277
|
"div",
|
|
278
278
|
{
|
|
279
|
-
class:
|
|
279
|
+
class: f(
|
|
280
280
|
"IncodeCaptureFrame",
|
|
281
281
|
l ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
|
|
282
282
|
s,
|
|
@@ -286,10 +286,10 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
286
286
|
children: r
|
|
287
287
|
}
|
|
288
288
|
);
|
|
289
|
-
},
|
|
289
|
+
}, k = ({
|
|
290
290
|
imageUrl: n,
|
|
291
|
-
orientation:
|
|
292
|
-
mode:
|
|
291
|
+
orientation: i,
|
|
292
|
+
mode: t,
|
|
293
293
|
borderState: r,
|
|
294
294
|
topContent: o,
|
|
295
295
|
bottomContent: l,
|
|
@@ -299,10 +299,10 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
299
299
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayout", children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayoutContent", children: [
|
|
300
300
|
o && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingTopArea", children: o }),
|
|
301
301
|
/* @__PURE__ */ e(
|
|
302
|
-
|
|
302
|
+
e1,
|
|
303
303
|
{
|
|
304
|
-
orientation:
|
|
305
|
-
mode:
|
|
304
|
+
orientation: i,
|
|
305
|
+
mode: t === "id" ? "front" : t,
|
|
306
306
|
state: r,
|
|
307
307
|
children: [
|
|
308
308
|
/* @__PURE__ */ e(
|
|
@@ -325,24 +325,24 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
325
325
|
l
|
|
326
326
|
] })
|
|
327
327
|
] }) }) });
|
|
328
|
-
},
|
|
328
|
+
}, t1 = ({
|
|
329
329
|
imageUrl: n,
|
|
330
|
-
progress:
|
|
331
|
-
orientation:
|
|
330
|
+
progress: i,
|
|
331
|
+
orientation: t,
|
|
332
332
|
mode: r
|
|
333
333
|
}) => {
|
|
334
|
-
const { t: o } = c(), l =
|
|
335
|
-
return
|
|
334
|
+
const { t: o } = c(), l = t !== "vertical" || r === "passport", [a, s] = L(null);
|
|
335
|
+
return m(() => {
|
|
336
336
|
l ? import("../id-laser-h-BBV3r3rz.js").then((d) => {
|
|
337
337
|
s(d.default);
|
|
338
338
|
}) : import("../id-laser-v-BTHJaSfx.js").then((d) => {
|
|
339
339
|
s(d.default);
|
|
340
340
|
});
|
|
341
341
|
}, [l]), /* @__PURE__ */ e(
|
|
342
|
-
|
|
342
|
+
k,
|
|
343
343
|
{
|
|
344
344
|
imageUrl: n,
|
|
345
|
-
orientation:
|
|
345
|
+
orientation: t,
|
|
346
346
|
mode: r,
|
|
347
347
|
borderState: "analyzing",
|
|
348
348
|
topContent: /* @__PURE__ */ e("div", { class: "IncodeAnalyzingContent", children: [
|
|
@@ -350,7 +350,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
350
350
|
"div",
|
|
351
351
|
{
|
|
352
352
|
class: "IncodeAnalyzingProgressFill",
|
|
353
|
-
style: { width: `${
|
|
353
|
+
style: { width: `${i}%` }
|
|
354
354
|
}
|
|
355
355
|
) }),
|
|
356
356
|
/* @__PURE__ */ e("h2", { class: "IncodeAnalyzingTitle", children: o("idv2.capture.processing.analyzing") })
|
|
@@ -365,7 +365,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
365
365
|
) : null
|
|
366
366
|
}
|
|
367
367
|
);
|
|
368
|
-
},
|
|
368
|
+
}, i1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
369
369
|
"svg",
|
|
370
370
|
{
|
|
371
371
|
class: n,
|
|
@@ -382,7 +382,7 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
382
382
|
}
|
|
383
383
|
)
|
|
384
384
|
}
|
|
385
|
-
),
|
|
385
|
+
), F = ({ className: n }) => /* @__PURE__ */ e(
|
|
386
386
|
"svg",
|
|
387
387
|
{
|
|
388
388
|
class: n,
|
|
@@ -399,10 +399,10 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
399
399
|
}
|
|
400
400
|
)
|
|
401
401
|
}
|
|
402
|
-
),
|
|
402
|
+
), V = ({
|
|
403
403
|
variant: n,
|
|
404
|
-
imageUrl:
|
|
405
|
-
orientation:
|
|
404
|
+
imageUrl: i,
|
|
405
|
+
orientation: t,
|
|
406
406
|
mode: r,
|
|
407
407
|
title: o,
|
|
408
408
|
subtitle: l,
|
|
@@ -410,86 +410,86 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
410
410
|
onButtonClick: s,
|
|
411
411
|
attemptsRemaining: d
|
|
412
412
|
}) => {
|
|
413
|
-
const { t:
|
|
413
|
+
const { t: u } = c();
|
|
414
414
|
return /* @__PURE__ */ e(
|
|
415
|
-
|
|
415
|
+
k,
|
|
416
416
|
{
|
|
417
|
-
imageUrl:
|
|
418
|
-
orientation:
|
|
417
|
+
imageUrl: i,
|
|
418
|
+
orientation: t,
|
|
419
419
|
mode: r,
|
|
420
420
|
borderState: n,
|
|
421
421
|
topContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultContent", children: [
|
|
422
|
-
n === "success" ? /* @__PURE__ */ e(
|
|
422
|
+
n === "success" ? /* @__PURE__ */ e(i1, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ e(F, { className: "IncodeIdProcessingResultIcon" }),
|
|
423
423
|
/* @__PURE__ */ e(C, { size: 16 }),
|
|
424
424
|
o && /* @__PURE__ */ e("h2", { class: "IncodeIdProcessingResultTitle", children: o }),
|
|
425
|
-
l && /* @__PURE__ */ e(
|
|
425
|
+
l && /* @__PURE__ */ e(U, { children: [
|
|
426
426
|
/* @__PURE__ */ e(C, { size: 12 }),
|
|
427
427
|
/* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultSubtitle", children: l })
|
|
428
428
|
] })
|
|
429
429
|
] }),
|
|
430
430
|
bottomContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultButtonContainer", children: [
|
|
431
|
-
d !== void 0 && d > 0 && /* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultAttempts", children:
|
|
431
|
+
d !== void 0 && d > 0 && /* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultAttempts", children: u("v2.idError.attemptsLeft", {
|
|
432
432
|
count: d
|
|
433
433
|
}) }),
|
|
434
|
-
/* @__PURE__ */ e(
|
|
434
|
+
/* @__PURE__ */ e(I, { onClick: s, "data-testid": "retry-button", children: a })
|
|
435
435
|
] })
|
|
436
436
|
}
|
|
437
437
|
);
|
|
438
|
-
},
|
|
439
|
-
const { t
|
|
440
|
-
if (!
|
|
438
|
+
}, n1 = ({ manager: n, state: i }) => {
|
|
439
|
+
const { t } = c();
|
|
440
|
+
if (!i.previewImageUrl)
|
|
441
441
|
return null;
|
|
442
|
-
const r =
|
|
442
|
+
const r = i.currentMode === "passport" ? "passport" : "id", o = () => i.needsBackCapture ? t("v2.idSuccess.subtitle") : i.needsFrontCapture ? t("idv2.capture.processing.successBackSubtitleScanFront") : t("v2.idSuccess.subtitleBack"), l = () => i.needsBackCapture ? t("idv2.capture.processing.scanBack") : i.needsFrontCapture ? t("idv2.capture.processing.scanFront") : t("idv2.capturePreview.continue");
|
|
443
443
|
return /* @__PURE__ */ e(
|
|
444
|
-
|
|
444
|
+
V,
|
|
445
445
|
{
|
|
446
446
|
variant: "success",
|
|
447
|
-
imageUrl:
|
|
448
|
-
orientation:
|
|
447
|
+
imageUrl: i.previewImageUrl,
|
|
448
|
+
orientation: i.orientation,
|
|
449
449
|
mode: r,
|
|
450
|
-
title:
|
|
451
|
-
subtitle:
|
|
452
|
-
buttonText:
|
|
450
|
+
title: t("v2.idSuccess.title"),
|
|
451
|
+
subtitle: o(),
|
|
452
|
+
buttonText: l(),
|
|
453
453
|
onButtonClick: () => n.nextStep()
|
|
454
454
|
}
|
|
455
455
|
);
|
|
456
|
-
}, D = ({ manager: n, state:
|
|
456
|
+
}, D = ({ manager: n, state: i, ...t }) => {
|
|
457
457
|
const { t: r } = c();
|
|
458
|
-
if (
|
|
458
|
+
if (i.status === "error")
|
|
459
459
|
return /* @__PURE__ */ e("div", { class: "IncodeIdError", children: [
|
|
460
|
-
/* @__PURE__ */ e("div", { class: "IncodeIdErrorMessage", children:
|
|
461
|
-
/* @__PURE__ */ e(
|
|
460
|
+
/* @__PURE__ */ e("div", { class: "IncodeIdErrorMessage", children: i.error }),
|
|
461
|
+
/* @__PURE__ */ e(I, { onClick: () => n.reset(), "data-testid": "retry-button", children: r("idv2.capturePreview.retry") })
|
|
462
462
|
] });
|
|
463
|
-
const o =
|
|
464
|
-
return
|
|
465
|
-
|
|
463
|
+
const o = i.currentMode === "passport" ? "passport" : "id";
|
|
464
|
+
return i.previewImageUrl ? /* @__PURE__ */ e(
|
|
465
|
+
V,
|
|
466
466
|
{
|
|
467
467
|
variant: "error",
|
|
468
|
-
imageUrl:
|
|
469
|
-
orientation:
|
|
468
|
+
imageUrl: i.previewImageUrl,
|
|
469
|
+
orientation: i.orientation,
|
|
470
470
|
mode: o,
|
|
471
|
-
title:
|
|
472
|
-
subtitle:
|
|
473
|
-
buttonText:
|
|
471
|
+
title: i.uploadErrorMessage,
|
|
472
|
+
subtitle: i.uploadErrorDescription,
|
|
473
|
+
buttonText: i.canRetry ? r("idv2.capturePreview.tryAgain") : r("idv2.capturePreview.continue"),
|
|
474
474
|
onButtonClick: () => n.continueFromError(),
|
|
475
|
-
attemptsRemaining:
|
|
475
|
+
attemptsRemaining: i.attemptsRemaining
|
|
476
476
|
}
|
|
477
477
|
) : null;
|
|
478
|
-
},
|
|
479
|
-
const { t } = c(),
|
|
478
|
+
}, r1 = ({ manager: n }) => {
|
|
479
|
+
const { t: i } = c(), t = () => {
|
|
480
480
|
n.retryCapture();
|
|
481
481
|
};
|
|
482
482
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdExpiredPage", children: [
|
|
483
483
|
/* @__PURE__ */ e("div", { class: "IncodeIdExpiredContent", children: [
|
|
484
|
-
/* @__PURE__ */ e(
|
|
485
|
-
/* @__PURE__ */ e(_, { className: "IncodeIdExpiredTitle", children:
|
|
484
|
+
/* @__PURE__ */ e(F, { className: "IncodeIdExpiredIcon" }),
|
|
485
|
+
/* @__PURE__ */ e(_, { className: "IncodeIdExpiredTitle", children: i("idv2.capture.notifications.expiredId") }),
|
|
486
486
|
/* @__PURE__ */ e(C, { size: 12 }),
|
|
487
|
-
/* @__PURE__ */ e("p", { class: "IncodeIdExpiredSubtitle", children:
|
|
487
|
+
/* @__PURE__ */ e("p", { class: "IncodeIdExpiredSubtitle", children: i("idv2.capture.notifications.useDifferent") }),
|
|
488
488
|
/* @__PURE__ */ e(C, { size: 80 })
|
|
489
489
|
] }),
|
|
490
|
-
/* @__PURE__ */ e("div", { class: "IncodeIdExpiredButtonContainer", children: /* @__PURE__ */ e(
|
|
490
|
+
/* @__PURE__ */ e("div", { class: "IncodeIdExpiredButtonContainer", children: /* @__PURE__ */ e(I, { variant: "primary", onClick: t, children: i("idv2.unacceptedId.tryAgain") }) })
|
|
491
491
|
] });
|
|
492
|
-
},
|
|
492
|
+
}, o1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
493
493
|
"svg",
|
|
494
494
|
{
|
|
495
495
|
width: "30",
|
|
@@ -520,8 +520,8 @@ const j = ({ className: n }) => /* @__PURE__ */ e(
|
|
|
520
520
|
)
|
|
521
521
|
]
|
|
522
522
|
}
|
|
523
|
-
),
|
|
524
|
-
let
|
|
523
|
+
), p = /* @__PURE__ */ new Map();
|
|
524
|
+
let T = !1;
|
|
525
525
|
const w = {
|
|
526
526
|
blur: () => import("../blurdevicelottie-_BZRug1c.js"),
|
|
527
527
|
glare: () => import("../glaredevicelottie-DLuIStvb.js"),
|
|
@@ -529,90 +529,90 @@ const w = {
|
|
|
529
529
|
front: () => import("../frontdevicelottie-KhKxT5n9.js"),
|
|
530
530
|
back: () => import("../backdevicelottie-B4NgyWmX.js")
|
|
531
531
|
};
|
|
532
|
-
function
|
|
533
|
-
|
|
532
|
+
function S(n) {
|
|
533
|
+
T || (T = !0, Promise.all([
|
|
534
534
|
w.blur(),
|
|
535
535
|
w.glare(),
|
|
536
536
|
w.align(),
|
|
537
537
|
w.front(),
|
|
538
538
|
w.back()
|
|
539
|
-
]).then(([
|
|
540
|
-
|
|
539
|
+
]).then(([i, t, r, o, l]) => {
|
|
540
|
+
p.set("blur", i.default), p.set("glare", t.default), p.set("align", r.default), p.set("front", o.default), p.set("back", l.default), n?.();
|
|
541
541
|
}).catch(() => {
|
|
542
542
|
}));
|
|
543
543
|
}
|
|
544
|
-
function o1() {
|
|
545
|
-
F();
|
|
546
|
-
}
|
|
547
544
|
function l1() {
|
|
548
|
-
|
|
549
|
-
|
|
545
|
+
S();
|
|
546
|
+
}
|
|
547
|
+
function s1() {
|
|
548
|
+
m(() => {
|
|
549
|
+
l1();
|
|
550
550
|
}, []);
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
const { t
|
|
554
|
-
if (
|
|
555
|
-
|
|
552
|
+
function a1(n, i) {
|
|
553
|
+
const { t } = c(), [, r] = L(0);
|
|
554
|
+
if (m(() => {
|
|
555
|
+
S(() => r((o) => o + 1));
|
|
556
556
|
}, []), n === "blur")
|
|
557
557
|
return {
|
|
558
|
-
title:
|
|
559
|
-
description:
|
|
560
|
-
animationData:
|
|
558
|
+
title: t("idv2.capture.notifications.blur.title"),
|
|
559
|
+
description: t("idv2.capture.notifications.blur.description"),
|
|
560
|
+
animationData: p.get("blur") ?? null
|
|
561
561
|
};
|
|
562
562
|
if (n === "glare")
|
|
563
563
|
return {
|
|
564
|
-
title:
|
|
565
|
-
description:
|
|
566
|
-
animationData:
|
|
564
|
+
title: t("idv2.capture.notifications.glare.title"),
|
|
565
|
+
description: t("idv2.capture.notifications.glare.description"),
|
|
566
|
+
animationData: p.get("glare") ?? null
|
|
567
567
|
};
|
|
568
568
|
if (n === "farAway")
|
|
569
569
|
return {
|
|
570
|
-
title:
|
|
571
|
-
description:
|
|
572
|
-
animationData:
|
|
570
|
+
title: t("idv2.capture.notifications.notAligned.title"),
|
|
571
|
+
description: t("idv2.capture.notifications.notAligned.description"),
|
|
572
|
+
animationData: p.get("align") ?? null
|
|
573
573
|
};
|
|
574
574
|
if (n === "wrongSide") {
|
|
575
|
-
const o =
|
|
575
|
+
const o = i === "back";
|
|
576
576
|
return {
|
|
577
|
-
title:
|
|
578
|
-
description:
|
|
579
|
-
animationData:
|
|
577
|
+
title: t(o ? "idv2.capture.notifications.showBack.title" : "idv2.capture.notifications.showFront.title"),
|
|
578
|
+
description: t(o ? "idv2.capture.notifications.showBack.description" : "idv2.capture.notifications.showFront.description"),
|
|
579
|
+
animationData: p.get(o ? "back" : "front") ?? null
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
582
|
return null;
|
|
583
583
|
}
|
|
584
|
-
const
|
|
584
|
+
const c1 = ({
|
|
585
585
|
detectionStatus: n,
|
|
586
|
-
mode:
|
|
586
|
+
mode: i
|
|
587
587
|
}) => {
|
|
588
|
-
const
|
|
589
|
-
return
|
|
590
|
-
/* @__PURE__ */ e("div", { class:
|
|
591
|
-
/* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationTitle", children:
|
|
592
|
-
|
|
588
|
+
const t = a1(n, i);
|
|
589
|
+
return t ? /* @__PURE__ */ e("div", { class: f("IncodeIdCaptureNotification"), children: /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationContent", children: [
|
|
590
|
+
/* @__PURE__ */ e("div", { class: f("IncodeIdCaptureNotificationText"), children: [
|
|
591
|
+
/* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationTitle", children: t.title }),
|
|
592
|
+
t.description && /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationDescription", children: t.description })
|
|
593
593
|
] }),
|
|
594
594
|
/* @__PURE__ */ e(C, { size: 16, direction: "horizontal" }),
|
|
595
|
-
|
|
595
|
+
t.animationData && /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationAnimation", children: /* @__PURE__ */ e(b, { animationData: t.animationData, loop: !0 }) })
|
|
596
596
|
] }) }) : null;
|
|
597
|
-
},
|
|
597
|
+
}, d1 = N(
|
|
598
598
|
({
|
|
599
599
|
mode: n,
|
|
600
|
-
orientation:
|
|
601
|
-
detectionStatus:
|
|
600
|
+
orientation: i,
|
|
601
|
+
detectionStatus: t,
|
|
602
602
|
counterValue: r,
|
|
603
603
|
isCapturing: o,
|
|
604
604
|
onOpenHelp: l
|
|
605
605
|
}, a) => {
|
|
606
606
|
const { t: s } = c();
|
|
607
|
-
|
|
608
|
-
const d =
|
|
609
|
-
if (o ||
|
|
607
|
+
s1();
|
|
608
|
+
const d = t === "detecting" || t === "idNotDetected" || t === "manualCapture", u = () => o || t === "capturing" ? "Capturing" : t === "blur" || t === "glare" || t === "wrongSide" || t === "farAway" ? "Error" : "Idle", y = () => {
|
|
609
|
+
if (o || t === "capturing")
|
|
610
610
|
return {
|
|
611
611
|
title: s("idv2.capture.takingPhoto"),
|
|
612
612
|
subtitle: s("idv2.capture.dontMove")
|
|
613
613
|
};
|
|
614
614
|
if (d) {
|
|
615
|
-
const M =
|
|
615
|
+
const M = t === "manualCapture";
|
|
616
616
|
return n === "passport" ? {
|
|
617
617
|
title: s("idv2.capture.fillFramePassport"),
|
|
618
618
|
subtitle: M ? "" : s("idv2.capture.v2.autoCapture")
|
|
@@ -625,19 +625,19 @@ const a1 = ({
|
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
return null;
|
|
628
|
-
}, B =
|
|
628
|
+
}, B = u(), v = y(), g = n === "passport", h = i !== "vertical" || g;
|
|
629
629
|
return /* @__PURE__ */ e(
|
|
630
630
|
"div",
|
|
631
631
|
{
|
|
632
|
-
class:
|
|
632
|
+
class: f(
|
|
633
633
|
"IncodeCaptureOverlay",
|
|
634
|
-
!
|
|
634
|
+
!h && "IncodeCaptureOverlayVertical"
|
|
635
635
|
),
|
|
636
636
|
children: [
|
|
637
637
|
/* @__PURE__ */ e(
|
|
638
|
-
|
|
638
|
+
u1,
|
|
639
639
|
{
|
|
640
|
-
detectionStatus:
|
|
640
|
+
detectionStatus: t,
|
|
641
641
|
mode: n,
|
|
642
642
|
topContent: v
|
|
643
643
|
}
|
|
@@ -646,9 +646,9 @@ const a1 = ({
|
|
|
646
646
|
"div",
|
|
647
647
|
{
|
|
648
648
|
ref: a,
|
|
649
|
-
class:
|
|
649
|
+
class: f(
|
|
650
650
|
"IncodeCaptureFrame",
|
|
651
|
-
|
|
651
|
+
h ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
|
|
652
652
|
`IncodeCaptureFrame${B}`,
|
|
653
653
|
g && "IncodeCaptureFramePassport"
|
|
654
654
|
),
|
|
@@ -660,40 +660,40 @@ const a1 = ({
|
|
|
660
660
|
}
|
|
661
661
|
);
|
|
662
662
|
}
|
|
663
|
-
),
|
|
664
|
-
/* @__PURE__ */ e(
|
|
663
|
+
), u1 = ({ detectionStatus: n, mode: i, topContent: t }) => /* @__PURE__ */ e("div", { class: "IncodeCaptureTopSection", children: [
|
|
664
|
+
/* @__PURE__ */ e(c1, { detectionStatus: n, mode: i }),
|
|
665
665
|
/* @__PURE__ */ e(
|
|
666
666
|
"div",
|
|
667
667
|
{
|
|
668
|
-
class:
|
|
668
|
+
class: f(
|
|
669
669
|
"IncodeCaptureTopText",
|
|
670
|
-
!
|
|
670
|
+
!t && "IncodeCaptureTopTextHidden"
|
|
671
671
|
),
|
|
672
672
|
children: [
|
|
673
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopTextTitle", children:
|
|
674
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopTextSubtitle", children:
|
|
673
|
+
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopTextTitle", children: t?.title || " " }),
|
|
674
|
+
/* @__PURE__ */ e("div", { class: "IncodeCaptureTopTextSubtitle", children: t?.subtitle || " " })
|
|
675
675
|
]
|
|
676
676
|
}
|
|
677
677
|
)
|
|
678
678
|
] }), C1 = ({ onOpenHelp: n }) => {
|
|
679
|
-
const { t } = c();
|
|
679
|
+
const { t: i } = c();
|
|
680
680
|
return /* @__PURE__ */ e("div", { class: "IncodeCaptureBottomSection", children: [
|
|
681
681
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureEncryptionLabel", children: [
|
|
682
682
|
/* @__PURE__ */ e(P, { className: "IncodeCaptureEncryptionIcon" }),
|
|
683
|
-
/* @__PURE__ */ e("span", { children:
|
|
683
|
+
/* @__PURE__ */ e("span", { children: i("v2.capture.label") })
|
|
684
684
|
] }),
|
|
685
685
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureHelpButton", children: /* @__PURE__ */ e(
|
|
686
|
-
|
|
686
|
+
I,
|
|
687
687
|
{
|
|
688
688
|
variant: "link",
|
|
689
689
|
onClick: n,
|
|
690
|
-
"aria-label":
|
|
690
|
+
"aria-label": i("idv2.needHelp.open"),
|
|
691
691
|
class: "IncodeCaptureHelpButtonInner",
|
|
692
|
-
children: /* @__PURE__ */ e(
|
|
692
|
+
children: /* @__PURE__ */ e(o1, {})
|
|
693
693
|
}
|
|
694
694
|
) })
|
|
695
695
|
] });
|
|
696
|
-
},
|
|
696
|
+
}, p1 = ({
|
|
697
697
|
className: n
|
|
698
698
|
}) => /* @__PURE__ */ e(
|
|
699
699
|
"svg",
|
|
@@ -718,11 +718,11 @@ const a1 = ({
|
|
|
718
718
|
/* @__PURE__ */ e("circle", { cx: "33.5926", cy: "33.9996", r: "25.4187", fill: "white" })
|
|
719
719
|
]
|
|
720
720
|
}
|
|
721
|
-
),
|
|
721
|
+
), h1 = ({
|
|
722
722
|
onClick: n,
|
|
723
|
-
disabled:
|
|
723
|
+
disabled: i
|
|
724
724
|
}) => {
|
|
725
|
-
const { t
|
|
725
|
+
const { t } = c();
|
|
726
726
|
return /* @__PURE__ */ e(
|
|
727
727
|
"div",
|
|
728
728
|
{
|
|
@@ -730,64 +730,64 @@ const a1 = ({
|
|
|
730
730
|
"data-testid": "manual-capture-button",
|
|
731
731
|
children: [
|
|
732
732
|
/* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureTooltipContainer", children: /* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureTooltip", children: /* @__PURE__ */ e("ol", { class: "IncodeIdManualCaptureTooltipList", children: [
|
|
733
|
-
/* @__PURE__ */ e("li", { children:
|
|
734
|
-
/* @__PURE__ */ e("li", { children:
|
|
733
|
+
/* @__PURE__ */ e("li", { children: t("idv2.commonIssues.firstStep") }),
|
|
734
|
+
/* @__PURE__ */ e("li", { children: t("idv2.commonIssues.secondStep") })
|
|
735
735
|
] }) }) }),
|
|
736
736
|
/* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureButtonContent", children: /* @__PURE__ */ e(
|
|
737
|
-
|
|
737
|
+
I,
|
|
738
738
|
{
|
|
739
739
|
variant: "link",
|
|
740
740
|
onClick: n,
|
|
741
|
-
disabled:
|
|
741
|
+
disabled: i,
|
|
742
742
|
class: "IncodeIdManualCaptureButtonButton",
|
|
743
|
-
"aria-label":
|
|
744
|
-
children: /* @__PURE__ */ e(
|
|
743
|
+
"aria-label": t("idv2.capture.manualCapture.ariaLabel"),
|
|
744
|
+
children: /* @__PURE__ */ e(p1, {})
|
|
745
745
|
}
|
|
746
746
|
) })
|
|
747
747
|
]
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
|
-
},
|
|
751
|
-
const { t
|
|
752
|
-
if (
|
|
750
|
+
}, I1 = ({ manager: n, state: i }) => {
|
|
751
|
+
const { t } = c();
|
|
752
|
+
if (i.captureStatus === "initializing")
|
|
753
753
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureInitializing", children: [
|
|
754
754
|
/* @__PURE__ */ e(Q, { size: "large" }),
|
|
755
|
-
/* @__PURE__ */ e("p", { class: "IncodeCaptureInitializingText", children:
|
|
755
|
+
/* @__PURE__ */ e("p", { class: "IncodeCaptureInitializingText", children: t("idv2.capture.initializing") })
|
|
756
756
|
] }) });
|
|
757
|
-
if (
|
|
758
|
-
const r =
|
|
757
|
+
if (i.captureStatus === "uploading" && i.previewImageUrl) {
|
|
758
|
+
const r = i.currentMode === "passport" ? "passport" : "id";
|
|
759
759
|
return /* @__PURE__ */ e(
|
|
760
|
-
|
|
760
|
+
t1,
|
|
761
761
|
{
|
|
762
|
-
imageUrl:
|
|
763
|
-
progress:
|
|
764
|
-
orientation:
|
|
762
|
+
imageUrl: i.previewImageUrl,
|
|
763
|
+
progress: i.uploadProgress ?? 0,
|
|
764
|
+
orientation: i.orientation,
|
|
765
765
|
mode: r
|
|
766
766
|
}
|
|
767
767
|
);
|
|
768
768
|
}
|
|
769
|
-
return
|
|
770
|
-
},
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
769
|
+
return i.captureStatus === "success" && i.previewImageUrl ? /* @__PURE__ */ e(n1, { manager: n, state: i }) : i.captureStatus === "uploadError" && i.previewImageUrl ? /* @__PURE__ */ e(D, { manager: n, state: i }) : /* @__PURE__ */ e(f1, { manager: n, state: i });
|
|
770
|
+
}, f1 = ({ manager: n, state: i }) => {
|
|
771
|
+
const t = Z(null), r = Z(null), [o, l] = L(!1);
|
|
772
|
+
m(() => {
|
|
773
|
+
t.current && i.stream && (t.current.srcObject = i.stream, t.current.play().catch(() => {
|
|
774
774
|
}));
|
|
775
|
-
}, [
|
|
775
|
+
}, [i.stream]), m(() => {
|
|
776
776
|
const v = () => {
|
|
777
777
|
const g = r.current;
|
|
778
778
|
if (!g)
|
|
779
779
|
return;
|
|
780
|
-
const
|
|
780
|
+
const h = g.getBoundingClientRect();
|
|
781
781
|
n.updateDetectionArea({
|
|
782
|
-
x:
|
|
783
|
-
y:
|
|
784
|
-
width:
|
|
785
|
-
height:
|
|
782
|
+
x: h.left,
|
|
783
|
+
y: h.top,
|
|
784
|
+
width: h.width,
|
|
785
|
+
height: h.height
|
|
786
786
|
});
|
|
787
787
|
};
|
|
788
788
|
return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
789
|
-
}, [n,
|
|
790
|
-
const a =
|
|
789
|
+
}, [n, i.orientation]);
|
|
790
|
+
const a = i.captureStatus === "capturing" || i.detectionStatus === "capturing", s = i.detectionStatus, d = s === "manualCapture" || i.showCaptureButtonInAuto && i.captureStatus === "detecting" && s !== "capturing", u = () => {
|
|
791
791
|
l(!0);
|
|
792
792
|
}, y = () => {
|
|
793
793
|
l(!1);
|
|
@@ -798,7 +798,7 @@ const a1 = ({
|
|
|
798
798
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureVideo", children: /* @__PURE__ */ e(
|
|
799
799
|
"video",
|
|
800
800
|
{
|
|
801
|
-
ref:
|
|
801
|
+
ref: t,
|
|
802
802
|
autoplay: !0,
|
|
803
803
|
playsInline: !0,
|
|
804
804
|
class: "IncodeCaptureVideoElement",
|
|
@@ -807,27 +807,27 @@ const a1 = ({
|
|
|
807
807
|
}
|
|
808
808
|
) }),
|
|
809
809
|
/* @__PURE__ */ e(
|
|
810
|
-
|
|
810
|
+
d1,
|
|
811
811
|
{
|
|
812
812
|
ref: r,
|
|
813
|
-
mode:
|
|
814
|
-
orientation:
|
|
815
|
-
detectionStatus:
|
|
816
|
-
counterValue:
|
|
813
|
+
mode: i.currentMode,
|
|
814
|
+
orientation: i.orientation,
|
|
815
|
+
detectionStatus: i.detectionStatus,
|
|
816
|
+
counterValue: i.counterValue,
|
|
817
817
|
isCapturing: a,
|
|
818
|
-
onOpenHelp:
|
|
818
|
+
onOpenHelp: u
|
|
819
819
|
}
|
|
820
820
|
),
|
|
821
|
-
d && /* @__PURE__ */ e(
|
|
821
|
+
d && /* @__PURE__ */ e(h1, { onClick: () => n.capture() }),
|
|
822
822
|
o && /* @__PURE__ */ e(
|
|
823
|
-
|
|
823
|
+
Y,
|
|
824
824
|
{
|
|
825
825
|
onClose: y,
|
|
826
826
|
onTakeManually: B
|
|
827
827
|
}
|
|
828
828
|
)
|
|
829
829
|
] }) });
|
|
830
|
-
},
|
|
830
|
+
}, m1 = () => /* @__PURE__ */ e(
|
|
831
831
|
"svg",
|
|
832
832
|
{
|
|
833
833
|
width: "119",
|
|
@@ -1021,7 +1021,7 @@ const a1 = ({
|
|
|
1021
1021
|
] })
|
|
1022
1022
|
]
|
|
1023
1023
|
}
|
|
1024
|
-
),
|
|
1024
|
+
), v1 = () => /* @__PURE__ */ e(
|
|
1025
1025
|
"svg",
|
|
1026
1026
|
{
|
|
1027
1027
|
width: "118",
|
|
@@ -1326,7 +1326,7 @@ const a1 = ({
|
|
|
1326
1326
|
] })
|
|
1327
1327
|
]
|
|
1328
1328
|
}
|
|
1329
|
-
),
|
|
1329
|
+
), g1 = ({ className: n }) => /* @__PURE__ */ e(
|
|
1330
1330
|
"svg",
|
|
1331
1331
|
{
|
|
1332
1332
|
width: "46",
|
|
@@ -1359,10 +1359,10 @@ const a1 = ({
|
|
|
1359
1359
|
)
|
|
1360
1360
|
]
|
|
1361
1361
|
}
|
|
1362
|
-
),
|
|
1362
|
+
), E = ({
|
|
1363
1363
|
icon: n,
|
|
1364
|
-
title:
|
|
1365
|
-
description:
|
|
1364
|
+
title: i,
|
|
1365
|
+
description: t,
|
|
1366
1366
|
ariaLabel: r,
|
|
1367
1367
|
testId: o,
|
|
1368
1368
|
onClick: l
|
|
@@ -1377,16 +1377,16 @@ const a1 = ({
|
|
|
1377
1377
|
children: [
|
|
1378
1378
|
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonIcon", children: /* @__PURE__ */ e(n, {}) }),
|
|
1379
1379
|
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonContent", children: [
|
|
1380
|
-
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonTitle", children:
|
|
1380
|
+
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonTitle", children: i }),
|
|
1381
1381
|
/* @__PURE__ */ e(C, { size: 4 }),
|
|
1382
|
-
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonDescription", children:
|
|
1382
|
+
/* @__PURE__ */ e("span", { class: "IncodeChooserButtonDescription", children: t }),
|
|
1383
1383
|
/* @__PURE__ */ e(C, { size: 8 }),
|
|
1384
|
-
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonArrow", children: /* @__PURE__ */ e(
|
|
1384
|
+
/* @__PURE__ */ e("div", { class: "IncodeChooserButtonArrow", children: /* @__PURE__ */ e(g1, {}) })
|
|
1385
1385
|
] })
|
|
1386
1386
|
]
|
|
1387
1387
|
}
|
|
1388
|
-
),
|
|
1389
|
-
const { t } = c(),
|
|
1388
|
+
), w1 = ({ manager: n }) => {
|
|
1389
|
+
const { t: i } = c(), t = () => {
|
|
1390
1390
|
n.selectDocument("id");
|
|
1391
1391
|
}, r = () => {
|
|
1392
1392
|
n.selectDocument("passport");
|
|
@@ -1394,28 +1394,28 @@ const a1 = ({
|
|
|
1394
1394
|
return /* @__PURE__ */ e(
|
|
1395
1395
|
x,
|
|
1396
1396
|
{
|
|
1397
|
-
title:
|
|
1397
|
+
title: i("idv2.chooser.title"),
|
|
1398
1398
|
"data-testid": "document-chooser-page",
|
|
1399
1399
|
className: "IncodeChooserPage",
|
|
1400
1400
|
children: /* @__PURE__ */ e("div", { class: "IncodeChooserContainer", children: /* @__PURE__ */ e("div", { class: "IncodeChooserButtons", children: [
|
|
1401
1401
|
/* @__PURE__ */ e(
|
|
1402
|
-
|
|
1402
|
+
E,
|
|
1403
1403
|
{
|
|
1404
|
-
icon:
|
|
1405
|
-
title:
|
|
1406
|
-
description:
|
|
1407
|
-
ariaLabel:
|
|
1404
|
+
icon: m1,
|
|
1405
|
+
title: i("idv2.chooser.idButtonTitle"),
|
|
1406
|
+
description: i("idv2.chooser.idButtonDescription"),
|
|
1407
|
+
ariaLabel: i("idv2.chooser.idButtonTitle"),
|
|
1408
1408
|
testId: "chooser-button-id",
|
|
1409
|
-
onClick:
|
|
1409
|
+
onClick: t
|
|
1410
1410
|
}
|
|
1411
1411
|
),
|
|
1412
1412
|
/* @__PURE__ */ e(
|
|
1413
|
-
|
|
1413
|
+
E,
|
|
1414
1414
|
{
|
|
1415
|
-
icon:
|
|
1416
|
-
title:
|
|
1417
|
-
description:
|
|
1418
|
-
ariaLabel:
|
|
1415
|
+
icon: v1,
|
|
1416
|
+
title: i("idv2.chooser.passportButtonTitle"),
|
|
1417
|
+
description: i("idv2.chooser.passportButtonDescription"),
|
|
1418
|
+
ariaLabel: i("idv2.chooser.passportButtonTitle"),
|
|
1419
1419
|
testId: "chooser-button-passport",
|
|
1420
1420
|
onClick: r
|
|
1421
1421
|
}
|
|
@@ -1423,61 +1423,69 @@ const a1 = ({
|
|
|
1423
1423
|
] }) })
|
|
1424
1424
|
}
|
|
1425
1425
|
);
|
|
1426
|
-
},
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1426
|
+
}, H = ({
|
|
1427
|
+
manager: n,
|
|
1428
|
+
direction: i
|
|
1429
|
+
}) => {
|
|
1430
|
+
const [t, r] = L(null), { t: o } = c();
|
|
1431
|
+
m(() => {
|
|
1432
|
+
import("../flip-animation-COR596wy.js").then((s) => {
|
|
1433
|
+
r(s.default);
|
|
1431
1434
|
});
|
|
1432
1435
|
}, []);
|
|
1433
|
-
const
|
|
1434
|
-
await new Promise((
|
|
1436
|
+
const l = async () => {
|
|
1437
|
+
await new Promise((s) => setTimeout(s, 1e3)), i === "toBack" ? n.continueToBack() : n.continueToFront();
|
|
1435
1438
|
};
|
|
1436
1439
|
return t ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
|
|
1437
|
-
/* @__PURE__ */ e(_, { className: "IncodeFlipAnimationTitle", children:
|
|
1440
|
+
/* @__PURE__ */ e(_, { className: "IncodeFlipAnimationTitle", children: o(i === "toBack" ? "idv2.flipAnimation.title" : "idv2.flipAnimation.titleToFront") }),
|
|
1438
1441
|
/* @__PURE__ */ e(C, { size: 32 }),
|
|
1439
1442
|
/* @__PURE__ */ e(
|
|
1440
1443
|
b,
|
|
1441
1444
|
{
|
|
1442
1445
|
animationData: t,
|
|
1443
1446
|
loop: !1,
|
|
1444
|
-
onComplete:
|
|
1447
|
+
onComplete: l
|
|
1445
1448
|
}
|
|
1446
1449
|
)
|
|
1447
1450
|
] }) : null;
|
|
1448
|
-
}, L1 = ({ manager: n, state:
|
|
1449
|
-
const { t
|
|
1450
|
-
|
|
1451
|
-
l ? import("../passport-tutorial-CaYBFTqt.js").then((
|
|
1452
|
-
o(
|
|
1453
|
-
}) : import("../id-tutorial-B-F5Q28m.js").then((
|
|
1454
|
-
o(
|
|
1451
|
+
}, L1 = ({ manager: n, state: i }) => {
|
|
1452
|
+
const { t } = c(), [r, o] = L(null), l = i.selectedDocumentType === "passport", a = i.currentMode === "back";
|
|
1453
|
+
if (m(() => {
|
|
1454
|
+
l ? import("../passport-tutorial-CaYBFTqt.js").then((u) => {
|
|
1455
|
+
o(u.default);
|
|
1456
|
+
}) : a ? import("../id-tutorial-B-F5Q28m.js").then((u) => {
|
|
1457
|
+
o(u.default);
|
|
1458
|
+
}) : import("../id-tutorial-B-F5Q28m.js").then((u) => {
|
|
1459
|
+
o(u.default);
|
|
1455
1460
|
});
|
|
1456
|
-
}, [l]), r
|
|
1457
|
-
|
|
1461
|
+
}, [l, a]), !r)
|
|
1462
|
+
return null;
|
|
1463
|
+
const s = t(l ? "idv2.capture.passport.title" : a ? "idv2.tutorial.v2.titleBack" : "idv2.tutorial.v2.title"), d = t(l ? "idv2.capture.passport.subtitle" : a ? "idv2.tutorial.subtitleBack" : "idv2.tutorial.subtitle");
|
|
1464
|
+
return /* @__PURE__ */ e(
|
|
1465
|
+
O,
|
|
1458
1466
|
{
|
|
1459
1467
|
animationData: r,
|
|
1460
|
-
title:
|
|
1461
|
-
subtitle:
|
|
1468
|
+
title: s,
|
|
1469
|
+
subtitle: d,
|
|
1462
1470
|
onContinue: () => n.nextStep(),
|
|
1463
|
-
buttonText:
|
|
1464
|
-
disclaimerText:
|
|
1465
|
-
className:
|
|
1471
|
+
buttonText: t("idv2.tutorial.startScan"),
|
|
1472
|
+
disclaimerText: t("idv2.tutorial.v2.autocapture"),
|
|
1473
|
+
className: f(
|
|
1466
1474
|
"IncodeIdTutorial",
|
|
1467
1475
|
l ? "IncodeIdTutorialPassport" : "IncodeIdTutorialId"
|
|
1468
1476
|
)
|
|
1469
1477
|
}
|
|
1470
|
-
)
|
|
1471
|
-
}, x1 = ({ config: n, onFinish:
|
|
1472
|
-
const [r, o] = R(() =>
|
|
1473
|
-
return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(
|
|
1474
|
-
|
|
1478
|
+
);
|
|
1479
|
+
}, x1 = ({ config: n, onFinish: i, onError: t }) => {
|
|
1480
|
+
const [r, o] = R(() => z({ config: n }));
|
|
1481
|
+
return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(w1, { manager: o }) : r.status === "tutorial" ? /* @__PURE__ */ e(L1, { manager: o, state: r }) : r.status === "permissions" ? /* @__PURE__ */ e(
|
|
1482
|
+
G,
|
|
1475
1483
|
{
|
|
1476
1484
|
manager: o,
|
|
1477
1485
|
permissionStatus: r.permissionStatus
|
|
1478
1486
|
}
|
|
1479
|
-
) : r.status === "frontFinished" ? /* @__PURE__ */ e(
|
|
1480
|
-
}, y1 = ({ config: n, onFinish:
|
|
1487
|
+
) : r.status === "frontFinished" ? /* @__PURE__ */ e(H, { manager: o, direction: "toBack" }) : r.status === "backFinished" ? /* @__PURE__ */ e(H, { manager: o, direction: "toFront" }) : r.status === "capture" ? /* @__PURE__ */ e(I1, { manager: o, state: r, onFinish: () => i?.() }) : r.status === "processing" ? /* @__PURE__ */ e(K, {}) : r.status === "expired" ? /* @__PURE__ */ e(r1, { manager: o }) : r.status === "finished" ? (i?.(), null) : r.status === "closed" ? (t?.(void 0), null) : r.status === "error" ? /* @__PURE__ */ e(D, { manager: o, state: r, onError: t }) : null;
|
|
1488
|
+
}, y1 = ({ config: n, onFinish: i, onError: t }) => /* @__PURE__ */ e($, { children: n ? /* @__PURE__ */ e(x1, { config: n, onFinish: i, onError: t }) : null });
|
|
1481
1489
|
A(y1, "incode-id");
|
|
1482
1490
|
export {
|
|
1483
1491
|
y1 as Id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260224-1accab3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"libphonenumber-js": "^1.11.0",
|
|
87
87
|
"preact-custom-element": "^4.6.0",
|
|
88
88
|
"tailwindcss": "^4.1.17",
|
|
89
|
-
"@incodetech/core": "0.0.0-dev-
|
|
89
|
+
"@incodetech/core": "0.0.0-dev-20260224-1accab3"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@microsoft/api-extractor": "^7.53.3",
|