bhl-forms 0.7.3 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/bhl-forms.es.js +551 -543
  2. package/dist/bhl-forms.iife.js +4 -4
  3. package/dist/bhl-forms.modern.es.js +649 -649
  4. package/dist/bhl-forms.modern.iife.js +7 -7
  5. package/dist/bhl-forms.modern.umd.js +7 -7
  6. package/dist/bhl-forms.umd.js +4 -4
  7. package/dist/forms/accidentsAndInjuries.es.js +1459 -1151
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +138 -137
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/business.es.js +1432 -1149
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +1327 -1043
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +1526 -1378
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +1998 -1807
  22. package/dist/forms/civilLawsuit.iife.js +1 -1
  23. package/dist/forms/civilLawsuit.json +1 -1
  24. package/dist/forms/coins.es.js +138 -137
  25. package/dist/forms/coins.iife.js +1 -1
  26. package/dist/forms/contracts.es.js +1347 -1050
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +1830 -1711
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +1539 -1385
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +1831 -1678
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +1361 -1971
  39. package/dist/forms/generalHomeImprovement.iife.js +1 -1
  40. package/dist/forms/generalHomeImprovement.json +1 -1
  41. package/dist/forms/generalHomeImprovementThankYou.es.js +1361 -1971
  42. package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
  43. package/dist/forms/generalHomeImprovementThankYou.json +1 -1
  44. package/dist/forms/generalLegal.es.js +3035 -2535
  45. package/dist/forms/generalLegal.iife.js +1 -1
  46. package/dist/forms/generalLegal.json +1 -1
  47. package/dist/forms/generalLegalJustAnswer.es.js +3214 -2872
  48. package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
  49. package/dist/forms/generalLegalJustAnswer.json +1 -1
  50. package/dist/forms/generalLegalPopUnder.es.js +3035 -2535
  51. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnder.json +1 -1
  53. package/dist/forms/generalLegalPopUnderSingle.es.js +3214 -2872
  54. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  56. package/dist/forms/generalLegalSingle.es.js +3214 -2872
  57. package/dist/forms/generalLegalSingle.iife.js +1 -1
  58. package/dist/forms/generalLegalSingle.json +1 -1
  59. package/dist/forms/generalLegalThankYou.es.js +2823 -2303
  60. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  61. package/dist/forms/generalLegalThankYou.json +1 -1
  62. package/dist/forms/generalLegalThankYouConsultation.es.js +3214 -2872
  63. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  64. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  65. package/dist/forms/harassmentAndDiscrimination.es.js +1423 -1120
  66. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  67. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  68. package/dist/forms/landlordTenant.es.js +1393 -1106
  69. package/dist/forms/landlordTenant.iife.js +1 -1
  70. package/dist/forms/landlordTenant.json +1 -1
  71. package/dist/forms/malpractice.es.js +1529 -1223
  72. package/dist/forms/malpractice.iife.js +1 -1
  73. package/dist/forms/malpractice.json +1 -1
  74. package/dist/forms/mechanics.es.js +701 -530
  75. package/dist/forms/mechanics.iife.js +1 -1
  76. package/dist/forms/mechanics.json +1 -1
  77. package/dist/forms/patentsAndIP.es.js +1828 -1652
  78. package/dist/forms/patentsAndIP.iife.js +1 -1
  79. package/dist/forms/patentsAndIP.json +1 -1
  80. package/dist/forms/realEstate.es.js +2850 -2405
  81. package/dist/forms/realEstate.iife.js +1 -1
  82. package/dist/forms/realEstate.json +1 -1
  83. package/dist/forms/repossession.es.js +1566 -1251
  84. package/dist/forms/repossession.iife.js +1 -1
  85. package/dist/forms/repossession.json +1 -1
  86. package/dist/forms/ssdi.es.js +635 -520
  87. package/dist/forms/ssdi.iife.js +1 -1
  88. package/dist/forms/ssdi.json +1 -1
  89. package/dist/forms/testForm.es.js +409 -371
  90. package/dist/forms/testForm.iife.js +1 -1
  91. package/dist/forms/testForm.json +1 -1
  92. package/dist/forms/testRedirects.es.js +420 -316
  93. package/dist/forms/testRedirects.iife.js +1 -1
  94. package/dist/forms/testRedirects.json +1 -1
  95. package/dist/forms/vets.es.js +138 -137
  96. package/dist/forms/vets.iife.js +1 -1
  97. package/dist/forms/willsAndTrusts.es.js +1426 -1112
  98. package/dist/forms/willsAndTrusts.iife.js +1 -1
  99. package/dist/forms/willsAndTrusts.json +1 -1
  100. package/dist/main.css +1 -1
  101. package/package.json +1 -1
@@ -6,96 +6,101 @@ function LegalRedirectUrl() {
6
6
  return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
7
7
  }
8
8
 
9
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
10
- const DEFAULT_COMMENTS_LABEL_LEGAL = 'Please briefly describe your legal issue in a few words:';
11
- const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
12
- const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
13
- const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
14
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
15
- const TCPA_LANGUAGE_LEGAL = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, 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. To submit this request without this consent, call 878-213-4937.";
9
+ const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL =
10
+ '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
11
+ const DEFAULT_COMMENTS_LABEL_LEGAL = "Please briefly describe your legal issue in a few words:";
12
+ const DEFAULT_FINAL_HEADLINE_LEGAL = "Submit Your Case";
13
+ const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL =
14
+ '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
15
+ const DEFAULT_FINAL_SUBHEADLINE_LEGAL =
16
+ "You may benefit from speaking with a legal professional. Please verify your contact information.";
17
+ const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL =
18
+ '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
19
+ const TCPA_LANGUAGE_LEGAL =
20
+ "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, 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. To submit this request without this consent, call 878-213-4937.";
16
21
  const defaultLegalImprovementCrossSells = {
17
- 'Auto and Car Accidents': 'Injured in a Car Accident',
18
- 'Personal Injury': 'Personal or Workplace Injury',
19
- 'DUI and DWI': 'Involved in a DUI/DWI',
20
- 'Wills and Trusts': 'Need a Will or Trust',
21
- 'Power of Attorney': 'Update Power of Attorney',
22
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
22
+ "Auto and Car Accidents": "Injured in a Car Accident",
23
+ "Personal Injury": "Personal or Workplace Injury",
24
+ "DUI and DWI": "Involved in a DUI/DWI",
25
+ "Wills and Trusts": "Need a Will or Trust",
26
+ "Power of Attorney": "Update Power of Attorney",
27
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
23
28
  };
