bhl-forms 0.7.3 → 0.7.5

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