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