@adyen/kyc-components 3.58.1 → 3.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/es/{B4MFY5CR-D5INUSNd.js → B4MFY5CR-DT1IN3Fl.js} +1 -1
  2. package/dist/es/DebugModal-C7PUDNlI.js +523 -0
  3. package/dist/es/{HO4MOOFI-CmOjRTBx.js → HO4MOOFI-BYUilyom.js} +2 -2
  4. package/dist/es/{HUY7CZI3-Bs4Fo3S2.js → HUY7CZI3-BCSiY9T5.js} +2 -2
  5. package/dist/es/{Introduction-D4vWdsfW.js → Introduction-DIW5vd8c.js} +1 -1
  6. package/dist/es/adyen-kyc-components.es.js +2 -2
  7. package/dist/es/{css-BC2Y2d3J.js → css-B3bcTE7b.js} +1 -1
  8. package/dist/es/{index-Cc3ftPJH.js → index-CP8YzGVf.js} +967 -1183
  9. package/dist/es/{json-CGyoavrV.js → json-BgrcnsOO.js} +1 -1
  10. package/dist/es/{plaintext-Ckow-AHP.js → plaintext-Kl2vsbEO.js} +1 -1
  11. package/dist/es/{yaml-BAEzva1L.js → yaml-C0rXP05J.js} +1 -1
  12. package/dist/style.css +60 -57
  13. package/dist/types/components/EFP/tasks/HighExposureDropin/HighExposureRegisteredAddress.d.ts +1 -1
  14. package/dist/types/components/EFP/tasks/HighExposureDropin/types.d.ts +0 -1
  15. package/dist/types/components/EmbeddedDropins/UpdateLegalEntityForHighExposure/utils.d.ts +1 -0
  16. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +3 -1
  17. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/validate.d.ts +3 -0
  18. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +5 -0
  19. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -0
  20. package/dist/types/components/Individual/forms/IndividualOnfido/ManualIdUpload/ManualIdUpload.d.ts +1 -0
  21. package/dist/types/components/Shared/devex/DebugListener/DebugListener.d.ts +1 -0
  22. package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +2 -1
  23. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +4 -0
  24. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +6 -0
  25. package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
  26. package/dist/types/components/Shared/forms/Address/constants.d.ts +1 -1
  27. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  28. package/dist/types/core/context/ExperimentContext/types.d.ts +2 -1
  29. package/dist/types/core/models/identityOnfido.d.ts +33 -0
  30. package/dist/types/core/process-field-configurations.d.ts +1 -0
  31. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  32. package/package.json +1 -1
  33. package/dist/types/components/Shared/devex/DebugWrapper/DebugWrapper.d.ts +0 -5
  34. /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugExperimentsAndSettings.d.ts +0 -0
  35. /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugLegalEntityData.d.ts +0 -0
  36. /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugMetadata.d.ts +0 -0
  37. /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugModal.d.ts +0 -0
  38. /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/DebugTaskStatuses.d.ts +0 -0
  39. /package/dist/types/components/Shared/devex/{DebugWrapper → DebugListener}/debugInfo.d.ts +0 -0