24
29
  const CROSS_SELL_OPTION_MAP_LEGAL = {
25
30
  // Values can be a list or a map of value -> display value
26
- 'Auto and Car Accidents': {
27
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
28
- 'Wills and Trusts': 'Need a Will or Trust',
29
- 'Workers Compensation': 'Workplace Injury',
30
- 'Power of Attorney': 'Update Power of Attorney',
31
- 'Divorce and Separation': 'Need a Divorce or Separation',
32
- 'Child Custody': 'Need help with Child Custody',
31
+ "Auto and Car Accidents": {
32
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
33
+ "Wills and Trusts": "Need a Will or Trust",
34
+ "Workers Compensation": "Workplace Injury",
35
+ "Power of Attorney": "Update Power of Attorney",
36
+ "Divorce and Separation": "Need a Divorce or Separation",
37
+ "Child Custody": "Need help with Child Custody",
33
38
  },
34
39
  "Personal Injury": {
35
- 'DUI and DWI': 'Involved in a DUI/DWI',
36
- 'Wills and Trusts': 'Need a Will or Trust',
37
- 'Power of Attorney': 'Update Power of Attorney',
38
- 'Divorce and Separation': 'Need a Divorce or Separation',
39
- 'Child Custody': 'Need help with Child Custody',
40
+ "DUI and DWI": "Involved in a DUI/DWI",
41
+ "Wills and Trusts": "Need a Will or Trust",
42
+ "Power of Attorney": "Update Power of Attorney",
43
+ "Divorce and Separation": "Need a Divorce or Separation",
44
+ "Child Custody": "Need help with Child Custody",
40
45
  // TODO add one more?
41
46
  },
42
47
  "Workers Compensation": {
43
- 'DUI and DWI': 'Involved in a DUI/DWI',
44
- 'Wills and Trusts': 'Need a Will or Trust',
45
- 'Power of Attorney': 'Update Power of Attorney',
46
- 'Divorce and Separation': 'Need a Divorce or Separation',
47
- 'Child Custody': 'Need help with Child Custody',
48
+ "DUI and DWI": "Involved in a DUI/DWI",
49
+ "Wills and Trusts": "Need a Will or Trust",
50
+ "Power of Attorney": "Update Power of Attorney",
51
+ "Divorce and Separation": "Need a Divorce or Separation",
52
+ "Child Custody": "Need help with Child Custody",
48
53
  // TODO add one more?
49
54
  },
50
55
  "DUI and DWI": {
51
- 'Personal Injury': 'Personal or Workplace Injury',
52
- 'Wills and Trusts': 'Need a Will or Trust',
53
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
54
- 'Power of Attorney': 'Update Power of Attorney',
55
- 'Divorce and Separation': 'Need a Divorce or Separation',
56
- 'Child Custody': 'Need help with Child Custody',
56
+ "Personal Injury": "Personal or Workplace Injury",
57
+ "Wills and Trusts": "Need a Will or Trust",
58
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
59
+ "Power of Attorney": "Update Power of Attorney",
60
+ "Divorce and Separation": "Need a Divorce or Separation",
61
+ "Child Custody": "Need help with Child Custody",
57
62
  },
58
63
  "Wills and Trusts": {
59
- 'Auto and Car Accidents': 'Injured in a Car Accident',
60
- 'Personal Injury': 'Personal or Workplace Injury',
61
- 'DUI and DWI': 'Involved in a DUI/DWI',
62
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
63
- 'Divorce and Separation': 'Need a Divorce or Separation',
64
- 'Child Custody': 'Need help with Child Custody',
64
+ "Auto and Car Accidents": "Injured in a Car Accident",
65
+ "Personal Injury": "Personal or Workplace Injury",
66
+ "DUI and DWI": "Involved in a DUI/DWI",
67
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
68
+ "Divorce and Separation": "Need a Divorce or Separation",
69
+ "Child Custody": "Need help with Child Custody",
65
70
  },
66
71
  "Probate and Estates": {
67
- 'Auto and Car Accidents': 'Injured in a Car Accident',
68
- 'Personal Injury': 'Personal or Workplace Injury',
69
- 'DUI and DWI': 'Involved in a DUI/DWI',
70
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
71
- 'Divorce and Separation': 'Need a Divorce or Separation',
72
- 'Child Custody': 'Need help with Child Custody',
72
+ "Auto and Car Accidents": "Injured in a Car Accident",
73
+ "Personal Injury": "Personal or Workplace Injury",
74
+ "DUI and DWI": "Involved in a DUI/DWI",
75
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
76
+ "Divorce and Separation": "Need a Divorce or Separation",
77
+ "Child Custody": "Need help with Child Custody",
73
78
  },
74
79
  "Power of Attorney": {
75
- 'Auto and Car Accidents': 'Injured in a Car Accident',
76
- 'Personal Injury': 'Personal or Workplace Injury',
77
- 'DUI and DWI': 'Involved in a DUI/DWI',
78
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
79
- 'Divorce and Separation': 'Need a Divorce or Separation',
80
- 'Child Custody': 'Need help with Child Custody',
80
+ "Auto and Car Accidents": "Injured in a Car Accident",
81
+ "Personal Injury": "Personal or Workplace Injury",
82
+ "DUI and DWI": "Involved in a DUI/DWI",
83
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
84
+ "Divorce and Separation": "Need a Divorce or Separation",
85
+ "Child Custody": "Need help with Child Custody",
81
86
  },
82
87
  "Long Term Disability": {
83
- 'Auto and Car Accidents': 'Injured in a Car Accident',
84
- 'DUI and DWI': 'Involved in a DUI/DWI',
85
- 'Wills and Trusts': 'Need a Will or Trust',
86
- 'Power of Attorney': 'Update Power of Attorney',
87
- 'Divorce and Separation': 'Need a Divorce or Separation',
88
- 'Child Custody': 'Need help with Child Custody',
88
+ "Auto and Car Accidents": "Injured in a Car Accident",
89
+ "DUI and DWI": "Involved in a DUI/DWI",
90
+ "Wills and Trusts": "Need a Will or Trust",
91
+ "Power of Attorney": "Update Power of Attorney",
92
+ "Divorce and Separation": "Need a Divorce or Separation",
93
+ "Child Custody": "Need help with Child Custody",
89
94
  },
90
95
  "Social Security Disability and Insurance": {
91
- 'Auto and Car Accidents': 'Injured in a Car Accident',
92
- 'DUI and DWI': 'Involved in a DUI/DWI',
93
- 'Wills and Trusts': 'Need a Will or Trust',
94
- 'Power of Attorney': 'Update Power of Attorney',
95
- 'Divorce and Separation': 'Need a Divorce or Separation',
96
- 'Child Custody': 'Need help with Child Custody',
96
+ "Auto and Car Accidents": "Injured in a Car Accident",
97
+ "DUI and DWI": "Involved in a DUI/DWI",
98
+ "Wills and Trusts": "Need a Will or Trust",
99
+ "Power of Attorney": "Update Power of Attorney",
100
+ "Divorce and Separation": "Need a Divorce or Separation",
101
+ "Child Custody": "Need help with Child Custody",
97
102
  },
98
- '*': defaultLegalImprovementCrossSells,
103
+ "*": defaultLegalImprovementCrossSells,
99
104
  };
100
105
 
101
106
  // ------ Common Base Settings
@@ -104,32 +109,48 @@ const checkbox = (updates) => {
104
109
  if (updates.name && !updates.id) {
105
110
  updates.id = updates.name;
106
111
  }
107
- return merge({
108
- $formkit: 'checkbox',
109
- validation: 'required',
110
- validationMessages: {
111
- required: 'Field is required'
112
- }
113
- }, updates)
112
+ return merge(
113
+ {
114
+ $formkit: "checkbox",
115
+ validation: "required",
116
+ validationMessages: {
117
+ required: "Field is required",
118
+ },
119
+ },
120
+ updates
121
+ )
114
122
  };
115
123
 
116
124
  const sbsCheckbox = (updates) => {
117
- updates.legendClass = 'legend-left required';
118
- updates.fieldsetClass = '$reset side-by-side';
119
- updates.optionsClass = 't-pl-1';
120
- updates.innerClass = 't-flex t-items-center';
121
- updates.wrapperClass = 't-mb-3';
125
+ updates.legendClass = "legend-left required";
126
+ updates.fieldsetClass = "$reset side-by-side";
127
+ updates.optionsClass = "t-pl-1";
128
+ updates.innerClass = "t-flex t-items-center";
129
+ updates.wrapperClass = "t-mb-3";
122
130
  return checkbox(updates)
123
131
  };
124
132
 
125
133
  const col2Checkbox = (updates) => {
126
134
  if (!updates || !updates.legendClass) {
127
- updates.legendClass = 'required';
135
+ updates.legendClass = "required";
128
136
  }
129
- updates.fieldsetClass = '$reset';
130
- updates.optionsClass = 't-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
131
- updates.innerClass = 't-items-start';
132
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
137
+ updates.fieldsetClass = "$reset";
138
+ updates.optionsClass = "t-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
139
+ updates.innerClass = "t-items-start";
140
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
141
+ return checkbox(updates)
142
+ };
143
+
144
+ const verticalCol2Checkbox = (updates) => {
145
+ if (!updates || !updates.legendClass) {
146
+ updates.legendClass = "required";
147
+ }
148
+ updates.fieldsetClass = "$reset t-flex t-justify-center";
149
+ updates.optionClass = "t-mx-5";
150
+ updates.optionsClass = "t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
151
+ updates.innerClass = "t-items-center";
152
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
153
+ updates.messagesClass = "t-flex t-justify-center";
133
154
  return checkbox(updates)
134
155
  };
135
156
 
@@ -137,79 +158,140 @@ const radio = (updates) => {
137
158
  if (updates.name && !updates.id) {
138
159
  updates.id = updates.name;
139
160
  }
140
- return merge({
141
- $formkit: 'radio',
142
- validation: 'required',
143
- validationMessages: {
144
- required: 'Field is required'
161
+ return merge(
162
+ {
163
+ $formkit: "radio",
164
+ validation: "required",
165
+ validationMessages: {
166
+ required: "Field is required",
167
+ },
168
+ optionsClass: "t-pt-3 t-pl-1",
169
+ legendClass: "required",
145
170
  },
146
- optionsClass: 't-pt-3 t-pl-1',
147
- legendClass: 'required'
148
- }, updates)
171
+ updates
172
+ )
149
173
  };
150
174
 
151
175
  const col2Radio = (updates) => {
152
- updates.legendClass = 'required';
153
- updates.fieldsetClass = '$reset';
154
- updates.optionsClass = 't-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
155
- updates.innerClass = 't-items-start';
156
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
176
+ updates.legendClass = "required";
177
+ updates.fieldsetClass = "$reset";
178
+ updates.optionsClass = "t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
179
+ updates.innerClass = "t-items-start";
180
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
181
+ return radio(updates)
182
+ };
183
+
184
+ const col2RadioCenter = (updates) => {
185
+ updates.legendClass = "required t-w-[100%] t-text-center";
186
+ if (typeof updates.fieldsetClass === "undefined") {
187
+ updates.fieldsetClass = "$reset t-flex t-justify-center";
188
+ }
189
+ updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
190
+ updates.innerClass = "t-items-start";
191
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
192
+ updates.optionClass = "t-pl-4 md:t-pl-8 md:t-min-w-[200px]";
193
+ updates.messagesClass = "t-flex t-justify-center";
194
+ updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
157
195
  return radio(updates)
158
196
  };
159
197
 
160
198
  const sbsRadio = (updates) => {
161
- updates.legendClass = 'legend-left required';
162
- updates.fieldsetClass = '$reset side-by-side';
163
- updates.optionsClass = 't-pl-1';
164
- updates.innerClass = 't-flex t-items-center';
165
- updates.wrapperClass = 't-mb-3';
199
+ updates.legendClass = "legend-left required";
200
+ updates.fieldsetClass = "$reset side-by-side";
201
+ updates.optionsClass = "t-pl-1";
202
+ updates.innerClass = "t-flex t-items-center";
203
+ updates.wrapperClass = "t-mb-3";
166
204
  return radio(updates)
167
205
  };
168
206
 
169
207
  const sbs2ColRadio = (updates) => {
170
- updates.legendClass = 'legend-left-flex md:t-max-w-[40%] required';
171
- updates.fieldsetClass = '$reset side-by-side-flex';
172
- updates.optionsClass = 'md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125';
173
- updates.innerClass = 't-flex t-items-start';
174
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
208
+ updates.legendClass = "legend-left-flex md:t-max-w-[40%] required";
209
+ updates.fieldsetClass = "$reset side-by-side-flex";
210
+ updates.optionsClass = "md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125";
211
+ updates.innerClass = "t-flex t-items-start";
212
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
175
213
  return radio(updates)
176
214
  };
177
215
 
178
216
  const sbs2ItemRadio = (updates) => {
179
- updates.legendClass = 'legend-left t-pb-1 required';
180
- updates.fieldsetClass = '$reset side-by-side t-items-center';
181
- updates.optionsClass = 't-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center';
182
- updates.innerClass = 't-flex t-items-center';
183
- updates.optionClass = 't-pr-1';
217
+ updates.legendClass = "legend-left t-pb-1 required";
218
+ updates.fieldsetClass = "$reset side-by-side t-items-center";
219
+ updates.optionsClass = "t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center";
220
+ updates.innerClass = "t-flex t-items-center";
221
+ updates.optionClass = "t-pr-1";
184
222
  return radio(updates)
185
223
  };
186
224
 
187
225
  const sbsYesNoRadio = (updates) => {
188
- updates.options = ['Yes', 'No'];
226
+ updates.options = ["Yes", "No"];
189
227
  return sbs2ItemRadio(updates)
190
228
  };
191
229
 
230
+ const verticalButtonRadio = (updates) => {
231
+ updates.legendClass = "legend-left";
232
+ updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col-reverse t-items-center";
233
+ if (typeof updates.optionsClass === "undefined") {
234
+ updates.optionsClass = "t-flex t-flex-col sm:t-flex-row t-justify-center t-my-3";
235
+ }
236
+ updates.optionClass = "radiobtn t-my-2 sm:t-my-0 t-mx-2 md:t-mx-5";
237
+ updates.wrapperClass = "$reset formkit-wrapper t-mb-0 t-flex t-items-center t-h-[100%]";
238
+ updates.labelClass = "t-font-semibold t-text-[#1e448f] t-w-[100%]";
239
+ updates.decoratorIcon = false;
240
+ updates.messagesClass = "t-flex t-justify-center";
241
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
242
+ return radio(updates)
243
+ };
244
+
245
+ const verticalYesNoRadio = (updates) => {
246
+ updates.options = ["Yes", "No"];
247
+ updates.optionsClass = "t-flex t-justify-center t-my-3";
248
+ return verticalButtonRadio(updates)
249
+ };
250
+
251
+ const verticalRadio = (updates) => {
252
+ updates.legendClass = "required";
253
+ updates.fieldsetClass = "$reset t-flex t-justify-center";
254
+ updates.optionsClass = "t-pl-2 t-pt-3";
255
+ updates.innerClass = "t-items-center";
256
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
257
+ updates.optionClass = "t-pl-4 md:t-pl-12";
258
+ updates.messagesClass = "t-flex t-justify-center";
259
+ return radio(updates)
260
+ };
261
+
192
262
  const select = (updates) => {
193
263
  if (updates.name && !updates.id) {
194
264
  updates.id = updates.name;
195
265
  }
196
- return merge({
197
- $formkit: 'select',
198
- placeholder: "Please Select",
199
- validation: 'required',
200
- validationMessages: {
201
- required: 'Field is required'
266
+ return merge(
267
+ {
268
+ $formkit: "select",
269
+ placeholder: "Please Select",
270
+ validation: "required",
271
+ validationMessages: {
272
+ required: "Field is required",
273
+ },
274
+ inputClass: "t-bg-white",
275
+ labelClass: "required",
202
276
  },
203
- inputClass: 't-bg-white',
204
- labelClass: 'required'
205
- }, updates)
277
+ updates
278
+ )
206
279
  };
207
280
 
208
281
  const sbsSelect = (updates) => {
209
- updates.labelClass = 'required';
210
- updates.wrapperClass = 'side-by-side t-items-center';
211
- updates.innerClass = 'select-height-content';
212
- updates.helpClass = 't-mt-2.5 md:t-text-right md:t-mt-[-5px]';
282
+ updates.labelClass = "required";
283
+ updates.wrapperClass = "side-by-side t-items-center";
284
+ updates.innerClass = "select-height-content";
285
+ updates.helpClass = "t-mt-2.5 md:t-text-right md:t-mt-[-5px]";
286
+ return select(updates)
287
+ };
288
+
289
+ const verticalSelect = (updates) => {
290
+ updates.labelClass = "required";
291
+ updates.wrapperClass = "t-flex t-justify-center";
292
+ updates.messagesClass = "t-flex t-justify-center";
293
+ updates.inputClass = "t-min-w-[150px] t-bg-white";
294
+ updates.helpClass = "t-mt-2.5 t-text-center";
213
295
  return select(updates)
214
296
  };
215
297
 
@@ -217,26 +299,29 @@ const text = (updates) => {
217
299
  if (updates.name && !updates.id) {
218
300
  updates.id = updates.name;
219
301
  }
220
- return merge({
221
- $formkit: 'text',
222
- validation: 'required',
223
- validationMessages: {
224
- required: 'Field is required'
302
+ return merge(
303
+ {
304
+ $formkit: "text",
305
+ validation: "required",
306
+ validationMessages: {
307
+ required: "Field is required",
308
+ },
309
+ labelClass: "required",
225
310
  },
226
- labelClass: 'required'
227
- }, updates)
311
+ updates
312
+ )
228
313
  };
229
314
 
230
315
  const sbsText = (updates) => {
231
- updates.wrapperClass = 'side-by-side t-items-center';
316
+ updates.wrapperClass = "side-by-side t-items-center";
232
317
  return text(updates)
233
318
  };
234
319
 
235
320
  const verticalText = (updates) => {
236
- updates.wrapperClass = 't-flex t-justify-center';
237
- updates.messagesClass = 't-flex t-justify-center';
238
- updates.inputClass = 't-text-center';
239
- updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
321
+ updates.wrapperClass = "t-flex t-justify-center";
322
+ updates.messagesClass = "t-flex t-justify-center";
323
+ updates.inputClass = "t-text-center";
324
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
240
325
  return text(updates)
241
326
  };
242
327
 
@@ -244,532 +329,797 @@ const textArea = (updates) => {
244
329
  if (updates.name && !updates.id) {
245
330
  updates.id = updates.name;
246
331
  }
247
- return merge({
248
- $formkit: 'textarea',
249
- rows: 5,
250
- maxlength: 500,
251
- validation: 'required',
252
- validationMessages: {
253
- required: 'Field is required'
332
+ return merge(
333
+ {
334
+ $formkit: "textarea",
335
+ rows: 5,
336
+ maxlength: 500,
337
+ validation: "required",
338
+ validationMessages: {
339
+ required: "Field is required",
340
+ },
341
+ innerClass: "t-max-w-xl",
342
+ labelClass: "required",
254
343
  },
255
- innerClass: 't-max-w-xl',
256
- labelClass: 'required'
257
- }, updates)
344
+ updates
345
+ )
258
346
  };
259
347
 
260
348
  const date = (updates) => {
261
349
  if (updates.name && !updates.id) {
262
350
  updates.id = updates.name;
263
351
  }
264
- return merge({
265
- $formkit: 'DatePicker',
266
- validation: 'required',
267
- validationMessages: {
268
- required: 'Field is required'
352
+ return merge(
353
+ {
354
+ $formkit: "DatePicker",
355
+ validation: "required",
356
+ validationMessages: {
357
+ required: "Field is required",
358
+ },
359
+ labelClass: "required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500",
360
+ innerClass:
361
+ "t-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500",
269
362
  },
270
- labelClass: 'required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500',
271
- innerClass: 't-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500'
272
- }, updates)
363
+ updates
364
+ )
273
365
  };
274
366
 
275
367
  const sbsDate = (updates) => {
276
- updates.wrapperClass = 'side-by-side t-items-center';
368
+ updates.wrapperClass = "side-by-side t-items-center";
277
369
  return date(updates)
278
370
  };
279
371
 
280
- const email = (scope) => sbsText({
281
- $formkit: 'email',
282
- name: scope ? scope + ':' + 'Email' : 'Email',
283
- label: 'Email Address:',
284
- placeholder: 'email@domain.com',
285
- autocomplete: 'email',
286
- 'data-tf-sensitive': 'false',
287
- validation: 'required|email',
288
- validationMessages: {
289
- required: 'Email is required',
290
- email: 'Invalid Email'
291
- }
292
- });
372
+ const verticalDate = (updates) => {
373
+ updates.wrapperClass = "t-flex t-justify-center";
374
+ updates.inputClass = "t-text-center";
375
+ updates.messagesClass = "t-flex t-justify-center";
376
+ return date(updates)
377
+ };
293
378
 
294
- const firstName = (scope) => sbsText({
295
- label: 'First Name:',
296
- placeholder: 'First',
297
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
298
- autocomplete: "given-name",
299
- validationMessages: {
300
- required: 'First Name is required'
301
- }
302
- });
379
+ const email = (scope, vertical, updates = {}) => {
380
+ const func = vertical ? verticalText : sbsText;
381
+ const label = vertical ? updates.label : "Email Address:";
382
+ return func({
383
+ $formkit: "email",
384
+ name: scope ? scope + ":" + "Email" : "Email",
385
+ label,
386
+ placeholder: "email@domain.com",
387
+ autocomplete: "email",
388
+ "data-tf-sensitive": "false",
389
+ validation: "required|email",
390
+ validationMessages: {
391
+ required: "Email is required",
392
+ email: "Invalid Email",
393
+ },
394
+ ...updates,
395
+ })
396
+ };
303
397
 
304
- const lastName = (scope) => sbsText({
305
- label: 'Last Name:',
306
- placeholder: 'Last',
307
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
308
- autocomplete: "family-name",
309
- validationMessages: {
310
- required: 'Last Name is required'
311
- }
312
- });
398
+ const firstName = (scope, vertical, updates = {}) => {
399
+ const func = vertical ? verticalText : sbsText;
400
+ const label = vertical ? updates.label : "First Name:";
401
+ return func({
402
+ label,
403
+ placeholder: "First",
404
+ name: scope ? scope + ":" + "First_Name" : "First_Name",
405
+ autocomplete: "given-name",
406
+ validationMessages: {
407
+ required: "First Name is required",
408
+ },
409
+ ...updates,
410
+ })
411
+ };
313
412
 
314
- const phone = (scope) => sbsText({
315
- $formkit: 'tel',
316
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
317
- label: 'Phone Number:',
318
- placeholder: '###-###-####',
319
- maxlength: 12,
320
- help: '10-digit phone number, hyphens optional',
321
- autocomplete: 'tel-national',
322
- 'data-tf-sensitive': 'false',
323
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
324
- validationMessages: {
325
- required: 'Field is required',
326
- matches: 'Invalid Phone Format, use ###-###-####',
327
- valid_phone: 'Invalid Phone Number'
328
- },
329
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
330
- });
413
+ const lastName = (scope, vertical, updates = {}) => {
414
+ const func = vertical ? verticalText : sbsText;
415
+ const label = vertical ? updates.label : "Last Name:";
416
+ return func({
417
+ label,
418
+ placeholder: "Last",
419
+ name: scope ? scope + ":" + "Last_Name" : "Last_Name",
420
+ autocomplete: "family-name",
421
+ validationMessages: {
422
+ required: "Last Name is required",
423
+ },
424
+ ...updates,
425
+ })
426
+ };
331
427
 
428
+ const phone = (scope, vertical, updates = {}) => {
429
+ const func = vertical ? verticalText : sbsText;
430
+ const label = vertical ? updates.label : "Phone Number:";
431
+ return func({
432
+ $formkit: "tel",
433
+ name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
434
+ label,
435
+ placeholder: "###-###-####",
436
+ maxlength: 12,
437
+ help: "10-digit phone number, hyphens optional",
438
+ autocomplete: "tel-national",
439
+ "data-tf-sensitive": "false",
440
+ validation: "required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",
441
+ validationMessages: {
442
+ required: "Phone Number is required",
443
+ matches: "Invalid Phone Format, use ###-###-####",
444
+ valid_phone: "Invalid Phone Number",
445
+ },
446
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
447
+ ...updates,
448
+ })
449
+ };
332
450
 
333
451
  const zipcode = (scope, vertical, updates = {}) => {
334
452
  const func = vertical ? verticalText : sbsText;
335
- const label = vertical ? (updates.label) : 'Zip Code:';
336
- const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
453
+ const label = vertical ? updates.label : "Zip Code:";
454
+ const help = vertical ? updates.help ?? "We try to match you with local help" : null;
337
455
  return func({
338
456
  label,
339
457
  help,
340
- placeholder: '#####',
341
- name: scope ? scope + ':' + 'Zip' : 'Zip',
458
+ placeholder: "#####",
459
+ name: scope ? scope + ":" + "Zip" : "Zip",
342
460
  maxlength: 5,
343
461
  inputmode: "numeric",
344
- autocomplete: 'postal-code',
345
- validation: 'required|matches:/^[0-9]{5}$/',
462
+ autocomplete: "postal-code",
463
+ validation: "required|matches:/^[0-9]{5}$/",
346
464
  validationMessages: {
347
- required: 'Zip Code is required',
348
- matches: 'Invalid Zip Code'
465
+ required: "Zip Code is required",
466
+ matches: "Invalid Zip Code",
349
467
  },
350
- ...updates
468
+ ...updates,
351
469
  })
352
470
  };
353
471
 
354
472
  const applicantAge = (scope, vertical, updates = {}) => {
355
473
  const func = vertical ? verticalText : sbsText;
356
- const label = vertical ? (updates.label) : 'Age of Applicant?';
357
- const value = vertical ? (updates.value ?? "50") : null;
358
- return func(merge({
359
- label,
360
- placeholder: 'Age between 18 and 65',
361
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
362
- value,
363
- maxlength: 2,
364
- inputmode: "numeric",
365
- validation: "required|min:18,max:65",
366
- validationMessages: {
367
- required: 'Applicant Age is required',
368
- min: 'Invalid Age - must be between 18 and 65',
369
- max: 'Invalid Age - must be between 18 and 65',
370
- },
371
- ...updates
372
- }))
474
+ const label = vertical ? updates.label : "Age of Applicant?";
475
+ const value = vertical ? updates.value ?? "50" : null;
476
+ return func(
477
+ merge({
478
+ label,
479
+ placeholder: "Age between 18 and 65",
480
+ name: scope ? scope + ":" + "Applicant_Age" : "Applicant_Age",
481
+ value,
482
+ maxlength: 2,
483
+ inputmode: "numeric",
484
+ validation: "required|min:18,max:65",
485
+ validationMessages: {
486
+ required: "Applicant Age is required",
487
+ min: "Invalid Age - must be between 18 and 65",
488
+ max: "Invalid Age - must be between 18 and 65",
489
+ },
490
+ ...updates,
491
+ })
492
+ )
373
493
  };
374
494
 
375
- const atFault = (scope) => sbsYesNoRadio({
376
- name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
377
- label: 'Were You at Fault?'
378
- });
495
+ const atFault = (scope, vertical, updates = {}) => {
496
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
497
+ const label = vertical ? updates.label : "Were You at Fault?";
498
+ return func(
499
+ merge(
500
+ {
501
+ label,
502
+ name: scope ? scope + ":" + "At_Fault" : "At_Fault",
503
+ },
504
+ updates
505
+ )
506
+ )
507
+ };
379
508
 
380
- const bankruptcyCrossSell = () => sbsCheckbox({
381
- label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
382
- help: "Note: you will be contacted separately by a bankruptcy/debt expert",
383
- name: 'CrossSell_Bankruptcy',
384
- id: 'CrossSell_Bankruptcy',
385
- if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
386
- validation: null,
387
- helpClass: "!t-text-sm"
388
- });
509
+ const bankruptcyCrossSell = (scope) =>
510
+ sbsCheckbox({
511
+ label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
512
+ help: "Note: you will be contacted separately by a bankruptcy/debt expert",
513
+ name: scope ? scope + ":CrossSell_Bankruptcy" : "CrossSell_Bankruptcy",
514
+ id: scope ? scope + ":CrossSell_Bankruptcy" : "CrossSell_Bankruptcy",
515
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
516
+ validation: null,
517
+ helpClass: "!t-text-sm",
518
+ });
519
+
520
+ const bloodContentAlcoholTest = (scope, vertical, updates = {}) => {
521
+ const func = vertical ? verticalSelect : sbsSelect;
522
+ const label = vertical ? updates.label : "Blood Alcohol Content Measured by Test:";
523
+ return func(
524
+ merge(
525
+ {
526
+ label,
527
+ name: scope ? scope + ":" + "Blood_Alcohol_Content_Test" : "Blood_Alcohol_Content_Test",
528
+ options: [
529
+ "No Test",
530
+ "0.00% - 0.04%",
531
+ "0.05% - 0.08%",
532
+ "0.09% - 0.12%",
533
+ "0.13% - 0.16%",
534
+ "0.17% - 0.20%",
535
+ "More than 0.20%",
536
+ "Don't know",
537
+ ],
538
+ },
539
+ updates
540
+ )
541
+ )
542
+ };
389
543
 
390
- const bloodContentAlcoholTest = (scope) => sbsSelect({
391
- name: scope ? scope + ':' + 'Blood_Alcohol_Content_Test' : 'Blood_Alcohol_Content_Test',
392
- label: 'Blood Alcohol Content Measured by Test:',
393
- options: [
394
- "No Test",
395
- "0.00% - 0.04%",
396
- "0.05% - 0.08%",
397
- "0.09% - 0.12%",
398
- "0.13% - 0.16%",
399
- "0.17% - 0.20%",
400
- "More than 0.20%",
401
- "Don't know"
402
- ]
403
- });
544
+ const causeOfInjury = (scope, vertical, updates = {}) => {
545
+ const func = vertical ? col2RadioCenter : sbsSelect;
546
+ const label = vertical ? updates.label : "Cause of Injury:";
547
+ return func(
548
+ merge(
549
+ {
550
+ label,
551
+ name: scope ? scope + ":" + "Cause_Of_Injury" : "Cause_Of_Injury",
552
+ options: [
553
+ "Traumatic Physical Injury (Accident)",
554
+ "Repeated Trauma Injury",
555
+ "Mental Injury",
556
+ "Occupational Disease",
557
+ "Not Sure",
558
+ ],
559
+ },
560
+ updates
561
+ )
562
+ )
563
+ };
404
564
 
405
- const causeOfInjury = (scope) => sbsSelect({
406
- name: scope ? scope + ':' + 'Cause_Of_Injury' : 'Cause_Of_Injury',
407
- label: 'Cause of Injury:',
408
- options: [
409
- "Traumatic Physical Injury (Accident)",
410
- "Repeated Trauma Injury",
411
- "Mental Injury",
412
- "Occupational Disease",
413
- "Not Sure"
414
- ]
415
- });
565
+ const causeOfDeath = (scope, vertical, updates = {}) => {
566
+ const func = vertical ? col2RadioCenter : sbsSelect;
567
+ const label = vertical ? updates.label : "What was the Cause of the Victim's Death?";
568
+ return func(
569
+ merge(
570
+ {
571
+ label,
572
+ name: scope ? scope + ":" + "Cause_Of_Death" : "Cause_Of_Death",
573
+ options: ["Vehicle Accident", "Negligent/Careless Act", "Reckless Act", "Other"],
574
+ },
575
+ updates
576
+ )
577
+ )
578
+ };
416
579
 
417
- const causeOfDeath = () => sbsSelect({
418
- label: "What was the Cause of the Victim's Death?",
419
- name: 'Cause_Of_Death',
420
- options: [
421
- "Vehicle Accident",
422
- "Negligent/Careless Act",
423
- "Reckless Act",
424
- "Other"
425
- ]
426
- });
580
+ const childHome = (scope, vertical, updates = {}) => {
581
+ const func = vertical ? col2RadioCenter : sbsSelect;
582
+ const label = vertical ? updates.label : "With Whom Do the Children Currently Live?";
583
+ return func(
584
+ merge(
585
+ {
586
+ label,
587
+ name: scope ? scope + ":" + "Child_Home" : "Child_Home",
588
+ options: ["Mother", "Father", "Grandparents", "Other"],
589
+ },
590
+ updates
591
+ )
592
+ )
593
+ };
427
594
 
428
- const childHome = (scope) => sbsSelect({
429
- name: scope ? scope + ':' + 'Child_Home' : 'Child_Home',
430
- label: 'With Whom Do the Children Currently Live?',
431
- options: [
432
- 'Mother',
433
- 'Father',
434
- 'Grandparents',
435
- 'Other'
436
- ]
437
- });
595
+ const childPrimaryCaregiver = (scope, vertical, updates = {}) => {
596
+ const func = vertical ? verticalButtonRadio : sbsSelect;
597
+ const label = vertical ? updates.label : "Who is the Primary Caregiver?";
598
+ return func(
599
+ merge(
600
+ {
601
+ label,
602
+ name: scope ? scope + ":" + "Child_Primary_Caregiver" : "Child_Primary_Caregiver",
603
+ options: ["Mother", "Father", "Other"],
604
+ },
605
+ updates
606
+ )
607
+ )
608
+ };
438
609
 
439
- const childPrimaryCaregiver = (scope) => sbsSelect({
440
- name: scope ? scope + ':' + 'Child_Primary_Caregiver' : 'Child_Primary_Caregiver',
441
- label: 'Who is the Primary Caregiver?',
442
- options: [
443
- 'Mother',
444
- 'Father',
445
- 'Other'
446
- ]
447
- });
610
+ const childRelationship = (scope, vertical, updates = {}) => {
611
+ const func = vertical ? col2RadioCenter : sbsSelect;
612
+ const label = vertical ? updates.label : "Your Relationship to Child(ren):";
613
+ return func(
614
+ merge(
615
+ {
616
+ label,
617
+ name: scope ? scope + ":" + "Child_Relationship" : "Child_Relationship",
618
+ options: ["Father", "Mother", "Grandparent", "Aunt/Uncle", "Other"],
619
+ },
620
+ updates
621
+ )
622
+ )
623
+ };
448
624
 
449
- const childRelationship = (scope) => sbsSelect({
450
- name: scope ? scope + ':' + 'Child_Relationship' : 'Child_Relationship',
451
- label: 'Your Relationship to Child(ren):',
452
- options: [
453
- 'Father',
454
- 'Mother',
455
- 'Grandparent',
456
- 'Aunt/Uncle',
457
- 'Other'
458
- ]
459
- });
625
+ const claimStatus = (scope, vertical, updates = {}) => {
626
+ const func = vertical ? col2RadioCenter : sbsSelect;
627
+ const label = vertical ? updates.label : "Status of Claim:";
628
+ return func(
629
+ merge(
630
+ {
631
+ label,
632
+ name: scope ? scope + ":" + "Claim_Status" : "Claim_Status",
633
+ options: ["No action taken yet", "Demand for compensation made", "Lawsuit filed", "Other"],
634
+ },
635
+ updates
636
+ )
637
+ )
638
+ };
460
639
 
461
- const claimStatus = (scope) => sbsSelect({
462
- name: scope ? scope + ':' + 'Claim_Status' : 'Claim_Status',
463
- label: "Status of Claim:",
464
- options: [
465
- "No action taken yet",
466
- "Demand for compensation made",
467
- "Lawsuit filed",
468
- "Other"
469
- ]
470
- });
640
+ // TODO: vertical not supported yet
641
+ const comments = (scope, vertical, updates) =>
642
+ textArea(
643
+ merge(
644
+ {
645
+ name: scope ? scope + ":" + "Comments" : "Comments",
646
+ label: "Please briefly describe your situation in a few words:",
647
+ placeholder:
648
+ 'For Example: "I would like help with child support payments" or "I need help with visitation rights"',
649
+ },
650
+ updates
651
+ )
652
+ );
471
653
 
472
- const comments = (updates, scope) => textArea(
473
- merge({
474
- name: scope ? scope + ':' + 'Comments' : 'Comments',
475
- label: 'Please briefly describe your situation in a few words:',
476
- placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
477
- }, updates)
478
- );
479
-
480
- const criminalChargesFiled = () => sbsRadio({
481
- name: 'Criminal_Charges_Filed',
482
- label: "Were Criminal Charges Filed?",
483
- options: [
484
- "Yes",
485
- "No",
486
- "Not Sure"
487
- ]
488
- });
654
+ const criminalChargesFiled = (scope, vertical, updates = {}) => {
655
+ const func = vertical ? verticalRadio : sbsRadio;
656
+ const label = vertical ? updates.label : "Were Criminal Charges Filed?";
657
+ return func(
658
+ merge(
659
+ {
660
+ label,
661
+ name: scope ? scope + ":" + "Criminal_Charges_Filed" : "Criminal_Charges_Filed",
662
+ options: ["Yes", "No", "Not Sure"],
663
+ },
664
+ updates
665
+ )
666
+ )
667
+ };
489
668
 
490
- const degreeOfInterest = (scope, help) => sbsSelect({
491
- name: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
492
- id: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
493
- label: 'How Likely Are You to Pay if Your Issue Could be Resolved?',
494
- help: help,
495
- options: [
496
- 'Definitely',
497
- 'Probably',
498
- 'Maybe',
499
- "Absolutely Can't Afford"
500
- ]
501
- });
669
+ const degreeOfInterest = (scope, vertical, updates = {}) => {
670
+ const func = vertical ? col2RadioCenter : sbsSelect;
671
+ const label = vertical ? updates.label : "How Likely Are You to Pay if Your Issue Could be Resolved?";
672
+ const help = vertical ? updates.help : "No payment necessary to speak with lawyers.";
673
+ return func(
674
+ merge(
675
+ {
676
+ name: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
677
+ id: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
678
+ label,
679
+ help,
680
+ options: ["Definitely", "Probably", "Maybe", "Absolutely Can't Afford"],
681
+ },
682
+ updates
683
+ )
684
+ )
685
+ };
502
686
 
503
- const degreeOfInterestHelp = (scope) => degreeOfInterest(scope, 'No payment necessary to speak with lawyers.');
687
+ const degreeOfInterestHelp = (scope, vertical, updates = {}) =>
688
+ degreeOfInterest(scope, vertical, merge(updates, { help: "No payment necessary to speak with lawyers." }));
504
689
 
505
- const disabilityConditionStopWork = (scope) => sbsYesNoRadio({
506
- name: scope ? scope + ':' + 'Disability_Condition_Stop_Work' : 'Disability_Condition_Stop_Work',
507
- label: 'Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?'
508
- });
690
+ const disabilityConditionStopWork = (scope, vertical, updates = {}) => {
691
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
692
+ const label = vertical
693
+ ? updates.label
694
+ : "Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?";
695
+ return func(
696
+ merge(
697
+ {
698
+ name: scope ? scope + ":" + "Disability_Condition_Stop_Work" : "Disability_Condition_Stop_Work",
699
+ label,
700
+ },
701
+ updates
702
+ )
703
+ )
704
+ };
509
705
 
510
- const disabilityWorkHistory = (scope) => sbsYesNoRadio({
511
- name: scope ? scope + ':' + 'Disability_Work_History' : 'Disability_Work_History',
512
- label: 'Have You Had a Full-Time Job Within the Past 5 Years?'
513
- });
706
+ const disabilityWorkHistory = (scope, vertical, updates = {}) => {
707
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
708
+ const label = vertical ? updates.label : "Have You Had a Full-Time Job Within the Past 5 Years?";
709
+ return func(
710
+ merge(
711
+ {
712
+ name: scope ? scope + ":" + "Disability_Work_History" : "Disability_Work_History",
713
+ label,
714
+ },
715
+ updates
716
+ )
717
+ )
718
+ };
514
719
 
515
- const doctorTreatment = (scope) => sbsYesNoRadio({
516
- name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
517
- label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
518
- });
720
+ const doctorTreatment = (scope, vertical, updates = {}) => {
721
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
722
+ const label = vertical ? updates.label : "Have You Recently Been Treated by a Doctor, Hospital or Clinic?";
723
+ return func(
724
+ merge(
725
+ {
726
+ name: scope ? scope + ":" + "Doctor_Treatment" : "Doctor_Treatment",
727
+ label,
728
+ },
729
+ updates
730
+ )
731
+ )
732
+ };
519
733
 
520
- const estateLegalServicesNeeded = (scope) => sbsSelect({
521
- name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
522
- label: "Legal Services Needed for Your Estate:",
523
- options: [
524
- "Charitable Giving",
525
- "Contested Wills",
526
- "Drafting Wills or Trust",
527
- "Estate Administration",
528
- "Asset Protection",
529
- "Other"
530
- ]
531
- });
734
+ const estateLegalServicesNeeded = (scope, vertical, updates = {}) => {
735
+ const func = vertical ? col2RadioCenter : sbsSelect;
736
+ const label = vertical ? updates.label : "Legal Services Needed for Your Estate:";
737
+ return func(
738
+ merge(
739
+ {
740
+ name: scope ? scope + ":" + "Estate_Legal_Services_Needed" : "Estate_Legal_Services_Needed",
741
+ label,
742
+ options: [
743
+ "Charitable Giving",
744
+ "Contested Wills",
745
+ "Drafting Wills or Trust",
746
+ "Estate Administration",
747
+ "Asset Protection",
748
+ "Other",
749
+ ],
750
+ },
751
+ updates
752
+ )
753
+ )
754
+ };
532
755
 
533
- const haveAttorney = (scope) => sbsYesNoRadio({
534
- name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
535
- label: 'Already Working with An Attorney?'
536
- });
756
+ const haveAttorney = (scope, vertical, updates = {}) => {
757
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
758
+ const label = vertical ? updates.label : "Already Working with An Attorney?";
759
+ return func(
760
+ merge(
761
+ {
762
+ label,
763
+ name: scope ? scope + ":" + "Have_Attorney" : "Have_Attorney",
764
+ },
765
+ updates
766
+ )
767
+ )
768
+ };
537
769
 
538
- const haveChildren = (scope) => sbsYesNoRadio({
539
- name: scope ? scope + ':' + 'Have_Children' : 'Have_Children',
540
- label: 'Do You Have Children?'
541
- });
770
+ const haveChildren = (scope, vertical, updates = {}) => {
771
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
772
+ const label = vertical ? updates.label : "Do You Have Children?";
773
+ return func(
774
+ merge(
775
+ {
776
+ name: scope ? scope + ":" + "Have_Children" : "Have_Children",
777
+ label,
778
+ },
779
+ updates
780
+ )
781
+ )
782
+ };
542
783
 
543
- const incidentDate = (scope) => sbsDate({
544
- name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
545
- label: 'Date of Incident:',
546
- });
784
+ const incidentDate = (scope, vertical, updates = {}) => {
785
+ const func = vertical ? verticalDate : sbsDate;
786
+ const label = vertical ? updates.label : "Date of Incident:";
787
+ return func(
788
+ merge(
789
+ {
790
+ label,
791
+ name: scope ? scope + ":" + "Incident_Date" : "Incident_Date",
792
+ },
793
+ updates
794
+ )
795
+ )
796
+ };
547
797
 
548
- const lawyerPaymentMethod = (scope) => sbsSelect({
549
- name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
550
- label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
551
- help: 'No payment necessary to speak with lawyers.',
552
- options: [
553
- 'Cash',
554
- 'Check',
555
- 'Credit Card',
556
- 'Friend',
557
- 'Family',
558
- 'Other'
559
- ]
560
- });
798
+ const lawyerPaymentMethod = (scope, vertical, updates = {}) => {
799
+ const func = vertical ? col2RadioCenter : sbsSelect;
800
+ const label = vertical ? updates.label : "How Will You Pay for Legal Fees if You Hire a Lawyer?";
801
+ const help = vertical ? updates.help : "No payment necessary to start a consultation.";
802
+ const options = vertical
803
+ ? {
804
+ Cash: "Cash",
805
+ "Credit Card": "Credit Card",
806
+ Family: "Family or Friend",
807
+ Other: "Other",
808
+ }
809
+ : ["Cash", "Check", "Credit Card", "Friend", "Family", "Other"];
810
+ return func(
811
+ merge(
812
+ {
813
+ label,
814
+ help,
815
+ name: scope ? scope + ":" + "Lawyer_Payment_Method" : "Lawyer_Payment_Method",
816
+ options,
817
+ fieldsetClass: vertical ? "$reset t-flex t-flex-col t-items-center" : undefined,
818
+ },
819
+ updates
820
+ )
821
+ )
822
+ };
561
823
 
562
- const legalCrossSells$1 = () => col2Checkbox({
563
- id: 'Legal_CrossSells',
564
- name: 'Legal_CrossSells',
565
- help: 'Just hit "Next" if none apply',
566
- helpClass: 't-text-center !t-text-sm',
567
- validation: null,
568
- options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
569
- });
824
+ const legalCrossSells$1 = () =>
825
+ col2Checkbox({
826
+ id: "Legal_CrossSells",
827
+ name: "Legal_CrossSells",
828
+ help: 'Just hit "Next" if none apply',
829
+ helpClass: "t-text-center !t-text-sm",
830
+ validation: null,
831
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
832
+ });
833
+
834
+ const maritalStatus = (scope, vertical, updates = {}) => {
835
+ const func = vertical ? col2RadioCenter : sbsSelect;
836
+ const label = vertical ? updates.label : "Marital Status:";
837
+ return func(
838
+ merge(
839
+ {
840
+ label,
841
+ name: scope ? scope + ":" + "Marital_Status" : "Marital_Status",
842
+ options: [
843
+ "Unmarried, Living Together",
844
+ "Unmarried, Do Not Live Together",
845
+ "Married, Living Together",
846
+ "Separated",
847
+ "Divorced",
848
+ "Other",
849
+ ],
850
+ },
851
+ updates
852
+ )
853
+ )
854
+ };
570
855
 
571
- const maritalStatus = (scope) => sbsSelect({
572
- name: scope ? scope + ':' + 'Marital_Status' : 'Marital_Status',
573
- label: 'Marital Status:',
574
- options: [
575
- 'Unmarried, Living Together',
576
- 'Unmarried, Do Not Live Together',
577
- 'Married, Living Together',
578
- 'Separated',
579
- 'Divorced',
580
- 'Other'
581
- ]
582
- });
856
+ // XXX HERE
583
857
 
584
- const pendingCharges = (scope) => sbsYesNoRadio({
585
- name: scope ? scope + ':' + 'Pending_Charges' : 'Pending_Charges',
586
- label: 'Do you currently have any pending charges?'
587
- });
858
+ const pendingCharges = (scope, vertical, updates = {}) => {
859
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
860
+ const label = vertical ? updates.label : "Do you currently have any pending charges?";
861
+ return func(
862
+ merge(
863
+ {
864
+ name: scope ? scope + ":" + "Pending_Charges" : "Pending_Charges",
865
+ label,
866
+ },
867
+ updates
868
+ )
869
+ )
870
+ };
588
871
 
589
- const primaryInjury = (scope) => sbs2ColRadio({
590
- name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
591
- label: 'Primary Injury:',
592
- options: [
593
- "Anxiety",
594
- "Back or Neck Pain",
595
- "Broken Bones",
596
- "Cuts and Bruises",
597
- "Headaches",
598
- "Memory Loss",
599
- "Loss of Limb",
600
- "Not Sure or Other"
601
- ]
602
- });
872
+ const primaryInjury = (scope, vertical, updates = {}) => {
873
+ const func = vertical ? col2RadioCenter : sbs2ColRadio;
874
+ const label = vertical ? updates.label : "Primary Injury:";
875
+ return func(
876
+ merge(
877
+ {
878
+ label,
879
+ name: scope ? scope + ":" + "Primary_Injury" : "Primary_Injury",
880
+ options: [
881
+ "Anxiety",
882
+ "Back or Neck Pain",
883
+ "Broken Bones",
884
+ "Cuts and Bruises",
885
+ "Headaches",
886
+ "Memory Loss",
887
+ "Loss of Limb",
888
+ "Not Sure or Other",
889
+ ],
890
+ },
891
+ updates
892
+ )
893
+ )
894
+ };
603
895
 
604
- const priorAlcoholOffenses = (scope) => sbsYesNoRadio({
605
- name: scope ? scope + ':' + 'Prior_Alcohol_Offenses' : 'Prior_Alcohol_Offenses',
606
- label: 'Any Prior Alcohol Related Offenses?'
607
- });
896
+ const priorAlcoholOffenses = (scope, vertical, updates = {}) => {
897
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
898
+ const label = vertical ? updates.label : "Any Prior Alcohol Related Offenses?";
899
+ return func(
900
+ merge(
901
+ {
902
+ name: scope ? scope + ":" + "Prior_Alcohol_Offenses" : "Prior_Alcohol_Offenses",
903
+ label,
904
+ },
905
+ updates
906
+ )
907
+ )
908
+ };
608
909
 
609
- const policeReportFiled = (scope) => sbsYesNoRadio({
610
- name: scope ? scope + ':' + 'Police_Report_Filed' : 'Police_Report_Filed',
611
- label: 'Was a Police Report Filed?'
612
- });
910
+ const policeReportFiled = (scope, vertical, updates = {}) => {
911
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
912
+ const label = vertical ? updates.label : "Was a Police Report Filed?";
913
+ return func(
914
+ merge(
915
+ {
916
+ name: scope ? scope + ":" + "Police_Report_Filed" : "Police_Report_Filed",
917
+ label,
918
+ },
919
+ updates
920
+ )
921
+ )
922
+ };
613
923
 
614
- const relationshipToVictim = () => sbsSelect({
615
- label: 'Relationship to the Victim:',
616
- name: 'Relationship_To_Victim',
617
- options: [
618
- "Parent",
619
- "Spouse",
620
- "Sibling",
621
- "Friend",
622
- "Other"
623
- ]
624
- });
924
+ const relationshipToVictim = (scope, vertical, updates = {}) => {
925
+ const func = vertical ? col2RadioCenter : sbsSelect;
926
+ const label = vertical ? updates.label : "Relationship to the Victim:";
927
+ return func(
928
+ merge(
929
+ {
930
+ label,
931
+ name: scope ? scope + ":" + "Relationship_To_Victim" : "Relationship_To_Victim",
932
+ options: ["Parent", "Spouse", "Sibling", "Friend", "Other"],
933
+ },
934
+ updates
935
+ )
936
+ )
937
+ };
625
938
 
626
- const roleInMatterProbate = (scope) => sbsSelect({
627
- name: scope ? scope + ':' + 'Role_In_Matter_Probate' : 'Role_In_Matter_Probate',
628
- label: "What Is Your Role in this Matter?",
629
- options: [
630
- "Preparing My Will",
631
- "Executor",
632
- "Heir",
633
- "Other"
634
- ]
635
- });
939
+ const roleInMatterProbate = (scope, vertical, updates = {}) => {
940
+ const func = vertical ? col2RadioCenter : sbsSelect;
941
+ const label = vertical ? updates.label : "What is Your Role in this Matter?";
942
+ return func(
943
+ merge(
944
+ {
945
+ label,
946
+ name: scope ? scope + ":" + "Role_In_Matter_Probate" : "Role_In_Matter_Probate",
947
+ options: ["Preparing My Will", "Executor", "Heir", "Other"],
948
+ },
949
+ updates
950
+ )
951
+ )
952
+ };
636
953
 
637
- const socialSecurityDisabilityReceivingBenefits = (scope) => sbsYesNoRadio({
638
- name: scope ? scope + ':' + 'Social_Security_Disability_Receiving_Benefits' : 'Social_Security_Disability_Receiving_Benefits',
639
- label: 'Are You Currently Receiving Social Security Disability Benefits?'
640
- });
954
+ const socialSecurityDisabilityReceivingBenefits = (scope, vertical, updates = {}) => {
955
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
956
+ const label = vertical ? updates.label : "Are You Currently Receiving Social Security Disability Benefits?";
957
+ return func(
958
+ merge(
959
+ {
960
+ name: scope
961
+ ? scope + ":" + "Social_Security_Disability_Receiving_Benefits"
962
+ : "Social_Security_Disability_Receiving_Benefits",
963
+ label,
964
+ },
965
+ updates
966
+ )
967
+ )
968
+ };
641
969
 
642
970
  const TCPAConsent = (scope) => ({
643
- $formkit: 'checkbox',
644
- label: '$meta.tcpaLanguage',
645
- name: scope ? scope + ':' + 'TCPA_Opt_In' : 'TCPA_Opt_In',
646
- 'data-tf-sensitive': 'false',
647
- validation: 'required|accepted',
971
+ $formkit: "checkbox",
972
+ label: "$meta.tcpaLanguage",
973
+ // Necessary to get links to work in the tcpa language
974
+ __raw__sectionsSchema: {
975
+ label: { attrs: { innerHTML: "$label" } },
976
+ },
977
+ name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
978
+ "data-tf-sensitive": "false",
979
+ validation: "required|accepted",
648
980
  validationMessages: {
649
- required: 'Consent is required',
650
- accepted: 'Consent is required'
981
+ required: "Consent is required",
982
+ accepted: "Consent is required",
651
983
  },
652
984
  classes: {
653
- label: "t-text-xs t-text-slate-500 t-font-normal"
654
- }
985
+ label: "t-text-xs t-text-slate-500 t-font-normal",
986
+ },
655
987
  });
656
988
 
657
- const typeOfAlcoholTest = (scope) => sbsSelect({
658
- name: scope ? scope + ':' + 'Type_Of_Alcohol_Test' : 'Type_Of_Alcohol_Test',
659
- label: 'Type of Alcohol Test Performed?',
660
- options: [
661
- "No Test",
662
- "Refused Test",
663
- "Breath Test",
664
- "Blood Test",
665
- "Urine Test",
666
- "Don't Know"
667
- ]
668
- });
989
+ const typeOfAlcoholTest = (scope, vertical, updates = {}) => {
990
+ const func = vertical ? col2RadioCenter : sbsSelect;
991
+ const label = vertical ? updates.label : "Type of Alcohol Test Performed?";
992
+ return func(
993
+ merge(
994
+ {
995
+ label,
996
+ name: scope ? scope + ":" + "Type_Of_Alcohol_Test" : "Type_Of_Alcohol_Test",
997
+ options: ["No Test", "Refused Test", "Breath Test", "Blood Test", "Urine Test", "Don't Know"],
998
+ },
999
+ updates
1000
+ )
1001
+ )
1002
+ };
669
1003
 
670
- const typeOfAssets = (scope) => col2Checkbox({
671
- name: scope ? scope + ':' + 'Type_Of_Assets' : 'Type_Of_Assets',
672
- label: 'Type of Assets:',
673
- options: [
674
- "Business Interests",
675
- "Cash",
676
- "Life Insurance Policies",
677
- "Pensions/Retirement",
678
- "Personal Possessions",
679
- "Property",
680
- "Stock/Bonds"
681
- ]
682
- });
1004
+ const typeOfAssets = (scope, vertical, updates = {}) => {
1005
+ const func = vertical ? verticalCol2Checkbox : col2Checkbox;
1006
+ const label = vertical ? updates.label : "Type of Assets:";
1007
+ return func(
1008
+ merge(
1009
+ {
1010
+ label,
1011
+ name: scope ? scope + ":" + "Type_Of_Assets" : "Type_Of_Assets",
1012
+ options: [
1013
+ "Business Interests",
1014
+ "Cash",
1015
+ "Life Insurance Policies",
1016
+ "Pensions/Retirement",
1017
+ "Personal Possessions",
1018
+ "Property",
1019
+ "Stock/Bonds",
1020
+ ],
1021
+ },
1022
+ updates
1023
+ )
1024
+ )
1025
+ };
683
1026
 
684
- const valueOfAssets = (scope) => sbsSelect({
685
- name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
686
- label: 'Value of Your Assets?',
687
- options: [
688
- "Less than 50K",
689
- "50K to 100K",
690
- "100K to 250K",
691
- "250K to 500K",
692
- "500K to 1M",
693
- "More than 1M"
694
- ]
695
- });
1027
+ const valueOfAssets = (scope, vertical, updates = {}) => {
1028
+ const func = vertical ? col2RadioCenter : sbsSelect;
1029
+ const label = vertical ? updates.label : "Value of Your Assets?";
1030
+ return func(
1031
+ merge(
1032
+ {
1033
+ label,
1034
+ name: scope ? scope + ":" + "Value_Of_Assets" : "Value_Of_Assets",
1035
+ options: ["Less than 50K", "50K to 100K", "100K to 250K", "250K to 500K", "500K to 1M", "More than 1M"],
1036
+ },
1037
+ updates
1038
+ )
1039
+ )
1040
+ };
696
1041
 
697
- const willsAndTrustsTOLP = () => col2Radio({
698
- label: 'Type of Help Needed:',
699
- name: 'Type_Of_Legal_Problem',
700
- id: 'Type_Of_Legal_Problem',
701
- options: [
702
- 'Wills and Trusts',
703
- 'Probate and Estates',
704
- 'Power of Attorney',
705
- 'Wrongful Death',
706
- 'Not Sure or Other'
707
- ]
708
- });
1042
+ const willsAndTrustsTOLP = (scope, vertical, updates = {}) => {
1043
+ const func = vertical ? col2RadioCenter : col2Radio;
1044
+ const label = vertical ? updates.label : "Type of Help Needed:";
1045
+ return func(
1046
+ merge(
1047
+ {
1048
+ label,
1049
+ id: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
1050
+ name: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
1051
+ options: [
1052
+ "Wills and Trusts",
1053
+ "Probate and Estates",
1054
+ "Power of Attorney",
1055
+ "Wrongful Death",
1056
+ "Not Sure or Other",
1057
+ ],
1058
+ },
1059
+ updates
1060
+ )
1061
+ )
1062
+ };
709
1063
 
710
- // ------ Question Groups
1064
+ // ------ Question Groups - TODO: move these go separate file groups.js
711
1065
 
712
1066
  // NOTE: name must be unique within a form!
713
1067
  const group = (name, updates) => {
714
- return merge({
715
- $cmp: 'FormKit',
716
- props: {
717
- type: 'group',
718
- key: name,
719
- id: name,
720
- name: name
721
- }
722
- }, updates)
1068
+ return merge(
1069
+ {
1070
+ $cmp: "FormKit",
1071
+ props: {
1072
+ type: "group",
1073
+ key: name,
1074
+ id: name,
1075
+ name: name,
1076
+ },
1077
+ },
1078
+ updates
1079
+ )
723
1080
  };
724
1081
 
725
- const AutoAndCarAccidentsQuestions = (condition, scope) => group(
726
- 'AutoAndCarAccidentsQuestions',
727
- {
728
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"'),
1082
+ const AutoAndCarAccidentsQuestions = (condition, scope) =>
1083
+ group("AutoAndCarAccidentsQuestions", {
1084
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"',
729
1085
  children: [
730
1086
  haveAttorney(scope),
731
1087
  incidentDate(scope),
732
1088
  atFault(scope),
733
1089
  primaryInjury(scope),
734
1090
  doctorTreatment(scope),
735
- policeReportFiled(scope)
736
- ]
737
- }
738
- );
1091
+ policeReportFiled(scope),
1092
+ ],
1093
+ });
739
1094
 
740
- const ChildCustodyQuestions = (condition, scope) => group(
741
- 'ChildCustodyQuestions',
742
- {
743
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"'),
1095
+ const ChildCustodyQuestions = (condition, scope) =>
1096
+ group("ChildCustodyQuestions", {
1097
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"',
744
1098
  children: [
745
1099
  haveAttorney(scope),
746
1100
  childRelationship(scope),
747
1101
  childHome(scope),
748
1102
  childPrimaryCaregiver(scope),
749
1103
  degreeOfInterest(scope),
750
- lawyerPaymentMethod(scope)
751
- ]
752
- }
753
- );
1104
+ lawyerPaymentMethod(scope),
1105
+ ],
1106
+ });
754
1107
 
755
- const DivorceQuestions = (condition, scope) => group(
756
- 'DivorceQuestions',
757
- {
758
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"'),
1108
+ const DivorceQuestions = (condition, scope) =>
1109
+ group("DivorceQuestions", {
1110
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"',
759
1111
  children: [
760
1112
  haveAttorney(scope),
761
1113
  maritalStatus(scope),
762
1114
  haveChildren(scope),
763
1115
  degreeOfInterest(scope),
764
- lawyerPaymentMethod(scope)
765
- ]
766
- }
767
- );
1116
+ lawyerPaymentMethod(scope),
1117
+ ],
1118
+ });
768
1119
 
769
- const DUIAndDWIQuestions = (condition, scope) => group(
770
- 'DUIAndDWIQuestions',
771
- {
772
- if: (condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"'),
1120
+ const DUIAndDWIQuestions = (condition, scope) =>
1121
+ group("DUIAndDWIQuestions", {
1122
+ if: condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"',
773
1123
  children: [
774
1124
  haveAttorney(scope),
775
1125
  incidentDate(scope),
@@ -777,147 +1127,124 @@ const DUIAndDWIQuestions = (condition, scope) => group(
777
1127
  typeOfAlcoholTest(scope),
778
1128
  bloodContentAlcoholTest(scope),
779
1129
  pendingCharges(scope),
780
- degreeOfInterestHelp(scope)
781
- ]
782
- }
783
- );
1130
+ degreeOfInterestHelp(scope),
1131
+ ],
1132
+ });
784
1133
 
785
- const FamilyIssuesQuestions = () => group(
786
- 'FamilyIssuesQuestions',
787
- {
788
- if: '$get(Type_Of_Legal_Problem).value == "Family Issues"',
1134
+ const FamilyIssuesQuestions = (condition, scope) =>
1135
+ group("FamilyIssuesQuestions", {
1136
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Family Issues"',
789
1137
  children: [
790
- haveAttorney(),
791
- maritalStatus(),
792
- haveChildren(),
793
- degreeOfInterest(),
794
- lawyerPaymentMethod()
795
- ]
796
- }
797
- );
1138
+ haveAttorney(scope),
1139
+ maritalStatus(scope),
1140
+ haveChildren(scope),
1141
+ degreeOfInterest(scope),
1142
+ lawyerPaymentMethod(scope),
1143
+ ],
1144
+ });
798
1145
 
799
- const PersonalInjuryQuestions = (condition, scope) => group(
800
- 'PersonalInjuryQuestions',
801
- {
802
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"'),
1146
+ const PersonalInjuryQuestions = (condition, scope) =>
1147
+ group("PersonalInjuryQuestions", {
1148
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"',
803
1149
  children: [
804
1150
  haveAttorney(scope),
805
1151
  incidentDate(scope),
806
1152
  claimStatus(scope),
807
1153
  atFault(scope),
808
1154
  primaryInjury(scope),
809
- doctorTreatment(scope)
810
- ]
811
- }
812
- );
1155
+ doctorTreatment(scope),
1156
+ ],
1157
+ });
813
1158
 
814
- const PowerofAttorneyQuestions = (condition, scope) => group(
815
- 'PowerofAttorneyQuestions',
816
- {
817
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"'),
1159
+ const PowerofAttorneyQuestions = (condition, scope) =>
1160
+ group("PowerofAttorneyQuestions", {
1161
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"',
1162
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1163
+ });
1164
+
1165
+ const ProbateAndEstatesQuestions = (condition, scope) =>
1166
+ group("ProbateAndEstatesQuestions", {
1167
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Probate and Estates"',
818
1168
  children: [
819
1169
  haveAttorney(scope),
820
- degreeOfInterestHelp(scope)
821
- ]
822
- }
823
- );
1170
+ valueOfAssets(scope),
1171
+ typeOfAssets(scope),
1172
+ roleInMatterProbate(scope),
1173
+ estateLegalServicesNeeded(scope),
1174
+ degreeOfInterestHelp(scope),
1175
+ ],
1176
+ });
824
1177
 
