@incodetech/web 0.0.0-dev-20260901-1ac66c0f → 0.0.0-dev-20260902-b423eb4c

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.
Files changed (164) hide show
  1. package/dist/ae-signature/ae-signature.es.js +3 -3
  2. package/dist/{af-ZA-DL1Rs-NR.js → af-ZA-DKsV_Ex3.js} +1 -0
  3. package/dist/{am-Cj_JM4rL.js → am-CogWj1Jf.js} +1 -0
  4. package/dist/antifraud/antifraud.es.js +3 -3
  5. package/dist/{ar-AE-VNseUPF5.js → ar-AE-CxPnqMRc.js} +1 -0
  6. package/dist/{ar-ChbSCcC2.js → ar-BRG8Sd8K.js} +1 -0
  7. package/dist/{ar-EG-DsvbMod-.js → ar-EG-C0nwcKxi.js} +1 -0
  8. package/dist/authentication/authentication.es.js +2 -2
  9. package/dist/{az-CG1ZWdHB.js → az-DmgRG3V_.js} +1 -0
  10. package/dist/base.css +349 -3
  11. package/dist/{bn-B0_3KAKc.js → bn-iDqSpfVF.js} +1 -0
  12. package/dist/{bs-BfLlSoFe.js → bs-D6z9Pk8U.js} +1 -0
  13. package/dist/{ca-zf7e_pfR.js → ca-Bb9jg5vy.js} +1 -0
  14. package/dist/{ceb-Sl_ryOzZ.js → ceb-Di1aDqdQ.js} +1 -0
  15. package/dist/certificate-issuance/certificate-issuance.es.js +5 -5
  16. package/dist/consent/consent.es.js +5 -5
  17. package/dist/{countrySelector-BHA6GDsN.js → countrySelector-CZccmi4z.js} +3 -3
  18. package/dist/cross-document-data-match/cross-document-data-match.es.js +3 -3
  19. package/dist/{cs-CZ-CfqC64MA.js → cs-CZ-d7uYvc-P.js} +1 -0
  20. package/dist/{cs-B3wWkzmc.js → cs-nfK2HQKu.js} +1 -0
  21. package/dist/curp-validation/curp-validation.es.js +5 -5
  22. package/dist/{customFields-CQ6rHt7I.js → customFields-CaOTIR_e.js} +5 -5
  23. package/dist/{customWatchlist-CKBbjq3B.js → customWatchlist-B83i5Ubd.js} +5 -5
  24. package/dist/{da-DK-B7Bx1As6.js → da-DK-C4noYMcl.js} +1 -0
  25. package/dist/{dashboardTheme-CYMabVVu.js → dashboardTheme-NKUM6vAI.js} +1 -1
  26. package/dist/{de-1h890scz.js → de-icofTp3b.js} +1 -0
  27. package/dist/document-capture/document-capture.es.js +1 -1
  28. package/dist/{documentCapture-guWsqYCJ.js → documentCapture-B7T8XbL5.js} +7 -7
  29. package/dist/documentCapture-pXKP1Tbe.js +2 -0
  30. package/dist/{dropdownComposed-DgwGkwlL.js → dropdownComposed-Bp28bptM.js} +10 -3
  31. package/dist/{dynamicForms-BZzNPt1d.js → dynamicForms-DvTAF24O.js} +5 -5
  32. package/dist/ekyb/ekyb.es.js +1 -1
  33. package/dist/ekybModule-DyROxp2N.js +2 -0
  34. package/dist/{ekybModule-BqQn8u7K.js → ekybModule-x8d73Kdl.js} +8 -8
  35. package/dist/ekyc/ekyc.es.js +1 -1
  36. package/dist/ekycModule-4yjbMN_L.js +2 -0
  37. package/dist/{ekycModule-hqI1f98x.js → ekycModule-DzJz3lYC.js} +6 -6
  38. package/dist/{el-DuDmBhhX.js → el-4Yh-4jWz.js} +2 -1
  39. package/dist/{el-GR-Cr_q-OQL.js → el-GR-CzH1ZHEZ.js} +1 -0
  40. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  41. package/dist/electronic-signature/styles.css +62 -2
  42. package/dist/{electronic-signature-BsCeu1JX.js → electronic-signature-Cov9BKJ-.js} +61 -12
  43. package/dist/email/email.es.js +6 -6
  44. package/dist/{emailInput-68B1aOjX.js → emailInput-CN48lIrg.js} +2 -2
  45. package/dist/{en-D2dHFjce.js → en-CM36Z7Qh.js} +1 -0
  46. package/dist/{en-DG-C1r7DmNh.js → en-DG-BX3Mhg-X.js} +1 -0
  47. package/dist/{es-419-Vy_zeEaR.js → es-419-CK1_SFaK.js} +1 -0
  48. package/dist/{es-rQQGVK4S.js → es-BheZdqh1.js} +1 -0
  49. package/dist/{es-ES-CoqW6MNQ.js → es-ES-C_JAIqQv.js} +1 -0
  50. package/dist/{es-MX-QrDI5xS_.js → es-MX-qzdj0RXw.js} +1 -0
  51. package/dist/{et-BXAuX_MU.js → et-IT1XE4S0.js} +1 -0
  52. package/dist/{extensibility-C5-dzGB9.js → extensibility-C_4OSwNj.js} +617 -190
  53. package/dist/extensibility.es.js +5 -5
  54. package/dist/{fa-IR-_PiyQI42.js → fa-IR-C1h-E0lZ.js} +1 -0
  55. package/dist/face-match/face-match.es.js +1 -1
  56. package/dist/{faceMatch-C9eg9m7p.js → faceMatch-CJwGNK5J.js} +6 -6
  57. package/dist/faceMatch-Rl9qO8Fy.js +2 -0
  58. package/dist/{fi-FI-kLhBbF-W.js → fi-FI-CNsM3XrX.js} +1 -0
  59. package/dist/field-comparison/field-comparison.es.js +1 -1
  60. package/dist/fieldComparison-7yzuwmhT.js +2 -0
  61. package/dist/{fieldComparison-MM_rtNmV.js → fieldComparison-BKGJa1-Z.js} +5 -5
  62. package/dist/{finalSuccessScreen-UY1WRmFI.js → finalSuccessScreen-BGvHT0Nb.js} +4 -4
  63. package/dist/fiscal-qr/fiscal-qr.es.js +5 -5
  64. package/dist/flow/flow.es.js +10 -7
  65. package/dist/flow/styles.css +96 -3
  66. package/dist/{fr-CA-DGt9R6Xt.js → fr-CA-BFJa7kyf.js} +1 -0
  67. package/dist/{fr-Dj79iLxP.js → fr-DWDxafAY.js} +1 -0
  68. package/dist/geolocation/geolocation.es.js +5 -5
  69. package/dist/government-validation/government-validation.es.js +3 -3
  70. package/dist/{he-Biej7cfB.js → he-D7DVvU9N.js} +1 -0
  71. package/dist/{hi-gumowzrc.js → hi-wVkp0Jk5.js} +1 -0
  72. package/dist/{hmn-KIbKCobg.js → hmn-Ci7YP0lZ.js} +1 -0
  73. package/dist/{homeScreen-Dx9BTr1O.js → homeScreen-CGwTFNOv.js} +3 -3
  74. package/dist/{hr-iKQKWlBR.js → hr-C4yja_Ys.js} +1 -0
  75. package/dist/{ht-BjJVaAq3.js → ht-munP_qAb.js} +1 -0
  76. package/dist/{hu-Cz2-tuR5.js → hu-C90KTHI3.js} +2 -1
  77. package/dist/id/id.es.js +300 -13
  78. package/dist/id/styles.css +34 -1
  79. package/dist/{id-BA-wl3qw.js → id-qC41mNnn.js} +2 -1
  80. package/dist/id-selfie-flow/id-selfie-flow.es.js +5 -5
  81. package/dist/id-verification/id-verification.es.js +3 -3
  82. package/dist/{idOcr-DafjN-gA.js → idOcr-KAbQjIuE.js} +4 -4
  83. package/dist/identity-reuse/identity-reuse.es.js +5 -5
  84. package/dist/{incodeModule-MEI6idNa.js → incodeModule-BJ-HCYmb.js} +1 -1
  85. package/dist/index.es.js +2 -2
  86. package/dist/{it-B4ZxNAgd.js → it-DI10PqSV.js} +2 -1
  87. package/dist/{ja-JP-DBqIekzB.js → ja-JP-CA4AXxTr.js} +1 -0
  88. package/dist/{ja-8vuOC_Um.js → ja-MzfyL-D7.js} +1 -0
  89. package/dist/{jv-YfLjXl-Z.js → jv-CVDppS6O.js} +1 -0
  90. package/dist/{ka-Dbq1craV.js → ka-fWNGcQJB.js} +1 -0
  91. package/dist/{kk-BtzLSaQD.js → kk-CdkVXCt8.js} +1 -0
  92. package/dist/{km-BvGideop.js → km-w72ZVMQE.js} +7 -6
  93. package/dist/{ko-KP-Ckue-qZl.js → ko-KP-DzUqVwCH.js} +1 -0
  94. package/dist/{ko-CrLFFLPU.js → ko-Yv-0llXS.js} +1 -0
  95. package/dist/{ky-D1f1BhgJ.js → ky-ve1IsqQ4.js} +1 -0
  96. package/dist/{lo-BkX9eO0p.js → lo-DErT0B9M.js} +1 -0
  97. package/dist/{lt-DEt9tgoR.js → lt-DUpfkS_o.js} +2 -1
  98. package/dist/{lv-BALLlBIy.js → lv-C67c3sx0.js} +2 -1
  99. package/dist/{mandatoryConsent-BdmJ-3O0.js → mandatoryConsent-gofFwZJb.js} +5 -5
  100. package/dist/{mk-BDvZSZuI.js → mk-BAMhJ8St.js} +1 -0
  101. package/dist/{mn-Dy6FxwUI.js → mn-C7b_xep_.js} +1 -0
  102. package/dist/{ms-DFic8nOa.js → ms-BNePU_Gx.js} +1 -0
  103. package/dist/{my-D19Gvy6S.js → my-NZpjG86b.js} +1 -0
  104. package/dist/{nb-NO-DPnsITh8.js → nb-NO-BlQuLcnl.js} +1 -0
  105. package/dist/{ne-UcFVlh-J.js → ne-CREnlwWI.js} +1 -0
  106. package/dist/{nl-Bp9dl65m.js → nl-RDjBXUCz.js} +3 -2
  107. package/dist/{optionAccessibleLabel-CMOxbRAi.js → optionAccessibleLabel-DdnoFUd4.js} +2 -2
  108. package/dist/pdfViewer-BVWBcRqJ.js +2 -0
  109. package/dist/{pdfViewer-Dy13J875.js → pdfViewer-ewa3CipR.js} +2 -2
  110. package/dist/phone/phone.es.js +5 -5
  111. package/dist/{pl-BVmorQqr.js → pl-EawYXaSx.js} +1 -0
  112. package/dist/{pt-BR-B2-39vwT.js → pt-BR-4P22-DCp.js} +1 -0
  113. package/dist/{pt-C5HBWUpp.js → pt-CJvsYnmN.js} +1 -0
  114. package/dist/{pt-PT-CkRkgTwG.js → pt-PT-BzGLGAMJ.js} +1 -0
  115. package/dist/qe-signature/qe-signature.es.js +3 -3
  116. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +5 -5
  117. package/dist/{richText-Cg-svMS_.js → richText-DCnMn7nM.js} +1 -1
  118. package/dist/{ro-S0-1Kd16.js → ro-DwDFAX_u.js} +1 -0
  119. package/dist/{ru-2AU75QKx.js → ru-CrPFJvYl.js} +2 -1
  120. package/dist/{ru-RU-Bnz17gfl.js → ru-RU-BHAEyJd2.js} +1 -0
  121. package/dist/selfie/selfie.es.js +6 -6
  122. package/dist/signature/signature.es.js +5 -5
  123. package/dist/{sk-C1fUSB6r.js → sk-OMBeVmQc.js} +3 -2
  124. package/dist/{sl-CTMp41Ci.js → sl-DkZoEs1z.js} +1 -0
  125. package/dist/{so-ay9PdIOq.js → so-C3Qi5y9Z.js} +1 -0
  126. package/dist/{spacer-Dnkw3rCV.js → spacer-6MHVWssc.js} +1 -1
  127. package/dist/{spinner-CbzMb0df.js → spinner-CKRC7C1a.js} +46 -4
  128. package/dist/{sr-BGlnNf9t.js → sr-Bs8F7Q2U.js} +1 -0
  129. package/dist/{sr-Latn-DHtEPYdA.js → sr-Latn-CKM_b-Cy.js} +7 -6
  130. package/dist/{sr-YU-Dkf07ZzJ.js → sr-YU-Czlf6QBm.js} +1 -0
  131. package/dist/{sv-SE-BQGEIpvA.js → sv-SE-F_js51u7.js} +1 -0
  132. package/dist/{sw-B69V2V3r.js → sw-C2lGdJlV.js} +1 -0
  133. package/dist/{tabs-Csmo-geL.js → tabs-ORRydng_.js} +1 -1
  134. package/dist/{th-BvEquZt8.js → th-B-QmzZUR.js} +1 -0
  135. package/dist/{th-TH-BhShsfIn.js → th-TH-DNSCzjJR.js} +1 -0
  136. package/dist/themes/dark.css +19 -1
  137. package/dist/themes/light.css +18 -1
  138. package/dist/{tl-CCDSFvx6.js → tl-CCmBQ7MX.js} +1 -0
  139. package/dist/{tl-PH-yqDEC8xn.js → tl-PH-CqAHCo4v.js} +1 -0
  140. package/dist/{tr-BvT5pqAQ.js → tr-DgyDseMN.js} +3 -2
  141. package/dist/types/extensibility.d.ts +49 -6
  142. package/dist/{uiConfig-_Xz7h9zF.js → uiConfig-S9TzEYvT.js} +83 -83
  143. package/dist/{uk-DW7cee8E.js → uk-BTW7Vs57.js} +1 -0
  144. package/dist/{uk-UA-we9YYvUm.js → uk-UA-C9-bG9M1.js} +1 -0
  145. package/dist/{ur-CA0yWorH.js → ur-C4G7YirV.js} +1 -0
  146. package/dist/{useModuleLoader-CVBQq93G.js → useModuleLoader-Dt7j-gwI.js} +18 -18
  147. package/dist/{uz-B-OlIfsm.js → uz-DK8QJLXz.js} +1 -0
  148. package/dist/{vi-CYh561-0.js → vi-DiQNP3Vc.js} +1 -0
  149. package/dist/video-selfie/video-selfie.es.js +7 -7
  150. package/dist/watchlist/watchlist.es.js +5 -5
  151. package/dist/{watchlistForBusiness-B-SuLpI7.js → watchlistForBusiness-CwlS0dKZ.js} +6 -6
  152. package/dist/workflow/styles.css +34 -1
  153. package/dist/workflow/workflow.es.js +6 -6
  154. package/dist/{zh-cyX67pt9.js → zh-BHvjBF-A.js} +1 -0
  155. package/dist/{zh-CN-DXSZpY8j.js → zh-CN-91qPLDFO.js} +2 -1
  156. package/dist/{zh-HANT-Cns9qKq6.js → zh-HANT-CwFLP6Na.js} +1 -0
  157. package/dist/{zh-TW-LE3VBz_2.js → zh-TW-ZFiX8OEz.js} +1 -0
  158. package/package.json +2 -2
  159. package/dist/documentCapture-BB56hYVB.js +0 -2
  160. package/dist/ekybModule-BFG3hSpH.js +0 -2
  161. package/dist/ekycModule-B8Ewzkkr.js +0 -2
  162. package/dist/faceMatch-3Z6-nWy3.js +0 -2
  163. package/dist/fieldComparison-DLym-Iow.js +0 -2
  164. package/dist/pdfViewer-Do3jC3Kh.js +0 -2
