@adyen/kyc-components 3.39.2 → 3.40.1

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 (89) hide show
  1. package/dist/es/adyen-kyc-components.es.js +517 -313
  2. package/dist/es/{bg-BG-CLc3Itip.js → bg-BG-Dvrhqyvo.js} +75 -19
  3. package/dist/es/{cs-CZ-egy1O9QR.js → cs-CZ-CgsVgy3E.js} +75 -19
  4. package/dist/es/{da-DK-Dv9rPHto.js → da-DK-JdIh92_M.js} +75 -19
  5. package/dist/es/{de-DE-Qp3ZTbvh.js → de-DE-B4wICYwd.js} +78 -22
  6. package/dist/es/{el-GR-D0zWM9HP.js → el-GR-BqVuenrU.js} +75 -19
  7. package/dist/es/en-US.instructions-C3VuzmQk.js +6 -0
  8. package/dist/es/{es-ES-xC1Sc-Sk.js → es-ES-CFKv0XwM.js} +75 -19
  9. package/dist/es/{et-EE-D8diwwod.js → et-EE-BgUSm8YW.js} +75 -19
  10. package/dist/es/external-link-B2BGNXtd.js +5 -0
  11. package/dist/es/{fi-FI-BrX-GPPR.js → fi-FI-jP9PEW44.js} +75 -19
  12. package/dist/es/{fr-FR-CTr4D8vs.js → fr-FR-BYQHIIeR.js} +75 -19
  13. package/dist/es/{hr-HR-BEjlz2M0.js → hr-HR-DVqFn22E.js} +75 -19
  14. package/dist/es/{hu-HU-CLBVDHtE.js → hu-HU-Chxss9Ot.js} +75 -19
  15. package/dist/es/{it-IT-B-WY98i1.js → it-IT-CDNTUiig.js} +75 -19
  16. package/dist/es/{lt-LT-DkYLw3F1.js → lt-LT-B51bjwui.js} +74 -18
  17. package/dist/es/{lv-LV-BTcpmzWG.js → lv-LV-UnmuzHbM.js} +76 -20
  18. package/dist/es/{nl-NL-DFRDUuVO.js → nl-NL-YzmKI_Fv.js} +75 -19
  19. package/dist/es/{no-NO-nr74oJGp.js → no-NO-xXJy1yre.js} +75 -19
  20. package/dist/es/{pl-PL-BKDEM-sF.js → pl-PL-DIG1zFVM.js} +75 -19
  21. package/dist/es/{pt-PT-BEOsVyuS.js → pt-PT-fPOYgtxq.js} +75 -19
  22. package/dist/es/{ro-RO-5OE4sez9.js → ro-RO-DoSnloDo.js} +75 -19
  23. package/dist/es/{sk-SK-DZnXAokm.js → sk-SK-DEziWqGy.js} +75 -19
  24. package/dist/es/{sl-SI-ySYCo3IF.js → sl-SI-eiMpiyFt.js} +75 -19
  25. package/dist/es/{sv-SE-BNCCTGyd.js → sv-SE-BCna5sl5.js} +74 -18
  26. package/dist/style.css +13 -7
  27. package/dist/types/components/AdditionalInformation/AdditionalInformation.d.ts +1 -1
  28. package/dist/types/components/BasicInformation/BasicInformation.d.ts +1 -1
  29. package/dist/types/components/BusinessDetails/BusinessDetails.d.ts +1 -1
  30. package/dist/types/components/BusinessDetails/forms.d.ts +7 -0
  31. package/dist/types/components/BusinessDetails/types.d.ts +1 -0
  32. package/dist/types/components/BusinessSelection/BusinessSelection.d.ts +1 -1
  33. package/dist/types/components/Company/Company.d.ts +9 -2
  34. package/dist/types/components/Company/types.d.ts +1 -0
  35. package/dist/types/components/CompanyRegistrationDetails/CompanyRegistrationDetails.d.ts +1 -1
  36. package/dist/types/components/CompanyStructure/CompanyStructure.d.ts +1 -1
  37. package/dist/types/components/CompanyType/CompanyType.d.ts +1 -2
  38. package/dist/types/components/ContactDetails/ContactDetails.d.ts +4 -4
  39. package/dist/types/components/DebugWrapper/types.d.ts +6 -0
  40. package/dist/types/components/DecisionMakers/DecisionMakers.d.ts +1 -2
  41. package/dist/types/components/DocumentUpload/DocumentUpload.d.ts +3 -3
  42. package/dist/types/components/IdDocumentUpload/IdDocumentInstantVerification.d.ts +3 -3
  43. package/dist/types/components/IdDocumentUpload/IdDocumentManualUpload.d.ts +3 -3
  44. package/dist/types/components/IdDocumentUpload/IdDocumentUpload.d.ts +1 -2
  45. package/dist/types/components/IdVerification/IdVerification.d.ts +1 -1
  46. package/dist/types/components/IdVerification/types.d.ts +2 -1
  47. package/dist/types/components/IdVerificationMethod/IdVerificationMethod.d.ts +1 -2
  48. package/dist/types/components/IdentityNumber/IdentityNumber.d.ts +1 -1
  49. package/dist/types/components/Individual/Individual.d.ts +1 -1
  50. package/dist/types/components/PayoutAccount/PayoutAccount.d.ts +3 -3
  51. package/dist/types/components/PayoutDetails/PayoutDetails.d.ts +1 -1
  52. package/dist/types/components/PersonalDetails/Identity/Identity.d.ts +2 -2
  53. package/dist/types/components/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +1 -1
  54. package/dist/types/components/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +1 -1
  55. package/dist/types/components/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +1 -1
  56. package/dist/types/components/PersonalDetails/PersonalDetails.d.ts +1 -1
  57. package/dist/types/components/PersonalDetails/types.d.ts +1 -1
  58. package/dist/types/components/ProofOfDirectorDocument/ProofOfDirectorDocument.d.ts +2 -0
  59. package/dist/types/components/ProofOfDirectorDocument/types.d.ts +8 -0
  60. package/dist/types/components/ProofOfResidency/ProofOfResidency.d.ts +3 -3
  61. package/dist/types/components/RegistrationAddress/RegistrationAddress.d.ts +1 -1
  62. package/dist/types/components/RegistrationDocument/RegistrationDocument.d.ts +1 -1
  63. package/dist/types/components/Review/Review.d.ts +1 -2
  64. package/dist/types/components/SoleProp/SoleProp.d.ts +1 -2
  65. package/dist/types/components/TaskList/TaskList.d.ts +2 -3
  66. package/dist/types/components/TaskList/types.d.ts +1 -1
  67. package/dist/types/components/TaxDocument/TaxDocument.d.ts +1 -1
  68. package/dist/types/components/Trust/Trust.d.ts +1 -2
  69. package/dist/types/components/TrustRegistrationDetails/TrustRegistrationDetails.d.ts +1 -2
  70. package/dist/types/components/internal/Address/Address.d.ts +1 -1
  71. package/dist/types/components/internal/Address/AddressForm.d.ts +2 -2
  72. package/dist/types/components/internal/Address/FieldContainer.d.ts +1 -1
  73. package/dist/types/components/internal/Address/utils.d.ts +1 -1
  74. package/dist/types/components/internal/DecisionMakerRole/DecisionMakerRole.d.ts +1 -1
  75. package/dist/types/components/internal/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +1 -1
  76. package/dist/types/components/internal/Link/Link.d.ts +1 -2
  77. package/dist/types/components/internal/Name/Name.d.ts +4 -4
  78. package/dist/types/components/internal/PhoneInput/PhoneInput.d.ts +4 -4
  79. package/dist/types/components/internal/Svg/svgs.d.ts +2 -0
  80. package/dist/types/core/Context/ExperimentContext/types.d.ts +1 -0
  81. package/dist/types/core/models/api/legal-arrangement.d.ts +2 -0
  82. package/dist/types/language/types.d.ts +1 -1
  83. package/dist/types/utils/entity-status-util.d.ts +1 -1
  84. package/dist/types/utils/mapping/componentApiMapping.d.ts +1 -9
  85. package/dist/types/utils/mapping/customerSupport/mapCustomerSupportSchemaToCustomerSupportType.d.ts +3 -0
  86. package/dist/types/utils/mapping/mapping.d.ts +0 -3
  87. package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +10 -0
  88. package/dist/types/utils/regex/businessRegistrationNumberPatterns.d.ts +3 -0
  89. package/package.json +4 -4
@@ -5,6 +5,7 @@ import { sanitize } from "isomorphic-dompurify";
5
5
  import cx from "classnames";
6
6
  import { lazy, Suspense, forwardRef, memo, useMemo as useMemo$1 } from "preact/compat";
7
7
  import isISIN from "validator/es/lib/isISIN.js";
8
+ import { Onfido } from "onfido-sdk-ui";
8
9
  import OpenBankingSDK from "@adyen/openbankingsdk";
9
10
  import { jsxs as jsxs$1, jsx as jsx$1 } from "preact/compat/jsx-runtime";
10
11
  import "@adyen/adyen-document-viewer/dist/adyen-document-viewer.min.css";
@@ -29,7 +30,7 @@ function useExperimentsContext() {
29
30
  }
30
31
  return context;
31
32
  }
