@incodetech/web 2.4.1-agentic.1 → 2.4.1-agentic.10
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/{GeolocationPermissionDenied-ClGp0a23.js → GeolocationPermissionDenied-Dag9fchQ.js} +16 -6
- package/dist/Password-4ht2vsqv.js +212 -0
- package/dist/RadioGroup-Cf6xDIm5.js +123 -0
- package/dist/RequiredLegend-DwaAzhid.js +16 -0
- package/dist/RequiredMarker-CGQR8lsb.js +16 -0
- package/dist/TextField-o3qwE7KD.js +166 -0
- package/dist/ae-signature/ae-signature.es.js +4 -4
- package/dist/{af-ZA-BKpmmWDe.js → af-ZA-CdJRBJEg.js} +58 -42
- package/dist/{ageVerification-CtuJDuRV.js → ageVerification-u2zo-WUl.js} +5 -6
- package/dist/{am-CW_ro5Ws.js → am-Df9uoE6e.js} +58 -42
- package/dist/antifraud/antifraud.es.js +5 -5
- package/dist/{applyStudioConfig-C6-Ak0q6.js → applyStudioConfig-Deh55YNW.js} +4 -5
- package/dist/{ar-AE-D9h8UMbm.js → ar-AE-CAoWsgnA.js} +58 -42
- package/dist/{ar-EG-DQqE9B26.js → ar-EG-CXi0p-DV.js} +58 -42
- package/dist/{ar-B5ToweVl.js → ar-hyEIwsq9.js} +59 -43
- package/dist/authentication/authentication.es.js +7 -7
- package/dist/autoFocusTitle-CNeT8ydU.js +19 -0
- package/dist/{az-DAZq-CQj.js → az-CUehzrK3.js} +58 -42
- package/dist/{back-horizontal-hint-qzSaNkEU.js → back-horizontal-hint-D5xvRtEe.js} +1 -1
- package/dist/{back-vertical-hint-DkYLOege.js → back-vertical-hint-DoKJSQhY.js} +1 -1
- package/dist/base.css +1 -1
- package/dist/{baseTutorial-CF6WiVYt.js → baseTutorial-xDkp34JC.js} +4 -5
- package/dist/{bn-DRTyq2Y9.js → bn-DStUscj0.js} +58 -42
- package/dist/{bottomSheet-DylE2INk.js → bottomSheet-COrgITc6.js} +3 -3
- package/dist/{bs-B8q0B86-.js → bs-Lq1FPKJj.js} +58 -42
- package/dist/{ca-DvsHXRB-.js → ca-K83Ys4Fe.js} +58 -42
- package/dist/cameraOverlay-Bciqav_0.js +2 -0
- package/dist/{cameraOverlayHeader-CuVGnyXI.js → cameraOverlayHeader-C7Pi5eIm.js} +5 -5
- package/dist/{cameraView-D9ZxLKtA.js → cameraView-B7l40Opf.js} +3 -3
- package/dist/{capture-0jMDSGCE.js → capture-D7HVD1ht.js} +25 -33
- package/dist/capture-Do7z-u0d.js +3 -0
- package/dist/{capture-BlGlXoTx.js → capture-I1enj-0M.js} +27 -44
- package/dist/capture-WaSNv1Wn.js +2 -0
- package/dist/captureButtonIcon-DVbAZ8TK.js +1 -0
- package/dist/{captureFocusContext-9789qOe3.js → captureFocusContext-CNtkY3Lk.js} +53 -64
- package/dist/{captureFooter-B6WUFQCV.js → captureFooter-CucCxqz-.js} +5 -5
- package/dist/{ceb-pvlomXHV.js → ceb-NR8sWgTh.js} +58 -42
- package/dist/certificate-issuance/certificate-issuance.es.js +56 -39
- package/dist/certificate-issuance/styles.css +1 -1
- package/dist/certificate-issuance/styles.css.js +1 -1
- package/dist/{checkbox-BwUQ0Rs9.js → checkbox-C5k2pepr.js} +4 -4
- package/dist/chooser-CNm0MKQl.js +1517 -0
- package/dist/{connectionError-DexRpKWs.js → connectionError-Bs3TO2RP.js} +25 -15
- package/dist/consent/consent.es.js +11 -11
- package/dist/{countryFlag-CQMfCnE9.js → countryFlag-CZUyZ06G.js} +1 -1
- package/dist/{countrySelector-C0OEKMqL.js → countrySelector-CPgaMT7n.js} +4 -4
- package/dist/cross-document-data-match/cross-document-data-match.es.js +5 -5
- package/dist/{cs-CZ-GgvnJLMj.js → cs-CZ-KpSXcWZT.js} +58 -42
- package/dist/{cs-DB5PLEdt.js → cs-UYoUjOrG.js} +58 -42
- package/dist/curp-validation/curp-validation.es.js +82 -96
- package/dist/curp-validation/styles.css +1 -1
- package/dist/curp-validation/styles.css.js +1 -1
- package/dist/{customFields-DQgRumW0.js → customFields-BcubL9au.js} +29 -21
- package/dist/{customWatchlist-BbC0fA-6.js → customWatchlist-D4RK0ow6.js} +11 -10
- package/dist/{da-DK-ZhpcfE_F.js → da-DK-Bds8n-Rj.js} +58 -42
- package/dist/dashboardTheme-DQaxmEq3.js +383 -0
- package/dist/dateInputComposed-BrpUtswb.js +1 -0
- package/dist/{dateInputComposed-1IcnucPq.js → dateInputComposed-BzCDzTM3.js} +4 -5
- package/dist/{de-DEBjzaow.js → de-CZlvE1Xz.js} +58 -42
- package/dist/denied-BeVKpBem.js +272 -0
- package/dist/{i18n-Dp014ljG.js → devWarn-B4kGEiva.js} +204 -90
- package/dist/{deviceWallet-CMjguFJO.js → deviceWallet-7b1VpcGm.js} +4 -4
- package/dist/{digitalIdRedirect-MNty16-5.js → digitalIdRedirect-CG9jzrQh.js} +4 -4
- package/dist/{digitalIdUpload-CUzTaoaI.js → digitalIdUpload-BUJcgYY5.js} +7 -9
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +1 -1
- package/dist/document-capture/styles.css.js +1 -1
- package/dist/documentCapture-BdEStEoH.js +2 -0
- package/dist/{documentCapture-BUMyJ8vw.js → documentCapture-JcxukEgT.js} +41 -49
- package/dist/dropdownComposed-C36c9ZOm.js +1 -0
- package/dist/{dropdownComposed-x3ewHxbT.js → dropdownComposed-yNmLuHxU.js} +8 -6
- package/dist/dynamic-forms/dynamic-forms.es.js +57 -35
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/{ekybModule-C5hEBLMs.js → ekybModule-Cp-7fs23.js} +101 -85
- package/dist/ekybModule-ccZRVb7E.js +2 -0
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc-prefill/ekyc-prefill.es.js +2 -0
- package/dist/ekyc-prefill/styles.css +2 -0
- package/dist/ekyc-prefill/styles.css.js +1 -0
- package/dist/ekycModule-CcZTIgGK.js +2 -0
- package/dist/ekycModule-DKUZp3Ww.js +358 -0
- package/dist/ekycPrefillModule-Bou_Ig42.js +2 -0
- package/dist/ekycPrefillModule-DJoeviHP.js +233 -0
- package/dist/{el-Dplr_D5N.js → el-C6tFl9i9.js} +58 -42
- package/dist/{el-GR-IZ4reOR7.js → el-GR-BLkQ_dbO.js} +58 -42
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{electronic-signature-BMda_cf3.js → electronic-signature-D-4uTJdE.js} +18 -14
- package/dist/email/email.es.js +16 -15
- package/dist/{emailInput-BI8gWC0D.js → emailInput-C5VHG66O.js} +23 -12
- package/dist/{en-DG-C6tsWvHi.js → en-DG-BEuiDKtl.js} +58 -42
- package/dist/{en-Db1L_u7B.js → en-DNBypQuu.js} +58 -42
- package/dist/{errorContent-pPAgyy2i.js → errorContent-BC8mDFld.js} +17 -19
- package/dist/{formField-CfQKYeGF.js → errorParams-W7NX72mI.js} +2 -33
- package/dist/{es-419-DxKrJq7W.js → es-419-BCIRYhZK.js} +1 -1
- package/dist/{es-C5unKsaF.js → es-DjQEM4f9.js} +59 -43
- package/dist/{es-ES-sHbsufzT.js → es-ES-Q6nMptUM.js} +58 -42
- package/dist/{es-MX-Cd_DCR0A.js → es-MX-Df5g3bAX.js} +58 -42
- package/dist/{et-BoGq2cx8.js → et-BYRhgB8X.js} +58 -42
- package/dist/{expiredId-DWjw94rT.js → expiredId-BVa13c9u.js} +20 -37
- package/dist/extensibility.es.js +329 -47
- package/dist/{fa-IR-DuUxGXrf.js → fa-IR-DP-FPc-r.js} +58 -42
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +1 -1
- package/dist/face-match/styles.css.js +1 -1
- package/dist/faceMatch-B2n0FPIm.js +2 -0
- package/dist/{faceMatch-DV7NxYu_.js → faceMatch-C5QmR3Vt.js} +40 -54
- package/dist/{fi-FI-DMOBNTjA.js → fi-FI-rnIjEC7X.js} +58 -42
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/fieldComparison-CDGiqzsu.js +126 -0
- package/dist/fieldComparison-D-LmR1LR.js +2 -0
- package/dist/{fieldLabelHint-CjrLxBaj.js → fieldLabelHint-eF42wLDJ.js} +1 -1
- package/dist/{finalSuccessScreen-C50L96j9.js → finalSuccessScreen-vOR061dK.js} +25 -20
- package/dist/fiscal-qr/fiscal-qr.es.js +16 -19
- package/dist/flipAnimation-CGP9Fu9J.js +46 -0
- package/dist/{flipCapturedCardEligibility-DLr9F2g2.js → flipCapturedCardEligibility-C8wQ0_No.js} +4 -4
- package/dist/flow/flow.es.js +45 -36
- package/dist/flow/shell/styles.css +1 -1
- package/dist/flow/shell/styles.css.js +1 -1
- package/dist/flow/styles.css +1 -1
- package/dist/formField-DrSwXufE.js +49 -0
- package/dist/{fr-CA-DZ8jlsp3.js → fr-CA-vPsubqTC.js} +58 -42
- package/dist/{fr-DSR-AP0e.js → fr-P8YbBMxT.js} +58 -42
- package/dist/{front-horizontal-hint-DOphQZg2.js → front-horizontal-hint-CDHj9LQF.js} +1 -1
- package/dist/{front-vertical-hint-S6PcS9_m.js → front-vertical-hint-B_pU27Iv.js} +1 -1
- package/dist/geolocation/geolocation.es.js +10 -10
- package/dist/government-validation/government-validation.es.js +7 -7
- package/dist/{he-N5dfJeyd.js → he-DfptjOXC.js} +58 -42
- package/dist/{hi-JR6K9zbd.js → hi-C7tSzMcB.js} +58 -42
- package/dist/{hmn-j2YA7FxW.js → hmn-jKsUYgaq.js} +58 -42
- package/dist/{homeScreen-C3pPw52y.js → homeScreen-C1b8yg4y.js} +12 -11
- package/dist/{hooks-BFP0WaJM.js → hooks-COiwxC3h.js} +33 -25
- package/dist/{hr-8cOdwB0t.js → hr-ehtrddz3.js} +58 -42
- package/dist/{ht-DDNL4C__.js → ht-CA5NNkri.js} +58 -42
- package/dist/{hu-CynQQUFQ.js → hu-DYgOdNXH.js} +58 -42
- package/dist/{icons-c-hFaG4L.js → icons-CLoob8B-.js} +3 -27
- package/dist/id/id.es.js +104 -39
- package/dist/id/styles.css +1 -1
- package/dist/id/styles.css.js +1 -1
- package/dist/{id-o_Yg0n8W.js → id-CMBxWcTV.js} +58 -42
- package/dist/{id-back-of-card-Bk6ZQUE9.js → id-back-of-card-BEAthtU0.js} +1 -1
- package/dist/{id-back-of-card-vertical-BZo00s50.js → id-back-of-card-vertical-Ce0d7tp5.js} +1 -1
- package/dist/{id-front-of-card-BJ96se7u.js → id-front-of-card-DS0lS9jP.js} +1 -1
- package/dist/{id-front-of-card-vertical-DSfJB0lX.js → id-front-of-card-vertical-BLWn85NX.js} +1 -1
- package/dist/id-selfie-flow/id-selfie-flow.es.js +13 -12
- package/dist/id-selfie-flow/styles.css +1 -1
- package/dist/id-verification/id-verification.es.js +6 -6
- package/dist/{idFlipTransition-DXdtXYza.js → idFlipTransition-3z8Lqcab.js} +22 -26
- package/dist/{idOcr-CjqfkRJ7.js → idOcr-qPEZSG5D.js} +60 -37
- package/dist/identity-reuse/identity-reuse.es.js +21 -19
- package/dist/{incodeComponent-DtKh-UUm.js → incodeComponent-CxWTvgqz.js} +10 -12
- package/dist/{incodeModule-DCHXAeYU.js → incodeModule-BQVPjhJE.js} +5 -5
- package/dist/index.es.js +3 -4
- package/dist/{inputComposed-CmVsaHOa.js → inputComposed-oWeKvdES.js} +4 -4
- package/dist/{it-BXevrtHn.js → it-DNcyH3GL.js} +58 -42
- package/dist/{ja-DiTXnTx-.js → ja-BkVsn7yw.js} +58 -42
- package/dist/{ja-JP-D1IRWR-p.js → ja-JP-BI4iShf-.js} +59 -43
- package/dist/{jv-Us70GzGp.js → jv-Bpp0lYl-.js} +58 -42
- package/dist/{ka-BSsWQ4yU.js → ka-__y8BNrb.js} +58 -42
- package/dist/{kk-D5R6r4H7.js → kk-C8RZv7Y9.js} +58 -42
- package/dist/{km-CCCb2Rnt.js → km-CdNpEVlv.js} +65 -49
- package/dist/{ko-kQioCg2w.js → ko-Db8jh_Pq.js} +58 -42
- package/dist/{ko-KP-JF4khv1Y.js → ko-KP-Cn4RuF_b.js} +58 -42
- package/dist/{ky-CLOemVjC.js → ky-DljlRCIf.js} +58 -42
- package/dist/kyb-checks/kyb-checks.es.js +1 -1
- package/dist/kybChecksModule-B2nSWMuy.js +2 -0
- package/dist/{kybChecksModule-C6Y9Hxpr.js → kybChecksModule-DGXAS1Sc.js} +83 -67
- package/dist/{lo-tzHUt1CQ.js → lo-DXJI47k7.js} +58 -42
- package/dist/{lt-B2ZI-Cgu.js → lt-CUHwdgrq.js} +59 -43
- package/dist/{lv-BJnxtSYw.js → lv-BFrYWmGH.js} +59 -43
- package/dist/{mandatoryConsent-BiQuEZRu.js → mandatoryConsent-Dc0PQou0.js} +11 -11
- package/dist/{manualCaptureButton-BRSmPTeR.js → manualCaptureButton-DIlebb4i.js} +4 -4
- package/dist/{manualCaptureButton-Dw0MMSkc.js → manualCaptureButton-t0b_hCKH.js} +12 -13
- package/dist/{mk-Cj7Iw2Q4.js → mk-BRpnPevj.js} +58 -42
- package/dist/{mn-CA_rNxtz.js → mn-tly7Lz7o.js} +58 -42
- package/dist/{ms-BydA1Zjz.js → ms-DFpRACK3.js} +58 -42
- package/dist/{my-gFKufKaG.js → my-G2jJl4tA.js} +58 -42
- package/dist/{nb-NO-CDsGQbOZ.js → nb-NO-CaDPgzxb.js} +58 -42
- package/dist/{ne-Cyfi0vFI.js → ne-BaCq8Imv.js} +58 -42
- package/dist/{nl-e1gbmAFO.js → nl-BK-jT4yQ.js} +58 -42
- package/dist/{optionAccessibleLabel-BTUieMxH.js → optionAccessibleLabel-CDKKh7c3.js} +25 -10
- package/dist/{otpInput-D3L3QhnR.js → otpInput-B4mH5be-.js} +96 -15
- package/dist/{page-U6jZ7BBI.js → page-5CklyQnq.js} +32 -36
- package/dist/{pageUiConfig-Qf6ItVv9.js → pageUiConfig-DZQHreIo.js} +67 -17
- package/dist/{passport-horizontal-hint-Ddsh6fUS.js → passport-horizontal-hint-JdWoLKa5.js} +1 -1
- package/dist/{passport-vertical-hint-Dukxq6-T.js → passport-vertical-hint-BgtJXbvC.js} +1 -1
- package/dist/passwordRequirements-bbbHZACR.js +49 -0
- package/dist/{pdf-Bd5QplFS.js → pdf-CLcY9ugT.js} +2 -2
- package/dist/pdfViewer-2NTW2bZn.js +2 -0
- package/dist/{pdfViewer-BrqSEtbr.js → pdfViewer-D4xu2J13.js} +4 -4
- package/dist/permissionInstructionList-Dmy2y4cX.js +43 -0
- package/dist/{permissions-KUDhffd9.js → permissions-BPh2QNoI.js} +61 -43
- package/dist/phone/phone.es.js +11 -11
- package/dist/{phoneInputComposed-DlJMTavK.js → phoneInputComposed-Dzt9xdrF.js} +6 -6
- package/dist/{pl-BSMcCWS-.js → pl-CoWZGdbr.js} +58 -42
- package/dist/{preloadableLazy-C8_OYaTC.js → preloadableLazy-2hqV2Q8z.js} +11 -5
- package/dist/{processing-B5EH7yNg.js → processing-DStiN9XK.js} +2 -2
- package/dist/{progressBar-CSpS29pV.js → progressBar-CJqJXzAh.js} +2 -2
- package/dist/{pt-BNFC2quK.js → pt-BDByRgpr.js} +58 -42
- package/dist/{pt-BR-bH8DC2gH.js → pt-BR-BRMyrqIN.js} +58 -42
- package/dist/{pt-PT-B8PXmgwU.js → pt-PT-CfwlYo6V.js} +58 -42
- package/dist/qe-signature/qe-signature.es.js +4 -4
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +29 -26
- package/dist/{registerIncodeElement-oiLvm6xq.js → registerIncodeElement-B5W7SqS3.js} +1 -1
- package/dist/{resendTimer-D1H3gwkI.js → resendTimer-COMRdeDC.js} +2 -2
- package/dist/{richText-sUdTiRDE.js → richText-BMvr5dhl.js} +4 -4
- package/dist/{ro-DnN8QNYa.js → ro-ju058j4P.js} +58 -42
- package/dist/{ru-DAwUFXHq.js → ru-DYwhf4Hw.js} +58 -42
- package/dist/{ru-RU-Coxt0VCU.js → ru-RU-BAvJW-vp.js} +58 -42
- package/dist/{sanitizeSvg-OdNh1mqY.js → sanitizeSvg-BZoCoRr0.js} +1 -1
- package/dist/selfie/selfie.es.js +11 -11
- package/dist/signature/signature.es.js +10 -10
- package/dist/{sk-AB8sSlNw.js → sk-Cl6F-Kaz.js} +61 -45
- package/dist/{sl-6Dfzfi7s.js → sl-BxsNneWx.js} +58 -42
- package/dist/{smsTabContent-CBEKgzFv.js → smsTabContent-BLJM1Hbk.js} +15 -11
- package/dist/{so-X5BdrDvV.js → so-D8izvKPD.js} +58 -42
- package/dist/spacer-NanHQwzu.js +1100 -0
- package/dist/spinner-bRH4yw9e.js +69 -0
- package/dist/{sr-JHjMcbGs.js → sr-BtsYxFKz.js} +58 -42
- package/dist/{sr-Latn-DgT7eTG2.js → sr-Latn-BTn5o62j.js} +64 -48
- package/dist/{sr-YU-BBhB_G63.js → sr-YU-BNViLYA5.js} +1 -1
- package/dist/step-up/step-up.es.js +483 -0
- package/dist/step-up/styles.css +2 -0
- package/dist/{sv-SE-CvX8mC8T.js → sv-SE-f5R8i8ue.js} +58 -42
- package/dist/{sw-CN0TdnY4.js → sw-BgHNoEGs.js} +58 -42
- package/dist/{th-TH-CWr4z3JK.js → th-TH-DmfU-a6A.js} +58 -42
- package/dist/{th-BmFntKib.js → th-aFkhFNxp.js} +58 -42
- package/dist/themes/dark.css +1 -1
- package/dist/themes/light.css +1 -1
- package/dist/{tl-rzkk5P_n.js → tl-CA42NVfv.js} +58 -42
- package/dist/{tl-PH-BRIbtBRN.js → tl-PH-DMCUe7pP.js} +58 -42
- package/dist/{tr-DKuVBwqW.js → tr-BVjID0jl.js} +58 -42
- package/dist/{transitionSpinner-Di0XBAix.js → transitionSpinner-MclJtdHE.js} +5 -6
- package/dist/{tutorial-C9psDR2i.js → tutorial-fC2iei2v.js} +4 -4
- package/dist/types/ae-signature.d.ts +7 -3
- package/dist/types/antifraud.d.ts +7 -3
- package/dist/types/authentication.d.ts +7 -3
- package/dist/types/certificate-issuance.d.ts +7 -3
- package/dist/types/consent.d.ts +7 -3
- package/dist/types/cross-document-data-match.d.ts +7 -3
- package/dist/types/curp-validation.d.ts +7 -3
- package/dist/types/document-capture.d.ts +7 -3
- package/dist/types/dynamic-forms.d.ts +7 -3
- package/dist/types/ekyb.d.ts +7 -3
- package/dist/types/ekyc-prefill.d.ts +213 -0
- package/dist/types/ekyc.d.ts +7 -3
- package/dist/types/electronic-signature.d.ts +7 -3
- package/dist/types/email.d.ts +7 -3
- package/dist/types/extensibility.d.ts +57 -16
- package/dist/types/face-match.d.ts +7 -3
- package/dist/types/field-comparison.d.ts +7 -3
- package/dist/types/fiscal-qr.d.ts +7 -3
- package/dist/types/flow.d.ts +16 -3
- package/dist/types/geolocation.d.ts +7 -3
- package/dist/types/government-validation.d.ts +7 -3
- package/dist/types/id-selfie-flow.d.ts +7 -3
- package/dist/types/id-verification.d.ts +7 -3
- package/dist/types/id.d.ts +7 -3
- package/dist/types/identity-reuse.d.ts +7 -3
- package/dist/types/kyb-checks.d.ts +7 -3
- package/dist/types/phone.d.ts +7 -3
- package/dist/types/qe-signature.d.ts +7 -3
- package/dist/types/selfie.d.ts +7 -3
- package/dist/types/signature.d.ts +7 -3
- package/dist/types/step-up.d.ts +85 -0
- package/dist/types/watchlist.d.ts +7 -3
- package/dist/types/workflow.d.ts +7 -3
- package/dist/{typography-CiGhKJGx.js → typography-Dncyo-3D.js} +3 -11
- package/dist/{uk-CXjqq4lX.js → uk-HjZTXCOA.js} +58 -42
- package/dist/{uk-UA-BIE9WByU.js → uk-UA-ChpoWDcU.js} +59 -43
- package/dist/{ur-vNGesC3r.js → ur-CZkQHBM4.js} +58 -42
- package/dist/{useCameraPreview-Bd7AYE9h.js → useCameraPreview-DrteOjaq.js} +1 -1
- package/dist/{useCaptureHelpButton-Dj-jESrS.js → useCaptureHelpButton-B5zEGcaB.js} +3 -3
- package/dist/{useIsDarkTheme-Bu9CvKxW.js → useIsDarkTheme-DAs5RhsW.js} +1 -1
- package/dist/{useModuleLoader-BBCNkJmc.js → useModuleLoader-C2fbLotc.js} +7 -2
- package/dist/{uz-Gmw1XRgv.js → uz-BCp_m_Om.js} +58 -42
- package/dist/{vendor-preact-DHGqBGMH.js → vendor-preact-HIccnts1.js} +1 -1
- package/dist/{verificationResult-Clxdxm_s.js → verificationResult-sh4xut0K.js} +19 -24
- package/dist/{vi-DTxxRUw0.js → vi-BvxcvDgc.js} +58 -42
- package/dist/video-selfie/styles.css +1 -1
- package/dist/video-selfie/styles.css.js +1 -1
- package/dist/video-selfie/video-selfie.es.js +30 -25
- package/dist/watchlist/watchlist.es.js +12 -10
- package/dist/{watchlistForBusiness-CpFp2EYX.js → watchlistForBusiness-DnS1r-Ml.js} +34 -23
- package/dist/{withEndScreenTexts-Bd3mof3s.js → withEndScreenTexts-CHWofhk5.js} +28 -25
- package/dist/workflow/styles.css +1 -1
- package/dist/workflow/workflow.es.js +1 -534
- package/dist/workflow-DBS9eyu4.js +533 -0
- package/dist/{zh-CN-aB48G_R1.js → zh-CN-DZRia1ir.js} +58 -42
- package/dist/{zh-DjtyfO4e.js → zh-DN_kUZaR.js} +58 -42
- package/dist/{zh-HANT-8p8SH8C3.js → zh-HANT-DisU_Tal.js} +58 -42
- package/dist/{zh-TW-CCsz9gKq.js → zh-TW-BJzCsdPP.js} +58 -42
- package/package.json +27 -7
- package/dist/asset-Ctwd_20H.js +0 -355
- package/dist/autoFocusTitle-CzaCWWW5.js +0 -32
- package/dist/cameraOverlay-DNf0PEF4.js +0 -2
- package/dist/capture-DKBA5j5A.js +0 -3
- package/dist/capture-D_Dwrj1F.js +0 -2
- package/dist/captureButtonIcon-A9kn2E_m.js +0 -1
- package/dist/check-icon-BdHltEK6.js +0 -48
- package/dist/chooser-CmG71-lh.js +0 -1589
- package/dist/dashboardTheme-DtXsx9IK.js +0 -246
- package/dist/dateInputComposed-BFlCk-sg.js +0 -1
- package/dist/denied-CwdVWAUw.js +0 -1874
- package/dist/devWarn-CW20j1Qd.js +0 -9
- package/dist/documentCapture-rECLkwpi.js +0 -2
- package/dist/dropdownComposed-C9sLQE6i.js +0 -1
- package/dist/ekybModule-B5IEiSyi.js +0 -2
- package/dist/ekycModule-B7OFnP3H.js +0 -2
- package/dist/ekycModule-TVKk0qdS.js +0 -327
- package/dist/faceMatch-B2aMz3X2.js +0 -2
- package/dist/fieldComparison-BY2XXsp3.js +0 -2
- package/dist/fieldComparison-CFLU1h6n.js +0 -113
- package/dist/flipAnimation-8x-qdtF_.js +0 -33
- package/dist/inputComposed-DvGrso7g.js +0 -1
- package/dist/kybChecksModule-r3MIpFhS.js +0 -2
- package/dist/numberedStep-CeN77hnQ.js +0 -13
- package/dist/passwordInputComposed-CW_1DcB8.js +0 -74
- package/dist/pdfViewer-rDnnHzmw.js +0 -2
- package/dist/radioGroupComposed-CW8ElYSR.js +0 -160
- package/dist/radioGroupComposed-flIYNffL.js +0 -1
- package/dist/reload-icon-FD2e9Wet.js +0 -70
- package/dist/spacer-Jaru_3sb.js +0 -82
- package/dist/spinner-51btbot0.js +0 -407
- package/dist/uiConfig-BJAuZQWc.js +0 -77
- /package/dist/{aligndevicelottie-BEKzL4SB.js → aligndevicelottie-DroBRtbt.js} +0 -0
- /package/dist/{assertClassBrand-DJr5K93j.js → assertClassBrand-CuHX5JcR.js} +0 -0
- /package/dist/{back-tutorial-B9W63fa-.js → back-tutorial-ydxRtY-Y.js} +0 -0
- /package/dist/{backdevicelottie-DsN8QBV3.js → backdevicelottie-hv8vbwYH.js} +0 -0
- /package/dist/{blurdevicelottie-DkV7Kwo4.js → blurdevicelottie-Cgu4hKn7.js} +0 -0
- /package/dist/{countryDefinitions-RBVGM1D_.js → countryDefinitions-DlsV3Tf8.js} +0 -0
- /package/dist/{defineProperty-E9wRIIo9.js → defineProperty-CRYuXE79.js} +0 -0
- /package/dist/{flip-animation-DJVnWWL5.js → flip-animation-CJhh7l_J.js} +0 -0
- /package/dist/{frontdevicelottie-DiW1Wmya.js → frontdevicelottie-vyO3BJJe.js} +0 -0
- /package/dist/{glaredevicelottie-CK-fnX_s.js → glaredevicelottie-DrgkRjFh.js} +0 -0
- /package/dist/{helpButtonConfig-CjbrBQaV.js → helpButtonConfig-BFragC_J.js} +0 -0
- /package/dist/{id-laser-h-6Am_cjM8.js → id-laser-h-CUz29uFc.js} +0 -0
- /package/dist/{id-laser-v-DXoF3flH.js → id-laser-v-Bnf10QJp.js} +0 -0
- /package/dist/{id-tutorial-DkKH3eTE.js → id-tutorial-DGwvKAMs.js} +0 -0
- /package/dist/{lottie_light-B819EhaL.js → lottie_light-BXXuEKyZ.js} +0 -0
- /package/dist/{passport-tutorial-D3Fpk-Tj.js → passport-tutorial-DoqqyBXo.js} +0 -0
- /package/dist/{pdf.worker.min-DzBNMoKS.js → pdf.worker.min-Cm2oniEB.js} +0 -0
- /package/dist/{policyUrls-Benduf-R.js → policyUrls-Hvb4jPfF.js} +0 -0
- /package/dist/{purify.es-CSPoFViI.js → purify.es-DIIgrZ-E.js} +0 -0
- /package/dist/{realtimeFeedbackConfig-tBX94SOm.js → realtimeFeedbackConfig-DeZksjlR.js} +0 -0
- /package/dist/{selfieTutorial-DnsRD1Z9.js → selfieTutorial-BTewRjM5.js} +0 -0
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
import { c as I18N_LOCAL, h as createI18n, m as setI18nInstance, p as hasI18nInstance, s as useTranslationWithFallback } from "../devWarn-B4kGEiva.js";
|
|
2
|
+
import { b as u, d as T, f as _, l as A, m as d, x as G, y } from "../vendor-preact-HIccnts1.js";
|
|
3
|
+
import { a as getStandaloneSetupPolicy } from "../dashboardTheme-DQaxmEq3.js";
|
|
4
|
+
import { b as PrizmaButton } from "../icons-CLoob8B-.js";
|
|
5
|
+
import { h as cn } from "../spacer-NanHQwzu.js";
|
|
6
|
+
import { t as Page } from "../page-5CklyQnq.js";
|
|
7
|
+
import { a as TerminalErrorPage, b as useManager, t as preloadOptionalDashboardTheme } from "../hooks-COiwxC3h.js";
|
|
8
|
+
import { t as TransitionSpinner } from "../transitionSpinner-MclJtdHE.js";
|
|
9
|
+
import { t as IncodeComponent } from "../incodeComponent-CxWTvgqz.js";
|
|
10
|
+
import { t as Checkbox } from "../checkbox-C5k2pepr.js";
|
|
11
|
+
import "../withEndScreenTexts-CHWofhk5.js";
|
|
12
|
+
import { t as IncodeWorkflow } from "../workflow-DBS9eyu4.js";
|
|
13
|
+
import { StepUpError, StepUpError as StepUpError$1, createStepUpInitMessage, createStepUpManager, readHostedPageMessage, validateStepUpOptions } from "@incodetech/core/step-up";
|
|
14
|
+
//#region src/modules/step-up/stepUpHostedFrame.tsx
|
|
15
|
+
/**
|
|
16
|
+
* Adds `permissionsUi` to the URL fragment, next to what is already there
|
|
17
|
+
* (session token, stepUpId, returnOrigin). The fragment never reaches a
|
|
18
|
+
* server. Works on the raw text: re-serializing through `URLSearchParams`
|
|
19
|
+
* would re-encode the token (`+`, `/`, `=`). An existing `permissionsUi`
|
|
20
|
+
* entry is replaced; every other entry is kept byte for byte.
|
|
21
|
+
*/
|
|
22
|
+
function withPermissionsUi(url, permissionsUi) {
|
|
23
|
+
const hashAt = url.indexOf("#");
|
|
24
|
+
const base = hashAt === -1 ? url : url.slice(0, hashAt);
|
|
25
|
+
const kept = (hashAt === -1 ? "" : url.slice(hashAt + 1)).split("&").filter((entry) => entry !== "" && !entry.startsWith("permissionsUi="));
|
|
26
|
+
kept.push(`permissionsUi=${encodeURIComponent(permissionsUi)}`);
|
|
27
|
+
return `${base}#${kept.join("&")}`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Shows the hosted step-up page in an iframe (contract v0.2 §6.6). On its
|
|
31
|
+
* `ready`, posts it `init` (permissions + this page's origin) with target
|
|
32
|
+
* origin exactly `origin`, never `'*'`. Only messages from this iframe's own
|
|
33
|
+
* window are read; a tagged one from any origin but exactly `origin` is a
|
|
34
|
+
* mismatch.
|
|
35
|
+
*
|
|
36
|
+
* The listener is registered in a layout effect, in the same task that sets
|
|
37
|
+
* the iframe `src`, so a page that loads fast and sends a single `ready`
|
|
38
|
+
* cannot post before anyone listens. If no `ready` arrives within
|
|
39
|
+
* `readyTimeoutMs`, it fails with `VERIFICATION_ERROR` (`READY_TIMEOUT`).
|
|
40
|
+
*/
|
|
41
|
+
var StepUpHostedFrame = ({ url, origin, stepUpId, permissions, permissionsUi, readyTimeoutMs, onFinished, onDenied, onFailed, onOriginMismatch }) => {
|
|
42
|
+
const { t } = useTranslationWithFallback();
|
|
43
|
+
const frameRef = A(null);
|
|
44
|
+
const src = T(() => withPermissionsUi(url, permissionsUi), [url, permissionsUi]);
|
|
45
|
+
const latest = A({
|
|
46
|
+
permissions,
|
|
47
|
+
onFinished,
|
|
48
|
+
onDenied,
|
|
49
|
+
onFailed,
|
|
50
|
+
onOriginMismatch
|
|
51
|
+
});
|
|
52
|
+
latest.current = {
|
|
53
|
+
permissions,
|
|
54
|
+
onFinished,
|
|
55
|
+
onDenied,
|
|
56
|
+
onFailed,
|
|
57
|
+
onOriginMismatch
|
|
58
|
+
};
|
|
59
|
+
_(() => {
|
|
60
|
+
let readyTimer = setTimeout(() => {
|
|
61
|
+
readyTimer = void 0;
|
|
62
|
+
const message = `The hosted step-up page sent no ready within ${readyTimeoutMs} ms`;
|
|
63
|
+
latest.current.onFailed("VERIFICATION_ERROR", message, {
|
|
64
|
+
code: "READY_TIMEOUT",
|
|
65
|
+
message
|
|
66
|
+
});
|
|
67
|
+
}, readyTimeoutMs);
|
|
68
|
+
const clearReadyTimer = () => {
|
|
69
|
+
if (readyTimer === void 0) return;
|
|
70
|
+
clearTimeout(readyTimer);
|
|
71
|
+
readyTimer = void 0;
|
|
72
|
+
};
|
|
73
|
+
const handleMessage = (event) => {
|
|
74
|
+
const frameWindow = frameRef.current?.contentWindow;
|
|
75
|
+
if (!frameWindow || event.source !== frameWindow) return;
|
|
76
|
+
const message = readHostedPageMessage({
|
|
77
|
+
origin: event.origin,
|
|
78
|
+
data: event.data
|
|
79
|
+
}, origin, stepUpId);
|
|
80
|
+
const current = latest.current;
|
|
81
|
+
if (message.kind !== "ignored") clearReadyTimer();
|
|
82
|
+
switch (message.kind) {
|
|
83
|
+
case "ready":
|
|
84
|
+
clearReadyTimer();
|
|
85
|
+
frameWindow.postMessage(createStepUpInitMessage(current.permissions, window.location.origin), origin);
|
|
86
|
+
return;
|
|
87
|
+
case "finished":
|
|
88
|
+
current.onFinished(message.approvedScopes);
|
|
89
|
+
return;
|
|
90
|
+
case "error": {
|
|
91
|
+
if (message.code === "USER_DENIED") {
|
|
92
|
+
current.onDenied();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const detail = {
|
|
96
|
+
code: message.code,
|
|
97
|
+
...message.message ? { message: message.message } : {}
|
|
98
|
+
};
|
|
99
|
+
if (message.code === "FACE_CHECK_FAILED") current.onFailed("FACE_CHECK_FAILED", message.message ?? "The hosted page reported a failed face check", detail);
|
|
100
|
+
else if (message.code === "VERIFICATION_PENDING") current.onFailed("VERIFICATION_PENDING", message.message ?? "The verification has no result yet", detail);
|
|
101
|
+
else current.onFailed("VERIFICATION_ERROR", message.message ?? `The hosted page reported ${message.code}`, detail);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
case "originMismatch":
|
|
105
|
+
current.onOriginMismatch(event.origin);
|
|
106
|
+
return;
|
|
107
|
+
default: return;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
window.addEventListener("message", handleMessage);
|
|
111
|
+
return () => {
|
|
112
|
+
clearReadyTimer();
|
|
113
|
+
window.removeEventListener("message", handleMessage);
|
|
114
|
+
};
|
|
115
|
+
}, [
|
|
116
|
+
origin,
|
|
117
|
+
stepUpId,
|
|
118
|
+
readyTimeoutMs
|
|
119
|
+
]);
|
|
120
|
+
return /* @__PURE__ */ u("div", {
|
|
121
|
+
class: "IncodeStepUpFrameContainer",
|
|
122
|
+
children: /* @__PURE__ */ u("iframe", {
|
|
123
|
+
ref: frameRef,
|
|
124
|
+
class: "IncodeStepUpFrame",
|
|
125
|
+
src,
|
|
126
|
+
title: t("stepUp.hostedFrame.title"),
|
|
127
|
+
allow: "camera; microphone; geolocation; fullscreen",
|
|
128
|
+
"data-testid": "step-up-frame"
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/modules/step-up/stepUpPermissionsScreen.tsx
|
|
134
|
+
var DURATION_KEYS = {
|
|
135
|
+
days: "stepUp.duration.days",
|
|
136
|
+
hours: "stepUp.duration.hours",
|
|
137
|
+
minutes: "stepUp.duration.minutes",
|
|
138
|
+
seconds: "stepUp.duration.seconds"
|
|
139
|
+
};
|
|
140
|
+
var SCOPES_HEADING_ID = "incode-step-up-scopes-heading";
|
|
141
|
+
var SCOPE_HINT_ID = "incode-step-up-scope-hint";
|
|
142
|
+
/**
|
|
143
|
+
* The permissions screen: purpose, scope checkboxes (the scopes Incode marked
|
|
144
|
+
* autoSelect start checked; Approve stays disabled while none is), duration
|
|
145
|
+
* when there is one, Approve / Deny. Renders manager state only; the rules
|
|
146
|
+
* live in the core step-up machine.
|
|
147
|
+
*/
|
|
148
|
+
var StepUpPermissionsScreen = ({ state, manager }) => {
|
|
149
|
+
const { t, i18n } = useTranslationWithFallback();
|
|
150
|
+
const tx = (key, values) => t(key, {
|
|
151
|
+
defaultValue: I18N_LOCAL[key],
|
|
152
|
+
...values
|
|
153
|
+
});
|
|
154
|
+
const plural = (key, count) => t(key, {
|
|
155
|
+
count,
|
|
156
|
+
defaultValue: I18N_LOCAL[`${key}_other`],
|
|
157
|
+
defaultValue_one: I18N_LOCAL[`${key}_one`],
|
|
158
|
+
defaultValue_other: I18N_LOCAL[`${key}_other`]
|
|
159
|
+
});
|
|
160
|
+
const formatNumber = (value) => {
|
|
161
|
+
try {
|
|
162
|
+
return new Intl.NumberFormat(i18n.language).format(value);
|
|
163
|
+
} catch {
|
|
164
|
+
return String(value);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const describeLimit = (limit) => {
|
|
168
|
+
let usage;
|
|
169
|
+
if (limit.usageLimit !== void 0) usage = limit.usageLimitLabel ? tx("stepUp.permissions.usageWithLabel", {
|
|
170
|
+
uses: formatNumber(limit.usageLimit),
|
|
171
|
+
label: limit.usageLimitLabel
|
|
172
|
+
}) : plural("stepUp.permissions.usageTimes", limit.usageLimit);
|
|
173
|
+
if (limit.budgetLimit === void 0) return usage ? tx("stepUp.permissions.limitUsage", { usage }) : void 0;
|
|
174
|
+
const amount = formatNumber(limit.budgetLimit);
|
|
175
|
+
return usage ? tx("stepUp.permissions.limitBudgetAndUsage", {
|
|
176
|
+
amount,
|
|
177
|
+
usage
|
|
178
|
+
}) : tx("stepUp.permissions.limitBudget", { amount });
|
|
179
|
+
};
|
|
180
|
+
const duration = plural(DURATION_KEYS[state.duration.unit], state.duration.count);
|
|
181
|
+
const [changed, setChanged] = d(false);
|
|
182
|
+
return /* @__PURE__ */ u(Page, {
|
|
183
|
+
className: "IncodeStepUpPermissions IncodeScrollablePage",
|
|
184
|
+
title: t("stepUp.permissions.title"),
|
|
185
|
+
subtitle: state.purpose ?? t("stepUp.permissions.subtitle"),
|
|
186
|
+
"data-testid": "step-up-permissions",
|
|
187
|
+
children: /* @__PURE__ */ u("div", {
|
|
188
|
+
class: "IncodeStepUpPermissionsContent",
|
|
189
|
+
children: [/* @__PURE__ */ u("div", {
|
|
190
|
+
class: "IncodeStepUpPermissionsBody",
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ u("div", {
|
|
193
|
+
class: "IncodeStepUpScopeList",
|
|
194
|
+
role: "group",
|
|
195
|
+
"aria-labelledby": SCOPES_HEADING_ID,
|
|
196
|
+
"aria-describedby": state.canApprove ? void 0 : SCOPE_HINT_ID,
|
|
197
|
+
children: [/* @__PURE__ */ u("p", {
|
|
198
|
+
id: SCOPES_HEADING_ID,
|
|
199
|
+
class: "IncodeStepUpScopesHeading",
|
|
200
|
+
children: t("stepUp.permissions.scopesLabel")
|
|
201
|
+
}), state.scopes.map((scope) => {
|
|
202
|
+
const id = `incode-step-up-scope-${scope.name}`;
|
|
203
|
+
const limitText = scope.limit ? describeLimit(scope.limit) : void 0;
|
|
204
|
+
const describedBy = [scope.description ? `${id}-description` : void 0, limitText ? `${id}-limit` : void 0].filter(Boolean).join(" ") || void 0;
|
|
205
|
+
return /* @__PURE__ */ u(Checkbox, {
|
|
206
|
+
id,
|
|
207
|
+
class: "IncodeStepUpScope",
|
|
208
|
+
size: "s",
|
|
209
|
+
name: "scopes",
|
|
210
|
+
value: scope.name,
|
|
211
|
+
checked: scope.checked,
|
|
212
|
+
onChange: () => {
|
|
213
|
+
setChanged(true);
|
|
214
|
+
manager.toggleScope(scope.name);
|
|
215
|
+
},
|
|
216
|
+
"aria-labelledby": `${id}-name`,
|
|
217
|
+
"aria-describedby": describedBy,
|
|
218
|
+
label: /* @__PURE__ */ u("span", {
|
|
219
|
+
class: "IncodeStepUpScopeLabel",
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ u("span", {
|
|
222
|
+
id: `${id}-name`,
|
|
223
|
+
class: "IncodeStepUpScopeName",
|
|
224
|
+
children: scope.displayName
|
|
225
|
+
}),
|
|
226
|
+
scope.description ? /* @__PURE__ */ u("span", {
|
|
227
|
+
id: `${id}-description`,
|
|
228
|
+
class: "IncodeStepUpScopeDetail",
|
|
229
|
+
children: scope.description
|
|
230
|
+
}) : null,
|
|
231
|
+
limitText ? /* @__PURE__ */ u("span", {
|
|
232
|
+
id: `${id}-limit`,
|
|
233
|
+
class: "IncodeStepUpScopeDetail",
|
|
234
|
+
"data-testid": `step-up-limit-${scope.name}`,
|
|
235
|
+
children: limitText
|
|
236
|
+
}) : null
|
|
237
|
+
]
|
|
238
|
+
}),
|
|
239
|
+
"data-testid": `step-up-scope-${scope.name}`
|
|
240
|
+
}, scope.name);
|
|
241
|
+
})]
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ u("p", {
|
|
244
|
+
class: "IncodeStepUpDuration",
|
|
245
|
+
"data-testid": "step-up-duration",
|
|
246
|
+
children: tx("stepUp.permissions.duration", { duration })
|
|
247
|
+
}),
|
|
248
|
+
state.canApprove ? null : /* @__PURE__ */ u("p", {
|
|
249
|
+
id: SCOPE_HINT_ID,
|
|
250
|
+
class: cn("IncodeStepUpScopeHint", changed && "IncodeStepUpScopeHintError"),
|
|
251
|
+
role: changed ? "alert" : void 0,
|
|
252
|
+
"data-testid": "step-up-scope-hint",
|
|
253
|
+
children: t("stepUp.permissions.scopeRequired")
|
|
254
|
+
})
|
|
255
|
+
]
|
|
256
|
+
}), /* @__PURE__ */ u("div", {
|
|
257
|
+
class: "IncodeStepUpActions",
|
|
258
|
+
children: [/* @__PURE__ */ u(PrizmaButton, {
|
|
259
|
+
variant: "primary",
|
|
260
|
+
size: "L",
|
|
261
|
+
className: cn("IncodeButton IncodeButtonPrimary IncodeButtonL IncodeStepUpApprove", state.saving && "IncodeButtonLoading"),
|
|
262
|
+
"data-testid": "step-up-approve",
|
|
263
|
+
disabled: !state.canApprove || state.saving,
|
|
264
|
+
loading: state.saving,
|
|
265
|
+
onClick: () => manager.approve(),
|
|
266
|
+
children: t("stepUp.permissions.approve")
|
|
267
|
+
}), /* @__PURE__ */ u(PrizmaButton, {
|
|
268
|
+
variant: "secondary",
|
|
269
|
+
size: "L",
|
|
270
|
+
className: "IncodeButton IncodeButtonSecondary IncodeButtonL IncodeStepUpDeny",
|
|
271
|
+
"data-testid": "step-up-deny",
|
|
272
|
+
disabled: state.saving,
|
|
273
|
+
onClick: () => manager.deny(),
|
|
274
|
+
children: t("stepUp.permissions.deny")
|
|
275
|
+
})]
|
|
276
|
+
})]
|
|
277
|
+
})
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region src/modules/step-up/step-up.tsx
|
|
282
|
+
var THEME_WAIT_MS = 2e3;
|
|
283
|
+
/**
|
|
284
|
+
* A permissions screen shown before the face check comes before the workflow
|
|
285
|
+
* that would load the tenant theme, so load it here with the step-up's own
|
|
286
|
+
* session token: embedded mode always has one, while the host's
|
|
287
|
+
* `setup({ token })` may have none. `setup({ theme: false })` still skips it.
|
|
288
|
+
*/
|
|
289
|
+
function useThemeBeforePermissions(options) {
|
|
290
|
+
const needsTheme = options.mode === "embedded" && options.permissionsUi === "sdk" && options.permissionsOrder === "beforeFaceCheck" && !options.disableDashboardTheme && Boolean(options.sessionToken) && getStandaloneSetupPolicy().theme.enabled;
|
|
291
|
+
const [ready, setReady] = d(() => !needsTheme);
|
|
292
|
+
y(() => {
|
|
293
|
+
if (ready) return;
|
|
294
|
+
let active = true;
|
|
295
|
+
const show = () => {
|
|
296
|
+
if (active) setReady(true);
|
|
297
|
+
};
|
|
298
|
+
const timer = setTimeout(show, THEME_WAIT_MS);
|
|
299
|
+
preloadOptionalDashboardTheme({
|
|
300
|
+
...getStandaloneSetupPolicy(),
|
|
301
|
+
token: options.sessionToken
|
|
302
|
+
}, void 0).then(show);
|
|
303
|
+
return () => {
|
|
304
|
+
active = false;
|
|
305
|
+
clearTimeout(timer);
|
|
306
|
+
};
|
|
307
|
+
}, [ready, options.sessionToken]);
|
|
308
|
+
return ready;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Step-up component: the workflow in token mode (or the hosted page in an
|
|
312
|
+
* iframe), then the permissions screen, then `onFinish`. Mounted by
|
|
313
|
+
* {@link renderStepUp}.
|
|
314
|
+
*/
|
|
315
|
+
var IncodeStepUp = ({ options }) => {
|
|
316
|
+
const [state, manager] = useManager(() => createStepUpManager({
|
|
317
|
+
stepUpId: options.stepUpId,
|
|
318
|
+
permissions: options.permissions,
|
|
319
|
+
permissionsUi: options.permissionsUi,
|
|
320
|
+
permissionsOrder: options.permissionsOrder,
|
|
321
|
+
hostSavesPermissions: options.onPermissionsApproved !== void 0
|
|
322
|
+
}), { autoLoad: false });
|
|
323
|
+
const themeReady = useThemeBeforePermissions(options);
|
|
324
|
+
const mountedRef = A(true);
|
|
325
|
+
y(() => () => {
|
|
326
|
+
mountedRef.current = false;
|
|
327
|
+
}, []);
|
|
328
|
+
const saving = state.status === "permissions" && state.saving;
|
|
329
|
+
const saveStartedRef = A(false);
|
|
330
|
+
y(() => {
|
|
331
|
+
if (!saving || saveStartedRef.current || state.status !== "permissions") return;
|
|
332
|
+
saveStartedRef.current = true;
|
|
333
|
+
const approvedScopes = state.scopes.filter((scope) => scope.checked).map((scope) => scope.name);
|
|
334
|
+
Promise.resolve().then(() => options.onPermissionsApproved?.({
|
|
335
|
+
stepUpId: options.stepUpId,
|
|
336
|
+
approvedScopes
|
|
337
|
+
})).then(() => {
|
|
338
|
+
if (mountedRef.current) manager.permissionsSaved();
|
|
339
|
+
}, (error) => {
|
|
340
|
+
if (!mountedRef.current) return;
|
|
341
|
+
manager.permissionsSaveFailed(error instanceof Error ? error.message : String(error));
|
|
342
|
+
});
|
|
343
|
+
}, [
|
|
344
|
+
saving,
|
|
345
|
+
state,
|
|
346
|
+
options,
|
|
347
|
+
manager
|
|
348
|
+
]);
|
|
349
|
+
const firedRef = A(false);
|
|
350
|
+
const [mismatchOrigin, setMismatchOrigin] = d();
|
|
351
|
+
y(() => {
|
|
352
|
+
if (firedRef.current) return;
|
|
353
|
+
let notify;
|
|
354
|
+
if (mismatchOrigin !== void 0) notify = () => options.onError?.(new StepUpError$1("IFRAME_ORIGIN_MISMATCH", `The step-up frame posted from ${mismatchOrigin || "an unknown origin"}, expected ${options.onboardingOrigin ?? ""}`, options.stepUpId));
|
|
355
|
+
else if (state.status === "finished") {
|
|
356
|
+
const result = state.result;
|
|
357
|
+
notify = () => options.onFinish(result);
|
|
358
|
+
} else if (state.status === "closed") notify = () => options.onError?.(new StepUpError$1("USER_DENIED", "The user denied the permissions", options.stepUpId));
|
|
359
|
+
else if (state.status === "error") {
|
|
360
|
+
const { code, error, detail } = state;
|
|
361
|
+
notify = () => options.onError?.(new StepUpError$1(code, error, options.stepUpId, detail));
|
|
362
|
+
}
|
|
363
|
+
if (!notify) return;
|
|
364
|
+
firedRef.current = true;
|
|
365
|
+
queueMicrotask(notify);
|
|
366
|
+
}, [
|
|
367
|
+
state,
|
|
368
|
+
options,
|
|
369
|
+
mismatchOrigin
|
|
370
|
+
]);
|
|
371
|
+
if (mismatchOrigin !== void 0) return null;
|
|
372
|
+
if (state.status === "permissions" && !themeReady) return /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u("div", {
|
|
373
|
+
class: "IncodeStepUp",
|
|
374
|
+
children: /* @__PURE__ */ u(TransitionSpinner, { renderMode: "spinnerOnly" })
|
|
375
|
+
}) });
|
|
376
|
+
if (state.status === "verifying") {
|
|
377
|
+
if (options.mode === "hosted" && options.onboardingUrl) return /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u("div", {
|
|
378
|
+
class: "IncodeStepUp",
|
|
379
|
+
children: /* @__PURE__ */ u(StepUpHostedFrame, {
|
|
380
|
+
url: options.onboardingUrl,
|
|
381
|
+
origin: options.onboardingOrigin ?? "",
|
|
382
|
+
stepUpId: options.stepUpId,
|
|
383
|
+
permissions: options.permissions,
|
|
384
|
+
permissionsUi: options.permissionsUi,
|
|
385
|
+
readyTimeoutMs: options.readyTimeoutMs,
|
|
386
|
+
onOriginMismatch: setMismatchOrigin,
|
|
387
|
+
onFinished: (approvedScopes) => manager.hostedFinished(approvedScopes),
|
|
388
|
+
onDenied: () => manager.hostedDenied(),
|
|
389
|
+
onFailed: (code, message, detail) => manager.verificationFailed(message, code, detail)
|
|
390
|
+
})
|
|
391
|
+
}) });
|
|
392
|
+
return /* @__PURE__ */ u("div", {
|
|
393
|
+
class: "IncodeStepUp",
|
|
394
|
+
children: /* @__PURE__ */ u(IncodeWorkflow, {
|
|
395
|
+
config: {
|
|
396
|
+
token: options.sessionToken,
|
|
397
|
+
...options.interviewId ? { interviewId: options.interviewId } : {},
|
|
398
|
+
...options.lang ? { lang: options.lang } : {},
|
|
399
|
+
...options.disableDashboardTheme ? { disableDashboardTheme: true } : {}
|
|
400
|
+
},
|
|
401
|
+
onFinish: (result) => manager.workflowFinished(result),
|
|
402
|
+
onError: (error, errorCode, moduleErrorCode) => {
|
|
403
|
+
const code = moduleErrorCode ?? (errorCode !== void 0 ? String(errorCode) : void 0);
|
|
404
|
+
manager.verificationFailed(error ?? "Verification failed", "VERIFICATION_ERROR", {
|
|
405
|
+
...code ? { code } : {},
|
|
406
|
+
...error ? { message: error } : {}
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
})
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
if (state.status === "permissions") return /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u("div", {
|
|
413
|
+
class: "IncodeStepUp",
|
|
414
|
+
children: /* @__PURE__ */ u(StepUpPermissionsScreen, {
|
|
415
|
+
state,
|
|
416
|
+
manager
|
|
417
|
+
})
|
|
418
|
+
}) });
|
|
419
|
+
if (state.status === "error") return /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u("div", {
|
|
420
|
+
class: "IncodeStepUp",
|
|
421
|
+
children: /* @__PURE__ */ u(TerminalErrorPage, { retryable: false })
|
|
422
|
+
}) });
|
|
423
|
+
return null;
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* The live mount per container. A new `renderStepUp` on the same container
|
|
427
|
+
* replaces it; an older handle's `unmount` then does nothing.
|
|
428
|
+
*/
|
|
429
|
+
var activeMounts = /* @__PURE__ */ new WeakMap();
|
|
430
|
+
function isElement(value) {
|
|
431
|
+
return typeof value === "object" && value !== null && value.nodeType === 1;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Renders a step-up into `container`: the agent class's workflow in token
|
|
435
|
+
* mode and the permissions screen (skipped with `permissionsUi: 'none'`),
|
|
436
|
+
* in the order `permissionsOrder` sets (the permissions screen first by
|
|
437
|
+
* default, `beforeFaceCheck`), then
|
|
438
|
+
* `onFinish({ stepUpId, approvedScopes })` (`approvedScopes: []` with
|
|
439
|
+
* `permissionsUi: 'none'`). Errors reach `onError` as a `StepUpError` with
|
|
440
|
+
* `code` `USER_DENIED`, `FACE_CHECK_FAILED` (the check ran and failed),
|
|
441
|
+
* `VERIFICATION_PENDING` (no result yet), `VERIFICATION_ERROR` (could not
|
|
442
|
+
* finish; `detail` has the original code and message) or
|
|
443
|
+
* `IFRAME_ORIGIN_MISMATCH`.
|
|
444
|
+
*
|
|
445
|
+
* With `mode: 'hosted'` it frames `onboardingUrl` instead; the hosted page
|
|
446
|
+
* runs the face check and draws the permissions (it receives them by
|
|
447
|
+
* `postMessage`, contract v0.2 §6.6) and the SDK relays its result.
|
|
448
|
+
*
|
|
449
|
+
* `onFinish` is only a hint: the bank server's status read
|
|
450
|
+
* (`GET /step-ups/{id}`) is what checks the face check and activates the
|
|
451
|
+
* mandate.
|
|
452
|
+
*
|
|
453
|
+
* A failed or denied step-up is final. To retry, the bank asks for a new
|
|
454
|
+
* decision and starts a new step-up (new `stepUpId` and session token), then
|
|
455
|
+
* calls `renderStepUp` with those. The same container is fine: the new call
|
|
456
|
+
* replaces the earlier step-up with a fresh one (new state, new callbacks),
|
|
457
|
+
* and the earlier handle's `unmount` then does nothing.
|
|
458
|
+
*
|
|
459
|
+
* `mode: 'embedded'` (the default) needs `setup({ apiURL })` first, as for `<incode-workflow>`.
|
|
460
|
+
* Import from `@incodetech/web/step-up` and load
|
|
461
|
+
* `@incodetech/web/step-up/styles.css`.
|
|
462
|
+
*
|
|
463
|
+
* The step-up fills `container`'s height, as the other SDK elements do. Give
|
|
464
|
+
* the container a height to size it; without one it is 560px tall.
|
|
465
|
+
*
|
|
466
|
+
* @throws StepUpError with code `INVALID_OPTIONS` for bad options.
|
|
467
|
+
*/
|
|
468
|
+
function renderStepUp(container, options) {
|
|
469
|
+
if (!isElement(container)) throw new StepUpError$1("INVALID_OPTIONS", "container must be an HTML element");
|
|
470
|
+
const normalized = validateStepUpOptions(options);
|
|
471
|
+
if (!hasI18nInstance()) setI18nInstance(createI18n(normalized.lang ? { lang: normalized.lang } : void 0));
|
|
472
|
+
G(null, container);
|
|
473
|
+
const mount = {};
|
|
474
|
+
activeMounts.set(container, mount);
|
|
475
|
+
G(/* @__PURE__ */ u(IncodeStepUp, { options: normalized }), container);
|
|
476
|
+
return { unmount() {
|
|
477
|
+
if (activeMounts.get(container) !== mount) return;
|
|
478
|
+
activeMounts.delete(container);
|
|
479
|
+
G(null, container);
|
|
480
|
+
} };
|
|
481
|
+
}
|
|
482
|
+
//#endregion
|
|
483
|
+
export { IncodeStepUp, StepUpError, renderStepUp };
|