@adyen/kyc-components 4.23.0 → 4.24.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1012) hide show
  1. package/dist/4-people-DKuivE0m.js +35 -0
  2. package/dist/AcceptTermsOfServiceWorkflow-C3JrMbt5.js +28 -0
  3. package/dist/Accordion-Dgdxfe-d.js +112 -0
  4. package/dist/AccountSetupRejected-D63dyojj.js +19 -0
  5. package/dist/AdaptiveWorkflow-XhWdnJv-.js +33 -0
  6. package/dist/AdaptiveWorkflowComponent-pMWy1Vig.js +166 -0
  7. package/dist/AddressFields-BC3QHs2u.js +468 -0
  8. package/dist/Alert-Cc7p0N5h.js +172 -0
  9. package/dist/AnalyticsContext-CpimDlw4.js +21 -0
  10. package/dist/Avatar-oTPu6Ejy.js +54 -0
  11. package/dist/BusinessFinancingDropin-CxHK6KY3.js +1870 -0
  12. package/dist/BusinessFinancingPage-teAAjQl8.js +89 -0
  13. package/dist/BusinessRegistrationNumberField-DKka8aVU.js +103 -0
  14. package/dist/BusinessRegistrationNumberFieldGroup-Df6_sDA0.js +173 -0
  15. package/dist/BusinessTypeSelectionPage-BETJH6LZ.js +457 -0
  16. package/dist/Button-DPJ1k02w.js +108 -0
  17. package/dist/Checkbox-qfdF12cF.js +60 -0
  18. package/dist/ComponentGroup-SozxzKWw.js +32 -0
  19. package/dist/Confirm-DoN9R9Z3.js +77 -0
  20. package/dist/ConstitutionalDocument-Bxsr1hQb.js +1229 -0
  21. package/dist/ContactDetails-CiWftLi4.js +516 -0
  22. package/dist/ContextGuidance-BQPwRscq.js +29 -0
  23. package/dist/ContractViewer-CG9UNGz1.js +1030 -0
  24. package/dist/CountryField-DT6-Jr_b.js +38 -0
  25. package/dist/Currency-oeXHRWzy.js +211 -0
  26. package/dist/CustomerSupport-D0bE0zga.js +141 -0
  27. package/dist/DataConflictsModal-CCaMgguu.js +238 -0
  28. package/dist/DebugModal-Cvp7_Z-i.js +456 -0
  29. package/dist/DecisionMakerDetails-Bbb_8up2.js +569 -0
  30. package/dist/DecisionMakerDetailsPage-BDTMzs1X.js +121 -0
  31. package/dist/DecisionMakers-maoFXpGe.js +594 -0
  32. package/dist/Dropzone-ttbRg2LI.js +250 -0
  33. package/dist/EmbeddedStatus-CYd2p4sP.js +129 -0
  34. package/dist/EndStateLayout-zZPm8S5M.js +83 -0
  35. package/dist/EntityAssociation-C2_Xuvf5.js +163 -0
  36. package/dist/ErrorPanel-D4JNFkvi.js +205 -0
  37. package/dist/Field-DwDJQVSS.js +154 -0
  38. package/dist/FormFlow.module-DqMxjYHl.js +20 -0
  39. package/dist/GlobalEntryModal-CLoPJXFE.js +1203 -0
  40. package/dist/GlobalEntryPage-DNPSSZ3M.js +78 -0
  41. package/dist/Header-DVLlJ6we.js +93 -0
  42. package/dist/Icon-4XR6gZzk.js +175 -0
  43. package/dist/IdentityNumber-3V6ZqvHB.js +540 -0
  44. package/dist/IdentityNumberFieldGroup-CAjlgTWn.js +57 -0
  45. package/dist/IdentityScreeningWorkflow-CBStT1hs.js +307 -0
  46. package/dist/Image-Bn_Yyuof.js +33 -0
  47. package/dist/IndividualDropin-0t7Oj71F.js +4175 -0
  48. package/dist/IndustryCodeFieldGroup-C3Zro2ds.js +189 -0
  49. package/dist/InputDate-Bq3Sb-ZW.js +211 -0
  50. package/dist/InputText-CFDEmEtp.js +119 -0
  51. package/dist/Introduction-z2SqIq1W.js +326 -0
  52. package/dist/InvitedDecisionMakerComponent-CZOVc-t9.js +481 -0
  53. package/dist/JpAddressFields-F1YCOcbO.js +288 -0
  54. package/dist/LandingLayout-BsIoIFzs.js +76 -0
  55. package/dist/LegalCompanyNameField-Cosyjk52.js +108 -0
  56. package/dist/LegalName-CtqIpsfy.js +33 -0
  57. package/dist/LegalRepresentativeDetailsPage-DwIARCpj.js +73 -0
  58. package/dist/Link-CvYhseSD.js +32 -0
  59. package/dist/ListItem-CYTpdOMa.js +70 -0
  60. package/dist/Loader-BVtlpTeo.js +92 -0
  61. package/dist/LoaderWrapper-Dc88hY-P.js +34 -0
  62. package/dist/MaybeModal-C4ySaA8A.js +24 -0
  63. package/dist/Modal-CHES6970.js +109 -0
  64. package/dist/Name-CdCsijr5.js +61 -0
  65. package/dist/NewSummary-D55f70wB.js +73 -0
  66. package/dist/NodeRenderer-B3G7pvjG.js +185 -0
  67. package/dist/PatriotActDisclosure-DqUZeLms.js +266 -0
  68. package/dist/PayoutDetailsDropin-LKMpfono.js +4104 -0
  69. package/dist/PayoutDetailsPage-KNHCeXgk.js +69 -0
  70. package/dist/ProgressBar-DWFxLMUA.js +38 -0
  71. package/dist/RadioGroup-Bf3DlQnZ.js +47 -0
  72. package/dist/RadioWithLabel-DQIOEYpF.js +45 -0
  73. package/dist/Review-CS_-zAlg.js +99 -0
  74. package/dist/RootBusinessDetailsPage-1z2_FAb6.js +67 -0
  75. package/dist/RootBusinessLinesPage-BgbkJaW8.js +1464 -0
  76. package/dist/RootIndividualDetailsPage-DA4hh_gc.js +82 -0
  77. package/dist/Select-phAxjMBQ.js +782 -0
  78. package/dist/SignPCIComponent-tBnZMn1u.js +373 -0
  79. package/dist/SingpassSelection-B6_DsZtn.js +156 -0
  80. package/dist/SoleProprietorshipPage-2s1kA9ZV.js +69 -0
  81. package/dist/SourceOfFundsPage-CTjUdOWK.js +2800 -0
  82. package/dist/SourceOfFundsWorkflow-BZabOpi_.js +28 -0
  83. package/dist/StateContext-B2_Pqd_y.js +9 -0
  84. package/dist/StateField-BpMwetvd.js +55 -0
  85. package/dist/Step-C6XxGAda.js +191 -0
  86. package/dist/StructuredList-nPasiuLi.js +56 -0
  87. package/dist/Summary-DM31WxLr.js +235 -0
  88. package/dist/Task-DwGA1eXE.js +129 -0
  89. package/dist/TaskGroup-T594JSYM.js +46 -0
  90. package/dist/TaskListItem-Dx3hKOqG.js +123 -0
  91. package/dist/TaskStepperContextProvider-DdcsqXT7.js +26 -0
  92. package/dist/TaskVerificationStatus-DEXk_ndE.js +125 -0
  93. package/dist/TaxInformationField-CV7SpMH1.js +242 -0
  94. package/dist/TaxInformationFieldGroup-DI2LzuNr.js +290 -0
  95. package/dist/TaxReportingDropin-xYwJ-ju7.js +480 -0
  96. package/dist/TaxReportingWorkflow-BHyHgiI-.js +28 -0
  97. package/dist/TermsOfServiceManagement-CNQ4J5Gn.js +644 -0
  98. package/dist/TextArea-qGEo3PFG.js +81 -0
  99. package/dist/TileGroup-D1-M64Ul.js +172 -0
  100. package/dist/ToastContext-B_wd2IY2.js +13 -0
  101. package/dist/ToastContextProvider-DjYKMflX.js +103 -0
  102. package/dist/TrustDetailsPage-Byj68n3F.js +1172 -0
  103. package/dist/TrustMemberCompanyPage-Bcz4Ql7s.js +108 -0
  104. package/dist/TrustMemberIndividualPage-D6CgWF88.js +108 -0
  105. package/dist/TrustMemberRoleAndTypePage-IUp5FVRW.js +937 -0
  106. package/dist/TrustMembersOverview-7EoKoSMg.js +453 -0
  107. package/dist/UboTaskItem-BmcGj5_U.js +115 -0
  108. package/dist/UnincorporatedPartnershipIndividualPage-BKpJDhhU.js +78 -0
  109. package/dist/UnincorporatedPartnershipMemberCompanyPage-D8VliL0i.js +78 -0
  110. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-D00bHhyf.js +256 -0
  111. package/dist/UnincorporatedPartnershipMembersOverview-Dw5IMSkd.js +160 -0
  112. package/dist/VerificationErrorAlert-CixajVtq.js +38 -0
  113. package/dist/Workflow-CWzMRGHX.js +228 -0
  114. package/dist/_rolldown_dynamic_import_helper-sGNwd-kR.js +14 -0
  115. package/dist/accountHolderUtils-CAu4V0ed.js +43 -0
  116. package/dist/adyen-business-financing.js +38 -37
  117. package/dist/adyen-individual-configuration.js +65 -65
  118. package/dist/adyen-individual-status.js +35 -34
  119. package/dist/adyen-invited-decision-maker.js +3 -3
  120. package/dist/adyen-onboarding.js +109 -101
  121. package/dist/adyen-terms-of-service-management.js +3 -3
  122. package/dist/adyen-terms-of-service-status.js +9 -8
  123. package/dist/adyen-transfer-instrument-configuration.js +62 -61
  124. package/dist/adyen-transfer-instrument-management.js +76 -70
  125. package/dist/adyen-verification-status.js +10 -8
  126. package/dist/arrow-right-D2hul7WG.js +20 -0
  127. package/dist/bafinUtils-DDrD6bfK.js +96 -0
  128. package/dist/bag-CRRS1aow.js +20 -0
  129. package/dist/bank-BoirCLLW.js +20 -0
  130. package/dist/bg-BG-B0Ia8sQm.js +7 -0
  131. package/dist/bg-BG-B2xaZ3wB.js +7 -0
  132. package/dist/bg-BG-DAR7_x2a.js +7 -0
  133. package/dist/bg-BG-DqfAUTUt.js +7 -0
  134. package/dist/bg-BG-ivZjQNJZ.js +7 -0
  135. package/dist/bin-BOmfqfrr.js +30 -0
  136. package/dist/birthDateUtils-D6uk7zwm.js +84 -0
  137. package/dist/businessRegistrationNumberPatterns-A08SLm03.js +982 -0
  138. package/dist/capital-DTjbiurV.js +23 -0
  139. package/dist/cash-stack-7KpYpBek.js +33 -0
  140. package/dist/certificate-BPuoJ6Ip.js +23 -0
  141. package/dist/checkmark-BiSLf8M1.js +20 -0
  142. package/dist/checkmark-circle-Ams7bSve.js +28 -0
  143. package/dist/checkmark-circle-fill-_p4ss4ac.js +30 -0
  144. package/dist/checkmark-small-3bw4ftPV.js +20 -0
  145. package/dist/chevron-down-GgZawvoy.js +20 -0
  146. package/dist/chevron-left-TeZTTvo5.js +20 -0
  147. package/dist/chevron-right-Cg8XlTxx.js +20 -0
  148. package/dist/chevron-up-COQUTli0.js +20 -0
  149. package/dist/circle-CypWzg83.js +30 -0
  150. package/dist/circle-small-filled-DfdK2A35.js +20 -0
  151. package/dist/clock-DmfGJ2r9.js +28 -0
  152. package/dist/coins-CBvbB8_X.js +30 -0
  153. package/dist/constants-C8yo0_RA.js +233 -0
  154. package/dist/contract-D1_RJ_xh.js +20 -0
  155. package/dist/countries-BGMTpyJv.js +41 -0
  156. package/dist/country-BEZkohEO.js +25 -0
  157. package/dist/cross-BORHADVQ.js +20 -0
  158. package/dist/cross-circle-fill-CUXdo1x-.js +30 -0
  159. package/dist/cross-circle-fill-small-DdoPZZeo.js +20 -0
  160. package/dist/cs-CZ-BwO4yrI4.js +7 -0
  161. package/dist/cs-CZ-CHMQYoMF.js +7 -0
  162. package/dist/cs-CZ-DsKlW7_D.js +7 -0
  163. package/dist/cs-CZ-NVntX32n.js +7 -0
  164. package/dist/cs-CZ-ywYpJk1F.js +7 -0
  165. package/dist/da-DK-BvT8Ob4A.js +7 -0
  166. package/dist/da-DK-BzBfkSME.js +7 -0
  167. package/dist/da-DK-CE7jnGea.js +7 -0
  168. package/dist/da-DK-DH5YNYFM.js +7 -0
  169. package/dist/da-DK-LPtdP8h0.js +7 -0
  170. package/dist/datasetUtil-BdHPWsxZ.js +45 -0
  171. package/dist/de-DE-C9cUCFOi.js +7 -0
  172. package/dist/de-DE-Cn866nnd.js +7 -0
  173. package/dist/de-DE-DA4LpyZI.js +7 -0
  174. package/dist/de-DE-DKkoZQ0X.js +7 -0
  175. package/dist/de-DE-DY_EJohI.js +7 -0
  176. package/dist/de-DE-vdy64knk.js +7 -0
  177. package/dist/debouncedInputEvent-Fwwp_K_-.js +54 -0
  178. package/dist/debugStore-Dwn1FXrh.js +9 -0
  179. package/dist/decision-makers-group-iEF9oKPp.js +2673 -0
  180. package/dist/decisionMakerRoles-C6LMC4mh.js +185 -0
  181. package/dist/document-1-qvV57JdS.js +20 -0
  182. package/dist/document-person-DiJ7M8-D.js +28 -0
  183. package/dist/download-Ca4w0Yfr.js +23 -0
  184. package/dist/dropinUtils-DTBezwYT.js +491 -0
  185. package/dist/edit-1-D8VhDchs.js +20 -0
  186. package/dist/el-GR-ChapyKa7.js +7 -0
  187. package/dist/el-GR-Cvms0L4K.js +7 -0
  188. package/dist/el-GR-D9PjIB9j.js +7 -0
  189. package/dist/el-GR-Ov9hqMNe.js +7 -0
  190. package/dist/el-GR-aelq5Q0a.js +7 -0
  191. package/dist/el-GR-zFv0QxMR.js +7 -0
  192. package/dist/en-US-B7HQdrn_.js +7 -0
  193. package/dist/en-US-CI7y0UEH.js +7 -0
  194. package/dist/en-US-C_VjFvk_.js +7 -0
  195. package/dist/en-US-Cz4JoU20.js +41 -0
  196. package/dist/en-US-DPr5RN3e.js +7 -0
  197. package/dist/en-US-U0d3NI20.js +7 -0
  198. package/dist/en-US-tFsDZf7y.js +7 -0
  199. package/dist/entityAssociationUtil-CY0grcyH.js +58 -0
  200. package/dist/error-BvgoQFEI.js +36 -0
  201. package/dist/es-ES-BQrdtEfn.js +7 -0
  202. package/dist/es-ES-BdByhG4y.js +7 -0
  203. package/dist/es-ES-BzlHKYJK.js +7 -0
  204. package/dist/es-ES-DCUvAmKI.js +7 -0
  205. package/dist/es-ES-DdrA8McY.js +7 -0
  206. package/dist/es-ES-DhkTbihW.js +7 -0
  207. package/dist/es-LA-3WgncmHx.js +7 -0
  208. package/dist/es-LA-BxtxM3Ty.js +7 -0
  209. package/dist/es-LA-ChRHGYJP.js +7 -0
  210. package/dist/es-LA-JRuDva0n.js +7 -0
  211. package/dist/es-LA-i7tKJmA8.js +7 -0
  212. package/dist/et-EE-BXY66vAz.js +7 -0
  213. package/dist/et-EE-D8TSvkoE.js +7 -0
  214. package/dist/et-EE-DOgb4q9o.js +7 -0
  215. package/dist/et-EE-HHgM0CfO.js +7 -0
  216. package/dist/et-EE-V-YOCgoh.js +7 -0
  217. package/dist/external-link-Dy4le-8Q.js +20 -0
  218. package/dist/fi-FI-B-eTv4bG.js +7 -0
  219. package/dist/fi-FI-CClpbvJJ.js +7 -0
  220. package/dist/fi-FI-CVBmM-U1.js +7 -0
  221. package/dist/fi-FI-DCYPQ6vS.js +7 -0
  222. package/dist/fi-FI-DCbhu29J.js +7 -0
  223. package/dist/fieldConfigurations-CZCFghnK.js +11 -0
  224. package/dist/form-rules-B0RwhsVw.js +284 -0
  225. package/dist/formFieldsUtils-CnDkgahc.js +7 -0
  226. package/dist/formUtils-BHgG8yQZ.js +52 -0
  227. package/dist/formUtils-DVDcdZsP.js +84 -0
  228. package/dist/formatCurrency-BetgkQKi.js +23 -0
  229. package/dist/formatValidationError-q_w9DTrl.js +23 -0
  230. package/dist/fr-FR-B-jA_cbo.js +7 -0
  231. package/dist/fr-FR-BIyJL6Jj.js +7 -0
  232. package/dist/fr-FR-BzyefnBh.js +7 -0
  233. package/dist/fr-FR-C1xYwHeC.js +7 -0
  234. package/dist/fr-FR-D0hY9V44.js +7 -0
  235. package/dist/fr-FR-Doo1FVx-.js +7 -0
  236. package/dist/genUtils-nphCwt1A.js +60 -0
  237. package/dist/getDefaultRegistrationNumberType-CIu4WMln.js +1056 -0
  238. package/dist/getFormSlice-C1ma6Xd4.js +21 -0
  239. package/dist/getLegalEntityCountry-BK-HHa65.js +15 -0
  240. package/dist/getName-DgxRqagk.js +34 -0
  241. package/dist/getProblemsForEntity-Bn6dXidE.js +16 -0
  242. package/dist/getTrustedDecisionMakers-Ta-pURcL.js +25 -0
  243. package/dist/getTrustedFields-BJ88GlM-.js +28 -0
  244. package/dist/gift-Bs_mAgul.js +20 -0
  245. package/dist/globalStore-WASei98w.js +418 -0
  246. package/dist/graph-Co0JhGiY.js +32 -0
  247. package/dist/graph-up-DIvH9haf.js +38 -0
  248. package/dist/headquarter-BESfDGKh.js +42 -0
  249. package/dist/hotel-Vne7G5M6.js +33 -0
  250. package/dist/hr-HR-6Wj5Tf60.js +7 -0
  251. package/dist/hr-HR-B4FRVzrd.js +7 -0
  252. package/dist/hr-HR-B6z7-PYE.js +7 -0
  253. package/dist/hr-HR-BOYktLQ2.js +7 -0
  254. package/dist/hr-HR-Ct_41fWV.js +7 -0
  255. package/dist/http-fdIO--pH.js +204 -0
  256. package/dist/hu-HU-B7ofWKn_.js +7 -0
  257. package/dist/hu-HU-Bwm4UqZz.js +7 -0
  258. package/dist/hu-HU-CO_7jvk9.js +7 -0
  259. package/dist/hu-HU-CgJ_F3l2.js +7 -0
  260. package/dist/hu-HU-DXK7B0r_.js +7 -0
  261. package/dist/image-BQM21XCk.js +23 -0
  262. package/dist/info-DExoPRH5.js +32 -0
  263. package/dist/info-filled-11KMeUso.js +32 -0
  264. package/dist/invalidateRootLegalEntity-BHaVREw-.js +45 -0
  265. package/dist/isEmpty-Uewyl-r6.js +14 -0
  266. package/dist/isEmptyEntity-3OHnhXqG.js +43 -0
  267. package/dist/it-IT-BFIW0DCO.js +7 -0
  268. package/dist/it-IT-CNr6PIu3.js +7 -0
  269. package/dist/it-IT-CQVFYSVx.js +7 -0
  270. package/dist/it-IT-DfGdOsTs.js +7 -0
  271. package/dist/it-IT-DgRuEpeD.js +7 -0
  272. package/dist/it-IT-tZ7dP-Ia.js +7 -0
  273. package/dist/ja-JP--tMJF7eu.js +7 -0
  274. package/dist/ja-JP-BjMyxZiN.js +7 -0
  275. package/dist/ja-JP-Ct54-uwM.js +7 -0
  276. package/dist/ja-JP-CtX9NZKD.js +7 -0
  277. package/dist/ja-JP-DAClbueM.js +7 -0
  278. package/dist/ja-JP-DOuEAOlh.js +7 -0
  279. package/dist/keys-Ce8YnRP2.js +20 -0
  280. package/dist/legalArrangementUtils-C68JdH6I.js +114 -0
  281. package/dist/listToRecord-DumSkYDz.js +10 -0
  282. package/dist/location-zRH5zJ8c.js +23 -0
  283. package/dist/lt-LT-BUuouq_-.js +7 -0
  284. package/dist/lt-LT-Cs3cvyKf.js +7 -0
  285. package/dist/lt-LT-DQp7UGdC.js +7 -0
  286. package/dist/lt-LT-DoYCfhZU.js +7 -0
  287. package/dist/lt-LT-DqtpAjOg.js +7 -0
  288. package/dist/lv-LV-BCXqSzkk.js +7 -0
  289. package/dist/lv-LV-BW0BscAd.js +7 -0
  290. package/dist/lv-LV-C3p57pZV.js +7 -0
  291. package/dist/lv-LV-ZmyUvPst.js +7 -0
  292. package/dist/lv-LV-cKvnQI3j.js +7 -0
  293. package/dist/mail-i1-zg-cv.js +20 -0
  294. package/dist/mapAddressLocalizationToJpAddressSchema-DpOIaxj6.js +26 -0
  295. package/dist/mapExistingFile-BkwRTTRm.js +55 -0
  296. package/dist/mapJpAddressSchemaToAddressLocalizations-D3VO2nhc.js +74 -0
  297. package/dist/mapLegalEntityToIndividualSchema-CBKR-InO.js +251 -0
  298. package/dist/mapScriptLocalization-BCfkZo1y.js +46 -0
  299. package/dist/mapTransferInstrumentToPayoutAccount-ROfaTly6.js +44 -0
  300. package/dist/maskHelpers-C0wnCoJl.js +719 -0
  301. package/dist/minus-circle-filled-CxUdRO8J.js +30 -0
  302. package/dist/nl-NL-B77Xr99l.js +7 -0
  303. package/dist/nl-NL-BUwMAW5C.js +7 -0
  304. package/dist/nl-NL-B_MaTF5h.js +7 -0
  305. package/dist/nl-NL-CePL3t7P.js +7 -0
  306. package/dist/nl-NL-DR5SCDAF.js +7 -0
  307. package/dist/nl-NL-DqGE4Nz5.js +7 -0
  308. package/dist/no-NO-BePxpMbr.js +7 -0
  309. package/dist/no-NO-DGCfRiU8.js +7 -0
  310. package/dist/no-NO-DdI2BI_e.js +7 -0
  311. package/dist/no-NO-P8SZ1t-h.js +7 -0
  312. package/dist/no-NO-oL1v_O9N.js +7 -0
  313. package/dist/options-horizontal-D86T_xAF.js +30 -0
  314. package/dist/partner-Dje0ykF6.js +30 -0
  315. package/dist/patternValidators-DsrZkuOO.js +73 -0
  316. package/dist/pay-by-link-plane-DAiddPu6.js +33 -0
  317. package/dist/payout-DKiGv3F9.js +38 -0
  318. package/dist/pdf-CC8vqpTo.js +22320 -0
  319. package/dist/pdf.worker.min-CdKJICZZ.js +75124 -0
  320. package/dist/person-DgALGIIz.js +23 -0
  321. package/dist/pl-PL-6Q3Ue3F5.js +7 -0
  322. package/dist/pl-PL-B5PBixAB.js +7 -0
  323. package/dist/pl-PL-BCkw9R28.js +7 -0
  324. package/dist/pl-PL-BY6KUTBO.js +7 -0
  325. package/dist/pl-PL-D-s-JI6X.js +7 -0
  326. package/dist/plus-DlQKP2C9.js +20 -0
  327. package/dist/plus-circle-filled-BntUOVIJ.js +30 -0
  328. package/dist/processCapabilities-CWE5UFt8.js +870 -0
  329. package/dist/processValidationErrors-CjsNfiRK.js +62 -0
  330. package/dist/pt-BR-B_XHiDCU.js +7 -0
  331. package/dist/pt-BR-BvNR77Ru.js +7 -0
  332. package/dist/pt-BR-CrLCMcSz2.js +7 -0
  333. package/dist/pt-BR-MrUfWW4a.js +7 -0
  334. package/dist/pt-BR-vwt2tE7H.js +7 -0
  335. package/dist/pt-PT-B17is9TY.js +7 -0
  336. package/dist/pt-PT-BZNPd_Tb.js +7 -0
  337. package/dist/pt-PT-DDYnXawl.js +7 -0
  338. package/dist/pt-PT-DhF8wwYH.js +7 -0
  339. package/dist/pt-PT-Du2K44jh.js +7 -0
  340. package/dist/pt-PT-qAzFgjvF.js +7 -0
  341. package/dist/recurring-DZgT_ekJ.js +23 -0
  342. package/dist/resolveEnvironment-B3aGkYuN.js +1000 -0
  343. package/dist/revenue-accelerate-aMLYFVW6.js +30 -0
  344. package/dist/ro-RO-B3Fcn95o.js +7 -0
  345. package/dist/ro-RO-BA5GhaCE.js +7 -0
  346. package/dist/ro-RO-BmHe4pZ-.js +7 -0
  347. package/dist/ro-RO-DChAv29z.js +7 -0
  348. package/dist/ro-RO-W1t7Mnbn.js +7 -0
  349. package/dist/roleMetadata-Dm1FVuPT.js +56 -0
  350. package/dist/save-uDNye08N.js +20 -0
  351. package/dist/search-0OS6oe8N.js +30 -0
  352. package/dist/show-BWoS9-Y1.js +23 -0
  353. package/dist/sk-SK-BeNF_m_j.js +7 -0
  354. package/dist/sk-SK-C9CiQLgt.js +7 -0
  355. package/dist/sk-SK-CISCMQ2G.js +7 -0
  356. package/dist/sk-SK-CcoUWnJ4.js +7 -0
  357. package/dist/sk-SK-D10Kpths.js +7 -0
  358. package/dist/sl-SI-Bxu4m_5e.js +7 -0
  359. package/dist/sl-SI-DCMml0lX.js +7 -0
  360. package/dist/sl-SI-DmYiMn91.js +7 -0
  361. package/dist/sl-SI-DxomO9JQ.js +7 -0
  362. package/dist/sl-SI-Qe4hzx5a.js +7 -0
  363. package/dist/solution-payments-BMal7uJZ.js +20 -0
  364. package/dist/store-N7ZA4FKy.js +20 -0
  365. package/dist/style.css +2341 -2252
  366. package/dist/styles-DYaAeu4q.js +2337 -2248
  367. package/dist/summaryItem-uDWmtYtt.js +16 -0
  368. package/dist/sv-SE-B-CXDaXM.js +7 -0
  369. package/dist/sv-SE-BzPNBHOj.js +7 -0
  370. package/dist/sv-SE-C9SgeFv6.js +7 -0
  371. package/dist/sv-SE-DESDUMyu.js +7 -0
  372. package/dist/sv-SE-Dq6oK7B5.js +7 -0
  373. package/dist/sv-SE-issaSBHd.js +7 -0
  374. package/dist/terminal-1-0RlQpbUC.js +30 -0
  375. package/dist/toFullWidth-Dgy4X4i8.js +52 -0
  376. package/dist/translation-DbATp_35.js +684 -0
  377. package/dist/trustUtil-5cyXiJnX.js +98 -0
  378. package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxIdTypeSelectorField.d.ts +1 -2
  379. package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxInformationFieldGroup.d.ts +1 -2
  380. package/dist/types/adaptiveWorkflow/utils/utils.d.ts +1 -1
  381. package/dist/types/api/configurations/useScenarios.d.ts +1 -1
  382. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +12 -12
  383. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -2
  384. package/dist/types/api/documents/documents.types.d.ts +9 -0
  385. package/dist/types/api/documents/useCreateDocument.d.ts +10 -3
  386. package/dist/types/api/documents/useDeleteDocument.d.ts +1 -1
  387. package/dist/types/api/documents/useDocument.d.ts +1 -1
  388. package/dist/types/api/documents/useDocuments.d.ts +10 -2
  389. package/dist/types/api/documents/useUpdateDocument.d.ts +3 -3
  390. package/dist/types/api/invitedEntity/getInvitedEntityProblems.d.ts +1 -1
  391. package/dist/types/api/legalEntity/legalEntity.types.d.ts +32 -0
  392. package/dist/types/api/legalEntity/useLegalEntity.d.ts +92 -92
  393. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +14 -14
  394. package/dist/types/api/taskStatus/useTaskStatuses.d.ts +1 -1
  395. package/dist/types/api/transferInstruments/transferInstruments.types.d.ts +18 -0
  396. package/dist/types/api/transferInstruments/useCreateTransferInstrument.d.ts +2 -2
  397. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +1 -1
  398. package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +2 -2
  399. package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +1 -1
  400. package/dist/types/components/Apps/tasks/TaskList/TaskList.d.ts +1 -1
  401. package/dist/types/components/BankAccount/fields/BankAccountNumber/fieldConfig.d.ts +2 -0
  402. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +1 -1
  403. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +1 -1
  404. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +1 -1
  405. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +1 -1
  406. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +1 -1
  407. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/AccountHolderDescriptionFragment.d.ts +1 -1
  408. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +1 -1
  409. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +1 -1
  410. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +2 -2
  411. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +3 -3
  412. package/dist/types/components/BankAccount/mapping/mapPayoutDocumentsToApiDocuments.d.ts +2 -2
  413. package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
  414. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +8 -4
  415. package/dist/types/components/BankAccount/tasks/PayoutAccount/PayoutAccountTaskListItem.d.ts +2 -2
  416. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  417. package/dist/types/components/Business/hooks/useBusinessDetailsData.d.ts +1 -1
  418. package/dist/types/components/Business/hooks/useSubmitBusinessDetails.types.d.ts +1 -1
  419. package/dist/types/components/Business/mapping/businessDetails/businessDetailsKeyMappings.d.ts +4 -4
  420. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -4
  421. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -1
  422. package/dist/types/components/Business/mapping/businessDetails/solePropBusinessDetailsKeyMappings.d.ts +4 -4
  423. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -1
  424. package/dist/types/components/Business/utils/buildRequiredForms.d.ts +1 -1
  425. package/dist/types/components/Business/utils/getAvailableCompanyStructures.d.ts +1 -2
  426. package/dist/types/components/Business/utils/utils.d.ts +2 -15
  427. package/dist/types/components/BusinessLines/tasks/types.d.ts +1 -1
  428. package/dist/types/components/Contract/tasks/PciDropin/types.d.ts +1 -1
  429. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
  430. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +33 -33
  431. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +2 -2
  432. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +2 -2
  433. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +3 -3
  434. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +3 -4
  435. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStarted.d.ts +2 -3
  436. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SourceOfFundsUpload.d.ts +1 -1
  437. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +1 -3
  438. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +13 -5
  439. package/dist/types/components/EFP/tasks/TaxReportingDropin/TaxReportingGettingStarted.d.ts +2 -2
  440. package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +1 -1
  441. package/dist/types/components/EmbeddedDropins/ManageIndividualComponent/ManageIndividualComponent.d.ts +1 -1
  442. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentComponent.d.ts +1 -1
  443. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverview/ManageTransferInstrumentOverview.d.ts +1 -2
  444. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItem/ManageTransferInstrumentOverviewItem.d.ts +1 -2
  445. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +1 -2
  446. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +1 -1
  447. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +1 -1
  448. package/dist/types/components/GlobalEntry/companyTypeMetadata.d.ts +10 -0
  449. package/dist/types/components/GlobalEntry/forms/CompanyStructure/CompanyStructure.d.ts +3 -0
  450. package/dist/types/components/GlobalEntry/forms/CompanyStructure/types.d.ts +10 -0
  451. package/dist/types/components/GlobalEntry/forms/RegistrationInformation/RegistrationInformation.d.ts +1 -1
  452. package/dist/types/components/GlobalEntry/mapping/globalEntryKeyMapping.d.ts +15 -0
  453. package/dist/types/components/GlobalEntry/mapping/mapGlobalEntrySchemaToLegalEntity.d.ts +6 -0
  454. package/dist/types/components/GlobalEntry/mapping/mapLegalEntityToGlobalEntrySchema.d.ts +9 -0
  455. package/dist/types/components/GlobalEntry/rules.d.ts +1 -0
  456. package/dist/types/components/GlobalEntry/tasks/GlobalEntry.d.ts +1 -1
  457. package/dist/types/components/GlobalEntry/tasks/GlobalEntryModal.d.ts +1 -1
  458. package/dist/types/components/GlobalEntry/tasks/types.d.ts +2 -0
  459. package/dist/types/components/GlobalEntry/utils/buildRequiredForms.d.ts +16 -0
  460. package/dist/types/components/GlobalEntry/utils/getAvailableCompanyStructures.d.ts +12 -0
  461. package/dist/types/components/GlobalEntry/utils/submitGlobalEntry.d.ts +20 -0
  462. package/dist/types/components/GlobalEntry/utils/utils.d.ts +18 -0
  463. package/dist/types/components/GlobalEntry/validate.d.ts +3 -1
  464. package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +3 -3
  465. package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +1 -1
  466. package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +8 -8
  467. package/dist/types/components/Individual/forms/Individual.types.d.ts +2 -3
  468. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -4
  469. package/dist/types/components/Individual/helpers/findRelevantTaxInformation.d.ts +28 -0
  470. package/dist/types/components/Individual/helpers/hasLiveSelfieError.d.ts +11 -0
  471. package/dist/types/components/Individual/helpers/isManualVerificationOrExistingDoc.d.ts +13 -0
  472. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +4 -4
  473. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -2
  474. package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
  475. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +1 -1
  476. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +1 -1
  477. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +34 -10
  478. package/dist/types/components/Individual/tasks/DecisionMakers/getTrustedDecisionMakers.d.ts +2 -3
  479. package/dist/types/components/Individual/tasks/DecisionMakers/hooks/useTaskStatusWithTimeout.d.ts +1 -0
  480. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +2 -3
  481. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
  482. package/dist/types/components/Shared/EntityAssociation/types.d.ts +2 -2
  483. package/dist/types/components/Shared/Introduction/Introduction.d.ts +1 -1
  484. package/dist/types/components/Shared/Introduction/IntroductionScreen.d.ts +1 -1
  485. package/dist/types/components/Shared/Introduction/constants.d.ts +1 -1
  486. package/dist/types/components/Shared/Introduction/copy.d.ts +1 -1
  487. package/dist/types/components/Shared/SingpassBanner/SingpassBanner.d.ts +1 -1
  488. package/dist/types/components/Shared/SingpassSelection/types.d.ts +1 -1
  489. package/dist/types/components/Shared/devex/DebugListener/debugInfo.d.ts +1 -2
  490. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/RegistrationNumberTypeSelector/getDefaultRegistrationNumberType.d.ts +1 -2
  491. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/TaxIdNumberTypeSelector.d.ts +1 -2
  492. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/findExistingTaxInformation.d.ts +10 -0
  493. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +3 -4
  494. package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +107 -8
  495. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +7 -6
  496. package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/VatNumberTypeSelector.d.ts +1 -2
  497. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  498. package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +1 -1
  499. package/dist/types/components/Shared/forms/BusinessTypeSelection/useUpdateLegalEntityAndSelectAccountHolder.d.ts +1 -2
  500. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +2 -4
  501. package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +1 -1
  502. package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +1 -1
  503. package/dist/types/components/Shared/tasks/CustomerSupport/mapping/customerSupportKeyMapping.d.ts +2 -2
  504. package/dist/types/components/Trust/hooks/useExemptSettlor.d.ts +1 -1
  505. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  506. package/dist/types/components/Trust/mapping/mapLegalEntityToTrust.d.ts +1 -1
  507. package/dist/types/components/Trust/mapping/mapTrustDocumentToApiDocument.d.ts +2 -2
  508. package/dist/types/components/Trust/mapping/mapTrustToLegalEntity.d.ts +2 -2
  509. package/dist/types/components/Trust/mapping/trustKeyMappings.d.ts +4 -4
  510. package/dist/types/components/Trust/mapping/trustMembers/getTrustMembers.d.ts +1 -1
  511. package/dist/types/components/Trust/mapping/trustMembers/mapEntityAssociationsToTrustMembers.d.ts +3 -4
  512. package/dist/types/components/Trust/mapping/trustMembers/mapRootLegalEntityToTrustMember.d.ts +1 -1
  513. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/types.d.ts +1 -1
  514. package/dist/types/components/Trust/tasks/TrustDropin/types.d.ts +1 -1
  515. package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +3 -4
  516. package/dist/types/components/Trust/utils/addOrUpdateAssociatedTrustMember.d.ts +1 -1
  517. package/dist/types/components/Trust/utils/addOrUpdateUndefinedBeneficiary.d.ts +1 -1
  518. package/dist/types/components/Trust/utils/createExemptSettlor.d.ts +1 -1
  519. package/dist/types/components/Trust/utils/deleteAssociatedTrustMember.d.ts +1 -1
  520. package/dist/types/components/Trust/utils/deleteUndefinedBeneficiary.d.ts +1 -1
  521. package/dist/types/components/Trust/utils/trustUtil.d.ts +5 -6
  522. package/dist/types/components/Trust/utils/updateExemptSettlorName.d.ts +1 -1
  523. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -2
  524. package/dist/types/components/UnincorporatedPartnership/mapping/mapLegalEntityToUnincorporatedPartnership.d.ts +1 -1
  525. package/dist/types/components/UnincorporatedPartnership/mapping/mapUnincorporatedPartnershipToLegalEntity.d.ts +2 -2
  526. package/dist/types/components/UnincorporatedPartnership/mapping/unincorporatedPartnershipKeyMappings.d.ts +3 -3
  527. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +1 -2
  528. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/types.d.ts +1 -2
  529. package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedPartnershipMembers.d.ts +3 -4
  530. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +1 -1
  531. package/dist/types/context/ToggleContext/types.d.ts +0 -4
  532. package/dist/types/core/errorMapping.d.ts +3 -4
  533. package/dist/types/core/models/api/accountIdentification.d.ts +5 -1
  534. package/dist/types/core/models/api/legal-entity-association.d.ts +0 -19
  535. package/dist/types/core/process-field-configurations.d.ts +4 -6
  536. package/dist/types/core/user-events.d.ts +2 -4
  537. package/dist/types/hooks/introduction/useCanSeeIntroduction.d.ts +1 -1
  538. package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +1 -1
  539. package/dist/types/hooks/introduction/useShouldShowIntroduction.d.ts +1 -1
  540. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +1 -1
  541. package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -2
  542. package/dist/types/hooks/useAssociatedLegalRepresentative.d.ts +1 -1
  543. package/dist/types/hooks/useBusinessSetup.d.ts +1 -1
  544. package/dist/types/hooks/useForm/types.d.ts +1 -2
  545. package/dist/types/hooks/useLegalEntityType.d.ts +1 -2
  546. package/dist/types/hooks/useScenarioConfiguration.d.ts +1 -1
  547. package/dist/types/router/DefaultRouteRedirect.d.ts +1 -1
  548. package/dist/types/router/OnboardingRouter.d.ts +1 -2
  549. package/dist/types/router/getDefaultTask.d.ts +1 -1
  550. package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +3 -5
  551. package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +3 -5
  552. package/dist/types/stores/globalStore/get-task-status.d.ts +4 -4
  553. package/dist/types/stores/globalStore/globalStore.d.ts +3 -5
  554. package/dist/types/stores/globalStore/isEmptyEntity.d.ts +1 -1
  555. package/dist/types/types/businessEntityType.d.ts +1 -2
  556. package/dist/types/types/errors/capability-problems.d.ts +5 -1
  557. package/dist/types/types/errors/entity-problems.d.ts +8 -5
  558. package/dist/types/types/form-rules.d.ts +1 -1
  559. package/dist/types/utils/accountHolderUtils.d.ts +1 -1
  560. package/dist/types/utils/addLinkedFields.d.ts +2 -2
  561. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +4 -4
  562. package/dist/types/utils/analytics/getAnalyticsAssociatedEntityDetails.d.ts +2 -3
  563. package/dist/types/utils/analytics/getPrefilledDetails.d.ts +2 -2
  564. package/dist/types/utils/api/documentUtils.d.ts +21 -10
  565. package/dist/types/utils/api/getProblemsForEntity.d.ts +1 -1
  566. package/dist/types/utils/api/processCapabilities.d.ts +11 -4
  567. package/dist/types/utils/bankUtils.d.ts +5 -0
  568. package/dist/types/utils/birthDateUtils.d.ts +6 -1
  569. package/dist/types/utils/businessUtils.d.ts +21 -6
  570. package/dist/types/utils/customerSupportUtils.d.ts +2 -3
  571. package/dist/types/utils/decisionMakerRoles.d.ts +4 -5
  572. package/dist/types/utils/entityAssociationUtil.d.ts +21 -12
  573. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  574. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -2
  575. package/dist/types/utils/getLegalEntityCountry.d.ts +1 -1
  576. package/dist/types/utils/getName.d.ts +3 -3
  577. package/dist/types/utils/getTrustedFields.d.ts +4 -5
  578. package/dist/types/utils/mapping/documentGuidanceMap.d.ts +2 -2
  579. package/dist/types/utils/mapping/getPage.d.ts +3 -4
  580. package/dist/types/utils/mapping/mappingRecord.d.ts +1 -1
  581. package/dist/types/utils/roleMetadata.d.ts +1 -1
  582. package/dist/types/utils/unincorporatedParnershipUtils.d.ts +4 -4
  583. package/dist/types-B9zXzag-.js +18 -0
  584. package/dist/types-BA3bcGAv.js +58 -0
  585. package/dist/types-CZAHRt31.js +147 -0
  586. package/dist/types-Cwq1JAWT.js +31 -0
  587. package/dist/upload-C5NC1E4N.js +23 -0
  588. package/dist/uppercase-DvjwUM0n.js +7 -0
  589. package/dist/useAccountHolder-DDto9d9n.js +102 -0
  590. package/dist/useAdaptiveWorkflow-DryNv0zI.js +28 -0
  591. package/dist/useAllowedCountries-C-nqVePW.js +80 -0
  592. package/dist/useAnalyticsContext-gSnRnYgV.js +12 -0
  593. package/dist/useAssociatedLegalEntity-DtZtKlls.js +35 -0
  594. package/dist/useBusinessDetailsData-DFU0dLxw.js +4732 -0
  595. package/dist/useBusinessLines-BZfFqvS_.js +27 -0
  596. package/dist/useCanSeeIntroduction-DQbanJNE.js +38 -0
  597. package/dist/useCreateLegalEntity-qP7MeAmi.js +24 -0
  598. package/dist/useDataMissingRemediations-ttUrk09_.js +39 -0
  599. package/dist/useDataset-CdLBLq98.js +98 -0
  600. package/dist/useDeleteTransferInstrument-Dtv14H9I.js +31 -0
  601. package/dist/useForm-CWrbJG44.js +504 -0
  602. package/dist/useHideTaskStepper-Dk7ZQ3U8.js +26 -0
  603. package/dist/useId-BkDhUta2.js +28 -0
  604. package/dist/useIndustryCodes-BMK6IMiW.js +32 -0
  605. package/dist/useLegalEntity-DHA8TJeV.js +48 -0
  606. package/dist/useMultiForm-BxASst0O.js +790 -0
  607. package/dist/useNavigate-CO1Mcekp.js +246 -0
  608. package/dist/useOnboardingStatus-Cz6-hSX4.js +23 -0
  609. package/dist/usePciQuestionnaireList-CWz7Ngs6.js +26 -0
  610. package/dist/useSalesChannels-bV9DgyLW.js +47 -0
  611. package/dist/useScenarios-Bn93htbx.js +55 -0
  612. package/dist/useSettingsContext-9O3Aqpfq.js +12 -0
  613. package/dist/useTaskLandedEvent-DwZHcMEQ.js +26 -0
  614. package/dist/useTaskStatus-DJxOWvuN.js +23 -0
  615. package/dist/useTermsOfServiceStatus-CyVxYqpg.js +39 -0
  616. package/dist/useToastContext-B6Mqc2HY.js +12 -0
  617. package/dist/useToggleContext-B_YexrbT.js +21 -0
  618. package/dist/useTrustMembers-DWo3WU8M.js +151 -0
  619. package/dist/useUnincorporatedPartnershipMembers-DwFPW09D.js +69 -0
  620. package/dist/useUpdateBusinessLines-JRPjqoe9.js +43 -0
  621. package/dist/useUpdateLegalEntity-CqmqXsbR.js +29 -0
  622. package/dist/utils-BWumuCvl.js +210 -0
  623. package/dist/utils-CJcGZvj1.js +178 -0
  624. package/dist/utils-CYUYe54m.js +24 -0
  625. package/dist/utils-Ck_mZapQ.js +1755 -0
  626. package/dist/utils-DdHbAadK.js +80 -0
  627. package/dist/utils-SKYT7xU4.js +52 -0
  628. package/dist/validate-BZ1-ZeKr.js +430 -0
  629. package/dist/validate-DTz70AWN.js +224 -0
  630. package/dist/validate-DUcT-JGF.js +178 -0
  631. package/dist/validate-Dr8UKZCX.js +126 -0
  632. package/dist/validateExtractionResult-CntKbt8c.js +343 -0
  633. package/dist/validationError-DV6t8Ubb.js +55 -0
  634. package/dist/validationResult-bjYBDjbU.js +29 -0
  635. package/dist/validatorUtils-D2O6AAZn.js +106 -0
  636. package/dist/warning-circle-fill-C2lMYPJW.js +30 -0
  637. package/dist/warning-diamond-filled-CQ2DdW5g.js +30 -0
  638. package/dist/webinar-BpZWqd-g.js +33 -0
  639. package/package.json +26 -26
  640. package/dist/4-people-Dxu4nHSX.js +0 -35
  641. package/dist/AcceptTermsOfServiceWorkflow-CvKbU2WY.js +0 -28
  642. package/dist/Accordion-Sjyj7C_t.js +0 -112
  643. package/dist/AccountSetupRejected-Cq_nlmLn.js +0 -18
  644. package/dist/AdaptiveWorkflow-CM7ZVGXv.js +0 -210
  645. package/dist/AdaptiveWorkflowComponent-tM1hJ1zF.js +0 -165
  646. package/dist/AddressFields-BsxEdBvQ.js +0 -464
  647. package/dist/Avatar-Zp1T9qAL.js +0 -54
  648. package/dist/BusinessFinancingDropin-vugW4Vvi.js +0 -1857
  649. package/dist/BusinessFinancingPage-0J_LImeN.js +0 -89
  650. package/dist/BusinessRegistrationNumberField-qdC_srMn.js +0 -101
  651. package/dist/BusinessRegistrationNumberFieldGroup-BvC9n4ou.js +0 -171
  652. package/dist/BusinessTypeSelectionPage-WCEqP4G2.js +0 -457
  653. package/dist/Button-DfRmINzF.js +0 -108
  654. package/dist/Checkbox-B730k3Yy.js +0 -108
  655. package/dist/ComponentGroup-CsnkYMbT.js +0 -32
  656. package/dist/ConstitutionalDocument-D92EPGmG.js +0 -1224
  657. package/dist/ContactDetails-DDSd6X0z.js +0 -511
  658. package/dist/ContextGuidance-B2ew1lzC.js +0 -29
  659. package/dist/ContractViewer-JtnAXSDa.js +0 -979
  660. package/dist/Currency-BKTf95Wp.js +0 -210
  661. package/dist/CustomerSupport-CCFayyJG.js +0 -140
  662. package/dist/DataConflictsModal-D-fP_eNs.js +0 -237
  663. package/dist/DebugModal-CG6CvUnj.js +0 -450
  664. package/dist/DecisionMakerDetails-DWC1nORL.js +0 -565
  665. package/dist/DecisionMakerDetailsPage-BVXA74FO.js +0 -122
  666. package/dist/DecisionMakers-Cvm_i6Uf.js +0 -589
  667. package/dist/Dropzone-CNHxDEc3.js +0 -250
  668. package/dist/EmbeddedStatus-tbJfdxm8.js +0 -129
  669. package/dist/EndStateLayout-BK1Hh02g.js +0 -83
  670. package/dist/EntityAssociation-i903L9Dh.js +0 -163
  671. package/dist/ErrorPanel-tnFOlOZU.js +0 -205
  672. package/dist/GlobalEntryModal-DQoIIvGS.js +0 -975
  673. package/dist/GlobalEntryPage-DLRGPpAu.js +0 -78
  674. package/dist/Icon-C3S5_kkS.js +0 -175
  675. package/dist/IdentityNumber-B8MXzXsO.js +0 -536
  676. package/dist/IdentityNumberFieldGroup-D7xb2TY7.js +0 -57
  677. package/dist/IdentityScreeningWorkflow-BdGXtdns.js +0 -307
  678. package/dist/Image-D82terx4.js +0 -33
  679. package/dist/IndividualDropin-C0vTSDYU.js +0 -4138
  680. package/dist/IndustryCodeFieldGroup-CGcE5yYR.js +0 -188
  681. package/dist/InputDate-Ci60MBrH.js +0 -211
  682. package/dist/InputText-CTpVF0Mu.js +0 -154
  683. package/dist/Introduction-Dx6DDaL7.js +0 -327
  684. package/dist/InvitedDecisionMakerComponent-Ckd26d6Y.js +0 -481
  685. package/dist/JpAddressFields-C9MbL5XV.js +0 -287
  686. package/dist/LegalCompanyNameField-D0jM5LDT.js +0 -108
  687. package/dist/LegalName-TjhII9_p.js +0 -33
  688. package/dist/LegalRepresentativeDetailsPage-CvGtANu3.js +0 -74
  689. package/dist/Link-c2jAgGgc.js +0 -32
  690. package/dist/ListItem-C35r8558.js +0 -93
  691. package/dist/Loader-BEpMlKm2.js +0 -92
  692. package/dist/Modal-BsivDPTd.js +0 -129
  693. package/dist/Name-DMf8Uyof.js +0 -61
  694. package/dist/NewSummary-DxWLTnJy.js +0 -73
  695. package/dist/PatriotActDisclosure-ChZ_ePr2.js +0 -265
  696. package/dist/PayoutDetailsDropin-BhtJSFAS.js +0 -4073
  697. package/dist/PayoutDetailsPage-MW5Pygp2.js +0 -70
  698. package/dist/RadioGroup-D8DRUJ2o.js +0 -1806
  699. package/dist/Review-DImhCvoG.js +0 -99
  700. package/dist/RootBusinessDetailsPage-Cmh9Z_4g.js +0 -68
  701. package/dist/RootBusinessLinesPage-C_p-CtCH.js +0 -1455
  702. package/dist/RootIndividualDetailsPage-04cJ6C15.js +0 -80
  703. package/dist/Select-ByVcS_J2.js +0 -1093
  704. package/dist/SignPCIComponent-CAwp2xCC.js +0 -370
  705. package/dist/SingpassSelection-Txx3gp_g.js +0 -157
  706. package/dist/SoleProprietorshipPage-CWegllTo.js +0 -70
  707. package/dist/SourceOfFundsPage-B22iW1ow.js +0 -2781
  708. package/dist/SourceOfFundsWorkflow-BKHZbLR_.js +0 -28
  709. package/dist/StateField-CsO_28Co.js +0 -296
  710. package/dist/Step-BUMarnLL.js +0 -191
  711. package/dist/Task-Bj_CjiHG.js +0 -129
  712. package/dist/TaskGroup-BMXhoq1Y.js +0 -46
  713. package/dist/TaskListItem-BIKdDEzU.js +0 -123
  714. package/dist/TaskStepperContextProvider-D0tKJplv.js +0 -26
  715. package/dist/TaskVerificationStatus-DPA4ZEPa.js +0 -125
  716. package/dist/TaxInformationFieldGroup-D_6IRGj9.js +0 -287
  717. package/dist/TaxReportingDropin-DA475crP.js +0 -475
  718. package/dist/TaxReportingWorkflow-kcto0Ysw.js +0 -28
  719. package/dist/TermsOfServiceManagement-HDnaIeWZ.js +0 -635
  720. package/dist/TextArea-qbFhi8Az.js +0 -81
  721. package/dist/TrustDetailsPage-BqVS0xOU.js +0 -1155
  722. package/dist/TrustMemberCompanyPage-DTe7xWpj.js +0 -109
  723. package/dist/TrustMemberIndividualPage-C1BDs9Rm.js +0 -110
  724. package/dist/TrustMemberRoleAndTypePage-GXWuitmt.js +0 -927
  725. package/dist/TrustMembersOverview-BjJ5fPcC.js +0 -449
  726. package/dist/UboTaskItem-Aq3iNKX0.js +0 -115
  727. package/dist/UnincorporatedPartnershipIndividualPage-DdPh2_sa.js +0 -79
  728. package/dist/UnincorporatedPartnershipMemberCompanyPage-h3OTr_91.js +0 -79
  729. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-CwemN4fL.js +0 -254
  730. package/dist/UnincorporatedPartnershipMembersOverview-CUczPfUl.js +0 -158
  731. package/dist/VerificationErrorAlert-BBfoLMwb.js +0 -64
  732. package/dist/Workflow-Do7P-qDn.js +0 -228
  733. package/dist/accountHolderUtils-DMi_DHCU.js +0 -44
  734. package/dist/arrow-right-Bk-ewsex.js +0 -20
  735. package/dist/bafinUtils-M2AASP_e.js +0 -1963
  736. package/dist/bag-9BNq_QQO.js +0 -20
  737. package/dist/bank-BRbxxVK5.js +0 -20
  738. package/dist/bg-BG-BtgA44Ui.js +0 -7
  739. package/dist/bg-BG-DX5QKxJz.js +0 -7
  740. package/dist/bg-BG-DYkxVgeJ.js +0 -7
  741. package/dist/bg-BG-K6LIkCdf.js +0 -7
  742. package/dist/bg-BG-uuNDTOoN.js +0 -7
  743. package/dist/bin-DE1613_5.js +0 -30
  744. package/dist/businessRegistrationNumberPatterns-C_MSKHlF.js +0 -981
  745. package/dist/capital-aNk7ragc.js +0 -23
  746. package/dist/cash-stack-DuKKc4Qj.js +0 -33
  747. package/dist/certificate-9gDKvXCm.js +0 -23
  748. package/dist/checkmark-BuqDN4WO.js +0 -20
  749. package/dist/checkmark-circle-OqcwA6N6.js +0 -28
  750. package/dist/checkmark-circle-fill-BfcUovCf.js +0 -30
  751. package/dist/checkmark-small-CBORXg_J.js +0 -20
  752. package/dist/chevron-down-CjRta08O.js +0 -20
  753. package/dist/chevron-left-BEm04mIh.js +0 -20
  754. package/dist/chevron-right-B2GkHG0J.js +0 -20
  755. package/dist/chevron-up-BKfe5Btb.js +0 -20
  756. package/dist/circle-C-uuRI8F.js +0 -30
  757. package/dist/circle-small-filled-Bkh5_ZEu.js +0 -20
  758. package/dist/clock-BWfWiMxz.js +0 -28
  759. package/dist/coins-Cw-jDTUz.js +0 -30
  760. package/dist/constants-BSBlqXY7.js +0 -231
  761. package/dist/contract-PFVBW8xa.js +0 -20
  762. package/dist/countries-BE4iGVAo.js +0 -41
  763. package/dist/country-zZC2TAQB.js +0 -25
  764. package/dist/cross-B37j1-r4.js +0 -20
  765. package/dist/cross-circle-fill-CcjwpLj2.js +0 -30
  766. package/dist/cross-circle-fill-small-CJ4fddNo.js +0 -20
  767. package/dist/cs-CZ-BJSrh3Vp.js +0 -7
  768. package/dist/cs-CZ-CMXGY6Ep.js +0 -7
  769. package/dist/cs-CZ-Ci8c58xJ.js +0 -7
  770. package/dist/cs-CZ-Cu1v5FA8.js +0 -7
  771. package/dist/cs-CZ-lJQmuyHq.js +0 -7
  772. package/dist/da-DK-B9O3xbY6.js +0 -7
  773. package/dist/da-DK-BNwXg4DX.js +0 -7
  774. package/dist/da-DK-C1kmOHvo.js +0 -7
  775. package/dist/da-DK-D53M_d04.js +0 -7
  776. package/dist/da-DK-DjAV5d9A.js +0 -7
  777. package/dist/de-DE-B3sSNcDv.js +0 -7
  778. package/dist/de-DE-C9N6F5oM.js +0 -7
  779. package/dist/de-DE-CjMOQMqQ.js +0 -7
  780. package/dist/de-DE-qJPTCQlG.js +0 -7
  781. package/dist/de-DE-qSBQE-6M.js +0 -7
  782. package/dist/de-DE-w4l6boYT.js +0 -7
  783. package/dist/decision-makers-group-DAoxQRJ3.js +0 -4169
  784. package/dist/decisionMakerRoles-APTR-Ah_.js +0 -185
  785. package/dist/document-1-B3vw8uuK.js +0 -20
  786. package/dist/document-person-CERdIfH0.js +0 -28
  787. package/dist/download-CthdK4dV.js +0 -23
  788. package/dist/edit-1-BW7NwWP7.js +0 -20
  789. package/dist/el-GR-BLNCX9mm.js +0 -7
  790. package/dist/el-GR-Bx996PXx.js +0 -7
  791. package/dist/el-GR-CgoxpC-Q.js +0 -7
  792. package/dist/el-GR-DaAMIpOR.js +0 -7
  793. package/dist/el-GR-DqTetsjB.js +0 -7
  794. package/dist/el-GR-pGsVWsOm.js +0 -7
  795. package/dist/en-US-B82BbZaB.js +0 -7
  796. package/dist/en-US-BUmtG-Wj.js +0 -27
  797. package/dist/en-US-C3i5Oge2.js +0 -7
  798. package/dist/en-US-C8karqc5.js +0 -7
  799. package/dist/en-US-CJPD8qHc.js +0 -7
  800. package/dist/en-US-D0fscfsz.js +0 -7
  801. package/dist/en-US-DapC--Cs.js +0 -7
  802. package/dist/entityAssociationUtil-CLBR9osP.js +0 -59
  803. package/dist/error-CpJV-CLa.js +0 -36
  804. package/dist/es-ES-C14ZT-97.js +0 -7
  805. package/dist/es-ES-DeT4zIDW.js +0 -7
  806. package/dist/es-ES-DyB2KXfT.js +0 -7
  807. package/dist/es-ES-U4-lDfZq.js +0 -7
  808. package/dist/es-ES-tVQDUTJN.js +0 -7
  809. package/dist/es-ES-wvcyuTNN.js +0 -7
  810. package/dist/es-LA-B5IRDCf_.js +0 -7
  811. package/dist/es-LA-B_hzWiiE.js +0 -7
  812. package/dist/es-LA-CG_cu1hM.js +0 -7
  813. package/dist/es-LA-ChLRkx-r.js +0 -7
  814. package/dist/es-LA-mFT_9PL_.js +0 -7
  815. package/dist/et-EE-4_ZUNt3W.js +0 -7
  816. package/dist/et-EE-BCWBT8XN.js +0 -7
  817. package/dist/et-EE-BQEyJFZb.js +0 -7
  818. package/dist/et-EE-DSK7kb3n.js +0 -7
  819. package/dist/et-EE-DWVzz1wR.js +0 -7
  820. package/dist/external-link-CFgynH5A.js +0 -20
  821. package/dist/fi-FI-B-7uBAf5.js +0 -7
  822. package/dist/fi-FI-BeJtSWIh.js +0 -7
  823. package/dist/fi-FI-Caa9ydMd.js +0 -7
  824. package/dist/fi-FI-D06EzKrW.js +0 -7
  825. package/dist/fi-FI-DgMsQBRO.js +0 -7
  826. package/dist/form-rules-zzbZ2bV6.js +0 -1089
  827. package/dist/formatCurrency-Cq3WFpdZ.js +0 -23
  828. package/dist/formatValidationError-BHvKLMYZ.js +0 -23
  829. package/dist/fr-FR-8a-RK9xd.js +0 -7
  830. package/dist/fr-FR-BCfqr4jm.js +0 -7
  831. package/dist/fr-FR-BTJoQq71.js +0 -7
  832. package/dist/fr-FR-CDv300-8.js +0 -7
  833. package/dist/fr-FR-D7DTFYe4.js +0 -7
  834. package/dist/fr-FR-Dl4NL-Nc.js +0 -7
  835. package/dist/genUtils-Ce61IJs8.js +0 -60
  836. package/dist/getDefaultRegistrationNumberType-CI1NVzJR.js +0 -1055
  837. package/dist/getFormSlice-DzRO0UUx.js +0 -52
  838. package/dist/getLegalEntityCountry-CNE5uei8.js +0 -17
  839. package/dist/getName-s7qmFean.js +0 -35
  840. package/dist/getProblemsForEntity-Bh9nSdOW.js +0 -16
  841. package/dist/getTrustedDecisionMakers-DX3nImM5.js +0 -25
  842. package/dist/gift-0jLCte2h.js +0 -20
  843. package/dist/graph-DrxuzQF7.js +0 -32
  844. package/dist/graph-up-4qLbS2Ds.js +0 -38
  845. package/dist/headquarter-3o2GHW5H.js +0 -42
  846. package/dist/hotel-pZlrEAK8.js +0 -33
  847. package/dist/hr-HR-B11sggmG.js +0 -7
  848. package/dist/hr-HR-BjxPRJ1o.js +0 -7
  849. package/dist/hr-HR-COdiWKoq.js +0 -7
  850. package/dist/hr-HR-CXH5M5JZ.js +0 -7
  851. package/dist/hr-HR-me1zsMas.js +0 -7
  852. package/dist/http-DsJtugN1.js +0 -204
  853. package/dist/hu-HU-BNlsrO-l.js +0 -7
  854. package/dist/hu-HU-BQ5310Yi.js +0 -7
  855. package/dist/hu-HU-D1ZZwcl0.js +0 -7
  856. package/dist/hu-HU-DkSsL94T.js +0 -7
  857. package/dist/hu-HU-Dp6xOBN_.js +0 -7
  858. package/dist/image-tfgNnE3G.js +0 -23
  859. package/dist/info-DJW5JooY.js +0 -32
  860. package/dist/info-filled-C5mP6T4Z.js +0 -32
  861. package/dist/it-IT-BORQC-7u.js +0 -7
  862. package/dist/it-IT-BlaVymCj.js +0 -7
  863. package/dist/it-IT-CawjvBDX.js +0 -7
  864. package/dist/it-IT-Cnk7j_gC.js +0 -7
  865. package/dist/it-IT-DIIRAF4_.js +0 -7
  866. package/dist/it-IT-x4LV31GV.js +0 -7
  867. package/dist/ja-JP-CyXnoIu3.js +0 -7
  868. package/dist/ja-JP-DBne3dbI.js +0 -7
  869. package/dist/ja-JP-DS8zN3mY.js +0 -7
  870. package/dist/ja-JP-Dpe9Odla.js +0 -7
  871. package/dist/ja-JP-DrHQO_Se.js +0 -7
  872. package/dist/ja-JP-h3E8hgLv.js +0 -7
  873. package/dist/legal-entity-type-0MfCGzUf.js +0 -13
  874. package/dist/legalArrangementUtils-xvCxpgzJ.js +0 -113
  875. package/dist/location-Dk0rAiaT.js +0 -23
  876. package/dist/lt-LT-8kOI6QVq.js +0 -7
  877. package/dist/lt-LT-B18sQY9g.js +0 -7
  878. package/dist/lt-LT-Byl8QeWO.js +0 -7
  879. package/dist/lt-LT-D3ZUJfjr.js +0 -7
  880. package/dist/lt-LT-Fc1lOUlz.js +0 -7
  881. package/dist/lv-LV-C70c94CI.js +0 -7
  882. package/dist/lv-LV-CXifQKfG.js +0 -7
  883. package/dist/lv-LV-DctYQmfH.js +0 -7
  884. package/dist/lv-LV-Mj_iV56f.js +0 -7
  885. package/dist/lv-LV-adiXoKhv.js +0 -7
  886. package/dist/mail-DG7MBDNE.js +0 -20
  887. package/dist/mapAddressLocalizationToJpAddressSchema-TUaHGQh6.js +0 -26
  888. package/dist/mapExistingFile-CwGW1ru4.js +0 -55
  889. package/dist/mapJpAddressSchemaToAddressLocalizations-CdP6PRAO.js +0 -73
  890. package/dist/mapLegalEntityToIndividualSchema-ByhXwZqs.js +0 -214
  891. package/dist/mapTransferInstrumentToPayoutAccount-6eLKhumO.js +0 -44
  892. package/dist/minus-circle-filled-DglqAgJW.js +0 -30
  893. package/dist/nl-NL-BIpptPn4.js +0 -7
  894. package/dist/nl-NL-BWGCqpWp.js +0 -7
  895. package/dist/nl-NL-Bv8Zk-6e.js +0 -7
  896. package/dist/nl-NL-DOB0b0m4.js +0 -7
  897. package/dist/nl-NL-ehxkZFQd.js +0 -7
  898. package/dist/nl-NL-jt4eYGEY.js +0 -7
  899. package/dist/no-NO-BG1sYkpp.js +0 -7
  900. package/dist/no-NO-CeZQnyyD.js +0 -7
  901. package/dist/no-NO-Chwg5Roi.js +0 -7
  902. package/dist/no-NO-Dx_Z3uoZ.js +0 -7
  903. package/dist/no-NO-P5tRWhV9.js +0 -7
  904. package/dist/options-horizontal-CTUn7IEx.js +0 -30
  905. package/dist/partner-1StoI4_W.js +0 -30
  906. package/dist/pay-by-link-plane-Sa_qkL8C.js +0 -33
  907. package/dist/payout-BAYSxSqU.js +0 -38
  908. package/dist/pdf-uNYg4Mqz.js +0 -22315
  909. package/dist/pdf.worker.min-gK7UJW5a.js +0 -74644
  910. package/dist/person-Da15_s3G.js +0 -23
  911. package/dist/pl-PL-BsXtscoI.js +0 -7
  912. package/dist/pl-PL-CWFdZf24.js +0 -7
  913. package/dist/pl-PL-DSbuyzBx.js +0 -7
  914. package/dist/pl-PL-J9S3_lCf.js +0 -7
  915. package/dist/pl-PL-_KG-ZD1N.js +0 -7
  916. package/dist/plus-BQccvKkd.js +0 -20
  917. package/dist/plus-circle-filled-CqC30FRL.js +0 -30
  918. package/dist/processCapabilities-DRD0Aq2i.js +0 -874
  919. package/dist/processValidationErrors-oxuCOsth.js +0 -62
  920. package/dist/pt-BR-B2q9Nl16.js +0 -7
  921. package/dist/pt-BR-BYbyk6xS.js +0 -7
  922. package/dist/pt-BR-Cph-P8oH.js +0 -7
  923. package/dist/pt-BR-D1yTuXWd2.js +0 -7
  924. package/dist/pt-BR-fKlNUybd.js +0 -7
  925. package/dist/pt-PT-C1gtp2_N.js +0 -7
  926. package/dist/pt-PT-CQQkh5PS.js +0 -7
  927. package/dist/pt-PT-D8ldyR-j.js +0 -7
  928. package/dist/pt-PT-DAvsI-Tr.js +0 -7
  929. package/dist/pt-PT-DhokEMPi.js +0 -7
  930. package/dist/pt-PT-IPhkbQvT.js +0 -7
  931. package/dist/recurring-DSR1fNMh.js +0 -23
  932. package/dist/resolveEnvironment-BYEL10Nc.js +0 -2524
  933. package/dist/revenue-accelerate-CPhAVpPK.js +0 -30
  934. package/dist/ro-RO-C6xoaASq.js +0 -7
  935. package/dist/ro-RO-CP_IrOlX.js +0 -7
  936. package/dist/ro-RO-CQJk7Cpo.js +0 -7
  937. package/dist/ro-RO-CnMe6Mfw.js +0 -7
  938. package/dist/ro-RO-_BLhsnIB.js +0 -7
  939. package/dist/save-DQ-mJX8e.js +0 -20
  940. package/dist/search-DWqWTW_K.js +0 -30
  941. package/dist/show-BbhlD3IY.js +0 -23
  942. package/dist/sk-SK-BOc9IqyW.js +0 -7
  943. package/dist/sk-SK-Bb1CdAzD.js +0 -7
  944. package/dist/sk-SK-Br1Y4_CN.js +0 -7
  945. package/dist/sk-SK-Bx2_85dW.js +0 -7
  946. package/dist/sk-SK-C889qQFo.js +0 -7
  947. package/dist/sl-SI-B-Xa0hlk.js +0 -7
  948. package/dist/sl-SI-BQc61Sz2.js +0 -7
  949. package/dist/sl-SI-DHPadSTy.js +0 -7
  950. package/dist/sl-SI-DO9c7geI.js +0 -7
  951. package/dist/sl-SI-bkhhInrg.js +0 -7
  952. package/dist/solution-payments-D4BORMsX.js +0 -20
  953. package/dist/store-DWaq3ZiC.js +0 -20
  954. package/dist/sv-SE-BXrlr0X5.js +0 -7
  955. package/dist/sv-SE-Dk81lopg.js +0 -7
  956. package/dist/sv-SE-DzsWB30f.js +0 -7
  957. package/dist/sv-SE-IBYnJfbW.js +0 -7
  958. package/dist/sv-SE-X89Q6ZAq.js +0 -7
  959. package/dist/sv-SE-l_UVgmVu.js +0 -7
  960. package/dist/terminal-1-crR-pS_R.js +0 -30
  961. package/dist/translation-BOm4lmPx.js +0 -657
  962. package/dist/types/components/GlobalEntry/globalEntryKeyMapping.d.ts +0 -15
  963. package/dist/types/components/GlobalEntry/utils.d.ts +0 -30
  964. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/getDefaultTaxIdNumberType.d.ts +0 -30
  965. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/inferTaxIdNumberType.d.ts +0 -13
  966. package/dist/types/core/models/api/attachment.d.ts +0 -7
  967. package/dist/types/core/models/api/document.d.ts +0 -25
  968. package/dist/types/core/models/api/entity-type.d.ts +0 -5
  969. package/dist/types/core/models/api/legal-arrangement.d.ts +0 -24
  970. package/dist/types/core/models/api/legal-entity-type.d.ts +0 -8
  971. package/dist/types/core/models/api/legal-entity.d.ts +0 -36
  972. package/dist/types/core/models/api/problem.d.ts +0 -12
  973. package/dist/types/core/models/api/remediating-action.d.ts +0 -5
  974. package/dist/types/core/models/api/transfer-instrument.d.ts +0 -33
  975. package/dist/types/core/models/api/trusted-fields-provider.d.ts +0 -5
  976. package/dist/types/core/models/api/verification-error.d.ts +0 -19
  977. package/dist/types-BeveNAZK.js +0 -19
  978. package/dist/types-wRlt8bxb.js +0 -58
  979. package/dist/upload-D85xAAAm.js +0 -23
  980. package/dist/useAdaptiveWorkflow-DsQESk9f.js +0 -28
  981. package/dist/useBusinessDetailsData-Bja80UYy.js +0 -4722
  982. package/dist/useBusinessLines-BhSN6qCH.js +0 -27
  983. package/dist/useCanSeeIntroduction-BcfQC4IP.js +0 -38
  984. package/dist/useDataMissingRemediations-msU1AJvo.js +0 -39
  985. package/dist/useForm-DbDFfb2S.js +0 -502
  986. package/dist/useHideTaskStepper-CbMcV9mk.js +0 -26
  987. package/dist/useId-oOIS1nsj.js +0 -73
  988. package/dist/useIndustryCodes-uAj90IyS.js +0 -32
  989. package/dist/useLegalEntity-QQXN6YOm.js +0 -48
  990. package/dist/useNavigate-CiKOI5QV.js +0 -246
  991. package/dist/useOnboardingStatus-CsGUjkm-.js +0 -23
  992. package/dist/usePciQuestionnaireList-CFNJD8pS.js +0 -26
  993. package/dist/useSalesChannels-BvGJ9PT6.js +0 -47
  994. package/dist/useScenarios-CGcmXgJv.js +0 -55
  995. package/dist/useTaskLandedEvent-pmN03gtI.js +0 -26
  996. package/dist/useTaskStatus-CgrhdaE_.js +0 -23
  997. package/dist/useTermsOfServiceStatus-DbJDklA2.js +0 -39
  998. package/dist/useTrustMembers-f13Kf1Zk.js +0 -152
  999. package/dist/useUnincorporatedPartnershipMembers-K5jkCKfJ.js +0 -70
  1000. package/dist/useUpdateBusinessLines-DCKYTzxd.js +0 -43
  1001. package/dist/utils-2tir5QtF.js +0 -52
  1002. package/dist/utils-BUOt0VrX.js +0 -179
  1003. package/dist/utils-DBIDcVUN.js +0 -214
  1004. package/dist/validate-BpZBKknS.js +0 -224
  1005. package/dist/validate-CPTQceEQ.js +0 -151
  1006. package/dist/validate-YBDlgvjy.js +0 -429
  1007. package/dist/validate-u6nDNwf1.js +0 -126
  1008. package/dist/validateExtractionResult-dH4TewHf.js +0 -343
  1009. package/dist/validationError-B-B3GC86.js +0 -55
  1010. package/dist/warning-circle-fill-BDTmKU1s.js +0 -30
  1011. package/dist/warning-diamond-filled-BjDL-xa8.js +0 -30
  1012. package/dist/webinar-YMbPoCx3.js +0 -33
