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