@incodetech/welcome 1.85.0-20251218163752.0 → 1.85.0-20251218215142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,4 +11,6 @@ type SardineContext = {
11
11
  };
12
12
  export declare const getSardineContext: () => SardineContext | null;
13
13
  export declare const enableDeviceRiskModule: ({ token, isSandbox, interviewId, }: EnableDeviceRiskModuleParams) => Promise<SardineContext>;
14
+ export declare const getDwnContext: () => any | null;
15
+ export declare const createDwnContext: () => any;
14
16
  export {};
@@ -1,4 +1,4 @@
1
- declare const FEATURE_FLAGS: readonly ["id_text_barcode_readability", "selfie_local_lenses_check_web", "id_model_hebrew_back_id", "id_face_readability", "new_id_capture_ux_least_risky_clients", "id_test_aa", "id_iou_check", "iad_checks", "iad_c_checks", "new_fingerprint", "mp_test_hashed_id"];
1
+ declare const FEATURE_FLAGS: readonly ["id_text_barcode_readability", "selfie_local_lenses_check_web", "id_model_hebrew_back_id", "id_face_readability", "new_id_capture_ux_least_risky_clients", "id_test_aa", "id_iou_check", "iad_checks", "iad_c_checks", "new_fingerprint", "mp_test_hashed_id", "darwinium_profiling"];
2
2
  type FeatureFlag = (typeof FEATURE_FLAGS)[number];
3
3
  type FeatureFlags = {
4
4
  [key in FeatureFlag]: boolean;
@@ -7453,7 +7453,8 @@ const FEATURE_FLAGS = [
7453
7453
  "iad_checks",
7454
7454
  "iad_c_checks",
7455
7455
  "new_fingerprint",
7456
- "mp_test_hashed_id"
7456
+ "mp_test_hashed_id",
7457
+ "darwinium_profiling"
7457
7458
  ], GLOBAL_FLAGS = ["new_fingerprint"], ID_MODULE_FLAGS = [
7458
7459
  "id_face_readability",
7459
7460
  "id_test_aa",
@@ -7479,7 +7480,8 @@ const clientApiKey = "client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc", featu
7479
7480
  iad_c_checks: !1,
7480
7481
  id_iou_check: !0,
7481
7482
  new_fingerprint: !1,
7482
- mp_test_hashed_id: !1
7483
+ mp_test_hashed_id: !1,
7484
+ darwinium_profiling: !1
7483
7485
  }, clientExperimentIds = {
7484
7486
  new_id_capture_ux_least_risky_clients: "experimentV2"
7485
7487
  };
@@ -8287,7 +8289,7 @@ class MlWasmJSApi {
8287
8289
  );
8288
8290
  }
8289
8291
  }
