@adyen/kyc-components 3.80.0-beta.0 → 3.81.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-DBSkKRHS.js → AcceptTermsOfServiceComponent-DUZ8m-El.js} +46 -45
  2. package/dist/{AccountSetupRejected-gAGWuJ9N.js → AccountSetupRejected-DSGGI8JF.js} +2 -2
  3. package/dist/{Avatar-5RObc8Yd.js → Avatar-DY9KPxi_.js} +1 -1
  4. package/dist/{BusinessDetailsDropin-O92NE-y1.js → BusinessDetailsDropin-CCW1NBK5.js} +36 -63
  5. package/dist/{BusinessFinancingComponent-DDKomenp.js → BusinessFinancingComponent-Dn4d85NX.js} +3 -3
  6. package/dist/{BusinessFinancingDropin-Bhg9neRS.js → BusinessFinancingDropin-BpRf2LTA.js} +76 -78
  7. package/dist/{BusinessFinancingPage-DyItV5SR.js → BusinessFinancingPage-t8vqkZMT.js} +3 -3
  8. package/dist/{BusinessTypeSelectionPage-DmjbM57I.js → BusinessTypeSelectionPage-Bk3GHlFq.js} +4 -4
  9. package/dist/{ContractViewer-DBW5C6kA.js → ContractViewer-B2LwC3wV.js} +4 -11
  10. package/dist/{CreateIndividualComponent-c8yAn2_J.js → CreateIndividualComponent-DcHuBu_q.js} +3 -3
  11. package/dist/{CreateTransferInstrumentComponent-BF-KFdjU.js → CreateTransferInstrumentComponent-_ZekKCzs.js} +2 -2
  12. package/dist/{CustomerSupport-rSYElbVr.js → CustomerSupport-BMHMLSZ9.js} +5 -5
  13. package/dist/{DebugModal-BTr0idCC.js → DebugModal-CxVACxM4.js} +4 -4
  14. package/dist/{DecisionMakerDetailsPage-DQcWSwTb.js → DecisionMakerDetailsPage-R_PPht3A.js} +3 -3
  15. package/dist/{DecisionMakers-C2awPhE6.js → DecisionMakers-Bxdj0aIF.js} +29 -39
  16. package/dist/DetailViewLayout-Z9cuUp4X.js +65 -0
  17. package/dist/{EmbeddedStatus-COKtxNW-.js → EmbeddedStatus-CDIMc5D0.js} +2 -2
  18. package/dist/EndStateLayout-ChS903yq.js +71 -0
  19. package/dist/{FormFlow-CNxGh4Yu.js → FormFlow-gcCKgNQt.js} +2 -2
  20. package/dist/{IndividualOnfidoDropin-DUzjucM9.js → IndividualOnfidoDropin-JrEsqyDz.js} +478 -260
  21. package/dist/{Introduction-BEM_wmkj.js → Introduction-DTjWG0SY.js} +3 -3
  22. package/dist/{LegalRepresentativeDetailsPage-1tw_BPLr.js → LegalRepresentativeDetailsPage-BAVFc1rZ.js} +3 -3
  23. package/dist/{ManageIndividualComponent-B0y8wd24.js → ManageIndividualComponent-BHsbHn8F.js} +3 -3
  24. package/dist/{ManageTermsOfServiceComponent-DJVDf-iH.js → ManageTermsOfServiceComponent-Dl1Rs8mi.js} +3 -3
  25. package/dist/{ManageTransferInstrumentComponent-DF4Q8oEB.js → ManageTransferInstrumentComponent-D1ntoR1k.js} +16 -42
  26. package/dist/{OnboardingDropinComponent-B0Sj7qf1.js → OnboardingDropinComponent-Dvq5Ocum.js} +49 -37
  27. package/dist/{Review-C4HOjR6y.js → Review-Mn0Fnm2U.js} +3 -3
  28. package/dist/{RootBusinessDetailsPage-DeqKfOFX.js → RootBusinessDetailsPage-DoCCJDUa.js} +17 -17
  29. package/dist/{RootIndividualDetailsPage-CKOquQ0-.js → RootIndividualDetailsPage-C5WnGiHW.js} +3 -3
  30. package/dist/{SignPCIComponent-Cx8oL8wu.js → SignPCIComponent-BGnCTWk_.js} +87 -85
  31. package/dist/{SingpassSelection-BJNZw1u-.js → SingpassSelection-BqY3v7Hq.js} +1 -1
  32. package/dist/{SoleProprietorshipPage-Dtw3XHVJ.js → SoleProprietorshipPage-VL2n0omM.js} +3 -3
  33. package/dist/{SourceOfFundsPage-gPmK4QX6.js → SourceOfFundsPage-BsHdnsPV.js} +11 -11
  34. package/dist/{StoreProvider-DhQ4sdLg.js → StoreProvider-Fbl3I9L7.js} +3379 -3105
  35. package/dist/{TaskItemStatus-Cxcag2AH.js → TaskItemStatus-CC4mw_PB.js} +2 -2
  36. package/dist/{TaskStatusIndicator-B5fp8LzR.js → TaskStatusIndicator-B7G7gqRt.js} +1 -1
  37. package/dist/{TaxReportingDropin-CbDYoO31.js → TaxReportingDropin-C8Z2k6kC.js} +8 -8
  38. package/dist/{TileGroup-BkLtnLiA.js → TileGroup-B7_1rrEe.js} +2 -2
  39. package/dist/{TrustDetailsPage-DktRQRum.js → TrustDetailsPage-q8pyPH40.js} +5 -5
  40. package/dist/{TrustMemberCompanyPage-CLTOpWzU.js → TrustMemberCompanyPage-BT4dvwuF.js} +4 -4
  41. package/dist/{TrustMemberIndividualPage-wPh86-GQ.js → TrustMemberIndividualPage-CwxurDZs.js} +3 -3
  42. package/dist/{UnincorporatedPartnershipIndividualPage-B-2i68Nd.js → UnincorporatedPartnershipIndividualPage-2Z7Ljh7Y.js} +3 -3
  43. package/dist/{UnincorporatedPartnershipMemberCompanyPage-DWLczj6F.js → UnincorporatedPartnershipMemberCompanyPage-DD7ihKcb.js} +3 -3
  44. package/dist/{VerificationErrorAlert-AbvM4lbK.js → VerificationErrorAlert-Cbls8Urj.js} +2 -2
  45. package/dist/{ViewVerificationStatusComponent-vVZeXYDs.js → ViewVerificationStatusComponent-BZbgVCiJ.js} +3 -3
  46. package/dist/adyen-business-financing.js +2 -2
  47. package/dist/adyen-individual.js +2 -2
  48. package/dist/adyen-kyc-components.js +14 -14
  49. package/dist/adyen-manage-individual.js +2 -2
  50. package/dist/adyen-manage-terms-of-service.js +2 -2
  51. package/dist/adyen-manage-transfer-instruments.js +2 -2
  52. package/dist/adyen-onboarding.js +2 -2
  53. package/dist/adyen-terms-of-service.js +2 -2
  54. package/dist/adyen-transfer-instrument.js +2 -2
  55. package/dist/adyen-verification-status.js +2 -2
  56. package/dist/bg-BG-9uVrFuHv.js +23 -0
  57. package/dist/bg-BG-B0-ZcjR0.js +22 -0
  58. package/dist/bg-BG-BYkC3yKf.js +58 -0
  59. package/dist/bg-BG-CMomhopf.js +35 -0
  60. package/dist/bg-BG-Dlzl9Szn.js +36 -0
  61. package/dist/bg-BG-NMIts2sa.js +35 -0
  62. package/dist/bg-BG-hFblesn-.js +15 -0
  63. package/dist/cs-CZ-B8IPRc47.js +15 -0
  64. package/dist/cs-CZ-BkyFDlAU.js +36 -0
  65. package/dist/cs-CZ-Csr_35T-.js +35 -0
  66. package/dist/cs-CZ-DMzortvO.js +35 -0
  67. package/dist/cs-CZ-Dk1ePReM.js +22 -0
  68. package/dist/cs-CZ-Wzc382q6.js +23 -0
  69. package/dist/cs-CZ-zTkICtXj.js +58 -0
  70. package/dist/da-DK-B5KNtXL8.js +36 -0
  71. package/dist/da-DK-BTpZzEgA.js +15 -0
  72. package/dist/da-DK-CeNMXUfE.js +23 -0
  73. package/dist/da-DK-D0N1TVVU.js +58 -0
  74. package/dist/da-DK-DStNe471.js +22 -0
  75. package/dist/da-DK-Dm8o1giq.js +35 -0
  76. package/dist/da-DK-q2b_1elr.js +35 -0
  77. package/dist/de-DE-BA9tcpNQ.js +36 -0
  78. package/dist/de-DE-CGoBPCPv.js +22 -0
  79. package/dist/de-DE-D2ByeIZs.js +35 -0
  80. package/dist/de-DE-DMFaycio.js +35 -0
  81. package/dist/de-DE-DjOUNvp6.js +15 -0
  82. package/dist/de-DE-Dtuu-nE7.js +58 -0
  83. package/dist/de-DE-JI-7mvxy.js +23 -0
  84. package/dist/el-GR-B69zcWyB.js +22 -0
  85. package/dist/el-GR-CGeBAkDN.js +35 -0
  86. package/dist/el-GR-Cu9HwD-f.js +15 -0
  87. package/dist/el-GR-DGW388LZ.js +35 -0
  88. package/dist/el-GR-DIhHT2q_.js +36 -0
  89. package/dist/el-GR-DaO38A1s.js +58 -0
  90. package/dist/el-GR-DfNOPkLq.js +23 -0
  91. package/dist/en-US-546hB2Wn.js +60 -0
  92. package/dist/en-US-BQpgt41j.js +37 -0
  93. package/dist/en-US-BTYdAWXp.js +15 -0
  94. package/dist/en-US-DHq7VYFs.js +23 -0
  95. package/dist/en-US-DX4NHkX-.js +38 -0
  96. package/dist/en-US-SbE0c1gn.js +36 -0
  97. package/dist/es-ES-BsQpwaPN.js +58 -0
  98. package/dist/es-ES-CKMfS8Yy.js +22 -0
  99. package/dist/es-ES-Cj7q7fWO.js +15 -0
  100. package/dist/es-ES-DOVPTeyf.js +23 -0
  101. package/dist/es-ES-RXwbiHjS.js +36 -0
  102. package/dist/es-ES-WWftn3JX.js +35 -0
  103. package/dist/es-ES-pXHx3ODy.js +35 -0
  104. package/dist/et-EE-BJIsPOnh.js +23 -0
  105. package/dist/et-EE-D5lRJbMZ.js +35 -0
  106. package/dist/et-EE-DF_GqBgK.js +58 -0
  107. package/dist/et-EE-Dor3enPS.js +15 -0
  108. package/dist/et-EE-Dw-aPF7J.js +22 -0
  109. package/dist/et-EE-QLVnr6Vl.js +35 -0
  110. package/dist/et-EE-ZssIqWkO.js +36 -0
  111. package/dist/fi-FI-BJ9RzrL3.js +58 -0
  112. package/dist/fi-FI-BNcnKrJ9.js +15 -0
  113. package/dist/fi-FI-D522KHGk.js +23 -0
  114. package/dist/fi-FI-D9E_KaJi.js +35 -0
  115. package/dist/fi-FI-DT351N-G.js +35 -0
  116. package/dist/fi-FI-DmiggQEL.js +36 -0
  117. package/dist/fi-FI-REYOX46I.js +22 -0
  118. package/dist/fr-FR-BNXXNUX_.js +35 -0
  119. package/dist/fr-FR-Bn3D6mmY.js +15 -0
  120. package/dist/fr-FR-CNR5-s9g.js +58 -0
  121. package/dist/fr-FR-Cv0k-3Xc.js +35 -0
  122. package/dist/fr-FR-D9qaP6nx.js +22 -0
  123. package/dist/fr-FR-DInQKkTd.js +23 -0
  124. package/dist/fr-FR-N5wYE2BZ.js +36 -0
  125. package/dist/{getFieldsWithExistingData-BS9W6RQp.js → getFieldsWithExistingData-BjmOzrhP.js} +2 -2
  126. package/dist/{hasDataChanged-DK74H0sZ.js → hasDataChanged-f49kid1W.js} +2 -2
  127. package/dist/hr-HR-5iwKtfgh.js +36 -0
  128. package/dist/hr-HR-B8AZ4eHJ.js +35 -0
  129. package/dist/hr-HR-CNzbyo9r.js +15 -0
  130. package/dist/hr-HR-CbxEvbrE.js +22 -0
  131. package/dist/hr-HR-CjA4MWAU.js +58 -0
  132. package/dist/hr-HR-CzSrqEFA.js +35 -0
  133. package/dist/hr-HR-DzS44Gpv.js +23 -0
  134. package/dist/hu-HU-Aq1LsWah.js +36 -0
  135. package/dist/hu-HU-BSOiZA7a.js +15 -0
  136. package/dist/hu-HU-D0C6UfXB.js +22 -0
  137. package/dist/hu-HU-DRi6Dz9U.js +35 -0
  138. package/dist/hu-HU-NhwFr6o-.js +58 -0
  139. package/dist/hu-HU-xCvNM5TU.js +23 -0
  140. package/dist/hu-HU-zK6nUqWr.js +35 -0
  141. package/dist/{LandingLayout-DyY0Exht.js → isIdNowModalOpen-C3cyeMaK.js} +11 -2
  142. package/dist/it-IT-8DEagvb2.js +36 -0
  143. package/dist/it-IT-BV9K87FK.js +58 -0
  144. package/dist/it-IT-BeYbInCQ.js +35 -0
  145. package/dist/it-IT-Biduphjt.js +22 -0
  146. package/dist/it-IT-C_fNHhjE.js +35 -0
  147. package/dist/it-IT-CjEYONJg.js +23 -0
  148. package/dist/it-IT-DvM-9LpM.js +15 -0
  149. package/dist/ja-JP-B2txEVPx.js +22 -0
  150. package/dist/ja-JP-BGAJQs1g.js +36 -0
  151. package/dist/ja-JP-BUz3qN-V.js +23 -0
  152. package/dist/ja-JP-C1OQ16fo.js +35 -0
  153. package/dist/ja-JP-DXcP0ojZ.js +58 -0
  154. package/dist/ja-JP-GXkLvnQ4.js +15 -0
  155. package/dist/ja-JP-weDU8GLW.js +35 -0
  156. package/dist/{localizeDateString-C34eXZqY.js → localizeDateString-aA76e6GH.js} +1 -1
  157. package/dist/lt-LT-B6CJ4ULI.js +23 -0
  158. package/dist/lt-LT-BUYY0LaT.js +35 -0
  159. package/dist/lt-LT-C_YMgjp9.js +22 -0
  160. package/dist/lt-LT-DNjXmQPv.js +15 -0
  161. package/dist/lt-LT-HZOWQKZT.js +36 -0
  162. package/dist/lt-LT-_MzAcXJo.js +35 -0
  163. package/dist/lt-LT-tXTApHm2.js +58 -0
  164. package/dist/lv-LV-B3sT3_cw.js +22 -0
  165. package/dist/lv-LV-B9js9VoA.js +35 -0
  166. package/dist/lv-LV-CRhXAjn6.js +35 -0
  167. package/dist/lv-LV-ChOoZuhc.js +15 -0
  168. package/dist/lv-LV-DSaQNC67.js +58 -0
  169. package/dist/lv-LV-DTtuyfHS.js +23 -0
  170. package/dist/lv-LV-F-Z4lDCV.js +36 -0
  171. package/dist/{mapFinancialReportsToFinancialInformation-DoJu-RRw.js → mapFinancialReportsToFinancialInformation-Dx35AZ1B.js} +2 -2
  172. package/dist/mapScriptLocalization-H2Re3k5X.js +35 -0
  173. package/dist/nl-NL-BHqiO21q.js +15 -0
  174. package/dist/nl-NL-C-xUU2N3.js +36 -0
  175. package/dist/nl-NL-DLedC3mO.js +35 -0
  176. package/dist/nl-NL-Dbx0ZmI7.js +35 -0
  177. package/dist/nl-NL-DywVQ9km.js +58 -0
  178. package/dist/nl-NL-G1wVnmzT.js +22 -0
  179. package/dist/nl-NL-Zcq0bXd-.js +23 -0
  180. package/dist/no-NO-47ncaBZY.js +36 -0
  181. package/dist/no-NO-B8oxqfNI.js +58 -0
  182. package/dist/no-NO-BTtAuqCb.js +22 -0
  183. package/dist/no-NO-BxReX6oF.js +23 -0
  184. package/dist/no-NO-C0sfkp82.js +35 -0
  185. package/dist/no-NO-CKT9kLAH.js +15 -0
  186. package/dist/no-NO-CpVal4cV.js +35 -0
  187. package/dist/pl-PL--qPaNyJD.js +22 -0
  188. package/dist/pl-PL-1ylK-_FE.js +35 -0
  189. package/dist/pl-PL-C89s21hn.js +58 -0
  190. package/dist/pl-PL-CZLzkboH.js +36 -0
  191. package/dist/pl-PL-D6heiKsH.js +15 -0
  192. package/dist/pl-PL-DAPGaxWi.js +35 -0
  193. package/dist/pl-PL-T6uD5--R.js +23 -0
  194. package/dist/pt-PT-BY9rcwcF.js +35 -0
  195. package/dist/pt-PT-BkvMsoK4.js +35 -0
  196. package/dist/pt-PT-BvK00TeI.js +58 -0
  197. package/dist/pt-PT-CN4ws8N7.js +36 -0
  198. package/dist/pt-PT-D2elvnDU.js +15 -0
  199. package/dist/pt-PT-Dk48OVtf.js +22 -0
  200. package/dist/pt-PT-N0njcfLO.js +23 -0
  201. package/dist/{resolveEnvironment-rJv_NJF_.js → resolveEnvironment-zIeibPQJ.js} +3 -3
  202. package/dist/ro-RO-BLuOjrS0.js +22 -0
  203. package/dist/ro-RO-CpGd9emB.js +58 -0
  204. package/dist/ro-RO-DJLWmWZ4.js +35 -0
  205. package/dist/ro-RO-DL9V1CMj.js +15 -0
  206. package/dist/ro-RO-Dfx0g3bU.js +35 -0
  207. package/dist/ro-RO-Ic1SzBgx.js +23 -0
  208. package/dist/ro-RO-RylOvc5g.js +36 -0
  209. package/dist/{rules-OP83mdq4.js → rules-DMMZWi5Q.js} +2 -2
  210. package/dist/sk-SK-B7o3L57C.js +35 -0
  211. package/dist/sk-SK-BSioQTMW.js +15 -0
  212. package/dist/sk-SK-BfJKbtGy.js +36 -0
  213. package/dist/sk-SK-C1Ky2nl_.js +22 -0
  214. package/dist/sk-SK-CiD0FeLN.js +23 -0
  215. package/dist/sk-SK-DlX5KvBV.js +58 -0
  216. package/dist/sk-SK-iO863_t2.js +35 -0
  217. package/dist/sl-SI-BB7iVcFI.js +22 -0
  218. package/dist/sl-SI-BylvpF-X.js +15 -0
  219. package/dist/sl-SI-C8CMAkD0.js +35 -0
  220. package/dist/sl-SI-Cth2Qa5T.js +35 -0
  221. package/dist/sl-SI-DklUFzaY.js +36 -0
  222. package/dist/sl-SI-MZoDApq9.js +23 -0
  223. package/dist/sl-SI-NI2OJAvm.js +58 -0
  224. package/dist/style.css +737 -489
  225. package/dist/styles-CLV89_hH.js +737 -489
  226. package/dist/sv-SE-Bwh0wKFk.js +35 -0
  227. package/dist/sv-SE-CAZpDX9G.js +58 -0
  228. package/dist/sv-SE-DCFSf4Oj.js +23 -0
  229. package/dist/sv-SE-DbI-1JqN.js +22 -0
  230. package/dist/sv-SE-Dwz1yTrB.js +15 -0
  231. package/dist/sv-SE-OPOHtqtP.js +35 -0
  232. package/dist/sv-SE-qduyDIzY.js +36 -0
  233. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +9 -5
  234. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +1 -1
  235. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +29 -32
  236. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +0 -1
  237. package/dist/types/components/Individual/fields/NameFields/types.d.ts +4 -18
  238. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +1 -1
  239. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +1 -1
  240. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/IdNowVerificationModal.d.ts +4 -0
  241. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +16 -0
  242. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +2 -0
  243. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +2 -1
  244. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/validateExtractionResult.d.ts +12 -0
  245. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +5 -3
  246. package/dist/types/components/Individual/helpers/isDecisionMakerTask.d.ts +2 -0
  247. package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
  248. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -1
  249. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -5
  250. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +4 -5
  251. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  252. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  253. package/dist/types/components/ui/layout/DetailViewLayout/DetailViewLayout.d.ts +12 -0
  254. package/dist/types/components/ui/layout/EndStateLayout/EndStateLayout.d.ts +13 -0
  255. package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +7 -2
  256. package/dist/types/core/models/api/individual.d.ts +5 -10
  257. package/dist/types/core/models/api/legal-arrangement.d.ts +0 -8
  258. package/dist/types/core/models/api/organization.d.ts +4 -8
  259. package/dist/types/core/models/api/scriptLocalization.d.ts +9 -0
  260. package/dist/types/hooks/useMultiForm/types.d.ts +4 -4
  261. package/dist/types/language/types.d.ts +2 -0
  262. package/dist/types/types/localizedScriptSchema.d.ts +22 -0
  263. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  264. package/dist/types/utils/getName.d.ts +1 -0
  265. package/dist/types/utils/mapScriptLocalization.d.ts +55 -0
  266. package/dist/{useMultiForm-ChxUZ4e7.js → useMultiForm-BOVByA_E.js} +6 -3
  267. package/dist/{useOnboardingStatus-1BQlEPEi.js → useOnboardingStatus-BNwuglKy.js} +1 -1
  268. package/dist/{useTermsOfServiceStatus-BaVCmUdo.js → useTermsOfServiceStatus-lCNo2Bdd.js} +1 -1
  269. package/dist/{useUpdateLegalEntity-LE_Kt3am.js → useUpdateLegalEntity-CcUHqJyo.js} +2 -2
  270. package/dist/{utils-DmcbDJEd.js → utils-Jk_zHwaz.js} +4 -4
  271. package/dist/{validate-B2VmmEPC.js → validate-DUUyXWgS.js} +2 -2
  272. package/dist/{validate-D66zPhDG.js → validate-gCfuQFAB.js} +2 -2
  273. package/package.json +4 -4
  274. package/dist/FormEndState-BmDRa3zJ.js +0 -59
  275. package/dist/bg-BG-HpLj_LOM.js +0 -16
  276. package/dist/cs-CZ-CQ_M3lEp.js +0 -16
  277. package/dist/da-DK-k4JW3iVF.js +0 -16
  278. package/dist/de-DE-C7mjtS5w.js +0 -16
  279. package/dist/el-GR-CEQrkYHW.js +0 -16
  280. package/dist/en-US-DDagIr01.js +0 -16
  281. package/dist/es-ES-DB1c74Kv.js +0 -16
  282. package/dist/et-EE-xIegUSuv.js +0 -16
  283. package/dist/fi-FI-NCxneAqU.js +0 -16
  284. package/dist/fr-FR-daiUnUwo.js +0 -16
  285. package/dist/hr-HR-BAUywqDj.js +0 -16
  286. package/dist/hu-HU-3GQojIHR.js +0 -16
  287. package/dist/it-IT-pDWPFHEh.js +0 -16
  288. package/dist/ja-JP-scPXJ93L.js +0 -16
  289. package/dist/lt-LT-BcGNy8Ti.js +0 -16
  290. package/dist/lv-LV-CBD07r1Y.js +0 -16
  291. package/dist/nl-NL-BxJUDHMK.js +0 -16
  292. package/dist/no-NO-Drup6Jyy.js +0 -16
  293. package/dist/pl-PL-BXv8Mmzb.js +0 -16
  294. package/dist/pt-PT-D8nU-UM2.js +0 -16
  295. package/dist/ro-RO-CG33OwqS.js +0 -16
  296. package/dist/sk-SK-DV_xkO69.js +0 -16
  297. package/dist/sl-SI-B5yeoadY.js +0 -16
  298. package/dist/sv-SE-CfxyR53r.js +0 -16
  299. package/dist/types/components/Individual/mapping/mapLocalization.d.ts +0 -3
  300. package/dist/types/components/ui/atoms/OutlinedIcon/OutlinedIcon.d.ts +0 -5
  301. package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -2
  302. package/dist/types/components/ui/molecules/FormEndState/types.d.ts +0 -8
