mod-build 4.0.61 → 4.0.62

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 (127) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +1 -1
  3. package/tasks/get-default-trade-questions.js +168 -143
  4. package/tasks/templates.js +20 -5
  5. package/public/resources/scripts/abandonment/abandonment-a4bbb36fbc8ed64042b8.min.js +0 -2
  6. package/public/resources/scripts/abandonment/abandonment.min.js +0 -2
  7. package/public/resources/scripts/callrail/callrail-14011d73b50a928de4b4.min.js +0 -2
  8. package/public/resources/scripts/callrail/callrail.min.js +0 -2
  9. package/public/resources/scripts/footer/footer-component-46dc0d7ca6af4fc3b76b.min.js +0 -2
  10. package/public/resources/scripts/footer/footer-component.min.js +0 -2
  11. package/public/resources/scripts/geolocation/geolocation.min.js +0 -2
  12. package/public/resources/scripts/helpers/addVWOTestQueryParam.min.js +0 -2
  13. package/public/resources/scripts/helpers/addVWOTestQueryParam.min.js.map +0 -1
  14. package/public/resources/scripts/helpers/additionalOpts.min.js +0 -2
  15. package/public/resources/scripts/helpers/additionalOpts.min.js.map +0 -1
  16. package/public/resources/scripts/helpers/calls-only.min.js +0 -2
  17. package/public/resources/scripts/helpers/calls-only.min.js.map +0 -1
  18. package/public/resources/scripts/helpers/getPhoneAssignmentData.min.js +0 -2
  19. package/public/resources/scripts/helpers/getPhoneAssignmentData.min.js.map +0 -1
  20. package/public/resources/scripts/helpers/initNumericOnlyFields.min.js +0 -2
  21. package/public/resources/scripts/helpers/initNumericOnlyFields.min.js.map +0 -1
  22. package/public/resources/scripts/helpers/initQSForm.min.js +0 -2
  23. package/public/resources/scripts/helpers/initQSForm.min.js.map +0 -1
  24. package/public/resources/scripts/helpers/initQuadTransform.min.js +0 -2
  25. package/public/resources/scripts/helpers/initQuadTransform.min.js.map +0 -1
  26. package/public/resources/scripts/helpers/isZipCodeValid.min.js +0 -2
  27. package/public/resources/scripts/helpers/isZipCodeValid.min.js.map +0 -1
  28. package/public/resources/scripts/helpers/observeVWOVariation.min.js +0 -2
  29. package/public/resources/scripts/helpers/observeVWOVariation.min.js.map +0 -1
  30. package/public/resources/scripts/helpers/opts.min.js +0 -2
  31. package/public/resources/scripts/helpers/opts.min.js.map +0 -1
  32. package/public/resources/scripts/jornaya.hbs +0 -35
  33. package/public/resources/scripts/jornaya.html +0 -35
  34. package/public/resources/scripts/mod-alytics/modalytics-be44027508c0438f6709.min.js +0 -2
  35. package/public/resources/scripts/mod-alytics/modalytics.min.js +0 -2
  36. package/public/resources/scripts/mod-form/form/contractor-0918337caf3dfede1609.min.js +0 -2
  37. package/public/resources/scripts/mod-form/form/contractor.min.js +0 -2
  38. package/public/resources/scripts/mod-form/form/homeowner-19a121b0e596042326f4.min.js +0 -2
  39. package/public/resources/scripts/mod-form/form/homeowner.min.js +0 -2
  40. package/public/resources/scripts/mod-utils/modutils-bc275eb41af515f626ef.min.js +0 -2
  41. package/public/resources/scripts/mod-utils/modutils.min.js +0 -2
  42. package/public/resources/scripts/trusted-form.hbs +0 -38
  43. package/public/resources/scripts/trusted-form.html +0 -38
  44. package/public/resources/styles/components/abandonment/abandonment-8a673f060817db6cb7dc.min.css +0 -1
  45. package/public/resources/styles/components/abandonment/abandonment.min.css +0 -1
  46. package/public/resources/styles/components/footer/mod-footer-d233fa64b6c8297c70ec.min.css +0 -1
  47. package/public/resources/styles/components/footer/mod-footer.min.css +0 -1
  48. package/public/resources/styles/components/footer/qs-footer-926e67c28d10c729db46.min.css +0 -1
  49. package/public/resources/styles/components/footer/qs-footer.min.css +0 -1
  50. package/src/resources/data/tcpa.json +0 -4
  51. package/src/resources/templates/modals/about/index.hbs +0 -9
  52. package/src/resources/templates/modals/about/index.html +0 -9
  53. package/src/resources/templates/modals/contact-us/index.hbs +0 -348
  54. package/src/resources/templates/modals/contact-us/index.html +0 -348
  55. package/src/resources/templates/modals/e-sign-consent/index.hbs +0 -35
  56. package/src/resources/templates/modals/e-sign-consent/index.html +0 -35
  57. package/src/resources/templates/modals/faq/index.hbs +0 -9
  58. package/src/resources/templates/modals/faq/index.html +0 -9
  59. package/src/resources/templates/modals/privacy/index.hbs +0 -237
  60. package/src/resources/templates/modals/privacy/index.html +0 -237
  61. package/src/resources/templates/modals/terms/index.hbs +0 -167
  62. package/src/resources/templates/modals/terms/index.html +0 -167
  63. package/src/shared-components/call-tracking/_call-tracking.scss +0 -311
  64. package/src/shared-components/call-tracking/call-tracking-icon.html +0 -8
  65. package/src/shared-components/call-tracking/call-tracking.html +0 -81
  66. package/src/shared-components/call-tracking/phone.svg +0 -6
  67. package/src/shared-components/card-button/_card-button.scss +0 -49
  68. package/src/shared-components/card-button/card-button.html +0 -9
  69. package/src/shared-components/carousel/_carousel.scss +0 -106
  70. package/src/shared-components/carousel/carousel.html +0 -23
  71. package/src/shared-components/carousel/carousel.js +0 -3573
  72. package/src/shared-components/carousel/carousel.js.map +0 -1
  73. package/src/shared-components/carousel/carousel.min.js +0 -2
  74. package/src/shared-components/carousel/carousel.min.js.map +0 -1
  75. package/src/shared-components/carousel/carousel.min.min.js +0 -2
  76. package/src/shared-components/carousel/carousel.min.min.js.map +0 -1
  77. package/src/shared-components/checkbox/_checkbox.scss +0 -130
  78. package/src/shared-components/checkbox/checkbox.html +0 -10
  79. package/src/shared-components/consent-capture/tcpa.html +0 -12
  80. package/src/shared-components/expand-collapse/_expand-collapse.scss +0 -93
  81. package/src/shared-components/expand-collapse/expand-collapse.html +0 -8
  82. package/src/shared-components/expand-collapse/expand-collapse.js +0 -40
  83. package/src/shared-components/expand-collapse/expand-collapse.min.js +0 -2
  84. package/src/shared-components/expand-collapse/expand-collapse.min.js.map +0 -1
  85. package/src/shared-components/featured-block/_featured-block.scss +0 -191
  86. package/src/shared-components/featured-block/featured-block.html +0 -80
  87. package/src/shared-components/foot-assets/foot-assets.html +0 -107
  88. package/src/shared-components/form-tcpa/form-tcpa-spanish.html +0 -61
  89. package/src/shared-components/form-tcpa/form-tcpa.html +0 -55
  90. package/src/shared-components/gtm-body/gtm-body.html +0 -4
  91. package/src/shared-components/head/head.html +0 -195
  92. package/src/shared-components/header/_header.scss +0 -200
  93. package/src/shared-components/header/header.html +0 -79
  94. package/src/shared-components/hero/_hero.scss +0 -276
  95. package/src/shared-components/hero/hero.html +0 -136
  96. package/src/shared-components/how-it-works/_how-it-works.scss +0 -138
  97. package/src/shared-components/how-it-works/how-it-works.html +0 -19
  98. package/src/shared-components/input/_input.scss +0 -242
  99. package/src/shared-components/input/input.html +0 -30
  100. package/src/shared-components/preloader/_preloader.scss +0 -61
  101. package/src/shared-components/preloader/preloader.html +0 -49
  102. package/src/shared-components/progress-bar/_progress-bar.scss +0 -142
  103. package/src/shared-components/progress-bar/progress-bar.html +0 -20
  104. package/src/shared-components/progress-bar/progress-bar.js +0 -26
  105. package/src/shared-components/progress-bar/progress-bar.min.js +0 -2
  106. package/src/shared-components/progress-bar/progress-bar.min.js.map +0 -1
  107. package/src/shared-components/radio-button/_radio-button.scss +0 -577
  108. package/src/shared-components/radio-button/radio-button.html +0 -25
  109. package/src/shared-components/reviews/_reviews.scss +0 -79
  110. package/src/shared-components/reviews/reviews.html +0 -27
  111. package/src/shared-components/section-deals/sitemap.xml +0 -9
  112. package/src/shared-components/select/_select.scss +0 -61
  113. package/src/shared-components/select/select.html +0 -8
  114. package/src/shared-components/steps/_steps.scss +0 -431
  115. package/src/shared-components/steps/defaultFormFieldConfig.json +0 -64
  116. package/src/shared-components/steps/step-fields.html +0 -36
  117. package/src/shared-components/steps/steps.html +0 -136
  118. package/src/shared-components/textarea/_textarea.scss +0 -96
  119. package/src/shared-components/textarea/textarea.html +0 -13
  120. package/src/shared-components/theme-toggle/_theme-toggle.scss +0 -68
  121. package/src/shared-components/theme-toggle/theme-toggle.html +0 -34
  122. package/src/shared-components/tile/_tile.scss +0 -117
  123. package/src/shared-components/tile/tile.html +0 -27
  124. package/src/shared-components/value-props/_value-props.scss +0 -99
  125. package/src/shared-components/value-props/value-props.html +0 -17
  126. package/src/shared-components/zip-control/_zip-control.scss +0 -42
  127. package/src/shared-components/zip-control/zip-control.html +0 -21
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.62
4
+
5
+ - Applying merging of default trade questions and default form config on all the `steps` objects found.
6
+
3
7
  ## 4.0.61