825
- const ProbateAndEstatesQuestions = () => group(
826
- 'ProbateAndEstatesQuestions',
827
- {
828
- if: '$get(Type_Of_Legal_Problem).value == "Probate and Estates"',
829
- children: [
830
- haveAttorney(),
831
- valueOfAssets(),
832
- typeOfAssets(),
833
- roleInMatterProbate(),
834
- estateLegalServicesNeeded(),
835
- degreeOfInterestHelp()
836
- ]
837
- }
838
- );
839
-
840
- const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) => group(
841
- 'SocialSecurityDisabilityAndInsuranceQuestions',
842
- {
843
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"'),
1178
+ const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) =>
1179
+ group("SocialSecurityDisabilityAndInsuranceQuestions", {
1180
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"',
844
1181
  children: [
845
1182
  haveAttorney(scope),
846
1183
  applicantAge(scope),
847
1184
  disabilityConditionStopWork(scope),
848
1185
  disabilityWorkHistory(scope),
849
1186
  socialSecurityDisabilityReceivingBenefits(scope),
850
- doctorTreatment(scope)
851
- ]
852
- }
853
- );
1187
+ doctorTreatment(scope),
1188
+ ],
1189
+ });
854
1190
 
855
- const WillsAndTrustsQuestions = (condition, scope) => group(
856
- 'WillsAndTrustsQuestions',
857
- {
858
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"'),
1191
+ const WillsAndTrustsQuestions = (condition, scope) =>
1192
+ group("WillsAndTrustsQuestions", {
1193
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"',
859
1194
  children: [
860
1195
  haveAttorney(scope),
861
1196
  valueOfAssets(scope),
862
1197
  typeOfAssets(scope),
863
1198
  roleInMatterProbate(scope),
864
1199
  estateLegalServicesNeeded(scope),
865
- degreeOfInterestHelp(scope)
866
- ]
867
- }
868
- );
1200
+ degreeOfInterestHelp(scope),
1201
+ ],
1202
+ });
869
1203
 
