mod-build 4.0.3 → 4.0.4-3.beta-1

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 (180) hide show
  1. package/.eslintrc +36 -2
  2. package/.stylelintrc.json +23 -0
  3. package/CHANGELOG.md +149 -6
  4. package/gulp-tasks/templates.js +3 -3
  5. package/package.json +33 -26
  6. package/public/resources/scripts/abandonment/abandonment-a4bbb36fbc8ed64042b8.min.js +2 -0
  7. package/public/resources/scripts/abandonment/abandonment.min.js +1 -1
  8. package/public/resources/scripts/callrail/callrail-14011d73b50a928de4b4.min.js +2 -0
  9. package/public/resources/scripts/callrail/callrail.min.js +1 -1
  10. package/public/resources/scripts/footer/footer-component-46dc0d7ca6af4fc3b76b.min.js +2 -0
  11. package/public/resources/scripts/footer/footer-component.min.js +1 -1
  12. package/public/resources/scripts/geolocation/geolocation.min.js +2 -0
  13. package/public/resources/scripts/helpers/addVWOTestQueryParam.min.js +2 -0
  14. package/public/resources/scripts/helpers/addVWOTestQueryParam.min.js.map +1 -0
  15. package/public/resources/scripts/helpers/additionalOpts.min.js +2 -0
  16. package/public/resources/scripts/helpers/additionalOpts.min.js.map +1 -0
  17. package/public/resources/scripts/helpers/getPhoneAssignmentData.min.js +2 -0
  18. package/public/resources/scripts/helpers/getPhoneAssignmentData.min.js.map +1 -0
  19. package/public/resources/scripts/helpers/initNumericOnlyFields.min.js +1 -1
  20. package/public/resources/scripts/helpers/initNumericOnlyFields.min.js.map +1 -1
  21. package/public/resources/scripts/helpers/initQSForm.min.js +2 -0
  22. package/public/resources/scripts/helpers/initQSForm.min.js.map +1 -0
  23. package/public/resources/scripts/helpers/initQuadTransform.min.js +2 -0
  24. package/public/resources/scripts/helpers/initQuadTransform.min.js.map +1 -0
  25. package/public/resources/scripts/helpers/isZipCodeValid.min.js +1 -1
  26. package/public/resources/scripts/helpers/isZipCodeValid.min.js.map +1 -1
  27. package/public/resources/scripts/helpers/observeVWOVariation.min.js +2 -0
  28. package/public/resources/scripts/helpers/observeVWOVariation.min.js.map +1 -0
  29. package/public/resources/scripts/helpers/opts.min.js +2 -0
  30. package/public/resources/scripts/helpers/opts.min.js.map +1 -0
  31. package/public/resources/scripts/mod-alytics/modalytics-be44027508c0438f6709.min.js +2 -0
  32. package/public/resources/scripts/mod-alytics/modalytics.min.js +1 -1
  33. package/public/resources/scripts/mod-form/form/contractor-0918337caf3dfede1609.min.js +2 -0
  34. package/public/resources/scripts/mod-form/form/contractor.min.js +2 -0
  35. package/public/resources/scripts/mod-form/form/homeowner-19a121b0e596042326f4.min.js +2 -0
  36. package/public/resources/scripts/mod-form/form/homeowner.min.js +1 -1
  37. package/public/resources/scripts/mod-utils/modutils-bc275eb41af515f626ef.min.js +2 -0
  38. package/public/resources/scripts/mod-utils/modutils.min.js +1 -1
  39. package/public/resources/styles/components/abandonment/abandonment-8a673f060817db6cb7dc.min.css +1 -0
  40. package/public/resources/styles/components/abandonment/abandonment.min.css +1 -1
  41. package/public/resources/styles/components/footer/mod-footer-d233fa64b6c8297c70ec.min.css +1 -0
  42. package/public/resources/styles/components/footer/mod-footer.min.css +1 -1
  43. package/public/resources/styles/components/footer/qs-footer-926e67c28d10c729db46.min.css +1 -0
  44. package/public/resources/styles/components/footer/qs-footer.min.css +1 -1
  45. package/siteconfig.js +1 -0
  46. package/src/data/seasons.js +1 -1
  47. package/src/data/trade-questions/alerts_medical.js +109 -0
  48. package/src/data/trade-questions/bathroom_refacing.js +94 -0
  49. package/src/data/trade-questions/cabinet_refacing.js +249 -0
  50. package/src/data/trade-questions/cabinets.js +34 -0
  51. package/src/data/trade-questions/concrete_foundation.js +55 -0
  52. package/src/data/trade-questions/door.js +141 -0
  53. package/src/data/trade-questions/flooring.js +184 -0
  54. package/src/data/trade-questions/garage_door.js +87 -0
  55. package/src/data/trade-questions/gutters.js +44 -0
  56. package/src/data/trade-questions/home_security.js +129 -0
  57. package/src/data/trade-questions/home_warranty.js +55 -0
  58. package/src/data/trade-questions/hot_tubs.js +90 -0
  59. package/src/data/trade-questions/hvac.js +177 -0
  60. package/src/data/trade-questions/index.js +23 -0
  61. package/src/data/trade-questions/insulation.js +116 -0
  62. package/src/data/trade-questions/plumbing.js +258 -0
  63. package/src/data/trade-questions/roofing.js +116 -0
  64. package/src/data/trade-questions/siding.js +145 -0
  65. package/src/data/trade-questions/solar.js +67 -0
  66. package/src/data/trade-questions/stair_lifts.js +45 -0
  67. package/src/data/trade-questions/tree_services.js +159 -0
  68. package/src/data/trade-questions/walk_in_tubs.js +45 -0
  69. package/src/data/trade-questions/water_treatment.js +44 -0
  70. package/src/data/trade-questions/windows.js +130 -0
  71. package/src/data/trade-questions-config.js +137 -0
  72. package/src/resources/data/tcpa.json +4 -0
  73. package/src/resources/templates/modals/about/index.hbs +9 -0
  74. package/src/resources/templates/modals/about/index.html +9 -0
  75. package/src/resources/templates/modals/contact-us/index.hbs +348 -0
  76. package/src/resources/templates/modals/contact-us/index.html +348 -0
  77. package/src/resources/templates/modals/e-sign-consent/index.hbs +35 -0
  78. package/src/resources/templates/modals/e-sign-consent/index.html +35 -0
  79. package/src/resources/templates/modals/faq/index.hbs +9 -0
  80. package/src/resources/templates/modals/faq/index.html +9 -0
  81. package/src/resources/templates/modals/privacy/index.hbs +237 -0
  82. package/src/resources/templates/modals/privacy/index.html +237 -0
  83. package/src/resources/templates/modals/terms/index.hbs +167 -0
  84. package/src/resources/templates/modals/terms/index.html +167 -0
  85. package/src/scripts/default/rage-clicking.js +8 -1
  86. package/src/scripts/default/show-utility-providers.js +28 -0
  87. package/src/scripts/default/update-link-paths.js +11 -4
  88. package/src/scripts/globals.js +3 -2
  89. package/src/scripts/plugins.js +9 -0
  90. package/src/scripts/retry-axios.js +21 -0
  91. package/src/scripts/utils.js +11 -0
  92. package/src/scripts/vendor/heap-addeventproperties-identify.js +1 -1
  93. package/src/scripts/vendor/heap-tracking.js +1 -1
  94. package/src/scripts/vendor/heap-vwo.js +1 -1
  95. package/src/scripts/vendor/visual-website-optimizer.js +1 -0
  96. package/src/shared-components/call-tracking/_call-tracking.scss +311 -0
  97. package/src/shared-components/call-tracking/call-tracking-icon.html +8 -0
  98. package/src/shared-components/call-tracking/call-tracking.html +81 -0
  99. package/src/shared-components/call-tracking/phone.svg +6 -0
  100. package/src/shared-components/card-button/_card-button.scss +49 -0
  101. package/src/shared-components/card-button/card-button.html +9 -0
  102. package/src/shared-components/carousel/_carousel.scss +106 -0
  103. package/src/shared-components/carousel/carousel.html +23 -0
  104. package/src/shared-components/carousel/carousel.js +3573 -0
  105. package/src/shared-components/carousel/carousel.js.map +1 -0
  106. package/src/shared-components/carousel/carousel.min.js +2 -0
  107. package/src/shared-components/carousel/carousel.min.js.map +1 -0
  108. package/src/shared-components/carousel/carousel.min.min.js +2 -0
  109. package/src/shared-components/carousel/carousel.min.min.js.map +1 -0
  110. package/src/shared-components/checkbox/_checkbox.scss +130 -0
  111. package/src/shared-components/checkbox/checkbox.html +10 -0
  112. package/src/shared-components/consent-capture/tcpa.html +12 -0
  113. package/src/shared-components/expand-collapse/_expand-collapse.scss +93 -0
  114. package/src/shared-components/expand-collapse/expand-collapse.html +8 -0
  115. package/src/shared-components/expand-collapse/expand-collapse.js +40 -0
  116. package/src/shared-components/expand-collapse/expand-collapse.min.js +2 -0
  117. package/src/shared-components/expand-collapse/expand-collapse.min.js.map +1 -0
  118. package/src/shared-components/featured-block/_featured-block.scss +191 -0
  119. package/src/shared-components/featured-block/featured-block.html +80 -0
  120. package/src/shared-components/foot-assets/foot-assets.html +107 -0
  121. package/src/shared-components/form-tcpa/form-tcpa-spanish.html +61 -0
  122. package/src/shared-components/form-tcpa/form-tcpa.html +55 -0
  123. package/src/shared-components/gtm-body/gtm-body.html +4 -0
  124. package/src/shared-components/head/head.html +195 -0
  125. package/src/shared-components/header/_header.scss +200 -0
  126. package/src/shared-components/header/header.html +79 -0
  127. package/src/shared-components/hero/_hero.scss +276 -0
  128. package/src/shared-components/hero/hero.html +136 -0
  129. package/src/shared-components/how-it-works/_how-it-works.scss +138 -0
  130. package/src/shared-components/how-it-works/how-it-works.html +19 -0
  131. package/src/shared-components/input/_input.scss +242 -0
  132. package/src/shared-components/input/input.html +30 -0
  133. package/src/shared-components/preloader/_preloader.scss +61 -0
  134. package/src/shared-components/preloader/preloader.html +49 -0
  135. package/src/shared-components/progress-bar/_progress-bar.scss +142 -0
  136. package/src/shared-components/progress-bar/progress-bar.html +20 -0
  137. package/src/shared-components/progress-bar/progress-bar.js +26 -0
  138. package/src/shared-components/progress-bar/progress-bar.min.js +2 -0
  139. package/src/shared-components/progress-bar/progress-bar.min.js.map +1 -0
  140. package/src/shared-components/radio-button/_radio-button.scss +577 -0
  141. package/src/shared-components/radio-button/radio-button.html +25 -0
  142. package/src/shared-components/reviews/_reviews.scss +79 -0
  143. package/src/shared-components/reviews/reviews.html +27 -0
  144. package/src/shared-components/section-deals/sitemap.xml +9 -0
  145. package/src/shared-components/select/_select.scss +61 -0
  146. package/src/shared-components/select/select.html +8 -0
  147. package/src/shared-components/steps/_steps.scss +431 -0
  148. package/src/shared-components/steps/defaultFormFieldConfig.json +64 -0
  149. package/src/shared-components/steps/step-fields.html +36 -0
  150. package/src/shared-components/steps/steps.html +136 -0
  151. package/src/shared-components/textarea/_textarea.scss +96 -0
  152. package/src/shared-components/textarea/textarea.html +13 -0
  153. package/src/shared-components/theme-toggle/_theme-toggle.scss +68 -0
  154. package/src/shared-components/theme-toggle/theme-toggle.html +34 -0
  155. package/src/shared-components/tile/_tile.scss +117 -0
  156. package/src/shared-components/tile/tile.html +27 -0
  157. package/src/shared-components/value-props/_value-props.scss +99 -0
  158. package/src/shared-components/value-props/value-props.html +17 -0
  159. package/src/shared-components/zip-control/_zip-control.scss +42 -0
  160. package/src/shared-components/zip-control/zip-control.html +21 -0
  161. package/tasks/add-editorconfig.js +21 -0
  162. package/tasks/clean.js +1 -1
  163. package/tasks/get-default-trade-questions.js +153 -0
  164. package/tasks/grab-cdn.js +12 -6
  165. package/tasks/grab-form-helpers.js +14 -5
  166. package/tasks/grab-shared-components.js +10 -3
  167. package/tasks/grab-shared-scripts.js +59 -9
  168. package/tasks/serve.js +6 -1
  169. package/tasks/templates.js +200 -18
  170. package/vite.config.js +63 -24
  171. package/.sass-lint.yml +0 -166
  172. package/public/resources/scripts/abandonment/abandonment-e099a424bf17408f1db2.min.js +0 -2
  173. package/public/resources/scripts/callrail/callrail-5c7c537f04af468600cf.min.js +0 -2
  174. package/public/resources/scripts/footer/footer-component-7b5e263f64568573ecc0.min.js +0 -2
  175. package/public/resources/scripts/mod-alytics/modalytics-0ac7d7a5a72ea67a0f47.min.js +0 -2
  176. package/public/resources/scripts/mod-form/form/homeowner-c679dec331e78b71a599.min.js +0 -2
  177. package/public/resources/scripts/mod-utils/modutils-15069d7b728a555fb3f7.min.js +0 -2
  178. package/public/resources/styles/components/abandonment/abandonment-a8571a9e32ed6ef9acb4.min.css +0 -1
  179. package/public/resources/styles/components/footer/mod-footer-1fb2cec3278f29df57d0.min.css +0 -1
  180. package/public/resources/styles/components/footer/qs-footer-9a3b0ab00428b03e6e9e.min.css +0 -1