4
8
 
5
9
  - Seasonal updates bug fix.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.61",
3
+ "version": "4.0.62",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -3,6 +3,173 @@ import merge from 'lodash.merge';
3
3
  import axios from 'axios';
4
4
  import { defaultSettings } from '../src/data/config.js';
5
5
 
6
+ function mergeDefaultTradeQuestionsConfigOnSteps(config, steps) {
7
+ if (!config || typeof config !== 'object') return;
8
+
9
+ if (config.steps && typeof config.steps === 'object' && config.steps.items) {
10
+ mergeDefaultTradeQuestionsConfig(config, steps);
11
+ }
12
+
13
+ for (const key in config) {
14
+ if (config.hasOwnProperty(key)) {
15
+ const value = config[key];
16
+ if (typeof value === 'object' && value !== null) {
17
+ mergeDefaultTradeQuestionsConfigOnSteps(value, steps);
18
+ }
19
+ }
20
+ }
21
+ }
22
+
23
+ function mergeDefaultTradeQuestionsConfig(config, steps) {
24
+ if (!config || !config.steps || !config.steps.items || !Array.isArray(config.steps.items)) {
25
+ return;
26
+ }
27
+
28
+ config.steps.items.forEach((item) => {
29
+ const stepName = item.attributes.data['step-name'];
30
+ if (steps[stepName]) {
31
+ if (!item.stepContent) {
32
+ item.stepContent = {};
33
+ }
34
+
35
+ if (!item.stepContent.fields) {
36
+ item.stepContent.fields = [];
37
+ }
38
+ const defaultStepFields = steps[stepName].fields;
39
+ let defaultStepOptions = [];
40
+ let defaultQuestionLegend = {};
41
+ defaultStepFields.forEach((defaultField) => {
42
+ defaultStepOptions = defaultField.options;
43
+ defaultQuestionLegend = defaultField.legend;
44
+ });
45
+
46
+ item.stepContent.fields.forEach((field) => {
47
+ if (field.legend) {
48
+ field.legend = merge(defaultQuestionLegend, field.legend);
49
+ } else {
50
+ field.legend = defaultQuestionLegend;
51
+ }
52
+
53
+ if (field && field.remove) {
54
+ if (field.remove.includes('all')) {
55
+ defaultStepOptions = [];
56
+ } else {
57
+ defaultStepOptions = defaultStepOptions.filter((_, i) => !field.remove.includes(i));
58
+ }
59
+ }
60
+
61
+ if (field.fieldType === 'radio') {
62
+ if (!field.errorMessage) {
63
+ field.errorMessage = 'Professionals need this info to generate a quote.';
64
+ }
65
+
66
+ if (field.options && Array.isArray(field.options) && field.options.length) {
67
+ field.options.forEach((option) => {
68
+ if (typeof option.update === 'number') {
69
+ if (option.attributes && option.attributes.checked === false) {
70
+ delete option.attributes.checked;
71
+ delete defaultStepOptions[option.update].attributes.checked;
72
+ }
73
+ merge(defaultStepOptions[option.update], option);
74
+ } else {
75
+ if (typeof option.insertAt === 'number') {
76
+ defaultStepOptions.splice(option.insertAt, 0, option);
77
+ } else {
78
+ defaultStepOptions.push(option);
79
+ }
80
+ }
81
+ });
82
+ }
83
+ field.options = defaultStepOptions;
84
+ } else {
85
+ if (field && Array.isArray(field) && field.length) {
86
+ if (typeof field.update === 'number') {
87
+ merge(defaultStepFields[field.update], field);
88
+ } else {
89
+ if (typeof field.insertAt === 'number') {
90
+ defaultStepFields.splice(field.insertAt, 0, field);
91
+ } else {
92
+ defaultStepFields.push(field);
93
+ }
94
+ }
95
+ }
96
+
97
+ field = defaultStepFields;
98
+ }
99
+ });
100
+
101
+ // extra question block
102
+ if (item.stepContent.extraQuestionBlock) {
103
+ if (!item.stepContent.extraQuestionBlock.fields) {
104
+ item.stepContent.extraQuestionBlock.fields = [];
105
+ }
106
+
107
+ const defaultExtraQuestionFields = steps[stepName].extraQuestionBlock.fields;
108
+ let defaultExtraQuestionOptions = [];
109
+ let defaultExtraQuestionLegend = {};
110
+ defaultExtraQuestionFields.forEach((defaultExtraQuestionField) => {
111
+ defaultExtraQuestionOptions = defaultExtraQuestionField.options;
112
+ defaultExtraQuestionLegend = defaultExtraQuestionField.legend;
113
+ });
114
+ item.stepContent.extraQuestionBlock.fields.forEach((field) => {
115
+
116
+ if (field.legend) {
117
+ field.legend = merge(defaultExtraQuestionLegend, field.legend);
118
+ } else {
119
+ field.legend = defaultExtraQuestionLegend;
120
+ }
121
+
122
+ if (field && field.remove) {
123
+ if (field.remove.includes('all')) {
124
+ defaultExtraQuestionOptions = [];
125
+ } else {
126
+ defaultExtraQuestionOptions = defaultExtraQuestionOptions.filter((_, i) => !field.remove.includes(i));
127
+ }
128
+ }
129
+
130
+ if (field.fieldType === 'radio') {
131
+ if (!field.errorMessage) {
132
+ field.errorMessage = 'Professionals need this info to generate a quote.';
133
+ }
134
+
135
+ if (field.options && Array.isArray(field.options) && field.options.length) {
136
+ field.options.forEach((option, optionIndex) => {
137
+ if (typeof option.update === 'number') {
138
+ if (option.attributes && option.attributes.checked === false) {
139
+ delete option.attributes.checked;
140
+ delete defaultStepOptions[option.update].attributes.checked;
141
+ }
142
+ merge(defaultExtraQuestionOptions[option.update], option);
143
+ } else {
144
+ if (typeof option.insertAt === 'number') {
145
+ defaultExtraQuestionOptions.splice(option.insertAt, 0, option);
146
+ } else {
147
+ defaultExtraQuestionOptions.push(option);
148
+ }
149
+ }
150
+ });
151
+ }
152
+ field.options = defaultExtraQuestionOptions;
153
+ } else {
154
+ if (field && Array.isArray(field) && field.length) {
155
+ if (typeof field.update === 'number') {
156
+ merge(defaultExtraQuestionFields[field.update], field);
157
+ } else {
158
+ if (typeof field.insertAt === 'number') {
159
+ defaultExtraQuestionFields.splice(field.insertAt, 0, field);
160
+ } else {
161
+ defaultExtraQuestionFields.push(field);
162
+ }
163
+ }
164
+ }
165
+ field = defaultExtraQuestionFields;
166
+ }
167
+ });
168
+ }
169
+ }
170
+ });
171
+ }
172
+
6
173
  export default async function(config) {
7
174
  if (config.useStepsConfig) {
8
175
  console.log('Starting get-default-trade-questions...');
@@ -35,149 +202,7 @@ export default async function(config) {
35
202
  steps.OwnHome = commonQuestions.OwnHome;
36
203
  steps.BuyTimeframe = commonQuestions.BuyTimeframe;
37
204
 
38
- config.steps.items.forEach((item) => {
39
- const stepName = item.attributes.data['step-name'];
40
- if (steps[stepName]) {
41
- if (!item.stepContent) {
42
- item.stepContent = {};
43
- }
44
-
45
- if (!item.stepContent.fields) {
46
- item.stepContent.fields = [];
47
- }
48
- const defaultStepFields = steps[stepName].fields;
49
- let defaultStepOptions = [];
50
- let defaultQuestionLegend = {};
51
- defaultStepFields.forEach((defaultField) => {
52
- defaultStepOptions = defaultField.options;
53
- defaultQuestionLegend = defaultField.legend;
54
- });
55
-
56
- item.stepContent.fields.forEach((field) => {
57
- if (field.legend) {
58
- field.legend = merge(defaultQuestionLegend, field.legend);
59
- } else {
60
- field.legend = defaultQuestionLegend;
61
- }
62
-
63
- if (field && field.remove) {
64
- if (field.remove.includes('all')) {
65
- defaultStepOptions = [];
66
- } else {
67
- defaultStepOptions = defaultStepOptions.filter((_, i) => !field.remove.includes(i));
68
- }
69
- }
70
-
71
- if (field.fieldType === 'radio') {
72
- if (!field.errorMessage) {
73
- field.errorMessage = 'Professionals need this info to generate a quote.';
74
- }
75
-
76
- if (field.options && Array.isArray(field.options) && field.options.length) {
77
- field.options.forEach((option) => {
78
- if (typeof option.update === 'number') {
79
- if (option.attributes && option.attributes.checked === false) {
80
- delete option.attributes.checked;
81
- delete defaultStepOptions[option.update].attributes.checked;
82
- }
83
- merge(defaultStepOptions[option.update], option);
84
- } else {
85
- if (typeof option.insertAt === 'number') {
86
- defaultStepOptions.splice(option.insertAt, 0, option);
87
- } else {
88
- defaultStepOptions.push(option);
89
- }
90
- }
91
- });
92
- }
93
- field.options = defaultStepOptions;
94
- } else {
95
- if (field && Array.isArray(field) && field.length) {
96
- if (typeof field.update === 'number') {
97
- merge(defaultStepFields[field.update], field);
98
- } else {
99
- if (typeof field.insertAt === 'number') {
100
- defaultStepFields.splice(field.insertAt, 0, field);
101
- } else {
102
- defaultStepFields.push(field);
103
- }
104
- }
105
- }
106
-
107
- field = defaultStepFields;
108
- }
109
- });
110
-
111
- // extra question block
112
- if (item.stepContent.extraQuestionBlock) {
113
- if (!item.stepContent.extraQuestionBlock.fields) {
114
- item.stepContent.extraQuestionBlock.fields = [];
115
- }
116
-
117
- const defaultExtraQuestionFields = steps[stepName].extraQuestionBlock.fields;
118
- let defaultExtraQuestionOptions = [];
119
- let defaultExtraQuestionLegend = {};
120
- defaultExtraQuestionFields.forEach((defaultExtraQuestionField) => {
121
- defaultExtraQuestionOptions = defaultExtraQuestionField.options;
122
- defaultExtraQuestionLegend = defaultExtraQuestionField.legend;
123
- });
124
- item.stepContent.extraQuestionBlock.fields.forEach((field) => {
125
-
126
- if (field.legend) {
127
- field.legend = merge(defaultExtraQuestionLegend, field.legend);
128
- } else {
129
- field.legend = defaultExtraQuestionLegend;
130
- }
131
-
132
- if (field && field.remove) {
133
- if (field.remove.includes('all')) {
134
- defaultExtraQuestionOptions = [];
135
- } else {
136
- defaultExtraQuestionOptions = defaultExtraQuestionOptions.filter((_, i) => !field.remove.includes(i));
137
- }
138
- }
139
-
140
- if (field.fieldType === 'radio') {
141
- if (!field.errorMessage) {
142
- field.errorMessage = 'Professionals need this info to generate a quote.';
143
- }
144
-
145
- if (field.options && Array.isArray(field.options) && field.options.length) {
146
- field.options.forEach((option, optionIndex) => {
147
- if (typeof option.update === 'number') {
148
- if (option.attributes && option.attributes.checked === false) {
149
- delete option.attributes.checked;
150
- delete defaultStepOptions[option.update].attributes.checked;
151
- }
152
- merge(defaultExtraQuestionOptions[option.update], option);
153
- } else {
154
- if (typeof option.insertAt === 'number') {
155
- defaultExtraQuestionOptions.splice(option.insertAt, 0, option);
156
- } else {
157
- defaultExtraQuestionOptions.push(option);
158
- }
159
- }
160
- });
161
- }
162
- field.options = defaultExtraQuestionOptions;
163
- } else {
164
- if (field && Array.isArray(field) && field.length) {
165
- if (typeof field.update === 'number') {
166
- merge(defaultExtraQuestionFields[field.update], field);
167
- } else {
168
- if (typeof field.insertAt === 'number') {
169
- defaultExtraQuestionFields.splice(field.insertAt, 0, field);
170
- } else {
171
- defaultExtraQuestionFields.push(field);
172
- }
173
- }
174
- }
175
- field = defaultExtraQuestionFields;
176
- }
177
- });
178
- }
179
- }
180
- });
205
+ mergeDefaultTradeQuestionsConfigOnSteps(config, steps);
181
206
  resolve();
182
207
  })
183
208
  .catch(error => {
@@ -16,7 +16,24 @@ responseInterceptor(axiosInstance);
16
16
  responseInterceptor(tcpaAxiosInstance);
17
17
  responseInterceptor(consentCaptureAxiosInstance);
18
18
 
19
- function mergeDefaultFormFieldConfig(defaultConfig, config) {
19
+ async function mergeDefaultFormFieldConfigOnSteps(defaultConfig, data, parentConfig) {
20
+ if (!data || typeof data !== 'object') return;
21
+
22
+ if (data.steps && typeof data.steps === 'object') {
23
+ data.steps = await mergeDefaultFormFieldConfig(defaultConfig, data, parentConfig);
24
+ }
25
+
26
+ for (const key in data) {
27
+ if (data.hasOwnProperty(key)) {
28
+ const value = data[key];
29
+ if (typeof value === 'object' && value !== null) {
30
+ await mergeDefaultFormFieldConfigOnSteps(defaultConfig, value, parentConfig);
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ function mergeDefaultFormFieldConfig(defaultConfig, config, parentConfig) {
20
37
  const { steps } = config;
21
38
 
22
39
  if (!steps.items) {
@@ -24,7 +41,7 @@ function mergeDefaultFormFieldConfig(defaultConfig, config) {
24
41
  return steps;
25
42
  }
26
43
 
27
- if (config.useAccessibleConfig) {
44
+ if (parentConfig.useAccessibleConfig) {
28
45
  steps.items.forEach(item => {
29
46
  if (item.stepContent.fields) {
30
47
  item.stepContent.fields = item.stepContent.fields.map(field => {
@@ -61,9 +78,7 @@ const getDefaultFormFieldConfig = async (config, folder = 'accessible-components
61
78
  throw new Error(`${resp.status}: Error while fetching ${folder}/defaultFormFieldConfig.json`);
62
79
  }
63
80
  const defaultConfig = resp.data;
64
- if (config.steps) {
65
- config.steps = await mergeDefaultFormFieldConfig(defaultConfig, config);
66
- }
81
+ mergeDefaultFormFieldConfigOnSteps(defaultConfig, config, config);
67
82
  resolve();
68
83
  }).catch(error => {
69
84
  console.error(error);
@@ -1,2 +0,0 @@
1
- "use strict";var modalDialog=document.querySelector(".modal--abandonment"),abandonment={event:new Event("abandonment.closed"),modalElement:modalDialog||document.querySelector(".abandonment__modal"),isModalDialog:!!modalDialog,heapTrack:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&modUtils.heap("track",["Abandonment popup | ".concat(e),t])},closeModal:function(e){this.heapTrack("Closed"),this.isModalDialog?(e.close(),document.body.classList.remove("no-scroll"),e.setAttribute("aria-hidden","true"),document.querySelector(".step--active").focus()):this.modalElement.style.display="none",this.modalElement.parentNode.dispatchEvent(this.event)},initClickTracking:function(){var e=this,t=document.querySelectorAll("#abandonment .btn-call-now"),n=document.querySelectorAll("#abandonment .btn-get-price-quotes");t&&t.forEach((function(t){t.addEventListener("click",(function(t){e.closeModal(e.modalElement),e.heapTrack("Clicked Phone Number",{phoneNumber:t.target.textContent.trim()})}))})),n&&n.forEach((function(t){t.addEventListener("click",(function(){e.closeModal(e.modalElement),e.heapTrack("Clicked CTA")}))}))},initCloseListener:function(){var e=this;this.isModalDialog?(this.modalElement.querySelector('[data-close="dialog"]').addEventListener("click",(function(){e.closeModal(e.modalElement)})),document.body.addEventListener("click",(function(t){t.target.id===e.modalElement.id&&e.closeModal(e.modalElement)})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&e.closeModal(e.modalElement)}))):document.addEventListener("click",(function(t){t.target.id&&("abandonment-modal"!==t.target.id&&"btnModalClose"!==t.target.id||e.modalElement&&(e.modalElement.style.display="none",document.body.classList.remove("no-scroll"),e.heapTrack("Closed"),e.modalElement.dispatchEvent(e.event)))}))},initAbandonmentForm:function(){var e=document.getElementById("abandonment-form");if(e){form.init(e,{isAbandonmentForm:!0,hasBackButtons:!1,hasClickToProceed:!1,hasProgressbar:!1,hasZipChange:!1,skipStep:{device:"",index:null,shouldSkip:!1}})}},setAbandonmentType:function(){"default"===(document.getElementById("abandonment-form")?"form":"default")?this.initClickTracking():this.initAbandonmentForm()},init:function(){this.setAbandonmentType(),this.initCloseListener();var e=window.location.hash;this.heapTrack("Shown",{step:e}),this.isModalDialog&&(this.modalElement.show(),this.modalElement.focus(),this.modalElement.setAttribute("aria-hidden","false"),modUtils.trapTabFocusInDialog("abandonmentDialog"))}};abandonment.init();
2
- //# sourceMappingURL=abandonment.min.js.map
@@ -1,2 +0,0 @@
1
- "use strict";var modalDialog=document.querySelector(".modal--abandonment"),abandonment={event:new Event("abandonment.closed"),modalElement:modalDialog||document.querySelector(".abandonment__modal"),isModalDialog:!!modalDialog,heapTrack:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&modUtils.heap("track",["Abandonment popup | ".concat(e),t])},closeModal:function(e){this.heapTrack("Closed"),this.isModalDialog?(e.close(),document.body.classList.remove("no-scroll"),e.setAttribute("aria-hidden","true"),document.querySelector(".step--active").focus()):this.modalElement.style.display="none",this.modalElement.parentNode.dispatchEvent(this.event)},initClickTracking:function(){var e=this,t=document.querySelectorAll("#abandonment .btn-call-now"),n=document.querySelectorAll("#abandonment .btn-get-price-quotes");t&&t.forEach((function(t){t.addEventListener("click",(function(t){e.closeModal(e.modalElement),e.heapTrack("Clicked Phone Number",{phoneNumber:t.target.textContent.trim()})}))})),n&&n.forEach((function(t){t.addEventListener("click",(function(){e.closeModal(e.modalElement),e.heapTrack("Clicked CTA")}))}))},initCloseListener:function(){var e=this;this.isModalDialog?(this.modalElement.querySelector('[data-close="dialog"]').addEventListener("click",(function(){e.closeModal(e.modalElement)})),document.body.addEventListener("click",(function(t){t.target.id===e.modalElement.id&&e.closeModal(e.modalElement)})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&e.closeModal(e.modalElement)}))):document.addEventListener("click",(function(t){t.target.id&&("abandonment-modal"!==t.target.id&&"btnModalClose"!==t.target.id||e.modalElement&&(e.modalElement.style.display="none",document.body.classList.remove("no-scroll"),e.heapTrack("Closed"),e.modalElement.dispatchEvent(e.event)))}))},initAbandonmentForm:function(){var e=document.getElementById("abandonment-form");if(e){form.init(e,{isAbandonmentForm:!0,hasBackButtons:!1,hasClickToProceed:!1,hasProgressbar:!1,hasZipChange:!1,skipStep:{device:"",index:null,shouldSkip:!1}})}},setAbandonmentType:function(){"default"===(document.getElementById("abandonment-form")?"form":"default")?this.initClickTracking():this.initAbandonmentForm()},init:function(){this.setAbandonmentType(),this.initCloseListener();var e=window.location.hash;this.heapTrack("Shown",{step:e}),this.isModalDialog&&(this.modalElement.show(),this.modalElement.focus(),this.modalElement.setAttribute("aria-hidden","false"),modUtils.trapTabFocusInDialog("abandonmentDialog"))}};abandonment.init();
2
- //# sourceMappingURL=abandonment.min.js.map
@@ -1,2 +0,0 @@
1
- "use strict";var callrail={setCallRailCookie:function(t){var a,o=Object.entries(t);a=(o=o.map((function(t){return t.join("=")}))).join("|"),modUtils.setCookie("qs_track_data",a)},init:function(t){var a=this;if(null===modUtils.getCookie("qs_track_data"))var o=0,i=setInterval((function(){if(++o,Object.keys(modForm.opts.quadLinkParams).length>0||20===o){clearInterval(i);var r=modUtils.getUrlParamsToObject(),e=void 0!==r.PartnerSourceID?r.PartnerSourceID:0,s={afk:modForm.opts.quadLinkParams.AffiliateKey,clk:modForm.opts.quadLinkParams.CLK,ccid:modForm.opts.quadLinkParams.CCID,qtr:modForm.opts.quadLinkParams.QTR};0!==e&&(s.psid=e),a.setCallRailCookie(s),modUtils.fetchScript(t)}}),1e3);else modUtils.fetchScript(t)}};
2
- //# sourceMappingURL=callrail.min.js.map
@@ -1,2 +0,0 @@
1
- "use strict";var callrail={setCallRailCookie:function(t){var a,o=Object.entries(t);a=(o=o.map((function(t){return t.join("=")}))).join("|"),modUtils.setCookie("qs_track_data",a)},init:function(t){var a=this;if(null===modUtils.getCookie("qs_track_data"))var o=0,i=setInterval((function(){if(++o,Object.keys(modForm.opts.quadLinkParams).length>0||20===o){clearInterval(i);var r=modUtils.getUrlParamsToObject(),e=void 0!==r.PartnerSourceID?r.PartnerSourceID:0,s={afk:modForm.opts.quadLinkParams.AffiliateKey,clk:modForm.opts.quadLinkParams.CLK,ccid:modForm.opts.quadLinkParams.CCID,qtr:modForm.opts.quadLinkParams.QTR};0!==e&&(s.psid=e),a.setCallRailCookie(s),modUtils.fetchScript(t)}}),1e3);else modUtils.fetchScript(t)}};
2
- //# sourceMappingURL=callrail.min.js.map
@@ -1,2 +0,0 @@
1
- "use strict";function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}function _iterableToArrayLimit(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var n,a,r,i,c=[],s=!0,l=!1;try{if(r=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;s=!1}else for(;!(s=(n=r.call(o)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){l=!0,a=t}finally{try{if(!s&&null!=o.return&&(i=o.return(),Object(i)!==i))return}finally{if(l)throw a}}return c}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var Footer={element:document.querySelector("#footer-component"),siteData:"object"===("undefined"==typeof siteData?"undefined":_typeof(siteData))?siteData:{},footerType:"qs",modDomain:"https://modernize.com",refocusOnElement:"",isBestCompany:window.location.host.includes("bestcompany")||window.location.host.includes("topsolarcompanies")||window.location.host.includes("besthomesecuritycompanys"),defaultFooter:{mod:{copyright:{year:(new Date).getFullYear(),text:"All&nbsp;Rights&nbsp;Reserved.",spanishText:"Todos&nbsp;los&nbsp;derechos&nbsp;reservados.",companyName:"Modernize.com"},contractor:{text:"Are you a contractor?",linkText:"Join Our Contractor Network",link:"https://modernize.com/pro/register/leads/?utm_campaign=quinstreet-referral",spanishText:"¿Eres un contratista?",spanishLinkText:"Únete a nuestra red de contratistas"},captchaDisclosure:{text:"This site is protected by reCAPTCHA and the Google",privacy:{text:"Privacy Policy",spanishText:"Política de Privacidad",url:"https://policies.google.com/privacy"},terms:{text:"Terms&nbsp;of&nbsp;Service",spanishText:"Términos de Servicio",url:"https://policies.google.com/terms"}}},qs:{links:[{id:"about",url:"/?modal=about",modal:!0,text:"About",spanishText:"Acerca de"},{id:"privacy",url:"/?modal=privacy",modal:!0,text:"Privacy Notice",spanishText:"Aviso de Privacidad"},{id:"publisher",url:"https://modernize.com/contact?publisher",text:"Affiliates",spanishText:"Afiliados",modal:!1},{id:"tou",url:"/?modal=terms",modal:!0,text:"Terms of Use",spanishText:"Términos de Uso"},{id:"contact",url:"/?modal=contact-us",modal:!0,text:"Contact Us",spanishText:"Contáctanos"},{id:"ccpa",url:"https://privacy-central.securiti.ai/#/dsr/1b319101-f00c-470f-a7f0-26aa81f057b8",modal:!1,text:"Do Not Sell or Share My Personal Information",spanishText:"No vender ni compartir mi información personal"}],copyright:{companyName:"QuinStreet, Inc",text:"All Rights Reserved.",spanishText:"Todos los derechos reservados.",year:(new Date).getFullYear()},contractor:{text:"Are you a contractor?",linkText:"Join Our Contractor Network",link:"https://modernize.com/pro/register/leads/?utm_campaign=quinstreet-referral",spanishText:"¿Eres un contratista?",spanishLinkText:"Únete a nuestra red de contratistas"}}},render:function(t){this.element.innerHTML=t},getFooterParams:function(){var t=document.querySelector('script[src*="footer-component"]');t&&(t.src&&t.src.indexOf("qa.")>-1&&(this.modDomain="https://qa.modernize.com"),("mod"===t.getAttribute("data-type")||t.src.indexOf("mod-footer")>-1)&&(this.footerType="mod"))},getAssetPath:function(){return"".concat(this.modDomain,"/quote/resources/assets")},getLinkTag:function(t){var e=this.siteData,o=e.isSpanishPage,n=e.pathSubdirectory,a="".concat(n||""===n?n:"/","resources/templates/modals/");return'<a\n\t\t\t\tid="'.concat(t.id,'"\n\t\t\t\thref="').concat(t.url).concat(t.anchor?"#"+t.anchor:"",'"\n\t\t\t\t').concat(!0===t.modal?'data-load="'.concat(a).concat(t.url.replace("/?modal=",""),'/"\n\t\t\t\t\tdata-bind="modal-page"\n\t\t\t\t\tdata-anchor="#').concat(t.anchor,'"'):'target="'.concat(t.target?t.target:"_blank",'"\n\t\t\t\t\trel="noopener noreferrer"'),">\n\t\t\t\t").concat(o?t.spanishText:t.text,"\n\t\t\t</a>")},getModCopyRightAndRecaptcha:function(){var t=this.defaultFooter.mod,e=t.copyright,o=t.captchaDisclosure,n=this.siteData,a=n.companyName,r=n.isSpanishPage;return'\n\t\t\t<p class="footer__copyright">\n\t\t\t\t&copy; '.concat(e.year," ").concat(a||e.companyName,".\n\t\t\t\t").concat(r?e.spanishText:e.text,'\n\t\t\t</p>\n\t\t\t<p class="footer__copyright footer__captcha-disclosure">\n\t\t\t\t').concat(r?'Este sitio está protegido por reCAPTCHA y se aplican la <a href="'.concat(o.privacy.url,'" target="_blank">').concat(o.privacy.spanishText,'</a> y <a href="').concat(o.terms.url,'" target="_blank">').concat(o.terms.spanishText,"</a>&nbsp;de&nbsp;Google"):"".concat(o.text,'\n\t\t\t\t\t<a href="').concat(o.privacy.url,'" target="_blank">').concat(o.privacy.text,'</a> and\n\t\t\t\t\t<a href="').concat(o.terms.url,'" target="_blank">').concat(o.terms.text,"</a>&nbsp;apply."),"\n\t\t\t</p>")},getModFooterLinks:function(){var t=this,e=this.defaultFooter.qs.links,o=this.siteData,n=o.footerLinks,a=o.isQuotePage,r=o.isQSPage;return'\n\t\t\t<ul class="footer__links">\n\t\t\t\t'.concat(e.map((function(e){if(!a&&r||("tou"===e.id&&(e.text="Terms & Conditions",e.spanishText="Términos y Condiciones"),"about"===e.id&&(e.text="About Us",e.spanishText="Acerca de Nosotros"),"publisher"===e.id&&(e.text="I'm a Publisher",e.spanishText="Soy Editor"),"contact"!==e.id))return"\n\t\t\t\t\t".concat(t.element.hasAttribute("data-hide-".concat(e.id))?"":"<li>\n\t\t\t\t\t\t".concat(t.getLinkTag(e),"\n\t\t\t\t\t</li>"))})).join(""),"\n\n\t\t\t\t").concat(n?n.map((function(e){return"\n\t\t\t\t\t<li>\n\t\t\t\t\t\t".concat(t.getLinkTag(e),"\n\t\t\t\t\t</li>")})).join(""):"","\n\t\t\t</ul>")},displayModFooter:function(){var t=this.defaultFooter.mod.contractor,e=this.siteData,o=e.bbbLogoPath,n=e.trade,a=e.isQuotePage,r=e.isSpanishPage,i="".concat(this.getAssetPath(),a?"/images/logos/misc/bbb-dark.svg":"/images/logos/misc/bbb.svg"),c=o||i,s=this.element;this.render('<div class="footer'.concat(a?" footer--quote-page":"").concat(r?" footer--spanish":"",'">\n\t\t\t\t<div class="container">\n\t\t\t\t\t').concat(s.hasAttribute("data-hide-bbb")?"":'<img width="130" height="47" loading="lazy" src="'.concat(c,'" alt="BBB Accredited Logo" class="footer__bbb-logo footer__bbb\n\t\t\t\t\t\t\t').concat(s.hasAttribute("data-hide-bbb-xs")?"hidden-xs":"",'">'),"\n\t\t\t\t\t").concat(s.hasAttribute("data-hide-contractor")?"":'<div class="footer__head-link">\n\t\t\t\t\t\t'.concat(r?t.spanishText:t.text,'\n\t\t\t\t\t\t<a target="_blank" href="').concat(t.link).concat(n?"&trade=".concat(n):"",'" rel="noopener noreferrer">\n\t\t\t\t\t\t\t').concat(r?t.spanishLinkText:t.linkText,"\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>"),"\n\n\t\t\t\t\t\t").concat(this.getModFooterLinks(),"\n\t\t\t\t\t\t").concat(this.getModCopyRightAndRecaptcha(),"\n\t\t\t\t</div>\n\t\t\t</div>"))},displayQsFooter:function(){var t=this,e=this.defaultFooter.qs,o=e.contractor,n=e.links,a=e.copyright,r=t.siteData,i=r.trade,c=r.footerLinks,s=r.bbbLogoPath,l=r.isSpanishPage,d=r.companyName,u=this.element,h=d||a.companyName;this.render('<footer class="footer '.concat(l?"footer--spanish":"",'">\n\t\t\t\t<div class="container">\n\t\t\t\t\t').concat(u.hasAttribute("data-show-bbb")?'<svg class="footer__bbb-logo footer__bbb">\n\t\t\t\t\t\t<use href="'.concat(s,'"></use>\n\t\t\t\t\t</svg>'):"","\n\n\t\t\t\t\t").concat(u.hasAttribute("data-hide-contractor")?"":'<div class="footer__head-link">\n\t\t\t\t\t\t'.concat(l?o.spanishText:o.text,'\n\t\t\t\t\t\t<a href="').concat(o.link).concat(i?"&trade=".concat(i):"",'" target="_blank" rel="noopener noreferrer">\n\t\t\t\t\t\t\t').concat(l?o.spanishLinkText:o.linkText,"\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>"),'\n\n\t\t\t\t\t<ul class="footer__links">\n\t\t\t\t\t\t').concat(n.map((function(e){return"".concat(u.hasAttribute("data-hide-".concat(e.id))?"":"<li>\n\t\t\t\t\t\t\t\t\t\t".concat(t.getLinkTag(e),"\n\t\t\t\t\t\t\t\t\t</li>"))})).join(""),"\n\n\t\t\t\t\t\t").concat(c?c.map((function(e){return'<li style="'.concat(e.order?"order:".concat(e.order):"",'">\n\t\t\t\t\t\t\t\t\t').concat(t.getLinkTag(e),"\n\t\t\t\t\t\t\t\t</li>")})).join(""):"","\n\t\t\t\t\t</ul>\n\t\t\t\t\t").concat(u.hasAttribute("data-hide-copyright")?"":'<p class="footer__copyright">\n\t\t\t\t\t\t&copy; '.concat(a.year," ").concat(t.isBestCompany?"Modernize":h,". ").concat(l?a.spanishText:a.text,"\n\t\t\t\t\t</p>"),"\n\t\t\t\t</div>\n\t\t\t</footer>"))},loadCss:function(){var t=document.getElementsByTagName("head")[0],e=document.createElement("link");e.type="text/css",e.rel="stylesheet","mod"===this.footerType?e.href="".concat("/resources/styles/components/footer/mod-footer-d233fa64b6c8297c70ec.min.css"):e.href="".concat("/resources/styles/components/footer/qs-footer-926e67c28d10c729db46.min.css"),t.appendChild(e)},getQueryParam:function(t){var e=window.location.search.match(new RegExp("[?&]"+t+"=([^&]+)"));return e?e[1]:null},camelToUnderscore:function(t){return t.replace(/([A-Z])/g," $1").split(" ").join("_").toLowerCase()},prepopModalTemplateWithSiteData:function(t){var e={company_name:this.isBestCompany?"Modernize":this.siteData.company_name||("mod"===this.footerType?"Modernize.com":"Quinstreet, Inc."),domain:window.location.host};return Object.entries(e).forEach((function(e){var o=_slicedToArray(e,2),n=o[0],a=o[1],r=new RegExp("{{("+n+"|"+Footer.camelToUnderscore(n)+")}}","gi");t=t.replace(r,a)})),t},initModalLinks:function(){var t=this,e='a[data-bind="modal-page"]',o="info-modal",n=['<dialog id="'+o+'" role="dialog" aria-labelledby="footer-modal-title" aria-hidden="true" tabindex="-1" style="border: 0; background-color: transparent; outline:0; padding:0; max-width: 100%; max-height: 100%; height: 100%; position: fixed; top: 0; z-index: 100;">','<div class="modal-dialog">','<div class="modal-content">','<div class="modal-header">','<h1 id="footer-modal-title" class="modal-title"></h1>',"</div>",'<div class="modal-body">Loading...</div>','<div class="modal-footer">','<button type="button" class="btn btn-primary btn--primary close" data-dismiss="modal" data-close="dialog">Close</button>',"</div>","</div>","</div>","</dialog>"].join("");document.querySelectorAll(e).forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var a=this,r=a.getAttribute("data-load"),i=a.getAttribute("id");document.getElementById(o)&&document.getElementById(o).remove(),document.body.insertAdjacentHTML("beforeend",n);var c=document.getElementById(o),s=c.querySelector(".modal-title"),l=c.querySelector(".modal-body");s.textContent=a.textContent,fetch(r).then((function(t){return t.text()})).then((function(t){l.innerHTML=Footer.prepopModalTemplateWithSiteData(t),c.querySelectorAll("a[href^=\\#]").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var e=c.querySelector(this.hash);e.scrollIntoView({behavior:"smooth"});var o=l.querySelectorAll("section");l.addEventListener("scroll",(function t(){o.forEach((function(t){t.blur()})),l.classList.contains("scrolling")||(l.classList.add("scrolling"),setTimeout((function(){l.classList.remove("scrolling"),e.focus(),l.removeEventListener("scroll",t)}),750))}))}))}));var e=a.getAttribute("data-anchor");e&&"#undefined"!==e&&document.querySelector(e).scrollIntoView(),modUtils.trapTabFocusInDialog(o),Footer.initCloseDialog(o)})),c.show(),c.focus(),c.setAttribute("aria-hidden","false"),t.refocusOnElement=i;var d=new MutationObserver((function(){l.hasChildNodes()&&(d.disconnect(),function(){for(var t=l.getElementsByTagName("script"),e=0;e<t.length;e++){var o=t[e].innerText;new Function(o)()}var n=l.querySelectorAll("script[src]");function a(){}for(var r=0;r<n.length;r++){var i=document.createElement("script");i.src=n[r].src,i.onload=a,document.head.appendChild(i)}}())}));c.open&&d.observe(l,{childList:!0,subtree:!0})}))}));var a=this.getQueryParam("modal");a&&document.querySelectorAll("".concat(e,'[href="/?modal=').concat(a,'"]:first')).click();var r=window.location.search;r&&(r=r.substring(1),document.querySelectorAll(e).forEach((function(t){var e=t.getAttribute("href");e+="&"+r,t.setAttribute("href",e)})))},closeModal:function(t){var e=document.body.classList.contains("modal-opened-globally");t.close(),t.setAttribute("aria-hidden","true"),this.refocusOnElement&&!e&&(document.getElementById(this.refocusOnElement).focus(),this.refocusOnElement=""),e&&document.body.classList.remove("modal-opened-globally")},initCloseDialog:function(t){var e=document.getElementById(t),o=this;e.querySelector('[data-close="dialog"]').addEventListener("click",(function(){o.closeModal(e)})),document.body.addEventListener("click",(function(n){n.target.id===t&&o.closeModal(e)})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&o.closeModal(e)}))},init:function(){this.getFooterParams(),this.loadCss(),"mod"===this.footerType?this.displayModFooter():this.displayQsFooter(),this.initModalLinks()}};window.addEventListener("load",(function(){"function"==typeof window.HTMLDialogElement&&modUtils.heap("track",["HTML Dialog Element Supported"]),"IdlizeQueue"in window?window.IdlizeQueue.pushTask((function(){Footer.init()})):Footer.init()}));
2
- //# sourceMappingURL=footer-component.min.js.map
@@ -1,2 +0,0 @@
1
- "use strict";function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}function _iterableToArrayLimit(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var n,a,r,i,c=[],s=!0,l=!1;try{if(r=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;s=!1}else for(;!(s=(n=r.call(o)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){l=!0,a=t}finally{try{if(!s&&null!=o.return&&(i=o.return(),Object(i)!==i))return}finally{if(l)throw a}}return c}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var Footer={element:document.querySelector("#footer-component"),siteData:"object"===("undefined"==typeof siteData?"undefined":_typeof(siteData))?siteData:{},footerType:"qs",modDomain:"https://modernize.com",refocusOnElement:"",isBestCompany:window.location.host.includes("bestcompany")||window.location.host.includes("topsolarcompanies")||window.location.host.includes("besthomesecuritycompanys"),defaultFooter:{mod:{copyright:{year:(new Date).getFullYear(),text:"All&nbsp;Rights&nbsp;Reserved.",spanishText:"Todos&nbsp;los&nbsp;derechos&nbsp;reservados.",companyName:"Modernize.com"},contractor:{text:"Are you a contractor?",linkText:"Join Our Contractor Network",link:"https://modernize.com/pro/register/leads/?utm_campaign=quinstreet-referral",spanishText:"¿Eres un contratista?",spanishLinkText:"Únete a nuestra red de contratistas"},captchaDisclosure:{text:"This site is protected by reCAPTCHA and the Google",privacy:{text:"Privacy Policy",spanishText:"Política de Privacidad",url:"https://policies.google.com/privacy"},terms:{text:"Terms&nbsp;of&nbsp;Service",spanishText:"Términos de Servicio",url:"https://policies.google.com/terms"}}},qs:{links:[{id:"about",url:"/?modal=about",modal:!0,text:"About",spanishText:"Acerca de"},{id:"privacy",url:"/?modal=privacy",modal:!0,text:"Privacy Notice",spanishText:"Aviso de Privacidad"},{id:"publisher",url:"https://modernize.com/contact?publisher",text:"Affiliates",spanishText:"Afiliados",modal:!1},{id:"tou",url:"/?modal=terms",modal:!0,text:"Terms of Use",spanishText:"Términos de Uso"},{id:"contact",url:"/?modal=contact-us",modal:!0,text:"Contact Us",spanishText:"Contáctanos"},{id:"ccpa",url:"https://privacy-central.securiti.ai/#/dsr/1b319101-f00c-470f-a7f0-26aa81f057b8",modal:!1,text:"Do Not Sell or Share My Personal Information",spanishText:"No vender ni compartir mi información personal"}],copyright:{companyName:"QuinStreet, Inc",text:"All Rights Reserved.",spanishText:"Todos los derechos reservados.",year:(new Date).getFullYear()},contractor:{text:"Are you a contractor?",linkText:"Join Our Contractor Network",link:"https://modernize.com/pro/register/leads/?utm_campaign=quinstreet-referral",spanishText:"¿Eres un contratista?",spanishLinkText:"Únete a nuestra red de contratistas"}}},render:function(t){this.element.innerHTML=t},getFooterParams:function(){var t=document.querySelector('script[src*="footer-component"]');t&&(t.src&&t.src.indexOf("qa.")>-1&&(this.modDomain="https://qa.modernize.com"),("mod"===t.getAttribute("data-type")||t.src.indexOf("mod-footer")>-1)&&(this.footerType="mod"))},getAssetPath:function(){return"".concat(this.modDomain,"/quote/resources/assets")},getLinkTag:function(t){var e=this.siteData,o=e.isSpanishPage,n=e.pathSubdirectory,a="".concat(n||""===n?n:"/","resources/templates/modals/");return'<a\n\t\t\t\tid="'.concat(t.id,'"\n\t\t\t\thref="').concat(t.url).concat(t.anchor?"#"+t.anchor:"",'"\n\t\t\t\t').concat(!0===t.modal?'data-load="'.concat(a).concat(t.url.replace("/?modal=",""),'/"\n\t\t\t\t\tdata-bind="modal-page"\n\t\t\t\t\tdata-anchor="#').concat(t.anchor,'"'):'target="'.concat(t.target?t.target:"_blank",'"\n\t\t\t\t\trel="noopener noreferrer"'),">\n\t\t\t\t").concat(o?t.spanishText:t.text,"\n\t\t\t</a>")},getModCopyRightAndRecaptcha:function(){var t=this.defaultFooter.mod,e=t.copyright,o=t.captchaDisclosure,n=this.siteData,a=n.companyName,r=n.isSpanishPage;return'\n\t\t\t<p class="footer__copyright">\n\t\t\t\t&copy; '.concat(e.year," ").concat(a||e.companyName,".\n\t\t\t\t").concat(r?e.spanishText:e.text,'\n\t\t\t</p>\n\t\t\t<p class="footer__copyright footer__captcha-disclosure">\n\t\t\t\t').concat(r?'Este sitio está protegido por reCAPTCHA y se aplican la <a href="'.concat(o.privacy.url,'" target="_blank">').concat(o.privacy.spanishText,'</a> y <a href="').concat(o.terms.url,'" target="_blank">').concat(o.terms.spanishText,"</a>&nbsp;de&nbsp;Google"):"".concat(o.text,'\n\t\t\t\t\t<a href="').concat(o.privacy.url,'" target="_blank">').concat(o.privacy.text,'</a> and\n\t\t\t\t\t<a href="').concat(o.terms.url,'" target="_blank">').concat(o.terms.text,"</a>&nbsp;apply."),"\n\t\t\t</p>")},getModFooterLinks:function(){var t=this,e=this.defaultFooter.qs.links,o=this.siteData,n=o.footerLinks,a=o.isQuotePage,r=o.isQSPage;return'\n\t\t\t<ul class="footer__links">\n\t\t\t\t'.concat(e.map((function(e){if(!a&&r||("tou"===e.id&&(e.text="Terms & Conditions",e.spanishText="Términos y Condiciones"),"about"===e.id&&(e.text="About Us",e.spanishText="Acerca de Nosotros"),"publisher"===e.id&&(e.text="I'm a Publisher",e.spanishText="Soy Editor"),"contact"!==e.id))return"\n\t\t\t\t\t".concat(t.element.hasAttribute("data-hide-".concat(e.id))?"":"<li>\n\t\t\t\t\t\t".concat(t.getLinkTag(e),"\n\t\t\t\t\t</li>"))})).join(""),"\n\n\t\t\t\t").concat(n?n.map((function(e){return"\n\t\t\t\t\t<li>\n\t\t\t\t\t\t".concat(t.getLinkTag(e),"\n\t\t\t\t\t</li>")})).join(""):"","\n\t\t\t</ul>")},displayModFooter:function(){var t=this.defaultFooter.mod.contractor,e=this.siteData,o=e.bbbLogoPath,n=e.trade,a=e.isQuotePage,r=e.isSpanishPage,i="".concat(this.getAssetPath(),a?"/images/logos/misc/bbb-dark.svg":"/images/logos/misc/bbb.svg"),c=o||i,s=this.element;this.render('<div class="footer'.concat(a?" footer--quote-page":"").concat(r?" footer--spanish":"",'">\n\t\t\t\t<div class="container">\n\t\t\t\t\t').concat(s.hasAttribute("data-hide-bbb")?"":'<img width="130" height="47" loading="lazy" src="'.concat(c,'" alt="BBB Accredited Logo" class="footer__bbb-logo footer__bbb\n\t\t\t\t\t\t\t').concat(s.hasAttribute("data-hide-bbb-xs")?"hidden-xs":"",'">'),"\n\t\t\t\t\t").concat(s.hasAttribute("data-hide-contractor")?"":'<div class="footer__head-link">\n\t\t\t\t\t\t'.concat(r?t.spanishText:t.text,'\n\t\t\t\t\t\t<a target="_blank" href="').concat(t.link).concat(n?"&trade=".concat(n):"",'" rel="noopener noreferrer">\n\t\t\t\t\t\t\t').concat(r?t.spanishLinkText:t.linkText,"\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>"),"\n\n\t\t\t\t\t\t").concat(this.getModFooterLinks(),"\n\t\t\t\t\t\t").concat(this.getModCopyRightAndRecaptcha(),"\n\t\t\t\t</div>\n\t\t\t</div>"))},displayQsFooter:function(){var t=this,e=this.defaultFooter.qs,o=e.contractor,n=e.links,a=e.copyright,r=t.siteData,i=r.trade,c=r.footerLinks,s=r.bbbLogoPath,l=r.isSpanishPage,d=r.companyName,u=this.element,h=d||a.companyName;this.render('<footer class="footer '.concat(l?"footer--spanish":"",'">\n\t\t\t\t<div class="container">\n\t\t\t\t\t').concat(u.hasAttribute("data-show-bbb")?'<svg class="footer__bbb-logo footer__bbb">\n\t\t\t\t\t\t<use href="'.concat(s,'"></use>\n\t\t\t\t\t</svg>'):"","\n\n\t\t\t\t\t").concat(u.hasAttribute("data-hide-contractor")?"":'<div class="footer__head-link">\n\t\t\t\t\t\t'.concat(l?o.spanishText:o.text,'\n\t\t\t\t\t\t<a href="').concat(o.link).concat(i?"&trade=".concat(i):"",'" target="_blank" rel="noopener noreferrer">\n\t\t\t\t\t\t\t').concat(l?o.spanishLinkText:o.linkText,"\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>"),'\n\n\t\t\t\t\t<ul class="footer__links">\n\t\t\t\t\t\t').concat(n.map((function(e){return"".concat(u.hasAttribute("data-hide-".concat(e.id))?"":"<li>\n\t\t\t\t\t\t\t\t\t\t".concat(t.getLinkTag(e),"\n\t\t\t\t\t\t\t\t\t</li>"))})).join(""),"\n\n\t\t\t\t\t\t").concat(c?c.map((function(e){return'<li style="'.concat(e.order?"order:".concat(e.order):"",'">\n\t\t\t\t\t\t\t\t\t').concat(t.getLinkTag(e),"\n\t\t\t\t\t\t\t\t</li>")})).join(""):"","\n\t\t\t\t\t</ul>\n\t\t\t\t\t").concat(u.hasAttribute("data-hide-copyright")?"":'<p class="footer__copyright">\n\t\t\t\t\t\t&copy; '.concat(a.year," ").concat(t.isBestCompany?"Modernize":h,". ").concat(l?a.spanishText:a.text,"\n\t\t\t\t\t</p>"),"\n\t\t\t\t</div>\n\t\t\t</footer>"))},loadCss:function(){var t=document.getElementsByTagName("head")[0],e=document.createElement("link");e.type="text/css",e.rel="stylesheet","mod"===this.footerType?e.href="".concat(this.modDomain,"/quote/resources/shared-resources/styles/components/footer/mod-footer.min.css"):e.href="".concat(this.modDomain,"/quote/resources/shared-resources/styles/components/footer/qs-footer.min.css"),t.appendChild(e)},getQueryParam:function(t){var e=window.location.search.match(new RegExp("[?&]"+t+"=([^&]+)"));return e?e[1]:null},camelToUnderscore:function(t){return t.replace(/([A-Z])/g," $1").split(" ").join("_").toLowerCase()},prepopModalTemplateWithSiteData:function(t){var e={company_name:this.isBestCompany?"Modernize":this.siteData.company_name||("mod"===this.footerType?"Modernize.com":"Quinstreet, Inc."),domain:window.location.host};return Object.entries(e).forEach((function(e){var o=_slicedToArray(e,2),n=o[0],a=o[1],r=new RegExp("{{("+n+"|"+Footer.camelToUnderscore(n)+")}}","gi");t=t.replace(r,a)})),t},initModalLinks:function(){var t=this,e='a[data-bind="modal-page"]',o="info-modal",n=['<dialog id="'+o+'" role="dialog" aria-labelledby="footer-modal-title" aria-hidden="true" tabindex="-1" style="border: 0; background-color: transparent; outline:0; padding:0; max-width: 100%; max-height: 100%; height: 100%; position: fixed; top: 0; z-index: 100;">','<div class="modal-dialog">','<div class="modal-content">','<div class="modal-header">','<h1 id="footer-modal-title" class="modal-title"></h1>',"</div>",'<div class="modal-body">Loading...</div>','<div class="modal-footer">','<button type="button" class="btn btn-primary btn--primary close" data-dismiss="modal" data-close="dialog">Close</button>',"</div>","</div>","</div>","</dialog>"].join("");document.querySelectorAll(e).forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var a=this,r=a.getAttribute("data-load"),i=a.getAttribute("id");document.getElementById(o)&&document.getElementById(o).remove(),document.body.insertAdjacentHTML("beforeend",n);var c=document.getElementById(o),s=c.querySelector(".modal-title"),l=c.querySelector(".modal-body");s.textContent=a.textContent,fetch(r).then((function(t){return t.text()})).then((function(t){l.innerHTML=Footer.prepopModalTemplateWithSiteData(t),c.querySelectorAll("a[href^=\\#]").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var e=c.querySelector(this.hash);e.scrollIntoView({behavior:"smooth"});var o=l.querySelectorAll("section");l.addEventListener("scroll",(function t(){o.forEach((function(t){t.blur()})),l.classList.contains("scrolling")||(l.classList.add("scrolling"),setTimeout((function(){l.classList.remove("scrolling"),e.focus(),l.removeEventListener("scroll",t)}),750))}))}))}));var e=a.getAttribute("data-anchor");e&&"#undefined"!==e&&document.querySelector(e).scrollIntoView(),modUtils.trapTabFocusInDialog(o),Footer.initCloseDialog(o)})),c.show(),c.focus(),c.setAttribute("aria-hidden","false"),t.refocusOnElement=i;var d=new MutationObserver((function(){l.hasChildNodes()&&(d.disconnect(),function(){for(var t=l.getElementsByTagName("script"),e=0;e<t.length;e++){var o=t[e].innerText;new Function(o)()}var n=l.querySelectorAll("script[src]");function a(){}for(var r=0;r<n.length;r++){var i=document.createElement("script");i.src=n[r].src,i.onload=a,document.head.appendChild(i)}}())}));c.open&&d.observe(l,{childList:!0,subtree:!0})}))}));var a=this.getQueryParam("modal");a&&document.querySelectorAll("".concat(e,'[href="/?modal=').concat(a,'"]:first')).click();var r=window.location.search;r&&(r=r.substring(1),document.querySelectorAll(e).forEach((function(t){var e=t.getAttribute("href");e+="&"+r,t.setAttribute("href",e)})))},closeModal:function(t){var e=document.body.classList.contains("modal-opened-globally");t.close(),t.setAttribute("aria-hidden","true"),this.refocusOnElement&&!e&&(document.getElementById(this.refocusOnElement).focus(),this.refocusOnElement=""),e&&document.body.classList.remove("modal-opened-globally")},initCloseDialog:function(t){var e=document.getElementById(t),o=this;e.querySelector('[data-close="dialog"]').addEventListener("click",(function(){o.closeModal(e)})),document.body.addEventListener("click",(function(n){n.target.id===t&&o.closeModal(e)})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&o.closeModal(e)}))},init:function(){this.getFooterParams(),this.loadCss(),"mod"===this.footerType?this.displayModFooter():this.displayQsFooter(),this.initModalLinks()}};window.addEventListener("load",(function(){"function"==typeof window.HTMLDialogElement&&modUtils.heap("track",["HTML Dialog Element Supported"]),"IdlizeQueue"in window?window.IdlizeQueue.pushTask((function(){Footer.init()})):Footer.init()}));
2
- //# sourceMappingURL=footer-component.min.js.map
@@ -1,2 +0,0 @@
1
- "use strict";var geolocation={defaultLocation:null,currentLocation:{},cookieExpirationMinutes:1440,locationData:["country","state","statecode","city","zipcode"],source:"maxmind",status:"",usedSource:null,responseCollection:{},getGeolocationEndpoint:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(t=this.source),this.usedSource=t;var o=modUtils.getEnv();if("insurance"===t)return"https://www.nextinsure.com/listingdisplay/handlers/geo.ashx";if("maxmind"===t){var e=window.document.location.origin;return"https://geoip-js.com/geoip/v2.1/city/me?referrer=".concat(e)}var n=modUtils.getUrlParamsToObject().geo;return"https://api.".concat("production"===o?"modernize":"hilstaging",".com/v1/geo-targets?type=").concat(t,"&geoTargetConstant=").concat(n)},formatGeoResponse:function(t){var o={};if("maxmind"===this.usedSource)o={country:t.country.names.en,city:t.city.names.en,state:t.subdivisions[0].names.en,statecode:t.subdivisions[0].iso_code,zipcode:t.postal.code};else if("google"===this.usedSource){var e=t.data.canonicalName.split(",")||[];({Country:["country"],State:["state","country"],City:["city","state","country"],"Postal Code":["zipcode","state","country"],"Neighborhood-3":["neighborhood","state","country"],"Neighborhood-4":["neighborhood","city","state","country"]})["Neighborhood"===t.data.type?t.data.type+"-"+e.length:t.data.type].forEach((function(t,n){o[t]=e[n]})),o.statecode=o.statecode?o.statecode:t.data.stateCode,o.city=o.city?o.city:t.data.city}else if("bing"===this.usedSource){var n=t.data.name.split("|")||[];({Country:["country"],State:["state","country"],City:["city","state","country"],County:["county","state","country"],PostalCode:["zipcode","state","country"]})[t.data.type].forEach((function(t,e){o[t]=n[e]})),o.statecode=o.statecode?o.statecode:t.data.stateCode,o.city=o.city?o.city:t.data.city}else o=t;return o},fetchUserLocation:function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=this,n=this.getGeolocationEndpoint();fetch(n).then((function(t){return t.json()})).then((function(n){var i=e.formatGeoResponse(n);e.responseCollection[e.source]=i,i.zipcode?t(i):(e.source="maxmind",e.fetchUserLocation(t,o))})).catch((function(n){console.log(n),"google"===e.usedSource||"bing"===e.usedSource?(e.source="maxmind",e.fetchUserLocation(t,o)):"maxmind"===e.usedSource?(e.source="insurance",e.fetchUserLocation(t,o)):o(n)}))},getLocationCookie:function(){var t=modUtils.getCookie("geolocation");if(t)try{return JSON.parse(t)}catch(t){return}},isValidLocationResponse:function(t){for(var o=0;o<this.locationData.length;o++)if(!t[this.locationData[o]])return!1;return!0},setLocationCookie:function(t){var o=JSON.stringify(t);modUtils.setCookie("geolocation",o,this.cookieExpirationMinutes)},setLocationValues:function(t){var o=this;return!!this.isValidLocationResponse(t)&&(this.locationData.forEach((function(e){o.currentLocation[e]=t[e]})),this.setLocationCookie(this.currentLocation),!0)},populateGeolocationElements:function(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===o&&(o=this.currentLocation),"United States"===o.country&&document.querySelectorAll("[data-geolocation]:not([data-geolocation-loaded])").forEach((function(e){var n=e.getAttribute("data-geolocation");if(n){Object.keys(o).forEach((function(t){if(n.includes("{".concat(t,"}"))){var e=o[t]||"";n=n.replace("{".concat(t,"}"),e)}}));["input","textarea","select"].indexOf(e.tagName.toLowerCase())>-1?e.value=n:e.innerHTML=n,"success"===t.status&&e.setAttribute("data-geolocation-loaded",!0)}}))},init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=this,e=modUtils.getUrlParamsToObject();t&&Object.assign(this,t),e.geolocationSrc&&(o.source=e.geolocationSrc),e.msclkid?o.source="bing":e.gclid&&(o.source="google");var n=["bing","google"];n.includes(o.source)&&!e.geo&&(o.source="maxmind");var i=function(t){if(o.setLocationValues(t)){var e=new CustomEvent("geolocation.dataReady",{detail:t});if(document.dispatchEvent(e),o.status="success",o.populateGeolocationElements(),n.includes(o.source)){var i=o.source;o.source="maxmind",o.fetchUserLocation((function(){o.source=i,o.usedSource=o.source}),(function(){o.source=i,o.usedSource=o.source}))}}},a=this.getLocationCookie();a&&this.isValidLocationResponse(a)?i(a):this.fetchUserLocation(i,(function(t){o.status="error";var e=new CustomEvent("geolocation.fetchError",{detail:t});document.dispatchEvent(e),o.defaultLocation&&o.populateGeolocationElements(o.defaultLocation)}))},ready:function(){var t=new CustomEvent("geolocation.scriptLoaded");document.dispatchEvent(t)}};"undefined"!=typeof module&&void 0!==module.exports?module.exports=geolocation:geolocation.ready();
2
- //# sourceMappingURL=geolocation.min.js.map
@@ -1,2 +0,0 @@
1
- !function(){"use strict";var t={d:function(e,o){for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function o(){const t=Object.keys(window.modForm.opts.getVars).filter((t=>t.startsWith("vwo-test"))),e=window.modForm.opts.getVars[t];if(!t||!e)return;const o=Object.keys(window.modForm.opts.getVars).filter((t=>t.match(/v[1-9]{1,}/g)));o.length>0?o.forEach((t=>{const o=window.modForm.opts.getVars[t],r=`${e}-${t}`;o&&o.split(",").forEach((t=>{const e=document.getElementsByClassName(t)[0];e&&e.setAttribute(window.modForm.opts.vwoVariationDataAttribute,r)}))})):setTimeout((()=>{document.body.setAttribute(window.modForm.opts.vwoVariationDataAttribute,e)}),500)}t.r(e),t.d(e,{addVWOTestQueryParam:function(){return o}});var r=window;for(var n in e)r[n]=e[n];e.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})}();
2
- //# sourceMappingURL=addVWOTestQueryParam.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addVWOTestQueryParam.min.js","mappings":"yBACA,IAAIA,EAAsB,CCA1BA,EAAwB,SAASC,EAASC,GACzC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAG3E,ECPAH,EAAwB,SAASS,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,ECCtGV,EAAwB,SAASC,GACX,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GACvD,G,KCFO,SAASC,IACf,MAAMC,EAAeb,OAAOc,KAAKC,OAAOC,QAAQC,KAAKC,SAASC,QAAOC,GAASA,EAAMC,WAAW,cACzFC,EAAoBP,OAAOC,QAAQC,KAAKC,QAAQL,GAEtD,IAAMA,IAAgBS,EACrB,OAGD,MAAMC,EAAevB,OAAOc,KAAKC,OAAOC,QAAQC,KAAKC,SAASC,QAAOC,GAASA,EAAMI,MAAM,iBAGtFD,EAAaE,OAAS,EACzBF,EAAaG,SAAQC,IACpB,MAAMC,EAAab,OAAOC,QAAQC,KAAKC,QAAQS,GACzCE,EAAsB,GAAGP,KAAqBK,IAEhDC,GACHA,EAAWE,MAAM,KAAKJ,SAAQK,IAC7B,MAAMC,EAAUC,SAASC,uBAAuBH,GAAW,GAEvDC,GACHA,EAAQG,aAAapB,OAAOC,QAAQC,KAAKmB,0BAA2BP,EACrE,GAEF,IAGDQ,YAAW,KACVJ,SAASK,KAAKH,aAAapB,OAAOC,QAAQC,KAAKmB,0BAA2Bd,EAAkB,GAC1F,IAEL,C","sources":["webpack://mod-form/webpack/bootstrap","webpack://mod-form/webpack/runtime/define property getters","webpack://mod-form/webpack/runtime/hasOwnProperty shorthand","webpack://mod-form/webpack/runtime/make namespace object","webpack://mod-form/./lib/helpers/trackers/addVWOTestQueryParam.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n* Adding vwo-test parameter value (HSMERCH-XXXX) to the body\n* Adding vwo-test parameter value (HSMERCH-XXXX) with version to the sections for multi-variate test\n*/\nexport function addVWOTestQueryParam() {\n\tconst vwoTestParam = Object.keys(window.modForm.opts.getVars).filter(param => param.startsWith('vwo-test'));\n\tconst vwoTestParamValue = window.modForm.opts.getVars[vwoTestParam];\n\n\tif (!(vwoTestParam && vwoTestParamValue)) {\n\t\treturn;\n\t}\n\n\tconst testVersions = Object.keys(window.modForm.opts.getVars).filter(param => param.match(/v[1-9]{1,}/g));\n\n\t// Multivariate Test\n\tif (testVersions.length > 0) {\n\t\ttestVersions.forEach(version => {\n\t\t\tconst classLists = window.modForm.opts.getVars[version];\n\t\t\tconst elementAttributeVal = `${vwoTestParamValue}-${version}`;\n\n\t\t\tif (classLists) {\n\t\t\t\tclassLists.split(',').forEach(className => {\n\t\t\t\t\tconst element = document.getElementsByClassName(className)[0];\n\n\t\t\t\t\tif (element) {\n\t\t\t\t\t\telement.setAttribute(window.modForm.opts.vwoVariationDataAttribute, elementAttributeVal);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsetTimeout(() => {\n\t\t\tdocument.body.setAttribute(window.modForm.opts.vwoVariationDataAttribute, vwoTestParamValue);\n\t\t}, 500);\n\t}\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","addVWOTestQueryParam","vwoTestParam","keys","window","modForm","opts","getVars","filter","param","startsWith","vwoTestParamValue","testVersions","match","length","forEach","version","classLists","elementAttributeVal","split","className","element","document","getElementsByClassName","setAttribute","vwoVariationDataAttribute","setTimeout","body"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- !function(){"use strict";var e={d:function(t,o){for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{additionalOptions:function(){return o}});const o={isSubmitting:!1,isPhoneValid:!1,isZipValid:!1,areLeadTokenScriptsLoaded:!1,loadedScripts:[],optedIn:!1,inlineZip:!1,mutationObserverTarget:document.body,mutationObserverConfig:{attributes:!0},projexURL:null,redirectStart:null,zipEditControlCls:".zip-control__edit, .change-zip-control, .step__city-state, .form__city-state, .zip-control, .form-group__city-state",zipEditInput:'input[name="zip1"], input[name="inertZip"]',zipControlButton:document.querySelector(".zip-control__button"),retryZipValidation:!1,preventDuplicateSubmission:!1,getTime:(new Date).getTime(),radioButtonClickedByMouse:!1,includeDuplicateSubmissionExperience:!0,homeownerLeadConversionProps:{}};var i=window;for(var n in t)i[n]=t[n];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})}();
2
- //# sourceMappingURL=additionalOpts.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"additionalOpts.min.js","mappings":"yBACA,IAAIA,EAAsB,CCA1BA,EAAwB,SAASC,EAASC,GACzC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAG3E,ECPAH,EAAwB,SAASS,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,ECCtGV,EAAwB,SAASC,GACX,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GACvD,G,4DCNO,MAAMC,EAAoB,CAEhCC,cAAc,EACdC,cAAc,EACdC,YAAY,EACZC,2BAA2B,EAC3BC,cAAe,GACfC,SAAS,EAETC,WAAW,EACXC,uBAAwBC,SAASC,KACjCC,uBAAwB,CACvBC,YAAY,GAEbC,UAAW,KACXC,cAAe,KACfC,kBAAmB,uHACnBC,aAAc,6CACdC,iBAAkBR,SAASS,cAAc,wBACzCC,oBAAoB,EACpBC,4BAA4B,EAC5BC,SAAS,IAAIC,MAAOD,UACpBE,2BAA2B,EAC3BC,sCAAsC,EACtCC,6BAA8B,CAAC,G","sources":["webpack://mod-form/webpack/bootstrap","webpack://mod-form/webpack/runtime/define property getters","webpack://mod-form/webpack/runtime/hasOwnProperty shorthand","webpack://mod-form/webpack/runtime/make namespace object","webpack://mod-form/./lib/config/additionalOpts.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export const additionalOptions = {\n\t// set true before sending data to server and back to false when response is returned from server\n\tisSubmitting: false,\n\tisPhoneValid: false,\n\tisZipValid: false,\n\tareLeadTokenScriptsLoaded: false,\n\tloadedScripts: [],\n\toptedIn: false,\n\t// set true if you want inline validation on input with zip. be warned this causes many edge cases you will need to fix\n\tinlineZip: false,\n\tmutationObserverTarget: document.body,\n\tmutationObserverConfig: {\n\t\tattributes: true\n\t},\n\tprojexURL: null,\n\tredirectStart: null,\n\tzipEditControlCls: '.zip-control__edit, .change-zip-control, .step__city-state, .form__city-state, .zip-control, .form-group__city-state',\n\tzipEditInput: 'input[name=\"zip1\"], input[name=\"inertZip\"]',\n\tzipControlButton: document.querySelector('.zip-control__button'),\n\tretryZipValidation: false,\n\tpreventDuplicateSubmission: false,\n\tgetTime: new Date().getTime(),\n\tradioButtonClickedByMouse: false,\n\tincludeDuplicateSubmissionExperience: true,\n\thomeownerLeadConversionProps: {}\n};\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","additionalOptions","isSubmitting","isPhoneValid","isZipValid","areLeadTokenScriptsLoaded","loadedScripts","optedIn","inlineZip","mutationObserverTarget","document","body","mutationObserverConfig","attributes","projexURL","redirectStart","zipEditControlCls","zipEditInput","zipControlButton","querySelector","retryZipValidation","preventDuplicateSubmission","getTime","Date","radioButtonClickedByMouse","includeDuplicateSubmissionExperience","homeownerLeadConversionProps"],"sourceRoot":""}