@adyen/kyc-components 3.51.3 → 3.51.4

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.
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, m as mutationSortFns, n as on, p as setAttribute, q as getSidedProp, r as use, v as createUniqueId, w as batch, x as getQueryStatusLabel, y as getMutationStatusColor, z as getQueryStatusColor, A as getQueryStatusColorByLabel, B as displayValue, F as For, C as convertRemToPixels, D as untrack, $ as $TRACK, E as useTransition, G as spread, H as mergeProps, I as createRoot, J as serialize, K as Index, L as updateNestedDataByPath, M as addEventListener, N as stringify, O as Match, Q as Switch, R as deleteNestedDataByPath, T as splitProps, U as Dynamic, V as createComputed } from "./index-D3fRWeYh.js";
4
+ import { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, m as mutationSortFns, n as on, p as setAttribute, q as getSidedProp, r as use, v as createUniqueId, w as batch, x as getQueryStatusLabel, y as getMutationStatusColor, z as getQueryStatusColor, A as getQueryStatusColorByLabel, B as displayValue, F as For, C as convertRemToPixels, D as untrack, $ as $TRACK, E as useTransition, G as spread, H as mergeProps, I as createRoot, J as serialize, K as Index, L as updateNestedDataByPath, M as addEventListener, N as stringify, O as Match, Q as Switch, R as deleteNestedDataByPath, T as splitProps, U as Dynamic, V as createComputed } from "./index-DXQ-eAl4.js";
5
5
  var isNonNullable = (i2) => i2 != null;
6
6
  var filterNonNullable = (arr) => arr.filter(isNonNullable);
