@adyen/kyc-components 4.0.0-beta.1 → 4.0.0-beta.4

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 (628) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-BQ4Yct7L.js → AcceptTermsOfServiceComponent-ilX6szf9.js} +85 -82
  2. package/dist/{AccountSetupRejected-UVhxMcAe.js → AccountSetupRejected-CQjHA557.js} +6 -6
  3. package/dist/{Avatar-NEiNEcRx.js → Avatar-BfRRf9_a.js} +2 -2
  4. package/dist/{BusinessDetailsDropin-l0xfPekL.js → BusinessDetailsDropin-Dr580mIQ.js} +429 -405
  5. package/dist/{BusinessFinancingComponent-Bs-poF2d.js → BusinessFinancingComponent-CEIG-4wN.js} +3 -3
  6. package/dist/{BusinessFinancingDropin-DoRzdS4n.js → BusinessFinancingDropin-sC3QpkDx.js} +537 -489
  7. package/dist/{BusinessFinancingPage-DSlmJmOK.js → BusinessFinancingPage-BIEuNfKE.js} +3 -3
  8. package/dist/{BusinessTypeSelectionPage-Bmi_8K2g.js → BusinessTypeSelectionPage-6sF2ce3o.js} +111 -145
  9. package/dist/{CZ-BhoS6sd6.js → CZ-BiPeoA9G.js} +11 -1
  10. package/dist/{ContractViewer-R4-gfVmp.js → ContractViewer-BOxsPeO1.js} +306 -297
  11. package/dist/{CreateIndividualComponent-D3aXuYRk.js → CreateIndividualComponent-t9eDVjpb.js} +8 -8
  12. package/dist/{CreateTransferInstrumentComponent-C-ncZ-A8.js → CreateTransferInstrumentComponent-D65FAcQz.js} +7 -7
  13. package/dist/{CustomerSupport-CMFRgQNa.js → CustomerSupport-CoLWcgoS.js} +27 -32
  14. package/dist/{DebugModal-BEmhG3UP.js → DebugModal-DkICAsiu.js} +33 -239
  15. package/dist/{DecisionMakerDetailsPage-DI2Ubmef.js → DecisionMakerDetailsPage-CvmwdHqV.js} +4 -4
  16. package/dist/DecisionMakers-DthVv8_t.js +478 -0
  17. package/dist/{EmbeddedStatus-BsZsXbKc.js → EmbeddedStatus-DdGnEZzS.js} +16 -16
  18. package/dist/FormEndState-CUYkLBgX.js +59 -0
  19. package/dist/{FormFlow-Bt-mu4Wm.js → FormFlow-CNXkXUwa.js} +19 -20
  20. package/dist/{HU-v3vOxRm8.js → HU-D8vJYkDH.js} +10 -1
  21. package/dist/{IndividualOnfidoDropin-DGMCOm9M.js → IndividualOnfidoDropin-DV2fJG5W.js} +919 -895
  22. package/dist/{Introduction-DJ6qIUPC.js → Introduction-B1WXHc-7.js} +53 -57
  23. package/dist/{ProviderButton-DAsW5EVa.js → LandingLayout-BC3pp_IY.js} +93 -86
  24. package/dist/{LegalRepresentativeDetailsPage-CyHwQR_W.js → LegalRepresentativeDetailsPage-9xm-XCto.js} +4 -4
  25. package/dist/{ManageIndividualComponent-BIMCvcr2.js → ManageIndividualComponent-zCo6mUQx.js} +9 -13
  26. package/dist/{ManageTermsOfServiceComponent-CsM23jq3.js → ManageTermsOfServiceComponent-DpQXgPYk.js} +7 -8
  27. package/dist/{ManageTransferInstrumentComponent-Vut9_bRn.js → ManageTransferInstrumentComponent-BKERoin1.js} +23 -31
  28. package/dist/{OnboardingDropinComponent-BW6er2HU.js → OnboardingDropinComponent-DYdts9Sh.js} +521 -398
  29. package/dist/{Review-DWDbL9-9.js → Review-jBq7cFVv.js} +11 -11
  30. package/dist/RootBusinessDetailsPage-BfO0Xb7n.js +1848 -0
  31. package/dist/{RootIndividualDetailsPage-DCxJ3ycQ.js → RootIndividualDetailsPage-DzmHoceW.js} +4 -4
  32. package/dist/{SignPCIComponent-kHaxhkWa.js → SignPCIComponent-By4PazmA.js} +32 -38
  33. package/dist/{SingpassSelection-Dmlbiq4Z.js → SingpassSelection-BeUj9Kdy.js} +12 -15
  34. package/dist/{SoleProprietorshipPage-Bdhs90-q.js → SoleProprietorshipPage-CZPeKEEl.js} +4 -4
  35. package/dist/{SourceOfFundsPage-Bj22DAFv.js → SourceOfFundsPage-CI1qdFId.js} +508 -488
  36. package/dist/{StoreProvider-BmzY19Td.js → StoreProvider-O9jwxfG8.js} +20832 -21372
  37. package/dist/{TaskItemStatus-CB6FEOnk.js → TaskItemStatus-s7Z3DOGa.js} +24 -24
  38. package/dist/TaskStatusIndicator-BanufME0.js +69 -0
  39. package/dist/{TaxReportingDropin-jofokkei.js → TaxReportingDropin-BQqDUn9I.js} +82 -101
  40. package/dist/{TileGroup-i5Jc08ns.js → TileGroup-tu04B8GK.js} +6 -8
  41. package/dist/{TrustDetailsPage-B6HmvYUf.js → TrustDetailsPage-BQKZ_ZyU.js} +91 -80
  42. package/dist/{TrustMemberCompanyPage-D3VJOq6a.js → TrustMemberCompanyPage-C9aFr4Bm.js} +5 -5
  43. package/dist/{TrustMemberIndividualPage-1aeOYsnG.js → TrustMemberIndividualPage-Ci7hwMA_.js} +4 -4
  44. package/dist/{UnincorporatedPartnershipIndividualPage-Bt7e6ncF.js → UnincorporatedPartnershipIndividualPage-XQsgF3ou.js} +4 -4
  45. package/dist/{UnincorporatedPartnershipMemberCompanyPage-Ck5C_SEU.js → UnincorporatedPartnershipMemberCompanyPage-DFe_N3gH.js} +4 -4
  46. package/dist/{VerificationErrorAlert-DhtKOmjt.js → VerificationErrorAlert-Ci0cObw1.js} +20 -9
  47. package/dist/{ViewVerificationStatusComponent-DtKLcCGI.js → ViewVerificationStatusComponent-_qQmZFDY.js} +22 -21
  48. package/dist/adyen-business-financing.js +8 -12
  49. package/dist/adyen-individual.js +6 -4
  50. package/dist/adyen-kyc-components.js +144 -118
  51. package/dist/adyen-manage-individual.js +2 -2
  52. package/dist/adyen-manage-terms-of-service.js +3 -3
  53. package/dist/adyen-manage-transfer-instruments.js +3 -3
  54. package/dist/adyen-onboarding.js +14 -6
  55. package/dist/adyen-terms-of-service.js +18 -6
  56. package/dist/adyen-transfer-instrument.js +10 -6
  57. package/dist/adyen-verification-status.js +2 -2
  58. package/dist/bag-DpxmyXfR.js +14 -0
  59. package/dist/bg-BG-9uVrFuHv.js +23 -0
  60. package/dist/bg-BG-BY3Wa361.js +54 -0
  61. package/dist/bg-BG-BiYtb1Tz.js +55 -0
  62. package/dist/bg-BG-BvSUDgGF.js +13 -0
  63. package/dist/bg-BG-CMomhopf.js +35 -0
  64. package/dist/bg-BG-Dy6-IwuZ.js +28 -0
  65. package/dist/bg-BG-NMIts2sa.js +35 -0
  66. package/dist/{plaintext-B39yQnOr.js → bg-BG-hFblesn-.js} +4 -6
  67. package/dist/business-lines-DboUCbXw.js +135 -0
  68. package/dist/{_plugin-vue_export-helper-CgYpM5kA.js → cs-CZ-B8IPRc47.js} +4 -8
  69. package/dist/cs-CZ-BEFeaKsV.js +54 -0
  70. package/dist/cs-CZ-Csr_35T-.js +35 -0
  71. package/dist/cs-CZ-DMzortvO.js +35 -0
  72. package/dist/cs-CZ-Dbow28-o.js +28 -0
  73. package/dist/cs-CZ-Wzc382q6.js +23 -0
  74. package/dist/cs-CZ-wdftovLe.js +55 -0
  75. package/dist/cs-CZ-y4mvq4Lv.js +13 -0
  76. package/dist/da-DK-4QAKic_C.js +55 -0
  77. package/dist/da-DK-Adj8R5Qn.js +28 -0
  78. package/dist/da-DK-BTpZzEgA.js +15 -0
  79. package/dist/da-DK-CeNMXUfE.js +23 -0
  80. package/dist/da-DK-D6UK8XT9.js +54 -0
  81. package/dist/da-DK-Dm8o1giq.js +35 -0
  82. package/dist/da-DK-q2b_1elr.js +35 -0
  83. package/dist/da-DK-qgQOVjDp.js +13 -0
  84. package/dist/de-DE-B3nctkG8.js +13 -0
  85. package/dist/de-DE-BG0tKqvi.js +28 -0
  86. package/dist/de-DE-BzumFI3T.js +55 -0
  87. package/dist/de-DE-D2ByeIZs.js +35 -0
  88. package/dist/de-DE-DMFaycio.js +35 -0
  89. package/dist/de-DE-DUl6gRKv.js +54 -0
  90. package/dist/de-DE-DjOUNvp6.js +15 -0
  91. package/dist/de-DE-JI-7mvxy.js +23 -0
  92. package/dist/de-DE-pSdsxBpQ.js +13 -0
  93. package/dist/decision-makers-group-CgddXgrx.js +1944 -0
  94. package/dist/el-GR-B5j7VZ3E.js +54 -0
  95. package/dist/el-GR-Bvjk5Sw8.js +13 -0
  96. package/dist/el-GR-CGeBAkDN.js +35 -0
  97. package/dist/el-GR-CXmTklMq.js +55 -0
  98. package/dist/el-GR-CdgLZhuO.js +13 -0
  99. package/dist/el-GR-Cu9HwD-f.js +15 -0
  100. package/dist/el-GR-DGW388LZ.js +35 -0
  101. package/dist/el-GR-DerT143K.js +28 -0
  102. package/dist/el-GR-DfNOPkLq.js +23 -0
  103. package/dist/en-US-BQpgt41j.js +37 -0
  104. package/dist/en-US-BTYdAWXp.js +15 -0
  105. package/dist/en-US-Bq2Twy6x.js +54 -0
  106. package/dist/en-US-CQ3angjM.js +22 -0
  107. package/dist/en-US-CkZcSKGh.js +35 -0
  108. package/dist/en-US-DHq7VYFs.js +23 -0
  109. package/dist/en-US-DLm6gy6T.js +58 -0
  110. package/dist/en-US-DSoLr6rp.js +13 -0
  111. package/dist/en-US-SbE0c1gn.js +36 -0
  112. package/dist/es-ES-BM4U0hT3.js +28 -0
  113. package/dist/es-ES-BRfK6tX7.js +13 -0
  114. package/dist/es-ES-BhQOdKge.js +55 -0
  115. package/dist/es-ES-Cavm0szq.js +54 -0
  116. package/dist/es-ES-Cj7q7fWO.js +15 -0
  117. package/dist/es-ES-DOVPTeyf.js +23 -0
  118. package/dist/es-ES-Dy1uR2H_.js +13 -0
  119. package/dist/es-ES-WWftn3JX.js +35 -0
  120. package/dist/es-ES-pXHx3ODy.js +35 -0
  121. package/dist/et-EE-BJIsPOnh.js +23 -0
  122. package/dist/et-EE-CFlzRBEx.js +55 -0
  123. package/dist/et-EE-D5lRJbMZ.js +35 -0
  124. package/dist/et-EE-DUWZ2Vqm.js +54 -0
  125. package/dist/et-EE-Dor3enPS.js +15 -0
  126. package/dist/et-EE-OJg_PSHf.js +28 -0
  127. package/dist/et-EE-QLVnr6Vl.js +35 -0
  128. package/dist/et-EE-d9V24rcf.js +13 -0
  129. package/dist/fi-FI-B0fnAFV2.js +13 -0
  130. package/dist/fi-FI-BJ2l42Pj.js +28 -0
  131. package/dist/fi-FI-BNcnKrJ9.js +15 -0
  132. package/dist/fi-FI-D522KHGk.js +23 -0
  133. package/dist/fi-FI-D9E_KaJi.js +35 -0
  134. package/dist/fi-FI-DT351N-G.js +35 -0
  135. package/dist/fi-FI-DVa-ccaW.js +54 -0
  136. package/dist/fi-FI-Djollt2G.js +55 -0
  137. package/dist/fr-FR-BNXXNUX_.js +35 -0
  138. package/dist/fr-FR-Bn3D6mmY.js +15 -0
  139. package/dist/fr-FR-BoKzVp2q.js +13 -0
  140. package/dist/fr-FR-CY9emHgF.js +54 -0
  141. package/dist/fr-FR-Cv0k-3Xc.js +35 -0
  142. package/dist/fr-FR-DInQKkTd.js +23 -0
  143. package/dist/fr-FR-Dk6Lw2On.js +13 -0
  144. package/dist/fr-FR-g7lmxEsI.js +28 -0
  145. package/dist/fr-FR-l36qBV3a.js +55 -0
  146. package/dist/{getFieldsWithExistingData-BW8_TEQl.js → getFieldsWithExistingData-7pZnHro-.js} +3 -4
  147. package/dist/{hasDataChanged-Mu0HyZ3E.js → hasDataChanged-v0hD-nEq.js} +4 -4
  148. package/dist/hr-HR-B8AZ4eHJ.js +35 -0
  149. package/dist/hr-HR-CDUE36Dg.js +28 -0
  150. package/dist/hr-HR-CF0AHQzi.js +13 -0
  151. package/dist/hr-HR-CNzbyo9r.js +15 -0
  152. package/dist/hr-HR-CnP5sqih.js +54 -0
  153. package/dist/hr-HR-CzSrqEFA.js +35 -0
  154. package/dist/hr-HR-DTCY4iL8.js +55 -0
  155. package/dist/hr-HR-DzS44Gpv.js +23 -0
  156. package/dist/hu-HU-BSOiZA7a.js +15 -0
  157. package/dist/hu-HU-BTlpbCpc.js +54 -0
  158. package/dist/hu-HU-Bmf13NMf.js +28 -0
  159. package/dist/hu-HU-BznXPoc2.js +55 -0
  160. package/dist/hu-HU-CSPhOvLC.js +13 -0
  161. package/dist/hu-HU-DRi6Dz9U.js +35 -0
  162. package/dist/hu-HU-xCvNM5TU.js +23 -0
  163. package/dist/hu-HU-zK6nUqWr.js +35 -0
  164. package/dist/it-IT-BEWyAQUU.js +55 -0
  165. package/dist/it-IT-BH-eqIKH.js +13 -0
  166. package/dist/it-IT-BeYbInCQ.js +35 -0
  167. package/dist/it-IT-C_fNHhjE.js +35 -0
  168. package/dist/it-IT-CjEYONJg.js +23 -0
  169. package/dist/it-IT-D7G4BaP7.js +13 -0
  170. package/dist/it-IT-DYIx7myn.js +28 -0
  171. package/dist/it-IT-DvM-9LpM.js +15 -0
  172. package/dist/it-IT-GgHc0cHR.js +54 -0
  173. package/dist/ja-JP-B3yqM_FM.js +13 -0
  174. package/dist/ja-JP-BUz3qN-V.js +23 -0
  175. package/dist/ja-JP-BhS-_dIx.js +54 -0
  176. package/dist/ja-JP-C1OQ16fo.js +35 -0
  177. package/dist/ja-JP-D7oL6xGY.js +55 -0
  178. package/dist/ja-JP-DTW_hY1L.js +13 -0
  179. package/dist/ja-JP-GXkLvnQ4.js +15 -0
  180. package/dist/ja-JP-tx1DbZYD.js +28 -0
  181. package/dist/ja-JP-weDU8GLW.js +35 -0
  182. package/dist/{localizeDateString-QtCjf8Fg.js → localizeDateString-BlZ_CtJI.js} +6 -6
  183. package/dist/lt-LT-B6CJ4ULI.js +23 -0
  184. package/dist/lt-LT-BUYY0LaT.js +35 -0
  185. package/dist/lt-LT-BxScCodJ.js +28 -0
  186. package/dist/lt-LT-DNjXmQPv.js +15 -0
  187. package/dist/lt-LT-DTQGR9M0.js +54 -0
  188. package/dist/lt-LT-De7dLXxI.js +55 -0
  189. package/dist/lt-LT-Lzl_Cbw-.js +13 -0
  190. package/dist/lt-LT-_MzAcXJo.js +35 -0
  191. package/dist/lv-LV-B9js9VoA.js +35 -0
  192. package/dist/lv-LV-BQ4F1GrV.js +54 -0
  193. package/dist/lv-LV-CRhXAjn6.js +35 -0
  194. package/dist/lv-LV-ChOoZuhc.js +15 -0
  195. package/dist/lv-LV-DTtuyfHS.js +23 -0
  196. package/dist/lv-LV-De9rdme0.js +55 -0
  197. package/dist/lv-LV-F9_Fiu3w.js +28 -0
  198. package/dist/lv-LV-y00wN1pj.js +13 -0
  199. package/dist/mail-Z_IE_hkw.js +14 -0
  200. package/dist/{mapFinancialReportsToFinancialInformation-C-2jp0wg.js → mapFinancialReportsToFinancialInformation-DrS0xN6i.js} +19 -12
  201. package/dist/minus-circle-filled-BGKeHaxJ.js +17 -0
  202. package/dist/nl-NL-BHqiO21q.js +15 -0
  203. package/dist/nl-NL-CFzm75Jw.js +13 -0
  204. package/dist/nl-NL-CUcML482.js +54 -0
  205. package/dist/nl-NL-Cht7cSwD.js +28 -0
  206. package/dist/nl-NL-DLedC3mO.js +35 -0
  207. package/dist/nl-NL-Dbx0ZmI7.js +35 -0
  208. package/dist/nl-NL-DmnFXAQC.js +13 -0
  209. package/dist/nl-NL-Zcq0bXd-.js +23 -0
  210. package/dist/nl-NL-lZcJhRsP.js +55 -0
  211. package/dist/no-NO-BBCvsecq.js +54 -0
  212. package/dist/no-NO-BEIyAMmZ.js +55 -0
  213. package/dist/no-NO-BQAqVzF4.js +28 -0
  214. package/dist/no-NO-BxReX6oF.js +23 -0
  215. package/dist/no-NO-C0sfkp82.js +35 -0
  216. package/dist/no-NO-CKT9kLAH.js +15 -0
  217. package/dist/no-NO-CpVal4cV.js +35 -0
  218. package/dist/no-NO-DbvFfP96.js +13 -0
  219. package/dist/pay-by-link-plane-Pv7Babgn.js +22 -0
  220. package/dist/pl-PL--mmxopYA.js +13 -0
  221. package/dist/pl-PL-1ylK-_FE.js +35 -0
  222. package/dist/pl-PL-CqxMKpBm.js +28 -0
  223. package/dist/pl-PL-D6heiKsH.js +15 -0
  224. package/dist/pl-PL-DAPGaxWi.js +35 -0
  225. package/dist/pl-PL-DD3wVcKc.js +55 -0
  226. package/dist/pl-PL-T6uD5--R.js +23 -0
  227. package/dist/pl-PL-kGaeUP-w.js +54 -0
  228. package/dist/plus-circle-filled-Cnf1oJTm.js +17 -0
  229. package/dist/pt-PT-BVzXBFp7.js +13 -0
  230. package/dist/pt-PT-BY9rcwcF.js +35 -0
  231. package/dist/pt-PT-BkvMsoK4.js +35 -0
  232. package/dist/pt-PT-BsDCHbWN.js +55 -0
  233. package/dist/pt-PT-CBbmkr_J.js +28 -0
  234. package/dist/pt-PT-D2elvnDU.js +15 -0
  235. package/dist/pt-PT-DpDxAynk.js +13 -0
  236. package/dist/pt-PT-JVqqgvPs.js +54 -0
  237. package/dist/pt-PT-N0njcfLO.js +23 -0
  238. package/dist/{resolveEnvironment-Dx0BPNMa.js → resolveEnvironment-DvSgDDo8.js} +3 -3
  239. package/dist/ro-RO-C83h2zHZ.js +54 -0
  240. package/dist/ro-RO-CUg8-CQ8.js +55 -0
  241. package/dist/ro-RO-Cdmevo9A.js +13 -0
  242. package/dist/ro-RO-DJLWmWZ4.js +35 -0
  243. package/dist/ro-RO-DL9V1CMj.js +15 -0
  244. package/dist/ro-RO-Dfx0g3bU.js +35 -0
  245. package/dist/ro-RO-IY3AMhwm.js +28 -0
  246. package/dist/ro-RO-Ic1SzBgx.js +23 -0
  247. package/dist/ru-RU-FZb2upqh.js +13 -0
  248. package/dist/{rules-CUANHpja.js → rules-Meybz2dk.js} +45 -72
  249. package/dist/sk-SK-B7o3L57C.js +35 -0
  250. package/dist/sk-SK-BDKRZ2mM.js +28 -0
  251. package/dist/sk-SK-BSioQTMW.js +15 -0
  252. package/dist/sk-SK-CgLJIuJw.js +54 -0
  253. package/dist/sk-SK-CiD0FeLN.js +23 -0
  254. package/dist/sk-SK-Cjrkrb85.js +55 -0
  255. package/dist/sk-SK-iO863_t2.js +35 -0
  256. package/dist/sk-SK-nfeuTcY5.js +13 -0
  257. package/dist/sl-SI-BB0suyr1.js +28 -0
  258. package/dist/sl-SI-BE_ndzZ2.js +55 -0
  259. package/dist/sl-SI-BylvpF-X.js +15 -0
  260. package/dist/sl-SI-BzeVaC1Z.js +54 -0
  261. package/dist/sl-SI-C8CMAkD0.js +35 -0
  262. package/dist/sl-SI-Cth2Qa5T.js +35 -0
  263. package/dist/sl-SI-DUTZDqkP.js +13 -0
  264. package/dist/sl-SI-MZoDApq9.js +23 -0
  265. package/dist/solution-payments-DTAuLSWF.js +14 -0
  266. package/dist/style.css +1018 -1144
  267. package/dist/styles-CLV89_hH.js +1018 -1144
  268. package/dist/sv-SE-BTx2XKAp.js +13 -0
  269. package/dist/sv-SE-BryiIPVv.js +55 -0
  270. package/dist/sv-SE-Bwh0wKFk.js +35 -0
  271. package/dist/sv-SE-CVmo11gI.js +54 -0
  272. package/dist/sv-SE-DCFSf4Oj.js +23 -0
  273. package/dist/sv-SE-DYruQSzt.js +28 -0
  274. package/dist/sv-SE-Dwz1yTrB.js +15 -0
  275. package/dist/sv-SE-OPOHtqtP.js +35 -0
  276. package/dist/sv-SE-rckxD-43.js +13 -0
  277. package/dist/terminal-1-ewywjFJI.js +18 -0
  278. package/dist/types/api/companySelection/useCompanySelection.d.ts +18 -1
  279. package/dist/types/api/configurations/useScenarios.d.ts +6 -6
  280. package/dist/types/api/idNowProvider/idNowProvider.types.d.ts +1 -2
  281. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +4 -8
  282. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +2 -3
  283. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +26 -24
  284. package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/types.d.ts +10 -10
  285. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -2
  286. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +0 -306
  287. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -1
  288. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformationMultiform.d.ts +9 -0
  289. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +2 -1
  290. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +10 -0
  291. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +4 -3
  292. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +15 -3
  293. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +5 -3
  294. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -2
  295. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelectionMultiform.d.ts +14 -0
  296. package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +3 -0
  297. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructureMultiform.d.ts +4 -0
  298. package/dist/types/components/Business/forms/forms.types.d.ts +14 -0
  299. package/dist/types/components/Business/forms/rules.d.ts +27 -8
  300. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +2 -1
  301. package/dist/types/components/Business/mapping/businessDetails/mapOrganizationTypeToCompanyType.d.ts +1 -1
  302. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
  303. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +5 -3
  304. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +4 -3
  305. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +0 -3
  306. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +18 -0
  307. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiformDropin.d.ts +5 -0
  308. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/types.d.ts +2 -0
  309. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +21 -0
  310. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/validate.d.ts +22 -0
  311. package/dist/types/components/Business/utils/companyTypeMetadata.d.ts +1 -1
  312. package/dist/types/components/Business/utils/companyUtil.d.ts +3 -3
  313. package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +5 -0
  314. package/dist/types/components/BusinessLines/tasks/BusinessLinesDropin.d.ts +5 -0
  315. package/dist/types/components/BusinessLines/tasks/BusinessLinesGettingStarted/BusinessLinesGettingStarted.d.ts +6 -0
  316. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +2 -2
  317. package/dist/types/components/EFP/fields/LegalFormField/types.d.ts +4 -2
  318. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +36 -336
  319. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
  320. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +1 -0
  321. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -19
  322. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +5 -4
  323. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +1 -0
  324. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.d.ts +1 -2
  325. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +2 -2
  326. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
  327. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +3 -3
  328. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/useNavigation.d.ts +5 -5
  329. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +1 -1
  330. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/content.d.ts +1 -1
  331. package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +6 -0
  332. package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +2 -2
  333. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +0 -2
  334. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +2 -2
  335. package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +2 -2
  336. package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +8 -8
  337. package/dist/types/components/Individual/forms/Individual/ProofOfResidency/types.d.ts +18 -18
  338. package/dist/types/components/Individual/forms/Individual/rules.d.ts +1 -1
  339. package/dist/types/components/Individual/forms/Individual/types.d.ts +2 -2
  340. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.d.ts +1 -2
  341. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +3 -2
  342. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +2 -2
  343. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +2 -2
  344. package/dist/types/components/Individual/forms/IndividualOnfido/GuidanceQuestion/GuidanceQuestion.d.ts +7 -3
  345. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -1
  346. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +3 -1
  347. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -2
  348. package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +2 -2
  349. package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
  350. package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +3 -3
  351. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +3 -0
  352. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +3 -0
  353. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +1 -1
  354. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.d.ts +2 -0
  355. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +7 -0
  356. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersGettingStarted.d.ts +5 -0
  357. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersModalContent.d.ts +1 -0
  358. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
  359. package/dist/types/components/Shared/EntityGuidanceStatus/types.d.ts +4 -4
  360. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -1
  361. package/dist/types/components/Shared/FormNavigation/FormNavigationItem.d.ts +1 -2
  362. package/dist/types/components/Shared/Introduction/Introduction.d.ts +2 -2
  363. package/dist/types/components/Shared/Introduction/IntroductionScreen.d.ts +2 -2
  364. package/dist/types/components/Shared/Introduction/constants.d.ts +3 -3
  365. package/dist/types/components/Shared/Introduction/copy.d.ts +8 -7
  366. package/dist/types/components/Shared/Introduction/types.d.ts +11 -11
  367. package/dist/types/components/Shared/SingpassBanner/SingpassBanner.d.ts +1 -1
  368. package/dist/types/components/Shared/Summary/Summary.d.ts +0 -1
  369. package/dist/types/components/Shared/devex/DebugListener/DebugModal.d.ts +0 -1
  370. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  371. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -1
  372. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +5 -7
  373. package/dist/types/components/Shared/fields/CountryField/types.d.ts +1 -1
  374. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  375. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  376. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -3
  377. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
  378. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  379. package/dist/types/components/Shared/fields/FinancialReportingDate/types.d.ts +1 -1
  380. package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +2 -2
  381. package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
  382. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +27 -27
  383. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultRegistrationNumberType.d.ts +16 -0
  384. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultTaxIdNumberType.d.ts +2 -2
  385. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultVatNumberType.d.ts +13 -0
  386. package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferTaxIdNumberType.d.ts +2 -2
  387. package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -2
  388. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
  389. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +12 -0
  390. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +5 -0
  391. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  392. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -2
  393. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +1 -1
  394. package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
  395. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  396. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  397. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  398. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -2
  399. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +8 -6
  400. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +3 -7
  401. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  402. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +2 -4
  403. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  404. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +2 -2
  405. package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +11 -10
  406. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
  407. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
  408. package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +4 -1
  409. package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +7 -5
  410. package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +1 -2
  411. package/dist/types/components/Shared/tasks/TaskList/TaskListItem.d.ts +1 -1
  412. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +3 -4
  413. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -2
  414. package/dist/types/components/Trust/forms/Trust/rules.d.ts +1 -0
  415. package/dist/types/components/Trust/forms/Trust/types.d.ts +1 -1
  416. package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +2 -2
  417. package/dist/types/components/Trust/forms/TrustRoleAndEntityType/types.d.ts +1 -2
  418. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +3 -3
  419. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -1
  420. package/dist/types/components/Trust/tasks/TrustMembers/CompanyTrustMemberTaskItem.d.ts +1 -1
  421. package/dist/types/components/Trust/tasks/TrustMembers/ExemptSettlorTaskItem.d.ts +1 -1
  422. package/dist/types/components/Trust/tasks/TrustMembers/RegularTrustMemberTaskItem.d.ts +1 -1
  423. package/dist/types/components/Trust/tasks/TrustMembers/RootTrusteeTaskItem.d.ts +1 -1
  424. package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +6 -6
  425. package/dist/types/components/Trust/utils/trustMemberGuidance.d.ts +7 -6
  426. package/dist/types/components/Trust/utils/trustMemberRequirements.d.ts +1 -1
  427. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +6 -6
  428. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +5 -5
  429. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRadioGroup.d.ts +4 -5
  430. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -2
  431. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/types.d.ts +2 -2
  432. package/dist/types/components/ui/atoms/Accordion/Accordion.d.ts +1 -2
  433. package/dist/types/components/ui/atoms/Button/Button.d.ts +2 -3
  434. package/dist/types/components/ui/atoms/Button/Button.types.d.ts +3 -3
  435. package/dist/types/components/ui/atoms/Field/Field.d.ts +3 -6
  436. package/dist/types/components/ui/atoms/Field/Field.types.d.ts +9 -12
  437. package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +4 -6
  438. package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +4 -4
  439. package/dist/types/components/ui/atoms/List/List.d.ts +12 -0
  440. package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +16 -0
  441. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  442. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +3 -3
  443. package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -2
  444. package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -2
  445. package/dist/types/components/ui/atoms/Select/Select.types.d.ts +1 -0
  446. package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
  447. package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -4
  448. package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -2
  449. package/dist/types/components/ui/atoms/SelectList/SelectList.types.d.ts +2 -2
  450. package/dist/types/components/ui/atoms/SelectListItem/SelectListItem.types.d.ts +3 -3
  451. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +18 -0
  452. package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +1 -1
  453. package/dist/types/components/ui/atoms/TextArea/TextArea.d.ts +1 -2
  454. package/dist/types/components/ui/atoms/Tile/Tile.d.ts +1 -2
  455. package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +11 -0
  456. package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +8 -0
  457. package/dist/types/components/ui/molecules/Alert/VerificationErrorAlert.d.ts +1 -1
  458. package/dist/types/components/ui/molecules/Alert/types.d.ts +1 -0
  459. package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -2
  460. package/dist/types/components/ui/molecules/Card/types.d.ts +3 -3
  461. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -2
  462. package/dist/types/components/ui/molecules/Dropzone/Dropzone.d.ts +1 -2
  463. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -4
  464. package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +3 -3
  465. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +4 -4
  466. package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -1
  467. package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +1 -2
  468. package/dist/types/components/ui/molecules/InputDate/InputDate.d.ts +3 -3
  469. package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +2 -2
  470. package/dist/types/constants/keys.d.ts +2 -0
  471. package/dist/types/context/ExperimentContext/types.d.ts +52 -36
  472. package/dist/types/context/SettingsContext/types.d.ts +24 -24
  473. package/dist/types/core/EmbedShell/EmbedShell.d.ts +1 -0
  474. package/dist/types/core/UIElement/UIElement.d.ts +1 -0
  475. package/dist/types/core/models/api/company-types-value.d.ts +12 -11
  476. package/dist/types/core/models/api/decision-maker-type.d.ts +7 -6
  477. package/dist/types/core/models/api/entity-type.d.ts +5 -4
  478. package/dist/types/core/models/api/financialReport.d.ts +2 -2
  479. package/dist/types/core/models/api/get-scenarios.d.ts +18 -18
  480. package/dist/types/core/models/api/individual.d.ts +1 -0
  481. package/dist/types/core/models/api/legal-arrangement.d.ts +10 -2
  482. package/dist/types/core/models/api/legal-entity-association.d.ts +2 -2
  483. package/dist/types/core/models/api/legal-entity-type.d.ts +8 -7
  484. package/dist/types/core/models/api/organization.d.ts +8 -0
  485. package/dist/types/core/models/api/trust-member-type.d.ts +8 -8
  486. package/dist/types/core/models/api/trusted-fields-provider.d.ts +5 -4
  487. package/dist/types/core/models/api/unincorporated-partnership.d.ts +6 -6
  488. package/dist/types/core/models/api/verification-error.d.ts +8 -7
  489. package/dist/types/core/models/api/verification-status.d.ts +7 -6
  490. package/dist/types/core/models/api/view-verification-status.d.ts +8 -7
  491. package/dist/types/core/user-events.d.ts +1 -1
  492. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +1 -1
  493. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +6 -1
  494. package/dist/types/embeds/individual/adyen-individual.types.d.ts +6 -1
  495. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +1 -0
  496. package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +4 -1
  497. package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +7 -1
  498. package/dist/types/embeds/transfer-instrument/AdyenTransferInstrument.d.ts +2 -1
  499. package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -2
  500. package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +4 -4
  501. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +7 -6
  502. package/dist/types/hooks/useBusinessSetup.d.ts +11 -10
  503. package/dist/types/hooks/useDataMissingRemediations.d.ts +2 -2
  504. package/dist/types/hooks/useForm/types.d.ts +0 -2
  505. package/dist/types/hooks/useFormComposer.d.ts +1 -1
  506. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +31 -0
  507. package/dist/types/hooks/useLegalEntityType.d.ts +1 -1
  508. package/dist/types/hooks/useMultiForm/types.d.ts +38 -36
  509. package/dist/types/hooks/useMultiForm/useMultiForm.d.ts +1 -1
  510. package/dist/types/hooks/useScenarioConfiguration.d.ts +2 -2
  511. package/dist/types/language/Language.d.ts +1 -7
  512. package/dist/types/language/i18n.d.ts +2 -0
  513. package/dist/types/language/types.d.ts +5 -0
  514. package/dist/types/language/utils.d.ts +11 -2
  515. package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +2 -2
  516. package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +2 -2
  517. package/dist/types/stores/globalStore/get-task-status.d.ts +2 -2
  518. package/dist/types/stores/globalStore/globalStore.d.ts +7 -7
  519. package/dist/types/stores/globalStore/taskStatus.d.ts +17 -16
  520. package/dist/types/stores/globalStore/taskTypes.d.ts +37 -35
  521. package/dist/types/types/datasets/country-code.d.ts +249 -249
  522. package/dist/types/types/datasets/currency.d.ts +25 -25
  523. package/dist/types/types/datasets/province-code.d.ts +46 -46
  524. package/dist/types/types/datasets/state-code.d.ts +84 -84
  525. package/dist/types/types/errors/entity-problems.d.ts +3 -4
  526. package/dist/types/types/form-rules.d.ts +2 -2
  527. package/dist/types/utils/api/processValidationErrors.d.ts +2 -2
  528. package/dist/types/utils/birthDateUtils.d.ts +3 -3
  529. package/dist/types/utils/decisionMaker.d.ts +4 -3
  530. package/dist/types/utils/decisionMakerRoles.d.ts +4 -3
  531. package/dist/types/utils/entityAssociationUtil.d.ts +4 -5
  532. package/dist/types/utils/entityStatusUtil.d.ts +3 -3
  533. package/dist/types/utils/eventHandlers/handleKeys.d.ts +2 -2
  534. package/dist/types/utils/formUtils.d.ts +2 -2
  535. package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
  536. package/dist/types/utils/getName.d.ts +2 -2
  537. package/dist/types/utils/makeSelectItemForRole.d.ts +2 -2
  538. package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +1 -0
  539. package/dist/types/utils/regex/patternValidators.d.ts +3 -0
  540. package/dist/types/utils/roleMetadata.d.ts +3 -3
  541. package/dist/types/utils/simulateTextChangeFromKeyboardEvent.d.ts +2 -2
  542. package/dist/types/utils/translation.d.ts +40 -0
  543. package/dist/types/utils/urlUtils.d.ts +1 -0
  544. package/dist/types/utils/validatorUtils.d.ts +2 -0
  545. package/dist/{useMultiForm-Bwx2nVhh.js → useMultiForm-BQmE_nfY.js} +158 -135
  546. package/dist/{useOnboardingStatus-Cwba-HzS.js → useOnboardingStatus-DJdV6bAG.js} +2 -2
  547. package/dist/{useTermsOfServiceStatus-C-i9mF4m.js → useTermsOfServiceStatus-BX4GiDbz.js} +2 -2
  548. package/dist/{useUpdateLegalEntity-xQlAqIqy.js → useUpdateLegalEntity-BfnvHQJj.js} +2 -2
  549. package/dist/{utils-DXv7uAh6.js → utils-1zLleVnu.js} +30 -23
  550. package/dist/{validate-CuwYJGc9.js → validate-BweJRQFE.js} +9 -3
  551. package/dist/{validate-BN5p-GhK.js → validate-Cy6vBhF2.js} +2 -2
  552. package/dist/view-verification-status-VFcBydkR.js +21 -0
  553. package/dist/zh-CN-wUb4MmTZ.js +13 -0
  554. package/dist/zh-TW-DNTXHLKa.js +13 -0
  555. package/package.json +28 -52
  556. package/dist/DecisionMakers-BKhtcs_K.js +0 -222
  557. package/dist/FormEndState-C3HCmXcw.js +0 -32
  558. package/dist/ManagePCIComponent-Blj60xLa.js +0 -33
  559. package/dist/RootBusinessDetailsPage-BTYIldSf.js +0 -42
  560. package/dist/SourceOfFunds.module-xwHIboir.js +0 -128
  561. package/dist/adyen-manage-pci.js +0 -48
  562. package/dist/adyen-sign-pci.js +0 -62
  563. package/dist/adyen-terms-of-service.vue_vue_type_script_lang-BD4hndWg.js +0 -42
  564. package/dist/adyen-transfer-instrument.vue_vue_type_script_lang-BE-ro1iH.js +0 -53
  565. package/dist/bg-BG-COTwZXwN.js +0 -2040
  566. package/dist/cs-CZ-DUlgJKVq.js +0 -2040
  567. package/dist/css-CQUoQdd2.js +0 -24
  568. package/dist/da-DK-BDzDHhVR.js +0 -2040
  569. package/dist/de-DE-B3TpRjZX.js +0 -994
  570. package/dist/de-DE-DJdgXqS_.js +0 -2040
  571. package/dist/el-GR-CFEuLvxK.js +0 -994
  572. package/dist/el-GR-D5i9BNyh.js +0 -2040
  573. package/dist/en-US-ghR-1_C2.js +0 -994
  574. package/dist/es-ES-BtWn2FOQ.js +0 -994
  575. package/dist/es-ES-VOSWszW5.js +0 -2040
  576. package/dist/et-EE-Bp4Ngsn4.js +0 -2040
  577. package/dist/fi-FI-DaujOE-a.js +0 -2040
  578. package/dist/fr-FR-BdPZxk11.js +0 -2040
  579. package/dist/fr-FR-HvIkGqJf.js +0 -994
  580. package/dist/hr-HR-BY7C7NxY.js +0 -2040
  581. package/dist/hu-HU-DHCty-Tc.js +0 -2040
  582. package/dist/it-IT-BMsuhZEQ.js +0 -2040
  583. package/dist/it-IT-CjbZahlB.js +0 -994
  584. package/dist/ja-JP-4jufT0xh.js +0 -994
  585. package/dist/ja-JP-BYDz1z2G.js +0 -2040
  586. package/dist/json-DWikzB4g.js +0 -31
  587. package/dist/lt-LT-DNJ9V9xV.js +0 -2040
  588. package/dist/lv-LV-CFJwN5wq.js +0 -2040
  589. package/dist/nl-NL-B3xjfpMi.js +0 -994
  590. package/dist/nl-NL-DibAf790.js +0 -2040
  591. package/dist/no-NO-DHCy5rXx.js +0 -2040
  592. package/dist/pl-PL-eZBNH5HH.js +0 -2040
  593. package/dist/preact/adyen-individual.js +0 -15
  594. package/dist/preact/adyen-manage-individual.js +0 -15
  595. package/dist/preact/adyen-terms-of-service.js +0 -16
  596. package/dist/preact/adyen-transfer-instrument.js +0 -16
  597. package/dist/pt-PT-BpYDD-PX.js +0 -994
  598. package/dist/pt-PT-CiN_Wmfe.js +0 -2040
  599. package/dist/ro-RO-CgyMTvLc.js +0 -2040
  600. package/dist/ru-RU-BlgIj-Q4.js +0 -994
  601. package/dist/sk-SK-B5qlQB_U.js +0 -2040
  602. package/dist/sl-SI-8PPfrGzL.js +0 -2040
  603. package/dist/sv-SE-7lcf_fB9.js +0 -994
  604. package/dist/sv-SE-ZWLw6D3j.js +0 -2040
  605. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationDisclaimer/IdVerificationDisclaimer.d.ts +0 -1
  606. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationHeader/IdVerificationHeader.d.ts +0 -1
  607. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/RichText.d.ts +0 -5
  608. package/dist/types/embeds/individual/AdyenIndividualPreact.d.ts +0 -3
  609. package/dist/types/embeds/manage-individual/AdyenManageIndividualPreact.d.ts +0 -3
  610. package/dist/types/embeds/manage-pci/AdyenManagePci.d.ts +0 -12
  611. package/dist/types/embeds/manage-pci/adyen-manage-pci.d.ts +0 -1
  612. package/dist/types/embeds/manage-pci/adyen-manage-pci.types.d.ts +0 -39
  613. package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +0 -15
  614. package/dist/types/embeds/sign-pci/adyen-sign-pci.d.ts +0 -1
  615. package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +0 -43
  616. package/dist/types/embeds/terms-of-service/AdyenTermsOfServicePreact.d.ts +0 -3
  617. package/dist/types/embeds/transfer-instrument/AdyenTransferInstrumentPreact.d.ts +0 -3
  618. package/dist/types/utils/sanitizeHtml.d.ts +0 -3
  619. package/dist/types/utils/useStateFromProp.d.ts +0 -9
  620. package/dist/useSalesChannelsSettings-BLzegVJh.js +0 -51
  621. package/dist/view-verification-status-DTkA8PtO.js +0 -20
  622. package/dist/vue/adyen-individual.js +0 -53
  623. package/dist/vue/adyen-manage-individual.js +0 -56
  624. package/dist/vue/adyen-terms-of-service.js +0 -28
  625. package/dist/vue/adyen-transfer-instrument.js +0 -30
  626. package/dist/yaml-jFdy-qnY.js +0 -22
  627. package/dist/zh-CN-xYZH718R.js +0 -994
  628. package/dist/zh-TW-DqBBNurv.js +0 -994