870
- const WorkersCompensationQuestions = (condition, scope) => group(
871
- 'WorkersCompensationQuestions',
872
- {
873
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"'),
1204
+ const WorkersCompensationQuestions = (condition, scope) =>
1205
+ group("WorkersCompensationQuestions", {
1206
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"',
874
1207
  children: [
875
1208
  haveAttorney(scope),
876
1209
  incidentDate(scope),
877
1210
  claimStatus(scope),
878
1211
  primaryInjury(scope),
879
1212
  causeOfInjury(scope),
880
- doctorTreatment(scope)
881
- ]
882
- }
883
- );
1213
+ doctorTreatment(scope),
1214
+ ],
1215
+ });
884
1216
 
885
- const WrongfulDeathQuestions = () => group(
886
- 'WrongfulDeathQuestions',
887
- {
888
- if: '$get(Type_Of_Legal_Problem).value == "Wrongful Death"',
1217
+ const WrongfulDeathQuestions = (condition, scope) =>
1218
+ group("WrongfulDeathQuestions", {
1219
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Wrongful Death"',
889
1220
  children: [
890
- haveAttorney(),
891
- incidentDate(),
892
- relationshipToVictim(),
893
- criminalChargesFiled(),
894
- causeOfDeath()
895
- ]
896
- }
897
- );
1221
+ haveAttorney(scope),
1222
+ incidentDate(scope),
1223
+ relationshipToVictim(scope),
1224
+ criminalChargesFiled(scope),
1225
+ causeOfDeath(scope),
1226
+ ],
1227
+ });
898
1228
 
