@adyen/kyc-components 4.25.0 → 4.26.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 (450) hide show
  1. package/dist/{4-people-DKuivE0m.js → 4-people-CAxQpi_3.js} +2 -2
  2. package/dist/{AcceptTermsOfServiceWorkflow-BKWCrZdZ.js → AcceptTermsOfServiceWorkflow-eOcHITwQ.js} +4 -4
  3. package/dist/{Accordion-D_DOaWj2.js → Accordion-BAdwrgCR.js} +4 -24
  4. package/dist/{AccountSetupRejected-BtcxtVKO.js → AccountSetupRejected-Jii0yaLC.js} +3 -4
  5. package/dist/{NodeRenderer-Z10yF5MV.js → AdaptiveWorkflow-B6SIOcbU.js} +87 -34
  6. package/dist/{AdaptiveWorkflowComponent-C4Q6NVtv.js → AdaptiveWorkflowComponent-we5_UgiI.js} +32 -33
  7. package/dist/{AddressFields-CFG2_P0x.js → AddressFields-Qq_8lUYz.js} +21 -27
  8. package/dist/{Avatar-k5lNd5KG.js → Avatar-C2zeqSSB.js} +10 -8
  9. package/dist/{BusinessFinancingDropin-BjTnxk__.js → BusinessFinancingDropin-gMa--znJ.js} +61 -71
  10. package/dist/{BusinessFinancingPage-C4dAslMp.js → BusinessFinancingPage-BIdRvI7h.js} +7 -7
  11. package/dist/{BusinessRegistrationNumberField-Dz1uGvRQ.js → BusinessRegistrationNumberField-Vr3KBWJD.js} +7 -8
  12. package/dist/{BusinessRegistrationNumberFieldGroup-BFPrFa1_.js → BusinessRegistrationNumberFieldGroup-DLGAFcRN.js} +7 -8
  13. package/dist/{BusinessTypeSelectionPage-DeWD37jR.js → BusinessTypeSelectionPage-9B2SxGcV.js} +16 -17
  14. package/dist/{Button-BxdC8cVB.js → Button-Dwr6jvJZ.js} +2 -2
  15. package/dist/Checkbox-zAGhz7rC.js +114 -0
  16. package/dist/{ComponentGroup-S6c3rVoX.js → ComponentGroup-DH_CH6bM.js} +4 -4
  17. package/dist/{ConstitutionalDocument-CNNhKkzD.js → ConstitutionalDocument-DMNlJJzp.js} +25 -28
  18. package/dist/{ContactDetails-_HCOKj3-.js → ContactDetails-kwe-LwUD.js} +8 -13
  19. package/dist/{ContextGuidance-v-d9RQuo.js → ContextGuidance-1tQjHxTm.js} +3 -3
  20. package/dist/CountryField-BkNURmjP.js +56 -0
  21. package/dist/{Currency-3Z9i_AhY.js → Currency-BjBbhCzV.js} +10 -12
  22. package/dist/{CustomerSupport-B0UJHtAq.js → CustomerSupport-CT4s3fyC.js} +17 -17
  23. package/dist/DateField-CJeu0KoS.js +73 -0
  24. package/dist/{DebugModal-DgbagO5Z.js → DebugModal-YjFFNeOM.js} +12 -17
  25. package/dist/{DecisionMakerDetails-RF9BoMYF.js → DecisionMakerDetails-B4aCl2kl.js} +21 -24
  26. package/dist/{DecisionMakerDetailsPage-CGOs2Ubt.js → DecisionMakerDetailsPage-Dg_RbdxY.js} +43 -40
  27. package/dist/{DecisionMakers-qRoXooYA.js → DecisionMakers-Cq3yVb54.js} +55 -61
  28. package/dist/{DetailViewLayout-DNCGEd7b.js → DetailViewLayout-DJgAzdlZ.js} +8 -6
  29. package/dist/{Dropzone-cewfCgXt.js → Dropzone-Cgqct7ux.js} +8 -8
  30. package/dist/EmailField-CVwmsS5d.js +61 -0
  31. package/dist/{EmbeddedStatus-Keg7UojY.js → EmbeddedStatus-4YjyzkcD.js} +4 -4
  32. package/dist/{EndStateLayout-GHEYl82p.js → EndStateLayout-C5Pqler-.js} +3 -3
  33. package/dist/{EntityAssociation-BPtrqdQR.js → EntityAssociation-DzNk5XbC.js} +7 -7
  34. package/dist/{ErrorPanel-PefRq1M4.js → ErrorPanel-DtbpEeJk.js} +24 -19
  35. package/dist/{GlobalEntryModal-CTGSdkW7.js → GlobalEntryModal-D9rqts-z.js} +203 -78
  36. package/dist/{GlobalEntryPage-CdGXV-QZ.js → GlobalEntryPage-OTglAvMX.js} +10 -10
  37. package/dist/Icon-_YUEZg1p.js +175 -0
  38. package/dist/{IdentityNumber-Cz6-4YcM.js → IdentityNumber-9SwAYweE.js} +10 -12
  39. package/dist/{IdentityNumberFieldGroup-D2PV_4A5.js → IdentityNumberFieldGroup-B9SxTHei.js} +16 -14
  40. package/dist/{IdentityScreeningWorkflow-mbcaIctn.js → IdentityScreeningWorkflow-C-nLWlJS.js} +16 -16
  41. package/dist/{Image-Bn_Yyuof.js → Image-CxnjHtP1.js} +1 -1
  42. package/dist/{IndividualDropin-D1UOavsw.js → IndividualDropin-BpFRq3S4.js} +266 -281
  43. package/dist/{IndustryCodeFieldGroup-DmOqxPIg.js → IndustryCodeFieldGroup-CEWUFYmK.js} +9 -10
  44. package/dist/{InputDate-B0RNGCq2.js → InputDate-DjUm9FiK.js} +6 -29
  45. package/dist/InputDate.utils-D4Ov0KIl.js +25 -0
  46. package/dist/{InputGroup-B4U3QVEp.js → InputGroup-Bv005B22.js} +7 -6
  47. package/dist/{InputText-CwPK55J0.js → InputText-DtoBABE5.js} +42 -4
  48. package/dist/{Introduction-DFW6EaLG.js → Introduction-GW5FJSTJ.js} +9 -9
  49. package/dist/{InvitedDecisionMakerComponent-hdQc0T7D.js → InvitedDecisionMakerComponent-tahktJVa.js} +45 -45
  50. package/dist/{JpAddressFields-CzGnXBMk.js → JpAddressFields-CpRh_gFz.js} +13 -13
  51. package/dist/{LegalCompanyNameField-CV2EgRCw.js → LegalCompanyNameField-Coff77lN.js} +5 -5
  52. package/dist/{LegalRepresentativeDetailsPage-BiAfoErR.js → LegalRepresentativeDetailsPage-CXMGtJvO.js} +35 -34
  53. package/dist/{Link-C3dYYTm_.js → Link-D0Yqc2r0.js} +7 -6
  54. package/dist/{List-ywoRPg-q.js → List-qvNxW9lm.js} +3 -2
  55. package/dist/{ListItem-CHGVbHhB.js → ListItem-DY-qq1lS.js} +29 -4
  56. package/dist/{Loader-BVtlpTeo.js → Loader-BDaKGf77.js} +1 -1
  57. package/dist/{Modal-Dq44ZUNN.js → Modal-Dx_NESnV.js} +25 -5
  58. package/dist/{Name-BfQr3et_.js → Name-CrLaukRh.js} +5 -5
  59. package/dist/NumberField-CS93IGoS.js +60 -0
  60. package/dist/{PatriotActDisclosure-BNAsJXEL.js → PatriotActDisclosure-C3jKKi6y.js} +11 -12
  61. package/dist/{PayoutDetailsDropin-NyizAaYy.js → PayoutDetailsDropin-BxOJ9P17.js} +163 -158
  62. package/dist/{PayoutDetailsPage-NM0Eqf4K.js → PayoutDetailsPage-BxaCk685.js} +10 -9
  63. package/dist/{Review-CzgmjDcZ.js → Review-C81Qsrkg.js} +25 -24
  64. package/dist/{RootBusinessDetailsPage-B1a0hu8F.js → RootBusinessDetailsPage-CwRyRbEv.js} +9 -7
  65. package/dist/{RootBusinessLinesPage-Dv1uT7OS.js → RootBusinessLinesPage-C3GZQ-KO.js} +48 -53
  66. package/dist/{RootIndividualDetailsPage-vkjzmyF7.js → RootIndividualDetailsPage-CvVVlkJI.js} +42 -39
  67. package/dist/{Select-prMx73V9.js → Select-AiAom5JL.js} +330 -19
  68. package/dist/{SignPCIComponent-CIkdVNH2.js → SignPCIComponent-Dmr9dDYB.js} +19 -23
  69. package/dist/{SingpassSelection-B6NONcr4.js → SingpassSelection-BXHvwmgp.js} +7 -7
  70. package/dist/Skeleton-7xDqhYr-.js +30 -0
  71. package/dist/{SoleProprietorshipPage-BmNs557C.js → SoleProprietorshipPage-DKL4anrn.js} +7 -7
  72. package/dist/{SourceOfFundsPage-B5nZ3MjN.js → SourceOfFundsPage-2dxP6dlL.js} +46 -58
  73. package/dist/{SourceOfFundsWorkflow-IkLZG9JI.js → SourceOfFundsWorkflow-Didn1fld.js} +4 -4
  74. package/dist/{StackLayout-IUdNMDgW.js → StackLayout-J1ynSX-P.js} +6 -5
  75. package/dist/{utils-lIizXlcC.js → StateField-BoIVEnaZ.js} +89 -3
  76. package/dist/{Step-BJh4XZae.js → Step-CiwqdcuY.js} +19 -13
  77. package/dist/SummarySection-B6A_AT1m.js +60 -0
  78. package/dist/{Task-yQcY16x1.js → Task-CJDcviJ6.js} +8 -8
  79. package/dist/{TaskGroup-C9iFHpux.js → TaskGroup-BXkrbyTG.js} +5 -5
  80. package/dist/{TaskListItem-ChlmCIfF.js → TaskListItem-CQXvVRWG.js} +11 -11
  81. package/dist/{TaskStepperContextProvider-I7talGDO.js → TaskStepperContextProvider-9wlnwii7.js} +1 -1
  82. package/dist/{TaskVerificationStatus-Bd5Eftf2.js → TaskVerificationStatus-zoxTZ2mt.js} +3 -3
  83. package/dist/{TaxInformationFieldGroup-Dq0J9rBU.js → TaxInformationFieldGroup-CnaGMge9.js} +19 -18
  84. package/dist/{TaxReportingDropin-Cq3gBWtp.js → TaxReportingDropin-F4e4CxiC.js} +22 -26
  85. package/dist/{TaxReportingWorkflow-flQPRAPy.js → TaxReportingWorkflow-Caa_klQR.js} +4 -4
  86. package/dist/{TermsOfServiceManagement-BM5K4cpw.js → TermsOfServiceManagement-5x2f0QgC.js} +21 -30
  87. package/dist/{TextArea-C12oXMzX.js → TextArea-eJQFkYyd.js} +5 -5
  88. package/dist/TextField-Ca7rT4tr.js +73 -0
  89. package/dist/{TrustDetailsPage-z7s9FxVC.js → TrustDetailsPage-D3RkKlpJ.js} +59 -67
  90. package/dist/{TrustMemberCompanyPage-tU2HTiDG.js → TrustMemberCompanyPage-BvBxQg7D.js} +8 -8
  91. package/dist/{TrustMemberIndividualPage-BLBtnoSq.js → TrustMemberIndividualPage-D4idWK8j.js} +35 -34
  92. package/dist/{TrustMemberRoleAndTypePage-DIwrtOWr.js → TrustMemberRoleAndTypePage-CyKm_knd.js} +23 -30
  93. package/dist/{TrustMembersOverview-CowTgfIb.js → TrustMembersOverview-BnP0wZSf.js} +18 -22
  94. package/dist/{UboTaskItem-CZLDzQil.js → UboTaskItem-Degn5OyC.js} +8 -8
  95. package/dist/{UnincorporatedPartnershipIndividualPage-BT0j54-O.js → UnincorporatedPartnershipIndividualPage-Bgb4oCRJ.js} +35 -34
  96. package/dist/{UnincorporatedPartnershipMemberCompanyPage-DFOoV0wQ.js → UnincorporatedPartnershipMemberCompanyPage-T6SOH3Mv.js} +8 -8
  97. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-D973uyHj.js → UnincorporatedPartnershipMemberRoleAndTypePage-BVfav_Z_.js} +14 -16
  98. package/dist/{UnincorporatedPartnershipMembersOverview-5w1BrDMI.js → UnincorporatedPartnershipMembersOverview-DPW48_Lv.js} +11 -14
  99. package/dist/VerificationErrorAlert-q1SEqBXx.js +68 -0
  100. package/dist/WebsiteField-CnOU49Hn.js +62 -0
  101. package/dist/{Workflow-CF-HUIjR.js → Workflow-D298oRt0.js} +9 -9
  102. package/dist/{accountHolderUtils-CAu4V0ed.js → accountHolderUtils-CLuKAgaj.js} +3 -3
  103. package/dist/adyen-business-financing.js +8 -9
  104. package/dist/adyen-individual-configuration.js +36 -36
  105. package/dist/adyen-individual-status.js +8 -9
  106. package/dist/adyen-invited-decision-maker.js +3 -3
  107. package/dist/adyen-onboarding.js +61 -59
  108. package/dist/adyen-terms-of-service-management.js +3 -3
  109. package/dist/adyen-terms-of-service-status.js +6 -7
  110. package/dist/adyen-transfer-instrument-configuration.js +7 -8
  111. package/dist/adyen-transfer-instrument-management.js +16 -22
  112. package/dist/adyen-verification-status.js +7 -9
  113. package/dist/{arrow-right-D2hul7WG.js → arrow-right-BwP9nNDE.js} +2 -2
  114. package/dist/bafinUtils-CsDthERR.js +3548 -0
  115. package/dist/{bag-CRRS1aow.js → bag-Cnk9dcZg.js} +2 -2
  116. package/dist/{bank-BoirCLLW.js → bank-UssyP-aG.js} +2 -2
  117. package/dist/bg-BG-C7z9VtPy.js +7 -0
  118. package/dist/{bin-BOmfqfrr.js → bin--Ft4cPCj.js} +2 -2
  119. package/dist/{capital-DTjbiurV.js → capital-BbOFhTHY.js} +2 -2
  120. package/dist/{cash-stack-7KpYpBek.js → cash-stack-LTzc8hQZ.js} +2 -2
  121. package/dist/{certificate-BPuoJ6Ip.js → certificate-CswNcwlI.js} +2 -2
  122. package/dist/{checkmark-BiSLf8M1.js → checkmark-DH1abKZn.js} +2 -2
  123. package/dist/{checkmark-circle-Ams7bSve.js → checkmark-circle-VWM-JsI6.js} +2 -2
  124. package/dist/{checkmark-circle-fill-_p4ss4ac.js → checkmark-circle-fill-AuW2DQDT.js} +2 -2
  125. package/dist/{checkmark-small-3bw4ftPV.js → checkmark-small-B6vsnsSO.js} +2 -2
  126. package/dist/{chevron-down-GgZawvoy.js → chevron-down-BGAMP7CF.js} +2 -2
  127. package/dist/{chevron-left-TeZTTvo5.js → chevron-left-EjFIt8Cd.js} +2 -2
  128. package/dist/{chevron-right-Cg8XlTxx.js → chevron-right-B5zb9mkt.js} +2 -2
  129. package/dist/{chevron-up-COQUTli0.js → chevron-up-DZiittpJ.js} +2 -2
  130. package/dist/{circle-CypWzg83.js → circle-CygvxRY_.js} +2 -2
  131. package/dist/{circle-small-filled-DfdK2A35.js → circle-small-filled-PeElhgJU.js} +2 -2
  132. package/dist/{clock-DmfGJ2r9.js → clock-CQXEE5jK.js} +2 -2
  133. package/dist/{coins-CBvbB8_X.js → coins-C7syygUR.js} +2 -2
  134. package/dist/{constants-DAb_IqC6.js → constants-Dvga6KjU.js} +7 -8
  135. package/dist/{contract-D1_RJ_xh.js → contract-BWEAd7e-.js} +2 -2
  136. package/dist/{countries-BGMTpyJv.js → countries-ZMuvRtQR.js} +1 -1
  137. package/dist/{country-BEZkohEO.js → country-WYlusjTL.js} +2 -2
  138. package/dist/{cross-circle-fill-CUXdo1x-.js → cross-circle-fill-Bxj_fgQE.js} +2 -2
  139. package/dist/cross-circle-fill-small-DwUKcL9P.js +20 -0
  140. package/dist/{cross-BORHADVQ.js → cross-vK6qh9R0.js} +2 -2
  141. package/dist/cs-CZ-B_u3kWRS.js +7 -0
  142. package/dist/da-DK-s_nCUhFO.js +7 -0
  143. package/dist/de-DE-5lHcZmT6.js +7 -0
  144. package/dist/{decisionMakerRoles-JEb0ON4e.js → decisionMakerRoles-DA8MK9Dh.js} +2 -2
  145. package/dist/{document-1-qvV57JdS.js → document-1-BPWF8zKf.js} +2 -2
  146. package/dist/{document-person-DiJ7M8-D.js → document-person-DVRFNq7g.js} +2 -2
  147. package/dist/{documentUtils-CxjFpoJB.js → documentUtils-6K3LdjjN.js} +6 -4
  148. package/dist/{download-Ca4w0Yfr.js → download-DfdpoHdN.js} +2 -2
  149. package/dist/dropinUtils-CSlRmPSn.js +2572 -0
  150. package/dist/{edit-1-D8VhDchs.js → edit-1-BgVB06zI.js} +2 -2
  151. package/dist/el-GR-DTaQeK-A.js +7 -0
  152. package/dist/{entityAssociationUtil-CY0grcyH.js → entityAssociationUtil-BlfcBl3i.js} +1 -1
  153. package/dist/{error-DrzrPjvf.js → error-DjErFfKK.js} +3 -3
  154. package/dist/es-ES-tZMJvO6B.js +7 -0
  155. package/dist/es-LA-C0x1nQUQ.js +7 -0
  156. package/dist/et-EE-BqB-3lW_.js +7 -0
  157. package/dist/{external-link-Dy4le-8Q.js → external-link-BbXGAtFE.js} +2 -2
  158. package/dist/fi-FI-BpwWFhLW.js +7 -0
  159. package/dist/{form-rules-DhuNdiqF.js → form-rules-HzaYJh36.js} +90 -5
  160. package/dist/{formatValidationError-z2D5oU1e.js → formatValidationError-D3vBdIym.js} +2 -2
  161. package/dist/fr-FR-DMPXwPYV.js +7 -0
  162. package/dist/{getDefaultRegistrationNumberType-BNO2BcfK.js → getDefaultRegistrationNumberType-CiEvyeR9.js} +5 -7
  163. package/dist/{useAssociatedLegalEntity-BdcoiUby.js → getFormSlice-CxtXJ0-P.js} +23 -5
  164. package/dist/{getName-DgxRqagk.js → getName-Cii7OyRd.js} +2 -2
  165. package/dist/{getProblemsForEntity-BY_voJ99.js → getProblemsForEntity-mdb3Bfpj.js} +3 -3
  166. package/dist/{getTrustedDecisionMakers-Ta-pURcL.js → getTrustedDecisionMakers-D89oYOLp.js} +2 -2
  167. package/dist/getValidationError-DvQgc-X3.js +19 -0
  168. package/dist/{gift-Bs_mAgul.js → gift-BjS6ErNG.js} +2 -2
  169. package/dist/{graph-Co0JhGiY.js → graph-B8rX9eXr.js} +2 -2
  170. package/dist/{graph-up-DIvH9haf.js → graph-up-Dwaq7upe.js} +2 -2
  171. package/dist/{headquarter-BESfDGKh.js → headquarter-CXwws_UP.js} +2 -2
  172. package/dist/{hotel-Vne7G5M6.js → hotel-CD5Lv9P7.js} +2 -2
  173. package/dist/hr-HR-D5kV_w60.js +7 -0
  174. package/dist/{http-DsJtugN1.js → http-C8rt2BZk.js} +5 -4
  175. package/dist/hu-HU-Bl1dnZfO.js +7 -0
  176. package/dist/{image-BQM21XCk.js → image-BTE2a8ZV.js} +2 -2
  177. package/dist/{info-DExoPRH5.js → info-BTc0bCCM.js} +2 -2
  178. package/dist/{info-filled-11KMeUso.js → info-filled-DhYinieW.js} +2 -2
  179. package/dist/it-IT-DiuPLWbr.js +7 -0
  180. package/dist/ja-JP-COBWjdXk.js +7 -0
  181. package/dist/{legalArrangementUtils-C68JdH6I.js → legalArrangementUtils-Crgt_L7h.js} +1 -1
  182. package/dist/{location-zRH5zJ8c.js → location-CwE3Q0gg.js} +2 -2
  183. package/dist/lt-LT-D9Pum2_8.js +7 -0
  184. package/dist/lv-LV-DDcLP43G.js +7 -0
  185. package/dist/{mail-i1-zg-cv.js → mail-CIeugZTd.js} +2 -2
  186. package/dist/{mapAddressLocalizationToJpAddressSchema-DpOIaxj6.js → mapAddressLocalizationToJpAddressSchema-BLOAhwWM.js} +2 -2
  187. package/dist/{mapExistingFile-RrS8dCpX.js → mapExistingFile-BXfeQxev.js} +2 -2
  188. package/dist/{mapJpAddressSchemaToAddressLocalizations-wwD6Rp3Q.js → mapJpAddressSchemaToAddressLocalizations-cseKFm-l.js} +16 -15
  189. package/dist/{mapLegalEntityToIndividualSchema-DtT3pcZJ.js → mapLegalEntityToIndividualSchema-DvGFy20Z.js} +12 -13
  190. package/dist/{mapTransferInstrumentToPayoutAccount-BpXU-nP1.js → mapTransferInstrumentToPayoutAccount-Cq7PMPOa.js} +4 -4
  191. package/dist/{minus-circle-filled-CxUdRO8J.js → minus-circle-filled-96DZCdcJ.js} +2 -2
  192. package/dist/nl-NL-CBRRvqAY.js +7 -0
  193. package/dist/no-NO-C9lYR_fQ.js +7 -0
  194. package/dist/{options-horizontal-D86T_xAF.js → options-horizontal-BU9r-Xx3.js} +2 -2
  195. package/dist/{partner-Dje0ykF6.js → partner-C1SWc0pB.js} +2 -2
  196. package/dist/{pay-by-link-plane-DAiddPu6.js → pay-by-link-plane-xK4Zkol0.js} +2 -2
  197. package/dist/{payout-DKiGv3F9.js → payout-zGf0LNbo.js} +2 -2
  198. package/dist/{pdf-CC8vqpTo.js → pdf-Bbs3Ji9v.js} +157 -174
  199. package/dist/{pdf.worker.min-CdKJICZZ.js → pdf.worker.min-DTQpK-0h.js} +67 -58
  200. package/dist/{person-DgALGIIz.js → person-xTKhpEGR.js} +2 -2
  201. package/dist/pl-PL-CZST_1gV.js +7 -0
  202. package/dist/{plus-DlQKP2C9.js → plus-Cm_dWRpB.js} +2 -2
  203. package/dist/{plus-circle-filled-BntUOVIJ.js → plus-circle-filled-Df77eidx.js} +2 -2
  204. package/dist/{processCapabilities-CWE5UFt8.js → processCapabilities-FL4-KAbd.js} +7 -9
  205. package/dist/{processValidationErrors-CFU1x_1n.js → processValidationErrors-Cn-RYAun.js} +4 -4
  206. package/dist/pt-BR-C32QroLH.js +7 -0
  207. package/dist/pt-PT-ByfmK1XA.js +7 -0
  208. package/dist/{recurring-DZgT_ekJ.js → recurring-BfwVHJ2Z.js} +2 -2
  209. package/dist/resolveEnvironment-D8-1H8bU.js +2516 -0
  210. package/dist/{revenue-accelerate-aMLYFVW6.js → revenue-accelerate-ClN0cx7Z.js} +2 -2
  211. package/dist/ro-RO-YkglLwfY.js +7 -0
  212. package/dist/{save-uDNye08N.js → save-QK2A-teG.js} +2 -2
  213. package/dist/{search-0OS6oe8N.js → search-DVSyT7Q7.js} +2 -2
  214. package/dist/{uppercase-DvjwUM0n.js → sharedValidators-DODW7kuK.js} +5 -3
  215. package/dist/{show-BWoS9-Y1.js → show-BRWLIRSA.js} +2 -2
  216. package/dist/sk-SK-BYRIVzdY.js +7 -0
  217. package/dist/sl-SI-Cjub_bfF.js +7 -0
  218. package/dist/{solution-payments-BMal7uJZ.js → solution-payments-BZZceFVV.js} +2 -2
  219. package/dist/{store-N7ZA4FKy.js → store-DLKKLXhn.js} +2 -2
  220. package/dist/style.css +1418 -1157
  221. package/dist/styles-DYaAeu4q.js +1418 -1157
  222. package/dist/sv-SE-1re-9Lp8.js +7 -0
  223. package/dist/{terminal-1-0RlQpbUC.js → terminal-1-CpAyEdjO.js} +2 -2
  224. package/dist/{translation-DbATp_35.js → translation-CpH8D2NK.js} +34 -30
  225. package/dist/types/adaptiveWorkflow/component-registry.d.ts +19 -2
  226. package/dist/types/adaptiveWorkflow/components/NodeRenderer/NodeRenderer.d.ts +7 -0
  227. package/dist/types/adaptiveWorkflow/components/NodeRenderer/SimpleFieldRenderer.d.ts +2 -2
  228. package/dist/types/adaptiveWorkflow/components/Shared/Fields/CountryField/CountryField.d.ts +4 -0
  229. package/dist/types/adaptiveWorkflow/components/Shared/Fields/CountryField/contextMap.d.ts +10 -0
  230. package/dist/types/adaptiveWorkflow/components/Shared/Fields/DateField/DateField.d.ts +4 -0
  231. package/dist/types/adaptiveWorkflow/components/Shared/Fields/DateField/contextMap.d.ts +9 -0
  232. package/dist/types/adaptiveWorkflow/components/Shared/Fields/DateField/validators.d.ts +2 -0
  233. package/dist/types/adaptiveWorkflow/components/Shared/Fields/EmailField/EmailField.d.ts +4 -0
  234. package/dist/types/adaptiveWorkflow/components/Shared/Fields/EmailField/contextMap.d.ts +10 -0
  235. package/dist/types/adaptiveWorkflow/components/Shared/Fields/EmailField/validators.d.ts +2 -0
  236. package/dist/types/adaptiveWorkflow/components/Shared/Fields/NumberField/NumberField.d.ts +4 -0
  237. package/dist/types/adaptiveWorkflow/components/Shared/Fields/NumberField/contextMap.d.ts +9 -0
  238. package/dist/types/adaptiveWorkflow/components/Shared/Fields/NumberField/validators.d.ts +2 -0
  239. package/dist/types/adaptiveWorkflow/components/Shared/Fields/TextField/TextField.d.ts +4 -0
  240. package/dist/types/adaptiveWorkflow/components/Shared/Fields/TextField/contextMap.d.ts +10 -0
  241. package/dist/types/adaptiveWorkflow/components/Shared/Fields/TextField/validators.d.ts +4 -0
  242. package/dist/types/adaptiveWorkflow/components/Shared/Fields/WebsiteField/WebsiteField.d.ts +4 -0
  243. package/dist/types/adaptiveWorkflow/components/Shared/Fields/WebsiteField/contextMap.d.ts +10 -0
  244. package/dist/types/adaptiveWorkflow/components/Shared/Fields/WebsiteField/validators.d.ts +3 -0
  245. package/dist/types/adaptiveWorkflow/utils/validators/getValidationError.d.ts +7 -0
  246. package/dist/types/adaptiveWorkflow/utils/validators/sharedValidators.d.ts +3 -0
  247. package/dist/types/adaptiveWorkflow/utils/validators/types.d.ts +6 -0
  248. package/dist/types/api/adaptive/useAdaptiveWorkflow.d.ts +1 -1
  249. package/dist/types/api/address/useAddressCleanse.d.ts +2 -2
  250. package/dist/types/api/address/useRetrieveAddress.d.ts +2 -2
  251. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +2 -2
  252. package/dist/types/api/address/useSearchAddress.d.ts +2 -2
  253. package/dist/types/api/businessLines/useBusinessLines.d.ts +1 -1
  254. package/dist/types/api/companySearch/useCompanySearch.d.ts +6 -293
  255. package/dist/types/api/configurations/useSupportedCountries.d.ts +1 -1
  256. package/dist/types/api/configurations/useTaskTypes.d.ts +1 -1
  257. package/dist/types/api/configurations/useVersionConfiguration.d.ts +2 -2
  258. package/dist/types/api/datasets/useLegalForms.d.ts +1 -1
  259. package/dist/types/api/datasets/useNaceCodes.d.ts +1 -1
  260. package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +1 -1
  261. package/dist/types/api/documents/useDocument.d.ts +1 -1
  262. package/dist/types/api/documents/useDocuments.d.ts +2 -2
  263. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +3 -3
  264. package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +2 -2
  265. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +1 -1
  266. package/dist/types/api/invitations/useInvitationStatus.d.ts +1 -1
  267. package/dist/types/api/invitedEntity/useInvitedEntityAssociationData.d.ts +2 -2
  268. package/dist/types/api/invitedEntity/useInvitedEntityRootCapabilities.d.ts +2 -2
  269. package/dist/types/api/invitedEntity/useInvitedEntityVerificationErrors.d.ts +2 -2
  270. package/dist/types/api/legalEntity/useLegalEntity.d.ts +9 -9
  271. package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
  272. package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -1
  273. package/dist/types/api/pci/usePciQuestionnaireList.d.ts +2 -2
  274. package/dist/types/api/pci/usePciStatus.d.ts +2 -2
  275. package/dist/types/api/pci/usePciTemplate.d.ts +2 -2
  276. package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +1 -1
  277. package/dist/types/api/taskStatus/useTaskStatus.d.ts +2 -2
  278. package/dist/types/api/taskStatus/useTaskStatuses.d.ts +2 -2
  279. package/dist/types/api/taxClassification/useTaxClassification.d.ts +2 -2
  280. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +2 -2
  281. package/dist/types/api/termsOfService/useTermsOfService.d.ts +2 -2
  282. package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +1 -1
  283. package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +2 -2
  284. package/dist/types/api/tinVerification/useVerifyTin.d.ts +5 -245
  285. package/dist/types/api/toggles/useToggles.d.ts +1 -1
  286. package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -1
  287. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +1 -1
  288. package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -1
  289. package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -2
  290. package/dist/types/api/validation/useValidatePhoneNumber.d.ts +2 -2
  291. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -2
  292. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +3 -2
  293. package/dist/types/components/Business/forms/rules.d.ts +3 -1
  294. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSummary.d.ts +3 -2
  295. package/dist/types/components/GlobalEntry/hooks/usePrefetchCompanySearch.d.ts +11 -0
  296. package/dist/types/components/GlobalEntry/rules.d.ts +1 -1
  297. package/dist/types/components/GlobalEntry/utils/submitGlobalEntry.d.ts +3 -1
  298. package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +3 -1
  299. package/dist/types/components/Individual/forms/Individual.rules.d.ts +4 -2
  300. package/dist/types/components/Shared/NewSummary/NewSummary.d.ts +7 -6
  301. package/dist/types/components/Shared/SummarySection/SummarySection.d.ts +12 -4
  302. package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +2 -2
  303. package/dist/types/components/Shared/fields/RegistrationAndOperationalAddressFields/utils.d.ts +1 -1
  304. package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +1 -1
  305. package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +11 -1
  306. package/dist/types/components/ui/atoms/Typography/Typography.types.d.ts +1 -1
  307. package/dist/types/context/SettingsContext/types.d.ts +8 -0
  308. package/dist/types/context/ToggleContext/types.d.ts +3 -13
  309. package/dist/types/utils/japanSupportUtils.d.ts +2 -2
  310. package/dist/types/utils/validatorUtils.d.ts +2 -0
  311. package/dist/{types-D6p5FQF-.js → types-BymnGWO9.js} +1 -1
  312. package/dist/{types-B9zXzag-.js → types-qahGXhtr.js} +1 -1
  313. package/dist/{upload-C5NC1E4N.js → upload-BI7LKlDm.js} +2 -2
  314. package/dist/{useAdaptiveWorkflow-DsQESk9f.js → useAdaptiveWorkflow-B35cXauP.js} +1 -1
  315. package/dist/{useBusinessDetailsData-dsYTeDom.js → useBusinessDetailsData-BEM6OCqH.js} +132 -150
  316. package/dist/{useBusinessLines-BhSN6qCH.js → useBusinessLines-0FcuDMzo.js} +1 -1
  317. package/dist/{useCanSeeIntroduction-BLGY7sE-.js → useCanSeeIntroduction-B6BDOCm_.js} +5 -5
  318. package/dist/{useDataMissingRemediations-ttUrk09_.js → useDataMissingRemediations-DKjYzfe2.js} +3 -3
  319. package/dist/{useForm-BFeaSvlP.js → useForm-fYu8sJ-i.js} +6 -6
  320. package/dist/{useHideTaskStepper-C_w6iUY-.js → useHideTaskStepper-BgCN--mG.js} +1 -1
  321. package/dist/{invalidateRootLegalEntity-B97dCa-s.js → useId-CEUET5IS.js} +32 -4
  322. package/dist/{useIndustryCodes-uAj90IyS.js → useIndustryCodes-La1cU8oH.js} +1 -1
  323. package/dist/{useLegalEntity-QQXN6YOm.js → useLegalEntity-CxeMoCm4.js} +4 -3
  324. package/dist/{useNavigate-J0sRAAoI.js → useNavigate-B1z7McBl.js} +33 -33
  325. package/dist/{useOnboardingStatus-CsGUjkm-.js → useOnboardingStatus-CX8IrDe_.js} +1 -1
  326. package/dist/{usePciQuestionnaireList-CFNJD8pS.js → usePciQuestionnaireList-CB_tjNsz.js} +1 -1
  327. package/dist/{useSalesChannels-huIL6Dhk.js → useSalesChannels-DJAmDo-r.js} +5 -5
  328. package/dist/{useScenarios-DV2TeNvN.js → useScenarios-DfE71fl7.js} +7 -6
  329. package/dist/{useSettingsContext-9O3Aqpfq.js → useSettingsContext-Bpf4UqRT.js} +6 -3
  330. package/dist/{useTaskLandedEvent-DwZHcMEQ.js → useTaskLandedEvent-BtuFBe20.js} +2 -2
  331. package/dist/{useTaskStatus-CgrhdaE_.js → useTaskStatus-4nAPf_uD.js} +1 -1
  332. package/dist/{useTermsOfServiceStatus-DbJDklA2.js → useTermsOfServiceStatus-FDpSDjco.js} +1 -1
  333. package/dist/{useTrustMembers-uhgi2qfN.js → useTrustMembers-D3sCwcaT.js} +9 -8
  334. package/dist/{useUnincorporatedPartnershipMembers-DVEWj1is.js → useUnincorporatedPartnershipMembers-DcfQJdVZ.js} +5 -5
  335. package/dist/{useUpdateBusinessLines-DCKYTzxd.js → useUpdateBusinessLines-B-pF2YT-.js} +1 -1
  336. package/dist/{utils-SKYT7xU4.js → utils-BFxg3gPM.js} +2 -2
  337. package/dist/{utils-D8pwjFm5.js → utils-CcBgYW2P.js} +5 -6
  338. package/dist/utils-Oc-YLiM0.js +214 -0
  339. package/dist/{validate-BBVJuFm5.js → validate-1rlz-OH4.js} +15 -17
  340. package/dist/{validate-Bkpa-y5Q.js → validate-B2P8hpA5.js} +7 -7
  341. package/dist/{validate-t6pT7AaZ.js → validate-S1Bm0XnT.js} +3 -3
  342. package/dist/{validate-Dmdw3pYn.js → validate-x5CYfY5E.js} +2 -2
  343. package/dist/{validateExtractionResult-qkFkcrwl.js → validateExtractionResult-IRRMwcNi.js} +5 -7
  344. package/dist/{warning-circle-fill-C2lMYPJW.js → warning-circle-fill-ClFvGo5m.js} +2 -2
  345. package/dist/{warning-diamond-filled-CQ2DdW5g.js → warning-diamond-filled-CWyKR65i.js} +2 -2
  346. package/dist/{webinar-BpZWqd-g.js → webinar-DWX7Z5Wz.js} +2 -2
  347. package/package.json +36 -36
  348. package/dist/AdaptiveWorkflow-2EE8iiMD.js +0 -33
  349. package/dist/Alert-BqbbDRYR.js +0 -172
  350. package/dist/AnalyticsContext-CpimDlw4.js +0 -21
  351. package/dist/Checkbox-qfdF12cF.js +0 -60
  352. package/dist/Confirm-DjFpxSzC.js +0 -77
  353. package/dist/CountryField-CMOB4yz4.js +0 -38
  354. package/dist/DataConflictsModal-8Nnj7_UD.js +0 -238
  355. package/dist/Field-Df7ajJE2.js +0 -154
  356. package/dist/FormFlow.module-DqMxjYHl.js +0 -20
  357. package/dist/Header-DvifUz7-.js +0 -93
  358. package/dist/Icon-DFQgr7dy.js +0 -175
  359. package/dist/LandingLayout-BsIoIFzs.js +0 -76
  360. package/dist/LegalName-BYQ12uWc.js +0 -33
  361. package/dist/LoaderWrapper-Dc88hY-P.js +0 -34
  362. package/dist/MaskedInput-CkDwzLxe.js +0 -719
  363. package/dist/MaybeModal-Dfm1rIUG.js +0 -24
  364. package/dist/NewSummary-DYLlnpwx.js +0 -73
  365. package/dist/ProgressBar-DWFxLMUA.js +0 -38
  366. package/dist/RadioGroup-CY33MT83.js +0 -47
  367. package/dist/RadioWithLabel-BmUFWDxq.js +0 -45
  368. package/dist/SettingsContext-Dl-9WWCI.js +0 -9
  369. package/dist/StateContext-B2_Pqd_y.js +0 -9
  370. package/dist/StateField-BiNI3dm9.js +0 -55
  371. package/dist/StructuredList-BHUmeWeh.js +0 -56
  372. package/dist/Summary-BTDbRMfh.js +0 -235
  373. package/dist/TaxInformationField--Uhp0zLv.js +0 -242
  374. package/dist/TileGroup-BFcSgQ1l.js +0 -172
  375. package/dist/ToastContext-B_wd2IY2.js +0 -13
  376. package/dist/ToastContextProvider-BSQ1Upl_.js +0 -103
  377. package/dist/VerificationErrorAlert-B6HmAZ0g.js +0 -38
  378. package/dist/_rolldown_dynamic_import_helper-sGNwd-kR.js +0 -14
  379. package/dist/bafinUtils-RXELXyTR.js +0 -96
  380. package/dist/bg-BG-DfbtcqF4.js +0 -7
  381. package/dist/birthDateUtils-D6uk7zwm.js +0 -84
  382. package/dist/businessRegistrationNumberPatterns-pbrCVTTp.js +0 -982
  383. package/dist/cross-circle-fill-small-DdoPZZeo.js +0 -20
  384. package/dist/cs-CZ-CajuRLo4.js +0 -7
  385. package/dist/da-DK-BEwmSejn.js +0 -7
  386. package/dist/datasetUtil-BdHPWsxZ.js +0 -45
  387. package/dist/de-DE-PyK3jl-6.js +0 -7
  388. package/dist/debouncedInputEvent-Fwwp_K_-.js +0 -54
  389. package/dist/debugStore-Dwn1FXrh.js +0 -9
  390. package/dist/dropinUtils-OsMsnnYG.js +0 -496
  391. package/dist/el-GR-KPFghikv.js +0 -7
  392. package/dist/es-ES-z4jLCvkJ.js +0 -7
  393. package/dist/es-LA-Dx4QymCh.js +0 -7
  394. package/dist/et-EE-1EhDxtTe.js +0 -7
  395. package/dist/fi-FI-Dc2RMc_u.js +0 -7
  396. package/dist/fieldConfigurations-CZCFghnK.js +0 -11
  397. package/dist/formFieldsUtils-CnDkgahc.js +0 -7
  398. package/dist/formUtils-BHgG8yQZ.js +0 -52
  399. package/dist/formUtils-DAKrWwgL.js +0 -84
  400. package/dist/fr-FR-DswL4wQ1.js +0 -7
  401. package/dist/getFormSlice-C1ma6Xd4.js +0 -21
  402. package/dist/getTrustedFields-BJ88GlM-.js +0 -28
  403. package/dist/globalStore--_np-9ON.js +0 -418
  404. package/dist/hr-HR-DI2D_V50.js +0 -7
  405. package/dist/hu-HU-lyRcZjGI.js +0 -7
  406. package/dist/isEmpty-Uewyl-r6.js +0 -14
  407. package/dist/isEmptyEntity-3OHnhXqG.js +0 -43
  408. package/dist/it-IT-Bn4CEcmI.js +0 -7
  409. package/dist/ja-JP-CAX_xwUx.js +0 -7
  410. package/dist/keys-Ce8YnRP2.js +0 -20
  411. package/dist/listToRecord-DumSkYDz.js +0 -10
  412. package/dist/lt-LT-BdgYuJW7.js +0 -7
  413. package/dist/lv-LV-Bz5c0Psg.js +0 -7
  414. package/dist/mapScriptLocalization-BCfkZo1y.js +0 -46
  415. package/dist/nl-NL-BE2cQh0x.js +0 -7
  416. package/dist/no-NO-vgzpp44v.js +0 -7
  417. package/dist/patternValidators-DsrZkuOO.js +0 -73
  418. package/dist/pl-PL-DgDSRVmp.js +0 -7
  419. package/dist/pt-BR-BaKp-J8F.js +0 -7
  420. package/dist/pt-PT-Df48oeP5.js +0 -7
  421. package/dist/resolveEnvironment-CLI-fiSo.js +0 -999
  422. package/dist/ro-RO-CTMsv_EY.js +0 -7
  423. package/dist/roleMetadata-CbgaYaH8.js +0 -56
  424. package/dist/sk-SK-oqO5I3Aw.js +0 -7
  425. package/dist/sl-SI-CQhJFnpj.js +0 -7
  426. package/dist/summaryItem-uDWmtYtt.js +0 -16
  427. package/dist/sv-SE-CmevESLi.js +0 -7
  428. package/dist/toFullWidth-Dgy4X4i8.js +0 -52
  429. package/dist/trustUtil-BG17fZ56.js +0 -98
  430. package/dist/types/adaptiveWorkflow/components/Fields/LegalName.d.ts +0 -14
  431. package/dist/types-B28r2lAW.js +0 -30
  432. package/dist/types-CZAHRt31.js +0 -147
  433. package/dist/useAccountHolder-BpIX1iBG.js +0 -102
  434. package/dist/useAllowedCountries-qyvo-c6A.js +0 -80
  435. package/dist/useAnalyticsContext-gSnRnYgV.js +0 -12
  436. package/dist/useCreateLegalEntity-CYZd_62a.js +0 -24
  437. package/dist/useDataset-K19TDoyR.js +0 -98
  438. package/dist/useDeleteTransferInstrument-C10xzHiO.js +0 -31
  439. package/dist/useId-BkDhUta2.js +0 -28
  440. package/dist/useMultiForm-CM3lpilP.js +0 -790
  441. package/dist/useToastContext-B6Mqc2HY.js +0 -12
  442. package/dist/useToggleContext-B_YexrbT.js +0 -21
  443. package/dist/useUpdateLegalEntity-B7LRg8m0.js +0 -29
  444. package/dist/utils-BLBh0VEd.js +0 -1755
  445. package/dist/utils-CYUYe54m.js +0 -24
  446. package/dist/utils-DdHbAadK.js +0 -80
  447. package/dist/validationError-DUn2rT0n.js +0 -55
  448. package/dist/validationResult-bjYBDjbU.js +0 -29
  449. package/dist/validatorUtils-D2O6AAZn.js +0 -106
  450. /package/dist/{pt-BR-CPbFPNwq2.js → pt-BR-CPbFPNwq.js} +0 -0
