@incodetech/core 0.0.0-dev-20261029-4549e47f → 0.0.0-dev-20261029-ab9a031d
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/{FaceDetectionProvider-3B7fUYME.esm.js → FaceDetectionProvider-BPw6Sztf.esm.js} +7 -7
- package/dist/{WasmUtilProvider-BmtXHqwK.esm.js → WasmUtilProvider-DqtPEKsY.esm.js} +5 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-DfAHobE4.esm.js → apiError-DT3rvcZJ.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-CC67pNoL.d.ts → authenticationManager-BPpSImsv.d.ts} +1 -1
- package/dist/{authenticationManager-MOUMpv0i.esm.js → authenticationManager-SVrl1zgN.esm.js} +4 -4
- package/dist/{authenticationStateMachine-VF200fHF.esm.js → authenticationStateMachine-BS1iPaFn.esm.js} +3 -3
- package/dist/camera.esm.js +1 -1
- package/dist/cnpj-Co1ottYN.esm.js +77 -0
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-BQ6BKInw.d.ts → consentManager-Cegv5Kth.d.ts} +12 -12
- package/dist/{createCameraCycleOwnership-EMOiqj48.esm.js → createCameraCycleOwnership-c3noNWxH.esm.js} +1 -1
- package/dist/curp-validation.d.ts +1 -1
- package/dist/{curpValidationManager-HRSYsugw.d.ts → curpValidationManager-CpmlWHkv.d.ts} +1 -1
- package/dist/{deepsightLoader-BRIf9bdH.esm.js → deepsightLoader-Dvcd1yov.esm.js} +6 -6
- package/dist/{deepsightService-B2kZtVtE.esm.js → deepsightService-CXrhNb9c.esm.js} +1 -1
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-B4E3Pgl9.esm.js → documentCaptureManager-DuITDiyf.esm.js} +1 -1
- package/dist/{documentCaptureStateMachine-M_jFgj_c.esm.js → documentCaptureStateMachine-C9uhv5g5.esm.js} +2 -2
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-9kwY8Bf5.d.ts} +1 -1
- package/dist/{dynamicFormsManager-D1q6py8K.esm.js → dynamicFormsManager-CuxtO7jB.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-CTUvietg.esm.js → dynamicFormsStateMachine-C4yVGxpH.esm.js} +1 -1
- package/dist/ekyb.d.ts +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-xo2wOfZ3.esm.js → ekybManager-DZ0ksIav.esm.js} +1 -1
- package/dist/{ekybStateMachine-BiYuYpLh.esm.js → ekybStateMachine-L7ZHcHvF.esm.js} +2 -30
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-DawHPSFr.esm.js → electronicSignatureManager-ROM4Plhh.esm.js} +1 -1
- package/dist/extensibility.d.ts +11 -11
- package/dist/extensibility.esm.js +13 -13
- package/dist/{faceCaptureManagerFactory-zqryGnj6.esm.js → faceCaptureManagerFactory-CUBuV__c.esm.js} +3 -3
- package/dist/{faceCaptureManagerFactory-vchnR2CA.d.ts → faceCaptureManagerFactory-DER3G7QA.d.ts} +3 -3
- package/dist/{faceCaptureSetup-B8TaHy7d.esm.js → faceCaptureSetup-BrkJNhcx.esm.js} +6 -6
- package/dist/{feature-management-DnxqsfNa.esm.js → feature-management-BqM3DDh5.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +6 -6
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-BDm9m8t6.esm.js → flowCompletionService-CCnpKFwV.esm.js} +1 -1
- package/dist/{flowServices-laW5iMbd.esm.js → flowServices-Bc07mt2O.esm.js} +6 -48
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-C7pGYdJ6.esm.js → geolocationManager-BApTeGjv.esm.js} +1 -1
- package/dist/{geolocationStateMachine-BGBLAIne.esm.js → geolocationStateMachine-BvJqeBfE.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +8 -8
- package/dist/id.d.ts +2 -2
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureDefaults-DP06AgjJ.esm.js → idCaptureDefaults-Bf57Ll9V.esm.js} +2 -2
- package/dist/{idCaptureManager-D08q23Mr.esm.js → idCaptureManager-C05md8rp.esm.js} +5 -5
- package/dist/{idCaptureManager-7n59S4Fc.d.ts → idCaptureManager-C74EPLTw.d.ts} +2 -2
- package/dist/{idCaptureServices-BD3v9edY.esm.js → idCaptureServices-CBLzfhvC.esm.js} +4 -4
- package/dist/{idCaptureStateMachine-BD_pEwVO.esm.js → idCaptureStateMachine-BWjnqb5C.esm.js} +84 -16
- package/dist/{index-tLPVy1zj.d.ts → index-BSf46iwq.d.ts} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/{mandatoryConsentManager-B1WidW8w.d.ts → mandatoryConsentManager-CEOyGn4H.d.ts} +7 -7
- package/dist/{permissionGuards-DJkhXYNj.esm.js → permissionGuards-CL5GLmDp.esm.js} +1 -1
- package/dist/{permissionServices-DXlzBQ7G.esm.js → permissionServices-DJyei2yK.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{runChildModule-C2mw_TMD.esm.js → runChildModule-BntL2Brs.esm.js} +1 -1
- package/dist/{sdkVersion-B5tBv0Hp.esm.js → sdkVersion-BruWW52r.esm.js} +1 -1
- package/dist/selfie.d.ts +3 -3
- package/dist/selfie.esm.js +8 -8
- package/dist/{selfieErrorUtils-Sp0VcxB1.esm.js → selfieErrorUtils-FzSnBvLY.esm.js} +1 -1
- package/dist/{selfieManager-BtjTvMOg.esm.js → selfieManager-DuOwQuxL.esm.js} +4 -4
- package/dist/{selfieManager-ClCgI2fn.d.ts → selfieManager-vEXd5SHA.d.ts} +1 -1
- package/dist/{selfieStateMachine-B8I8Dvez.esm.js → selfieStateMachine-3s-ydjDp.esm.js} +3 -3
- package/dist/{session-C88PQz0B.esm.js → session-CHr7fZVV.esm.js} +3 -3
- package/dist/session.d.ts +10 -2
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-Di-5i9ip.esm.js → sessionInitializer-1QwlJLQ3.esm.js} +261 -104
- package/dist/{setup-q6QhQRkI.esm.js → setup-DAOCrvRl.esm.js} +16 -11
- package/dist/{trueSightService-DCa_x3yL.esm.js → trueSightService-D7F7hn4q.esm.js} +1 -1
- package/dist/types-B9C8W01q.d.ts +34 -0
- package/dist/{types-DJBn6wVV.d.ts → types-Bqj4SDHk.d.ts} +1 -1
- package/dist/{types-ClQspDyT.d.ts → types-BzuFtfjm.d.ts} +1 -1
- package/dist/{types-GbGmnFsh.d.ts → types-CEuM1Qph.d.ts} +1 -1
- package/dist/{types-tsXa6u2J.d.ts → types-CK0dj_Vu.d.ts} +2 -1
- package/dist/{types-DPGYNu5C.d.ts → types-iF96ENvX.d.ts} +3 -3
- package/dist/types-qs9PgHtG.d.ts +6 -0
- package/dist/video-selfie.d.ts +1 -1
- package/dist/video-selfie.esm.js +4 -4
- package/dist/{videoSelfieCameraWarmer-Dfthbl1b.esm.js → videoSelfieCameraWarmer-D4exP4rK.esm.js} +5 -5
- package/dist/{videoSelfieStepDetector-NTgtiQJp.d.ts → videoSelfieStepDetector-B2bakrqI.d.ts} +2 -2
- package/dist/{warmup-CH_bd9h8.esm.js → warmup-D-Y2iAoP.esm.js} +28 -2
- package/dist/wasm.esm.js +2 -2
- package/dist/{wasmDsFlagSync-Co_fMpyM.esm.js → wasmDsFlagSync-CWvvmM2E.esm.js} +1 -1
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts} +54 -18
- package/dist/{watchlistForBusinessManager-UD1i94xo.esm.js → watchlistForBusinessManager-PKTQ09-2.esm.js} +36 -6
- package/dist/watchlistForBusinessStateMachine-CBgJuLJC.esm.js +166 -0
- package/dist/workflow.d.ts +5 -5
- package/dist/workflow.esm.js +16 -16
- package/package.json +1 -1
- package/dist/types-Cp_84WIM.d.ts +0 -6
- package/dist/watchlistForBusinessStateMachine-CQXOjGhS.esm.js +0 -78
- /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
1
2
|
import { C as subscribeEvent, b as getAnalyticsBatcher, y as addEvent } from "./events-Dh1gMk0J.esm.js";
|
|
2
3
|
import { c as setToken, r as getToken, t as api, u as endpoints } from "./api-BG98lkot.esm.js";
|
|
3
|
-
import { C as noteTokenActivated, _ as isFeatureEnabled, b as noteEnvironment, c as startTrueSightCollection, g as fetchFeatureConfig, u as trueSightLog, v as resetFeatureConfigCache } from "./trueSightService-
|
|
4
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
5
|
-
import {
|
|
4
|
+
import { C as noteTokenActivated, _ as isFeatureEnabled, b as noteEnvironment, c as startTrueSightCollection, g as fetchFeatureConfig, u as trueSightLog, v as resetFeatureConfigCache } from "./trueSightService-D7F7hn4q.esm.js";
|
|
5
|
+
import { t as SDK_VERSION } from "./sdkVersion-BruWW52r.esm.js";
|
|
6
|
+
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
7
|
+
import { E as updateFeatureManagementUser } from "./feature-management-BqM3DDh5.esm.js";
|
|
6
8
|
import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-D3Cxg6PL.esm.js";
|
|
7
9
|
import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
|
|
8
10
|
import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
|
|
@@ -10,15 +12,74 @@ import { a as isIOS } from "./platform-DkcRc9JV.esm.js";
|
|
|
10
12
|
import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
|
|
11
13
|
import { i as linkSessionWithTRI, r as isTRIStarted } from "./tri-xzRLIIMN.esm.js";
|
|
12
14
|
import { i as retryAfterReconnect } from "./connectivity-HSl0diCx.esm.js";
|
|
15
|
+
//#region src/internal/fingerprint/incodeDeviceHash.ts
|
|
16
|
+
function isNonEmptyString(value) {
|
|
17
|
+
return typeof value === "string" && value.trim() !== "";
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Reads the device hash from a PID signal response. The SDK never pairs a
|
|
21
|
+
* hash with an algorithm user-service didn't name, so all three fields must be
|
|
22
|
+
* present.
|
|
23
|
+
*/
|
|
24
|
+
function readIncodeDeviceHash(data) {
|
|
25
|
+
if (typeof data !== "object" || data === null) return null;
|
|
26
|
+
const { deviceHash, algorithmName, algorithmVersion } = data;
|
|
27
|
+
if (!isNonEmptyString(deviceHash) || !isNonEmptyString(algorithmName) || !isNonEmptyString(algorithmVersion)) return null;
|
|
28
|
+
return {
|
|
29
|
+
hash: deviceHash,
|
|
30
|
+
algorithmName,
|
|
31
|
+
algorithmVersion
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function createIncodeDeviceHashWaiter(timer) {
|
|
35
|
+
const pendingByToken = /* @__PURE__ */ new Map();
|
|
36
|
+
function pendingFor(token) {
|
|
37
|
+
let pending = pendingByToken.get(token);
|
|
38
|
+
if (!pending) {
|
|
39
|
+
let settle = () => void 0;
|
|
40
|
+
pending = {
|
|
41
|
+
deviceHash: new Promise((resolve) => {
|
|
42
|
+
settle = resolve;
|
|
43
|
+
}),
|
|
44
|
+
settle
|
|
45
|
+
};
|
|
46
|
+
pendingByToken.set(token, pending);
|
|
47
|
+
}
|
|
48
|
+
return pending;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
settle(token, deviceHash) {
|
|
52
|
+
pendingFor(token).settle(deviceHash);
|
|
53
|
+
},
|
|
54
|
+
async waitFor(token, timeoutMs) {
|
|
55
|
+
let timeout;
|
|
56
|
+
const timedOut = new Promise((resolve) => {
|
|
57
|
+
timeout = timer.setTimeout(() => resolve(null), Math.max(0, timeoutMs));
|
|
58
|
+
});
|
|
59
|
+
try {
|
|
60
|
+
return await Promise.race([pendingFor(token).deviceHash, timedOut]);
|
|
61
|
+
} finally {
|
|
62
|
+
if (timeout !== void 0) timer.clearTimeout(timeout);
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
reset() {
|
|
66
|
+
pendingByToken.forEach((pending) => pending.settle(null));
|
|
67
|
+
pendingByToken.clear();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const incodeDeviceHashWaiter = createIncodeDeviceHashWaiter(BrowserTimerProvider.getInstance());
|
|
72
|
+
//#endregion
|
|
13
73
|
//#region src/internal/fingerprint/fingerprintSignalsReporter.ts
|
|
14
74
|
const START_INTERVIEW_EVENT = "modelLoadEnd";
|
|
15
75
|
const CAPTURE_INTERVIEW_EVENT = "captureAttemptFinished";
|
|
16
|
-
const START_SIGNALS = ["
|
|
76
|
+
const START_SIGNALS = ["device"];
|
|
17
77
|
function createFingerprintSignalsReporter(deps) {
|
|
18
78
|
let enabled = true;
|
|
19
79
|
let sessionActive = false;
|
|
20
80
|
let wasmReady = false;
|
|
21
81
|
let started = false;
|
|
82
|
+
let pidStarted = false;
|
|
22
83
|
let pendingStartSignals = START_SIGNALS;
|
|
23
84
|
let prefetchStarted = false;
|
|
24
85
|
let deviceDataUpdated = true;
|
|
@@ -35,13 +96,23 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
35
96
|
});
|
|
36
97
|
}
|
|
37
98
|
async function send(token, interviewEvent, type) {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
99
|
+
const isPid = type === "pid";
|
|
100
|
+
let deviceHash = null;
|
|
101
|
+
try {
|
|
102
|
+
const metadata = await (await deps.getWasmUtil()).getFingerprintSignals(type);
|
|
103
|
+
if (!metadata || deps.getToken() !== token) return;
|
|
104
|
+
const response = await deps.post(endpoints.deviceFingerprintSignals, isPid ? {
|
|
105
|
+
interviewEvent,
|
|
106
|
+
metadata,
|
|
107
|
+
deviceHashRequested: true
|
|
108
|
+
} : {
|
|
109
|
+
interviewEvent,
|
|
110
|
+
metadata
|
|
111
|
+
}, { "X-Incode-Hardware-Id": token });
|
|
112
|
+
deviceHash = isPid && enabled ? readIncodeDeviceHash(response) : null;
|
|
113
|
+
} finally {
|
|
114
|
+
if (isPid) deps.onDeviceHash(token, deviceHash);
|
|
115
|
+
}
|
|
45
116
|
}
|
|
46
117
|
/**
|
|
47
118
|
* Sends `types` in order and stops at the first failure. Resolves to the
|
|
@@ -99,6 +170,7 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
99
170
|
if (!token) return;
|
|
100
171
|
startPrefetch();
|
|
101
172
|
if (optInPending) enqueue(applyNativeOptIn);
|
|
173
|
+
startPid(token);
|
|
102
174
|
if (started || !sessionActive) return;
|
|
103
175
|
started = true;
|
|
104
176
|
ensureSubscribed();
|
|
@@ -118,6 +190,18 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
118
190
|
if (unsent.length > 0) allowRetry(unsent);
|
|
119
191
|
});
|
|
120
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* PID goes ahead of activation: the activation post waits for the pid. It is
|
|
195
|
+
* queued before DEVICE, so it still precedes it.
|
|
196
|
+
*/
|
|
197
|
+
function startPid(token) {
|
|
198
|
+
if (pidStarted) return;
|
|
199
|
+
pidStarted = true;
|
|
200
|
+
const pidGeneration = generation;
|
|
201
|
+
enqueue(async () => {
|
|
202
|
+
if ((await sendAll(token, START_INTERVIEW_EVENT, ["pid"])).length > 0 && pidGeneration === generation) pidStarted = false;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
121
205
|
function onCaptureAttemptFinished() {
|
|
122
206
|
wasmReady = true;
|
|
123
207
|
tryStart();
|
|
@@ -143,6 +227,7 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
143
227
|
generation += 1;
|
|
144
228
|
sessionActive = false;
|
|
145
229
|
started = false;
|
|
230
|
+
pidStarted = false;
|
|
146
231
|
pendingStartSignals = START_SIGNALS;
|
|
147
232
|
optInPending = false;
|
|
148
233
|
deviceDataUpdated = true;
|
|
@@ -187,11 +272,12 @@ function createFingerprintSignalsReporter(deps) {
|
|
|
187
272
|
}
|
|
188
273
|
const fingerprintSignalsReporter = createFingerprintSignalsReporter({
|
|
189
274
|
getWasmUtil: async () => {
|
|
190
|
-
const { WasmUtilProvider } = await import("./WasmUtilProvider-
|
|
275
|
+
const { WasmUtilProvider } = await import("./WasmUtilProvider-DqtPEKsY.esm.js").then((n) => n.n);
|
|
191
276
|
return WasmUtilProvider.getInstance();
|
|
192
277
|
},
|
|
193
278
|
getToken: () => getToken(),
|
|
194
|
-
post: (url, body, headers) => api.post(url, body, { headers }),
|
|
279
|
+
post: async (url, body, headers) => (await api.post(url, body, { headers })).data,
|
|
280
|
+
onDeviceHash: (token, deviceHash) => incodeDeviceHashWaiter.settle(token, deviceHash),
|
|
195
281
|
subscribe: (listener) => subscribeEvent(listener),
|
|
196
282
|
reportFailure: ({ message, signalsType, interviewEvent }) => trueSightLog("warning", "wasm", "other", `fingerprint signals failed type=${signalsType} event=${interviewEvent} error=${message}`)
|
|
197
283
|
});
|
|
@@ -329,6 +415,55 @@ var BrowserInfoProvider = class {
|
|
|
329
415
|
}
|
|
330
416
|
};
|
|
331
417
|
//#endregion
|
|
418
|
+
//#region ../infra/src/providers/browser/IpifyProvider.ts
|
|
419
|
+
let cachedIp;
|
|
420
|
+
let inFlightLookup;
|
|
421
|
+
/**
|
|
422
|
+
* Resets the module-level IP cache. Intended for tests and full session resets.
|
|
423
|
+
*/
|
|
424
|
+
function resetIpifyCache() {
|
|
425
|
+
cachedIp = void 0;
|
|
426
|
+
inFlightLookup = void 0;
|
|
427
|
+
}
|
|
428
|
+
async function fetchIpFromIpify() {
|
|
429
|
+
if (typeof fetch === "undefined") return "";
|
|
430
|
+
let timeoutId = 0;
|
|
431
|
+
const controller = new AbortController();
|
|
432
|
+
if (AbortSignal.timeout) {
|
|
433
|
+
const signal = AbortSignal.timeout(3e3);
|
|
434
|
+
return (await (await fetch("https://api.ipify.org?format=json", { signal })).json()).ip;
|
|
435
|
+
}
|
|
436
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
437
|
+
timeoutId = setTimeout(() => {
|
|
438
|
+
controller.abort();
|
|
439
|
+
reject(/* @__PURE__ */ new Error("Request timeout"));
|
|
440
|
+
}, 3e3);
|
|
441
|
+
});
|
|
442
|
+
const fetchPromise = fetch("https://api.ipify.org?format=json", { signal: controller.signal }).then((res) => res.json()).then((data) => data.ip);
|
|
443
|
+
const result = await Promise.race([fetchPromise, timeoutPromise]);
|
|
444
|
+
clearTimeout(timeoutId);
|
|
445
|
+
return result;
|
|
446
|
+
}
|
|
447
|
+
var IpifyProvider = class {
|
|
448
|
+
async getIp() {
|
|
449
|
+
if (cachedIp !== void 0) return cachedIp;
|
|
450
|
+
if (inFlightLookup) return inFlightLookup;
|
|
451
|
+
inFlightLookup = (async () => {
|
|
452
|
+
try {
|
|
453
|
+
const ip = await fetchIpFromIpify();
|
|
454
|
+
cachedIp = ip;
|
|
455
|
+
return ip;
|
|
456
|
+
} catch {
|
|
457
|
+
cachedIp = "";
|
|
458
|
+
return "";
|
|
459
|
+
} finally {
|
|
460
|
+
inFlightLookup = void 0;
|
|
461
|
+
}
|
|
462
|
+
})();
|
|
463
|
+
return inFlightLookup;
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
//#endregion
|
|
332
467
|
//#region ../infra/src/device/getDeviceData.ts
|
|
333
468
|
const HIGH_ENTROPY_HINTS = /* @__PURE__ */ new Set([
|
|
334
469
|
"model",
|
|
@@ -516,18 +651,9 @@ var FingerprintProvider = class {
|
|
|
516
651
|
constructor(ipLookup) {
|
|
517
652
|
this.ipLookup = ipLookup;
|
|
518
653
|
}
|
|
519
|
-
prime() {
|
|
520
|
-
this.startVisitorId();
|
|
521
|
-
}
|
|
522
|
-
startVisitorId() {
|
|
523
|
-
if (!this.visitorIdPromise) {
|
|
524
|
-
this.visitorIdPromise = getThumbmarkId();
|
|
525
|
-
this.visitorIdPromise.catch(() => void 0);
|
|
526
|
-
}
|
|
527
|
-
return this.visitorIdPromise;
|
|
528
|
-
}
|
|
529
654
|
async getFingerprint(disableIpify = false) {
|
|
530
|
-
|
|
655
|
+
this.visitorIdPromise ??= getThumbmarkId();
|
|
656
|
+
const visitorId = await this.visitorIdPromise;
|
|
531
657
|
const [deviceInfo, ip] = await Promise.all([getDeviceFingerprintInfo(), disableIpify ? Promise.resolve("") : this.ipLookup.getIp()]);
|
|
532
658
|
return {
|
|
533
659
|
visitorId,
|
|
@@ -538,55 +664,6 @@ var FingerprintProvider = class {
|
|
|
538
664
|
}
|
|
539
665
|
};
|
|
540
666
|
//#endregion
|
|
541
|
-
//#region ../infra/src/providers/browser/IpifyProvider.ts
|
|
542
|
-
let cachedIp;
|
|
543
|
-
let inFlightLookup;
|
|
544
|
-
/**
|
|
545
|
-
* Resets the module-level IP cache. Intended for tests and full session resets.
|
|
546
|
-
*/
|
|
547
|
-
function resetIpifyCache() {
|
|
548
|
-
cachedIp = void 0;
|
|
549
|
-
inFlightLookup = void 0;
|
|
550
|
-
}
|
|
551
|
-
async function fetchIpFromIpify() {
|
|
552
|
-
if (typeof fetch === "undefined") return "";
|
|
553
|
-
let timeoutId = 0;
|
|
554
|
-
const controller = new AbortController();
|
|
555
|
-
if (AbortSignal.timeout) {
|
|
556
|
-
const signal = AbortSignal.timeout(3e3);
|
|
557
|
-
return (await (await fetch("https://api.ipify.org?format=json", { signal })).json()).ip;
|
|
558
|
-
}
|
|
559
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
560
|
-
timeoutId = setTimeout(() => {
|
|
561
|
-
controller.abort();
|
|
562
|
-
reject(/* @__PURE__ */ new Error("Request timeout"));
|
|
563
|
-
}, 3e3);
|
|
564
|
-
});
|
|
565
|
-
const fetchPromise = fetch("https://api.ipify.org?format=json", { signal: controller.signal }).then((res) => res.json()).then((data) => data.ip);
|
|
566
|
-
const result = await Promise.race([fetchPromise, timeoutPromise]);
|
|
567
|
-
clearTimeout(timeoutId);
|
|
568
|
-
return result;
|
|
569
|
-
}
|
|
570
|
-
var IpifyProvider = class {
|
|
571
|
-
async getIp() {
|
|
572
|
-
if (cachedIp !== void 0) return cachedIp;
|
|
573
|
-
if (inFlightLookup) return inFlightLookup;
|
|
574
|
-
inFlightLookup = (async () => {
|
|
575
|
-
try {
|
|
576
|
-
const ip = await fetchIpFromIpify();
|
|
577
|
-
cachedIp = ip;
|
|
578
|
-
return ip;
|
|
579
|
-
} catch {
|
|
580
|
-
cachedIp = "";
|
|
581
|
-
return "";
|
|
582
|
-
} finally {
|
|
583
|
-
inFlightLookup = void 0;
|
|
584
|
-
}
|
|
585
|
-
})();
|
|
586
|
-
return inFlightLookup;
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
//#endregion
|
|
590
667
|
//#region src/internal/fingerprint/fingerprintApi.ts
|
|
591
668
|
async function getFingerprint(disableIpify) {
|
|
592
669
|
const shouldDisableIpify = disableIpify ?? getDisableIpify();
|
|
@@ -658,25 +735,38 @@ function formatBrowser(browser) {
|
|
|
658
735
|
if (!browser.name || !browser.version) return "Unknown";
|
|
659
736
|
return `${browser.name} ${browser.version}`;
|
|
660
737
|
}
|
|
738
|
+
/**
|
|
739
|
+
* The session's activation post: device data (IP, browser, OS) and, when it
|
|
740
|
+
* arrives in time, the pid as the device hash. Mandatory consent rides on its
|
|
741
|
+
* response. ThumbmarkJS is not sent: its hash collides too often to identify a
|
|
742
|
+
* device.
|
|
743
|
+
*/
|
|
661
744
|
async function submitDeviceFingerprint(options = {}, dependencies) {
|
|
662
745
|
const { disableIpify = false, hostingApp, signal } = options;
|
|
663
746
|
const token = getToken();
|
|
664
|
-
const
|
|
747
|
+
const [deviceInfo, ip, deviceHash] = await Promise.all([
|
|
748
|
+
getDeviceFingerprintInfo(),
|
|
749
|
+
disableIpify ? Promise.resolve("") : dependencies.ipLookup.getIp(),
|
|
750
|
+
dependencies.getDeviceHash?.() ?? null
|
|
751
|
+
]);
|
|
665
752
|
if (getToken() !== token || dependencies.isCurrentSession?.() === false) throw new Error("Session changed during fingerprint collection");
|
|
666
753
|
const hasLiedBrowser = isBrowserSimulation(dependencies.browserEnv);
|
|
667
754
|
const payload = {
|
|
668
|
-
hash:
|
|
669
|
-
ip
|
|
755
|
+
hash: deviceHash?.hash ?? "",
|
|
756
|
+
ip,
|
|
670
757
|
deviceType: "WEBAPP",
|
|
671
|
-
data: JSON.stringify(
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
758
|
+
data: JSON.stringify({
|
|
759
|
+
ip,
|
|
760
|
+
deviceInfo
|
|
761
|
+
}),
|
|
762
|
+
osVersion: formatOsVersion(deviceInfo.os),
|
|
763
|
+
deviceModel: deviceInfo.device.model || "",
|
|
764
|
+
browser: formatBrowser(deviceInfo.browser),
|
|
675
765
|
hasLiedBrowser,
|
|
676
766
|
sdkVersion: SDK_VERSION,
|
|
677
767
|
hostingApp: hostingApp ?? "Web SDK",
|
|
678
|
-
algorithmName:
|
|
679
|
-
algorithmVersion:
|
|
768
|
+
algorithmName: deviceHash?.algorithmName,
|
|
769
|
+
algorithmVersion: deviceHash?.algorithmVersion
|
|
680
770
|
};
|
|
681
771
|
const response = await api.post(endpoints.deviceFingerprint, payload, { signal });
|
|
682
772
|
if (!response.ok) throw new Error(`Failed to submit fingerprint: ${response.status} ${response.statusText}`);
|
|
@@ -719,6 +809,9 @@ let cachedDisableIpify = false;
|
|
|
719
809
|
let clientIpLookupEnabled = true;
|
|
720
810
|
let clientFingerprintEnabled = true;
|
|
721
811
|
let clientHostingApp;
|
|
812
|
+
let clientWasmConfig;
|
|
813
|
+
let clientWasmDisabled = false;
|
|
814
|
+
const DEVICE_HASH_WAIT_MS = 3e3;
|
|
722
815
|
function setClientIpLookupEnabled(enabled) {
|
|
723
816
|
clientIpLookupEnabled = enabled;
|
|
724
817
|
}
|
|
@@ -736,6 +829,49 @@ function setClientFingerprintEnabled(enabled) {
|
|
|
736
829
|
clientFingerprintEnabled = enabled;
|
|
737
830
|
fingerprintSignalsReporter.setEnabled(enabled);
|
|
738
831
|
}
|
|
832
|
+
/**
|
|
833
|
+
* The known WASM config: from `setup({ wasm })`, `setWasmConfig`, or
|
|
834
|
+
* `<incode-flow>` / `<incode-workflow>`, which pass the config their captures
|
|
835
|
+
* load. Activation loads the WASM runtime only when it is known, so headless
|
|
836
|
+
* hosts that never configured WASM don't download it.
|
|
837
|
+
*/
|
|
838
|
+
function setClientWasmConfig(config) {
|
|
839
|
+
clientWasmConfig = config;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* `setup({ wasm: false })`: activations load no WASM runtime, so their post
|
|
843
|
+
* sends no device hash, until `setup({ wasm })` or `reset()`.
|
|
844
|
+
*/
|
|
845
|
+
function setClientWasmDisabled(disabled) {
|
|
846
|
+
clientWasmDisabled = disabled;
|
|
847
|
+
}
|
|
848
|
+
/** Why this activation's post won't wait for a pid, if it won't. */
|
|
849
|
+
function deviceHashSkipReason(activationOptedOut) {
|
|
850
|
+
if (activationOptedOut || clientWasmDisabled) return "wasmDisabled";
|
|
851
|
+
return clientWasmConfig ? void 0 : "noWasmConfig";
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Starts the WASM runtime, without models, so the PID signal can return the
|
|
855
|
+
* pid while activation runs: it is the device hash of the activation post.
|
|
856
|
+
* Capture modules add their pipelines later. A runtime that fails to start
|
|
857
|
+
* ends the post's wait at once.
|
|
858
|
+
*/
|
|
859
|
+
function startSessionWasm(token, config) {
|
|
860
|
+
(async () => {
|
|
861
|
+
try {
|
|
862
|
+
const { warmupWasm, whenWasmRuntimeReady } = await import("./warmup-D-Y2iAoP.esm.js").then((n) => n.c);
|
|
863
|
+
const warmup = warmupWasm({
|
|
864
|
+
...config,
|
|
865
|
+
pipelines: []
|
|
866
|
+
});
|
|
867
|
+
warmup.catch(() => void 0);
|
|
868
|
+
await Promise.race([warmup, whenWasmRuntimeReady()]);
|
|
869
|
+
fingerprintSignalsReporter.onWasmReady();
|
|
870
|
+
} catch {
|
|
871
|
+
incodeDeviceHashWaiter.settle(token, null);
|
|
872
|
+
}
|
|
873
|
+
})();
|
|
874
|
+
}
|
|
739
875
|
function resolveDisableIpify(serverDisableIpify) {
|
|
740
876
|
return !clientIpLookupEnabled || serverDisableIpify;
|
|
741
877
|
}
|
|
@@ -803,7 +939,7 @@ function whenSessionFingerprintSettled() {
|
|
|
803
939
|
* ```
|
|
804
940
|
*/
|
|
805
941
|
async function initializeSession(options = {}) {
|
|
806
|
-
const { token, hostingApp = clientHostingApp, signal, preloadFlow, awaitFingerprint = true } = options;
|
|
942
|
+
const { token, hostingApp = clientHostingApp, signal, preloadFlow, awaitFingerprint = true, wasm } = options;
|
|
807
943
|
let triLinkPromise = Promise.resolve();
|
|
808
944
|
if (token !== void 0 && token !== getToken()) {
|
|
809
945
|
setToken(token);
|
|
@@ -836,8 +972,10 @@ async function initializeSession(options = {}) {
|
|
|
836
972
|
}
|
|
837
973
|
const settled = createFingerprintSettled();
|
|
838
974
|
fingerprintSettled = settled;
|
|
839
|
-
const
|
|
840
|
-
|
|
975
|
+
const fingerprintEnabled = clientFingerprintEnabled;
|
|
976
|
+
const activeToken = getToken();
|
|
977
|
+
const skipReason = deviceHashSkipReason(wasm === false);
|
|
978
|
+
if (activeToken && fingerprintEnabled && clientWasmConfig && !skipReason) startSessionWasm(activeToken, clientWasmConfig);
|
|
841
979
|
let fingerprintPromise;
|
|
842
980
|
sessionInitPromise = (async () => {
|
|
843
981
|
let features;
|
|
@@ -857,11 +995,11 @@ async function initializeSession(options = {}) {
|
|
|
857
995
|
hashed_onboarding_id: features.sessionIdentifier || void 0,
|
|
858
996
|
flow_id: preloadedFlow?.flowId
|
|
859
997
|
} });
|
|
860
|
-
fingerprintPromise = submitSessionFingerprint(
|
|
998
|
+
fingerprintPromise = submitSessionFingerprint(fingerprintEnabled, {
|
|
861
999
|
disableIpify,
|
|
862
1000
|
hostingApp,
|
|
863
1001
|
signal
|
|
864
|
-
}, settled);
|
|
1002
|
+
}, settled, skipReason);
|
|
865
1003
|
try {
|
|
866
1004
|
const browserInfo = new BrowserInfoProvider().getBrowserInfo();
|
|
867
1005
|
const language = new BrowserEnvironmentProvider().getNavigatorProperty("language");
|
|
@@ -911,25 +1049,43 @@ async function initializeSession(options = {}) {
|
|
|
911
1049
|
* while it still belongs to the current activation (a token change resets
|
|
912
1050
|
* `fingerprintSettled`) and always settles the waiter.
|
|
913
1051
|
*/
|
|
914
|
-
async function submitSessionFingerprint(
|
|
1052
|
+
async function submitSessionFingerprint(enabled, options, settled, skipReason) {
|
|
915
1053
|
const isCurrent = () => fingerprintSettled === settled;
|
|
1054
|
+
const token = getToken();
|
|
1055
|
+
const startedAtMs = getTimestamp();
|
|
1056
|
+
const deadlineMs = startedAtMs + DEVICE_HASH_WAIT_MS;
|
|
1057
|
+
let outcomeLogged = false;
|
|
1058
|
+
const logOutcome = (outcome) => {
|
|
1059
|
+
if (!outcomeLogged) {
|
|
1060
|
+
outcomeLogged = true;
|
|
1061
|
+
trueSightLog("info", "session", "other", `device hash ${outcome}`);
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
const getDeviceHash = !skipReason && token ? async () => {
|
|
1065
|
+
const deviceHash = await incodeDeviceHashWaiter.waitFor(token, deadlineMs - getTimestamp());
|
|
1066
|
+
logOutcome(`${deviceHash ? "sent" : "missing"} waitMs=${getTimestamp() - startedAtMs}`);
|
|
1067
|
+
return deviceHash;
|
|
1068
|
+
} : void 0;
|
|
916
1069
|
try {
|
|
917
|
-
if (
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1070
|
+
if (enabled) {
|
|
1071
|
+
if (skipReason) logOutcome(`skipped reason=${skipReason}`);
|
|
1072
|
+
try {
|
|
1073
|
+
const result = await retryAfterReconnect(() => submitDeviceFingerprint(options, {
|
|
1074
|
+
ipLookup: new IpifyProvider(),
|
|
1075
|
+
browserEnv: new BrowserEnvironmentProvider(),
|
|
1076
|
+
isCurrentSession: isCurrent,
|
|
1077
|
+
getDeviceHash
|
|
1078
|
+
}), options.signal);
|
|
1079
|
+
if (isCurrent()) {
|
|
1080
|
+
cachedFingerprintResult = result;
|
|
1081
|
+
cachedFingerprintSuccess = true;
|
|
1082
|
+
flushDeviceStatsQueue();
|
|
1083
|
+
}
|
|
1084
|
+
} catch (error) {
|
|
1085
|
+
console.warn("Failed to submit device fingerprint:", error);
|
|
1086
|
+
trueSightLog("warning", "session", "other", "device fingerprint submit failed");
|
|
927
1087
|
}
|
|
928
|
-
}
|
|
929
|
-
console.warn("Failed to submit device fingerprint:", error);
|
|
930
|
-
trueSightLog("warning", "session", "other", "device fingerprint submit failed");
|
|
931
|
-
}
|
|
932
|
-
else if (isCurrent()) flushDeviceStatsQueue();
|
|
1088
|
+
} else if (isCurrent()) flushDeviceStatsQueue();
|
|
933
1089
|
} finally {
|
|
934
1090
|
settled.resolve(isCurrent() ? cachedFingerprintResult : void 0);
|
|
935
1091
|
}
|
|
@@ -959,6 +1115,7 @@ function getFingerprintEnabled() {
|
|
|
959
1115
|
*/
|
|
960
1116
|
function resetSessionInit() {
|
|
961
1117
|
fingerprintSignalsReporter.resetSession();
|
|
1118
|
+
incodeDeviceHashWaiter.reset();
|
|
962
1119
|
sessionInitialized = false;
|
|
963
1120
|
cachedFeatures = null;
|
|
964
1121
|
cachedDisableIpify = false;
|
|
@@ -971,4 +1128,4 @@ function resetSessionInit() {
|
|
|
971
1128
|
resetDeviceStatsQueue();
|
|
972
1129
|
}
|
|
973
1130
|
//#endregion
|
|
974
|
-
export {
|
|
1131
|
+
export { fingerprintSignalsReporter as C, BrowserEnvironmentProvider as S, isBrowserSimulation as _, resetSessionInit as a, getDeviceFingerprintInfo 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, IpifyProvider as x, getThumbmarkId as y };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { P as setWasmIntegrityObserver, _ as setWasmDiagnosticsHandler, w as resolveWasmConfig, y as DEFAULT_WASM_VERSION } from "./wasmWebClient-DpRiJOHd.esm.js";
|
|
2
|
-
import { a as setWasmOnDeviceMode,
|
|
3
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
2
|
+
import { a as setWasmOnDeviceMode, f as drainWasmDiagnostics, m as rearmWasmDiagnostics, n as getWarmupFacts, p as getWasmDiagnosticsMode, s as warmupWasm } from "./warmup-D-Y2iAoP.esm.js";
|
|
3
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-DqtPEKsY.esm.js";
|
|
4
4
|
import { S as setAnalyticsBatcher, b as getAnalyticsBatcher, c as resetExperimentAssignments, v as createAnalyticsBatchingService, x as resetAnalyticsBatcher } from "./events-Dh1gMk0J.esm.js";
|
|
5
5
|
import { a as resetApi, i as isApiConfigured, n as getApi, r as getToken, s as setHttpRequestObserver, t as api, u as endpoints } from "./api-BG98lkot.esm.js";
|
|
6
|
-
import { S as noteTestingSignals, d as categoryForEndpoint, f as getStoredHttpConfig, h as upgradeToWasmHttpClient$1, m as resetHttpClientState, n as initializeTrueSightDiagnostics, o as resetTrueSight, p as installFreshHttpClient, s as setTrueSightExternalDrain, t as finalizeTrueSight, u as trueSightLog } from "./trueSightService-
|
|
7
|
-
import {
|
|
8
|
-
import { t as resolveLocalStorage } from "./safeStorage-UxDrnjwa.esm.js";
|
|
6
|
+
import { S as noteTestingSignals, d as categoryForEndpoint, f as getStoredHttpConfig, h as upgradeToWasmHttpClient$1, m as resetHttpClientState, n as initializeTrueSightDiagnostics, o as resetTrueSight, p as installFreshHttpClient, s as setTrueSightExternalDrain, t as finalizeTrueSight, u as trueSightLog } from "./trueSightService-D7F7hn4q.esm.js";
|
|
7
|
+
import { C as fingerprintSignalsReporter, S as BrowserEnvironmentProvider, a as resetSessionInit, c as setClientIpLookupEnabled, g as setStandaloneFlowPolicy, h as resolveStandaloneFlowPolicy, i as initializeSession, l as setClientWasmConfig, m as resetStandaloneFlowPolicy, o as setClientFingerprintEnabled, p as registerFlowPreloader, s as setClientHostingApp, u as setClientWasmDisabled } from "./sessionInitializer-1QwlJLQ3.esm.js";
|
|
9
8
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
10
|
-
import {
|
|
9
|
+
import { t as resolveLocalStorage } from "./safeStorage-UxDrnjwa.esm.js";
|
|
10
|
+
import { C as resetFeatureManagement, D as applyEnvironment, O as getEnvironment, S as optOutFeatureManagement, b as initializeFeatureManagement, c as resetResolvedExperiments, k as resetEnvironment, v as getIsFeatureManagementLocked, w as resetFeatureManagementProviderInstance } from "./feature-management-BqM3DDh5.esm.js";
|
|
11
11
|
import { r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-D3Cxg6PL.esm.js";
|
|
12
12
|
import { a as resetTRI, n as initializeTRI, o as resetTRIProviderInstance } from "./tri-xzRLIIMN.esm.js";
|
|
13
|
-
import { i as resetDashboardFlowCache, r as preloadDashboardFlow } from "./flowServices-
|
|
13
|
+
import { i as resetDashboardFlowCache, r as preloadDashboardFlow } from "./flowServices-Bc07mt2O.esm.js";
|
|
14
14
|
//#region ../infra/src/wasm/wasmRuntimeProfile.ts
|
|
15
15
|
/**
|
|
16
16
|
* The WASM facts TrueSight reports as `session.webProfile.wasm`
|
|
@@ -545,6 +545,12 @@ async function setup(options) {
|
|
|
545
545
|
trueSightLog("severe", "http", "other", `http client install failed error=${String(error)}`);
|
|
546
546
|
throw error;
|
|
547
547
|
}
|
|
548
|
+
if (options.wasm === false) setClientWasmDisabled(true);
|
|
549
|
+
else if (effectiveWasm) setClientWasmDisabled(false);
|
|
550
|
+
if (effectiveWasm) setWasmConfig({
|
|
551
|
+
...effectiveWasm,
|
|
552
|
+
pipelines: effectiveWasm.pipelines ? [...effectiveWasm.pipelines] : void 0
|
|
553
|
+
});
|
|
548
554
|
if (options.token && isApiConfigured()) {
|
|
549
555
|
const sessionOptions = { token: options.token };
|
|
550
556
|
if (shouldPreloadFlow) sessionOptions.preloadFlow = true;
|
|
@@ -557,10 +563,6 @@ async function setup(options) {
|
|
|
557
563
|
configured = true;
|
|
558
564
|
applyEnvironment(options.environment);
|
|
559
565
|
if (effectiveWasm) {
|
|
560
|
-
wasmConfig = {
|
|
561
|
-
...effectiveWasm,
|
|
562
|
-
pipelines: effectiveWasm.pipelines ? [...effectiveWasm.pipelines] : void 0
|
|
563
|
-
};
|
|
564
566
|
await warmupWasm(effectiveWasm);
|
|
565
567
|
await (await WasmUtilProvider.getInstance()).initialize({
|
|
566
568
|
...effectiveWasm,
|
|
@@ -594,6 +596,7 @@ async function setup(options) {
|
|
|
594
596
|
*/
|
|
595
597
|
function setWasmConfig(config) {
|
|
596
598
|
wasmConfig = config;
|
|
599
|
+
setClientWasmConfig(resolveWasmConfig(config));
|
|
597
600
|
}
|
|
598
601
|
/**
|
|
599
602
|
* Initializes WasmUtilProvider with the stored WASM configuration.
|
|
@@ -693,6 +696,8 @@ function reset() {
|
|
|
693
696
|
resetTRI();
|
|
694
697
|
configured = false;
|
|
695
698
|
wasmConfig = void 0;
|
|
699
|
+
setClientWasmConfig(void 0);
|
|
700
|
+
setClientWasmDisabled(false);
|
|
696
701
|
WasmUtilProvider.resetInstance();
|
|
697
702
|
resetTRIProviderInstance();
|
|
698
703
|
resetFeatureManagement();
|
|
@@ -2,7 +2,7 @@ import { a as setWebApiHttpTransport, g as emitWasmDiagnostic, i as initializeWa
|
|
|
2
2
|
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
3
3
|
import { C as subscribeEvent, n as eventModuleNames } from "./events-Dh1gMk0J.esm.js";
|
|
4
4
|
import { i as isApiConfigured, l as withTiming, n as getApi, o as setClient, r as getToken, t as api, u as endpoints } from "./api-BG98lkot.esm.js";
|
|
5
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
5
|
+
import { t as SDK_VERSION } from "./sdkVersion-BruWW52r.esm.js";
|
|
6
6
|
import { n as reportHttpError, t as HttpRequestError } from "./HttpRequestError-Bh0pNGSC.esm.js";
|
|
7
7
|
/** Dirty-timer half of the interrupted-snapshot rebuild debounce (module boundaries + timer). */
|
|
8
8
|
const SNAPSHOT_DIRTY_INTERVAL_MS = 15e3;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/modules/watchlist-for-business/types.d.ts
|
|
2
|
+
/** Where a W4B field's value comes from. */
|
|
3
|
+
type WatchlistForBusinessFieldSource = 'userInput' | 'eKYBData';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for the watchlist-for-business module.
|
|
6
|
+
*
|
|
7
|
+
* Every field is optional. With no config the module collects country and
|
|
8
|
+
* business name from the user and submits them to the business watchlist
|
|
9
|
+
* endpoint. Tax ID and date of incorporation are extra, optional inputs that
|
|
10
|
+
* the backend enables when the AML Watcher integration is provisioned.
|
|
11
|
+
*/
|
|
12
|
+
type WatchlistForBusinessConfig = {
|
|
13
|
+
/**
|
|
14
|
+
* Source of the country. Typed for parity with the backend config; the
|
|
15
|
+
* module currently always collects it from the user.
|
|
16
|
+
*/
|
|
17
|
+
countrySource?: WatchlistForBusinessFieldSource;
|
|
18
|
+
/**
|
|
19
|
+
* Source of the business name. Typed for parity with the backend config;
|
|
20
|
+
* the module currently always collects it from the user.
|
|
21
|
+
*/
|
|
22
|
+
businessNameSource?: WatchlistForBusinessFieldSource;
|
|
23
|
+
/** Shows the optional Tax ID input and sends it when filled. */
|
|
24
|
+
taxIdEnabled?: boolean;
|
|
25
|
+
/** Shows the optional date-of-incorporation input and sends it when filled. */
|
|
26
|
+
dateOfIncorporationEnabled?: boolean;
|
|
27
|
+
};
|
|
28
|
+
type WatchlistForBusinessValidationErrors = {
|
|
29
|
+
businessName?: string;
|
|
30
|
+
taxId?: string;
|
|
31
|
+
dateOfIncorporation?: string;
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { WatchlistForBusinessValidationErrors as n, WatchlistForBusinessConfig as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as AvatarAssetsOverrides } from "./createFaceAvatar-lYX0VTYs.js";
|
|
2
|
-
import { n as Flow, s as SelfieConcealmentOption } from "./types-
|
|
2
|
+
import { n as Flow, s as SelfieConcealmentOption } from "./types-CK0dj_Vu.js";
|
|
3
3
|
import { a as IStorageCapability, n as IWasmUtilCapability } from "./IWasmUtilCapability-GF2n7sfm.js";
|
|
4
4
|
//#region src/internal/faceCapture/types.d.ts
|
|
5
5
|
type CameraResolution = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { s as RiskAddon } from "./types-D-cdiQD8.js";
|
|
2
2
|
import "./createFaceAvatar-lYX0VTYs.js";
|
|
3
|
+
import { t as WatchlistForBusinessConfig } from "./types-B9C8W01q.js";
|
|
3
4
|
//#region src/internal/avatar/concealment.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Backend-aligned selfie/auth face-concealment options. The backend returns a
|
|
@@ -353,7 +354,7 @@ type FlowModuleConfig = {
|
|
|
353
354
|
UNIVERSAL_IDENTITY: EmptyConfig;
|
|
354
355
|
WATCHLIST: EmptyConfig;
|
|
355
356
|
TRUST_GRAPH: EmptyConfig;
|
|
356
|
-
WATCHLIST_BUSINESS:
|
|
357
|
+
WATCHLIST_BUSINESS: WatchlistForBusinessConfig;
|
|
357
358
|
};
|
|
358
359
|
type FlowModule = { [K in keyof FlowModuleConfig]: {
|
|
359
360
|
key: K;
|