@incodetech/web 2.1.0-rc.2 → 2.1.0-rc.3

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 (153) hide show
  1. package/dist/ae-signature/ae-signature.es.js +2 -2
  2. package/dist/ae-signature/styles.css +59 -45
  3. package/dist/antifraud/antifraud.es.js +4 -4
  4. package/dist/authentication/authentication.es.js +5 -4
  5. package/dist/base.css +87 -59
  6. package/dist/{button-Ch5-QgHB.js → button-Dz6AsbmF.js} +2 -1
  7. package/dist/cameraView-DIEzM5ru.js +47 -0
  8. package/dist/{tutorial-Cap8qKvM.js → capture-CkGvdDNH.js} +18 -568
  9. package/dist/certificate-issuance/certificate-issuance.es.js +7 -7
  10. package/dist/consent/consent.es.js +8 -8
  11. package/dist/{countrySelector-B4WuNUya.js → countrySelector-SvUOyPo0.js} +1 -1
  12. package/dist/cpf-ocr/cpf-ocr.es.js +1 -1
  13. package/dist/cpfOcr-B79245-3.js +2 -0
  14. package/dist/{cpfOcr-liTE9e70.js → cpfOcr-BhxT-lRN.js} +5 -5
  15. package/dist/cross-document-data-match/cross-document-data-match.es.js +4 -4
  16. package/dist/curp-validation/curp-validation.es.js +7 -7
  17. package/dist/{customFields-BQ4scZfL.js → customFields-BDsXR7A-.js} +6 -6
  18. package/dist/{customWatchlist-7s0_wGtE.js → customWatchlist-CYoRNCim.js} +5 -5
  19. package/dist/document-capture/document-capture.es.js +1 -1
  20. package/dist/documentCapture-DXYYyxZl.js +2 -0
  21. package/dist/{documentCapture-CwoSD_Iq.js → documentCapture-DhbO-A-V.js} +11 -9
  22. package/dist/{dynamicForms-DvTU65bW.js → dynamicForms-BifGbC9F.js} +19 -8
  23. package/dist/ekyb/ekyb.es.js +1 -1
  24. package/dist/ekybModule-C6Nttked.js +2 -0
  25. package/dist/{ekybModule-CwZvxios.js → ekybModule-DGnTw5UV.js} +12 -12
  26. package/dist/ekyc/ekyc.es.js +1 -1
  27. package/dist/ekycModule-CDIEjI6V.js +2 -0
  28. package/dist/{ekycModule-jkXByPXe.js → ekycModule-Dxpdd0ns.js} +10 -10
  29. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  30. package/dist/{electronic-signature-h1sAGg7l.js → electronic-signature-Ueoffasr.js} +37 -26
  31. package/dist/email/email.es.js +7 -7
  32. package/dist/{emailInput-BRMJMJV6.js → emailInput-DsLkDtER.js} +5 -5
  33. package/dist/{expiredId-D17oN5K2.js → expiredId-BZXLrLk-.js} +4 -4
  34. package/dist/{extensibility-CTmAsaji.js → extensibility-7sRIN0JC.js} +41 -76
  35. package/dist/extensibility.es.js +13 -11
  36. package/dist/face-match/face-match.es.js +1 -1
  37. package/dist/face-match/styles.css +4 -0
  38. package/dist/faceMatch-B_HvxLm_.js +2 -0
  39. package/dist/{faceMatch-Dez_bq3n.js → faceMatch-DyTBoMDm.js} +8 -8
  40. package/dist/field-comparison/field-comparison.es.js +1 -1
  41. package/dist/fieldComparison-DfNEuEE5.js +2 -0
  42. package/dist/{fieldComparison-BelzSC48.js → fieldComparison-L_knHqgw.js} +7 -7
  43. package/dist/fiscal-qr/fiscal-qr.es.js +8 -7
  44. package/dist/flow/flow.es.js +22 -9
  45. package/dist/flow/styles.css +4151 -3042
  46. package/dist/geolocation/geolocation.es.js +14 -9
  47. package/dist/{governmentValidation/governmentValidation.es.js → government-validation/government-validation.es.js} +10 -14
  48. package/dist/{homeScreen-BIdVm9KA.js → homeScreen-B6T0JVh8.js} +2 -2
  49. package/dist/{hooks-Da_yP_Dr.js → hooks-CNu7o-v8.js} +39 -2
  50. package/dist/{i18n-DoP1NB7u.js → i18n-CU4xq8qC.js} +1 -1
  51. package/dist/id/id.es.js +76 -46
  52. package/dist/id/styles.css +1 -9
  53. package/dist/id-ocr/styles.css +12 -2
  54. package/dist/id-verification/id-verification.es.js +5 -5
  55. package/dist/{idOcr-C4K2XVJr.js → idOcr-WFBvqy3b.js} +31 -13
  56. package/dist/identity-reuse/identity-reuse.es.js +6 -6
  57. package/dist/{incodeComponent-Cmi1rlWs.js → incodeComponent-CfzJGETt.js} +2 -2
  58. package/dist/{incodeModule-M8DszCee.js → incodeModule-B-4_3JrK.js} +1 -1
  59. package/dist/index.es.js +1 -1
  60. package/dist/{mandatoryConsent-DOQ0DKgM.js → mandatoryConsent-D0GTKu-H.js} +7 -7
  61. package/dist/{optionAccessibleLabel-_nvVCTSL.js → optionAccessibleLabel-gfF-58Mv.js} +3 -3
  62. package/dist/{otpInput-Q_kzSZeD.js → otpInput-CnDc6pQm.js} +12 -11
  63. package/dist/{pdf-BMUXKJuC.js → pdf-BqtJTlor.js} +1 -1
  64. package/dist/{pdfViewer-BewML6eg.js → pdfViewer-B97DmT9m.js} +57 -20
  65. package/dist/phone/phone.es.js +6 -6
  66. package/dist/{processing-Boki1Z8j.js → processing-BeUMfdJJ.js} +1 -1
  67. package/dist/qe-signature/qe-signature.es.js +2 -2
  68. package/dist/{radioGroupComposed-TuAWUAFK.js → radioGroupComposed-DuQxslB2.js} +1 -1
  69. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +17 -18
  70. package/dist/redirect-to-mobile/styles.css +2 -2
  71. package/dist/{richText-DsTP4H3j.js → richText-CB1fmegc.js} +1 -1
  72. package/dist/selfie/selfie.es.js +8 -7
  73. package/dist/selfie/styles.css +133 -63
  74. package/dist/signature/signature.es.js +8 -8
  75. package/dist/spinner-BCDCoi9C.js +1 -0
  76. package/dist/{spinner-BRNNKqPN.js → spinner-BMeIEK1d.js} +12 -6
  77. package/dist/themes/dark.css +16 -0
  78. package/dist/themes/light.css +16 -0
  79. package/dist/{transitionSpinner-4rPkt-KM.js → transitionSpinner-CuNCqHNi.js} +9 -8
  80. package/dist/tutorial-CCfPuVKX.js +706 -0
  81. package/dist/types/ae-signature.d.ts +23 -1
  82. package/dist/types/antifraud.d.ts +23 -1
  83. package/dist/types/authentication.d.ts +23 -1
  84. package/dist/types/certificate-issuance.d.ts +23 -1
  85. package/dist/types/consent.d.ts +23 -1
  86. package/dist/types/cross-document-data-match.d.ts +23 -1
  87. package/dist/types/curp-validation.d.ts +23 -1
  88. package/dist/types/document-capture.d.ts +23 -1
  89. package/dist/types/ekyb.d.ts +23 -1
  90. package/dist/types/ekyc.d.ts +23 -1
  91. package/dist/types/electronic-signature.d.ts +23 -1
  92. package/dist/types/email.d.ts +23 -1
  93. package/dist/types/extensibility.d.ts +39 -2
  94. package/dist/types/face-match.d.ts +23 -1
  95. package/dist/types/field-comparison.d.ts +23 -1
  96. package/dist/types/fiscal-qr.d.ts +23 -1
  97. package/dist/types/flow.d.ts +23 -1
  98. package/dist/types/geolocation.d.ts +27 -2
  99. package/dist/types/{governmentValidation.d.ts → government-validation.d.ts} +23 -1
  100. package/dist/types/id-verification.d.ts +23 -1
  101. package/dist/types/id.d.ts +23 -1
  102. package/dist/types/identity-reuse.d.ts +23 -1
  103. package/dist/types/phone.d.ts +23 -1
  104. package/dist/types/qe-signature.d.ts +23 -1
  105. package/dist/types/selfie.d.ts +23 -1
  106. package/dist/types/signature.d.ts +23 -1
  107. package/dist/types/video-selfie.d.ts +72 -0
  108. package/dist/types/watchlist.d.ts +23 -1
  109. package/dist/types/workflow.d.ts +23 -1
  110. package/dist/{useModuleLoader-Kt78XfNR.js → useModuleLoader-Gvo9qscB.js} +38 -23
  111. package/dist/{verificationResult-B6PBXbp9.js → verificationResult-BWWkmeiA.js} +3 -3
  112. package/dist/video-selfie/styles.css +1644 -0
  113. package/dist/video-selfie/video-selfie.es.js +854 -0
  114. package/dist/watchlist/watchlist.es.js +5 -5
  115. package/dist/{watchlistForBusiness-DCKlKG81.js → watchlistForBusiness-D2Uo_TwF.js} +7 -7
  116. package/dist/workflow/styles.css +148 -76
  117. package/dist/workflow/workflow.es.js +23 -27
  118. package/package.json +29 -2
  119. package/dist/cpfOcr-BJOYoITy.js +0 -2
  120. package/dist/documentCapture-3RHCHepT.js +0 -2
  121. package/dist/ekybModule-BkVQBQvW.js +0 -2
  122. package/dist/ekycModule-BIbj7hr1.js +0 -2
  123. package/dist/faceMatch-C0-RPzrc.js +0 -2
  124. package/dist/fieldComparison-7FUznk_9.js +0 -2
  125. package/dist/spinner-zRaUjXtH.js +0 -1
  126. /package/dist/{aligndevicelottie-DMXPhIDs.js → aligndevicelottie-DFscByAI.js} +0 -0
  127. /package/dist/{back-horizontal-hint-DNIIDrEW.js → back-horizontal-hint-xTnSQbzn.js} +0 -0
  128. /package/dist/{back-tutorial-B8JJSJBB.js → back-tutorial-cI_4VHmE.js} +0 -0
  129. /package/dist/{back-vertical-hint-CW6ZS7bP.js → back-vertical-hint-BWWlHfX2.js} +0 -0
  130. /package/dist/{backdevicelottie-By75Bznp.js → backdevicelottie-COyhTrxM.js} +0 -0
  131. /package/dist/{blurdevicelottie-C_9VAHkM.js → blurdevicelottie-BLVeJHEG.js} +0 -0
  132. /package/dist/{browser-ponyfill-C_DpU0lQ.js → browser-ponyfill-Df13Th-G.js} +0 -0
  133. /package/dist/{defineProperty-CTu-cLWm.js → defineProperty-Qjefk7Uf.js} +0 -0
  134. /package/dist/{flip-animation-st9bra1p.js → flip-animation-CZYSUtMm.js} +0 -0
  135. /package/dist/{front-horizontal-hint-DvME-aVk.js → front-horizontal-hint-B84GgTO1.js} +0 -0
  136. /package/dist/{front-vertical-hint-BUG1VMsP.js → front-vertical-hint-Bs_avngq.js} +0 -0
  137. /package/dist/{frontdevicelottie-uObOEs8p.js → frontdevicelottie-B4tE2PYQ.js} +0 -0
  138. /package/dist/{glaredevicelottie-CsfIgqIc.js → glaredevicelottie-D1pR73sx.js} +0 -0
  139. /package/dist/{governmentValidation → government-validation}/styles.css +0 -0
  140. /package/dist/{id-laser-h-BvVSaLyU.js → id-laser-h-CzPegPMn.js} +0 -0
  141. /package/dist/{id-laser-v-Dj_RN_s9.js → id-laser-v-BiUXkM4x.js} +0 -0
  142. /package/dist/{id-tutorial-BOOsXlAJ.js → id-tutorial-DwO90SAm.js} +0 -0
  143. /package/dist/{lottie_light-BG-RL2Iu.js → lottie_light-C6B2ec41.js} +0 -0
  144. /package/dist/{numberedStep-Dc0BUU-j.js → numberedStep-CEb-lFJm.js} +0 -0
  145. /package/dist/{passport-horizontal-hint-BhpVt73n.js → passport-horizontal-hint-Bj0ZJY0g.js} +0 -0
  146. /package/dist/{passport-tutorial-CeSup6m9.js → passport-tutorial-D9JNsMsM.js} +0 -0
  147. /package/dist/{passport-vertical-hint-CVRBnZXS.js → passport-vertical-hint-Dfk77xUJ.js} +0 -0
  148. /package/dist/{registerIncodeElement-CdlNRRv5.js → registerIncodeElement-DaNjbAwZ.js} +0 -0
  149. /package/dist/{requiredLabelHint-DX3oVNtu.js → requiredLabelHint-D0RhuMed.js} +0 -0
  150. /package/dist/{selfieTutorial-CYa8bq6B.js → selfieTutorial-pB-N-fj5.js} +0 -0
  151. /package/dist/{snackbar-CGL6gp9u.js → snackbar-DS7Mv62v.js} +0 -0
  152. /package/dist/{statusPage-BUm5gtQY.js → statusPage-Bk8nJwXV.js} +0 -0
  153. /package/dist/{tabs-DUkWjBGk.js → tabs-C__chW-u.js} +0 -0