899
- const NotSureOrOtherQuestions = () => group(
900
- 'NotSureOrOtherQuestions',
901
- {
902
- if: '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
903
- children: [
904
- haveAttorney(),
905
- degreeOfInterestHelp()
906
- ]
907
- }
908
- );
1229
+ const NotSureOrOtherQuestions = (condition, scope) =>
1230
+ group("NotSureOrOtherQuestions", {
1231
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
1232
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1233
+ });
909
1234
 
910
- const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
911
- const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
1235
+ const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
1236
+ const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
912
1237
 
913
- const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
1238
+ const isInput = (n) => {
1239
+ return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
1240
+ };
914
1241
 
915
1242
  const findLastInput = (n) => {
916
1243
  if (isInput(n)) {
917
1244
  return n
918
1245
  }
919
1246
  for (var i = n.children.length - 1; i >= 0; i--) {
920
- if (typeof n.children === 'string') {
1247
+ if (typeof n.children === "string") {
921
1248
  continue
922
1249
  }
923
1250
  const child = n.children[i];
@@ -933,126 +1260,138 @@ const findLastInput = (n) => {
933
1260
  };
934
1261
 
935
1262
  const secureIconDefault = {
936
- $el: 'div',
937
- if: '$activeStep === $lastStep()',
1263
+ $el: "div",
1264
+ if: "$activeStep === $lastStep()",
938
1265
  attrs: {
939
- class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
1266
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
940
1267
  },
941
1268
  children: [
942
1269
  {
943
- $el: 'img',
1270
+ $el: "img",
944
1271
  attrs: {
945
- loading: 'lazy',
946
- alt: '',
1272
+ loading: "lazy",
1273
+ alt: "",
947
1274
  style: {
948
- border: 0
1275
+ border: 0,
949
1276
  },
950
- width: '25',
951
- height: '25',
952
- src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
953
- }
1277
+ width: "25",
1278
+ height: "25",
1279
+ src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
1280
+ },
954
1281
  },
955
1282
  {
956
- $el: 'span',
957
- children: 'Secure & Encrypted',
1283
+ $el: "span",
1284
+ children: "Secure & Encrypted",
958
1285
  attrs: {
959
- class: 't-pl-2 t-pt-1 t-font-medium'
960
- }
961
- }
962
- ]
1286
+ class: "t-pl-2 t-pt-1 t-font-medium",
1287
+ },
1288
+ },
1289
+ ],
963
1290
  };
964
1291
 
965
1292
  function secureIcon(updates) {
966
- return merge(
967
- secureIconDefault,
968
- updates
969
- )
1293
+ return merge(secureIconDefault, updates)
970
1294
  }
971
1295
 
972
1296
  function questionsStepHeadline(updates) {
973
1297
  return {
974
- $el: 'h3',
975
- children: updates.headline || 'Tell Us About Your Situation',
1298
+ $el: "h3",
1299
+ children: updates.headline || "Tell Us About Your Situation",
976
1300
  attrs: {
977
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
978
- }
1301
+ class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1",
1302
+ },
979
1303
  }
980
1304
  }
981
1305
 
982
1306
  function crossSellQuestionsStepHeadline(updates) {
983
1307
  return {
984
- $el: 'h3',
985
- children: updates.headline || 'Tell Us About Your Situation',
1308
+ $el: "h3",
1309
+ children: updates.headline || "Tell Us About Your Situation",
986
1310
  attrs: {
987
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
988
- }
1311
+ class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1",
1312
+ },
989
1313
  }
990
1314
  }
991
1315
 
