@incodetech/web 2.1.1 → 2.2.0-rc.0
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/ae-signature/ae-signature.es.js +7 -4
- package/dist/antifraud/antifraud.es.js +6 -6
- package/dist/authentication/authentication.es.js +7 -7
- package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-gLba2mgp.js} +6 -3
- package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
- package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
- package/dist/base.css +425 -3290
- package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
- package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
- package/dist/certificate-issuance/styles.css +0 -41
- package/dist/{checkbox-1wUHSoaK.js → checkbox-C38Elx0O.js} +5 -5
- package/dist/connectionError-DAeXp8sE.js +45 -0
- package/dist/consent/consent.es.js +10 -12
- package/dist/consent/styles.css +5 -4
- package/dist/{countrySelector-SvUOyPo0.js → countrySelector-2t-ZTgGo.js} +3 -3
- package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
- package/dist/curp-validation/curp-validation.es.js +28 -29
- package/dist/curp-validation/styles.css +47 -0
- package/dist/{customFields-BDsXR7A-.js → customFields-B8HQZ7Mh.js} +13 -14
- package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-_tUmZ855.js} +9 -9
- package/dist/dashboardTheme-CVliZSR-.js +223 -0
- package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-eRcbt_SL.js} +5 -5
- package/dist/dateInputComposed-ks0-opuq.js +1 -0
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +85 -70
- package/dist/{documentCapture-DhbO-A-V.js → documentCapture-BvEGCYj-.js} +218 -136
- package/dist/documentCapture-DdHdRPzR.js +2 -0
- package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-OHDHzt1Q.js} +18 -11
- package/dist/dropdownComposed-kjG4UblM.js +1 -0
- package/dist/dynamic-forms/styles.css +58 -6
- package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-P-4E42IA.js} +53 -45
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +1 -28
- package/dist/ekybModule-CiaxFHXo.js +2 -0
- package/dist/{ekybModule-DGnTw5UV.js → ekybModule-DmjkzVWE.js} +51 -27
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +2 -2
- package/dist/ekycModule-BVt10kgv.js +2 -0
- package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-Da1Fm7ai.js} +45 -19
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
- package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-yamI6zHM.js} +31 -23
- package/dist/email/email.es.js +10 -11
- package/dist/{emailInput-DsLkDtER.js → emailInput-B0P2Q-pk.js} +4 -4
- package/dist/{expiredId-BZXLrLk-.js → expiredId-BXXE3srN.js} +6 -6
- package/dist/{extensibility-7sRIN0JC.js → extensibility-iJYzpW6H.js} +440 -374
- package/dist/extensibility.es.js +24 -28
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +9 -609
- package/dist/faceMatch-D4XFihTc.js +2 -0
- package/dist/{faceMatch-DyTBoMDm.js → faceMatch-VtEZvsen.js} +71 -79
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/fieldComparison-B_r9Bal7.js +2 -0
- package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-NLdDSOEh.js} +11 -12
- package/dist/finalSuccessScreen-DryADx1n.js +500 -0
- package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
- package/dist/flip-animation-CvN8FLNc.js +6996 -0
- package/dist/flow/flow.es.js +81 -45
- package/dist/flow/styles.css +908 -5423
- package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
- package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
- package/dist/geolocation/geolocation.es.js +36 -13
- package/dist/geolocation/styles.css +1 -1
- package/dist/government-validation/government-validation.es.js +11 -12
- package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Pv3v_0ji.js} +7 -9
- package/dist/{icons-CJJbIpBq.js → icons--ezYG2Fb.js} +92 -7
- package/dist/id/id.es.js +222 -52
- package/dist/id/styles.css +290 -10
- package/dist/id-back-of-card-DO593HH8.js +83 -0
- package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
- package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
- package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
- package/dist/id-laser-h-BaUHzX-d.js +480 -0
- package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
- package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
- package/dist/id-selfie-flow/styles.css +749 -0
- package/dist/id-verification/id-verification.es.js +13 -9
- package/dist/{idOcr-WFBvqy3b.js → idOcr-gsIXHq6R.js} +14 -15
- package/dist/identity-reuse/identity-reuse.es.js +6 -8
- package/dist/identity-reuse/styles.css +1 -1
- package/dist/{incode-logo-57XFniXU.js → incode-logo-rGFjZHqi.js} +64 -1
- package/dist/incodeComponent-K9ZWg302.js +713 -0
- package/dist/incodeModule-CcLzar_X.js +25 -0
- package/dist/index.es.js +16 -5
- package/dist/{inputComposed-C1R2LAa3.js → inputComposed-BeROn635.js} +9 -9
- package/dist/inputComposed-CADVQW-o.js +1 -0
- package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-BtqB-FxY.js} +9 -11
- package/dist/{capture-CkGvdDNH.js → manualCaptureButton-quGa2ufS.js} +68 -198
- package/dist/manualCaptureButton-t_oIol88.js +300 -0
- package/dist/{modal-OxkFuuiR.js → modal-BjjJFpZu.js} +4 -4
- package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
- package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
- package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-DgfHD_mx.js} +6 -6
- package/dist/{otpInput-CnDc6pQm.js → otpInput-D5dLXrmC.js} +72 -36
- package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
- package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
- package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
- package/dist/pdfViewer-CZb6obcZ.js +2 -0
- package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-vud1VZv6.js} +5 -7
- package/dist/phone/phone.es.js +13 -12
- package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-CeVWTS_O.js} +7 -6
- package/dist/{processing-BeUMfdJJ.js → processing-BsvHyDWa.js} +2 -2
- package/dist/qe-signature/qe-signature.es.js +7 -4
- package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-DzNGUbZQ.js} +16 -15
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
- package/dist/redirect-to-mobile/styles.css +20 -10
- package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
- package/dist/{richText-CB1fmegc.js → richText-CTHBpZOw.js} +3 -1607
- package/dist/selfie/selfie.es.js +10 -10
- package/dist/selfie/styles.css +16 -949
- package/dist/signature/signature.es.js +27 -19
- package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
- package/dist/{snackbar-DS7Mv62v.js → snackbar-C9Mqrh0e.js} +2 -2
- package/dist/spacer-CDlQd12V.js +2344 -0
- package/dist/{spinner-BMeIEK1d.js → spinner-CLZ2fz4u.js} +45 -4
- package/dist/statusPage--GVFSUJp.js +36 -0
- package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
- package/dist/{tabs-C__chW-u.js → tabs-DweBZTV2.js} +4 -3
- package/dist/themes/dark.css +35 -0
- package/dist/themes/light.css +35 -0
- package/dist/{tutorial-CCfPuVKX.js → tutorial-BZZC93Ur.js} +222 -180
- package/dist/types/ae-signature.d.ts +91 -5
- package/dist/types/antifraud.d.ts +86 -3
- package/dist/types/authentication.d.ts +86 -3
- package/dist/types/certificate-issuance.d.ts +86 -3
- package/dist/types/consent.d.ts +86 -3
- package/dist/types/cross-document-data-match.d.ts +88 -4
- package/dist/types/curp-validation.d.ts +86 -3
- package/dist/types/document-capture.d.ts +88 -4
- package/dist/types/ekyb.d.ts +88 -4
- package/dist/types/ekyc.d.ts +88 -4
- package/dist/types/electronic-signature.d.ts +87 -4
- package/dist/types/email.d.ts +82 -22
- package/dist/types/extensibility.d.ts +157 -5
- package/dist/types/face-match.d.ts +84 -22
- package/dist/types/field-comparison.d.ts +86 -3
- package/dist/types/fiscal-qr.d.ts +89 -5
- package/dist/types/flow.d.ts +92 -2
- package/dist/types/geolocation.d.ts +86 -3
- package/dist/types/government-validation.d.ts +86 -3
- package/dist/types/id-selfie-flow.d.ts +161 -0
- package/dist/types/id-verification.d.ts +87 -4
- package/dist/types/id.d.ts +88 -5
- package/dist/types/identity-reuse.d.ts +82 -2
- package/dist/types/index.d.ts +106 -1
- package/dist/types/phone.d.ts +83 -24
- package/dist/types/qe-signature.d.ts +91 -5
- package/dist/types/redirect-to-mobile.d.ts +4 -1
- package/dist/types/selfie.d.ts +86 -3
- package/dist/types/signature.d.ts +91 -5
- package/dist/types/video-selfie.d.ts +83 -6
- package/dist/types/watchlist.d.ts +91 -5
- package/dist/types/workflow.d.ts +85 -2
- package/dist/{i18n-CU4xq8qC.js → uiConfig-B5ASPUL4.js} +26 -3
- package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-D_YpuVsS.js} +37 -248
- package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
- package/dist/{verificationResult-BWWkmeiA.js → verificationResult-B8HwR07t.js} +26 -15
- package/dist/video-selfie/styles.css +349 -1202
- package/dist/video-selfie/video-selfie.es.js +120 -381
- package/dist/watchlist/watchlist.es.js +16 -13
- package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-D8Is99bZ.js} +12 -13
- package/dist/workflow/styles.css +501 -3977
- package/dist/workflow/workflow.es.js +25 -18
- package/package.json +22 -20
- package/dist/button-Dz6AsbmF.js +0 -40
- package/dist/cameraView-DIEzM5ru.js +0 -47
- package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
- package/dist/cpf-ocr/styles.css +0 -45
- package/dist/cpfOcr-B79245-3.js +0 -2
- package/dist/cpfOcr-BhxT-lRN.js +0 -92
- package/dist/dateInputComposed-DRzZi6uy.js +0 -1
- package/dist/documentCapture-DXYYyxZl.js +0 -2
- package/dist/dropdownComposed-BAoxIIsE.js +0 -1
- package/dist/ekybModule-C6Nttked.js +0 -2
- package/dist/ekycModule-CDIEjI6V.js +0 -2
- package/dist/errorIcon-BA4T6iy-.js +0 -26
- package/dist/faceMatch-B_HvxLm_.js +0 -2
- package/dist/fieldComparison-DfNEuEE5.js +0 -2
- package/dist/flip-animation-CZYSUtMm.js +0 -6983
- package/dist/hooks-CNu7o-v8.js +0 -186
- package/dist/id-laser-h-CzPegPMn.js +0 -467
- package/dist/incodeComponent-CfzJGETt.js +0 -64
- package/dist/incodeModule-B-4_3JrK.js +0 -13
- package/dist/inputComposed-BaY5q9WM.js +0 -1
- package/dist/loadingIcon-B0ysgiNq.js +0 -148
- package/dist/page-DidH_RkX.js +0 -171
- package/dist/spinner-BCDCoi9C.js +0 -1
- package/dist/statusPage-Bk8nJwXV.js +0 -28
- package/dist/transitionSpinner-CuNCqHNi.js +0 -30
- package/dist/types/cpf-ocr.d.ts +0 -12
- package/dist/typography-BZIpjo97.js +0 -45
- package/dist/uiConfig-D2_wawvr.js +0 -25
- /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
- /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
- /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
- /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
- /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
- /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
- /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
- /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
- /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
- /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
- /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
- /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
- /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as y, a as D, c as z, d as T, h as q, l as A, o as P, p as d, v as u
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import { n as
|
|
7
|
-
import
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
26
|
-
import "./dateInputComposed-DRzZi6uy.js";
|
|
27
|
-
import "./bottomSheet-CnWbbUAM.js";
|
|
28
|
-
import { n as CameraFrame, t as CameraView } from "./cameraView-DIEzM5ru.js";
|
|
29
|
-
import "./capture-CkGvdDNH.js";
|
|
30
|
-
import { n as RedStrikeIcon, t as ExpiredId } from "./expiredId-BZXLrLk-.js";
|
|
1
|
+
import { i as useTranslation } from "./uiConfig-B5ASPUL4.js";
|
|
2
|
+
import { S as k, _ as y, a as D, c as z, d as T, f as _, h as q, l as A, o as P, p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
3
|
+
import { d as useTimeoutHandle, f as useResizeObserver, l as TransitionSpinner, o as Page, p as useEventListener, u as useFeatureManagement } from "./incodeComponent-K9ZWg302.js";
|
|
4
|
+
import { a as useAnimationData, r as AnimatedAsset, t as Spacer, u as cn } from "./spacer-CDlQd12V.js";
|
|
5
|
+
import { n as Title, t as Spinner } from "./spinner-CLZ2fz4u.js";
|
|
6
|
+
import { n as ErrorIcon, r as Button } from "./incode-logo-rGFjZHqi.js";
|
|
7
|
+
import "./processing-BsvHyDWa.js";
|
|
8
|
+
import { _ as CalendarIcon, c as EllipseIcon, h as CaptureButtonIcon, i as HelpIcon, o as EyeOffIcon, r as LockIcon, s as EyeIcon, t as SvgLightningIcon, u as ChevronRightIcon } from "./icons--ezYG2Fb.js";
|
|
9
|
+
import { t as SuccessIcon } from "./successIcon-Bj8Y9CuI.js";
|
|
10
|
+
import { t as Modal } from "./modal-BjjJFpZu.js";
|
|
11
|
+
import { r as BaseTutorial } from "./tutorial-BZZC93Ur.js";
|
|
12
|
+
import "./verificationResult-B8HwR07t.js";
|
|
13
|
+
import "./connectionError-DAeXp8sE.js";
|
|
14
|
+
import { t as InputComposed } from "./inputComposed-BeROn635.js";
|
|
15
|
+
import "./inputComposed-CADVQW-o.js";
|
|
16
|
+
import "./otpInput-D5dLXrmC.js";
|
|
17
|
+
import "./checkbox-C38Elx0O.js";
|
|
18
|
+
import "./radioGroupComposed-DzNGUbZQ.js";
|
|
19
|
+
import "./phoneInputComposed-CeVWTS_O.js";
|
|
20
|
+
import "./dropdownComposed-kjG4UblM.js";
|
|
21
|
+
import "./dateInputComposed-ks0-opuq.js";
|
|
22
|
+
import "./bottomSheet-Cp8DLulN.js";
|
|
23
|
+
import { a as CameraView, i as usePreloadCaptureAnimations, n as CaptureNotification, o as CameraFrame } from "./manualCaptureButton-t_oIol88.js";
|
|
24
|
+
import "./manualCaptureButton-quGa2ufS.js";
|
|
25
|
+
import { n as RedStrikeIcon, t as ExpiredId } from "./expiredId-BXXE3srN.js";
|
|
31
26
|
import { getDeviceClass } from "@incodetech/core/device";
|
|
27
|
+
import { eventModuleNames, recordExperimentAssignmentOnce } from "@incodetech/core/events";
|
|
28
|
+
import { ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, resolveExperiment } from "@incodetech/core/feature-management";
|
|
32
29
|
import "@incodetech/core/id";
|
|
33
30
|
//#region src/shared/overlay/overlay.tsx
|
|
34
31
|
var Overlay = ({ children, "aria-labelledby": ariaLabelledBy, class: className }) => {
|
|
@@ -68,6 +65,74 @@ var ProgressBar = ({ progress, label, className, labelledById }) => /* @__PURE__
|
|
|
68
65
|
})] }) : null]
|
|
69
66
|
});
|
|
70
67
|
//#endregion
|
|
68
|
+
//#region src/shared/passwordInputComposed/passwordInputComposed.tsx
|
|
69
|
+
var PasswordInputComposed = D(({ id, value, class: className, invalid, showPasswordAriaLabel, hidePasswordAriaLabel, defaultVisible = false, requirementsHeading, requirements = [], requirementMetLabel, requirementUnmetLabel, ...restProps }, ref) => {
|
|
70
|
+
const [visible, setVisible] = d(defaultVisible);
|
|
71
|
+
const hasValue = !!(value && String(value).length > 0);
|
|
72
|
+
const allMet = requirements.every((requirement) => requirement.met);
|
|
73
|
+
const showRequirementsError = hasValue && requirements.length > 0 && !allMet;
|
|
74
|
+
const requirementsHeadingId = `${id}-requirements-heading`;
|
|
75
|
+
return /* @__PURE__ */ u("div", {
|
|
76
|
+
class: cn("IncodePasswordInputComposed", className),
|
|
77
|
+
children: [/* @__PURE__ */ u(InputComposed, {
|
|
78
|
+
...restProps,
|
|
79
|
+
id,
|
|
80
|
+
ref,
|
|
81
|
+
value,
|
|
82
|
+
type: visible ? "text" : "password",
|
|
83
|
+
invalid: showRequirementsError || invalid,
|
|
84
|
+
rightIcon: /* @__PURE__ */ u("button", {
|
|
85
|
+
type: "button",
|
|
86
|
+
class: "IncodePasswordInputComposedToggle",
|
|
87
|
+
"aria-label": visible ? hidePasswordAriaLabel : showPasswordAriaLabel,
|
|
88
|
+
"aria-pressed": visible,
|
|
89
|
+
"aria-controls": id,
|
|
90
|
+
"data-testid": `${id}-toggle-visibility`,
|
|
91
|
+
onClick: () => setVisible((currentlyVisible) => !currentlyVisible),
|
|
92
|
+
children: visible ? /* @__PURE__ */ u(EyeOffIcon, { size: 24 }) : /* @__PURE__ */ u(EyeIcon, { size: 24 })
|
|
93
|
+
})
|
|
94
|
+
}), requirements.length > 0 && /* @__PURE__ */ u("div", {
|
|
95
|
+
class: "IncodePasswordInputComposedRequirements",
|
|
96
|
+
children: [requirementsHeading && /* @__PURE__ */ u("p", {
|
|
97
|
+
id: requirementsHeadingId,
|
|
98
|
+
class: "IncodePasswordInputComposedRequirementsHeading",
|
|
99
|
+
"data-invalid": showRequirementsError,
|
|
100
|
+
"data-testid": requirementsHeadingId,
|
|
101
|
+
children: [showRequirementsError && /* @__PURE__ */ u("span", {
|
|
102
|
+
class: "IncodePasswordInputComposedRequirementsHeadingIcon",
|
|
103
|
+
"aria-hidden": "true",
|
|
104
|
+
children: /* @__PURE__ */ u(ErrorIcon, { size: 16 })
|
|
105
|
+
}), requirementsHeading]
|
|
106
|
+
}), /* @__PURE__ */ u("ul", {
|
|
107
|
+
class: "IncodePasswordInputComposedRequirementsList",
|
|
108
|
+
"aria-live": "polite",
|
|
109
|
+
"aria-labelledby": requirementsHeading ? requirementsHeadingId : void 0,
|
|
110
|
+
"data-testid": `${id}-requirements`,
|
|
111
|
+
children: requirements.map(({ key, label, met }) => /* @__PURE__ */ u("li", {
|
|
112
|
+
class: "IncodePasswordInputComposedRequirement",
|
|
113
|
+
"data-met": met,
|
|
114
|
+
"data-testid": `${id}-requirement-${key}`,
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ u("span", {
|
|
117
|
+
"aria-hidden": "true",
|
|
118
|
+
class: "IncodePasswordInputComposedRequirementIcon",
|
|
119
|
+
children: met ? /* @__PURE__ */ u(SuccessIcon, { size: 16 }) : /* @__PURE__ */ u(EllipseIcon, { size: 16 })
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ u("span", {
|
|
122
|
+
class: "IncodePasswordInputComposedRequirementLabel",
|
|
123
|
+
children: label
|
|
124
|
+
}),
|
|
125
|
+
(requirementMetLabel || requirementUnmetLabel) && /* @__PURE__ */ u("span", {
|
|
126
|
+
class: "IncodeSrOnly",
|
|
127
|
+
children: met ? requirementMetLabel : requirementUnmetLabel
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
}, key))
|
|
131
|
+
})]
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
//#endregion
|
|
71
136
|
//#region src/shared/segmentedDateInput/segmentedDateInput.tsx
|
|
72
137
|
/**
|
|
73
138
|
* ⚠️ EXPERIMENTAL — DO NOT USE IN FORMS.
|
|
@@ -723,15 +788,16 @@ var CameraOverlay = ({ children, className }) => {
|
|
|
723
788
|
};
|
|
724
789
|
//#endregion
|
|
725
790
|
//#region src/shared/cameraOverlay/cameraOverlayHeader.tsx
|
|
726
|
-
var CameraOverlayHeader = ({ title, subtitle, visible = true, className, titleId }) => {
|
|
727
|
-
const
|
|
791
|
+
var CameraOverlayHeader = ({ title, subtitle, visible = true, className, titleId, titleRef }) => {
|
|
792
|
+
const fallbackTitleRef = A(null);
|
|
793
|
+
const resolvedTitleRef = titleRef ?? fallbackTitleRef;
|
|
728
794
|
y(() => {
|
|
729
|
-
|
|
730
|
-
}, []);
|
|
795
|
+
resolvedTitleRef.current?.focus();
|
|
796
|
+
}, [resolvedTitleRef]);
|
|
731
797
|
return /* @__PURE__ */ u("div", {
|
|
732
798
|
class: cn("IncodeCameraOverlayHeader", !visible && "IncodeCameraOverlayHeaderHidden", className),
|
|
733
799
|
children: [/* @__PURE__ */ u(Title, {
|
|
734
|
-
ref:
|
|
800
|
+
ref: resolvedTitleRef,
|
|
735
801
|
id: titleId,
|
|
736
802
|
className: "IncodeCameraOverlayHeaderTitle",
|
|
737
803
|
tabIndex: -1,
|
|
@@ -744,16 +810,18 @@ var CameraOverlayHeader = ({ title, subtitle, visible = true, className, titleId
|
|
|
744
810
|
};
|
|
745
811
|
//#endregion
|
|
746
812
|
//#region src/shared/captureFooter/captureFooter.tsx
|
|
747
|
-
var CaptureFooter = ({ onOpenHelp, onCapture, isManualCapture, captureAriaLabel, captureAriaDescribedBy, helpAriaLabel, helpButtonRef, captureButtonRef, encryptionLabel, children }) => {
|
|
813
|
+
var CaptureFooter = ({ onOpenHelp, onCapture, isManualCapture, captureAriaLabel, captureAriaDescribedBy, helpAriaLabel, helpButtonRef, captureButtonRef, encryptionLabel, children, hideActions }) => {
|
|
748
814
|
const { t } = useTranslation();
|
|
815
|
+
const isCaptureSectionVisible = !hideActions && isManualCapture && Boolean(onCapture);
|
|
816
|
+
const isHelpSectionVisible = !hideActions;
|
|
749
817
|
return /* @__PURE__ */ u("div", {
|
|
750
818
|
class: "IncodeCaptureFooter",
|
|
751
819
|
children: [
|
|
752
820
|
/* @__PURE__ */ u("div", {
|
|
753
821
|
class: "IncodeCaptureFooterEncryption",
|
|
754
|
-
children: [/* @__PURE__ */ u(LockIcon, { className: "IncodeCaptureFooterEncryptionIcon" }), /* @__PURE__ */ u("span", { children: encryptionLabel ?? t("
|
|
822
|
+
children: [/* @__PURE__ */ u(LockIcon, { className: "IncodeCaptureFooterEncryptionIcon" }), /* @__PURE__ */ u("span", { children: encryptionLabel ?? t("idv2.capture.allDataIsEncrypted") })]
|
|
755
823
|
}),
|
|
756
|
-
|
|
824
|
+
isCaptureSectionVisible && /* @__PURE__ */ u("div", {
|
|
757
825
|
class: "IncodeCaptureFooterCaptureSection",
|
|
758
826
|
children: [children, /* @__PURE__ */ u("button", {
|
|
759
827
|
ref: captureButtonRef,
|
|
@@ -765,8 +833,8 @@ var CaptureFooter = ({ onOpenHelp, onCapture, isManualCapture, captureAriaLabel,
|
|
|
765
833
|
"data-testid": "capture-button",
|
|
766
834
|
children: /* @__PURE__ */ u(CaptureButtonIcon, {})
|
|
767
835
|
})]
|
|
768
|
-
})
|
|
769
|
-
/* @__PURE__ */ u("div", {
|
|
836
|
+
}),
|
|
837
|
+
isHelpSectionVisible && /* @__PURE__ */ u("div", {
|
|
770
838
|
class: "IncodeCaptureFooterHelp",
|
|
771
839
|
children: /* @__PURE__ */ u(Button, {
|
|
772
840
|
ref: helpButtonRef,
|
|
@@ -774,6 +842,7 @@ var CaptureFooter = ({ onOpenHelp, onCapture, isManualCapture, captureAriaLabel,
|
|
|
774
842
|
onClick: onOpenHelp,
|
|
775
843
|
"aria-label": helpAriaLabel ?? t("idv2.needHelp.open"),
|
|
776
844
|
class: "IncodeCaptureFooterHelpButton",
|
|
845
|
+
"data-testid": "capture-help-button",
|
|
777
846
|
children: /* @__PURE__ */ u(HelpIcon, {})
|
|
778
847
|
})
|
|
779
848
|
})
|
|
@@ -1067,9 +1136,52 @@ var CommonIssues = ({ open, onClose, onTakeManually, portalContainer }) => {
|
|
|
1067
1136
|
});
|
|
1068
1137
|
};
|
|
1069
1138
|
//#endregion
|
|
1139
|
+
//#region src/modules/id/experiments/useCaptureResultPreview.ts
|
|
1140
|
+
var CAPTURE_RESULT_HOLD_MS = 2e3;
|
|
1141
|
+
var CROSSFADE_ANIMATION_NAME = "incodeIdCaptureResultCrossfade";
|
|
1142
|
+
var CROSSFADE_WATCHDOG_MS = 1e3;
|
|
1143
|
+
var useCaptureResultPreview = (manager, state) => {
|
|
1144
|
+
const enabled = state.captureFeedbackMode === "result-preview";
|
|
1145
|
+
const hasAdvancedRef = A(false);
|
|
1146
|
+
const [isCrossfading, setIsCrossfading] = d(false);
|
|
1147
|
+
const { schedule: scheduleCrossfadeTimeout, clear: clearCrossfadeTimeout } = useTimeoutHandle();
|
|
1148
|
+
const advance = q(() => {
|
|
1149
|
+
if (hasAdvancedRef.current) return;
|
|
1150
|
+
hasAdvancedRef.current = true;
|
|
1151
|
+
clearCrossfadeTimeout();
|
|
1152
|
+
manager.completeResultPreview();
|
|
1153
|
+
}, [clearCrossfadeTimeout, manager]);
|
|
1154
|
+
y(() => {
|
|
1155
|
+
if (!enabled || state.captureStatus !== "resultPreview") {
|
|
1156
|
+
hasAdvancedRef.current = false;
|
|
1157
|
+
setIsCrossfading(false);
|
|
1158
|
+
clearCrossfadeTimeout();
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
const timeoutId = setTimeout(() => {
|
|
1162
|
+
setIsCrossfading(true);
|
|
1163
|
+
scheduleCrossfadeTimeout(advance, CROSSFADE_WATCHDOG_MS);
|
|
1164
|
+
}, CAPTURE_RESULT_HOLD_MS);
|
|
1165
|
+
return () => clearTimeout(timeoutId);
|
|
1166
|
+
}, [
|
|
1167
|
+
advance,
|
|
1168
|
+
clearCrossfadeTimeout,
|
|
1169
|
+
enabled,
|
|
1170
|
+
scheduleCrossfadeTimeout,
|
|
1171
|
+
state.captureStatus
|
|
1172
|
+
]);
|
|
1173
|
+
return {
|
|
1174
|
+
enabled,
|
|
1175
|
+
isCrossfading,
|
|
1176
|
+
onCrossfadeEnd: q((event) => {
|
|
1177
|
+
if (event.animationName === CROSSFADE_ANIMATION_NAME) advance();
|
|
1178
|
+
}, [advance])
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
//#endregion
|
|
1070
1182
|
//#region src/modules/id/shared/captureFrame.tsx
|
|
1071
1183
|
var CaptureFrame = ({ orientation, mode, state, children, className }) => {
|
|
1072
|
-
const isHorizontal = orientation !== "vertical"
|
|
1184
|
+
const isHorizontal = orientation !== "vertical";
|
|
1073
1185
|
const isPassport = mode === "passport";
|
|
1074
1186
|
const stateClass = `IncodeCaptureFrame${state.charAt(0).toUpperCase() + state.slice(1)}`;
|
|
1075
1187
|
return /* @__PURE__ */ u("div", {
|
|
@@ -1083,11 +1195,13 @@ var CaptureFrame = ({ orientation, mode, state, children, className }) => {
|
|
|
1083
1195
|
//#region src/modules/id/processing/idProcessingLayout.tsx
|
|
1084
1196
|
var IdProcessingLayout = ({ imageUrl, orientation, mode, borderState, topContent, bottomContent, overlayContent, blurImage }) => {
|
|
1085
1197
|
const { t } = useTranslation();
|
|
1198
|
+
const frameMode = mode === "id" ? "front" : mode;
|
|
1086
1199
|
return /* @__PURE__ */ u(Page, {
|
|
1087
1200
|
hideHeader: true,
|
|
1088
1201
|
hideFooterBranding: true,
|
|
1202
|
+
className: "IncodeIdProcessingPage",
|
|
1089
1203
|
children: /* @__PURE__ */ u("div", {
|
|
1090
|
-
class: "IncodeIdProcessingLayout",
|
|
1204
|
+
class: cn("IncodeIdProcessingLayout", !imageUrl && "IncodeIdProcessingLayoutNoImage"),
|
|
1091
1205
|
children: /* @__PURE__ */ u("div", {
|
|
1092
1206
|
class: "IncodeIdProcessingLayoutContent",
|
|
1093
1207
|
children: [
|
|
@@ -1095,9 +1209,9 @@ var IdProcessingLayout = ({ imageUrl, orientation, mode, borderState, topContent
|
|
|
1095
1209
|
class: "IncodeIdProcessingTopArea",
|
|
1096
1210
|
children: topContent
|
|
1097
1211
|
}),
|
|
1098
|
-
/* @__PURE__ */ u(CaptureFrame, {
|
|
1212
|
+
imageUrl && /* @__PURE__ */ u(CaptureFrame, {
|
|
1099
1213
|
orientation,
|
|
1100
|
-
mode:
|
|
1214
|
+
mode: frameMode,
|
|
1101
1215
|
state: borderState,
|
|
1102
1216
|
children: [/* @__PURE__ */ u("img", {
|
|
1103
1217
|
src: imageUrl,
|
|
@@ -1112,9 +1226,9 @@ var IdProcessingLayout = ({ imageUrl, orientation, mode, borderState, topContent
|
|
|
1112
1226
|
}),
|
|
1113
1227
|
/* @__PURE__ */ u("div", {
|
|
1114
1228
|
class: "IncodeIdProcessingBottomArea",
|
|
1115
|
-
children: [/* @__PURE__ */ u("div", {
|
|
1229
|
+
children: [imageUrl && /* @__PURE__ */ u("div", {
|
|
1116
1230
|
class: "IncodeCaptureEncryptionLabel",
|
|
1117
|
-
children: [/* @__PURE__ */ u(LockIcon, { className: "IncodeCaptureEncryptionIcon" }), /* @__PURE__ */ u("span", { children: t("
|
|
1231
|
+
children: [/* @__PURE__ */ u(LockIcon, { className: "IncodeCaptureEncryptionIcon" }), /* @__PURE__ */ u("span", { children: t("idv2.capture.allDataIsEncrypted") })]
|
|
1118
1232
|
}), bottomContent]
|
|
1119
1233
|
})
|
|
1120
1234
|
]
|
|
@@ -1124,22 +1238,14 @@ var IdProcessingLayout = ({ imageUrl, orientation, mode, borderState, topContent
|
|
|
1124
1238
|
};
|
|
1125
1239
|
//#endregion
|
|
1126
1240
|
//#region src/modules/id/processing/idAnalyzing.tsx
|
|
1127
|
-
var IdAnalyzing = ({ imageUrl, progress, orientation, mode, blurImage }) => {
|
|
1241
|
+
var IdAnalyzing = ({ imageUrl, progress, orientation, mode, blurImage, autoFocusTitle = true }) => {
|
|
1128
1242
|
const { t } = useTranslation();
|
|
1129
1243
|
const titleRef = A(null);
|
|
1130
|
-
const isHorizontal = orientation !== "vertical"
|
|
1131
|
-
|
|
1132
|
-
|
|
1244
|
+
const isHorizontal = orientation !== "vertical";
|
|
1245
|
+
_(() => {
|
|
1246
|
+
if (!autoFocusTitle) return;
|
|
1133
1247
|
titleRef.current?.focus();
|
|
1134
|
-
}, []);
|
|
1135
|
-
y(() => {
|
|
1136
|
-
if (isHorizontal) import("./id-laser-h-CzPegPMn.js").then((module) => {
|
|
1137
|
-
setAnimationData(module.default);
|
|
1138
|
-
});
|
|
1139
|
-
else import("./id-laser-v-BiUXkM4x.js").then((n) => n.n).then((module) => {
|
|
1140
|
-
setAnimationData(module.default);
|
|
1141
|
-
});
|
|
1142
|
-
}, [isHorizontal]);
|
|
1248
|
+
}, [autoFocusTitle]);
|
|
1143
1249
|
return /* @__PURE__ */ u(IdProcessingLayout, {
|
|
1144
1250
|
imageUrl,
|
|
1145
1251
|
orientation,
|
|
@@ -1159,12 +1265,13 @@ var IdAnalyzing = ({ imageUrl, progress, orientation, mode, blurImage }) => {
|
|
|
1159
1265
|
children: t("idv2.capture.processing.analyzing")
|
|
1160
1266
|
})]
|
|
1161
1267
|
}),
|
|
1162
|
-
overlayContent:
|
|
1163
|
-
|
|
1268
|
+
overlayContent: /* @__PURE__ */ u(AnimatedAsset, {
|
|
1269
|
+
name: "id.processing",
|
|
1270
|
+
orientation: isHorizontal ? "horizontal" : "vertical",
|
|
1164
1271
|
loop: true,
|
|
1165
1272
|
autoStop: true,
|
|
1166
|
-
|
|
1167
|
-
})
|
|
1273
|
+
class: "IncodeAnalyzingLottie"
|
|
1274
|
+
})
|
|
1168
1275
|
});
|
|
1169
1276
|
};
|
|
1170
1277
|
//#endregion
|
|
@@ -1185,12 +1292,35 @@ var GreenCheckIcon = ({ className, ...rest }) => /* @__PURE__ */ u("svg", {
|
|
|
1185
1292
|
});
|
|
1186
1293
|
//#endregion
|
|
1187
1294
|
//#region src/modules/id/processing/idProcessingResult.tsx
|
|
1188
|
-
var
|
|
1295
|
+
var FADE_OUT_ANIMATION_NAME = "incodeIdProcessingResultFadeOut";
|
|
1296
|
+
var EXIT_WATCHDOG_MS = 3500;
|
|
1297
|
+
var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitle, buttonText, onButtonClick, attemptsRemaining, blurImage, fadeOutOnClick }) => {
|
|
1189
1298
|
const { t } = useTranslation();
|
|
1190
1299
|
const titleRef = A(null);
|
|
1300
|
+
const [isExiting, setIsExiting] = d(false);
|
|
1301
|
+
const hasFiredButtonClickRef = A(false);
|
|
1302
|
+
const { schedule: scheduleExitWatchdog, clear: clearExitWatchdog } = useTimeoutHandle();
|
|
1191
1303
|
y(() => {
|
|
1192
1304
|
titleRef.current?.focus();
|
|
1193
1305
|
}, []);
|
|
1306
|
+
const fireButtonClick = () => {
|
|
1307
|
+
if (hasFiredButtonClickRef.current) return;
|
|
1308
|
+
hasFiredButtonClickRef.current = true;
|
|
1309
|
+
onButtonClick();
|
|
1310
|
+
};
|
|
1311
|
+
const handleButtonClick = () => {
|
|
1312
|
+
if (fadeOutOnClick) {
|
|
1313
|
+
setIsExiting(true);
|
|
1314
|
+
scheduleExitWatchdog(fireButtonClick, EXIT_WATCHDOG_MS);
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
onButtonClick();
|
|
1318
|
+
};
|
|
1319
|
+
const handleExitAnimationEnd = (event) => {
|
|
1320
|
+
if (event.animationName !== FADE_OUT_ANIMATION_NAME) return;
|
|
1321
|
+
clearExitWatchdog();
|
|
1322
|
+
fireButtonClick();
|
|
1323
|
+
};
|
|
1194
1324
|
return /* @__PURE__ */ u(IdProcessingLayout, {
|
|
1195
1325
|
imageUrl,
|
|
1196
1326
|
orientation,
|
|
@@ -1198,8 +1328,9 @@ var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitl
|
|
|
1198
1328
|
borderState: variant,
|
|
1199
1329
|
blurImage,
|
|
1200
1330
|
topContent: /* @__PURE__ */ u("div", {
|
|
1201
|
-
class: "IncodeIdProcessingResultContent",
|
|
1331
|
+
class: cn("IncodeIdProcessingResultContent", isExiting && "IncodeIdProcessingResultContentExiting"),
|
|
1202
1332
|
role: "status",
|
|
1333
|
+
onAnimationEnd: handleExitAnimationEnd,
|
|
1203
1334
|
children: [
|
|
1204
1335
|
variant === "success" ? /* @__PURE__ */ u(GreenCheckIcon, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ u(RedStrikeIcon, { className: "IncodeIdProcessingResultIcon" }),
|
|
1205
1336
|
/* @__PURE__ */ u(Spacer, { size: 16 }),
|
|
@@ -1216,12 +1347,14 @@ var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitl
|
|
|
1216
1347
|
]
|
|
1217
1348
|
}),
|
|
1218
1349
|
bottomContent: /* @__PURE__ */ u("div", {
|
|
1219
|
-
class: "IncodeIdProcessingResultButtonContainer",
|
|
1350
|
+
class: cn("IncodeIdProcessingResultButtonContainer", isExiting && "IncodeIdProcessingResultButtonContainerExiting"),
|
|
1351
|
+
onAnimationEnd: handleExitAnimationEnd,
|
|
1220
1352
|
children: [attemptsRemaining !== void 0 && attemptsRemaining > 0 && /* @__PURE__ */ u("p", {
|
|
1221
1353
|
class: "IncodeIdProcessingResultAttempts",
|
|
1222
1354
|
children: t("v2.idError.attemptsLeft", { count: attemptsRemaining })
|
|
1223
1355
|
}), /* @__PURE__ */ u(Button, {
|
|
1224
|
-
onClick:
|
|
1356
|
+
onClick: handleButtonClick,
|
|
1357
|
+
disabled: isExiting,
|
|
1225
1358
|
"data-testid": "retry-button",
|
|
1226
1359
|
children: buttonText
|
|
1227
1360
|
})]
|
|
@@ -1229,10 +1362,75 @@ var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitl
|
|
|
1229
1362
|
});
|
|
1230
1363
|
};
|
|
1231
1364
|
//#endregion
|
|
1365
|
+
//#region src/experiments/makeUseModuleExperiment.ts
|
|
1366
|
+
/**
|
|
1367
|
+
* Builds a per-module experiment hook bound to `registry` (e.g.
|
|
1368
|
+
* `ID_EXPERIMENTS`). Each experiment is a self-describing object param on the
|
|
1369
|
+
* shared `onboarding_web_sdk_ps` store; the hook resolves it once at the
|
|
1370
|
+
* visibility site (single-phase read — exposure logged on that read).
|
|
1371
|
+
*/
|
|
1372
|
+
function makeUseModuleExperiment(registry) {
|
|
1373
|
+
return function useModuleExperiment({ key, enabled = true, conditions }) {
|
|
1374
|
+
const spec = registry[key];
|
|
1375
|
+
const { value: store, status } = useFeatureManagement("parameterStore", ONBOARDING_WEB_SDK_PARAMETER_STORE, { enabled });
|
|
1376
|
+
const conditionsKey = conditions ? JSON.stringify(conditions) : "";
|
|
1377
|
+
const resolved = T(() => enabled && status === "ready" ? resolveExperiment(spec, { store }) : {
|
|
1378
|
+
params: { ...spec.defaults },
|
|
1379
|
+
assignment: null
|
|
1380
|
+
}, [
|
|
1381
|
+
enabled,
|
|
1382
|
+
status,
|
|
1383
|
+
store,
|
|
1384
|
+
spec
|
|
1385
|
+
]);
|
|
1386
|
+
const assignment = resolved.assignment;
|
|
1387
|
+
const variant = assignment?.variant ?? null;
|
|
1388
|
+
y(() => {
|
|
1389
|
+
if (!assignment) return;
|
|
1390
|
+
recordExperimentAssignmentOnce(spec.module, {
|
|
1391
|
+
...assignment,
|
|
1392
|
+
conditions: conditionsKey ? JSON.parse(conditionsKey) : void 0
|
|
1393
|
+
});
|
|
1394
|
+
}, [
|
|
1395
|
+
assignment,
|
|
1396
|
+
spec,
|
|
1397
|
+
conditionsKey
|
|
1398
|
+
]);
|
|
1399
|
+
return {
|
|
1400
|
+
variant,
|
|
1401
|
+
status,
|
|
1402
|
+
params: resolved.params
|
|
1403
|
+
};
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
//#endregion
|
|
1407
|
+
//#region src/modules/id/experiments/useIdExperiment.ts
|
|
1408
|
+
/**
|
|
1409
|
+
* ID-module binding of `makeUseModuleExperiment` (see `@/experiments` for
|
|
1410
|
+
* the shared parameter-store/analytics-gate/assignment-recording mechanics),
|
|
1411
|
+
* bound to `ID_EXPERIMENTS`.
|
|
1412
|
+
*
|
|
1413
|
+
* Pass `enabled: false` for a surface/mode the treatment can never apply to
|
|
1414
|
+
* (e.g. passport in `flipCapturedCard`) so that surface neither logs an
|
|
1415
|
+
* exposure nor records an assignment; `params` still resolves to the
|
|
1416
|
+
* registry-declared defaults so callers don't need a separate
|
|
1417
|
+
* branch.
|
|
1418
|
+
*/
|
|
1419
|
+
var useIdExperiment = makeUseModuleExperiment({ flipCapturedCard: {
|
|
1420
|
+
storeParam: "flipCapturedCard",
|
|
1421
|
+
module: eventModuleNames.idCapture,
|
|
1422
|
+
...defineExperimentParams({ shouldFlipCapturedCard: booleanParam(false) })
|
|
1423
|
+
} });
|
|
1424
|
+
//#endregion
|
|
1232
1425
|
//#region src/modules/id/processing/idSuccess.tsx
|
|
1233
1426
|
var IdSuccess = ({ manager, state, blurImage }) => {
|
|
1234
1427
|
const { t } = useTranslation();
|
|
1235
|
-
|
|
1428
|
+
const { params } = useIdExperiment({
|
|
1429
|
+
key: "flipCapturedCard",
|
|
1430
|
+
enabled: state.currentMode !== "passport"
|
|
1431
|
+
});
|
|
1432
|
+
const shouldFlipCapturedCard = params.shouldFlipCapturedCard;
|
|
1433
|
+
if (!state.previewImageUrl && !state.barcodeFastPathCaptured) return null;
|
|
1236
1434
|
const mode = state.currentMode === "passport" ? "passport" : "id";
|
|
1237
1435
|
const getSubtitle = () => {
|
|
1238
1436
|
if (state.needsBackCapture) return t("idv2.capture.processing.successFrontSubtitle");
|
|
@@ -1253,7 +1451,8 @@ var IdSuccess = ({ manager, state, blurImage }) => {
|
|
|
1253
1451
|
subtitle: getSubtitle(),
|
|
1254
1452
|
buttonText: getButtonText(),
|
|
1255
1453
|
onButtonClick: () => manager.nextStep(),
|
|
1256
|
-
blurImage
|
|
1454
|
+
blurImage,
|
|
1455
|
+
fadeOutOnClick: shouldFlipCapturedCard
|
|
1257
1456
|
});
|
|
1258
1457
|
};
|
|
1259
1458
|
//#endregion
|
|
@@ -1351,227 +1550,13 @@ var IdNoAttempts = ({ manager }) => {
|
|
|
1351
1550
|
});
|
|
1352
1551
|
};
|
|
1353
1552
|
//#endregion
|
|
1354
|
-
//#region src/modules/id/capture/useCaptureNotification.ts
|
|
1355
|
-
var animationCache = /* @__PURE__ */ new Map();
|
|
1356
|
-
var preloadStarted = false;
|
|
1357
|
-
var animationLoaders = {
|
|
1358
|
-
blur: () => import("./blurdevicelottie-BLVeJHEG.js"),
|
|
1359
|
-
glare: () => import("./glaredevicelottie-D1pR73sx.js"),
|
|
1360
|
-
align: () => import("./aligndevicelottie-DFscByAI.js"),
|
|
1361
|
-
front: () => import("./frontdevicelottie-B4tE2PYQ.js"),
|
|
1362
|
-
back: () => import("./backdevicelottie-COyhTrxM.js")
|
|
1363
|
-
};
|
|
1364
|
-
function startPreload(onUpdate) {
|
|
1365
|
-
if (preloadStarted) return;
|
|
1366
|
-
preloadStarted = true;
|
|
1367
|
-
Promise.all([
|
|
1368
|
-
animationLoaders.blur(),
|
|
1369
|
-
animationLoaders.glare(),
|
|
1370
|
-
animationLoaders.align(),
|
|
1371
|
-
animationLoaders.front(),
|
|
1372
|
-
animationLoaders.back()
|
|
1373
|
-
]).then(([blur, glare, align, front, back]) => {
|
|
1374
|
-
animationCache.set("blur", blur.default);
|
|
1375
|
-
animationCache.set("glare", glare.default);
|
|
1376
|
-
animationCache.set("align", align.default);
|
|
1377
|
-
animationCache.set("front", front.default);
|
|
1378
|
-
animationCache.set("back", back.default);
|
|
1379
|
-
onUpdate?.();
|
|
1380
|
-
}).catch(() => {});
|
|
1381
|
-
}
|
|
1382
|
-
function preloadCaptureAnimations() {
|
|
1383
|
-
startPreload();
|
|
1384
|
-
}
|
|
1385
|
-
function usePreloadCaptureAnimations() {
|
|
1386
|
-
y(() => {
|
|
1387
|
-
preloadCaptureAnimations();
|
|
1388
|
-
}, []);
|
|
1389
|
-
}
|
|
1390
|
-
function useCaptureNotification(detectionStatus, mode) {
|
|
1391
|
-
const { t } = useTranslation();
|
|
1392
|
-
const [, forceUpdate] = d(0);
|
|
1393
|
-
y(() => {
|
|
1394
|
-
startPreload(() => forceUpdate((n) => n + 1));
|
|
1395
|
-
}, []);
|
|
1396
|
-
if (detectionStatus === "blur") return {
|
|
1397
|
-
title: t("idv2.capture.notifications.blur.title"),
|
|
1398
|
-
description: t("idv2.capture.notifications.blur.description"),
|
|
1399
|
-
animationData: animationCache.get("blur") ?? null
|
|
1400
|
-
};
|
|
1401
|
-
if (detectionStatus === "glare") return {
|
|
1402
|
-
title: t("idv2.capture.notifications.glare.title"),
|
|
1403
|
-
description: t("idv2.capture.notifications.glare.description"),
|
|
1404
|
-
animationData: animationCache.get("glare") ?? null
|
|
1405
|
-
};
|
|
1406
|
-
if (detectionStatus === "farAway") return {
|
|
1407
|
-
title: t("idv2.capture.notifications.notAligned.title"),
|
|
1408
|
-
description: t("idv2.capture.notifications.notAligned.description"),
|
|
1409
|
-
animationData: animationCache.get("align") ?? null
|
|
1410
|
-
};
|
|
1411
|
-
if (detectionStatus === "wrongSide") {
|
|
1412
|
-
const isBack = mode === "back";
|
|
1413
|
-
return {
|
|
1414
|
-
title: isBack ? t("idv2.capture.notifications.showBack.title") : t("idv2.capture.notifications.showFront.title"),
|
|
1415
|
-
description: isBack ? t("idv2.capture.notifications.showBack.description") : t("idv2.capture.notifications.showFront.description"),
|
|
1416
|
-
animationData: animationCache.get(isBack ? "back" : "front") ?? null
|
|
1417
|
-
};
|
|
1418
|
-
}
|
|
1419
|
-
return null;
|
|
1420
|
-
}
|
|
1421
|
-
//#endregion
|
|
1422
|
-
//#region src/modules/id/capture/captureNotification.tsx
|
|
1423
|
-
var CaptureNotification = ({ detectionStatus, mode, isCapturing }) => {
|
|
1424
|
-
const { t } = useTranslation();
|
|
1425
|
-
const notification = useCaptureNotification(detectionStatus, mode);
|
|
1426
|
-
const liveRef = A(null);
|
|
1427
|
-
const lastAnnouncedRef = A({
|
|
1428
|
-
message: "",
|
|
1429
|
-
at: 0
|
|
1430
|
-
});
|
|
1431
|
-
const prevDetectionStatusRef = A(detectionStatus);
|
|
1432
|
-
const hasAnnouncedInstructionsRef = A(false);
|
|
1433
|
-
const clearTimerRef = A();
|
|
1434
|
-
const outerTimerRef = A();
|
|
1435
|
-
const isIdle = detectionStatus === "detecting" || detectionStatus === "idNotDetected" || detectionStatus === "manualCapture";
|
|
1436
|
-
const isManualCapture = detectionStatus === "manualCapture";
|
|
1437
|
-
const isWrongSide = detectionStatus === "wrongSide";
|
|
1438
|
-
const isFarAway = detectionStatus === "farAway";
|
|
1439
|
-
const isGlare = detectionStatus === "glare";
|
|
1440
|
-
const isBlur = detectionStatus === "blur";
|
|
1441
|
-
const announce = q((message) => {
|
|
1442
|
-
const now = Date.now();
|
|
1443
|
-
const last = lastAnnouncedRef.current;
|
|
1444
|
-
if (message === last.message && now - last.at < 200) return;
|
|
1445
|
-
lastAnnouncedRef.current = {
|
|
1446
|
-
message,
|
|
1447
|
-
at: now
|
|
1448
|
-
};
|
|
1449
|
-
const node = liveRef.current;
|
|
1450
|
-
if (!node) return;
|
|
1451
|
-
clearTimeout(clearTimerRef.current);
|
|
1452
|
-
node.textContent = "";
|
|
1453
|
-
outerTimerRef.current = setTimeout(() => {
|
|
1454
|
-
node.textContent = message;
|
|
1455
|
-
clearTimerRef.current = setTimeout(() => {
|
|
1456
|
-
node.textContent = "";
|
|
1457
|
-
}, 3e3);
|
|
1458
|
-
}, 50);
|
|
1459
|
-
}, []);
|
|
1460
|
-
const getIdleMessage = q(() => {
|
|
1461
|
-
if (mode === "passport") return t("idv2.capture.fillFramePassport");
|
|
1462
|
-
if (mode === "back") return t("idv2.capture.fillFrameBack");
|
|
1463
|
-
return t("idv2.capture.fillFrameFront");
|
|
1464
|
-
}, [mode, t]);
|
|
1465
|
-
y(() => {
|
|
1466
|
-
if (isManualCapture) {
|
|
1467
|
-
hasAnnouncedInstructionsRef.current = false;
|
|
1468
|
-
return;
|
|
1469
|
-
}
|
|
1470
|
-
if (hasAnnouncedInstructionsRef.current) return;
|
|
1471
|
-
if (!isIdle) return;
|
|
1472
|
-
const timer = setTimeout(() => {
|
|
1473
|
-
hasAnnouncedInstructionsRef.current = true;
|
|
1474
|
-
announce(getIdleMessage());
|
|
1475
|
-
}, 500);
|
|
1476
|
-
return () => clearTimeout(timer);
|
|
1477
|
-
}, [
|
|
1478
|
-
isIdle,
|
|
1479
|
-
isManualCapture,
|
|
1480
|
-
announce,
|
|
1481
|
-
getIdleMessage
|
|
1482
|
-
]);
|
|
1483
|
-
y(() => {
|
|
1484
|
-
const prev = prevDetectionStatusRef.current;
|
|
1485
|
-
prevDetectionStatusRef.current = detectionStatus;
|
|
1486
|
-
if (prev !== "manualCapture" && isManualCapture) announce(t("idv2.capture.manualCapture.modeSwitchAriaAnnouncement"));
|
|
1487
|
-
}, [
|
|
1488
|
-
announce,
|
|
1489
|
-
detectionStatus,
|
|
1490
|
-
isManualCapture,
|
|
1491
|
-
t
|
|
1492
|
-
]);
|
|
1493
|
-
y(() => {
|
|
1494
|
-
if (isCapturing) return;
|
|
1495
|
-
if (isWrongSide) {
|
|
1496
|
-
const baseKey = mode === "front" || mode === "passport" ? "idv2.capture.notifications.showFront" : "idv2.capture.notifications.showBack";
|
|
1497
|
-
announce(`${t(`${baseKey}.title`)}. ${t(`${baseKey}.description`)}`);
|
|
1498
|
-
return;
|
|
1499
|
-
}
|
|
1500
|
-
if (isFarAway) {
|
|
1501
|
-
announce(`${t("idv2.capture.notifications.notAligned.title")}.`);
|
|
1502
|
-
return;
|
|
1503
|
-
}
|
|
1504
|
-
if (isGlare) {
|
|
1505
|
-
announce(`${t("idv2.capture.notifications.glare.title")}.`);
|
|
1506
|
-
return;
|
|
1507
|
-
}
|
|
1508
|
-
if (isBlur) {
|
|
1509
|
-
announce(`${t("idv2.capture.notifications.blur.title")}.`);
|
|
1510
|
-
return;
|
|
1511
|
-
}
|
|
1512
|
-
if (isIdle && hasAnnouncedInstructionsRef.current) announce(getIdleMessage());
|
|
1513
|
-
}, [
|
|
1514
|
-
announce,
|
|
1515
|
-
isBlur,
|
|
1516
|
-
isCapturing,
|
|
1517
|
-
isFarAway,
|
|
1518
|
-
isGlare,
|
|
1519
|
-
isIdle,
|
|
1520
|
-
isWrongSide,
|
|
1521
|
-
mode,
|
|
1522
|
-
t,
|
|
1523
|
-
getIdleMessage
|
|
1524
|
-
]);
|
|
1525
|
-
y(() => {
|
|
1526
|
-
return () => {
|
|
1527
|
-
clearTimeout(outerTimerRef.current);
|
|
1528
|
-
clearTimeout(clearTimerRef.current);
|
|
1529
|
-
};
|
|
1530
|
-
}, []);
|
|
1531
|
-
return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("div", {
|
|
1532
|
-
ref: liveRef,
|
|
1533
|
-
class: "IncodeSrOnly",
|
|
1534
|
-
"aria-live": "assertive",
|
|
1535
|
-
"aria-atomic": "true"
|
|
1536
|
-
}), notification ? /* @__PURE__ */ u("div", {
|
|
1537
|
-
class: cn("IncodeIdCaptureNotification"),
|
|
1538
|
-
"aria-hidden": "true",
|
|
1539
|
-
children: /* @__PURE__ */ u("div", {
|
|
1540
|
-
class: "IncodeIdCaptureNotificationContent",
|
|
1541
|
-
children: [
|
|
1542
|
-
/* @__PURE__ */ u("div", {
|
|
1543
|
-
class: cn("IncodeIdCaptureNotificationText"),
|
|
1544
|
-
children: [/* @__PURE__ */ u("div", {
|
|
1545
|
-
class: "IncodeIdCaptureNotificationTitle",
|
|
1546
|
-
children: notification.title
|
|
1547
|
-
}), notification.description && /* @__PURE__ */ u("div", {
|
|
1548
|
-
class: "IncodeIdCaptureNotificationDescription",
|
|
1549
|
-
children: notification.description
|
|
1550
|
-
})]
|
|
1551
|
-
}),
|
|
1552
|
-
/* @__PURE__ */ u(Spacer, {
|
|
1553
|
-
size: 16,
|
|
1554
|
-
direction: "horizontal"
|
|
1555
|
-
}),
|
|
1556
|
-
notification.animationData && /* @__PURE__ */ u("div", {
|
|
1557
|
-
class: "IncodeIdCaptureNotificationAnimation",
|
|
1558
|
-
children: /* @__PURE__ */ u(Lottie, {
|
|
1559
|
-
animationData: notification.animationData,
|
|
1560
|
-
loop: true
|
|
1561
|
-
})
|
|
1562
|
-
})
|
|
1563
|
-
]
|
|
1564
|
-
})
|
|
1565
|
-
}) : null] });
|
|
1566
|
-
};
|
|
1567
|
-
//#endregion
|
|
1568
1553
|
//#region src/modules/id/capture/idHint.tsx
|
|
1569
|
-
var FrontHorizontalHintSvg = z(() => import("./front-horizontal-hint-
|
|
1570
|
-
var FrontVerticalHintSvg = z(() => import("./front-vertical-hint-
|
|
1571
|
-
var BackHorizontalHintSvg = z(() => import("./back-horizontal-hint-
|
|
1572
|
-
var BackVerticalHintSvg = z(() => import("./back-vertical-hint-
|
|
1573
|
-
var PassportHorizontalHintSvg = z(() => import("./passport-horizontal-hint-
|
|
1574
|
-
var PassportVerticalHintSvg = z(() => import("./passport-vertical-hint-
|
|
1554
|
+
var FrontHorizontalHintSvg = z(() => import("./front-horizontal-hint-D3CrWViZ.js"));
|
|
1555
|
+
var FrontVerticalHintSvg = z(() => import("./front-vertical-hint-BoLZvyx5.js"));
|
|
1556
|
+
var BackHorizontalHintSvg = z(() => import("./back-horizontal-hint-BBGuJ75y.js"));
|
|
1557
|
+
var BackVerticalHintSvg = z(() => import("./back-vertical-hint-B9usJ5lY.js"));
|
|
1558
|
+
var PassportHorizontalHintSvg = z(() => import("./passport-horizontal-hint-DgnU-8bl.js"));
|
|
1559
|
+
var PassportVerticalHintSvg = z(() => import("./passport-vertical-hint-Dd2Wknw7.js"));
|
|
1575
1560
|
var CARD_WIDTH_IN_SVG = {
|
|
1576
1561
|
"front-horizontal": 348,
|
|
1577
1562
|
"back-horizontal": 348,
|
|
@@ -1632,13 +1617,88 @@ var IdHint = ({ mode, orientation, onAnimationEnd }) => {
|
|
|
1632
1617
|
});
|
|
1633
1618
|
};
|
|
1634
1619
|
//#endregion
|
|
1620
|
+
//#region src/modules/id/capture/captureLiveFrameContent.tsx
|
|
1621
|
+
var CaptureLiveFrameContent = ({ hideCountdown, isCapturing, counterValue, showIdHint, mode, orientation, onIdHintAnimationEnd }) => /* @__PURE__ */ u(k, { children: [!hideCountdown && isCapturing && counterValue > 0 && /* @__PURE__ */ u("div", {
|
|
1622
|
+
class: "IncodeCaptureCounter",
|
|
1623
|
+
children: counterValue
|
|
1624
|
+
}), showIdHint && /* @__PURE__ */ u(IdHint, {
|
|
1625
|
+
mode,
|
|
1626
|
+
orientation: orientation ?? "horizontal",
|
|
1627
|
+
onAnimationEnd: onIdHintAnimationEnd
|
|
1628
|
+
})] });
|
|
1629
|
+
//#endregion
|
|
1630
|
+
//#region src/modules/id/capture/captureResultFlash.tsx
|
|
1631
|
+
var FLASH_ANIMATION_NAME = "incodeCaptureResultFlash";
|
|
1632
|
+
/**
|
|
1633
|
+
* `uxp_idc_exp05_show_result` treatment: one-shot white "shutter" flash.
|
|
1634
|
+
* Plays on mount and reports `animationend` so its parent can remove and
|
|
1635
|
+
* re-arm it for the next capture.
|
|
1636
|
+
*/
|
|
1637
|
+
var CaptureResultFlash = ({ onAnimationEnd }) => /* @__PURE__ */ u("div", {
|
|
1638
|
+
class: "IncodeCaptureResultFlash",
|
|
1639
|
+
"aria-hidden": "true",
|
|
1640
|
+
onAnimationEnd: (event) => {
|
|
1641
|
+
if (event.animationName !== FLASH_ANIMATION_NAME) return;
|
|
1642
|
+
onAnimationEnd?.();
|
|
1643
|
+
}
|
|
1644
|
+
});
|
|
1645
|
+
//#endregion
|
|
1646
|
+
//#region src/modules/id/capture/captureResultPreview.tsx
|
|
1647
|
+
var CaptureResultPreview = ({ resultPreview, onFlashAnimationEnd }) => {
|
|
1648
|
+
const [hasFlashed, setHasFlashed] = d(false);
|
|
1649
|
+
return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("img", {
|
|
1650
|
+
src: resultPreview.imageUrl,
|
|
1651
|
+
alt: "",
|
|
1652
|
+
"aria-hidden": "true",
|
|
1653
|
+
class: cn("IncodeCaptureResultImage", resultPreview.blurImage && "IncodeCaptureResultImageBlurred")
|
|
1654
|
+
}), !hasFlashed && /* @__PURE__ */ u(CaptureResultFlash, { onAnimationEnd: () => {
|
|
1655
|
+
setHasFlashed(true);
|
|
1656
|
+
onFlashAnimationEnd?.();
|
|
1657
|
+
} })] });
|
|
1658
|
+
};
|
|
1659
|
+
//#endregion
|
|
1660
|
+
//#region src/modules/id/capture/captureOverlayHelpers.ts
|
|
1661
|
+
var resolveResultView = (t) => ({
|
|
1662
|
+
frameState: "success",
|
|
1663
|
+
header: {
|
|
1664
|
+
title: t("idv2.capture.resultPreview.title"),
|
|
1665
|
+
subtitle: t("idv2.capture.resultPreview.subtitle")
|
|
1666
|
+
}
|
|
1667
|
+
});
|
|
1668
|
+
var resolveLiveView = ({ t, mode, detectionStatus, isCapturing }) => {
|
|
1669
|
+
if (isCapturing || detectionStatus === "capturing") return {
|
|
1670
|
+
frameState: "capturing",
|
|
1671
|
+
header: {
|
|
1672
|
+
title: t("idv2.capture.takingPhoto"),
|
|
1673
|
+
subtitle: t("idv2.capture.dontMove")
|
|
1674
|
+
}
|
|
1675
|
+
};
|
|
1676
|
+
const isManualCapture = detectionStatus === "manualCapture";
|
|
1677
|
+
const hasDetectionError = detectionStatus === "blur" || detectionStatus === "glare" || detectionStatus === "wrongSide" || detectionStatus === "farAway";
|
|
1678
|
+
if (!(detectionStatus === "detecting" || detectionStatus === "idNotDetected" || isManualCapture)) return {
|
|
1679
|
+
frameState: hasDetectionError ? "error" : "idle",
|
|
1680
|
+
header: null
|
|
1681
|
+
};
|
|
1682
|
+
const subtitle = isManualCapture ? "" : t("idv2.capture.autoCapture");
|
|
1683
|
+
return {
|
|
1684
|
+
frameState: "idle",
|
|
1685
|
+
header: {
|
|
1686
|
+
title: mode === "passport" ? t("idv2.capture.fillFramePassport") : mode === "back" ? t("idv2.capture.fillFrameBack") : t("idv2.capture.fillFrameFront"),
|
|
1687
|
+
subtitle
|
|
1688
|
+
}
|
|
1689
|
+
};
|
|
1690
|
+
};
|
|
1691
|
+
//#endregion
|
|
1635
1692
|
//#region src/modules/id/capture/captureOverlay.tsx
|
|
1636
1693
|
var MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATION = "manualCaptureTooltipExit";
|
|
1637
|
-
var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCapturing, showManualCapture, onCapture, onOpenHelp, helpButtonRef, captureButtonRef }, ref) => {
|
|
1694
|
+
var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCapturing, showManualCapture, onCapture, onOpenHelp, helpButtonRef, captureButtonRef, hideCountdown, resultPreview }, ref) => {
|
|
1638
1695
|
const { t } = useTranslation();
|
|
1639
1696
|
usePreloadCaptureAnimations();
|
|
1697
|
+
const isResultPreview = resultPreview !== void 0;
|
|
1640
1698
|
const hasShownIdHintRef = A(false);
|
|
1699
|
+
const cameraOverlayHeaderTitleRef = A(null);
|
|
1641
1700
|
const [showIdHint, setShowIdHint] = d(false);
|
|
1701
|
+
const [manualCaptureTooltipDismissed, setManualCaptureTooltipDismissed] = d(false);
|
|
1642
1702
|
y(() => {
|
|
1643
1703
|
if (detectionStatus === "idNotDetected") {
|
|
1644
1704
|
if (hasShownIdHintRef.current) return;
|
|
@@ -1648,7 +1708,6 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
|
|
|
1648
1708
|
}
|
|
1649
1709
|
if (showIdHint) setShowIdHint(false);
|
|
1650
1710
|
}, [detectionStatus, showIdHint]);
|
|
1651
|
-
const [manualCaptureTooltipDismissed, setManualCaptureTooltipDismissed] = d(false);
|
|
1652
1711
|
y(() => {
|
|
1653
1712
|
if (!showManualCapture) setManualCaptureTooltipDismissed(false);
|
|
1654
1713
|
}, [showManualCapture]);
|
|
@@ -1659,42 +1718,26 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
|
|
|
1659
1718
|
y(() => {
|
|
1660
1719
|
if (showManualCapture && captureButtonRef) captureButtonRef.current?.focus();
|
|
1661
1720
|
}, [showManualCapture, captureButtonRef]);
|
|
1662
|
-
|
|
1663
|
-
if (
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
title: t("idv2.capture.takingPhoto"),
|
|
1670
|
-
subtitle: t("idv2.capture.dontMove")
|
|
1671
|
-
};
|
|
1672
|
-
if (detectionStatus === "detecting" || detectionStatus === "idNotDetected" || detectionStatus === "manualCapture") {
|
|
1673
|
-
const isManual = detectionStatus === "manualCapture";
|
|
1674
|
-
if (mode === "passport") return {
|
|
1675
|
-
title: t("idv2.capture.fillFramePassport"),
|
|
1676
|
-
subtitle: isManual ? "" : t("idv2.capture.autoCapture")
|
|
1677
|
-
};
|
|
1678
|
-
if (mode === "back") return {
|
|
1679
|
-
title: t("idv2.capture.fillFrameBack"),
|
|
1680
|
-
subtitle: isManual ? "" : t("idv2.capture.autoCapture")
|
|
1681
|
-
};
|
|
1682
|
-
return {
|
|
1683
|
-
title: t("idv2.capture.fillFrameFront"),
|
|
1684
|
-
subtitle: isManual ? "" : t("idv2.capture.autoCapture")
|
|
1685
|
-
};
|
|
1686
|
-
}
|
|
1687
|
-
return null;
|
|
1688
|
-
}, [
|
|
1689
|
-
isCapturing,
|
|
1721
|
+
_(() => {
|
|
1722
|
+
if (!isResultPreview) return;
|
|
1723
|
+
cameraOverlayHeaderTitleRef.current?.focus();
|
|
1724
|
+
}, [isResultPreview]);
|
|
1725
|
+
const { frameState, header } = T(() => isResultPreview ? resolveResultView(t) : resolveLiveView({
|
|
1726
|
+
t,
|
|
1727
|
+
mode,
|
|
1690
1728
|
detectionStatus,
|
|
1729
|
+
isCapturing
|
|
1730
|
+
}), [
|
|
1731
|
+
isResultPreview,
|
|
1732
|
+
t,
|
|
1691
1733
|
mode,
|
|
1692
|
-
|
|
1734
|
+
detectionStatus,
|
|
1735
|
+
isCapturing
|
|
1693
1736
|
]);
|
|
1694
|
-
const frameState = getFrameState();
|
|
1695
1737
|
const isPassport = mode === "passport";
|
|
1696
|
-
const frameOrientation = orientation !== "vertical"
|
|
1697
|
-
const showManualCaptureTooltip = showManualCapture && !manualCaptureTooltipDismissed;
|
|
1738
|
+
const frameOrientation = orientation !== "vertical" ? "horizontal" : "vertical";
|
|
1739
|
+
const showManualCaptureTooltip = !isResultPreview && showManualCapture && !manualCaptureTooltipDismissed;
|
|
1740
|
+
const showCounter = !isResultPreview && !hideCountdown && isCapturing && counterValue > 0;
|
|
1698
1741
|
const manualCaptureTooltip = /* @__PURE__ */ u("div", {
|
|
1699
1742
|
id: "manual-capture-tooltip",
|
|
1700
1743
|
class: "IncodeIdManualCaptureTooltip",
|
|
@@ -1708,15 +1751,17 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
|
|
|
1708
1751
|
children: [
|
|
1709
1752
|
/* @__PURE__ */ u("div", {
|
|
1710
1753
|
class: "IncodeCaptureTopSection",
|
|
1711
|
-
children: [/* @__PURE__ */ u(CaptureNotification, {
|
|
1754
|
+
children: [!isResultPreview && /* @__PURE__ */ u(CaptureNotification, {
|
|
1712
1755
|
detectionStatus,
|
|
1713
1756
|
mode,
|
|
1714
1757
|
isCapturing
|
|
1715
1758
|
}), /* @__PURE__ */ u(CameraOverlayHeader, {
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1759
|
+
titleRef: cameraOverlayHeaderTitleRef,
|
|
1760
|
+
title: header?.title ?? "",
|
|
1761
|
+
subtitle: header?.subtitle,
|
|
1762
|
+
visible: header !== null,
|
|
1763
|
+
titleId: "id-capture-heading",
|
|
1764
|
+
className: cn(isResultPreview && "IncodeCaptureResultHeaderReveal")
|
|
1720
1765
|
})]
|
|
1721
1766
|
}),
|
|
1722
1767
|
/* @__PURE__ */ u(CameraFrame, {
|
|
@@ -1725,20 +1770,21 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
|
|
|
1725
1770
|
orientation: frameOrientation,
|
|
1726
1771
|
frameState,
|
|
1727
1772
|
className: cn(isPassport && "IncodeCaptureFramePassport"),
|
|
1728
|
-
children:
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1773
|
+
children: resultPreview ? /* @__PURE__ */ u(CaptureResultPreview, { resultPreview }) : /* @__PURE__ */ u(CaptureLiveFrameContent, {
|
|
1774
|
+
hideCountdown,
|
|
1775
|
+
isCapturing,
|
|
1776
|
+
counterValue,
|
|
1777
|
+
showIdHint,
|
|
1732
1778
|
mode,
|
|
1733
|
-
orientation
|
|
1734
|
-
|
|
1735
|
-
})
|
|
1779
|
+
orientation,
|
|
1780
|
+
onIdHintAnimationEnd: () => setShowIdHint(false)
|
|
1781
|
+
})
|
|
1736
1782
|
}),
|
|
1737
1783
|
/* @__PURE__ */ u("div", {
|
|
1738
1784
|
class: "IncodeSrOnly",
|
|
1739
1785
|
"aria-live": "polite",
|
|
1740
1786
|
"aria-atomic": "true",
|
|
1741
|
-
children:
|
|
1787
|
+
children: showCounter ? counterValue : ""
|
|
1742
1788
|
}),
|
|
1743
1789
|
/* @__PURE__ */ u(CaptureFooter, {
|
|
1744
1790
|
onOpenHelp,
|
|
@@ -1747,6 +1793,7 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
|
|
|
1747
1793
|
helpButtonRef,
|
|
1748
1794
|
captureButtonRef,
|
|
1749
1795
|
captureAriaDescribedBy: showManualCaptureTooltip ? "manual-capture-tooltip" : void 0,
|
|
1796
|
+
hideActions: isResultPreview,
|
|
1750
1797
|
children: showManualCaptureTooltip ? /* @__PURE__ */ u("div", {
|
|
1751
1798
|
class: "IncodeIdManualCaptureTooltipContainer",
|
|
1752
1799
|
onAnimationEnd: handleManualCaptureTooltipAnimationEnd,
|
|
@@ -1757,19 +1804,22 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
|
|
|
1757
1804
|
});
|
|
1758
1805
|
});
|
|
1759
1806
|
//#endregion
|
|
1807
|
+
//#region src/modules/id/capture/captureHelpers.ts
|
|
1808
|
+
function getCaptureStageView(state, isCrossfading) {
|
|
1809
|
+
if (!state.previewImageUrl) return "live";
|
|
1810
|
+
if (state.captureStatus === "uploading") return "analyzing";
|
|
1811
|
+
return isCrossfading ? "crossfade" : "live";
|
|
1812
|
+
}
|
|
1813
|
+
function getCaptureMode(state) {
|
|
1814
|
+
return state.currentMode === "passport" ? "passport" : "id";
|
|
1815
|
+
}
|
|
1816
|
+
//#endregion
|
|
1760
1817
|
//#region src/modules/id/capture/capture.tsx
|
|
1761
1818
|
var Capture = ({ manager, state }) => {
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
progress: state.uploadProgress ?? 0,
|
|
1767
|
-
orientation: state.orientation,
|
|
1768
|
-
mode,
|
|
1769
|
-
blurImage: state.ageAssurance
|
|
1770
|
-
});
|
|
1771
|
-
}
|
|
1772
|
-
if (state.captureStatus === "success" && state.previewImageUrl) return /* @__PURE__ */ u(IdSuccess, {
|
|
1819
|
+
const { t } = useTranslation();
|
|
1820
|
+
const { enabled: captureResultPreviewEnabled, isCrossfading, onCrossfadeEnd } = useCaptureResultPreview(manager, state);
|
|
1821
|
+
if (state.captureStatus === "holdOn") return /* @__PURE__ */ u(TransitionSpinner, { spinnerConfig: { subtitle: t("idv2.capture.holdOn.subtitle") } });
|
|
1822
|
+
if (state.captureStatus === "success" && (state.previewImageUrl || state.barcodeFastPathCaptured)) return /* @__PURE__ */ u(IdSuccess, {
|
|
1773
1823
|
manager,
|
|
1774
1824
|
state,
|
|
1775
1825
|
blurImage: state.ageAssurance
|
|
@@ -1779,12 +1829,39 @@ var Capture = ({ manager, state }) => {
|
|
|
1779
1829
|
state,
|
|
1780
1830
|
blurImage: state.ageAssurance
|
|
1781
1831
|
});
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1832
|
+
const stageView = getCaptureStageView(state, isCrossfading);
|
|
1833
|
+
const isCrossfadeStage = stageView === "crossfade";
|
|
1834
|
+
const isLiveStage = stageView === "live";
|
|
1835
|
+
let idAnalyzingSlot = null;
|
|
1836
|
+
if (state.previewImageUrl && !isLiveStage) idAnalyzingSlot = /* @__PURE__ */ u("div", {
|
|
1837
|
+
class: "IncodeIdCaptureStageAnalyzing",
|
|
1838
|
+
"aria-hidden": isCrossfadeStage || void 0,
|
|
1839
|
+
inert: isCrossfadeStage || void 0,
|
|
1840
|
+
children: /* @__PURE__ */ u(IdAnalyzing, {
|
|
1841
|
+
imageUrl: state.previewImageUrl,
|
|
1842
|
+
progress: state.uploadProgress ?? 0,
|
|
1843
|
+
orientation: state.orientation,
|
|
1844
|
+
mode: getCaptureMode(state),
|
|
1845
|
+
blurImage: state.ageAssurance,
|
|
1846
|
+
autoFocusTitle: !isCrossfadeStage
|
|
1847
|
+
})
|
|
1848
|
+
}, "analyzing");
|
|
1849
|
+
let captureViewSlot = null;
|
|
1850
|
+
if (stageView !== "analyzing") captureViewSlot = /* @__PURE__ */ u("div", {
|
|
1851
|
+
class: "IncodeIdCaptureStageLive",
|
|
1852
|
+
onAnimationEnd: onCrossfadeEnd,
|
|
1853
|
+
children: /* @__PURE__ */ u(CaptureView, {
|
|
1854
|
+
manager,
|
|
1855
|
+
state,
|
|
1856
|
+
captureResultPreviewEnabled
|
|
1857
|
+
})
|
|
1858
|
+
}, "live");
|
|
1859
|
+
return /* @__PURE__ */ u("div", {
|
|
1860
|
+
class: cn("IncodeIdCaptureStage", stageView === "crossfade" && "IncodeIdCaptureStageCrossfading"),
|
|
1861
|
+
children: [idAnalyzingSlot, captureViewSlot]
|
|
1785
1862
|
});
|
|
1786
1863
|
};
|
|
1787
|
-
var CaptureView = ({ manager, state }) => {
|
|
1864
|
+
var CaptureView = ({ manager, state, captureResultPreviewEnabled }) => {
|
|
1788
1865
|
const frameRef = A(null);
|
|
1789
1866
|
const helpButtonRef = A(null);
|
|
1790
1867
|
const captureButtonRef = A(null);
|
|
@@ -1806,6 +1883,10 @@ var CaptureView = ({ manager, state }) => {
|
|
|
1806
1883
|
const isCapturing = state.captureStatus === "capturing" || state.detectionStatus === "capturing";
|
|
1807
1884
|
const detectionStatus = state.detectionStatus;
|
|
1808
1885
|
const showManualCapture = detectionStatus === "manualCapture" || state.showCaptureButtonInAuto && state.captureStatus === "detecting" && detectionStatus !== "capturing";
|
|
1886
|
+
const resultPreview = captureResultPreviewEnabled && state.captureStatus === "resultPreview" && state.previewImageUrl ? {
|
|
1887
|
+
imageUrl: state.previewImageUrl,
|
|
1888
|
+
blurImage: state.ageAssurance
|
|
1889
|
+
} : void 0;
|
|
1809
1890
|
const handleOpenHelp = () => {
|
|
1810
1891
|
setIsHelpOpen(true);
|
|
1811
1892
|
};
|
|
@@ -1845,7 +1926,9 @@ var CaptureView = ({ manager, state }) => {
|
|
|
1845
1926
|
onCapture: handleCapture,
|
|
1846
1927
|
onOpenHelp: handleOpenHelp,
|
|
1847
1928
|
helpButtonRef,
|
|
1848
|
-
captureButtonRef
|
|
1929
|
+
captureButtonRef,
|
|
1930
|
+
hideCountdown: captureResultPreviewEnabled,
|
|
1931
|
+
resultPreview
|
|
1849
1932
|
})
|
|
1850
1933
|
}),
|
|
1851
1934
|
/* @__PURE__ */ u("div", { ref: portalRef }),
|
|
@@ -1863,20 +1946,9 @@ var CaptureView = ({ manager, state }) => {
|
|
|
1863
1946
|
var Tutorial = ({ manager, state }) => {
|
|
1864
1947
|
const { t } = useTranslation();
|
|
1865
1948
|
const [isLoading, setIsLoading] = d(false);
|
|
1866
|
-
const [animationData, setAnimationData] = d(null);
|
|
1867
1949
|
const isPassport = state.selectedDocumentType === "passport";
|
|
1868
1950
|
const isBack = state.currentMode === "back";
|
|
1869
|
-
|
|
1870
|
-
if (isPassport) import("./passport-tutorial-D9JNsMsM.js").then((module) => {
|
|
1871
|
-
setAnimationData(module.default);
|
|
1872
|
-
});
|
|
1873
|
-
else if (isBack) import("./back-tutorial-cI_4VHmE.js").then((module) => {
|
|
1874
|
-
setAnimationData(module.default);
|
|
1875
|
-
});
|
|
1876
|
-
else import("./id-tutorial-DwO90SAm.js").then((module) => {
|
|
1877
|
-
setAnimationData(module.default);
|
|
1878
|
-
});
|
|
1879
|
-
}, [isPassport, isBack]);
|
|
1951
|
+
const { data: animationData, isOverride } = useAnimationData(isPassport ? "id.tutorial.passport" : isBack ? "id.tutorial.back" : "id.tutorial.front");
|
|
1880
1952
|
const title = isPassport ? t("idv2.capture.passport.title") : isBack ? t("idv2.backTutorial.title") : t("idv2.tutorial.title");
|
|
1881
1953
|
const subtitle = isPassport ? t("idv2.capture.passport.subtitle") : isBack ? t("idv2.backTutorial.subtitle") : t("idv2.tutorial.subtitle");
|
|
1882
1954
|
const disclaimerText = isBack ? t("idv2.backTutorial.disclaimer") : t("idv2.tutorial.v2.autocapture");
|
|
@@ -1886,6 +1958,7 @@ var Tutorial = ({ manager, state }) => {
|
|
|
1886
1958
|
};
|
|
1887
1959
|
return /* @__PURE__ */ u(BaseTutorial, {
|
|
1888
1960
|
animationData,
|
|
1961
|
+
recolor: !isOverride,
|
|
1889
1962
|
title,
|
|
1890
1963
|
subtitle,
|
|
1891
1964
|
onContinue: handleContinue,
|
|
@@ -2994,14 +3067,8 @@ var Chooser = ({ manager, state }) => {
|
|
|
2994
3067
|
//#endregion
|
|
2995
3068
|
//#region src/modules/id/flipAnimation.tsx
|
|
2996
3069
|
var FlipAnimation = ({ manager, direction }) => {
|
|
2997
|
-
const [animationData, setAnimationData] = d(null);
|
|
2998
3070
|
const [waitingForCamera, setWaitingForCamera] = d(false);
|
|
2999
3071
|
const { t } = useTranslation();
|
|
3000
|
-
y(() => {
|
|
3001
|
-
import("./flip-animation-CZYSUtMm.js").then((module) => {
|
|
3002
|
-
setAnimationData(module.default);
|
|
3003
|
-
});
|
|
3004
|
-
}, []);
|
|
3005
3072
|
const handleAnimationComplete = q(async () => {
|
|
3006
3073
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
3007
3074
|
if (direction === "toBack") manager.continueToBack();
|
|
@@ -3012,7 +3079,6 @@ var FlipAnimation = ({ manager, direction }) => {
|
|
|
3012
3079
|
size: "large",
|
|
3013
3080
|
title: `${t("webcam.loading")}...`
|
|
3014
3081
|
});
|
|
3015
|
-
if (!animationData) return null;
|
|
3016
3082
|
return /* @__PURE__ */ u("div", {
|
|
3017
3083
|
class: "IncodeFlipAnimation",
|
|
3018
3084
|
children: [
|
|
@@ -3022,8 +3088,8 @@ var FlipAnimation = ({ manager, direction }) => {
|
|
|
3022
3088
|
children: t(direction === "toBack" ? "idv2.flipAnimation.title" : "idv2.flipAnimation.titleToFront")
|
|
3023
3089
|
}),
|
|
3024
3090
|
/* @__PURE__ */ u(Spacer, { size: 32 }),
|
|
3025
|
-
/* @__PURE__ */ u(
|
|
3026
|
-
|
|
3091
|
+
/* @__PURE__ */ u(AnimatedAsset, {
|
|
3092
|
+
name: "id.flip",
|
|
3027
3093
|
loop: false,
|
|
3028
3094
|
reverse: direction === "toFront",
|
|
3029
3095
|
onComplete: handleAnimationComplete
|
|
@@ -3032,4 +3098,4 @@ var FlipAnimation = ({ manager, direction }) => {
|
|
|
3032
3098
|
});
|
|
3033
3099
|
};
|
|
3034
3100
|
//#endregion
|
|
3035
|
-
export {
|
|
3101
|
+
export { TextArea as _, IdNoAttempts as a, ProgressBar as b, useIdExperiment as c, CaptureFooter as d, CameraOverlayHeader as f, TextAreaComposed as g, VerificationOptionCardList as h, Capture as i, CaptureFrame as l, VerificationOptionCard as m, Chooser as n, IdExpired as o, CameraOverlay as p, Tutorial as r, IdError as s, FlipAnimation as t, ManualCapture as u, SegmentedDateInput as v, Overlay as x, PasswordInputComposed as y };
|