@@ -1,195 +1,17 @@
1
- import { r as __toESM } from "./rolldown-runtime--E5BIlTp.js";
2
- import { n as useTranslation, t as Trans } from "./i18n-DoP1NB7u.js";
3
- import { _ as y, a as D, h as q, l as A, m as g, p as d, v as u, x as k } from "./vendor-preact-DThS2ZQ_.js";
4
- import { r as useIsMobileDeviceWidth } from "./hooks-Da_yP_Dr.js";
5
- import { n as cn, r as Spacer, t as LoadingIcon } from "./loadingIcon-B0ysgiNq.js";
1
+ import { n as useTranslation, t as Trans } from "./i18n-CU4xq8qC.js";
2
+ import { _ as y, h as q, l as A, m as g, v as u, x as k } from "./vendor-preact-DThS2ZQ_.js";
3
+ import { a as useIsMobileDeviceWidth } from "./hooks-CNu7o-v8.js";
4
+ import { n as cn, r as Spacer } from "./loadingIcon-B0ysgiNq.js";
6
5
  import { t as Page } from "./page-DidH_RkX.js";
7
6
  import { i as TypographyH4, n as TypographyH1, t as Title } from "./typography-BZIpjo97.js";
8
- import { t as TransitionSpinner } from "./transitionSpinner-4rPkt-KM.js";
9
- import { t as Button } from "./button-Ch5-QgHB.js";
10
- import { t as ErrorIcon } from "./errorIcon-BA4T6iy-.js";
7
+ import { t as TransitionSpinner } from "./transitionSpinner-CuNCqHNi.js";
8
+ import { t as Button } from "./button-Dz6AsbmF.js";
11
9
  import { h as WarningIcon } from "./icons-CJJbIpBq.js";