@@ -1,12 +1,12 @@
1
- import { a as Trans, i as useTranslationWithFallback, o as useTranslation, r as useUiConfig } from "./uiConfig-_Xz7h9zF.js";
1
+ import { a as Trans, i as useTranslationWithFallback, o as useTranslation, r as useUiConfig } from "./uiConfig-S9TzEYvT.js";
2
2
  import { C as k, _ as x, a as D, c as z, d as T, f as _, g as q, h, i as C, l as A, m as g, o as P, p as d, r as $, s as gn, v as y, x as Q, y as u } from "./vendor-preact-BPXMFRom.js";
3
- import { a as getStandaloneSetupPolicy, n as preloadDashboardTheme, t as getDashboardTheme } from "./dashboardTheme-CYMabVVu.js";
4
- import { a as useAnimationData, d as cn, l as useInstanceOverrides, n as LoadingIcon, o as Lottie, r as AnimatedAsset, t as Spacer } from "./spacer-Dnkw3rCV.js";
5
- import { a as TypographyH4, i as TypographyH3, n as Title, o as TypographyH5, r as TypographyH1, s as TypographyP, t as Spinner } from "./spinner-CbzMb0df.js";
6
- import { A as Button, D as CalendarIcon, O as incode_logo_default, T as CaptureButtonIcon, _ as EyeIcon, a as useModalEscapeDismiss, b as ChevronRightIcon, c as useModalVisualViewportBounds, d as SuccessIcon, g as EyeOffIcon, i as useModalBodyScrollLock, k as ErrorIcon, l as SvgLightningIcon, m as HelpIcon, n as FieldLabelHint, o as useModalFocusCapture, p as LockIcon, r as Modal, s as useModalTabCycle, t as DropdownComposed, u as WarningIcon, v as EllipseIcon, w as CheckmarkIcon, y as CloseIcon } from "./dropdownComposed-DgwGkwlL.js";
3
+ import { a as getStandaloneSetupPolicy, n as preloadDashboardTheme, t as getDashboardTheme } from "./dashboardTheme-NKUM6vAI.js";
4
+ import { a as useAnimationData, d as cn, l as useInstanceOverrides, n as LoadingIcon, o as Lottie, r as AnimatedAsset, t as Spacer } from "./spacer-6MHVWssc.js";
5
+ import { a as TypographyH4, i as TypographyH3, n as Title, o as TypographyH5, s as TypographyP, t as Spinner } from "./spinner-CKRC7C1a.js";
6
+ import { A as Button, D as CalendarIcon, O as incode_logo_default, T as CaptureButtonIcon, _ as EyeIcon, a as useModalEscapeDismiss, b as ChevronRightIcon, c as useModalVisualViewportBounds, d as SuccessIcon, g as EyeOffIcon, i as useModalBodyScrollLock, k as ErrorIcon, l as SvgLightningIcon, m as HelpIcon, n as FieldLabelHint, o as useModalFocusCapture, p as LockIcon, r as Modal, s as useModalTabCycle, t as DropdownComposed, u as WarningIcon, v as EllipseIcon, w as CheckmarkIcon, y as CloseIcon } from "./dropdownComposed-Bp28bptM.js";
7
7
  import { ScreenOrientationProvider, createScreenOrientationObserver, getBrowser, getDeviceClass, isApplePlatform, isIPad, isSupportedBrowser } from "@incodetech/core/device";
8
8
  import { eventModuleNames, recordExperimentAssignmentOnce } from "@incodetech/core/events";
9
- import { ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, getExperiment, getFeatureGate, getFeatureManagementVersion, getFeatureParameterStore, getIsFeatureManagementInitialized, getLayer, resolveExperiment, subscribeFeatureManagement, updateFeatureManagementUser } from "@incodetech/core/feature-management";
9
+ import { ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, enumParam, getExperiment, getFeatureGate, getFeatureManagementVersion, getFeatureParameterStore, getIsFeatureManagementInitialized, getLayer, numberParam, resolveExperiment, subscribeFeatureManagement, updateFeatureManagementUser } from "@incodetech/core/feature-management";
10
10
  import { resolveDashboardModuleConfig } from "@incodetech/core/flow";
11
11
  import "@incodetech/core/camera";
12
12
  import "@incodetech/core/id";
@@ -489,7 +489,7 @@ function useSpinnerPresentation() {
489
489
  * the module-internal loaders (ID camera prep, camera permissions) that a
490
490
  * flow-level config never could.
491
491
  */
492
- var TransitionSpinner = ({ spinnerConfig, className, titleKey, subtitleKey, renderMode, hideText = false, presentational = false }) => {
492
+ var TransitionSpinner = ({ spinnerConfig, className, titleKey, subtitleKey, renderMode, hideText = false, presentational = false, alwaysDark = false }) => {
493
493
  const { t } = useTranslation();
494
494
  const presentation = useSpinnerPresentation();
495
495
  const resolvedRenderMode = presentation.renderMode ?? spinnerConfig?.renderMode ?? renderMode ?? (hideText ? "spinnerOnly" : "spinnerAndText");
@@ -505,7 +505,8 @@ var TransitionSpinner = ({ spinnerConfig, className, titleKey, subtitleKey, rend
505
505
  fullScreen: true,
506
506
  className,
507
507
  presentational,
508
- hideIcon
508
+ hideIcon,
509
+ alwaysDark
509
510
  });
510
511
  };
511
512
  //#endregion
@@ -14981,24 +14982,81 @@ function VerificationOptionCardTag({ label }) {
14981
14982
  children: [/* @__PURE__ */ u(SvgLightningIcon, {}), /* @__PURE__ */ u("span", { children: label })]
14982
14983
  });
14983
14984
  }
