@adyen/kyc-components 4.11.0 → 4.12.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 (795) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-BEJjeSzA.js → AcceptTermsOfServiceComponent-f53Abc5G.js} +117 -118
  2. package/dist/{Accordion-CVe_Csc_.js → Accordion-DJ1F7dI4.js} +1 -1
  3. package/dist/{AccountSetupRejected-CVHaUWp3.js → AccountSetupRejected-_VNh1Xj4.js} +3 -3
  4. package/dist/{AdaptiveWorkflow-DsMAUbNd.js → AdaptiveWorkflow-B7y02pz6.js} +453 -246
  5. package/dist/AdaptiveWorkflowComponent-UbZbnGgf.js +130 -0
  6. package/dist/{Address-CQ5SqtvL.js → Address-D7m4o1lU.js} +13 -13
  7. package/dist/{Alert-DVrlbon8.js → Alert-CjZYipjN.js} +3 -3
  8. package/dist/{Avatar-DQ8C7Q0T.js → Avatar-4gshS6xA.js} +1 -1
  9. package/dist/{BusinessFinancingDropin-BrcioH39.js → BusinessFinancingDropin-CIbmp0UI.js} +76 -79
  10. package/dist/{BusinessFinancingPage-Do7yrfrZ.js → BusinessFinancingPage-dGW1ZbfP.js} +41 -41
  11. package/dist/{BusinessTypeSelectionPage-B83Mjk_j.js → BusinessTypeSelectionPage-Dy-T06MZ.js} +75 -75
  12. package/dist/{Button-BzRYS0KT.js → Button-BDEdGXnd.js} +1 -1
  13. package/dist/{Checkbox-DIJ8LD9x.js → Checkbox-BJJIXNHL.js} +2 -2
  14. package/dist/{CompanyRegistrationNumberTypeSelector-GI8NBkRy.js → CompanyRegistrationNumberTypeSelector-LMLF4xL4.js} +7 -7
  15. package/dist/{Confirm-CkWoZ8mk.js → Confirm-BqhBxIWm.js} +5 -5
  16. package/dist/{ConstitutionalDocument-8SGKN_5a.js → ConstitutionalDocument-B6yJ9w8L.js} +22 -159
  17. package/dist/{ContactDetails-BbLFTrom.js → ContactDetails-IyepRqya.js} +9 -9
  18. package/dist/{ContextGuidance-emoS5YBp.js → ContextGuidance-CxOv00_a.js} +3 -3
  19. package/dist/{CountryField-C_wlGotF.js → CountryField-B-JxQ6z9.js} +4 -4
  20. package/dist/{Currency-BOZeTnJ6.js → Currency-CXE0er4o.js} +5 -5
  21. package/dist/{CustomerSupport-CYqWA0VA.js → CustomerSupport-DeOs_mYl.js} +15 -15
  22. package/dist/{DebugModal-B3kEfq8Y.js → DebugModal-1mknkfVl.js} +13 -13
  23. package/dist/{DecisionMakerDetails-C7We7La7.js → DecisionMakerDetails-DElp9pZu.js} +18 -18
  24. package/dist/{DecisionMakerDetailsPage-C5eNkNiT.js → DecisionMakerDetailsPage-DK9myYrk.js} +9 -9
  25. package/dist/{DecisionMakers-CYPtxtn9.js → DecisionMakers-c0L12DVq.js} +35 -35
  26. package/dist/{Dropzone-C8XD1yx-.js → Dropzone-C_RxspA0.js} +6 -6
  27. package/dist/{EmbeddedStatus-BN7DRSv7.js → EmbeddedStatus-Ch7vvcve.js} +5 -5
  28. package/dist/{EndStateLayout-CdZgWzDl.js → EndStateLayout-DxdIVWL3.js} +2 -2
  29. package/dist/{EntityAssociation-DymjaEi1.js → EntityAssociation-inLOmBfG.js} +7 -7
  30. package/dist/{ErrorPanel-8Ek7q8Uj.js → ErrorPanel-5g1eTEVD.js} +3 -3
  31. package/dist/{Field-DrMftQlB.js → Field-BEqknhTe.js} +4 -4
  32. package/dist/{FormNavigation-ahCwHPnx.js → FormNavigation-Btkou5O7.js} +5 -5
  33. package/dist/{Header-DS7fzxw6.js → Header-B_MIsVov.js} +2 -2
  34. package/dist/{Image-Br4Dbqbg.js → Image-BPAtdM5Y.js} +1 -1
  35. package/dist/{IndividualDropin-CTey5bJS.js → IndividualDropin-Be_jevkY.js} +167 -168
  36. package/dist/{InputDate-98dUIg6b.js → InputDate-DsEAx7kx.js} +1 -1
  37. package/dist/{InputText-Bj1XCzw_.js → InputText-CadVntiC.js} +2 -2
  38. package/dist/{Introduction-B2LuGfRy.js → Introduction-DtL0bA4R.js} +105 -33
  39. package/dist/{InvitedDecisionMakerComponent-D1FhjEWM.js → InvitedDecisionMakerComponent-CeWhA1EV.js} +66 -66
  40. package/dist/{JpAddress-C7gBhtlO.js → JpAddress-aB1psW_4.js} +11 -11
  41. package/dist/{LandingLayout-CKVrtOQ_.js → LandingLayout-C9eryD6V.js} +2 -2
  42. package/dist/{LegalCompanyNameField-CFRF-PcG.js → LegalCompanyNameField-c_B4Hlte.js} +2 -2
  43. package/dist/{LegalRepresentativeDetailsPage-6_IG2aVA.js → LegalRepresentativeDetailsPage-IFU3Lahn.js} +7 -7
  44. package/dist/{Link--_cz0Y4C.js → Link-BoduD1oh.js} +1 -1
  45. package/dist/{ListItem-B26dxFqt.js → ListItem-ByYbZdGG.js} +2 -2
  46. package/dist/{LoaderWrapper-B-PH-UC1.js → LoaderWrapper-CRf5MAK1.js} +1 -1
  47. package/dist/{MaskedInput-NT8rTg72.js → MaskedInput-yF8Va2s-.js} +5 -5
  48. package/dist/{MaybeModal-DwAJTUH0.js → MaybeModal-DkRlF_Mg.js} +2 -2
  49. package/dist/{Modal-DOGT289C.js → Modal-DOC6JgPI.js} +3 -19
  50. package/dist/{Name-zfADWshI.js → Name-VckG8ggI.js} +7 -7
  51. package/dist/{NewSummary-DzFbj63n.js → NewSummary-BQHtEgHV.js} +7 -7
  52. package/dist/PayoutDetailsDropinMultiForm-cZjBC9Fs.js +4087 -0
  53. package/dist/{PayoutDetailsPage-Dm4iYJ4T.js → PayoutDetailsPage-BACA_b0Q.js} +32 -32
  54. package/dist/{RadioGroup-DmQXe2E8.js → RadioGroup-XuCtbRrH.js} +3 -3
  55. package/dist/{Review-BNPsjNzt.js → Review-BjMmCI8_.js} +9 -9
  56. package/dist/{RootBusinessDetailsPage-C635ITZ7.js → RootBusinessDetailsPage-CUTrYF3e.js} +31 -31
  57. package/dist/{RootBusinessLinesPage-Bvl6iJP1.js → RootBusinessLinesPage-CUWL0Y30.js} +64 -64
  58. package/dist/{RootIndividualDetailsPage-CrPTuG1p.js → RootIndividualDetailsPage-De7BivI-.js} +9 -9
  59. package/dist/{Select-FLb-oVGL.js → Select-CMFHti4N.js} +5 -5
  60. package/dist/{SignPCIComponent-BRIydKCU.js → SignPCIComponent-BdQ3JECB.js} +93 -93
  61. package/dist/{SingpassSelection-D2UT9ldr.js → SingpassSelection-BlhAPO0J.js} +70 -73
  62. package/dist/{SoleProprietorshipPage-CwbcCr8k.js → SoleProprietorshipPage-C3Dn-8uK.js} +31 -31
  63. package/dist/{SourceOfFundsDropin-CidVNGVf.js → SourceOfFundsPage-KlXCJuAm.js} +194 -140
  64. package/dist/{StackLayout-D0Kqs-Ti.js → StackLayout-BMQXXBDb.js} +2 -2
  65. package/dist/{StructuredList-BXi5p5iX.js → StructuredList-S4LIZQiJ.js} +2 -2
  66. package/dist/{Summary-BBIENfcc.js → Summary-_8R9bNbC.js} +9 -9
  67. package/dist/{TaskListItem-og3Plbg2.js → TaskListItem-BM3oukq_.js} +54 -12
  68. package/dist/{TaskVerificationStatus-Dyvkk7U1.js → TaskVerificationStatus-jBBIJN_A.js} +2 -2
  69. package/dist/{TaxInformationField-CH3dZVT6.js → TaxInformationField-DVQN8nKW.js} +30 -30
  70. package/dist/{TaxReportingDropin-D1-GFBOP.js → TaxReportingDropin-Cb8Yie_s.js} +30 -27
  71. package/dist/{TextArea-dUsyC5I6.js → TextArea-qzKHJyZG.js} +3 -3
  72. package/dist/{TileGroup-CrpxNdKy.js → TileGroup-COge4hw4.js} +3 -3
  73. package/dist/{ToastContextProvider-B_n1Z2wQ.js → ToastContextProvider-DmZQLSHH.js} +2 -2
  74. package/dist/{TrustDetailsPage-Due9f0I2.js → TrustDetailsPage-Ck7itTrP.js} +301 -988
  75. package/dist/TrustMemberCompanyPage-dPpZeZVN.js +107 -0
  76. package/dist/{TrustMemberIndividualPage-Dr8wWH7I.js → TrustMemberIndividualPage-DPkn_aYC.js} +32 -32
  77. package/dist/{TrustMemberRoleAndTypePage-CDQ_h9oo.js → TrustMemberRoleAndTypePage-BtcmKtkR.js} +57 -60
  78. package/dist/{TrustMembersOverview-CGNzyY0U.js → TrustMembersOverview-sPSvGI74.js} +42 -42
  79. package/dist/{UnincorporatedPartnershipIndividualPage-CN5tKGCV.js → UnincorporatedPartnershipIndividualPage-BCeNDKzv.js} +7 -7
  80. package/dist/{UnincorporatedPartnershipMemberCompanyPage-xEU6FBPH.js → UnincorporatedPartnershipMemberCompanyPage-B07On5_X.js} +32 -32
  81. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-B--8lFCG.js → UnincorporatedPartnershipMemberRoleAndTypePage-DOgq2QPn.js} +40 -40
  82. package/dist/{UnincorporatedPartnershipMembersOverview-DYYFa9_8.js → UnincorporatedPartnershipMembersOverview-MeqDhQz7.js} +39 -39
  83. package/dist/{VerificationErrorAlert-DkuNW_Y1.js → VerificationErrorAlert-x74LQ1wJ.js} +2 -2
  84. package/dist/adyen-business-financing.js +68 -68
  85. package/dist/adyen-individual-configuration.js +58 -58
  86. package/dist/adyen-individual-status.js +32 -32
  87. package/dist/adyen-invited-decision-maker.js +3 -3
  88. package/dist/adyen-onboarding.js +121 -129
  89. package/dist/adyen-terms-of-service-management.js +2 -2
  90. package/dist/adyen-terms-of-service-status.js +56 -56
  91. package/dist/adyen-transfer-instrument-configuration.js +81 -81
  92. package/dist/adyen-transfer-instrument-management.js +93 -94
  93. package/dist/adyen-verification-status.js +6 -6
  94. package/dist/{useUpdateBusinessLines-Bs9EqdRF.js → constants-BP_AS8q8.js} +6 -44
  95. package/dist/en-US-AkapGgCu.js +7 -0
  96. package/dist/en-US-BDZwHN0Y.js +7 -0
  97. package/dist/{en-US-CsKGkKSJ.js → en-US-BhctnSAK.js} +2 -1
  98. package/dist/{en-US-BXQCq6Dx.js → en-US-Cep-b_Ek.js} +10 -3
  99. package/dist/{formUtils-DcRJcDH1.js → formUtils-DERTAXyh.js} +1 -1
  100. package/dist/{getProblemsForEntity-3AC8yPPw.js → getProblemsForEntity-COcJt47f.js} +1 -1
  101. package/dist/{getProps-Bf3NN9L_.js → getProps-DQy_qV_x.js} +2 -29
  102. package/dist/{globalStore-KZhA597i.js → globalStore-D0yv1fc_.js} +1 -1
  103. package/dist/{http-Be_3lReE.js → http-CHTzpXCd.js} +1 -1
  104. package/dist/{invalidateRootLegalEntity-lDFSztuv.js → invalidateRootLegalEntity-BHyct4ev.js} +2 -2
  105. package/dist/{localizeDateString-UpJgrE0A.js → localizeDateString-B7EYBFnd.js} +1 -1
  106. package/dist/{mapExistingFile-wPP7dr95.js → mapExistingFile-BeFexL6Z.js} +2 -2
  107. package/dist/{mapLegalEntityToIndividualSchema-DNNLqSjU.js → mapLegalEntityToIndividualSchema-BMvlasSJ.js} +7 -7
  108. package/dist/{mapTransferInstrumentToPayoutAccount-AdSZDbW0.js → mapTransferInstrumentToPayoutAccount-DUrX63iT.js} +1 -1
  109. package/dist/{omitObscuredFieldsIfUnchanged-BPvAaBeX.js → omitObscuredFieldsIfUnchanged-DHj0MQUt.js} +1 -1
  110. package/dist/pdf-r5Zgu15b.js +22316 -0
  111. package/dist/pdf.worker.min-BOMsFOV0.js +74645 -0
  112. package/dist/{phonePrefixes-C3GgiDKK.js → phonePrefixes-D5cQh9fv.js} +1 -1
  113. package/dist/{process-field-configurations-C-D1aFsE.js → process-field-configurations-B8wJu-eM.js} +1 -1
  114. package/dist/{resolveEnvironment-BulU_Ftx.js → resolveEnvironment-VEpRzQin.js} +43 -43
  115. package/dist/style.css +1418 -712
  116. package/dist/{styles-9jxW7TiP.js → styles-BKzp-1_V.js} +1418 -712
  117. package/dist/{translation-prlgF4Yn.js → translation-Br5wIPO-.js} +67 -67
  118. package/dist/types/adaptiveWorkflow/AdaptiveWorkflow.d.ts +5 -3
  119. package/dist/types/adaptiveWorkflow/component-registry.d.ts +3 -5
  120. package/dist/types/adaptiveWorkflow/components/DynamicForm/DynamicForm.d.ts +1 -2
  121. package/dist/types/adaptiveWorkflow/components/DynamicForm/contextMap.d.ts +2 -0
  122. package/dist/types/adaptiveWorkflow/components/DynamicForm/useCustomerData.d.ts +25 -0
  123. package/dist/types/adaptiveWorkflow/components/Fields/AcceptTermsOfServiceWorkflow/AcceptTermsOfServiceWorkflow.d.ts +4 -1
  124. package/dist/types/adaptiveWorkflow/components/Fields/SourceOfFundsWorkflow/SourceOfFundsWorkflow.d.ts +6 -0
  125. package/dist/types/adaptiveWorkflow/components/Fields/TaxReportingWorkflow/TaxReportingWorkflow.d.ts +6 -0
  126. package/dist/types/adaptiveWorkflow/components/SpecializedComponent/SpecializedComponent.d.ts +4 -5
  127. package/dist/types/adaptiveWorkflow/components/WorkflowEndState/WorkflowEndState.d.ts +8 -0
  128. package/dist/types/adaptiveWorkflow/components/WorkflowHeading/WorkflowHeading.d.ts +6 -0
  129. package/dist/types/adaptiveWorkflow/components/types.d.ts +28 -2
  130. package/dist/types/adaptiveWorkflow/utils/utils.d.ts +20 -0
  131. package/dist/types/api/adaptive/adaptiveWorkflow.types.d.ts +31 -6
  132. package/dist/types/components/Apps/tasks/TaskList/TaskListGroup.d.ts +1 -1
  133. package/dist/types/components/Apps/tasks/TaskList/TaskListItem.d.ts +1 -1
  134. package/dist/types/components/BankAccount/forms/BankDocument/PdfPreview.d.ts +6 -0
  135. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +2 -2
  136. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +8 -7
  137. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +1 -1
  138. package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +1 -1
  139. package/dist/types/components/Business/hooks/useCompanySearchNextClickOverrides.d.ts +24 -0
  140. package/dist/types/components/Business/{utils → hooks}/usePrefetchCompanySearch.d.ts +3 -1
  141. package/dist/types/components/Business/hooks/useSubmitBusinessDetails.d.ts +27 -0
  142. package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +2 -0
  143. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +19 -4
  144. package/dist/types/components/Business/utils/getAvailableCompanyStructures.d.ts +3 -3
  145. package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +10 -10
  146. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +3 -3
  147. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +2 -1
  148. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsDropin.d.ts +1 -1
  149. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStarted.d.ts +2 -1
  150. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +1 -0
  151. package/dist/types/components/EFP/tasks/TaxReportingDropin/TaxReportingDropin.d.ts +1 -1
  152. package/dist/types/components/EFP/tasks/TaxReportingDropin/TaxReportingGettingStarted.d.ts +2 -1
  153. package/dist/types/components/EFP/tasks/TaxReportingDropin/types.d.ts +1 -0
  154. package/dist/types/components/EmbeddedDropins/AdaptiveWorkflowComponent/AdaptiveWorkflowComponent.d.ts +5 -1
  155. package/dist/types/components/Individual/forms/IdVerification/IdVerification.d.ts +1 -1
  156. package/dist/types/components/Individual/forms/InviteDetails/InviteDetails.d.ts +0 -1
  157. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakers.d.ts +1 -1
  158. package/dist/types/components/Shared/FormNavigation/FormNavigation.d.ts +1 -1
  159. package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
  160. package/dist/types/components/Shared/forms/Address/validate.d.ts +1 -1
  161. package/dist/types/components/Trust/forms/TrustRegistrationDetails/TrustRegistrationDetails.d.ts +2 -1
  162. package/dist/types/components/Trust/tasks/TrustDropin/{TrustMultiform.d.ts → Trust.d.ts} +2 -3
  163. package/dist/types/components/Trust/tasks/TrustDropin/TrustDropin.d.ts +1 -1
  164. package/dist/types/components/ui/atoms/Modal/Modal.d.ts +1 -9
  165. package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -1
  166. package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -1
  167. package/dist/types/components/ui/atoms/Typography/Typography.d.ts +1 -1
  168. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.d.ts +1 -1
  169. package/dist/types/context/ToggleContext/types.d.ts +0 -4
  170. package/dist/types/context/WorkflowContext/WorkflowContext.d.ts +13 -9
  171. package/dist/types/context/WorkflowContext/WorkflowContextProvider.d.ts +0 -3
  172. package/dist/types/core/EmbedShell/EmbedShell.d.ts +2 -1
  173. package/dist/types/embeds/onboarding-workflow/adyen-onboarding-workflow.d.ts +1 -1
  174. package/dist/types/embeds/onboarding-workflow/adyen-onboarding-workflow.types.d.ts +1 -0
  175. package/dist/types/hooks/formUtils.d.ts +31 -0
  176. package/dist/types/hooks/useTaskLandedEvent.d.ts +2 -1
  177. package/dist/types/router/routeConfig.d.ts +2 -4
  178. package/dist/types/utils/scrollToInvalidField.d.ts +1 -0
  179. package/dist/{types-CvTg7nL1.js → types-LOiahAxg.js} +1 -5
  180. package/dist/{useAccountHolder-Bs5S819-.js → useAccountHolder-BUQwFdWW.js} +2 -2
  181. package/dist/{useAllowedCountries-ivYuuRo7.js → useAllowedCountries-BIhbvxWx.js} +2 -2
  182. package/dist/{useAssociatedLegalEntity-TUBYTDLk.js → useAssociatedLegalEntity-CYu0lsaE.js} +2 -2
  183. package/dist/{useBusinessDetailsData-BsthpvcC.js → useBusinessDetailsData-DuaICgwl.js} +2374 -2291
  184. package/dist/{useBusinessLines-VC45Dhpr.js → useBusinessLines-BJV9biUj.js} +1 -1
  185. package/dist/{useCanSeeIntroduction-BKf6LCjv.js → useCanSeeIntroduction-Dj1tjCk3.js} +2 -2
  186. package/dist/{useCapabilities-CaMLYRY-.js → useCapabilities-DN0V0pML.js} +1 -1
  187. package/dist/{useCreateLegalEntity-4ndTqLg9.js → useCreateLegalEntity-C149Z7Xu.js} +1 -1
  188. package/dist/{useDataMissingRemediations-BBc3NnGs.js → useDataMissingRemediations-Ddj2bl69.js} +1 -1
  189. package/dist/{useDataset-C6zo70ax.js → useDataset-BRZZoPVn.js} +21 -21
  190. package/dist/{useDeleteTransferInstrument-De2Y_1kq.js → useDeleteTransferInstrument-CZM3f7yq.js} +3 -3
  191. package/dist/{useForm-Y7Z43OxR.js → useForm-D3oGxnhN.js} +2 -2
  192. package/dist/{useFormContext-WC19R9Fs.js → useFormContext-Bt0K_c_v.js} +72 -10
  193. package/dist/{useLegalEntity-13ebemMv.js → useLegalEntity-Dm6g0wmt.js} +1 -1
  194. package/dist/{useMultiForm-BsITYUOA.js → useMultiForm-BBawkDjy.js} +3 -13
  195. package/dist/{useNavigate-CwHKfTV4.js → useNavigate-zvBfNHhy.js} +31 -31
  196. package/dist/{useOnboardingStatus-lUidVEnt.js → useOnboardingStatus-CdLObhIM.js} +1 -1
  197. package/dist/{usePciQuestionnaireList-CKUdIUJj.js → usePciQuestionnaireList-OjYY3MK9.js} +1 -1
  198. package/dist/{useSalesChannels-7GPM3eBa.js → useSalesChannels-BDg8_NCC.js} +4 -4
  199. package/dist/{useScenarios-RhvLlxe7.js → useScenarios-Bb-EhIep.js} +1 -1
  200. package/dist/{useTaskLandedEvent-DRh2mwkT.js → useTaskLandedEvent-DCdJo64z.js} +7 -4
  201. package/dist/{useTaskStatus-BOkQTeZs.js → useTaskStatus-DzJWcN_l.js} +1 -1
  202. package/dist/{useTermsOfServiceStatus-BuExtoZt.js → useTermsOfServiceStatus-Dh4huPkR.js} +1 -1
  203. package/dist/{useTrustMembers-SErvsuYk.js → useTrustMembers-BP6ygpU4.js} +2 -2
  204. package/dist/{useUnincorporatedPartnershipMembers-BD6dxoRK.js → useUnincorporatedPartnershipMembers-D7U6aM_k.js} +2 -2
  205. package/dist/useUpdateBusinessLines-BUFe2lBW.js +68 -0
  206. package/dist/{useUpdateLegalEntity-BbTm3iuX.js → useUpdateLegalEntity-CUs6TYPF.js} +3 -3
  207. package/dist/{utils-Bo3y3VZb.js → utils-Cj9-IRaT.js} +4 -4
  208. package/dist/{utils-CKOQSJkq.js → utils-DGYoCUS5.js} +8 -8
  209. package/dist/{utils-DKG2-LG1.js → utils-eDM77TZ4.js} +2 -2
  210. package/dist/{validate-DgxcgLO8.js → validate-DTetUuT7.js} +7 -7
  211. package/dist/{validate-DeoMM6MG.js → validate-DlG5LXuM.js} +5 -5
  212. package/dist/{validationResult-DRX7pADt.js → validationResult-BC9WLYOC.js} +30 -10
  213. package/package.json +4 -6
  214. package/dist/AdaptiveWorkflowComponent-CxVnXhEN.js +0 -139
  215. package/dist/PayoutDetailsDropinMultiForm-DYEfV54V.js +0 -4007
  216. package/dist/SourceOfFundsPage-BvgpSZmr.js +0 -60
  217. package/dist/StepProgressIndicator-DScGlUmL.js +0 -80
  218. package/dist/TrustMemberCompanyPage-Bf4KF64Y.js +0 -107
  219. package/dist/en-US-Bzg_L5P-.js +0 -7
  220. package/dist/en-US-DiQxb3yX.js +0 -7
  221. package/dist/types/components/Business/utils/submit.d.ts +0 -2
  222. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +0 -42
  223. package/dist/types/components/Trust/forms/Trust/Trust.d.ts +0 -22
  224. package/dist/types/components/Trust/forms/TrustRegistrationDetails/TrustRegistrationDetailsMultiform.d.ts +0 -2
  225. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +0 -2
  226. package/dist/types/components/Trust/tasks/TrustDropin/mandatoryFields.d.ts +0 -3
  227. package/dist/types/context/StateContext/hasDataChanged.d.ts +0 -1
  228. package/dist/types/hooks/useForm/utils.d.ts +0 -13
  229. package/dist/types/hooks/useMultiForm/utils.d.ts +0 -2
  230. package/dist/useGlobalData-aRC4QM86.js +0 -35
  231. package/dist/useIndustryCodes-B5qgcw93.js +0 -32
  232. /package/dist/{4-people-SZab5bZC.js → 4-people-Dt-FR2z_.js} +0 -0
  233. /package/dist/{AD-WVUZQFGN.js → AD-5Egi3flE.js} +0 -0
  234. /package/dist/{AE-CmmQBvgj.js → AE-DJ-lRyPg.js} +0 -0
  235. /package/dist/{AI-uTi58bvD.js → AI-ZfbxJFtE.js} +0 -0
  236. /package/dist/{AL-CVo_-trU.js → AL-UBVZZlDX.js} +0 -0
  237. /package/dist/{AR-CCvtQ_f1.js → AR-B9C4Nibz.js} +0 -0
  238. /package/dist/{AS-_IDlt7BS.js → AS-CFb876zC.js} +0 -0
  239. /package/dist/{AT-D688gw0e.js → AT-C8MN2Fns.js} +0 -0
  240. /package/dist/{AT-DUHjluPX.js → AT-CJDibmrN.js} +0 -0
  241. /package/dist/{AT-CaGJWUCb.js → AT-Do46gW4G.js} +0 -0
  242. /package/dist/{AT--izmQDYv.js → AT-DsogulXO.js} +0 -0
  243. /package/dist/{AU-CkATGQY4.js → AU--MSKgcDY.js} +0 -0
  244. /package/dist/{AU-l144rfU6.js → AU-CDh6E7PE.js} +0 -0
  245. /package/dist/{AU-DMjkjlwK.js → AU-DNxKMzJs.js} +0 -0
  246. /package/dist/{AU-CIvYHL9t.js → AU-DfV_PeBe.js} +0 -0
  247. /package/dist/{AX-6M_KMkrl.js → AX-DxAmGTy-.js} +0 -0
  248. /package/dist/{AZ-6H7n0Vot.js → AZ-DRkABvzg.js} +0 -0
  249. /package/dist/{BA-JrIs2HUu.js → BA-xlw8xj7W.js} +0 -0
  250. /package/dist/{BE-n3sv16NG.js → BE-8eQ7Am1Y.js} +0 -0
  251. /package/dist/{BE-CXq5Hijp.js → BE-BGioJIMA.js} +0 -0
  252. /package/dist/{BE-B22YI8-M.js → BE-BQ4olBdk.js} +0 -0
  253. /package/dist/{BE-z-7Sfo_P.js → BE-yocZ_S-V.js} +0 -0
  254. /package/dist/{BG-R_i9sqhL.js → BG-AfIdXJGJ.js} +0 -0
  255. /package/dist/{BH-D76c--WG.js → BH-CKPBbT8v.js} +0 -0
  256. /package/dist/{BM-CzOd_jgX.js → BM-DMmpYJ5S.js} +0 -0
  257. /package/dist/{BR-Ci6zOZK0.js → BR-B8NzP1QV.js} +0 -0
  258. /package/dist/{BR-DO3biIN8.js → BR-CmwW2wlc.js} +0 -0
  259. /package/dist/{BR-HjgeKP2Y.js → BR-D2pNPrYB.js} +0 -0
  260. /package/dist/{BR-CizSSko_.js → BR-Iin-FtVm.js} +0 -0
  261. /package/dist/{BS-CWIW9E1I.js → BS-h2g8V4eH.js} +0 -0
  262. /package/dist/{BV-CENtZbPX.js → BV-Br568icW.js} +0 -0
  263. /package/dist/{BY-DE6URIDJ.js → BY-DNb6l2Rg.js} +0 -0
  264. /package/dist/{CA-QBkw5lM7.js → CA-BT05x8jm.js} +0 -0
  265. /package/dist/{CA-C9-1tjKv.js → CA-Cc0GuXLd.js} +0 -0
  266. /package/dist/{CA-CChcMfa3.js → CA-DBQywpjY.js} +0 -0
  267. /package/dist/{CA-BYlH-Cd1.js → CA-DJVSS-DB.js} +0 -0
  268. /package/dist/{CH-CgSJU0vr.js → CH-BL-4faPY.js} +0 -0
  269. /package/dist/{CH-DEA_49q5.js → CH-Bd1miMrE.js} +0 -0
  270. /package/dist/{CH-_09pZR7a.js → CH-C9Z3X6np.js} +0 -0
  271. /package/dist/{CH-D1b_T3Xj.js → CH-DFD2JLw3.js} +0 -0
  272. /package/dist/{CN-DZd-0WD-.js → CN-5HinUnnB.js} +0 -0
  273. /package/dist/{CR-BssOX9HQ.js → CR-PaLZQtHA.js} +0 -0
  274. /package/dist/{CY--oB04gqf.js → CY-B85njNYI.js} +0 -0
  275. /package/dist/{CZ-D0FZo_Ct.js → CZ-4dIb_N3l.js} +0 -0
  276. /package/dist/{CZ-CHK0Z9OG.js → CZ-BKdY5FmV.js} +0 -0
  277. /package/dist/{CZ-Ctr7PvZl.js → CZ-BbtlKoCl.js} +0 -0
  278. /package/dist/{CZ-CaYflVeT.js → CZ-Dxmb6KsV.js} +0 -0
  279. /package/dist/{Card-D6AEqxyX.js → Card-DXdUqwyQ.js} +0 -0
  280. /package/dist/{DE-ChxjP7Jt.js → DE--Q5XezyA.js} +0 -0
  281. /package/dist/{DE-Ck-DmtvR.js → DE-DCHis7y4.js} +0 -0
  282. /package/dist/{DE-2ZShDhp5.js → DE-DQc4ncaM.js} +0 -0
  283. /package/dist/{DE-GUJw6F8M.js → DE-DmEk0oIa.js} +0 -0
  284. /package/dist/{DK-f-ipVRkw.js → DK-BjD2emK5.js} +0 -0
  285. /package/dist/{DK-DftVLi7o.js → DK-Bt_PCcFy.js} +0 -0
  286. /package/dist/{DK-DgUbEjjo.js → DK-CdG4hfv7.js} +0 -0
  287. /package/dist/{DK-DLe5JZoQ.js → DK-DAzVnb1J.js} +0 -0
  288. /package/dist/{DO-KibicZ_i.js → DO-BF7Pa_tN.js} +0 -0
  289. /package/dist/{DetailViewLayout-Dd5YzmcW.js → DetailViewLayout-H4b1E5Ih.js} +0 -0
  290. /package/dist/{Divider-DMwncntz.js → Divider-DHTBXv3p.js} +0 -0
  291. /package/dist/{EC-BIA3xT4P.js → EC-D6uEW2wn.js} +0 -0
  292. /package/dist/{EE-Do8rjGQC.js → EE-W5m__hus.js} +0 -0
  293. /package/dist/{ES-BLdpNnVv.js → ES-BdmgiBzc.js} +0 -0
  294. /package/dist/{ES-C01idH9E.js → ES-BwwPYP5y.js} +0 -0
  295. /package/dist/{ES-Qz58bINs.js → ES-DjYy5Dao.js} +0 -0
  296. /package/dist/{ES-ATuj9pqz.js → ES-_cqCzBUa.js} +0 -0
  297. /package/dist/{FI-DxUO3jtP.js → FI-5ySk5gAz.js} +0 -0
  298. /package/dist/{FI-Cht59gDo.js → FI-DwaCO8nT.js} +0 -0
  299. /package/dist/{FI-CyQtfnFn.js → FI-VPvgt4LP.js} +0 -0
  300. /package/dist/{FI-CiIUJLui.js → FI-Z0tGRjwl.js} +0 -0
  301. /package/dist/{FJ-CBVo2_I6.js → FJ-CBPM7BcM.js} +0 -0
  302. /package/dist/{FO-BIoUiFwd.js → FO-CSvRPbA1.js} +0 -0
  303. /package/dist/{FR-B5ogQcu1.js → FR-B876n3-B.js} +0 -0
  304. /package/dist/{FR-DxBK3wUg.js → FR-CBB06Fnq.js} +0 -0
  305. /package/dist/{FR-COkIazU1.js → FR-RdDRKklk.js} +0 -0
  306. /package/dist/{FR-BjPZHZPQ.js → FR-bMNYTLCL.js} +0 -0
  307. /package/dist/{GB-z6rKPbLe.js → GB--UVnRIRj.js} +0 -0
  308. /package/dist/{GB-BooswQ-H.js → GB-Bxb4fPxG.js} +0 -0
  309. /package/dist/{GB-CdcQG5rZ.js → GB-FU65v6fQ.js} +0 -0
  310. /package/dist/{GB-CmZu5wq5.js → GB-IJ-Iz5qv.js} +0 -0
  311. /package/dist/{GE-BGSs35Sf.js → GE-xaMHflrU.js} +0 -0
  312. /package/dist/{GF-BJzm3wQV.js → GF-CrDxyG5C.js} +0 -0
  313. /package/dist/{GG-C_15AOT0.js → GG-DEqoBorh.js} +0 -0
  314. /package/dist/{GI-BkZV-xhg.js → GI-Turkle4q.js} +0 -0
  315. /package/dist/{GL-D0qJ5ckC.js → GL-BnDhUcrF.js} +0 -0
  316. /package/dist/{GP-IZt0QDME.js → GP-Dp65xTqP.js} +0 -0
  317. /package/dist/{GR-CIIoOs3h.js → GR-3L3XhlH2.js} +0 -0
  318. /package/dist/{GT-B27iNvqK.js → GT-BhKx5dln.js} +0 -0
  319. /package/dist/{GU-CD_UPKaw.js → GU-Bgc9EY1W.js} +0 -0
  320. /package/dist/{HK-DPk8wQqx.js → HK-BmygOotV.js} +0 -0
  321. /package/dist/{HK-bJDnnsWA.js → HK-DClfjKdQ.js} +0 -0
  322. /package/dist/{HK-JZ8b7cee.js → HK-DUMxc2EI.js} +0 -0
  323. /package/dist/{HK-WtGZzXpp.js → HK-kFldIGd7.js} +0 -0
  324. /package/dist/{HR-CyL9DdKh.js → HR-BZ1pGUfO.js} +0 -0
  325. /package/dist/{HR-BdkftjzZ.js → HR-BquBLtSA.js} +0 -0
  326. /package/dist/{HR-DofKdyxB.js → HR-C57WjbJ_.js} +0 -0
  327. /package/dist/{HR-BhiTkWNn.js → HR-CmnsEDnL.js} +0 -0
  328. /package/dist/{HU-DoqAQ9r5.js → HU-3HXta-l8.js} +0 -0
  329. /package/dist/{HU-BZor0itt.js → HU-BPcrEuPH.js} +0 -0
  330. /package/dist/{HU-CiP866xL.js → HU-CErZJI70.js} +0 -0
  331. /package/dist/{HU-DhA8hNro.js → HU-DnRWaWkm.js} +0 -0
  332. /package/dist/{ID-CedFDk8E.js → ID-BpqDcVc4.js} +0 -0
  333. /package/dist/{IE-CcYjOFFb.js → IE-CZOtplG-.js} +0 -0
  334. /package/dist/{IE-CAKRBjCy.js → IE-auhNSIUT.js} +0 -0
  335. /package/dist/{IE-BamokxGS.js → IE-dduN0_TO.js} +0 -0
  336. /package/dist/{IE-Cvj85oaC.js → IE-nHDHO00_.js} +0 -0
  337. /package/dist/{IL-LHVNpBje.js → IL-C0zsRw_j.js} +0 -0
  338. /package/dist/{IM-CIN-urLW.js → IM-DimZdCV2.js} +0 -0
  339. /package/dist/{IN-DuXkW59W.js → IN-drNlZVBZ.js} +0 -0
  340. /package/dist/{IS-KiOpP9sL.js → IS-BdfP-REC.js} +0 -0
  341. /package/dist/{IT-B5Ygeado.js → IT-BCxMd7Y7.js} +0 -0
  342. /package/dist/{IT-DPOzfiZM.js → IT-CNf1MrI-.js} +0 -0
  343. /package/dist/{IT-BkPo-hSM.js → IT-DF6ZO-i8.js} +0 -0
  344. /package/dist/{IT-B6SeJHEx.js → IT-Dc9lHBRw.js} +0 -0
  345. /package/dist/{JE-DdI5gLJX.js → JE-BBO3NuzB.js} +0 -0
  346. /package/dist/{JM-CAXfLnpx.js → JM-BzHoUe13.js} +0 -0
  347. /package/dist/{JO-CkrARQrR.js → JO-fffBmbX2.js} +0 -0
  348. /package/dist/{JP-CqmeLrIR.js → JP-Dv9kCG6P.js} +0 -0
  349. /package/dist/{KR-B2a1IWIw.js → KR-K1u4NuUE.js} +0 -0
  350. /package/dist/{KW-BlCv_eC5.js → KW-DBYFEC0m.js} +0 -0
  351. /package/dist/{KY-D30QIXuZ.js → KY-DvnPgYGT.js} +0 -0
  352. /package/dist/{KZ-DECEbXx0.js → KZ-DX8lqaut.js} +0 -0
  353. /package/dist/{LB-BBZwWsEK.js → LB-DuXl_nIj.js} +0 -0
  354. /package/dist/{LI-DfitHsa8.js → LI-BcYzGJ7k.js} +0 -0
  355. /package/dist/{LT-PXbI6yQj.js → LT-BYZkkL9O.js} +0 -0
  356. /package/dist/{LT-R8Sflwmd.js → LT-BfApaHFI.js} +0 -0
  357. /package/dist/{LT-auXw1to7.js → LT-ZF-q0fXm.js} +0 -0
  358. /package/dist/{LT-B8p4FzE_.js → LT-rnUOqZje.js} +0 -0
  359. /package/dist/{LU-BcXbp3o9.js → LU-xxaAcEvQ.js} +0 -0
  360. /package/dist/{LV-BoUUdgsK.js → LV-BdlQTl8C.js} +0 -0
  361. /package/dist/{MC-BYYwazPi.js → MC-CaqkAF9O.js} +0 -0
  362. /package/dist/{MD-ffljHsPf.js → MD-DPht_MRT.js} +0 -0
  363. /package/dist/{ME-CFB8FbcU.js → ME-Dc5I5KtD.js} +0 -0
  364. /package/dist/{MK-r-PADVK9.js → MK-Bn1G050Q.js} +0 -0
  365. /package/dist/{MP-76Kv--as.js → MP-WG5-be9t.js} +0 -0
  366. /package/dist/{MQ-CtxwW8jT.js → MQ-BX_woiN5.js} +0 -0
  367. /package/dist/{MR-DwI7VR0A.js → MR-B4o-Woej.js} +0 -0
  368. /package/dist/{MT-B819Sykn.js → MT-BitdMyNy.js} +0 -0
  369. /package/dist/{MU-DBxbxtCc.js → MU-5mV1nkVk.js} +0 -0
  370. /package/dist/{MX-CpfL1ST0.js → MX-BV0FI9pL.js} +0 -0
  371. /package/dist/{MY-CjgB7eRq.js → MY-BovUrLi6.js} +0 -0
  372. /package/dist/{NC-D5OXrDk6.js → NC--rMtvPxR.js} +0 -0
  373. /package/dist/{NL-2TORU5Af.js → NL-BA3EKW3x.js} +0 -0
  374. /package/dist/{NL-BPLPc70N.js → NL-D3keMKVJ.js} +0 -0
  375. /package/dist/{NL-DxDWAhWb.js → NL-DpEm6S8e.js} +0 -0
  376. /package/dist/{NL-DNmHt9E9.js → NL-Dt1MHEvX.js} +0 -0
  377. /package/dist/{NO-8Z5IuJyy.js → NO-BRw0ivbK.js} +0 -0
  378. /package/dist/{NO-83fYOKf1.js → NO-Dst-DnZ8.js} +0 -0
  379. /package/dist/{NO-DRwj8iE-.js → NO-VE7Sc2IM.js} +0 -0
  380. /package/dist/{NO-C-MO_Pzc.js → NO-ltxTSAKY.js} +0 -0
  381. /package/dist/{NZ-DIvIJ24x.js → NZ-CJ_5Z1en.js} +0 -0
  382. /package/dist/{NZ-Crh2TDD4.js → NZ-SQBwX6Hq.js} +0 -0
  383. /package/dist/{PE-DxCfusfF.js → PE-CcE7NUNY.js} +0 -0
  384. /package/dist/{PF-DddITsRG.js → PF-CTHFNBfG.js} +0 -0
  385. /package/dist/{PH-DHR3AJOX.js → PH-BJvKdyQF.js} +0 -0
  386. /package/dist/{PK-uR-uI9XE.js → PK-CmxTai7F.js} +0 -0
  387. /package/dist/{PL-WK3I4A_l.js → PL-BK2Asw5F.js} +0 -0
  388. /package/dist/{PL-4X3KQ-6D.js → PL-BT907618.js} +0 -0
  389. /package/dist/{PL-DapArnb4.js → PL-Byz7Yqkt.js} +0 -0
  390. /package/dist/{PL-C3zSuiJj.js → PL-Cgkoario.js} +0 -0
  391. /package/dist/{PM-J_ye5Ns4.js → PM-CPOzzt0L.js} +0 -0
  392. /package/dist/{PR-Dnb-cufj.js → PR-squ319V4.js} +0 -0
  393. /package/dist/{PS-gVtrdKlM.js → PS-CspEbZTU.js} +0 -0
  394. /package/dist/{PT-BKvtalBK.js → PT-CT-kaH57.js} +0 -0
  395. /package/dist/{PT-Dfmlsck3.js → PT-CiRGWIB7.js} +0 -0
  396. /package/dist/{PT-NogRnYEa.js → PT-DAsEx6OE.js} +0 -0
  397. /package/dist/{PT-Dwz7SxGO.js → PT-LXjJtHn5.js} +0 -0
  398. /package/dist/{QA-l89UOki6.js → QA-DaZHmHWd.js} +0 -0
  399. /package/dist/{RE-DGehC_Af.js → RE-BFKWl5y_.js} +0 -0
  400. /package/dist/{RO-CKCsSkd5.js → RO-3wOpNneM.js} +0 -0
  401. /package/dist/{RO-CpjtMo_k.js → RO-Bb4UTT5B.js} +0 -0
  402. /package/dist/{RO-OKJvigIq.js → RO-BcDEEGjk.js} +0 -0
  403. /package/dist/{RO-DkgLRWEb.js → RO-CRDVNzfL.js} +0 -0
  404. /package/dist/{RS-DKDvipdg.js → RS-DOGs6suo.js} +0 -0
  405. /package/dist/{RU-B1X18ahq.js → RU-wf84MwTX.js} +0 -0
  406. /package/dist/{SA-D1szLXPX.js → SA-B1u_XGB9.js} +0 -0
  407. /package/dist/{SE-DbcboNHi.js → SE-2WATmHl2.js} +0 -0
  408. /package/dist/{SE-CtVyokVw.js → SE-B48cKLIu.js} +0 -0
  409. /package/dist/{SE-D4LKsuFB.js → SE-DTxNlT0w.js} +0 -0
  410. /package/dist/{SE-D0vGgleX.js → SE-Dv7OpBmo.js} +0 -0
  411. /package/dist/{SG-C8BbIoCG.js → SG-A2_cs4kd.js} +0 -0
  412. /package/dist/{SG-DvQjHCSy.js → SG-BZ-kyKVN.js} +0 -0
  413. /package/dist/{SG-DaVnm41r.js → SG-CdsmZcfV.js} +0 -0
  414. /package/dist/{SG-kV7pRclk.js → SG-pPmF2os4.js} +0 -0
  415. /package/dist/{SI-B9Tc2pAp.js → SI-BVTXwA8C.js} +0 -0
  416. /package/dist/{SI-35TJRSLU.js → SI-DjUddZcZ.js} +0 -0
  417. /package/dist/{SI-DQnIQGQL.js → SI-DrX769GG.js} +0 -0
  418. /package/dist/{SI-n9JwQc2Y.js → SI-T8ly14Dn.js} +0 -0
  419. /package/dist/{SJ-jUXC80-A.js → SJ-DO3zbL0P.js} +0 -0
  420. /package/dist/{SK-DufDExXE.js → SK-BFZnw1-d.js} +0 -0
  421. /package/dist/{SK-Tx91S2c3.js → SK-Dq7sWtiL.js} +0 -0
  422. /package/dist/{SK-UaSiWIy5.js → SK-DzGTyI5h.js} +0 -0
  423. /package/dist/{SK-BiNcDKkp.js → SK-vJT5Dj16.js} +0 -0
  424. /package/dist/{SM-BHAjIeix.js → SM-B4SkkvKD.js} +0 -0
  425. /package/dist/{TF-xxFWMPr1.js → TF-CIVHsoB9.js} +0 -0
  426. /package/dist/{TH-BHQhWh6e.js → TH-8huuj2v6.js} +0 -0
  427. /package/dist/{TL--xOT2kon.js → TL-Bik3Eb-u.js} +0 -0
  428. /package/dist/{TN-D8nIYpxU.js → TN-ClhiegdZ.js} +0 -0
  429. /package/dist/{TR-DE0yFKwk.js → TR-xyusRa6k.js} +0 -0
  430. /package/dist/{TT-D-Xuk3av.js → TT-BsT9h8j3.js} +0 -0
  431. /package/dist/{TW-BXy6fmM-.js → TW-Id3ypKK8.js} +0 -0
  432. /package/dist/{UA-DuesOnZ3.js → UA-r0ZVcqym.js} +0 -0
  433. /package/dist/{US-DACtvfkT.js → US-BKXr0nm-.js} +0 -0
  434. /package/dist/{US-Dqdls6XH.js → US-C0BIY_Iy.js} +0 -0
  435. /package/dist/{US-XXbY7ED9.js → US-Df7pLIkq.js} +0 -0
  436. /package/dist/{US-lf3_wi4x.js → US-_mFv0V8m.js} +0 -0
  437. /package/dist/{UY-ooDvgOCp.js → UY-BDWpl5Q2.js} +0 -0
  438. /package/dist/{VA-BtG4dklK.js → VA-CJnCCD0R.js} +0 -0
  439. /package/dist/{VG-jkoggSAn.js → VG-CODm52zD.js} +0 -0
  440. /package/dist/{VI-CNcP7lBR.js → VI-B52L6yXT.js} +0 -0
  441. /package/dist/{VN-BfNmrGIx.js → VN-BsJ-vqrs.js} +0 -0
  442. /package/dist/{WF-CpPrQMR1.js → WF-lhRl1Vg9.js} +0 -0
  443. /package/dist/{YT-Cv6GDgqv.js → YT-CmziyGNY.js} +0 -0
  444. /package/dist/{ZA-BF5MYrTa.js → ZA-CQNS6dil.js} +0 -0
  445. /package/dist/{accountHolderUtils-DvIn173h.js → accountHolderUtils-AnlUAp6W.js} +0 -0
  446. /package/dist/{arrow-right-D1P_ACmM.js → arrow-right-BX_EVrJJ.js} +0 -0
  447. /package/dist/{bag-eBOozKX6.js → bag-CndvM5sq.js} +0 -0
  448. /package/dist/{bank-_5sLLQIa.js → bank-BGTRk0kq.js} +0 -0
  449. /package/dist/{bg-BG-CfgXLc6o.js → bg-BG-BNqOiDw9.js} +0 -0
  450. /package/dist/{bg-BG-VvEYVyMn.js → bg-BG-C12I_ehJ.js} +0 -0
  451. /package/dist/{bg-BG-Bfk35aUM.js → bg-BG-Cxa0jcnA.js} +0 -0
  452. /package/dist/{bg-BG-DsN4eba6.js → bg-BG-D3gXF-6w2.js} +0 -0
  453. /package/dist/{bg-BG-Dzjmm-EI.js → bg-BG-IjNKw0Zu.js} +0 -0
  454. /package/dist/{bg-BG-BWBO9u4H.js → bg-BG-NwL6SZRu.js} +0 -0
  455. /package/dist/{bg-BG-lciXH4gN.js → bg-BG-QlxmGEZL.js} +0 -0
  456. /package/dist/{bg-BG-BsrzL-U8.js → bg-BG-RNEFZxOh.js} +0 -0
  457. /package/dist/{bg-BG-4Ws0xyl1.js → bg-BG-YZ34LkMd.js} +0 -0
  458. /package/dist/{bg-BG-C0FkvcA2.js → bg-BG-mf-xq3ph.js} +0 -0
  459. /package/dist/{bin-B6qVgmU-.js → bin-ClI1Lmer.js} +0 -0
  460. /package/dist/{business-lines-DY5WHePf.js → business-lines-hXwJAfy8.js} +0 -0
  461. /package/dist/{capital-CjnmOh10.js → capital-CvyQlkxY.js} +0 -0
  462. /package/dist/{cash-stack-DeYanKdE.js → cash-stack-Dh8uZSza.js} +0 -0
  463. /package/dist/{certificate-BClMRSy8.js → certificate-BNwGY179.js} +0 -0
  464. /package/dist/{checkmark-circle-D9r5L0tU.js → checkmark-circle-B0j0Vtwo.js} +0 -0
  465. /package/dist/{checkmark-circle-fill-ytXXg_Aq.js → checkmark-circle-fill-LpAoa38W.js} +0 -0
  466. /package/dist/{checkmark-DKEwGZpb.js → checkmark-hciVXXIH.js} +0 -0
  467. /package/dist/{checkmark-small-DFWByGEe.js → checkmark-small-CBLKuuZ1.js} +0 -0
  468. /package/dist/{chevron-down-mSZQHCYH.js → chevron-down-aTrA5UpL.js} +0 -0
  469. /package/dist/{chevron-left-Ed6YO1io.js → chevron-left-BVdVNPiJ.js} +0 -0
  470. /package/dist/{chevron-right-QUEoSVq0.js → chevron-right-Drp9nZ4h.js} +0 -0
  471. /package/dist/{chevron-up-C2qRbRXm.js → chevron-up-BG9Ldgsu.js} +0 -0
  472. /package/dist/{circle-CWHpyKaz.js → circle-C-iPmuCY.js} +0 -0
  473. /package/dist/{circle-small-filled-D-62qVQL.js → circle-small-filled-C-Nh6xHY.js} +0 -0
  474. /package/dist/{clock-BcuKmme_.js → clock-CpMm35NB.js} +0 -0
  475. /package/dist/{coins-DwxrW75e.js → coins-D2tNyEW3.js} +0 -0
  476. /package/dist/{company-types-value-B-1b0hXg.js → company-types-value-B-nraMaa.js} +0 -0
  477. /package/dist/{contract-C7y_6_2w.js → contract-Cg3T6neC.js} +0 -0
  478. /package/dist/{cross-BCsyGXyH.js → cross-DLi9h_Eg.js} +0 -0
  479. /package/dist/{cross-circle-fill-CmkV2Ldv.js → cross-circle-fill-dRHPWc-i.js} +0 -0
  480. /package/dist/{cross-circle-fill-small-BKu-0QqK.js → cross-circle-fill-small-WqgBPXhH.js} +0 -0
  481. /package/dist/{cs-CZ-Ehe0unzR.js → cs-CZ-B6AZX4nL.js} +0 -0
  482. /package/dist/{cs-CZ-LYmEu3vs.js → cs-CZ-BObx8NMb.js} +0 -0
  483. /package/dist/{cs-CZ-8tfmIGdb.js → cs-CZ-BZkot6xs.js} +0 -0
  484. /package/dist/{cs-CZ-3vdI5Jjr.js → cs-CZ-B_nYIuIi.js} +0 -0
  485. /package/dist/{cs-CZ-D5UA_5sV.js → cs-CZ-Bl8qBkx4.js} +0 -0
  486. /package/dist/{cs-CZ-DK8e6VII.js → cs-CZ-C7QmQ2LT2.js} +0 -0
  487. /package/dist/{cs-CZ-D08FCyDx.js → cs-CZ-CWM5oj6Q.js} +0 -0
  488. /package/dist/{cs-CZ-DUa7NHz0.js → cs-CZ-DNvBXQqI.js} +0 -0
  489. /package/dist/{cs-CZ-BWwYdy4S.js → cs-CZ-MU9Ub24D.js} +0 -0
  490. /package/dist/{cs-CZ-Cst79fiX.js → cs-CZ-TiWySd9u.js} +0 -0
  491. /package/dist/{da-DK-BwIZqzDw.js → da-DK-8DN_uCKw.js} +0 -0
  492. /package/dist/{da-DK-XAN_0H3U.js → da-DK-B8aHvZ1W.js} +0 -0
  493. /package/dist/{da-DK-BzUHXaHj.js → da-DK-BDachfZH.js} +0 -0
  494. /package/dist/{da-DK-CyKJ5V55.js → da-DK-BOU9aCaN.js} +0 -0
  495. /package/dist/{da-DK-BVGjdR9Y.js → da-DK-Bc6oX5Ct.js} +0 -0
  496. /package/dist/{da-DK-CrBk2y5x.js → da-DK-CBt4gQjw.js} +0 -0
  497. /package/dist/{da-DK-BCPtwA_c.js → da-DK-Cx-Ux0WK.js} +0 -0
  498. /package/dist/{da-DK-DD9yhCxP.js → da-DK-DAHcK0Md2.js} +0 -0
  499. /package/dist/{da-DK-Ch20pi9X.js → da-DK-DtPE4OIu.js} +0 -0
  500. /package/dist/{da-DK-Bo7rgdxn.js → da-DK-LXurZBZ8.js} +0 -0
  501. /package/dist/{de-DE-BSS7qafT.js → de-DE-B8D6bV3u.js} +0 -0
  502. /package/dist/{de-DE-CfuejIRq.js → de-DE-C7Au1j2A.js} +0 -0
  503. /package/dist/{de-DE-CT_V7-S9.js → de-DE-CKOOKYoC.js} +0 -0
  504. /package/dist/{de-DE-B_L7jawo.js → de-DE-Cbpj1g3M.js} +0 -0
  505. /package/dist/{de-DE--_4U_ibd.js → de-DE-CnB43wjo.js} +0 -0
  506. /package/dist/{de-DE-XXqDUm1h.js → de-DE-D8Is4iJk.js} +0 -0
  507. /package/dist/{de-DE-Ulu5J-lb.js → de-DE-DUlvIvvj2.js} +0 -0
  508. /package/dist/{de-DE-ByeX65ZI.js → de-DE-DstHFxVG.js} +0 -0
  509. /package/dist/{de-DE-whfzjviM.js → de-DE-JZBqb8ce.js} +0 -0
  510. /package/dist/{de-DE-oRof64Lg.js → de-DE-apC2os2u.js} +0 -0
  511. /package/dist/{de-DE-Bw6SLIlH.js → de-DE-cPL-uSMG.js} +0 -0
  512. /package/dist/{document-1-CevwIxLZ.js → document-1-CSg2AOQy.js} +0 -0
  513. /package/dist/{document-blurred-CHUm0UxU.js → document-blurred-DHgG-aQ6.js} +0 -0
  514. /package/dist/{document-cut-off-Dq0YTHmW.js → document-cut-off-DCf-G-0l.js} +0 -0
  515. /package/dist/{document-expired-CbfOuCGk.js → document-expired-UJMQKi88.js} +0 -0
  516. /package/dist/{document-front-CKpjhxOQ.js → document-front-DLpxfBfu.js} +0 -0
  517. /package/dist/{document-person-DNzQ9WWk.js → document-person-BhXXvTMH.js} +0 -0
  518. /package/dist/{download-aeBfmwlw.js → download-Cvkkn96A.js} +0 -0
  519. /package/dist/{edit-1-2IiLCdya.js → edit-1-CIdEs1t-.js} +0 -0
  520. /package/dist/{el-GR-C2BRciAa.js → el-GR-BDXwftjw.js} +0 -0
  521. /package/dist/{el-GR-BQsZOz2Q.js → el-GR-BRFvZNGC.js} +0 -0
  522. /package/dist/{el-GR-BP7G1Ka8.js → el-GR-BZ9AJNm4.js} +0 -0
  523. /package/dist/{el-GR-Ckyn8zWb.js → el-GR-C8jFvyDg.js} +0 -0
  524. /package/dist/{el-GR-Cgm9_WcN.js → el-GR-CiverXpL.js} +0 -0
  525. /package/dist/{el-GR-3u6kc4gj.js → el-GR-CoPH23Qe.js} +0 -0
  526. /package/dist/{el-GR-CSQXiOLU.js → el-GR-DJJbbbY3.js} +0 -0
  527. /package/dist/{el-GR-DG5MC4IO.js → el-GR-DfW8zYK4.js} +0 -0
  528. /package/dist/{el-GR-Ctd3mBAX.js → el-GR-Dw8xMzqe.js} +0 -0
  529. /package/dist/{el-GR-DqWGnp6D.js → el-GR-hquqlbpg2.js} +0 -0
  530. /package/dist/{el-GR-CwYsLawW.js → el-GR-mGnv3b-O.js} +0 -0
  531. /package/dist/{en-US-FwJ_Q0LM.js → en-US-BLuFDCyp2.js} +0 -0
  532. /package/dist/{en-US-BprfSc6O.js → en-US-C0SrG99u.js} +0 -0
  533. /package/dist/{en-US-BeYvTQs8.js → en-US-CDb7bSvb.js} +0 -0
  534. /package/dist/{en-US-D2QI7ZZl.js → en-US-CO9Ct3Xx.js} +0 -0
  535. /package/dist/{en-US-BpTQShmo.js → en-US-CUsu9qhV.js} +0 -0
  536. /package/dist/{en-US-CF2zMGoL.js → en-US-Cd8cLmVX.js} +0 -0
  537. /package/dist/{en-US-CHwHVGtU.js → en-US-CuX4Fzoo.js} +0 -0
  538. /package/dist/{en-US-BpCm0Bvk.js → en-US-D1-68ZWE.js} +0 -0
  539. /package/dist/{en-US-ENc60t-7.js → en-US-DrAjiabh.js} +0 -0
  540. /package/dist/{en-US-CpaYVJ3n.js → en-US-NaoNaTO0.js} +0 -0
  541. /package/dist/{en-US-Ds9mdZnG.js → en-US-RmklpZAK.js} +0 -0
  542. /package/dist/{en-US-CyNO4rDF.js → en-US-_D_BTN1a.js} +0 -0
  543. /package/dist/{en-US-cv6wAArf.js → en-US-_l9425V1.js} +0 -0
  544. /package/dist/{en-US-BlXq5Hye.js → en-US-aJtjsYKh.js} +0 -0
  545. /package/dist/{en-US.instructions-DANHBwge.js → en-US.instructions-DlxMDbRu.js} +0 -0
  546. /package/dist/{es-ES-K4O2-Y91.js → es-ES-0O9y1_Bc.js} +0 -0
  547. /package/dist/{es-ES-BQyI--wB.js → es-ES-B2MIlPdM.js} +0 -0
  548. /package/dist/{es-ES-Gxba5fax.js → es-ES-BAAL2h3R.js} +0 -0
  549. /package/dist/{es-ES-2XNgtrbZ.js → es-ES-Bwhnseeu.js} +0 -0
  550. /package/dist/{es-ES-Cn6TsINc.js → es-ES-C19HaQVX.js} +0 -0
  551. /package/dist/{es-ES-Ch032BPu.js → es-ES-D67pkLVu.js} +0 -0
  552. /package/dist/{es-ES-CB4LW8fA.js → es-ES-D7pe0Z8H.js} +0 -0
  553. /package/dist/{es-ES-C47c_t2z.js → es-ES-DFg_LlqD.js} +0 -0
  554. /package/dist/{es-ES-C60W4QNU.js → es-ES-DnmrjEd02.js} +0 -0
  555. /package/dist/{es-ES-Bqi97ziw.js → es-ES-FQbC3B0S.js} +0 -0
  556. /package/dist/{es-ES-CgWS-r3B.js → es-ES-mdSA-CIT.js} +0 -0
  557. /package/dist/{et-EE-BOLFKKEp.js → et-EE-30-8FeA2.js} +0 -0
  558. /package/dist/{et-EE-D7E_LPZE.js → et-EE-B4ZMHksf.js} +0 -0
  559. /package/dist/{et-EE-57nHRjse.js → et-EE-C4U93xrJ.js} +0 -0
  560. /package/dist/{et-EE-D8EAo5UR.js → et-EE-CPdaJJkL.js} +0 -0
  561. /package/dist/{et-EE-uWuDUEX9.js → et-EE-DJWVyTVM.js} +0 -0
  562. /package/dist/{et-EE-bcmKXv7f.js → et-EE-DXoF-AJ72.js} +0 -0
  563. /package/dist/{et-EE-C2Rd3g4-.js → et-EE-Dg93VJbx.js} +0 -0
  564. /package/dist/{et-EE-B4ByVJ-m.js → et-EE-DrQLDWH2.js} +0 -0
  565. /package/dist/{et-EE-CPykMmP6.js → et-EE-Dszx65le2.js} +0 -0
  566. /package/dist/{et-EE-BSBN_3SH.js → et-EE-Lw-rTsG-.js} +0 -0
  567. /package/dist/{external-link-Bt75Nd72.js → external-link-BNgSBwiX.js} +0 -0
  568. /package/dist/{fi-FI-Cuy-_Tvn.js → fi-FI-BNtrKnDN.js} +0 -0
  569. /package/dist/{fi-FI-6U5kDy9_.js → fi-FI-Ba0VbJdZ.js} +0 -0
  570. /package/dist/{fi-FI-D4KqLO-Z.js → fi-FI-BrmYMDbY.js} +0 -0
  571. /package/dist/{fi-FI-BDBLn6BE.js → fi-FI-CqM2eaKi.js} +0 -0
  572. /package/dist/{fi-FI-C3sqR9E-.js → fi-FI-DIKQFczn2.js} +0 -0
  573. /package/dist/{fi-FI-CFy95vl_.js → fi-FI-DZyEs_5S.js} +0 -0
  574. /package/dist/{fi-FI-BMXOrvzM.js → fi-FI-IwaR92iX.js} +0 -0
  575. /package/dist/{fi-FI-Ci2zcIZj.js → fi-FI-TDF0ZiiC.js} +0 -0
  576. /package/dist/{fi-FI-lFhGznBk2.js → fi-FI-UJLb8Vk42.js} +0 -0
  577. /package/dist/{fi-FI-Dg-nDL7m.js → fi-FI-koFpyMaq.js} +0 -0
  578. /package/dist/{file-4YWG8UiB.js → file-C9ni6Xpv.js} +0 -0
  579. /package/dist/{filterProblemsByTaskForms-DGjmBtpp.js → filterProblemsByTaskForms-CrTqhWJT.js} +0 -0
  580. /package/dist/{fr-FR-B9ao9gDb.js → fr-FR-B0eVVc8V.js} +0 -0
  581. /package/dist/{fr-FR-B95kf8uT2.js → fr-FR-B6Moi9NF2.js} +0 -0
  582. /package/dist/{fr-FR-CUyDiaZb.js → fr-FR-CYRsfbyW.js} +0 -0
  583. /package/dist/{fr-FR-E5j9-_At.js → fr-FR-CqvZpq5B.js} +0 -0
  584. /package/dist/{fr-FR-B7ATodv9.js → fr-FR-CsoVB-yq.js} +0 -0
  585. /package/dist/{fr-FR-CWF54-G2.js → fr-FR-D96p0pnI2.js} +0 -0
  586. /package/dist/{fr-FR-BxnyIkIr.js → fr-FR-DY7D-hmZ.js} +0 -0
  587. /package/dist/{fr-FR-CT6KdC5D.js → fr-FR-DYDmBWWT.js} +0 -0
  588. /package/dist/{fr-FR-CYf9O7Cz.js → fr-FR-Duc4nlp1.js} +0 -0
  589. /package/dist/{fr-FR-DiKxReG9.js → fr-FR-DwYX21r1.js} +0 -0
  590. /package/dist/{fr-FR-Cq7iIftz.js → fr-FR-fwcu0Hmd.js} +0 -0
  591. /package/dist/{funds-in-DcvC0rG-.js → funds-in-CZ06mMrK.js} +0 -0
  592. /package/dist/{getTrustedDecisionMakers-DXR7mrNp.js → getTrustedDecisionMakers-BjGAWMyl.js} +0 -0
  593. /package/dist/{gift-BK55Hko7.js → gift-I5WhHXnm.js} +0 -0
  594. /package/dist/{graph-up-C1vPoIdt.js → graph-up-CN2EGjwJ.js} +0 -0
  595. /package/dist/{graph-BOW6338R.js → graph-yoQEgV-z.js} +0 -0
  596. /package/dist/{graphical-laptop-DdMjeTSl.js → graphical-laptop-BI3ea4L0.js} +0 -0
  597. /package/dist/{headquarter-BdrfR7tT.js → headquarter-BPCK7l9Y.js} +0 -0
  598. /package/dist/{hotel-CBwpfIGW.js → hotel-BncnkQ-E.js} +0 -0
  599. /package/dist/{house-D2ID8PM-.js → house-RVNoSmhG.js} +0 -0
  600. /package/dist/{hr-HR-BFy27vAx2.js → hr-HR-BZ31wjf92.js} +0 -0
  601. /package/dist/{hr-HR-B_ZysSVu.js → hr-HR-CFAySNqh.js} +0 -0
  602. /package/dist/{hr-HR-cl2F9dhu.js → hr-HR-C_7O4gxx.js} +0 -0
  603. /package/dist/{hr-HR-Dgrok1MJ.js → hr-HR-CludxABG.js} +0 -0
  604. /package/dist/{hr-HR-CRDMSda9.js → hr-HR-DNuly_NE2.js} +0 -0
  605. /package/dist/{hr-HR-BNih1Vz_.js → hr-HR-DTIXBOS5.js} +0 -0
  606. /package/dist/{hr-HR-CcaWCoKl.js → hr-HR-D_X-RNUl.js} +0 -0
  607. /package/dist/{hr-HR-xew9SB6G.js → hr-HR-DbebVQF9.js} +0 -0
  608. /package/dist/{hr-HR-D8UNIkay.js → hr-HR-DpQuBztk.js} +0 -0
  609. /package/dist/{hr-HR-iC0oTR81.js → hr-HR-dL_cUkZa.js} +0 -0
  610. /package/dist/{hu-HU-DZ36YnaZ.js → hu-HU-3FpAw9b1.js} +0 -0
  611. /package/dist/{hu-HU-CQqtf65Z.js → hu-HU-BED5SDWE.js} +0 -0
  612. /package/dist/{hu-HU-BzQoUNaS.js → hu-HU-BesI_nyc.js} +0 -0
  613. /package/dist/{hu-HU-kcQkkxnT2.js → hu-HU-BgRcKhFU2.js} +0 -0
  614. /package/dist/{hu-HU-F5G0riRE.js → hu-HU-DIgxSbaT.js} +0 -0
  615. /package/dist/{hu-HU-BxWEGqjf.js → hu-HU-DORWpwoE.js} +0 -0
  616. /package/dist/{hu-HU-BJw6Xt1M.js → hu-HU-DXHf3uuK.js} +0 -0
  617. /package/dist/{hu-HU-BXhdx-ju.js → hu-HU-ReTWA1v3.js} +0 -0
  618. /package/dist/{hu-HU-D-a0cIYT.js → hu-HU-e9KN8lp6.js} +0 -0
  619. /package/dist/{id-blurred-XeJSAFq-.js → id-blurred-BdqQKk1l.js} +0 -0
  620. /package/dist/{id-cut-off-BOUS-MQq.js → id-cut-off-BlpfXo5W.js} +0 -0
  621. /package/dist/{id-front-TW2EIn5M.js → id-front-Bqd59AfN.js} +0 -0
  622. /package/dist/{id-glare-DILRl7j-.js → id-glare-7GGletdB.js} +0 -0
  623. /package/dist/{image-DtyMUzrF.js → image-DXUQcN6d.js} +0 -0
  624. /package/dist/{info-VO6nk4YC.js → info-Dh7b3h-o.js} +0 -0
  625. /package/dist/{info-filled-CPEFQE41.js → info-filled-DtEaaCq9.js} +0 -0
  626. /package/dist/{it-IT-DBsG90YJ.js → it-IT-16IjDttL.js} +0 -0
  627. /package/dist/{it-IT-Dwuf701_.js → it-IT-3PSb6tzc.js} +0 -0
  628. /package/dist/{it-IT-DfsDaVm5.js → it-IT-BK6Yn4vc.js} +0 -0
  629. /package/dist/{it-IT-DO1lqANf.js → it-IT-BgULENxX.js} +0 -0
  630. /package/dist/{it-IT-BDkY4_D3.js → it-IT-C2JfprsD.js} +0 -0
  631. /package/dist/{it-IT-DXngowCY.js → it-IT-CCtD36Df.js} +0 -0
  632. /package/dist/{it-IT-C82YvJn6.js → it-IT-CFip731S.js} +0 -0
  633. /package/dist/{it-IT-7RA9qfFD.js → it-IT-CW0ZFuCZ.js} +0 -0
  634. /package/dist/{it-IT-BUJ6M3KT2.js → it-IT-D_ks7gfY2.js} +0 -0
  635. /package/dist/{it-IT-DE64R16U.js → it-IT-kER7OY9Z.js} +0 -0
  636. /package/dist/{ja-JP-B1AjiTAA2.js → ja-JP-B-5Ib5IT2.js} +0 -0
  637. /package/dist/{ja-JP-Dm3yGhC1.js → ja-JP-B5fRnSzi.js} +0 -0
  638. /package/dist/{ja-JP-DOkTs_1m.js → ja-JP-BRGxY7zc.js} +0 -0
  639. /package/dist/{ja-JP-DwPYFlHH.js → ja-JP-BT70_5Cd.js} +0 -0
  640. /package/dist/{ja-JP-BTS3mHRw.js → ja-JP-BllN9kcD.js} +0 -0
  641. /package/dist/{ja-JP-B0R17iVA.js → ja-JP-C7tIgG_I.js} +0 -0
  642. /package/dist/{ja-JP-BnijJDPU.js → ja-JP-CJY6uqPb.js} +0 -0
  643. /package/dist/{ja-JP-CW-GiKi4.js → ja-JP-D6OZ6CvT.js} +0 -0
  644. /package/dist/{ja-JP-DYccStvn.js → ja-JP-DGUCWzjv.js} +0 -0
  645. /package/dist/{ja-JP-mwBJM8u5.js → ja-JP-tHJpSXnY.js} +0 -0
  646. /package/dist/{ja-JP-DOHCaWKA.js → ja-JP-wmwnTtNd.js} +0 -0
  647. /package/dist/{location-Bn5E9Pul.js → location-NeA9HUsd.js} +0 -0
  648. /package/dist/{lt-LT-DN-ykSHh.js → lt-LT-BHpTAvkg.js} +0 -0
  649. /package/dist/{lt-LT-DKeyLOpW2.js → lt-LT-BJziTet92.js} +0 -0
  650. /package/dist/{lt-LT-C1Vvc-Ic.js → lt-LT-BVVTYN3z.js} +0 -0
  651. /package/dist/{lt-LT-Bdos65_D.js → lt-LT-CKltvr9j.js} +0 -0
  652. /package/dist/{lt-LT-CXeVcR30.js → lt-LT-CpQj1HiE.js} +0 -0
  653. /package/dist/{lt-LT-Cz3-hqCv.js → lt-LT-DX-73rzB.js} +0 -0
  654. /package/dist/{lt-LT-ZTVM9uqj.js → lt-LT-DZvEoBgI.js} +0 -0
  655. /package/dist/{lt-LT-CM0_pU79.js → lt-LT-Dkvuak-E.js} +0 -0
  656. /package/dist/{lt-LT-DpMT3Dw2.js → lt-LT-_MAUl9-y.js} +0 -0
  657. /package/dist/{lv-LV-BdKTpJby.js → lv-LV-BGMkr0W_.js} +0 -0
  658. /package/dist/{lv-LV-DlEyTMmr.js → lv-LV-BeobSRYx.js} +0 -0
  659. /package/dist/{lv-LV-aPZP5Wh5.js → lv-LV-Br4-Sv0n.js} +0 -0
  660. /package/dist/{lv-LV-CIkyBWzC2.js → lv-LV-C8O_oUFu2.js} +0 -0
  661. /package/dist/{lv-LV-BD1HMiAg.js → lv-LV-Cz0igciN.js} +0 -0
  662. /package/dist/{lv-LV-DEyd0a_5.js → lv-LV-D0EFr0dt.js} +0 -0
  663. /package/dist/{lv-LV-CaYnRl9t.js → lv-LV-DPQ4Tm3o.js} +0 -0
  664. /package/dist/{lv-LV-G0OU8pVQ.js → lv-LV-DwsdNJrk.js} +0 -0
  665. /package/dist/{lv-LV-Cbnl_BTV.js → lv-LV-WYtMR2p9.js} +0 -0
  666. /package/dist/{mail-D9fFXhBB.js → mail-COcabAMU.js} +0 -0
  667. /package/dist/{minus-circle-filled-kgX5qrve.js → minus-circle-filled-CnCOR8aV.js} +0 -0
  668. /package/dist/{nl-NL-poVx-Ryf.js → nl-NL-BLie9b-e.js} +0 -0
  669. /package/dist/{nl-NL-DpqAj7Gf.js → nl-NL-BTuDiajY.js} +0 -0
  670. /package/dist/{nl-NL-BSq1sTYp2.js → nl-NL-BjbL2DHM2.js} +0 -0
  671. /package/dist/{nl-NL-bmOh_Iho.js → nl-NL-Br1QBepE.js} +0 -0
  672. /package/dist/{nl-NL-BG0VZRVD.js → nl-NL-BtwZkAPX.js} +0 -0
  673. /package/dist/{nl-NL-K11VO8LF.js → nl-NL-ByNQn3Ma.js} +0 -0
  674. /package/dist/{nl-NL-6DRNI2_h.js → nl-NL-Cbt7ybTe.js} +0 -0
  675. /package/dist/{nl-NL-H34uhESf.js → nl-NL-CxlTSECX.js} +0 -0
  676. /package/dist/{nl-NL-CZbfiuyr.js → nl-NL-D16qC_X6.js} +0 -0
  677. /package/dist/{nl-NL-gw7xAOzH.js → nl-NL-DKpjFbpm.js} +0 -0
  678. /package/dist/{no-NO-CoU6_onp.js → no-NO-BSrcMnDk.js} +0 -0
  679. /package/dist/{no-NO-Cd0Nf4Kq.js → no-NO-BXHYRl8q.js} +0 -0
  680. /package/dist/{no-NO-Ddy7zsVP.js → no-NO-ByxOHA9n.js} +0 -0
  681. /package/dist/{no-NO-Bh2seJVU.js → no-NO-CG5RteG_.js} +0 -0
  682. /package/dist/{no-NO-BNGILdWq.js → no-NO-CX2Lkpbt.js} +0 -0
  683. /package/dist/{no-NO-BTVAGYcu.js → no-NO-D6C6Imfk.js} +0 -0
  684. /package/dist/{no-NO-CRUvKPvc2.js → no-NO-DM2yevPv2.js} +0 -0
  685. /package/dist/{no-NO-BOT2cuyE.js → no-NO-FtH9gIpv.js} +0 -0
  686. /package/dist/{no-NO-CbOdCJr8.js → no-NO-YjH9dIrD.js} +0 -0
  687. /package/dist/{options-horizontal-j-5uyd0B.js → options-horizontal-CAznj1Vl.js} +0 -0
  688. /package/dist/{partner-BHWNbmjS.js → partner-BgRPuALU.js} +0 -0
  689. /package/dist/{passport-blurred-aqGCUkch.js → passport-blurred-UX6p2KZ5.js} +0 -0
  690. /package/dist/{passport-cut-off-BA6ktmt3.js → passport-cut-off-C4H57LgT.js} +0 -0
  691. /package/dist/{passport-front-r55sFG5k.js → passport-front-K9nDuC3A.js} +0 -0
  692. /package/dist/{passport-glare-DtAqvy1l.js → passport-glare-Cw4IMJSe.js} +0 -0
  693. /package/dist/{pay-by-link-plane-CqqhXPzK.js → pay-by-link-plane-CblqKlzx.js} +0 -0
  694. /package/dist/{payout-BjEqYPYq.js → payout-Dt-Rj2Dk.js} +0 -0
  695. /package/dist/{payout-bank-accounts-BN3KdVID.js → payout-bank-accounts-CfRx1pMC.js} +0 -0
  696. /package/dist/{payout-verification-instant-DOCBn9if.js → payout-verification-instant-Bb5s_R8u.js} +0 -0
  697. /package/dist/{payout-verification-manual-DmhxH6y1.js → payout-verification-manual-TFGUjvg1.js} +0 -0
  698. /package/dist/{person-KiTel0hd.js → person-CVbQ7VXy.js} +0 -0
  699. /package/dist/{pl-PL-BLijgPzs.js → pl-PL-CK40GB3R.js} +0 -0
  700. /package/dist/{pl-PL-B9Xe_UVY.js → pl-PL-CxlgXMRg.js} +0 -0
  701. /package/dist/{pl-PL-D_FRhmnE2.js → pl-PL-DC1Izk5I2.js} +0 -0
  702. /package/dist/{pl-PL-DGk9n8PS.js → pl-PL-DNdGYT-E.js} +0 -0
  703. /package/dist/{pl-PL-59aMUgvV.js → pl-PL-NJRqx5mk.js} +0 -0
  704. /package/dist/{pl-PL-xFbWNtw-.js → pl-PL-R6bNjSQB.js} +0 -0
  705. /package/dist/{pl-PL-DhJQbVhT.js → pl-PL-W0KU0YTp.js} +0 -0
  706. /package/dist/{pl-PL-7zqxOYlT.js → pl-PL-aWhB1xes.js} +0 -0
  707. /package/dist/{pl-PL-C_TTkMRX.js → pl-PL-x6CltZUu.js} +0 -0
  708. /package/dist/{plaid-logo-CjpdjGNT.js → plaid-logo-BzQDyZCh.js} +0 -0
  709. /package/dist/{plus-tEm-vgE1.js → plus-BbVfOPFJ.js} +0 -0
  710. /package/dist/{plus-circle-filled-BBTC2T_N.js → plus-circle-filled-D9vpzgFw.js} +0 -0
  711. /package/dist/{pt-BR-C4k6baTi.js → pt-BR-7FV4JArc.js} +0 -0
  712. /package/dist/{pt-BR-Bz81xVLo.js → pt-BR-B0zBNcPy.js} +0 -0
  713. /package/dist/{pt-BR-D5YeeE9g.js → pt-BR-BgiNMjMc.js} +0 -0
  714. /package/dist/{pt-BR-DGRn2oS9.js → pt-BR-C8nFgTo3.js} +0 -0
  715. /package/dist/{pt-BR-CZJbbJte.js → pt-BR-CTxtcXRe.js} +0 -0
  716. /package/dist/{pt-BR-B3IHhi-A.js → pt-BR-CdeMGenL.js} +0 -0
  717. /package/dist/{pt-BR-BJXrQjtE2.js → pt-BR-NPzViBFm2.js} +0 -0
  718. /package/dist/{pt-BR-BlKR8cVd.js → pt-BR-VlNZLr8f.js} +0 -0
  719. /package/dist/{pt-BR-uu1H4p8J.js → pt-BR-kU7AfzPy.js} +0 -0
  720. /package/dist/{pt-BR-Pzz_-HPF.js → pt-BR-zUBVM8_b.js} +0 -0
  721. /package/dist/{pt-PT-3DrMwWiz.js → pt-PT-BEkfXdZQ.js} +0 -0
  722. /package/dist/{pt-PT-CUSJRIfa2.js → pt-PT-BRLRSNh92.js} +0 -0
  723. /package/dist/{pt-PT-BqRmSpLn.js → pt-PT-BjB2uXSn.js} +0 -0
  724. /package/dist/{pt-PT-a_AX0uQa.js → pt-PT-C0GJNK9V.js} +0 -0
  725. /package/dist/{pt-PT-B4hcCO06.js → pt-PT-CWzCKCL8.js} +0 -0
  726. /package/dist/{pt-PT-BKpJ3YxA.js → pt-PT-CxnB9Jff.js} +0 -0
  727. /package/dist/{pt-PT-kZxHBVAZ.js → pt-PT-Czy2_X1t.js} +0 -0
  728. /package/dist/{pt-PT-DGFn02W1.js → pt-PT-D9QbJxzN.js} +0 -0
  729. /package/dist/{pt-PT-Dug4_4L2.js → pt-PT-Dmor9x6o.js} +0 -0
  730. /package/dist/{pt-PT-D56-HfAU.js → pt-PT-hj7CUska.js} +0 -0
  731. /package/dist/{recurring-B2eeDPZF.js → recurring-Cm_CVMBM.js} +0 -0
  732. /package/dist/{reporting-CuOey349.js → reporting-BHGFV7yB.js} +0 -0
  733. /package/dist/{revenue-accelerate-B7fBFkfQ.js → revenue-accelerate-uQp3MMWP.js} +0 -0
  734. /package/dist/{review-CkmDUkhx.js → review-DkLO25RT.js} +0 -0
  735. /package/dist/{ro-RO-CWvI2BHZ.js → ro-RO-B3hA8dZo.js} +0 -0
  736. /package/dist/{ro-RO-DalDxZ5-.js → ro-RO-BCHziTju.js} +0 -0
  737. /package/dist/{ro-RO-Bm3v7oJR.js → ro-RO-BRtHlgch.js} +0 -0
  738. /package/dist/{ro-RO-GldC3IcE.js → ro-RO-C7wPFb1a.js} +0 -0
  739. /package/dist/{ro-RO-BL3PIRiS.js → ro-RO-CmHNsQpo.js} +0 -0
  740. /package/dist/{ro-RO-DcZ14eBw.js → ro-RO-Cuw1RmFc.js} +0 -0
  741. /package/dist/{ro-RO-YHGTP7rf.js → ro-RO-DLtPW1MX.js} +0 -0
  742. /package/dist/{ro-RO-CcQh__lV2.js → ro-RO-DsFDnuty2.js} +0 -0
  743. /package/dist/{ro-RO-B1HkfIdK.js → ro-RO-tf_g2ahZ.js} +0 -0
  744. /package/dist/{save-BS8c9b7Z.js → save-DsGcWvER.js} +0 -0
  745. /package/dist/{search-DeXnRqW6.js → search-BDJlT2t5.js} +0 -0
  746. /package/dist/{show-oe_wIyOO.js → show-DLGXHz7A.js} +0 -0
  747. /package/dist/{singpass-logo-DpBl_z3a.js → singpass-logo-D1Z8HeLC.js} +0 -0
  748. /package/dist/{singpass-logo-small-CDc7hBx0.js → singpass-logo-small-CQC5e3lx.js} +0 -0
  749. /package/dist/{sk-SK-CvhS_Rr-.js → sk-SK--ohjuOMW.js} +0 -0
  750. /package/dist/{sk-SK-D8-iSnMC.js → sk-SK-1i0L4zIs.js} +0 -0
  751. /package/dist/{sk-SK-C9Cst_ER.js → sk-SK-Bt_mgDPR.js} +0 -0
  752. /package/dist/{sk-SK-D6xioiMY2.js → sk-SK-CV-IEeZp2.js} +0 -0
  753. /package/dist/{sk-SK-D2EzCd0l.js → sk-SK-CtsgM8bj.js} +0 -0
  754. /package/dist/{sk-SK-DvELQ1Kv.js → sk-SK-DNKyL6Hl.js} +0 -0
  755. /package/dist/{sk-SK-Cd48q22c.js → sk-SK-DaSC7QsL.js} +0 -0
  756. /package/dist/{sk-SK-CRQX1Luo.js → sk-SK-DwG8xkcP.js} +0 -0
  757. /package/dist/{sk-SK-DKLhhg3k.js → sk-SK-xqB2A84D.js} +0 -0
  758. /package/dist/{sl-SI-DvXrcue1.js → sl-SI-C6KiyZyh.js} +0 -0
  759. /package/dist/{sl-SI-Bfdb7gjw.js → sl-SI-CKA1EM-J.js} +0 -0
  760. /package/dist/{sl-SI-CRk5cPQq2.js → sl-SI-Cg7e65lb2.js} +0 -0
  761. /package/dist/{sl-SI-CMlW_T3f.js → sl-SI-D3zK3MPP.js} +0 -0
  762. /package/dist/{sl-SI-UXjxoV_v.js → sl-SI-DNgxTuIJ.js} +0 -0
  763. /package/dist/{sl-SI-DyO_STsZ.js → sl-SI-DWJzi8r_.js} +0 -0
  764. /package/dist/{sl-SI-Cz0hYELC.js → sl-SI-DnpKMUhR.js} +0 -0
  765. /package/dist/{sl-SI-DjtnuL07.js → sl-SI-DywGyzEa.js} +0 -0
  766. /package/dist/{sl-SI-CCFfFnuI.js → sl-SI-PsgMnJ-h.js} +0 -0
  767. /package/dist/{solution-payments-g1VlocE9.js → solution-payments-CVSsXgo9.js} +0 -0
  768. /package/dist/{store-ByGvVYZ6.js → store-COYFYobc.js} +0 -0
  769. /package/dist/{sv-SE-BfazlSmj.js → sv-SE-BM8WESGs.js} +0 -0
  770. /package/dist/{sv-SE-BoITS9np.js → sv-SE-BMG9p-1J.js} +0 -0
  771. /package/dist/{sv-SE-BF4N8-mt.js → sv-SE-BN0dUpwI.js} +0 -0
  772. /package/dist/{sv-SE-BggDZoyt.js → sv-SE-CBNLo-2r.js} +0 -0
  773. /package/dist/{sv-SE-CMkXS2cO.js → sv-SE-CTB2971Y.js} +0 -0
  774. /package/dist/{sv-SE-DUFWUnPd.js → sv-SE-CVRa-6Y0.js} +0 -0
  775. /package/dist/{sv-SE-D30NNIkG.js → sv-SE-D3hPP-Mp.js} +0 -0
  776. /package/dist/{sv-SE-CoDJ3_1A.js → sv-SE-DTpqjuJd.js} +0 -0
  777. /package/dist/{sv-SE-BDOWCS_O.js → sv-SE-Dsrb2FFw.js} +0 -0
  778. /package/dist/{sv-SE-CRPJUyOE2.js → sv-SE-Q7zk4V9W2.js} +0 -0
  779. /package/dist/{terminal-1-CA03Z57p.js → terminal-1-C98Z-HQT.js} +0 -0
  780. /package/dist/{tink-logo-CqXir9XT.js → tink-logo-b8D53Kmq.js} +0 -0
  781. /package/dist/types/components/Business/{utils → hooks}/useBusinessDetailsData.d.ts +0 -0
  782. /package/dist/{types-B-8XphGe.js → types-BklAlvuU.js} +0 -0
  783. /package/dist/{types-C6aMFMzZ.js → types-BvdB7N_Z.js} +0 -0
  784. /package/dist/{types-Dw16GQCS.js → types-ewJwhKUi.js} +0 -0
  785. /package/dist/{upload-mi4rAl2M.js → upload-hnGE-ssH.js} +0 -0
  786. /package/dist/{us-check-BW6K3WxJ.js → us-check-BgX0xeVz.js} +0 -0
  787. /package/dist/{us-check-account-number-BME1X1ZC.js → us-check-account-number-DKJO3VuM.js} +0 -0
  788. /package/dist/{us-check-routing-number-UatGnO16.js → us-check-routing-number-C0VuN5fT.js} +0 -0
  789. /package/dist/{useAnalyticsContext-D6DJZmqu.js → useAnalyticsContext-DfTXpZbA.js} +0 -0
  790. /package/dist/{useToastContext-d6uY8F_F.js → useToastContext-CK7UoZ5Z.js} +0 -0
  791. /package/dist/{validate-DHSybdw4.js → validate-BC1f_rgO.js} +0 -0
  792. /package/dist/{warning-circle-fill-CaaRr_OW.js → warning-circle-fill-BjxM4aj1.js} +0 -0
  793. /package/dist/{warning-diamond-filled-Cy0GbzJ7.js → warning-diamond-filled-CtCJ9xf8.js} +0 -0
  794. /package/dist/{webinar-B5CxaVrR.js → webinar-D_daN2X8.js} +0 -0
  795. /package/dist/{yapily-logo-upggwl6u.js → yapily-logo-ByJSYIQm.js} +0 -0