@@ -2,24 +2,26 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "568f38d4-4370-4d6b-8541-c1ba74d377db", e._sentryDebugIdIdentifier = "sentry-dbid-568f38d4-4370-4d6b-8541-c1ba74d377db");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0a034c62-00d2-481b-99a5-b68b32ad7323", e._sentryDebugIdIdentifier = "sentry-dbid-0a034c62-00d2-481b-99a5-b68b32ad7323");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { useMemo, useState, useEffect, useCallback } from "preact/hooks";
12
- import { a as useApiContext, bp as useMutation, t as httpPost, bX as matchesRegex, bY as trimValWithOneSpace, bZ as NO_ALPHABET_REGEX, b_ as EMOJI_REGEX, b$ as hasRepeatedCharacters, c0 as isInvalidName, c1 as INDIVIDUAL_VALID_CHAR_REGEX, c2 as getFormattingRegEx, c3 as SPECIAL_CHARS, c4 as standardKatakanaValidator, c5 as standardKanjiValidator, av as resolveFieldMetadata, as as CountryCodes, c6 as getSSNType, at as isEmpty, c7 as defaultFieldMetadata, c8 as defaultFieldConfig, c9 as defaultFieldMetadata$1, ca as fieldConfig, $ as TaskTypes, cb as taxInformationDefaultFieldMetadata, O as LegalEntityTypes, cc as taxInformationDefaultFieldConfig, cd as getAgeToday, ce as euCountries, cf as getIdDocument, cg as getDocument, ch as mapExistingFile, ci as getPageName, cj as getLocalizedIdDocumentTypeOptions, ck as getPage, cl as createDocumentRequest, bA as formatObject, cm as individualApiKeyMapping, b7 as individualComponentsKeyMapping, bz as reverseMapping, cn as getNomineeFromAssociation, co as drop, a0 as createLogger, X as useAccountHolder, u as useI18nContext, a3 as useAnalyticsContext, a9 as useToastContext, aa as useExperimentsContext, v as useSettingsContext, cp as documentApiUtils, cq as useProviderStatus, g as getLegalEntityCountry, bP as getAssociatedLeAnalyticsPayload, cr as addressValidators, cs as getAsyncIdNumberValidationRule, ct as getAsyncPhoneValidationRules, cu as addressFormatters, cv as useScenarios, cw as setHasMotionCaptureScenario, cx as useScenarioConfiguration, cy as getPropsFromConfigurations, cz as individualForms, cA as showIndividualMotionCapture, bQ as getRequiredForms, bR as addValidityToForms, cB as getAllowedDecisionMakerRoles, ba as datasetUtilities, bS as useFormComposer, bT as trackNavigation, cC as Individual, cD as composePerScenarioFormConfigurations, cE as omitObscuredFieldsIfUnchanged, cF as filterOutUnwantedAssociationsIfRootLE, bU as isValidationError, bV as processValidationErrors, bW as isMaintenanceModeError, bk as cloneObject, cG as mapAddressLabels, cH as individualDocumentForms, cI as individualDocumentMapping, cJ as individualObscuredFields, cK as mergeAttachments, cL as getFileExtention, ao as getOwnEntityAssociations, cM as hasNomineesChanged, cN as attachNomineeToRole, cO as idVerificationProviderId, cP as doArraysMatch, N as Typography, G as Button, aD as Field, cQ as DecisionMakerTypes, cR as createFormRules, cS as getAvailableDecisionMakerRoleTypes, cT as allowedCountriesForNominee, bL as getAddressSchemaForCountry, bM as COUNTRIES_WITH_STATES_DATASET, cU as Scenarios, cV as isLowRiskCountry, bu as Select, cW as isTruthyValidator, cX as licenseCardNumberDefaultMetadata, cY as licenseCardNumberDefaultConfig, au as mergeFieldMetadataIntoProps, c as useTranslation, aC as createFormUtils, bK as useFormContext, az as getFieldProps, cZ as idNumberFields, c_ as IdentityNumber, c$ as additionallIdNumberOptions, d0 as MaskedInput, bJ as InputDate, d1 as formatDateObj, d2 as DriversLicense, d3 as addressFields, b as useAllowedCountries, w as SettingNames, F as FormHeader, aB as ErrorPanel, aJ as CountryField, bN as Address, bO as getAddressSchemaLabelsByCountry, bD as Link, bi as Confirm, d4 as getAgeRangeForLegalRepresentative, d5 as IndividualIdNumberTypeSelector, d6 as TaxInformationField, bE as InputText, d7 as PatriotActDisclosure, d8 as isLegalRepresentativeNeeded, aA as nameFields, d9 as decisionMakerRoleFields, da as nomineeFields, db as contactDetailFields, K as Alert, aZ as ContextGuidance, b4 as TrustedFieldsProviders, dc as DecisionMakerRole, dd as NomineeDecisionMakerRole, de as LocalizedNameFields, df as ContactDetails, dg as keysOf, b3 as objectsDeepEqual, dh as isEmpty$1, di as RadioWithLabel, dj as listToRecord, bc as Modal, dk as pick, dl as IdVerification, bh as Spacer, a2 as IconButton, e as useDataset, f as datasetIdentifier, L as Loader, H as Svg, dm as isPersonUnderAge, dn as IdDocumentManualUpload, M as translateStringOrObject, aX as Trans, dp as idDocumentUploadFields, dq as useFormRouterContext, dr as getFormProps, ds as useCapabilities, dt as hasMotionCaptureScenario, du as setShowIndividualMotionCapture, dv as shouldShowMotionCapture, dw as MemoizedProofOfRelationship, dx as MemoizedDocumentUpload, dy as MemoizedProofOfResidencyUpload, dz as individualOnfidoApiKeyMapping, dA as individualOnfidoBaseMapping, br as useQueryClient, dB as individualOnfidoDocumentMapping, dC as individualOnfidoObscuredFields } from "./StoreProvider-DhQ4sdLg.js";
13
- import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-LE_Kt3am.js";
14
- import { c as contactDetailsValidationRules, u as useValidatePhoneNumberImperatively } from "./validate-D66zPhDG.js";
15
- import { F as FormContextProvider, a as FormFlow } from "./FormFlow-CNxGh4Yu.js";
16
- import { u as useSingpassMyInfoLogin, L as LandingLayout } from "./LandingLayout-DyY0Exht.js";
17
- import { u as useMultiForm } from "./useMultiForm-ChxUZ4e7.js";
18
- import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-BS9W6RQp.js";
19
- import { l as localizeDateString } from "./localizeDateString-C34eXZqY.js";
20
- import { r as rules, D as DECISION_MAKER_TYPES_WITH_JOBTITLE$1 } from "./rules-OP83mdq4.js";
11
+ import { useMemo, useState, useEffect, useCallback, useRef } from "preact/hooks";
12
+ import { a as useApiContext, bn as useMutation, t as httpPost, bY as matchesRegex, bZ as trimValWithOneSpace, b_ as NO_ALPHABET_REGEX, b$ as EMOJI_REGEX, c0 as hasRepeatedCharacters, c1 as isInvalidName, c2 as INDIVIDUAL_VALID_CHAR_REGEX, c3 as getFormattingRegEx, c4 as SPECIAL_CHARS, c5 as standardKatakanaValidator, c6 as standardKanjiValidator, av as resolveFieldMetadata, as as CountryCodes, c7 as getSSNType, at as isEmpty, c8 as defaultFieldMetadata, c9 as defaultFieldConfig, ca as defaultFieldMetadata$1, cb as fieldConfig, $ as TaskTypes, cc as taxInformationDefaultFieldMetadata, O as LegalEntityTypes, cd as taxInformationDefaultFieldConfig, ce as getAgeToday, cf as euCountries, cg as getIdDocument, ch as getDocument, ci as mapExistingFile, cj as getPageName, ck as getLocalizedIdDocumentTypeOptions, cl as getPage, cm as createDocumentRequest, bB as formatObject, cn as individualApiKeyMapping, co as isEmpty$1, b9 as individualComponentsKeyMapping, bA as reverseMapping, cp as getNomineeFromAssociation, cq as drop, a0 as createLogger, X as useAccountHolder, u as useI18nContext, a3 as useAnalyticsContext, a9 as useToastContext, aa as useExperimentsContext, v as useSettingsContext, cr as documentApiUtils, cs as useProviderStatus, g as getLegalEntityCountry, bQ as getAssociatedLeAnalyticsPayload, ct as addressValidators, cu as getAsyncIdNumberValidationRule, cv as getAsyncPhoneValidationRules, cw as addressFormatters, cx as useScenarios, cy as setHasMotionCaptureScenario, cz as useScenarioConfiguration, cA as getPropsFromConfigurations, cB as individualForms, cC as showIndividualMotionCapture, bR as getRequiredForms, bS as addValidityToForms, cD as getAllowedDecisionMakerRoles, bc as datasetUtilities, bT as useFormComposer, bU as trackNavigation, cE as Individual, cF as composePerScenarioFormConfigurations, cG as omitObscuredFieldsIfUnchanged, cH as filterOutUnwantedAssociationsIfRootLE, bV as isValidationError, bW as processValidationErrors, bX as isMaintenanceModeError, bi as cloneObject, cI as mapAddressLabels, cJ as individualDocumentForms, cK as individualDocumentMapping, cL as individualObscuredFields, cM as mergeAttachments, cN as getFileExtention, ao as getOwnEntityAssociations, cO as hasNomineesChanged, cP as attachNomineeToRole, cQ as idVerificationProviderId, cR as doArraysMatch, N as Typography, G as Button, aD as Field, r as useQuery, B as skipToken, x as httpGet, c as useTranslation, bp as useQueryClient, cS as IFrameWidget, be as Modal, K as Alert, cT as getIndividualLegalEntityName, H as Svg, L as Loader, bg as Confirm, b5 as DecisionMakerTypes, cU as createFormRules, cV as getAvailableDecisionMakerRoleTypes, cW as allowedCountriesForNominee, bM as getAddressSchemaForCountry, bN as COUNTRIES_WITH_STATES_DATASET, b6 as Scenarios, cX as isLowRiskCountry, bs as Select, cY as isTruthyValidator, cZ as licenseCardNumberDefaultMetadata, c_ as licenseCardNumberDefaultConfig, au as mergeFieldMetadataIntoProps, aC as createFormUtils, bL as useFormContext, az as getFieldProps, c$ as idNumberFields, d0 as IdentityNumber, d1 as additionallIdNumberOptions, d2 as MaskedInput, bK as InputDate, d3 as formatDateObj, d4 as DriversLicense, d5 as addressFields, b as useAllowedCountries, w as SettingNames, d6 as isDecisionMakerTask, F as FormHeader, aB as ErrorPanel, aJ as CountryField, bO as Address, bP as getAddressSchemaLabelsByCountry, bE as Link, d7 as getAgeRangeForLegalRepresentative, d8 as IndividualIdNumberTypeSelector, d9 as TaxInformationField, bF as InputText, da as PatriotActDisclosure, db as isLegalRepresentativeNeeded, aA as nameFields, dc as decisionMakerRoleFields, dd as nomineeFields, de as contactDetailFields, aZ as ContextGuidance, b4 as TrustedFieldsProviders, df as DecisionMakerRole, dg as NomineeDecisionMakerRole, dh as LocalizedNameFields, di as ContactDetails, dj as keysOf, b3 as objectsDeepEqual, dk as RadioWithLabel, dl as listToRecord, dm as pick, dn as IdVerification, by as Spacer, a2 as IconButton, e as useDataset, f as datasetIdentifier, dp as IdDocumentManualUpload, M as translateStringOrObject, aX as Trans, dq as idDocumentUploadFields, dr as useFormRouterContext, ds as getFormProps, dt as useCapabilities, du as hasMotionCaptureScenario, dv as setShowIndividualMotionCapture, dw as shouldShowMotionCapture, dx as MemoizedProofOfRelationship, dy as MemoizedDocumentUpload, dz as MemoizedProofOfResidencyUpload, dA as individualOnfidoApiKeyMapping, dB as individualOnfidoBaseMapping, dC as individualOnfidoDocumentMapping, dD as individualOnfidoObscuredFields } from "./StoreProvider-Fbl3I9L7.js";
13
+ import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-CcUHqJyo.js";
14
+ import { c as contactDetailsValidationRules, u as useValidatePhoneNumberImperatively } from "./validate-gCfuQFAB.js";
15
+ import { F as FormContextProvider, a as FormFlow } from "./FormFlow-gcCKgNQt.js";
16
+ import { u as useSingpassMyInfoLogin, i as idNowModalChildEntityId, L as LandingLayout, s as showIdNowModal } from "./isIdNowModalOpen-C3cyeMaK.js";
17
+ import { u as useMultiForm } from "./useMultiForm-BOVByA_E.js";
18
+ import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-BjmOzrhP.js";
19
+ import { l as localizeDateString } from "./localizeDateString-aA76e6GH.js";
20
+ import { r as rules, D as DECISION_MAKER_TYPES_WITH_JOBTITLE$1 } from "./rules-DMMZWi5Q.js";
21
+ import { m as mapSchemaFieldsToApiScriptLocalization, a as mapApiScriptLocalizationToSchemaFields } from "./mapScriptLocalization-H2Re3k5X.js";
21
22
  import { signal, computed } from "@preact/signals";
