@incodetech/core 2.4.1 → 2.5.0-agentic.1
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/Actor-DqjOqDfU.d.ts +1 -0
- package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-CPdofn7R.d.ts} +3 -5
- package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
- package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-C7N1N61V.esm.js} +61 -744
- package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
- package/dist/{FaceDetectionProvider-J_-1Cwck.esm.js → FaceDetectionProvider-Cy2EAL0i.esm.js} +38 -66
- package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
- package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
- package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-BRAZQtkM.d.ts} +4 -3
- package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-CLWIYHB4.d.ts} +35 -7
- package/dist/Manager-BvXAwDv9.esm.js +125 -0
- package/dist/{Manager-C9T5amUN.d.ts → Manager-DufwKlav.d.ts} +1 -7
- package/dist/{MotionSensorProvider-DYxh8TjR.esm.js → MotionSensorProvider-BAGydZPH.esm.js} +20 -0
- package/dist/MultipartRecordingProvider-BtMQZEbg.esm.js +151 -0
- package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
- package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-BqaHTJF0.d.ts} +36 -5
- package/dist/{StreamCanvasCapture-C9jtgBdT.esm.js → StreamCanvasCapture-CXd87trH.esm.js} +18 -3
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
- package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-C4x5gc1c.esm.js} +135 -25
- package/dist/WorkerEncoderRecordingProvider-BO7urYwT.esm.js +80 -0
- package/dist/addressSearch-DBJeg_g3.esm.js +301 -0
- package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-CxZyPRyh.esm.js} +4 -2
- package/dist/ae-signature.d.ts +2 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/allowedCharacters-Bnir--CN.esm.js +17 -0
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-DbGCvlJs.d.ts → antifraudManager-BxfCsyA7.d.ts} +3 -3
- package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-DRMBLSh7.esm.js} +5 -3
- package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-Bi0m60oV.esm.js} +4 -6
- package/dist/{api-Cz90EHyu.esm.js → api-B58edv6M.esm.js} +13 -7
- package/dist/{apiError-9Yi8xMeB.esm.js → apiError-B9-B3cMq.esm.js} +1 -1
- package/dist/attemptCarry-CxiYlUAO.esm.js +45 -0
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-CkD0JR7Q.d.ts} +2 -2
- package/dist/{authenticationManager-pKQS4fHT.esm.js → authenticationManager-DNWtc0eq.esm.js} +7 -6
- package/dist/{authenticationStateMachine-D_DygKtQ.esm.js → authenticationStateMachine-CJ9i4Al-.esm.js} +50 -18
- package/dist/avatar.d.ts +1 -1
- package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
- package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-6qVHvj76.esm.js} +12 -107
- package/dist/{browser-DlFgHpoC-DnyrCR8r.esm.js → browser-pQZA35G2-B4Dwja1e.esm.js} +161 -150
- package/dist/calendarDate-D2zWfUlA.esm.js +35 -0
- package/dist/{callback-645_omgz.d.ts → callback-BmjJ1G-5.d.ts} +1 -1
- package/dist/camera-9yYDUOsO.d.ts +5 -0
- package/dist/{camera-sIa9ceW2.esm.js → camera-CJKApt0x.esm.js} +19 -20
- package/dist/camera.d.ts +9 -5
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.d.ts +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-Dr8A4Lgr.d.ts → certificateIssuanceManager-BcYhxO63.d.ts} +4 -3
- package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-Ctj6AJC7.esm.js} +5 -3
- package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-DDqN9kvL.esm.js} +4 -4
- package/dist/cnpj-CVq3vL39.esm.js +71 -0
- package/dist/cnpj-D5cxwIe-.esm.js +9 -0
- package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-Ca8FHlC4.d.ts → consentManager-B0YKqYtZ.d.ts} +20 -12
- package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-CyoeiABc.esm.js} +7 -4
- package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-BTUrAslr.esm.js} +25 -15
- package/dist/cpf-DDXMTLYr.esm.js +37 -0
- package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-Ct9QrQ66.d.ts} +1 -1
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-cmQmp7Bi.esm.js} +6 -5
- package/dist/{crossDocumentDataMatchManager-yCWCOzcU.d.ts → crossDocumentDataMatchManager-crZcIUSY.d.ts} +3 -3
- package/dist/curp-DZGvefg3.esm.js +14 -0
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-EW44fVpH.esm.js} +6 -3
- package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-HOidAKvT.d.ts} +4 -4
- package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-BFkt90Zs.esm.js} +41 -34
- package/dist/custom-fields.d.ts +1 -1
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-CF-cO8ap.d.ts → customFieldsManager-CdWTbsew.d.ts} +3 -3
- package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-DPMBJrcH.esm.js} +15 -17
- package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-DiYpPjZx.esm.js} +5 -3
- package/dist/{customWatchlistManager-DolUswyR.d.ts → customWatchlistManager-lJrveDS4.d.ts} +3 -3
- package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-D7VxQggF.esm.js} +4 -6
- package/dist/deepsightCaptureConfig-BxD3mSac.esm.js +70 -0
- package/dist/{deepsightService-C3DVBOZd.esm.js → deepsightLoader-KYZP8_x-.esm.js} +41 -74
- package/dist/definitionSource-B9WTvQb9.esm.js +30 -0
- package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BGQRIA2u.esm.js} +278 -44
- package/dist/device.d.ts +3 -3
- package/dist/device.esm.js +16 -16
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +2 -2
- package/dist/document-signature.d.ts +123 -0
- package/dist/document-signature.esm.js +149 -0
- package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-SRG6YEMh.esm.js} +30 -20
- package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-sJWgqtUy.d.ts} +42 -8
- package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-Bh0uyfGq.esm.js} +110 -63
- package/dist/documentSignatureStateMachine-CLljjltG.esm.js +219 -0
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-C45pTncO.d.ts} +4 -4
- package/dist/{dynamicFormsManager-DK_oc5Oy.esm.js → dynamicFormsManager-CnU2hRvl.esm.js} +5 -3
- package/dist/{dynamicFormsStateMachine-CGlIAWZ6.esm.js → dynamicFormsStateMachine-huYmjamB.esm.js} +12 -13
- package/dist/ekyb.d.ts +5 -5
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BLgkiWXw.esm.js → ekybManager-CaEErq39.esm.js} +5 -3
- package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-Cjk8pQX0.d.ts} +5 -5
- package/dist/ekybStateMachine-BIU8KIMv.esm.js +2173 -0
- package/dist/ekybUtils-Dl0MU-ib.esm.js +172 -0
- package/dist/ekyc-prefill.d.ts +17 -0
- package/dist/ekyc-prefill.esm.js +3 -0
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-D2K8AaMV.esm.js} +39 -16
- package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-DusmB-4j.d.ts} +49 -7
- package/dist/ekycPrefillManager-BwmPXfhY.d.ts +566 -0
- package/dist/ekycPrefillManager-CENQjdNq.esm.js +102 -0
- package/dist/ekycPrefillStateMachine-jT3hIt2X.esm.js +1289 -0
- package/dist/ekycStateMachine-6EKndBd7.esm.js +9024 -0
- package/dist/ekycUtils-C6HZB46m.esm.js +1532 -0
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-DTSLOvKR.d.ts → electronicSignatureManager-5tYz-a4o.d.ts} +4 -3
- package/dist/{electronicSignatureManager-CjKvJ6E-.esm.js → electronicSignatureManager-wM8WTgzP.esm.js} +12 -18
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-ButFktRm.esm.js → emailManager-BBdRYLtH.esm.js} +5 -3
- package/dist/{emailManager-Dy6omJVp.d.ts → emailManager-pM7ZPuMa.d.ts} +3 -3
- package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-DO7lWYvn.esm.js} +35 -25
- package/dist/events-PUWyizJn.esm.js +299 -0
- package/dist/events.d.ts +4 -4
- package/dist/events.esm.js +2 -1
- package/dist/extensibility.d.ts +57 -41
- package/dist/extensibility.esm.js +39 -37
- package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-cUjJYyXj.esm.js} +4 -1
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-D1EJw36F.d.ts} +101 -77
- package/dist/{faceCaptureManagerFactory-BDGhg24q.esm.js → faceCaptureManagerFactory-DbEARG3h.esm.js} +29 -12
- package/dist/{faceCaptureSetup-CvGYG4GZ.esm.js → faceCaptureSetup-VaAjMpWX.esm.js} +189 -513
- package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-C5b5WtcY.d.ts} +23 -7
- package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-nBvS9z0o.esm.js} +5 -3
- package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-48O8j_Lx.esm.js} +70 -42
- package/dist/{feature-management-D4ne_hXW.esm.js → feature-management-D7oLtULO.esm.js} +37 -22
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.d.ts +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-B1ipvtnp.esm.js} +7 -7
- package/dist/{fieldComparisonManager-CUX4gza2.d.ts → fieldComparisonManager-mFOHRhVd.d.ts} +3 -3
- package/dist/fiscal-qr.d.ts +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-D0Iy7EKR.d.ts → fiscalQrManager-DFnFVpP9.d.ts} +3 -3
- package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-yecjuXV4.esm.js} +9 -8
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +73 -24
- package/dist/flow.esm.js +261 -66
- package/dist/{flowCompletionService-Cemwaa5b.esm.js → flowCompletionService-CIjaIpMH.esm.js} +2 -2
- package/dist/flowServices-Dqt75TXx.esm.js +951 -0
- package/dist/formErrors-lSfh7Y8J.esm.js +512 -0
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-CENrvxpK.d.ts} +19 -20
- package/dist/{geolocationManager-B0dc5rW9.esm.js → geolocationManager-DHfgXhEs.esm.js} +9 -9
- package/dist/{geolocationStateMachine-B3rcoODF.esm.js → geolocationStateMachine-CrEspaN-.esm.js} +16 -14
- package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-Dcy9erbl.esm.js} +1 -1
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-0-L21hu6.esm.js} +5 -3
- package/dist/{governmentValidationManager-B82zOut8.d.ts → governmentValidationManager-De_vU7bm.d.ts} +4 -4
- package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-BFIcq3UB.esm.js} +4 -6
- package/dist/home.d.ts +4 -3
- package/dist/home.esm.js +4 -2
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +2 -2
- package/dist/id-ocr.esm.js +3 -3
- package/dist/id-selfie-flow.d.ts +7 -6
- package/dist/id-selfie-flow.esm.js +14 -12
- package/dist/id-verification.d.ts +1 -1
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +6 -19
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-CNopPetU.esm.js} +17 -7
- package/dist/{idCaptureManager-IouAnrFm.esm.js → idCaptureManager-BPDCAV04.esm.js} +95 -34
- package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-CNFBeYgV.d.ts} +105 -16
- package/dist/{idCaptureServices-VTKIPSpT.esm.js → idCaptureServices-CWZFmS7l.esm.js} +36 -213
- package/dist/{idCaptureStateMachine-_Pn2Xkpb.esm.js → idCaptureStateMachine-Cyt2BvPB.esm.js} +3081 -2510
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-DflRx-_u.d.ts} +6 -5
- package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-bjBLjrEE.esm.js} +5 -3
- package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-D5ifJ1B8.esm.js} +20 -16
- package/dist/{idVerificationManager-BJapZfpy.d.ts → idVerificationManager-B6R8xNZq.d.ts} +4 -3
- package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-C8Ja-vKq.esm.js} +5 -3
- package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-BMnfZZli.esm.js} +4 -6
- package/dist/identity-reuse.d.ts +2 -2
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/identity-search.d.ts +97 -0
- package/dist/identity-search.esm.js +96 -0
- package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-B5BWAleT.esm.js} +9 -4
- package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +82 -15
- package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-Cuggm1UP.esm.js} +24 -31
- package/dist/{index-BKOWUhxG.d.ts → index-BMr3MZEI.d.ts} +93 -22
- package/dist/{index-CKQ9QBZP.d.ts → index-BoGlwLGK.d.ts} +2 -2
- package/dist/index-DHuAkTe0.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-D2FOfi4O.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -0
- package/dist/kyb-checks.esm.js +3 -0
- package/dist/kybChecksManager-BF2vf0Q2.esm.js +90 -0
- package/dist/kybChecksManager-CKDy1mel.d.ts +95 -0
- package/dist/kybChecksStateMachine-oBQfgdka.esm.js +713 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-qYojnZYg.d.ts → mandatoryConsentManager-BcxCesP5.d.ts} +30 -13
- package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-FfgHdPYw.esm.js} +7 -4
- package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-CXuYC3qR.esm.js} +35 -19
- package/dist/mediaRecorderOptions-Di_V9TnZ.esm.js +87 -0
- package/dist/multipartRecordingService-CFmOUGQt.esm.js +407 -0
- package/dist/numericRange-2e1vw1W0.esm.js +256 -0
- package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-CZTCRHT-.esm.js} +1 -1
- package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-Vd86JiW9.esm.js} +47 -19
- package/dist/phone-number.d.ts +7 -1
- package/dist/phone-number.esm.js +15 -2
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-bA-xw2TP.d.ts} +8 -11
- package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-oIMdbeLG.esm.js} +8 -7
- package/dist/phoneServices-Dk4j3NhI.esm.js +63 -0
- package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-Cu3y7ewi.esm.js} +57 -90
- package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
- package/dist/{platform-DkcRc9JV.esm.js → platform-GIg4uPWe.esm.js} +15 -4
- package/dist/processFaceMatch-CHeI0DEt.esm.js +21 -0
- package/dist/qe-signature.d.ts +2 -2
- package/dist/qe-signature.esm.js +1 -1
- package/dist/recordingService-DK3kjUby.esm.js +404 -0
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Db99n9Yu.d.ts} +7 -4
- package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-yYJGE47m.esm.js} +10 -6
- package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-g_NbyHrL.esm.js} +82 -46
- package/dist/resolveForm-DaaQSVWp.esm.js +146 -0
- package/dist/{runChildModule-DSpP41Hl.esm.js → runChildModule-x1rrxjYY.esm.js} +9 -7
- package/dist/{sdkVersion-DKHwWEyH.esm.js → sdkVersion-kRh5h82H.esm.js} +1 -1
- package/dist/selfie.d.ts +6 -6
- package/dist/selfie.esm.js +15 -13
- package/dist/{selfieErrorUtils-DoN1KFSQ.esm.js → selfieErrorUtils-B9GfiS9f.esm.js} +1 -1
- package/dist/{selfieManager-DtQegA6T.esm.js → selfieManager-CivYjnF5.esm.js} +7 -6
- package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-CqDlUy6B.d.ts} +2 -2
- package/dist/{selfieStateMachine-CnCwJZuC.esm.js → selfieStateMachine-dLwrXWll.esm.js} +5 -5
- package/dist/{session-CNUfjlRc.esm.js → session-DeJ-rd9u.esm.js} +78 -9
- package/dist/session.d.ts +85 -9
- package/dist/session.esm.js +7 -6
- package/dist/{sessionInitializer-JM_glXR2.esm.js → sessionInitializer-uZgyxsrL.esm.js} +442 -208
- package/dist/{setup-YPKTUCY5.d.ts → setup-Cr2KCwau.d.ts} +7 -6
- package/dist/{setup-C5tfWt6W.esm.js → setup-D0QZHkS8.esm.js} +42 -29
- package/dist/signature.d.ts +1 -1
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-DRUflksL.esm.js} +5 -3
- package/dist/{signatureManager-BpVt_Jv7.d.ts → signatureManager-daT_8fj_.d.ts} +3 -3
- package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-BQZenxel.esm.js} +5 -7
- package/dist/{spawn-D9jgw9pW.d.ts → spawn-COZKetCS.d.ts} +1 -1
- package/dist/{stats-BEvexnKC.esm.js → stats-DHu3li6G.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/step-up.d.ts +379 -0
- package/dist/step-up.esm.js +640 -0
- package/dist/{tri-xzRLIIMN.esm.js → tri-D_gHPWrq.esm.js} +137 -8
- package/dist/tri.d.ts +2 -2
- package/dist/tri.esm-CftnGf9w.esm.js +3115 -0
- package/dist/tri.esm.js +2 -2
- package/dist/trueSight-CbrZUzLx.esm.js +1 -0
- package/dist/{trueSightService-fLmL_cyg.esm.js → trueSightService-BMp8g65B.esm.js} +25 -16
- package/dist/trust-graph.d.ts +87 -27
- package/dist/trust-graph.esm.js +6 -25
- package/dist/trustGraphStateMachine-0Ehwried.esm.js +58 -0
- package/dist/types-B9C8W01q.d.ts +34 -0
- package/dist/types-BNkzXOXE.d.ts +45 -0
- package/dist/{types-B6HsSzpk.d.ts → types-BZsmNYom.d.ts} +77 -9
- package/dist/types-BinnzVrL.d.ts +6 -0
- package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
- package/dist/{types-0L-eFDmr.d.ts → types-BwMpWCVG.d.ts} +6 -2
- package/dist/{types-BQA7lRDV.d.ts → types-C3rfDzgE.d.ts} +4 -2
- package/dist/types-CXTDuzUJ.d.ts +16 -0
- package/dist/{types-BEwVKkLJ.d.ts → types-CeEcakO7.d.ts} +7 -1
- package/dist/{types-DUnFZ08M.d.ts → types-Cy6Lx3L6.d.ts} +18 -10
- package/dist/{types-BAxn7MpY.d.ts → types-D-FEM1rT.d.ts} +156 -58
- package/dist/types-D6Q1D1kx.d.ts +33 -0
- package/dist/{events-Du2A4-Qr.esm.js → types-DLsivQsu.esm.js} +6 -303
- package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
- package/dist/types-DWqO7owj.d.ts +58 -0
- package/dist/{types-yPH8lAH-.d.ts → types-HHgsFhZn.d.ts} +16 -3
- package/dist/{types-Ckir_BEs.d.ts → types-LbccjQYX.d.ts} +3 -2
- package/dist/{types-CK8Jbjkp.d.ts → types-PnJXvTkV.d.ts} +1 -1
- package/dist/types-g3NuVCT9.d.ts +118 -0
- package/dist/types-tOSLpcSa.d.ts +231 -0
- package/dist/urlUtils-B2wagB5v.esm.js +39 -0
- package/dist/usStates-CwOQ2kAx.esm.js +209 -0
- package/dist/video-selfie.d.ts +27 -17
- package/dist/video-selfie.esm.js +105 -26
- package/dist/{videoSelfieCameraWarmer-BBNKiau1.esm.js → videoSelfieCameraWarmer-BpP0_lDr.esm.js} +47 -29
- package/dist/{videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js → videoSelfieFlowModuleMachine-IWdxw1TW.esm.js} +1 -1
- package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-CxOc3kSI.d.ts} +24 -9
- package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
- package/dist/{warmup-BElYWRh7.esm.js → warmup-ClZxXOkg.esm.js} +378 -57
- package/dist/{warmup-BO57syF6.d.ts → warmup-SWu5L7cW.d.ts} +19 -2
- package/dist/wasm.d.ts +9 -3
- package/dist/wasm.esm.js +3 -3
- package/dist/wasmDeepsightConfigSync-DukEcrU8.esm.js +77 -0
- package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-Bw-P5OG1.esm.js} +1 -1
- package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-BLtlzQhv.esm.js} +77 -29
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-d8kdf35n.esm.js} +40 -8
- package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts} +57 -21
- package/dist/watchlistForBusinessStateMachine-Y9wFmuMH.esm.js +170 -0
- package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-D1BVrd3H.esm.js} +5 -3
- package/dist/{watchlistManager-DJQOd8Pw.d.ts → watchlistManager-DQq4GxBO.d.ts} +3 -3
- package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-Da4p0sTE.esm.js} +4 -6
- package/dist/workflow.d.ts +10 -6
- package/dist/workflow.esm.js +95 -60
- package/dist/{xstate-actors.esm-8Gzepa_A.esm.js → xstate-actors.esm-BCcwgosu.esm.js} +1 -1
- package/dist/xstate.cjs-D6Ur0X1F.d.ts +7 -0
- package/dist/{xstate.esm-DSajW7CJ.esm.js → xstate.esm-CIqUf_i6.esm.js} +1 -125
- package/package.json +34 -7
- package/dist/Actor-DpTj5PFb.d.ts +0 -1
- package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
- package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
- package/dist/camera-9wWD-pwg.d.ts +0 -4
- package/dist/cpf-uAZTPUBy.esm.js +0 -61
- package/dist/deepsightLoader-sH7920zw.esm.js +0 -55
- package/dist/ekybStateMachine-BfgOUZMK.esm.js +0 -933
- package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
- package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
- package/dist/flowServices-X6Rwf_7E.esm.js +0 -688
- package/dist/index-DpTj5PFb.d.ts +0 -1
- package/dist/thumbmark.esm-CRc0cYvz.esm.js +0 -1242
- package/dist/tri.esm-BIjHhBJ2.esm.js +0 -2620
- package/dist/types-BvLo3U4u.d.ts +0 -134
- package/dist/types-zOgZqMni.d.ts +0 -6
- package/dist/urlUtils-6jsE6rKp.esm.js +0 -23
- package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
- /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
|
@@ -1,23 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
|
+
import { n as resetWasmDeepsightConfigSync } from "./wasmDeepsightConfigSync-DukEcrU8.esm.js";
|
|
3
|
+
import { S as subscribeEvent, v as addEvent, y as getAnalyticsBatcher } from "./types-DLsivQsu.esm.js";
|
|
4
|
+
import { c as setToken, r as getToken, t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
5
|
+
import "./events-PUWyizJn.esm.js";
|
|
6
|
+
import { C as noteTokenActivated, _ as isFeatureEnabled, b as noteEnvironment, c as startTrueSightCollection, g as fetchFeatureConfig, u as trueSightLog, v as resetFeatureConfigCache } from "./trueSightService-BMp8g65B.esm.js";
|
|
7
|
+
import { t as SDK_VERSION } from "./sdkVersion-kRh5h82H.esm.js";
|
|
8
|
+
import "./trueSight-CbrZUzLx.esm.js";
|
|
9
|
+
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
10
|
+
import { E as updateFeatureManagementUser } from "./feature-management-D7oLtULO.esm.js";
|
|
11
|
+
import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-DHu3li6G.esm.js";
|
|
7
12
|
import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
|
|
8
|
-
import {
|
|
9
|
-
import { a as isIOS } from "./platform-DkcRc9JV.esm.js";
|
|
13
|
+
import { i as isIOS } from "./platform-GIg4uPWe.esm.js";
|
|
10
14
|
import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
|
|
11
|
-
import {
|
|
15
|
+
import { a as isTRIStarted, o as linkSessionWithTRI, s as readTRIFpSignals } from "./tri-D_gHPWrq.esm.js";
|
|
16
|
+
import { i as retryAfterReconnect } from "./connectivity-BCuEoQ-n.esm.js";
|
|
17
|
+
//#region src/internal/version/sdkPlatform.ts
|
|
18
|
+
/**
|
|
19
|
+
* The platform SDK 2 reports to the backend: the device fingerprint post's
|
|
20
|
+
* `deviceType`, and the SDK platform the WASM module stamps on capture
|
|
21
|
+
* metadata and fingerprint signals. Keep them in one place so they agree.
|
|
22
|
+
*/
|
|
23
|
+
const SDK_PLATFORM = "WEBAPP";
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/internal/fingerprint/incodeDeviceHash.ts
|
|
26
|
+
function isNonEmptyString(value) {
|
|
27
|
+
return typeof value === "string" && value.trim() !== "";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Reads the device hash from a PID signal response. The SDK never pairs a
|
|
31
|
+
* hash with an algorithm user-service didn't name, so all three fields must be
|
|
32
|
+
* present.
|
|
33
|
+
*/
|
|
34
|
+
function readIncodeDeviceHash(data) {
|
|
35
|
+
if (typeof data !== "object" || data === null) return null;
|
|
36
|
+
const { deviceHash, algorithmName, algorithmVersion } = data;
|
|
37
|
+
if (!isNonEmptyString(deviceHash) || !isNonEmptyString(algorithmName) || !isNonEmptyString(algorithmVersion)) return null;
|
|
38
|
+
return {
|
|
39
|
+
hash: deviceHash,
|
|
40
|
+
algorithmName,
|
|
41
|
+
algorithmVersion
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function createIncodeDeviceHashWaiter() {
|
|
45
|
+
const pendingByToken = /* @__PURE__ */ new Map();
|
|
46
|
+
function pendingFor(token) {
|
|
47
|
+
let pending = pendingByToken.get(token);
|
|
48
|
+
if (!pending) {
|
|
49
|
+
let settle = () => void 0;
|
|
50
|
+
pending = {
|
|
51
|
+
deviceHash: new Promise((resolve) => {
|
|
52
|
+
settle = resolve;
|
|
53
|
+
}),
|
|
54
|
+
settle
|
|
55
|
+
};
|
|
56
|
+
pendingByToken.set(token, pending);
|
|
57
|
+
}
|
|
58
|
+
return pending;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
settle(token, deviceHash) {
|
|
62
|
+
pendingFor(token).settle(deviceHash);
|
|
63
|
+
},
|
|
64
|
+
waitFor(token) {
|
|
65
|
+
return pendingFor(token).deviceHash;
|
|
66
|
+
},
|
|
67
|
+
reset() {
|
|
68
|
+
pendingByToken.forEach((pending) => pending.settle(null));
|
|
69
|
+
pendingByToken.clear();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const incodeDeviceHashWaiter = createIncodeDeviceHashWaiter();
|
|
74
|
+
//#endregion
|
|
12
75
|
//#region src/internal/fingerprint/fingerprintSignalsReporter.ts
|
|
13
76
|
const START_INTERVIEW_EVENT = "modelLoadEnd";
|
|
14
77
|
const CAPTURE_INTERVIEW_EVENT = "captureAttemptFinished";
|
|
15
|
-
const START_SIGNALS = ["
|
|
78
|
+
const START_SIGNALS = ["device"];
|
|
79
|
+
const MAX_KEPT_SIGNALS = 20;
|
|
80
|
+
const EMPTY_BEHAVIOUR_BASELINE_MESSAGE = "first read was empty, native collection is not running";
|
|
81
|
+
/**
|
|
82
|
+
* The native envelope reads the SDK platform and version, and the start batch
|
|
83
|
+
* goes out before any capture's Deepsight session has set them. A failure is
|
|
84
|
+
* rethrown under its own name, so TrueSight does not blame the read.
|
|
85
|
+
*/
|
|
86
|
+
function setSdkIdentity(wasmUtil) {
|
|
87
|
+
try {
|
|
88
|
+
wasmUtil.setSdkPlatform(SDK_PLATFORM);
|
|
89
|
+
wasmUtil.setSdkVersion(SDK_VERSION);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
92
|
+
throw new Error(`setting the SDK platform and version failed: ${message}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
16
95
|
function createFingerprintSignalsReporter(deps) {
|
|
17
96
|
let enabled = true;
|
|
18
97
|
let sessionActive = false;
|
|
19
98
|
let wasmReady = false;
|
|
20
99
|
let started = false;
|
|
100
|
+
let pidStarted = false;
|
|
21
101
|
let pendingStartSignals = START_SIGNALS;
|
|
22
102
|
let prefetchStarted = false;
|
|
23
103
|
let deviceDataUpdated = true;
|
|
@@ -26,6 +106,22 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
26
106
|
let optInPending = false;
|
|
27
107
|
let queue = Promise.resolve();
|
|
28
108
|
let generation = 0;
|
|
109
|
+
let keptSignals = [];
|
|
110
|
+
let forward = null;
|
|
111
|
+
let forwardRefused = false;
|
|
112
|
+
function keepOrForward(metadata) {
|
|
113
|
+
if (forward) {
|
|
114
|
+
if (!forward(metadata)) {
|
|
115
|
+
forward = null;
|
|
116
|
+
forwardRefused = true;
|
|
117
|
+
}
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (forwardRefused) return;
|
|
121
|
+
keptSignals.push(metadata);
|
|
122
|
+
if (keptSignals.length > MAX_KEPT_SIGNALS) keptSignals.shift();
|
|
123
|
+
}
|
|
124
|
+
let behaviourBaselinePending = true;
|
|
29
125
|
function enqueue(work) {
|
|
30
126
|
const scheduledGeneration = generation;
|
|
31
127
|
queue = queue.then(async () => {
|
|
@@ -34,13 +130,34 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
34
130
|
});
|
|
35
131
|
}
|
|
36
132
|
async function send(token, interviewEvent, type) {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
metadata
|
|
43
|
-
|
|
133
|
+
const isPid = type === "pid";
|
|
134
|
+
let deviceHash = null;
|
|
135
|
+
try {
|
|
136
|
+
const wasmUtil = await deps.getWasmUtil();
|
|
137
|
+
setSdkIdentity(wasmUtil);
|
|
138
|
+
const metadata = await wasmUtil.getFingerprintSignals(type);
|
|
139
|
+
if (type === "behaviour" && behaviourBaselinePending) {
|
|
140
|
+
behaviourBaselinePending = false;
|
|
141
|
+
if (!metadata) deps.reportFailure({
|
|
142
|
+
message: EMPTY_BEHAVIOUR_BASELINE_MESSAGE,
|
|
143
|
+
signalsType: type,
|
|
144
|
+
interviewEvent
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
if (!metadata || deps.getToken() !== token) return;
|
|
148
|
+
keepOrForward(metadata);
|
|
149
|
+
const response = await deps.post(endpoints.deviceFingerprintSignals, isPid ? {
|
|
150
|
+
interviewEvent,
|
|
151
|
+
metadata,
|
|
152
|
+
deviceHashRequested: true
|
|
153
|
+
} : {
|
|
154
|
+
interviewEvent,
|
|
155
|
+
metadata
|
|
156
|
+
}, { "X-Incode-Hardware-Id": token });
|
|
157
|
+
deviceHash = isPid && enabled ? readIncodeDeviceHash(response) : null;
|
|
158
|
+
} finally {
|
|
159
|
+
if (isPid) deps.onDeviceHash(token, deviceHash);
|
|
160
|
+
}
|
|
44
161
|
}
|
|
45
162
|
/**
|
|
46
163
|
* Sends `types` in order and stops at the first failure. Resolves to the
|
|
@@ -61,6 +178,7 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
61
178
|
}
|
|
62
179
|
/** Switches native behaviour collection (`sbc`); resolves to whether it worked. */
|
|
63
180
|
async function applyNativeCollection(on) {
|
|
181
|
+
if (!on) behaviourBaselinePending = false;
|
|
64
182
|
try {
|
|
65
183
|
(await deps.getWasmUtil()).setBehaviourSignalsCollection(on);
|
|
66
184
|
return true;
|
|
@@ -98,6 +216,7 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
98
216
|
if (!token) return;
|
|
99
217
|
startPrefetch();
|
|
100
218
|
if (optInPending) enqueue(applyNativeOptIn);
|
|
219
|
+
startPid(token);
|
|
101
220
|
if (started || !sessionActive) return;
|
|
102
221
|
started = true;
|
|
103
222
|
ensureSubscribed();
|
|
@@ -117,6 +236,38 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
117
236
|
if (unsent.length > 0) allowRetry(unsent);
|
|
118
237
|
});
|
|
119
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* PID goes ahead of activation: the activation post waits for the pid. It is
|
|
241
|
+
* queued before DEVICE, so it still precedes it.
|
|
242
|
+
*/
|
|
243
|
+
function startPid(token) {
|
|
244
|
+
if (pidStarted) return;
|
|
245
|
+
pidStarted = true;
|
|
246
|
+
const pidGeneration = generation;
|
|
247
|
+
enqueue(async () => {
|
|
248
|
+
if ((await sendAll(token, START_INTERVIEW_EVENT, ["pid"])).length > 0 && pidGeneration === generation) pidStarted = false;
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/** Resolves the pid user-service returned for a host's PID, or `null`. */
|
|
252
|
+
async function postHostPid(token, readPid) {
|
|
253
|
+
try {
|
|
254
|
+
const metadata = await readPid();
|
|
255
|
+
if (!metadata || deps.getToken() !== token) return null;
|
|
256
|
+
const response = await deps.post(endpoints.deviceFingerprintSignals, {
|
|
257
|
+
interviewEvent: START_INTERVIEW_EVENT,
|
|
258
|
+
metadata,
|
|
259
|
+
deviceHashRequested: true
|
|
260
|
+
}, { "X-Incode-Hardware-Id": token });
|
|
261
|
+
return enabled ? readIncodeDeviceHash(response) : null;
|
|
262
|
+
} catch (error) {
|
|
263
|
+
deps.reportFailure({
|
|
264
|
+
message: error instanceof Error ? error.message : String(error),
|
|
265
|
+
signalsType: "pid",
|
|
266
|
+
interviewEvent: START_INTERVIEW_EVENT
|
|
267
|
+
});
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
120
271
|
function onCaptureAttemptFinished() {
|
|
121
272
|
wasmReady = true;
|
|
122
273
|
tryStart();
|
|
@@ -142,6 +293,7 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
142
293
|
generation += 1;
|
|
143
294
|
sessionActive = false;
|
|
144
295
|
started = false;
|
|
296
|
+
pidStarted = false;
|
|
145
297
|
pendingStartSignals = START_SIGNALS;
|
|
146
298
|
optInPending = false;
|
|
147
299
|
deviceDataUpdated = true;
|
|
@@ -173,6 +325,32 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
173
325
|
onCameraInfoUpdated() {
|
|
174
326
|
deviceDataUpdated = true;
|
|
175
327
|
},
|
|
328
|
+
sendHostPid(token, readPid) {
|
|
329
|
+
if (!enabled || pidStarted) return Promise.resolve(false);
|
|
330
|
+
pidStarted = true;
|
|
331
|
+
const pidGeneration = generation;
|
|
332
|
+
const sent = queue.then(async () => {
|
|
333
|
+
if (pidGeneration !== generation) return false;
|
|
334
|
+
const deviceHash = await postHostPid(token, readPid);
|
|
335
|
+
if (pidGeneration !== generation) return false;
|
|
336
|
+
if (deviceHash) {
|
|
337
|
+
deps.onDeviceHash(token, deviceHash);
|
|
338
|
+
return true;
|
|
339
|
+
}
|
|
340
|
+
pidStarted = false;
|
|
341
|
+
tryStart();
|
|
342
|
+
return false;
|
|
343
|
+
});
|
|
344
|
+
queue = sent.then(() => void 0);
|
|
345
|
+
return sent;
|
|
346
|
+
},
|
|
347
|
+
forwardTo(sink) {
|
|
348
|
+
forward = sink;
|
|
349
|
+
forwardRefused = false;
|
|
350
|
+
const kept = keptSignals;
|
|
351
|
+
keptSignals = [];
|
|
352
|
+
kept.forEach(keepOrForward);
|
|
353
|
+
},
|
|
176
354
|
resetSession,
|
|
177
355
|
reset() {
|
|
178
356
|
resetSession();
|
|
@@ -181,16 +359,19 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
181
359
|
prefetchStarted = false;
|
|
182
360
|
unsubscribe?.();
|
|
183
361
|
unsubscribe = null;
|
|
362
|
+
keptSignals = [];
|
|
363
|
+
forward = null;
|
|
364
|
+
forwardRefused = false;
|
|
184
365
|
}
|
|
185
366
|
};
|
|
186
367
|
}
|
|
187
368
|
const fingerprintSignalsReporter = createFingerprintSignalsReporter({
|
|
188
369
|
getWasmUtil: async () => {
|
|
189
|
-
|
|
190
|
-
return WasmUtilProvider.getInstance();
|
|
370
|
+
return (await import("./WasmUtilProvider-C4x5gc1c.esm.js").then((n) => n.n)).WasmUtilProvider.getInstance();
|
|
191
371
|
},
|
|
192
372
|
getToken: () => getToken(),
|
|
193
|
-
post: (url, body, headers) => api.post(url, body, { headers }),
|
|
373
|
+
post: async (url, body, headers) => (await api.post(url, body, { headers })).data,
|
|
374
|
+
onDeviceHash: (token, deviceHash) => incodeDeviceHashWaiter.settle(token, deviceHash),
|
|
194
375
|
subscribe: (listener) => subscribeEvent(listener),
|
|
195
376
|
reportFailure: ({ message, signalsType, interviewEvent }) => trueSightLog("warning", "wasm", "other", `fingerprint signals failed type=${signalsType} event=${interviewEvent} error=${message}`)
|
|
196
377
|
});
|
|
@@ -328,6 +509,55 @@ var BrowserInfoProvider = class {
|
|
|
328
509
|
}
|
|
329
510
|
};
|
|
330
511
|
//#endregion
|
|
512
|
+
//#region ../infra/src/providers/browser/IpifyProvider.ts
|
|
513
|
+
let cachedIp;
|
|
514
|
+
let inFlightLookup;
|
|
515
|
+
/**
|
|
516
|
+
* Resets the module-level IP cache. Intended for tests and full session resets.
|
|
517
|
+
*/
|
|
518
|
+
function resetIpifyCache() {
|
|
519
|
+
cachedIp = void 0;
|
|
520
|
+
inFlightLookup = void 0;
|
|
521
|
+
}
|
|
522
|
+
async function fetchIpFromIpify() {
|
|
523
|
+
if (typeof fetch === "undefined") return "";
|
|
524
|
+
let timeoutId = 0;
|
|
525
|
+
const controller = new AbortController();
|
|
526
|
+
if (AbortSignal.timeout) {
|
|
527
|
+
const signal = AbortSignal.timeout(3e3);
|
|
528
|
+
return (await (await fetch("https://api.ipify.org?format=json", { signal })).json()).ip;
|
|
529
|
+
}
|
|
530
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
531
|
+
timeoutId = setTimeout(() => {
|
|
532
|
+
controller.abort();
|
|
533
|
+
reject(/* @__PURE__ */ new Error("Request timeout"));
|
|
534
|
+
}, 3e3);
|
|
535
|
+
});
|
|
536
|
+
const fetchPromise = fetch("https://api.ipify.org?format=json", { signal: controller.signal }).then((res) => res.json()).then((data) => data.ip);
|
|
537
|
+
const result = await Promise.race([fetchPromise, timeoutPromise]);
|
|
538
|
+
clearTimeout(timeoutId);
|
|
539
|
+
return result;
|
|
540
|
+
}
|
|
541
|
+
var IpifyProvider = class {
|
|
542
|
+
async getIp() {
|
|
543
|
+
if (cachedIp !== void 0) return cachedIp;
|
|
544
|
+
if (inFlightLookup) return inFlightLookup;
|
|
545
|
+
inFlightLookup = (async () => {
|
|
546
|
+
try {
|
|
547
|
+
const ip = await fetchIpFromIpify();
|
|
548
|
+
cachedIp = ip;
|
|
549
|
+
return ip;
|
|
550
|
+
} catch {
|
|
551
|
+
cachedIp = "";
|
|
552
|
+
return "";
|
|
553
|
+
} finally {
|
|
554
|
+
inFlightLookup = void 0;
|
|
555
|
+
}
|
|
556
|
+
})();
|
|
557
|
+
return inFlightLookup;
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
//#endregion
|
|
331
561
|
//#region ../infra/src/device/getDeviceData.ts
|
|
332
562
|
const HIGH_ENTROPY_HINTS = /* @__PURE__ */ new Set([
|
|
333
563
|
"model",
|
|
@@ -425,171 +655,71 @@ async function getDeviceFingerprintInfo() {
|
|
|
425
655
|
}
|
|
426
656
|
}
|
|
427
657
|
//#endregion
|
|
428
|
-
//#region ../infra/src/scheduling/yieldUntilNextPaint.ts
|
|
429
|
-
/**
|
|
430
|
-
* Resolves after the browser has had a chance to commit and paint a queued
|
|
431
|
-
* render.
|
|
432
|
-
*
|
|
433
|
-
* Strategy:
|
|
434
|
-
* - `requestAnimationFrame` callbacks fire BEFORE the paint of the frame
|
|
435
|
-
* they belong to (per the HTML5 "update the rendering" step). If we
|
|
436
|
-
* resolve the promise inside a rAF callback, the await-continuation
|
|
437
|
-
* runs as a microtask immediately after the callback returns — still
|
|
438
|
-
* before the paint phase of that frame. A caller that then blocks the
|
|
439
|
-
* main thread (e.g. synchronous WASM `processPhoto`) starves the paint.
|
|
440
|
-
* - We therefore chain rAF → setTimeout: the rAF fires before frame N's
|
|
441
|
-
* paint, the setTimeout runs as a macrotask scheduled after frame N's
|
|
442
|
-
* "update the rendering" step, which the browser will only get to once
|
|
443
|
-
* the paint actually lands. By the time setTimeout fires, the paint
|
|
444
|
-
* for the queued render is on screen.
|
|
445
|
-
* - In environments where rAF never ticks (jsdom, happy-dom, backgrounded
|
|
446
|
-
* tabs), a parallel `setTimeout` fallback at 100 ms resolves instead.
|
|
447
|
-
* 100 ms is comfortably longer than two real-browser frames so rAF +
|
|
448
|
-
* setTimeout wins reliably in any foregrounded browser. (An earlier
|
|
449
|
-
* implementation raced rAF against a `MessageChannel` macrotask, but
|
|
450
|
-
* MessageChannel drains immediately after the current task's
|
|
451
|
-
* microtasks — before the next paint — so it resolved the promise too
|
|
452
|
-
* early and defeated the whole point of the helper.)
|
|
453
|
-
*
|
|
454
|
-
* Lives in infra because it touches browser APIs (`requestAnimationFrame`,
|
|
455
|
-
* `setTimeout`) that the architecture rules forbid from core. Core modules
|
|
456
|
-
* that need to yield to the browser render loop should import this helper
|
|
457
|
-
* directly via its file path.
|
|
458
|
-
*/
|
|
459
|
-
function yieldUntilNextPaint() {
|
|
460
|
-
return new Promise((resolve) => {
|
|
461
|
-
let resolved = false;
|
|
462
|
-
const done = () => {
|
|
463
|
-
if (resolved) return;
|
|
464
|
-
resolved = true;
|
|
465
|
-
resolve();
|
|
466
|
-
};
|
|
467
|
-
if (typeof requestAnimationFrame === "function") requestAnimationFrame(() => {
|
|
468
|
-
requestAnimationFrame(() => {
|
|
469
|
-
setTimeout(done, 0);
|
|
470
|
-
});
|
|
471
|
-
});
|
|
472
|
-
setTimeout(done, 100);
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
//#endregion
|
|
476
|
-
//#region ../infra/src/providers/browser/thumbmarkAdapter.ts
|
|
477
|
-
/**
|
|
478
|
-
* Adapter for @thumbmarkjs/thumbmarkjs. Single point of dependency so bundlers
|
|
479
|
-
* resolve it from infra's node_modules when building apps that depend on core → infra.
|
|
480
|
-
*/
|
|
481
|
-
const THUMBMARK_ALGORITHM = {
|
|
482
|
-
algorithmName: "thumbmarkjs",
|
|
483
|
-
algorithmVersion: "1.6.4"
|
|
484
|
-
};
|
|
485
|
-
/**
|
|
486
|
-
* `logging` must stay disabled. With it on (the upstream default) `getThumbmark()`
|
|
487
|
-
* evaluates a bare, unguarded storage read:
|
|
488
|
-
*
|
|
489
|
-
* options.logging && !sessionStorage.getItem("_tmjs_l") && Math.random() < 1e-4
|
|
490
|
-
*
|
|
491
|
-
* Hosts that delete the bare global as a self-XSS mitigation (`delete
|
|
492
|
-
* window.sessionStorage`) make that a `ReferenceError`, which would cost us the
|
|
493
|
-
* device fingerprint. `logging: false` short-circuits the expression before the
|
|
494
|
-
* read. It also stops upstream's 1-in-10 000 telemetry POST to
|
|
495
|
-
* api.thumbmarkjs.com. Re-check this when bumping the dependency.
|
|
496
|
-
*/
|
|
497
|
-
const THUMBMARK_OPTIONS = {
|
|
498
|
-
logging: false,
|
|
499
|
-
yield: yieldUntilNextPaint
|
|
500
|
-
};
|
|
501
|
-
const lazyThumbmark = BrowserLazyImportProvider.getInstance().create(() => import("./thumbmark.esm-CRc0cYvz.esm.js"), {
|
|
502
|
-
label: "Fingerprint",
|
|
503
|
-
moduleName: "@thumbmarkjs/thumbmarkjs",
|
|
504
|
-
timeoutMs: 1e4,
|
|
505
|
-
disabledMessage: "the device fingerprint is unavailable for this attempt."
|
|
506
|
-
});
|
|
507
|
-
async function getThumbmarkId() {
|
|
508
|
-
const module = await lazyThumbmark.load();
|
|
509
|
-
if (!module) throw new Error("@thumbmarkjs/thumbmarkjs failed to load");
|
|
510
|
-
return (await new module.Thumbmark(THUMBMARK_OPTIONS).get()).thumbmark;
|
|
511
|
-
}
|
|
512
|
-
//#endregion
|
|
513
658
|
//#region ../infra/src/providers/browser/FingerprintProvider.ts
|
|
514
659
|
var FingerprintProvider = class {
|
|
515
|
-
|
|
660
|
+
/**
|
|
661
|
+
* @param readVisitorId - The device id to report, or `null` without one;
|
|
662
|
+
* the result then has an empty `visitorId` and no algorithm fields.
|
|
663
|
+
*/
|
|
664
|
+
constructor(ipLookup, readVisitorId) {
|
|
516
665
|
this.ipLookup = ipLookup;
|
|
517
|
-
|
|
518
|
-
prime() {
|
|
519
|
-
this.startVisitorId();
|
|
520
|
-
}
|
|
521
|
-
startVisitorId() {
|
|
522
|
-
if (!this.visitorIdPromise) {
|
|
523
|
-
this.visitorIdPromise = getThumbmarkId();
|
|
524
|
-
this.visitorIdPromise.catch(() => void 0);
|
|
525
|
-
}
|
|
526
|
-
return this.visitorIdPromise;
|
|
666
|
+
this.readVisitorId = readVisitorId;
|
|
527
667
|
}
|
|
528
668
|
async getFingerprint(disableIpify = false) {
|
|
529
|
-
const
|
|
530
|
-
|
|
669
|
+
const [visitor, deviceInfo, ip] = await Promise.all([
|
|
670
|
+
this.readVisitorId(),
|
|
671
|
+
getDeviceFingerprintInfo(),
|
|
672
|
+
disableIpify ? Promise.resolve("") : this.ipLookup.getIp()
|
|
673
|
+
]);
|
|
531
674
|
return {
|
|
532
|
-
visitorId,
|
|
675
|
+
...visitor ?? { visitorId: "" },
|
|
533
676
|
ip,
|
|
534
|
-
deviceInfo
|
|
535
|
-
...THUMBMARK_ALGORITHM
|
|
677
|
+
deviceInfo
|
|
536
678
|
};
|
|
537
679
|
}
|
|
538
680
|
};
|
|
539
681
|
//#endregion
|
|
540
|
-
//#region
|
|
541
|
-
|
|
542
|
-
let inFlightLookup;
|
|
682
|
+
//#region src/internal/fingerprint/fingerprintApi.ts
|
|
683
|
+
const PID_WAIT_MS = 3e3;
|
|
543
684
|
/**
|
|
544
|
-
*
|
|
685
|
+
* Collects the device fingerprint: device info, the IP, and the Incode pid.
|
|
686
|
+
*
|
|
687
|
+
* `visitorId` is the current session's Incode pid, the device hash
|
|
688
|
+
* user-service returned for the session's PID signal, with the
|
|
689
|
+
* `algorithmName` and `algorithmVersion` it named. While that signal is in
|
|
690
|
+
* flight, this waits up to 3 s for it.
|
|
691
|
+
*
|
|
692
|
+
* Without a session (no token), with `setup({ fingerprint: false })`, or when
|
|
693
|
+
* no pid arrives within 3 s (WASM not loaded, or an older server), `visitorId`
|
|
694
|
+
* is `''` and `algorithmName` and `algorithmVersion` are absent.
|
|
695
|
+
*
|
|
696
|
+
* @param disableIpify - Skip the IP lookup. Defaults to the session's setting.
|
|
545
697
|
*/
|
|
546
|
-
function
|
|
547
|
-
|
|
548
|
-
|
|
698
|
+
async function getFingerprint(disableIpify) {
|
|
699
|
+
const shouldDisableIpify = disableIpify ?? getDisableIpify();
|
|
700
|
+
return new FingerprintProvider(new IpifyProvider(), readSessionPid).getFingerprint(shouldDisableIpify);
|
|
549
701
|
}
|
|
550
|
-
async function
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
timeoutId = setTimeout(() => {
|
|
560
|
-
controller.abort();
|
|
561
|
-
reject(/* @__PURE__ */ new Error("Request timeout"));
|
|
562
|
-
}, 3e3);
|
|
563
|
-
});
|
|
564
|
-
const fetchPromise = fetch("https://api.ipify.org?format=json", { signal: controller.signal }).then((res) => res.json()).then((data) => data.ip);
|
|
565
|
-
const result = await Promise.race([fetchPromise, timeoutPromise]);
|
|
566
|
-
clearTimeout(timeoutId);
|
|
567
|
-
return result;
|
|
702
|
+
async function readSessionPid() {
|
|
703
|
+
const token = getToken();
|
|
704
|
+
if (!token || !getFingerprintEnabled()) return null;
|
|
705
|
+
const pid = await waitForPid(token);
|
|
706
|
+
return pid ? {
|
|
707
|
+
visitorId: pid.hash,
|
|
708
|
+
algorithmName: pid.algorithmName,
|
|
709
|
+
algorithmVersion: pid.algorithmVersion
|
|
710
|
+
} : null;
|
|
568
711
|
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
cachedIp = "";
|
|
580
|
-
return "";
|
|
581
|
-
} finally {
|
|
582
|
-
inFlightLookup = void 0;
|
|
583
|
-
}
|
|
584
|
-
})();
|
|
585
|
-
return inFlightLookup;
|
|
712
|
+
async function waitForPid(token) {
|
|
713
|
+
const timer = BrowserTimerProvider.getInstance();
|
|
714
|
+
let timeout;
|
|
715
|
+
const timedOut = new Promise((resolve) => {
|
|
716
|
+
timeout = timer.setTimeout(() => resolve(null), PID_WAIT_MS);
|
|
717
|
+
});
|
|
718
|
+
try {
|
|
719
|
+
return await Promise.race([incodeDeviceHashWaiter.waitFor(token), timedOut]);
|
|
720
|
+
} finally {
|
|
721
|
+
if (timeout !== void 0) timer.clearTimeout(timeout);
|
|
586
722
|
}
|
|
587
|
-
};
|
|
588
|
-
//#endregion
|
|
589
|
-
//#region src/internal/fingerprint/fingerprintApi.ts
|
|
590
|
-
async function getFingerprint(disableIpify) {
|
|
591
|
-
const shouldDisableIpify = disableIpify ?? getDisableIpify();
|
|
592
|
-
return new FingerprintProvider(new IpifyProvider()).getFingerprint(shouldDisableIpify);
|
|
593
723
|
}
|
|
594
724
|
//#endregion
|
|
595
725
|
//#region src/internal/device/hasLiedBrowser.ts
|
|
@@ -657,29 +787,39 @@ function formatBrowser(browser) {
|
|
|
657
787
|
if (!browser.name || !browser.version) return "Unknown";
|
|
658
788
|
return `${browser.name} ${browser.version}`;
|
|
659
789
|
}
|
|
790
|
+
/**
|
|
791
|
+
* The session's activation post: device data (IP, browser, OS) and, when it
|
|
792
|
+
* arrives in time, the pid as the device hash. Mandatory consent rides on its
|
|
793
|
+
* response.
|
|
794
|
+
*/
|
|
660
795
|
async function submitDeviceFingerprint(options = {}, dependencies) {
|
|
661
796
|
const { disableIpify = false, hostingApp, signal } = options;
|
|
662
797
|
const token = getToken();
|
|
663
|
-
const
|
|
798
|
+
const [deviceInfo, ip, deviceHash] = await Promise.all([
|
|
799
|
+
getDeviceFingerprintInfo(),
|
|
800
|
+
disableIpify ? Promise.resolve("") : dependencies.ipLookup.getIp(),
|
|
801
|
+
dependencies.getDeviceHash?.() ?? null
|
|
802
|
+
]);
|
|
664
803
|
if (getToken() !== token || dependencies.isCurrentSession?.() === false) throw new Error("Session changed during fingerprint collection");
|
|
665
804
|
const hasLiedBrowser = isBrowserSimulation(dependencies.browserEnv);
|
|
666
805
|
const payload = {
|
|
667
|
-
hash:
|
|
668
|
-
ip
|
|
669
|
-
deviceType:
|
|
670
|
-
data: JSON.stringify(
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
806
|
+
hash: deviceHash?.hash ?? "",
|
|
807
|
+
ip,
|
|
808
|
+
deviceType: SDK_PLATFORM,
|
|
809
|
+
data: JSON.stringify({
|
|
810
|
+
ip,
|
|
811
|
+
deviceInfo
|
|
812
|
+
}),
|
|
813
|
+
osVersion: formatOsVersion(deviceInfo.os),
|
|
814
|
+
deviceModel: deviceInfo.device.model || "",
|
|
815
|
+
browser: formatBrowser(deviceInfo.browser),
|
|
674
816
|
hasLiedBrowser,
|
|
675
817
|
sdkVersion: SDK_VERSION,
|
|
676
818
|
hostingApp: hostingApp ?? "Web SDK",
|
|
677
|
-
algorithmName:
|
|
678
|
-
algorithmVersion:
|
|
819
|
+
algorithmName: deviceHash?.algorithmName,
|
|
820
|
+
algorithmVersion: deviceHash?.algorithmVersion
|
|
679
821
|
};
|
|
680
|
-
|
|
681
|
-
if (!response.ok) throw new Error(`Failed to submit fingerprint: ${response.status} ${response.statusText}`);
|
|
682
|
-
return response.data;
|
|
822
|
+
return (await api.post(endpoints.deviceFingerprint, payload, { signal })).data;
|
|
683
823
|
}
|
|
684
824
|
//#endregion
|
|
685
825
|
//#region src/internal/session/standaloneFlowPolicy.ts
|
|
@@ -718,6 +858,8 @@ let cachedDisableIpify = false;
|
|
|
718
858
|
let clientIpLookupEnabled = true;
|
|
719
859
|
let clientFingerprintEnabled = true;
|
|
720
860
|
let clientHostingApp;
|
|
861
|
+
let clientWasmConfig;
|
|
862
|
+
let clientWasmDisabled = false;
|
|
721
863
|
function setClientIpLookupEnabled(enabled) {
|
|
722
864
|
clientIpLookupEnabled = enabled;
|
|
723
865
|
}
|
|
@@ -735,6 +877,69 @@ function setClientFingerprintEnabled(enabled) {
|
|
|
735
877
|
clientFingerprintEnabled = enabled;
|
|
736
878
|
fingerprintSignalsReporter.setEnabled(enabled);
|
|
737
879
|
}
|
|
880
|
+
/**
|
|
881
|
+
* The known WASM config: from `setup({ wasm })`, `setWasmConfig`, or
|
|
882
|
+
* `<incode-flow>` / `<incode-workflow>`, which pass the config their captures
|
|
883
|
+
* load. Activation loads the WASM runtime only when it is known, so headless
|
|
884
|
+
* hosts that never configured WASM don't download it.
|
|
885
|
+
*/
|
|
886
|
+
function setClientWasmConfig(config) {
|
|
887
|
+
clientWasmConfig = config;
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* `setup({ wasm: false })`: activations load no WASM runtime, so their post
|
|
891
|
+
* sends no device hash, until `setup({ wasm })` or `reset()`.
|
|
892
|
+
*/
|
|
893
|
+
function setClientWasmDisabled(disabled) {
|
|
894
|
+
clientWasmDisabled = disabled;
|
|
895
|
+
}
|
|
896
|
+
/** Why this activation's post won't wait for a pid, if it won't. */
|
|
897
|
+
function deviceHashSkipReason(activationOptedOut) {
|
|
898
|
+
if (activationOptedOut || clientWasmDisabled) return "wasmDisabled";
|
|
899
|
+
return clientWasmConfig || isTRIStarted() ? void 0 : "noWasmConfig";
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* TRI first: TRI's fpSignals PID is signed with the same key as the runtime's
|
|
903
|
+
* (old signing format, so one string serves every session), so it goes to
|
|
904
|
+
* user-service unchanged as this session's PID and no runtime starts for it.
|
|
905
|
+
* Without a pid back (fpSignals off, blocked or timed out, or a step-up after
|
|
906
|
+
* the tenant's replay window, 11,100 s by default) the runtime starts for the
|
|
907
|
+
* pid as before. Needs TRI's signed `getFpSignals()`: an older TRI's string is
|
|
908
|
+
* unsigned, so user-service returns no pid and the runtime is used.
|
|
909
|
+
*/
|
|
910
|
+
function startSessionPid(token, config) {
|
|
911
|
+
if (!isTRIStarted()) {
|
|
912
|
+
if (config) startSessionWasm(token, config);
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
fingerprintSignalsReporter.sendHostPid(token, async () => (await readTRIFpSignals())?.pid ?? null).then((sent) => {
|
|
916
|
+
if (sent || getToken() !== token) return;
|
|
917
|
+
if (config) startSessionWasm(token, config);
|
|
918
|
+
else incodeDeviceHashWaiter.settle(token, null);
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Starts the WASM runtime, without models, so the PID signal can return the
|
|
923
|
+
* pid while activation runs: it is the device hash of the activation post.
|
|
924
|
+
* Capture modules add their pipelines later. A runtime that fails to start
|
|
925
|
+
* ends the post's wait at once.
|
|
926
|
+
*/
|
|
927
|
+
function startSessionWasm(token, config) {
|
|
928
|
+
(async () => {
|
|
929
|
+
try {
|
|
930
|
+
const warmupModule = await import("./warmup-ClZxXOkg.esm.js").then((n) => n.c);
|
|
931
|
+
const warmup = warmupModule.warmupWasm({
|
|
932
|
+
...config,
|
|
933
|
+
pipelines: []
|
|
934
|
+
});
|
|
935
|
+
warmup.catch(() => void 0);
|
|
936
|
+
await Promise.race([warmup, warmupModule.whenWasmRuntimeReady()]);
|
|
937
|
+
fingerprintSignalsReporter.onWasmReady();
|
|
938
|
+
} catch {
|
|
939
|
+
incodeDeviceHashWaiter.settle(token, null);
|
|
940
|
+
}
|
|
941
|
+
})();
|
|
942
|
+
}
|
|
738
943
|
function resolveDisableIpify(serverDisableIpify) {
|
|
739
944
|
return !clientIpLookupEnabled || serverDisableIpify;
|
|
740
945
|
}
|
|
@@ -772,6 +977,14 @@ function createFingerprintSettled() {
|
|
|
772
977
|
function whenSessionFingerprintSettled() {
|
|
773
978
|
return fingerprintSettled?.promise ?? Promise.resolve(cachedFingerprintResult);
|
|
774
979
|
}
|
|
980
|
+
/** Best-effort: the reset must never fail session teardown. */
|
|
981
|
+
function resetModuleDeepsightConfig() {
|
|
982
|
+
try {
|
|
983
|
+
resetWasmDeepsightConfigSync();
|
|
984
|
+
} catch (error) {
|
|
985
|
+
trueSightLog("warning", "session", "orchestration", `deepsight config not reset error=${String(error)}`);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
775
988
|
/**
|
|
776
989
|
* Activates a session by setting the auth token on the HTTP client and
|
|
777
990
|
* preloading session-scoped state.
|
|
@@ -802,7 +1015,7 @@ function whenSessionFingerprintSettled() {
|
|
|
802
1015
|
* ```
|
|
803
1016
|
*/
|
|
804
1017
|
async function initializeSession(options = {}) {
|
|
805
|
-
const { token, hostingApp = clientHostingApp, signal, preloadFlow, awaitFingerprint = true } = options;
|
|
1018
|
+
const { token, hostingApp = clientHostingApp, signal, preloadFlow, awaitFingerprint = true, wasm } = options;
|
|
806
1019
|
let triLinkPromise = Promise.resolve();
|
|
807
1020
|
if (token !== void 0 && token !== getToken()) {
|
|
808
1021
|
setToken(token);
|
|
@@ -835,14 +1048,16 @@ async function initializeSession(options = {}) {
|
|
|
835
1048
|
}
|
|
836
1049
|
const settled = createFingerprintSettled();
|
|
837
1050
|
fingerprintSettled = settled;
|
|
838
|
-
const
|
|
839
|
-
|
|
1051
|
+
const fingerprintEnabled = clientFingerprintEnabled;
|
|
1052
|
+
const activeToken = getToken();
|
|
1053
|
+
const skipReason = deviceHashSkipReason(wasm === false);
|
|
1054
|
+
if (activeToken && fingerprintEnabled && !skipReason) startSessionPid(activeToken, clientWasmConfig);
|
|
840
1055
|
let fingerprintPromise;
|
|
841
1056
|
sessionInitPromise = (async () => {
|
|
842
1057
|
let features;
|
|
843
1058
|
let serverDisableIpify = false;
|
|
844
1059
|
try {
|
|
845
|
-
features = await fetchFeatureConfig(signal);
|
|
1060
|
+
features = await retryAfterReconnect(() => fetchFeatureConfig(signal), signal);
|
|
846
1061
|
serverDisableIpify = isFeatureEnabled("DISABLE_IPIFY", features.features);
|
|
847
1062
|
startTrueSightCollection(features);
|
|
848
1063
|
} catch {
|
|
@@ -851,16 +1066,16 @@ async function initializeSession(options = {}) {
|
|
|
851
1066
|
startTrueSightCollection();
|
|
852
1067
|
}
|
|
853
1068
|
const disableIpify = resolveDisableIpify(serverDisableIpify);
|
|
1069
|
+
fingerprintPromise = submitSessionFingerprint(fingerprintEnabled, {
|
|
1070
|
+
disableIpify,
|
|
1071
|
+
hostingApp,
|
|
1072
|
+
signal
|
|
1073
|
+
}, settled, skipReason);
|
|
854
1074
|
const preloadedFlow = await flowPreloadPromise;
|
|
855
1075
|
await updateFeatureManagementUser({ customIDs: {
|
|
856
1076
|
hashed_onboarding_id: features.sessionIdentifier || void 0,
|
|
857
1077
|
flow_id: preloadedFlow?.flowId
|
|
858
1078
|
} });
|
|
859
|
-
fingerprintPromise = submitSessionFingerprint(fingerprintProvider, {
|
|
860
|
-
disableIpify,
|
|
861
|
-
hostingApp,
|
|
862
|
-
signal
|
|
863
|
-
}, settled);
|
|
864
1079
|
try {
|
|
865
1080
|
const browserInfo = new BrowserInfoProvider().getBrowserInfo();
|
|
866
1081
|
const language = new BrowserEnvironmentProvider().getNavigatorProperty("language");
|
|
@@ -910,25 +1125,42 @@ async function initializeSession(options = {}) {
|
|
|
910
1125
|
* while it still belongs to the current activation (a token change resets
|
|
911
1126
|
* `fingerprintSettled`) and always settles the waiter.
|
|
912
1127
|
*/
|
|
913
|
-
async function submitSessionFingerprint(
|
|
1128
|
+
async function submitSessionFingerprint(enabled, options, settled, skipReason) {
|
|
914
1129
|
const isCurrent = () => fingerprintSettled === settled;
|
|
1130
|
+
const token = getToken();
|
|
1131
|
+
const startedAtMs = getTimestamp();
|
|
1132
|
+
let outcomeLogged = false;
|
|
1133
|
+
const logOutcome = (outcome) => {
|
|
1134
|
+
if (!outcomeLogged) {
|
|
1135
|
+
outcomeLogged = true;
|
|
1136
|
+
trueSightLog("info", "session", "other", `device hash ${outcome}`);
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1139
|
+
const getDeviceHash = !skipReason && token ? async () => {
|
|
1140
|
+
const deviceHash = await incodeDeviceHashWaiter.waitFor(token);
|
|
1141
|
+
logOutcome(`${deviceHash ? "sent" : "missing"} waitMs=${getTimestamp() - startedAtMs}`);
|
|
1142
|
+
return deviceHash;
|
|
1143
|
+
} : void 0;
|
|
915
1144
|
try {
|
|
916
|
-
if (
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1145
|
+
if (enabled) {
|
|
1146
|
+
if (skipReason) logOutcome(`skipped reason=${skipReason}`);
|
|
1147
|
+
try {
|
|
1148
|
+
const result = await retryAfterReconnect(() => submitDeviceFingerprint(options, {
|
|
1149
|
+
ipLookup: new IpifyProvider(),
|
|
1150
|
+
browserEnv: new BrowserEnvironmentProvider(),
|
|
1151
|
+
isCurrentSession: isCurrent,
|
|
1152
|
+
getDeviceHash
|
|
1153
|
+
}), options.signal);
|
|
1154
|
+
if (isCurrent()) {
|
|
1155
|
+
cachedFingerprintResult = result;
|
|
1156
|
+
cachedFingerprintSuccess = true;
|
|
1157
|
+
flushDeviceStatsQueue();
|
|
1158
|
+
}
|
|
1159
|
+
} catch (error) {
|
|
1160
|
+
console.warn("Failed to submit device fingerprint:", error);
|
|
1161
|
+
trueSightLog("warning", "session", "other", "device fingerprint submit failed");
|
|
926
1162
|
}
|
|
927
|
-
}
|
|
928
|
-
console.warn("Failed to submit device fingerprint:", error);
|
|
929
|
-
trueSightLog("warning", "session", "other", "device fingerprint submit failed");
|
|
930
|
-
}
|
|
931
|
-
else if (isCurrent()) flushDeviceStatsQueue();
|
|
1163
|
+
} else if (isCurrent()) flushDeviceStatsQueue();
|
|
932
1164
|
} finally {
|
|
933
1165
|
settled.resolve(isCurrent() ? cachedFingerprintResult : void 0);
|
|
934
1166
|
}
|
|
@@ -957,7 +1189,9 @@ function getFingerprintEnabled() {
|
|
|
957
1189
|
* Useful for testing or when starting a new session.
|
|
958
1190
|
*/
|
|
959
1191
|
function resetSessionInit() {
|
|
1192
|
+
resetModuleDeepsightConfig();
|
|
960
1193
|
fingerprintSignalsReporter.resetSession();
|
|
1194
|
+
incodeDeviceHashWaiter.reset();
|
|
961
1195
|
sessionInitialized = false;
|
|
962
1196
|
cachedFeatures = null;
|
|
963
1197
|
cachedDisableIpify = false;
|
|
@@ -970,4 +1204,4 @@ function resetSessionInit() {
|
|
|
970
1204
|
resetDeviceStatsQueue();
|
|
971
1205
|
}
|
|
972
1206
|
//#endregion
|
|
973
|
-
export {
|
|
1207
|
+
export { SDK_PLATFORM as C, fingerprintSignalsReporter as S, isBrowserSimulation as _, resetSessionInit as a, IpifyProvider as b, setClientIpLookupEnabled as c, whenSessionFingerprintSettled as d, getStandaloneFlowPolicy as f, setStandaloneFlowPolicy as g, resolveStandaloneFlowPolicy as h, initializeSession as i, setClientWasmConfig as l, resetStandaloneFlowPolicy as m, getFingerprintEnabled as n, setClientFingerprintEnabled as o, registerFlowPreloader as p, getSessionFingerprintResult as r, setClientHostingApp as s, getDisableIpify as t, setClientWasmDisabled as u, getFingerprint as v, BrowserEnvironmentProvider as x, getDeviceFingerprintInfo as y };
|