992
1316
  function crossSellQuestionsStepSubHeadline(updates) {
993
1317
  return {
994
- $el: 'h5',
995
- children: updates.subheadline || 'Tell us about your situation:',
1318
+ $el: "h5",
1319
+ children: updates.subheadline || "Tell us about your situation:",
996
1320
  attrs: {
997
- class: 't-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3'
998
- }
1321
+ class: "t-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3",
1322
+ },
999
1323
  }
1000
1324
  }
1001
1325
 
1002
1326
  function commentsStepHeadline(updates) {
1003
1327
  return {
1004
- $el: 'h3',
1005
- children: updates.headline || 'Additional Details',
1328
+ $el: "h3",
1329
+ children: updates.headline || "Additional Details",
1006
1330
  attrs: {
1007
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1008
- }
1331
+ class:
1332
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1333
+ " " +
1334
+ (updates.headlineClass || ""),
1335
+ },
1009
1336
  }
1010
1337
  }
1011
1338
 
1012
1339
  function commentsStepHeadlineLegal(updates) {
1013
1340
  return commentsStepHeadline({
1014
- headline: updates.headline || 'Additional Case Details',
1015
- headlineClass: updates.headlineClass
1341
+ headline: updates.headline || "Additional Case Details",
1342
+ headlineClass: updates.headlineClass,
1016
1343
  })
1017
1344
  }
1018
1345
 
1019
1346
  function firstAndLastStepHeadline(updates) {
1020
1347
  return {
1021
- $el: 'h3',
1022
- children: updates.headline || 'Please Provide a Contact Name',
1348
+ $el: "h3",
1349
+ children: updates.headline || "Please Provide a Contact Name",
1023
1350
  attrs: {
1024
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1025
- }
1351
+ class:
1352
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1353
+ " " +
1354
+ (updates.headlineClass || ""),
1355
+ },
1026
1356
  }
1027
1357
  }
1028
1358
 
1029
1359
  function legalCrossSellsStepHeadline(updates) {
1030
1360
  return {
1031
- $el: 'h3',
1032
- children: updates.headline || 'Do any of the following situations apply?',
1361
+ $el: "h3",
1362
+ children: updates.headline || "Do any of the following situations apply?",
1033
1363
  attrs: {
1034
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1035
- }
1364
+ class:
1365
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1366
+ " " +
1367
+ (updates.headlineClass || ""),
1368
+ },
1036
1369
  }
1037
1370
  }
1038
1371
 
1039
1372
  function contactStepHeadline(updates) {
1040
1373
  return {
1041
- $el: 'h3',
1374
+ $el: "h3",
1042
1375
  children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
1043
1376
  attrs: {
1044
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1045
- }
1377
+ class:
1378
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1" +
1379
+ " " +
1380
+ (updates.headlineClass || ""),
1381
+ },
1046
1382
  }
1047
1383
  }
1048
1384
 
1049
1385
  function contactStepSubHeadline(updates) {
1050
1386
  return {
1051
- $el: 'h5',
1387
+ $el: "h5",
1052
1388
  children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
1053
1389
  attrs: {
1054
- class: 't-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3' + ' ' + (updates.subheadlineClass || '')
1055
- }
1390
+ class:
1391
+ "t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3" +
1392
+ " " +
1393
+ (updates.subheadlineClass || ""),
1394
+ },
1056
1395
  }
1057
1396
  }
1058
1397
 