@@ -2,90 +2,21 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "92006294-5277-453f-980d-87b758b51c7c", e._sentryDebugIdIdentifier = "sentry-dbid-92006294-5277-453f-980d-87b758b51c7c");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1a3b023c-3908-44e4-985c-207da904ebf9", e._sentryDebugIdIdentifier = "sentry-dbid-1a3b023c-3908-44e4-985c-207da904ebf9");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { p as useApiContext, bf as useMutation, bh as httpPost, q as useQuery, dO as KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS, b as useI18nContext, dA as MemoizedDocumentUpload, Z as Button, b2 as Modal, b4 as ModalContent, C as Typography, ao as CountryCodes, O as CompanyTypesValue, dP as useGlobalData, dQ as getForms, W as TaskTypes, dR as BasicInformation, bM as getFormProps, dS as CompanyStructure, dT as AdditionalInformation, dU as MemoizedConstitutionalDocument, y as LegalEntityType, dV as FinancialInformation, bS as formatObject, bc as entriesOf, cq as getDocument, cr as mapExistingFile, cs as getPageName, bl as businessDetailsComponentsKeyMapping, dW as solePropBusinessDetailsKeyMapping, a_ as objectsDeepEqual, dX as operationalAddressIsSameIds, dY as COUNTRIES_USING_COMPANY_SEARCH, dZ as FIELDS_NEEDED_FOR_COMPANY_SEARCH, dm as keysOf, i as isUndefinedOrNull, aJ as summaryItem, d_ as solePropBusinessDetailsApiKeyMapping, d$ as businessDetailsApiKeyMapping, bN as isEmpty, e0 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, cv as createDocumentRequest, e1 as augmentWithCountryConfigs, cL as composePerScenarioFormConfigurations, b0 as datasetUtilities, cO as mapAddressLabels, e2 as companyTypeMetadata, e3 as getProp, ap as isEmpty$1, X as createLogger, cN as filterOutUnwantedAssociationsIfRootLE, c4 as isValidationError, c5 as processValidationErrors, c6 as isMaintenanceModeError, e4 as documentFormsIds, ar as resolveFieldMetadata, e5 as registrationNumberDefaultFieldMetadata, e6 as inferCompanyRegistrationNumberType, e7 as getCompanyRegistrationNumberOptions, e8 as registrationNumberDefaultFieldConfig, cl as defaultFieldMetadata, e9 as countryToTaxInfoTypeMap, cm as defaultFieldConfig, ea as getKeyForField, cy as drop, ak as getOwnEntityAssociations, cX as doArraysMatch, cT as getFileExtention, P as useAccountHolder, a5 as useToastContext, $ as useAnalyticsContext, a6 as useExperimentsContext, J as useSettingsContext, eb as verifiedBusiness, bn as useQueryClient, ec as useStateContext, K as SettingNames, ed as setIsBankAccountRequestedForOrganization, c2 as getAssociatedLeAnalyticsPayload, b1 as getCapabilityProblems, cz as documentApiUtils, cG as useScenarioConfiguration, ee as rules, cH as getPropsFromConfigurations, ef as useCompanySelection, eg as useVerifyTin, bO as getRequiredForms, bP as addValidityToForms, bQ as useFormComposer, eh as setVerifiedBusiness, ei as FormWrapper, b8 as Confirm, ej as solePropBusinessDetailsDocumentMapping, ek as businessDetailsDocumentMapping } from "./StoreProvider-BmzY19Td.js";
12
- import { useState, useEffect, useRef, useCallback, useMemo } from "preact/hooks";
13
- import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-xQlAqIqy.js";
14
- import { h as hasDataChanged } from "./hasDataChanged-Mu0HyZ3E.js";
15
- import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-DXv7uAh6.js";
16
- import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-BW8_TEQl.js";
11
+ import { u as useI18nContext, dw as MemoizedDocumentUpload, G as Button, bc as Modal, be as ModalContent, N as Typography, as as CountryCodes, Y as CompanyTypesValues, e_ as useGlobalData, eQ as getForms, $ as TaskTypes, e$ as BasicInformation, dq as getFormProps, f0 as CompanyStructure, f1 as AdditionalInformation, eK as MemoizedConstitutionalDocument, O as LegalEntityTypes, eJ as FinancialInformation, cg as getDocument, ch as mapExistingFile, ci as getPageName, bA as formatObject, bm as entriesOf, b8 as businessDetailsComponentsKeyMapping, f2 as solePropBusinessDetailsKeyMapping, f3 as getDefaultRegistrationNumberType, f4 as getDefaultVatNumberType, b3 as objectsDeepEqual, dY as operationalAddressIsSameIds, eM as COUNTRIES_USING_COMPANY_SEARCH, f5 as FIELDS_NEEDED_FOR_COMPANY_SEARCH, dg as keysOf, i as isUndefinedOrNull, dJ as isDateOlderThanAYear, aN as summaryItem, f6 as solePropBusinessDetailsApiKeyMapping, eZ as businessDetailsApiKeyMapping, f7 as isRegistrationNumberAbsentStateV4Scenario, dh as isEmpty, f8 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, cl as createDocumentRequest, ba as datasetUtilities, cG as mapAddressLabels, eI as companyTypeMetadata, a0 as createLogger, cF as filterOutUnwantedAssociationsIfRootLE, bU as isValidationError, bV as processValidationErrors, bW as isMaintenanceModeError, f9 as getProp, at as isEmpty$1, fa as documentFormsIds, av as resolveFieldMetadata, e6 as registrationNumberDefaultFieldMetadata, fb as inferCompanyRegistrationNumberType, fc as getCompanyRegistrationNumberOptions, e7 as registrationNumberDefaultFieldConfig, cb as taxInformationDefaultFieldMetadata, fd as countryToTaxInfoTypeMap, cc as taxInformationDefaultFieldConfig, fe as getKeyForField, co as drop, ao as getOwnEntityAssociations, cP as doArraysMatch, cL as getFileExtention, X as useAccountHolder, a9 as useToastContext, a3 as useAnalyticsContext, aa as useExperimentsContext, v as useSettingsContext, a as useApiContext, dT as verifiedBusiness, br as useQueryClient, ff as useStateContext, w as SettingNames, fg as setIsBankAccountRequestedForOrganization, bP as getAssociatedLeAnalyticsPayload, bb as getCapabilityProblems, cp as documentApiUtils, cD as composePerScenarioFormConfigurations, cx as useScenarioConfiguration, eU as rules, cy as getPropsFromConfigurations, eV as useCompanySearch, fh as useCompanySelection, eW as useVerifyTin, bQ as getRequiredForms, bR as addValidityToForms, fi as useClearCompanyData, bS as useFormComposer, fj as setVerifiedBusiness, fk as FormWrapper, bi as Confirm, fl as solePropBusinessDetailsDocumentMapping, eY as businessDetailsDocumentMapping } from "./StoreProvider-O9jwxfG8.js";
12
+ import { useState, useEffect, useRef, useMemo, useCallback } from "preact/hooks";
13
+ import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-BfnvHQJj.js";
14
+ import { h as hasDataChanged } from "./hasDataChanged-v0hD-nEq.js";
15
+ import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-1zLleVnu.js";
16
+ import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-7pZnHro-.js";
17
17
  import cx from "classnames";
