@adyen/kyc-components 3.73.0-beta.0 → 3.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/dist/AcceptTermsOfServiceComponent-Bkk7q6mo.js +635 -0
  2. package/dist/{AccountSetupRejected-Dcrt_Wjb.js → AccountSetupRejected-C7ecEaSn.js} +3 -3
  3. package/dist/Avatar-D6yqIy0x.js +60 -0
  4. package/dist/{BusinessDetailsDropin-D10LCgSY.js → BusinessDetailsDropin-BiRuNJ8n.js} +210 -526
  5. package/dist/BusinessFinancingComponent-CSvynjpm.js +38 -0
  6. package/dist/BusinessFinancingDropin-CXRE15GX.js +1807 -0
  7. package/dist/{BusinessFinancingPage-CVRFAPxm.js → BusinessFinancingPage-r0Iqfbxa.js} +3 -3
  8. package/dist/{BusinessTypeSelectionPage-DK4PY3_p.js → BusinessTypeSelectionPage-CZ_FaDIH.js} +6 -5
  9. package/dist/{CXEL7IU7-DyO75Uac.js → CXEL7IU7-W0GuMc2V.js} +3 -3
  10. package/dist/Confirm-BHr6mMiG.js +56 -0
  11. package/dist/{AcceptTermsOfServiceComponent-Ib77t0y9.js → ContractViewer-oBZZ8bn4.js} +5 -703
  12. package/dist/CreateIndividualComponent-CVdGHf1d.js +65 -0
  13. package/dist/CreateTransferInstrumentComponent-CmIi26ll.js +56 -0
  14. package/dist/{CustomerSupport-BqyayBTP.js → CustomerSupport-ZjylSyg9.js} +6 -4
  15. package/dist/{DebugModal-CO_clhiW.js → DebugModal-CZzPXOzG.js} +12 -11
  16. package/dist/{DecisionMakerDetailsPage-C0wmo475.js → DecisionMakerDetailsPage-okutG9UE.js} +4 -3
  17. package/dist/{DecisionMakers-B2rmqsfW.js → DecisionMakers-BMlKNI5V.js} +6 -5
  18. package/dist/EmbeddedStatus-43EnE3ZK.js +92 -0
  19. package/dist/FormEndState-Ba2NHk5y.js +32 -0
  20. package/dist/FormFlow-Cdck7u4x.js +214 -0
  21. package/dist/{FormNavigation-W4SYacAX.js → FormNavigation-W6RbnNko.js} +3 -63
  22. package/dist/FormWrapper-qqC_-UNQ.js +149 -0
  23. package/dist/{HASRA6WW-Cj_9-H1H.js → HASRA6WW-s6cv0xeb.js} +2 -2
  24. package/dist/{I3HPI4QX-CCkDLYPH.js → I3HPI4QX-CHsql0Lg.js} +3 -3
  25. package/dist/{CreateIndividualComponent-BiMYdvQq.js → IndividualOnfidoDropin-IrOHNmTf.js} +278 -2350
  26. package/dist/{Introduction-DlsETOX7.js → Introduction-o-hWV0oZ.js} +4 -4
  27. package/dist/{LegalRepresentativeDetailsPage-Dbp83K05.js → LegalRepresentativeDetailsPage-CCl4rrb1.js} +4 -3
  28. package/dist/ManageIndividualComponent-B7fSfP2F.js +46 -0
  29. package/dist/ManagePCIComponent-r4dqzD7_.js +33 -0
  30. package/dist/ManageTermsOfServiceComponent-D8e3dSKy.js +41 -0
  31. package/dist/ManageTransferInstrumentComponent-BJO-PHo6.js +312 -0
  32. package/dist/MaybeModal-O3q5S9NK.js +18 -0
  33. package/dist/{Modal-6j0jkYFX.js → Modal-TYAtBE9x.js} +2 -2
  34. package/dist/{index-D6YGuPb5.js → OnboardingDropinComponent-Bxh1PgLV.js} +138 -3461
  35. package/dist/{CreateTransferInstrumentComponent-CaBD_3yr.js → PayoutDetailsDropin-CP4QFI8I.js} +14 -195
  36. package/dist/{PayoutDetailsPage-CWAOATOb.js → PayoutDetailsPage-DIH-wJhK.js} +4 -4
  37. package/dist/ProviderButton-AD6AyoHf.js +250 -0
  38. package/dist/{Review-B0v_A189.js → Review-DDa73Jju.js} +4 -4
  39. package/dist/{RootBusinessDetailsPage-D_3xc6YN.js → RootBusinessDetailsPage-AH2m5bxv.js} +4 -4
  40. package/dist/{RootIndividualDetailsPage-CT-rsvpD.js → RootIndividualDetailsPage-BL3wAc4S.js} +4 -3
  41. package/dist/{ShadowStylesRoot-DMxqA0py.js → ShadowStylesRoot-wgo4Zafr.js} +27 -21
  42. package/dist/SignPCIComponent-jYVMnZY2.js +289 -0
  43. package/dist/{SingpassSelection-DB5BHBy1.js → SingpassSelection-CVSZcYyN.js} +2 -2
  44. package/dist/{SoleProprietorshipPage-CFZ3F57F.js → SoleProprietorshipPage-DalSBVxC.js} +4 -4
  45. package/dist/{SourceOfFunds.module-sL22I1gI.js → SourceOfFunds.module-BQK0zkg8.js} +2 -2
  46. package/dist/{SourceOfFundsPage-Tde0WbSG.js → SourceOfFundsPage-DiS_X7b1.js} +19 -11
  47. package/dist/Spacer-BK3jDget.js +18 -0
  48. package/dist/StepProgressIndicator-B4zX-D3p.js +74 -0
  49. package/dist/{EventEmitter-BmWcyurq.js → StoreProvider-BvP9cxL2.js} +696 -646
  50. package/dist/{TaskItemStatus-DqNACVFe.js → TaskItemStatus-DkPVRqFs.js} +2 -2
  51. package/dist/{TaxReportingDropin-CPQZXr1j.js → TaxReportingDropin-g3d5fL-x.js} +8 -6
  52. package/dist/TileGroup-CYlkz3ZJ.js +174 -0
  53. package/dist/{TrustDetailsPage-BGkbFLaG.js → TrustDetailsPage-obnK_JcV.js} +16 -9
  54. package/dist/{TrustMemberCompanyPage-CQi1xGDz.js → TrustMemberCompanyPage-CSJwRLMU.js} +5 -5
  55. package/dist/{TrustMemberIndividualPage-BI_XyXhS.js → TrustMemberIndividualPage-C7tI4NA2.js} +4 -3
  56. package/dist/{UnincorporatedPartnershipIndividualPage-B6gLv55I.js → UnincorporatedPartnershipIndividualPage-BioVhYr_.js} +6 -5
  57. package/dist/{UnincorporatedPartnershipMemberCompanyPage-jHwnxg3n.js → UnincorporatedPartnershipMemberCompanyPage-C22uQvbk.js} +4 -4
  58. package/dist/VerificationErrorAlert-BF5XUN6V.js +66 -0
  59. package/dist/ViewVerificationStatusComponent-T5K1PtFS.js +175 -0
  60. package/dist/adyen-business-financing.js +57 -0
  61. package/dist/adyen-individual.js +15 -5
  62. package/dist/adyen-kyc-components.js +426 -3
  63. package/dist/adyen-manage-individual.js +15 -5
  64. package/dist/adyen-manage-pci.js +51 -0
  65. package/dist/adyen-manage-terms-of-service.js +51 -0
  66. package/dist/adyen-manage-transfer-instruments.js +66 -0
  67. package/dist/adyen-onboarding.js +51 -0
  68. package/dist/adyen-sign-pci.js +65 -0
  69. package/dist/adyen-terms-of-service.js +15 -5
  70. package/dist/{adyen-terms-of-service.vue_vue_type_script_lang-CLUMW5mI.js → adyen-terms-of-service.vue_vue_type_script_lang-BD4hndWg.js} +11 -3
  71. package/dist/adyen-transfer-instrument.js +9 -5
  72. package/dist/{adyen-transfer-instrument.vue_vue_type_script_lang-uEpG3KG3.js → adyen-transfer-instrument.vue_vue_type_script_lang-BE-ro1iH.js} +11 -3
  73. package/dist/adyen-verification-status.js +75 -0
  74. package/dist/{css-CFY1scQ9.js → css-BaETlS0u.js} +2 -2
  75. package/dist/documentUtils-2X_myXDi.js +226 -0
  76. package/dist/dropinUtils-ZxnWDnZL.js +204 -0
  77. package/dist/file-CiG1D0zy.js +42 -0
  78. package/dist/getFieldsWithExistingData-D7k0q9nX.js +23 -0
  79. package/dist/hasDataChanged-HQ34LD7s.js +19 -0
  80. package/dist/individualFormConfig-C4JOvJeg.js +171 -0
  81. package/dist/{json-RoVXbcQq.js → json-DAyfNEwU.js} +2 -2
  82. package/dist/{localizeDateString-DtxuKMqB.js → localizeDateString-HsIetwBG.js} +2 -2
  83. package/dist/mapExistingFile-BE74t9jV.js +25 -0
  84. package/dist/mapFinancialReportsToFinancialInformation-yegBHG3w.js +59 -0
  85. package/dist/mapTransferInstrumentToPayoutAccount-ChLSi-YS.js +30 -0
  86. package/dist/omitObscuredFieldsIfUnchanged-BzlcM6To.js +28 -0
  87. package/dist/{plaintext-DpBLPLCO.js → plaintext-DcsV3Ez0.js} +2 -2
  88. package/dist/preact/adyen-terms-of-service.js +2 -2
  89. package/dist/preact/adyen-transfer-instrument.js +2 -2
  90. package/dist/process-field-configurations-C0gNZpp3.js +185 -0
  91. package/dist/processValidationErrors-DtcBtOKr.js +203 -0
  92. package/dist/rules-DEF0eIW9.js +309 -0
  93. package/dist/style.css +1772 -1753
  94. package/dist/styles-CLV89_hH.js +1772 -1753
  95. package/dist/types/{components/Business/hooks/useBusinessData → api/companyDataSet}/constants.d.ts +1 -1
  96. package/dist/types/api/companyDataSet/useCompanyDataset.d.ts +9 -7
  97. package/dist/types/api/companySearch/{useCompanyDeepSearch.d.ts → useCompanySearch.d.ts} +11 -4
  98. package/dist/types/api/queryKeys.d.ts +4 -1
  99. package/dist/types/api/tinVerification/useVerifyTin.d.ts +4 -6
  100. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +1 -1
  101. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +0 -2
  102. package/dist/types/components/Business/forms/BasicInformation/BasicInformation.d.ts +1 -1
  103. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +3 -11
  104. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +3 -11
  105. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard.d.ts +8 -6
  106. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +1 -1
  107. package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +3 -9
  108. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +1 -1
  109. package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +0 -2
  110. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +3 -0
  111. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -1
  112. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +5 -0
  113. package/dist/types/components/Shared/fields/Name/validate.d.ts +0 -1
  114. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  115. package/dist/types/components/Shared/tasks/TaskList/PayoutAccountTaskListItem.d.ts +3 -3
  116. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +5 -0
  117. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +2 -2
  118. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +0 -15
  119. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +2 -2
  120. package/dist/types/components/ui/atoms/Modal/Modal.d.ts +3 -0
  121. package/dist/types/constants/countries.d.ts +1 -0
  122. package/dist/types/context/ExperimentContext/types.d.ts +5 -2
  123. package/dist/types/context/I18nProvider/I18nProvider.d.ts +1 -1
  124. package/dist/types/embeds/baseEmbedProps.d.ts +9 -11
  125. package/dist/types/embeds/business-financing/adyen-business-financing.d.ts +1 -0
  126. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +40 -0
  127. package/dist/types/embeds/individual/adyen-individual.types.d.ts +8 -1
  128. package/dist/types/embeds/manage-individual/adyen-manage-individual.types.d.ts +7 -0
  129. package/dist/types/embeds/manage-pci/adyen-manage-pci.d.ts +1 -0
  130. package/dist/types/embeds/manage-pci/adyen-manage-pci.types.d.ts +39 -0
  131. package/dist/types/embeds/manage-terms-of-service/adyen-manage-terms-of-service.d.ts +1 -0
  132. package/dist/types/embeds/manage-terms-of-service/adyen-manage-terms-of-service.types.d.ts +39 -0
  133. package/dist/types/embeds/manage-transfer-instruments/adyen-manage-transfer-instruments.d.ts +1 -0
  134. package/dist/types/embeds/manage-transfer-instruments/adyen-manage-transfer-instruments.types.d.ts +42 -0
  135. package/dist/types/embeds/onboarding/adyen-onboarding.d.ts +1 -0
  136. package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +27 -0
  137. package/dist/types/embeds/sign-pci/adyen-sign-pci.d.ts +1 -0
  138. package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +43 -0
  139. package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +7 -0
  140. package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -0
  141. package/dist/types/embeds/verification-status/adyen-verification-status.d.ts +1 -0
  142. package/dist/types/embeds/verification-status/adyen-verification-status.types.d.ts +47 -0
  143. package/dist/types/hooks/useDataConflicts.d.ts +6 -0
  144. package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +1 -1
  145. package/dist/types/utils/country.d.ts +1 -1
  146. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  147. package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +3 -0
  148. package/dist/types/utils/regex/businessRegistrationNumberPatterns.d.ts +1 -0
  149. package/dist/types/utils/signals/useWatchingSignal.d.ts +0 -2
  150. package/dist/useMultiForm-C9-6Ii8X.js +835 -0
  151. package/dist/useOnboardingStatus-BDaGvN1o.js +27 -0
  152. package/dist/useSalesChannelsSettings-Dcouvxeh.js +51 -0
  153. package/dist/useTermsOfServiceStatus-DnDl-q_x.js +42 -0
  154. package/dist/useToastContext-SxQbUliB.js +21 -0
  155. package/dist/useUpdateLegalEntity-BXh1hdqg.js +57 -0
  156. package/dist/utils-B1H_8b1P.js +74 -0
  157. package/dist/{utils-Bl8l2XY4.js → utils-CbUeSAH9.js} +4 -4
  158. package/dist/validate-CT_n11je.js +245 -0
  159. package/dist/validate-D-3dHKWn.js +40 -0
  160. package/dist/view-verification-status-DTkA8PtO.js +20 -0
  161. package/dist/vue/adyen-individual.js +15 -5
  162. package/dist/vue/adyen-manage-individual.js +15 -5
  163. package/dist/vue/adyen-terms-of-service.js +6 -4
  164. package/dist/vue/adyen-transfer-instrument.js +6 -4
  165. package/dist/{yaml-DEzkYiMR.js → yaml-BQHAR0fM.js} +2 -2
  166. package/package.json +30 -3
  167. package/dist/ManageIndividualComponent-D-47IZH6.js +0 -190
  168. package/dist/mapExistingFile-CwT8TZ5D.js +0 -870
  169. package/dist/types/api/companyDataSet/useRefreshCompanyDataset.d.ts +0 -8
  170. package/dist/types/api/companySearch/useCompanyIndexSearch.d.ts +0 -4
  171. package/dist/types/api/companySearch/useCompanyRegistrationNumberDeepSearch.d.ts +0 -4
  172. package/dist/types/api/companySearch/useCompanyRegistrationNumberIndexSearch.d.ts +0 -4
  173. package/dist/types/components/Business/hooks/useBusinessData/types.d.ts +0 -39
  174. package/dist/types/components/Business/hooks/useBusinessData/useBusinessData.d.ts +0 -2
  175. package/dist/types/components/Individual/fields/DecisionMakerRole/validate.d.ts +0 -3
  176. package/dist/types/hooks/types.d.ts +0 -1
  177. package/dist/types/hooks/useVersion.d.ts +0 -13
  178. package/dist/types/utils/signals/useSignalValue.d.ts +0 -40
  179. package/dist/types/utils/uniqBy.d.ts +0 -1
  180. package/dist/useToastContext-DiQ_PGrE.js +0 -33