12
- import { t as SuccessIcon } from "./successIcon-B5mGvdx1.js";
13
10
  import { t as Modal } from "./modal-OxkFuuiR.js";
14
11
  import { t as BottomSheet } from "./bottomSheet-CnWbbUAM.js";
15
- import { t as NumberedStep } from "./numberedStep-Dc0BUU-j.js";
12
+ import { t as NumberedStep } from "./numberedStep-CEb-lFJm.js";
16
13
  import { getBrowser, getDeviceClass } from "@incodetech/core/device";
17
14
  import "@incodetech/core/camera";
18
- //#region src/shared/errorContent/errorContent.tsx
19
- var ErrorContent = ({ title, description, attemptsRemaining, onButtonClick, "data-testid": testId }) => {
20
- const { t } = useTranslation();
21
- const noMoreAttempts = attemptsRemaining <= 0;
22
- const titleRef = A(null);
23
- y(() => {
24
- titleRef.current?.focus();
25
- }, []);
26
- return /* @__PURE__ */ u(Modal.Root, {
27
- open: true,
28
- dismissible: false,
29
- hasBackdrop: false,
30
- manageInitialFocus: false,
31
- class: "IncodeErrorContent",
32
- children: /* @__PURE__ */ u(Modal.Content, {
33
- class: "IncodeErrorContentContent",
34
- children: /* @__PURE__ */ u(Page, {
35
- "data-testid": testId,
36
- className: "IncodeErrorContentPage",
37
- children: /* @__PURE__ */ u("div", {
38
- class: "IncodeErrorContentContainer",
39
- children: [/* @__PURE__ */ u("div", {
40
- class: "IncodeErrorContentIconContainer",
41
- children: [
42
- noMoreAttempts ? /* @__PURE__ */ u(ErrorIcon, { size: 32 }) : /* @__PURE__ */ u(WarningIcon, { size: 32 }),
43
- /* @__PURE__ */ u(Spacer, { size: 16 }),
44
- /* @__PURE__ */ u(Title, {
45
- ref: titleRef,
46
- id: "incode-modal-title",
47
- tabIndex: -1,
48
- className: "IncodeErrorContentTitle",
49
- children: title
50
- }),
51
- /* @__PURE__ */ u(Spacer, { size: 12 }),
52
- /* @__PURE__ */ u("p", {
53
- class: "IncodeErrorContentDescription",
54
- children: description
55
- })
56
- ]
57
- }), /* @__PURE__ */ u("div", {
58
- class: "IncodeErrorContentAttemptsContainer",
59
- children: [
60
- !noMoreAttempts ? /* @__PURE__ */ u("p", {
61
- class: "IncodeErrorContentAttemptsText",
62
- children: t("common.attemptsRemaining", { count: attemptsRemaining })
63
- }) : null,
64
- /* @__PURE__ */ u(Spacer, { size: 24 }),
65
- /* @__PURE__ */ u(Button, {
66
- onClick: onButtonClick,
67
- children: noMoreAttempts ? t("common.continue") : t("common.tryAgain")
68
- })
69
- ]
70
- })]
71
- })
72
- })
73
- })
74
- });
75
- };
76
- //#endregion
77
- //#region src/shared/lottie/lottie.tsx
78
- var lottiePromise = null;
79
- async function loadLottie() {
80
- if (lottiePromise) return lottiePromise;
81
- lottiePromise = import("./lottie_light-BG-RL2Iu.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1)).then((mod) => mod.default);
82
- return lottiePromise;
83
- }
84
- var AUTO_STOP_AFTER_MS = 5e3;
85
- function Lottie({ animationData, loop = true, autoplay = true, reverse = false, style, className, onComplete, autoStop = false, stopFramePosition }) {
86
- const containerRef = A(null);
87
- const effectiveAutoplay = reverse ? false : autoplay;
88
- const animationOptionsRef = A({
89
- container: containerRef.current,
90
- renderer: "svg",
91
- loop,
92
- autoplay: effectiveAutoplay,
93
- animationData
94
- });
95
- y(() => {
96
- animationOptionsRef.current = {
97
- container: containerRef.current,
98
- renderer: "svg",
99
- loop,
100
- autoplay: effectiveAutoplay,
101
- animationData
102
- };
103
- }, [
104
- animationData,
105
- loop,
106
- effectiveAutoplay
107
- ]);
108
- y(() => {
109
- if (!containerRef.current) return;
110
- let anim;
111
- let stopTimer;
112
- let isMounted = true;
113
- loadLottie().then((lottie) => {
114
- if (!isMounted) return;
115
- anim = lottie.loadAnimation(animationOptionsRef.current);
116
- if (reverse) {
117
- anim.setDirection(-1);
118
- anim.goToAndPlay(anim.totalFrames - 1, true);
119
- }
120
- if (onComplete) anim.addEventListener("complete", onComplete);
121
- if (autoStop) stopTimer = window.setTimeout(() => {
122
- const current = anim;
123
- if (!current) return;
124
- if (!stopFramePosition) {
125
- current.pause();
126
- return;
127
- }
128
- const totalFrames = current.totalFrames;
129
- if (!totalFrames || totalFrames <= 0) {
130
- current.stop();
131
- return;
132
- }
133
- const targetFrame = stopFramePosition === "last" ? Math.max(totalFrames - 1, 0) : stopFramePosition === "first" ? 0 : Math.floor((totalFrames - 1) / 2);
134
- current.goToAndStop(targetFrame, true);
135
- }, AUTO_STOP_AFTER_MS);
136
- });
137
- return () => {
138
- isMounted = false;
139
- if (stopTimer !== void 0) window.clearTimeout(stopTimer);
140
- if (anim) {
141
- if (onComplete) anim.removeEventListener("complete", onComplete);
142
- anim.destroy();
143
- }
144
- };
145
- }, [
146
- onComplete,
147
- reverse,
148
- autoStop,
149
- stopFramePosition
150
- ]);
151
- return /* @__PURE__ */ u("div", {
152
- ref: containerRef,
153
- style,
154
- className,
155
- "aria-hidden": "true"
156
- });
157
- }
158
- //#endregion
159
- //#region src/shared/baseTutorial/baseTutorial.tsx
160
- var BaseTutorial = ({ className = "", animationData, title, titleId, subtitle, onContinue, buttonText, disclaimerText, isLoading, stopFramePosition = "middle" }) => {
161
- return /* @__PURE__ */ u(Page, {
162
- className: cn("IncodeTutorialPage", className),
163
- title,
164
- titleId,
165
- subtitle,
166
- children: [/* @__PURE__ */ u("div", {
167
- class: "IncodeBaseTutorialContainer",
168
- children: /* @__PURE__ */ u("div", {
169
- class: "IncodeBaseTutorialAnimationContainer",
170
- "aria-hidden": "true",
171
- children: animationData ? /* @__PURE__ */ u(Lottie, {
172
- animationData,
173
- className: "IncodeBaseTutorialAnimation",
174
- autoStop: true,
175
- stopFramePosition
176
- }) : null
177
- })
178
- }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("p", {
179
- class: "IncodeBaseTutorialDisclaimer",
180
- children: disclaimerText
181
- }), /* @__PURE__ */ u("div", {
182
- class: "IncodeBaseTutorialButtonContainer",
183
- children: /* @__PURE__ */ u(Button, {
184
- onClick: onContinue,
185
- class: "m-auto max-w-[420px]",
186
- isLoading,
187
- children: buttonText
188
- })
189
- })] })]
190
- });
191
- };
192
- //#endregion
193
15
  //#region src/shared/permissions/camera/boldWithArrow.tsx