7
7
  function chain(callbacks) {
@@ -1,5 +1,5 @@
1
- import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-UJrID1s2.js";
2
- import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-D3fRWeYh.js";
1
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-CrZErvT2.js";
2
+ import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-DXQ-eAl4.js";
3
3
  var DevtoolsComponent = (props) => {
4
4
  const [localStore, setLocalStore] = createLocalStorage({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
- import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./B4MFY5CR-UJrID1s2.js";
2
- import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-D3fRWeYh.js";
1
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./B4MFY5CR-CrZErvT2.js";
2
+ import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-DXQ-eAl4.js";
3
3
  var DevtoolsPanelComponent = (props) => {
4
4
  const [localStore, setLocalStore] = createLocalStorage({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,4 +1,4 @@
1
- import { W } from "./index-D3fRWeYh.js";
1
+ import { W } from "./index-DXQ-eAl4.js";
2
2
  export {
3
3
  W as default
4
4
  };
@@ -11678,6 +11678,451 @@ function TaxIdNumberTypeSelector({
11678
11678
  }
11679
11679
  ) });
11680
11680
  }
11681
+ const ADDRESS_SCHEMA = [
11682
+ "address",
11683
+ "otherAddressInformation",
11684
+ "postalCode",
11685
+ "city",
11686
+ "stateOrProvince",
11687
+ "country"
11688
+ ];
11689
+ const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
11690
+ const COUNTRIES_WITH_STATES_DATASET = [
11691
+ CountryCodes.Australia,
11692
+ CountryCodes.Brazil,
11693
+ CountryCodes.Canada,
11694
+ CountryCodes.NewZealand,
11695
+ CountryCodes.UnitedStates
11696
+ ];
11697
+ const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [
11698
+ CountryCodes.Australia,
11699
+ CountryCodes.Canada,
11700
+ CountryCodes.NewZealand,
11701
+ CountryCodes.PuertoRico,
11702
+ CountryCodes.UnitedStates,
11703
+ CountryCodes.UnitedKingdom,
11704
+ CountryCodes.France
11705
+ ];
11706
+ const ADDRESS_SCHEMAS = {
11707
+ [CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
11708
+ [CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
11709
+ [CountryCodes.UnitedKingdom]: [
11710
+ COUNTRY,
11711
+ ADDRESS,
11712
+ OTHER_ADDRESS_INFORMATION,
11713
+ CITY,
11714
+ POSTAL_CODE,
11715
+ STATE
11716
+ ],
11717
+ [CountryCodes.UnitedStates]: [
11718
+ COUNTRY,
11719
+ ADDRESS,
11720
+ OTHER_ADDRESS_INFORMATION,
11721
+ CITY,
11722
+ STATE,
11723
+ POSTAL_CODE
11724
+ ],
11725
+ [CountryCodes.PuertoRico]: [
11726
+ // should exactly match CountryCodes.UnitedStates
11727
+ COUNTRY,
11728
+ ADDRESS,
11729
+ OTHER_ADDRESS_INFORMATION,
11730
+ CITY,
11731
+ POSTAL_CODE
11732
+ ],
11733
+ [CountryCodes.HongKong]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE],
11734
+ [CountryCodes.NewZealand]: [
11735
+ COUNTRY,
11736
+ ADDRESS,
11737
+ OTHER_ADDRESS_INFORMATION,
11738
+ POSTAL_CODE,
11739
+ CITY,
11740
+ STATE
11741
+ ],
11742
+ [CountryCodes.UnitedArabEmirates]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY],
11743
+ default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
11744
+ };
11745
+ const CONDENSED_ADDRESS_FIELDS = {
11746
+ [CountryCodes.UnitedStates]: [CITY, STATE, POSTAL_CODE]
11747
+ };
11748
+ const LABELS = {
11749
+ city: {
11750
+ default: CITY,
11751
+ [CountryCodes.UnitedKingdom]: "cityTown"
11752
+ },
11753
+ country: {
11754
+ default: COUNTRY
11755
+ },
11756
+ otherAddressInformation: {
11757
+ default: OTHER_ADDRESS_INFORMATION,
11758
+ [CountryCodes.Canada]: "apartmentSuiteOther",
11759
+ [CountryCodes.PuertoRico]: "apartmentSuiteOther",
11760
+ // should exactly match CountryCodes.UnitedStates
11761
+ [CountryCodes.UnitedStates]: "apartmentSuiteOther"
11762
+ },
11763
+ postalCode: {
11764
+ default: POSTAL_CODE,
11765
+ [CountryCodes.PuertoRico]: "zipCode",
11766
+ // should exactly match CountryCodes.UnitedStates
11767
+ [CountryCodes.UnitedStates]: "zipCode"
11768
+ },
11769
+ stateOrProvince: {
11770
+ default: STATE,
11771
+ [CountryCodes.Australia]: "state",
11772
+ [CountryCodes.Brazil]: "state",
11773
+ [CountryCodes.Canada]: "provinceOrTerritory",
11774
+ [CountryCodes.NewZealand]: "region",
11775
+ [CountryCodes.UnitedStates]: "state"
11776
+ },
11777
+ stateOrProvince__placeHolder: {
11778
+ default: "stateOrProvince__placeHolder",
11779
+ [CountryCodes.Australia]: "selectState",
11780
+ [CountryCodes.Brazil]: "selectState",
11781
+ [CountryCodes.Canada]: "selectProvinceOrTerritory",
11782
+ [CountryCodes.UnitedStates]: "stateOrProvince__placeHolder__US"
11783
+ },
11784
+ address: {
11785
+ default: ADDRESS
11786
+ }
11787
+ };
11788
+ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
11789
+ TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
11790
+ TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
11791
+ TaskTypes2["TASKS_OVERVIEW"] = "TASKS_OVERVIEW";
11792
+ TaskTypes2["REVIEW"] = "REVIEW";
11793
+ TaskTypes2["INDIVIDUAL"] = "INDIVIDUAL";
11794
+ TaskTypes2["COMPANY"] = "COMPANY";
11795
+ TaskTypes2["BUSINESS_DETAILS"] = "BUSINESS_DETAILS";
11796
+ TaskTypes2["CUSTOMER_SUPPORT"] = "CUSTOMER_SUPPORT";
11797
+ TaskTypes2["PAYOUT"] = "PAYOUT";
11798
+ TaskTypes2["PAYIN"] = "PAYIN";
11799
+ TaskTypes2["SERVICE_AGREEMENT"] = "SERVICE_AGREEMENT";
11800
+ TaskTypes2["PCI_DSS"] = "PCI_DSS";
11801
+ TaskTypes2["DECISION_MAKER"] = "DECISION_MAKER";
11802
+ TaskTypes2["DECISION_MAKER_OVERVIEW"] = "DECISION_MAKER_OVERVIEW";
11803
+ TaskTypes2["TRUST"] = "TRUST";
11804
+ TaskTypes2["TRUST_MEMBER"] = "TRUST_MEMBER";
11805
+ TaskTypes2["TRUST_MEMBER_OVERVIEW"] = "TRUST_MEMBER_OVERVIEW";
11806
+ TaskTypes2["TRUST_MEMBER_INDIVIDUAL"] = "TRUST_MEMBER_INDIVIDUAL";
11807
+ TaskTypes2["TRUST_MEMBER_COMPANY"] = "TRUST_MEMBER_COMPANY";
11808
+ TaskTypes2["TRUST_MEMBER_ROLE_AND_TYPE"] = "TRUST_MEMBER_ROLE_AND_TYPE";
11809
+ TaskTypes2["TRUST_MEMBER_COMPANY_OWNER"] = "TRUST_MEMBER_COMPANY_OWNER";
11810
+ TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
11811
+ TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
11812
+ TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
11813
+ TaskTypes2["LEGAL_REPRESENTATIVE_DETAILS"] = "LEGAL_REPRESENTATIVE_DETAILS";
11814
+ TaskTypes2["SOURCE_OF_FUNDS"] = "SOURCE_OF_FUNDS";
11815
+ TaskTypes2["HIGH_EXPOSURE"] = "HIGH_EXPOSURE";
11816
+ return TaskTypes2;
11817
+ })(TaskTypes || {});
11818
+ var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
11819
+ TaskStatus2[TaskStatus2["EMPTY"] = 0] = "EMPTY";
11820
+ TaskStatus2[TaskStatus2["FINISHED"] = 1] = "FINISHED";
11821
+ TaskStatus2[TaskStatus2["PROCESSING"] = 2] = "PROCESSING";
11822
+ TaskStatus2[TaskStatus2["DETAILS_REQUIRED"] = 3] = "DETAILS_REQUIRED";
11823
+ TaskStatus2[TaskStatus2["SIGN"] = 4] = "SIGN";
11824
+ TaskStatus2[TaskStatus2["DOWNLOAD"] = 5] = "DOWNLOAD";
11825
+ TaskStatus2[TaskStatus2["ERROR"] = 6] = "ERROR";
11826
+ TaskStatus2[TaskStatus2["SIGNED"] = 7] = "SIGNED";
11827
+ TaskStatus2[TaskStatus2["SUBMIT"] = 8] = "SUBMIT";
11828
+ TaskStatus2[TaskStatus2["REMOVING"] = 9] = "REMOVING";
11829
+ TaskStatus2[TaskStatus2["UNKNOWN"] = 10] = "UNKNOWN";
11830
+ return TaskStatus2;
11831
+ })(TaskStatus || {});
11832
+ const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
11833
+ CountryCodes.Australia,
11834
+ CountryCodes.Gibraltar,
11835
+ CountryCodes.Guernsey,
11836
+ CountryCodes.HongKong,
11837
+ CountryCodes.Ireland,
11838
+ CountryCodes.IsleOfMan,
11839
+ CountryCodes.Jersey,
11840
+ CountryCodes.Malta,
11841
+ CountryCodes.PuertoRico,
11842
+ CountryCodes.Spain,
11843
+ CountryCodes.UnitedKingdom,
11844
+ CountryCodes.UnitedStates
11845
+ ];
11846
+ const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
11847
+ CountryCodes.PuertoRico,
11848
+ CountryCodes.UnitedStates
11849
+ ];
11850
+ const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [
11851
+ CountryCodes.Austria,
11852
+ CountryCodes.Canada,
11853
+ CountryCodes.Finland,
11854
+ CountryCodes.Germany,
11855
+ CountryCodes.Lithuania,
11856
+ CountryCodes.Luxembourg,
11857
+ CountryCodes.NewZealand,
11858
+ CountryCodes.Poland,
11859
+ CountryCodes.Sweden,
11860
+ CountryCodes.Switzerland
11861
+ ];
11862
+ const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS = [
11863
+ CountryCodes.HongKong
11864
+ ];
11865
+ const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [
11866
+ CountryCodes.Canada
11867
+ // CountryCodes.UnitedStates,
11868
+ ];
11869
+ const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
11870
+ CountryCodes.Australia,
11871
+ CountryCodes.Canada,
11872
+ CountryCodes.Gibraltar,
11873
+ CountryCodes.HongKong,
11874
+ CountryCodes.NewZealand,
11875
+ CountryCodes.PuertoRico,
11876
+ CountryCodes.Singapore,
11877
+ CountryCodes.UnitedStates,
11878
+ CountryCodes.Guernsey,
11879
+ CountryCodes.Jersey,
11880
+ CountryCodes.IsleOfMan,
11881
+ CountryCodes.Mexico,
11882
+ CountryCodes.Brazil
11883
+ ];
11884
+ const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [
11885
+ CountryCodes.Singapore
11886
+ ];
11887
+ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
11888
+ // strictly a subset of countries which use tax ID
11889
+ // right now in all countries companies must provide a tax ID - but maybe there will be exemptions in future?
11890
+ ];
11891
+ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
11892
+ // strictly a subset of countries which use tax ID
11893
+ CountryCodes.Canada,
11894
+ CountryCodes.PuertoRico,
11895
+ CountryCodes.UnitedStates
11896
+ ];
11897
+ const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [
11898
+ CountryCodes.HongKong,
11899
+ CountryCodes.Singapore
11900
+ ];
11901
+ const COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
11902
+ const COUNTRIES_USING_COMPANY_SEARCH = [
11903
+ CountryCodes.UnitedStates
11904
+ ];
11905
+ const COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
11906
+ CountryCodes.UnitedKingdom
11907
+ ];
11908
+ const COUNTRIES_REQUIRING_E_INVOICING_CODE = [
11909
+ /**
11910
+ * @description These are the countries for which E-Invoicing code is a compliance requirement. There will be more in the future.
11911
+ */
11912
+ CountryCodes.Italy
11913
+ ];
11914
+ const COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [
11915
+ CountryCodes.Australia
11916
+ ];
11917
+ const EFP_CAPABILITIES = [
11918
+ // Issuing
11919
+ "useCardInRestrictedCountriesCommercial",
11920
+ "useCardInRestrictedCountriesConsumer",
11921
+ "useCardInRestrictedIndustriesCommercial",
11922
+ "useCardInRestrictedIndustriesConsumer",
11923
+ "withdrawFromAtmCommercial",
11924
+ "withdrawFromAtmConsumer",
11925
+ "withdrawFromAtmInRestrictedCountriesCommercial",
11926
+ "withdrawFromAtmInRestrictedCountriesConsumer",
11927
+ "issueCardCommercial",
11928
+ "issueCardConsumer",
11929
+ "useCardConsumer",
11930
+ "useCardCommercial",
11931
+ "authorisedPaymentInstrumentUser",
11932
+ // Banking
11933
+ "issueBankAccount",
11934
+ "sendToThirdParty",
11935
+ "receiveFromThirdParty",
11936
+ // Capital
11937
+ "getGrantOffers",
11938
+ "receiveGrants"
11939
+ ];
11940
+ const rules$3 = ({
11941
+ data,
11942
+ country,
11943
+ taskType,
11944
+ isExperimentEnabled = () => false,
11945
+ accountHolder,
11946
+ rootLegalEntity,
11947
+ tinMatched
11948
+ }) => ({
11949
+ countryRequiresStateOrProvince: () => {
11950
+ if (COUNTRIES_WITH_STATES_DATASET.includes(country)) {
11951
+ return "REQUIRED";
11952
+ }
11953
+ },
11954
+ ifPubliclyTradedCompany: () => {
11955
+ var _a2, _b2;
11956
+ if ("companyType" in data && ((_a2 = data.companyType) == null ? void 0 : _a2.entityType) === CompanyTypesValue.PUBLIC_COMPANY) {
11957
+ return "REQUIRED";
11958
+ }
11959
+ if ("companyStructure" in data && ((_b2 = data.companyStructure) == null ? void 0 : _b2.entityType) === CompanyTypesValue.PUBLIC_COMPANY) {
11960
+ return "REQUIRED";
11961
+ }
11962
+ },
11963
+ countryUsesVat: () => {
11964
+ if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
11965
+ return "REQUIRED";
11966
+ }
11967
+ },
11968
+ countryUsesTaxId: () => {
11969
+ if (COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country) && !(taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP.includes(country))) {
11970
+ return "REQUIRED";
11971
+ }
11972
+ },
11973
+ countryHasRegistrationExemptionsForSomeSoleProps: () => {
11974
+ if (COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS.includes(country)) {
11975
+ return "REQUIRED";
11976
+ }
11977
+ },
11978
+ companyRegistrationNumberExemptionAllowed: () => {
11979
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2;
11980
+ if ("companyType" in data) {
11981
+ if (country === CountryCodes.Germany && (((_a2 = data.companyType) == null ? void 0 : _a2.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_b2 = data.companyType) == null ? void 0 : _b2.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
11982
+ return "REQUIRED";
11983
+ }
11984
+ if (country === CountryCodes.Denmark && ((_c2 = data.companyType) == null ? void 0 : _c2.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
11985
+ return "REQUIRED";
11986
+ }
11987
+ if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
11988
+ if (country === CountryCodes.Australia && (((_d2 = data.companyType) == null ? void 0 : _d2.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_e2 = data.companyType) == null ? void 0 : _e2.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP)) {
11989
+ return "REQUIRED";
11990
+ }
11991
+ if (country === CountryCodes.NewZealand) {
11992
+ return "REQUIRED";
11993
+ }
11994
+ }
11995
+ if (isExperimentEnabled("EnableAUIncorporatedPartnershipSkipRegistrationNumber") && country === CountryCodes.Australia && ((_f2 = data.companyType) == null ? void 0 : _f2.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP) {
11996
+ return "REQUIRED";
11997
+ }
11998
+ }
11999
+ if ("companyStructure" in data) {
12000
+ if (country === CountryCodes.Germany && (((_g2 = data.companyStructure) == null ? void 0 : _g2.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_h2 = data.companyStructure) == null ? void 0 : _h2.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
12001
+ return "REQUIRED";
12002
+ }
12003
+ if (country === CountryCodes.Denmark && ((_i2 = data.companyStructure) == null ? void 0 : _i2.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
12004
+ return "REQUIRED";
12005
+ }
12006
+ if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
12007
+ if (country === CountryCodes.Australia && (((_j2 = data.companyStructure) == null ? void 0 : _j2.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_k2 = data.companyStructure) == null ? void 0 : _k2.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP)) {
12008
+ return "REQUIRED";
12009
+ }
12010
+ if (country === CountryCodes.NewZealand) {
12011
+ return "REQUIRED";
12012
+ }
12013
+ }
12014
+ if (isExperimentEnabled("EnableAUIncorporatedPartnershipSkipRegistrationNumber") && country === CountryCodes.Australia && ((_l2 = data.companyStructure) == null ? void 0 : _l2.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP) {
12015
+ return "REQUIRED";
12016
+ }
12017
+ }
12018
+ if (COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS.includes(country)) {
12019
+ return "REQUIRED";
12020
+ }
12021
+ },
12022
+ countryOfGoverningLawRequired: () => {
12023
+ var _a2, _b2;
12024
+ if ("companyNameAndCountry" in data) {
12025
+ if (((_a2 = data.companyNameAndCountry) == null ? void 0 : _a2.country) === CountryCodes.UnitedKingdom) {
12026
+ return "REQUIRED";
12027
+ }
12028
+ }
12029
+ if ("basicInformation" in data) {
12030
+ if (isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies") && ((_b2 = data.basicInformation) == null ? void 0 : _b2.country) === CountryCodes.UnitedKingdom) {
12031
+ return "REQUIRED";
12032
+ }
12033
+ }
12034
+ },
12035
+ countryRequiresRegistrationNumberForSoleProps: () => {
12036
+ if (!COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) {
12037
+ return "REQUIRED";
12038
+ }
12039
+ },
12040
+ countryRequiresRegistrationNumberForCompanies: () => {
12041
+ if (isExperimentEnabled("EnableNewBusinessDetailsFlow") && isExperimentEnabled("EnableKompanySearchByRegistrationNumber") && country === "US") {
12042
+ return "OPTIONAL";
12043
+ }
12044
+ if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
12045
+ return "OPTIONAL";
12046
+ }
12047
+ if (!COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) {
12048
+ return "REQUIRED";
12049
+ }
12050
+ },
12051
+ countryRequiresDateOfIncorporationForCompanies: () => {
12052
+ if (COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION.includes(country)) {
12053
+ return "REQUIRED";
12054
+ }
12055
+ },
12056
+ countryUsesUenOrGst: () => {
12057
+ if (COUNTRIES_THAT_USES_UEN_OR_GST.includes(country)) {
12058
+ return "REQUIRED";
12059
+ }
12060
+ },
12061
+ countryHasTaxExemptionsForSomeCompanies: () => {
12062
+ if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "aTrust") {
12063
+ return "REQUIRED";
12064
+ }
12065
+ if (COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES.includes(country)) {
12066
+ return "REQUIRED";
12067
+ }
12068
+ },
12069
+ countryHasTaxExemptionsForSomeSoleProps: () => {
12070
+ if (COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS.includes(country)) {
12071
+ return "REQUIRED";
12072
+ }
12073
+ },
12074
+ countryUsingCompanySearch: () => {
12075
+ if (COUNTRIES_USING_COMPANY_SEARCH.includes(country)) {
12076
+ return "REQUIRED";
12077
+ }
12078
+ },
12079
+ countryRequiringFinancialInformation: () => {
12080
+ if (isExperimentEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
12081
+ return "REQUIRED";
12082
+ }
12083
+ },
12084
+ countryRequiresFinancialInformationForSoleProps: () => {
12085
+ if (isExperimentEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country) && keysOf((rootLegalEntity == null ? void 0 : rootLegalEntity.capabilities) ?? {}).some(
12086
+ (capability) => EFP_CAPABILITIES.includes(capability)
12087
+ )) {
12088
+ return "REQUIRED";
12089
+ }
12090
+ },
12091
+ isDoingBusinessAsNameV4Enabled: () => {
12092
+ if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
12093
+ return "REQUIRED";
12094
+ }
12095
+ },
12096
+ isDoingBusinessAsNameV4Disabled: () => {
12097
+ if (!isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
12098
+ return "REQUIRED";
12099
+ }
12100
+ },
12101
+ doingBusinessAsForCompany: () => {
12102
+ var _a2;
12103
+ const doingBusinessAsAbsent = "additionalInformation" in data && ((_a2 = data == null ? void 0 : data.additionalInformation) == null ? void 0 : _a2.doingBusinessAsAbsent) === "yes";
12104
+ if (isExperimentEnabled("EnableDoingBusinessAsNameV4") && doingBusinessAsAbsent) {
12105
+ return "REQUIRED";
12106
+ }
12107
+ },
12108
+ doingBusinessAsForSoleProp: () => {
12109
+ var _a2;
12110
+ const doingBusinessAsAbsent = "solePropRegistrationDetails" in data && ((_a2 = data == null ? void 0 : data.solePropRegistrationDetails) == null ? void 0 : _a2.doingBusinessAsAbsent) === "yes";
12111
+ if (isExperimentEnabled("EnableDoingBusinessAsNameV4") && doingBusinessAsAbsent) {
12112
+ return "REQUIRED";
12113
+ }
12114
+ },
12115
+ isEInvoicingCodeEnabled: () => {
12116
+ if (isExperimentEnabled("EnableEInvoicingCodeField") && COUNTRIES_REQUIRING_E_INVOICING_CODE.includes(country)) {
12117
+ return "REQUIRED";
12118
+ }
12119
+ },
12120
+ ifCountryUsAndTinFailed: () => {
12121
+ if (isExperimentEnabled("EnableManualCompanyTinVerification") && isExperimentEnabled("EnableNewBusinessDetailsFlow") && tinMatched === false && country === CountryCodes.UnitedStates) {
12122
+ return "REQUIRED";
12123
+ }
12124
+ }
12125
+ });
11681
12126
  const TAX_INFORMATION_FIELD = [
11682
12127
  "taxInformation",
11683
12128
  "exemptedFromTax",
@@ -11706,6 +12151,7 @@ function TaxInformationField({
11706
12151
  }) {
11707
12152
  var _a2;
11708
12153
  const { isExperimentEnabled } = useExperimentsContext();
12154
+ const { accountHolder } = useCoreContext();
11709
12155
  const currentCountryTaxInformation = useMemo(
11710
12156
  () => {
11711
12157
  var _a3;
@@ -11713,6 +12159,7 @@ function TaxInformationField({
11713
12159
  },
11714
12160
  [data, country]
11715
12161
  );
12162
+ const canSaveAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "theCompanyIWorkFor";
11716
12163
  useEffect(() => {
11717
12164
  const hasSavedTaxId = defaultData == null ? void 0 : defaultData.find((taxId) => taxId.country === country);
11718
12165
  if ((currentCountryTaxInformation == null ? void 0 : currentCountryTaxInformation.country) === country) return;
@@ -11758,7 +12205,7 @@ function TaxInformationField({
11758
12205
  };
11759
12206
  const handleTaxInformationInput = (value) => {
11760
12207
  if (!data.taxInformation) {
11761
- const taxInfo = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") ? {
12208
+ const taxInfo = canSaveAbsentState ? {
11762
12209
  country,
11763
12210
  number: value,
11764
12211
  type: data.isUen ? "UEN" : countryToTaxInfoTypeMap[country],
@@ -11770,7 +12217,7 @@ function TaxInformationField({
11770
12217
  };
11771
12218
  return handleChangeFor("taxInformation", "input")([taxInfo]);
11772
12219
  }
11773
- const newTaxId = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") ? {
12220
+ const newTaxId = canSaveAbsentState ? {
11774
12221
  country,
11775
12222
  number: value,
11776
12223
  type: data.isUen ? "UEN" : countryToTaxInfoTypeMap[country],
@@ -11783,7 +12230,7 @@ function TaxInformationField({
11783
12230
  const taxInformation = currentCountryTaxInformation ? data.taxInformation : [...data.taxInformation, newTaxId];
11784
12231
  const updatedTaxInformation = taxInformation.map((taxInfo) => {
11785
12232
  if (taxInfo.country !== country) return taxInfo;
11786
- return isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") ? {
12233
+ return canSaveAbsentState ? {
11787
12234
  country,
11788
12235
  number: value,
11789
12236
  type: data.isUen ? "UEN" : countryToTaxInfoTypeMap[country],
@@ -11799,7 +12246,7 @@ function TaxInformationField({
11799
12246
  const handleTaxInformationBlur = (e) => {
11800
12247
  const { value } = e.target;
11801
12248
  if (!data.taxInformation) {
11802
- const taxInfo = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") ? {
12249
+ const taxInfo = canSaveAbsentState ? {
11803
12250
  country,
11804
12251
  number: value,
11805
12252
  type: data.isUen ? "UEN" : countryToTaxInfoTypeMap[country],
@@ -11811,7 +12258,7 @@ function TaxInformationField({
11811
12258
  };
11812
12259
  return handleChangeFor("taxInformation", "blur")([taxInfo]);
11813
12260
  }
11814
- const newTaxId = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") ? {
12261
+ const newTaxId = canSaveAbsentState ? {
11815
12262
  country,
11816
12263
  number: value,
11817
12264
  type: data.isUen ? "UEN" : countryToTaxInfoTypeMap[country],
@@ -11824,7 +12271,7 @@ function TaxInformationField({
11824
12271
  const taxInformation = currentCountryTaxInformation ? data.taxInformation : [...data.taxInformation, newTaxId];
11825
12272
  const updatedTaxInformation = taxInformation.map((taxInfo) => {
11826
12273
  if (taxInfo.country !== country) return taxInfo;
11827
- return isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") ? {
12274
+ return canSaveAbsentState ? {
11828
12275
  country,
11829
12276
  number: value,
11830
12277
  type: data.isUen ? "UEN" : countryToTaxInfoTypeMap[country],
@@ -11868,7 +12315,7 @@ function TaxInformationField({
11868
12315
  if (!canExempt) {
11869
12316
  throw Error(`${country} does not allow tax exemptions`);
11870
12317
  }
11871
- if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
12318
+ if (canSaveAbsentState) {
11872
12319
  addTaxAbsentStatus(true);
11873
12320
  handleChangeFor("exemptedFromTax")(true);
11874
12321
  setTaxIdNumberType(void 0);
@@ -11895,7 +12342,7 @@ function TaxInformationField({
11895
12342
  setTaxIdNumberType(taxIdType);
11896
12343
  };
11897
12344
  const handleExemptedFromTaxChange = (exempted) => {
11898
- if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
12345
+ if (canSaveAbsentState) {
11899
12346
  addTaxAbsentStatus(exempted);
11900
12347
  handleChangeFor("exemptedFromTax")(exempted);
11901
12348
  } else {
@@ -12173,6 +12620,7 @@ function CompanyRegistrationDetails(props) {
12173
12620
  let mergedProps = props;
12174
12621
  const COMPANY_REGISTRATION_DETAILS = mergedProps.id ?? "companyRegistrationDetails";
12175
12622
  const { i18n } = useI18nContext();
12623
+ const { accountHolder } = useCoreContext();
12176
12624
  const { isExperimentEnabled } = useExperimentsContext();
12177
12625
  const isDoingBusinessAsNameV4Enabled = isExperimentEnabled(
12178
12626
  ExperimentNames.EnableDoingBusinessAsNameV4
@@ -12292,8 +12740,12 @@ function CompanyRegistrationDetails(props) {
12292
12740
  } else {
12293
12741
  fieldsToRemove.push("exemptedFromVat", "vatAbsenceReason");
12294
12742
  }
12295
- if (currentData.exemptedFromTax && !isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
12296
- fieldsToRemove.push("taxInformation");
12743
+ if (currentData.exemptedFromTax) {
12744
+ if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
12745
+ if (accountHolder === "mySoleProprietorName") fieldsToRemove.push("taxInformation");
12746
+ } else {
12747
+ fieldsToRemove.push("taxInformation");
12748
+ }
12297
12749
  }
12298
12750
  if (currentData.exemptedFromRegistrationNumber) {
12299
12751
  fieldsToRemove.push("registrationNumber");
@@ -12303,7 +12755,7 @@ function CompanyRegistrationDetails(props) {
12303
12755
  }
12304
12756
  return requiredFields.filter((field) => !fieldsToRemove.includes(field));
12305
12757
  },
12306
- [isExperimentEnabled, requiredFields]
12758
+ [accountHolder, isExperimentEnabled, requiredFields]
12307
12759
  );
12308
12760
  const { schema, data, valid, errors, fieldProblems, handleChangeFor, setErrors } = useForm({
12309
12761
  ...mergedProps,
@@ -14148,113 +14600,6 @@ function ListItem({ className: className2, children: children2, noMarkers, ...pr
14148
14600
  ]);
14149
14601
  return /* @__PURE__ */ jsx("li", { ...props, className: classNames, children: children2 });
14150
14602
  }
14151
- const ADDRESS_SCHEMA = [
14152
- "address",
14153
- "otherAddressInformation",
14154
- "postalCode",
14155
- "city",
14156
- "stateOrProvince",
14157
- "country"
14158
- ];
14159
- const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
14160
- const COUNTRIES_WITH_STATES_DATASET = [
14161
- CountryCodes.Australia,
14162
- CountryCodes.Brazil,
14163
- CountryCodes.Canada,
14164
- CountryCodes.NewZealand,
14165
- CountryCodes.UnitedStates
14166
- ];
14167
- const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [
14168
- CountryCodes.Australia,
14169
- CountryCodes.Canada,
14170
- CountryCodes.NewZealand,
14171
- CountryCodes.PuertoRico,
14172
- CountryCodes.UnitedStates,
14173
- CountryCodes.UnitedKingdom,
14174
- CountryCodes.France
14175
- ];
14176
- const ADDRESS_SCHEMAS = {
14177
- [CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
14178
- [CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
14179
- [CountryCodes.UnitedKingdom]: [
14180
- COUNTRY,
14181
- ADDRESS,
14182
- OTHER_ADDRESS_INFORMATION,
14183
- CITY,
14184
- POSTAL_CODE,
14185
- STATE
14186
- ],
14187
- [CountryCodes.UnitedStates]: [
14188
- COUNTRY,
14189
- ADDRESS,
14190
- OTHER_ADDRESS_INFORMATION,
14191
- CITY,
14192
- STATE,
14193
- POSTAL_CODE
14194
- ],
14195
- [CountryCodes.PuertoRico]: [
14196
- // should exactly match CountryCodes.UnitedStates
14197
- COUNTRY,
14198
- ADDRESS,
14199
- OTHER_ADDRESS_INFORMATION,
14200
- CITY,
14201
- POSTAL_CODE
14202
- ],
14203
- [CountryCodes.HongKong]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE],
14204
- [CountryCodes.NewZealand]: [
14205
- COUNTRY,
14206
- ADDRESS,
14207
- OTHER_ADDRESS_INFORMATION,
14208
- POSTAL_CODE,
14209
- CITY,
14210
- STATE
14211
- ],
14212
- [CountryCodes.UnitedArabEmirates]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY],
14213
- default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
14214
- };
14215
- const CONDENSED_ADDRESS_FIELDS = {
14216
- [CountryCodes.UnitedStates]: [CITY, STATE, POSTAL_CODE]
14217
- };
14218
- const LABELS = {
14219
- city: {
14220
- default: CITY,
14221
- [CountryCodes.UnitedKingdom]: "cityTown"
14222
- },
14223
- country: {
14224
- default: COUNTRY
14225
- },
14226
- otherAddressInformation: {
14227
- default: OTHER_ADDRESS_INFORMATION,
14228
- [CountryCodes.Canada]: "apartmentSuiteOther",
14229
- [CountryCodes.PuertoRico]: "apartmentSuiteOther",
14230
- // should exactly match CountryCodes.UnitedStates
14231
- [CountryCodes.UnitedStates]: "apartmentSuiteOther"
14232
- },
14233
- postalCode: {
14234
- default: POSTAL_CODE,
14235
- [CountryCodes.PuertoRico]: "zipCode",
14236
- // should exactly match CountryCodes.UnitedStates
14237
- [CountryCodes.UnitedStates]: "zipCode"
14238
- },
14239
- stateOrProvince: {
14240
- default: STATE,
14241
- [CountryCodes.Australia]: "state",
14242
- [CountryCodes.Brazil]: "state",
14243
- [CountryCodes.Canada]: "provinceOrTerritory",
14244
- [CountryCodes.NewZealand]: "region",
14245
- [CountryCodes.UnitedStates]: "state"
14246
- },
14247
- stateOrProvince__placeHolder: {
14248
- default: "stateOrProvince__placeHolder",
14249
- [CountryCodes.Australia]: "selectState",
14250
- [CountryCodes.Brazil]: "selectState",
14251
- [CountryCodes.Canada]: "selectProvinceOrTerritory",
14252
- [CountryCodes.UnitedStates]: "stateOrProvince__placeHolder__US"
14253
- },
14254
- address: {
14255
- default: ADDRESS
14256
- }
14257
- };
14258
14603
  const getKeyForField = (fieldName, country) => country ? LABELS[fieldName][country] || LABELS[fieldName].default : LABELS[fieldName].default;
14259
14604
  const getAddressSchemaForCountry = (country) => country && ADDRESS_SCHEMAS[country] ? ADDRESS_SCHEMAS[country] : ADDRESS_SCHEMAS.default;
14260
14605
  const getAddressSchemaLabelsByCountry = (country) => {
@@ -16892,50 +17237,6 @@ var TrustedFieldsProvider = /* @__PURE__ */ ((TrustedFieldsProvider2) => {
16892
17237
  TrustedFieldsProvider2["KOMPANY"] = "kompany";
16893
17238
  return TrustedFieldsProvider2;
16894
17239
  })(TrustedFieldsProvider || {});
16895
- var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
16896
- TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
16897
- TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
16898
- TaskTypes2["TASKS_OVERVIEW"] = "TASKS_OVERVIEW";
16899
- TaskTypes2["REVIEW"] = "REVIEW";
16900
- TaskTypes2["INDIVIDUAL"] = "INDIVIDUAL";
16901
- TaskTypes2["COMPANY"] = "COMPANY";
16902
- TaskTypes2["BUSINESS_DETAILS"] = "BUSINESS_DETAILS";
16903
- TaskTypes2["CUSTOMER_SUPPORT"] = "CUSTOMER_SUPPORT";
16904
- TaskTypes2["PAYOUT"] = "PAYOUT";
16905
- TaskTypes2["PAYIN"] = "PAYIN";
16906
- TaskTypes2["SERVICE_AGREEMENT"] = "SERVICE_AGREEMENT";
16907
- TaskTypes2["PCI_DSS"] = "PCI_DSS";
16908
- TaskTypes2["DECISION_MAKER"] = "DECISION_MAKER";
16909
- TaskTypes2["DECISION_MAKER_OVERVIEW"] = "DECISION_MAKER_OVERVIEW";
16910
- TaskTypes2["TRUST"] = "TRUST";
16911
- TaskTypes2["TRUST_MEMBER"] = "TRUST_MEMBER";
16912
- TaskTypes2["TRUST_MEMBER_OVERVIEW"] = "TRUST_MEMBER_OVERVIEW";
16913
- TaskTypes2["TRUST_MEMBER_INDIVIDUAL"] = "TRUST_MEMBER_INDIVIDUAL";
16914
- TaskTypes2["TRUST_MEMBER_COMPANY"] = "TRUST_MEMBER_COMPANY";
16915
- TaskTypes2["TRUST_MEMBER_ROLE_AND_TYPE"] = "TRUST_MEMBER_ROLE_AND_TYPE";
16916
- TaskTypes2["TRUST_MEMBER_COMPANY_OWNER"] = "TRUST_MEMBER_COMPANY_OWNER";
16917
- TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
16918
- TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
16919
- TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
16920
- TaskTypes2["LEGAL_REPRESENTATIVE_DETAILS"] = "LEGAL_REPRESENTATIVE_DETAILS";
16921
- TaskTypes2["SOURCE_OF_FUNDS"] = "SOURCE_OF_FUNDS";
16922
- TaskTypes2["HIGH_EXPOSURE"] = "HIGH_EXPOSURE";
16923
- return TaskTypes2;
16924
- })(TaskTypes || {});
16925
- var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
16926
- TaskStatus2[TaskStatus2["EMPTY"] = 0] = "EMPTY";
16927
- TaskStatus2[TaskStatus2["FINISHED"] = 1] = "FINISHED";
16928
- TaskStatus2[TaskStatus2["PROCESSING"] = 2] = "PROCESSING";
16929
- TaskStatus2[TaskStatus2["DETAILS_REQUIRED"] = 3] = "DETAILS_REQUIRED";
16930
- TaskStatus2[TaskStatus2["SIGN"] = 4] = "SIGN";
16931
- TaskStatus2[TaskStatus2["DOWNLOAD"] = 5] = "DOWNLOAD";
16932
- TaskStatus2[TaskStatus2["ERROR"] = 6] = "ERROR";
16933
- TaskStatus2[TaskStatus2["SIGNED"] = 7] = "SIGNED";
16934
- TaskStatus2[TaskStatus2["SUBMIT"] = 8] = "SUBMIT";
16935
- TaskStatus2[TaskStatus2["REMOVING"] = 9] = "REMOVING";
16936
- TaskStatus2[TaskStatus2["UNKNOWN"] = 10] = "UNKNOWN";
16937
- return TaskStatus2;
16938
- })(TaskStatus || {});
16939
17240
  var LegalEntityType = /* @__PURE__ */ ((LegalEntityType2) => {
16940
17241
  LegalEntityType2["INDIVIDUAL"] = "individual";
16941
17242
  LegalEntityType2["ORGANIZATION"] = "organization";
@@ -31108,300 +31409,6 @@ function BusinessSelection({
31108
31409
  }
31109
31410
  return null;
31110
31411
  }
31111
- const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
31112
- CountryCodes.Australia,
31113
- CountryCodes.Gibraltar,
31114
- CountryCodes.Guernsey,
31115
- CountryCodes.HongKong,
31116
- CountryCodes.Ireland,
31117
- CountryCodes.IsleOfMan,
31118
- CountryCodes.Jersey,
31119
- CountryCodes.Malta,
31120
- CountryCodes.PuertoRico,
31121
- CountryCodes.Spain,
31122
- CountryCodes.UnitedKingdom,
31123
- CountryCodes.UnitedStates
31124
- ];
31125
- const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
31126
- CountryCodes.PuertoRico,
31127
- CountryCodes.UnitedStates
31128
- ];
31129
- const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [
31130
- CountryCodes.Austria,
31131
- CountryCodes.Canada,
31132
- CountryCodes.Finland,
31133
- CountryCodes.Germany,
31134
- CountryCodes.Lithuania,
31135
- CountryCodes.Luxembourg,
31136
- CountryCodes.NewZealand,
31137
- CountryCodes.Poland,
31138
- CountryCodes.Sweden,
31139
- CountryCodes.Switzerland
31140
- ];
31141
- const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS = [
31142
- CountryCodes.HongKong
31143
- ];
31144
- const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [
31145
- CountryCodes.Canada
31146
- // CountryCodes.UnitedStates,
31147
- ];
31148
- const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
31149
- CountryCodes.Australia,
31150
- CountryCodes.Canada,
31151
- CountryCodes.Gibraltar,
31152
- CountryCodes.HongKong,
31153
- CountryCodes.NewZealand,
31154
- CountryCodes.PuertoRico,
31155
- CountryCodes.Singapore,
31156
- CountryCodes.UnitedStates,
31157
- CountryCodes.Guernsey,
31158
- CountryCodes.Jersey,
31159
- CountryCodes.IsleOfMan,
31160
- CountryCodes.Mexico,
31161
- CountryCodes.Brazil
31162
- ];
31163
- const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [
31164
- CountryCodes.Singapore
31165
- ];
31166
- const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
31167
- // strictly a subset of countries which use tax ID
31168
- // right now in all countries companies must provide a tax ID - but maybe there will be exemptions in future?
31169
- ];
31170
- const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
31171
- // strictly a subset of countries which use tax ID
31172
- CountryCodes.Canada,
31173
- CountryCodes.PuertoRico,
31174
- CountryCodes.UnitedStates
31175
- ];
31176
- const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [
31177
- CountryCodes.HongKong,
31178
- CountryCodes.Singapore
31179
- ];
31180
- const COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
31181
- const COUNTRIES_USING_COMPANY_SEARCH = [
31182
- CountryCodes.UnitedStates
31183
- ];
31184
- const COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
31185
- CountryCodes.UnitedKingdom
31186
- ];
31187
- const COUNTRIES_REQUIRING_E_INVOICING_CODE = [
31188
- /**
31189
- * @description These are the countries for which E-Invoicing code is a compliance requirement. There will be more in the future.
31190
- */
31191
- CountryCodes.Italy
31192
- ];
31193
- const COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [
31194
- CountryCodes.Australia
31195
- ];
31196
- const EFP_CAPABILITIES = [
31197
- // Issuing
31198
- "useCardInRestrictedCountriesCommercial",
31199
- "useCardInRestrictedCountriesConsumer",
31200
- "useCardInRestrictedIndustriesCommercial",
31201
- "useCardInRestrictedIndustriesConsumer",
31202
- "withdrawFromAtmCommercial",
31203
- "withdrawFromAtmConsumer",
31204
- "withdrawFromAtmInRestrictedCountriesCommercial",
31205
- "withdrawFromAtmInRestrictedCountriesConsumer",
31206
- "issueCardCommercial",
31207
- "issueCardConsumer",
31208
- "useCardConsumer",
31209
- "useCardCommercial",
31210
- "authorisedPaymentInstrumentUser",
31211
- // Banking
31212
- "issueBankAccount",
31213
- "sendToThirdParty",
31214
- "receiveFromThirdParty",
31215
- // Capital
31216
- "getGrantOffers",
31217
- "receiveGrants"
31218
- ];
31219
- const rules$3 = ({
31220
- data,
31221
- country,
31222
- taskType,
31223
- isExperimentEnabled = () => false,
31224
- accountHolder,
31225
- rootLegalEntity,
31226
- tinMatched
31227
- }) => ({
31228
- countryRequiresStateOrProvince: () => {
31229
- if (COUNTRIES_WITH_STATES_DATASET.includes(country)) {
31230
- return "REQUIRED";
31231
- }
31232
- },
31233
- ifPubliclyTradedCompany: () => {
31234
- var _a2, _b2;
31235
- if ("companyType" in data && ((_a2 = data.companyType) == null ? void 0 : _a2.entityType) === CompanyTypesValue.PUBLIC_COMPANY) {
31236
- return "REQUIRED";
31237
- }
31238
- if ("companyStructure" in data && ((_b2 = data.companyStructure) == null ? void 0 : _b2.entityType) === CompanyTypesValue.PUBLIC_COMPANY) {
31239
- return "REQUIRED";
31240
- }
31241
- },
31242
- countryUsesVat: () => {
31243
- if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
31244
- return "REQUIRED";
31245
- }
31246
- },
31247
- countryUsesTaxId: () => {
31248
- if (COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country) && !(taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP.includes(country))) {
31249
- return "REQUIRED";
31250
- }
31251
- },
31252
- countryHasRegistrationExemptionsForSomeSoleProps: () => {
31253
- if (COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS.includes(country)) {
31254
- return "REQUIRED";
31255
- }
31256
- },
31257
- companyRegistrationNumberExemptionAllowed: () => {
31258
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2;
31259
- if ("companyType" in data) {
31260
- if (country === CountryCodes.Germany && (((_a2 = data.companyType) == null ? void 0 : _a2.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_b2 = data.companyType) == null ? void 0 : _b2.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
31261
- return "REQUIRED";
31262
- }
31263
- if (country === CountryCodes.Denmark && ((_c2 = data.companyType) == null ? void 0 : _c2.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
31264
- return "REQUIRED";
31265
- }
31266
- if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
31267
- if (country === CountryCodes.Australia && (((_d2 = data.companyType) == null ? void 0 : _d2.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_e2 = data.companyType) == null ? void 0 : _e2.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP)) {
31268
- return "REQUIRED";
31269
- }
31270
- if (country === CountryCodes.NewZealand) {
31271
- return "REQUIRED";
31272
- }
31273
- }
31274
- if (isExperimentEnabled("EnableAUIncorporatedPartnershipSkipRegistrationNumber") && country === CountryCodes.Australia && ((_f2 = data.companyType) == null ? void 0 : _f2.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP) {
31275
- return "REQUIRED";
31276
- }
31277
- }
31278
- if ("companyStructure" in data) {
31279
- if (country === CountryCodes.Germany && (((_g2 = data.companyStructure) == null ? void 0 : _g2.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_h2 = data.companyStructure) == null ? void 0 : _h2.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
31280
- return "REQUIRED";
31281
- }
31282
- if (country === CountryCodes.Denmark && ((_i2 = data.companyStructure) == null ? void 0 : _i2.entityType) === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
31283
- return "REQUIRED";
31284
- }
31285
- if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
31286
- if (country === CountryCodes.Australia && (((_j2 = data.companyStructure) == null ? void 0 : _j2.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || ((_k2 = data.companyStructure) == null ? void 0 : _k2.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP)) {
31287
- return "REQUIRED";
31288
- }
31289
- if (country === CountryCodes.NewZealand) {
31290
- return "REQUIRED";
31291
- }
31292
- }
31293
- if (isExperimentEnabled("EnableAUIncorporatedPartnershipSkipRegistrationNumber") && country === CountryCodes.Australia && ((_l2 = data.companyStructure) == null ? void 0 : _l2.entityType) === CompanyTypesValue.INCORPORATED_PARTNERSHIP) {
31294
- return "REQUIRED";
31295
- }
31296
- }
31297
- if (COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS.includes(country)) {
31298
- return "REQUIRED";
31299
- }
31300
- },
31301
- countryOfGoverningLawRequired: () => {
31302
- var _a2, _b2;
31303
- if ("companyNameAndCountry" in data) {
31304
- if (((_a2 = data.companyNameAndCountry) == null ? void 0 : _a2.country) === CountryCodes.UnitedKingdom) {
31305
- return "REQUIRED";
31306
- }
31307
- }
31308
- if ("basicInformation" in data) {
31309
- if (isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies") && ((_b2 = data.basicInformation) == null ? void 0 : _b2.country) === CountryCodes.UnitedKingdom) {
31310
- return "REQUIRED";
31311
- }
31312
- }
31313
- },
31314
- countryRequiresRegistrationNumberForSoleProps: () => {
31315
- if (!COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) {
31316
- return "REQUIRED";
31317
- }
31318
- },
31319
- countryRequiresRegistrationNumberForCompanies: () => {
31320
- if (isExperimentEnabled("EnableNewBusinessDetailsFlow") && isExperimentEnabled("EnableKompanySearchByRegistrationNumber") && country === "US") {
31321
- return "OPTIONAL";
31322
- }
31323
- if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
31324
- return "OPTIONAL";
31325
- }
31326
- if (!COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) {
31327
- return "REQUIRED";
31328
- }
31329
- },
31330
- countryRequiresDateOfIncorporationForCompanies: () => {
31331
- if (COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION.includes(country)) {
31332
- return "REQUIRED";
31333
- }
31334
- },
31335
- countryUsesUenOrGst: () => {
31336
- if (COUNTRIES_THAT_USES_UEN_OR_GST.includes(country)) {
31337
- return "REQUIRED";
31338
- }
31339
- },
31340
- countryHasTaxExemptionsForSomeCompanies: () => {
31341
- if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "aTrust") {
31342
- return "REQUIRED";
31343
- }
31344
- if (COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES.includes(country)) {
31345
- return "REQUIRED";
31346
- }
31347
- },
31348
- countryHasTaxExemptionsForSomeSoleProps: () => {
31349
- if (COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS.includes(country)) {
31350
- return "REQUIRED";
31351
- }
31352
- },
31353
- countryUsingCompanySearch: () => {
31354
- if (COUNTRIES_USING_COMPANY_SEARCH.includes(country)) {
31355
- return "REQUIRED";
31356
- }
31357
- },
31358
- countryRequiringFinancialInformation: () => {
31359
- if (isExperimentEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
31360
- return "REQUIRED";
31361
- }
31362
- },
31363
- countryRequiresFinancialInformationForSoleProps: () => {
31364
- if (isExperimentEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country) && keysOf((rootLegalEntity == null ? void 0 : rootLegalEntity.capabilities) ?? {}).some(
31365
- (capability) => EFP_CAPABILITIES.includes(capability)
31366
- )) {
31367
- return "REQUIRED";
31368
- }
31369
- },
31370
- isDoingBusinessAsNameV4Enabled: () => {
31371
- if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
31372
- return "REQUIRED";
31373
- }
31374
- },
31375
- isDoingBusinessAsNameV4Disabled: () => {
31376
- if (!isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
31377
- return "REQUIRED";
31378
- }
31379
- },
31380
- doingBusinessAsForCompany: () => {
31381
- var _a2;
31382
- const doingBusinessAsAbsent = "additionalInformation" in data && ((_a2 = data == null ? void 0 : data.additionalInformation) == null ? void 0 : _a2.doingBusinessAsAbsent) === "yes";
31383
- if (isExperimentEnabled("EnableDoingBusinessAsNameV4") && doingBusinessAsAbsent) {
31384
- return "REQUIRED";
31385
- }
31386
- },
31387
- doingBusinessAsForSoleProp: () => {
31388
- var _a2;
31389
- const doingBusinessAsAbsent = "solePropRegistrationDetails" in data && ((_a2 = data == null ? void 0 : data.solePropRegistrationDetails) == null ? void 0 : _a2.doingBusinessAsAbsent) === "yes";
31390
- if (isExperimentEnabled("EnableDoingBusinessAsNameV4") && doingBusinessAsAbsent) {
31391
- return "REQUIRED";
31392
- }
31393
- },
31394
- isEInvoicingCodeEnabled: () => {
31395
- if (isExperimentEnabled("EnableEInvoicingCodeField") && COUNTRIES_REQUIRING_E_INVOICING_CODE.includes(country)) {
31396
- return "REQUIRED";
31397
- }
31398
- },
31399
- ifCountryUsAndTinFailed: () => {
31400
- if (isExperimentEnabled("EnableManualCompanyTinVerification") && isExperimentEnabled("EnableNewBusinessDetailsFlow") && tinMatched === false && country === CountryCodes.UnitedStates) {
31401
- return "REQUIRED";
31402
- }
31403
- }
31404
- });
31405
31412
  const CountryFieldValidation = () => ({
31406
31413
  country: {
31407
31414
  modes: ["blur"],
@@ -52192,7 +52199,7 @@ const ConfigurationApiProvider = ({
52192
52199
  }) => {
52193
52200
  const authContext = useAuthContext();
52194
52201
  const { isEmbeddedDropin, loadingContext } = authContext;
52195
- const sdkVersion = "3.51.3";
52202
+ const sdkVersion = "3.51.4";
52196
52203
  const rootLegalEntityId = useGlobalStore((store) => store.rootLegalEntity.id);
52197
52204
  useAnalytics({
52198
52205
  onUserEvent,
@@ -52932,7 +52939,7 @@ const DebugModal = ({ onExit }) => {
52932
52939
  const [tab, setTab] = useState("metadata");
52933
52940
  const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
52934
52941
  const metadata = {
52935
- sdkVersion: "3.51.3",
52942
+ sdkVersion: "3.51.4",
52936
52943
  locale: i18n.locale,
52937
52944
  rootLegalEntityId: rootLegalEntity.id
52938
52945
  };
@@ -55929,7 +55936,7 @@ var TanstackQueryDevtools = (_k = class {
55929
55936
  if (__privateGet(this, _Component)) {
55930
55937
  Devtools = __privateGet(this, _Component);
55931
55938
  } else {
55932
- Devtools = lazy(() => import("./HO4MOOFI-CGublxkZ.js"));
55939
+ Devtools = lazy(() => import("./HO4MOOFI-Dd48N8vS.js"));
55933
55940
  __privateSet(this, _Component, Devtools);
55934
55941
  }
55935
55942
  setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
@@ -56051,7 +56058,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
56051
56058
  if (__privateGet(this, _Component2)) {
56052
56059
  Devtools = __privateGet(this, _Component2);
56053
56060
  } else {
56054
- Devtools = lazy(() => import("./HUY7CZI3-I14bSv-8.js"));
56061
+ Devtools = lazy(() => import("./HUY7CZI3-eTUqdkEW.js"));
56055
56062
  __privateSet(this, _Component2, Devtools);
56056
56063
  }
56057
56064
  setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.51.3",
3
+ "version": "3.51.4",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",