22
- import { T as TileGroup } from "./TileGroup-BkLtnLiA.js";
23
+ import { Show } from "@preact/signals/utils";
24
+ import { T as TileGroup } from "./TileGroup-B7_1rrEe.js";
23
25
  const verifyIdNumber = async (legalEntityId, baseUrl, data) => {
24
26
  return await httpPost(
25
27
  {
@@ -348,28 +350,6 @@ const adjustIdentificationData = (data, apiData) => {
348
350
  };
349
351
  }
350
352
  };
351
- const mapNameLocalization = (data) => {
352
- const localization = [];
353
- if (data.jaHaniFirstName || data.jaHaniLastName) {
354
- localization.push({
355
- script: "ja-Hani",
356
- fields: {
357
- firstName: data.jaHaniFirstName,
358
- lastName: data.jaHaniLastName
359
- }
360
- });
361
- }
362
- if (data.jaKanaFirstName || data.jaKanaLastName) {
363
- localization.push({
364
- script: "ja-Kana",
365
- fields: {
366
- firstName: data.jaKanaFirstName,
367
- lastName: data.jaKanaLastName
368
- }
369
- });
370
- }
371
- return localization;
372
- };
373
353
  const mapIndividualToLegalEntity = (data) => {
374
354
  const requestObj = {
375
355
  ...formatObject(data, individualApiKeyMapping)
@@ -381,7 +361,10 @@ const mapIndividualToLegalEntity = (data) => {
381
361
  personalDetails,
382
362
  requestObj.individual.identificationData
383
363
  );
384
- const localization = mapNameLocalization(personalDetails);
364
+ const localization = [
365
+ mapSchemaFieldsToApiScriptLocalization(personalDetails, "jaHani"),
366
+ mapSchemaFieldsToApiScriptLocalization(personalDetails, "jaKana")
367
+ ].filter(({ fields }) => !isEmpty$1(fields));
385
368
  if (localization.length) {
386
369
  requestObj.individual.name.localization = localization;
387
370
  }
@@ -426,33 +409,12 @@ const mapLegalEntityToIndividual = (legalEntity, isChangingType, isRoleFieldNeed
426
409
  };
427
410
  }
428
411
  if (legalEntity?.individual?.residentialAddress.country === "JP" && legalEntity.individual?.name?.localization) {
429
- const configs = [
430
- {
431
- script: "ja-Hani",
432
- mappingFunction: (l) => ({
433
- jaHaniFirstName: l.fields?.firstName,
434
- jaHaniLastName: l.fields?.lastName
435
- })
436
- },
437
- {
438
- script: "ja-Kana",
439
- mappingFunction: (l) => ({
440
- jaKanaFirstName: l.fields?.firstName,
441
- jaKanaLastName: l.fields?.lastName
442
- })
443
- }
444
- ];
445
- configs.forEach((config) => {
446
- const localizationToMap = legalEntity.individual?.name.localization?.find(
447
- (l) => l.script === config.script
448
- );
449
- if (localizationToMap) {
450
- individualData.personalDetails = {
451
- ...individualData.personalDetails,
452
- ...config.mappingFunction(localizationToMap)
453
- };
454
- }
455
- });
412
+ for (const scriptLoc of legalEntity.individual.name.localization) {
413
+ individualData.personalDetails = {
414
+ ...individualData.personalDetails,
415
+ ...mapApiScriptLocalizationToSchemaFields(scriptLoc)
416
+ };
417
+ }
456
418
  }
457
419
  if (!parentLegalEntity?.entityAssociations) {
458
420
  return individualData;
@@ -800,7 +762,10 @@ function IndividualDropin({
800
762
  rules: individualFieldValidations,
801
763
  asyncRules: individualFieldAsyncValidations,
802
764
  optionalFields: derivedProps?.optionalFields,
803
- formatters
765
+ formatters,
766
+ obscuredFields: {
767
+ personalDetails: ["idNumber"]
768
+ }
804
769
  });
805
770
  const { data = dataFromResponse } = form;
806
771
  useEffect(() => {
@@ -1103,7 +1068,7 @@ function IndividualDropin({
1103
1068
  const formatIdDocument = (idDocument2) => {
1104
1069
  if (!idDocument2) return void 0;
1105
1070
  const documentType = idDocument2?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
1106
- (document) => idDocument2.instantIdVerificationData?.document_front.type === document.id
1071
+ (document2) => idDocument2.instantIdVerificationData?.document_front.type === document2.id
1107
1072
  ) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
1108
1073
  if (!documentType) return void 0;
1109
1074
  const frontPage = idDocument2.idFrontPage?.[0];
@@ -1363,7 +1328,7 @@ const basicDetailsValidators = ({
1363
1328
  });
1364
1329
  const guidanceQuestion = "adyen-kyc-guidance-question";
1365
1330
  const options = "adyen-kyc-options";
1366
- const styles$4 = {
1331
+ const styles$5 = {
1367
1332
  guidanceQuestion,
1368
1333
  options
1369
1334
  };
@@ -1396,10 +1361,10 @@ const GuidanceQuestion = (props) => {
1396
1361
  };
1397
1362
  const yesTileLabel = yesLabel ?? i18n.get("yes");
1398
1363
  const noTileLabel = noLabel ?? i18n.get("no");
1399
- return /* @__PURE__ */ jsxs("div", { className: styles$4.guidanceQuestion, children: [
1364
+ return /* @__PURE__ */ jsxs("div", { className: styles$5.guidanceQuestion, children: [
1400
1365
  /* @__PURE__ */ jsx(Typography, { variant: "body", el: "p", children: question }),
1401
1366
  descriptionLinkText && onDescriptionLinkClick && /* @__PURE__ */ jsx(Button, { variant: "link", onClick: onDescriptionLinkClick, children: descriptionLinkText }),
1402
- /* @__PURE__ */ jsx(Field, { name, className: styles$4.options, children: () => /* @__PURE__ */ jsx(
1367
+ /* @__PURE__ */ jsx(Field, { name, className: styles$5.options, children: () => /* @__PURE__ */ jsx(
1403
1368
  TileGroup,
1404
1369
  {
1405
1370
  allowMultiple: false,
@@ -1417,6 +1382,241 @@ const GuidanceQuestion = (props) => {
1417
1382
  ) })
1418
1383
  ] });
1419
1384
  };
1385
+ const getIdNowProviderIdentificationStatus = async (rootLegalEntityId, baseUrl, legalEntityId) => {
1386
+ return httpGet({
1387
+ baseUrl,
1388
+ path: `legalEntities/${rootLegalEntityId}/child/${legalEntityId}/provider/idnow/identification/status`,
1389
+ errorHandler: async (response) => {
1390
+ const responseData = await response;
1391
+ if (responseData.status === 404) {
1392
+ return { status: 404, message: responseData.detail, errorCode: responseData.errorCode };
1393
+ }
1394
+ }
1395
+ });
1396
+ };
1397
+ const useIdNowIdentificationStatus = (legalEntityId, options2) => {
1398
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1399
+ return useQuery({
1400
+ queryKey: legalEntityId === skipToken ? [] : ["idNowProviderIdentificationStatus", legalEntityId],
1401
+ queryFn: legalEntityId === skipToken ? skipToken : () => getIdNowProviderIdentificationStatus(
1402
+ rootLegalEntityId.value,
1403
+ baseUrl.value,
1404
+ legalEntityId
1405
+ ),
1406
+ ...options2
1407
+ });
1408
+ };
1409
+ const idNowProviderStartIdentification = async (rootLegalEntityId, baseUrl, legalEntityId) => {
1410
+ return httpPost({
1411
+ baseUrl,
1412
+ path: `legalEntities/${rootLegalEntityId}/child/${legalEntityId}/provider/idnow/identification/start`
1413
+ });
1414
+ };
1415
+ const useIdNowStartIdentification = (legalEntityId, options2) => {
1416
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1417
+ return useQuery({
1418
+ queryKey: legalEntityId === skipToken ? [] : ["idNowProviderStartIdentification", legalEntityId],
1419
+ queryFn: legalEntityId === skipToken ? skipToken : () => idNowProviderStartIdentification(rootLegalEntityId.value, baseUrl.value, legalEntityId),
1420
+ ...options2
1421
+ });
1422
+ };
1423
+ const idnowHeader = "adyen-kyc-idnow-header";
1424
+ const idnowVerificationHeaderIframeContainer = "adyen-kyc-idnow-verification-header-iframe-container";
1425
+ const idnowVerificationHeaderIframe = "adyen-kyc-idnow-verification-header-iframe";
1426
+ const idnowVerificationHeaderImage = "adyen-kyc-idnow-verification-header-image";
1427
+ const styles$4 = {
1428
+ idnowHeader,
1429
+ idnowVerificationHeaderIframeContainer,
1430
+ idnowVerificationHeaderIframe,
1431
+ idnowVerificationHeaderImage
1432
+ };
1433
+ const IdNowVerificationModal = ({ handleFinish }) => {
1434
+ const { t } = useTranslation(["individual", "common"]);
1435
+ const [isConfirmPresented, setIsConfirmPresented] = useState(false);
1436
+ const [genericError, setGenericError] = useState(false);
1437
+ const widgetContainerRef = useRef(null);
1438
+ const iFrameRef = useRef(null);
1439
+ const iFrameWidgetRef = useRef(null);
1440
+ const [page, setPage] = useState(1);
1441
+ const queryClient = useQueryClient();
1442
+ const { showToast } = useToastContext();
1443
+ const {
1444
+ data: idNowStatus,
1445
+ isLoading: isStatusLoading,
1446
+ refetch: refetchIdNowIdentificationStatus
1447
+ } = useIdNowIdentificationStatus(idNowModalChildEntityId.value?.id ?? skipToken, {
1448
+ enabled: !!idNowModalChildEntityId.value?.id,
1449
+ refetchOnMount: "always",
1450
+ refetchInterval: (query) => query.state.data?.status === "pending" ? 1e3 : false,
1451
+ retry: (failureCount, error) => {
1452
+ if ("status" in error && error.status === 404) return false;
1453
+ return failureCount < 3;
1454
+ }
1455
+ });
1456
+ const {
1457
+ data: idNowStart,
1458
+ isLoading,
1459
+ isError: idNowStartError,
1460
+ refetch: refetchIdNowStartIdentification
1461
+ } = useIdNowStartIdentification(idNowModalChildEntityId.value?.id ?? skipToken, {
1462
+ enabled: !!idNowModalChildEntityId.value?.id && page === 2
1463
+ });
1464
+ const handleDismiss = () => {
1465
+ setIsConfirmPresented(true);
1466
+ };
1467
+ const handleCancelDismiss = () => {
1468
+ setIsConfirmPresented(false);
1469
+ };
1470
+ const handleConfirmDismiss = () => {
1471
+ setPage(1);
1472
+ setGenericError(false);
1473
+ setIsConfirmPresented(false);
1474
+ showIdNowModal.value = false;
1475
+ if (idNowStartError && idNowModalChildEntityId.value?.id) {
1476
+ queryClient.resetQueries({
1477
+ queryKey: ["idNowProviderStartIdentification", idNowModalChildEntityId.value?.id]
1478
+ });
1479
+ }
1480
+ idNowModalChildEntityId.value = void 0;
1481
+ iFrameWidgetRef.current?.unmount();
1482
+ iFrameRef.current?.remove();
1483
+ handleFinish?.();
1484
+ };
1485
+ if (idNowStatus?.status === "finished") {
1486
+ if (idNowStatus?.providerStatus === "SUCCESS" || idNowStatus?.providerStatus === "SUCCESS_DATA_CHANGED") {
1487
+ showToast({
1488
+ label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
1489
+ variant: "success"
1490
+ });
1491
+ handleConfirmDismiss();
1492
+ }
1493
+ }
1494
+ if (!isLoading && idNowStartError) {
1495
+ setGenericError(true);
1496
+ setPage(1);
1497
+ }
1498
+ const initializeIdNowWidget = useCallback(async (url) => {
1499
+ const container = widgetContainerRef.current;
1500
+ if (!container) {
1501
+ return;
1502
+ }
1503
+ const iFrame = document.createElement("iframe");
1504
+ iFrameRef.current = iFrame;
1505
+ iFrame.setAttribute("allowFullscreen", "true");
1506
+ iFrame.classList.add(styles$4.idnowVerificationHeaderIframe);
1507
+ iFrame.setAttribute("height", "800");
1508
+ iFrame.setAttribute(
1509
+ "allow",
1510
+ "camera *;microphone *;geolocation *;clipboard-read *;clipboard-write *"
1511
+ );
1512
+ container.appendChild(iFrame);
1513
+ try {
1514
+ iFrameWidgetRef.current = new IFrameWidget(iFrame, url, "idnow", "");
1515
+ await iFrameWidgetRef.current.mountAndWaitForResponse();
1516
+ } catch (err) {
1517
+ console.error("Error occurred:", err);
1518
+ setGenericError(true);
1519
+ setPage(1);
1520
+ }
1521
+ }, []);
1522
+ useEffect(() => {
1523
+ if (page === 2 && !isLoading && idNowStart && idNowStart?.url) {
1524
+ (async () => {
1525
+ await refetchIdNowIdentificationStatus();
1526
+ await initializeIdNowWidget(idNowStart.url);
1527
+ })();
1528
+ }
1529
+ return () => {
1530
+ iFrameWidgetRef.current?.unmount();
1531
+ iFrameRef.current?.remove();
1532
+ };
1533
+ }, [isLoading, page, initializeIdNowWidget, refetchIdNowIdentificationStatus, idNowStart]);
1534
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1535
+ !isStatusLoading && /* @__PURE__ */ jsxs(
1536
+ Modal,
1537
+ {
1538
+ size: "medium",
1539
+ showCloseButton: !isLoading && !isStatusLoading,
1540
+ onClose: handleDismiss,
1541
+ ariaLabel: t(($) => $["identityVerification"], { ns: "common" }),
1542
+ children: [
1543
+ page === 1 && /* @__PURE__ */ jsx("div", { className: styles$4.idnowHeader, children: /* @__PURE__ */ jsx(
1544
+ LandingLayout,
1545
+ {
1546
+ media: /* @__PURE__ */ jsx(
1547
+ Svg,
1548
+ {
1549
+ type: "image",
1550
+ className: styles$4.idnowVerificationHeaderImage,
1551
+ name: "passport-front-green"
1552
+ }
1553
+ ),
1554
+ title: t(($) => $["identityVerification"], { ns: "common" }),
1555
+ description: /* @__PURE__ */ jsxs(Fragment, { children: [
1556
+ t(($) => $["idNowDescription"], { ns: "individual" }),
1557
+ /* @__PURE__ */ jsx("br", {}),
1558
+ /* @__PURE__ */ jsx("br", {}),
1559
+ getIndividualLegalEntityName(idNowModalChildEntityId.value) && t(($) => $["idNowDescriptionName"], {
1560
+ ns: "individual",
1561
+ name: getIndividualLegalEntityName(idNowModalChildEntityId.value)
1562
+ })
1563
+ ] }),
1564
+ error: !isLoading && genericError ? /* @__PURE__ */ jsx(
1565
+ Alert,
1566
+ {
1567
+ variant: "error",
1568
+ title: t(($) => $["thereWasAnErrorTryAgain"], { ns: "common" })
1569
+ }
1570
+ ) : void 0,
1571
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
1572
+ /* @__PURE__ */ jsx(
1573
+ Button,
1574
+ {
1575
+ onClick: async () => {
1576
+ setGenericError(false);
1577
+ setPage(2);
1578
+ await refetchIdNowStartIdentification();
1579
+ },
1580
+ disabled: isLoading || isStatusLoading || idNowStatus?.status === "finished",
1581
+ fullWidth: true,
1582
+ children: idNowStatus?.status === "pending" ? t(($) => $["continueVerification"], { ns: "common" }) : t(($) => $["startVerification"], { ns: "common" })
1583
+ }
1584
+ ),
1585
+ /* @__PURE__ */ jsx(
1586
+ Button,
1587
+ {
1588
+ disabled: isLoading || isStatusLoading || idNowStatus?.status === "finished",
1589
+ variant: "tertiary",
1590
+ onClick: handleConfirmDismiss,
1591
+ fullWidth: true,
1592
+ children: t(($) => $["finishLater"], { ns: "common" })
1593
+ }
1594
+ )
1595
+ ] })
1596
+ }
1597
+ ) }),
1598
+ page === 2 && (isLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
1599
+ "div",
1600
+ {
1601
+ ref: widgetContainerRef,
1602
+ className: styles$4.idnowVerificationHeaderIframeContainer
1603
+ }
1604
+ ))
1605
+ ]
1606
+ }
1607
+ ),
1608
+ isConfirmPresented && /* @__PURE__ */ jsx(
1609
+ Confirm,
1610
+ {
1611
+ confirmText: t(($) => $["leave"], { ns: "common" }),
1612
+ description: t(($) => $["unsavedChangesDescription"], { ns: "common" }),
1613
+ onCancel: handleCancelDismiss,
1614
+ onConfirm: handleConfirmDismiss,
1615
+ title: t(($) => $["unsavedChanges"], { ns: "common" })
1616
+ }
1617
+ )
1618
+ ] });
1619
+ };
1420
1620
  const areArraysDifferent = (a = [], b = []) => {
1421
1621
  if (a.length !== b.length) {
1422
1622
  return true;
@@ -1485,6 +1685,7 @@ const DECISION_MAKER_TYPES_WITH_JOBTITLE = [
1485
1685
  DecisionMakerTypes.CONTROLLING_PERSON
1486
1686
  ];
1487
1687
  const ID_MISSING_DATA_ERROR_CODE = "2_8071";
1688
+ const REMEDIATION_ACTION_UPLOAD_ID = "1_301";
1488
1689
  const individualOnfidoRules = ({
1489
1690
  matchingScenario,
1490
1691
  data,
@@ -1691,7 +1892,8 @@ const individualOnfidoRules = ({
1691
1892
  );
1692
1893
  const isManualFlow = data?.idVerificationMethod?.idVerificationMethod === "manualVerification";
1693
1894
  const idNumberExempt = data?.additionalPersonalDetails?.idNumberExempt;
1694
- return isManualFlow && (idNumberExempt || hasMissingId) ? "REQUIRED" : void 0;
1895
+ const hasIdRemediationAction = problems?.remediationActions?.[REMEDIATION_ACTION_UPLOAD_ID];
1896
+ return isManualFlow && (idNumberExempt || hasMissingId || hasIdRemediationAction) ? "REQUIRED" : void 0;
1695
1897
  },
1696
1898
  isManualIdFlowAndHasMissingData: () => {
1697
1899
  const hasMissingId = problems?.missingData?.some(
@@ -1755,7 +1957,7 @@ const TypeOfIdentity = ({
1755
1957
  id,
1756
1958
  name: i18n.get(name)
1757
1959
  })),
1758
- placeholder: i18n.get("id"),
1960
+ placeholder: i18n.get("selectOne"),
1759
1961
  selected: selectedIdentityType,
1760
1962
  onChange: (event) => setSelectedIdentityType(event.target.value)
1761
1963
  }
@@ -1845,7 +2047,6 @@ function Identity(props) {
1845
2047
  );
1846
2048
  }, [country, data?.typeOfIdentity, initialFormUtilProps, licenseCardNumberMetaData]);
1847
2049
  const { t } = useTranslation();
1848
- const { i18n } = useI18nContext();
1849
2050
  const formUtils = useMemo(() => createFormUtils(mergedProps, t), [mergedProps, t]);
1850
2051
  const { form } = useFormContext();
1851
2052
  const defaultIdNumber = form?.defaultData?.additionalPersonalDetails?.idNumber;
@@ -1922,7 +2123,7 @@ function Identity(props) {
1922
2123
  ...childProps,
1923
2124
  name: "expiryDate",
1924
2125
  value: data?.expiryDate,
1925
- placeholder: i18n.get("datePlaceholder"),
2126
+ placeholder: t(($) => $["datePlaceholder"]),
1926
2127
  readonly: formUtils.isReadOnly("expiryDate"),
1927
2128
  onInput: handleFieldChange("expiryDate", "input"),
1928
2129
  onBlur: handleFieldChange("expiryDate", "blur"),
@@ -2011,8 +2212,7 @@ const additionalPersonalDetailsFields = [
2011
2212
  "taxInformation"
2012
2213
  ];
2013
2214
  function AdditionalPersonalDetails(props) {
2014
- const { t } = useTranslation();
2015
- const { i18n } = useI18nContext();
2215
+ const { t } = useTranslation(["common", "individual"]);
2016
2216
  const allowedCountries = useAllowedCountries();
2017
2217
  const [showLegalRepresentativePrompt, setShowLegalRepresentativePrompt] = useState(false);
2018
2218
  const { isSettingEnabled } = useSettingsContext();
@@ -2066,6 +2266,7 @@ function AdditionalPersonalDetails(props) {
2066
2266
  }
2067
2267
  };
2068
2268
  const isRootIndividual = taskType === TaskTypes.INDIVIDUAL;
2269
+ const canEditCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit) || isDecisionMakerTask(taskType);
2069
2270
  return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__personal-details", "aria-describedby": "ariaErrorField", children: [
2070
2271
  /* @__PURE__ */ jsx(FormHeader, { heading }),
2071
2272
  /* @__PURE__ */ jsx(
@@ -2078,8 +2279,8 @@ function AdditionalPersonalDetails(props) {
2078
2279
  }
2079
2280
  ),
2080
2281
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
2081
- /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("residentialAddress") }),
2082
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("residentialAddressDescription") })
2282
+ /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["residentialAddress"]) }),
2283
+ /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thisPersonsPrimaryAddress"], { ns: "individual" }) })
2083
2284
  ] }),
