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