@incodetech/core 0.0.0-dev-20261201-5456180d → 0.0.0-dev-20261201-e37652f8

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 (88) hide show
  1. package/dist/{FaceDetectionProvider-DH7QsBFD.esm.js → FaceDetectionProvider-DQYbHLxC.esm.js} +4 -4
  2. package/dist/{addressSearch-Cxpb5vKl.esm.js → addressSearch-gginelz3.esm.js} +28 -26
  3. package/dist/ae-signature.esm.js +1 -1
  4. package/dist/{apiError-BVYipHwI.esm.js → apiError-BRiJu_rv.esm.js} +1 -1
  5. package/dist/authentication.esm.js +2 -2
  6. package/dist/{authenticationManager-Kfm9HxbR.esm.js → authenticationManager-CrBlRkAd.esm.js} +3 -3
  7. package/dist/{authenticationStateMachine-DCVCf6tZ.esm.js → authenticationStateMachine-DLwEyCeH.esm.js} +3 -3
  8. package/dist/consent.d.ts +1 -1
  9. package/dist/{consentManager-vI6QHkHU.d.ts → consentManager-Bow34QP_.d.ts} +9 -9
  10. package/dist/{deepsightCaptureConfig-BfIw-FNj.esm.js → deepsightCaptureConfig-BVJANeRn.esm.js} +2 -2
  11. package/dist/{deepsightLoader-DCSozoXG.esm.js → deepsightLoader-C6nKqY9Q.esm.js} +4 -4
  12. package/dist/{desktopCameraElection-C7OkCslA.esm.js → desktopCameraElection-BAq-Kaiq.esm.js} +4 -4
  13. package/dist/document-capture.d.ts +1 -1
  14. package/dist/document-signature.esm.js +1 -1
  15. package/dist/{documentCaptureManager-sJWgqtUy.d.ts → documentCaptureManager-DOgJTJ4F.d.ts} +4 -4
  16. package/dist/{documentSignatureStateMachine-C1CsjsVW.esm.js → documentSignatureStateMachine-Btlg3q7j.esm.js} +1 -1
  17. package/dist/dynamic-forms.esm.js +2 -2
  18. package/dist/{dynamicFormsManager-DhyIhZ1C.esm.js → dynamicFormsManager-SbEUnFoF.esm.js} +1 -1
  19. package/dist/{dynamicFormsStateMachine-CDyk9sXA.esm.js → dynamicFormsStateMachine-Dxv36mAP.esm.js} +1 -1
  20. package/dist/ekyb.esm.js +2 -2
  21. package/dist/{ekybManager-4ESLrIAZ.esm.js → ekybManager-xhoOX9O9.esm.js} +1 -1
  22. package/dist/{ekybStateMachine-BVQ7DyO1.esm.js → ekybStateMachine-CCjUH0j3.esm.js} +183 -56
  23. package/dist/ekyc-prefill.d.ts +1 -1
  24. package/dist/ekyc-prefill.esm.js +2 -2
  25. package/dist/ekyc.d.ts +3 -0
  26. package/dist/ekyc.esm.js +3 -3
  27. package/dist/{ekycManager-k0d38zcZ.esm.js → ekycManager-DrGuK0kT.esm.js} +1 -1
  28. package/dist/{ekycPrefillManager-3nHwnh_4.esm.js → ekycPrefillManager-C9kdwCC6.esm.js} +2 -2
  29. package/dist/{ekycPrefillManager-BwmPXfhY.d.ts → ekycPrefillManager-Di6aMx68.d.ts} +4 -4
  30. package/dist/{ekycPrefillStateMachine-bz_k9jTV.esm.js → ekycPrefillStateMachine-DiQifkkd.esm.js} +8 -87
  31. package/dist/{ekycStateMachine-BudF0QZu.esm.js → ekycStateMachine-BmMdLe2G.esm.js} +298 -125
  32. package/dist/{ekycUtils-BnTyeA-_.esm.js → ekycUtils-DfBNTcvX.esm.js} +41 -5
  33. package/dist/electronic-signature.esm.js +1 -1
  34. package/dist/{electronicSignatureManager-BMalzzyT.esm.js → electronicSignatureManager-C6liTNbu.esm.js} +1 -1
  35. package/dist/extensibility.d.ts +6 -6
  36. package/dist/extensibility.esm.js +13 -13
  37. package/dist/{faceCaptureManagerFactory-cQl5HDIn.esm.js → faceCaptureManagerFactory-OL8BWaIW.esm.js} +2 -2
  38. package/dist/{faceCaptureSetup-DzWl2VJI.esm.js → faceCaptureSetup-DQVtmb1q.esm.js} +7 -7
  39. package/dist/{feature-management-BVxb2LDw.esm.js → feature-management-D_T-MG_i.esm.js} +1 -1
  40. package/dist/feature-management.esm.js +1 -1
  41. package/dist/flow.esm.js +3 -3
  42. package/dist/{flowCompletionService-DK-fZm71.esm.js → flowCompletionService-L0J63ui-.esm.js} +1 -1
  43. package/dist/{flowServices-DO_evfcT.esm.js → flowServices-3OXrEqDE.esm.js} +5 -5
  44. package/dist/formDefinitionsRollout-B-c4yO2z.esm.js +30 -0
  45. package/dist/{formErrors-lSfh7Y8J.esm.js → formErrors-kpskZLNT.esm.js} +39 -180
  46. package/dist/geolocation.d.ts +1 -1
  47. package/dist/geolocation.esm.js +2 -2
  48. package/dist/{geolocationManager-DcuPbxtE.esm.js → geolocationManager-CREfQNgO.esm.js} +1 -1
  49. package/dist/{geolocationManager-CENrvxpK.d.ts → geolocationManager-Del2ddmt.d.ts} +1 -1
  50. package/dist/{geolocationStateMachine-C2r0HXYO.esm.js → geolocationStateMachine-D9_bBr19.esm.js} +1 -1
  51. package/dist/id-ocr.d.ts +1 -1
  52. package/dist/id-selfie-flow.esm.js +6 -6
  53. package/dist/id.esm.js +3 -3
  54. package/dist/{idCaptureManager-B3e-0VFl.esm.js → idCaptureManager-B5ZN7scK.esm.js} +4 -4
  55. package/dist/{idCaptureServices-CoHVsKtz.esm.js → idCaptureServices-7zZ457LW.esm.js} +2 -2
  56. package/dist/{idCaptureStateMachine-Cbg0iyXR.esm.js → idCaptureStateMachine-FP4j-qeT.esm.js} +11 -11
  57. package/dist/{idOcrManager-DflRx-_u.d.ts → idOcrManager-C0C7lFGd.d.ts} +1 -1
  58. package/dist/index.esm.js +1 -1
  59. package/dist/kyb-checks.esm.js +2 -2
  60. package/dist/{kybChecksManager-BDHpxk15.esm.js → kybChecksManager-tUsFKBCN.esm.js} +1 -1
  61. package/dist/{kybChecksStateMachine-UIwv8ipY.esm.js → kybChecksStateMachine-D1q4K7Xr.esm.js} +3 -3
  62. package/dist/mandatory-consent.d.ts +1 -1
  63. package/dist/{mandatoryConsentManager-ESpx168S.d.ts → mandatoryConsentManager-De9ZX6o4.d.ts} +5 -5
  64. package/dist/qe-signature.esm.js +1 -1
  65. package/dist/{recordingService-G0FrtpAb.esm.js → recordingService-OcyZO_w6.esm.js} +1 -1
  66. package/dist/{runChildModule-Dgi34yo9.esm.js → runChildModule-BuZFd3Df.esm.js} +1 -1
  67. package/dist/{sdkVersion-CrFzbh9y.esm.js → sdkVersion-BY8g-EEL.esm.js} +1 -1
  68. package/dist/selfie.esm.js +7 -7
  69. package/dist/{selfieErrorUtils-DR2Gve4F.esm.js → selfieErrorUtils-DIVWh0ih.esm.js} +1 -1
  70. package/dist/{selfieManager-B3Jd7q4s.esm.js → selfieManager-DQ5xB8y6.esm.js} +3 -3
  71. package/dist/{selfieStateMachine-DM40H79_.esm.js → selfieStateMachine-fyNh2r31.esm.js} +3 -3
  72. package/dist/{session-C7-dU7kj.esm.js → session-DKnCv6zu.esm.js} +4 -4
  73. package/dist/session.esm.js +4 -4
  74. package/dist/{sessionInitializer-NEJvsqjQ.esm.js → sessionInitializer-q5b8Qwr3.esm.js} +4 -4
  75. package/dist/{setup-DXnJ1L0L.esm.js → setup-JGwc0kgu.esm.js} +5 -5
  76. package/dist/trim-OmrUb6mG.esm.js +297 -0
  77. package/dist/trueSight-9VsfHXFt.esm.js +1 -0
  78. package/dist/{trueSightService-MNEZaA-i.esm.js → trueSightService-Dx8AqgKD.esm.js} +1 -1
  79. package/dist/uppercase-CwlIuiwR.esm.js +115 -0
  80. package/dist/video-selfie.esm.js +3 -3
  81. package/dist/{videoSelfieCameraWarmer-CPrXznbc.esm.js → videoSelfieCameraWarmer-AoMytGBD.esm.js} +3 -3
  82. package/dist/wasm.esm.js +1 -1
  83. package/dist/workflow.d.ts +4 -4
  84. package/dist/workflow.esm.js +19 -19
  85. package/package.json +1 -1
  86. package/dist/definitionSource-B9WTvQb9.esm.js +0 -30
  87. package/dist/resolveForm-DaaQSVWp.esm.js +0 -146
  88. package/dist/trueSight-CjUsM1U4.esm.js +0 -1