@@ -1074,19 +1413,19 @@ const TRUSTED_FORM_JS = `(function() {
1074
1413
 
1075
1414
  function trustedFormScript() {
1076
1415
  return {
1077
- $el: 'script',
1078
- if: '$activeStep === $lastStep()',
1079
- children: TRUSTED_FORM_JS
1416
+ $el: "script",
1417
+ if: "$activeStep === $lastStep()",
1418
+ children: TRUSTED_FORM_JS,
1080
1419
  }
1081
1420
  }
1082
1421
 
1083
1422
  const stepDefaults = (step, stepKey) => ({
1084
- $el: 'section',
1423
+ $el: "section",
1085
1424
  if: '$stepEnabled("' + step + '")',
1086
1425
  attrs: {
1087
1426
  hidden: '$activeStep !== "' + step + '"',
1088
- key: stepKey ? stepKey : step
1089
- }
1427
+ key: stepKey ? stepKey : step,
1428
+ },
1090
1429
  });
1091
1430
 
1092
1431
  function step(name, inputs, updates = {}) {
@@ -1109,27 +1448,24 @@ function step(name, inputs, updates = {}) {
1109
1448
  }
1110
1449
  }
1111
1450
 
1112
- return merge(
1113
- stepDefaults(name, stepKey),
1114
- {
1115
- children: [
1116
- {
1117
- $formkit: 'group',
1118
- id: name,
1119
- name: name,
1120
- nextStepMap: nextStepMap,
1121
- triggerRedirectMap: triggerRedirectMap,
1122
- autoFocus: autoFocus,
1123
- children: inputs
1124
- }
1125
- ]
1126
- }
1127
- )
1451
+ return merge(stepDefaults(name, stepKey), {
1452
+ children: [
1453
+ {
1454
+ $formkit: "group",
1455
+ id: name,
1456
+ name: name,
1457
+ nextStepMap: nextStepMap,
1458
+ triggerRedirectMap: triggerRedirectMap,
1459
+ autoFocus: autoFocus,
1460
+ children: inputs,
1461
+ },
1462
+ ],
1463
+ })
1128
1464
  }
1129
1465
 
1130
1466
  function contactInfo(updates = {}) {
1131
1467
  return step(
1132
- 'contactInfo',
1468
+ "contactInfo",
1133
1469
  [
1134
1470
  contactStepHeadline(updates),
1135
1471
  contactStepSubHeadline(updates),
@@ -1137,7 +1473,7 @@ function contactInfo(updates = {}) {
1137
1473
  email(updates.scope),
1138
1474
  phone(updates.scope),
1139
1475
  TCPAConsent(updates.scope),
1140
- secureIcon()
1476
+ secureIcon(),
1141
1477
  ],
1142
1478
  { nextOnEnter: false }
1143
1479
  )
@@ -1145,39 +1481,35 @@ function contactInfo(updates = {}) {
1145
1481
 
1146
1482
  function firstAndLastV2(updates = {}) {
1147
1483
  return step(
1148
- 'firstAndLast',
1149
- [
1150
- firstAndLastStepHeadline(updates),
1151
- firstName(),
1152
- lastName()
1153
- ],
1484
+ "firstAndLast",
1485
+ [firstAndLastStepHeadline(updates), firstName(updates.scope), lastName(updates.scope)],
1154
1486
  updates
1155
1487
  )
1156
1488
  }
1157
1489
 
1158
1490
  function commentsWithBankruptcy(updates = {}) {
1159
1491
  return step(
1160
- 'commentsWithBankruptcy',
1492
+ "commentsWithBankruptcy",
1161
1493
  [
1162
1494
  commentsStepHeadlineLegal(updates),
1163
- comments({
1164
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1495
+ comments(updates.scope, false, {
1496
+ label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1165
1497
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1166
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1167
- }, updates.scope),
1498
+ inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1499
+ }),
1168
1500
  // TODO: needs scope support
1169
1501
  bankruptcyCrossSell(),
1170
1502
  {
1171
- $el: 'div',
1172
- if: '$get(CrossSell_Bankruptcy).value == true',
1503
+ $el: "div",
1504
+ if: "$get(CrossSell_Bankruptcy).value == true",
1173
1505
  children: [
1174
- comments({
1175
- label: 'Bankruptcy or debt details:',
1176
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1177
- inputClass: '!t-h-16'
1178
- }, 'CrossSell:Bankruptcy')
1506
+ comments("CrossSell:Bankruptcy", false, {
1507
+ label: "Bankruptcy or debt details:",
1508
+ placeholder: "Please describe your bankrtupcy or debt situation in a few words...",
1509
+ inputClass: "!t-h-16",
1510
+ }),
1179
1511
  ],
1180
- }
1512
+ },
1181
1513
  ],
1182
1514
  { nextOnEnter: false }
1183
1515
  )
@@ -1185,19 +1517,20 @@ function commentsWithBankruptcy(updates = {}) {
1185
1517
 
1186
1518
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1187
1519
  return step(
1188
- 'autoAndCarAccidentCrossSellQuestions',
1520
+ "autoAndCarAccidentCrossSellQuestions",
1189
1521
  [
1190
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1191
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
1192
- AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
1193
- comments(
1194
- {
1195
- label: 'Accident Description:',
1196
- placeholder: 'Please describe your accident in a few words...',
1197
- inputClass: '!t-h-16'
1198
- },
1199
- 'CrossSell:Auto_and_Car_Accidents'
1200
- )
1522
+ crossSellQuestionsStepHeadline({
1523
+ headline: "You May Be Entitled To Compensation",
1524
+ }),
1525
+ crossSellQuestionsStepSubHeadline({
1526
+ subheadline: "Tell us about your accident:",
1527
+ }),
1528
+ AutoAndCarAccidentsQuestions("true", "CrossSell:Auto_and_Car_Accidents"),
1529
+ comments("CrossSell:Auto_and_Car_Accidents", false, {
1530
+ label: "Accident Description:",
1531
+ placeholder: "Please describe your accident in a few words...",
1532
+ inputClass: "!t-h-16",
1533
+ }),
1201
1534
  ],
1202
1535
  updates
1203
1536
  )
@@ -1205,18 +1538,15 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1205
1538
 
1206
1539
  function childCustodyCrossSellQuestions(updates = {}) {
1207
1540
  return step(
1208
- 'childCustodyCrossSellQuestions',
1541
+ "childCustodyCrossSellQuestions",
1209
1542
  [
1210
- crossSellQuestionsStepHeadline({ headline: 'Child Custody Information' }),
1211
- ChildCustodyQuestions("true", 'CrossSell:Child_Custody'),
1212
- comments(
1213
- {
1214
- label: 'Description:',
1215
- placeholder: 'Please describe your situation in a few words...',
1216
- inputClass: '!t-h-16'
1217
- },
1218
- 'CrossSell:Child_Custody'
1219
- )
1543
+ crossSellQuestionsStepHeadline({ headline: "Child Custody Information" }),
1544
+ ChildCustodyQuestions("true", "CrossSell:Child_Custody"),
1545
+ comments("CrossSell:Child_Custody", false, {
1546
+ label: "Description:",
1547
+ placeholder: "Please describe your situation in a few words...",
1548
+ inputClass: "!t-h-16",
1549
+ }),
1220
1550
  ],
1221
1551
  updates
1222
1552
  )
@@ -1224,18 +1554,17 @@ function childCustodyCrossSellQuestions(updates = {}) {
1224
1554
 
1225
1555
  function divorceAndSeparationCrossSellQuestions(updates = {}) {
1226
1556
  return step(
1227
- 'divorceAndSeparationCrossSellQuestions',
1557
+ "divorceAndSeparationCrossSellQuestions",
1228
1558
  [
1229
- crossSellQuestionsStepHeadline({ headline: 'Divorce or Separation Information' }),
1230
- DivorceQuestions("true", 'CrossSell:Divorce_and_Separation'),
1231
- comments(
1232
- {
1233
- label: 'Description:',
1234
- placeholder: 'Please describe your situation in a few words...',
1235
- inputClass: '!t-h-16'
1236
- },
1237
- 'CrossSell:Divorce_and_Separation'
1238
- )
1559
+ crossSellQuestionsStepHeadline({
1560
+ headline: "Divorce or Separation Information",
1561
+ }),
1562
+ DivorceQuestions("true", "CrossSell:Divorce_and_Separation"),
1563
+ comments("CrossSell:Divorce_and_Separation", false, {
1564
+ label: "Description:",
1565
+ placeholder: "Please describe your situation in a few words...",
1566
+ inputClass: "!t-h-16",
1567
+ }),
1239
1568
  ],
1240
1569
  updates
1241
1570
  )
@@ -1243,18 +1572,15 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
1243
1572
 
1244
1573
  function duiAndDWICrossSellQuestions(updates = {}) {
1245
1574
  return step(
1246
- 'duiAndDWICrossSellQuestions',
1575
+ "duiAndDWICrossSellQuestions",
1247
1576
  [
1248
- crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
1249
- DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
1250
- comments(
1251
- {
1252
- label: 'Incident Description:',
1253
- placeholder: 'Please describe your incident in a few words...',
1254
- inputClass: '!t-h-16'
1255
- },
1256
- 'CrossSell:DUI_and_DWI'
1257
- )
1577
+ crossSellQuestionsStepHeadline({ headline: "About Your DUI/DWI" }),
1578
+ DUIAndDWIQuestions("true", "CrossSell:DUI_and_DWI"),
1579
+ comments("CrossSell:DUI_and_DWI", false, {
1580
+ label: "Incident Description:",
1581
+ placeholder: "Please describe your incident in a few words...",
1582
+ inputClass: "!t-h-16",
1583
+ }),
1258
1584
  ],
1259
1585
  updates
1260
1586
  )
@@ -1262,19 +1588,20 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1262
1588
 
1263
1589
  function ssdiCrossSellQuestions(updates = {}) {
1264
1590
  return step(
1265
- 'ssdiCrossSellQuestions',
1591
+ "ssdiCrossSellQuestions",
1266
1592
  [
1267
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1268
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
1269
- SocialSecurityDisabilityAndInsuranceQuestions("true", 'CrossSell:Social_Security_Disability_and_Insurance'),
1270
- comments(
1271
- {
1272
- label: 'Description:',
1273
- placeholder: 'Please describe your situation in a few words...',
1274
- inputClass: '!t-h-16'
1275
- },
1276
- 'CrossSell:Social_Security_Disability_and_Insurance'
1277
- )
1593
+ crossSellQuestionsStepHeadline({
1594
+ headline: "You May Be Entitled To Benefits",
1595
+ }),
1596
+ crossSellQuestionsStepSubHeadline({
1597
+ subheadline: "Tell us about your disability:",
1598
+ }),
1599
+ SocialSecurityDisabilityAndInsuranceQuestions("true", "CrossSell:Social_Security_Disability_and_Insurance"),
1600
+ comments("CrossSell:Social_Security_Disability_and_Insurance", false, {
1601
+ label: "Description:",
1602
+ placeholder: "Please describe your situation in a few words...",
1603
+ inputClass: "!t-h-16",
1604
+ }),
1278
1605
  ],
1279
1606
  updates
1280
1607
  )
@@ -1282,19 +1609,20 @@ function ssdiCrossSellQuestions(updates = {}) {
1282
1609
 
1283
1610
  function personalInjuryCrossSellQuestions(updates = {}) {
1284
1611
  return step(
1285
- 'personalInjuryCrossSellQuestions',
1612
+ "personalInjuryCrossSellQuestions",
1286
1613
  [
1287
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1288
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1289
- PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
1290
- comments(
1291
- {
1292
- label: 'Injury Description:',
1293
- placeholder: 'Please describe your injury in a few words...',
1294
- inputClass: '!t-h-16'
1295
- },
1296
- 'CrossSell:Personal_Injury'
1297
- )
1614
+ crossSellQuestionsStepHeadline({
1615
+ headline: "You May Be Entitled To Compensation",
1616
+ }),
1617
+ crossSellQuestionsStepSubHeadline({
1618
+ subheadline: "Tell us about your injury:",
1619
+ }),
1620
+ PersonalInjuryQuestions("true", "CrossSell:Personal_Injury"),
1621
+ comments("CrossSell:Personal_Injury", false, {
1622
+ label: "Injury Description:",
1623
+ placeholder: "Please describe your injury in a few words...",
1624
+ inputClass: "!t-h-16",
1625
+ }),
1298
1626
  ],
1299
1627
  updates
1300
1628
  )
@@ -1302,18 +1630,17 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1302
1630
 
1303
1631
  function powerOfAttorneyCrossSellQuestions(updates = {}) {
1304
1632
  return step(
1305
- 'powerOfAttorneyCrossSellQuestions',
1633
+ "powerOfAttorneyCrossSellQuestions",
1306
1634
  [
1307
- crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
1308
- PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
1309
- comments(
1310
- {
1311
- label: 'Description:',
1312
- placeholder: 'Please describe your situation in a few words...',
1313
- inputClass: '!t-h-16'
1314
- },
1315
- 'CrossSell:Power_of_Attorney'
1316
- )
1635
+ crossSellQuestionsStepHeadline({
1636
+ headline: "Power of Attorney Information",
1637
+ }),
1638
+ PowerofAttorneyQuestions("true", "CrossSell:Power_of_Attorney"),
1639
+ comments("CrossSell:Power_of_Attorney", false, {
1640
+ label: "Description:",
1641
+ placeholder: "Please describe your situation in a few words...",
1642
+ inputClass: "!t-h-16",
1643
+ }),
1317
1644
  ],
1318
1645
  updates
1319
1646
  )
@@ -1321,18 +1648,15 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1321
1648
 
1322
1649
  function willsAndTrustsCrossSellQuestions(updates = {}) {
1323
1650
  return step(
1324
- 'willsAndTrustsCrossSellQuestions',
1651
+ "willsAndTrustsCrossSellQuestions",
1325
1652
  [
1326
- crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
1327
- WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
1328
- comments(
1329
- {
1330
- label: 'Description:',
1331
- placeholder: 'Please describe your situation in a few words...',
1332
- inputClass: '!t-h-16'
1333
- },
1334
- 'CrossSell:Wills_and_Trusts'
1335
- )
1653
+ crossSellQuestionsStepHeadline({ headline: "Will or Trust Information" }),
1654
+ WillsAndTrustsQuestions("true", "CrossSell:Wills_and_Trusts"),
1655
+ comments("CrossSell:Wills_and_Trusts", false, {
1656
+ label: "Description:",
1657
+ placeholder: "Please describe your situation in a few words...",
1658
+ inputClass: "!t-h-16",
1659
+ }),
1336
1660
  ],
1337
1661
  updates
1338
1662
  )
@@ -1340,19 +1664,20 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1340
1664
 
1341
1665
  function workersCompensationCrossSellQuestions(updates = {}) {
1342
1666
  return step(
1343
- 'workersCompensationCrossSellQuestions',
1667
+ "workersCompensationCrossSellQuestions",
1344
1668
  [
1345
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1346
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1347
- WorkersCompensationQuestions("true", 'CrossSell:Workers_Compensation'),
1348
- comments(
1349
- {
1350
- label: 'Injury Description:',
1351
- placeholder: 'Please describe your injury in a few words...',
1352
- inputClass: '!t-h-16'
1353
- },
1354
- 'CrossSell:Workers_Compensation'
1355
- )
1669
+ crossSellQuestionsStepHeadline({
1670
+ headline: "You May Be Entitled To Benefits",
1671
+ }),
1672
+ crossSellQuestionsStepSubHeadline({
1673
+ subheadline: "Tell us about your injury:",
1674
+ }),
1675
+ WorkersCompensationQuestions("true", "CrossSell:Workers_Compensation"),
1676
+ comments("CrossSell:Workers_Compensation", false, {
1677
+ label: "Injury Description:",
1678
+ placeholder: "Please describe your injury in a few words...",
1679
+ inputClass: "!t-h-16",
1680
+ }),
1356
1681
  ],
1357
1682
  updates
1358
1683
  )
@@ -1360,32 +1685,17 @@ function workersCompensationCrossSellQuestions(updates = {}) {
1360
1685
 
1361
1686
  function legalCrossSells(updates = {}) {
1362
1687
  updates.nextOnInput = false;
1363
- updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1364
- return step(
1365
- 'legalCrossSells',
1366
- [
1367
- legalCrossSellsStepHeadline(updates),
1368
- legalCrossSells$1(),
1369
- ],
1370
- updates
1371
- )
1688
+ updates.stepKey = "$get(Type_Of_Legal_Problem).value";
1689
+ return step("legalCrossSells", [legalCrossSellsStepHeadline(updates), legalCrossSells$1()], updates)
1372
1690
  }
1373
1691
 
1374
-
1375
1692
  function willsAndTrustsTOLPAndZip(updates = {}) {
1376
- return step(
1377
- 'willsAndTrustsTOLPAndZip',
1378
- [
1379
- willsAndTrustsTOLP(),
1380
- zipcode()
1381
- ],
1382
- updates
1383
- )
1693
+ return step("willsAndTrustsTOLPAndZip", [willsAndTrustsTOLP(updates.scope), zipcode(updates.scope)], updates)
1384
1694
  }
1385
1695
 
1386
1696
  function willsAndTrustsTOLPQuestions(updates = {}) {
1387
1697
  return step(
1388
- 'TOLPQuestions',
1698
+ "TOLPQuestions",
1389
1699
  [
1390
1700
  questionsStepHeadline(updates),
1391
1701
  WillsAndTrustsQuestions(),
@@ -1393,118 +1703,118 @@ function willsAndTrustsTOLPQuestions(updates = {}) {
1393
1703
  PowerofAttorneyQuestions(),
1394
1704
  WrongfulDeathQuestions(),
1395
1705
  FamilyIssuesQuestions(),
1396
- NotSureOrOtherQuestions()
1706
+ NotSureOrOtherQuestions(),
1397
1707
  ],
1398
1708
  updates
1399
1709
  )
1400
1710
  }
1401
1711
 
1402
1712
  const formNavigation = (updates = {}) => ({
1403
- $el: 'div',
1713
+ $el: "div",
1404
1714
  attrs: {
1405
- class: 'step-nav'
1715
+ class: "step-nav",
1406
1716
  },
1407
1717
  children: [
1408
1718
  {
1409
- $formkit: 'button',
1410
- name: 'back_button',
1411
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1412
- children: 'Back',
1719
+ $formkit: "button",
1720
+ name: "back_button",
1721
+ onClick: "$setPreviousStep($prevStepFunc($get(form)))",
1722
+ children: "Back",
1413
1723
  style: {
1414
- if: '$activeStep === $firstStep()',
1415
- then: 'visibility: hidden;'
1416
- }
1724
+ if: "$activeStep === $firstStep()",
1725
+ then: "visibility: hidden;",
1726
+ },
1417
1727
  },
1418
1728
  {
1419
- $formkit: 'button',
1420
- name: 'next_button',
1421
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1729
+ $formkit: "button",
1730
+ name: "next_button",
1731
+ onClick: "$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",
1422
1732
  children: {
1423
- if: '$activeStep === $firstStep()',
1424
- then: 'Start',
1425
- else: 'Next'
1733
+ if: "$activeStep === $firstStep()",
1734
+ then: "Start",
1735
+ else: "Next",
1426
1736
  },
1427
1737
  outerClass: {
1428
- if: '$activeStep === $lastStep()',
1429
- then: 't-hidden',
1430
- else: ''
1738
+ if: "$activeStep === $lastStep()",
1739
+ then: "t-hidden",
1740
+ else: "",
1431
1741
  },
1432
1742
  style: {
1433
- if: '$activeStep === $lastStep()',
1434
- then: 'display: none;'
1435
- }
1743
+ if: "$activeStep === $lastStep()",
1744
+ then: "display: none;",
1745
+ },
1436
1746
  },
1437
1747
  {
1438
- $formkit: 'submit',
1439
- name: 'submit_button',
1440
- label: updates.submitLabel || 'Submit',
1441
- if: '$activeStep === $lastStep()',
1748
+ $formkit: "submit",
1749
+ name: "submit_button",
1750
+ label: updates.submitLabel || "Submit",
1751
+ if: "$activeStep === $lastStep()",
1442
1752
  style: {
1443
- if: '$activeStep !== $lastStep()',
1444
- then: 'display: none;'
1445
- }
1446
- }
1447
- ]
1753
+ if: "$activeStep !== $lastStep()",
1754
+ then: "display: none;",
1755
+ },
1756
+ },
1757
+ ],
1448
1758
  });
1449
1759
 
1450
1760
  const formDetails = () => ({
1451
- $el: 'pre',
1761
+ $el: "pre",
1452
1762
  if: '$urlParam("fdbg", "") == 1',
1453
1763
  children: [
1454
1764
  {
1455
- $el: 'pre',
1456
- children: '$stringify( $get(form).value )',
1765
+ $el: "pre",
1766
+ children: "$stringify( $get(form).value )",
1457
1767
  attrs: {
1458
- class: 't-text-xs',
1459
- style: 'overflow: scroll'
1460
- }
1768
+ class: "t-text-xs",
1769
+ style: "overflow: scroll",
1770
+ },
1461
1771
  },
1462
1772
  {
1463
- $el: 'pre',
1464
- children: ['activeStep: ', '$activeStep'],
1773
+ $el: "pre",
1774
+ children: ["activeStep: ", "$activeStep"],
1465
1775
  attrs: {
1466
- class: 't-text-xs',
1467
- style: 'overflow: scroll'
1468
- }
1776
+ class: "t-text-xs",
1777
+ style: "overflow: scroll",
1778
+ },
1469
1779
  },
1470
1780
  {
1471
- $el: 'pre',
1472
- children: ['stepHistory: ', '$stepHistory'],
1781
+ $el: "pre",
1782
+ children: ["stepHistory: ", "$stepHistory"],
1473
1783
  attrs: {
1474
- class: 't-text-xs',
1475
- style: 'overflow: scroll'
1476
- }
1784
+ class: "t-text-xs",
1785
+ style: "overflow: scroll",
1786
+ },
1477
1787
  },
1478
1788
  {
1479
- $el: 'pre',
1480
- children: ['stepQueue: ', '$stepQueue'],
1789
+ $el: "pre",
1790
+ children: ["stepQueue: ", "$stepQueue"],
1481
1791
  attrs: {
1482
- class: 't-text-xs',
1483
- style: 'overflow: scroll'
1484
- }
1792
+ class: "t-text-xs",
1793
+ style: "overflow: scroll",
1794
+ },
1485
1795
  },
1486
1796
  {
1487
- $el: 'pre',
1488
- children: ['steps: ', '$stepKeys()'],
1797
+ $el: "pre",
1798
+ children: ["steps: ", "$stepKeys()"],
1489
1799
  attrs: {
1490
- class: 't-text-xs',
1491
- style: 'overflow: scroll'
1492
- }
1493
- }
1494
- ]
1800
+ class: "t-text-xs",
1801
+ style: "overflow: scroll",
1802
+ },
1803
+ },
1804
+ ],
1495
1805
  });
1496
1806
 
1497
1807
  const formPropDefaults = {
1498
- type: 'form',
1499
- id: 'form',
1500
- config: { validationVisibility: 'submit' },
1808
+ type: "form",
1809
+ id: "form",
1810
+ config: { validationVisibility: "submit" },
1501
1811
  onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
1502
- plugins: '$plugins',
1812
+ plugins: "$plugins",
1503
1813
  actions: false,
1504
- anchorElement: 'form-anchor',
1814
+ anchorElement: "form-anchor",
1505
1815
  useLocalStorage: true,
1506
1816
  prepop: {
1507
- fromURL: true
1817
+ fromURL: true,
1508
1818
  },
1509
1819
  errorCodes: {
1510
1820
  403: { message: "An Error Occurred", abort: false },
@@ -1512,13 +1822,11 @@ const formPropDefaults = {
1512
1822
  429: "An Error Occurred",
1513
1823
  504: { message: "An Error Occurred", abort: false },
1514
1824
  },
1515
- formClass: '!t-max-w-[40rem]'
1825
+ formClass: "!t-max-w-[40rem]",
1516
1826
  };
1517
1827
 
1518
1828
  function filterMapByKey(obj, keyList) {
1519
- return Object.fromEntries(
1520
- Object.entries(obj).filter(([key]) => keyList.includes(key))
1521
- );
1829
+ return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
1522
1830
  }
1523
1831
 
1524
1832
  // export function filteredNextStepsMapLegal(keyList) {
@@ -1528,10 +1836,7 @@ function filterMapByKey(obj, keyList) {
1528
1836
  // }
1529
1837
 
1530
1838
  function formProps(updates) {
1531
- const props = merge(
1532
- formPropDefaults,
1533
- updates
1534
- );
1839
+ const props = merge(formPropDefaults, updates);
1535
1840
  if (props.formId && !props.name) {
1536
1841
  props.name = props.formId;
1537
1842
  }
@@ -1541,13 +1846,10 @@ function formProps(updates) {
1541
1846
  const metaDefaults = {};
1542
1847
 
1543
1848
  function metaProps(updates) {
1544
- const data = merge(
1545
- metaDefaults,
1546
- updates
1547
- );
1849
+ const data = merge(metaDefaults, updates);
1548
1850
  return {
1549
- type: 'meta',
1550
- data
1851
+ type: "meta",
1852
+ data,
1551
1853
  }
1552
1854
  }
1553
1855
 
@@ -1567,191 +1869,194 @@ function defaultMetaPropsLegal(tolps = null) {
1567
1869
  defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1568
1870
  finalHeadlines: finalHeadlines,
1569
1871
  defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1570
- finalSubHeadlines: finalSubHeadlines
1872
+ finalSubHeadlines: finalSubHeadlines,
1571
1873
  })
1572
1874
  }
1573
1875
 
1574
- function dynamicSchemaNode(field = 'Type_Of_Legal_Problem') {
1876
+ function dynamicSchemaNode(field = "Type_Of_Legal_Problem") {
1575
1877
  return {
1576
- $cmp: 'FormKitSchema',
1577
- if: '$get(' + field + ').value',
1878
+ $cmp: "FormKitSchema",
1879
+ if: "$get(" + field + ").value",
1578
1880
  props: {
1579
- schema: '$meta.dynamicSchema',
1580
- data: '$buildData($meta)'
1581
- }
1881
+ schema: "$meta.dynamicSchema",
1882
+ data: "$buildData($meta)",
1883
+ },
1582
1884
  }
1583
1885
  }
1584
1886
 
1585
1887
  const formAnchorDefaults = {
1586
- $el: 'div',
1888
+ $el: "div",
1587
1889
  children: [
1588
1890
  {
1589
- $el: 'div',
1891
+ $el: "div",
1590
1892
  attrs: {
1591
- id: 'form-anchor',
1592
- class: 't-absolute',
1593
- style: { top: '-30px', left: 0 }
1594
- }
1595
- }
1893
+ id: "form-anchor",
1894
+ class: "t-absolute",
1895
+ style: { top: "-30px", left: 0 },
1896
+ },
1897
+ },
1596
1898
  ],
1597
1899
  attrs: {
1598
- class: 't-relative'
1599
- }
1900
+ class: "t-relative",
1901
+ },
1600
1902
  };
1601
1903
 
1602
1904
  function formAnchor(updates) {
1603
- return merge(
1604
- formAnchorDefaults,
1605
- updates
1606
- )
1905
+ return merge(formAnchorDefaults, updates)
1607
1906
  }
1608
1907
 
1609
1908
  function headlineDefaults(updates = {}) {
1610
1909
  return {
1611
- $el: 'h1',
1910
+ $el: "h1",
1612
1911
  attrs: {
1613
- class: 't-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3' + ' ' + (updates.headlineClass || '')
1614
- }
1912
+ class:
1913
+ "t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
1914
+ " " +
1915
+ (updates.headlineClass || ""),
1916
+ },
1615
1917
  }
1616
1918
  }
1617
1919
 
1618
1920
  function headline(updates = {}) {
1619
- return merge(
1620
- headlineDefaults(updates),
1621
- updates
1622
- )
1921
+ return merge(headlineDefaults(updates), updates)
1623
1922
  }
1624
1923
 
1625
1924
  function defaultHeadline() {
1626
1925
  return headline({
1627
1926
  children: '$urlParam("hl", "Start Here For a Free Consultation")',
1628
- if: '$activeStep === $firstStep()'
1927
+ if: "$activeStep === $firstStep()",
1629
1928
  })
1630
1929
  }
1631
1930
 
1632
1931
  function subHeadlineDefaults(updates = {}) {
1633
1932
  return {
1634
- $el: 'h3',
1933
+ $el: "h3",
1635
1934
  attrs: {
1636
- class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
1637
- }
1935
+ class:
1936
+ "t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10" +
1937
+ " " +
1938
+ (updates.subheadlineClass || ""),
1939
+ },
1638
1940
  }
1639
1941
  }
1640
1942
 
1641
1943
  function subHeadline(updates = {}) {
1642
- return merge(
1643
- subHeadlineDefaults(updates),
1644
- updates
1645
- )
1944
+ return merge(subHeadlineDefaults(updates), updates)
1646
1945
  }
1647
1946
 
1648
1947
  function defaultSubHeadline() {
1649
1948
  return subHeadline({
1650
1949
  children: '$urlParam("shl", "Our Service is Fast and Free!")',
1651
- if: '$activeStep === $firstStep()'
1950
+ if: "$activeStep === $firstStep()",
1652
1951
  })
1653
1952
  }
1654
1953
 
1655
1954
  const hiddenInputsBase = [
1656
1955
  {
1657
- $formkit: 'hidden',
1956
+ $formkit: "hidden",
1658
1957
  name: "gclid",
1659
- value: null
1958
+ value: null,
1660
1959
  },
1661
1960
  {
1662
- $formkit: 'hidden',
1961
+ $formkit: "hidden",
1663
1962
  name: "campaignid",
1664
- value: null
1963
+ value: null,
1665
1964
  },
1666
1965
  {
1667
- $formkit: 'hidden',
1966
+ $formkit: "hidden",
1668
1967
  name: "s",
1669
- value: null
1670
- }
1968
+ value: null,
1969
+ },
1671
1970
  ];
1672
1971
 
1673
1972
  const hiddenInputsLegal = [
1674
1973
  {
1675
- $formkit: 'hidden',
1974
+ $formkit: "hidden",
1676
1975
  name: "vertical",
1677
- value: "Legal"
1976
+ value: "Legal",
1678
1977
  },
1679
1978
  {
1680
- $formkit: 'hidden',
1979
+ $formkit: "hidden",
1681
1980
  name: "TCPA_Language",
1682
- value: "$meta.tcpaLanguage"
1981
+ value: "$meta.tcpaLanguage",
1683
1982
  },
1684
- ...hiddenInputsBase
1983
+ ...hiddenInputsBase,
1685
1984
  ];
1686
1985
 
1687
1986
  const legalRedirectMapDefaults = {
1688
- '*': LegalRedirectUrl()
1987
+ "*": LegalRedirectUrl(),
1689
1988
  };
1690
1989
 
1691
-
1692
1990
  function legalRedirectMap(updates) {
1693
- return merge(
1694
- legalRedirectMapDefaults,
1695
- updates
1696
- )
1991
+ return merge(legalRedirectMapDefaults, updates)
1697
1992
  }
1698
1993
 
1699
1994
  const TOLPCommentsPlaceholders = {
1700
- 'Adoption': 'Example: "I need help with adoption forms"',
1701
- 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1702
- 'Auto and Car Accidents': 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1703
- 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
1704
- 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
1705
- 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1706
- 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
1707
- 'Child Custody': 'Example: "Need help getting custody"',
1708
- 'Child Support': 'Example: "Issues with child support payments"',
1709
- 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
1710
- 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1711
- 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
1712
- 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
1713
- 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1714
- 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
1715
- 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1716
- 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1717
- 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
1718
- 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
1719
- 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1720
- 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1721
- 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
1722
- 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
1723
- 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
1724
- 'Guardianship': 'Example: "I need help with guardianship documents"',
1725
- 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1726
- 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
1727
- 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
1728
- 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
1729
- 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
1730
- 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
1731
- 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
1732
- 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
1733
- 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
1734
- 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1735
- 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1736
- 'Long Term Disability': 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1737
- 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1738
- 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1739
- 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1740
- 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
1741
- 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1742
- 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1743
- 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1744
- 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1745
- 'Social Security Disability and Insurance': 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1746
- 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1747
- 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1748
- 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
1749
- 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1750
- 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1751
- 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
1752
- 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
1753
- 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
1754
- 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
1995
+ Adoption: 'Example: "I need help with adoption forms"',
1996
+ "Asbestos and Mesothelioma": 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1997
+ "Auto and Car Accidents":
1998
+ 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1999
+ Bankruptcy: 'Example: "I need help filing for bankruptcy"',
2000
+ "Birth Certificate and Name Change": 'Example: "Just married and would like to change my last name"',
2001
+ "Business Lawyers": 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
2002
+ "Child Custody and Support": 'Example: "Need help getting custody" or "Issues with child support payments"',
2003
+ "Child Custody": 'Example: "Need help getting custody"',
2004
+ "Child Support": 'Example: "Issues with child support payments"',
2005
+ "Civil Rights and Discrimination": 'Example: "Police brutality" or "Coworker keeps harassing me"',
2006
+ "Civil Lawsuit":
2007
+ 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
2008
+ "File a Lawsuit": 'Example: "A contractor took my money and never completed the job"',
2009
+ "Defend a Lawsuit": 'Example: "I am being sued by a neighbor"',
2010
+ "Consumer Lawyers":
2011
+ 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
2012
+ "Copyrights and Trademarks": 'Example: "I would like to register a trademark or copyright a name"',
2013
+ "Criminal and Felony":
2014
+ 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
2015
+ "Debt and Collections": 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
2016
+ "Divorce and Separation": 'Example: "I would like to file for an uncontested divorce"',
2017
+ "DUI and DWI": 'Example: "I was arrested for DUI and need legal defense"',
2018
+ "Elder Law": 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
2019
+ "Employment and Workplace": 'Example: "I was injured while on the job" or "My company is discriminating against me"',
2020
+ Expungement: 'Example: "I would like to file for an expungement and clear my record"',
2021
+ "Family Issues": 'Example: "I need help with guardianship" or "I need a simple will created"',
2022
+ Foreclosure: 'Example: "I need help to avoid foreclosure on my house"',
2023
+ Guardianship: 'Example: "I need help with guardianship documents"',
2024
+ "Harassment and Discrimination": 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
2025
+ "Sexual Harassment": 'Example: "I am being sexually harassed by a coworker"',
2026
+ "Workplace Harassment": 'Example: "My coworker is being aggressive towards me"',
2027
+ "Non-Workplace Harassment": 'Example: "My neighbor is harassing me"',
2028
+ "Workplace Discrimination": 'Example: "I am being discriminated at work based on my age"',
2029
+ "Non-Workplace Discrimination": 'Example: "I am being discriminated against by a local official"',
2030
+ "Identity Theft": 'Example: "Someone stole my identity and I need help fixing the issue"',
2031
+ "Immigration and Visas": 'Example: "I need help filing for a visa" or "Help with a green card"',
2032
+ Insurance: 'Example: "I need help filing an insurance claim for damage to my house"',
2033
+ "Landlord and Tenant":
2034
+ 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
2035
+ "Lemon Law": 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
2036
+ "Long Term Disability":
2037
+ 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
2038
+ "Medical Malpractice": 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
2039
+ "Patents and Intellectual Property": 'Example: "I would like to file for a patent" or "I need to copyright a name"',
2040
+ "Personal Injury": 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
2041
+ "Power of Attorney": 'Example: "I need help with a limited or general power of attorney"',
2042
+ "Probate and Estates":
2043
+ 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
2044
+ "Product Liability": 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
2045
+ "Property Damage": 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
2046
+ "Real Estate":
2047
+ 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
2048
+ "Social Security Disability and Insurance":
2049
+ 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
2050
+ "Tax and IRS": 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
2051
+ "Traffic and Tickets":
2052
+ 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
2053
+ Unemployment: 'Example: "I need help filing for unemployment benefits"',
2054
+ "Victim of a Crime": 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
2055
+ "Wills and Trusts": 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
2056
+ "Workers Compensation": 'Example: "I was injured at work and would like to file for workers compensation benefits"',
2057
+ "Wrongful Death": 'Example: "A family member was killed on the job and we need legal representation"',
2058
+ "Wrongful Termination": 'Example: "I was fired by my employer without cause"',
2059
+ "Not Sure or Other": 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"',
1755
2060
  };
1756
2061
 
1757
2062
  const TOLPFinalHeadlines = {
@@ -1759,49 +2064,64 @@ const TOLPFinalHeadlines = {
1759
2064
  };
1760
2065
 
1761
2066
  const TOLPFinalSubHeadlines = {
1762
- 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
2067
+ Adoption: "You may benefit from speaking with an adoption professional. Please verify your contact information.",
1763
2068
  // 'Asbestos and Mesothelioma': '',
1764
- 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
1765
- 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
2069
+ "Auto and Car Accidents":
2070
+ "You may benefit from speaking with an accident professional. Please verify your contact information.",
2071
+ Bankruptcy: "You may benefit from speaking with a bankruptcy professional. Please verify your contact information.",
1766
2072
  // 'Birth Certificate and Name Change': '',
1767
2073
  // 'Business Lawyers': '',
1768
2074
  // 'Child Custody and Support': '',
1769
2075
  // 'Civil Rights and Discrimination': '',
1770
2076
  // 'Civil Lawsuit': '',
1771
2077
  // 'Consumer Lawyers': '',
1772
- 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
2078
+ "Copyrights and Trademarks":
2079
+ "You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.",
1773
2080
  // 'Criminal and Felony': '',
1774
2081
  // 'Debt and Collections': '',
1775
- 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
1776
- 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
1777
- 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
2082
+ "Divorce and Separation":
2083
+ "You may benefit from speaking with a divorce professional. Please verify your contact information.",
2084
+ "DUI and DWI": "You may benefit from speaking with a DUI professional. Please verify your contact information.",
2085
+ "Elder Law": "You may benefit from speaking with an elder law professional. Please verify your contact information.",
1778
2086
  // 'Employment and Workplace': '',
1779
2087
  // 'Expungement': '',
1780
2088
  // 'Family Issues': '',
1781
- 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
1782
- 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
2089
+ Foreclosure: "You may benefit from speaking with a foreclosure professional. Please verify your contact information.",
2090
+ Guardianship:
2091
+ "You may benefit from speaking with a guardianship professional. Please verify your contact information.",
1783
2092
  // 'Harassment and Discrimination': '',
1784
2093
  // 'Identity Theft': '',
1785
- 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
2094
+ "Immigration and Visas":
2095
+ "You may benefit from speaking with a immigration professional. Please verify your contact information.",
1786
2096
  // 'Insurance': '',
1787
- 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
2097
+ "Landlord and Tenant":
2098
+ "You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.",
1788
2099
  // 'Lemon Law': '',
1789
- 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
1790
- 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
1791
- 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
1792
- 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
2100
+ "Long Term Disability":
2101
+ "You may benefit from speaking with a disability legal professional. Please verify your contact information.",
2102
+ "Medical Malpractice":
2103
+ "You may benefit from speaking with a malpractice professional. Please verify your contact information.",
2104
+ "Patents and Intellectual Property":
2105
+ "You may benefit from speaking with a patent professional. Please verify your contact information.",
2106
+ "Personal Injury":
2107
+ "You may benefit from speaking with a personal injury professional. Please verify your contact information.",
1793
2108
  // 'Power of Attorney': '',
1794
- 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
2109
+ "Probate and Estates":
2110
+ "You may benefit from speaking with a probate and estate professional. Please verify your contact information.",
1795
2111
  // 'Product Liability': '',
1796
2112
  // 'Property Damage': '',
1797
- 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
1798
- 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
1799
- 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
2113
+ "Real Estate":
2114
+ "You may benefit from speaking with a real estate professional. Please verify your contact information.",
2115
+ "Social Security Disability and Insurance":
2116
+ "You may benefit from speaking with an SSDI professional. Please verify your contact information.",
2117
+ "Tax and IRS": "You may benefit from speaking with a tax professional. Please verify your contact information.",
1800
2118
  // 'Traffic and Tickets': '',
1801
- 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
2119
+ Unemployment:
2120
+ "You may benefit from speaking with an unemployment professional. Please verify your contact information.",
1802
2121
  // 'Victim of a Crime': '',
1803
2122
  // 'Wills and Trusts': '',
1804
- 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
2123
+ "Workers Compensation":
2124
+ "You may benefit from speaking with a workers compensation professional. Please verify your contact information.",
1805
2125
  // 'Wrongful Death': '',
1806
2126
  // 'Wrongful Termination': '',
1807
2127
  // 'Not Sure or Other': ''
@@ -1814,37 +2134,31 @@ const TOLPFinalSubHeadlines = {
1814
2134
 
1815
2135
  const nextStepsMapLegalLegacy = {
1816
2136
  values: {
1817
- '*': [
1818
- 'TOLPQuestions',
1819
- 'commentsWithBankruptcy',
1820
- 'legalCrossSells',
1821
- 'firstAndLast',
1822
- 'contactInfo',
1823
- ]
1824
- }
2137
+ "*": ["TOLPQuestions", "commentsWithBankruptcy", "legalCrossSells", "firstAndLast", "contactInfo"],
2138
+ },
1825
2139
  };
1826
2140
 
1827
2141
  const nextStepsMapLegalCrossSells = {
1828
2142
  values: {
1829
- 'Legal_CrossSells': {
1830
- 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
1831
- 'Personal Injury': ['personalInjuryCrossSellQuestions'],
1832
- 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
1833
- 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
1834
- 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
1835
- 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
1836
- 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
1837
- 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
1838
- 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
1839
- 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
1840
- 'Child Custody': ['childCustodyCrossSellQuestions'],
2143
+ Legal_CrossSells: {
2144
+ "Auto and Car Accidents": ["autoAndCarAccidentCrossSellQuestions"],
2145
+ "Personal Injury": ["personalInjuryCrossSellQuestions"],
2146
+ "Workers Compensation": ["workersCompensationCrossSellQuestions"],
2147
+ "DUI and DWI": ["duiAndDWICrossSellQuestions"],
2148
+ "Long Term Disability": ["longTermDisabilityCrossSellQuestions"],
2149
+ "Social Security Disability and Insurance": ["ssdiCrossSellQuestions"],
2150
+ Bankruptcy: ["bankruptcyCrossSellQuestions"],
2151
+ "Power of Attorney": ["powerOfAttorneyCrossSellQuestions"],
2152
+ "Wills and Trusts": ["willsAndTrustsCrossSellQuestions"],
2153
+ "Divorce and Separation": ["divorceAndSeparationCrossSellQuestions"],
2154
+ "Child Custody": ["childCustodyCrossSellQuestions"],
1841
2155
  },
1842
- '*': ['firstAndLast', 'contactInfo'],
2156
+ "*": ["firstAndLast", "contactInfo"],
1843
2157
  },
1844
-
2158
+
1845
2159
  // NOTE: this assumes a certain placement of the cross sell question
1846
2160
  // in the form flow.
1847
- appendSteps: ['firstAndLast', 'contactInfo'],
2161
+ appendSteps: ["firstAndLast", "contactInfo"],
1848
2162
  matchesAllowed: 1,
1849
2163
  };
1850
2164