14985
+ function prefersReducedMotion() {
14986
+ if (typeof window === "undefined") return false;
14987
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
14988
+ }
14989
+ function useBottomSheetAnimatedClose({ isOpen, onClose, sheetRef }) {
14990
+ const closeCommittedRef = A(false);
14991
+ const [isClosing, setIsClosing] = d(false);
14992
+ const isVisible = isOpen || isClosing;
14993
+ const canDismiss = Boolean(onClose) && !isClosing;
14994
+ const finishClose = q(() => {
14995
+ if (closeCommittedRef.current) return;
14996
+ closeCommittedRef.current = true;
14997
+ setIsClosing(false);
14998
+ onClose?.();
14999
+ }, [onClose]);
15000
+ const requestClose = q(() => {
15001
+ if (!canDismiss) return;
15002
+ closeCommittedRef.current = false;
15003
+ if (prefersReducedMotion()) {
15004
+ finishClose();
15005
+ return;
15006
+ }
15007
+ setIsClosing(true);
15008
+ }, [canDismiss, finishClose]);
15009
+ y(() => {
15010
+ if (isOpen) {
15011
+ closeCommittedRef.current = false;
15012
+ setIsClosing(false);
15013
+ }
15014
+ }, [isOpen]);
15015
+ y(() => {
15016
+ if (!isClosing) return;
15017
+ const timeout = setTimeout(finishClose, 750);
15018
+ return () => clearTimeout(timeout);
15019
+ }, [finishClose, isClosing]);
15020
+ return {
15021
+ isVisible,
15022
+ isClosing,
15023
+ canDismiss,
15024
+ requestClose,
15025
+ handleSheetAnimationEnd: q((event) => {
15026
+ if (!isClosing || event.target !== sheetRef.current) return;
15027
+ if (event.animationName !== "IncodeSlideDown") return;
15028
+ finishClose();
15029
+ }, [
15030
+ finishClose,
15031
+ isClosing,
15032
+ sheetRef
15033
+ ]),
15034
+ overlayClassName: cn("IncodeBottomSheetOverlay", isClosing && "IncodeBottomSheetOverlay--closing"),
15035
+ sheetClassName: cn("IncodeBottomSheet", isClosing && "IncodeBottomSheet--closing")
15036
+ };
15037
+ }
14984
15038
  //#endregion
14985
15039
  //#region src/shared/bottomSheet/bottomSheet.tsx