194
16
  var BoldWithArrow = ({ i18nKey }) => /* @__PURE__ */ u("span", {
195
17
  class: "IncodeBoldWithArrow",
@@ -2221,7 +2043,11 @@ var Permissions = ({ manager, permissionStatus }) => {
2221
2043
  const { t } = useTranslation();
2222
2044
  if (permissionStatus === "requesting") return /* @__PURE__ */ u(TransitionSpinner, {
2223
2045
  className: "IncodePermissionsRequestingPage",
2224
- hideText: true
2046
+ presentational: true,
2047
+ spinnerConfig: {
2048
+ title: t("loadingCircle.holdOn"),
2049
+ subtitle: t("loadingCircle.preparingCamera")
2050
+ }
2225
2051
  });
2226
2052
  if (permissionStatus === "learnMore") return /* @__PURE__ */ u(LearnMore, {
2227
2053
  onAllowPermissions: () => manager.requestPermission(),
@@ -2267,179 +2093,7 @@ var Permissions = ({ manager, permissionStatus }) => {
2267
2093
  });
2268
2094
  };
2269
2095
  //#endregion
2270
- //#region src/modules/selfie/captureStatusPage.tsx
2271
- var CaptureStatusPage = ({ icon, title, className, isLoading }) => {
2272
- const titleRef = A(null);
2273
- y(() => {
2274
- titleRef.current?.focus();
2275
- }, []);
2276
- return /* @__PURE__ */ u(Page, {
2277
- className: `IncodeCaptureStatusPage ${className ?? ""}`,
2278
- children: [/* @__PURE__ */ u(Spacer, { size: 40 }), /* @__PURE__ */ u("div", {
2279
- class: "IncodeCaptureStatusContainer",
2280
- role: isLoading ? "status" : void 0,
2281
- "aria-live": isLoading ? "polite" : void 0,
2282
- children: [
2283
- /* @__PURE__ */ u(Spacer, { size: 120 }),
2284
- icon,
2285
- /* @__PURE__ */ u(Spacer, { size: 16 }),
2286
- /* @__PURE__ */ u(Title, {
2287
- ref: titleRef,
2288
- className: "IncodeCaptureStatusTitle",
2289
- tabIndex: -1,
2290
- children: title
2291
- })
2292
- ]
2293
- })]
2294
- });
2295
- };
2296
- //#endregion
2297
- //#region src/modules/selfie/errorModal.tsx
2298
- var defaultError = {
2299
- title: "Something went wrong",
2300
- description: "Please try again later"
2301
- };
2302
- var errorContent = {
2303
- MASK_ERROR: {
2304
- title: "notifications.mask",
2305
- description: "notifications.maskDescription"
2306
- },
2307
- BRIGHTNESS_ERROR: {
2308
- title: "notifications.brightness",
2309
- description: "notifications.brightnessDescription"
2310
- },
2311
- LIVENESS_ERROR: {
2312
- title: "notifications.spoof",
2313
- description: "notifications.spoofDescription"
2314
- },
2315
- CLOSED_EYES_ERROR: {
2316
- title: "notifications.closedEyes",
2317
- description: "notifications.closedEyesDescription"
2318
- },
2319
- HEAD_COVER_ERROR: {
2320
- title: "notifications.removeHeadwear",
2321
- description: "notifications.removeHeadwearDescription"
2322
- },
2323
- LENSES_ERROR: {
2324
- title: "notifications.lenses",
2325
- description: "notifications.lensesDescription"
2326
- },
2327
- FACE_NOT_FOUND: {
2328
- title: "notifications.faceNotFound",
2329
- description: "notifications.faceNotFoundDescription"
2330
- },
2331
- MULTIPLE_FACES: {
2332
- title: "notifications.multiple",
2333
- description: "notifications.multipleDescription"
2334
- },
2335
- TOO_BLURRY_ERROR: defaultError,
2336
- TOO_DARK_ERROR: defaultError,
2337
- SERVER_ERROR: defaultError,
2338
- FACE_CROPPING_FAILED: defaultError,
2339
- FACE_TOO_SMALL: defaultError,
2340
- PROCESSING_ERROR: defaultError,
2341
- BAD_REQUEST: defaultError,
2342
- USER_IS_NOT_RECOGNIZED: {
2343
- title: "notifications.accessDenied",
2344
- description: "notifications.accessDeniedDescription"
2345
- },
2346
- SPOOF_ATTEMPT_DETECTED: {
2347
- title: "notifications.spoof",
2348
- description: "notifications.spoofDescription"
2349
- },
2350
- FACE_TOO_DARK: {
2351
- title: "notifications.brightness",
2352
- description: "notifications.brightnessDescription"
2353
- },
2354
- LENSES_DETECTED: {
2355
- title: "notifications.lenses",
2356
- description: "notifications.lensesDescription"
2357
- },
2358
- FACE_MASK_DETECTED: {
2359
- title: "notifications.mask",
2360
- description: "notifications.maskDescription"
2361
- },
2362
- CLOSED_EYES_DETECTED: {
2363
- title: "notifications.closedEyes",
2364
- description: "notifications.closedEyesDescription"
2365
- },
2366
- HEAD_COVER_DETECTED: {
2367
- title: "notifications.removeHeadwear",
2368
- description: "notifications.removeHeadwearDescription"
2369
- },
2370
- FACE_TOO_BLURRY: {
2371
- title: "notifications.spoof",
2372
- description: "notifications.spoofDescription"
2373
- },
2374
- BAD_PHOTO_QUALITY: {
2375
- title: "notifications.lowQualityImage",
2376
- description: "notifications.lowQualityImageDescription"
2377
- },
2378
- NONEXISTENT_CUSTOMER: {
2379
- title: "notifications.nonexistentCustomer",
2380
- description: "notifications.nonexistentCustomerDescription"
2381
- },
2382
- HINT_NOT_PROVIDED: {
2383
- title: "notifications.hintNotProvided",
2384
- description: "notifications.hintNotProvidedDescription"
2385
- },
2386
- SELFIE_IMAGE_LOW_QUALITY: {
2387
- title: "notifications.selfieImageLowQuality",
2388
- description: "notifications.selfieImageLowQualityDescription"
2389
- }
2390
- };
2391
- var ERROR_CODES = [
2392
- "LIVENESS_ERROR",
2393
- "BRIGHTNESS_ERROR",
2394
- "LENSES_ERROR",
2395
- "MASK_ERROR",
2396
- "CLOSED_EYES_ERROR",
2397
- "HEAD_COVER_ERROR",
2398
- "SERVER_ERROR",
2399
- "FACE_NOT_FOUND",
2400
- "MULTIPLE_FACES",
2401
- "TOO_BLURRY_ERROR",
2402
- "TOO_DARK_ERROR",
2403
- "USER_IS_NOT_RECOGNIZED",
2404
- "SPOOF_ATTEMPT_DETECTED",
2405
- "FACE_TOO_DARK",
2406
- "LENSES_DETECTED",
2407
- "FACE_MASK_DETECTED",
2408
- "CLOSED_EYES_DETECTED",
2409
- "HEAD_COVER_DETECTED",
2410
- "FACE_CROPPING_FAILED",
2411
- "FACE_TOO_SMALL",
2412
- "FACE_TOO_BLURRY",
2413
- "BAD_PHOTO_QUALITY",
2414
- "PROCESSING_ERROR",
2415
- "BAD_REQUEST",
2416
- "NONEXISTENT_CUSTOMER",
2417
- "HINT_NOT_PROVIDED",
2418
- "SELFIE_IMAGE_LOW_QUALITY"
2419
- ];
2420
- var parseErrorCode = (error) => {
2421
- const upperError = error.toUpperCase();
2422
- if (upperError.includes("HTTP 400") || upperError.includes("BAD_REQUEST")) return "BAD_REQUEST";
2423
- if (upperError.includes("HTTP 500") || upperError.includes("SERVER_ERROR")) return "SERVER_ERROR";
2424
- for (const code of ERROR_CODES) if (upperError.includes(code)) return code;
2425
- return null;
2426
- };
2427
- var ErrorModal = ({ error, attemptsRemaining, onTryAgain }) => {
2428
- const { t } = useTranslation();
2429
- if (!error) return null;
2430
- const { title, description } = errorContent[parseErrorCode(error) ?? error] ?? defaultError;
2431
- const titleText = t(title) ?? title;
2432
- const descriptionText = attemptsRemaining <= 0 ? t("notifications.selfieCaptureFailedDescription") : t(description);
2433
- return /* @__PURE__ */ u(ErrorContent, {
2434
- "data-testid": "face-capture-error-modal",
2435
- title: titleText,
2436
- description: descriptionText,
2437
- attemptsRemaining,
2438
- onButtonClick: onTryAgain
2439
- });
2440
- };
2441
- //#endregion
2442
- //#region src/modules/selfie/faceOutline.tsx
2096
+ //#region src/shared/capture/faceOutline.tsx
2443
2097
  var FaceOutline = () => {
2444
2098
  return /* @__PURE__ */ u("svg", {
2445
2099
  width: "292",
@@ -2457,7 +2111,7 @@ var FaceOutline = () => {
2457
2111
  });
2458
2112
  };
2459
2113
  //#endregion
2460
- //#region src/modules/selfie/loadingBorder.tsx
2114
+ //#region src/shared/capture/loadingBorder.tsx
2461
2115
  var IDLE_COLOR = "var(--surface-neutral-100)";
2462
2116
  var getColor = (borderState) => {
2463
2117
  switch (borderState) {
@@ -2520,65 +2174,7 @@ var LoadingBorder = ({ borderState = "idle" }) => {
2520
2174
  });
2521
2175
  };
2522
2176
  //#endregion
2523
- //#region src/modules/selfie/cameraButton.tsx
2524
- var CameraButton = () => {
2525
- return /* @__PURE__ */ u("div", {
2526
- class: "IncodeCameraButton",
2527
- children: /* @__PURE__ */ u("svg", {
2528
- width: "64",
2529
- height: "64",
2530
- viewBox: "0 0 64 64",
2531
- fill: "none",
2532
- xmlns: "http://www.w3.org/2000/svg",
2533
- "aria-hidden": "true",
2534
- children: [
2535
- /* @__PURE__ */ u("circle", {
2536
- cx: "32",
2537
- cy: "32",
2538
- r: "32",
2539
- class: "IncodeCameraButtonBackground"
2540
- }),
2541
- /* @__PURE__ */ u("path", {
2542
- d: "M55.5874 31.8191C55.5872 18.6938 44.9464 8.0537 31.821 8.0537C18.6958 8.05385 8.05581 18.6939 8.05566 31.8191C8.05566 44.9444 18.6958 55.5853 31.821 55.5854C44.9465 55.5854 55.5874 44.9445 55.5874 31.8191ZM57.5566 31.8191C57.5566 46.0321 46.034 57.5547 31.821 57.5547C17.6082 57.5545 6.08643 46.032 6.08643 31.8191C6.08657 17.6063 17.6083 6.08462 31.821 6.08447C46.0339 6.08447 57.5565 17.6062 57.5566 31.8191Z",
2543
- class: "IncodeCameraButtonRing"
2544
- }),
2545
- /* @__PURE__ */ u("path", {
2546
- d: "M35.5186 20.6768C36.887 20.677 37.995 21.777 37.9951 23.1338V24.1045H41.4766C43.0397 24.1052 44.3074 25.3626 44.3076 26.9131V38.5459C44.3076 40.0966 43.0398 41.3535 41.4766 41.3535H21.5381C19.975 41.3533 18.7081 40.0965 18.708 38.5459V26.9131C18.7083 25.3627 19.9751 24.1057 21.5381 24.1055H25.0205V23.1338C25.0206 21.7769 26.1285 20.6768 27.4971 20.6768H35.5186ZM31.5068 26.5273C28.0604 26.5273 25.2559 29.309 25.2559 32.7285C25.2559 36.148 28.0604 38.9297 31.5068 38.9297C34.954 38.9297 37.7588 36.148 37.7588 32.7285C37.7588 29.309 34.954 26.5274 31.5068 26.5273ZM31.5068 28.6348C33.7835 28.6348 35.6357 30.4728 35.6357 32.7305C35.6356 34.9887 33.7833 36.8252 31.5068 36.8252C29.2303 36.8252 27.3791 34.9887 27.3789 32.7305C27.3789 30.4721 29.2302 28.6348 31.5068 28.6348Z",
2547
- class: "IncodeCameraButtonPath"
2548
- })
2549
- ]
2550
- })
2551
- });
2552
- };
2553
- //#endregion
2554
- //#region src/modules/selfie/manualCaptureButton.tsx
2555
- var ManualCaptureButton = D(({ onClick, disabled }, ref) => {
2556
- const { t } = useTranslation();
2557
- return /* @__PURE__ */ u("div", {
2558
- class: "IncodeSelfieManualCapture",
2559
- "data-testid": "manual-capture-button",
2560
- children: [
2561
- /* @__PURE__ */ u("p", {
2562
- id: "manual-capture-instructions",
2563
- class: "IncodeSelfieManualCaptureText",
2564
- children: t("selfiev2.manualCapture.instructions")
2565
- }),
2566
- /* @__PURE__ */ u(Spacer, { size: 32 }),
2567
- /* @__PURE__ */ u("div", { children: /* @__PURE__ */ u(Button, {
2568
- ref,
2569
- id: "manual-capture-button",
2570
- variant: "link",
2571
- onClick,
2572
- disabled,
2573
- class: "IncodeSelfieManualCaptureButton",
2574
- "aria-label": t("selfiev2.manualCapture.captureButton"),
2575
- children: /* @__PURE__ */ u(CameraButton, {})
2576
- }) })
2577
- ]
2578
- });
2579
- });
2580
- //#endregion
2581
- //#region src/modules/selfie/notification.tsx
2177
+ //#region src/shared/capture/notification.tsx
2582
2178
  var Notification = ({ detectionState, disabled }) => {
2583
2179
  const { t } = useTranslation();
2584
2180
  const liveRef = A(null);
@@ -2606,7 +2202,8 @@ var Notification = ({ detectionState, disabled }) => {
2606
2202
  faceMask: t("notifications.mask"),
2607
2203
  centerFace: t("notifications.centerFaceV2"),
2608
2204
  getReady: t("notifications.getReady"),
2609
- capturing: t("idv2.capture.takingPhoto")
2205
+ capturing: t("idv2.capture.takingPhoto"),
2206
+ error: t("common.tryAgain")
2610
2207
  }[detectionState] ?? "";
2611
2208
  const announce = q((message) => {
2612
2209
  const now = Date.now();
@@ -2686,151 +2283,4 @@ var Notification = ({ detectionState, disabled }) => {
2686
2283
  }), /* @__PURE__ */ u(Spacer, { size: 24 })] }) : null] });
