@adyen/kyc-components 3.49.2 → 3.50.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/es/{B4MFY5CR-DvtM_CXZ.js → B4MFY5CR-C09zwQsp.js} +1 -1
  2. package/dist/es/{HO4MOOFI-BPdL391L.js → HO4MOOFI-DkcbvWhF.js} +2 -2
  3. package/dist/es/{HUY7CZI3-Cl0-ZtHu.js → HUY7CZI3-BpLsA4ow.js} +2 -2
  4. package/dist/es/adyen-kyc-components.es.js +1 -1
  5. package/dist/es/{index-B3fvfRtD.js → index-Cb_V47vX.js} +703 -523
  6. package/dist/style.css +84 -104
  7. package/dist/types/components/Address/constants.d.ts +0 -1
  8. package/dist/types/components/Address/utils.d.ts +1 -1
  9. package/dist/types/components/BusinessMismatchModal/BusinessMismatchModal.d.ts +6 -0
  10. package/dist/types/components/Company/Company.d.ts +0 -1
  11. package/dist/types/components/Dropins/FormNavigation/types.d.ts +2 -5
  12. package/dist/types/components/Dropins/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForAssetSale.d.ts +2 -2
  13. package/dist/types/components/Dropins/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForBusiness.d.ts +2 -2
  14. package/dist/types/components/Dropins/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForCryptocurrency.d.ts +2 -2
  15. package/dist/types/components/Dropins/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForDonation.d.ts +2 -2
  16. package/dist/types/components/Dropins/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForGambling.d.ts +2 -2
  17. package/dist/types/components/Dropins/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForInheritance.d.ts +2 -2
  18. package/dist/types/components/Dropins/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForThirdParty.d.ts +2 -2
  19. package/dist/types/components/Dropins/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataOriginatorLegalEntity.d.ts +2 -2
  20. package/dist/types/components/Dropins/SourceOfFundsDropin/types.d.ts +1 -1
  21. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +0 -1
  22. package/dist/types/components/ErrorPanel/types.d.ts +4 -4
  23. package/dist/types/components/Individual/Individual.d.ts +0 -1
  24. package/dist/types/components/SingpassBanner/SingpassBanner.d.ts +1 -1
  25. package/dist/types/components/Summary/types.d.ts +2 -6
  26. package/dist/types/components/TaskList/TaskListItem.d.ts +1 -1
  27. package/dist/types/components/TaskList/types.d.ts +4 -1
  28. package/dist/types/components/Trust/Trust.d.ts +0 -1
  29. package/dist/types/components/UIElement/UIElement.d.ts +4 -4
  30. package/dist/types/components/ui/atoms/Button/Button.d.ts +1 -1
  31. package/dist/types/components/ui/atoms/Button/Button.types.d.ts +1 -0
  32. package/dist/types/components/ui/atoms/Modal/Modal.d.ts +2 -1
  33. package/dist/types/components/ui/atoms/Tag/Tag.d.ts +0 -2
  34. package/dist/types/components/{FormEndState → ui/molecules/FormEndState}/types.d.ts +1 -1
  35. package/dist/types/core/context/ExperimentContext/types.d.ts +2 -1
  36. package/dist/types/core/hooks/useBusinessData/types.d.ts +1 -0
  37. package/dist/types/core/hooks/useForm/reducer.d.ts +2 -2
  38. package/dist/types/core/hooks/useForm/types.d.ts +4 -1
  39. package/dist/types/core/hooks/useForm/useForm.d.ts +1 -1
  40. package/dist/types/core/models/api/document.d.ts +8 -8
  41. package/dist/types/core/models/form-rules.d.ts +1 -0
  42. package/dist/types/core/user-events.d.ts +10 -5
  43. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  44. package/dist/types/utils/formUtils.d.ts +4 -5
  45. package/dist/types/utils/localizeDateString.d.ts +4 -1
  46. package/dist/types/utils/mapping/componentApiMapping.d.ts +1 -1
  47. package/dist/types/utils/trackNavigation.d.ts +9 -7
  48. package/dist/types/utils/validation/types.d.ts +2 -1
  49. package/package.json +2 -2
  50. package/dist/types/components/ui/molecules/Splashscreen/Splashscreen.d.ts +0 -10
  51. package/dist/types/core/hooks/usePolling.d.ts +0 -9
  52. /package/dist/types/components/{FormEndState → ui/molecules/FormEndState}/FormEndState.d.ts +0 -0