@@ -1,2781 +0,0 @@
1
- try {
2
- let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0c7b454b-33d3-4196-8731-b0209f64fcd2", e._sentryDebugIdIdentifier = "sentry-dbid-0c7b454b-33d3-4196-8731-b0209f64fcd2");
4
- } catch (e) {}
5
- import { n as addResourceBundles, r as useTranslation } from "./translation-BOm4lmPx.js";
6
- import { A as _rolldown_dynamic_import_helper_default, k as Header, x as Alert } from "./resolveEnvironment-BYEL10Nc.js";
7
- import { t as createLogger } from "./logger-Z8AeTE4x.js";
8
- import { t as Icon } from "./Icon-C3S5_kkS.js";
9
- import { t as Typography } from "./Typography-CAc_f5Iq.js";
10
- import { t as Loader } from "./Loader-BEpMlKm2.js";
11
- import { n as IconButton, t as Button } from "./Button-DfRmINzF.js";
12
- import { n as httpGet, r as httpPost, s as useApiContext } from "./http-DsJtugN1.js";
13
- import { n as useLegalEntities, r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-QQXN6YOm.js";
14
- import { t as LegalEntityTypes } from "./legal-entity-type-0MfCGzUf.js";
15
- import { t as getLegalEntityCountry } from "./getLegalEntityCountry-CNE5uei8.js";
16
- import { a as objectsDeepEqual } from "./genUtils-Ce61IJs8.js";
17
- import { t as StackLayout } from "./StackLayout-IUdNMDgW.js";
18
- import { n as TASK_STATUS_POLLING_INTERVAL_MS } from "./taskStatus-BtekPA8E.js";
19
- import { C as EntityTypes } from "./processCapabilities-DRD0Aq2i.js";
20
- import { t as TaskTypes } from "./taskTypes-3vSkMBDm.js";
21
- import { i as useAnalyticsContext, t as Modal } from "./Modal-BsivDPTd.js";
22
- import { t as InputText } from "./InputText-CTpVF0Mu.js";
23
- import { v as LandingLayout } from "./form-rules-zzbZ2bV6.js";
24
- import { t as useBusinessLines } from "./useBusinessLines-BhSN6qCH.js";
25
- import { t as Card } from "./Card-BCGLpdw7.js";
26
- import { n as useInvalidateRootLegalEntity, r as useToastContext } from "./useId-oOIS1nsj.js";
27
- import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-Bh9nSdOW.js";
28
- import { t as Avatar } from "./Avatar-Zp1T9qAL.js";
29
- import { r as Field, t as Select } from "./Select-ByVcS_J2.js";
30
- import { o as StructuredList, r as formatObject, s as Confirm } from "./utils-DBIDcVUN.js";
31
- import { m as useCreateLegalEntity, p as useUpdateLegalEntity } from "./StateField-CsO_28Co.js";
32
- import { M as FormContextProvider, d as useFormContext, f as addValidityToForms, g as useMultiForm, k as createFormUtils, m as FormFlow, p as getRequiredForms, t as RadioGroup, u as CountryField, y as useFormComposer } from "./RadioGroup-D8DRUJ2o.js";
33
- import { t as Image } from "./Image-D82terx4.js";
34
- import { t as ErrorPanel } from "./ErrorPanel-tnFOlOZU.js";
35
- import { t as Checkbox } from "./Checkbox-B730k3Yy.js";
36
- import { P as isEmpty, c as TileGroup } from "./bafinUtils-M2AASP_e.js";
37
- import { t as useTaskLandedEvent } from "./useTaskLandedEvent-pmN03gtI.js";
38
- import { a as createDocumentRequest, o as documentApiUtils } from "./validate-YBDlgvjy.js";
39
- import { t as localizeDateString } from "./localizeDateString-Dxlqr4rL.js";
40
- import { t as getValidationErrorDisplayMessages } from "./validationError-B-B3GC86.js";
41
- import { t as InputDate } from "./InputDate-Ci60MBrH.js";
42
- import { t as TextArea } from "./TextArea-qbFhi8Az.js";
43
- import { t as Dropzone } from "./Dropzone-CNHxDEc3.js";
44
- import { t as InputGroup } from "./InputGroup-B4U3QVEp.js";
45
- import { t as Currencies } from "./currency-DQwXq9Mc.js";
46
- import { n as validateDateNotInTheFuture } from "./validate-u6nDNwf1.js";
47
- import { t as useTaskStatus } from "./useTaskStatus-CgrhdaE_.js";
48
- import { t as formatAmountWithCurrency } from "./formatCurrency-Cq3WFpdZ.js";
49
- import { lazy } from "preact/compat";
50
- import { useCallback as useCallback$1, useEffect as useEffect$1, useMemo as useMemo$1, useState as useState$1 } from "preact/hooks";
51
- import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
52
- import { signal } from "@preact/signals";
53
- import { useMutation, useQuery, useQueryClient } from "@tanstack/preact-query";
54
- //#region src/api/businessLines/useUpdateSourceOfFunds.ts
55
- var updateSourceOfFunds = async (businessLineId, legalEntityId, baseUrl, data) => {
56
- return httpPost({
57
- baseUrl,
58
- path: `legalEntities/${legalEntityId}/businessLines/${businessLineId}/sourceOfFunds`
59
- }, data);
60
- };
61
- var useUpdateSourceOfFunds = (options) => {
62
- const { rootLegalEntityId, baseUrl } = useApiContext();
63
- const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
64
- return useMutation({
65
- mutationFn: ({ businessLineId, ...requestData }) => updateSourceOfFunds(businessLineId, rootLegalEntityId.value, baseUrl.value, requestData),
66
- onSuccess: async () => {
67
- await invalidateRootLegalEntity();
68
- },
69
- ...options
70
- });
71
- };
72
- var sourceOfFundsComponentsKeyMapping = {
73
- "sourceOfFundsType.type": "sourceOfFunds.type",
74
- "additionalData.description": "sourceOfFunds.description",
75
- "additionalData.amount": "sourceOfFunds.amount",
76
- "additionalData.dateOfFundsReceived": "sourceOfFunds.dateOfFundsReceived",
77
- "additionalData.purpose": "sourceOfFunds.purpose",
78
- "additionalData.relationship": "sourceOfFunds.relationship",
79
- "additionalData.originatorLegalEntityId": "sourceOfFunds.originatorLegalEntityId",
80
- "additionalData.financiers": "sourceOfFunds.financiers",
81
- "additionalData.cryptocurrencyExchange": "sourceOfFunds.cryptocurrencyExchange",
82
- "additionalData.dateOfSourceEvent": "sourceOfFunds.dateOfSourceEvent",
83
- "additionalData.website": "sourceOfFunds.website",
84
- "additionalData.legalName": "sourceOfFunds.legalName",
85
- "additionalData.firstName": "sourceOfFunds.firstName",
86
- "additionalData.lastName": "sourceOfFunds.lastName",
87
- "additionalData.country": "sourceOfFunds.country",
88
- "additionalData.originatorType": "sourceOfFunds.originatorType"
89
- };
90
- //#endregion
91
- //#region src/components/EFP/mapping/mapSourceOfFundToSourceOfFundsSchema.ts
92
- var mapSourceOfFundToSourceOfFundsSchema = (businessLine) => formatObject(businessLine, sourceOfFundsComponentsKeyMapping);
93
- //#endregion
94
- //#region src/components/EFP/tasks/SourceOfFundsDropin/sofStore.ts
95
- var sofErrorMessage = signal(void 0);
96
- var setSofErrorMessage = (message) => {
97
- sofErrorMessage.value = message;
98
- };
99
- var clearSofErrorMessage = () => {
100
- sofErrorMessage.value = void 0;
101
- };
102
- //#endregion
103
- //#region src/api/datasets/useSourceOfFundsTypes.ts
104
- var getSourceOfFundsTypes = async (baseUrl) => {
105
- return httpGet({
106
- baseUrl,
107
- path: `datasets/sourceOfFundsTypes`
108
- });
109
- };
110
- var useSourceOfFundsTypes = (options) => {
111
- const { baseUrl } = useApiContext();
112
- return useQuery({
113
- queryKey: ["sourceOfFundsTypes"],
114
- queryFn: () => getSourceOfFundsTypes(baseUrl.value),
115
- ...options
116
- });
117
- };
118
- var SourceOfFunds_module_default = {
119
- "source-of-funds": "_source-of-funds_1lnfv_1",
120
- sourceOfFunds: "_source-of-funds_1lnfv_1",
121
- "source-of-funds-awe": "_source-of-funds-awe_1lnfv_10",
122
- sourceOfFundsAwe: "_source-of-funds-awe_1lnfv_10",
123
- "source-of-funds-wrapper-loading": "_source-of-funds-wrapper-loading_1lnfv_17",
124
- sourceOfFundsWrapperLoading: "_source-of-funds-wrapper-loading_1lnfv_17",
125
- "source-of-funds-wrapper-heading": "_source-of-funds-wrapper-heading_1lnfv_24",
126
- sourceOfFundsWrapperHeading: "_source-of-funds-wrapper-heading_1lnfv_24",
127
- "source-of-funds-wrapper-description": "_source-of-funds-wrapper-description_1lnfv_29",
128
- sourceOfFundsWrapperDescription: "_source-of-funds-wrapper-description_1lnfv_29",
129
- "source-of-funds-same-as-checkbox": "_source-of-funds-same-as-checkbox_1lnfv_33",
130
- sourceOfFundsSameAsCheckbox: "_source-of-funds-same-as-checkbox_1lnfv_33",
131
- "source-of-funds-getting-started": "_source-of-funds-getting-started_1lnfv_37",
132
- sourceOfFundsGettingStarted: "_source-of-funds-getting-started_1lnfv_37",
133
- "source-of-funds-getting-started-awe": "_source-of-funds-getting-started-awe_1lnfv_42",
134
- sourceOfFundsGettingStartedAwe: "_source-of-funds-getting-started-awe_1lnfv_42",
135
- "source-of-funds-getting-started-heading": "_source-of-funds-getting-started-heading_1lnfv_48",
136
- sourceOfFundsGettingStartedHeading: "_source-of-funds-getting-started-heading_1lnfv_48",
137
- "source-of-funds-getting-started-body": "_source-of-funds-getting-started-body_1lnfv_52",
138
- sourceOfFundsGettingStartedBody: "_source-of-funds-getting-started-body_1lnfv_52",
139
- "source-of-funds-getting-started-error": "_source-of-funds-getting-started-error_1lnfv_56",
140
- sourceOfFundsGettingStartedError: "_source-of-funds-getting-started-error_1lnfv_56",
141
- "source-of-funds-getting-started-error-actions": "_source-of-funds-getting-started-error-actions_1lnfv_60",
142
- sourceOfFundsGettingStartedErrorActions: "_source-of-funds-getting-started-error-actions_1lnfv_60",
143
- "source-of-funds-getting-started-cards": "_source-of-funds-getting-started-cards_1lnfv_64",
144
- sourceOfFundsGettingStartedCards: "_source-of-funds-getting-started-cards_1lnfv_64",
145
- "source-of-funds-getting-started-cards-card": "_source-of-funds-getting-started-cards-card_1lnfv_70",
146
- sourceOfFundsGettingStartedCardsCard: "_source-of-funds-getting-started-cards-card_1lnfv_70",
147
- "source-of-funds-getting-started-cards-card-header": "_source-of-funds-getting-started-cards-card-header_1lnfv_76",
148
- sourceOfFundsGettingStartedCardsCardHeader: "_source-of-funds-getting-started-cards-card-header_1lnfv_76",
149
- "source-of-funds-getting-started-cards-card-body": "_source-of-funds-getting-started-cards-card-body_1lnfv_82",
150
- sourceOfFundsGettingStartedCardsCardBody: "_source-of-funds-getting-started-cards-card-body_1lnfv_82",
151
- "source-of-funds-getting-started-actions": "_source-of-funds-getting-started-actions_1lnfv_88",
152
- sourceOfFundsGettingStartedActions: "_source-of-funds-getting-started-actions_1lnfv_88",
153
- "source-of-funds-additional-data-form": "_source-of-funds-additional-data-form_1lnfv_96",
154
- sourceOfFundsAdditionalDataForm: "_source-of-funds-additional-data-form_1lnfv_96",
155
- "source-of-funds-third-party-funding-financier-group": "_source-of-funds-third-party-funding-financier-group_1lnfv_100",
156
- sourceOfFundsThirdPartyFundingFinancierGroup: "_source-of-funds-third-party-funding-financier-group_1lnfv_100",
157
- "source-of-funds-third-party-funding-name-avatar-group": "_source-of-funds-third-party-funding-name-avatar-group_1lnfv_117",
158
- sourceOfFundsThirdPartyFundingNameAvatarGroup: "_source-of-funds-third-party-funding-name-avatar-group_1lnfv_117",
159
- "source-of-funds-third-party-funding-name-address-group": "_source-of-funds-third-party-funding-name-address-group_1lnfv_123",
160
- sourceOfFundsThirdPartyFundingNameAddressGroup: "_source-of-funds-third-party-funding-name-address-group_1lnfv_123",
161
- "source-of-funds-sof-financier-form-error": "_source-of-funds-sof-financier-form-error_1lnfv_129",
162
- sourceOfFundsSofFinancierFormError: "_source-of-funds-sof-financier-form-error_1lnfv_129",
163
- "source-of-funds-sof-financier-form-name-group": "_source-of-funds-sof-financier-form-name-group_1lnfv_133",
164
- sourceOfFundsSofFinancierFormNameGroup: "_source-of-funds-sof-financier-form-name-group_1lnfv_133",
165
- "source-of-funds-financier-footer": "_source-of-funds-financier-footer_1lnfv_138",
166
- sourceOfFundsFinancierFooter: "_source-of-funds-financier-footer_1lnfv_138",
167
- "source-of-funds-grid-container": "_source-of-funds-grid-container_1lnfv_144",
168
- sourceOfFundsGridContainer: "_source-of-funds-grid-container_1lnfv_144",
169
- "source-of-funds-sub-heading": "_source-of-funds-sub-heading_1lnfv_150",
170
- sourceOfFundsSubHeading: "_source-of-funds-sub-heading_1lnfv_150",
171
- "source-of-funds-upload-modal-content-field": "_source-of-funds-upload-modal-content-field_1lnfv_154",
172
- sourceOfFundsUploadModalContentField: "_source-of-funds-upload-modal-content-field_1lnfv_154",
173
- "source-of-funds-upload-modal-content-field-radio-group": "_source-of-funds-upload-modal-content-field-radio-group_1lnfv_162",
174
- sourceOfFundsUploadModalContentFieldRadioGroup: "_source-of-funds-upload-modal-content-field-radio-group_1lnfv_162",
175
- "source-of-funds-upload-modal-content-requirements-container": "_source-of-funds-upload-modal-content-requirements-container_1lnfv_167",
176
- sourceOfFundsUploadModalContentRequirementsContainer: "_source-of-funds-upload-modal-content-requirements-container_1lnfv_167",
177
- "source-of-funds-upload-list-heading": "_source-of-funds-upload-list-heading_1lnfv_175",
178
- sourceOfFundsUploadListHeading: "_source-of-funds-upload-list-heading_1lnfv_175",
179
- "source-of-funds-modal": "_source-of-funds-modal_1lnfv_180",
180
- sourceOfFundsModal: "_source-of-funds-modal_1lnfv_180"
181
- };
182
- //#endregion
183
- //#region src/components/EFP/tasks/SourceOfFundsDropin/types.ts
184
- var additionalDataSchemaKeys = [
185
- "description",
186
- "dateOfFundsReceived",
187
- "purpose",
188
- "relationship",
189
- "originatorLegalEntityId",
190
- "amount",
191
- "financiers",
192
- "cryptocurrencyExchange",
193
- "dateOfSourceEvent",
194
- "website"
195
- ];
196
- //#endregion
197
- //#region src/components/EFP/tasks/SourceOfFundsDropin/utils.tsx
198
- var allowedCurrencies = Object.entries(Currencies).map(([key]) => ({
199
- name: key,
200
- id: key
201
- }));
202
- var TODAY_DATE = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
203
- var getSchemaForOriginator = (baseSchema, originatorType) => {
204
- if (originatorType === "organization") return [...baseSchema, "legalName"];
205
- if (originatorType === "individual") return [
206
- ...baseSchema,
207
- "firstName",
208
- "lastName"
209
- ];
210
- return baseSchema;
211
- };
212
- var getAdditionalDataSchemaKeys = (sourceOfFundsType, originatorType) => {
213
- switch (sourceOfFundsType) {
214
- case "business": return ["amount", "description"];
215
- case "donations": return getSchemaForOriginator([
216
- "dateOfFundsReceived",
217
- "purpose",
218
- "relationship",
219
- "country",
220
- "originatorType"
221
- ], originatorType);
222
- case "inheritance": return getSchemaForOriginator([
223
- "dateOfFundsReceived",
224
- "amount",
225
- "relationship",
226
- "country",
227
- "originatorType"
228
- ], originatorType);
229
- case "thirdPartyFunding": return ["financiers"];
230
- case "cryptocurrencyIncome": return ["cryptocurrencyExchange"];
231
- case "assetSale": return [
232
- "dateOfSourceEvent",
233
- "description",
234
- "amount"
235
- ];
236
- case "gamblingWinnings": return [
237
- "dateOfSourceEvent",
238
- "website",
239
- "amount"
240
- ];
241
- default: return [];
242
- }
243
- };
244
- var getServiceTranslation = (t, service) => {
245
- switch (service) {
246
- case "banking": return t(($) => $["businessBankAccounts"]);
247
- case "issuing": return t(($) => $["paymentCards"]);
248
- case "paymentProcessing": return t(($) => $["acceptingPayments"]);
249
- default: return t(($) => $["supportingDocuments"]);
250
- }
251
- };
252
- var getServiceTranslationSelectTitle = (t, service) => {
253
- switch (service) {
254
- case "banking": return t(($) => $["forYourBusinessBankAccounts"]);
255
- case "issuing": return t(($) => $["forYourPaymentCards"]);
256
- case "paymentProcessing": return t(($) => $["whenAcceptingPayments"]);
257
- default: return t(($) => $["supportingDocuments"]);
258
- }
259
- };
260
- var getServiceTranslationKey = (service) => {
261
- switch (service) {
262
- case "banking": return "bankingService";
263
- case "issuing": return "issuingService";
264
- case "paymentProcessing": return "paymentService";
265
- default: return "supportingDocuments";
266
- }
267
- };
268
- var getGettingStartedCardDetails = (sourceOfFundsType, t, data) => {
269
- const details = [];
270
- sourceOfFundsType?.forEach((type) => {
271
- switch (type) {
272
- case "amount":
273
- details.push({
274
- term: t(($) => $["amount"]),
275
- details: data?.amount?.currency && data?.amount?.value ? formatAmountWithCurrency(data.amount.value, data.amount.currency) : ""
276
- });
277
- break;
278
- case "description":
279
- details.push({
280
- term: t(($) => $["description"]),
281
- details: data?.description || ""
282
- });
283
- break;
284
- case "dateOfFundsReceived":
285
- details.push({
286
- term: t(($) => $["date"]),
287
- details: localizeDateString(data?.dateOfFundsReceived || "", navigator.language)
288
- });
289
- break;
290
- case "purpose":
291
- details.push({
292
- term: t(($) => $["reason"]),
293
- details: data?.purpose || ""
294
- });
295
- break;
296
- case "relationship":
297
- details.push({
298
- term: t(($) => $["relationship"]),
299
- details: data?.relationship || ""
300
- });
301
- break;
302
- case "originatorLegalEntityId":
303
- details.push({
304
- term: t(($) => $["benefactorDetails"]),
305
- details: [data?.legalName ? `${data?.legalName}` : `${data?.firstName} ${data?.lastName}`, /* @__PURE__ */ jsx(Typography, {
306
- color: "secondary",
307
- children: data?.country || ""
308
- }, "location")]
309
- });
310
- break;
311
- case "financiers":
312
- data?.financiers?.map((financier) => {
313
- return details.push({
314
- term: t(($) => $["investor"]),
315
- details: [
316
- `${financier?.firstName} ${financier?.lastName}`,
317
- /* @__PURE__ */ jsx(Typography, {
318
- color: "secondary",
319
- children: financier?.location || ""
320
- }, "location"),
321
- /* @__PURE__ */ jsx(Typography, {
322
- color: "secondary",
323
- children: financier?.amount?.currency && financier?.amount?.value ? formatAmountWithCurrency(financier.amount.value, financier.amount.currency) || "" : ""
324
- }, "value")
325
- ]
326
- });
327
- });
328
- break;
329
- case "cryptocurrencyExchange":
330
- details.push({
331
- term: t(($) => $["cryptocurrencyExchange"]),
332
- details: data?.cryptocurrencyExchange || ""
333
- });
334
- break;
335
- case "dateOfSourceEvent":
336
- details.push({
337
- term: t(($) => $["dateOfSourceEvent"]),
338
- details: localizeDateString(data?.dateOfSourceEvent || "", navigator.language)
339
- });
340
- break;
341
- case "website":
342
- details.push({
343
- term: t(($) => $["website"]),
344
- details: data?.website || ""
345
- });
346
- break;
347
- default: break;
348
- }
349
- });
350
- return details;
351
- };
352
- var sourceOfFundsForms = {
353
- sourceOfFundsType: {
354
- formId: "sourceOfFundsType",
355
- formName: "selectASourceOfFunding",
356
- fields: ["type"]
357
- },
358
- additionalData: {
359
- formId: "additionalData",
360
- formName: "tellUsMoreAboutThisSource",
361
- fields: [...additionalDataSchemaKeys]
362
- }
363
- };
364
- var getSourceOfFundsRequiredFields = (data) => {
365
- const sourceOfFundsType = data?.sourceOfFundsType?.type;
366
- const originatorType = data?.additionalData?.originatorType;
367
- return {
368
- sourceOfFundsType: ["type"],
369
- additionalData: getAdditionalDataSchemaKeys(sourceOfFundsType, originatorType)
370
- };
371
- };
372
- var typesRequiringAdditionalData = [
373
- "business",
374
- "donations",
375
- "inheritance",
376
- "thirdPartyFunding",
377
- "cryptocurrencyIncome",
378
- "assetSale",
379
- "gamblingWinnings"
380
- ];
381
- var getSourceOfFundsRequiredForms = (data) => {
382
- return Object.fromEntries(Object.entries(sourceOfFundsForms).filter(([form]) => {
383
- if (!data?.type || !typesRequiringAdditionalData.includes(data?.type)) return form !== sourceOfFundsForms.additionalData.formId;
384
- return form;
385
- }));
386
- };
387
- var getInputErrors = ({ formErrors, data, key, value, t }) => {
388
- const isEmpty = value === "" || value === null || value === void 0;
389
- let errors = { ...formErrors };
390
- if (isEmpty) errors = {
391
- ...formErrors,
392
- [key]: {
393
- key: "fieldIsRequired",
394
- message: t(($) => $["fieldIsRequired"])
395
- }
396
- };
397
- else errors = {
398
- ...formErrors,
399
- [key]: void 0
400
- };
401
- if (["amount", "currency"].includes(key)) {
402
- if (data?.amount?.value && data?.amount?.currency) errors = {
403
- ...formErrors,
404
- amount: void 0
405
- };
406
- if (!data?.amount?.currency) errors = {
407
- ...formErrors,
408
- amount: {
409
- key: "currencyIsRequired",
410
- message: t(($) => $["currencyIsRequired"])
411
- }
412
- };
413
- if (!data?.amount?.value) errors = {
414
- ...formErrors,
415
- amount: {
416
- key: "amountIsRequired",
417
- message: t(($) => $["amountIsRequired"])
418
- }
419
- };
420
- else if (isNaN(data?.amount.value)) errors = {
421
- ...formErrors,
422
- amount: {
423
- key: "pleaseEnterAValidAmount",
424
- message: t(($) => $["pleaseEnterAValidAmount"])
425
- }
426
- };
427
- }
428
- return errors;
429
- };
430
- var getPageHeadings = (type) => {
431
- switch (type) {
432
- case "cryptocurrencyIncome": return {
433
- heading: "cryptocurrencyProceedDetails",
434
- description: "tellUsMoreAboutTheCryptocurrency"
435
- };
436
- case "assetSale": return {
437
- heading: "propertySaleDetails",
438
- description: "tellUsMoreAboutTheProperty"
439
- };
440
- case "gamblingWinnings": return {
441
- heading: "gamblingProceedDetails",
442
- description: "tellUsMoreAboutTheGamblingProceeds"
443
- };
444
- case "business": return {
445
- heading: "businessEarningDetails",
446
- description: "tellUsMoreAboutThePreviousBusinessEarnings"
447
- };
448
- case "thirdPartyFunding": return {
449
- heading: "thirdPartyInvestmentDetails",
450
- description: "tellUsMoreAboutTheInvestors"
451
- };
452
- case "inheritance": return {
453
- heading: "inheritanceDetails",
454
- description: "tellUsMoreAboutTheInheritanceProceeds"
455
- };
456
- case "donations": return {
457
- heading: "giftOrDonationDetails",
458
- description: "tellUsMoreAboutTheGiftOrDonationProceeds"
459
- };
460
- default: return { heading: "tellUsMoreAboutThisSource" };
461
- }
462
- };
463
- var getDocumentRequirements = {
464
- loanAgreement: [
465
- "yourBusinessName",
466
- "lendersNameAndAddress",
467
- "principalAmount",
468
- "loanDate",
469
- "purposeOfLoan"
470
- ],
471
- loanStatement: [
472
- "yourBusinessName",
473
- "lendersNameAndAddress",
474
- "principalAmount",
475
- "loanDate",
476
- "purposeOfLoan"
477
- ],
478
- proofOfWalletOwnership: [
479
- "yourBusinessName",
480
- "nameOfTheCryptocurrencyExchange",
481
- "nameOfTheCoins",
482
- "issueDateWithinTheLast12Months"
483
- ],
484
- transactionStatement: [
485
- "showsYourBusinessName",
486
- "showsTheNameOfTheCryptocurrencyExchange",
487
- "showsTheNameOfTheCoins",
488
- "issueDateWithinTheLast12Months"
489
- ],
490
- taxFiling: [
491
- "showsYourBusinessName",
492
- "showsTheNameOfTheCryptocurrencyExchange",
493
- "showsTheNameOfTheCoins",
494
- "issueDateWithinTheLast12Months"
495
- ],
496
- proofOfWinnings: [
497
- "winningProceedAmount",
498
- "dateOfWinning",
499
- "nameOfCasinoLottery"
500
- ],
501
- winReport: [
502
- "winningProceedAmount",
503
- "dateOfWinning",
504
- "nameOfCasinoLottery"
505
- ],
506
- winLossStatement: [
507
- "winningProceedAmount",
508
- "dateOfWinning",
509
- "nameOfCasinoLottery"
510
- ],
511
- taxDeclaration: ["winningProceedAmount", "issuedWithinTheLast12Months"],
512
- annualStatements: [
513
- "yourBusinessName",
514
- "proofOfAnnualTurnoverAmount",
515
- "issueDateWithinTheLast12Months"
516
- ],
517
- latestTaxFiling: [
518
- "yourBusinessName",
519
- "proofOfAnnualTurnoverAmount",
520
- "issueDateWithinTheLast12Months"
521
- ],
522
- letterFromAccountant: [
523
- "yourBusinessName",
524
- "proofOfAnnualTurnoverAmount",
525
- "signatureAndDateWithinTheLast12Months"
526
- ],
527
- recentInvoices: ["yourBusinessName", "invoicesFromThe3MostRecentMonths"],
528
- bankStatements: [
529
- "yourBusinessName",
530
- "issueDate",
531
- "banksLogoAndName",
532
- "allStatementsFrom3MostRecentMonths"
533
- ],
534
- payslips: [
535
- "employersName",
536
- "issueDate",
537
- "banksLogoAndName",
538
- "allPayslipsFrom3MostRecentMonths"
539
- ],
540
- contractSpecifyingDividends: [
541
- "theBusinessName",
542
- "termLengthAndDividendYield",
543
- "namesOfInvolvedParties"
544
- ],
545
- latestTaxReturn: ["theBusinessName", "reportedDividendAmount"],
546
- investmentCertificate: ["theBusinessName", "termLengthAndDividendYield"],
547
- brokerStatements: [
548
- "theBrokerageName",
549
- "dividendAmount",
550
- "issueDateWithinTheLast3Months",
551
- "namesOfInvolvedParties"
552
- ],
553
- investorContract: [
554
- "yourBusinessName",
555
- "nameAddressSignatureOfAllInvestors",
556
- "investmentAmount",
557
- "fundDepositDate"
558
- ],
559
- investorMemo: [
560
- "yourBusinessName",
561
- "nameAddressSignatureOfAllInvestors",
562
- "investmentAmount",
563
- "fundDepositDate"
564
- ],
565
- notarizedStatement: [
566
- "yourBusinessName",
567
- "nameAddressSignatureOfAllInvestors",
568
- "investmentAmount",
569
- "fundDepositDate"
570
- ],
571
- partnershipAgreement: [
572
- "yourBusinessName",
573
- "nameAddressSignatureOfAllInvestors",
574
- "investmentAmount",
575
- "fundDepositDate"
576
- ],
577
- proofOfOwnership: [
578
- "descriptionOfProperty",
579
- "netProceedAmount",
580
- "fundDepositDate",
581
- "propertyAddress"
582
- ],
583
- letterFromAttorney: [
584
- "descriptionOfProperty",
585
- "netProceedAmount",
586
- "fundDepositDate",
587
- "propertyAddress"
588
- ],
589
- saleContract: [
590
- "descriptionOfProperty",
591
- "netProceedAmount",
592
- "fundDepositDate",
593
- "propertyAddress"
594
- ],
595
- taxDeclarationProperty: [
596
- "descriptionOfProperty",
597
- "netProceedAmount",
598
- "fundDepositDate",
599
- "propertyAddress"
600
- ],
601
- titleDeed: [
602
- "descriptionOfProperty",
603
- "netProceedAmount",
604
- "fundDepositDate",
605
- "propertyAddress"
606
- ],
607
- rentalAgreementOrLease: [
608
- "namesOfLandlordAndTenant",
609
- "propertyAddress",
610
- "rentAmount"
611
- ],
612
- proofOfOwnershipRent: ["yourName", "propertyAddress"],
613
- giftOrDonationAgreement: [
614
- "donorsName",
615
- "fundTransferDate",
616
- "fundDepositAmount"
617
- ],
618
- royaltyAgreement: [
619
- "descriptionOfIntellectualProperty",
620
- "royaltyAmount",
621
- "agreementPeriod"
622
- ],
623
- taxDocuments: ["royaltyAmount", "provideMostRecentYearAvailable"],
624
- certificateOfInheritance: [
625
- "decedentsName",
626
- "inheritanceAmount",
627
- "fundDepositDate",
628
- "estateAttorneysName"
629
- ],
630
- grantOfProbate: [
631
- "decedentsName",
632
- "inheritanceAmount",
633
- "fundDepositDate",
634
- "estateAttorneysName"
635
- ],
636
- letterFromAttorneyOrNotary: [
637
- "decedentsName",
638
- "inheritanceAmount",
639
- "fundDepositDate",
640
- "estateAttorneysName"
641
- ],
642
- signedCopyOfTheWill: [
643
- "decedentsName",
644
- "inheritanceAmount",
645
- "fundDepositDate",
646
- "estateAttorneysName"
647
- ],
648
- pensionSlip: [
649
- "yourFullName",
650
- "previousEmployersName",
651
- "pensionPaymentAmount"
652
- ],
653
- letterFromPreviousEmployer: [
654
- "yourFullName",
655
- "previousEmployersName",
656
- "pensionPaymentAmountOrTotalValue"
657
- ],
658
- pensionStatement: [
659
- "yourFullName",
660
- "previousEmployersName",
661
- "pensionPaymentAmountOrTotalValue"
662
- ],
663
- courtOrder: [
664
- "yourFullName",
665
- "totalSettlementAmount",
666
- "fundDepositDate"
667
- ],
668
- letterFromAttorneyInsurance: [
669
- "yourFullName",
670
- "totalSettlementAmount",
671
- "fundDepositDate"
672
- ],
673
- letterFromInsurer: [
674
- "yourFullName",
675
- "totalSettlementAmount",
676
- "fundDepositDate"
677
- ],
678
- confirmationOfGrantOrSubsidy: [
679
- "benefactorsName",
680
- "subsidyOrGrantAmount",
681
- "timePeriodIfApplicable"
682
- ]
683
- };
684
- var getDocumentLists = (sourceOfFundsType) => {
685
- switch (sourceOfFundsType) {
686
- case "loans": return ["loanAgreement", "loanStatement"];
687
- case "gamblingWinnings": return [
688
- "proofOfWinnings",
689
- "winReport",
690
- "winLossStatement",
691
- "taxDeclaration"
692
- ];
693
- case "cryptocurrencyIncome": return [
694
- "proofOfWalletOwnership",
695
- "transactionStatement",
696
- "taxFiling"
697
- ];
698
- case "business": return [
699
- "annualStatements",
700
- "latestTaxFiling",
701
- "letterFromAccountant",
702
- "recentInvoices"
703
- ];
704
- case "employment": return ["bankStatements", "payslips"];
705
- case "dividendIncome": return [
706
- "contractSpecifyingDividends",
707
- "latestTaxReturn",
708
- "investmentCertificate",
709
- "brokerStatements"
710
- ];
711
- case "thirdPartyFunding": return [
712
- "investorContract",
713
- "investorMemo",
714
- "notarizedStatement",
715
- "partnershipAgreement"
716
- ];
717
- case "assetSale": return [
718
- "proofOfOwnership",
719
- "letterFromAttorney",
720
- "saleContract",
721
- "taxDeclarationProperty",
722
- "titleDeed"
723
- ];
724
- case "rentalIncome": return ["rentalAgreementOrLease", "proofOfOwnership"];
725
- case "donations": return ["giftOrDonationAgreement"];
726
- case "royaltyIncome": return ["royaltyAgreement", "taxDocuments"];
727
- case "inheritance": return [
728
- "certificateOfInheritance",
729
- "grantOfProbate",
730
- "letterFromAttorneyOrNotary",
731
- "signedCopyOfTheWill"
732
- ];
733
- case "pensionIncome": return [
734
- "pensionSlip",
735
- "letterFromPreviousEmployer",
736
- "pensionStatement"
737
- ];
738
- case "insuranceSettlement": return [
739
- "courtOrder",
740
- "letterFromAttorneyInsurance",
741
- "letterFromInsurer"
742
- ];
743
- case "financialAid": return ["confirmationOfGrantOrSubsidy"];
744
- default: return [];
745
- }
746
- };
747
- var parseSOFDocumentDescription = (t, documentDescription) => {
748
- if (!documentDescription || documentDescription.trim() === "" || !documentDescription.startsWith("$")) return;
749
- const [servicePart, typePart] = documentDescription.split("--");
750
- const selectedService = servicePart.split(":")[1];
751
- const documentType = typePart.split(":")[1];
752
- const parsed = {
753
- selectedService: getServiceTranslation(t, selectedService || ""),
754
- documentType: t(($) => $[documentType])
755
- };
756
- return `${parsed.selectedService} (${parsed.documentType})`;
757
- };
758
- var parseOriginatorDetails = (originatorDetails, businessLine) => {
759
- const copiedBusinessLine = { ...businessLine };
760
- if (copiedBusinessLine.sourceOfFunds) {
761
- if (originatorDetails.organization) {
762
- copiedBusinessLine.sourceOfFunds.legalName = originatorDetails.organization.legalName;
763
- copiedBusinessLine.sourceOfFunds.country = originatorDetails.organization?.registeredAddress.country;
764
- copiedBusinessLine.sourceOfFunds.originatorType = "organization";
765
- }
766
- if (originatorDetails.individual) {
767
- copiedBusinessLine.sourceOfFunds.firstName = originatorDetails.individual.name?.firstName;
768
- copiedBusinessLine.sourceOfFunds.lastName = originatorDetails.individual.name?.lastName;
769
- copiedBusinessLine.sourceOfFunds.country = originatorDetails.individual.residentialAddress.country;
770
- copiedBusinessLine.sourceOfFunds.originatorType = "individual";
771
- }
772
- }
773
- return copiedBusinessLine;
774
- };
775
- var getSourceOfFundsPayload = (sofType, additionalData) => {
776
- switch (sofType) {
777
- case "business": return {
778
- adyenProcessedFunds: false,
779
- type: "business",
780
- description: additionalData?.description,
781
- amount: {
782
- currency: additionalData?.amount?.currency ?? "USD",
783
- value: additionalData?.amount?.value ?? 0
784
- }
785
- };
786
- case "employment": return {
787
- adyenProcessedFunds: false,
788
- type: "employment"
789
- };
790
- case "donations": return {
791
- adyenProcessedFunds: false,
792
- type: "donations",
793
- dateOfFundsReceived: additionalData?.dateOfFundsReceived,
794
- purpose: additionalData?.purpose,
795
- relationship: additionalData?.relationship,
796
- originatorLegalEntityId: additionalData?.originatorLegalEntityId
797
- };
798
- case "inheritance": return {
799
- adyenProcessedFunds: false,
800
- type: "inheritance",
801
- dateOfFundsReceived: additionalData?.dateOfFundsReceived,
802
- amount: additionalData?.amount,
803
- relationship: additionalData?.relationship,
804
- originatorLegalEntityId: additionalData?.originatorLegalEntityId
805
- };
806
- case "financialAid": return {
807
- adyenProcessedFunds: false,
808
- type: "financialAid"
809
- };
810
- case "rentalIncome": return {
811
- adyenProcessedFunds: false,
812
- type: "rentalIncome"
813
- };
814
- case "dividendIncome": return {
815
- adyenProcessedFunds: false,
816
- type: "dividendIncome"
817
- };
818
- case "royaltyIncome": return {
819
- adyenProcessedFunds: false,
820
- type: "royaltyIncome"
821
- };
822
- case "pensionIncome": return {
823
- adyenProcessedFunds: false,
824
- type: "pensionIncome"
825
- };
826
- case "insuranceSettlement": return {
827
- adyenProcessedFunds: false,
828
- type: "insuranceSettlement"
829
- };
830
- case "thirdPartyFunding": return {
831
- adyenProcessedFunds: false,
832
- type: "thirdPartyFunding",
833
- financiers: additionalData?.financiers
834
- };
835
- case "cryptocurrencyIncome": return {
836
- adyenProcessedFunds: false,
837
- type: "cryptocurrencyIncome",
838
- cryptocurrencyExchange: additionalData?.cryptocurrencyExchange
839
- };
840
- case "assetSale": return {
841
- adyenProcessedFunds: false,
842
- type: "assetSale",
843
- cryptocurrencyExchange: additionalData?.cryptocurrencyExchange,
844
- dateOfSourceEvent: additionalData?.dateOfSourceEvent,
845
- description: additionalData?.description,
846
- amount: additionalData?.amount
847
- };
848
- case "loans": return {
849
- adyenProcessedFunds: false,
850
- type: "loans"
851
- };
852
- case "gamblingWinnings": return {
853
- adyenProcessedFunds: false,
854
- type: "gamblingWinnings",
855
- dateOfSourceEvent: additionalData?.dateOfSourceEvent,
856
- website: additionalData?.website && !additionalData.website.startsWith("http://") && !additionalData.website.startsWith("https://") ? `https://${additionalData.website}` : additionalData?.website,
857
- amount: additionalData?.amount
858
- };
859
- default: return { adyenProcessedFunds: true };
860
- }
861
- };
862
- var parseSofOriginatorPayload = (additionalData) => {
863
- let sofOriginator;
864
- if (additionalData?.originatorType === "individual") sofOriginator = {
865
- type: LegalEntityTypes.INDIVIDUAL,
866
- individual: {
867
- name: {
868
- firstName: additionalData?.firstName ?? "",
869
- lastName: additionalData?.lastName ?? ""
870
- },
871
- residentialAddress: { country: additionalData?.country }
872
- }
873
- };
874
- else sofOriginator = {
875
- type: LegalEntityTypes.ORGANIZATION,
876
- organization: {
877
- legalName: additionalData?.legalName ?? "",
878
- registeredAddress: { country: additionalData?.country }
879
- }
880
- };
881
- return sofOriginator;
882
- };
883
- var formatDateForInput = (isoDateString) => {
884
- if (!isoDateString) return "";
885
- try {
886
- const datePart = isoDateString.split("T")[0];
887
- if (/^\d{4}-\d{2}-\d{2}$/.test(datePart)) return datePart;
888
- return "";
889
- } catch {
890
- return "";
891
- }
892
- };
893
- var getSofCardDetails = (t, sourceOfFunds) => {
894
- if (!sourceOfFunds) return "";
895
- if (sourceOfFunds?.adyenProcessedFunds) return t(($) => $["transactionsOnThisPlatform"]);
896
- if (sourceOfFunds?.type) return sourceOfFunds?.type ? t(($) => $[sofCategoryItemMapper[sourceOfFunds.type]]) : "";
897
- return "";
898
- };
899
- var ALLOWED_SOF_SERVICES = ["issuing", "banking"];
900
- /**
901
- * Returns business lines that require SoF (based on ALLOWED_SOF_SERVICES)
902
- */
903
- var getApplicableBusinessLines = (businessLines) => {
904
- return businessLines.filter((bl) => ALLOWED_SOF_SERVICES.includes(bl.service));
905
- };
906
- /**
907
- * Deep comparison of SoF data.
908
- * Returns true if all business-relevant fields are identical.
909
- */
910
- var areSourceOfFundsEqual = (sof1, sof2) => {
911
- const type1 = sof1.sourceOfFundsType?.type;
912
- if (type1 !== sof2.sourceOfFundsType?.type) return false;
913
- if (type1 === "donations" || type1 === "inheritance") {
914
- const ad1 = sof1.additionalData || {};
915
- const ad2 = sof2.additionalData || {};
916
- if (ad1.originatorType !== ad2.originatorType) return false;
917
- if (ad1.originatorType === "individual") return ad1.firstName === ad2.firstName && ad1.lastName === ad2.lastName && ad1.country === ad2.country && ad1.relationship === ad2.relationship && ad1.purpose === ad2.purpose && ad1.dateOfFundsReceived === ad2.dateOfFundsReceived;
918
- else if (ad1.originatorType === "organization") return ad1.legalName === ad2.legalName && ad1.country === ad2.country && ad1.relationship === ad2.relationship && ad1.purpose === ad2.purpose && ad1.dateOfFundsReceived === ad2.dateOfFundsReceived;
919
- return false;
920
- }
921
- const ad1 = sof1.additionalData || {};
922
- const ad2 = sof2.additionalData || {};
923
- const keys1 = Object.keys(ad1);
924
- const keys2 = Object.keys(ad2);
925
- if (keys1.length !== keys2.length) return false;
926
- return keys1.every((key) => {
927
- const val1 = ad1[key];
928
- const val2 = ad2[key];
929
- return JSON.stringify(val1) === JSON.stringify(val2);
930
- });
931
- };
932
- var SOF_INVALID_INPUT_ERROR_CODES = ["1_93", "1_94"];
933
- var getRelevantErrors = (problems, targetCodes) => {
934
- if (!problems) return false;
935
- return problems.flatMap((problem) => (problem.verificationErrors || []).filter((error) => targetCodes.includes(error.code) || (error.subErrors || []).some((sub) => targetCodes.includes(sub.code))));
936
- };
937
- var getUniqueRemediationActions = (error) => {
938
- return [...error.remediatingActions || [], ...error.subErrors?.flatMap((sub) => sub.remediatingActions || []) || []].filter((action, i, arr) => arr.findIndex((a) => a.code === action.code) === i);
939
- };
940
- var sofCategoryItemMapper = {
941
- business: "otherBusinessEarnings",
942
- employment: "employmentWages",
943
- cryptocurrencyIncome: "cryptocurrency",
944
- dividendIncome: "dividends",
945
- loans: "loans",
946
- financialAid: "financialAid",
947
- thirdPartyFunding: "thirdPartyFunding",
948
- rentalIncome: "rentalIncome",
949
- royaltyIncome: "royaltyIncome",
950
- gamblingWinnings: "gambling",
951
- inheritance: "inheritance",
952
- pensionIncome: "pensionIncome",
953
- insuranceSettlement: "insuranceSettlement",
954
- assetSale: "propertySale",
955
- donations: "giftOrDonation"
956
- };
957
- /**
958
- * Prepares additional data for originator creation/update.
959
- * When useSameAs is true, appends the originatorLegalEntityId from the source
960
- * so that createOrUpdateOriginator can update the existing LE instead of creating a new one.
961
- */
962
- var getAdditionalDataForOriginator = (additionalData, sourceAdditionalData, useSameAs) => {
963
- if (useSameAs) return {
964
- ...additionalData,
965
- originatorLegalEntityId: sourceAdditionalData?.originatorLegalEntityId
966
- };
967
- return additionalData;
968
- };
969
- //#endregion
970
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForAssetSale.tsx
971
- function AdditionalDataForAssetSale(props) {
972
- const [isFocused, setIsFocused] = useState$1(false);
973
- const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
974
- const { t: commonT } = useTranslation("common");
975
- const handleOnAmountBlur = () => {
976
- setIsFocused(false);
977
- handleAmountChange("amount");
978
- };
979
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
980
- className: SourceOfFunds_module_default.sourceOfFundsGridContainer,
981
- children: [/* @__PURE__ */ jsx(Field, {
982
- el: "fieldset",
983
- name: "amount",
984
- label: formUtils.getLabel("amount", "saleAmount"),
985
- errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
986
- children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
987
- ...childProps,
988
- id: "currencyGroup",
989
- isFocused,
990
- isInvalid: Boolean(!valid.amount && errors.amount),
991
- children: [/* @__PURE__ */ jsx(Select, {
992
- name: "currency",
993
- "aria-label": commonT(($) => $["currency"]),
994
- isMulti: false,
995
- items: allowedCurrencies,
996
- selected: data.amount?.currency,
997
- placeholder: commonT(($) => $["select"]),
998
- onChange: handleAmountChange("currency"),
999
- minimal: true
1000
- }), /* @__PURE__ */ jsx(InputText, {
1001
- ...childProps,
1002
- name: "amount",
1003
- value: data.amount?.value,
1004
- readonly: formUtils.isReadOnly("amount"),
1005
- onInput: handleAmountChange("amount"),
1006
- onBlur: handleOnAmountBlur,
1007
- "aria-required": true,
1008
- "aria-invalid": !valid.amount,
1009
- isValid: valid.amount,
1010
- onFocusHandler: () => setIsFocused(true)
1011
- })]
1012
- })
1013
- }), /* @__PURE__ */ jsx(Field, {
1014
- name: "dateOfSourceEvent",
1015
- label: formUtils.getLabel("dateOfSourceEvent", "dateOfSale"),
1016
- errorMessage: formUtils.getErrorMessage("dateOfSourceEvent", errors, fieldProblems),
1017
- isValid: valid.dateOfSourceEvent,
1018
- children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
1019
- ...childProps,
1020
- name: "dateOfSourceEvent",
1021
- value: formatDateForInput(data.dateOfSourceEvent),
1022
- onInput: handleChangeFor("dateOfSourceEvent", "input"),
1023
- onBlur: handleChangeFor("dateOfSourceEvent", "blur"),
1024
- "aria-required": true,
1025
- "aria-invalid": !valid.dateOfSourceEvent,
1026
- max: TODAY_DATE
1027
- })
1028
- })]
1029
- }), /* @__PURE__ */ jsx(Field, {
1030
- name: "description",
1031
- label: formUtils.getLabel("description", "propertyDescription"),
1032
- errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
1033
- isValid: valid.description,
1034
- children: (childProps) => /* @__PURE__ */ jsx(TextArea, {
1035
- ...childProps,
1036
- name: "description",
1037
- value: data.description,
1038
- maxLength: 200,
1039
- onInput: handleChangeFor("description"),
1040
- onBlur: handleChangeFor("description"),
1041
- "aria-invalid": !valid.description
1042
- })
1043
- })] });
1044
- }
1045
- //#endregion
1046
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForBusiness.tsx
1047
- function AdditionalDataForBusiness(props) {
1048
- const [isFocused, setIsFocused] = useState$1(false);
1049
- const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
1050
- const { t: commonT } = useTranslation("common");
1051
- const handleOnAmountBlur = () => {
1052
- setIsFocused(false);
1053
- handleAmountChange("amount");
1054
- };
1055
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Field, {
1056
- el: "fieldset",
1057
- name: "amount",
1058
- label: formUtils.getLabel("amount", "annualTurnover"),
1059
- errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1060
- helper: commonT(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
1061
- helperPosition: "below",
1062
- children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
1063
- ...childProps,
1064
- id: "currencyGroup",
1065
- isFocused,
1066
- isInvalid: Boolean(!valid.amount && errors.amount),
1067
- children: [/* @__PURE__ */ jsx(Select, {
1068
- name: "currency",
1069
- "aria-label": commonT(($) => $["currency"]),
1070
- isMulti: false,
1071
- items: allowedCurrencies,
1072
- selected: data.amount?.currency,
1073
- placeholder: commonT(($) => $["select"]),
1074
- onChange: handleAmountChange("currency"),
1075
- minimal: true
1076
- }), /* @__PURE__ */ jsx(InputText, {
1077
- ...childProps,
1078
- name: "amount",
1079
- value: data.amount?.value,
1080
- readonly: formUtils.isReadOnly("amount"),
1081
- onInput: handleAmountChange("amount"),
1082
- onBlur: handleOnAmountBlur,
1083
- "aria-required": true,
1084
- "aria-invalid": !valid.amount,
1085
- isValid: valid.amount,
1086
- onFocusHandler: () => setIsFocused(true)
1087
- })]
1088
- })
1089
- }), /* @__PURE__ */ jsx(Field, {
1090
- name: "description",
1091
- label: formUtils.getLabel("description", "businessDescription"),
1092
- errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
1093
- isValid: valid.description,
1094
- children: (childProps) => /* @__PURE__ */ jsx(TextArea, {
1095
- ...childProps,
1096
- name: "description",
1097
- value: data.description,
1098
- maxLength: 200,
1099
- onInput: handleChangeFor("description"),
1100
- onBlur: handleChangeFor("description"),
1101
- "aria-invalid": !valid.description
1102
- })
1103
- })] });
1104
- }
1105
- //#endregion
1106
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForCryptocurrency.tsx
1107
- function AdditionalDataForCryptocurrency(props) {
1108
- const { t: sofT } = useTranslation("sof");
1109
- const { formUtils, data, errors, valid, fieldProblems, handleChangeFor } = props;
1110
- return /* @__PURE__ */ jsx(Field, {
1111
- name: "cryptocurrencyExchange",
1112
- label: formUtils.getLabel("cryptocurrencyExchange", "cryptocurrencyExchange"),
1113
- errorMessage: formUtils.getErrorMessage("cryptocurrencyExchange", errors, fieldProblems),
1114
- isValid: valid.cryptocurrencyExchange,
1115
- helper: sofT(($) => $["nameOfTheExchangeWhereTheCryptocurrencyWasHeldPriorToSale"]),
1116
- helperPosition: "below",
1117
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1118
- ...childProps,
1119
- name: "cryptocurrencyExchange",
1120
- value: data.cryptocurrencyExchange,
1121
- readonly: formUtils.isReadOnly("cryptocurrencyExchange"),
1122
- onInput: handleChangeFor("cryptocurrencyExchange", "input"),
1123
- onBlur: handleChangeFor("cryptocurrencyExchange", "blur"),
1124
- "aria-required": true,
1125
- "aria-invalid": !valid.cryptocurrencyExchange,
1126
- isValid: valid.cryptocurrencyExchange
1127
- })
1128
- });
1129
- }
1130
- //#endregion
1131
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataOriginatorLegalEntity.tsx
1132
- var radioItems = [{
1133
- id: "individual",
1134
- name: "individual"
1135
- }, {
1136
- id: "organization",
1137
- name: "organization"
1138
- }];
1139
- function AdditionalDataOriginatorLegalEntity(props) {
1140
- const { t: sofT } = useTranslation("sof");
1141
- const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, sourceOfFundsType } = props;
1142
- const isDonations = sourceOfFundsType === "donations";
1143
- const countryTranslationKey = isDonations && data?.originatorType === "individual" ? "donorsCountryOfResidence" : data?.originatorType === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath";
1144
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1145
- /* @__PURE__ */ jsx(Field, {
1146
- el: "fieldset",
1147
- name: "originatorType",
1148
- className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentField,
1149
- label: sofT(($) => $[isDonations ? "whereDidThisGiftOrDonationComeFrom" : "whereDidThisInheritanceComeFrom"]),
1150
- errorMessage: formUtils.getErrorMessage("originatorType", errors, fieldProblems),
1151
- isValid: valid.originatorType,
1152
- children: (childProps) => /* @__PURE__ */ jsx(RadioGroup, {
1153
- ...childProps,
1154
- name: "originatorType",
1155
- className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentFieldRadioGroup,
1156
- items: radioItems,
1157
- value: data.originatorType,
1158
- disabled: false,
1159
- onChange: handleChangeFor("originatorType", "input"),
1160
- "aria-required": true
1161
- })
1162
- }),
1163
- data?.originatorType === "organization" && /* @__PURE__ */ jsx(Field, {
1164
- name: "legalName",
1165
- label: formUtils.getLabel("legalName", "organizationsLegalName"),
1166
- errorMessage: formUtils.getErrorMessage("legalName", errors, fieldProblems),
1167
- isValid: valid.legalName,
1168
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1169
- ...childProps,
1170
- name: "legalName",
1171
- value: data.legalName,
1172
- readonly: formUtils.isReadOnly("legalName"),
1173
- onInput: handleChangeFor("legalName", "input"),
1174
- onBlur: handleChangeFor("legalName", "blur"),
1175
- "aria-required": true,
1176
- "aria-invalid": !valid.legalName,
1177
- isValid: valid.legalName
1178
- })
1179
- }),
1180
- data?.originatorType === "individual" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Field, {
1181
- name: "firstName",
1182
- label: formUtils.getLabel("firstName", isDonations ? "donorsLegalFirstName" : "decedentsLegalFirstName"),
1183
- errorMessage: formUtils.getErrorMessage("firstName", errors, fieldProblems),
1184
- isValid: valid.firstName,
1185
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1186
- ...childProps,
1187
- name: "firstName",
1188
- value: data.firstName,
1189
- readonly: formUtils.isReadOnly("firstName"),
1190
- onInput: handleChangeFor("firstName", "input"),
1191
- onBlur: handleChangeFor("firstName", "blur"),
1192
- "aria-required": true,
1193
- "aria-invalid": !valid.firstName,
1194
- isValid: valid.firstName
1195
- })
1196
- }), /* @__PURE__ */ jsx(Field, {
1197
- name: "lastName",
1198
- label: formUtils.getLabel("lastName", isDonations ? "donorsLegalLastName" : "decedentsLegalLastName"),
1199
- errorMessage: formUtils.getErrorMessage("lastName", errors, fieldProblems),
1200
- isValid: valid.lastName,
1201
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1202
- ...childProps,
1203
- name: "lastName",
1204
- value: data.lastName,
1205
- readonly: formUtils.isReadOnly("lastName"),
1206
- onInput: handleChangeFor("lastName", "input"),
1207
- onBlur: handleChangeFor("lastName", "blur"),
1208
- "aria-required": true,
1209
- "aria-invalid": !valid.lastName,
1210
- isValid: valid.lastName
1211
- })
1212
- })] }),
1213
- data?.originatorType && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Field, {
1214
- name: "relationship",
1215
- label: formUtils.getLabel("relationship", isDonations && data?.originatorType === "individual" ? "yourRelationshipToDonor" : data?.originatorType === "organization" ? "yourRelationshipToOrganization" : "yourRelationshipToDecedent"),
1216
- errorMessage: formUtils.getErrorMessage("relationship", errors, fieldProblems),
1217
- isValid: valid.relationship,
1218
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1219
- ...childProps,
1220
- name: "relationship",
1221
- value: data.relationship,
1222
- readonly: formUtils.isReadOnly("relationship"),
1223
- onInput: handleChangeFor("relationship", "input"),
1224
- onBlur: handleChangeFor("relationship", "blur"),
1225
- "aria-required": true,
1226
- "aria-invalid": !valid.relationship,
1227
- isValid: valid.relationship
1228
- })
1229
- }), /* @__PURE__ */ jsx(CountryField, {
1230
- data: { country: data.country },
1231
- valid: { country: valid.country },
1232
- errors: { country: formUtils.getErrorMessage("country", errors, fieldProblems) },
1233
- labels: { country: sofT(($) => $[countryTranslationKey]) },
1234
- readonly: formUtils.isReadOnly("country"),
1235
- handleChangeFor
1236
- })] })
1237
- ] });
1238
- }
1239
- //#endregion
1240
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForDonation.tsx
1241
- function AdditionalDataForDonation(props) {
1242
- const { formUtils, data, errors, valid, fieldProblems, handleChangeFor } = props;
1243
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AdditionalDataOriginatorLegalEntity, {
1244
- formUtils,
1245
- handleChangeFor,
1246
- data,
1247
- errors,
1248
- valid,
1249
- fieldProblems,
1250
- sourceOfFundsType: "donations"
1251
- }), /* @__PURE__ */ jsxs("div", {
1252
- className: SourceOfFunds_module_default.sourceOfFundsGridContainer,
1253
- children: [/* @__PURE__ */ jsx(Field, {
1254
- name: "purpose",
1255
- label: formUtils.getLabel("purpose", "reason"),
1256
- errorMessage: formUtils.getErrorMessage("purpose", errors, fieldProblems),
1257
- isValid: valid.purpose,
1258
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1259
- ...childProps,
1260
- name: "purpose",
1261
- value: data.purpose,
1262
- readonly: formUtils.isReadOnly("purpose"),
1263
- onInput: handleChangeFor("purpose", "input"),
1264
- onBlur: handleChangeFor("purpose", "blur"),
1265
- "aria-required": true,
1266
- "aria-invalid": !valid.purpose,
1267
- isValid: valid.purpose
1268
- })
1269
- }), /* @__PURE__ */ jsx(Field, {
1270
- name: "dateOfFundsReceived",
1271
- label: formUtils.getLabel("dateOfFundsReceived", "date"),
1272
- errorMessage: formUtils.getErrorMessage("dateOfFundsReceived", errors, fieldProblems),
1273
- isValid: valid.dateOfFundsReceived,
1274
- children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
1275
- ...childProps,
1276
- name: "dateOfFundsReceived",
1277
- value: formatDateForInput(data.dateOfFundsReceived),
1278
- onInput: handleChangeFor("dateOfFundsReceived", "input"),
1279
- onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
1280
- "aria-required": true,
1281
- "aria-invalid": !valid.dateOfFundsReceived,
1282
- max: TODAY_DATE
1283
- })
1284
- })]
1285
- })] });
1286
- }
1287
- //#endregion
1288
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForGambling.tsx
1289
- function AdditionalDataForGambling(props) {
1290
- const { t: commonT } = useTranslation("common");
1291
- const [focusedInput, setFocusedInput] = useState$1();
1292
- const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
1293
- const handleOnAmountBlur = () => {
1294
- setFocusedInput(void 0);
1295
- handleAmountChange("amount");
1296
- };
1297
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1298
- /* @__PURE__ */ jsx(Field, {
1299
- el: "fieldset",
1300
- name: "amount",
1301
- label: formUtils.getLabel("amount", "totalAmountWon"),
1302
- errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1303
- children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
1304
- ...childProps,
1305
- id: "currencyGroup",
1306
- isFocused: focusedInput === "amount",
1307
- isInvalid: Boolean(!valid.amount && errors.amount),
1308
- children: [/* @__PURE__ */ jsx(Select, {
1309
- name: "currency",
1310
- "aria-label": commonT(($) => $["currency"]),
1311
- isMulti: false,
1312
- items: allowedCurrencies,
1313
- selected: data.amount?.currency,
1314
- placeholder: commonT(($) => $["select"]),
1315
- onChange: handleAmountChange("currency"),
1316
- minimal: true
1317
- }), /* @__PURE__ */ jsx(InputText, {
1318
- ...childProps,
1319
- name: "amount",
1320
- value: data.amount?.value,
1321
- readonly: formUtils.isReadOnly("amount"),
1322
- onInput: handleAmountChange("amount"),
1323
- onBlur: handleOnAmountBlur,
1324
- "aria-required": true,
1325
- "aria-invalid": !valid.amount,
1326
- isValid: valid.amount,
1327
- onFocusHandler: () => setFocusedInput("amount")
1328
- })]
1329
- })
1330
- }),
1331
- /* @__PURE__ */ jsx(Field, {
1332
- name: "dateOfSourceEvent",
1333
- label: formUtils.getLabel("dateOfSourceEvent", "dateOfWinning"),
1334
- errorMessage: formUtils.getErrorMessage("dateOfSourceEvent", errors, fieldProblems),
1335
- isValid: valid.dateOfSourceEvent,
1336
- children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
1337
- ...childProps,
1338
- name: "dateOfSourceEvent",
1339
- value: formatDateForInput(data.dateOfSourceEvent),
1340
- onInput: handleChangeFor("dateOfSourceEvent", "input"),
1341
- onBlur: handleChangeFor("dateOfSourceEvent", "blur"),
1342
- "aria-required": true,
1343
- "aria-invalid": !valid.dateOfSourceEvent,
1344
- max: TODAY_DATE
1345
- })
1346
- }),
1347
- /* @__PURE__ */ jsx(Field, {
1348
- name: "website",
1349
- label: formUtils.getLabel("website", "gamblingEstablishmentWebsite"),
1350
- errorMessage: formUtils.getErrorMessage("website", errors, fieldProblems),
1351
- children: (childProps) => /* @__PURE__ */ jsx(InputGroup, {
1352
- ...childProps,
1353
- id: "websiteGroup",
1354
- isFocused: focusedInput === "website",
1355
- isInvalid: Boolean(!valid.website && errors.website),
1356
- children: /* @__PURE__ */ jsx(InputText, {
1357
- ...childProps,
1358
- placeholder: "https://",
1359
- name: "website",
1360
- value: data.website,
1361
- readonly: formUtils.isReadOnly("website"),
1362
- onInput: handleChangeFor("website", "input"),
1363
- onBlur: handleChangeFor("website", "blur"),
1364
- "aria-required": true,
1365
- "aria-invalid": !valid.website,
1366
- isValid: valid.website,
1367
- onFocusHandler: () => setFocusedInput("website")
1368
- })
1369
- })
1370
- })
1371
- ] });
1372
- }
1373
- //#endregion
1374
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForInheritance.tsx
1375
- function AdditionalDataForInheritance(props) {
1376
- const [isFocused, setIsFocused] = useState$1(false);
1377
- const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
1378
- const { t: commonT } = useTranslation("common");
1379
- const handleOnAmountBlur = () => {
1380
- setIsFocused(false);
1381
- handleAmountChange("amount");
1382
- };
1383
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AdditionalDataOriginatorLegalEntity, {
1384
- formUtils,
1385
- handleChangeFor,
1386
- data,
1387
- errors,
1388
- valid,
1389
- fieldProblems,
1390
- sourceOfFundsType: "inheritance"
1391
- }), /* @__PURE__ */ jsxs("div", {
1392
- className: SourceOfFunds_module_default.sourceOfFundsGridContainer,
1393
- children: [/* @__PURE__ */ jsx(Field, {
1394
- el: "fieldset",
1395
- name: "amount",
1396
- label: formUtils.getLabel("amount", "inheritanceAmount"),
1397
- errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1398
- children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
1399
- ...childProps,
1400
- id: "currencyGroup",
1401
- isFocused,
1402
- isInvalid: Boolean(!valid.amount && errors.amount),
1403
- children: [/* @__PURE__ */ jsx(Select, {
1404
- name: "currency",
1405
- "aria-label": commonT(($) => $["currency"]),
1406
- isMulti: false,
1407
- items: allowedCurrencies ?? [],
1408
- selected: data.amount?.currency,
1409
- placeholder: commonT(($) => $["select"]),
1410
- onChange: handleAmountChange("currency"),
1411
- minimal: true
1412
- }), /* @__PURE__ */ jsx(InputText, {
1413
- ...childProps,
1414
- name: "amount",
1415
- value: data.amount?.value,
1416
- readonly: formUtils.isReadOnly("amount"),
1417
- onInput: handleAmountChange("amount"),
1418
- onBlur: handleOnAmountBlur,
1419
- "aria-required": true,
1420
- "aria-invalid": !valid.amount,
1421
- isValid: valid.amount,
1422
- onFocusHandler: () => setIsFocused(true)
1423
- })]
1424
- })
1425
- }), /* @__PURE__ */ jsx(Field, {
1426
- name: "dateOfFundsReceived",
1427
- label: formUtils.getLabel("dateOfFundsReceived", "inheritanceReceivedOn"),
1428
- errorMessage: formUtils.getErrorMessage("dateOfFundsReceived", errors, fieldProblems),
1429
- isValid: valid.dateOfFundsReceived,
1430
- children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
1431
- ...childProps,
1432
- name: "dateOfFundsReceived",
1433
- value: formatDateForInput(data.dateOfFundsReceived),
1434
- onInput: handleChangeFor("dateOfFundsReceived", "input"),
1435
- onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
1436
- "aria-required": true,
1437
- "aria-invalid": !valid.dateOfFundsReceived,
1438
- max: TODAY_DATE
1439
- })
1440
- })]
1441
- })] });
1442
- }
1443
- //#endregion
1444
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.tsx
1445
- var SOFFinancierModal = (props) => {
1446
- const { t: sofT } = useTranslation("sof");
1447
- const { t: commonT } = useTranslation("common");
1448
- const { financier, handleModalClose, indexNumber, handleFinancierUpdate } = props;
1449
- const [formData, setFormData] = useState$1(financier);
1450
- const [formErrors, setFormErrors] = useState$1({});
1451
- const [confirmOpen, setConfirmOpen] = useState$1(false);
1452
- const [isFocused, setIsFocused] = useState$1(false);
1453
- const [errorMessage, setErrorMessage] = useState$1("");
1454
- const handleInputUpdate = (key, e) => {
1455
- const inputEl = e.target;
1456
- setErrorMessage("");
1457
- const value = inputEl?.value;
1458
- let inputData = { [key]: value };
1459
- if (["amount", "currency"].includes(key)) inputData = { amount: {
1460
- currency: key === "currency" ? value : formData?.amount?.currency,
1461
- value: key === "currency" ? formData?.amount?.value : value
1462
- } };
1463
- const data = {
1464
- ...formData,
1465
- ...inputData
1466
- };
1467
- setFormData(data);
1468
- setFormErrors(getInputErrors({
1469
- formErrors,
1470
- data,
1471
- key,
1472
- value,
1473
- t: commonT
1474
- }));
1475
- };
1476
- const handleOnAmountBlur = () => {
1477
- setIsFocused(false);
1478
- setFormErrors(getInputErrors({
1479
- formErrors,
1480
- data: formData,
1481
- key: "amount",
1482
- value: formData?.amount?.value,
1483
- t: commonT
1484
- }));
1485
- };
1486
- const allFieldsFilled = (data) => {
1487
- return data?.firstName && data?.lastName && data?.location && data?.amount?.currency && !Number.isNaN(Number(data?.amount?.value));
1488
- };
1489
- const handleFinancierSave = () => {
1490
- if (formData && allFieldsFilled(formData)) {
1491
- handleFinancierUpdate({
1492
- formData,
1493
- indexNumber
1494
- });
1495
- handleModalClose();
1496
- } else {
1497
- setFormErrors([
1498
- "firstName",
1499
- "lastName",
1500
- "location",
1501
- "amount"
1502
- ].reduce((acc, key) => {
1503
- const value = key === "amount" ? formData?.amount?.value : formData?.[key];
1504
- return {
1505
- ...acc,
1506
- ...getInputErrors({
1507
- formErrors: void 0,
1508
- data: formData,
1509
- key,
1510
- value,
1511
- t: commonT
1512
- })
1513
- };
1514
- }, {}));
1515
- setErrorMessage(sofT(($) => $["pleaseFillInAllFields"]));
1516
- }
1517
- };
1518
- const handleFinancierDelete = async () => {
1519
- handleFinancierUpdate({ indexNumber });
1520
- handleModalClose();
1521
- };
1522
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Modal, {
1523
- onClose: handleModalClose,
1524
- ariaLabel: sofT(($) => $["investorDetails"]),
1525
- inset: true,
1526
- children: /* @__PURE__ */ jsxs("div", {
1527
- className: SourceOfFunds_module_default.sourceOfFundsModal,
1528
- children: [
1529
- /* @__PURE__ */ jsx(Typography, {
1530
- variant: "title-l",
1531
- el: "h3",
1532
- className: SourceOfFunds_module_default.sourceOfFundsGettingStartedHelpHeader,
1533
- children: sofT(($) => $["investorDetails"])
1534
- }),
1535
- /* @__PURE__ */ jsxs("div", {
1536
- className: SourceOfFunds_module_default.sourceOfFundsSofFinancierForm,
1537
- children: [
1538
- errorMessage && /* @__PURE__ */ jsx(Alert, {
1539
- title: sofT(($) => $["errorSubmittingData"]),
1540
- variant: "error",
1541
- className: SourceOfFunds_module_default.sourceOfFundsSofFinancierFormError,
1542
- children: errorMessage
1543
- }),
1544
- /* @__PURE__ */ jsxs("div", {
1545
- className: SourceOfFunds_module_default.sourceOfFundsSofFinancierFormNameGroup,
1546
- children: [/* @__PURE__ */ jsx(Field, {
1547
- name: "firstName",
1548
- label: commonT(($) => $["firstName"]),
1549
- errorMessage: formErrors.firstName,
1550
- isValid: !formErrors.firstName,
1551
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1552
- ...childProps,
1553
- name: "firstName",
1554
- value: formData?.firstName,
1555
- onInput: (e) => handleInputUpdate("firstName", e),
1556
- onBlur: (e) => handleInputUpdate("firstName", e),
1557
- "aria-required": true,
1558
- "aria-invalid": Boolean(formErrors.firstName),
1559
- isValid: !formErrors.firstName
1560
- })
1561
- }), /* @__PURE__ */ jsx(Field, {
1562
- name: "lastName",
1563
- label: commonT(($) => $["lastName"]),
1564
- errorMessage: formErrors.lastName,
1565
- isValid: !formErrors.lastName,
1566
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1567
- ...childProps,
1568
- name: "lastName",
1569
- value: formData?.lastName,
1570
- onInput: (e) => handleInputUpdate("lastName", e),
1571
- onBlur: (e) => handleInputUpdate("lastName", e),
1572
- "aria-required": true,
1573
- "aria-invalid": Boolean(formErrors.lastName),
1574
- isValid: !formErrors.lastName
1575
- })
1576
- })]
1577
- }),
1578
- /* @__PURE__ */ jsx(Field, {
1579
- name: "location",
1580
- label: sofT(($) => $["investorLocation"]),
1581
- errorMessage: formErrors.location,
1582
- isValid: !formErrors.location,
1583
- helperPosition: "below",
1584
- showErrorIconBottom: true,
1585
- helper: sofT(($) => $["theCityAndCountryRegion"]),
1586
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1587
- ...childProps,
1588
- name: "location",
1589
- value: formData?.location,
1590
- onInput: (e) => handleInputUpdate("location", e),
1591
- onBlur: (e) => handleInputUpdate("location", e),
1592
- "aria-required": true,
1593
- "aria-invalid": Boolean(formErrors.location),
1594
- isValid: !formErrors.location
1595
- })
1596
- }),
1597
- /* @__PURE__ */ jsx(Field, {
1598
- el: "fieldset",
1599
- name: "amount",
1600
- label: sofT(($) => $["investmentAmount"]),
1601
- errorMessage: formErrors.amount,
1602
- isValid: !formErrors.amount,
1603
- children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
1604
- ...childProps,
1605
- id: "currencyGroup",
1606
- isFocused,
1607
- children: [/* @__PURE__ */ jsx(Select, {
1608
- minimal: true,
1609
- name: "currency",
1610
- "aria-label": commonT(($) => $["currency"]),
1611
- isMulti: false,
1612
- items: allowedCurrencies,
1613
- selected: formData?.amount?.currency,
1614
- placeholder: commonT(($) => $["select"]),
1615
- onChange: (e) => handleInputUpdate("currency", e)
1616
- }), /* @__PURE__ */ jsx(InputText, {
1617
- ...childProps,
1618
- name: "amount",
1619
- value: formData?.amount?.value,
1620
- onInput: (e) => handleInputUpdate("amount", e),
1621
- onBlur: handleOnAmountBlur,
1622
- "aria-required": true,
1623
- onFocusHandler: () => setIsFocused(true)
1624
- })]
1625
- })
1626
- })
1627
- ]
1628
- }),
1629
- /* @__PURE__ */ jsxs("div", {
1630
- className: SourceOfFunds_module_default.sourceOfFundsFinancierFooter,
1631
- children: [/* @__PURE__ */ jsx(Button, {
1632
- onClick: handleFinancierSave,
1633
- children: commonT(($) => $["save"])
1634
- }), Number.isFinite(indexNumber) && /* @__PURE__ */ jsx(Button, {
1635
- variant: "tertiary",
1636
- onClick: () => setConfirmOpen(true),
1637
- children: sofT(($) => $["deleteInvestorDetails"])
1638
- })]
1639
- })
1640
- ]
1641
- })
1642
- }), confirmOpen && /* @__PURE__ */ jsx(Confirm, {
1643
- title: sofT(($) => $["areYouSureYouWantToDeleteThisInvestorDetails"]),
1644
- confirmText: commonT(($) => $["delete"]),
1645
- onConfirm: handleFinancierDelete,
1646
- onCancel: () => setConfirmOpen(false),
1647
- critical: true
1648
- })] });
1649
- };
1650
- //#endregion
1651
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForThirdParty.tsx
1652
- function AdditionalDataForThirdParty(props) {
1653
- const [showFinancierModal, setShowFinancierModal] = useState$1(false);
1654
- const [activeFinancier, setActiveFinancier] = useState$1();
1655
- const [activeIndex, setActiveIndex] = useState$1();
1656
- const { data, fieldProblems, errors, handleChangeFor, formUtils, valid } = props;
1657
- const { t: sofT } = useTranslation("sof");
1658
- const handleToggleFinancierModal = () => {
1659
- setActiveFinancier(void 0);
1660
- setActiveIndex(void 0);
1661
- setShowFinancierModal((prev) => !prev);
1662
- };
1663
- const handleShowUpdateFinancierModal = (index) => {
1664
- if (!data.financiers) return;
1665
- const financier = data.financiers[index];
1666
- setActiveFinancier(financier);
1667
- setActiveIndex(index);
1668
- setShowFinancierModal(true);
1669
- };
1670
- const handleFinancierUpdate = ({ formData, indexNumber }) => {
1671
- const existingFinanciers = data.financiers || [];
1672
- let newFinanciers = [];
1673
- if (!formData) {
1674
- if (indexNumber !== void 0) newFinanciers = existingFinanciers.filter((_, index) => index !== indexNumber);
1675
- } else {
1676
- newFinanciers = [...existingFinanciers, formData];
1677
- if (Number.isFinite(indexNumber)) newFinanciers = existingFinanciers.map((existingFinancier, i) => i === indexNumber ? formData : existingFinancier);
1678
- }
1679
- const financierEvent = { target: {
1680
- name: "financiers",
1681
- value: newFinanciers
1682
- } };
1683
- handleChangeFor("financiers")(financierEvent);
1684
- };
1685
- const errorMessage = formUtils.getErrorMessage("financiers", errors, fieldProblems);
1686
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1687
- errors.financiers && !valid.financiers && /* @__PURE__ */ jsx(Alert, {
1688
- title: errorMessage?.message,
1689
- variant: "error",
1690
- className: SourceOfFunds_module_default.sourceOfFundsSofFinancierFormError,
1691
- children: sofT(($) => $["addAtLeastOneInvestor"])
1692
- }),
1693
- data.financiers?.map((financier, index) => /* @__PURE__ */ jsxs("button", {
1694
- type: "button",
1695
- onClick: () => handleShowUpdateFinancierModal(index),
1696
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingFinancierGroup,
1697
- children: [/* @__PURE__ */ jsxs("div", {
1698
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAvatarGroup,
1699
- children: [/* @__PURE__ */ jsx(Avatar, {
1700
- iconName: "user",
1701
- circle: true
1702
- }), /* @__PURE__ */ jsxs("div", {
1703
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAddressGroup,
1704
- children: [/* @__PURE__ */ jsxs(Typography, {
1705
- el: "div",
1706
- variant: "body-strongest",
1707
- children: [
1708
- financier.firstName,
1709
- " ",
1710
- financier.lastName
1711
- ]
1712
- }), /* @__PURE__ */ jsx(Typography, {
1713
- el: "div",
1714
- variant: "caption",
1715
- children: financier.location
1716
- })]
1717
- })]
1718
- }), /* @__PURE__ */ jsx("div", { children: financier.amount?.currency && financier.amount?.value ? formatAmountWithCurrency(financier.amount.value, financier.amount?.currency) : "" })]
1719
- }, index)),
1720
- /* @__PURE__ */ jsx("button", {
1721
- type: "button",
1722
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingFinancierGroup,
1723
- onClick: handleToggleFinancierModal,
1724
- children: /* @__PURE__ */ jsxs("div", {
1725
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAvatarGroup,
1726
- children: [/* @__PURE__ */ jsx(Avatar, {
1727
- iconName: "plus",
1728
- variant: "tertiary",
1729
- circle: true
1730
- }), /* @__PURE__ */ jsx(Typography, {
1731
- el: "div",
1732
- variant: "body-strongest",
1733
- children: sofT(($) => $["addInvestor"])
1734
- })]
1735
- })
1736
- }),
1737
- showFinancierModal && /* @__PURE__ */ jsx(SOFFinancierModal, {
1738
- financier: activeFinancier,
1739
- indexNumber: activeIndex,
1740
- handleModalClose: handleToggleFinancierModal,
1741
- handleFinancierUpdate
1742
- })
1743
- ] });
1744
- }
1745
- //#endregion
1746
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsAdditionalData.tsx
1747
- function SourceOfFundsAdditionalData(props) {
1748
- const { t } = useTranslation("common");
1749
- const { form } = useFormContext();
1750
- const { handleChangeFor: multiFormHandleChangeFor, data: { additionalData: data, sourceOfFundsType }, errors: { additionalData: errors }, valid: { additionalData: valid }, fieldProblems: { additionalData: fieldProblems } } = form;
1751
- const handleChangeFor = useMemo$1(() => (key, mode) => multiFormHandleChangeFor("additionalData", key, mode), [multiFormHandleChangeFor]);
1752
- const handleAmountChange = (key) => (e) => {
1753
- const rawValue = e.target.value;
1754
- const updatedAmount = {
1755
- ...data?.amount,
1756
- ...key === "currency" ? { currency: rawValue } : { value: rawValue === "" ? void 0 : Number(rawValue) }
1757
- };
1758
- handleChangeFor("amount")(updatedAmount);
1759
- };
1760
- const formUtils = createFormUtils(props, t);
1761
- const additionalDataProps = {
1762
- formUtils,
1763
- handleChangeFor,
1764
- data,
1765
- errors,
1766
- valid,
1767
- fieldProblems,
1768
- handleAmountChange
1769
- };
1770
- const renderSubForms = () => {
1771
- switch (sourceOfFundsType?.type) {
1772
- case "gamblingWinnings": return /* @__PURE__ */ jsx(AdditionalDataForGambling, { ...additionalDataProps });
1773
- case "cryptocurrencyIncome": return /* @__PURE__ */ jsx(AdditionalDataForCryptocurrency, { ...additionalDataProps });
1774
- case "business": return /* @__PURE__ */ jsx(AdditionalDataForBusiness, { ...additionalDataProps });
1775
- case "assetSale": return /* @__PURE__ */ jsx(AdditionalDataForAssetSale, { ...additionalDataProps });
1776
- case "thirdPartyFunding": return /* @__PURE__ */ jsx(AdditionalDataForThirdParty, { ...additionalDataProps });
1777
- case "inheritance": return /* @__PURE__ */ jsx(AdditionalDataForInheritance, { ...additionalDataProps });
1778
- case "donations": return /* @__PURE__ */ jsx(AdditionalDataForDonation, { ...additionalDataProps });
1779
- default: return null;
1780
- }
1781
- };
1782
- return /* @__PURE__ */ jsxs("form", {
1783
- className: SourceOfFunds_module_default.sourceOfFundsAdditionalDataForm,
1784
- children: [/* @__PURE__ */ jsx(ErrorPanel, {
1785
- verificationErrors: props?.formVerificationErrors,
1786
- validationErrors: props?.fieldValidationErrors,
1787
- formUtils,
1788
- id: "ariaErrorField"
1789
- }), renderSubForms()]
1790
- });
1791
- }
1792
- //#endregion
1793
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsType.tsx
1794
- function SourceOfFundsType(props) {
1795
- const { t } = useTranslation(["common", "sof"]);
1796
- const { data: formData, categories, errors: formErrors, fieldValidationErrors: formFieldProblems, sameAsOption, useSameAs, onUseSameAsChange } = props;
1797
- const { form } = useFormContext();
1798
- const { handleChangeFor } = form;
1799
- const handleFieldChange = (fieldName, mode) => handleChangeFor("sourceOfFundsType", fieldName, mode);
1800
- const handleUseSameAsChange = (isChecked) => {
1801
- onUseSameAsChange?.(isChecked);
1802
- };
1803
- const formUtils = createFormUtils(props, t);
1804
- const categoryItems = [{
1805
- value: "adyen",
1806
- label: t(($) => $["transactionsOnThisPlatform"], { ns: "sof" }),
1807
- icon: getIconById("adyen")
1808
- }, ...categories?.map((item) => ({
1809
- value: item.id,
1810
- label: t(($) => $[sofCategoryItemMapper[item.name]], { ns: "sof" }),
1811
- icon: getIconById(item.id)
1812
- })) ?? []];
1813
- const errorMessage = formUtils.getErrorMessage("type", formErrors, formFieldProblems);
1814
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [sameAsOption && /* @__PURE__ */ jsx("div", {
1815
- className: SourceOfFunds_module_default.sourceOfFundsSameAsCheckbox,
1816
- children: /* @__PURE__ */ jsx(Field, {
1817
- name: "useSameAs",
1818
- children: (childProps) => /* @__PURE__ */ jsx(Checkbox, {
1819
- ...childProps,
1820
- "aria-required": false,
1821
- "aria-invalid": false,
1822
- name: "useSameAs",
1823
- label: t(($) => $["alwaysUseThisFundingSource"], { ns: "sof" }),
1824
- checked: Boolean(useSameAs),
1825
- onChange: handleUseSameAsChange
1826
- })
1827
- })
1828
- }), /* @__PURE__ */ jsx(Field, {
1829
- el: "fieldset",
1830
- name: "type",
1831
- children: () => /* @__PURE__ */ jsx(TileGroup, {
1832
- name: "type",
1833
- tiles: categoryItems,
1834
- errorMessage,
1835
- selected: formData?.type ? formData.type : [],
1836
- onChange: (e) => handleFieldChange("type", "input")(e)
1837
- })
1838
- })] });
1839
- }
1840
- function getIconById(id) {
1841
- switch (id) {
1842
- case "adyen": return "store";
1843
- case "business": return "revenue-accelerate";
1844
- case "assetSale": return "house";
1845
- case "dividendIncome": return "graph-up";
1846
- case "thirdPartyFunding": return "graph";
1847
- case "employment": return "headquarter";
1848
- case "donations": return "gift";
1849
- case "inheritance": return "certificate";
1850
- case "financialAid": return "capital";
1851
- case "rentalIncome": return "house";
1852
- case "royaltyIncome": return "cash-stack";
1853
- case "pensionIncome": return "bank";
1854
- case "insuranceSettlement": return "funds-in";
1855
- case "cryptocurrencyIncome": return "coins";
1856
- case "loans": return "capital";
1857
- case "gamblingWinnings": return "cash-stack";
1858
- default: return "contract";
1859
- }
1860
- }
1861
- //#endregion
1862
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFunds.tsx
1863
- function SourceOfFunds(props) {
1864
- const { activeForm, activeBusinessLine, sourceOfFundsType, sameAsOption, useSameAs, onUseSameAsChange } = props;
1865
- const { form } = useFormContext();
1866
- const { data: formData, errors, valid, fieldProblems: fieldValidationErrors } = form;
1867
- const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
1868
- const { t: sofT } = useTranslation("sof");
1869
- const pageHeadings = useMemo$1(() => getPageHeadings(sourceOfFundsType ?? "adyen"), [sourceOfFundsType]);
1870
- return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", {
1871
- className: SourceOfFunds_module_default.sourceOfFundsWrapperLoading,
1872
- children: /* @__PURE__ */ jsx(Loader, {})
1873
- }) : /* @__PURE__ */ jsxs("div", { children: [
1874
- /* @__PURE__ */ jsxs("div", {
1875
- className: SourceOfFunds_module_default.sourceOfFundsWrapperHeading,
1876
- children: [/* @__PURE__ */ jsx(Typography, {
1877
- el: "h1",
1878
- variant: "title-l",
1879
- children: activeForm?.formId === "additionalData" ? sofT(($) => $[pageHeadings.heading]) : sofT(($) => $["selectASourceOfFunding"], { type: getServiceTranslationSelectTitle(sofT, activeBusinessLine?.service || "").toLowerCase() })
1880
- }), /* @__PURE__ */ jsxs(Typography, {
1881
- className: SourceOfFunds_module_default.sourceOfFundsWrapperDescription,
1882
- children: [activeForm?.formId === "additionalData" && pageHeadings.description && sofT(($) => $[pageHeadings.description]), sourceOfFundsTypesData?.length === 0 && sofT(($) => $["noCategoriesAvailable"])]
1883
- })]
1884
- }),
1885
- sofErrorMessage.value && /* @__PURE__ */ jsxs(Typography, {
1886
- variant: "caption",
1887
- color: "critical",
1888
- "aria-live": "polite",
1889
- className: "u-justify-content-center u-display-flex",
1890
- children: [/* @__PURE__ */ jsx(Icon, {
1891
- name: "field-error",
1892
- className: "u-margin-right-2"
1893
- }), /* @__PURE__ */ jsx("span", { children: sofErrorMessage.value })]
1894
- }),
1895
- activeForm?.formId === "sourceOfFundsType" && /* @__PURE__ */ jsx(SourceOfFundsType, {
1896
- categories: sourceOfFundsTypesData,
1897
- data: formData?.sourceOfFundsType,
1898
- errors: errors?.sourceOfFundsType,
1899
- valid: valid?.sourceOfFundsType,
1900
- fieldValidationErrors: fieldValidationErrors?.sourceOfFundsType,
1901
- sameAsOption,
1902
- useSameAs,
1903
- onUseSameAsChange
1904
- }),
1905
- activeForm?.formId === "additionalData" && /* @__PURE__ */ jsx(SourceOfFundsAdditionalData, { fieldValidationErrors: fieldValidationErrors?.additionalData }),
1906
- activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { children: sofT(($) => $["uploadADocument"]) })
1907
- ] });
1908
- }
1909
- //#endregion
1910
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStartedCard.tsx
1911
- function SourceOfFundsGettingStartedCard(props) {
1912
- const { id, title, onClick, isEdit, meta } = props;
1913
- const { t: commonT } = useTranslation("common");
1914
- return /* @__PURE__ */ jsxs(Card, {
1915
- variant: "secondary",
1916
- children: [/* @__PURE__ */ jsxs("div", {
1917
- className: SourceOfFunds_module_default.sourceOfFundsGettingStartedCardsCardHeader,
1918
- children: [/* @__PURE__ */ jsx(Typography, {
1919
- el: "h3",
1920
- variant: "title",
1921
- children: title
1922
- }), isEdit ? /* @__PURE__ */ jsx(IconButton, {
1923
- ariaLabel: "edit",
1924
- icon: "edit",
1925
- onClick,
1926
- variant: "tertiary"
1927
- }) : /* @__PURE__ */ jsx(Button, {
1928
- variant: "primary",
1929
- testId: "source-of-funds-getting-card-secondary-button",
1930
- onClick,
1931
- children: commonT(($) => $["start"])
1932
- })]
1933
- }), isEdit && meta?.length && /* @__PURE__ */ jsx("div", {
1934
- className: SourceOfFunds_module_default.sourceOfFundsGettingStartedCardsCardBody,
1935
- children: /* @__PURE__ */ jsx(StructuredList, {
1936
- className: SourceOfFunds_module_default.sourceOfFundsGettingStartedCardsCardDescription,
1937
- items: meta
1938
- })
1939
- })]
1940
- }, id);
1941
- }
1942
- //#endregion
1943
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStarted.tsx
1944
- var digitalWallet = lazy(() => import("./digital-wallet-ByQCwU-K.js"));
1945
- var SourceOfFundsGettingStarted = ({ handleGettingStartedClick, handleCancelClick, handleSourceOfFundsClick, businessLines, handleNavigateToUploadPage, problems, legalEntity, asAwe, isSoFDocumentMissing }) => {
1946
- const { t: sofT } = useTranslation("sof");
1947
- const { t: commonT } = useTranslation("common");
1948
- const hasSourceOfFunds = businessLines?.some((businessLine) => !isEmpty(businessLine.sourceOfFunds));
1949
- const { data: taskStatusResponse } = useTaskStatus(TaskTypes.SOURCE_OF_FUNDS, { refetchInterval: TASK_STATUS_POLLING_INTERVAL_MS });
1950
- const sofDocuments = useMemo$1(() => legalEntity?.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [], [legalEntity]);
1951
- const mapBusinessLines = useCallback$1((lines) => {
1952
- const completedBusinessLines = businessLines.every((line) => line?.sourceOfFunds?.type);
1953
- const cards = lines.map((line) => {
1954
- const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
1955
- return {
1956
- title: getServiceTranslation(sofT, line.service || ""),
1957
- type: line?.sourceOfFunds?.type,
1958
- isEdit: !!line?.sourceOfFunds?.type || !!line?.sourceOfFunds?.adyenProcessedFunds,
1959
- onClick: () => handleSourceOfFundsClick(SoF, line),
1960
- meta: [{
1961
- term: sofT(($) => $["sourceOfFunds"]),
1962
- details: getSofCardDetails(sofT, line?.sourceOfFunds)
1963
- }, ...getGettingStartedCardDetails(getAdditionalDataSchemaKeys(line?.sourceOfFunds?.type || "adyen", line?.sourceOfFunds?.originatorType), sofT, line?.sourceOfFunds)]
1964
- };
1965
- }).sort((a) => a?.type ? 1 : -1);
1966
- const uploadCard = {
1967
- title: getServiceTranslation(sofT),
1968
- type: "",
1969
- isEdit: !!sofDocuments?.length,
1970
- onClick: handleNavigateToUploadPage,
1971
- meta: sofDocuments?.length ? sofDocuments.map((doc) => ({
1972
- term: sofT(($) => $["fileName"]),
1973
- details: [doc?.fileName, /* @__PURE__ */ jsx(Typography, {
1974
- color: "secondary",
1975
- children: parseSOFDocumentDescription(sofT, doc?.description) || ""
1976
- }, "docDescription")]
1977
- })) : []
1978
- };
1979
- if (completedBusinessLines && (isSoFDocumentMissing || sofDocuments?.length)) if (uploadCard.meta?.length) cards.push(uploadCard);
1980
- else cards.unshift(uploadCard);
1981
- return cards.map((item, index) => {
1982
- return /* @__PURE__ */ jsx(SourceOfFundsGettingStartedCard, {
1983
- id: index,
1984
- isEdit: !!item.isEdit,
1985
- title: item.title,
1986
- onClick: item.onClick,
1987
- meta: item.meta
1988
- }, index);
1989
- });
1990
- }, [handleSourceOfFundsClick, sofDocuments]);
1991
- const errorObjects = useMemo$1(() => getRelevantErrors(problems, SOF_INVALID_INPUT_ERROR_CODES), [problems]);
1992
- return /* @__PURE__ */ jsxs("div", {
1993
- className: asAwe ? SourceOfFunds_module_default.sourceOfFundsGettingStartedAwe : SourceOfFunds_module_default.sourceOfFundsGettingStarted,
1994
- "data-testid": "source-of-funds-getting-started",
1995
- children: [!hasSourceOfFunds && /* @__PURE__ */ jsx(LandingLayout, {
1996
- media: /* @__PURE__ */ jsx(Image, { lazyLoadedImage: digitalWallet }),
1997
- title: sofT(($) => $["fundingSourcesForFinancialProducts"]),
1998
- description: sofT(($) => $["inTheNextStepWellCollectInformation"]),
1999
- actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
2000
- fullWidth: true,
2001
- testId: "source-of-funds-getting-primary-button",
2002
- onClick: handleGettingStartedClick,
2003
- children: commonT(($) => $["getStarted"])
2004
- }), handleCancelClick && /* @__PURE__ */ jsx(Button, {
2005
- variant: "tertiary",
2006
- fullWidth: true,
2007
- testId: "source-of-funds-getting-cancel-button",
2008
- onClick: handleCancelClick,
2009
- children: commonT(($) => $["backToTaskList"])
2010
- })] })
2011
- }), hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment$1, { children: [
2012
- /* @__PURE__ */ jsx(Header, {
2013
- title: sofT(($) => $["fundingSourcesForFinancialProducts"]),
2014
- description: sofT(($) => $["addAllSourcesOfFundsBeingUsed"]),
2015
- status: asAwe ? void 0 : taskStatusResponse?.status,
2016
- align: "center"
2017
- }),
2018
- errorObjects && errorObjects.map((errorObj, index) => {
2019
- const uniqueActions = getUniqueRemediationActions(errorObj);
2020
- const errorItems = errorObj.subErrors?.map((subError) => subError.message) || [];
2021
- return /* @__PURE__ */ jsxs(Alert, {
2022
- title: errorObj.message,
2023
- className: SourceOfFunds_module_default.sourceOfFundsGettingStartedError,
2024
- variant: "error",
2025
- children: [errorObj?.subErrors?.length && /* @__PURE__ */ jsx("ul", { children: errorItems.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }), uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", {
2026
- className: SourceOfFunds_module_default.sourceOfFundsGettingStartedErrorActions,
2027
- children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(Button, {
2028
- variant: "tertiary",
2029
- testId: `remediate-action-${i}`,
2030
- onClick: handleNavigateToUploadPage,
2031
- children: action.message
2032
- }, `action-${i}`))
2033
- })]
2034
- }, `error-${index}`);
2035
- }),
2036
- /* @__PURE__ */ jsx("div", {
2037
- className: SourceOfFunds_module_default.sourceOfFundsGettingStartedCards,
2038
- children: /* @__PURE__ */ jsx(StackLayout, { children: mapBusinessLines(businessLines) })
2039
- }),
2040
- handleCancelClick && /* @__PURE__ */ jsx(Button, {
2041
- variant: "secondary",
2042
- testId: "source-of-funds-getting-return-button",
2043
- onClick: handleCancelClick,
2044
- children: commonT(($) => $["backToTaskList"])
2045
- })
2046
- ] })]
2047
- });
2048
- };
2049
- //#endregion
2050
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SOFUploadModal.tsx
2051
- var SOFUploadModal = (props) => {
2052
- const { showToast } = useToastContext();
2053
- const logger = createLogger();
2054
- const { t: sofT } = useTranslation("sof");
2055
- const { t: commonT } = useTranslation("common");
2056
- const { businessLines, handleModalClose, documentUtils } = props;
2057
- const [selectedService, setSelectedService] = useState$1(businessLines?.length === 1 ? businessLines?.[0]?.service : void 0);
2058
- const [documentType, setDocumentType] = useState$1();
2059
- const onRadioChange = (selectedId) => {
2060
- setSelectedService(selectedId);
2061
- setDocumentType(void 0);
2062
- };
2063
- const onDocumentTypeChange = (e) => {
2064
- setDocumentType(e.target.value);
2065
- };
2066
- const serviceRadioItems = useMemo$1(() => {
2067
- return Array.from(new Map(businessLines.map((businessLine) => [businessLine.service, businessLine])).values()).map((businessLine) => ({
2068
- id: businessLine.service,
2069
- name: sofT(($) => $[getServiceTranslationKey(businessLine?.service || "")])
2070
- }));
2071
- }, [businessLines, sofT]);
2072
- const canUpload = useMemo$1(() => selectedService && documentType, [selectedService, documentType]);
2073
- const selectedBusinessLineId = businessLines?.find((businessLine) => businessLine.service === selectedService)?.id || "";
2074
- const documentLists = useMemo$1(() => {
2075
- const selectedType = businessLines?.find((businessLine) => businessLine.service === selectedService)?.sourceOfFunds?.type;
2076
- if (selectedType) return getDocumentLists(selectedType).map((list) => ({
2077
- id: list,
2078
- name: sofT(($) => $[list])
2079
- }));
2080
- return [];
2081
- }, [
2082
- businessLines,
2083
- sofT,
2084
- selectedService
2085
- ]);
2086
- const documentRequirements = useMemo$1(() => {
2087
- return documentType ? getDocumentRequirements[documentType] : [];
2088
- }, [documentType]);
2089
- const onFileUpload = async (files) => {
2090
- if (!canUpload) {
2091
- showToast({
2092
- label: sofT(($) => $["unableToUploadDocument"]),
2093
- variant: "error"
2094
- });
2095
- return;
2096
- }
2097
- const formattedDocument = await createDocumentRequest({
2098
- entityId: selectedBusinessLineId,
2099
- entityType: "businessLine",
2100
- documentType: "proofOfFundingOrWealthSource",
2101
- page1: files[0],
2102
- description: `$SERVICE_NAME:${selectedService}--TYPE_NAME:${documentType}`
2103
- });
2104
- if (formattedDocument) try {
2105
- await documentUtils.uploadDocuments([formattedDocument], selectedBusinessLineId);
2106
- showToast({
2107
- label: sofT(($) => $["documentUploadedSuccessfully"]),
2108
- variant: "success",
2109
- duration: 1e4
2110
- });
2111
- handleModalClose();
2112
- } catch (e) {
2113
- logger.log(e);
2114
- showToast({
2115
- label: sofT(($) => $["unableToUploadDocument"]),
2116
- variant: "error"
2117
- });
2118
- }
2119
- };
2120
- return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Modal, {
2121
- onClose: handleModalClose,
2122
- ariaLabel: sofT(($) => $["uploadASupportingDocument"]),
2123
- inset: true,
2124
- children: /* @__PURE__ */ jsxs("div", {
2125
- className: SourceOfFunds_module_default.sourceOfFundsModal,
2126
- children: [/* @__PURE__ */ jsx(Typography, {
2127
- variant: "title-l",
2128
- el: "h2",
2129
- children: sofT(($) => $["uploadASupportingDocument"])
2130
- }), /* @__PURE__ */ jsxs("div", {
2131
- className: SourceOfFunds_module_default.sourceOfFundsUploadModalContent,
2132
- children: [
2133
- businessLines?.length > 1 ? /* @__PURE__ */ jsx(Field, {
2134
- el: "fieldset",
2135
- name: "service",
2136
- className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentField,
2137
- label: sofT(($) => $["whatFinancialProductIsThisFor"]),
2138
- children: (childProps) => /* @__PURE__ */ jsx(RadioGroup, {
2139
- ...childProps,
2140
- name: "service",
2141
- className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentFieldRadioGroup,
2142
- items: serviceRadioItems,
2143
- value: selectedService,
2144
- disabled: false,
2145
- onChange: onRadioChange,
2146
- "aria-required": true
2147
- })
2148
- }) : null,
2149
- selectedService && /* @__PURE__ */ jsx(Field, {
2150
- name: "documentType",
2151
- label: commonT(($) => $["documentType"]),
2152
- "data-testid": "documentType",
2153
- className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentField,
2154
- children: (childProps) => /* @__PURE__ */ jsx(Select, {
2155
- ...childProps,
2156
- name: "documentType",
2157
- placeholder: commonT(($) => $["selectOne"]),
2158
- selected: documentType,
2159
- items: documentLists,
2160
- onChange: onDocumentTypeChange
2161
- })
2162
- }),
2163
- documentRequirements?.length ? /* @__PURE__ */ jsxs("div", {
2164
- className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentRequirementsContainer,
2165
- children: [/* @__PURE__ */ jsx(Typography, {
2166
- variant: "body-strongest",
2167
- el: "div",
2168
- children: sofT(($) => $["documentShouldShow"])
2169
- }), /* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, {
2170
- variant: "body-stronger",
2171
- el: "div",
2172
- children: sofT(($) => $[requirement])
2173
- }) }, requirement)) })]
2174
- }) : null,
2175
- canUpload && /* @__PURE__ */ jsx(Dropzone, {
2176
- disabled: !canUpload,
2177
- onChange: onFileUpload,
2178
- showMinimal: true,
2179
- hidePageCount: true,
2180
- maxSize: 4194304,
2181
- enableTracking: true,
2182
- name: "documentField",
2183
- allowedFileTypes: [
2184
- "JPG",
2185
- "JPEG",
2186
- "PNG",
2187
- "PDF"
2188
- ]
2189
- })
2190
- ]
2191
- })]
2192
- })
2193
- }) });
2194
- };
2195
- //#endregion
2196
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SourceOfFundsUpload.tsx
2197
- var SourceOfFundsUpload = ({ businessLines, documentUtils, legalEntity, handleNavigateToSummary }) => {
2198
- const [showUploadModal, setShowUploadModal] = useState$1(false);
2199
- const [docToDelete, setDocToDelete] = useState$1(void 0);
2200
- const { showToast } = useToastContext();
2201
- const logger = createLogger();
2202
- const queryClient = useQueryClient();
2203
- const { t: sofT } = useTranslation("sof");
2204
- const { t: commonT } = useTranslation("common");
2205
- const handleModalClose = async () => {
2206
- setShowUploadModal(false);
2207
- await queryClient.invalidateQueries({ queryKey: ["legalEntity", legalEntity.id] });
2208
- };
2209
- const openUploadModal = () => {
2210
- setShowUploadModal(true);
2211
- };
2212
- const documents = useMemo$1(() => legalEntity.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [], [legalEntity]);
2213
- const sourceOfFundsCategories = businessLines?.map((line) => line.sourceOfFunds?.type)?.filter(Boolean);
2214
- const getTranslatedCategoryName = (categoryKey) => {
2215
- const translationKey = sofCategoryItemMapper[categoryKey];
2216
- if (!categoryKey || !translationKey) return "";
2217
- return sofT(($) => $[translationKey]).toLowerCase();
2218
- };
2219
- let translationKey;
2220
- let translationParams;
2221
- if (sourceOfFundsCategories?.length > 1) {
2222
- translationKey = "weNeedProofOfFundingForMultipleCategories";
2223
- translationParams = {
2224
- category1_name: getTranslatedCategoryName(sourceOfFundsCategories[0]),
2225
- category2_name: getTranslatedCategoryName(sourceOfFundsCategories[1])
2226
- };
2227
- } else if (sourceOfFundsCategories?.length === 1) {
2228
- translationKey = "weNeedProofOfFunding";
2229
- translationParams = { category_name: getTranslatedCategoryName(sourceOfFundsCategories[0]) };
2230
- } else translationKey = "weNeedProofOfFundingForNoCategory";
2231
- const handleFileDelete = async (documentId) => {
2232
- if (documentUtils.deleteDocument) try {
2233
- await documentUtils.deleteDocument(documentId, legalEntity.id);
2234
- await queryClient.invalidateQueries({ queryKey: ["legalEntity", legalEntity.id] });
2235
- showToast({
2236
- label: sofT(($) => $["documentDeletedSuccessfully"]),
2237
- variant: "success",
2238
- duration: 1e4
2239
- });
2240
- } catch (e) {
2241
- logger.log(e);
2242
- showToast({
2243
- label: sofT(($) => $["unableToDeleteDocument"]),
2244
- variant: "error"
2245
- });
2246
- }
2247
- };
2248
- return /* @__PURE__ */ jsxs("div", {
2249
- className: SourceOfFunds_module_default.sourceOfFundsUploadList,
2250
- children: [
2251
- /* @__PURE__ */ jsxs("div", {
2252
- className: SourceOfFunds_module_default.sourceOfFundsUploadListHeading,
2253
- children: [/* @__PURE__ */ jsx(Typography, {
2254
- el: "h1",
2255
- variant: "title-l",
2256
- children: sofT(($) => $["supportingDocuments"])
2257
- }), /* @__PURE__ */ jsx(Typography, {
2258
- className: SourceOfFunds_module_default.sourceOfFundsWrapperDescription,
2259
- children: sofT(($) => $[translationKey], translationParams)
2260
- })]
2261
- }),
2262
- documents?.map((document) => /* @__PURE__ */ jsxs("div", {
2263
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingFinancierGroup,
2264
- children: [/* @__PURE__ */ jsxs("div", {
2265
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAvatarGroup,
2266
- children: [/* @__PURE__ */ jsx(Avatar, {
2267
- iconName: "document",
2268
- circle: true
2269
- }), /* @__PURE__ */ jsxs("div", {
2270
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAddressGroup,
2271
- children: [/* @__PURE__ */ jsx(Typography, {
2272
- el: "div",
2273
- variant: "body-strongest",
2274
- children: document.fileName
2275
- }), /* @__PURE__ */ jsx(Typography, {
2276
- el: "div",
2277
- variant: "caption",
2278
- children: parseSOFDocumentDescription(sofT, document.description)
2279
- })]
2280
- })]
2281
- }), /* @__PURE__ */ jsx(IconButton, {
2282
- ariaLabel: commonT(($) => $["deleteDocument"]),
2283
- variant: "tertiary",
2284
- icon: "cross",
2285
- onClick: () => setDocToDelete(document),
2286
- testId: "source-of-funds-remove-button"
2287
- })]
2288
- }, document.id)),
2289
- /* @__PURE__ */ jsx("button", {
2290
- type: "button",
2291
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingFinancierGroup,
2292
- onClick: openUploadModal,
2293
- "data-testId": "source-of-funds-upload-button",
2294
- children: /* @__PURE__ */ jsxs("div", {
2295
- className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAvatarGroup,
2296
- children: [/* @__PURE__ */ jsx(Avatar, {
2297
- label: sofT(($) => $["addDocument"]),
2298
- iconName: "plus",
2299
- circle: true
2300
- }), /* @__PURE__ */ jsx(Typography, {
2301
- el: "div",
2302
- variant: "body-strongest",
2303
- children: sofT(($) => $["addDocument"])
2304
- })]
2305
- })
2306
- }),
2307
- handleNavigateToSummary && /* @__PURE__ */ jsx("div", {
2308
- className: SourceOfFunds_module_default.sourceOfFundsGettingStartedActions,
2309
- children: /* @__PURE__ */ jsx(Button, {
2310
- variant: "secondary",
2311
- onClick: handleNavigateToSummary,
2312
- children: documents?.length > 0 ? commonT(($) => $["finish"]) : commonT(($) => $["cancel"])
2313
- })
2314
- }),
2315
- !!docToDelete && /* @__PURE__ */ jsx(Confirm, {
2316
- title: sofT(($) => $["areYouSureYouWantToDeleteThisDocument"], { documentName: docToDelete?.fileName || "" }),
2317
- confirmText: commonT(($) => $["delete"]),
2318
- onConfirm: () => handleFileDelete(docToDelete?.id),
2319
- onCancel: () => setDocToDelete(void 0),
2320
- critical: true
2321
- }),
2322
- showUploadModal && /* @__PURE__ */ jsx(SOFUploadModal, {
2323
- documentUtils,
2324
- handleModalClose,
2325
- businessLines
2326
- })
2327
- ]
2328
- });
2329
- };
2330
- //#endregion
2331
- //#region src/utils/urlUtils.ts
2332
- function canParseUrl(url) {
2333
- if (URL.canParse) return URL.canParse(url);
2334
- try {
2335
- new URL(url);
2336
- return true;
2337
- } catch {
2338
- return false;
2339
- }
2340
- }
2341
- //#endregion
2342
- //#region src/components/EFP/tasks/SourceOfFundsDropin/validate.ts
2343
- var sourceOfFundsTypeValidations = {};
2344
- var HAS_PROTOCOL_REGEX = /^https?:\/\//i;
2345
- var sourceOfFundsAdditionalDataValidations = {
2346
- website: {
2347
- modes: ["blur"],
2348
- validate: (val) => !!val && canParseUrl(val),
2349
- errorMessage: (val) => {
2350
- if (val && !HAS_PROTOCOL_REGEX.test(val)) return "validationUrlMustStartWithHttpOrHttps";
2351
- return "validationPleaseEnterAValidUrl";
2352
- }
2353
- },
2354
- amount: {
2355
- modes: ["blur"],
2356
- validate: (amount) => amount?.value != null && !Number.isNaN(Number(amount.value)),
2357
- errorMessage: "pleaseEnterAValidAmount"
2358
- },
2359
- dateOfSourceEvent: {
2360
- modes: ["blur"],
2361
- validate: (dateOfSourceEvent) => validateDateNotInTheFuture(dateOfSourceEvent),
2362
- errorMessage: "dateCannotBeInTheFuture"
2363
- },
2364
- dateOfFundsReceived: {
2365
- modes: ["blur"],
2366
- validate: (dateOfFundsReceived) => validateDateNotInTheFuture(dateOfFundsReceived),
2367
- errorMessage: "dateCannotBeInTheFuture"
2368
- }
2369
- };
2370
- //#endregion
2371
- //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsDropin.tsx
2372
- var logger = createLogger();
2373
- var getValidationErrorMessage = (errors) => {
2374
- const validationErrorMessages = errors.flatMap(getValidationErrorDisplayMessages);
2375
- return validationErrorMessages.length ? validationErrorMessages.join("\n") : void 0;
2376
- };
2377
- function SourceOfFundsDropin({ country, problems, handleHomeClick, onSubmit, asAwe }) {
2378
- const { data: legalEntity, isLoading: isLoadingRootLegalEntity } = useLegalEntity(ROOT_LE);
2379
- const [loadingStatus, setLoadingStatus] = useState$1("success");
2380
- const [activeBusinessLine, setActiveBusinessLine] = useState$1();
2381
- const [activeSourceOfFund, setActiveSourceOfFund] = useState$1({
2382
- sourceOfFundsType: {},
2383
- additionalData: {}
2384
- });
2385
- const [allBusinessLines, setAllBusinessLines] = useState$1([]);
2386
- const [gettingStarted, setGettingStarted] = useState$1(true);
2387
- const [showUploadPage, setShowUploadPage] = useState$1(false);
2388
- const [loading, setLoading] = useState$1(false);
2389
- const [useSameAs, setUseSameAs] = useState$1(true);
2390
- const { baseUrl, rootLegalEntityId } = useApiContext();
2391
- const { t: sofT } = useTranslation("sof");
2392
- const userEvents = useAnalyticsContext();
2393
- const { showToast } = useToastContext();
2394
- const { data: sofBusinessLines, isLoading: isLoadingBusinessLines } = useBusinessLines(ALLOWED_SOF_SERVICES);
2395
- const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
2396
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
2397
- const { mutateAsync: updateSoFMutation } = useUpdateSourceOfFunds();
2398
- const form = useMultiForm({
2399
- requiredFields: getSourceOfFundsRequiredFields,
2400
- rules: {
2401
- sourceOfFundsType: sourceOfFundsTypeValidations,
2402
- additionalData: sourceOfFundsAdditionalDataValidations
2403
- },
2404
- defaultData: activeSourceOfFund
2405
- });
2406
- const { data = activeSourceOfFund, setFormData, setData, requiredFields, isValid, triggerValidation } = form;
2407
- const isSoFDocumentMissing = useMemo$1(() => legalEntity?.problems?.some((problem) => problem?.verificationErrors?.some((verificationError) => verificationError?.code === "2_8224")) ?? false, [legalEntity?.problems]);
2408
- const legalEntityResults = useLegalEntities(sofBusinessLines?.map((businessLine) => businessLine.sourceOfFunds?.originatorLegalEntityId).filter((id) => Boolean(id)) ?? [], { staleTime: 300 * 1e3 });
2409
- const areLegalEntitiesLoading = legalEntityResults.some((result) => result.isLoading);
2410
- const normalizedBusinessLines = useMemo$1(() => {
2411
- if (!sofBusinessLines) return null;
2412
- return sofBusinessLines.map((businessLine, index) => {
2413
- const result = legalEntityResults[index];
2414
- let updatedBusinessLine = { ...businessLine };
2415
- if (result && result.data) updatedBusinessLine = parseOriginatorDetails(result.data, updatedBusinessLine);
2416
- else if (result && result.isError) {
2417
- logger.error(`Error fetching legal entity for BL ${businessLine.id}:`, result.error);
2418
- showToast({
2419
- label: sofT(($) => $["unableToLoadRelatedEntity"]),
2420
- variant: "error"
2421
- });
2422
- }
2423
- if (updatedBusinessLine.sourceOfFunds?.adyenProcessedFunds) updatedBusinessLine.sourceOfFunds.type = "adyen";
2424
- return updatedBusinessLine;
2425
- });
2426
- }, [sofBusinessLines, JSON.stringify(legalEntityResults.map((r) => ({
2427
- data: r.data,
2428
- isError: r.isError,
2429
- error: r.error,
2430
- isLoading: r.isLoading
2431
- })))]);
2432
- useEffect$1(() => {
2433
- if (sofBusinessLines && !areLegalEntitiesLoading && normalizedBusinessLines) {
2434
- clearSofErrorMessage();
2435
- setLoading(true);
2436
- try {
2437
- if (normalizedBusinessLines.length) {
2438
- setAllBusinessLines((prev) => objectsDeepEqual(prev, normalizedBusinessLines) ? prev : normalizedBusinessLines);
2439
- if (!activeBusinessLine) {
2440
- const firstBusinessLine = normalizedBusinessLines[0];
2441
- if (firstBusinessLine) {
2442
- const mappedSof = mapSourceOfFundToSourceOfFundsSchema(firstBusinessLine);
2443
- setActiveBusinessLine(firstBusinessLine);
2444
- setActiveSourceOfFund(mappedSof);
2445
- if (mappedSof?.sourceOfFundsType) setFormData("sourceOfFundsType", mappedSof.sourceOfFundsType);
2446
- if (mappedSof?.additionalData) setFormData("additionalData", mappedSof.additionalData);
2447
- }
2448
- }
2449
- }
2450
- } catch (error) {
2451
- showToast({
2452
- label: sofT(($) => $["unableToLoadRelatedEntity"]),
2453
- variant: "error"
2454
- });
2455
- logger.error(error);
2456
- } finally {
2457
- setLoading(false);
2458
- }
2459
- }
2460
- }, [
2461
- sofBusinessLines,
2462
- areLegalEntitiesLoading,
2463
- normalizedBusinessLines,
2464
- activeBusinessLine,
2465
- sofT,
2466
- logger
2467
- ]);
2468
- /**
2469
- * Analytics
2470
- */
2471
- useTaskLandedEvent("SOURCE_OF_FUNDS");
2472
- useEffect$1(() => {
2473
- if (!gettingStarted && activeBusinessLine && allBusinessLines.length > 1) {
2474
- const applicableBusinessLines = getApplicableBusinessLines(allBusinessLines);
2475
- if (applicableBusinessLines.length > 1) {
2476
- if (applicableBusinessLines.every((bl) => bl.sourceOfFunds?.type)) {
2477
- const currentSoF = mapSourceOfFundToSourceOfFundsSchema(activeBusinessLine);
2478
- setUseSameAs(applicableBusinessLines.filter((bl) => bl.id !== activeBusinessLine.id).every((bl) => {
2479
- return areSourceOfFundsEqual(currentSoF, mapSourceOfFundToSourceOfFundsSchema(bl));
2480
- }));
2481
- }
2482
- }
2483
- }
2484
- }, [
2485
- gettingStarted,
2486
- activeBusinessLine,
2487
- allBusinessLines
2488
- ]);
2489
- const sourceOfFundsRequiredForms = useMemo$1(() => getSourceOfFundsRequiredForms(data?.sourceOfFundsType), [data?.sourceOfFundsType]);
2490
- const forms = useMemo$1(() => {
2491
- return addValidityToForms(getRequiredForms(sourceOfFundsRequiredForms, requiredFields, void 0, true), isValid, problems);
2492
- }, [
2493
- sourceOfFundsRequiredForms,
2494
- requiredFields,
2495
- isValid,
2496
- problems
2497
- ]);
2498
- const createOrUpdateOriginator = async (additionalData, prevAdditionalData) => {
2499
- let originatorLegalEntityId;
2500
- const sofOriginator = parseSofOriginatorPayload(additionalData);
2501
- if (additionalData?.originatorLegalEntityId && additionalData?.originatorType === prevAdditionalData?.originatorType) try {
2502
- sofOriginator.id = additionalData?.originatorLegalEntityId;
2503
- if (sofOriginator.type) delete sofOriginator.type;
2504
- originatorLegalEntityId = (await updateLegalEntity({
2505
- ...sofOriginator,
2506
- id: sofOriginator.id
2507
- }))?.id;
2508
- } catch (e) {
2509
- logger.log("Error updating originator legal entity", e);
2510
- }
2511
- else try {
2512
- originatorLegalEntityId = (await createLegalEntity(sofOriginator))?.id;
2513
- } catch (e) {
2514
- logger.log("Error creating originator legal entity", e);
2515
- }
2516
- return originatorLegalEntityId;
2517
- };
2518
- const handleSubmit = useCallback$1(async () => {
2519
- const sofData = { ...data };
2520
- const sofType = sofData?.sourceOfFundsType?.type;
2521
- if (!sofType || !activeBusinessLine?.id) return;
2522
- const eventsAdditionalData = {};
2523
- setLoadingStatus("loading");
2524
- const { additionalData } = sofData;
2525
- const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
2526
- if (sofType === "thirdPartyFunding") eventsAdditionalData.financiers = `${additionalData?.financiers?.length || 0} investor(s)`;
2527
- if (sofType === "donations" || sofType === "inheritance") eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
2528
- const targetBusinessLines = useSameAs ? getApplicableBusinessLines(allBusinessLines) : [activeBusinessLine];
2529
- const savePromises = targetBusinessLines.filter((bl) => bl.id).map(async (bl) => {
2530
- const payload = { ...sofPayload };
2531
- if (sofType === "donations" || sofType === "inheritance") try {
2532
- const blAdditionalData = mapSourceOfFundToSourceOfFundsSchema(bl)?.additionalData;
2533
- payload.originatorLegalEntityId = await createOrUpdateOriginator(useSameAs ? {
2534
- ...additionalData,
2535
- originatorLegalEntityId: blAdditionalData?.originatorLegalEntityId
2536
- } : getAdditionalDataForOriginator(additionalData, activeSourceOfFund?.additionalData, useSameAs), blAdditionalData);
2537
- } catch (e) {
2538
- logger.log("Error creating originator legal entity for business line", e);
2539
- throw e;
2540
- }
2541
- return updateSoFMutation({
2542
- ...payload,
2543
- businessLineId: bl.id
2544
- });
2545
- });
2546
- try {
2547
- const results = await Promise.allSettled(savePromises);
2548
- const failures = results.filter((r) => r.status === "rejected");
2549
- if (failures.length > 0) {
2550
- setSofErrorMessage(getValidationErrorMessage(failures.map((failure) => failure.reason)) ?? sofT(($) => $["errorUpdatingMultipleSourceOfFunds"], { count: failures.length }));
2551
- logger.error("Failed to update SoF for some business lines", failures);
2552
- }
2553
- const successes = results.filter((r) => r.status === "fulfilled");
2554
- if (successes.length > 0) {
2555
- userEvents.addTaskEvent("Success", {
2556
- actionType: "submit",
2557
- returnValue: sofType,
2558
- additionalData: {
2559
- ...eventsAdditionalData,
2560
- appliedToMultiple: useSameAs,
2561
- successCount: successes.length,
2562
- failureCount: failures.length,
2563
- businessLinesCount: allBusinessLines.length,
2564
- activeBusinessLineType: activeBusinessLine?.service,
2565
- activeBusinessLineCode: activeBusinessLine?.industryCode
2566
- }
2567
- });
2568
- setGettingStarted(true);
2569
- setShowUploadPage(false);
2570
- setActiveSourceOfFund({
2571
- sourceOfFundsType: {},
2572
- additionalData: {}
2573
- });
2574
- gotoFormByFormIndex(0);
2575
- setUseSameAs(true);
2576
- if (failures.length === 0) {
2577
- showToast({
2578
- label: sofT(($) => $["successAddedFundingSources"]),
2579
- variant: "success"
2580
- });
2581
- setSofErrorMessage("");
2582
- } else showToast({
2583
- label: sofT(($) => $["successAddedFundingSources"]),
2584
- variant: "success"
2585
- });
2586
- if (useSameAs) {
2587
- if (asAwe) onSubmit?.(data);
2588
- } else {
2589
- const applicableBusinessLines = getApplicableBusinessLines(allBusinessLines);
2590
- if (applicableBusinessLines.filter((bl) => {
2591
- return targetBusinessLines.some((target) => target.id === bl.id) || !isEmpty(bl.sourceOfFunds);
2592
- }).length === applicableBusinessLines.length) {
2593
- handleHomeClick?.();
2594
- if (asAwe) onSubmit?.(data);
2595
- }
2596
- }
2597
- } else setSofErrorMessage(getValidationErrorMessage(failures.map((failure) => failure.reason)) ?? sofT(($) => $["errorUpdatingSourceOfFunds"]));
2598
- } catch (e) {
2599
- setSofErrorMessage(getValidationErrorMessage([e]) ?? sofT(($) => $["errorUpdatingSourceOfFunds"]));
2600
- logger.log("Error updating source of funds", e);
2601
- }
2602
- setLoadingStatus("success");
2603
- }, [
2604
- data,
2605
- activeSourceOfFund,
2606
- activeBusinessLine,
2607
- allBusinessLines,
2608
- useSameAs,
2609
- updateSoFMutation,
2610
- createOrUpdateOriginator,
2611
- userEvents,
2612
- showToast,
2613
- sofT,
2614
- logger
2615
- ]);
2616
- const handleGettingStarted = useCallback$1(() => {
2617
- setGettingStarted(!gettingStarted);
2618
- }, [gettingStarted]);
2619
- const handleSourceOfFundsClick = (SoF, businessLine) => {
2620
- setActiveBusinessLine(businessLine);
2621
- setActiveSourceOfFund(SoF);
2622
- setGettingStarted(false);
2623
- setUseSameAs(false);
2624
- };
2625
- const sameAsOption = useMemo$1(() => {
2626
- if (!activeBusinessLine || !allBusinessLines.length) return;
2627
- if (getApplicableBusinessLines(allBusinessLines).length <= 1) return;
2628
- return {
2629
- businessLineId: "",
2630
- productName: sofT(($) => $["alwaysUseThisFundingSource"]),
2631
- sourceOfFunds: activeSourceOfFund
2632
- };
2633
- }, [
2634
- activeBusinessLine,
2635
- allBusinessLines,
2636
- activeSourceOfFund,
2637
- sofT
2638
- ]);
2639
- const setAdditionalDataFields = useCallback$1((additionalData) => {
2640
- if (!additionalData) return;
2641
- Object.keys(additionalData).forEach((key) => {
2642
- const fieldKey = key;
2643
- const value = additionalData[fieldKey];
2644
- if (value !== void 0) setData("additionalData", fieldKey, value);
2645
- });
2646
- }, [setData]);
2647
- const handleUseSameAsChange = useCallback$1((checked) => {
2648
- setUseSameAs(checked);
2649
- if (checked && sameAsOption) {
2650
- const { sourceOfFunds } = sameAsOption;
2651
- setActiveSourceOfFund(sourceOfFunds);
2652
- setFormData("sourceOfFundsType", sourceOfFunds.sourceOfFundsType);
2653
- setAdditionalDataFields(sourceOfFunds.additionalData);
2654
- } else if (!checked && activeBusinessLine) {
2655
- const currentSoF = mapSourceOfFundToSourceOfFundsSchema(activeBusinessLine);
2656
- setActiveSourceOfFund(currentSoF);
2657
- setFormData("sourceOfFundsType", currentSoF.sourceOfFundsType);
2658
- setAdditionalDataFields(currentSoF.additionalData);
2659
- }
2660
- }, [
2661
- sameAsOption,
2662
- activeBusinessLine,
2663
- setFormData,
2664
- setAdditionalDataFields
2665
- ]);
2666
- const { handleNextClick, activeForm, gotoFormByFormIndex, gotoFormByFormId, steps, handleBackClick } = useFormComposer({
2667
- problems,
2668
- forms,
2669
- onSubmit: handleSubmit,
2670
- triggerValidation
2671
- });
2672
- const documentUtils = documentApiUtils({
2673
- baseUrl: baseUrl.value,
2674
- rootLegalEntityId: rootLegalEntityId.value
2675
- });
2676
- const handleNavigateToSummary = async () => {
2677
- setShowUploadPage(false);
2678
- setGettingStarted(true);
2679
- };
2680
- const handleNavigateToUploadPage = () => {
2681
- setShowUploadPage(true);
2682
- };
2683
- return /* @__PURE__ */ jsx("div", {
2684
- className: asAwe ? SourceOfFunds_module_default.sourceOfFundsAwe : SourceOfFunds_module_default.sourceOfFunds,
2685
- children: loading || isLoadingRootLegalEntity || isLoadingBusinessLines || areLegalEntitiesLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
2686
- gettingStarted && !showUploadPage && legalEntity && /* @__PURE__ */ jsx(SourceOfFundsGettingStarted, {
2687
- asAwe,
2688
- handleCancelClick: handleHomeClick,
2689
- handleGettingStartedClick: handleGettingStarted,
2690
- businessLines: allBusinessLines,
2691
- problems: legalEntity?.problems,
2692
- handleSourceOfFundsClick,
2693
- handleNavigateToUploadPage,
2694
- legalEntity,
2695
- isSoFDocumentMissing
2696
- }),
2697
- showUploadPage && legalEntity && /* @__PURE__ */ jsx(SourceOfFundsUpload, {
2698
- businessLines: allBusinessLines,
2699
- documentUtils,
2700
- legalEntity,
2701
- handleNavigateToSummary
2702
- }),
2703
- !gettingStarted && !showUploadPage && /* @__PURE__ */ jsx(FormContextProvider, {
2704
- form,
2705
- children: /* @__PURE__ */ jsx(FormFlow, {
2706
- forms,
2707
- disableNextButton: !activeForm.isValid,
2708
- activeForm,
2709
- gotoFormByFormIndex,
2710
- gotoFormByFormId,
2711
- handleBackClick: steps.current === 0 ? handleGettingStarted : handleBackClick,
2712
- handleCancelClick: handleHomeClick,
2713
- handleNextClick,
2714
- loadingStatus,
2715
- currentStep: steps.current,
2716
- totalSteps: steps.total,
2717
- children: /* @__PURE__ */ jsx(SourceOfFunds, {
2718
- country,
2719
- activeForm,
2720
- activeBusinessLine,
2721
- sourceOfFundsType: data?.sourceOfFundsType?.type,
2722
- data: activeSourceOfFund,
2723
- sameAsOption,
2724
- useSameAs,
2725
- onUseSameAsChange: handleUseSameAsChange
2726
- })
2727
- })
2728
- })
2729
- ] })
2730
- });
2731
- }
2732
- //#endregion
2733
- //#region src/components/EFP/pages/SourceOfFundsPage.tsx
2734
- var SourceOfFundsPage = ({ onSubmit, handleHomeClick, asAwe }) => {
2735
- const { data: rootLe } = useLegalEntity(ROOT_LE);
2736
- const capabilityProblems = useCapabilityProblems();
2737
- const { i18n } = useTranslation();
2738
- addResourceBundles(i18n, [{
2739
- ns: "sof",
2740
- importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
2741
- "../tasks/SourceOfFundsDropin/language/bg-BG.json": () => import("./bg-BG-uuNDTOoN.js"),
2742
- "../tasks/SourceOfFundsDropin/language/cs-CZ.json": () => import("./cs-CZ-Cu1v5FA8.js"),
2743
- "../tasks/SourceOfFundsDropin/language/da-DK.json": () => import("./da-DK-DjAV5d9A.js"),
2744
- "../tasks/SourceOfFundsDropin/language/de-DE.json": () => import("./de-DE-B3sSNcDv.js"),
2745
- "../tasks/SourceOfFundsDropin/language/el-GR.json": () => import("./el-GR-DaAMIpOR.js"),
2746
- "../tasks/SourceOfFundsDropin/language/en-US.json": () => import("./en-US-D0fscfsz.js"),
2747
- "../tasks/SourceOfFundsDropin/language/es-ES.json": () => import("./es-ES-tVQDUTJN.js"),
2748
- "../tasks/SourceOfFundsDropin/language/es-LA.json": () => import("./es-LA-CG_cu1hM.js"),
2749
- "../tasks/SourceOfFundsDropin/language/et-EE.json": () => import("./et-EE-BCWBT8XN.js"),
2750
- "../tasks/SourceOfFundsDropin/language/fi-FI.json": () => import("./fi-FI-B-7uBAf5.js"),
2751
- "../tasks/SourceOfFundsDropin/language/fr-FR.json": () => import("./fr-FR-CDv300-8.js"),
2752
- "../tasks/SourceOfFundsDropin/language/hr-HR.json": () => import("./hr-HR-CXH5M5JZ.js"),
2753
- "../tasks/SourceOfFundsDropin/language/hu-HU.json": () => import("./hu-HU-D1ZZwcl0.js"),
2754
- "../tasks/SourceOfFundsDropin/language/it-IT.json": () => import("./it-IT-Cnk7j_gC.js"),
2755
- "../tasks/SourceOfFundsDropin/language/ja-JP.json": () => import("./ja-JP-DS8zN3mY.js"),
2756
- "../tasks/SourceOfFundsDropin/language/lt-LT.json": () => import("./lt-LT-D3ZUJfjr.js"),
2757
- "../tasks/SourceOfFundsDropin/language/lv-LV.json": () => import("./lv-LV-CXifQKfG.js"),
2758
- "../tasks/SourceOfFundsDropin/language/nl-NL.json": () => import("./nl-NL-Bv8Zk-6e.js"),
2759
- "../tasks/SourceOfFundsDropin/language/no-NO.json": () => import("./no-NO-Chwg5Roi.js"),
2760
- "../tasks/SourceOfFundsDropin/language/pl-PL.json": () => import("./pl-PL-DSbuyzBx.js"),
2761
- "../tasks/SourceOfFundsDropin/language/pt-BR.json": () => import("./pt-BR-B2q9Nl16.js"),
2762
- "../tasks/SourceOfFundsDropin/language/pt-PT.json": () => import("./pt-PT-CQQkh5PS.js"),
2763
- "../tasks/SourceOfFundsDropin/language/ro-RO.json": () => import("./ro-RO-_BLhsnIB.js"),
2764
- "../tasks/SourceOfFundsDropin/language/sk-SK.json": () => import("./sk-SK-BOc9IqyW.js"),
2765
- "../tasks/SourceOfFundsDropin/language/sl-SI.json": () => import("./sl-SI-BQc61Sz2.js"),
2766
- "../tasks/SourceOfFundsDropin/language/sv-SE.json": () => import("./sv-SE-DzsWB30f.js")
2767
- }), `../tasks/SourceOfFundsDropin/language/${lang}.json`, 5)
2768
- }]);
2769
- if (!rootLe) return /* @__PURE__ */ jsx(Loader, {});
2770
- const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, rootLe.id) : void 0;
2771
- return /* @__PURE__ */ jsx(SourceOfFundsDropin, {
2772
- legalEntityResponse: rootLe,
2773
- country: getLegalEntityCountry(rootLe),
2774
- problems,
2775
- asAwe,
2776
- onSubmit,
2777
- handleHomeClick
2778
- });
2779
- };
2780
- //#endregion
2781
- export { SourceOfFundsPage };