bhl-forms 0.11.15 → 0.11.17
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/dist/bhl-forms.iife.js +4 -4
- package/dist/bhl-forms.modern.iife.js +3 -3
- package/dist/bhl-forms.modern.umd.js +3 -3
- package/dist/bhl-forms.umd.js +4 -4
- package/dist/forms/accidentsAndInjuries.es.js +2 -2
- package/dist/forms/accidentsAndInjuries.iife.js +1 -1
- package/dist/forms/accidentsAndInjuries.json +1 -1
- package/dist/forms/applianceRepair.es.js +1439 -0
- package/dist/forms/applianceRepair.iife.js +1 -0
- package/dist/forms/applianceRepair.json +1 -0
- package/dist/forms/applianceRepairMinimal.es.js +10 -10
- package/dist/forms/applianceRepairMinimal.iife.js +1 -1
- package/dist/forms/applianceRepairMinimal.json +1 -1
- package/dist/forms/business.es.js +2 -2
- package/dist/forms/business.iife.js +1 -1
- package/dist/forms/business.json +1 -1
- package/dist/forms/childAndFamily.es.js +2 -2
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/childAndFamilySingle.es.js +2 -2
- package/dist/forms/childAndFamilySingle.iife.js +1 -1
- package/dist/forms/childAndFamilySingle.json +1 -1
- package/dist/forms/civilLawsuit.es.js +2 -2
- package/dist/forms/civilLawsuit.iife.js +1 -1
- package/dist/forms/civilLawsuit.json +1 -1
- package/dist/forms/civilLawsuit1to1.es.js +2 -2
- package/dist/forms/civilLawsuit1to1.iife.js +1 -1
- package/dist/forms/civilLawsuit1to1.json +1 -1
- package/dist/forms/contracts.es.js +2 -2
- package/dist/forms/contracts.iife.js +1 -1
- package/dist/forms/contracts.json +1 -1
- package/dist/forms/criminal.es.js +2 -2
- package/dist/forms/criminal.iife.js +1 -1
- package/dist/forms/criminal.json +1 -1
- package/dist/forms/divorce.es.js +2 -2
- package/dist/forms/divorce.iife.js +1 -1
- package/dist/forms/divorce.json +1 -1
- package/dist/forms/electrical.es.js +1549 -0
- package/dist/forms/electrical.iife.js +1 -0
- package/dist/forms/electrical.json +1 -0
- package/dist/forms/employmentAndWorkplace.es.js +2 -2
- package/dist/forms/employmentAndWorkplace.iife.js +1 -1
- package/dist/forms/employmentAndWorkplace.json +1 -1
- package/dist/forms/foreclosure.es.js +2 -2
- package/dist/forms/foreclosure.iife.js +1 -1
- package/dist/forms/foreclosure.json +1 -1
- package/dist/forms/generalContractors.es.js +26 -26
- package/dist/forms/generalContractors.iife.js +1 -1
- package/dist/forms/generalContractors.json +1 -1
- package/dist/forms/generalHomeImprovement.es.js +28 -28
- package/dist/forms/generalHomeImprovement.iife.js +1 -1
- package/dist/forms/generalHomeImprovement.json +1 -1
- package/dist/forms/generalHomeImprovementThankYou.es.js +28 -28
- package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
- package/dist/forms/generalHomeImprovementThankYou.json +1 -1
- package/dist/forms/generalLegal.es.js +2 -2
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/generalLegalJustAnswer.es.js +2 -2
- package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
- package/dist/forms/generalLegalJustAnswer.json +1 -1
- package/dist/forms/generalLegalPopUnder.es.js +2 -2
- package/dist/forms/generalLegalPopUnder.iife.js +1 -1
- package/dist/forms/generalLegalPopUnder.json +1 -1
- package/dist/forms/generalLegalPopUnderSingle.es.js +2 -2
- package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
- package/dist/forms/generalLegalPopUnderSingle.json +1 -1
- package/dist/forms/generalLegalSingle.es.js +2 -2
- package/dist/forms/generalLegalSingle.iife.js +1 -1
- package/dist/forms/generalLegalSingle.json +1 -1
- package/dist/forms/generalLegalSingle1to1.es.js +2 -2
- package/dist/forms/generalLegalSingle1to1.iife.js +1 -1
- package/dist/forms/generalLegalSingle1to1.json +1 -1
- package/dist/forms/generalLegalSingleMinimal.es.js +2 -2
- package/dist/forms/generalLegalSingleMinimal.iife.js +1 -1
- package/dist/forms/generalLegalSingleMinimal.json +1 -1
- package/dist/forms/generalLegalThankYou.es.js +2 -2
- package/dist/forms/generalLegalThankYou.iife.js +1 -1
- package/dist/forms/generalLegalThankYou.json +1 -1
- package/dist/forms/generalLegalThankYouConsultation.es.js +2 -2
- package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
- package/dist/forms/generalLegalThankYouConsultation.json +1 -1
- package/dist/forms/harassmentAndDiscrimination.es.js +2 -2
- package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
- package/dist/forms/harassmentAndDiscrimination.json +1 -1
- package/dist/forms/landlordTenant.es.js +2 -2
- package/dist/forms/landlordTenant.iife.js +1 -1
- package/dist/forms/landlordTenant.json +1 -1
- package/dist/forms/malpractice.es.js +2 -2
- package/dist/forms/malpractice.iife.js +1 -1
- package/dist/forms/malpractice.json +1 -1
- package/dist/forms/mechanics.es.js +2 -2
- package/dist/forms/mechanics.iife.js +1 -1
- package/dist/forms/mechanics.json +1 -1
- package/dist/forms/patentsAndIP.es.js +2 -2
- package/dist/forms/patentsAndIP.iife.js +1 -1
- package/dist/forms/patentsAndIP.json +1 -1
- package/dist/forms/plumbing.es.js +1548 -0
- package/dist/forms/plumbing.iife.js +1 -0
- package/dist/forms/plumbing.json +1 -0
- package/dist/forms/realEstate.es.js +2 -2
- package/dist/forms/realEstate.iife.js +1 -1
- package/dist/forms/realEstate.json +1 -1
- package/dist/forms/repossession.es.js +2 -2
- package/dist/forms/repossession.iife.js +1 -1
- package/dist/forms/repossession.json +1 -1
- package/dist/forms/roofing.es.js +1605 -0
- package/dist/forms/roofing.iife.js +1 -0
- package/dist/forms/roofing.json +1 -0
- package/dist/forms/ssdi.es.js +148 -131
- package/dist/forms/ssdi.iife.js +1 -1
- package/dist/forms/ssdi.json +1 -1
- package/dist/forms/testForm.es.js +2 -2
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/dist/forms/willsAndTrusts.es.js +2 -2
- package/dist/forms/willsAndTrusts.iife.js +1 -1
- package/dist/forms/willsAndTrusts.json +1 -1
- package/dist/forms/windows.es.js +26 -26
- package/dist/forms/windows.iife.js +1 -1
- package/dist/forms/windows.json +1 -1
- package/dist/forms/workersCompensation.es.js +2 -2
- package/dist/forms/workersCompensation.iife.js +1 -1
- package/dist/forms/workersCompensation.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1548 @@
|
|
|
1
|
+
function merge() {
|
|
2
|
+
return Object.assign({}, ...arguments)
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC =
|
|
6
|
+
'$getKey($meta, "commentsPlaceholders." + $get(Category).value, $meta.defaultCommentsPlaceholder)';
|
|
7
|
+
const DEFAULT_FINAL_HEADLINE_DYNAMIC =
|
|
8
|
+
'$getKey($meta, "finalHeadlines." + ($get(Type_Of_Legal_Problem).value || $get(Category).value), $meta.defaultFinalHeadline)';
|
|
9
|
+
const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC =
|
|
10
|
+
'$getKey($meta, "finalSubHeadlines." + ($get(Type_Of_Legal_Problem).value || $get(Category).value), $meta.defaultFinalSubHeadline)';
|
|
11
|
+
|
|
12
|
+
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_HOME_IMPROVEMENT = DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC;
|
|
13
|
+
const DEFAULT_FINAL_HEADLINE_HOME_IMPROVEMENT = "We Found Matching Contractors!";
|
|
14
|
+
const DEFAULT_FINAL_SUBHEADLINE_HOME_IMPROVEMENT = "Compare quotes and save. Verify contact info:";
|
|
15
|
+
// This version has a link to a providers page, starting without that
|
|
16
|
+
// export const TCPA_LANGUAGE_HOME_IMPROVEMENT =
|
|
17
|
+
// 'By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by <a href="/providers" target="_blank" class="t-text-blue-600 t-underline">contractors and partners</a> of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services.'
|
|
18
|
+
const TCPA_LANGUAGE_HOME_IMPROVEMENT =
|
|
19
|
+
"By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by contractors and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services.";
|
|
20
|
+
|
|
21
|
+
// ------ Common Base Settings
|
|
22
|
+
|
|
23
|
+
const ensureIds = (cfg) => {
|
|
24
|
+
if (cfg.name && !cfg.id) {
|
|
25
|
+
cfg.id = cfg.name;
|
|
26
|
+
}
|
|
27
|
+
return cfg
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const select = (updates) => {
|
|
31
|
+
ensureIds(updates);
|
|
32
|
+
return merge(
|
|
33
|
+
{
|
|
34
|
+
$formkit: "select",
|
|
35
|
+
placeholder: "Please Select",
|
|
36
|
+
validation: "required",
|
|
37
|
+
validationMessages: {
|
|
38
|
+
required: "Field is required",
|
|
39
|
+
},
|
|
40
|
+
inputClass: "t-bg-white",
|
|
41
|
+
labelClass: "required",
|
|
42
|
+
},
|
|
43
|
+
updates
|
|
44
|
+
)
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const sbsSelect = (updates) => {
|
|
48
|
+
updates.labelClass = "required";
|
|
49
|
+
updates.wrapperClass = "side-by-side t-items-center";
|
|
50
|
+
updates.innerClass = "select-height-content";
|
|
51
|
+
updates.helpClass = "t-mt-2.5 md:t-text-right md:t-mt-[-5px]";
|
|
52
|
+
return select(updates)
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const verticalSelect = (updates) => {
|
|
56
|
+
updates.labelClass = "required";
|
|
57
|
+
updates.wrapperClass = "t-flex t-justify-center";
|
|
58
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
59
|
+
updates.inputClass = "t-min-w-[150px] t-bg-white " + (updates.inputClass || "");
|
|
60
|
+
updates.helpClass = "t-mt-2.5 t-text-center";
|
|
61
|
+
return select(updates)
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const text = (updates) => {
|
|
65
|
+
ensureIds(updates);
|
|
66
|
+
return merge(
|
|
67
|
+
{
|
|
68
|
+
$formkit: "text",
|
|
69
|
+
validation: "required",
|
|
70
|
+
validationMessages: {
|
|
71
|
+
required: "Field is required",
|
|
72
|
+
},
|
|
73
|
+
labelClass: "required",
|
|
74
|
+
},
|
|
75
|
+
updates
|
|
76
|
+
)
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const sbsText = (updates) => {
|
|
80
|
+
updates.wrapperClass = "side-by-side t-items-center";
|
|
81
|
+
return text(updates)
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const verticalText = (updates) => {
|
|
85
|
+
updates.wrapperClass = "t-flex t-justify-center";
|
|
86
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
87
|
+
updates.inputClass = "t-text-center";
|
|
88
|
+
updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
|
|
89
|
+
return text(updates)
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const emailFL = (scope, updates = {}) => {
|
|
93
|
+
return text({
|
|
94
|
+
$formkit: "FloatingLabelText",
|
|
95
|
+
name: scope ? scope + ":" + "Email" : "Email",
|
|
96
|
+
placeholder: "Email Address",
|
|
97
|
+
autocomplete: "email",
|
|
98
|
+
"data-tf-sensitive": "false",
|
|
99
|
+
validation: "required|email",
|
|
100
|
+
validationMessages: {
|
|
101
|
+
required: "Email is required",
|
|
102
|
+
email: "Invalid Email",
|
|
103
|
+
},
|
|
104
|
+
inputClass: "t-text-center",
|
|
105
|
+
wrapperClass: "t-flex t-justify-center",
|
|
106
|
+
...updates,
|
|
107
|
+
})
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const firstNameFL = (scope, updates = {}) => {
|
|
111
|
+
return text({
|
|
112
|
+
$formkit: "FloatingLabelText",
|
|
113
|
+
placeholder: "First Name",
|
|
114
|
+
name: scope ? scope + ":" + "First_Name" : "First_Name",
|
|
115
|
+
autocomplete: "given-name",
|
|
116
|
+
validationMessages: {
|
|
117
|
+
required: "First Name is required",
|
|
118
|
+
},
|
|
119
|
+
inputClass: "t-text-center",
|
|
120
|
+
...updates,
|
|
121
|
+
})
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const lastNameFL = (scope, updates = {}) => {
|
|
125
|
+
return text({
|
|
126
|
+
$formkit: "FloatingLabelText",
|
|
127
|
+
placeholder: "Last Name",
|
|
128
|
+
name: scope ? scope + ":" + "Last_Name" : "Last_Name",
|
|
129
|
+
autocomplete: "family-name",
|
|
130
|
+
validationMessages: {
|
|
131
|
+
required: "Last Name is required",
|
|
132
|
+
},
|
|
133
|
+
inputClass: "t-text-center",
|
|
134
|
+
...updates,
|
|
135
|
+
})
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const fullNameFLMobileCol = (scope, updates = {}) => {
|
|
139
|
+
return {
|
|
140
|
+
$el: "div",
|
|
141
|
+
attrs: {
|
|
142
|
+
class: "t-flex t-flex-col sm:t-flex-row t-flex-wrap t-gap-x-[2%] t-justify-center sm:!t-max-w-[70%]",
|
|
143
|
+
},
|
|
144
|
+
children: [
|
|
145
|
+
firstNameFL(scope, { outerClass: "sm:!t-max-w-[49%]", ...updates }),
|
|
146
|
+
lastNameFL(scope, { outerClass: "sm:!t-max-w-[49%]", ...updates }),
|
|
147
|
+
],
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const phoneFL = (scope, updates = {}) => {
|
|
152
|
+
return text({
|
|
153
|
+
$formkit: "FloatingLabelText",
|
|
154
|
+
datatype: "tel",
|
|
155
|
+
name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
|
|
156
|
+
placeholder: updates.placeholder || "Phone Number",
|
|
157
|
+
maxlength: 14,
|
|
158
|
+
help: updates.help || null,
|
|
159
|
+
autocomplete: "tel-national",
|
|
160
|
+
"data-tf-sensitive": "false",
|
|
161
|
+
validation: "required|matches:/^[0-9]{3}[0-9]{3}[0-9]{4}$/|valid_phone",
|
|
162
|
+
validationMessages: {
|
|
163
|
+
required: "Phone Number is required",
|
|
164
|
+
matches: "Invalid Phone Format, use (XXX) YYY-ZZZZ",
|
|
165
|
+
valid_phone: "Invalid Phone Number",
|
|
166
|
+
},
|
|
167
|
+
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
|
|
168
|
+
inputClass: "t-text-center",
|
|
169
|
+
wrapperClass: "t-flex t-justify-center",
|
|
170
|
+
...updates,
|
|
171
|
+
})
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const zipcode = (scope, vertical, updates = {}) => {
|
|
175
|
+
const func = vertical ? verticalText : sbsText;
|
|
176
|
+
const label = vertical ? updates.label : "Zip Code:";
|
|
177
|
+
const help = vertical ? updates.help ?? "We try to match you with local help" : null;
|
|
178
|
+
return func({
|
|
179
|
+
label,
|
|
180
|
+
help,
|
|
181
|
+
placeholder: "#####",
|
|
182
|
+
name: scope ? scope + ":" + "Zip" : "Zip",
|
|
183
|
+
maxlength: 5,
|
|
184
|
+
inputmode: "numeric",
|
|
185
|
+
autocomplete: "postal-code",
|
|
186
|
+
validation: "required|matches:/^[0-9]{5}$/",
|
|
187
|
+
validationMessages: {
|
|
188
|
+
required: "Zip Code is required",
|
|
189
|
+
matches: "Invalid Zip Code",
|
|
190
|
+
},
|
|
191
|
+
...updates,
|
|
192
|
+
})
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const TCPAConsent = (scope, updates = {}) => ({
|
|
196
|
+
$formkit: "checkbox",
|
|
197
|
+
label: "$meta.tcpaLanguage",
|
|
198
|
+
// Necessary to get links to work in the tcpa language
|
|
199
|
+
__raw__sectionsSchema: {
|
|
200
|
+
label: { attrs: { innerHTML: "$label" } },
|
|
201
|
+
},
|
|
202
|
+
name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
|
|
203
|
+
"data-tf-sensitive": "false",
|
|
204
|
+
validation: "required|accepted",
|
|
205
|
+
validationMessages: {
|
|
206
|
+
required: "Consent is required",
|
|
207
|
+
accepted: "Consent is required",
|
|
208
|
+
},
|
|
209
|
+
classes: {
|
|
210
|
+
outer: updates.outerClass ? updates.outerClass : "",
|
|
211
|
+
wrapper: updates.wrapperClass ? updates.wrapperClass : "",
|
|
212
|
+
messages: updates.messagesClass ? updates.messagesClass : "",
|
|
213
|
+
label:
|
|
214
|
+
"!t-text-[0.7rem] t-text-slate-500 t-font-normal !t-leading-[0.9rem]" +
|
|
215
|
+
(updates.labelClass ? " " + updates.labelClass : ""),
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
const plumbingSubtype$1 = (scope, vertical, updates = {}) => {
|
|
220
|
+
const func = vertical ? verticalSelect : sbsSelect;
|
|
221
|
+
const label = vertical ? updates.label : "Select a plumbing job type:";
|
|
222
|
+
return func(
|
|
223
|
+
merge(
|
|
224
|
+
{
|
|
225
|
+
label,
|
|
226
|
+
name: scope ? scope + ":" + "Plumbing_Subtype" : "Plumbing_Subtype",
|
|
227
|
+
options: [
|
|
228
|
+
"Additions and Remodels",
|
|
229
|
+
"Boiler",
|
|
230
|
+
"Drain",
|
|
231
|
+
"Hot Tub",
|
|
232
|
+
"Piping",
|
|
233
|
+
"Septic",
|
|
234
|
+
"Sink",
|
|
235
|
+
"Sump Pump",
|
|
236
|
+
"Toilet",
|
|
237
|
+
"Tub or Shower",
|
|
238
|
+
"Water Heater",
|
|
239
|
+
"Water Main",
|
|
240
|
+
"Not Sure or Other",
|
|
241
|
+
],
|
|
242
|
+
},
|
|
243
|
+
updates
|
|
244
|
+
)
|
|
245
|
+
)
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
|
|
249
|
+
const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
|
|
250
|
+
|
|
251
|
+
const isInput = (n) => {
|
|
252
|
+
return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
const findLastInput = (n) => {
|
|
256
|
+
if (isInput(n)) {
|
|
257
|
+
return n
|
|
258
|
+
}
|
|
259
|
+
for (var i = n.children.length - 1; i >= 0; i--) {
|
|
260
|
+
if (typeof n.children === "string") {
|
|
261
|
+
continue
|
|
262
|
+
}
|
|
263
|
+
const child = n.children[i];
|
|
264
|
+
if (isInput(child)) {
|
|
265
|
+
return child
|
|
266
|
+
}
|
|
267
|
+
const res = findLastInput(child);
|
|
268
|
+
if (res) {
|
|
269
|
+
return res
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return null
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
const secureIconDefault = {
|
|
276
|
+
$el: "div",
|
|
277
|
+
if: "$activeStep === $lastStep()",
|
|
278
|
+
attrs: {
|
|
279
|
+
class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
|
|
280
|
+
},
|
|
281
|
+
children: [
|
|
282
|
+
{
|
|
283
|
+
$el: "img",
|
|
284
|
+
attrs: {
|
|
285
|
+
loading: "lazy",
|
|
286
|
+
alt: "",
|
|
287
|
+
style: {
|
|
288
|
+
border: 0,
|
|
289
|
+
},
|
|
290
|
+
width: "25",
|
|
291
|
+
height: "25",
|
|
292
|
+
src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
$el: "span",
|
|
297
|
+
children: "Secure & Encrypted",
|
|
298
|
+
attrs: {
|
|
299
|
+
class: "t-pl-2 t-pt-1 t-font-medium",
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
function secureIcon(updates = {}) {
|
|
306
|
+
return merge(secureIconDefault, updates)
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
function secureIconStandalone(updates = {}) {
|
|
310
|
+
return {
|
|
311
|
+
if: "$activeStep === $lastStep()",
|
|
312
|
+
style: {
|
|
313
|
+
if: "$activeStep !== $lastStep()",
|
|
314
|
+
then: "display: none;",
|
|
315
|
+
},
|
|
316
|
+
children: [
|
|
317
|
+
secureIcon({
|
|
318
|
+
attrs: {
|
|
319
|
+
class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500 t-pb-6 sm:t-pb-8",
|
|
320
|
+
},
|
|
321
|
+
...updates,
|
|
322
|
+
}),
|
|
323
|
+
],
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function verticalStepHeadline(updates) {
|
|
328
|
+
return {
|
|
329
|
+
$el: "h3",
|
|
330
|
+
children: updates.headline || "Tell Us About Your Situation",
|
|
331
|
+
attrs: {
|
|
332
|
+
class:
|
|
333
|
+
"t-flex t-justify-center t-text-center t-text-lg sm:t-text-xl t-font-bold t-text-dark t-pb-5 t-pt-0 t-px-1" +
|
|
334
|
+
" " +
|
|
335
|
+
(updates.headlineClass || ""),
|
|
336
|
+
},
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function firstAndLastStepHeadline(updates) {
|
|
341
|
+
return {
|
|
342
|
+
$el: "h3",
|
|
343
|
+
children: updates.headline || "Please Provide a Contact Name",
|
|
344
|
+
attrs: {
|
|
345
|
+
class:
|
|
346
|
+
"t-flex t-justify-center t-text-center t-text-xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
|
|
347
|
+
" " +
|
|
348
|
+
(updates.headlineClass || ""),
|
|
349
|
+
},
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
function contactStepHeadline(updates) {
|
|
354
|
+
return {
|
|
355
|
+
$el: "h3",
|
|
356
|
+
children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
|
|
357
|
+
attrs: {
|
|
358
|
+
class:
|
|
359
|
+
"t-flex t-justify-center t-text-center !t-text-xl md:!t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-4 t-px-1" +
|
|
360
|
+
" " +
|
|
361
|
+
(updates.headlineClass || "") +
|
|
362
|
+
" f-contact-info-headline",
|
|
363
|
+
},
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
function contactStepSubHeadline(updates) {
|
|
368
|
+
return {
|
|
369
|
+
$el: "h5",
|
|
370
|
+
children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
|
|
371
|
+
attrs: {
|
|
372
|
+
class:
|
|
373
|
+
"t-flex t-justify-center t-text-center !t-text-base md:!t-text-lg t-font-semibold t-pb-6 t-pt-0 t-px-3" +
|
|
374
|
+
" " +
|
|
375
|
+
(updates.subheadlineClass || "") +
|
|
376
|
+
" f-contact-info-subheadline",
|
|
377
|
+
},
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
const TRUSTED_FORM_JS = `(function() {
|
|
382
|
+
if (window.xxTrustedFormLoaded) {
|
|
383
|
+
return
|
|
384
|
+
}
|
|
385
|
+
var vid = '';
|
|
386
|
+
if (typeof window.zar !== 'undefined') {
|
|
387
|
+
vid = window.zar.getVID();
|
|
388
|
+
}
|
|
389
|
+
window.xxTrustedFormLoaded = true;
|
|
390
|
+
var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
|
|
391
|
+
var tf = document.createElement('script');
|
|
392
|
+
tf.type = 'text/javascript'; tf.async = true;
|
|
393
|
+
tf.src = ("https:" == document.location.protocol ? 'https' : 'http') + "://api.trustedform.com/trustedform.js?field=xxTrustedFormCertUrl&identifier=" + vid + "&ping_field=xxTrustedFormPingUrl&provideReferrer=false&invert_field_sensitivity=true&sandbox=" + sandbox + "&l=" + new Date().getTime() + Math.random();
|
|
394
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
|
|
395
|
+
})();`;
|
|
396
|
+
|
|
397
|
+
function trustedFormScript() {
|
|
398
|
+
return {
|
|
399
|
+
$el: "script",
|
|
400
|
+
if: "$activeStep === $lastStep()",
|
|
401
|
+
children: TRUSTED_FORM_JS,
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const stepDefaults = (step, stepKey) => ({
|
|
406
|
+
$el: "section",
|
|
407
|
+
if: '$stepEnabled("' + step + '")',
|
|
408
|
+
attrs: {
|
|
409
|
+
hidden: '$activeStep !== "' + step + '"',
|
|
410
|
+
key: stepKey ? stepKey : step,
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
function step(name, inputs, updates = {}) {
|
|
415
|
+
const {
|
|
416
|
+
nextOnEnter = true,
|
|
417
|
+
nextOnInput = false,
|
|
418
|
+
stepKey = undefined,
|
|
419
|
+
nextStepMap = undefined,
|
|
420
|
+
triggerRedirectMap = undefined,
|
|
421
|
+
autoFocus = undefined,
|
|
422
|
+
} = updates;
|
|
423
|
+
|
|
424
|
+
if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
|
|
425
|
+
const lastInput = findLastInput(inputs[inputs.length - 1]);
|
|
426
|
+
if (lastInput && nextOnEnter === true) {
|
|
427
|
+
lastInput.onKeypress = NEXT_ON_ENTER;
|
|
428
|
+
}
|
|
429
|
+
if (lastInput && nextOnInput === true) {
|
|
430
|
+
lastInput.onInput = NEXT_ON_INPUT;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
return merge(stepDefaults(name, stepKey), {
|
|
435
|
+
children: [
|
|
436
|
+
{
|
|
437
|
+
$formkit: "group",
|
|
438
|
+
id: name,
|
|
439
|
+
name: name,
|
|
440
|
+
nextStepMap: nextStepMap,
|
|
441
|
+
triggerRedirectMap: triggerRedirectMap,
|
|
442
|
+
autoFocus: autoFocus,
|
|
443
|
+
children: inputs,
|
|
444
|
+
},
|
|
445
|
+
],
|
|
446
|
+
})
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// Single question step
|
|
450
|
+
function sqstep(name, input, defaultHeadline, updates = {}) {
|
|
451
|
+
if (typeof updates.nextOnInput === "undefined") {
|
|
452
|
+
updates.nextOnInput = true;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return step(
|
|
456
|
+
name,
|
|
457
|
+
[
|
|
458
|
+
verticalStepHeadline({
|
|
459
|
+
headline: updates.headline ?? defaultHeadline,
|
|
460
|
+
headlineClass: updates.headlineClass,
|
|
461
|
+
}),
|
|
462
|
+
...(Array.isArray(input) ? input : [input]),
|
|
463
|
+
],
|
|
464
|
+
updates
|
|
465
|
+
)
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
function contactInfoV2(updates = {}) {
|
|
469
|
+
return step(
|
|
470
|
+
"contactInfo",
|
|
471
|
+
[
|
|
472
|
+
contactStepHeadline(updates),
|
|
473
|
+
contactStepSubHeadline(updates),
|
|
474
|
+
trustedFormScript(),
|
|
475
|
+
{
|
|
476
|
+
$el: "div",
|
|
477
|
+
attrs: {
|
|
478
|
+
class: "t-flex t-flex-col t-justify-center t-items-center",
|
|
479
|
+
},
|
|
480
|
+
children: [
|
|
481
|
+
emailFL(updates.scope, {
|
|
482
|
+
outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
|
|
483
|
+
innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
|
|
484
|
+
}),
|
|
485
|
+
phoneFL(updates.scope, {
|
|
486
|
+
outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
|
|
487
|
+
innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
|
|
488
|
+
}),
|
|
489
|
+
],
|
|
490
|
+
},
|
|
491
|
+
TCPAConsent(updates.scope, {
|
|
492
|
+
outerClass: "!t-flex !t-flex-col !t-justify-center !t-items-center",
|
|
493
|
+
wrapperClass: "t-w-[95%] sm:t-w-[80%]",
|
|
494
|
+
messagesClass: "t-w-[95%] sm:t-w-[80%]",
|
|
495
|
+
}),
|
|
496
|
+
],
|
|
497
|
+
{ nextOnEnter: false }
|
|
498
|
+
)
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
function firstAndLastV4(updates = {}) {
|
|
502
|
+
return step(
|
|
503
|
+
"firstAndLast",
|
|
504
|
+
[
|
|
505
|
+
firstAndLastStepHeadline({
|
|
506
|
+
headline: updates.headline ?? "Who is looking for help?",
|
|
507
|
+
headlineClass: updates.headlineClass,
|
|
508
|
+
}),
|
|
509
|
+
{
|
|
510
|
+
$el: "div",
|
|
511
|
+
attrs: {
|
|
512
|
+
class: "t-flex t-flex-col t-justify-center t-items-center t-pt-3",
|
|
513
|
+
},
|
|
514
|
+
children: [fullNameFLMobileCol(updates.scope)],
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
updates
|
|
518
|
+
)
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
function plumbingFirstStep(updates = {}) {
|
|
522
|
+
return step(
|
|
523
|
+
"plumbingFirstStep",
|
|
524
|
+
[
|
|
525
|
+
{
|
|
526
|
+
$formkit: "hidden",
|
|
527
|
+
name: "Category",
|
|
528
|
+
id: "Category",
|
|
529
|
+
value: "Plumbing",
|
|
530
|
+
},
|
|
531
|
+
zipcode(updates.scope, true, updates.input),
|
|
532
|
+
],
|
|
533
|
+
updates
|
|
534
|
+
)
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
function plumbingSubtype(updates = {}) {
|
|
538
|
+
return sqstep(
|
|
539
|
+
"plumbingSubtype",
|
|
540
|
+
plumbingSubtype$1(updates.scope, true, updates.input),
|
|
541
|
+
"Select a plumbing job type:",
|
|
542
|
+
updates
|
|
543
|
+
)
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const formNavigationNoFinalBack = (updates = {}) => ({
|
|
547
|
+
$el: "div",
|
|
548
|
+
attrs: {
|
|
549
|
+
class: {
|
|
550
|
+
if: "$activeStep === $firstStep()",
|
|
551
|
+
then: "step-nav " + (updates.firstStepButtonClass || "!t-justify-center sm:!t-justify-between"),
|
|
552
|
+
else: {
|
|
553
|
+
if: "$activeStep === $lastStep()",
|
|
554
|
+
then: "step-nav !t-justify-center ",
|
|
555
|
+
else: "step-nav !t-justify-between",
|
|
556
|
+
},
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
children: [
|
|
560
|
+
{
|
|
561
|
+
$formkit: "button",
|
|
562
|
+
name: "back_button",
|
|
563
|
+
onClick: "$setPreviousStep($prevStepFunc($get(form)))",
|
|
564
|
+
children: "Back",
|
|
565
|
+
outerClass: {
|
|
566
|
+
if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
|
|
567
|
+
then: "t-hidden sm:t-block",
|
|
568
|
+
else: "",
|
|
569
|
+
},
|
|
570
|
+
style: {
|
|
571
|
+
if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
|
|
572
|
+
then: "display: none;",
|
|
573
|
+
},
|
|
574
|
+
classes: {
|
|
575
|
+
input: (updates.inputClass || "") + " f-navigation-input",
|
|
576
|
+
},
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
$formkit: "button",
|
|
580
|
+
name: "next_button",
|
|
581
|
+
onClick: "$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",
|
|
582
|
+
children: {
|
|
583
|
+
if: "$activeStep === $firstStep()",
|
|
584
|
+
then: updates.startText || "Start",
|
|
585
|
+
else: "Next",
|
|
586
|
+
},
|
|
587
|
+
outerClass: {
|
|
588
|
+
if: "$activeStep === $lastStep()",
|
|
589
|
+
then: "t-hidden",
|
|
590
|
+
else: "",
|
|
591
|
+
},
|
|
592
|
+
style: {
|
|
593
|
+
if: "$activeStep === $lastStep()",
|
|
594
|
+
then: "display: none;",
|
|
595
|
+
},
|
|
596
|
+
classes: {
|
|
597
|
+
input: (updates.inputClass || "") + " f-navigation-input",
|
|
598
|
+
},
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
$formkit: "submit",
|
|
602
|
+
name: "submit_button",
|
|
603
|
+
label: updates.submitLabel || "Submit",
|
|
604
|
+
if: "$activeStep === $lastStep()",
|
|
605
|
+
style: {
|
|
606
|
+
if: "$activeStep !== $lastStep()",
|
|
607
|
+
then: "display: none;",
|
|
608
|
+
},
|
|
609
|
+
classes: {
|
|
610
|
+
input: (updates.inputClass || "") + " f-navigation-input !t-w-60",
|
|
611
|
+
outer: "!t-mt-0 !t-mb-0",
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
],
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
const formDetails = () => ({
|
|
618
|
+
$el: "pre",
|
|
619
|
+
if: '$urlParam("fdbg", "") == 1',
|
|
620
|
+
children: [
|
|
621
|
+
{
|
|
622
|
+
$el: "pre",
|
|
623
|
+
children: "$stringify( $get(form).value )",
|
|
624
|
+
attrs: {
|
|
625
|
+
class: "t-text-xs",
|
|
626
|
+
style: "overflow: scroll",
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
$el: "pre",
|
|
631
|
+
children: ["activeStep: ", "$activeStep"],
|
|
632
|
+
attrs: {
|
|
633
|
+
class: "t-text-xs",
|
|
634
|
+
style: "overflow: scroll",
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
$el: "pre",
|
|
639
|
+
children: ["stepHistory: ", "$stepHistory"],
|
|
640
|
+
attrs: {
|
|
641
|
+
class: "t-text-xs",
|
|
642
|
+
style: "overflow: scroll",
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
$el: "pre",
|
|
647
|
+
children: ["stepQueue: ", "$stepQueue"],
|
|
648
|
+
attrs: {
|
|
649
|
+
class: "t-text-xs",
|
|
650
|
+
style: "overflow: scroll",
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
$el: "pre",
|
|
655
|
+
children: ["steps: ", "$stepKeys()"],
|
|
656
|
+
attrs: {
|
|
657
|
+
class: "t-text-xs",
|
|
658
|
+
style: "overflow: scroll",
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
],
|
|
662
|
+
});
|
|
663
|
+
|
|
664
|
+
const formPropDefaults = {
|
|
665
|
+
type: "form",
|
|
666
|
+
id: "form",
|
|
667
|
+
config: { validationVisibility: "submit" },
|
|
668
|
+
onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
|
|
669
|
+
plugins: "$plugins",
|
|
670
|
+
actions: false,
|
|
671
|
+
anchorElement: "form-anchor",
|
|
672
|
+
useLocalStorage: true,
|
|
673
|
+
prepop: {
|
|
674
|
+
fromURL: true,
|
|
675
|
+
},
|
|
676
|
+
errorCodes: {
|
|
677
|
+
403: { message: "An Error Occurred", abort: false },
|
|
678
|
+
409: { abort: false },
|
|
679
|
+
429: "An Error Occurred",
|
|
680
|
+
504: { message: "An Error Occurred", abort: false },
|
|
681
|
+
},
|
|
682
|
+
formClass: "!t-max-w-[40rem]",
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
function filterMapByKey(obj, keyList) {
|
|
686
|
+
return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
// export function filteredNextStepsMapLegal(keyList) {
|
|
690
|
+
// const res = { Type_Of_Legal_Problem: filterMapByKey(nextStepsMapGeneralLegal["Type_Of_Legal_Problem"], keyList) }
|
|
691
|
+
// res["*"] = nextStepsMapGeneralLegal["*"]
|
|
692
|
+
// return res
|
|
693
|
+
// }
|
|
694
|
+
|
|
695
|
+
function formProps(updates) {
|
|
696
|
+
const props = merge(formPropDefaults, updates);
|
|
697
|
+
if (props.formId && !props.name) {
|
|
698
|
+
props.name = props.formId;
|
|
699
|
+
}
|
|
700
|
+
return props
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
const metaDefaults = {};
|
|
704
|
+
|
|
705
|
+
function metaProps(updates) {
|
|
706
|
+
const data = merge(metaDefaults, updates);
|
|
707
|
+
return {
|
|
708
|
+
type: "meta",
|
|
709
|
+
data,
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
function defaultMetaPropsHomeImprovement(category = null) {
|
|
714
|
+
let commentsPlaceholders = HomeImprovementCommentsPlaceholders;
|
|
715
|
+
let finalHeadlines = HomeImprovementFinalHeadlines;
|
|
716
|
+
let finalSubHeadlines = HomeImprovementFinalSubHeadlines;
|
|
717
|
+
if (category) {
|
|
718
|
+
commentsPlaceholders = filterMapByKey(HomeImprovementCommentsPlaceholders, category);
|
|
719
|
+
finalHeadlines = filterMapByKey(HomeImprovementFinalHeadlines, category);
|
|
720
|
+
finalSubHeadlines = filterMapByKey(HomeImprovementFinalSubHeadlines, category);
|
|
721
|
+
}
|
|
722
|
+
return metaProps({
|
|
723
|
+
tcpaLanguage: TCPA_LANGUAGE_HOME_IMPROVEMENT,
|
|
724
|
+
defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_HOME_IMPROVEMENT,
|
|
725
|
+
commentsPlaceholders: commentsPlaceholders,
|
|
726
|
+
defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_HOME_IMPROVEMENT,
|
|
727
|
+
finalHeadlines: finalHeadlines,
|
|
728
|
+
defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_HOME_IMPROVEMENT,
|
|
729
|
+
finalSubHeadlines: finalSubHeadlines,
|
|
730
|
+
})
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
const formAnchorDefaults = {
|
|
734
|
+
$el: "div",
|
|
735
|
+
children: [
|
|
736
|
+
{
|
|
737
|
+
$el: "div",
|
|
738
|
+
attrs: {
|
|
739
|
+
id: "form-anchor",
|
|
740
|
+
class: "t-absolute",
|
|
741
|
+
style: { top: "-30px", left: 0 },
|
|
742
|
+
},
|
|
743
|
+
},
|
|
744
|
+
],
|
|
745
|
+
attrs: {
|
|
746
|
+
class: "t-relative",
|
|
747
|
+
},
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
function formAnchor(updates) {
|
|
751
|
+
return merge(formAnchorDefaults, updates)
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
const progressBarDefaults = {
|
|
755
|
+
$el: "div",
|
|
756
|
+
attrs: {
|
|
757
|
+
class: "t-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center",
|
|
758
|
+
style: {
|
|
759
|
+
if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
|
|
760
|
+
then: "display: none",
|
|
761
|
+
},
|
|
762
|
+
},
|
|
763
|
+
children: [
|
|
764
|
+
{
|
|
765
|
+
$el: "div",
|
|
766
|
+
attrs: {
|
|
767
|
+
class: "t-flex t-justify-center",
|
|
768
|
+
},
|
|
769
|
+
children: [
|
|
770
|
+
{
|
|
771
|
+
$el: "span",
|
|
772
|
+
attrs: {
|
|
773
|
+
id: "progress-bar-text",
|
|
774
|
+
class: "t-text-sm t-mb-1",
|
|
775
|
+
},
|
|
776
|
+
children: ["0% Complete"],
|
|
777
|
+
},
|
|
778
|
+
],
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
$el: "div",
|
|
782
|
+
attrs: {
|
|
783
|
+
class: "t-bg-gray-100 t-w-9/12 t-rounded",
|
|
784
|
+
},
|
|
785
|
+
children: [
|
|
786
|
+
{
|
|
787
|
+
$el: "div",
|
|
788
|
+
attrs: {
|
|
789
|
+
id: "progress-bar",
|
|
790
|
+
class:
|
|
791
|
+
"t-flex t-flex-col t-justify-center t-text-center t-whitespace-nowrap t-w-[10%] t-h-1.5 t-rounded t-text-white t-bg-[#007bff]",
|
|
792
|
+
style: {
|
|
793
|
+
transition: "width 0.5s ease",
|
|
794
|
+
},
|
|
795
|
+
},
|
|
796
|
+
},
|
|
797
|
+
],
|
|
798
|
+
},
|
|
799
|
+
],
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
function progressBar(updates) {
|
|
803
|
+
return merge(progressBarDefaults, updates)
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
function headlineDefaults(updates = {}) {
|
|
807
|
+
return {
|
|
808
|
+
$el: "h1",
|
|
809
|
+
attrs: {
|
|
810
|
+
class:
|
|
811
|
+
"t-flex t-justify-center t-text-center t-text-[1.7rem] sm:t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
|
|
812
|
+
" " +
|
|
813
|
+
(updates.headlineClass || "") +
|
|
814
|
+
" f-first-headline",
|
|
815
|
+
},
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
function headline(updates = {}) {
|
|
820
|
+
return merge(headlineDefaults(updates), updates)
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
function subHeadlineDefaults(updates = {}) {
|
|
824
|
+
return {
|
|
825
|
+
$el: "h3",
|
|
826
|
+
attrs: {
|
|
827
|
+
class:
|
|
828
|
+
"t-flex t-justify-center t-text-center t-text-[1.1rem] md:t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10 t-pb-3" +
|
|
829
|
+
" " +
|
|
830
|
+
(updates.subheadlineClass || "") +
|
|
831
|
+
" f-first-subheadline",
|
|
832
|
+
},
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
function subHeadline(updates = {}) {
|
|
837
|
+
return merge(subHeadlineDefaults(updates), updates)
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
const hiddenInputsBase = [
|
|
841
|
+
{
|
|
842
|
+
$formkit: "hidden",
|
|
843
|
+
name: "gclid",
|
|
844
|
+
value: null,
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
$formkit: "hidden",
|
|
848
|
+
name: "campaignid",
|
|
849
|
+
value: null,
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
$formkit: "hidden",
|
|
853
|
+
name: "s",
|
|
854
|
+
value: null,
|
|
855
|
+
},
|
|
856
|
+
];
|
|
857
|
+
|
|
858
|
+
const hiddenInputsHomeImprovement = [
|
|
859
|
+
{
|
|
860
|
+
$formkit: "hidden",
|
|
861
|
+
name: "vertical",
|
|
862
|
+
value: "HomeImprovement",
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
$formkit: "hidden",
|
|
866
|
+
name: "TCPA_Language",
|
|
867
|
+
value: "$meta.tcpaLanguage",
|
|
868
|
+
},
|
|
869
|
+
...hiddenInputsBase,
|
|
870
|
+
];
|
|
871
|
+
|
|
872
|
+
const nextStepsLegalDefault = [
|
|
873
|
+
"haveAttorney",
|
|
874
|
+
"degreeOfInterest",
|
|
875
|
+
"commentsWithBankruptcy",
|
|
876
|
+
"zipcode",
|
|
877
|
+
"legalCrossSells",
|
|
878
|
+
"firstAndLast",
|
|
879
|
+
"contactInfo",
|
|
880
|
+
];
|
|
881
|
+
|
|
882
|
+
const nextStepsLegalDefaultLPM = [
|
|
883
|
+
"haveAttorney",
|
|
884
|
+
"degreeOfInterest",
|
|
885
|
+
"lawyerPaymentMethod",
|
|
886
|
+
"commentsWithBankruptcy",
|
|
887
|
+
"zipcode",
|
|
888
|
+
"legalCrossSells",
|
|
889
|
+
"firstAndLast",
|
|
890
|
+
"contactInfo",
|
|
891
|
+
];
|
|
892
|
+
|
|
893
|
+
const nextStepsLegalNoDOI = [
|
|
894
|
+
"haveAttorney",
|
|
895
|
+
"commentsWithBankruptcy",
|
|
896
|
+
"zipcode",
|
|
897
|
+
"legalCrossSells",
|
|
898
|
+
"firstAndLast",
|
|
899
|
+
"contactInfo",
|
|
900
|
+
];
|
|
901
|
+
|
|
902
|
+
const nextStepsLegalNoHA = [
|
|
903
|
+
"degreeOfInterest",
|
|
904
|
+
"commentsWithBankruptcy",
|
|
905
|
+
"zipcode",
|
|
906
|
+
"legalCrossSells",
|
|
907
|
+
"firstAndLast",
|
|
908
|
+
"contactInfo",
|
|
909
|
+
];
|
|
910
|
+
|
|
911
|
+
const nextStepsMapGeneralLegal = {
|
|
912
|
+
values: {
|
|
913
|
+
Type_Of_Legal_Problem: {
|
|
914
|
+
Adoption: ["maritalStatus", "haveChildren", ...nextStepsLegalDefaultLPM],
|
|
915
|
+
"Asbestos and Mesothelioma": ["incidentDate", "doctorTreatment", ...nextStepsLegalDefault],
|
|
916
|
+
"Auto and Car Accidents": [
|
|
917
|
+
"incidentDate",
|
|
918
|
+
"atFault",
|
|
919
|
+
"primaryInjury",
|
|
920
|
+
"doctorTreatment",
|
|
921
|
+
"policeReportFiled",
|
|
922
|
+
...nextStepsLegalNoDOI,
|
|
923
|
+
],
|
|
924
|
+
Bankruptcy: ["totalMonthlyIncome", "totalDebt", "ownRealEstate", "valueOfAssets", ...nextStepsLegalDefault],
|
|
925
|
+
"Business Lawyers": ["businessServices", "businessType", "numEmployeesOfBusiness", ...nextStepsLegalDefault],
|
|
926
|
+
"Child Custody": ["childRelationship", "childHome", "childPrimaryCaregiver", ...nextStepsLegalDefaultLPM],
|
|
927
|
+
"Child Support": ["childRelationship", "childHome", "childPrimaryCaregiver", ...nextStepsLegalDefaultLPM],
|
|
928
|
+
"Civil Rights and Discrimination": ["civilRightsType", ...nextStepsLegalDefault],
|
|
929
|
+
"Civil Lawsuit": ["civilDefense", "lawsuitOtherParty", ...nextStepsLegalDefault],
|
|
930
|
+
"File a Lawsuit": ["civilLawsuitTOLPDisplay", "lawsuitOtherParty", ...nextStepsLegalDefault],
|
|
931
|
+
"Defend a Lawsuit": ["lawsuitOtherParty", ...nextStepsLegalDefault],
|
|
932
|
+
"Consumer Lawyers": ["consumerLawyerType", "incidentDate", "lawsuitOtherParty", ...nextStepsLegalDefault],
|
|
933
|
+
"Criminal and Felony": [
|
|
934
|
+
"criminalTOLPDisplay",
|
|
935
|
+
"crimeCommittedDate",
|
|
936
|
+
"roleInMatterCriminal",
|
|
937
|
+
"pendingCharges",
|
|
938
|
+
...nextStepsLegalDefaultLPM,
|
|
939
|
+
],
|
|
940
|
+
"Debt and Collections": [
|
|
941
|
+
"totalMonthlyIncome",
|
|
942
|
+
"totalDebt",
|
|
943
|
+
"ownRealEstate",
|
|
944
|
+
"valueOfAssets",
|
|
945
|
+
...nextStepsLegalDefault,
|
|
946
|
+
],
|
|
947
|
+
"Divorce and Separation": ["maritalStatus", "haveChildren", ...nextStepsLegalDefaultLPM],
|
|
948
|
+
"DUI and DWI": [
|
|
949
|
+
"incidentDate",
|
|
950
|
+
"priorAlcoholOffenses",
|
|
951
|
+
"typeOfAlcoholTest",
|
|
952
|
+
"bloodContentAlcoholTest",
|
|
953
|
+
"pendingCharges",
|
|
954
|
+
...nextStepsLegalDefault,
|
|
955
|
+
],
|
|
956
|
+
"Employment and Workplace": [
|
|
957
|
+
"employmentAndWorkplaceTOLPDisplay",
|
|
958
|
+
"numEmployeesOfBusiness",
|
|
959
|
+
"employerType",
|
|
960
|
+
"employeeAtCompany",
|
|
961
|
+
...nextStepsLegalDefault,
|
|
962
|
+
],
|
|
963
|
+
Expungement: ["incidentDate", "criminalChargeType", ...nextStepsLegalDefaultLPM],
|
|
964
|
+
"Family Issues": ["maritalStatus", "haveChildren", ...nextStepsLegalDefaultLPM],
|
|
965
|
+
Foreclosure: [
|
|
966
|
+
"ownRealEstate",
|
|
967
|
+
"typeOfProperty",
|
|
968
|
+
"amountPaymentsPastDue",
|
|
969
|
+
"loanAmount",
|
|
970
|
+
"defaultNotice",
|
|
971
|
+
...nextStepsLegalDefault,
|
|
972
|
+
],
|
|
973
|
+
Guardianship: ["maritalStatus", "haveChildren", ...nextStepsLegalDefaultLPM],
|
|
974
|
+
"Immigration and Visas": [
|
|
975
|
+
"countryOfCitizenship",
|
|
976
|
+
"immigrationLocation",
|
|
977
|
+
"immigrationEntry",
|
|
978
|
+
"immigrationType",
|
|
979
|
+
"immigrationStatus",
|
|
980
|
+
"immigrationDetails",
|
|
981
|
+
...nextStepsLegalDefault,
|
|
982
|
+
],
|
|
983
|
+
"Landlord and Tenant": ["landlordTenantIssue", "landlordTenantParty", ...nextStepsLegalDefault],
|
|
984
|
+
"Lemon Law": ["incidentDate", "lawsuitOtherParty", ...nextStepsLegalDefault],
|
|
985
|
+
"Long Term Disability": [
|
|
986
|
+
"applicantOccupation",
|
|
987
|
+
"applicantAge",
|
|
988
|
+
"applicantLTDisabilityPolicy",
|
|
989
|
+
"applicantDisabilityHowObtain",
|
|
990
|
+
"applicantPreviouslyAppliedLtdBenefits",
|
|
991
|
+
"applicantReceivedDisabilityBenefits",
|
|
992
|
+
"applicantMonthlySalary",
|
|
993
|
+
...nextStepsLegalNoDOI,
|
|
994
|
+
],
|
|
995
|
+
"Medical Malpractice": [
|
|
996
|
+
"incidentDate",
|
|
997
|
+
"claimStatus",
|
|
998
|
+
"doctorTreatment",
|
|
999
|
+
"medicalMalpracticeInjuries",
|
|
1000
|
+
...nextStepsLegalDefault,
|
|
1001
|
+
],
|
|
1002
|
+
"Patents and Intellectual Property": ["patentAssistanceType", "patentFor", ...nextStepsLegalDefault],
|
|
1003
|
+
"Personal Injury": [
|
|
1004
|
+
"incidentDate",
|
|
1005
|
+
"claimStatus",
|
|
1006
|
+
"atFault",
|
|
1007
|
+
"primaryInjury",
|
|
1008
|
+
"doctorTreatment",
|
|
1009
|
+
...nextStepsLegalNoDOI,
|
|
1010
|
+
],
|
|
1011
|
+
"Probate and Estates": [
|
|
1012
|
+
"valueOfAssets",
|
|
1013
|
+
"typeOfAssets",
|
|
1014
|
+
"roleInMatterProbate",
|
|
1015
|
+
"estateLegalServicesNeeded",
|
|
1016
|
+
...nextStepsLegalDefault,
|
|
1017
|
+
],
|
|
1018
|
+
"Property Damage": ["wouldLikeLawyerTo", ...nextStepsLegalDefault],
|
|
1019
|
+
"Real Estate": ["realEstateTOLPDisplay", "realEstateArea", "wouldLikeLawyerTo", ...nextStepsLegalDefault],
|
|
1020
|
+
"Social Security Disability and Insurance": [
|
|
1021
|
+
"applicantAge",
|
|
1022
|
+
"disabilityConditionStopWork",
|
|
1023
|
+
"disabilityWorkHistory",
|
|
1024
|
+
"socialSecurityDisabilityReceivingBenefits",
|
|
1025
|
+
"doctorTreatment",
|
|
1026
|
+
...nextStepsLegalNoDOI,
|
|
1027
|
+
],
|
|
1028
|
+
"Tax and IRS": ["totalDebt", "taxProblemDetails", "taxLevel", "taxIssueType", ...nextStepsLegalDefault],
|
|
1029
|
+
"Traffic and Tickets": ["driversLicenseType", "trafficViolations", "haveCourtDate", ...nextStepsLegalDefault],
|
|
1030
|
+
Unemployment: ["numEmployeesOfBusiness", "employerType", ...nextStepsLegalNoHA],
|
|
1031
|
+
"Victim of a Crime": [
|
|
1032
|
+
"crimeCommittedDate",
|
|
1033
|
+
"roleInMatterCriminal",
|
|
1034
|
+
"pendingCharges",
|
|
1035
|
+
...nextStepsLegalDefaultLPM,
|
|
1036
|
+
],
|
|
1037
|
+
"Wills and Trusts": [
|
|
1038
|
+
"valueOfAssets",
|
|
1039
|
+
"typeOfAssets",
|
|
1040
|
+
"roleInMatterProbate",
|
|
1041
|
+
"estateLegalServicesNeeded",
|
|
1042
|
+
...nextStepsLegalDefault,
|
|
1043
|
+
],
|
|
1044
|
+
"Workers Compensation": [
|
|
1045
|
+
"incidentDate",
|
|
1046
|
+
"claimStatus",
|
|
1047
|
+
"primaryInjury",
|
|
1048
|
+
"causeOfInjury",
|
|
1049
|
+
"doctorTreatment",
|
|
1050
|
+
...nextStepsLegalNoDOI,
|
|
1051
|
+
],
|
|
1052
|
+
"Workplace Harassment": ["numEmployeesOfBusiness", "employerType", "employeeAtCompany", ...nextStepsLegalDefault],
|
|
1053
|
+
"Workplace Discrimination": [
|
|
1054
|
+
"numEmployeesOfBusiness",
|
|
1055
|
+
"employerType",
|
|
1056
|
+
"employeeAtCompany",
|
|
1057
|
+
...nextStepsLegalDefault,
|
|
1058
|
+
],
|
|
1059
|
+
"Wrongful Death": [
|
|
1060
|
+
"incidentDate",
|
|
1061
|
+
"relationshipToVictim",
|
|
1062
|
+
"criminalChargesFiled",
|
|
1063
|
+
"causeOfDeath",
|
|
1064
|
+
...nextStepsLegalNoDOI,
|
|
1065
|
+
],
|
|
1066
|
+
"Wrongful Termination": ["numEmployeesOfBusiness", "employerType", ...nextStepsLegalDefault],
|
|
1067
|
+
},
|
|
1068
|
+
"*": nextStepsLegalDefault,
|
|
1069
|
+
},
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
// Helper to take existing map and trim or replace steps
|
|
1073
|
+
function filterNextStepsMap(nextStepsMap, removableSteps = [], replaceSteps = {}) {
|
|
1074
|
+
const modifiedMap = { ...nextStepsMap };
|
|
1075
|
+
|
|
1076
|
+
function filterSteps(steps) {
|
|
1077
|
+
return steps.filter((step) => !removableSteps.includes(step)).map((step) => replaceSteps[step] || step)
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
function modifyValues(values) {
|
|
1081
|
+
const modifiedValues = {};
|
|
1082
|
+
for (const key in values) {
|
|
1083
|
+
if (Array.isArray(values[key])) {
|
|
1084
|
+
modifiedValues[key] = filterSteps(values[key]);
|
|
1085
|
+
} else if (typeof values[key] === "object") {
|
|
1086
|
+
modifiedValues[key] = modifyValues(values[key]);
|
|
1087
|
+
} else {
|
|
1088
|
+
modifiedValues[key] = values[key];
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
return modifiedValues
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
modifiedMap.values = modifyValues(nextStepsMap.values);
|
|
1095
|
+
return modifiedMap
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
filterNextStepsMap(nextStepsMapGeneralLegal, ["legalCrossSells"], {
|
|
1099
|
+
commentsWithBankruptcy: "comments",
|
|
1100
|
+
});
|
|
1101
|
+
|
|
1102
|
+
const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"];
|
|
1103
|
+
|
|
1104
|
+
({
|
|
1105
|
+
values: {
|
|
1106
|
+
Type_Of_Legal_Problem_Display: {
|
|
1107
|
+
"Auto Accident": TOLPNextSteps["Auto and Car Accidents"].filter((step) => step !== "legalCrossSells"),
|
|
1108
|
+
"Workplace Injury": TOLPNextSteps["Workers Compensation"].filter((step) => step !== "legalCrossSells"),
|
|
1109
|
+
"Dog Bite": TOLPNextSteps["Personal Injury"].filter((step) => step !== "legalCrossSells"),
|
|
1110
|
+
"Slip and Fall": TOLPNextSteps["Personal Injury"].filter((step) => step !== "legalCrossSells"),
|
|
1111
|
+
"Trucking Accident": TOLPNextSteps["Auto and Car Accidents"].filter((step) => step !== "legalCrossSells"),
|
|
1112
|
+
"Motorcycle Accident": TOLPNextSteps["Auto and Car Accidents"].filter((step) => step !== "legalCrossSells"),
|
|
1113
|
+
"Other Accidents or Injuries": TOLPNextSteps["Personal Injury"].filter((step) => step !== "legalCrossSells"),
|
|
1114
|
+
},
|
|
1115
|
+
"*": TOLPNextSteps["Personal Injury"].filter((step) => step !== "legalCrossSells"),
|
|
1116
|
+
},
|
|
1117
|
+
});
|
|
1118
|
+
|
|
1119
|
+
({
|
|
1120
|
+
values: {
|
|
1121
|
+
Type_Of_Legal_Problem: {
|
|
1122
|
+
"Child Custody": TOLPNextSteps["Child Custody"],
|
|
1123
|
+
"Child Support": TOLPNextSteps["Child Support"],
|
|
1124
|
+
"Not Sure or Other": nextStepsMapGeneralLegal["values"]["*"],
|
|
1125
|
+
},
|
|
1126
|
+
"*": TOLPNextSteps["Family Issues"],
|
|
1127
|
+
},
|
|
1128
|
+
});
|
|
1129
|
+
|
|
1130
|
+
({
|
|
1131
|
+
values: {
|
|
1132
|
+
Type_Of_Legal_Problem_Display: {
|
|
1133
|
+
"Alimony or Child Support": TOLPNextSteps["Child Support"],
|
|
1134
|
+
"Child Custody": TOLPNextSteps["Child Custody"],
|
|
1135
|
+
"Not Sure or Other": nextStepsMapGeneralLegal["values"]["*"],
|
|
1136
|
+
},
|
|
1137
|
+
"*": TOLPNextSteps["Divorce and Separation"],
|
|
1138
|
+
},
|
|
1139
|
+
});
|
|
1140
|
+
|
|
1141
|
+
({
|
|
1142
|
+
values: {
|
|
1143
|
+
Civil_Defense: {
|
|
1144
|
+
Yes: TOLPNextSteps["Defend a Lawsuit"],
|
|
1145
|
+
No: TOLPNextSteps["File a Lawsuit"],
|
|
1146
|
+
},
|
|
1147
|
+
"*": ["lawsuitOtherParty", ...nextStepsLegalDefault],
|
|
1148
|
+
},
|
|
1149
|
+
});
|
|
1150
|
+
|
|
1151
|
+
const nextStepsMapCivilTolp = {
|
|
1152
|
+
values: {
|
|
1153
|
+
Type_Of_Legal_Problem: {
|
|
1154
|
+
"Defend a Lawsuit": TOLPNextSteps["Defend a Lawsuit"],
|
|
1155
|
+
"File a Lawsuit": TOLPNextSteps["File a Lawsuit"],
|
|
1156
|
+
},
|
|
1157
|
+
"*": ["lawsuitOtherParty", ...nextStepsLegalDefault],
|
|
1158
|
+
},
|
|
1159
|
+
};
|
|
1160
|
+
|
|
1161
|
+
filterNextStepsMap(nextStepsMapCivilTolp, ["legalCrossSells"], {
|
|
1162
|
+
commentsWithBankruptcy: "comments",
|
|
1163
|
+
});
|
|
1164
|
+
|
|
1165
|
+
const nextStepsMapCivilTOLPDisplay = {
|
|
1166
|
+
values: {
|
|
1167
|
+
Type_Of_Legal_Problem_Display: {
|
|
1168
|
+
"Automobile Accident": TOLPNextSteps["Auto and Car Accidents"],
|
|
1169
|
+
"Contract Disputes": TOLPNextSteps["Business Lawyers"],
|
|
1170
|
+
"Dog Bite": TOLPNextSteps["Personal Injury"],
|
|
1171
|
+
"Employment and Workplace": TOLPNextSteps["Employment and Workplace"],
|
|
1172
|
+
Fraud: TOLPNextSteps["Consumer Lawyers"],
|
|
1173
|
+
"Medical Malpractice": TOLPNextSteps["Medical Malpractice"],
|
|
1174
|
+
"Personal Injury": TOLPNextSteps["Personal Injury"],
|
|
1175
|
+
"Property Damage": TOLPNextSteps["Property Damage"],
|
|
1176
|
+
"Real Estate": TOLPNextSteps["Real Estate"],
|
|
1177
|
+
"Not Sure or Other": nextStepsMapGeneralLegal["values"]["*"],
|
|
1178
|
+
},
|
|
1179
|
+
"*": ["lawsuitOtherParty", ...nextStepsLegalDefault],
|
|
1180
|
+
},
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
filterNextStepsMap(nextStepsMapCivilTOLPDisplay, ["legalCrossSells"], {
|
|
1184
|
+
commentsWithBankruptcy: "comments",
|
|
1185
|
+
});
|
|
1186
|
+
|
|
1187
|
+
const nextStepsMapCriminalTOLPDisplay = {
|
|
1188
|
+
values: {
|
|
1189
|
+
Type_Of_Legal_Problem_Display: {
|
|
1190
|
+
"Victim of a Crime": TOLPNextSteps["Victim of a Crime"],
|
|
1191
|
+
"DUI and DWI": TOLPNextSteps["DUI and DWI"],
|
|
1192
|
+
Expungement: TOLPNextSteps["Expungement"],
|
|
1193
|
+
"Not Sure or Other": nextStepsMapGeneralLegal["values"]["*"],
|
|
1194
|
+
},
|
|
1195
|
+
"*": ["crimeCommittedDate", "roleInMatterCriminal", "pendingCharges", ...nextStepsLegalDefaultLPM],
|
|
1196
|
+
},
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
filterNextStepsMap(
|
|
1200
|
+
nextStepsMapCriminalTOLPDisplay,
|
|
1201
|
+
["legalCrossSells"],
|
|
1202
|
+
{
|
|
1203
|
+
commentsWithBankruptcy: "comments",
|
|
1204
|
+
}
|
|
1205
|
+
);
|
|
1206
|
+
|
|
1207
|
+
const nextStepsMapEmploymentAndWorkplaceTOLPDisplay = {
|
|
1208
|
+
values: {
|
|
1209
|
+
Type_Of_Legal_Problem_Display: {
|
|
1210
|
+
"Wrongful Termination": TOLPNextSteps["Wrongful Termination"],
|
|
1211
|
+
"Workers Compensation": TOLPNextSteps["Workers Compensation"],
|
|
1212
|
+
"Personal Injury": TOLPNextSteps["Personal Injury"],
|
|
1213
|
+
Unemployment: TOLPNextSteps["Unemployment"],
|
|
1214
|
+
},
|
|
1215
|
+
"*": ["numEmployeesOfBusiness", "employerType", "employeeAtCompany", ...nextStepsLegalDefault],
|
|
1216
|
+
},
|
|
1217
|
+
};
|
|
1218
|
+
|
|
1219
|
+
filterNextStepsMap(
|
|
1220
|
+
nextStepsMapEmploymentAndWorkplaceTOLPDisplay,
|
|
1221
|
+
["legalCrossSells"],
|
|
1222
|
+
{
|
|
1223
|
+
commentsWithBankruptcy: "comments",
|
|
1224
|
+
}
|
|
1225
|
+
);
|
|
1226
|
+
|
|
1227
|
+
({
|
|
1228
|
+
values: {
|
|
1229
|
+
// Custom because we ask typeOfProperty on s1
|
|
1230
|
+
"*": ["amountPaymentsPastDue", "loanAmount", "defaultNotice", "ownRealEstate", ...nextStepsLegalDefault],
|
|
1231
|
+
},
|
|
1232
|
+
});
|
|
1233
|
+
|
|
1234
|
+
({
|
|
1235
|
+
values: {
|
|
1236
|
+
Type_Of_Legal_Problem: {
|
|
1237
|
+
"Workplace Harassment": TOLPNextSteps["Workplace Harassment"],
|
|
1238
|
+
"Workplace Discrimination": TOLPNextSteps["Workplace Discrimination"],
|
|
1239
|
+
},
|
|
1240
|
+
"*": [...nextStepsLegalDefault],
|
|
1241
|
+
},
|
|
1242
|
+
});
|
|
1243
|
+
|
|
1244
|
+
({
|
|
1245
|
+
values: {
|
|
1246
|
+
Type_Of_Legal_Problem: {
|
|
1247
|
+
"Probate and Estates": TOLPNextSteps["Probate and Estates"],
|
|
1248
|
+
"Wills and Trusts": TOLPNextSteps["Wills and Trusts"],
|
|
1249
|
+
"Wrongful Death": TOLPNextSteps["Wrongful Death"],
|
|
1250
|
+
},
|
|
1251
|
+
"*": [...nextStepsLegalDefault],
|
|
1252
|
+
},
|
|
1253
|
+
});
|
|
1254
|
+
|
|
1255
|
+
({
|
|
1256
|
+
values: {
|
|
1257
|
+
Type_Of_Legal_Problem_Display: {
|
|
1258
|
+
Patents: TOLPNextSteps["Patents and Intellectual Property"],
|
|
1259
|
+
"Business Lawyers": TOLPNextSteps["Business Lawyers"],
|
|
1260
|
+
"Business Consulting": TOLPNextSteps["Business Lawyers"],
|
|
1261
|
+
},
|
|
1262
|
+
"*": nextStepsMapGeneralLegal["values"]["*"],
|
|
1263
|
+
},
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
const nextStepsMapRealEstateTOLPDisplay = {
|
|
1267
|
+
values: {
|
|
1268
|
+
Type_Of_Legal_Problem_Display: {
|
|
1269
|
+
Foreclosure: TOLPNextSteps["Foreclosure"],
|
|
1270
|
+
"Landlord and Tenant": TOLPNextSteps["Landlord and Tenant"],
|
|
1271
|
+
"Wills, Trusts, and Estates": TOLPNextSteps["Wills and Trusts"],
|
|
1272
|
+
"Property Damage": TOLPNextSteps["Property Damage"],
|
|
1273
|
+
},
|
|
1274
|
+
"*": ["realEstateArea", "wouldLikeLawyerTo", ...nextStepsLegalDefault],
|
|
1275
|
+
},
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
filterNextStepsMap(
|
|
1279
|
+
nextStepsMapRealEstateTOLPDisplay,
|
|
1280
|
+
["legalCrossSells"],
|
|
1281
|
+
{
|
|
1282
|
+
commentsWithBankruptcy: "comments",
|
|
1283
|
+
}
|
|
1284
|
+
);
|
|
1285
|
+
|
|
1286
|
+
// ------ Home Improvement
|
|
1287
|
+
|
|
1288
|
+
const HomeImprovementCommentsPlaceholders = {
|
|
1289
|
+
Additions: 'Example: "I would like to add a sunroom to my home"',
|
|
1290
|
+
Appliances: 'Example: "I need to repair a dishwasher"',
|
|
1291
|
+
Appraisals: 'Example: "I need to get my home appraised"',
|
|
1292
|
+
Cabinets: 'Example: "I want to install new kitchen cabinets"',
|
|
1293
|
+
Carpentry: 'Example: "I need someone to build custom shelves"',
|
|
1294
|
+
Carpets: 'Example: "I want to replace the carpets in my living room"',
|
|
1295
|
+
Cleaning: 'Example: "I need a professional cleaning service for my home"',
|
|
1296
|
+
Countertops: 'Example: "I want to install granite countertops in my kitchen"',
|
|
1297
|
+
"Decks and Porches": 'Example: "I want to build a new deck in my backyard"',
|
|
1298
|
+
Demolition: 'Example: "I need to demolish a wall in my home"',
|
|
1299
|
+
Doors: 'Example: "I want to replace the front door of my house"',
|
|
1300
|
+
Driveways: 'Example: "I need to repair my driveway"',
|
|
1301
|
+
"Drywall and Plaster": 'Example: "I need to repair a hole in my drywall"',
|
|
1302
|
+
Electrical: 'Example: "I need an electrician to install new light fixtures"',
|
|
1303
|
+
Fencing: 'Example: "I want to install a privacy fence in my backyard"',
|
|
1304
|
+
Flooring: 'Example: "I want to install hardwood flooring in my living room"',
|
|
1305
|
+
Foundations: 'Example: "I need to repair the foundation of my house"',
|
|
1306
|
+
"Garage Doors": 'Example: "I want to replace my garage door"',
|
|
1307
|
+
"General Contractors": 'Example: "I need a general contractor for a home renovation"',
|
|
1308
|
+
Gutters: 'Example: "I need to clean and repair my gutters"',
|
|
1309
|
+
Handyman: 'Example: "I need a handyman to fix various things around my house"',
|
|
1310
|
+
"Holiday Decorators": 'Example: "I want to hire someone to decorate my home for the holidays"',
|
|
1311
|
+
"Smart Home": 'Example: "I want to install a smart home automation system"',
|
|
1312
|
+
"Home Builders": 'Example: "I want to build a custom home"',
|
|
1313
|
+
"Home Inspection": 'Example: "I need a home inspection before buying a house"',
|
|
1314
|
+
"Home Organization": 'Example: "I need help organizing my closets and storage"',
|
|
1315
|
+
"Home Security": 'Example: "I want to install a home security system"',
|
|
1316
|
+
"Home Staging": 'Example: "I need a home staging service to prepare my house for sale"',
|
|
1317
|
+
"Home Theater": 'Example: "I want to set up a home theater system"',
|
|
1318
|
+
"Home Warranties": 'Example: "I want to purchase a home warranty"',
|
|
1319
|
+
"Hot Tubs": 'Example: "I want to install a hot tub in my backyard"',
|
|
1320
|
+
"Heating and Cooling": 'Example: "I need to repair my air conditioning unit"',
|
|
1321
|
+
Insulation: 'Example: "I want to improve the insulation in my home"',
|
|
1322
|
+
"Junk Removal": 'Example: "I need a service to remove junk and debris from my property"',
|
|
1323
|
+
Landscaping: 'Example: "I want to redesign my backyard landscaping"',
|
|
1324
|
+
Locksmiths: 'Example: "I need a locksmith to change the locks on my doors"',
|
|
1325
|
+
"Masonry and Concrete": 'Example: "I need to repair a cracked concrete driveway"',
|
|
1326
|
+
Restoration: 'Example: "I need water damage restoration services"',
|
|
1327
|
+
Moving: 'Example: "I need a moving company to help me relocate"',
|
|
1328
|
+
Painting: 'Example: "I want to paint the interior walls of my house"',
|
|
1329
|
+
"Pest Control": 'Example: "I need pest control services for my home"',
|
|
1330
|
+
Pools: 'Example: "I want to install a swimming pool in my backyard"',
|
|
1331
|
+
Plumbing: 'Example: "I need a plumber to fix a leaky faucet"',
|
|
1332
|
+
"Pressure Washing": 'Example: "I want to pressure wash the exterior of my house"',
|
|
1333
|
+
Remodeling: 'Example: "I want to remodel my kitchen"',
|
|
1334
|
+
Roofing: 'Example: "I need to repair a leaky roof"',
|
|
1335
|
+
Sheds: 'Example: "I want to build a storage shed in my backyard"',
|
|
1336
|
+
Siding: 'Example: "I want to replace the siding on my house"',
|
|
1337
|
+
Solar: 'Example: "I want to install solar panels on my roof"',
|
|
1338
|
+
Tiling: 'Example: "I want to install new tiles in my bathroom"',
|
|
1339
|
+
"Tree Services": 'Example: "I need a large tree removed"',
|
|
1340
|
+
"Walk-in Tubs": 'Example: "I want to install a walk-in tub in my bathroom"',
|
|
1341
|
+
Waterproofing: 'Example: "I need to waterproof my basement"',
|
|
1342
|
+
"Window Cleaning": 'Example: "I need a professional window cleaning service"',
|
|
1343
|
+
Windows: 'Example: "I want to replace 3 windows in my house"',
|
|
1344
|
+
"Not Sure or Other": 'Example: "I need general handyman services"',
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
const HomeImprovementFinalHeadlines = {
|
|
1348
|
+
// 'Additions': '',
|
|
1349
|
+
Appliances: "Pros Are Standing By!",
|
|
1350
|
+
// 'Appraisals': '',
|
|
1351
|
+
// 'Cabinets': '',
|
|
1352
|
+
// 'Carpentry': '',
|
|
1353
|
+
// 'Carpets': '',
|
|
1354
|
+
// 'Cleaning': '',
|
|
1355
|
+
// 'Countertops': '',
|
|
1356
|
+
// 'Decks and Porches': '',
|
|
1357
|
+
// 'Demolition': '',
|
|
1358
|
+
// 'Doors': '',
|
|
1359
|
+
// 'Driveways': '',
|
|
1360
|
+
// 'Drywall and Plaster': '',
|
|
1361
|
+
Electrical: "Electricians Are Standing By!",
|
|
1362
|
+
// 'Fencing': '',
|
|
1363
|
+
// 'Flooring': '',
|
|
1364
|
+
// 'Foundations': '',
|
|
1365
|
+
// 'Garage Doors': '',
|
|
1366
|
+
// "General Contractors": "Connect With Top Contractors!",
|
|
1367
|
+
// 'Gutters': '',
|
|
1368
|
+
// 'Handyman': '',
|
|
1369
|
+
// 'Holiday Decorators': '',
|
|
1370
|
+
// 'Smart Home': '',
|
|
1371
|
+
// 'Home Builders': '',
|
|
1372
|
+
// 'Home Inspection': '',
|
|
1373
|
+
// 'Home Organization': '',
|
|
1374
|
+
// 'Home Security': '',
|
|
1375
|
+
// 'Home Staging': '',
|
|
1376
|
+
// 'Home Theater': '',
|
|
1377
|
+
// 'Home Warranties': '',
|
|
1378
|
+
// 'Hot Tubs': '',
|
|
1379
|
+
// 'Heating and Cooling': '',
|
|
1380
|
+
// 'Insulation': '',
|
|
1381
|
+
// 'Junk Removal': '',
|
|
1382
|
+
// 'Landscaping': '',
|
|
1383
|
+
// 'Locksmiths': '',
|
|
1384
|
+
// 'Masonry and Concrete': '',
|
|
1385
|
+
// 'Restoration': '',
|
|
1386
|
+
// 'Moving': '',
|
|
1387
|
+
// 'Painting': '',
|
|
1388
|
+
// 'Pest Control': '',
|
|
1389
|
+
// 'Pools': '',
|
|
1390
|
+
Plumbing: "Plumbers Are Standing By!",
|
|
1391
|
+
// 'Pressure Washing': '',
|
|
1392
|
+
// Remodeling: "Connect With Top Remodelers!",
|
|
1393
|
+
Roofing: "Roofers Are Standing By!",
|
|
1394
|
+
// 'Sheds': '',
|
|
1395
|
+
// 'Siding': '',
|
|
1396
|
+
// 'Solar': '',
|
|
1397
|
+
// 'Tiling': '',
|
|
1398
|
+
// 'Walk-in Tubs': '',
|
|
1399
|
+
// 'Waterproofing': '',
|
|
1400
|
+
// 'Window Cleaning': '',
|
|
1401
|
+
// 'Windows': '',
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
const HomeImprovementFinalSubHeadlines = {
|
|
1405
|
+
Additions: "Get your dream addition started today!",
|
|
1406
|
+
Appliances: "Compare quotes and save.",
|
|
1407
|
+
Appraisals: "Accurate home appraisals at your service.",
|
|
1408
|
+
Cabinets: "Transform your kitchen with new cabinets.",
|
|
1409
|
+
Carpentry: "Custom carpentry solutions for your home.",
|
|
1410
|
+
Carpets: "Upgrade your home with new carpets.",
|
|
1411
|
+
Cleaning: "Professional cleaning services for a spotless home.",
|
|
1412
|
+
Countertops: "Install beautiful countertops in your kitchen.",
|
|
1413
|
+
"Decks and Porches": "Build the perfect outdoor space.",
|
|
1414
|
+
Demolition: "Safe and efficient demolition services.",
|
|
1415
|
+
Doors: "Enhance your home with new doors.",
|
|
1416
|
+
Driveways: "Repair or install a new driveway.",
|
|
1417
|
+
"Drywall and Plaster": "Expert drywall and plaster services.",
|
|
1418
|
+
Electrical: "Get a quote from a trusted pro.",
|
|
1419
|
+
Fencing: "Secure your property with new fencing.",
|
|
1420
|
+
Flooring: "Install stunning new floors.",
|
|
1421
|
+
Foundations: "Foundation repair and maintenance.",
|
|
1422
|
+
"Garage Doors": "Upgrade your garage with new doors.",
|
|
1423
|
+
"General Contractors": "Top contractors for your home projects.",
|
|
1424
|
+
Gutters: "Clean and repair your gutters.",
|
|
1425
|
+
Handyman: "Handyman services for all your needs.",
|
|
1426
|
+
"Holiday Decorators": "Get your home ready for the holidays.",
|
|
1427
|
+
"Smart Home": "Upgrade to a smart home today.",
|
|
1428
|
+
"Home Builders": "Build your custom dream home.",
|
|
1429
|
+
"Home Inspection": "Thorough home inspections for peace of mind.",
|
|
1430
|
+
"Home Organization": "Organize your home with expert help.",
|
|
1431
|
+
"Home Security": "Protect your home with a security system.",
|
|
1432
|
+
"Home Staging": "Stage your home for a quick sale.",
|
|
1433
|
+
"Home Theater": "Create the ultimate home theater.",
|
|
1434
|
+
"Home Warranties": "Get a warranty for your home.",
|
|
1435
|
+
"Hot Tubs": "Install a relaxing hot tub.",
|
|
1436
|
+
"Heating and Cooling": "HVAC repair and installation.",
|
|
1437
|
+
Insulation: "Improve your home's insulation.",
|
|
1438
|
+
"Junk Removal": "Remove unwanted junk from your property.",
|
|
1439
|
+
Landscaping: "Transform your yard with expert landscaping.",
|
|
1440
|
+
Locksmiths: "Professional locksmith services.",
|
|
1441
|
+
"Masonry and Concrete": "Expert masonry and concrete work.",
|
|
1442
|
+
Restoration: "Restore your home after damage.",
|
|
1443
|
+
Moving: "Reliable moving services.",
|
|
1444
|
+
Painting: "Professional painting services.",
|
|
1445
|
+
"Pest Control": "Effective pest control solutions.",
|
|
1446
|
+
Pools: "Install or repair your pool.",
|
|
1447
|
+
Plumbing: "Get a quote from a trusted pro.",
|
|
1448
|
+
"Pressure Washing": "Pressure wash your home's exterior.",
|
|
1449
|
+
Remodeling: "Remodel your home with top professionals.",
|
|
1450
|
+
Roofing: "Get a quote from a local roofer.",
|
|
1451
|
+
Sheds: "Build a new shed for extra storage.",
|
|
1452
|
+
Siding: "Upgrade your home's siding.",
|
|
1453
|
+
Solar: "Install solar panels and save on energy.",
|
|
1454
|
+
Tiling: "Install beautiful new tiles.",
|
|
1455
|
+
"Walk-in Tubs": "Install a convenient walk-in tub.",
|
|
1456
|
+
Waterproofing: "Waterproof your home to prevent damage.",
|
|
1457
|
+
"Window Cleaning": "Professional window cleaning services.",
|
|
1458
|
+
Windows: "Replace your windows with energy-efficient options.",
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1461
|
+
const meta = defaultMetaPropsHomeImprovement();
|
|
1462
|
+
|
|
1463
|
+
const schema = [
|
|
1464
|
+
meta,
|
|
1465
|
+
formAnchor({
|
|
1466
|
+
children: [
|
|
1467
|
+
{
|
|
1468
|
+
$el: "div",
|
|
1469
|
+
attrs: {
|
|
1470
|
+
id: "form-anchor",
|
|
1471
|
+
class: "t-absolute",
|
|
1472
|
+
// HACK: account for sticky header on theme
|
|
1473
|
+
style: { top: "-80px", left: 0 },
|
|
1474
|
+
},
|
|
1475
|
+
},
|
|
1476
|
+
],
|
|
1477
|
+
}),
|
|
1478
|
+
{
|
|
1479
|
+
$cmp: "FormKit",
|
|
1480
|
+
props: formProps({
|
|
1481
|
+
formId: "plumbing",
|
|
1482
|
+
redirectMap: {
|
|
1483
|
+
"*": "/thank-you",
|
|
1484
|
+
},
|
|
1485
|
+
}),
|
|
1486
|
+
children: [
|
|
1487
|
+
progressBar(),
|
|
1488
|
+
headline({
|
|
1489
|
+
children: '$urlParam("hl", "Get Plumbing Quotes")',
|
|
1490
|
+
if: "$activeStep === $firstStep()",
|
|
1491
|
+
}),
|
|
1492
|
+
subHeadline({
|
|
1493
|
+
children: '$urlParam("shl", "Please Enter Your Zip Code:")',
|
|
1494
|
+
if: "$activeStep === $firstStep()",
|
|
1495
|
+
subheadlineClass: "!t-font-bold !t-text-[#465f87]",
|
|
1496
|
+
}),
|
|
1497
|
+
...hiddenInputsHomeImprovement,
|
|
1498
|
+
{
|
|
1499
|
+
$el: "div",
|
|
1500
|
+
attrs: {
|
|
1501
|
+
class: "form-body",
|
|
1502
|
+
},
|
|
1503
|
+
children: [
|
|
1504
|
+
plumbingFirstStep({
|
|
1505
|
+
nextOnInput: false,
|
|
1506
|
+
headlineClass: "t-text-lg",
|
|
1507
|
+
input: {
|
|
1508
|
+
help: null,
|
|
1509
|
+
},
|
|
1510
|
+
}),
|
|
1511
|
+
plumbingSubtype({
|
|
1512
|
+
input: {
|
|
1513
|
+
inputClass: "t-text-center",
|
|
1514
|
+
},
|
|
1515
|
+
}),
|
|
1516
|
+
// steps.timeframe(),
|
|
1517
|
+
// steps.ownHome(),
|
|
1518
|
+
// steps.address(),
|
|
1519
|
+
// steps.commentsHeadline({
|
|
1520
|
+
// label: null,
|
|
1521
|
+
// headline: "Please briefly describe your project:",
|
|
1522
|
+
// headlineClass: "!t-text-dark",
|
|
1523
|
+
// wrapperClass: "t-flex t-justify-center",
|
|
1524
|
+
// innerClass: "t-w-full",
|
|
1525
|
+
// }),
|
|
1526
|
+
firstAndLastV4({
|
|
1527
|
+
headlineClass: "!t-text-dark",
|
|
1528
|
+
headline: "Who is looking for a plumber?",
|
|
1529
|
+
}),
|
|
1530
|
+
contactInfoV2({
|
|
1531
|
+
headlineClass: "!t-text-[#465f87]",
|
|
1532
|
+
subheadlineClass: "!t-text-[#353739]",
|
|
1533
|
+
}),
|
|
1534
|
+
formNavigationNoFinalBack({
|
|
1535
|
+
startText: "Get Quotes Now",
|
|
1536
|
+
submitLabel: "Get A Quote",
|
|
1537
|
+
inputClass: "!t-text-black !t-font-extrabold !t-bg-[#ffce51]",
|
|
1538
|
+
firstStepButtonClass: "!t-justify-center",
|
|
1539
|
+
}),
|
|
1540
|
+
secureIconStandalone(),
|
|
1541
|
+
formDetails(),
|
|
1542
|
+
],
|
|
1543
|
+
},
|
|
1544
|
+
],
|
|
1545
|
+
},
|
|
1546
|
+
];
|
|
1547
|
+
|
|
1548
|
+
export { schema as default };
|