18
- import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-C-2jp0wg.js";
18
+ import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-DrS0xN6i.js";
19
19
  import { f as formatCurrency } from "./formatCurrency-CMOSdJMB.js";
20
- const clearCompanyData = async (legalEntityId, baseUrl) => {
21
- return httpPost({
22
- baseUrl,
23
- path: `legalEntities/${legalEntityId}/companyDataset/clearCompanyData`
24
- });
25
- };
26
- const useClearCompanyData = (options) => {
27
- const { rootLegalEntityId, baseUrl } = useApiContext();
28
- return useMutation({
29
- mutationFn: () => {
30
- return clearCompanyData(rootLegalEntityId.value, baseUrl.value);
31
- },
32
- retry: 0,
33
- ...options
34
- });
35
- };
36
- const useCompanySearch = (data, options) => {
37
- const { rootLegalEntityId, baseUrl } = useApiContext();
38
- return useQuery({
39
- queryKey: ["companySearch", data],
40
- queryFn: () => handleCompanySearch(rootLegalEntityId.value, baseUrl.value, data),
41
- retry: 0,
42
- ...options
43
- });
44
- };
45
- const handleCompanySearch = async (rootLegalEntityId, baseUrl, data) => {
46
- const requestPayload = {
47
- text: data.registrationNumber ? data.registrationNumber : data.name,
48
- country: data.country,
49
- state: data.state,
50
- limit: data.limit ?? 15
51
- };
52
- const searchRequest = async (path) => {
53
- return httpPost(
54
- {
55
- baseUrl,
56
- path: `legalEntities/${rootLegalEntityId}/companySearch${path ? "/" + path : ""}`
57
- },
58
- requestPayload
59
- );
60
- };
61
- const companyDeepSearch = async () => await searchRequest("deep");
62
- const companyIndexSearch = async () => await searchRequest();
63
- const companyRegistrationNumberDeepSearch = async () => await searchRequest("deepSearchByRegistrationNumber");
64
- const companyRegistrationNumberIndexSearch = async () => await searchRequest("searchByRegistrationNumber");
65
- const primarySourceSearch = async (indexSearch, deepSearch) => {
66
- let response;
67
- try {
68
- response = await deepSearch();
69
- } catch {
70
- response = await indexSearch();
71
- }
72
- return response;
73
- };
74
- const searchByRegistrationNumber = async () => {
75
- return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await companyRegistrationNumberIndexSearch() : await primarySourceSearch(
76
- companyRegistrationNumberIndexSearch,
77
- companyRegistrationNumberDeepSearch
78
- );
79
- };
80
- const searchByCompanyName = async () => {
81
- return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await companyIndexSearch() : await primarySourceSearch(companyIndexSearch, companyDeepSearch);
82
- };
83
- if (data.registrationNumber) {
84
- const registrationNumberResponse = await searchByRegistrationNumber();
85
- return registrationNumberResponse.results.length > 0 ? registrationNumberResponse : await searchByCompanyName();
86
- }
87
- return await searchByCompanyName();
88
- };
89
20
  const stripWhitespace = (str) => str.replace(/\s/g, "");