32
- const defaultTrans = {
33
+ const defaultLocaleTranslations = {
33
34
  "1Minute": "1 minute",
34
35
  "1Second": "1 second",
35
36
  CCIAA: "CCIAA Number",
@@ -55,7 +56,8 @@ const defaultTrans = {
55
56
  SINFormatCA: "XXXXXXXXX",
56
57
  SSNFormatUS: "*** — ** — XXXX",
57
58
  SSNFormatUS9Digits: "XXXXXXXXX",
58
- SST: "SST",
59
+ SST: "Sales and Service Tax (SST)",
60
+ SSM: "Suruhanjaya Syarikat Malaysia (SSM)",
59
61
  "UST-ID": "UST-ID (Umsatzsteuer-Identifikationsnummer)",
60
62
  "USt-IdNr": "USt-IdNr. (Umsatzsteuer-Identifikationsnummer)",
61
63
  YTunnus: "Y-TUNNUS",
@@ -159,6 +161,8 @@ const defaultTrans = {
159
161
  bankStatement: "Bank statement",
160
162
  bankStatementAlreadyUploaded: "Bank statement has already been uploaded, is too large, or the account has already been added; try another",
161
163
  bankStatementDocument: "Bank statement",
164
+ bankStatementIndividualDescription: "To help verify your bank account details, we need a bank statement clearly showing your name and dated within the last 12 months.",
165
+ bankStatementNonIndividualDescription: "To help verify your bank account details, we need a bank statement clearly showing your business's name and dated within the last 12 months.",
162
166
  basedOnTheAboveSignatory: "Based on the above, the signatory above asserts that the information within this attestation form fairly represents the results of the assessment.",
163
167
  basicCompanyInformation: "Basic company information",
164
168
  basicInformation: "Basic information",
@@ -192,6 +196,7 @@ const defaultTrans = {
192
196
  businessName: "Business name",
193
197
  businessNumber: "Business number",
194
198
  businessRegistrationDocument__FR: "Business registration document, such as a KBIS extract or situation au répertoire sirene",
199
+ businessRegistryStatement: "Business registry statement",
195
200
  businessSelection__failedToLoad: "Business details failed to load",
196
201
  businessSelection__footer: "Can't find your business?",
197
202
  businessSelection__footerButton: "Add details manually",
@@ -234,6 +239,7 @@ const defaultTrans = {
234
239
  code: "Code",
235
240
  codiceFiscale: "Codice fiscale",
236
241
  codulDeIdentificareFiscala: "Codul de identificare fiscală (CIF)",
242
+ commercialLicence: "Commercial License, Trade License or Business License",
237
243
  company: "Company",
238
244
  companyDetails: "Company details",
239
245
  companyFinancialInformationFormHeading: "Financial Details",
@@ -626,6 +632,8 @@ const defaultTrans = {
626
632
  errorMessage_1_85: "Proof of director document didn't meet the requirements",
627
633
  errorMessage_1_86: "Director details didn't match with proof of director document",
628
634
  errorMessage_1_87: "Director details couldn't be verified",
635
+ errorMessage_1_803: "Upload a proof of director document to legal entity",
636
+ errorMessage_1_804: "Upload a different proof of director document",
629
637
  errorMessage_1_8009: "Organization legal name is missing from the proof of director document",
630
638
  errorMessage_1_8010: "Organization legal name is different with the one presented in the document",
631
639
  errorMessage_1_8011: "Director name is missing from the proof of director document",
@@ -642,6 +650,7 @@ const defaultTrans = {
642
650
  errorMessage_2_8193: "Director was missing.",
643
651
  errorMessage_2_8196: "proofOfOwnership document to perform verification was missing.",
644
652
  errorMessage_2_8234: "'organization.countryOfGoverningLaw' was missing.",
653
+ errorMessage_2_8236: "Proof of director was missing.",
645
654
  errorMessage_3_10: "Review of data is required",
646
655
  euVatNumber: "EU VAT number",
647
656
  exemptedFromTax: "Exempted from tax",
@@ -748,6 +757,8 @@ const defaultTrans = {
748
757
  includeFrontAndBack: "Include both the front and back side, each in separate file",
749
758
  includesEIN: "Includes your EIN (Employer Identification Number)",
750
759
  includesLegalCompanyName: "Includes the legal name of your company",
760
+ includesTheDirectorsFullName: "Includes the director’s full name",
761
+ includesEvidenceOfTheIndividualsRole: "Includes evidence of the individual’s role as director",
751
762
  individual: "Individual",
752
763
  individualDetails: "Individual details",
753
764
  individualTrustee: "Individual trustee",
@@ -762,6 +773,7 @@ const defaultTrans = {
762
773
  instantVerification: "Instant verification",
763
774
  instantVerificationDescription: "Log in to your bank account and get instantly verified.",
764
775
  institutionNumber: "Institution number",
776
+ internalCompanyDocument: "Internal company document",
765
777
  introductionScreenAccountDescriptionP1: "For example, the account holder name and account number.",
766
778
  introductionScreenAccountDescriptionP2: "This is the bank account you use to send or receive funds.",
767
779
  introductionScreenAccountTitle: "Bank account details",
@@ -845,6 +857,7 @@ const defaultTrans = {
845
857
  isYourNameMissingFromSigners: "Is your name missing from the list of signers?",
846
858
  issuedByTheTaxAuthority: "Issued by the tax authority or government of the country where the company is registered",
847
859
  issuedInTheLastXMonths: "Issued in the last %{number} months",
860
+ issuedOrSignedByALegalRepresentative: "Issued or signed by a legal representative in the last 12 months",
848
861
  issuerState: "Issuing state",
849
862
  jobTitle: "Job title",
850
863
  kaibemaksukohustuslaseNumber: "Käibemaksukohustuslase number",
@@ -1045,6 +1058,7 @@ const defaultTrans = {
1045
1058
  professionalServiceProvider: "My settlor is a professional service provider",
1046
1059
  progress: "Progress",
1047
1060
  proofOfNationalId: "Proof of national ID",
1061
+ proofOfDirector: "Proof of director",
1048
1062
  proofOfRelationship: "Proof of relationship",
1049
1063
  proofOfResidency: "Proof of residency",
1050
1064
  proofOfResidenceDocumentTypeLabel: "Upload a document as proof of address for %{name}. We need to see this document so we can more accurately verify their identity.",
@@ -1346,6 +1360,7 @@ const defaultTrans = {
1346
1360
  uploadDocumentForNric: "Upload an ID document instead of NRIC",
1347
1361
  uploadOneOfTheseDocuments: "Upload one of these documents:",
1348
1362
  uploadTheFollowingDocuments: "Upload the following documents:",
1363
+ uploadYourOrganizationProofOfDirector: "Upload your organization’s proof of director",
1349
1364
  usePhoneToScanId: "Use your phone to scan the ID",
1350
1365
  utilityBill: "Utility bill",
1351
1366
  validation8Or11Characters: "Please enter either 8 or 11 characters.",
@@ -1384,6 +1399,7 @@ const defaultTrans = {
1384
1399
  weCouldntConnectToMyinfoBusiness: "We couldn't connect to Myinfo Business",
1385
1400
  weDoNotYetSupportInstantVerificationForBankAccountsIn_: "We do not yet support instant verification for bank accounts in %{countryName}. Therefore, you must provide your account details manually.",
1386
1401
  weFoundTheFollowingIssues: "We found the following issues:",
1402
+ weNeedAnOfficialDocument: "We need an official document to verify your organization’s director. ",
1387
1403
  weSelectedSomeRolesBasedOnMyinfoBusinessDataAboutYourCompanysAppointmentHoldersAndShareholders: "We selected some roles based on Myinfo business data about your company's appointment holders and shareholders.",
1388
1404
  whatBestDescribesYourBusinessSetup: "What best describes your business setup?",
1389
1405
  whatIsTheDifferenceBetweenTheseRoles: "What is the difference between these roles?",
@@ -1437,16 +1453,10 @@ const defaultTrans = {
1437
1453
  };
1438
1454
  const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1439
1455
  __proto__: null,
1440
- default: defaultTrans
1456
+ default: defaultLocaleTranslations
1441
1457
  }, Symbol.toStringTag, { value: "Module" }));
1442
1458
  const FALLBACK_LOCALE = "en-US";
1443
- const defaultTranslation = Object.entries(defaultTrans).reduce(
1444
- (acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
1445
- ...acc,
1446
- [translationKey]: translationValue
1447
- } : acc,
1448
- {}
1449
- );
1459
+ const defaultTranslation = defaultLocaleTranslations;
1450
1460
  const determineAllowedAttributes = (allowedTags) => {
1451
1461
  const allowedAttributes = [];
1452
1462
  if (allowedTags.includes("a")) {
@@ -2017,46 +2027,61 @@ const formUtilities = (props, i18n) => ({
2017
2027
  (acc, [key, val]) => fieldKeys.includes(key) ? { ...acc, [key]: val } : acc,
2018
2028
  {}
2019
2029
  ),
2020
- getFieldErrors: (formErrors, fieldProblems, fieldKeys) => Object.keys(formErrors).reduce((acc, key) => {
2021
- var _a;
2022
- if (fieldKeys.includes(key)) {
2023
- const error = (_a = formErrors == null ? void 0 : formErrors[key]) == null ? void 0 : _a.errorMessage;
2024
- return error ? { ...acc, [key]: i18n.get(error) } : { ...acc, [key]: Boolean(fieldProblems == null ? void 0 : fieldProblems[key]) };
2025
- }
2026
- return acc;
2027
- }, {}),
2028
- getFieldLabels: (fieldKeys, fallbackLabelKeys) => fieldKeys.reduce((acc, field) => {
2029
- var _a, _b;
2030
- let translationKey = ((_a = props.labels) == null ? void 0 : _a[field]) ?? (fallbackLabelKeys == null ? void 0 : fallbackLabelKeys[field]) ?? field;
2031
- if (props.labels && !((_b = props.labels) == null ? void 0 : _b[field]) && Object.keys(props.labels).length) {
2032
- const parentKey = Object.keys(props.labels).find(
2033
- (fieldKey) => {
2034
- var _a2;
2035
- return typeof ((_a2 = props.labels) == null ? void 0 : _a2[fieldKey]) === "object";
2030
+ getFieldErrors: (formErrors, fieldProblems, fieldKeys) => Object.keys(formErrors).reduce(
2031
+ (acc, key) => {
2032
+ var _a;
2033
+ if (fieldKeys.includes(key)) {
2034
+ const error = (_a = formErrors == null ? void 0 : formErrors[key]) == null ? void 0 : _a.errorMessage;
2035
+ return error ? { ...acc, [key]: i18n.get(error) } : { ...acc, [key]: Boolean(fieldProblems == null ? void 0 : fieldProblems[key]) };
2036
+ }
2037
+ return acc;
2038
+ },
2039
+ {}
2040
+ ),
2041
+ getFieldLabels: (fieldKeys, fallbackLabelKeys) => fieldKeys.reduce(
2042
+ (acc, field) => {
2043
+ var _a, _b;
2044
+ let translationKey = ((_a = props.labels) == null ? void 0 : _a[field]) ?? (fallbackLabelKeys == null ? void 0 : fallbackLabelKeys[field]) ?? field;
2045
+ if (props.labels && !((_b = props.labels) == null ? void 0 : _b[field]) && Object.keys(props.labels).length) {
2046
+ const parentKey = Object.keys(props.labels).find(
2047
+ (fieldKey) => {
2048
+ var _a2;
2049
+ return typeof ((_a2 = props.labels) == null ? void 0 : _a2[fieldKey]) === "object";
2050
+ }
2051
+ );
2052
+ if (parentKey) {
2053
+ const nestedLabel = props.labels[parentKey][field];
2054
+ translationKey = nestedLabel ?? translationKey;
2036
2055
  }
2037
- );
2038
- if (parentKey) {
2039
- const nestedLabel = props.labels[parentKey][field];
2040
- translationKey = nestedLabel ?? translationKey;
2041
2056
  }
2042
- }
2043
- return { ...acc, [field]: i18n.get(translationKey) };
2044
- }, {}),
2045
- getFieldPlaceholders: (fieldKeys, fallbackPlaceholderKeys) => fieldKeys.reduce((acc, field) => {
2046
- var _a, _b;
2047
- const translationKey = (fallbackPlaceholderKeys == null ? void 0 : fallbackPlaceholderKeys[field]) ? ((_a = props.placeholders) == null ? void 0 : _a[field]) ?? (fallbackPlaceholderKeys == null ? void 0 : fallbackPlaceholderKeys[field]) : (_b = props.placeholders) == null ? void 0 : _b[field];
2048
- return translationKey ? { ...acc, [field]: i18n.get(translationKey) } : acc;
2049
- }, {}),
2050
- getFieldHelperText: (fieldKeys, fallbackHelperTextKeys) => fieldKeys.reduce((acc, field) => {
2051
- var _a, _b;
2052
- const translatable = (fallbackHelperTextKeys == null ? void 0 : fallbackHelperTextKeys[field]) ? ((_a = props.helperText) == null ? void 0 : _a[field]) ?? (fallbackHelperTextKeys == null ? void 0 : fallbackHelperTextKeys[field]) : (_b = props.helperText) == null ? void 0 : _b[field];
2053
- return translatable ? { ...acc, [field]: i18n.get(translatable) } : acc;
2054
- }, {}),
2055
- getFieldGuidanceText: (fieldKeys, fallbackGuidanceTextKeys) => fieldKeys.reduce((acc, field) => {
2056
- var _a, _b;
2057
- const translatable = (fallbackGuidanceTextKeys == null ? void 0 : fallbackGuidanceTextKeys[field]) ? ((_a = props.guidanceText) == null ? void 0 : _a[field]) ?? (fallbackGuidanceTextKeys == null ? void 0 : fallbackGuidanceTextKeys[field]) : (_b = props.guidanceText) == null ? void 0 : _b[field];
2058
- return translatable ? { ...acc, [field]: i18n.get(translatable) } : acc;
2059
- }, {})
2057
+ return { ...acc, [field]: i18n.get(translationKey) };
2058
+ },
2059
+ {}
2060
+ ),
2061
+ getFieldPlaceholders: (fieldKeys, fallbackPlaceholderKeys) => fieldKeys.reduce(
2062
+ (acc, field) => {
2063
+ var _a, _b;
2064
+ const translationKey = (fallbackPlaceholderKeys == null ? void 0 : fallbackPlaceholderKeys[field]) ? ((_a = props.placeholders) == null ? void 0 : _a[field]) ?? (fallbackPlaceholderKeys == null ? void 0 : fallbackPlaceholderKeys[field]) : (_b = props.placeholders) == null ? void 0 : _b[field];
2065
+ return translationKey ? { ...acc, [field]: i18n.get(translationKey) } : acc;
2066
+ },
2067
+ {}
2068
+ ),
2069
+ getFieldHelperText: (fieldKeys, fallbackHelperTextKeys) => fieldKeys.reduce(
2070
+ (acc, field) => {
2071
+ var _a, _b;
2072
+ const translatable = (fallbackHelperTextKeys == null ? void 0 : fallbackHelperTextKeys[field]) ? ((_a = props.helperText) == null ? void 0 : _a[field]) ?? (fallbackHelperTextKeys == null ? void 0 : fallbackHelperTextKeys[field]) : (_b = props.helperText) == null ? void 0 : _b[field];
2073
+ return translatable ? { ...acc, [field]: i18n.get(translatable) } : acc;
2074
+ },
2075
+ {}
2076
+ ),
2077
+ getFieldGuidanceText: (fieldKeys, fallbackGuidanceTextKeys) => fieldKeys.reduce(
2078
+ (acc, field) => {
2079
+ var _a, _b;
2080
+ const translatable = (fallbackGuidanceTextKeys == null ? void 0 : fallbackGuidanceTextKeys[field]) ? ((_a = props.guidanceText) == null ? void 0 : _a[field]) ?? (fallbackGuidanceTextKeys == null ? void 0 : fallbackGuidanceTextKeys[field]) : (_b = props.guidanceText) == null ? void 0 : _b[field];
2081
+ return translatable ? { ...acc, [field]: i18n.get(translatable) } : acc;
2082
+ },
2083
+ {}
2084
+ )
2060
2085
  });
2061
2086
  const mergeFieldMetadataIntoProps = (fieldName, metadata, otherProps) => {
2062
2087
  const existingProps = otherProps ?? {};
@@ -2174,6 +2199,7 @@ const icons = {
2174
2199
  document: lazy(() => import("./document-1-BN3bKHzc.js")),
2175
2200
  download: lazy(() => import("./download-Doa1e9Lk.js")),
2176
2201
  edit: lazy(() => import("./edit-1-CfwIJ2-1.js")),
2202
+ "external-link": lazy(() => import("./external-link-B2BGNXtd.js")),
2177
2203
  "field-error": lazy(
2178
2204
  () => import("./warning-circle-fill-FaaY90uz.js")
2179
2205
  ),
@@ -2586,16 +2612,23 @@ const Link = ({
2586
2612
  if (!isValidLink(href)) return null;
2587
2613
  const target = external ? "_blank" : "_self";
2588
2614
  const rel = external ? "external noopener noreferrer" : void 0;
2589
- const showIcon = icon || external;
2615
+ const showIcon = !!icon || external;
2616
+ const iconLeft = showIcon && iconPosition === "left" && !external;
2590
2617
  const classNames = showAsButton ? cx("adyen-kyc-button", className, {
2591
- "adyen-kyc-button--icon-left": iconPosition === "left"
2618
+ "adyen-kyc-button--icon-left": iconLeft
2592
2619
  }) : cx("adyen-kyc-link", className, {
2593
2620
  "adyen-kyc-link--with-icon": showIcon,
2594
- "adyen-kyc-link--icon-left": iconPosition === "left"
2621
+ "adyen-kyc-link--icon-left": iconLeft
2595
2622
  });
2596
2623
  return /* @__PURE__ */ jsxs("a", { href, className: classNames, target, rel, onClick, children: [
2597
2624
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-link__text adyen-kyc-link--inherit", children }),
2598
- showIcon && icon && /* @__PURE__ */ jsx(Icon, { name: icon, className: "adyen-kyc-link__icon" })
2625
+ showIcon && /* @__PURE__ */ jsx(
2626
+ Icon,
2627
+ {
2628
+ name: external ? "external-link" : icon,
2629
+ className: "adyen-kyc-link__icon"
2630
+ }
2631
+ )
2599
2632
  ] });
2600
2633
  };
2601
2634
  const NavigateToFieldLink = ({ fieldName, label }) => {
@@ -2818,6 +2851,7 @@ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
2818
2851
  ExperimentNames2["EnableKompanySearchByRegistrationNumber"] = "EnableKompanySearchByRegistrationNumber";
2819
2852
  ExperimentNames2["EnableNewAddressComponent"] = "EnableNewAddressComponent";
2820
2853
  ExperimentNames2["EnableNewPhoneField"] = "EnableNewPhoneField";
2854
+ ExperimentNames2["EnableBankDocumentLimitedToBankStatement"] = "EnableBankDocumentLimitedToBankStatement";
2821
2855
  ExperimentNames2["AllowMoreRolesForMainRootTrustee"] = "AllowMoreRolesForMainRootTrustee";
2822
2856
  ExperimentNames2["ShowUnsupportedEntityType"] = "ShowUnsupportedEntityType";
2823
2857
  ExperimentNames2["ShowSingPassButtonForCompanies"] = "ShowSingPassButtonForCompanies";
@@ -3299,14 +3333,17 @@ function reducer({
3299
3333
  const mergeStaticAndAsyncErrorsState = (staticValidationErrors, asyncValidationErrors, schema, setValid, optionalFields) => {
3300
3334
  const fields = optionalFields ? [...schema, ...optionalFields] : schema;
3301
3335
  if (!fields.length) return staticValidationErrors;
3302
- const errors = fields.reduce((acc, field) => {
3303
- var _a, _b;
3304
- if ((_a = asyncValidationErrors[field]) == null ? void 0 : _a.getError()) setValid(field, false);
3305
- return {
3306
- ...acc,
3307
- [field]: staticValidationErrors[field] ?? ((_b = asyncValidationErrors[field]) == null ? void 0 : _b.getError()) ?? null
3308
- };
3309
- }, {});
3336
+ const errors = fields.reduce(
3337
+ (acc, field) => {
3338
+ var _a, _b;
3339
+ if ((_a = asyncValidationErrors[field]) == null ? void 0 : _a.getError()) setValid(field, false);
3340
+ return {
3341
+ ...acc,
3342
+ [field]: staticValidationErrors[field] ?? ((_b = asyncValidationErrors[field]) == null ? void 0 : _b.getError()) ?? null
3343
+ };
3344
+ },
3345
+ {}
3346
+ );
3310
3347
  return errors;
3311
3348
  };
3312
3349
  function useForm({
@@ -5482,6 +5519,9 @@ const businessRegistrationNumberMasks = {
5482
5519
  transformOnType: uppercase
5483
5520
  }
5484
5521
  },
5522
+ [CountryCodes.Malaysia]: {
5523
+ default: { mask: makeMask(...numericInputs(12)) }
5524
+ },
5485
5525
  [CountryCodes.Malta]: {
5486
5526
  default: {
5487
5527
  mask: makeMask(
@@ -5492,6 +5532,7 @@ const businessRegistrationNumberMasks = {
5492
5532
  )
5493
5533
  }
5494
5534
  },
5535
+ [CountryCodes.Mexico]: { default: { mask: makeMask(...alphanumericInputs(12)) } },
5495
5536
  [CountryCodes.Monaco]: {
5496
5537
  default: {
5497
5538
  mask: makeMask(...alphanumericInputs(8), ...alphanumericInputs(3, true)),
@@ -6263,8 +6304,9 @@ const businessRegistrationNumberPatterns = {
6263
6304
  [CountryCodes.Liechtenstein]: { default: /FL-[0-9]{4}[.][0-9]{3}[.][0-9]{3}-[0-9]$/ },
6264
6305
  [CountryCodes.Lithuania]: { default: /^\d{6,9}$/ },
6265
6306
  [CountryCodes.Luxembourg]: { default: /^[a-zA-Z]\d{5,7}$/ },
6266
- [CountryCodes.Malaysia]: { default: /^[A-Za-z0-9]{7,8}$|^[A-Za-z0-9]{12}$/ },
6307
+ [CountryCodes.Malaysia]: { default: /^\d{7}$|^\d{12}$/ },
6267
6308
  [CountryCodes.Malta]: { default: /^C\s?\d{4,6}$/ },
6309
+ [CountryCodes.Mexico]: { default: /^\D{3}\d{6}\w{3}$/ },
6268
6310
  [CountryCodes.Monaco]: {
6269
6311
  default: /^[0-9]{2}[A-Z]{1,3}[0-9]{5}$/,
6270
6312
  soleProprietorship: /^\d{2,4}[A-Z]\d{5}$/
@@ -6832,10 +6874,32 @@ const defaultFieldConfig$9 = {
6832
6874
  }
6833
6875
  },
6834
6876
  [CountryCodes.Malaysia]: {
6835
- label: "companyNumber"
6877
+ label: "SSM",
6878
+ mask: businessRegistrationNumberMasks[CountryCodes.Malaysia].default,
6879
+ validators: validatePatternOnBlur(
6880
+ businessRegistrationNumberPatterns[CountryCodes.Malaysia].default
6881
+ ),
6882
+ guidanceText: {
6883
+ key: "enterAMaximumOfNCharactersWithAMixForExample",
6884
+ values: {
6885
+ maxChars: "12",
6886
+ example: "1234567, 201901000005"
6887
+ }
6888
+ }
6836
6889
  },
6837
6890
  [CountryCodes.Mexico]: {
6838
- label: "RFC"
6891
+ label: "RFC",
6892
+ mask: businessRegistrationNumberMasks[CountryCodes.Mexico].default,
6893
+ validators: validatePatternOnBlur(
6894
+ businessRegistrationNumberPatterns[CountryCodes.Mexico].default
6895
+ ),
6896
+ guidanceText: {
6897
+ key: "enterNDigitsForExample",
6898
+ values: {
6899
+ numDigits: "12",
6900
+ example: "LFM200817DGA"
6901
+ }
6902
+ }
6839
6903
  },
6840
6904
  [CountryCodes.Monaco]: ({ companyType }) => companyType === CompanyTypesValue.SOLE_PROPRIETORSHIP ? {
6841
6905
  label: "mcRegistrationNumberSoleProp",
@@ -7064,6 +7128,9 @@ const defaultFieldConfig$9 = {
7064
7128
  }
7065
7129
  }
7066
7130
  },
7131
+ [CountryCodes.UnitedArabEmirates]: {
7132
+ label: "commercialLicence"
7133
+ },
7067
7134
  [CountryCodes.UnitedKingdom]: ({ companyType }) => {
7068
7135
  switch (companyType) {
7069
7136
  case "nonProfit":
@@ -10249,7 +10316,7 @@ const companyRegistrationDetailsFields = [
10249
10316
  ...DATE_OF_INCORPORATION_FIELD,
10250
10317
  ...EINVOICING_CODE_FIELD
10251
10318
  ];
10252
- function CompanyRegistrationDetailsComponent(props) {
10319
+ function CompanyRegistrationDetails(props) {
10253
10320
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
10254
10321
  let mergedProps = props;
10255
10322
  const COMPANY_REGISTRATION_DETAILS = mergedProps.id ?? "companyRegistrationDetails";
@@ -11031,7 +11098,7 @@ const companyTypeValidationRules = {
11031
11098
  }
11032
11099
  };
11033
11100
  const companyTypeFields = ["entityType"];
11034
- function CompanyTypeComponent(props) {
11101
+ function CompanyType(props) {
11035
11102
  const { i18n } = useI18nContext();
11036
11103
  const { isSettingEnabled } = useSettingsContext();
11037
11104
  const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
@@ -11517,7 +11584,7 @@ function TextArea(props) {
11517
11584
  ] });
11518
11585
  }
11519
11586
  const DESCRIPTION_CHARACTERS_LIMIT = 200;
11520
- function DocumentUploadComponent({
11587
+ function DocumentUpload({
11521
11588
  documentType,
11522
11589
  documentField,
11523
11590
  guidanceHeader,
@@ -11636,8 +11703,8 @@ function DocumentUploadComponent({
11636
11703
  }
11637
11704
  );
11638
11705
  }
11639
- const DocumentUpload = memo(
11640
- DocumentUploadComponent,
11706
+ const MemoizedDocumentUpload = memo(
11707
+ DocumentUpload,
11641
11708
  (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.documentTypeSelect, nextProps.documentTypeSelect) && prevProps.documentField === nextProps.documentField && prevProps.name === nextProps.name && prevProps.country === nextProps.country && prevProps.companyType === nextProps.companyType
11642
11709
  );
11643
11710
  var Currencies = /* @__PURE__ */ ((Currencies2) => {
@@ -12299,7 +12366,7 @@ function StateField({
12299
12366
  }
12300
12367
  );
12301
12368
  }
12302
- function FieldContainer(props) {
12369
+ function FieldContainer$1(props) {
12303
12370
  const { i18n } = useI18nContext();
12304
12371
  const {
12305
12372
  classNameModifiers = [],
@@ -12885,7 +12952,7 @@ const addressValidationRulesV4 = (country, i18n) => {
12885
12952
  ]
12886
12953
  };
12887
12954
  };
12888
- function Address(props) {
12955
+ function AddressForm(props) {
12889
12956
  const {
12890
12957
  data: dataProp,
12891
12958
  requiredFields: requiredFieldsProp,
@@ -13006,7 +13073,7 @@ function Address(props) {
13006
13073
  if (!formUtils.isRequiredField(fieldName) && !formUtils.isOptionalField(fieldName)) return null;
13007
13074
  const hideField = fieldName === "country" && hideCountry;
13008
13075
  return /* @__PURE__ */ jsx(
13009
- FieldContainer,
13076
+ FieldContainer$1,
13010
13077
  {
13011
13078
  classNameModifiers: [fieldName],
13012
13079
  data,
@@ -13116,7 +13183,7 @@ function Address(props) {
13116
13183
  }
13117
13184
  );
13118
13185
  }
13119
- Address.defaultProps = {
13186
+ AddressForm.defaultProps = {
13120
13187
  data: {},
13121
13188
  onChange: () => {
13122
13189
  },
@@ -13204,7 +13271,7 @@ const generateSearchListItem = (item, i18n) => /* @__PURE__ */ jsxs(Fragment, {
13204
13271
  /* @__PURE__ */ jsx(Icon, { name: "arrow-right", className: "adyen-kyc-dropdown-search-element__addresses--icon" })
13205
13272
  ] })
13206
13273
  ] });
13207
- function FieldContainerComponent({
13274
+ function FieldContainer({
13208
13275
  legalEntityId = "",
13209
13276
  classNameModifiers = [],
13210
13277
  schema,
@@ -13450,7 +13517,7 @@ function FieldContainerComponent({
13450
13517
  };
13451
13518
  return hideField ? null : renderField(fieldName);
13452
13519
  }
13453
- function AddressComponent({
13520
+ function Address({
13454
13521
  data,
13455
13522
  labels: labels2,
13456
13523
  placeholders,
@@ -13543,11 +13610,11 @@ function AddressComponent({
13543
13610
  isValid
13544
13611
  });
13545
13612
  }, [formData, formErrors, formFieldProblems, formSchema, formValid, isValid]);
13546
- const createFieldComponent = (fieldName) => {
13613
+ const createField = (fieldName) => {
13547
13614
  if (!formUtils.isRequiredField(fieldName) && !formUtils.isOptionalField(fieldName)) return null;
13548
13615
  const hideField = fieldName === "country" && hideCountry;
13549
13616
  return /* @__PURE__ */ jsx(
13550
- FieldContainerComponent,
13617
+ FieldContainer,
13551
13618
  {
13552
13619
  classNameModifiers: [fieldName],
13553
13620
  schema: formSchema,
@@ -13579,18 +13646,18 @@ function AddressComponent({
13579
13646
  switch (formData == null ? void 0 : formData.country) {
13580
13647
  case "US":
13581
13648
  return /* @__PURE__ */ jsxs("fieldset", { className: "adyen-kyc-address", children: [
13582
- formSchema.filter((field) => !condensedFields.includes(field)).map((filteredField) => createFieldComponent(filteredField)),
13583
- condensedFields.length && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-address__condensed-fields", children: condensedFields.map((field) => createFieldComponent(field)) })
13649
+ formSchema.filter((field) => !condensedFields.includes(field)).map((filteredField) => createField(filteredField)),
13650
+ condensedFields.length && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-address__condensed-fields", children: condensedFields.map((field) => createField(field)) })
13584
13651
  ] });
13585
13652
  default:
13586
- return /* @__PURE__ */ jsx("fieldset", { className: "adyen-kyc-address", children: formSchema.map((field) => createFieldComponent(field)) });
13653
+ return /* @__PURE__ */ jsx("fieldset", { className: "adyen-kyc-address", children: formSchema.map((field) => createField(field)) });
13587
13654
  }
13588
13655
  }
13589
- return /* @__PURE__ */ jsx("fieldset", { className: "adyen-kyc-address", children: formSchema.map((field) => createFieldComponent(field)) });
13656
+ return /* @__PURE__ */ jsx("fieldset", { className: "adyen-kyc-address", children: formSchema.map((field) => createField(field)) });
13590
13657
  }
13591
13658
  function AddressExperimentWrapper(props) {
13592
13659
  const { isExperimentEnabled } = useExperimentsContext();
13593
- return isExperimentEnabled("EnableNewAddressComponent") ? /* @__PURE__ */ jsx(AddressComponent, { ...props }) : /* @__PURE__ */ jsx(Address, { ...props });
13660
+ return isExperimentEnabled("EnableNewAddressComponent") ? /* @__PURE__ */ jsx(Address, { ...props }) : /* @__PURE__ */ jsx(AddressForm, { ...props });
13594
13661
  }
13595
13662
  var operationalAddressIsSameIds = /* @__PURE__ */ ((operationalAddressIsSameIds2) => {
13596
13663
  operationalAddressIsSameIds2["OPERATIONAL_ADDRESS_IS_SAME"] = "OperationAddressAnswerYes";
@@ -13633,7 +13700,7 @@ const registrationAddressForms = {
13633
13700
  };
13634
13701
  const registrationAddressFormID = registrationAddressForms.registrationAddress.formId;
13635
13702
  const operationalAddressFormID = registrationAddressForms.operationalAddress.formId;
13636
- function RegistrationAddressComponent(props) {
13703
+ function RegistrationAddress(props) {
13637
13704
  var _a, _b, _c, _d, _e;
13638
13705
  const { i18n } = useI18nContext();
13639
13706
  const {
@@ -13868,7 +13935,7 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
13868
13935
  }
13869
13936
  }
13870
13937
  };
13871
- const GuidanceContent$1 = ({
13938
+ const GuidanceContent$2 = ({
13872
13939
  country,
13873
13940
  companyType
13874
13941
  }) => {
@@ -13892,7 +13959,7 @@ const GuidanceContent$1 = ({
13892
13959
  /* @__PURE__ */ jsx(List, { className: "adyen-kyc-upload-field__requirements", children: /* @__PURE__ */ jsx(ListItem, { children: i18n.get("documentIssuedByGovernmentAuthority") }) })
13893
13960
  ] }) });
13894
13961
  };
13895
- function RegistrationDocumentComponent({
13962
+ function RegistrationDocument({
13896
13963
  id,
13897
13964
  country,
13898
13965
  companyType = CompanyTypesValue.PRIVATE_COMPANY,
@@ -13902,7 +13969,7 @@ function RegistrationDocumentComponent({
13902
13969
  }) {
13903
13970
  const { i18n } = useI18nContext();
13904
13971
  return /* @__PURE__ */ jsx(
13905
- DocumentUpload,
13972
+ MemoizedDocumentUpload,
13906
13973
  {
13907
13974
  ...props,
13908
13975
  id,
@@ -13910,7 +13977,7 @@ function RegistrationDocumentComponent({
13910
13977
  description: i18n.get(description),
13911
13978
  documentField: "registrationDocument",
13912
13979
  documentType: DocumentType.REGISTRATION_DOCUMENT,
13913
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
13980
+ guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, { country, companyType }),
13914
13981
  companyType,
13915
13982
  country
13916
13983
  }
@@ -13963,7 +14030,7 @@ const ACCEPTED_DOCUMENTS_MAP = {
13963
14030
  }
13964
14031
  }
13965
14032
  };
13966
- const GuidanceContent = ({
14033
+ const GuidanceContent$1 = ({
13967
14034
  country,
13968
14035
  companyType
13969
14036
  }) => {
@@ -13991,7 +14058,7 @@ const GuidanceContent = ({
13991
14058
  ] })
13992
14059
  ] }) });
13993
14060
  };
13994
- function TaxDocumentComponent({
14061
+ function TaxDocument({
13995
14062
  id,
13996
14063
  country,
13997
14064
  companyType = CompanyTypesValue.PRIVATE_COMPANY,
@@ -14001,7 +14068,7 @@ function TaxDocumentComponent({
14001
14068
  }) {
14002
14069
  const { i18n } = useI18nContext();
14003
14070
  return /* @__PURE__ */ jsx(
14004
- DocumentUpload,
14071
+ MemoizedDocumentUpload,
14005
14072
  {
14006
14073
  ...props,
14007
14074
  id,
@@ -14009,12 +14076,55 @@ function TaxDocumentComponent({
14009
14076
  description: i18n.get(description),
14010
14077
  documentField: "taxDocument",
14011
14078
  documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
14012
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
14079
+ guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
14013
14080
  companyType,
14014
14081
  country
14015
14082
  }
14016
14083
  );
14017
14084
  }
14085
+ const documentTypes = [
14086
+ { id: "Internal company document", name: "internalCompanyDocument" },
14087
+ { id: "Business registry statement", name: "businessRegistryStatement" }
14088
+ ];
14089
+ const GuidanceContent = () => {
14090
+ const { i18n } = useI18nContext();
14091
+ return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
14092
+ /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
14093
+ /* @__PURE__ */ jsxs(List, { className: "adyen-kyc-u-margin-left-8", children: [
14094
+ /* @__PURE__ */ jsx(ListItem, { children: i18n.get("includesTheDirectorsFullName") }),
14095
+ /* @__PURE__ */ jsx(ListItem, { children: i18n.get("includesEvidenceOfTheIndividualsRole") }),
14096
+ /* @__PURE__ */ jsx(ListItem, { children: i18n.get("issuedOrSignedByALegalRepresentative") })
14097
+ ] })
14098
+ ] }) });
14099
+ };
14100
+ function ProofOfDirectorDocument({
14101
+ id,
14102
+ country,
14103
+ heading = "uploadYourOrganizationProofOfDirector",
14104
+ description = "weNeedAnOfficialDocument",
14105
+ ...props
14106
+ }) {
14107
+ const { i18n } = useI18nContext();
14108
+ const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
14109
+ return /* @__PURE__ */ jsx(
14110
+ MemoizedDocumentUpload,
14111
+ {
14112
+ ...props,
14113
+ id,
14114
+ heading: i18n.get(heading),
14115
+ description: i18n.get(description),
14116
+ documentField: "proofOfDirector",
14117
+ documentType: DocumentType.PROOF_OF_DIRECTOR,
14118
+ guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, {}),
14119
+ country,
14120
+ documentTypeSelect: {
14121
+ selectedType: selectedDocumentName,
14122
+ setSelectedType: setSelectedDocumentName,
14123
+ options: documentTypes
14124
+ }
14125
+ }
14126
+ );
14127
+ }
14018
14128
  const companyForms = {
14019
14129
  companyNameAndCountry: {
14020
14130
  formId: "companyNameAndCountry",
@@ -14050,6 +14160,13 @@ const companyForms = {
14050
14160
  formDescription: "companyTaxDocumentFormDescription",
14051
14161
  fields: ["taxDocument"]
14052
14162
  },
14163
+ companyProofOfDirectorDocument: {
14164
+ formId: "companyProofOfDirectorDocument",
14165
+ formName: "proofOfDirector",
14166
+ formHeading: "uploadYourOrganizationProofOfDirector",
14167
+ formDescription: "weNeedAnOfficialDocument",
14168
+ fields: ["proofOfDirector"]
14169
+ },
14053
14170
  companyFinancialInformation: {
14054
14171
  formId: "companyFinancialInformation",
14055
14172
  formName: "financialInformation",
@@ -14064,9 +14181,14 @@ const CompanyRegistrationDetailsFormID = companyForms.companyRegistrationDetails
14064
14181
  const CompanyRegistrationAddressFormID = companyForms.companyRegistrationAddress.formId;
14065
14182
  const CompanyRegistrationDocumentFormID = companyForms.companyRegistrationDocument.formId;
14066
14183
  const CompanyTaxDocumentFormID = companyForms.companyTaxDocument.formId;
14184
+ const CompanyProofOfDocumentFormID = companyForms.companyProofOfDirectorDocument.formId;
14067
14185
  const CompanyFinancialInformationFormID = companyForms.companyFinancialInformation.formId;
14068
- const companyDocumentForms = [CompanyRegistrationDocumentFormID, CompanyTaxDocumentFormID];
14069
- function CompanyComponent(props) {
14186
+ const companyDocumentForms = [
14187
+ CompanyRegistrationDocumentFormID,
14188
+ CompanyTaxDocumentFormID,
14189
+ CompanyProofOfDocumentFormID
14190
+ ];
14191
+ function Company(props) {
14070
14192
  const { i18n } = useI18nContext();
14071
14193
  const [currentCompanyType, setCurrentCompanyType] = useState(void 0);
14072
14194
  const [currentCountry, setCurrentCountry] = useState(props.country);
@@ -14077,6 +14199,7 @@ function CompanyComponent(props) {
14077
14199
  const companyRegistrationAddressFormProps = getNestedOuterFormPropsFromOuterFormProps(props, CompanyRegistrationAddressFormID);
14078
14200
  const companyRegistrationDocumentFormProps = getFormProps(props, CompanyRegistrationDocumentFormID);
14079
14201
  const companyTaxDocumentFormProps = getFormProps(props, CompanyTaxDocumentFormID);
14202
+ const companyProofOfDocumentDocumentFormProps = getFormProps(props, CompanyProofOfDocumentFormID);
14080
14203
  const companyFinancialInformationFormProps = getFormProps(props, CompanyFinancialInformationFormID);
14081
14204
  const handleStateChange = ({ currentState, prevState }) => {
14082
14205
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -14117,7 +14240,7 @@ function CompanyComponent(props) {
14117
14240
  {
14118
14241
  className: props.activeForm.formId !== CompanyTypeFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
14119
14242
  children: /* @__PURE__ */ jsx(
14120
- CompanyTypeComponent,
14243
+ CompanyType,
14121
14244
  {
14122
14245
  ...companyTypeFormProps,
14123
14246
  heading: i18n.get("companyStructure"),
@@ -14132,7 +14255,7 @@ function CompanyComponent(props) {
14132
14255
  {
14133
14256
  className: props.activeForm.formId !== CompanyRegistrationDetailsFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
14134
14257
  children: /* @__PURE__ */ jsx(
14135
- CompanyRegistrationDetailsComponent,
14258
+ CompanyRegistrationDetails,
14136
14259
  {
14137
14260
  ...companyRegistrationDetailsFormProps,
14138
14261
  heading: i18n.get("registrationDetails"),
@@ -14149,7 +14272,7 @@ function CompanyComponent(props) {
14149
14272
  {
14150
14273
  className: props.activeForm.formId !== CompanyRegistrationAddressFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
14151
14274
  children: /* @__PURE__ */ jsx(
14152
- RegistrationAddressComponent,
14275
+ RegistrationAddress,
14153
14276
  {
14154
14277
  ...companyRegistrationAddressFormProps,
14155
14278
  heading: i18n.get("registeredAddress"),
@@ -14170,7 +14293,7 @@ function CompanyComponent(props) {
14170
14293
  {
14171
14294
  className: props.activeForm.formId !== CompanyRegistrationDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
14172
14295
  children: /* @__PURE__ */ jsx(
14173
- RegistrationDocumentComponent,
14296
+ RegistrationDocument,
14174
14297
  {
14175
14298
  ...companyRegistrationDocumentFormProps,
14176
14299
  id: companyForms.companyRegistrationDocument.formId,
@@ -14187,7 +14310,7 @@ function CompanyComponent(props) {
14187
14310
  {
14188
14311
  className: props.activeForm.formId !== CompanyTaxDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
14189
14312
  children: currentCountry === "US" ? /* @__PURE__ */ jsx(
14190
- TaxDocumentComponent,
14313
+ TaxDocument,
14191
14314
  {
14192
14315
  ...companyTaxDocumentFormProps,
14193
14316
  id: CompanyTaxDocumentFormID,
@@ -14197,7 +14320,7 @@ function CompanyComponent(props) {
14197
14320
  companyType: currentCompanyType
14198
14321
  }
14199
14322
  ) : /* @__PURE__ */ jsx(
14200
- DocumentUpload,
14323
+ MemoizedDocumentUpload,
14201
14324
  {
14202
14325
  ...companyTaxDocumentFormProps,
14203
14326
  documentField: "taxDocument",
@@ -14220,6 +14343,22 @@ function CompanyComponent(props) {
14220
14343
  )
14221
14344
  }
14222
14345
  ),
14346
+ /* @__PURE__ */ jsx(
14347
+ "div",
14348
+ {
14349
+ className: props.activeForm.formId !== CompanyProofOfDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
14350
+ children: /* @__PURE__ */ jsx(
14351
+ ProofOfDirectorDocument,
14352
+ {
14353
+ ...companyProofOfDocumentDocumentFormProps,
14354
+ id: companyForms.companyProofOfDirectorDocument.formId,
14355
+ heading: companyForms.companyProofOfDirectorDocument.formHeading,
14356
+ description: companyForms.companyProofOfDirectorDocument.formDescription,
14357
+ country: currentCountry
14358
+ }
14359
+ )
14360
+ }
14361
+ ),
14223
14362
  /* @__PURE__ */ jsx(
14224
14363
  "div",
14225
14364
  {
@@ -14490,7 +14629,10 @@ const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
14490
14629
  CountryCodes.UnitedStates,
14491
14630
  CountryCodes.Guernsey,
14492
14631
  CountryCodes.Jersey,
14493
- CountryCodes.IsleOfMan
14632
+ CountryCodes.IsleOfMan,
14633
+ CountryCodes.Mexico,
14634
+ CountryCodes.Brazil,
14635
+ CountryCodes.Malaysia
14494
14636
  ];
14495
14637
  const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [
14496
14638
  CountryCodes.Singapore
@@ -14929,16 +15071,6 @@ const businessDetailsBaseMapping = {
14929
15071
  "additionalInformation.operationalAddress.address": "organization.principalPlaceOfBusiness.street",
14930
15072
  "additionalInformation.operationalAddress.otherAddressInformation": "organization.principalPlaceOfBusiness.street2"
14931
15073
  };
14932
- const customerSupportMapping = {
14933
- "customerSupport.email": "organization.support.email",
14934
- "customerSupport.phoneNumber": "organization.support.phone.number",
14935
- "customerSupport.phone.number": "organization.support.phone.number",
14936
- "customerSupport.phone.phoneCountryCode": "organization.support.phone.phoneCountryCode",
14937
- "customerSupport.phone.type": "organization.support.phone.type"
14938
- };
14939
- const customerSupportApiKeyMapping = {
14940
- ...reverseObject(customerSupportMapping)
14941
- };
14942
15074
  const companyBaseMapping = {
14943
15075
  "companyNameAndCountry.country": "organization.registeredAddress.country",
14944
15076
  "companyNameAndCountry.legalCompanyName": "organization.legalName",
@@ -15068,13 +15200,15 @@ const remediationCompanyApiKeyMapping = {
15068
15200
  ...businessDetailsApiKeyMapping,
15069
15201
  [DocumentType.REGISTRATION_DOCUMENT]: "companyRegistrationDocument.registrationDocument",
15070
15202
  [DocumentType.VAT_DOCUMENT]: "companyTaxDocument.taxDocument",
15071
- [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO]: "companyTaxDocument.taxDocument"
15203
+ [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO]: "companyTaxDocument.taxDocument",
15204
+ [DocumentType.PROOF_OF_DIRECTOR]: "companyProofOfDirectorDocument.proofOfDirector"
15072
15205
  };
15073
15206
  const remediationBusinessDetailsApiKeyMapping = {
15074
15207
  ...businessDetailsApiKeyMapping,
15075
15208
  [DocumentType.REGISTRATION_DOCUMENT]: "companyRegistrationDocument.registrationDocument",
15076
15209
  [DocumentType.VAT_DOCUMENT]: "companyTaxDocument.taxDocument",
15077
- [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO]: "companyTaxDocument.taxDocument"
15210
+ [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO]: "companyTaxDocument.taxDocument",
15211
+ [DocumentType.PROOF_OF_DIRECTOR]: "companyProofOfDirectorDocument.proofOfDirector"
15078
15212
  };
15079
15213
  const remediationIndividualApiKeyMapping = {
15080
15214
  ...individualApiKeyMapping,
@@ -15105,7 +15239,8 @@ const legalEntityDocumentToFieldMapping = {
15105
15239
  [LegalEntityType.ORGANIZATION]: {
15106
15240
  [DocumentType.REGISTRATION_DOCUMENT]: "companyRegistrationDocument.registrationDocument",
15107
15241
  [DocumentType.VAT_DOCUMENT]: "companyTaxDocument.taxDocument",
15108
- [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO]: "companyTaxDocument.taxDocument"
15242
+ [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO]: "companyTaxDocument.taxDocument",
15243
+ [DocumentType.PROOF_OF_DIRECTOR]: "companyProofOfDirectorDocument.proofOfDirector"
15109
15244
  },
15110
15245
  [LegalEntityType.SOLE_PROPRIETORSHIP]: {
15111
15246
  [DocumentType.CONSTITUTIONAL_DOCUMENT]: "solePropConstitutionalDocument.constitutionalDocument"
@@ -15250,7 +15385,7 @@ const mapFinancialInformationToFinancialReport = ({
15250
15385
  }) => ({
15251
15386
  currencyOfFinancialData: currency,
15252
15387
  dateOfFinancialData: financialReportingDate,
15253
- employeeCount: numberOfEmployees.toFixed(0),
15388
+ employeeCount: typeof numberOfEmployees === "number" ? numberOfEmployees.toFixed(0) : numberOfEmployees,
15254
15389
  netAssets: (netAssets == null ? void 0 : netAssets.toFixed(2)) ?? void 0,
15255
15390
  annualTurnover: (annualTurnover == null ? void 0 : annualTurnover.toFixed(2)) ?? void 0
15256
15391
  });
@@ -15444,21 +15579,6 @@ const mapTrustToLegalEntity = (data) => {
15444
15579
  requestObj.type = LegalEntityType.TRUST;
15445
15580
  return requestObj;
15446
15581
  };
15447
- const mapLegalEntityToCustomerSupport = (legalEntity) => formatObject(legalEntity, customerSupportMapping);
15448
- const mapCustomerSupportToLegalEntity = (customerSupport) => {
15449
- var _a, _b;
15450
- const requestObj = formatObject(customerSupport, customerSupportApiKeyMapping);
15451
- const phone2 = ((_a = customerSupport.customerSupport) == null ? void 0 : _a.phone) ?? {
15452
- number: (_b = customerSupport.customerSupport) == null ? void 0 : _b.phoneNumber,
15453
- type: "mobile"
15454
- };
15455
- if (phone2.number) {
15456
- requestObj.organization.support.phone = phone2;
15457
- } else {
15458
- delete requestObj.organization.support.phone;
15459
- }
15460
- return requestObj;
15461
- };
15462
15582
  const mapLegalEntityToHighExposure = (legalEntity) => formatObject(legalEntity, highExposureComponentsKeyMapping);
15463
15583
  const mapHighExposureToLegalEntity = (data) => ({
15464
15584
  ...formatObject(data, highExposureApiKeyMapping)
@@ -15613,7 +15733,8 @@ const mapApiDocumentToIndividualDocuments = (entityId) => {
15613
15733
  const mapCompanyDocumentToApiDocument = async (data, entityId) => {
15614
15734
  const {
15615
15735
  companyRegistrationDocument: { registrationDocument },
15616
- companyTaxDocument: { taxDocument }
15736
+ companyTaxDocument: { taxDocument },
15737
+ companyProofOfDirectorDocument: { proofOfDirector }
15617
15738
  } = data;
15618
15739
  const entityType = "legalEntity";
15619
15740
  const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
@@ -15631,6 +15752,12 @@ const mapCompanyDocumentToApiDocument = async (data, entityId) => {
15631
15752
  entityType,
15632
15753
  documentType: taxDocumentType,
15633
15754
  page1: taxDocument == null ? void 0 : taxDocument[0]
15755
+ }),
15756
+ createDocumentRequest({
15757
+ entityId,
15758
+ entityType,
15759
+ documentType: DocumentType.PROOF_OF_DIRECTOR,
15760
+ page1: proofOfDirector == null ? void 0 : proofOfDirector[0]
15634
15761
  })
15635
15762
  // Add this when we need shareholder document functionality
15636
15763
  // createDocumentRequest(legalEntityId, 'legalEntity', DocumentType.SHAREHOLDER_DOCUMENT, shareholderDocument?.[0])
@@ -15640,9 +15767,11 @@ const mapCompanyDocumentToApiDocument = async (data, entityId) => {
15640
15767
  const mapApiDocumentToCompanyDocuments = (entityId) => {
15641
15768
  const registrationDocument = getDocument$1(entityId, DocumentType.REGISTRATION_DOCUMENT) || null;
15642
15769
  const taxDocument = getDocument$1(entityId, DocumentType.VAT_DOCUMENT) ?? getDocument$1(entityId, DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO) ?? null;
15770
+ const proofOfDirector = getDocument$1(entityId, DocumentType.PROOF_OF_DIRECTOR) || null;
15643
15771
  return {
15644
15772
  companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : null,
15645
- companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : null
15773
+ companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : null,
15774
+ companyProofOfDirectorDocument: proofOfDirector ? { proofOfDirector: [mapExistingFile(getPageName(proofOfDirector))] } : null
15646
15775
  };
15647
15776
  };
15648
15777
  const mapTrustDocumentToApiDocument = async (data, entityId) => {
@@ -15729,7 +15858,7 @@ const documentTypeValidationRules$1 = {
15729
15858
  modes: ["blur", "input"]
15730
15859
  }
15731
15860
  };
15732
- function IdDocumentManualUploadComponent(props) {
15861
+ function IdDocumentManualUpload(props) {
15733
15862
  var _a;
15734
15863
  const { i18n } = useI18nContext();
15735
15864
  const [idFrontPage, setIdFrontPage] = useState({});
@@ -15892,8 +16021,8 @@ function IdDocumentManualUploadComponent(props) {
15892
16021
  ) })
15893
16022
  ] });
15894
16023
  }
15895
- const IdDocumentManualUpload = memo(
15896
- IdDocumentManualUploadComponent,
16024
+ const MemoizedIdDocumentManualUpload = memo(
16025
+ IdDocumentManualUpload,
15897
16026
  (prevProps, nextProps) => objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.name === nextProps.name
15898
16027
  );
15899
16028
  const useIdVerificationToken = ({
@@ -15988,18 +16117,13 @@ const getOnfidoLocaleConfig = (i18n) => {
15988
16117
  const initOnfido = async ({
15989
16118
  token,
15990
16119
  i18n,
15991
- onIdVerificationClose,
15992
16120
  onIdVerificationComplete,
15993
16121
  onIdVerificationError
15994
16122
  }) => {
15995
- const { init: init2 } = await import("onfido-sdk-ui");
15996
- return init2({
16123
+ return Onfido.init({
15997
16124
  token,
15998
16125
  containerId,
15999
16126
  disableAnalytics: false,
16000
- useModal: false,
16001
- isModalOpen: false,
16002
- onUserExit: onIdVerificationClose,
16003
16127
  onComplete: onIdVerificationComplete,
16004
16128
  onError: onIdVerificationError,
16005
16129
  steps: [
@@ -16018,12 +16142,11 @@ const initOnfido = async ({
16018
16142
  language: getOnfidoLocaleConfig(i18n)
16019
16143
  });
16020
16144
  };
16021
- const logger$D = createLogger("IdVerificationComponent");
16022
- function IdVerificationComponent({
16145
+ const logger$D = createLogger("IdVerification");
16146
+ function IdVerification({
16023
16147
  userDetails,
16024
16148
  legalEntityId,
16025
16149
  handleGetIdVerificationToken,
16026
- onIdVerificationClose,
16027
16150
  onIdVerificationError,
16028
16151
  onIdVerificationComplete
16029
16152
  }) {
@@ -16043,19 +16166,15 @@ function IdVerificationComponent({
16043
16166
  onfidoSdk.current = await initOnfido({
16044
16167
  token: sdkToken2,
16045
16168
  i18n,
16046
- onIdVerificationClose,
16047
16169
  onIdVerificationError,
16048
- onIdVerificationComplete
16170
+ onIdVerificationComplete,
16171
+ language: getOnfidoLocaleConfig(i18n)
16049
16172
  });
16050
16173
  })().catch(logger$D.error);
16051
- return () => {
16052
- if (onfidoSdk.current) onfidoSdk.current.tearDown();
16174
+ return async () => {
16175
+ if (onfidoSdk.current) await onfidoSdk.current.tearDown();
16053
16176
  };
16054
- }, [sdkToken2]);
16055
- useEffect(() => {
16056
- if (!onfidoSdk.current) return;
16057
- onfidoSdk.current.setOptions({ language: getOnfidoLocaleConfig(i18n) });
16058
- }, [i18n.locale]);
16177
+ }, [sdkToken2, i18n]);
16059
16178
  return /* @__PURE__ */ jsx(LoaderWrapper, { status: loadingStatus, children: /* @__PURE__ */ jsx("div", { id: containerId, className: containerId }) });
16060
16179
  }
16061
16180
  function IdDocumentAlreadyUpload(props) {
@@ -16091,7 +16210,7 @@ function IdDocumentAlreadyUpload(props) {
16091
16210
  ] })
16092
16211
  ] });
16093
16212
  }
16094
- const logger$C = createLogger("IdDocumentInstantVerificationComponent");
16213
+ const logger$C = createLogger("IdDocumentInstantVerification");
16095
16214
  const idVerificationSchema = [
16096
16215
  "instantIdVerificationData",
16097
16216
  "idDocumentType"
@@ -16108,7 +16227,7 @@ const documentTypeValidationRules = {
16108
16227
  modes: ["blur", "input"]
16109
16228
  }
16110
16229
  };
16111
- function IdDocumentInstantVerificationComponent(props) {
16230
+ function IdDocumentInstantVerification(props) {
16112
16231
  var _a, _b, _c;
16113
16232
  const stateRef = useRef({ setState: null });
16114
16233
  const isOptional = !((props == null ? void 0 : props.formVerificationErrors) && ((_a = Object.keys(props == null ? void 0 : props.formVerificationErrors)) == null ? void 0 : _a.length) === 0);
@@ -16157,7 +16276,7 @@ function IdDocumentInstantVerificationComponent(props) {
16157
16276
  /* @__PURE__ */ jsx(StateContextSetter, { stateRef }),
16158
16277
  isAlreadyUploaded ? /* @__PURE__ */ jsx(IdDocumentAlreadyUpload, { onClickSubmitDocumentAgain }) : /* @__PURE__ */ jsxs(Fragment, { children: [
16159
16278
  props.userDetails && /* @__PURE__ */ jsx(
16160
- IdVerificationComponent,
16279
+ IdVerification,
16161
16280
  {
16162
16281
  handleGetIdVerificationToken: props.handleGetIdVerificationToken,
16163
16282
  userDetails: props.userDetails,
@@ -16186,20 +16305,20 @@ function IdDocumentInstantVerificationComponent(props) {
16186
16305
  ] })
16187
16306
  ] });
16188
16307
  }
16189
- const IdDocumentInstantVerification = memo(
16190
- IdDocumentInstantVerificationComponent,
16308
+ const MemoizedIdDocumentInstantVerification = memo(
16309
+ IdDocumentInstantVerification,
16191
16310
  (prevProps, nextProps) => objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.handleOnBack === nextProps.handleOnBack && prevProps.handleOnNext === nextProps.handleOnNext
16192
16311
  );
16193
- function IdDocumentUploadComponent(props) {
16312
+ function IdDocumentUpload(props) {
16194
16313
  return props.idVerificationMethodSelected === "instantVerification" && !!props.handleGetIdVerificationToken ? /* @__PURE__ */ jsx(
16195
- IdDocumentInstantVerification,
16314
+ MemoizedIdDocumentInstantVerification,
16196
16315
  {
16197
16316
  ...props,
16198
16317
  handleGetIdVerificationToken: props.handleGetIdVerificationToken,
16199
16318
  userDetails: props.userDetails,
16200
16319
  legalEntityId: props.legalEntityId
16201
16320
  }
16202
- ) : /* @__PURE__ */ jsx(IdDocumentManualUpload, { ...props });
16321
+ ) : /* @__PURE__ */ jsx(MemoizedIdDocumentManualUpload, { ...props });
16203
16322
  }
16204
16323
  const idVerificationMethodsMetadata = {
16205
16324
  instantVerification: {
@@ -16245,7 +16364,7 @@ const IdVerificationMethodOptionFooter = ({
16245
16364
  const idVerificationMethodFields = [
16246
16365
  "idVerificationMethod"
16247
16366
  ];
16248
- function IdVerificationMethodComponent(props) {
16367
+ function IdVerificationMethod(props) {
16249
16368
  const {
16250
16369
  id,
16251
16370
  data: propsData,
@@ -16552,7 +16671,7 @@ const usePhonePrefixes = () => {
16552
16671
  }, []);
16553
16672
  return phonePrefixes;
16554
16673
  };
16555
- function PhoneInputComponent(props) {
16674
+ function PhoneInput(props) {
16556
16675
  const { data: dataProp, dataStoreId, country, requiredFields, fieldValidationErrors } = props;
16557
16676
  const { i18n } = useI18nContext();
16558
16677
  const stateRef = useRef({ setState: null });
@@ -16625,11 +16744,11 @@ function PhoneInputComponent(props) {
16625
16744
  )
16626
16745
  ] });
16627
16746
  }
16628
- PhoneInputComponent.defaultProps = {
16747
+ PhoneInput.defaultProps = {
16629
16748
  phoneLabel: "telephoneNumber"
16630
16749
  };
16631
- const PhoneInput = memo(
16632
- PhoneInputComponent,
16750
+ const MemoizedPhoneInput = memo(
16751
+ PhoneInput,
16633
16752
  (prevProps, nextProps) => prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate
16634
16753
  );
16635
16754
  const emailPattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
@@ -16812,7 +16931,7 @@ function PhoneFieldExperimentWrapper({
16812
16931
  phoneFieldProps
16813
16932
  }) {
16814
16933
  const { isExperimentEnabled } = useExperimentsContext();
16815
- return isExperimentEnabled("EnableNewPhoneField") ? /* @__PURE__ */ jsx(PhoneField, { ...phoneFieldProps }) : /* @__PURE__ */ jsx(PhoneInput, { ...phoneInputProps });
16934
+ return isExperimentEnabled("EnableNewPhoneField") ? /* @__PURE__ */ jsx(PhoneField, { ...phoneFieldProps }) : /* @__PURE__ */ jsx(MemoizedPhoneInput, { ...phoneInputProps });
16816
16935
  }
16817
16936
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
16818
16937
  var dist = {};
@@ -19428,7 +19547,7 @@ const contactDetailFields = [
19428
19547
  ...PHONE_FIELD,
19429
19548
  "email"
19430
19549
  ];
19431
- function ContactDetailsComponent(props) {
19550
+ function ContactDetails(props) {
19432
19551
  var _a, _b, _c, _d;
19433
19552
  const { i18n } = useI18nContext();
19434
19553
  const globalData = useGlobalData();
@@ -19457,7 +19576,7 @@ function ContactDetailsComponent(props) {
19457
19576
  rules: mergedProps.validators || contactDetailsValidationRules,
19458
19577
  /*
19459
19578
  These async rules are specific to the new PhoneField (phone) and aren't applied when the feature is disabled.
19460
- The PhoneInput component has it's own useForm instance and asyncRules using a different field key (phoneNumber)
19579
+ The MemoizedPhoneInput component has it's own useForm instance and asyncRules using a different field key (phoneNumber)
19461
19580
  */
19462
19581
  asyncRules,
19463
19582
  fieldProblems: mergedProps == null ? void 0 : mergedProps.fieldValidationErrors
@@ -19527,11 +19646,11 @@ function ContactDetailsComponent(props) {
19527
19646
  )
19528
19647
  ] });
19529
19648
  }
19530
- const ContactDetailsComp = memo(
19531
- ContactDetailsComponent,
19649
+ const MemoizedContactDetails = memo(
19650
+ ContactDetails,
19532
19651
  (prevProps, nextProps) => prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.labels, nextProps.labels) && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors)
19533
19652
  );
19534
- ContactDetailsComponent.defaultProps = {
19653
+ ContactDetails.defaultProps = {
19535
19654
  data: {}
19536
19655
  };
19537
19656
  const CountryIdNumberPatterns = {
@@ -20059,7 +20178,7 @@ const idNumberExemptDefaultConfig = {
20059
20178
  }
20060
20179
  };
20061
20180
  const idNumberFields = ["idNumber", "idNumberExempt"];
20062
- function IdentityNumberComponent(props) {
20181
+ function IdentityNumber(props) {
20063
20182
  const { i18n } = useI18nContext();
20064
20183
  const {
20065
20184
  country,
@@ -20541,7 +20660,7 @@ const nomineeRadioItems = [
20541
20660
  name: "no"
20542
20661
  }
20543
20662
  ];
20544
- const NomineeDecisionMakerRoleComponent = (props) => {
20663
+ const NomineeDecisionMakerRole = (props) => {
20545
20664
  const { data: dataProp, dataStoreId, fieldValidationErrors, roles, country } = props;
20546
20665
  const getFormSchema2 = useCallback(() => {
20547
20666
  const fieldsToRemove = [];
@@ -20630,7 +20749,7 @@ const NomineeDecisionMakerRoleComponent = (props) => {
20630
20749
  ] });
20631
20750
  };
20632
20751
  const decisionMakerRoleFields = ["role"];
20633
- const DecisionMakerRoleComponent = (props) => {
20752
+ const DecisionMakerRole = (props) => {
20634
20753
  const {
20635
20754
  data: dataProp,
20636
20755
  dataStoreId,
@@ -20690,7 +20809,7 @@ const DecisionMakerRoleComponent = (props) => {
20690
20809
  }
20691
20810
  )
20692
20811
  ] }),
20693
- /* @__PURE__ */ jsx(NomineeDecisionMakerRoleComponent, { ...nomineeProps, roles: data.role, country })
20812
+ /* @__PURE__ */ jsx(NomineeDecisionMakerRole, { ...nomineeProps, roles: data.role, country })
20694
20813
  ] });
20695
20814
  };
20696
20815
  function IndividualIdNumberTypeSelector({
@@ -20785,7 +20904,7 @@ const nameFormatters = {
20785
20904
  }
20786
20905
  };
20787
20906
  const nameFields = ["firstName", "lastName"];
20788
- function NameComponent(props) {
20907
+ function Name(props) {
20789
20908
  const { i18n } = useI18nContext();
20790
20909
  const { isExperimentEnabled } = useExperimentsContext();
20791
20910
  const isStrictNameAndAddressValidationEnabled = isExperimentEnabled(
@@ -20878,11 +20997,11 @@ function NameComponent(props) {
20878
20997
  )
20879
20998
  ] });
20880
20999
  }
20881
- const Name = memo(
20882
- NameComponent,
21000
+ const MemoizedName = memo(
21001
+ Name,
20883
21002
  (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors)
20884
21003
  );
20885
- NameComponent.defaultProps = {
21004
+ Name.defaultProps = {
20886
21005
  data: {},
20887
21006
  onChange: () => {
20888
21007
  },
@@ -21067,7 +21186,7 @@ const licenseCardNumberMetaData$1 = resolveFieldMetadata(
21067
21186
  {},
21068
21187
  licenseCardNumberDefaultMetadata
21069
21188
  );
21070
- function IdentityAuComponent({
21189
+ function IdentityAu({
21071
21190
  labels: labels2,
21072
21191
  data: propsData,
21073
21192
  placeholders,
@@ -21202,7 +21321,7 @@ function IdentityAuComponent({
21202
21321
  const identityValidationRules = {
21203
21322
  typeOfIdentity: [isTruthyValidator]
21204
21323
  };
21205
- function IdentityHKComponent({
21324
+ function IdentityHK({
21206
21325
  labels: labels2,
21207
21326
  data: propsData,
21208
21327
  placeholders,
@@ -21383,7 +21502,7 @@ const licenseCardNumberMetaData = resolveFieldMetadata(
21383
21502
  {},
21384
21503
  licenseCardNumberDefaultMetadata
21385
21504
  );
21386
- function IdentityNZComponent({
21505
+ function IdentityNZ({
21387
21506
  labels: labels2,
21388
21507
  data: propsData,
21389
21508
  placeholders,
@@ -21553,7 +21672,7 @@ const IdentityUSComponent = forwardRef((props, ref) => {
21553
21672
  const individualDetailsError = (_a = props.formVerificationErrors) == null ? void 0 : _a[ERROR_CODES.PERSONAL_DETAILS_VALIDATION];
21554
21673
  const fourDigitsValidationError = (_b = individualDetailsError == null ? void 0 : individualDetailsError[ERROR_CODES.SSN_4_DIGITS_VALIDATION]) == null ? void 0 : _b.some((error) => error.code === ERROR_CODES.SSN_REMEDIATION);
21555
21674
  const ssnType = fourDigitsValidationError || ((_d = (_c = props.data) == null ? void 0 : _c.idNumber) == null ? void 0 : _d.length) === 9 ? "ssn" : "ssnLastFour";
21556
- return /* @__PURE__ */ jsx(IdentityNumberComponent, { ...props, idNumberType: ssnType, ref });
21675
+ return /* @__PURE__ */ jsx(IdentityNumber, { ...props, idNumberType: ssnType, ref });
21557
21676
  });
21558
21677
  const additionalIdentityInfoFields = [
21559
21678
  "typeOfIdentity",
@@ -21565,7 +21684,7 @@ const identityFields = [
21565
21684
  ...additionalIdentityInfoFields,
21566
21685
  "idNumber"
21567
21686
  ];
21568
- function IdentityComponent(props) {
21687
+ function Identity(props) {
21569
21688
  var _a;
21570
21689
  const { personalDetails, country, errors, idNumberType } = props;
21571
21690
  const identityProps = getFieldProps(personalDetails, idNumberFields);
@@ -21586,14 +21705,14 @@ function IdentityComponent(props) {
21586
21705
  );
21587
21706
  }
21588
21707
  const countrySpecificComponentsMap = {
21589
- [CountryCodes.Australia]: IdentityAuComponent,
21590
- [CountryCodes.HongKong]: IdentityHKComponent,
21591
- [CountryCodes.NewZealand]: IdentityNZComponent
21708
+ [CountryCodes.Australia]: IdentityAu,
21709
+ [CountryCodes.HongKong]: IdentityHK,
21710
+ [CountryCodes.NewZealand]: IdentityNZ
21592
21711
  };
21593
21712
  const Component = countrySpecificComponentsMap[country];
21594
21713
  if (!Component) {
21595
21714
  return /* @__PURE__ */ jsx(
21596
- IdentityNumberComponent,
21715
+ IdentityNumber,
21597
21716
  {
21598
21717
  ...identityProps,
21599
21718
  errors,
@@ -21630,7 +21749,7 @@ const relationshipOptions = [
21630
21749
  }
21631
21750
  ];
21632
21751
  const countriesRequiringNationality = [CountryCodes.HongKong, CountryCodes.Singapore];
21633
- function PersonalDetailsComponent(props) {
21752
+ function PersonalDetails(props) {
21634
21753
  var _a, _b, _c, _d;
21635
21754
  const { i18n } = useI18nContext();
21636
21755
  const { isSettingEnabled } = useSettingsContext();
@@ -21806,7 +21925,7 @@ function PersonalDetailsComponent(props) {
21806
21925
  "weSelectedSomeRolesBasedOnMyinfoBusinessDataAboutYourCompanysAppointmentHoldersAndShareholders"
21807
21926
  ) }),
21808
21927
  isDecisionMakerTask && /* @__PURE__ */ jsx(
21809
- DecisionMakerRoleComponent,
21928
+ DecisionMakerRole,
21810
21929
  {
21811
21930
  ...decisionMakerRoleProps,
21812
21931
  nomineeProps,
@@ -21817,7 +21936,7 @@ function PersonalDetailsComponent(props) {
21817
21936
  country: countryRequiringNationality
21818
21937
  }
21819
21938
  ),
21820
- hasRequiredFields(nameProps) && /* @__PURE__ */ jsx(Name, { ...nameProps, dataStoreId: PERSONAL_DETAILS }),
21939
+ hasRequiredFields(nameProps) && /* @__PURE__ */ jsx(MemoizedName, { ...nameProps, dataStoreId: PERSONAL_DETAILS }),
21821
21940
  !isAgeVerificationEnabled && formUtils.isRequiredField("birthDate") && // we reverse the order of birthDate and Country field in age verification feature
21822
21941
  /* @__PURE__ */ jsx(
21823
21942
  Field,
@@ -21931,7 +22050,7 @@ function PersonalDetailsComponent(props) {
21931
22050
  }
21932
22051
  ),
21933
22052
  /* @__PURE__ */ jsx(
21934
- IdentityComponent,
22053
+ Identity,
21935
22054
  {
21936
22055
  personalDetails: props,
21937
22056
  country: data.residencyCountry,
@@ -21952,7 +22071,7 @@ function PersonalDetailsComponent(props) {
21952
22071
  }
21953
22072
  ),
21954
22073
  hasRequiredFields(contactDetailsFormProps) && /* @__PURE__ */ jsx(
21955
- ContactDetailsComp,
22074
+ MemoizedContactDetails,
21956
22075
  {
21957
22076
  ...contactDetailsFormProps,
21958
22077
  dataStoreId: PERSONAL_DETAILS,
@@ -22015,7 +22134,7 @@ function ProofOfRelationship({ id, ...props }) {
22015
22134
  ] })
22016
22135
  ] });
22017
22136
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
22018
- DocumentUpload,
22137
+ MemoizedDocumentUpload,
22019
22138
  {
22020
22139
  ...props,
22021
22140
  documentField: "proofOfRelationship",
@@ -22066,7 +22185,7 @@ const proofOfResidenceDocumentOptions = [
22066
22185
  name: "certificateOfVoterRegistration"
22067
22186
  }
22068
22187
  ];
22069
- function ProofOfResidencyComponent({ id, ...props }) {
22188
+ function ProofOfResidency({ id, ...props }) {
22070
22189
  const { i18n } = useI18nContext();
22071
22190
  const [proofOfResidenceDocumentType, setProofOfResidenceDocumentType] = useState(
22072
22191
  proofOfResidenceDocumentOptions[0].id
@@ -22086,7 +22205,7 @@ function ProofOfResidencyComponent({ id, ...props }) {
22086
22205
  ] })
22087
22206
  ] });
22088
22207
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
22089
- DocumentUpload,
22208
+ MemoizedDocumentUpload,
22090
22209
  {
22091
22210
  ...props,
22092
22211
  documentField: "proofOfResidency",
@@ -22103,8 +22222,8 @@ function ProofOfResidencyComponent({ id, ...props }) {
22103
22222
  }
22104
22223
  ) });
22105
22224
  }
22106
- const ProofOfResidencyUpload = memo(
22107
- ProofOfResidencyComponent,
22225
+ const MemoizedProofOfResidencyUpload = memo(
22226
+ ProofOfResidency,
22108
22227
  (prevProps, nextProps) => objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.name === nextProps.name
22109
22228
  );
22110
22229
  const individualForms = {
@@ -22158,7 +22277,7 @@ const individualDocumentForms = [
22158
22277
  proofOfNationalIdFormID,
22159
22278
  proofOfRelationshipFormID
22160
22279
  ];
22161
- function IndividualComponent(props) {
22280
+ function Individual(props) {
22162
22281
  var _a, _b, _c, _d, _e, _f, _g, _h;
22163
22282
  const { i18n } = useI18nContext();
22164
22283
  const {
@@ -22273,14 +22392,14 @@ function IndividualComponent(props) {
22273
22392
  const renderActiveForm = (activeForm) => {
22274
22393
  var _a2, _b2;
22275
22394
  return /* @__PURE__ */ jsxs(Fragment, { children: [
22276
- /* @__PURE__ */ jsx(StateContextWatcher, { owner: "IndividualComponent", onChange: handleStateChange }),
22277
- /* @__PURE__ */ jsx(StateContextSetter, { owner: "IndividualComponent", stateRef }),
22395
+ /* @__PURE__ */ jsx(StateContextWatcher, { owner: "Individual", onChange: handleStateChange }),
22396
+ /* @__PURE__ */ jsx(StateContextSetter, { owner: "Individual", stateRef }),
22278
22397
  /* @__PURE__ */ jsx(
22279
22398
  "div",
22280
22399
  {
22281
22400
  className: activeForm.formId !== personalDetailsFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
22282
22401
  children: /* @__PURE__ */ jsx(
22283
- PersonalDetailsComponent,
22402
+ PersonalDetails,
22284
22403
  {
22285
22404
  ...personalFormProps,
22286
22405
  data: {
@@ -22343,7 +22462,7 @@ function IndividualComponent(props) {
22343
22462
  {
22344
22463
  className: activeForm.formId !== idVerificationMethodFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
22345
22464
  children: /* @__PURE__ */ jsx(
22346
- IdVerificationMethodComponent,
22465
+ IdVerificationMethod,
22347
22466
  {
22348
22467
  ...idVerificationMethodFormProps,
22349
22468
  name: fullName,
@@ -22358,7 +22477,7 @@ function IndividualComponent(props) {
22358
22477
  {
22359
22478
  className: activeForm.formId !== idDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
22360
22479
  children: /* @__PURE__ */ jsx(
22361
- IdDocumentUploadComponent,
22480
+ IdDocumentUpload,
22362
22481
  {
22363
22482
  ...idDocumentFormProps,
22364
22483
  name: fullName,
@@ -22378,7 +22497,7 @@ function IndividualComponent(props) {
22378
22497
  {
22379
22498
  className: activeForm.formId !== proofOfResidencyFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
22380
22499
  children: /* @__PURE__ */ jsx(
22381
- ProofOfResidencyUpload,
22500
+ MemoizedProofOfResidencyUpload,
22382
22501
  {
22383
22502
  ...proofOfResidencyFormProps,
22384
22503
  id: proofOfResidencyFormID,
@@ -22392,7 +22511,7 @@ function IndividualComponent(props) {
22392
22511
  {
22393
22512
  className: activeForm.formId !== proofOfNationalIdFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
22394
22513
  children: /* @__PURE__ */ jsx(
22395
- DocumentUpload,
22514
+ MemoizedDocumentUpload,
22396
22515
  {
22397
22516
  ...proofOfNationalIdFormProps,
22398
22517
  documentField: "proofOfNationalId",
@@ -22769,8 +22888,14 @@ const bankDocumentFields = [
22769
22888
  function BankDocument(props) {
22770
22889
  var _a, _b;
22771
22890
  const { legalEntity, associatedLegalArrangement, country, optionalFields } = props;
22891
+ const { isExperimentEnabled } = useExperimentsContext();
22772
22892
  const { i18n } = useI18nContext();
22773
- const [documentType, setDocumentType] = useState();
22893
+ const bankDocumentLimitedToBankStatement = isExperimentEnabled(
22894
+ "EnableBankDocumentLimitedToBankStatement"
22895
+ );
22896
+ const [documentType, setDocumentType] = useState(
22897
+ bankDocumentLimitedToBankStatement ? BankDocumentTypes.BANK_STATEMENT : void 0
22898
+ );
22774
22899
  const stateRef = useRef({ setState: null });
22775
22900
  const isBankStatementOptional = (optionalFields == null ? void 0 : optionalFields.includes("bankStatementDocument")) ?? false;
22776
22901
  const formUtils = formUtilities(props, i18n);
@@ -22861,7 +22986,7 @@ function BankDocument(props) {
22861
22986
  }
22862
22987
  ),
22863
22988
  formUtils.isVisibleField("bankStatementDocument") && /* @__PURE__ */ jsxs(Fragment, { children: [
22864
- !usingExistingUploadedDocuments && /* @__PURE__ */ jsx(
22989
+ !usingExistingUploadedDocuments && !bankDocumentLimitedToBankStatement && /* @__PURE__ */ jsx(
22865
22990
  Field,
22866
22991
  {
22867
22992
  name: "documentType",
@@ -22881,7 +23006,7 @@ function BankDocument(props) {
22881
23006
  )
22882
23007
  }
22883
23008
  ),
22884
- documentType ? /* @__PURE__ */ jsxs(Fragment, { children: [
23009
+ documentType && !bankDocumentLimitedToBankStatement ? /* @__PURE__ */ jsxs(Fragment, { children: [
22885
23010
  country ? /* @__PURE__ */ jsx(
22886
23011
  BankDocumentRequirements,
22887
23012
  {
@@ -22921,7 +23046,7 @@ function BankDocument(props) {
22921
23046
  }
22922
23047
  ) : null
22923
23048
  ] }),
22924
- documentType || usingExistingUploadedDocuments ? /* @__PURE__ */ jsx(
23049
+ (documentType || usingExistingUploadedDocuments) && !bankDocumentLimitedToBankStatement ? /* @__PURE__ */ jsx(
22925
23050
  Field,
22926
23051
  {
22927
23052
  className: "adyen-kyc-bank-document__document-description",
@@ -24751,7 +24876,7 @@ const payoutAccountFields = [
24751
24876
  ...bankNameFields,
24752
24877
  ...bankCodeFields
24753
24878
  ];
24754
- function PayoutAccountComponent(props) {
24879
+ function PayoutAccount(props) {
24755
24880
  const { accountFormat, setAccountFormat } = useCoreContext();
24756
24881
  const { i18n } = useI18nContext();
24757
24882
  const [checkAnnotation, setCheckAnnotation] = useState();
@@ -24863,8 +24988,8 @@ function PayoutAccountComponent(props) {
24863
24988
  )
24864
24989
  ] });
24865
24990
  }
24866
- const PayoutAccount = memo(
24867
- PayoutAccountComponent,
24991
+ const MemoizedPayoutAccount = memo(
24992
+ PayoutAccount,
24868
24993
  (prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.arePayoutAccountDetailsInvalid === nextProps.arePayoutAccountDetailsInvalid && prevProps.invalidFieldNames === nextProps.invalidFieldNames
24869
24994
  );
24870
24995
  const eeaCountries = [
@@ -25460,7 +25585,7 @@ const payoutSteps = {
25460
25585
  const PayoutVerificationMethodFormID = payoutSteps.payoutVerificationMethod.formId;
25461
25586
  const PayoutAccountDocumentsFormID = payoutSteps.payoutAccountDocuments.formId;
25462
25587
  const PayoutAccountVerificationFormID = payoutSteps.payoutAccountVerification.formId;
25463
- function PayoutDetailsComponent(props) {
25588
+ function PayoutDetails(props) {
25464
25589
  var _a, _b;
25465
25590
  const { i18n } = useI18nContext();
25466
25591
  const {
@@ -25503,6 +25628,9 @@ function PayoutDetailsComponent(props) {
25503
25628
  const verifyInstantly = ((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "instantVerification";
25504
25629
  const showBankVerification = !(isProviderPlaidEmbedded(provider == null ? void 0 : provider.redirectUrl) && isExperimentEnabled("EnablePreferInstantVerificationFlow"));
25505
25630
  const bankCountry = ((_b = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _b.bankCountry) ?? country;
25631
+ const bankDocumentDescription = isExperimentEnabled("EnableBankDocumentLimitedToBankStatement") ? i18n.get(
25632
+ legalEntityResponse.type === "individual" ? "bankStatementIndividualDescription" : "bankStatementNonIndividualDescription"
25633
+ ) : i18n.get("bankDocumentDescription");
25506
25634
  useEffect(() => resetData(), [resetData]);
25507
25635
  useEffect(() => {
25508
25636
  if ((activeForm == null ? void 0 : activeForm.formId) === summaryStep.formId && verifyInstantly) {
@@ -25599,7 +25727,7 @@ function PayoutDetailsComponent(props) {
25599
25727
  {
25600
25728
  className: (activeForm == null ? void 0 : activeForm.formId) !== payoutSteps.payoutAccountDetails.formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
25601
25729
  children: /* @__PURE__ */ jsx(
25602
- PayoutAccount,
25730
+ MemoizedPayoutAccount,
25603
25731
  {
25604
25732
  ...payoutAccountFormProps,
25605
25733
  heading: taskHeading,
@@ -25623,7 +25751,7 @@ function PayoutDetailsComponent(props) {
25623
25751
  heading: i18n.get(
25624
25752
  isBankStatementDocumentOptional ? "bankDocumentHeaderOptional" : "bankDocumentHeader"
25625
25753
  ),
25626
- description: i18n.get("bankDocumentDescription"),
25754
+ description: bankDocumentDescription,
25627
25755
  id: PayoutAccountDocumentsFormID,
25628
25756
  legalEntity: legalEntityResponse,
25629
25757
  associatedLegalArrangement,
@@ -25706,7 +25834,7 @@ function ConstitutionalDocumentUpload({
25706
25834
  ] }) })
25707
25835
  ] });
25708
25836
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
25709
- DocumentUpload,
25837
+ MemoizedDocumentUpload,
25710
25838
  {
25711
25839
  ...props,
25712
25840
  documentType: DocumentType.CONSTITUTIONAL_DOCUMENT,
@@ -25756,7 +25884,7 @@ const solePropRegistrationAddressFormId = solePropForms.solePropRegistrationAddr
25756
25884
  const solePropRegistrationDetailsFormId = solePropForms.solePropRegistrationDetails.formId;
25757
25885
  const solePropDocumentFormId = solePropForms.solePropConstitutionalDocument.formId;
25758
25886
  const solePropFinancialInformationFormId = solePropForms.solePropFinancialInformation.formId;
25759
- function SolePropComponent(props) {
25887
+ function SoleProp(props) {
25760
25888
  const { i18n } = useI18nContext();
25761
25889
  const [currentCountry, setCurrentCountry] = useState(props.country);
25762
25890
  const [currentLegalName, setCurrentLegalName] = useState();
@@ -25782,7 +25910,7 @@ function SolePropComponent(props) {
25782
25910
  const renderActiveForm = (activeForm) => {
25783
25911
  var _a;
25784
25912
  return /* @__PURE__ */ jsxs(Fragment, { children: [
25785
- /* @__PURE__ */ jsx(StateContextWatcher, { owner: "SolePropComponent", onChange: handleStateChange }),
25913
+ /* @__PURE__ */ jsx(StateContextWatcher, { owner: "SoleProp", onChange: handleStateChange }),
25786
25914
  /* @__PURE__ */ jsx(
25787
25915
  "div",
25788
25916
  {
@@ -25813,7 +25941,7 @@ function SolePropComponent(props) {
25813
25941
  {
25814
25942
  className: activeForm.formId !== solePropRegistrationDetailsFormId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
25815
25943
  children: /* @__PURE__ */ jsx(
25816
- CompanyRegistrationDetailsComponent,
25944
+ CompanyRegistrationDetails,
25817
25945
  {
25818
25946
  ...solePropsRegistrationDetailsFormProps,
25819
25947
  heading: i18n.get("registrationDetails"),
@@ -25830,7 +25958,7 @@ function SolePropComponent(props) {
25830
25958
  {
25831
25959
  className: activeForm.formId !== solePropRegistrationAddressFormId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
25832
25960
  children: /* @__PURE__ */ jsx(
25833
- RegistrationAddressComponent,
25961
+ RegistrationAddress,
25834
25962
  {
25835
25963
  ...solePropRegistrationAddressFormProps,
25836
25964
  heading: i18n.get("registeredAddress"),
@@ -26139,7 +26267,9 @@ const hasMinRequiredDecisionMakerCount = (rootLegalEntity) => {
26139
26267
  const decisionMakerCountRange = getDecisionMakerRequirements(registeredCountry);
26140
26268
  return decisionMakerCountRange.every((requirements) => {
26141
26269
  const { roleTypes, min } = requirements;
26142
- return roleTypes.some((role) => min ? (existingDecisionMakerCount == null ? void 0 : existingDecisionMakerCount[role]) ?? min <= 0 : true);
26270
+ return roleTypes.some(
26271
+ (role) => min ? (existingDecisionMakerCount == null ? void 0 : existingDecisionMakerCount[role]) ?? min <= 0 : true
26272
+ );
26143
26273
  });
26144
26274
  };
26145
26275
  const isPartOfTrustFromLegalEntity = (legalEntity) => {
@@ -26545,7 +26675,7 @@ const trustRegistrationDetailsFields = [
26545
26675
  "registrationNumber"
26546
26676
  ];
26547
26677
  const ALLOWED_TRUST_COUNTRIES = [CountryCodes.Australia, CountryCodes.NewZealand];
26548
- function TrustRegistrationDetailsComponent(props) {
26678
+ function TrustRegistrationDetails(props) {
26549
26679
  const { country, onCountryChange } = props;
26550
26680
  const { i18n } = useI18nContext();
26551
26681
  const { isExperimentEnabled } = useExperimentsContext();
@@ -26764,7 +26894,7 @@ const trustForms = {
26764
26894
  const trustRegistrationAddressFormId = trustForms.trustRegistrationAddress.formId;
26765
26895
  const trustRegistrationDetailsFormId = trustForms.trustRegistrationDetails.formId;
26766
26896
  const trustConstitutionalDocumentFormId = trustForms.trustConstitutionalDocument.formId;
26767
- function TrustComponent(props) {
26897
+ function Trust(props) {
26768
26898
  const { i18n } = useI18nContext();
26769
26899
  const trustRegistrationDetailsFormProps = getFormProps(props, trustRegistrationDetailsFormId);
26770
26900
  const trustRegistrationAddressFormProps = getNestedOuterFormPropsFromOuterFormProps(props, trustRegistrationAddressFormId);
@@ -26772,13 +26902,13 @@ function TrustComponent(props) {
26772
26902
  const handleStateChange = () => {
26773
26903
  };
26774
26904
  const renderActiveForm = (activeForm) => /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-trust", children: [
26775
- /* @__PURE__ */ jsx(StateContextWatcher, { owner: "TrustComponent", onChange: handleStateChange }),
26905
+ /* @__PURE__ */ jsx(StateContextWatcher, { owner: "Trust", onChange: handleStateChange }),
26776
26906
  /* @__PURE__ */ jsx(
26777
26907
  "div",
26778
26908
  {
26779
26909
  className: activeForm.formId !== trustRegistrationDetailsFormId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
26780
26910
  children: /* @__PURE__ */ jsx(
26781
- TrustRegistrationDetailsComponent,
26911
+ TrustRegistrationDetails,
26782
26912
  {
26783
26913
  ...trustRegistrationDetailsFormProps,
26784
26914
  heading: i18n.get("registrationDetails"),
@@ -26794,7 +26924,7 @@ function TrustComponent(props) {
26794
26924
  {
26795
26925
  className: activeForm.formId !== trustRegistrationAddressFormId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
26796
26926
  children: /* @__PURE__ */ jsx(
26797
- RegistrationAddressComponent,
26927
+ RegistrationAddress,
26798
26928
  {
26799
26929
  ...trustRegistrationAddressFormProps,
26800
26930
  heading: i18n.get("registeredAddress"),
@@ -26903,6 +27033,7 @@ const dataMissingRemediationsToFieldsMap = {
26903
27033
  "1_501": [DocumentType.REGISTRATION_DOCUMENT],
26904
27034
  "1_503": [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO],
26905
27035
  "1_512": [DocumentType.VAT_DOCUMENT],
27036
+ "1_803": [DocumentType.PROOF_OF_DIRECTOR],
26906
27037
  "2_158": ["vatNumber", "exemptedFromVat", "vatAbsenceReason"],
26907
27038
  "2_222": [DocumentType.PROOF_OF_RELATIONSHIP]
26908
27039
  };
@@ -27357,7 +27488,7 @@ function getCapabilityProblems(entity, country, isExperimentEnabled) {
27357
27488
  const remediationHasFileUploadField = (remediation) => {
27358
27489
  var _a;
27359
27490
  return (_a = remediation == null ? void 0 : remediation.forms) == null ? void 0 : _a.some(
27360
- (form) => form === individualForms.idVerificationMethod.formId || form === individualForms.idDocument.formId || form === individualForms.proofOfResidency.formId || form === individualForms.proofOfNationalId.formId || form === companyForms.companyRegistrationDocument.formId || form === companyForms.companyTaxDocument.formId || form === payoutSteps.payoutAccountDocuments.formId || form === solePropForms.solePropConstitutionalDocument.formId || form === trustForms.trustConstitutionalDocument.formId
27491
+ (form) => form === individualForms.idVerificationMethod.formId || form === individualForms.idDocument.formId || form === individualForms.proofOfResidency.formId || form === individualForms.proofOfNationalId.formId || form === companyForms.companyRegistrationDocument.formId || form === companyForms.companyTaxDocument.formId || form === companyForms.companyProofOfDirectorDocument.formId || form === payoutSteps.payoutAccountDocuments.formId || form === solePropForms.solePropConstitutionalDocument.formId || form === trustForms.trustConstitutionalDocument.formId
27361
27492
  );
27362
27493
  };
27363
27494
  const getEntityType = (baseEntityType, legalEntity, legalEntityId) => {
@@ -28536,13 +28667,16 @@ const getFieldsWithExistingData = (legalEntity, isExperimentEnabled) => {
28536
28667
  };
28537
28668
  const getNestedTrustedFields = (field, data, trustedFields) => {
28538
28669
  if (trustedFields && (data == null ? void 0 : data[field]) && typeof data[field] === "object") {
28539
- return trustedFields.reduce((fields, trustedField) => {
28540
- const splitField = trustedField.split(".");
28541
- if (splitField[0] === field) {
28542
- return [...fields, splitField[1]];
28543
- }
28544
- return fields;
28545
- }, []);
28670
+ return trustedFields.reduce(
28671
+ (fields, trustedField) => {
28672
+ const splitField = trustedField.split(".");
28673
+ if (splitField[0] === field) {
28674
+ return [...fields, splitField[1]];
28675
+ }
28676
+ return fields;
28677
+ },
28678
+ []
28679
+ );
28546
28680
  }
28547
28681
  return [];
28548
28682
  };
@@ -28668,7 +28802,7 @@ const ADDITIONAL_INFORMATION_FIELDS = [
28668
28802
  "legalFormDescription",
28669
28803
  ...registrationAddressFields
28670
28804
  ];
28671
- function AdditionalInformationComponent({
28805
+ function AdditionalInformation({
28672
28806
  data,
28673
28807
  labels: labels2,
28674
28808
  placeholders,
@@ -29449,7 +29583,7 @@ function BusinessInformationCard({
29449
29583
  );
29450
29584
  }
29451
29585
  const logger$w = createLogger("BusinessSelection");
29452
- function BusinessSelectionComponent({
29586
+ function BusinessSelection({
29453
29587
  showCompanyStructure,
29454
29588
  searching,
29455
29589
  fetching,
@@ -29657,7 +29791,7 @@ const BASIC_INFORMATION_FIELDS = [
29657
29791
  ...STATE_FIELD,
29658
29792
  ...BUSINESS_REGISTRATION_NUMBER_FIELD
29659
29793
  ];
29660
- function BasicInformationComponent({
29794
+ function BasicInformation({
29661
29795
  data,
29662
29796
  labels: labels2,
29663
29797
  placeholders,
@@ -29869,7 +30003,7 @@ function BasicInformationComponent({
29869
30003
  });
29870
30004
  if (showBusinessSelection) {
29871
30005
  return /* @__PURE__ */ jsx(
29872
- BusinessSelectionComponent,
30006
+ BusinessSelection,
29873
30007
  {
29874
30008
  showCompanyStructure,
29875
30009
  searching,
@@ -30036,7 +30170,7 @@ const CompanyStructureValidation = {
30036
30170
  };
30037
30171
  const COMPANY_STRUCTURE_FORM_ID = "companyStructure";
30038
30172
  const companyStructureFields = ["entityType"];
30039
- function CompanyStructureComponent({
30173
+ function CompanyStructure({
30040
30174
  data,
30041
30175
  labels: labels2,
30042
30176
  heading,
@@ -30194,6 +30328,13 @@ const getForms = (country) => ({
30194
30328
  formDescription: "companyTaxDocumentFormDescription",
30195
30329
  fields: ["taxDocument"]
30196
30330
  },
30331
+ companyProofOfDirectorDocument: {
30332
+ formId: "companyProofOfDirectorDocument",
30333
+ formName: "proofOfDirector",
30334
+ formHeading: "uploadYourOrganizationProofOfDirector",
30335
+ formDescription: "weNeedAnOfficialDocument",
30336
+ fields: ["proofOfDirector"]
30337
+ },
30197
30338
  companyFinancialInformation: {
30198
30339
  formId: "companyFinancialInformation",
30199
30340
  formName: "financialInformation",
@@ -30206,9 +30347,11 @@ const documentFormsIds = ["companyRegistrationDocument", "companyTaxDocument"];
30206
30347
  const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
30207
30348
  const registrationDocument = getDocument$1(entityId, DocumentType.REGISTRATION_DOCUMENT) ?? null;
30208
30349
  const taxDocument = getDocument$1(entityId, DocumentType.VAT_DOCUMENT) ?? getDocument$1(entityId, DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO) ?? null;
30350
+ const proofOfDirector = getDocument$1(entityId, DocumentType.PROOF_OF_DIRECTOR) ?? null;
30209
30351
  return {
30210
30352
  companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : void 0,
30211
- companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0
30353
+ companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0,
30354
+ companyProofOfDirectorDocument: proofOfDirector ? { proofOfDirector: [mapExistingFile(getPageName(proofOfDirector))] } : void 0
30212
30355
  };
30213
30356
  };
30214
30357
  const mapBasicInformation = (data) => {
@@ -30252,11 +30395,12 @@ const mapAdditionalInformation = (data, legalEntity) => {
30252
30395
  );
30253
30396
  };
30254
30397
  const mapLegalEntityToBusinessDetailsSchema = (legalEntity) => {
30255
- const { companyRegistrationDocument, companyTaxDocument } = mapApiDocumentToBusinessDetailsDocuments(legalEntity == null ? void 0 : legalEntity.id);
30398
+ const { companyRegistrationDocument, companyTaxDocument, companyProofOfDirectorDocument } = mapApiDocumentToBusinessDetailsDocuments(legalEntity == null ? void 0 : legalEntity.id);
30256
30399
  const businessDetailsSchema = {
30257
30400
  ...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
30258
30401
  companyRegistrationDocument,
30259
30402
  companyTaxDocument,
30403
+ companyProofOfDirectorDocument,
30260
30404
  companyFinancialInformation: {}
30261
30405
  };
30262
30406
  return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
@@ -30294,6 +30438,12 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity) => {
30294
30438
  [key]: businessDetailsSchema[key]
30295
30439
  };
30296
30440
  }
30441
+ case "companyProofOfDirectorDocument": {
30442
+ return {
30443
+ ...componentData,
30444
+ [key]: businessDetailsSchema[key]
30445
+ };
30446
+ }
30297
30447
  case "companyFinancialInformation": {
30298
30448
  return ((_a = legalEntity == null ? void 0 : legalEntity.organization) == null ? void 0 : _a.financialReports) ? {
30299
30449
  ...componentData,
@@ -30307,7 +30457,7 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity) => {
30307
30457
  }
30308
30458
  }, {});
30309
30459
  };
30310
- function BusinessDetailsComponent(props) {
30460
+ function BusinessDetails(props) {
30311
30461
  const { i18n } = useI18nContext();
30312
30462
  const { companyStructure } = useGlobalData();
30313
30463
  const {
@@ -30341,7 +30491,7 @@ function BusinessDetailsComponent(props) {
30341
30491
  });
30342
30492
  return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
30343
30493
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
30344
- BasicInformationComponent,
30494
+ BasicInformation,
30345
30495
  {
30346
30496
  ...getFormProps(props, forms.basicInformation.formId),
30347
30497
  id: forms.basicInformation.formId,
@@ -30371,7 +30521,7 @@ function BusinessDetailsComponent(props) {
30371
30521
  }
30372
30522
  ) }),
30373
30523
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyStructure.formId), children: /* @__PURE__ */ jsx(
30374
- CompanyStructureComponent,
30524
+ CompanyStructure,
30375
30525
  {
30376
30526
  ...getFormProps(props, forms.companyStructure.formId),
30377
30527
  id: forms.companyStructure.formId,
@@ -30385,7 +30535,7 @@ function BusinessDetailsComponent(props) {
30385
30535
  }
30386
30536
  ) }),
30387
30537
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.additionalInformation.formId), children: /* @__PURE__ */ jsx(
30388
- AdditionalInformationComponent,
30538
+ AdditionalInformation,
30389
30539
  {
30390
30540
  ...getFormProps(props, forms.additionalInformation.formId),
30391
30541
  id: forms.additionalInformation.formId,
@@ -30399,7 +30549,7 @@ function BusinessDetailsComponent(props) {
30399
30549
  }
30400
30550
  ) }),
30401
30551
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyRegistrationDocument.formId), children: /* @__PURE__ */ jsx(
30402
- RegistrationDocumentComponent,
30552
+ RegistrationDocument,
30403
30553
  {
30404
30554
  ...getFormProps(props, forms.companyRegistrationDocument.formId),
30405
30555
  id: forms.companyRegistrationDocument.formId,
@@ -30410,7 +30560,7 @@ function BusinessDetailsComponent(props) {
30410
30560
  }
30411
30561
  ) }),
30412
30562
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyTaxDocument.formId), children: country === "US" ? /* @__PURE__ */ jsx(
30413
- TaxDocumentComponent,
30563
+ TaxDocument,
30414
30564
  {
30415
30565
  ...getFormProps(props, forms.companyTaxDocument.formId),
30416
30566
  id: forms.companyTaxDocument.formId,
@@ -30420,7 +30570,7 @@ function BusinessDetailsComponent(props) {
30420
30570
  companyType: companyStructure == null ? void 0 : companyStructure.entityType
30421
30571
  }
30422
30572
  ) : /* @__PURE__ */ jsx(
30423
- DocumentUpload,
30573
+ MemoizedDocumentUpload,
30424
30574
  {
30425
30575
  ...getFormProps(props, forms.companyTaxDocument.formId),
30426
30576
  id: forms.companyTaxDocument.formId,
@@ -30441,6 +30591,16 @@ function BusinessDetailsComponent(props) {
30441
30591
  ] })
30442
30592
  }
30443
30593
  ) }),
30594
+ /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyProofOfDirectorDocument.formId), children: /* @__PURE__ */ jsx(
30595
+ ProofOfDirectorDocument,
30596
+ {
30597
+ ...getFormProps(props, forms.companyProofOfDirectorDocument.formId),
30598
+ id: forms.companyProofOfDirectorDocument.formId,
30599
+ heading: forms.companyProofOfDirectorDocument.formHeading,
30600
+ description: forms.companyProofOfDirectorDocument.formDescription,
30601
+ country
30602
+ }
30603
+ ) }),
30444
30604
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyFinancialInformation.formId), children: /* @__PURE__ */ jsx(
30445
30605
  FinancialInformation,
30446
30606
  {
@@ -31601,8 +31761,8 @@ const mapField = (lePath, dropinTask) => {
31601
31761
  }
31602
31762
  };
31603
31763
  const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
31604
- var _a, _b, _c;
31605
- const { companyRegistrationDocument, companyTaxDocument } = data;
31764
+ var _a, _b, _c, _d;
31765
+ const { companyRegistrationDocument, companyTaxDocument, companyProofOfDirectorDocument } = data;
31606
31766
  const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
31607
31767
  (_a = data.basicInformation) == null ? void 0 : _a.country
31608
31768
  ) ? DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO : DocumentType.VAT_DOCUMENT;
@@ -31618,6 +31778,12 @@ const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
31618
31778
  entityType: "legalEntity",
31619
31779
  documentType: taxDocumentType,
31620
31780
  page1: (_c = companyTaxDocument == null ? void 0 : companyTaxDocument.taxDocument) == null ? void 0 : _c[0]
31781
+ }),
31782
+ createDocumentRequest({
31783
+ entityId,
31784
+ entityType: "legalEntity",
31785
+ documentType: DocumentType.PROOF_OF_DIRECTOR,
31786
+ page1: (_d = companyProofOfDirectorDocument == null ? void 0 : companyProofOfDirectorDocument.proofOfDirector) == null ? void 0 : _d[0]
31621
31787
  })
31622
31788
  ]);
31623
31789
  return documents.filter(Boolean);
@@ -31761,7 +31927,7 @@ const formatAdditionalInformation = (data, labels2, country, companyType, i18n)
31761
31927
  const formatDataForSummary = (data, forms, labels2, i18n) => {
31762
31928
  const datasetUtils = datasetUtilities(i18n.locale);
31763
31929
  return entriesOf(data).reduce((summaryData, [form]) => {
31764
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
31930
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
31765
31931
  if (!form || !data[form]) return summaryData;
31766
31932
  switch (form) {
31767
31933
  case "basicInformation":
@@ -31819,6 +31985,16 @@ const formatDataForSummary = (data, forms, labels2, i18n) => {
31819
31985
  }
31820
31986
  }
31821
31987
  };
31988
+ case "companyProofOfDirectorDocument":
31989
+ if (!isDocumentsRequired$2(forms)) return summaryData;
31990
+ return {
31991
+ ...summaryData,
31992
+ [form]: {
31993
+ companyProofOfDirectorDocument: {
31994
+ fileName: (_k = (_j = data[form].proofOfDirector) == null ? void 0 : _j[0]) == null ? void 0 : _k.name
31995
+ }
31996
+ }
31997
+ };
31822
31998
  case "companyFinancialInformation":
31823
31999
  return {
31824
32000
  ...summaryData,
@@ -32443,7 +32619,7 @@ function BusinessDetailsDropinComponent({
32443
32619
  handleBackClick: backClick,
32444
32620
  handleHomeClick,
32445
32621
  children: /* @__PURE__ */ jsx(
32446
- BusinessDetailsComponent,
32622
+ BusinessDetails,
32447
32623
  {
32448
32624
  ...derivedProps,
32449
32625
  ref: formRef,
@@ -32879,7 +33055,7 @@ function CompanyDropinComponent({
32879
33055
  omittedKeys: ["operationalAddressIsSame"]
32880
33056
  },
32881
33057
  children: /* @__PURE__ */ jsx(
32882
- CompanyComponent,
33058
+ Company,
32883
33059
  {
32884
33060
  ...derivedProps,
32885
33061
  activeForm,
@@ -34040,8 +34216,20 @@ const BusinessTypeSelection = ({
34040
34216
  ] })
34041
34217
  ] }) });
34042
34218
  };
34219
+ const mapCustomerSupportSchemaToCustomerSupportType = (customerSupport) => {
34220
+ var _a, _b, _c;
34221
+ const phone2 = ((_a = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _a.phone) ?? {
34222
+ number: ((_b = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _b.phoneNumber) || "",
34223
+ type: "mobile"
34224
+ };
34225
+ return {
34226
+ email: ((_c = customerSupport == null ? void 0 : customerSupport.customerSupport) == null ? void 0 : _c.email) || "",
34227
+ phone: phone2
34228
+ };
34229
+ };
34043
34230
  const logger$q = createLogger("CustomerSupport");
34044
34231
  function CustomerSupport(props) {
34232
+ var _a, _b, _c, _d, _e, _f;
34045
34233
  const { i18n } = useI18nContext();
34046
34234
  const { showToast } = useToastContext();
34047
34235
  const { isExperimentEnabled } = useExperimentsContext();
@@ -34049,11 +34237,21 @@ function CustomerSupport(props) {
34049
34237
  state: { currentState }
34050
34238
  } = useStateContext();
34051
34239
  const { country, onNavigateBack, onSubmit, legalEntityResponse, handleUpdateLegalEntity } = props;
34052
- const contactDetailsData = mapLegalEntityToCustomerSupport(legalEntityResponse).customerSupport;
34240
+ const legalEntityType = legalEntityResponse.type;
34241
+ const contactDetailsData = {
34242
+ phone: (_b = (_a = legalEntityResponse[legalEntityType]) == null ? void 0 : _a.support) == null ? void 0 : _b.phone,
34243
+ // New phone field data
34244
+ phoneNumber: (_d = (_c = legalEntityResponse[legalEntityType]) == null ? void 0 : _c.support) == null ? void 0 : _d.phone.number,
34245
+ // Old phone field data
34246
+ email: (_f = (_e = legalEntityResponse[legalEntityType]) == null ? void 0 : _e.support) == null ? void 0 : _f.email
34247
+ };
34053
34248
  const submitForm = async () => {
34054
- const { customerSupport } = currentState.data;
34055
34249
  if (currentState.isValid) {
34056
- const payload = mapCustomerSupportToLegalEntity({ customerSupport });
34250
+ const customerSupport = currentState.data;
34251
+ const support = mapCustomerSupportSchemaToCustomerSupportType(customerSupport);
34252
+ const payload = {
34253
+ [legalEntityType]: { support }
34254
+ };
34057
34255
  try {
34058
34256
  await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity(payload, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
34059
34257
  onSubmit();
@@ -34073,7 +34271,7 @@ function CustomerSupport(props) {
34073
34271
  }
34074
34272
  ),
34075
34273
  /* @__PURE__ */ jsx(
34076
- ContactDetailsComp,
34274
+ MemoizedContactDetails,
34077
34275
  {
34078
34276
  dataStoreId: "customerSupport",
34079
34277
  data: contactDetailsData,
@@ -34538,7 +34736,7 @@ const EntityGuidanceStatus = ({
34538
34736
  )
34539
34737
  ] });
34540
34738
  };
34541
- const DecisionMakersComponent = ({
34739
+ const DecisionMakers = ({
34542
34740
  trackingConfig,
34543
34741
  parentLegalEntity,
34544
34742
  legalEntityResponse,
@@ -34561,22 +34759,25 @@ const DecisionMakersComponent = ({
34561
34759
  legalEntityId: legalEntityResponse.id,
34562
34760
  problems: capabilityProblems
34563
34761
  });
34564
- const mappedDecisionMakers = decisionMakers == null ? void 0 : decisionMakers.reduce((mappedDecisionMakers2, decisionMaker) => {
34565
- var _a2;
34566
- const mappedDecisionMaker = mappedDecisionMakers2[decisionMaker.legalEntityId];
34567
- const decisionMakerType = decisionMaker.type;
34568
- mappedDecisionMakers2[decisionMaker.legalEntityId] = {
34569
- reference: decisionMaker.legalEntityId,
34570
- types: mappedDecisionMaker ? [...mappedDecisionMaker.types, decisionMakerType] : [decisionMakerType],
34571
- status: getTaskStatus(EntityType.LEGAL_ENTITY, capabilityProblems, legalEntityResponse, [
34572
- decisionMaker.legalEntityId
34573
- ]),
34574
- name: decisionMaker.name,
34575
- legalEntityType: decisionMaker.entityType,
34576
- problems: (_a2 = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _a2[decisionMaker.legalEntityId]
34577
- };
34578
- return mappedDecisionMakers2;
34579
- }, {});
34762
+ const mappedDecisionMakers = decisionMakers == null ? void 0 : decisionMakers.reduce(
34763
+ (mappedDecisionMakers2, decisionMaker) => {
34764
+ var _a2;
34765
+ const mappedDecisionMaker = mappedDecisionMakers2[decisionMaker.legalEntityId];
34766
+ const decisionMakerType = decisionMaker.type;
34767
+ mappedDecisionMakers2[decisionMaker.legalEntityId] = {
34768
+ reference: decisionMaker.legalEntityId,
34769
+ types: mappedDecisionMaker ? [...mappedDecisionMaker.types, decisionMakerType] : [decisionMakerType],
34770
+ status: getTaskStatus(EntityType.LEGAL_ENTITY, capabilityProblems, legalEntityResponse, [
34771
+ decisionMaker.legalEntityId
34772
+ ]),
34773
+ name: decisionMaker.name,
34774
+ legalEntityType: decisionMaker.entityType,
34775
+ problems: (_a2 = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _a2[decisionMaker.legalEntityId]
34776
+ };
34777
+ return mappedDecisionMakers2;
34778
+ },
34779
+ {}
34780
+ );
34580
34781
  const uniqueDecisionMakers = mappedDecisionMakers ? Object.values(mappedDecisionMakers) : [];
34581
34782
  const showWarning = Boolean(remediationMessages.DECISION_MAKER && uniqueDecisionMakers.length);
34582
34783
  const uniqueDecisionMakersPerType = (roleType) => uniqueDecisionMakers.filter(({ types }) => types.includes(roleType)).length;
@@ -35077,7 +35278,7 @@ function LegalEntityTypeSwitcher({
35077
35278
  }
35078
35279
  );
35079
35280
  }
35080
- function ReviewComponent({
35281
+ function Review({
35081
35282
  legalEntityId,
35082
35283
  handleReviewConfirm,
35083
35284
  handleHomeClick
@@ -35537,7 +35738,7 @@ const LEGAL_ENTITY_BASE_TASKS = [
35537
35738
  TaskTypes.DECISION_MAKER_OVERVIEW
35538
35739
  ];
35539
35740
  const CONTRACT_TASKS = [TaskTypes.SERVICE_AGREEMENT, TaskTypes.PCI_DSS];
35540
- function TaskListComponent({
35741
+ function TaskList({
35541
35742
  tasks,
35542
35743
  trackingConfig,
35543
35744
  onNavigateToTask,
@@ -36904,7 +37105,7 @@ function IndividualDropinComponent({
36904
37105
  currentStep,
36905
37106
  totalSteps,
36906
37107
  children: /* @__PURE__ */ jsx(
36907
- IndividualComponent,
37108
+ Individual,
36908
37109
  {
36909
37110
  ...derivedProps,
36910
37111
  capabilities: getCapabilities(legalEntityResponse),
@@ -37480,7 +37681,7 @@ function PayoutDetailsDropinComponent({
37480
37681
  currentStep,
37481
37682
  totalSteps,
37482
37683
  children: /* @__PURE__ */ jsx(
37483
- PayoutDetailsComponent,
37684
+ PayoutDetails,
37484
37685
  {
37485
37686
  ...derivedProps,
37486
37687
  capabilities,
@@ -38166,7 +38367,7 @@ const TrustRoleAndEntityType = (props) => {
38166
38367
  }
38167
38368
  ),
38168
38369
  data.trustMemberType !== "rootTrustee" && (schema.includes("firstName") || schema.includes("lastName")) ? /* @__PURE__ */ jsx(
38169
- Name,
38370
+ MemoizedName,
38170
38371
  {
38171
38372
  ...nameProps,
38172
38373
  data: {
@@ -39333,7 +39534,7 @@ function SolePropDropinComponent({
39333
39534
  omittedKeys: ["operationalAddressIsSame"]
39334
39535
  },
39335
39536
  children: /* @__PURE__ */ jsx(
39336
- SolePropComponent,
39537
+ SoleProp,
39337
39538
  {
39338
39539
  ...derivedProps,
39339
39540
  activeForm,
@@ -39656,7 +39857,7 @@ function TrustDropinComponent({
39656
39857
  omittedKeys: ["operationalAddressIsSame"]
39657
39858
  },
39658
39859
  children: /* @__PURE__ */ jsx(
39659
- TrustComponent,
39860
+ Trust,
39660
39861
  {
39661
39862
  ...derivedProps,
39662
39863
  activeForm,
@@ -40414,7 +40615,7 @@ function DropinComposerComponent({
40414
40615
  return /* @__PURE__ */ jsx(AccountSetupRejected, {});
40415
40616
  case TaskTypes.TASKS_OVERVIEW:
40416
40617
  return /* @__PURE__ */ jsx(
40417
- TaskListComponent,
40618
+ TaskList,
40418
40619
  {
40419
40620
  trackingConfig: { topLevelLegalEntity: legalEntityResponse },
40420
40621
  onNavigateToTask,
@@ -40433,7 +40634,7 @@ function DropinComposerComponent({
40433
40634
  );
40434
40635
  case TaskTypes.DECISION_MAKER_OVERVIEW:
40435
40636
  return /* @__PURE__ */ jsx(
40436
- DecisionMakersComponent,
40637
+ DecisionMakers,
40437
40638
  {
40438
40639
  trackingConfig: {
40439
40640
  topLevelLegalEntity: legalEntityResponse
@@ -40499,7 +40700,7 @@ function DropinComposerComponent({
40499
40700
  );
40500
40701
  case TaskTypes.REVIEW:
40501
40702
  return /* @__PURE__ */ jsx(
40502
- ReviewComponent,
40703
+ Review,
40503
40704
  {
40504
40705
  legalEntityId: rootLegalEntity.id,
40505
40706
  handleReviewConfirm: args.handleReviewConfirm,
@@ -43507,6 +43708,7 @@ function HighExposureFinancialInformation({
43507
43708
  InputCurrency,
43508
43709
  {
43509
43710
  ...childProps,
43711
+ name: "annualTurnover",
43510
43712
  locale: i18n.locale,
43511
43713
  currency: data.currency ?? defaultCurrency,
43512
43714
  amount: data.annualTurnover,
@@ -43657,7 +43859,7 @@ function HighExposureOwnershipStructure({
43657
43859
  onChange: handleChangeFor("isParentOwnedByAnotherCompany"),
43658
43860
  "aria-required": true,
43659
43861
  "aria-label": formUtils.getLabel("isParentOwnedByAnotherCompany"),
43660
- "aria-invalid": !valid.doesYourCompanyHaveLEI
43862
+ "aria-invalid": !valid.isParentOwnedByAnotherCompany
43661
43863
  }
43662
43864
  )
43663
43865
  }
@@ -43924,7 +44126,7 @@ function AdditionalFieldsForHighExposureParentCompany(props) {
43924
44126
  schema
43925
44127
  });
43926
44128
  }, [data, valid, errors, schema, fieldProblems]);
43927
- return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-company", children: [
44129
+ return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-parent-company", children: [
43928
44130
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("parentCompanyInformation") }),
43929
44131
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("inThePreviousStepOwnedByAParentCompany") }),
43930
44132
  /* @__PURE__ */ jsx(
@@ -44043,7 +44245,7 @@ function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
44043
44245
  schema
44044
44246
  });
44045
44247
  }, [data, valid, errors, schema, fieldProblems]);
44046
- return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-company", children: [
44248
+ return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-ultimate-parent-company", children: [
44047
44249
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("ultimateParentCompanyInformation") }),
44048
44250
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("inThePreviousStepOwnedByAnUltimateParentCompany") }),
44049
44251
  /* @__PURE__ */ jsx(
@@ -44147,7 +44349,7 @@ function HighExposureDropinComponent(props) {
44147
44349
  const formWrapperClasses = (activeForm, formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
44148
44350
  const renderActiveForm = (activeForm) => {
44149
44351
  var _a, _b;
44150
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
44352
+ return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
44151
44353
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses(activeForm, companyFormId), children: /* @__PURE__ */ jsx(
44152
44354
  AdditionalFieldsForHighExposureCompany,
44153
44355
  {
@@ -44187,9 +44389,9 @@ function HighExposureDropinComponent(props) {
44187
44389
  shouldValidate: props.shouldValidate
44188
44390
  }
44189
44391
  ) })
44190
- ] }) });
44392
+ ] });
44191
44393
  };
44192
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc", children: renderActiveForm(props.activeForm || highExposureForms.company) });
44394
+ return /* @__PURE__ */ jsx(Fragment, { children: renderActiveForm(props.activeForm || highExposureForms.company) });
44193
44395
  }
44194
44396
  const FormEndState = ({
44195
44397
  title,
@@ -44512,10 +44714,10 @@ function UpdateLegalEntityForHighExposure({
44512
44714
  updateLegalEntity2,
44513
44715
  companyExposureDetails == null ? void 0 : companyExposureDetails.id
44514
44716
  );
44717
+ setShowEndState(true);
44515
44718
  } catch (e) {
44516
44719
  handleSubmissionError(e, HighExposureIndex.COMPANY);
44517
44720
  }
44518
- setShowEndState(true);
44519
44721
  setProblems({});
44520
44722
  }
44521
44723
  } catch (e) {
@@ -44562,7 +44764,7 @@ function UpdateLegalEntityForHighExposure({
44562
44764
  return `${currency} ${formattedValue}`;
44563
44765
  };
44564
44766
  const formatDataForSummary2 = (data2) => {
44565
- var _a2, _b2, _c;
44767
+ var _a2, _b2, _c, _d, _e;
44566
44768
  const summaryData = cloneObject(data2) || {};
44567
44769
  if (summaryData.company) {
44568
44770
  summaryData.company.legalForm = summaryData.company.legalFormLabel;
@@ -44588,14 +44790,14 @@ function UpdateLegalEntityForHighExposure({
44588
44790
  i18n.locale
44589
44791
  );
44590
44792
  }
44591
- if (summaryData.parentCompany) {
44793
+ if ((_b2 = summaryData.parentCompany) == null ? void 0 : _b2.legalName) {
44592
44794
  summaryData.parentCompany.legalForm = summaryData.parentCompany.legalFormLabel;
44593
44795
  summaryData.parentCompany.naceCode = summaryData.parentCompany.naceCodeLabel;
44594
44796
  summaryData.parentCompany.country = datasetUtils.getCountryName(
44595
44797
  summaryData.parentCompany.country
44596
44798
  );
44597
44799
  summaryData.parentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency(
44598
- (_b2 = summaryData.parentCompany) == null ? void 0 : _b2.legalInformationInsolvency
44800
+ (_c = summaryData.parentCompany) == null ? void 0 : _c.legalInformationInsolvency
44599
44801
  );
44600
44802
  summaryData.parentCompany.annualTurnover = getFormattedAmount(
44601
44803
  summaryData.parentCompany.annualTurnover,
@@ -44615,14 +44817,14 @@ function UpdateLegalEntityForHighExposure({
44615
44817
  i18n.locale
44616
44818
  );
44617
44819
  }
44618
- if (summaryData.ultimateParentCompany) {
44820
+ if ((_d = summaryData.ultimateParentCompany) == null ? void 0 : _d.legalName) {
44619
44821
  summaryData.ultimateParentCompany.legalForm = summaryData.ultimateParentCompany.legalFormLabel;
44620
44822
  summaryData.ultimateParentCompany.naceCode = summaryData.ultimateParentCompany.naceCodeLabel;
44621
44823
  summaryData.ultimateParentCompany.country = datasetUtils.getCountryName(
44622
44824
  summaryData.ultimateParentCompany.country
44623
44825
  );
44624
44826
  summaryData.ultimateParentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency(
44625
- (_c = summaryData.ultimateParentCompany) == null ? void 0 : _c.legalInformationInsolvency
44827
+ (_e = summaryData.ultimateParentCompany) == null ? void 0 : _e.legalInformationInsolvency
44626
44828
  );
44627
44829
  summaryData.ultimateParentCompany.annualTurnover = getFormattedAmount(
44628
44830
  summaryData.ultimateParentCompany.annualTurnover,
@@ -45377,7 +45579,7 @@ const ConfigurationApiProvider = ({
45377
45579
  }) => {
45378
45580
  const authContext = useAuthContext();
45379
45581
  const { isEmbeddedDropin, loadingContext } = authContext;
45380
- const sdkVersion = "3.39.2";
45582
+ const sdkVersion = "3.40.1";
45381
45583
  useAnalytics({
45382
45584
  onUserEvent,
45383
45585
  legalEntityId: rootLegalEntityId,
@@ -45496,7 +45698,7 @@ const useAllowedLocales = () => {
45496
45698
  }, []);
45497
45699
  return allowedLocales;
45498
45700
  };
45499
- const localeImports = /* @__PURE__ */ Object.assign({ "./locales/bg-BG.json": () => import("./bg-BG-CLc3Itip.js"), "./locales/cs-CZ.json": () => import("./cs-CZ-egy1O9QR.js"), "./locales/da-DK.json": () => import("./da-DK-Dv9rPHto.js"), "./locales/de-DE.json": () => import("./de-DE-Qp3ZTbvh.js"), "./locales/el-GR.json": () => import("./el-GR-D0zWM9HP.js"), "./locales/en-US.json": () => Promise.resolve().then(() => enUS), "./locales/es-ES.json": () => import("./es-ES-xC1Sc-Sk.js"), "./locales/et-EE.json": () => import("./et-EE-D8diwwod.js"), "./locales/fi-FI.json": () => import("./fi-FI-BrX-GPPR.js"), "./locales/fr-FR.json": () => import("./fr-FR-CTr4D8vs.js"), "./locales/hr-HR.json": () => import("./hr-HR-BEjlz2M0.js"), "./locales/hu-HU.json": () => import("./hu-HU-CLBVDHtE.js"), "./locales/it-IT.json": () => import("./it-IT-B-WY98i1.js"), "./locales/lt-LT.json": () => import("./lt-LT-DkYLw3F1.js"), "./locales/lv-LV.json": () => import("./lv-LV-BTcpmzWG.js"), "./locales/nl-NL.json": () => import("./nl-NL-DFRDUuVO.js"), "./locales/no-NO.json": () => import("./no-NO-nr74oJGp.js"), "./locales/pl-PL.json": () => import("./pl-PL-BKDEM-sF.js"), "./locales/pt-PT.json": () => import("./pt-PT-BEOsVyuS.js"), "./locales/ro-RO.json": () => import("./ro-RO-5OE4sez9.js"), "./locales/sk-SK.json": () => import("./sk-SK-DZnXAokm.js"), "./locales/sl-SI.json": () => import("./sl-SI-ySYCo3IF.js"), "./locales/sv-SE.json": () => import("./sv-SE-BNCCTGyd.js") });
45701
+ const localeImports = /* @__PURE__ */ Object.assign({ "./locales/bg-BG.json": () => import("./bg-BG-Dvrhqyvo.js"), "./locales/cs-CZ.json": () => import("./cs-CZ-CgsVgy3E.js"), "./locales/da-DK.json": () => import("./da-DK-JdIh92_M.js"), "./locales/de-DE.json": () => import("./de-DE-B4wICYwd.js"), "./locales/el-GR.json": () => import("./el-GR-BqVuenrU.js"), "./locales/en-US.instructions.json": () => import("./en-US.instructions-C3VuzmQk.js"), "./locales/en-US.json": () => Promise.resolve().then(() => enUS), "./locales/es-ES.json": () => import("./es-ES-CFKv0XwM.js"), "./locales/et-EE.json": () => import("./et-EE-BgUSm8YW.js"), "./locales/fi-FI.json": () => import("./fi-FI-jP9PEW44.js"), "./locales/fr-FR.json": () => import("./fr-FR-BYQHIIeR.js"), "./locales/hr-HR.json": () => import("./hr-HR-DVqFn22E.js"), "./locales/hu-HU.json": () => import("./hu-HU-Chxss9Ot.js"), "./locales/it-IT.json": () => import("./it-IT-CDNTUiig.js"), "./locales/lt-LT.json": () => import("./lt-LT-B51bjwui.js"), "./locales/lv-LV.json": () => import("./lv-LV-UnmuzHbM.js"), "./locales/nl-NL.json": () => import("./nl-NL-YzmKI_Fv.js"), "./locales/no-NO.json": () => import("./no-NO-xXJy1yre.js"), "./locales/pl-PL.json": () => import("./pl-PL-DIG1zFVM.js"), "./locales/pt-PT.json": () => import("./pt-PT-fPOYgtxq.js"), "./locales/ro-RO.json": () => import("./ro-RO-DoSnloDo.js"), "./locales/sk-SK.json": () => import("./sk-SK-DEziWqGy.js"), "./locales/sl-SI.json": () => import("./sl-SI-eiMpiyFt.js"), "./locales/sv-SE.json": () => import("./sv-SE-BCna5sl5.js") });
45500
45702
  const loadLocale = async (locale) => {
45501
45703
  const importForLocale = localeImports[`./locales/${locale}.json`];
45502
45704
  if (!importForLocale) {
@@ -46048,12 +46250,24 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
46048
46250
  const [debugInfoCopied, setDebugInfoCopied] = useState(false);
46049
46251
  const [isRootLeDataEnabled, setIsRootLeDataEnabled] = useState(false);
46050
46252
  const [searchTerm, setSearchTerm] = useState("");
46253
+ const { i18n } = useI18nContext();
46051
46254
  const allExperimentsWithValues = valuesOf(ExperimentNames).map(
46052
46255
  (experimentName) => [experimentName, isExperimentEnabled(experimentName)]
46053
46256
  );
46054
46257
  const allSettingsWithValues = valuesOf(SettingNames).map(
46055
46258
  (settingName) => [settingName, getSetting(settingName)]
46056
46259
  );
46260
+ const debugModalMetaData = [
46261
+ { key: "SDK version", value: "3.40.1", variant: "green" },
46262
+ { key: "rootLegalEntityId", value: rootLegalEntityId, variant: "blue" },
46263
+ { key: "Locale", value: i18n.locale, variant: "blue" },
46264
+ { key: "Language", value: i18n.languageCode, variant: "blue" },
46265
+ rootLeData && {
46266
+ key: "rootLegalEntityType",
46267
+ value: rootLeData.type,
46268
+ variant: "blue"
46269
+ }
46270
+ ].filter(Boolean);
46057
46271
  const fetchRootLeData = () => {
46058
46272
  if (!getRootLegalEntity) return;
46059
46273
  getRootLegalEntity().then(setRootLeData).catch(logger.error);
@@ -46076,7 +46290,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
46076
46290
  };
46077
46291
  const copyToClipboard = async () => {
46078
46292
  const toCopy = {
46079
- sdkVersion: "3.39.2",
46293
+ sdkVersion: "3.40.1",
46080
46294
  experiments: Object.fromEntries(allExperimentsWithValues),
46081
46295
  settings: Object.fromEntries(allSettingsWithValues)
46082
46296
  };
@@ -46138,20 +46352,10 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
46138
46352
  )
46139
46353
  ] });
46140
46354
  return /* @__PURE__ */ jsx(Modal, { size: "fullscreen", header, footer, onClose: onExit, children: /* @__PURE__ */ jsxs(Fragment, { children: [
46141
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
46142
- /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
46143
- /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
46144
- /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "3.39.2" })
46145
- ] }) }),
46146
- /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
46147
- /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
46148
- /* @__PURE__ */ jsx(Tag, { variant: "blue", className: "adyen-kyc-tag--large", children: rootLegalEntityId })
46149
- ] }) }),
46150
- rootLeData ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
46151
- /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityType" }),
46152
- /* @__PURE__ */ jsx(Tag, { variant: "blue", className: "adyen-kyc-tag--large", children: rootLeData == null ? void 0 : rootLeData.type })
46153
- ] }) }) : void 0
46154
- ] }) }) }),
46355
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsx("tbody", { children: debugModalMetaData.map(({ key, value, variant }) => /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
46356
+ /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: key }),
46357
+ /* @__PURE__ */ jsx(Tag, { variant, className: "adyen-kyc-tag--large", children: value })
46358
+ ] }) }, key)) }) }) }),
46155
46359
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-debug-modal__content", children: [
46156
46360
  rootLeData ? /* @__PURE__ */ jsxs(Fragment, { children: [
46157
46361
  /* @__PURE__ */ jsx("h2", { children: "Legal Entity Data" }),