@adyen/kyc-components 4.0.0-compact.1 → 4.0.0-compact.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (828) hide show
  1. package/dist/4-people-BzyXLUF9.js +24 -0
  2. package/dist/{AD-CyP5INSp.js → AD-BQAadLyG.js} +2 -2
  3. package/dist/{AT-DJLlevck.js → AT-BI8ju2NH.js} +2 -2
  4. package/dist/{AcceptTermsOfServiceComponent-Ddtg_ZHH.js → AcceptTermsOfServiceComponent-DmtE39CC.js} +51 -66
  5. package/dist/Accordion-C-BvE1VA.js +88 -0
  6. package/dist/{AccountSetupRejected-CvdEsdWe.js → AccountSetupRejected-DDoI43lB.js} +6 -6
  7. package/dist/ActionBar-Dzrzolec.js +31 -0
  8. package/dist/{Address-YjoUtTTT.js → Address-e41CN3CB.js} +292 -51
  9. package/dist/{Alert-C_-UwoDE.js → Alert-Dk-oZlnx.js} +7 -79
  10. package/dist/{Avatar-CeHhAxxR.js → Avatar-efxn8pKz.js} +2 -2
  11. package/dist/{BE-B-m_4F41.js → BE-nWHKW0xQ.js} +2 -2
  12. package/dist/{BG-BVR5ytc-.js → BG-HKzabLqZ.js} +3 -3
  13. package/dist/BusinessDetailsDropin-DDh_D2hv.js +2359 -0
  14. package/dist/BusinessFinancingComponent-C04uRrhE.js +55 -0
  15. package/dist/{BusinessFinancingDropin-B6Vpswcj.js → BusinessFinancingDropin-_OlSqohS.js} +186 -154
  16. package/dist/BusinessFinancingPage-DdMugwOa.js +43 -0
  17. package/dist/{BusinessTypeSelectionPage-CQxhI1B6.js → BusinessTypeSelectionPage-vkCTEFEJ.js} +13 -13
  18. package/dist/{CH-CesIKOYy.js → CH-TX4BTE2y.js} +2 -2
  19. package/dist/{CY-BnJ7k_mN.js → CY-D59Nypl7.js} +2 -2
  20. package/dist/{CZ-BiPeoA9G.js → CZ-B6iI1GbE.js} +3 -3
  21. package/dist/Card-CqXQA0AI.js +82 -0
  22. package/dist/ConstitutionalDocument-CcwyClZ7.js +143 -0
  23. package/dist/{CountryField-50Iboayh.js → CountryField-CzRN1OE8.js} +195 -216
  24. package/dist/CreateIndividualComponent-BNeY6u8q.js +71 -0
  25. package/dist/CreateTransferInstrumentComponent-B8cNHRdF.js +63 -0
  26. package/dist/{Currency-D-0ToVpS.js → Currency-BBt4yo5i.js} +10 -65
  27. package/dist/{CustomerSupport-DTw357Bq.js → CustomerSupport-CObTT8cH.js} +23 -11
  28. package/dist/{DE-DdcbG-CC.js → DE-CsuX_tSL.js} +2 -2
  29. package/dist/{DK-DA8qRrzq.js → DK-oQEFrF6o.js} +3 -3
  30. package/dist/{DebugModal-Dc6JIQeF.js → DebugModal-DJcim6UP.js} +128 -43
  31. package/dist/DecisionMakerDetailsPage-CrQgRW8X.js +106 -0
  32. package/dist/DecisionMakers-B-3aMddf.js +842 -0
  33. package/dist/DropinLayout-CBP_cHLC.js +17 -0
  34. package/dist/{EE-CaXoPgZz.js → EE-3WZV5Ejt.js} +2 -2
  35. package/dist/{ES-Bt_oaIaf.js → ES-NfxpqbC2.js} +2 -2
  36. package/dist/{EmbeddedStatus-DQXq53qv.js → EmbeddedStatus-C_5DguHv.js} +15 -16
  37. package/dist/{EndStateLayout-BPsmcrN3.js → EndStateLayout-CwdrDEYY.js} +2 -2
  38. package/dist/EntityAssociation-C413vcu6.js +159 -0
  39. package/dist/EntityGuidanceStatus-C6b8i7os.js +105 -0
  40. package/dist/{FI-C5V3lLuN.js → FI-CHQIvHa-.js} +2 -2
  41. package/dist/{FR-Bc1tLIC4.js → FR-MWZyWX3x.js} +2 -2
  42. package/dist/FormFlow-PppMJ6OA.js +186 -0
  43. package/dist/{FormNavigation-29vpexO6.js → FormNavigation-DL47b_QR.js} +6 -24
  44. package/dist/{useGlobalData-TJeJM5fq.js → FormWrapper-BOrTn1C8.js} +12 -82
  45. package/dist/{GG-BGuqxplU.js → GG-CPoMVQPc.js} +3 -3
  46. package/dist/{GI-CROkpYrU.js → GI-DxmBwVD_.js} +3 -3
  47. package/dist/{GR-B9c2boG8.js → GR-Rk0pXlNw.js} +2 -2
  48. package/dist/{HR-p4luVYpu.js → HR-WapHW2fw.js} +2 -2
  49. package/dist/{HU-D8vJYkDH.js → HU-DCOMuOhe.js} +3 -3
  50. package/dist/{IE-Cli_j7Al.js → IE-BkgtVgDi.js} +2 -2
  51. package/dist/{IM-mpIyBn16.js → IM-Wr4iDT94.js} +3 -3
  52. package/dist/{IS-02zCAdvq.js → IS-C-Cgc6zp.js} +2 -2
  53. package/dist/{IT-CzURFhrK.js → IT-CXekiddL.js} +2 -2
  54. package/dist/{IndividualOnfidoDropin-XYcD-6sb.js → IndividualOnfido-CmmyKC7J.js} +8212 -6455
  55. package/dist/IndividualOnfidoDropin-BsCb6dvy.js +2569 -0
  56. package/dist/{InputText-CnEQJihB.js → InputText-BfL9DgWp.js} +101 -13
  57. package/dist/{Introduction-BkGNoXvo.js → Introduction-CBMl7v2M.js} +7 -11
  58. package/dist/{JE-MFwIYti7.js → JE-B4gj54Hg.js} +3 -3
  59. package/dist/JpAddress-BCwWQ0Ul.js +271 -0
  60. package/dist/{LI-DA06W10W.js → LI-L0ZAALRT.js} +2 -2
  61. package/dist/{LT-DuU6E2Ct.js → LT-Ao2uagV9.js} +2 -2
  62. package/dist/{LU-BQHhNpDy.js → LU-B7LRUuc6.js} +2 -2
  63. package/dist/{LV-DN7wckbP.js → LV-DZeGjA2G.js} +2 -2
  64. package/dist/{LegalRepresentativeDetailsPage-D3Ld1xg7.js → LegalRepresentativeDetailsPage-CDURNY_v.js} +6 -7
  65. package/dist/ListItem-BhUSZdS5.js +69 -0
  66. package/dist/{MC-DtSWC4jS.js → MC-EDVNGWhy.js} +2 -2
  67. package/dist/{MT-DeDMQ1f_.js → MT-B9my7RlP.js} +2 -2
  68. package/dist/ManageIndividualComponent-wYIuZdQ8.js +46 -0
  69. package/dist/ManageTermsOfServiceComponent-6RBHbbsn.js +52 -0
  70. package/dist/{ManageTransferInstrumentComponent-D8e5YRiK.js → ManageTransferInstrumentComponent-BDyWbySW.js} +19 -26
  71. package/dist/{MaybeModal-D6lc_yUc.js → MaybeModal-CG0BAO68.js} +15 -4
  72. package/dist/{Modal-ltKHtBfL.js → Modal-CJ_hgcGb.js} +19 -6
  73. package/dist/{NL-aVL0NAp-.js → NL-VXAFOhV5.js} +2 -2
  74. package/dist/{NO-D7EOiQA1.js → NO-Cx1VSh2W.js} +3 -3
  75. package/dist/OnboardingDropinComponent-D3dYF_4W.js +7617 -0
  76. package/dist/{PL-Bg7axKQA.js → PL-BZW1hGvD.js} +3 -3
  77. package/dist/{PT-hB1HnBM2.js → PT-OpU4MU3L.js} +2 -2
  78. package/dist/{PayoutDetailsDropin-Ba4z1H8Y.js → PayoutDetailsDropin-DxALk48X.js} +1530 -384
  79. package/dist/ProgressBar-B7gTQncy.js +47 -0
  80. package/dist/{RO-BLlC4CKq.js → RO-Cz6Sh0ls.js} +2 -2
  81. package/dist/{Review-QGTwsuVG.js → Review-C_JnI94L.js} +9 -8
  82. package/dist/RootBusinessDetailsPage-BE3Uck1r.js +46 -0
  83. package/dist/RootBusinessLinesPage-DknXuZgi.js +1484 -0
  84. package/dist/RootIndividualDetailsPage-BIj988Sh.js +71 -0
  85. package/dist/{SE-q25Qt85B.js → SE-B5K-FkQd.js} +3 -3
  86. package/dist/{SI-BzA-ozn6.js → SI-BOGTNLPa.js} +2 -2
  87. package/dist/{SK-DOTdLJPw.js → SK-BOVrp_Av.js} +2 -2
  88. package/dist/{SM-B4BIgmhk.js → SM-meowwILA.js} +2 -2
  89. package/dist/{SignPCIComponent-BvOwbwCX.js → SignPCIComponent-BjVEKTlw.js} +29 -19
  90. package/dist/{SingpassSelection-CfMjudRn.js → SingpassSelection-Bkbz_bGo.js} +10 -10
  91. package/dist/SoleProprietorshipPage-DSOEsSfJ.js +46 -0
  92. package/dist/{SourceOfFundsPage-BOFtbQbF.js → SourceOfFundsPage-cWwthA_A.js} +238 -956
  93. package/dist/{MaskedInput-Cr4BEARC.js → Spacer-D4I0f08n.js} +641 -24
  94. package/dist/{StepProgressIndicator-D8I0VtoT.js → StepProgressIndicator-FNAEisRr.js} +2 -2
  95. package/dist/{StoreProvider-D4cRWOo4.js → StoreProvider-jtUYKLRz.js} +1195 -560
  96. package/dist/Summary-COehg8IT.js +204 -0
  97. package/dist/{TaxReportingDropin-CDqErRkl.js → TaxReportingDropin-BBkhMcPn.js} +76 -74
  98. package/dist/TrustDetailsPage-50i4_lFA.js +2149 -0
  99. package/dist/TrustMemberCompanyPage-v2Md1srF.js +57 -0
  100. package/dist/TrustMemberIndividualPage-Bn6TXkhN.js +66 -0
  101. package/dist/TrustMemberRoleAndTypePage-C_NPNe6_.js +985 -0
  102. package/dist/TrustMembersOverview-FcSsQZ3Z.js +438 -0
  103. package/dist/{UnincorporatedPartnershipIndividualPage-Dx1qdgZL.js → UnincorporatedPartnershipIndividualPage-zsyk9RTz.js} +6 -7
  104. package/dist/{UnincorporatedPartnershipMemberCompanyPage-B89QmXFf.js → UnincorporatedPartnershipMemberCompanyPage-FP75ZgOg.js} +7 -11
  105. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-n6SndOAj.js +281 -0
  106. package/dist/UnincorporatedPartnershipMembersOverview-BbW2q9EI.js +172 -0
  107. package/dist/{VA-bPXdCnwD.js → VA-DXsYTCoh.js} +2 -2
  108. package/dist/VerificationErrorAlert-B7jRGdgn.js +79 -0
  109. package/dist/{ViewVerificationStatusComponent-2jYPePEI.js → ViewVerificationStatusComponent-CuUmC319.js} +16 -13
  110. package/dist/adyen-business-financing.js +10 -7
  111. package/dist/adyen-individual-configuration.js +5 -6
  112. package/dist/adyen-individual-status.js +5 -6
  113. package/dist/adyen-kyc-components.js +38 -33
  114. package/dist/adyen-onboarding.js +4 -5
  115. package/dist/adyen-terms-of-service-management.js +5 -6
  116. package/dist/adyen-terms-of-service-status.js +5 -6
  117. package/dist/adyen-transfer-instrument-configuration.js +5 -6
  118. package/dist/adyen-transfer-instrument-management.js +5 -6
  119. package/dist/adyen-verification-status.js +5 -6
  120. package/dist/{arrow-right-D_mdkZmE.js → arrow-right-KxA3SvQj.js} +2 -2
  121. package/dist/{bag-DpxmyXfR.js → bag-BPumznWh.js} +2 -2
  122. package/dist/{bank-gyBvaSp4.js → bank-D6FiNBhs.js} +2 -2
  123. package/dist/bin-Bz6KOIeE.js +18 -0
  124. package/dist/capital-GVQ3svwN.js +17 -0
  125. package/dist/{cash-stack-Ds76Du8m.js → cash-stack-D9AoDDwt.js} +3 -3
  126. package/dist/{certificate-D6xjhThs.js → certificate-CdEWgHQf.js} +3 -3
  127. package/dist/{checkmark-tfEAu7lj.js → checkmark-Q7x6tGhy.js} +2 -2
  128. package/dist/checkmark-circle-fill-CsvN5_PL.js +17 -0
  129. package/dist/{checkmark-circle-nACBJ24q.js → checkmark-circle-x7dzbp3I.js} +3 -3
  130. package/dist/{checkmark-small-63w5fAxg.js → checkmark-small-D35myntq.js} +2 -2
  131. package/dist/{chevron-down-CkQS-knD.js → chevron-down-C2iDorpW.js} +2 -2
  132. package/dist/{chevron-left-CBCMdMx6.js → chevron-left-ztPO84q-.js} +2 -2
  133. package/dist/{chevron-right-dIVWvPJu.js → chevron-right-C_JN0oDt.js} +2 -2
  134. package/dist/{chevron-up-D93IGU9z.js → chevron-up-CgG8n25g.js} +2 -2
  135. package/dist/circle-Bt3Nlr3q.js +17 -0
  136. package/dist/circle-small-filled-YMzP6yQU.js +14 -0
  137. package/dist/clock-BZHremOA.js +20 -0
  138. package/dist/coins-fkAk6dCo.js +17 -0
  139. package/dist/{contract-DI03_xrF.js → contract-BTa4HltT.js} +2 -2
  140. package/dist/{cross-o4n5KXxG.js → cross-Cn09MtQ_.js} +2 -2
  141. package/dist/cross-circle-fill-maan7Z5S.js +17 -0
  142. package/dist/{cross-circle-fill-small-CHMDaA3q.js → cross-circle-fill-small-DCz52AuN.js} +2 -2
  143. package/dist/da-DK-BlU1EczG.js +30 -0
  144. package/dist/da-DK-DCJhV2qS.js +32 -0
  145. package/dist/da-DK-DEdQ-QPp.js +13 -0
  146. package/dist/da-DK-DWA8uOd8.js +24 -0
  147. package/dist/{da-DK-BoQic3Gy.js → da-DK-DYpfNZdP.js} +5 -1
  148. package/dist/da-DK-DZwlENGe.js +13 -0
  149. package/dist/da-DK-Dc0QYG8m.js +68 -0
  150. package/dist/da-DK-DqkN5oIu.js +13 -0
  151. package/dist/da-DK-DvZ431fC.js +13 -0
  152. package/dist/{da-DK-B45X2VaJ.js → da-DK-JHZnsI59.js} +24 -4
  153. package/dist/da-DK-gnPgzwrG.js +27 -0
  154. package/dist/da-DK-h8DYQ_Iq.js +13 -0
  155. package/dist/da-DK-jK7c9UL0.js +57 -0
  156. package/dist/de-DE-0uSzhWg5.js +13 -0
  157. package/dist/{de-DE-Dwagawx1.js → de-DE-BXt1K0Tr.js} +5 -1
  158. package/dist/de-DE-COuUdtao.js +13 -0
  159. package/dist/de-DE-D3lLuF8z.js +27 -0
  160. package/dist/de-DE-D50lGOJE.js +24 -0
  161. package/dist/de-DE-DXR3EpEc.js +13 -0
  162. package/dist/de-DE-DrSSblam.js +13 -0
  163. package/dist/de-DE-DwOQKCuU.js +32 -0
  164. package/dist/de-DE-Dz2OsS1F.js +68 -0
  165. package/dist/de-DE-LQE_LFFL.js +13 -0
  166. package/dist/{de-DE-CWvgMDqU.js → de-DE-VGGEkxUT.js} +24 -4
  167. package/dist/de-DE-s0B-XZyp.js +30 -0
  168. package/dist/de-DE-wmerDL2e.js +57 -0
  169. package/dist/debouncedInputEvent-HhImBs4O.js +109 -0
  170. package/dist/{form-rules-DhbF2mY4.js → debugStore-BvbyN1Oi.js} +4 -3
  171. package/dist/{document-1-DsCi9vmX.js → document-1-C08ut-Dt.js} +2 -2
  172. package/dist/document-person-vxlA6C5f.js +20 -0
  173. package/dist/documentUtils-DIcRD9lR.js +218 -0
  174. package/dist/download-Drhk9k1f.js +17 -0
  175. package/dist/{dropinUtils-CXnvPFZN.js → dropinUtils-BK1u6OTG.js} +32 -24
  176. package/dist/edit-1-CFoDTMvQ.js +14 -0
  177. package/dist/en-US-AgtwE4Fl.js +63 -0
  178. package/dist/en-US-B96dpVon.js +27 -0
  179. package/dist/en-US-BQZhzROc.js +32 -0
  180. package/dist/en-US-CozY33On.js +13 -0
  181. package/dist/{en-US-DIdQJky-.js → en-US-CzEL6t1W.js} +24 -4
  182. package/dist/en-US-D-B35AoN.js +68 -0
  183. package/dist/en-US-D2yrwtzT.js +24 -0
  184. package/dist/{en-US-BbAzROHT.js → en-US-Dg505Oh3.js} +2 -1
  185. package/dist/en-US-d4WBvUW7.js +118 -0
  186. package/dist/en-US-fyGPkcqX.js +13 -0
  187. package/dist/en-US-gsp7CD_E.js +57 -0
  188. package/dist/en-US-h0JneJJl.js +13 -0
  189. package/dist/es-ES-B7dt4cn7.js +13 -0
  190. package/dist/es-ES-BI_jdT67.js +68 -0
  191. package/dist/es-ES-BOoPqnPI.js +32 -0
  192. package/dist/{es-ES-Bsoco8Fj.js → es-ES-BhNhIf08.js} +5 -1
  193. package/dist/{es-ES-DKCCgVF8.js → es-ES-Bn9_0wK0.js} +24 -4
  194. package/dist/es-ES-CXDJLKAI.js +27 -0
  195. package/dist/es-ES-DF_L5EDd.js +24 -0
  196. package/dist/es-ES-DNGEW6V_.js +13 -0
  197. package/dist/es-ES-DdGmXdxO.js +13 -0
  198. package/dist/es-ES-Qnc0Q6JH.js +57 -0
  199. package/dist/es-ES-ShWaSuJd.js +13 -0
  200. package/dist/es-ES-esfwvKwz.js +30 -0
  201. package/dist/es-ES-yMXcOjDL.js +13 -0
  202. package/dist/{external-link-BjladU3E.js → external-link-DCMYUMfW.js} +2 -2
  203. package/dist/fi-FI-CIYa9SyS.js +13 -0
  204. package/dist/fi-FI-ChApf7lf.js +13 -0
  205. package/dist/fi-FI-CjB6QC01.js +30 -0
  206. package/dist/fi-FI-CoI_94Fv.js +13 -0
  207. package/dist/fi-FI-DH6jpo9K.js +24 -0
  208. package/dist/fi-FI-Dn2MC8uW.js +57 -0
  209. package/dist/{fi-FI-Hhku9Lmc.js → fi-FI-PVFqd5Ra.js} +24 -4
  210. package/dist/fi-FI-REMsyTSr.js +13 -0
  211. package/dist/fi-FI-bZzNB1WB.js +32 -0
  212. package/dist/fi-FI-fArobrt5.js +27 -0
  213. package/dist/fi-FI-hwzizPnr.js +68 -0
  214. package/dist/fi-FI-xqnQ38yC.js +13 -0
  215. package/dist/{fi-FI-ClnsYt3L.js → fi-FI-ysUrBilO.js} +5 -1
  216. package/dist/{fr-FR-CJI0bIig.js → fr-FR-BSvSKazD.js} +5 -1
  217. package/dist/fr-FR-BSynpexF.js +13 -0
  218. package/dist/fr-FR-BWX14yb7.js +57 -0
  219. package/dist/fr-FR-BnblnBsx.js +24 -0
  220. package/dist/fr-FR-Br7OeDIe.js +13 -0
  221. package/dist/fr-FR-C1XqLftn.js +30 -0
  222. package/dist/fr-FR-CYZXbwc9.js +68 -0
  223. package/dist/fr-FR-CiwkAb3E.js +27 -0
  224. package/dist/fr-FR-CvHWmim-.js +13 -0
  225. package/dist/fr-FR-Q3urMjbl.js +13 -0
  226. package/dist/fr-FR-cTKcuHqX.js +32 -0
  227. package/dist/fr-FR-l5z31r7i.js +13 -0
  228. package/dist/{fr-FR-BYuKsZIb.js → fr-FR-mJK4hjwD.js} +24 -4
  229. package/dist/getFieldsWithExistingData-DxCFyXNd.js +22 -0
  230. package/dist/{getName-BsaU8Hqr.js → getName-BS-pHwl0.js} +2 -2
  231. package/dist/gift-CQ_DEma7.js +14 -0
  232. package/dist/{graph-DwYwlplw.js → graph-BJmqglH2.js} +3 -3
  233. package/dist/{graph-up-DpbCSPbc.js → graph-up-Bq6adtlX.js} +6 -6
  234. package/dist/{hasDataChanged-CA7cMLCV.js → hasDataChanged-CWdnpJrE.js} +2 -2
  235. package/dist/headquarter-DNYyuuFq.js +21 -0
  236. package/dist/{hotel-JX0bjsSA.js → hotel-BuNql78Z.js} +3 -3
  237. package/dist/{iframeWidget-BPBJSJJt.js → iframeWidget-Uz4rHS0r.js} +4 -4
  238. package/dist/image-BSihO8lR.js +17 -0
  239. package/dist/info-filled-SQotHmT9.js +17 -0
  240. package/dist/info-vHTZWoJ7.js +21 -0
  241. package/dist/it-IT-B0YGvVgW.js +57 -0
  242. package/dist/it-IT-BAvmkEF8.js +13 -0
  243. package/dist/it-IT-BAvsF2TB.js +13 -0
  244. package/dist/{it-IT-Nl57jui-.js → it-IT-BTWkWSJq.js} +24 -4
  245. package/dist/it-IT-BeX7-OcD.js +13 -0
  246. package/dist/it-IT-C_651bEP.js +13 -0
  247. package/dist/it-IT-C_YDqVNT.js +30 -0
  248. package/dist/it-IT-Ckv8Ce4e.js +24 -0
  249. package/dist/it-IT-DERflsUd.js +32 -0
  250. package/dist/it-IT-DIbH-udG.js +27 -0
  251. package/dist/it-IT-Erh1DIlj.js +68 -0
  252. package/dist/{it-IT-BeC2Y1F8.js → it-IT-Qfzc8jnW.js} +5 -1
  253. package/dist/it-IT-vdMlF0Ha.js +13 -0
  254. package/dist/{localizeDateString-cCOzCBvl.js → localizeDateString-DgSdo3D5.js} +2 -2
  255. package/dist/location-Q4oKvnkl.js +17 -0
  256. package/dist/mail-BOdyoVqB.js +14 -0
  257. package/dist/mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js +56 -0
  258. package/dist/{mapExistingFile-B1UL2lZR.js → mapExistingFile-CqrlnmFQ.js} +5 -80
  259. package/dist/mapFinancialReportsToFinancialInformation-ZmhVRj3f.js +67 -0
  260. package/dist/mapJpAddressSchemaToAddressLocalizations-D6HjhjJT.js +63 -0
  261. package/dist/mapLegalEntityToIndividualOnfidoSchema-COcit7Hx.js +146 -0
  262. package/dist/{mapTransferInstrumentToPayoutAccount-BdPUh-FT.js → mapTransferInstrumentToPayoutAccount-DfJHF9H8.js} +6 -3
  263. package/dist/{minus-circle-filled-BGKeHaxJ.js → minus-circle-filled-kC2IUvKz.js} +3 -3
  264. package/dist/nl-NL-BMUYBqlF.js +57 -0
  265. package/dist/nl-NL-BwKrj-29.js +13 -0
  266. package/dist/nl-NL-Bx5p0nXL.js +24 -0
  267. package/dist/nl-NL-C3YJkSIj.js +13 -0
  268. package/dist/nl-NL-CM5U8ODq.js +13 -0
  269. package/dist/{nl-NL-BHkRnVrj.js → nl-NL-CTf7zH4M.js} +24 -4
  270. package/dist/nl-NL-Cjlmc0Ii.js +32 -0
  271. package/dist/{nl-NL-Cysslsh2.js → nl-NL-D7gBNWEY.js} +5 -1
  272. package/dist/nl-NL-DV4NqPVW.js +13 -0
  273. package/dist/nl-NL-DyeSX0PH.js +30 -0
  274. package/dist/nl-NL-JChnFdCY.js +13 -0
  275. package/dist/nl-NL-NlkjOSYi.js +27 -0
  276. package/dist/nl-NL-O9GCHMDA.js +68 -0
  277. package/dist/no-NO--OoWld_l.js +13 -0
  278. package/dist/no-NO-B6OPS2CA.js +13 -0
  279. package/dist/no-NO-B9618F4_.js +13 -0
  280. package/dist/no-NO-BQL_M1pn.js +13 -0
  281. package/dist/no-NO-Bs3-6MDM.js +24 -0
  282. package/dist/{no-NO-zSnPtrDi.js → no-NO-C-gCYc9q.js} +5 -1
  283. package/dist/no-NO-CA1aR6Wh.js +68 -0
  284. package/dist/no-NO-CY_XHrYd.js +32 -0
  285. package/dist/no-NO-Crlsj6HG.js +27 -0
  286. package/dist/no-NO-D4BECLky.js +130 -0
  287. package/dist/no-NO-DKbWxgF-.js +57 -0
  288. package/dist/no-NO-DPRsAb_o.js +30 -0
  289. package/dist/{no-NO-kaAdT9B8.js → no-NO-RfTK9KAV.js} +24 -4
  290. package/dist/{options-horizontal-nJ9-ButA.js → options-horizontal-CBmbNv7R.js} +4 -4
  291. package/dist/partner-CPjsrePY.js +18 -0
  292. package/dist/pay-by-link-plane-BVZndh67.js +22 -0
  293. package/dist/{payout-iEmHhgQ4.js → payout-ChUEoLjt.js} +6 -6
  294. package/dist/payout-verification-instant-5u-wvFKv.js +41 -0
  295. package/dist/payout-verification-manual-BH2mu0UW.js +90 -0
  296. package/dist/person-DGjUU4S4.js +17 -0
  297. package/dist/{plus-CwLva7fq.js → plus-CWXA5wdX.js} +2 -2
  298. package/dist/plus-circle-filled-CbC0u2Y1.js +17 -0
  299. package/dist/process-field-configurations-N1jHgPa8.js +324 -0
  300. package/dist/pt-BR--kaJvtE6.js +57 -0
  301. package/dist/pt-BR-AZ3roErF.js +13 -0
  302. package/dist/pt-BR-BKQRvAfq.js +13 -0
  303. package/dist/pt-BR-BbFJsIVX.js +55 -0
  304. package/dist/pt-BR-BfxgHKY4.js +27 -0
  305. package/dist/pt-BR-C-C4ZJ9x.js +30 -0
  306. package/dist/pt-BR-C0I_kTQ6.js +13 -0
  307. package/dist/pt-BR-CBAe0SnK.js +32 -0
  308. package/dist/pt-BR-DSENwwGu.js +24 -0
  309. package/dist/pt-BR-NtLaWlnZ.js +68 -0
  310. package/dist/pt-BR-gh27BC86.js +13 -0
  311. package/dist/pt-BR-nU_2Wbo5.js +54 -0
  312. package/dist/pt-BR-ur86nRrK.js +37 -0
  313. package/dist/pt-BR-zuqB_CBf.js +13 -0
  314. package/dist/{pt-PT-Xm-pm3mb.js → pt-PT-B4F_5NWi.js} +24 -4
  315. package/dist/pt-PT-BZ5ZZm6G.js +57 -0
  316. package/dist/pt-PT-Bf4IV7wp.js +13 -0
  317. package/dist/pt-PT-CFY1O_K0.js +13 -0
  318. package/dist/pt-PT-CIo3mlXL.js +24 -0
  319. package/dist/{pt-PT-CjsyP_OK.js → pt-PT-CVNEcs32.js} +5 -1
  320. package/dist/pt-PT-D2Xe-OdG.js +13 -0
  321. package/dist/pt-PT-DSxxVA0f.js +68 -0
  322. package/dist/pt-PT-DVKtHjIY.js +13 -0
  323. package/dist/pt-PT-DYihdcJx.js +13 -0
  324. package/dist/pt-PT-Dm5DRDrd.js +32 -0
  325. package/dist/pt-PT-LbneTcRx.js +30 -0
  326. package/dist/pt-PT-TKg5FLat.js +27 -0
  327. package/dist/recurring-CkL4cCM2.js +17 -0
  328. package/dist/{reporting-DlRoibD7.js → reporting-DerosUNm.js} +1 -2
  329. package/dist/resolveEnvironment-DZ77JxLV.js +164 -0
  330. package/dist/revenue-accelerate-Dp4Ns_5c.js +17 -0
  331. package/dist/{rules-CkD4bHtQ.js → rules-_v8BprU3.js} +14 -8
  332. package/dist/save-Fgy7EDid.js +14 -0
  333. package/dist/search-C4GZ-Rc1.js +17 -0
  334. package/dist/{show-uL6I-rMo.js → show-yPjPmEf8.js} +3 -3
  335. package/dist/sl-SI-59OQIZ3f.js +13 -0
  336. package/dist/sl-SI-8SzKx7XD.js +30 -0
  337. package/dist/sl-SI-C-C-KJCX.js +27 -0
  338. package/dist/sl-SI-C0wSbuau.js +13 -0
  339. package/dist/{sl-SI-Br0UEUPL.js → sl-SI-CUCrzJQv.js} +5 -1
  340. package/dist/sl-SI-DdjgSySI.js +13 -0
  341. package/dist/sl-SI-DtdGMD6i.js +57 -0
  342. package/dist/{solution-payments-DTAuLSWF.js → solution-payments-CNAat9h7.js} +2 -2
  343. package/dist/store-IuAkDRAp.js +14 -0
  344. package/dist/style.css +2911 -2181
  345. package/dist/styles-CLV89_hH.js +2911 -2181
  346. package/dist/sv-SE-B7cpKp1l.js +30 -0
  347. package/dist/sv-SE-BHfydid5.js +27 -0
  348. package/dist/sv-SE-BHkYspm-.js +130 -0
  349. package/dist/{sv-SE-BtXmvxx4.js → sv-SE-C6uPh9g5.js} +5 -1
  350. package/dist/sv-SE-CQWBP7n1.js +13 -0
  351. package/dist/sv-SE-CRBRuE8Z.js +32 -0
  352. package/dist/sv-SE-CXaMlJCI.js +24 -0
  353. package/dist/{sv-SE-B3zoXMuH.js → sv-SE-DGpvVvWj.js} +24 -4
  354. package/dist/sv-SE-DsPdegWB.js +13 -0
  355. package/dist/sv-SE-DtKjf4Go.js +13 -0
  356. package/dist/sv-SE-K1QT1cOt.js +68 -0
  357. package/dist/sv-SE-kR514dO1.js +57 -0
  358. package/dist/sv-SE-zTiw1bUU.js +13 -0
  359. package/dist/terminal-1-_me9J9h0.js +18 -0
  360. package/dist/trackNavigation-db_h46BT.js +28 -0
  361. package/dist/types/api/address/useAddressCleanse.d.ts +6 -2
  362. package/dist/types/api/address/useRetrieveAddress.d.ts +3 -1
  363. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +18 -0
  364. package/dist/types/api/businessLines/businessLines.types.d.ts +21 -0
  365. package/dist/types/api/businessLines/useBusinessLines.d.ts +4 -2
  366. package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +7 -0
  367. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +5 -0
  368. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +7 -0
  369. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +1 -0
  370. package/dist/types/api/companySearch/useCompanySearch.d.ts +1 -0
  371. package/dist/types/api/companySelection/useCompanySelection.d.ts +2 -18
  372. package/dist/types/api/configurations/useScenarios.d.ts +12 -12
  373. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +15 -0
  374. package/dist/types/api/industryCodes/industryCodes.types.d.ts +2 -1
  375. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +3 -3
  376. package/dist/types/api/legalEntity/useLegalEntity.d.ts +16 -16
  377. package/dist/types/api/{pciTemplate/pciTemplate.types.d.ts → pci/pci.types.d.ts} +9 -1
  378. package/dist/types/api/{pciTemplate → pci}/usePciQuestionnaire.d.ts +1 -1
  379. package/dist/types/api/{pciTemplate → pci}/usePciQuestionnaireList.d.ts +1 -1
  380. package/dist/types/api/{pciTemplate → pci}/usePciStatus.d.ts +1 -1
  381. package/dist/types/api/pci/usePciTemplate.d.ts +8 -0
  382. package/dist/types/api/queryKeys.d.ts +5 -4
  383. package/dist/types/components/BankAccount/fields/BankAccountFormat/types.d.ts +2 -1
  384. package/dist/types/components/BankAccount/fields/PreferredCurrency/PreferredCurrency.d.ts +10 -0
  385. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +5 -0
  386. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirementsModal.d.ts +6 -0
  387. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +2 -2
  388. package/dist/types/components/BankAccount/forms/BankDocument/validate.d.ts +3 -0
  389. package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +1 -1
  390. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +7 -0
  391. package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +3 -0
  392. package/dist/types/components/BankAccount/forms/PayoutAccount/payoutAccountFormat.d.ts +1 -1
  393. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +2 -0
  394. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.d.ts +3 -0
  395. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutRequirementsModal.d.ts +8 -0
  396. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +13 -0
  397. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +6 -1
  398. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
  399. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
  400. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/PayoutVerificationMethod.d.ts +1 -2
  401. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +5 -5
  402. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +2 -0
  403. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -2
  404. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +2 -1
  405. package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
  406. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1052 -642
  407. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -1
  408. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -0
  409. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +1 -1
  410. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +3 -3
  411. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +5 -4
  412. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +1 -2
  413. package/dist/types/components/Business/forms/AdditionalInformation/{VerifiedBusinessCard.d.ts → VerifiedBusinessCard/VerifiedBusinessCard.d.ts} +2 -3
  414. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +6 -7
  415. package/dist/types/components/Business/forms/BasicInformation/BasicInformation.d.ts +1 -4
  416. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +5 -18
  417. package/dist/types/components/Business/{tasks/BusinessDetailsMultiformDropin → forms/BusinessDetails}/BusinessDetailsMultiform.d.ts +2 -1
  418. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +0 -35
  419. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +0 -21
  420. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +0 -1
  421. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +13 -3
  422. package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +0 -11
  423. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +3 -3
  424. package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +0 -6
  425. package/dist/types/components/Business/forms/ProofOfDirectorDocument/ProofOfDirectorDocument.d.ts +1 -1
  426. package/dist/types/components/Business/forms/ProofOfDirectorDocument/types.d.ts +0 -3
  427. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/ProofOfOwnershipDocument.d.ts +1 -1
  428. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +0 -3
  429. package/dist/types/components/Business/forms/ProofOfSignatoryDocument/ProofOfSignatoryDocument.d.ts +1 -1
  430. package/dist/types/components/Business/forms/ProofOfSignatoryDocument/types.d.ts +0 -3
  431. package/dist/types/components/Business/forms/RegistrationDocument/RegistrationDocument.d.ts +1 -1
  432. package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +3 -5
  433. package/dist/types/components/Business/forms/TaxDocument/TaxDocument.d.ts +1 -1
  434. package/dist/types/components/Business/forms/TaxDocument/types.d.ts +3 -5
  435. package/dist/types/components/Business/forms/forms.types.d.ts +0 -3
  436. package/dist/types/components/Business/forms/rules.d.ts +3 -1
  437. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -2
  438. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -1
  439. package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +3 -3
  440. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +5 -4
  441. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +16 -10
  442. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +26 -5
  443. package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +5 -0
  444. package/dist/types/components/Business/utils/companyTypeMetadata.d.ts +3 -3
  445. package/dist/types/components/Business/utils/requestingCapabilities.d.ts +3 -0
  446. package/dist/types/components/BusinessLines/constants.d.ts +31 -0
  447. package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +30 -0
  448. package/dist/types/components/BusinessLines/fields/SalesChannels/SalesChannels.d.ts +2 -0
  449. package/dist/types/components/BusinessLines/fields/SalesChannels/types.d.ts +6 -0
  450. package/dist/types/components/BusinessLines/fields/SctaField/SctaField.d.ts +2 -0
  451. package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +6 -0
  452. package/dist/types/components/BusinessLines/fields/WebDataField/WebDataField.d.ts +2 -0
  453. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +6 -0
  454. package/dist/types/components/BusinessLines/forms/IndustryCodesForm/IndustryCodesForm.d.ts +2 -0
  455. package/dist/types/components/BusinessLines/forms/IndustryCodesForm/types.d.ts +2 -0
  456. package/dist/types/components/BusinessLines/forms/SalesChannelsForm/SalesChannelsForm.d.ts +2 -0
  457. package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +3 -0
  458. package/dist/types/components/BusinessLines/forms/SctaForm/SctaForm.d.ts +2 -0
  459. package/dist/types/components/BusinessLines/forms/SctaForm/SctaInfoModal.d.ts +3 -0
  460. package/dist/types/components/BusinessLines/forms/SctaForm/types.d.ts +2 -0
  461. package/dist/types/components/BusinessLines/forms/rules.d.ts +6 -0
  462. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +6 -0
  463. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLines.d.ts +9 -0
  464. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +2 -0
  465. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesStore.d.ts +3 -0
  466. package/dist/types/components/BusinessLines/tasks/BusinessLines/ExistingBusinessLines/ExistingBusinessLines.d.ts +8 -0
  467. package/dist/types/components/BusinessLines/tasks/types.d.ts +19 -0
  468. package/dist/types/components/BusinessLines/tasks/utils.d.ts +40 -0
  469. package/dist/types/components/BusinessLines/tasks/validate.d.ts +11 -0
  470. package/dist/types/components/Contract/hooks/useSalesChannels.d.ts +2 -0
  471. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +1 -1
  472. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +2 -2
  473. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +1328 -758
  474. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +0 -1
  475. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +0 -1
  476. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
  477. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +0 -1
  478. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +0 -1
  479. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +7 -5
  480. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsType.d.ts +3 -0
  481. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/sofStore.d.ts +1 -1
  482. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +14 -13
  483. package/dist/types/components/EFP/tasks/TaxReportingDropin/taxClassificationStore.d.ts +1 -1
  484. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +6 -6
  485. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/BusinessFinancingComponent.d.ts +1 -1
  486. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +3 -3
  487. package/dist/types/components/EmbeddedDropins/SignPCIComponent/SignPCIComponent.d.ts +3 -1
  488. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/content.d.ts +3 -3
  489. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +3 -0
  490. package/dist/types/components/Individual/forms/Individual/IdVerification/idVerificationProviderId.d.ts +1 -1
  491. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +3 -3
  492. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +2 -0
  493. package/dist/types/components/Individual/forms/Individual/rules.d.ts +1 -1
  494. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +2 -1
  495. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +3 -3
  496. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +2 -2
  497. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +4 -1
  498. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +3 -1
  499. package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
  500. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -8
  501. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -6
  502. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.d.ts +1 -1
  503. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +2 -0
  504. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +57 -0
  505. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/RemediationAlerts.d.ts +7 -0
  506. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +19 -0
  507. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +0 -2
  508. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +3 -0
  509. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +1 -1
  510. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +1 -1
  511. package/dist/types/components/Shared/EntityAssociation/types.d.ts +2 -4
  512. package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
  513. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +0 -2
  514. package/dist/types/components/Shared/FormNavigation/FormNavigation.d.ts +1 -1
  515. package/dist/types/components/Shared/FormNavigation/types.d.ts +0 -2
  516. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +1 -3
  517. package/dist/types/components/Shared/Introduction/copy.d.ts +2 -2
  518. package/dist/types/components/Shared/Summary/Summary.d.ts +1 -1
  519. package/dist/types/components/Shared/Summary/types.d.ts +1 -2
  520. package/dist/types/components/Shared/TaskVerificationStatus/TaskVerificationStatus.d.ts +18 -0
  521. package/dist/types/components/Shared/devex/DebugListener/DebugFormData.d.ts +1 -0
  522. package/dist/types/components/Shared/devex/DebugListener/debugStore.d.ts +5 -0
  523. package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +1 -1
  524. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +1 -0
  525. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +4 -0
  526. package/dist/types/components/Shared/fields/IndustryCodeField/fieldConfig.d.ts +3 -0
  527. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +22 -0
  528. package/dist/types/components/Shared/fields/IndustryCodeField/validate.d.ts +3 -0
  529. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -4
  530. package/dist/types/components/Shared/forms/Address/localized/jp/JpAddress.d.ts +7 -0
  531. package/dist/types/components/Shared/forms/Address/localized/jp/ReadonlyTextField.d.ts +7 -0
  532. package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +5 -0
  533. package/dist/types/components/Shared/forms/Address/localized/jp/mapAddressLocalizationToJpAddressSchema.d.ts +3 -0
  534. package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSchemaToAddressLocalizations.d.ts +3 -0
  535. package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +4 -0
  536. package/dist/types/components/Shared/forms/Address/utils.d.ts +3 -2
  537. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -2
  538. package/dist/types/components/Shared/forms/RegistrationAddress/RegistrationAddressMultiform.d.ts +3 -0
  539. package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +3 -2
  540. package/dist/types/components/Shared/tasks/CustomerSupport/mapping/customerSupportKeyMapping.d.ts +4 -0
  541. package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +3 -1
  542. package/dist/types/components/Shared/tasks/TaskList/TaskListItem.d.ts +1 -1
  543. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +4 -12
  544. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -1
  545. package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +1 -2
  546. package/dist/types/components/Trust/forms/TrustRegistrationDetails/TrustRegistrationDetailsMultiform.d.ts +2 -0
  547. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -16
  548. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +1 -2
  549. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +2 -2
  550. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +21 -0
  551. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +2 -0
  552. package/dist/types/components/Trust/tasks/TrustDropin/validate.d.ts +5 -0
  553. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +1 -2
  554. package/dist/types/components/ui/atoms/Header/Header.d.ts +12 -0
  555. package/dist/types/components/ui/atoms/Link/Link.types.d.ts +1 -1
  556. package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +1 -2
  557. package/dist/types/components/ui/atoms/Loader/Loader.d.ts +1 -5
  558. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  559. package/dist/types/components/ui/atoms/RadioCard/RadioCard.d.ts +1 -0
  560. package/dist/types/components/ui/atoms/RadioGroup/RadioGroup.d.ts +1 -1
  561. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.d.ts +4 -4
  562. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +8 -9
  563. package/dist/types/components/ui/atoms/Status/Status.d.ts +9 -3
  564. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +10 -0
  565. package/dist/types/components/ui/atoms/TileGroup/TileGroup.d.ts +3 -1
  566. package/dist/types/components/ui/atoms/Typography/Typography.types.d.ts +1 -1
  567. package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +29 -7
  568. package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -1
  569. package/dist/types/components/ui/molecules/Card/types.d.ts +1 -0
  570. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +1 -2
  571. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -1
  572. package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -0
  573. package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +2 -23
  574. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +3 -3
  575. package/dist/types/components/ui/molecules/EmbeddedStatus/types.d.ts +23 -0
  576. package/dist/types/context/ExperimentContext/types.d.ts +24 -23
  577. package/dist/types/context/I18nProvider/I18nContext.d.ts +3 -0
  578. package/dist/types/context/SettingsContext/SettingsProvider.d.ts +1 -1
  579. package/dist/types/context/SettingsContext/types.d.ts +3 -0
  580. package/dist/types/context/StateContext/types.d.ts +2 -1
  581. package/dist/types/core/errorMapping.d.ts +4 -1
  582. package/dist/types/core/models/api/address.d.ts +5 -0
  583. package/dist/types/core/models/api/capability.d.ts +20 -0
  584. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  585. package/dist/types/core/models/api/source-of-funds.d.ts +5 -0
  586. package/dist/types/core/models/api/transfer-instrument.d.ts +2 -0
  587. package/dist/types/core/process-field-configurations.d.ts +4 -1
  588. package/dist/types/core/user-events.d.ts +22 -11
  589. package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +1 -0
  590. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +1 -0
  591. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +2 -0
  592. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +2 -6
  593. package/dist/types/hooks/{useAnalytics.d.ts → useAnalytics/useAnalytics.d.ts} +1 -7
  594. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +6 -8
  595. package/dist/types/hooks/useUboQuestionnaire.d.ts +25 -0
  596. package/dist/types/language/Language.d.ts +10 -0
  597. package/dist/types/language/types.d.ts +21 -7
  598. package/dist/types/language/utils.d.ts +2 -2
  599. package/dist/types/stores/formState.d.ts +2 -0
  600. package/dist/types/stores/globalStore/taskTypes.d.ts +1 -1
  601. package/dist/types/types/datasets/currency.d.ts +0 -1
  602. package/dist/types/types/form-rules.d.ts +3 -0
  603. package/dist/types/types/form.d.ts +0 -2
  604. package/dist/types/utils/addLinkedFields.d.ts +26 -2
  605. package/dist/types/utils/analytics/convertToEmbeddedEvent.d.ts +9 -0
  606. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +30 -0
  607. package/dist/types/utils/analytics/getAnalyticsAssociatedEntityDetails.d.ts +13 -0
  608. package/dist/types/utils/{trackNavigation.d.ts → analytics/trackNavigation.d.ts} +1 -1
  609. package/dist/types/utils/api/documentUtils.d.ts +1 -0
  610. package/dist/types/utils/customerSupportUtils.d.ts +3 -0
  611. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  612. package/dist/types/utils/filterProblemsByTaskForms.d.ts +12 -0
  613. package/dist/types/utils/getName.d.ts +1 -1
  614. package/dist/types/utils/getSSNType.d.ts +1 -0
  615. package/dist/types/utils/getTrustedFields.d.ts +9 -0
  616. package/dist/types/utils/japanSupportUtils.d.ts +2 -0
  617. package/dist/types/utils/textTransformation/toFullWidth.d.ts +6 -0
  618. package/dist/types/utils/translation.d.ts +3 -2
  619. package/dist/types/utils/validatorUtils.d.ts +1 -0
  620. package/dist/types-BnnF5_7m.js +34 -0
  621. package/dist/{types-BZdZSp82.js → types-D0u3f6aG.js} +27 -4
  622. package/dist/{types-CAznNNSI.js → types-Dk94b8kx.js} +27 -26
  623. package/dist/{types-CX7rD7X4.js → types-sYQKhaSL.js} +2 -2
  624. package/dist/upload-BF65P4KM.js +17 -0
  625. package/dist/{useAssociatedLegalEntity-DD2ldSE1.js → useAssociatedLegalEntity-00JVCmQ7.js} +2 -2
  626. package/dist/useCreateLegalEntity-BvvwB9r0.js +31 -0
  627. package/dist/{useDataset-B8uRm9G9.js → useDataset-8WyOJBhU.js} +102 -2
  628. package/dist/{useForm-Bikkn7wR.js → useForm-DLxHtZTP.js} +16 -86
  629. package/dist/useGlobalData-D9dz7GIi.js +68 -0
  630. package/dist/{useMultiForm-BvLkXMC6.js → useMultiForm--sSlt50X.js} +4 -4
  631. package/dist/{useOnboardingStatus-CHvOF6oX.js → useOnboardingStatus-91zhqzLd.js} +2 -2
  632. package/dist/{useScenarios-uUD1GHMT.js → useScenarios-CqKpYbe_.js} +2 -2
  633. package/dist/{useTermsOfServiceStatus-_0VSQK9K.js → useTermsOfServiceStatus-DLQVpbik.js} +2 -2
  634. package/dist/{useToastContext-kLS15CCB.js → useToastContext-FI3dwzzs.js} +17 -8
  635. package/dist/{useUnincorporatedPartnershipMembers-pxytkrwW.js → useUnincorporatedPartnershipMembers-CdQDPlZq.js} +5 -5
  636. package/dist/useUpdateBusinessLines-BulhyPjH.js +46 -0
  637. package/dist/useUpdateLegalEntity-Q3Icdeo6.js +39 -0
  638. package/dist/utils-DQLhii3U.js +774 -0
  639. package/dist/{utils-BI6oHlaw.js → utils-DV0_GilJ.js} +6 -46
  640. package/dist/{validate-DGgXfXyg.js → validate-BD3wn-YX.js} +2 -2
  641. package/dist/validate-H-iE__-w.js +41 -0
  642. package/dist/{validationError-CpKFQv28.js → validationError-B5aoMbe_.js} +2 -2
  643. package/dist/warning-circle-fill-CEN1WL7A.js +17 -0
  644. package/dist/warning-diamond-filled-BfXMlVrG.js +17 -0
  645. package/dist/webinar-DqjqrNEv.js +22 -0
  646. package/package.json +77 -78
  647. package/dist/4-people-CCqdlDEw.js +0 -24
  648. package/dist/BusinessDetailsDropin-Be1nkzWx.js +0 -5088
  649. package/dist/BusinessFinancingComponent-BiFxtiME.js +0 -45
  650. package/dist/BusinessFinancingPage-C_3W8tC9.js +0 -40
  651. package/dist/Card-D0gduObT.js +0 -145
  652. package/dist/Confirm-DyWhqxmU.js +0 -64
  653. package/dist/CreateIndividualComponent-9-TP2x1D.js +0 -72
  654. package/dist/CreateTransferInstrumentComponent-U_HRSoZx.js +0 -67
  655. package/dist/DecisionMakerDetailsPage-vWtfPycT.js +0 -100
  656. package/dist/DecisionMakers-2aN_F-vt.js +0 -591
  657. package/dist/Dropzone-Cp2PTdED.js +0 -218
  658. package/dist/FormFlow-C95V54gu.js +0 -216
  659. package/dist/InputDate-DX90XEmr.js +0 -43
  660. package/dist/InputGroup-WBfGDV5F.js +0 -32
  661. package/dist/Link-Bn9pt52z.js +0 -35
  662. package/dist/ManageIndividualComponent-C5Epqe2I.js +0 -47
  663. package/dist/ManageTermsOfServiceComponent-zcuZm98f.js +0 -47
  664. package/dist/OnboardingDropinComponent-BgFPF-FG.js +0 -4301
  665. package/dist/RadioGroup-htJh3Lz5.js +0 -143
  666. package/dist/RegistrationAddress-DiVxWv-x.js +0 -2334
  667. package/dist/RootBusinessDetailsPage-DNGDa-xd.js +0 -1870
  668. package/dist/RootIndividualDetailsPage-DyWuruIM.js +0 -77
  669. package/dist/SoleProprietorshipPage-CYz0fHew.js +0 -50
  670. package/dist/Spacer-BK3jDget.js +0 -18
  671. package/dist/StructuredList-DaepaiVE.js +0 -38
  672. package/dist/TaskItemStatus-lQuiqU1e.js +0 -125
  673. package/dist/TaskStatusIndicator-8ug09mhu.js +0 -69
  674. package/dist/TaxInformationField-BfyN5nzh.js +0 -3062
  675. package/dist/TileGroup-CTesI0Vt.js +0 -174
  676. package/dist/TrustDetailsPage-CjG99ca_.js +0 -1205
  677. package/dist/TrustMemberCompanyPage-CiA3B0Ro.js +0 -60
  678. package/dist/TrustMemberIndividualPage-J1-6IFlZ.js +0 -66
  679. package/dist/analytics-Cg99WKif.js +0 -61
  680. package/dist/bafinUtils-Sy6B6Lec.js +0 -457
  681. package/dist/bin-Bgdj6KzC.js +0 -18
  682. package/dist/capital-CF9_Ev99.js +0 -17
  683. package/dist/checkmark-circle-fill-BhvuqTl9.js +0 -17
  684. package/dist/circle-Dgfa7GUy.js +0 -17
  685. package/dist/coins-CFu331p2.js +0 -17
  686. package/dist/commonValidators-cnXbus2a.js +0 -24
  687. package/dist/currency-BGwQyxBo.js +0 -36
  688. package/dist/da-DK-BJ7aTPir.js +0 -13
  689. package/dist/da-DK-BTpZzEgA.js +0 -15
  690. package/dist/da-DK-CeNMXUfE.js +0 -23
  691. package/dist/da-DK-D0N1TVVU.js +0 -58
  692. package/dist/da-DK-D4H69PX3.js +0 -30
  693. package/dist/da-DK-DStNe471.js +0 -22
  694. package/dist/da-DK-q2b_1elr.js +0 -35
  695. package/dist/de-DE-C78RLE2G.js +0 -13
  696. package/dist/de-DE-CGoBPCPv.js +0 -22
  697. package/dist/de-DE-D2ByeIZs.js +0 -35
  698. package/dist/de-DE-DjOUNvp6.js +0 -15
  699. package/dist/de-DE-Dtuu-nE7.js +0 -58
  700. package/dist/de-DE-JI-7mvxy.js +0 -23
  701. package/dist/de-DE-wp5-H-ov.js +0 -30
  702. package/dist/document-person-DBlLin9u.js +0 -20
  703. package/dist/download-B8_c4ARV.js +0 -17
  704. package/dist/edit-1-D6f6zk9p.js +0 -14
  705. package/dist/en-US-546hB2Wn.js +0 -60
  706. package/dist/en-US-BQpgt41j.js +0 -37
  707. package/dist/en-US-BTYdAWXp.js +0 -15
  708. package/dist/en-US-CAm3meB1.js +0 -30
  709. package/dist/en-US-CQ3angjM.js +0 -22
  710. package/dist/en-US-DHq7VYFs.js +0 -23
  711. package/dist/es-ES-BsQpwaPN.js +0 -58
  712. package/dist/es-ES-BtUSEzkE.js +0 -13
  713. package/dist/es-ES-CKMfS8Yy.js +0 -22
  714. package/dist/es-ES-Cj7q7fWO.js +0 -15
  715. package/dist/es-ES-DOVPTeyf.js +0 -23
  716. package/dist/es-ES-Ds3-DtqZ.js +0 -30
  717. package/dist/es-ES-WWftn3JX.js +0 -35
  718. package/dist/fi-FI-BJ9RzrL3.js +0 -58
  719. package/dist/fi-FI-BNcnKrJ9.js +0 -15
  720. package/dist/fi-FI-Cvar63RH.js +0 -13
  721. package/dist/fi-FI-D522KHGk.js +0 -23
  722. package/dist/fi-FI-D9E_KaJi.js +0 -35
  723. package/dist/fi-FI-DPNeTsJS.js +0 -30
  724. package/dist/fi-FI-REYOX46I.js +0 -22
  725. package/dist/fieldConfigurations-kDKvJ6je.js +0 -458
  726. package/dist/formatCurrency-CMOSdJMB.js +0 -29
  727. package/dist/fr-FR-B5543Fe-.js +0 -13
  728. package/dist/fr-FR-Bn3D6mmY.js +0 -15
  729. package/dist/fr-FR-CNR5-s9g.js +0 -58
  730. package/dist/fr-FR-ChmNQciP.js +0 -30
  731. package/dist/fr-FR-Cv0k-3Xc.js +0 -35
  732. package/dist/fr-FR-D9qaP6nx.js +0 -22
  733. package/dist/fr-FR-DInQKkTd.js +0 -23
  734. package/dist/gift-SdNY6AqI.js +0 -14
  735. package/dist/headquarter-C6AsewcP.js +0 -21
  736. package/dist/image-eUqBiRX_.js +0 -17
  737. package/dist/info-Wao3PEQK.js +0 -21
  738. package/dist/isEmpty-C9y5I8Tl.js +0 -23
  739. package/dist/it-IT-BV9K87FK.js +0 -58
  740. package/dist/it-IT-Biduphjt.js +0 -22
  741. package/dist/it-IT-C_fNHhjE.js +0 -35
  742. package/dist/it-IT-CjEYONJg.js +0 -23
  743. package/dist/it-IT-Dd6xGSe-.js +0 -13
  744. package/dist/it-IT-DvM-9LpM.js +0 -15
  745. package/dist/it-IT-eCrTB65E.js +0 -30
  746. package/dist/keys-BpNgnAsD.js +0 -23
  747. package/dist/location-YXhcBMDy.js +0 -17
  748. package/dist/mail-Z_IE_hkw.js +0 -14
  749. package/dist/mapScriptLocalization-B4Be11Tx.js +0 -72
  750. package/dist/nl-NL-BHqiO21q.js +0 -15
  751. package/dist/nl-NL-D2QKudfh.js +0 -30
  752. package/dist/nl-NL-DLedC3mO.js +0 -35
  753. package/dist/nl-NL-DVENFpd5.js +0 -13
  754. package/dist/nl-NL-DywVQ9km.js +0 -58
  755. package/dist/nl-NL-G1wVnmzT.js +0 -22
  756. package/dist/nl-NL-Zcq0bXd-.js +0 -23
  757. package/dist/no-NO-B8oxqfNI.js +0 -58
  758. package/dist/no-NO-BTtAuqCb.js +0 -22
  759. package/dist/no-NO-BxReX6oF.js +0 -23
  760. package/dist/no-NO-CKT9kLAH.js +0 -15
  761. package/dist/no-NO-C_snYWBc.js +0 -30
  762. package/dist/no-NO-CpVal4cV.js +0 -35
  763. package/dist/no-NO-Dn2UkdoI.js +0 -13
  764. package/dist/partner-COG2_Erh.js +0 -21
  765. package/dist/pay-by-link-plane-Pv7Babgn.js +0 -22
  766. package/dist/person-CdGfItMU.js +0 -17
  767. package/dist/plus-circle-filled-Cnf1oJTm.js +0 -17
  768. package/dist/pt-PT-BkvMsoK4.js +0 -35
  769. package/dist/pt-PT-BvK00TeI.js +0 -58
  770. package/dist/pt-PT-C-hbNnsB.js +0 -30
  771. package/dist/pt-PT-D2elvnDU.js +0 -15
  772. package/dist/pt-PT-Dk48OVtf.js +0 -22
  773. package/dist/pt-PT-N0njcfLO.js +0 -23
  774. package/dist/pt-PT-_o5xgnxS.js +0 -13
  775. package/dist/resolveEnvironment-Il1uuuaq.js +0 -84
  776. package/dist/revenue-accelerate-rtXA-8EE.js +0 -17
  777. package/dist/save-BofgDbDX.js +0 -14
  778. package/dist/search-BjMkvQh0.js +0 -17
  779. package/dist/sl-SI-BB7iVcFI.js +0 -22
  780. package/dist/sl-SI-BhVTSmhQ.js +0 -30
  781. package/dist/sl-SI-BylvpF-X.js +0 -15
  782. package/dist/sl-SI-Cth2Qa5T.js +0 -35
  783. package/dist/sl-SI-D_rqR0D7.js +0 -35
  784. package/dist/sl-SI-MZoDApq9.js +0 -23
  785. package/dist/sl-SI-NI2OJAvm.js +0 -58
  786. package/dist/store-CkhgQMl0.js +0 -14
  787. package/dist/sv-SE-66rqYTxi.js +0 -30
  788. package/dist/sv-SE-BUfESAQK.js +0 -13
  789. package/dist/sv-SE-CAZpDX9G.js +0 -58
  790. package/dist/sv-SE-DCFSf4Oj.js +0 -23
  791. package/dist/sv-SE-DbI-1JqN.js +0 -22
  792. package/dist/sv-SE-Dwz1yTrB.js +0 -15
  793. package/dist/sv-SE-OPOHtqtP.js +0 -35
  794. package/dist/terminal-1-ewywjFJI.js +0 -18
  795. package/dist/toCapitalized-Bq7laD0b.js +0 -13
  796. package/dist/translation-RPPT5Bll.js +0 -472
  797. package/dist/types/api/pciTemplate/usePciTemplate.d.ts +0 -14
  798. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformationMultiform.d.ts +0 -9
  799. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +0 -9
  800. package/dist/types/components/Business/forms/BusinessDetails/BusinessDetails.d.ts +0 -3
  801. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelectionMultiform.d.ts +0 -14
  802. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructureMultiform.d.ts +0 -4
  803. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiformDropin.d.ts +0 -5
  804. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/types.d.ts +0 -2
  805. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +0 -21
  806. package/dist/types/components/BusinessLines/tasks/BusinessLinesDropin.d.ts +0 -5
  807. package/dist/types/components/Contract/hooks/useSalesChannelsSettings.d.ts +0 -3
  808. package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +0 -2
  809. package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +0 -8
  810. package/dist/types/components/ui/atoms/Remove/Remove.d.ts +0 -2
  811. package/dist/types/components/ui/atoms/Remove/Remove.types.d.ts +0 -9
  812. package/dist/types/components/ui/atoms/Status/Status.types.d.ts +0 -8
  813. package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +0 -11
  814. package/dist/types/components/ui/molecules/Card/CardGroup.d.ts +0 -3
  815. package/dist/types/core/analytics.d.ts +0 -31
  816. package/dist/types/utils/bankVerification/animation.d.ts +0 -2
  817. package/dist/upload-XDhHhAHV.js +0 -17
  818. package/dist/useFormContext-beqGS11A.js +0 -23
  819. package/dist/utils-B7kcMyYW.js +0 -159
  820. package/dist/utils-DvAaNu7U.js +0 -29
  821. package/dist/validate-DxfuzxT4.js +0 -382
  822. package/dist/validate-Dz7xvgxq.js +0 -605
  823. package/dist/warning-circle-fill-DADaWT65.js +0 -17
  824. package/dist/warning-filled-BfAQN-BF.js +0 -14
  825. package/dist/webinar-BJWDRK2H.js +0 -22
  826. /package/dist/types/api/{pciTemplate → pci}/useSignPci.d.ts +0 -0
  827. /package/dist/types/components/Business/tasks/{BusinessDetailsMultiformDropin → BusinessDetailsDropin}/validate.d.ts +0 -0
  828. /package/dist/types/components/BusinessLines/tasks/{BusinessLinesGettingStarted → BusinessLines}/BusinessLinesGettingStarted.d.ts +0 -0