8290
- const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251218163752.0";
8292
+ const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251218215142.0";
8291
8293
  function e$2(Be, Le) {
8292
8294
  return function(Ye, tt) {
8293
8295
  return Object.prototype.hasOwnProperty.call(Ye, tt);
@@ -151366,6 +151368,13 @@ const getCustomFields = ({ token: Be }) => api.get("/omni/get/custom-fields", {
151366
151368
  const nt = document.getElementsByTagName("script")[0];
151367
151369
  nt.parentNode.insertBefore(Ye, nt);
151368
151370
  });
151371
+ }, loadDwnSDK = async () => {
151372
+ const Be = document.createElement("script");
151373
+ return Be.type = "text/javascript", Be.async = !0, Be.src = "https://demo-aps.incodesmile.com/dwn_profiling.js", new Promise((Le) => {
151374
+ Be.onload = () => Le();
151375
+ const Ye = document.getElementsByTagName("script")[0];
151376
+ Ye.parentNode.insertBefore(Be, Ye);
151377
+ });
151369
151378
  };
151370
151379
  let sardineContext = null;
151371
151380
  const getSardineContext = () => sardineContext, createSardineContextFromSardine = ({
@@ -151388,6 +151397,7 @@ const getSardineContext = () => sardineContext, createSardineContextFromSardine
151388
151397
  addEvent({
151389
151398
  code: "externalRiskSDKInitialized",
151390
151399
  payload: {
151400
+ riskService: "sardine",
151391
151401
  sardineData: {
151392
151402
  deviceId: ht.deviceId,
151393
151403
  uuid: ht.uuid
@@ -151416,6 +151426,7 @@ const getSardineContext = () => sardineContext, createSardineContextFromSardine
151416
151426
  addEvent({
151417
151427
  code: "externalRiskSDKInitialized",
151418
151428
  payload: {
151429
+ riskService: "sardine",
151419
151430
  sardineData: {
151420
151431
  deviceId: nt.deviceId,
151421
151432
  uuid: nt.uuid
@@ -151438,7 +151449,7 @@ const getSardineContext = () => sardineContext, createSardineContextFromSardine
151438
151449
  SardineUserID: void 0
151439
151450
  }
151440
151451
  }));
151441
- shouldDoSardineContextFromSardine(tt) && (await loadSardineSDK(Le), sardineContext = createSardineContextFromSardine({
151452
+ getFeatureFlag("darwinium_profiling") && (await loadDwnSDK(), dwnContext = createDwnContext()), shouldDoSardineContextFromSardine(tt) && (await loadSardineSDK(Le), sardineContext = createSardineContextFromSardine({
151442
151453
  sardineClientId: tt.SardineClientID,
151443
151454
  sardineSessionKey: tt.SardineSessionKey,
151444
151455
  sardineUserId: tt.SardineUserID,
@@ -151453,6 +151464,14 @@ const getSardineContext = () => sardineContext, createSardineContextFromSardine
151453
151464
  token: Be,
151454
151465
  interviewId: Ye
151455
151466
  })), sardineContext;
151467
+ };
151468
+ let dwnContext = null;
151469
+ const getDwnContext = () => dwnContext, createDwnContext = () => {
151470
+ var Be;
151471
+ return dwnContext = (Be = window == null ? void 0 : window.dwn) == null ? void 0 : Be.start({
151472
+ geo_location_enabled: !1,
151473
+ mouse: !0
151474
+ }), dwnContext;
151456
151475
  }, eventModuleNames = {
151457
151476
  selfie: "SELFIE",
151458
151477
  authFace: "AUTH_FACE",
@@ -365846,6 +365865,7 @@ function FlowRenderer({
365846
365865
  }
365847
365866
  if (!At) return null;
365848
365867
  const Tt = At.flowModules, Rt = Tt[yt], Bt = async () => {
365868
+ var Nt, Lt;
365849
365869
  const Dt = Tt.length;
365850
365870
  bt.stepCompleted(Rt.key, yt, Dt);
365851
365871
  const Pt = yt + 1;
@@ -365853,8 +365873,17 @@ function FlowRenderer({
365853
365873
  bt.stepStarted(Tt[Pt].key, Pt, Dt), Ct(Pt);
365854
365874
  else {
365855
365875
  vt(!0);
365856
- const { redirectionUrl: Nt } = await getFinishStatus(void 0, { token: Be });
365857
- bt.flowCompleted(Dt), Ye({ redirectionUrl: Nt });
365876
+ const { redirectionUrl: Wt } = await getFinishStatus(void 0, { token: Be });
365877
+ getFeatureFlag("darwinium_profiling") && ((Lt = (Nt = getDwnContext()) == null ? void 0 : Nt.collect()) == null || Lt.then(($t) => {
365878
+ addEvent({
365879
+ code: "externalRiskSDKInitialized",
365880
+ payload: {
365881
+ riskService: "dwn",
365882
+ dwnData: { blob: $t }
365883
+ },
365884
+ token: Be
365885
+ });
365886
+ }).catch(console.error)), bt.flowCompleted(Dt), Ye({ redirectionUrl: Wt });
365858
365887
  }
365859
365888
  };
365860
365889
  return kt ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner$6, {}) : It ? /* @__PURE__ */ jsxRuntimeExports.jsx(