2084
2285
  formUtils.isRequiredField("country") && /* @__PURE__ */ jsx(
2085
2286
  CountryField,
@@ -2090,7 +2291,7 @@ function AdditionalPersonalDetails(props) {
2090
2291
  country: formUtils.getErrorMessage("country", errors, fieldValidationErrors)
2091
2292
  },
2092
2293
  labels: { country: formUtils.getLabel("country") },
2093
- readonly: formUtils.isReadOnly("country"),
2294
+ readonly: formUtils.isReadOnly("country") || !canEditCountry,
2094
2295
  allowedCountries: isRootIndividual ? allowedCountries : void 0,
2095
2296
  handleChangeFor: handleFieldChange
2096
2297
  }
@@ -2111,11 +2312,11 @@ function AdditionalPersonalDetails(props) {
2111
2312
  }
2112
2313
  ),
2113
2314
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
2114
- /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("personalIdentityDetails") }),
2315
+ /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["personalIdentityDetails"], { ns: "individual" }) }),
2115
2316
  /* @__PURE__ */ jsxs(Typography, { el: "p", variant: "body", children: [
2116
- i18n.get("personalIdentityDetailsDescription"),
2317
+ t(($) => $["weOnlyUseTheseDetailsForIdentityVerification"], { ns: "individual" }),
2117
2318
  " ",
2118
- /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: i18n.get("personalIdentityDetailsDescriptionLink") })
2319
+ /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: t(($) => $["privacyStatement"]) })
2119
2320
  ] })
