@incodetech/welcome 1.85.0-20251118174739.0 → 1.85.0-20251118194632.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.
@@ -8374,7 +8374,7 @@ class MlWasmJSApi {
8374
8374
  );
8375
8375
  }
8376
8376
  }
8377
- const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251118174739.0";
8377
+ const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251118194632.0";
8378
8378
  function e$2(Be, Le) {
8379
8379
  return function(Ye, tt) {
8380
8380
  return Object.prototype.hasOwnProperty.call(Ye, tt);
@@ -259349,49 +259349,67 @@ path {
259349
259349
  onClose: () => idFlowManager.onClose()
259350
259350
  }
259351
259351
  );
259352
+ }, addCameraFrontEvent = () => {
259353
+ addEvent({
259354
+ token: idFlowManager.getToken(),
259355
+ code: "cameraFrontId",
259356
+ payload: { cameraFrontId: !0 }
259357
+ });
259352
259358
  }, addCameraBackEvent = () => {
259353
259359
  addEvent({
259354
259360
  token: idFlowManager.getToken(),
259355
259361
  code: "cameraBackId",
259356
259362
  payload: { cameraBackId: !0 }
259357
259363
  });
259364
+ }, addCameraEvent = (Be) => {
259365
+ Be ? addCameraBackEvent() : addCameraFrontEvent();
259358
259366
  }, IdFlow = ({ initialMode: Be }) => {
259359
259367
  const {
259360
259368
  completeWithError: Le,
259361
259369
  captureConfiguration: Ye,
259362
259370
  uiConfig: tt,
259363
259371
  isDeepsightEnabled: nt
259364
- } = useCaptureIdState(), ft = () => Ye.usSmartCapture && Be === "front" || Ye.onlyBack ? "back" : Be, ht = () => Ye.ageAssurance ? "ageVerification" : Ye.showTutorial ? "tutorial" : idFlowManager.getPermissionsGranted() ? "capture" : "permissions", [gt, At] = useState(ht()), xt = () => {
259372
+ } = useCaptureIdState(), ft = () => Ye.usSmartCapture && Be === "front" || Ye.onlyBack ? "back" : Be, ht = () => Ye.ageAssurance ? "ageVerification" : Ye.showTutorial ? "tutorial" : idFlowManager.getPermissionsGranted() ? "capture" : "permissions", [gt, At] = useState(ht()), xt = useRef(!1);
259373
+ useEffect(() => {
259374
+ (gt === "permissions" || gt === "capture") && !xt.current && (addCameraEvent(
259375
+ Ye.onlyBack || Ye.usSmartCapture
259376
+ ), xt.current = !0);
259377
+ }, [
259378
+ gt,
259379
+ Ye.onlyBack,
259380
+ Ye.usSmartCapture
259381
+ ]);
259382
+ const Et = () => {
259365
259383
  Ye.showTutorial ? At("tutorial") : idFlowManager.getPermissionsGranted() ? At("capture") : At("permissions");
259366
- }, Et = () => {
259367
- idFlowManager.getPermissionsGranted() ? At("capture") : At("permissions");
259368
259384
  }, kt = () => {
259385
+ idFlowManager.getPermissionsGranted() ? At("capture") : At("permissions");
259386
+ }, Ct = () => {
259369
259387
  At("capture");
259370
259388
  };
259371
259389
  if (gt === "ageVerification")
259372
259390
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
259373
259391
  AgeVerification,
259374
259392
  {
259375
- onContinue: xt,
259393
+ onContinue: Et,
259376
259394
  mode: Be === "passport" ? "passport" : "id"
259377
259395
  }
259378
259396
  );
259379
259397
  if (gt === "tutorial")
259380
- return Be === "passport" ? /* @__PURE__ */ jsxRuntimeExports.jsx(PassportTutorial, { onContinue: Et }) : /* @__PURE__ */ jsxRuntimeExports.jsx(IdTutorial, { onContinue: Et });
259398
+ return Be === "passport" ? /* @__PURE__ */ jsxRuntimeExports.jsx(PassportTutorial, { onContinue: kt }) : /* @__PURE__ */ jsxRuntimeExports.jsx(IdTutorial, { onContinue: kt });
259381
259399
  if (gt === "permissions")
259382
259400
  if (idFlowManager.getPermissionsGranted())
259383
- kt();
259401
+ Ct();
259384
259402
  else
259385
259403
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
259386
259404
  Permissions,
259387
259405
  {
259388
- onContinue: kt,
259406
+ onContinue: Ct,
259389
259407
  uiConfig: tt,
259390
259408
  onClose: () => idFlowManager.onClose(),
259391
- emitError: (Ct) => Le({
259392
- code: Ct,
259409
+ emitError: (yt) => Le({
259410
+ code: yt,
259393
259411
  message: "Error in permissions",
259394
- error: new Error(Ct)
259412
+ error: new Error(yt)
259395
259413
  }),
259396
259414
  isDeepsightEnabled: nt
259397
259415
  }