package/.eslintrc CHANGED
@@ -2,7 +2,6 @@
2
2
  "env": {
3
3
  "node": true,
4
4
  "browser": true,
5
- "es2021": true,
6
5
  "jquery": true
7
6
  },
8
7
  "extends": [
@@ -12,7 +11,42 @@
12
11
  "ecmaVersion": "latest",
13
12
  "sourceType": "module"
14
13
  },
14
+ "globals": {
15
+ "require": true,
16
+ "module": true
17
+ },
15
18
  "rules": {
16
- // Define your custom rules here
19
+ "brace-style": [2, "1tbs"],
20
+ "camelcase": 2,
21
+ "comma-dangle": [2, "never"],
22
+ "comma-style": [2, "last"],
23
+ "curly": [2, "all"],
24
+ "default-case": 2,
25
+ "dot-notation": 2,
26
+ "eqeqeq": [2, "always", {"null": "ignore"}],
27
+ "guard-for-in": 2,
28
+ "indent": [2, "tab"],
29
+ "key-spacing": [2, {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
30
+ "keyword-spacing": [2, {"before": true, "after": true}],
31
+ "new-cap": 2,
32
+ "no-console": 0,
33
+ "no-floating-decimal": 2,
34
+ "no-nested-ternary": 2,
35
+ "no-new": 2,
36
+ "no-shadow": 2,
37
+ "no-use-before-define": 2,
38
+ "operator-linebreak": [2, "before", {"overrides": {"?": "after", ":": "after"}}],
39
+ "prefer-const": 2,
40
+ "quotes": [2, "single"],
41
+ "semi": 2,
42
+ "semi-spacing": 2,
43
+ "space-before-blocks": [2, "always"],
44
+ "space-before-function-paren": [2, "never"],
45
+ "spaced-comment": [2, "always", {"exceptions": ["-"]}],
46
+ "space-infix-ops": 2,
47
+ "space-in-parens": [2, "never"],
48
+ "strict": [2, "never"],
49
+ "valid-jsdoc": [2, {"requireReturn": false, "prefer": {"return": "returns"}}],
50
+ "wrap-iife": [2, "inside", {"functionPrototypeMethods": true}]
17
51
  }
18
52
  }
@@ -0,0 +1,23 @@
1
+ {
2
+ "extends": "stylelint-config-standard-scss",
3
+ "plugins": [
4
+ "stylelint-order",
5
+ "@namics/stylelint-bem"
6
+ ],
7
+ "defaultSeverity": "warning",
8
+ "rules": {
9
+ "no-descending-specificity": null,
10
+ "scss/no-global-function-names": null,
11
+ "selector-class-pattern": [
12
+ "^[a-z0-9\\-_]+$",
13
+ {
14
+ "message": "Selector should be written in lowercase with hyphens or underscores (selector-class-pattern)"
15
+ }
16
+ ],
17
+ "order/properties-alphabetical-order": true,
18
+ "plugin/stylelint-bem-namics": {
19
+ "patternPrefixes": [],
20
+ "helperPrefixes": []
21
+ }
22
+ }
23
+ }
package/CHANGELOG.md CHANGED
@@ -1,4 +1,147 @@
1
- ## 4.0.3
1
+ # Changelog
2
+
3
+ ## 4.0.43
4
+
5
+ - Created new vite plugin to add data attribute to image source if class 'lazy' is added.
6
+
7
+ ## 4.0.42
8
+
9
+ - Added trade questions config.
10
+
11
+ ## 4.0.41
12
+
13
+ - Bug fix.
14
+
15
+ ## 4.0.40
16
+
17
+ - Updated `vendorPublicIdentifier` logic to work for new bestcompany.com branded pages.
18
+
19
+ ## 4.0.39
20
+
21
+ - Added the E-Sign Consent modal to be grabbed as part of the `grab-cdn` task.
22
+
23
+ ## 4.0.37
24
+
25
+ - Updated `getConsentCaptureLanguage` to include the `profileId` version of the display name API.
26
+ *Currently being used for Best Company branded form pages.*
27
+
28
+ ## 4.0.36
29
+
30
+ - Included an option for `service` to be appended to the `brandedIncludeServiceConsentCapture` for consent capture.
31
+
32
+ ## 4.0.35
33
+
34
+ - Updating the `grab-shared-scripts` task to include the source map files for troubleshooting purposes.
35
+
36
+ ## 4.0.34
37
+
38
+ - Adding current logic for `getConsentCaptureLanguage()` to grab the O&O Consent Capture TCPA language.
39
+
40
+ - Updated `isBranded` sites to grab the display name from HS Form Service API to add to the `brandedConsentLanguage`.
41
+
42
+ ## 4.0.33
43
+
44
+ - Adding current logic for appending the Modernize consent checkbox in the TCPA for sites using Vite
45
+
46
+ ## 4.0.32
47
+
48
+ - Updating the `grab-form-helpers.js` task to not have a double slash when copying files over
49
+
50
+ ## 4.0.31
51
+
52
+ - Adding `geolocation.min.js` to the `grab-cdn` task
53
+
54
+ ## 4.0.30
55
+
56
+ - Reverting back to version `16.9.0` of `stylelint` as the newest version was throwing config error
57
+
58
+ ## 4.0.29
59
+
60
+ - Removing all the `!window.Modalytics.privacyPreferencesDetected` conditionals (as we are no longer moving forward with this integration).
61
+
62
+ ## 4.0.28
63
+
64
+ - Updating the TCPA `nodeEnv` to be pulled from `defaultSettings` so the TCPA gets pulled from the correct environment.
65
+
66
+ ## 4.0.27
67
+
68
+ - Installed `vite-plugin-minify` plugin to minify the html files
69
+
70
+ ## 4.0.24 - 4.0.26
71
+
72
+ - Disabling JSlint `failOnError` so we can rebuild BestCompany sites to grab the most recent TCPA update
73
+
74
+ ## 4.0.23
75
+
76
+ - Adding `exit(1)` to Axios errors so that the build will fail if shared scripts / components are not successfully created.
77
+
78
+ ## 4.0.22
79
+
80
+ - Add contractor form to list of shared resources
81
+
82
+ ## 4.0.21
83
+
84
+ - Updating VWO cookies' expiration date to be only 1 day
85
+
86
+ ## 4.0.20
87
+
88
+ - Seasonal updates enhancements
89
+
90
+ ## 4.0.18
91
+
92
+ - Add `stylelint` plugin and default settings to show CSS warnings during build
93
+ - Create a default `.stylelint.yml` file during build if one doesn't exist
94
+ - Update the `clean` function to only delete from `public/resources` and not entire public directory
95
+
96
+ ## 4.0.17
97
+
98
+ - Updating `fetchTcpaFromSitegenie()` to no longer have any use-cases of QuinStreet as the company name; should be Modernize all the time.
99
+
100
+ ## 4.0.16
101
+
102
+ - Tech Debt: Moving the `getDefaultTopRecommendedContent()` locally back to the bestcompany-top-recommended repo (as it is not needed as a global function)
103
+
104
+ ## 4.0.15
105
+
106
+ - Updated the `firstDate` for the Warmer Weather season (needs to match the flags set in the seasonal-updates repository trigger)
107
+
108
+ ## 4.0.14
109
+
110
+ - Adding a call to grab the default content for Best Company Top Recommended pages so there isn't a delay on the initial page
111
+
112
+ ## 4.0.13
113
+
114
+ - Making sure the abandonment.min.js gets copied to the right folder path (needs to copy to /abandonment/accessible/ if the site is indeed using the accessible version). This will ensure our shared-resource deployments trigger the files correctly.
115
+
116
+ ## 4.0.12
117
+
118
+ - Adding a handlebars helper to see if the value is an array or not
119
+
120
+ ## 4.0.11
121
+
122
+ - Adding the overflow on slide transition
123
+
124
+ ## 4.0.10
125
+
126
+ - Adding `pathSubdirectory` to transformed footer modal paths
127
+
128
+ ## 4.0.9
129
+
130
+ - Updating the TCPA fetch to replace the `<%=company_name%>` if one is sent through
131
+
132
+ ## 4.0.8
133
+
134
+ - Updating the build WriteBundle() to also update our CSS paths (if applicable)
135
+
136
+ ## 4.0.7
137
+
138
+ - Adding axios interceptor to retry requests a maximum of 2 times if the response fails initially
139
+
140
+ ## 4.0.5
141
+
142
+ - Preventing scroll on step .focus() after slide transitions
143
+
144
+ ## 4.0.4
2
145
 
3
146
  - Add global preventRageClick function
4
147
 
@@ -11,13 +154,13 @@
11
154
  ## 4.0.0-beta.5
12
155
 
13
156
  - Updated the `transformIndexHtml` hook to use the `writeBundle` hook in the ViteConfig.
14
- - This change ensures that all assets are transformed before adding the `pathSubdirectory` to the assets and local resources.
157
+ - This change ensures that all assets are transformed before adding the `pathSubdirectory` to the assets and local resources.
15
158
 
16
159
  - Updated the `grab-shared-scripts` task to run more sequentially.
17
- - All files are now downloaded and hashed before going through the functions to replace local paths.
160
+ - All files are now downloaded and hashed before going through the functions to replace local paths.
18
161
 
19
162
  - Changed global resources to download to the site's `/public` folder instead of inside `/src`.
20
- - This prevents Vite from bundling them during the build process as they are static JS files.
163
+ - This prevents Vite from bundling them during the build process as they are static JS files.
21
164
 
22
165
  ## 4.0.0-beta.3
23
166
 
@@ -28,8 +171,8 @@
28
171
 
29
172
  ## 4.0.0-beta.1
30
173
 
31
- See https://quinstreet.atlassian.net/wiki/spaces/FEE/pages/8100970716/Mod-build+Vite+Version+4
174
+ See <https://quinstreet.atlassian.net/wiki/spaces/FEE/pages/8100970716/Mod-build+Vite+Version+4>
32
175
 
33
176
  ## 4.0.0-alpha.1
34
177
 
35
- Brand new build process using Vite 5, Node 18+. Gulp 4 is used as a task runner to grab shared assets.
178
+ Brand new build process using Vite 5, Node 18+. Gulp 4 is used as a task runner to grab shared assets.
@@ -19,7 +19,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
19
19
  // Checking for seasonal variations in the template.js + updating content
20
20
  var checkSeasonalVariations = require('./check-seasonal-variations.js');
21
21
  const activeSeason = checkSeasonalVariations();
22
- if (activeSeason.length !== 0){
22
+ if (activeSeason.length !== 0) {
23
23
  if (siteData.seasonalVariations) {
24
24
  activeSeason.forEach(season => {
25
25
  if (season in siteData.seasonalVariations) {
@@ -203,7 +203,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
203
203
  console.time('Finished fetch-default-form-config after');
204
204
  console.log('Starting fetch-default-form-config: ');
205
205
  await new Promise((resolve) => {
206
- request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site/${folder}/steps/defaultFormFieldConfig.json`, async function(err, xhr, response) {
206
+ request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site/${folder}/steps/defaultFormFieldConfig.json`, async function(_err, xhr, response) {
207
207
  if (xhr.statusCode !== 200) {
208
208
  throw new Error(`${xhr.statusCode}: Error while fetching ${folder}/defaultFormFieldConfig.json`);
209
209
  }
@@ -239,7 +239,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
239
239
  console.time('Finished fetch-tcpa-from-sitegenie after');
240
240
  console.log('Starting fetch-tcpa-from-sitegenie: ',url);
241
241
  await new Promise(function(resolve) {
242
- request(url, async function(err, xhr, response) {
242
+ request(url, async function(_err, xhr, response) {
243
243
  if (xhr.statusCode !== 200) {
244
244
  throw new Error(`${xhr.statusCode}: Error while fetching TCPA`);
245
245
  }
package/package.json CHANGED
@@ -1,28 +1,35 @@
1
1
  {
2
- "name": "mod-build",
3
- "version": "4.0.3",
4
- "description": "Share components for S3 sites.",
5
- "type": "module",
6
- "scripts": {
7
- "dev": "export NODE_ENV=qa.modernize.com IS_LOCAL=true && vite",
8
- "build": "export NODE_ENV=modernize.com && vite build",
9
- "preview": "export NODE_ENV=modernize.com && vite build && vite preview"
10
- },
11
- "dependencies": {
12
- "@vituum/vite-plugin-handlebars": "^1.1.0",
13
- "axios": "^1.6.2",
14
- "glob": "^10.3.10",
15
- "gulp": "^4.0.2",
16
- "gulp-handlebars-file-include": "^1.0.0",
17
- "gulp-hash": "^4.2.2",
18
- "gulp-replace": "^1.1.4",
19
- "gulp-tap": "^2.0.0",
20
- "lodash.merge": "^4.6.2",
21
- "lodash.mergewith": "^4.6.2",
22
- "sass": "^1.69.5",
23
- "vite": "^5.0.0",
24
- "vite-plugin-eslint": "^1.8.1",
25
- "vite-plugin-static-copy": "^1.0.0",
26
- "vituum": "^1.1.0"
27
- }
2
+ "name": "mod-build",
3
+ "version": "4.0.43.beta-1",
4
+ "description": "Share components for S3 sites.",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "export NODE_ENV=qa.modernize.com IS_LOCAL=true && vite",
8
+ "build": "export NODE_ENV=modernize.com && vite build",
9
+ "preview": "export NODE_ENV=modernize.com && vite build && vite preview"
10
+ },
11
+ "dependencies": {
12
+ "@namics/stylelint-bem": "^10.0.0",
13
+ "@vituum/vite-plugin-handlebars": "^1.1.0",
14
+ "axios": "^1.6.2",
15
+ "eslint": "^8.57.0",
16
+ "glob": "^10.3.10",
17
+ "gulp": "^4.0.2",
18
+ "gulp-handlebars-file-include": "^1.0.0",
19
+ "gulp-hash": "^4.2.2",
20
+ "gulp-replace": "^1.1.4",
21
+ "gulp-tap": "^2.0.0",
22
+ "lodash.merge": "^4.6.2",
23
+ "lodash.mergewith": "^4.6.2",
24
+ "sass": "^1.69.5",
25
+ "stylelint": "16.9.0",
26
+ "stylelint-config-standard-scss": "^13.1.0",
27
+ "stylelint-order": "^6.0.4",
28
+ "vite": "^5.0.0",
29
+ "vite-plugin-eslint": "^1.8.1",
30
+ "vite-plugin-minify": "^2.0.0",
31
+ "vite-plugin-static-copy": "^1.0.0",
32
+ "vite-plugin-stylelint": "^5.3.1",
33
+ "vituum": "^1.1.0"
34
+ }
28
35
  }
@@ -0,0 +1,2 @@
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 +1,2 @@
1
- "use strict";var abandonment={event:new Event("abandonment.closed"),type:"default",modalElement:document.getElementById("abandonment"),heapTrack:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n&&modUtils.heap("track",["Abandonment popup | ".concat(n),e])},initClickTracking:function(){var n=this,e=document.querySelectorAll("#abandonment .btn-call-now"),t=document.querySelectorAll("#abandonment .btn-get-price-quotes");e&&e.forEach(function(e){e.addEventListener("click",function(e){n.modalElement.style.display="none",n.heapTrack("Clicked Phone Number",{phoneNumber:e.target.textContent.trim()})})}),t&&t.forEach(function(e){e.addEventListener("click",function(){n.modalElement.style.display="none",n.heapTrack("Clicked CTA")})})},initCloseListener:function(){var n=this;document.addEventListener("click",function(e){e.target.id&&("abandonment-modal"!==e.target.id&&"btnModalClose"!==e.target.id||n.modalElement&&(n.modalElement.style.display="none",document.body.classList.remove("no-scroll"),n.heapTrack("Closed"),n.modalElement.dispatchEvent(n.event)))})},initAbandonmentForm:function(){var n=document.querySelector("#abandonment-form");if(n&&n.length){var e={isAbandonmentForm:!0,hasBackButtons:!1,hasClickToProceed:!1,hasProgressbar:!1,hasZipChange:!1,skipStep:{device:"",index:null,shouldSkip:!1}};form.init(n,e)}},setAbandonmentType:function(){var n=document.querySelector("#abandonment-form");this.type=n?"form":"default","default"===this.type?this.initClickTracking():this.initAbandonmentForm()},init:function(){this.setAbandonmentType(),this.initCloseListener();var n=window.location.hash;this.heapTrack("Shown",{step:n})}};abandonment.init();
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
2
  //# sourceMappingURL=abandonment.min.js.map
@@ -0,0 +1,2 @@
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 +1,2 @@
1
- "use strict";var callrail={setCallRailCookie:function(t){var a="",o=Object.entries(t);o=o.map(function(t){return t.join("=")}),a=o.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)}};
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
2
  //# sourceMappingURL=callrail.min.js.map
@@ -0,0 +1,2 @@
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 +1,2 @@
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=Object.prototype.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=new 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){"@babel/helpers - typeof";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})(t)}var Footer={element:document.querySelector("#footer-component"),siteData:"object"===("undefined"==typeof siteData?"undefined":_typeof(siteData))?siteData:{},footerType:"qs",modDomain:"https://modernize.com",refocusOnElement:"",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:{text:"QuinStreet, Inc. All Rights Reserved.",spanishText:"QuinStreet, Inc. 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.copyrightAt,i=n.isSpanishPage;r&&"order:".concat(r);return'\n\t\t\t<p class="footer__copyright">\n\t\t\t\t&copy; Copyright '.concat(e.year," ").concat(a||e.companyName,".\n\t\t\t\t").concat(i?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(i?'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=a?"".concat(this.getAssetPath(),"/images/logos/misc/bbb-dark.svg"):"".concat(this.getAssetPath(),"/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=this.element;this.render('<footer class="footer '.concat(l?"footer--spanish":"",'">\n\t\t\t\t<div class="container">\n\t\t\t\t\t').concat(d.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(d.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(d.hasAttribute("data-hide-".concat(e.id))?"":'<li id="'.concat(e.id,'">\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(d.hasAttribute("data-hide-copyright")?"":'<p class="footer__copyright">\n\t\t\t\t\t\tCopyright &copy; '.concat(a.year," ").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){return(window.location.search.match(new RegExp("[?&]"+t+"=([^&]+)"))||[,null])[1]},camelToUnderscore:function(t){return t.replace(/([A-Z])/g," $1").split(" ").join("_").toLowerCase()},prepopModalTemplateWithSiteData:function(t){var e={company_name: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="info-modal",o=['<dialog id="info-modal" 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('a[data-bind="modal-page"]').forEach(function(n){n.addEventListener("click",function(n){function a(){function t(){r++}for(var e=d.getElementsByTagName("script"),o=0;o<e.length;o++){var n=e[o].innerText;new Function(n)()}for(var a=d.querySelectorAll("script[src]"),r=0,i=0;i<a.length;i++){var c=document.createElement("script");c.src=a[i].src,c.onload=t,document.head.appendChild(c)}}n.preventDefault();var r=this,i=r.getAttribute("data-load"),c=r.getAttribute("id");document.getElementById(e)&&document.getElementById(e).remove(),document.body.insertAdjacentHTML("beforeend",o);var s=document.getElementById(e),l=s.querySelector(".modal-title"),d=s.querySelector(".modal-body");l.textContent=r.textContent,fetch(i).then(function(t){return t.text()}).then(function(t){d.innerHTML=Footer.prepopModalTemplateWithSiteData(t),s.querySelectorAll("a[href^=\\#]").forEach(function(t){t.addEventListener("click",function(t){function e(){n.forEach(function(t){t.blur()}),d.classList.contains("scrolling")||(d.classList.add("scrolling"),setTimeout(function(){d.classList.remove("scrolling"),o.focus(),d.removeEventListener("scroll",e)},750))}t.preventDefault();var o=s.querySelector(this.hash);o.scrollIntoView({behavior:"smooth"});var n=d.querySelectorAll("section");d.addEventListener("scroll",e)})});var o=r.getAttribute("data-anchor");o&&"#undefined"!==o&&document.querySelector(o).scrollIntoView(),modUtils.trapTabFocusInDialog(e),Footer.initCloseDialog(e)}),s.show(),s.focus(),s.setAttribute("aria-hidden","false"),t.refocusOnElement=c;var u=new MutationObserver(function(){d.hasChildNodes()&&(u.disconnect(),a())});s.open&&u.observe(d,{childList:!0,subtree:!0})})});var n=this.getQueryParam("modal");n&&document.querySelectorAll("".concat('a[data-bind="modal-page"]','[href="/?modal=').concat(n,'"]:first')).click();var a=window.location.search;a&&(a=a.substring(1),document.querySelectorAll('a[data-bind="modal-page"]').forEach(function(t){var e=t.getAttribute("href");e+="&"+a,t.setAttribute("href",e)}))},closeModal:function(t){t.close(),t.setAttribute("aria-hidden","true"),this.refocusOnElement&&(document.querySelector("a#"+this.refocusOnElement).focus(),this.refocusOnElement="")},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()});
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
2
  //# sourceMappingURL=footer-component.min.js.map
@@ -0,0 +1,2 @@
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
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
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":""}
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
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":""}
@@ -0,0 +1,2 @@
1
+ !function(){"use strict";var e={d:function(n,o){for(var t in o)e.o(o,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:o[t]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{getPhoneAssignmentData:function(){return t}});let o=null;const t=function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o&&o.abort("Current pending request has been aborted. Initiating a new request.");const t=modUtils.getUrlParamsToObject(),s=["ad","gclid","msclkid","vmcid","tbcid","fb_ad_id","fb_campaign_id","fbclid","fb_adset_id"],{CCID:i,CLK:r,QTR:a,tagId:c}=e,{phoneNumberContainerSelector:d,phoneNumberLinksSelector:l,useHsEndpoint:m,phoneNumbersTextSelector:p,matchVendors:g,formatNumberWithBracketsAndDash:u,skipMatching:h}=modForm.opts.phoneAssignmentConfig,{vendorKey:f,PartnerSourceID:b}=t,y={},v="production"===modUtils.getEnv(),w="local"===modUtils.getEnv(),A=new RegExp(/(\d{3})(\d{3})(\d{4})/g),P=document.querySelectorAll(d),S=document.querySelectorAll(l);let C="",_={},k=_;const O="https://"+(v?"form-service-hs.qnst.com":"hsapiservice.quinstage.com"),T="https://"+(v?"ivr.quinstreet.com":"ivr.quinstage.com"),$=new Headers;$.append("Accept","application/json");const j=()=>{document.body.classList.remove("call-tracking"),Modalytics.heap("track",["Phone Assignment",{phoneNumber:!1,updatedExistingPhoneAssignment:n}])},N=(e,o,t)=>{if(S&&S.length&&P&&P.length&&e){document.body.classList.add("call-tracking");const s=e.replace(A,""+(u?"($1) $2-$3":"$1-$2-$3")),i=`${s}${o?` <span class="call-extension">Ext: ${o}</span>`:""}`;modForm.opts.phoneAssignmentConfig.response={displayNumber:i,hrefPhoneNumber:`${e}${o?`,${o}`:""}`,extension:o,phoneNumber:e,formattedPhoneNumber:s,phoneAssignmentKey:t},S.forEach((n=>{n.setAttribute("href",`tel:${e}${o?`,${o}`:""}`);const t=n.querySelector(p);t&&(t.innerHTML=i)})),Modalytics.heap("track",["Phone Assignment",{phoneNumber:!0,extension:!!o,updatedExistingPhoneAssignment:n}])}},q=modForm.opts?.zipCode||null;let F=null;q||(F=window.geolocation?.currentLocation?.zipcode||null),m?($.append("Content-Type","application/json"),C=`${O}/calls/matches`,_={ccid:i||null,clk:r||null,qtr:a||null,zipForLocalizedAssignment:F,zip:q,service:modForm.opts.vertical,landingPageURL:window.location.href,matchVendors:Array.isArray(g)&&g.length?g:[-1],skipMatching:h,site:modForm?.opts?.websiteName||null},!_.zip&&w&&(_.zip="94404"),window._vwo_campaignData&&0!==Object.keys(window._vwo_campaignData).length&&(_.trackingInfo={VWOID:Object.keys(window._vwo_campaignData)[0],VWOVariationName:Object.values(window._vwo_campaignData)[0].n}),n&&modForm.opts.phoneAssignmentConfig.response&&modForm.opts.phoneAssignmentConfig.response.phoneAssignmentKey&&(_.vendorPhoneAssignmentKeys={[_.matchVendors[0]]:modForm.opts.phoneAssignmentConfig.response.phoneAssignmentKey}),k=JSON.stringify(_)):($.append("Content-Type","application/x-www-form-urlencoded"),C=`${T}/number`,_={SourceClickKey:r||"",LandingQuadTagID:c||"",PC:q,pcforlocalized:F,PortalServiceCode:modForm.opts.vertical,service:"assign",BusinessUnit:"FC",QS_CATEGORY:"Home Services",TradingPlatformTrackingInfo:"",vendorKeys:f||"-1",quadTagId:v?modForm.opts.phoneAssignmentConfig.questQuadTagId.prod:modForm.opts.phoneAssignmentConfig.questQuadTagId.staging,AffiliateSubID:b||""},t&&Object.keys(t).length&&Object.keys(t).forEach((function(e){s.includes(e)&&(y[e]=t[e])})),_.TradingPlatformTrackingInfo=JSON.stringify(y),k=new URLSearchParams(_).toString()),o=new AbortController;const I=o.signal;fetch(C,{method:"POST",headers:$,redirect:"follow",mode:"cors",body:k,signal:I}).then((e=>e.json())).then((e=>{if(m)if(e&&"success"===e.status){const{data:n}=e,{phoneDetails:o}=n;let t;t=o?o[_.matchVendors[0]]:modForm.opts.phoneAssignmentConfig.response;const{phoneNumber:s,extension:i,phoneAssignmentKey:r}=t;N(s,i,r)}else j();else if(e&&Object.keys(e).length){const n=e[_.vendorKeys];if(!n||n.constructor!==Object)return void j();const{ccPhoneNum:o,extn:t}=n;N(o,t)}else j()})).catch((e=>{I.aborted?(console.log(I.reason),Modalytics.heap("track",["Phone Assignment",{isRequestAborted:!0}])):(j(),console.log("Something went wrong!",e))}))};var s=window;for(var i in n)s[i]=n[i];n.__esModule&&Object.defineProperty(s,"__esModule",{value:!0})}();
2
+ //# sourceMappingURL=getPhoneAssignmentData.min.js.map