2687
2284
  };
2688
2285
  //#endregion
2689
- //#region src/modules/selfie/capture.tsx
2690
- var Capture = ({ manager, state }) => {
2691
- const { captureStatus, stream, detectionStatus, attemptsRemaining, uploadError, assistedOnboarding, ageAssurance, onDeviceMode } = state;
2692
- const [isManualCapturing, setIsManualCapturing] = d(false);
2693
- const { t } = useTranslation();
2694
- const manualCaptureRef = A(null);
2695
- y(() => {
2696
- if (detectionStatus === "manualCapture") manualCaptureRef.current?.focus();
2697
- }, [detectionStatus]);
2698
- if (captureStatus === "initializing") return /* @__PURE__ */ u(TransitionSpinner, { spinnerConfig: { subtitle: t("loadingCircle.preparingCamera") } });
2699
- if (captureStatus === "detecting") {
2700
- if (detectionStatus === "offline") return /* @__PURE__ */ u(Page, { title: "No internet connection" });
2701
- const getBorderState = () => {
2702
- if (isManualCapturing) return "capturing";
2703
- if (detectionStatus === "detecting") return "idle";
2704
- if (detectionStatus === "getReady") return "loading";
2705
- if (detectionStatus === "getReadyFinished") return "loading";
2706
- if (detectionStatus === "success") return "success";
2707
- if (detectionStatus === "error") return "error";
2708
- return "idle";
2709
- };
2710
- return /* @__PURE__ */ u(Page, {
2711
- "data-testid": "capture-container",
2712
- children: [
2713
- /* @__PURE__ */ u(Title, {
2714
- className: "IncodeCaptureVisuallyHidden",
2715
- children: t("selfiev2.capture.title")
2716
- }),
2717
- /* @__PURE__ */ u(Spacer, { size: 48 }),
2718
- /* @__PURE__ */ u("div", {
2719
- class: "IncodeCaptureContainer",
2720
- children: [
2721
- /* @__PURE__ */ u(LoadingBorder, { borderState: getBorderState() }),
2722
- /* @__PURE__ */ u("div", {
2723
- class: "IncodeCaptureFrame",
2724
- children: /* @__PURE__ */ u("div", {
2725
- class: "IncodeCaptureVideoWrapper",
2726
- "aria-hidden": "true",
2727
- children: stream ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Video, {
2728
- stream,
2729
- mirrored: !assistedOnboarding
2730
- }), /* @__PURE__ */ u("div", {
2731
- class: "IncodeCaptureVideo",
2732
- children: /* @__PURE__ */ u(FaceOutline, {})
2733
- })] }) : null
2734
- })
2735
- }),
2736
- /* @__PURE__ */ u(Spacer, { size: 32 }),
2737
- detectionStatus ? /* @__PURE__ */ u(Notification, {
2738
- detectionState: detectionStatus,
2739
- disabled: !!uploadError || isManualCapturing
2740
- }) : null,
2741
- detectionStatus === "manualCapture" && !onDeviceMode ? /* @__PURE__ */ u(ManualCaptureButton, {
2742
- ref: manualCaptureRef,
2743
- onClick: () => {
2744
- setIsManualCapturing(true);
2745
- manager.capture();
2746
- },
2747
- disabled: isManualCapturing
2748
- }) : null
2749
- ]
2750
- }),
2751
- uploadError ? /* @__PURE__ */ u(ErrorModal, {
2752
- error: uploadError,
2753
- attemptsRemaining,
2754
- onTryAgain: () => {
2755
- manager.retryCapture();
2756
- setIsManualCapturing(false);
2757
- }
2758
- }) : null
2759
- ]
2760
- });
2761
- }
2762
- if (captureStatus === "capturing") return /* @__PURE__ */ u(Page, {
2763
- className: "IncodeCaptureCapturingPage",
2764
- title: "Capturing",
2765
- subtitle: "Taking photo...",
2766
- children: /* @__PURE__ */ u("div", {
2767
- class: "IncodeCaptureCapturingActions",
2768
- children: /* @__PURE__ */ u(Button, {
2769
- isLoading: true,
2770
- children: "Capturing..."
2771
- })
2772
- })
2773
- });
2774
- if (captureStatus === "uploading") return /* @__PURE__ */ u(CaptureStatusPage, {
2775
- className: "IncodeCaptureStatusUploading",
2776
- isLoading: true,
2777
- icon: /* @__PURE__ */ u(LoadingIcon, { size: 64 }),
2778
- title: t(ageAssurance ? "idv2.capture.processing.verifying" : "idv2.capture.processing.uploading")
2779
- });
2780
- if (captureStatus === "uploadError") return /* @__PURE__ */ u(ErrorModal, {
2781
- error: uploadError,
2782
- attemptsRemaining,
2783
- onTryAgain: () => {
2784
- manager.retryCapture();
2785
- setIsManualCapturing(false);
2786
- }
2787
- });
2788
- if (captureStatus === "success") return /* @__PURE__ */ u(CaptureStatusPage, {
2789
- icon: /* @__PURE__ */ u(SuccessIcon, { size: 64 }),
2790
- title: t("idv2.capture.processing.success")
2791
- });
2792
- return null;
2793
- };
2794
- var Video = ({ stream, mirrored }) => {
2795
- const ref = A(null);
2796
- y(() => {
2797
- if (ref.current && stream) ref.current.srcObject = stream;
2798
- }, [stream]);
2799
- return /* @__PURE__ */ u("video", {
2800
- ref,
2801
- autoplay: true,
2802
- playsInline: true,
2803
- muted: true,
2804
- "aria-hidden": "true",
2805
- class: mirrored ? "IncodeCaptureVideoElement IncodeCaptureVideoMirrored" : "IncodeCaptureVideoElement"
2806
- });
2807
- };
2808
- //#endregion
2809
- //#region src/modules/selfie/tutorial.tsx
2810
- var Tutorial = ({ manager, ageAssurance = false }) => {
2811
- const { t } = useTranslation();
2812
- const [isLoading, setIsLoading] = d(false);
2813
- const [animationData, setAnimationData] = d(null);
2814
- y(() => {
2815
- import("./selfieTutorial-CYa8bq6B.js").then((module) => {
2816
- setAnimationData(module.default);
2817
- });
2818
- }, []);
2819
- const handleContinue = async () => {
2820
- setIsLoading(true);
2821
- await manager.nextStep();
2822
- };
2823
- return /* @__PURE__ */ u(BaseTutorial, {
2824
- animationData,
2825
- title: t(ageAssurance ? "face.tutorial.ageAssuranceTitle" : "face.tutorial.title"),
2826
- titleId: "face-tutorial-heading",
2827
- subtitle: t(ageAssurance ? "face.tutorial.ageAssuranceSubtitle" : "face.tutorial.subtitle"),
2828
- onContinue: handleContinue,
2829
- buttonText: t(ageAssurance ? "face.tutorial.ageAssuranceStartCapture" : "face.tutorial.startCapture"),
2830
- disclaimerText: t("face.tutorial.autoCapture"),
2831
- isLoading,
2832
- className: "IncodeSelfieTutorial"
2833
- });
2834
- };
2835
- //#endregion
2836
- export { Lottie as a, BaseTutorial as i, Capture as n, ErrorContent as o, Permissions as r, Tutorial as t };
2286
+ export { Permissions as i, LoadingBorder as n, FaceOutline as r, Notification as t };
@@ -1,18 +1,18 @@
1
- import { n as useTranslation } from "../i18n-DoP1NB7u.js";
1
+ import { n as useTranslation } from "../i18n-CU4xq8qC.js";
2
2
  import { _ as y, d as T, l as A, v as u } from "../vendor-preact-DThS2ZQ_.js";