@@ -1,4 +1,5 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-B-1-B7_t.esm.js";
2
+ import { t as isFormDefinitionsEnabled } from "./formDefinitionsRollout-B-c4yO2z.esm.js";
2
3
  //#region ../form-definitions/generated/ekycIndex.ts
3
4
  const EKYC_INDEX = [
4
5
  {
@@ -171,6 +172,15 @@ const EKYC_INDEX = [
171
172
  country: "PT",
172
173
  source: "PT_PHONE_REGISTER"
173
174
  },
175
+ {
176
+ id: "ekyc/RISK_ADDONS_ONLY",
177
+ source: "RISK_ADDONS_ONLY"
178
+ },
179
+ {
180
+ id: "ekyc/RISK_ADDONS_ONLY/phoneProfile",
181
+ source: "RISK_ADDONS_ONLY",
182
+ riskAddon: "phoneProfile"
183
+ },
174
184
  {
175
185
  id: "ekyc/RO/RO_VOTER_REGISTER",
176
186
  country: "RO",
@@ -1310,9 +1320,17 @@ const MIDDLE_NAME_SOURCES = [
1310
1320
  "CL_1",
1311
1321
  "INDIA_PAN"
1312
1322
  ];
1313
- /** Risk addons that replace a `RISK_ADDONS_ONLY` source with their own. */
1323
+ /**
1324
+ * Risk addons that replace a `RISK_ADDONS_ONLY` source with their own. Only
1325
+ * with the form definitions switch off: with it on, the add-on's own form
1326
+ * (`catalog/ekyc/addons`) names the source it sends.
1327
+ */
1314
1328
  const RISK_ADDON_SOURCE_OVERRIDES = { phoneProfile: "PHONE_PROFILE" };
1315
- /** Sources whose submit payload must not carry `countryCode`. */
1329
+ /**
1330
+ * Sources whose legacy request body must not carry `countryCode`. With the
1331
+ * form definitions switch on, RISK_ADDONS_ONLY with phoneProfile gets its
1332
+ * add-on form instead, which sends no `countryCode` either.
1333
+ */
1316
1334
  const COUNTRY_CODE_OMITTED_SOURCES = ["PHONE_PROFILE"];
1317
1335
  //#endregion
1318
1336
  //#region src/modules/ekyc/ekycUtils.ts
@@ -1330,6 +1348,7 @@ var ekycUtils_exports = /* @__PURE__ */ __exportAll({
1330
1348
  mapToEKYCvalue: () => mapToEKYCvalue,
1331
1349
  resolveEkycSource: () => resolveEkycSource,
1332
1350
  toEkycConfig: () => toEkycConfig,
1351
+ toEkycConfigFor: () => toEkycConfigFor,
1333
1352
  withRiskAddonFields: () => withRiskAddonFields
1334
1353
  });
1335
1354
  function mapToEKYCvalue(field) {
@@ -1345,6 +1364,9 @@ function mapToEKYCvalue(field) {
1345
1364
  * Resolves the source sent to the backend. A `RISK_ADDONS_ONLY` source is
1346
1365
  * replaced by the first configured addon that defines its own source
1347
1366
  * (e.g. `phoneProfile` → `PHONE_PROFILE`); any other source is kept.
1367
+ *
1368
+ * It always swaps. Its callers apply it only with the form definitions
1369
+ * switch off; with it on, the add-on's own form names the source it sends.
1348
1370
  */
1349
1371
  function resolveEkycSource(source, riskAddons) {
1350
1372
  if (source !== "RISK_ADDONS_ONLY") return source;
@@ -1451,7 +1473,7 @@ function indexCountries(entries) {
1451
1473
  const countries = /* @__PURE__ */ new Map();
1452
1474
  const ambiguous = /* @__PURE__ */ new Set();
1453
1475
  for (const entry of entries) {
1454
- if (!entry.country) continue;
1476
+ if (!entry.country || entry.riskAddon) continue;
1455
1477
  for (const id of [entry.source, ...entry.aliases ?? []]) {
1456
1478
  if (!id || ambiguous.has(id)) continue;
1457
1479
  const known = countries.get(id);
@@ -1511,11 +1533,25 @@ function hasRawSignal(c) {
1511
1533
  * empty form.
1512
1534
  *
1513
1535
  * Idempotent: `toEkycConfig(toEkycConfig(x))` equals `toEkycConfig(x)`.
1536
+ *
1537
+ * It reads the form definitions switch when it runs, so a test or the
1538
+ * playground sets the switch before it converts a config.
1514
1539
  */
1515
1540
  function toEkycConfig(config) {
1541
+ return toEkycConfigFor(config, isFormDefinitionsEnabled());
1542
+ }
1543
+ /**
1544
+ * `toEkycConfig` with the form definitions switch answer given. The eKYC
1545
+ * machine reads the switch once and passes the same answer here and to its
1546
+ * form, so the two can't disagree. With the switch off, a raw config's
1547
+ * `RISK_ADDONS_ONLY` source gets the risk add-on swap (`resolveEkycSource`),
1548
+ * as before ENG-62004. With it on, the configured source stays: the add-on's
1549
+ * own form, such as phoneProfile's, names the source it sends.
1550
+ */
1551
+ function toEkycConfigFor(config, useDefinitions) {
1516
1552
  if (config.flowId || config.verificationFields) return config;
1517
1553
  if (!hasRawSignal(config)) return config;
1518
- const source = resolveEkycSource(config.source ?? "", config.riskAddons);
1554
+ const source = useDefinitions ? config.source ?? "" : resolveEkycSource(config.source ?? "", config.riskAddons);
1519
1555
  const displayModes = getEKYCDisplayModes(config);
1520
1556
  return {
1521
1557
  verificationFields: getEKYCFields(config),
@@ -1541,4 +1577,4 @@ function isFieldOptional(fieldName, configSource) {
1541
1577
  return false;
1542
1578
  }
1543
1579
  //#endregion
1544
- export { POSTAL_CODE_SOURCES as C, VOCABULARY as D, TAX_ID_SOURCES as E, ONE_OF_REQUIRED_GROUPS as S, STREET_SOURCES as T, COUNTRY_SELECTOR_DISABLED_SOURCES as _, getEKYCFields as a, MIDDLE_NAME_SOURCES as b, isFieldOptional as c, toEkycConfig as d, withRiskAddonFields as f, COUNTRY_CODE_OMITTED_SOURCES as g, CITY_SOURCES as h, getEKYCDisplayModes as i, mapToEKYCvalue as l, APARTMENT_SOURCES as m, ekycUtils_exports as n, getEkycRiskAddons as o, ADDRESS_STATE_SOURCES as p, getEKYCCountry as r, getRiskAddonFields as s, EKYC_GROUP_KEYS as t, resolveEkycSource as u, EMAIL_SOURCES as v, STATE_CODE_HINTS as w, NAME_SOURCES as x, HOUSE_NO_SOURCES as y };
1580
+ export { ONE_OF_REQUIRED_GROUPS as C, TAX_ID_SOURCES as D, STREET_SOURCES as E, VOCABULARY as O, NAME_SOURCES as S, STATE_CODE_HINTS as T, COUNTRY_CODE_OMITTED_SOURCES as _, getEKYCFields as a, HOUSE_NO_SOURCES as b, isFieldOptional as c, toEkycConfig as d, toEkycConfigFor as f, CITY_SOURCES as g, APARTMENT_SOURCES as h, getEKYCDisplayModes as i, EKYC_INDEX as k, mapToEKYCvalue as l, ADDRESS_STATE_SOURCES as m, ekycUtils_exports as n, getEkycRiskAddons as o, withRiskAddonFields as p, getEKYCCountry as r, getRiskAddonFields as s, EKYC_GROUP_KEYS as t, resolveEkycSource as u, COUNTRY_SELECTOR_DISABLED_SOURCES as v, POSTAL_CODE_SOURCES as w, MIDDLE_NAME_SOURCES as x, EMAIL_SOURCES as y };
@@ -1,2 +1,2 @@
1
- import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-BMalzzyT.esm.js";
1
+ import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-C6liTNbu.esm.js";
2
2
  export { AE_CONSENT_KEYS, NAMIRIAL_QES_CONSENT_KEYS, NAMIRIAL_QES_PROVIDER_CODE, QE_CONSENT_KEYS, areAllConsented, createElectronicSignatureManager, createElectronicSignatureManagerFromActor, electronicSignatureMachine, getConsentKeys, getDefaultConsentChecks };
@@ -2,7 +2,7 @@ import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
2
2
  import { t as api, u as endpoints } from "./api-CsXnB7m6.esm.js";
3
3
  import { t as createManagerInstrumentation } from "./events-Dlkhhx5O.esm.js";
4
4
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
5
- import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-BVYipHwI.esm.js";
5
+ import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-BRiJu_rv.esm.js";
6
6
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
7
7
  import { i as assign, s as createActor, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
8
8
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
@@ -12,15 +12,15 @@ import "./StreamCanvasCapture-BqaHTJF0.js";
12
12
  import { i as createIdCaptureManagerFromActor, n as IdCaptureManager, q as WasmUtilProvider, r as IdCaptureState, y as IdCaptureActor } from "./idCaptureManager-BMsGPjcf.js";
13
13
  import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-Cv_jCMGJ.js";
14
14
  import { a as CertificateIssuanceActor, i as createCertificateIssuanceManagerFromActor, n as CertificateIssuanceState, t as CertificateIssuanceManager } from "./certificateIssuanceManager-BcYhxO63.js";
15
- import { a as ConsentActor, i as createConsentManagerFromActor, n as ConsentState, t as ConsentManager } from "./consentManager-vI6QHkHU.js";
15
+ import { a as ConsentActor, i as createConsentManagerFromActor, n as ConsentState, t as ConsentManager } from "./consentManager-Bow34QP_.js";
16
16
  import { a as CrossDocumentDataMatchActor, i as createCrossDocumentDataMatchManagerFromActor, n as CrossDocumentDataMatchState, t as CrossDocumentDataMatchManager } from "./crossDocumentDataMatchManager-crZcIUSY.js";
17
17
  import { a as CurpValidationActor, i as createCurpValidationManagerFromActor, n as CurpValidationState, t as CurpValidationManager } from "./curpValidationManager-DFWjZq3i.js";
18
18
  import { a as createCustomFieldsManagerFromActor, n as CustomFieldsState, o as CustomFieldsActor, t as CustomFieldsManager } from "./customFieldsManager-CdWTbsew.js";
19
19
  import { a as CustomWatchlistActor, i as createCustomWatchlistManagerFromActor, n as CustomWatchlistState, t as CustomWatchlistManager } from "./customWatchlistManager-lJrveDS4.js";
20
- import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, t as DocumentCaptureManager } from "./documentCaptureManager-sJWgqtUy.js";
20
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, t as DocumentCaptureManager } from "./documentCaptureManager-DOgJTJ4F.js";
21
21
  import { a as DynamicFormsActor, i as createDynamicFormsManagerFromActor, n as DynamicFormsState, t as DynamicFormsManager } from "./dynamicFormsManager-C45pTncO.js";
22
22
  import { a as EkybActor, i as createEkybManagerFromActor, n as EkybState, t as EkybManager } from "./ekybManager-XpAF7sBY.js";
23
- import { c as EkycPrefillManager, m as EkycPrefillActor, p as createEkycPrefillManagerFromActor, u as EkycPrefillState } from "./ekycPrefillManager-BwmPXfhY.js";
23
+ import { c as EkycPrefillManager, m as EkycPrefillActor, p as createEkycPrefillManagerFromActor, u as EkycPrefillState } from "./ekycPrefillManager-Di6aMx68.js";
24
24
  import { i as createEkycManagerFromActor, n as EkycState, o as EkycActor, t as EkycManager } from "./ekycManager-P1jYeS8s.js";
25
25
  import { a as EmailActor, i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-pM7ZPuMa.js";
26
26
  import { i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-RgcJwpHg.js";
@@ -30,11 +30,11 @@ import { a as WatchlistActor, i as createWatchlistManagerFromActor, n as Watchli
30
30
  import { i as WatchlistForBusinessState, o as createWatchlistForBusinessManagerFromActor, r as WatchlistForBusinessManager, s as WatchlistForBusinessActor } from "./watchlistForBusinessManager-l7ZERQcV.js";
31
31
  import { a as createIdentityReuseManagerFromActor, o as IdentityReuseActor, r as IdentityReuseState, t as IdentityReuseManager } from "./identityReuseManager-BE6LHcuP.js";
32
32
  import { a as FieldComparisonActor, i as createFieldComparisonManagerFromActor, n as FieldComparisonState, t as FieldComparisonManager } from "./fieldComparisonManager-mFOHRhVd.js";
33
- import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, t as MandatoryConsentManager } from "./mandatoryConsentManager-ESpx168S.js";
34
- import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, t as IdOcrManager } from "./idOcrManager-DflRx-_u.js";
33
+ import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, t as MandatoryConsentManager } from "./mandatoryConsentManager-De9ZX6o4.js";
34
+ import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, t as IdOcrManager } from "./idOcrManager-C0C7lFGd.js";
35
35
  import { a as RedirectToMobileActor, i as createRedirectToMobileManagerFromActor, n as RedirectToMobileState, t as RedirectToMobileManager } from "./redirectToMobileManager-Db99n9Yu.js";
36
36
  import { a as createSignatureManagerFromActor, n as SignatureManager, o as SignatureActor, r as SignatureState } from "./signatureManager-daT_8fj_.js";
37
- import { a as GeolocationActor, i as createGeolocationManagerFromActor, n as GeolocationState, t as GeolocationManager } from "./geolocationManager-CENrvxpK.js";
37
+ import { a as GeolocationActor, i as createGeolocationManagerFromActor, n as GeolocationState, t as GeolocationManager } from "./geolocationManager-Del2ddmt.js";
38
38
  import { a as GovernmentValidationActor, i as createGovernmentValidationManagerFromActor, n as GovernmentValidationState, t as GovernmentValidationManager } from "./governmentValidationManager-De_vU7bm.js";
39
39
  import { a as IdVerificationActor, i as createIdVerificationManagerFromActor, n as IdVerificationState, t as IdVerificationManager } from "./idVerificationManager-B6R8xNZq.js";
40
40
  import { a as FaceMatchActor, i as createFaceMatchManagerFromActor, n as FaceMatchState, t as FaceMatchManager } from "./faceMatchManager-C5b5WtcY.js";
@@ -1,12 +1,12 @@
1
- import { u as BrowserStorageProvider } from "./setup-DXnJ1L0L.esm.js";
1
+ import { u as BrowserStorageProvider } from "./setup-JGwc0kgu.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-unrmGEHD.esm.js";
3
- import { b as getDeviceFingerprintInfo, v as getFingerprint } from "./sessionInitializer-NEJvsqjQ.esm.js";
3
+ import { b as getDeviceFingerprintInfo, v as getFingerprint } from "./sessionInitializer-q5b8Qwr3.esm.js";
4
4
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
5
5
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
6
- import { n as createElectronicSignatureManagerFromActor } from "./electronicSignatureManager-BMalzzyT.esm.js";
6
+ import { n as createElectronicSignatureManagerFromActor } from "./electronicSignatureManager-C6liTNbu.esm.js";
7
7
  import { n as createAntifraudManagerFromActor } from "./antifraudManager-B673OXCo.esm.js";
8
- import { t as faceCaptureMachine } from "./faceCaptureSetup-DzWl2VJI.esm.js";
9
- import { n as createAuthenticationManagerFromActor } from "./authenticationManager-Kfm9HxbR.esm.js";
8
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-DQVtmb1q.esm.js";
9
+ import { n as createAuthenticationManagerFromActor } from "./authenticationManager-CrBlRkAd.esm.js";
10
10
  import { n as createCertificateIssuanceManagerFromActor } from "./certificateIssuanceManager-D-Dm90F3.esm.js";
11
11
  import { n as createConsentManagerFromActor } from "./consentManager-DQ1uiNhr.esm.js";
12
12
  import { n as createCrossDocumentDataMatchManagerFromActor } from "./crossDocumentDataMatchManager-CeeEmCV1.esm.js";
@@ -14,13 +14,13 @@ import { n as createCurpValidationManagerFromActor } from "./curpValidationManag
14
14
  import { n as createCustomFieldsManagerFromActor } from "./customFieldsManager-BuEt-nm4.esm.js";
15
15
  import { n as createCustomWatchlistManagerFromActor } from "./customWatchlistManager-C1z0B5NU.esm.js";
16
16
  import { n as createDocumentCaptureManagerFromActor } from "./documentCaptureManager-DoHy82WC.esm.js";
17
- import { n as createDynamicFormsManagerFromActor } from "./dynamicFormsManager-DhyIhZ1C.esm.js";
18
- import { n as createEkybManagerFromActor } from "./ekybManager-4ESLrIAZ.esm.js";
19
- import { n as createEkycManagerFromActor } from "./ekycManager-k0d38zcZ.esm.js";
20
- import { n as createEkycPrefillManagerFromActor } from "./ekycPrefillManager-3nHwnh_4.esm.js";
17
+ import { n as createDynamicFormsManagerFromActor } from "./dynamicFormsManager-SbEUnFoF.esm.js";
18
+ import { n as createEkybManagerFromActor } from "./ekybManager-xhoOX9O9.esm.js";
19
+ import { n as createEkycManagerFromActor } from "./ekycManager-DrGuK0kT.esm.js";
20
+ import { n as createEkycPrefillManagerFromActor } from "./ekycPrefillManager-C9kdwCC6.esm.js";
21
21
  import { n as createEmailManagerFromActor } from "./emailManager-CUX2saAB.esm.js";
22
- import { n as createSelfieManagerFromActor } from "./selfieManager-B3Jd7q4s.esm.js";
23
- import { s as createIdCaptureManagerFromActor } from "./idCaptureManager-B3e-0VFl.esm.js";
22
+ import { n as createSelfieManagerFromActor } from "./selfieManager-DQ5xB8y6.esm.js";
23
+ import { s as createIdCaptureManagerFromActor } from "./idCaptureManager-B5ZN7scK.esm.js";
24
24
  import { n as createPhoneManagerFromActor } from "./phoneManager-uQEAWKlO.esm.js";
25
25
  import { n as createWatchlistManagerFromActor } from "./watchlistManager-Dc9sFwZx.esm.js";
26
26
  import { n as createWatchlistForBusinessManagerFromActor } from "./watchlistForBusinessManager-VDu1ypVz.esm.js";
@@ -30,10 +30,10 @@ import { n as createMandatoryConsentManagerFromActor } from "./mandatoryConsentM
30
30
  import { n as createIdOcrManagerFromActor } from "./idOcrManager-C9C8UaPr.esm.js";
31
31
  import { n as createRedirectToMobileManagerFromActor } from "./redirectToMobileManager-UQZkhZFB.esm.js";
32
32
  import { n as createSignatureManagerFromActor } from "./signatureManager-3g4_cavt.esm.js";
33
- import { n as createGeolocationManagerFromActor } from "./geolocationManager-DcuPbxtE.esm.js";
33
+ import { n as createGeolocationManagerFromActor } from "./geolocationManager-CREfQNgO.esm.js";
34
34
  import { n as createGovernmentValidationManagerFromActor } from "./governmentValidationManager-B7lIuL4r.esm.js";
35
35
  import { n as createIdVerificationManagerFromActor } from "./idVerificationManager-B_6wwpeT.esm.js";
36
36
  import { n as createFaceMatchManagerFromActor } from "./faceMatchManager-BzaXiW4H.esm.js";
37
37
  import { n as createFiscalQrManagerFromActor } from "./fiscalQrManager-Dg6Mp58y.esm.js";
38
- import { n as createKybChecksManagerFromActor } from "./kybChecksManager-BDHpxk15.esm.js";
38
+ import { n as createKybChecksManagerFromActor } from "./kybChecksManager-tUsFKBCN.esm.js";
39
39
  export { BrowserStorageProvider, WasmUtilProvider, createActor, createAntifraudManagerFromActor, createAuthenticationManagerFromActor, createCertificateIssuanceManagerFromActor, createConsentManagerFromActor, createCrossDocumentDataMatchManagerFromActor, createCurpValidationManagerFromActor, createCustomFieldsManagerFromActor, createCustomWatchlistManagerFromActor, createDocumentCaptureManagerFromActor, createDynamicFormsManagerFromActor, createEkybManagerFromActor, createEkycManagerFromActor, createEkycPrefillManagerFromActor, createElectronicSignatureManagerFromActor, createEmailManagerFromActor, createFaceMatchManagerFromActor, createFieldComparisonManagerFromActor, createFiscalQrManagerFromActor, createGeolocationManagerFromActor, createGovernmentValidationManagerFromActor, createIdCaptureManagerFromActor, createIdOcrManagerFromActor, createIdVerificationManagerFromActor, createIdentityReuseManagerFromActor, createKybChecksManagerFromActor, createMandatoryConsentManagerFromActor, createPhoneManagerFromActor, createRedirectToMobileManagerFromActor, createSelfieManagerFromActor, createSignatureManagerFromActor, createWatchlistForBusinessManagerFromActor, createWatchlistManagerFromActor, faceCaptureMachine, fromCallback, fromPromise, getDeviceFingerprintInfo, getFingerprint };
@@ -3,11 +3,11 @@ import { t as createManagerInstrumentation } from "./events-Dlkhhx5O.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { t as splitTrackedName } from "./splitTrackedName-3zJRd2RD.esm.js";
6
- import { r as concealmentToAvatar } from "./faceCaptureSetup-DzWl2VJI.esm.js";
6
+ import { r as concealmentToAvatar } from "./faceCaptureSetup-DQVtmb1q.esm.js";
7
7
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-0SxaYTcb.esm.js";
8
8
  import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
9
9
  import { i as primeMotionFromUserGestureIfNeeded } from "./permissionServices-GQyOY1tb.esm.js";
10
- import { r as wantsDeepsightMotion } from "./deepsightCaptureConfig-BfIw-FNj.esm.js";
10
+ import { r as wantsDeepsightMotion } from "./deepsightCaptureConfig-BVJANeRn.esm.js";
11
11
  //#region src/internal/faceCapture/faceCaptureManagerFactory.ts
12
12
  function getPermissionStatus(snapshot) {
13
13
  if (!snapshot.matches("permissions")) return;
@@ -1,7 +1,7 @@
1
1
  import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
2
  import { r as getToken } from "./api-CsXnB7m6.esm.js";
3
- import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-MNEZaA-i.esm.js";
4
- import "./trueSight-CjUsM1U4.esm.js";
3
+ import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-Dx8AqgKD.esm.js";
4
+ import "./trueSight-9VsfHXFt.esm.js";
5
5
  import { t as addDeviceStats } from "./stats-D_gJvsTS.esm.js";
6
6
  import { s as isIPhone14OrHigher } from "./platform-GIg4uPWe.esm.js";
7
7
  import { i as assign, n as enqueueActions, r as sendTo, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
@@ -9,9 +9,9 @@ import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BCcwgos
9
9
  import { c as isCameraDenialErrorName } from "./camera-CJKApt0x.esm.js";
10
10
  import { n as checkPermission, r as invokeRequestPermissionActor, t as canPrimeMotionWithoutUserGesture } from "./permissionServices-GQyOY1tb.esm.js";
11
11
  import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
12
- import { n as recordsLivenessClip, r as wantsDeepsightMotion } from "./deepsightCaptureConfig-BfIw-FNj.esm.js";
13
- import { a as sendLabelInspectionEvent, i as probeFaceCamera, l as getFaceUploadErrorCode, r as initializeDeepsightSession, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-DH7QsBFD.esm.js";
14
- import { a as cameraCycleProvider, c as deepsightSignalConfigActor, i as runProtectedAttempt, l as PROTECTED_CAPTURE_TARGET, n as createCameraCycleOwnership, o as flagFaceManualReview, r as readIadCameraStepGates, t as electDesktopCameraDevice } from "./desktopCameraElection-C7OkCslA.esm.js";
12
+ import { n as recordsLivenessClip, r as wantsDeepsightMotion } from "./deepsightCaptureConfig-BVJANeRn.esm.js";
13
+ import { a as sendLabelInspectionEvent, i as probeFaceCamera, l as getFaceUploadErrorCode, r as initializeDeepsightSession, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-DQYbHLxC.esm.js";
14
+ import { a as cameraCycleProvider, c as deepsightSignalConfigActor, i as runProtectedAttempt, l as PROTECTED_CAPTURE_TARGET, n as createCameraCycleOwnership, o as flagFaceManualReview, r as readIadCameraStepGates, t as electDesktopCameraDevice } from "./desktopCameraElection-BAq-Kaiq.esm.js";
15
15
  import { n as releaseFaceAvatarWarmup, r as warmFaceAvatar, t as createFaceAvatar } from "./createFaceAvatar-BNHdeFj8.esm.js";
16
16
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
17
17
  import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-SvIvYyWB.esm.js";
@@ -192,7 +192,7 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
192
192
  /** Per-attempt fallback when no step owner supplies the recording service. */
193
193
  async createAttemptRecordingService() {
194
194
  const wasmUtil = await this.options.dependencies.getWasmUtil();
195
- return (await import("./recordingService-G0FrtpAb.esm.js")).createRecordingService({
195
+ return (await import("./recordingService-OcyZO_w6.esm.js")).createRecordingService({
196
196
  config: this.options.config,
197
197
  wasmUtil,
198
198
  sessionToken: getToken(),
@@ -492,7 +492,7 @@ function createProtectedFaceControllerActor(options) {
492
492
  const input = getControllerInput();
493
493
  const pending = (async () => {
494
494
  const wasmUtil = await input.dependencies.getWasmUtil();
495
- const recordingModule = await import("./recordingService-G0FrtpAb.esm.js");
495
+ const recordingModule = await import("./recordingService-OcyZO_w6.esm.js");
496
496
  if (!active) return;
497
497
  stepRecording ??= recordingModule.createRecordingService({
498
498
  config: input.config,
@@ -1,5 +1,5 @@
1
1
  import { r as __toESM } from "./rolldown-runtime-B-1-B7_t.esm.js";
2
- import { t as SDK_VERSION } from "./sdkVersion-CrFzbh9y.esm.js";
2
+ import { t as SDK_VERSION } from "./sdkVersion-BY8g-EEL.esm.js";
3
3
  import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
4
4
  let currentEnvironment;
5
5
  /** Effective tier: the explicitly-set value, else the default (see note above). */
@@ -1,2 +1,2 @@
1
- import { E as updateFeatureManagementUser, T as subscribeFeatureManagement, _ as getIsFeatureManagementInitialized, a as stringParam, d as ONBOARDING_WEB_SDK_PARAMETER_STORE, f as getExperiment, g as getFeatureParameterStore, h as getFeatureManagementVersion, i as numberParam, l as resolveExperiment, m as getFeatureGate, n as defineExperimentParams, o as EXPERIMENT_UNAVAILABLE_SENTINEL, p as getFeatureDynamicConfig, r as enumParam, s as exposeExperimentOnce, t as booleanParam, u as resolveExperimentOnce, x as logEvent, y as getLayer } from "./feature-management-BVxb2LDw.esm.js";
1
+ import { E as updateFeatureManagementUser, T as subscribeFeatureManagement, _ as getIsFeatureManagementInitialized, a as stringParam, d as ONBOARDING_WEB_SDK_PARAMETER_STORE, f as getExperiment, g as getFeatureParameterStore, h as getFeatureManagementVersion, i as numberParam, l as resolveExperiment, m as getFeatureGate, n as defineExperimentParams, o as EXPERIMENT_UNAVAILABLE_SENTINEL, p as getFeatureDynamicConfig, r as enumParam, s as exposeExperimentOnce, t as booleanParam, u as resolveExperimentOnce, x as logEvent, y as getLayer } from "./feature-management-D_T-MG_i.esm.js";
2
2
  export { EXPERIMENT_UNAVAILABLE_SENTINEL, ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, enumParam, exposeExperimentOnce, getExperiment, getFeatureDynamicConfig, getFeatureGate, getFeatureManagementVersion, getFeatureParameterStore, getIsFeatureManagementInitialized, getLayer, logEvent, numberParam, resolveExperiment, resolveExperimentOnce, stringParam, subscribeFeatureManagement, updateFeatureManagementUser };
package/dist/flow.esm.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { g as screenOpened, m as screenClosed, v as addEvent } from "./types-DLsivQsu.esm.js";
2
2
  import "./events-Dlkhhx5O.esm.js";
3
3
  import { i as retryAfterReconnect } from "./connectivity-BCuEoQ-n.esm.js";
4
- import { S as mergeDashboardConfig, _ as resolveFlowModuleConfig, a as resolveDashboardModuleConfig, c as decideFlowPresets, d as stepsThatMayRunNext, f as enrichFlowModuleConfig, g as normalizeFlowModules, h as loadFlowConfigConverters, l as flowPresetAnalyticsModule, m as getRequiredWasmPipelines, n as getFlow, o as applyFlowPresets, p as getNextRequiredWasmPipelines, r as preloadDashboardFlow, s as armFlowPresets, t as completeDeferredActivation, u as getFirstFlowModuleKey, x as applyModulesConfig } from "./flowServices-DO_evfcT.esm.js";
4
+ import { S as mergeDashboardConfig, _ as resolveFlowModuleConfig, a as resolveDashboardModuleConfig, c as decideFlowPresets, d as stepsThatMayRunNext, f as enrichFlowModuleConfig, g as normalizeFlowModules, h as loadFlowConfigConverters, l as flowPresetAnalyticsModule, m as getRequiredWasmPipelines, n as getFlow, o as applyFlowPresets, p as getNextRequiredWasmPipelines, r as preloadDashboardFlow, s as armFlowPresets, t as completeDeferredActivation, u as getFirstFlowModuleKey, x as applyModulesConfig } from "./flowServices-3OXrEqDE.esm.js";
5
5
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
6
6
  import { i as assign, s as createActor, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
7
7
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
8
- import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-DK-fZm71.esm.js";
9
- import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-Dgi34yo9.esm.js";
8
+ import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-L0J63ui-.esm.js";
9
+ import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-BuZFd3Df.esm.js";
10
10
  import { n as isAdvanceableError } from "./advanceableErrors-CxZyPRyh.esm.js";
11
11
  //#region src/modules/flow/noOpFlowModuleMachine.ts
12
12
  const noOpFlowModuleMachine = /* @__PURE__ */ (() => setup({}).createMachine({
@@ -1,5 +1,5 @@
1
1
  import { t as api, u as endpoints } from "./api-CsXnB7m6.esm.js";
2
- import { i as toIncodeApiError } from "./apiError-BVYipHwI.esm.js";
2
+ import { i as toIncodeApiError } from "./apiError-BRiJu_rv.esm.js";
3
3
  //#region src/modules/flow/flowCompletionService.ts
4
4
  const getFinishStatus = async (flowId, signal) => {
5
5
  const url = `${endpoints.finishStatus}${flowId ? `?flowId=${flowId}` : ""}`;
@@ -1,10 +1,10 @@
1
1
  import { r as getWasmStatus } from "./warmup-O3rAoe1-.esm.js";
2
2
  import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
3
3
  import { r as getToken, t as api, u as endpoints } from "./api-CsXnB7m6.esm.js";
4
- import { d as whenSessionFingerprintSettled, f as getStandaloneFlowPolicy, i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-NEJvsqjQ.esm.js";
5
- import { E as updateFeatureManagementUser } from "./feature-management-BVxb2LDw.esm.js";
6
- import { i as toIncodeApiError } from "./apiError-BVYipHwI.esm.js";
7
- import "./session-C7-dU7kj.esm.js";
4
+ import { d as whenSessionFingerprintSettled, f as getStandaloneFlowPolicy, i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-q5b8Qwr3.esm.js";
5
+ import { E as updateFeatureManagementUser } from "./feature-management-D_T-MG_i.esm.js";
6
+ import { i as toIncodeApiError } from "./apiError-BRiJu_rv.esm.js";
7
+ import "./session-DKnCv6zu.esm.js";
8
8
  import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
9
9
  import { i as prefetchStartInfo } from "./phoneServices-XoT74eS0.esm.js";
10
10
  //#region src/modules/flow/dashboardConfig.ts
@@ -254,7 +254,7 @@ let configConverters;
254
254
  async function loadFlowConfigConverters(flow) {
255
255
  const needed = flow.flowModules.some((module) => module.key === "EXTERNAL_VERIFICATION" || module.key === "EKYB");
256
256
  if (configConverters || !needed) return;
257
- const [ekyc, ekyb] = await Promise.all([import("./ekycUtils-BnTyeA-_.esm.js").then((n) => n.n), import("./ekybUtils-CX-dR5p9.esm.js").then((n) => n.t)]);
257
+ const [ekyc, ekyb] = await Promise.all([import("./ekycUtils-DfBNTcvX.esm.js").then((n) => n.n), import("./ekybUtils-CX-dR5p9.esm.js").then((n) => n.t)]);
258
258
  configConverters = {
259
259
  toEkycConfig: ekyc.toEkycConfig,
260
260
  toEkybConfig: ekyb.toEkybConfig
@@ -0,0 +1,30 @@
1
+ //#region src/internal/formDefinitionsRollout/formDefinitionsRollout.ts
2
+ /**
3
+ * The rollout switch for form definitions (ENG-59781): one all-or-nothing
4
+ * answer to "do eKYC and eKYB build their forms from catalog definitions, or
5
+ * with today's builders?". The eKYC and eKYB machines read it once, when
6
+ * they're created, and pass the answer to the module adapters
7
+ * (`selectEkycDefinition`, `selectEkybForm`); the forms kernel
8
+ * (`internal/forms`) knows nothing about it. eKYC's public `toEkycConfig`
9
+ * reads it too, for a raw config a flow or workflow converts before the
10
+ * machine exists; the machine converts its own input with its answer.
11
+ *
12
+ * On by default (ENG-63324), so every migrated eKYC source and every eKYB
13
+ * country builds its form from its definition. A catalog-only eKYC source,
14
+ * one today's builder never knew, uses its definition either way, since it
15
+ * has no old path to fall back to.
16
+ *
17
+ * `false` is the rollback: every source and country today's builders know
18
+ * goes back to them. The builders stay in Core until ENG-63328 removes them.
19
+ *
20
+ * This is Incode's rollout decision, not the integrator's: it is not a
21
+ * `setup()` option. It stays a constant, so a rollback is a code change in an
22
+ * SDK release.
23
+ */
24
+ const ENABLED_BY_DEFAULT = true;
25
+ /** Whether sources and countries with a form definition use it. */
26
+ function isFormDefinitionsEnabled() {
27
+ return ENABLED_BY_DEFAULT;
28
+ }
29
+ //#endregion
30
+ export { isFormDefinitionsEnabled as t };
@@ -1,35 +1,46 @@
1
1
  import { t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
2
2
  import { r as isCalendarDate, t as INVALID_DATE_ERROR_KEY } from "./calendarDate-D2zWfUlA.esm.js";
3
- import { r as DYNAMIC_REQUIRED_KEY } from "./resolveForm-DaaQSVWp.esm.js";
3
+ import { c as readValue, l as DYNAMIC_REQUIRED_KEY, o as blank, s as isEmptyValue } from "./trim-OmrUb6mG.esm.js";
4
4
  import { n as hasAllowedCharacters, t as CLASS_PATTERNS } from "./allowedCharacters-Bnir--CN.esm.js";
5
- //#region src/internal/forms/validateForm.ts
6
- const blank = (value) => value.trim() === "";
7
- /**
8
- * A value as the kernel reads it: text, a list of texts, or absent. A host
9
- * can set anything (`setField`), so `null` counts as absent and a number or
10
- * other scalar as its text.
11
- */
12
- function readValue(value) {
13
- if (value === void 0 || value === null) return void 0;
14
- if (typeof value === "string") return value;
15
- if (Array.isArray(value)) return value.map((entry) => entry === void 0 || entry === null ? "" : String(entry));
16
- return String(value);
5
+ //#region src/internal/forms/registry.ts
6
+ const byId = (items = []) => new Map(items.map((item) => [item.id, item]));
7
+ /** Builds a registry from lists, keyed by id. */
8
+ function createFormRegistry(input) {
9
+ return {
10
+ schemaVersions: [...input.schemaVersions],
11
+ vocabulary: input.vocabulary,
12
+ kinds: new Set(input.kinds),
13
+ groups: new Set(input.groups),
14
+ conditions: new Set(input.conditions ?? []),
15
+ prefillSources: new Set(input.prefillSources ?? []),
16
+ rules: byId(input.rules),
17
+ transforms: byId(input.transforms),
18
+ groupRules: byId(input.groupRules),
19
+ optionLists: new Map(Object.entries(input.optionLists ?? {})),
20
+ messages: new Map(Object.entries(input.messages ?? {})),
21
+ flags: new Set(input.flags ?? []),
22
+ required: input.required,
23
+ structure: input.structure
24
+ };
17
25
  }
18
- /**
19
- * Whether a value is empty (spec semantic 2): absent or only whitespace, or
20
- * a list with no entry that isn't.
21
- *
22
- * A phone with only its calling code is a value, not empty, as in every
23
- * module (CK1 decision K15): the kernel can't tell a calling code from a
24
- * number being typed (`+44` from `+441`) without calling-code data the phone
25
- * rules don't expose, and the UI never stores one (an untouched phone input
26
- * is `""`). ENG-63329 drops the spec's calling-code clause.
27
- */
28
- function isEmptyValue(_field, value) {
29
- const read = readValue(value);
30
- if (read === void 0) return true;
31
- return typeof read === "string" ? blank(read) : read.every(blank);
26
+ /** The ids a registry implements, for `checkSupport`. */
27
+ function supportedIds(registry) {
28
+ return {
29
+ schemaVersions: registry.schemaVersions,
30
+ vocabulary: registry.vocabulary,
31
+ kinds: registry.kinds,
32
+ groups: registry.groups,
33
+ rules: new Set(registry.rules.keys()),
34
+ transforms: new Set(registry.transforms.keys()),
35
+ groupRules: new Set(registry.groupRules.keys()),
36
+ optionLists: new Set(registry.optionLists.keys()),
37
+ conditions: registry.conditions,
38
+ prefillSources: registry.prefillSources,
39
+ flags: registry.flags
40
+ };
32
41
  }
42
+ //#endregion
43
+ //#region src/internal/forms/validateForm.ts
33
44
  function optionValues(field, registry) {
34
45
  if (field.options) return field.options.map((option) => option.value);
35
46
  if (field.optionsRef) return registry.optionLists.get(field.optionsRef);
@@ -200,138 +211,6 @@ function validateForm(form, values, registry, env, entries = {}) {
200
211
  return errors;
201
212
  }
202
213
  //#endregion
203
- //#region src/internal/forms/buildPayload.ts
204
- /** The request key a field writes, or nothing when it's never sent. */
205
- const keyOf = (field) => field.payload?.omit ? void 0 : field.payload?.key ?? field.name;
206
- const isBlank = (value) => (value ?? "").trim() === "";
207
- /** The ids of a field's request transforms the registry doesn't implement. */
208
- const unknownTransforms = (field, registry) => (field.payload?.transforms ?? []).map((ref) => ref.id).filter((id) => !registry.transforms.has(id));
209
- function transform(field, value, registry, env) {
210
- return (field.payload?.transforms ?? []).reduce((current, ref) => {
211
- const impl = registry.transforms.get(ref.id);
212
- return impl ? impl.apply(current, ref.params ?? {}, env) : current;
213
- }, value);
214
- }
215
- /**
216
- * A `submit.context` entry's runtime value, or nothing when it's empty: the
217
- * source module configuration names (it can be an alias of the definition's
218
- * source), else the definition's; the definition's country, so a form with
219
- * no fixed country leaves the key out; module configuration's risk add-ons.
220
- */
221
- function contextValue(name, definition, env) {
222
- switch (name) {
223
- case "source": return env.source || definition.source || void 0;
224
- case "country": return definition.country || void 0;
225
- case "riskAddons": return env.riskAddons?.length ? [...env.riskAddons] : void 0;
226
- default: return;
227
- }
228
- }
229
- /**
230
- * The request body a definition describes (spec semantic 5):
231
- *
232
- * 1. Every shown field with a non-empty value, under `payload.key` (default
233
- * its name), after its request transforms. Empty values are left out,
234
- * never sent as `""` or `null`, so `omitWhenEmpty` changes nothing here;
235
- * so is a value its transforms leave blank. A list sends its non-blank
236
- * entries, each transformed. A collection sends each entry with a value as
237
- * its `join` fields' values, trimmed and joined with a space.
238
- * 2. `submit.static` keys as written, then `submit.context` keys: the source
239
- * (`env.source`, else the definition's), the definition's country, or
240
- * `riskAddons`. An empty context value is left out.
241
- * 3. `submit.copies` in order: each replaces `to` with `from`'s value, when
242
- * `from` is in the body.
243
- *
244
- * Two writers of one key keep the first and report a problem.
245
- */
246
- function buildPayload(form, values, registry, env, entries = {}) {
247
- const { definition } = form;
248
- const body = {};
249
- const writers = /* @__PURE__ */ new Map();
250
- const problems = [];
251
- const write = (key, value, writer) => {
252
- const first = writers.get(key);
253
- if (first !== void 0) {
254
- problems.push({
255
- kind: "duplicateKey",
256
- key,
257
- writers: [first, writer]
258
- });
259
- return;
260
- }
261
- writers.set(key, writer);
262
- body[key] = value;
263
- };
264
- for (const { field } of form.fields) {
265
- const key = keyOf(field);
266
- const value = readValue(values[field.name]);
267
- if (key === void 0 || isEmptyValue(field, value)) continue;
268
- for (const id of unknownTransforms(field, registry)) problems.push({
269
- kind: "unknownTransform",
270
- field: field.name,
271
- transform: id
272
- });
273
- if (typeof value === "string") {
274
- const sent = transform(field, value, registry, env);
275
- if (!isBlank(sent)) write(key, sent, field.name);
276
- } else if (Array.isArray(value)) {
277
- const sent = value.filter((entry) => !isBlank(entry)).map((entry) => transform(field, entry, registry, env)).filter((entry) => !isBlank(entry));
278
- if (sent.length > 0) write(key, sent, field.name);
279
- }
280
- }
281
- for (const { collection } of form.collections) {
282
- const joined = (entries[collection.id] ?? []).map((entry) => collection.payload.join.map((name) => (entry[name] ?? "").trim()).filter((part) => part !== "").join(" ")).filter((value) => value !== "");
283
- if (joined.length > 0) write(collection.payload.key, joined, collection.id);
284
- }
285
- for (const [key, value] of Object.entries(definition.submit.static ?? {})) write(key, value, "static");
286
- for (const [key, name] of Object.entries(definition.submit.context ?? {})) {
287
- const value = contextValue(name, definition, env);
288
- if (value !== void 0) write(key, value, "context");
289
- }
290
- for (const { from, to } of definition.submit.copies ?? []) if (Object.prototype.hasOwnProperty.call(body, from)) body[to] = body[from];
291
- return {
292
- body,
293
- problems
294
- };
295
- }
296
- //#endregion
297
- //#region src/internal/forms/registry.ts
298
- const byId = (items = []) => new Map(items.map((item) => [item.id, item]));
299
- /** Builds a registry from lists, keyed by id. */
300
- function createFormRegistry(input) {
301
- return {
302
- schemaVersions: [...input.schemaVersions],
303
- vocabulary: input.vocabulary,
304
- kinds: new Set(input.kinds),
305
- groups: new Set(input.groups),
306
- conditions: new Set(input.conditions ?? []),
307
- prefillSources: new Set(input.prefillSources ?? []),
308
- rules: byId(input.rules),
309
- transforms: byId(input.transforms),
310
- groupRules: byId(input.groupRules),
311
- optionLists: new Map(Object.entries(input.optionLists ?? {})),
312
- messages: new Map(Object.entries(input.messages ?? {})),
313
- flags: new Set(input.flags ?? []),
314
- required: input.required,
315
- structure: input.structure
316
- };
317
- }
318
- /** The ids a registry implements, for `checkSupport`. */
319
- function supportedIds(registry) {
320
- return {
321
- schemaVersions: registry.schemaVersions,
322
- vocabulary: registry.vocabulary,
323
- kinds: registry.kinds,
324
- groups: registry.groups,
325
- rules: new Set(registry.rules.keys()),
326
- transforms: new Set(registry.transforms.keys()),
327
- groupRules: new Set(registry.groupRules.keys()),
328
- optionLists: new Set(registry.optionLists.keys()),
329
- conditions: registry.conditions,
330
- prefillSources: registry.prefillSources,
331
- flags: registry.flags
332
- };
333
- }
334
- //#endregion
335
214
  //#region src/shared/formFields.ts
336
215
  /**
337
216
  * Field state for a module on the form-definition kernel: the values, each
@@ -436,16 +315,6 @@ const allowedCharacters = {
436
315
  }
437
316
  };
438
317
  //#endregion
439
- //#region src/internal/forms/rules/e164.ts
440
- /**
441
- * `e164`: the phone as `+<country code><number>`. While the phone rules
442
- * aren't loaded, or the number isn't valid, it stays as typed.
443
- */
444
- const e164 = {
445
- id: "e164",
446
- apply: (value, _params, env) => env.deps.phone?.formatE164(value, env.country) ?? value
447
- };
448
- //#endregion
449
318
  //#region src/internal/forms/rules/oneOfRequired.ts
450
319
  /**
451
320
  * `oneOfRequired`: at least one of the rule's shown fields has a value. With
@@ -464,16 +333,6 @@ const oneOfRequired = {
464
333
  }
465
334
  };
466
335
  //#endregion
467
- //#region src/internal/forms/rules/trim.ts
468
- /**
469
- * `trim`: removes leading and trailing whitespace. On a list, the caller
470
- * applies it to each entry.
471
- */
472
- const trim = {
473
- id: "trim",
474
- apply: (value) => value.trim()
475
- };
476
- //#endregion
477
336
  //#region src/shared/formErrors.ts
478
337
  /**
479
338
  * The error for an empty required field, as eKYC, eKYB and Pre-fill show it
@@ -509,4 +368,4 @@ const STRUCTURE_MESSAGES = {
509
368
  })
510
369
  };
511
370
  //#endregion
512
- export { e164 as a, setFieldValue as c, createFormRegistry as d, supportedIds as f, oneOfRequired as i, validateAllValues as l, withMessage as m, requiredError as n, allowedCharacters as o, buildPayload as p, trim as r, phoneDeps as s, STRUCTURE_MESSAGES as t, validateFieldValue as u };
371
+ export { phoneDeps as a, validateFieldValue as c, supportedIds as d, allowedCharacters as i, withMessage as l, requiredError as n, setFieldValue as o, oneOfRequired as r, validateAllValues as s, STRUCTURE_MESSAGES as t, createFormRegistry as u };
@@ -1,2 +1,2 @@
1
- import { n as GeolocationState, o as geolocationMachine, r as createGeolocationManager, s as GeolocationConfig, t as GeolocationManager } from "./geolocationManager-CENrvxpK.js";
1
+ import { n as GeolocationState, o as geolocationMachine, r as createGeolocationManager, s as GeolocationConfig, t as GeolocationManager } from "./geolocationManager-Del2ddmt.js";
2
2
  export { type GeolocationConfig, type GeolocationManager, type GeolocationState, createGeolocationManager, geolocationMachine };