@@ -432,7 +432,7 @@ const defaultLocaleTranslations = {
432
432
  editEntityOwner: "Edit owner details",
433
433
  editOwnerOfTrustMember: "Edit owner of %{trustMember}",
434
434
  editTrustMember: "Edit details of %{trustMember} ",
435
- ein: "EIN",
435
+ ein: "Employee Identification Number (EIN)",
436
436
  einVerificationLetter: "Employer identification number (EIN) verification letter, also known as a CP 575 or 147c letter",
437
437
  eInvoicingCode: "E-invoicing (SDI) code",
438
438
  email: "Email address",
@@ -632,6 +632,7 @@ const defaultLocaleTranslations = {
632
632
  errorMessage_1_5055: "VAT document is missing",
633
633
  errorMessage_1_5057: "The VAT document wasn't a supported document type",
634
634
  errorMessage_1_5067: "The legal name didn't match the one on the VAT registry.",
635
+ errorMessage_1_5072: "The registered city didn't match the one on the registry.",
635
636
  errorMessage_1_6000: "The legal name couldn't be verified.",
636
637
  errorMessage_1_6001: "The legal name didn't match the registration number.",
637
638
  errorMessage_1_6002: "The registration number couldn't be verified.",
@@ -722,17 +723,25 @@ const defaultLocaleTranslations = {
722
723
  errorMessage_2_1111: "Some proof of source of funds didn't seem to be owned by your business.",
723
724
  errorMessage_2_1112: "Some proof of source of funds are too old.",
724
725
  errorMessage_2_1113: "Some proof of source of funds didn't show a legal business name.",
726
+ errorMessage_2_8043: "'organization.registrationNumber' was missing.",
727
+ errorMessage_2_8045: "'organization.taxId' was missing.",
725
728
  errorMessage_2_8064: "UBO through ownership was missing.",
726
729
  errorMessage_2_8067: "Signatory was missing.",
730
+ errorMessage_2_8069: "'organization.type' was missing.",
731
+ errorMessage_2_8086: "'organization.doingBusinessAs' was missing.",
727
732
  errorMessage_2_8141: "Registration document was missing.",
728
733
  errorMessage_2_8150: "'phone.number' was missing",
729
734
  errorMessage_2_8162: "proofOfOrganizationTaxInfo was missing.",
735
+ errorMessage_2_8174: "'taxInformation' was missing.",
730
736
  errorMessage_2_8183: "'webAddress' was missing.",
731
737
  errorMessage_2_8189: "UBO through control was missing.",
732
738
  errorMessage_2_8193: "Director was missing.",
733
739
  errorMessage_2_8196: "proofOfOwnership document to perform verification was missing.",
740
+ errorMessage_2_8202: "'organization.registeredAddress.postalCode' was missing.",
734
741
  errorMessage_2_8203: "organization.economicSector was missing",
735
742
  errorMessage_2_8204: "organization.globalLegalEntityIdentifier was missing",
743
+ errorMessage_2_8215: "'organization.registeredAddress.street' was missing.",
744
+ errorMessage_2_8217: "'organization.registeredAddress.city' was missing.",
736
745
  errorMessage_2_8224: "Proof of funding or wealth source was missing.",
737
746
  errorMessage_2_8225: "Institutional sector was missing.",
738
747
  errorMessage_2_8226: "Legal form was missing.",
@@ -741,6 +750,7 @@ const defaultLocaleTranslations = {
741
750
  errorMessage_2_8229: "Head office indicator was missing.",
742
751
  errorMessage_2_8234: "'organization.countryOfGoverningLaw' was missing.",
743
752
  errorMessage_2_8236: "Proof of director was missing.",
753
+ errorMessage_2_8238: "Financial report was missing.",
744
754
  errorMessage_2_8247: "'organization.support.email' was missing",
745
755
  errorMessage_2_8248: "'individual.support.email' was missing",
746
756
  errorMessage_2_8249: "'organization.support.phone.number' was missing",
@@ -823,7 +833,7 @@ const defaultLocaleTranslations = {
823
833
  governmentIssuedCorrespondence: "Government-issued correspondence",
824
834
  grantOfProbate: "Grant of probate",
825
835
  grTaxId: "Αριθμός Φορολογικού Μητρώου Arithmós Forologikou Mētrṓou (ΑΦΜ)",
826
- gst: "Goods and Services Tax (GST)",
836
+ gst: "Goods and Services Tax (GST) number",
827
837
  guardian: "guardian",
828
838
  guardianshipCertificate: "Guardianship certificate",
829
839
  handelsregisternummer: "Handelsregisternummer",
@@ -1382,18 +1392,27 @@ const defaultLocaleTranslations = {
1382
1392
  remediationMessage_1_803: "Upload a proof of director document to legal entity",
1383
1393
  remediationMessage_1_804: "Upload a different proof of director document",
1384
1394
  remediationMessage_1_805: "Update director details",
1395
+ remediationMessage_2_117: "Add 'organization.registrationNumber' to legal entity.",
1396
+ remediationMessage_2_118: "Add 'organization.taxId' to legal entity.",
1385
1397
  remediationMessage_2_123: "You haven't added an owner",
1386
1398
  remediationMessage_2_124: "You haven't added a signatory",
1399
+ remediationMessage_2_125: "Add 'organization.type' to legal entity.",
1400
+ remediationMessage_2_133: "Add 'organization.doingBusinessAs' to legal entity.",
1387
1401
  remediationMessage_2_151: "You haven't added a controlling person",
1388
1402
  remediationMessage_2_153: "Add 'phone.number' to legal entity",
1389
1403
  remediationMessage_2_158: "Provide a VAT number or exemption reason.",
1404
+ remediationMessage_2_170: "Add tax information to legal entity.",
1390
1405
  remediationMessage_2_178: "Add 'webAddress' to business line.",
1391
1406
  remediationMessage_2_184: "Add constitutional document for verification to legal entity.",
1392
1407
  remediationMessage_2_185: "You haven't added your directors",
1393
1408
  remediationMessage_2_188: "Add proofOfOwnership document document for verification to legal entity",
1409
+ remediationMessage_2_194: "Add 'organization.registeredAddress.postalCode' to legal entity.",
1410
+ remediationMessage_2_206: "Add 'organization.registeredAddress.street' to legal entity.",
1411
+ remediationMessage_2_208: "Add 'organization.registeredAddress.city' to legal entity.",
1394
1412
  remediationMessage_2_214: "Upload a proof of funding or wealth source....",
1395
1413
  remediationMessage_2_222: "Upload a proof of relationship to individual",
1396
1414
  remediationMessage_2_223: "Add 'organization.countryOfGoverningLaw' to legal entity",
1415
+ remediationMessage_2_225: "Add financial report to legal entity.",
1397
1416
  remediationMessage_2_234: "Add 'organization.support.email' to legal entity",
1398
1417
  remediationMessage_2_235: "Add 'individual.support.email' to legal entity",
1399
1418
  remediationMessage_2_236: "Add 'organization.support.phone.number' to legal entity",
@@ -1754,7 +1773,7 @@ const defaultLocaleTranslations = {
1754
1773
  whichOfTheseApplyToTheSettlor: "Which of these apply to the settlor? Select all that apply.",
1755
1774
  whichTypeOfIdNumberDoYouHave: "Which type of identification number do you have?",
1756
1775
  whichTypeOfRegistrationNumberDoYouHave: "Which type of registration number do you have?",
1757
- whichTypeOfTaxIdNumberDoYouHave: "Which type of tax identification number do you have?",
1776
+ whichTypeOfTaxIdNumberDoYouHave: "What type of tax ID do you use for your business?",
1758
1777
  whyDoINeedToFillInThisInformation: "Why do I need to fill in this information?",
1759
1778
  winLossStatement: "Win/loss statement",
1760
1779
  winningProceedAmount: "Winning proceed amount",
@@ -1837,7 +1856,7 @@ const createLogger = (namespace) => {
1837
1856
  };
1838
1857
  let sdkToken;
1839
1858
  let fetchSdkToken;
1840
- const logger$U = createLogger("Session");
1859
+ const logger$T = createLogger("Session");
1841
1860
  const setSdkToken = (token) => {
1842
1861
  sdkToken = token;
1843
1862
  };
@@ -1862,7 +1881,7 @@ const refreshSession = async () => {
1862
1881
  setSdkToken(token);
1863
1882
  isSessionRefreshed = true;
1864
1883
  } catch (e) {
1865
- logger$U.error("Failed to fetch sdk token", e);
1884
+ logger$T.error("Failed to fetch sdk token", e);
1866
1885
  }
1867
1886
  return isSessionRefreshed;
1868
1887
  };
@@ -2101,7 +2120,7 @@ function useToastContext() {
2101
2120
  }
2102
2121
  return context;
2103
2122
  }
2104
- const logger$T = createLogger("useBankConfigurationHandler");
2123
+ const logger$S = createLogger("useBankConfigurationHandler");
2105
2124
  const useBankConfigurationHandlers = ({
2106
2125
  handleGetBankVerificationVendors,
2107
2126
  bankAccountCountry,
@@ -2119,7 +2138,7 @@ const useBankConfigurationHandlers = ({
2119
2138
  const bankVerificationVendorsResponse = handleGetBankVerificationVendors ? await handleGetBankVerificationVendors(bankAccountCountry) : [];
2120
2139
  setProvider(bankVerificationVendorsResponse == null ? void 0 : bankVerificationVendorsResponse[0]);
2121
2140
  })().catch(() => {
2122
- logger$T.error();
2141
+ logger$S.error();
2123
2142
  setProvider(void 0);
2124
2143
  }).finally(() => {
2125
2144
  setLoadingStatus("success");
@@ -2346,12 +2365,12 @@ const unscalableIconNames = [
2346
2365
  "upload",
2347
2366
  "warning"
2348
2367
  ];
2349
- const logger$S = createLogger("Icon");
2368
+ const logger$R = createLogger("Icon");
2350
2369
  const Svg = ({ className: className2, name, testId, title, type }) => {
2351
2370
  const LazyLoadedSvg = svgs[name];
2352
2371
  const viewBox = unscalableIconNames.includes(name) ? "0 0 16 16" : void 0;
2353
2372
  if (!LazyLoadedSvg) {
2354
- logger$S.error(`No such svg: "${name}"`);
2373
+ logger$R.error(`No such svg: "${name}"`);
2355
2374
  return null;
2356
2375
  }
2357
2376
  return /* @__PURE__ */ jsx("span", { className: cx(`adyen-kyc-${type}`, className2), "data-testid": testId, children: /* @__PURE__ */ jsx(Suspense, { fallback: null, children: viewBox ? /* @__PURE__ */ jsx(LazyLoadedSvg, { "aria-hidden": type === "icon", viewBox, title: title || name }) : /* @__PURE__ */ jsx(LazyLoadedSvg, { "aria-hidden": type === "icon", title: title || name }) }) });
@@ -2365,7 +2384,7 @@ const loaderSmall = "adyen-kyc-loader-small";
2365
2384
  const loaderMedium = "adyen-kyc-loader-medium";
2366
2385
  const loaderXsmall = "adyen-kyc-loader-xsmall";
2367
2386
  const loaderDot = "adyen-kyc-loader-dot";
2368
- const styles$y = {
2387
+ const styles$w = {
2369
2388
  loaderWrapper,
2370
2389
  loaderWrapperInline,
2371
2390
  loader,
@@ -2376,16 +2395,16 @@ const styles$y = {
2376
2395
  loaderDot
2377
2396
  };
2378
2397
  const sizeMap = {
2379
- xsmall: styles$y.loaderXsmall,
2380
- small: styles$y.loaderSmall,
2381
- medium: styles$y.loaderMedium,
2382
- large: styles$y.loaderLarge
2398
+ xsmall: styles$w.loaderXsmall,
2399
+ small: styles$w.loaderSmall,
2400
+ medium: styles$w.loaderMedium,
2401
+ large: styles$w.loaderLarge
2383
2402
  };
2384
- const Loader = ({ inline = false, size = "large", dot = false }) => /* @__PURE__ */ jsx("div", { className: cx(styles$y.loaderWrapper, { [styles$y.loaderWrapperInline]: inline }), children: /* @__PURE__ */ jsx(
2403
+ const Loader = ({ inline = false, size = "large", dot = false }) => /* @__PURE__ */ jsx("div", { className: cx(styles$w.loaderWrapper, { [styles$w.loaderWrapperInline]: inline }), children: /* @__PURE__ */ jsx(
2385
2404
  "div",
2386
2405
  {
2387
2406
  role: "progressbar",
2388
- className: cx(styles$y.loader, sizeMap[size], { [styles$y.loaderDot]: dot })
2407
+ className: cx(styles$w.loader, sizeMap[size], { [styles$w.loaderDot]: dot })
2389
2408
  }
2390
2409
  ) });
2391
2410
  const button = "adyen-kyc-button";
@@ -2401,7 +2420,7 @@ const buttonVariantCritical = "adyen-kyc-button-variant-critical";
2401
2420
  const buttonVariantLink = "adyen-kyc-button-variant-link";
2402
2421
  const buttonVariantSurface = "adyen-kyc-button-variant-surface";
2403
2422
  const buttonSpinner = "adyen-kyc-button-spinner";
2404
- const styles$x = {
2423
+ const styles$v = {
2405
2424
  button,
2406
2425
  buttonFullWidth,
2407
2426
  buttonLabel,
@@ -2430,17 +2449,17 @@ const ButtonBase = ({
2430
2449
  }) => {
2431
2450
  const isDisabled = disabled || loading;
2432
2451
  const buttonVariantStyle = {
2433
- primary: styles$x.buttonVariantPrimary,
2434
- secondary: styles$x.buttonVariantSecondary,
2435
- tertiary: styles$x.buttonVariantTertiary,
2436
- critical: styles$x.buttonVariantCritical,
2437
- link: styles$x.buttonVariantLink,
2438
- surface: styles$x.buttonVariantSurface
2439
- };
2440
- const rootClassName = cx(styles$x.button, buttonVariantStyle[variant], {
2441
- [styles$x.buttonShapeRectangle]: circle === false,
2442
- [styles$x.buttonShapeCircle]: circle === true,
2443
- [styles$x.buttonFullWidth]: fullWidth
2452
+ primary: styles$v.buttonVariantPrimary,
2453
+ secondary: styles$v.buttonVariantSecondary,
2454
+ tertiary: styles$v.buttonVariantTertiary,
2455
+ critical: styles$v.buttonVariantCritical,
2456
+ link: styles$v.buttonVariantLink,
2457
+ surface: styles$v.buttonVariantSurface
2458
+ };
2459
+ const rootClassName = cx(styles$v.button, buttonVariantStyle[variant], {
2460
+ [styles$v.buttonShapeRectangle]: circle === false,
2461
+ [styles$v.buttonShapeCircle]: circle === true,
2462
+ [styles$v.buttonFullWidth]: fullWidth
2444
2463
  });
2445
2464
  const handleOnClick = (event) => {
2446
2465
  event.preventDefault();
@@ -2458,7 +2477,7 @@ const ButtonBase = ({
2458
2477
  onClick: handleOnClick,
2459
2478
  type,
2460
2479
  children: [
2461
- loading && /* @__PURE__ */ jsx("div", { className: styles$x.buttonSpinner, children: /* @__PURE__ */ jsx(Loader, { size: "small" }) }),
2480
+ loading && /* @__PURE__ */ jsx("div", { className: styles$v.buttonSpinner, children: /* @__PURE__ */ jsx(Loader, { size: "small" }) }),
2462
2481
  children2
2463
2482
  ]
2464
2483
  }
@@ -2485,8 +2504,8 @@ const Button = ({
2485
2504
  type,
2486
2505
  variant
2487
2506
  };
2488
- const labelClassname = cx(styles$x.buttonLabel, {
2489
- [styles$x.buttonLabelPadding]: variant !== "link"
2507
+ const labelClassname = cx(styles$v.buttonLabel, {
2508
+ [styles$v.buttonLabelPadding]: variant !== "link"
2490
2509
  });
2491
2510
  return /* @__PURE__ */ jsx(ButtonBase, { ...buttonProps, children: /* @__PURE__ */ jsxs("div", { className: labelClassname, children: [
2492
2511
  icon && /* @__PURE__ */ jsx(Icon, { name: icon }),
@@ -2512,13 +2531,13 @@ const IconButton = ({
2512
2531
  testId,
2513
2532
  variant
2514
2533
  };
2515
- return /* @__PURE__ */ jsx(ButtonBase, { ...buttonProps, children: /* @__PURE__ */ jsx("div", { className: styles$x.buttonLabel, children: /* @__PURE__ */ jsx(Icon, { name: icon }) }) });
2534
+ return /* @__PURE__ */ jsx(ButtonBase, { ...buttonProps, children: /* @__PURE__ */ jsx("div", { className: styles$v.buttonLabel, children: /* @__PURE__ */ jsx(Icon, { name: icon }) }) });
2516
2535
  };
2517
2536
  const divider = "adyen-kyc-divider";
2518
- const styles$w = {
2537
+ const styles$u = {
2519
2538
  divider
2520
2539
  };
2521
- const Divider = () => /* @__PURE__ */ jsx("hr", { className: styles$w.divider });
2540
+ const Divider = () => /* @__PURE__ */ jsx("hr", { className: styles$u.divider });
2522
2541
  function FormHeader({
2523
2542
  heading,
2524
2543
  description,
@@ -2568,7 +2587,7 @@ const Typography = ({
2568
2587
  const skeleton = "adyen-kyc-skeleton";
2569
2588
  const skeletonCircle = "adyen-kyc-skeleton-circle";
2570
2589
  const skeletonText = "adyen-kyc-skeleton-text";
2571
- const styles$v = {
2590
+ const styles$t = {
2572
2591
  skeleton,
2573
2592
  skeletonCircle,
2574
2593
  skeletonText
@@ -2579,9 +2598,9 @@ const Skeleton = ({
2579
2598
  height = "1em",
2580
2599
  width
2581
2600
  }) => {
2582
- const classNames = cx(styles$v.skeleton, {
2583
- [styles$v.skeletonCircle]: circle,
2584
- [styles$v.skeletonText]: text
2601
+ const classNames = cx(styles$t.skeleton, {
2602
+ [styles$t.skeletonCircle]: circle,
2603
+ [styles$t.skeletonText]: text
2585
2604
  });
2586
2605
  return /* @__PURE__ */ jsx("div", { className: classNames, style: { height, width } });
2587
2606
  };
@@ -2597,7 +2616,7 @@ const accordionContent = "adyen-kyc-accordion-content";
2597
2616
  const accordionWithIcon = "adyen-kyc-accordion-with-icon";
2598
2617
  const accordionArrow = "adyen-kyc-accordion-arrow";
2599
2618
  const accordionArrowRight = "adyen-kyc-accordion-arrow-right";
2600
- const styles$u = {
2619
+ const styles$s = {
2601
2620
  accordion,
2602
2621
  accordionSummary,
2603
2622
  accordionBasic,
@@ -2625,34 +2644,34 @@ const Accordion = ({
2625
2644
  onToggle(e.newState === "closed" ? "close" : "open");
2626
2645
  };
2627
2646
  const variantMap2 = {
2628
- basic: styles$u.accordionBasic,
2629
- info: styles$u.accordionInfo,
2630
- error: styles$u.accordionError,
2631
- warning: styles$u.accordionWarning,
2632
- success: styles$u.accordionSuccess
2647
+ basic: styles$s.accordionBasic,
2648
+ info: styles$s.accordionInfo,
2649
+ error: styles$s.accordionError,
2650
+ warning: styles$s.accordionWarning,
2651
+ success: styles$s.accordionSuccess
2633
2652
  };
2634
2653
  return /* @__PURE__ */ jsxs(
2635
2654
  "details",
2636
2655
  {
2637
2656
  onToggle: handleToggle,
2638
- className: cx(className2, styles$u.accordion, variantMap2[variant], {
2639
- [styles$u.accordionWithIcon]: expandOnLeft,
2640
- [styles$u.accordionNarrow]: narrow
2657
+ className: cx(className2, styles$s.accordion, variantMap2[variant], {
2658
+ [styles$s.accordionWithIcon]: expandOnLeft,
2659
+ [styles$s.accordionNarrow]: narrow
2641
2660
  }),
2642
2661
  children: [
2643
- /* @__PURE__ */ jsxs("summary", { className: styles$u.accordionSummary, children: [
2644
- expandOnLeft && /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles$u.accordionArrow }),
2662
+ /* @__PURE__ */ jsxs("summary", { className: styles$s.accordionSummary, children: [
2663
+ expandOnLeft && /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles$s.accordionArrow }),
2645
2664
  /* @__PURE__ */ jsx(Slot, { name: "icon" }),
2646
2665
  /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", children: /* @__PURE__ */ jsx(Slot, { name: "title", children: /* @__PURE__ */ jsx(Skeleton, {}) }) }),
2647
2666
  !expandOnLeft && /* @__PURE__ */ jsx(
2648
2667
  Icon,
2649
2668
  {
2650
2669
  name: "chevron-down",
2651
- className: cx(styles$u.accordionArrow, styles$u.accordionArrowRight)
2670
+ className: cx(styles$s.accordionArrow, styles$s.accordionArrowRight)
2652
2671
  }
2653
2672
  )
2654
2673
  ] }),
2655
- /* @__PURE__ */ jsx("div", { className: styles$u.accordionContent, children: /* @__PURE__ */ jsx(Slot, { name: "content", children: /* @__PURE__ */ jsx(Skeleton, {}) }) })
2674
+ /* @__PURE__ */ jsx("div", { className: styles$s.accordionContent, children: /* @__PURE__ */ jsx(Slot, { name: "content", children: /* @__PURE__ */ jsx(Skeleton, {}) }) })
2656
2675
  ]
2657
2676
  }
2658
2677
  );
@@ -2673,7 +2692,7 @@ const alertIconError = "adyen-kyc-alert-icon-error";
2673
2692
  const alertIconWarning = "adyen-kyc-alert-icon-warning";
2674
2693
  const alertIconSuccess = "adyen-kyc-alert-icon-success";
2675
2694
  const alertTitle = "adyen-kyc-alert-title";
2676
- const styles$t = {
2695
+ const styles$r = {
2677
2696
  alert,
2678
2697
  alertWithoutIcon,
2679
2698
  alertExplanation,
@@ -2692,19 +2711,19 @@ const styles$t = {
2692
2711
  alertTitle
2693
2712
  };
2694
2713
  const variantMap$1 = {
2695
- basic: styles$t.alertBasic,
2696
- info: styles$t.alertInfo,
2697
- error: styles$t.alertError,
2698
- warning: styles$t.alertWarning,
2699
- success: styles$t.alertSuccess
2714
+ basic: styles$r.alertBasic,
2715
+ info: styles$r.alertInfo,
2716
+ error: styles$r.alertError,
2717
+ warning: styles$r.alertWarning,
2718
+ success: styles$r.alertSuccess
2700
2719
  };
2701
2720
  const iconVariantMap = {
2702
2721
  basic: "",
2703
2722
  // does not exist
2704
- info: styles$t.alertIconInfo,
2705
- error: styles$t.alertIconError,
2706
- warning: styles$t.alertIconWarning,
2707
- success: styles$t.alertIconSuccess
2723
+ info: styles$r.alertIconInfo,
2724
+ error: styles$r.alertIconError,
2725
+ warning: styles$r.alertIconWarning,
2726
+ success: styles$r.alertIconSuccess
2708
2727
  };
2709
2728
  const Alert = ({
2710
2729
  title,
@@ -2730,7 +2749,7 @@ const Alert = ({
2730
2749
  if (isValidElement(icon)) {
2731
2750
  return icon;
2732
2751
  }
2733
- return /* @__PURE__ */ jsx("span", { className: cx(styles$t.alertIcon, iconVariantMap[variant]), children: /* @__PURE__ */ jsx(AlertIcon, { variant }) });
2752
+ return /* @__PURE__ */ jsx("span", { className: cx(styles$r.alertIcon, iconVariantMap[variant]), children: /* @__PURE__ */ jsx(AlertIcon, { variant }) });
2734
2753
  };
2735
2754
  const renderedIcon = renderIcon();
2736
2755
  if (type === "collapsible") {
@@ -2739,7 +2758,7 @@ const Alert = ({
2739
2758
  /* @__PURE__ */ jsx("template", { slot: "icon", children: renderedIcon }),
2740
2759
  /* @__PURE__ */ jsxs("template", { slot: "content", children: [
2741
2760
  children2,
2742
- !!actions && /* @__PURE__ */ jsx("div", { className: styles$t.alertActions, children: actions })
2761
+ !!actions && /* @__PURE__ */ jsx("div", { className: styles$r.alertActions, children: actions })
2743
2762
  ] })
2744
2763
  ] });
2745
2764
  }
@@ -2747,18 +2766,18 @@ const Alert = ({
2747
2766
  return /* @__PURE__ */ jsxs(
2748
2767
  "div",
2749
2768
  {
2750
- className: cx(styles$t.alert, className2, variantMap$1[variant], {
2751
- [styles$t.alertWithoutIcon]: !renderedIcon
2769
+ className: cx(styles$r.alert, className2, variantMap$1[variant], {
2770
+ [styles$r.alertWithoutIcon]: !renderedIcon
2752
2771
  }),
2753
2772
  role: "alert",
2754
2773
  "data-testid": testId,
2755
2774
  children: [
2756
- /* @__PURE__ */ jsxs("div", { className: styles$t.alertHeader, children: [
2775
+ /* @__PURE__ */ jsxs("div", { className: styles$r.alertHeader, children: [
2757
2776
  renderedIcon,
2758
- title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: styles$t.alertTitle, children: title }),
2759
- !!actions && /* @__PURE__ */ jsx("div", { className: styles$t.alertActions, children: actions })
2777
+ title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: styles$r.alertTitle, children: title }),
2778
+ !!actions && /* @__PURE__ */ jsx("div", { className: styles$r.alertActions, children: actions })
2760
2779
  ] }),
2761
- !!children2 && /* @__PURE__ */ jsx("div", { className: styles$t.alertExplanation, children: children2 })
2780
+ !!children2 && /* @__PURE__ */ jsx("div", { className: styles$r.alertExplanation, children: children2 })
2762
2781
  ]
2763
2782
  }
2764
2783
  );
@@ -2766,19 +2785,19 @@ const Alert = ({
2766
2785
  return /* @__PURE__ */ jsxs(
2767
2786
  "div",
2768
2787
  {
2769
- className: cx(styles$t.alert, className2, variantMap$1[variant], {
2770
- [styles$t.alertWithoutIcon]: !renderedIcon
2788
+ className: cx(styles$r.alert, className2, variantMap$1[variant], {
2789
+ [styles$r.alertWithoutIcon]: !renderedIcon
2771
2790
  }),
2772
2791
  role: "alert",
2773
2792
  "data-testid": testId,
2774
2793
  children: [
2775
- /* @__PURE__ */ jsxs("div", { className: styles$t.alertHeader, children: [
2794
+ /* @__PURE__ */ jsxs("div", { className: styles$r.alertHeader, children: [
2776
2795
  renderedIcon,
2777
- title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: styles$t.alertTitle, children: title }),
2796
+ title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: styles$r.alertTitle, children: title }),
2778
2797
  type === "dismissible" && /* @__PURE__ */ jsx(Button, { variant: "tertiary", icon: "cross", onClick: closeAlert, children: i18n.get("close") })
2779
2798
  ] }),
2780
- !!children2 && /* @__PURE__ */ jsx("div", { className: styles$t.alertExplanation, children: children2 }),
2781
- !!actions && /* @__PURE__ */ jsx("div", { className: styles$t.alertActions, children: actions })
2799
+ !!children2 && /* @__PURE__ */ jsx("div", { className: styles$r.alertExplanation, children: children2 }),
2800
+ !!actions && /* @__PURE__ */ jsx("div", { className: styles$r.alertActions, children: actions })
2782
2801
  ]
2783
2802
  }
2784
2803
  );
@@ -2860,7 +2879,7 @@ const list = "adyen-kyc-list";
2860
2879
  const listNoMarkers = "adyen-kyc-list-no-markers";
2861
2880
  const listItem = "adyen-kyc-list-item";
2862
2881
  const listOrdered = "adyen-kyc-list-ordered";
2863
- const styles$s = {
2882
+ const styles$q = {
2864
2883
  list,
2865
2884
  listNoMarkers,
2866
2885
  listItem,
@@ -2868,12 +2887,12 @@ const styles$s = {
2868
2887
  };
2869
2888
  function List({ className: className2, ordered, noMarkers, items }) {
2870
2889
  const classNames = cx([
2871
- styles$s.list,
2872
- ordered && styles$s.listOrdered,
2873
- noMarkers && styles$s.listNoMarkers,
2890
+ styles$q.list,
2891
+ ordered && styles$q.listOrdered,
2892
+ noMarkers && styles$q.listNoMarkers,
2874
2893
  className2
2875
2894
  ]);
2876
- return /* @__PURE__ */ jsx("ul", { className: classNames, children: items.map((item, idx) => /* @__PURE__ */ jsx("li", { className: styles$s.listItem, children: item }, idx)) });
2895
+ return /* @__PURE__ */ jsx("ul", { className: classNames, children: items.map((item, idx) => /* @__PURE__ */ jsx("li", { className: styles$q.listItem, children: item }, idx)) });
2877
2896
  }
2878
2897
  var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
2879
2898
  DocumentType2["BANK_STATEMENT"] = "bankStatement";
@@ -2973,11 +2992,20 @@ const dataMissingRemediationsToFieldsMap = {
2973
2992
  "1_503": [DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO],
2974
2993
  "1_512": [DocumentType.VAT_DOCUMENT],
2975
2994
  "1_803": [DocumentType.PROOF_OF_DIRECTOR],
2995
+ "2_117": ["organization.registrationNumber"],
2996
+ "2_118": ["organization.taxId"],
2997
+ "2_125": ["organization.type"],
2998
+ "2_133": ["organization.doingBusinessAs"],
2999
+ "2_153": ["phoneNumber"],
2976
3000
  "2_158": ["vatNumber", "exemptedFromVat", "vatAbsenceReason"],
3001
+ "2_170": ["organization.taxInformation"],
2977
3002
  "2_184": [DocumentType.CONSTITUTIONAL_DOCUMENT],
2978
- "2_222": [DocumentType.PROOF_OF_RELATIONSHIP],
3003
+ "2_194": ["organization.registeredAddress.postalCode"],
3004
+ "2_206": ["organization.registeredAddress.street"],
3005
+ "2_208": ["organization.registeredAddress.city"],
2979
3006
  "2_214": [DocumentType.PROOF_OF_FUNDING],
2980
- "2_153": ["phoneNumber"]
3007
+ "2_222": [DocumentType.PROOF_OF_RELATIONSHIP],
3008
+ "2_225": ["organization.financialReports"]
2981
3009
  };
2982
3010
  const CUSTOMER_SUPPORT_DATA_MISSING_ERROR_CODES = ["2_8247", "2_8248", "2_8249", "2_8250"];
2983
3011
  const DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING = {
@@ -4601,7 +4629,7 @@ const Select = ({
4601
4629
  );
4602
4630
  };
4603
4631
  const convertFullToHalf = (str) => str.replace(/[!-~]/g, (r) => String.fromCharCode(r.charCodeAt(0) - 65248));
4604
- const logger$R = createLogger("TextArea");
4632
+ const logger$Q = createLogger("TextArea");
4605
4633
  function TextArea(props) {
4606
4634
  const { uniqueId, ...passedProps } = props;
4607
4635
  const {
@@ -4620,7 +4648,7 @@ function TextArea(props) {
4620
4648
  const { i18n } = useI18nContext();
4621
4649
  const [value, setValue] = useState("");
4622
4650
  if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
4623
- logger$R.error("Error: Form fields that rely on InputBase may not have an onChange property");
4651
+ logger$Q.error("Error: Form fields that rely on InputBase may not have an onChange property");
4624
4652
  }
4625
4653
  const handleInput = (e) => {
4626
4654
  var _a2;
@@ -4719,7 +4747,7 @@ class ValidationResult {
4719
4747
  return this.validationResults;
4720
4748
  }
4721
4749
  }
4722
- const logger$Q = createLogger("useAsyncValidator");
4750
+ const logger$P = createLogger("useAsyncValidator");
4723
4751
  const useAsyncValidator = (asyncRules) => {
4724
4752
  const [asyncValidationResults, setAsyncValidationResults] = useState({});
4725
4753
  const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
@@ -4739,7 +4767,7 @@ const useAsyncValidator = (asyncRules) => {
4739
4767
  }
4740
4768
  ])
4741
4769
  });
4742
- }).catch(logger$Q.error);
4770
+ }).catch(logger$P.error);
4743
4771
  },
4744
4772
  [asyncRules, clearAsyncValidationResults]
4745
4773
  );
@@ -9931,7 +9959,7 @@ const operationalAddressIsSameItems = [
9931
9959
  name: "operationalAddressIsNotSameItemName"
9932
9960
  }
9933
9961
  ];
9934
- const logger$P = createLogger("mapPayoutAccountSchemaToApiBankAccount");
9962
+ const logger$O = createLogger("mapPayoutAccountSchemaToApiBankAccount");
9935
9963
  const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCountry) => {
9936
9964
  var _a2;
9937
9965
  if ("iban" in payoutAccount && payoutAccount.iban)
@@ -10019,7 +10047,7 @@ const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCoun
10019
10047
  routingNumber: payoutAccount.branchCode
10020
10048
  };
10021
10049
  default:
10022
- logger$P.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
10050
+ logger$O.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
10023
10051
  return {
10024
10052
  type: `${bankCountry.toLowerCase()}Local`,
10025
10053
  accountNumber: payoutAccount.bankAccountNumber
@@ -10046,7 +10074,7 @@ var CompanyTypesValue = /* @__PURE__ */ ((CompanyTypesValue2) => {
10046
10074
  CompanyTypesValue2["SOLE_PROPRIETORSHIP"] = "soleProprietorship";
10047
10075
  return CompanyTypesValue2;
10048
10076
  })(CompanyTypesValue || {});
10049
- const ADDRESS_SCHEMA = [
10077
+ const addressFields = [
10050
10078
  "address",
10051
10079
  "otherAddressInformation",
10052
10080
  "postalCode",
@@ -10055,7 +10083,7 @@ const ADDRESS_SCHEMA = [
10055
10083
  "country",
10056
10084
  "poBox"
10057
10085
  ];
10058
- const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY, PO_BOX] = ADDRESS_SCHEMA;
10086
+ const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY, PO_BOX] = addressFields;
10059
10087
  const COUNTRIES_WITH_STATES_DATASET = [
10060
10088
  CountryCodes.Australia,
10061
10089
  CountryCodes.Brazil,
@@ -10533,7 +10561,7 @@ const onfidoDocumentTypeMapping = [
10533
10561
  { id: DocumentType.NATIONAL_IDENTITY_CARD, name: "identityCard", hasBackPage: true },
10534
10562
  { id: DocumentType.PASSPORT, name: "passport", hasBackPage: false }
10535
10563
  ];
10536
- const logger$O = createLogger("documentUtils");
10564
+ const logger$N = createLogger("documentUtils");
10537
10565
  const documentStore = {};
10538
10566
  const idTypes = idDocumentTypeOptions.map((types) => types.id);
10539
10567
  let getDocumentService;
@@ -10570,7 +10598,7 @@ const fetchDocuments = async (documentDetails, entityId) => {
10570
10598
  if (id) {
10571
10599
  documentStore[id].push(document2);
10572
10600
  } else {
10573
- logger$O.error("Document has no `owner.id`", document2);
10601
+ logger$N.error("Document has no `owner.id`", document2);
10574
10602
  }
10575
10603
  });
10576
10604
  return documentStore[entityId];
@@ -10836,6 +10864,7 @@ const solePropBusinessDetailsBaseMapping = {
10836
10864
  "basicInformation.stateOrProvince": "soleProprietorship.registeredAddress.stateOrProvince",
10837
10865
  "basicInformation.registrationNumber": "soleProprietorship.registrationNumber",
10838
10866
  "basicInformation.taxInformation": "soleProprietorship.taxInformation",
10867
+ "basicInformation.exemptedFromTax": "soleProprietorship.taxAbsent",
10839
10868
  "basicInformation.countryOfGoverningLaw": "soleProprietorship.countryOfGoverningLaw",
10840
10869
  "additionalInformation.hasDoingBusinessAs": "soleProprietorship.doingBusinessAsAbsent",
10841
10870
  "additionalInformation.doingBusinessAs": "soleProprietorship.doingBusinessAs",
@@ -11700,7 +11729,7 @@ const mapIndividualDocumentToApiDocument = async (data, entityId) => {
11700
11729
  var _a2, _b2, _c2, _d2, _e2;
11701
11730
  if (data) {
11702
11731
  const { proofOfNationalId, proofOfResidency, proofOfRelationship } = data;
11703
- const idDocument2 = "idDocument" in data ? data.idDocument : data.idVerificationMethod.idDocument;
11732
+ const idDocument2 = "idDocument" in data ? data.idDocument : data.manualIdUpload;
11704
11733
  const entityType = "legalEntity";
11705
11734
  const documents = await Promise.all([
11706
11735
  createDocumentRequest({
@@ -12078,7 +12107,11 @@ const prepareExposureSubmitData = (exposureIndex, data, rootLegalEntity) => {
12078
12107
  const appendHighExposureData = (legalOrganization, highExposureData) => {
12079
12108
  if (!legalOrganization || !highExposureData) return highExposureData;
12080
12109
  const clonedHighExposureData = { ...highExposureData };
12081
- const financialReportData = (legalOrganization == null ? void 0 : legalOrganization.financialReports) ? mapFinancialReportsToFinancialInformation(legalOrganization.financialReports, false) : {};
12110
+ let financialReportData = {};
12111
+ if (legalOrganization.financialReports) {
12112
+ const financialReportsArray = Array.isArray(legalOrganization.financialReports) ? legalOrganization.financialReports : [legalOrganization.financialReports];
12113
+ financialReportData = mapFinancialReportsToFinancialInformation(financialReportsArray, false);
12114
+ }
12082
12115
  return {
12083
12116
  ...clonedHighExposureData,
12084
12117
  ...financialReportData,
@@ -12545,7 +12578,7 @@ const mapReceivedTaskType = (taskType) => {
12545
12578
  return taskType;
12546
12579
  }
12547
12580
  };
12548
- const logger$N = createLogger("globalStore");
12581
+ const logger$M = createLogger("globalStore");
12549
12582
  const computed = dist.createComputed(
12550
12583
  ({
12551
12584
  taskTypes,
@@ -12585,7 +12618,7 @@ const computed = dist.createComputed(
12585
12618
  transferInstruments
12586
12619
  });
12587
12620
  } catch (err) {
12588
- logger$N.error(`Could not calculate task status for ${taskIdentifier}. `, err);
12621
+ logger$M.error(`Could not calculate task status for ${taskIdentifier}. `, err);
12589
12622
  }
12590
12623
  return acc;
12591
12624
  }, {});
@@ -12639,7 +12672,7 @@ const useGetTaskStatus = () => {
12639
12672
  const taskIdentifier = id ? `${taskType}-${id}` : taskType;
12640
12673
  const status = (_a2 = taskStatuses[taskIdentifier]) == null ? void 0 : _a2.status;
12641
12674
  if (status === void 0) {
12642
- logger$N.warn(`No status for task '${taskIdentifier}', returning UNKNOWN`);
12675
+ logger$M.warn(`No status for task '${taskIdentifier}', returning UNKNOWN`);
12643
12676
  return TaskStatus.UNKNOWN;
12644
12677
  }
12645
12678
  return status;
@@ -12699,7 +12732,7 @@ const removeAnimationStartListener = (element, listener) => {
12699
12732
  };
12700
12733
  const isProviderPlaidEmbedded = (redirectUrl) => !!(redirectUrl == null ? void 0 : redirectUrl.includes("/plaid/embedded-search/sdk?")) || !!(redirectUrl == null ? void 0 : redirectUrl.includes("/plaidEmbeddedSearch"));
12701
12734
  const isProviderWidgetInline = (providerName) => !providerName ? true : ["PayWithMyBank"].includes(providerName);
12702
- const logger$M = createLogger("Fetch");
12735
+ const logger$L = createLogger("Fetch");
12703
12736
  const getRequestObject = (options, data) => {
12704
12737
  const { headers = [], method = "GET", authentication } = options;
12705
12738
  let authHeaders;
@@ -12740,10 +12773,10 @@ const logFetchError = (message, level) => {
12740
12773
  case "info":
12741
12774
  case "warn":
12742
12775
  case "error":
12743
- logger$M[level](message);
12776
+ logger$L[level](message);
12744
12777
  break;
12745
12778
  default:
12746
- logger$M.error(message);
12779
+ logger$L.error(message);
12747
12780
  }
12748
12781
  };
12749
12782
  const handleFetchResponse = async (response, responseType) => {
@@ -12827,7 +12860,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
12827
12860
  const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
12828
12861
  const MOUNT_TIMEOUT = 10 * 1e3;
12829
12862
  const TINK_VENDOR = "Tink";
12830
- const logger$L = createLogger("iframeWidget");
12863
+ const logger$K = createLogger("iframeWidget");
12831
12864
  const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
12832
12865
  const isTerminalMessageData = (data) => isObjectData(data) && Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
12833
12866
  const parseMessageJson = (message) => {
@@ -12845,7 +12878,7 @@ const callbackErrorHandler = async (response) => {
12845
12878
  try {
12846
12879
  await response;
12847
12880
  } catch (ex) {
12848
- logger$L.error(ex);
12881
+ logger$K.error(ex);
12849
12882
  }
12850
12883
  return {
12851
12884
  error: "UNKNOWN_ERROR",
@@ -12941,7 +12974,7 @@ class IFrameWidget {
12941
12974
  message = responseData.errorMessage;
12942
12975
  }
12943
12976
  } catch (ex) {
12944
- logger$L.error(ex);
12977
+ logger$K.error(ex);
12945
12978
  }
12946
12979
  throw new AdyenKycSdkError(reason, jsonData.error);
12947
12980
  }
@@ -13897,7 +13930,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
13897
13930
  };
13898
13931
  };
13899
13932
  const MISMATCH_ANIMATION_NAME = "mismatchShake";
13900
- const logger$K = createLogger("MaskedInput");
13933
+ const logger$J = createLogger("MaskedInput");
13901
13934
  const Inner = ({
13902
13935
  name,
13903
13936
  label,
@@ -14058,7 +14091,7 @@ const MaskedInput = ({
14058
14091
  }, []);
14059
14092
  useEffect(() => {
14060
14093
  if (!mask) {
14061
- logger$K.warn("`mask` is undefined. No masking of input will take place.");
14094
+ logger$J.warn("`mask` is undefined. No masking of input will take place.");
14062
14095
  }
14063
14096
  }, [mask]);
14064
14097
  const getMaskResult = useCallback(
@@ -14102,7 +14135,7 @@ const MaskedInput = ({
14102
14135
  onInput(strippedValue);
14103
14136
  return;
14104
14137
  }
14105
- logger$K.warn(
14138
+ logger$J.warn(
14106
14139
  `Value received "${value}" does not match mask`,
14107
14140
  maskResult,
14108
14141
  `
@@ -15474,7 +15507,7 @@ function PayoutAccount(props) {
15474
15507
  const link = "adyen-kyc-link";
15475
15508
  const linkDefault = "adyen-kyc-link-default";
15476
15509
  const linkInline = "adyen-kyc-link-inline";
15477
- const styles$r = {
15510
+ const styles$p = {
15478
15511
  link,
15479
15512
  linkDefault,
15480
15513
  linkInline
@@ -15482,9 +15515,9 @@ const styles$r = {
15482
15515
  const Link = ({ children: children2, external = false, href, inline = false }) => {
15483
15516
  const rel = external ? "external noopener noreferrer" : void 0;
15484
15517
  const target = external ? "_blank" : "_self";
15485
- const className2 = cx(styles$r.link, {
15486
- [styles$r.linkInline]: inline,
15487
- [styles$r.linkDefault]: !inline
15518
+ const className2 = cx(styles$p.link, {
15519
+ [styles$p.linkInline]: inline,
15520
+ [styles$p.linkDefault]: !inline
15488
15521
  });
15489
15522
  return /* @__PURE__ */ jsxs("a", { className: className2, href, rel, target, children: [
15490
15523
  children2,
@@ -15662,6 +15695,7 @@ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
15662
15695
  ExperimentNames2["EnableLimitCountryBusinessAccountCustomers"] = "EnableLimitCountryBusinessAccountCustomers";
15663
15696
  ExperimentNames2["EnableTrustMemberCompanyUsingBusinessDetails"] = "EnableTrustMemberCompanyUsingBusinessDetails";
15664
15697
  ExperimentNames2["EnableUnincorporatedPartnershipInHO"] = "EnableUnincorporatedPartnershipInHO";
15698
+ ExperimentNames2["UseOnboardingComponentsForSingpass"] = "UseOnboardingComponentsForSingpass";
15665
15699
  return ExperimentNames2;
15666
15700
  })(ExperimentNames || {});
15667
15701
  function useDataset(datasetIdentifier2, skip) {
@@ -15832,7 +15866,7 @@ const modalFooter = "adyen-kyc-modal-footer";
15832
15866
  const modalButton = "adyen-kyc-modal-button";
15833
15867
  const modalLarge = "adyen-kyc-modal-large";
15834
15868
  const modalFullscreen = "adyen-kyc-modal-fullscreen";
15835
- const styles$q = {
15869
+ const styles$o = {
15836
15870
  modal,
15837
15871
  modalSmall,
15838
15872
  modalMain,
@@ -15880,14 +15914,14 @@ const Modal = ({
15880
15914
  {
15881
15915
  title,
15882
15916
  ref: dialogRef,
15883
- className: cx(styles$q.modal, {
15884
- [styles$q.modalSmall]: size === "small",
15885
- [styles$q.modalLarge]: size === "large",
15886
- [styles$q.modalFullscreen]: size === "fullscreen"
15917
+ className: cx(styles$o.modal, {
15918
+ [styles$o.modalSmall]: size === "small",
15919
+ [styles$o.modalLarge]: size === "large",
15920
+ [styles$o.modalFullscreen]: size === "fullscreen"
15887
15921
  }),
15888
15922
  onClose,
15889
- children: /* @__PURE__ */ jsx("div", { className: styles$q.modalWrapper, children: /* @__PURE__ */ jsxs("div", { className: styles$q.modalMain, children: [
15890
- showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$q.modalButton, children: /* @__PURE__ */ jsx(
15923
+ children: /* @__PURE__ */ jsx("div", { className: styles$o.modalWrapper, children: /* @__PURE__ */ jsxs("div", { className: styles$o.modalMain, children: [
15924
+ showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$o.modalButton, children: /* @__PURE__ */ jsx(
15891
15925
  IconButton,
15892
15926
  {
15893
15927
  ariaLabel: "Close",
@@ -15902,12 +15936,12 @@ const Modal = ({
15902
15936
  }
15903
15937
  );
15904
15938
  };
15905
- const ModalHeader = ({ children: children2 }) => /* @__PURE__ */ jsx("header", { className: styles$q.modalHeader, children: children2 });
15906
- const ModalContent = ({ children: children2 }) => /* @__PURE__ */ jsx("section", { className: styles$q.modalContent, children: children2 });
15907
- const ModalFooter = ({ children: children2 }) => /* @__PURE__ */ jsx("footer", { className: styles$q.modalFooter, children: children2 });
15939
+ const ModalHeader = ({ children: children2 }) => /* @__PURE__ */ jsx("header", { className: styles$o.modalHeader, children: children2 });
15940
+ const ModalContent = ({ children: children2 }) => /* @__PURE__ */ jsx("section", { className: styles$o.modalContent, children: children2 });
15941
+ const ModalFooter = ({ children: children2 }) => /* @__PURE__ */ jsx("footer", { className: styles$o.modalFooter, children: children2 });
15908
15942
  const providerButton = "adyen-kyc-provider-button";
15909
15943
  const providerButtonDisplayName = "adyen-kyc-provider-button-display-name";
15910
- const styles$p = {
15944
+ const styles$n = {
15911
15945
  providerButton,
15912
15946
  providerButtonDisplayName
15913
15947
  };
@@ -15953,9 +15987,9 @@ const ProviderButton = ({
15953
15987
  singpassMyInfo: i18n.get("retrieveMyinfoWith"),
15954
15988
  singpassMyInfoBusiness: i18n.get("retrieveMyinfoBusinessWith")
15955
15989
  };
15956
- return /* @__PURE__ */ jsx(Button, { ...buttonProps, variant: buttonVariant, children: /* @__PURE__ */ jsxs("div", { className: styles$p.providerButton, children: [
15990
+ return /* @__PURE__ */ jsx(Button, { ...buttonProps, variant: buttonVariant, children: /* @__PURE__ */ jsxs("div", { className: styles$n.providerButton, children: [
15957
15991
  buttonLabel2[provider],
15958
- /* @__PURE__ */ jsx("span", { className: styles$p.providerButtonDisplayName, children: providerDisplayName[provider] }),
15992
+ /* @__PURE__ */ jsx("span", { className: styles$n.providerButtonDisplayName, children: providerDisplayName[provider] }),
15959
15993
  /* @__PURE__ */ jsx(Svg, { name: providerLogo[provider], type: "image" })
15960
15994
  ] }) });
15961
15995
  };
@@ -16027,7 +16061,7 @@ const preferInstantVerificationMethod = "adyen-kyc-prefer-instant-verification-m
16027
16061
  const preferInstantVerificationMethodCard = "adyen-kyc-prefer-instant-verification-method-card";
16028
16062
  const preferInstantVerificationMethodActions = "adyen-kyc-prefer-instant-verification-method-actions";
16029
16063
  const preferInstantVerificationMethodModalFooter = "adyen-kyc-prefer-instant-verification-method-modal-footer";
16030
- const styles$o = {
16064
+ const styles$m = {
16031
16065
  preferInstantVerificationMethod,
16032
16066
  preferInstantVerificationMethodCard,
16033
16067
  preferInstantVerificationMethodActions,
@@ -16117,9 +16151,9 @@ const PreferInstantVerificationMethod = ({
16117
16151
  disabled: bankInfoValidated,
16118
16152
  loading: !hideVerificationWidget
16119
16153
  }
16120
- ) : /* @__PURE__ */ jsx(Card, { background: "secondary", className: styles$o.preferInstantVerificationMethodCard, children: i18n.get("unfortunatelyAnInstantProvider") });
16121
- return /* @__PURE__ */ jsxs("div", { className: styles$o.preferInstantVerificationMethod, children: [
16122
- /* @__PURE__ */ jsxs("div", { className: styles$o.preferInstantVerificationMethodActions, children: [
16154
+ ) : /* @__PURE__ */ jsx(Card, { background: "secondary", className: styles$m.preferInstantVerificationMethodCard, children: i18n.get("unfortunatelyAnInstantProvider") });
16155
+ return /* @__PURE__ */ jsxs("div", { className: styles$m.preferInstantVerificationMethod, children: [
16156
+ /* @__PURE__ */ jsxs("div", { className: styles$m.preferInstantVerificationMethodActions, children: [
16123
16157
  loadingStatus === "loading" ? /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-bottom-8", children: /* @__PURE__ */ jsx(Skeleton, { height: "2.5rem" }) }) : InstantButton,
16124
16158
  /* @__PURE__ */ jsx(
16125
16159
  Button,
@@ -16157,7 +16191,7 @@ const PreferInstantVerificationMethod = ({
16157
16191
  isModalOpen ? /* @__PURE__ */ jsxs(Modal, { size: "small", onClose: () => setIsModalOpen(false), children: [
16158
16192
  /* @__PURE__ */ jsx(ModalHeader, { children: i18n.get("manuallyAddAccountQuestion") }),
16159
16193
  /* @__PURE__ */ jsx(ModalContent, { children: i18n.get("addingAndVerifiyingABankAccount") }),
16160
- /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$o.preferInstantVerificationMethodModalFooter, children: [
16194
+ /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$m.preferInstantVerificationMethodModalFooter, children: [
16161
16195
  /* @__PURE__ */ jsx(Button, { onClick: handleClickContinue, variant: "secondary", children: i18n.get("yesContinue") }),
16162
16196
  /* @__PURE__ */ jsx(Button, { onClick: handleClickCancel, children: i18n.get("cancel") })
16163
16197
  ] }) })
@@ -19164,6 +19198,7 @@ const taxIdNumberOptions = {
19164
19198
  ],
19165
19199
  [CountryCodes.Belgium]: [{ id: "BUSINESS_NUMMER", name: "businessNumber" }],
19166
19200
  [CountryCodes.Brazil]: [{ id: "CNPJ", name: "CNPJ" }],
19201
+ [CountryCodes.Canada]: [{ id: "BUSINESS_NUMMER", name: "businessNumber" }],
19167
19202
  [CountryCodes.Germany]: [
19168
19203
  {
19169
19204
  id: "STEUERNUMMER",
@@ -19301,8 +19336,6 @@ const vatNumberOptions = {
19301
19336
  const getTaxIdNumberOptions = (country, companyType) => {
19302
19337
  const optionsForCountry = taxIdNumberOptions[country];
19303
19338
  if (!companyType || !optionsForCountry) return optionsForCountry;
19304
- if (country === "US" || country === "PR")
19305
- return optionsForCountry.filter((option) => option.id === "EIN");
19306
19339
  return optionsForCountry.filter(
19307
19340
  (option) => {
19308
19341
  var _a2;
@@ -20010,6 +20043,7 @@ const defaultFieldConfig$4 = {
20010
20043
  const inferTaxIdNumberType = (taxId, country, companyType) => {
20011
20044
  const optionsForCountry = taxIdNumberOptions[country];
20012
20045
  const metadataFn = defaultFieldConfig$4[country];
20046
+ if (optionsForCountry.length === 1) return optionsForCountry[0].id;
20013
20047
  if (!optionsForCountry || !metadataFn || typeof metadataFn !== "function") return void 0;
20014
20048
  for (const option of optionsForCountry) {
20015
20049
  const fieldMetadata = metadataFn({
@@ -20881,7 +20915,8 @@ function TaxIdNumberTypeSelector({
20881
20915
  companyType,
20882
20916
  selected,
20883
20917
  setSelected,
20884
- exemptedOption
20918
+ exemptedOption,
20919
+ isUsSoleProp
20885
20920
  }) {
20886
20921
  const { i18n } = useI18nContext();
20887
20922
  const handleSelect = useCallback(
@@ -20909,12 +20944,11 @@ function TaxIdNumberTypeSelector({
20909
20944
  ];
20910
20945
  }, [country, companyType, exemptedOption]);
20911
20946
  useEffect(() => {
20912
- if (!selected && options.length > 0) {
20947
+ if (!isUsSoleProp && !selected && options.length > 0) {
20913
20948
  handleSelect(options[0].id);
20914
20949
  }
20915
- }, [options, selected, handleSelect]);
20916
- const hideForCountry = ["US", "PR"].includes(country);
20917
- if (options.length <= 1 || hideForCountry) return null;
20950
+ }, [options, selected, handleSelect, isUsSoleProp]);
20951
+ if (options.length <= 1) return null;
20918
20952
  return /* @__PURE__ */ jsx(Field, { name: "taxIdNumberType", label: i18n.get("whichTypeOfTaxIdNumberDoYouHave"), children: (childProps) => /* @__PURE__ */ jsx(
20919
20953
  RadioGroup,
20920
20954
  {
@@ -20953,6 +20987,7 @@ function TaxInformationField({
20953
20987
  }) {
20954
20988
  var _a2;
20955
20989
  const { isExperimentEnabled } = useExperimentsContext();
20990
+ const { i18n } = useI18nContext();
20956
20991
  const { accountHolder } = useCoreContext();
20957
20992
  const currentCountryTaxInformation = useMemo(
20958
20993
  () => {
@@ -20961,6 +20996,10 @@ function TaxInformationField({
20961
20996
  },
20962
20997
  [data, country]
20963
20998
  );
20999
+ const isUsSoleProp = country === "US" && companyType === CompanyTypesValue.SOLE_PROPRIETORSHIP;
21000
+ const exemptionLabel = isUsSoleProp ? i18n.get("socialSecurityNumber") : labels2.exemptedFromTax;
21001
+ const shouldRenderInput = isUsSoleProp ? data.exemptedFromTax === false : !data.isUen;
21002
+ const showTaxIdExemptedOptions = canExempt && (((_a2 = getTaxIdNumberOptions(country, companyType)) == null ? void 0 : _a2.length) ?? 0) > 1 || isUsSoleProp;
20964
21003
  const canSaveAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "theCompanyIWorkFor";
20965
21004
  useEffect(() => {
20966
21005
  const hasSavedTaxId = defaultData == null ? void 0 : defaultData.find((taxId) => taxId.country === country);
@@ -20968,7 +21007,6 @@ function TaxInformationField({
20968
21007
  if (currentCountryTaxInformation && !hasSavedTaxId) return;
20969
21008
  handleChangeFor("taxInformation", "input")(defaultData);
20970
21009
  }, [country]);
20971
- const showTaxIdExemptedOptions = canExempt && (((_a2 = getTaxIdNumberOptions(country, companyType)) == null ? void 0 : _a2.length) ?? 0) > 1;
20972
21010
  const removeCurrentCountryTaxInformation = () => {
20973
21011
  var _a3;
20974
21012
  const filterdTaxInformation = (_a3 = data.taxInformation) == null ? void 0 : _a3.filter((taxId) => taxId.country !== country);
@@ -21118,21 +21156,16 @@ function TaxInformationField({
21118
21156
  return handleChangeFor("taxInformation", "input")(updatedTaxInformation);
21119
21157
  };
21120
21158
  const handleTaxIdNumberTypeChange = (taxIdType) => {
21121
- if (taxIdType === "exempted") {
21122
- if (!canExempt) {
21123
- throw Error(`${country} does not allow tax exemptions`);
21124
- }
21125
- if (canSaveAbsentState) {
21126
- addTaxAbsentStatus(true);
21127
- handleChangeFor("exemptedFromTax")(true);
21128
- setTaxIdNumberType(void 0);
21129
- return;
21130
- } else {
21159
+ if (!canExempt && taxIdType === "exempted") {
21160
+ throw Error(`${country} does not allow tax exemptions`);
21161
+ }
21162
+ switch (taxIdType) {
21163
+ case "exempted":
21131
21164
  handleChangeFor("exemptedFromTax")(true);
21132
- removeCurrentCountryTaxInformation();
21133
21165
  setTaxIdNumberType(void 0);
21134
- return;
21135
- }
21166
+ return canSaveAbsentState ? addTaxAbsentStatus(true) : removeCurrentCountryTaxInformation();
21167
+ default:
21168
+ handleChangeFor("exemptedFromTax")(false);
21136
21169
  }
21137
21170
  if (country === "SG") {
21138
21171
  if (taxIdType === "UEN") {
@@ -21143,9 +21176,6 @@ function TaxInformationField({
21143
21176
  removeCurrentCountryTaxInformation();
21144
21177
  }
21145
21178
  }
21146
- if (canExempt && data.exemptedFromTax === true) {
21147
- handleChangeFor("exemptedFromTax")(false);
21148
- }
21149
21179
  setTaxIdNumberType(taxIdType);
21150
21180
  };
21151
21181
  const handleExemptedFromTaxChange = (exempted) => {
@@ -21165,10 +21195,11 @@ function TaxInformationField({
21165
21195
  companyType,
21166
21196
  setSelected: handleTaxIdNumberTypeChange,
21167
21197
  selected: data.exemptedFromTax ? "exempted" : taxIdNumberType,
21168
- exemptedOption: showTaxIdExemptedOptions ? labels2.exemptedFromTax : false
21198
+ exemptedOption: showTaxIdExemptedOptions ? exemptionLabel : false,
21199
+ isUsSoleProp
21169
21200
  }
21170
21201
  ),
21171
- !data.isUen && /* @__PURE__ */ jsx(
21202
+ shouldRenderInput && /* @__PURE__ */ jsx(
21172
21203
  MaskedInput,
21173
21204
  {
21174
21205
  type: "text",
@@ -22299,10 +22330,10 @@ function NumberOfEmployees({
22299
22330
  ) });
22300
22331
  }
22301
22332
  const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
22302
- const styles$n = {
22333
+ const styles$l = {
22303
22334
  financialInformationReportedValueOptions
22304
22335
  };
22305
- const logger$J = createLogger("InputCurrency");
22336
+ const logger$I = createLogger("InputCurrency");
22306
22337
  const determineDecimalSeparator = (formatter) => formatter.formatToParts(0.1).find((part) => part.type === "decimal").value;
22307
22338
  const determineCurrencySymbol = (formatter) => formatter.formatToParts(0).find((part) => part.type === "currency").value;
22308
22339
  const getNumberFromFormattedCurrency = (formatted, decimalSeparator) => {
@@ -22333,7 +22364,7 @@ const InputCurrency = ({
22333
22364
  const rawValue = e.target.value;
22334
22365
  const value = getNumberFromFormattedCurrency(rawValue, decimalSeparator);
22335
22366
  if (Number.isNaN(value)) {
22336
- logger$J.warn(`Unable to get number from formatted currency: "${rawValue}"`);
22367
+ logger$I.warn(`Unable to get number from formatted currency: "${rawValue}"`);
22337
22368
  setText(isUndefinedOrNull(amount) ? currencySymbol : formatter.format(amount));
22338
22369
  return;
22339
22370
  }
@@ -22346,7 +22377,7 @@ const InputCurrency = ({
22346
22377
  };
22347
22378
  const reportedValue = "adyen-kyc-reported-value";
22348
22379
  const reportedValueInput = "adyen-kyc-reported-value-input";
22349
- const styles$m = {
22380
+ const styles$k = {
22350
22381
  reportedValue,
22351
22382
  reportedValueInput
22352
22383
  };
@@ -22361,7 +22392,7 @@ const ReportedValue = ({
22361
22392
  isValid
22362
22393
  }) => {
22363
22394
  const { i18n } = useI18nContext();
22364
- return /* @__PURE__ */ jsx("div", { className: styles$m.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
22395
+ return /* @__PURE__ */ jsx("div", { className: styles$k.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
22365
22396
  InputCurrency,
22366
22397
  {
22367
22398
  ...childProps,
@@ -22369,7 +22400,7 @@ const ReportedValue = ({
22369
22400
  currency,
22370
22401
  amount,
22371
22402
  onAmountChanged,
22372
- className: styles$m.reportedValueInput,
22403
+ className: styles$k.reportedValueInput,
22373
22404
  "aria-label": label
22374
22405
  }
22375
22406
  ) }) });
@@ -22550,7 +22581,7 @@ function FinancialInformation(props) {
22550
22581
  ],
22551
22582
  onChange: updateReportedValueOption,
22552
22583
  showContentOnlyOnSelected: true,
22553
- className: styles$n.financialInformationReportedValueOptions
22584
+ className: styles$l.financialInformationReportedValueOptions
22554
22585
  }
22555
22586
  )
22556
22587
  }
@@ -22681,7 +22712,7 @@ function StateField({
22681
22712
  }
22682
22713
  );
22683
22714
  }
22684
- const logger$I = createLogger("AddressFieldContainer");
22715
+ const logger$H = createLogger("AddressFieldContainer");
22685
22716
  const formatAddressItem = (item) => {
22686
22717
  if (item.description.includes("Addresses")) {
22687
22718
  const splittedDescription = item.description.split(" - ");
@@ -22825,7 +22856,7 @@ function FieldContainer({
22825
22856
  setItems([]);
22826
22857
  }
22827
22858
  } catch (e) {
22828
- logger$I.error(e);
22859
+ logger$H.error(e);
22829
22860
  } finally {
22830
22861
  setSearchLoading(false);
22831
22862
  }
@@ -22843,7 +22874,7 @@ function FieldContainer({
22843
22874
  );
22844
22875
  setItems((response == null ? void 0 : response.results) ?? []);
22845
22876
  } catch (e) {
22846
- logger$I.error(e);
22877
+ logger$H.error(e);
22847
22878
  } finally {
22848
22879
  setSearchLoading(false);
22849
22880
  }
@@ -22885,7 +22916,7 @@ function FieldContainer({
22885
22916
  });
22886
22917
  }
22887
22918
  } catch (e) {
22888
- logger$I.error(e);
22919
+ logger$H.error(e);
22889
22920
  } finally {
22890
22921
  setFindLoading(false);
22891
22922
  }
@@ -24882,7 +24913,7 @@ function IdDocumentManualUpload(props) {
24882
24913
  }
24883
24914
  const loaderWrapperLoader = "adyen-kyc-loader-wrapper-loader";
24884
24915
  const loaderWrapperLoaderActive = "adyen-kyc-loader-wrapper-loader-active";
24885
- const styles$l = {
24916
+ const styles$j = {
24886
24917
  loaderWrapperLoader,
24887
24918
  loaderWrapperLoaderActive
24888
24919
  };
@@ -24897,16 +24928,16 @@ const LoaderWrapper = ({
24897
24928
  const opacitySyle = status === "loading" ? {
24898
24929
  opacity: formOpacityWhenLoading
24899
24930
  } : { opacity: 1 };
24900
- const loaderWrapperClass = cx(styles$l.loaderWrapperLoader, {
24901
- [styles$l.loaderWrapperLoaderActive]: status === "loading" && showSpinner
24931
+ const loaderWrapperClass = cx(styles$j.loaderWrapperLoader, {
24932
+ [styles$j.loaderWrapperLoaderActive]: status === "loading" && showSpinner
24902
24933
  });
24903
- const overlayClass = cx(styles$l.loaderWrapper, className2);
24934
+ const overlayClass = cx(styles$j.loaderWrapper, className2);
24904
24935
  return /* @__PURE__ */ jsxs("div", { className: overlayClass, style: { position: "relative" }, children: [
24905
24936
  /* @__PURE__ */ jsx("div", { className: loaderWrapperClass, children: /* @__PURE__ */ jsx(Loader, { size: loaderSize }) }),
24906
- /* @__PURE__ */ jsx("div", { className: styles$l.loaderWrapperForm, style: opacitySyle, children: children2 })
24937
+ /* @__PURE__ */ jsx("div", { className: styles$j.loaderWrapperForm, style: opacitySyle, children: children2 })
24907
24938
  ] });
24908
24939
  };
24909
- const logger$H = createLogger("useIdVerificationToken");
24940
+ const logger$G = createLogger("useIdVerificationToken");
24910
24941
  const useIdVerificationToken = ({
24911
24942
  minimumApplicantDetails,
24912
24943
  legalEntityId,
@@ -24920,7 +24951,7 @@ const useIdVerificationToken = ({
24920
24951
  useEffect(() => {
24921
24952
  (async () => {
24922
24953
  if (!firstName || !lastName || !residencyCountry) {
24923
- logger$H.warn(
24954
+ logger$G.warn(
24924
24955
  "Missing first name / last name / residencyCountry, cannot get id verification token",
24925
24956
  minimumApplicantDetails
24926
24957
  );
@@ -25005,7 +25036,7 @@ const initOnfido = async ({
25005
25036
  language: getOnfidoLocaleConfig(i18n)
25006
25037
  });
25007
25038
  };
25008
- const logger$G = createLogger("IdVerification");
25039
+ const logger$F = createLogger("IdVerification");
25009
25040
  function IdVerification({
25010
25041
  minimumApplicantDetails,
25011
25042
  legalEntityId,
@@ -25034,7 +25065,7 @@ function IdVerification({
25034
25065
  language: getOnfidoLocaleConfig(i18n),
25035
25066
  showMotionCapture: showIndividualMotionCapture.value
25036
25067
  });
25037
- })().catch(logger$G.error);
25068
+ })().catch(logger$F.error);
25038
25069
  return async () => {
25039
25070
  if (onfidoSdk.current) await onfidoSdk.current.tearDown();
25040
25071
  };
@@ -25075,7 +25106,7 @@ function IdDocumentAlreadyUpload(props) {
25075
25106
  ] })
25076
25107
  ] });
25077
25108
  }
25078
- const logger$F = createLogger("IdDocumentInstantVerification");
25109
+ const logger$E = createLogger("IdDocumentInstantVerification");
25079
25110
  function IdDocumentInstantVerification(props) {
25080
25111
  const {
25081
25112
  data,
@@ -25104,7 +25135,7 @@ function IdDocumentInstantVerification(props) {
25104
25135
  minimumApplicantDetails,
25105
25136
  legalEntityId,
25106
25137
  onIdVerificationComplete: handleIdVerificationComplete,
25107
- onIdVerificationError: logger$F.error
25138
+ onIdVerificationError: logger$E.error
25108
25139
  }
25109
25140
  ),
25110
25141
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-document-upload__manual-upload", children: [
@@ -25468,7 +25499,7 @@ const InputGroup = ({
25468
25499
  return /* @__PURE__ */ jsx("div", { id, "data-testid": id, className: classNames, children: children2 });
25469
25500
  };
25470
25501
  const PHONE_FIELD = ["phoneNumber"];
25471
- const logger$E = createLogger("PhoneField");
25502
+ const logger$D = createLogger("PhoneField");
25472
25503
  const usePhonePrefixes = () => {
25473
25504
  const [phonePrefixes, setPhonePrefixes] = useState();
25474
25505
  useEffect(() => {
@@ -25476,7 +25507,7 @@ const usePhonePrefixes = () => {
25476
25507
  const loaded = (await import("./phonePrefixes-zV4hciyK.js")).default;
25477
25508
  setPhonePrefixes(loaded);
25478
25509
  };
25479
- loadPhonePrefixes().catch(logger$E.error);
25510
+ loadPhonePrefixes().catch(logger$D.error);
25480
25511
  }, []);
25481
25512
  return phonePrefixes;
25482
25513
  };
@@ -27728,7 +27759,7 @@ const individualForms = {
27728
27759
  address: {
27729
27760
  formId: "address",
27730
27761
  formName: "address",
27731
- fields: ADDRESS_SCHEMA
27762
+ fields: addressFields
27732
27763
  },
27733
27764
  idVerificationMethod: {
27734
27765
  formId: "idVerificationMethod",
@@ -28406,7 +28437,7 @@ function TrustRegistrationDetails(props) {
28406
28437
  (currentData) => {
28407
28438
  const fieldsToRemove = [];
28408
28439
  if (!currentData.hasDoingBusinessAs) {
28409
- fieldsToRemove.push("hasDoingBusinessAs");
28440
+ fieldsToRemove.push("doingBusinessAs");
28410
28441
  }
28411
28442
  return requiredFields.filter((field) => !fieldsToRemove.includes(field));
28412
28443
  },
@@ -29432,7 +29463,7 @@ const useUnifyLoadingStatus = (setParentLoadingStatus, ...childLoadingStatuses)
29432
29463
  setParentLoadingStatus(loadingStatus);
29433
29464
  }, [...childLoadingStatuses]);
29434
29465
  };
29435
- const logger$D = createLogger("useScenarioConfiguration");
29466
+ const logger$C = createLogger("useScenarioConfiguration");
29436
29467
  const useScenarioConfiguration = ({
29437
29468
  getConfigurationData,
29438
29469
  getPayoutAccountFormatData,
@@ -29455,12 +29486,12 @@ const useScenarioConfiguration = ({
29455
29486
  const response = await getConfigurationData();
29456
29487
  setConfigurationResponse(response);
29457
29488
  } catch (err) {
29458
- logger$D.warn("WARNING: Configuration request failed - error:", err);
29489
+ logger$C.warn("WARNING: Configuration request failed - error:", err);
29459
29490
  } finally {
29460
29491
  setConfigurationLoadingStatus("success");
29461
29492
  }
29462
29493
  };
29463
- makeConfigCallAndSave().catch(logger$D.error);
29494
+ makeConfigCallAndSave().catch(logger$C.error);
29464
29495
  }, [getConfigurationData, setConfigurationLoadingStatus]);
29465
29496
  useEffect(() => {
29466
29497
  if (!getPayoutAccountFormatData) return;
@@ -29479,12 +29510,12 @@ const useScenarioConfiguration = ({
29479
29510
  const defaultAccountFormat = defaultPayoutAccountFormat[country] ?? allowedBankAccountFormats[0];
29480
29511
  setAccountFormat(existingBankAccountFormat ?? defaultAccountFormat);
29481
29512
  } catch (err) {
29482
- logger$D.warn("WARNING: Payout format request failed - error:", err);
29513
+ logger$C.warn("WARNING: Payout format request failed - error:", err);
29483
29514
  } finally {
29484
29515
  setpayoutFormatLoadingStatus("success");
29485
29516
  }
29486
29517
  };
29487
- makePayoutFormatCallAndSave().catch(logger$D.error);
29518
+ makePayoutFormatCallAndSave().catch(logger$C.error);
29488
29519
  }, [
29489
29520
  country,
29490
29521
  setAccountFormat,
@@ -29612,6 +29643,156 @@ const identityBase = {
29612
29643
  rule: "nomineeShareHolderRequiredForCountry"
29613
29644
  }
29614
29645
  };
29646
+ const identityNumber$1 = {
29647
+ idNumber: {
29648
+ rule: "idNumberRules",
29649
+ obscured: true
29650
+ },
29651
+ idNumberExempt: {
29652
+ rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
29653
+ },
29654
+ idDocumentType: {
29655
+ rule: "manualIdDocumentRequired"
29656
+ },
29657
+ idFrontPage: {
29658
+ rule: "idFrontPageIfManualUpload"
29659
+ },
29660
+ idBackPage: {
29661
+ rule: "backPageIfRequiredForDocumentType"
29662
+ },
29663
+ idVerificationMethod: {
29664
+ rule: "idVerificationRequired"
29665
+ },
29666
+ instantIdVerificationData: {
29667
+ rule: "instantVerificationDataRule"
29668
+ }
29669
+ };
29670
+ const additionalIdentityInfo$1 = {
29671
+ typeOfIdentity: {
29672
+ rules: ["requiredIfCountryUsesMultipleTypesOfIdentity", "isDirectorIdNumberRequiredForCountry"]
29673
+ },
29674
+ issuerState: {
29675
+ rule: "issuerStateRequired"
29676
+ },
29677
+ licenseCardNumber: {
29678
+ rule: "licenseCardNumberRules"
29679
+ },
29680
+ expiryDate: {
29681
+ rule: "expiryDateRequired"
29682
+ }
29683
+ };
29684
+ const idDocument = {
29685
+ idVerificationMethod: {
29686
+ rule: "REQUIRED"
29687
+ },
29688
+ idDocumentType: {
29689
+ rule: "REQUIRED"
29690
+ },
29691
+ idFrontPage: {
29692
+ rule: "idFrontPageIfManualUpload"
29693
+ },
29694
+ idBackPage: {
29695
+ rule: "backPageIfRequiredForDocumentType"
29696
+ }
29697
+ };
29698
+ const nationality$1 = {
29699
+ nationality: {
29700
+ rule: "REQUIRED"
29701
+ }
29702
+ };
29703
+ const phoneNumberBase$1 = {
29704
+ phoneNumber: {
29705
+ rule: "contactsIfRequiredForRole"
29706
+ }
29707
+ };
29708
+ const fieldsPerScenario$1 = {
29709
+ L0: drop("address", "birthDate").from(identityBase),
29710
+ L1: identityBase,
29711
+ L1_ID: {
29712
+ ...identityBase,
29713
+ ...identityNumber$1,
29714
+ ...additionalIdentityInfo$1
29715
+ },
29716
+ L1_IDO: {
29717
+ // TODO: change idNumber rule to optional once optional fields are implemented
29718
+ ...identityBase,
29719
+ ...identityNumber$1,
29720
+ ...additionalIdentityInfo$1
29721
+ },
29722
+ L1_NAT: {
29723
+ ...identityBase,
29724
+ ...identityNumber$1,
29725
+ ...additionalIdentityInfo$1,
29726
+ ...nationality$1
29727
+ },
29728
+ L1_IDDOC: idDocument,
29729
+ L_PH: phoneNumberBase$1
29730
+ };
29731
+ const identityOnfidoBase = {
29732
+ role: {
29733
+ rule: "requiredIfDecisionMakerTask"
29734
+ },
29735
+ firstName: {
29736
+ rule: "REQUIRED"
29737
+ },
29738
+ lastName: {
29739
+ rule: "REQUIRED"
29740
+ },
29741
+ birthDate: {
29742
+ rule: "REQUIRED"
29743
+ },
29744
+ phoneNumber: {
29745
+ rules: ["requiredIfPhoneScenarioDisabled", "contactsIfRequiredForRole"]
29746
+ },
29747
+ email: {
29748
+ rule: "contactsIfRequiredForRole"
29749
+ },
29750
+ jobTitle: {
29751
+ rule: "jobTitleIfRequiredForRole"
29752
+ },
29753
+ nationality: {
29754
+ rule: "nationalityIfRequiredForRole"
29755
+ },
29756
+ address: {
29757
+ rule: "addressIfRequiredForCountry"
29758
+ },
29759
+ otherAddressInformation: {
29760
+ rule: "otherAddressInfoIfRequiredForCountry"
29761
+ },
29762
+ country: {
29763
+ rule: "REQUIRED"
29764
+ },
29765
+ postalCode: {
29766
+ rule: "postalCodeIfRequiredForCountry"
29767
+ },
29768
+ city: {
29769
+ rule: "cityIfRequiredForCountry"
29770
+ },
29771
+ stateOrProvince: {
29772
+ rule: "stateOrProvinceIfRequiredForCountry"
29773
+ },
29774
+ residencyCountry: {
29775
+ rule: "REQUIRED"
29776
+ },
29777
+ proofOfResidency: {
29778
+ rule: "isProofOfResidencyRequired"
29779
+ },
29780
+ proofOfNationalId: {
29781
+ rule: "isProofOfNationalIdRequired"
29782
+ },
29783
+ relationship: {
29784
+ rule: "legalRepresentativeRelationshipRequired"
29785
+ },
29786
+ proofOfRelationship: {
29787
+ rule: "isProofOfRelationshipRequired"
29788
+ },
29789
+ nomineeDirector: {
29790
+ rule: "nomineeDirectorRequiredForCountry"
29791
+ },
29792
+ nomineeShareholder: {
29793
+ rule: "nomineeShareHolderRequiredForCountry"
29794
+ }
29795
+ };
29615
29796
  const identityNumber = {
29616
29797
  idNumber: {
29617
29798
  rule: "idNumberRules",
@@ -29621,7 +29802,7 @@ const identityNumber = {
29621
29802
  rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
29622
29803
  },
29623
29804
  idDocumentType: {
29624
- rule: "idDocumentIfIdNumberExempted"
29805
+ rule: "manualIdDocumentRequired"
29625
29806
  },
29626
29807
  idFrontPage: {
29627
29808
  rule: "idFrontPageIfManualUpload"
@@ -29630,10 +29811,9 @@ const identityNumber = {
29630
29811
  rule: "backPageIfRequiredForDocumentType"
29631
29812
  },
29632
29813
  idVerificationMethod: {
29633
- rule: "idDocumentIfIdNumberExempted"
29814
+ rule: "idVerificationRequired"
29634
29815
  },
29635
29816
  idDocument: {
29636
- // TODO revisit this when we add support for manual ID upload
29637
29817
  rule: "isUsingInstantVerification"
29638
29818
  }
29639
29819
  };
@@ -29651,7 +29831,7 @@ const additionalIdentityInfo = {
29651
29831
  rule: "expiryDateRequired"
29652
29832
  }
29653
29833
  };
29654
- const idDocument = {
29834
+ const idDocRequired = {
29655
29835
  idVerificationMethod: {
29656
29836
  rule: "REQUIRED"
29657
29837
  },
@@ -29675,27 +29855,27 @@ const phoneNumberBase = {
29675
29855
  rule: "contactsIfRequiredForRole"
29676
29856
  }
29677
29857
  };
29678
- const fieldsPerScenario$1 = {
29679
- L0: drop("address", "birthDate").from(identityBase),
29680
- L1: identityBase,
29858
+ const individualOnfidoFieldsPerScenario = {
29859
+ L0: drop("address", "birthDate").from(identityOnfidoBase),
29860
+ L1: identityOnfidoBase,
29681
29861
  L1_ID: {
29682
- ...identityBase,
29862
+ ...identityOnfidoBase,
29683
29863
  ...identityNumber,
29684
29864
  ...additionalIdentityInfo
29685
29865
  },
29686
29866
  L1_IDO: {
29687
29867
  // TODO: change idNumber rule to optional once optional fields are implemented
29688
- ...identityBase,
29868
+ ...identityOnfidoBase,
29689
29869
  ...identityNumber,
29690
29870
  ...additionalIdentityInfo
29691
29871
  },
29692
29872
  L1_NAT: {
29693
- ...identityBase,
29873
+ ...identityOnfidoBase,
29694
29874
  ...identityNumber,
29695
29875
  ...additionalIdentityInfo,
29696
29876
  ...nationality
29697
29877
  },
29698
- L1_IDDOC: idDocument,
29878
+ L1_IDDOC: idDocRequired,
29699
29879
  L_PH: phoneNumberBase
29700
29880
  };
29701
29881
  const solePropBase = {
@@ -29791,6 +29971,13 @@ const parseIndividualScenarios = (scenario) => scenario == null ? void 0 : scena
29791
29971
  (scenarios, scenarioName) => ({ ...scenarios, ...fieldsPerScenario$1[scenarioName] }),
29792
29972
  {}
29793
29973
  );
29974
+ const parseIndividualOnfidoScenarios = (scenario) => scenario == null ? void 0 : scenario.reduce(
29975
+ (scenarios, scenarioName) => ({
29976
+ ...scenarios,
29977
+ ...individualOnfidoFieldsPerScenario[scenarioName]
29978
+ }),
29979
+ {}
29980
+ );
29794
29981
  function parseBusinessDetailsScenarios(scenario, country) {
29795
29982
  if (scenario) {
29796
29983
  let fieldConfigurations = scenario.reduce(
@@ -30180,10 +30367,10 @@ const MaybeModal = ({ children: children2, inline = false, onClose }) => {
30180
30367
  return inline ? /* @__PURE__ */ jsx(Fragment, { children: children2 }) : /* @__PURE__ */ jsx(Modal, { onClose, children: /* @__PURE__ */ jsx(ToastContextProvider, { children: children2 }) });
30181
30368
  };
30182
30369
  const spacer = "adyen-kyc-spacer";
30183
- const styles$k = {
30370
+ const styles$i = {
30184
30371
  spacer
30185
30372
  };
30186
- const Spacer = () => /* @__PURE__ */ jsx("div", { className: styles$k.spacer });
30373
+ const Spacer = () => /* @__PURE__ */ jsx("div", { className: styles$i.spacer });
30187
30374
  const range = (stop, start = 0, step = 1) => Array.from({ length: (stop - start) / step + 1 }, (_, i) => start + i * step);
30188
30375
  const progressBar = "adyen-kyc-progress-bar";
30189
30376
  const progressBarThick = "adyen-kyc-progress-bar-thick";
@@ -30191,7 +30378,7 @@ const progressStep = "adyen-kyc-progress-step";
30191
30378
  const progressStepActive = "adyen-kyc-progress-step-active";
30192
30379
  const progressStepLabel = "adyen-kyc-progress-step-label";
30193
30380
  const progressBarCircles = "adyen-kyc-progress-bar-circles";
30194
- const styles$j = {
30381
+ const styles$h = {
30195
30382
  progressBar,
30196
30383
  progressBarThick,
30197
30384
  progressStep,
@@ -30217,14 +30404,14 @@ const StepProgressIndicator = ({
30217
30404
  "div",
30218
30405
  {
30219
30406
  "aria-label": `Step ${activeStepIndex} of ${stepsCount}`,
30220
- className: styles$j.progress,
30407
+ className: styles$h.progress,
30221
30408
  role: "group",
30222
30409
  children: /* @__PURE__ */ jsx(
30223
30410
  "ol",
30224
30411
  {
30225
- className: cx(styles$j.progressBar, {
30226
- [styles$j.progressBarThick]: thick,
30227
- [styles$j.progressBarCircles]: circles
30412
+ className: cx(styles$h.progressBar, {
30413
+ [styles$h.progressBarThick]: thick,
30414
+ [styles$h.progressBarCircles]: circles
30228
30415
  }),
30229
30416
  children: range(stepsCount).map((stepNumber) => {
30230
30417
  const isHighlighted = shouldHighlight(activeStepIndex, stepNumber, fillBefore);
@@ -30232,10 +30419,10 @@ const StepProgressIndicator = ({
30232
30419
  "li",
30233
30420
  {
30234
30421
  "aria-current": isHighlighted ? "step" : void 0,
30235
- className: cx(styles$j.progressStep, {
30236
- [styles$j.progressStepActive]: isHighlighted
30422
+ className: cx(styles$h.progressStep, {
30423
+ [styles$h.progressStepActive]: isHighlighted
30237
30424
  }),
30238
- children: /* @__PURE__ */ jsx("span", { className: styles$j.progressStepLabel, children: `Step ${stepNumber}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}` })
30425
+ children: /* @__PURE__ */ jsx("span", { className: styles$h.progressStepLabel, children: `Step ${stepNumber}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}` })
30239
30426
  },
30240
30427
  stepNumber
30241
30428
  );
@@ -30346,7 +30533,7 @@ const useExpiryThreshold = (expiry) => {
30346
30533
  return { expiryStatus: "notYetCloseToExpiry", secondsUntilExpiry: void 0 };
30347
30534
  };
30348
30535
  const ExpiryContext = createContext$1(false);
30349
- const logger$C = createLogger("ExpiryProvider");
30536
+ const logger$B = createLogger("ExpiryProvider");
30350
30537
  const ExpiryProvider = ({
30351
30538
  expiry: initialExpiry,
30352
30539
  eventEmitter,
@@ -30375,7 +30562,7 @@ const ExpiryProvider = ({
30375
30562
  refreshExpiry().then((newExpiry) => {
30376
30563
  setExpiry(newExpiry);
30377
30564
  setModalDismissed(false);
30378
- }).catch(logger$C.error);
30565
+ }).catch(logger$B.error);
30379
30566
  }
30380
30567
  }
30381
30568
  ),
@@ -30397,7 +30584,7 @@ const ExpiryProvider = ({
30397
30584
  return /* @__PURE__ */ jsx(ExpiryContext.Provider, { value: expiryStatus === "expired", children: children2 });
30398
30585
  };
30399
30586
  const useHasExpired = () => useContext$1(ExpiryContext);
30400
- const logger$B = createLogger("FormRouterContextProvider");
30587
+ const logger$A = createLogger("FormRouterContextProvider");
30401
30588
  function FormRouterContextProvider({
30402
30589
  children: children2,
30403
30590
  forms,
@@ -30420,7 +30607,7 @@ function FormRouterContextProvider({
30420
30607
  if (formIndex > -1) {
30421
30608
  setFormIndex(formIndex);
30422
30609
  } else {
30423
- logger$B.error("No form was found to have that field so form navigation failed.");
30610
+ logger$A.error("No form was found to have that field so form navigation failed.");
30424
30611
  }
30425
30612
  }
30426
30613
  }),
@@ -30473,7 +30660,7 @@ function FormNavigation({
30473
30660
  gotoForm,
30474
30661
  validateForm,
30475
30662
  className: className2,
30476
- taskName: taskName2,
30663
+ taskName,
30477
30664
  verificationErrors,
30478
30665
  trackNavigation: trackNavigation2 = noop$2
30479
30666
  }) {
@@ -30506,13 +30693,13 @@ function FormNavigation({
30506
30693
  };
30507
30694
  };
30508
30695
  return /* @__PURE__ */ jsxs("div", { className: cx("adyen-kyc-form-navigation", className2), children: [
30509
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-navigation__header", children: i18n.get(taskName2) }),
30696
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-navigation__header", children: i18n.get(taskName) }),
30510
30697
  /* @__PURE__ */ jsxs("ul", { className: "adyen-kyc-form-navigation__items", children: [
30511
30698
  forms && /* @__PURE__ */ jsx("li", { className: "adyen-kyc-form-navigation__home-button-item", children: /* @__PURE__ */ jsx("span", { className: "adyen-kyc-form-navigation__step-count", children: i18n.get("stepsX/YofForm", {
30512
30699
  values: {
30513
30700
  activeFormIndex: getFormIndex(activeForm) + 1,
30514
30701
  totalForms: forms.length,
30515
- taskNameTranslated: i18n.get(taskName2)
30702
+ taskNameTranslated: i18n.get(taskName)
30516
30703
  }
30517
30704
  }) }) }),
30518
30705
  forms.map((form) => /* @__PURE__ */ jsx(
@@ -30531,7 +30718,7 @@ function FormNavigation({
30531
30718
  const FormWrapper = ({
30532
30719
  asModal = false,
30533
30720
  summary: summary2,
30534
- taskName: taskName2,
30721
+ taskName,
30535
30722
  children: children2,
30536
30723
  handleNextClick,
30537
30724
  handleBackClick,
@@ -30562,13 +30749,13 @@ const FormWrapper = ({
30562
30749
  finishLater: "finishLater"
30563
30750
  };
30564
30751
  const showLegalCaption = ["solePropDetails", "companyDetails", "businessDetails"].includes(
30565
- taskName2
30752
+ taskName
30566
30753
  );
30567
30754
  const { isExperimentEnabled } = useExperimentsContext();
30568
30755
  const showExtraTaxExemptionReasons = isExperimentEnabled(
30569
30756
  ExperimentNames.ShowExtraTaxExemptionReasons
30570
30757
  );
30571
- const showTaxExemptedLegalCaption = showExtraTaxExemptionReasons && ((_a2 = summaryData == null ? void 0 : summaryData.companyRegistrationDetails) == null ? void 0 : _a2.vatAbsenceReason) && ["companyDetails", "businessDetails"].includes(taskName2);
30758
+ const showTaxExemptedLegalCaption = showExtraTaxExemptionReasons && ((_a2 = summaryData == null ? void 0 : summaryData.companyRegistrationDetails) == null ? void 0 : _a2.vatAbsenceReason) && ["companyDetails", "businessDetails"].includes(taskName);
30572
30759
  const handleTrackNavigation = useCallback(
30573
30760
  (props) => {
30574
30761
  trackNavigation({
@@ -30622,7 +30809,7 @@ const FormWrapper = ({
30622
30809
  activeForm,
30623
30810
  gotoForm: gotoFormByFormIndex,
30624
30811
  validateForm,
30625
- taskName: taskName2,
30812
+ taskName,
30626
30813
  trackNavigation: handleTrackNavigation,
30627
30814
  verificationErrors: problems == null ? void 0 : problems.verificationErrors
30628
30815
  }
@@ -30829,7 +31016,7 @@ function PayoutDetailsDropin({
30829
31016
  asModal = false,
30830
31017
  handleCloseClick,
30831
31018
  taskType: propTaskType,
30832
- taskName: taskName2,
31019
+ taskName,
30833
31020
  capabilities,
30834
31021
  handleHomeClick,
30835
31022
  refreshTransferInstrument,
@@ -31182,7 +31369,7 @@ function PayoutDetailsDropin({
31182
31369
  return /* @__PURE__ */ jsx(
31183
31370
  FormWrapper,
31184
31371
  {
31185
- taskName: taskName2 ?? "bankAccountDetails",
31372
+ taskName: taskName ?? "bankAccountDetails",
31186
31373
  activeForm,
31187
31374
  summary: {
31188
31375
  data: formatDataForSummary2(),
@@ -31415,7 +31602,13 @@ const rules$1 = ({
31415
31602
  return REQUIRED$1;
31416
31603
  }
31417
31604
  },
31418
- idDocumentIfIdNumberExempted: () => {
31605
+ manualIdDocumentRequired: () => {
31606
+ var _a2;
31607
+ if (((_a2 = data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification") {
31608
+ return REQUIRED$1;
31609
+ }
31610
+ },
31611
+ idVerificationRequired: () => {
31419
31612
  var _a2;
31420
31613
  if ((_a2 = data.personalDetails) == null ? void 0 : _a2.idNumberExempt) {
31421
31614
  return REQUIRED$1;
@@ -31829,7 +32022,7 @@ const structuredListSectionField = "adyen-kyc-structured-list-section-field";
31829
32022
  const structuredListSectionLabel = "adyen-kyc-structured-list-section-label";
31830
32023
  const structuredListSectionData = "adyen-kyc-structured-list-section-data";
31831
32024
  const structuredListSectionDetail = "adyen-kyc-structured-list-section-detail";
31832
- const styles$i = {
32025
+ const styles$g = {
31833
32026
  structuredList,
31834
32027
  structuredListSectionField,
31835
32028
  structuredListSectionLabel,
@@ -31841,11 +32034,11 @@ const StructuredList = ({
31841
32034
  detailsGroupClassName,
31842
32035
  items
31843
32036
  }) => {
31844
- const structuredListClassNames = cx(styles$i.structuredList, className2);
31845
- const detailsGroupClassNames = cx(styles$i.structuredListSectionData, detailsGroupClassName);
31846
- return /* @__PURE__ */ jsx("dl", { className: structuredListClassNames, children: items.map(({ term, details }, index) => /* @__PURE__ */ jsxs("div", { className: styles$i.structuredListSectionField, children: [
31847
- /* @__PURE__ */ jsx("dt", { className: styles$i.structuredListSectionLabel, children: term }),
31848
- Array.isArray(details) ? /* @__PURE__ */ jsx("div", { className: detailsGroupClassNames, children: details.map((detail, index2) => /* @__PURE__ */ jsx("dd", { className: styles$i.structuredListSectionDetail, children: detail }, index2)) }) : /* @__PURE__ */ jsx("dd", { className: detailsGroupClassNames, children: details })
32037
+ const structuredListClassNames = cx(styles$g.structuredList, className2);
32038
+ const detailsGroupClassNames = cx(styles$g.structuredListSectionData, detailsGroupClassName);
32039
+ return /* @__PURE__ */ jsx("dl", { className: structuredListClassNames, children: items.map(({ term, details }, index) => /* @__PURE__ */ jsxs("div", { className: styles$g.structuredListSectionField, children: [
32040
+ /* @__PURE__ */ jsx("dt", { className: styles$g.structuredListSectionLabel, children: term }),
32041
+ Array.isArray(details) ? /* @__PURE__ */ jsx("div", { className: detailsGroupClassNames, children: details.map((detail, index2) => /* @__PURE__ */ jsx("dd", { className: styles$g.structuredListSectionDetail, children: detail }, index2)) }) : /* @__PURE__ */ jsx("dd", { className: detailsGroupClassNames, children: details })
31849
32042
  ] }, index)) });
31850
32043
  };
31851
32044
  function VerifiedBusinessCard({
@@ -32739,7 +32932,7 @@ function BusinessInformationCard({
32739
32932
  }
32740
32933
  );
32741
32934
  }
32742
- const logger$A = createLogger("BusinessSelection");
32935
+ const logger$z = createLogger("BusinessSelection");
32743
32936
  function BusinessSelection({
32744
32937
  showCompanyStructure,
32745
32938
  searching,
@@ -32791,7 +32984,7 @@ function BusinessSelection({
32791
32984
  setCurrentBusinessSelection(businessData);
32792
32985
  }
32793
32986
  } catch (e) {
32794
- logger$A.error(e);
32987
+ logger$z.error(e);
32795
32988
  }
32796
32989
  },
32797
32990
  [basicInformation == null ? void 0 : basicInformation.stateOrProvince, fetchBusinessData, fetching, selectedBusinessId]
@@ -32805,7 +32998,7 @@ function BusinessSelection({
32805
32998
  handleNextClick == null ? void 0 : handleNextClick();
32806
32999
  }
32807
33000
  } catch (e) {
32808
- logger$A.error(e);
33001
+ logger$z.error(e);
32809
33002
  }
32810
33003
  },
32811
33004
  [currentTin, handleNextClick, handleBusinessVerification]
@@ -32904,7 +33097,7 @@ function BasicInformation({
32904
33097
  resetTinVerification,
32905
33098
  disableCountry
32906
33099
  }) {
32907
- var _a2, _b2, _c2, _d2, _e2;
33100
+ var _a2, _b2, _c2;
32908
33101
  const { updateStateSlice, sliceData } = useGlobalDataSlice(BASIC_INFORMATION_FORM_ID);
32909
33102
  const { i18n } = useI18nContext();
32910
33103
  const { isSettingEnabled } = useSettingsContext();
@@ -32970,7 +33163,7 @@ function BasicInformation({
32970
33163
  const defaultRegistrationNumberType = (data == null ? void 0 : data.registrationNumber) ? inferCompanyRegistrationNumberType(data == null ? void 0 : data.registrationNumber, country, companyType) : (_a2 = registrationNumberOptions == null ? void 0 : registrationNumberOptions[0]) == null ? void 0 : _a2.id;
32971
33164
  const [registrationNumberType, setRegistrationNumberType] = useState(defaultRegistrationNumberType);
32972
33165
  const existingTaxId = (_c2 = (_b2 = data == null ? void 0 : data.taxInformation) == null ? void 0 : _b2.find((taxId) => taxId.country === country)) == null ? void 0 : _c2.number;
32973
- const defaultTaxIdNumberType = existingTaxId ? inferTaxIdNumberType(existingTaxId, country) : (_e2 = (_d2 = getTaxIdNumberOptions(country, companyType)) == null ? void 0 : _d2[0]) == null ? void 0 : _e2.id;
33166
+ const defaultTaxIdNumberType = existingTaxId ? inferTaxIdNumberType(existingTaxId, country) : void 0;
32974
33167
  const [taxIdNumberType, setTaxIdNumberType] = useState(
32975
33168
  defaultTaxIdNumberType
32976
33169
  );
@@ -33834,7 +34027,7 @@ function BusinessDetails(props) {
33834
34027
  const businessVerificationModalHeader = "adyen-kyc-business-verification-modal-header";
33835
34028
  const businessVerificationModalContent = "adyen-kyc-business-verification-modal-content";
33836
34029
  const businessVerificationModalActions = "adyen-kyc-business-verification-modal-actions";
33837
- const styles$h = {
34030
+ const styles$f = {
33838
34031
  businessVerificationModalHeader,
33839
34032
  businessVerificationModalContent,
33840
34033
  businessVerificationModalActions
@@ -33843,10 +34036,10 @@ const BusinessMismatchModal = ({ onContinue, onBackClick }) => {
33843
34036
  const { i18n } = useI18nContext();
33844
34037
  return /* @__PURE__ */ jsxs(Modal, { size: "small", onClose: () => {
33845
34038
  }, showCloseButton: false, children: [
33846
- /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(Typography, { variant: "title", el: "h3", className: styles$h.businessVerificationModalHeader, children: i18n.get("businessSelection__tinVerificationFailureModalHeader") }) }),
34039
+ /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(Typography, { variant: "title", el: "h3", className: styles$f.businessVerificationModalHeader, children: i18n.get("businessSelection__tinVerificationFailureModalHeader") }) }),
33847
34040
  /* @__PURE__ */ jsxs(ModalContent, { children: [
33848
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", className: styles$h.businessVerificationModalContent, children: i18n.get("businessSelection__tinVerificationFailureModalContent") }),
33849
- /* @__PURE__ */ jsxs("div", { className: styles$h.businessVerificationModalActions, children: [
34041
+ /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", className: styles$f.businessVerificationModalContent, children: i18n.get("businessSelection__tinVerificationFailureModalContent") }),
34042
+ /* @__PURE__ */ jsxs("div", { className: styles$f.businessVerificationModalActions, children: [
33850
34043
  /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onContinue, children: i18n.get("businessSelection__tinVerificationFailureModalPrimaryButton") }),
33851
34044
  /* @__PURE__ */ jsx(Button, { onClick: onBackClick, children: i18n.get("businessSelection__tinVerificationFailureModalSecondaryButton") })
33852
34045
  ] })
@@ -33877,7 +34070,7 @@ const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [
33877
34070
  StateCodesUS.California,
33878
34071
  StateCodesUS.Texas
33879
34072
  ];
33880
- const logger$z = createLogger("useBusinessData");
34073
+ const logger$y = createLogger("useBusinessData");
33881
34074
  function useBusinessData({
33882
34075
  handleCompanyIndexSearch,
33883
34076
  handleCompanyDeepSearch,
@@ -33914,7 +34107,7 @@ function useBusinessData({
33914
34107
  const searchByRegistrationNumber = useCallback(
33915
34108
  async (data) => {
33916
34109
  if (!handleCompanyRegistrationNumberDeepSearch || !handleCompanyRegistrationNumberIndexSearch) {
33917
- logger$z.error("Missing handlers for searchByRegistrationNumber");
34110
+ logger$y.error("Missing handlers for searchByRegistrationNumber");
33918
34111
  return;
33919
34112
  }
33920
34113
  const requestPayload = {
@@ -33934,7 +34127,7 @@ function useBusinessData({
33934
34127
  const searchByCompanyName = useCallback(
33935
34128
  async (data) => {
33936
34129
  if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
33937
- logger$z.error("Missing handlers for searchByCompanyName");
34130
+ logger$y.error("Missing handlers for searchByCompanyName");
33938
34131
  return;
33939
34132
  }
33940
34133
  return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
@@ -33978,7 +34171,7 @@ function useBusinessData({
33978
34171
  return (response == null ? void 0 : response.results) || [];
33979
34172
  } catch (e) {
33980
34173
  setSearching("error");
33981
- logger$z.error(e);
34174
+ logger$y.error(e);
33982
34175
  } finally {
33983
34176
  setCachedSearch(data);
33984
34177
  setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
@@ -33989,7 +34182,7 @@ function useBusinessData({
33989
34182
  const fetchBusinessData = useCallback(
33990
34183
  async (company, state) => {
33991
34184
  if (!handleGetCompanyDataset || !handleRefreshCompanyDataset) {
33992
- logger$z.error("Missing handlers for fetchBusinessData");
34185
+ logger$y.error("Missing handlers for fetchBusinessData");
33993
34186
  return;
33994
34187
  }
33995
34188
  const date = (/* @__PURE__ */ new Date()).toDateString();
@@ -34018,7 +34211,7 @@ function useBusinessData({
34018
34211
  });
34019
34212
  } catch (e) {
34020
34213
  setFetching("error");
34021
- logger$z.error(e);
34214
+ logger$y.error(e);
34022
34215
  } finally {
34023
34216
  setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
34024
34217
  }
@@ -34028,7 +34221,7 @@ function useBusinessData({
34028
34221
  const verifyTin2 = useCallback(
34029
34222
  async (data, tin) => {
34030
34223
  if (!handleVerifyTin) {
34031
- logger$z.log("Missing handlers for verifyTin");
34224
+ logger$y.log("Missing handlers for verifyTin");
34032
34225
  return;
34033
34226
  }
34034
34227
  const name = typeof data === "string" ? data : data.name;
@@ -34045,7 +34238,7 @@ function useBusinessData({
34045
34238
  return matched;
34046
34239
  } catch (e) {
34047
34240
  setVerifying("error");
34048
- logger$z.error(e);
34241
+ logger$y.error(e);
34049
34242
  } finally {
34050
34243
  setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
34051
34244
  }
@@ -34058,7 +34251,7 @@ function useBusinessData({
34058
34251
  await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
34059
34252
  } catch (e) {
34060
34253
  setResettingTrustedData("error");
34061
- logger$z.error(e);
34254
+ logger$y.error(e);
34062
34255
  } finally {
34063
34256
  setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
34064
34257
  }
@@ -34613,7 +34806,7 @@ function BusinessDetailsDropin({
34613
34806
  nestedLegalEntityDetails,
34614
34807
  // has entity roles for association logic
34615
34808
  capabilities,
34616
- taskName: taskName2,
34809
+ taskName,
34617
34810
  hideSidebar,
34618
34811
  taskType,
34619
34812
  onChange,
@@ -35167,7 +35360,7 @@ function BusinessDetailsDropin({
35167
35360
  return /* @__PURE__ */ jsxs(
35168
35361
  FormWrapper,
35169
35362
  {
35170
- taskName: taskName2 ?? "businessDetails",
35363
+ taskName: taskName ?? "businessDetails",
35171
35364
  gotoFormByFormIndex: goToForm,
35172
35365
  hideSidebar,
35173
35366
  hideFooter,
@@ -35274,7 +35467,7 @@ function CompanyDropin({
35274
35467
  country: parentCountry,
35275
35468
  problems: propProblems,
35276
35469
  hideSidebar,
35277
- taskName: taskName2,
35470
+ taskName,
35278
35471
  capabilities,
35279
35472
  taskType = TaskTypes.COMPANY,
35280
35473
  associationDetail,
@@ -35619,7 +35812,7 @@ function CompanyDropin({
35619
35812
  return /* @__PURE__ */ jsx(
35620
35813
  FormWrapper,
35621
35814
  {
35622
- taskName: taskName2,
35815
+ taskName,
35623
35816
  handleNextClick,
35624
35817
  gotoFormByFormIndex,
35625
35818
  handleHomeClick,
@@ -35662,10 +35855,10 @@ function CompanyDropin({
35662
35855
  );
35663
35856
  }
35664
35857
  const outlinedIcon = "adyen-kyc-outlined-icon";
35665
- const styles$g = {
35858
+ const styles$e = {
35666
35859
  outlinedIcon
35667
35860
  };
35668
- const OutlinedIcon = ({ name }) => /* @__PURE__ */ jsx("div", { className: styles$g.outlinedIcon, children: /* @__PURE__ */ jsx(Icon, { name }) });
35861
+ const OutlinedIcon = ({ name }) => /* @__PURE__ */ jsx("div", { className: styles$e.outlinedIcon, children: /* @__PURE__ */ jsx(Icon, { name }) });
35669
35862
  const FormEndState = ({ variant = "success", children: children2, className: className2 }) => {
35670
35863
  const Slot = defineSlots(children2, ["title", "content", "icon", "actions"]);
35671
35864
  return /* @__PURE__ */ jsxs(
@@ -35934,7 +36127,7 @@ const sourceOfFundsUploadModalContentField = "adyen-kyc-source-of-funds-upload-m
35934
36127
  const sourceOfFundsUploadModalContentFieldRadioGroup = "adyen-kyc-source-of-funds-upload-modal-content-field-radio-group";
35935
36128
  const sourceOfFundsUploadModalContentRequirementsContainer = "adyen-kyc-source-of-funds-upload-modal-content-requirements-container";
35936
36129
  const sourceOfFundsUploadListHeading = "adyen-kyc-source-of-funds-upload-list-heading";
35937
- const styles$f = {
36130
+ const styles$d = {
35938
36131
  sourceOfFunds,
35939
36132
  sourceOfFundsWrapperLoading,
35940
36133
  sourceOfFundsWrapperHeading,
@@ -36690,7 +36883,7 @@ function AdditionalDataForAssetSale(props) {
36690
36883
  handleAmountChange("amount");
36691
36884
  };
36692
36885
  return /* @__PURE__ */ jsxs(Fragment, { children: [
36693
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsGridContainer, children: [
36886
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsGridContainer, children: [
36694
36887
  /* @__PURE__ */ jsx(
36695
36888
  Field,
36696
36889
  {
@@ -36921,7 +37114,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
36921
37114
  Field,
36922
37115
  {
36923
37116
  name: "originatorType",
36924
- className: styles$f.sourceOfFundsUploadModalContentField,
37117
+ className: styles$d.sourceOfFundsUploadModalContentField,
36925
37118
  label: i18n.get(
36926
37119
  isDonations ? "whereDidThisGiftOrDonationComeFrom" : "whereDidThisInheritanceComeFrom"
36927
37120
  ),
@@ -36932,7 +37125,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
36932
37125
  {
36933
37126
  ...childProps,
36934
37127
  name: "originatorType",
36935
- className: styles$f.sourceOfFundsUploadModalContentFieldRadioGroup,
37128
+ className: styles$d.sourceOfFundsUploadModalContentFieldRadioGroup,
36936
37129
  items: radioItems,
36937
37130
  value: data.originatorType,
36938
37131
  disabled: false,
@@ -37091,7 +37284,7 @@ function AdditionalDataForDonation(props) {
37091
37284
  sourceOfFundsType: "donations"
37092
37285
  }
37093
37286
  ),
37094
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsGridContainer, children: [
37287
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsGridContainer, children: [
37095
37288
  /* @__PURE__ */ jsx(
37096
37289
  Field,
37097
37290
  {
@@ -37286,7 +37479,7 @@ function AdditionalDataForInheritance(props) {
37286
37479
  sourceOfFundsType: "inheritance"
37287
37480
  }
37288
37481
  ),
37289
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsGridContainer, children: [
37482
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsGridContainer, children: [
37290
37483
  /* @__PURE__ */ jsx(
37291
37484
  Field,
37292
37485
  {
@@ -37486,21 +37679,21 @@ const SOFFinancierModal = (props) => {
37486
37679
  {
37487
37680
  variant: "title-l",
37488
37681
  el: "h3",
37489
- className: styles$f.sourceOfFundsGettingStartedHelpHeader,
37682
+ className: styles$d.sourceOfFundsGettingStartedHelpHeader,
37490
37683
  children: i18n.get("investorDetails")
37491
37684
  }
37492
37685
  ) }),
37493
- /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsSofFinancierForm, children: [
37686
+ /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsSofFinancierForm, children: [
37494
37687
  errorMessage && /* @__PURE__ */ jsx(
37495
37688
  Alert,
37496
37689
  {
37497
37690
  title: i18n.get("errorSubmittingData"),
37498
37691
  variant: "error",
37499
- className: styles$f.sourceOfFundsSofFinancierFormError,
37692
+ className: styles$d.sourceOfFundsSofFinancierFormError,
37500
37693
  children: errorMessage
37501
37694
  }
37502
37695
  ),
37503
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsSofFinancierFormNameGroup, children: [
37696
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsSofFinancierFormNameGroup, children: [
37504
37697
  /* @__PURE__ */ jsx(
37505
37698
  Field,
37506
37699
  {
@@ -37613,7 +37806,7 @@ const SOFFinancierModal = (props) => {
37613
37806
  }
37614
37807
  )
37615
37808
  ] }) }),
37616
- /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsFinancierFooter, children: [
37809
+ /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsFinancierFooter, children: [
37617
37810
  Number.isFinite(indexNumber) && /* @__PURE__ */ jsx(
37618
37811
  IconButton,
37619
37812
  {
@@ -37692,7 +37885,7 @@ function AdditionalDataForThirdParty(props) {
37692
37885
  formUtils.getErrorMessage("financiers", errors, fieldProblems)
37693
37886
  ),
37694
37887
  variant: "error",
37695
- className: styles$f.sourceOfFundsSofFinancierFormError,
37888
+ className: styles$d.sourceOfFundsSofFinancierFormError,
37696
37889
  children: i18n.get("addAtLeastOneInvestor")
37697
37890
  }
37698
37891
  ),
@@ -37703,11 +37896,11 @@ function AdditionalDataForThirdParty(props) {
37703
37896
  {
37704
37897
  type: "button",
37705
37898
  onClick: () => handleShowUpdateFinancierModal(index),
37706
- className: styles$f.sourceOfFundsThirdPartyFundingFinancierGroup,
37899
+ className: styles$d.sourceOfFundsThirdPartyFundingFinancierGroup,
37707
37900
  children: [
37708
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
37709
- /* @__PURE__ */ jsx(Icon, { name: "user", className: styles$f.sourceOfFundsThirdPartyFundingAvatar }),
37710
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
37901
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
37902
+ /* @__PURE__ */ jsx(Icon, { name: "user", className: styles$d.sourceOfFundsThirdPartyFundingAvatar }),
37903
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
37711
37904
  /* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
37712
37905
  financier.firstName,
37713
37906
  " ",
@@ -37729,10 +37922,10 @@ function AdditionalDataForThirdParty(props) {
37729
37922
  "button",
37730
37923
  {
37731
37924
  type: "button",
37732
- className: styles$f.sourceOfFundsThirdPartyFundingFinancierGroup,
37925
+ className: styles$d.sourceOfFundsThirdPartyFundingFinancierGroup,
37733
37926
  onClick: handleToggleFinancierModal,
37734
- children: /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
37735
- /* @__PURE__ */ jsx(Icon, { name: "plus", className: styles$f.sourceOfFundsThirdPartyFundingAvatarAdd }),
37927
+ children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
37928
+ /* @__PURE__ */ jsx(Icon, { name: "plus", className: styles$d.sourceOfFundsThirdPartyFundingAvatarAdd }),
37736
37929
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("addInvestor") })
37737
37930
  ] })
37738
37931
  }
@@ -38246,7 +38439,7 @@ function SourceOfFundsAdditionalData(props) {
38246
38439
  return null;
38247
38440
  }
38248
38441
  };
38249
- return /* @__PURE__ */ jsxs("form", { className: styles$f.sourceOfFundsAdditionalDataForm, children: [
38442
+ return /* @__PURE__ */ jsxs("form", { className: styles$d.sourceOfFundsAdditionalDataForm, children: [
38250
38443
  /* @__PURE__ */ jsx(
38251
38444
  ErrorPanel,
38252
38445
  {
@@ -38266,7 +38459,7 @@ const tileTitle = "adyen-kyc-tile-title";
38266
38459
  const tileCheckbox = "adyen-kyc-tile-checkbox";
38267
38460
  const tileContainerHorizontal = "adyen-kyc-tile-container-horizontal";
38268
38461
  const tileLabel = "adyen-kyc-tile-label";
38269
- const styles$e = {
38462
+ const styles$c = {
38270
38463
  tileContainer,
38271
38464
  tile,
38272
38465
  tileIcon,
@@ -38308,15 +38501,15 @@ function Tile({
38308
38501
  return /* @__PURE__ */ jsxs(
38309
38502
  "div",
38310
38503
  {
38311
- className: cx(styles$e.tileContainer, {
38312
- [styles$e.tileContainerHorizontal]: isHorizontal
38504
+ className: cx(styles$c.tileContainer, {
38505
+ [styles$c.tileContainerHorizontal]: isHorizontal
38313
38506
  }),
38314
38507
  children: [
38315
38508
  /* @__PURE__ */ jsx(
38316
38509
  "input",
38317
38510
  {
38318
38511
  ref: inputNode,
38319
- className: styles$e.tileCheckbox,
38512
+ className: styles$c.tileCheckbox,
38320
38513
  disabled,
38321
38514
  checked: !!checked,
38322
38515
  value,
@@ -38330,10 +38523,10 @@ function Tile({
38330
38523
  tabIndex: disabled ? -1 : 0
38331
38524
  }
38332
38525
  ),
38333
- /* @__PURE__ */ jsxs("label", { htmlFor: idUse, className: styles$e.tile, children: [
38334
- icon && /* @__PURE__ */ jsx("div", { className: styles$e.tileIcon, children: /* @__PURE__ */ jsx(Icon, { name: icon, testId: icon }) }),
38335
- /* @__PURE__ */ jsxs("div", { className: styles$e.tileLabel, children: [
38336
- /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", className: styles$e.tileTitle, children: label }),
38526
+ /* @__PURE__ */ jsxs("label", { htmlFor: idUse, className: styles$c.tile, children: [
38527
+ icon && /* @__PURE__ */ jsx("div", { className: styles$c.tileIcon, children: /* @__PURE__ */ jsx(Icon, { name: icon, testId: icon }) }),
38528
+ /* @__PURE__ */ jsxs("div", { className: styles$c.tileLabel, children: [
38529
+ /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", className: styles$c.tileTitle, children: label }),
38337
38530
  subTitle && /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: subTitle })
38338
38531
  ] })
38339
38532
  ] })
@@ -38345,7 +38538,7 @@ const tileGroup = "adyen-kyc-tile-group";
38345
38538
  const tileGroupError = "adyen-kyc-tile-group-error";
38346
38539
  const tileGroupErrorIcon = "adyen-kyc-tile-group-error-icon";
38347
38540
  const tileGroupHorizontal = "adyen-kyc-tile-group-horizontal";
38348
- const styles$d = {
38541
+ const styles$b = {
38349
38542
  tileGroup,
38350
38543
  tileGroupError,
38351
38544
  tileGroupErrorIcon,
@@ -38365,15 +38558,15 @@ function TileGroup({
38365
38558
  const name = nameProp ?? uniqName;
38366
38559
  const finalName = allowMultiple ? `${name}[]` : name;
38367
38560
  return /* @__PURE__ */ jsxs(Fragment, { children: [
38368
- !!errorMessage && /* @__PURE__ */ jsxs("div", { "aria-live": "polite", className: styles$d.tileGroupError, children: [
38369
- /* @__PURE__ */ jsx("span", { className: styles$d.tileGroupErrorIcon, children: /* @__PURE__ */ jsx(Icon, { name: "field-error" }) }),
38561
+ !!errorMessage && /* @__PURE__ */ jsxs("div", { "aria-live": "polite", className: styles$b.tileGroupError, children: [
38562
+ /* @__PURE__ */ jsx("span", { className: styles$b.tileGroupErrorIcon, children: /* @__PURE__ */ jsx(Icon, { name: "field-error" }) }),
38370
38563
  errorMessage
38371
38564
  ] }),
38372
38565
  /* @__PURE__ */ jsx(
38373
38566
  "div",
38374
38567
  {
38375
- className: cx(styles$d.tileGroup, {
38376
- [styles$d.tileGroupHorizontal]: isHorizontal
38568
+ className: cx(styles$b.tileGroup, {
38569
+ [styles$b.tileGroupHorizontal]: isHorizontal
38377
38570
  }),
38378
38571
  children: tiles.map((tile2, index) => {
38379
38572
  const { value, id, icon, subTitle, label, disabled } = tile2;
@@ -38515,7 +38708,7 @@ function getIconById(id) {
38515
38708
  return "contract";
38516
38709
  }
38517
38710
  }
38518
- const logger$y = createLogger("SourceOfFunds");
38711
+ const logger$x = createLogger("SourceOfFunds");
38519
38712
  function SourceOfFunds(props) {
38520
38713
  const { i18n } = useI18nContext();
38521
38714
  const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
@@ -38528,15 +38721,15 @@ function SourceOfFunds(props) {
38528
38721
  if (response) {
38529
38722
  setAllSoFTypes(response);
38530
38723
  }
38531
- }).catch(() => logger$y.error).finally(() => setLoading(false));
38724
+ }).catch(() => logger$x.error).finally(() => setLoading(false));
38532
38725
  }, []);
38533
38726
  const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
38534
38727
  const pageHeadings = useMemo(
38535
38728
  () => getPageHeadings(sourceOfFundsType ?? "adyen"),
38536
38729
  [sourceOfFundsType]
38537
38730
  );
38538
- return loading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles$f.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, { size: "medium" }) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
38539
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsWrapperHeading, children: [
38731
+ return loading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, { size: "medium" }) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
38732
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsWrapperHeading, children: [
38540
38733
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
38541
38734
  (activeForm == null ? void 0 : activeForm.formId) === "additionalData" ? pageHeadings.heading : {
38542
38735
  key: "selectASourceOfFunding",
@@ -38548,7 +38741,7 @@ function SourceOfFunds(props) {
38548
38741
  }
38549
38742
  }
38550
38743
  ) }),
38551
- /* @__PURE__ */ jsxs(Typography, { className: styles$f.sourceOfFundsWrapperDescription, children: [
38744
+ /* @__PURE__ */ jsxs(Typography, { className: styles$d.sourceOfFundsWrapperDescription, children: [
38552
38745
  (activeForm == null ? void 0 : activeForm.formId) === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
38553
38746
  allSoFTypes.length === 0 && i18n.get("noCategoriesAvailable")
38554
38747
  ] })
@@ -38590,9 +38783,9 @@ function SourceOfFundsGettingStartedCard(props) {
38590
38783
  return /* @__PURE__ */ jsx(
38591
38784
  Card,
38592
38785
  {
38593
- className: styles$f.sourceOfFundsGettingStartedCardsCard,
38594
- headerClassName: styles$f.sourceOfFundsGettingStartedCardsCardHeader,
38595
- bodyClassName: styles$f.sourceOfFundsGettingStartedCardsCardBody,
38786
+ className: styles$d.sourceOfFundsGettingStartedCardsCard,
38787
+ headerClassName: styles$d.sourceOfFundsGettingStartedCardsCardHeader,
38788
+ bodyClassName: styles$d.sourceOfFundsGettingStartedCardsCardBody,
38596
38789
  title,
38597
38790
  stateful: true,
38598
38791
  onClick,
@@ -38608,7 +38801,7 @@ function SourceOfFundsGettingStartedCard(props) {
38608
38801
  children: isEdit && (meta == null ? void 0 : meta.length) && /* @__PURE__ */ jsx(
38609
38802
  StructuredList,
38610
38803
  {
38611
- className: styles$f.sourceOfFundsGettingStartedCardsCardDescription,
38804
+ className: styles$d.sourceOfFundsGettingStartedCardsCardDescription,
38612
38805
  items: meta
38613
38806
  }
38614
38807
  )
@@ -38711,7 +38904,7 @@ const SourceOfFundsGettingStarted = ({
38711
38904
  return /* @__PURE__ */ jsxs(
38712
38905
  "div",
38713
38906
  {
38714
- className: styles$f.sourceOfFundsGettingStarted,
38907
+ className: styles$d.sourceOfFundsGettingStarted,
38715
38908
  "data-testid": "source-of-funds-getting-started",
38716
38909
  children: [
38717
38910
  !hasSourceOfFunds && /* @__PURE__ */ jsx(
@@ -38720,12 +38913,12 @@ const SourceOfFundsGettingStarted = ({
38720
38913
  type: "image",
38721
38914
  testId: "source-of-funds-getting-started-icon",
38722
38915
  name: "source-of-funds",
38723
- className: styles$f.sourceOfFundsGettingStartedIcon
38916
+ className: styles$d.sourceOfFundsGettingStartedIcon
38724
38917
  }
38725
38918
  ),
38726
- /* @__PURE__ */ jsx(Typography, { className: styles$f.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("financialProductFundingSources") }),
38919
+ /* @__PURE__ */ jsx(Typography, { className: styles$d.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("financialProductFundingSources") }),
38727
38920
  hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
38728
- /* @__PURE__ */ jsx(Typography, { className: styles$f.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
38921
+ /* @__PURE__ */ jsx(Typography, { className: styles$d.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
38729
38922
  errorObjects && errorObjects.map((errorObj, index) => {
38730
38923
  var _a2;
38731
38924
  const uniqueActions = getUniqueRemediationActions(errorObj);
@@ -38733,7 +38926,7 @@ const SourceOfFundsGettingStarted = ({
38733
38926
  Alert,
38734
38927
  {
38735
38928
  title: errorObj.message,
38736
- className: styles$f.sourceOfFundsGettingStartedError,
38929
+ className: styles$d.sourceOfFundsGettingStartedError,
38737
38930
  variant: "error",
38738
38931
  children: [
38739
38932
  ((_a2 = errorObj == null ? void 0 : errorObj.subErrors) == null ? void 0 : _a2.length) && /* @__PURE__ */ jsx(
@@ -38744,7 +38937,7 @@ const SourceOfFundsGettingStarted = ({
38744
38937
  )
38745
38938
  }
38746
38939
  ),
38747
- uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$f.sourceOfFundsGettingStartedErrorActions, children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(
38940
+ uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsGettingStartedErrorActions, children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(
38748
38941
  Button,
38749
38942
  {
38750
38943
  variant: "tertiary",
@@ -38759,7 +38952,7 @@ const SourceOfFundsGettingStarted = ({
38759
38952
  `error-${index}`
38760
38953
  );
38761
38954
  }),
38762
- /* @__PURE__ */ jsx("div", { className: styles$f.sourceOfFundsGettingStartedCards, children: mapBusinessLines(businessLines) }),
38955
+ /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsGettingStartedCards, children: mapBusinessLines(businessLines) }),
38763
38956
  handleCancelClick && /* @__PURE__ */ jsx(
38764
38957
  Button,
38765
38958
  {
@@ -38771,8 +38964,8 @@ const SourceOfFundsGettingStarted = ({
38771
38964
  )
38772
38965
  ] }),
38773
38966
  !hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
38774
- /* @__PURE__ */ jsx(Typography, { className: styles$f.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
38775
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsGettingStartedActions, children: [
38967
+ /* @__PURE__ */ jsx(Typography, { className: styles$d.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
38968
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsGettingStartedActions, children: [
38776
38969
  /* @__PURE__ */ jsx(
38777
38970
  Button,
38778
38971
  {
@@ -38871,20 +39064,20 @@ const SOFUploadModal = (props) => {
38871
39064
  }
38872
39065
  };
38873
39066
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Modal, { onClose: handleModalClose, children: [
38874
- /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx("div", { className: styles$f.sourceOfFundsUploadModalHeader, children: /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("uploadASupportingDocument") }) }) }),
38875
- /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsUploadModalContent, children: [
39067
+ /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsUploadModalHeader, children: /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("uploadASupportingDocument") }) }) }),
39068
+ /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsUploadModalContent, children: [
38876
39069
  (businessLines == null ? void 0 : businessLines.length) > 1 ? /* @__PURE__ */ jsx(
38877
39070
  Field,
38878
39071
  {
38879
39072
  name: "service",
38880
- className: styles$f.sourceOfFundsUploadModalContentField,
39073
+ className: styles$d.sourceOfFundsUploadModalContentField,
38881
39074
  label: i18n.get("whatFinancialProductIsThisFor"),
38882
39075
  children: (childProps) => /* @__PURE__ */ jsx(
38883
39076
  RadioGroup,
38884
39077
  {
38885
39078
  ...childProps,
38886
39079
  name: "service",
38887
- className: styles$f.sourceOfFundsUploadModalContentFieldRadioGroup,
39080
+ className: styles$d.sourceOfFundsUploadModalContentFieldRadioGroup,
38888
39081
  items: serviceRadioItems,
38889
39082
  value: selectedService,
38890
39083
  disabled: false,
@@ -38901,7 +39094,7 @@ const SOFUploadModal = (props) => {
38901
39094
  name: "documentType",
38902
39095
  label: i18n.get("documentType"),
38903
39096
  "data-testid": "documentType",
38904
- className: styles$f.sourceOfFundsUploadModalContentField,
39097
+ className: styles$d.sourceOfFundsUploadModalContentField,
38905
39098
  children: (childProps) => /* @__PURE__ */ jsx(
38906
39099
  Select,
38907
39100
  {
@@ -38915,7 +39108,7 @@ const SOFUploadModal = (props) => {
38915
39108
  )
38916
39109
  }
38917
39110
  ),
38918
- (documentRequirements == null ? void 0 : documentRequirements.length) ? /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsUploadModalContentRequirementsContainer, children: [
39111
+ (documentRequirements == null ? void 0 : documentRequirements.length) ? /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsUploadModalContentRequirementsContainer, children: [
38919
39112
  /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: i18n.get("documentShouldShow") }),
38920
39113
  /* @__PURE__ */ jsx("ul", { children: documentRequirements == null ? void 0 : documentRequirements.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: i18n.get(requirement) }) }, requirement)) })
38921
39114
  ] }) : null,
@@ -38981,10 +39174,10 @@ const SourceOfFundsUpload = ({
38981
39174
  }
38982
39175
  }
38983
39176
  };
38984
- return /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsUploadList, children: [
38985
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsUploadListHeading, children: [
39177
+ return /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsUploadList, children: [
39178
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsUploadListHeading, children: [
38986
39179
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("supportingDocuments") }),
38987
- /* @__PURE__ */ jsx(Typography, { className: styles$f.sourceOfFundsWrapperDescription, children: (sourceOfFundsCategories == null ? void 0 : sourceOfFundsCategories.length) ? i18n.get("weNeedProofOfFundingPlural", {
39180
+ /* @__PURE__ */ jsx(Typography, { className: styles$d.sourceOfFundsWrapperDescription, children: (sourceOfFundsCategories == null ? void 0 : sourceOfFundsCategories.length) ? i18n.get("weNeedProofOfFundingPlural", {
38988
39181
  values: {
38989
39182
  category1_name: sourceOfFundsCategories[0] ? i18n.get(
38990
39183
  `sofType${toCapitalized(sourceOfFundsCategories[0])}Label`
@@ -39001,10 +39194,10 @@ const SourceOfFundsUpload = ({
39001
39194
  }
39002
39195
  }) })
39003
39196
  ] }),
39004
- documents == null ? void 0 : documents.map((document2) => /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
39005
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
39006
- /* @__PURE__ */ jsx(Icon, { name: "document", className: styles$f.sourceOfFundsThirdPartyFundingAvatar }),
39007
- /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
39197
+ documents == null ? void 0 : documents.map((document2) => /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
39198
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
39199
+ /* @__PURE__ */ jsx(Icon, { name: "document", className: styles$d.sourceOfFundsThirdPartyFundingAvatar }),
39200
+ /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
39008
39201
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: document2.fileName }),
39009
39202
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: parseSOFDocumentDescription(i18n, document2.description) })
39010
39203
  ] })
@@ -39024,16 +39217,16 @@ const SourceOfFundsUpload = ({
39024
39217
  "button",
39025
39218
  {
39026
39219
  type: "button",
39027
- className: styles$f.sourceOfFundsThirdPartyFundingFinancierGroup,
39220
+ className: styles$d.sourceOfFundsThirdPartyFundingFinancierGroup,
39028
39221
  onClick: openUploadModal,
39029
39222
  "data-testId": "source-of-funds-upload-button",
39030
- children: /* @__PURE__ */ jsxs("div", { className: styles$f.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
39031
- /* @__PURE__ */ jsx(Icon, { className: styles$f.sourceOfFundsThirdPartyFundingAvatarAdd, name: "plus" }),
39223
+ children: /* @__PURE__ */ jsxs("div", { className: styles$d.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
39224
+ /* @__PURE__ */ jsx(Icon, { className: styles$d.sourceOfFundsThirdPartyFundingAvatarAdd, name: "plus" }),
39032
39225
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("addDocument") })
39033
39226
  ] })
39034
39227
  }
39035
39228
  ),
39036
- /* @__PURE__ */ jsx("div", { className: styles$f.sourceOfFundsGettingStartedActions, children: handleNavigateToSummary && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: i18n.get("cancel") }) }),
39229
+ /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFundsGettingStartedActions, children: handleNavigateToSummary && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: i18n.get("cancel") }) }),
39037
39230
  !!docToDelete && /* @__PURE__ */ jsx(
39038
39231
  Confirm,
39039
39232
  {
@@ -39059,7 +39252,7 @@ const SourceOfFundsUpload = ({
39059
39252
  )
39060
39253
  ] });
39061
39254
  };
39062
- const logger$x = createLogger("SourceOfFundsDropin");
39255
+ const logger$w = createLogger("SourceOfFundsDropin");
39063
39256
  function SourceOfFundsDropin({
39064
39257
  legalEntityResponse,
39065
39258
  country,
@@ -39145,7 +39338,7 @@ function SourceOfFundsDropin({
39145
39338
  }
39146
39339
  } catch (error) {
39147
39340
  showToast({ label: i18n.get("failedToLoadBusinessLines"), type: "error" });
39148
- logger$x.error(error);
39341
+ logger$w.error(error);
39149
39342
  } finally {
39150
39343
  setLoading(false);
39151
39344
  }
@@ -39208,14 +39401,14 @@ function SourceOfFundsDropin({
39208
39401
  const le = await handleUpdateLegalEntity(sofOriginator, sofOriginator.id);
39209
39402
  originatorLegalEntityId = le == null ? void 0 : le.id;
39210
39403
  } catch (e) {
39211
- logger$x.log("Error updating originator legal entity", e);
39404
+ logger$w.log("Error updating originator legal entity", e);
39212
39405
  }
39213
39406
  } else {
39214
39407
  try {
39215
39408
  const le = await handleCreateLegalEntity(sofOriginator);
39216
39409
  originatorLegalEntityId = le == null ? void 0 : le.id;
39217
39410
  } catch (e) {
39218
- logger$x.log("Error creating originator legal entity", e);
39411
+ logger$w.log("Error creating originator legal entity", e);
39219
39412
  }
39220
39413
  }
39221
39414
  return originatorLegalEntityId;
@@ -39228,7 +39421,7 @@ function SourceOfFundsDropin({
39228
39421
  return;
39229
39422
  }
39230
39423
  setLoadingStatus("loading");
39231
- logger$x.log("Submitting data");
39424
+ logger$w.log("Submitting data");
39232
39425
  const { additionalData } = sofData;
39233
39426
  const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
39234
39427
  if (sofType === "donations" || sofType === "inheritance") {
@@ -39243,7 +39436,7 @@ function SourceOfFundsDropin({
39243
39436
  setActiveSourceOfFund({});
39244
39437
  gotoFormByFormIndex(0);
39245
39438
  } catch (e) {
39246
- logger$x.log("Error updating source of funds", e);
39439
+ logger$w.log("Error updating source of funds", e);
39247
39440
  setSofErrorMessage((e == null ? void 0 : e.message) || i18n.get("errorUpdatingSourceOfFunds"));
39248
39441
  }
39249
39442
  setLoadingStatus("success");
@@ -39280,7 +39473,7 @@ function SourceOfFundsDropin({
39280
39473
  const updatedLe = await handleGetLegalEntity(legalEntity.id);
39281
39474
  setLegalEntity(updatedLe);
39282
39475
  } catch (e) {
39283
- logger$x.log(e);
39476
+ logger$w.log(e);
39284
39477
  }
39285
39478
  };
39286
39479
  const handleNavigateToSummary = async () => {
@@ -39291,7 +39484,7 @@ function SourceOfFundsDropin({
39291
39484
  const handleNavigateToUploadPage = () => {
39292
39485
  setShowUploadPage(true);
39293
39486
  };
39294
- return /* @__PURE__ */ jsx("div", { className: styles$f.sourceOfFunds, children: loading ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
39487
+ return /* @__PURE__ */ jsx("div", { className: styles$d.sourceOfFunds, children: loading ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
39295
39488
  gettingStarted && !showUploadPage && /* @__PURE__ */ jsx(
39296
39489
  SourceOfFundsGettingStarted,
39297
39490
  {
@@ -40100,7 +40293,7 @@ const saveBlobAsFile = (fileData, filename) => {
40100
40293
  window.URL.revokeObjectURL(blobUrl);
40101
40294
  }
40102
40295
  };
40103
- const logger$w = createLogger("useServiceAgreement");
40296
+ const logger$v = createLogger("useServiceAgreement");
40104
40297
  const FALLBACK_LANGUAGE_CODE$1 = "en";
40105
40298
  const useServiceAgreement = ({
40106
40299
  handleGetServiceAgreement,
@@ -40130,7 +40323,7 @@ const useServiceAgreement = ({
40130
40323
  const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
40131
40324
  setServiceAgreement({ id, contract });
40132
40325
  };
40133
- requestAcceptedServiceAgreement().catch(logger$w.error).finally(() => setLoading("success"));
40326
+ requestAcceptedServiceAgreement().catch(logger$v.error).finally(() => setLoading("success"));
40134
40327
  }, [acceptanceId, handleViewAcceptedTermsOfServiceDocument]);
40135
40328
  useEffect(() => {
40136
40329
  const requestServiceAgreement = async () => {
@@ -40145,7 +40338,7 @@ const useServiceAgreement = ({
40145
40338
  }
40146
40339
  );
40147
40340
  if (!document2) {
40148
- logger$w.log('"document" field was missing in response');
40341
+ logger$v.log('"document" field was missing in response');
40149
40342
  return;
40150
40343
  }
40151
40344
  const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
@@ -40160,7 +40353,7 @@ const useServiceAgreement = ({
40160
40353
  throw err;
40161
40354
  }
40162
40355
  };
40163
- requestServiceAgreement().catch(logger$w.error);
40356
+ requestServiceAgreement().catch(logger$v.error);
40164
40357
  }, [
40165
40358
  handleGetServiceAgreement,
40166
40359
  handleServiceAgreementIsNotAvailableInThatLanguage,
@@ -40193,7 +40386,7 @@ const serviceAgreementTypesTranslationMapping = {
40193
40386
  adyenPccr: "pccr",
40194
40387
  adyenChargeCard: "chargeCardUserAgreement"
40195
40388
  };
40196
- const logger$v = createLogger("ServiceAgreementDropin");
40389
+ const logger$u = createLogger("ServiceAgreementDropin");
40197
40390
  const FALLBACK_LANGUAGE_CODE = "en";
40198
40391
  function ServiceAgreementDropin({
40199
40392
  legalEntityResponse,
@@ -40380,7 +40573,7 @@ function ServiceAgreementDropin({
40380
40573
  await requestAndDownload(i18n.languageCode);
40381
40574
  } catch {
40382
40575
  if (i18n.languageCode !== FALLBACK_LANGUAGE_CODE) {
40383
- await requestAndDownload(FALLBACK_LANGUAGE_CODE).catch(logger$v.error);
40576
+ await requestAndDownload(FALLBACK_LANGUAGE_CODE).catch(logger$u.error);
40384
40577
  return;
40385
40578
  }
40386
40579
  showToast({
@@ -40586,7 +40779,7 @@ function ServiceAgreementDropin({
40586
40779
  ] })
40587
40780
  ] }) });
40588
40781
  }
40589
- const logger$u = createLogger("AcceptTermsOfService");
40782
+ const logger$t = createLogger("AcceptTermsOfService");
40590
40783
  function AcceptTermsOfServiceComponent({
40591
40784
  legalEntityId,
40592
40785
  modalView,
@@ -40627,7 +40820,7 @@ function AcceptTermsOfServiceComponent({
40627
40820
  onClose == null ? void 0 : onClose();
40628
40821
  };
40629
40822
  const fetchSigned = useCallback(async () => {
40630
- await getServiceAgreementAcceptanceInfos2(legalEntityId).then(({ data }) => setServiceAgreementAcceptanceInfos(data)).catch(logger$u.error);
40823
+ await getServiceAgreementAcceptanceInfos2(legalEntityId).then(({ data }) => setServiceAgreementAcceptanceInfos(data)).catch(logger$t.error);
40631
40824
  }, [getServiceAgreementAcceptanceInfos2, legalEntityId]);
40632
40825
  const handleSign = useCallback(
40633
40826
  async (...params) => {
@@ -40654,7 +40847,7 @@ function AcceptTermsOfServiceComponent({
40654
40847
  (async () => {
40655
40848
  setIsLoading(true);
40656
40849
  await fetchSigned();
40657
- })().catch(logger$u.error).finally(() => {
40850
+ })().catch(logger$t.error).finally(() => {
40658
40851
  setIsLoading(false);
40659
40852
  });
40660
40853
  }, [fetchSigned]);
@@ -40765,9 +40958,11 @@ const useSingpassMyInfoLogin = ({
40765
40958
  singpassReducer,
40766
40959
  defaultSingpassState
40767
40960
  );
40961
+ const { isEmbeddedDropin } = useAuthContext();
40768
40962
  const { isExperimentEnabled } = useExperimentsContext();
40769
- const isSingpassForCompaniesEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
40770
- const isSingpassForIndividualsEnabled = isExperimentEnabled("ShowSingPassButtonForIndividuals");
40963
+ const isSingpassForCompaniesEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies") && !isEmbeddedDropin;
40964
+ const isSingpassForIndividualsEnabled = isExperimentEnabled("ShowSingPassButtonForIndividuals") && !isEmbeddedDropin;
40965
+ const isSingpassEnabledForOC = isExperimentEnabled("UseOnboardingComponentsForSingpass") && isEmbeddedDropin;
40771
40966
  const enableBusinessDetailsFlow = isExperimentEnabled("EnableNewBusinessDetailsFlow");
40772
40967
  const apiMapping = getApiMapping(enableBusinessDetailsFlow, legalEntity);
40773
40968
  const legalEntityTrustedFields = legalEntity == null ? void 0 : legalEntity.trustedFields;
@@ -40778,18 +40973,19 @@ const useSingpassMyInfoLogin = ({
40778
40973
  if (getLegalEntityCountry(legalEntity) !== CountryCodes.Singapore) {
40779
40974
  return false;
40780
40975
  }
40781
- if (!isSingpassForCompaniesEnabled && !isSingpassForIndividualsEnabled) return false;
40976
+ if (!isSingpassForCompaniesEnabled && !isSingpassForIndividualsEnabled && !isSingpassEnabledForOC)
40977
+ return false;
40782
40978
  const isSingpassEnabled = Boolean(handleOpenSingpassAuthorizationLink);
40783
40979
  if (!isSingpassEnabled) return false;
40784
40980
  if (accountHolder) {
40785
- return accountHolder === "theCompanyIWorkFor" && isSingpassForCompaniesEnabled || accountHolder === "myName" && isSingpassForIndividualsEnabled;
40981
+ return accountHolder === "theCompanyIWorkFor" && (isSingpassForCompaniesEnabled || isSingpassEnabledForOC) || accountHolder === "myName" && (isSingpassForIndividualsEnabled || isSingpassEnabledForOC);
40786
40982
  }
40787
40983
  const legalEntityType = legalEntity.type;
40788
40984
  const isPartOfTrust = isPartOfTrustFromLegalEntity(legalEntity);
40789
40985
  const isVanillaOrganization = legalEntityType === LegalEntityType.ORGANIZATION && !isPartOfTrust;
40790
40986
  const hasSoleProprietor = hasSolePropInLegalEntity(legalEntity);
40791
40987
  const isVanillaIndividual = legalEntityType === LegalEntityType.INDIVIDUAL && !hasSoleProprietor;
40792
- return isVanillaOrganization && isSingpassForCompaniesEnabled || isVanillaIndividual && isSingpassForIndividualsEnabled;
40988
+ return isVanillaOrganization && (isSingpassForCompaniesEnabled || isSingpassEnabledForOC) || isVanillaIndividual && (isSingpassForIndividualsEnabled || isSingpassEnabledForOC);
40793
40989
  }, [legalEntity, accountHolder, handleOpenSingpassAuthorizationLink]);
40794
40990
  const singpassTrustedFields = useMemo(() => {
40795
40991
  var _a2;
@@ -41383,7 +41579,7 @@ function reducer({
41383
41579
  }
41384
41580
  };
41385
41581
  }
41386
- const logger$t = createLogger("useAsyncValidator");
41582
+ const logger$s = createLogger("useAsyncValidator");
41387
41583
  const useMultiFormAsyncValidator = (asyncRules) => {
41388
41584
  const validResult = {
41389
41585
  isValid: true,
@@ -41396,7 +41592,7 @@ const useMultiFormAsyncValidator = (asyncRules) => {
41396
41592
  const rule = typeof asyncRules === "function" ? (_b2 = (_a2 = asyncRules == null ? void 0 : asyncRules(data)) == null ? void 0 : _a2[formName]) == null ? void 0 : _b2[field] : (_c2 = asyncRules == null ? void 0 : asyncRules[formName]) == null ? void 0 : _c2[field];
41397
41593
  const value = (_d2 = data == null ? void 0 : data[formName]) == null ? void 0 : _d2[field];
41398
41594
  if (!rule || !value) return new ValidationResult([validResult]);
41399
- const isValid = await rule.asyncValidate(value).catch(logger$t.error);
41595
+ const isValid = await rule.asyncValidate(value).catch(logger$s.error);
41400
41596
  if (isValid === false) {
41401
41597
  return new ValidationResult([
41402
41598
  {
@@ -41844,7 +42040,7 @@ const personalDetailsValidators = ({
41844
42040
  };
41845
42041
  };
41846
42042
  const parseConfiguration$4 = ({ matchingScenario }) => parseIndividualScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.INDIVIDUAL]);
41847
- const logger$s = createLogger("IndividualDropin");
42043
+ const logger$r = createLogger("IndividualDropin");
41848
42044
  function IndividualDropin({
41849
42045
  handleCreateDocument,
41850
42046
  handleGetDocument,
@@ -41857,7 +42053,7 @@ function IndividualDropin({
41857
42053
  taskType = TaskTypes.INDIVIDUAL,
41858
42054
  parentLegalEntity,
41859
42055
  legalEntityResponse,
41860
- taskName: taskName2,
42056
+ taskName,
41861
42057
  handleCloseClick,
41862
42058
  isTargetLegalEntityType,
41863
42059
  country: parentCountry,
@@ -42158,11 +42354,11 @@ function IndividualDropin({
42158
42354
  );
42159
42355
  if (!formattedDocuments || formattedDocuments.length === 0) {
42160
42356
  if (existingAttachments == null ? void 0 : existingAttachments.length)
42161
- logger$s.log(
42357
+ logger$r.log(
42162
42358
  "User has already uploaded documents and is not changing them, nothing needs to be done"
42163
42359
  );
42164
42360
  else
42165
- logger$s.error(
42361
+ logger$r.error(
42166
42362
  `formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
42167
42363
  );
42168
42364
  return;
@@ -42276,7 +42472,7 @@ function IndividualDropin({
42276
42472
  clearToasts();
42277
42473
  externalOnSubmit == null ? void 0 : externalOnSubmit(dataSubmitted);
42278
42474
  } catch (e) {
42279
- logger$s.error("Failed to update individual", e);
42475
+ logger$r.error("Failed to update individual", e);
42280
42476
  if (isValidationError(e)) {
42281
42477
  const validationErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
42282
42478
  setProblems({ ...problems, validationErrors });
@@ -42417,7 +42613,7 @@ function IndividualDropin({
42417
42613
  return /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
42418
42614
  FormWrapper,
42419
42615
  {
42420
- taskName: taskName2 ?? "individualDetails",
42616
+ taskName: taskName ?? "individualDetails",
42421
42617
  activeForm,
42422
42618
  summary: {
42423
42619
  data: formatDataForSummary2(),
@@ -42471,7 +42667,7 @@ function IndividualDropin({
42471
42667
  }
42472
42668
  ) });
42473
42669
  }
42474
- const logger$r = createLogger("CreateIndividualComponent");
42670
+ const logger$q = createLogger("CreateIndividualComponent");
42475
42671
  function CreateIndividualComponent({
42476
42672
  parentLegalEntityId,
42477
42673
  legalEntityId,
@@ -42522,11 +42718,11 @@ function CreateIndividualComponent({
42522
42718
  setParentLegalEntity(parentEntity);
42523
42719
  setLegalEntity(entity);
42524
42720
  } catch (error) {
42525
- logger$r.error(error);
42721
+ logger$q.error(error);
42526
42722
  }
42527
42723
  }, [parentLegalEntityId, legalEntityId, getLegalEntity2]);
42528
42724
  useEffect(() => {
42529
- fetchLegalEntity().catch(logger$r.error).finally(() => {
42725
+ fetchLegalEntity().catch(logger$q.error).finally(() => {
42530
42726
  setIsLoading(false);
42531
42727
  });
42532
42728
  }, [fetchLegalEntity]);
@@ -42546,7 +42742,7 @@ function CreateIndividualComponent({
42546
42742
  setIsAddressEnabled(res.statuses.address.enabled);
42547
42743
  }, [country, getProviderStatus2]);
42548
42744
  useEffect(() => {
42549
- fetchProviderStatus().catch(logger$r.error);
42745
+ fetchProviderStatus().catch(logger$q.error);
42550
42746
  }, [fetchProviderStatus]);
42551
42747
  return isLoading || !legalEntity ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsx(
42552
42748
  IndividualDropin,
@@ -42571,7 +42767,7 @@ function CreateIndividualComponent({
42571
42767
  }
42572
42768
  );
42573
42769
  }
42574
- const logger$q = createLogger("useAssociatedLegalArrangement");
42770
+ const logger$p = createLogger("useAssociatedLegalArrangement");
42575
42771
  function useAssociatedLegalArrangement({
42576
42772
  rootLegalEntity,
42577
42773
  getLegalEntity: getLegalEntity2
@@ -42587,7 +42783,7 @@ function useAssociatedLegalArrangement({
42587
42783
  (entity) => entity.type === LegalEntityType.SOLE_PROPRIETORSHIP || entity.type === LegalEntityType.TRUST || entity.type === LegalEntityType.UNINCORPORATED_PARTNERSHIP
42588
42784
  );
42589
42785
  if (foundEntity == null ? void 0 : foundEntity.legalEntityId) {
42590
- getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$q.error);
42786
+ getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$p.error);
42591
42787
  }
42592
42788
  }, [getAssociatedEntity, rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations]);
42593
42789
  useEffect(() => {
@@ -42601,7 +42797,7 @@ function useAssociatedLegalArrangement({
42601
42797
  refreshAssociatedLegalArrangement
42602
42798
  };
42603
42799
  }
42604
- const logger$p = createLogger("CreateTransferInstrumentComponent");
42800
+ const logger$o = createLogger("CreateTransferInstrumentComponent");
42605
42801
  function CreateTransferInstrumentComponent({
42606
42802
  legalEntityId,
42607
42803
  transferInstrumentId,
@@ -42641,7 +42837,7 @@ function CreateTransferInstrumentComponent({
42641
42837
  try {
42642
42838
  if (currentTransferInstrumentId) return getTransferInstrument2(currentTransferInstrumentId);
42643
42839
  } catch (e) {
42644
- logger$p.error(e);
42840
+ logger$o.error(e);
42645
42841
  }
42646
42842
  },
42647
42843
  enabled: !!currentTransferInstrumentId
@@ -42723,7 +42919,7 @@ const tagOrange = "adyen-kyc-tag-orange";
42723
42919
  const tagRed = "adyen-kyc-tag-red";
42724
42920
  const tagTeal = "adyen-kyc-tag-teal";
42725
42921
  const tagGreen = "adyen-kyc-tag-green";
42726
- const styles$c = {
42922
+ const styles$a = {
42727
42923
  tag,
42728
42924
  tagGrey,
42729
42925
  tagBlue,
@@ -42733,15 +42929,15 @@ const styles$c = {
42733
42929
  tagGreen
42734
42930
  };
42735
42931
  const variantMap = {
42736
- grey: styles$c.tagGrey,
42737
- teal: styles$c.tagTeal,
42738
- red: styles$c.tagRed,
42739
- green: styles$c.tagGreen,
42740
- orange: styles$c.tagOrange,
42741
- blue: styles$c.tagBlue
42932
+ grey: styles$a.tagGrey,
42933
+ teal: styles$a.tagTeal,
42934
+ red: styles$a.tagRed,
42935
+ green: styles$a.tagGreen,
42936
+ orange: styles$a.tagOrange,
42937
+ blue: styles$a.tagBlue
42742
42938
  };
42743
42939
  const Tag = ({ className: className2, variant = "blue", children: children2 }) => {
42744
- return /* @__PURE__ */ jsx("span", { className: cx(styles$c.tag, variantMap[variant], className2), children: children2 });
42940
+ return /* @__PURE__ */ jsx("span", { className: cx(styles$a.tag, variantMap[variant], className2), children: children2 });
42745
42941
  };
42746
42942
  const embeddedStatus = "adyen-kyc-embedded-status";
42747
42943
  const embeddedStatusLoading = "adyen-kyc-embedded-status-loading";
@@ -42749,7 +42945,7 @@ const embeddedStatusAvatar = "adyen-kyc-embedded-status-avatar";
42749
42945
  const embeddedStatusLight = "adyen-kyc-embedded-status-light";
42750
42946
  const embeddedStatusActionIndicator = "adyen-kyc-embedded-status-action-indicator";
42751
42947
  const embeddedStatusInfo = "adyen-kyc-embedded-status-info";
42752
- const styles$b = {
42948
+ const styles$9 = {
42753
42949
  embeddedStatus,
42754
42950
  embeddedStatusLoading,
42755
42951
  embeddedStatusAvatar,
@@ -42799,22 +42995,22 @@ const EmbeddedStatus = ({
42799
42995
  "button",
42800
42996
  {
42801
42997
  type: "button",
42802
- className: cx(className2, styles$b.embeddedStatus, "adyen-kyc-externalComponent", {
42803
- [styles$b.embeddedStatusLoading]: loading,
42804
- [styles$b.embeddedStatusLight]: light
42998
+ className: cx(className2, styles$9.embeddedStatus, "adyen-kyc-externalComponent", {
42999
+ [styles$9.embeddedStatusLoading]: loading,
43000
+ [styles$9.embeddedStatusLight]: light
42805
43001
  }),
42806
43002
  onClick,
42807
43003
  ...props,
42808
43004
  children: [
42809
- /* @__PURE__ */ jsx("section", { className: styles$b.embeddedStatusAvatar, children: loading ? /* @__PURE__ */ jsx(Skeleton, { height: "100%", width: "100%", circle: true }) : /* @__PURE__ */ jsx(Icon, { className: styles$b.embeddedStatusIcon, name: iconName }) }),
42810
- /* @__PURE__ */ jsx("section", { className: styles$b.embeddedStatusInfo, children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
43005
+ /* @__PURE__ */ jsx("section", { className: styles$9.embeddedStatusAvatar, children: loading ? /* @__PURE__ */ jsx(Skeleton, { height: "100%", width: "100%", circle: true }) : /* @__PURE__ */ jsx(Icon, { className: styles$9.embeddedStatusIcon, name: iconName }) }),
43006
+ /* @__PURE__ */ jsx("section", { className: styles$9.embeddedStatusInfo, children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
42811
43007
  /* @__PURE__ */ jsx(Skeleton, { text: true, width: "20ch", height: "1em" }),
42812
43008
  /* @__PURE__ */ jsx(Skeleton, { text: true, width: "90%", height: "1em" })
42813
43009
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
42814
43010
  /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: title }),
42815
43011
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: subtitle })
42816
43012
  ] }) }),
42817
- actionIndicator ? /* @__PURE__ */ jsx("section", { className: styles$b.embeddedStatusButton, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "5em", height: "2em" }) : /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", className: styles$b.embeddedStatusActionIndicator, children: i18n.get(actionIndicator.labelKey) }) }) : (statusTag == null ? void 0 : statusTag.translationKey) && /* @__PURE__ */ jsx("section", { className: styles$b.embeddedStatusTag, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "8ch", height: "1em" }) : /* @__PURE__ */ jsx(Tag, { variant: statusTag.variant, children: i18n.get(statusTag.translationKey) }) })
43013
+ actionIndicator ? /* @__PURE__ */ jsx("section", { className: styles$9.embeddedStatusButton, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "5em", height: "2em" }) : /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", className: styles$9.embeddedStatusActionIndicator, children: i18n.get(actionIndicator.labelKey) }) }) : (statusTag == null ? void 0 : statusTag.translationKey) && /* @__PURE__ */ jsx("section", { className: styles$9.embeddedStatusTag, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "8ch", height: "1em" }) : /* @__PURE__ */ jsx(Tag, { variant: statusTag.variant, children: i18n.get(statusTag.translationKey) }) })
42818
43014
  ]
42819
43015
  }
42820
43016
  );
@@ -43199,7 +43395,7 @@ function ManageTransferInstrumentOverviewItem({
43199
43395
  )
43200
43396
  ] });
43201
43397
  }
43202
- const logger$o = createLogger("ManageTransferInstrumentOverview");
43398
+ const logger$n = createLogger("ManageTransferInstrumentOverview");
43203
43399
  function ManageTransferInstrumentOverview({
43204
43400
  transferInstrumentReferences,
43205
43401
  legalEntityId,
@@ -43218,7 +43414,7 @@ function ManageTransferInstrumentOverview({
43218
43414
  const ti = await getTransferInstrument2(transferInstrumentId);
43219
43415
  setTransferInstrumentsMap({ [transferInstrumentId]: ti, ...transferInstrumentsMap });
43220
43416
  } catch (e) {
43221
- logger$o.error(e);
43417
+ logger$n.error(e);
43222
43418
  }
43223
43419
  };
43224
43420
  const onRemoveTransferInstrument = async (transferInstrumentId) => {
@@ -43227,7 +43423,7 @@ function ManageTransferInstrumentOverview({
43227
43423
  onRemove(transferInstrumentId);
43228
43424
  } catch (e) {
43229
43425
  showToast({ label: i18n.get("thereWasAnErrorTryAgain"), type: "error" });
43230
- logger$o.error(e);
43426
+ logger$n.error(e);
43231
43427
  }
43232
43428
  };
43233
43429
  const transferInstrumentListEle = transferInstrumentReferences.map((transferInstrumentRef) => /* @__PURE__ */ jsx(
@@ -43256,7 +43452,7 @@ function ManageTransferInstrumentOverview({
43256
43452
  )
43257
43453
  ] });
43258
43454
  }
43259
- const logger$n = createLogger("ManageTransferInstrumentComponent");
43455
+ const logger$m = createLogger("ManageTransferInstrumentComponent");
43260
43456
  function ManageTransferInstrumentComponent({
43261
43457
  legalEntityId,
43262
43458
  onAdd,
@@ -43282,7 +43478,7 @@ function ManageTransferInstrumentComponent({
43282
43478
  setTransferInstruments(transferInstrumentRefs);
43283
43479
  }, [getTransferInstruments2]);
43284
43480
  useEffect(() => {
43285
- init2().catch(logger$n.error).finally(() => {
43481
+ init2().catch(logger$m.error).finally(() => {
43286
43482
  setLoadingStatus("success");
43287
43483
  });
43288
43484
  }, [init2]);
@@ -43292,7 +43488,7 @@ function ManageTransferInstrumentComponent({
43292
43488
  }
43293
43489
  }, [hasOnlyVerifiedTransferInstruments, timeoutId, transferInstruments]);
43294
43490
  const onRemove = (transferInstrumentId) => {
43295
- refreshTransferInstruments().catch(logger$n.error);
43491
+ refreshTransferInstruments().catch(logger$m.error);
43296
43492
  onRemoveSuccess == null ? void 0 : onRemoveSuccess(transferInstrumentId, legalEntityId);
43297
43493
  };
43298
43494
  const render2 = () => {
@@ -43321,7 +43517,7 @@ function ManageTransferInstrumentComponent({
43321
43517
  }
43322
43518
  const IgnoreLocalStorageContext = createContext$1(false);
43323
43519
  const useIgnoreLocalStorage = () => useContext$1(IgnoreLocalStorageContext);
43324
- const logger$m = createLogger("useLocalStorage");
43520
+ const logger$l = createLogger("useLocalStorage");
43325
43521
  const useLocalStorage = (key, defaultValue, options) => {
43326
43522
  const { serializer, parser, syncData } = useMemo(
43327
43523
  () => ({
@@ -43341,7 +43537,7 @@ const useLocalStorage = (key, defaultValue, options) => {
43341
43537
  const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
43342
43538
  return res;
43343
43539
  } catch (err) {
43344
- logger$m.error(err);
43540
+ logger$l.error(err);
43345
43541
  return defaultValue;
43346
43542
  }
43347
43543
  });
@@ -43376,7 +43572,7 @@ const useLocalStorage = (key, defaultValue, options) => {
43376
43572
  try {
43377
43573
  updateLocalStorage();
43378
43574
  } catch (err) {
43379
- logger$m.error(err);
43575
+ logger$l.error(err);
43380
43576
  }
43381
43577
  }, [value, ignoreLocalStorage]);
43382
43578
  useEffect(() => {
@@ -43389,7 +43585,7 @@ const useLocalStorage = (key, defaultValue, options) => {
43389
43585
  setValue(event.newValue ? parser(event.newValue) : void 0);
43390
43586
  }
43391
43587
  } catch (err) {
43392
- logger$m.error(err);
43588
+ logger$l.error(err);
43393
43589
  }
43394
43590
  };
43395
43591
  if (ignoreLocalStorage) return;
@@ -44093,7 +44289,7 @@ const mapCustomerSupportSchemaToCustomerSupportType = (customerSupport) => {
44093
44289
  }
44094
44290
  };
44095
44291
  };
44096
- const logger$l = createLogger("CustomerSupport");
44292
+ const logger$k = createLogger("CustomerSupport");
44097
44293
  function CustomerSupport({
44098
44294
  country,
44099
44295
  onSubmit,
@@ -44166,7 +44362,7 @@ function CustomerSupport({
44166
44362
  });
44167
44363
  } catch {
44168
44364
  const label = i18n.get("failedToUpdateDetails");
44169
- logger$l.error(label, payload);
44365
+ logger$k.error(label, payload);
44170
44366
  showToast({ label, type: "error" });
44171
44367
  }
44172
44368
  };
@@ -45218,9 +45414,19 @@ const getTranslatedLegalInsolvency = (i18n, insolvencyData) => {
45218
45414
  if (!insolvencyData) return void 0;
45219
45415
  return insolvencyData === "noLegalActionsTaken" ? i18n.get("no") : i18n.get(insolvencyData);
45220
45416
  };
45417
+ const getValidUserLocale = (locale) => {
45418
+ try {
45419
+ new Intl.NumberFormat(locale);
45420
+ return locale;
45421
+ } catch (error) {
45422
+ console.warn(`Invalid locale '${locale}' provided. Falling back to 'en-US'.`, error);
45423
+ return "en-US";
45424
+ }
45425
+ };
45221
45426
  const getFormattedAmount = (value, currency) => {
45222
45427
  if (!value) return void 0;
45223
- const formattedValue = Number(value).toLocaleString(USER_LOCALE);
45428
+ const userLocale = getValidUserLocale(USER_LOCALE);
45429
+ const formattedValue = Number(value).toLocaleString(userLocale);
45224
45430
  return `${currency} ${formattedValue}`;
45225
45431
  };
45226
45432
  const formatDataForSummary = (data, i18n, datasetUtils) => {
@@ -45291,7 +45497,7 @@ const canSubmit$1 = (data) => mandatoryApiFields.HIGH_EXPOSURE.every((detail) =>
45291
45497
  const value = getProp(data, detail);
45292
45498
  return !isEmpty$1(value);
45293
45499
  });
45294
- const logger$k = createLogger("LegalFormField");
45500
+ const logger$j = createLogger("LegalFormField");
45295
45501
  function LegalFormField({
45296
45502
  name = "legalForm",
45297
45503
  data,
@@ -45329,7 +45535,7 @@ function LegalFormField({
45329
45535
  }));
45330
45536
  setLegalForms(legalFormsResponse);
45331
45537
  }
45332
- }).catch(() => logger$k.error);
45538
+ }).catch(() => logger$j.error);
45333
45539
  }, [countryCode]);
45334
45540
  return /* @__PURE__ */ jsx(
45335
45541
  Field,
@@ -45355,7 +45561,7 @@ function LegalFormField({
45355
45561
  }
45356
45562
  );
45357
45563
  }
45358
- const logger$j = createLogger("NaceCodeField");
45564
+ const logger$i = createLogger("NaceCodeField");
45359
45565
  function NaceCodeField({
45360
45566
  name = "naceCode",
45361
45567
  data,
@@ -45375,7 +45581,7 @@ function NaceCodeField({
45375
45581
  if (response) {
45376
45582
  setNaceCodes(response);
45377
45583
  }
45378
- }).catch(() => logger$j.error);
45584
+ }).catch(() => logger$i.error);
45379
45585
  }, []);
45380
45586
  const handleChangeForNaceCode = (e) => {
45381
45587
  var _a2;
@@ -45963,6 +46169,7 @@ function HighExposureBasicCompanyInformation({
45963
46169
  )
45964
46170
  ] });
45965
46171
  }
46172
+ const OPTIONAL_ADDRESS_FIELDS = ["otherAddressInformation"];
45966
46173
  function HighExposureRegisteredAddress({
45967
46174
  formUtils,
45968
46175
  valid,
@@ -45971,7 +46178,6 @@ function HighExposureRegisteredAddress({
45971
46178
  handleChangeFor,
45972
46179
  legalEntity,
45973
46180
  sectionHeading,
45974
- country,
45975
46181
  handleAddressSearch,
45976
46182
  handleFindAddress,
45977
46183
  formId,
@@ -45984,13 +46190,18 @@ function HighExposureRegisteredAddress({
45984
46190
  const { parentCompany, ultimateParentCompany } = useGlobalData();
45985
46191
  const data = formId === "parentCompany" ? parentCompany : ultimateParentCompany;
45986
46192
  const addressCountry = (_a2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a2.country;
45987
- const addressSchema = getAddressSchemaForCountry(country).filter((field) => {
45988
- if (country) {
45989
- return !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true;
45990
- }
45991
- return true;
45992
- });
46193
+ const addressSchema = useMemo(() => {
46194
+ return getAddressSchemaForCountry(addressCountry).filter((field) => {
46195
+ if (addressCountry) {
46196
+ return !COUNTRIES_WITH_STATES_DATASET.includes(addressCountry) ? field !== "stateOrProvince" : true;
46197
+ }
46198
+ return true;
46199
+ });
46200
+ }, [addressCountry]);
45993
46201
  const handleRegistrationAddressChange = (state) => {
46202
+ if (!state.data.country) {
46203
+ state.data.country = addressCountry;
46204
+ }
45994
46205
  handleChangeFor("registrationAddress")(state.data);
45995
46206
  if (setValid) {
45996
46207
  setValid("registrationAddress", Boolean(state.isValid));
@@ -46049,7 +46260,7 @@ function HighExposureRegisteredAddress({
46049
46260
  labels: addressCountry ? getAddressSchemaLabelsByCountry(addressCountry) : void 0,
46050
46261
  countryCode: addressCountry,
46051
46262
  requiredFields: addressSchema,
46052
- optionalFields: ["otherAddressInformation"],
46263
+ optionalFields: OPTIONAL_ADDRESS_FIELDS,
46053
46264
  onChange: handleRegistrationAddressChange,
46054
46265
  handleAddressSearch,
46055
46266
  handleFindAddress,
@@ -46060,7 +46271,7 @@ function HighExposureRegisteredAddress({
46060
46271
  }
46061
46272
  const parentCompanyFormId$1 = highExposureForms.parentCompany.formId;
46062
46273
  function AdditionalFieldsForHighExposureParentCompany(props) {
46063
- var _a2, _b2;
46274
+ var _a2;
46064
46275
  const {
46065
46276
  shouldValidate,
46066
46277
  data: highExposureParentCompanyDetailsData,
@@ -46127,7 +46338,6 @@ function AdditionalFieldsForHighExposureParentCompany(props) {
46127
46338
  {
46128
46339
  ...props,
46129
46340
  formId: parentCompanyFormId$1,
46130
- country: (_a2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a2.country,
46131
46341
  handleChangeFor: highExposureHandleChangeFor,
46132
46342
  sectionHeading: "registeredAddress",
46133
46343
  errors,
@@ -46158,7 +46368,7 @@ function AdditionalFieldsForHighExposureParentCompany(props) {
46158
46368
  targetPage: HighExposurePagesEnums.PARENT_COMPANY_PAGE
46159
46369
  }
46160
46370
  ),
46161
- isEeaCountry((_b2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _b2.country) && /* @__PURE__ */ jsx(
46371
+ isEeaCountry((_a2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a2.country) && /* @__PURE__ */ jsx(
46162
46372
  HighExposureFinancialInformation,
46163
46373
  {
46164
46374
  ...props,
@@ -46259,7 +46469,6 @@ function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
46259
46469
  {
46260
46470
  ...props,
46261
46471
  formId: ultimateParentCompanyFormId$1,
46262
- country,
46263
46472
  handleChangeFor: highExposureHandleChangeFor,
46264
46473
  sectionHeading: "registeredAddress",
46265
46474
  errors,
@@ -46344,9 +46553,8 @@ function HighExposureDropin(props) {
46344
46553
  isStandaloneComponent,
46345
46554
  handleHomeClick
46346
46555
  } = props;
46347
- const dataFromResponse = {};
46348
- const [defaultData, setDefaultData] = useState(dataFromResponse);
46349
- const [data, setData] = useState(dataFromResponse);
46556
+ const [defaultData, setDefaultData] = useState({});
46557
+ const [data, setData] = useState({});
46350
46558
  useRef(null);
46351
46559
  const logger2 = createLogger("UpdateLegalEntityForHighExposure");
46352
46560
  const fetchParentEntity = async (rootEntity, associationType) => {
@@ -46362,6 +46570,7 @@ function HighExposureDropin(props) {
46362
46570
  const fetchLegalEntities = useCallback(async () => {
46363
46571
  var _a3;
46364
46572
  try {
46573
+ const dataFromResponse = {};
46365
46574
  dataFromResponse.company = mapLegalEntityToHighExposure(
46366
46575
  rootLegalEntity
46367
46576
  );
@@ -46370,36 +46579,48 @@ function HighExposureDropin(props) {
46370
46579
  dataFromResponse.company
46371
46580
  );
46372
46581
  if ((_a3 = rootLegalEntity.entityAssociations) == null ? void 0 : _a3.length) {
46582
+ const hasParentEntity = rootLegalEntity.entityAssociations.some(
46583
+ (association) => association.type === "immediateParentCompany"
46584
+ );
46585
+ const hasUltimateParentEntity = rootLegalEntity.entityAssociations.some(
46586
+ (association) => association.type === "ultimateParentCompany"
46587
+ );
46373
46588
  try {
46374
- const parentEntity = await fetchParentEntity(rootLegalEntity, "immediateParentCompany");
46375
- if (parentEntity) {
46376
- dataFromResponse.parentCompany = mapLegalEntityToHighExposure(
46377
- parentEntity
46378
- );
46379
- dataFromResponse.parentCompany = appendHighExposureData(
46380
- parentEntity.organization,
46381
- dataFromResponse.parentCompany
46382
- );
46383
- if (dataFromResponse.company) {
46384
- dataFromResponse.company.isCompanyOwnedByAnotherCompany = "Yes";
46589
+ if (hasParentEntity) {
46590
+ const parentEntity = await fetchParentEntity(rootLegalEntity, "immediateParentCompany");
46591
+ if (parentEntity) {
46592
+ dataFromResponse.parentCompany = mapLegalEntityToHighExposure(
46593
+ parentEntity
46594
+ );
46595
+ dataFromResponse.parentCompany = appendHighExposureData(
46596
+ parentEntity.organization,
46597
+ dataFromResponse.parentCompany
46598
+ );
46599
+ if (dataFromResponse.company) {
46600
+ dataFromResponse.company.isCompanyOwnedByAnotherCompany = "Yes";
46601
+ }
46602
+ } else if (dataFromResponse.company) {
46603
+ dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
46385
46604
  }
46386
- } else if (dataFromResponse.company) {
46387
- dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
46388
46605
  }
46389
- const ultimateParentEntity = await fetchParentEntity(
46390
- rootLegalEntity,
46391
- "ultimateParentCompany"
46392
- );
46393
- if (ultimateParentEntity) {
46394
- dataFromResponse.ultimateParentCompany = mapLegalEntityToHighExposure(
46395
- ultimateParentEntity
46396
- );
46397
- dataFromResponse.ultimateParentCompany = appendHighExposureData(
46398
- ultimateParentEntity.organization,
46399
- dataFromResponse.ultimateParentCompany
46606
+ if (hasUltimateParentEntity) {
46607
+ const ultimateParentEntity = await fetchParentEntity(
46608
+ rootLegalEntity,
46609
+ "ultimateParentCompany"
46400
46610
  );
46401
- if (dataFromResponse.company) {
46402
- dataFromResponse.company.isParentOwnedByAnotherCompany = "Yes";
46611
+ if (ultimateParentEntity) {
46612
+ dataFromResponse.ultimateParentCompany = mapLegalEntityToHighExposure(
46613
+ ultimateParentEntity
46614
+ );
46615
+ dataFromResponse.ultimateParentCompany = appendHighExposureData(
46616
+ ultimateParentEntity.organization,
46617
+ dataFromResponse.ultimateParentCompany
46618
+ );
46619
+ if (dataFromResponse.company) {
46620
+ dataFromResponse.company.isParentOwnedByAnotherCompany = "Yes";
46621
+ }
46622
+ } else if (dataFromResponse.company) {
46623
+ dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
46403
46624
  }
46404
46625
  } else if (dataFromResponse.company) {
46405
46626
  dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
@@ -46786,7 +47007,8 @@ const additionalPersonalDetailsValidators = ({
46786
47007
  idNumberExempt,
46787
47008
  idNumber,
46788
47009
  existingIdNumber,
46789
- formVerificationErrors
47010
+ formVerificationErrors,
47011
+ i18n
46790
47012
  }) => ({
46791
47013
  birthDate: (() => {
46792
47014
  const baseValidators = [
@@ -46824,7 +47046,16 @@ const additionalPersonalDetailsValidators = ({
46824
47046
  defaultFieldMetadata$1
46825
47047
  )) == null ? void 0 : _a2.validators;
46826
47048
  })(),
46827
- ...nomineeDecisionMakerRoleValidationRules
47049
+ ...nomineeDecisionMakerRoleValidationRules,
47050
+ ...addressValidators({
47051
+ isExperimentEnabled,
47052
+ country,
47053
+ i18n,
47054
+ addressType: "residentialAddress"
47055
+ })
47056
+ });
47057
+ const basicDetailsValidators = () => ({
47058
+ ...contactDetailsValidationRules
46828
47059
  });
46829
47060
  const REQUIRED = "REQUIRED";
46830
47061
  const ID_NUMBER_EXEMPT_COUNTRIES = [
@@ -46847,6 +47078,15 @@ const DECISION_MAKER_TYPES_WITH_JOBTITLE = [
46847
47078
  DecisionMakerType.SIGNATORY,
46848
47079
  DecisionMakerType.CONTROLLING_PERSON
46849
47080
  ];
47081
+ const COUNTRIES_WITH_FIRST_ATTEMPT_ID_DOCUMENT_EXCEPTION = [
47082
+ CountryCodes.UnitedStates,
47083
+ CountryCodes.UnitedKingdom,
47084
+ CountryCodes.Austria,
47085
+ CountryCodes.Denmark,
47086
+ CountryCodes.Germany,
47087
+ CountryCodes.Italy,
47088
+ CountryCodes.Norway
47089
+ ];
46850
47090
  const IndividualOnfidoRules = ({
46851
47091
  data,
46852
47092
  country,
@@ -46888,12 +47128,9 @@ const IndividualOnfidoRules = ({
46888
47128
  return REQUIRED;
46889
47129
  }
46890
47130
  },
46891
- idDocumentIfIdNumberExempted: () => {
46892
- return REQUIRED;
46893
- },
46894
47131
  idFrontPageIfManualUpload: () => {
46895
- var _a2, _b2, _c2;
46896
- if (((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification" && !!((_c2 = (_b2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _b2.idDocument) == null ? void 0 : _c2.idDocumentType)) {
47132
+ var _a2, _b2;
47133
+ if (((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification" && Boolean((_b2 = data == null ? void 0 : data.manualIdUpload) == null ? void 0 : _b2.idDocumentType)) {
46897
47134
  return REQUIRED;
46898
47135
  }
46899
47136
  },
@@ -46901,8 +47138,8 @@ const IndividualOnfidoRules = ({
46901
47138
  var _a2;
46902
47139
  const idDocumentOption = idDocumentTypeOptions.find(
46903
47140
  ({ id }) => {
46904
- var _a3, _b2;
46905
- return id === ((_b2 = (_a3 = data.idVerificationMethod) == null ? void 0 : _a3.idDocument) == null ? void 0 : _b2.idDocumentType);
47141
+ var _a3;
47142
+ return id === ((_a3 = data.manualIdUpload) == null ? void 0 : _a3.idDocumentType);
46906
47143
  }
46907
47144
  );
46908
47145
  if (((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification" && (idDocumentOption == null ? void 0 : idDocumentOption.hasBackPage)) {
@@ -46968,6 +47205,17 @@ const IndividualOnfidoRules = ({
46968
47205
  isUsingInstantVerification: () => {
46969
47206
  var _a2;
46970
47207
  return ((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "instantVerification" ? REQUIRED : void 0;
47208
+ },
47209
+ manualIdDocumentRequired: () => {
47210
+ var _a2, _b2;
47211
+ const isManualFlow = ((_a2 = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _a2.idVerificationMethod) === "manualVerification";
47212
+ if (!isManualFlow) return void 0;
47213
+ const country2 = (_b2 = data.additionalPersonalDetails) == null ? void 0 : _b2.country;
47214
+ if (!country2) return REQUIRED;
47215
+ return COUNTRIES_WITH_FIRST_ATTEMPT_ID_DOCUMENT_EXCEPTION.includes(country2) ? void 0 : REQUIRED;
47216
+ },
47217
+ idVerificationRequired: () => {
47218
+ return REQUIRED;
46971
47219
  }
46972
47220
  });
46973
47221
  const TypeOfIdentity = ({
@@ -47248,7 +47496,6 @@ const additionalIdentityInfoFields = [
47248
47496
  "issuerState",
47249
47497
  "expiryDate"
47250
47498
  ];
47251
- const ADDITIONAL_PERSONAL_DETAILS_FORM_ID = "additionalPersonalDetails";
47252
47499
  const additionalPersonalDetailsFields = [
47253
47500
  "birthDate",
47254
47501
  ...idNumberFields,
@@ -47280,12 +47527,6 @@ function AdditionalPersonalDetails(props) {
47280
47527
  } = props;
47281
47528
  const country = (data == null ? void 0 : data.country) ?? defaultCountry;
47282
47529
  const isIndividual = taskType === TaskTypes.INDIVIDUAL;
47283
- const addressSchema = useMemo(
47284
- () => getAddressSchemaForCountry(country).filter(
47285
- (field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
47286
- ),
47287
- [country]
47288
- );
47289
47530
  const handleFieldChange = useCallback(
47290
47531
  (fieldName, mode = "input") => handleChangeFor(fieldName, "additionalPersonalDetails", mode),
47291
47532
  [handleChangeFor]
@@ -47296,6 +47537,7 @@ function AdditionalPersonalDetails(props) {
47296
47537
  errors,
47297
47538
  fieldValidationErrors
47298
47539
  );
47540
+ const addressProps = getFieldProps(props, addressFields);
47299
47541
  return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__personal-details", "aria-describedby": "ariaErrorField", children: [
47300
47542
  /* @__PURE__ */ jsx(FormHeader, { heading }),
47301
47543
  /* @__PURE__ */ jsx(
@@ -47329,15 +47571,13 @@ function AdditionalPersonalDetails(props) {
47329
47571
  /* @__PURE__ */ jsx(
47330
47572
  Address,
47331
47573
  {
47332
- id: ADDITIONAL_PERSONAL_DETAILS_FORM_ID,
47574
+ ...addressProps,
47333
47575
  addressType: "residentialAddress",
47334
- data,
47335
47576
  errors,
47336
47577
  valid,
47337
47578
  fieldValidationErrors,
47338
47579
  hideCountry: true,
47339
47580
  labels: getAddressSchemaLabelsByCountry(country),
47340
- requiredFields: addressSchema,
47341
47581
  shouldValidate,
47342
47582
  optionalFields: ["otherAddressInformation"],
47343
47583
  handleFieldChange,
@@ -47593,7 +47833,7 @@ const listToRecord = (list2, getValue) => list2.reduce(
47593
47833
  const conflictRowTable = "adyen-kyc-conflict-row-table";
47594
47834
  const conflictRowList = "adyen-kyc-conflict-row-list";
47595
47835
  const conflictRowListOptionLabel = "adyen-kyc-conflict-row-list-option-label";
47596
- const styles$a = {
47836
+ const styles$8 = {
47597
47837
  conflictRowTable,
47598
47838
  conflictRowList,
47599
47839
  conflictRowListOptionLabel
@@ -47619,7 +47859,7 @@ const ConflictRow = ({
47619
47859
  }
47620
47860
  }, [hasOnlyProvided, hasOnlyDetected, onSelect, selected]);
47621
47861
  if (hasOnlyProvided || hasOnlyDetected) return;
47622
- return showAs === "listItem" ? /* @__PURE__ */ jsxs("div", { className: styles$a.conflictRowList, children: [
47862
+ return showAs === "listItem" ? /* @__PURE__ */ jsxs("div", { className: styles$8.conflictRowList, children: [
47623
47863
  /* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: i18n.get(label) }) }),
47624
47864
  /* @__PURE__ */ jsxs("dd", { children: [
47625
47865
  /* @__PURE__ */ jsxs("div", { children: [
@@ -47628,7 +47868,7 @@ const ConflictRow = ({
47628
47868
  {
47629
47869
  variant: "caption",
47630
47870
  color: "tertiary",
47631
- className: styles$a.conflictRowListOptionLabel,
47871
+ className: styles$8.conflictRowListOptionLabel,
47632
47872
  children: i18n.get("original")
47633
47873
  }
47634
47874
  ),
@@ -47648,7 +47888,7 @@ const ConflictRow = ({
47648
47888
  {
47649
47889
  variant: "caption",
47650
47890
  color: "tertiary",
47651
- className: styles$a.conflictRowListOptionLabel,
47891
+ className: styles$8.conflictRowListOptionLabel,
47652
47892
  children: i18n.get("detected")
47653
47893
  }
47654
47894
  ),
@@ -47663,7 +47903,7 @@ const ConflictRow = ({
47663
47903
  )
47664
47904
  ] })
47665
47905
  ] })
47666
- ] }) : /* @__PURE__ */ jsxs("tr", { className: styles$a.conflictRowTable, children: [
47906
+ ] }) : /* @__PURE__ */ jsxs("tr", { className: styles$8.conflictRowTable, children: [
47667
47907
  /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: i18n.get(label) }) }),
47668
47908
  /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
47669
47909
  RadioWithLabel,
@@ -47689,7 +47929,7 @@ const dataConflictsWrapper = "adyen-kyc-data-conflicts-wrapper";
47689
47929
  const dataConflictsHeader = "adyen-kyc-data-conflicts-header";
47690
47930
  const dataConflictsTable = "adyen-kyc-data-conflicts-table";
47691
47931
  const dataConflictsList = "adyen-kyc-data-conflicts-list";
47692
- const styles$9 = {
47932
+ const styles$7 = {
47693
47933
  dataConflictsWrapper,
47694
47934
  dataConflictsHeader,
47695
47935
  dataConflictsTable,
@@ -47740,13 +47980,13 @@ const DataConflictsModal = ({
47740
47980
  size: "medium",
47741
47981
  onClose: () => setShowCancelModal(true),
47742
47982
  children: [
47743
- /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$9.dataConflictsWrapper, children: [
47744
- /* @__PURE__ */ jsxs("div", { className: styles$9.dataConflictsHeader, children: [
47983
+ /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$7.dataConflictsWrapper, children: [
47984
+ /* @__PURE__ */ jsxs("div", { className: styles$7.dataConflictsHeader, children: [
47745
47985
  /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h1", children: i18n.get(title) }),
47746
47986
  /* @__PURE__ */ jsx(Typography, { variant: "body", children: i18n.get(explanation) })
47747
47987
  ] }),
47748
47988
  showError ? /* @__PURE__ */ jsx(Alert, { variant: "error", title: i18n.get("chooseTheCorrectDetailsBeforeProceeding") }) : void 0,
47749
- /* @__PURE__ */ jsx("dl", { className: styles$9.dataConflictsList, children: keysOf(conflictItems).map((property) => /* @__PURE__ */ jsx(
47989
+ /* @__PURE__ */ jsx("dl", { className: styles$7.dataConflictsList, children: keysOf(conflictItems).map((property) => /* @__PURE__ */ jsx(
47750
47990
  ConflictRow,
47751
47991
  {
47752
47992
  showAs: "listItem",
@@ -47759,7 +47999,7 @@ const DataConflictsModal = ({
47759
47999
  },
47760
48000
  property
47761
48001
  )) }),
47762
- /* @__PURE__ */ jsxs("table", { className: styles$9.dataConflictsTable, children: [
48002
+ /* @__PURE__ */ jsxs("table", { className: styles$7.dataConflictsTable, children: [
47763
48003
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
47764
48004
  /* @__PURE__ */ jsx("th", {}),
47765
48005
  /* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("original") }) }),
@@ -47852,12 +48092,12 @@ const formatId = (id, i18n) => {
47852
48092
  }
47853
48093
  };
47854
48094
  const verificationDisclaimer = "adyen-kyc-verification-disclaimer";
47855
- const styles$8 = {
48095
+ const styles$6 = {
47856
48096
  verificationDisclaimer
47857
48097
  };
47858
48098
  const IdVerificationDisclaimer = () => {
47859
48099
  const { i18n } = useI18nContext();
47860
- return /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "tertiary", className: styles$8.verificationDisclaimer, children: [
48100
+ return /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "tertiary", className: styles$6.verificationDisclaimer, children: [
47861
48101
  i18n.get("ifYouChooseToUseOnfido"),
47862
48102
  " ",
47863
48103
  /* @__PURE__ */ jsx(Link, { href: "https://onfido.com/privacy/", external: true, inline: true, children: i18n.get("onfidoPrivacyPolicy") }),
@@ -47870,25 +48110,25 @@ const IdVerificationDisclaimer = () => {
47870
48110
  const verificationHeader = "adyen-kyc-verification-header";
47871
48111
  const verificationHeaderImage = "adyen-kyc-verification-header-image";
47872
48112
  const verificationHeaderContent = "adyen-kyc-verification-header-content";
47873
- const styles$7 = {
48113
+ const styles$5 = {
47874
48114
  verificationHeader,
47875
48115
  verificationHeaderImage,
47876
48116
  verificationHeaderContent
47877
48117
  };
47878
48118
  const IdVerificationHeader = () => {
47879
48119
  const { i18n } = useI18nContext();
47880
- return /* @__PURE__ */ jsxs("div", { className: styles$7.verificationHeader, children: [
48120
+ return /* @__PURE__ */ jsxs("div", { className: styles$5.verificationHeader, children: [
47881
48121
  /* @__PURE__ */ jsx(
47882
48122
  Svg,
47883
48123
  {
47884
- className: styles$7.verificationHeaderImage,
48124
+ className: styles$5.verificationHeaderImage,
47885
48125
  type: "image",
47886
48126
  name: "passport-front-green",
47887
48127
  title: i18n.get("instantIDVerificationDescription")
47888
48128
  }
47889
48129
  ),
47890
48130
  /* @__PURE__ */ jsx(Typography, { variant: "title-l", children: i18n.get("identityVerification") }),
47891
- /* @__PURE__ */ jsxs(Typography, { variant: "body", color: "primary", className: styles$7.verificationHeaderContent, children: [
48131
+ /* @__PURE__ */ jsxs(Typography, { variant: "body", color: "primary", className: styles$5.verificationHeaderContent, children: [
47892
48132
  i18n.get("takeOrUploadAPhoto"),
47893
48133
  " ",
47894
48134
  /* @__PURE__ */ jsx(Link, { href: "https://onfido.com", external: true, inline: true, children: i18n.get("onfido") })
@@ -47897,7 +48137,7 @@ const IdVerificationHeader = () => {
47897
48137
  };
47898
48138
  const verifyOnfidoContainer = "adyen-kyc-verify-onfido-container";
47899
48139
  const verifyOnfidoContent = "adyen-kyc-verify-onfido-content";
47900
- const styles$6 = {
48140
+ const styles$4 = {
47901
48141
  verifyOnfidoContainer,
47902
48142
  verifyOnfidoContent
47903
48143
  };
@@ -47955,7 +48195,7 @@ const fromIndividualOnfidoConflictSchema = ({
47955
48195
  ...address
47956
48196
  }
47957
48197
  });
47958
- const logger$i = createLogger("mapExtractionResultToSchema");
48198
+ const logger$h = createLogger("mapExtractionResultToSchema");
47959
48199
  const mapExtractionResultToSchema = (result) => {
47960
48200
  const {
47961
48201
  firstName,
@@ -48002,7 +48242,7 @@ const mapExtractionResultToSchema = (result) => {
48002
48242
  schema.additionalPersonalDetails.idNumber = documentNumber;
48003
48243
  break;
48004
48244
  default:
48005
- logger$i.warn(`document type "${documentType}" not recognised`);
48245
+ logger$h.warn(`document type "${documentType}" not recognised`);
48006
48246
  break;
48007
48247
  }
48008
48248
  }
@@ -48041,12 +48281,12 @@ const OnfidoVerificationModal = ({
48041
48281
  }
48042
48282
  ) }) });
48043
48283
  const uploadedDocument = "adyen-kyc-uploaded-document";
48044
- const styles$5 = {
48284
+ const styles$3 = {
48045
48285
  uploadedDocument
48046
48286
  };
48047
48287
  const UploadedDocument = ({ document: document2, onDelete, onUpdate }) => {
48048
48288
  const { i18n } = useI18nContext();
48049
- return /* @__PURE__ */ jsxs("article", { className: styles$5.uploadedDocument, children: [
48289
+ return /* @__PURE__ */ jsxs("article", { className: styles$3.uploadedDocument, children: [
48050
48290
  /* @__PURE__ */ jsxs("div", { children: [
48051
48291
  /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "title", children: i18n.get(document2.idDocumentType) }),
48052
48292
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("uploadedOn", {
@@ -48070,7 +48310,7 @@ const UploadedDocument = ({ document: document2, onDelete, onUpdate }) => {
48070
48310
  /* @__PURE__ */ jsx(Button, { onClick: onUpdate, variant: "secondary", children: i18n.get("update") })
48071
48311
  ] });
48072
48312
  };
48073
- const logger$h = createLogger("IdVerificationMethod");
48313
+ const logger$g = createLogger("IdVerificationMethod");
48074
48314
  const idVerificationMethodFields = [
48075
48315
  "idVerificationMethod",
48076
48316
  "ocrExtractedData",
@@ -48136,7 +48376,7 @@ function IdVerificationMethod({ legalEntityId, handlers }) {
48136
48376
  }
48137
48377
  };
48138
48378
  const handleOnfidoError = (error2) => {
48139
- logger$h.error("Onfido error", error2);
48379
+ logger$g.error("Onfido error", error2);
48140
48380
  setError("weCouldNotReachOnfido");
48141
48381
  setStatus("ready");
48142
48382
  };
@@ -48164,10 +48404,10 @@ function IdVerificationMethod({ legalEntityId, handlers }) {
48164
48404
  handlers.handleUpdateDocument();
48165
48405
  };
48166
48406
  const datasetUtils = datasetUtilities(i18n.locale);
48167
- return /* @__PURE__ */ jsxs("div", { className: styles$6.verifyOnfidoContainer, children: [
48407
+ return /* @__PURE__ */ jsxs("div", { className: styles$4.verifyOnfidoContainer, children: [
48168
48408
  /* @__PURE__ */ jsx(IdVerificationHeader, {}),
48169
48409
  error ? /* @__PURE__ */ jsx(Alert, { variant: "error", title: i18n.get(error) }) : void 0,
48170
- /* @__PURE__ */ jsx("div", { className: styles$6.verifyOnfidoContent, children: hasExistingDocument ? /* @__PURE__ */ jsx(
48410
+ /* @__PURE__ */ jsx("div", { className: styles$4.verifyOnfidoContent, children: hasExistingDocument ? /* @__PURE__ */ jsx(
48171
48411
  UploadedDocument,
48172
48412
  {
48173
48413
  document: existingDocument,
@@ -48236,7 +48476,27 @@ function IdVerificationMethod({ legalEntityId, handlers }) {
48236
48476
  ) : void 0
48237
48477
  ] });
48238
48478
  }
48239
- const logger$g = createLogger("IndividualOnfido");
48479
+ const ManualIdUpload = () => {
48480
+ var _a2, _b2;
48481
+ const { form } = useFormContext();
48482
+ const { handleChangeFor } = form;
48483
+ const data = form.data.manualIdUpload;
48484
+ const valid = form.valid.manualIdUpload;
48485
+ const errors = form.errors.manualIdUpload;
48486
+ const name = `${(_a2 = form.data.basicDetails) == null ? void 0 : _a2.firstName} ${(_b2 = form.data.basicDetails) == null ? void 0 : _b2.lastName}`;
48487
+ const handleFieldChange = (fieldName, mode) => handleChangeFor(fieldName, "manualIdUpload", mode);
48488
+ return /* @__PURE__ */ jsx(
48489
+ IdDocumentManualUpload,
48490
+ {
48491
+ data,
48492
+ valid,
48493
+ errors,
48494
+ name,
48495
+ handleFieldChange
48496
+ }
48497
+ );
48498
+ };
48499
+ const logger$f = createLogger("IndividualOnfido");
48240
48500
  const individualOnfidoForms = {
48241
48501
  basicDetails: {
48242
48502
  formId: "basicDetails",
@@ -48252,11 +48512,17 @@ const individualOnfidoForms = {
48252
48512
  formId: "additionalPersonalDetails",
48253
48513
  formName: "additionalPersonalDetails",
48254
48514
  fields: additionalPersonalDetailsFields
48515
+ },
48516
+ manualIdUpload: {
48517
+ formId: "manualIdUpload",
48518
+ formName: "idDocument",
48519
+ fields: idDocumentUploadFields
48255
48520
  }
48256
48521
  };
48257
48522
  const basicDetailsFormID = individualOnfidoForms.basicDetails.formId;
48258
48523
  const additionalPersonalDetailsFormID = individualOnfidoForms.additionalPersonalDetails.formId;
48259
48524
  const idVerificationMethodFormID = individualOnfidoForms.idVerificationMethod.formId;
48525
+ const manualIdUploadFormID = individualOnfidoForms.manualIdUpload.formId;
48260
48526
  function IndividualOnfido(props) {
48261
48527
  var _a2, _b2;
48262
48528
  const { i18n } = useI18nContext();
@@ -48291,10 +48557,10 @@ function IndividualOnfido(props) {
48291
48557
  gotoFormByFormId(additionalPersonalDetailsFormID);
48292
48558
  };
48293
48559
  const handleDeleteDocument = () => {
48294
- logger$g.info("handle delete document");
48560
+ logger$f.info("handle delete document");
48295
48561
  };
48296
48562
  const handleUpdateDocument = () => {
48297
- logger$g.info("handle update document");
48563
+ logger$f.info("handle update document");
48298
48564
  };
48299
48565
  useEffect(() => {
48300
48566
  var _a3;
@@ -48306,55 +48572,65 @@ function IndividualOnfido(props) {
48306
48572
  })
48307
48573
  );
48308
48574
  }, [(_b2 = data == null ? void 0 : data.basicDetails) == null ? void 0 : _b2.role, parentLegalEntity == null ? void 0 : parentLegalEntity.capabilities, taskType]);
48309
- const renderActiveForm = (activeForm) => /* @__PURE__ */ jsxs(Fragment, { children: [
48310
- activeForm.formId === basicDetailsFormID && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: /* @__PURE__ */ jsx(
48311
- BasicDetails,
48312
- {
48313
- ...basicDetailsFormProps,
48314
- data: (data == null ? void 0 : data.basicDetails) ?? {},
48315
- heading: i18n.get("basicInformationFormName"),
48316
- taskType,
48317
- id: basicDetailsFormID,
48318
- allowedRoles,
48319
- capabilities,
48320
- country: countryOfResidence,
48321
- parentLegalEntity,
48322
- trustedFieldsProvider,
48323
- trustedRoles,
48324
- errors: errors == null ? void 0 : errors.basicDetails,
48325
- fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.basicDetails,
48326
- valid: valid == null ? void 0 : valid.basicDetails
48327
- }
48328
- ) }),
48329
- activeForm.formId === idVerificationMethodFormID && /* @__PURE__ */ jsx(
48330
- IdVerificationMethod,
48331
- {
48332
- legalEntityId,
48333
- handlers: {
48334
- handleContinueToAdditionalDetails,
48335
- handleDeleteDocument,
48336
- handleUpdateDocument,
48337
- handleGetIdVerificationToken
48338
- }
48339
- }
48340
- ),
48341
- activeForm.formId === additionalPersonalDetailsFormID && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: /* @__PURE__ */ jsx(
48342
- AdditionalPersonalDetails,
48343
- {
48344
- ...additionalPersonalDetailsFormProps,
48345
- country: countryOfResidence,
48346
- data: (data == null ? void 0 : data.additionalPersonalDetails) ?? {},
48347
- heading: i18n.get("additionalPersonalDetails"),
48348
- id: additionalPersonalDetailsFormID,
48349
- errors: errors == null ? void 0 : errors.additionalPersonalDetails,
48350
- fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.additionalPersonalDetails,
48351
- valid: valid == null ? void 0 : valid.additionalPersonalDetails,
48352
- handleAddressSearch,
48353
- handleFindAddress
48354
- }
48355
- ) })
48356
- ] });
48357
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-individual", children: renderActiveForm(propActiveForm) });
48575
+ const renderActiveForm = (activeForm) => {
48576
+ switch (activeForm.formId) {
48577
+ case basicDetailsFormID:
48578
+ return /* @__PURE__ */ jsx(
48579
+ BasicDetails,
48580
+ {
48581
+ ...basicDetailsFormProps,
48582
+ data: (data == null ? void 0 : data.basicDetails) ?? {},
48583
+ heading: i18n.get("basicInformationFormName"),
48584
+ taskType,
48585
+ id: basicDetailsFormID,
48586
+ allowedRoles,
48587
+ capabilities,
48588
+ country: countryOfResidence,
48589
+ parentLegalEntity,
48590
+ trustedFieldsProvider,
48591
+ trustedRoles,
48592
+ errors: errors == null ? void 0 : errors.basicDetails,
48593
+ fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.basicDetails,
48594
+ valid: valid == null ? void 0 : valid.basicDetails
48595
+ }
48596
+ );
48597
+ case idVerificationMethodFormID:
48598
+ return /* @__PURE__ */ jsx(
48599
+ IdVerificationMethod,
48600
+ {
48601
+ legalEntityId,
48602
+ handlers: {
48603
+ handleContinueToAdditionalDetails,
48604
+ handleDeleteDocument,
48605
+ handleUpdateDocument,
48606
+ handleGetIdVerificationToken
48607
+ }
48608
+ }
48609
+ );
48610
+ case additionalPersonalDetailsFormID:
48611
+ return /* @__PURE__ */ jsx(
48612
+ AdditionalPersonalDetails,
48613
+ {
48614
+ ...additionalPersonalDetailsFormProps,
48615
+ country: countryOfResidence,
48616
+ data: (data == null ? void 0 : data.additionalPersonalDetails) ?? {},
48617
+ heading: i18n.get("additionalPersonalDetails"),
48618
+ id: additionalPersonalDetailsFormID,
48619
+ errors: errors == null ? void 0 : errors.additionalPersonalDetails,
48620
+ fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.additionalPersonalDetails,
48621
+ valid: valid == null ? void 0 : valid.additionalPersonalDetails,
48622
+ handleAddressSearch,
48623
+ handleFindAddress,
48624
+ taskType
48625
+ }
48626
+ );
48627
+ case manualIdUploadFormID:
48628
+ return /* @__PURE__ */ jsx(ManualIdUpload, {});
48629
+ default:
48630
+ logger$f.warn(`Active form (${activeForm.formId}) is not supported'`);
48631
+ }
48632
+ };
48633
+ return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-individual", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(propActiveForm) }) });
48358
48634
  }
48359
48635
  const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido) => {
48360
48636
  var _a2, _b2;
@@ -48418,8 +48694,8 @@ const getIndividualSchemaFromAPI = {
48418
48694
  const getAPISchemaFromIndividualSchema = {
48419
48695
  ...reverseObject(individualOnfidoBaseMapping)
48420
48696
  };
48421
- const parseConfiguration$2 = ({ matchingScenario }) => parseIndividualScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.INDIVIDUAL]);
48422
- const logger$f = createLogger("IndividualOnfidoDropin");
48697
+ const parseConfiguration$2 = ({ matchingScenario }) => parseIndividualOnfidoScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.INDIVIDUAL]);
48698
+ const logger$e = createLogger("IndividualOnfidoDropin");
48423
48699
  function IndividualOnfidoDropin({
48424
48700
  handleAddressSearch,
48425
48701
  handleFindAddress,
@@ -48433,7 +48709,7 @@ function IndividualOnfidoDropin({
48433
48709
  taskType = TaskTypes.INDIVIDUAL,
48434
48710
  parentLegalEntity,
48435
48711
  legalEntityResponse,
48436
- taskName: taskName2,
48712
+ taskName,
48437
48713
  handleCloseClick,
48438
48714
  isTargetLegalEntityType,
48439
48715
  country: parentCountry,
@@ -48448,7 +48724,7 @@ function IndividualOnfidoDropin({
48448
48724
  trustedRoles,
48449
48725
  isInstantVerificationEnabled = true
48450
48726
  }) {
48451
- var _a2, _b2, _c2, _d2;
48727
+ var _a2, _b2, _c2, _d2, _e2;
48452
48728
  const { accountHolder, setAccountHolder, idVerificationProviderId } = useCoreContext();
48453
48729
  const { isEmbeddedDropin } = useAuthContext();
48454
48730
  const { i18n } = useI18nContext();
@@ -48470,12 +48746,8 @@ function IndividualOnfidoDropin({
48470
48746
  const [loadingStatus, setLoadingStatus] = useState("success");
48471
48747
  const [existingAttachments, setExistingAttachments] = useState();
48472
48748
  const [documents, setDocuments] = useState();
48473
- const country = useMemo(
48474
- () => {
48475
- var _a3;
48476
- return ((_a3 = dataFromResponse == null ? void 0 : dataFromResponse.additionalPersonalDetails) == null ? void 0 : _a3.country) ?? parentCountry;
48477
- },
48478
- [(_a2 = dataFromResponse == null ? void 0 : dataFromResponse.additionalPersonalDetails) == null ? void 0 : _a2.country, parentCountry]
48749
+ const [country, setCountry] = useState(
48750
+ ((_a2 = dataFromResponse == null ? void 0 : dataFromResponse.additionalPersonalDetails) == null ? void 0 : _a2.country) ?? parentCountry
48479
48751
  );
48480
48752
  const [hideFooter, setHideFooter] = useState(false);
48481
48753
  const [derivedProps, setDerivedProps] = useState();
@@ -48492,8 +48764,9 @@ function IndividualOnfidoDropin({
48492
48764
  }, []);
48493
48765
  const individualFieldValidations = useCallback(
48494
48766
  (data2) => {
48495
- var _a3, _b3, _c3, _d3, _e2, _f2, _g2;
48767
+ var _a3, _b3, _c3, _d3, _e3, _f2;
48496
48768
  return {
48769
+ basicDetails: basicDetailsValidators(),
48497
48770
  additionalPersonalDetails: additionalPersonalDetailsValidators({
48498
48771
  country: ((_a3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _a3.country) ?? country,
48499
48772
  isExperimentEnabled,
@@ -48502,14 +48775,9 @@ function IndividualOnfidoDropin({
48502
48775
  idNumberType: (_b3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _b3.typeOfIdentity,
48503
48776
  idNumberExempt: (_c3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _c3.idNumberExempt,
48504
48777
  idNumber: (_d3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _d3.idNumber,
48505
- existingIdNumber: (_e2 = dataFromResponse.additionalPersonalDetails) == null ? void 0 : _e2.idNumber,
48506
- formVerificationErrors: (_f2 = propProblems == null ? void 0 : propProblems.verificationErrors) == null ? void 0 : _f2.additionalPersonalDetails
48507
- }),
48508
- address: addressValidators({
48509
- isExperimentEnabled,
48510
- country: ((_g2 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _g2.country) ?? country,
48511
- i18n,
48512
- addressType: "residentialAddress"
48778
+ existingIdNumber: (_e3 = dataFromResponse.additionalPersonalDetails) == null ? void 0 : _e3.idNumber,
48779
+ formVerificationErrors: (_f2 = propProblems == null ? void 0 : propProblems.verificationErrors) == null ? void 0 : _f2.additionalPersonalDetails,
48780
+ i18n
48513
48781
  })
48514
48782
  };
48515
48783
  },
@@ -48523,14 +48791,17 @@ function IndividualOnfidoDropin({
48523
48791
  taskType
48524
48792
  ]
48525
48793
  );
48526
- const { verifyIdNumber: verifyIdNumber2 } = useConfigurationApi();
48794
+ const { verifyIdNumber: verifyIdNumber2, validatePhoneNumber: validatePhoneNumber2 } = useConfigurationApi();
48527
48795
  const individualFieldAsyncValidations = useCallback(
48528
48796
  (data2) => ({
48797
+ basicDetails: {
48798
+ phoneNumber: getAsyncPhoneValidationRules(validatePhoneNumber2).phoneNumber
48799
+ },
48529
48800
  additionalPersonalDetails: {
48530
48801
  idNumber: getAsyncIdNumberValidationRule(verifyIdNumber2, data2 == null ? void 0 : data2.additionalPersonalDetails).idNumber
48531
48802
  }
48532
48803
  }),
48533
- [verifyIdNumber2]
48804
+ [verifyIdNumber2, validatePhoneNumber2]
48534
48805
  );
48535
48806
  const defaultData = useMemo(() => {
48536
48807
  if (!documents) return dataFromResponse;
@@ -48550,7 +48821,9 @@ function IndividualOnfidoDropin({
48550
48821
  ...derivedProps == null ? void 0 : derivedProps.requiredFields,
48551
48822
  additionalPersonalDetails: [
48552
48823
  ...((_a3 = derivedProps == null ? void 0 : derivedProps.requiredFields) == null ? void 0 : _a3.additionalPersonalDetails) ?? [],
48553
- ...getAddressSchemaForCountry((_b3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _b3.country)
48824
+ ...getAddressSchemaForCountry((_b3 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _b3.country).filter(
48825
+ (field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
48826
+ )
48554
48827
  ]
48555
48828
  // TODO see why the types aren't working properly
48556
48829
  };
@@ -48566,6 +48839,10 @@ function IndividualOnfidoDropin({
48566
48839
  handleUpdateDocument
48567
48840
  );
48568
48841
  const { data, requiredFields } = form;
48842
+ useEffect(() => {
48843
+ var _a3;
48844
+ setCountry(((_a3 = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _a3.country) ?? parentCountry);
48845
+ }, [(_d2 = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _d2.country, parentCountry]);
48569
48846
  const getConfigurationData = useCallback(
48570
48847
  () => getConfiguration2({
48571
48848
  legalEntityType: LegalEntityType.INDIVIDUAL,
@@ -48695,11 +48972,11 @@ function IndividualOnfidoDropin({
48695
48972
  );
48696
48973
  if (!formattedDocuments || formattedDocuments.length === 0) {
48697
48974
  if (existingAttachments == null ? void 0 : existingAttachments.length)
48698
- logger$f.log(
48975
+ logger$e.log(
48699
48976
  "User has already uploaded documents and is not changing them, nothing needs to be done"
48700
48977
  );
48701
48978
  else
48702
- logger$f.error(
48979
+ logger$e.error(
48703
48980
  `formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
48704
48981
  );
48705
48982
  return;
@@ -48754,7 +49031,7 @@ function IndividualOnfidoDropin({
48754
49031
  clearToasts();
48755
49032
  externalOnSubmit == null ? void 0 : externalOnSubmit(dataSubmitted);
48756
49033
  } catch (e) {
48757
- logger$f.error("Failed to update individual", e);
49034
+ logger$e.error("Failed to update individual", e);
48758
49035
  if (isValidationError(e)) {
48759
49036
  const validationErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
48760
49037
  setProblems({ ...problems, validationErrors });
@@ -48813,7 +49090,7 @@ function IndividualOnfidoDropin({
48813
49090
  return summaryData;
48814
49091
  };
48815
49092
  const summaryOmittedKeys = [
48816
- ...((_d2 = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _d2.idNumberExempt) ? ["idNumber"] : []
49093
+ ...((_e2 = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _e2.idNumberExempt) ? ["idNumber"] : []
48817
49094
  ];
48818
49095
  const {
48819
49096
  handleNextClick,
@@ -48837,7 +49114,7 @@ function IndividualOnfidoDropin({
48837
49114
  return /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
48838
49115
  FormWrapper,
48839
49116
  {
48840
- taskName: taskName2 ?? "individualDetails",
49117
+ taskName: taskName ?? "individualDetails",
48841
49118
  activeForm,
48842
49119
  summary: {
48843
49120
  data: formatDataForSummary2(),
@@ -48944,7 +49221,7 @@ const ClickAwayWrapper = ({ children: children2, onClickAway, ...divProps }) =>
48944
49221
  return /* @__PURE__ */ jsx("div", { ref, ...divProps, children: children2 });
48945
49222
  };
48946
49223
  const actionsMenu = "adyen-kyc-actions-menu";
48947
- const styles$4 = {
49224
+ const styles$2 = {
48948
49225
  actionsMenu
48949
49226
  };
48950
49227
  const ActionsMenu = ({ options, open, setOpen }) => {
@@ -48962,7 +49239,7 @@ const ActionsMenu = ({ options, open, setOpen }) => {
48962
49239
  },
48963
49240
  label
48964
49241
  ));
48965
- return open ? /* @__PURE__ */ jsx(ClickAwayWrapper, { onClickAway: () => setOpen(false), className: styles$4.actionsMenu, role: "menu", children: menuItems }) : null;
49242
+ return open ? /* @__PURE__ */ jsx(ClickAwayWrapper, { onClickAway: () => setOpen(false), className: styles$2.actionsMenu, role: "menu", children: menuItems }) : null;
48966
49243
  };
48967
49244
  const EntityAssociation = ({
48968
49245
  name,
@@ -49312,7 +49589,7 @@ const DecisionMakers = ({
49312
49589
  }
49313
49590
  );
49314
49591
  };
49315
- const logger$e = createLogger("useExemptSettlor");
49592
+ const logger$d = createLogger("useExemptSettlor");
49316
49593
  const useExemptSettlor = ({
49317
49594
  trust,
49318
49595
  handleGetLegalEntity
@@ -49330,7 +49607,7 @@ const useExemptSettlor = ({
49330
49607
  );
49331
49608
  useEffect(() => {
49332
49609
  if (!(trust == null ? void 0 : trust.trust)) return;
49333
- updateExemptSettlor(trust).catch(logger$e.error);
49610
+ updateExemptSettlor(trust).catch(logger$d.error);
49334
49611
  }, [trust, updateExemptSettlor]);
49335
49612
  return exemptSettlor;
49336
49613
  };
@@ -50143,11 +50420,11 @@ const TrustRoleAndEntityType = (props) => {
50143
50420
  ] });
50144
50421
  };
50145
50422
  const settlorExemptionReasonsList = "adyen-kyc-settlor-exemption-reasons-list";
50146
- const styles$3 = {
50423
+ const styles$1 = {
50147
50424
  settlorExemptionReasonsList
50148
50425
  };
50149
50426
  const formatRolesForSummary = (roles, i18n) => roles.map((role) => i18n.get(getRoleName(role))).join(", ");
50150
- const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$3.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
50427
+ const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$1.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
50151
50428
  const formatRoleAndEntityTypeSummary = (data, i18n, isOrganizationSettlorWithExemptionEnabled) => {
50152
50429
  var _a2, _b2;
50153
50430
  const { trustMemberType, roles } = data;
@@ -51455,10 +51732,10 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
51455
51732
  return hasOwnEntityAssocation || !!hasOrganizationType;
51456
51733
  };
51457
51734
  const Introduction = lazy$1(
51458
- async () => (await import("./Introduction-D4vWdsfW.js")).Introduction
51735
+ async () => (await import("./Introduction-DIW5vd8c.js")).Introduction
51459
51736
  );
51460
51737
  const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
51461
- const logger$d = createLogger("DropinComposer");
51738
+ const logger$c = createLogger("DropinComposer");
51462
51739
  const isOrganizationSettlorWithExemptionReasonEnabled = (country) => country === CountryCodes.Australia;
51463
51740
  function DropinComposer({
51464
51741
  legalEntityResponse,
@@ -51522,7 +51799,7 @@ function DropinComposer({
51522
51799
  return args.handleGetTransferInstrument(currentTransferInstrumentId);
51523
51800
  } catch (e) {
51524
51801
  showToast({ label: i18n.get("failedToFetchPayoutAccount"), type: "error" });
51525
- logger$d.error(e);
51802
+ logger$c.error(e);
51526
51803
  }
51527
51804
  },
51528
51805
  enabled: !!currentTransferInstrumentId
@@ -51598,7 +51875,7 @@ function DropinComposer({
51598
51875
  setPciStatus(response);
51599
51876
  return response;
51600
51877
  } catch {
51601
- logger$d.warn("failedToGetPciStatus");
51878
+ logger$c.warn("failedToGetPciStatus");
51602
51879
  }
51603
51880
  }
51604
51881
  return void 0;
@@ -51626,7 +51903,7 @@ function DropinComposer({
51626
51903
  }, [additionalSalesChannels, i18n, rootLegalEntity.id, args.handleGetPciTemplate]);
51627
51904
  useEffect(() => {
51628
51905
  if (!taskTypes.includes(TaskTypes.PCI_DSS)) return;
51629
- getPciTemplate2().catch(logger$d.error);
51906
+ getPciTemplate2().catch(logger$c.error);
51630
51907
  }, [getPciTemplate2, taskTypes]);
51631
51908
  const getServiceAgreementAcceptanceInfos2 = async () => {
51632
51909
  if (rootLegalEntity.id && args.handleGetServiceAgreementAcceptanceInfos) {
@@ -51634,7 +51911,7 @@ function DropinComposer({
51634
51911
  const response = await args.handleGetServiceAgreementAcceptanceInfos(rootLegalEntity.id);
51635
51912
  setServiceAgreementAcceptanceInfos(response.data);
51636
51913
  } catch {
51637
- logger$d.warn("failedToGetServiceAgreementStatus");
51914
+ logger$c.warn("failedToGetServiceAgreementStatus");
51638
51915
  }
51639
51916
  }
51640
51917
  };
@@ -51644,7 +51921,7 @@ function DropinComposer({
51644
51921
  const response = await args.handleGetServiceAgreementStatus(rootLegalEntity.id);
51645
51922
  setServiceAgreementTypes(response.termsOfServiceTypes);
51646
51923
  } catch {
51647
- logger$d.warn("failedToGetServiceAgreementStatus");
51924
+ logger$c.warn("failedToGetServiceAgreementStatus");
51648
51925
  }
51649
51926
  }
51650
51927
  };
@@ -51696,7 +51973,7 @@ function DropinComposer({
51696
51973
  await refreshAssociatedLegalArrangement();
51697
51974
  showToast({ type: "success", label: i18n.get("successFullyRemovedTrustMember") });
51698
51975
  } catch (err) {
51699
- logger$d.error(`Failed to delete trust member`, err);
51976
+ logger$c.error(`Failed to delete trust member`, err);
51700
51977
  showToast({ type: "error", label: i18n.get("failedToRemoveTrustMember") });
51701
51978
  }
51702
51979
  };
@@ -51766,14 +52043,14 @@ function DropinComposer({
51766
52043
  }
51767
52044
  break;
51768
52045
  default:
51769
- logger$d.warn(
52046
+ logger$c.warn(
51770
52047
  `Updating trust member type "${updated.trustMemberType}" is not implemented.`
51771
52048
  );
51772
52049
  }
51773
52050
  showToast({ label: i18n.get("successfullyUpdatedDetails"), type: "success" });
51774
52051
  await refreshLegalArrangementAndRunOnSubmit(associatedLegalArrangement, 1);
51775
52052
  } catch (err) {
51776
- logger$d.error(err);
52053
+ logger$c.error(err);
51777
52054
  showToast({ label: i18n.get("failedToUpdateDetails"), type: "error" });
51778
52055
  }
51779
52056
  };
@@ -51786,7 +52063,7 @@ function DropinComposer({
51786
52063
  singpassTabRef.current = window.open(authUrl, "_blank");
51787
52064
  (_a3 = singpassTabRef.current) == null ? void 0 : _a3.focus();
51788
52065
  } catch (e) {
51789
- logger$d.error(e);
52066
+ logger$c.error(e);
51790
52067
  if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
51791
52068
  }
51792
52069
  }
@@ -51960,7 +52237,7 @@ function DropinComposer({
51960
52237
  }
51961
52238
  };
51962
52239
  setIsLoadingConfiguration(true);
51963
- fetchConfiguration().catch(logger$d.error).finally(() => {
52240
+ fetchConfiguration().catch(logger$c.error).finally(() => {
51964
52241
  setIsLoadingConfiguration(false);
51965
52242
  onLoad();
51966
52243
  });
@@ -51989,7 +52266,7 @@ function DropinComposer({
51989
52266
  singpassTabRef.current = window.open(authUrl);
51990
52267
  (_a3 = singpassTabRef.current) == null ? void 0 : _a3.focus();
51991
52268
  } catch (e) {
51992
- logger$d.error(e);
52269
+ logger$c.error(e);
51993
52270
  if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
51994
52271
  }
51995
52272
  },
@@ -52581,7 +52858,7 @@ function DropinComposer({
52581
52858
  return null;
52582
52859
  }
52583
52860
  }
52584
- const logger$c = createLogger("OnboardingDropinComponent");
52861
+ const logger$b = createLogger("OnboardingDropinComponent");
52585
52862
  function OnboardingDropinComponent({
52586
52863
  legalEntityId,
52587
52864
  openBankingPartnerConfigId
@@ -52647,13 +52924,13 @@ function OnboardingDropinComponent({
52647
52924
  setLegalEntity(le);
52648
52925
  setProviderStatus(providerStatuses);
52649
52926
  } catch (error) {
52650
- logger$c.error(error);
52927
+ logger$b.error(error);
52651
52928
  } finally {
52652
52929
  setLoadingStatus("success");
52653
52930
  }
52654
52931
  }, [legalEntityId, getLegalEntity2, getProviderStatus2]);
52655
52932
  useEffect(() => {
52656
- init2().catch(logger$c.error);
52933
+ init2().catch(logger$b.error);
52657
52934
  }, [init2]);
52658
52935
  return loadingStatus === "loading" || !legalEntity ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsx(
52659
52936
  DropinComposer,
@@ -52813,7 +53090,7 @@ function SignPCIComponent({
52813
53090
  }
52814
53091
  );
52815
53092
  }
52816
- const logger$b = createLogger("UpdateLegalEntityForHighExposure");
53093
+ const logger$a = createLogger("UpdateLegalEntityForHighExposure");
52817
53094
  function UpdateLegalEntityForHighExposure({
52818
53095
  legalEntityId,
52819
53096
  onSubmitSuccess
@@ -52832,14 +53109,14 @@ function UpdateLegalEntityForHighExposure({
52832
53109
  setCapabilities(getCapabilities(rootLegalEntityResponse));
52833
53110
  setCountry(getLegalEntityCountry(rootLegalEntityResponse));
52834
53111
  } catch (error) {
52835
- logger$b.error("Unable to fetch root legal entity", error);
53112
+ logger$a.error("Unable to fetch root legal entity", error);
52836
53113
  showToast({ label: i18n.get("missingCompanyDetails"), type: "error" });
52837
53114
  }
52838
53115
  }, [legalEntityId]);
52839
53116
  useEffect(() => {
52840
53117
  (async () => {
52841
53118
  await fetchRootLegalEntity();
52842
- })().catch(logger$b.error);
53119
+ })().catch(logger$a.error);
52843
53120
  }, [fetchRootLegalEntity]);
52844
53121
  if (!rootLegalEntity || !country) {
52845
53122
  return /* @__PURE__ */ jsx(Loader, { size: "medium" });
@@ -52917,12 +53194,12 @@ function getContentByStatus(status) {
52917
53194
  }
52918
53195
  const verification = "adyen-kyc-verification";
52919
53196
  const verificationDescription = "adyen-kyc-verification-description";
52920
- const styles$2 = {
53197
+ const styles = {
52921
53198
  verification,
52922
53199
  verificationDescription
52923
53200
  };
52924
53201
  const FINAL_STATUSES = [OnboardingStatus.VERIFIED, OnboardingStatus.REJECTED];
52925
- const logger$a = createLogger("ViewVerificationStatusComponent");
53202
+ const logger$9 = createLogger("ViewVerificationStatusComponent");
52926
53203
  function ViewVerificationStatusComponent({
52927
53204
  legalEntityId,
52928
53205
  hideExplanation = false,
@@ -52947,12 +53224,12 @@ function ViewVerificationStatusComponent({
52947
53224
  if (!onboardingStatus) return;
52948
53225
  const statusContent = getContentByStatus(onboardingStatus);
52949
53226
  if (statusContent) return statusContent;
52950
- logger$a.error(`there is no content for status "${onboardingStatus}"`);
53227
+ logger$9.error(`there is no content for status "${onboardingStatus}"`);
52951
53228
  }, [onboardingStatus]);
52952
53229
  const handleError2 = useCallback(
52953
53230
  (rawError, userMessage) => {
52954
53231
  const error = coerceError(rawError);
52955
- logger$a.error(error);
53232
+ logger$9.error(error);
52956
53233
  setAlertContent(userMessage);
52957
53234
  onError == null ? void 0 : onError({
52958
53235
  error,
@@ -53010,8 +53287,8 @@ function ViewVerificationStatusComponent({
53010
53287
  if (!showAlert && (isLoading || !content)) {
53011
53288
  return /* @__PURE__ */ jsx(Loader, { size: "medium" });
53012
53289
  }
53013
- return /* @__PURE__ */ jsx("section", { className: styles$2.verification, children: showAlert ? /* @__PURE__ */ jsx(Alert, { title: i18n.get(alertContent ?? "onboardingRedirectLinkError"), variant: "error" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
53014
- !hideExplanation && (content == null ? void 0 : content.description.map((key) => /* @__PURE__ */ jsx("p", { className: styles$2.verificationDescription, children: i18n.get(key) }, key))),
53290
+ return /* @__PURE__ */ jsx("section", { className: styles.verification, children: showAlert ? /* @__PURE__ */ jsx(Alert, { title: i18n.get(alertContent ?? "onboardingRedirectLinkError"), variant: "error" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
53291
+ !hideExplanation && (content == null ? void 0 : content.description.map((key) => /* @__PURE__ */ jsx("p", { className: styles.verificationDescription, children: i18n.get(key) }, key))),
53015
53292
  !hideButton && (content == null ? void 0 : content.ctaButton) && /* @__PURE__ */ jsx(
53016
53293
  Button,
53017
53294
  {
@@ -56449,7 +56726,7 @@ var TanstackQueryDevtools = (_k = class {
56449
56726
  if (__privateGet(this, _Component)) {
56450
56727
  Devtools = __privateGet(this, _Component);
56451
56728
  } else {
56452
- Devtools = lazy(() => import("./HO4MOOFI-CmOjRTBx.js"));
56729
+ Devtools = lazy(() => import("./HO4MOOFI-BYUilyom.js"));
56453
56730
  __privateSet(this, _Component, Devtools);
56454
56731
  }
56455
56732
  setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
@@ -56571,7 +56848,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
56571
56848
  if (__privateGet(this, _Component2)) {
56572
56849
  Devtools = __privateGet(this, _Component2);
56573
56850
  } else {
56574
- Devtools = lazy(() => import("./HUY7CZI3-Bs4Fo3S2.js"));
56851
+ Devtools = lazy(() => import("./HUY7CZI3-BCSiY9T5.js"));
56575
56852
  __privateSet(this, _Component2, Devtools);
56576
56853
  }
56577
56854
  setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
@@ -56792,7 +57069,7 @@ const useAnalytics = ({
56792
57069
  componentName,
56793
57070
  onboardingVersion
56794
57071
  }) => {
56795
- const sdkVersion = "3.58.1";
57072
+ const sdkVersion = "3.59.0";
56796
57073
  const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
56797
57074
  const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
56798
57075
  const countryCode = useGlobalStore((store) => store.rootLegalEntityCountry);
@@ -56862,7 +57139,7 @@ const getVersionConfiguration = async (context) => {
56862
57139
  }
56863
57140
  });
56864
57141
  };
56865
- const logger$9 = createLogger("UseVersionConfiguration");
57142
+ const logger$8 = createLogger("UseVersionConfiguration");
56866
57143
  const useVersionConfiguration = (legalEntityId) => {
56867
57144
  const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
56868
57145
  const [onboardingVersion, setOnboardingVersion] = useState(void 0);
@@ -56881,28 +57158,28 @@ const useVersionConfiguration = (legalEntityId) => {
56881
57158
  (_b2 = (_a2 = versionConfiguration == null ? void 0 : versionConfiguration.features) == null ? void 0 : _a2.forEach) == null ? void 0 : _b2.call(_a2, (feature) => enableVersionExperiment(feature));
56882
57159
  } catch (e) {
56883
57160
  setOnboardingVersion(1);
56884
- logger$9.error("Failed to set version configuration", e);
57161
+ logger$8.error("Failed to set version configuration", e);
56885
57162
  }
56886
57163
  })();
56887
57164
  }, [enableVersionExperiment, isEmbeddedDropin, legalEntityId, loadingContext]);
56888
57165
  return { onboardingVersion };
56889
57166
  };
56890
- const logger$8 = createLogger("loadCountries");
57167
+ const logger$7 = createLogger("loadCountries");
56891
57168
  const countriesImports = /* @__PURE__ */ Object.assign({ "../countries/de-DE.json": () => import("./de-DE-Cx8Uim1K.js"), "../countries/el-GR.json": () => import("./el-GR-B7_JR3z5.js"), "../countries/en-US.json": () => import("./en-US-CkdCbOCX.js"), "../countries/es-ES.json": () => import("./es-ES-NBv3HHhn.js"), "../countries/fr-FR.json": () => import("./fr-FR-DdSVMVsp.js"), "../countries/it-IT.json": () => import("./it-IT-Bwdk3zuj.js"), "../countries/ja-JP.json": () => import("./ja-JP-Bsvzm8zu.js"), "../countries/nl-NL.json": () => import("./nl-NL-DofKaNkk.js"), "../countries/pt-PT.json": () => import("./pt-PT-DFEvMD1M.js"), "../countries/ru-RU.json": () => import("./ru-RU-PiM0ZI5h.js"), "../countries/sv-SE.json": () => import("./sv-SE-C0GoLwTg.js"), "../countries/zh-CN.json": () => import("./zh-CN-DJs6Hct-.js"), "../countries/zh-TW.json": () => import("./zh-TW-BWhLbns8.js") });
56892
57169
  const loadCountriesDataset = async (locale) => {
56893
57170
  const importForLocale = countriesImports[`../countries/${locale}.json`];
56894
57171
  if (!importForLocale) {
56895
- logger$8.warn(`No countries dataset for ${locale}, falling back to en-US`);
57172
+ logger$7.warn(`No countries dataset for ${locale}, falling back to en-US`);
56896
57173
  return (await import("./en-US-CkdCbOCX.js")).default;
56897
57174
  }
56898
57175
  return (await importForLocale()).default;
56899
57176
  };
56900
- const logger$7 = createLogger("loadStates");
57177
+ const logger$6 = createLogger("loadStates");
56901
57178
  const statesImports = /* @__PURE__ */ Object.assign({ "../states/AU/en-US.json": () => import("./en-US-CQv3D6--.js"), "../states/BR/en-US.json": () => import("./en-US-eaysbh-g.js"), "../states/BR/pt-BR.json": () => import("./pt-BR-CNtbeGFJ.js"), "../states/CA/en-US.json": () => import("./en-US-gM26UC0X.js"), "../states/NZ/en-US.json": () => import("./en-US-CLmaFLwu.js"), "../states/US/en-US.json": () => import("./en-US-7uBFgKyC.js") });
56902
57179
  const loadStatesDataset = async (country, locale) => {
56903
57180
  const importForLocale = statesImports[`../states/${country}/${locale}.json`];
56904
57181
  if (!importForLocale) {
56905
- logger$7.warn(`No ${country} states dataset for ${locale}, falling back to en-US`);
57182
+ logger$6.warn(`No ${country} states dataset for ${locale}, falling back to en-US`);
56906
57183
  const fallbackImport = statesImports[`../states/${country}/en-US.json`];
56907
57184
  return (await fallbackImport()).default;
56908
57185
  }
@@ -57071,7 +57348,7 @@ const validatePhoneNumber$1 = async (context, phoneNumber) => {
57071
57348
  { number: phoneNumber }
57072
57349
  );
57073
57350
  };
57074
- const logger$6 = createLogger("verify-id-number");
57351
+ const logger$5 = createLogger("verify-id-number");
57075
57352
  const verifyIdNumber$1 = async (context, request) => {
57076
57353
  const { loadingContext, legalEntityId } = context;
57077
57354
  try {
@@ -57094,13 +57371,13 @@ const verifyIdNumber$1 = async (context, request) => {
57094
57371
  if (responseData.status === 500) {
57095
57372
  return { status: 500, message: "Service did not respond, do not block verification" };
57096
57373
  }
57097
- return logger$6.warn(`Unexpected response status ${responseData.status}`);
57374
+ return logger$5.warn(`Unexpected response status ${responseData.status}`);
57098
57375
  }
57099
57376
  },
57100
57377
  request
57101
57378
  );
57102
57379
  } catch (e) {
57103
- logger$6.warn("WARNING: idNumber verification failed - error:", e);
57380
+ logger$5.warn("WARNING: idNumber verification failed - error:", e);
57104
57381
  }
57105
57382
  };
57106
57383
  const getEmbeddedApi = ({
@@ -57207,7 +57484,7 @@ const validatePhoneNumber = async (context, phoneNumber) => {
57207
57484
  { number: phoneNumber }
57208
57485
  );
57209
57486
  };
57210
- const logger$5 = createLogger("verify-id-number");
57487
+ const logger$4 = createLogger("verify-id-number");
57211
57488
  const verifyIdNumber = async (context, request) => {
57212
57489
  const { loadingContext, clientKey } = context;
57213
57490
  try {
@@ -57225,7 +57502,7 @@ const verifyIdNumber = async (context, request) => {
57225
57502
  if (responseData.status === 500) {
57226
57503
  return { status: 500, message: "Service did not respond, do not block verification" };
57227
57504
  }
57228
- return logger$5.warn(`Unexpected response status ${responseData.status}`);
57505
+ return logger$4.warn(`Unexpected response status ${responseData.status}`);
57229
57506
  },
57230
57507
  path: "v1/verification/idNumber",
57231
57508
  clientKey
@@ -57233,7 +57510,7 @@ const verifyIdNumber = async (context, request) => {
57233
57510
  request
57234
57511
  );
57235
57512
  } catch (e) {
57236
- logger$5.warn("WARNING: idNumber verification failed - error:", e);
57513
+ logger$4.warn("WARNING: idNumber verification failed - error:", e);
57237
57514
  }
57238
57515
  };
57239
57516
  const getKycExternalApi = ({
@@ -57283,7 +57560,7 @@ const ConfigurationApiProvider = ({
57283
57560
  [authContext, rootLegalEntityId]
57284
57561
  );
57285
57562
  return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
57286
- /* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.58.1" }),
57563
+ /* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.59.0" }),
57287
57564
  children2
57288
57565
  ] });
57289
57566
  };
@@ -57295,7 +57572,7 @@ const useAccountHolder = (legalEntityId) => {
57295
57572
  setAccountHolder: setAccountHolderIntoLocalStorage
57296
57573
  };
57297
57574
  };
57298
- const logger$4 = createLogger("useAllowedCountries");
57575
+ const logger$3 = createLogger("useAllowedCountries");
57299
57576
  const useAllowedCountries = () => {
57300
57577
  const capabilities = useGlobalStore((state) => state.capabilities);
57301
57578
  const { isExperimentEnabled } = useExperimentsContext();
@@ -57320,11 +57597,11 @@ const useAllowedCountries = () => {
57320
57597
  CountryCodes.Belgium
57321
57598
  ]);
57322
57599
  }
57323
- getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$4.error);
57600
+ getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$3.error);
57324
57601
  }, [acceptedCountries]);
57325
57602
  return allowedCountries;
57326
57603
  };
57327
- const logger$3 = createLogger("CoreProvider");
57604
+ const logger$2 = createLogger("CoreProvider");
57328
57605
  const CoreProvider = ({
57329
57606
  contextCountry: initialContextCountry,
57330
57607
  children: children2
@@ -57339,7 +57616,7 @@ const CoreProvider = ({
57339
57616
  const isCountryAllowed = (allowedCountries == null ? void 0 : allowedCountries.includes(contextCountry)) ?? true;
57340
57617
  useEffect(() => {
57341
57618
  if (allowedCountries && !isCountryAllowed) {
57342
- logger$3.warn(`
57619
+ logger$2.warn(`
57343
57620
 
57344
57621
  "${contextCountry}" isn't a supported country. Please use one of the following:
57345
57622
  - ${listify(
@@ -57392,12 +57669,12 @@ function ExperimentsContextProvider({
57392
57669
  );
57393
57670
  return /* @__PURE__ */ jsx(ExperimentsContext.Provider, { value: contextValue, children: children2 });
57394
57671
  }
57395
- const logger$2 = createLogger("useAllowedLocales");
57672
+ const logger$1 = createLogger("useAllowedLocales");
57396
57673
  const useAllowedLocales = () => {
57397
57674
  const { getAllowedLocales: getAllowedLocales2 } = useConfigurationApi();
57398
57675
  const [allowedLocales, setAllowedLocales] = useState();
57399
57676
  useEffect(() => {
57400
- getAllowedLocales2().then((response) => setAllowedLocales(response.locales)).catch(logger$2.error);
57677
+ getAllowedLocales2().then((response) => setAllowedLocales(response.locales)).catch(logger$1.error);
57401
57678
  }, []);
57402
57679
  return allowedLocales;
57403
57680
  };
@@ -57409,7 +57686,7 @@ const loadLocale = async (locale) => {
57409
57686
  }
57410
57687
  return (await importForLocale()).default;
57411
57688
  };
57412
- const logger$1 = createLogger("useTranslations");
57689
+ const logger = createLogger("useTranslations");
57413
57690
  const useTranslations = ({
57414
57691
  locale,
57415
57692
  allowedLocales
@@ -57424,7 +57701,7 @@ const useTranslations = ({
57424
57701
  const localeToUse = isLocaleAllowed ? locale : FALLBACK_LOCALE;
57425
57702
  if (loaded.locale === localeToUse) return;
57426
57703
  if (!isLocaleAllowed) {
57427
- logger$1.error(
57704
+ logger.error(
57428
57705
  `
57429
57706
  "${locale}" isn't a supported locale. Please use one of the following:
57430
57707
  - ${listify(
@@ -57444,7 +57721,7 @@ const useTranslations = ({
57444
57721
  translations: dataset,
57445
57722
  locale: localeToUse
57446
57723
  });
57447
- }).catch((err) => logger$1.error("Error while loading translations", err));
57724
+ }).catch((err) => logger.error("Error while loading translations", err));
57448
57725
  }, [locale, allowedLocales, loaded.locale]);
57449
57726
  return loaded;
57450
57727
  };
@@ -57724,519 +58001,8 @@ function StateProvider({
57724
58001
  );
57725
58002
  return /* @__PURE__ */ jsx(StateContext.Provider, { value: contextValue, children: children2 });
57726
58003
  }
57727
- const tabs = "adyen-kyc-tabs";
57728
- const styles$1 = {
57729
- tabs
57730
- };
57731
- const Tabs = ({ tabs: tabs2, activeTab, onChange }) => /* @__PURE__ */ jsx("div", { className: styles$1.tabs, children: tabs2.map(({ name, label, disabled }) => {
57732
- const buttonVariant = activeTab === name ? "secondary" : "tertiary";
57733
- return /* @__PURE__ */ jsx(
57734
- Button,
57735
- {
57736
- onClick: () => onChange(name),
57737
- variant: buttonVariant,
57738
- disabled,
57739
- children: label
57740
- },
57741
- name
57742
- );
57743
- }) });
57744
- const filterData = (data, searchTerm) => data.filter(({ key }) => key.toLowerCase().includes(searchTerm.toLowerCase()));
57745
- const sortData = (data) => [...data].sort(({ key: keyA }, { key: keyB }) => keyA.localeCompare(keyB));
57746
- const DebugTable = ({
57747
- data,
57748
- heading,
57749
- searchTerm,
57750
- tagPosition = "after",
57751
- sort = false
57752
- }) => {
57753
- const filteredData = useMemo(() => {
57754
- const filtered = searchTerm ? filterData(data, searchTerm) : data;
57755
- return sort ? sortData(filtered) : filtered;
57756
- }, [data, searchTerm]);
57757
- return /* @__PURE__ */ jsxs("div", { children: [
57758
- heading ? /* @__PURE__ */ jsx("h3", { children: heading }) : void 0,
57759
- filteredData.length === 0 ? /* @__PURE__ */ jsxs("p", { children: [
57760
- "No results found for ",
57761
- /* @__PURE__ */ jsx("strong", { children: searchTerm })
57762
- ] }) : /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsx("tbody", { children: filteredData.map(({ key, value, label, variant }) => /* @__PURE__ */ jsxs("tr", { children: [
57763
- tagPosition === "before" ? /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tag, { variant: variant ?? "grey", children: value }) }) : void 0,
57764
- /* @__PURE__ */ jsxs("td", { children: [
57765
- /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: key }),
57766
- label && /* @__PURE__ */ jsx("span", { children: label })
57767
- ] }),
57768
- tagPosition === "after" ? /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tag, { variant: variant ?? "grey", children: value }) }) : void 0
57769
- ] }, key)) }) })
57770
- ] });
57771
- };
57772
- const getSettingVariant = (value) => {
57773
- switch (value) {
57774
- case void 0:
57775
- return "orange";
57776
- case true:
57777
- return "green";
57778
- case false:
57779
- return "red";
57780
- default:
57781
- return "blue";
57782
- }
57783
- };
57784
- const DebugExperimentsAndSettings = ({
57785
- experiments,
57786
- settings
57787
- }) => {
57788
- const [searchTerm, setSearchTerm] = useState("");
57789
- const experimentRows = entriesOf(experiments).map(
57790
- ([experimentName, enabled]) => ({
57791
- key: `${experimentName}`,
57792
- value: enabled ? "Enabled" : "Disabled",
57793
- variant: enabled ? "green" : "red"
57794
- })
57795
- );
57796
- const settingRows = entriesOf(settings).map(([settingName, value]) => ({
57797
- key: settingName,
57798
- value: `${value}`,
57799
- variant: getSettingVariant(value)
57800
- }));
57801
- return /* @__PURE__ */ jsxs(Fragment, { children: [
57802
- /* @__PURE__ */ jsx(
57803
- InputText,
57804
- {
57805
- name: "search",
57806
- value: searchTerm,
57807
- classNameModifiers: ["search"],
57808
- onInput: (e) => setSearchTerm(e.target.value),
57809
- placeholder: "Search for Experiments/Settings 🔎",
57810
- trimOnBlur: true,
57811
- spellCheck: false,
57812
- "aria-label": "Search experiments or settings",
57813
- "aria-invalid": false
57814
- }
57815
- ),
57816
- /* @__PURE__ */ jsx(
57817
- DebugTable,
57818
- {
57819
- tagPosition: "before",
57820
- data: experimentRows,
57821
- heading: "Experiments",
57822
- searchTerm,
57823
- sort: true
57824
- }
57825
- ),
57826
- /* @__PURE__ */ jsx(DebugTable, { data: settingRows, heading: "Settings", searchTerm, sort: true })
57827
- ] });
57828
- };
57829
- const getRanges = (search, element) => {
57830
- var _a2;
57831
- const textNode = element.childNodes[0];
57832
- const content = (_a2 = textNode.textContent) == null ? void 0 : _a2.toLowerCase();
57833
- if (!content)
57834
- return [];
57835
- const indexes = [];
57836
- const matches = [...content.matchAll(search)];
57837
- matches.forEach((match) => {
57838
- indexes.push({ s: match.index, e: match.index + match[0].length });
57839
- });
57840
- return indexes.map((index) => {
57841
- const range2 = new Range();
57842
- range2.setStart(textNode, index.s);
57843
- range2.setEnd(textNode, index.e);
57844
- return range2;
57845
- });
57846
- };
57847
- const createHighlightFn = (name, highlight, el, scope) => {
57848
- return CSS.highlights.set(`${name}-${scope}`, new Highlight(...getRanges(highlight.regex, el)));
57849
- };
57850
- const createHighlightCss = (name, highlight, scope) => {
57851
- return `::highlight(${name}-${scope}) { color: var(${highlight.css}); }`;
57852
- };
57853
- const transformModule = (highlights, codeNode, scope) => {
57854
- return Object.entries(highlights).map(([name, definition]) => ({
57855
- apply: () => createHighlightFn(name, definition, codeNode, scope),
57856
- css: createHighlightCss(name, definition, scope)
57857
- }));
57858
- };
57859
- const supportedModules = ["plaintext", "json", "yaml", "css"];
57860
- const moduleMap = {
57861
- plaintext: () => import("./plaintext-Ckow-AHP.js"),
57862
- json: () => import("./json-CGyoavrV.js"),
57863
- yaml: () => import("./yaml-BAEzva1L.js"),
57864
- css: () => import("./css-BC2Y2d3J.js")
57865
- };
57866
- const getModule = async (name) => {
57867
- if (!supportedModules.includes(name)) {
57868
- const plaintext = await moduleMap["plaintext"]();
57869
- return plaintext.default;
57870
- }
57871
- const module = await moduleMap[name]();
57872
- if (!module) {
57873
- const plaintext = await moduleMap["plaintext"]();
57874
- return plaintext.default;
57875
- }
57876
- return module.default;
57877
- };
57878
- const cssProps = {
57879
- text: "--mng-text",
57880
- background: "--mng-background",
57881
- string: "--mng-string",
57882
- key: "--mng-key",
57883
- number: "--mng-number",
57884
- boolean: "--mng-boolean",
57885
- null: "--mng-null",
57886
- comment: "--mng-comment",
57887
- curlyBrackets: "--mng-curly-brackets",
57888
- squareBrackets: "--mng-square-brackets",
57889
- keyword: "--mng-keyword",
57890
- dashes: "--mng-dashes"
57891
- };
57892
- const css = `
57893
- * {
57894
- box-sizing: border-box;
57895
- }
57896
- :host {
57897
- display: inline-grid;
57898
- white-space: pre-line;
57899
- }
57900
- pre {
57901
- width: 100%;
57902
- height: 100%;
57903
- padding: 1em;
57904
- margin: 0;
57905
- background-color: var(${cssProps.background});
57906
- color: var(${cssProps.text});
57907
- }
57908
- code {
57909
- width: 100%;
57910
- height: 100%;
57911
- display: inline-block;
57912
- outline: none;
57913
- white-space: pre-line;
57914
- }
57915
-
57916
- :host {
57917
- ${cssProps.text}: #213547;
57918
- ${cssProps.background}: #f1f1f1;
57919
- ${cssProps.string}: #8b251e;
57920
- ${cssProps.key}: #c32b1d;
57921
- ${cssProps.number}: #4a845b;
57922
- ${cssProps.boolean}: #3716f5;
57923
- ${cssProps.null}: #3716f5;
57924
- ${cssProps.comment}: #4e862d;
57925
- ${cssProps.curlyBrackets}: #59913e;
57926
- ${cssProps.squareBrackets}: #59913e;
57927
- ${cssProps.keyword}: #666;
57928
- ${cssProps.dashes}: #444;
57929
- }
57930
-
57931
- @media (prefers-color-scheme: dark) {
57932
- :host {
57933
- ${cssProps.text}: #f1f1f1;
57934
- ${cssProps.background}: #1f1f1f;
57935
- ${cssProps.string}: #ce916f;
57936
- ${cssProps.key}: #9cdcfe;
57937
- ${cssProps.number}: #b5cea8;
57938
- ${cssProps.boolean}: #569cd6;
57939
- ${cssProps.null}: #569cd6;
57940
- ${cssProps.comment}: #438a55;
57941
- ${cssProps.curlyBrackets}: #ffd708;
57942
- ${cssProps.squareBrackets}: #da70b9;
57943
- ${cssProps.keyword}: #dcdcaa;
57944
- ${cssProps.dashes}: #ddd;
57945
- }
57946
- }`;
57947
- let MonogonCode$1 = class MonogonCode extends HTMLElement {
57948
- constructor() {
57949
- super();
57950
- Object.defineProperty(this, "value", {
57951
- enumerable: true,
57952
- configurable: true,
57953
- writable: true,
57954
- value: ""
57955
- });
57956
- Object.defineProperty(this, "codeEl", {
57957
- enumerable: true,
57958
- configurable: true,
57959
- writable: true,
57960
- value: null
57961
- });
57962
- Object.defineProperty(this, "styleEl", {
57963
- enumerable: true,
57964
- configurable: true,
57965
- writable: true,
57966
- value: null
57967
- });
57968
- Object.defineProperty(this, "applyHighlights", {
57969
- enumerable: true,
57970
- configurable: true,
57971
- writable: true,
57972
- value: () => {
57973
- }
57974
- });
57975
- }
57976
- async connectedCallback() {
57977
- await this.prepare();
57978
- setTimeout(() => {
57979
- this.refresh();
57980
- }, 1);
57981
- }
57982
- async attributeChangedCallback(oldValue, newValue) {
57983
- if (oldValue !== newValue) {
57984
- await this.refresh();
57985
- }
57986
- }
57987
- async prepare() {
57988
- const shadow = this.shadowRoot || this.attachShadow({ mode: "open" });
57989
- shadow.innerHTML = "";
57990
- const themeStyleEl = document.createElement("style");
57991
- themeStyleEl.textContent = css;
57992
- shadow.appendChild(themeStyleEl);
57993
- const preEl = document.createElement("pre");
57994
- const codeEl = document.createElement("code");
57995
- codeEl.setAttribute("contenteditable", "plaintext-only");
57996
- codeEl.setAttribute("spellcheck", "false");
57997
- shadow.appendChild(preEl);
57998
- preEl.appendChild(codeEl);
57999
- codeEl.addEventListener("input", () => {
58000
- this.codeEl.normalize();
58001
- this.value = this.codeEl.textContent ?? "";
58002
- this.applyHighlights();
58003
- });
58004
- this.codeEl = codeEl;
58005
- this.styleEl = themeStyleEl;
58006
- }
58007
- async refresh() {
58008
- var _a2;
58009
- if (!this.codeEl)
58010
- return;
58011
- const moduleName = this.getAttribute("lang") ?? "plaintext";
58012
- const module = await getModule(moduleName);
58013
- const content = this.getAttribute("content") ?? "";
58014
- this.value = content;
58015
- this.codeEl.textContent = module.format ? module.format(content) : content;
58016
- if (!((_a2 = this.codeEl.childNodes) == null ? void 0 : _a2[0]))
58017
- return;
58018
- const littleHash = window.crypto.randomUUID().substring(0, 6);
58019
- const definitions = transformModule(module.definitions, this.codeEl, littleHash);
58020
- const moduleCss = definitions.map((m) => m.css).join(" ");
58021
- this.styleEl.textContent += `${moduleCss}`;
58022
- this.applyHighlights = () => {
58023
- definitions.forEach((highlight) => {
58024
- highlight.apply();
58025
- });
58026
- };
58027
- this.applyHighlights();
58028
- }
58029
- };
58030
- Object.defineProperty(MonogonCode$1, "observedAttributes", {
58031
- enumerable: true,
58032
- configurable: true,
58033
- writable: true,
58034
- value: ["content", "lang"]
58035
- });
58036
- if (!customElements.get("monogon-code"))
58037
- customElements.define("monogon-code", MonogonCode$1);
58038
- const MonogonCode2 = ({ content, lang }) => {
58039
- return /* @__PURE__ */ jsx("monogon-code", { content, lang });
58040
- };
58041
- const DebugLegalEntityData = ({ legalEntityData }) => {
58042
- var _a2;
58043
- if (!legalEntityData) return /* @__PURE__ */ jsx(Fragment, {});
58044
- const { rootLegalEntity, rootLegalEntityType } = legalEntityData;
58045
- const uboDetails = ((_a2 = rootLegalEntity.entityAssociations) == null ? void 0 : _a2.map(
58046
- ({ name, type, jobTitle }) => (
58047
- // If `name` is undefined, replace the tuple with `null` to easily filter it out later. Checking this to ensure that the 'data' for DebugTable always has a keyName.
58048
- name ? {
58049
- key: name,
58050
- value: `${type}`,
58051
- label: jobTitle,
58052
- variant: "blue"
58053
- } : null
58054
- )
58055
- ).filter(Boolean)) ?? [];
58056
- return /* @__PURE__ */ jsxs(Fragment, { children: [
58057
- /* @__PURE__ */ jsxs("span", { children: [
58058
- "Root legal entity type: ",
58059
- /* @__PURE__ */ jsx(Tag, { children: rootLegalEntityType })
58060
- ] }),
58061
- uboDetails.length ? /* @__PURE__ */ jsx(DebugTable, { data: uboDetails, heading: "Decision Makers" }) : void 0,
58062
- rootLegalEntity ? /* @__PURE__ */ jsx(MonogonCode2, { lang: "json", content: JSON.stringify(rootLegalEntity, null, 2) }) : void 0
58063
- ] });
58064
- };
58065
- const DebugMetadata = ({
58066
- metadata: { sdkVersion, locale, rootLegalEntityId }
58067
- }) => {
58068
- const rows = [
58069
- { key: "SDK version", value: sdkVersion, variant: "green" },
58070
- { key: "Locale", value: locale, variant: "blue" },
58071
- { key: "Root legal entity ID", value: rootLegalEntityId, variant: "teal" }
58072
- ];
58073
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx(DebugTable, { data: rows }) });
58074
- };
58075
- const header = "adyen-kyc-header";
58076
- const taskName = "adyen-kyc-task-name";
58077
- const table = "adyen-kyc-table";
58078
- const styles = {
58079
- header,
58080
- taskName,
58081
- table
58082
- };
58083
- const DebugTaskStatuses = ({ taskStatuses }) => {
58084
- const { i18n } = useI18nContext();
58085
- return /* @__PURE__ */ jsxs("table", { className: styles.table, children: [
58086
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: styles.header, children: [
58087
- /* @__PURE__ */ jsx("th", { children: i18n.get("task") }),
58088
- /* @__PURE__ */ jsx("th", { children: i18n.get("status") }),
58089
- /* @__PURE__ */ jsx("th", { children: i18n.get("reason") })
58090
- ] }) }),
58091
- /* @__PURE__ */ jsx("tbody", { children: entriesOf(taskStatuses).sort(([t1], [t2]) => t1.localeCompare(t2)).map(([task, status]) => {
58092
- const { taskType, id } = splitTaskIdentifier(task);
58093
- return /* @__PURE__ */ jsxs("tr", { children: [
58094
- /* @__PURE__ */ jsxs("td", { className: styles.taskName, children: [
58095
- taskType,
58096
- id ? `: ${id}` : ""
58097
- ] }),
58098
- status ? /* @__PURE__ */ jsxs(Fragment, { children: [
58099
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TaskItemStatus, { status: status.status }) }),
58100
- /* @__PURE__ */ jsxs("td", { children: [
58101
- i18n.get(status.reason),
58102
- /* @__PURE__ */ jsx(ExplainDetails, { status })
58103
- ] })
58104
- ] }) : /* @__PURE__ */ jsx(Fragment, {})
58105
- ] }, task);
58106
- }) })
58107
- ] });
58108
- };
58109
- const ExplainDetails = ({ status }) => {
58110
- const { reason, details } = status;
58111
- switch (reason) {
58112
- case "invalidInputError": {
58113
- const verificationError = details.verificationError;
58114
- const subErrors = verificationError.subErrors;
58115
- return /* @__PURE__ */ jsxs("div", { children: [
58116
- verificationError.code,
58117
- ": ",
58118
- verificationError.message,
58119
- subErrors ? /* @__PURE__ */ jsx("ul", { children: (verificationError.subErrors ?? []).map((subError) => /* @__PURE__ */ jsxs("li", { children: [
58120
- subError.code,
58121
- ": ",
58122
- subError.message
58123
- ] }, subError.code)) }) : /* @__PURE__ */ jsx(Fragment, {})
58124
- ] });
58125
- }
58126
- case "dataMissingError": {
58127
- const verificationError = details.verificationError;
58128
- const subErrors = verificationError.subErrors;
58129
- return /* @__PURE__ */ jsxs("div", { children: [
58130
- verificationError.code,
58131
- ": ",
58132
- verificationError.message,
58133
- subErrors ? /* @__PURE__ */ jsx("ul", { children: (verificationError.subErrors ?? []).map((subError) => /* @__PURE__ */ jsxs("li", { children: [
58134
- subError.code,
58135
- ": ",
58136
- subError.message
58137
- ] }, subError.code)) }) : /* @__PURE__ */ jsx(Fragment, {})
58138
- ] });
58139
- }
58140
- case "pendingCapabilities": {
58141
- const pendingCapabilities = details.pendingCapabilities;
58142
- return /* @__PURE__ */ jsx("ul", { children: pendingCapabilities.map((capabilityName) => /* @__PURE__ */ jsx("li", { children: capabilityName }, capabilityName)) });
58143
- }
58144
- }
58145
- };
58146
- const logger = createLogger("DebugModal");
58147
- const DebugModal = ({ onExit }) => {
58148
- const { isExperimentEnabled } = useExperimentsContext();
58149
- const { getSetting } = useSettingsContext();
58150
- const [debugInfoCopied, setDebugInfoCopied] = useState(false);
58151
- const { i18n } = useI18nContext();
58152
- const [tab, setTab] = useState("metadata");
58153
- const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
58154
- const metadata = {
58155
- sdkVersion: "3.58.1",
58156
- locale: i18n.locale,
58157
- rootLegalEntityId: rootLegalEntity.id
58158
- };
58159
- const experiments = listToRecord(valuesOf(ExperimentNames), isExperimentEnabled);
58160
- const settings = listToRecord(valuesOf(SettingNames), getSetting);
58161
- const taskStatuses = useTaskStatuses();
58162
- const legalEntityData = {
58163
- rootLegalEntity,
58164
- rootLegalEntityType: rootLegalEntity.type
58165
- };
58166
- const copyToClipboard = async () => {
58167
- const toCopy = {
58168
- metadata,
58169
- experiments,
58170
- settings,
58171
- taskStatuses,
58172
- legalEntityData
58173
- };
58174
- await window.navigator.clipboard.writeText(JSON.stringify(toCopy, null, 2));
58175
- setDebugInfoCopied(true);
58176
- setTimeout(() => {
58177
- setDebugInfoCopied(false);
58178
- }, 5e3);
58179
- };
58180
- return /* @__PURE__ */ jsxs(Modal, { size: "fullscreen", onClose: onExit, children: [
58181
- /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-debug-modal__header", children: [
58182
- /* @__PURE__ */ jsx("h1", { children: "Debug" }),
58183
- " ",
58184
- /* @__PURE__ */ jsx(
58185
- Tabs,
58186
- {
58187
- activeTab: tab,
58188
- onChange: (tab2) => setTab(tab2),
58189
- tabs: [
58190
- {
58191
- name: "metadata",
58192
- label: "Metadata"
58193
- },
58194
- {
58195
- name: "experimentsSettings",
58196
- label: "Experiments & Settings"
58197
- },
58198
- {
58199
- name: "taskStatuses",
58200
- label: "Task Statuses"
58201
- },
58202
- {
58203
- name: "legalEntityData",
58204
- label: "Legal Entity Data"
58205
- }
58206
- ]
58207
- }
58208
- )
58209
- ] }) }),
58210
- /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
58211
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-debug-modal__content", children: [
58212
- tab === "metadata" ? /* @__PURE__ */ jsx(DebugMetadata, { metadata }) : void 0,
58213
- tab === "taskStatuses" ? /* @__PURE__ */ jsx(DebugTaskStatuses, { taskStatuses }) : void 0,
58214
- tab === "experimentsSettings" ? /* @__PURE__ */ jsx(DebugExperimentsAndSettings, { experiments, settings }) : void 0,
58215
- tab === "legalEntityData" ? /* @__PURE__ */ jsx(DebugLegalEntityData, { legalEntityData }) : void 0
58216
- ] }),
58217
- " "
58218
- ] }) }),
58219
- /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__footer", children: /* @__PURE__ */ jsxs("div", { children: [
58220
- /* @__PURE__ */ jsx(
58221
- Button,
58222
- {
58223
- icon: "document",
58224
- onClick: () => {
58225
- copyToClipboard().catch((error) => {
58226
- logger.error("Error copying to clipboard:", error);
58227
- });
58228
- },
58229
- children: "Copy debug info"
58230
- }
58231
- ),
58232
- debugInfoCopied ? /* @__PURE__ */ jsxs("span", { className: "adyen-kyc-debug-modal__footer--copy-status", children: [
58233
- /* @__PURE__ */ jsx(Icon, { name: "check" }),
58234
- " Copied!"
58235
- ] }) : void 0
58236
- ] }) }) })
58237
- ] });
58238
- };
58239
- const DebugWrapper = ({ children: children2 }) => {
58004
+ const DebugModal = lazy$1(async () => (await import("./DebugModal-C7PUDNlI.js").then((n) => n.D)).DebugModal);
58005
+ const DebugListener = () => {
58240
58006
  const [debugUiOpen, setDebugUiOpen] = useState(false);
58241
58007
  const { isSettingEnabled } = useSettingsContext();
58242
58008
  const debugUiAllowed = isSettingEnabled("allowDebugUi");
@@ -58251,10 +58017,7 @@ const DebugWrapper = ({ children: children2 }) => {
58251
58017
  return () => document.removeEventListener("keydown", handleKeyDown);
58252
58018
  }, [debugUiAllowed]);
58253
58019
  const isOpen = debugUiAllowed && debugUiOpen;
58254
- return /* @__PURE__ */ jsxs(Fragment, { children: [
58255
- isOpen ? /* @__PURE__ */ jsx(DebugModal, { onExit: () => setDebugUiOpen(false) }) : null,
58256
- children2
58257
- ] });
58020
+ return /* @__PURE__ */ jsx(Fragment, { children: isOpen ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", {}), children: /* @__PURE__ */ jsx(DebugModal, { onExit: () => setDebugUiOpen(false) }) }) : null });
58258
58021
  };
58259
58022
  const StoreProvider = ({
58260
58023
  legalEntityId,
@@ -58427,19 +58190,22 @@ class UIElement extends BaseElement {
58427
58190
  locale: this.props.locale,
58428
58191
  customTranslations: this.props.customTranslations,
58429
58192
  eventEmitter: this.eventEmitter,
58430
- children: /* @__PURE__ */ jsx(
58193
+ children: /* @__PURE__ */ jsxs(
58431
58194
  ExpiryProvider,
58432
58195
  {
58433
58196
  expiry: this.props.expiry,
58434
58197
  refreshExpiry: this.props.refreshExpiry,
58435
58198
  eventEmitter: this.eventEmitter,
58436
- children: /* @__PURE__ */ jsx(DebugWrapper, { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container-wrapper", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container", children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children: /* @__PURE__ */ jsx(
58437
- UIElement2,
58438
- {
58439
- ...this.props.componentProps,
58440
- onUnmount: this.remove
58441
- }
58442
- ) }) }) }) }) })
58199
+ children: [
58200
+ /* @__PURE__ */ jsx(DebugListener, {}),
58201
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container-wrapper", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container", children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children: /* @__PURE__ */ jsx(
58202
+ UIElement2,
58203
+ {
58204
+ ...this.props.componentProps,
58205
+ onUnmount: this.remove
58206
+ }
58207
+ ) }) }) }) })
58208
+ ]
58443
58209
  }
58444
58210
  )
58445
58211
  }
@@ -58518,65 +58284,83 @@ if (CSS.supports("container", "foo / inline-size") === false) {
58518
58284
  import("container-query-polyfill");
58519
58285
  }
58520
58286
  export {
58521
- $TRACK as $,
58522
- getSidedProp as A,
58287
+ batch as $,
58288
+ createSignal as A,
58523
58289
  Button as B,
58524
- use as C,
58525
- createUniqueId as D,
58526
- batch as E,
58527
- getQueryStatusLabel as F,
58528
- getMutationStatusColor as G,
58529
- getQueryStatusColor as H,
58530
- getQueryStatusColorByLabel as I,
58531
- displayValue as J,
58532
- For as K,
58290
+ onMount as C,
58291
+ createEffect as D,
58292
+ ExperimentNames as E,
58293
+ Show as F,
58294
+ template as G,
58295
+ insert as H,
58296
+ InputText as I,
58297
+ createRenderEffect as J,
58298
+ className as K,
58533
58299
  LegalEntityType as L,
58534
- convertRemToPixels as M,
58535
- untrack as N,
58536
- useTransition as O,
58300
+ Modal as M,
58301
+ clearDelegatedEvents as N,
58302
+ delegateEvents as O,
58537
58303
  Portal as P,
58538
- spread as Q,
58539
- mergeProps as R,
58304
+ useContext as Q,
58305
+ onCleanup as R,
58540
58306
  StepProgressIndicator as S,
58541
58307
  TaskTypes as T,
58542
- createRoot as U,
58543
- serialize as V,
58544
- Index as W,
58545
- updateNestedDataByPath as X,
58546
- addEventListener as Y,
58547
- stringify as Z,
58548
- Match as _,
58308
+ sortFns as U,
58309
+ mutationSortFns as V,
58310
+ on as W,
58311
+ setAttribute as X,
58312
+ getSidedProp as Y,
58313
+ use as Z,
58314
+ createUniqueId as _,
58549
58315
  useLegalEntityType as a,
58550
- Switch as a0,
58551
- deleteNestedDataByPath as a1,
58552
- splitProps as a2,
58553
- Dynamic as a3,
58554
- createComputed as a4,
58555
- cssProps as a5,
58556
- Core as a6,
58316
+ getQueryStatusLabel as a0,
58317
+ getMutationStatusColor as a1,
58318
+ getQueryStatusColor as a2,
58319
+ getQueryStatusColorByLabel as a3,
58320
+ displayValue as a4,
58321
+ For as a5,
58322
+ convertRemToPixels as a6,
58323
+ untrack as a7,
58324
+ $TRACK as a8,
58325
+ useTransition as a9,
58326
+ spread as aa,
58327
+ mergeProps as ab,
58328
+ createRoot as ac,
58329
+ serialize as ad,
58330
+ Index as ae,
58331
+ updateNestedDataByPath as af,
58332
+ addEventListener as ag,
58333
+ stringify as ah,
58334
+ Match as ai,
58335
+ Switch as aj,
58336
+ deleteNestedDataByPath as ak,
58337
+ splitProps as al,
58338
+ Dynamic as am,
58339
+ createComputed as an,
58340
+ Core as ao,
58557
58341
  useI18nContext as b,
58558
58342
  userEvents as c,
58559
- getPreferredColorScheme as d,
58560
- createMemo as e,
58561
- createComponent as f,
58343
+ Tag as d,
58344
+ entriesOf as e,
58345
+ TaskItemStatus as f,
58562
58346
  getTranslationKeysByPrefix as g,
58563
- createContext as h,
58564
- createSignal as i,
58565
- createEffect as j,
58566
- Show as k,
58567
- template as l,
58568
- insert as m,
58569
- createRenderEffect as n,
58570
- onMount as o,
58571
- className as p,
58572
- clearDelegatedEvents as q,
58573
- delegateEvents as r,
58574
- useContext as s,
58347
+ useExperimentsContext as h,
58348
+ useSettingsContext as i,
58349
+ useGlobalStore as j,
58350
+ useTaskStatuses as k,
58351
+ listToRecord as l,
58352
+ ModalHeader as m,
58353
+ ModalContent as n,
58354
+ ModalFooter as o,
58355
+ createLogger as p,
58356
+ Icon as q,
58357
+ SettingNames as r,
58358
+ splitTaskIdentifier as s,
58575
58359
  toCapitalized as t,
58576
58360
  useCanSeeIntroduction as u,
58577
- onCleanup as v,
58578
- sortFns as w,
58579
- mutationSortFns as x,
58580
- on as y,
58581
- setAttribute as z
58361
+ valuesOf as v,
58362
+ getPreferredColorScheme as w,
58363
+ createMemo as x,
58364
+ createComponent as y,
58365
+ createContext as z
58582
58366
  };