@@ -218,7 +218,9 @@ const defaultLocaleTranslations = {
218
218
  businessIncorporationNumber: "Business incorporation number",
219
219
  businessInformation: "Business information",
220
220
  businessInvestorDetails: "Business investor details",
221
+ businessLegalName: "Business legal name",
221
222
  businessName: "Business name",
223
+ businessName__helperText: "The legal name is used to identify a business with the government; enter it exactly as it appears on your government or legal forms.",
222
224
  businessNumber: "Business number",
223
225
  businessRegistrationDocument__FR: "Business registration document, such as a KBIS extract or situation au répertoire sirene",
224
226
  businessRegistryStatement: "Business registry statement",
@@ -228,6 +230,10 @@ const defaultLocaleTranslations = {
228
230
  businessSelection__heading: "Select your business",
229
231
  businessSelection__invalidTin: "This company's TIN doesn't match yours",
230
232
  businessSelection__tinVerificationFailure: "Sorry, something went wrong. Try again or continue by pressing Add details manually",
233
+ businessSelection__tinVerificationFailureModalContent: "The tax ID didn't match the legal business name. How would you like to continue?",
234
+ businessSelection__tinVerificationFailureModalHeader: "Business couldn't be identified",
235
+ businessSelection__tinVerificationFailureModalPrimaryButton: "Continue anyway",
236
+ businessSelection__tinVerificationFailureModalSecondaryButton: "Edit details",
231
237
  businessStructure: "Business structure",
232
238
  businessTrust: "Business trust",
233
239
  businessTrusteeDetails: "Business trustee details",
@@ -413,6 +419,7 @@ const defaultLocaleTranslations = {
413
419
  downloadACopy: "Download a copy",
414
420
  downloadAsPdf: "Download as PDF",
415
421
  driversLicense: "Driver's license",
422
+ driving_licence: "Driving license",
416
423
  drivinglicenseBack: "Driving license (back)",
417
424
  drivinglicenseFront: "Driving license (front)",
418
425
  dropFileToUpload: "Drop file to upload",
@@ -1075,6 +1082,8 @@ const defaultLocaleTranslations = {
1075
1082
  nameOfTrustAgreement: "Name of trust agreement",
1076
1083
  namesOfInvolvedParties: "Names of involved parties (if applicable)",
1077
1084
  namesOfLandlordAndTenant: "Names of landlord and tenant",
1085
+ national_identity_card: "National ID Card",
1086
+ nationalIdNumber: "National ID Number",
1078
1087
  nationalInsuranceNumber: "National Insurance Number (NINO)",
1079
1088
  nationality: "Nationality",
1080
1089
  naturalPersonDescription: "He/she doesn't have any business.",
@@ -1224,9 +1233,13 @@ const defaultLocaleTranslations = {
1224
1233
  processing: "Processing",
1225
1234
  professionalServiceProvider: "My settlor is a professional service provider",
1226
1235
  progress: "Progress",
1236
+ proofOfAddress: "Proof of address",
1227
1237
  proofOfAnnualTurnoverAmount: "Proof of annual turnover amount",
1228
1238
  proofOfDirector: "Proof of director",
1239
+ proofOfFundingOrWealthSource: "Proof of funding or wealth source",
1229
1240
  proofOfNationalId: "Proof of national ID",
1241
+ proofOfNationalIdNumber: "Proof of national ID number",
1242
+ proofOfOrganizationTaxInfo: "Proof of organization tax information",
1230
1243
  proofOfOwnership: "Proof of ownership",
1231
1244
  proofOfOwnershipRent: "Proof of ownership",
1232
1245
  proofOfRelationship: "Proof of relationship",
@@ -1361,6 +1374,7 @@ const defaultLocaleTranslations = {
1361
1374
  requirements: "Requirements:",
1362
1375
  requiresDecisionMakers: "Requires decision-makers",
1363
1376
  requiresSignatory: "Requires signatory",
1377
+ residence_permit: "Residence permit",
1364
1378
  residencePermitBack: "Residence permit (back)",
1365
1379
  residencePermitFront: "Residence permit (front)",
1366
1380
  residencyCountry: "Country/region of residence",
@@ -1644,6 +1658,7 @@ const defaultLocaleTranslations = {
1644
1658
  validationPleaseEnterAValidVatNumber: "Please enter a valid Tax id number",
1645
1659
  validationPleaseEnterAValidVatNumberWithFormat: "Please enter a valid VAT number. Expected format: %{format}",
1646
1660
  vatAbsenceReason: "VAT number absence reason",
1661
+ vatDocument: "VAT document",
1647
1662
  vatNumber: "VAT number",
1648
1663
  vatNummerMomsregistreringsnummerOrMomsnummer: "VAT-nummer, Momsregistreringsnummer, or Momsnummer",
1649
1664
  vatRegistrationNumber: "VAT registration number",
@@ -2223,6 +2238,25 @@ function useBusinessData({
2223
2238
  },
2224
2239
  [handleVerifyTin]
2225
2240
  );
2241
+ const verifyManualBusinessData = useCallback(
2242
+ async (name, tin) => {
2243
+ if (!handleVerifyTin) {
2244
+ logger$R.log("Missing handlers for verifyBusinessData");
2245
+ return;
2246
+ }
2247
+ try {
2248
+ setVerifying("loading");
2249
+ const { matched } = await handleVerifyTin({ name, tin });
2250
+ return matched;
2251
+ } catch (e) {
2252
+ setVerifying("error");
2253
+ logger$R.error(e);
2254
+ } finally {
2255
+ setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
2256
+ }
2257
+ },
2258
+ [handleVerifyTin]
2259
+ );
2226
2260
  const clearTrustedBusinessData = useCallback(async () => {
2227
2261
  try {
2228
2262
  setResettingTrustedData("loading");
@@ -2246,6 +2280,7 @@ function useBusinessData({
2246
2280
  searchForBusiness,
2247
2281
  fetchBusinessData,
2248
2282
  verifyBusinessData,
2283
+ verifyManualBusinessData,
2249
2284
  clearTrustedBusinessData,
2250
2285
  resetBusinessData,
2251
2286
  resetTinVerification,
@@ -2327,7 +2362,6 @@ const createFormUtils = (props, i18n) => ({
2327
2362
  isReadOnly: (field) => props.readOnly || (props.readOnlyFields ? props.readOnlyFields.includes(field) : false),
2328
2363
  isObscured: (field) => props.obscuredFields ? props.obscuredFields.includes(field) : false,
2329
2364
  isTrusted: (field) => props.trustedFields ? props.trustedFields.includes(field) : false,
2330
- getVal: (val) => i18n.get(val),
2331
2365
  getErrorMessage: (field, errors, fieldProblems) => {
2332
2366
  var _a2;
2333
2367
  const errorMessage = (_a2 = errors == null ? void 0 : errors[field]) == null ? void 0 : _a2.errorMessage;
@@ -2703,7 +2737,7 @@ const loaderSmall = "adyen-kyc-loader-small";
2703
2737
  const loaderMedium = "adyen-kyc-loader-medium";
2704
2738
  const loaderXsmall = "adyen-kyc-loader-xsmall";
2705
2739
  const loaderDot = "adyen-kyc-loader-dot";
2706
- const styles$l = {
2740
+ const styles$o = {
2707
2741
  loaderWrapper,
2708
2742
  loaderWrapperInline,
2709
2743
  loader,
@@ -2714,16 +2748,16 @@ const styles$l = {
2714
2748
  loaderDot
2715
2749
  };
2716
2750
  const sizeMap = {
2717
- xsmall: styles$l.loaderXsmall,
2718
- small: styles$l.loaderSmall,
2719
- medium: styles$l.loaderMedium,
2720
- large: styles$l.loaderLarge
2751
+ xsmall: styles$o.loaderXsmall,
2752
+ small: styles$o.loaderSmall,
2753
+ medium: styles$o.loaderMedium,
2754
+ large: styles$o.loaderLarge
2721
2755
  };
2722
- const Loader = ({ inline = false, size = "large", dot = false }) => /* @__PURE__ */ jsx("div", { className: cx(styles$l.loaderWrapper, { [styles$l.loaderWrapperInline]: inline }), children: /* @__PURE__ */ jsx(
2756
+ const Loader = ({ inline = false, size = "large", dot = false }) => /* @__PURE__ */ jsx("div", { className: cx(styles$o.loaderWrapper, { [styles$o.loaderWrapperInline]: inline }), children: /* @__PURE__ */ jsx(
2723
2757
  "div",
2724
2758
  {
2725
2759
  role: "progressbar",
2726
- className: cx(styles$l.loader, sizeMap[size], { [styles$l.loaderDot]: dot })
2760
+ className: cx(styles$o.loader, sizeMap[size], { [styles$o.loaderDot]: dot })
2727
2761
  }
2728
2762
  ) });
2729
2763
  const Button = ({
@@ -2740,6 +2774,7 @@ const Button = ({
2740
2774
  label = "",
2741
2775
  icon,
2742
2776
  iconPosition = "left",
2777
+ iconClassName = "",
2743
2778
  title,
2744
2779
  disabled = false,
2745
2780
  type = "button",
@@ -2756,13 +2791,14 @@ const Button = ({
2756
2791
  onClick(event);
2757
2792
  }
2758
2793
  };
2794
+ const iconClassNames = cx("adyen-kyc-link__icon", iconClassName);
2759
2795
  const buttonTextClasses = showAsLink ? "adyen-kyc-link__text" : "adyen-kyc-button__text";
2760
2796
  const buttonText = loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
2761
2797
  label && /* @__PURE__ */ jsx("span", { className: buttonTextClasses, children: label }),
2762
2798
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-button__loader-container--active", children: /* @__PURE__ */ jsx(Loader, { size: "small" }) })
2763
2799
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2764
2800
  label && /* @__PURE__ */ jsx("span", { className: buttonTextClasses, children: label }),
2765
- icon && /* @__PURE__ */ jsx(Icon, { name: icon, className: "adyen-kyc-link__icon" })
2801
+ icon && /* @__PURE__ */ jsx(Icon, { name: icon, className: iconClassNames })
2766
2802
  ] });
2767
2803
  const buttonClasses = showAsLink ? cx("adyen-kyc-link", className2, {
2768
2804
  "adyen-kyc-link--icon-left": icon && iconPosition === "left",
@@ -2798,10 +2834,10 @@ const Button = ({
2798
2834
  );
2799
2835
  };
2800
2836
  const divider = "adyen-kyc-divider";
2801
- const styles$k = {
2837
+ const styles$n = {
2802
2838
  divider
2803
2839
  };
2804
- const Divider = () => /* @__PURE__ */ jsx("hr", { className: styles$k.divider });
2840
+ const Divider = () => /* @__PURE__ */ jsx("hr", { className: styles$n.divider });
2805
2841
  const alert = "adyen-kyc-alert";
2806
2842
  const alertWithoutIcon = "adyen-kyc-alert-without-icon";
2807
2843
  const alertExplanation = "adyen-kyc-alert-explanation";
@@ -2819,7 +2855,7 @@ const alertIconWarning = "adyen-kyc-alert-icon-warning";
2819
2855
  const alertIconSuccess = "adyen-kyc-alert-icon-success";
2820
2856
  const alertCloseButton = "adyen-kyc-alert-close-button";
2821
2857
  const alertTitle = "adyen-kyc-alert-title";
2822
- const styles$j = {
2858
+ const styles$m = {
2823
2859
  alert,
2824
2860
  alertWithoutIcon,
2825
2861
  alertExplanation,
@@ -2850,7 +2886,7 @@ const accordionContent = "adyen-kyc-accordion-content";
2850
2886
  const accordionWithIcon = "adyen-kyc-accordion-with-icon";
2851
2887
  const accordionArrow = "adyen-kyc-accordion-arrow";
2852
2888
  const accordionArrowRight = "adyen-kyc-accordion-arrow-right";
2853
- const styles$i = {
2889
+ const styles$l = {
2854
2890
  accordion,
2855
2891
  accordionSummary,
2856
2892
  accordionBasic,
@@ -2867,7 +2903,7 @@ const styles$i = {
2867
2903
  const skeleton = "adyen-kyc-skeleton";
2868
2904
  const skeletonCircle = "adyen-kyc-skeleton-circle";
2869
2905
  const skeletonText = "adyen-kyc-skeleton-text";
2870
- const styles$h = {
2906
+ const styles$k = {
2871
2907
  skeleton,
2872
2908
  skeletonCircle,
2873
2909
  skeletonText
@@ -2878,9 +2914,9 @@ const Skeleton = ({
2878
2914
  height = "1em",
2879
2915
  width
2880
2916
  }) => {
2881
- const classNames = cx(styles$h.skeleton, {
2882
- [styles$h.skeletonCircle]: circle,
2883
- [styles$h.skeletonText]: text
2917
+ const classNames = cx(styles$k.skeleton, {
2918
+ [styles$k.skeletonCircle]: circle,
2919
+ [styles$k.skeletonText]: text
2884
2920
  });
2885
2921
  return /* @__PURE__ */ jsx("div", { className: classNames, style: { height, width } });
2886
2922
  };
@@ -2898,52 +2934,52 @@ const Accordion = ({
2898
2934
  onToggle(e.newState === "closed" ? "close" : "open");
2899
2935
  };
2900
2936
  const variantMap2 = {
2901
- basic: styles$i.accordionBasic,
2902
- info: styles$i.accordionInfo,
2903
- error: styles$i.accordionError,
2904
- warning: styles$i.accordionWarning,
2905
- success: styles$i.accordionSuccess
2937
+ basic: styles$l.accordionBasic,
2938
+ info: styles$l.accordionInfo,
2939
+ error: styles$l.accordionError,
2940
+ warning: styles$l.accordionWarning,
2941
+ success: styles$l.accordionSuccess
2906
2942
  };
2907
2943
  return /* @__PURE__ */ jsxs(
2908
2944
  "details",
2909
2945
  {
2910
2946
  onToggle: handleToggle,
2911
- className: cx(className2, styles$i.accordion, variantMap2[variant], {
2912
- [styles$i.accordionWithIcon]: expandOnLeft,
2913
- [styles$i.accordionNarrow]: narrow
2947
+ className: cx(className2, styles$l.accordion, variantMap2[variant], {
2948
+ [styles$l.accordionWithIcon]: expandOnLeft,
2949
+ [styles$l.accordionNarrow]: narrow
2914
2950
  }),
2915
2951
  children: [
2916
- /* @__PURE__ */ jsxs("summary", { className: styles$i.accordionSummary, children: [
2917
- expandOnLeft && /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles$i.accordionArrow }),
2952
+ /* @__PURE__ */ jsxs("summary", { className: styles$l.accordionSummary, children: [
2953
+ expandOnLeft && /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles$l.accordionArrow }),
2918
2954
  /* @__PURE__ */ jsx(Slot, { name: "icon" }),
2919
2955
  /* @__PURE__ */ jsx(Slot, { name: "title", children: /* @__PURE__ */ jsx(Skeleton, {}) }),
2920
2956
  !expandOnLeft && /* @__PURE__ */ jsx(
2921
2957
  Icon,
2922
2958
  {
2923
2959
  name: "chevron-down",
2924
- className: cx(styles$i.accordionArrow, styles$i.accordionArrowRight)
2960
+ className: cx(styles$l.accordionArrow, styles$l.accordionArrowRight)
2925
2961
  }
2926
2962
  )
2927
2963
  ] }),
2928
- /* @__PURE__ */ jsx("section", { className: styles$i.accordionContent, children: /* @__PURE__ */ jsx(Slot, { name: "content", children: /* @__PURE__ */ jsx(Skeleton, {}) }) })
2964
+ /* @__PURE__ */ jsx("section", { className: styles$l.accordionContent, children: /* @__PURE__ */ jsx(Slot, { name: "content", children: /* @__PURE__ */ jsx(Skeleton, {}) }) })
2929
2965
  ]
2930
2966
  }
2931
2967
  );
2932
2968
  };
2933
- const variantMap = {
2934
- basic: styles$j.alertBasic,
2935
- info: styles$j.alertInfo,
2936
- error: styles$j.alertError,
2937
- warning: styles$j.alertWarning,
2938
- success: styles$j.alertSuccess
2969
+ const variantMap$1 = {
2970
+ basic: styles$m.alertBasic,
2971
+ info: styles$m.alertInfo,
2972
+ error: styles$m.alertError,
2973
+ warning: styles$m.alertWarning,
2974
+ success: styles$m.alertSuccess
2939
2975
  };
2940
2976
  const iconVariantMap = {
2941
2977
  basic: "",
2942
2978
  // does not exist
2943
- info: styles$j.alertIconInfo,
2944
- error: styles$j.alertIconError,
2945
- warning: styles$j.alertIconWarning,
2946
- success: styles$j.alertIconSuccess
2979
+ info: styles$m.alertIconInfo,
2980
+ error: styles$m.alertIconError,
2981
+ warning: styles$m.alertIconWarning,
2982
+ success: styles$m.alertIconSuccess
2947
2983
  };
2948
2984
  const Alert = ({
2949
2985
  title,
@@ -2969,33 +3005,35 @@ const Alert = ({
2969
3005
  if (isValidElement(icon)) {
2970
3006
  return icon;
2971
3007
  }
2972
- return /* @__PURE__ */ jsx("span", { className: cx(styles$j.alertIcon, iconVariantMap[variant]), children: /* @__PURE__ */ jsx(AlertIcon, { variant }) });
3008
+ return /* @__PURE__ */ jsx("span", { className: cx(styles$m.alertIcon, iconVariantMap[variant]), children: /* @__PURE__ */ jsx(AlertIcon, { variant }) });
2973
3009
  };
2974
3010
  const renderedIcon = renderIcon();
2975
3011
  if (type === "collapsible") {
2976
3012
  return /* @__PURE__ */ jsxs(Accordion, { variant, onToggle: onToggle || void 0, narrow: true, className: className2, children: [
2977
3013
  /* @__PURE__ */ jsx("template", { slot: "title", children: title }),
2978
3014
  /* @__PURE__ */ jsx("template", { slot: "icon", children: renderedIcon }),
2979
- /* @__PURE__ */ jsx("template", { slot: "content", children: children2 }),
2980
- /* @__PURE__ */ jsx("div", { slot: "actions", className: styles$j.alertActions, children: actions })
3015
+ /* @__PURE__ */ jsxs("template", { slot: "content", children: [
3016
+ children2,
3017
+ /* @__PURE__ */ jsx("div", { className: styles$m.alertActions, children: actions })
3018
+ ] })
2981
3019
  ] });
2982
3020
  }
2983
3021
  if (type === "callToAction") {
2984
3022
  return /* @__PURE__ */ jsxs(
2985
3023
  "div",
2986
3024
  {
2987
- className: cx(styles$j.alert, className2, variantMap[variant], {
2988
- [styles$j.alertWithoutIcon]: !renderedIcon
3025
+ className: cx(styles$m.alert, className2, variantMap$1[variant], {
3026
+ [styles$m.alertWithoutIcon]: !renderedIcon
2989
3027
  }),
2990
3028
  role: "alert",
2991
3029
  "data-testid": testId,
2992
3030
  children: [
2993
- /* @__PURE__ */ jsxs("div", { className: styles$j.alertHeader, children: [
3031
+ /* @__PURE__ */ jsxs("div", { className: styles$m.alertHeader, children: [
2994
3032
  renderedIcon,
2995
- title && /* @__PURE__ */ jsx("span", { className: styles$j.alertTitle, children: title }),
2996
- !!actions && /* @__PURE__ */ jsx("div", { className: styles$j.alertActions, children: actions })
3033
+ title && /* @__PURE__ */ jsx("span", { className: styles$m.alertTitle, children: title }),
3034
+ !!actions && /* @__PURE__ */ jsx("div", { className: styles$m.alertActions, children: actions })
2997
3035
  ] }),
2998
- !!children2 && /* @__PURE__ */ jsx("div", { className: styles$j.alertExplanation, children: children2 })
3036
+ !!children2 && /* @__PURE__ */ jsx("div", { className: styles$m.alertExplanation, children: children2 })
2999
3037
  ]
3000
3038
  }
3001
3039
  );
@@ -3003,15 +3041,15 @@ const Alert = ({
3003
3041
  return /* @__PURE__ */ jsxs(
3004
3042
  "div",
3005
3043
  {
3006
- className: cx(styles$j.alert, className2, variantMap[variant], {
3007
- [styles$j.alertWithoutIcon]: !renderedIcon
3044
+ className: cx(styles$m.alert, className2, variantMap$1[variant], {
3045
+ [styles$m.alertWithoutIcon]: !renderedIcon
3008
3046
  }),
3009
3047
  role: "alert",
3010
3048
  "data-testid": testId,
3011
3049
  children: [
3012
- /* @__PURE__ */ jsxs("div", { className: styles$j.alertHeader, children: [
3050
+ /* @__PURE__ */ jsxs("div", { className: styles$m.alertHeader, children: [
3013
3051
  renderedIcon,
3014
- title && /* @__PURE__ */ jsx("span", { className: styles$j.alertTitle, children: title }),
3052
+ title && /* @__PURE__ */ jsx("span", { className: styles$m.alertTitle, children: title }),
3015
3053
  type === "dismissible" && /* @__PURE__ */ jsx(
3016
3054
  Button,
3017
3055
  {
@@ -3019,12 +3057,12 @@ const Alert = ({
3019
3057
  tertiary: true,
3020
3058
  icon: "cross",
3021
3059
  onClick: closeAlert,
3022
- className: styles$j.alertCloseButton
3060
+ className: styles$m.alertCloseButton
3023
3061
  }
3024
3062
  )
3025
3063
  ] }),
3026
- !!children2 && /* @__PURE__ */ jsx("div", { className: styles$j.alertExplanation, children: children2 }),
3027
- !!actions && /* @__PURE__ */ jsx("div", { className: styles$j.alertActions, children: actions })
3064
+ !!children2 && /* @__PURE__ */ jsx("div", { className: styles$m.alertExplanation, children: children2 }),
3065
+ !!actions && /* @__PURE__ */ jsx("div", { className: styles$m.alertActions, children: actions })
3028
3066
  ]
3029
3067
  }
3030
3068
  );
@@ -3111,28 +3149,29 @@ function ServerValidationErrors({
3111
3149
  validationErrors,
3112
3150
  formUtils
3113
3151
  }) {
3152
+ const { i18n } = useI18nContext();
3114
3153
  const validationErrorFieldNames = Object.keys(validationErrors || {});
3115
3154
  const getValidationErrorMessage = useCallback(
3116
- () => formUtils.getVal({
3155
+ () => i18n.get({
3117
3156
  key: "fieldHasUnsupportedFormats",
3118
3157
  values: { fieldName: formUtils.getLabel(validationErrorFieldNames[0]) }
3119
- }).toString(),
3158
+ }),
3120
3159
  [formUtils, validationErrorFieldNames]
3121
3160
  );
3122
- return /* @__PURE__ */ jsx(Alert, { title: formUtils.getVal("informationCouldNotBeSubmitted"), variant: "error", children: (validationErrorFieldNames == null ? void 0 : validationErrorFieldNames.length) === 1 ? /* @__PURE__ */ jsxs("div", { "data-testid": "validation-error--case-1", children: [
3161
+ return /* @__PURE__ */ jsx(Alert, { title: i18n.get("informationCouldNotBeSubmitted"), variant: "error", children: (validationErrorFieldNames == null ? void 0 : validationErrorFieldNames.length) === 1 ? /* @__PURE__ */ jsxs("div", { "data-testid": "validation-error--case-1", children: [
3123
3162
  getValidationErrorMessage(),
3124
3163
  " ",
3125
3164
  /* @__PURE__ */ jsx(
3126
3165
  NavigateToFieldLink,
3127
3166
  {
3128
3167
  fieldName: validationErrorFieldNames[0],
3129
- label: formUtils.getVal("updateTheInformation")
3168
+ label: i18n.get("updateTheInformation")
3130
3169
  }
3131
3170
  ),
3132
3171
  " ",
3133
- formUtils.getVal("andResubmit")
3172
+ i18n.get("andResubmit")
3134
3173
  ] }) : /* @__PURE__ */ jsxs("div", { "data-testid": "validation-error--case-2", children: [
3135
- formUtils.getVal("someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit"),
3174
+ i18n.get("someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit"),
3136
3175
  /* @__PURE__ */ jsx("ul", { children: validationErrorFieldNames.map((fieldName) => /* @__PURE__ */ jsx(
3137
3176
  "li",
3138
3177
  {
@@ -3163,23 +3202,23 @@ function StateContextWatcher({
3163
3202
  }
3164
3203
  var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
3165
3204
  DocumentType2["BANK_STATEMENT"] = "bankStatement";
3205
+ DocumentType2["CONSTITUTIONAL_DOCUMENT"] = "constitutionalDocument";
3166
3206
  DocumentType2["DRIVERS_LICENSE"] = "driversLicense";
3207
+ DocumentType2["DRIVING_LICENCE"] = "driving_licence";
3167
3208
  DocumentType2["IDENTITY_CARD"] = "identityCard";
3209
+ DocumentType2["NATIONAL_IDENTITY_CARD"] = "national_identity_card";
3168
3210
  DocumentType2["NATIONAL_ID_NUMBER"] = "nationalIdNumber";
3169
3211
  DocumentType2["PASSPORT"] = "passport";
3170
3212
  DocumentType2["PROOF_OF_ADDRESS"] = "proofOfAddress";
3213
+ DocumentType2["PROOF_OF_DIRECTOR"] = "proofOfDirector";
3214
+ DocumentType2["PROOF_OF_FUNDING"] = "proofOfFundingOrWealthSource";
3171
3215
  DocumentType2["PROOF_OF_NATIONAL_ID_NUMBER"] = "proofOfNationalIdNumber";
3216
+ DocumentType2["PROOF_OF_ORGANIZATION_TAX_INFO"] = "proofOfOrganizationTaxInfo";
3217
+ DocumentType2["PROOF_OF_RELATIONSHIP"] = "proofOfRelationship";
3172
3218
  DocumentType2["PROOF_OF_RESIDENCY"] = "proofOfResidency";
3173
3219
  DocumentType2["REGISTRATION_DOCUMENT"] = "registrationDocument";
3174
- DocumentType2["VAT_DOCUMENT"] = "vatDocument";
3175
- DocumentType2["CONSTITUTIONAL_DOCUMENT"] = "constitutionalDocument";
3176
- DocumentType2["DRIVING_LICENCE"] = "driving_licence";
3177
- DocumentType2["NATIONAL_IDENTITY_CARD"] = "national_identity_card";
3178
3220
  DocumentType2["RESIDENCE_PERMIT"] = "residence_permit";
3179
- DocumentType2["PROOF_OF_ORGANIZATION_TAX_INFO"] = "proofOfOrganizationTaxInfo";
3180
- DocumentType2["PROOF_OF_RELATIONSHIP"] = "proofOfRelationship";
3181
- DocumentType2["PROOF_OF_DIRECTOR"] = "proofOfDirector";
3182
- DocumentType2["PROOF_OF_FUNDING"] = "proofOfFundingOrWealthSource";
3221
+ DocumentType2["VAT_DOCUMENT"] = "vatDocument";
3183
3222
  return DocumentType2;
3184
3223
  })(DocumentType || {});
3185
3224
  function getFormProps(props, innerFormId) {
@@ -3344,6 +3383,7 @@ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
3344
3383
  ExperimentNames2["ShowCustomerSupportV4"] = "ShowCustomerSupportV4";
3345
3384
  ExperimentNames2["EnableRegistrationAndTaxAbsentStatesV4"] = "EnableRegistrationAndTaxAbsentStatesV4";
3346
3385
  ExperimentNames2["CredentialBankingWeightage_EmphasizeCredentialBankingFlow"] = "CredentialBankingWeightage_EmphasizeCredentialBankingFlow";
3386
+ ExperimentNames2["EnableManualCompanyTinVerification"] = "EnableManualCompanyTinVerification";
3347
3387
  return ExperimentNames2;
3348
3388
  })(ExperimentNames || {});
3349
3389
  const debounce$1 = (func, delay) => {
@@ -4389,7 +4429,6 @@ class UserEvents {
4389
4429
  subCategory: "hosted onboarding",
4390
4430
  countryCode: void 0,
4391
4431
  capabilities: void 0,
4392
- legalEntityId: void 0,
4393
4432
  task: void 0
4394
4433
  };
4395
4434
  this.sharedEventProperties = {};
@@ -4412,11 +4451,14 @@ class UserEvents {
4412
4451
  this.notifySubscribers();
4413
4452
  }
4414
4453
  /**
4415
- * Starts a timer for an event to measure the time it takes for an event to occur. Time is ended when `addEvent` is executed with the same key
4454
+ * Adds an event with context specific to page-related events
4416
4455
  */
4417
- startEvent(eventName) {
4418
- this.add({ type: "start_event", name: eventName });
4419
- this.notifySubscribers();
4456
+ addPageEvent(eventName, properties) {
4457
+ this.addEvent(eventName, {
4458
+ actionLevel: "page",
4459
+ page: this.sharedEventProperties.page,
4460
+ ...properties
4461
+ });
4420
4462
  }
4421
4463
  /**
4422
4464
  * Adds an event with context specific to field-related events
@@ -4428,6 +4470,13 @@ class UserEvents {
4428
4470
  ...properties
4429
4471
  });
4430
4472
  }
4473
+ /**
4474
+ * Starts a timer for an event to measure the time it takes for an event to occur. Time is ended when `addEvent` is executed with the same key
4475
+ */
4476
+ startEvent(eventName) {
4477
+ this.add({ type: "start_event", name: eventName });
4478
+ this.notifySubscribers();
4479
+ }
4431
4480
  /**
4432
4481
  * Subscribes a callback to analytics events. It gets called every time
4433
4482
  * one of the above public methods get called, and the event data is passed back as an array.
@@ -5034,7 +5083,7 @@ var hasOwnProperty = objectProto$1.hasOwnProperty;
5034
5083
  var nativeObjectToString$1 = objectProto$1.toString;
5035
5084
  var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
5036
5085
  function getRawTag(value) {
5037
- var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
5086
+ var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag2 = value[symToStringTag$1];
5038
5087
  try {
5039
5088
  value[symToStringTag$1] = void 0;
5040
5089
  var unmasked = true;
@@ -5043,7 +5092,7 @@ function getRawTag(value) {
5043
5092
  var result = nativeObjectToString$1.call(value);
5044
5093
  if (unmasked) {
5045
5094
  if (isOwn) {
5046
- value[symToStringTag$1] = tag;
5095
+ value[symToStringTag$1] = tag2;
5047
5096
  } else {
5048
5097
  delete value[symToStringTag$1];
5049
5098
  }
@@ -5191,7 +5240,7 @@ const getAssociatedLeAnalyticsPayload = ({
5191
5240
  associatedLegalEntityOrgType: associatedLegalEntityOrg.type
5192
5241
  } : {}
5193
5242
  });
5194
- const debouncedInputEvent$1 = debounce(
5243
+ const debouncedInputEvent = debounce(
5195
5244
  (properties) => userEvents.addFieldEvent("Interacted with form field", properties),
5196
5245
  500
5197
5246
  );
@@ -5343,7 +5392,7 @@ const Select = ({
5343
5392
  (e) => {
5344
5393
  const { value } = e.target;
5345
5394
  if (enableTracking) {
5346
- debouncedInputEvent$1({ actionType: "input", field: name });
5395
+ debouncedInputEvent({ actionType: "input", field: name });
5347
5396
  }
5348
5397
  if (isSearch) debouncedOnSearch(value);
5349
5398
  if (!onSearchTextChange) {
@@ -5673,7 +5722,7 @@ const InputBase = forwardRef((props, ref) => {
5673
5722
  const handleInput = (e) => {
5674
5723
  var _a2;
5675
5724
  if (enableTracking) {
5676
- debouncedInputEvent$1({ actionType: "input", field: name });
5725
+ debouncedInputEvent({ actionType: "input", field: name });
5677
5726
  }
5678
5727
  e.target.value = convertFullToHalf(e.target.value);
5679
5728
  (_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
@@ -11693,7 +11742,8 @@ const businessDetailsBase = {
11693
11742
  registrationNumber: { rule: "countryRequiresRegistrationNumberForCompanies" },
11694
11743
  exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
11695
11744
  eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
11696
- countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" }
11745
+ countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
11746
+ taxDocument: { rule: "ifCountryUsAndTinFailed" }
11697
11747
  };
11698
11748
  const taxInformationBase$1 = {
11699
11749
  vatNumber: { rule: "countryUsesVat" },
@@ -12559,10 +12609,6 @@ function Dropzone(props) {
12559
12609
  ] });
12560
12610
  }
12561
12611
  const logger$M = createLogger("TextArea");
12562
- const debouncedInputEvent = debounce(
12563
- (properties) => userEvents.addFieldEvent("Interacted with form field", properties),
12564
- 500
12565
- );
12566
12612
  function TextArea(props) {
12567
12613
  const { classNameModifiers, uniqueId, ...passedProps } = props;
12568
12614
  const {
@@ -13014,7 +13060,7 @@ const financialInfoValidationRules = {
13014
13060
  }
13015
13061
  };
13016
13062
  const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
13017
- const styles$g = {
13063
+ const styles$j = {
13018
13064
  financialInformationReportedValueOptions
13019
13065
  };
13020
13066
  const logger$L = createLogger("InputCurrency");
@@ -13061,7 +13107,7 @@ const InputCurrency = ({
13061
13107
  };
13062
13108
  const reportedValue = "adyen-kyc-reported-value";
13063
13109
  const reportedValueInput = "adyen-kyc-reported-value-input";
13064
- const styles$f = {
13110
+ const styles$i = {
13065
13111
  reportedValue,
13066
13112
  reportedValueInput
13067
13113
  };
@@ -13076,7 +13122,7 @@ const ReportedValue = ({
13076
13122
  isValid
13077
13123
  }) => {
13078
13124
  const { i18n } = useI18nContext();
13079
- return /* @__PURE__ */ jsx("div", { className: styles$f.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
13125
+ return /* @__PURE__ */ jsx("div", { className: styles$i.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
13080
13126
  InputCurrency,
13081
13127
  {
13082
13128
  ...childProps,
@@ -13084,7 +13130,7 @@ const ReportedValue = ({
13084
13130
  currency,
13085
13131
  amount,
13086
13132
  onAmountChanged,
13087
- className: styles$f.reportedValueInput,
13133
+ className: styles$i.reportedValueInput,
13088
13134
  "aria-label": label
13089
13135
  }
13090
13136
  ) }) });
@@ -13221,7 +13267,7 @@ function FinancialInformation(props) {
13221
13267
  ],
13222
13268
  onChange: updateReportedValueOption,
13223
13269
  showContentOnlyOnSelected: true,
13224
- className: styles$g.financialInformationReportedValueOptions
13270
+ className: styles$j.financialInformationReportedValueOptions
13225
13271
  }
13226
13272
  )
13227
13273
  }
@@ -13271,7 +13317,6 @@ const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [
13271
13317
  CountryCodes.UnitedKingdom,
13272
13318
  CountryCodes.France
13273
13319
  ];
13274
- const COUNTRIES_WITH_COMMA_SEPARATED = [CountryCodes.Spain];
13275
13320
  const ADDRESS_SCHEMAS = {
13276
13321
  [CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
13277
13322
  [CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
@@ -14173,8 +14218,7 @@ function AddressForm(props) {
14173
14218
  if (!street && line1) return handleChangeFor("address", "input")(line1);
14174
14219
  if (hasHouseNumber) {
14175
14220
  const isHouseNumberFirst = data.country ? COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country) : false;
14176
- const needsComma = data.country ? COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country) : false;
14177
- const formattedAddress = isHouseNumberFirst ? `${houseNumberOrName}${needsComma ? ", " : " "}${street}` : `${street}${needsComma ? ", " : " "}${houseNumberOrName}`;
14221
+ const formattedAddress = isHouseNumberFirst ? `${houseNumberOrName}${" "}${street}` : `${street}${" "}${houseNumberOrName}`;
14178
14222
  return handleChangeFor("address", "input")(formattedAddress);
14179
14223
  }
14180
14224
  return handleChangeFor("address", "input")(street);
@@ -14376,8 +14420,7 @@ function FieldContainer({
14376
14420
  if (!street && line1) return handleChangeFor("address", "input")(line1);
14377
14421
  if (hasHouseNumber) {
14378
14422
  const isHouseNumberFirst = data.country ? COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country) : false;
14379
- const needsComma = data.country ? COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country) : false;
14380
- const formattedAddress = isHouseNumberFirst ? `${houseNumberOrName}${needsComma ? ", " : " "}${street}` : `${street}${needsComma ? ", " : " "}${houseNumberOrName}`;
14423
+ const formattedAddress = isHouseNumberFirst ? `${houseNumberOrName}${" "}${street}` : `${street}${" "}${houseNumberOrName}`;
14381
14424
  return handleChangeFor("address", "input")(formattedAddress);
14382
14425
  }
14383
14426
  return handleChangeFor("address", "input")(street);
@@ -14662,17 +14705,13 @@ function Address({
14662
14705
  trustedFields,
14663
14706
  shouldValidate
14664
14707
  });
14665
- useEffect(
14666
- () => {
14667
- if (verifiedAddress) {
14668
- entriesOf(verifiedAddress).forEach(([key, value]) => {
14669
- if (formData[key] !== value) handleChangeFor(key, "input")(value);
14670
- });
14671
- }
14672
- },
14673
- // eslint-disable-next-line react-hooks/exhaustive-deps
14674
- [verifiedAddress]
14675
- );
14708
+ useEffect(() => {
14709
+ if (verifiedAddress) {
14710
+ entriesOf(verifiedAddress).forEach(([key, value]) => {
14711
+ if (formData[key] !== value) handleChangeFor(key, "input")(value);
14712
+ });
14713
+ }
14714
+ }, [verifiedAddress]);
14676
14715
  const formUtils = createFormUtils(
14677
14716
  {
14678
14717
  labels: labels2,
@@ -15761,7 +15800,8 @@ const rules$3 = ({
15761
15800
  taskType,
15762
15801
  isExperimentEnabled = () => false,
15763
15802
  accountHolder,
15764
- rootLegalEntity
15803
+ rootLegalEntity,
15804
+ tinMatched
15765
15805
  }) => ({
15766
15806
  countryRequiresStateOrProvince: () => {
15767
15807
  if (COUNTRIES_WITH_STATES_DATASET.includes(country)) {
@@ -15933,6 +15973,11 @@ const rules$3 = ({
15933
15973
  if (isExperimentEnabled("EnableEInvoicingCodeField") && COUNTRIES_REQUIRING_E_INVOICING_CODE.includes(country)) {
15934
15974
  return "REQUIRED";
15935
15975
  }
15976
+ },
15977
+ ifCountryUsAndTinFailed: () => {
15978
+ if (isExperimentEnabled("EnableManualCompanyTinVerification") && isExperimentEnabled("EnableNewBusinessDetailsFlow") && tinMatched === false && country === CountryCodes.UnitedStates) {
15979
+ return "REQUIRED";
15980
+ }
15936
15981
  }
15937
15982
  });
15938
15983
  const logger$I = createLogger("mapPayoutAccountSchemaToApiBankAccount");
@@ -16060,6 +16105,11 @@ const getObscuredAccountNumber = ({
16060
16105
  accountIdentifier,
16061
16106
  realLastFour
16062
16107
  }) => realLastFour ? `*******${realLastFour}` : accountIdentifier;
16108
+ var EntityType = /* @__PURE__ */ ((EntityType2) => {
16109
+ EntityType2["BANK_ACCOUNT"] = "BankAccount";
16110
+ EntityType2["LEGAL_ENTITY"] = "LegalEntity";
16111
+ return EntityType2;
16112
+ })(EntityType || {});
16063
16113
  const mandatoryApiFields = {
16064
16114
  INDIVIDUAL: [
16065
16115
  "personalDetails.firstName",
@@ -16341,7 +16391,7 @@ const remediationIndividualApiKeyMapping = {
16341
16391
  [DocumentType.PROOF_OF_RELATIONSHIP]: "proofOfRelationship.proofOfRelationship"
16342
16392
  };
16343
16393
  const remediationPayoutApiKeyMapping = {
16344
- bankAccount: "payoutAccountDetails",
16394
+ [EntityType.BANK_ACCOUNT]: "payoutAccountDetails",
16345
16395
  ...payoutComponentKeyMapping,
16346
16396
  [DocumentType.BANK_STATEMENT]: "payoutAccountDocuments.bankStatementDocument"
16347
16397
  };
@@ -17224,7 +17274,7 @@ const useIdVerificationToken = ({
17224
17274
  };
17225
17275
  const loaderWrapperLoader = "adyen-kyc-loader-wrapper-loader";
17226
17276
  const loaderWrapperLoaderActive = "adyen-kyc-loader-wrapper-loader-active";
17227
- const styles$e = {
17277
+ const styles$h = {
17228
17278
  loaderWrapperLoader,
17229
17279
  loaderWrapperLoaderActive
17230
17280
  };
@@ -17239,13 +17289,13 @@ const LoaderWrapper = ({
17239
17289
  const opacitySyle = status === "loading" ? {
17240
17290
  opacity: formOpacityWhenLoading
17241
17291
  } : { opacity: 1 };
17242
- const loaderWrapperClass = cx(styles$e.loaderWrapperLoader, {
17243
- [styles$e.loaderWrapperLoaderActive]: status === "loading" && showSpinner
17292
+ const loaderWrapperClass = cx(styles$h.loaderWrapperLoader, {
17293
+ [styles$h.loaderWrapperLoaderActive]: status === "loading" && showSpinner
17244
17294
  });
17245
- const overlayClass = cx(styles$e.loaderWrapper, className2);
17295
+ const overlayClass = cx(styles$h.loaderWrapper, className2);
17246
17296
  return /* @__PURE__ */ jsxs("div", { className: overlayClass, style: { position: "relative" }, children: [
17247
17297
  /* @__PURE__ */ jsx("div", { className: loaderWrapperClass, children: /* @__PURE__ */ jsx(Loader, { size: loaderSize }) }),
17248
- /* @__PURE__ */ jsx("div", { className: styles$e.loaderWrapperForm, style: opacitySyle, children: children2 })
17298
+ /* @__PURE__ */ jsx("div", { className: styles$h.loaderWrapperForm, style: opacitySyle, children: children2 })
17249
17299
  ] });
17250
17300
  };
17251
17301
  const containerId = "adyen-kyc-id-verification";
@@ -23074,11 +23124,6 @@ const getCountrySpecificTrustTypeOptions = (country) => {
23074
23124
  return countrySpecificTrustTypeOption;
23075
23125
  });
23076
23126
  };
23077
- var EntityType = /* @__PURE__ */ ((EntityType2) => {
23078
- EntityType2["BANK_ACCOUNT"] = "BankAccount";
23079
- EntityType2["LEGAL_ENTITY"] = "LegalEntity";
23080
- return EntityType2;
23081
- })(EntityType || {});
23082
23127
  var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
23083
23128
  VerificationStatus2["VALID"] = "valid";
23084
23129
  VerificationStatus2["PENDING"] = "pending";
@@ -27719,7 +27764,7 @@ const preferInstantVerificationMethod = "adyen-kyc-prefer-instant-verification-m
27719
27764
  const preferInstantVerificationMethodCard = "adyen-kyc-prefer-instant-verification-method-card";
27720
27765
  const preferInstantVerificationMethodInstantButton = "adyen-kyc-prefer-instant-verification-method-instant-button";
27721
27766
  const preferInstantVerificationMethodModalFooter = "adyen-kyc-prefer-instant-verification-method-modal-footer";
27722
- const styles$d = {
27767
+ const styles$g = {
27723
27768
  preferInstantVerificationMethod,
27724
27769
  preferInstantVerificationMethodCard,
27725
27770
  preferInstantVerificationMethodInstantButton,
@@ -27799,7 +27844,7 @@ const modalFooter = "adyen-kyc-modal-footer";
27799
27844
  const modalButton = "adyen-kyc-modal-button";
27800
27845
  const modalLarge = "adyen-kyc-modal-large";
27801
27846
  const modalFullscreen = "adyen-kyc-modal-fullscreen";
27802
- const styles$c = {
27847
+ const styles$f = {
27803
27848
  modal,
27804
27849
  modalSmall,
27805
27850
  modalMain,
@@ -27811,7 +27856,12 @@ const styles$c = {
27811
27856
  modalLarge,
27812
27857
  modalFullscreen
27813
27858
  };
27814
- const Modal = ({ children: children2, size = "medium", onClose }) => {
27859
+ const Modal = ({
27860
+ children: children2,
27861
+ size = "medium",
27862
+ onClose,
27863
+ showCloseButton = true
27864
+ }) => {
27815
27865
  const dialogRef = useRef(null);
27816
27866
  useLayoutEffect(() => {
27817
27867
  const dialogElement = dialogRef.current;
@@ -27832,23 +27882,23 @@ const Modal = ({ children: children2, size = "medium", onClose }) => {
27832
27882
  "dialog",
27833
27883
  {
27834
27884
  ref: dialogRef,
27835
- className: cx(styles$c.modal, {
27836
- [styles$c.modalSmall]: size === "small",
27837
- [styles$c.modalLarge]: size === "large",
27838
- [styles$c.modalFullscreen]: size === "fullscreen"
27885
+ className: cx(styles$f.modal, {
27886
+ [styles$f.modalSmall]: size === "small",
27887
+ [styles$f.modalLarge]: size === "large",
27888
+ [styles$f.modalFullscreen]: size === "fullscreen"
27839
27889
  }),
27840
27890
  onClose,
27841
27891
  role: "dialog",
27842
- children: /* @__PURE__ */ jsx("div", { className: styles$c.modalWrapper, children: /* @__PURE__ */ jsxs("div", { className: styles$c.modalMain, children: [
27843
- /* @__PURE__ */ jsx("div", { className: styles$c.modalButton, children: /* @__PURE__ */ jsx(Button, { tertiary: true, ariaLabel: "close", icon: "cross", onClick: onClose, shaded: true }) }),
27892
+ children: /* @__PURE__ */ jsx("div", { className: styles$f.modalWrapper, children: /* @__PURE__ */ jsxs("div", { className: styles$f.modalMain, children: [
27893
+ showCloseButton && /* @__PURE__ */ jsx("div", { className: styles$f.modalButton, children: /* @__PURE__ */ jsx(Button, { tertiary: true, ariaLabel: "close", icon: "cross", onClick: onClose, shaded: true }) }),
27844
27894
  children2
27845
27895
  ] }) })
27846
27896
  }
27847
27897
  );
27848
27898
  };
27849
- const ModalHeader = ({ children: children2 }) => /* @__PURE__ */ jsx("header", { className: styles$c.modalHeader, children: children2 });
27850
- const ModalContent = ({ children: children2 }) => /* @__PURE__ */ jsx("section", { className: styles$c.modalContent, children: children2 });
27851
- const ModalFooter = ({ children: children2 }) => /* @__PURE__ */ jsx("footer", { className: styles$c.modalFooter, children: children2 });
27899
+ const ModalHeader = ({ children: children2 }) => /* @__PURE__ */ jsx("header", { className: styles$f.modalHeader, children: children2 });
27900
+ const ModalContent = ({ children: children2 }) => /* @__PURE__ */ jsx("section", { className: styles$f.modalContent, children: children2 });
27901
+ const ModalFooter = ({ children: children2 }) => /* @__PURE__ */ jsx("footer", { className: styles$f.modalFooter, children: children2 });
27852
27902
  const PreferInstantVerificationMethod = ({
27853
27903
  loadingStatus,
27854
27904
  provider,
@@ -27917,7 +27967,7 @@ const PreferInstantVerificationMethod = ({
27917
27967
  label: hideVerificationWidget ? i18n.get("addAccountWith", {
27918
27968
  values: { providerName: iconName ? "" : provider.name }
27919
27969
  }) : void 0,
27920
- className: styles$d.preferInstantVerificationMethodInstantButton,
27970
+ className: styles$g.preferInstantVerificationMethodInstantButton,
27921
27971
  onClick: handleClickInstantButton,
27922
27972
  disabled: bankInfoValidated,
27923
27973
  loading: !hideVerificationWidget,
@@ -27925,8 +27975,8 @@ const PreferInstantVerificationMethod = ({
27925
27975
  iconPosition: "right",
27926
27976
  block: true
27927
27977
  }
27928
- ) : /* @__PURE__ */ jsx(Card, { background: "secondary", className: styles$d.preferInstantVerificationMethodCard, children: i18n.get("unfortunatelyAnInstantProvider") });
27929
- return /* @__PURE__ */ jsxs("div", { className: styles$d.preferInstantVerificationMethod, children: [
27978
+ ) : /* @__PURE__ */ jsx(Card, { background: "secondary", className: styles$g.preferInstantVerificationMethodCard, children: i18n.get("unfortunatelyAnInstantProvider") });
27979
+ return /* @__PURE__ */ jsxs("div", { className: styles$g.preferInstantVerificationMethod, children: [
27930
27980
  loadingStatus === "loading" ? /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-bottom-8", children: /* @__PURE__ */ jsx(Skeleton, { height: "2.5rem" }) }) : InstantButton,
27931
27981
  /* @__PURE__ */ jsx(
27932
27982
  Button,
@@ -27964,7 +28014,7 @@ const PreferInstantVerificationMethod = ({
27964
28014
  isModalOpen ? /* @__PURE__ */ jsxs(Modal, { size: "small", onClose: () => setIsModalOpen(false), children: [
27965
28015
  /* @__PURE__ */ jsx(ModalHeader, { children: i18n.get("manuallyAddAccountQuestion") }),
27966
28016
  /* @__PURE__ */ jsx(ModalContent, { children: i18n.get("addingAndVerifiyingABankAccount") }),
27967
- /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$d.preferInstantVerificationMethodModalFooter, children: [
28017
+ /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$g.preferInstantVerificationMethodModalFooter, children: [
27968
28018
  /* @__PURE__ */ jsx(Button, { label: i18n.get("yesContinue"), onClick: handleClickContinue, secondary: true }),
27969
28019
  /* @__PURE__ */ jsx(Button, { onClick: () => setIsModalOpen(false), label: i18n.get("cancel") })
27970
28020
  ] }) })
@@ -28062,6 +28112,7 @@ function PayoutVerificationMethod(props) {
28062
28112
  });
28063
28113
  const formUtils = createFormUtils(props, i18n);
28064
28114
  const { sliceData, updateStateSlice } = useGlobalDataSlice("payoutVerificationMethod");
28115
+ const { clearStateSlice: clearPayoutAccountDetails } = useGlobalDataSlice("payoutAccountDetails");
28065
28116
  useEffect(
28066
28117
  () => updateStateSlice({ data: { ...sliceData, ...data }, errors, valid, fieldProblems }),
28067
28118
  [data, errors, fieldProblems, valid]
@@ -28126,7 +28177,10 @@ function PayoutVerificationMethod(props) {
28126
28177
  readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
28127
28178
  allowedCountries: allowedBankCountries,
28128
28179
  classNameModifiers: ["country"],
28129
- handleChangeFor: () => handleChangeFor("bankCountry", "input"),
28180
+ handleChangeFor: () => (e) => {
28181
+ clearPayoutAccountDetails();
28182
+ return handleChangeFor("bankCountry", "input")(e);
28183
+ },
28130
28184
  helperText: {
28131
28185
  country: intraRegionCrossBorderPayoutsAllowed ? void 0 : i18n.get(
28132
28186
  legalEntityType === LegalEntityType.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered"
@@ -29410,22 +29464,16 @@ const getComponentMappingFromLEFieldPath = (context, entityType, isExperimentEna
29410
29464
  }
29411
29465
  switch (entityType) {
29412
29466
  case LegalEntityType.INDIVIDUAL:
29413
- return remediationIndividualApiKeyMapping[context.key];
29467
+ return context.key in remediationIndividualApiKeyMapping ? remediationIndividualApiKeyMapping[context.key] : void 0;
29414
29468
  case LegalEntityType.ORGANIZATION:
29415
- return (isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewBusinessDetailsFlow")) ? (
29416
- // @ts-ignore
29417
- remediationBusinessDetailsApiKeyMapping[context.key]
29418
- ) : (
29419
- // @ts-ignore
29420
- remediationCompanyApiKeyMapping[context.key]
29421
- );
29469
+ return (isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewBusinessDetailsFlow")) ? context.key in remediationBusinessDetailsApiKeyMapping ? remediationBusinessDetailsApiKeyMapping[context.key] : void 0 : context.key in remediationCompanyApiKeyMapping ? remediationCompanyApiKeyMapping[context.key] : void 0;
29422
29470
  case EntityType.BANK_ACCOUNT:
29423
- return remediationPayoutApiKeyMapping[context.key];
29471
+ return context.key in remediationPayoutApiKeyMapping ? remediationPayoutApiKeyMapping[context.key] : void 0;
29424
29472
  case LegalEntityType.SOLE_PROPRIETORSHIP:
29425
- return remediationSolePropKeyMapping[context.key];
29473
+ return context.key in remediationSolePropKeyMapping ? remediationSolePropKeyMapping[context.key] : void 0;
29426
29474
  case LegalEntityType.TRUST:
29427
29475
  default:
29428
- return remediationTrustKeyMapping[context.key];
29476
+ return context.key in remediationTrustKeyMapping ? remediationTrustKeyMapping[context.key] : void 0;
29429
29477
  }
29430
29478
  };
29431
29479
  const getRemediationsWithFormsAndFields = (remediatingActions, entityType, isExperimentEnabled) => {
@@ -29679,11 +29727,12 @@ function VerificationErrors({
29679
29727
  formUtils
29680
29728
  }) {
29681
29729
  var _a2, _b2;
29682
- const getErrorMessage = (errorCode) => formUtils.getVal(`errorMessage_${errorCode}`);
29730
+ const { i18n } = useI18nContext();
29731
+ const getErrorMessage = (errorCode) => i18n.get(`errorMessage_${errorCode}`);
29683
29732
  const getRemediationMessage = (remediationActions, uploadFieldCollection) => {
29684
29733
  var _a3, _b3;
29685
29734
  if ((remediationActions == null ? void 0 : remediationActions.length) === 1) {
29686
- return formUtils.getVal(`remediationMessage_${remediationActions[0].code}`);
29735
+ return i18n.get(`remediationMessage_${remediationActions[0].code}`);
29687
29736
  }
29688
29737
  const uploadFields = uploadFieldCollection && Object.keys(uploadFieldCollection);
29689
29738
  let uploadFilesCopy;
@@ -29697,7 +29746,7 @@ function VerificationErrors({
29697
29746
  NavigateToFieldLink,
29698
29747
  {
29699
29748
  fieldName: uploadField,
29700
- label: formUtils.getVal(
29749
+ label: i18n.get(
29701
29750
  `remediationMessage_${(_a4 = uploadFieldCollection[uploadField]) == null ? void 0 : _a4.remediation.code}`
29702
29751
  )
29703
29752
  }
@@ -29710,14 +29759,14 @@ function VerificationErrors({
29710
29759
  ] });
29711
29760
  } else {
29712
29761
  const firstUploadField = uploadFields[0];
29713
- const label = ` ${(_b3 = formUtils.getVal(`remediationMessage_${(_a3 = uploadFieldCollection[firstUploadField]) == null ? void 0 : _a3.remediation.code}`)) == null ? void 0 : _b3.toLowerCase()}`;
29762
+ const label = ` ${(_b3 = i18n.get(`remediationMessage_${(_a3 = uploadFieldCollection[firstUploadField]) == null ? void 0 : _a3.remediation.code}`)) == null ? void 0 : _b3.toLowerCase()}`;
29714
29763
  uploadFilesCopy = /* @__PURE__ */ jsx(NavigateToFieldLink, { fieldName: firstUploadField, label });
29715
29764
  }
29716
29765
  }
29717
29766
  return /* @__PURE__ */ jsxs(Fragment, { children: [
29718
- `${formUtils.getVal("reviewTheInformationBelowAndCorrectMistakesOr")} `,
29767
+ i18n.get("reviewTheInformationBelowAndCorrectMistakesOr"),
29719
29768
  uploadFilesCopy,
29720
- ` ${formUtils.getVal("thenResubmit")}`
29769
+ i18n.get("thenResubmit")
29721
29770
  ] });
29722
29771
  };
29723
29772
  let verificationErrorMsg;
@@ -29758,14 +29807,14 @@ function VerificationErrors({
29758
29807
  );
29759
29808
  } else if (childErrorCodes.length === 2) {
29760
29809
  verificationErrorMsg = /* @__PURE__ */ jsxs("div", { "data-testid": "verification-error--case-2-2", children: [
29761
- formUtils.getVal("weFoundTheFollowingIssues"),
29810
+ i18n.get("weFoundTheFollowingIssues"),
29762
29811
  /* @__PURE__ */ jsx("ul", { children: childErrorCodes.map((subErrorCode) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("span", { children: getErrorMessage(subErrorCode) }) }, subErrorCode)) }),
29763
29812
  /* @__PURE__ */ jsx("span", { children: getRemediationMessage(onlyChildRemediationActions, fileUploadRemediationFields) })
29764
29813
  ] });
29765
29814
  } else {
29766
29815
  verificationErrorMsg = /* @__PURE__ */ jsx("div", { "data-testid": "verification-error--case-2-3", children: getRemediationMessage(onlyChildRemediationActions, fileUploadRemediationFields) });
29767
29816
  }
29768
- const defaultHeading = parentCode ? getErrorMessage(parentCode) : formUtils.getVal("correctErrorsResubmit");
29817
+ const defaultHeading = parentCode ? getErrorMessage(parentCode) : i18n.get("correctErrorsResubmit");
29769
29818
  return /* @__PURE__ */ jsx(Alert, { title: defaultHeading, variant: "error", children: verificationErrorMsg });
29770
29819
  }
29771
29820
  function ErrorPanel({
@@ -29834,9 +29883,9 @@ function Summary({
29834
29883
  icon: "edit",
29835
29884
  onClick: () => {
29836
29885
  trackNavigation2({
29837
- fromForm: "summary",
29886
+ actionType: "edit",
29838
29887
  toForm: formName,
29839
- component: "Pencil icon"
29888
+ label: "Pencil icon"
29840
29889
  });
29841
29890
  editForm(formId);
29842
29891
  },
@@ -29876,6 +29925,9 @@ function Summary({
29876
29925
  Object.entries(innerForms).forEach(([innerFormName, innerFormFieldData]) => {
29877
29926
  const formName = i18n.get(labelData == null ? void 0 : labelData[innerFormName]) || i18n.get(innerFormName);
29878
29927
  if (typeof innerFormFieldData === "object" && innerFormFieldData !== null) {
29928
+ if (Object.values(innerFormFieldData).every((value) => isEmpty$1(value))) {
29929
+ return;
29930
+ }
29879
29931
  dataList.push(renderSummarySection(innerFormFieldData, labelData, formName, parentFormId));
29880
29932
  }
29881
29933
  });
@@ -29932,18 +29984,18 @@ function Summary({
29932
29984
  ] });
29933
29985
  }
29934
29986
  const trackNavigation = ({
29935
- fromForm,
29987
+ actionType,
29936
29988
  toForm,
29937
- component,
29989
+ label,
29990
+ returnValue,
29938
29991
  baseTrackingPayload
29939
29992
  }) => {
29940
- userEvents.addEvent("Clicked button", {
29941
- ...baseTrackingPayload,
29942
- actionLevel: "page",
29943
- actionType: "navigate",
29944
- page: fromForm,
29945
- label: component,
29946
- toPage: toForm
29993
+ userEvents.addPageEvent("Clicked button", {
29994
+ actionType,
29995
+ toPage: toForm,
29996
+ label,
29997
+ returnValue,
29998
+ ...baseTrackingPayload
29947
29999
  });
29948
30000
  };
29949
30001
  const getOpeningStep = (forms, remediationActions) => {
@@ -29987,7 +30039,7 @@ const useFormComposer = ({
29987
30039
  );
29988
30040
  }, [forms]);
29989
30041
  useEffect(() => {
29990
- userEvents.updateSharedEventProperties({ page: activeForm.formHeading || activeForm.formId });
30042
+ userEvents.updateSharedEventProperties({ page: activeForm.formName });
29991
30043
  }, [activeForm]);
29992
30044
  useEffect(() => {
29993
30045
  if (hasAlreadyNavigatedForm) return;
@@ -29996,14 +30048,6 @@ const useFormComposer = ({
29996
30048
  setActiveForm(openingStep);
29997
30049
  }
29998
30050
  }, [activeForm, forms, problems == null ? void 0 : problems.remediationActions, hasAlreadyNavigatedForm]);
29999
- const trackSectionCompletion = (formName) => {
30000
- userEvents.addEvent("Success", {
30001
- ...baseTrackingPayload,
30002
- actionLevel: "page",
30003
- actionType: "next",
30004
- page: formName
30005
- });
30006
- };
30007
30051
  const gotoFormByFormIndex = (nextFormIndex) => {
30008
30052
  if (formRef == null ? void 0 : formRef.current.verifyForm) {
30009
30053
  formRef.current.verifyForm(activeForm.formId).then((isVerified) => {
@@ -30027,6 +30071,12 @@ const useFormComposer = ({
30027
30071
  }
30028
30072
  if (!activeForm.isValid) {
30029
30073
  validateCurrentForm();
30074
+ trackNavigation({
30075
+ actionType: "next",
30076
+ label: "next",
30077
+ returnValue: "validation error",
30078
+ baseTrackingPayload
30079
+ });
30030
30080
  return;
30031
30081
  }
30032
30082
  if (isFinalStep) {
@@ -30034,27 +30084,25 @@ const useFormComposer = ({
30034
30084
  return;
30035
30085
  }
30036
30086
  setShouldValidate(false);
30037
- const toFormIndex = forms.findIndex((form) => form.formId === activeForm.formId) + 1;
30087
+ const toFormIndex = currentStep + 1;
30038
30088
  gotoFormByFormIndex(toFormIndex);
30039
30089
  trackNavigation({
30040
- fromForm: activeForm.formName,
30090
+ actionType: "next",
30041
30091
  toForm: forms[toFormIndex].formName,
30042
- component: "ActionBar",
30092
+ label: "next",
30093
+ returnValue: "success",
30043
30094
  baseTrackingPayload
30044
30095
  });
30045
- trackSectionCompletion(activeForm.formName);
30046
30096
  };
30047
30097
  const handleBackClick = () => {
30048
- const currentFormIndex = forms.findIndex((form) => form.formId === activeForm.formId);
30049
- if (currentFormIndex) {
30050
- const fromForm = forms[currentFormIndex];
30051
- const toForm = forms[currentFormIndex - 1];
30098
+ if (currentStep > 0) {
30099
+ const toForm = forms[currentStep - 1];
30052
30100
  setActiveForm(toForm);
30053
30101
  setHasAlreadyNavigatedForm(true);
30054
30102
  trackNavigation({
30055
- fromForm: fromForm.formName,
30103
+ actionType: "back",
30056
30104
  toForm: toForm.formName,
30057
- component: "ActionBar",
30105
+ label: "back",
30058
30106
  baseTrackingPayload
30059
30107
  });
30060
30108
  }
@@ -30754,19 +30802,13 @@ const addValidityToForms = (forms, formValidity, problems) => forms.map(({ formI
30754
30802
  const convertApiFieldNameToSchemaFieldName = (apiField, legalEntityType, isExperimentEnabled) => {
30755
30803
  switch (legalEntityType) {
30756
30804
  case LegalEntityType.INDIVIDUAL:
30757
- return individualApiKeyMapping[apiField];
30805
+ return apiField in individualApiKeyMapping ? individualApiKeyMapping[apiField] : void 0;
30758
30806
  case LegalEntityType.ORGANIZATION:
30759
- return (isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewBusinessDetailsFlow")) ? (
30760
- // @ts-ignore
30761
- businessDetailsApiKeyMapping[apiField]
30762
- ) : (
30763
- // @ts-ignore
30764
- companyApiKeyMapping[apiField]
30765
- );
30807
+ return (isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewBusinessDetailsFlow")) ? apiField in businessDetailsApiKeyMapping ? businessDetailsApiKeyMapping[apiField] : void 0 : apiField in companyApiKeyMapping ? companyApiKeyMapping[apiField] : void 0;
30766
30808
  case LegalEntityType.SOLE_PROPRIETORSHIP:
30767
- return solePropApiKeyMapping[apiField];
30809
+ return apiField in solePropApiKeyMapping ? solePropApiKeyMapping[apiField] : void 0;
30768
30810
  case LegalEntityType.TRUST:
30769
- return trustApiKeyMapping[apiField];
30811
+ return apiField in trustApiKeyMapping ? trustApiKeyMapping[apiField] : void 0;
30770
30812
  default:
30771
30813
  throw Error("No valid legal entity type, cannot convert");
30772
30814
  }
@@ -30829,7 +30871,7 @@ const structuredList = "adyen-kyc-structured-list";
30829
30871
  const structuredListListItem = "adyen-kyc-structured-list-list-item";
30830
30872
  const structuredListLabel = "adyen-kyc-structured-list-label";
30831
30873
  const structuredListValue = "adyen-kyc-structured-list-value";
30832
- const styles$b = {
30874
+ const styles$e = {
30833
30875
  structuredList,
30834
30876
  structuredListListItem,
30835
30877
  structuredListLabel,
@@ -30837,9 +30879,9 @@ const styles$b = {
30837
30879
  };
30838
30880
  const StructuredList = ({ items }) => {
30839
30881
  const { i18n } = useI18nContext();
30840
- return /* @__PURE__ */ jsx("dl", { className: styles$b.structuredList, children: items.map((item) => /* @__PURE__ */ jsxs("div", { className: styles$b.structuredListListItem, children: [
30841
- /* @__PURE__ */ jsx("dt", { className: styles$b.structuredListLabel, children: i18n.get(item.labelKey) }),
30842
- /* @__PURE__ */ jsx("dd", { className: styles$b.structuredListValue, children: item.value })
30882
+ return /* @__PURE__ */ jsx("dl", { className: styles$e.structuredList, children: items.map((item) => /* @__PURE__ */ jsxs("div", { className: styles$e.structuredListListItem, children: [
30883
+ /* @__PURE__ */ jsx("dt", { className: styles$e.structuredListLabel, children: i18n.get(item.labelKey) }),
30884
+ /* @__PURE__ */ jsx("dd", { className: styles$e.structuredListValue, children: item.value })
30843
30885
  ] }, item.labelKey)) });
30844
30886
  };
30845
30887
  function VerifiedBusinessCard({
@@ -31171,16 +31213,12 @@ function AdditionalInformation({
31171
31213
  }
31172
31214
  };
31173
31215
  }, [verifiedBusiness, basicInformation == null ? void 0 : basicInformation.stateOrProvince, country]);
31174
- useEffect(
31175
- () => {
31176
- applyVerifiedBusinessData(verifiedBusiness, handleChangeFor);
31177
- if (basicInformation && (verifiedBusiness == null ? void 0 : verifiedBusiness.name)) {
31178
- basicInformation.legalCompanyName = verifiedBusiness.name;
31179
- }
31180
- },
31181
- // eslint-disable-next-line react-hooks/exhaustive-deps
31182
- [verifiedBusiness]
31183
- );
31216
+ useEffect(() => {
31217
+ applyVerifiedBusinessData(verifiedBusiness, handleChangeFor);
31218
+ if (basicInformation && (verifiedBusiness == null ? void 0 : verifiedBusiness.name)) {
31219
+ basicInformation.legalCompanyName = verifiedBusiness.name;
31220
+ }
31221
+ }, [verifiedBusiness]);
31184
31222
  useEffect(() => {
31185
31223
  if (!verifiedBusiness && !showCompanyStructure) resetToDefaultData();
31186
31224
  }, [verifiedBusiness]);
@@ -31755,7 +31793,7 @@ function BusinessSelection({
31755
31793
  if ((searchResults == null ? void 0 : searchResults.length) && !showCompanyStructure || showLoader) {
31756
31794
  return /* @__PURE__ */ jsxs("div", { className: businessSelectionClasses, children: [
31757
31795
  /* @__PURE__ */ jsx("div", { className: loaderClasses, "data-testId": "business-selection-loader", children: /* @__PURE__ */ jsx(Loader, { size: "large" }) }),
31758
- (searchResults == null ? void 0 : searchResults.length) && !showCompanyStructure && !showLoader && /* @__PURE__ */ jsxs(Fragment, { children: [
31796
+ !!((searchResults == null ? void 0 : searchResults.length) && !showCompanyStructure && !showLoader) && /* @__PURE__ */ jsxs(Fragment, { children: [
31759
31797
  /* @__PURE__ */ jsx(FormHeader, { heading: i18n.get("businessSelection__heading") }),
31760
31798
  /* @__PURE__ */ jsx(CardGroup, { spaced: true, children: searchResults == null ? void 0 : searchResults.map((result) => /* @__PURE__ */ jsx(
31761
31799
  BusinessInformationCard,
@@ -33363,7 +33401,7 @@ const progressStep = "adyen-kyc-progress-step";
33363
33401
  const progressStepActive = "adyen-kyc-progress-step-active";
33364
33402
  const progressStepLabel = "adyen-kyc-progress-step-label";
33365
33403
  const progressBarCircles = "adyen-kyc-progress-bar-circles";
33366
- const styles$a = {
33404
+ const styles$d = {
33367
33405
  progress,
33368
33406
  progressBar,
33369
33407
  progressBarThick,
@@ -33391,14 +33429,14 @@ const StepProgressIndicator = ({
33391
33429
  "div",
33392
33430
  {
33393
33431
  "aria-label": `Step ${activeStepIndex} of ${stepsCount}`,
33394
- className: styles$a.progress,
33432
+ className: styles$d.progress,
33395
33433
  role: "group",
33396
33434
  children: /* @__PURE__ */ jsx(
33397
33435
  "ol",
33398
33436
  {
33399
- className: cx(styles$a.progressBar, {
33400
- [styles$a.progressBarThick]: thick,
33401
- [styles$a.progressBarCircles]: circles
33437
+ className: cx(styles$d.progressBar, {
33438
+ [styles$d.progressBarThick]: thick,
33439
+ [styles$d.progressBarCircles]: circles
33402
33440
  }),
33403
33441
  children: range(stepsCount).map((stepNumber) => {
33404
33442
  const isHighlighted = shouldHighlight(activeStepIndex, stepNumber, fillBefore);
@@ -33406,10 +33444,10 @@ const StepProgressIndicator = ({
33406
33444
  "li",
33407
33445
  {
33408
33446
  "aria-current": isHighlighted ? "step" : void 0,
33409
- className: cx(styles$a.progressStep, {
33410
- [styles$a.progressStepActive]: isHighlighted
33447
+ className: cx(styles$d.progressStep, {
33448
+ [styles$d.progressStepActive]: isHighlighted
33411
33449
  }),
33412
- children: /* @__PURE__ */ jsx("span", { className: styles$a.progressStepLabel, children: `Step ${stepNumber}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}` })
33450
+ children: /* @__PURE__ */ jsx("span", { className: styles$d.progressStepLabel, children: `Step ${stepNumber}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}` })
33413
33451
  },
33414
33452
  stepNumber
33415
33453
  );
@@ -33461,9 +33499,10 @@ function FormNavigation({
33461
33499
  if (form.formId === activeForm.formId) return;
33462
33500
  gotoForm(getFormIndex(form));
33463
33501
  trackNavigation2({
33464
- fromForm: form.formName,
33465
- toForm: activeForm.formName,
33466
- component: "FormNavigation"
33502
+ actionType: "navigate",
33503
+ toForm: form.formName,
33504
+ label: form.formName,
33505
+ returnValue: "success"
33467
33506
  });
33468
33507
  };
33469
33508
  const getNavigateHandler = (form, activeForm2) => {
@@ -33472,7 +33511,15 @@ function FormNavigation({
33472
33511
  if (allPriorFormsValid || !validateForm) {
33473
33512
  return goToForm(form);
33474
33513
  }
33475
- return activeForm2.isValid ? void 0 : validateForm;
33514
+ return activeForm2.isValid ? void 0 : () => {
33515
+ trackNavigation2({
33516
+ actionType: "navigate",
33517
+ toForm: form.formName,
33518
+ label: form.formName,
33519
+ returnValue: "validation error"
33520
+ });
33521
+ validateForm();
33522
+ };
33476
33523
  };
33477
33524
  return /* @__PURE__ */ jsxs("div", { className: cx("adyen-kyc-form-navigation", className2), children: [
33478
33525
  /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-navigation__header", children: i18n.get(taskName2) }),
@@ -33536,15 +33583,9 @@ const FormWrapper = ({
33536
33583
  );
33537
33584
  const showTaxExemptedLegalCaption = showExtraTaxExemptionReasons && ((_a2 = summaryData == null ? void 0 : summaryData.companyRegistrationDetails) == null ? void 0 : _a2.vatAbsenceReason) && ["companyDetails", "businessDetails"].includes(taskName2);
33538
33585
  const handleTrackNavigation = useCallback(
33539
- ({
33540
- fromForm,
33541
- toForm,
33542
- component
33543
- }) => {
33586
+ (props) => {
33544
33587
  trackNavigation({
33545
- fromForm,
33546
- toForm,
33547
- component,
33588
+ ...props,
33548
33589
  baseTrackingPayload
33549
33590
  });
33550
33591
  },
@@ -34117,6 +34158,41 @@ const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) =>
34117
34158
  }
34118
34159
  return basicData == null ? void 0 : basicData.countryOfGoverningLaw;
34119
34160
  };
34161
+ const businessVerificationModalHeader = "adyen-kyc-business-verification-modal-header";
34162
+ const businessVerificationModalContent = "adyen-kyc-business-verification-modal-content";
34163
+ const businessVerificationModalButton = "adyen-kyc-business-verification-modal-button";
34164
+ const styles$c = {
34165
+ businessVerificationModalHeader,
34166
+ businessVerificationModalContent,
34167
+ businessVerificationModalButton
34168
+ };
34169
+ const BusinessMismatchModal = ({ onContinue, onBackClick }) => {
34170
+ const { i18n } = useI18nContext();
34171
+ return /* @__PURE__ */ jsxs(Modal, { size: "small", onClose: () => {
34172
+ }, showCloseButton: false, children: [
34173
+ /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(Typography, { variant: "title", el: "h3", className: styles$c.businessVerificationModalHeader, children: i18n.get("businessSelection__tinVerificationFailureModalHeader") }) }),
34174
+ /* @__PURE__ */ jsxs(ModalContent, { children: [
34175
+ /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", className: styles$c.businessVerificationModalContent, children: i18n.get("businessSelection__tinVerificationFailureModalContent") }),
34176
+ /* @__PURE__ */ jsx(
34177
+ Button,
34178
+ {
34179
+ className: styles$c.businessVerificationModalButton,
34180
+ secondary: true,
34181
+ label: i18n.get("businessSelection__tinVerificationFailureModalPrimaryButton"),
34182
+ onClick: onContinue
34183
+ }
34184
+ ),
34185
+ /* @__PURE__ */ jsx(
34186
+ Button,
34187
+ {
34188
+ className: styles$c.businessVerificationModalButton,
34189
+ label: i18n.get("businessSelection__tinVerificationFailureModalSecondaryButton"),
34190
+ onClick: onBackClick
34191
+ }
34192
+ )
34193
+ ] })
34194
+ ] });
34195
+ };
34120
34196
  function BusinessDetailsDropin({
34121
34197
  country,
34122
34198
  problems,
@@ -34145,7 +34221,7 @@ function BusinessDetailsDropin({
34145
34221
  handleVerifyTin,
34146
34222
  handleClearCompanyData
34147
34223
  }) {
34148
- var _a2, _b2, _c2, _d2, _e2, _f2;
34224
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
34149
34225
  const {
34150
34226
  state: { currentState }
34151
34227
  } = useStateContext();
@@ -34182,6 +34258,9 @@ function BusinessDetailsDropin({
34182
34258
  },
34183
34259
  [(_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.country, country]
34184
34260
  );
34261
+ const [tinMatched, setTinMatched] = useState(void 0);
34262
+ const isManualTinVerificationEnabledAndUS = isExperimentEnabled(ExperimentNames.EnableManualCompanyTinVerification) && country === CountryCodes.UnitedStates;
34263
+ const [businessMismatchModalOpen, setBusinessMismatchModalOpen] = useState(false);
34185
34264
  const [initialData, setInitialData] = useState(
34186
34265
  mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, isExperimentEnabled)
34187
34266
  );
@@ -34230,9 +34309,10 @@ function BusinessDetailsDropin({
34230
34309
  country: currentCountry,
34231
34310
  taskType,
34232
34311
  isExperimentEnabled,
34233
- accountHolder
34312
+ accountHolder,
34313
+ tinMatched
34234
34314
  }),
34235
- [currentCountry, currentState.data, isExperimentEnabled, taskType, accountHolder]
34315
+ [currentCountry, currentState.data, isExperimentEnabled, taskType, tinMatched, accountHolder]
34236
34316
  );
34237
34317
  const initialForms = useMemo(() => getForms(currentCountry), [currentCountry]);
34238
34318
  const derivedProps = useMemo(
@@ -34361,6 +34441,7 @@ function BusinessDetailsDropin({
34361
34441
  searchForBusiness,
34362
34442
  fetchBusinessData,
34363
34443
  verifyBusinessData,
34444
+ verifyManualBusinessData,
34364
34445
  clearTrustedBusinessData,
34365
34446
  resetBusinessData,
34366
34447
  resetTinVerification,
@@ -34396,16 +34477,19 @@ function BusinessDetailsDropin({
34396
34477
  if (!(currentData == null ? void 0 : currentData.legalCompanyName) || !(currentData == null ? void 0 : currentData.country) || !(currentData == null ? void 0 : currentData.stateOrProvince)) {
34397
34478
  return;
34398
34479
  }
34399
- const tin = (_b3 = (_a3 = currentData == null ? void 0 : currentData.taxInformation) == null ? void 0 : _a3.find(
34400
- (taxId) => currentCountry === taxId.country
34401
- )) == null ? void 0 : _b3.number;
34480
+ const tin = ((_b3 = (_a3 = currentData == null ? void 0 : currentData.taxInformation) == null ? void 0 : _a3.find((taxId) => currentCountry === taxId.country)) == null ? void 0 : _b3.number) || "";
34402
34481
  const results = await searchForBusiness({
34403
34482
  name: currentData.legalCompanyName,
34404
34483
  country: currentData.country,
34405
34484
  state: currentData.stateOrProvince,
34406
34485
  registrationNumber: currentData.registrationNumber
34407
34486
  });
34408
- if (results && results.length === 1) {
34487
+ if (!results) {
34488
+ setShowCompanyStructure(true);
34489
+ setTrustedFields([]);
34490
+ return;
34491
+ }
34492
+ if ((results == null ? void 0 : results.length) === 1) {
34409
34493
  const businessData = await fetchBusinessData(
34410
34494
  results[0],
34411
34495
  currentData.stateOrProvince
@@ -34414,14 +34498,31 @@ function BusinessDetailsDropin({
34414
34498
  const tinMatch = await handleVerifyBusinessData(businessData, tin);
34415
34499
  return tinMatch ? handleNextClick() : void 0;
34416
34500
  }
34501
+ } else if (Array.isArray(results) && !(results == null ? void 0 : results.length)) {
34502
+ if (!isManualTinVerificationEnabledAndUS) {
34503
+ setShowCompanyStructure(true);
34504
+ return;
34505
+ }
34506
+ const tinMatch = await verifyManualBusinessData(currentData.legalCompanyName, tin);
34507
+ setTinMatched(tinMatch);
34508
+ if (tinMatch) {
34509
+ setShowCompanyStructure(true);
34510
+ } else {
34511
+ resetBusinessData();
34512
+ setBusinessMismatchModalOpen(true);
34513
+ }
34417
34514
  }
34418
34515
  },
34419
34516
  [
34517
+ searchForBusiness,
34420
34518
  currentCountry,
34421
34519
  fetchBusinessData,
34520
+ setShowCompanyStructure,
34521
+ handleVerifyBusinessData,
34422
34522
  handleNextClick,
34423
- searchForBusiness,
34424
- handleVerifyBusinessData
34523
+ isManualTinVerificationEnabledAndUS,
34524
+ verifyManualBusinessData,
34525
+ resetBusinessData
34425
34526
  ]
34426
34527
  );
34427
34528
  const isBusinessSelection = useMemo(
@@ -34489,9 +34590,10 @@ function BusinessDetailsDropin({
34489
34590
  case "basicInformation":
34490
34591
  if (((_b3 = currentState.validityByForm) == null ? void 0 : _b3.basicInformation) && !isBusinessSelection && !verifiedBusiness) {
34491
34592
  trackNavigation({
34492
- fromForm: activeForm.formName,
34593
+ actionType: "next",
34493
34594
  toForm: toFormName || "home",
34494
- component: "next"
34595
+ label: "next",
34596
+ returnValue: "success"
34495
34597
  });
34496
34598
  findBusiness(currentState.data.basicInformation);
34497
34599
  setShowBusinessSelection(true);
@@ -34506,7 +34608,6 @@ function BusinessDetailsDropin({
34506
34608
  handleNextClick,
34507
34609
  forms,
34508
34610
  activeForm.formId,
34509
- activeForm.formName,
34510
34611
  (_e2 = currentState.validityByForm) == null ? void 0 : _e2.basicInformation,
34511
34612
  currentState.data.basicInformation,
34512
34613
  isBusinessSelection,
@@ -34518,9 +34619,9 @@ function BusinessDetailsDropin({
34518
34619
  switch (activeForm.formId) {
34519
34620
  case "basicInformation": {
34520
34621
  trackNavigation({
34521
- fromForm: activeForm.formName,
34622
+ actionType: "back",
34522
34623
  toForm: "basicDetails",
34523
- component: "back"
34624
+ label: "back"
34524
34625
  });
34525
34626
  return showBusinessSelection ? setShowBusinessSelection(false) : void 0;
34526
34627
  }
@@ -34548,8 +34649,6 @@ function BusinessDetailsDropin({
34548
34649
  currentCountry,
34549
34650
  handleBackClick,
34550
34651
  activeForm.formId,
34551
- activeForm.formName,
34552
- i18n,
34553
34652
  showBusinessSelection,
34554
34653
  searching,
34555
34654
  searchResults,
@@ -34557,35 +34656,63 @@ function BusinessDetailsDropin({
34557
34656
  ]);
34558
34657
  const homeClick = () => {
34559
34658
  trackNavigation({
34560
- fromForm: activeForm.formName,
34659
+ actionType: "save",
34561
34660
  toForm: "home",
34562
- component: "home"
34661
+ label: "home"
34563
34662
  });
34564
34663
  handleHomeClick == null ? void 0 : handleHomeClick();
34565
34664
  };
34566
34665
  const proceedToManualDataEntry = useCallback(async () => {
34567
- await clearTrustedBusinessData().then(() => setShowCompanyStructure(true));
34568
- }, [clearTrustedBusinessData]);
34569
- useEffect(() => {
34570
- if (searchResults && !searchResults.length || searching === "error") {
34571
- setShowCompanyStructure(true);
34572
- setTrustedFields([]);
34573
- }
34574
- }, [searchResults, searching]);
34666
+ await clearTrustedBusinessData().then(async () => {
34667
+ var _a3, _b3, _c3, _d3, _e3;
34668
+ if (!isManualTinVerificationEnabledAndUS) {
34669
+ setShowCompanyStructure(true);
34670
+ return;
34671
+ }
34672
+ const businessName = ((_b3 = (_a3 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a3.basicInformation) == null ? void 0 : _b3.legalCompanyName) || "";
34673
+ const taxInformation = (_d3 = (_c3 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _c3.basicInformation) == null ? void 0 : _d3.taxInformation;
34674
+ const tin = ((_e3 = taxInformation == null ? void 0 : taxInformation.find((taxId) => currentCountry === taxId.country)) == null ? void 0 : _e3.number) || "";
34675
+ const tinMatch = await verifyManualBusinessData(businessName, tin);
34676
+ if (tinMatch) {
34677
+ setShowCompanyStructure(true);
34678
+ setBusinessMismatchModalOpen(false);
34679
+ } else {
34680
+ setBusinessMismatchModalOpen(true);
34681
+ setTinMatched(false);
34682
+ }
34683
+ });
34684
+ }, [
34685
+ clearTrustedBusinessData,
34686
+ isManualTinVerificationEnabledAndUS,
34687
+ (_g2 = (_f2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _f2.basicInformation) == null ? void 0 : _g2.legalCompanyName,
34688
+ (_i2 = (_h2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _h2.basicInformation) == null ? void 0 : _i2.taxInformation,
34689
+ verifyManualBusinessData,
34690
+ currentCountry
34691
+ ]);
34692
+ const handleBusinessMismatchContinue = useCallback(() => {
34693
+ setShowCompanyStructure(true);
34694
+ setTrustedFields([]);
34695
+ setBusinessMismatchModalOpen(false);
34696
+ }, [setShowCompanyStructure, setTrustedFields, setBusinessMismatchModalOpen]);
34697
+ const handleBusinessMismatchCancel = useCallback(() => {
34698
+ backClick == null ? void 0 : backClick();
34699
+ setBusinessMismatchModalOpen(false);
34700
+ setTinMatched(void 0);
34701
+ }, [backClick, setTinMatched, setBusinessMismatchModalOpen]);
34575
34702
  useEffect(() => {
34576
34703
  var _a3, _b3;
34577
34704
  if (((_a3 = currentState.data.basicInformation) == null ? void 0 : _a3.legalCompanyName) !== currentSearchName && ((_b3 = currentState.data.basicInformation) == null ? void 0 : _b3.legalCompanyName) !== (verifiedBusiness == null ? void 0 : verifiedBusiness.name)) {
34578
34705
  setShowCompanyStructure(false);
34579
34706
  resetBusinessData();
34580
34707
  }
34581
- }, [currentSearchName, (_f2 = currentState.data.basicInformation) == null ? void 0 : _f2.legalCompanyName, verifiedBusiness]);
34708
+ }, [currentSearchName, (_j2 = currentState.data.basicInformation) == null ? void 0 : _j2.legalCompanyName, verifiedBusiness]);
34582
34709
  useEffect(() => {
34583
34710
  var _a3;
34584
34711
  if ((trustedFields == null ? void 0 : trustedFields.length) && ((_a3 = legalEntityResponse.organization) == null ? void 0 : _a3.registeredAddress.country) !== currentCountry) {
34585
34712
  setTrustedFields(void 0);
34586
34713
  }
34587
34714
  }, [currentCountry]);
34588
- return /* @__PURE__ */ jsx(
34715
+ return /* @__PURE__ */ jsxs(
34589
34716
  FormWrapper,
34590
34717
  {
34591
34718
  taskName: taskName2 ?? "businessDetails",
@@ -34607,38 +34734,47 @@ function BusinessDetailsDropin({
34607
34734
  steps,
34608
34735
  showBackButton,
34609
34736
  hideNextButton,
34610
- children: /* @__PURE__ */ jsx(
34611
- BusinessDetails,
34612
- {
34613
- ...derivedProps,
34614
- ref: formRef,
34615
- data: initialData,
34616
- country: currentCountry,
34617
- problems: currentProblems,
34618
- activeForm,
34619
- shouldValidate,
34620
- isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS,
34621
- baseTrackingPayload,
34622
- showBusinessSelection,
34623
- setShowBusinessSelection,
34624
- showCompanyStructure,
34625
- setShowCompanyStructure,
34626
- searchResults,
34627
- invalidTin,
34628
- resetTinVerification,
34629
- verifiedBusiness,
34630
- searching,
34631
- fetching,
34632
- verifying,
34633
- resettingTrustedData,
34634
- fetchBusinessData,
34635
- verifyBusinessData,
34636
- proceedToManualDataEntry,
34637
- handleNextClick: nextClick,
34638
- handleAddressSearch,
34639
- handleFindAddress
34640
- }
34641
- )
34737
+ children: [
34738
+ /* @__PURE__ */ jsx(
34739
+ BusinessDetails,
34740
+ {
34741
+ ...derivedProps,
34742
+ ref: formRef,
34743
+ data: initialData,
34744
+ country: currentCountry,
34745
+ problems: currentProblems,
34746
+ activeForm,
34747
+ shouldValidate,
34748
+ isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS,
34749
+ baseTrackingPayload,
34750
+ showBusinessSelection,
34751
+ setShowBusinessSelection,
34752
+ showCompanyStructure,
34753
+ setShowCompanyStructure,
34754
+ searchResults,
34755
+ invalidTin,
34756
+ resetTinVerification,
34757
+ verifiedBusiness,
34758
+ searching,
34759
+ fetching,
34760
+ verifying,
34761
+ resettingTrustedData,
34762
+ fetchBusinessData,
34763
+ verifyBusinessData,
34764
+ proceedToManualDataEntry,
34765
+ handleNextClick: nextClick,
34766
+ handleAddressSearch,
34767
+ handleFindAddress
34768
+ }
34769
+ ),
34770
+ businessMismatchModalOpen && /* @__PURE__ */ jsx(
34771
+ BusinessMismatchModal,
34772
+ {
34773
+ onContinue: handleBusinessMismatchContinue,
34774
+ onBackClick: handleBusinessMismatchCancel
34775
+ }
34776
+ )
34777
+ ]
34642
34778
  }
34643
34779
  );
34644
34780
  }
@@ -35963,6 +36099,10 @@ const BusinessTypeSelection = ({
35963
36099
  if (loadingStatus === "loading") return;
35964
36100
  triggerValidation();
35965
36101
  if (isValid) {
36102
+ userEvents.addEvent("Clicked button", {
36103
+ actionLevel: "task",
36104
+ actionType: "next"
36105
+ });
35966
36106
  if (((_a3 = data.businessType) == null ? void 0 : _a3.id) === "legalArrangement") {
35967
36107
  if (currentStep !== 1) {
35968
36108
  setCurrentStep(
@@ -36239,6 +36379,12 @@ function CustomerSupport({
36239
36379
  // Old phone field data
36240
36380
  email: (_f2 = (_e2 = legalEntityResponse[legalEntityType]) == null ? void 0 : _e2.support) == null ? void 0 : _f2.email
36241
36381
  };
36382
+ useEffect(() => {
36383
+ userEvents.addEvent("Landed on page", {
36384
+ actionLevel: "task",
36385
+ actionType: "start"
36386
+ });
36387
+ }, []);
36242
36388
  const submitForm = async () => {
36243
36389
  if (!currentState.isValid) {
36244
36390
  setShouldValidate(true);
@@ -36252,6 +36398,10 @@ function CustomerSupport({
36252
36398
  try {
36253
36399
  await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity(payload, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
36254
36400
  onSubmit();
36401
+ userEvents.addEvent("Success", {
36402
+ actionLevel: "task",
36403
+ actionType: "submit"
36404
+ });
36255
36405
  } catch {
36256
36406
  const label = i18n.get("failedToUpdateDetails");
36257
36407
  logger$t.error(label, payload);
@@ -36450,7 +36600,7 @@ const VerificationErrorAlert = ({
36450
36600
  };
36451
36601
  const actionsMenu = "adyen-kyc-actions-menu";
36452
36602
  const actionsMenuOption = "adyen-kyc-actions-menu-option";
36453
- const styles$9 = {
36603
+ const styles$b = {
36454
36604
  actionsMenu,
36455
36605
  actionsMenuOption
36456
36606
  };
@@ -36496,12 +36646,12 @@ const ActionsMenu = ({ options, open, setOpen }) => {
36496
36646
  icon,
36497
36647
  label,
36498
36648
  title: title ?? label,
36499
- className: styles$9.actionsMenuOption,
36649
+ className: styles$b.actionsMenuOption,
36500
36650
  role: "menuitem"
36501
36651
  },
36502
36652
  label
36503
36653
  ));
36504
- return open ? /* @__PURE__ */ jsx(ClickAwayWrapper, { onClickAway: () => setOpen(false), className: styles$9.actionsMenu, role: "menu", children: menuItems }) : null;
36654
+ return open ? /* @__PURE__ */ jsx(ClickAwayWrapper, { onClickAway: () => setOpen(false), className: styles$b.actionsMenu, role: "menu", children: menuItems }) : null;
36505
36655
  };
36506
36656
  const Remove = ({
36507
36657
  onRemove,
@@ -36574,9 +36724,32 @@ const Remove = ({
36574
36724
  }
36575
36725
  );
36576
36726
  };
36727
+ const tag = "adyen-kyc-tag";
36728
+ const tagGrey = "adyen-kyc-tag-grey";
36729
+ const tagBlue = "adyen-kyc-tag-blue";
36730
+ const tagOrange = "adyen-kyc-tag-orange";
36731
+ const tagRed = "adyen-kyc-tag-red";
36732
+ const tagTeal = "adyen-kyc-tag-teal";
36733
+ const tagGreen = "adyen-kyc-tag-green";
36734
+ const styles$a = {
36735
+ tag,
36736
+ tagGrey,
36737
+ tagBlue,
36738
+ tagOrange,
36739
+ tagRed,
36740
+ tagTeal,
36741
+ tagGreen
36742
+ };
36743
+ const variantMap = {
36744
+ grey: styles$a.tagGrey,
36745
+ teal: styles$a.tagTeal,
36746
+ red: styles$a.tagRed,
36747
+ green: styles$a.tagGreen,
36748
+ orange: styles$a.tagOrange,
36749
+ blue: styles$a.tagBlue
36750
+ };
36577
36751
  const Tag = ({ className: className2, variant = "blue", children: children2 }) => {
36578
- const classNames = cx("adyen-kyc-tag", className2, `adyen-kyc-tag--${variant}`);
36579
- return /* @__PURE__ */ jsx("span", { className: classNames, children: children2 });
36752
+ return /* @__PURE__ */ jsx("span", { className: cx(styles$a.tag, variantMap[variant], className2), children: children2 });
36580
36753
  };
36581
36754
  const EntityAssociation = ({
36582
36755
  name,
@@ -36772,6 +36945,12 @@ const DecisionMakers = ({
36772
36945
  );
36773
36946
  const uniqueDecisionMakers = mappedDecisionMakers ? Object.values(mappedDecisionMakers) : [];
36774
36947
  const showWarning = Boolean(remediationMessages.DECISION_MAKER && uniqueDecisionMakers.length);
36948
+ useEffect(() => {
36949
+ userEvents.addEvent("Landed on page", {
36950
+ actionLevel: "task",
36951
+ actionType: "start"
36952
+ });
36953
+ }, []);
36775
36954
  useEffect(() => {
36776
36955
  if (showWarning) {
36777
36956
  userEvents.addEvent("Encountered error", {
@@ -37090,15 +37269,16 @@ const Introduction = ({
37090
37269
  page: (introductionScreens == null ? void 0 : introductionScreens.length) ? introductionScreens[activeIndex] : void 0
37091
37270
  };
37092
37271
  useEffect(() => {
37093
- if (introductionScreens == null ? void 0 : introductionScreens.length) {
37094
- userEvents.addEvent("Landed on page", {
37095
- actionLevel: "task",
37096
- actionType: "start"
37097
- });
37098
- } else {
37272
+ userEvents.addEvent("Landed on page", {
37273
+ actionLevel: "task",
37274
+ actionType: "start"
37275
+ });
37276
+ }, []);
37277
+ useEffect(() => {
37278
+ if (!(introductionScreens == null ? void 0 : introductionScreens.length)) {
37099
37279
  onExitIntroduction();
37100
37280
  }
37101
- }, [introductionScreens]);
37281
+ }, [introductionScreens, onExitIntroduction]);
37102
37282
  const translationKeys = {
37103
37283
  skip: "goToOverviewFromIntroduction",
37104
37284
  back: "back",
@@ -37163,7 +37343,7 @@ const Introduction = ({
37163
37343
  onClick: () => {
37164
37344
  userEvents.addEvent("Success", {
37165
37345
  actionLevel: "task",
37166
- actionType: "start",
37346
+ actionType: "submit",
37167
37347
  label: translationKeys.start
37168
37348
  });
37169
37349
  onExitIntroduction();
@@ -37276,8 +37456,27 @@ const SingpassLoginButton = ({
37276
37456
  ]
37277
37457
  }
37278
37458
  );
37279
- const SingpassBanner = (props) => {
37280
- const { isLoading, isSuccess, errorMessage, onClick, onAlertClose, onMessage, legalEntityType } = props;
37459
+ const SingpassBanner = ({
37460
+ isLoading,
37461
+ isSuccess,
37462
+ errorMessage,
37463
+ onClick,
37464
+ onAlertClose,
37465
+ onMessage,
37466
+ legalEntityType
37467
+ }) => {
37468
+ const authContext = useAuthContext();
37469
+ const singpassEventListener = useCallback(
37470
+ (event) => {
37471
+ if (event.origin !== authContext.loadingContext) return;
37472
+ onMessage({ data: { isSuccessful: event.data.isSuccessful } });
37473
+ },
37474
+ [authContext.loadingContext, onMessage]
37475
+ );
37476
+ useEffect(() => {
37477
+ window.addEventListener("message", singpassEventListener);
37478
+ return () => window.removeEventListener("message", singpassEventListener);
37479
+ }, []);
37281
37480
  const channel = new BroadcastChannel("sgidprovider");
37282
37481
  useEffect(() => {
37283
37482
  channel.onmessage = onMessage;
@@ -37482,6 +37681,7 @@ const useBusinessSetup = (legalEntityResponse) => {
37482
37681
  return businessSetup;
37483
37682
  };
37484
37683
  const TaskListItem = ({
37684
+ titleKey,
37485
37685
  title,
37486
37686
  icon,
37487
37687
  status,
@@ -37498,18 +37698,31 @@ const TaskListItem = ({
37498
37698
  removeEntity,
37499
37699
  isRemoveDisabled = false,
37500
37700
  handleIsRemoveDisabled,
37501
- testId
37701
+ testId,
37702
+ enableTracking = true
37502
37703
  }) => {
37704
+ const { i18n } = useI18nContext();
37503
37705
  const shouldShowErrorAlert = showErrorAlerts === "always" || showErrorAlerts === "onErrorStatus" && status === TaskStatus.ERROR;
37504
37706
  const [isStatusRemoving, setIsStatusRemoving] = useState(false);
37707
+ const handleNavigateToTask = () => {
37708
+ if (enableTracking) {
37709
+ userEvents.addEvent("Clicked button", {
37710
+ actionLevel: "journey",
37711
+ actionType: "open",
37712
+ task: void 0,
37713
+ label: titleKey
37714
+ });
37715
+ }
37716
+ onNavigateToTask == null ? void 0 : onNavigateToTask();
37717
+ };
37505
37718
  return /* @__PURE__ */ jsx(
37506
37719
  Card,
37507
37720
  {
37508
37721
  stateful: onNavigateToTask && !loading && !disabled,
37509
37722
  warning: showWarningAlert,
37510
37723
  warningMessage,
37511
- onClick: loading ? void 0 : onNavigateToTask,
37512
- onKeyDown: handleKeys(["Enter"], onNavigateToTask ?? noop$2),
37724
+ onClick: loading ? void 0 : handleNavigateToTask,
37725
+ onKeyDown: handleKeys(["Enter"], handleNavigateToTask ?? noop$2),
37513
37726
  className: "adyen-task",
37514
37727
  disabled,
37515
37728
  children: /* @__PURE__ */ jsxs(
@@ -37523,7 +37736,7 @@ const TaskListItem = ({
37523
37736
  /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__header", children: [
37524
37737
  /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__heading", children: [
37525
37738
  /* @__PURE__ */ jsx("span", { className: "adyen-task-item__icon-wrapper", children: /* @__PURE__ */ jsx(Icon, { name: icon }) }),
37526
- /* @__PURE__ */ jsx("div", { className: "adyen-task-item__body", children: /* @__PURE__ */ jsx("span", { className: "adyen-task-item__title", children: title }) })
37739
+ /* @__PURE__ */ jsx("div", { className: "adyen-task-item__body", children: /* @__PURE__ */ jsx("span", { className: "adyen-task-item__title", children: title || i18n.get(titleKey) }) })
37527
37740
  ] }),
37528
37741
  info && /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__info", children: [
37529
37742
  /* @__PURE__ */ jsx(Icon, { name: "info-circle" }),
@@ -37576,6 +37789,7 @@ const PayoutAccountTaskListItem = ({
37576
37789
  disabled: isInstantVerificationAccount && status === TaskStatus.PROCESSING,
37577
37790
  onNavigateToTask: isInstantVerificationAccount ? void 0 : onNavigateToTask,
37578
37791
  icon: "payout",
37792
+ titleKey: "accountNumber",
37579
37793
  title: obscuredAccountNumber,
37580
37794
  status,
37581
37795
  problems: (_a2 = capabilityProblems == null ? void 0 : capabilityProblems.BankAccount) == null ? void 0 : _a2[account.id],
@@ -37744,7 +37958,7 @@ function TaskList({
37744
37958
  {
37745
37959
  onNavigateToTask: handleOnNavigateToTaskIndividual,
37746
37960
  icon: "decision-maker",
37747
- title: hasTrust ? i18n.get("trusteePersonalDetails") : i18n.get("personalDetails"),
37961
+ titleKey: hasTrust ? "trusteePersonalDetails" : "personalDetails",
37748
37962
  status: getTaskStatus(TaskTypes.INDIVIDUAL),
37749
37963
  problems: (_e2 = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _e2[legalEntityResponse.id]
37750
37964
  }
@@ -37754,7 +37968,7 @@ function TaskList({
37754
37968
  {
37755
37969
  onNavigateToTask: handleOnNavigateToTaskLegalRepresentative,
37756
37970
  icon: "decision-maker",
37757
- title: i18n.get("legalRepresentative"),
37971
+ titleKey: "legalRepresentative",
37758
37972
  status: getTaskStatus(TaskTypes.LEGAL_REPRESENTATIVE_DETAILS)
37759
37973
  }
37760
37974
  ),
@@ -37763,9 +37977,7 @@ function TaskList({
37763
37977
  {
37764
37978
  onNavigateToTask: handleOnNavigateToSoleProp,
37765
37979
  icon: "company",
37766
- title: i18n.get(
37767
- canChangeEntityType ? "soleProprietorshipDetails" : "soleProprietorDetails"
37768
- ),
37980
+ titleKey: canChangeEntityType ? "soleProprietorshipDetails" : "soleProprietorDetails",
37769
37981
  status: getTaskStatus(TaskTypes.SOLE_PROPRIETOR_COMPANY),
37770
37982
  problems: getOwnSolePropProblems(legalEntityResponse, capabilityProblems)
37771
37983
  }
@@ -37776,7 +37988,7 @@ function TaskList({
37776
37988
  testId: TaskTypes.COMPANY,
37777
37989
  onNavigateToTask: handleOnNavigateToTaskCompany,
37778
37990
  icon: "company",
37779
- title: hasTrust ? i18n.get("companyTrusteeDetails") : i18n.get("companyDetails"),
37991
+ titleKey: hasTrust ? "companyTrusteeDetails" : "companyDetails",
37780
37992
  status: getTaskStatus(TaskTypes.COMPANY),
37781
37993
  problems: (_f2 = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _f2[legalEntityResponse.id]
37782
37994
  }
@@ -37787,7 +37999,7 @@ function TaskList({
37787
37999
  testId: TaskTypes.BUSINESS_DETAILS,
37788
38000
  onNavigateToTask: handleOnNavigateToTaskBusinessDetails,
37789
38001
  icon: "company",
37790
- title: hasTrust ? i18n.get("businessTrusteeDetails") : i18n.get("businessDetails"),
38002
+ titleKey: hasTrust ? "businessTrusteeDetails" : "businessDetails",
37791
38003
  status: getTaskStatus(TaskTypes.BUSINESS_DETAILS),
37792
38004
  problems: (_g2 = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _g2[legalEntityResponse.id]
37793
38005
  }
@@ -37797,7 +38009,7 @@ function TaskList({
37797
38009
  {
37798
38010
  onNavigateToTask: handleOnNavigateToTaskDecisionMaker,
37799
38011
  icon: "decision-maker",
37800
- title: i18n.get("decisionMakers"),
38012
+ titleKey: "decisionMakers",
37801
38013
  status: getTaskStatus(TaskTypes.DECISION_MAKER_OVERVIEW),
37802
38014
  showWarningAlert: showDecisionMakersWarning,
37803
38015
  warningMessage: remediationMessages[TaskTypes.DECISION_MAKER]
@@ -37808,7 +38020,7 @@ function TaskList({
37808
38020
  {
37809
38021
  onNavigateToTask: handleOnNavigateToTaskCustomerSupport,
37810
38022
  icon: "webinar",
37811
- title: i18n.get("customerSupport"),
38023
+ titleKey: "customerSupport",
37812
38024
  status: getTaskStatus(TaskTypes.CUSTOMER_SUPPORT)
37813
38025
  }
37814
38026
  )
@@ -37821,7 +38033,7 @@ function TaskList({
37821
38033
  {
37822
38034
  onNavigateToTask: handleOnNavigateToTaskTrust,
37823
38035
  icon: "trust",
37824
- title: i18n.get("trustDetails"),
38036
+ titleKey: "trustDetails",
37825
38037
  status: getTaskStatus(TaskTypes.TRUST),
37826
38038
  problems: getOwnTrustProblems(legalEntityResponse, capabilityProblems)
37827
38039
  }
@@ -37831,7 +38043,7 @@ function TaskList({
37831
38043
  {
37832
38044
  onNavigateToTask: handleOnNavigateToTaskTrustMember,
37833
38045
  icon: "decision-maker",
37834
- title: i18n.get("trustMembers"),
38046
+ titleKey: "trustMembers",
37835
38047
  status: getTaskStatus(TaskTypes.TRUST_MEMBER_OVERVIEW)
37836
38048
  }
37837
38049
  )
@@ -37841,7 +38053,7 @@ function TaskList({
37841
38053
  {
37842
38054
  onNavigateToTask: handleOnNavigateToSourceOfFunds,
37843
38055
  icon: "cash-stack",
37844
- title: i18n.get("fundingSources"),
38056
+ titleKey: "fundingSources",
37845
38057
  status: getTaskStatus(TaskTypes.SOURCE_OF_FUNDS),
37846
38058
  problems: getOwnTrustProblems(legalEntityResponse, capabilityProblems)
37847
38059
  }
@@ -37883,7 +38095,7 @@ function TaskList({
37883
38095
  {
37884
38096
  onNavigateToTask: () => handleOnNavigateToTaskPayout(),
37885
38097
  icon: "payout",
37886
- title: canChangeEntityType ? i18n.get("bankAccountDetails") : i18n.get(hasPayinTaskNotPayout ? "payinDetails" : "payoutDetails"),
38098
+ titleKey: canChangeEntityType ? "bankAccountDetails" : hasPayinTaskNotPayout ? "payinDetails" : "payoutDetails",
37887
38099
  status: getTaskStatus(hasPayinTaskNotPayout ? TaskTypes.PAYIN : TaskTypes.PAYOUT),
37888
38100
  disabled: !canAddPayoutAccount,
37889
38101
  problems: getEmptyBankAccountProblems()
@@ -37897,7 +38109,7 @@ function TaskList({
37897
38109
  {
37898
38110
  onNavigateToTask: handleOnNavigateToServiceAgreement,
37899
38111
  icon: "contract",
37900
- title: i18n.get("signServiceAgreement"),
38112
+ titleKey: "signServiceAgreement",
37901
38113
  disabled: areServiceAgreementTasksDisabled,
37902
38114
  status: serviceAgreementTypes.length ? TaskStatus.SIGN : TaskStatus.SIGNED,
37903
38115
  info: areServiceAgreementTasksDisabled ? i18n.get("requiresSignatory") : void 0
@@ -37908,7 +38120,7 @@ function TaskList({
37908
38120
  {
37909
38121
  onNavigateToTask: handleOnNavigateToPci,
37910
38122
  icon: "pci",
37911
- title: i18n.get("pciDssQuestionnaire"),
38123
+ titleKey: "pciDssQuestionnaire",
37912
38124
  status: canDownloadPci ? TaskStatus.DOWNLOAD : TaskStatus.SIGN,
37913
38125
  statusLabel: canDownloadPci ? i18n.get("downloadACopy") : void 0,
37914
38126
  downloadHandler: onPciDownload,
@@ -37922,7 +38134,7 @@ function TaskList({
37922
38134
  {
37923
38135
  onNavigateToTask: handleOnNavigateToTaskReview,
37924
38136
  icon: "review",
37925
- title: i18n.get("submitReviewOfYourData"),
38137
+ titleKey: "submitReviewOfYourData",
37926
38138
  status: TaskStatus.SUBMIT,
37927
38139
  problems: (_h2 = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _h2[legalEntityResponse.id],
37928
38140
  showErrorAlerts: "always"
@@ -38294,16 +38506,16 @@ const TrustMembersOverview = ({
38294
38506
  }
38295
38507
  );
38296
38508
  };
38297
- const localizeDateString = (dateString, locale) => {
38509
+ const localizeDateString = (dateString, locale, options) => {
38298
38510
  const logger2 = createLogger("localizeDateString");
38299
- const options = {
38511
+ const formatOptions = {
38300
38512
  timeZone: "UTC",
38301
38513
  year: "numeric",
38302
38514
  month: "long",
38303
38515
  day: "2-digit"
38304
38516
  };
38305
38517
  try {
38306
- return new Intl.DateTimeFormat(locale, options).format(new Date(dateString));
38518
+ return new Intl.DateTimeFormat(locale, formatOptions).format(new Date(dateString));
38307
38519
  } catch (err) {
38308
38520
  logger2.error(err);
38309
38521
  }
@@ -39476,6 +39688,10 @@ function PayoutDetailsDropin({
39476
39688
  if (trustedTransferInstrumentId) {
39477
39689
  externalOnSubmit == null ? void 0 : externalOnSubmit({ ...data, id: trustedTransferInstrumentId });
39478
39690
  }
39691
+ userEvents.addEvent("Success", {
39692
+ actionLevel: "task",
39693
+ actionType: "submit"
39694
+ });
39479
39695
  navigateBackToTaskList == null ? void 0 : navigateBackToTaskList();
39480
39696
  } : onSubmit
39481
39697
  });
@@ -39541,20 +39757,6 @@ function PayoutDetailsDropin({
39541
39757
  }
39542
39758
  );
39543
39759
  }
39544
- const outlinedIcon = "adyen-kyc-outlined-icon";
39545
- const styles$8 = {
39546
- outlinedIcon
39547
- };
39548
- const OutlinedIcon = ({ name }) => /* @__PURE__ */ jsx("div", { className: styles$8.outlinedIcon, children: /* @__PURE__ */ jsx(Icon, { name }) });
39549
- const Splashscreen = ({ title, subtitle, icon, buttonText, onClick }) => {
39550
- const { i18n } = useI18nContext();
39551
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-splashscreen", children: [
39552
- icon && /* @__PURE__ */ jsx(OutlinedIcon, { name: icon }),
39553
- /* @__PURE__ */ jsx(Typography, { el: "h2", variant: "title-l", children: title }),
39554
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: subtitle }),
39555
- onClick && /* @__PURE__ */ jsx(Button, { onClick, label: buttonText ?? i18n.get("finish") })
39556
- ] });
39557
- };
39558
39760
  function ContractViewer({ contract, className: className2, onExpandSection }) {
39559
39761
  const classNames = cx("adyen-contract-viewer", className2);
39560
39762
  const container = useRef(null);
@@ -39581,6 +39783,27 @@ const pciValidationRules = {
39581
39783
  errorMessage: "fieldIsRequired"
39582
39784
  }
39583
39785
  };
39786
+ const FormEndState = ({ variant = "success", children: children2, className: className2 }) => {
39787
+ const Slot = defineSlots(children2, ["title", "content", "icon", "actions"]);
39788
+ return /* @__PURE__ */ jsxs(
39789
+ "div",
39790
+ {
39791
+ className: cx("adyen-form-end-state", `adyen-form-end-state__icon--${variant}`, className2),
39792
+ role: "alert",
39793
+ children: [
39794
+ /* @__PURE__ */ jsx(Slot, { name: "icon", children: variant === "success" ? /* @__PURE__ */ jsx(Icon, { name: "checkmark" }) : /* @__PURE__ */ jsx(AlertIcon, { variant }) }),
39795
+ /* @__PURE__ */ jsx("span", { className: "adyen-form-end-state__title", children: /* @__PURE__ */ jsx(Slot, { name: "title" }) }),
39796
+ /* @__PURE__ */ jsx("div", { className: "adyen-form-end-state__description", children: /* @__PURE__ */ jsx(Slot, { name: "content" }) }),
39797
+ /* @__PURE__ */ jsx("div", { className: "adyen-form-end-state__actions", children: /* @__PURE__ */ jsx(Slot, { name: "actions" }) })
39798
+ ]
39799
+ }
39800
+ );
39801
+ };
39802
+ const outlinedIcon = "adyen-kyc-outlined-icon";
39803
+ const styles$9 = {
39804
+ outlinedIcon
39805
+ };
39806
+ const OutlinedIcon = ({ name }) => /* @__PURE__ */ jsx("div", { className: styles$9.outlinedIcon, children: /* @__PURE__ */ jsx(Icon, { name }) });
39584
39807
  const PciFields = ["signer", "acceptPci"];
39585
39808
  function PciDropin({
39586
39809
  legalEntityResponse,
@@ -39690,14 +39913,11 @@ function PciDropin({
39690
39913
  ] })
39691
39914
  ] });
39692
39915
  return /* @__PURE__ */ jsxs(MaybeModal, { inline: !asModal, onClose: handleCloseClick, children: [
39693
- /* @__PURE__ */ jsx(ModalContent, { children: !needsSigning ? /* @__PURE__ */ jsx(
39694
- Splashscreen,
39695
- {
39696
- icon: "check",
39697
- title: i18n.get("serviceAgreementSignedAndDated"),
39698
- onClick: handleCloseClick
39699
- }
39700
- ) : /* @__PURE__ */ jsxs(LoaderWrapper, { status: loadingStatus, formOpacityWhenLoading: 0.3, showSpinner: false, children: [
39916
+ /* @__PURE__ */ jsx(ModalContent, { children: !needsSigning ? /* @__PURE__ */ jsxs(FormEndState, { children: [
39917
+ /* @__PURE__ */ jsx("template", { slot: "title", children: i18n.get("serviceAgreementSignedAndDated") }),
39918
+ /* @__PURE__ */ jsx(OutlinedIcon, { slot: "icon", name: "check" }),
39919
+ /* @__PURE__ */ jsx("div", { slot: "content", children: /* @__PURE__ */ jsx(Button, { onClick: () => handleCloseClick, label: i18n.get("finish") }) })
39920
+ ] }) : /* @__PURE__ */ jsxs(LoaderWrapper, { status: loadingStatus, formOpacityWhenLoading: 0.3, showSpinner: false, children: [
39701
39921
  hasExpired && /* @__PURE__ */ jsx(ExpiredBanner, {}),
39702
39922
  /* @__PURE__ */ jsx(ContractViewer, { contract: pciQuestionnaire, onExpandSection: handleExpandSection }),
39703
39923
  /* @__PURE__ */ jsx(
@@ -40240,11 +40460,11 @@ const TrustRoleAndEntityType = (props) => {
40240
40460
  ] });
40241
40461
  };
40242
40462
  const settlorExemptionReasonsList = "adyen-kyc-settlor-exemption-reasons-list";
40243
- const styles$7 = {
40463
+ const styles$8 = {
40244
40464
  settlorExemptionReasonsList
40245
40465
  };
40246
40466
  const formatRolesForSummary = (roles, i18n) => roles.map((role) => i18n.get(getRoleName(role))).join(", ");
40247
- const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$7.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
40467
+ const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$8.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
40248
40468
  const formatRoleAndEntityTypeSummary = (data, i18n, isOrganizationSettlorWithExemptionEnabled) => {
40249
40469
  var _a2, _b2;
40250
40470
  const { trustMemberType, roles } = data;
@@ -40981,14 +41201,11 @@ function ServiceAgreementDropin({
40981
41201
  setHasFinished(true);
40982
41202
  }
40983
41203
  };
40984
- const endScreen = hasFinished && /* @__PURE__ */ jsx(
40985
- Splashscreen,
40986
- {
40987
- icon: "check",
40988
- title: i18n.get("serviceAgreementSignedAndDated"),
40989
- onClick: handleCloseClick
40990
- }
40991
- );
41204
+ const endScreen = hasFinished && /* @__PURE__ */ jsxs(FormEndState, { children: [
41205
+ /* @__PURE__ */ jsx("template", { slot: "title", children: i18n.get("serviceAgreementSignedAndDated") }),
41206
+ /* @__PURE__ */ jsx(OutlinedIcon, { slot: "icon", name: "check" }),
41207
+ /* @__PURE__ */ jsx("div", { slot: "content", children: /* @__PURE__ */ jsx(Button, { onClick: () => handleCloseClick, label: i18n.get("finish") }) })
41208
+ ] });
40992
41209
  return /* @__PURE__ */ jsx(MaybeModal, { inline: !asModal, onClose: handleCloseClick, children: /* @__PURE__ */ jsxs(ModalContent, { children: [
40993
41210
  !asEmbedded && sidebar,
40994
41211
  endScreen || content,
@@ -41765,7 +41982,7 @@ const useNavigation = ({
41765
41982
  };
41766
41983
  }, [navigateTo]);
41767
41984
  useEffect(() => {
41768
- const pushedTask = taskHistory.at(-1);
41985
+ const pushedTask = taskHistory[taskHistory.length - 1];
41769
41986
  if (pushedTask === "default") {
41770
41987
  const defaultTask = getDefaultTask({
41771
41988
  legalEntity: legalEntity2,
@@ -41787,8 +42004,8 @@ const useNavigation = ({
41787
42004
  taskHistory
41788
42005
  ]);
41789
42006
  return {
41790
- currentTask: actualTasks.at(-1),
41791
- previousTask: actualTasks.at(-2),
42007
+ currentTask: actualTasks[actualTasks.length - 1],
42008
+ previousTask: actualTasks[actualTasks.length - 2],
41792
42009
  navigateBack,
41793
42010
  navigateTo
41794
42011
  };
@@ -42168,7 +42385,7 @@ const tileTitle = "adyen-kyc-tile-title";
42168
42385
  const tileCheckbox = "adyen-kyc-tile-checkbox";
42169
42386
  const tileContainerHorizontal = "adyen-kyc-tile-container-horizontal";
42170
42387
  const tileLabel = "adyen-kyc-tile-label";
42171
- const styles$6 = {
42388
+ const styles$7 = {
42172
42389
  tileContainer,
42173
42390
  tile,
42174
42391
  tileIcon,
@@ -42210,8 +42427,8 @@ function Tile({
42210
42427
  return /* @__PURE__ */ jsxs(
42211
42428
  "label",
42212
42429
  {
42213
- className: cx(styles$6.tileContainer, {
42214
- [styles$6.tileContainerHorizontal]: isHorizontal
42430
+ className: cx(styles$7.tileContainer, {
42431
+ [styles$7.tileContainerHorizontal]: isHorizontal
42215
42432
  }),
42216
42433
  tabIndex: disabled ? -1 : 0,
42217
42434
  htmlFor: idUse,
@@ -42221,7 +42438,7 @@ function Tile({
42221
42438
  "input",
42222
42439
  {
42223
42440
  ref: inputNode,
42224
- className: styles$6.tileCheckbox,
42441
+ className: styles$7.tileCheckbox,
42225
42442
  disabled,
42226
42443
  checked: !!checked,
42227
42444
  value,
@@ -42231,10 +42448,10 @@ function Tile({
42231
42448
  onChange: handleChange
42232
42449
  }
42233
42450
  ),
42234
- /* @__PURE__ */ jsxs("div", { className: styles$6.tile, children: [
42235
- icon && /* @__PURE__ */ jsx("div", { className: styles$6.tileIcon, children: /* @__PURE__ */ jsx(Icon, { name: icon, testId: icon }) }),
42236
- /* @__PURE__ */ jsxs("div", { className: styles$6.tileLabel, children: [
42237
- /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", className: styles$6.tileTitle, children: label }),
42451
+ /* @__PURE__ */ jsxs("div", { className: styles$7.tile, children: [
42452
+ icon && /* @__PURE__ */ jsx("div", { className: styles$7.tileIcon, children: /* @__PURE__ */ jsx(Icon, { name: icon, testId: icon }) }),
42453
+ /* @__PURE__ */ jsxs("div", { className: styles$7.tileLabel, children: [
42454
+ /* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", className: styles$7.tileTitle, children: label }),
42238
42455
  subTitle && /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: subTitle })
42239
42456
  ] })
42240
42457
  ] })
@@ -42246,7 +42463,7 @@ const tileGroup = "adyen-kyc-tile-group";
42246
42463
  const tileGroupError = "adyen-kyc-tile-group-error";
42247
42464
  const tileGroupErrorIcon = "adyen-kyc-tile-group-error-icon";
42248
42465
  const tileGroupHorizontal = "adyen-kyc-tile-group-horizontal";
42249
- const styles$5 = {
42466
+ const styles$6 = {
42250
42467
  tileGroup,
42251
42468
  tileGroupError,
42252
42469
  tileGroupErrorIcon,
@@ -42266,15 +42483,15 @@ function TileGroup({
42266
42483
  const name = nameProp ?? uniqName;
42267
42484
  const finalName = allowMultiple ? `${name}[]` : name;
42268
42485
  return /* @__PURE__ */ jsxs(Fragment, { children: [
42269
- !!errorMessage && /* @__PURE__ */ jsxs("div", { "aria-live": "polite", className: styles$5.tileGroupError, children: [
42270
- /* @__PURE__ */ jsx("span", { className: styles$5.tileGroupErrorIcon, children: /* @__PURE__ */ jsx(Icon, { name: "field-error" }) }),
42486
+ !!errorMessage && /* @__PURE__ */ jsxs("div", { "aria-live": "polite", className: styles$6.tileGroupError, children: [
42487
+ /* @__PURE__ */ jsx("span", { className: styles$6.tileGroupErrorIcon, children: /* @__PURE__ */ jsx(Icon, { name: "field-error" }) }),
42271
42488
  errorMessage
42272
42489
  ] }),
42273
42490
  /* @__PURE__ */ jsx(
42274
42491
  "div",
42275
42492
  {
42276
- className: cx(styles$5.tileGroup, {
42277
- [styles$5.tileGroupHorizontal]: isHorizontal
42493
+ className: cx(styles$6.tileGroup, {
42494
+ [styles$6.tileGroupHorizontal]: isHorizontal
42278
42495
  }),
42279
42496
  children: tiles.map((tile2, index) => {
42280
42497
  const { value, id, icon, subTitle, label, disabled } = tile2;
@@ -43331,7 +43548,7 @@ const sourceOfFundsUploadModalContentFieldRadioGroup = "adyen-kyc-source-of-fund
43331
43548
  const sourceOfFundsUploadModalContentRequirementsContainer = "adyen-kyc-source-of-funds-upload-modal-content-requirements-container";
43332
43549
  const sourceOfFundsUploadListHeading = "adyen-kyc-source-of-funds-upload-list-heading";
43333
43550
  const sourceOfFundsUploadListRemoveButton = "adyen-kyc-source-of-funds-upload-list-remove-button";
43334
- const styles$4 = {
43551
+ const styles$5 = {
43335
43552
  sourceOfFunds,
43336
43553
  sourceOfFundsWrapperLoading,
43337
43554
  sourceOfFundsWrapperHeading,
@@ -43375,7 +43592,7 @@ function AdditionalDataForAssetSale(props) {
43375
43592
  handleAmountChange("amount");
43376
43593
  };
43377
43594
  return /* @__PURE__ */ jsxs(Fragment, { children: [
43378
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsGridContainer, children: [
43595
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsGridContainer, children: [
43379
43596
  /* @__PURE__ */ jsx(
43380
43597
  Field,
43381
43598
  {
@@ -43598,21 +43815,21 @@ const SOFFinancierModal = (props) => {
43598
43815
  {
43599
43816
  variant: "title-l",
43600
43817
  el: "h3",
43601
- className: styles$4.sourceOfFundsGettingStartedHelpHeader,
43818
+ className: styles$5.sourceOfFundsGettingStartedHelpHeader,
43602
43819
  children: i18n.get("investorDetails")
43603
43820
  }
43604
43821
  ) }),
43605
- /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsSofFinancierForm, children: [
43822
+ /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsSofFinancierForm, children: [
43606
43823
  errorMessage && /* @__PURE__ */ jsx(
43607
43824
  Alert,
43608
43825
  {
43609
43826
  title: "Error submitting data",
43610
43827
  variant: "error",
43611
- className: styles$4.sourceOfFundsSofFinancierFormError,
43828
+ className: styles$5.sourceOfFundsSofFinancierFormError,
43612
43829
  children: errorMessage
43613
43830
  }
43614
43831
  ),
43615
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsSofFinancierFormNameGroup, children: [
43832
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsSofFinancierFormNameGroup, children: [
43616
43833
  /* @__PURE__ */ jsx(
43617
43834
  Field,
43618
43835
  {
@@ -43725,7 +43942,7 @@ const SOFFinancierModal = (props) => {
43725
43942
  }
43726
43943
  )
43727
43944
  ] }) }),
43728
- /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsFinancierFooter, children: [
43945
+ /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsFinancierFooter, children: [
43729
43946
  Number.isFinite(indexNumber) && /* @__PURE__ */ jsx(
43730
43947
  Button,
43731
43948
  {
@@ -43805,19 +44022,19 @@ function AdditionalDataForThirdParty(props) {
43805
44022
  {
43806
44023
  type: "button",
43807
44024
  onClick: () => handleShowUpdateFinancierModal(index),
43808
- className: styles$4.sourceOfFundsThirdPartyFundingFinancierGroup,
44025
+ className: styles$5.sourceOfFundsThirdPartyFundingFinancierGroup,
43809
44026
  children: [
43810
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
44027
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
43811
44028
  /* @__PURE__ */ jsx(
43812
44029
  Button,
43813
44030
  {
43814
44031
  tertiary: true,
43815
44032
  icon: "user",
43816
44033
  onClick: () => handleShowUpdateFinancierModal(index),
43817
- className: styles$4.sourceOfFundsThirdPartyFundingAvatar
44034
+ className: styles$5.sourceOfFundsThirdPartyFundingAvatar
43818
44035
  }
43819
44036
  ),
43820
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
44037
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
43821
44038
  /* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
43822
44039
  financier.firstName,
43823
44040
  " ",
@@ -43836,16 +44053,16 @@ function AdditionalDataForThirdParty(props) {
43836
44053
  "button",
43837
44054
  {
43838
44055
  type: "button",
43839
- className: styles$4.sourceOfFundsThirdPartyFundingFinancierGroup,
44056
+ className: styles$5.sourceOfFundsThirdPartyFundingFinancierGroup,
43840
44057
  onClick: handleToggleFinancierModal,
43841
- children: /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
44058
+ children: /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
43842
44059
  /* @__PURE__ */ jsx(
43843
44060
  Button,
43844
44061
  {
43845
44062
  tertiary: true,
43846
44063
  icon: "plus",
43847
44064
  onClick: handleToggleFinancierModal,
43848
- className: styles$4.sourceOfFundsThirdPartyFundingAvatar
44065
+ className: styles$5.sourceOfFundsThirdPartyFundingAvatar
43849
44066
  }
43850
44067
  ),
43851
44068
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("addInvestor") })
@@ -43882,14 +44099,14 @@ function AdditionalDataOriginatorLegalEntity(props) {
43882
44099
  Field,
43883
44100
  {
43884
44101
  name: "originatorType",
43885
- className: styles$4.sourceOfFundsUploadModalContentField,
44102
+ className: styles$5.sourceOfFundsUploadModalContentField,
43886
44103
  label: i18n.get("originatorType"),
43887
44104
  children: (childProps) => /* @__PURE__ */ jsx(
43888
44105
  RadioGroup,
43889
44106
  {
43890
44107
  ...childProps,
43891
44108
  name: "originatorType",
43892
- className: styles$4.sourceOfFundsUploadModalContentFieldRadioGroup,
44109
+ className: styles$5.sourceOfFundsUploadModalContentFieldRadioGroup,
43893
44110
  items: radioItems,
43894
44111
  value: data.originatorType,
43895
44112
  disabled: false,
@@ -44037,7 +44254,7 @@ function AdditionalDataForInheritance(props) {
44037
44254
  handleAmountChange("amount");
44038
44255
  };
44039
44256
  return /* @__PURE__ */ jsxs(Fragment, { children: [
44040
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsGridContainer, children: [
44257
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsGridContainer, children: [
44041
44258
  /* @__PURE__ */ jsx(
44042
44259
  Field,
44043
44260
  {
@@ -44111,7 +44328,7 @@ function AdditionalDataForInheritance(props) {
44111
44328
  }
44112
44329
  )
44113
44330
  ] }),
44114
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsSubHeading, children: [
44331
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsSubHeading, children: [
44115
44332
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("describeTheDecedent") }),
44116
44333
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: i18n.get("weNeedMoreInformationAboutTheIndividual") })
44117
44334
  ] }),
@@ -44168,7 +44385,7 @@ function AdditionalDataForDonation(props) {
44168
44385
  )
44169
44386
  }
44170
44387
  ),
44171
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsGridContainer, children: [
44388
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsGridContainer, children: [
44172
44389
  /* @__PURE__ */ jsx(
44173
44390
  Field,
44174
44391
  {
@@ -44217,7 +44434,7 @@ function AdditionalDataForDonation(props) {
44217
44434
  }
44218
44435
  )
44219
44436
  ] }),
44220
- /* @__PURE__ */ jsx("div", { className: styles$4.sourceOfFundsSubHeading, children: /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("benefactorDetails") }) }),
44437
+ /* @__PURE__ */ jsx("div", { className: styles$5.sourceOfFundsSubHeading, children: /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: i18n.get("benefactorDetails") }) }),
44221
44438
  /* @__PURE__ */ jsx(
44222
44439
  AdditionalDataOriginatorLegalEntity,
44223
44440
  {
@@ -44390,7 +44607,7 @@ function SourceOfFundsAdditionalData(props) {
44390
44607
  return null;
44391
44608
  }
44392
44609
  };
44393
- return /* @__PURE__ */ jsxs("form", { className: styles$4.sourceOfFundsAdditionalDataForm, children: [
44610
+ return /* @__PURE__ */ jsxs("form", { className: styles$5.sourceOfFundsAdditionalDataForm, children: [
44394
44611
  /* @__PURE__ */ jsx(
44395
44612
  ErrorPanel,
44396
44613
  {
@@ -44423,8 +44640,8 @@ function SourceOfFunds(props) {
44423
44640
  () => getPageHeadings(sourceOfFundsType ?? "adyen"),
44424
44641
  [sourceOfFundsType]
44425
44642
  );
44426
- return loading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles$4.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, { size: "medium" }) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
44427
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsWrapperHeading, children: [
44643
+ return loading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles$5.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, { size: "medium" }) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
44644
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsWrapperHeading, children: [
44428
44645
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
44429
44646
  (activeForm == null ? void 0 : activeForm.formId) === "additionalData" ? pageHeadings.heading : {
44430
44647
  key: "selectASourceOfFunding",
@@ -44433,7 +44650,7 @@ function SourceOfFunds(props) {
44433
44650
  }
44434
44651
  }
44435
44652
  ) }),
44436
- /* @__PURE__ */ jsxs(Typography, { className: styles$4.sourceOfFundsWrapperDescription, children: [
44653
+ /* @__PURE__ */ jsxs(Typography, { className: styles$5.sourceOfFundsWrapperDescription, children: [
44437
44654
  (activeForm == null ? void 0 : activeForm.formId) === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
44438
44655
  allSoFTypes.length === 0 && i18n.get("noCategoriesAvailable")
44439
44656
  ] })
@@ -44460,19 +44677,19 @@ const description = "adyen-kyc-description";
44460
44677
  const descriptionSectionField = "adyen-kyc-description-section-field";
44461
44678
  const descriptionSectionLabel = "adyen-kyc-description-section-label";
44462
44679
  const descriptionSectionData = "adyen-kyc-description-section-data";
44463
- const styles$3 = {
44680
+ const styles$4 = {
44464
44681
  description,
44465
44682
  descriptionSectionField,
44466
44683
  descriptionSectionLabel,
44467
44684
  descriptionSectionData
44468
44685
  };
44469
44686
  const Description = ({ className: className2, list }) => {
44470
- const descriptionClassNames = cx(styles$3.description, className2);
44471
- return /* @__PURE__ */ jsx("dl", { className: descriptionClassNames, children: list.map(({ term, details }, index) => /* @__PURE__ */ jsxs("div", { className: styles$3.descriptionSectionField, children: [
44472
- /* @__PURE__ */ jsx("dt", { className: styles$3.descriptionSectionLabel, children: term }),
44473
- Array.isArray(details) ? /* @__PURE__ */ jsx("dd", { className: styles$3.descriptionSectionData, children: details.map((detail, index2) => {
44687
+ const descriptionClassNames = cx(styles$4.description, className2);
44688
+ return /* @__PURE__ */ jsx("dl", { className: descriptionClassNames, children: list.map(({ term, details }, index) => /* @__PURE__ */ jsxs("div", { className: styles$4.descriptionSectionField, children: [
44689
+ /* @__PURE__ */ jsx("dt", { className: styles$4.descriptionSectionLabel, children: term }),
44690
+ Array.isArray(details) ? /* @__PURE__ */ jsx("dd", { className: styles$4.descriptionSectionData, children: details.map((detail, index2) => {
44474
44691
  return /* @__PURE__ */ jsx("div", { children: detail }, index2);
44475
- }) }) : /* @__PURE__ */ jsx("dd", { className: styles$3.descriptionSectionData, children: details })
44692
+ }) }) : /* @__PURE__ */ jsx("dd", { className: styles$4.descriptionSectionData, children: details })
44476
44693
  ] }, index)) });
44477
44694
  };
44478
44695
  function SourceOfFundsGettingStartedCard(props) {
@@ -44481,9 +44698,9 @@ function SourceOfFundsGettingStartedCard(props) {
44481
44698
  return /* @__PURE__ */ jsx(
44482
44699
  Card,
44483
44700
  {
44484
- className: styles$4.sourceOfFundsGettingStartedCardsCard,
44485
- headerClassName: styles$4.sourceOfFundsGettingStartedCardsCardHeader,
44486
- bodyClassName: styles$4.sourceOfFundsGettingStartedCardsCardBody,
44701
+ className: styles$5.sourceOfFundsGettingStartedCardsCard,
44702
+ headerClassName: styles$5.sourceOfFundsGettingStartedCardsCardHeader,
44703
+ bodyClassName: styles$5.sourceOfFundsGettingStartedCardsCardBody,
44487
44704
  title,
44488
44705
  stateful: true,
44489
44706
  onClick,
@@ -44499,7 +44716,7 @@ function SourceOfFundsGettingStartedCard(props) {
44499
44716
  children: isEdit && (meta == null ? void 0 : meta.length) && /* @__PURE__ */ jsx(
44500
44717
  Description,
44501
44718
  {
44502
- className: styles$4.sourceOfFundsGettingStartedCardsCardDescription,
44719
+ className: styles$5.sourceOfFundsGettingStartedCardsCardDescription,
44503
44720
  list: meta
44504
44721
  }
44505
44722
  )
@@ -44598,7 +44815,7 @@ const SourceOfFundsGettingStarted = ({
44598
44815
  return /* @__PURE__ */ jsxs(
44599
44816
  "div",
44600
44817
  {
44601
- className: styles$4.sourceOfFundsGettingStarted,
44818
+ className: styles$5.sourceOfFundsGettingStarted,
44602
44819
  "data-testid": "source-of-funds-getting-started",
44603
44820
  children: [
44604
44821
  !hasSourceOfFunds && /* @__PURE__ */ jsx(
@@ -44607,13 +44824,13 @@ const SourceOfFundsGettingStarted = ({
44607
44824
  type: "image",
44608
44825
  testId: "source-of-funds-getting-started-icon",
44609
44826
  name: "source-of-funds",
44610
- className: styles$4.sourceOfFundsGettingStartedIcon
44827
+ className: styles$5.sourceOfFundsGettingStartedIcon
44611
44828
  }
44612
44829
  ),
44613
- /* @__PURE__ */ jsx(Typography, { className: styles$4.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("financialProductFundingSources") }),
44830
+ /* @__PURE__ */ jsx(Typography, { className: styles$5.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("financialProductFundingSources") }),
44614
44831
  hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
44615
- /* @__PURE__ */ jsx(Typography, { className: styles$4.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
44616
- /* @__PURE__ */ jsx("div", { className: styles$4.sourceOfFundsGettingStartedCards, children: mapBusinessLines(businessLines) }),
44832
+ /* @__PURE__ */ jsx(Typography, { className: styles$5.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
44833
+ /* @__PURE__ */ jsx("div", { className: styles$5.sourceOfFundsGettingStartedCards, children: mapBusinessLines(businessLines) }),
44617
44834
  handleCancelClick && /* @__PURE__ */ jsx(
44618
44835
  Button,
44619
44836
  {
@@ -44621,20 +44838,20 @@ const SourceOfFundsGettingStarted = ({
44621
44838
  block: true,
44622
44839
  large: true,
44623
44840
  testId: "source-of-funds-getting-return-button",
44624
- className: styles$4.sourceOfFundsGettingStartedCancelButton,
44841
+ className: styles$5.sourceOfFundsGettingStartedCancelButton,
44625
44842
  onClick: handleCancelClick,
44626
44843
  label: i18n.get("returnToTaskList")
44627
44844
  }
44628
44845
  )
44629
44846
  ] }),
44630
44847
  !hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
44631
- /* @__PURE__ */ jsx(Typography, { className: styles$4.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
44632
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsGettingStartedActions, children: [
44848
+ /* @__PURE__ */ jsx(Typography, { className: styles$5.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
44849
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsGettingStartedActions, children: [
44633
44850
  /* @__PURE__ */ jsx(
44634
44851
  Button,
44635
44852
  {
44636
44853
  large: true,
44637
- className: styles$4.sourceOfFundsGettingStartedPrimaryButton,
44854
+ className: styles$5.sourceOfFundsGettingStartedPrimaryButton,
44638
44855
  label: i18n.get("gettingStarted"),
44639
44856
  block: true,
44640
44857
  testId: "source-of-funds-getting-primary-button",
@@ -44736,23 +44953,23 @@ const SOFUploadModal = (props) => {
44736
44953
  {
44737
44954
  variant: "title-l",
44738
44955
  el: "h2",
44739
- className: styles$4.sourceOfFundsGettingStartedHelpHeader,
44956
+ className: styles$5.sourceOfFundsGettingStartedHelpHeader,
44740
44957
  children: i18n.get("uploadASupportingDocument")
44741
44958
  }
44742
44959
  ) }),
44743
- /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsUploadModalContent, children: [
44960
+ /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsUploadModalContent, children: [
44744
44961
  (businessLines == null ? void 0 : businessLines.length) > 1 ? /* @__PURE__ */ jsx(
44745
44962
  Field,
44746
44963
  {
44747
44964
  name: "service",
44748
- className: styles$4.sourceOfFundsUploadModalContentField,
44965
+ className: styles$5.sourceOfFundsUploadModalContentField,
44749
44966
  label: i18n.get("whatFinancialProductIsThisFor"),
44750
44967
  children: (childProps) => /* @__PURE__ */ jsx(
44751
44968
  RadioGroup,
44752
44969
  {
44753
44970
  ...childProps,
44754
44971
  name: "service",
44755
- className: styles$4.sourceOfFundsUploadModalContentFieldRadioGroup,
44972
+ className: styles$5.sourceOfFundsUploadModalContentFieldRadioGroup,
44756
44973
  items: serviceRadioItems,
44757
44974
  value: selectedService,
44758
44975
  disabled: false,
@@ -44769,7 +44986,7 @@ const SOFUploadModal = (props) => {
44769
44986
  name: "documentType",
44770
44987
  label: i18n.get("documentType"),
44771
44988
  "data-testid": "documentType",
44772
- className: styles$4.sourceOfFundsUploadModalContentField,
44989
+ className: styles$5.sourceOfFundsUploadModalContentField,
44773
44990
  children: (childProps) => /* @__PURE__ */ jsx(
44774
44991
  Select,
44775
44992
  {
@@ -44783,7 +45000,7 @@ const SOFUploadModal = (props) => {
44783
45000
  )
44784
45001
  }
44785
45002
  ),
44786
- (documentRequirements == null ? void 0 : documentRequirements.length) ? /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsUploadModalContentRequirementsContainer, children: [
45003
+ (documentRequirements == null ? void 0 : documentRequirements.length) ? /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsUploadModalContentRequirementsContainer, children: [
44787
45004
  /* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: i18n.get("documentRequirements") }),
44788
45005
  /* @__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)) })
44789
45006
  ] }) : null,
@@ -44849,10 +45066,10 @@ const SourceOfFundsUpload = ({
44849
45066
  }
44850
45067
  }
44851
45068
  };
44852
- return /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsUploadList, children: [
44853
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsUploadListHeading, children: [
45069
+ return /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsUploadList, children: [
45070
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsUploadListHeading, children: [
44854
45071
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("supportingDocuments") }),
44855
- /* @__PURE__ */ jsx(Typography, { className: styles$4.sourceOfFundsWrapperDescription, children: (sourceOfFundsCategories == null ? void 0 : sourceOfFundsCategories.length) ? i18n.get("weNeedProofOfFundingPlural", {
45072
+ /* @__PURE__ */ jsx(Typography, { className: styles$5.sourceOfFundsWrapperDescription, children: (sourceOfFundsCategories == null ? void 0 : sourceOfFundsCategories.length) ? i18n.get("weNeedProofOfFundingPlural", {
44856
45073
  values: {
44857
45074
  category1_name: sourceOfFundsCategories[0] ?? "",
44858
45075
  category2_name: sourceOfFundsCategories[1] ?? ""
@@ -44864,12 +45081,12 @@ const SourceOfFundsUpload = ({
44864
45081
  documents == null ? void 0 : documents.map((document2) => /* @__PURE__ */ jsxs(
44865
45082
  "div",
44866
45083
  {
44867
- className: styles$4.sourceOfFundsThirdPartyFundingFinancierGroup,
45084
+ className: styles$5.sourceOfFundsThirdPartyFundingFinancierGroup,
44868
45085
  onClick: () => setDocToDelete(document2),
44869
45086
  children: [
44870
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
44871
- /* @__PURE__ */ jsx("div", { className: styles$4.sourceOfFundsThirdPartyFundingAvatar, children: /* @__PURE__ */ jsx(Icon, { name: "document" }) }),
44872
- /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
45087
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
45088
+ /* @__PURE__ */ jsx("div", { className: styles$5.sourceOfFundsThirdPartyFundingAvatar, children: /* @__PURE__ */ jsx(Icon, { name: "document" }) }),
45089
+ /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
44873
45090
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body-strongest", children: document2.fileName }),
44874
45091
  /* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: parseSOFDocumentDescription(i18n, document2.description) })
44875
45092
  ] })
@@ -44877,7 +45094,7 @@ const SourceOfFundsUpload = ({
44877
45094
  /* @__PURE__ */ jsx(
44878
45095
  Button,
44879
45096
  {
44880
- className: styles$4.sourceOfFundsUploadListRemoveButton,
45097
+ className: styles$5.sourceOfFundsUploadListRemoveButton,
44881
45098
  iconOnly: true,
44882
45099
  icon: "cross",
44883
45100
  onClick: () => setDocToDelete(document2),
@@ -44892,16 +45109,16 @@ const SourceOfFundsUpload = ({
44892
45109
  "button",
44893
45110
  {
44894
45111
  type: "button",
44895
- className: styles$4.sourceOfFundsThirdPartyFundingFinancierGroup,
45112
+ className: styles$5.sourceOfFundsThirdPartyFundingFinancierGroup,
44896
45113
  onClick: openUploadModal,
44897
- children: /* @__PURE__ */ jsxs("div", { className: styles$4.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
45114
+ children: /* @__PURE__ */ jsxs("div", { className: styles$5.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
44898
45115
  /* @__PURE__ */ jsx(
44899
45116
  Button,
44900
45117
  {
44901
45118
  tertiary: true,
44902
45119
  icon: "plus",
44903
45120
  onClick: openUploadModal,
44904
- className: styles$4.sourceOfFundsUploadDocumentCardsIcon,
45121
+ className: styles$5.sourceOfFundsUploadDocumentCardsIcon,
44905
45122
  testId: "source-of-funds-upload-button"
44906
45123
  }
44907
45124
  ),
@@ -44909,7 +45126,7 @@ const SourceOfFundsUpload = ({
44909
45126
  ] })
44910
45127
  }
44911
45128
  ),
44912
- /* @__PURE__ */ jsx("div", { className: styles$4.sourceOfFundsGettingStartedActions, children: handleNavigateToSummary && /* @__PURE__ */ jsx(
45129
+ /* @__PURE__ */ jsx("div", { className: styles$5.sourceOfFundsGettingStartedActions, children: handleNavigateToSummary && /* @__PURE__ */ jsx(
44913
45130
  Button,
44914
45131
  {
44915
45132
  tertiary: true,
@@ -45020,6 +45237,10 @@ function SourceOfFundsDropin({
45020
45237
  }
45021
45238
  };
45022
45239
  useEffect(() => {
45240
+ userEvents.addEvent("Landed on page", {
45241
+ actionLevel: "task",
45242
+ actionType: "start"
45243
+ });
45023
45244
  loadBusinessLines(legalEntityResponse.id);
45024
45245
  }, []);
45025
45246
  const canSubmitForm = useMemo(
@@ -45151,7 +45372,7 @@ function SourceOfFundsDropin({
45151
45372
  const handleNavigateToUploadPage = () => {
45152
45373
  setShowUploadPage(true);
45153
45374
  };
45154
- return /* @__PURE__ */ jsx("div", { className: styles$4.sourceOfFunds, children: loading ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
45375
+ return /* @__PURE__ */ jsx("div", { className: styles$5.sourceOfFunds, children: loading ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
45155
45376
  gettingStarted && !showUploadPage && /* @__PURE__ */ jsx(
45156
45377
  SourceOfFundsGettingStarted,
45157
45378
  {
@@ -45695,6 +45916,9 @@ function DropinComposer({
45695
45916
  actionType: "start"
45696
45917
  });
45697
45918
  }, []);
45919
+ useEffect(() => {
45920
+ userEvents.updateBaseTrackingPayload({ task: currentTask });
45921
+ }, [currentTask]);
45698
45922
  useEffect(() => {
45699
45923
  const fetchConfiguration = async () => {
45700
45924
  const data = await getConfiguration2({
@@ -47008,7 +47232,6 @@ function AcceptTermsOfServiceComponent({
47008
47232
  await getServiceAgreementAcceptanceInfos2(legalEntityId2).then(({ data }) => setServiceAgreementAcceptanceInfos(data)).catch(logger$l.error);
47009
47233
  }, [getServiceAgreementAcceptanceInfos2, legalEntityId2]);
47010
47234
  const handleSign = useCallback(
47011
- // @ts-ignore-error:next-line ts does not infer type correctly
47012
47235
  async (...params) => {
47013
47236
  const serviceAgreement = await acceptServiceAgreement2(...params);
47014
47237
  await Promise.all([fetchUnsigned(), fetchSigned()]);
@@ -47271,7 +47494,7 @@ const embeddedStatusAvatar = "adyen-kyc-embedded-status-avatar";
47271
47494
  const embeddedStatusLight = "adyen-kyc-embedded-status-light";
47272
47495
  const embeddedStatusActionIndicator = "adyen-kyc-embedded-status-action-indicator";
47273
47496
  const embeddedStatusInfo = "adyen-kyc-embedded-status-info";
47274
- const styles$2 = {
47497
+ const styles$3 = {
47275
47498
  embeddedStatus,
47276
47499
  embeddedStatusLoading,
47277
47500
  embeddedStatusAvatar,
@@ -47321,22 +47544,22 @@ const EmbeddedStatus = ({
47321
47544
  "button",
47322
47545
  {
47323
47546
  type: "button",
47324
- className: cx(className2, styles$2.embeddedStatus, "adyen-kyc-externalComponent", {
47325
- [styles$2.embeddedStatusLoading]: loading,
47326
- [styles$2.embeddedStatusLight]: light
47547
+ className: cx(className2, styles$3.embeddedStatus, "adyen-kyc-externalComponent", {
47548
+ [styles$3.embeddedStatusLoading]: loading,
47549
+ [styles$3.embeddedStatusLight]: light
47327
47550
  }),
47328
47551
  onClick,
47329
47552
  ...props,
47330
47553
  children: [
47331
- /* @__PURE__ */ jsx("section", { className: styles$2.embeddedStatusAvatar, children: loading ? /* @__PURE__ */ jsx(Skeleton, { height: "100%", width: "100%", circle: true }) : /* @__PURE__ */ jsx(Icon, { className: styles$2.embeddedStatusIcon, name: iconName }) }),
47332
- /* @__PURE__ */ jsx("section", { className: styles$2.embeddedStatusInfo, children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
47554
+ /* @__PURE__ */ jsx("section", { className: styles$3.embeddedStatusAvatar, children: loading ? /* @__PURE__ */ jsx(Skeleton, { height: "100%", width: "100%", circle: true }) : /* @__PURE__ */ jsx(Icon, { className: styles$3.embeddedStatusIcon, name: iconName }) }),
47555
+ /* @__PURE__ */ jsx("section", { className: styles$3.embeddedStatusInfo, children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
47333
47556
  /* @__PURE__ */ jsx(Skeleton, { text: true, width: "20ch", height: "1em" }),
47334
47557
  /* @__PURE__ */ jsx(Skeleton, { text: true, width: "90%", height: "1em" })
47335
47558
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
47336
47559
  /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: title }),
47337
47560
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: subtitle })
47338
47561
  ] }) }),
47339
- actionIndicator ? /* @__PURE__ */ jsx("section", { className: styles$2.embeddedStatusButton, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "5em", height: "2em" }) : /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", className: styles$2.embeddedStatusActionIndicator, children: i18n.get(actionIndicator.labelKey) }) }) : (statusTag == null ? void 0 : statusTag.translationKey) && /* @__PURE__ */ jsx("section", { className: styles$2.embeddedStatusTag, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "8ch", height: "1em" }) : /* @__PURE__ */ jsx(Tag, { variant: statusTag.variant, children: i18n.get(statusTag.translationKey) }) })
47562
+ actionIndicator ? /* @__PURE__ */ jsx("section", { className: styles$3.embeddedStatusButton, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "5em", height: "2em" }) : /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", className: styles$3.embeddedStatusActionIndicator, children: i18n.get(actionIndicator.labelKey) }) }) : (statusTag == null ? void 0 : statusTag.translationKey) && /* @__PURE__ */ jsx("section", { className: styles$3.embeddedStatusTag, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "8ch", height: "1em" }) : /* @__PURE__ */ jsx(Tag, { variant: statusTag.variant, children: i18n.get(statusTag.translationKey) }) })
47340
47563
  ]
47341
47564
  }
47342
47565
  );
@@ -48060,7 +48283,6 @@ function SignPCIComponent({
48060
48283
  });
48061
48284
  }, [fetchLegalEntity, fetchPciTemplate]);
48062
48285
  const handleSign = useCallback(
48063
- // @ts-ignore-error:next-line ts does not infer type correctly
48064
48286
  async (...params) => {
48065
48287
  await signPci2(...params);
48066
48288
  await Promise.all([fetchLegalEntity(), fetchPciTemplate()]);
@@ -48075,14 +48297,11 @@ function SignPCIComponent({
48075
48297
  return /* @__PURE__ */ jsx(Loader, { size: "medium" });
48076
48298
  }
48077
48299
  if (!hasGenericError) {
48078
- return /* @__PURE__ */ jsx(MaybeModal, { inline: !modalView, onClose: handleOnClose, children: /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsx(
48079
- Splashscreen,
48080
- {
48081
- icon: "check",
48082
- title: i18n.get("pciDoesNotNeedSigningOrHasBeenSigned"),
48083
- onClick: handleOnClose
48084
- }
48085
- ) }) });
48300
+ return /* @__PURE__ */ jsx(MaybeModal, { inline: !modalView, onClose: handleOnClose, children: /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs(FormEndState, { children: [
48301
+ /* @__PURE__ */ jsx("template", { slot: "title", children: i18n.get("pciDoesNotNeedSigningOrHasBeenSigned") }),
48302
+ /* @__PURE__ */ jsx(OutlinedIcon, { slot: "icon", name: "check" }),
48303
+ /* @__PURE__ */ jsx("div", { slot: "content", children: /* @__PURE__ */ jsx(Button, { onClick: handleOnClose, label: i18n.get("finish") }) })
48304
+ ] }) }) });
48086
48305
  }
48087
48306
  return pciTemplate ? /* @__PURE__ */ jsx(
48088
48307
  PciDropin,
@@ -49351,22 +49570,6 @@ function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
49351
49570
  )
49352
49571
  ] });
49353
49572
  }
49354
- const FormEndState = ({ variant = "success", children: children2, className: className2 }) => {
49355
- const Slot = defineSlots(children2, ["title", "content", "icon", "actions"]);
49356
- return /* @__PURE__ */ jsxs(
49357
- "div",
49358
- {
49359
- className: cx("adyen-form-end-state", `adyen-form-end-state__icon--${variant}`, className2),
49360
- role: "alert",
49361
- children: [
49362
- /* @__PURE__ */ jsx(Slot, { name: "icon", children: variant === "success" ? /* @__PURE__ */ jsx(Icon, { name: "checkmark" }) : /* @__PURE__ */ jsx(AlertIcon, { variant }) }),
49363
- /* @__PURE__ */ jsx("span", { className: "adyen-form-end-state__title", children: /* @__PURE__ */ jsx(Slot, { name: "title" }) }),
49364
- /* @__PURE__ */ jsx("div", { className: "adyen-form-end-state__description", children: /* @__PURE__ */ jsx(Slot, { name: "content" }) }),
49365
- /* @__PURE__ */ jsx("div", { className: "adyen-form-end-state__actions", children: /* @__PURE__ */ jsx(Slot, { name: "actions" }) })
49366
- ]
49367
- }
49368
- );
49369
- };
49370
49573
  const customLabels = {
49371
49574
  company: {
49372
49575
  legalForm: "businessStructure",
@@ -49916,24 +50119,11 @@ function UpdateLegalEntityForHighExposure({
49916
50119
  }
49917
50120
  );
49918
50121
  }
49919
- const usePolling = ({
49920
- poller,
49921
- pollingInterval,
49922
- onNewValueReceived,
49923
- skip,
49924
- immediate = false
49925
- }) => {
49926
- useEffect(() => {
49927
- if (skip) return;
49928
- const pollAndProvideNewValue = () => {
49929
- poller().then((newValue) => onNewValueReceived(newValue)).catch((err) => console.error(err));
49930
- };
49931
- if (immediate) {
49932
- pollAndProvideNewValue();
49933
- }
49934
- const timeoutId = setInterval(pollAndProvideNewValue, pollingInterval);
49935
- return () => clearInterval(timeoutId);
49936
- }, [onNewValueReceived, poller, pollingInterval, skip, immediate]);
50122
+ const verification = "adyen-kyc-verification";
50123
+ const verificationDescription = "adyen-kyc-verification-description";
50124
+ const styles$2 = {
50125
+ verification,
50126
+ verificationDescription
49937
50127
  };
49938
50128
  const coerceError = (err) => {
49939
50129
  if (err instanceof Error) return err;
@@ -49980,7 +50170,7 @@ function ViewVerificationStatusComponent({
49980
50170
  onRedirect
49981
50171
  }) {
49982
50172
  const { i18n } = useI18nContext();
49983
- const { getOnboardingStatus: getOnboardingStatus2, generateOnboardingLink: generateOnboardingLink2 } = useComponentApi(legalEntityId2);
50173
+ const { generateOnboardingLink: generateOnboardingLink2 } = useComponentApi(legalEntityId2);
49984
50174
  const [onboardingStatus, setOnboardingStatus] = useState();
49985
50175
  const [alertContent, setAlertContent] = useState();
49986
50176
  const content = useMemo(() => {
@@ -50001,15 +50191,6 @@ function ViewVerificationStatusComponent({
50001
50191
  },
50002
50192
  [i18n, onError]
50003
50193
  );
50004
- const fetchOnboardingStatus = useCallback(async () => {
50005
- try {
50006
- const { status } = await getOnboardingStatus2();
50007
- return status;
50008
- } catch (error) {
50009
- handleError2(error, "onboardingRedirectLinkError");
50010
- return void 0;
50011
- }
50012
- }, [getOnboardingStatus2, handleError2]);
50013
50194
  const updateOnboardingStatus = useCallback(
50014
50195
  (newStatus) => {
50015
50196
  if (!newStatus) return;
@@ -50018,16 +50199,18 @@ function ViewVerificationStatusComponent({
50018
50199
  },
50019
50200
  [onStatusChange]
50020
50201
  );
50021
- usePolling({
50022
- poller: fetchOnboardingStatus,
50023
- pollingInterval: 1e4,
50024
- onNewValueReceived: updateOnboardingStatus,
50025
- skip: onboardingStatus && FINAL_STATUSES.includes(onboardingStatus)
50202
+ const { isLoading, data, isError: isError2 } = useOnboardingStatus({
50203
+ refetchInterval: (res) => {
50204
+ var _a2;
50205
+ const status = (_a2 = res.state.data) == null ? void 0 : _a2.status;
50206
+ setOnboardingStatus(status);
50207
+ return status === void 0 || !FINAL_STATUSES.includes(status) ? 3e3 : false;
50208
+ }
50026
50209
  });
50027
50210
  useEffect(() => {
50028
50211
  setAlertContent(void 0);
50029
- fetchOnboardingStatus().then(updateOnboardingStatus).catch(logger$a.error);
50030
- }, [fetchOnboardingStatus, updateOnboardingStatus]);
50212
+ updateOnboardingStatus(data == null ? void 0 : data.status);
50213
+ }, [data, updateOnboardingStatus]);
50031
50214
  const [loadingLinkStatus, setLinkLoadingStatus] = useState("success");
50032
50215
  const redirectToAdyen = async () => {
50033
50216
  setLinkLoadingStatus("loading");
@@ -50070,26 +50253,24 @@ function ViewVerificationStatusComponent({
50070
50253
  {
50071
50254
  label: i18n.get(content.ctaButton),
50072
50255
  onClick: redirectToAdyen,
50073
- type: "button",
50074
- className: "adyen-view-verification-status__button",
50075
50256
  role: "link",
50076
50257
  loading: loadingLinkStatus === "loading"
50077
50258
  }
50078
50259
  );
50079
50260
  };
50080
50261
  const renderBody = () => {
50081
- if (alertContent) {
50082
- return /* @__PURE__ */ jsx(Alert, { title: i18n.get(alertContent), variant: "error" });
50262
+ if (alertContent || isError2) {
50263
+ return /* @__PURE__ */ jsx(Alert, { title: i18n.get(alertContent ?? "onboardingRedirectLinkError"), variant: "error" });
50083
50264
  }
50084
- if (content) {
50265
+ if (!isLoading && content) {
50085
50266
  return /* @__PURE__ */ jsxs(Fragment, { children: [
50086
- hideExplanation ? null : content.description.map((key) => /* @__PURE__ */ jsx("p", { className: "adyen-view-verification-status__description", children: i18n.get(key) }, key)),
50087
- /* @__PURE__ */ jsx("div", { className: "adyen-view-verification-status__footer", children: renderFooter() })
50267
+ hideExplanation ? null : content.description.map((key) => /* @__PURE__ */ jsx("p", { className: styles$2.verificationDescription, children: i18n.get(key) }, key)),
50268
+ /* @__PURE__ */ jsx("div", { children: renderFooter() })
50088
50269
  ] });
50089
50270
  }
50090
50271
  return /* @__PURE__ */ jsx(Loader, { size: "medium" });
50091
50272
  };
50092
- return /* @__PURE__ */ jsx("section", { className: "adyen-view-verification-status", children: renderBody() });
50273
+ return /* @__PURE__ */ jsx("section", { className: styles$2.verification, children: renderBody() });
50093
50274
  }
50094
50275
  const componentsMap = {
50095
50276
  individualDropin: IndividualDropin,
@@ -50181,7 +50362,6 @@ const useAnalytics = ({ onUserEvent, sdkVersion, componentName }) => {
50181
50362
  const capabilities = Object.keys(rootLegalEntity.capabilities ?? {});
50182
50363
  const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
50183
50364
  userEvents.updateBaseTrackingPayload({
50184
- legalEntityId: rootLegalEntity.id,
50185
50365
  entityType: rootLegalEntity.type,
50186
50366
  countryCode,
50187
50367
  capabilities
@@ -50626,7 +50806,7 @@ const ConfigurationApiProvider = ({
50626
50806
  }) => {
50627
50807
  const authContext = useAuthContext();
50628
50808
  const { isEmbeddedDropin, loadingContext } = authContext;
50629
- const sdkVersion = "3.49.2";
50809
+ const sdkVersion = "3.50.1";
50630
50810
  const rootLegalEntityId = useGlobalStore((store) => store.rootLegalEntity.id);
50631
50811
  useAnalytics({
50632
50812
  onUserEvent,
@@ -50979,7 +51159,7 @@ function StateReducer() {
50979
51159
  },
50980
51160
  valid: {
50981
51161
  ...state.valid,
50982
- [dataStoreId]: {}
51162
+ [dataStoreId]: false
50983
51163
  },
50984
51164
  fieldProblems: {
50985
51165
  ...state.fieldProblems,
@@ -50988,7 +51168,7 @@ function StateReducer() {
50988
51168
  };
50989
51169
  mergedState.validityByForm = {
50990
51170
  ...mergedState.validityByForm,
50991
- [dataStoreId]: {}
51171
+ [dataStoreId]: false
50992
51172
  };
50993
51173
  mergedState.allValid = Object.values(mergedState.validityByForm).every(
50994
51174
  (isValid) => isValid
@@ -51401,12 +51581,12 @@ const DebugTable = ({
51401
51581
  "No results found for ",
51402
51582
  /* @__PURE__ */ jsx("strong", { children: searchTerm })
51403
51583
  ] }) : /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsx("tbody", { children: filteredData.map(({ key, value, label, variant }) => /* @__PURE__ */ jsxs("tr", { children: [
51404
- tagPosition === "before" ? /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tag, { variant: variant ?? "grey", className: "adyen-kyc-tag--large", children: value }) }) : void 0,
51584
+ tagPosition === "before" ? /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tag, { variant: variant ?? "grey", children: value }) }) : void 0,
51405
51585
  /* @__PURE__ */ jsxs("td", { children: [
51406
51586
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: key }),
51407
51587
  label && /* @__PURE__ */ jsx("span", { children: label })
51408
51588
  ] }),
51409
- tagPosition === "after" ? /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tag, { variant: variant ?? "grey", className: "adyen-kyc-tag--large", children: value }) }) : void 0
51589
+ tagPosition === "after" ? /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tag, { variant: variant ?? "grey", children: value }) }) : void 0
51410
51590
  ] }, key)) }) })
51411
51591
  ] });
51412
51592
  };
@@ -51510,7 +51690,7 @@ const DebugModal = ({ onExit }) => {
51510
51690
  const [tab, setTab] = useState("metadata");
51511
51691
  const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
51512
51692
  const metadata = {
51513
- sdkVersion: "3.49.2",
51693
+ sdkVersion: "3.50.1",
51514
51694
  locale: i18n.locale,
51515
51695
  rootLegalEntityId: rootLegalEntity.id
51516
51696
  };
@@ -54507,7 +54687,7 @@ var TanstackQueryDevtools = (_k = class {
54507
54687
  if (__privateGet(this, _Component)) {
54508
54688
  Devtools = __privateGet(this, _Component);
54509
54689
  } else {
54510
- Devtools = lazy(() => import("./HO4MOOFI-BPdL391L.js"));
54690
+ Devtools = lazy(() => import("./HO4MOOFI-DkcbvWhF.js"));
54511
54691
  __privateSet(this, _Component, Devtools);
54512
54692
  }
54513
54693
  setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
@@ -54629,7 +54809,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
54629
54809
  if (__privateGet(this, _Component2)) {
54630
54810
  Devtools = __privateGet(this, _Component2);
54631
54811
  } else {
54632
- Devtools = lazy(() => import("./HUY7CZI3-Cl0-ZtHu.js"));
54812
+ Devtools = lazy(() => import("./HUY7CZI3-BpLsA4ow.js"));
54633
54813
  __privateSet(this, _Component2, Devtools);
54634
54814
  }
54635
54815
  setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
@@ -54789,7 +54969,7 @@ class UIElement extends BaseElement {
54789
54969
  constructor() {
54790
54970
  super(...arguments);
54791
54971
  this.render = () => {
54792
- const Component = this.props.component;
54972
+ const UIElement2 = this.props.component;
54793
54973
  return /* @__PURE__ */ jsx(SettingsProvider, { settings: this.props.settings, children: /* @__PURE__ */ jsx(
54794
54974
  ExperimentsContextProvider,
54795
54975
  {
@@ -54821,7 +55001,7 @@ class UIElement extends BaseElement {
54821
55001
  refreshExpiry: this.props.refreshExpiry,
54822
55002
  eventEmitter: this.eventEmitter,
54823
55003
  children: /* @__PURE__ */ jsx(DebugWrapper, { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container-wrapper", children: /* @__PURE__ */ jsx(AutoResizer, { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container", children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children: /* @__PURE__ */ jsx(
54824
- Component,
55004
+ UIElement2,
54825
55005
  {
54826
55006
  ...this.props.componentProps,
54827
55007
  onUnmount: this.remove