@@ -0,0 +1,2569 @@
1
+ ;
2
+ {
3
+ try {
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] = "86ec2b5d-2f27-4f33-b222-86760cc5bdf3", e._sentryDebugIdIdentifier = "sentry-dbid-86ec2b5d-2f27-4f33-b222-86760cc5bdf3");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
+ import { useMemo, useState, useEffect, useCallback, useRef } from "preact/hooks";
12
+ import { u as useScenarios } from "./useScenarios-CqKpYbe_.js";
13
+ import { b as useApiContext, $ as useMutation, k as httpPost, aE as matchesRegex, aQ as trimValWithOneSpace, aF as NO_ALPHABET_REGEX, aG as EMOJI_REGEX, aH as hasRepeatedCharacters, aI as isInvalidName, b0 as INDIVIDUAL_VALID_CHAR_REGEX, aO as getFormattingRegEx, aP as SPECIAL_CHARS, C as CountryCodes, aL as standardKatakanaValidator, aM as standardKanjiValidator, W as isEmpty, O as TaskTypes, r as LegalEntityTypes, b1 as getAgeToday, b2 as euCountries, b3 as individualApiKeyMapping, a_ as reverseMapping, b4 as getNomineeFromAssociation, b5 as individualComponentsKeyMapping, b6 as drop, P as createLogger, K as useAccountHolder, V as useI18nContext, a2 as useAnalyticsContext, X as useExperimentsContext, au as useVersionConfiguration, o as useSettingsContext, g as getLegalEntityCountry, b7 as getAllowedDecisionMakerRoles, b8 as filterOutUnwantedAssociationsIfRootLE, aB as cloneObject, b9 as individualDocumentMapping, ba as individualObscuredFields, af as getOwnEntityAssociations, bb as hasNomineesChanged, bc as attachNomineeToRole, aV as doArraysMatch, j as useQuery, w as skipToken, m as httpGet, u as useTranslation, a1 as useQueryClient, B as Button, L as Loader, bd as individualOnfidoApiKeyMapping, al as Scenarios, am as DecisionMakerTypes, be as individualOnfidoDocumentMapping, bf as individualOnfidoObscuredFields } from "./StoreProvider-jtUYKLRz.js";
14
+ import { u as useCreateLegalEntity } from "./useCreateLegalEntity-BvvwB9r0.js";
15
+ import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-Q3Icdeo6.js";
16
+ import { h as useProviderStatus, l as addressValidators, n as addressFormatters, o as mapAddressLabels } from "./Address-e41CN3CB.js";
17
+ import { c as contactDetailsValidationRules, u as useValidatePhoneNumberImperatively } from "./validate-H-iE__-w.js";
18
+ import { F as FormContextProvider, a as FormFlow } from "./FormFlow-PppMJ6OA.js";
19
+ import { a as useToastContext } from "./useToastContext-FI3dwzzs.js";
20
+ import { g as getPropsFromConfigurations, c as composePerScenarioFormConfigurations } from "./process-field-configurations-N1jHgPa8.js";
21
+ import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-BK1u6OTG.js";
22
+ import { u as useMultiForm } from "./useMultiForm--sSlt50X.js";
23
+ import { m as mapExistingFile, g as getPageName, a as getPage, u as useScenarioConfiguration } from "./mapExistingFile-CqrlnmFQ.js";
24
+ import { w as getSSNType, x as defaultFieldMetadata, y as defaultFieldConfig, z as defaultFieldMetadata$1, A as fieldConfig, t as taxInformationDefaultFieldMetadata, f as taxInformationDefaultFieldConfig, B as isEmpty$1, D as getTrustedFields, E as getAsyncIdNumberValidationRule, F as getAsyncPhoneValidationRules, G as setHasMotionCaptureScenario, H as showIndividualMotionCapture, o as individualForms, I as Individual, J as individualDocumentForms, K as idVerificationProviderId, L as idNowModalChildEntityId, M as LandingLayout, q as showIdNowModal, N as check4DigitSsnFailed, O as individualOnfidoRules, n as individualOnfidoForms, P as isNextStepDisabled, Q as shouldShowIdNowModal, R as IndividualOnfido, U as isCompatibleJapanVersion, V as JP_ADDRESS_REQUIRED_FIELDS, W as GuidanceQuestionValues, X as DECISION_MAKER_TYPES_WITH_JOBTITLE$1 } from "./IndividualOnfido-CmmyKC7J.js";
25
+ import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-B5aoMbe_.js";
26
+ import { g as getIdDocument, a as getDocument, c as createDocumentRequest, d as documentApiUtils, m as mergeAttachments, b as getFileExtention } from "./documentUtils-DIcRD9lR.js";
27
+ import { a as datasetUtilities, C as Confirm } from "./useDataset-8WyOJBhU.js";
28
+ import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-DxCFyXNd.js";
29
+ import { l as localizeDateString } from "./localizeDateString-DgSdo3D5.js";
30
+ import { o as omitObscuredFieldsIfUnchanged, I as IFrameWidget } from "./iframeWidget-Uz4rHS0r.js";
31
+ import { r as resolveFieldMetadata, w as getLocalizedIdDocumentTypeOptions, I as Image } from "./Spacer-D4I0f08n.js";
32
+ import { r as rules, D as DECISION_MAKER_TYPES_WITH_JOBTITLE } from "./rules-_v8BprU3.js";
33
+ import { f as formatObject } from "./utils-DNSfZiio.js";
34
+ import { m as mapSchemaFieldsToApiScriptLocalization, a as mapApiScriptLocalizationToSchemaFields } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
35
+ import { Show } from "@preact/signals/utils";
36
+ import { m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-D6HjhjJT.js";
37
+ import { g as getOnfidoIdentityTypeToApiIdentityTypeMap, i as individualFormDefaultData, m as mapLegalEntityToIndividualOnfidoSchema } from "./mapLegalEntityToIndividualOnfidoSchema-COcit7Hx.js";
38
+ import { lazy } from "preact/compat";
39
+ import { M as Modal } from "./Modal-CJ_hgcGb.js";
40
+ import { a as Alert } from "./Alert-Dk-oZlnx.js";
41
+ import { a as getIndividualLegalEntityName } from "./getName-BS-pHwl0.js";
42
+ const verifyIdNumber = async (legalEntityId, baseUrl, data) => {
43
+ return await httpPost(
44
+ {
45
+ baseUrl,
46
+ path: `legalEntities/${legalEntityId}/verifications/idNumber`,
47
+ // Handler for unhappy flows, i.e. status != 200, in the idNumber verification process
48
+ errorHandler: async (response) => {
49
+ const responseData = await response;
50
+ if (responseData.status === 422) {
51
+ return { status: 422, message: responseData.detail, errorCode: responseData.errorCode };
52
+ }
53
+ if (responseData.status === 500) {
54
+ return { status: 500, message: "Service did not respond, do not block verification" };
55
+ }
56
+ }
57
+ },
58
+ data
59
+ );
60
+ };
61
+ const useVerifyIdNumber = (options) => {
62
+ const { rootLegalEntityId, baseUrl } = useApiContext();
63
+ return useMutation({
64
+ mutationFn: (data) => verifyIdNumber(rootLegalEntityId.value, baseUrl.value, data),
65
+ ...options
66
+ });
67
+ };
68
+ const startVerificationCheck = async (rootLegalEntityId, baseUrl, data) => {
69
+ return httpPost(
70
+ {
71
+ baseUrl,
72
+ path: `legalEntities/${rootLegalEntityId}/providers/idVerification/process`
73
+ },
74
+ data
75
+ );
76
+ };
77
+ const useIdVerificationStartCheck = (options) => {
78
+ const { rootLegalEntityId, baseUrl } = useApiContext();
79
+ return useMutation({
80
+ mutationFn: (data) => startVerificationCheck(rootLegalEntityId.value, baseUrl.value, data),
81
+ ...options
82
+ });
83
+ };
84
+ const nameValidationRulesV4 = {
85
+ firstName: [
86
+ {
87
+ modes: ["blur"],
88
+ validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
89
+ errorMessage: "nameMustContainLetters"
90
+ },
91
+ {
92
+ modes: ["blur"],
93
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && !isInvalidName(input) && matchesRegex(INDIVIDUAL_VALID_CHAR_REGEX, input),
94
+ errorMessage: "checkForTypos"
95
+ }
96
+ ],
97
+ lastName: [
98
+ {
99
+ modes: ["blur"],
100
+ validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
101
+ errorMessage: "nameMustContainLetters"
102
+ },
103
+ {
104
+ modes: ["blur"],
105
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && !isInvalidName(input) && matchesRegex(INDIVIDUAL_VALID_CHAR_REGEX, input),
106
+ errorMessage: "checkForTypos"
107
+ }
108
+ ]
109
+ };
110
+ const specialCharsRegEx = getFormattingRegEx(SPECIAL_CHARS.replace("-", ""));
111
+ const nameFormatters = {
112
+ firstName: {
113
+ // formatter: trimValWithOneSpace // just trim
114
+ // Example - removing disallowed chars as they are input: then they don't end up in state
115
+ formatter: (val) => val ? trimValWithOneSpace(val).replace(specialCharsRegEx, "") : void 0
116
+ // trim & replace
117
+ },
118
+ lastName: {
119
+ formatter: (val) => val ? trimValWithOneSpace(val).replace(specialCharsRegEx, "") : void 0
120
+ }
121
+ };
122
+ const customerSupportPresubmitProcess = (legalEntityResponse, legalEntityToSubmit) => {
123
+ if (legalEntityResponse.type === "individual") {
124
+ return processCustomerSupportForIndividual(legalEntityResponse, legalEntityToSubmit);
125
+ }
126
+ if (legalEntityResponse.type === "organization") {
127
+ return processCustomerSupportForOrganization(legalEntityResponse, legalEntityToSubmit);
128
+ }
129
+ };
130
+ const processCustomerSupportForOrganization = (legalEntityResponse, legalEntityToSubmit) => {
131
+ if (!legalEntityResponse.organization?.support) {
132
+ return legalEntityToSubmit.organization?.support ?? void 0;
133
+ }
134
+ if (legalEntityResponse.organization?.countryOfGoverningLaw !== legalEntityToSubmit.organization?.countryOfGoverningLaw) {
135
+ const customerSupport = legalEntityResponse.organization?.support;
136
+ const country = legalEntityToSubmit.organization?.countryOfGoverningLaw;
137
+ switch (country) {
138
+ case CountryCodes.Japan:
139
+ return unsetCustomerSupportNumber(customerSupport);
140
+ default:
141
+ return customerSupport;
142
+ }
143
+ }
144
+ };
145
+ const processCustomerSupportForIndividual = (legalEntityResponse, legalEntityToSubmit) => {
146
+ if (!legalEntityResponse.individual?.support) {
147
+ return legalEntityToSubmit.individual?.support ?? void 0;
148
+ }
149
+ if (legalEntityResponse.individual?.residentialAddress.country !== legalEntityToSubmit.individual?.residentialAddress.country) {
150
+ const customerSupport = legalEntityResponse.individual?.support;
151
+ const country = legalEntityToSubmit.individual?.residentialAddress.country;
152
+ switch (country) {
153
+ case CountryCodes.Japan:
154
+ return unsetCustomerSupportNumber(customerSupport);
155
+ default:
156
+ return customerSupport;
157
+ }
158
+ }
159
+ };
160
+ const unsetCustomerSupportNumber = (customerSupport) => {
161
+ return customerSupport ? {
162
+ email: customerSupport.email,
163
+ phone: { number: "", type: "mobile" }
164
+ } : void 0;
165
+ };
166
+ const onfidoDocumentTypeMapping = [
167
+ { id: "driversLicense", name: "driversLicense", hasBackPage: true },
168
+ { id: "identityCard", name: "identityCard", hasBackPage: true },
169
+ { id: "passport", name: "passport", hasBackPage: false }
170
+ ];
171
+ const jaHaniNameValidationRules = {
172
+ jaHaniFirstName: [
173
+ {
174
+ modes: ["blur"],
175
+ validate: (input) => standardKanjiValidator(input),
176
+ errorMessage: "nameMustContainLetters"
177
+ }
178
+ ],
179
+ jaHaniLastName: [
180
+ {
181
+ modes: ["blur"],
182
+ validate: (input) => standardKanjiValidator(input),
183
+ errorMessage: "nameMustContainLetters"
184
+ }
185
+ ]
186
+ };
187
+ const jaKanaNameValidationRules = {
188
+ jaKanaFirstName: [
189
+ {
190
+ modes: ["blur"],
191
+ validate: (input) => standardKatakanaValidator(input),
192
+ errorMessage: "nameMustContainLetters"
193
+ }
194
+ ],
195
+ jaKanaLastName: [
196
+ {
197
+ modes: ["blur"],
198
+ validate: (input) => standardKatakanaValidator(input),
199
+ errorMessage: "nameMustContainLetters"
200
+ }
201
+ ]
202
+ };
203
+ const isNotOutOfRangeBirthDateValidatorRule$1 = {
204
+ modes: ["blur"],
205
+ validate: (birthDate) => !isEmpty(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
206
+ errorMessage: "invalidDateOfBirth"
207
+ };
208
+ const buildMinimumAgeValidationRule$1 = (minimumAge) => ({
209
+ modes: ["blur"],
210
+ validate: (birthDate) => !!birthDate && getAgeToday(birthDate) >= minimumAge,
211
+ errorMessage: {
212
+ key: "youMustXYearsOldToContinue",
213
+ values: { minimumAge: minimumAge.toString() }
214
+ }
215
+ });
216
+ const getCountrySpecificMinimumAgeValidationRule$1 = (country) => {
217
+ if (!country) {
218
+ return buildMinimumAgeValidationRule$1(13);
219
+ }
220
+ if ([...euCountries, CountryCodes.UnitedKingdom, CountryCodes.Switzerland].some(
221
+ (c) => c === country
222
+ )) {
223
+ return buildMinimumAgeValidationRule$1(16);
224
+ }
225
+ switch (country) {
226
+ case CountryCodes.HongKong:
227
+ case CountryCodes.Singapore:
228
+ return buildMinimumAgeValidationRule$1(18);
229
+ default:
230
+ return buildMinimumAgeValidationRule$1(13);
231
+ }
232
+ };
233
+ const personalDetailsValidators = ({
234
+ country,
235
+ isExperimentEnabled = () => false,
236
+ isSettingEnabled = () => false,
237
+ taskType,
238
+ idNumberType,
239
+ phonePrefix,
240
+ idNumberExempt,
241
+ idNumber,
242
+ existingIdNumber,
243
+ formVerificationErrors,
244
+ taxIdNumberType
245
+ }) => ({
246
+ taxInformation: resolveFieldMetadata(
247
+ taxInformationDefaultFieldConfig[country],
248
+ {
249
+ taxIdNumberType,
250
+ companyType: LegalEntityTypes.INDIVIDUAL
251
+ },
252
+ taxInformationDefaultFieldMetadata
253
+ )?.validators,
254
+ birthDate: (() => {
255
+ const baseValidators = [isNotOutOfRangeBirthDateValidatorRule$1];
256
+ if (isSettingEnabled("enforceLegalAge")) {
257
+ return [...baseValidators, buildMinimumAgeValidationRule$1(18)];
258
+ }
259
+ if (isExperimentEnabled("EnableAgeVerification")) {
260
+ if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) {
261
+ return [...baseValidators, buildMinimumAgeValidationRule$1(18)];
262
+ }
263
+ return [...baseValidators, getCountrySpecificMinimumAgeValidationRule$1(country)];
264
+ }
265
+ return baseValidators;
266
+ })(),
267
+ ...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0,
268
+ ...contactDetailsValidationRules,
269
+ phoneNumber: resolveFieldMetadata(
270
+ fieldConfig[phonePrefix ?? country],
271
+ {},
272
+ defaultFieldMetadata$1
273
+ )?.validators,
274
+ idNumber: (() => {
275
+ const derivedIdNumberType = country === CountryCodes.UnitedStates ? getSSNType(formVerificationErrors, existingIdNumber) : idNumberType;
276
+ return idNumberExempt ? {
277
+ validate: () => {
278
+ return idNumberExempt || !isEmpty(idNumber);
279
+ },
280
+ modes: ["blur"]
281
+ } : resolveFieldMetadata(
282
+ defaultFieldConfig[country],
283
+ { idNumberType: derivedIdNumberType },
284
+ defaultFieldMetadata
285
+ )?.validators;
286
+ })(),
287
+ ...jaHaniNameValidationRules,
288
+ ...jaKanaNameValidationRules
289
+ });
290
+ const mandateIdVerificationForMotionCapture = (showMotionCapture, derivedProps) => {
291
+ if (!derivedProps) {
292
+ return void 0;
293
+ }
294
+ const copiedDerivedProps = { ...derivedProps };
295
+ if (showMotionCapture) {
296
+ const idVerificationFields = [
297
+ ...derivedProps.requiredFields.idVerificationMethod ?? [],
298
+ "idVerificationMethod"
299
+ ];
300
+ copiedDerivedProps.allFields.idVerificationMethod = idVerificationFields;
301
+ copiedDerivedProps.requiredFields.idVerificationMethod = idVerificationFields;
302
+ }
303
+ return copiedDerivedProps;
304
+ };
305
+ const mapApiDocumentToIndividualDocuments = (entityId) => {
306
+ const idDocument2 = getIdDocument(entityId);
307
+ const proofOfResidency = getDocument(entityId, "proofOfResidency");
308
+ const proofOfNationalId = getDocument(entityId, "proofOfNationalIdNumber");
309
+ const proofOfRelationship = getDocument(entityId, "proofOfRelationship");
310
+ return {
311
+ idDocument: idDocument2 ? mapApiIdDocumentToSchema(idDocument2) : void 0,
312
+ proofOfResidency: proofOfResidency ? { proofOfResidency: [mapExistingFile(getPageName(proofOfResidency))] } : void 0,
313
+ proofOfNationalId: proofOfNationalId ? { proofOfNationalId: [mapExistingFile(getPageName(proofOfNationalId))] } : void 0,
314
+ proofOfRelationship: proofOfRelationship ? { proofOfRelationship: [mapExistingFile(getPageName(proofOfRelationship))] } : void 0
315
+ };
316
+ };
317
+ const mapApiIdDocumentToSchema = (idDocument2) => {
318
+ const { type, attachments, modificationDate } = idDocument2;
319
+ const { hasBackPage } = getLocalizedIdDocumentTypeOptions().find(({ id }) => id === type);
320
+ let frontPage;
321
+ let backPage;
322
+ if (attachments?.length === 1) {
323
+ frontPage = getPage(idDocument2);
324
+ } else {
325
+ frontPage = hasBackPage ? getPage(idDocument2, "front") : getPage(idDocument2);
326
+ backPage = hasBackPage ? getPage(idDocument2, "back") : void 0;
327
+ }
328
+ return {
329
+ ...frontPage ? { idFrontPage: [mapExistingFile(frontPage.pageName ?? "")] } : {},
330
+ ...backPage ? { idBackPage: [mapExistingFile(backPage.pageName ?? "")] } : {},
331
+ idDocumentType: type,
332
+ modificationDate
333
+ };
334
+ };
335
+ const mapIndividualDocumentToApiDocument = async (data, entityId) => {
336
+ if (!data) return void 0;
337
+ const { proofOfNationalId, proofOfResidency, proofOfRelationship } = data;
338
+ const idDocument2 = "idDocument" in data ? data.idDocument : data.manualIdUpload;
339
+ const entityType = "legalEntity";
340
+ const documents = await Promise.all([
341
+ idDocument2?.idFrontPage ? createDocumentRequest({
342
+ entityId,
343
+ entityType,
344
+ documentType: idDocument2.idDocumentType,
345
+ page1: idDocument2.idFrontPage?.[0],
346
+ page2: idDocument2.idBackPage?.[0]
347
+ }) : void 0,
348
+ proofOfNationalId?.proofOfNationalId ? createDocumentRequest({
349
+ entityId,
350
+ entityType,
351
+ documentType: "proofOfNationalIdNumber",
352
+ page1: proofOfNationalId.proofOfNationalId[0]
353
+ }) : void 0,
354
+ proofOfResidency?.proofOfResidency ? createDocumentRequest({
355
+ entityId,
356
+ entityType,
357
+ documentType: "proofOfResidency",
358
+ page1: proofOfResidency.proofOfResidency[0]
359
+ }) : void 0,
360
+ proofOfRelationship?.proofOfRelationship ? createDocumentRequest({
361
+ entityId,
362
+ entityType,
363
+ documentType: "proofOfRelationship",
364
+ page1: proofOfRelationship.proofOfRelationship[0]
365
+ }) : void 0
366
+ ]);
367
+ return documents.filter(Boolean);
368
+ };
369
+ const getIdentityTypeToApiIdentityTypeMap = (data) => {
370
+ const { residencyCountry } = data;
371
+ switch (residencyCountry) {
372
+ case CountryCodes.HongKong:
373
+ return {
374
+ passport: "passport",
375
+ driversLicense: "driversLicense",
376
+ proofOfIdentityCard: "nationalIdNumber"
377
+ };
378
+ default:
379
+ return {
380
+ nationalIdNumber: "nationalIdNumber",
381
+ passport: "passport",
382
+ driversLicense: "driversLicense",
383
+ proofOfIdentityCard: "identityCard"
384
+ };
385
+ }
386
+ };
387
+ const adjustIdentificationData = (data, apiData) => {
388
+ const { typeOfIdentity, idNumber, idNumberExempt } = data;
389
+ const identificationData = {
390
+ ...apiData,
391
+ number: idNumber,
392
+ type: getIdentityTypeToApiIdentityTypeMap(data)[typeOfIdentity] ?? "nationalIdNumber"
393
+ };
394
+ switch (typeOfIdentity) {
395
+ case "passport":
396
+ return {
397
+ ...identificationData,
398
+ cardNumber: ""
399
+ };
400
+ case "driversLicense":
401
+ return {
402
+ ...identificationData,
403
+ expiryDate: ""
404
+ };
405
+ default:
406
+ return idNumber === void 0 && idNumberExempt === void 0 ? void 0 : {
407
+ ...identificationData,
408
+ expiryDate: "",
409
+ cardNumber: "",
410
+ nationalIdExempt: apiData?.nationalIdExempt ?? !idNumber
411
+ };
412
+ }
413
+ };
414
+ const mapIndividualToLegalEntity = (data) => {
415
+ const requestObj = {
416
+ ...formatObject(data, individualApiKeyMapping)
417
+ };
418
+ requestObj.type = LegalEntityTypes.INDIVIDUAL;
419
+ const { personalDetails } = data;
420
+ if (!personalDetails) return requestObj;
421
+ requestObj.individual.identificationData = adjustIdentificationData(
422
+ personalDetails,
423
+ requestObj.individual.identificationData
424
+ );
425
+ const localization = [
426
+ mapSchemaFieldsToApiScriptLocalization(personalDetails, "jaHani"),
427
+ mapSchemaFieldsToApiScriptLocalization(personalDetails, "jaKana")
428
+ ].filter(({ fields }) => !isEmpty$1(fields));
429
+ if (localization.length) {
430
+ requestObj.individual.name.localization = localization;
431
+ }
432
+ if (personalDetails.phoneNumber?.number) {
433
+ requestObj.individual.phone = {
434
+ number: personalDetails.phoneNumber.number,
435
+ type: "mobile"
436
+ };
437
+ } else {
438
+ delete requestObj.individual.phone;
439
+ }
440
+ return requestObj;
441
+ };
442
+ const mapLegalEntityToIndividual = (legalEntity, isChangingType, isRoleFieldNeeded, parentLegalEntity, isLegalRepresentative) => {
443
+ let individualData = formatObject(
444
+ legalEntity,
445
+ individualComponentsKeyMapping
446
+ );
447
+ individualData = {
448
+ ...individualData,
449
+ personalDetails: {
450
+ ...individualData?.personalDetails,
451
+ ...isChangingType && {
452
+ firstName: "",
453
+ lastName: ""
454
+ }
455
+ }
456
+ };
457
+ if (!individualData.personalDetails?.idNumberExempt) {
458
+ individualData.personalDetails.idNumberExempt = false;
459
+ }
460
+ const apiIdentityTypeToIdentityTypeMap = reverseMapping(
461
+ getIdentityTypeToApiIdentityTypeMap(individualData.personalDetails)
462
+ );
463
+ if (legalEntity?.individual?.identificationData?.type) {
464
+ individualData.personalDetails.typeOfIdentity = apiIdentityTypeToIdentityTypeMap[legalEntity.individual.identificationData.type];
465
+ }
466
+ if (legalEntity?.documentDetails?.length) {
467
+ individualData = {
468
+ ...individualData,
469
+ ...mapApiDocumentToIndividualDocuments(legalEntity?.id)
470
+ };
471
+ }
472
+ if (legalEntity?.individual?.residentialAddress.country === "JP" && legalEntity.individual?.name?.localization) {
473
+ for (const scriptLoc of legalEntity.individual.name.localization) {
474
+ individualData.personalDetails = {
475
+ ...individualData.personalDetails,
476
+ ...mapApiScriptLocalizationToSchemaFields(scriptLoc)
477
+ };
478
+ }
479
+ }
480
+ if (!parentLegalEntity?.entityAssociations) {
481
+ return individualData;
482
+ }
483
+ const associations = parentLegalEntity?.entityAssociations?.filter((ea) => ea.legalEntityId === legalEntity?.id) ?? [];
484
+ if (isRoleFieldNeeded) {
485
+ individualData.personalDetails.role = associations.map((ea) => ea.type);
486
+ individualData.personalDetails.jobTitle = associations.find(
487
+ ({ jobTitle }) => Boolean(jobTitle)
488
+ )?.jobTitle;
489
+ }
490
+ individualData.personalDetails = getNomineeFromAssociation(
491
+ associations,
492
+ individualData.personalDetails
493
+ );
494
+ if (isLegalRepresentative) {
495
+ individualData.personalDetails.relationship = associations.find(
496
+ ({ relationship }) => Boolean(relationship)
497
+ )?.relationship;
498
+ }
499
+ return individualData;
500
+ };
501
+ const identityBase = {
502
+ role: {
503
+ rule: "requiredIfDecisionMakerTask"
504
+ },
505
+ firstName: {
506
+ rule: "REQUIRED"
507
+ },
508
+ lastName: {
509
+ rule: "REQUIRED"
510
+ },
511
+ birthDate: {
512
+ rule: "REQUIRED"
513
+ },
514
+ phoneNumber: {
515
+ rules: ["requiredIfPhoneScenarioDisabled", "contactsIfRequiredForRole"]
516
+ },
517
+ email: {
518
+ rule: "contactsIfRequiredForRole"
519
+ },
520
+ jobTitle: {
521
+ rule: "jobTitleIfRequiredForRole"
522
+ },
523
+ nationality: {
524
+ rule: "nationalityIfRequiredForRole"
525
+ },
526
+ address: {
527
+ rule: "addressIfRequiredForCountry"
528
+ },
529
+ otherAddressInformation: {
530
+ rule: "otherAddressInfoIfRequiredForCountry"
531
+ },
532
+ country: {
533
+ rule: "REQUIRED"
534
+ },
535
+ postalCode: {
536
+ rule: "postalCodeIfRequiredForCountry"
537
+ },
538
+ city: {
539
+ rule: "cityIfRequiredForCountry"
540
+ },
541
+ stateOrProvince: {
542
+ rule: "stateOrProvinceIfRequiredForCountry"
543
+ },
544
+ residencyCountry: {
545
+ rule: "REQUIRED"
546
+ },
547
+ proofOfResidency: {
548
+ rule: "isProofOfResidencyRequired"
549
+ },
550
+ proofOfNationalId: {
551
+ rule: "isProofOfNationalIdRequired"
552
+ },
553
+ relationship: {
554
+ rule: "legalRepresentativeRelationshipRequired"
555
+ },
556
+ proofOfRelationship: {
557
+ rule: "isProofOfRelationshipRequired"
558
+ },
559
+ nomineeDirector: {
560
+ rule: "nomineeDirectorRequiredForCountry"
561
+ },
562
+ nomineeShareholder: {
563
+ rule: "nomineeShareHolderRequiredForCountry"
564
+ },
565
+ jaHaniFirstName: {
566
+ rule: "japaneseFirstAndLastNames"
567
+ },
568
+ jaHaniLastName: {
569
+ rule: "japaneseFirstAndLastNames"
570
+ },
571
+ jaKanaFirstName: {
572
+ rule: "japaneseFirstAndLastNames"
573
+ },
574
+ jaKanaLastName: {
575
+ rule: "japaneseFirstAndLastNames"
576
+ },
577
+ idDocumentType: {
578
+ // If the user has a missing ID error and chooses manual flow
579
+ rule: "isManualIdFlowAndHasMissingData"
580
+ }
581
+ };
582
+ const identityNumber$1 = {
583
+ idNumber: {
584
+ rule: "idNumberRules",
585
+ obscured: true
586
+ },
587
+ idNumberExempt: {
588
+ rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
589
+ },
590
+ idDocumentType: {
591
+ rule: "manualIdDocumentRequired"
592
+ },
593
+ idFrontPage: {
594
+ rule: "idFrontPageIfManualUpload"
595
+ },
596
+ idBackPage: {
597
+ rule: "backPageIfRequiredForDocumentType"
598
+ },
599
+ idVerificationMethod: {
600
+ rule: "idVerificationRequired"
601
+ },
602
+ instantIdVerificationData: {
603
+ rule: "instantVerificationDataRule"
604
+ }
605
+ };
606
+ const additionalIdentityInfo$1 = {
607
+ typeOfIdentity: {
608
+ rules: ["requiredIfCountryUsesMultipleTypesOfIdentity", "isDirectorIdNumberRequiredForCountry"]
609
+ },
610
+ issuerState: {
611
+ rule: "issuerStateRequired"
612
+ },
613
+ licenseCardNumber: {
614
+ rule: "licenseCardNumberRules"
615
+ },
616
+ expiryDate: {
617
+ rule: "expiryDateRequired"
618
+ }
619
+ };
620
+ const idDocument = {
621
+ idVerificationMethod: {
622
+ rule: "REQUIRED"
623
+ },
624
+ idDocumentType: {
625
+ rule: "REQUIRED"
626
+ },
627
+ idFrontPage: {
628
+ rule: "idFrontPageIfManualUpload"
629
+ },
630
+ idBackPage: {
631
+ rule: "backPageIfRequiredForDocumentType"
632
+ }
633
+ };
634
+ const nationality$1 = {
635
+ nationality: {
636
+ rule: "REQUIRED"
637
+ }
638
+ };
639
+ const phoneNumberBase$1 = {
640
+ phoneNumber: {
641
+ rule: "contactsIfRequiredForRole"
642
+ }
643
+ };
644
+ const taxInformationBase$1 = {
645
+ taxInformation: { rule: "countryUsesTaxId" }
646
+ };
647
+ const fieldsPerScenario = {
648
+ L0: drop("address", "birthDate").from(identityBase),
649
+ L1: identityBase,
650
+ L_TAXINFO: { ...identityBase, ...taxInformationBase$1 },
651
+ L1_ID: {
652
+ ...identityBase,
653
+ ...identityNumber$1,
654
+ ...additionalIdentityInfo$1
655
+ },
656
+ L1_IDO: {
657
+ // TODO: change idNumber rule to optional once optional fields are implemented
658
+ ...identityBase,
659
+ ...identityNumber$1,
660
+ ...additionalIdentityInfo$1
661
+ },
662
+ L1_NAT: {
663
+ ...identityBase,
664
+ ...identityNumber$1,
665
+ ...additionalIdentityInfo$1,
666
+ ...nationality$1
667
+ },
668
+ L1_IDDOC: idDocument,
669
+ L_PH: phoneNumberBase$1
670
+ };
671
+ const parseIndividualScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, fieldsPerScenario);
672
+ const parseConfiguration$1 = ({ scenarios }) => parseIndividualScenarios(scenarios);
673
+ const logger$1 = createLogger();
674
+ function IndividualDropin({
675
+ taskType = TaskTypes.INDIVIDUAL,
676
+ parentLegalEntity,
677
+ legalEntityResponse,
678
+ handleHomeClick,
679
+ isTargetLegalEntityType,
680
+ country: parentCountry,
681
+ problems: propProblems,
682
+ trustMember,
683
+ onSubmit: externalOnSubmit,
684
+ asModal = false,
685
+ handleBackClick: externalBackClick,
686
+ trustedFields,
687
+ trustedFieldsProvider,
688
+ trustedRoles
689
+ }) {
690
+ const { baseUrl, rootLegalEntityId } = useApiContext();
691
+ const { accountHolder, setAccountHolder } = useAccountHolder();
692
+ const { i18n } = useI18nContext();
693
+ const userEvents = useAnalyticsContext();
694
+ const { showToast, clearToasts } = useToastContext();
695
+ const { isExperimentEnabled } = useExperimentsContext();
696
+ const { data: versionData } = useVersionConfiguration();
697
+ const { isSettingEnabled } = useSettingsContext();
698
+ const isRoleFieldNeeded = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER;
699
+ const isLegalRepresentative = taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS;
700
+ const dataFromResponse = useMemo(() => {
701
+ if (legalEntityResponse) {
702
+ return mapLegalEntityToIndividual(
703
+ legalEntityResponse,
704
+ isTargetLegalEntityType,
705
+ isRoleFieldNeeded,
706
+ parentLegalEntity,
707
+ isLegalRepresentative
708
+ );
709
+ }
710
+ return {
711
+ personalDetails: {
712
+ residencyCountry: parentCountry
713
+ },
714
+ address: {
715
+ country: parentCountry
716
+ }
717
+ };
718
+ }, [
719
+ legalEntityResponse,
720
+ parentCountry,
721
+ isTargetLegalEntityType,
722
+ parentLegalEntity,
723
+ isRoleFieldNeeded,
724
+ isLegalRepresentative
725
+ ]);
726
+ const documentUtils = documentApiUtils({
727
+ baseUrl: baseUrl.value,
728
+ rootLegalEntityId: rootLegalEntityId.value
729
+ });
730
+ let roleTypes = [];
731
+ const [matchingScenario, setMatchingScenario] = useState();
732
+ const [validationErrors, setValidationErrors] = useState();
733
+ const [loadingStatus, setLoadingStatus] = useState("success");
734
+ const [documents, setDocuments] = useState();
735
+ const [existingAttachments, setExistingAttachments] = useState();
736
+ const [country, setCountry] = useState(
737
+ dataFromResponse?.personalDetails?.residencyCountry ?? parentCountry
738
+ );
739
+ const [hideFooter, setHideFooter] = useState(false);
740
+ const [derivedProps, setDerivedProps] = useState();
741
+ const associatedLegalEntityTrustedFields = useMemo(
742
+ () => legalEntityResponse ? getTrustedFields(legalEntityResponse, individualComponentsKeyMapping) : {},
743
+ [legalEntityResponse]
744
+ );
745
+ const { data: providerStatus } = useProviderStatus({
746
+ providers: ["address", "idDocument"],
747
+ country: legalEntityResponse ? getLegalEntityCountry(legalEntityResponse) : country
748
+ });
749
+ const problems = useMemo(
750
+ () => ({
751
+ ...propProblems,
752
+ validationErrors
753
+ }),
754
+ [propProblems, validationErrors]
755
+ );
756
+ useEffect(() => {
757
+ userEvents.updateBaseTrackingPayload({ task: taskType });
758
+ userEvents.addTaskEvent("Landed on page", {
759
+ actionType: "start"
760
+ });
761
+ }, []);
762
+ const individualFieldValidations = useCallback(
763
+ (data2) => ({
764
+ personalDetails: personalDetailsValidators({
765
+ country: data2?.personalDetails?.residencyCountry ?? country,
766
+ isExperimentEnabled,
767
+ isSettingEnabled,
768
+ taskType,
769
+ idNumberType: data2?.personalDetails?.typeOfIdentity,
770
+ phonePrefix: data2?.personalDetails?.phoneNumber?.phoneCountryCode,
771
+ idNumberExempt: data2?.personalDetails?.idNumberExempt,
772
+ idNumber: data2?.personalDetails?.idNumber,
773
+ existingIdNumber: dataFromResponse.personalDetails?.idNumber,
774
+ formVerificationErrors: propProblems?.verificationErrors?.personalDetails,
775
+ taxIdNumberType: data2?.personalDetails?.taxInformation?.length ? data2?.personalDetails?.taxInformation[0]?.type : void 0
776
+ }),
777
+ address: addressValidators({
778
+ isExperimentEnabled,
779
+ country: data2?.personalDetails?.residencyCountry ?? country,
780
+ i18n
781
+ })
782
+ }),
783
+ [isExperimentEnabled, isSettingEnabled, taskType]
784
+ );
785
+ const validatePhoneNumber = useValidatePhoneNumberImperatively();
786
+ const { mutateAsync: verifyIdNumber2 } = useVerifyIdNumber();
787
+ const individualFieldAsyncValidations = useCallback(
788
+ (data2) => ({
789
+ personalDetails: {
790
+ phoneNumber: getAsyncPhoneValidationRules(validatePhoneNumber).phoneNumber,
791
+ idNumber: getAsyncIdNumberValidationRule(verifyIdNumber2, data2?.personalDetails).idNumber
792
+ }
793
+ }),
794
+ [getAsyncPhoneValidationRules, getAsyncIdNumberValidationRule]
795
+ );
796
+ const defaultData = useMemo(
797
+ () => ({
798
+ ...dataFromResponse,
799
+ ...documents,
800
+ idVerificationMethod: {
801
+ idVerificationMethod: "instantVerification"
802
+ }
803
+ }),
804
+ [legalEntityResponse, documents, isTargetLegalEntityType, dataFromResponse]
805
+ );
806
+ const formatters = useMemo(
807
+ () => ({
808
+ personalDetails: {
809
+ ...nameFormatters
810
+ },
811
+ address: addressFormatters
812
+ }),
813
+ []
814
+ );
815
+ const form = useMultiForm({
816
+ requiredFields: derivedProps?.requiredFields,
817
+ defaultData,
818
+ rules: individualFieldValidations,
819
+ asyncRules: individualFieldAsyncValidations,
820
+ optionalFields: derivedProps?.optionalFields,
821
+ formatters,
822
+ obscuredFields: {
823
+ personalDetails: ["idNumber"]
824
+ }
825
+ });
826
+ const { data = dataFromResponse } = form;
827
+ useEffect(() => {
828
+ setCountry(data?.personalDetails?.residencyCountry ?? parentCountry);
829
+ }, [data?.personalDetails?.residencyCountry, parentCountry]);
830
+ const { data: scenarios } = useScenarios(country, LegalEntityTypes.INDIVIDUAL);
831
+ useEffect(() => {
832
+ if (!scenarios) return;
833
+ setHasMotionCaptureScenario(scenarios);
834
+ setMatchingScenario(scenarios);
835
+ }, [scenarios]);
836
+ const { fieldConfigurations } = useScenarioConfiguration({
837
+ parseConfiguration: parseConfiguration$1,
838
+ legalEntityType: LegalEntityTypes.INDIVIDUAL,
839
+ setLoadingStatus,
840
+ country
841
+ });
842
+ const fieldsFromCustomRules = useMemo(
843
+ () => rules({
844
+ matchingScenario,
845
+ data,
846
+ country: data?.personalDetails?.residencyCountry ?? country,
847
+ taskType,
848
+ isExperimentEnabled,
849
+ rootLegalEntity: parentLegalEntity,
850
+ problems,
851
+ version: versionData?.version
852
+ }),
853
+ [country, matchingScenario, data, taskType, problems]
854
+ );
855
+ useEffect(() => {
856
+ const derivedProps2 = getPropsFromConfigurations({
857
+ scenarioConfiguration: fieldConfigurations,
858
+ forms: individualForms,
859
+ remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
860
+ dataMissingErrors: problems?.missingData ?? [],
861
+ fieldsWithExistingData: legalEntityResponse ? getFieldsWithExistingData(
862
+ legalEntityResponse,
863
+ individualApiKeyMapping,
864
+ individualDocumentMapping,
865
+ // We ignore these fields for the purposes of this rule because we know them to be problematic
866
+ [
867
+ "personalDetails.typeOfIdentity",
868
+ "personalDetails.idNumber",
869
+ "address.stateOrProvince",
870
+ "personalDetails.issuerState"
871
+ ]
872
+ ) : [],
873
+ customRules: fieldsFromCustomRules,
874
+ legalEntityType: legalEntityResponse?.type,
875
+ legalEntityTrustedFields: [],
876
+ remediationFieldAsOptional: true
877
+ });
878
+ const updatedDerivedProps = mandateIdVerificationForMotionCapture(
879
+ showIndividualMotionCapture?.value,
880
+ derivedProps2
881
+ );
882
+ setDerivedProps(updatedDerivedProps);
883
+ }, [
884
+ fieldConfigurations,
885
+ legalEntityResponse,
886
+ fieldsFromCustomRules,
887
+ problems?.remediationActions,
888
+ problems?.missingData
889
+ ]);
890
+ const forms = useMemo(() => {
891
+ const formsWithUpdatedName = {
892
+ ...individualForms,
893
+ idDocument: {
894
+ ...individualForms.idDocument,
895
+ formName: data.idVerificationMethod?.idVerificationMethod === "instantVerification" ? "instantVerification" : "idDocument"
896
+ }
897
+ };
898
+ const requiredForms = getRequiredForms(
899
+ formsWithUpdatedName,
900
+ derivedProps?.requiredFields,
901
+ derivedProps?.optionalFields
902
+ ).filter(
903
+ // Prevent showing the ID verification method step when onfido is not enabled
904
+ (form2) => form2.formId !== "idVerificationMethod" || providerStatus?.statuses?.idDocument?.enabled
905
+ );
906
+ return addValidityToForms(requiredForms, form.isValid, problems);
907
+ }, [
908
+ derivedProps,
909
+ form.isValid,
910
+ problems,
911
+ providerStatus?.statuses?.idDocument?.enabled,
912
+ data.idVerificationMethod?.idVerificationMethod
913
+ ]);
914
+ if (isRoleFieldNeeded && parentLegalEntity) {
915
+ roleTypes = getAllowedDecisionMakerRoles(parentLegalEntity, taskType);
916
+ }
917
+ useEffect(() => {
918
+ if (!legalEntityResponse?.documentDetails?.length) return;
919
+ documentUtils.fetchDocuments(legalEntityResponse.documentDetails, legalEntityResponse?.id).then((res) => {
920
+ setExistingAttachments(res[0].attachments);
921
+ setDocuments(mapApiDocumentToIndividualDocuments(legalEntityResponse?.id));
922
+ }).catch(() => {
923
+ showToast({ label: i18n.get("failedToFetchRelevantDocuments"), variant: "error" });
924
+ });
925
+ }, [legalEntityResponse]);
926
+ const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
927
+ const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
928
+ const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
929
+ const submitLegalEntity = async ({
930
+ dataSubmitted,
931
+ legalEntity,
932
+ idDocumentType
933
+ }) => {
934
+ let updatedLegalEntity;
935
+ const existingLeId = legalEntityResponse?.id;
936
+ if (legalEntity.individual && legalEntityResponse?.individual?.support) {
937
+ legalEntity.individual.support = customerSupportPresubmitProcess(
938
+ legalEntityResponse,
939
+ legalEntity
940
+ );
941
+ }
942
+ if (!existingLeId) {
943
+ updatedLegalEntity = await createLegalEntity(legalEntity);
944
+ userEvents.addTaskEvent("Success", {
945
+ actionType: "submit",
946
+ countryOfRegistration: dataSubmitted.personalDetails?.residencyCountry,
947
+ roles: dataSubmitted.personalDetails?.role
948
+ });
949
+ } else {
950
+ const patchLegalEntity = { ...drop("type").from(legalEntity), id: existingLeId };
951
+ updatedLegalEntity = await updateLegalEntity(patchLegalEntity);
952
+ userEvents.addTaskEvent("Success", {
953
+ actionType: "submit",
954
+ countryOfRegistration: dataSubmitted.personalDetails?.residencyCountry,
955
+ documentType: idDocumentType
956
+ });
957
+ }
958
+ return updatedLegalEntity;
959
+ };
960
+ const { mutateAsync: getIdVerificationStartCheck } = useIdVerificationStartCheck();
961
+ const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId) => {
962
+ const providerId = idVerificationProviderId.value;
963
+ if (!providerId) throw Error("idVerificationProviderId not yet set");
964
+ const data2 = {
965
+ providerId,
966
+ legalEntityId,
967
+ captureMetadata: onfidoResponse
968
+ };
969
+ await getIdVerificationStartCheck(data2);
970
+ };
971
+ const submitDocuments = async ({
972
+ forms: forms2,
973
+ legalEntity,
974
+ dataSubmitted
975
+ }) => {
976
+ if (!isDocumentsRequired(forms2)) return;
977
+ if (dataSubmitted.idDocument?.instantIdVerificationData) {
978
+ if (providerStatus?.statuses?.idDocument?.enabled === false) {
979
+ throw new Error("Provider unexpectedly disabled instant verification flow");
980
+ }
981
+ await handleInstantIdVerificationStartCheck(
982
+ dataSubmitted.idDocument.instantIdVerificationData,
983
+ legalEntity.id
984
+ );
985
+ } else {
986
+ const formattedDocuments = await mapIndividualDocumentToApiDocument(
987
+ dataSubmitted,
988
+ legalEntity.id
989
+ );
990
+ if (!formattedDocuments || formattedDocuments.length === 0) {
991
+ if (existingAttachments?.length)
992
+ logger$1.log(
993
+ "User has already uploaded documents and is not changing them, nothing needs to be done"
994
+ );
995
+ else
996
+ logger$1.error(
997
+ `formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
998
+ );
999
+ return;
1000
+ }
1001
+ formattedDocuments[0].attachments = mergeAttachments(
1002
+ existingAttachments ?? [],
1003
+ formattedDocuments[0]?.attachments ?? []
1004
+ ).filter((attachment) => attachment.content);
1005
+ const uploadedDocuments = await documentUtils.uploadDocuments(
1006
+ formattedDocuments,
1007
+ legalEntity.id
1008
+ );
1009
+ uploadedDocuments?.forEach((doc) => {
1010
+ userEvents.addTaskEvent("Success", {
1011
+ actionType: "upload",
1012
+ documentType: doc.type,
1013
+ fileExtention: doc?.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
1014
+ });
1015
+ });
1016
+ }
1017
+ };
1018
+ const hasRolesChanged = (legalEntity, existingEntityAssociations, newRoles) => {
1019
+ const existingRoles = existingEntityAssociations?.filter((ea) => ea.legalEntityId === legalEntity.id)?.map(({ type }) => type);
1020
+ return !doArraysMatch(existingRoles, newRoles);
1021
+ };
1022
+ const attachAssociationToParentLegalEntity = async ({
1023
+ legalEntity,
1024
+ parentLE,
1025
+ dataSubmitted
1026
+ }) => {
1027
+ const newRoles = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER ? dataSubmitted?.personalDetails?.role : taskType === TaskTypes.TRUST_MEMBER_INDIVIDUAL || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL ? trustMember?.roles : null;
1028
+ const existingEntityAssociations = getOwnEntityAssociations(parentLE);
1029
+ if (newRoles && (hasRolesChanged(legalEntity, existingEntityAssociations, newRoles) || dataFromResponse.personalDetails?.jobTitle !== dataSubmitted?.personalDetails?.jobTitle || hasNomineesChanged(dataFromResponse.personalDetails, dataSubmitted.personalDetails))) {
1030
+ const updatedParentLegalEntity = {
1031
+ entityAssociations: [
1032
+ ...newRoles.map((role) => ({
1033
+ type: role,
1034
+ legalEntityId: legalEntity.id,
1035
+ ...DECISION_MAKER_TYPES_WITH_JOBTITLE.some((type) => type === role) && {
1036
+ jobTitle: dataSubmitted?.personalDetails?.jobTitle
1037
+ }
1038
+ })) || [],
1039
+ ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
1040
+ ]
1041
+ };
1042
+ if (updatedParentLegalEntity.entityAssociations) {
1043
+ updatedParentLegalEntity.entityAssociations = updatedParentLegalEntity.entityAssociations.map(
1044
+ (ea) => attachNomineeToRole(ea, country, dataSubmitted.personalDetails)
1045
+ );
1046
+ }
1047
+ await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
1048
+ }
1049
+ if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS && (existingEntityAssociations.every((ea) => ea.legalEntityId !== legalEntity.id) || dataFromResponse?.personalDetails?.relationship !== dataSubmitted?.personalDetails?.relationship)) {
1050
+ const newEntityAssociation = {
1051
+ type: "legalRepresentative",
1052
+ legalEntityId: legalEntity.id,
1053
+ relationship: dataSubmitted?.personalDetails?.relationship
1054
+ };
1055
+ const updatedParentLegalEntity = {
1056
+ entityAssociations: [newEntityAssociation, ...existingEntityAssociations]
1057
+ };
1058
+ await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
1059
+ }
1060
+ };
1061
+ const onSubmit = async () => {
1062
+ setLoadingStatus("loading");
1063
+ const dataSubmitted = omitObscuredFieldsIfUnchanged(
1064
+ individualObscuredFields,
1065
+ data,
1066
+ dataFromResponse
1067
+ );
1068
+ if (!dataSubmitted) {
1069
+ return;
1070
+ }
1071
+ try {
1072
+ const legalEntity = mapIndividualToLegalEntity(dataSubmitted);
1073
+ const idDocumentType = idDocumentTypeOptions.find(
1074
+ ({ id }) => dataSubmitted?.idDocument?.idDocumentType === id
1075
+ )?.id;
1076
+ legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(
1077
+ taskType,
1078
+ legalEntityResponse,
1079
+ accountHolder || void 0
1080
+ );
1081
+ const createdLegalEntity = await submitLegalEntity({
1082
+ dataSubmitted,
1083
+ legalEntity,
1084
+ idDocumentType
1085
+ });
1086
+ setAccountHolder(accountHolder);
1087
+ await submitDocuments({ forms, legalEntity: createdLegalEntity, dataSubmitted });
1088
+ if (parentLegalEntity) {
1089
+ await attachAssociationToParentLegalEntity({
1090
+ legalEntity: createdLegalEntity,
1091
+ parentLE: parentLegalEntity,
1092
+ dataSubmitted
1093
+ });
1094
+ }
1095
+ setLoadingStatus("success");
1096
+ clearToasts();
1097
+ externalOnSubmit?.(dataSubmitted);
1098
+ } catch (e) {
1099
+ logger$1.error("Failed to update individual", e);
1100
+ if (isValidationError(e)) {
1101
+ setValidationErrors(processValidationErrors(e, TaskTypes.INDIVIDUAL));
1102
+ } else if (isMaintenanceModeError(e)) {
1103
+ showToast({
1104
+ label: i18n.get("maintenanceModeMessage"),
1105
+ variant: "error",
1106
+ duration: "indefinite"
1107
+ });
1108
+ } else {
1109
+ showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
1110
+ }
1111
+ setLoadingStatus("success");
1112
+ userEvents.addTaskEvent("Encountered error", {
1113
+ actionType: "submit",
1114
+ returnType: e.errorCode,
1115
+ returnValue: e.title
1116
+ });
1117
+ }
1118
+ };
1119
+ const isDocumentsRequired = (forms2) => forms2.some((form2) => individualDocumentForms.includes(form2.formId));
1120
+ const datasetUtils = datasetUtilities(i18n.locale);
1121
+ const formatIdDocument = (idDocument2) => {
1122
+ if (!idDocument2) return void 0;
1123
+ const documentType = idDocument2?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
1124
+ (document2) => idDocument2.instantIdVerificationData?.document_front.type === document2.id
1125
+ ) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
1126
+ if (!documentType) return void 0;
1127
+ const frontPage = idDocument2.idFrontPage?.[0];
1128
+ const backPage = idDocument2.idBackPage?.[0];
1129
+ if (!frontPage) return void 0;
1130
+ return {
1131
+ documentType: i18n.get(documentType.name),
1132
+ ...backPage && documentType.hasBackPage ? {
1133
+ frontPage: frontPage.name,
1134
+ backPage: backPage.name
1135
+ } : {
1136
+ fileName: frontPage.name
1137
+ }
1138
+ };
1139
+ };
1140
+ const formatFileSummaryData = ({
1141
+ idDocument: idDocument2,
1142
+ proofOfNationalId,
1143
+ proofOfResidency,
1144
+ proofOfRelationship
1145
+ }) => {
1146
+ const proofOfNationalIdFile = proofOfNationalId?.proofOfNationalId?.[0];
1147
+ const proofOfResidencyFile = proofOfResidency?.proofOfResidency?.[0];
1148
+ const proofOfRelationshipFile = proofOfRelationship?.proofOfRelationship?.[0];
1149
+ return {
1150
+ ...(idDocument2?.idDocumentType || idDocument2?.instantIdVerificationData) && {
1151
+ idDocument: formatIdDocument(idDocument2)
1152
+ },
1153
+ ...proofOfNationalIdFile && {
1154
+ proofOfNationalId: {
1155
+ fileName: proofOfNationalIdFile.name
1156
+ }
1157
+ },
1158
+ ...proofOfResidencyFile && {
1159
+ proofOfResidency: {
1160
+ fileName: proofOfResidencyFile.name
1161
+ }
1162
+ },
1163
+ ...proofOfRelationshipFile && {
1164
+ proofOfRelationship: {
1165
+ fileName: proofOfRelationshipFile.name
1166
+ }
1167
+ }
1168
+ };
1169
+ };
1170
+ const formatDataForSummary = () => {
1171
+ let summaryData = cloneObject(data);
1172
+ if (summaryData.personalDetails?.residencyCountry) {
1173
+ summaryData.personalDetails.residencyCountry = datasetUtils.getCountryName(
1174
+ summaryData.personalDetails.residencyCountry
1175
+ );
1176
+ }
1177
+ if (summaryData.personalDetails?.nationality) {
1178
+ summaryData.personalDetails.nationality = datasetUtils.getCountryName(
1179
+ summaryData.personalDetails.nationality
1180
+ );
1181
+ }
1182
+ if (summaryData.address) {
1183
+ summaryData.address = mapAddressLabels(summaryData.address, datasetUtils);
1184
+ }
1185
+ if (isDocumentsRequired(forms)) {
1186
+ individualDocumentForms.forEach((formId) => delete summaryData[formId]);
1187
+ summaryData = { ...summaryData, ...formatFileSummaryData(data) };
1188
+ }
1189
+ if (summaryData.personalDetails?.accountHolder) {
1190
+ summaryData.personalDetails.accountHolder = i18n.get(
1191
+ summaryData.personalDetails.accountHolder
1192
+ );
1193
+ }
1194
+ if (summaryData.personalDetails?.birthDate) {
1195
+ summaryData.personalDetails.birthDate = localizeDateString(
1196
+ summaryData.personalDetails.birthDate,
1197
+ i18n.locale
1198
+ );
1199
+ }
1200
+ if (summaryData.personalDetails?.phoneNumber) {
1201
+ delete summaryData.personalDetails.phoneNumber;
1202
+ summaryData.personalDetails.phoneNumber = data.personalDetails?.phoneNumber?.number;
1203
+ }
1204
+ if (summaryData.personalDetails?.taxInformation) {
1205
+ const taxInformation = summaryData.personalDetails.taxInformation.find(
1206
+ (taxId) => taxId.country === data.personalDetails?.nationality
1207
+ );
1208
+ if (taxInformation) {
1209
+ delete summaryData.personalDetails.taxInformation;
1210
+ summaryData.personalDetails[taxInformation.type] = taxInformation.number;
1211
+ }
1212
+ }
1213
+ return summaryData;
1214
+ };
1215
+ const summaryOmittedKeys = [
1216
+ ...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
1217
+ ...data?.personalDetails?.idNumberExempt ? ["idNumber"] : []
1218
+ ];
1219
+ const {
1220
+ handleNextClick,
1221
+ handleBackClick,
1222
+ activeForm,
1223
+ shouldValidate,
1224
+ gotoFormByFormIndex,
1225
+ steps
1226
+ } = useFormComposer({
1227
+ problems,
1228
+ externalBackClick,
1229
+ forms,
1230
+ onSubmit,
1231
+ triggerValidation: form.triggerValidation
1232
+ // TODO: figure out type of nested keys
1233
+ });
1234
+ return /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
1235
+ FormFlow,
1236
+ {
1237
+ summary: {
1238
+ data: formatDataForSummary(),
1239
+ omitted: {
1240
+ keys: summaryOmittedKeys
1241
+ },
1242
+ problems
1243
+ },
1244
+ asModal,
1245
+ currentStep: steps.current,
1246
+ disableNextButton: hideFooter,
1247
+ forms,
1248
+ gotoFormByFormIndex,
1249
+ handleBackClick,
1250
+ handleCancelClick: handleHomeClick,
1251
+ handleNextClick,
1252
+ loadingStatus,
1253
+ totalSteps: steps.total,
1254
+ children: /* @__PURE__ */ jsx(
1255
+ Individual,
1256
+ {
1257
+ ...derivedProps,
1258
+ data,
1259
+ country,
1260
+ activeForm,
1261
+ forms,
1262
+ taskType,
1263
+ problems,
1264
+ onNext: handleNextClick,
1265
+ onBack: handleBackClick,
1266
+ setHideFooter,
1267
+ legalEntityId: legalEntityResponse?.id,
1268
+ allowedRoles: roleTypes,
1269
+ shouldValidate,
1270
+ accountHolder,
1271
+ parentLegalEntity,
1272
+ trustedFields: !parentLegalEntity ? trustedFields : associatedLegalEntityTrustedFields,
1273
+ trustedFieldsProvider,
1274
+ trustedRoles
1275
+ }
1276
+ )
1277
+ }
1278
+ ) });
1279
+ }
1280
+ const isNotOutOfRangeBirthDateValidatorRule = {
1281
+ modes: ["blur"],
1282
+ validate: (birthDate) => !isEmpty(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
1283
+ errorMessage: "invalidDateOfBirth"
1284
+ };
1285
+ const buildMinimumAgeValidationRule = (minimumAge) => ({
1286
+ modes: ["blur"],
1287
+ validate: (birthDate) => !!birthDate && getAgeToday(birthDate) >= minimumAge,
1288
+ errorMessage: {
1289
+ key: "youMustXYearsOldToContinue",
1290
+ values: { minimumAge: minimumAge.toString() }
1291
+ }
1292
+ });
1293
+ const getCountrySpecificMinimumAgeValidationRule = (country) => {
1294
+ if (!country) {
1295
+ return buildMinimumAgeValidationRule(13);
1296
+ }
1297
+ if ([...euCountries, CountryCodes.UnitedKingdom, CountryCodes.Switzerland].some(
1298
+ (c) => c === country
1299
+ )) {
1300
+ return buildMinimumAgeValidationRule(16);
1301
+ }
1302
+ switch (country) {
1303
+ case CountryCodes.HongKong:
1304
+ case CountryCodes.Singapore:
1305
+ return buildMinimumAgeValidationRule(18);
1306
+ default:
1307
+ return buildMinimumAgeValidationRule(13);
1308
+ }
1309
+ };
1310
+ const additionalPersonalDetailsValidators = ({
1311
+ country,
1312
+ isExperimentEnabled = () => false,
1313
+ isSettingEnabled = () => false,
1314
+ taskType,
1315
+ idNumberType,
1316
+ idNumberExempt,
1317
+ idNumber,
1318
+ existingIdNumber,
1319
+ formVerificationErrors,
1320
+ i18n,
1321
+ taxIdNumberType
1322
+ }) => ({
1323
+ taxInformation: resolveFieldMetadata(
1324
+ taxInformationDefaultFieldConfig[country],
1325
+ {
1326
+ taxIdNumberType,
1327
+ companyType: LegalEntityTypes.INDIVIDUAL
1328
+ },
1329
+ taxInformationDefaultFieldMetadata
1330
+ )?.validators,
1331
+ birthDate: (() => {
1332
+ const baseValidators = [isNotOutOfRangeBirthDateValidatorRule];
1333
+ if (isSettingEnabled("enforceLegalAge")) {
1334
+ return [...baseValidators, buildMinimumAgeValidationRule(18)];
1335
+ }
1336
+ if (isExperimentEnabled("EnableAgeVerification")) {
1337
+ if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) {
1338
+ return [...baseValidators, buildMinimumAgeValidationRule(18)];
1339
+ }
1340
+ return [...baseValidators, getCountrySpecificMinimumAgeValidationRule(country)];
1341
+ }
1342
+ return baseValidators;
1343
+ })(),
1344
+ ...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0,
1345
+ ...contactDetailsValidationRules,
1346
+ idNumber: (() => {
1347
+ const derivedIdNumberType = country === CountryCodes.UnitedStates || country === CountryCodes.PuertoRico ? getSSNType(formVerificationErrors, existingIdNumber) : idNumberType;
1348
+ return idNumberExempt ? {
1349
+ validate: () => {
1350
+ return idNumberExempt || !isEmpty(idNumber);
1351
+ },
1352
+ modes: ["blur"]
1353
+ } : resolveFieldMetadata(
1354
+ defaultFieldConfig[country],
1355
+ { idNumberType: derivedIdNumberType },
1356
+ defaultFieldMetadata
1357
+ )?.validators;
1358
+ })(),
1359
+ ...addressValidators({
1360
+ isExperimentEnabled,
1361
+ country,
1362
+ i18n
1363
+ })
1364
+ });
1365
+ const basicDetailsValidators = ({
1366
+ isExperimentEnabled = () => false
1367
+ }) => ({
1368
+ ...contactDetailsValidationRules,
1369
+ ...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0
1370
+ });
1371
+ const getIdNowProviderIdentificationStatus = async (rootLegalEntityId, baseUrl, legalEntityId) => {
1372
+ return httpGet({
1373
+ baseUrl,
1374
+ path: `legalEntities/${rootLegalEntityId}/child/${legalEntityId}/provider/idnow/identification/status`,
1375
+ errorHandler: async (response) => {
1376
+ const responseData = await response;
1377
+ if (responseData.status === 404) {
1378
+ return { status: 404, message: responseData.detail, errorCode: responseData.errorCode };
1379
+ }
1380
+ }
1381
+ });
1382
+ };
1383
+ const useIdNowIdentificationStatus = (legalEntityId, options) => {
1384
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1385
+ return useQuery({
1386
+ queryKey: legalEntityId === skipToken ? [] : ["idNowProviderIdentificationStatus", legalEntityId],
1387
+ queryFn: legalEntityId === skipToken ? skipToken : () => getIdNowProviderIdentificationStatus(
1388
+ rootLegalEntityId.value,
1389
+ baseUrl.value,
1390
+ legalEntityId
1391
+ ),
1392
+ ...options
1393
+ });
1394
+ };
1395
+ const idNowProviderStartIdentification = async (rootLegalEntityId, baseUrl, legalEntityId) => {
1396
+ return httpPost({
1397
+ baseUrl,
1398
+ path: `legalEntities/${rootLegalEntityId}/child/${legalEntityId}/provider/idnow/identification/start`
1399
+ });
1400
+ };
1401
+ const useIdNowStartIdentification = (legalEntityId, options) => {
1402
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1403
+ return useQuery({
1404
+ queryKey: legalEntityId === skipToken ? [] : ["idNowProviderStartIdentification", legalEntityId],
1405
+ queryFn: legalEntityId === skipToken ? skipToken : () => idNowProviderStartIdentification(rootLegalEntityId.value, baseUrl.value, legalEntityId),
1406
+ ...options
1407
+ });
1408
+ };
1409
+ const idnowHeader = "adyen-kyc-idnow-header";
1410
+ const idnowVerificationHeaderIframeContainer = "adyen-kyc-idnow-verification-header-iframe-container";
1411
+ const idnowVerificationHeaderIframe = "adyen-kyc-idnow-verification-header-iframe";
1412
+ const idnowVerificationHeaderImage = "adyen-kyc-idnow-verification-header-image";
1413
+ const styles = {
1414
+ idnowHeader,
1415
+ idnowVerificationHeaderIframeContainer,
1416
+ idnowVerificationHeaderIframe,
1417
+ idnowVerificationHeaderImage
1418
+ };
1419
+ const passportFrontGreenImage = lazy(
1420
+ () => import("./passport-front-green-BL4HmtsB.js")
1421
+ );
1422
+ const isIdNowSuccessful = (status) => {
1423
+ const providerStatus = status?.providerStatus;
1424
+ return providerStatus === "SUCCESS" || providerStatus === "SUCCESS_DATA_CHANGED" || providerStatus === "REVIEW_PENDING";
1425
+ };
1426
+ const IdNowVerificationModal = ({ handleFinish }) => {
1427
+ const { t } = useTranslation(["individual", "common"]);
1428
+ const [isConfirmPresented, setIsConfirmPresented] = useState(false);
1429
+ const [genericError, setGenericError] = useState(false);
1430
+ const widgetContainerRef = useRef(null);
1431
+ const iFrameRef = useRef(null);
1432
+ const iFrameWidgetRef = useRef(null);
1433
+ const [page, setPage] = useState(1);
1434
+ const queryClient = useQueryClient();
1435
+ const { showToast } = useToastContext();
1436
+ const {
1437
+ data: idNowStatus,
1438
+ isLoading: isStatusLoading,
1439
+ refetch: refetchIdNowIdentificationStatus
1440
+ } = useIdNowIdentificationStatus(idNowModalChildEntityId.value?.id ?? skipToken, {
1441
+ enabled: !!idNowModalChildEntityId.value?.id,
1442
+ refetchOnMount: "always",
1443
+ refetchInterval: 1e4,
1444
+ // poll every 10 seconds
1445
+ retry: (failureCount, error) => {
1446
+ if ("status" in error && error.status === 404) return false;
1447
+ return failureCount < 3;
1448
+ }
1449
+ });
1450
+ const {
1451
+ data: idNowStart,
1452
+ isLoading,
1453
+ isError: idNowStartError,
1454
+ refetch: refetchIdNowStartIdentification
1455
+ } = useIdNowStartIdentification(idNowModalChildEntityId.value?.id ?? skipToken, {
1456
+ enabled: !!idNowModalChildEntityId.value?.id && page === 2
1457
+ });
1458
+ const handleDismiss = () => {
1459
+ setIsConfirmPresented(true);
1460
+ };
1461
+ const handleCancelDismiss = () => {
1462
+ setIsConfirmPresented(false);
1463
+ };
1464
+ const handleConfirmDismiss = () => {
1465
+ setPage(1);
1466
+ setGenericError(false);
1467
+ setIsConfirmPresented(false);
1468
+ showIdNowModal.value = false;
1469
+ if (idNowStartError && idNowModalChildEntityId.value?.id) {
1470
+ queryClient.resetQueries({
1471
+ queryKey: ["idNowProviderStartIdentification", idNowModalChildEntityId.value?.id]
1472
+ });
1473
+ }
1474
+ idNowModalChildEntityId.value = void 0;
1475
+ iFrameWidgetRef.current?.unmount();
1476
+ iFrameRef.current?.remove();
1477
+ handleFinish?.();
1478
+ };
1479
+ if (idNowStatus?.status === "finished") {
1480
+ if (isIdNowSuccessful(idNowStatus)) {
1481
+ showToast({
1482
+ label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
1483
+ variant: "success"
1484
+ });
1485
+ handleConfirmDismiss();
1486
+ } else {
1487
+ if (page === 2) {
1488
+ handleConfirmDismiss();
1489
+ }
1490
+ }
1491
+ }
1492
+ if (!isLoading && idNowStartError) {
1493
+ setGenericError(true);
1494
+ setPage(1);
1495
+ }
1496
+ const initializeIdNowWidget = useCallback(async (url) => {
1497
+ const container = widgetContainerRef.current;
1498
+ if (!container) {
1499
+ return;
1500
+ }
1501
+ const iFrame = document.createElement("iframe");
1502
+ iFrameRef.current = iFrame;
1503
+ iFrame.setAttribute("allowFullscreen", "true");
1504
+ iFrame.classList.add(styles.idnowVerificationHeaderIframe);
1505
+ iFrame.setAttribute("height", "800");
1506
+ iFrame.setAttribute(
1507
+ "allow",
1508
+ "camera *;microphone *;geolocation *;clipboard-read *;clipboard-write *"
1509
+ );
1510
+ container.appendChild(iFrame);
1511
+ try {
1512
+ iFrameWidgetRef.current = new IFrameWidget(iFrame, url, "idnow", "");
1513
+ await iFrameWidgetRef.current.mountAndWaitForResponse();
1514
+ } catch (err) {
1515
+ console.error("Error occurred:", err);
1516
+ setGenericError(true);
1517
+ setPage(1);
1518
+ }
1519
+ }, []);
1520
+ useEffect(() => {
1521
+ if (page === 2 && !isLoading && idNowStart && idNowStart?.url) {
1522
+ (async () => {
1523
+ await refetchIdNowIdentificationStatus();
1524
+ await initializeIdNowWidget(idNowStart.url);
1525
+ })();
1526
+ }
1527
+ return () => {
1528
+ iFrameWidgetRef.current?.unmount();
1529
+ iFrameRef.current?.remove();
1530
+ };
1531
+ }, [isLoading, page, initializeIdNowWidget, refetchIdNowIdentificationStatus, idNowStart]);
1532
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1533
+ !isStatusLoading && /* @__PURE__ */ jsxs(
1534
+ Modal,
1535
+ {
1536
+ size: page === 2 ? "large" : "medium",
1537
+ showCloseButton: !isLoading && !isStatusLoading,
1538
+ onClose: handleDismiss,
1539
+ ariaLabel: t(($) => $["identityVerification"], { ns: "common" }),
1540
+ children: [
1541
+ page === 1 && /* @__PURE__ */ jsx("div", { className: styles.idnowHeader, children: /* @__PURE__ */ jsx(
1542
+ LandingLayout,
1543
+ {
1544
+ media: /* @__PURE__ */ jsx(
1545
+ Image,
1546
+ {
1547
+ className: styles.idnowVerificationHeaderImage,
1548
+ lazyLoadedImage: passportFrontGreenImage
1549
+ }
1550
+ ),
1551
+ title: t(($) => $["identityVerification"], { ns: "common" }),
1552
+ description: /* @__PURE__ */ jsxs(Fragment, { children: [
1553
+ t(($) => $["idNowDescription"], { ns: "individual" }),
1554
+ /* @__PURE__ */ jsx("br", {}),
1555
+ /* @__PURE__ */ jsx("br", {}),
1556
+ getIndividualLegalEntityName(idNowModalChildEntityId.value) && t(($) => $["idNowDescriptionName"], {
1557
+ ns: "individual",
1558
+ name: getIndividualLegalEntityName(idNowModalChildEntityId.value)
1559
+ })
1560
+ ] }),
1561
+ error: !isLoading && genericError ? /* @__PURE__ */ jsx(
1562
+ Alert,
1563
+ {
1564
+ variant: "error",
1565
+ title: t(($) => $["thereWasAnErrorTryAgain"], { ns: "common" })
1566
+ }
1567
+ ) : void 0,
1568
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
1569
+ /* @__PURE__ */ jsx(
1570
+ Button,
1571
+ {
1572
+ onClick: async () => {
1573
+ setGenericError(false);
1574
+ setPage(2);
1575
+ await refetchIdNowStartIdentification();
1576
+ },
1577
+ disabled: isLoading || isStatusLoading || idNowStatus?.status === "finished" && isIdNowSuccessful(idNowStatus),
1578
+ fullWidth: true,
1579
+ children: idNowStatus?.status === "pending" ? t(($) => $["continueVerification"], { ns: "common" }) : t(($) => $["startVerification"], { ns: "common" })
1580
+ }
1581
+ ),
1582
+ /* @__PURE__ */ jsx(
1583
+ Button,
1584
+ {
1585
+ disabled: isLoading || isStatusLoading,
1586
+ variant: "tertiary",
1587
+ onClick: handleConfirmDismiss,
1588
+ fullWidth: true,
1589
+ children: t(($) => $["finishLater"], { ns: "common" })
1590
+ }
1591
+ )
1592
+ ] })
1593
+ }
1594
+ ) }),
1595
+ page === 2 && (isLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
1596
+ "div",
1597
+ {
1598
+ ref: widgetContainerRef,
1599
+ className: styles.idnowVerificationHeaderIframeContainer
1600
+ }
1601
+ ))
1602
+ ]
1603
+ }
1604
+ ),
1605
+ isConfirmPresented && /* @__PURE__ */ jsx(
1606
+ Confirm,
1607
+ {
1608
+ confirmText: t(($) => $["leave"], { ns: "common" }),
1609
+ onCancel: handleCancelDismiss,
1610
+ onConfirm: handleConfirmDismiss,
1611
+ title: t(($) => $["unsavedChanges"], { ns: "common" })
1612
+ }
1613
+ )
1614
+ ] });
1615
+ };
1616
+ const adjustOnfidoIdentificationData = (data, apiData) => {
1617
+ const { typeOfIdentity, idNumber, idNumberExempt } = data;
1618
+ const identificationData = {
1619
+ ...apiData,
1620
+ number: idNumber,
1621
+ type: getOnfidoIdentityTypeToApiIdentityTypeMap(data)[typeOfIdentity] ?? "nationalIdNumber"
1622
+ };
1623
+ switch (typeOfIdentity) {
1624
+ case "passport":
1625
+ return {
1626
+ ...identificationData,
1627
+ cardNumber: ""
1628
+ };
1629
+ case "driversLicense":
1630
+ return {
1631
+ ...identificationData,
1632
+ expiryDate: ""
1633
+ };
1634
+ default:
1635
+ return idNumber === void 0 && idNumberExempt === void 0 ? void 0 : {
1636
+ ...identificationData,
1637
+ expiryDate: "",
1638
+ cardNumber: "",
1639
+ nationalIdExempt: apiData?.nationalIdExempt ?? !idNumber
1640
+ };
1641
+ }
1642
+ };
1643
+ const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido, isExperimentEnabled, matchingScenario) => {
1644
+ const legalEntity = {
1645
+ ...formatObject(individualOnfido, individualOnfidoApiKeyMapping),
1646
+ type: LegalEntityTypes.INDIVIDUAL
1647
+ };
1648
+ if (individualOnfido.additionalPersonalDetails) {
1649
+ if (isExperimentEnabled("EnableTaxIdRequiredForBusinessAccountsScenarios") && matchingScenario?.includes(Scenarios.L_TAXINFO) && individualOnfido.additionalPersonalDetails?.idNumber && individualOnfido.additionalPersonalDetails?.typeOfIdentity && individualOnfido.additionalPersonalDetails?.country === CountryCodes.Spain) {
1650
+ legalEntity.individual.taxInformation = [
1651
+ {
1652
+ country: individualOnfido.additionalPersonalDetails.country,
1653
+ number: individualOnfido.additionalPersonalDetails.idNumber,
1654
+ type: individualOnfido.additionalPersonalDetails.typeOfIdentity.toUpperCase()
1655
+ }
1656
+ ];
1657
+ }
1658
+ legalEntity.individual.identificationData = adjustOnfidoIdentificationData(
1659
+ individualOnfido.additionalPersonalDetails,
1660
+ legalEntity.individual.identificationData
1661
+ );
1662
+ }
1663
+ const nameLocalization = [
1664
+ mapSchemaFieldsToApiScriptLocalization(individualOnfido.basicDetails ?? {}, "jaHani"),
1665
+ mapSchemaFieldsToApiScriptLocalization(individualOnfido.basicDetails ?? {}, "jaKana")
1666
+ ].filter(({ fields }) => !isEmpty$1(fields));
1667
+ if (nameLocalization.length) {
1668
+ legalEntity.individual.name.localization = nameLocalization;
1669
+ }
1670
+ const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
1671
+ individualOnfido.additionalPersonalDetails
1672
+ );
1673
+ if (addressLocalizations.length > 0)
1674
+ legalEntity.individual.residentialAddress.localization = addressLocalizations;
1675
+ if (individualOnfido.basicDetails?.phoneNumber) {
1676
+ const phone = {
1677
+ number: individualOnfido.basicDetails.phoneNumber.number,
1678
+ type: "mobile"
1679
+ };
1680
+ if (phone.number && legalEntity.individual) {
1681
+ legalEntity.individual.phone = phone;
1682
+ } else {
1683
+ delete legalEntity?.individual?.phone;
1684
+ }
1685
+ }
1686
+ return legalEntity;
1687
+ };
1688
+ const identityOnfidoBase = {
1689
+ role: {
1690
+ rule: "requiredIfDecisionMakerTask"
1691
+ },
1692
+ firstName: {
1693
+ rule: "REQUIRED"
1694
+ },
1695
+ lastName: {
1696
+ rule: "REQUIRED"
1697
+ },
1698
+ birthDate: {
1699
+ rule: "REQUIRED"
1700
+ },
1701
+ phoneNumber: {
1702
+ rules: ["requiredIfPhoneScenarioDisabled", "contactsIfRequiredForRole"]
1703
+ },
1704
+ email: {
1705
+ rule: "contactsIfRequiredForRole"
1706
+ },
1707
+ jobTitle: {
1708
+ rule: "jobTitleIfRequiredForRole"
1709
+ },
1710
+ placeOfBirth: {
1711
+ rule: "isPlaceOfBirthRequired"
1712
+ },
1713
+ nationality: {
1714
+ rule: "nationalityIfRequiredForRole"
1715
+ },
1716
+ address: {
1717
+ rule: "addressIfRequiredForCountry"
1718
+ },
1719
+ otherAddressInformation: {
1720
+ rule: "otherAddressInfoIfRequiredForCountry"
1721
+ },
1722
+ country: {
1723
+ rule: "REQUIRED"
1724
+ },
1725
+ postalCode: {
1726
+ rule: "postalCodeIfRequiredForCountry"
1727
+ },
1728
+ city: {
1729
+ rule: "cityIfRequiredForCountry"
1730
+ },
1731
+ stateOrProvince: {
1732
+ rule: "stateOrProvinceIfRequiredForCountry"
1733
+ },
1734
+ proofOfResidency: {
1735
+ rule: "isProofOfResidencyRequired"
1736
+ },
1737
+ proofOfNationalId: {
1738
+ rule: "isProofOfNationalIdRequired"
1739
+ },
1740
+ relationship: {
1741
+ rule: "legalRepresentativeRelationshipRequired"
1742
+ },
1743
+ proofOfRelationship: {
1744
+ rule: "isProofOfRelationshipRequired"
1745
+ },
1746
+ nomineeDirector: {
1747
+ rules: ["isGuidedDecisionMakersFlowDisabled", "nomineeDirectorRequiredForCountry"]
1748
+ },
1749
+ nomineeShareholder: {
1750
+ rules: ["isGuidedDecisionMakersFlowDisabled", "nomineeShareHolderRequiredForCountry"]
1751
+ },
1752
+ idVerificationMethod: {
1753
+ rule: "isIdVerificationMethodRequired"
1754
+ },
1755
+ idDocument: {
1756
+ // (either from Onfido or previously-uploaded document)
1757
+ rule: "isUsingInstantVerificationOrHasExistingDocument"
1758
+ },
1759
+ idDocumentType: {
1760
+ // If the user has a missing ID error and chooses manual flow
1761
+ rule: "isManualIdFlowAndHasMissingData"
1762
+ },
1763
+ /**
1764
+ * Below fields only relevant if manual ID is needed
1765
+ * @see identityNumber
1766
+ * @see idDocRequired
1767
+ */
1768
+ idFrontPage: {
1769
+ rule: "hasChosenIdType"
1770
+ },
1771
+ idBackPage: {
1772
+ rule: "backPageIfRequiredForIdType"
1773
+ },
1774
+ // Fields required for Guided decision makers flow
1775
+ isSignatory: {
1776
+ rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
1777
+ },
1778
+ isOwner: {
1779
+ rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
1780
+ },
1781
+ isControllingPerson: {
1782
+ rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
1783
+ },
1784
+ isDirector: {
1785
+ rules: [
1786
+ "isGuidedDecisionMakersFlowEnabled",
1787
+ "requiredIfDecisionMakerTask",
1788
+ "isDirectorRequiredForCountry"
1789
+ ]
1790
+ },
1791
+ isNomineeDirector: {
1792
+ rules: [
1793
+ "isGuidedDecisionMakersFlowEnabled",
1794
+ "requiredIfDecisionMakerTask",
1795
+ "nomineeDirectorRequiredForCountry"
1796
+ ]
1797
+ },
1798
+ isNomineeShareholder: {
1799
+ rules: [
1800
+ "isGuidedDecisionMakersFlowEnabled",
1801
+ "requiredIfDecisionMakerTask",
1802
+ "nomineeShareHolderRequiredForCountry"
1803
+ ]
1804
+ },
1805
+ // Japanese name fields
1806
+ jaHaniFirstName: {
1807
+ rule: "japanSpecificField"
1808
+ },
1809
+ jaHaniLastName: {
1810
+ rule: "japanSpecificField"
1811
+ },
1812
+ jaKanaFirstName: {
1813
+ rule: "japanSpecificField"
1814
+ },
1815
+ jaKanaLastName: {
1816
+ rule: "japanSpecificField"
1817
+ },
1818
+ // Japanese address fields
1819
+ jaHaniAddress: {
1820
+ rule: "japanSpecificField"
1821
+ },
1822
+ jaHaniCity: {
1823
+ rule: "japanSpecificField"
1824
+ },
1825
+ jaHaniStateOrProvince: {
1826
+ rule: "japanSpecificField"
1827
+ },
1828
+ jaKanaCity: {
1829
+ rule: "japanSpecificField"
1830
+ },
1831
+ jaKanaStateOrProvince: {
1832
+ rule: "japanSpecificField"
1833
+ }
1834
+ };
1835
+ const identityNumber = {
1836
+ idNumber: {
1837
+ rule: "idNumberRules",
1838
+ obscured: true
1839
+ },
1840
+ idNumberExempt: {
1841
+ rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
1842
+ },
1843
+ idDocumentType: {
1844
+ // If the user chooses to not provide an ID number, we'll need an ID from them
1845
+ rule: "isManualIdFlowAndNotProvidingIdNumber"
1846
+ }
1847
+ };
1848
+ const additionalIdentityInfo = {
1849
+ typeOfIdentity: {
1850
+ rules: ["requiredIfCountryUsesMultipleTypesOfIdentity", "isDirectorIdNumberRequiredForCountry"]
1851
+ },
1852
+ issuerState: {
1853
+ rule: "issuerStateRequired"
1854
+ },
1855
+ licenseCardNumber: {
1856
+ rule: "licenseCardNumberRules"
1857
+ },
1858
+ expiryDate: {
1859
+ rule: "expiryDateRequired"
1860
+ }
1861
+ };
1862
+ const idDocRequired = {
1863
+ // These fields are relevant for the manual ID flow only.
1864
+ // If we get `L1_IDDOC` then we know we need to require a manual ID upload when the manual flow is used
1865
+ idDocumentType: {
1866
+ rule: "isManualIdFlow"
1867
+ }
1868
+ };
1869
+ const nationality = {
1870
+ nationality: {
1871
+ rule: "REQUIRED"
1872
+ }
1873
+ };
1874
+ const phoneNumberBase = {
1875
+ phoneNumber: {
1876
+ rule: "contactsIfRequiredForRole"
1877
+ }
1878
+ };
1879
+ const taxInformationBase = {
1880
+ taxInformation: { rule: "countryUsesTaxId" }
1881
+ };
1882
+ const individualOnfidoFieldsPerScenario = {
1883
+ L0: drop("address", "birthDate").from(identityOnfidoBase),
1884
+ L1: identityOnfidoBase,
1885
+ L1_ID: {
1886
+ ...identityOnfidoBase,
1887
+ ...identityNumber,
1888
+ ...additionalIdentityInfo
1889
+ },
1890
+ L1_IDO: {
1891
+ // TODO: change idNumber rule to optional once optional fields are implemented
1892
+ ...identityOnfidoBase,
1893
+ ...identityNumber,
1894
+ ...additionalIdentityInfo
1895
+ },
1896
+ L1_NAT: {
1897
+ ...identityOnfidoBase,
1898
+ ...identityNumber,
1899
+ ...additionalIdentityInfo,
1900
+ ...nationality
1901
+ },
1902
+ L_TAXINFO: { ...identityOnfidoBase, ...taxInformationBase },
1903
+ L1_IDDOC: idDocRequired,
1904
+ L_PH: phoneNumberBase
1905
+ };
1906
+ const parseIndividualOnfidoScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, individualOnfidoFieldsPerScenario);
1907
+ const parseConfiguration = ({ scenarios }) => parseIndividualOnfidoScenarios(scenarios);
1908
+ const logger = createLogger();
1909
+ function IndividualOnfidoDropin({
1910
+ taskType = TaskTypes.INDIVIDUAL,
1911
+ parentLegalEntity,
1912
+ legalEntityResponse,
1913
+ handleHomeClick,
1914
+ isTargetLegalEntityType,
1915
+ country: parentCountry,
1916
+ problems: propProblems,
1917
+ onSubmit: externalOnSubmit,
1918
+ asModal = false,
1919
+ handleBackClick: externalBackClick,
1920
+ trustedFields,
1921
+ trustedFieldsProvider,
1922
+ trustedRoles
1923
+ }) {
1924
+ const { baseUrl, rootLegalEntityId } = useApiContext();
1925
+ const { accountHolder, setAccountHolder } = useAccountHolder();
1926
+ const { i18n } = useI18nContext();
1927
+ const { t } = useTranslation("individual");
1928
+ const userEvents = useAnalyticsContext();
1929
+ const { showToast, clearToasts } = useToastContext();
1930
+ const { isExperimentEnabled } = useExperimentsContext();
1931
+ const { data: versionData } = useVersionConfiguration();
1932
+ const { isSettingEnabled } = useSettingsContext();
1933
+ const queryClient = useQueryClient();
1934
+ const isGuidedDecisionMakersFlowEnabled = isExperimentEnabled("EnableGuidedDecisionMakersFlow") || isExperimentEnabled("DecisionMakersFlowOptimization_GuidedDecisionMakersFlow");
1935
+ const isGuidedDecisionMakersFlowDisabled = isExperimentEnabled("DisableGuidedDecisionMakersFlow");
1936
+ const defaultCountry = "NL";
1937
+ const { data: providerStatus } = useProviderStatus({
1938
+ providers: ["idDocument"],
1939
+ country: legalEntityResponse ? getLegalEntityCountry(legalEntityResponse) : defaultCountry
1940
+ });
1941
+ const isInstantVerificationEnabled = providerStatus?.statuses?.idDocument?.enabled ?? true;
1942
+ const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1943
+ const isRoleFieldNeeded = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER;
1944
+ const dataFromResponse = useMemo(() => {
1945
+ const formStateData = individualFormDefaultData.value;
1946
+ individualFormDefaultData.value = null;
1947
+ if (legalEntityResponse) {
1948
+ return {
1949
+ ...mapLegalEntityToIndividualOnfidoSchema(
1950
+ legalEntityResponse,
1951
+ isTargetLegalEntityType,
1952
+ isRoleFieldNeeded,
1953
+ parentLegalEntity
1954
+ ),
1955
+ ...formStateData
1956
+ };
1957
+ }
1958
+ return {
1959
+ additionalPersonalDetails: {
1960
+ country: parentCountry
1961
+ },
1962
+ ...formStateData
1963
+ };
1964
+ }, [
1965
+ legalEntityResponse,
1966
+ parentCountry,
1967
+ isTargetLegalEntityType,
1968
+ isRoleFieldNeeded,
1969
+ parentLegalEntity
1970
+ ]);
1971
+ const [matchingScenario, setMatchingScenario] = useState();
1972
+ const [validationErrors, setValidationErrors] = useState();
1973
+ const [loadingStatus, setLoadingStatus] = useState("success");
1974
+ const [existingAttachments, setExistingAttachments] = useState();
1975
+ const [documents, setDocuments] = useState();
1976
+ const [country, setCountry] = useState(
1977
+ dataFromResponse?.additionalPersonalDetails?.country ?? parentCountry
1978
+ );
1979
+ const [derivedProps, setDerivedProps] = useState();
1980
+ const [nextHandler, setNextHandler] = useState();
1981
+ const problems = useMemo(
1982
+ () => ({
1983
+ ...propProblems,
1984
+ validationErrors
1985
+ }),
1986
+ [propProblems, validationErrors]
1987
+ );
1988
+ const hasVerificationErrors = propProblems?.verificationErrors && Object.keys(propProblems.verificationErrors).length > 0;
1989
+ useEffect(() => {
1990
+ userEvents.updateBaseTrackingPayload({ task: taskType });
1991
+ userEvents.addTaskEvent("Landed on page", {
1992
+ actionType: "start"
1993
+ });
1994
+ }, []);
1995
+ const individualFieldValidations = useCallback(
1996
+ (data2) => ({
1997
+ basicDetails: basicDetailsValidators({
1998
+ isExperimentEnabled
1999
+ }),
2000
+ additionalPersonalDetails: additionalPersonalDetailsValidators({
2001
+ country: data2?.additionalPersonalDetails?.country ?? country,
2002
+ isExperimentEnabled,
2003
+ isSettingEnabled,
2004
+ taskType,
2005
+ idNumberType: data2?.additionalPersonalDetails?.typeOfIdentity,
2006
+ idNumberExempt: data2?.additionalPersonalDetails?.idNumberExempt,
2007
+ idNumber: data2?.additionalPersonalDetails?.idNumber,
2008
+ existingIdNumber: dataFromResponse.additionalPersonalDetails?.idNumber,
2009
+ formVerificationErrors: problems?.verificationErrors?.additionalPersonalDetails,
2010
+ i18n,
2011
+ taxIdNumberType: data2?.additionalPersonalDetails?.taxInformation?.length ? data2?.additionalPersonalDetails?.taxInformation[0]?.type : void 0
2012
+ })
2013
+ }),
2014
+ [
2015
+ country,
2016
+ dataFromResponse.additionalPersonalDetails?.idNumber,
2017
+ i18n,
2018
+ isExperimentEnabled,
2019
+ isSettingEnabled,
2020
+ problems?.verificationErrors?.additionalPersonalDetails,
2021
+ taskType
2022
+ ]
2023
+ );
2024
+ const validatePhoneNumber = useValidatePhoneNumberImperatively();
2025
+ const { mutateAsync: verifyIdNumber2 } = useVerifyIdNumber();
2026
+ const individualFieldAsyncValidations = useCallback(
2027
+ (data2) => ({
2028
+ basicDetails: {
2029
+ phoneNumber: getAsyncPhoneValidationRules(validatePhoneNumber).phoneNumber
2030
+ },
2031
+ additionalPersonalDetails: {
2032
+ idNumber: getAsyncIdNumberValidationRule(verifyIdNumber2, data2?.additionalPersonalDetails).idNumber
2033
+ }
2034
+ }),
2035
+ [verifyIdNumber2, validatePhoneNumber]
2036
+ );
2037
+ const defaultData = useMemo(() => {
2038
+ if (!documents) return dataFromResponse;
2039
+ return {
2040
+ ...dataFromResponse,
2041
+ ...drop("idDocument").from(documents),
2042
+ idVerificationMethod: {
2043
+ idDocument: documents.idDocument,
2044
+ idVerificationMethod: "existingDocument"
2045
+ }
2046
+ };
2047
+ }, [documents, dataFromResponse]);
2048
+ const form = useMultiForm({
2049
+ requiredFields: derivedProps?.requiredFields,
2050
+ defaultData,
2051
+ rules: individualFieldValidations,
2052
+ asyncRules: individualFieldAsyncValidations,
2053
+ optionalFields: derivedProps?.optionalFields,
2054
+ obscuredFields: {
2055
+ /**takes care of scenario when the 4 digit provided is wrong based on verification errors and
2056
+ * we need to show validation error for defaultData which is already saved
2057
+ **/
2058
+ additionalPersonalDetails: check4DigitSsnFailed(
2059
+ problems?.verificationErrors?.additionalPersonalDetails
2060
+ ) ? [] : ["idNumber"]
2061
+ }
2062
+ });
2063
+ const documentUtils = documentApiUtils({
2064
+ baseUrl: baseUrl.value,
2065
+ rootLegalEntityId: rootLegalEntityId.value
2066
+ });
2067
+ const { data, requiredFields } = form;
2068
+ useEffect(() => {
2069
+ setCountry(data?.additionalPersonalDetails?.country ?? parentCountry);
2070
+ }, [data?.additionalPersonalDetails?.country, parentCountry]);
2071
+ const { data: scenarios } = useScenarios(country, LegalEntityTypes.INDIVIDUAL);
2072
+ useEffect(() => {
2073
+ if (!scenarios) return;
2074
+ setHasMotionCaptureScenario(scenarios);
2075
+ setMatchingScenario(scenarios);
2076
+ }, [scenarios]);
2077
+ const { fieldConfigurations } = useScenarioConfiguration({
2078
+ parseConfiguration,
2079
+ legalEntityType: LegalEntityTypes.INDIVIDUAL,
2080
+ setLoadingStatus,
2081
+ country
2082
+ });
2083
+ const fieldsFromCustomRules = useMemo(
2084
+ () => individualOnfidoRules({
2085
+ matchingScenario,
2086
+ data,
2087
+ country: data?.additionalPersonalDetails?.country ?? country,
2088
+ taskType,
2089
+ isExperimentEnabled,
2090
+ rootLegalEntity: parentLegalEntity,
2091
+ problems,
2092
+ version: versionData?.version
2093
+ }),
2094
+ [
2095
+ country,
2096
+ matchingScenario,
2097
+ data,
2098
+ isExperimentEnabled,
2099
+ parentLegalEntity,
2100
+ taskType,
2101
+ problems,
2102
+ versionData?.version
2103
+ ]
2104
+ );
2105
+ useEffect(() => {
2106
+ const derivedProps2 = getPropsFromConfigurations({
2107
+ scenarioConfiguration: fieldConfigurations,
2108
+ forms: individualOnfidoForms,
2109
+ remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
2110
+ dataMissingErrors: problems?.missingData ?? [],
2111
+ fieldsWithExistingData: legalEntityResponse ? getFieldsWithExistingData(
2112
+ legalEntityResponse,
2113
+ individualOnfidoApiKeyMapping,
2114
+ individualOnfidoDocumentMapping,
2115
+ [
2116
+ "additionalPersonalDetails.typeOfIdentity",
2117
+ "additionalPersonalDetails.idNumber",
2118
+ "additionalPersonalDetails.stateOrProvince",
2119
+ "additionalPersonalDetails.issuerState"
2120
+ ]
2121
+ ) : [],
2122
+ customRules: fieldsFromCustomRules,
2123
+ legalEntityType: legalEntityResponse?.type,
2124
+ legalEntityTrustedFields: [],
2125
+ remediationFieldAsOptional: true
2126
+ });
2127
+ const updatedDerivedProps = mandateIdVerificationForMotionCapture(
2128
+ showIndividualMotionCapture?.value,
2129
+ derivedProps2
2130
+ );
2131
+ if (updatedDerivedProps) {
2132
+ setDerivedProps(updatedDerivedProps);
2133
+ }
2134
+ }, [
2135
+ fieldConfigurations,
2136
+ legalEntityResponse,
2137
+ fieldsFromCustomRules,
2138
+ problems?.remediationActions,
2139
+ problems?.missingData
2140
+ ]);
2141
+ useEffect(() => {
2142
+ if (!legalEntityResponse?.documentDetails?.length) return;
2143
+ documentUtils.fetchDocuments(legalEntityResponse.documentDetails, legalEntityResponse?.id).then((res) => {
2144
+ setExistingAttachments(res[0].attachments);
2145
+ setDocuments(mapApiDocumentToIndividualDocuments(legalEntityResponse?.id));
2146
+ }).catch(() => {
2147
+ showToast({ label: i18n.get("failedToFetchRelevantDocuments"), variant: "error" });
2148
+ });
2149
+ }, []);
2150
+ const forms = useMemo(() => {
2151
+ const requiredForms = getRequiredForms(
2152
+ individualOnfidoForms,
2153
+ derivedProps?.requiredFields,
2154
+ derivedProps?.optionalFields
2155
+ );
2156
+ const filteredForms = !isInstantVerificationEnabled ? requiredForms.filter((f) => f.formId !== "idVerificationMethod") : requiredForms;
2157
+ return addValidityToForms(filteredForms, form.isValid, problems);
2158
+ }, [derivedProps, form.isValid, isInstantVerificationEnabled, problems]);
2159
+ const { mutateAsync: getIdVerificationStartCheck } = useIdVerificationStartCheck();
2160
+ const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId) => {
2161
+ const providerId = idVerificationProviderId.value;
2162
+ if (!providerId) throw Error("idVerificationProviderId not yet set");
2163
+ const data2 = {
2164
+ providerId,
2165
+ legalEntityId,
2166
+ captureMetadata: onfidoResponse
2167
+ };
2168
+ await getIdVerificationStartCheck(data2);
2169
+ };
2170
+ const roleTypes = isRoleFieldNeeded && parentLegalEntity ? getAllowedDecisionMakerRoles(parentLegalEntity, taskType, matchingScenario) : [];
2171
+ const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
2172
+ const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
2173
+ const submitLegalEntity = async ({
2174
+ dataSubmitted,
2175
+ legalEntity,
2176
+ idDocumentType
2177
+ }) => {
2178
+ let updatedLegalEntity;
2179
+ const existingLeId = legalEntityResponse?.id;
2180
+ if (legalEntity.individual && legalEntityResponse?.individual?.support) {
2181
+ legalEntity.individual.support = customerSupportPresubmitProcess(
2182
+ legalEntityResponse,
2183
+ legalEntity
2184
+ );
2185
+ }
2186
+ if (!existingLeId) {
2187
+ updatedLegalEntity = await createLegalEntity(legalEntity);
2188
+ userEvents.addTaskEvent("Success", {
2189
+ actionType: "submit",
2190
+ countryOfRegistration: dataSubmitted.additionalPersonalDetails?.country,
2191
+ roles: dataSubmitted.basicDetails?.role
2192
+ });
2193
+ } else {
2194
+ updatedLegalEntity = await updateLegalEntity({
2195
+ ...drop("type").from(legalEntity),
2196
+ id: existingLeId
2197
+ });
2198
+ userEvents.addTaskEvent("Success", {
2199
+ actionType: "submit",
2200
+ countryOfRegistration: dataSubmitted.additionalPersonalDetails?.country,
2201
+ documentType: idDocumentType
2202
+ });
2203
+ }
2204
+ return updatedLegalEntity;
2205
+ };
2206
+ const submitDocuments = async ({
2207
+ legalEntity,
2208
+ dataSubmitted
2209
+ }) => {
2210
+ const idDocument2 = dataSubmitted.idVerificationMethod?.idDocument;
2211
+ if (idDocument2?.instantIdVerificationData) {
2212
+ if (providerStatus?.statuses?.idDocument?.enabled === false) {
2213
+ throw new Error("Provider unexpectedly disabled instant verification flow");
2214
+ }
2215
+ await handleInstantIdVerificationStartCheck(
2216
+ idDocument2.instantIdVerificationData,
2217
+ legalEntity.id
2218
+ );
2219
+ } else {
2220
+ const formattedDocuments = await mapIndividualDocumentToApiDocument(
2221
+ dataSubmitted,
2222
+ legalEntity.id
2223
+ );
2224
+ if (!formattedDocuments || formattedDocuments?.length === 0) {
2225
+ if (existingAttachments?.length)
2226
+ logger.log(
2227
+ "User has already uploaded documents and is not changing them, nothing needs to be done"
2228
+ );
2229
+ else
2230
+ logger.error(
2231
+ `formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
2232
+ );
2233
+ return;
2234
+ }
2235
+ formattedDocuments[0].attachments = mergeAttachments(
2236
+ existingAttachments ?? [],
2237
+ formattedDocuments[0]?.attachments ?? []
2238
+ ).filter((attachment) => attachment.content);
2239
+ const uploadedDocuments = await documentUtils.uploadDocuments(
2240
+ formattedDocuments,
2241
+ legalEntity.id
2242
+ );
2243
+ uploadedDocuments?.forEach((doc) => {
2244
+ userEvents.addTaskEvent("Success", {
2245
+ actionType: "upload",
2246
+ documentType: doc.type,
2247
+ fileExtention: doc?.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
2248
+ });
2249
+ });
2250
+ }
2251
+ };
2252
+ const hasRolesChanged = (legalEntityId, existingEntityAssociations, newRoles) => {
2253
+ const existingRoles = existingEntityAssociations?.filter((association) => association.legalEntityId === legalEntityId).map(({ type }) => type);
2254
+ return !doArraysMatch(existingRoles, newRoles);
2255
+ };
2256
+ const attachAssociationToParentLegalEntity = async ({
2257
+ legalEntity,
2258
+ parentLE,
2259
+ dataSubmitted
2260
+ }) => {
2261
+ const newRoles = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER ? dataSubmitted?.basicDetails?.role : null;
2262
+ const existingEntityAssociations = getOwnEntityAssociations(parentLE);
2263
+ if (newRoles && (hasRolesChanged(legalEntity?.id, existingEntityAssociations, newRoles) || dataFromResponse.basicDetails?.jobTitle !== dataSubmitted?.basicDetails?.jobTitle || hasNomineesChanged(dataFromResponse.basicDetails, dataSubmitted.basicDetails))) {
2264
+ const updatedParentLegalEntity = {
2265
+ entityAssociations: [
2266
+ ...newRoles.map((role) => ({
2267
+ type: role,
2268
+ legalEntityId: legalEntity.id,
2269
+ ...DECISION_MAKER_TYPES_WITH_JOBTITLE$1.some((type) => type === role) && {
2270
+ jobTitle: dataSubmitted?.basicDetails?.jobTitle
2271
+ }
2272
+ })) || [],
2273
+ ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
2274
+ ]
2275
+ };
2276
+ const nomineeDataSource = !isGuidedDecisionMakersFlowDisabled && isGuidedDecisionMakersFlowEnabled ? dataSubmitted?.uboQuestionnaire : dataSubmitted.basicDetails;
2277
+ if (nomineeDataSource && updatedParentLegalEntity.entityAssociations) {
2278
+ updatedParentLegalEntity.entityAssociations = updatedParentLegalEntity.entityAssociations.map(
2279
+ (ea) => attachNomineeToRole(ea, country, nomineeDataSource)
2280
+ );
2281
+ }
2282
+ await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
2283
+ }
2284
+ };
2285
+ const onSubmit = async () => {
2286
+ setLoadingStatus("loading");
2287
+ const dataSubmitted = omitObscuredFieldsIfUnchanged(
2288
+ individualOnfidoObscuredFields,
2289
+ data,
2290
+ dataFromResponse
2291
+ );
2292
+ if (!dataSubmitted) {
2293
+ return;
2294
+ }
2295
+ try {
2296
+ const legalEntity = mapIndividualOnfidoSchemaToLegalEntity(
2297
+ dataSubmitted,
2298
+ isExperimentEnabled,
2299
+ matchingScenario
2300
+ );
2301
+ const idDocumentType = idDocumentTypeOptions.find(
2302
+ ({ id }) => dataSubmitted?.idVerificationMethod?.idDocument?.idDocumentType === id
2303
+ )?.id;
2304
+ legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(
2305
+ taskType,
2306
+ legalEntityResponse,
2307
+ accountHolder || void 0
2308
+ );
2309
+ const submittedLegalEntity = await submitLegalEntity({
2310
+ dataSubmitted,
2311
+ legalEntity,
2312
+ idDocumentType
2313
+ });
2314
+ setAccountHolder(accountHolder);
2315
+ if (dataSubmitted.idVerificationMethod && dataSubmitted.idVerificationMethod?.idVerificationMethod !== "existingDocument" || hasVerificationErrors) {
2316
+ const isBafinSignatory = dataSubmitted?.basicDetails?.role?.includes(DecisionMakerTypes.SIGNATORY) && matchingScenario?.includes(Scenarios.L_BAFIN);
2317
+ if (!isBafinSignatory) {
2318
+ await submitDocuments({ legalEntity: submittedLegalEntity, dataSubmitted });
2319
+ }
2320
+ }
2321
+ if (parentLegalEntity) {
2322
+ await attachAssociationToParentLegalEntity({
2323
+ legalEntity: submittedLegalEntity,
2324
+ parentLE: parentLegalEntity,
2325
+ dataSubmitted
2326
+ });
2327
+ queryClient.invalidateQueries({
2328
+ queryKey: ["legalEntity", parentLegalEntity.id],
2329
+ refetchType: "all"
2330
+ });
2331
+ }
2332
+ idNowModalChildEntityId.value = submittedLegalEntity;
2333
+ setLoadingStatus("success");
2334
+ clearToasts();
2335
+ externalOnSubmit?.(dataSubmitted, matchingScenario);
2336
+ } catch (e) {
2337
+ const eventsAdditionalData = {};
2338
+ logger.error("Failed to update individual", e);
2339
+ if (isValidationError(e)) {
2340
+ const getErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
2341
+ if (getErrors && !Object.keys(getErrors).length) {
2342
+ showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
2343
+ eventsAdditionalData.unmappedErrorNames = e.invalidFields?.map((field) => field.name).filter(Boolean);
2344
+ } else {
2345
+ setValidationErrors(getErrors);
2346
+ }
2347
+ } else if (isMaintenanceModeError(e)) {
2348
+ showToast({
2349
+ label: i18n.get("maintenanceModeMessage"),
2350
+ variant: "error",
2351
+ duration: "indefinite"
2352
+ });
2353
+ } else {
2354
+ showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
2355
+ }
2356
+ setLoadingStatus("success");
2357
+ userEvents.addTaskEvent("Encountered error", {
2358
+ actionType: "submit",
2359
+ additionalData: eventsAdditionalData,
2360
+ returnType: e?.errorCode,
2361
+ returnValue: e?.title || "backend"
2362
+ });
2363
+ }
2364
+ };
2365
+ const datasetUtils = datasetUtilities(i18n.locale);
2366
+ const formatIdDocument = (idDocument2) => {
2367
+ if (!idDocument2) return void 0;
2368
+ const documentType = idDocument2?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
2369
+ (document2) => idDocument2.instantIdVerificationData?.document_front.type === document2.id
2370
+ ) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
2371
+ if (!documentType) return void 0;
2372
+ const frontPage = idDocument2.idFrontPage?.[0];
2373
+ const backPage = idDocument2.idBackPage?.[0];
2374
+ if (!frontPage) return void 0;
2375
+ return {
2376
+ documentType: i18n.get(documentType.name),
2377
+ ...backPage && documentType.hasBackPage ? {
2378
+ frontPage: frontPage.name,
2379
+ backPage: backPage.name
2380
+ } : {
2381
+ fileName: frontPage.name
2382
+ }
2383
+ };
2384
+ };
2385
+ const formatFileSummaryData = ({
2386
+ idVerificationMethod,
2387
+ manualIdUpload,
2388
+ proofOfNationalId,
2389
+ proofOfResidency,
2390
+ proofOfRelationship
2391
+ }) => {
2392
+ const proofOfNationalIdFile = proofOfNationalId?.proofOfNationalId?.[0];
2393
+ const proofOfResidencyFile = proofOfResidency?.proofOfResidency?.[0];
2394
+ const proofOfRelationshipFile = proofOfRelationship?.proofOfRelationship?.[0];
2395
+ const idDocument2 = idVerificationMethod?.idVerificationMethod === "manualVerification" ? manualIdUpload : idVerificationMethod?.idDocument;
2396
+ return {
2397
+ ...(idDocument2?.idDocumentType || idDocument2?.instantIdVerificationData) && {
2398
+ idDocument: formatIdDocument(idDocument2)
2399
+ },
2400
+ ...proofOfNationalIdFile && {
2401
+ proofOfNationalId: {
2402
+ fileName: proofOfNationalIdFile.name
2403
+ }
2404
+ },
2405
+ ...proofOfResidencyFile && {
2406
+ proofOfResidency: {
2407
+ fileName: proofOfResidencyFile.name
2408
+ }
2409
+ },
2410
+ ...proofOfRelationshipFile && {
2411
+ proofOfRelationship: {
2412
+ fileName: proofOfRelationshipFile.name
2413
+ }
2414
+ }
2415
+ };
2416
+ };
2417
+ const isManualVerificationOrExistingDoc = (idVerificationMethod) => idVerificationMethod === "manualVerification" || idVerificationMethod === "existingDocument";
2418
+ const formatDataForSummary = () => {
2419
+ let summaryData = cloneObject(data);
2420
+ if (summaryData?.basicDetails?.phoneNumber) {
2421
+ summaryData.basicDetails.phoneNumber = summaryData.basicDetails.phoneNumber.number;
2422
+ }
2423
+ if (summaryData.additionalPersonalDetails?.nationality) {
2424
+ summaryData.additionalPersonalDetails.nationality = datasetUtils.getCountryName(
2425
+ summaryData.additionalPersonalDetails.nationality
2426
+ );
2427
+ }
2428
+ if (data.additionalPersonalDetails) {
2429
+ if (isCompatibleJapanVersion(country, versionData?.version)) {
2430
+ summaryData.additionalPersonalDetails = {
2431
+ ...drop(...JP_ADDRESS_REQUIRED_FIELDS).from(summaryData.additionalPersonalDetails),
2432
+ ...mapJpAddressSummary(data.additionalPersonalDetails, datasetUtils)
2433
+ };
2434
+ } else {
2435
+ summaryData.additionalPersonalDetails = {
2436
+ ...summaryData.additionalPersonalDetails,
2437
+ ...mapAddressLabels(data.additionalPersonalDetails, datasetUtils)
2438
+ };
2439
+ }
2440
+ }
2441
+ if (summaryData.basicDetails?.accountHolder) {
2442
+ summaryData.basicDetails.accountHolder = i18n.get(summaryData.basicDetails.accountHolder);
2443
+ }
2444
+ if (summaryData.additionalPersonalDetails?.birthDate) {
2445
+ summaryData.additionalPersonalDetails.birthDate = localizeDateString(
2446
+ summaryData.additionalPersonalDetails.birthDate,
2447
+ i18n.locale
2448
+ );
2449
+ }
2450
+ if (isManualVerificationOrExistingDoc(summaryData.idVerificationMethod?.idVerificationMethod) || summaryData.proofOfResidency) {
2451
+ const fileSummaryData = formatFileSummaryData(data);
2452
+ summaryData = { ...summaryData, ...fileSummaryData };
2453
+ summaryData.manualIdUpload = { ...summaryData.idDocument };
2454
+ summaryData.idVerificationMethod.idDocument = { ...summaryData.idDocument };
2455
+ }
2456
+ if (summaryData.additionalPersonalDetails?.taxInformation) {
2457
+ const taxInformation = summaryData.additionalPersonalDetails.taxInformation.find(
2458
+ (taxId) => taxId.country === data.additionalPersonalDetails?.nationality
2459
+ );
2460
+ if (taxInformation) {
2461
+ delete summaryData.additionalPersonalDetails.taxInformation;
2462
+ summaryData.additionalPersonalDetails[taxInformation.type] = taxInformation.number;
2463
+ }
2464
+ }
2465
+ if (summaryData?.signatoryQuestionnaire) {
2466
+ summaryData.signatoryQuestionnaire = data?.signatoryQuestionnaire?.isSignatory === GuidanceQuestionValues.YES ? [i18n.get("signatorySummaryLabel")] : [];
2467
+ }
2468
+ if (summaryData?.uboQuestionnaire) {
2469
+ const roleFieldToLabelMap = {
2470
+ isOwner: "ownerSummaryLabel",
2471
+ isControllingPerson: "controllingPersonSummaryLabel",
2472
+ isDirector: "directorSummaryLabel"
2473
+ };
2474
+ summaryData.uboQuestionnaire = Object.keys(roleFieldToLabelMap).flatMap(
2475
+ (field) => data?.uboQuestionnaire?.[field] === GuidanceQuestionValues.YES ? [t(($) => $[roleFieldToLabelMap[field]])] : []
2476
+ );
2477
+ }
2478
+ return summaryData;
2479
+ };
2480
+ const omittedKeysForSummary = [
2481
+ ...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
2482
+ ...data?.additionalPersonalDetails?.idNumberExempt ? ["idNumber"] : [],
2483
+ ...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod", "modificationDate"] : []
2484
+ ];
2485
+ const isUploadEmpty = !data?.manualIdUpload || Object.keys(data?.manualIdUpload).length === 0;
2486
+ const omittedFormsForSummary = [
2487
+ // 1. Omit idDocument if instant OR (manual/existing AND upload is empty)
2488
+ ...data?.idVerificationMethod?.idVerificationMethod === "instantVerification" || isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) && isUploadEmpty ? ["idDocument"] : [],
2489
+ // 2. Omit idVerificationMethod if manual or existing
2490
+ ...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod"] : []
2491
+ ];
2492
+ const customLabelsForSummary = {
2493
+ idVerificationMethod: data?.idVerificationMethod?.idVerificationMethod === "instantVerification" ? "idVerificationMethod" : "idDocument"
2494
+ };
2495
+ const {
2496
+ handleNextClick,
2497
+ handleBackClick,
2498
+ activeForm,
2499
+ shouldValidate,
2500
+ gotoFormByFormIndex,
2501
+ steps
2502
+ } = useFormComposer({
2503
+ problems,
2504
+ externalBackClick,
2505
+ forms,
2506
+ onSubmit,
2507
+ triggerValidation: form.triggerValidation
2508
+ // TODO: figure out type of nested keys
2509
+ });
2510
+ const isVerificationMethod = activeForm?.formId === "idVerificationMethod";
2511
+ const disableNextButton = isVerificationMethod && !activeForm?.isValid || isNextStepDisabled.value;
2512
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
2513
+ /* @__PURE__ */ jsx(Show, { when: shouldShowIdNowModal, children: /* @__PURE__ */ jsx(IdNowVerificationModal, { handleFinish: handleHomeClick }) }),
2514
+ /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
2515
+ FormFlow,
2516
+ {
2517
+ summary: {
2518
+ data: formatDataForSummary(),
2519
+ omitted: {
2520
+ keys: omittedKeysForSummary,
2521
+ forms: omittedFormsForSummary
2522
+ },
2523
+ problems,
2524
+ labels: customLabelsForSummary
2525
+ },
2526
+ asModal,
2527
+ currentStep: steps.current,
2528
+ disableNextButton,
2529
+ forms,
2530
+ gotoFormByFormIndex,
2531
+ handleBackClick,
2532
+ handleCancelClick: handleHomeClick,
2533
+ handleNextClick: nextHandler || handleNextClick,
2534
+ loadingStatus,
2535
+ totalSteps: steps.total,
2536
+ children: /* @__PURE__ */ jsx(
2537
+ IndividualOnfido,
2538
+ {
2539
+ ...derivedProps,
2540
+ requiredFields,
2541
+ data,
2542
+ defaultCountry: country,
2543
+ activeForm,
2544
+ forms,
2545
+ scenarios,
2546
+ taskType,
2547
+ problems,
2548
+ onNext: handleNextClick,
2549
+ onBack: handleBackClick,
2550
+ legalEntityId: legalEntityResponse?.id,
2551
+ allowedRoles: roleTypes,
2552
+ shouldValidate,
2553
+ accountHolder,
2554
+ parentLegalEntity,
2555
+ trustedFields,
2556
+ trustedFieldsProvider,
2557
+ trustedRoles,
2558
+ setNextHandler,
2559
+ handleHomeClick
2560
+ }
2561
+ )
2562
+ }
2563
+ ) })
2564
+ ] });
2565
+ }
2566
+ export {
2567
+ IndividualOnfidoDropin as I,
2568
+ IndividualDropin as a
2569
+ };