@@ -1,4007 +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] = "63501364-305b-4a8d-98f1-890d587d95e3", e._sentryDebugIdIdentifier = "sentry-dbid-63501364-305b-4a8d-98f1-890d587d95e3");
4
- } catch (e) {}
5
- import { a as Icon, i as Typography, o as createLogger, r as useTranslation, t as Trans } from "./translation-prlgF4Yn.js";
6
- import { t as Button } from "./Button-BzRYS0KT.js";
7
- import { n as httpGet, r as httpPost, s as useApiContext } from "./http-Be_3lReE.js";
8
- import { t as LegalEntityTypes } from "./legal-entity-type-VIfNYnJP.js";
9
- import { t as getLegalEntityCountry } from "./getLegalEntityCountry-C6bSV6sB.js";
10
- import { t as useAccountHolder } from "./useAccountHolder-Bs5S819-.js";
11
- import { t as useSettingsContext } from "./useSettingsContext-DzwVt0W0.js";
12
- import { l as keysOf, n as cloneObject, o as objectsDeepEqual } from "./AnalyticsContext-C0HNdPss.js";
13
- import { d as extractFieldName, m as hasEmptyFields, u as concatenateFieldNames, v as isAccountIdentifierObscured, y as isEmpty } from "./validatorUtils-D5MKiGfL.js";
14
- import { t as useToggleContext } from "./useToggleContext-CLfowItk.js";
15
- import { t as StackLayout } from "./StackLayout-D0Kqs-Ti.js";
16
- import { t as Header } from "./Header-DS7fzxw6.js";
17
- import { t as CountryCodes } from "./country-code-D3oCpE4i.js";
18
- import { t as useDataset } from "./useDataset-C6zo70ax.js";
19
- import { n as datasetUtilities, t as datasetIdentifier } from "./datasetUtil-BZmNUckr.js";
20
- import { t as Alert } from "./Alert-DVrlbon8.js";
21
- import { t as TaskTypes } from "./taskTypes-DWaxzvnQ.js";
22
- import { d as hasOwnEntityAssociationOfType } from "./entityAssociationUtil-C0gX4Ewv.js";
23
- import { t as EEA_Countries } from "./countries-BEUFeNU1.js";
24
- import { t as Card } from "./Card-D6AEqxyX.js";
25
- import { t as useAnalyticsContext } from "./useAnalyticsContext-D6DJZmqu.js";
26
- import { t as SettingNames } from "./types-B-8XphGe.js";
27
- import { t as useToastContext } from "./useToastContext-d6uY8F_F.js";
28
- import { t as useInvalidateRootLegalEntity } from "./invalidateRootLegalEntity-lDFSztuv.js";
29
- import { t as LoaderWrapper } from "./LoaderWrapper-B-PH-UC1.js";
30
- import { t as Modal } from "./Modal-DOGT289C.js";
31
- import { t as Confirm } from "./Confirm-CkWoZ8mk.js";
32
- import { n as FeatureNames, t as ExperimentNames } from "./types-CvTg7nL1.js";
33
- import { t as Image } from "./Image-Br4Dbqbg.js";
34
- import { n as translateTranslatable } from "./utils-g_Wl4-9Z.js";
35
- import { n as getLegalEntityNameBasedOnType, r as getPayoutAccountHolderName } from "./getName-ODLD6UPV.js";
36
- import { c as FormContextProvider, i as FormFlow, n as addValidityToForms, r as getRequiredForms, s as useFormComposer, t as useFormContext } from "./useFormContext-WC19R9Fs.js";
37
- import { r as getPropsFromConfigurations, t as augmentWithCountryConfigs } from "./process-field-configurations-C-D1aFsE.js";
38
- import { t as ErrorPanel } from "./ErrorPanel-8Ek7q8Uj.js";
39
- import { t as trackNavigation } from "./trackNavigation-LvCP5Vyc.js";
40
- import { n as mergeFieldMetadataIntoProps, t as createFormUtils } from "./formUtils-DcRJcDH1.js";
41
- import { n as summaryStep } from "./Summary-BBIENfcc.js";
42
- import { r as summaryItem } from "./summaryItem-Dehjwp8D.js";
43
- import { n as isNotEmptyValidator, t as useMultiForm } from "./useMultiForm-BsITYUOA.js";
44
- import { a as useUnifyLoadingStatus, i as useScenarioConfiguration, o as payoutAccountFormat, r as getPageName, t as mapExistingFile } from "./mapExistingFile-wPP7dr95.js";
45
- import { t as useTaskLandedEvent } from "./useTaskLandedEvent-DRh2mwkT.js";
46
- import { a as alphanumericInputs, c as nonInputs, i as alphaInputs, l as numericInputs, o as customInputs, s as makeMask, t as MaskedInput, u as spacer } from "./MaskedInput-NT8rTg72.js";
47
- import { a as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable, i as isValidationError, o as processValidationErrors, r as isIdDocumentUploadError, s as isMaintenanceModeError, t as isBankStatementUploadError } from "./validationError-Dr0g0lGN.js";
48
- import { a as StateContextSetter, c as getDocument, i as bytesToSize, n as fileValidationRules, o as createDocumentRequest, r as DropzoneFile, s as documentApiUtils, t as defaultFileValidationOptions, u as getFileExtention } from "./validate-DeoMM6MG.js";
49
- import { t as omitObscuredFieldsIfUnchanged } from "./omitObscuredFieldsIfUnchanged-BPvAaBeX.js";
50
- import { t as uppercase } from "./uppercase-DKruhEuk.js";
51
- import { o as validatePatternOnBlur } from "./patternValidators-COjyZHty.js";
52
- import { t as bankStatementDescriptionPattern } from "./basePatterns-B0FC-Crd.js";
53
- import { t as resolveFieldMetadata } from "./fieldConfigurations-B3oqm4GC.js";
54
- import { t as Field } from "./Field-DrMftQlB.js";
55
- import { t as LandingLayout } from "./LandingLayout-CKVrtOQ_.js";
56
- import { t as Select } from "./Select-FLb-oVGL.js";
57
- import { t as TextArea } from "./TextArea-dUsyC5I6.js";
58
- import { t as useForm } from "./useForm-Y7Z43OxR.js";
59
- import { t as getFieldProps } from "./getProps-Bf3NN9L_.js";
60
- import { t as Link } from "./Link--_cz0Y4C.js";
61
- import { t as InputText } from "./InputText-Bj1XCzw_.js";
62
- import { n as CountryField } from "./CountryField-C_wlGotF.js";
63
- import { t as createFormRules } from "./form-rules-CvdV5rPY.js";
64
- import { t as ContextGuidance } from "./ContextGuidance-emoS5YBp.js";
65
- import { t as Tag } from "./Tag-BTQ4nyKS.js";
66
- import { n as useTransferInstrument, t as mapTransferInstrumentToPayoutAccount } from "./mapTransferInstrumentToPayoutAccount-AdSZDbW0.js";
67
- import { t as Currencies } from "./currency-CfIDpZh9.js";
68
- import { t as currencyByCountry } from "./types-DjplYXLf.js";
69
- import { t as useGlobalDataSlice } from "./useGlobalData-aRC4QM86.js";
70
- import { t as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-BD6dxoRK.js";
71
- import { t as Divider } from "./Divider-DMwncntz.js";
72
- import { lazy, memo, useEffect, useMemo, useRef, useState } from "preact/compat";
73
- import { useCallback as useCallback$1, useContext as useContext$1, useEffect as useEffect$1, useMemo as useMemo$1, useRef as useRef$1, useState as useState$1 } from "preact/hooks";
74
- import cx from "classnames";
75
- import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
76
- import { signal } from "@preact/signals";
77
- import { skipToken, useMutation, useQuery, useQueryClient } from "@tanstack/preact-query";
78
- import { createContext as createContext$1 } from "preact";
79
- import { Show } from "@preact/signals/utils";
80
- import OpenBankingSDK from "@adyen/openbankingsdk";
81
- //#region src/api/check/useCheck.ts
82
- var performCheck = async (legalEntityId, baseUrl, data) => {
83
- return httpPost({
84
- baseUrl,
85
- path: `legalEntities/${legalEntityId}/checks/bankAccount`
86
- }, data);
87
- };
88
- var useCheck = (options) => {
89
- const { rootLegalEntityId, baseUrl: url } = useApiContext();
90
- return useMutation({
91
- mutationFn: (data) => performCheck(rootLegalEntityId.value, url.value, data),
92
- ...options
93
- });
94
- };
95
- //#endregion
96
- //#region src/api/transferInstruments/useBankVerificationProviders.ts
97
- var getBankVerificationProviders = async (legalEntityId, baseUrl, queryParams) => {
98
- const { country, locale, configId } = queryParams;
99
- return httpGet({
100
- baseUrl,
101
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted/providers?${new URLSearchParams({
102
- country,
103
- locale,
104
- ...configId && { configId }
105
- })}`
106
- });
107
- };
108
- /**
109
- * Retrieves the list of bank verification providers and their respective urls.
110
- * Bank verification providers are used to instantly verify payout accounts.
111
- * @param queryParams the relevant country, locale, and configId
112
- * @param options additional options passed to Tanstack Query, eg; onSuccess
113
- */
114
- var useBankVerificationProviders = (queryParams, options) => {
115
- const { rootLegalEntityId, baseUrl } = useApiContext();
116
- return useQuery({
117
- queryKey: ["bankVerificationProviders", queryParams],
118
- queryFn: () => getBankVerificationProviders(rootLegalEntityId.value, baseUrl.value, queryParams),
119
- ...options
120
- });
121
- };
122
- //#endregion
123
- //#region src/api/transferInstruments/useCreateTransferInstrument.ts
124
- var createTransferInstrument = async (rootLegalEntityId, baseUrl, transferInstrument) => {
125
- return httpPost({
126
- baseUrl,
127
- path: `legalEntities/${rootLegalEntityId}/transferInstruments`
128
- }, transferInstrument);
129
- };
130
- //#endregion
131
- //#region src/api/transferInstruments/useCreateTrustedTransferInstrument.ts
132
- var createTrustedTransferInstrument = async (legalEntityId, baseUrl, data) => {
133
- return httpPost({
134
- baseUrl,
135
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted`
136
- }, data);
137
- };
138
- /**
139
- * Creates a trusted transfer instrument in LEM using the information provided by Open Banking
140
- * @param options additional options passed to Tanstack Query, eg; onSuccess
141
- */
142
- var useCreateTrustedTransferInstrument = (options) => {
143
- const { rootLegalEntityId, baseUrl } = useApiContext();
144
- return useMutation({
145
- mutationFn: (data) => createTrustedTransferInstrument(rootLegalEntityId.value, baseUrl.value, data),
146
- ...options
147
- });
148
- };
149
- //#endregion
150
- //#region src/api/transferInstruments/useUpdateTransferInstrument.ts
151
- var updateTransferInstrument = async (legalEntityId, baseUrl, transferInstrument, transferInstrumentId) => {
152
- return httpPost({
153
- baseUrl,
154
- path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
155
- }, transferInstrument);
156
- };
157
- /**
158
- * Updates a transfer instrument associated with a legal entity
159
- * When update is successful, updates the transfer instrument query and invalidates transfer instruments
160
- * @param options additional options passed to Tanstack Query
161
- */
162
- var useUpdateTransferInstrument = (options) => {
163
- const { rootLegalEntityId, baseUrl } = useApiContext();
164
- const queryClient = useQueryClient();
165
- return useMutation({
166
- mutationFn: ({ transferInstrument, transferInstrumentId }) => updateTransferInstrument(rootLegalEntityId.value, baseUrl.value, transferInstrument, transferInstrumentId),
167
- onSuccess: async (transferInstrument) => {
168
- queryClient.setQueryData(["transferInstrument", transferInstrument.id], transferInstrument);
169
- await queryClient.invalidateQueries({ queryKey: ["transferInstruments"] });
170
- },
171
- ...options
172
- });
173
- };
174
- //#endregion
175
- //#region src/api/transferInstruments/useUpdateTrustedTransferInstrument.ts
176
- var updateTrustedTransferInstrument = async (legalEntityId, baseUrl, preferredCurrencyCode, transferInstrumentId) => {
177
- return httpPost({
178
- baseUrl,
179
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted/${transferInstrumentId}`
180
- }, { preferredCurrencyCode });
181
- };
182
- /**
183
- * Updates a trusted transfer instrument associated with a legal entity
184
- * When update is successful, updates the transfer instrument query and invalidates transfer instruments
185
- * @param options additional options passed to Tanstack Query
186
- */
187
- var useUpdateTrustedTransferInstrument = (options) => {
188
- const { rootLegalEntityId, baseUrl } = useApiContext();
189
- return useMutation({
190
- mutationFn: ({ preferredCurrencyCode, transferInstrumentId }) => updateTrustedTransferInstrument(rootLegalEntityId.value, baseUrl.value, preferredCurrencyCode, transferInstrumentId),
191
- ...options
192
- });
193
- };
194
- //#endregion
195
- //#region src/datasets/generators/getAccountFormatForCountry.ts
196
- var accountFormatsImports = /* @__PURE__ */ Object.assign({
197
- "../accountFormats/AD.json": () => import("./AD-WVUZQFGN.js"),
198
- "../accountFormats/AE.json": () => import("./AE-CmmQBvgj.js"),
199
- "../accountFormats/AI.json": () => import("./AI-uTi58bvD.js"),
200
- "../accountFormats/AL.json": () => import("./AL-CVo_-trU.js"),
201
- "../accountFormats/AR.json": () => import("./AR-CCvtQ_f1.js"),
202
- "../accountFormats/AS.json": () => import("./AS-_IDlt7BS.js"),
203
- "../accountFormats/AT.json": () => import("./AT--izmQDYv.js"),
204
- "../accountFormats/AU.json": () => import("./AU-CIvYHL9t.js"),
205
- "../accountFormats/AX.json": () => import("./AX-6M_KMkrl.js"),
206
- "../accountFormats/AZ.json": () => import("./AZ-6H7n0Vot.js"),
207
- "../accountFormats/BA.json": () => import("./BA-JrIs2HUu.js"),
208
- "../accountFormats/BE.json": () => import("./BE-CXq5Hijp.js"),
209
- "../accountFormats/BG.json": () => import("./BG-R_i9sqhL.js"),
210
- "../accountFormats/BH.json": () => import("./BH-D76c--WG.js"),
211
- "../accountFormats/BM.json": () => import("./BM-CzOd_jgX.js"),
212
- "../accountFormats/BR.json": () => import("./BR-DO3biIN8.js"),
213
- "../accountFormats/BS.json": () => import("./BS-CWIW9E1I.js"),
214
- "../accountFormats/BV.json": () => import("./BV-CENtZbPX.js"),
215
- "../accountFormats/BY.json": () => import("./BY-DE6URIDJ.js"),
216
- "../accountFormats/CA.json": () => import("./CA-BYlH-Cd1.js"),
217
- "../accountFormats/CH.json": () => import("./CH-_09pZR7a.js"),
218
- "../accountFormats/CN.json": () => import("./CN-DZd-0WD-.js"),
219
- "../accountFormats/CR.json": () => import("./CR-BssOX9HQ.js"),
220
- "../accountFormats/CY.json": () => import("./CY--oB04gqf.js"),
221
- "../accountFormats/CZ.json": () => import("./CZ-CaYflVeT.js"),
222
- "../accountFormats/DE.json": () => import("./DE-ChxjP7Jt.js"),
223
- "../accountFormats/DK.json": () => import("./DK-DLe5JZoQ.js"),
224
- "../accountFormats/DO.json": () => import("./DO-KibicZ_i.js"),
225
- "../accountFormats/EC.json": () => import("./EC-BIA3xT4P.js"),
226
- "../accountFormats/EE.json": () => import("./EE-Do8rjGQC.js"),
227
- "../accountFormats/ES.json": () => import("./ES-ATuj9pqz.js"),
228
- "../accountFormats/FI.json": () => import("./FI-CyQtfnFn.js"),
229
- "../accountFormats/FJ.json": () => import("./FJ-CBVo2_I6.js"),
230
- "../accountFormats/FO.json": () => import("./FO-BIoUiFwd.js"),
231
- "../accountFormats/FR.json": () => import("./FR-DxBK3wUg.js"),
232
- "../accountFormats/GB.json": () => import("./GB-z6rKPbLe.js"),
233
- "../accountFormats/GE.json": () => import("./GE-BGSs35Sf.js"),
234
- "../accountFormats/GF.json": () => import("./GF-BJzm3wQV.js"),
235
- "../accountFormats/GG.json": () => import("./GG-C_15AOT0.js"),
236
- "../accountFormats/GI.json": () => import("./GI-BkZV-xhg.js"),
237
- "../accountFormats/GL.json": () => import("./GL-D0qJ5ckC.js"),
238
- "../accountFormats/GP.json": () => import("./GP-IZt0QDME.js"),
239
- "../accountFormats/GR.json": () => import("./GR-CIIoOs3h.js"),
240
- "../accountFormats/GT.json": () => import("./GT-B27iNvqK.js"),
241
- "../accountFormats/GU.json": () => import("./GU-CD_UPKaw.js"),
242
- "../accountFormats/HK.json": () => import("./HK-DPk8wQqx.js"),
243
- "../accountFormats/HR.json": () => import("./HR-CyL9DdKh.js"),
244
- "../accountFormats/HU.json": () => import("./HU-BZor0itt.js"),
245
- "../accountFormats/ID.json": () => import("./ID-CedFDk8E.js"),
246
- "../accountFormats/IE.json": () => import("./IE-Cvj85oaC.js"),
247
- "../accountFormats/IL.json": () => import("./IL-LHVNpBje.js"),
248
- "../accountFormats/IM.json": () => import("./IM-CIN-urLW.js"),
249
- "../accountFormats/IN.json": () => import("./IN-DuXkW59W.js"),
250
- "../accountFormats/IS.json": () => import("./IS-KiOpP9sL.js"),
251
- "../accountFormats/IT.json": () => import("./IT-BkPo-hSM.js"),
252
- "../accountFormats/JE.json": () => import("./JE-DdI5gLJX.js"),
253
- "../accountFormats/JM.json": () => import("./JM-CAXfLnpx.js"),
254
- "../accountFormats/JO.json": () => import("./JO-CkrARQrR.js"),
255
- "../accountFormats/JP.json": () => import("./JP-CqmeLrIR.js"),
256
- "../accountFormats/KR.json": () => import("./KR-B2a1IWIw.js"),
257
- "../accountFormats/KW.json": () => import("./KW-BlCv_eC5.js"),
258
- "../accountFormats/KY.json": () => import("./KY-D30QIXuZ.js"),
259
- "../accountFormats/KZ.json": () => import("./KZ-DECEbXx0.js"),
260
- "../accountFormats/LB.json": () => import("./LB-BBZwWsEK.js"),
261
- "../accountFormats/LI.json": () => import("./LI-DfitHsa8.js"),
262
- "../accountFormats/LT.json": () => import("./LT-R8Sflwmd.js"),
263
- "../accountFormats/LU.json": () => import("./LU-BcXbp3o9.js"),
264
- "../accountFormats/LV.json": () => import("./LV-BoUUdgsK.js"),
265
- "../accountFormats/MC.json": () => import("./MC-BYYwazPi.js"),
266
- "../accountFormats/MD.json": () => import("./MD-ffljHsPf.js"),
267
- "../accountFormats/ME.json": () => import("./ME-CFB8FbcU.js"),
268
- "../accountFormats/MK.json": () => import("./MK-r-PADVK9.js"),
269
- "../accountFormats/MP.json": () => import("./MP-76Kv--as.js"),
270
- "../accountFormats/MQ.json": () => import("./MQ-CtxwW8jT.js"),
271
- "../accountFormats/MR.json": () => import("./MR-DwI7VR0A.js"),
272
- "../accountFormats/MT.json": () => import("./MT-B819Sykn.js"),
273
- "../accountFormats/MU.json": () => import("./MU-DBxbxtCc.js"),
274
- "../accountFormats/MX.json": () => import("./MX-CpfL1ST0.js"),
275
- "../accountFormats/MY.json": () => import("./MY-CjgB7eRq.js"),
276
- "../accountFormats/NC.json": () => import("./NC-D5OXrDk6.js"),
277
- "../accountFormats/NL.json": () => import("./NL-DxDWAhWb.js"),
278
- "../accountFormats/NO.json": () => import("./NO-83fYOKf1.js"),
279
- "../accountFormats/NZ.json": () => import("./NZ-Crh2TDD4.js"),
280
- "../accountFormats/PE.json": () => import("./PE-DxCfusfF.js"),
281
- "../accountFormats/PF.json": () => import("./PF-DddITsRG.js"),
282
- "../accountFormats/PH.json": () => import("./PH-DHR3AJOX.js"),
283
- "../accountFormats/PK.json": () => import("./PK-uR-uI9XE.js"),
284
- "../accountFormats/PL.json": () => import("./PL-4X3KQ-6D.js"),
285
- "../accountFormats/PM.json": () => import("./PM-J_ye5Ns4.js"),
286
- "../accountFormats/PR.json": () => import("./PR-Dnb-cufj.js"),
287
- "../accountFormats/PS.json": () => import("./PS-gVtrdKlM.js"),
288
- "../accountFormats/PT.json": () => import("./PT-NogRnYEa.js"),
289
- "../accountFormats/QA.json": () => import("./QA-l89UOki6.js"),
290
- "../accountFormats/RE.json": () => import("./RE-DGehC_Af.js"),
291
- "../accountFormats/RO.json": () => import("./RO-CKCsSkd5.js"),
292
- "../accountFormats/RS.json": () => import("./RS-DKDvipdg.js"),
293
- "../accountFormats/RU.json": () => import("./RU-B1X18ahq.js"),
294
- "../accountFormats/SA.json": () => import("./SA-D1szLXPX.js"),
295
- "../accountFormats/SE.json": () => import("./SE-D4LKsuFB.js"),
296
- "../accountFormats/SG.json": () => import("./SG-kV7pRclk.js"),
297
- "../accountFormats/SI.json": () => import("./SI-DQnIQGQL.js"),
298
- "../accountFormats/SJ.json": () => import("./SJ-jUXC80-A.js"),
299
- "../accountFormats/SK.json": () => import("./SK-DufDExXE.js"),
300
- "../accountFormats/SM.json": () => import("./SM-BHAjIeix.js"),
301
- "../accountFormats/TF.json": () => import("./TF-xxFWMPr1.js"),
302
- "../accountFormats/TH.json": () => import("./TH-BHQhWh6e.js"),
303
- "../accountFormats/TL.json": () => import("./TL--xOT2kon.js"),
304
- "../accountFormats/TN.json": () => import("./TN-D8nIYpxU.js"),
305
- "../accountFormats/TR.json": () => import("./TR-DE0yFKwk.js"),
306
- "../accountFormats/TT.json": () => import("./TT-D-Xuk3av.js"),
307
- "../accountFormats/TW.json": () => import("./TW-BXy6fmM-.js"),
308
- "../accountFormats/UA.json": () => import("./UA-DuesOnZ3.js"),
309
- "../accountFormats/US.json": () => import("./US-lf3_wi4x.js"),
310
- "../accountFormats/UY.json": () => import("./UY-ooDvgOCp.js"),
311
- "../accountFormats/VA.json": () => import("./VA-BtG4dklK.js"),
312
- "../accountFormats/VG.json": () => import("./VG-jkoggSAn.js"),
313
- "../accountFormats/VI.json": () => import("./VI-CNcP7lBR.js"),
314
- "../accountFormats/VN.json": () => import("./VN-BfNmrGIx.js"),
315
- "../accountFormats/WF.json": () => import("./WF-CpPrQMR1.js"),
316
- "../accountFormats/YT.json": () => import("./YT-Cv6GDgqv.js"),
317
- "../accountFormats/ZA.json": () => import("./ZA-BF5MYrTa.js")
318
- });
319
- var getAccountFormatsForCountry = async (country) => {
320
- const importForCountry = accountFormatsImports[`../accountFormats/${country}.json`];
321
- if (!importForCountry) throw Error(`No account formats available for ${country}`);
322
- return {
323
- ...(await importForCountry()).default,
324
- numberAndBic: {
325
- bankStatementRequirement: "OPTIONAL",
326
- fields: ["bankAccountNumber", "swiftCode"]
327
- }
328
- };
329
- };
330
- //#endregion
331
- //#region src/api/documentValidation/useDocumentMultipartValidate.ts
332
- var validateDocumentMultipart = async (context, request) => {
333
- const { baseUrl, rootLegalEntityId } = context;
334
- const formData = new FormData();
335
- formData.append("file", request.file, request.fileName);
336
- formData.append("fileName", request.fileName);
337
- formData.append("documentType", request.documentType);
338
- formData.append("sessionId", request.sessionId);
339
- return httpPost({
340
- baseUrl,
341
- path: `legalEntities/${rootLegalEntityId}/genai/classifyDocument`
342
- }, formData);
343
- };
344
- var useValidateDocumentMultipart = (options) => {
345
- const { rootLegalEntityId, baseUrl } = useApiContext();
346
- return useMutation({
347
- mutationFn: (payload) => validateDocumentMultipart({
348
- rootLegalEntityId: rootLegalEntityId.value,
349
- baseUrl: baseUrl.value
350
- }, payload),
351
- retry: 0,
352
- ...options
353
- });
354
- };
355
- //#endregion
356
- //#region src/components/ui/molecules/Dropzone/FilePicker.tsx
357
- function FilePicker({ files, setFiles, isValid, errorMessage, multiple = false, label, name, iconPrefix = "generic-document", enableTracking = false, id, loading, allowedFileTypes, maxSize, isOptional, maxNumberOfFiles, "aria-describedby": ariaDescribedBy, "aria-labelledby": ariaLabelledBy }) {
358
- const { t } = useTranslation("ui");
359
- const userEvents = useAnalyticsContext();
360
- const fileInput = useRef$1(null);
361
- const [dragged, setDragged] = useState$1(false);
362
- const hasRequiredError = errorMessage === "fieldIsRequired";
363
- const showDropzone = files.length < maxNumberOfFiles;
364
- const openFilePicker = () => fileInput.current?.click();
365
- const handleFileDelete = (fileToDelete) => {
366
- setFiles(files.filter((file) => file !== fileToDelete));
367
- if (enableTracking) userEvents.addFieldEvent("Interacted with form field", {
368
- actionType: "remove",
369
- field: name || "dropzone"
370
- });
371
- };
372
- const handleDragEnter = (e) => {
373
- e.preventDefault();
374
- e.stopPropagation();
375
- };
376
- const handleDragLeave = (e) => {
377
- e.preventDefault();
378
- e.stopPropagation();
379
- setDragged(false);
380
- };
381
- const handleDragOver = (e) => {
382
- e.preventDefault();
383
- e.stopPropagation();
384
- setDragged(true);
385
- };
386
- const handleDrop = (e) => {
387
- e.preventDefault();
388
- e.stopPropagation();
389
- if (e.dataTransfer) addFiles(e.dataTransfer.files);
390
- setDragged(false);
391
- };
392
- const handleFilesChosen = (e) => {
393
- const fileInput = e.currentTarget;
394
- if (fileInput.files) addFiles(fileInput.files);
395
- };
396
- const addFiles = (newFiles) => {
397
- if (enableTracking) userEvents.addFieldEvent("Interacted with form field", {
398
- actionType: "change",
399
- field: name || "dropzone"
400
- });
401
- setFiles([...newFiles, ...files]);
402
- };
403
- const allowedFileTypesString = allowedFileTypes.join(", ");
404
- return /* @__PURE__ */ jsxs("div", { children: [
405
- label && /* @__PURE__ */ jsx("div", {
406
- className: cx("adyen-kyc-label__text", { "adyen-kyc-label__text--error": hasRequiredError }),
407
- children: label
408
- }),
409
- files.map((file) => /* @__PURE__ */ jsx(DropzoneFile, {
410
- file,
411
- onDelete: () => {
412
- handleFileDelete(file);
413
- },
414
- errorMessage,
415
- iconPrefix,
416
- loading
417
- }, file)),
418
- showDropzone && /* @__PURE__ */ jsxs("div", {
419
- role: "region",
420
- className: cx("adyen-kyc-dropzone", {
421
- "adyen-kyc-dropzone--dragged": dragged,
422
- "adyen-kyc-dropzone--error": !dragged && hasRequiredError
423
- }),
424
- onDrop: handleDrop,
425
- onDragOver: handleDragOver,
426
- onDragEnter: handleDragEnter,
427
- onDragLeave: handleDragLeave,
428
- children: [
429
- /* @__PURE__ */ jsx("div", {
430
- className: "adyen-kyc-dropzone__icon",
431
- children: /* @__PURE__ */ jsx(Icon, { name: "upload" })
432
- }),
433
- /* @__PURE__ */ jsxs("div", {
434
- className: "adyen-kyc-dropzone__labels",
435
- children: [
436
- /* @__PURE__ */ jsx(Typography, {
437
- el: "h4",
438
- variant: "body-strongest",
439
- children: t(($) => $["dropFileToUpload"])
440
- }),
441
- /* @__PURE__ */ jsx(Typography, {
442
- color: "secondary",
443
- children: t(($) => $["supportedFileTypes"], { fileTypes: allowedFileTypesString })
444
- }),
445
- /* @__PURE__ */ jsx(Typography, {
446
- color: "secondary",
447
- children: t(($) => $["maxFileSizeOnly"], { maxSize: bytesToSize(maxSize) })
448
- }),
449
- /* @__PURE__ */ jsx(Typography, {
450
- color: "secondary",
451
- children: t(($) => $["upToFiles"], { maxFiles: maxNumberOfFiles })
452
- })
453
- ]
454
- }),
455
- /* @__PURE__ */ jsx("div", {
456
- className: "adyen-kyc-dropzone__button",
457
- children: /* @__PURE__ */ jsx(Button, {
458
- onClick: openFilePicker,
459
- variant: "secondary",
460
- children: t(($) => $["browseFiles"])
461
- })
462
- }),
463
- /* @__PURE__ */ jsx("input", {
464
- id,
465
- className: "adyen-kyc-dropzone__input",
466
- ref: fileInput,
467
- multiple,
468
- accept: allowedFileTypesString,
469
- onChange: handleFilesChosen,
470
- type: "file",
471
- "aria-required": !isOptional,
472
- "aria-describedby": ariaDescribedBy,
473
- "aria-labelledby": ariaLabelledBy,
474
- "data-testid": "hidden-file-input",
475
- "aria-invalid": !isValid
476
- })
477
- ]
478
- }),
479
- hasRequiredError && /* @__PURE__ */ jsx("div", {
480
- className: "adyen-kyc-error-text",
481
- children: t(($) => $["fieldIsRequired"])
482
- })
483
- ] });
484
- }
485
- //#endregion
486
- //#region src/components/BankAccount/fields/BankAccountNumber/fieldConfig.ts
487
- var simpleBankAccountNumberMetadata = (example, length, maxLength) => {
488
- if (maxLength) return {
489
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length},${maxLength}}$`)),
490
- mask: { mask: makeMask(...numericInputs(length), ...numericInputs(maxLength - length, true)) },
491
- guidanceText: {
492
- key: "enterAMaximumOfNDigitsForExample",
493
- values: {
494
- maxDigits: `${maxLength}`,
495
- example
496
- }
497
- }
498
- };
499
- return {
500
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
501
- mask: { mask: makeMask(...numericInputs(length)) },
502
- guidanceText: {
503
- key: "enterNDigitsForExample",
504
- values: {
505
- numDigits: `${length}`,
506
- example
507
- }
508
- }
509
- };
510
- };
511
- var defaultFieldMetadata$3 = { validators: isNotEmptyValidator };
512
- var defaultFieldConfig$3 = {
513
- [CountryCodes.CzechRepublic]: {
514
- validators: validatePatternOnBlur(/^((\d{2}|\d{6})-)?\d*\d{2}$/),
515
- mask: { mask: makeMask(...numericInputs(2), ...customInputs(1, /-|\d/), ...numericInputs(3), ...customInputs(1, /-|\d/), ...numericInputs(10)) },
516
- guidanceText: {
517
- key: "enterXToYDigitsWithOrWithoutPrefixForExample",
518
- values: {
519
- minDigits: "2",
520
- maxDigits: "16",
521
- firstExample: "19-123457",
522
- secondExample: "123457"
523
- }
524
- }
525
- },
526
- [CountryCodes.Denmark]: simpleBankAccountNumberMetadata("2621955959", 10),
527
- [CountryCodes.Norway]: simpleBankAccountNumberMetadata("86011117947", 11),
528
- [CountryCodes.UnitedKingdom]: simpleBankAccountNumberMetadata("10000003", 8),
529
- [CountryCodes.Australia]: simpleBankAccountNumberMetadata("0001234", 5, 10),
530
- [CountryCodes.Brazil]: simpleBankAccountNumberMetadata("0009795493", 4, 12),
531
- [CountryCodes.Canada]: simpleBankAccountNumberMetadata("10220001111", 5, 12),
532
- [CountryCodes.HongKong]: {
533
- validators: validatePatternOnBlur(new RegExp(`^\\d{6,18}$`)),
534
- mask: { mask: makeMask(...numericInputs(6), ...numericInputs(12, true)) },
535
- guidanceText: {
536
- key: "enterAccountNumberWithBranchCodeForExample",
537
- values: {
538
- minDigits: "9",
539
- maxDigits: "15",
540
- example: "790000000"
541
- }
542
- }
543
- },
544
- [CountryCodes.Hungary]: simpleBankAccountNumberMetadata("117730161111101800000000", 24),
545
- [CountryCodes.Singapore]: simpleBankAccountNumberMetadata("0052312891876", 4, 19),
546
- [CountryCodes.Sweden]: simpleBankAccountNumberMetadata("123456789", 7, 10),
547
- [CountryCodes.UnitedStates]: simpleBankAccountNumberMetadata("10220001111", 3, 17),
548
- [CountryCodes.Poland]: {
549
- validators: validatePatternOnBlur(/^\d{26}$/),
550
- mask: { mask: makeMask(...numericInputs(2), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4)) },
551
- guidanceText: {
552
- key: "enterNDigitsForExample",
553
- values: {
554
- numDigits: "26",
555
- example: "98 1090 2402 7474 4662 2173 1624"
556
- }
557
- }
558
- },
559
- [CountryCodes.NewZealand]: {
560
- validators: validatePatternOnBlur(/^\d{15,16}$/),
561
- mask: { mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(4), ...nonInputs(" - "), ...numericInputs(7), ...nonInputs(" - "), ...numericInputs(2), ...numericInputs(1, true)) },
562
- guidanceText: {
563
- key: "enterXToYDigitsForExample",
564
- values: {
565
- minDigits: "15",
566
- maxDigits: "16",
567
- example: "12-8765-9876543-043"
568
- }
569
- }
570
- }
571
- };
572
- //#endregion
573
- //#region src/components/BankAccount/fields/BankCode/fieldConfig.ts
574
- var defaultFieldMetadata$2 = {
575
- label: "bankCode",
576
- validators: isNotEmptyValidator
577
- };
578
- var simpleBankCodeMetadata = (length, example, label) => ({
579
- label: label ?? "bankCode",
580
- validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
581
- mask: { mask: makeMask(...numericInputs(length)) },
582
- guidanceText: {
583
- key: "enterNDigitsForExample",
584
- values: {
585
- numDigits: `${length}`,
586
- example
587
- }
588
- }
589
- });
590
- var defaultFieldConfig$2 = {
591
- [CountryCodes.Brazil]: simpleBankCodeMetadata(3, "123"),
592
- [CountryCodes.Canada]: simpleBankCodeMetadata(3, "001", "institutionNumber"),
593
- [CountryCodes.CzechRepublic]: simpleBankCodeMetadata(4, "0800"),
594
- [CountryCodes.Denmark]: simpleBankCodeMetadata(4, "5051"),
595
- [CountryCodes.HongKong]: simpleBankCodeMetadata(3, "250"),
596
- [CountryCodes.Norway]: simpleBankCodeMetadata(4, "8601"),
597
- [CountryCodes.Ecuador]: simpleBankCodeMetadata(4, "1234"),
598
- [CountryCodes.Japan]: simpleBankCodeMetadata(4, "1234"),
599
- [CountryCodes.Taiwan]: simpleBankCodeMetadata(3, "123")
600
- };
601
- //#endregion
602
- //#region src/components/BankAccount/fields/BranchCode/fieldConfig.ts
603
- var defaultFieldMetadata$1 = {
604
- label: "branchCode",
605
- validators: isNotEmptyValidator
606
- };
607
- var defaultFieldConfig$1 = {
608
- [CountryCodes.UnitedKingdom]: {
609
- label: "sortCode",
610
- validators: validatePatternOnBlur(/^\d{6}$/),
611
- mask: { mask: makeMask(...numericInputs(6)) },
612
- guidanceText: {
613
- key: "enterNDigitsForExample",
614
- values: {
615
- numDigits: "6",
616
- example: "401199"
617
- }
618
- }
619
- },
620
- [CountryCodes.Australia]: {
621
- label: "bsbNumber",
622
- validators: validatePatternOnBlur(/^\d{6}$/),
623
- mask: { mask: makeMask(...numericInputs(3), ...nonInputs(" - "), ...numericInputs(3)) },
624
- guidanceText: {
625
- key: "enterNDigitsForExample",
626
- values: {
627
- numDigits: "6",
628
- example: "033-547"
629
- }
630
- }
631
- },
632
- [CountryCodes.Brazil]: {
633
- label: "branchCode",
634
- validators: validatePatternOnBlur(/^\d{1,5}$/),
635
- mask: { mask: makeMask(...numericInputs(1), ...numericInputs(4, true)) },
636
- guidanceText: {
637
- key: "enterAMaximumOfNDigitsForExample",
638
- values: {
639
- maxDigits: "5",
640
- example: "36257"
641
- }
642
- }
643
- },
644
- [CountryCodes.Canada]: {
645
- label: "transitNumber",
646
- validators: validatePatternOnBlur(/^\d{5}$/),
647
- mask: { mask: makeMask(...numericInputs(5)) },
648
- guidanceText: {
649
- key: "enterNDigitsForExample",
650
- values: {
651
- numDigits: "5",
652
- example: "27601"
653
- }
654
- }
655
- },
656
- [CountryCodes.UnitedStates]: {
657
- label: "routingNumber",
658
- validators: validatePatternOnBlur(/^\d{9}$/),
659
- mask: { mask: makeMask(...numericInputs(9)) },
660
- guidanceText: {
661
- key: "enterNDigitsForExample",
662
- values: {
663
- numDigits: "9",
664
- example: "107005432"
665
- }
666
- }
667
- },
668
- [CountryCodes.Sweden]: {
669
- label: "branchCode",
670
- validators: validatePatternOnBlur(/^(\d{4}|8\d{4})$/),
671
- mask: { mask: makeMask(...numericInputs(4), ...nonInputs(" - ", { displayEagerly: false }), ...numericInputs(1, true)) },
672
- guidanceText: {
673
- key: "enterXOrYDigitsForExample",
674
- values: {
675
- xDigits: "4",
676
- yDigits: "5",
677
- example: "5678 or 8635-2"
678
- }
679
- }
680
- },
681
- [CountryCodes.Indonesia]: {
682
- label: "clearingCode",
683
- validators: isNotEmptyValidator
684
- }
685
- };
686
- //#endregion
687
- //#region src/components/BankAccount/fields/Iban/ibanValidator.ts
688
- /**
689
- * Basic Bank Account Number pattern per country
690
- */
691
- var bbanPatternsByCountry = {
692
- [CountryCodes.Albania]: /\d{8}[\dA-Z]{16}/,
693
- [CountryCodes.Andorra]: /\d{8}[\dA-Z]{12}/,
694
- [CountryCodes.Austria]: /\d{16}/,
695
- [CountryCodes.Azerbaijan]: /[\dA-Z]{4}\d{20}/,
696
- [CountryCodes.Belgium]: /\d{12}/,
697
- [CountryCodes.Bahrain]: /[A-Z]{4}[\dA-Z]{14}/,
698
- [CountryCodes.BosniaAndHerzegovina]: /\d{16}/,
699
- [CountryCodes.Brazil]: /\d{23}[A-Z][\dA-Z]/,
700
- [CountryCodes.Bulgaria]: /[A-Z]{4}\d{6}[\dA-Z]{8}/,
701
- [CountryCodes.CostaRica]: /\d{17}/,
702
- [CountryCodes.Croatia]: /\d{17}/,
703
- [CountryCodes.Cyprus]: /\d{8}[\dA-Z]{16}/,
704
- [CountryCodes.CzechRepublic]: /\d{20}/,
705
- [CountryCodes.Denmark]: /\d{14}/,
706
- [CountryCodes.DominicanRepublic]: /[A-Z]{4}\d{20}/,
707
- [CountryCodes.Estonia]: /\d{16}/,
708
- [CountryCodes.FaroeIslands]: /\d{14}/,
709
- [CountryCodes.Finland]: /\d{14}/,
710
- [CountryCodes.France]: /\d{10}[\dA-Z]{11}\d{2}/,
711
- [CountryCodes.Georgia]: /[\dA-Z]{2}\d{16}/,
712
- [CountryCodes.Germany]: /\d{18}/,
713
- [CountryCodes.Gibraltar]: /[A-Z]{4}[\dA-Z]{15}/,
714
- [CountryCodes.Greece]: /\d{7}[\dA-Z]{16}/,
715
- [CountryCodes.Greenland]: /\d{14}/,
716
- [CountryCodes.Guatemala]: /[\dA-Z]{4}[\dA-Z]{20}/,
717
- [CountryCodes.Hungary]: /\d{24}/,
718
- [CountryCodes.Iceland]: /\d{22}/,
719
- [CountryCodes.Ireland]: /[\dA-Z]{4}\d{14}/,
720
- [CountryCodes.Israel]: /\d{19}/,
721
- [CountryCodes.Italy]: /[A-Z]\d{10}[\dA-Z]{12}/,
722
- [CountryCodes.Kazakhstan]: /\d{3}[\dA-Z]{13}/,
723
- [CountryCodes.Kuwait]: /[A-Z]{4}[\dA-Z]{22}/,
724
- [CountryCodes.Latvia]: /[A-Z]{4}[\dA-Z]{13}/,
725
- [CountryCodes.Lebanon]: /\d{4}[\dA-Z]{20}/,
726
- [CountryCodes.Liechtenstein]: /\d{5}[\dA-Z]{12}/,
727
- [CountryCodes.Lithuania]: /\d{16}/,
728
- [CountryCodes.Luxembourg]: /\d{3}[\dA-Z]{13}/,
729
- [CountryCodes.Macedonia]: /\d{3}[\dA-Z]{10}\d{2}/,
730
- [CountryCodes.Malta]: /[A-Z]{4}\d{5}[\dA-Z]{18}/,
731
- [CountryCodes.Mauritania]: /\d{23}/,
732
- [CountryCodes.Mauritius]: /[A-Z]{4}\d{19}[A-Z]{3}/,
733
- [CountryCodes.Monaco]: /\d{10}[\dA-Z]{11}\d{2}/,
734
- [CountryCodes.Moldova]: /[\dA-Z]{2}\d{18}/,
735
- [CountryCodes.Montenegro]: /\d{18}/,
736
- [CountryCodes.Netherlands]: /[A-Z]{4}\d{10}/,
737
- [CountryCodes.Norway]: /\d{11}/,
738
- [CountryCodes.Pakistan]: /[\dA-Z]{4}\d{16}/,
739
- [CountryCodes.PalestinianTerritory]: /[\dA-Z]{4}\d{21}/,
740
- [CountryCodes.Poland]: /\d{24}/,
741
- [CountryCodes.Portugal]: /\d{21}/,
742
- [CountryCodes.Romania]: /[A-Z]{4}[\dA-Z]{16}/,
743
- [CountryCodes.SanMarino]: /[A-Z]\d{10}[\dA-Z]{12}/,
744
- [CountryCodes.SaudiArabia]: /\d{2}[\dA-Z]{18}/,
745
- [CountryCodes.Serbia]: /\d{18}/,
746
- [CountryCodes.Slovakia]: /\d{20}/,
747
- [CountryCodes.Slovenia]: /\d{15}/,
748
- [CountryCodes.Spain]: /\d{20}/,
749
- [CountryCodes.Sweden]: /\d{20}/,
750
- [CountryCodes.Switzerland]: /\d{5}[\dA-Z]{12}/,
751
- [CountryCodes.Tunisia]: /\d{20}/,
752
- [CountryCodes.Turkey]: /\d{5}[\dA-Z]{17}/,
753
- [CountryCodes.UnitedArabEmirates]: /\d{3}\d{16}/,
754
- [CountryCodes.UnitedKingdom]: /[A-Z]{4}\d{14}/,
755
- [CountryCodes.VirginIslandsBritish]: /[\dA-Z]{4}\d{16}/
756
- };
757
- /**
758
- * For some regions the iban format is shared and therefore can accept IBANs starting
759
- * with some other country code
760
- */
761
- var customPrefixByCountry = {
762
- [CountryCodes.Guernsey]: "GB",
763
- [CountryCodes.Jersey]: "GB",
764
- [CountryCodes.IsleOfMan]: "GB"
765
- };
766
- function ibanValidator(input, bankCountry) {
767
- if (isEmpty(input)) return false;
768
- const ibanInput = input.replace(/ /g, "").toUpperCase();
769
- if (!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(ibanInput)) return false;
770
- const countryCode = ibanInput.substring(0, 2);
771
- const allowedPrefix = customPrefixByCountry[bankCountry] ?? bankCountry;
772
- if (countryCode !== allowedPrefix) return {
773
- key: "yourIbanShouldBeginWith_",
774
- values: { countryCode: allowedPrefix }
775
- };
776
- const bbanPattern = bbanPatternsByCountry[countryCode];
777
- if (bbanPattern) {
778
- if (!new RegExp(`^[A-Z]{2}\\d{2}${bbanPattern.source}$`, "").test(ibanInput)) return false;
779
- }
780
- const ibanCheck = ibanInput.substring(4, ibanInput.length) + ibanInput.substring(0, 4);
781
- let leadingZeroes = true;
782
- let ibanCheckDigits = "";
783
- for (let i = 0; i < ibanCheck.length; i += 1) {
784
- const charAt = ibanCheck.charAt(i);
785
- if (charAt !== "0") leadingZeroes = false;
786
- if (!leadingZeroes) ibanCheckDigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
787
- }
788
- let cRest = 0;
789
- for (let p = 0; p < ibanCheckDigits.length; p += 1) {
790
- const cChar = ibanCheckDigits.charAt(p);
791
- cRest = +`${cRest}${cChar}` % 97;
792
- }
793
- return cRest === 1;
794
- }
795
- //#endregion
796
- //#region src/components/BankAccount/fields/Iban/fieldConfig.ts
797
- var validateIbanOnBlurAndInput = (country) => ({
798
- modes: ["blur", "input"],
799
- validate: (iban) => ibanValidator(iban, country) === true,
800
- errorMessage: (iban) => {
801
- const result = ibanValidator(iban, country);
802
- return typeof result === "boolean" ? void 0 : result;
803
- }
804
- });
805
- var ibanMask = (country, inputLength, allowLettersInBban) => {
806
- const tokens = [];
807
- tokens.push(...nonInputs(country, { includeInValue: true }), ...numericInputs(2));
808
- inputLength -= 2;
809
- const inputToken = allowLettersInBban ? alphanumericInputs : numericInputs;
810
- const numGroups = Math.floor(inputLength / 4);
811
- const remainder = inputLength % 4;
812
- for (let i = 0; i < numGroups; i += 1) tokens.push(spacer, ...inputToken(4));
813
- if (remainder > 0) tokens.push(spacer, ...inputToken(remainder));
814
- return {
815
- mask: makeMask(...tokens),
816
- transformOnType: allowLettersInBban ? uppercase : void 0
817
- };
818
- };
819
- var ibanGuidance = (type, numDigitsOrChars, example) => type === "digits" ? {
820
- key: "enterTheRemainingNDigitsForExample",
821
- values: {
822
- numDigits: `${numDigitsOrChars}`,
823
- example
824
- }
825
- } : {
826
- key: "enterTheRemainingNCharactersForExample",
827
- values: {
828
- numChars: `${numDigitsOrChars}`,
829
- example
830
- }
831
- };
832
- var ibanMetadata = (country, inputLength, example, allowLettersInBban) => ({
833
- validators: validateIbanOnBlurAndInput(country),
834
- mask: ibanMask(country, inputLength, allowLettersInBban),
835
- guidanceText: ibanGuidance(allowLettersInBban ? "characters" : "digits", inputLength, example)
836
- });
837
- var gbIbanMetadata = ibanMetadata(CountryCodes.UnitedKingdom, 20, "GB09 BARC 2003 9554 8297 59", true);
838
- var defaultFieldMetadata = { validators: isNotEmptyValidator };
839
- var defaultFieldConfig = {
840
- [CountryCodes.Austria]: ibanMetadata(CountryCodes.Austria, 18, "AT88 5400 0746 7265 9747"),
841
- [CountryCodes.Belgium]: ibanMetadata(CountryCodes.Belgium, 14, "BE59 9788 6743 2226"),
842
- [CountryCodes.Croatia]: ibanMetadata(CountryCodes.Croatia, 19, "HR51 2484 0083 5929 6973 8"),
843
- [CountryCodes.Cyprus]: ibanMetadata(CountryCodes.Cyprus, 26, "CY17 0020 0128 0000 0012 0052 7600"),
844
- [CountryCodes.CzechRepublic]: ibanMetadata(CountryCodes.CzechRepublic, 22, "CZ65 0800 0000 1920 0014 5399"),
845
- [CountryCodes.Denmark]: ibanMetadata(CountryCodes.Denmark, 16, "DK95 2000 0123 4567 89"),
846
- [CountryCodes.Estonia]: ibanMetadata(CountryCodes.Estonia, 18, "EE26 1291 5123 1542 6371"),
847
- [CountryCodes.Finland]: ibanMetadata(CountryCodes.Finland, 16, "FI21 1234 5600 0007 85"),
848
- [CountryCodes.Germany]: ibanMetadata(CountryCodes.Germany, 20, "DE91 1000 0000 0123 4567 89"),
849
- [CountryCodes.Greece]: ibanMetadata(CountryCodes.Greece, 25, "GR57 0107 7142 7681 6687 9575 217"),
850
- [CountryCodes.Hungary]: ibanMetadata(CountryCodes.Hungary, 26, "HU68 1070 0024 3428 4128 3192 4812"),
851
- [CountryCodes.Lithuania]: ibanMetadata(CountryCodes.Lithuania, 18, "LT12 1000 0111 0100 1000"),
852
- [CountryCodes.Luxembourg]: ibanMetadata(CountryCodes.Luxembourg, 18, "LU28 0019 4006 4475 0000"),
853
- [CountryCodes.Norway]: ibanMetadata(CountryCodes.Norway, 13, "NO83 3000 1234 567"),
854
- [CountryCodes.Poland]: ibanMetadata(CountryCodes.Poland, 26, "PL98 1090 2402 7474 4662 2173 1624"),
855
- [CountryCodes.Portugal]: ibanMetadata(CountryCodes.Portugal, 23, "PT42 0035 0651 8646 9119 5263 5"),
856
- [CountryCodes.Slovakia]: ibanMetadata(CountryCodes.Slovakia, 22, "SK25 5173 1333 4916 3219 3521"),
857
- [CountryCodes.Slovenia]: ibanMetadata(CountryCodes.Slovenia, 17, "SI56 1920 0123 4567 892"),
858
- [CountryCodes.Spain]: ibanMetadata(CountryCodes.Spain, 22, "ES91 2100 0418 4502 0005 1332"),
859
- [CountryCodes.Sweden]: ibanMetadata(CountryCodes.Sweden, 22, "SE72 8000 0810 3400 0978 3242"),
860
- [CountryCodes.Bulgaria]: ibanMetadata(CountryCodes.Bulgaria, 20, "BG17 BNPA 9440 4432 7749 93", true),
861
- [CountryCodes.France]: ibanMetadata(CountryCodes.France, 25, "FR64 1009 6000 4035 3425 9742 Y90", true),
862
- [CountryCodes.Gibraltar]: ibanMetadata(CountryCodes.Gibraltar, 21, "GI75 NWBK 0000 0000 7099 453", true),
863
- [CountryCodes.Ireland]: ibanMetadata(CountryCodes.Ireland, 20, "IE64 IRCE 9205 0112 3456 78", true),
864
- [CountryCodes.Italy]: ibanMetadata(CountryCodes.Italy, 25, "IT06 L030 0203 2809 8485 8934 882", true),
865
- [CountryCodes.Latvia]: ibanMetadata(CountryCodes.Latvia, 19, "LV80 BANK 0000 4351 9500 1", true),
866
- [CountryCodes.Liechtenstein]: ibanMetadata(CountryCodes.Liechtenstein, 19, "LI21 0881 0000 2324 013A A", true),
867
- [CountryCodes.Malta]: ibanMetadata(CountryCodes.Malta, 29, "MT84 MALT 0110 0001 2345 MTLC AST0 01S", true),
868
- [CountryCodes.Monaco]: ibanMetadata(CountryCodes.Monaco, 25, "MC58 1122 2000 0101 2345 6789 030", true),
869
- [CountryCodes.Netherlands]: ibanMetadata(CountryCodes.Netherlands, 16, "NL50 ABNA 4452 7591 49", true),
870
- [CountryCodes.Romania]: ibanMetadata(CountryCodes.Romania, 22, "RO36 PORL 9596 9966 4965 4284", true),
871
- [CountryCodes.Switzerland]: ibanMetadata(CountryCodes.Switzerland, 19, "CH56 0483 5012 3456 7800 9", true),
872
- [CountryCodes.UnitedKingdom]: gbIbanMetadata,
873
- [CountryCodes.Guernsey]: gbIbanMetadata,
874
- [CountryCodes.Jersey]: gbIbanMetadata,
875
- [CountryCodes.IsleOfMan]: gbIbanMetadata
876
- };
877
- //#endregion
878
- //#region src/components/BankAccount/fields/SwiftCode/fieldConfig.ts
879
- var swiftCodeFieldMetadata = {
880
- validators: validatePatternOnBlur(/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/),
881
- mask: {
882
- mask: makeMask(...alphaInputs(6), ...alphanumericInputs(2), ...alphanumericInputs(3, true)),
883
- transformOnType: uppercase
884
- }
885
- };
886
- //#endregion
887
- //#region src/components/BankAccount/forms/BankDocument/validate.ts
888
- var bankDocumentValidationRules = { description: {
889
- modes: ["blur"],
890
- validate: (description) => description ? bankStatementDescriptionPattern.test(description) : true,
891
- errorMessage: "invalidFormatBankStatementDescription"
892
- } };
893
- //#endregion
894
- //#region src/components/BankAccount/forms/BankVerification/validate.ts
895
- var bankVerificationValidationRules = {
896
- verifiedAccountHolder: {
897
- modes: ["blur"],
898
- validate: (verifiedAccountHolder) => !isEmpty(verifiedAccountHolder),
899
- errorMessage: "fieldIsRequired"
900
- },
901
- verifiedBankCountry: {
902
- modes: ["blur"],
903
- validate: (verifiedBankCountry) => !isEmpty(verifiedBankCountry),
904
- errorMessage: "fieldIsRequired"
905
- },
906
- verifiedBankName: {
907
- modes: ["blur"],
908
- validate: (verifiedBankName) => !isEmpty(verifiedBankName),
909
- errorMessage: "fieldIsRequired"
910
- },
911
- verifiedCurrencyCode: {
912
- modes: ["blur"],
913
- validate: (verifiedCurrencyCode) => !isEmpty(verifiedCurrencyCode),
914
- errorMessage: "fieldIsRequired"
915
- },
916
- verifiedBankAccountNumber: {
917
- modes: ["blur"],
918
- validate: (verifiedBankAccountNumber) => !isEmpty(verifiedBankAccountNumber),
919
- errorMessage: "fieldIsRequired"
920
- }
921
- };
922
- //#endregion
923
- //#region src/components/BankAccount/tasks/PayoutDetailsDropin/validate.ts
924
- var bankStatementValidationOptions = {
925
- ...defaultFileValidationOptions,
926
- isOptional: false
927
- };
928
- function payoutCountryDetailsValidators() {
929
- return {};
930
- }
931
- function payoutVerificationMethodValidators() {
932
- return { payoutVerificationMethod: {
933
- modes: ["blur"],
934
- validate: (payoutVerificationMethod) => !!payoutVerificationMethod
935
- } };
936
- }
937
- function payoutAccountDetailsValidators({ country }) {
938
- const branchCodeMetadata = resolveFieldMetadata(defaultFieldConfig$1[country], {}, defaultFieldMetadata$1);
939
- const bankAccountNumberMetadata = resolveFieldMetadata(defaultFieldConfig$3[country], {}, defaultFieldMetadata$3);
940
- const ibanMetadata = resolveFieldMetadata(defaultFieldConfig[country], {}, defaultFieldMetadata);
941
- const bankCodeMetadata = resolveFieldMetadata(defaultFieldConfig$2[country], {}, defaultFieldMetadata$2);
942
- return {
943
- branchCode: branchCodeMetadata.validators,
944
- bankAccountNumber: bankAccountNumberMetadata.validators,
945
- iban: ibanMetadata.validators,
946
- swiftCode: swiftCodeFieldMetadata.validators,
947
- bankCode: bankCodeMetadata.validators
948
- };
949
- }
950
- function payoutAccountDocumentsValidators() {
951
- return {
952
- ...bankDocumentValidationRules,
953
- bankStatementDocument: fileValidationRules(bankStatementValidationOptions)
954
- };
955
- }
956
- function payoutAccountVerificationValidators() {
957
- return bankVerificationValidationRules;
958
- }
959
- var BankDocumentClassification_module_default = {
960
- "requirements-list": "adyen-kyc-requirements-list",
961
- requirementsList: "adyen-kyc-requirements-list",
962
- "file-picker-disabled": "adyen-kyc-file-picker-disabled",
963
- filePickerDisabled: "adyen-kyc-file-picker-disabled",
964
- "review-modal": "adyen-kyc-review-modal",
965
- reviewModal: "adyen-kyc-review-modal",
966
- preview: "adyen-kyc-preview",
967
- "preview-image": "adyen-kyc-preview-image",
968
- previewImage: "adyen-kyc-preview-image",
969
- content: "adyen-kyc-content"
970
- };
971
- //#endregion
972
- //#region src/components/BankAccount/forms/BankDocument/BankDocumentClassification.tsx
973
- var CHARACTERS_LIMIT = 200;
974
- var bankDocumentClassificationFields = ["bankStatementDocument", "description"];
975
- var classifyingDocument = signal(false);
976
- function BankDocumentClassification(props) {
977
- const { legalEntity, validators, data: bankData, id, fieldValidationErrors, formVerificationErrors, shouldValidate, country, handleFieldChange, valid: propValid, errors: propErrors, handleNextClick } = props;
978
- const { t } = useTranslation("banking");
979
- const { t: commonT } = useTranslation("common");
980
- const stateRef = useRef({ setState: null });
981
- const [showReviewModal, setShowReviewModal] = useState(false);
982
- const inputRef = useRef(null);
983
- const logger = createLogger();
984
- const userEvents = useAnalyticsContext();
985
- const formUtils = createFormUtils(props, commonT);
986
- const { isFeatureEnabled } = useToggleContext();
987
- const enableBankDocumentClassification = isFeatureEnabled(FeatureNames.EnableBankDocumentClassification);
988
- const isShadowMode = isFeatureEnabled(FeatureNames.EnableBankDocumentClassificationShadowMode);
989
- const rules = useMemo(() => ({
990
- ...validators || bankDocumentValidationRules,
991
- bankStatementDocument: fileValidationRules(bankStatementValidationOptions)
992
- }), [validators]);
993
- const localForm = useForm({
994
- ...props,
995
- schema: bankDocumentClassificationFields,
996
- defaultData: bankData,
997
- rules,
998
- fieldProblems: fieldValidationErrors,
999
- shouldValidate
1000
- });
1001
- const useMultiFormMode = !!handleFieldChange;
1002
- const data = useMultiFormMode ? bankData : localForm.data;
1003
- const valid = useMultiFormMode ? propValid : localForm.valid;
1004
- const errors = useMultiFormMode ? propErrors : localForm.errors;
1005
- const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
1006
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1007
- const { triggerValidation, setData } = localForm;
1008
- const validateDocumentMutation = useValidateDocumentMultipart({
1009
- onSuccess: (response) => {
1010
- userEvents.addEvent("Success", {
1011
- actionType: "upload",
1012
- actionLevel: "journey",
1013
- label: isShadowMode ? "bankDocumentClassificationShadowMode" : "bankDocumentClassification",
1014
- additionalData: {
1015
- documentType: response?.documentType,
1016
- subDocumentType: response?.subDocumentType,
1017
- blurryOrLowQuality: response?.blurryOrLowQuality
1018
- }
1019
- });
1020
- if (isShadowMode) return;
1021
- if (response?.blurryOrLowQuality || response?.documentType !== "bankDocument") {
1022
- userEvents.addEvent("Opened modal", {
1023
- actionType: "open",
1024
- actionLevel: "journey",
1025
- label: "bankDocumentClassification"
1026
- });
1027
- setShowReviewModal(true);
1028
- } else handleNextClick?.();
1029
- },
1030
- onError: (error) => {
1031
- userEvents.addEvent("Encountered error", {
1032
- actionType: "upload",
1033
- actionLevel: "journey",
1034
- label: isShadowMode ? "bankDocumentClassificationShadowMode" : "bankDocumentClassification"
1035
- });
1036
- if (isShadowMode) return;
1037
- logger.error("Document validation failed:", error);
1038
- setShowReviewModal(false);
1039
- },
1040
- onSettled: () => {
1041
- classifyingDocument.value = false;
1042
- }
1043
- });
1044
- const handleDocumentUpload = async (files) => {
1045
- handleChange("bankStatementDocument")(files);
1046
- if (!useMultiFormMode) triggerValidation();
1047
- if (!(enableBankDocumentClassification && [
1048
- "US",
1049
- "FR",
1050
- "GB",
1051
- "AU"
1052
- ].includes(country || "") || isShadowMode)) return;
1053
- if (files.length > 0) {
1054
- const file = files[0];
1055
- if (file && file instanceof File) {
1056
- const fileSizeExceedsMax = file.size > bankStatementValidationOptions.maxSize;
1057
- const fileSupportedType = bankStatementValidationOptions.allowedFileTypes.some((filetype) => file.name.toLowerCase().endsWith(filetype.toLowerCase()));
1058
- if (fileSizeExceedsMax || !fileSupportedType) {
1059
- setShowReviewModal(false);
1060
- return;
1061
- }
1062
- try {
1063
- const document = {
1064
- file,
1065
- documentType: "bankStatement",
1066
- fileName: file.name,
1067
- sessionId: legalEntity.id
1068
- };
1069
- setShowReviewModal(false);
1070
- classifyingDocument.value = true;
1071
- validateDocumentMutation.mutate(document);
1072
- } catch (error) {
1073
- logger.error("Error processing document:", error);
1074
- }
1075
- }
1076
- }
1077
- };
1078
- const alreadyUploadedDocuments = useMemo(() => bankData?.bankStatementDocument ?? [], [bankData?.bankStatementDocument]);
1079
- useEffect(() => {
1080
- if (!useMultiFormMode && alreadyUploadedDocuments.length > 0) {
1081
- setData("bankStatementDocument", alreadyUploadedDocuments);
1082
- if (bankData?.description) setData("description", bankData.description);
1083
- triggerValidation();
1084
- }
1085
- }, [
1086
- alreadyUploadedDocuments,
1087
- bankData?.description,
1088
- setData,
1089
- triggerValidation,
1090
- useMultiFormMode
1091
- ]);
1092
- useEffect(() => {
1093
- if (!useMultiFormMode) stateRef.current?.setState?.({
1094
- type: "addToState",
1095
- value: {
1096
- data,
1097
- valid,
1098
- errors,
1099
- fieldProblems,
1100
- dataStoreId: id,
1101
- schema: bankDocumentClassificationFields
1102
- }
1103
- });
1104
- }, [
1105
- data,
1106
- valid,
1107
- errors,
1108
- fieldProblems,
1109
- id,
1110
- useMultiFormMode
1111
- ]);
1112
- const trackModalAction = (reason) => {
1113
- userEvents.addEvent("Clicked button", {
1114
- actionType: "close",
1115
- actionLevel: "journey",
1116
- label: `bankDocumentClassification${reason}`
1117
- });
1118
- };
1119
- const handleUploadNewDocument = () => {
1120
- trackModalAction("UploadNewDocument");
1121
- inputRef.current?.click();
1122
- };
1123
- const handleContinueAnyway = () => {
1124
- setShowReviewModal(false);
1125
- trackModalAction("ContinueAnyway");
1126
- handleNextClick?.();
1127
- };
1128
- const documentPreview = useMemo(() => {
1129
- if (!data?.bankStatementDocument?.[0] || !showReviewModal) return null;
1130
- const file = data.bankStatementDocument?.[0];
1131
- return file.type === "application/pdf" || file.name.toLowerCase().endsWith(".pdf") ? /* @__PURE__ */ jsx("object", {
1132
- width: "100%",
1133
- height: "100%",
1134
- data: URL.createObjectURL(file),
1135
- type: "application/pdf",
1136
- "aria-label": t(($) => $["toVerifyYourPayoutAccount"]),
1137
- "data-testid": "pdf-preview"
1138
- }) : /* @__PURE__ */ jsx("img", {
1139
- src: URL.createObjectURL(file),
1140
- alt: t(($) => $["toVerifyYourPayoutAccount"])
1141
- });
1142
- }, [
1143
- data?.bankStatementDocument,
1144
- showReviewModal,
1145
- t
1146
- ]);
1147
- const documentRequirements = /* @__PURE__ */ jsxs("ul", {
1148
- className: BankDocumentClassification_module_default.requirementsList,
1149
- children: [
1150
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementNameOrBusiness"]) }),
1151
- /* @__PURE__ */ jsx("li", { children: t(($) => $[`documentRequirementAccountNumber${country === "US" ? "Partial" : ""}`]) }),
1152
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementBankInfo"]) }),
1153
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementReadableText"]) })
1154
- ]
1155
- });
1156
- const aiLabelMessage = /* @__PURE__ */ jsx(Typography, {
1157
- className: "adyen-kyc-u-margin-top-16 adyen-kyc-u-margin-bottom-8",
1158
- el: "p",
1159
- color: "secondary",
1160
- variant: "caption",
1161
- children: t(($) => $["weUseAnInternalAITool"])
1162
- });
1163
- return /* @__PURE__ */ jsxs("div", {
1164
- className: BankDocumentClassification_module_default.bankDocumentPage,
1165
- children: [
1166
- /* @__PURE__ */ jsxs("form", {
1167
- className: BankDocumentClassification_module_default.bankDocumentClassification,
1168
- children: [
1169
- !useMultiFormMode && /* @__PURE__ */ jsx(StateContextSetter, {
1170
- owner: id,
1171
- stateRef
1172
- }),
1173
- /* @__PURE__ */ jsx(Header, {
1174
- title: t(($) => $["uploadABankDocument"]),
1175
- description: t(($) => $["toVerifyYourBankAccountDetails"])
1176
- }),
1177
- /* @__PURE__ */ jsx(ErrorPanel, {
1178
- verificationErrors: formVerificationErrors,
1179
- validationErrors: fieldValidationErrors,
1180
- formUtils,
1181
- id: "ariaErrorField"
1182
- }),
1183
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
1184
- el: "h3",
1185
- variant: "body-stronger",
1186
- children: t(($) => $["makeSureYourDocumentIncludes"])
1187
- }), documentRequirements] }),
1188
- /* @__PURE__ */ jsx(Field, {
1189
- className: cx("adyen-kyc-upload-field"),
1190
- name: "bankStatementDocument",
1191
- isValid: valid?.bankStatementDocument ?? true,
1192
- children: (childProps) => /* @__PURE__ */ jsxs("div", {
1193
- className: validateDocumentMutation.isPending && !isShadowMode ? BankDocumentClassification_module_default.filePickerDisabled : "",
1194
- children: [/* @__PURE__ */ jsx(FilePicker, {
1195
- ...childProps,
1196
- name: "bankStatementDocument",
1197
- files: data?.bankStatementDocument ?? [],
1198
- setFiles: handleDocumentUpload,
1199
- isValid: valid?.bankStatementDocument ?? true,
1200
- errorMessage: errors?.bankStatementDocument?.errorMessage,
1201
- loading: validateDocumentMutation.isPending && !isShadowMode,
1202
- enableTracking: true,
1203
- ...bankStatementValidationOptions
1204
- }), enableBankDocumentClassification && aiLabelMessage]
1205
- })
1206
- }),
1207
- data?.bankStatementDocument?.length ? /* @__PURE__ */ jsx(Field, {
1208
- name: "description",
1209
- label: t(($) => $["addADescriptionForThisBankAccount"]),
1210
- errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
1211
- isValid: valid?.description,
1212
- children: (childProps) => /* @__PURE__ */ jsx(TextArea, {
1213
- ...childProps,
1214
- name: "description",
1215
- value: data?.description,
1216
- maxLength: CHARACTERS_LIMIT,
1217
- onInput: handleChange("description"),
1218
- "aria-invalid": valid?.description === false
1219
- })
1220
- }) : void 0
1221
- ]
1222
- }),
1223
- showReviewModal && /* @__PURE__ */ jsx(Modal, {
1224
- ariaLabel: t(($) => $["checkYourBankDocument"]),
1225
- size: "large",
1226
- onClose: () => {
1227
- handleChange("bankStatementDocument")([]);
1228
- setShowReviewModal(false);
1229
- trackModalAction("CloseModal");
1230
- },
1231
- showCloseButton: true,
1232
- fitContent: true,
1233
- children: /* @__PURE__ */ jsxs("div", {
1234
- className: BankDocumentClassification_module_default.reviewModal,
1235
- children: [/* @__PURE__ */ jsx("div", {
1236
- className: BankDocumentClassification_module_default.preview,
1237
- children: /* @__PURE__ */ jsx("div", {
1238
- className: BankDocumentClassification_module_default.previewImage,
1239
- children: documentPreview
1240
- })
1241
- }), /* @__PURE__ */ jsxs("div", {
1242
- className: BankDocumentClassification_module_default.content,
1243
- children: [
1244
- /* @__PURE__ */ jsx(Header, {
1245
- title: t(($) => $["checkYourBankDocument"]),
1246
- description: t(($) => $["toVerifyYourPayoutAccount"])
1247
- }),
1248
- documentRequirements,
1249
- /* @__PURE__ */ jsxs(StackLayout, {
1250
- horizontal: true,
1251
- align: "right",
1252
- gap: "small",
1253
- children: [/* @__PURE__ */ jsx(Button, {
1254
- loading: validateDocumentMutation.isPending,
1255
- variant: "primary",
1256
- onClick: handleUploadNewDocument,
1257
- children: t(($) => $["replaceDocument"])
1258
- }), /* @__PURE__ */ jsx(Button, {
1259
- variant: "tertiary",
1260
- disabled: validateDocumentMutation.isPending,
1261
- onClick: handleContinueAnyway,
1262
- children: t(($) => $["useThisDocument"])
1263
- })]
1264
- }),
1265
- aiLabelMessage
1266
- ]
1267
- })]
1268
- })
1269
- }),
1270
- /* @__PURE__ */ jsx("input", {
1271
- id,
1272
- ref: inputRef,
1273
- className: "adyen-kyc-dropzone__input",
1274
- onChange: (e) => {
1275
- const fileInput = e.currentTarget;
1276
- if (fileInput?.files?.length) handleDocumentUpload([...fileInput.files]);
1277
- },
1278
- type: "file",
1279
- accept: bankStatementValidationOptions.allowedFileTypes.join(", ")
1280
- })
1281
- ]
1282
- });
1283
- }
1284
- var MemoizedBankDocumentClassification = memo(BankDocumentClassification, (prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate);
1285
- //#endregion
1286
- //#region src/datasets/currencies.json
1287
- var currencies_default = /* @__PURE__ */ JSON.parse("[{\"currencyCode\":\"AED\",\"description\":\"UAE Dirham\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ALL\",\"description\":\"Albanian Lek\",\"exponent\":2,\"symbol\":\"L\"},{\"currencyCode\":\"AMD\",\"description\":\"Armenian Dram\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ANG\",\"description\":\"Antillian Guilder\",\"exponent\":2,\"symbol\":\"Naƒ\"},{\"currencyCode\":\"AOA\",\"description\":\"Angolan kwanza\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ARS\",\"description\":\"Nuevo Argentine Peso\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"AUD\",\"description\":\"Australian Dollar\",\"exponent\":2,\"symbol\":\"A$\"},{\"currencyCode\":\"AWG\",\"description\":\"Aruban Guilder\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"AZN\",\"description\":\"Azerbaijani manat\",\"exponent\":2,\"symbol\":\"man\"},{\"currencyCode\":\"BAM\",\"description\":\"Bosnia and Herzegovina Convertible Marks\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BBD\",\"description\":\"Barbados Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BDT\",\"description\":\"Bangladesh Taka\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BGL\",\"description\":\"Bulgaria Lev\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BHD\",\"description\":\"Bahraini Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"BMD\",\"description\":\"Bermudian Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BND\",\"description\":\"Brunei Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BOB\",\"description\":\"Bolivia Boliviano\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BRL\",\"description\":\"Brazilian Real\",\"exponent\":2,\"symbol\":\"R$\"},{\"currencyCode\":\"BSD\",\"description\":\"Bahamian Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BTN\",\"description\":\"Bhutan Ngultrum\",\"exponent\":2,\"symbol\":\"Nu.\"},{\"currencyCode\":\"BWP\",\"description\":\"Botswana Pula\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"BYN\",\"description\":\"Belarusian Ruble\",\"exponent\":2,\"symbol\":\"Br\"},{\"currencyCode\":\"BYR\",\"description\":\"Belarusian Ruble\",\"exponent\":0,\"symbol\":\"Br\"},{\"currencyCode\":\"BZD\",\"description\":\"Belize Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CAD\",\"description\":\"Canadian Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"CHF\",\"description\":\"Swiss Franc\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CLP\",\"description\":\"Chilean Peso\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"CNY\",\"description\":\"Yuan Renminbi\",\"exponent\":2,\"symbol\":\"¥\"},{\"currencyCode\":\"COP\",\"description\":\"Colombian Peso\",\"exponent\":2,\"symbol\":\"₱\"},{\"currencyCode\":\"CRC\",\"description\":\"Costa Rican Colon\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CSD\",\"description\":\"Serbian Dinar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CUP\",\"description\":\"Cuban Peso\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"CVE\",\"description\":\"Cape Verdi Escudo\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"CZK\",\"description\":\"Czech Koruna\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"DJF\",\"description\":\"Djibouti Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"DKK\",\"description\":\"Danish Krone\",\"exponent\":2,\"symbol\":\"kr\"},{\"currencyCode\":\"DOP\",\"description\":\"Dominican Republic Peso\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"DZD\",\"description\":\"Algerian Dinar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"EEK\",\"description\":\"Estonian Krone\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"EGP\",\"description\":\"Egyptian Pound\",\"exponent\":2,\"symbol\":\"£\"},{\"currencyCode\":\"ETB\",\"description\":\"Ethiopian Birr\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"EUR\",\"description\":\"Euro\",\"exponent\":2,\"symbol\":\"€\"},{\"currencyCode\":\"FJD\",\"description\":\"Fiji Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"FKP\",\"description\":\"Falkland Islands Pound\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GBP\",\"description\":\"Pound Sterling\",\"exponent\":2,\"symbol\":\"£\"},{\"currencyCode\":\"GEL\",\"description\":\"Georgian Lari\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GHC\",\"description\":\"Ghanaian Cedi (2nd)\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"GHS\",\"description\":\"Ghanaian Cedi (3rd)\",\"exponent\":2,\"symbol\":\"GH₵\"},{\"currencyCode\":\"GIP\",\"description\":\"Gibraltar Pound\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GMD\",\"description\":\"Gambia Delasi\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GNF\",\"description\":\"Guinea Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"GTQ\",\"description\":\"Guatemala Quetzal\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"GYD\",\"description\":\"Guyanese Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"HKD\",\"description\":\"Hong Kong Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"HNL\",\"description\":\"Honduras Lempira\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"HRK\",\"description\":\"Croatia Kuna\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"HTG\",\"description\":\"Haitian Gourde\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"HUF\",\"description\":\"Hungarian Forint\",\"exponent\":2,\"symbol\":\"Ft\"},{\"currencyCode\":\"IDR\",\"description\":\"Indonesian Rupiah\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"ILS\",\"description\":\"New Israeli Scheqel\",\"exponent\":2,\"symbol\":\"₪\"},{\"currencyCode\":\"INR\",\"description\":\"Indian Rupee\",\"exponent\":2,\"symbol\":\"₨\"},{\"currencyCode\":\"IQD\",\"description\":\"Iraqi Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"ISK\",\"description\":\"Iceland Krona\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"JMD\",\"description\":\"Jamaican Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"JOD\",\"description\":\"Jordanian Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"JPY\",\"description\":\"Japanese Yen\",\"exponent\":0,\"symbol\":\"¥\"},{\"currencyCode\":\"KES\",\"description\":\"Kenyan Shilling\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"KGS\",\"description\":\"Kyrgyzstan Som\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"KHR\",\"description\":\"Cambodia Riel\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"KMF\",\"description\":\"Comoro Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"KRW\",\"description\":\"South-Korean Won\",\"exponent\":0,\"symbol\":\"₩\"},{\"currencyCode\":\"KWD\",\"description\":\"Kuwaiti Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"KYD\",\"description\":\"Cayman Islands Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"KZT\",\"description\":\"Kazakhstani Tenge\",\"exponent\":2,\"symbol\":\"8\"},{\"currencyCode\":\"LAK\",\"description\":\"Laos Kip\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"LBP\",\"description\":\"Lebanese Pound\",\"exponent\":2,\"symbol\":\"£\"},{\"currencyCode\":\"LKR\",\"description\":\"Sri Lanka Rupee\",\"exponent\":2,\"symbol\":\"₨\"},{\"currencyCode\":\"LTL\",\"description\":\"Lithunianian Litas\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"LVL\",\"description\":\"Latvian Lats\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"LYD\",\"description\":\"Libyan Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"MAD\",\"description\":\"Moroccan Dirham\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MDL\",\"description\":\"Moldovia Leu\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MKD\",\"description\":\"Macedonian Denar\",\"exponent\":2,\"symbol\":\"ден\"},{\"currencyCode\":\"MMK\",\"description\":\"Myanmar Kyat\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MNT\",\"description\":\"Mongolia Tugrik\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MOP\",\"description\":\"Macau Pataca\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MRO\",\"description\":\"Mauritania Ouguiya\",\"exponent\":1,\"symbol\":\"\"},{\"currencyCode\":\"MRU\",\"description\":\"Mauritania Ouguiya\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MUR\",\"description\":\"Mauritius Rupee\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MVR\",\"description\":\"Maldives Rufiyaa\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MWK\",\"description\":\"Malawi Kwacha\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MXN\",\"description\":\"Mexican Peso\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"MXP\",\"description\":\"Mexican Peso\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MYR\",\"description\":\"Malaysian Ringgit\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"MZN\",\"description\":\"Mozambican Metical\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"NAD\",\"description\":\"Namibian Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"NGN\",\"description\":\"Nigerian naira\",\"exponent\":2,\"symbol\":\"&\"},{\"currencyCode\":\"NIO\",\"description\":\"Nicaragua Cordoba Oro\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"NOK\",\"description\":\"Norwegian Krone\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"NPR\",\"description\":\"Nepalese Rupee\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"NZD\",\"description\":\"New Zealand Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"OMR\",\"description\":\"Rial Omani\",\"exponent\":3,\"symbol\":\"﷼\"},{\"currencyCode\":\"PAB\",\"description\":\"Panamanian Balboa\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"PEN\",\"description\":\"Peruvian Nuevo Sol\",\"exponent\":2,\"symbol\":\"S/.\"},{\"currencyCode\":\"PGK\",\"description\":\"New Guinea Kina\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"PHP\",\"description\":\"Philippine Peso\",\"exponent\":2,\"symbol\":\"₱\"},{\"currencyCode\":\"PKR\",\"description\":\"Pakistan Rupee\",\"exponent\":2,\"symbol\":\"₨\"},{\"currencyCode\":\"PLN\",\"description\":\"New Polish Zloty\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"PYG\",\"description\":\"Paraguay Guarani\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"QAR\",\"description\":\"Qatari Rial\",\"exponent\":2,\"symbol\":\"﷼\"},{\"currencyCode\":\"ROL\",\"description\":\"Romanian Lei\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"RON\",\"description\":\"New Romanian Lei\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"RSD\",\"description\":\"Serbian Dinar\",\"exponent\":2,\"symbol\":\"РСД\"},{\"currencyCode\":\"RUB\",\"description\":\"Russian Ruble\",\"exponent\":2,\"symbol\":\"руб\"},{\"currencyCode\":\"RWF\",\"description\":\"Rwanda Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"SAR\",\"description\":\"Saudi Riyal\",\"exponent\":2,\"symbol\":\"﷼\"},{\"currencyCode\":\"SBD\",\"description\":\"Solomon Island Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SCR\",\"description\":\"Seychelles Rupee\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SEK\",\"description\":\"Swedish Krone\",\"exponent\":2,\"symbol\":\"kr\"},{\"currencyCode\":\"SGD\",\"description\":\"Singapore Dollar\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"SHP\",\"description\":\"St. Helena Pound\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SKK\",\"description\":\"Slovak Koruna\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SLE\",\"description\":\"Sierra Leone Leone\",\"exponent\":2,\"symbol\":\"Le\"},{\"currencyCode\":\"SLL\",\"description\":\"Sierra Leone Leone\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SOS\",\"description\":\"Somalia Shilling\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SRD\",\"description\":\"Surinamese dollar\",\"exponent\":2,\"symbol\":\"Sr$\"},{\"currencyCode\":\"STD\",\"description\":\"Sao Tome & Principe Dobra\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"STN\",\"description\":\"Sao Tome & Principe Dobra\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"SVC\",\"description\":\"El Salvador Colón\",\"exponent\":2,\"symbol\":\"₡\"},{\"currencyCode\":\"SZL\",\"description\":\"Swaziland Lilangeni\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"THB\",\"description\":\"Thai Baht\",\"exponent\":2,\"symbol\":\"฿\"},{\"currencyCode\":\"TND\",\"description\":\"Tunisian Dinar\",\"exponent\":3,\"symbol\":\"\"},{\"currencyCode\":\"TOP\",\"description\":\"Tonga Pa’anga\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"TRY\",\"description\":\"New Turkish Lira\",\"exponent\":2,\"symbol\":\"₤\"},{\"currencyCode\":\"TTD\",\"description\":\"Trinidad & Tobago Dollar\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"TWD\",\"description\":\"New Taiwan Dollar\",\"exponent\":2,\"symbol\":\"元\"},{\"currencyCode\":\"TZS\",\"description\":\"Tanzanian Shilling\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"UAH\",\"description\":\"Ukraine Hryvnia\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"UGX\",\"description\":\"Uganda Shilling\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"USD\",\"description\":\"US Dollars\",\"exponent\":2,\"symbol\":\"$\"},{\"currencyCode\":\"UYU\",\"description\":\"Peso Uruguayo\",\"exponent\":2,\"symbol\":\"₱\"},{\"currencyCode\":\"UZS\",\"description\":\"Uzbekistani Som\",\"exponent\":2,\"symbol\":\"som\"},{\"currencyCode\":\"VEF\",\"description\":\"Venezuelan Bolívar\",\"exponent\":2,\"symbol\":\"Bs.F.\"},{\"currencyCode\":\"VND\",\"description\":\"Vietnamese New Dong\",\"exponent\":0,\"symbol\":\"₫\"},{\"currencyCode\":\"VUV\",\"description\":\"Vanuatu Vatu\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"WST\",\"description\":\"Samoan Tala\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"XAF\",\"description\":\"CFA Franc BEAC\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"XCD\",\"description\":\"East Carribean Dollar\",\"exponent\":2,\"symbol\":\"EC$\"},{\"currencyCode\":\"XOF\",\"description\":\"CFA Franc BCEAO\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"XPF\",\"description\":\"CFP Franc\",\"exponent\":0,\"symbol\":\"\"},{\"currencyCode\":\"YER\",\"description\":\"Yemeni Rial\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ZAR\",\"description\":\"South African Rand\",\"exponent\":2,\"symbol\":\"R\"},{\"currencyCode\":\"ZMK\",\"description\":\"Zambia Kwacha\",\"exponent\":2,\"symbol\":\"\"},{\"currencyCode\":\"ZMW\",\"description\":\"Zambian Kwacha\",\"exponent\":2,\"symbol\":\"\"}]");
1288
- //#endregion
1289
- //#region src/components/BankAccount/fields/PreferredCurrency/PreferredCurrency.tsx
1290
- var ALLOWED_PAYOUT_CURRENCIES = Object.keys(Currencies);
1291
- var PreferredCurrency = (props) => {
1292
- const { country, preferredCurrency, handleChangeFor } = props;
1293
- const { t } = useTranslation(["common", "banking"]);
1294
- const currencyDescriptionByCode = new Map(currencies_default.map((currency) => [currency.currencyCode, currency.description]));
1295
- const getPrioritizedCurrencies = () => {
1296
- const allowedCountryCurrencies = (currencyByCountry[country] || []).filter((currency) => ALLOWED_PAYOUT_CURRENCIES.includes(currency));
1297
- const otherAllowedCurrencies = ALLOWED_PAYOUT_CURRENCIES.filter((currency) => !allowedCountryCurrencies.includes(currency));
1298
- if (allowedCountryCurrencies.length > 0 && otherAllowedCurrencies.length > 0) return [
1299
- ...allowedCountryCurrencies,
1300
- null,
1301
- ...otherAllowedCurrencies
1302
- ];
1303
- return [...allowedCountryCurrencies, ...otherAllowedCurrencies];
1304
- };
1305
- const currenciesAsOptions = getPrioritizedCurrencies().map((currency) => {
1306
- if (currency === null) return {
1307
- id: "separator",
1308
- name: " ",
1309
- disabled: true
1310
- };
1311
- const description = currencyDescriptionByCode.get(currency);
1312
- return {
1313
- id: currency,
1314
- name: description ? `${description} (${currency})` : currency
1315
- };
1316
- });
1317
- const selectCurrency = (e) => {
1318
- if (e.id === "separator") return;
1319
- handleChangeFor("preferredCurrency")(e.id);
1320
- };
1321
- return /* @__PURE__ */ jsx(Field, {
1322
- name: "preferredCurrency",
1323
- label: t(($) => $["preferredPayoutCurrency"], { ns: "banking" }),
1324
- helper: t(($) => $["ifYouChooseAPayoutCurrencyThatDoesntMatchYourBankAccount"], { ns: "banking" }),
1325
- helperPosition: "below",
1326
- children: (childProps) => /* @__PURE__ */ jsx(Select, {
1327
- ...childProps,
1328
- onSelect: selectCurrency,
1329
- name: "preferredPayoutCurrency",
1330
- placeholder: t(($) => $["localFormat"], { ns: "banking" }),
1331
- selected: preferredCurrency,
1332
- items: currenciesAsOptions || []
1333
- })
1334
- });
1335
- };
1336
- //#endregion
1337
- //#region src/components/BankAccount/forms/PayoutVerificationMethod/AccountHolderDescriptionFragment.tsx
1338
- var AccountHolderDescriptionFragment = ({ legalEntityResponse }) => {
1339
- const { t } = useTranslation("banking");
1340
- const hasSolePropEntityAssociations = hasOwnEntityAssociationOfType(LegalEntityTypes.SOLE_PROPRIETORSHIP, legalEntityResponse.entityAssociations, legalEntityResponse.id);
1341
- const { accountHolder } = useAccountHolder();
1342
- const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
1343
- if (accountHolder === "mySoleProprietorName" || hasSolePropEntityAssociations) {
1344
- const soleProp = legalEntityResponse.entityAssociations?.find((ea) => ea.entityType === "soleProprietorship");
1345
- const { individual } = legalEntityResponse;
1346
- return /* @__PURE__ */ jsxs(Typography, { children: [
1347
- `${t(($) => $["bankAccountHasToBeInYourName"])} `,
1348
- /* @__PURE__ */ jsx(Typography, {
1349
- el: "span",
1350
- variant: "body-stronger",
1351
- children: `${individual?.name.firstName} ${individual?.name.lastName}`
1352
- }),
1353
- ` ${t(($) => $["orSoleProprietorshipName"])} `,
1354
- " ",
1355
- /* @__PURE__ */ jsx(Typography, {
1356
- el: "span",
1357
- variant: "body-stronger",
1358
- children: `${soleProp?.name ?? ""}`
1359
- })
1360
- ] });
1361
- }
1362
- const hasTrustsEntityAssociations = hasOwnEntityAssociationOfType(LegalEntityTypes.TRUST, legalEntityResponse.entityAssociations, legalEntityResponse.id);
1363
- if (accountHolder === "aTrust" || hasTrustsEntityAssociations) {
1364
- const trust = legalEntityResponse.entityAssociations?.find((ea) => ea.entityType === "trust");
1365
- if (legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL) return /* @__PURE__ */ jsxs(Typography, { children: [`${t(($) => $["bankAccountToHaveSameNameAsTrust"])} `, /* @__PURE__ */ jsx(Typography, {
1366
- el: "span",
1367
- variant: "body-stronger",
1368
- children: t(($) => $["trusteeAsTrusteeForTrust"], {
1369
- trusteeName: `${legalEntityResponse?.individual?.name.firstName} ${legalEntityResponse?.individual?.name.lastName}`,
1370
- trustName: trust?.name ?? ""
1371
- })
1372
- })] });
1373
- const companyTrusteeBankAccountName = legalEntityResponse?.organization?.legalName !== legalEntityResponse?.organization?.doingBusinessAs ? t(($) => $["trusteeAsTrusteeForTrustDoingBusinessAs"], {
1374
- trusteeName: legalEntityResponse?.organization?.legalName ?? "",
1375
- trustName: trust?.name ?? "",
1376
- tradingName: legalEntityResponse?.organization?.doingBusinessAs
1377
- }) : t(($) => $["trusteeAsTrusteeForTrust"], {
1378
- trusteeName: legalEntityResponse?.organization?.legalName ?? "",
1379
- trustName: trust?.name ?? ""
1380
- });
1381
- return /* @__PURE__ */ jsxs(Typography, { children: [`${t(($) => $["bankAccountToHaveSameNameAsTrust"])} `, /* @__PURE__ */ jsx(Typography, {
1382
- el: "span",
1383
- variant: "body-stronger",
1384
- children: companyTrusteeBankAccountName
1385
- })] });
1386
- }
1387
- const hasUnincorporatedPartnershipEntityAssociations = hasOwnEntityAssociationOfType(LegalEntityTypes.UNINCORPORATED_PARTNERSHIP, legalEntityResponse.entityAssociations, legalEntityResponse.id);
1388
- if (accountHolder === "anUnincorporatedPartnership" || hasUnincorporatedPartnershipEntityAssociations) {
1389
- const unincorporatedPartnership = legalEntityResponse?.entityAssociations?.find((ea) => ea.entityType === "unincorporatedPartnership");
1390
- const partnerNames = unincorporatedPartnershipMembers?.map((member) => member?.name)?.sort();
1391
- return /* @__PURE__ */ jsx(Typography, { children: `${t(($) => $["bankAccountToHaveSameNameAsUnincorporatedPartnership"], {
1392
- partnerNames: `${partnerNames?.join(", ")}`,
1393
- partnershipName: unincorporatedPartnership?.name ?? ""
1394
- })} ` });
1395
- }
1396
- if (legalEntityResponse.type === LegalEntityTypes.ORGANIZATION) return /* @__PURE__ */ jsxs(Typography, { children: [`${t(($) => $["bankAccountHasToBeInYourCompanyName"])} `, /* @__PURE__ */ jsx(Typography, {
1397
- el: "span",
1398
- variant: "body-stronger",
1399
- children: legalEntityResponse?.organization?.legalName
1400
- })] });
1401
- const { individual } = legalEntityResponse;
1402
- return /* @__PURE__ */ jsxs(Typography, { children: [`${t(($) => $["bankAccountHasToBeInYourName"])} `, /* @__PURE__ */ jsx(Typography, {
1403
- el: "span",
1404
- variant: "body-stronger",
1405
- children: `${individual?.name.firstName} ${individual?.name.lastName}`
1406
- })] });
1407
- };
1408
- //#endregion
1409
- //#region src/components/BankAccount/forms/PayoutVerificationMethod/utils.ts
1410
- var getMustHaveSameAccountHolderNameTransKey = (legalEntityType) => {
1411
- switch (legalEntityType) {
1412
- case "individual":
1413
- case "soleProprietorship": return "theBankAccountHolderMustBeInYourName";
1414
- case "organization":
1415
- case "trust":
1416
- case "unincorporatedPartnership": return "theBankAccountHolderMustHaveTheSameNameAsYourCompany";
1417
- default: return "theBankAccountHolderMustHaveTheSameNameAsYourCompany";
1418
- }
1419
- };
1420
- var PayoutRequirementsModal_module_default = {
1421
- "payout-modal-content": "adyen-kyc-payout-modal-content",
1422
- payoutModalContent: "adyen-kyc-payout-modal-content",
1423
- title: "adyen-kyc-title",
1424
- section: "adyen-kyc-section",
1425
- "section-title": "adyen-kyc-section-title",
1426
- sectionTitle: "adyen-kyc-section-title",
1427
- "section-text": "adyen-kyc-section-text",
1428
- sectionText: "adyen-kyc-section-text",
1429
- "simpler-terms-box": "adyen-kyc-simpler-terms-box",
1430
- simplerTermsBox: "adyen-kyc-simpler-terms-box",
1431
- "simpler-terms-title": "adyen-kyc-simpler-terms-title",
1432
- simplerTermsTitle: "adyen-kyc-simpler-terms-title",
1433
- "bullet-list": "adyen-kyc-bullet-list",
1434
- bulletList: "adyen-kyc-bullet-list"
1435
- };
1436
- //#endregion
1437
- //#region src/components/BankAccount/forms/PayoutCountryDetails/PayoutRequirementsModal.tsx
1438
- function PayoutRequirementsModal({ isOpen, onClose, provider }) {
1439
- const { t } = useTranslation("banking");
1440
- if (!isOpen) return null;
1441
- return /* @__PURE__ */ jsx(Modal, {
1442
- ariaLabel: t(($) => $["aboutPayoutBankAccounts"]),
1443
- onClose,
1444
- size: "medium",
1445
- showCloseButton: true,
1446
- inset: true,
1447
- children: /* @__PURE__ */ jsxs("div", {
1448
- className: PayoutRequirementsModal_module_default.payoutModalContent,
1449
- children: [
1450
- /* @__PURE__ */ jsx(Typography, {
1451
- variant: "title-m",
1452
- el: "h1",
1453
- className: PayoutRequirementsModal_module_default.title,
1454
- children: t(($) => $["aboutPayoutBankAccounts"])
1455
- }),
1456
- /* @__PURE__ */ jsxs("div", {
1457
- className: PayoutRequirementsModal_module_default.section,
1458
- children: [/* @__PURE__ */ jsx(Typography, {
1459
- variant: "body-strongest",
1460
- el: "h3",
1461
- className: PayoutRequirementsModal_module_default.sectionTitle,
1462
- children: t(($) => $["doesMyBankAccountNeedToBeInSameCountry"])
1463
- }), /* @__PURE__ */ jsx(Typography, {
1464
- variant: "body",
1465
- className: PayoutRequirementsModal_module_default.sectionText,
1466
- children: t(($) => $["countryDependsExplanation"])
1467
- })]
1468
- }),
1469
- /* @__PURE__ */ jsxs("div", {
1470
- className: PayoutRequirementsModal_module_default.section,
1471
- children: [
1472
- /* @__PURE__ */ jsx(Typography, {
1473
- variant: "body-strongest",
1474
- el: "h3",
1475
- className: PayoutRequirementsModal_module_default.sectionTitle,
1476
- children: t(($) => $["whichPayoutCurrencyShouldIChoose"])
1477
- }),
1478
- /* @__PURE__ */ jsx(Typography, {
1479
- variant: "body",
1480
- className: PayoutRequirementsModal_module_default.sectionText,
1481
- children: t(($) => $["currencyRecommendation"])
1482
- }),
1483
- /* @__PURE__ */ jsxs("div", {
1484
- className: PayoutRequirementsModal_module_default.simplerTermsBox,
1485
- children: [/* @__PURE__ */ jsx(Typography, {
1486
- variant: "body-strongest",
1487
- el: "h4",
1488
- className: PayoutRequirementsModal_module_default.simplerTermsTitle,
1489
- children: t(($) => $["inSimplerTerms"])
1490
- }), /* @__PURE__ */ jsx(Typography, {
1491
- variant: "body",
1492
- children: t(($) => $["currencySimplerTerms"])
1493
- })]
1494
- })
1495
- ]
1496
- }),
1497
- provider && /* @__PURE__ */ jsxs("div", {
1498
- className: PayoutRequirementsModal_module_default.section,
1499
- children: [
1500
- /* @__PURE__ */ jsx(Typography, {
1501
- variant: "body-strongest",
1502
- el: "h3",
1503
- className: PayoutRequirementsModal_module_default.sectionTitle,
1504
- children: t(($) => $["howDoesVerificationWithOurPartnerWork"], { provider: provider?.name })
1505
- }),
1506
- /* @__PURE__ */ jsx(Typography, {
1507
- className: PayoutRequirementsModal_module_default.sectionText,
1508
- children: t(($) => $["isOurTrustedPartnerHelpingSpeedUpSetup"], { provider: provider?.name })
1509
- }),
1510
- /* @__PURE__ */ jsxs("ul", {
1511
- className: PayoutRequirementsModal_module_default.bulletList,
1512
- children: [
1513
- /* @__PURE__ */ jsx("li", { children: t(($) => $["selectTheBankToReceivePayouts"]) }),
1514
- /* @__PURE__ */ jsx("li", { children: t(($) => $["loginIntoYourBankingEnvironment"]) }),
1515
- /* @__PURE__ */ jsx("li", { children: t(($) => $["yourBankWillConfirmYourAccountDetails"]) })
1516
- ]
1517
- }),
1518
- /* @__PURE__ */ jsx(Typography, { children: t(($) => $["adyenWillOnlyGetTemporaryAccess"]) })
1519
- ]
1520
- })
1521
- ]
1522
- })
1523
- });
1524
- }
1525
- //#endregion
1526
- //#region src/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.tsx
1527
- var payoutCountryDetailsFields = ["bankCountry", "preferredCurrency"];
1528
- var DEFAULT_CURRENCY_FALLBACK = "USD";
1529
- var getDefaultCurrencyForCountry = (country) => currencyByCountry[country]?.[0] ?? DEFAULT_CURRENCY_FALLBACK;
1530
- var getCountryCodeFromEvent = (event) => event?.target?.value;
1531
- function PayoutCountryDetails(props) {
1532
- const { legalEntityResponse, data: propData, provider, handleFieldChange, valid: propValid, errors: propErrors, fieldValidationErrors: propFieldValidationErrors } = props;
1533
- const { t: commonT } = useTranslation("common");
1534
- const { t } = useTranslation("banking");
1535
- const { isSettingEnabled } = useSettingsContext();
1536
- const country = getLegalEntityCountry(legalEntityResponse);
1537
- const [isModalOpen, setIsModalOpen] = useState$1(false);
1538
- const legalEntityType = legalEntityResponse.type;
1539
- const defaultCurrency = getDefaultCurrencyForCountry(country);
1540
- const localForm = useForm({
1541
- ...props,
1542
- schema: payoutCountryDetailsFields,
1543
- defaultData: {
1544
- bankCountry: propData?.bankCountry ?? country,
1545
- preferredCurrency: propData?.preferredCurrency ?? defaultCurrency
1546
- },
1547
- shouldValidate: true
1548
- });
1549
- const useMultiFormMode = !!handleFieldChange;
1550
- const data = useMultiFormMode ? propData : localForm.data;
1551
- const valid = useMultiFormMode ? propValid : localForm.valid;
1552
- const errors = useMultiFormMode ? propErrors : localForm.errors;
1553
- const fieldProblems = useMultiFormMode ? propFieldValidationErrors : localForm.fieldProblems;
1554
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1555
- const formUtils = createFormUtils(props, commonT);
1556
- const allowedBankCountries = Object.keys(currencyByCountry);
1557
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
1558
- const accountHolder = getPayoutAccountHolderName(legalEntityResponse, t);
1559
- const description = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
1560
- t(($) => $["forYouToReceiveYourPayouts"]),
1561
- "\xA0",
1562
- /* @__PURE__ */ jsx(Trans, {
1563
- t,
1564
- ns: "banking",
1565
- i18nKey: ($) => $[getMustHaveSameAccountHolderNameTransKey(legalEntityType)],
1566
- values: {
1567
- name: accountHolder,
1568
- companyName: accountHolder
1569
- }
1570
- })
1571
- ] });
1572
- const descriptionExtra = /* @__PURE__ */ jsx("div", {
1573
- className: "adyen-kyc-u-margin-bottom-12",
1574
- children: /* @__PURE__ */ jsx(Trans, {
1575
- t,
1576
- ns: "banking",
1577
- i18nKey: ($) => $["payoutAccountsMustMeetSomeRequirements"],
1578
- components: { requirementsLink: /* @__PURE__ */ jsx("button", {
1579
- type: "button",
1580
- onClick: () => setIsModalOpen(true),
1581
- style: {
1582
- background: "none",
1583
- border: "none",
1584
- color: "inherit",
1585
- textDecoration: "underline",
1586
- cursor: "pointer",
1587
- padding: 0,
1588
- font: "inherit"
1589
- }
1590
- }) }
1591
- })
1592
- });
1593
- const { updateStateSlice } = useGlobalDataSlice("payoutCountryDetails");
1594
- useEffect$1(() => {
1595
- if (!useMultiFormMode) updateStateSlice({
1596
- data: localForm.data,
1597
- valid: localForm.valid,
1598
- errors: localForm.errors,
1599
- fieldProblems: localForm.fieldProblems
1600
- });
1601
- }, [
1602
- localForm.data,
1603
- localForm.valid,
1604
- localForm.errors,
1605
- updateStateSlice,
1606
- localForm.fieldProblems,
1607
- useMultiFormMode
1608
- ]);
1609
- const updateCountryField = (event) => {
1610
- const updatedCountry = getCountryCodeFromEvent(event);
1611
- handleChange("bankCountry", "input")(updatedCountry);
1612
- handleChange("preferredCurrency", "input")(getDefaultCurrencyForCountry(updatedCountry));
1613
- };
1614
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("form", {
1615
- style: { minHeight: "480px" },
1616
- children: [
1617
- /* @__PURE__ */ jsx(Header, {
1618
- title: t(($) => $["payoutBankAccount"]),
1619
- children: /* @__PURE__ */ jsxs("div", {
1620
- slot: "description",
1621
- className: "adyen-kyc-form-header__description",
1622
- children: [description, descriptionExtra]
1623
- })
1624
- }),
1625
- /* @__PURE__ */ jsx(CountryField, {
1626
- data: { country: data?.bankCountry },
1627
- valid: { country: valid?.bankCountry ?? true },
1628
- errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
1629
- labels: { country: t(($) => $["bankAccountCountryRegion"]) },
1630
- readonly: false,
1631
- allowedCountries: allowedBankCountries,
1632
- handleChangeFor: () => updateCountryField
1633
- }),
1634
- /* @__PURE__ */ jsx(PreferredCurrency, {
1635
- country: data?.bankCountry ?? country,
1636
- preferredCurrency: data?.preferredCurrency ?? defaultCurrency,
1637
- handleChangeFor: handleChange
1638
- })
1639
- ]
1640
- }), /* @__PURE__ */ jsx(PayoutRequirementsModal, {
1641
- isOpen: isModalOpen,
1642
- onClose: () => setIsModalOpen(false),
1643
- provider
1644
- })] });
1645
- }
1646
- //#endregion
1647
- //#region src/api/validation/useValidateAccountIdentification.ts
1648
- var validateAccountIdentification = async (baseUrl, data) => {
1649
- return httpPost({
1650
- baseUrl,
1651
- path: `validations/accountidentification`
1652
- }, { accountIdentification: { ...data } });
1653
- };
1654
- var useValidateAccountIdentification = (options) => {
1655
- const { baseUrl } = useApiContext();
1656
- return useMutation({
1657
- mutationFn: (data) => validateAccountIdentification(baseUrl.value, data),
1658
- ...options
1659
- });
1660
- };
1661
- //#endregion
1662
- //#region src/components/BankAccount/hooks/useAsyncAccountDetailsValidationRules.ts
1663
- var useAsyncAccountDetailsValidationRules = (payload, hasEmptyFields, isAccountNumberMasked) => {
1664
- const [timeoutId, setTimeoutId] = useState$1(null);
1665
- const [accountValidationData, setAccountValidationData] = useState$1({
1666
- invalidFields: [],
1667
- valid: false
1668
- });
1669
- const { mutateAsync } = useValidateAccountIdentification();
1670
- useEffect$1(() => {
1671
- const fetchAccountDetails = async (accountIdentificationPayload) => {
1672
- try {
1673
- setAccountValidationData(await mutateAsync(accountIdentificationPayload));
1674
- } catch (error) {
1675
- console.error("Error fetching account details:", error);
1676
- }
1677
- };
1678
- if (payload && !hasEmptyFields && !isAccountNumberMasked) {
1679
- if (timeoutId !== null) clearTimeout(timeoutId);
1680
- setTimeoutId(setTimeout(() => {
1681
- fetchAccountDetails(payload);
1682
- setTimeoutId(null);
1683
- }, 500));
1684
- }
1685
- }, [
1686
- mutateAsync,
1687
- hasEmptyFields,
1688
- payload
1689
- ]);
1690
- return accountValidationData;
1691
- };
1692
- //#endregion
1693
- //#region src/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.ts
1694
- var logger = createLogger();
1695
- var getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCountry, enabledCrossBorderPayouts) => {
1696
- if ("iban" in payoutAccount && payoutAccount.iban) return {
1697
- type: "iban",
1698
- iban: payoutAccount.iban
1699
- };
1700
- if (enabledCrossBorderPayouts && "bankAccountNumber" in payoutAccount && payoutAccount.bankAccountNumber && "swiftCode" in payoutAccount && payoutAccount.swiftCode) return {
1701
- type: "numberAndBic",
1702
- bic: payoutAccount.swiftCode,
1703
- accountNumber: payoutAccount.bankAccountNumber
1704
- };
1705
- /**
1706
- * Although we are switching on country, the "type" refers to a region within the API.
1707
- * This means multiple countries can be apart of a single region.
1708
- *
1709
- * see 'com.adyen.bankaccountidentification.types.BankAccountIdentificationType' for current mappings
1710
- */
1711
- switch (bankCountry) {
1712
- case CountryCodes.Australia: return {
1713
- type: "auLocal",
1714
- accountNumber: payoutAccount.bankAccountNumber,
1715
- bsbCode: payoutAccount.branchCode
1716
- };
1717
- case CountryCodes.Brazil: return {
1718
- type: "brLocal",
1719
- accountNumber: payoutAccount.bankAccountNumber,
1720
- ispb: payoutAccount.bankCode,
1721
- bankCode: payoutAccount.bankName,
1722
- branchNumber: payoutAccount.branchCode
1723
- };
1724
- case CountryCodes.Canada: return {
1725
- type: "caLocal",
1726
- accountNumber: payoutAccount.bankAccountNumber,
1727
- institutionNumber: payoutAccount.bankCode,
1728
- transitNumber: payoutAccount.branchCode
1729
- };
1730
- case CountryCodes.CzechRepublic: return {
1731
- type: "czLocal",
1732
- accountNumber: payoutAccount.bankAccountNumber,
1733
- bankCode: payoutAccount.bankCode
1734
- };
1735
- case CountryCodes.Denmark: return {
1736
- type: "dkLocal",
1737
- accountNumber: payoutAccount.bankAccountNumber,
1738
- bankCode: payoutAccount.bankCode
1739
- };
1740
- case CountryCodes.HongKong: return {
1741
- type: "hkLocal",
1742
- accountNumber: payoutAccount.bankAccountNumber,
1743
- clearingCode: payoutAccount.bankCode
1744
- };
1745
- case CountryCodes.NewZealand: return {
1746
- type: "nzLocal",
1747
- accountNumber: payoutAccount.bankAccountNumber?.replaceAll("-", "")
1748
- };
1749
- case CountryCodes.Sweden: return {
1750
- type: "seLocal",
1751
- accountNumber: payoutAccount.bankAccountNumber,
1752
- clearingNumber: payoutAccount.branchCode
1753
- };
1754
- case CountryCodes.Singapore: return {
1755
- type: "sgLocal",
1756
- accountNumber: payoutAccount.bankAccountNumber,
1757
- bic: payoutAccount.swiftCode
1758
- };
1759
- case CountryCodes.IsleOfMan:
1760
- case CountryCodes.Guernsey:
1761
- case CountryCodes.Gibraltar:
1762
- case CountryCodes.Jersey:
1763
- case CountryCodes.UnitedKingdom: return {
1764
- type: "ukLocal",
1765
- accountNumber: payoutAccount.bankAccountNumber,
1766
- sortCode: payoutAccount.branchCode
1767
- };
1768
- case CountryCodes.NorthernMarianaIslands:
1769
- case CountryCodes.Guam:
1770
- case CountryCodes.VirginIslandsUS:
1771
- case CountryCodes.AmericanSamoa:
1772
- case CountryCodes.PuertoRico:
1773
- case CountryCodes.UnitedStates: return {
1774
- type: "usLocal",
1775
- accountNumber: payoutAccount.bankAccountNumber,
1776
- routingNumber: payoutAccount.branchCode
1777
- };
1778
- default:
1779
- logger.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
1780
- return {
1781
- type: `${bankCountry.toLowerCase()}Local`,
1782
- accountNumber: payoutAccount.bankAccountNumber
1783
- };
1784
- }
1785
- };
1786
- var mapPayoutAccountSchemaToApiBankAccount = (payoutAccount, bankCountry, preferredCurrency, enabledCrossBorderPayouts) => ({
1787
- accountIdentification: getAccountIdentificationFromPayoutAccountSchema(payoutAccount, bankCountry, enabledCrossBorderPayouts),
1788
- preferredCurrencyCode: preferredCurrency,
1789
- countryCode: bankCountry,
1790
- bankName: payoutAccount.bankName
1791
- });
1792
- //#endregion
1793
- //#region src/components/BankAccount/tasks/PayoutDetailsDropin/store.ts
1794
- var showInstantVerificationPayoutModal = signal(false);
1795
- var isUsingManualFlow = signal(true);
1796
- var resetPayoutSignals = () => {
1797
- showInstantVerificationPayoutModal.value = false;
1798
- isUsingManualFlow.value = true;
1799
- };
1800
- //#endregion
1801
- //#region src/api/transferInstruments/useHandleBankVerificationError.ts
1802
- var handleBankVerificationError = async (legalEntityId, baseUrl, bankVerificationErrorParams) => {
1803
- return httpPost({
1804
- baseUrl,
1805
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted/error`
1806
- }, bankVerificationErrorParams);
1807
- };
1808
- /**
1809
- * Receives an error code and message from a banking verification provider and translates it to a known, standardized error
1810
- * @param options additional mutation options
1811
- */
1812
- var useHandleBankVerificationError = (options) => {
1813
- const { rootLegalEntityId, baseUrl } = useApiContext();
1814
- return useMutation({
1815
- mutationFn: (params) => handleBankVerificationError(rootLegalEntityId.value, baseUrl.value, params),
1816
- ...options
1817
- });
1818
- };
1819
- //#endregion
1820
- //#region src/components/BankAccount/forms/BankVerification/verification/overlay/types.ts
1821
- var VerificationWidgetCallbackActions = {
1822
- HANDLE_EXCEPTION: "handle_exception",
1823
- VERIFICATION_SUCCESS: "verification_success",
1824
- RETRY_VERIFICATION: "retry_verification",
1825
- HANDLE_EVENT: "handle_event"
1826
- };
1827
- //#endregion
1828
- //#region src/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.tsx
1829
- var WIDGET_CONTAINER_CLASS = `adyen-kyc-bank-verification-widget-container`;
1830
- function BankVerificationOverlay({ url, setBankVerificationError, onBack, retrieveBankAccountInfo, createTrustedTransferInstrument, providerName }) {
1831
- const { t } = useTranslation("banking");
1832
- const userEvents = useAnalyticsContext();
1833
- const widgetContainerRef = useRef$1(null);
1834
- const { mutateAsync: handleBankVerificationError } = useHandleBankVerificationError();
1835
- const trackVerificationError = (returnValue) => {
1836
- userEvents.addPageEvent("Encountered error", {
1837
- actionType: "add",
1838
- returnType: "sdk error",
1839
- returnValue,
1840
- additionalData: { providerName }
1841
- });
1842
- };
1843
- const DEFAULT_ERROR = {
1844
- error: "UNKNOWN_ERROR",
1845
- message: t(($) => $["weCouldntCompleteTheAccountCheck"])
1846
- };
1847
- useEffect$1(() => {
1848
- setBankVerificationError(null);
1849
- }, [setBankVerificationError]);
1850
- const widgetCallback = useCallback$1((payload) => {
1851
- const errorContent = t(($) => $["tryAgainOrManualAccountDetails"]);
1852
- switch (payload.action) {
1853
- case VerificationWidgetCallbackActions.HANDLE_EXCEPTION: {
1854
- let errorTitle;
1855
- const { err } = payload;
1856
- switch (!(err instanceof Error) && err?.error) {
1857
- case "USER_CANCELLED":
1858
- errorTitle = "";
1859
- break;
1860
- case "CONNECTION_ERROR":
1861
- errorTitle = t(($) => $["couldNotEstablishBankConnection"]);
1862
- break;
1863
- case "GENERIC_ERROR":
1864
- errorTitle = t(($) => $["ranIntoTechnicalError"]);
1865
- break;
1866
- default:
1867
- errorTitle = t(($) => $["couldNotCompleteAccountCheck"]);
1868
- break;
1869
- }
1870
- if (errorTitle) setBankVerificationError({
1871
- title: errorTitle,
1872
- content: errorContent
1873
- });
1874
- isUsingManualFlow.value = true;
1875
- showInstantVerificationPayoutModal.value = false;
1876
- onBack?.();
1877
- break;
1878
- }
1879
- case VerificationWidgetCallbackActions.RETRY_VERIFICATION:
1880
- setBankVerificationError({
1881
- title: t(($) => $["failedInitializeInstantVerification"]),
1882
- content: errorContent
1883
- });
1884
- onBack?.();
1885
- break;
1886
- case VerificationWidgetCallbackActions.HANDLE_EVENT: {
1887
- const { name, provider } = payload.event;
1888
- if (name === "institution_selected" && provider === "plaid") widgetContainerRef.current?.classList.add(`${WIDGET_CONTAINER_CLASS}--plaid-modal`);
1889
- break;
1890
- }
1891
- case VerificationWidgetCallbackActions.VERIFICATION_SUCCESS: {
1892
- const { accounts } = payload.result;
1893
- if (accounts) retrieveBankAccountInfo(accounts[0]);
1894
- }
1895
- }
1896
- }, [
1897
- t,
1898
- retrieveBankAccountInfo,
1899
- onBack,
1900
- setBankVerificationError
1901
- ]);
1902
- useEffect$1(() => {
1903
- const container = widgetContainerRef.current;
1904
- if (!container) return;
1905
- const openBanking = OpenBankingSDK.create({
1906
- divElement: container,
1907
- link: url,
1908
- successHandler: (code, state) => {
1909
- createTrustedTransferInstrument?.(code, state).then((res) => {
1910
- userEvents.addPageEvent("Success", {
1911
- actionType: "add",
1912
- additionalData: { providerName }
1913
- });
1914
- if (res) widgetCallback({
1915
- action: VerificationWidgetCallbackActions.VERIFICATION_SUCCESS,
1916
- result: res
1917
- });
1918
- }).catch(() => {
1919
- trackVerificationError(DEFAULT_ERROR.error);
1920
- widgetCallback({
1921
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1922
- err: DEFAULT_ERROR
1923
- });
1924
- });
1925
- },
1926
- errorHandler: (errorCode, errorMessage, state, metadata) => {
1927
- trackVerificationError(errorCode);
1928
- handleBankVerificationError?.({
1929
- errorCode,
1930
- errorMessage,
1931
- state,
1932
- metadata: metadata && Object.fromEntries(metadata)
1933
- }).then((error) => widgetCallback({
1934
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1935
- err: error
1936
- })).catch(() => widgetCallback({
1937
- action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
1938
- err: DEFAULT_ERROR
1939
- }));
1940
- },
1941
- eventHandler: (eventName, provider) => {
1942
- widgetCallback({
1943
- action: VerificationWidgetCallbackActions.HANDLE_EVENT,
1944
- event: {
1945
- name: eventName,
1946
- provider
1947
- }
1948
- });
1949
- }
1950
- });
1951
- openBanking.open();
1952
- container.classList.add(WIDGET_CONTAINER_CLASS);
1953
- return () => {
1954
- openBanking?.destroy();
1955
- };
1956
- }, []);
1957
- return /* @__PURE__ */ jsx("div", {
1958
- ref: widgetContainerRef,
1959
- className: `${WIDGET_CONTAINER_CLASS}-overlay`
1960
- });
1961
- }
1962
- //#endregion
1963
- //#region src/components/BankAccount/forms/BankVerification/BankVerification.tsx
1964
- var accountVerificationFields = [
1965
- "verifiedAccountHolder",
1966
- "verifiedBankCountry",
1967
- "verifiedBankName",
1968
- "verifiedCurrencyCode",
1969
- "verifiedBankAccountNumber"
1970
- ];
1971
- var InstantVerificationErrorContext = createContext$1(null);
1972
- var useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
1973
- const [errorNotification, setErrorNotification] = useState$1(null);
1974
- const dismissNotificationTimeoutRef = useRef$1();
1975
- const clearNotificationTimeout = useCallback$1(() => {
1976
- if (dismissNotificationTimeoutRef.current) {
1977
- clearTimeout(dismissNotificationTimeoutRef.current);
1978
- dismissNotificationTimeoutRef.current = void 0;
1979
- }
1980
- }, []);
1981
- useEffect$1(() => {
1982
- clearNotificationTimeout();
1983
- if (errorNotification && notificationVisibilityDuration > 0) dismissNotificationTimeoutRef.current = setTimeout(() => {
1984
- setErrorNotification(null);
1985
- clearNotificationTimeout();
1986
- }, notificationVisibilityDuration);
1987
- return () => clearNotificationTimeout();
1988
- }, [
1989
- errorNotification,
1990
- clearNotificationTimeout,
1991
- notificationVisibilityDuration
1992
- ]);
1993
- return [errorNotification, setErrorNotification];
1994
- };
1995
- function BankVerification(props) {
1996
- const { setBankVerificationError, onBack, hideSidebar, setBankInfoValidated, bankInfoValidated, createTrustedTransferInstrument, country, data: propData, provider, id, fieldValidationErrors, handleFieldChange, valid: propValid, errors: propErrors } = props;
1997
- const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
1998
- const schema = accountVerificationFields;
1999
- const stateRef = useRef$1({ setState: null });
2000
- const localForm = useForm({
2001
- ...props,
2002
- schema,
2003
- defaultData: propData,
2004
- rules: bankVerificationValidationRules,
2005
- fieldProblems: fieldValidationErrors
2006
- });
2007
- const useMultiFormMode = !!handleFieldChange;
2008
- const data = useMultiFormMode ? propData : localForm.data;
2009
- const valid = useMultiFormMode ? propValid : localForm.valid;
2010
- const errors = useMultiFormMode ? propErrors : localForm.errors;
2011
- const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
2012
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2013
- const retrieveBankAccountInfo = async ({ realLastFour, number, bankName }) => {
2014
- handleChange("verifiedBankAccountNumber")(realLastFour ? `*******${realLastFour}` : number);
2015
- handleChange("verifiedBankName")(bankName);
2016
- handleChange("verifiedBankCountry")(country);
2017
- handleChange("verifiedAccountHolder")(propData?.verifiedAccountHolder);
2018
- handleChange("verifiedCurrencyCode")(propData?.verifiedCurrencyCode ?? currencyByCountry[country]?.[0]);
2019
- setBankInfoValidated?.(true);
2020
- hideSidebar?.(false);
2021
- if (!useMultiFormMode) localForm.triggerValidation();
2022
- await invalidateRootLegalEntity();
2023
- showInstantVerificationPayoutModal.value = false;
2024
- };
2025
- useEffect$1(() => {
2026
- if (!useMultiFormMode) stateRef.current.setState?.({
2027
- type: "addToState",
2028
- value: {
2029
- data,
2030
- valid,
2031
- errors,
2032
- fieldProblems,
2033
- dataStoreId: id,
2034
- schema
2035
- }
2036
- });
2037
- }, [
2038
- data,
2039
- valid,
2040
- errors,
2041
- localForm.isValid,
2042
- useMultiFormMode
2043
- ]);
2044
- if (provider) {
2045
- if (bankInfoValidated || !showInstantVerificationPayoutModal.value) return null;
2046
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [!useMultiFormMode && /* @__PURE__ */ jsx(StateContextSetter, {
2047
- owner: id,
2048
- stateRef
2049
- }), /* @__PURE__ */ jsx(BankVerificationOverlay, {
2050
- url: provider.redirectUrl,
2051
- setBankVerificationError,
2052
- onBack,
2053
- retrieveBankAccountInfo,
2054
- createTrustedTransferInstrument,
2055
- providerName: provider.name
2056
- })] });
2057
- }
2058
- }
2059
- //#endregion
2060
- //#region src/components/BankAccount/fields/BankAccountFormat/BankAccountFormat.tsx
2061
- function BankAccountFormat(props) {
2062
- const { t } = useTranslation(["banking"]);
2063
- const { bankAccountFormat, handleAccountFormatChange } = props;
2064
- const bankFormatOptions = [{
2065
- id: "iban",
2066
- name: t(($) => $["ibanFormat"])
2067
- }, {
2068
- id: "local",
2069
- name: t(($) => $["localFormat"])
2070
- }];
2071
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Field, {
2072
- name: "bankAccountFormat",
2073
- label: t(($) => $["bankAccountFormat"]),
2074
- children: (childProps) => /* @__PURE__ */ jsx(Select, {
2075
- ...childProps,
2076
- onChange: (e) => handleAccountFormatChange?.(e?.target?.value),
2077
- name: "bankAccountFormat",
2078
- placeholder: t(($) => $["localFormat"]),
2079
- selected: bankAccountFormat,
2080
- items: bankFormatOptions
2081
- })
2082
- }) });
2083
- }
2084
- //#endregion
2085
- //#region src/components/BankAccount/fields/BankAccountNumber/BankAccountNumber.tsx
2086
- var bankAccountNumberFields = ["bankAccountNumber"];
2087
- function BankAccountNumber(props) {
2088
- const { t } = useTranslation("common");
2089
- const { country, fieldConfig = defaultFieldConfig$3, onFocus, onBlur, handleFieldChange, data: propsData, valid: propsValid, errors: propsErrors, fieldValidationErrors: propsFieldValidationErrors } = props;
2090
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$3);
2091
- const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, props);
2092
- const localForm = useForm({
2093
- ...mergedProps,
2094
- schema: bankAccountNumberFields,
2095
- rules: mergedProps.validators,
2096
- defaultData: mergedProps.data,
2097
- fieldProblems: mergedProps?.fieldValidationErrors,
2098
- obscuredFields: mergedProps.obscuredFields
2099
- });
2100
- const useMultiFormMode = !!handleFieldChange;
2101
- const data = useMultiFormMode ? propsData : localForm.data;
2102
- const valid = useMultiFormMode ? propsValid : localForm.valid;
2103
- const errors = useMultiFormMode ? propsErrors : localForm.errors;
2104
- const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
2105
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2106
- const handleBlur = () => {
2107
- onBlur?.();
2108
- handleChange("bankAccountNumber", "blur");
2109
- };
2110
- const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
2111
- useEffect$1(() => {
2112
- if (!useMultiFormMode) updateStateSlice({
2113
- data,
2114
- valid,
2115
- errors,
2116
- fieldProblems
2117
- });
2118
- }, [
2119
- data,
2120
- valid,
2121
- errors,
2122
- fieldProblems,
2123
- useMultiFormMode
2124
- ]);
2125
- const formUtils = createFormUtils(mergedProps, t);
2126
- return /* @__PURE__ */ jsx(MaskedInput, {
2127
- name: "bankAccountNumber",
2128
- type: "text",
2129
- label: t(($) => $["bankAccountNumber"]),
2130
- formatGuidance: translateTranslatable(t, metadata.guidanceText),
2131
- ...formUtils.getMask("bankAccountNumber"),
2132
- isValid: valid?.bankAccountNumber ?? true,
2133
- errorMessage: formUtils.getErrorMessage("bankAccountNumber", errors, fieldProblems),
2134
- "aria-required": true,
2135
- "aria-invalid": !valid?.bankAccountNumber,
2136
- onBlur: handleBlur,
2137
- onInput: handleChange("bankAccountNumber", "input"),
2138
- onFocus,
2139
- readonly: formUtils.isReadOnly("bankAccountNumber"),
2140
- value: data?.bankAccountNumber ?? "",
2141
- acceptObscuredValue: formUtils.isObscured("bankAccountNumber")
2142
- });
2143
- }
2144
- //#endregion
2145
- //#region src/components/BankAccount/fields/BankCity/BankCity.tsx
2146
- var bankCityFields = ["bankCity"];
2147
- function BankCity(props) {
2148
- const { t } = useTranslation("common");
2149
- const { validators, data: bankCityData, valid: propsValid, errors: propsErrors, fieldValidationErrors, handleFieldChange } = props;
2150
- const localForm = useForm({
2151
- ...props,
2152
- schema: bankCityFields,
2153
- rules: validators,
2154
- defaultData: bankCityData,
2155
- fieldProblems: fieldValidationErrors
2156
- });
2157
- const useMultiFormMode = !!handleFieldChange;
2158
- const data = useMultiFormMode ? bankCityData : localForm.data;
2159
- const valid = useMultiFormMode ? propsValid : localForm.valid;
2160
- const errors = useMultiFormMode ? propsErrors : localForm.errors;
2161
- const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
2162
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2163
- const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
2164
- useEffect$1(() => {
2165
- if (!useMultiFormMode) updateStateSlice({
2166
- data,
2167
- valid,
2168
- errors,
2169
- fieldProblems
2170
- });
2171
- }, [
2172
- data,
2173
- valid,
2174
- errors,
2175
- fieldProblems,
2176
- useMultiFormMode
2177
- ]);
2178
- const formUtils = createFormUtils(props, t);
2179
- return /* @__PURE__ */ jsx(Field, {
2180
- name: "bankCity",
2181
- label: t(($) => $["bankCityTown"]),
2182
- errorMessage: formUtils.getErrorMessage("bankCity", errors, fieldProblems),
2183
- isValid: valid?.bankCity ?? true,
2184
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
2185
- ...childProps,
2186
- name: "bankCity",
2187
- value: data?.bankCity,
2188
- readonly: formUtils.isReadOnly("bankCity"),
2189
- onInput: handleChange("bankCity", "input"),
2190
- onBlur: handleChange("bankCity", "blur"),
2191
- "aria-required": true,
2192
- "aria-invalid": !valid?.bankCity
2193
- })
2194
- });
2195
- }
2196
- //#endregion
2197
- //#region src/components/BankAccount/fields/BankCode/BankCode.tsx
2198
- var bankCodeFields = ["bankCode"];
2199
- function BankCode(props) {
2200
- const { t } = useTranslation("common");
2201
- const { country, fieldConfig = defaultFieldConfig$2, handleFieldChange, data: propsData, valid: propsValid, errors: propsErrors, fieldValidationErrors: propsFieldValidationErrors } = props;
2202
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
2203
- const mergedProps = mergeFieldMetadataIntoProps("bankCode", metadata, props);
2204
- const localForm = useForm({
2205
- ...mergedProps,
2206
- schema: bankCodeFields,
2207
- rules: mergedProps.validators,
2208
- defaultData: mergedProps.data,
2209
- fieldProblems: mergedProps.fieldValidationErrors
2210
- });
2211
- const useMultiFormMode = !!handleFieldChange;
2212
- const data = useMultiFormMode ? propsData : localForm.data;
2213
- const valid = useMultiFormMode ? propsValid : localForm.valid;
2214
- const errors = useMultiFormMode ? propsErrors : localForm.errors;
2215
- const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
2216
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2217
- const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
2218
- useEffect$1(() => {
2219
- if (!useMultiFormMode) updateStateSlice({
2220
- data,
2221
- valid,
2222
- errors,
2223
- fieldProblems
2224
- });
2225
- }, [
2226
- data,
2227
- valid,
2228
- errors,
2229
- fieldProblems,
2230
- useMultiFormMode
2231
- ]);
2232
- const formUtils = createFormUtils(mergedProps, t);
2233
- return /* @__PURE__ */ jsx(MaskedInput, {
2234
- name: "bankCode",
2235
- type: "text",
2236
- label: formUtils.getLabel("bankCode"),
2237
- errorMessage: formUtils.getErrorMessage("bankCode", errors, fieldProblems),
2238
- formatGuidance: translateTranslatable(t, metadata.guidanceText),
2239
- ...formUtils.getMask("bankCode"),
2240
- isValid: valid?.bankCode ?? true,
2241
- value: data?.bankCode ?? "",
2242
- readonly: formUtils.isReadOnly("bankCode"),
2243
- onInput: handleChange("bankCode", "input"),
2244
- onBlur: handleChange("bankCode", "blur"),
2245
- "aria-required": true,
2246
- "aria-invalid": !valid?.bankCode
2247
- });
2248
- }
2249
- //#endregion
2250
- //#region src/components/BankAccount/fields/BankName/BankName.tsx
2251
- var bankNameFields = ["bankName"];
2252
- function BankName(props) {
2253
- const { t } = useTranslation("common");
2254
- const { validators, data: bankNameData, valid: propsValid, errors: propsErrors, fieldValidationErrors, handleFieldChange } = props;
2255
- const localForm = useForm({
2256
- ...props,
2257
- schema: bankNameFields,
2258
- rules: validators,
2259
- defaultData: bankNameData,
2260
- fieldProblems: fieldValidationErrors
2261
- });
2262
- const useMultiFormMode = !!handleFieldChange;
2263
- const data = useMultiFormMode ? bankNameData : localForm.data;
2264
- const valid = useMultiFormMode ? propsValid : localForm.valid;
2265
- const errors = useMultiFormMode ? propsErrors : localForm.errors;
2266
- const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
2267
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2268
- const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
2269
- useEffect$1(() => {
2270
- if (!useMultiFormMode) updateStateSlice({
2271
- data,
2272
- valid,
2273
- errors,
2274
- fieldProblems
2275
- });
2276
- }, [
2277
- data,
2278
- valid,
2279
- errors,
2280
- fieldProblems,
2281
- useMultiFormMode
2282
- ]);
2283
- const formUtils = createFormUtils(props, t);
2284
- return /* @__PURE__ */ jsx(Field, {
2285
- name: "bankName",
2286
- label: t(($) => $["bankName"]),
2287
- errorMessage: formUtils.getErrorMessage("bankName", errors, fieldProblems),
2288
- isValid: valid?.bankName ?? true,
2289
- children: (childProps) => /* @__PURE__ */ jsx(InputText, {
2290
- ...childProps,
2291
- name: "bankName",
2292
- value: data?.bankName,
2293
- readonly: formUtils.isReadOnly("bankName"),
2294
- onInput: handleChange("bankName", "input"),
2295
- onBlur: handleChange("bankName", "blur"),
2296
- "aria-required": true,
2297
- "aria-invalid": !valid?.bankName
2298
- })
2299
- });
2300
- }
2301
- //#endregion
2302
- //#region src/components/BankAccount/fields/BranchCode/BranchCode.tsx
2303
- var branchCodeFields = ["branchCode"];
2304
- function BranchCode(props) {
2305
- const { t } = useTranslation("common");
2306
- const { country, fieldConfig = defaultFieldConfig$1, onFocus, onBlur, handleFieldChange, data: propsData, valid: propsValid, errors: propsErrors, fieldValidationErrors: propsFieldValidationErrors } = props;
2307
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$1);
2308
- const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
2309
- const localForm = useForm({
2310
- ...mergedProps,
2311
- schema: branchCodeFields,
2312
- rules: mergedProps.validators,
2313
- defaultData: mergedProps.data,
2314
- fieldProblems: mergedProps?.fieldValidationErrors
2315
- });
2316
- const useMultiFormMode = !!handleFieldChange;
2317
- const data = useMultiFormMode ? propsData : localForm.data;
2318
- const valid = useMultiFormMode ? propsValid : localForm.valid;
2319
- const errors = useMultiFormMode ? propsErrors : localForm.errors;
2320
- const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
2321
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2322
- const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
2323
- const handleBlur = () => {
2324
- onBlur?.();
2325
- handleChange("branchCode", "blur");
2326
- };
2327
- useEffect$1(() => {
2328
- if (!useMultiFormMode) updateStateSlice({
2329
- data,
2330
- valid,
2331
- errors,
2332
- fieldProblems
2333
- });
2334
- }, [
2335
- data,
2336
- valid,
2337
- errors,
2338
- fieldProblems,
2339
- useMultiFormMode
2340
- ]);
2341
- const formUtils = createFormUtils(mergedProps, t);
2342
- return /* @__PURE__ */ jsx(MaskedInput, {
2343
- name: "branchCode",
2344
- type: "text",
2345
- label: formUtils.getLabel("branchCode"),
2346
- formatGuidance: translateTranslatable(t, metadata.guidanceText),
2347
- ...formUtils.getMask("branchCode"),
2348
- errorMessage: formUtils.getErrorMessage("branchCode", errors, fieldProblems),
2349
- isValid: valid?.branchCode ?? true,
2350
- value: data?.branchCode ?? "",
2351
- readonly: formUtils.isReadOnly("branchCode"),
2352
- onInput: handleChange("branchCode", "input"),
2353
- onBlur: handleBlur,
2354
- onFocus,
2355
- "aria-required": true,
2356
- "aria-invalid": !valid?.branchCode
2357
- });
2358
- }
2359
- //#endregion
2360
- //#region src/components/BankAccount/fields/Iban/Iban.tsx
2361
- var ibanFields = ["iban"];
2362
- function Iban(props) {
2363
- const { t } = useTranslation("common");
2364
- const { country, fieldConfig = defaultFieldConfig, data: ibanData, valid: propsValid, errors: propsErrors, obscuredFields, fieldValidationErrors, handleFieldChange } = props;
2365
- const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata);
2366
- const mergedProps = mergeFieldMetadataIntoProps("iban", metadata, props);
2367
- const localForm = useForm({
2368
- ...mergedProps,
2369
- schema: ibanFields,
2370
- rules: mergedProps.validators,
2371
- defaultData: ibanData,
2372
- fieldProblems: fieldValidationErrors,
2373
- obscuredFields
2374
- });
2375
- const useMultiFormMode = !!handleFieldChange;
2376
- const data = useMultiFormMode ? ibanData : localForm.data;
2377
- const valid = useMultiFormMode ? propsValid : localForm.valid;
2378
- const errors = useMultiFormMode ? propsErrors : localForm.errors;
2379
- const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
2380
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2381
- const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
2382
- useEffect$1(() => {
2383
- if (!useMultiFormMode) updateStateSlice({
2384
- data,
2385
- valid,
2386
- errors,
2387
- fieldProblems
2388
- });
2389
- }, [
2390
- data,
2391
- errors,
2392
- valid,
2393
- fieldProblems,
2394
- useMultiFormMode
2395
- ]);
2396
- const formUtils = createFormUtils(mergedProps, t);
2397
- return /* @__PURE__ */ jsx(MaskedInput, {
2398
- name: "iban",
2399
- type: "text",
2400
- label: t(($) => $["iban"]),
2401
- formatGuidance: translateTranslatable(t, metadata.guidanceText),
2402
- ...formUtils.getMask("iban"),
2403
- errorMessage: formUtils.getErrorMessage("iban", errors, fieldProblems),
2404
- isValid: valid?.iban ?? true,
2405
- value: data?.iban ?? "",
2406
- readonly: formUtils.isReadOnly("iban"),
2407
- onInput: handleChange("iban", "input"),
2408
- onBlur: handleChange("iban", "blur"),
2409
- "aria-required": true,
2410
- "aria-invalid": valid?.iban === false,
2411
- acceptObscuredValue: formUtils.isObscured("iban")
2412
- });
2413
- }
2414
- //#endregion
2415
- //#region src/components/BankAccount/fields/SwiftCode/SwiftCode.tsx
2416
- var swiftCodeFields = ["swiftCode"];
2417
- function SwiftCode(props) {
2418
- const { t } = useTranslation("common");
2419
- const { handleFieldChange, data: propsData, valid: propsValid, errors: propsErrors, fieldValidationErrors: propsFieldValidationErrors, country } = props;
2420
- const mergedProps = mergeFieldMetadataIntoProps("swiftCode", swiftCodeFieldMetadata, props);
2421
- const localForm = useForm({
2422
- ...mergedProps,
2423
- schema: swiftCodeFields,
2424
- rules: mergedProps.validators,
2425
- defaultData: mergedProps.data,
2426
- fieldProblems: mergedProps?.fieldValidationErrors
2427
- });
2428
- const useMultiFormMode = !!handleFieldChange;
2429
- const data = useMultiFormMode ? propsData : localForm.data;
2430
- const valid = useMultiFormMode ? propsValid : localForm.valid;
2431
- const errors = useMultiFormMode ? propsErrors : localForm.errors;
2432
- const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
2433
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2434
- const { updateStateSlice } = useGlobalDataSlice("payoutAccountDetails");
2435
- useEffect$1(() => {
2436
- if (!useMultiFormMode) updateStateSlice({
2437
- data,
2438
- valid,
2439
- errors,
2440
- fieldProblems
2441
- });
2442
- }, [
2443
- data,
2444
- valid,
2445
- errors,
2446
- fieldProblems,
2447
- useMultiFormMode
2448
- ]);
2449
- const formUtils = createFormUtils(mergedProps, t);
2450
- return /* @__PURE__ */ jsx(MaskedInput, {
2451
- name: "swiftCode",
2452
- type: "text",
2453
- label: t(($) => $["bicSwift"]),
2454
- formatGuidance: t(($) => $["enterXOrYCharactersForExample"], {
2455
- xChars: "8",
2456
- yChars: "11",
2457
- example: `BANK${country}65287`
2458
- }),
2459
- ...formUtils.getMask("swiftCode"),
2460
- errorMessage: formUtils.getErrorMessage("swiftCode", errors, fieldProblems),
2461
- isValid: valid?.swiftCode ?? true,
2462
- value: data?.swiftCode ?? "",
2463
- readonly: formUtils.isReadOnly("swiftCode"),
2464
- onInput: handleChange("swiftCode", "input"),
2465
- onBlur: handleChange("swiftCode", "blur"),
2466
- "aria-required": true,
2467
- "aria-invalid": valid?.swiftCode === false
2468
- });
2469
- }
2470
- //#endregion
2471
- //#region src/components/BankAccount/utils/payoutAccountUtil.ts
2472
- var countriesWithMultiplePayoutCurrencies = new Set([
2473
- CountryCodes.Bulgaria,
2474
- CountryCodes.Canada,
2475
- CountryCodes.Croatia,
2476
- CountryCodes.CzechRepublic,
2477
- CountryCodes.Hungary,
2478
- CountryCodes.Romania,
2479
- CountryCodes.Switzerland
2480
- ]);
2481
- var countriesWithLocalFormat = new Set([
2482
- CountryCodes.CzechRepublic,
2483
- CountryCodes.Denmark,
2484
- CountryCodes.Hungary,
2485
- CountryCodes.Norway,
2486
- CountryCodes.Poland,
2487
- CountryCodes.Sweden,
2488
- CountryCodes.UnitedKingdom
2489
- ]);
2490
- var payoutCurrencySupport = {
2491
- [CountryCodes.Sweden]: {
2492
- local: [Currencies.SEK],
2493
- iban: [Currencies.EUR, Currencies.SEK]
2494
- },
2495
- [CountryCodes.Canada]: {
2496
- local: [Currencies.CAD, Currencies.USD],
2497
- iban: [Currencies.CAD, Currencies.USD]
2498
- }
2499
- };
2500
- var shouldShowCheckGuidance = (country) => country === "US";
2501
- var shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
2502
- var shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultiplePayoutCurrencies.has(country);
2503
- var getSupportedCurrencyGuidance = (t, country, requiredFields) => {
2504
- const format = requiredFields.includes("iban") ? "iban" : "local";
2505
- if (!shouldShowPayoutAlert(country)) return;
2506
- const supportedCurrencies = getSupportedCurrenciesPerFormat(country, format);
2507
- if (!supportedCurrencies) return;
2508
- return supportedCurrencies.length > 1 ? t(($) => $["payoutIn_Or_"], {
2509
- currencyOne: supportedCurrencies[0],
2510
- currencyTwo: supportedCurrencies[1]
2511
- }) : t(($) => $["payoutInOnly_"], { currency: supportedCurrencies[0] });
2512
- };
2513
- var getSupportedCurrenciesPerFormat = (country, format) => {
2514
- const supportedCurrencies = payoutCurrencySupport[country];
2515
- if (!supportedCurrencies) {
2516
- const defaultCurrency = currencyByCountry[country]?.[0];
2517
- if (!defaultCurrency) return;
2518
- if (format === "iban" && defaultCurrency !== Currencies.EUR) return [Currencies.EUR, defaultCurrency];
2519
- else return [defaultCurrency];
2520
- }
2521
- return supportedCurrencies[format];
2522
- };
2523
- var isLocalCurrency = (country, currency) => {
2524
- if (!country || !currency) return false;
2525
- return currencyByCountry[country]?.includes(currency) ?? false;
2526
- };
2527
- var CheckGuidance_module_default = {
2528
- "check-guidance": "adyen-kyc-check-guidance",
2529
- checkGuidance: "adyen-kyc-check-guidance",
2530
- "check-guidance-image": "adyen-kyc-check-guidance-image",
2531
- checkGuidanceImage: "adyen-kyc-check-guidance-image",
2532
- "check-guidance-annotated": "adyen-kyc-check-guidance-annotated",
2533
- checkGuidanceAnnotated: "adyen-kyc-check-guidance-annotated",
2534
- "check-guidance-inactive": "adyen-kyc-check-guidance-inactive",
2535
- checkGuidanceInactive: "adyen-kyc-check-guidance-inactive",
2536
- "us-check-account-number": "adyen-kyc-us-check-account-number",
2537
- usCheckAccountNumber: "adyen-kyc-us-check-account-number",
2538
- "us-check-routing-number": "adyen-kyc-us-check-routing-number",
2539
- usCheckRoutingNumber: "adyen-kyc-us-check-routing-number"
2540
- };
2541
- //#endregion
2542
- //#region src/components/BankAccount/forms/PayoutAccount/CheckGuidance/CheckGuidance.tsx
2543
- var usCheckAccount = lazy(() => import("./us-check-account-number-BME1X1ZC.js"));
2544
- var usCheckRouting = lazy(() => import("./us-check-routing-number-UatGnO16.js"));
2545
- var usCheck = lazy(() => import("./us-check-BW6K3WxJ.js"));
2546
- var CheckGuidance = ({ annotated }) => {
2547
- return /* @__PURE__ */ jsxs("div", {
2548
- className: CheckGuidance_module_default.checkGuidance,
2549
- children: [
2550
- /* @__PURE__ */ jsx(Image, {
2551
- lazyLoadedImage: usCheckAccount,
2552
- className: cx(CheckGuidance_module_default.checkGuidanceImage, CheckGuidance_module_default.checkGuidanceAnnotated, { [CheckGuidance_module_default.checkGuidanceInactive]: annotated !== "account" })
2553
- }),
2554
- /* @__PURE__ */ jsx(Image, {
2555
- lazyLoadedImage: usCheckRouting,
2556
- className: cx(CheckGuidance_module_default.checkGuidanceImage, CheckGuidance_module_default.checkGuidanceAnnotated, { [CheckGuidance_module_default.checkGuidanceInactive]: annotated !== "routing" })
2557
- }),
2558
- /* @__PURE__ */ jsx(Image, {
2559
- lazyLoadedImage: usCheck,
2560
- className: CheckGuidance_module_default.checkGuidanceImage
2561
- })
2562
- ]
2563
- });
2564
- };
2565
- //#endregion
2566
- //#region src/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.ts
2567
- var tinkLogo = lazy(() => import("./tink-logo-CqXir9XT.js"));
2568
- var plaidLogo = lazy(() => import("./plaid-logo-CjpdjGNT.js"));
2569
- var yapilyLogo = lazy(() => import("./yapily-logo-upggwl6u.js"));
2570
- var instantVerificationImage = lazy(() => import("./payout-verification-instant-DOCBn9if.js"));
2571
- var manualVerificationImage = lazy(() => import("./payout-verification-manual-DmhxH6y1.js"));
2572
- var getProviderIconName = (providerName) => {
2573
- switch (providerName?.toLowerCase()) {
2574
- case "tink": return tinkLogo;
2575
- case "plaid": return plaidLogo;
2576
- case "yapily": return yapilyLogo;
2577
- default: return;
2578
- }
2579
- };
2580
- var makePayoutVerificationMethodsMetadata = (instantVerificationProviderName) => ({
2581
- instantVerification: {
2582
- name: "verifyViaMobileBankingAppOrWebsite",
2583
- subtitle: "instant",
2584
- svgImport: instantVerificationImage,
2585
- description: "instantVerificationDescription",
2586
- provider: instantVerificationProviderName ? {
2587
- name: instantVerificationProviderName,
2588
- svgImport: getProviderIconName(instantVerificationProviderName)
2589
- } : void 0
2590
- },
2591
- manualVerification: {
2592
- name: "uploadABankStatement",
2593
- subtitle: "mayTakeAFewDays",
2594
- description: "manualVerificationDescription",
2595
- svgImport: manualVerificationImage
2596
- }
2597
- });
2598
- var InstantVerificationCTA_module_default = {
2599
- "cta-button-content": "adyen-kyc-cta-button-content",
2600
- ctaButtonContent: "adyen-kyc-cta-button-content",
2601
- "cta-provider-logo": "adyen-kyc-cta-provider-logo",
2602
- ctaProviderLogo: "adyen-kyc-cta-provider-logo",
2603
- "cta-divider": "adyen-kyc-cta-divider",
2604
- ctaDivider: "adyen-kyc-cta-divider",
2605
- "divider-segment": "adyen-kyc-divider-segment",
2606
- dividerSegment: "adyen-kyc-divider-segment",
2607
- "instant-verification-error": "adyen-kyc-instant-verification-error",
2608
- instantVerificationError: "adyen-kyc-instant-verification-error"
2609
- };
2610
- //#endregion
2611
- //#region src/components/BankAccount/forms/PayoutAccount/InstantVerificationCTA/InstantVerificationCTA.tsx
2612
- var InstantVerificationCTA = ({ provider }) => {
2613
- const instantVerificationError = useContext$1(InstantVerificationErrorContext);
2614
- const { t } = useTranslation("banking");
2615
- const { t: commonT } = useTranslation("common");
2616
- const userEvents = useAnalyticsContext();
2617
- const providerIcon = getProviderIconName(provider?.name);
2618
- const handleClick = () => {
2619
- trackNavigation({
2620
- userEvents,
2621
- actionType: "open",
2622
- label: "instantVerification"
2623
- });
2624
- isUsingManualFlow.value = false;
2625
- showInstantVerificationPayoutModal.value = true;
2626
- };
2627
- if (!providerIcon) return null;
2628
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
2629
- instantVerificationError && /* @__PURE__ */ jsx(Alert, {
2630
- variant: "error",
2631
- className: InstantVerificationCTA_module_default.instantVerificationError,
2632
- title: instantVerificationError.title,
2633
- children: instantVerificationError.content && /* @__PURE__ */ jsx(Typography, {
2634
- variant: "body",
2635
- children: instantVerificationError.content
2636
- })
2637
- }),
2638
- /* @__PURE__ */ jsx("div", {
2639
- className: "adyen-kyc-u-margin-bottom-24",
2640
- children: /* @__PURE__ */ jsx(Button, {
2641
- variant: "primary",
2642
- fullWidth: true,
2643
- onClick: handleClick,
2644
- testId: "instant-verification-button",
2645
- children: /* @__PURE__ */ jsx("span", {
2646
- className: InstantVerificationCTA_module_default.ctaButtonContent,
2647
- children: /* @__PURE__ */ jsx(Trans, {
2648
- t,
2649
- i18nKey: ($) => $["addAccountFasterWith"],
2650
- components: { providerLogo: /* @__PURE__ */ jsx("span", {
2651
- className: InstantVerificationCTA_module_default.ctaProviderLogo,
2652
- children: /* @__PURE__ */ jsx(Image, { lazyLoadedImage: providerIcon })
2653
- }) }
2654
- })
2655
- })
2656
- })
2657
- }),
2658
- /* @__PURE__ */ jsxs("div", {
2659
- className: `adyen-kyc-u-margin-bottom-16 ${InstantVerificationCTA_module_default.ctaDivider}`,
2660
- children: [
2661
- /* @__PURE__ */ jsx("div", {
2662
- className: InstantVerificationCTA_module_default.dividerSegment,
2663
- children: /* @__PURE__ */ jsx(Divider, {})
2664
- }),
2665
- /* @__PURE__ */ jsx(Typography, {
2666
- variant: "body",
2667
- color: "secondary",
2668
- children: commonT(($) => $["or"])
2669
- }),
2670
- /* @__PURE__ */ jsx("div", {
2671
- className: InstantVerificationCTA_module_default.dividerSegment,
2672
- children: /* @__PURE__ */ jsx(Divider, {})
2673
- })
2674
- ]
2675
- })
2676
- ] });
2677
- };
2678
- //#endregion
2679
- //#region src/components/BankAccount/forms/PayoutAccount/PayoutAccount.tsx
2680
- var payoutAccountFields = [
2681
- "accountHolder",
2682
- ...ibanFields,
2683
- ...branchCodeFields,
2684
- ...swiftCodeFields,
2685
- ...bankAccountNumberFields,
2686
- ...bankNameFields,
2687
- ...bankCodeFields
2688
- ];
2689
- function PayoutAccount(props) {
2690
- const accountFormat = payoutAccountFormat.value;
2691
- const { t } = useTranslation("banking");
2692
- const { t: commonT } = useTranslation("common");
2693
- const [checkAnnotation, setCheckAnnotation] = useState$1();
2694
- const { isFeatureEnabled } = useToggleContext();
2695
- const { isSettingEnabled } = useSettingsContext();
2696
- const isCrossBorderPayoutsEnabled = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
2697
- const bankAccountFormatSelectionAllowed = isSettingEnabled(SettingNames.AllowBankAccountFormatSelection);
2698
- const { heading, country, id, legalEntityResponse, requiredFields = [], arePayoutAccountDetailsInvalid, invalidFieldNames, formVerificationErrors, fieldValidationErrors, preferredCurrencyCode, data, errors, valid, handleFieldChange, showInstantVerificationCTA, provider } = props;
2699
- const showCheckGuidance = shouldShowCheckGuidance(country) && !showInstantVerificationCTA;
2700
- const formUtils = createFormUtils({
2701
- ...props,
2702
- requiredFields
2703
- }, commonT);
2704
- const bankAccountNumberProps = getFieldProps(props, bankAccountNumberFields);
2705
- const swiftCodeProps = getFieldProps(props, swiftCodeFields);
2706
- const ibanProps = getFieldProps(props, ibanFields);
2707
- const branchCodeProps = getFieldProps(props, branchCodeFields);
2708
- const bankNameProps = getFieldProps(props, bankNameFields);
2709
- const bankCodeProps = getFieldProps(props, bankCodeFields);
2710
- const bankCityProps = getFieldProps(props, bankCityFields);
2711
- const { clearStateSlice } = useGlobalDataSlice("payoutAccountDetails");
2712
- const handleAccountFormatChange = (accountFormat) => {
2713
- clearStateSlice();
2714
- payoutAccountFormat.value = accountFormat;
2715
- };
2716
- const localCurrency = isCrossBorderPayoutsEnabled ? isLocalCurrency(country, preferredCurrencyCode) : true;
2717
- const isEUR = preferredCurrencyCode === "EUR";
2718
- useEffect$1(() => {
2719
- if (!isCrossBorderPayoutsEnabled || data?.transferInstrumentId) return;
2720
- if (isEUR && localCurrency) {
2721
- handleAccountFormatChange?.("iban");
2722
- return;
2723
- }
2724
- if (!localCurrency) handleAccountFormatChange?.("numberAndBic");
2725
- }, [country, preferredCurrencyCode]);
2726
- const multiFormProps = handleFieldChange ? {
2727
- data,
2728
- valid,
2729
- errors,
2730
- fieldValidationErrors,
2731
- handleFieldChange
2732
- } : {};
2733
- return /* @__PURE__ */ jsxs("form", {
2734
- "aria-describedby": "ariaErrorField",
2735
- children: [
2736
- heading && /* @__PURE__ */ jsx(Header, {
2737
- title: heading,
2738
- children: /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, {
2739
- slot: "description",
2740
- legalEntityResponse
2741
- })
2742
- }),
2743
- /* @__PURE__ */ jsx(ErrorPanel, {
2744
- verificationErrors: formVerificationErrors,
2745
- validationErrors: fieldValidationErrors,
2746
- formUtils,
2747
- id: "ariaErrorField"
2748
- }),
2749
- showInstantVerificationCTA && /* @__PURE__ */ jsx(InstantVerificationCTA, { provider }),
2750
- showCheckGuidance ? /* @__PURE__ */ jsx(CheckGuidance, { annotated: checkAnnotation }) : void 0,
2751
- bankAccountFormatSelectionAllowed && shouldShowPayoutAccountFormatSelector(country) && accountFormat && localCurrency && !isEUR && /* @__PURE__ */ jsx(BankAccountFormat, {
2752
- bankAccountFormat: accountFormat,
2753
- handleAccountFormatChange
2754
- }),
2755
- formUtils.isRequiredField("branchCode") && /* @__PURE__ */ jsx(BranchCode, {
2756
- ...branchCodeProps,
2757
- country,
2758
- dataStoreId: id,
2759
- onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
2760
- onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0,
2761
- ...multiFormProps
2762
- }),
2763
- formUtils.isRequiredField("bankAccountNumber") && /* @__PURE__ */ jsx(BankAccountNumber, {
2764
- ...bankAccountNumberProps,
2765
- country,
2766
- dataStoreId: id,
2767
- onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
2768
- onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0,
2769
- ...multiFormProps
2770
- }),
2771
- formUtils.isRequiredField("iban") && /* @__PURE__ */ jsx(Iban, {
2772
- ...ibanProps,
2773
- dataStoreId: id,
2774
- country,
2775
- ...multiFormProps
2776
- }),
2777
- formUtils.isRequiredField("swiftCode") && /* @__PURE__ */ jsx(SwiftCode, {
2778
- ...swiftCodeProps,
2779
- dataStoreId: id,
2780
- ...multiFormProps,
2781
- country
2782
- }),
2783
- formUtils.isRequiredField("bankName") && /* @__PURE__ */ jsx(BankName, {
2784
- ...bankNameProps,
2785
- dataStoreId: id,
2786
- ...multiFormProps
2787
- }),
2788
- formUtils.isRequiredField("bankCode") && /* @__PURE__ */ jsx(BankCode, {
2789
- ...bankCodeProps,
2790
- country,
2791
- dataStoreId: id,
2792
- ...multiFormProps
2793
- }),
2794
- formUtils.isRequiredField("bankCity") && /* @__PURE__ */ jsx(BankCity, {
2795
- ...bankCityProps,
2796
- dataStoreId: id,
2797
- ...multiFormProps
2798
- }),
2799
- shouldShowPayoutAlert(country) && !isCrossBorderPayoutsEnabled && /* @__PURE__ */ jsx(Alert, {
2800
- title: getSupportedCurrencyGuidance(t, country, requiredFields),
2801
- className: "adyen-kyc-u-margin-bottom-8"
2802
- }),
2803
- !isCrossBorderPayoutsEnabled && /* @__PURE__ */ jsx(Typography, {
2804
- variant: "caption",
2805
- color: "tertiary",
2806
- children: t(($) => $["thisAccountWillBeVerifiedToPrevent"])
2807
- }),
2808
- arePayoutAccountDetailsInvalid && /* @__PURE__ */ jsx(Alert, {
2809
- className: "adyen-kyc-u-margin-top-16",
2810
- variant: "error",
2811
- title: invalidFieldNames ? t(($) => $["pleaseEnterValidField"], { fieldNames: invalidFieldNames }) : t(($) => $["pleaseEnterValidAccountDetails"])
2812
- })
2813
- ]
2814
- });
2815
- }
2816
- //#endregion
2817
- //#region src/components/BankAccount/forms/PayoutVerificationMethod/allowedBankCountriesPerCountry.ts
2818
- var regions = {
2819
- europe: [
2820
- ...EEA_Countries,
2821
- CountryCodes.Switzerland,
2822
- CountryCodes.UnitedKingdom,
2823
- CountryCodes.Gibraltar
2824
- ],
2825
- apac: [CountryCodes.NewZealand, CountryCodes.Australia]
2826
- };
2827
- var getAllowedBankCountries = (country) => Object.values(regions).find((countriesInARegion) => countriesInARegion.includes(country)) ?? [country];
2828
- var VerificationMethod_module_default = {
2829
- "instant-verification-error": "adyen-kyc-instant-verification-error",
2830
- instantVerificationError: "adyen-kyc-instant-verification-error",
2831
- "payout-verification-method-card": "adyen-kyc-payout-verification-method-card",
2832
- payoutVerificationMethodCard: "adyen-kyc-payout-verification-method-card",
2833
- "payout-verification-method-card-disabled": "adyen-kyc-payout-verification-method-card-disabled",
2834
- payoutVerificationMethodCardDisabled: "adyen-kyc-payout-verification-method-card-disabled",
2835
- "payout-verification-method-card-image": "adyen-kyc-payout-verification-method-card-image",
2836
- payoutVerificationMethodCardImage: "adyen-kyc-payout-verification-method-card-image",
2837
- "payout-verification-method-card-body": "adyen-kyc-payout-verification-method-card-body",
2838
- payoutVerificationMethodCardBody: "adyen-kyc-payout-verification-method-card-body",
2839
- "payout-verification-method-card-image-container": "adyen-kyc-payout-verification-method-card-image-container",
2840
- payoutVerificationMethodCardImageContainer: "adyen-kyc-payout-verification-method-card-image-container",
2841
- "payout-verification-method-card-content": "adyen-kyc-payout-verification-method-card-content",
2842
- payoutVerificationMethodCardContent: "adyen-kyc-payout-verification-method-card-content",
2843
- "payout-verification-method-card-title": "adyen-kyc-payout-verification-method-card-title",
2844
- payoutVerificationMethodCardTitle: "adyen-kyc-payout-verification-method-card-title",
2845
- "payout-verification-method-card-subtitle": "adyen-kyc-payout-verification-method-card-subtitle",
2846
- payoutVerificationMethodCardSubtitle: "adyen-kyc-payout-verification-method-card-subtitle"
2847
- };
2848
- //#endregion
2849
- //#region src/components/BankAccount/forms/PayoutVerificationMethod/PayoutVerificationMethod.tsx
2850
- var PayoutVerificationMethodOptionIcon = ({ method, methodsMetadata }) => {
2851
- const { svgImport } = methodsMetadata[method];
2852
- return /* @__PURE__ */ jsx(Image, {
2853
- className: VerificationMethod_module_default.payoutVerificationMethodCardImage,
2854
- lazyLoadedImage: svgImport
2855
- });
2856
- };
2857
- var PayoutVerificationMethodOptionCard = ({ payoutMethod, title, subtitle, tag, selectVerificationMethod, payoutVerificationMethod, methodsMetadata, bankInfoValidated, instantVerificationAvailable }) => {
2858
- return /* @__PURE__ */ jsx(Card, {
2859
- onClick: () => selectVerificationMethod(payoutMethod),
2860
- disabled: bankInfoValidated || payoutMethod === "instantVerification" && !instantVerificationAvailable,
2861
- selected: payoutMethod === payoutVerificationMethod,
2862
- padding: "none",
2863
- children: /* @__PURE__ */ jsxs("div", {
2864
- className: cx(VerificationMethod_module_default.payoutVerificationMethodCardBody, VerificationMethod_module_default.payoutVerificationMethodCard),
2865
- children: [/* @__PURE__ */ jsx("div", {
2866
- className: VerificationMethod_module_default.payoutVerificationMethodCardImageContainer,
2867
- children: /* @__PURE__ */ jsx(PayoutVerificationMethodOptionIcon, {
2868
- method: payoutMethod,
2869
- methodsMetadata
2870
- })
2871
- }), /* @__PURE__ */ jsxs("div", {
2872
- className: VerificationMethod_module_default.payoutVerificationMethodCardContent,
2873
- children: [
2874
- tag,
2875
- /* @__PURE__ */ jsx(Typography, {
2876
- el: "h4",
2877
- variant: "body-strongest",
2878
- className: VerificationMethod_module_default.payoutVerificationMethodCardTitle,
2879
- children: title
2880
- }),
2881
- /* @__PURE__ */ jsx(Typography, {
2882
- el: "p",
2883
- variant: "body",
2884
- color: "secondary",
2885
- className: VerificationMethod_module_default.payoutVerificationMethodCardSubtitle,
2886
- children: subtitle
2887
- })
2888
- ]
2889
- })]
2890
- })
2891
- }, payoutMethod);
2892
- };
2893
- var payoutVerificationMethodFields = [
2894
- "payoutVerificationMethod",
2895
- "bankCountry",
2896
- ...accountVerificationFields
2897
- ];
2898
- function PayoutVerificationMethod(props) {
2899
- const { heading, country, accountHolder, provider, bankVendorsLoadingStatus, instantVerificationAvailable, legalEntityResponse, validators, bankInfoValidated, data: payoutVerificationMethodData, fieldValidationErrors, formVerificationErrors, handleFieldChange, valid: propValid, errors: propErrors } = props;
2900
- const { type: legalEntityType } = legalEntityResponse;
2901
- const { t } = useTranslation("banking");
2902
- const { t: commonT } = useTranslation("common");
2903
- const instantVerificationError = useContext$1(InstantVerificationErrorContext);
2904
- const { isSettingEnabled } = useSettingsContext();
2905
- const { isFeatureEnabled } = useToggleContext();
2906
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
2907
- const intraRegionCrossBorderPayoutsAllowed = isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout);
2908
- const [hasSelectedMethod, setHasSelectedMethod] = useState$1(false);
2909
- const localForm = useForm({
2910
- ...props,
2911
- schema: payoutVerificationMethodFields,
2912
- defaultData: {
2913
- verifiedAccountHolder: accountHolder,
2914
- verifiedCurrencyCode: currencyByCountry[country]?.[0],
2915
- bankCountry: country,
2916
- ...payoutVerificationMethodData
2917
- },
2918
- rules: validators || { payoutVerificationMethod: {
2919
- modes: ["blur"],
2920
- validate: (payoutVerificationMethod) => !!payoutVerificationMethod
2921
- } },
2922
- fieldProblems: fieldValidationErrors
2923
- });
2924
- const useMultiFormMode = !!handleFieldChange;
2925
- const data = useMultiFormMode ? payoutVerificationMethodData : localForm.data;
2926
- const valid = useMultiFormMode ? propValid : localForm.valid;
2927
- const errors = useMultiFormMode ? propErrors : localForm.errors;
2928
- const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
2929
- const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2930
- const formUtils = createFormUtils(props, commonT);
2931
- const { sliceData, updateStateSlice } = useGlobalDataSlice("payoutVerificationMethod");
2932
- const { clearStateSlice: clearPayoutAccountDetails } = useGlobalDataSlice("payoutAccountDetails");
2933
- useEffect$1(() => {
2934
- if (!useMultiFormMode) updateStateSlice({
2935
- data: {
2936
- ...sliceData,
2937
- ...localForm.data
2938
- },
2939
- errors: localForm.errors,
2940
- valid: localForm.valid,
2941
- fieldProblems: localForm.fieldProblems
2942
- });
2943
- }, [
2944
- localForm.data,
2945
- localForm.errors,
2946
- localForm.fieldProblems,
2947
- localForm.valid
2948
- ]);
2949
- const methodsMetadata = makePayoutVerificationMethodsMetadata(provider?.name);
2950
- const selectVerificationMethod = (method) => {
2951
- setHasSelectedMethod(true);
2952
- handleChange("payoutVerificationMethod")(method);
2953
- };
2954
- useEffect$1(() => {
2955
- if (bankInfoValidated) return;
2956
- if (!hasSelectedMethod && instantVerificationAvailable && data?.payoutVerificationMethod !== "instantVerification") handleChange("payoutVerificationMethod")("instantVerification");
2957
- if (!instantVerificationAvailable && data?.payoutVerificationMethod !== "manualVerification") handleChange("payoutVerificationMethod")("manualVerification");
2958
- }, [
2959
- data?.payoutVerificationMethod,
2960
- handleChange,
2961
- instantVerificationAvailable,
2962
- hasSelectedMethod,
2963
- bankInfoValidated
2964
- ]);
2965
- const { dataset: countries } = useDataset(datasetIdentifier.country);
2966
- const bankCountryName = countries.find((country) => country.id === data?.bankCountry)?.name ?? data?.bankCountry;
2967
- const allowedBankCountries = getAllowedBankCountries(country);
2968
- const countryField = /* @__PURE__ */ jsx(CountryField, {
2969
- data: { country: data?.bankCountry },
2970
- valid: { country: valid?.bankCountry ?? true },
2971
- errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
2972
- labels: { country: t(($) => $["bankAccountCountryRegion"]) },
2973
- readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
2974
- allowedCountries: allowedBankCountries,
2975
- handleChangeFor: () => (e) => {
2976
- if (!useMultiFormMode) clearPayoutAccountDetails();
2977
- return handleChange("bankCountry", "input")(e);
2978
- },
2979
- helperText: intraRegionCrossBorderPayoutsAllowed ? void 0 : t(($) => $[legalEntityType === LegalEntityTypes.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered"])
2980
- });
2981
- const description = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
2982
- t(($) => $["forYouToReceiveYourPayouts"]),
2983
- "\xA0",
2984
- /* @__PURE__ */ jsx(Trans, {
2985
- t,
2986
- ns: "banking",
2987
- i18nKey: ($) => $[getMustHaveSameAccountHolderNameTransKey(legalEntityType)],
2988
- values: {
2989
- name: accountHolder,
2990
- companyName: accountHolder
2991
- }
2992
- })
2993
- ] });
2994
- const isCrossBorderPayoutEnabled = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
2995
- return /* @__PURE__ */ jsxs("form", {
2996
- className: VerificationMethod_module_default.payoutVerificationMethod,
2997
- children: [
2998
- heading && /* @__PURE__ */ jsx(Header, {
2999
- title: heading,
3000
- children: /* @__PURE__ */ jsx("template", {
3001
- slot: "description",
3002
- children: description
3003
- })
3004
- }),
3005
- instantVerificationError && /* @__PURE__ */ jsx(Alert, {
3006
- variant: "error",
3007
- className: VerificationMethod_module_default.instantVerificationError,
3008
- title: instantVerificationError.title,
3009
- children: instantVerificationError.content && /* @__PURE__ */ jsx("p", {
3010
- className: "adyen-kyc-u-margin-0",
3011
- children: instantVerificationError.content
3012
- })
3013
- }),
3014
- !isCrossBorderPayoutEnabled && countryField,
3015
- /* @__PURE__ */ jsx(Field, {
3016
- el: "fieldset",
3017
- name: "verificationMethods",
3018
- label: formUtils.getLabel("payoutVerificationMethod", "verificationMethod"),
3019
- errorMessage: formUtils.getErrorMessage("payoutVerificationMethod", errors, fieldProblems),
3020
- helper: instantVerificationAvailable ? void 0 : t(($) => $["weDoNotYetSupportInstantVerificationForBankAccountsIn"], { countryName: bankCountryName }),
3021
- children: () => /* @__PURE__ */ jsxs(StackLayout, {
3022
- gap: "small",
3023
- children: [/* @__PURE__ */ jsx(PayoutVerificationMethodOptionCard, {
3024
- payoutMethod: "instantVerification",
3025
- title: t(($) => $["logInWithYourBank"]),
3026
- subtitle: t(($) => $["theFastestWayToVerifyYourAccount"]),
3027
- tag: /* @__PURE__ */ jsx(Tag, {
3028
- variant: "blue",
3029
- className: "adyen-kyc-u-margin-bottom-8",
3030
- children: t(($) => $["recommended"])
3031
- }),
3032
- selectVerificationMethod,
3033
- methodsMetadata,
3034
- payoutVerificationMethod: data?.payoutVerificationMethod,
3035
- instantVerificationAvailable,
3036
- bankInfoValidated
3037
- }), /* @__PURE__ */ jsx(PayoutVerificationMethodOptionCard, {
3038
- payoutMethod: "manualVerification",
3039
- title: t(($) => $["verifyManually"]),
3040
- subtitle: t(($) => $["enterYourAccountsDetailsOnYourOwn"]),
3041
- selectVerificationMethod,
3042
- methodsMetadata,
3043
- payoutVerificationMethod: data?.payoutVerificationMethod
3044
- })]
3045
- })
3046
- }),
3047
- /* @__PURE__ */ jsx(ErrorPanel, {
3048
- verificationErrors: formVerificationErrors,
3049
- validationErrors: fieldValidationErrors,
3050
- formUtils,
3051
- id: "ariaErrorField"
3052
- }),
3053
- provider && bankVendorsLoadingStatus === "success" ? /* @__PURE__ */ jsx(ContextGuidance, {
3054
- titleId: "howDoesVerificationWithOurPartnerWorks",
3055
- contentId: "bankVerificationWithPartnerSteps",
3056
- title: t(($) => $["howDoesVerificationWithOurPartnerWork"], { provider: provider.name }),
3057
- content: /* @__PURE__ */ jsxs(Fragment$1, { children: [
3058
- /* @__PURE__ */ jsx(Typography, { children: t(($) => $["isOurTrustedPartnerHelpingSpeedUpSetup"], { provider: provider.name }) }),
3059
- /* @__PURE__ */ jsxs("ul", { children: [
3060
- /* @__PURE__ */ jsx("li", { children: t(($) => $["selectTheBankToReceivePayouts"]) }),
3061
- /* @__PURE__ */ jsx("li", { children: t(($) => $["loginIntoYourBankingEnvironment"]) }),
3062
- /* @__PURE__ */ jsx("li", { children: t(($) => $["yourBankWillConfirmYourAccountDetails"]) })
3063
- ] }),
3064
- /* @__PURE__ */ jsx(Typography, { children: t(($) => $["adyenWillOnlyGetTemporaryAccess"]) }),
3065
- /* @__PURE__ */ jsx(Typography, {
3066
- variant: "caption",
3067
- children: /* @__PURE__ */ jsx(Link, {
3068
- href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy",
3069
- external: true,
3070
- children: commonT(($) => $["adyenPrivacyPolicy"])
3071
- })
3072
- })
3073
- ] })
3074
- }) : void 0
3075
- ]
3076
- });
3077
- }
3078
- //#endregion
3079
- //#region src/components/BankAccount/forms/PayoutDetails/PayoutDetailsMultiform.tsx
3080
- var payoutSteps = {
3081
- payoutCountryDetails: {
3082
- formId: "payoutCountryDetails",
3083
- formName: "payoutCountryDetails",
3084
- fields: payoutCountryDetailsFields
3085
- },
3086
- payoutVerificationMethod: {
3087
- formId: "payoutVerificationMethod",
3088
- formName: "verificationMethod",
3089
- fields: payoutVerificationMethodFields
3090
- },
3091
- payoutAccountDetails: {
3092
- formId: "payoutAccountDetails",
3093
- formName: "bankAccount",
3094
- fields: payoutAccountFields
3095
- },
3096
- payoutAccountDocuments: {
3097
- formId: "payoutAccountDocuments",
3098
- formName: "bankDocument",
3099
- formHeader: "bankDocumentHeader",
3100
- fields: bankDocumentClassificationFields
3101
- },
3102
- payoutAccountVerification: {
3103
- formId: "payoutAccountVerification",
3104
- formName: "instantVerification",
3105
- fields: accountVerificationFields
3106
- }
3107
- };
3108
- var PayoutCountryDetailsFormID = payoutSteps.payoutCountryDetails.formId;
3109
- var PayoutVerificationMethodFormID = payoutSteps.payoutVerificationMethod.formId;
3110
- var PayoutAccountDetailsFormID = payoutSteps.payoutAccountDetails.formId;
3111
- var PayoutAccountDocumentsFormID = payoutSteps.payoutAccountDocuments.formId;
3112
- var PayoutAccountVerificationFormID = payoutSteps.payoutAccountVerification.formId;
3113
- function PayoutDetailsMultiform({ activeForm, shouldValidate, problems = {}, country, accountHolder, legalEntityResponse, provider, bankVendorsLoadingStatus, instantVerificationAvailable, setHideSidebar, createTrustedTransferInstrument, accountDetailsFromInput, onBack, setHasAsyncValidationError, showInstantVerificationCTA, handleNextClick }) {
3114
- const { t } = useTranslation("banking");
3115
- const { t: commonT } = useTranslation("common");
3116
- const { form } = useFormContext();
3117
- const { isFeatureEnabled } = useToggleContext();
3118
- const { isSettingEnabled } = useSettingsContext();
3119
- const isCrossBorderPayoutsEnabled = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
3120
- const [instantVerificationError, setInstantVerificationError] = useInstantVerificationErrorNotification(1e4);
3121
- const bankCountry = (isCrossBorderPayoutsEnabled ? form.data?.payoutCountryDetails?.bankCountry : form.data?.payoutVerificationMethod?.bankCountry) ?? country;
3122
- const [bankInfoValidated, setBankInfoValidated] = useState$1(false);
3123
- const [arePayoutAccountDetailsInvalid, setArePayoutAccountDetailsInvalid] = useState$1(false);
3124
- const [invalidFieldNames, setInvalidFieldNames] = useState$1("");
3125
- const payload = useMemo$1(() => bankCountry && accountDetailsFromInput ? getAccountIdentificationFromPayoutAccountSchema(accountDetailsFromInput, bankCountry, isCrossBorderPayoutsEnabled) : {}, [
3126
- accountDetailsFromInput,
3127
- bankCountry,
3128
- isCrossBorderPayoutsEnabled
3129
- ]);
3130
- const validateAccountDetails = useAsyncAccountDetailsValidationRules(payload, hasEmptyFields(payload), isAccountIdentifierObscured(payload));
3131
- const resetInvalidFieldState = () => {
3132
- setInvalidFieldNames("");
3133
- setArePayoutAccountDetailsInvalid(false);
3134
- };
3135
- useEffect$1(() => {
3136
- if (validateAccountDetails?.invalidFields && validateAccountDetails.invalidFields.length > 0) {
3137
- setHasAsyncValidationError?.(true);
3138
- setInvalidFieldNames(concatenateFieldNames(validateAccountDetails.invalidFields.map((field) => extractFieldName(field.name)).map((key) => commonT(($) => $[key]))));
3139
- setArePayoutAccountDetailsInvalid(true);
3140
- } else {
3141
- setHasAsyncValidationError?.(false);
3142
- resetInvalidFieldState();
3143
- }
3144
- }, [
3145
- commonT,
3146
- validateAccountDetails,
3147
- setHasAsyncValidationError
3148
- ]);
3149
- const renderActiveForm = (activeForm) => {
3150
- switch (activeForm.formId) {
3151
- case PayoutCountryDetailsFormID: return /* @__PURE__ */ jsx(PayoutCountryDetails, {
3152
- id: activeForm.formId,
3153
- legalEntityResponse,
3154
- provider,
3155
- shouldValidate,
3156
- fieldValidationErrors: problems.validationErrors?.[activeForm.formId] ?? {},
3157
- formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {},
3158
- data: form.data.payoutCountryDetails,
3159
- errors: form.errors.payoutCountryDetails,
3160
- valid: form.valid.payoutCountryDetails,
3161
- allFields: form.allFields?.payoutCountryDetails,
3162
- requiredFields: form.requiredFields?.payoutCountryDetails,
3163
- optionalFields: form.optionalFields?.payoutCountryDetails,
3164
- trustedFields: form.trustedFields?.payoutCountryDetails,
3165
- handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutCountryDetails", mode)
3166
- });
3167
- case PayoutVerificationMethodFormID: return /* @__PURE__ */ jsx(InstantVerificationErrorContext.Provider, {
3168
- value: instantVerificationError,
3169
- children: /* @__PURE__ */ jsx(PayoutVerificationMethod, {
3170
- id: activeForm.formId,
3171
- heading: t(($) => $["addABankAccountForPayouts"]),
3172
- country,
3173
- accountHolder,
3174
- legalEntityResponse,
3175
- provider,
3176
- bankVendorsLoadingStatus,
3177
- bankInfoValidated,
3178
- instantVerificationAvailable,
3179
- shouldValidate,
3180
- fieldValidationErrors: problems.validationErrors?.[activeForm.formId] ?? {},
3181
- formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {},
3182
- data: form.data.payoutVerificationMethod,
3183
- errors: form.errors.payoutVerificationMethod,
3184
- valid: form.valid.payoutVerificationMethod,
3185
- allFields: form.allFields?.payoutVerificationMethod,
3186
- requiredFields: form.requiredFields?.payoutVerificationMethod,
3187
- optionalFields: form.optionalFields?.payoutVerificationMethod,
3188
- trustedFields: form.trustedFields?.payoutVerificationMethod,
3189
- handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutVerificationMethod", mode)
3190
- })
3191
- });
3192
- case PayoutAccountDetailsFormID: return /* @__PURE__ */ jsx(InstantVerificationErrorContext.Provider, {
3193
- value: instantVerificationError,
3194
- children: /* @__PURE__ */ jsx(PayoutAccount, {
3195
- id: activeForm.formId,
3196
- heading: t(($) => $["addABankAccountForPayouts"]),
3197
- country: bankCountry,
3198
- legalEntityResponse,
3199
- arePayoutAccountDetailsInvalid,
3200
- invalidFieldNames,
3201
- preferredCurrencyCode: form.data?.payoutCountryDetails?.preferredCurrency,
3202
- shouldValidate,
3203
- fieldValidationErrors: problems.validationErrors?.[activeForm.formId] ?? {},
3204
- formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {},
3205
- data: form.data.payoutAccountDetails,
3206
- errors: form.errors.payoutAccountDetails,
3207
- valid: form.valid.payoutAccountDetails,
3208
- allFields: form.allFields?.payoutAccountDetails,
3209
- requiredFields: form.requiredFields?.payoutAccountDetails,
3210
- optionalFields: form.optionalFields?.payoutAccountDetails,
3211
- trustedFields: form.trustedFields?.payoutAccountDetails,
3212
- obscuredFields: form.obscuredFields?.payoutAccountDetails,
3213
- handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutAccountDetails", mode),
3214
- showInstantVerificationCTA,
3215
- provider
3216
- })
3217
- });
3218
- case PayoutAccountDocumentsFormID: return /* @__PURE__ */ jsx(MemoizedBankDocumentClassification, {
3219
- id: activeForm.formId,
3220
- legalEntity: legalEntityResponse,
3221
- country: bankCountry,
3222
- shouldValidate,
3223
- fieldValidationErrors: problems.validationErrors?.[activeForm.formId] ?? {},
3224
- formVerificationErrors: problems.verificationErrors?.[activeForm.formId] ?? {},
3225
- data: form.data.payoutAccountDocuments,
3226
- errors: form.errors.payoutAccountDocuments,
3227
- valid: form.valid.payoutAccountDocuments,
3228
- allFields: form.allFields?.payoutAccountDocuments,
3229
- requiredFields: form.requiredFields?.payoutAccountDocuments,
3230
- optionalFields: form.optionalFields?.payoutAccountDocuments,
3231
- trustedFields: form.trustedFields?.payoutAccountDocuments,
3232
- handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutAccountDocuments", mode),
3233
- handleNextClick
3234
- });
3235
- default: return null;
3236
- }
3237
- };
3238
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
3239
- className: "adyen-kyc-form-wrapper",
3240
- children: renderActiveForm(activeForm)
3241
- }), /* @__PURE__ */ jsx(Show, {
3242
- when: showInstantVerificationPayoutModal,
3243
- children: /* @__PURE__ */ jsx(BankVerification, {
3244
- id: PayoutAccountVerificationFormID,
3245
- heading: t(($) => $["bankAccountVerification"]),
3246
- provider,
3247
- country: bankCountry,
3248
- onBack,
3249
- hideSidebar: setHideSidebar,
3250
- setBankVerificationError: setInstantVerificationError,
3251
- bankInfoValidated,
3252
- setBankInfoValidated,
3253
- formIsActive: activeForm.formId === PayoutVerificationMethodFormID,
3254
- createTrustedTransferInstrument,
3255
- shouldValidate,
3256
- fieldValidationErrors: problems.validationErrors?.[PayoutAccountVerificationFormID] ?? {},
3257
- formVerificationErrors: problems.verificationErrors?.[PayoutAccountVerificationFormID] ?? {},
3258
- data: form.data.payoutAccountVerification,
3259
- errors: form.errors.payoutAccountVerification,
3260
- valid: form.valid.payoutAccountVerification,
3261
- allFields: form.allFields?.payoutAccountVerification,
3262
- requiredFields: form.requiredFields?.payoutAccountVerification,
3263
- optionalFields: form.optionalFields?.payoutAccountVerification,
3264
- trustedFields: form.trustedFields?.payoutAccountVerification,
3265
- handleFieldChange: (fieldName, mode) => form.handleChangeFor(fieldName, "payoutAccountVerification", mode)
3266
- })
3267
- })] });
3268
- }
3269
- //#endregion
3270
- //#region src/components/BankAccount/forms/PayoutDetails/rules.ts
3271
- var rules = ({ data, isSettingEnabled, isExperimentEnabled }) => {
3272
- const isForcedManualPayoutFlowEnabled = isExperimentEnabled?.(ExperimentNames.BankingPayoutFlow_ForcedManualVerification) && !isSettingEnabled?.(SettingNames.AllowIntraRegionCrossBorderPayout);
3273
- return createFormRules({
3274
- whenUsingManualVerification: () => {
3275
- if (isForcedManualPayoutFlowEnabled) return "REQUIRED";
3276
- if (!data.payoutVerificationMethod) return;
3277
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") return "REQUIRED";
3278
- },
3279
- whenUsingInstantVerification: () => {
3280
- if (isForcedManualPayoutFlowEnabled) return isUsingManualFlow.value ? void 0 : "REQUIRED";
3281
- if (!data.payoutVerificationMethod) return "REQUIRED";
3282
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") return "REQUIRED";
3283
- },
3284
- verifiedBankAccountNumber: () => {
3285
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") return "REQUIRED";
3286
- },
3287
- bankStatementRequirement: () => {
3288
- return "REQUIRED";
3289
- },
3290
- bankStatementDescription: () => {
3291
- if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") return "OPTIONAL";
3292
- }
3293
- });
3294
- };
3295
- //#endregion
3296
- //#region src/components/BankAccount/mapping/mapApiDocumentToPayoutDocuments.ts
3297
- var mapApiDocumentToPayoutDocuments = (entityId) => {
3298
- const bankStatement = getDocument(entityId, "bankStatement");
3299
- if (!bankStatement) throw new Error(`bankStatement with id ${entityId} not found`);
3300
- return {
3301
- bankStatementDocument: [mapExistingFile(getPageName(bankStatement))],
3302
- description: bankStatement.description
3303
- };
3304
- };
3305
- //#endregion
3306
- //#region src/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.ts
3307
- /**
3308
- * Easy to use function for mapping payout account details component data to transferInstrument
3309
- * @param payoutDetails - Details person data
3310
- * @returns transferInstrument - a transferInstrument the same as found in API response
3311
- */
3312
- var mapPayoutDetailsToTransferInstrument = ({ data, legalEntity, enabledCrossBorderPayouts }) => {
3313
- if (!data.payoutAccountDetails || !data.payoutVerificationMethod) throw new Error("Missing payout details data");
3314
- if (enabledCrossBorderPayouts && !data.payoutCountryDetails) throw new Error("Missing payout details data");
3315
- const bankCountry = enabledCrossBorderPayouts ? data.payoutCountryDetails?.bankCountry : data.payoutVerificationMethod?.bankCountry;
3316
- const preferredCurrency = enabledCrossBorderPayouts ? data.payoutCountryDetails?.preferredCurrency : void 0;
3317
- return {
3318
- bankAccount: mapPayoutAccountSchemaToApiBankAccount(data.payoutAccountDetails, bankCountry, preferredCurrency, enabledCrossBorderPayouts),
3319
- legalEntityId: legalEntity.id,
3320
- type: "bankAccount"
3321
- };
3322
- };
3323
- //#endregion
3324
- //#region src/components/BankAccount/mapping/mapPayoutDocumentsToApiDocuments.ts
3325
- var mapPayoutDocumentsToApiDocuments = async (data, entityId) => {
3326
- const { bankStatementDocument, description } = data.payoutAccountDocuments ?? {};
3327
- if (!bankStatementDocument?.length) return;
3328
- const page1 = bankStatementDocument[0];
3329
- if (!page1) throw new Error("Document needs at least one page");
3330
- return await createDocumentRequest({
3331
- entityId,
3332
- entityType: "bankAccount",
3333
- documentType: "bankStatement",
3334
- page1,
3335
- description,
3336
- existingDocument: getDocument(entityId, "bankStatement")
3337
- });
3338
- };
3339
- var PayoutDetailsGettingStarted_module_default = {
3340
- "payout-details-getting-started": "adyen-kyc-payout-details-getting-started",
3341
- payoutDetailsGettingStarted: "adyen-kyc-payout-details-getting-started"
3342
- };
3343
- //#endregion
3344
- //#region src/components/BankAccount/tasks/PayoutDetailsGettingStarted/PayoutDetailsGettingStarted.tsx
3345
- var payoutBankAccountsImage = lazy(() => import("./payout-bank-accounts-BN3KdVID.js"));
3346
- var PayoutDetailsGettingStarted = ({ onGetStarted, onFinishLater, provider }) => {
3347
- const [isRequirementsModalOpen, setIsRequirementsModalOpen] = useState$1(false);
3348
- const { t } = useTranslation("banking");
3349
- const { t: commonT } = useTranslation("common");
3350
- return /* @__PURE__ */ jsxs("div", {
3351
- className: PayoutDetailsGettingStarted_module_default.payoutDetailsGettingStarted,
3352
- "data-testid": "payout-details-getting-started",
3353
- children: [/* @__PURE__ */ jsx(LandingLayout, {
3354
- title: commonT(($) => $["payoutBankAccounts"]),
3355
- description: /* @__PURE__ */ jsx(Trans, {
3356
- t,
3357
- ns: "banking",
3358
- i18nKey: ($) => $["linkAndVerifyNewBankAccountForPayouts"],
3359
- components: { requirementsLink: /* @__PURE__ */ jsx(Button, {
3360
- variant: "link",
3361
- onClick: () => setIsRequirementsModalOpen(true),
3362
- children: t(($) => $["bankAccountRequirements"])
3363
- }) }
3364
- }),
3365
- media: /* @__PURE__ */ jsx(Image, { lazyLoadedImage: payoutBankAccountsImage }),
3366
- actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
3367
- fullWidth: true,
3368
- onClick: onGetStarted,
3369
- children: commonT(($) => $["getStarted"])
3370
- }), /* @__PURE__ */ jsx(Button, {
3371
- fullWidth: true,
3372
- variant: "tertiary",
3373
- onClick: onFinishLater,
3374
- children: commonT(($) => $["finishLater"])
3375
- })] })
3376
- }), /* @__PURE__ */ jsx(PayoutRequirementsModal, {
3377
- isOpen: isRequirementsModalOpen,
3378
- onClose: () => setIsRequirementsModalOpen(false),
3379
- provider
3380
- })]
3381
- });
3382
- };
3383
- //#endregion
3384
- //#region src/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.ts
3385
- var obscuredPayoutFields = ["bankAccountNumber", "iban"];
3386
- var payoutDetailsCountryConfig = {
3387
- [CountryCodes.Canada]: { bankStatementDocument: { label: "listitemVoidedChequeBankLetterBankStatementOnline" } },
3388
- [CountryCodes.UnitedKingdom]: {
3389
- bankCity: { label: "bankCityTown" },
3390
- bankStatementDocument: { label: "listitemVoidedChequeBankLetterBankStatementOnline" }
3391
- }
3392
- };
3393
- var parseConfiguration = ({ requiredFields, country, bankVerificationAvailable }) => parsePayoutScenarios({
3394
- requiredFields: requiredFields?.fields,
3395
- country,
3396
- bankVerificationAvailable
3397
- });
3398
- function parsePayoutScenarios({ requiredFields, country, bankVerificationAvailable }) {
3399
- if (!requiredFields) return {};
3400
- let formConfig = {
3401
- payoutVerificationMethod: { rule: "REQUIRED" },
3402
- bankCountry: { rule: "REQUIRED" },
3403
- preferredCurrency: { rule: "REQUIRED" },
3404
- bankStatementDocument: { rule: "bankStatementRequirement" },
3405
- description: { rule: "bankStatementDescription" }
3406
- };
3407
- requiredFields.forEach((fieldName) => {
3408
- formConfig[fieldName] = {
3409
- rule: bankVerificationAvailable ? "whenUsingManualVerification" : "REQUIRED",
3410
- obscured: obscuredPayoutFields.includes(fieldName)
3411
- };
3412
- });
3413
- if (bankVerificationAvailable) formConfig = {
3414
- ...formConfig,
3415
- verifiedAccountHolder: { rule: "whenUsingInstantVerification" },
3416
- verifiedBankCountry: { rule: "whenUsingInstantVerification" },
3417
- verifiedBankName: { rule: "whenUsingInstantVerification" },
3418
- verifiedCurrencyCode: { rule: "whenUsingInstantVerification" },
3419
- verifiedBankAccountNumber: { rule: "whenUsingInstantVerification" }
3420
- };
3421
- return augmentWithCountryConfigs(payoutDetailsCountryConfig[country], formConfig);
3422
- }
3423
- var getAppropriatePayoutDetailsSteps = (isEditing, instantVerificationAvailable, canChangeCountry, isCrossBorderEnabled, isForcedManualPayoutFlowEnabled) => {
3424
- const dependentSteps = {
3425
- payoutCountryDetails: payoutSteps.payoutCountryDetails,
3426
- payoutVerificationMethod: payoutSteps.payoutVerificationMethod,
3427
- payoutAccountDetails: payoutSteps.payoutAccountDetails,
3428
- payoutAccountDocuments: payoutSteps.payoutAccountDocuments,
3429
- payoutAccountVerification: payoutSteps.payoutAccountVerification
3430
- };
3431
- if (!isCrossBorderEnabled) delete dependentSteps["payoutCountryDetails"];
3432
- if (isEditing || !instantVerificationAvailable && !canChangeCountry || isForcedManualPayoutFlowEnabled) delete dependentSteps["payoutVerificationMethod"];
3433
- return dependentSteps;
3434
- };
3435
- //#endregion
3436
- //#region src/components/BankAccount/tasks/PayoutDetailsDropin/utils.ts
3437
- var CUSTOM_LABELS = {
3438
- verifiedAccountHolder: "accountHolder",
3439
- verifiedBankCountry: "bankCountry",
3440
- verifiedBankName: "bankName",
3441
- verifiedCurrencyCode: "currencyCode",
3442
- verifiedBankAccountNumber: "bankAccountNumber"
3443
- };
3444
- /**
3445
- * we are determining the header of the modal from the first error. to be refined in later iterations
3446
- *
3447
- * @param errors
3448
- */
3449
- var getInvalidFieldsErrorHeader = (invalidField) => {
3450
- switch (invalidField) {
3451
- case "LEGAL_BUSINESS_NAME":
3452
- case "FIRST_NAME":
3453
- case "LAST_NAME": return "caasBankAccountHolderDoesNotMatch";
3454
- default: return "weCouldntCompleteTheAccountCheck";
3455
- }
3456
- };
3457
- /**
3458
- * we are determining the content of the modal from the first error. to be refined in later iterations
3459
- *
3460
- * @param errors
3461
- */
3462
- var getInvalidFieldsErrorContent = (invalidField) => {
3463
- switch (invalidField) {
3464
- case "LEGAL_BUSINESS_NAME": return "caasBankAccountMustBeInYourNameYourBusinessLegalNameOrDoingBusinessAs";
3465
- case "FIRST_NAME":
3466
- case "LAST_NAME": return "caasBankAccountMustBeInYourName";
3467
- default: return "weCouldntCompleteTheAccountCheck";
3468
- }
3469
- };
3470
- var defaultInvalidErrorMessage = {
3471
- header: "weCouldntCompleteTheAccountCheck",
3472
- content: "weCouldntCompleteTheAccountCheck"
3473
- };
3474
- var getInvalidFieldsErrorMessage = (errors) => {
3475
- if (!errors || errors.length === 0) return defaultInvalidErrorMessage;
3476
- const [firstError] = errors;
3477
- const { invalidFields } = firstError;
3478
- if (!invalidFields || invalidFields.length === 0) return defaultInvalidErrorMessage;
3479
- const [firstInvalidField] = invalidFields;
3480
- return {
3481
- header: getInvalidFieldsErrorHeader(firstInvalidField),
3482
- content: getInvalidFieldsErrorContent(firstInvalidField)
3483
- };
3484
- };
3485
- var getPayoutVerificationMethod = (transferInstrument, instantVerificationEnabled) => {
3486
- if (transferInstrument) return "manualVerification";
3487
- else return instantVerificationEnabled ? "instantVerification" : "manualVerification";
3488
- };
3489
- /**
3490
- * Ensures that all the "verified" fields have the corresponding regular field's label in the summary.
3491
- * Same as if they were manually entered.
3492
- */
3493
- var formatAccountVerificationSummary = (data) => {
3494
- if (!data) return {};
3495
- const summary = {};
3496
- keysOf(CUSTOM_LABELS).forEach((key) => {
3497
- if (!data[key]) return;
3498
- summary[key] = summaryItem(CUSTOM_LABELS[key], data[key]);
3499
- });
3500
- return summary;
3501
- };
3502
- //#endregion
3503
- //#region src/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropinMultiForm.tsx
3504
- function PayoutDetailsDropinMultiForm({ legalEntityResponse, problems: propProblems, onSubmit: externalOnSubmit, asModal = false, handleCloseClick, taskType: propTaskType, handleHomeClick, currentTransferInstrumentId, navigateBackToTaskList, handleBackClick: externalBackClick, openBankingPartnerConfigId }) {
3505
- const { baseUrl, rootLegalEntityId } = useApiContext();
3506
- const { data: transferInstrument, refetch: refetchTransferInstrument, isLoading: isTransferInstrumentLoading } = useTransferInstrument(currentTransferInstrumentId ?? skipToken);
3507
- const { mutateAsync: handleUpdateTransferInstrument } = useUpdateTransferInstrument();
3508
- const { mutateAsync: handleUpdateTrustedTransferInstrument } = useUpdateTrustedTransferInstrument();
3509
- const { mutateAsync: handleCreateTrustedTransferInstrument, status: createTrustedTransferInstrumentStatus } = useCreateTrustedTransferInstrument();
3510
- const [previousTrustedInstrumentStatus, setPreviousTrustedInstrumentStatus] = useState$1(createTrustedTransferInstrumentStatus);
3511
- const { t, i18n: i18next } = useTranslation("banking");
3512
- const { t: commonT } = useTranslation("common");
3513
- const userEvents = useAnalyticsContext();
3514
- const { showToast, clearToasts } = useToastContext();
3515
- const { isFeatureEnabled } = useToggleContext();
3516
- const { isSettingEnabled } = useSettingsContext();
3517
- const { isExperimentEnabled } = useToggleContext();
3518
- const enabledCrossBorderPayouts = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
3519
- const isForcedManualPayoutFlowEnabled = isExperimentEnabled(ExperimentNames.BankingPayoutFlow_ForcedManualVerification) && !isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout);
3520
- const defaultPayoutCountry = getLegalEntityCountry(legalEntityResponse);
3521
- const existingPayoutDetails = useMemo$1(() => transferInstrument ? mapTransferInstrumentToPayoutAccount(transferInstrument, enabledCrossBorderPayouts) : void 0, [transferInstrument, enabledCrossBorderPayouts]);
3522
- const [documents, setDocuments] = useState$1();
3523
- const accountHolder = getPayoutAccountHolderName(legalEntityResponse, t);
3524
- const fallbackCurrency = currencyByCountry[defaultPayoutCountry]?.[0];
3525
- const accountHolderName = accountHolder || getLegalEntityNameBasedOnType(legalEntityResponse);
3526
- const instantVerificationEnabled = Boolean(!isTransferInstrumentLoading && !transferInstrument && isSettingEnabled("instantBankVerification"));
3527
- const taskType = propTaskType ?? TaskTypes.PAYOUT;
3528
- const [trustedTransferInstrumentId, setTrustedTransferInstrumentId] = useState$1();
3529
- const prefilledData = useMemo$1(() => ({
3530
- payoutCountryDetails: {
3531
- bankCountry: existingPayoutDetails?.payoutCountryDetails?.bankCountry ?? defaultPayoutCountry,
3532
- preferredCurrency: existingPayoutDetails?.payoutCountryDetails?.preferredCurrency ?? getDefaultCurrencyForCountry(defaultPayoutCountry)
3533
- },
3534
- payoutAccountDetails: {
3535
- accountHolder: accountHolderName,
3536
- currency: fallbackCurrency,
3537
- ...existingPayoutDetails?.payoutAccountDetails
3538
- },
3539
- payoutVerificationMethod: {
3540
- payoutVerificationMethod: getPayoutVerificationMethod(transferInstrument, instantVerificationEnabled),
3541
- bankCountry: defaultPayoutCountry,
3542
- ...existingPayoutDetails?.payoutVerificationMethod
3543
- },
3544
- payoutAccountVerification: {
3545
- verifiedAccountHolder: accountHolderName,
3546
- verifiedBankCountry: defaultPayoutCountry,
3547
- ...existingPayoutDetails?.payoutAccountVerification
3548
- }
3549
- }), [
3550
- existingPayoutDetails,
3551
- defaultPayoutCountry,
3552
- accountHolderName,
3553
- fallbackCurrency,
3554
- instantVerificationEnabled,
3555
- transferInstrument
3556
- ]);
3557
- const documentUtils = documentApiUtils({
3558
- baseUrl: baseUrl.value,
3559
- rootLegalEntityId: rootLegalEntityId.value
3560
- });
3561
- const [hasStarted, setHasStarted] = useState$1(false);
3562
- const [skipSubmit, setSkipSubmit] = useState$1(false);
3563
- const [loadingStatus, setLoadingStatus] = useState$1("loading");
3564
- const [isSubmitting, setIsSubmitting] = useState$1(false);
3565
- const [configurationLoadingStatus, setConfigurationLoadingStatus] = useState$1("loading");
3566
- const [accountDetailsFromInput, setAccountDetailsFromInput] = useState$1(prefilledData.payoutAccountDetails);
3567
- const [derivedProps, setDerivedProps] = useState$1();
3568
- const [initialBankAccountCountry] = useState$1(defaultPayoutCountry);
3569
- const [problems, setProblems] = useState$1(propProblems);
3570
- const [hasAsyncValidationError, setHasAsyncValidationError] = useState$1(false);
3571
- const buildFieldValidations = useCallback$1((data) => {
3572
- const country = (enabledCrossBorderPayouts ? data?.payoutCountryDetails?.bankCountry : data?.payoutVerificationMethod?.bankCountry) ?? defaultPayoutCountry;
3573
- return {
3574
- payoutCountryDetails: payoutCountryDetailsValidators(),
3575
- payoutVerificationMethod: payoutVerificationMethodValidators(),
3576
- payoutAccountDetails: payoutAccountDetailsValidators({ country }),
3577
- payoutAccountDocuments: payoutAccountDocumentsValidators(),
3578
- payoutAccountVerification: payoutAccountVerificationValidators()
3579
- };
3580
- }, [enabledCrossBorderPayouts, defaultPayoutCountry]);
3581
- const multiForm = useMultiForm({
3582
- defaultData: useMemo$1(() => {
3583
- return {
3584
- ...prefilledData,
3585
- payoutAccountDocuments: documents
3586
- };
3587
- }, [prefilledData, documents]),
3588
- allFields: derivedProps?.allFields,
3589
- requiredFields: derivedProps?.requiredFields,
3590
- optionalFields: derivedProps?.optionalFields,
3591
- obscuredFields: derivedProps?.obscuredFields,
3592
- trustedFields: derivedProps?.trustedFields,
3593
- rules: buildFieldValidations
3594
- });
3595
- const bankAccountCountry = (enabledCrossBorderPayouts ? multiForm.data?.payoutCountryDetails?.bankCountry : multiForm.data?.payoutVerificationMethod?.bankCountry) ?? initialBankAccountCountry;
3596
- const isMaskedBankAccountNumber = multiForm.data.payoutAccountDetails?.bankAccountNumber?.includes("*") || multiForm.data.payoutAccountDetails?.iban?.includes("*");
3597
- const existingBankAccountFormat = transferInstrument ? transferInstrument?.bankAccount?.accountIdentification?.type === "numberAndBic" ? "numberAndBic" : existingPayoutDetails?.payoutAccountDetails?.iban ? "iban" : "local" : void 0;
3598
- /**
3599
- * Analytics
3600
- */
3601
- useTaskLandedEvent(taskType);
3602
- useEffect$1(() => {
3603
- resetPayoutSignals();
3604
- }, []);
3605
- const { data: providers, refetch: refetchBankVerificationProviders, status: bankVendorsLoadingStatus } = useBankVerificationProviders({
3606
- country: bankAccountCountry,
3607
- configId: openBankingPartnerConfigId,
3608
- locale: i18next.language
3609
- }, { enabled: instantVerificationEnabled });
3610
- /**
3611
- * instantVerificationEnabled = conditions are met to show the option for instant verification
3612
- * instantVerificationAvailable = instantVerificationEnabled AND there is a provider returned for the bank account country
3613
- */
3614
- const instantVerificationAvailable = useMemo$1(() => Boolean(instantVerificationEnabled && providers?.[0]?.redirectUrl), [instantVerificationEnabled, providers]);
3615
- const getPayoutAccountFormatData = useCallback$1(async () => getAccountFormatsForCountry(bankAccountCountry), [bankAccountCountry]);
3616
- /**
3617
- * Fetch Configurations
3618
- */
3619
- const { fieldConfigurations, requiredFields } = useScenarioConfiguration({
3620
- parseConfiguration,
3621
- legalEntityType: legalEntityResponse.type,
3622
- getPayoutAccountFormatData,
3623
- instantVerificationAvailable,
3624
- setLoadingStatus: setConfigurationLoadingStatus,
3625
- country: bankAccountCountry,
3626
- existingBankAccountFormat
3627
- });
3628
- /**
3629
- * parse configuration and create component props
3630
- */
3631
- const fieldsFromCustomRules = useMemo$1(() => rules({
3632
- data: multiForm.data,
3633
- country: bankAccountCountry,
3634
- taskType,
3635
- isSettingEnabled,
3636
- isExperimentEnabled
3637
- }), [
3638
- multiForm.data,
3639
- bankAccountCountry,
3640
- taskType,
3641
- requiredFields,
3642
- isSettingEnabled
3643
- ]);
3644
- const apiBankAccount = useMemo$1(() => {
3645
- return mapPayoutAccountSchemaToApiBankAccount(multiForm.data.payoutAccountDetails ?? { bankAccountNumber: "" }, bankAccountCountry);
3646
- }, [multiForm.data, bankAccountCountry]);
3647
- const { data: checkAsAServiceData, mutateAsync: performCheckAsAService, isPending: isCheckAsAServiceLoading, isError: isCheckAsAServiceError } = useCheck();
3648
- const provider = providers?.[0];
3649
- const isInstantVerificationFlow = isForcedManualPayoutFlowEnabled ? !isUsingManualFlow.value : multiForm.data.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification";
3650
- const payoutVerificationMethodForAnalytics = isInstantVerificationFlow ? "instantVerification" : "manualVerification";
3651
- const [isModalOpen, setIsModalOpen] = useState$1(false);
3652
- const showInstantVerificationCTA = !currentTransferInstrumentId && instantVerificationAvailable && isExperimentEnabled(ExperimentNames.BankingPayoutFlow_ForcedManualVerification) && !!provider && (bankAccountCountry !== "GB" || !isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout));
3653
- const payoutDetailsSteps = useMemo$1(() => {
3654
- const appropriatePayoutDetailsSteps = getAppropriatePayoutDetailsSteps(Boolean(prefilledData?.payoutAccountDetails?.transferInstrumentId), instantVerificationAvailable, isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout), enabledCrossBorderPayouts, isForcedManualPayoutFlowEnabled);
3655
- if (!isCheckAsAServiceError && checkAsAServiceData?.status === "VALID" && !isMaskedBankAccountNumber) delete appropriatePayoutDetailsSteps[payoutSteps.payoutAccountDocuments.formId];
3656
- return appropriatePayoutDetailsSteps;
3657
- }, [
3658
- providers,
3659
- isCheckAsAServiceError,
3660
- isMaskedBankAccountNumber
3661
- ]);
3662
- useEffect$1(() => {
3663
- setDerivedProps(getPropsFromConfigurations({
3664
- scenarioConfiguration: fieldConfigurations,
3665
- forms: payoutDetailsSteps,
3666
- remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
3667
- dataMissingErrors: problems?.missingData ?? [],
3668
- fieldsWithExistingData: [],
3669
- customRules: fieldsFromCustomRules,
3670
- legalEntityType: legalEntityResponse.type
3671
- }));
3672
- }, [
3673
- fieldConfigurations,
3674
- payoutDetailsSteps,
3675
- problems?.remediationActions,
3676
- problems?.missingData,
3677
- fieldsFromCustomRules,
3678
- legalEntityResponse.type
3679
- ]);
3680
- useUnifyLoadingStatus(setLoadingStatus, configurationLoadingStatus, instantVerificationEnabled ? bankVendorsLoadingStatus : "success", isSubmitting ? "loading" : "success");
3681
- /**
3682
- * Configure forms based on obtained props
3683
- */
3684
- const forms = useMemo$1(() => {
3685
- return addValidityToForms(getRequiredForms(payoutDetailsSteps, derivedProps?.requiredFields, derivedProps?.optionalFields), hasAsyncValidationError ? {
3686
- ...multiForm.isValid,
3687
- payoutAccountDetails: false
3688
- } : multiForm.isValid, problems);
3689
- }, [
3690
- derivedProps,
3691
- hasAsyncValidationError,
3692
- multiForm.isValid,
3693
- problems,
3694
- payoutDetailsSteps
3695
- ]);
3696
- useEffect$1(() => {
3697
- if (!transferInstrument?.documentDetails?.length) return;
3698
- if (transferInstrument.id) documentUtils.fetchDocuments(transferInstrument.documentDetails, transferInstrument.id).then(() => {
3699
- const documents = mapApiDocumentToPayoutDocuments(transferInstrument.id);
3700
- setDocuments(documents);
3701
- multiForm.handleChangeFor("bankStatementDocument", "payoutAccountDocuments")(documents.bankStatementDocument);
3702
- multiForm.handleChangeFor("description", "payoutAccountDocuments")(documents.description);
3703
- }).catch(() => {
3704
- showToast({
3705
- label: commonT(($) => $["failedToFetchRelevantDocuments"]),
3706
- variant: "error"
3707
- });
3708
- });
3709
- }, [transferInstrument?.documentDetails]);
3710
- const submitDocuments = async ({ forms, transferInstrument, dataSubmitted }) => {
3711
- if (forms.some((form) => form.formId === payoutSteps.payoutAccountDocuments.formId)) {
3712
- const documentToUpload = await mapPayoutDocumentsToApiDocuments(dataSubmitted, transferInstrument.id);
3713
- if (documentToUpload) try {
3714
- (await documentUtils.uploadDocuments([documentToUpload], transferInstrument.id)).forEach((document) => {
3715
- userEvents.addTaskEvent("Success", {
3716
- actionType: "upload",
3717
- documentType: dataSubmitted.payoutAccountDocuments?.documentType ?? document.type,
3718
- fileExtention: document.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
3719
- });
3720
- });
3721
- } catch {
3722
- setProblems({
3723
- ...problems,
3724
- validationErrors: { payoutAccountDocuments: { bankStatementDocument: true } }
3725
- });
3726
- throw new Error(commonT(($) => $["remediationMessage_1_704"]));
3727
- } finally {
3728
- if (currentTransferInstrumentId) await refetchTransferInstrument?.();
3729
- }
3730
- }
3731
- };
3732
- useEffect$1(() => {
3733
- const payoutAccountData = cloneObject(multiForm.data)?.payoutAccountDetails;
3734
- if (payoutAccountData) setAccountDetailsFromInput(payoutAccountData);
3735
- }, [multiForm.data]);
3736
- const onSubmit = async () => {
3737
- setIsSubmitting(true);
3738
- const dataSubmitted = cloneObject({
3739
- ...prefilledData,
3740
- ...multiForm.data
3741
- });
3742
- const { payoutAccountDetails, payoutVerificationMethod } = dataSubmitted;
3743
- const baseTracking = {
3744
- actionType: "submit",
3745
- bankCountry: payoutVerificationMethod?.bankCountry ?? defaultPayoutCountry,
3746
- bankCurrency: payoutAccountDetails?.currency ?? null,
3747
- additionalData: { payoutVerificationMethod: payoutVerificationMethodForAnalytics }
3748
- };
3749
- let transferInstrumentFromInput = mapPayoutDetailsToTransferInstrument({
3750
- data: dataSubmitted,
3751
- legalEntity: legalEntityResponse,
3752
- enabledCrossBorderPayouts
3753
- });
3754
- transferInstrumentFromInput = omitObscuredFieldsIfUnchanged(["bankAccount.accountIdentification.accountNumber", "bankAccount.accountIdentification.iban"], transferInstrumentFromInput, transferInstrument);
3755
- try {
3756
- if (!transferInstrumentFromInput) return;
3757
- const response = await (transferInstrument ? handleUpdateTransferInstrument({
3758
- transferInstrument: transferInstrumentFromInput,
3759
- transferInstrumentId: transferInstrument.id
3760
- }) : createTransferInstrument(rootLegalEntityId.value, baseUrl.value, transferInstrumentFromInput));
3761
- userEvents.addTaskEvent("Success", { ...baseTracking });
3762
- try {
3763
- await submitDocuments({
3764
- forms,
3765
- transferInstrument: response,
3766
- dataSubmitted
3767
- });
3768
- clearToasts();
3769
- externalOnSubmit?.({
3770
- ...dataSubmitted,
3771
- id: response?.id
3772
- });
3773
- } catch (e) {
3774
- showToast({
3775
- label: e.message,
3776
- variant: "error"
3777
- });
3778
- userEvents.addTaskEvent("Encountered error", {
3779
- ...baseTracking,
3780
- returnType: e?.errorCode || "backend",
3781
- returnValue: e?.title || e?.message
3782
- });
3783
- } finally {
3784
- setIsSubmitting(false);
3785
- }
3786
- } catch (e) {
3787
- if (isValidationError(e)) {
3788
- const validationErrors = processValidationErrors(e, taskType);
3789
- setProblems({
3790
- ...problems,
3791
- validationErrors
3792
- });
3793
- } else if (isIdDocumentUploadError(e)) showToast({
3794
- label: t(($) => $["idDocumentAlreadyUploaded"]),
3795
- variant: "error"
3796
- });
3797
- else if (isBankStatementUploadError(e)) showToast({
3798
- label: t(($) => $["bankStatementAlreadyUploaded"]),
3799
- variant: "error"
3800
- });
3801
- else if (isMaintenanceModeError(e)) showToast({
3802
- label: commonT(($) => $["maintenanceModeMessage"]),
3803
- variant: "error",
3804
- duration: "indefinite"
3805
- });
3806
- else {
3807
- const errorTranslatable = mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable(e);
3808
- showToast({
3809
- label: commonT(($) => $[errorTranslatable]),
3810
- variant: "error"
3811
- });
3812
- }
3813
- setIsSubmitting(false);
3814
- userEvents.addTaskEvent("Encountered error", {
3815
- ...baseTracking,
3816
- returnType: e?.errorCode || "backend",
3817
- returnValue: e?.title || e?.message
3818
- });
3819
- }
3820
- };
3821
- const formatFileSummaryData = (bankDocuments) => {
3822
- const bankStatementDocument = bankDocuments?.bankStatementDocument?.[0];
3823
- return {
3824
- documentType: bankDocuments?.documentType && commonT(($) => $[bankDocuments?.documentType]),
3825
- fileName: bankStatementDocument?.name,
3826
- description: bankDocuments?.description
3827
- };
3828
- };
3829
- const datasetUtils = datasetUtilities(i18next.language);
3830
- const formatDataForSummary = () => {
3831
- const summaryData = cloneObject(multiForm.data);
3832
- if (summaryData.payoutAccountDetails) summaryData.payoutAccountDetails.accountHolder = accountHolderName;
3833
- if (summaryData.payoutVerificationMethod?.bankCountry && summaryData.payoutAccountDetails) summaryData.payoutAccountDetails.bankCountry = datasetUtils.getCountryName(summaryData.payoutVerificationMethod.bankCountry);
3834
- if (summaryData.payoutAccountDocuments) summaryData.payoutAccountDocuments = formatFileSummaryData(multiForm.data?.payoutAccountDocuments);
3835
- summaryData.payoutAccountVerification = formatAccountVerificationSummary(multiForm.data.payoutAccountVerification);
3836
- return summaryData;
3837
- };
3838
- const createTrustedTransferInstrumentHandler = async (code, state) => {
3839
- try {
3840
- const trustedTransferInstrument = await handleCreateTrustedTransferInstrument({
3841
- code,
3842
- state
3843
- });
3844
- if (trustedTransferInstrument) {
3845
- setTrustedTransferInstrumentId(trustedTransferInstrument.verificationReference);
3846
- multiForm.setFormData("payoutAccountDetails", prefilledData.payoutAccountDetails);
3847
- return trustedTransferInstrument;
3848
- }
3849
- } catch (e) {
3850
- refetchBankVerificationProviders();
3851
- const errorTranslatable = mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable(e);
3852
- if (errorTranslatable === "transferInstrumentLimitHasAlreadyBeenMet") showToast({
3853
- label: commonT(($) => $[errorTranslatable]),
3854
- variant: "error"
3855
- });
3856
- throw e;
3857
- }
3858
- };
3859
- const { handleNextClick, handleBackClick, activeForm, shouldValidate, gotoFormByFormIndex, gotoFormByFormId, steps } = useFormComposer({
3860
- problems,
3861
- forms,
3862
- externalBackClick,
3863
- triggerValidation: async (formName) => {
3864
- if (!multiForm.requiredFields?.[formName]) return true;
3865
- return multiForm.triggerValidation(formName);
3866
- },
3867
- onSubmit: skipSubmit ? async () => {
3868
- if (enabledCrossBorderPayouts && trustedTransferInstrumentId && multiForm.data.payoutCountryDetails?.preferredCurrency) try {
3869
- await handleUpdateTrustedTransferInstrument({
3870
- transferInstrumentId: trustedTransferInstrumentId,
3871
- preferredCurrencyCode: multiForm.data.payoutCountryDetails?.preferredCurrency
3872
- });
3873
- } catch {
3874
- showToast({
3875
- label: commonT(($) => $["failedToUpdateDetails"]),
3876
- variant: "error"
3877
- });
3878
- }
3879
- if (trustedTransferInstrumentId) externalOnSubmit?.({
3880
- ...multiForm.data,
3881
- id: trustedTransferInstrumentId
3882
- });
3883
- userEvents.addTaskEvent("Success", {
3884
- actionType: "submit",
3885
- additionalData: { payoutVerificationMethod: payoutVerificationMethodForAnalytics }
3886
- });
3887
- navigateBackToTaskList?.();
3888
- } : onSubmit
3889
- });
3890
- useEffect$1(() => {
3891
- if (activeForm?.formId === summaryStep.formId && isInstantVerificationFlow && trustedTransferInstrumentId) setSkipSubmit?.(true);
3892
- }, [
3893
- activeForm?.formId,
3894
- trustedTransferInstrumentId,
3895
- isInstantVerificationFlow,
3896
- setSkipSubmit
3897
- ]);
3898
- const handleFormNextClick = async () => {
3899
- if (activeForm.formId === "payoutVerificationMethod") if (isInstantVerificationFlow) {
3900
- trackNavigation({
3901
- userEvents,
3902
- actionType: "next",
3903
- label: "instantVerification",
3904
- toForm: "instantVerification"
3905
- });
3906
- showInstantVerificationPayoutModal.value = true;
3907
- return;
3908
- } else {
3909
- handleNextClick();
3910
- return;
3911
- }
3912
- if (activeForm.formId === "payoutAccountDetails" && activeForm.isValid && multiForm.data.payoutAccountDetails && !isMaskedBankAccountNumber) try {
3913
- const response = await performCheckAsAService(apiBankAccount.accountIdentification);
3914
- if (response?.status === "INCOMPLETE_INPUT") setIsModalOpen(true);
3915
- else if (response?.status === "VALID") gotoFormByFormId(summaryStep.formId);
3916
- else {
3917
- const formIndex = forms.findIndex((f) => f.formId === "payoutAccountDocuments");
3918
- if (formIndex > -1) gotoFormByFormIndex(formIndex);
3919
- }
3920
- } catch {
3921
- handleNextClick();
3922
- }
3923
- else handleNextClick();
3924
- };
3925
- if (previousTrustedInstrumentStatus !== createTrustedTransferInstrumentStatus) {
3926
- if (activeForm.formId === "payoutAccountVerification" && activeForm.isValid && createTrustedTransferInstrumentStatus === "success" && multiForm.data.payoutAccountVerification?.verifiedBankAccountNumber) {
3927
- handleNextClick();
3928
- setPreviousTrustedInstrumentStatus(createTrustedTransferInstrumentStatus);
3929
- }
3930
- if ((activeForm.formId === "payoutVerificationMethod" || isForcedManualPayoutFlowEnabled && activeForm.formId === "payoutAccountDetails") && createTrustedTransferInstrumentStatus === "success") {
3931
- gotoFormByFormIndex(forms.length - 1);
3932
- setPreviousTrustedInstrumentStatus(createTrustedTransferInstrumentStatus);
3933
- }
3934
- }
3935
- const omittedForms = multiForm.data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification" ? [] : [payoutSteps.payoutVerificationMethod.formId];
3936
- const { header: invalidFieldHeader, content: invalidFieldContent } = getInvalidFieldsErrorMessage(checkAsAServiceData?.errors ?? []);
3937
- if (isFeatureEnabled(FeatureNames.EnableBankAccountDetailsLandingPage) && !hasStarted && !legalEntityResponse.transferInstruments?.length) return /* @__PURE__ */ jsx(PayoutDetailsGettingStarted, {
3938
- onGetStarted: () => setHasStarted(true),
3939
- onFinishLater: () => navigateBackToTaskList?.(),
3940
- provider
3941
- });
3942
- return /* @__PURE__ */ jsxs(LoaderWrapper, {
3943
- showSpinner: true,
3944
- status: isCheckAsAServiceLoading || isModalOpen || createTrustedTransferInstrumentStatus === "pending" ? "loading" : "success",
3945
- formOpacityWhenLoading: .3,
3946
- children: [isModalOpen && /* @__PURE__ */ jsx(Confirm, {
3947
- title: t(($) => $[invalidFieldHeader]),
3948
- description: t(($) => $[invalidFieldContent]),
3949
- cancelText: commonT(($) => $["editDetails"]),
3950
- confirmText: t(($) => $["continueAnyway"]),
3951
- onConfirm: () => {
3952
- handleNextClick();
3953
- setIsModalOpen(false);
3954
- },
3955
- onCancel: () => {
3956
- gotoFormByFormIndex(0);
3957
- setIsModalOpen(false);
3958
- }
3959
- }), /* @__PURE__ */ jsx(FormContextProvider, {
3960
- form: multiForm,
3961
- children: /* @__PURE__ */ jsx(FormFlow, {
3962
- summary: {
3963
- data: formatDataForSummary(),
3964
- omitted: {
3965
- keys: ["transferInstrumentId", "payoutVerificationMethod"],
3966
- forms: omittedForms,
3967
- summaryEditButton: ["payoutVerificationMethod", "payoutAccountVerification"]
3968
- },
3969
- problems
3970
- },
3971
- asModal,
3972
- currentStep: steps.current,
3973
- totalSteps: steps.total,
3974
- forms,
3975
- activeForm,
3976
- gotoFormByFormIndex,
3977
- gotoFormByFormId,
3978
- handleNextClick: handleFormNextClick,
3979
- handleBackClick: activeForm.formId === "summary" && isInstantVerificationFlow ? void 0 : handleBackClick,
3980
- handleCancelClick: handleCloseClick || handleHomeClick,
3981
- loadingStatus: isTransferInstrumentLoading ? "loading" : loadingStatus,
3982
- disableNextButton: !!classifyingDocument.value,
3983
- disableBackButton: !!classifyingDocument.value,
3984
- children: (!isTransferInstrumentLoading || isSubmitting) && /* @__PURE__ */ jsx(PayoutDetailsMultiform, {
3985
- activeForm,
3986
- shouldValidate,
3987
- problems,
3988
- country: defaultPayoutCountry,
3989
- accountHolder: accountHolder ?? getLegalEntityNameBasedOnType(legalEntityResponse),
3990
- legalEntityResponse,
3991
- provider,
3992
- bankVendorsLoadingStatus,
3993
- instantVerificationAvailable,
3994
- createTrustedTransferInstrument: createTrustedTransferInstrumentHandler,
3995
- accountDetailsFromInput,
3996
- trustedTransferInstrumentId,
3997
- onBack: handleBackClick,
3998
- setHasAsyncValidationError,
3999
- showInstantVerificationCTA,
4000
- handleNextClick
4001
- })
4002
- })
4003
- })]
4004
- });
4005
- }
4006
- //#endregion
4007
- export { PayoutDetailsDropinMultiForm as t };