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