@adyen/kyc-components 3.11.3 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ import { lazy, Suspense, useId, forwardRef, memo, useMemo as useMemo$1, useEffec
6
6
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
7
7
  import { debounce, noop as noop$1, isEmpty as isEmpty$1, range } from "lodash";
8
8
  import OpenBankingSDK from "@adyen/openbankingsdk";
9
+ import { jsxs as jsxs$1, jsx as jsx$1 } from "preact/compat/jsx-runtime";
9
10
  import "@adyen/adyen-document-viewer/dist/adyen-document-viewer.min.css";
10
11
  import AdyenDocumentViewer from "@adyen/adyen-document-viewer";
11
12
  const ConfigurationApiContext = createContext(void 0);
@@ -187,6 +188,7 @@ const registrationAddress = "Registration address";
187
188
  const registeredAddressHeaderDescription = "The address as it appears on your company's official registration documents.";
188
189
  const registeredAddressHeaderDescription__NL = "The address registered to your company with the Chamber of Commerce.";
189
190
  const registeredAddressHeaderDescription__US = "Your address as it appears on your Secretary of State Registration.";
191
+ const registeredAddressHeaderDescription__PR = "Your address as it appears on your Department of State Registration.";
190
192
  const registeredAddressTrustHeaderDescription = "The address registered to your trust";
191
193
  const operationalAddress = "Operational address";
192
194
  const provideRegistrationDetails = "Provide registration details";
@@ -302,7 +304,6 @@ const pciDssQuestionnaire = "PCI DSS questionnaire";
302
304
  const serviceAgreementSignedSuccessfully = "Service agreement signed successfully";
303
305
  const serviceAgreementSignFailed = "Service agreement signing failed";
304
306
  const failedToGetServiceAgreementStatus = "Failed to get the service agreement status";
305
- const failedToFetchAcceptedByName = "Failed to get the legal entity that accepted service agreement";
306
307
  const failedToGetServiceAgreement = "Failed to get the service agreement";
307
308
  const failedToGetServiceAgreementInSelectedLanguageFallbackToEn = "Failed to get the service agreement in the selected language. Falling back to English.";
308
309
  const iHaveReadAndIAcceptTheseTerms = "I have read and I accept these terms and confirm that I am a legal representative authorized to accept these terms on behalf of the company. I have taken notice of the privacy statement (www.adyen.com/policies-and-disclaimer/privacy-policy) and I consent to my (personal) data being used for the purposes described therein.";
@@ -659,6 +660,7 @@ const nameOfBankAccountHolder = "We need to know about the bank account where yo
659
660
  const enterValidAccountDetails = "Please enter valid account details";
660
661
  const enterValid_ = "Please enter valid: %{fieldNames}";
661
662
  const whatBestDescribesYourBusinessSetup = "What best describes your business setup?";
663
+ const howWouldYouLikeToSetUpYourAccount = "How would you like to set up your account";
662
664
  const whichLegalArrangementDoesYourBusinessHave = "Which legal arrangement does your business have?";
663
665
  const sorryWeCantSetUpAnAccountForYou = "Sorry, we can’t set up an account for you";
664
666
  const changeYourBusinessSetup = "Change your business setup?";
@@ -804,11 +806,13 @@ const irsScheduleK1 = "IRS Schedule K-1 (Form 1065)";
804
806
  const certificateOfIncorporation = "Certificate of incorporation";
805
807
  const certificateOfFormation = "Certificate of formation";
806
808
  const secretaryOfStateFiling = "Secretary of State filing";
809
+ const secretaryOfStateFiling__PR = "Department of State filing";
807
810
  const partnerShipAgreement = "Partnership agreement";
808
811
  const charter = "Charter";
809
812
  const articlesOfIncorporation = "Articles of incorporation";
810
813
  const meetingRecords = "Board of directors' meeting records of decisions";
811
814
  const secretaryOfStateRegDoc = "Registration document from Secretary of State";
815
+ const secretaryOfStateRegDoc__PR = "Registration document from Department of State";
812
816
  const certificateOfIncumbency = "Certificate of incumbency";
813
817
  const documentIssuedWithinLastYear = "The document must be issued in the last 12 months. If it is older, make sure it contains a signature and a statement of affairs from the last 12 months.";
814
818
  const learnMore = "Learn more";
@@ -835,6 +839,10 @@ const addresses = "Addresses";
835
839
  const loading = "Loading";
836
840
  const businessIncorporationNumber = "Business incorporation number";
837
841
  const doNotHaveBusinessIncorporationNumber = "I do not have a Business incorporation number";
842
+ const retrieveMyInfoBusiness = "Retrieve Myinfo business";
843
+ const getYourBusinessVerifiedDetails = "Get your business's verified details instantly and skip uploading documents.";
844
+ const enterTheDetailsYourself = "Enter the details yourself";
845
+ const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
838
846
  const verificationMethod = "Verification method";
839
847
  const verifyViaMobileBankAppOrBankWebsite = "Verify the account via mobile bank app or bank website";
840
848
  const provideAccountDetailsAndUploadBankStatement = "Provide account details and upload a scan of a bank statement";
@@ -905,6 +913,7 @@ const legalCompanyName__helperText = "Enter the name exactly as it is on your co
905
913
  const legalCompanyName__helperText__AU = "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).";
906
914
  const legalCompanyName__helperText__NL = "Enter the name exactly as it is on your Chamber of Commerce registration.";
907
915
  const legalCompanyName__helperText__US = "Enter the name exactly as it appears on your Secretary of State Registration.";
916
+ const legalCompanyName__helperText__PR = "Enter the name exactly as it appears on your Department of State Registration.";
908
917
  const legalCompanyName__helperText__SG = "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile.";
909
918
  const legalCompanyName__helperText__HK = "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.";
910
919
  const taxInformationNumber = "Tax Identification Number";
@@ -1286,6 +1295,7 @@ const onboardingRedirectRejectedDescriptionP1 = "Your account can’t be set up.
1286
1295
  const onboardingRedirectVerifiedDescriptionP1 = "Your details are verified.";
1287
1296
  const onboardingRedirectLinkError = "Onboarding link not available at the moment, please try again later.";
1288
1297
  const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, please allow pop-ups for this site.";
1298
+ const failToLaunchSingpass = "failed to launch Singpass";
1289
1299
  const addBankDetails = "Add bank details";
1290
1300
  const addMissingBankDetails = "We are missing your bank details in order to perform payouts, please add your bank account.";
1291
1301
  const bankDetails = "Bank details";
@@ -1454,6 +1464,7 @@ const defaultTrans = {
1454
1464
  registeredAddressHeaderDescription,
1455
1465
  registeredAddressHeaderDescription__NL,
1456
1466
  registeredAddressHeaderDescription__US,
1467
+ registeredAddressHeaderDescription__PR,
1457
1468
  registeredAddressTrustHeaderDescription,
1458
1469
  operationalAddress,
1459
1470
  provideRegistrationDetails,
@@ -1569,7 +1580,6 @@ const defaultTrans = {
1569
1580
  serviceAgreementSignedSuccessfully,
1570
1581
  serviceAgreementSignFailed,
1571
1582
  failedToGetServiceAgreementStatus,
1572
- failedToFetchAcceptedByName,
1573
1583
  failedToGetServiceAgreement,
1574
1584
  failedToGetServiceAgreementInSelectedLanguageFallbackToEn,
1575
1585
  iHaveReadAndIAcceptTheseTerms,
@@ -1931,6 +1941,7 @@ const defaultTrans = {
1931
1941
  enterValidAccountDetails,
1932
1942
  enterValid_,
1933
1943
  whatBestDescribesYourBusinessSetup,
1944
+ howWouldYouLikeToSetUpYourAccount,
1934
1945
  whichLegalArrangementDoesYourBusinessHave,
1935
1946
  sorryWeCantSetUpAnAccountForYou,
1936
1947
  changeYourBusinessSetup,
@@ -2078,11 +2089,13 @@ const defaultTrans = {
2078
2089
  certificateOfIncorporation,
2079
2090
  certificateOfFormation,
2080
2091
  secretaryOfStateFiling,
2092
+ secretaryOfStateFiling__PR,
2081
2093
  partnerShipAgreement,
2082
2094
  charter,
2083
2095
  articlesOfIncorporation,
2084
2096
  meetingRecords,
2085
2097
  secretaryOfStateRegDoc,
2098
+ secretaryOfStateRegDoc__PR,
2086
2099
  certificateOfIncumbency,
2087
2100
  documentIssuedWithinLastYear,
2088
2101
  learnMore,
@@ -2110,6 +2123,10 @@ const defaultTrans = {
2110
2123
  loading,
2111
2124
  businessIncorporationNumber,
2112
2125
  doNotHaveBusinessIncorporationNumber,
2126
+ retrieveMyInfoBusiness,
2127
+ getYourBusinessVerifiedDetails,
2128
+ enterTheDetailsYourself,
2129
+ youAlsoHaveToUploadSomeSupportingDocuments,
2113
2130
  verificationMethod,
2114
2131
  verifyViaMobileBankAppOrBankWebsite,
2115
2132
  provideAccountDetailsAndUploadBankStatement,
@@ -2180,6 +2197,7 @@ const defaultTrans = {
2180
2197
  legalCompanyName__helperText__AU,
2181
2198
  legalCompanyName__helperText__NL,
2182
2199
  legalCompanyName__helperText__US,
2200
+ legalCompanyName__helperText__PR,
2183
2201
  legalCompanyName__helperText__SG,
2184
2202
  legalCompanyName__helperText__HK,
2185
2203
  taxInformationNumber,
@@ -2561,6 +2579,7 @@ const defaultTrans = {
2561
2579
  onboardingRedirectVerifiedDescriptionP1,
2562
2580
  onboardingRedirectLinkError,
2563
2581
  onboardingRedirectOpenError,
2582
+ failToLaunchSingpass,
2564
2583
  addBankDetails,
2565
2584
  addMissingBankDetails,
2566
2585
  bankDetails,
@@ -2779,13 +2798,6 @@ function useToastContext() {
2779
2798
  }
2780
2799
  return context;
2781
2800
  }
2782
- const CoreContext = createContext(void 0);
2783
- const useCoreContext = () => {
2784
- const context = useContext(CoreContext);
2785
- if (!context)
2786
- throw Error("You need a <CoreProvider> to use core context");
2787
- return context;
2788
- };
2789
2801
  var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
2790
2802
  SettingNames2["AcceptedCountries"] = "acceptedCountries";
2791
2803
  SettingNames2["AllowBankAccountFormatSelection"] = "allowBankAccountFormatSelection";
@@ -6710,7 +6722,6 @@ const InputRadio = ({
6710
6722
  });
6711
6723
  function RadioGroup({
6712
6724
  items = [],
6713
- i18n,
6714
6725
  name,
6715
6726
  onChange = noop,
6716
6727
  value,
@@ -6719,6 +6730,9 @@ function RadioGroup({
6719
6730
  className,
6720
6731
  disabled = false
6721
6732
  }) {
6733
+ const {
6734
+ i18n
6735
+ } = useI18nContext();
6722
6736
  const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
6723
6737
  return jsx("div", {
6724
6738
  className: "adyen-kyc-radio-group",
@@ -6907,7 +6921,6 @@ function CompanyRegistrationNumberTypeSelector({
6907
6921
  name: "companyRegistrationNumberType",
6908
6922
  items: options,
6909
6923
  value: selected,
6910
- i18n,
6911
6924
  onChange: (e) => handleSelect(e.target.value)
6912
6925
  })
6913
6926
  });
@@ -7239,11 +7252,6 @@ const businessRegistrationNumberMasks = {
7239
7252
  nonProfit: {
7240
7253
  mask: makeMask(...numericInputs(6), ...numericInputs(1, true))
7241
7254
  }
7242
- },
7243
- [CountryCodes.UnitedStates]: {
7244
- default: {
7245
- mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
7246
- }
7247
7255
  }
7248
7256
  };
7249
7257
  const emailPattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
@@ -7376,9 +7384,6 @@ const businessRegistrationNumberPatterns = {
7376
7384
  [CountryCodes.Portugal]: {
7377
7385
  default: /^\d{9}$/
7378
7386
  },
7379
- [CountryCodes.PuertoRico]: {
7380
- default: /^\d{9}$/
7381
- },
7382
7387
  [CountryCodes.Romania]: {
7383
7388
  default: /^[A-Z]\d{2}\/\d{1,9}\/\d{4}$/
7384
7389
  },
@@ -7403,9 +7408,6 @@ const businessRegistrationNumberPatterns = {
7403
7408
  [CountryCodes.UnitedKingdom]: {
7404
7409
  default: /^[a-zA-Z0-9]{8}$/,
7405
7410
  nonProfit: /^\d{6,7}$/
7406
- },
7407
- [CountryCodes.UnitedStates]: {
7408
- default: /^\d{9}$/
7409
7411
  }
7410
7412
  };
7411
7413
  const CountryIdNumberPatterns = {
@@ -7423,6 +7425,7 @@ const CountryIdNumberPatterns = {
7423
7425
  },
7424
7426
  [CountryCodes.Sweden]: /^\d{10}$|^\d{12}$/,
7425
7427
  [CountryCodes.UnitedStates]: {
7428
+ // used by CountryCodes.PuertoRico
7426
7429
  ssn: /^\d{9}$/,
7427
7430
  ssnLastFour: /^\d{4}$/
7428
7431
  }
@@ -7990,16 +7993,7 @@ const defaultFieldConfig$8 = {
7990
7993
  }
7991
7994
  },
7992
7995
  [CountryCodes.PuertoRico]: {
7993
- label: "employerIdentificationNumber",
7994
- mask: businessRegistrationNumberMasks[CountryCodes.UnitedStates].default,
7995
- validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedStates].default),
7996
- guidanceText: {
7997
- key: "enterNDigitsForExample",
7998
- values: {
7999
- numDigits: "9",
8000
- example: "12-3456789"
8001
- }
8002
- }
7996
+ // should exactly match CountryCodes.UnitedStates
8003
7997
  },
8004
7998
  [CountryCodes.Romania]: {
8005
7999
  label: "numarOrdineRegistrulComertului",
@@ -8758,6 +8752,20 @@ const defaultFieldConfig$7 = {
8758
8752
  }
8759
8753
  }
8760
8754
  },
8755
+ [CountryCodes.PuertoRico]: {
8756
+ // should exactly match CountryCodes.UnitedStates
8757
+ label: "employerIdentificationNumber",
8758
+ validators: validatePatternOnBlur(/^\d{9}$/),
8759
+ mask: {
8760
+ mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
8761
+ },
8762
+ guidanceText: {
8763
+ key: "validationPleaseEnterAValidEINWithFormat",
8764
+ values: {
8765
+ format: "XX-XXXXXXX"
8766
+ }
8767
+ }
8768
+ },
8761
8769
  /**
8762
8770
  * NOT YET SUPPORTED
8763
8771
  * These are brought over from the old pattern files. We have no idea if they are accurate or not.
@@ -9469,7 +9477,6 @@ function TaxIdNumberTypeSelector({
9469
9477
  name: "taxIdNumberType",
9470
9478
  items: options,
9471
9479
  value: selected,
9472
- i18n,
9473
9480
  onChange: (e) => handleSelect(e.target.value)
9474
9481
  })
9475
9482
  });
@@ -10382,7 +10389,21 @@ const countryConfig$3 = {
10382
10389
  label: "vatAbsenceReason"
10383
10390
  }
10384
10391
  },
10385
- [CountryCodes.PuertoRico]: {},
10392
+ [CountryCodes.PuertoRico]: {
10393
+ // exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
10394
+ country: {
10395
+ label: "companyCountry"
10396
+ },
10397
+ legalCompanyName: {
10398
+ helperText: "legalCompanyName__helperText__US"
10399
+ },
10400
+ tradingName: {
10401
+ label: "doingBusinessAs"
10402
+ },
10403
+ exemptedFromTax: {
10404
+ label: "doNotHaveEIN"
10405
+ }
10406
+ },
10386
10407
  [CountryCodes.Romania]: {},
10387
10408
  [CountryCodes.Slovakia]: {},
10388
10409
  [CountryCodes.Slovenia]: {},
@@ -10638,6 +10659,13 @@ const EntityTypeSelectionRadioCardBody = ({
10638
10659
  })]
10639
10660
  });
10640
10661
  };
10662
+ const CoreContext = createContext(void 0);
10663
+ const useCoreContext = () => {
10664
+ const context = useContext(CoreContext);
10665
+ if (!context)
10666
+ throw Error("You need a <CoreProvider> to use core context");
10667
+ return context;
10668
+ };
10641
10669
  var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
10642
10670
  TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
10643
10671
  TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
@@ -10772,6 +10800,7 @@ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
10772
10800
  TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
10773
10801
  TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
10774
10802
  TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
10803
+ TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
10775
10804
  return TaskTypes2;
10776
10805
  })(TaskTypes || {});
10777
10806
  var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
@@ -10921,8 +10950,8 @@ var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
10921
10950
  })(DecisionMakerType || {});
10922
10951
  const REQUIRED = "REQUIRED";
10923
10952
  const SOLE_PROP_COUNTRIES = [CountryCodes.Austria, CountryCodes.Australia, CountryCodes.Belgium, CountryCodes.Bulgaria, CountryCodes.Canada, CountryCodes.Croatia, CountryCodes.Cyprus, CountryCodes.CzechRepublic, CountryCodes.Denmark, CountryCodes.Estonia, CountryCodes.Finland, CountryCodes.France, CountryCodes.Germany, CountryCodes.Gibraltar, CountryCodes.Greece, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Hungary, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Italy, CountryCodes.Jersey, CountryCodes.Latvia, CountryCodes.Liechtenstein, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Malta, CountryCodes.Monaco, CountryCodes.Netherlands, CountryCodes.NewZealand, CountryCodes.Norway, CountryCodes.Poland, CountryCodes.Portugal, CountryCodes.PuertoRico, CountryCodes.Romania, CountryCodes.Singapore, CountryCodes.Slovakia, CountryCodes.Slovenia, CountryCodes.Spain, CountryCodes.Sweden, CountryCodes.Switzerland, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
10924
- const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.UnitedStates];
10925
- const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.UnitedStates];
10953
+ const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.PuertoRico, CountryCodes.UnitedStates];
10954
+ const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
10926
10955
  const COUNTRIES_WHICH_USE_MULTIPLE_IDENTITY_TYPES = [CountryCodes.HongKong, CountryCodes.Australia, CountryCodes.NewZealand];
10927
10956
  const ID_NUMBER_REQUIRED_FOR_DIRECTOR_COUNTRIES = [CountryCodes.Singapore];
10928
10957
  const NATIONALITY_REQUIRED_FOR_COUNTRIES = [CountryCodes.Singapore];
@@ -11877,12 +11906,20 @@ function ListItem({
11877
11906
  const ADDRESS_SCHEMA = ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
11878
11907
  const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
11879
11908
  const COUNTRIES_WITH_STATES_DATASET = [CountryCodes.Australia, CountryCodes.Brazil, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates];
11880
- const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
11909
+ const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
11881
11910
  const ADDRESS_SCHEMAS = {
11882
11911
  [CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
11883
11912
  [CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
11884
11913
  [CountryCodes.UnitedKingdom]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
11885
11914
  [CountryCodes.UnitedStates]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
11915
+ [CountryCodes.PuertoRico]: [
11916
+ // should exactly match CountryCodes.UnitedStates
11917
+ COUNTRY,
11918
+ ADDRESS,
11919
+ OTHER_ADDRESS_INFORMATION,
11920
+ CITY,
11921
+ POSTAL_CODE
11922
+ ],
11886
11923
  [CountryCodes.HongKong]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE],
11887
11924
  [CountryCodes.NewZealand]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE],
11888
11925
  default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
@@ -11898,10 +11935,14 @@ const LABELS = {
11898
11935
  otherAddressInformation: {
11899
11936
  default: OTHER_ADDRESS_INFORMATION,
11900
11937
  [CountryCodes.Canada]: "apartmentSuiteOptional",
11938
+ [CountryCodes.PuertoRico]: "apartmentSuiteOptional",
11939
+ // should exactly match CountryCodes.UnitedStates
11901
11940
  [CountryCodes.UnitedStates]: "apartmentSuiteOptional"
11902
11941
  },
11903
11942
  postalCode: {
11904
11943
  default: POSTAL_CODE,
11944
+ [CountryCodes.PuertoRico]: "zipCode",
11945
+ // should exactly match CountryCodes.UnitedStates
11905
11946
  [CountryCodes.UnitedStates]: "zipCode"
11906
11947
  },
11907
11948
  stateOrProvince: {
@@ -12327,7 +12368,8 @@ const postalCodePatterns = {
12327
12368
  [CountryCodes.Norway]: createRegExpByDigits(4),
12328
12369
  [CountryCodes.Poland]: /^\d{2}-\d{3}$/,
12329
12370
  [CountryCodes.Portugal]: /^[1-9]\d{3}([- ]?\d{3})?$/,
12330
- [CountryCodes.PuertoRico]: createRegExpByDigits(5),
12371
+ [CountryCodes.PuertoRico]: /^\d{5}(?:[ -]?\d{4})?$/,
12372
+ // should exactly match CountryCodes.UnitedStates
12331
12373
  [CountryCodes.Romania]: createRegExpByDigits(6),
12332
12374
  [CountryCodes.Slovakia]: /^(SK-)?\d{5}$/,
12333
12375
  [CountryCodes.Slovenia]: /^(SI-)?\d{4}$/,
@@ -12971,7 +13013,6 @@ function RegistrationAddressComponent(props) {
12971
13013
  name: "operationalAddressIsSame",
12972
13014
  items: operationalAddressIsSameItems,
12973
13015
  value: formData.operationalAddressIsSame,
12974
- i18n,
12975
13016
  disabled: formUtils.isReadOnly("operationalAddressIsSame"),
12976
13017
  onChange: handleChangeFor("operationalAddressIsSame"),
12977
13018
  "aria-required": true,
@@ -12994,6 +13035,33 @@ function RegistrationAddressComponent(props) {
12994
13035
  });
12995
13036
  }
12996
13037
  const ACCEPTED_DOCUMENTS_MAP$1 = {
13038
+ [CountryCodes.PuertoRico]: {
13039
+ // should exactly match CountryCodes.UnitedStates
13040
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
13041
+ header: "acceptedDocumentsForPrivateCompanies",
13042
+ documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling__PR"]
13043
+ },
13044
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
13045
+ header: "acceptedDocumentsForPublicCompanies",
13046
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
13047
+ },
13048
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
13049
+ header: "acceptedDocumentsForPublicCompanies",
13050
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
13051
+ },
13052
+ [CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
13053
+ header: "acceptedDocumentsForGovernment",
13054
+ documents: ["charter"]
13055
+ },
13056
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13057
+ header: "acceptedDocumentsForNonProfit",
13058
+ documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc__PR", "certificateOfIncumbency"]
13059
+ },
13060
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13061
+ header: "acceptedDocumentsForPartnerships",
13062
+ documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
13063
+ }
13064
+ },
12997
13065
  [CountryCodes.UnitedStates]: {
12998
13066
  [CompanyTypesValue.PRIVATE_COMPANY]: {
12999
13067
  header: "acceptedDocumentsForPrivateCompanies",
@@ -13022,11 +13090,13 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
13022
13090
  }
13023
13091
  };
13024
13092
  const GuidanceContent$1 = ({
13025
- i18n,
13026
13093
  country: country2,
13027
13094
  companyType: companyType2
13028
13095
  }) => {
13029
13096
  var _a;
13097
+ const {
13098
+ i18n
13099
+ } = useI18nContext();
13030
13100
  const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
13031
13101
  return jsx("div", {
13032
13102
  className: "adyen-kyc-upload-field__guidance",
@@ -13097,8 +13167,7 @@ function RegistrationDocumentComponent({
13097
13167
  description: i18n.get(description2),
13098
13168
  documentField: "registrationDocument",
13099
13169
  documentType: DocumentType.REGISTRATION_DOCUMENT,
13100
- guidanceContent: GuidanceContent$1({
13101
- i18n,
13170
+ guidanceContent: jsx(GuidanceContent$1, {
13102
13171
  country: country2,
13103
13172
  companyType: companyType2
13104
13173
  }),
@@ -13107,6 +13176,29 @@ function RegistrationDocumentComponent({
13107
13176
  });
13108
13177
  }
13109
13178
  const ACCEPTED_DOCUMENTS_MAP = {
13179
+ [CountryCodes.PuertoRico]: {
13180
+ // should exactly match CountryCodes.UnitedStates
13181
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
13182
+ header: "acceptedDocumentsForPrivateCompanies",
13183
+ documents: ["irsCP575"]
13184
+ },
13185
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
13186
+ header: "acceptedDocumentsForPublicCompanies",
13187
+ documents: ["annualReport", "secForm10k"]
13188
+ },
13189
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
13190
+ header: "acceptedDocumentsForPublicCompanies",
13191
+ documents: ["annualReport", "secForm10k"]
13192
+ },
13193
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13194
+ header: "acceptedDocumentsForNonProfit",
13195
+ documents: ["annualReport"]
13196
+ },
13197
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13198
+ header: "acceptedDocumentsForPartnerships",
13199
+ documents: ["irsScheduleK1"]
13200
+ }
13201
+ },
13110
13202
  [CountryCodes.UnitedStates]: {
13111
13203
  [CompanyTypesValue.PRIVATE_COMPANY]: {
13112
13204
  header: "acceptedDocumentsForPrivateCompanies",
@@ -13131,11 +13223,13 @@ const ACCEPTED_DOCUMENTS_MAP = {
13131
13223
  }
13132
13224
  };
13133
13225
  const GuidanceContent = ({
13134
- i18n,
13135
13226
  country: country2,
13136
13227
  companyType: companyType2
13137
13228
  }) => {
13138
13229
  var _a;
13230
+ const {
13231
+ i18n
13232
+ } = useI18nContext();
13139
13233
  const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
13140
13234
  return jsx("div", {
13141
13235
  className: "adyen-kyc-upload-field__guidance",
@@ -13199,8 +13293,7 @@ function TaxDocumentComponent({
13199
13293
  description: i18n.get(description2),
13200
13294
  documentField: "taxDocument",
13201
13295
  documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
13202
- guidanceContent: GuidanceContent({
13203
- i18n,
13296
+ guidanceContent: jsx(GuidanceContent, {
13204
13297
  country: country2,
13205
13298
  companyType: companyType2
13206
13299
  }),
@@ -13536,7 +13629,7 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
13536
13629
  });
13537
13630
  const getFileExtention = (fileName2) => fileName2.split(".").pop();
13538
13631
  const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
13539
- const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.UnitedStates];
13632
+ const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
13540
13633
  const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [CountryCodes.Austria, CountryCodes.Canada, CountryCodes.Finland, CountryCodes.Germany, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.Switzerland];
13541
13634
  const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.Gibraltar, CountryCodes.HongKong, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.Singapore, CountryCodes.UnitedStates];
13542
13635
  const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.NewZealand, CountryCodes.Singapore];
@@ -13547,6 +13640,7 @@ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
13547
13640
  const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
13548
13641
  // strictly a subset of countries which use tax ID
13549
13642
  CountryCodes.Canada,
13643
+ CountryCodes.PuertoRico,
13550
13644
  CountryCodes.UnitedStates
13551
13645
  ];
13552
13646
  const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
@@ -13595,10 +13689,10 @@ const rules$2 = ({
13595
13689
  companyRegistrationNumberExemptionAllowed: () => {
13596
13690
  var _a, _b;
13597
13691
  const companyType2 = ("companyType" in data || "companyStructure" in data) && (((_a = data.companyType) == null ? void 0 : _a.entityType) || ((_b = data.companyStructure) == null ? void 0 : _b.entityType));
13598
- if (country2 === "DE" && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
13692
+ if (country2 === CountryCodes.Germany && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
13599
13693
  return "REQUIRED";
13600
13694
  }
13601
- if (country2 === "DK" && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
13695
+ if (country2 === CountryCodes.Denmark && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
13602
13696
  return "REQUIRED";
13603
13697
  }
13604
13698
  },
@@ -15617,13 +15711,22 @@ const IdVerificationMethodOptionFooter = ({
15617
15711
  };
15618
15712
  const idVerificationMethodFields = ["idVerificationMethod"];
15619
15713
  function IdVerificationMethodComponent(props) {
15714
+ const {
15715
+ id: id2,
15716
+ data: propsData,
15717
+ fieldValidationErrors,
15718
+ validators,
15719
+ formVerificationErrors,
15720
+ name,
15721
+ countryOfResidence
15722
+ } = props;
15620
15723
  const {
15621
15724
  i18n
15622
15725
  } = useI18nContext();
15623
15726
  const {
15624
15727
  getImageUrl
15625
15728
  } = useConfigurationApi();
15626
- const verificationMethodFormId = props.id;
15729
+ const verificationMethodFormId = id2;
15627
15730
  const schema = idVerificationMethodFields;
15628
15731
  const stateRef = useRef({
15629
15732
  setState: null
@@ -15641,11 +15744,11 @@ function IdVerificationMethodComponent(props) {
15641
15744
  ...props,
15642
15745
  schema,
15643
15746
  defaultData: {
15644
- ...props.data,
15747
+ ...propsData,
15645
15748
  idVerificationMethod: "instantVerification"
15646
15749
  },
15647
- rules: props.validators,
15648
- fieldProblems: props == null ? void 0 : props.fieldValidationErrors
15750
+ rules: validators,
15751
+ fieldProblems: fieldValidationErrors
15649
15752
  });
15650
15753
  const formUtils = formUtilities(props, i18n);
15651
15754
  useEffect(() => {
@@ -15672,15 +15775,15 @@ function IdVerificationMethodComponent(props) {
15672
15775
  children: [jsx(FormHeader, {
15673
15776
  heading: i18n.get("verificationMethod")
15674
15777
  }), jsx(ErrorPanel, {
15675
- verificationErrors: props == null ? void 0 : props.formVerificationErrors,
15676
- validationErrors: props == null ? void 0 : props.fieldValidationErrors,
15778
+ verificationErrors: formVerificationErrors,
15779
+ validationErrors: fieldValidationErrors,
15677
15780
  formUtils,
15678
15781
  id: "ariaErrorField"
15679
15782
  }), jsx("div", {
15680
15783
  dangerouslySetInnerHTML: {
15681
15784
  __html: i18n.get("idUploadDocumentSubtitle", {
15682
15785
  values: {
15683
- name: props.name
15786
+ name
15684
15787
  }
15685
15788
  })
15686
15789
  }
@@ -15747,7 +15850,7 @@ function IdVerificationMethodComponent(props) {
15747
15850
  }),
15748
15851
  titleId: "howVerificationWithOnfidoWork",
15749
15852
  contentId: "howVerificationWithOnfidoWorkContent"
15750
- }), props.countryOfResidence === CountryCodes.UnitedStates && data.idVerificationMethod === "instantVerification" && jsx("div", {
15853
+ }), (countryOfResidence === CountryCodes.PuertoRico || countryOfResidence === CountryCodes.UnitedStates) && data.idVerificationMethod === "instantVerification" && jsx("div", {
15751
15854
  dangerouslySetInnerHTML: {
15752
15855
  __html: i18n.get("byProceedingToTheNextStepYouConfirmThatYouHaveReadUnderstandAndAcceptTheTerms")
15753
15856
  }
@@ -16858,7 +16961,6 @@ function IndividualIdNumberTypeSelector({
16858
16961
  name: "individualIdNumberType",
16859
16962
  items: options,
16860
16963
  value: selected,
16861
- i18n,
16862
16964
  onChange: (e) => {
16863
16965
  var _a;
16864
16966
  return setSelected == null ? void 0 : setSelected((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
@@ -18883,6 +18985,7 @@ const currencyByCountry = {
18883
18985
  [CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
18884
18986
  [CountryCodes.Portugal]: [Currencies.EUR],
18885
18987
  [CountryCodes.PuertoRico]: [Currencies.USD],
18988
+ // should exactly match CountryCodes.UnitedStates
18886
18989
  [CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
18887
18990
  [CountryCodes.Singapore]: [Currencies.SGD],
18888
18991
  [CountryCodes.Slovakia]: [Currencies.EUR],
@@ -24295,7 +24398,6 @@ function CompanyDropinComponent({
24295
24398
  const {
24296
24399
  isExperimentEnabled
24297
24400
  } = useExperimentsContext();
24298
- useCoreContext();
24299
24401
  const {
24300
24402
  i18n,
24301
24403
  setLocale
@@ -24846,13 +24948,15 @@ const mapCompanyDataResponseToFormSchema = (company2) => ({
24846
24948
  const CompanyLookupResultsHeader = ({
24847
24949
  results,
24848
24950
  status,
24849
- i18n,
24850
24951
  hasInternalError,
24851
24952
  selectedCompanyId,
24852
24953
  verifiedCompany,
24853
24954
  retrySearch,
24854
24955
  reset
24855
24956
  }) => {
24957
+ const {
24958
+ i18n
24959
+ } = useI18nContext();
24856
24960
  const numberOfResults = results == null ? void 0 : results.length;
24857
24961
  const headerText = useMemo(() => {
24858
24962
  if (hasInternalError && !selectedCompanyId) {
@@ -24887,7 +24991,7 @@ const CompanyLookupResultsHeader = ({
24887
24991
  onClick: reset,
24888
24992
  children: "Reset selection"
24889
24993
  })]
24890
- }), descriptionText && jsxs("div", {
24994
+ }), descriptionText && status !== "loading" && jsxs("div", {
24891
24995
  className: "adyen-company-lookup-results-header__description",
24892
24996
  children: [hasInternalError && !selectedCompanyId && jsx("button", {
24893
24997
  type: "button",
@@ -24911,9 +25015,11 @@ const LookupResultBody = ({
24911
25015
  })]
24912
25016
  });
24913
25017
  const LookupResultAlert = ({
24914
- i18n,
24915
25018
  type
24916
25019
  }) => {
25020
+ const {
25021
+ i18n
25022
+ } = useI18nContext();
24917
25023
  const iconType = {
24918
25024
  verified: AlertTypes.SUCCESS,
24919
25025
  warning: AlertTypes.WARNING,
@@ -24939,7 +25045,6 @@ const LookupResultAlert = ({
24939
25045
  };
24940
25046
  const LookupResult = ({
24941
25047
  classes,
24942
- i18n,
24943
25048
  option,
24944
25049
  status,
24945
25050
  isSelected,
@@ -24993,7 +25098,6 @@ const LookupResult = ({
24993
25098
  label: classes
24994
25099
  }
24995
25100
  }), showAlert && jsx(LookupResultAlert, {
24996
- i18n,
24997
25101
  type: alertType
24998
25102
  })]
24999
25103
  });
@@ -25019,7 +25123,6 @@ const LookupResult = ({
25019
25123
  label: classes
25020
25124
  }
25021
25125
  }), showAlert && jsx(LookupResultAlert, {
25022
- i18n,
25023
25126
  type: alertType
25024
25127
  })]
25025
25128
  })
@@ -25029,7 +25132,6 @@ const CompanyLookupResultsList = ({
25029
25132
  results,
25030
25133
  selectedCompanyId,
25031
25134
  status,
25032
- i18n,
25033
25135
  hasInternalError,
25034
25136
  tin = "",
25035
25137
  verifiedCompany,
@@ -25060,7 +25162,6 @@ const CompanyLookupResultsList = ({
25060
25162
  classes: optionClasses(option),
25061
25163
  option,
25062
25164
  status,
25063
- i18n,
25064
25165
  tin,
25065
25166
  isSelected: isOptionSelected(option),
25066
25167
  isInvalid: isOptionInvalid(option),
@@ -25107,9 +25208,7 @@ function CompanyLookup({
25107
25208
  handleVerifyTin
25108
25209
  }) {
25109
25210
  var _a;
25110
- const {
25111
- i18n
25112
- } = useI18nContext();
25211
+ useI18nContext();
25113
25212
  const {
25114
25213
  status,
25115
25214
  results,
@@ -25194,7 +25293,6 @@ function CompanyLookup({
25194
25293
  children: [jsx(CompanyLookupResultsHeader, {
25195
25294
  results,
25196
25295
  status,
25197
- i18n,
25198
25296
  hasInternalError,
25199
25297
  selectedCompanyId,
25200
25298
  verifiedCompany,
@@ -25206,7 +25304,6 @@ function CompanyLookup({
25206
25304
  results,
25207
25305
  selectedCompanyId,
25208
25306
  status,
25209
- i18n,
25210
25307
  hasInternalError,
25211
25308
  tin: taxInformationNumber2,
25212
25309
  verifiedCompany,
@@ -26596,9 +26693,6 @@ function useCompanySearchTaskSubmit({
26596
26693
  onExternalSubmit,
26597
26694
  handleUpdateLegalEntity
26598
26695
  }) {
26599
- const {
26600
- setAccountHolder
26601
- } = useCoreContext();
26602
26696
  const {
26603
26697
  showToast,
26604
26698
  clearToasts
@@ -26682,7 +26776,6 @@ function useCompanySearchTaskSubmit({
26682
26776
  }
26683
26777
  });
26684
26778
  logger$f.log(submittedLegalEntity);
26685
- setAccountHolder(entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type]);
26686
26779
  clearToasts();
26687
26780
  onExternalSubmit == null ? void 0 : onExternalSubmit(data);
26688
26781
  } catch (e) {
@@ -26718,7 +26811,7 @@ function useCompanySearchTaskSubmit({
26718
26811
  } finally {
26719
26812
  setLoadingStatus("success");
26720
26813
  }
26721
- }, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setAccountHolder, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
26814
+ }, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
26722
26815
  return {
26723
26816
  submit: submit2
26724
26817
  };
@@ -27126,6 +27219,16 @@ const useShouldShowIntroduction = ({
27126
27219
  });
27127
27220
  return canSeeIntroduction && !hasSeenIntroduction;
27128
27221
  };
27222
+ const getHasSeenSingpassSelectionStorageKey = (legalEntityId) => `COMPLETED_SINGPASS_SELECTION-${legalEntityId}`;
27223
+ const useHasSeenSingpassSelection = ({
27224
+ legalEntityId
27225
+ }) => {
27226
+ const [hasSeenSingpassSelection, setHasSeenSingpassSelection] = useLocalStorage(getHasSeenSingpassSelectionStorageKey(legalEntityId), false);
27227
+ return {
27228
+ hasSeenSingpassSelection,
27229
+ setHasSeenSingpassSelection
27230
+ };
27231
+ };
27129
27232
  const logger$e = createLogger("useAssociatedLegalArrangement");
27130
27233
  function useAssociatedLegalArrangement({
27131
27234
  rootLegalEntity,
@@ -29082,6 +29185,152 @@ function ReviewComponent({
29082
29185
  footer
29083
29186
  });
29084
29187
  }
29188
+ const SvgSetupManual = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 102 100", ...props, children: [
29189
+ /* @__PURE__ */ jsx$1("path", { fill: "#EEF0F3", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M66.82 10.09H2.9c-1.19 0-2.15.96-2.15 2.15v84.05c0 1.19.96 2.15 2.15 2.15h63.9c1.2 0 2.15-.96 2.15-2.15V12.24c0-1.19-.96-2.15-2.14-2.15" }),
29190
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 35.7H9.02v3.94h16.42z" }),
29191
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 55.91H9.02v1.97h15.42z" }),
29192
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.77 35.7H29.16v3.94h26.61z" }),
29193
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 29.58H20.4m-11.38-3.4h20.14" }),
29194
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 51.75h18.9" }),
29195
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 69.35H9.02v1.97h15.42z" }),
29196
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 65.19h18.9" }),
29197
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 55.91H32.57v1.97h15.41z" }),
29198
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 51.75h18.9" }),
29199
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 69.35H32.57v1.97h15.41z" }),
29200
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 65.19h18.9" }),
29201
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 82.5h9.46M9.02 86h25.8" }),
29202
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M83.1.79H19.17c-1.18 0-2.14.96-2.14 2.15v84.05c0 1.19.96 2.15 2.14 2.15H83.1c1.19 0 2.15-.96 2.15-2.15V2.94c0-1.19-.96-2.15-2.15-2.15" }),
29203
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M64.64 16.78h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1z" }),
29204
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 10.14h22.54" }),
29205
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 51.9h22.54m-22.54 5.7h32.82M25.44 68.99h26.54m-26.54 5.69H37.4" }),
29206
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M54.4 10.14h17.28M27.93 41.7v2.84m-.4-2.94h.8m-.8 3.2h.8m-.8-25.02h7.83m3.49 0h9.75M27.7 31.5h14.32m9.96-11.72h2.85" }),
29207
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m79.81 76.03 1.96 21.5a1.12 1.12 0 0 0 1.93.68l6.59-6.82q.2-.2.46-.28l9.01-2.96c.9-.3 1.05-1.52.23-2.02L81.51 74.96a1.12 1.12 0 0 0-1.69 1.06z" })
29208
+ ] });
29209
+ const SvgSetupSingpass = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 146 95", ...props, children: [
29210
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.82 76.52a6.1 6.1 0 0 0 6.11 6.11h76.67a6.1 6.1 0 0 0 6.11-6.11V21.46H55.83z" }),
29211
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M138.6 13.88H61.93a6.1 6.1 0 0 0-6.11 6.11v1.47h88.88V20a6.1 6.1 0 0 0-6.11-6.11z" }),
29212
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
29213
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
29214
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.15 44.19h-6.07V62.4h6.07z" }),
29215
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M42.8 76.1a11 11 0 0 0 1.4 3.63l.14.24" }),
29216
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.16 1.11H33.74a6.1 6.1 0 0 0-6.1 6.11v61.05a6.1 6.1 0 0 0 6.1 6.1h24.42a6.1 6.1 0 0 0 6.1-6.1V7.22a6.1 6.1 0 0 0-6.1-6.1" }),
29217
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M62.74 7.22a4.6 4.6 0 0 0-4.58-4.58H33.74a4.6 4.6 0 0 0-4.58 4.58v53.42h33.58z" }),
29218
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M45.94 69.8a3.05 3.05 0 1 0 0-6.1 3.05 3.05 0 0 0 0 6.1" }),
29219
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M29.16 60.64v7.63a4.6 4.6 0 0 0 4.58 4.58h24.42a4.6 4.6 0 0 0 4.58-4.58v-7.63" }),
29220
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "M30.16 76.63v-7.24c0-3.2-.95-6.32-2.72-8.98a5 5 0 0 1-.58-4.26l2.67-8q.62-1.87.62-3.84v-3.3a4.86 4.86 0 0 0-4.86-4.85c-.67 0-1.22.54-1.22 1.21v2.71c0 1.41-.36 2.79-1.07 4.01l-5.8 10.18q-1.22 2.13-1.76 4.52L11.92 74.6 1.32 85.33" }),
29221
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.16 76.63v-7.24c0-3.2-.95-6.32-2.72-8.98a5 5 0 0 1-.58-4.26l2.67-8q.62-1.87.62-3.84v-3.3a4.86 4.86 0 0 0-4.86-4.85c-.67 0-1.22.54-1.22 1.21v2.71c0 1.41-.36 2.79-1.07 4.01l-5.8 10.18q-1.22 2.13-1.76 4.52L11.92 74.6 1.32 85.33" }),
29222
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.16 2.64H33.74a4.6 4.6 0 0 0-4.56 4.16h33.54a4.6 4.6 0 0 0-4.56-4.16" }),
29223
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 28.37H33.95v3.74H58.3z" }),
29224
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M46.12 42.77H33.95v3.74h12.17z" }),
29225
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M36.72 30.24h18.8" }),
29226
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 35.46H33.95v3.74H58.3z" }),
29227
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M37.86 36.19v2.3m.82-1.96-1.62 1.61m1.62 0-1.62-1.61m1.94.81h-2.28m12.15-1.15v2.3m.82-1.96-1.62 1.61m1.62 0-1.62-1.61m1.95.81h-2.29m6.65-1.15v2.3m.82-1.96-1.63 1.61m1.63 0-1.63-1.61m1.95.81h-2.28m-9.87-1.15v2.3m.81-1.96-1.62 1.61m1.62 0-1.62-1.61m1.96.81h-2.3" }),
29228
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M33.9 21.3h18.82M33.9 24.97h8.4" }),
29229
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 43.55h-39.1v6.02h39.1z" }),
29230
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M100.27 61.31H80.7v6.02h19.56z" }),
29231
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M85.17 46.56h30.2" }),
29232
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 52.25h-39.1v6.02h39.1z" }),
29233
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M86.73 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.67 1.1h-3.13m19.61-1.56v3.13m1.1-2.68-2.21 2.21m2.21 0-2.21-2.2m2.67 1.1h-3.13m10.59-1.56v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1h-3.12M95.75 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1H94.2" }),
29234
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M80.65 34.88h30.2m-30.2 3.21h13.47" })
29235
+ ] });
29236
+ const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 93 16", ...props, children: [
29237
+ /* @__PURE__ */ jsx$1("path", { fill: "#F4333D", d: "M5.88 11.8c-2.54 0-4.34-.85-5.13-1.57l1.69-2.48a5.5 5.5 0 0 0 3.44 1.36c.92 0 1.33-.27 1.33-.77 0-.38-.32-.68-1.3-.9l-2-.47c-1.96-.46-2.89-1.65-2.89-3.3C1.02 1.42 2.82.1 5.5.1c2.07 0 3.73.63 4.54 1.35L8.35 3.92A4.5 4.5 0 0 0 5.5 2.75c-.86 0-1.24.3-1.24.74 0 .45.4.7 1.17.88l2 .45c2.05.45 3.04 1.56 3.04 3.18 0 2.32-1.73 3.81-4.59 3.81m12-.22h3.38V5.52c0-1.48.72-2.4 2.12-2.4 1.32 0 2.02.76 2.02 2.4v6.06h3.37V4.67c0-3.02-1.5-4.58-4.09-4.58q-2.2 0-3.42 1.74V1.1c0-.5-.29-.8-.78-.8h-2.59v11.27M42.46.32v9.75c0 4.24-2.75 5.93-6.12 5.93-2.25 0-4.12-.59-5.24-1.6l1.75-2.61a5 5 0 0 0 3.49 1.37c1.73 0 2.74-1.1 2.74-2.64V9.8c-.8 1.02-1.98 1.47-3.41 1.47-2.73 0-5.09-2.39-5.09-5.59S32.93.09 35.66.09a3.9 3.9 0 0 1 3.41 1.7V1.1c0-.5.3-.8.8-.8zM39.2 5.68c0-1.46-1.1-2.61-2.63-2.61A2.57 2.57 0 0 0 34 5.68a2.6 2.6 0 0 0 2.57 2.61 2.56 2.56 0 0 0 2.63-2.61m18 .27c0 3.47-2.35 5.86-5.28 5.86-1.53 0-2.74-.45-3.62-1.46v5.38h-3.37V.32h2.59c.5 0 .78.29.78.79v.67A4.2 4.2 0 0 1 51.91.1c2.93 0 5.29 2.39 5.29 5.86m-3.4 0c0-1.69-1.2-2.88-2.78-2.88a2.77 2.77 0 0 0-2.83 2.88 2.8 2.8 0 0 0 2.83 2.89c1.58 0 2.77-1.2 2.77-2.89M70.91.32v11.26h-3.38v-1.46a4.2 4.2 0 0 1-3.62 1.69c-2.92 0-5.28-2.39-5.28-5.86S61 .09 63.92.09c1.53 0 2.8.54 3.62 1.7V1.1c0-.5.3-.8.79-.8zm-3.26 5.63a2.8 2.8 0 0 0-2.84-2.88c-1.57 0-2.76 1.19-2.76 2.88 0 1.7 1.19 2.89 2.76 2.89 1.6 0 2.84-1.2 2.84-2.89m10.1 5.86c2.85 0 4.58-1.49 4.58-3.8 0-1.63-.99-2.73-3.03-3.19l-2-.45c-.77-.18-1.18-.43-1.18-.88s.39-.74 1.24-.74c1.04 0 2.11.5 2.86 1.17l1.68-2.48C81.11.72 79.44.1 77.37.1 74.7.1 72.9 1.42 72.9 3.68c0 1.64.92 2.83 2.88 3.29l2 .47c.99.22 1.3.52 1.3.9 0 .5-.4.77-1.33.77a5.5 5.5 0 0 1-3.44-1.36l-1.68 2.48c.78.72 2.58 1.58 5.12 1.58m10.65 0C91.27 11.8 93 10.32 93 8c0-1.63-.99-2.73-3.04-3.19l-2-.45c-.76-.18-1.17-.43-1.17-.88s.38-.74 1.24-.74c1.03 0 2.11.5 2.86 1.17l1.68-2.48C91.77.72 90.1.1 88.03.1c-2.68 0-4.47 1.33-4.47 3.59 0 1.64.92 2.83 2.87 3.29l2 .47c1 .22 1.3.52 1.3.9 0 .5-.4.77-1.32.77a5.5 5.5 0 0 1-3.44-1.36l-1.69 2.48c.8.72 2.6 1.58 5.13 1.58" }),
29238
+ /* @__PURE__ */ jsx$1("path", { fill: "#000", d: "M13.8 3.92c1.1 0 1.95-.86 1.95-1.96S14.9 0 13.8 0s-1.96.86-1.96 1.96.85 1.96 1.96 1.96m-2.12 7.66h4.23l-.9-7a5 5 0 0 1-2.43 0z" })
29239
+ ] });
29240
+ const setupAccountMethods = ["singpass", "manual"];
29241
+ const setupAccountMethodFields = ["setupAccountMethod"];
29242
+ const getSetupAccountMethodMetadata = () => ({
29243
+ singpass: {
29244
+ name: "retrieveMyInfoBusiness",
29245
+ description: "getYourBusinessVerifiedDetails",
29246
+ icon: jsx("span", {
29247
+ className: "adyen-kyc-setup-singpass-container",
29248
+ children: jsx(SvgSetupSingpass, {})
29249
+ }),
29250
+ provider: {
29251
+ name: "singpass",
29252
+ icon: jsx("span", {
29253
+ className: "adyen-kyc-singpass-logo-container",
29254
+ children: jsx(SvgSingpassLogo, {})
29255
+ })
29256
+ }
29257
+ },
29258
+ manual: {
29259
+ name: "enterTheDetailsYourself",
29260
+ description: "youAlsoHaveToUploadSomeSupportingDocuments",
29261
+ icon: jsx("span", {
29262
+ className: "adyen-kyc-setup-manual-container",
29263
+ children: jsx(SvgSetupManual, {})
29264
+ })
29265
+ }
29266
+ });
29267
+ const SingpassSelection = (props) => {
29268
+ const {
29269
+ handleNextClick
29270
+ } = props;
29271
+ const {
29272
+ i18n
29273
+ } = useI18nContext();
29274
+ const [selectedMethod, setSelectedMethod] = useState();
29275
+ const selectSetupAccountMethod = (method) => {
29276
+ setSelectedMethod(method);
29277
+ handleChangeFor("setupAccountMethod")(method);
29278
+ };
29279
+ const {
29280
+ handleChangeFor,
29281
+ data
29282
+ } = useForm({
29283
+ ...props,
29284
+ schema: setupAccountMethodFields,
29285
+ defaultData: {}
29286
+ });
29287
+ const methodsMetadata = getSetupAccountMethodMetadata();
29288
+ return jsx("div", {
29289
+ className: "adl-u-display-flex adl-u-justify-content-center",
29290
+ children: jsxs("div", {
29291
+ className: "adyen-kyc-singpass-selection",
29292
+ children: [jsx("header", {
29293
+ className: "adl-u-margin-bottom-32",
29294
+ children: jsx(Heading, {
29295
+ level: 2,
29296
+ children: i18n.get("howWouldYouLikeToSetUpYourAccount")
29297
+ })
29298
+ }), jsx("form", {
29299
+ children: jsx(Field, {
29300
+ name: "setupAccountMethod",
29301
+ children: (childProps) => jsx(RadioCardSelect, {
29302
+ ...childProps,
29303
+ name: "setupAccountMethod",
29304
+ options: setupAccountMethods,
29305
+ onSelect: selectSetupAccountMethod,
29306
+ selected: data.setupAccountMethod,
29307
+ optionId: (method) => method,
29308
+ optionName: (method) => methodsMetadata[method].name,
29309
+ optionDescription: (method) => methodsMetadata[method].description,
29310
+ className: "adyen-kyc-field-verification-methods",
29311
+ optionClassNames: () => ({
29312
+ icon: "adyen-kyc-radio-group-card__illustration",
29313
+ label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
29314
+ footer: "adyen-kyc-field-verification-methods__footer"
29315
+ }),
29316
+ renderOptionIcon: (method) => methodsMetadata[method].icon,
29317
+ renderOptionFooter: (method) => {
29318
+ var _a;
29319
+ return (_a = methodsMetadata[method].provider) == null ? void 0 : _a.icon;
29320
+ }
29321
+ })
29322
+ })
29323
+ }), jsx(Button, {
29324
+ label: i18n.get("next"),
29325
+ block: true,
29326
+ disabled: !selectedMethod,
29327
+ onClick: () => handleNextClick(selectedMethod),
29328
+ type: "button",
29329
+ role: "button"
29330
+ })]
29331
+ })
29332
+ });
29333
+ };
29085
29334
  const businessTypeMapping = {
29086
29335
  myName: {
29087
29336
  [LegalEntityType.INDIVIDUAL]: "individual"
@@ -32708,6 +32957,13 @@ function DropinComposerComponent({
32708
32957
  } = useToastContext();
32709
32958
  const [isLoadingConfiguration, setIsLoadingConfiguration] = useState(false);
32710
32959
  const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
32960
+ const isSingpassExperimentEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
32961
+ const {
32962
+ hasSeenSingpassSelection,
32963
+ setHasSeenSingpassSelection
32964
+ } = useHasSeenSingpassSelection({
32965
+ legalEntityId: legalEntityResponse.id
32966
+ });
32711
32967
  const [leId, setLeId] = useLeId();
32712
32968
  const showIntroduction = useShouldShowIntroduction({
32713
32969
  legalEntity: legalEntityResponse
@@ -32718,16 +32974,22 @@ function DropinComposerComponent({
32718
32974
  legalEntityId: legalEntityResponse.id
32719
32975
  });
32720
32976
  const [tasks, setTasks] = useState([]);
32977
+ const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
32978
+ const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
32979
+ const isSoleProp = accountHolder2 === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
32980
+ const isSingpassEnabled = rootLegalEntityCountry === CountryCodes.Singapore && isSingpassExperimentEnabled && !hasSeenSingpassSelection;
32981
+ const shouldShowSingpass = isSingpassEnabled && (isSoleProp || legalEntityResponse.type === LegalEntityType.ORGANIZATION);
32721
32982
  const initialTask = useMemo(() => {
32722
32983
  if (isNewEntryFlowEnabled && (!accountHolder2 || legalEntityResponse.id !== leId)) {
32723
32984
  return TaskTypes.BUSINESS_TYPE_SELECTION;
32724
32985
  }
32725
32986
  if (showIntroduction)
32726
32987
  return TaskTypes.INTRODUCTION;
32988
+ if (isSingpassEnabled)
32989
+ return TaskTypes.SINGPASS_SELECTION;
32727
32990
  return TaskTypes.TASKS_OVERVIEW;
32728
32991
  }, [showIntroduction, isNewEntryFlowEnabled, accountHolder2, legalEntityResponse, leId]);
32729
32992
  const [taskHistory, setTaskHistory] = useState([initialTask]);
32730
- const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
32731
32993
  const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
32732
32994
  const {
32733
32995
  associatedLegalArrangement,
@@ -32749,7 +33011,6 @@ function DropinComposerComponent({
32749
33011
  const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
32750
33012
  const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
32751
33013
  const [transferInstrument, setTransferInstrument] = useState(null);
32752
- const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
32753
33014
  const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
32754
33015
  const [bankVerificationVendors, setBankVerificationVendors] = useState();
32755
33016
  const hasTrust = accountHolder2 === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
@@ -32808,19 +33069,11 @@ function DropinComposerComponent({
32808
33069
  getPciTemplate2().catch(logger$b.error);
32809
33070
  }, [getPciTemplate2, tasks]);
32810
33071
  const addFetchedAcceptedByName = async (acceptanceInfo) => {
32811
- try {
32812
- const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32813
- return {
32814
- ...acceptanceInfo,
32815
- acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32816
- };
32817
- } catch (e) {
32818
- logger$b.warn(i18n.get("failedToFetchAcceptedByName"));
32819
- return {
32820
- ...acceptanceInfo,
32821
- acceptedByName: null
32822
- };
32823
- }
33072
+ const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
33073
+ return {
33074
+ ...acceptanceInfo,
33075
+ acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
33076
+ };
32824
33077
  };
32825
33078
  const getServiceAgreementAcceptanceInfos = async () => {
32826
33079
  if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
@@ -33013,6 +33266,33 @@ function DropinComposerComponent({
33013
33266
  });
33014
33267
  }
33015
33268
  };
33269
+ const handleSingpassSelectionNextClick = async (method) => {
33270
+ const {
33271
+ handleOpenSingpassAuthorizationLink
33272
+ } = args;
33273
+ if (method === "singpass" && handleOpenSingpassAuthorizationLink) {
33274
+ try {
33275
+ const {
33276
+ item: {
33277
+ authUrl
33278
+ }
33279
+ } = await handleOpenSingpassAuthorizationLink();
33280
+ setHasSeenSingpassSelection(true);
33281
+ window.open(authUrl, "_blank").focus();
33282
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33283
+ } catch (e) {
33284
+ logger$b.error(e);
33285
+ showToast({
33286
+ label: i18n.get("failToLaunchSingpass"),
33287
+ type: ToastType.ERROR
33288
+ });
33289
+ }
33290
+ }
33291
+ if (method === "manual") {
33292
+ setHasSeenSingpassSelection(true);
33293
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33294
+ }
33295
+ };
33016
33296
  const onNavigateTo = (task) => {
33017
33297
  setTaskHistory([...taskHistory, task]);
33018
33298
  onNavigate(task);
@@ -33272,7 +33552,15 @@ function DropinComposerComponent({
33272
33552
  setLeId(legalEntityResponse.id);
33273
33553
  setAccountHolder(newAccountHolder);
33274
33554
  await refreshLegalEntity();
33275
- onNavigateTo(showIntroduction ? TaskTypes.INTRODUCTION : TaskTypes.TASKS_OVERVIEW);
33555
+ if (showIntroduction) {
33556
+ onNavigateTo(TaskTypes.INTRODUCTION);
33557
+ return;
33558
+ }
33559
+ if (isSingpassEnabled && newAccountHolder === "theCompanyIWorkFor" || newAccountHolder === "mySoleProprietorName") {
33560
+ onNavigateTo(TaskTypes.SINGPASS_SELECTION);
33561
+ return;
33562
+ }
33563
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33276
33564
  },
33277
33565
  taskHistory,
33278
33566
  setTaskHistory,
@@ -33283,11 +33571,19 @@ function DropinComposerComponent({
33283
33571
  eventEmitter
33284
33572
  })
33285
33573
  });
33574
+ case TaskTypes.SINGPASS_SELECTION:
33575
+ return jsx(SingpassSelection, {
33576
+ handleNextClick: handleSingpassSelectionNextClick
33577
+ });
33286
33578
  case TaskTypes.INTRODUCTION:
33287
33579
  return jsx(Introduction, {
33288
33580
  legalEntity: rootLegalEntity,
33289
33581
  onExitIntroduction: () => {
33290
33582
  setHasSeenIntroduction(true);
33583
+ if (shouldShowSingpass) {
33584
+ onNavigateTo(TaskTypes.SINGPASS_SELECTION);
33585
+ return;
33586
+ }
33291
33587
  onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33292
33588
  },
33293
33589
  tasks
@@ -35484,7 +35780,7 @@ const ConfigurationApiProvider = ({
35484
35780
  isEmbeddedDropin,
35485
35781
  loadingContext
35486
35782
  } = authContext;
35487
- const sdkVersion = "3.11.3";
35783
+ const sdkVersion = "3.12.0";
35488
35784
  useAnalytics({
35489
35785
  onUserEvent,
35490
35786
  legalEntityId: rootLegalEntityId,