@@ -0,0 +1,2516 @@
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] = "f91e2604-fff9-48f8-8b24-069a632bf6af", e._sentryDebugIdIdentifier = "sentry-dbid-f91e2604-fff9-48f8-8b24-069a632bf6af");
4
+ } catch (e) {}
5
+ import { a as setDefaults, i as setI18n, n as addResourceBundles, r as useTranslation } from "./translation-CpH8D2NK.js";
6
+ import { t as createLogger } from "./logger-Z8AeTE4x.js";
7
+ import { t as Icon } from "./Icon-_YUEZg1p.js";
8
+ import { t as Typography } from "./Typography-CAc_f5Iq.js";
9
+ import { t as Loader } from "./Loader-BDaKGf77.js";
10
+ import { n as IconButton, t as Button } from "./Button-Dwr6jvJZ.js";
11
+ import { a as setSdkTokenHandler, i as refreshSession, n as httpGet, o as ApiProvider, r as httpPost, s as useApiContext } from "./http-C8rt2BZk.js";
12
+ import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-CxeMoCm4.js";
13
+ import { t as getLegalEntityCountry } from "./getLegalEntityCountry-BK-HHa65.js";
14
+ import { n as SettingsContext, t as useSettingsContext } from "./useSettingsContext-Bpf4UqRT.js";
15
+ import { c as valuesOf, i as noop, o as entriesOf, s as keysOf, t as cloneObject } from "./genUtils-nphCwt1A.js";
16
+ import { t as StackLayout } from "./StackLayout-J1ynSX-P.js";
17
+ import { t as TaskVerificationStatus } from "./TaskVerificationStatus-zoxTZ2mt.js";
18
+ import { i as TaskStatuses, r as TASK_STATUS_PRIORITY } from "./taskStatus-BtekPA8E.js";
19
+ import { t as CountryCodes } from "./country-code-CJk2hdPu.js";
20
+ import { t as Skeleton } from "./Skeleton-7xDqhYr-.js";
21
+ import { t as Accordion } from "./Accordion-BAdwrgCR.js";
22
+ import { C as CUSTOMER_SUPPORT_DATA_MISSING_ERROR_CODES, n as getCapabilityProblems, t as getCapabilities } from "./processCapabilities-FL4-KAbd.js";
23
+ import { t as TaskTypes } from "./taskTypes-3vSkMBDm.js";
24
+ import { a as getLegalRepresentative, i as getDirectEntityAssociations, l as getOwnSoleProprietorshipIdArray } from "./entityAssociationUtil-BlfcBl3i.js";
25
+ import { i as getOwnDecisionMakersLegalEntityIds, n as getDecisionMakers, o as hasMinRequiredDecisionMakerCount } from "./decisionMakerRoles-DA8MK9Dh.js";
26
+ import { n as TrustMemberGuidanceLabels, r as TrustMemberTypes } from "./trustMemberGuidance-BpeDHAJP.js";
27
+ import { t as getNestedPropertyKeys } from "./getNestedPropertyKeys-Cd8HKupP.js";
28
+ import { n as isEuCountry, r as isHkSgCountry } from "./country-WYlusjTL.js";
29
+ import i18n from "i18next";
30
+ import { Suspense, lazy } from "preact/compat";
31
+ import { useCallback as useCallback$1, useContext as useContext$1, useEffect as useEffect$1, useMemo as useMemo$1, useReducer, useRef as useRef$1, useState as useState$1 } from "preact/hooks";
32
+ import cx from "classnames";
33
+ import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
34
+ import { computed, signal } from "@preact/signals";
35
+ import { QueryCache, QueryClient, QueryClientProvider, useMutation, useQuery } from "@tanstack/preact-query";
36
+ import { createContext as createContext$1, isValidElement as isValidElement$1 } from "preact";
37
+ import { defineSlots } from "named-slots";
38
+ //#region node_modules/.pnpm/vite-plugin-shadow-styles@0.0.3_vite@8.2.2_@types+node@26.3.0_esbuild@0.27.7_jiti@2.7.0_sass@1.99.0_/node_modules/vite-plugin-shadow-styles/dist/stylesheets.js
39
+ var sheet = new CSSStyleSheet();
40
+ var stylesheets = [sheet];
41
+ import("./styles-DYaAeu4q.js").then(({ css }) => {
42
+ sheet.replaceSync(css);
43
+ }).catch((err) => console.error("Error loading styles", err));
44
+ //#endregion
45
+ //#region src/language/i18n.ts
46
+ /**
47
+ * Initializes i18next and defines configurations
48
+ * i18next-resources-to-backend is a simple plugin used for the lazy loading of translation resources
49
+ */
50
+ i18n.use({
51
+ type: "3rdParty",
52
+ init(instance) {
53
+ setDefaults(instance.options.react);
54
+ setI18n(instance);
55
+ }
56
+ }).init({
57
+ defaultNS: false,
58
+ fallbackLng: "en-US",
59
+ load: "currentOnly",
60
+ resources: {},
61
+ showSupportNotice: false,
62
+ react: {
63
+ transSupportBasicHtmlNodes: true,
64
+ transKeepBasicHtmlNodesFor: [
65
+ "strong",
66
+ "i",
67
+ "em"
68
+ ],
69
+ bindI18n: "languageChanged",
70
+ bindI18nStore: "added"
71
+ },
72
+ interpolation: {
73
+ prefix: "%{",
74
+ suffix: "}"
75
+ }
76
+ });
77
+ //#endregion
78
+ //#region src/api/configurations/useVersionConfiguration.ts
79
+ /**
80
+ * Retrieves information about the onboarding version and version-specific features to enable
81
+ * linked to the legalEntityId
82
+ */
83
+ var getVersionConfiguration = async (legalEntityId, baseUrl) => {
84
+ return httpGet({
85
+ baseUrl,
86
+ path: `legalEntities/${legalEntityId}/configurations/version`
87
+ });
88
+ };
89
+ var useVersionConfiguration = (options) => {
90
+ const { rootLegalEntityId, baseUrl } = useApiContext();
91
+ return useQuery({
92
+ queryKey: ["versionConfiguration"],
93
+ queryFn: () => getVersionConfiguration(rootLegalEntityId.value, baseUrl.value),
94
+ ...options
95
+ });
96
+ };
97
+ //#endregion
98
+ //#region src/api/uiAnalytics/useAnalyticsSession.ts
99
+ /**
100
+ * @description Request to get an analytics session ID and fire an "Initiate session" event on Mixpanel
101
+ * @param data.userData Sets user profile properties on Mixpanel
102
+ * @returns a session id that is sent with every subsequent log event request
103
+ */
104
+ var getAnalyticsSession = async (baseUrl, data) => {
105
+ return httpPost({
106
+ baseUrl,
107
+ path: `analytics/ui`
108
+ }, data);
109
+ };
110
+ var useAnalyticsSession = (sessionData, onboardingVersion, options) => {
111
+ const { baseUrl } = useApiContext();
112
+ return useQuery({
113
+ queryKey: ["analyticsSession", onboardingVersion],
114
+ queryFn: () => getAnalyticsSession(baseUrl.value, sessionData),
115
+ enabled: Boolean(onboardingVersion),
116
+ ...options
117
+ });
118
+ };
119
+ //#endregion
120
+ //#region src/core/user-events.ts
121
+ var UserEvents = class {
122
+ queue = [];
123
+ subscriptions = /* @__PURE__ */ new Set();
124
+ /** payload of commmon props sent in every event */
125
+ baseTrackingPayload;
126
+ /** properties not set with every event but that may be shared between some events
127
+ * ex. `page` value for `Interacted with form field` events
128
+ */
129
+ sharedEventProperties;
130
+ constructor() {
131
+ this.baseTrackingPayload = {
132
+ category: "onboarding",
133
+ subCategory: "hosted onboarding"
134
+ };
135
+ this.sharedEventProperties = {};
136
+ }
137
+ add(...args) {
138
+ this.queue.push(...args);
139
+ }
140
+ notifySubscribers() {
141
+ while (this.queue.length > 0) {
142
+ const lastEvent = this.queue.pop();
143
+ this.subscriptions.forEach((callback) => callback(lastEvent));
144
+ }
145
+ }
146
+ /**
147
+ * Adds an analytics event with all base event properties.
148
+ */
149
+ addEvent(eventName, properties) {
150
+ const completeEvent = {
151
+ ...this.baseTrackingPayload,
152
+ ...properties
153
+ };
154
+ this.add({
155
+ type: "add_event",
156
+ name: eventName,
157
+ properties: completeEvent
158
+ });
159
+ this.notifySubscribers();
160
+ }
161
+ /**
162
+ * Adds an event with context specific to journey-related events
163
+ */
164
+ addJourneyEvent(eventName, properties) {
165
+ this.addEvent(eventName, {
166
+ actionLevel: "journey",
167
+ ...properties
168
+ });
169
+ }
170
+ /**
171
+ * Adds an event with context specific to task-related events
172
+ */
173
+ addTaskEvent(eventName, properties) {
174
+ this.addEvent(eventName, {
175
+ actionLevel: "task",
176
+ ...properties
177
+ });
178
+ }
179
+ /**
180
+ * Adds an event with context specific to page-related events
181
+ */
182
+ addPageEvent(eventName, properties) {
183
+ this.addEvent(eventName, {
184
+ actionLevel: "page",
185
+ page: this.sharedEventProperties.page,
186
+ ...properties
187
+ });
188
+ }
189
+ /**
190
+ * Adds an event with context specific to field-related events
191
+ */
192
+ addFieldEvent(eventName, properties) {
193
+ this.addEvent(eventName, {
194
+ actionLevel: "field",
195
+ page: this.sharedEventProperties.page,
196
+ ...properties
197
+ });
198
+ }
199
+ /**
200
+ * Tracks an experiment for Mixpanel experiment reporting
201
+ */
202
+ trackExperiment({ name, variant }) {
203
+ this.add({
204
+ type: "add_event",
205
+ name: "$experiment_started",
206
+ properties: {
207
+ ...this.baseTrackingPayload,
208
+ "Experiment name": name,
209
+ "Variant name": variant
210
+ }
211
+ });
212
+ }
213
+ /**
214
+ * Subscribes a callback to analytics events. It gets called every time
215
+ * one of the above public methods get called, and the event data is passed back as an array.
216
+ * The callback must have a single argument which is an array of [eventName, eventPayload?].
217
+ * @example
218
+ * ```js
219
+ * const callback = ([eventName, eventPayload]) => console.log(eventName, eventPayload);
220
+ * this.subscribe(callback);
221
+ *
222
+ * const exampleEventPayload = { count: 1, segmentation: { foo: 'bar' } };
223
+ * this.addEvent('exampleEventDidOccur', exampleEventPayload);
224
+ *
225
+ * // `callback` will get called with `['exampleEventDidOccur', exampleEventPayload]`
226
+ * ```
227
+ */
228
+ subscribe(callback) {
229
+ this.subscriptions.add(callback);
230
+ }
231
+ /**
232
+ * Sets params that are sent on every event
233
+ * */
234
+ updateBaseTrackingPayload(baseTrackingPayload) {
235
+ this.baseTrackingPayload = {
236
+ ...this.baseTrackingPayload,
237
+ ...baseTrackingPayload
238
+ };
239
+ }
240
+ /**
241
+ * Sets params that may be shared between events
242
+ * */
243
+ updateSharedEventProperties = (props) => {
244
+ this.sharedEventProperties = {
245
+ ...this.sharedEventProperties,
246
+ ...props
247
+ };
248
+ };
249
+ /**
250
+ * Removes a subscribed callback
251
+ */
252
+ unsubscribe(callback) {
253
+ if (this.subscriptions.has(callback)) this.subscriptions.delete(callback);
254
+ }
255
+ };
256
+ var createUserEvents = () => {
257
+ return new UserEvents();
258
+ };
259
+ //#endregion
260
+ //#region src/api/uiAnalytics/usePushAnalyticEvent.ts
261
+ var pushAnalyticEvent = async (baseUrl, sessionId, data) => {
262
+ return httpPost({
263
+ baseUrl,
264
+ path: `analytics/ui/${sessionId}`
265
+ }, data);
266
+ };
267
+ var usePushAnalyticEvent = (sessionId, options) => {
268
+ const { baseUrl } = useApiContext();
269
+ return useMutation({
270
+ mutationFn: (data) => pushAnalyticEvent(baseUrl.value, sessionId, data),
271
+ ...options
272
+ });
273
+ };
274
+ //#endregion
275
+ //#region src/utils/analytics/convertToEmbeddedEvent.ts
276
+ var convertToEmbeddedEvent = (eventQueueItem, sessionData) => {
277
+ const { type, name, properties } = eventQueueItem;
278
+ return {
279
+ eventName: name,
280
+ eventType: type,
281
+ eventData: properties || {},
282
+ legalEntityId: sessionData.legalEntityId,
283
+ userAgent: sessionData.userAgent,
284
+ componentName: sessionData.componentName,
285
+ sdkVersion: sessionData.sdkVersion
286
+ };
287
+ };
288
+ //#endregion
289
+ //#region src/utils/analytics/getAnalyticsAssociatedEntityDetails.ts
290
+ /**
291
+ * Gets associated legal entity type and ID for the base tracking payload
292
+ * Based on selected account holder type
293
+ */
294
+ var getAnalyticsAssociatedEntityDetails = (rootLegalEntity, accountHolderType) => {
295
+ let associatedLegalEntityType;
296
+ switch (accountHolderType) {
297
+ case "aTrust":
298
+ associatedLegalEntityType = "trust";
299
+ break;
300
+ case "mySoleProprietorName":
301
+ associatedLegalEntityType = "soleProprietorship";
302
+ break;
303
+ case "anUnincorporatedPartnership":
304
+ associatedLegalEntityType = "unincorporatedPartnership";
305
+ break;
306
+ default: associatedLegalEntityType = void 0;
307
+ }
308
+ const associatedLegalEntity = rootLegalEntity.entityAssociations?.find((ea) => ea.type === associatedLegalEntityType);
309
+ return {
310
+ associatedLegalEntityType,
311
+ associatedLegalEntityId: associatedLegalEntity?.legalEntityId
312
+ };
313
+ };
314
+ //#endregion
315
+ //#region src/utils/testing/ignoreLocalStorage.tsx
316
+ var IgnoreLocalStorageContext = createContext$1(false);
317
+ var useIgnoreLocalStorage = () => useContext$1(IgnoreLocalStorageContext);
318
+ //#endregion
319
+ //#region src/hooks/useLocalStorage.ts
320
+ var logger$4 = createLogger();
321
+ var useLocalStorage = (key, defaultValue, options) => {
322
+ const { serializer, parser, syncData } = useMemo$1(() => ({
323
+ serializer: JSON.stringify,
324
+ parser: JSON.parse,
325
+ syncData: true,
326
+ ...options
327
+ }), [options]);
328
+ const ignoreLocalStorage = useIgnoreLocalStorage() || typeof window === "undefined";
329
+ const rawValueRef = useRef$1(null);
330
+ const [value, setValue] = useState$1(() => {
331
+ if (ignoreLocalStorage) return defaultValue;
332
+ try {
333
+ rawValueRef.current = window.localStorage.getItem(key);
334
+ return rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
335
+ } catch (err) {
336
+ logger$4.error(err);
337
+ return defaultValue;
338
+ }
339
+ });
340
+ useEffect$1(() => {
341
+ if (ignoreLocalStorage) return;
342
+ const updateLocalStorage = () => {
343
+ if (value !== void 0) {
344
+ const newValue = serializer(value);
345
+ const oldValue = rawValueRef.current;
346
+ rawValueRef.current = newValue;
347
+ window.localStorage.setItem(key, newValue);
348
+ window.dispatchEvent(new StorageEvent("storage", {
349
+ storageArea: window.localStorage,
350
+ url: window.location.href,
351
+ key,
352
+ newValue,
353
+ oldValue
354
+ }));
355
+ } else {
356
+ window.localStorage.removeItem(key);
357
+ window.dispatchEvent(new StorageEvent("storage", {
358
+ storageArea: window.localStorage,
359
+ url: window.location.href,
360
+ key
361
+ }));
362
+ }
363
+ };
364
+ try {
365
+ updateLocalStorage();
366
+ } catch (err) {
367
+ logger$4.error(err);
368
+ }
369
+ }, [value, ignoreLocalStorage]);
370
+ useEffect$1(() => {
371
+ if (!syncData) return;
372
+ const handleStorageChange = (event) => {
373
+ if (event.key !== key || event.storageArea !== window.localStorage) return;
374
+ try {
375
+ if (event.newValue !== rawValueRef.current) {
376
+ rawValueRef.current = event.newValue;
377
+ setValue(event.newValue ? parser(event.newValue) : void 0);
378
+ }
379
+ } catch (err) {
380
+ logger$4.error(err);
381
+ }
382
+ };
383
+ if (ignoreLocalStorage) return;
384
+ window.addEventListener("storage", handleStorageChange);
385
+ return () => {
386
+ window.removeEventListener("storage", handleStorageChange);
387
+ };
388
+ }, [
389
+ key,
390
+ syncData,
391
+ ignoreLocalStorage
392
+ ]);
393
+ return [value, setValue];
394
+ };
395
+ //#endregion
396
+ //#region src/hooks/useAccountHolder.ts
397
+ var getAccountHolderStorageKey = (legalEntityId) => `ACCOUNT_HOLDER-${legalEntityId}`;
398
+ var useAccountHolder = () => {
399
+ const { rootLegalEntityId } = useApiContext();
400
+ const [accountHolderFromLocalStorage, setAccountHolderIntoLocalStorage] = useLocalStorage(getAccountHolderStorageKey(rootLegalEntityId.value), void 0);
401
+ return {
402
+ accountHolder: accountHolderFromLocalStorage,
403
+ setAccountHolder: setAccountHolderIntoLocalStorage
404
+ };
405
+ };
406
+ //#endregion
407
+ //#region src/hooks/useAnalytics/useAnalytics.ts
408
+ var useAnalytics = ({ userEvents, sessionId, sessionData }) => {
409
+ const sdkVersion = "4.26.0-beta.0";
410
+ const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
411
+ const { mutateAsync } = usePushAnalyticEvent(sessionId ?? "");
412
+ const { accountHolder } = useAccountHolder();
413
+ useEffect$1(() => {
414
+ if (!rootLegalEntity) return;
415
+ const countryCode = getLegalEntityCountry(rootLegalEntity);
416
+ const capabilities = Object.keys(rootLegalEntity?.capabilities ?? {});
417
+ userEvents.updateBaseTrackingPayload({
418
+ entityType: rootLegalEntity.type,
419
+ countryCode,
420
+ capabilities,
421
+ sdkVersion,
422
+ componentName: sessionData.componentName,
423
+ userAgent: navigator.userAgent,
424
+ ...getAnalyticsAssociatedEntityDetails(rootLegalEntity, accountHolder)
425
+ });
426
+ }, [
427
+ rootLegalEntity,
428
+ accountHolder,
429
+ sdkVersion,
430
+ sessionData.componentName,
431
+ userEvents
432
+ ]);
433
+ const pushEvents = useCallback$1((data) => {
434
+ const eventItem = convertToEmbeddedEvent(data, sessionData);
435
+ mutateAsync(eventItem);
436
+ }, [mutateAsync, sessionData]);
437
+ useEffect$1(() => {
438
+ if (!sessionId) return;
439
+ userEvents.subscribe(pushEvents);
440
+ return () => {
441
+ userEvents.unsubscribe(pushEvents);
442
+ };
443
+ }, [
444
+ sessionId,
445
+ mutateAsync,
446
+ userEvents,
447
+ sessionData,
448
+ pushEvents
449
+ ]);
450
+ };
451
+ //#endregion
452
+ //#region src/utils/analytics/getPrefilledDetails.ts
453
+ var getOrganizationPrefilledFields = (organization) => {
454
+ const { dateOfIncorporation, financialReports, registeredAddress, registrationNumber, support, taxInformation, type, vatNumber } = organization;
455
+ const financialReport = financialReports?.[0];
456
+ return {
457
+ dateOfIncorporation: !!dateOfIncorporation,
458
+ financialReport: {
459
+ annualTurnover: !!financialReport?.annualTurnover,
460
+ balanceSheetTotal: !!financialReport?.balanceSheetTotal,
461
+ dateOfFinancialData: !!financialReport?.dateOfFinancialData,
462
+ employeeCount: !!financialReport?.employeeCount
463
+ },
464
+ registeredAddress: {
465
+ city: !!registeredAddress?.city,
466
+ postalCode: !!registeredAddress?.postalCode,
467
+ stateOrProvince: !!registeredAddress?.stateOrProvince,
468
+ street: !!registeredAddress?.street
469
+ },
470
+ registrationNumber: !!registrationNumber,
471
+ support: {
472
+ email: !!support?.email,
473
+ phone: !!support?.phone
474
+ },
475
+ taxInformation: !!taxInformation?.some((taxInfo) => taxInfo.country && taxInfo.number),
476
+ type: !!type,
477
+ vatNumber: !!vatNumber
478
+ };
479
+ };
480
+ var getPrefilledDetails = (legalEntity) => {
481
+ if (!legalEntity) return;
482
+ const { organization, transferInstruments, entityAssociations } = legalEntity;
483
+ return {
484
+ transferInstrumentCount: transferInstruments?.length || 0,
485
+ entityAssociations: entityAssociations?.map((entity) => entity.type) || [],
486
+ organization: organization && getOrganizationPrefilledFields(organization)
487
+ };
488
+ };
489
+ var AnalyticsContext = createContext$1({
490
+ addEvent: noop,
491
+ addJourneyEvent: noop,
492
+ addTaskEvent: noop,
493
+ addPageEvent: noop,
494
+ addFieldEvent: noop,
495
+ startEvent: noop,
496
+ subscribe: noop,
497
+ trackExperiment: noop,
498
+ updateBaseTrackingPayload: noop,
499
+ updateSharedEventProperties: noop,
500
+ unsubscribe: noop
501
+ });
502
+ //#endregion
503
+ //#region src/context/AnalyticsContext/AnalyticsProvider.tsx
504
+ /**
505
+ * The provider exists to scope analytics to one application instance.
506
+ * This would otherwise be problematic when a consumer might have several
507
+ * instantiations of a embedded Component for instance on the same page
508
+ */
509
+ var AnalyticsProvider = ({ componentName, children, rootLegalEntityId, locale }) => {
510
+ const { settings } = useSettingsContext();
511
+ const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
512
+ const { data: versionData, isError, isLoading } = useVersionConfiguration();
513
+ const userEvents = useMemo$1(() => createUserEvents(), []);
514
+ const onboardingVersion = isLoading ? void 0 : isError ? 1 : versionData?.version;
515
+ const capabilities = rootLegalEntity?.capabilities && Object.keys(rootLegalEntity.capabilities);
516
+ const shouldTrackPrefilledDetails = capabilities?.includes("receivePayments") && onboardingVersion && onboardingVersion > 1;
517
+ const sessionData = {
518
+ sdkVersion: "4.26.0-beta.0",
519
+ componentName,
520
+ userAgent: navigator.userAgent,
521
+ legalEntityId: rootLegalEntityId,
522
+ capabilities,
523
+ entityType: rootLegalEntity?.type,
524
+ eventData: shouldTrackPrefilledDetails ? getPrefilledDetails(rootLegalEntity) : void 0,
525
+ userData: {
526
+ onboardingVersion,
527
+ isDirectMerchant: settings.merchantType === "direct",
528
+ settings,
529
+ country: rootLegalEntity && getLegalEntityCountry(rootLegalEntity)
530
+ }
531
+ };
532
+ const { data } = useAnalyticsSession(sessionData, onboardingVersion);
533
+ userEvents.updateBaseTrackingPayload({ locale });
534
+ useAnalytics({
535
+ userEvents,
536
+ sessionId: data?.id,
537
+ sessionData
538
+ });
539
+ return /* @__PURE__ */ jsx(AnalyticsContext.Provider, {
540
+ value: userEvents,
541
+ children
542
+ });
543
+ };
544
+ //#endregion
545
+ //#region src/context/QueryContext/QueryClient.ts
546
+ var QueryClient$1 = new QueryClient({
547
+ defaultOptions: {
548
+ queries: {
549
+ staleTime: 3e5,
550
+ refetchOnWindowFocus: false,
551
+ refetchOnReconnect: true,
552
+ refetchOnMount: true,
553
+ retry: 2
554
+ },
555
+ mutations: { retry: 1 }
556
+ },
557
+ queryCache: new QueryCache({
558
+ onSuccess: (data, query) => {
559
+ if (query.meta?.onSuccess && typeof query.meta.onSuccess === "function") query.meta.onSuccess(data);
560
+ },
561
+ onError: (data, query) => {
562
+ if (query.meta?.onError && typeof query.meta.onError === "function") query.meta.onError(data);
563
+ }
564
+ })
565
+ });
566
+ //#endregion
567
+ //#region src/context/QueryContext/QueryClientProvider.tsx
568
+ /** Standard tanstack query provider, needed for it to work */
569
+ var QueryClientProvider$1 = ({ children }) => /* @__PURE__ */ jsx(QueryClientProvider, {
570
+ client: QueryClient$1,
571
+ children
572
+ });
573
+ //#endregion
574
+ //#region src/context/SettingsContext/SettingsProvider.tsx
575
+ var settingsDefaults = {
576
+ acceptedCountries: void 0,
577
+ allowBankAccountFormatSelection: false,
578
+ allowDebugUi: false,
579
+ allowIntraRegionCrossBorderPayout: false,
580
+ changeLegalEntityType: true,
581
+ editPrefilledCountry: true,
582
+ enableEInvoicingCodeField: false,
583
+ enableJapanLocalization: false,
584
+ requirePciSignEcomMoto: false,
585
+ requirePciSignEcommerce: false,
586
+ requirePciSignPos: false,
587
+ requirePciSignPosMoto: false,
588
+ hideOnboardingIntroductionIndividual: true,
589
+ hideOnboardingIntroductionOrganization: true,
590
+ hideOnboardingIntroductionTrust: true,
591
+ hideOnboardingIntroductionSoleProprietor: true,
592
+ hidePayoutAccountTask: false,
593
+ transferInstrumentLimit: 0,
594
+ instantBankVerification: true,
595
+ showServiceAgreementsFirst: false,
596
+ showBusinessFinancingFirst: false,
597
+ enforceLegalAge: false,
598
+ showExtraTaxExemptionReasons: false,
599
+ merchantType: void 0,
600
+ allowBusinessLines: false,
601
+ allowCrossBorderPayout: false
602
+ };
603
+ /**
604
+ * Consumers can pass settings @see settingsDefaults, which can alter on runtime
605
+ * the behaviour of our library
606
+ * The settings are dynamically passed during SDK initialization (same as legalEntityId)
607
+ * @param settings - dictionary of type Settings
608
+ */
609
+ function SettingsProvider({ children, settings }) {
610
+ const mergedSettings = {
611
+ ...settingsDefaults,
612
+ ...settings
613
+ };
614
+ const contextValue = useMemo$1(() => ({
615
+ isSettingEnabled: (settingName) => mergedSettings[settingName],
616
+ getSetting: (settingName) => mergedSettings[settingName],
617
+ settings: mergedSettings
618
+ }), [settings]);
619
+ return /* @__PURE__ */ jsx(SettingsContext.Provider, {
620
+ value: contextValue,
621
+ children
622
+ });
623
+ }
624
+ //#endregion
625
+ //#region src/context/StateContext/StateContext.ts
626
+ var StateContext = createContext$1(null);
627
+ //#endregion
628
+ //#region src/utils/validatorUtils.ts
629
+ var MAX_LENGTH = 30;
630
+ var getMaxLengthByFieldAndCountry = (formattingRules, field, country, ignoreIfFormatterExists) => {
631
+ if (!country) return void 0;
632
+ if (ignoreIfFormatterExists && formattingRules[country]?.[field]?.formatter) return;
633
+ return formattingRules[country]?.[field]?.maxlength || MAX_LENGTH;
634
+ };
635
+ var isUndefinedOrNull = (input) => input === void 0 || input === null;
636
+ var isEmpty = (input) => isUndefinedOrNull(input) || typeof input === "object" && Object.keys(input).length === 0 || typeof input === "string" && /^\s*$/.test(input);
637
+ var hasEmptyFields = (input) => input !== void 0 && (Object.keys(input).length === 0 || Object.values(input).some((value) => value === void 0 || value === null || value === ""));
638
+ var isAccountIdentifierObscured = (payload) => {
639
+ const accountIdentifier = payload?.type === "iban" ? payload.iban : payload?.accountNumber;
640
+ return Boolean(accountIdentifier) && accountIdentifier.includes("*");
641
+ };
642
+ var extractFieldName = (inputString) => {
643
+ const fieldNames = inputString?.split(".");
644
+ return fieldNames?.length > 0 ? fieldNames[fieldNames.length - 1] : "";
645
+ };
646
+ var concatenateFieldNames = (fieldNames) => fieldNames?.join(", ");
647
+ var isString = (input) => typeof input === "string" || input instanceof String;
648
+ var hasText = (input) => isString(input) && !isEmpty(input);
649
+ var SPECIAL_CHARS = "?\\-\\+_=!@#$%^&*(){}~<>\\[\\]\\/\\\\";
650
+ var getFormattingRegEx = (specChars, flags = "g") => new RegExp(`[${specChars}]`, flags);
651
+ var EMOJI_REGEX = /(\p{Emoji}\uFE0F|\p{Emoji_Presentation}|\p{Extended_Pictographic})/gu;
652
+ var NO_ALPHABET_REGEX = /^[^a-zA-Z]*$/;
653
+ var NO_ALPHABET_UNICODE_REGEX = /^[^\p{L}]*$/u;
654
+ var INDIVIDUAL_VALID_CHAR_REGEX = /^[\p{L}\p{M}\d\s\-—./']*$/u;
655
+ var ADDRESS_VALID_CHAR_REGEX = /^[\p{L}\p{M}\d\s\-—.,/']*$/u;
656
+ var OTHER_ENTITIES_VALID_CHAR_REGEX = /^[\w\s,.;:\-—&!?@()"'/\\+\p{L}\p{M}]+$/u;
657
+ var URL_REGEX = /^(https?:\/\/)\S+$/i;
658
+ var HAS_PROTOCOL_REGEX = /^https?:\/\//i;
659
+ var LATIN_SPACE_MARK_PUNCTUATION_NUMBERS_REGEX = /^[\p{sc=Latin}\p{Zs}\p{M}\p{Punctuation}\p{N}]+$/u;
660
+ var matchesRegex = (regex, input) => isString(input) && regex.test(input ?? "");
661
+ var hasRepeatedCharacters = (input) => !isEmpty(input) && input.length > 1 && new Set(input.toLowerCase()).size === 1;
662
+ var hasMaximumTwoRepeatedCharacters = (input) => !isEmpty(input) && input.length > 2 && new Set(input.toLowerCase()).size === 1;
663
+ var isValidMinLength = (input, minLength = 1) => !isEmpty(input) && input.length >= minLength;
664
+ var isInvalidName = (input) => {
665
+ return (/* @__PURE__ */ new Set([
666
+ "John Doe",
667
+ "Jane Doe",
668
+ "ABCD",
669
+ "ABCDE",
670
+ "ABCDEF",
671
+ "ABCDEFG",
672
+ "My Customer",
673
+ "An other",
674
+ "n/a",
675
+ "not applicable",
676
+ "n/A",
677
+ "N/A",
678
+ "N/a",
679
+ "N\\ /A",
680
+ "not app",
681
+ "null"
682
+ ])).has(input || "");
683
+ };
684
+ var standardKanjiValidator = (input) => {
685
+ const regex = /* @__PURE__ */ new RegExp("^[一-鿿㐀-䶿豈-﫿ぁ-ゖァ-ヺー-ヿ0-9A-Za-z・ー‐-−’,.& Ⅰ-Ⅺ・-゚A-Za-z0-9,.& ]+$");
686
+ return !isEmpty(input) && regex.test(input);
687
+ };
688
+ var standardKatakanaValidator = (input) => {
689
+ const regex = /* @__PURE__ */ new RegExp("^[ァ-ヶㇰ-ㇿA-Za-z0-9・ー‐-−’,.& Ⅰ-Ⅺ・-゚A-Za-z0-9 ,.& へべぺ]+$");
690
+ return !isEmpty(input) && regex.test(input);
691
+ };
692
+ var chomeAndBanchiValidator = (input) => {
693
+ const regex = /* @__PURE__ */ new RegExp("^([0-9]{1,4}-[0-9]{1,4}|[0-9]{1,4}-[0-9]{1,4}-[0-9]{1,4}|[0-9]{1,4}-[0-9]{1,4}-[0-9]{1,4}-[0-9]{1,4})$");
694
+ return !isEmpty(input) && regex.test(input);
695
+ };
696
+ function assertString(input) {
697
+ if (input === void 0 || input === null) throw new TypeError(`Expected a string but received a ${input}`);
698
+ if (input.constructor.name !== "String") throw new TypeError(`Expected a string but received a ${input.constructor.name}`);
699
+ }
700
+ var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;
701
+ function isISIN(str) {
702
+ assertString(str);
703
+ if (!isin.test(str)) return false;
704
+ let double = true;
705
+ let sum = 0;
706
+ for (let i = str.length - 2; i >= 0; i--) {
707
+ const char = str[i];
708
+ if (char >= "A" && char <= "Z") {
709
+ const value = char.charCodeAt(0) - 55;
710
+ const lo = value % 10;
711
+ const hi = Math.trunc(value / 10);
712
+ for (const digit of [lo, hi]) {
713
+ if (double) {
714
+ if (digit >= 5) sum += 1 + (digit - 5) * 2;
715
+ else sum += digit * 2;
716
+ } else sum += digit;
717
+ double = !double;
718
+ }
719
+ } else {
720
+ const digit = parseInt(char, 10);
721
+ if (double) {
722
+ if (digit >= 5) sum += 1 + (digit - 5) * 2;
723
+ else sum += digit * 2;
724
+ } else sum += digit;
725
+ double = !double;
726
+ }
727
+ }
728
+ const check = Math.trunc((sum + 9) / 10) * 10 - sum;
729
+ const lastChar = str[str.length - 1];
730
+ if (lastChar === void 0 || isNaN(parseInt(lastChar, 10))) return false;
731
+ return parseInt(lastChar, 10) === check;
732
+ }
733
+ //#endregion
734
+ //#region src/utils/removeObjectEmptyValues.ts
735
+ function removeObjectPropsWithEmptyValues(obj) {
736
+ keysOf(obj).forEach((key) => {
737
+ if (obj[key] === null || isEmpty(obj[key])) delete obj[key];
738
+ });
739
+ return obj;
740
+ }
741
+ //#endregion
742
+ //#region src/context/StateContext/StateReducer.ts
743
+ var INITIAL_STATE = {
744
+ data: {},
745
+ allData: {},
746
+ initialData: {},
747
+ errors: {},
748
+ valid: {},
749
+ fieldProblems: {},
750
+ isValid: false,
751
+ allValid: false
752
+ };
753
+ var logger$3 = createLogger();
754
+ function StateReducer() {
755
+ const [schemas, setSchemas] = useState$1({});
756
+ const [activeForms, setActiveForms] = useState$1([]);
757
+ const setCurrentForms = (forms) => {
758
+ setActiveForms(forms);
759
+ };
760
+ function reducer({ currentState: currState, prevState }, action) {
761
+ switch (action.type) {
762
+ case "addToState": {
763
+ if (!action.value.dataStoreId) {
764
+ logger$3.warn("No dataStoreId provided, hence no update can be done");
765
+ return {
766
+ currentState: currState,
767
+ prevState
768
+ };
769
+ }
770
+ const dataStoreId = action.value.dataStoreId;
771
+ const state = structuredClone(currState);
772
+ const schema = action.value.schema || null;
773
+ const schemaHasChanged = schema && schemas?.[dataStoreId]?.toString() !== schema.toString();
774
+ const mergedState = {
775
+ ...state,
776
+ data: {
777
+ ...state.data,
778
+ [dataStoreId]: {
779
+ ...state.data[dataStoreId],
780
+ ...action.value.data
781
+ }
782
+ },
783
+ allData: {
784
+ ...state.allData,
785
+ [dataStoreId]: {
786
+ ...state.allData[dataStoreId],
787
+ ...removeObjectPropsWithEmptyValues(action.value.data)
788
+ }
789
+ },
790
+ errors: {
791
+ ...state.errors,
792
+ [dataStoreId]: {
793
+ ...state.errors[dataStoreId],
794
+ ...action.value.errors
795
+ }
796
+ },
797
+ valid: {
798
+ ...state.valid,
799
+ [dataStoreId]: {
800
+ ...state.valid[dataStoreId],
801
+ ...action.value.valid
802
+ }
803
+ },
804
+ fieldProblems: {
805
+ ...state.fieldProblems,
806
+ [dataStoreId]: {
807
+ ...state.fieldProblems[dataStoreId],
808
+ ...action.value.fieldProblems
809
+ }
810
+ }
811
+ };
812
+ /**
813
+ * Some components e.g. personalDetails, are parents for other components and the data from these children is collected
814
+ * under the parent's id (aka dataStoreId) i.e. 'personalDetails.
815
+ *
816
+ * With these parents sometimes their schema for their useForm implementation updates at run time - so this fny checks
817
+ * if a schema has changed and if so ensures that the keys output in the data, valid, errors, fieldProblems objects
818
+ * match those of the parent schema
819
+ */
820
+ if (schemaHasChanged) {
821
+ setSchemas({
822
+ ...schemas,
823
+ [dataStoreId]: schema
824
+ });
825
+ const processedBySchema = schema.reduce((acc, fieldKey) => {
826
+ const dataObjByFormId = mergedState.data[dataStoreId];
827
+ const allDataObjByFormId = mergedState.allData[dataStoreId];
828
+ const validObjByFormId = mergedState.valid[dataStoreId];
829
+ const errorsObjByFormId = mergedState.errors[dataStoreId];
830
+ const fieldProblemsObjByFormId = mergedState.fieldProblems[dataStoreId];
831
+ return {
832
+ data: {
833
+ ...acc.data,
834
+ [fieldKey]: dataObjByFormId[fieldKey] ?? allDataObjByFormId[fieldKey]
835
+ },
836
+ valid: {
837
+ ...acc.valid,
838
+ [fieldKey]: validObjByFormId[fieldKey]
839
+ },
840
+ errors: {
841
+ ...acc.errors,
842
+ [fieldKey]: errorsObjByFormId[fieldKey]
843
+ },
844
+ fieldProblems: {
845
+ ...acc.fieldProblems,
846
+ [fieldKey]: fieldProblemsObjByFormId[fieldKey]
847
+ }
848
+ };
849
+ }, {
850
+ data: {},
851
+ valid: {},
852
+ errors: {},
853
+ fieldProblems: {}
854
+ });
855
+ mergedState.data[dataStoreId] = processedBySchema.data;
856
+ mergedState.valid[dataStoreId] = processedBySchema.valid;
857
+ mergedState.errors[dataStoreId] = processedBySchema.errors;
858
+ mergedState.fieldProblems[dataStoreId] = processedBySchema.fieldProblems;
859
+ }
860
+ mergedState.validityByForm = {
861
+ ...mergedState.validityByForm,
862
+ [dataStoreId]: Object.values(mergedState.valid[dataStoreId]).every((isValid) => isValid)
863
+ };
864
+ mergedState.allValid = Object.values(mergedState.validityByForm).every((isValid) => isValid);
865
+ mergedState.isValid = !activeForms.length ? mergedState.allValid : activeForms.every((item) => mergedState.validityByForm?.[item]);
866
+ mergedState.initialData = structuredClone(state.initialData);
867
+ return {
868
+ currentState: mergedState,
869
+ prevState: state
870
+ };
871
+ }
872
+ case "removeFromState": {
873
+ if (!action.value.dataStoreId) {
874
+ logger$3.warn("No dataStoreId provided, hence no update can be done");
875
+ return {
876
+ currentState: currState,
877
+ prevState
878
+ };
879
+ }
880
+ const dataStoreId = action.value.dataStoreId;
881
+ const state = structuredClone(currState);
882
+ const mergedState = {
883
+ ...state,
884
+ data: {
885
+ ...state.data,
886
+ [dataStoreId]: {}
887
+ },
888
+ allData: {
889
+ ...state.allData,
890
+ [dataStoreId]: {}
891
+ },
892
+ errors: {
893
+ ...state.errors,
894
+ [dataStoreId]: {}
895
+ },
896
+ valid: {
897
+ ...state.valid,
898
+ [dataStoreId]: false
899
+ },
900
+ fieldProblems: {
901
+ ...state.fieldProblems,
902
+ [dataStoreId]: {}
903
+ }
904
+ };
905
+ mergedState.validityByForm = {
906
+ ...mergedState.validityByForm,
907
+ [dataStoreId]: false
908
+ };
909
+ mergedState.allValid = Object.values(mergedState.validityByForm).every((isValid) => isValid);
910
+ mergedState.isValid = !activeForms.length ? mergedState.allValid : activeForms.every((item) => mergedState.validityByForm?.[item]);
911
+ mergedState.initialData = structuredClone(state.initialData);
912
+ return {
913
+ currentState: mergedState,
914
+ prevState: state
915
+ };
916
+ }
917
+ case "resetState": return {
918
+ currentState: INITIAL_STATE,
919
+ prevState: currState
920
+ };
921
+ default: throw new Error(`Unhandled action type: ${action.type}`);
922
+ }
923
+ }
924
+ return {
925
+ reducer,
926
+ setCurrentForms
927
+ };
928
+ }
929
+ //#endregion
930
+ //#region src/context/StateContext/StateProvider.tsx
931
+ function StateProvider({ defaultData = {}, children }) {
932
+ const defaultState = {
933
+ currentState: {
934
+ data: defaultData,
935
+ allData: defaultData,
936
+ valid: {},
937
+ errors: {},
938
+ fieldProblems: {},
939
+ validityByForm: {},
940
+ initialData: defaultData
941
+ },
942
+ prevState: {}
943
+ };
944
+ const reducerObj = StateReducer();
945
+ const [state, dispatch] = useReducer(reducerObj.reducer, defaultState);
946
+ /**
947
+ * Create an object from the returned reducer props
948
+ * - the state property in this object will be available to any handler functions set on StateContextWatcher
949
+ * - the dispatch property is made available to the StateContextSetter
950
+ */
951
+ const contextValue = useMemo$1(() => ({
952
+ state,
953
+ dispatch,
954
+ setActiveForms: reducerObj.setCurrentForms,
955
+ getData: () => state?.currentState?.data ?? {},
956
+ getState: () => state?.currentState
957
+ }), [reducerObj, state]);
958
+ return /* @__PURE__ */ jsx(StateContext.Provider, {
959
+ value: contextValue,
960
+ children
961
+ });
962
+ }
963
+ var Toast_module_default = {
964
+ toast: "_toast_5bwuk_1",
965
+ "present-toast": "_present-toast_5bwuk_1",
966
+ presentToast: "_present-toast_5bwuk_1",
967
+ "toast-image": "_toast-image_5bwuk_22",
968
+ toastImage: "_toast-image_5bwuk_22",
969
+ "toast-image-success": "_toast-image-success_5bwuk_32",
970
+ toastImageSuccess: "_toast-image-success_5bwuk_32",
971
+ "toast-image-error": "_toast-image-error_5bwuk_37",
972
+ toastImageError: "_toast-image-error_5bwuk_37",
973
+ "toast-label": "_toast-label_5bwuk_42",
974
+ toastLabel: "_toast-label_5bwuk_42",
975
+ "toast-actions": "_toast-actions_5bwuk_55",
976
+ toastActions: "_toast-actions_5bwuk_55",
977
+ "toast-action-close": "_toast-action-close_5bwuk_64",
978
+ toastActionClose: "_toast-action-close_5bwuk_64"
979
+ };
980
+ //#endregion
981
+ //#region src/components/ui/molecules/Toast/Toast.tsx
982
+ var Toast = ({ action, duration = 1e4, label, onDismiss, variant = "info" }) => {
983
+ const hasIcon = variant === "success" || variant === "error";
984
+ const hasAction = action !== void 0;
985
+ const role = hasAction ? "alertdialog" : "alert";
986
+ const iconNames = {
987
+ error: "field-error",
988
+ success: "checkmark"
989
+ };
990
+ const imageClassname = cx(Toast_module_default.toastImage, {
991
+ [Toast_module_default.toastImageSuccess]: variant === "success",
992
+ [Toast_module_default.toastImageError]: variant === "error"
993
+ });
994
+ useEffect$1(() => {
995
+ let dismissToastTimer;
996
+ if (duration !== "indefinite") dismissToastTimer = setTimeout(() => {
997
+ onDismiss();
998
+ }, duration);
999
+ return () => {
1000
+ clearTimeout(dismissToastTimer);
1001
+ };
1002
+ }, [duration, onDismiss]);
1003
+ return /* @__PURE__ */ jsxs("div", {
1004
+ "aria-label": label,
1005
+ className: Toast_module_default.toast,
1006
+ role,
1007
+ children: [/* @__PURE__ */ jsxs("div", {
1008
+ className: Toast_module_default.toastLabel,
1009
+ children: [hasIcon && /* @__PURE__ */ jsx("div", {
1010
+ className: imageClassname,
1011
+ "data-testId": iconNames[variant],
1012
+ children: /* @__PURE__ */ jsx(Icon, { name: iconNames[variant] })
1013
+ }), label]
1014
+ }), /* @__PURE__ */ jsxs("div", {
1015
+ className: Toast_module_default.toastActions,
1016
+ children: [hasAction && /* @__PURE__ */ jsx(Button, {
1017
+ onClick: action.onClick,
1018
+ children: action.label
1019
+ }), /* @__PURE__ */ jsx("div", {
1020
+ className: Toast_module_default.toastActionClose,
1021
+ children: /* @__PURE__ */ jsx(IconButton, {
1022
+ icon: "cross",
1023
+ ariaLabel: "Close",
1024
+ onClick: onDismiss
1025
+ })
1026
+ })]
1027
+ })]
1028
+ });
1029
+ };
1030
+ //#endregion
1031
+ //#region src/context/ToastContext/ToastContext.ts
1032
+ var ToastContext = createContext$1({
1033
+ showToast: noop,
1034
+ clearToasts: noop
1035
+ });
1036
+ //#endregion
1037
+ //#region src/context/ToastContext/ToastContextProvider.tsx
1038
+ function ToastContextProvider({ children }) {
1039
+ const [toastOptions, setToastOptions] = useState$1();
1040
+ const clearToasts = () => {
1041
+ setToastOptions(void 0);
1042
+ };
1043
+ const contextValue = useMemo$1(() => ({
1044
+ showToast: (options) => {
1045
+ setToastOptions(options);
1046
+ },
1047
+ clearToasts
1048
+ }), []);
1049
+ return /* @__PURE__ */ jsxs(ToastContext.Provider, {
1050
+ value: contextValue,
1051
+ children: [!!toastOptions && /* @__PURE__ */ jsx(Toast, {
1052
+ label: toastOptions.label,
1053
+ variant: toastOptions.variant,
1054
+ action: toastOptions.action,
1055
+ duration: toastOptions.duration,
1056
+ onDismiss: clearToasts
1057
+ }), children]
1058
+ });
1059
+ }
1060
+ //#endregion
1061
+ //#region src/api/toggles/useToggles.ts
1062
+ /**
1063
+ * Retrieves experiments and onboardingcomponents-specific feature flags
1064
+ * as defined in `OnboardingcomponentsFeatures.java` linked to the legalEntityId
1065
+ */
1066
+ var getToggles = async (legalEntityId, baseUrl) => {
1067
+ const { experiments, features } = await httpGet({
1068
+ baseUrl,
1069
+ path: `legalEntities/${legalEntityId}/flags`
1070
+ });
1071
+ return {
1072
+ experiments: experiments ? Object.values(experiments).reduce((acc, val) => {
1073
+ return {
1074
+ ...acc,
1075
+ [val]: true
1076
+ };
1077
+ }, {}) : {},
1078
+ features
1079
+ };
1080
+ };
1081
+ var useToggles = (options) => {
1082
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1083
+ return useQuery({
1084
+ queryKey: ["toggles"],
1085
+ queryFn: () => getToggles(rootLegalEntityId.value, baseUrl.value),
1086
+ ...options
1087
+ });
1088
+ };
1089
+ //#endregion
1090
+ //#region src/utils/listToRecord.ts
1091
+ var listToRecord = (list, getValue) => list.reduce((acc, k) => ({
1092
+ ...acc,
1093
+ [k]: getValue(k)
1094
+ }), {});
1095
+ //#endregion
1096
+ //#region src/context/ToggleContext/ToggleContext.tsx
1097
+ var ToggleContext = createContext$1({
1098
+ features: {},
1099
+ isFeatureEnabled: () => false,
1100
+ experiments: {},
1101
+ isExperimentEnabled: () => false,
1102
+ refreshExperiments: () => {}
1103
+ });
1104
+ //#endregion
1105
+ //#region src/context/ToggleContext/types.ts
1106
+ /**
1107
+ * Features which are passed into our SDK via a prop (ex. `adyen-onboarding.tsx` or `EmbedShell.tsx`)
1108
+ * These are enabled/disabled via our feature framework and are intended to be short-lived. Used for feature rollout purposes.
1109
+ */
1110
+ var PropFeatureNames = {
1111
+ /**
1112
+ * Old features
1113
+ */
1114
+ AllowMoreRolesForMainRootTrustee: "AllowMoreRolesForMainRootTrustee",
1115
+ EnablePhoneFieldScenario: "EnablePhoneFieldScenario",
1116
+ ShowUnsupportedEntityType: "ShowUnsupportedEntityType"
1117
+ };
1118
+ /**
1119
+ * Features which are returned from a call made to onboardingcomponents for feature flags and experiments (see `useToggles`).
1120
+ * These are enabled/disabled via our feature framework and are intended to be short-lived. Used for feature rollout purposes.
1121
+ * Defined in the BE (`OnboardingcomponentsFeatures.java`).
1122
+ */
1123
+ var FeatureFrameworkFeatureNames = {
1124
+ /**
1125
+ * OXP-6596: Enable Bank Document Classification in HO
1126
+ */
1127
+ EnableBankDocumentClassification: "EnableBankDocumentClassification",
1128
+ /**
1129
+ * OXP-6596: Enable Bank Document Classification in ShadowMode in HO
1130
+ */
1131
+ EnableBankDocumentClassificationShadowMode: "EnableBankDocumentClassificationShadowMode",
1132
+ /**
1133
+ * OXP-6032: Enable editing a single business line
1134
+ */
1135
+ EnableDeleteBusinessLines: "EnableDeleteBusinessLines",
1136
+ /**
1137
+ * OXP-6799: Enable limit to a single business line
1138
+ */
1139
+ EnableLimitToSingleBusinessLine: "EnableLimitToSingleBusinessLine",
1140
+ /**
1141
+ * OXP-6032: Enable editing a single business line
1142
+ */
1143
+ EnableModifyBusinessLines: "EnableModifyBusinessLines",
1144
+ /**
1145
+ * Enable "Verify by Invite" flow for decision makers in Identity Verification
1146
+ */
1147
+ EnableVerifyByInvite: "EnableVerifyByInvite",
1148
+ /**
1149
+ OXP-6566: Create new payout intro screen
1150
+ */
1151
+ EnableBankAccountDetailsLandingPage: "EnableBankAccountDetailsLandingPage",
1152
+ /**
1153
+ Enable AWE generated UI for PoC
1154
+ */
1155
+ EnableAdaptivePoc: "EnableAdaptivePoc",
1156
+ /**
1157
+ * OXP-7774: Enable LEI field in Business Details Task
1158
+ */
1159
+ EnableLegalEntityIdentifierField: "EnableLegalEntityIdentifierField",
1160
+ /**
1161
+ * OXP-7836: Enable bank account type selection for US payout details
1162
+ */
1163
+ EnableUSBankAccountTypeSelection: "EnableUSBankAccountTypeSelection",
1164
+ /**
1165
+ * Enable Singpass MyInfo login for the individual flow. When disabled, individual legal entities
1166
+ * are not eligible for Singpass, all other flows keep their existing eligibility
1167
+ */
1168
+ SingpassMyInfoEnabled: "SingpassMyInfoEnabled"
1169
+ };
1170
+ /**
1171
+ * Features which are returned from a call made to onboardingcomponents for version-specific features. (see `useVersions`).
1172
+ * Version specific features are tied to the specific onboarding/LEM version (ex. v4-specific features) rather than for feature rollout purposes.
1173
+ * Defined in the BE (`VersionSpecificToggle.java`).
1174
+ */
1175
+ var VersionFeatureNames = {
1176
+ /**
1177
+ *
1178
+ */
1179
+ EnableAgeVerification: "EnableAgeVerification",
1180
+ /**
1181
+ * Allows users to specify a 'Country of Governing Law' for UK companies
1182
+ * within Business Details Task
1183
+ */
1184
+ EnableCountryOfGoverningLawForUKCompanies: "EnableCountryOfGoverningLawForUKCompanies",
1185
+ /**
1186
+ *
1187
+ */
1188
+ EnableDoingBusinessAsNameV4: "EnableDoingBusinessAsNameV4",
1189
+ /**
1190
+ *
1191
+ */
1192
+ EnableFinancialInformationComponentV4: "EnableFinancialInformationComponentV4",
1193
+ /**
1194
+ *
1195
+ */
1196
+ EnableNationalitySGHK: "EnableNationalitySGHK",
1197
+ /**
1198
+ *
1199
+ */
1200
+ EnableRegistrationAndTaxAbsentStatesV4: "EnableRegistrationAndTaxAbsentStatesV4",
1201
+ /**
1202
+ * OXP-7814: Allows businesses to declare that their registered business address
1203
+ * is a personal address or PO box
1204
+ */
1205
+ EnableResidentialAddressIndicator: "EnableResidentialAddressIndicator",
1206
+ /**
1207
+ *
1208
+ */
1209
+ ShowCustomerSupportV4: "ShowCustomerSupportV4",
1210
+ /**
1211
+ *
1212
+ */
1213
+ StrictNameAndAddressValidationV4: "StrictNameAndAddressValidationV4",
1214
+ /**
1215
+ * OXP-7861: Enable Global Entry Flow
1216
+ */
1217
+ EnableGlobalEntryFlow: "EnableGlobalEntryFlow"
1218
+ };
1219
+ /**
1220
+ * Experiments which are returned from a call made to onboardingcomponents for feature flags and experiments (see `useToggles`).
1221
+ * Experiments are used to toggle behavior for A/B testing purposes.
1222
+ * Defined using the Experimentation Platform in BO.
1223
+ *
1224
+ * Naming convention: `${ExperimentName}_${TreatmentGroupNameOrControl}` ex. `BankingVerificationExperiment_Treatment1` or `BusinessSearchExperiment_control`
1225
+ */
1226
+ var ExperimentNames = {
1227
+ /**
1228
+ * OXP-7319: Experiment with Forced Manual Payout Flow
1229
+ */
1230
+ BankingPayoutFlow_ForcedManualVerification: "BankingPayoutFlow_ForcedManualVerification",
1231
+ /**
1232
+ * Test a clearer remediation message when a bank document needs review.
1233
+ */
1234
+ BankDocumentClassification_WarningMessaging: "BankDocumentClassification_WarningMessaging"
1235
+ };
1236
+ var FeatureNames = {
1237
+ ...PropFeatureNames,
1238
+ ...FeatureFrameworkFeatureNames,
1239
+ ...VersionFeatureNames
1240
+ };
1241
+ //#endregion
1242
+ //#region src/context/ToggleContext/ToggleContextProvider.tsx
1243
+ /**
1244
+ * To manage accessing non-production-ready features of SDK
1245
+ * or features under active experimentation/testing.
1246
+ * @param children - components rendered
1247
+ * @param features - dictionary of type Features
1248
+ * @param refreshExperiments - handler to refresh experiments for the legal entity
1249
+ */
1250
+ function ToggleContextProvider({ children, features: propFeatures, refreshExperiments }) {
1251
+ const { data: toggleData } = useToggles();
1252
+ const { data: versionData } = useVersionConfiguration();
1253
+ const features = useMemo$1(() => ({
1254
+ ...toggleData?.features,
1255
+ ...propFeatures,
1256
+ ...listToRecord(versionData?.features ?? [], () => true)
1257
+ }), [
1258
+ versionData,
1259
+ propFeatures,
1260
+ toggleData?.features
1261
+ ]);
1262
+ const experiments = useMemo$1(() => ({
1263
+ ...listToRecord(valuesOf(ExperimentNames), (experiment) => propFeatures[experiment] ?? false),
1264
+ ...toggleData?.experiments
1265
+ }), [propFeatures, toggleData?.experiments]);
1266
+ const contextValue = useMemo$1(() => ({
1267
+ features,
1268
+ isFeatureEnabled: (feature) => features[feature] ?? false,
1269
+ experiments,
1270
+ isExperimentEnabled: (experiment) => experiments[experiment] ?? false,
1271
+ refreshExperiments
1272
+ }), [
1273
+ features,
1274
+ experiments,
1275
+ refreshExperiments
1276
+ ]);
1277
+ return /* @__PURE__ */ jsx(ToggleContext.Provider, {
1278
+ value: contextValue,
1279
+ children
1280
+ });
1281
+ }
1282
+ //#endregion
1283
+ //#region \0rolldown_dynamic_import_helper.js
1284
+ var _rolldown_dynamic_import_helper_default = (glob, path, segments) => {
1285
+ const query = path.lastIndexOf("?");
1286
+ const v = glob[query === -1 || query < path.lastIndexOf("/") ? path : path.slice(0, query)];
1287
+ if (v) return typeof v === "function" ? v() : Promise.resolve(v);
1288
+ return new Promise((_, reject) => {
1289
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + path + (path.split("/").length !== segments ? ". Note that variables only represent file names one level deep." : ""))));
1290
+ });
1291
+ };
1292
+ var Header_module_default = {
1293
+ header: "_header_15umz_1",
1294
+ "header-margin": "_header-margin_15umz_7",
1295
+ headerMargin: "_header-margin_15umz_7",
1296
+ "header-margin-secondary": "_header-margin-secondary_15umz_11",
1297
+ headerMarginSecondary: "_header-margin-secondary_15umz_11",
1298
+ "header-left": "_header-left_15umz_15",
1299
+ headerLeft: "_header-left_15umz_15",
1300
+ "header-center": "_header-center_15umz_20",
1301
+ headerCenter: "_header-center_15umz_20",
1302
+ "header-right": "_header-right_15umz_25",
1303
+ headerRight: "_header-right_15umz_25",
1304
+ "header-content": "_header-content_15umz_30",
1305
+ headerContent: "_header-content_15umz_30",
1306
+ "header-actions": "_header-actions_15umz_36",
1307
+ headerActions: "_header-actions_15umz_36",
1308
+ "header-title": "_header-title_15umz_40",
1309
+ headerTitle: "_header-title_15umz_40",
1310
+ "header-title-primary": "_header-title-primary_15umz_45",
1311
+ headerTitlePrimary: "_header-title-primary_15umz_45",
1312
+ "header-title-secondary": "_header-title-secondary_15umz_52",
1313
+ headerTitleSecondary: "_header-title-secondary_15umz_52",
1314
+ "header-description": "_header-description_15umz_58",
1315
+ headerDescription: "_header-description_15umz_58",
1316
+ "header-description-primary": "_header-description-primary_15umz_65",
1317
+ headerDescriptionPrimary: "_header-description-primary_15umz_65",
1318
+ "header-description-secondary": "_header-description-secondary_15umz_69",
1319
+ headerDescriptionSecondary: "_header-description-secondary_15umz_69"
1320
+ };
1321
+ //#endregion
1322
+ //#region src/components/ui/atoms/Header/Header.tsx
1323
+ var alignmentStyles = {
1324
+ left: Header_module_default.headerLeft,
1325
+ center: Header_module_default.headerCenter,
1326
+ right: Header_module_default.headerRight
1327
+ };
1328
+ var Header = ({ align = "left", children, description, secondary = false, status, title }) => {
1329
+ const { Slot, hasSlot } = defineSlots(children ?? [], ["actions", "description"]);
1330
+ const HeadingElement = secondary ? "h2" : "h1";
1331
+ const rootClassname = cx(Header_module_default.header, alignmentStyles[align], {
1332
+ [Header_module_default.headerMargin]: !secondary,
1333
+ [Header_module_default.headerMarginSecondary]: secondary
1334
+ });
1335
+ const titleClassname = cx(Header_module_default.headerTitle, {
1336
+ [Header_module_default.headerTitlePrimary]: !secondary,
1337
+ [Header_module_default.headerTitleSecondary]: secondary
1338
+ });
1339
+ const descriptionClassname = cx(Header_module_default.headerDescription, {
1340
+ [Header_module_default.headerDescriptionPrimary]: !secondary,
1341
+ [Header_module_default.headerDescriptionSecondary]: secondary
1342
+ });
1343
+ return /* @__PURE__ */ jsxs("header", {
1344
+ className: rootClassname,
1345
+ children: [
1346
+ status && /* @__PURE__ */ jsx(TaskVerificationStatus, {
1347
+ status,
1348
+ responsive: false
1349
+ }),
1350
+ /* @__PURE__ */ jsxs("div", {
1351
+ className: Header_module_default.headerContent,
1352
+ children: [/* @__PURE__ */ jsx(HeadingElement, {
1353
+ className: titleClassname,
1354
+ children: title
1355
+ }), (hasSlot("description") || description) && /* @__PURE__ */ jsx("div", {
1356
+ className: descriptionClassname,
1357
+ children: /* @__PURE__ */ jsx(Slot, {
1358
+ name: "description",
1359
+ children: description
1360
+ })
1361
+ })]
1362
+ }),
1363
+ hasSlot("actions") && /* @__PURE__ */ jsx("div", {
1364
+ className: Header_module_default.headerActions,
1365
+ children: /* @__PURE__ */ jsx(StackLayout, {
1366
+ gap: "small",
1367
+ horizontal: true,
1368
+ children: /* @__PURE__ */ jsx(Slot, { name: "actions" })
1369
+ })
1370
+ })
1371
+ ]
1372
+ });
1373
+ };
1374
+ //#endregion
1375
+ //#region src/api/configurations/useSupportedCountries.ts
1376
+ /**
1377
+ * Retrieves from the backend information about supported countries
1378
+ * linked to the legalEntityId
1379
+ *
1380
+ * @param id legalEntityId
1381
+ * @param options additional options passed to Tanstack Query, eg; refetchInterval for polling
1382
+ */
1383
+ var getSupportedCountries = async (legalEntityId, baseUrl) => {
1384
+ return httpGet({
1385
+ baseUrl,
1386
+ path: `legalEntities/${legalEntityId}/configurations/supportedCountries`
1387
+ });
1388
+ };
1389
+ var useSupportedCountries = (options) => {
1390
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1391
+ return useQuery({
1392
+ queryKey: ["supportedCountries"],
1393
+ queryFn: () => getSupportedCountries(rootLegalEntityId.value, baseUrl.value),
1394
+ ...options
1395
+ });
1396
+ };
1397
+ //#endregion
1398
+ //#region src/context/SettingsContext/useSetting.ts
1399
+ var useSetting = (settingName) => {
1400
+ const { getSetting } = useContext$1(SettingsContext);
1401
+ return getSetting(settingName);
1402
+ };
1403
+ //#endregion
1404
+ //#region src/utils/api/useCapabilities.ts
1405
+ var useCapabilities = () => {
1406
+ const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
1407
+ return rootLegalEntity?.capabilities;
1408
+ };
1409
+ //#endregion
1410
+ //#region src/hooks/useAllowedCountries.ts
1411
+ var businessAccountCountries = [
1412
+ CountryCodes.Austria,
1413
+ CountryCodes.Belgium,
1414
+ CountryCodes.Croatia,
1415
+ CountryCodes.Cyprus,
1416
+ CountryCodes.Estonia,
1417
+ CountryCodes.Finland,
1418
+ CountryCodes.France,
1419
+ CountryCodes.Germany,
1420
+ CountryCodes.Greece,
1421
+ CountryCodes.Ireland,
1422
+ CountryCodes.Italy,
1423
+ CountryCodes.Latvia,
1424
+ CountryCodes.Lithuania,
1425
+ CountryCodes.Luxembourg,
1426
+ CountryCodes.Malta,
1427
+ CountryCodes.Netherlands,
1428
+ CountryCodes.Portugal,
1429
+ CountryCodes.Slovakia,
1430
+ CountryCodes.Slovenia,
1431
+ CountryCodes.Spain,
1432
+ CountryCodes.UnitedKingdom,
1433
+ CountryCodes.UnitedStates
1434
+ ];
1435
+ var useAllowedCountries = () => {
1436
+ const isLimitCountryBusinessAccountCustomersEnabled = Object.keys(useCapabilities() ?? {}).includes("issueBankAccount");
1437
+ const acceptedCountriesSetting = useSetting("acceptedCountries");
1438
+ const { data } = useSupportedCountries({ enabled: !acceptedCountriesSetting });
1439
+ const allowedCountries = acceptedCountriesSetting ?? data?.countries;
1440
+ if (!allowedCountries) return;
1441
+ return isLimitCountryBusinessAccountCustomersEnabled ? businessAccountCountries.filter((country) => allowedCountries.includes(country)) : allowedCountries;
1442
+ };
1443
+ //#endregion
1444
+ //#region src/datasets/generators/loadCountries.ts
1445
+ var logger$2 = createLogger();
1446
+ var countriesImports = /* #__PURE__ */ Object.assign({
1447
+ "../countries/de-DE.json": () => import("./de-DE-DY_EJohI.js"),
1448
+ "../countries/el-GR.json": () => import("./el-GR-zFv0QxMR.js"),
1449
+ "../countries/en-US.json": () => import("./en-US-CI7y0UEH.js"),
1450
+ "../countries/es-ES.json": () => import("./es-ES-BdByhG4y.js"),
1451
+ "../countries/fr-FR.json": () => import("./fr-FR-Doo1FVx-.js"),
1452
+ "../countries/it-IT.json": () => import("./it-IT-BFIW0DCO.js"),
1453
+ "../countries/ja-JP.json": () => import("./ja-JP-DOuEAOlh.js"),
1454
+ "../countries/nl-NL.json": () => import("./nl-NL-BUwMAW5C.js"),
1455
+ "../countries/pt-PT.json": () => import("./pt-PT-Du2K44jh.js"),
1456
+ "../countries/sv-SE.json": () => import("./sv-SE-DESDUMyu.js")
1457
+ });
1458
+ var loadCountriesDataset = async (locale) => {
1459
+ const importForLocale = countriesImports[`../countries/${locale}.json`];
1460
+ if (!importForLocale) {
1461
+ logger$2.warn(`No countries dataset for ${locale}, falling back to en-US`);
1462
+ return (await import("./en-US-CI7y0UEH.js")).default;
1463
+ }
1464
+ return (await importForLocale()).default;
1465
+ };
1466
+ //#endregion
1467
+ //#region src/datasets/generators/loadStatesDataset.ts
1468
+ var logger$1 = createLogger();
1469
+ var statesImports = /* #__PURE__ */ Object.assign({
1470
+ "../states/AU/en-US.json": () => import("./en-US-CRoNUEFi.js"),
1471
+ "../states/BR/en-US.json": () => import("./en-US-C6sEvgbn.js"),
1472
+ "../states/BR/pt-BR.json": () => import("./pt-BR-C3I_7Mcz.js"),
1473
+ "../states/CA/en-US.json": () => import("./en-US-D0pPfuzx.js"),
1474
+ "../states/JP/en-US.json": () => import("./en-US-BqvVH-Pi.js"),
1475
+ "../states/JP/ja-JP.json": () => import("./ja-JP-eKLuhutG.js"),
1476
+ "../states/NZ/en-US.json": () => import("./en-US-KKriaTJw.js"),
1477
+ "../states/US/en-US.json": () => import("./en-US-t-Z87qeJ.js")
1478
+ });
1479
+ var loadStatesDataset = async (country, locale) => {
1480
+ const importForLocale = statesImports[`../states/${country}/${locale}.json`];
1481
+ if (!importForLocale) {
1482
+ logger$1.warn(`No ${country} states dataset for ${locale}, falling back to en-US`);
1483
+ const fallbackImport = statesImports[`../states/${country}/en-US.json`];
1484
+ return (await fallbackImport()).default;
1485
+ }
1486
+ return (await importForLocale()).default;
1487
+ };
1488
+ //#endregion
1489
+ //#region src/utils/datasetUtil.ts
1490
+ var normalizedDatasets = {};
1491
+ var datasets = {};
1492
+ var createDatasetKey = (identifier, locale) => `${identifier}_${locale}`.toLowerCase();
1493
+ var getNormalizeDataset = (datasetKey) => {
1494
+ if (!normalizedDatasets[datasetKey]) {
1495
+ normalizedDatasets[datasetKey] = {};
1496
+ datasets[datasetKey].forEach(({ id, name }) => {
1497
+ normalizedDatasets[datasetKey][id] = name;
1498
+ });
1499
+ }
1500
+ return normalizedDatasets[datasetKey];
1501
+ };
1502
+ var getDataName = (datasetKey, key) => {
1503
+ if (datasets[datasetKey]) return getNormalizeDataset(datasetKey)[key];
1504
+ return null;
1505
+ };
1506
+ var datasetIdentifier = {
1507
+ country: "countries",
1508
+ state: (countryCode) => `states/${countryCode}`
1509
+ };
1510
+ function datasetUtilities(locale) {
1511
+ return {
1512
+ getCountryName: (countryCode) => {
1513
+ if (!countryCode) return null;
1514
+ return getDataName(createDatasetKey(datasetIdentifier.country, locale), countryCode);
1515
+ },
1516
+ getStateName: (stateCode, countryCode) => {
1517
+ return getDataName(createDatasetKey(datasetIdentifier.state(countryCode), locale), stateCode);
1518
+ },
1519
+ setDataset: (identifier, dataset) => {
1520
+ const datasetKey = createDatasetKey(identifier, locale);
1521
+ datasets[datasetKey] = dataset;
1522
+ },
1523
+ getDataset: (identifier) => {
1524
+ return datasets[createDatasetKey(identifier, locale)];
1525
+ },
1526
+ getDatasetKey: (identifier) => createDatasetKey(identifier, locale)
1527
+ };
1528
+ }
1529
+ //#endregion
1530
+ //#region src/core/services/agnostic/get-dataset.ts
1531
+ var loadDataset = async (identifier, locale) => {
1532
+ if (identifier === datasetIdentifier.country) return loadCountriesDataset(locale);
1533
+ if (identifier.startsWith("states")) return loadStatesDataset(identifier.slice(identifier.indexOf("/") + 1), locale);
1534
+ throw new Error(`Unknown dataset: ${identifier}`);
1535
+ };
1536
+ var getDataset = async (identifier, locale) => {
1537
+ const datasetUtils = datasetUtilities(locale);
1538
+ const dataset = datasetUtils.getDataset(identifier);
1539
+ if (dataset) return new Promise((resolve) => {
1540
+ resolve(dataset);
1541
+ });
1542
+ return loadDataset(identifier, locale).then((datasetResponse) => {
1543
+ datasetUtils.setDataset(identifier, datasetResponse);
1544
+ return datasetResponse;
1545
+ });
1546
+ };
1547
+ //#endregion
1548
+ //#region src/hooks/useDataset.ts
1549
+ function useDataset(datasetIdentifier, skip) {
1550
+ const { i18n } = useTranslation();
1551
+ const [dataset, setDataset] = useState$1([]);
1552
+ const [loaded, setLoaded] = useState$1(false);
1553
+ useEffect$1(() => {
1554
+ if (skip) return;
1555
+ getDataset(datasetIdentifier, i18n.language).then((response) => {
1556
+ const result = response && response.length ? response : [];
1557
+ setDataset(result);
1558
+ }).catch(() => {
1559
+ setDataset([]);
1560
+ }).finally(() => {
1561
+ setLoaded(true);
1562
+ });
1563
+ }, [
1564
+ datasetIdentifier,
1565
+ i18n.language,
1566
+ skip
1567
+ ]);
1568
+ return {
1569
+ dataset,
1570
+ loaded
1571
+ };
1572
+ }
1573
+ var alert_module_default = {
1574
+ alert: "_alert_jgk1f_1",
1575
+ "alert-without-icon": "_alert-without-icon_jgk1f_10",
1576
+ alertWithoutIcon: "_alert-without-icon_jgk1f_10",
1577
+ "alert-explanation": "_alert-explanation_jgk1f_10",
1578
+ alertExplanation: "_alert-explanation_jgk1f_10",
1579
+ "alert-actions": "_alert-actions_jgk1f_11",
1580
+ alertActions: "_alert-actions_jgk1f_11",
1581
+ "alert-basic": "_alert-basic_jgk1f_15",
1582
+ alertBasic: "_alert-basic_jgk1f_15",
1583
+ "alert-info": "_alert-info_jgk1f_19",
1584
+ alertInfo: "_alert-info_jgk1f_19",
1585
+ "alert-error": "_alert-error_jgk1f_23",
1586
+ alertError: "_alert-error_jgk1f_23",
1587
+ "alert-warning": "_alert-warning_jgk1f_27",
1588
+ alertWarning: "_alert-warning_jgk1f_27",
1589
+ "alert-success": "_alert-success_jgk1f_31",
1590
+ alertSuccess: "_alert-success_jgk1f_31",
1591
+ "alert-header": "_alert-header_jgk1f_35",
1592
+ alertHeader: "_alert-header_jgk1f_35",
1593
+ "alert-header-without-children": "_alert-header-without-children_jgk1f_40",
1594
+ alertHeaderWithoutChildren: "_alert-header-without-children_jgk1f_40",
1595
+ "alert-icon": "_alert-icon_jgk1f_44",
1596
+ alertIcon: "_alert-icon_jgk1f_44",
1597
+ "alert-icon-info": "_alert-icon-info_jgk1f_48",
1598
+ alertIconInfo: "_alert-icon-info_jgk1f_48",
1599
+ "alert-icon-error": "_alert-icon-error_jgk1f_52",
1600
+ alertIconError: "_alert-icon-error_jgk1f_52",
1601
+ "alert-icon-warning": "_alert-icon-warning_jgk1f_56",
1602
+ alertIconWarning: "_alert-icon-warning_jgk1f_56",
1603
+ "alert-icon-success": "_alert-icon-success_jgk1f_60",
1604
+ alertIconSuccess: "_alert-icon-success_jgk1f_60",
1605
+ "alert-title": "_alert-title_jgk1f_64",
1606
+ alertTitle: "_alert-title_jgk1f_64"
1607
+ };
1608
+ //#endregion
1609
+ //#region src/components/ui/molecules/Alert/Alert.tsx
1610
+ var variantMap = {
1611
+ basic: alert_module_default.alertBasic,
1612
+ info: alert_module_default.alertInfo,
1613
+ error: alert_module_default.alertError,
1614
+ warning: alert_module_default.alertWarning,
1615
+ success: alert_module_default.alertSuccess
1616
+ };
1617
+ var iconVariantMap = {
1618
+ basic: "",
1619
+ info: alert_module_default.alertIconInfo,
1620
+ error: alert_module_default.alertIconError,
1621
+ warning: alert_module_default.alertIconWarning,
1622
+ success: alert_module_default.alertIconSuccess
1623
+ };
1624
+ var Alert = ({ title, variant = "basic", type = "default", className, actions, children, icon, testId, onClose, onToggle }) => {
1625
+ const { t } = useTranslation("ui");
1626
+ const [isClosed, setIsClosed] = useState$1(false);
1627
+ if (isClosed) return null;
1628
+ const closeAlert = () => {
1629
+ if (onClose) onClose();
1630
+ setIsClosed(true);
1631
+ };
1632
+ const renderIcon = () => {
1633
+ if (icon === false) return void 0;
1634
+ if (isValidElement$1(icon)) return icon;
1635
+ return /* @__PURE__ */ jsx("span", {
1636
+ className: cx(alert_module_default.alertIcon, iconVariantMap[variant]),
1637
+ children: /* @__PURE__ */ jsx(AlertIcon, { variant })
1638
+ });
1639
+ };
1640
+ const renderedIcon = renderIcon();
1641
+ if (type === "collapsible") return /* @__PURE__ */ jsxs(Accordion, {
1642
+ variant,
1643
+ onToggle: onToggle || void 0,
1644
+ narrow: true,
1645
+ className,
1646
+ children: [
1647
+ /* @__PURE__ */ jsx("template", {
1648
+ slot: "title",
1649
+ children: title
1650
+ }),
1651
+ /* @__PURE__ */ jsx("template", {
1652
+ slot: "icon",
1653
+ children: renderedIcon
1654
+ }),
1655
+ /* @__PURE__ */ jsxs("template", {
1656
+ slot: "content",
1657
+ children: [children, !!actions && /* @__PURE__ */ jsx("div", {
1658
+ className: alert_module_default.alertActions,
1659
+ children: actions
1660
+ })]
1661
+ })
1662
+ ]
1663
+ });
1664
+ if (type === "callToAction") return /* @__PURE__ */ jsxs("div", {
1665
+ className: cx(alert_module_default.alert, className, variantMap[variant], { [alert_module_default.alertWithoutIcon]: !renderedIcon }),
1666
+ role: "alert",
1667
+ "data-testid": testId,
1668
+ children: [/* @__PURE__ */ jsxs("div", {
1669
+ className: cx(alert_module_default.alertHeader, { [alert_module_default.alertHeaderWithoutChildren]: !children }),
1670
+ children: [
1671
+ renderedIcon,
1672
+ title && /* @__PURE__ */ jsx(Typography, {
1673
+ el: "h3",
1674
+ variant: "body-strongest",
1675
+ className: alert_module_default.alertTitle,
1676
+ children: title
1677
+ }),
1678
+ !!actions && /* @__PURE__ */ jsx("div", {
1679
+ className: alert_module_default.alertActions,
1680
+ children: actions
1681
+ })
1682
+ ]
1683
+ }), !!children && /* @__PURE__ */ jsx("div", {
1684
+ className: alert_module_default.alertExplanation,
1685
+ children
1686
+ })]
1687
+ });
1688
+ return /* @__PURE__ */ jsxs("div", {
1689
+ className: cx(alert_module_default.alert, className, variantMap[variant], { [alert_module_default.alertWithoutIcon]: !renderedIcon }),
1690
+ role: "alert",
1691
+ "data-testid": testId,
1692
+ children: [
1693
+ /* @__PURE__ */ jsxs("div", {
1694
+ className: alert_module_default.alertHeader,
1695
+ children: [
1696
+ renderedIcon,
1697
+ title && /* @__PURE__ */ jsx(Typography, {
1698
+ el: "h3",
1699
+ variant: "body-strongest",
1700
+ className: alert_module_default.alertTitle,
1701
+ children: title
1702
+ }),
1703
+ type === "dismissible" && /* @__PURE__ */ jsx(Button, {
1704
+ variant: "tertiary",
1705
+ icon: "cross",
1706
+ onClick: closeAlert,
1707
+ children: t(($) => $["close"])
1708
+ })
1709
+ ]
1710
+ }),
1711
+ !!children && /* @__PURE__ */ jsx("div", {
1712
+ className: alert_module_default.alertExplanation,
1713
+ children
1714
+ }),
1715
+ !!actions && /* @__PURE__ */ jsx("div", {
1716
+ className: alert_module_default.alertActions,
1717
+ children: actions
1718
+ })
1719
+ ]
1720
+ });
1721
+ };
1722
+ var AlertIcon = ({ variant }) => {
1723
+ switch (variant) {
1724
+ case "success": return /* @__PURE__ */ jsx(Icon, { name: "checkmark" });
1725
+ case "error": return /* @__PURE__ */ jsx(Icon, { name: "error" });
1726
+ case "warning": return /* @__PURE__ */ jsx(Icon, { name: "warning" });
1727
+ default: return /* @__PURE__ */ jsx(Icon, { name: "info-circle-filled" });
1728
+ }
1729
+ };
1730
+ //#endregion
1731
+ //#region src/components/Shared/AllowedCountryGate/AllowedCountryGate.tsx
1732
+ /**
1733
+ * Blocks the user from onboarding if they are from a disallowed country.
1734
+ */
1735
+ var AllowedCountryGate = ({ children }) => {
1736
+ const allowedCountries = useAllowedCountries();
1737
+ const { t, i18n } = useTranslation("common");
1738
+ const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
1739
+ const { dataset: countries } = useDataset(datasetIdentifier.country);
1740
+ addResourceBundles(i18n, [{
1741
+ ns: "common",
1742
+ importFn: (lang) => _rolldown_dynamic_import_helper_default(/* #__PURE__ */ Object.assign({
1743
+ "../../../language/locales/bg-BG.json": () => import("./bg-BG-Cdrkwxmc.js"),
1744
+ "../../../language/locales/cs-CZ.json": () => import("./cs-CZ-DpiH1UkS.js"),
1745
+ "../../../language/locales/da-DK.json": () => import("./da-DK-B-BJLcqw.js"),
1746
+ "../../../language/locales/de-DE.json": () => import("./de-DE-BxTGFyOs.js"),
1747
+ "../../../language/locales/el-GR.json": () => import("./el-GR-IQwyd9ws.js"),
1748
+ "../../../language/locales/en-US.instructions.json": () => import("./en-US.instructions-BVNIyLRs.js"),
1749
+ "../../../language/locales/en-US.json": () => import("./en-US-U0d3NI20.js"),
1750
+ "../../../language/locales/es-ES.json": () => import("./es-ES-Cg2IadcX.js"),
1751
+ "../../../language/locales/es-LA.json": () => import("./es-LA-DvMpG4FP.js"),
1752
+ "../../../language/locales/et-EE.json": () => import("./et-EE-eGeytyQh.js"),
1753
+ "../../../language/locales/fi-FI.json": () => import("./fi-FI-C02wZfgW.js"),
1754
+ "../../../language/locales/fr-FR.json": () => import("./fr-FR-CE7k9H5_.js"),
1755
+ "../../../language/locales/hr-HR.json": () => import("./hr-HR-B12DcJ3l.js"),
1756
+ "../../../language/locales/hu-HU.json": () => import("./hu-HU-cosbDuos.js"),
1757
+ "../../../language/locales/it-IT.json": () => import("./it-IT-CiKoOxzk.js"),
1758
+ "../../../language/locales/ja-JP.json": () => import("./ja-JP-D7PEVMmT.js"),
1759
+ "../../../language/locales/lt-LT.json": () => import("./lt-LT-C2oxTakB.js"),
1760
+ "../../../language/locales/lv-LV.json": () => import("./lv-LV-C_KVkpid.js"),
1761
+ "../../../language/locales/nl-NL.json": () => import("./nl-NL-CwNBy0Ku.js"),
1762
+ "../../../language/locales/no-NO.json": () => import("./no-NO-VqkeNhzB.js"),
1763
+ "../../../language/locales/pl-PL.json": () => import("./pl-PL-Bp218jDD.js"),
1764
+ "../../../language/locales/pt-BR.json": () => import("./pt-BR-CPbFPNwq.js"),
1765
+ "../../../language/locales/pt-PT.json": () => import("./pt-PT-Bz39smeX.js"),
1766
+ "../../../language/locales/ro-RO.json": () => import("./ro-RO-jNItoBZk.js"),
1767
+ "../../../language/locales/sk-SK.json": () => import("./sk-SK-CsSqXqf_.js"),
1768
+ "../../../language/locales/sl-SI.json": () => import("./sl-SI-PRqWis0E.js"),
1769
+ "../../../language/locales/sv-SE.json": () => import("./sv-SE-Dv-rMOdB.js")
1770
+ }), `../../../language/locales/${lang}.json`, 6)
1771
+ }]);
1772
+ if (!rootLegalEntity || !allowedCountries) return /* @__PURE__ */ jsx(Loader, {});
1773
+ const country = getLegalEntityCountry(rootLegalEntity);
1774
+ const isAllowed = allowedCountries.includes(country);
1775
+ const countryName = countries.find(({ id }) => id === country)?.name ?? country;
1776
+ if (!isAllowed) return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AlertIcon, { variant: "error" }), /* @__PURE__ */ jsx(Header, {
1777
+ title: t(($) => $["countryNotSupported"]),
1778
+ description: t(($) => $["weDontSupportOnboardingInCountry"], { country: countryName })
1779
+ })] });
1780
+ return /* @__PURE__ */ jsx(Fragment$1, { children });
1781
+ };
1782
+ //#endregion
1783
+ //#region src/components/Shared/devex/DebugListener/DebugListener.tsx
1784
+ var DebugModal = lazy(async () => (await import("./DebugModal-YjFFNeOM.js")).DebugModal);
1785
+ /**
1786
+ * Adds a listener on the page to open the debug modal when the
1787
+ * debug modal key combination is pressed to open it
1788
+ */
1789
+ var DebugListener = () => {
1790
+ const [debugUiOpen, setDebugUiOpen] = useState$1(false);
1791
+ const { isSettingEnabled } = useSettingsContext();
1792
+ const debugUiAllowed = isSettingEnabled("allowDebugUi");
1793
+ useEffect$1(() => {
1794
+ if (!debugUiAllowed) return;
1795
+ const handleKeyDown = ({ code, ctrlKey, altKey, shiftKey }) => {
1796
+ if (ctrlKey && (altKey || shiftKey) && code === "Backslash") setDebugUiOpen(true);
1797
+ };
1798
+ document.addEventListener("keydown", handleKeyDown);
1799
+ return () => document.removeEventListener("keydown", handleKeyDown);
1800
+ }, [debugUiAllowed]);
1801
+ return /* @__PURE__ */ jsx(Fragment$1, { children: debugUiAllowed && debugUiOpen ? /* @__PURE__ */ jsx(Suspense, {
1802
+ fallback: /* @__PURE__ */ jsx("div", {}),
1803
+ children: /* @__PURE__ */ jsx(DebugModal, { onExit: () => setDebugUiOpen(false) })
1804
+ }) : null });
1805
+ };
1806
+ //#endregion
1807
+ //#region src/utils/bankUtils.ts
1808
+ function isTransferInstrument(account) {
1809
+ return account.bankAccount !== void 0;
1810
+ }
1811
+ var isInstantVerifiedAccount = (account) => Boolean(isTransferInstrument(account) ? account.bankAccount.trustedSource : account.trustedSource);
1812
+ var getObscuredAccountNumber = ({ accountIdentifier, realLastFour }) => realLastFour ? `*******${realLastFour}` : accountIdentifier;
1813
+ //#endregion
1814
+ //#region src/utils/unincorporatedParnershipUtils.ts
1815
+ var isPartOfUnincorporatedPartnership = (legalEntity) => legalEntity?.entityAssociations?.some((ea) => ea.entityType === "unincorporatedPartnership" && ea.associatorId === legalEntity.id);
1816
+ var getOwnUnincorporatedPartnershipLegalEntityId = (legalEntity) => legalEntity?.entityAssociations?.find((ea) => ea.entityType === "unincorporatedPartnership" && ea.associatorId === legalEntity.id)?.legalEntityId;
1817
+ var getOwnUnincorporatedPartnershipLegalEntityIdAsArray = (legalEntity) => {
1818
+ const legalEntityId = getOwnUnincorporatedPartnershipLegalEntityId(legalEntity);
1819
+ return legalEntityId ? [legalEntityId] : [];
1820
+ };
1821
+ var getOwnUnincorporatedPartnershipProblems = (legalEntity, capabilityProblems) => {
1822
+ const legalEntityId = getOwnUnincorporatedPartnershipLegalEntityId(legalEntity);
1823
+ if (legalEntityId) return capabilityProblems?.LegalEntity?.[legalEntityId];
1824
+ };
1825
+ /**
1826
+ * Gathers all legal entity IDs relevant for calculating the task status of an unincorporated partnership.
1827
+ *.
1828
+ * These ids includes the root legal entity itself, the direct members of the partnership, and any owners
1829
+ * (e.g., UBOs through ownership) associated with those members.
1830
+ *
1831
+ * @param rootLegalEntity The root legal entity
1832
+ * @returns A list of legal entity IDs, including the root entity, its partnership members, and their owners.
1833
+ */
1834
+ var getOwnMembersLegalEntityIds = (rootLegalEntity) => {
1835
+ const unincorporatedPartnershipEntityId = getOwnUnincorporatedPartnershipLegalEntityId(rootLegalEntity);
1836
+ if (!unincorporatedPartnershipEntityId) return [];
1837
+ const memberAssociationsIds = getDirectEntityAssociations(rootLegalEntity, unincorporatedPartnershipEntityId).map((association) => association.legalEntityId).filter((id) => id !== void 0);
1838
+ const ownerIds = memberAssociationsIds.flatMap((associationId) => getDirectEntityAssociations(rootLegalEntity, associationId)).map((association) => association.legalEntityId).filter((id) => id !== void 0);
1839
+ return [
1840
+ rootLegalEntity.id,
1841
+ ...memberAssociationsIds,
1842
+ ...ownerIds
1843
+ ];
1844
+ };
1845
+ //#endregion
1846
+ //#region src/components/Trust/forms/TrustRegistrationDetails/types.ts
1847
+ var nzSpecificTrustTypes = [
1848
+ "discretionaryTrust",
1849
+ "familyTrust",
1850
+ "charitableTrust",
1851
+ "businessTrust",
1852
+ "otherTrust"
1853
+ ];
1854
+ var auSpecificTrustTypes = [
1855
+ "cashManagementTrust",
1856
+ "corporateUnitTrust",
1857
+ "deceasedEstate",
1858
+ "discretionaryInvestmentTrust",
1859
+ "discretionaryServicesManagementTrust",
1860
+ "discretionaryTradingTrust",
1861
+ "firstHomeSaverAccountsTrust",
1862
+ "fixedTrust",
1863
+ "fixedUnitTrust",
1864
+ "hybridTrust",
1865
+ "listedPublicUnitTrust",
1866
+ "otherTrust",
1867
+ "pooledSuperannuationTrust",
1868
+ "publicTradingTrust",
1869
+ "unlistedPublicUnitTrust"
1870
+ ];
1871
+ var countryToTrustTypes = {
1872
+ [CountryCodes.Australia]: auSpecificTrustTypes,
1873
+ [CountryCodes.NewZealand]: nzSpecificTrustTypes
1874
+ };
1875
+ //#endregion
1876
+ //#region src/components/Trust/utils/trustMemberRequirements.ts
1877
+ var DEFAULT_TRUST_MEMBER_REQUIREMENTS = [
1878
+ {
1879
+ roleTypes: [TrustMemberTypes.SETTLOR],
1880
+ min: 1,
1881
+ max: 1,
1882
+ label: TrustMemberGuidanceLabels.SETTLOR
1883
+ },
1884
+ {
1885
+ roleTypes: [TrustMemberTypes.DEFINED_BENEFICIARY, TrustMemberTypes.UNDEFINED_BENEFICIARY],
1886
+ min: 1,
1887
+ max: Infinity,
1888
+ label: TrustMemberGuidanceLabels.BENEFICIARY
1889
+ },
1890
+ {
1891
+ roleTypes: [TrustMemberTypes.PROTECTOR],
1892
+ min: 0,
1893
+ max: Infinity,
1894
+ label: TrustMemberGuidanceLabels.PROTECTOR
1895
+ },
1896
+ {
1897
+ roleTypes: [TrustMemberTypes.TRUSTEE],
1898
+ min: 1,
1899
+ max: Infinity,
1900
+ label: TrustMemberGuidanceLabels.TRUSTEE
1901
+ }
1902
+ ];
1903
+ //#endregion
1904
+ //#region src/components/Trust/utils/trustUtil.ts
1905
+ var isPartOfTrustFromLegalEntity = (legalEntity) => legalEntity?.entityAssociations?.some((ea) => ea.entityType === "trust" && ea.associatorId === legalEntity.id);
1906
+ var getOwnTrustMembersLegalEntityIds = (rootLegalEntity) => {
1907
+ const trustLegalEntityId = getOwnTrustLegalEntityId(rootLegalEntity);
1908
+ if (!trustLegalEntityId) return [];
1909
+ const trustMemberIds = getDirectEntityAssociations(rootLegalEntity, trustLegalEntityId).map((association) => association.legalEntityId).filter((id) => id !== void 0);
1910
+ return [...trustMemberIds, ...trustMemberIds.flatMap((trustMemberId) => getTrustMemberCompanyDecisionMakerIds(rootLegalEntity, trustMemberId))];
1911
+ };
1912
+ var getTrustMemberCompanyDecisionMakerIds = (rootLegalEntity, trustMemberCompanyId) => {
1913
+ return getDecisionMakers(rootLegalEntity, trustMemberCompanyId).map((association) => association.legalEntityId).filter((id) => id !== void 0);
1914
+ };
1915
+ var getOwnTrustLegalEntityId = (legalEntity) => legalEntity?.entityAssociations?.find((ea) => ea.entityType === "trust" && ea.associatorId === legalEntity.id)?.legalEntityId;
1916
+ var getOwnTrustLegalEntityIdAsArray = (legalEntity) => {
1917
+ const trustLegalEntityId = getOwnTrustLegalEntityId(legalEntity);
1918
+ return trustLegalEntityId ? [trustLegalEntityId] : [];
1919
+ };
1920
+ var getOwnTrustProblems = (legalEntity, capabilityProblems) => {
1921
+ const trustLegalEntityId = getOwnTrustLegalEntityId(legalEntity);
1922
+ if (trustLegalEntityId) return capabilityProblems?.LegalEntity?.[trustLegalEntityId];
1923
+ };
1924
+ var hasRequiredTrustMemberCount = (trustMembers) => {
1925
+ if (!trustMembers.length) return false;
1926
+ return DEFAULT_TRUST_MEMBER_REQUIREMENTS.every(({ roleTypes, min }) => {
1927
+ if (min === 0) return true;
1928
+ return (trustMembers.filter(({ roles }) => roleTypes.some((label) => roles.includes(label)))?.length ?? 0) >= min;
1929
+ });
1930
+ };
1931
+ var getCountrySpecificTrustTypeOptions = (country) => {
1932
+ return countryToTrustTypes[country] || [];
1933
+ };
1934
+ //#endregion
1935
+ //#region src/types/verificationStatus.ts
1936
+ var VerificationStatuses = {
1937
+ VALID: "valid",
1938
+ PENDING: "pending",
1939
+ INVALID: "invalid",
1940
+ REJECTED: "rejected"
1941
+ };
1942
+ //#endregion
1943
+ //#region src/stores/globalStore/isEmptyEntity.ts
1944
+ /**
1945
+ * These fields will be present on an empty (just created) entity of the given type.
1946
+ * If any more fields than these are present, we consider the LE to not be "empty".
1947
+ */
1948
+ var emptyFieldsForIndividual = [
1949
+ "name.firstName",
1950
+ "name.lastName",
1951
+ "residentialAddress.country"
1952
+ ];
1953
+ var emptyFieldsForOrganization = ["legalName", "registeredAddress.country"];
1954
+ var emptyFieldsForTrust = ["name", "registeredAddress.country"];
1955
+ var emptyFieldsForSoleProp = ["name", "registeredAddress.country"];
1956
+ var emptyFieldsForUnincorporatedPartnership = [
1957
+ "name",
1958
+ "countryOfGoverningLaw",
1959
+ "registeredAddress.country"
1960
+ ];
1961
+ var emptyFieldsByEntityType = {
1962
+ ["individual"]: emptyFieldsForIndividual,
1963
+ ["organization"]: emptyFieldsForOrganization,
1964
+ ["trust"]: emptyFieldsForTrust,
1965
+ ["soleProprietorship"]: emptyFieldsForSoleProp,
1966
+ ["unincorporatedPartnership"]: emptyFieldsForUnincorporatedPartnership
1967
+ };
1968
+ function isEmptyEntity(legalEntity) {
1969
+ const type = legalEntity?.type;
1970
+ if (!type) return true;
1971
+ if (legalEntity.documentDetails?.length) return false;
1972
+ const minimumFields = emptyFieldsByEntityType[type];
1973
+ const typeSpecificSection = legalEntity[type];
1974
+ if (!typeSpecificSection) return true;
1975
+ const fieldsOnEntity = getNestedPropertyKeys(typeSpecificSection, false, false);
1976
+ const sortedMinimumFields = [...minimumFields].sort();
1977
+ return [...fieldsOnEntity].sort().every((value, index) => value === sortedMinimumFields[index]);
1978
+ }
1979
+ //#endregion
1980
+ //#region src/stores/globalStore/get-task-status.ts
1981
+ var calculateCustomerSupportTask = (capabilityProblems, rootLegalEntity) => {
1982
+ const supportData = rootLegalEntity.individual?.support ?? rootLegalEntity.organization?.support;
1983
+ const hasMissingDataErrors = capabilityProblems.LegalEntity?.[rootLegalEntity.id]?.missingData?.some((error) => CUSTOMER_SUPPORT_DATA_MISSING_ERROR_CODES.includes(error.code));
1984
+ if (!supportData) return {
1985
+ status: TaskStatuses.DETAILS_REQUIRED,
1986
+ reason: "rootLegalEntityIsEmpty"
1987
+ };
1988
+ if (hasMissingDataErrors) return {
1989
+ status: TaskStatuses.DETAILS_REQUIRED,
1990
+ reason: "dataMissingError",
1991
+ details: { missingData: capabilityProblems.LegalEntity?.[rootLegalEntity.id].missingData?.filter((error) => CUSTOMER_SUPPORT_DATA_MISSING_ERROR_CODES.includes(error.code)) }
1992
+ };
1993
+ const pendingCapabilities = getPendingCapabilities(rootLegalEntity);
1994
+ if (pendingCapabilities.length > 0) return {
1995
+ status: TaskStatuses.PROCESSING,
1996
+ reason: "pendingCapabilities",
1997
+ details: { pendingCapabilities }
1998
+ };
1999
+ if (hasAllCapabilitiesValid(rootLegalEntity)) return {
2000
+ status: TaskStatuses.FINISHED,
2001
+ reason: "allCapabilitiesValid"
2002
+ };
2003
+ return {
2004
+ status: TaskStatuses.FINISHED,
2005
+ reason: "noIssuesFound"
2006
+ };
2007
+ };
2008
+ var getRegularTaskStatus = ({ taskType, capabilityProblems, rootLegalEntity, relevantEntityIds, ignorePendingCapabilities = false }) => {
2009
+ const entityType = taskType === TaskTypes.PAYIN || taskType == TaskTypes.PAYOUT ? "BankAccount" : "LegalEntity";
2010
+ if (relevantEntityIds.length === 0) return {
2011
+ status: TaskStatuses.EMPTY,
2012
+ reason: "newEntityAlwaysEmpty"
2013
+ };
2014
+ if (relevantEntityIds.includes(rootLegalEntity.id) && isEmptyEntity(rootLegalEntity)) return {
2015
+ status: TaskStatuses.EMPTY,
2016
+ reason: "rootLegalEntityIsEmpty"
2017
+ };
2018
+ const importantProblems = findImportantProblems(entityType, capabilityProblems, relevantEntityIds, taskType);
2019
+ if (importantProblems.length > 0) return importantProblems[0].statusWithReason;
2020
+ const pendingCapabilities = getPendingCapabilities(rootLegalEntity);
2021
+ if (!ignorePendingCapabilities && pendingCapabilities.length > 0) return {
2022
+ status: TaskStatuses.PROCESSING,
2023
+ reason: "pendingCapabilities",
2024
+ details: { pendingCapabilities }
2025
+ };
2026
+ if (relevantEntityIds.includes(rootLegalEntity.id)) {
2027
+ if (hasAllCapabilitiesValid(rootLegalEntity)) return {
2028
+ status: TaskStatuses.FINISHED,
2029
+ reason: "allCapabilitiesValid"
2030
+ };
2031
+ }
2032
+ return {
2033
+ status: TaskStatuses.FINISHED,
2034
+ reason: "noIssuesFound"
2035
+ };
2036
+ };
2037
+ var getDecisionMakerOverviewStatus = ({ capabilityProblems, rootLegalEntity, relevantEntityIds }) => {
2038
+ if (relevantEntityIds.length === 0) return {
2039
+ status: TaskStatuses.EMPTY,
2040
+ reason: "newEntityAlwaysEmpty"
2041
+ };
2042
+ if (relevantEntityIds.includes(rootLegalEntity.id) && isEmptyEntity(rootLegalEntity)) return {
2043
+ status: TaskStatuses.EMPTY,
2044
+ reason: "rootLegalEntityIsEmpty"
2045
+ };
2046
+ const importantProblems = findImportantProblems("LegalEntity", capabilityProblems, relevantEntityIds, TaskTypes.DECISION_MAKER_OVERVIEW);
2047
+ if (importantProblems.length > 0) return importantProblems[0].statusWithReason;
2048
+ const pendingCapabilities = getPendingCapabilities(rootLegalEntity).filter((capability) => !/.*TransferInstrument/gim.test(capability));
2049
+ if (pendingCapabilities.length > 0) return {
2050
+ status: TaskStatuses.PROCESSING,
2051
+ reason: "pendingCapabilities",
2052
+ details: { pendingCapabilities }
2053
+ };
2054
+ if (relevantEntityIds.includes(rootLegalEntity.id) && hasAllNonTransferInstrumentCapabilitiesValid(rootLegalEntity)) return {
2055
+ status: TaskStatuses.FINISHED,
2056
+ reason: "allCapabilitiesValid"
2057
+ };
2058
+ return {
2059
+ status: TaskStatuses.FINISHED,
2060
+ reason: "noIssuesFound"
2061
+ };
2062
+ };
2063
+ var IMPORTANT_STATUSES = [
2064
+ TaskStatuses.DETAILS_REQUIRED,
2065
+ TaskStatuses.DOWNLOAD,
2066
+ TaskStatuses.ERROR,
2067
+ TaskStatuses.PROCESSING
2068
+ ];
2069
+ function findImportantProblems(type, capabilityProblems, entityIds, taskType) {
2070
+ if (!capabilityProblems?.[type] || !entityIds.length) return [];
2071
+ const problems = cloneObject(capabilityProblems);
2072
+ if (taskType !== TaskTypes.CUSTOMER_SUPPORT) entityIds.forEach((id) => {
2073
+ if (problems.LegalEntity?.[id]?.missingData) problems.LegalEntity[id].missingData = problems.LegalEntity?.[id]?.missingData?.filter((missingDataErrors) => !CUSTOMER_SUPPORT_DATA_MISSING_ERROR_CODES.includes(missingDataErrors.code));
2074
+ });
2075
+ return Object.entries(problems[type] ?? {}).filter(([key]) => entityIds.includes(key)).map(([, value]) => value).filter((problems) => problems.statusWithReason !== void 0 && IMPORTANT_STATUSES.includes(problems.statusWithReason.status)).sort((prev, curr) => TASK_STATUS_PRIORITY[curr.statusWithReason.status] - TASK_STATUS_PRIORITY[prev.statusWithReason.status]);
2076
+ }
2077
+ var getPendingCapabilities = (legalEntityResponse) => entriesOf(legalEntityResponse.capabilities ?? {}).filter(([, capability]) => capability?.verificationStatus === "pending").reduce((acc, [name]) => [...acc, name], []);
2078
+ var hasAllCapabilitiesResolved = (legalEntityResponse) => Object.values(legalEntityResponse?.capabilities ?? {}).every((capability) => capability.verificationStatus !== VerificationStatuses.PENDING);
2079
+ var hasRejectedCapabilities = (legalEntityResponse) => Object.values(legalEntityResponse?.capabilities ?? {}).some((capability) => capability.verificationStatus === VerificationStatuses.REJECTED);
2080
+ var hasAllCapabilitiesValid = (legalEntityResponse) => Object.values(legalEntityResponse?.capabilities ?? {}).every((capability) => capability.verificationStatus === VerificationStatuses.VALID);
2081
+ var hasAllNonTransferInstrumentCapabilitiesValid = (legalEntityResponse) => {
2082
+ for (const [name, capability] of Object.entries(legalEntityResponse?.capabilities ?? {})) if (!/.*TransferInstrument/gim.test(name) && capability.verificationStatus !== VerificationStatuses.VALID) return false;
2083
+ return true;
2084
+ };
2085
+ //#endregion
2086
+ //#region src/stores/globalStore/calculateTaskStatus.ts
2087
+ var calculateTaskStatus = ({ taskIdentifier, capabilityProblems, rootLegalEntity, accountHolder, legalRepresentative, trustMembers, transferInstruments }) => {
2088
+ const { taskType, id } = splitTaskIdentifier(taskIdentifier);
2089
+ let relevantEntityIds = [];
2090
+ let ignorePendingCapabilities = false;
2091
+ switch (taskType) {
2092
+ case TaskTypes.INDIVIDUAL:
2093
+ case TaskTypes.BUSINESS_DETAILS:
2094
+ relevantEntityIds = [rootLegalEntity.id];
2095
+ break;
2096
+ case TaskTypes.LEGAL_REPRESENTATIVE_DETAILS:
2097
+ if (!legalRepresentative) return {
2098
+ status: TaskStatuses.DETAILS_REQUIRED,
2099
+ reason: "legalRepresentativeNeeded"
2100
+ };
2101
+ relevantEntityIds = [legalRepresentative.legalEntityId];
2102
+ break;
2103
+ case TaskTypes.SOLE_PROPRIETOR_COMPANY:
2104
+ relevantEntityIds = getOwnSoleProprietorshipIdArray(rootLegalEntity);
2105
+ break;
2106
+ case TaskTypes.DECISION_MAKER_OVERVIEW:
2107
+ if (!hasMinRequiredDecisionMakerCount(rootLegalEntity)) return {
2108
+ status: TaskStatuses.DETAILS_REQUIRED,
2109
+ reason: "missingRequiredDecisionMakers"
2110
+ };
2111
+ relevantEntityIds = getOwnDecisionMakersLegalEntityIds(rootLegalEntity);
2112
+ return getDecisionMakerOverviewStatus({
2113
+ capabilityProblems,
2114
+ rootLegalEntity,
2115
+ relevantEntityIds
2116
+ });
2117
+ case TaskTypes.DECISION_MAKER:
2118
+ if (!id) throw new Error("Decision maker task identifier should specify an ID");
2119
+ relevantEntityIds = [id];
2120
+ break;
2121
+ case TaskTypes.TRUST: {
2122
+ const trustIds = getOwnTrustLegalEntityIdAsArray(rootLegalEntity);
2123
+ if (accountHolder === "aTrust" && trustIds.length === 0) return {
2124
+ status: TaskStatuses.EMPTY,
2125
+ reason: "newEntityAlwaysEmpty"
2126
+ };
2127
+ relevantEntityIds = trustIds;
2128
+ break;
2129
+ }
2130
+ case TaskTypes.TRUST_MEMBER_OVERVIEW:
2131
+ if (!hasRequiredTrustMemberCount(trustMembers)) return {
2132
+ status: TaskStatuses.DETAILS_REQUIRED,
2133
+ reason: "missingRequiredTrustMembers"
2134
+ };
2135
+ relevantEntityIds = getOwnTrustMembersLegalEntityIds(rootLegalEntity);
2136
+ break;
2137
+ case TaskTypes.TRUST_MEMBER:
2138
+ case TaskTypes.TRUST_MEMBER_INDIVIDUAL:
2139
+ case TaskTypes.TRUST_MEMBER_COMPANY:
2140
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY:
2141
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL:
2142
+ if (!id) throw new Error("Trust member task identifier should specify an ID");
2143
+ if (id === "undefinedBeneficiary") {
2144
+ relevantEntityIds = [];
2145
+ break;
2146
+ }
2147
+ relevantEntityIds = [id, ...getDirectEntityAssociations(rootLegalEntity, id).map((association) => association.legalEntityId)];
2148
+ break;
2149
+ case TaskTypes.PAYIN:
2150
+ case TaskTypes.PAYOUT: {
2151
+ if (!id) return {
2152
+ status: TaskStatuses.DETAILS_REQUIRED,
2153
+ reason: "bankAccountNeeded"
2154
+ };
2155
+ const matchingAccount = transferInstruments.find((ti) => ti.id === id);
2156
+ if (!matchingAccount) throw new Error(`Could not find transfer instrument with id ${id}`);
2157
+ ignorePendingCapabilities = isInstantVerifiedAccount(matchingAccount);
2158
+ relevantEntityIds = [id];
2159
+ break;
2160
+ }
2161
+ case TaskTypes.CUSTOMER_SUPPORT: return calculateCustomerSupportTask(capabilityProblems, rootLegalEntity);
2162
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP: {
2163
+ const partnerIds = getOwnUnincorporatedPartnershipLegalEntityIdAsArray(rootLegalEntity);
2164
+ if (accountHolder === "anUnincorporatedPartnership" && partnerIds.length === 0) return {
2165
+ status: TaskStatuses.EMPTY,
2166
+ reason: "newEntityAlwaysEmpty"
2167
+ };
2168
+ relevantEntityIds = partnerIds;
2169
+ break;
2170
+ }
2171
+ case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW:
2172
+ relevantEntityIds = getOwnMembersLegalEntityIds(rootLegalEntity);
2173
+ if (relevantEntityIds?.length === 1) return {
2174
+ status: TaskStatuses.EMPTY,
2175
+ reason: "newEntityAlwaysEmpty"
2176
+ };
2177
+ }
2178
+ return getRegularTaskStatus({
2179
+ taskType,
2180
+ rootLegalEntity,
2181
+ capabilityProblems,
2182
+ relevantEntityIds,
2183
+ ignorePendingCapabilities
2184
+ });
2185
+ };
2186
+ /**
2187
+ * Splits a {@link TaskIdentifier} (e.g. `PAYOUT_ACCOUNT-abc-123`) into the task type and id
2188
+ */
2189
+ var splitTaskIdentifier = (taskIdentifier) => {
2190
+ const firstDashIndex = taskIdentifier.indexOf("-");
2191
+ if (firstDashIndex === -1) return { taskType: taskIdentifier };
2192
+ return {
2193
+ taskType: taskIdentifier.slice(0, firstDashIndex),
2194
+ id: taskIdentifier.slice(firstDashIndex + 1)
2195
+ };
2196
+ };
2197
+ //#endregion
2198
+ //#region src/utils/birthDateUtils.tsx
2199
+ /**
2200
+ * Calculates the age of a person based on their birthdate.
2201
+ *
2202
+ * The birthdate is compared as calendar parts rather than through `new Date(birthdate)`, because a
2203
+ * 'YYYY-MM-DD' string is parsed as UTC midnight. Reading such a date back with local getters
2204
+ * shifts it to the previous day for anyone behind UTC, which would age the person by a year around
2205
+ * month boundaries.
2206
+ * @param birthdate - The birthdate of the person in 'YYYY-MM-DD' format.
2207
+ * @returns The age of the person in years.
2208
+ */
2209
+ var getAgeToday = (birthdate) => {
2210
+ const [birthYear, birthMonth, birthDay] = birthdate.slice(0, 10).split("-").map(Number);
2211
+ const today = /* @__PURE__ */ new Date();
2212
+ const yearDifference = today.getFullYear() - birthYear;
2213
+ const todayMonth = today.getMonth() + 1;
2214
+ const todayDay = today.getDate();
2215
+ return todayMonth > birthMonth || todayMonth === birthMonth && todayDay >= birthDay ? yearDifference : yearDifference - 1;
2216
+ };
2217
+ /**
2218
+ * Returns the age range for a legal representative based on the country.
2219
+ * @param country - The country code.
2220
+ * @returns An object with min and max age, or undefined if not applicable.
2221
+ */
2222
+ var getAgeRangeForLegalRepresentative = (country) => {
2223
+ if (!country || isHkSgCountry(country)) return;
2224
+ if (isEuCountry(country)) return {
2225
+ min: 16,
2226
+ max: 18
2227
+ };
2228
+ return {
2229
+ min: 13,
2230
+ max: 18
2231
+ };
2232
+ };
2233
+ /**
2234
+ * Checks if a person is under the required age for KYC based on their birthdate and country.
2235
+ * @param birthDate - The birthdate of the person.
2236
+ * @param country - The country of residence.
2237
+ * @returns True if the person is under the required age, false otherwise.
2238
+ */
2239
+ var isPersonUnderAge = (birthDate, country) => {
2240
+ if (!birthDate || !country) return false;
2241
+ const ageRange = getAgeRangeForLegalRepresentative(country);
2242
+ if (!ageRange) return false;
2243
+ return isAgeWithinRange(getAgeToday(birthDate), ageRange);
2244
+ };
2245
+ /**
2246
+ * Determines if a legal representative is needed based on age, country, and task type.
2247
+ * @param birthDate - The birthdate of the person.
2248
+ * @param country - The country of residence.
2249
+ * @param taskType - The type of task being performed.
2250
+ * @returns True if a legal representative is needed, false otherwise.
2251
+ */
2252
+ var isLegalRepresentativeNeeded = (birthDate, country, taskType) => {
2253
+ if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) return false;
2254
+ return isPersonUnderAge(birthDate, country);
2255
+ };
2256
+ /**
2257
+ * Checks if an age is within a given range.
2258
+ * @param age - The age to check.
2259
+ * @param ageRange - An object with min and max age.
2260
+ * @returns True if the age is within the range, false otherwise.
2261
+ */
2262
+ var isAgeWithinRange = (age, ageRange) => ageRange.min <= age && age < ageRange.max;
2263
+ /**
2264
+ * Checks if a legal entity requires a legal representative based on the individual's age.
2265
+ * @param legalEntity - The existing legal entity.
2266
+ * @returns True if a legal representative is required, false otherwise.
2267
+ */
2268
+ var doesLegalEntityRequiresLegalRepresentative = (legalEntity) => {
2269
+ if (!legalEntity || !legalEntity?.individual) return false;
2270
+ const birthDate = legalEntity?.individual?.birthData?.dateOfBirth;
2271
+ return isPersonUnderAge(birthDate, getLegalEntityCountry(legalEntity));
2272
+ };
2273
+ //#endregion
2274
+ //#region src/stores/globalStore/determineTaskIdentifiers.ts
2275
+ var determineTaskIdentifiers = ({ taskTypes: receivedTaskTypes, rootLegalEntity, accountHolder, capabilityProblems, trustMembers, transferInstruments, unincorporatedPartnershipMembers, legalRepresentative }) => {
2276
+ if (!rootLegalEntity || !capabilityProblems) return [];
2277
+ const taskTypes = receivedTaskTypes.map(mapReceivedTaskType);
2278
+ const tasks = [...taskTypes];
2279
+ if (taskTypes.includes(TaskTypes.PAYIN)) transferInstruments.forEach((account) => tasks.push(`PAYIN-${account.id}`));
2280
+ if (taskTypes.includes(TaskTypes.PAYOUT)) transferInstruments.forEach((account) => tasks.push(`PAYOUT-${account.id}`));
2281
+ if (taskTypes.includes(TaskTypes.DECISION_MAKER_OVERVIEW)) getOwnDecisionMakersLegalEntityIds(rootLegalEntity).forEach((id) => tasks.push(`DECISION_MAKER-${id}`));
2282
+ if (legalRepresentative || doesLegalEntityRequiresLegalRepresentative(rootLegalEntity)) tasks.push(TaskTypes.LEGAL_REPRESENTATIVE_DETAILS);
2283
+ if (accountHolder === "mySoleProprietorName") tasks.push(TaskTypes.SOLE_PROPRIETOR_COMPANY);
2284
+ if (accountHolder === "aTrust") {
2285
+ tasks.push(TaskTypes.TRUST);
2286
+ tasks.push(TaskTypes.TRUST_MEMBER_OVERVIEW);
2287
+ trustMembers.forEach((member) => {
2288
+ if (member.trustMemberType === "undefinedBeneficiary") {
2289
+ tasks.push(`TRUST_MEMBER-undefinedBeneficiary`);
2290
+ return;
2291
+ }
2292
+ switch (member.legalEntityType) {
2293
+ case "individual":
2294
+ tasks.push(`TRUST_MEMBER_INDIVIDUAL-${String(member.legalEntityId)}`);
2295
+ return;
2296
+ case "organization":
2297
+ tasks.push(`TRUST_MEMBER_COMPANY-${String(member.legalEntityId)}`);
2298
+ return;
2299
+ }
2300
+ });
2301
+ }
2302
+ if (accountHolder === "anUnincorporatedPartnership") {
2303
+ tasks.push(TaskTypes.UNINCORPORATED_PARTNERSHIP);
2304
+ tasks.push(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW);
2305
+ unincorporatedPartnershipMembers?.forEach((member) => {
2306
+ switch (member.legalEntityType) {
2307
+ case "individual":
2308
+ tasks.push(`UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL-${String(member.legalEntityId)}`);
2309
+ return;
2310
+ case "organization":
2311
+ tasks.push(`UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY-${String(member.legalEntityId)}`);
2312
+ return;
2313
+ }
2314
+ });
2315
+ }
2316
+ return tasks;
2317
+ };
2318
+ var mapReceivedTaskType = (taskType) => {
2319
+ switch (taskType) {
2320
+ case TaskTypes.DECISION_MAKER: return TaskTypes.DECISION_MAKER_OVERVIEW;
2321
+ case TaskTypes.TRUST_MEMBER: return TaskTypes.TRUST_MEMBER_OVERVIEW;
2322
+ default: return taskType;
2323
+ }
2324
+ };
2325
+ //#endregion
2326
+ //#region src/stores/globalStore/globalStore.tsx
2327
+ var logger = createLogger();
2328
+ /**
2329
+ * Initializes the store. Should only be called from {@link StoreProvider}.
2330
+ */
2331
+ var createGlobalStore = ({ rootLegalEntity: rootLegalEntityIn }) => {
2332
+ const rootLegalEntity = signal(rootLegalEntityIn);
2333
+ const taskTypes = signal([]);
2334
+ const accountHolder = signal();
2335
+ const trustMembers = signal([]);
2336
+ const unincorporatedPartnershipMembers = signal([]);
2337
+ const rootLegalEntityCountry = computed(() => getLegalEntityCountry(rootLegalEntity.value));
2338
+ const capabilities = computed(() => getCapabilities(rootLegalEntity.value));
2339
+ const capabilityProblems = computed(() => getCapabilityProblems(rootLegalEntity.value, rootLegalEntityCountry.value));
2340
+ const legalRepresentative = computed(() => getLegalRepresentative(rootLegalEntity.value));
2341
+ const transferInstruments = computed(() => rootLegalEntity.value.transferInstruments ?? []);
2342
+ const tasks = computed(() => determineTaskIdentifiers({
2343
+ taskTypes: taskTypes.value,
2344
+ rootLegalEntity: rootLegalEntity.value,
2345
+ accountHolder: accountHolder.value,
2346
+ capabilities: capabilities.value,
2347
+ capabilityProblems: capabilityProblems.value,
2348
+ legalRepresentative: legalRepresentative.value,
2349
+ transferInstruments: transferInstruments.value,
2350
+ trustMembers: trustMembers.value,
2351
+ unincorporatedPartnershipMembers: unincorporatedPartnershipMembers.value
2352
+ }));
2353
+ return {
2354
+ rootLegalEntity,
2355
+ taskTypes,
2356
+ accountHolder,
2357
+ trustMembers,
2358
+ unincorporatedPartnershipMembers,
2359
+ rootLegalEntityCountry,
2360
+ capabilities,
2361
+ capabilityProblems,
2362
+ legalRepresentative,
2363
+ transferInstruments,
2364
+ tasks,
2365
+ taskStatuses: computed(() => tasks.value.reduce((acc, taskIdentifier) => {
2366
+ try {
2367
+ acc[taskIdentifier] = calculateTaskStatus({
2368
+ taskIdentifier,
2369
+ accountHolder: accountHolder.value,
2370
+ capabilityProblems: capabilityProblems.value,
2371
+ rootLegalEntity: rootLegalEntity.value,
2372
+ legalRepresentative: legalRepresentative.value,
2373
+ trustMembers: trustMembers.value,
2374
+ transferInstruments: transferInstruments.value
2375
+ });
2376
+ } catch (err) {
2377
+ logger.error(`Could not calculate task status for ${taskIdentifier}. `, err);
2378
+ }
2379
+ return acc;
2380
+ }, {})),
2381
+ setRootLegalEntity: (newVal) => rootLegalEntity.value = newVal,
2382
+ setTaskTypes: (newVal) => taskTypes.value = newVal,
2383
+ setAccountHolder: (newVal) => accountHolder.value = newVal,
2384
+ setTrustMembers: (newVal) => trustMembers.value = newVal,
2385
+ setUnincorporatedPartnershipMembers: (newVal) => unincorporatedPartnershipMembers.value = newVal
2386
+ };
2387
+ };
2388
+ var StoreContext = createContext$1(null);
2389
+ function useGlobalStore() {
2390
+ const store = useContext$1(StoreContext);
2391
+ if (!store) throw new Error("`useGlobalStore()` must be called from within a `StoreContext.Provider`");
2392
+ return store;
2393
+ }
2394
+ var useGetTaskStatus = () => {
2395
+ const taskStatusesSignal = useGlobalStore().taskStatuses;
2396
+ return useCallback$1((taskType, id) => {
2397
+ const taskIdentifier = id ? `${taskType}-${id}` : taskType;
2398
+ const status = taskStatusesSignal.value[taskIdentifier]?.status;
2399
+ if (status === void 0) {
2400
+ logger.warn(`No status for task '${taskIdentifier}', returning UNKNOWN`);
2401
+ return TaskStatuses.UNKNOWN;
2402
+ }
2403
+ return status;
2404
+ }, [taskStatusesSignal]);
2405
+ };
2406
+ //#endregion
2407
+ //#region src/stores/globalStore/StoreProvider.tsx
2408
+ /**
2409
+ * `<StoreProvider>` postpones render of the remaining tree until root legal entity data has been
2410
+ * retrieved and the {@link GlobalStore} has been initialized.
2411
+ *
2412
+ * This provider can (and should) also be used from tests and stories.
2413
+ * If you prefer to mock global state, see {@link MockedStoreProvider}.
2414
+ */
2415
+ var StoreProvider = ({ children }) => {
2416
+ const [store, setStore] = useState$1();
2417
+ const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
2418
+ useEffect$1(() => {
2419
+ if (!rootLegalEntity || store) return;
2420
+ setStore(createGlobalStore({ rootLegalEntity }));
2421
+ }, [rootLegalEntity, store]);
2422
+ if (!store) return /* @__PURE__ */ jsx(Skeleton, {});
2423
+ return /* @__PURE__ */ jsx(StoreContext.Provider, {
2424
+ value: store,
2425
+ children
2426
+ });
2427
+ };
2428
+ //#endregion
2429
+ //#region src/core/EmbedShell/EmbedShell.tsx
2430
+ /** conditional polyfill for container queries */
2431
+ if (CSS.supports("container", "foo / inline-size") === false) import("container-query-polyfill");
2432
+ var LanguageSwitcher = ({ locale }) => {
2433
+ const { i18n } = useTranslation();
2434
+ const { isSettingEnabled } = useSettingsContext();
2435
+ useEffect$1(() => {
2436
+ if (locale === "ja-JP" && !isSettingEnabled("enableJapanLocalization")) return;
2437
+ i18n.changeLanguage(locale);
2438
+ }, [
2439
+ locale,
2440
+ i18n,
2441
+ isSettingEnabled
2442
+ ]);
2443
+ return null;
2444
+ };
2445
+ /**
2446
+ * Bootstraps any component for external usage by consumers
2447
+ * Import it in your component and wrap it inside the EmbedShell, eg:
2448
+ *
2449
+ * @example
2450
+ * ```jsx
2451
+ * <EmbedShell {...consumerProps}>
2452
+ * <MyReadyToGoForm {...consumerProps} />
2453
+ * </EmbedShell>
2454
+ * ```
2455
+ *
2456
+ * @param props given by consumer, be it HO, merchant using library or a TaskList component
2457
+ * @returns
2458
+ */
2459
+ var EmbedShell = ({ children, rootLegalEntityId, settings, features, refreshExperiments, baseUrl, getSdkToken, componentName, locale, themeMode = "light" }) => {
2460
+ const [isLoading, setIsLoading] = useState$1(true);
2461
+ const [hasError, setHasError] = useState$1(false);
2462
+ setSdkTokenHandler(getSdkToken);
2463
+ useEffect$1(() => {
2464
+ refreshSession().then((hasRefreshed) => {
2465
+ if (!hasRefreshed) setHasError(true);
2466
+ setIsLoading(false);
2467
+ });
2468
+ }, []);
2469
+ if (hasError) return /* @__PURE__ */ jsxs("div", { children: ["Something went wrong, please", /* @__PURE__ */ jsx(Button, {
2470
+ onClick: () => location.reload(),
2471
+ children: "refresh the page."
2472
+ })] });
2473
+ if (isLoading) return /* @__PURE__ */ jsx(Loader, {});
2474
+ return /* @__PURE__ */ jsx(SettingsProvider, {
2475
+ settings,
2476
+ children: /* @__PURE__ */ jsx(QueryClientProvider$1, { children: /* @__PURE__ */ jsx(ApiProvider, {
2477
+ rootLegalEntityId,
2478
+ baseUrl,
2479
+ children: /* @__PURE__ */ jsxs(ToggleContextProvider, {
2480
+ features,
2481
+ refreshExperiments,
2482
+ children: [/* @__PURE__ */ jsx(LanguageSwitcher, { locale }), /* @__PURE__ */ jsxs(StoreProvider, { children: [/* @__PURE__ */ jsx("span", {
2483
+ id: "sdk-version",
2484
+ hidden: true,
2485
+ children: "4.26.0-beta.0"
2486
+ }), /* @__PURE__ */ jsx(AnalyticsProvider, {
2487
+ componentName,
2488
+ locale,
2489
+ rootLegalEntityId,
2490
+ children: /* @__PURE__ */ jsx(Suspense, {
2491
+ fallback: /* @__PURE__ */ jsx(Loader, {}),
2492
+ children: /* @__PURE__ */ jsxs(AllowedCountryGate, { children: [/* @__PURE__ */ jsx(DebugListener, {}), /* @__PURE__ */ jsx("div", {
2493
+ className: `adyen-kyc-ui-element-container-wrapper ${themeMode}`,
2494
+ children: /* @__PURE__ */ jsx("div", {
2495
+ className: "adyen-kyc-ui-element-container",
2496
+ children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children }) })
2497
+ })
2498
+ })] })
2499
+ })
2500
+ })] })]
2501
+ })
2502
+ }) })
2503
+ });
2504
+ };
2505
+ //#endregion
2506
+ //#region src/core/environment/normalizeEnvironment.ts
2507
+ var normalizeEnvironment = (env) => env.endsWith("/") ? env : `${env}/`;
2508
+ //#endregion
2509
+ //#region src/core/environment/resolveEnvironment.ts
2510
+ var environmentMap = Object.freeze({
2511
+ live: "https://onboardingcomponents-live.adyen.com/",
2512
+ test: "https://test.adyen.com/"
2513
+ });
2514
+ var resolveEnvironment = (environment) => environmentMap[environment] ?? normalizeEnvironment(environment);
2515
+ //#endregion
2516
+ export { hasEmptyFields as $, _rolldown_dynamic_import_helper_default as A, HAS_PROTOCOL_REGEX as B, useDataset as C, useCapabilities as D, useAllowedCountries as E, useToggles as F, OTHER_ENTITIES_VALID_CHAR_REGEX as G, LATIN_SPACE_MARK_PUNCTUATION_NUMBERS_REGEX as H, ToastContextProvider as I, chomeAndBanchiValidator as J, SPECIAL_CHARS as K, ToastContext as L, FeatureNames as M, ToggleContext as N, useSetting as O, listToRecord as P, getMaxLengthByFieldAndCountry as Q, ADDRESS_VALID_CHAR_REGEX as R, AlertIcon as S, datasetUtilities as T, NO_ALPHABET_REGEX as U, INDIVIDUAL_VALID_CHAR_REGEX as V, NO_ALPHABET_UNICODE_REGEX as W, extractFieldName as X, concatenateFieldNames as Y, getFormattingRegEx as Z, getOwnUnincorporatedPartnershipProblems as _, doesLegalEntityRequiresLegalRepresentative as a, isISIN as at, isInstantVerifiedAccount as b, isLegalRepresentativeNeeded as c, isValidMinLength as ct, hasRejectedCapabilities as d, standardKatakanaValidator as dt, hasMaximumTwoRepeatedCharacters as et, isEmptyEntity as f, StateContext as ft, DEFAULT_TRUST_MEMBER_REQUIREMENTS as g, stylesheets as gt, isPartOfTrustFromLegalEntity as h, useLocalStorage as ht, useGlobalStore as i, isEmpty as it, ExperimentNames as j, Header as k, splitTaskIdentifier as l, matchesRegex as lt, getOwnTrustProblems as m, useAccountHolder as mt, EmbedShell as n, hasText as nt, getAgeRangeForLegalRepresentative as o, isInvalidName as ot, getCountrySpecificTrustTypeOptions as p, AnalyticsContext as pt, URL_REGEX as q, useGetTaskStatus as r, isAccountIdentifierObscured as rt, getAgeToday as s, isUndefinedOrNull as st, resolveEnvironment as t, hasRepeatedCharacters as tt, hasAllCapabilitiesResolved as u, standardKanjiValidator as ut, isPartOfUnincorporatedPartnership as v, datasetIdentifier as w, Alert as x, getObscuredAccountNumber as y, EMOJI_REGEX as z };