14986
- var BottomSheet = ({ isOpen = false, onClose, labelledById, children, returnFocusRef }) => {
15040
+ var BottomSheet = ({ isOpen = false, onClose, labelledById, children, returnFocusRef, manageInitialFocus = true, "data-testid": dataTestId }) => {
14987
15041
  const dialogRef = A(null);
14988
15042
  const overlayRef = A(null);
14989
- const requestClose = q(() => {
14990
- onClose?.();
14991
- }, [onClose]);
14992
- useModalBodyScrollLock(isOpen);
14993
- useModalEscapeDismiss(isOpen, true, requestClose);
14994
- useModalFocusCapture(isOpen, dialogRef, true, returnFocusRef);
14995
- useModalTabCycle(isOpen, dialogRef);
14996
- useModalVisualViewportBounds(isOpen, overlayRef);
14997
- if (!isOpen) return null;
15043
+ const { isVisible, canDismiss, requestClose, handleSheetAnimationEnd, overlayClassName, sheetClassName } = useBottomSheetAnimatedClose({
15044
+ isOpen,
15045
+ onClose,
15046
+ sheetRef: dialogRef
15047
+ });
15048
+ useModalBodyScrollLock(isVisible);
15049
+ useModalEscapeDismiss(isOpen && canDismiss, canDismiss, requestClose);
15050
+ useModalFocusCapture(isVisible, dialogRef, manageInitialFocus, returnFocusRef);
15051
+ useModalTabCycle(isVisible, dialogRef);
15052
+ useModalVisualViewportBounds(isVisible, overlayRef);
15053
+ if (!isVisible) return null;
14998
15054
  return /* @__PURE__ */ u("div", {
14999
15055
  ref: overlayRef,
15000
- class: "IncodeBottomSheetOverlay",
15056
+ class: overlayClassName,
15057
+ "data-testid": dataTestId,
15001
15058
  onPointerUp: (event) => {
15059
+ if (!canDismiss) return;
15002
15060
  const target = event.target;
15003
15061
  if (!dialogRef.current?.contains(target)) requestClose();
15004
15062
  },
@@ -15006,12 +15064,16 @@ var BottomSheet = ({ isOpen = false, onClose, labelledById, children, returnFocu
15006
15064
  class: "IncodeBottomSheetContainer",
15007
15065
  children: /* @__PURE__ */ u("div", {
15008
15066
  ref: dialogRef,
15009
- class: "IncodeBottomSheet",
15067
+ class: sheetClassName,
15010
15068
  role: "dialog",
15011
15069
  "aria-modal": "true",
15012
15070
  "aria-labelledby": labelledById,
15013
15071
  tabIndex: -1,
15014
- children
15072
+ onAnimationEnd: handleSheetAnimationEnd,
15073
+ children: [/* @__PURE__ */ u("span", {
15074
+ class: "IncodeBottomSheetHandle",
15075
+ "aria-hidden": "true"
15076
+ }), children]
15015
15077
  })
15016
15078
  })
15017
15079
  });
@@ -15298,21 +15360,31 @@ function replaceLottieColor(animationData, hexColor) {
15298
15360
  }
15299
15361
  //#endregion
15300
15362
  //#region src/shared/baseTutorial/baseTutorial.tsx
15301
- var BaseTutorial = ({ className = "", animationData, title, titleId, subtitle, onContinue, buttonText, disclaimerText, isLoading, secondaryAction, stopFramePosition = "middle", recolor = true }) => {
15363
+ var BaseTutorial = ({ className = "", animationData, title, titleId, subtitle, onContinue, buttonText, disclaimerText, isLoading, secondaryAction, actionsSlot, stopFramePosition = "middle", recolor = true, shouldScaleAnimationContainer }) => {
15302
15364
  const themedAnimationData = T(() => {
15303
15365
  if (!animationData) return null;
15304
15366
  if (!recolor) return animationData;
15305
15367
  return replaceLottieColor(animationData, getCssVariableAsHex("--primitive-color-brand-500"));
15306
15368
  }, [animationData, recolor]);
15369
+ let scaledClasses = {
15370
+ page: "",
15371
+ container: "",
15372
+ animationContainer: ""
15373
+ };
15374
+ if (shouldScaleAnimationContainer) scaledClasses = {
15375
+ page: "IncodeTutorialPageScaled",
15376
+ container: "IncodeBaseTutorialContainerScaled",
15377
+ animationContainer: "IncodeBaseTutorialAnimationContainerScaled"
15378
+ };
15307
15379
  return /* @__PURE__ */ u(Page, {
15308
- className: cn("IncodeTutorialPage", className),
15380
+ className: cn("IncodeTutorialPage", scaledClasses.page, className),
15309
15381
  title,
15310
15382
  titleId,
15311
15383
  subtitle,
15312
15384
  children: [/* @__PURE__ */ u("div", {
15313
- class: "IncodeBaseTutorialContainer",
15385
+ class: cn("IncodeBaseTutorialContainer", scaledClasses.container),
15314
15386
  children: /* @__PURE__ */ u("div", {
15315
- class: "IncodeBaseTutorialAnimationContainer",
15387
+ class: cn("IncodeBaseTutorialAnimationContainer", scaledClasses.animationContainer),
15316
15388
  "aria-hidden": "true",
15317
15389
  children: themedAnimationData ? /* @__PURE__ */ u(Lottie, {
15318
15390
  animationData: themedAnimationData,
@@ -15326,19 +15398,26 @@ var BaseTutorial = ({ className = "", animationData, title, titleId, subtitle, o
15326
15398
  children: disclaimerText
15327
15399
  }), /* @__PURE__ */ u("div", {
15328
15400
  class: "IncodeBaseTutorialButtonContainer",
15329
- children: [/* @__PURE__ */ u(Button, {
15330
- onClick: onContinue,
15331
- class: "IncodeBaseTutorialButton",
15332
- isLoading,
15333
- children: buttonText
15334
- }), secondaryAction ? /* @__PURE__ */ u(Button, {
15335
- variant: "link",
15336
- onClick: secondaryAction.onClick,
15337
- class: "IncodeBaseTutorialSecondaryAction",
15338
- disabled: isLoading,
15339
- "data-testid": secondaryAction.testId,
15340
- children: secondaryAction.label
15341
- }) : null]
15401
+ children: [
15402
+ /* @__PURE__ */ u(Button, {
15403
+ onClick: onContinue,
15404
+ class: "IncodeBaseTutorialButton",
15405
+ isLoading,
15406
+ children: buttonText
15407
+ }),
15408
+ secondaryAction ? /* @__PURE__ */ u(Button, {
15409
+ variant: "link",
15410
+ onClick: secondaryAction.onClick,
15411
+ class: "IncodeBaseTutorialSecondaryAction",
15412
+ disabled: isLoading,
15413
+ "data-testid": secondaryAction.testId,
15414
+ children: secondaryAction.label
15415
+ }) : null,
15416
+ actionsSlot && /* @__PURE__ */ u("div", {
15417
+ class: "IncodeBaseTutorialActionsSlot",
15418
+ children: actionsSlot
15419
+ })
15420
+ ]
15342
15421
  })] })]
15343
15422
  });
15344
15423
  };
@@ -16006,6 +16085,80 @@ var SvgCheckIcon = (props) => /* @__PURE__ */ u("svg", {
16006
16085
  })
16007
16086
  });
16008
16087
  //#endregion
16088
+ //#region src/shared/permissions/assets/reload-icon.svg?react
16089
+ var SvgReloadIcon = (props) => /* @__PURE__ */ u("svg", {
16090
+ width: 24,
16091
+ height: 24,
16092
+ viewBox: "0 0 24 24",
16093
+ fill: "none",
16094
+ xmlns: "http://www.w3.org/2000/svg",
16095
+ ...props,
16096
+ children: /* @__PURE__ */ u("path", {
16097
+ fillRule: "evenodd",
16098
+ clipRule: "evenodd",
16099
+ d: "M18.229 10.3584L17.156 12.1152C17.055 12.2803 16.89 12.3994 16.698 12.4483C16.635 12.4637 16.573 12.4714 16.509 12.4714C16.376 12.4714 16.245 12.4378 16.128 12.3715L14.311 11.3443C13.955 11.1418 13.835 10.7002 14.045 10.3584C14.254 10.0157 14.712 9.90048 15.073 10.103L15.333 10.2499C14.735 9.04896 13.461 8.208 12 8.208C10.784 8.208 9.645 8.78112 8.953 9.74112C8.717 10.0675 8.251 10.151 7.91 9.92352C7.569 9.69696 7.484 9.24864 7.72 8.92128C8.692 7.57344 10.292 6.768 12 6.768C14.146 6.768 16.005 8.05536 16.792 9.86496L16.936 9.62976C17.143 9.28608 17.602 9.17088 17.962 9.37344C18.319 9.57408 18.439 10.0157 18.229 10.3584ZM16.279 14.5987C15.307 15.9475 13.708 16.753 11.999 16.753C9.85 16.753 7.991 15.4666 7.205 13.6589L7.063 13.8912C6.924 14.1197 6.673 14.2464 6.416 14.2464C6.287 14.2464 6.157 14.2147 6.037 14.1475C5.68 13.9469 5.56 13.5053 5.77 13.1626L6.843 11.4058C6.944 11.2406 7.109 11.1206 7.301 11.0726C7.495 11.0246 7.699 11.0525 7.871 11.1494L9.688 12.1766C10.044 12.3782 10.164 12.8198 9.954 13.1626C9.744 13.5043 9.286 13.6195 8.926 13.4179L8.66 13.2672C9.256 14.4701 10.533 15.313 11.999 15.313C13.214 15.313 14.354 14.7398 15.044 13.7798C15.279 13.4534 15.744 13.3699 16.088 13.5974C16.429 13.823 16.514 14.2723 16.279 14.5987ZM15.974 2.64H8.027C4.721 2.64 2.5 4.67808 2.5 7.70976V15.8112C2.5 18.8429 4.721 20.88 8.027 20.88H15.974C19.28 20.88 21.5 18.8429 21.5 15.8112V7.70976C21.5 4.67808 19.28 2.64 15.974 2.64Z",
16100
+ fill: "currentColor"
16101
+ })
16102
+ });
16103
+ //#endregion
16104
+ //#region src/shared/permissions/assets/person-card-icon.svg?react
16105
+ var SvgPersonCardIcon = (props) => /* @__PURE__ */ u("svg", {
16106
+ width: 24,
16107
+ height: 24,
16108
+ viewBox: "0 0 24 24",
16109
+ fill: "none",
16110
+ xmlns: "http://www.w3.org/2000/svg",
16111
+ ...props,
16112
+ children: [
16113
+ /* @__PURE__ */ u("path", {
16114
+ fillRule: "evenodd",
16115
+ clipRule: "evenodd",
16116
+ d: "M18.229 10.3584L17.156 12.1152C17.055 12.2803 16.89 12.3994 16.698 12.4483C16.635 12.4637 16.573 12.4714 16.509 12.4714C16.376 12.4714 16.245 12.4378 16.128 12.3715L14.311 11.3443C13.955 11.1418 13.835 10.7002 14.045 10.3584C14.254 10.0157 14.712 9.90048 15.073 10.103L15.333 10.2499C14.735 9.04896 13.461 8.208 12 8.208C10.784 8.208 9.645 8.78112 8.953 9.74112C8.717 10.0675 8.251 10.151 7.91 9.92352C7.569 9.69696 7.484 9.24864 7.72 8.92128C8.692 7.57344 10.292 6.768 12 6.768C14.146 6.768 16.005 8.05536 16.792 9.86496L16.936 9.62976C17.143 9.28608 17.602 9.17088 17.962 9.37344C18.319 9.57408 18.439 10.0157 18.229 10.3584ZM16.279 14.5987C15.307 15.9475 13.708 16.753 11.999 16.753C9.85 16.753 7.991 15.4666 7.205 13.6589L7.063 13.8912C6.924 14.1197 6.673 14.2464 6.416 14.2464C6.287 14.2464 6.157 14.2147 6.037 14.1475C5.68 13.9469 5.56 13.5053 5.77 13.1626L6.843 11.4058C6.944 11.2406 7.109 11.1206 7.301 11.0726C7.495 11.0246 7.699 11.0525 7.871 11.1494L9.688 12.1766C10.044 12.3782 10.164 12.8198 9.954 13.1626C9.744 13.5043 9.286 13.6195 8.926 13.4179L8.66 13.2672C9.256 14.4701 10.533 15.313 11.999 15.313C13.214 15.313 14.354 14.7398 15.044 13.7798C15.279 13.4534 15.744 13.3699 16.088 13.5974C16.429 13.823 16.514 14.2723 16.279 14.5987ZM15.974 2.64H8.027C4.721 2.64 2.5 4.67808 2.5 7.70976V15.8112C2.5 18.8429 4.721 20.88 8.027 20.88H15.974C19.28 20.88 21.5 18.8429 21.5 15.8112V7.70976C21.5 4.67808 19.28 2.64 15.974 2.64Z",
16117
+ fill: "currentColor"
16118
+ }),
16119
+ /* @__PURE__ */ u("rect", {
16120
+ x: 4,
16121
+ y: 6,
16122
+ width: 16,
16123
+ height: 12,
16124
+ fill: "currentColor"
16125
+ }),
16126
+ /* @__PURE__ */ u("path", {
16127
+ d: "M16.868 7.1333H7.80131C7.17627 7.1333 6.66797 7.6416 6.66797 8.26664V15.0667C6.66797 15.6917 7.17627 16.2 7.80131 16.2H16.868C17.493 16.2 18.0013 15.6917 18.0013 15.0667V8.26664C18.0013 7.6416 17.493 7.1333 16.868 7.1333ZM10.4731 9.39998C11.1254 9.39998 11.6065 9.88108 11.6065 10.5333C11.6065 11.1855 11.1254 11.6667 10.4731 11.6667C9.82091 11.6667 9.33981 11.1855 9.33981 10.5333C9.33981 9.88108 9.82035 9.39998 10.4731 9.39998ZM12.5783 13.9333H8.36797V13.6698C8.36797 12.8918 9.31771 12.0917 10.4731 12.0917C11.6286 12.0917 12.5783 12.8918 12.5783 13.6698V13.9333ZM16.3013 13.3667H14.0347V12.2333H16.3013V13.3667ZM16.3013 11.1H13.468V9.96664H16.3013V11.1Z",
16128
+ fill: "white"
16129
+ })
16130
+ ]
16131
+ });
16132
+ //#endregion
16133
+ //#region src/shared/permissions/assets/check-v2-icon.svg?react
16134
+ var SvgCheckV2Icon = (props) => /* @__PURE__ */ u("svg", {
16135
+ width: 24,
16136
+ height: 24,
16137
+ viewBox: "0 0 24 24",
16138
+ fill: "none",
16139
+ xmlns: "http://www.w3.org/2000/svg",
16140
+ ...props,
16141
+ children: [
16142
+ /* @__PURE__ */ u("path", {
16143
+ fillRule: "evenodd",
16144
+ clipRule: "evenodd",
16145
+ d: "M18.229 10.3584L17.156 12.1152C17.055 12.2803 16.89 12.3994 16.698 12.4483C16.635 12.4637 16.573 12.4714 16.509 12.4714C16.376 12.4714 16.245 12.4378 16.128 12.3715L14.311 11.3443C13.955 11.1418 13.835 10.7002 14.045 10.3584C14.254 10.0157 14.712 9.90048 15.073 10.103L15.333 10.2499C14.735 9.04896 13.461 8.208 12 8.208C10.784 8.208 9.645 8.78112 8.953 9.74112C8.717 10.0675 8.251 10.151 7.91 9.92352C7.569 9.69696 7.484 9.24864 7.72 8.92128C8.692 7.57344 10.292 6.768 12 6.768C14.146 6.768 16.005 8.05536 16.792 9.86496L16.936 9.62976C17.143 9.28608 17.602 9.17088 17.962 9.37344C18.319 9.57408 18.439 10.0157 18.229 10.3584ZM16.279 14.5987C15.307 15.9475 13.708 16.753 11.999 16.753C9.85 16.753 7.991 15.4666 7.205 13.6589L7.063 13.8912C6.924 14.1197 6.673 14.2464 6.416 14.2464C6.287 14.2464 6.157 14.2147 6.037 14.1475C5.68 13.9469 5.56 13.5053 5.77 13.1626L6.843 11.4058C6.944 11.2406 7.109 11.1206 7.301 11.0726C7.495 11.0246 7.699 11.0525 7.871 11.1494L9.688 12.1766C10.044 12.3782 10.164 12.8198 9.954 13.1626C9.744 13.5043 9.286 13.6195 8.926 13.4179L8.66 13.2672C9.256 14.4701 10.533 15.313 11.999 15.313C13.214 15.313 14.354 14.7398 15.044 13.7798C15.279 13.4534 15.744 13.3699 16.088 13.5974C16.429 13.823 16.514 14.2723 16.279 14.5987ZM15.974 2.64H8.027C4.721 2.64 2.5 4.67808 2.5 7.70976V15.8112C2.5 18.8429 4.721 20.88 8.027 20.88H15.974C19.28 20.88 21.5 18.8429 21.5 15.8112V7.70976C21.5 4.67808 19.28 2.64 15.974 2.64Z",
16146
+ fill: "currentColor"
16147
+ }),
16148
+ /* @__PURE__ */ u("rect", {
16149
+ x: 4,
16150
+ y: 6,
16151
+ width: 16,
16152
+ height: 12,
16153
+ fill: "currentColor"
16154
+ }),
16155
+ /* @__PURE__ */ u("path", {
16156
+ d: "M12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12C17 9.24 14.76 7 12 7ZM11 14.5L8.5 12L9.205 11.295L11 13.085L14.795 9.29L15.5 10L11 14.5Z",
16157
+ fill: "white"
16158
+ })
16159
+ ]
16160
+ });
16161
+ //#endregion
16009
16162
  //#region src/shared/permissions/assets/samsung-internet-icon.svg?react
16010
16163
  var SvgSamsungInternetIcon = (props) => /* @__PURE__ */ u("svg", {
16011
16164
  xmlns: "http://www.w3.org/2000/svg",
@@ -17382,24 +17535,20 @@ var LearnMore = ({ onAllowPermissions, onQuitProcess, "data-testid": dataTestId,
17382
17535
  };
17383
17536
  //#endregion
17384
17537
  //#region src/shared/permissions/camera/permissionsBottomSheet.tsx
17385
- function PermissionsBottomSheet({ onAllowPermissions, onDenyPermissions, showDenyButton = true }) {
17538
+ function PermissionsBottomSheet({ onAllowPermissions, onDenyPermissions, showDenyButton = true, isRequestingPermissions = false, onClose }) {
17386
17539
  const { t } = useTranslation();
17387
- const titleRef = A(null);
17388
- y(() => {
17389
- titleRef.current?.focus();
17390
- }, []);
17391
17540
  return /* @__PURE__ */ u(BottomSheet, {
17392
17541
  isOpen: true,
17393
17542
  labelledById: "permissions-dialog-title",
17543
+ manageInitialFocus: false,
17544
+ onClose,
17394
17545
  children: /* @__PURE__ */ u("div", {
17395
17546
  className: "IncodePermissionsBottomSheet",
17396
17547
  children: [/* @__PURE__ */ u("div", {
17397
17548
  class: "IncodePermissionsBottomSheetTitleContainer",
17398
- children: [/* @__PURE__ */ u(TypographyH1, {
17549
+ children: [/* @__PURE__ */ u(AutoFocusTitle, {
17399
17550
  id: "permissions-dialog-title",
17400
17551
  className: "IncodePermissionsBottomSheetTitle",
17401
- ref: titleRef,
17402
- tabIndex: -1,
17403
17552
  children: t("idv2.permissions.allowPermissionsV2")
17404
17553
  }), /* @__PURE__ */ u("p", {
17405
17554
  className: "IncodePermissionsBottomSheetSubtitle",
@@ -17410,9 +17559,12 @@ function PermissionsBottomSheet({ onAllowPermissions, onDenyPermissions, showDen
17410
17559
  children: [showDenyButton && /* @__PURE__ */ u(Button, {
17411
17560
  variant: "secondary",
17412
17561
  onClick: onDenyPermissions,
17562
+ disabled: isRequestingPermissions,
17413
17563
  children: t("idv2.permissions.dontAllow")
17414
17564
  }), /* @__PURE__ */ u(Button, {
17415
17565
  onClick: onAllowPermissions,
17566
+ disabled: isRequestingPermissions,
17567
+ isLoading: isRequestingPermissions,
17416
17568
  children: t("idv2.permissions.allowV2")
17417
17569
  })]
17418
17570
  })]
@@ -17420,34 +17572,51 @@ function PermissionsBottomSheet({ onAllowPermissions, onDenyPermissions, showDen
17420
17572
  });
17421
17573
  }
17422
17574
  //#endregion
17423
- //#region src/shared/permissions/camera/permissions.tsx
17424
- var Permissions = ({ manager, permissionStatus }) => {
17575
+ //#region src/shared/permissions/camera/permissionsDialog.tsx
17576
+ function createHandlers(manager, canDismiss) {
17577
+ if (!canDismiss) return {
17578
+ handleDismiss: void 0,
17579
+ handleOpenChange: void 0,
17580
+ handleClose: manager.close
17581
+ };
17582
+ const handleDismiss = () => {
17583
+ manager.back?.();
17584
+ };
17585
+ const handleOpenChange = (open) => {
17586
+ if (open) return;
17587
+ manager.back?.();
17588
+ };
17589
+ return {
17590
+ handleDismiss,
17591
+ handleOpenChange,
17592
+ handleClose: void 0
17593
+ };
17594
+ }
17595
+ var PermissionsDialog = ({ manager, permissionStatus, isDismissible }) => {
17425
17596
  const isMobileWidth = useIsMobileDeviceWidth();
17426
17597
  const { t } = useTranslation();
17427
- if (permissionStatus === "checking") return null;
17428
- if (permissionStatus === "requesting") return /* @__PURE__ */ u(TransitionSpinner, {
17429
- className: "IncodePermissionsRequestingPage",
17430
- presentational: true,
17431
- titleKey: "loadingCircle.holdOn",
17432
- subtitleKey: "loadingCircle.preparingCamera"
17433
- });
17434
- if (permissionStatus === "learnMore") return /* @__PURE__ */ u(LearnMore, {
17598
+ const isMotionOnly = permissionStatus === "motionOnly";
17599
+ const isRequestingPermissions = permissionStatus === "requesting";
17600
+ const canDismiss = Boolean(isDismissible) && !isRequestingPermissions;
17601
+ const dismissible = !isRequestingPermissions;
17602
+ const { handleDismiss, handleOpenChange, handleClose } = createHandlers(manager, canDismiss);
17603
+ if (isMobileWidth) return /* @__PURE__ */ u(PermissionsBottomSheet, {
17604
+ showDenyButton: !isMotionOnly,
17435
17605
  onAllowPermissions: () => manager.requestPermission(),
17436
- onQuitProcess: () => manager.close(),
17437
- "data-testid": "permissions",
17438
- "data-permission-status": "learnMore"
17606
+ onDenyPermissions: () => manager.goToLearnMore(),
17607
+ isRequestingPermissions,
17608
+ onClose: handleDismiss
17439
17609
  });
17440
- if (permissionStatus === "denied") return /* @__PURE__ */ u(Denied, {
17441
- onRefresh: () => window.location.reload(),
17442
- "data-testid": "permissions",
17443
- "data-permission-status": "denied"
17444
- });
17445
- const isMotionOnly = permissionStatus === "motionOnly";
17446
- let ModalComponent = null;
17447
- if (!isMobileWidth) ModalComponent = /* @__PURE__ */ u(Modal.Root, {
17610
+ return /* @__PURE__ */ u(Modal.Root, {
17448
17611
  open: true,
17612
+ dismissible,
17613
+ onOpenChange: handleOpenChange,
17449
17614
  children: /* @__PURE__ */ u(Modal.Content, { children: [
17450
- /* @__PURE__ */ u(Modal.Close, { onClick: manager.close }),
17615
+ /* @__PURE__ */ u(Modal.Close, {
17616
+ "aria-label": t("common.close"),
17617
+ title: t("common.close"),
17618
+ onClick: handleClose
17619
+ }),
17451
17620
  /* @__PURE__ */ u(Modal.TitleSection, { children: [/* @__PURE__ */ u(Modal.Title, {
17452
17621
  class: "IncodePermissionsModalTitle",
17453
17622
  children: t("idv2.permissions.allowPermissionsV2")
@@ -17455,18 +17624,38 @@ var Permissions = ({ manager, permissionStatus }) => {
17455
17624
  /* @__PURE__ */ u(Modal.Actions, { children: [!isMotionOnly && /* @__PURE__ */ u(Button, {
17456
17625
  variant: "secondary",
17457
17626
  onClick: manager.goToLearnMore,
17627
+ disabled: isRequestingPermissions,
17458
17628
  children: t("idv2.permissions.dontAllow")
17459
17629
  }), /* @__PURE__ */ u(Button, {
17460
17630
  variant: "primary",
17461
17631
  onClick: manager.requestPermission,
17632
+ disabled: isRequestingPermissions,
17633
+ isLoading: isRequestingPermissions,
17462
17634
  children: t("idv2.permissions.allowV2")
17463
17635
  })] })
17464
17636
  ] })
17465
17637
  });
17466
- else ModalComponent = /* @__PURE__ */ u(PermissionsBottomSheet, {
17467
- showDenyButton: !isMotionOnly,
17468
- onAllowPermissions: manager.requestPermission,
17469
- onDenyPermissions: manager.goToLearnMore
17638
+ };
17639
+ //#endregion
17640
+ //#region src/shared/permissions/camera/permissions.tsx
17641
+ var Permissions = ({ manager, permissionStatus }) => {
17642
+ if (permissionStatus === "checking") return null;
17643
+ if (permissionStatus === "requesting") return /* @__PURE__ */ u(TransitionSpinner, {
17644
+ className: "IncodePermissionsRequestingPage",
17645
+ presentational: true,
17646
+ titleKey: "loadingCircle.holdOn",
17647
+ subtitleKey: "loadingCircle.preparingCamera"
17648
+ });
17649
+ if (permissionStatus === "learnMore") return /* @__PURE__ */ u(LearnMore, {
17650
+ onAllowPermissions: () => manager.requestPermission(),
17651
+ onQuitProcess: () => manager.close(),
17652
+ "data-testid": "permissions",
17653
+ "data-permission-status": "learnMore"
17654
+ });
17655
+ if (permissionStatus === "denied") return /* @__PURE__ */ u(Denied, {
17656
+ onRefresh: () => window.location.reload(),
17657
+ "data-testid": "permissions",
17658
+ "data-permission-status": "denied"
17470
17659
  });
17471
17660
  return /* @__PURE__ */ u(Page, {
17472
17661
  className: "IncodePermissionsPage",
@@ -17474,7 +17663,10 @@ var Permissions = ({ manager, permissionStatus }) => {
17474
17663
  hideFooterBranding: true,
17475
17664
  "data-testid": "permissions",
17476
17665
  "data-permission-status": permissionStatus,
17477
- children: ModalComponent
17666
+ children: /* @__PURE__ */ u(PermissionsDialog, {
17667
+ manager,
17668
+ permissionStatus
17669
+ })
17478
17670
  });
17479
17671
  };
17480
17672
  //#endregion
@@ -18378,6 +18570,262 @@ var useCaptureResultPreview = (state) => {
18378
18570
  };
18379
18571
  };
18380
18572
  //#endregion
18573
+ //#region src/modules/id/capture/captureHelpers.ts
18574
+ /**
18575
+ * Which layer(s) the capture screen mounts.
18576
+ *
18577
+ * The crossfade wins outright while it runs: on the IDC-05 treatment the machine
18578
+ * commits the frame on its own clock, so `uploading` arrives *before* the fade
18579
+ * rather than after it, and letting `uploading` win would hard-cut the live
18580
+ * layer away mid-animation.
18581
+ *
18582
+ * A `present` phase keeps the live layer mounted through the manual-capture
18583
+ * result preview, where a committed `previewImageUrl` already exists but the frozen still
18584
+ * is deliberately still on screen.
18585
+ */
18586
+ function getCaptureStageView(state, phase) {
18587
+ if (!state.previewImageUrl) return "live";
18588
+ if (phase === "exiting") return "crossfade";
18589
+ if (phase === "present") return "live";
18590
+ return state.captureStatus === "uploading" ? "analyzing" : "live";
18591
+ }
18592
+ function getCaptureMode(state) {
18593
+ return state.currentMode === "passport" ? "passport" : "id";
18594
+ }
18595
+ /**
18596
+ * Whether the manual-capture button is on screen right now: either the
18597
+ * genuine auto-capture-failed fallback (`detectionStatus === 'manualCapture'`)
18598
+ * or the `showCaptureButtonInAuto` shortcut (autocapture still running, button
18599
+ * offered as an optional shortcut). Shared by `Capture`'s render and
18600
+ * `useManualTooltipExperiment`'s sticky latch so the two can't drift apart.
18601
+ */
18602
+ function isManualCaptureShown(state) {
18603
+ return state.detectionStatus === "manualCapture" || state.showCaptureButtonInAuto && state.captureStatus === "detecting" && state.detectionStatus !== "capturing";
18604
+ }
18605
+ //#endregion
18606
+ //#region src/modules/id/experiments/constants.ts
18607
+ var CAMERA_PERMISSION_UX = {
18608
+ CONTROL: "control",
18609
+ PENDING: "pending",
18610
+ PERMISSION_SHEET: "permissionSheet",
18611
+ HOW_IT_WORKS: "howItWorks"
18612
+ };
18613
+ var ID_CAPTURE_STATUS = {
18614
+ TUTORIAL: "tutorial",
18615
+ PERMISSIONS: "permissions",
18616
+ LOADING: "loading"
18617
+ };
18618
+ /** Underlying machine phases core collapses into `status: 'loading'`. */
18619
+ var ID_CAPTURE_LOADING_PHASE = { PERMISSIONS_IDLE: "permissionsIdle" };
18620
+ /** Underlying machine phases core collapses into `status: 'tutorial'`. */
18621
+ var ID_CAPTURE_TUTORIAL_PHASE = {
18622
+ CHECKING_PERMISSION: "checkingPermission",
18623
+ READY: "ready",
18624
+ INITIALIZING_CAMERA: "initializingCamera",
18625
+ WAITING_FOR_PERMISSION: "waitingForPermission",
18626
+ WAITING_FOR_CAMERA: "waitingForCamera"
18627
+ };
18628
+ /** Tutorial phases where the user has already continued and the CTA must show busy. */
18629
+ var CONTINUING_TUTORIAL_PHASES = new Set([ID_CAPTURE_TUTORIAL_PHASE.WAITING_FOR_PERMISSION, ID_CAPTURE_TUTORIAL_PHASE.WAITING_FOR_CAMERA]);
18630
+ var PERMISSION_DIALOG_STATUS = {
18631
+ IDLE: "idle",
18632
+ MOTION_ONLY: "motionOnly",
18633
+ REQUESTING: "requesting"
18634
+ };
18635
+ var EXPERIMENT_LIFECYCLE_STATUS = { PENDING: "pending" };
18636
+ /** IDC-08 arms — console-owned values, kebab-case `auto-dismiss` included. */
18637
+ var MANUAL_TOOLTIP = {
18638
+ CONTROL: "control",
18639
+ REMOVE: "remove",
18640
+ AUTO_DISMISS: "auto-dismiss"
18641
+ };
18642
+ var MANUAL_TOOLTIP_VARIANTS = [
18643
+ MANUAL_TOOLTIP.CONTROL,
18644
+ MANUAL_TOOLTIP.REMOVE,
18645
+ MANUAL_TOOLTIP.AUTO_DISMISS
18646
+ ];
18647
+ /**
18648
+ * Today's shipped CSS dwell (`manualCaptureTooltipExit` animation-delay) — the
18649
+ * control arm's behavior, so also the param default: an unallocated/control
18650
+ * session that omits `autoDismissIntervalMs` must reproduce this exactly, not
18651
+ * the treatment's shortened dwell.
18652
+ */
18653
+ var MANUAL_TOOLTIP_DISMISS_DELAY_MS = 3500;
18654
+ /** One `experimentAssigned` per session (default — today's product decision). */
18655
+ var MANUAL_TOOLTIP_DEDUPE_RULE_ONCE = "once";
18656
+ /** One `experimentAssigned` per (ID-module allocation, side). */
18657
+ var MANUAL_TOOLTIP_DEDUPE_RULE_PER_CAPTURE = "per-capture";
18658
+ //#endregion
18659
+ //#region src/modules/id/experiments/idExperiments.ts
18660
+ /**
18661
+ * Code-owned registry of ID-module UI experiments. Each entry is a
18662
+ * self-describing object param on `onboarding_web_sdk_ps`; see
18663
+ * `useIdExperiment` for how it is read and reported.
18664
+ */
18665
+ var ID_EXPERIMENTS = {
18666
+ flipCapturedCard: {
18667
+ storeParam: "idcExp07FlipInCaptureState",
18668
+ module: eventModuleNames.idCapture,
18669
+ ...defineExperimentParams({ shouldFlipCapturedCard: booleanParam(false) })
18670
+ },
18671
+ cameraPermissionSheet: {
18672
+ storeParam: "idcExp01PermissionSheet",
18673
+ module: eventModuleNames.idCapture,
18674
+ ...defineExperimentParams({ showPermissionSheet: booleanParam(false) })
18675
+ },
18676
+ darkCameraLoading: {
18677
+ storeParam: "idcExp04DarkCameraLoading",
18678
+ module: eventModuleNames.idCapture,
18679
+ ...defineExperimentParams({ showDarkCameraLoading: booleanParam(false) })
18680
+ },
18681
+ cameraPermissionHowItWorks: {
18682
+ storeParam: "idcExp02HowItWorks",
18683
+ module: eventModuleNames.idCapture,
18684
+ ...defineExperimentParams({ showHowItWorks: booleanParam(false) })
18685
+ },
18686
+ manualTooltip: {
18687
+ storeParam: "idcExp08ManualTooltip",
18688
+ module: eventModuleNames.idCapture,
18689
+ ...defineExperimentParams({
18690
+ manualTooltipVariant: enumParam(MANUAL_TOOLTIP.CONTROL, MANUAL_TOOLTIP_VARIANTS),
18691
+ autoDismissIntervalMs: numberParam(MANUAL_TOOLTIP_DISMISS_DELAY_MS, {
18692
+ min: 0,
18693
+ max: 1e4,
18694
+ integer: true
18695
+ })
18696
+ })
18697
+ }
18698
+ };
18699
+ //#endregion
18700
+ //#region src/experiments/makeUseModuleExperiment.ts
18701
+ /**
18702
+ * Builds a per-module experiment hook bound to `registry` (e.g.
18703
+ * `ID_EXPERIMENTS`). Each experiment is a self-describing object param on the
18704
+ * shared `onboarding_web_sdk_ps` store; the hook resolves it once at the
18705
+ * visibility site (single-phase read — exposure logged on that read).
18706
+ */
18707
+ function makeUseModuleExperiment(registry) {
18708
+ return function useModuleExperiment({ key, enabled = true, reportAssignment = true, dedupeKey, conditions }) {
18709
+ const spec = registry[key];
18710
+ const { value: store, status } = useFeatureManagement("parameterStore", ONBOARDING_WEB_SDK_PARAMETER_STORE);
18711
+ const conditionsKey = conditions ? JSON.stringify(conditions) : "";
18712
+ const resolvedDedupeKey = dedupeKey ?? spec.storeParam;
18713
+ const resolved = T(() => enabled && status === "ready" ? resolveExperiment(spec, { store }) : {
18714
+ params: { ...spec.defaults },
18715
+ assignment: null
18716
+ }, [
18717
+ enabled,
18718
+ status,
18719
+ store,
18720
+ spec
18721
+ ]);
18722
+ const assignment = resolved.assignment;
18723
+ const variant = typeof assignment?.variant === "string" ? assignment.variant : null;
18724
+ y(() => {
18725
+ if (!assignment || !reportAssignment) return;
18726
+ recordExperimentAssignmentOnce(spec.module, resolvedDedupeKey, {
18727
+ ...assignment,
18728
+ conditions: conditionsKey ? JSON.parse(conditionsKey) : void 0
18729
+ });
18730
+ }, [
18731
+ assignment,
18732
+ reportAssignment,
18733
+ spec,
18734
+ resolvedDedupeKey,
18735
+ conditionsKey
18736
+ ]);
18737
+ return {
18738
+ variant,
18739
+ status,
18740
+ params: resolved.params
18741
+ };
18742
+ };
18743
+ }
18744
+ //#endregion
18745
+ //#region src/modules/id/experiments/useIdExperiment.ts
18746
+ /**
18747
+ * ID-module binding of `makeUseModuleExperiment` (see `@/experiments` for
18748
+ * the shared parameter-store/analytics-gate/assignment-recording mechanics),
18749
+ * bound to `ID_EXPERIMENTS`.
18750
+ *
18751
+ * Pass `enabled: false` for a surface/mode the treatment can never apply to
18752
+ * (e.g. passport in `flipCapturedCard`) so that surface neither logs an
18753
+ * exposure nor records an assignment; `params` still resolves to the
18754
+ * registry-declared defaults so callers don't need a separate
18755
+ * branch.
18756
+ */
18757
+ var useIdExperiment = makeUseModuleExperiment(ID_EXPERIMENTS);
18758
+ //#endregion
18759
+ //#region src/modules/id/experiments/useManualTooltipExperiment.ts
18760
+ /**
18761
+ * IDC-08: resolves the manual-capture tooltip/title arm.
18762
+ *
18763
+ * A timing constraint the shared `useIdExperiment` hook doesn't cover on its
18764
+ * own:
18765
+ *
18766
+ * **Expose at capture entry, report at treatment show (else at commit).**
18767
+ * The arm is resolved (and Statsig-exposed) from the first render of
18768
+ * `Capture` so the exposed population stays symmetric across arms, but the
18769
+ * `experimentAssigned` interview-event lands at the first of two moments:
18770
+ * the render where the manual-capture surface (the thing the arms actually
18771
+ * change) becomes visible — so a session that sees the treatment and then
18772
+ * abandons is still counted — or, for sessions that never show it, once a
18773
+ * frame is committed. Reporting a never-shown session before commit would
18774
+ * misdescribe it: `showedManualCapture: false` could still flip to `true`,
18775
+ * but the first-wins dedupe would have already locked it in.
18776
+ * `reportAssignment` gates the report without re-gating (and so
18777
+ * re-exposing) the resolve.
18778
+ *
18779
+ * Reporting granularity is remote-selectable via
18780
+ * `MANUAL_TOOLTIP_DEDUPE_RULE_PARAM` (ships ahead of the PM/mobile sync on
18781
+ * the final rule, so it can be flipped without a code change): `'once'`
18782
+ * (default) is one `experimentAssigned` per session — `Capture` unmounts
18783
+ * between the front and back side, so whichever side reports first is the
18784
+ * one the event describes, and the other side's report is a no-op.
18785
+ * `'per-capture'` is one event per (ID-module allocation, side) instead — see
18786
+ * `getManualTooltipDedupeKey`.
18787
+ */
18788
+ function useManualTooltipExperiment(manager, state) {
18789
+ const { value: onboardingParameterStore } = useFeatureManagement("parameterStore", ONBOARDING_WEB_SDK_PARAMETER_STORE, { disableExposureLog: true });
18790
+ const dedupeKey = getManualTooltipDedupeKey(onboardingParameterStore, manager, state);
18791
+ const showedManualCaptureRef = A(false);
18792
+ if (isManualCaptureShown(state)) showedManualCaptureRef.current = true;
18793
+ const { params, status } = useIdExperiment({
18794
+ key: "manualTooltip",
18795
+ enabled: true,
18796
+ reportAssignment: showedManualCaptureRef.current || state.captureStatus === "uploading" || state.captureStatus === "holdOn",
18797
+ dedupeKey,
18798
+ conditions: { showedManualCapture: showedManualCaptureRef.current }
18799
+ });
18800
+ let dismissDelayMs = MANUAL_TOOLTIP_DISMISS_DELAY_MS;
18801
+ if (status === EXPERIMENT_LIFECYCLE_STATUS.PENDING) return {
18802
+ variant: MANUAL_TOOLTIP.CONTROL,
18803
+ dismissDelayMs
18804
+ };
18805
+ if (params.manualTooltipVariant === MANUAL_TOOLTIP.AUTO_DISMISS) dismissDelayMs = params.autoDismissIntervalMs;
18806
+ return {
18807
+ variant: params.manualTooltipVariant,
18808
+ dismissDelayMs
18809
+ };
18810
+ }
18811
+ var captureOccurrences = /* @__PURE__ */ new WeakMap();
18812
+ var nextCaptureOccurrence = 1;
18813
+ function getCaptureOccurrence(manager) {
18814
+ let occurrence = captureOccurrences.get(manager);
18815
+ if (occurrence === void 0) {
18816
+ occurrence = nextCaptureOccurrence++;
18817
+ captureOccurrences.set(manager, occurrence);
18818
+ }
18819
+ return occurrence;
18820
+ }
18821
+ function getManualTooltipDedupeKey(store, manager, state) {
18822
+ const dedupeRule = store.get("idcExp08ManualTooltipDedupeRule", "once") === "per-capture" ? MANUAL_TOOLTIP_DEDUPE_RULE_PER_CAPTURE : MANUAL_TOOLTIP_DEDUPE_RULE_ONCE;
18823
+ const captureInstance = getCaptureOccurrence(manager);
18824
+ const base = ID_EXPERIMENTS.manualTooltip.storeParam;
18825
+ if (dedupeRule === "once") return base;
18826
+ return `${base}:${captureInstance}:${state.currentMode}:${state.attemptsRemaining}`;
18827
+ }
18828
+ //#endregion
18381
18829
  //#region src/modules/id/shared/captureFrame.tsx
18382
18830
  var CaptureFrame = ({ orientation, mode, state, children, className }) => {
18383
18831
  const isHorizontal = orientation !== "vertical";
@@ -18611,66 +19059,6 @@ var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitl
18611
19059
  });
18612
19060
  };
18613
19061
  //#endregion
18614
- //#region src/experiments/makeUseModuleExperiment.ts
18615
- /**
18616
- * Builds a per-module experiment hook bound to `registry` (e.g.
18617
- * `ID_EXPERIMENTS`). Each experiment is a self-describing object param on the
18618
- * shared `onboarding_web_sdk_ps` store; the hook resolves it once at the
18619
- * visibility site (single-phase read — exposure logged on that read).
18620
- */
18621
- function makeUseModuleExperiment(registry) {
18622
- return function useModuleExperiment({ key, enabled = true, conditions }) {
18623
- const spec = registry[key];
18624
- const { value: store, status } = useFeatureManagement("parameterStore", ONBOARDING_WEB_SDK_PARAMETER_STORE, { enabled });
18625
- const conditionsKey = conditions ? JSON.stringify(conditions) : "";
18626
- const resolved = T(() => enabled && status === "ready" ? resolveExperiment(spec, { store }) : {
18627
- params: { ...spec.defaults },
18628
- assignment: null
18629
- }, [
18630
- enabled,
18631
- status,
18632
- store,
18633
- spec
18634
- ]);
18635
- const assignment = resolved.assignment;
18636
- const variant = typeof assignment?.variant === "string" ? assignment.variant : null;
18637
- y(() => {
18638
- if (!assignment) return;
18639
- recordExperimentAssignmentOnce(spec.module, spec.storeParam, {
18640
- ...assignment,
18641
- conditions: conditionsKey ? JSON.parse(conditionsKey) : void 0
18642
- });
18643
- }, [
18644
- assignment,
18645
- spec,
18646
- conditionsKey
18647
- ]);
18648
- return {
18649
- variant,
18650
- status,
18651
- params: resolved.params
18652
- };
18653
- };
18654
- }
18655
- //#endregion
18656
- //#region src/modules/id/experiments/useIdExperiment.ts
18657
- /**
18658
- * ID-module binding of `makeUseModuleExperiment` (see `@/experiments` for
18659
- * the shared parameter-store/analytics-gate/assignment-recording mechanics),
18660
- * bound to `ID_EXPERIMENTS`.
18661
- *
18662
- * Pass `enabled: false` for a surface/mode the treatment can never apply to
18663
- * (e.g. passport in `flipCapturedCard`) so that surface neither logs an
18664
- * exposure nor records an assignment; `params` still resolves to the
18665
- * registry-declared defaults so callers don't need a separate
18666
- * branch.
18667
- */
18668
- var useIdExperiment = makeUseModuleExperiment({ flipCapturedCard: {
18669
- storeParam: "idcExp07FlipInCaptureState",
18670
- module: eventModuleNames.idCapture,
18671
- ...defineExperimentParams({ shouldFlipCapturedCard: booleanParam(false) })
18672
- } });
18673
- //#endregion
18674
19062
  //#region src/modules/id/processing/idSuccess.tsx
18675
19063
  var IdSuccess = ({ manager, state, blurImage }) => {
18676
19064
  const { t } = useTranslation();
@@ -19380,7 +19768,19 @@ var resolveResultView = (t) => ({
19380
19768
  subtitle: t("idv2.capture.resultPreview.subtitle")
19381
19769
  }
19382
19770
  });
19383
- var resolveLiveView = ({ t, mode, detectionStatus, isCapturing }) => {
19771
+ /** IDC-08 control/default copy — the title's shared idle vocabulary. */
19772
+ function getFillFrameTitle(t, mode) {
19773
+ if (mode === "passport") return t("idv2.capture.fillFramePassport");
19774
+ else if (mode === "back") return t("idv2.capture.fillFrameBack");
19775
+ return t("idv2.capture.fillFrameFront");
19776
+ }
19777
+ /** IDC-08 `remove`/`auto-dismiss` title — states the action instead of "fill the frame". */
19778
+ function getManualCaptureTitle(t, mode) {
19779
+ if (mode === "passport") return t("idv2.capture.manualCapture.capturePassport");
19780
+ else if (mode === "back") return t("idv2.capture.manualCapture.captureBack");
19781
+ return t("idv2.capture.manualCapture.captureFront");
19782
+ }
19783
+ var resolveLiveView = ({ t, mode, detectionStatus, isCapturing, showManualCapture, manualTooltipVariant }) => {
19384
19784
  if (isCapturing || detectionStatus === "capturing") return {
19385
19785
  frameState: "capturing",
19386
19786
  header: {
@@ -19394,26 +19794,31 @@ var resolveLiveView = ({ t, mode, detectionStatus, isCapturing }) => {
19394
19794
  frameState: hasDetectionError ? "error" : "idle",
19395
19795
  header: null
19396
19796
  };
19397
- const subtitle = isManualCapture ? "" : t("idv2.capture.autoCapture");
19797
+ const isManualTooltipTreatment = showManualCapture && manualTooltipVariant !== MANUAL_TOOLTIP.CONTROL;
19798
+ const title = isManualTooltipTreatment ? getManualCaptureTitle(t, mode) : getFillFrameTitle(t, mode);
19799
+ let subtitle = t("idv2.capture.autoCapture");
19800
+ if (isManualTooltipTreatment && manualTooltipVariant === MANUAL_TOOLTIP.REMOVE) subtitle = t("idv2.capture.manualCapture.pressButton");
19801
+ else if (isManualCapture) subtitle = "";
19398
19802
  return {
19399
19803
  frameState: "idle",
19400
19804
  header: {
19401
- title: mode === "passport" ? t("idv2.capture.fillFramePassport") : mode === "back" ? t("idv2.capture.fillFrameBack") : t("idv2.capture.fillFrameFront"),
19805
+ title,
19402
19806
  subtitle
19403
19807
  }
19404
19808
  };
19405
19809
  };
19406
19810
  //#endregion
19407
19811
  //#region src/modules/id/capture/captureOverlay.tsx
19408
- var MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATION = "manualCaptureTooltipExit";
19409
- var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCapturing, showManualCapture, onCapture, onOpenHelp, helpButtonRef, captureButtonRef, hideFooterActions, resultPreview }, ref) => {
19812
+ var MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATIONS = ["manualCaptureTooltipExit", "manualCaptureTooltipExitAutoDismiss"];
19813
+ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCapturing, showManualCapture, onCapture, onOpenHelp, helpButtonRef, captureButtonRef, hideFooterActions, resultPreview, manualTooltipUx }, ref) => {
19410
19814
  const { t } = useTranslation();
19411
19815
  usePreloadCaptureAnimations();
19412
19816
  const isResultPreview = resultPreview !== void 0;
19817
+ const isTooltipRemoved = manualTooltipUx.variant === MANUAL_TOOLTIP.REMOVE;
19413
19818
  const hasShownIdHintRef = A(false);
19414
19819
  const cameraOverlayHeaderTitleRef = A(null);
19415
19820
  const [showIdHint, setShowIdHint] = d(false);
19416
- const [manualCaptureTooltipDismissed, setManualCaptureTooltipDismissed] = d(false);
19821
+ const [manualCaptureTooltipDismissed, setManualCaptureTooltipDismissed] = d(isTooltipRemoved);
19417
19822
  y(() => {
19418
19823
  if (detectionStatus === "idNotDetected") {
19419
19824
  if (hasShownIdHintRef.current) return;
@@ -19424,10 +19829,10 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
19424
19829
  if (showIdHint) setShowIdHint(false);
19425
19830
  }, [detectionStatus, showIdHint]);
19426
19831
  y(() => {
19427
- if (!showManualCapture) setManualCaptureTooltipDismissed(false);
19428
- }, [showManualCapture]);
19832
+ if (!showManualCapture) setManualCaptureTooltipDismissed(isTooltipRemoved);
19833
+ }, [showManualCapture, isTooltipRemoved]);
19429
19834
  const handleManualCaptureTooltipAnimationEnd = (event) => {
19430
- if (event.animationName !== MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATION) return;
19835
+ if (!MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATIONS.includes(event.animationName)) return;
19431
19836
  setManualCaptureTooltipDismissed(true);
19432
19837
  };
19433
19838
  y(() => {
@@ -19441,18 +19846,23 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
19441
19846
  t,
19442
19847
  mode,
19443
19848
  detectionStatus,
19444
- isCapturing
19849
+ isCapturing,
19850
+ showManualCapture,
19851
+ manualTooltipVariant: manualTooltipUx.variant
19445
19852
  }), [
19446
19853
  isResultPreview,
19447
19854
  t,
19448
19855
  mode,
19449
19856
  detectionStatus,
19450
- isCapturing
19857
+ isCapturing,
19858
+ showManualCapture,
19859
+ manualTooltipUx.variant
19451
19860
  ]);
19452
19861
  const isPassport = mode === "passport";
19453
19862
  const frameOrientation = orientation !== "vertical" ? "horizontal" : "vertical";
19454
- const showManualCaptureTooltip = !isResultPreview && showManualCapture && !manualCaptureTooltipDismissed;
19863
+ const showManualCaptureNode = !isResultPreview && showManualCapture;
19455
19864
  const showCounter = isCapturing && counterValue > 0;
19865
+ const captureAriaLabel = header?.title ? `${header.title}. ${t("manualCapture.ariaLabel")}` : void 0;
19456
19866
  const manualCaptureTooltip = /* @__PURE__ */ u("div", {
19457
19867
  id: "manual-capture-tooltip",
19458
19868
  class: "IncodeIdManualCaptureTooltip",
@@ -19504,12 +19914,14 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
19504
19914
  onOpenHelp,
19505
19915
  onCapture,
19506
19916
  isManualCapture: showManualCapture,
19917
+ captureAriaLabel,
19507
19918
  helpButtonRef,
19508
19919
  captureButtonRef,
19509
- captureAriaDescribedBy: showManualCaptureTooltip ? "manual-capture-tooltip" : void 0,
19920
+ captureAriaDescribedBy: showManualCaptureNode ? "manual-capture-tooltip" : void 0,
19510
19921
  hideActions: hideFooterActions,
19511
- children: showManualCaptureTooltip ? /* @__PURE__ */ u("div", {
19512
- class: "IncodeIdManualCaptureTooltipContainer",
19922
+ children: showManualCaptureNode ? /* @__PURE__ */ u("div", {
19923
+ class: cn("IncodeIdManualCaptureTooltipContainer", manualTooltipUx.variant === MANUAL_TOOLTIP.AUTO_DISMISS && "IncodeIdManualCaptureTooltipContainerAutoDismiss", manualCaptureTooltipDismissed && "IncodeIdManualCaptureTooltipContainerSrOnly"),
19924
+ style: { "--manual-capture-tooltip-dismiss-delay": `${manualTooltipUx.dismissDelayMs}ms` },
19513
19925
  onAnimationEnd: handleManualCaptureTooltipAnimationEnd,
19514
19926
  children: manualCaptureTooltip
19515
19927
  }) : null
@@ -19518,32 +19930,10 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
19518
19930
  });
19519
19931
  });
19520
19932
  //#endregion
19521
- //#region src/modules/id/capture/captureHelpers.ts
19522
- /**
19523
- * Which layer(s) the capture screen mounts.
19524
- *
19525
- * The crossfade wins outright while it runs: on the IDC-05 treatment the machine
19526
- * commits the frame on its own clock, so `uploading` arrives *before* the fade
19527
- * rather than after it, and letting `uploading` win would hard-cut the live
19528
- * layer away mid-animation.
19529
- *
19530
- * A `present` phase keeps the live layer mounted through the manual-capture
19531
- * result preview, where a committed `previewImageUrl` already exists but the frozen still
19532
- * is deliberately still on screen.
19533
- */
19534
- function getCaptureStageView(state, phase) {
19535
- if (!state.previewImageUrl) return "live";
19536
- if (phase === "exiting") return "crossfade";
19537
- if (phase === "present") return "live";
19538
- return state.captureStatus === "uploading" ? "analyzing" : "live";
19539
- }
19540
- function getCaptureMode(state) {
19541
- return state.currentMode === "passport" ? "passport" : "id";
19542
- }
19543
- //#endregion
19544
19933
  //#region src/modules/id/capture/capture.tsx
19545
19934
  var Capture = ({ manager, state }) => {
19546
19935
  const { enabled: resultPreviewEnabled, phase: resultPreviewPhase, isResultPreview, resultPreviewImageUrl, onCrossfadeEnd } = useCaptureResultPreview(state);
19936
+ const manualTooltipUx = useManualTooltipExperiment(manager, state);
19547
19937
  const stageView = getCaptureStageView(state, resultPreviewPhase);
19548
19938
  const isCrossfadeStage = stageView === "crossfade";
19549
19939
  const isLiveStage = stageView === "live";
@@ -19582,7 +19972,8 @@ var Capture = ({ manager, state }) => {
19582
19972
  state,
19583
19973
  isResultPreview,
19584
19974
  resultPreviewImageUrl,
19585
- hideFooterActions: !isLiveStage
19975
+ hideFooterActions: !isLiveStage,
19976
+ manualTooltipUx
19586
19977
  })
19587
19978
  }, "live");
19588
19979
  return /* @__PURE__ */ u("div", {
@@ -19590,7 +19981,7 @@ var Capture = ({ manager, state }) => {
19590
19981
  children: [idAnalyzingSlot, captureViewSlot]
19591
19982
  });
19592
19983
  };
19593
- var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hideFooterActions }) => {
19984
+ var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hideFooterActions, manualTooltipUx }) => {
19594
19985
  const frameRef = A(null);
19595
19986
  const helpButtonRef = A(null);
19596
19987
  const captureButtonRef = A(null);
@@ -19610,8 +20001,7 @@ var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hid
19610
20001
  useEventListener("resize", reportFrame);
19611
20002
  useResizeObserver(frameRef, reportFrame);
19612
20003
  const isCapturing = !isResultPreview && (state.captureStatus === "capturing" || state.detectionStatus === "capturing");
19613
- const detectionStatus = state.detectionStatus;
19614
- const showManualCapture = detectionStatus === "manualCapture" || state.showCaptureButtonInAuto && state.captureStatus === "detecting" && detectionStatus !== "capturing";
20004
+ const showManualCapture = isManualCaptureShown(state);
19615
20005
  const resultPreview = isResultPreview && resultPreviewImageUrl ? {
19616
20006
  imageUrl: resultPreviewImageUrl,
19617
20007
  blurImage: state.ageAssurance
@@ -19657,7 +20047,8 @@ var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hid
19657
20047
  helpButtonRef,
19658
20048
  captureButtonRef,
19659
20049
  resultPreview,
19660
- hideFooterActions
20050
+ hideFooterActions,
20051
+ manualTooltipUx
19661
20052
  })
19662
20053
  }),
19663
20054
  /* @__PURE__ */ u("div", { ref: portalRef }),
@@ -19701,30 +20092,66 @@ var ManualCaptureButton = ({ onClick, disabled, isPassport }) => {
19701
20092
  });
19702
20093
  };
19703
20094
  //#endregion
20095
+ //#region src/modules/id/tutorialHelpers.ts
20096
+ /**
20097
+ * Resolves the tutorial's animation and copy for one document/side pairing.
20098
+ *
20099
+ * The three shapes are mutually exclusive, so each returns whole — passport
20100
+ * wins over side, matching the order the screen's copy was authored in.
20101
+ */
20102
+ function getTutorialContent(t, isPassport, isBack, disclaimerText) {
20103
+ let adjustedDisclaimerText;
20104
+ if (isBack) adjustedDisclaimerText = t("idv2.backTutorial.disclaimer");
20105
+ else adjustedDisclaimerText = t("idv2.tutorial.v2.autocapture");
20106
+ if (disclaimerText) adjustedDisclaimerText = disclaimerText;
20107
+ if (isPassport) return {
20108
+ animationKey: "id.tutorial.passport",
20109
+ title: t("idv2.capture.passport.title"),
20110
+ subtitle: t("idv2.capture.passport.subtitle"),
20111
+ disclaimerText: adjustedDisclaimerText
20112
+ };
20113
+ if (isBack) return {
20114
+ animationKey: "id.tutorial.back",
20115
+ title: t("idv2.backTutorial.title"),
20116
+ subtitle: t("idv2.backTutorial.subtitle"),
20117
+ disclaimerText: adjustedDisclaimerText
20118
+ };
20119
+ return {
20120
+ animationKey: "id.tutorial.front",
20121
+ title: t("idv2.tutorial.title"),
20122
+ subtitle: t("idv2.tutorial.subtitle"),
20123
+ disclaimerText: adjustedDisclaimerText
20124
+ };
20125
+ }
20126
+ //#endregion
19704
20127
  //#region src/modules/id/tutorial.tsx
19705
- var Tutorial = ({ manager, state }) => {
20128
+ var Tutorial = ({ manager, documentType, mode, isLoading: isLoadingProp, actionsSlot, onContinue, disclaimerText, shouldScaleAnimationContainer = true }) => {
19706
20129
  const { t } = useTranslation();
19707
- const [isLoading, setIsLoading] = d(false);
19708
- const isPassport = state.selectedDocumentType === "passport";
19709
- const isBack = state.currentMode === "back";
19710
- const { data: animationData, isOverride } = useAnimationData(isPassport ? "id.tutorial.passport" : isBack ? "id.tutorial.back" : "id.tutorial.front");
19711
- const title = isPassport ? t("idv2.capture.passport.title") : isBack ? t("idv2.backTutorial.title") : t("idv2.tutorial.title");
19712
- const subtitle = isPassport ? t("idv2.capture.passport.subtitle") : isBack ? t("idv2.backTutorial.subtitle") : t("idv2.tutorial.subtitle");
19713
- const disclaimerText = isBack ? t("idv2.backTutorial.disclaimer") : t("idv2.tutorial.v2.autocapture");
20130
+ const [internalIsLoading, setInternalIsLoading] = d(false);
20131
+ const isLoading = isLoadingProp ?? internalIsLoading;
20132
+ const isPassport = documentType === "passport";
20133
+ const tutorialContent = getTutorialContent(t, isPassport, mode === "back", disclaimerText);
20134
+ const { data: animationData, isOverride } = useAnimationData(tutorialContent.animationKey);
19714
20135
  const handleContinue = async () => {
19715
- setIsLoading(true);
20136
+ if (isLoadingProp === void 0) setInternalIsLoading(true);
20137
+ if (onContinue) {
20138
+ onContinue();
20139
+ return;
20140
+ }
19716
20141
  await manager.nextStep();
19717
20142
  };
19718
20143
  return /* @__PURE__ */ u(BaseTutorial, {
19719
20144
  animationData,
19720
20145
  recolor: !isOverride,
19721
- title,
19722
- subtitle,
20146
+ title: tutorialContent.title,
20147
+ subtitle: tutorialContent.subtitle,
19723
20148
  onContinue: handleContinue,
19724
20149
  buttonText: t("idv2.tutorial.startScan"),
19725
- disclaimerText,
20150
+ disclaimerText: tutorialContent.disclaimerText,
19726
20151
  isLoading,
19727
- className: cn("IncodeIdTutorial", isPassport ? "IncodeIdTutorialPassport" : "IncodeIdTutorialId")
20152
+ actionsSlot,
20153
+ className: cn("IncodeIdTutorial", isPassport ? "IncodeIdTutorialPassport" : "IncodeIdTutorialId"),
20154
+ shouldScaleAnimationContainer
19728
20155
  });
19729
20156
  };
19730
20157
  //#endregion
@@ -20864,4 +21291,4 @@ var FlipAnimation = ({ manager, direction }) => {
20864
21291
  });
20865
21292
  };
20866
21293
  //#endregion
20867
- export { VerificationResult as $, TextArea as A, getCountryByCode as B, CameraOverlayHeader as C, VerificationOptionCard as D, BottomSheet as E, PhoneInputComposed as F, formatResendTimer as G, translateError as H, countryFlagEmoji as I, InputComposed as J, useResendTimerAnnouncements as K, getCountryDisplayName as L, RadioButtonComposed as M, SegmentedDateInput as N, VerificationOptionCardList as O, DateInputComposed as P, StatusPage as Q, countries as R, CameraView as S, useManager as St, CameraFrame as T, Checkbox as U, FormField as V, OtpInput as W, ProgressBar as X, Input as Y, ConnectionError as Z, Permissions as _, useIsMobileDeviceWidth as _t, Capture as a, AutoFocusTitle as at, ManualCapture as b, useModuleTerminalCallbacks as bt, IdNoAttempts as c, ResolvedConfigProvider as ct, IdError as d, Page as dt, ErrorContent as et, useIdExperiment as f, VerifiedByIncodeLogo as ft, ManualCaptureButton$1 as g, useTimeoutHandle as gt, Capture$1 as h, useFeatureManagement as ht, ManualCaptureButton as i, LandscapeBlocker as it, RadioGroupComposed as j, TextAreaComposed as k, IdExpired as l, useHasResolvedConfig as lt, Tutorial$1 as m, TransitionSpinner as mt, Chooser as n, Overlay as nt, CaptureNotification as o, Snackbar as ot, CaptureFrame as p, usePageUiConfig as pt, PasswordInputComposed as q, Tutorial as r, IncodeComponent as rt, preloadCaptureAnimations as s, withStandaloneModuleBootstrap as st, FlipAnimation as t, Processing as tt, ExpiredId as u, TerminalErrorPage as ut, NumberedStep as v, useFormScrollable as vt, CameraOverlay as w, CaptureFooter as x, useScreenOrientation as xt, BaseTutorial as y, isTerminalModuleState as yt, getCountryByCallingCode as z };
21294
+ export { Checkbox as $, ManualCapture as A, useModuleTerminalCallbacks as At, TextArea as B, Permissions as C, usePageUiConfig as Ct, SvgPersonCardIcon as D, useIsMobileDeviceWidth as Dt, SvgCheckV2Icon as E, useTimeoutHandle as Et, CameraFrame as F, PhoneInputComposed as G, RadioButtonComposed as H, BottomSheet as I, countries as J, countryFlagEmoji as K, VerificationOptionCard as L, CameraView as M, useManager as Mt, CameraOverlayHeader as N, SvgReloadIcon as O, useFormScrollable as Ot, CameraOverlay as P, translateError as Q, VerificationOptionCardList as R, ManualCaptureButton$1 as S, VerifiedByIncodeLogo as St, NumberedStep as T, useFeatureManagement as Tt, SegmentedDateInput as U, RadioGroupComposed as V, DateInputComposed as W, getCountryByCode as X, getCountryByCallingCode as Y, FormField as Z, ID_CAPTURE_LOADING_PHASE as _, withStandaloneModuleBootstrap as _t, Capture as a, Input as at, Tutorial$1 as b, TerminalErrorPage as bt, IdNoAttempts as c, StatusPage as ct, IdError as d, Processing as dt, OtpInput as et, CaptureFrame as f, Overlay as ft, EXPERIMENT_LIFECYCLE_STATUS as g, Snackbar as gt, CONTINUING_TUTORIAL_PHASES as h, AutoFocusTitle as ht, ManualCaptureButton as i, InputComposed as it, CaptureFooter as j, useScreenOrientation as jt, BaseTutorial as k, isTerminalModuleState as kt, IdExpired as l, VerificationResult as lt, CAMERA_PERMISSION_UX as m, LandscapeBlocker as mt, Chooser as n, useResendTimerAnnouncements as nt, CaptureNotification as o, ProgressBar as ot, useIdExperiment as p, IncodeComponent as pt, getCountryDisplayName as q, Tutorial as r, PasswordInputComposed as rt, preloadCaptureAnimations as s, ConnectionError as st, FlipAnimation as t, formatResendTimer as tt, ExpiredId as u, ErrorContent as ut, ID_CAPTURE_STATUS as v, ResolvedConfigProvider as vt, PermissionsDialog as w, TransitionSpinner as wt, Capture$1 as x, Page as xt, PERMISSION_DIALOG_STATUS as y, useHasResolvedConfig as yt, TextAreaComposed as z };