@gusto/embedded-react-sdk 0.52.0 → 0.52.2
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.
- package/CHANGELOG.md +32 -0
- package/dist/components/Base/Base.d.ts +2 -0
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +4 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +1 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -2
- package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +3 -2
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +3 -3
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +2 -2
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +2 -2
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -2
- package/dist/components/Common/UI/Table/TableTypes.d.ts +4 -4
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +2 -2
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +0 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +12 -14
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +83 -75
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.d.ts +2 -1
- package/dist/components/Contractor/ContractorList/index.js +112 -99
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +170 -123
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.module.scss.js +12 -0
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.module.scss.js.map +1 -0
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js +44 -43
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js +91 -88
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +0 -33
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js +77 -86
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +2 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +150 -80
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.test.d.ts +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +1 -1
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +19 -18
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.d.ts +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js +121 -111
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +27 -26
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
- package/dist/components/Contractor/Submit/Submit.js +127 -67
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/shared/useContractorHasSignedW9.d.ts +8 -0
- package/dist/components/Contractor/shared/useContractorHasSignedW9.js +10 -0
- package/dist/components/Contractor/shared/useContractorHasSignedW9.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.d.ts +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.d.ts +1 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +2 -2
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -1
- package/dist/components/index.d.ts +40 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProvider.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/types.d.ts +2 -2
- package/dist/i18n/en/Contractor.Address.json.js +22 -20
- package/dist/i18n/en/Contractor.Address.json.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorList.json.js +22 -20
- package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Profile.json.js +13 -11
- package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
- package/dist/i18n/en/Contractor.SignatureForm.json.js +5 -5
- package/dist/i18n/en/Contractor.Submit.json.js +11 -11
- package/dist/i18n/types.d.ts +29 -9
- package/dist/index.d.ts +6 -3
- package/dist/models/WA_RISK_CODES.d.ts +1 -0
- package/dist/models/WA_RISK_CODES.js.map +1 -1
- package/dist/partner-hook-utils/composeErrorHandler.d.ts +4 -0
- package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/SDKFormProvider.d.ts +1 -0
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +4 -0
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.d.ts +1 -0
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/types.d.ts +9 -0
- package/dist/shared/constants.d.ts +10 -0
- package/dist/shared/constants.js +7 -6
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +2 -0
- package/dist/types/hooks.d.ts +1 -0
- package/dist/types/observability.d.ts +1 -0
- package/docs/guides/endpoint-inventory.json +17 -28
- package/package.json +16 -16
|
@@ -1,87 +1,88 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b } from "react";
|
|
3
|
+
import { useTranslation as g, Trans as y } from "react-i18next";
|
|
4
|
+
import { useContractorSignatureForm as T } from "./useContractorSignatureForm/useContractorSignatureForm.js";
|
|
5
|
+
import C from "./SignatureForm.module.scss.js";
|
|
6
|
+
import { useComponentDictionary as F, useI18n as I } from "../../../../i18n/I18n.js";
|
|
7
|
+
import { BaseComponent as D, BaseLayout as _ } from "../../../Base/Base.js";
|
|
8
|
+
import { useBase as A } from "../../../Base/useBase.js";
|
|
7
9
|
import { Flex as l } from "../../../Common/Flex/Flex.js";
|
|
8
|
-
import { ActionsLayout as
|
|
9
|
-
import { useComponentContext as
|
|
10
|
-
import "
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return /* @__PURE__ */ e(T, { ...o, children: /* @__PURE__ */ e(N, { ...o }) });
|
|
10
|
+
import { ActionsLayout as M } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
11
|
+
import { useComponentContext as h } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import { Form as R } from "../../../Common/Form/Form.js";
|
|
13
|
+
import { SDKFormProvider as L } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
14
|
+
import { contractorEvents as N, componentEvents as H } from "../../../../shared/constants.js";
|
|
15
|
+
const k = "https://www.irs.gov/forms-pubs/about-form-w-9";
|
|
16
|
+
function ee(n) {
|
|
17
|
+
return /* @__PURE__ */ e(D, { ...n, children: /* @__PURE__ */ e(P, { ...n }) });
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
F("Contractor.SignatureForm", i),
|
|
20
|
-
const { t:
|
|
21
|
-
if (
|
|
22
|
-
return /* @__PURE__ */ e(
|
|
23
|
-
const { document:
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
},
|
|
19
|
+
function P({ documentUuid: n, dictionary: i }) {
|
|
20
|
+
F("Contractor.SignatureForm", i), I("Contractor.SignatureForm");
|
|
21
|
+
const { t: a } = g("Contractor.SignatureForm"), { onEvent: t } = A(), s = h(), c = T({ documentUuid: n });
|
|
22
|
+
if (c.isLoading)
|
|
23
|
+
return /* @__PURE__ */ e(_, { isLoading: !0, error: c.errorHandling.errors });
|
|
24
|
+
const { document: p, pdfUrl: u, hasFields: f } = c.data, { isPending: m } = c.status, { Agree: o } = c.form.Fields, d = async () => {
|
|
25
|
+
const x = await c.actions.onSubmit();
|
|
26
|
+
x && t(N.CONTRACTOR_SIGN_DOCUMENT, x.data);
|
|
27
|
+
}, S = () => {
|
|
27
28
|
t(H.CANCEL);
|
|
28
29
|
};
|
|
29
|
-
return /* @__PURE__ */ e(
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
|
|
30
|
+
return /* @__PURE__ */ e(_, { error: c.errorHandling.errors, children: /* @__PURE__ */ e(L, { formHookResult: c, children: /* @__PURE__ */ e(R, { onSubmit: d, children: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 32, alignItems: "stretch", children: [
|
|
31
|
+
/* @__PURE__ */ r(l, { flexDirection: "column", gap: 4, children: [
|
|
32
|
+
/* @__PURE__ */ e(s.Heading, { as: "h2", children: p.title ?? a("signatureRequired") }),
|
|
33
|
+
/* @__PURE__ */ e(s.Text, { variant: "supporting", children: /* @__PURE__ */ e(
|
|
34
|
+
s.Link,
|
|
34
35
|
{
|
|
35
|
-
href:
|
|
36
|
+
href: k,
|
|
36
37
|
target: "_blank",
|
|
37
38
|
rel: "noopener noreferrer",
|
|
38
|
-
children:
|
|
39
|
+
children: a("instructions")
|
|
39
40
|
}
|
|
40
41
|
) }),
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
u && /* @__PURE__ */ e(s.Text, { variant: "supporting", children: /* @__PURE__ */ e(
|
|
43
|
+
y,
|
|
43
44
|
{
|
|
44
|
-
t:
|
|
45
|
+
t: a,
|
|
45
46
|
i18nKey: "downloadPrompt",
|
|
46
47
|
components: {
|
|
47
48
|
downloadLink: /* @__PURE__ */ e(
|
|
48
|
-
|
|
49
|
+
s.Link,
|
|
49
50
|
{
|
|
50
|
-
href:
|
|
51
|
+
href: u,
|
|
51
52
|
target: "_blank",
|
|
52
53
|
rel: "noopener noreferrer",
|
|
53
|
-
download: `${
|
|
54
|
+
download: `${p.title || "document"}.pdf`
|
|
54
55
|
}
|
|
55
56
|
)
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
) })
|
|
59
60
|
] }),
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
f ? /* @__PURE__ */ e(B, { hookResult: c }) : /* @__PURE__ */ e(
|
|
62
|
+
o,
|
|
62
63
|
{
|
|
63
|
-
label:
|
|
64
|
-
validationMessages: { AGREE_REQUIRED:
|
|
64
|
+
label: a("agreeLabel"),
|
|
65
|
+
validationMessages: { AGREE_REQUIRED: a("validation.agreeRequired") }
|
|
65
66
|
}
|
|
66
67
|
),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ r(M, { children: [
|
|
69
|
+
/* @__PURE__ */ e(s.Button, { variant: "secondary", type: "button", onClick: S, children: a("backCta") }),
|
|
70
|
+
/* @__PURE__ */ e(s.Button, { type: "submit", isDisabled: m, children: a(f ? m ? "signingCta" : "signCta" : m ? "acknowledgingCta" : "acknowledgeCta") })
|
|
70
71
|
] })
|
|
71
72
|
] }) }) }) });
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
-
const { t: i } =
|
|
74
|
+
function B({ hookResult: n }) {
|
|
75
|
+
const { t: i } = g("Contractor.SignatureForm"), a = h(), { Fields: t, fieldsMetadata: s } = n.form, c = O(), [p, u] = b(!s.ssn.hasRedactedValue), [f, m] = b(!s.ein.hasRedactedValue), o = {
|
|
75
76
|
REQUIRED: i("validation.required")
|
|
76
77
|
};
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */ e(
|
|
78
|
+
return /* @__PURE__ */ r(E, { children: [
|
|
79
|
+
/* @__PURE__ */ e(a.Box, { children: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 16, children: [
|
|
79
80
|
t.Name && /* @__PURE__ */ e(
|
|
80
81
|
t.Name,
|
|
81
82
|
{
|
|
82
83
|
label: i("fields.name.label"),
|
|
83
84
|
description: i("fields.name.description"),
|
|
84
|
-
validationMessages:
|
|
85
|
+
validationMessages: o
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
88
|
t.BusinessName && /* @__PURE__ */ e(
|
|
@@ -89,7 +90,7 @@ function P({ hookResult: o }) {
|
|
|
89
90
|
{
|
|
90
91
|
label: i("fields.business_name.label"),
|
|
91
92
|
description: i("fields.business_name.description"),
|
|
92
|
-
validationMessages:
|
|
93
|
+
validationMessages: o
|
|
93
94
|
}
|
|
94
95
|
),
|
|
95
96
|
t.TaxClassification && /* @__PURE__ */ e(
|
|
@@ -97,8 +98,8 @@ function P({ hookResult: o }) {
|
|
|
97
98
|
{
|
|
98
99
|
label: i("fields.taxClassification.label"),
|
|
99
100
|
description: i("fields.taxClassification.description"),
|
|
100
|
-
validationMessages:
|
|
101
|
-
getOptionLabel: (d) =>
|
|
101
|
+
validationMessages: o,
|
|
102
|
+
getOptionLabel: (d) => c.taxClassificationOptions[d] ?? d
|
|
102
103
|
}
|
|
103
104
|
),
|
|
104
105
|
t.LlcClassificationCode && /* @__PURE__ */ e(
|
|
@@ -106,16 +107,16 @@ function P({ hookResult: o }) {
|
|
|
106
107
|
{
|
|
107
108
|
label: i("fields.llcClassificationCode.label"),
|
|
108
109
|
description: i("fields.llcClassificationCode.description"),
|
|
109
|
-
validationMessages:
|
|
110
|
-
placeholder:
|
|
111
|
-
getOptionLabel: (d) =>
|
|
110
|
+
validationMessages: o,
|
|
111
|
+
placeholder: c.llcPlaceholder,
|
|
112
|
+
getOptionLabel: (d) => c.llcClassificationOptions[d] ?? d
|
|
112
113
|
}
|
|
113
114
|
),
|
|
114
115
|
t.OtherText && /* @__PURE__ */ e(
|
|
115
116
|
t.OtherText,
|
|
116
117
|
{
|
|
117
118
|
label: i("fields.other_text.label"),
|
|
118
|
-
validationMessages:
|
|
119
|
+
validationMessages: o
|
|
119
120
|
}
|
|
120
121
|
),
|
|
121
122
|
t.ForeignPartners && /* @__PURE__ */ e(
|
|
@@ -127,18 +128,18 @@ function P({ hookResult: o }) {
|
|
|
127
128
|
)
|
|
128
129
|
] }) }),
|
|
129
130
|
(t.ExemptPayeeCode || t.ExemptionFromFatca) && /* @__PURE__ */ e(
|
|
130
|
-
|
|
131
|
+
a.Box,
|
|
131
132
|
{
|
|
132
|
-
header: /* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */ e(
|
|
134
|
-
/* @__PURE__ */ e(
|
|
133
|
+
header: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 2, children: [
|
|
134
|
+
/* @__PURE__ */ e(a.Heading, { as: "h3", children: i("sections.exemptions") }),
|
|
135
|
+
/* @__PURE__ */ e(a.Text, { variant: "supporting", children: i("sectionInstructions.exemptions") })
|
|
135
136
|
] }),
|
|
136
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 16, children: [
|
|
137
138
|
t.ExemptPayeeCode && /* @__PURE__ */ e(
|
|
138
139
|
t.ExemptPayeeCode,
|
|
139
140
|
{
|
|
140
141
|
label: i("fields.exempt_payee_code.label"),
|
|
141
|
-
validationMessages:
|
|
142
|
+
validationMessages: o
|
|
142
143
|
}
|
|
143
144
|
),
|
|
144
145
|
t.ExemptionFromFatca && /* @__PURE__ */ e(
|
|
@@ -146,123 +147,141 @@ function P({ hookResult: o }) {
|
|
|
146
147
|
{
|
|
147
148
|
label: i("fields.exemption_from_FATCA.label"),
|
|
148
149
|
description: i("fields.exemption_from_FATCA.description"),
|
|
149
|
-
validationMessages:
|
|
150
|
+
validationMessages: o
|
|
150
151
|
}
|
|
151
152
|
)
|
|
152
153
|
] })
|
|
153
154
|
}
|
|
154
155
|
),
|
|
155
156
|
/* @__PURE__ */ e(
|
|
156
|
-
|
|
157
|
+
a.Box,
|
|
157
158
|
{
|
|
158
|
-
header: /* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
/* @__PURE__ */ e(
|
|
159
|
+
header: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 2, children: [
|
|
160
|
+
/* @__PURE__ */ e(a.Heading, { as: "h3", children: i("sections.address") }),
|
|
161
|
+
/* @__PURE__ */ e(a.Text, { variant: "supporting", children: i("sectionInstructions.address") })
|
|
161
162
|
] }),
|
|
162
|
-
children: /* @__PURE__ */
|
|
163
|
+
children: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 16, children: [
|
|
163
164
|
t.HomeAddressStreet1 && /* @__PURE__ */ e(
|
|
164
165
|
t.HomeAddressStreet1,
|
|
165
166
|
{
|
|
166
167
|
label: i("fields.home_address_street_1.label"),
|
|
167
|
-
validationMessages:
|
|
168
|
+
validationMessages: o
|
|
168
169
|
}
|
|
169
170
|
),
|
|
170
171
|
t.HomeAddressStreet2 && /* @__PURE__ */ e(
|
|
171
172
|
t.HomeAddressStreet2,
|
|
172
173
|
{
|
|
173
174
|
label: i("fields.home_address_street_2.label"),
|
|
174
|
-
validationMessages:
|
|
175
|
+
validationMessages: o
|
|
175
176
|
}
|
|
176
177
|
),
|
|
177
178
|
t.HomeAddressCity && /* @__PURE__ */ e(
|
|
178
179
|
t.HomeAddressCity,
|
|
179
180
|
{
|
|
180
181
|
label: i("fields.home_address_city.label"),
|
|
181
|
-
validationMessages:
|
|
182
|
+
validationMessages: o
|
|
182
183
|
}
|
|
183
184
|
),
|
|
184
185
|
t.HomeAddressState && /* @__PURE__ */ e(
|
|
185
186
|
t.HomeAddressState,
|
|
186
187
|
{
|
|
187
188
|
label: i("fields.home_address_state.label"),
|
|
188
|
-
validationMessages:
|
|
189
|
+
validationMessages: o
|
|
189
190
|
}
|
|
190
191
|
),
|
|
191
192
|
t.HomeAddressZip && /* @__PURE__ */ e(
|
|
192
193
|
t.HomeAddressZip,
|
|
193
194
|
{
|
|
194
195
|
label: i("fields.home_address_zip.label"),
|
|
195
|
-
validationMessages:
|
|
196
|
+
validationMessages: o
|
|
196
197
|
}
|
|
197
198
|
),
|
|
198
199
|
t.AccountNumber && /* @__PURE__ */ e(
|
|
199
200
|
t.AccountNumber,
|
|
200
201
|
{
|
|
201
202
|
label: i("fields.account_number.label"),
|
|
202
|
-
validationMessages:
|
|
203
|
+
validationMessages: o
|
|
203
204
|
}
|
|
204
205
|
),
|
|
205
206
|
t.CompanyName && /* @__PURE__ */ e(
|
|
206
207
|
t.CompanyName,
|
|
207
208
|
{
|
|
208
209
|
label: i("fields.company_name.label"),
|
|
209
|
-
validationMessages:
|
|
210
|
+
validationMessages: o
|
|
210
211
|
}
|
|
211
212
|
)
|
|
212
213
|
] })
|
|
213
214
|
}
|
|
214
215
|
),
|
|
215
216
|
(t.Ssn || t.Ein) && /* @__PURE__ */ e(
|
|
216
|
-
|
|
217
|
+
a.Box,
|
|
217
218
|
{
|
|
218
|
-
header: /* @__PURE__ */
|
|
219
|
-
/* @__PURE__ */ e(
|
|
220
|
-
/* @__PURE__ */
|
|
219
|
+
header: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 2, children: [
|
|
220
|
+
/* @__PURE__ */ e(a.Heading, { as: "h3", children: i("sections.tin") }),
|
|
221
|
+
/* @__PURE__ */ r(a.Text, { variant: "supporting", children: [
|
|
221
222
|
i("sectionInstructions.tin"),
|
|
222
223
|
" ",
|
|
223
224
|
i("sectionInstructions.tinSecondary")
|
|
224
225
|
] })
|
|
225
226
|
] }),
|
|
226
|
-
children: /* @__PURE__ */
|
|
227
|
-
t.Ssn && /* @__PURE__ */ e(
|
|
227
|
+
children: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 16, children: [
|
|
228
|
+
t.Ssn && (s.ssn.hasRedactedValue && !p ? /* @__PURE__ */ e(
|
|
229
|
+
v,
|
|
230
|
+
{
|
|
231
|
+
label: i("fields.ssn.label"),
|
|
232
|
+
maskedValue: s.ssn.placeholder ?? "",
|
|
233
|
+
changeLabel: i("fields.ssn.changeCta"),
|
|
234
|
+
onChange: () => {
|
|
235
|
+
u(!0);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
) : /* @__PURE__ */ e(
|
|
228
239
|
t.Ssn,
|
|
229
240
|
{
|
|
230
241
|
label: i("fields.ssn.label"),
|
|
231
242
|
validationMessages: {
|
|
232
|
-
...
|
|
243
|
+
...o,
|
|
233
244
|
INVALID_SSN: i("validation.invalidSsn")
|
|
234
|
-
}
|
|
235
|
-
placeholder: c.ssn.placeholder
|
|
245
|
+
}
|
|
236
246
|
}
|
|
237
|
-
),
|
|
238
|
-
t.Ein && /* @__PURE__ */ e(
|
|
247
|
+
)),
|
|
248
|
+
t.Ein && (s.ein.hasRedactedValue && !f ? /* @__PURE__ */ e(
|
|
249
|
+
v,
|
|
250
|
+
{
|
|
251
|
+
label: i("fields.ein.label"),
|
|
252
|
+
maskedValue: s.ein.placeholder ?? "",
|
|
253
|
+
changeLabel: i("fields.ein.changeCta"),
|
|
254
|
+
onChange: () => {
|
|
255
|
+
m(!0);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
) : /* @__PURE__ */ e(
|
|
239
259
|
t.Ein,
|
|
240
260
|
{
|
|
241
261
|
label: i("fields.ein.label"),
|
|
242
262
|
validationMessages: {
|
|
243
|
-
...
|
|
263
|
+
...o,
|
|
244
264
|
INVALID_EIN: i("validation.invalidEin")
|
|
245
|
-
}
|
|
246
|
-
placeholder: c.ein.placeholder
|
|
265
|
+
}
|
|
247
266
|
}
|
|
248
|
-
)
|
|
267
|
+
))
|
|
249
268
|
] })
|
|
250
269
|
}
|
|
251
270
|
),
|
|
252
271
|
/* @__PURE__ */ e(
|
|
253
|
-
|
|
272
|
+
a.Box,
|
|
254
273
|
{
|
|
255
|
-
header: /* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */ e(
|
|
257
|
-
/* @__PURE__ */ e(
|
|
274
|
+
header: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 2, children: [
|
|
275
|
+
/* @__PURE__ */ e(a.Heading, { as: "h3", children: i("sections.certification") }),
|
|
276
|
+
/* @__PURE__ */ e(a.Text, { variant: "supporting", children: i("sectionInstructions.certification") })
|
|
258
277
|
] }),
|
|
259
|
-
children: /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */ e(
|
|
278
|
+
children: /* @__PURE__ */ r(l, { flexDirection: "column", gap: 16, children: [
|
|
279
|
+
/* @__PURE__ */ e(w, {}),
|
|
261
280
|
t.SignatureText && /* @__PURE__ */ e(
|
|
262
281
|
t.SignatureText,
|
|
263
282
|
{
|
|
264
283
|
label: i("fields.signature_text.label"),
|
|
265
|
-
validationMessages:
|
|
284
|
+
validationMessages: o
|
|
266
285
|
}
|
|
267
286
|
),
|
|
268
287
|
/* @__PURE__ */ e(
|
|
@@ -277,47 +296,75 @@ function P({ hookResult: o }) {
|
|
|
277
296
|
)
|
|
278
297
|
] });
|
|
279
298
|
}
|
|
280
|
-
function
|
|
281
|
-
const { t:
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */ e(i.Text, { weight: "medium", children:
|
|
284
|
-
/* @__PURE__ */
|
|
299
|
+
function w() {
|
|
300
|
+
const { t: n } = g("Contractor.SignatureForm"), i = h();
|
|
301
|
+
return /* @__PURE__ */ r(l, { flexDirection: "column", gap: 8, children: [
|
|
302
|
+
/* @__PURE__ */ e(i.Text, { weight: "medium", children: n("certificationIntro") }),
|
|
303
|
+
/* @__PURE__ */ r(l, { flexDirection: "column", gap: 16, children: [
|
|
285
304
|
/* @__PURE__ */ e(
|
|
286
305
|
i.OrderedList,
|
|
287
306
|
{
|
|
288
307
|
items: [
|
|
289
|
-
/* @__PURE__ */ e(i.Text, { children:
|
|
290
|
-
/* @__PURE__ */ e(i.Text, { children:
|
|
291
|
-
/* @__PURE__ */ e(i.Text, { children:
|
|
292
|
-
/* @__PURE__ */ e(i.Text, { children:
|
|
308
|
+
/* @__PURE__ */ e(i.Text, { children: n("certificationPoints.taxpayerId") }, "taxpayerId"),
|
|
309
|
+
/* @__PURE__ */ e(i.Text, { children: n("certificationPoints.backupWithholding") }, "backupWithholding"),
|
|
310
|
+
/* @__PURE__ */ e(i.Text, { children: n("certificationPoints.usPerson") }, "usPerson"),
|
|
311
|
+
/* @__PURE__ */ e(i.Text, { children: n("certificationPoints.fatca") }, "fatca")
|
|
293
312
|
]
|
|
294
313
|
}
|
|
295
314
|
),
|
|
296
|
-
/* @__PURE__ */ e(i.Text, { variant: "supporting", size: "sm", children:
|
|
315
|
+
/* @__PURE__ */ e(i.Text, { variant: "supporting", size: "sm", children: n("certificationPoints.usPersonDefinition") })
|
|
316
|
+
] })
|
|
317
|
+
] });
|
|
318
|
+
}
|
|
319
|
+
function v({ label: n, maskedValue: i, changeLabel: a, onChange: t }) {
|
|
320
|
+
const s = h();
|
|
321
|
+
return /* @__PURE__ */ r(l, { flexDirection: "column", gap: 4, alignItems: "stretch", children: [
|
|
322
|
+
/* @__PURE__ */ e(s.Text, { weight: "medium", size: "sm", children: n }),
|
|
323
|
+
/* @__PURE__ */ r("div", { className: C.tinRow, children: [
|
|
324
|
+
/* @__PURE__ */ e("div", { className: C.tinInput, children: /* @__PURE__ */ e(
|
|
325
|
+
s.TextInput,
|
|
326
|
+
{
|
|
327
|
+
name: "",
|
|
328
|
+
label: n,
|
|
329
|
+
shouldVisuallyHideLabel: !0,
|
|
330
|
+
value: i,
|
|
331
|
+
isDisabled: !0
|
|
332
|
+
}
|
|
333
|
+
) }),
|
|
334
|
+
/* @__PURE__ */ e(
|
|
335
|
+
s.Button,
|
|
336
|
+
{
|
|
337
|
+
variant: "secondary",
|
|
338
|
+
type: "button",
|
|
339
|
+
className: C.tinButton,
|
|
340
|
+
onClick: t,
|
|
341
|
+
children: a
|
|
342
|
+
}
|
|
343
|
+
)
|
|
297
344
|
] })
|
|
298
345
|
] });
|
|
299
346
|
}
|
|
300
|
-
function
|
|
301
|
-
const { t:
|
|
302
|
-
individual_proprietor:
|
|
303
|
-
c_corporation:
|
|
304
|
-
s_corporation:
|
|
305
|
-
partnership:
|
|
306
|
-
trust_estate:
|
|
307
|
-
limited_liability_company:
|
|
308
|
-
other:
|
|
309
|
-
},
|
|
310
|
-
c:
|
|
311
|
-
s:
|
|
312
|
-
p:
|
|
347
|
+
function O() {
|
|
348
|
+
const { t: n } = g("Contractor.SignatureForm"), i = {
|
|
349
|
+
individual_proprietor: n("options.taxClassification.individual_proprietor"),
|
|
350
|
+
c_corporation: n("options.taxClassification.c_corporation"),
|
|
351
|
+
s_corporation: n("options.taxClassification.s_corporation"),
|
|
352
|
+
partnership: n("options.taxClassification.partnership"),
|
|
353
|
+
trust_estate: n("options.taxClassification.trust_estate"),
|
|
354
|
+
limited_liability_company: n("options.taxClassification.limited_liability_company"),
|
|
355
|
+
other: n("options.taxClassification.other")
|
|
356
|
+
}, a = {
|
|
357
|
+
c: n("options.llcClassificationCode.c"),
|
|
358
|
+
s: n("options.llcClassificationCode.s"),
|
|
359
|
+
p: n("options.llcClassificationCode.p")
|
|
313
360
|
};
|
|
314
361
|
return {
|
|
315
362
|
taxClassificationOptions: i,
|
|
316
|
-
llcClassificationOptions:
|
|
317
|
-
llcPlaceholder:
|
|
363
|
+
llcClassificationOptions: a,
|
|
364
|
+
llcPlaceholder: n("options.llcClassificationCode.placeholder")
|
|
318
365
|
};
|
|
319
366
|
}
|
|
320
367
|
export {
|
|
321
|
-
|
|
368
|
+
ee as SignatureForm
|
|
322
369
|
};
|
|
323
370
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Contractor/Documents/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport {\n useContractorSignatureForm,\n type UseContractorSignatureFormReady,\n} from './useContractorSignatureForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent, BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { Form as FormLayout } from '@/components/Common/Form'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { contractorEvents, componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** IRS instructions page for completing Form W-9. */\nconst W9_INSTRUCTIONS_URL = 'https://www.irs.gov/forms-pubs/about-form-w-9'\n\n/**\n * Props for {@link SignatureForm}.\n *\n * @public\n */\nexport interface SignatureFormProps extends BaseComponentInterface<'Contractor.SignatureForm'> {\n /** The UUID of the contractor document to sign. */\n documentUuid: string\n /** The associated contractor identifier. */\n contractorId: string\n}\n\n/**\n * Standalone form for signing an individual contractor document (W-9).\n *\n * @remarks\n * Lower-level building block used internally by `ContractorDocumentSigner` for\n * its signing view. Use this component directly when you need full control over\n * navigation between the document list and the signature form.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/documents/sign` | Fired when the document is successfully signed | The signed document |\n * | `CANCEL` | Fired when the user navigates back from the signature form | — |\n *\n * @param props - See {@link SignatureFormProps}.\n * @returns The rendered signature form.\n * @public\n */\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ documentUuid, dictionary }: SignatureFormProps) {\n useComponentDictionary('Contractor.SignatureForm', dictionary)\n useI18n('Contractor.SignatureForm')\n const { t } = useTranslation('Contractor.SignatureForm')\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const hookResult = useContractorSignatureForm({ documentUuid })\n\n if (hookResult.isLoading) {\n return <BaseLayout isLoading error={hookResult.errorHandling.errors} />\n }\n\n const { document, pdfUrl, hasFields } = hookResult.data\n const { isPending } = hookResult.status\n const { Agree } = hookResult.form.Fields\n\n const handleFormSubmit = async () => {\n const result = await hookResult.actions.onSubmit()\n if (result) {\n onEvent(contractorEvents.CONTRACTOR_SIGN_DOCUMENT, result.data)\n }\n }\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <BaseLayout error={hookResult.errorHandling.errors}>\n <SDKFormProvider formHookResult={hookResult}>\n <FormLayout onSubmit={handleFormSubmit}>\n <Flex flexDirection=\"column\" gap={32} alignItems=\"stretch\">\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {document.title ?? t('signatureRequired')}\n </Components.Heading>\n <Components.Text variant=\"supporting\">\n <Components.Link\n href={W9_INSTRUCTIONS_URL}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {t('instructions')}\n </Components.Link>\n </Components.Text>\n {pdfUrl && (\n <Components.Text variant=\"supporting\">\n <Trans\n t={t}\n i18nKey=\"downloadPrompt\"\n components={{\n downloadLink: (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${document.title || 'document'}.pdf`}\n />\n ),\n }}\n />\n </Components.Text>\n )}\n </Flex>\n\n {hasFields ? (\n <W9Fields hookResult={hookResult} />\n ) : (\n <Agree\n label={t('agreeLabel')}\n validationMessages={{ AGREE_REQUIRED: t('validation.agreeRequired') }}\n />\n )}\n\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleBack}>\n {t('backCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isDisabled={isPending}>\n {hasFields\n ? isPending\n ? t('signingCta')\n : t('signCta')\n : isPending\n ? t('acknowledgingCta')\n : t('acknowledgeCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </FormLayout>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n\ninterface W9FieldsProps {\n hookResult: UseContractorSignatureFormReady\n}\n\nfunction W9Fields({ hookResult }: W9FieldsProps) {\n const { t } = useTranslation('Contractor.SignatureForm')\n const Components = useComponentContext()\n const { Fields, fieldsMetadata } = hookResult.form\n const copy = useSignatureFormCopy()\n\n const requiredMessages = {\n REQUIRED: t('validation.required'),\n }\n\n return (\n <>\n {/* Classification */}\n <Components.Box>\n <Flex flexDirection=\"column\" gap={16}>\n {Fields.Name && (\n <Fields.Name\n label={t('fields.name.label')}\n description={t('fields.name.description')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.BusinessName && (\n <Fields.BusinessName\n label={t('fields.business_name.label')}\n description={t('fields.business_name.description')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.TaxClassification && (\n <Fields.TaxClassification\n label={t('fields.taxClassification.label')}\n description={t('fields.taxClassification.description')}\n validationMessages={requiredMessages}\n getOptionLabel={value => copy.taxClassificationOptions[value] ?? value}\n />\n )}\n {Fields.LlcClassificationCode && (\n <Fields.LlcClassificationCode\n label={t('fields.llcClassificationCode.label')}\n description={t('fields.llcClassificationCode.description')}\n validationMessages={requiredMessages}\n placeholder={copy.llcPlaceholder}\n getOptionLabel={value => copy.llcClassificationOptions[value] ?? value}\n />\n )}\n {Fields.OtherText && (\n <Fields.OtherText\n label={t('fields.other_text.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.ForeignPartners && (\n <Fields.ForeignPartners\n label={t('fields.foreign_partners.label')}\n description={t('fields.foreign_partners.description')}\n />\n )}\n </Flex>\n </Components.Box>\n\n {/* Exemptions */}\n {(Fields.ExemptPayeeCode || Fields.ExemptionFromFatca) && (\n <Components.Box\n header={\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h3\">{t('sections.exemptions')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('sectionInstructions.exemptions')}\n </Components.Text>\n </Flex>\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {Fields.ExemptPayeeCode && (\n <Fields.ExemptPayeeCode\n label={t('fields.exempt_payee_code.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.ExemptionFromFatca && (\n <Fields.ExemptionFromFatca\n label={t('fields.exemption_from_FATCA.label')}\n description={t('fields.exemption_from_FATCA.description')}\n validationMessages={requiredMessages}\n />\n )}\n </Flex>\n </Components.Box>\n )}\n\n {/* Address */}\n <Components.Box\n header={\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h3\">{t('sections.address')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('sectionInstructions.address')}\n </Components.Text>\n </Flex>\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {Fields.HomeAddressStreet1 && (\n <Fields.HomeAddressStreet1\n label={t('fields.home_address_street_1.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.HomeAddressStreet2 && (\n <Fields.HomeAddressStreet2\n label={t('fields.home_address_street_2.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.HomeAddressCity && (\n <Fields.HomeAddressCity\n label={t('fields.home_address_city.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.HomeAddressState && (\n <Fields.HomeAddressState\n label={t('fields.home_address_state.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.HomeAddressZip && (\n <Fields.HomeAddressZip\n label={t('fields.home_address_zip.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.AccountNumber && (\n <Fields.AccountNumber\n label={t('fields.account_number.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.CompanyName && (\n <Fields.CompanyName\n label={t('fields.company_name.label')}\n validationMessages={requiredMessages}\n />\n )}\n </Flex>\n </Components.Box>\n\n {/* Taxpayer Identification Number */}\n {(Fields.Ssn || Fields.Ein) && (\n <Components.Box\n header={\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h3\">{t('sections.tin')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('sectionInstructions.tin')} {t('sectionInstructions.tinSecondary')}\n </Components.Text>\n </Flex>\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {Fields.Ssn && (\n <Fields.Ssn\n label={t('fields.ssn.label')}\n validationMessages={{\n ...requiredMessages,\n INVALID_SSN: t('validation.invalidSsn'),\n }}\n placeholder={fieldsMetadata.ssn.placeholder}\n />\n )}\n {Fields.Ein && (\n <Fields.Ein\n label={t('fields.ein.label')}\n validationMessages={{\n ...requiredMessages,\n INVALID_EIN: t('validation.invalidEin'),\n }}\n placeholder={fieldsMetadata.ein.placeholder}\n />\n )}\n </Flex>\n </Components.Box>\n )}\n\n {/* Certification */}\n <Components.Box\n header={\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h3\">{t('sections.certification')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('sectionInstructions.certification')}\n </Components.Text>\n </Flex>\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n <CertificationDeclaration />\n {Fields.SignatureText && (\n <Fields.SignatureText\n label={t('fields.signature_text.label')}\n validationMessages={requiredMessages}\n />\n )}\n <Fields.Agree\n label={t('agreeLabel')}\n validationMessages={{ AGREE_REQUIRED: t('validation.agreeRequired') }}\n />\n </Flex>\n </Components.Box>\n </>\n )\n}\n\nfunction CertificationDeclaration() {\n const { t } = useTranslation('Contractor.SignatureForm')\n const Components = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Text weight=\"medium\">{t('certificationIntro')}</Components.Text>\n <Flex flexDirection=\"column\" gap={16}>\n <Components.OrderedList\n items={[\n <Components.Text key=\"taxpayerId\">\n {t('certificationPoints.taxpayerId')}\n </Components.Text>,\n <Components.Text key=\"backupWithholding\">\n {t('certificationPoints.backupWithholding')}\n </Components.Text>,\n <Components.Text key=\"usPerson\">{t('certificationPoints.usPerson')}</Components.Text>,\n <Components.Text key=\"fatca\">{t('certificationPoints.fatca')}</Components.Text>,\n ]}\n />\n <Components.Text variant=\"supporting\" size=\"sm\">\n {t('certificationPoints.usPersonDefinition')}\n </Components.Text>\n </Flex>\n </Flex>\n )\n}\n\n/**\n * Resolves the W-9 classification option copy into lookup maps keyed by option\n * value. Each entry uses a static translation key so the typed `t` surface stays\n * sound.\n */\nfunction useSignatureFormCopy() {\n const { t } = useTranslation('Contractor.SignatureForm')\n\n const taxClassificationOptions: Record<string, string> = {\n individual_proprietor: t('options.taxClassification.individual_proprietor'),\n c_corporation: t('options.taxClassification.c_corporation'),\n s_corporation: t('options.taxClassification.s_corporation'),\n partnership: t('options.taxClassification.partnership'),\n trust_estate: t('options.taxClassification.trust_estate'),\n limited_liability_company: t('options.taxClassification.limited_liability_company'),\n other: t('options.taxClassification.other'),\n }\n\n const llcClassificationOptions: Record<string, string> = {\n c: t('options.llcClassificationCode.c'),\n s: t('options.llcClassificationCode.s'),\n p: t('options.llcClassificationCode.p'),\n }\n\n return {\n taxClassificationOptions,\n llcClassificationOptions,\n llcPlaceholder: t('options.llcClassificationCode.placeholder'),\n }\n}\n"],"names":["W9_INSTRUCTIONS_URL","SignatureForm","props","jsx","BaseComponent","Root","documentUuid","dictionary","useComponentDictionary","useI18n","t","useTranslation","onEvent","useBase","Components","useComponentContext","hookResult","useContractorSignatureForm","BaseLayout","document","pdfUrl","hasFields","isPending","Agree","handleFormSubmit","result","contractorEvents","handleBack","componentEvents","SDKFormProvider","FormLayout","jsxs","Flex","Trans","W9Fields","ActionsLayout","Fields","fieldsMetadata","copy","useSignatureFormCopy","requiredMessages","Fragment","value","CertificationDeclaration","taxClassificationOptions","llcClassificationOptions"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,IAAsB;AA+BrB,SAASC,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,cAAAC,GAAc,YAAAC,KAAkC;AAC9D,EAAAC,EAAuB,4BAA4BD,CAAU,GAC7DE,EAAQ,0BAA0B;AAClC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0BAA0B,GACjD,EAAE,SAAAC,EAA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AX,EAAgB,SAAQ,cAAa,MAAK,MACxC,UAAAJ,EAAE,wCAAwC,EAAA,CAC7C;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;AAOA,SAAS6B,IAAuB;AAC9B,QAAM,EAAE,GAAA7B,EAAA,IAAMC,EAAe,0BAA0B,GAEjDiC,IAAmD;AAAA,IACvD,uBAAuBlC,EAAE,iDAAiD;AAAA,IAC1E,eAAeA,EAAE,yCAAyC;AAAA,IAC1D,eAAeA,EAAE,yCAAyC;AAAA,IAC1D,aAAaA,EAAE,uCAAuC;AAAA,IACtD,cAAcA,EAAE,wCAAwC;AAAA,IACxD,2BAA2BA,EAAE,qDAAqD;AAAA,IAClF,OAAOA,EAAE,iCAAiC;AAAA,EAAA,GAGtCmC,IAAmD;AAAA,IACvD,GAAGnC,EAAE,iCAAiC;AAAA,IACtC,GAAGA,EAAE,iCAAiC;AAAA,IACtC,GAAGA,EAAE,iCAAiC;AAAA,EAAA;AAGxC,SAAO;AAAA,IACL,0BAAAkC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAgBnC,EAAE,2CAA2C;AAAA,EAAA;AAEjE;"}
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Contractor/Documents/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport {\n useContractorSignatureForm,\n type UseContractorSignatureFormReady,\n} from './useContractorSignatureForm'\nimport styles from './SignatureForm.module.scss'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent, BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { Form as FormLayout } from '@/components/Common/Form'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { contractorEvents, componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** IRS instructions page for completing Form W-9. */\nconst W9_INSTRUCTIONS_URL = 'https://www.irs.gov/forms-pubs/about-form-w-9'\n\n/**\n * Props for {@link SignatureForm}.\n *\n * @public\n */\nexport interface SignatureFormProps extends BaseComponentInterface<'Contractor.SignatureForm'> {\n /** The UUID of the contractor document to sign. */\n documentUuid: string\n /** The associated contractor identifier. */\n contractorId: string\n}\n\n/**\n * Standalone form for signing an individual contractor document (W-9).\n *\n * @remarks\n * Lower-level building block used internally by `ContractorDocumentSigner` for\n * its signing view. Use this component directly when you need full control over\n * navigation between the document list and the signature form.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/documents/sign` | Fired when the document is successfully signed | The signed document |\n * | `CANCEL` | Fired when the user navigates back from the signature form | — |\n *\n * @param props - See {@link SignatureFormProps}.\n * @returns The rendered signature form.\n * @public\n */\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ documentUuid, dictionary }: SignatureFormProps) {\n useComponentDictionary('Contractor.SignatureForm', dictionary)\n useI18n('Contractor.SignatureForm')\n const { t } = useTranslation('Contractor.SignatureForm')\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const hookResult = useContractorSignatureForm({ documentUuid })\n\n if (hookResult.isLoading) {\n return <BaseLayout isLoading error={hookResult.errorHandling.errors} />\n }\n\n const { document, pdfUrl, hasFields } = hookResult.data\n const { isPending } = hookResult.status\n const { Agree } = hookResult.form.Fields\n\n const handleFormSubmit = async () => {\n const result = await hookResult.actions.onSubmit()\n if (result) {\n onEvent(contractorEvents.CONTRACTOR_SIGN_DOCUMENT, result.data)\n }\n }\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <BaseLayout error={hookResult.errorHandling.errors}>\n <SDKFormProvider formHookResult={hookResult}>\n <FormLayout onSubmit={handleFormSubmit}>\n <Flex flexDirection=\"column\" gap={32} alignItems=\"stretch\">\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {document.title ?? t('signatureRequired')}\n </Components.Heading>\n <Components.Text variant=\"supporting\">\n <Components.Link\n href={W9_INSTRUCTIONS_URL}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {t('instructions')}\n </Components.Link>\n </Components.Text>\n {pdfUrl && (\n <Components.Text variant=\"supporting\">\n <Trans\n t={t}\n i18nKey=\"downloadPrompt\"\n components={{\n downloadLink: (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${document.title || 'document'}.pdf`}\n />\n ),\n }}\n />\n </Components.Text>\n )}\n </Flex>\n\n {hasFields ? (\n <W9Fields hookResult={hookResult} />\n ) : (\n <Agree\n label={t('agreeLabel')}\n validationMessages={{ AGREE_REQUIRED: t('validation.agreeRequired') }}\n />\n )}\n\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleBack}>\n {t('backCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isDisabled={isPending}>\n {hasFields\n ? isPending\n ? t('signingCta')\n : t('signCta')\n : isPending\n ? t('acknowledgingCta')\n : t('acknowledgeCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </FormLayout>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n\ninterface W9FieldsProps {\n hookResult: UseContractorSignatureFormReady\n}\n\nfunction W9Fields({ hookResult }: W9FieldsProps) {\n const { t } = useTranslation('Contractor.SignatureForm')\n const Components = useComponentContext()\n const { Fields, fieldsMetadata } = hookResult.form\n const copy = useSignatureFormCopy()\n\n // A TIN already on file is shown masked and locked until the signer opts to\n // replace it; nothing on file starts editable. Editing reveals the empty input\n // so an untouched value is omitted on submit and the server keeps the real TIN.\n const [isEditingSsn, setIsEditingSsn] = useState(!fieldsMetadata.ssn.hasRedactedValue)\n const [isEditingEin, setIsEditingEin] = useState(!fieldsMetadata.ein.hasRedactedValue)\n\n const requiredMessages = {\n REQUIRED: t('validation.required'),\n }\n\n return (\n <>\n {/* Classification */}\n <Components.Box>\n <Flex flexDirection=\"column\" gap={16}>\n {Fields.Name && (\n <Fields.Name\n label={t('fields.name.label')}\n description={t('fields.name.description')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.BusinessName && (\n <Fields.BusinessName\n label={t('fields.business_name.label')}\n description={t('fields.business_name.description')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.TaxClassification && (\n <Fields.TaxClassification\n label={t('fields.taxClassification.label')}\n description={t('fields.taxClassification.description')}\n validationMessages={requiredMessages}\n getOptionLabel={value => copy.taxClassificationOptions[value] ?? value}\n />\n )}\n {Fields.LlcClassificationCode && (\n <Fields.LlcClassificationCode\n label={t('fields.llcClassificationCode.label')}\n description={t('fields.llcClassificationCode.description')}\n validationMessages={requiredMessages}\n placeholder={copy.llcPlaceholder}\n getOptionLabel={value => copy.llcClassificationOptions[value] ?? value}\n />\n )}\n {Fields.OtherText && (\n <Fields.OtherText\n label={t('fields.other_text.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.ForeignPartners && (\n <Fields.ForeignPartners\n label={t('fields.foreign_partners.label')}\n description={t('fields.foreign_partners.description')}\n />\n )}\n </Flex>\n </Components.Box>\n\n {/* Exemptions */}\n {(Fields.ExemptPayeeCode || Fields.ExemptionFromFatca) && (\n <Components.Box\n header={\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h3\">{t('sections.exemptions')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('sectionInstructions.exemptions')}\n </Components.Text>\n </Flex>\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {Fields.ExemptPayeeCode && (\n <Fields.ExemptPayeeCode\n label={t('fields.exempt_payee_code.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.ExemptionFromFatca && (\n <Fields.ExemptionFromFatca\n label={t('fields.exemption_from_FATCA.label')}\n description={t('fields.exemption_from_FATCA.description')}\n validationMessages={requiredMessages}\n />\n )}\n </Flex>\n </Components.Box>\n )}\n\n {/* Address */}\n <Components.Box\n header={\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h3\">{t('sections.address')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('sectionInstructions.address')}\n </Components.Text>\n </Flex>\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {Fields.HomeAddressStreet1 && (\n <Fields.HomeAddressStreet1\n label={t('fields.home_address_street_1.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.HomeAddressStreet2 && (\n <Fields.HomeAddressStreet2\n label={t('fields.home_address_street_2.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.HomeAddressCity && (\n <Fields.HomeAddressCity\n label={t('fields.home_address_city.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.HomeAddressState && (\n <Fields.HomeAddressState\n label={t('fields.home_address_state.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.HomeAddressZip && (\n <Fields.HomeAddressZip\n label={t('fields.home_address_zip.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.AccountNumber && (\n <Fields.AccountNumber\n label={t('fields.account_number.label')}\n validationMessages={requiredMessages}\n />\n )}\n {Fields.CompanyName && (\n <Fields.CompanyName\n label={t('fields.company_name.label')}\n validationMessages={requiredMessages}\n />\n )}\n </Flex>\n </Components.Box>\n\n {/* Taxpayer Identification Number */}\n {(Fields.Ssn || Fields.Ein) && (\n <Components.Box\n header={\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h3\">{t('sections.tin')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('sectionInstructions.tin')} {t('sectionInstructions.tinSecondary')}\n </Components.Text>\n </Flex>\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {Fields.Ssn &&\n (fieldsMetadata.ssn.hasRedactedValue && !isEditingSsn ? (\n <MaskedTaxIdField\n label={t('fields.ssn.label')}\n maskedValue={fieldsMetadata.ssn.placeholder ?? ''}\n changeLabel={t('fields.ssn.changeCta')}\n onChange={() => {\n setIsEditingSsn(true)\n }}\n />\n ) : (\n <Fields.Ssn\n label={t('fields.ssn.label')}\n validationMessages={{\n ...requiredMessages,\n INVALID_SSN: t('validation.invalidSsn'),\n }}\n />\n ))}\n {Fields.Ein &&\n (fieldsMetadata.ein.hasRedactedValue && !isEditingEin ? (\n <MaskedTaxIdField\n label={t('fields.ein.label')}\n maskedValue={fieldsMetadata.ein.placeholder ?? ''}\n changeLabel={t('fields.ein.changeCta')}\n onChange={() => {\n setIsEditingEin(true)\n }}\n />\n ) : (\n <Fields.Ein\n label={t('fields.ein.label')}\n validationMessages={{\n ...requiredMessages,\n INVALID_EIN: t('validation.invalidEin'),\n }}\n />\n ))}\n </Flex>\n </Components.Box>\n )}\n\n {/* Certification */}\n <Components.Box\n header={\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h3\">{t('sections.certification')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('sectionInstructions.certification')}\n </Components.Text>\n </Flex>\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n <CertificationDeclaration />\n {Fields.SignatureText && (\n <Fields.SignatureText\n label={t('fields.signature_text.label')}\n validationMessages={requiredMessages}\n />\n )}\n <Fields.Agree\n label={t('agreeLabel')}\n validationMessages={{ AGREE_REQUIRED: t('validation.agreeRequired') }}\n />\n </Flex>\n </Components.Box>\n </>\n )\n}\n\nfunction CertificationDeclaration() {\n const { t } = useTranslation('Contractor.SignatureForm')\n const Components = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Text weight=\"medium\">{t('certificationIntro')}</Components.Text>\n <Flex flexDirection=\"column\" gap={16}>\n <Components.OrderedList\n items={[\n <Components.Text key=\"taxpayerId\">\n {t('certificationPoints.taxpayerId')}\n </Components.Text>,\n <Components.Text key=\"backupWithholding\">\n {t('certificationPoints.backupWithholding')}\n </Components.Text>,\n <Components.Text key=\"usPerson\">{t('certificationPoints.usPerson')}</Components.Text>,\n <Components.Text key=\"fatca\">{t('certificationPoints.fatca')}</Components.Text>,\n ]}\n />\n <Components.Text variant=\"supporting\" size=\"sm\">\n {t('certificationPoints.usPersonDefinition')}\n </Components.Text>\n </Flex>\n </Flex>\n )\n}\n\ninterface MaskedTaxIdFieldProps {\n /** Visible field label (also the disabled input's hidden accessible label). */\n label: string\n /** The server-provided mask (e.g. `XXX-XX-3123`) shown in the disabled input. */\n maskedValue: string\n /** Text for the button that reveals the editable input (e.g. \"Change SSN\"). */\n changeLabel: string\n /** Called when the signer opts to replace the value on file. */\n onChange: () => void\n}\n\n/**\n * Displays a taxpayer-ID value already on file as a disabled, masked input with\n * a button that reveals an empty editable input in its place. Submitting the\n * mask would stamp it verbatim onto the W-9, so replacing the value must go\n * through an empty input the server can backfill.\n */\nfunction MaskedTaxIdField({ label, maskedValue, changeLabel, onChange }: MaskedTaxIdFieldProps) {\n const Components = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={4} alignItems=\"stretch\">\n <Components.Text weight=\"medium\" size=\"sm\">\n {label}\n </Components.Text>\n <div className={styles.tinRow}>\n <div className={styles.tinInput}>\n <Components.TextInput\n name=\"\"\n label={label}\n shouldVisuallyHideLabel\n value={maskedValue}\n isDisabled\n />\n </div>\n <Components.Button\n variant=\"secondary\"\n type=\"button\"\n className={styles.tinButton}\n onClick={onChange}\n >\n {changeLabel}\n </Components.Button>\n </div>\n </Flex>\n )\n}\n\n/**\n * Resolves the W-9 classification option copy into lookup maps keyed by option\n * value. Each entry uses a static translation key so the typed `t` surface stays\n * sound.\n */\nfunction useSignatureFormCopy() {\n const { t } = useTranslation('Contractor.SignatureForm')\n\n const taxClassificationOptions: Record<string, string> = {\n individual_proprietor: t('options.taxClassification.individual_proprietor'),\n c_corporation: t('options.taxClassification.c_corporation'),\n s_corporation: t('options.taxClassification.s_corporation'),\n partnership: t('options.taxClassification.partnership'),\n trust_estate: t('options.taxClassification.trust_estate'),\n limited_liability_company: t('options.taxClassification.limited_liability_company'),\n other: t('options.taxClassification.other'),\n }\n\n const llcClassificationOptions: Record<string, string> = {\n c: t('options.llcClassificationCode.c'),\n s: t('options.llcClassificationCode.s'),\n p: t('options.llcClassificationCode.p'),\n }\n\n return {\n taxClassificationOptions,\n llcClassificationOptions,\n llcPlaceholder: t('options.llcClassificationCode.placeholder'),\n }\n}\n"],"names":["W9_INSTRUCTIONS_URL","SignatureForm","props","jsx","BaseComponent","Root","documentUuid","dictionary","useComponentDictionary","useI18n","t","useTranslation","onEvent","useBase","Components","useComponentContext","hookResult","useContractorSignatureForm","BaseLayout","document","pdfUrl","hasFields","isPending","Agree","handleFormSubmit","result","contractorEvents","handleBack","componentEvents","SDKFormProvider","FormLayout","jsxs","Flex","Trans","W9Fields","ActionsLayout","Fields","fieldsMetadata","copy","useSignatureFormCopy","isEditingSsn","setIsEditingSsn","useState","isEditingEin","setIsEditingEin","requiredMessages","Fragment","value","MaskedTaxIdField","CertificationDeclaration","label","maskedValue","changeLabel","onChange","styles","taxClassificationOptions","llcClassificationOptions"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMA,IAAsB;AA+BrB,SAASC,GAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,cAAAC,GAAc,YAAAC,KAAkC;AAC9D,EAAAC,EAAuB,4BAA4BD,CAAU,GAC7DE,EAAQ,0BAA0B;AAClC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0BAA0B,GACjD,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEbC,IAAaC,EAA2B,EAAE,cAAAX,GAAc;AAE9D,MAAIU,EAAW;AACb,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAW,cAAc,QAAQ;AAGvE,QAAM,EAAE,UAAAG,GAAU,QAAAC,GAAQ,WAAAC,EAA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