3
- import { c as useManager, o as useModuleTerminalCallbacks } from "../hooks-Da_yP_Dr.js";
4
- import { t as IncodeComponent } from "../incodeComponent-Cmi1rlWs.js";
3
+ import { c as useModuleTerminalCallbacks, u as useManager } from "../hooks-CNu7o-v8.js";
4
+ import { t as IncodeComponent } from "../incodeComponent-CfzJGETt.js";
5
5
  import { r as Spacer } from "../loadingIcon-B0ysgiNq.js";
6
6
  import { t as Page } from "../page-DidH_RkX.js";
7
- import "../extensibility-CTmAsaji.js";
7
+ import "../extensibility-7sRIN0JC.js";
8
8
  import { a as TypographyH5, o as TypographyP } from "../typography-BZIpjo97.js";
9
- import { t as Button } from "../button-Ch5-QgHB.js";
9
+ import { t as Button } from "../button-Dz6AsbmF.js";
10
10
  import "../icons-CJJbIpBq.js";
11
11
  import { t as SuccessIcon } from "../successIcon-B5mGvdx1.js";
12
12
  import { t as AutoFocusTitle } from "../autoFocusTitle-CuRu2lPg.js";
13
- import { t as VerificationResult } from "../verificationResult-B6PBXbp9.js";
13
+ import { t as VerificationResult } from "../verificationResult-BWWkmeiA.js";
14
14
  import { t as InputComposed } from "../inputComposed-C1R2LAa3.js";