2120
2321
  ] }),
2121
2322
  formUtils.isRequiredField("birthDate") && /* @__PURE__ */ jsx(
@@ -2131,7 +2332,7 @@ function AdditionalPersonalDetails(props) {
2131
2332
  ...childProps,
2132
2333
  name: "birthDate",
2133
2334
  value: data?.birthDate,
2134
- placeholder: i18n.get("datePlaceholder"),
2335
+ placeholder: t(($) => $["datePlaceholder"]),
2135
2336
  readonly: formUtils.isReadOnly("birthDate"),
2136
2337
  onInput: handleFieldChange("birthDate", "input"),
2137
2338
  onBlur: handleBirthDateChange,
@@ -2145,15 +2346,16 @@ function AdditionalPersonalDetails(props) {
2145
2346
  showLegalRepresentativePrompt && /* @__PURE__ */ jsx(
2146
2347
  Confirm,
2147
2348
  {
2148
- title: i18n.get("legalRepresentativeForMinorIsRequired"),
2149
- description: i18n.get("becauseThisPersonIsUnderXYearsOld", {
2150
- values: { age: getAgeRangeForLegalRepresentative(country)?.max?.toString() ?? "" }
2349
+ title: t(($) => $["legalRepresentativeForMinorIsRequired"], { ns: "individual" }),
2350
+ description: t(($) => $["becauseThisPersonIsUnderXYearsOld"], {
2351
+ ns: "individual",
2352
+ age: getAgeRangeForLegalRepresentative(country)?.max?.toString() ?? ""
2151
2353
  }),
2152
2354
  onCancel: () => {
2153
2355
  setShowLegalRepresentativePrompt(false);
2154
2356
  },
2155
- confirmText: i18n.get("ok"),
2156
- cancelText: i18n.get("editDetails"),
2357
+ confirmText: t(($) => $["ok"]),
2358
+ cancelText: t(($) => $["editDetails"]),
2157
2359
  onConfirm: () => {
2158
2360
  setShowLegalRepresentativePrompt(false);
2159
2361
  }
@@ -2277,7 +2479,6 @@ function BasicDetails(props) {
2277
2479
  errors,
2278
2480
  handleFieldChange
2279
2481
  } = props;
2280
- const isDecisionMakerTask = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER;
2281
2482
  const isLegalRepresentativeDetailsTask = taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS;
2282
2483
  const formUtils = createFormUtils(props, t);
2283
2484
  const decisionMakerRoleProps = getFieldProps(props, decisionMakerRoleFields);
@@ -2326,10 +2527,10 @@ function BasicDetails(props) {
2326
2527
  contentId: "reasonForFillingIndividualPersonalDetails"
2327
2528
  }
2328
2529
  ),
2329
- isDecisionMakerTask && trustedFieldsProvider === TrustedFieldsProviders.SINGPASS && readOnlyFields && /* @__PURE__ */ jsx(Typography, { color: "secondary", variant: "caption", children: i18n.get(
2530
+ isDecisionMakerTask(taskType) && trustedFieldsProvider === TrustedFieldsProviders.SINGPASS && readOnlyFields && /* @__PURE__ */ jsx(Typography, { color: "secondary", variant: "caption", children: i18n.get(
2330
2531
  "weSelectedSomeRolesBasedOnMyinfoBusinessDataAboutYourCompanysAppointmentHoldersAndShareholders"
2331
2532
  ) }),
2332
- isDecisionMakerTask && (isGuidedDecisionMakersFlowDisabled || !isGuidedDecisionMakersFlowEnabled) && /* @__PURE__ */ jsxs(Fragment, { children: [
2533
+ isDecisionMakerTask(taskType) && (isGuidedDecisionMakersFlowDisabled || !isGuidedDecisionMakersFlowEnabled) && /* @__PURE__ */ jsxs(Fragment, { children: [
2333
2534
  /* @__PURE__ */ jsx(
2334
2535
  DecisionMakerRole,
2335
2536
  {
@@ -2714,10 +2915,8 @@ const DataConflictsModal = ({
2714
2915
  ] });
2715
2916
  };
2716
2917
  const verificationHeaderImage = "adyen-kyc-verification-header-image";
2717
- const verifyOnfidoError = "adyen-kyc-verify-onfido-error";
2718
2918
  const styles$1 = {
2719
- verificationHeaderImage,
2720
- verifyOnfidoError
2919
+ verificationHeaderImage
2721
2920
  };
2722
2921
  const toIndividualOnfidoConflictSchema = ({
2723
2922
  basicDetails,
@@ -2774,7 +2973,7 @@ const fromIndividualOnfidoConflictSchema = ({
2774
2973
  }
2775
2974
  });
2776
2975
  const logger$3 = createLogger();
2777
- const mapExtractionResultToSchema = (result) => {
2976
+ const mapExtractionResultToSchema = (result, restrictCountryOfResidenceTo) => {
2778
2977
  const {
2779
2978
  firstName,
2780
2979
  lastName,
@@ -2796,11 +2995,21 @@ const mapExtractionResultToSchema = (result) => {
2796
2995
  },
2797
2996
  additionalPersonalDetails: {}
2798
2997
  };
2998
+ let issuingCountryIsCountryOfResidency = false;
2999
+ if (issuingCountry) {
3000
+ const countryFromOcr = issuingCountry;
3001
+ if (!restrictCountryOfResidenceTo || restrictCountryOfResidenceTo.includes(countryFromOcr)) {
3002
+ schema.additionalPersonalDetails.country = countryFromOcr;
3003
+ issuingCountryIsCountryOfResidency = true;
3004
+ } else {
3005
+ schema.additionalPersonalDetails.nationality = countryFromOcr;
3006
+ issuingCountryIsCountryOfResidency = false;
3007
+ }
3008
+ }
2799
3009
  if (dateOfBirth) schema.additionalPersonalDetails.birthDate = dateOfBirth;
2800
- if (issuingCountry) schema.additionalPersonalDetails.country = issuingCountry;
2801
3010
  if (issuingState) schema.additionalPersonalDetails.issuerState = issuingState;
2802
3011
  if (nationality2) schema.additionalPersonalDetails.nationality = nationality2;
2803
- if (address && Object.keys(address).length > 0)
3012
+ if (address && issuingCountryIsCountryOfResidency && Object.keys(address).length > 0)
2804
3013
  schema.additionalPersonalDetails = {
2805
3014
  ...schema.additionalPersonalDetails,
2806
3015
  ...mapAddressToSchema(address)
@@ -2831,15 +3040,13 @@ const mapAddressToSchema = ({
2831
3040
  street2,
2832
3041
  city,
2833
3042
  postalCode,
2834
- stateOrProvince,
2835
- country
3043
+ stateOrProvince
2836
3044
  }) => ({
2837
3045
  address: street,
2838
3046
  otherAddressInformation: street2,
2839
3047
  city,
2840
3048
  postalCode,
2841
- stateOrProvince,
2842
- country
3049
+ stateOrProvince
2843
3050
  });
2844
3051
  const OnfidoVerificationModal = ({
2845
3052
  closeModal,
@@ -2863,14 +3070,14 @@ const uploadedDocument = "adyen-kyc-uploaded-document";
2863
3070
  const styles = {
2864
3071
  uploadedDocument
2865
3072
  };
2866
- const UploadedDocument = ({ document, onDelete, onUpdate }) => {
3073
+ const UploadedDocument = ({ document: document2, onDelete, onUpdate }) => {
2867
3074
  const { i18n } = useI18nContext();
2868
3075
  return /* @__PURE__ */ jsxs("article", { className: styles.uploadedDocument, children: [
2869
3076
  /* @__PURE__ */ jsxs("div", { children: [
2870
- /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "title", children: i18n.get(document.idDocumentType) }),
3077
+ /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "title", children: i18n.get(document2.idDocumentType) }),
2871
3078
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("uploadedOn", {
2872
3079
  values: {
2873
- date: localizeDateString(document.modificationDate, i18n.locale, {
3080
+ date: localizeDateString(document2.modificationDate, i18n.locale, {
2874
3081
  month: "short"
2875
3082
  }) ?? ""
2876
3083
  }
@@ -2889,6 +3096,24 @@ const UploadedDocument = ({ document, onDelete, onUpdate }) => {
2889
3096
  /* @__PURE__ */ jsx(Button, { onClick: onUpdate, variant: "secondary", children: i18n.get("update") })
2890
3097
  ] });
2891
3098
  };
3099
+ const validateExtractionResult = (extractionResult) => {
3100
+ const { isExpired, isValidDocumentType, isUnderage, minimumOnboardingAge } = extractionResult;
3101
+ if (isExpired) {
3102
+ return { key: "theDocumentYouUploadedIsExpired" };
3103
+ }
3104
+ if (!isValidDocumentType) {
3105
+ return { key: "theDocumentTypeYouUploadedIsNotSupported" };
3106
+ }
3107
+ if (isUnderage) {
3108
+ return {
3109
+ key: "weDontAcceptDocumentsOrInformationAboutAnyoneYoungerThan_",
3110
+ options: {
3111
+ values: { minimumOnboardingAge: minimumOnboardingAge?.toString() ?? "" }
3112
+ }
3113
+ };
3114
+ }
3115
+ return null;
3116
+ };
2892
3117
  const logger$2 = createLogger();
2893
3118
  const idVerificationMethodFields = [
2894
3119
  "idVerificationMethod",
@@ -2897,19 +3122,19 @@ const idVerificationMethodFields = [
2897
3122
  function IdVerificationMethod(props) {
2898
3123
  const {
2899
3124
  legalEntityId,
3125
+ taskType,
2900
3126
  handlers,
2901
3127
  formVerificationErrors,
2902
3128
  fieldValidationErrors,
2903
3129
  hasLiveSelfieErrorCode
2904
3130
  } = props;
2905
- const { t } = useTranslation();
2906
- const { i18n } = useI18nContext();
3131
+ const { t, i18n } = useTranslation(["individual", "common"]);
2907
3132
  const userEvents = useAnalyticsContext();
2908
3133
  const extractDocumentInformation2 = useExtractDocumentInformation();
2909
3134
  const {
2910
3135
  form: { data, handleChangeFor, setFormData }
2911
3136
  } = useFormContext();
2912
- const datasetUtils = datasetUtilities(i18n.locale);
3137
+ const datasetUtils = datasetUtilities(i18n.language);
2913
3138
  const existingDocument = data.idVerificationMethod?.idDocument;
2914
3139
  const hasExistingDocument = !isEmpty$1(existingDocument);
2915
3140
  const handleFieldChange = useCallback(
@@ -2924,9 +3149,21 @@ function IdVerificationMethod(props) {
2924
3149
  const [ocrExtractedData, setOcrExtractedData] = useState(
2925
3150
  void 0
2926
3151
  );
3152
+ const allowedCountries = useAllowedCountries();
3153
+ const { isSettingEnabled } = useSettingsContext();
3154
+ const canEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
3155
+ const restrictCountryOfResidenceTo = useMemo(() => {
3156
+ if (isDecisionMakerTask(taskType)) {
3157
+ return void 0;
3158
+ }
3159
+ if (!canEditPrefilledCountry) {
3160
+ return [data.additionalPersonalDetails.country];
3161
+ }
3162
+ return allowedCountries;
3163
+ }, [allowedCountries, canEditPrefilledCountry, data.additionalPersonalDetails, taskType]);
2927
3164
  const extractedData = useMemo(
2928
- () => ocrExtractedData ? mapExtractionResultToSchema(ocrExtractedData) : void 0,
2929
- [ocrExtractedData]
3165
+ () => ocrExtractedData ? mapExtractionResultToSchema(ocrExtractedData, restrictCountryOfResidenceTo) : void 0,
3166
+ [ocrExtractedData, restrictCountryOfResidenceTo]
2930
3167
  );
2931
3168
  const comparableExistingData = useMemo(() => toIndividualOnfidoConflictSchema(data), [data]);
2932
3169
  const comparableExtractedData = useMemo(
@@ -2946,24 +3183,6 @@ function IdVerificationMethod(props) {
2946
3183
  setOcrExtractedData(void 0);
2947
3184
  handlers.handleContinueToAdditionalDetails();
2948
3185
  };
2949
- const validateExtractionResult = (extractionResult) => {
2950
- const { isExpired, isValidDocumentType, dateOfBirth, issuingCountry } = extractionResult;
2951
- if (isExpired) {
2952
- return { key: "theDocumentYouUploadedIsExpired" };
2953
- }
2954
- if (isValidDocumentType === false) {
2955
- return { key: "theDocumentTypeYouUploadedIsNotSupported" };
2956
- }
2957
- if (isPersonUnderAge(dateOfBirth, issuingCountry)) {
2958
- return {
2959
- key: "weDontAcceptDocumentsOrInformationAboutAnyoneYoungerThan_",
2960
- options: {
2961
- values: { minimumOnboardingAge: extractionResult.minimumOnboardingAge?.toString() ?? "" }
2962
- }
2963
- };
2964
- }
2965
- return null;
2966
- };
2967
3186
  const { hasConflicts, conflictingProperties, resolvedData } = useDataConflicts(
2968
3187
  comparableExistingData,
2969
3188
  comparableExtractedData,
@@ -3097,7 +3316,7 @@ function IdVerificationMethod(props) {
3097
3316
  handlers.handleUpdateDocument();
3098
3317
  };
3099
3318
  const modalProvidedData = resolvedData || comparableExistingData;
3100
- const formUtils = createFormUtils(props, t);
3319
+ const formUtils = createFormUtils(props, i18n.t);
3101
3320
  isNextStepDisabled.value = showLoadingSpinner;
3102
3321
  return /* @__PURE__ */ jsxs(Fragment, { children: [
3103
3322
  /* @__PURE__ */ jsx(
@@ -3118,21 +3337,20 @@ function IdVerificationMethod(props) {
3118
3337
  type: "image",
3119
3338
  className: styles$1.verificationHeaderImage,
3120
3339
  name: "passport-front-green",
3121
- title: i18n.get("instantIDVerificationDescription")
3340
+ title: t(($) => $["instantIDVerificationDescription"], { ns: "common" })
3122
3341
  }
3123
3342
  ),
3124
- title: i18n.get("identityVerification"),
3125
- description: showIndividualMotionCapture?.value ? i18n.get("toHelpProtectAgainstFraudAndKeepOurServices") : /* @__PURE__ */ jsxs(Fragment, { children: [
3126
- i18n.get("takeOrUploadAPhoto"),
3343
+ title: t(($) => $["identityVerification"], { ns: "common" }),
3344
+ description: showIndividualMotionCapture?.value ? t(($) => $["toHelpProtectAgainstFraudAndKeepOurServices"]) : /* @__PURE__ */ jsxs(Fragment, { children: [
3345
+ t(($) => $["takeOrUploadAPhoto"], { ns: "common" }),
3127
3346
  " ",
3128
- /* @__PURE__ */ jsx(Link, { href: "https://onfido.com", external: true, inline: true, children: i18n.get("onfido") })
3347
+ /* @__PURE__ */ jsx(Link, { href: "https://onfido.com", external: true, inline: true, children: t(($) => $["onfido"], { ns: "common" }) })
3129
3348
  ] }),
3130
- helpAction: error ? /* @__PURE__ */ jsx(
3349
+ error: error ? /* @__PURE__ */ jsx(
3131
3350
  Alert,
3132
3351
  {
3133
3352
  variant: "error",
3134
- title: i18n.get(error.key, error.options),
3135
- className: styles$1.verifyOnfidoError
3353
+ title: t(($) => $[error.key], { ...error.options?.values, ns: "common" })
3136
3354
  }
3137
3355
  ) : void 0,
3138
3356
  actions: /* @__PURE__ */ jsx(Fragment, { children: showLoadingSpinner ? /* @__PURE__ */ jsx(Loader, { size: "large" }) : !hasExistingDocument && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -3143,7 +3361,7 @@ function IdVerificationMethod(props) {
3143
3361
  onClick: launchOnfido,
3144
3362
  disabled: status === "extractionLoading",
3145
3363
  loading: status === "extractionLoading",
3146
- children: i18n.get("startVerification")
3364
+ children: t(($) => $["startVerification"], { ns: "common" })
3147
3365
  }
3148
3366
  ),
3149
3367
  !showIndividualMotionCapture?.value && /* @__PURE__ */ jsx(
@@ -3152,7 +3370,7 @@ function IdVerificationMethod(props) {
3152
3370
  onClick: () => setStatus("confirmManualFlowModal"),
3153
3371
  variant: "secondary",
3154
3372
  fullWidth: true,
3155
- children: i18n.get("addDetailsManually")
3373
+ children: t(($) => $["addDetailsManually"], { ns: "common" })
3156
3374
  }
3157
3375
  )
3158
3376
  ] }) }),
@@ -3164,18 +3382,21 @@ function IdVerificationMethod(props) {
3164
3382
  onUpdate: handleUpdateExistingDocument
3165
3383
  }
3166
3384
  ),
3167
- disclaimer: !hasExistingDocument && /* @__PURE__ */ jsxs(Fragment, { children: [
3168
- i18n.get("byContinuingToUseThisService"),
3169
- " ",
3170
- /* @__PURE__ */ jsx(Link, { href: "https://onfido.com/facial-scan-policy-and-release/", external: true, inline: true, children: i18n.get("onfidoFacialScanPolicy") }),
3171
- " ",
3172
- /* @__PURE__ */ jsx(Link, { href: "https://onfido.com/privacy/", external: true, inline: true, children: i18n.get("privacyPolicy") }),
3173
- " ",
3174
- i18n.get("and"),
3175
- " ",
3176
- /* @__PURE__ */ jsx(Link, { href: "https://onfido.com/terms-of-service/", external: true, inline: true, children: i18n.get("termsOfService") }),
3177
- "."
3178
- ] })
3385
+ disclaimer: (
3386
+ // TODO - replace with Trans component
3387
+ !hasExistingDocument && /* @__PURE__ */ jsxs(Fragment, { children: [
3388
+ t(($) => $["byContinuingToUseThisService"]),
3389
+ " ",
3390
+ /* @__PURE__ */ jsx(Link, { href: "https://onfido.com/facial-scan-policy-and-release/", external: true, inline: true, children: t(($) => $["onfidoFacialScanPolicy"]) }),
3391
+ " ",
3392
+ /* @__PURE__ */ jsx(Link, { href: "https://onfido.com/privacy/", external: true, inline: true, children: t(($) => $["privacyPolicy"], { ns: "common" }) }),
3393
+ " ",
3394
+ t(($) => $["and"], { ns: "common" }),
3395
+ " ",
3396
+ /* @__PURE__ */ jsx(Link, { href: "https://onfido.com/terms-of-service/", external: true, inline: true, children: t(($) => $["termsOfService"], { ns: "common" }) }),
3397
+ "."
3398
+ ] })
3399
+ )
3179
3400
  }
3180
3401
  ),
3181
3402
  status === "onfidoModal" && /* @__PURE__ */ jsx(
@@ -3191,19 +3412,19 @@ function IdVerificationMethod(props) {
3191
3412
  status === "confirmManualFlowModal" && /* @__PURE__ */ jsx(
3192
3413
  Confirm,
3193
3414
  {
3194
- title: i18n.get("addDetailsManuallyQuestion"),
3195
- description: i18n.get("itCanTakeUpTo"),
3415
+ title: t(($) => $["addDetailsManuallyQuestion"]),
3416
+ description: t(($) => $["itCanTakeUpTo"]),
3196
3417
  onCancel: handleCancelAddDetailsManually,
3197
- confirmText: i18n.get("yesAddManually"),
3418
+ confirmText: t(($) => $["yesAddManually"]),
3198
3419
  onConfirm: handleContinueViaManualEntryFlow
3199
3420
  }
3200
3421
  ),
3201
3422
  status === "confirmDeleteDocumentModal" && /* @__PURE__ */ jsx(
3202
3423
  Confirm,
3203
3424
  {
3204
- title: i18n.get("deleteIdDocument"),
3205
- description: i18n.get("youMayBeAskedToReUpload"),
3206
- confirmText: i18n.get("deleteDocument"),
3425
+ title: t(($) => $["deleteIdDocument"]),
3426
+ description: t(($) => $["youMayBeAskedToReUpload"]),
3427
+ confirmText: t(($) => $["deleteDocument"], { ns: "common" }),
3207
3428
  onCancel: handleCancelDeleteDocument,
3208
3429
  onConfirm: handleDeleteDocument,
3209
3430
  critical: true
@@ -3263,8 +3484,7 @@ const SignatoryQuestionnaireModalContent = () => {
3263
3484
  ] });
3264
3485
  };
3265
3486
  function SignatoryQuestionnaire(props) {
3266
- const { t } = useTranslation();
3267
- const { i18n } = useI18nContext();
3487
+ const { t } = useTranslation(["common", "individual"]);
3268
3488
  const userEvents = useAnalyticsContext();
3269
3489
  const [isModalOpen, setIsModalOpen] = useState(false);
3270
3490
  const {
@@ -3312,12 +3532,12 @@ function SignatoryQuestionnaire(props) {
3312
3532
  value: data?.isSignatory,
3313
3533
  onChange: handleFieldChange("isSignatory"),
3314
3534
  onDescriptionLinkClick: openModal,
3315
- question: i18n.get("signatoryQuestion"),
3316
- descriptionLinkText: i18n.get("whatDoesThisMean"),
3535
+ question: t(($) => $["doesThisPersonHaveTheAuthority"], { ns: "individual" }),
3536
+ descriptionLinkText: t(($) => $["whatDoesThisMean"]),
3317
3537
  errorMessage: getDisplayErrorMessage(errorMessage, t)
3318
3538
  }
3319
3539
  ),
3320
- isModalOpen && /* @__PURE__ */ jsx(Modal, { onClose: closeModal, ariaLabel: i18n.get("moreAboutAuthorizedSignatories"), inset: true, children: /* @__PURE__ */ jsx(SignatoryQuestionnaireModalContent, {}) })
3540
+ isModalOpen && /* @__PURE__ */ jsx(Modal, { onClose: closeModal, ariaLabel: t(($) => $["moreAboutAuthorizedSignatories"]), inset: true, children: /* @__PURE__ */ jsx(SignatoryQuestionnaireModalContent, {}) })
3321
3541
  ] });
3322
3542
  }
3323
3543
  const UboQuestionnaireModalContent = ({ modalType }) => {
@@ -3392,8 +3612,7 @@ const uboQuestionnaireFields = [
3392
3612
  "isNomineeShareholder"
3393
3613
  ];
3394
3614
  function UboQuestionnaire(props) {
3395
- const { t } = useTranslation();
3396
- const { i18n } = useI18nContext();
3615
+ const { t } = useTranslation(["common", "individual"]);
3397
3616
  const userEvents = useAnalyticsContext();
3398
3617
  const {
3399
3618
  data,
@@ -3426,9 +3645,9 @@ function UboQuestionnaire(props) {
3426
3645
  setActiveModal(null);
3427
3646
  };
3428
3647
  const modalAriaLabelMap = {
3429
- isOwner: i18n.get("moreAboutOwners"),
3430
- isControllingPerson: i18n.get("moreAboutOwnershipThroughControl"),
3431
- isDirector: i18n.get("moreAboutDirectors")
3648
+ isOwner: t(($) => $["moreAboutOwners"]),
3649
+ isControllingPerson: t(($) => $["moreAboutOwnershipThroughControl"]),
3650
+ isDirector: t(($) => $["moreAboutDirectors"])
3432
3651
  };
3433
3652
  const isDirectorErrorMessage = formUtils.getErrorMessage(
3434
3653
  "isDirector",
@@ -3469,8 +3688,8 @@ function UboQuestionnaire(props) {
3469
3688
  value: data?.isDirector,
3470
3689
  onChange: handleFieldChange("isDirector"),
3471
3690
  onDescriptionLinkClick: openModal("isDirector"),
3472
- question: i18n.get("directorQuestion"),
3473
- descriptionLinkText: i18n.get("whatDoesThisMean"),
3691
+ question: t(($) => $["isThisPersonListedAsADirector"], { ns: "individual" }),
3692
+ descriptionLinkText: t(($) => $["whatDoesThisMean"]),
3474
3693
  errorMessage: getDisplayErrorMessage(isDirectorErrorMessage, t)
3475
3694
  }
3476
3695
  ),
@@ -3480,7 +3699,7 @@ function UboQuestionnaire(props) {
3480
3699
  name: "isNomineeDirector",
3481
3700
  value: data?.isNomineeDirector,
3482
3701
  onChange: handleFieldChange("isNomineeDirector"),
3483
- question: i18n.get("nomineeDirectorQuestion"),
3702
+ question: t(($) => $["isThisPersonANomineeDirectorAppointed"], { ns: "individual" }),
3484
3703
  errorMessage: getDisplayErrorMessage(isNomineeDirectorErrorMessage, t)
3485
3704
  }
3486
3705
  ),
@@ -3491,8 +3710,8 @@ function UboQuestionnaire(props) {
3491
3710
  value: data?.isOwner,
3492
3711
  onChange: handleFieldChange("isOwner"),
3493
3712
  onDescriptionLinkClick: openModal("isOwner"),
3494
- question: i18n.get("ownerQuestion"),
3495
- descriptionLinkText: i18n.get("whatDoesThisMean"),
3713
+ question: t(($) => $["doesThisPersonOwn25PercentOrMoreOfBusiness"], { ns: "individual" }),
3714
+ descriptionLinkText: t(($) => $["whatDoesThisMean"]),
3496
3715
  errorMessage: getDisplayErrorMessage(isOwnerErrorMessage, t)
3497
3716
  }
3498
3717
  ),
@@ -3502,7 +3721,9 @@ function UboQuestionnaire(props) {
3502
3721
  name: "isNomineeShareholder",
3503
3722
  value: data?.isNomineeShareholder,
3504
3723
  onChange: handleFieldChange("isNomineeShareholder"),
3505
- question: i18n.get("nomineeShareHolderQuestion"),
3724
+ question: t(($) => $["isThisPersonANomineeShareholderAppointedToHold"], {
3725
+ ns: "individual"
3726
+ }),
3506
3727
  errorMessage: getDisplayErrorMessage(isNomineeShareholderErrorMessage, t)
3507
3728
  }
3508
3729
  ),
@@ -3513,8 +3734,10 @@ function UboQuestionnaire(props) {
3513
3734
  value: data?.isControllingPerson,
3514
3735
  onChange: handleFieldChange("isControllingPerson"),
3515
3736
  onDescriptionLinkClick: openModal("isControllingPerson"),
3516
- question: i18n.get("controllingPersonQuestion"),
3517
- descriptionLinkText: i18n.get("whatDoesThisMean"),
3737
+ question: t(($) => $["doesThisPersonHaveSignificantResponsibility"], {
3738
+ ns: "individual"
3739
+ }),
3740
+ descriptionLinkText: t(($) => $["whatDoesThisMean"]),
3518
3741
  errorMessage: getDisplayErrorMessage(isControllingPersonErrorMessage, t)
3519
3742
  }
3520
3743
  ),
@@ -3604,7 +3827,8 @@ function IndividualOnfido(props) {
3604
3827
  problems,
3605
3828
  onNext,
3606
3829
  setNextHandler,
3607
- handleHomeClick
3830
+ handleHomeClick,
3831
+ scenarios
3608
3832
  } = props;
3609
3833
  const basicDetailsFormProps = getFormProps(props, basicDetailsFormID);
3610
3834
  const signatoryQuestionnaireFormProps = getFormProps(props, signatoryQuestionnaireFormID);
@@ -3689,10 +3913,10 @@ function IndividualOnfido(props) {
3689
3913
  capabilities,
3690
3914
  userRoles: data?.basicDetails?.role,
3691
3915
  taskType,
3692
- hasMotionScenario: hasMotionCaptureScenarioValue
3916
+ hasMotionScenario: data?.basicDetails?.role?.includes(DecisionMakerTypes.SIGNATORY) && scenarios?.includes(Scenarios.L_BAFIN) ? false : hasMotionCaptureScenarioValue
3693
3917
  })
3694
3918
  );
3695
- }, [data?.basicDetails?.role, taskType, capabilities, hasMotionCaptureScenarioValue]);
3919
+ }, [data?.basicDetails?.role, scenarios, taskType, capabilities, hasMotionCaptureScenarioValue]);
3696
3920
  const fullName = `${data?.basicDetails?.firstName} ${data?.basicDetails?.lastName}`;
3697
3921
  const handleFieldChange = (formName) => (fieldName, mode) => handleChangeFor(fieldName, formName, mode);
3698
3922
  const hasLiveSelfieErrorCode = problems?.missingData?.some(
@@ -3750,6 +3974,7 @@ function IndividualOnfido(props) {
3750
3974
  IdVerificationMethod,
3751
3975
  {
3752
3976
  legalEntityId,
3977
+ taskType,
3753
3978
  handlers: {
3754
3979
  handleContinueToAdditionalDetails,
3755
3980
  handleDeleteDocument,
@@ -3906,7 +4131,10 @@ const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido, isExperimentEn
3906
4131
  legalEntity.individual.identificationData
3907
4132
  );
3908
4133
  }
3909
- const localization = mapNameLocalization(individualOnfido.basicDetails ?? {});
4134
+ const localization = [
4135
+ mapSchemaFieldsToApiScriptLocalization(individualOnfido.basicDetails ?? {}, "jaHani"),
4136
+ mapSchemaFieldsToApiScriptLocalization(individualOnfido.basicDetails ?? {}, "jaKana")
4137
+ ].filter(({ fields }) => !isEmpty$1(fields));
3910
4138
  if (localization.length) {
3911
4139
  legalEntity.individual.name.localization = localization;
3912
4140
  }
@@ -3974,33 +4202,12 @@ const mapLegalEntityToIndividualOnfidoSchema = (legalEntity, isChangingType, isR
3974
4202
  individualOnfido.additionalPersonalDetails.typeOfIdentity = apiIdentityTypeToIdentityTypeMap[legalEntity.individual.identificationData.type];
3975
4203
  }
3976
4204
  if (legalEntity.individual?.name?.localization) {
3977
- const configs = [
3978
- {
3979
- script: "ja-Hani",
3980
- mappingFunction: (l) => ({
3981
- jaHaniFirstName: l.fields?.firstName,
3982
- jaHaniLastName: l.fields?.lastName
3983
- })
3984
- },
3985
- {
3986
- script: "ja-Kana",
3987
- mappingFunction: (l) => ({
3988
- jaKanaFirstName: l.fields?.firstName,
3989
- jaKanaLastName: l.fields?.lastName
3990
- })
3991
- }
3992
- ];
3993
- configs.forEach((config) => {
3994
- const localizationToMap = legalEntity.individual?.name.localization?.find(
3995
- (l) => l.script === config.script
3996
- );
3997
- if (localizationToMap) {
3998
- individualOnfido.basicDetails = {
3999
- ...individualOnfido.basicDetails,
4000
- ...config.mappingFunction(localizationToMap)
4001
- };
4002
- }
4003
- });
4205
+ for (const scriptLoc of legalEntity.individual.name.localization) {
4206
+ individualOnfido.basicDetails = {
4207
+ ...individualOnfido.basicDetails,
4208
+ ...mapApiScriptLocalizationToSchemaFields(scriptLoc)
4209
+ };
4210
+ }
4004
4211
  }
4005
4212
  if (!parentLegalEntity?.entityAssociations) {
4006
4213
  return individualOnfido;
@@ -4038,7 +4245,7 @@ const mapLegalEntityToIndividualOnfidoSchema = (legalEntity, isChangingType, isR
4038
4245
  return individualOnfido;
4039
4246
  };
4040
4247
  const mapDocumentDetailToIdDocument = (documents) => {
4041
- const activeDocument = documents.find((document) => document.active);
4248
+ const activeDocument = documents.find((document2) => document2.active);
4042
4249
  return activeDocument ? {
4043
4250
  idDocumentType: activeDocument.type,
4044
4251
  modificationDate: activeDocument.modificationDate
@@ -4392,7 +4599,10 @@ function IndividualOnfidoDropin({
4392
4599
  defaultData,
4393
4600
  rules: individualFieldValidations,
4394
4601
  asyncRules: individualFieldAsyncValidations,
4395
- optionalFields: derivedProps?.optionalFields
4602
+ optionalFields: derivedProps?.optionalFields,
4603
+ obscuredFields: {
4604
+ additionalPersonalDetails: ["idNumber"]
4605
+ }
4396
4606
  });
4397
4607
  const documentUtils = documentApiUtils({
4398
4608
  baseUrl: baseUrl.value,
@@ -4630,18 +4840,18 @@ function IndividualOnfidoDropin({
4630
4840
  legalEntityResponse,
4631
4841
  accountHolder || void 0
4632
4842
  );
4633
- const createdLegalEntity = await submitLegalEntity({
4843
+ const submittedLegalEntity = await submitLegalEntity({
4634
4844
  dataSubmitted,
4635
4845
  legalEntity,
4636
4846
  idDocumentType
4637
4847
  });
4638
4848
  setAccountHolder(accountHolder);
4639
4849
  if (dataSubmitted.idVerificationMethod && dataSubmitted.idVerificationMethod?.idVerificationMethod !== "existingDocument" || hasVerificationErrors) {
4640
- await submitDocuments({ legalEntity: createdLegalEntity, dataSubmitted });
4850
+ await submitDocuments({ legalEntity: submittedLegalEntity, dataSubmitted });
4641
4851
  }
4642
4852
  if (parentLegalEntity) {
4643
4853
  await attachAssociationToParentLegalEntity({
4644
- legalEntity: createdLegalEntity,
4854
+ legalEntity: submittedLegalEntity,
4645
4855
  parentLE: parentLegalEntity,
4646
4856
  dataSubmitted
4647
4857
  });
@@ -4650,9 +4860,10 @@ function IndividualOnfidoDropin({
4650
4860
  refetchType: "all"
4651
4861
  });
4652
4862
  }
4863
+ idNowModalChildEntityId.value = submittedLegalEntity;
4653
4864
  setLoadingStatus("success");
4654
4865
  clearToasts();
4655
- externalOnSubmit?.(dataSubmitted);
4866
+ externalOnSubmit?.(dataSubmitted, matchingScenario);
4656
4867
  } catch (e) {
4657
4868
  const eventsAdditionalData = {};
4658
4869
  logger.error("Failed to update individual", e);
@@ -4686,7 +4897,7 @@ function IndividualOnfidoDropin({
4686
4897
  const formatIdDocument = (idDocument2) => {
4687
4898
  if (!idDocument2) return void 0;
4688
4899
  const documentType = idDocument2?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
4689
- (document) => idDocument2.instantIdVerificationData?.document_front.type === document.id
4900
+ (document2) => idDocument2.instantIdVerificationData?.document_front.type === document2.id
4690
4901
  ) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
4691
4902
  if (!documentType) return void 0;
4692
4903
  const frontPage = idDocument2.idFrontPage?.[0];
@@ -4797,9 +5008,12 @@ function IndividualOnfidoDropin({
4797
5008
  ...data?.additionalPersonalDetails?.idNumberExempt ? ["idNumber"] : [],
4798
5009
  ...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod", "modificationDate"] : []
4799
5010
  ];
5011
+ const isUploadEmpty = !data?.manualIdUpload || Object.keys(data?.manualIdUpload).length === 0;
4800
5012
  const omittedFormsForSummary = [
4801
- ...data?.idVerificationMethod?.idVerificationMethod === "instantVerification" ? ["idDocument"] : [],
4802
- ...data?.idVerificationMethod?.idVerificationMethod === "manualVerification" ? ["idVerificationMethod"] : []
5013
+ // 1. Omit idDocument if instant OR (manual/existing AND upload is empty)
5014
+ ...data?.idVerificationMethod?.idVerificationMethod === "instantVerification" || isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) && isUploadEmpty ? ["idDocument"] : [],
5015
+ // 2. Omit idVerificationMethod if manual or existing
5016
+ ...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod"] : []
4803
5017
  ];
4804
5018
  const customLabelsForSummary = {
4805
5019
  idVerificationMethod: data?.idVerificationMethod?.idVerificationMethod === "instantVerification" ? "idVerificationMethod" : "idDocument"
@@ -4832,56 +5046,60 @@ function IndividualOnfidoDropin({
4832
5046
  },
4833
5047
  [associatedLeTrackingParams]
4834
5048
  );
4835
- return /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
4836
- FormFlow,
4837
- {
4838
- summary: {
4839
- data: formatDataForSummary(),
4840
- omitted: {
4841
- keys: omittedKeysForSummary,
4842
- forms: omittedFormsForSummary
4843
- },
4844
- problems,
4845
- trackNavigation: handleTrackNavigation,
4846
- labels: customLabelsForSummary
4847
- },
4848
- asModal,
4849
- currentStep: steps.current,
4850
- disableNextButton: disableNextButton.value,
4851
- forms,
4852
- gotoFormByFormIndex,
4853
- handleBackClick,
4854
- handleCancelClick: handleHomeClick,
4855
- handleNextClick: nextHandler || handleNextClick,
4856
- loadingStatus,
4857
- totalSteps: steps.total,
4858
- children: /* @__PURE__ */ jsx(
4859
- IndividualOnfido,
4860
- {
4861
- ...derivedProps,
4862
- requiredFields,
4863
- data,
4864
- defaultCountry: country,
4865
- activeForm,
4866
- forms,
4867
- taskType,
5049
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
5050
+ /* @__PURE__ */ jsx(Show, { when: showIdNowModal && idNowModalChildEntityId, children: /* @__PURE__ */ jsx(IdNowVerificationModal, { handleFinish: handleHomeClick }) }),
5051
+ /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
5052
+ FormFlow,
5053
+ {
5054
+ summary: {
5055
+ data: formatDataForSummary(),
5056
+ omitted: {
5057
+ keys: omittedKeysForSummary,
5058
+ forms: omittedFormsForSummary
5059
+ },
4868
5060
  problems,
4869
- onNext: handleNextClick,
4870
- onBack: handleBackClick,
4871
- legalEntityId: legalEntityResponse?.id,
4872
- allowedRoles: roleTypes,
4873
- shouldValidate,
4874
- accountHolder,
4875
- parentLegalEntity,
4876
- trustedFields,
4877
- trustedFieldsProvider,
4878
- trustedRoles,
4879
- setNextHandler,
4880
- handleHomeClick
4881
- }
4882
- )
4883
- }
4884
- ) });
5061
+ trackNavigation: handleTrackNavigation,
5062
+ labels: customLabelsForSummary
5063
+ },
5064
+ asModal,
5065
+ currentStep: steps.current,
5066
+ disableNextButton: disableNextButton.value,
5067
+ forms,
5068
+ gotoFormByFormIndex,
5069
+ handleBackClick,
5070
+ handleCancelClick: handleHomeClick,
5071
+ handleNextClick: nextHandler || handleNextClick,
5072
+ loadingStatus,
5073
+ totalSteps: steps.total,
5074
+ children: /* @__PURE__ */ jsx(
5075
+ IndividualOnfido,
5076
+ {
5077
+ ...derivedProps,
5078
+ requiredFields,
5079
+ data,
5080
+ defaultCountry: country,
5081
+ activeForm,
5082
+ forms,
5083
+ scenarios,
5084
+ taskType,
5085
+ problems,
5086
+ onNext: handleNextClick,
5087
+ onBack: handleBackClick,
5088
+ legalEntityId: legalEntityResponse?.id,
5089
+ allowedRoles: roleTypes,
5090
+ shouldValidate,
5091
+ accountHolder,
5092
+ parentLegalEntity,
5093
+ trustedFields,
5094
+ trustedFieldsProvider,
5095
+ trustedRoles,
5096
+ setNextHandler,
5097
+ handleHomeClick
5098
+ }
5099
+ )
5100
+ }
5101
+ ) })
5102
+ ] });
4885
5103
  }
4886
5104
  export {
4887
5105
  IndividualOnfidoDropin as I,