90
21
  const toNormalizedString = (s) => stripWhitespace(s.toLowerCase());
91
22
  const isNormalizedStringMatch = (s1, s2) => toNormalizedString(s1) === toNormalizedString(s2);
@@ -211,16 +142,14 @@ function ProofOfOwnershipDocument({
211
142
  description = "weNeedAnOfficialDocumentForOwnership",
212
143
  ...props
213
144
  }) {
214
- var _a;
215
145
  const { i18n } = useI18nContext();
216
146
  const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
217
147
  const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
218
148
  useEffect(() => {
219
- var _a2, _b;
220
- if (((_b = (_a2 = props.data) == null ? void 0 : _a2.proofOfOwnership) == null ? void 0 : _b.length) === 2) {
149
+ if (props.data?.proofOfOwnership?.length === 2) {
221
150
  setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
222
151
  }
223
- }, [(_a = props.data) == null ? void 0 : _a.proofOfOwnership]);
152
+ }, [props.data?.proofOfOwnership]);
224
153
  return /* @__PURE__ */ jsx(
225
154
  MemoizedDocumentUpload,
226
155
  {
@@ -292,7 +221,7 @@ function ProofOfSignatoryDocument({
292
221
  const ACCEPTED_DOCUMENTS_MAP$1 = {
293
222
  [CountryCodes.PuertoRico]: {
294
223
  // should exactly match CountryCodes.UnitedStates
295
- [CompanyTypesValue.PRIVATE_COMPANY]: {
224
+ [CompanyTypesValues.PRIVATE_COMPANY]: {
296
225
  header: "acceptedDocumentsForPrivateCompanies",
297
226
  documents: [
298
227
  "certificateOfIncorporation",
@@ -300,19 +229,19 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
300
229
  "secretaryOfStateFiling__PR"
301
230
  ]
302
231
  },
303
- [CompanyTypesValue.PUBLIC_COMPANY]: {
232
+ [CompanyTypesValues.PUBLIC_COMPANY]: {
304
233
  header: "acceptedDocumentsForPublicCompanies",
305
234
  documents: ["certificateOfIncorporation", "certificateOfFormation"]
306
235
  },
307
- [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
236
+ [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
308
237
  header: "acceptedDocumentsForPublicCompanies",
309
238
  documents: ["certificateOfIncorporation", "certificateOfFormation"]
310
239
  },
311
- [CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
240
+ [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
312
241
  header: "acceptedDocumentsForGovernment",
313
242
  documents: ["charter"]
314
243
  },
315
- [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
244
+ [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
316
245
  header: "acceptedDocumentsForNonProfit",
317
246
  documents: [
318
247
  "articlesOfIncorporation",
@@ -321,29 +250,29 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
321
250
  "certificateOfIncumbency"
322
251
  ]
323
252
  },
324
- [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
253
+ [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
325
254
  header: "acceptedDocumentsForPartnerships",
326
255
  documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
327
256
  }
328
257
  },
329
258
  [CountryCodes.UnitedStates]: {
330
- [CompanyTypesValue.PRIVATE_COMPANY]: {
259
+ [CompanyTypesValues.PRIVATE_COMPANY]: {
331
260
  header: "acceptedDocumentsForPrivateCompanies",
332
261
  documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
333
262
  },
334
- [CompanyTypesValue.PUBLIC_COMPANY]: {
263
+ [CompanyTypesValues.PUBLIC_COMPANY]: {
335
264
  header: "acceptedDocumentsForPublicCompanies",
336
265
  documents: ["certificateOfIncorporation", "certificateOfFormation"]
337
266
  },
338
- [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
267
+ [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
339
268
  header: "acceptedDocumentsForPublicCompanies",
340
269
  documents: ["certificateOfIncorporation", "certificateOfFormation"]
341
270
  },
342
- [CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
271
+ [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
343
272
  header: "acceptedDocumentsForGovernment",
344
273
  documents: ["charter"]
345
274
  },
346
- [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
275
+ [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
347
276
  header: "acceptedDocumentsForNonProfit",
348
277
  documents: [
349
278
  "articlesOfIncorporation",
@@ -352,7 +281,7 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
352
281
  "certificateOfIncumbency"
353
282
  ]
354
283
  },
355
- [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
284
+ [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
356
285
  header: "acceptedDocumentsForPartnerships",
357
286
  documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
358
287
  }
@@ -362,9 +291,8 @@ const GuidanceContent$1 = ({
362
291
  country,
363
292
  companyType
364
293
  }) => {
365
- var _a;
366
294
  const { i18n } = useI18nContext();
367
- const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country]) == null ? void 0 : _a[companyType];
295
+ const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
368
296
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
369
297
  acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
370
298
  /* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
@@ -385,7 +313,7 @@ const GuidanceContent$1 = ({
385
313
  function RegistrationDocument({
386
314
  id,
387
315
  country,
388
- companyType = CompanyTypesValue.PRIVATE_COMPANY,
316
+ companyType = CompanyTypesValues.PRIVATE_COMPANY,
389
317
  heading = "companyRegistrationDocumentFormHeading",
390
318
  description = "companyRegistrationDocumentFormDescription",
391
319
  ...props
@@ -410,45 +338,45 @@ function RegistrationDocument({
410
338
  const ACCEPTED_DOCUMENTS_MAP = {
411
339
  [CountryCodes.PuertoRico]: {
412
340
  // should exactly match CountryCodes.UnitedStates
413
- [CompanyTypesValue.PRIVATE_COMPANY]: {
341
+ [CompanyTypesValues.PRIVATE_COMPANY]: {
414
342
  header: "acceptedDocumentsForPrivateCompanies",
415
343
  documents: ["irsCP575"]
416
344
  },
417
- [CompanyTypesValue.PUBLIC_COMPANY]: {
345
+ [CompanyTypesValues.PUBLIC_COMPANY]: {
418
346
  header: "acceptedDocumentsForPublicCompanies",
419
347
  documents: ["annualReport", "secForm10k"]
420
348
  },
421
- [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
349
+ [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
422
350
  header: "acceptedDocumentsForPublicCompanies",
423
351
  documents: ["annualReport", "secForm10k"]
424
352
  },
425
- [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
353
+ [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
426
354
  header: "acceptedDocumentsForNonProfit",
427
355
  documents: ["annualReport"]
428
356
  },
429
- [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
357
+ [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
430
358
  header: "acceptedDocumentsForPartnerships",
431
359
  documents: ["irsScheduleK1"]
432
360
  }
433
361
  },
434
362
  [CountryCodes.UnitedStates]: {
435
- [CompanyTypesValue.PRIVATE_COMPANY]: {
363
+ [CompanyTypesValues.PRIVATE_COMPANY]: {
436
364
  header: "acceptedDocumentsForPrivateCompanies",
437
365
  documents: ["irsCP575"]
438
366
  },
439
- [CompanyTypesValue.PUBLIC_COMPANY]: {
367
+ [CompanyTypesValues.PUBLIC_COMPANY]: {
440
368
  header: "acceptedDocumentsForPublicCompanies",
441
369
  documents: ["annualReport", "secForm10k"]
442
370
  },
443
- [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
371
+ [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
444
372
  header: "acceptedDocumentsForPublicCompanies",
445
373
  documents: ["annualReport", "secForm10k"]
446
374
  },
447
- [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
375
+ [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
448
376
  header: "acceptedDocumentsForNonProfit",
449
377
  documents: ["annualReport"]
450
378
  },
451
- [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
379
+ [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
452
380
  header: "acceptedDocumentsForPartnerships",
453
381
  documents: ["irsScheduleK1"]
454
382
  }
@@ -458,9 +386,8 @@ const GuidanceContent = ({
458
386
  country,
459
387
  companyType
460
388
  }) => {
461
- var _a;
462
389
  const { i18n } = useI18nContext();
463
- const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country]) == null ? void 0 : _a[companyType];
390
+ const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
464
391
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
465
392
  acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
466
393
  /* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
@@ -485,7 +412,7 @@ const GuidanceContent = ({
485
412
  function TaxDocument({
486
413
  id,
487
414
  country,
488
- companyType = CompanyTypesValue.PRIVATE_COMPANY,
415
+ companyType = CompanyTypesValues.PRIVATE_COMPANY,
489
416
  heading = "companyTaxDocumentFormHeading",
490
417
  description = "companyTaxDocumentFormDescription",
491
418
  ...props
@@ -525,25 +452,25 @@ function BusinessDetails(props) {
525
452
  proceedToManualDataEntry
526
453
  } = props;
527
454
  const forms = getForms(country);
528
- const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
455
+ const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
529
456
  const classNames = cx("adyen-kyc-business-details", {
530
- "adyen-kyc-business-details--hide": (activeForm == null ? void 0 : activeForm.formId) === "summary"
457
+ "adyen-kyc-business-details--hide": activeForm?.formId === "summary"
531
458
  });
532
- const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValue.SOLE_PROPRIETORSHIP : companyStructure == null ? void 0 : companyStructure.entityType;
459
+ const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : companyStructure?.entityType;
533
460
  return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
534
461
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
535
462
  BasicInformation,
536
463
  {
537
464
  ...getFormProps(props, forms.basicInformation.formId),
538
465
  id: forms.basicInformation.formId,
539
- heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) || forms.basicInformation.formHeading),
540
- description: (activeForm == null ? void 0 : activeForm.formDescription) ? i18n.get(activeForm == null ? void 0 : activeForm.formDescription) : void 0,
466
+ heading: i18n.get(activeForm?.formHeading || forms.basicInformation.formHeading),
467
+ description: activeForm?.formDescription ? i18n.get(activeForm?.formDescription) : void 0,
541
468
  country,
542
469
  companyType,
543
470
  isTopLevelEntity,
544
471
  showBusinessSelection,
545
472
  showCompanyStructure,
546
- isActiveForm: (activeForm == null ? void 0 : activeForm.formId) === forms.basicInformation.formId,
473
+ isActiveForm: activeForm?.formId === forms.basicInformation.formId,
547
474
  loading,
548
475
  proceedToManualDataEntry,
549
476
  searchResults,
@@ -558,9 +485,9 @@ function BusinessDetails(props) {
558
485
  {
559
486
  ...getFormProps(props, forms.companyStructure.formId),
560
487
  id: forms.companyStructure.formId,
561
- heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) ?? forms.companyStructure.formHeading),
488
+ heading: i18n.get(activeForm?.formHeading ?? forms.companyStructure.formHeading),
562
489
  description: i18n.get(
563
- (activeForm == null ? void 0 : activeForm.formDescription) ?? forms.companyStructure.formDescription
490
+ activeForm?.formDescription ?? forms.companyStructure.formDescription
564
491
  ),
565
492
  country,
566
493
  showCompanyStructure
@@ -571,7 +498,7 @@ function BusinessDetails(props) {
571
498
  {
572
499
  ...getFormProps(props, forms.additionalInformation.formId),
573
500
  id: forms.additionalInformation.formId,
574
- heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) ?? forms.additionalInformation.formHeading),
501
+ heading: i18n.get(activeForm?.formHeading ?? forms.additionalInformation.formHeading),
575
502
  country,
576
503
  companyType,
577
504
  showCompanyStructure
@@ -656,7 +583,7 @@ function BusinessDetails(props) {
656
583
  {
657
584
  ...getFormProps(props, forms.companyConstitutionalDocument.formId),
658
585
  id: forms.companyConstitutionalDocument.formId,
659
- legalEntityType: LegalEntityType.SOLE_PROPRIETORSHIP,
586
+ legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
660
587
  country
661
588
  }
662
589
  ) }),
@@ -702,25 +629,24 @@ const mapBasicInformation = (data) => {
702
629
  }, {});
703
630
  };
704
631
  const mapDbaName = (legalEntity) => {
705
- var _a, _b, _c, _d;
706
632
  const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
707
633
  const dbaName = {};
708
- if (typeof (entity == null ? void 0 : entity.doingBusinessAsAbsent) !== "undefined") {
634
+ if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
709
635
  dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
710
636
  } else {
711
- if (entity == null ? void 0 : entity.doingBusinessAs) {
712
- dbaName.hasDoingBusinessAs = (entity == null ? void 0 : entity.doingBusinessAs) !== (legalEntity.type === "organization" ? (_a = legalEntity.organization) == null ? void 0 : _a.legalName : (_b = legalEntity.soleProprietorship) == null ? void 0 : _b.name);
637
+ if (entity?.doingBusinessAs) {
638
+ dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
713
639
  } else {
714
640
  dbaName.hasDoingBusinessAs = void 0;
715
641
  }
716
642
  }
717
- if ((_c = legalEntity.organization) == null ? void 0 : _c.doingBusinessAs) {
718
- dbaName.doingBusinessAs = (_d = legalEntity.organization) == null ? void 0 : _d.doingBusinessAs;
643
+ if (legalEntity.organization?.doingBusinessAs) {
644
+ dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
719
645
  }
720
646
  return dbaName;
721
647
  };
722
648
  const mapIsUen = (taxInformation, registrationNumber, country) => {
723
- const currentCountryTaxInfo = taxInformation == null ? void 0 : taxInformation.find((taxInfo) => taxInfo.country === country);
649
+ const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
724
650
  if (!currentCountryTaxInfo || country !== "SG") return {};
725
651
  return {
726
652
  registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
@@ -730,14 +656,21 @@ const mapIsUen = (taxInformation, registrationNumber, country) => {
730
656
  const mapAdditionalInformation = (data, legalEntity) => {
731
657
  if (!data) return;
732
658
  const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
733
- const currentCountry = entity == null ? void 0 : entity.registeredAddress.country;
659
+ const currentCountry = entity?.registeredAddress.country;
734
660
  const dbaNameFields = mapDbaName(legalEntity);
735
661
  const isUen = mapIsUen(
736
662
  data.taxInformation,
737
663
  data.registrationNumber,
738
664
  currentCountry
739
665
  );
740
- const operationalAddressIsSame = (entity == null ? void 0 : entity.principalPlaceOfBusiness) && !objectsDeepEqual(entity == null ? void 0 : entity.principalPlaceOfBusiness, entity == null ? void 0 : entity.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
666
+ const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValues.SOLE_PROPRIETORSHIP;
667
+ const registrationNumberType = getDefaultRegistrationNumberType(
668
+ entity?.registrationNumber,
669
+ currentCountry,
670
+ companyType
671
+ );
672
+ const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
673
+ const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
741
674
  const result = entriesOf(data).reduce(
742
675
  (acc, [field]) => {
743
676
  if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
@@ -754,11 +687,29 @@ const mapAdditionalInformation = (data, legalEntity) => {
754
687
  }
755
688
  return acc;
756
689
  },
757
- { operationalAddressIsSame }
690
+ { operationalAddressIsSame, registrationNumberType, vatNumberType }
758
691
  );
759
692
  return { ...result, ...dbaNameFields, ...isUen };
760
693
  };
761
- const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
694
+ const mapLocalization = (data) => {
695
+ const mappings = [
696
+ { formField: "jaHaniLegalCompanyName", script: "ja-Hani", legalEntityField: "legalName" },
697
+ { formField: "jaKanaLegalCompanyName", script: "ja-Kana", legalEntityField: "legalName" }
698
+ ];
699
+ const localizedScriptsAndFields = data.organization?.localization || data.soleProprietorship?.localization;
700
+ if (!localizedScriptsAndFields) {
701
+ return;
702
+ }
703
+ const result = {};
704
+ mappings.forEach((mapping) => {
705
+ const value = localizedScriptsAndFields.find(
706
+ (localization) => localization.script === mapping.script
707
+ )?.fields?.[mapping.legalEntityField];
708
+ result[mapping.formField] = value;
709
+ });
710
+ return result;
711
+ };
712
+ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity, isExperimentEnabled) => {
762
713
  if (!legalEntity) return {};
763
714
  const {
764
715
  companyRegistrationDocument,
@@ -769,13 +720,12 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
769
720
  companyConstitutionalDocument
770
721
  } = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
771
722
  const buildSolePropSchema = () => {
772
- var _a, _b, _c, _d;
773
723
  const solePropData = formatObject(
774
724
  legalEntity,
775
725
  solePropBusinessDetailsKeyMapping
776
726
  );
777
- const country = ((_b = (_a = solePropData == null ? void 0 : solePropData.additionalInformation) == null ? void 0 : _a.registrationAddress) == null ? void 0 : _b.country) ?? ((_c = parentEntity == null ? void 0 : parentEntity.individual) == null ? void 0 : _c.residentialAddress.country);
778
- if (((_d = legalEntity == null ? void 0 : legalEntity.soleProprietorship) == null ? void 0 : _d.financialReports) && solePropData) {
727
+ const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
728
+ if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
779
729
  solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
780
730
  legalEntity.soleProprietorship.financialReports
781
731
  );
@@ -783,13 +733,22 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
783
733
  return {
784
734
  ...solePropData,
785
735
  basicInformation: {
786
- ...solePropData == null ? void 0 : solePropData.basicInformation,
736
+ ...solePropData?.basicInformation,
787
737
  country
788
738
  },
789
739
  companyConstitutionalDocument
790
740
  };
791
741
  };
792
- const orgSchema = {
742
+ const orgSchema = isExperimentEnabled?.("EnableBusinessDetailsMultiForm") ? {
743
+ ...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
744
+ businessSelection: {},
745
+ companyRegistrationDocument,
746
+ companyTaxDocument,
747
+ companyProofOfDirectorDocument,
748
+ companyProofOfSignatoryDocument,
749
+ companyProofOfOwnershipDocument,
750
+ companyFinancialInformation: {}
751
+ } : {
793
752
  ...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
794
753
  companyRegistrationDocument,
795
754
  companyTaxDocument,
@@ -799,13 +758,21 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
799
758
  companyFinancialInformation: {}
800
759
  };
801
760
  const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
761
+ const localization = mapLocalization(legalEntity);
802
762
  return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
803
- var _a, _b;
804
763
  switch (key) {
805
764
  case "basicInformation": {
806
765
  return {
807
766
  ...componentData,
808
- [key]: mapBasicInformation(businessDetailsSchema[key])
767
+ [key]: { ...mapBasicInformation(businessDetailsSchema[key]), ...localization ?? {} }
768
+ };
769
+ }
770
+ case "businessSelection": {
771
+ return {
772
+ ...componentData,
773
+ [key]: {
774
+ hasSelectedBusiness: false
775
+ }
809
776
  };
810
777
  }
811
778
  case "companyStructure": {
@@ -859,8 +826,8 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
859
826
  };
860
827
  }
861
828
  case "companyFinancialInformation": {
862
- const financialReports = legalEntity.type === "organization" ? (_a = legalEntity == null ? void 0 : legalEntity.organization) == null ? void 0 : _a.financialReports : (_b = legalEntity == null ? void 0 : legalEntity.soleProprietorship) == null ? void 0 : _b.financialReports;
863
- return (financialReports == null ? void 0 : financialReports.length) ? {
829
+ const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
830
+ return financialReports?.length ? {
864
831
  ...componentData,
865
832
  [key]: mapFinancialReportsToFinancialInformation(financialReports)
866
833
  } : componentData;
@@ -870,6 +837,81 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
870
837
  }
871
838
  }, {});
872
839
  };
840
+ const businessDetailsBase = {
841
+ /* Base required fields */
842
+ country: { rule: "REQUIRED" },
843
+ entityType: { rule: "businessRequiresCompanyType" },
844
+ legalCompanyName: { rule: "REQUIRED" },
845
+ jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
846
+ jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
847
+ hasDoingBusinessAs: { rule: "REQUIRED" },
848
+ doingBusinessAs: { rule: "requireDoingBusinessAsName" },
849
+ registrationAddress: { rule: "REQUIRED" },
850
+ operationalAddressIsSame: { rule: "REQUIRED" },
851
+ /* Base optional fields */
852
+ operationalAddress: { rule: "OPTIONAL" },
853
+ /* Fields with custom country specific rules */
854
+ hasSelectedBusiness: { rule: "requireBusinessSelection" },
855
+ stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
856
+ stockISIN: { rule: "ifPubliclyTradedCompany" },
857
+ stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
858
+ dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
859
+ stateOrProvince: { rule: "countryUsingCompanySearch" },
860
+ registrationNumber: { rule: "countryRequiresRegistrationNumber" },
861
+ registrationNumberType: { rule: "registrationNumberType" },
862
+ exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
863
+ eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
864
+ countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
865
+ taxDocument: { rule: "ifCountryUsAndTinFailed" }
866
+ };
867
+ const taxInformationBase = {
868
+ vatNumber: { rule: "countryUsesVat" },
869
+ vatNumberType: { rule: "vatNumberType" },
870
+ exemptedFromVat: { rule: "isVatExempt" },
871
+ vatAbsenceReason: { rule: "isVatExempt" },
872
+ taxInformation: { rule: "countryUsesTaxId" },
873
+ exemptedFromTax: { rule: "countryHasTaxExemptions" },
874
+ isUen: { rule: "countryUsesUenOrGst" }
875
+ };
876
+ const financialInformationBase = {
877
+ numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
878
+ financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
879
+ currency: { rule: "isFinancialReportingFieldsRequired" },
880
+ reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
881
+ annualTurnover: { rule: "annualTurnoverRequired" },
882
+ netAssets: { rule: "netAssetsRequired" },
883
+ balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
884
+ };
885
+ const businessDetailsFieldsPerScenario = {
886
+ L0: {
887
+ country: { rule: "REQUIRED" },
888
+ legalCompanyName: { rule: "REQUIRED" },
889
+ stateOrProvince: { rule: "countryUsingCompanySearch" },
890
+ ...financialInformationBase
891
+ },
892
+ L1: {
893
+ ...businessDetailsBase,
894
+ ...financialInformationBase
895
+ },
896
+ L: {
897
+ ...businessDetailsBase,
898
+ ...taxInformationBase,
899
+ ...financialInformationBase
900
+ },
901
+ L_PROOFOFADDRESS: {
902
+ // TODO this field does not exist
903
+ // proofOfAddressDocument: { rule: 'REQUIRED' },
904
+ },
905
+ L_REGDOC: {
906
+ registrationDocument: { rule: "REQUIRED" }
907
+ },
908
+ L_TAXDOC: {
909
+ taxDocument: { rule: "REQUIRED" }
910
+ },
911
+ L_BAFIN: {
912
+ legalForm: { rule: "REQUIRED" }
913
+ }
914
+ };
873
915
  const adjustFormData = (oldFormData, newFormData) => {
874
916
  const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
875
917
  return schema.reduce((acc, key) => {
@@ -892,9 +934,17 @@ const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
892
934
  return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
893
935
  }, {});
894
936
  };
895
- const formatFinancialInformationSummary = (data, i18n, country) => {
896
- if (!data) return {};
897
- const summary = {
937
+ const formatFinancialInformationSummary = (data, i18n, country, dateOfIncorporation) => {
938
+ let summary;
939
+ if (!data) return void 0;
940
+ if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
941
+ if (country === CountryCodes.UnitedKingdom) {
942
+ summary = { numberOfEmployees: `${data.numberOfEmployees}` };
943
+ return summary;
944
+ }
945
+ return void 0;
946
+ }
947
+ summary = {
898
948
  currency: data.currency,
899
949
  financialReportingDate: data.financialReportingDate
900
950
  };
@@ -913,224 +963,176 @@ const formatFinancialInformationSummary = (data, i18n, country) => {
913
963
  return summary;
914
964
  };
915
965
  const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
916
- var _a, _b, _c, _d, _e, _f, _g, _h;
917
966
  const {
918
967
  companyRegistrationDocument,
919
968
  companyTaxDocument,
920
969
  companyProofOfDirectorDocument,
921
970
  companyConstitutionalDocument,
922
971
  companyProofOfSignatoryDocument,
923
- companyProofOfOwnershipDocument
972
+ companyProofOfOwnershipDocument,
973
+ basicInformation
924
974
  } = data;
925
975
  const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
926
- (_a = data.basicInformation) == null ? void 0 : _a.country
976
+ basicInformation?.country
927
977
  ) ? "proofOfOrganizationTaxInfo" : "vatDocument";
928
978
  const documents = await Promise.all([
929
979
  createDocumentRequest({
930
980
  entityId,
931
981
  entityType: "legalEntity",
932
982
  documentType: "registrationDocument",
933
- page1: (_b = companyRegistrationDocument == null ? void 0 : companyRegistrationDocument.registrationDocument) == null ? void 0 : _b[0]
983
+ page1: companyRegistrationDocument?.registrationDocument?.[0]
934
984
  }),
935
985
  createDocumentRequest({
936
986
  entityId,
937
987
  entityType: "legalEntity",
938
988
  documentType: taxDocumentType,
939
- page1: (_c = companyTaxDocument == null ? void 0 : companyTaxDocument.taxDocument) == null ? void 0 : _c[0]
989
+ page1: companyTaxDocument?.taxDocument?.[0]
940
990
  }),
941
991
  createDocumentRequest({
942
992
  entityId,
943
993
  entityType: "legalEntity",
944
994
  documentType: "proofOfDirector",
945
- page1: (_d = companyProofOfDirectorDocument == null ? void 0 : companyProofOfDirectorDocument.proofOfDirector) == null ? void 0 : _d[0]
995
+ page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
946
996
  }),
947
997
  createDocumentRequest({
948
998
  entityId,
949
999
  entityType: "legalEntity",
950
1000
  documentType: "constitutionalDocument",
951
- page1: (_e = companyConstitutionalDocument == null ? void 0 : companyConstitutionalDocument.constitutionalDocument) == null ? void 0 : _e[0]
1001
+ page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
952
1002
  }),
953
1003
  createDocumentRequest({
954
1004
  entityId,
955
1005
  entityType: "legalEntity",
956
1006
  documentType: "proofOfSignatory",
957
- page1: (_f = companyProofOfSignatoryDocument == null ? void 0 : companyProofOfSignatoryDocument.proofOfSignatory) == null ? void 0 : _f[0]
1007
+ page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
958
1008
  }),
959
1009
  createDocumentRequest({
960
1010
  entityId,
961
1011
  entityType: "legalEntity",
962
1012
  documentType: "proofOfOwnership",
963
- page1: (_g = companyProofOfOwnershipDocument == null ? void 0 : companyProofOfOwnershipDocument.proofOfOwnership) == null ? void 0 : _g[0],
964
- page2: (_h = companyProofOfOwnershipDocument == null ? void 0 : companyProofOfOwnershipDocument.proofOfOwnership) == null ? void 0 : _h[1]
1013
+ page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
1014
+ page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
965
1015
  })
966
1016
  ]);
967
1017
  return documents.filter(Boolean);
968
1018
  };
969
1019
  const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
970
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
971
1020
  const requestObj = {
972
1021
  ...formatObject(
973
1022
  data,
974
1023
  accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
975
1024
  )
976
1025
  };
977
- (_a = requestObj.organization) == null ? true : delete _a.legalFormDescription;
1026
+ delete requestObj.organization?.legalFormDescription;
1027
+ const canSaveRegNumberAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(
1028
+ data.basicInformation?.country,
1029
+ data.companyStructure?.entityType
1030
+ );
978
1031
  const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
979
- (_b = data.basicInformation) == null ? void 0 : _b.country
980
- ) ? (_c = data.basicInformation) == null ? void 0 : _c.taxInformation : (_d = data.additionalInformation) == null ? void 0 : _d.taxInformation;
1032
+ data.basicInformation?.country
1033
+ ) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
981
1034
  const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
982
- (_e = data.basicInformation) == null ? void 0 : _e.country
983
- ) ? (_f = data.basicInformation) == null ? void 0 : _f.registrationNumber : (_g = data.additionalInformation) == null ? void 0 : _g.registrationNumber;
984
- const doingBusinessAs = ((_h = data.additionalInformation) == null ? void 0 : _h.doingBusinessAs) ?? "";
1035
+ data.basicInformation?.country
1036
+ ) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
1037
+ const localization = processLocalizationFields(data.basicInformation);
1038
+ const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
985
1039
  const entityObject = isEmpty(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
986
1040
  if (entityObject) {
987
1041
  if (taxData) {
988
1042
  entityObject.taxInformation = taxData;
989
1043
  }
990
- if (!!requestObj.soleProprietorship && !((_i = requestObj.soleProprietorship) == null ? void 0 : _i.countryOfGoverningLaw) && !!((_j = data.basicInformation) == null ? void 0 : _j.country)) {
1044
+ if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
991
1045
  requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
992
1046
  }
993
1047
  if (registrationNumber) {
994
1048
  entityObject.registrationNumber = registrationNumber;
995
- if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && requestObj.organization) {
1049
+ if (canSaveRegNumberAbsentState && requestObj.organization) {
996
1050
  requestObj.organization.registrationNumberAbsent = false;
997
1051
  }
998
1052
  }
999
- if (((_k = data.additionalInformation) == null ? void 0 : _k.exemptedFromRegistrationNumber) && isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && requestObj.organization) {
1000
- requestObj.organization.registrationNumberAbsent = (_l = data.additionalInformation) == null ? void 0 : _l.exemptedFromRegistrationNumber;
1053
+ if (localization) {
1054
+ entityObject.localization = localization;
1001
1055
  }
1002
- if ((_m = data.additionalInformation) == null ? void 0 : _m.vatAbsenceReason) {
1056
+ if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
1057
+ requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
1058
+ }
1059
+ if (data.additionalInformation?.vatAbsenceReason) {
1003
1060
  entityObject.vatNumber = "";
1004
1061
  }
1005
1062
  if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
1006
- if (typeof ((_n = data.additionalInformation) == null ? void 0 : _n.hasDoingBusinessAs) !== "undefined") {
1007
- entityObject.doingBusinessAsAbsent = !((_o = data.additionalInformation) == null ? void 0 : _o.hasDoingBusinessAs);
1063
+ if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
1064
+ entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
1008
1065
  }
1009
1066
  } else {
1010
- entityObject.doingBusinessAs = doingBusinessAs || ((_p = data.basicInformation) == null ? void 0 : _p.legalCompanyName);
1067
+ entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
1011
1068
  delete entityObject.doingBusinessAsAbsent;
1012
1069
  }
1013
- if (((_q = data.additionalInformation) == null ? void 0 : _q.operationalAddressIsSame) === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
1070
+ if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
1014
1071
  entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
1015
1072
  }
1016
1073
  if (!isEmpty(data.companyFinancialInformation)) {
1074
+ const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1075
+ "EnableIncorporationDateBasedFinancialValidationForHO"
1076
+ );
1017
1077
  entityObject.financialReports = [
1018
- mapFinancialInformationToFinancialReport(data.companyFinancialInformation)
1078
+ mapFinancialInformationToFinancialReport(
1079
+ data.companyFinancialInformation,
1080
+ isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1081
+ )
1019
1082
  ];
1020
1083
  }
1021
1084
  }
1022
- requestObj.type = requestObj.organization ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
1023
- if ((entityObject == null ? void 0 : entityObject.registeredAddress.country) === "US") {
1085
+ requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
1086
+ if (entityObject?.registeredAddress.country === "US") {
1024
1087
  delete entityObject.registrationNumber;
1025
1088
  }
1089
+ if (!canSaveRegNumberAbsentState) {
1090
+ delete requestObj.organization?.registrationNumberAbsent;
1091
+ }
1026
1092
  return requestObj;
1027
1093
  };
1028
- const businessDetailsBase = {
1029
- /* Base required fields */
1030
- country: { rule: "REQUIRED" },
1031
- entityType: { rule: "businessRequiresCompanyType" },
1032
- legalCompanyName: { rule: "REQUIRED" },
1033
- hasDoingBusinessAs: { rule: "REQUIRED" },
1034
- registrationAddress: { rule: "REQUIRED" },
1035
- operationalAddressIsSame: { rule: "REQUIRED" },
1036
- /* Base optional fields */
1037
- operationalAddress: { rule: "OPTIONAL" },
1038
- /* Fields with custom country specific rules */
1039
- stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
1040
- stockISIN: { rule: "ifPubliclyTradedCompany" },
1041
- stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
1042
- dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
1043
- stateOrProvince: { rule: "countryUsingCompanySearch" },
1044
- registrationNumber: { rule: "countryRequiresRegistrationNumber" },
1045
- exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
1046
- eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
1047
- countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
1048
- taxDocument: { rule: "ifCountryUsAndTinFailed" }
1049
- };
1050
- const taxInformationBase = {
1051
- vatNumber: { rule: "countryUsesVat" },
1052
- exemptedFromVat: { rule: "countryUsesVat" },
1053
- vatAbsenceReason: { rule: "countryUsesVat" },
1054
- taxInformation: { rule: "countryUsesTaxId" },
1055
- exemptedFromTax: { rule: "countryHasTaxExemptions" },
1056
- isUen: { rule: "countryUsesUenOrGst" }
1057
- };
1058
- const financialInformationBase = {
1059
- numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
1060
- financialReportingDate: { rule: "isFinancialReportingFieldsRequired" }
1061
- };
1062
- const businessDetailsFieldsPerScenario = {
1063
- L0: {
1064
- country: { rule: "REQUIRED" },
1065
- legalCompanyName: { rule: "REQUIRED" },
1066
- stateOrProvince: { rule: "countryUsingCompanySearch" },
1067
- ...financialInformationBase
1068
- },
1069
- L1: {
1070
- ...businessDetailsBase,
1071
- ...financialInformationBase
1072
- },
1073
- L: {
1074
- ...businessDetailsBase,
1075
- ...taxInformationBase,
1076
- ...financialInformationBase
1077
- },
1078
- L_PROOFOFADDRESS: {
1079
- // TODO this field does not exist
1080
- // proofOfAddressDocument: { rule: 'REQUIRED' },
1081
- },
1082
- L_REGDOC: {
1083
- registrationDocument: { rule: "REQUIRED" }
1084
- },
1085
- L_TAXDOC: {
1086
- taxDocument: { rule: "REQUIRED" }
1094
+ const processLocalizationFields = (data) => {
1095
+ if (!data) {
1096
+ return;
1087
1097
  }
1088
- };
1089
- const businessDetailsCountryConfig = {
1090
- [CountryCodes.Australia]: {
1091
- entityType: { label: "companyType" },
1092
- exemptedFromTax: { label: "doNotHaveAbn" }
1093
- },
1094
- [CountryCodes.HongKong]: {
1095
- entityType: { label: "typeOfCompany" },
1096
- registrationDocument: { label: "companyRegistrationDocument" }
1097
- },
1098
- [CountryCodes.Japan]: {
1099
- registrationDocument: { label: "chamberOfCommerceExtract" }
1100
- },
1101
- [CountryCodes.Malaysia]: {
1102
- registrationDocument: { label: "companyProfile" }
1103
- },
1104
- [CountryCodes.Mexico]: {
1105
- registrationDocument: { label: "RfcDocument" }
1106
- },
1107
- [CountryCodes.NewZealand]: {
1108
- taxDocument: { label: "irdDocument" }
1109
- },
1110
- [CountryCodes.PuertoRico]: {
1111
- // exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
1112
- country: { label: "country__US__business" }
1113
- },
1114
- [CountryCodes.Singapore]: {
1115
- registrationNumber: { label: "uen" },
1116
- entityType: { label: "companyType" },
1117
- isUen: { label: "iDoNotHaveGst" }
1118
- },
1119
- [CountryCodes.UnitedStates]: {
1120
- country: { label: "country__US__business" },
1121
- stateOrProvince: { label: "stateOrProvince__US__business" },
1122
- doingBusinessAs: { label: "doingBusinessAs" },
1123
- exemptedFromTax: { label: "doNotHaveEIN" }
1098
+ const LOCALIZATION_FIELDS = {
1099
+ jaHaniLegalCompanyName: { script: "ja-Hani", fieldName: "legalName" },
1100
+ jaKanaLegalCompanyName: { script: "ja-Kana", fieldName: "legalName" }
1101
+ };
1102
+ const localization = {};
1103
+ Object.keys(LOCALIZATION_FIELDS).forEach((field) => {
1104
+ const basicInformationFieldSchemaField = field;
1105
+ if (data[basicInformationFieldSchemaField]) {
1106
+ const script = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.script;
1107
+ const fieldName = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.fieldName;
1108
+ if (script && localization[script]) {
1109
+ localization[script] = {
1110
+ fields: {
1111
+ ...localization[script].fields,
1112
+ [fieldName]: data[basicInformationFieldSchemaField]
1113
+ }
1114
+ };
1115
+ } else if (script && !localization[script]) {
1116
+ localization[script] = {
1117
+ fields: {
1118
+ [fieldName]: data[basicInformationFieldSchemaField]
1119
+ }
1120
+ };
1121
+ }
1122
+ }
1123
+ });
1124
+ if (Object.keys(localization).length === 0) {
1125
+ return;
1124
1126
  }
1127
+ return Object.keys(localization).map((script) => ({
1128
+ script,
1129
+ fields: { ...localization[script].fields }
1130
+ }));
1125
1131
  };
1126
1132
  const MANDATORY_FIELDS_BUSINESS_DETAILS = [
1127
1133
  "basicInformation.legalCompanyName",
1128
1134
  "basicInformation.country"
1129
1135
  ];
1130
- const parseBusinessDetailsScenarios = (scenarios, country) => augmentWithCountryConfigs(
1131
- businessDetailsCountryConfig[country],
1132
- composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario)
1133
- );
1134
1136
  const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) => {
1135
1137
  const value = getProp(data, detail);
1136
1138
  return !isEmpty$1(value);
@@ -1138,74 +1140,72 @@ const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) =>
1138
1140
  const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
1139
1141
  const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
1140
1142
  const formatBasicInformation = (data, labels, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
1141
- var _a, _b, _c, _d, _e;
1142
- const country = data == null ? void 0 : data.country;
1143
+ const country = data?.country;
1143
1144
  const registrationNumberLabel = resolveFieldMetadata(
1144
1145
  registrationNumberDefaultFieldConfig[country],
1145
1146
  {
1146
1147
  companyType,
1147
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data == null ? void 0 : data.registrationNumber, country, companyType) : (_b = (_a = getCompanyRegistrationNumberOptions(country, companyType)) == null ? void 0 : _a[0]) == null ? void 0 : _b.id
1148
+ registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1148
1149
  },
1149
1150
  registrationNumberDefaultFieldMetadata
1150
1151
  ).label;
1151
1152
  const taxIdLabel = resolveFieldMetadata(
1152
- defaultFieldConfig[country],
1153
+ taxInformationDefaultFieldConfig[country],
1153
1154
  {
1154
1155
  taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1155
1156
  // TODO use type selector
1156
1157
  companyType: void 0
1157
1158
  },
1158
- defaultFieldMetadata
1159
+ taxInformationDefaultFieldMetadata
1159
1160
  ).label;
1160
1161
  const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
1161
1162
  return {
1162
- [((_c = labels == null ? void 0 : labels.basicInformation) == null ? void 0 : _c.legalCompanyName) ?? "legalCompanyName"]: data.legalCompanyName,
1163
+ [labels?.basicInformation?.legalCompanyName ?? "legalCompanyName"]: data.legalCompanyName,
1163
1164
  country: datasetUtils.getCountryName(data.country),
1164
1165
  [getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
1165
1166
  data.stateOrProvince,
1166
1167
  data.country
1167
1168
  ),
1168
- [taxIdLabel]: (_e = (_d = data.taxInformation) == null ? void 0 : _d.find((taxId) => data.country === taxId.country)) == null ? void 0 : _e.number,
1169
+ [taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
1169
1170
  [registrationNumberLabel]: data.registrationNumber,
1170
1171
  countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
1171
1172
  };
1172
1173
  };
1173
1174
  const formatAdditionalInformation = (data, labels, country, companyType, i18n) => {
1174
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
1175
1175
  const registrationNumberLabel = resolveFieldMetadata(
1176
1176
  registrationNumberDefaultFieldConfig[country],
1177
1177
  {
1178
1178
  companyType,
1179
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data == null ? void 0 : data.registrationNumber, country, companyType) : (_b = (_a = getCompanyRegistrationNumberOptions(country, companyType)) == null ? void 0 : _a[0]) == null ? void 0 : _b.id
1179
+ registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1180
1180
  },
1181
1181
  registrationNumberDefaultFieldMetadata
1182
1182
  ).label;
1183
1183
  const taxIdLabel = resolveFieldMetadata(
1184
- defaultFieldConfig[country],
1184
+ taxInformationDefaultFieldConfig[country],
1185
1185
  {
1186
1186
  taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1187
1187
  // TODO use type selector
1188
1188
  companyType: void 0
1189
1189
  },
1190
- defaultFieldMetadata
1190
+ taxInformationDefaultFieldMetadata
1191
1191
  ).label;
1192
1192
  return {
1193
- [((_c = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _c.doingBusinessAs) ?? "doingBusinessAs"]: data.doingBusinessAs,
1193
+ [labels?.additionalInformation?.legalForm ?? "businessStructure"]: data.legalFormLabel,
1194
+ [labels?.additionalInformation?.doingBusinessAs ?? "doingBusinessAs"]: data.doingBusinessAs,
1194
1195
  [registrationNumberLabel]: data.registrationNumber,
1195
- [taxIdLabel]: data.isUen ? void 0 : (_e = (_d = data.taxInformation) == null ? void 0 : _d.find((taxId) => country === taxId.country)) == null ? void 0 : _e.number,
1196
- [((_f = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _f.vatNumber) ?? "vatNumber"]: data.vatNumber,
1197
- [((_g = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _g.vatAbsenceReason) ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
1198
- [((_h = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _h.dateOfIncorporation) ?? "dateOfIncorporation"]: data.dateOfIncorporation,
1199
- [((_i = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _i.stockExchangeMIC) ?? "stockExchangeMIC"]: data.stockExchangeMIC,
1200
- [((_j = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _j.stockISIN) ?? "stockISIN"]: data.stockISIN,
1201
- [((_k = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _k.stockTickerSymbol) ?? "stockTickerSymbol"]: data.stockTickerSymbol,
1202
- [((_l = labels == null ? void 0 : labels.additionalInformation) == null ? void 0 : _l.eInvoicingCode) ?? "eInvoicingCode"]: data.eInvoicingCode
1196
+ [taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
1197
+ [labels?.additionalInformation?.vatNumber ?? "vatNumber"]: data.vatNumber,
1198
+ [labels?.additionalInformation?.vatAbsenceReason ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
1199
+ [labels?.additionalInformation?.dateOfIncorporation ?? "dateOfIncorporation"]: data.dateOfIncorporation,
1200
+ [labels?.additionalInformation?.stockExchangeMIC ?? "stockExchangeMIC"]: data.stockExchangeMIC,
1201
+ [labels?.additionalInformation?.stockISIN ?? "stockISIN"]: data.stockISIN,
1202
+ [labels?.additionalInformation?.stockTickerSymbol ?? "stockTickerSymbol"]: data.stockTickerSymbol,
1203
+ [labels?.additionalInformation?.eInvoicingCode ?? "eInvoicingCode"]: data.eInvoicingCode
1203
1204
  };
1204
1205
  };
1205
1206
  const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) => {
1206
1207
  const datasetUtils = datasetUtilities(i18n.locale);
1207
1208
  return entriesOf(data).reduce((summaryData, [form]) => {
1208
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
1209
1209
  if (!form || !data[form]) return summaryData;
1210
1210
  const isCountryOfGoverningLawEnabled = isExperimentEnabled(
1211
1211
  "EnableCountryOfGoverningLawForUKCompanies"
@@ -1218,7 +1218,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1218
1218
  data[form],
1219
1219
  labels,
1220
1220
  datasetUtils,
1221
- (_a = data.companyStructure) == null ? void 0 : _a.entityType,
1221
+ data.companyStructure?.entityType,
1222
1222
  isCountryOfGoverningLawEnabled
1223
1223
  )
1224
1224
  };
@@ -1227,7 +1227,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1227
1227
  ...summaryData,
1228
1228
  [form]: {
1229
1229
  entityType: i18n.get(
1230
- (_c = companyTypeMetadata[(_b = data[form]) == null ? void 0 : _b.entityType]) == null ? void 0 : _c.name
1230
+ companyTypeMetadata[data[form]?.entityType]?.name
1231
1231
  )
1232
1232
  }
1233
1233
  };
@@ -1239,8 +1239,8 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1239
1239
  additionalInformationFormName: formatAdditionalInformation(
1240
1240
  data[form],
1241
1241
  labels,
1242
- (_d = data.basicInformation) == null ? void 0 : _d.country,
1243
- (_e = data.companyStructure) == null ? void 0 : _e.entityType,
1242
+ data.basicInformation?.country,
1243
+ data.companyStructure?.entityType,
1244
1244
  i18n
1245
1245
  ),
1246
1246
  registrationAddress: mapAddressLabels(data[form].registrationAddress, datasetUtils),
@@ -1253,7 +1253,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1253
1253
  ...summaryData,
1254
1254
  [form]: {
1255
1255
  companyRegistrationDocument: {
1256
- fileName: (_g = (_f = data[form].registrationDocument) == null ? void 0 : _f[0]) == null ? void 0 : _g.name
1256
+ fileName: data[form].registrationDocument?.[0]?.name
1257
1257
  }
1258
1258
  }
1259
1259
  };
@@ -1263,7 +1263,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1263
1263
  ...summaryData,
1264
1264
  [form]: {
1265
1265
  companyTaxDocument: {
1266
- fileName: (_i = (_h = data[form].taxDocument) == null ? void 0 : _h[0]) == null ? void 0 : _i.name
1266
+ fileName: data[form].taxDocument?.[0]?.name
1267
1267
  }
1268
1268
  }
1269
1269
  };
@@ -1273,7 +1273,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1273
1273
  ...summaryData,
1274
1274
  [form]: {
1275
1275
  companyProofOfDirectorDocument: {
1276
- fileName: (_k = (_j = data[form].proofOfDirector) == null ? void 0 : _j[0]) == null ? void 0 : _k.name
1276
+ fileName: data[form].proofOfDirector?.[0]?.name
1277
1277
  }
1278
1278
  }
1279
1279
  };
@@ -1283,7 +1283,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1283
1283
  ...summaryData,
1284
1284
  [form]: {
1285
1285
  companyProofOfSignatoryDocument: {
1286
- fileName: (_m = (_l = data[form].proofOfSignatory) == null ? void 0 : _l[0]) == null ? void 0 : _m.name
1286
+ fileName: data[form].proofOfSignatory?.[0]?.name
1287
1287
  }
1288
1288
  }
1289
1289
  };
@@ -1293,19 +1293,24 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
1293
1293
  ...summaryData,
1294
1294
  [form]: {
1295
1295
  companyProofOfOwnershipDocument: {
1296
- fileName: (_n = data[form].proofOfOwnership) == null ? void 0 : _n.map((doc) => doc.name).join("\n")
1296
+ fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
1297
1297
  }
1298
1298
  }
1299
1299
  };
1300
- case "companyFinancialInformation":
1300
+ case "companyFinancialInformation": {
1301
+ const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1302
+ "EnableIncorporationDateBasedFinancialValidationForHO"
1303
+ );
1301
1304
  return {
1302
1305
  ...summaryData,
1303
1306
  [form]: formatFinancialInformationSummary(
1304
1307
  data[form],
1305
1308
  i18n,
1306
- (_o = data == null ? void 0 : data.basicInformation) == null ? void 0 : _o.country
1309
+ data?.basicInformation?.country,
1310
+ isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1307
1311
  )
1308
1312
  };
1313
+ }
1309
1314
  default:
1310
1315
  return summaryData;
1311
1316
  }
@@ -1326,12 +1331,11 @@ async function submitDocuments({
1326
1331
  if (formattedDocument) {
1327
1332
  await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
1328
1333
  formattedDocument.forEach((doc) => {
1329
- var _a;
1330
- userEvents == null ? void 0 : userEvents.addTaskEvent("Success", {
1334
+ userEvents?.addTaskEvent("Success", {
1331
1335
  ...additionalTrackingParams,
1332
1336
  actionType: "upload",
1333
1337
  documentType: doc.type,
1334
- fileExtention: ((_a = doc.attachments) == null ? void 0 : _a.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0)) ?? []
1338
+ fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
1335
1339
  });
1336
1340
  });
1337
1341
  }
@@ -1367,17 +1371,16 @@ async function submit({
1367
1371
  isExperimentEnabled,
1368
1372
  userEvents
1369
1373
  }) {
1370
- var _a, _b, _c, _d, _e;
1371
1374
  const logger = createLogger();
1372
1375
  setLoadingStatus("loading");
1373
- const trackingPayload = {
1376
+ let trackingPayload = {
1374
1377
  ...additionalTrackingParams,
1375
1378
  actionType: "submit",
1376
- companyStructure: ((_a = data.companyStructure) == null ? void 0 : _a.entityType) ?? null,
1377
- countryOfRegistration: ((_b = data.basicInformation) == null ? void 0 : _b.country) ?? null,
1378
- legalEntityName: accountHolder === "theCompanyIWorkFor" ? ((_c = data.basicInformation) == null ? void 0 : _c.legalCompanyName) ?? null : null,
1379
+ companyStructure: data.companyStructure?.entityType ?? null,
1380
+ countryOfRegistration: data.basicInformation?.country ?? null,
1381
+ legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName ?? null : null,
1379
1382
  // Only send legalCompanyName for organizations
1380
- usedAdditionalAddress: ((_d = data.additionalInformation) == null ? void 0 : _d.operationalAddressIsSame) === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
1383
+ usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
1381
1384
  };
1382
1385
  const entityToUpdate = (() => {
1383
1386
  switch (taskType) {
@@ -1392,12 +1395,12 @@ async function submit({
1392
1395
  }
1393
1396
  })();
1394
1397
  const handleSubmitLegalEntity = async (legalEntity) => {
1395
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !(nestedLegalEntity == null ? void 0 : nestedLegalEntity.id) || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !(nestedLegalEntity == null ? void 0 : nestedLegalEntity.id) || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !(associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id)) {
1398
+ if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1396
1399
  return await createLegalEntity(legalEntity);
1397
1400
  } else {
1398
1401
  return handleUpdateLegalEntity({
1399
1402
  ...drop("type").from(legalEntity),
1400
- id: (entityToUpdate == null ? void 0 : entityToUpdate.id) ?? legalEntityResponse.id
1403
+ id: entityToUpdate?.id ?? legalEntityResponse.id
1401
1404
  });
1402
1405
  }
1403
1406
  };
@@ -1409,7 +1412,7 @@ async function submit({
1409
1412
  if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
1410
1413
  const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
1411
1414
  const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
1412
- const newRoles = (nestedLegalEntityDetails2 == null ? void 0 : nestedLegalEntityDetails2.roles) ?? [];
1415
+ const newRoles = nestedLegalEntityDetails2?.roles ?? [];
1413
1416
  const rolesChanged = !doArraysMatch(existingRoles, newRoles);
1414
1417
  if (rolesChanged) {
1415
1418
  const updatedAssociations = {
@@ -1431,7 +1434,7 @@ async function submit({
1431
1434
  const updatedAssociations = {
1432
1435
  entityAssociations: [
1433
1436
  {
1434
- type: LegalEntityType.SOLE_PROPRIETORSHIP,
1437
+ type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
1435
1438
  legalEntityId: legalEntity.id
1436
1439
  }
1437
1440
  ]
@@ -1439,9 +1442,9 @@ async function submit({
1439
1442
  await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
1440
1443
  }
1441
1444
  };
1442
- const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse) : null;
1445
+ const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, void 0, isExperimentEnabled) : null;
1443
1446
  const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
1444
- if ((filteredData == null ? void 0 : filteredData.additionalInformation) && !((_e = filteredData == null ? void 0 : filteredData.additionalInformation) == null ? void 0 : _e.taxInformation)) {
1447
+ if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
1445
1448
  filteredData.additionalInformation.taxInformation = void 0;
1446
1449
  }
1447
1450
  const isCountryOfGoverningLawEnabled = isExperimentEnabled(
@@ -1449,9 +1452,9 @@ async function submit({
1449
1452
  );
1450
1453
  const countryOfGoverningLaw = getCountryOfGoverningLaw(
1451
1454
  isCountryOfGoverningLawEnabled,
1452
- filteredData == null ? void 0 : filteredData.basicInformation
1455
+ filteredData?.basicInformation
1453
1456
  );
1454
- if (filteredData == null ? void 0 : filteredData.basicInformation) {
1457
+ if (filteredData?.basicInformation) {
1455
1458
  if (countryOfGoverningLaw) {
1456
1459
  filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
1457
1460
  } else {
@@ -1468,7 +1471,7 @@ async function submit({
1468
1471
  )
1469
1472
  };
1470
1473
  const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
1471
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !(associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id)) {
1474
+ if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1472
1475
  await associateLegalEntityWithParent({
1473
1476
  legalEntity,
1474
1477
  associatedLegalArrangement,
@@ -1483,15 +1486,27 @@ async function submit({
1483
1486
  forms,
1484
1487
  userEvents
1485
1488
  });
1486
- userEvents == null ? void 0 : userEvents.addTaskEvent("Success", trackingPayload);
1489
+ userEvents?.addTaskEvent("Success", trackingPayload);
1487
1490
  showToast({ label: i18n.get("successfullyUpdatedDetails"), variant: "success" });
1488
- onExternalSubmit == null ? void 0 : onExternalSubmit(data);
1491
+ onExternalSubmit?.(data);
1489
1492
  } catch (err) {
1490
1493
  if (isValidationError(err)) {
1491
- setProblems({
1492
- ...problems,
1493
- validationErrors: processValidationErrors(err, TaskTypes.BUSINESS_DETAILS)
1494
- });
1494
+ const getErrors = processValidationErrors(err, TaskTypes.BUSINESS_DETAILS);
1495
+ if (getErrors && !Object.keys(getErrors).length) {
1496
+ showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
1497
+ const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
1498
+ if (unmappedErrorNames.length) {
1499
+ trackingPayload = {
1500
+ ...trackingPayload,
1501
+ additionalData: { unmappedErrorNames }
1502
+ };
1503
+ }
1504
+ } else {
1505
+ setProblems({
1506
+ ...problems,
1507
+ validationErrors: getErrors
1508
+ });
1509
+ }
1495
1510
  }
1496
1511
  if (isMaintenanceModeError(err)) {
1497
1512
  showToast({
@@ -1504,23 +1519,23 @@ async function submit({
1504
1519
  showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
1505
1520
  }
1506
1521
  logger.error(err);
1507
- userEvents == null ? void 0 : userEvents.addTaskEvent("Encountered error", {
1522
+ userEvents?.addTaskEvent("Encountered error", {
1508
1523
  ...trackingPayload,
1509
- returnType: err == null ? void 0 : err.errorCode,
1510
- returnValue: (err == null ? void 0 : err.title) || "backend"
1524
+ returnType: err?.errorCode,
1525
+ returnValue: err?.title || "backend"
1511
1526
  });
1512
1527
  } finally {
1513
1528
  setLoadingStatus("success");
1514
1529
  }
1515
1530
  }
1516
1531
  const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
1517
- if (!isCountryOfGoverningLawEnabled || (basicData == null ? void 0 : basicData.country) !== CountryCodes.UnitedKingdom) {
1532
+ if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
1518
1533
  return void 0;
1519
1534
  }
1520
- if (isCountryOfGoverningLawEnabled && (basicData == null ? void 0 : basicData.country) === CountryCodes.UnitedKingdom && !(basicData == null ? void 0 : basicData.countryOfGoverningLaw)) {
1535
+ if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
1521
1536
  return CountryCodes.UnitedKingdom;
1522
1537
  }
1523
- return basicData == null ? void 0 : basicData.countryOfGoverningLaw;
1538
+ return basicData?.countryOfGoverningLaw;
1524
1539
  };
1525
1540
  function BusinessDetailsDropin({
1526
1541
  country,
@@ -1539,7 +1554,6 @@ function BusinessDetailsDropin({
1539
1554
  onSubmit: onExternalSubmit,
1540
1555
  handleHomeClick
1541
1556
  }) {
1542
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
1543
1557
  const formRef = useRef(null);
1544
1558
  const { accountHolder, setAccountHolder } = useAccountHolder();
1545
1559
  const { showToast } = useToastContext();
@@ -1554,31 +1568,33 @@ function BusinessDetailsDropin({
1554
1568
  state: { currentState }
1555
1569
  } = useStateContext();
1556
1570
  useEffect(() => {
1557
- onChange == null ? void 0 : onChange(currentState);
1571
+ onChange?.(currentState);
1558
1572
  }, [currentState, onChange]);
1559
1573
  const isSoleProp = accountHolder === "mySoleProprietorName";
1560
1574
  const formWith2Views = "basicInformation";
1561
1575
  const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
1562
- const legalEntityType = !isSoleProp ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
1576
+ const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
1563
1577
  const isUS = country === CountryCodes.UnitedStates;
1564
- const currentCountry = ((_a = currentState.data.basicInformation) == null ? void 0 : _a.country) ?? country;
1578
+ const currentCountry = currentState.data.basicInformation?.country ?? country;
1565
1579
  const isSkippingCompanyStructure = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
1566
- (_b = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _b.type
1567
- ) && accountHolder !== "aTrust" || isSoleProp;
1580
+ legalEntityResponse?.organization?.type
1581
+ ) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" || isSoleProp;
1568
1582
  useEffect(() => {
1569
- var _a2, _b2;
1570
- const isBankAccountRequested = (_b2 = (_a2 = legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) == null ? void 0 : _a2.issueBankAccount) == null ? void 0 : _b2.requested;
1583
+ const isBankAccountRequested = legalEntityResponse?.capabilities?.issueBankAccount?.requested;
1571
1584
  setIsBankAccountRequestedForOrganization(isBankAccountRequested);
1572
1585
  }, [legalEntityResponse]);
1573
1586
  const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
1574
- const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
1575
- associatedLegalEntity: associatedLegalArrangement
1576
- });
1587
+ const associatedLeTrackingParams = useMemo(
1588
+ () => getAssociatedLeAnalyticsPayload({
1589
+ associatedLegalEntity: associatedLegalArrangement
1590
+ }),
1591
+ [associatedLegalArrangement]
1592
+ );
1577
1593
  useEffect(() => {
1578
1594
  userEvents.updateBaseTrackingPayload({ task: taskType });
1579
1595
  userEvents.addTaskEvent("Landed on page", {
1580
1596
  actionType: "start",
1581
- ...(subjectEntity == null ? void 0 : subjectEntity.id) && (subjectEntity == null ? void 0 : subjectEntity.type) && {
1597
+ ...subjectEntity?.id && subjectEntity?.type && {
1582
1598
  legalEntityId: subjectEntity.id,
1583
1599
  entityType: subjectEntity.type
1584
1600
  },
@@ -1589,12 +1605,13 @@ function BusinessDetailsDropin({
1589
1605
  const [initialData, setInitialData] = useState(() => {
1590
1606
  return mapLegalEntityToBusinessDetailsSchema(
1591
1607
  !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
1592
- isSoleProp ? legalEntityResponse : void 0
1608
+ isSoleProp ? legalEntityResponse : void 0,
1609
+ isExperimentEnabled
1593
1610
  );
1594
1611
  });
1595
- const [trustedFields, setTrustedFields] = useState((subjectEntity == null ? void 0 : subjectEntity.trustedFields) ?? void 0);
1612
+ const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
1596
1613
  const [currentProblems, setCurrentProblems] = useState(
1597
- problems ?? ((_d = (_c = getCapabilityProblems(legalEntityResponse, currentCountry)) == null ? void 0 : _c.LegalEntity) == null ? void 0 : _d[legalEntityResponse.id])
1614
+ problems ?? getCapabilityProblems(legalEntityResponse, currentCountry)?.LegalEntity?.[legalEntityResponse.id] ?? {}
1598
1615
  );
1599
1616
  const [showCompanyStructure, setShowCompanyStructure] = useState(
1600
1617
  currentCountry !== "US" && !isSoleProp
@@ -1614,8 +1631,7 @@ function BusinessDetailsDropin({
1614
1631
  rootLegalEntityId: rootLegalEntityId.value
1615
1632
  });
1616
1633
  useEffect(() => {
1617
- var _a2;
1618
- if (!((_a2 = subjectEntity == null ? void 0 : subjectEntity.documentDetails) == null ? void 0 : _a2.length)) return;
1634
+ if (!subjectEntity?.documentDetails?.length) return;
1619
1635
  documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity.id).then(() => {
1620
1636
  setInitialData(
1621
1637
  mapLegalEntityToBusinessDetailsSchema(
@@ -1628,7 +1644,7 @@ function BusinessDetailsDropin({
1628
1644
  );
1629
1645
  }, []);
1630
1646
  const parseConfiguration = useCallback(
1631
- ({ scenarios, country: country2 }) => parseBusinessDetailsScenarios(scenarios, country2),
1647
+ ({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
1632
1648
  []
1633
1649
  );
1634
1650
  const {
@@ -1664,9 +1680,9 @@ function BusinessDetailsDropin({
1664
1680
  () => getPropsFromConfigurations(
1665
1681
  fieldConfigurations,
1666
1682
  initialForms,
1667
- (currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [],
1668
- (currentProblems == null ? void 0 : currentProblems.missingData) ?? [],
1669
- subjectEntity ? subjectEntity.type === LegalEntityType.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
1683
+ currentProblems?.remediationActions ? Object.values(currentProblems?.remediationActions) : [],
1684
+ currentProblems?.missingData ?? [],
1685
+ subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
1670
1686
  subjectEntity,
1671
1687
  solePropBusinessDetailsApiKeyMapping,
1672
1688
  solePropBusinessDetailsDocumentMapping
@@ -1678,14 +1694,14 @@ function BusinessDetailsDropin({
1678
1694
  customRules,
1679
1695
  {},
1680
1696
  {},
1681
- subjectEntity == null ? void 0 : subjectEntity.type,
1697
+ subjectEntity?.type,
1682
1698
  trustedFields
1683
1699
  ),
1684
1700
  [
1685
1701
  fieldConfigurations,
1686
1702
  initialForms,
1687
- currentProblems == null ? void 0 : currentProblems.remediationActions,
1688
- currentProblems == null ? void 0 : currentProblems.missingData,
1703
+ currentProblems?.remediationActions,
1704
+ currentProblems?.missingData,
1689
1705
  subjectEntity,
1690
1706
  customRules,
1691
1707
  trustedFields
@@ -1706,11 +1722,11 @@ function BusinessDetailsDropin({
1706
1722
  enabled: showBusinessSelection
1707
1723
  }
1708
1724
  );
1709
- const companySearchResults = companySearchResponse == null ? void 0 : companySearchResponse.results;
1710
- const businessName = ((_f = (_e = currentState == null ? void 0 : currentState.data) == null ? void 0 : _e.basicInformation) == null ? void 0 : _f.legalCompanyName) || "";
1711
- const nameMatch = isNormalizedStringMatch(businessName, ((_g = companySearchResults == null ? void 0 : companySearchResults[0]) == null ? void 0 : _g.name) ?? "");
1712
- const taxInformation = (_i = (_h = currentState == null ? void 0 : currentState.data) == null ? void 0 : _h.basicInformation) == null ? void 0 : _i.taxInformation;
1713
- const tin = ((_j = taxInformation == null ? void 0 : taxInformation.find((taxId) => currentCountry === taxId.country)) == null ? void 0 : _j.number) || "";
1725
+ const companySearchResults = companySearchResponse?.results;
1726
+ const businessName = currentState?.data?.basicInformation?.legalCompanyName || "";
1727
+ const nameMatch = isNormalizedStringMatch(businessName, companySearchResults?.[0]?.name ?? "");
1728
+ const taxInformation = currentState?.data?.basicInformation?.taxInformation;
1729
+ const tin = taxInformation?.find((taxId) => currentCountry === taxId.country)?.number || "";
1714
1730
  const [prevCompanySearchResults, setPrevCompanySearchResults] = useState(companySearchResults);
1715
1731
  useEffect(() => {
1716
1732
  if (!searchingCompanies && companySearchResults) {
@@ -1720,7 +1736,7 @@ function BusinessDetailsDropin({
1720
1736
  additionalData: {
1721
1737
  numberOfResults: companySearchResults.length
1722
1738
  },
1723
- ...(subjectEntity == null ? void 0 : subjectEntity.id) && (subjectEntity == null ? void 0 : subjectEntity.type) && {
1739
+ ...subjectEntity?.id && subjectEntity?.type && {
1724
1740
  legalEntityId: subjectEntity.id,
1725
1741
  entityType: subjectEntity.type
1726
1742
  },
@@ -1745,8 +1761,8 @@ function BusinessDetailsDropin({
1745
1761
  const forms = useMemo(() => {
1746
1762
  const requiredForms = getRequiredForms(
1747
1763
  initialForms,
1748
- derivedProps == null ? void 0 : derivedProps.requiredFields,
1749
- derivedProps == null ? void 0 : derivedProps.optionalFields
1764
+ derivedProps?.requiredFields,
1765
+ derivedProps?.optionalFields
1750
1766
  );
1751
1767
  const validityAddedForms = addValidityToForms(
1752
1768
  requiredForms,
@@ -1755,12 +1771,12 @@ function BusinessDetailsDropin({
1755
1771
  );
1756
1772
  return removeConditionalForms(
1757
1773
  validityAddedForms,
1758
- currentCountry !== "US" ? isSkippingCompanyStructure : !showCompanyStructure
1774
+ currentCountry !== "US" || accountHolder !== "theCompanyIWorkFor" ? isSkippingCompanyStructure : !showCompanyStructure
1759
1775
  );
1760
1776
  }, [
1761
1777
  initialForms,
1762
- derivedProps == null ? void 0 : derivedProps.requiredFields,
1763
- derivedProps == null ? void 0 : derivedProps.optionalFields,
1778
+ derivedProps?.requiredFields,
1779
+ derivedProps?.optionalFields,
1764
1780
  currentState.validityByForm,
1765
1781
  currentProblems,
1766
1782
  currentCountry,
@@ -1772,7 +1788,7 @@ function BusinessDetailsDropin({
1772
1788
  data: formatDataForSummary(
1773
1789
  currentState.data,
1774
1790
  forms,
1775
- derivedProps == null ? void 0 : derivedProps.labels,
1791
+ derivedProps?.labels,
1776
1792
  i18n,
1777
1793
  isExperimentEnabled
1778
1794
  ),
@@ -1780,7 +1796,7 @@ function BusinessDetailsDropin({
1780
1796
  keys: ["operationalAddressIsSame"]
1781
1797
  }
1782
1798
  }),
1783
- [currentState.data, derivedProps == null ? void 0 : derivedProps.labels, forms, i18n, isExperimentEnabled]
1799
+ [currentState.data, derivedProps?.labels, forms, i18n, isExperimentEnabled]
1784
1800
  );
1785
1801
  const canSubmitForm = useMemo(
1786
1802
  () => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data),
@@ -1788,7 +1804,7 @@ function BusinessDetailsDropin({
1788
1804
  );
1789
1805
  const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
1790
1806
  const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1791
- const { mutateAsync: clearCompanyData2, isPending: resettingTrustedData } = useClearCompanyData();
1807
+ const { mutateAsync: clearCompanyData, isPending: resettingTrustedData } = useClearCompanyData();
1792
1808
  const submitTask = useCallback(() => {
1793
1809
  setAccountHolder(accountHolder);
1794
1810
  return submit({
@@ -1850,7 +1866,7 @@ function BusinessDetailsDropin({
1850
1866
  });
1851
1867
  const loading = fetchingDataset || searchingCompanies || resettingTrustedData;
1852
1868
  const proceedToManualDataEntry = useCallback(async () => {
1853
- await clearCompanyData2().then(async () => {
1869
+ await clearCompanyData().then(async () => {
1854
1870
  if (!isUS) {
1855
1871
  setShowCompanyStructure(true);
1856
1872
  return;
@@ -1860,13 +1876,13 @@ function BusinessDetailsDropin({
1860
1876
  return;
1861
1877
  }
1862
1878
  const { data: refetchedTinResponse } = await fetchTin();
1863
- if ((refetchedTinResponse == null ? void 0 : refetchedTinResponse.matched) === true) {
1879
+ if (refetchedTinResponse?.matched === true) {
1864
1880
  setShowCompanyStructure(true);
1865
1881
  setBusinessMismatchModalOpen(false);
1866
1882
  } else {
1867
1883
  setBusinessMismatchModalOpen(true);
1868
1884
  setTinMatched(false);
1869
- if ((subjectEntity == null ? void 0 : subjectEntity.id) && (subjectEntity == null ? void 0 : subjectEntity.type)) {
1885
+ if (subjectEntity?.id && subjectEntity?.type) {
1870
1886
  userEvents.addPageEvent("Encountered error", {
1871
1887
  actionType: "submit",
1872
1888
  label: "tinVerificationFailure",
@@ -1878,25 +1894,25 @@ function BusinessDetailsDropin({
1878
1894
  }
1879
1895
  });
1880
1896
  }, [
1881
- clearCompanyData2,
1897
+ clearCompanyData,
1882
1898
  isUS,
1883
1899
  businessName,
1884
1900
  tin,
1885
1901
  getCompanySelection,
1886
- subjectEntity == null ? void 0 : subjectEntity.id,
1887
- subjectEntity == null ? void 0 : subjectEntity.type,
1902
+ subjectEntity?.id,
1903
+ subjectEntity?.type,
1888
1904
  associatedLeTrackingParams,
1889
1905
  userEvents
1890
1906
  ]);
1891
1907
  if (prevCompanySearchResults !== companySearchResults) {
1892
- if ((companySearchResults == null ? void 0 : companySearchResults.length) === 1 && nameMatch) {
1908
+ if (companySearchResults?.length === 1 && nameMatch) {
1893
1909
  setSingleCompanyDatasetParams({
1894
1910
  company: companySearchResults[0],
1895
- state: (_k = currentState.data.basicInformation) == null ? void 0 : _k.stateOrProvince,
1911
+ state: currentState.data.basicInformation?.stateOrProvince,
1896
1912
  name: businessName,
1897
1913
  tin
1898
1914
  });
1899
- } else if ((companySearchResults == null ? void 0 : companySearchResults.length) === 0 && !searchingCompanies && showBusinessSelection) {
1915
+ } else if (companySearchResults?.length === 0 && !searchingCompanies && showBusinessSelection) {
1900
1916
  proceedToManualDataEntry();
1901
1917
  }
1902
1918
  setPrevCompanySearchResults(companySearchResults);
@@ -1905,7 +1921,7 @@ function BusinessDetailsDropin({
1905
1921
  singleCompanyDatasetAndTinResponse
1906
1922
  );
1907
1923
  if (prevSingleCompanyDatasetResponse !== singleCompanyDatasetAndTinResponse) {
1908
- if ((singleCompanyDatasetAndTinResponse == null ? void 0 : singleCompanyDatasetAndTinResponse.tinMatched) === true) {
1924
+ if (singleCompanyDatasetAndTinResponse?.tinMatched === true) {
1909
1925
  setVerifiedBusiness(singleCompanyDatasetAndTinResponse);
1910
1926
  handleNextClick();
1911
1927
  } else {
@@ -1931,7 +1947,7 @@ function BusinessDetailsDropin({
1931
1947
  const selectedFormId = forms[index].formId;
1932
1948
  if (selectedFormId === formWith2Views) {
1933
1949
  if (verifiedBusiness$1) setShowBusinessSelection(false);
1934
- if (activeForm.formId === "companyStructure" && (companySearchResults == null ? void 0 : companySearchResults.length)) {
1950
+ if (activeForm.formId === "companyStructure" && companySearchResults?.length) {
1935
1951
  setShowCompanyStructure(false);
1936
1952
  }
1937
1953
  return gotoFormByFormIndex(index);
@@ -1949,20 +1965,19 @@ function BusinessDetailsDropin({
1949
1965
  gotoFormByFormIndex,
1950
1966
  verifiedBusiness$1,
1951
1967
  activeForm.formId,
1952
- companySearchResults == null ? void 0 : companySearchResults.length,
1968
+ companySearchResults?.length,
1953
1969
  isBusinessSelection
1954
1970
  ]
1955
1971
  );
1956
1972
  const nextClick = useCallback(() => {
1957
- var _a2, _b2, _c2, _d2, _e2, _f2;
1958
1973
  if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || accountHolder !== "theCompanyIWorkFor")
1959
1974
  return handleNextClick();
1960
- if (activeForm.formId === formWith2Views && ((_a2 = currentState.validityByForm) == null ? void 0 : _a2.basicInformation) && !isBusinessSelection && !verifiedBusiness$1) {
1975
+ if (activeForm.formId === formWith2Views && currentState.validityByForm?.basicInformation && !isBusinessSelection && !verifiedBusiness$1) {
1961
1976
  setCompanySearchParams({
1962
- legalCompanyName: ((_c2 = (_b2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _b2.basicInformation) == null ? void 0 : _c2.legalCompanyName) ?? "",
1963
- country: ((_d2 = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _d2.country) ?? country,
1964
- stateOrProvince: (_e2 = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _e2.stateOrProvince,
1965
- registrationNumber: (_f2 = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _f2.registrationNumber
1977
+ legalCompanyName: currentState?.data?.basicInformation?.legalCompanyName ?? "",
1978
+ country: currentState?.data.basicInformation?.country ?? country,
1979
+ stateOrProvince: currentState?.data.basicInformation?.stateOrProvince,
1980
+ registrationNumber: currentState?.data.basicInformation?.registrationNumber
1966
1981
  });
1967
1982
  setShowBusinessSelection(true);
1968
1983
  } else {
@@ -1973,17 +1988,17 @@ function BusinessDetailsDropin({
1973
1988
  isSoleProp,
1974
1989
  handleNextClick,
1975
1990
  activeForm.formId,
1976
- (_l = currentState.validityByForm) == null ? void 0 : _l.basicInformation,
1977
- (_m = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _m.legalCompanyName,
1978
- (_n = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _n.country,
1979
- (_o = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _o.stateOrProvince,
1980
- (_p = currentState == null ? void 0 : currentState.data.basicInformation) == null ? void 0 : _p.registrationNumber,
1991
+ currentState.validityByForm?.basicInformation,
1992
+ currentState?.data.basicInformation?.legalCompanyName,
1993
+ currentState?.data.basicInformation?.country,
1994
+ currentState?.data.basicInformation?.stateOrProvince,
1995
+ currentState?.data.basicInformation?.registrationNumber,
1981
1996
  isBusinessSelection,
1982
1997
  verifiedBusiness$1,
1983
1998
  country
1984
1999
  ]);
1985
2000
  const backClick = useCallback(() => {
1986
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick == null ? void 0 : handleBackClick();
2001
+ if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick?.();
1987
2002
  else {
1988
2003
  switch (activeForm.formId) {
1989
2004
  case formWith2Views: {
@@ -1994,22 +2009,22 @@ function BusinessDetailsDropin({
1994
2009
  if (searchingError) {
1995
2010
  setShowBusinessSelection(false);
1996
2011
  setShowCompanyStructure(false);
1997
- handleBackClick == null ? void 0 : handleBackClick();
2012
+ handleBackClick?.();
1998
2013
  break;
1999
2014
  }
2000
2015
  if (!searchingCompanies && companySearchResults && !companySearchResults.length) {
2001
2016
  setShowBusinessSelection(false);
2002
2017
  } else if (!verifiedBusiness$1) setShowCompanyStructure(false);
2003
- handleBackClick == null ? void 0 : handleBackClick();
2018
+ handleBackClick?.();
2004
2019
  break;
2005
2020
  }
2006
2021
  case "additionalInformation": {
2007
2022
  if (verifiedBusiness$1) setShowBusinessSelection(false);
2008
- handleBackClick == null ? void 0 : handleBackClick();
2023
+ handleBackClick?.();
2009
2024
  break;
2010
2025
  }
2011
2026
  default:
2012
- handleBackClick == null ? void 0 : handleBackClick();
2027
+ handleBackClick?.();
2013
2028
  break;
2014
2029
  }
2015
2030
  }
@@ -2024,7 +2039,7 @@ function BusinessDetailsDropin({
2024
2039
  verifiedBusiness$1
2025
2040
  ]);
2026
2041
  const homeClick = () => {
2027
- handleHomeClick == null ? void 0 : handleHomeClick();
2042
+ handleHomeClick?.();
2028
2043
  };
2029
2044
  const handleBusinessMismatchContinue = useCallback(() => {
2030
2045
  setShowCompanyStructure(true);
@@ -2032,7 +2047,7 @@ function BusinessDetailsDropin({
2032
2047
  setBusinessMismatchModalOpen(false);
2033
2048
  }, [setShowCompanyStructure, setTrustedFields, setBusinessMismatchModalOpen]);
2034
2049
  const handleBusinessMismatchCancel = useCallback(() => {
2035
- backClick == null ? void 0 : backClick();
2050
+ backClick?.();
2036
2051
  setBusinessMismatchModalOpen(false);
2037
2052
  setTinMatched(void 0);
2038
2053
  }, [backClick, setTinMatched, setBusinessMismatchModalOpen]);
@@ -2057,20 +2072,19 @@ function BusinessDetailsDropin({
2057
2072
  queryClient
2058
2073
  ]);
2059
2074
  useEffect(() => {
2060
- var _a2, _b2, _c2;
2061
- if ((verifiedBusiness$1 == null ? void 0 : verifiedBusiness$1.name) && ((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.legalCompanyName) !== (verifiedBusiness$1 == null ? void 0 : verifiedBusiness$1.name) && (((_b2 = currentState.data.basicInformation) == null ? void 0 : _b2.legalCompanyName) !== companySearchParams.legalCompanyName || ((_c2 = currentState.data.basicInformation) == null ? void 0 : _c2.stateOrProvince) !== companySearchParams.stateOrProvince)) {
2075
+ if (verifiedBusiness$1?.name && currentState.data.basicInformation?.legalCompanyName !== verifiedBusiness$1?.name && (currentState.data.basicInformation?.legalCompanyName !== companySearchParams.legalCompanyName || currentState.data.basicInformation?.stateOrProvince !== companySearchParams.stateOrProvince)) {
2062
2076
  setShowCompanyStructure(false);
2063
2077
  resetBusinessData();
2064
2078
  }
2065
2079
  }, [
2066
2080
  companySearchParams,
2067
2081
  currentState.data.basicInformation,
2068
- (_q = currentState.data.basicInformation) == null ? void 0 : _q.legalCompanyName,
2082
+ currentState.data.basicInformation?.legalCompanyName,
2069
2083
  resetBusinessData,
2070
2084
  verifiedBusiness$1
2071
2085
  ]);
2072
2086
  const [prevCurrentCountry, setPrevCurrentCountry] = useState(currentCountry);
2073
- if (prevCurrentCountry !== currentCountry && (trustedFields == null ? void 0 : trustedFields.length) && ((_r = legalEntityResponse.organization) == null ? void 0 : _r.registeredAddress.country) !== currentCountry) {
2087
+ if (prevCurrentCountry !== currentCountry && trustedFields?.length && legalEntityResponse.organization?.registeredAddress.country !== currentCountry) {
2074
2088
  setTrustedFields(void 0);
2075
2089
  setPrevCurrentCountry(currentCountry);
2076
2090
  }
@@ -2135,5 +2149,15 @@ function BusinessDetailsDropin({
2135
2149
  );
2136
2150
  }
2137
2151
  export {
2138
- BusinessDetailsDropin as B
2152
+ BusinessDetailsDropin as B,
2153
+ ProofOfOwnershipDocument as P,
2154
+ RegistrationDocument as R,
2155
+ TaxDocument as T,
2156
+ ProofOfSignatoryDocument as a,
2157
+ ProofOfDirectorDocument as b,
2158
+ mapLegalEntityToBusinessDetailsSchema as c,
2159
+ businessDetailsFieldsPerScenario as d,
2160
+ formatDataForSummary as f,
2161
+ mapApiDocumentToBusinessDetailsDocuments as m,
2162
+ submit as s
2139
2163
  };