15
- import { t as registerIncodeModuleElement } from "../incodeModule-M8DszCee.js";
15
+ import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
16
16
  import { MIN_PASSWORD_LENGTH, PASSWORD_VALIDATION_KEYS, REQUIREMENT_I18N_KEYS, createCertificateIssuanceManager } from "@incodetech/core/certificate-issuance";
17
17
  //#region src/modules/certificate-issuance/downloadScreen.tsx
18
18
  var DownloadScreen = ({ blob, onDownloaded, onError }) => {
@@ -1,14 +1,14 @@
1
- import { n as useTranslation } from "../i18n-DoP1NB7u.js";
1
+ import { n as useTranslation } from "../i18n-CU4xq8qC.js";
2
2
  import { d as T, v as u } from "../vendor-preact-DThS2ZQ_.js";
3
- import { a as isTerminalModuleState, c as useManager, o as useModuleTerminalCallbacks } from "../hooks-Da_yP_Dr.js";
4
- import { t as IncodeComponent } from "../incodeComponent-Cmi1rlWs.js";
3
+ import { c as useModuleTerminalCallbacks, s as isTerminalModuleState, u as useManager } from "../hooks-CNu7o-v8.js";
4
+ import { t as IncodeComponent } from "../incodeComponent-CfzJGETt.js";
5
5
  import { t as Page } from "../page-DidH_RkX.js";
6
- import { t as TransitionSpinner } from "../transitionSpinner-4rPkt-KM.js";
7
- import { t as Button } from "../button-Ch5-QgHB.js";
6
+ import { t as TransitionSpinner } from "../transitionSpinner-CuNCqHNi.js";
7
+ import { t as Button } from "../button-Dz6AsbmF.js";
8
8
  import { t as Checkbox } from "../checkbox-1wUHSoaK.js";
9
- import { t as registerIncodeModuleElement } from "../incodeModule-M8DszCee.js";
10
- import { t as RichText } from "../richText-DsTP4H3j.js";
11
- import { n as getRequiredHintMode, t as getFieldHint } from "../requiredLabelHint-DX3oVNtu.js";
9
+ import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
10
+ import { t as RichText } from "../richText-CB1fmegc.js";
11
+ import { n as getRequiredHintMode, t as getFieldHint } from "../requiredLabelHint-D0RhuMed.js";
12
12
  import { createConsentManager } from "@incodetech/core/consent";
13
13
  //#region src/modules/consent/consent.tsx
14
14
  var stopLinkPropagation = (event) => {