@@ -0,0 +1,635 @@
1
+ ;
2
+ {
3
+ try {
4
+ let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e062d02e-c9d1-40dd-88b7-c95f530611c8", e._sentryDebugIdIdentifier = "sentry-dbid-e062d02e-c9d1-40dd-88b7-c95f530611c8");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
+ import { useState, useEffect, useCallback } from "preact/hooks";
12
+ import { q as useApiContext, b4 as useInvalidateRootLegalEntity, b5 as useMutation, b7 as httpPost, r as useQuery, x as skipToken, t as httpGet, aJ as createLogger, b as useI18nContext, $ as useAnalyticsContext, a5 as useExperimentsContext, as as useForm, C as Alert, Z as Button, a2 as LoaderWrapper, ax as Field, bw as Select, bv as Checkbox, aM as ActionBar, z as LegalEntityType, ad as getOwnSignatories, y as doesLegalEntityRequiresLegalRepresentative, w as getLegalRepresentative, a as useLegalEntity, R as ROOT_LE, L as Loader, X as TaskTypes } from "./StoreProvider-BvP9cxL2.js";
13
+ import { a as useTermsOfServiceStatus, u as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-DnDl-q_x.js";
14
+ import { M as MaybeModal } from "./MaybeModal-O3q5S9NK.js";
15
+ import { b as ModalContent, c as ModalFooter } from "./Modal-TYAtBE9x.js";
16
+ import { C as ContractViewer, O as OutlinedIcon } from "./ContractViewer-oBZZ8bn4.js";
17
+ import { S as Spacer } from "./Spacer-BK3jDget.js";
18
+ import { S as StepProgressIndicator } from "./StepProgressIndicator-B4zX-D3p.js";
19
+ import { u as useToastContext } from "./useToastContext-SxQbUliB.js";
20
+ import { F as FormEndState } from "./FormEndState-Ba2NHk5y.js";
21
+ import { F as FormNavigation } from "./FormNavigation-W6RbnNko.js";
22
+ import { d as downloadFile } from "./file-CiG1D0zy.js";
23
+ import { l as localizeDateString } from "./localizeDateString-HsIetwBG.js";
24
+ const acceptTermsOfService = async (legalEntityId, baseUrl, termsOfServiceDocumentId, data) => {
25
+ return httpPost(
26
+ {
27
+ baseUrl,
28
+ path: `legalEntities/${legalEntityId}/termsOfService/accept`
29
+ },
30
+ {
31
+ ...data,
32
+ legalEntityReference: legalEntityId,
33
+ termsOfServiceDocumentId
34
+ }
35
+ );
36
+ };
37
+ const useAcceptTermsOfService = (options) => {
38
+ const { rootLegalEntityId, baseUrl } = useApiContext();
39
+ const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
40
+ return useMutation({
41
+ mutationFn: (data) => acceptTermsOfService(
42
+ rootLegalEntityId.value,
43
+ baseUrl.value,
44
+ data.termsOfServiceDocumentId,
45
+ data
46
+ ),
47
+ onSuccess: async () => {
48
+ await invalidateRootLegalEntity();
49
+ },
50
+ ...options
51
+ });
52
+ };
53
+ const getAcceptedTermsOfService = async (legalEntityId, baseUrl, termsOfServiceAcceptanceReference, documentFormat) => {
54
+ return httpGet({
55
+ baseUrl,
56
+ path: `legalEntities/${legalEntityId}/termsOfService/acceptedTermsOfServiceDocument/${termsOfServiceAcceptanceReference}?documentformat=${documentFormat} `
57
+ });
58
+ };
59
+ const useAcceptedTermsOfService = (termsOfServiceAcceptanceReference, documentFormat, options) => {
60
+ const { rootLegalEntityId, baseUrl } = useApiContext();
61
+ return useQuery({
62
+ queryKey: ["acceptedTermsOfService", termsOfServiceAcceptanceReference, documentFormat],
63
+ queryFn: termsOfServiceAcceptanceReference ? () => getAcceptedTermsOfService(
64
+ rootLegalEntityId.value,
65
+ baseUrl.value,
66
+ termsOfServiceAcceptanceReference,
67
+ documentFormat
68
+ ) : skipToken,
69
+ ...options
70
+ });
71
+ };
72
+ const getTermsOfService = async (legalEntityId, baseUrl, data) => {
73
+ return httpPost(
74
+ {
75
+ baseUrl,
76
+ path: `legalEntities/${legalEntityId}/termsOfService`
77
+ },
78
+ data
79
+ );
80
+ };
81
+ const useTermsOfService = (data, options) => {
82
+ const { rootLegalEntityId, baseUrl } = useApiContext();
83
+ return useQuery({
84
+ queryKey: ["termsOfService", data],
85
+ queryFn: () => getTermsOfService(rootLegalEntityId.value, baseUrl.value, data),
86
+ ...options
87
+ });
88
+ };
89
+ const logger$1 = createLogger();
90
+ const FALLBACK_LANGUAGE_CODE$1 = "en";
91
+ const useServiceAgreement = ({
92
+ handleServiceAgreementIsNotAvailableInThatLanguage,
93
+ acceptanceId,
94
+ serviceAgreementType,
95
+ language
96
+ }) => {
97
+ const [agreementLanguage, setAgreementLanguage] = useState(language);
98
+ useEffect(() => {
99
+ if (agreementLanguage !== language) {
100
+ setAgreementLanguage(language);
101
+ }
102
+ }, [language]);
103
+ const {
104
+ data: unAcceptedServiceAgreement,
105
+ isSuccess: isUnAcceptedServiceAgreementSuccess,
106
+ isError,
107
+ error
108
+ } = useTermsOfService(
109
+ {
110
+ language: agreementLanguage,
111
+ type: serviceAgreementType,
112
+ termsOfServiceDocumentFormat: "JSON"
113
+ },
114
+ { enabled: !acceptanceId }
115
+ );
116
+ const { data: acceptedServiceAgreement, isSuccess: isAcceptedServiceAgreementSuccess } = useAcceptedTermsOfService(acceptanceId, "JSON");
117
+ if (isUnAcceptedServiceAgreementSuccess || isAcceptedServiceAgreementSuccess) {
118
+ const termsOfService = unAcceptedServiceAgreement ?? acceptedServiceAgreement;
119
+ const documentId = (unAcceptedServiceAgreement == null ? void 0 : unAcceptedServiceAgreement.termsOfServiceDocumentId) ?? (acceptedServiceAgreement == null ? void 0 : acceptedServiceAgreement.termsOfServiceAcceptanceReference);
120
+ if ((termsOfService == null ? void 0 : termsOfService.document) && documentId) {
121
+ const contract = JSON.parse(decodeURIComponent(escape(window.atob(termsOfService.document))));
122
+ return {
123
+ loading: "success",
124
+ serviceAgreement: {
125
+ id: documentId,
126
+ contract
127
+ }
128
+ };
129
+ }
130
+ }
131
+ if (isError) {
132
+ if (agreementLanguage !== FALLBACK_LANGUAGE_CODE$1) {
133
+ handleServiceAgreementIsNotAvailableInThatLanguage();
134
+ setAgreementLanguage(FALLBACK_LANGUAGE_CODE$1);
135
+ } else {
136
+ logger$1.error(error);
137
+ }
138
+ return {
139
+ loading: "success",
140
+ serviceAgreement: void 0
141
+ };
142
+ }
143
+ return {
144
+ loading: "loading",
145
+ serviceAgreement: void 0
146
+ };
147
+ };
148
+ const serviceAgreementValidationRules = {
149
+ signer: { modes: ["blur"], validate: (signer) => !!signer, errorMessage: "fieldIsRequired" },
150
+ acceptServiceAgreement: {
151
+ modes: ["blur"],
152
+ validate: (acceptServiceAgreement) => !!acceptServiceAgreement,
153
+ errorMessage: "fieldIsRequired"
154
+ }
155
+ };
156
+ const serviceAgreementTypesTranslationMapping = {
157
+ adyenForPlatformsManage: "paymentProcessingTerms",
158
+ adyenIssuing: "accountHolderTerms",
159
+ adyenForPlatformsAdvanced: "paymentProcessingTerms",
160
+ adyenCapital: "capitalUserTerms",
161
+ adyenAccount: "businessAccountTerms",
162
+ adyenCard: "cardUserTerms",
163
+ adyenFranchisee: "franchiseesTAndCs",
164
+ adyenPccr: "pccr",
165
+ adyenChargeCard: "chargeCardUserAgreement"
166
+ };
167
+ const logger = createLogger();
168
+ const FALLBACK_LANGUAGE_CODE = "en";
169
+ function ServiceAgreementDropin({
170
+ legalEntityResponse,
171
+ handleHomeClick,
172
+ handleAddSigner,
173
+ handleSign,
174
+ serviceAgreementTypes,
175
+ serviceAgreementAcceptanceInfos,
176
+ asEmbedded = false,
177
+ asModal = false,
178
+ handleCloseClick
179
+ }) {
180
+ var _a, _b;
181
+ const { i18n } = useI18nContext();
182
+ const userEvents = useAnalyticsContext();
183
+ const { showToast } = useToastContext();
184
+ const { isExperimentEnabled } = useExperimentsContext();
185
+ const isAgeVerificationEnabled = isExperimentEnabled("EnableAgeVerification");
186
+ const { rootLegalEntityId, baseUrl } = useApiContext();
187
+ const [loadingStatus, setLoadingStatus] = useState();
188
+ const signedForms = serviceAgreementAcceptanceInfos.map((serviceAgreementAcceptanceInfo) => ({
189
+ formId: serviceAgreementAcceptanceInfo.id,
190
+ serviceAgreementType: serviceAgreementAcceptanceInfo.type,
191
+ acceptanceId: serviceAgreementAcceptanceInfo.id,
192
+ createdAt: serviceAgreementAcceptanceInfo.createdAt,
193
+ formName: serviceAgreementTypesTranslationMapping[serviceAgreementAcceptanceInfo.type],
194
+ isValid: true
195
+ }));
196
+ const formsToBeSigned = serviceAgreementTypes.map((serviceAgreementType) => ({
197
+ formId: serviceAgreementType,
198
+ serviceAgreementType,
199
+ formName: serviceAgreementTypesTranslationMapping[serviceAgreementType],
200
+ isValid: false
201
+ }));
202
+ const forms = [...signedForms, ...formsToBeSigned];
203
+ const [activeFormIndex, setActiveFormIndex] = useState(0);
204
+ const [activeForm, setActiveForm] = useState(forms[activeFormIndex]);
205
+ const [hasFinished, setHasFinished] = useState(false);
206
+ const canSign = (serviceAgreementTypes == null ? void 0 : serviceAgreementTypes.includes(activeForm == null ? void 0 : activeForm.serviceAgreementType)) && !(activeForm == null ? void 0 : activeForm.acceptanceId);
207
+ const isLastStep = activeFormIndex === forms.length - 1;
208
+ const showSignedAlert = !!(activeForm == null ? void 0 : activeForm.acceptanceId);
209
+ const translationKeys = {
210
+ home: "goToOverview",
211
+ next: canSign ? "sign" : "continue"
212
+ };
213
+ const { refetch: downloadAcceptedTermsAsPdf } = useAcceptedTermsOfService(
214
+ activeForm == null ? void 0 : activeForm.acceptanceId,
215
+ "PDF",
216
+ {
217
+ enabled: false
218
+ }
219
+ );
220
+ const handleServiceAgreementIsNotAvailableInThatLanguage = useCallback(() => {
221
+ showToast({
222
+ label: i18n.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),
223
+ variant: "error"
224
+ });
225
+ }, [i18n, showToast]);
226
+ const { loading: contractLoadingStatus, serviceAgreement } = useServiceAgreement({
227
+ handleServiceAgreementIsNotAvailableInThatLanguage,
228
+ acceptanceId: activeForm == null ? void 0 : activeForm.acceptanceId,
229
+ serviceAgreementType: activeForm == null ? void 0 : activeForm.serviceAgreementType,
230
+ language: i18n.languageCode
231
+ });
232
+ const { handleChangeFor, triggerValidation, data, valid, isValid, errors } = useForm({
233
+ schema: ["signer", "acceptServiceAgreement"],
234
+ rules: serviceAgreementValidationRules
235
+ });
236
+ const getSigners = () => {
237
+ var _a2, _b2;
238
+ if (legalEntityResponse.type === LegalEntityType.ORGANIZATION) {
239
+ return getOwnSignatories(legalEntityResponse).map(({ legalEntityId: id, name }) => ({
240
+ id: id ?? "",
241
+ name: name ?? ""
242
+ }));
243
+ }
244
+ if (isAgeVerificationEnabled && doesLegalEntityRequiresLegalRepresentative(legalEntityResponse)) {
245
+ const legalRepresentative = getLegalRepresentative(legalEntityResponse);
246
+ return legalRepresentative ? [{ id: legalRepresentative.legalEntityId, name: legalRepresentative.name }] : [];
247
+ }
248
+ return [
249
+ {
250
+ id: legalEntityResponse == null ? void 0 : legalEntityResponse.id,
251
+ name: `${(_a2 = legalEntityResponse == null ? void 0 : legalEntityResponse.individual) == null ? void 0 : _a2.name.firstName} ${(_b2 = legalEntityResponse == null ? void 0 : legalEntityResponse.individual) == null ? void 0 : _b2.name.lastName}`
252
+ }
253
+ ];
254
+ };
255
+ const signers = getSigners();
256
+ const handleSignClick = async () => {
257
+ const baseTracking = {
258
+ actionType: "sign"
259
+ };
260
+ triggerValidation();
261
+ if (loadingStatus === "loading" || !serviceAgreement || !data.signer) return;
262
+ if (isValid) {
263
+ try {
264
+ setLoadingStatus("loading");
265
+ await handleSign(legalEntityResponse.id, serviceAgreement.id, { acceptedBy: data.signer });
266
+ setLoadingStatus("success");
267
+ showToast({
268
+ label: i18n.get("serviceAgreementSignedSuccessfully"),
269
+ variant: "success"
270
+ });
271
+ userEvents.addTaskEvent("Success", baseTracking);
272
+ data.acceptServiceAgreement = false;
273
+ data.signer = void 0;
274
+ } catch (e) {
275
+ setLoadingStatus("success");
276
+ showToast({ label: i18n.get("serviceAgreementSignFailed"), variant: "error" });
277
+ userEvents.addTaskEvent("Encountered error", {
278
+ ...baseTracking,
279
+ returnType: (e == null ? void 0 : e.errorCode) || "backend",
280
+ returnValue: (e == null ? void 0 : e.title) ?? (e == null ? void 0 : e.message)
281
+ });
282
+ }
283
+ } else {
284
+ userEvents.addTaskEvent("Encountered error", {
285
+ ...baseTracking,
286
+ returnType: "validation",
287
+ returnValue: Object.entries(valid).filter(([, value]) => !value).map(([key]) => key)
288
+ });
289
+ }
290
+ };
291
+ const goHome = () => {
292
+ userEvents.addPageEvent("Clicked button", {
293
+ actionType: "back",
294
+ label: translationKeys.home
295
+ });
296
+ handleHomeClick();
297
+ };
298
+ const handleExpandSection = useCallback((title) => {
299
+ userEvents.addFieldEvent("Clicked accordion", {
300
+ actionType: "open",
301
+ field: title
302
+ });
303
+ }, []);
304
+ useEffect(() => {
305
+ if (!serviceAgreementAcceptanceInfos.length) return;
306
+ gotoForm(serviceAgreementAcceptanceInfos.length - 1);
307
+ }, [serviceAgreementAcceptanceInfos]);
308
+ useEffect(() => {
309
+ userEvents.addTaskEvent("Landed on page", {
310
+ actionType: "start"
311
+ });
312
+ const initialFormIndex = forms.length === signedForms.length ? 0 : signedForms.length;
313
+ gotoForm(initialFormIndex);
314
+ }, []);
315
+ useEffect(() => {
316
+ userEvents.updateSharedEventProperties({ page: activeForm == null ? void 0 : activeForm.formName });
317
+ }, [activeForm]);
318
+ const gotoForm = (index) => {
319
+ setActiveForm(forms[index]);
320
+ setActiveFormIndex(index);
321
+ };
322
+ const onDownloadAcceptedTermsOfServiceDocument = async () => {
323
+ const { isError, isSuccess, data: data2 } = await downloadAcceptedTermsAsPdf();
324
+ if (isSuccess && (data2 == null ? void 0 : data2.document)) {
325
+ await downloadFile(data2.document, `${i18n.get(activeForm.formName)}.pdf`);
326
+ }
327
+ if (isError) {
328
+ showToast({
329
+ label: i18n.get("failedToDownloadAcceptedServiceAgreementDocument"),
330
+ variant: "error"
331
+ });
332
+ }
333
+ };
334
+ const onDownloadUnacceptedTermsOfServiceDocument = async () => {
335
+ const requestAndDownload = async (languageCode) => {
336
+ const response = await getTermsOfService(rootLegalEntityId.value, baseUrl.value, {
337
+ type: activeForm.serviceAgreementType,
338
+ language: languageCode,
339
+ termsOfServiceDocumentFormat: "PDF"
340
+ });
341
+ if (!(response == null ? void 0 : response.document)) {
342
+ throw new Error(`No terms Of service document found in response`);
343
+ }
344
+ await downloadFile(response.document, `${i18n.get(activeForm.formName)}.pdf`);
345
+ };
346
+ try {
347
+ await requestAndDownload(i18n.languageCode);
348
+ } catch {
349
+ if (i18n.languageCode !== FALLBACK_LANGUAGE_CODE) {
350
+ await requestAndDownload(FALLBACK_LANGUAGE_CODE).catch(logger.error);
351
+ return;
352
+ }
353
+ showToast({
354
+ label: i18n.get("failedToDownloadServiceAgreementDocument"),
355
+ variant: "error"
356
+ });
357
+ }
358
+ };
359
+ const isIndividual = legalEntityResponse.type === "individual";
360
+ const addSignerAlert = handleAddSigner && /* @__PURE__ */ jsx(
361
+ Alert,
362
+ {
363
+ variant: signers.length ? "info" : "warning",
364
+ className: "adyen-kyc-u-margin-top-16",
365
+ title: i18n.get(signers.length ? "isYourNameMissingFromSigners" : "thereAreNoSigners"),
366
+ children: /* @__PURE__ */ jsx(Button, { onClick: handleAddSigner, variant: "link", children: i18n.get("addYourselfAsSigner") })
367
+ }
368
+ );
369
+ const getSignedName = (acceptanceId) => {
370
+ var _a2, _b2, _c;
371
+ if (!acceptanceId) return "";
372
+ if (legalEntityResponse.type === LegalEntityType.INDIVIDUAL) {
373
+ const name = (_a2 = legalEntityResponse.individual) == null ? void 0 : _a2.name;
374
+ return `${(name == null ? void 0 : name.firstName) ?? ""} ${(name == null ? void 0 : name.lastName) ?? ""}`;
375
+ }
376
+ const signatory = serviceAgreementAcceptanceInfos.find((info) => info.id === acceptanceId);
377
+ return ((_c = (_b2 = legalEntityResponse.entityAssociations) == null ? void 0 : _b2.find(
378
+ (entity) => entity.legalEntityId === (signatory == null ? void 0 : signatory.acceptedBy)
379
+ )) == null ? void 0 : _c.name) ?? "";
380
+ };
381
+ const signedAlert = showSignedAlert && /* @__PURE__ */ jsx(
382
+ Alert,
383
+ {
384
+ variant: "success",
385
+ className: "adyen-kyc-signed-alert",
386
+ title: i18n.get("signedByOn", {
387
+ values: {
388
+ date: localizeDateString(activeForm.createdAt, i18n.locale) ?? "",
389
+ signer: getSignedName(activeForm.acceptanceId)
390
+ }
391
+ })
392
+ }
393
+ );
394
+ const sidebar = /* @__PURE__ */ jsx(
395
+ LoaderWrapper,
396
+ {
397
+ status: loadingStatus,
398
+ formOpacityWhenLoading: 0.3,
399
+ showSpinner: false,
400
+ className: "adyen-kyc-dropin__sidebar-wrapper",
401
+ children: /* @__PURE__ */ jsx(
402
+ FormNavigation,
403
+ {
404
+ forms,
405
+ activeForm,
406
+ gotoForm,
407
+ taskName: "signServiceAgreement",
408
+ className: "adyen-kyc-u-margin-bottom-24"
409
+ }
410
+ )
411
+ }
412
+ );
413
+ const content = /* @__PURE__ */ jsxs(
414
+ LoaderWrapper,
415
+ {
416
+ status: loadingStatus,
417
+ formOpacityWhenLoading: 0.3,
418
+ showSpinner: false,
419
+ className: "adyen-kyc-form-container",
420
+ children: [
421
+ /* @__PURE__ */ jsxs(
422
+ LoaderWrapper,
423
+ {
424
+ status: contractLoadingStatus,
425
+ formOpacityWhenLoading: 0.3,
426
+ showSpinner: false,
427
+ children: [
428
+ serviceAgreement && /* @__PURE__ */ jsxs(Fragment, { children: [
429
+ signedAlert,
430
+ /* @__PURE__ */ jsx(
431
+ ContractViewer,
432
+ {
433
+ contract: serviceAgreement.contract,
434
+ onExpandSection: handleExpandSection,
435
+ showSectionNumbering: true
436
+ }
437
+ ),
438
+ signedAlert,
439
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-top-16", children: /* @__PURE__ */ jsx(
440
+ Button,
441
+ {
442
+ variant: "secondary",
443
+ onClick: (activeForm == null ? void 0 : activeForm.acceptanceId) ? onDownloadAcceptedTermsOfServiceDocument : onDownloadUnacceptedTermsOfServiceDocument,
444
+ icon: "download",
445
+ children: i18n.get("downloadAsPdf")
446
+ }
447
+ ) })
448
+ ] }),
449
+ !forms.length && /* @__PURE__ */ jsx(Alert, { variant: "info", title: i18n.get("nothingNeedsToBeSigned") })
450
+ ]
451
+ }
452
+ ),
453
+ canSign && /* @__PURE__ */ jsxs(Fragment, { children: [
454
+ !!signers.length && /* @__PURE__ */ jsx(
455
+ Field,
456
+ {
457
+ name: "signer",
458
+ label: i18n.get("signer"),
459
+ classNameModifiers: ["col-50"],
460
+ className: "adyen-kyc-u-margin-top-32",
461
+ errorMessage: (_a = errors.signer) == null ? void 0 : _a.errorMessage,
462
+ isValid: valid.signer,
463
+ children: (childProps) => /* @__PURE__ */ jsx(
464
+ Select,
465
+ {
466
+ ...childProps,
467
+ onChange: handleChangeFor("signer", "blur"),
468
+ name: "signer",
469
+ placeholder: i18n.get("selectSigner"),
470
+ selected: data.signer,
471
+ items: signers
472
+ }
473
+ )
474
+ }
475
+ ),
476
+ !isIndividual && addSignerAlert,
477
+ /* @__PURE__ */ jsx(
478
+ Field,
479
+ {
480
+ el: "fieldset",
481
+ name: "acceptServiceAgreement",
482
+ className: "adyen-kyc-u-margin-top-16",
483
+ errorMessage: (_b = errors.acceptServiceAgreement) == null ? void 0 : _b.errorMessage,
484
+ isValid: valid.acceptServiceAgreement,
485
+ children: (childProps) => /* @__PURE__ */ jsx(
486
+ Checkbox,
487
+ {
488
+ ...childProps,
489
+ label: i18n.get("iHaveReadAndIAcceptTheseTerms"),
490
+ checked: data.acceptServiceAgreement ?? false,
491
+ name: "acceptServiceAgreement",
492
+ onChange: handleChangeFor("acceptServiceAgreement")
493
+ }
494
+ )
495
+ }
496
+ )
497
+ ] }),
498
+ !asEmbedded && /* @__PURE__ */ jsx(
499
+ ActionBar,
500
+ {
501
+ onHome: goHome,
502
+ homeButtonLabel: i18n.get(translationKeys.home),
503
+ onNext: canSign ? handleSignClick : () => gotoForm(activeFormIndex + 1),
504
+ nextButtonLabel: i18n.get(translationKeys.next),
505
+ nextButtonDisabled: forms.length === 0 || !canSign && isLastStep,
506
+ onBack: () => gotoForm(activeFormIndex - 1),
507
+ hideBackButton: activeFormIndex === 0,
508
+ backButtonLabel: i18n.get("previous")
509
+ }
510
+ )
511
+ ]
512
+ }
513
+ );
514
+ const currentStep = signedForms.length;
515
+ const totalSteps = forms.length;
516
+ const handleClick = async () => {
517
+ if (canSign) {
518
+ await handleSignClick();
519
+ } else if (!isLastStep) {
520
+ gotoForm(activeFormIndex + 1);
521
+ } else {
522
+ setHasFinished(true);
523
+ }
524
+ };
525
+ const endScreen = hasFinished && /* @__PURE__ */ jsxs(FormEndState, { children: [
526
+ /* @__PURE__ */ jsx("template", { slot: "title", children: i18n.get("serviceAgreementSignedAndDated") }),
527
+ /* @__PURE__ */ jsx(OutlinedIcon, { slot: "icon", name: "check" }),
528
+ /* @__PURE__ */ jsx("div", { slot: "content", children: /* @__PURE__ */ jsx(Button, { onClick: () => handleCloseClick, children: i18n.get("finish") }) })
529
+ ] });
530
+ return /* @__PURE__ */ jsx(MaybeModal, { inline: !asModal, onClose: handleCloseClick, children: /* @__PURE__ */ jsxs(ModalContent, { children: [
531
+ /* @__PURE__ */ jsxs("article", { className: "adyen-kyc-service-agreement-content", children: [
532
+ !asEmbedded && sidebar,
533
+ endScreen || content
534
+ ] }),
535
+ asEmbedded && /* @__PURE__ */ jsxs(ModalFooter, { children: [
536
+ "...",
537
+ /* @__PURE__ */ jsx(
538
+ StepProgressIndicator,
539
+ {
540
+ activeStepIndex: currentStep ?? 0,
541
+ stepsCount: totalSteps ?? 3,
542
+ circles: true,
543
+ thick: true
544
+ }
545
+ ),
546
+ /* @__PURE__ */ jsx(Spacer, {}),
547
+ !asModal && /* @__PURE__ */ jsx(
548
+ Button,
549
+ {
550
+ icon: "chevron-left",
551
+ onClick: () => gotoForm(activeFormIndex - 1),
552
+ variant: "secondary",
553
+ children: i18n.get("back")
554
+ }
555
+ ),
556
+ /* @__PURE__ */ jsx(Button, { variant: canSign ? "primary" : "secondary", onClick: handleClick, children: i18n.get(canSign ? "signAndContinue" : "continue") })
557
+ ] })
558
+ ] }) });
559
+ }
560
+ function AcceptTermsOfServiceComponent({
561
+ legalEntityId,
562
+ modalView = false,
563
+ asEmbedded = true,
564
+ /* triggered when X button clicked, or at the end, on Finish button click */
565
+ onClose,
566
+ onUnmount,
567
+ /* triggered on every document signed, typically multiple times */
568
+ onAccept,
569
+ handleAddSigner
570
+ }) {
571
+ if (!legalEntityId) {
572
+ throw new Error("Must provide at-least a legalEntityId");
573
+ }
574
+ const [stepsData, setStepsData] = useState({
575
+ unAcceptedTermsOfServiceTypes: [],
576
+ acceptedTermsOfServices: []
577
+ });
578
+ const { data: legalEntity } = useLegalEntity(ROOT_LE);
579
+ const { data: serviceAgreementStatus, isLoading: isStatusLoading } = useTermsOfServiceStatus();
580
+ const { data: serviceAgreementAcceptanceInfos, isLoading: isAcceptanceInfoLoading } = useTermsOfServiceAcceptanceInfos();
581
+ const { mutateAsync: acceptTermsOfService2 } = useAcceptTermsOfService();
582
+ const handleOnClose = () => {
583
+ if (modalView) {
584
+ onUnmount == null ? void 0 : onUnmount();
585
+ }
586
+ onClose == null ? void 0 : onClose();
587
+ };
588
+ const handleSign = useCallback(
589
+ async (legalEntityId2, termsOfServiceDocumentId, signedBy) => {
590
+ var _a;
591
+ const acceptedTermsOfService = await acceptTermsOfService2({
592
+ acceptedBy: signedBy.acceptedBy,
593
+ legalEntityReference: legalEntityId2,
594
+ termsOfServiceDocumentId
595
+ });
596
+ const paramAllowList = {
597
+ type: acceptedTermsOfService.type,
598
+ acceptedBy: acceptedTermsOfService.acceptedBy,
599
+ id: acceptedTermsOfService.id,
600
+ language: acceptedTermsOfService.language,
601
+ termsOfServiceDocumentId: acceptedTermsOfService.termsOfServiceDocumentId
602
+ };
603
+ const { acceptedTermsOfServices } = stepsData;
604
+ acceptedTermsOfServices.push(paramAllowList);
605
+ const unAcceptedTos = ((_a = serviceAgreementStatus == null ? void 0 : serviceAgreementStatus.termsOfServiceTypes) == null ? void 0 : _a.filter(
606
+ (tosType) => tosType !== acceptedTermsOfService.type
607
+ )) ?? [];
608
+ const newStepsData = {
609
+ unAcceptedTermsOfServiceTypes: unAcceptedTos,
610
+ acceptedTermsOfServices
611
+ };
612
+ setStepsData(newStepsData);
613
+ onAccept == null ? void 0 : onAccept(newStepsData);
614
+ },
615
+ [onAccept, stepsData, acceptTermsOfService2, serviceAgreementStatus == null ? void 0 : serviceAgreementStatus.termsOfServiceTypes]
616
+ );
617
+ return isStatusLoading || isAcceptanceInfoLoading || !legalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
618
+ ServiceAgreementDropin,
619
+ {
620
+ taskType: TaskTypes.SERVICE_AGREEMENT,
621
+ legalEntityResponse: legalEntity,
622
+ serviceAgreementTypes: (serviceAgreementStatus == null ? void 0 : serviceAgreementStatus.termsOfServiceTypes) ?? [],
623
+ serviceAgreementAcceptanceInfos: (serviceAgreementAcceptanceInfos == null ? void 0 : serviceAgreementAcceptanceInfos.data) ?? [],
624
+ handleHomeClick: handleOnClose,
625
+ handleSign,
626
+ asEmbedded,
627
+ asModal: modalView,
628
+ handleCloseClick: handleOnClose,
629
+ handleAddSigner
630
+ }
631
+ );
632
+ }
633
+ export {
634
+ AcceptTermsOfServiceComponent
635
+ };
@@ -2,14 +2,14 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9e35e36d-c14d-47a8-97aa-d7375b3fafea", e._sentryDebugIdIdentifier = "sentry-dbid-9e35e36d-c14d-47a8-97aa-d7375b3fafea");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "143ef54c-d879-403e-9a21-7b3df7c75d6b", e._sentryDebugIdIdentifier = "sentry-dbid-143ef54c-d879-403e-9a21-7b3df7c75d6b");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsxs, jsx } from "preact/jsx-runtime";
11
- import { b as useI18nContext, bd as AlertIcon, aK as FormHeader } from "./EventEmitter-BmWcyurq.js";
12
- import { D as DropinLayout } from "./index-D6YGuPb5.js";
11
+ import { b as useI18nContext, A as AlertIcon, F as FormHeader } from "./StoreProvider-BvP9cxL2.js";
12
+ import { D as DropinLayout } from "./OnboardingDropinComponent-Bxh1PgLV.js";
13
13
  function AccountSetupRejected() {
14
14
  const { i18n } = useI18nContext();
15
15
  const content = /* @__PURE__ */ jsxs("div", { children: [