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ACvC,IAAI/F,EACAgG,EAIJ,GAFAD,GAAWA,EAAQ,WAAY/F,EAAM+F,EAAQ,UAEzC,CAAC/F,EAAK,OACN,IAAAiG,EAAQ,IAAI,eAEZ,OAAO,eAAmB,MAC5BA,EAAQ,IAAI,gBAGV,OAAOD,EAAY,MACjB,OAAOA,EAAY,IAErBA,EAAW,OAAe,QAE1BA,EACE,OAAO,SAAS,SAChB,KACA,OAAO,SAAS,UACf,OAAO,SAAS,KAAO,IAAM,OAAO,SAAS,KAAO,KAI3D,MAAME,GAAaF,EAAU,IAAMhG,GAAK,QAAQ,eAAgB,IAAI,EAC9DiG,EAAA,KAAK,MAAOC,EAAW,EAAI,EAEjCD,EAAM,WAAa,UAAY,GAC/BA,EAAM,OAAS,UAAY,CACzB,GAAIA,EAAM,OAAS,KAAOA,EAAM,QAAU,IACxC,OAGE,IAACA,EAAM,cAAgBA,EAAM,aAAa,OAAO,EAAG,CAAC,IAAM,QAC7D,MAAM,MAAM,sBAAsB,EAG9B,MAAAE,EAAM,SAAS,cAAc,KAAK,EAClCC,EAAY3E,EAAU,SAASwE,EAAM,YAAY,EACvDE,EAAI,UAAYC,EAChBD,EAAI,MAAM,aAAe,IACzBA,EAAI,MAAM,SAAW,IACrBA,EAAI,MAAM,SAAW,SACrBA,EAAI,GAAK,aAETE,GAAS,IAAM,SACRzP,EAAA,SAAS,KAAK,WAAW,CAAC,IAA1B,YAAAA,EAA6C,MAAO,cACvD,SAAS,KAAK,aAAauP,EAAK,SAAS,KAAK,WAAW,CAAC,CAAC,CAC7D,CACD,GAEHF,EAAM,KAAK,CACb,EAEMI,GAAYnQ,GAAyB,CAEvC,SAAS,aAAe,YACxB,SAAS,aAAe,cAEfA,IAEA,0BAAiB,mBAAoBA,CAAQ,CAE1D,ECpEaoQ,GAAc,aCG3BC,GAAO,CAAE,SAAU,GAAGD,uBAAgC,CAAE","names":["modulesScaffold","__vitePreload","scaffoldedModules","reactModule","Component","nodeList","node","createRoot","modulesReact","modulesReact$1","modules","modules$1","debounce","callback","wait","timerId","args","useDebounce","waitTime","ref","useRef","useEffect","useMemo","_a","Rtf","el","__publicField","table","container","element","focusableElements","createDataLayerString","data","emailClick","event","target","href","phoneClick","detectScrollThresholds","thresholds","thresholdReached","windowHeight","documentHeight","scrollPercentage","threshold","width","detectSectionIsVisible","onVisible","selector","onNotVisible","detectVisibleSections","entries","entry","observer","section","oneTimeVisibleLayerPush","handleIntersection","makeSuperScript","text","superScript","code","index","sup","superScriptRegex","match","getDocumentPriority","documents","priorityDocument","document","getExtensionPriority","decodeHtmlEntities","encodedString","elem","isInDialog","modal","rect","secureStorage","SecureLS","USER_PROFILE_KEYS","USER_PERSONALIZATION_KEY","USER_PROFILE_OBJECT_KEY","USER_PROFILE_EXPIRATION_KEY","USER_PROFILE_EXPIRATION_TIME","USER_PROFILE_FIELDS","getUserProfile","userProfile","updateUserProfile","properties","newUserProfile","time","COOKIE_NAMES","GEOLOCATION_EXPIRATION_KEY","GEOLOCATION_EXPIRATION_TIME","QUIZ_ANSWER_NAMES","QUIZ_RESULT_NAMES","UTM_FIELD_NAME","COST_ESTIMATE_FIELD_NAMES","SHINGLE_FIELD_NAMES","getSummaryAnswers","contractorAnswers","costEstimateAnswers","shingleAnswers","getSummaryResults","contractorResults","costEstimateResults","shingleResults","getCostEstimateAnswers","getShingleAnswers","getContractorResults","results","getCostEstimateResults","getShingleResults","calculateCostEstimateResults","homeSquareFootage","numberOfStories","garageValue","roofSlopeValue","roofComplexityValue","territoryPricePerSquareInUSD","edgesPercentage","average","fixedAverage","fixedLowestCost","fixedHighestCost","MAPS_API_KEY","_b","getStoredGeolocationData","locationData","fromLocalStorage","getStoredGeolocationCountryAndZip","getAddressFromGeolocation","address","geolocationObj","getLocationDataFromLatLong","latitude","longitude","dataLatLong","zipFromData","component","countryFromData","getLocationDataFromAddress","dataLocation","city","street","secondStreet","state","streetNumber","getBrowserGeolocationData","resolve","reject","timeoutId","successCallback","position","errorCallback","error","getGeolocationDataFromBrowserAndGoogle","browserData","geolocationData","updateGeolocationDataProperties","getLatLongFromZip","zip","country","countryCode","lat","lng","formattedAddress","INVALID_GOOGLE_ZIP_EVENT","getLocationByIpAddress","result","global","getZipAndCountryFromUrl","url","getGeolocationDataFromUrlAndGoogle","COUNTRY_VALUES","newGeolocationData","_window","PERSONALIZE_COMPONENT_LOADED_EVENT","setPersonaLanguageMap","persona","personalizeMapElement","personalizeMap","personalizeLanguage","checkContractorCommercialRedirect","contractorRedirect","checkTerritoryManagerCommercial","territoryRedirect","checkDocumentLandingCommercial","documentRedirect","languageSelector","langMapping","language","productDetailContent","replaceContentPdp","personalizationData","response","divToInsert","DOMPurify","stormRules","storm","codeRuleRedirect","runFullStackExperience","handleStormCodeRules","redirect","existingCookie","Cookies","homePersona","_c","linksToHome","_d","lang","languageLinks","google","maxmind","personalizeAddressData","_body","dispatchPersonaViewEvent","cookieManager","personaCookie","akGeo","extensionData","savedZip","shingleDetailContent","_persona","savedPersona","replaceContentShingle","handlePersonalizeComponentLoaded","elementId","elementDataModule","childrenWithModule","modulesName","child","modulesToLoad","module","create","handleChangePersona","isHome","initPersonalize","settings","e","initPersonalizeActions","retryInterval","initRtf","rtfs","rtf","expireStorage","now","userProfileExpiration","geolocationExpiration","userProfileExpirationDate","geolocationExpirationDate","quizzesResults","contractorResultsExpirationDate","costEstimateResultsExpirationDate","shingleResultsExpirationDate","isStorybook","body","pushSection","info","infoObj","obj","setIphoneViewport","pushDataLayer","dataset","datasetLayers","layer","svgXHR","options","baseUrl","_ajax","_fullPath","div","cleanHtml","domready","PUBLIC_PATH","svgxhr"],"sources":["../../../../src/scripts/modules-scaffold.tsx","../../../../src/scripts/modules-react.tsx","../../../../src/scripts/modules.tsx","../../../../src/scripts/helpers/debounce.ts","../../../../src/scripts/modules/rtf.ts","../../../../src/scripts/helpers/helpers.ts","../../../../src/scripts/helpers/global-storage.ts","../../../../src/scripts/react-components/quiz-results/helpers.tsx","../../../../src/scripts/helpers/geolocation.ts","../../../../src/scripts/helpers/personalize.ts","../../../../src/scripts/index.ts","../../../../src/scripts/helpers/svgxhr.ts","../../../../config.ts","../../../../main.js"],"sourcesContent":["\nimport type { Organism } from '@verndale/core';\n// ==> THIS FILE IS AUTO GENERATED, DO NOT EDIT DIRECTLY <== //\n\nconst modulesScaffold: Organism[] = [\n  \n  {\n    name: 'header',\n    loader: () => import('./modules/header'),\n    \n  },\n\n  {\n    name: 'alert-banner',\n    loader: () => import('./modules/alert-banner'),\n    \n  },\n\n  {\n    name: 'breadcrumbs',\n    \n    styles: () => import('../../src/scss/modules/breadcrumbs.scss'),\n  },\n\n  {\n    name: 'image-masthead-carousel',\n    loader: () => import('./modules/image-masthead-carousel'),\n    \n  },\n\n  {\n    name: 'homepage-masthead',\n    loader: () => import('./modules/homepage-masthead'),\n    \n  },\n\n  {\n    name: 'project-masthead-carousel',\n    loader: () => import('./modules/project-masthead-carousel'),\n    \n  },\n\n  {\n    name: 'city-listing-masthead',\n    loader: () => import('./modules/city-listing-masthead'),\n    \n  },\n\n  {\n    name: 'blog-category-masthead',\n    loader: () => import('./modules/blog-category-masthead'),\n    \n  },\n\n  {\n    name: 'share',\n    loader: () => import('./modules/share'),\n    \n  },\n\n  {\n    name: 'navigation-jumplinks',\n    loader: () => import('./modules/navigation-jumplinks'),\n    styles: () => import('../../src/scss/modules/navigation-jumplinks.scss'),\n  },\n\n  {\n    name: 'tabbed-featured-content',\n    loader: () => import('./modules/tabbed-featured-content'),\n    styles: () => import('../../src/scss/modules/tabbed-featured-content.scss'),\n  },\n\n  {\n    name: 'footer',\n    loader: () => import('./modules/footer'),\n    styles: () => import('../../src/scss/modules/footer.scss'),\n  },\n\n  {\n    name: 'accordion',\n    loader: () => import('./modules/accordion.js'),\n    styles: () => import('../scss/modules/accordion.scss'),\n  },\n\n  {\n    name: 'cookie-banner',\n    \n    styles: () => import('../../src/scss/modules/cookie-banner.scss'),\n  },\n\n  {\n    name: 'content-section-row',\n    \n    styles: () => import('../../src/scss/modules/content-section-row.scss'),\n  },\n\n  {\n    name: 'logo-carousel-row',\n    loader: () => import('./modules/logo-carousel-row'),\n    styles: () => import('../../src/scss/modules/logo-carousel-row.scss'),\n  },\n\n  {\n    name: 'card-row',\n    \n    styles: () => import('../../src/scss/modules/card-row.scss'),\n  },\n\n  {\n    name: 'masonry-gallery',\n    loader: () => import('./modules/masonry-gallery'),\n    styles: () => import('../../src/scss/modules/masonry-gallery.scss'),\n  },\n\n  {\n    name: 'link-grid',\n    \n    styles: () => import('../../src/scss/modules/link-grid.scss'),\n  },\n\n  {\n    name: 'press-release-company-information',\n    \n    styles: () => import('../../src/scss/modules/press-release-company-information.scss'),\n  },\n\n  {\n    name: 'content-grid',\n    loader: () => import('./modules/content-grid'),\n    styles: () => import('../../src/scss/modules/content-grid.scss'),\n  },\n\n  {\n    name: 'tabbed-container',\n    loader: () => import('./modules/tabbed-container'),\n    \n  },\n\n  {\n    name: 'testimonial-carousel',\n    loader: () => import('./modules/testimonial-carousel'),\n    styles: () => import('../../src/scss/modules/testimonial-carousel.scss'),\n  },\n\n  {\n    name: 'masked-image-with-content',\n    \n    styles: () => import('../../src/scss/modules/masked-image-with-content.scss'),\n  },\n\n  {\n    name: 'call-to-action-row-with-image',\n    \n    styles: () => import('../../src/scss/modules/call-to-action-row-with-image.scss'),\n  },\n\n  {\n    name: 'call-to-action-row-with-video',\n    \n    styles: () => import('../../src/scss/modules/call-to-action-row-with-video.scss'),\n  },\n\n  {\n    name: 'call-to-action-row-with-background',\n    \n    styles: () => import('../../src/scss/modules/call-to-action-row-with-background.scss'),\n  },\n\n  {\n    name: 'call-to-action-row-centered',\n    \n    styles: () => import('../../src/scss/modules/call-to-action-row-centered.scss'),\n  },\n\n  {\n    name: 'payment-methods-block',\n    \n    styles: () => import('../../src/scss/modules/payment-methods-block.scss'),\n  },\n\n  {\n    name: 'contractor-details',\n    \n    styles: () => import('../../src/scss/modules/contractor-details.scss'),\n  },\n\n  {\n    name: 'certifications-block',\n    loader: () => import('./modules/certifications-block'),\n    styles: () => import('../../src/scss/modules/certifications-block.scss'),\n  },\n\n  {\n    name: 'contractor-reviews',\n    loader: () => import('./modules/contractor-reviews'),\n    styles: () => import('../../src/scss/modules/contractor-reviews.scss'),\n  },\n\n  {\n    name: 'image-row-with-fact-icons',\n    \n    styles: () => import('../../src/scss/modules/image-row-with-fact-icons.scss'),\n  },\n\n  {\n    name: 'promo-cards',\n    \n    styles: () => import('../../src/scss/modules/promo-cards.scss'),\n  },\n\n  {\n    name: 'project-content-row',\n    \n    styles: () => import('../../src/scss/modules/project-content-row.scss'),\n  },\n\n  {\n    name: 'project-link-list',\n    \n    styles: () => import('../../src/scss/modules/project-link-list.scss'),\n  },\n\n  {\n    name: 'about-us-block',\n    loader: () => import('./modules/about-us-block'),\n    styles: () => import('../../src/scss/modules/about-us-block.scss'),\n  },\n\n  {\n    name: 'statistic-carousel-row',\n    loader: () => import('./modules/statistic-carousel-row'),\n    styles: () => import('../../src/scss/modules/statistic-carousel-row.scss'),\n  },\n\n  {\n    name: 'certifications-modal',\n    loader: () => import('./modules/certifications-modal'),\n    styles: () => import('../../src/scss/modules/certifications-modal.scss'),\n  },\n\n  {\n    name: 'video-modal',\n    loader: () => import('./modules/video-modal'),\n    styles: () => import('../../src/scss/modules/video-modal.scss'),\n  },\n\n  {\n    name: 'video-card',\n    \n    styles: () => import('../../src/scss/modules/video-card.scss'),\n  },\n\n  {\n    name: 'video-carousel',\n    loader: () => import('./modules/video-carousel'),\n    styles: () => import('../../src/scss/modules/video-carousel.scss'),\n  },\n\n  {\n    name: 'testimonial-card',\n    \n    styles: () => import('../../src/scss/modules/testimonial-card.scss'),\n  },\n\n  {\n    name: 'media-gallery',\n    loader: () => import('./modules/media-gallery'),\n    styles: () => import('../../src/scss/modules/media-gallery.scss'),\n  },\n\n  {\n    name: 'video-carousel-list-row',\n    loader: () => import('./modules/video-carousel-list-row'),\n    styles: () => import('../../src/scss/modules/video-carousel-list-row.scss'),\n  },\n\n  {\n    name: 'video-carousel-list-card',\n    \n    styles: () => import('../../src/scss/modules/video-carousel-list-card.scss'),\n  },\n\n  {\n    name: 'quiz-row',\n    loader: () => import('./modules/quiz-row'),\n    styles: () => import('../../src/scss/modules/quiz-row.scss'),\n  },\n\n  {\n    name: 'ventilation-calculator',\n    loader: () => import('./modules/ventilation-calculator'),\n    styles: () => import('../../src/scss/modules/ventilation-calculator.scss'),\n  },\n\n  {\n    name: 'parts-of-roof',\n    \n    styles: () => import('../../src/scss/modules/parts-of-roof.scss'),\n  },\n\n  {\n    name: 'product-benefits-row',\n    \n    styles: () => import('../../src/scss/modules/product-benefits-row.scss'),\n  },\n\n  {\n    name: 'magento-promo-row-one',\n    \n    styles: () => import('../../src/scss/modules/magento-promo-row-one.scss'),\n  },\n\n  {\n    name: 'virtual-home-remodeler-row',\n    \n    styles: () => import('../../src/scss/modules/virtual-home-remodeler-row.scss'),\n  },\n\n  {\n    name: 'magento-promo-row-two',\n    \n    styles: () => import('../../src/scss/modules/magento-promo-row-two.scss'),\n  },\n\n  {\n    name: 'shingle-specifications-table',\n    \n    styles: () => import('../../src/scss/modules/shingle-specifications-table.scss'),\n  },\n\n  {\n    name: 'review-embed',\n    \n    styles: () => import('../../src/scss/modules/review-embed.scss'),\n  },\n\n  {\n    name: 'product-feature-warranty-row',\n    \n    styles: () => import('../../src/scss/modules/product-feature-warranty-row.scss'),\n  },\n\n  {\n    name: 'blog-content-container',\n    \n    styles: () => import('../../src/scss/modules/blog-content-container.scss'),\n  },\n\n  {\n    name: 'tag-row',\n    \n    styles: () => import('../../src/scss/modules/tag-row.scss'),\n  },\n\n  {\n    name: 'author-feature-row',\n    \n    styles: () => import('../../src/scss/modules/author-feature-row.scss'),\n  },\n\n  {\n    name: 'related-article-row',\n    \n    styles: () => import('../../src/scss/modules/related-article-row.scss'),\n  },\n\n  {\n    name: 'document-product-row',\n    \n    styles: () => import('../../src/scss/modules/document-product-row.scss'),\n  },\n\n  {\n    name: 'installation-steps-row',\n    loader: () => import('./modules/installation-steps-row'),\n    styles: () => import('../../src/scss/modules/installation-steps-row.scss'),\n  },\n\n  {\n    name: 'faq-component-row',\n    \n    styles: () => import('../../src/scss/modules/faq-component-row.scss'),\n  },\n\n  {\n    name: 'related-components-and-accessories-row',\n    \n    styles: () => import('../../src/scss/modules/related-components-and-accessories-row.scss'),\n  },\n\n  {\n    name: 'related-product-row',\n    \n    styles: () => import('../../src/scss/modules/related-product-row.scss'),\n  },\n\n  {\n    name: 'category-selection-bar',\n    loader: () => import('./modules/category-selection-bar'),\n    \n  },\n\n  {\n    name: 'chairmans-circle-row',\n    \n    styles: () => import('../../src/scss/modules/chairmans-circle-row.scss'),\n  },\n\n  {\n    name: 'related-profiles-row',\n    \n    styles: () => import('../../src/scss/modules/related-profiles-row.scss'),\n  },\n\n  {\n    name: 'featured-blog-listing',\n    loader: () => import('./modules/featured-blog-listing'),\n    styles: () => import('../../src/scss/modules/featured-blog-listing.scss'),\n  },\n\n  {\n    name: 'product-iframe-row',\n    loader: () => import('./modules/product-iframe-row'),\n    styles: () => import('../../src/scss/modules/product-iframe-row.scss'),\n  },\n\n  {\n    name: 'shingle-comparison-table',\n    loader: () => import('./modules/shingle-comparison-table'),\n    styles: () => import('../../src/scss/modules/shingle-comparison-table.scss'),\n  },\n\n  {\n    name: 'campaign-form-container',\n    \n    styles: () => import('../../src/scss/modules/campaign-form-container.scss'),\n  },\n\n  {\n    name: 'section-navigation',\n    loader: () => import('./modules/section-navigation'),\n    \n  },\n\n  {\n    name: 'image-carousel-card',\n    \n    styles: () => import('../../src/scss/modules/image-carousel-card.scss'),\n  },\n\n  {\n    name: 'image-carousel-row',\n    loader: () => import('./modules/image-carousel-row'),\n    styles: () => import('../../src/scss/modules/image-carousel-row.scss'),\n  },\n\n  {\n    name: 'skip-to-main-content',\n    loader: () => import('./modules/skip-to-main-content'),\n    \n  },\n\n  {\n    name: 'nearby-links',\n    loader: () => import('./modules/nearby-links'),\n    styles: () => import('../../src/scss/modules/nearby-links.scss'),\n  }\n];\n\nexport default [...modulesScaffold];\n","import type { Organism } from '@verndale/core';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst reactModule = (Component: any, nodeList: NodeListOf<HTMLElement>) => {\n  return nodeList.forEach(node =>\n    createRoot(node).render(<Component {...node.dataset} />)\n  );\n};\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/*\n\nSAMPLE MODULE ENTRY USING REACT\n\n{\n  name: 'accordion',\n  loader: () => import('./modules/accordion.js'),\n  styles: () => import('../scss/modules/accordion.scss'),\n  render: reactModule\n}\n\n*/\n\nconst modulesReact: Organism[] = [\n  {\n    name: 'masthead-zip-form',\n    loader: () =>\n      import('./react-components/contractor-locator-listing/masthead-zip-form'),\n    render: reactModule\n  },\n  {\n    name: 'shingle-detail-masthead',\n    loader: () => import('./react-components/shingle-detail-masthead'),\n    render: reactModule\n  },\n  {\n    name: 'contractor-request-a-quote-form',\n    loader: () =>\n      import('./coveo/modules/contractor-request-a-quote-form/index'),\n    render: reactModule\n  },\n  {\n    name: 'product-masthead',\n    loader: () => import('./react-components/product-masthead'),\n    render: reactModule\n  },\n  {\n    name: 'image-showcase-product-detail-masthead',\n    loader: () => import('./react-components/image-showcase-product-detail-masthead'),\n    render: reactModule\n  },\n  {\n    name: 'loader',\n    loader: () => import('./react-components/listing-states/loader'),\n    styles: () => import('../scss/components/_loader.scss'),\n    render: reactModule\n  },\n  {\n    name: 'press-release-listing',\n    loader: () => import('./react-components/press-release-listing/index.js'),\n    styles: () => import('../scss/modules/press-release-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'error-message',\n    loader: () => import('./react-components/listing-states/error'),\n    styles: () => import('../scss/components/_error-message.scss'),\n    render: reactModule\n  },\n  {\n    name: 'city-directory-listing',\n    loader: () => import('./react-components/city-directory-listing/index'),\n    styles: () => import('../scss/modules/city-directory-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'project-listing',\n    loader: () => import('./coveo/modules/project-listing'),\n    styles: () => import('../scss/modules/project-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'contractor-listing',\n    loader: () => import('./coveo/modules/contractor-listing'),\n    styles: () => import('../scss/modules/contractor-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'city-listing',\n    loader: () => import('./coveo/modules/city-listing'),\n    styles: () => import('../scss/modules/contractor-listing.scss'),\n    render: reactModule\n  },\n\n  {\n    name: 'search-results-listing',\n    loader: () => import('./coveo/modules/search-results-listing'),\n    styles: () => import('../scss/modules/search-results-listing.scss'),\n    render: reactModule\n  },\n\n  {\n    name: 'documents-listing',\n    loader: () => import('./coveo/modules/documents-listing'),\n    styles: () => import('../../src/scss/modules/documents-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'territory-manager-lookup',\n    loader: () => import('./react-components/territory-manager-lookup'),\n    styles: () => import('../scss/modules/territory-manager-lookup.scss'),\n    render: reactModule\n  },\n  {\n    name: 'document-listing',\n    loader: () => import('./react-components/document-listing'),\n    styles: () => import('../scss/modules/document-listing.scss'),\n    render: reactModule\n  },\n\n  {\n    name: 'distributor-locator',\n    loader: () => import('../scripts/react-components/distributor-locator'),\n    styles: () => import('../scss/modules/distributor-locator.scss'),\n    render: reactModule\n  },\n  {\n    name: 'territory-manager-listing',\n    loader: () => import('./react-components/territory-manager-listing'),\n    styles: () => import('../scss/modules/territory-manager-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'request-a-quote-modal',\n    loader: () => import('./coveo/components/request-a-quote-modal/index'),\n    styles: () => import('../scss/components/_request-a-quote-modal.scss'),\n    render: reactModule\n  },\n\n  {\n    name: 'predictive-search',\n    loader: () => import('./coveo/components/predictive-search'),\n    render: reactModule\n  },\n  {\n    name: 'document-cart',\n    loader: () => import('./react-components/document-cart'),\n    styles: () => import('../scss/modules/document-cart.scss'),\n    render: reactModule\n  },\n  {\n    name: 'user-review-landing-thank-you',\n    loader: () =>\n      import('./react-components/user-review-landing/step-5-thank-you'),\n    styles: () =>\n      import('../../src/scss/modules/user-review-landing-thank-you.scss'),\n    render: reactModule\n  },\n\n  {\n    name: 'user-review-landing-redirect-to-google-review',\n    loader: () =>\n      import(\n        './react-components/user-review-landing/step-4-redirect-to-google-review'\n      ),\n    styles: () =>\n      import(\n        '../../src/scss/modules/user-review-landing-redirect-to-google-review.scss'\n      ),\n    render: reactModule\n  },\n\n  {\n    name: 'standalone-searchbox',\n    loader: () => import('./coveo/modules/standalone-searchbox'),\n    render: reactModule\n  },\n\n  {\n    name: 'quiz-results',\n    loader: () => import('./react-components/quiz-results'),\n    styles: () => import('../scss/modules/quiz-results.scss'),\n    render: reactModule\n  },\n  {\n    name: 'user-review-landing',\n    loader: () => import('./react-components/user-review-landing'),\n    styles: () => import('../scss/modules/user-review-landing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'quiz-form',\n    loader: () => import('./react-components/quiz-form'),\n    styles: () => import('../scss/modules/quiz-form.scss'),\n    render: reactModule\n  },\n  {\n    name: 'blog-listing',\n    loader: () => import('./react-components/blog-listing'),\n    styles: () => import('../scss/modules/blog-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'product-listing',\n    loader: () => import('./coveo/modules/product-listing'),\n    styles: () => import('../scss/modules/product-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'shingle-result-listing',\n    loader: () => import('./coveo/modules/shingle-result-listing'),\n    styles: () => import('../scss/modules/shingle-result-listing.scss'),\n    render: reactModule\n  },\n  {\n    name: 'shingle-comparison-app',\n    loader: () => import('./react-components/shingle-comparison-app'),\n    styles: () => import('../scss/modules/shingle-comparison-table.scss'),\n    render: reactModule\n  },\n  {\n    name: 'mockApi',\n    loader: () => import('./react-components/mockApi'),\n    render: reactModule\n  },\n  {\n    name: 'commercial-document-package',\n    loader: () => import('./react-components/commercial-document-package'),\n    styles: () => import('../scss/modules/commercial-document-package.scss'),\n    render: reactModule\n  },\n  {\n    name: 'contractor-finder',\n    loader: () => import('../scripts/coveo/modules/contractor-finder'),\n    styles: () => import('../scss/modules/contractor-finder.scss'),\n    render: reactModule\n  }\n];\n\nexport default [...modulesReact];\n","import type { Organism } from '@verndale/core';\nimport scaffoldedModules from './modules-scaffold';\nimport modulesReact from './modules-react';\n\nconst modules: Organism[] = [\n  {\n    name: 'figure',\n    loader: () => import('./modules/figure.js')\n  },\n  {\n    name: 'rating-stars',\n    loader: () => import('./modules/rating-stars.js'),\n    styles: () => import('../../src/scss/components/_rating-stars.scss')\n  },\n  {\n    name: 'disclaimer',\n    styles: () => import('../../src/scss/modules/disclaimer.scss')\n  },\n  {\n    name: 'comparison-card',\n    styles: () => import('../../src/scss/modules/comparison-card.scss')\n  },\n  {\n    name: 'comparison-table-row',\n    loader: () => import('./modules/comparison-table-row'),\n    styles: () => import('../../src/scss/modules/comparison-table-row.scss')\n  },\n  {\n    name: 'product-feature-warranty-row',\n    styles: () =>\n      import('../../src/scss/modules/product-feature-warranty-row.scss')\n  },\n  {\n    name: 'document-product-card',\n    loader: () => import('./modules/document-product-card'),\n    styles: () =>\n      import('../../src/scss/components/_document-product-card.scss')\n  },\n  {\n    name: 'warranty-modal',\n    loader: () => import('./modules/warranty-modal'),\n    styles: () => import('../../src/scss/components/_warranty-modal.scss')\n  }\n];\n\nexport default [...modulesReact, ...scaffoldedModules, ...modules];\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useEffect, useMemo, useRef } from 'react';\nexport type Args = any[];\n\nexport const debounce = (callback: any, wait: number) => {\n  let timerId: any;\n  return (...args: Args) => {\n    clearTimeout(timerId);\n    timerId = setTimeout(() => {\n      callback(...args);\n    }, wait);\n  };\n};\n\nexport const useDebounce = (callback: () => void, waitTime: number) => {\n  const ref = useRef<() => void>();\n\n  useEffect(() => {\n    ref.current = callback;\n  }, [callback]);\n\n  const debouncedCallback = useMemo(() => {\n    const func = () => {\n      ref.current?.();\n    };\n\n    return debounce(func, waitTime);\n  }, []);\n\n  return debouncedCallback;\n};\n\n/* eslint-enable @typescript-eslint/no-explicit-any */\n","import { Component } from '@verndale/core';\nimport { debounce } from '../helpers/debounce';\n\nclass Rtf extends Component {\n  private containers: NodeListOf<HTMLElement>;\n\n  constructor(el: HTMLElement) {\n    super(el);\n    this.containers = this.el.querySelectorAll('.table');\n\n    this.addContainer();\n  }\n\n  setupDefaults() {\n    this.dom = {\n      tables: this.el.querySelectorAll('table')\n    };\n  }\n\n  addContainer() {\n    (this.dom.tables as NodeListOf<HTMLElement>).forEach(table => {\n      if (table.closest('.table')) return;\n\n      const container = document.createElement('div');\n      container.classList.add('table');\n      table.parentNode?.insertBefore(container, table);\n      container.appendChild(table);\n\n      this.isOverflowing(container);\n    });\n\n    this.containers = this.el.querySelectorAll('.table');\n\n    window.addEventListener(\n      'resize',\n      debounce(this.handleResize.bind(this), 250)\n    );\n  }\n\n  isOverflowing(element: HTMLElement) {\n    if (element.scrollWidth > element.clientWidth) {\n      element.classList.add('table--overflowing');\n    } else {\n      element.classList.remove('table--overflowing');\n    }\n  }\n\n  handleResize() {\n    (this.containers as NodeListOf<HTMLElement>).forEach(container => {\n      this.isOverflowing(container);\n    });\n  }\n}\n\nexport default Rtf;\n","// /**\n// * FOCUSABLE ELEMENTS\n\nimport { ExtendedWindowType } from '../coveo/engine';\nimport { Document } from '../react-components/document-listing/response';\nimport { DataLayerObject } from './global-types';\n\n// */\nexport const focusableElements = [\n  '[contenteditable]',\n  '[tabindex]:not([tabindex^=\"-\"])',\n  'a[href]',\n  'area[href]',\n  'button:not([disabled]):not([aria-hidden])',\n  'embed',\n  'iframe',\n  'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n  'object',\n  'select:not([disabled]):not([aria-hidden])',\n  'textarea:not([disabled]):not([aria-hidden])'\n];\n\nexport const createDataLayerString = (\n  data: DataLayerObject | DataLayerObject[]\n) => {\n  return JSON.stringify(data);\n};\n\n/* email click */\n\nexport const emailClick = (event: Event) => {\n  const target = event.target as HTMLAnchorElement;\n  const href = target?.href;\n\n  if (href && href.includes('mailto:')) {\n    const global = window as ExtendedWindowType;\n\n    global.dataLayer?.push({\n      event: 'email_contact_click',\n      event_category: 'contact'\n    });\n  }\n};\n\n/* phone click */\n\nexport const phoneClick = (event: Event) => {\n  const target = event.target as HTMLAnchorElement;\n  const href = target?.href;\n\n  if (href && href.includes('tel:')) {\n    const global = window as ExtendedWindowType;\n\n    global.dataLayer?.push({\n      event: 'phone_contact_click',\n      event_category: 'contact'\n    });\n  }\n};\n\n/* detect scroll thresholds */\n\nexport const detectScrollThresholds = () => {\n  const thresholds = [10, 25, 50, 75, 90]; // Threshold percentages\n  const thresholdReached: {\n    [key: number]: boolean;\n  } = {}; // To keep track of threshold crossing\n\n  window.addEventListener('scroll', () => {\n    const windowHeight = window.innerHeight;\n    const documentHeight = document.documentElement.scrollHeight;\n    const scrollPercentage =\n      (window.scrollY / (documentHeight - windowHeight)) * 100;\n\n    thresholds.forEach(threshold => {\n      if (scrollPercentage >= threshold && !thresholdReached[threshold]) {\n        thresholdReached[threshold] = true;\n\n        const width = window.innerWidth;\n        const global = window as ExtendedWindowType;\n\n        global.dataLayer?.push({\n          event: 'page_scroll',\n          event_attributes: {\n            percent_scrolled: threshold,\n            browser_width: width\n          }\n        });\n      }\n    });\n  });\n};\n\n/* detect section is visible */\n\nexport const detectSectionIsVisible = (\n  onVisible: (e: IntersectionObserverEntry) => void,\n  selector: string,\n  onNotVisible?: () => void\n) => {\n  const detectVisibleSections = (entries: IntersectionObserverEntry[]) => {\n    entries.forEach(entry => {\n      if (entry.isIntersecting) {\n        onVisible(entry);\n      } else if (onNotVisible) {\n        onNotVisible();\n      }\n    });\n  };\n\n  const observer = new IntersectionObserver(detectVisibleSections);\n  const sections = document.querySelectorAll(selector);\n  sections.forEach(section => {\n    observer.observe(section);\n  });\n};\n\n// one time section visible observer\n\nexport const oneTimeVisibleLayerPush = (\n  element: HTMLElement,\n  data: DataLayerObject\n) => {\n  const handleIntersection = (\n    entries: IntersectionObserverEntry[],\n    observer: IntersectionObserver\n  ) => {\n    entries.forEach(entry => {\n      if (entry.isIntersecting) {\n        // Element is now visible\n        const global = window as ExtendedWindowType;\n        global.dataLayer?.push(data);\n\n        // Unobserve the element to stop further tracking\n        observer.unobserve(entry.target);\n      }\n    });\n  };\n\n  // Create an Intersection Observer\n  const observer = new IntersectionObserver(handleIntersection);\n\n  // Start observing the element\n  observer.observe(element);\n\n  return observer;\n};\n\n//remove special characters from string but keep spaces\n\nexport const removeSpecialCharacters = (str: string) => {\n  return str.replace(/[^a-zA-Z0-9 ]/g, '');\n};\n\n//make super script html tags\n\nexport const makeSuperScript = (text: string) => {\n  if (text) {\n    const superScript = ['®', '™', '©', '℠', '¹', '²', '³'];\n    const codeTrademark = [\n      '&#174;',\n      '&#8482;',\n      '&#169;',\n      '&#8480;',\n      '&#185;',\n      '&#178;',\n      '&#179;'\n    ];\n\n    codeTrademark.forEach((code, index) => {\n      text = text.replace(new RegExp(code, 'g'), superScript[index]);\n    });\n    if (superScript.some(sup => text.includes(sup))) {\n      const superScriptRegex = /<sup>®|™|©|℠|¹|²|³<\\/sup>/g;\n      text = text.replace(superScriptRegex, match =>\n        match.replace(/<\\/?sup>/g, '')\n      );\n      return text.replace(/®|™|©|℠|¹|²|³/g, match => `<sup>${match}</sup>`);\n    }\n    return text;\n  }\n  return '';\n};\n\n// get a document following GAF priority\nexport const getDocumentPriority = (documents: Document[]) => {\n  const priorityDocument =\n    documents.find(document => document.extension === 'PDF') ||\n    documents.find(document => document.extension === 'DOC') ||\n    documents.find(document => document.extension === 'DWG') ||\n    documents.find(document => document.extension === 'RVT');\n  return priorityDocument ? priorityDocument.url : '';\n};\n\nexport const getExtensionPriority = (documents: Document[]) => {\n  const priorityDocument =\n    documents.find(document => document.extension === 'PDF') ||\n    documents.find(document => document.extension === 'DOC') ||\n    documents.find(document => document.extension === 'DWG') ||\n    documents.find(document => document.extension === 'RVT');\n  return priorityDocument ? priorityDocument.extension : '';\n};\n//decode HTML entities\nexport const decodeHtmlEntities = (encodedString: string) => {\n  const elem = document.createElement('div');\n  elem.innerHTML = encodedString;\n  return elem.textContent;\n};\n\nexport const isInDialog = (modal: HTMLDialogElement, event: MouseEvent) => {\n  const rect = modal?.getBoundingClientRect();\n  if (rect) {\n    return (\n      rect.top <= event.clientY &&\n      event.clientY <= rect.top + rect.height &&\n      rect.left <= event.clientX &&\n      event.clientX <= rect.left + rect.width\n    );\n  }\n\n  return false;\n};\n\n// check if any key in an object is empty\nexport const isAnyKeyEmpty = (obj: object) => {\n  for (const key in obj) {\n    if (!obj[key as keyof object]) {\n      return true;\n    }\n  }\n  return false;\n};\n","import SecureLS from 'secure-ls';\nexport const secureStorage = new SecureLS({ encodingType: 'aes' });\n\nexport const USER_PROFILE_KEYS = Object.freeze({\n  userName: 'userName',\n  userLastName: 'userLastName',\n  userEmail: 'userEmail',\n  userPhone: 'userPhone',\n  userMessage: 'userMessage'\n});\n\nexport type UserProfileType = {\n  userName?: string;\n  userLastName?: string;\n  userEmail?: string;\n  userPhone?: string;\n  userMessage?: string;\n};\n\nexport const USER_PERSONALIZATION_KEY = 'gaf_persona';\nexport const USER_PROFILE_OBJECT_KEY = 'userProfile';\nexport const COMPARE_TRAY_KEY = 'gaf_compare_tray';\nexport const USER_PROFILE_EXPIRATION_KEY = 'userProfileExpiration';\nexport const USER_PROFILE_EXPIRATION_TIME = 1000 * 60 * 60 * 24 * 30; // 30 days\n\nexport const USER_PROFILE_FIELDS = Array.from(Object.values(USER_PROFILE_KEYS));\n\nexport const getUserProfile = () => {\n  const userProfile = secureStorage.get(USER_PROFILE_OBJECT_KEY);\n  return userProfile ? JSON.parse(userProfile) : {};\n};\n\nexport const updateUserProfile = (properties: Partial<UserProfileType>) => {\n  let newUserProfile: UserProfileType | null = null;\n  const userProfile = getUserProfile();\n\n  if (userProfile) {\n    newUserProfile = {\n      ...userProfile,\n      ...properties\n    };\n  } else {\n    newUserProfile = {\n      ...properties\n    };\n  }\n\n  const now = new Date();\n  const time = now.getTime() + USER_PROFILE_EXPIRATION_TIME;\n\n  secureStorage.set(USER_PROFILE_EXPIRATION_KEY, time.toString());\n\n  secureStorage.set(USER_PROFILE_OBJECT_KEY, JSON.stringify(newUserProfile));\n};\n\nexport const COOKIE_NAMES = Object.freeze({\n  geolocation: 'geolocation',\n  persona: 'gaf_persona'\n});\n\nexport type GeolocationType = {\n  country: string;\n  zip: string;\n  latitude?: number;\n  longitude?: number;\n  address?: string;\n  city?: string;\n  state?: string;\n  street?: string;\n  secondStreet?: string;\n};\n\nexport const GEOLOCATION_EXPIRATION_KEY = 'geolocationExpiration';\nexport const GEOLOCATION_EXPIRATION_TIME = 1000 * 60 * 60 * 24 * 30; // 30 days\n","import { Result } from '@coveo/headless';\nimport { secureStorage } from '../../helpers/global-storage';\n\nexport const QUIZ_ANSWER_NAMES = {\n  contractor: 'contractorAnswers',\n  costEstimates: 'costEstimateAnswers',\n  shingle: 'shingleAnswers'\n};\n\nexport const QUIZ_RESULT_NAMES = {\n  contractor: 'contractorResults',\n  costEstimates: 'costEstimateResults',\n  shingle: 'shingleResults'\n};\n\nexport const UTM_FIELD_NAME = 'UTM__c';\n\nexport type contractorAnswersType = {\n  zipCode: string;\n  countryCode: string;\n};\n\nexport const CONCTRACTOR_FIELD_NAMES = Object.freeze({\n  zipCode: 'userZipCode',\n  countryCode: 'userCountryCode'\n});\n\nexport type costEstimateAnswersType = {\n  zip: string;\n  homeSquareFootage: number;\n  numberOfStories: number;\n  garageValue: number;\n  roofSlopeValue: number;\n  roofComplexityValue: number;\n};\n\nexport const COST_ESTIMATE_FIELD_NAMES = Object.freeze({\n  zip: 'userZipCode',\n  country: 'userCountryCode',\n  homeSquareFootage: 'homeSquareFootage',\n  numberOfStories: 'numberOfStories',\n  garageValue: 'garageValue',\n  roofSlopeValue: 'roofSlopeValue',\n  roofComplexityValue: 'roofComplexityValue',\n  chosenContractor: 'chosenContractor',\n  estimateUpper: 'estimateupper',\n  estimateAverage: 'estimateavg',\n  estimateLower: 'estimatelower',\n  city: 'userCity',\n  state: 'userState',\n  street: 'userStreet',\n  secondStreet: 'userStreet2'\n});\n\nexport type shingleAnswersType = {\n  userZipCode: string;\n  shingleFeatures: string[];\n  shingleFeatureValues: string[];\n};\n\nexport const SHINGLE_FIELD_NAMES = Object.freeze({\n  zipCode: 'userZipCode',\n  shingleFeatures: 'shingleFeatures'\n});\n\nexport type contractorResultsType = {\n  zipCode: string;\n  latitude: number;\n  longitude: number;\n  results: Result[];\n  expirationDate: number;\n};\n\nexport type costEstimateResultsType = {\n  lowestCost: number;\n  averageCost: number;\n  highestCost: number;\n  expirationDate: number;\n};\n\ntype resultWithChildrenType = Result & { childResults?: Result[] };\n\nexport type shingleResultsType = {\n  results: resultWithChildrenType[];\n  expirationDate: number;\n};\n\nexport const getSummaryAnswers = () => {\n  const contractorAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.contractor);\n  const costEstimateAnswers = secureStorage.get(\n    QUIZ_ANSWER_NAMES.costEstimates\n  );\n  const shingleAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.shingle);\n\n  return {\n    contractorAnswers: contractorAnswers\n      ? (JSON.parse(contractorAnswers) as contractorAnswersType)\n      : undefined,\n    costEstimateAnswers: costEstimateAnswers\n      ? (JSON.parse(costEstimateAnswers) as costEstimateAnswersType)\n      : undefined,\n    shingleAnswers: shingleAnswers\n      ? (JSON.parse(shingleAnswers) as shingleAnswersType)\n      : undefined\n  };\n};\n\nexport const getSummaryResults = () => {\n  const contractorResults = secureStorage.get(QUIZ_RESULT_NAMES.contractor);\n  const costEstimateResults = secureStorage.get(\n    QUIZ_RESULT_NAMES.costEstimates\n  );\n  const shingleResults = secureStorage.get(QUIZ_RESULT_NAMES.shingle);\n\n  return {\n    contractorResults: contractorResults\n      ? (JSON.parse(contractorResults) as contractorResultsType)\n      : undefined,\n    costEstimateResults: costEstimateResults\n      ? (JSON.parse(costEstimateResults) as costEstimateResultsType)\n      : undefined,\n    shingleResults: shingleResults\n      ? (JSON.parse(shingleResults) as shingleResultsType)\n      : undefined\n  };\n};\n\nexport const getContractorAnswers = () => {\n  let contractorAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.contractor);\n  if (!contractorAnswers) {\n    contractorAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.contractor);\n  }\n\n  return contractorAnswers\n    ? (JSON.parse(contractorAnswers) as contractorAnswersType)\n    : undefined;\n};\n\nexport const getCostEstimateAnswers = () => {\n  const costEstimateAnswers = secureStorage.get(\n    QUIZ_ANSWER_NAMES.costEstimates\n  );\n\n  return costEstimateAnswers\n    ? (JSON.parse(costEstimateAnswers) as costEstimateAnswersType)\n    : undefined;\n};\n\nexport const getShingleAnswers = () => {\n  const shingleAnswers = secureStorage.get(QUIZ_ANSWER_NAMES.shingle);\n\n  return shingleAnswers\n    ? (JSON.parse(shingleAnswers) as shingleAnswersType)\n    : undefined;\n};\n\nexport const getContractorResults = () => {\n  const results = secureStorage.get(QUIZ_RESULT_NAMES.contractor);\n  return results ? (JSON.parse(results) as contractorResultsType) : undefined;\n};\n\nexport const getCostEstimateResults = () => {\n  const results = secureStorage.get(QUIZ_RESULT_NAMES.costEstimates);\n  return results ? (JSON.parse(results) as costEstimateResultsType) : undefined;\n};\n\nexport const getShingleResults = () => {\n  const results = secureStorage.get(QUIZ_RESULT_NAMES.shingle);\n  return results ? (JSON.parse(results) as shingleResultsType) : undefined;\n};\n\nexport const calculateCostEstimateResults = (\n  homeSquareFootage: number,\n  numberOfStories: number,\n  garageValue: number,\n  roofSlopeValue: number,\n  roofComplexityValue: number,\n  territoryPricePerSquareInUSD: number,\n  edgesPercentage: number\n) => {\n  const average = (\n    (homeSquareFootage / numberOfStories / 100) *\n    (garageValue * roofSlopeValue * roofComplexityValue) *\n    territoryPricePerSquareInUSD\n  ).toFixed(0);\n\n  const fixedAverage = Number(average);\n  const fixedLowestCost = Number(\n    (fixedAverage - (fixedAverage * edgesPercentage) / 100).toFixed(0)\n  );\n  const fixedHighestCost = Number(\n    (fixedAverage + (fixedAverage * edgesPercentage) / 100).toFixed(0)\n  );\n\n  const results = {\n    averageCost: fixedAverage,\n    lowestCost: fixedLowestCost,\n    highestCost: fixedHighestCost,\n    expirationDate: new Date().getTime() + 1000 * 60 * 60 * 24 * 30 // 30 days\n  };\n\n  secureStorage.set(QUIZ_RESULT_NAMES.costEstimates, JSON.stringify(results));\n\n  return results;\n};\n","import SecureLS from 'secure-ls';\n\nimport {\n  COOKIE_NAMES,\n  GEOLOCATION_EXPIRATION_KEY,\n  GEOLOCATION_EXPIRATION_TIME,\n  GeolocationType\n} from './global-storage';\nimport { MaxmindErrorResponse, MaxmindResponse } from './maxmindResponseTypes';\nimport { ExtendedWindowType } from './global-types';\n\nexport const secureStorage = new SecureLS({ encodingType: 'aes' });\n\nconst MAPS_API_KEY =\n  (document.querySelector('[data-api]') as HTMLElement)?.dataset?.api ||\n  'AIzaSyBiAlQV0Vq0CdAR6on522xLjaMF8iroYPU';\n\n//Check if there is a location in local storage or cookies\nexport const getStoredGeolocationData = () => {\n  let locationData: GeolocationType | null = null;\n\n  const fromLocalStorage = secureStorage.get(COOKIE_NAMES.geolocation);\n\n  if (fromLocalStorage) {\n    locationData = JSON.parse(fromLocalStorage);\n  }\n\n  return locationData;\n};\n\n//same as getStoredGeolocationData but returns country and zip only\nexport const getStoredGeolocationCountryAndZip = () => {\n  let locationData: GeolocationType | null = null;\n\n  const fromLocalStorage = secureStorage.get(COOKIE_NAMES.geolocation);\n\n  if (fromLocalStorage) {\n    locationData = JSON.parse(fromLocalStorage);\n  }\n  return locationData;\n};\n\n//Get address from geolocation stored in local storage or cookies\n\nexport const getAddressFromGeolocation = () => {\n  let address: string | null = null;\n  const fromLocalStorage = secureStorage.get(COOKIE_NAMES.geolocation);\n\n  if (fromLocalStorage) {\n    const geolocationObj = JSON.parse(fromLocalStorage) as GeolocationType;\n    if (geolocationObj.address) address = geolocationObj.address;\n  }\n\n  return address;\n};\n\n//Get the location data from the lat long using google maps api\n\nexport const getLocationDataFromLatLong = async (\n  latitude: number,\n  longitude: number\n) => {\n  const response = await window.fetch(\n    `https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key=${MAPS_API_KEY}`\n  );\n\n  const dataLatLong = await response.json();\n\n  const zipFromData = dataLatLong.results[0].address_components.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => component.types.includes('postal_code')\n  );\n  const countryFromData = dataLatLong.results[0].address_components.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => component.types.includes('country')\n  );\n\n  if (!zipFromData) {\n    return {\n      zip: undefined,\n      country: undefined\n    };\n  }\n\n  if (zipFromData.short_name && countryFromData.short_name) {\n    return {\n      zip: zipFromData.short_name,\n      country: countryFromData.short_name\n    };\n  } else {\n    return {\n      zip: undefined,\n      country: undefined\n    };\n  }\n};\n\n//Get the location data from the address using google maps api\n\nexport const getLocationDataFromAddress = async (address: string) => {\n  const response = await window.fetch(\n    `https://maps.googleapis.com/maps/api/geocode/json?address=${address}&key=${MAPS_API_KEY}`\n  );\n\n  const dataLocation = await response.json();\n  //return if location is not valid\n  if (!dataLocation || dataLocation?.status === 'ZERO_RESULTS') {\n    return {\n      zip: undefined,\n      country: undefined,\n      latitude: undefined,\n      longitude: undefined,\n      city: undefined,\n      street: undefined,\n      streetNumber: undefined,\n      state: undefined,\n      secondStreet: undefined\n    };\n  }\n\n  const zipFromData = dataLocation.results[0].address_components.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => component.types.includes('postal_code')\n  );\n  const countryFromData = dataLocation.results[0].address_components.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => component.types.includes('country')\n  );\n  const latitude = dataLocation.results[0].geometry.location.lat;\n  const longitude = dataLocation.results[0].geometry.location.lng;\n\n  const city = dataLocation.results[0].address_components.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => component.types.includes('locality')\n  );\n  const street = dataLocation.results[0].address_components.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => component.types.includes('route')\n  );\n\n  const secondStreet = dataLocation.results[0].address_components.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => component.types.includes('subpremise')\n  );\n  const state = dataLocation.results[0].address_components.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => component.types.includes('administrative_area_level_1')\n  );\n\n  const streetNumber = dataLocation.results[0].address_components?.find(\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (component: any) => {\n      return component.types.includes('street_number');\n    }\n  );\n\n  if (zipFromData?.short_name && countryFromData?.short_name) {\n    return {\n      zip: zipFromData?.short_name || '',\n      country: countryFromData?.short_name || '',\n      latitude,\n      longitude,\n      city: city?.long_name || '',\n      street: street?.long_name || '',\n      secondStreet: secondStreet?.long_name || '',\n      state: state?.long_name || '',\n      streetNumber: streetNumber?.long_name || ''\n    };\n  } else {\n    return {\n      zip: undefined,\n      country: undefined,\n      latitude: undefined,\n      longitude: undefined,\n      city: undefined,\n      street: undefined,\n      state: undefined,\n      streetNumber: undefined,\n      secondStreet: undefined\n    };\n  }\n};\n\n//Get lat long from the browser\nexport const getBrowserGeolocationData = async () => {\n  try {\n    const data = await new Promise((resolve, reject) => {\n      let timeoutId: NodeJS.Timeout | null = null;\n\n      const successCallback = (position: GeolocationPosition) => {\n        if (timeoutId) {\n          clearTimeout(timeoutId);\n        }\n        const { latitude, longitude } = position.coords;\n        resolve({ latitude, longitude });\n      };\n\n      const errorCallback = (error: GeolocationPositionError) => {\n        if (timeoutId) {\n          clearTimeout(timeoutId);\n        }\n        reject(error);\n      };\n\n      navigator.geolocation.getCurrentPosition(successCallback, errorCallback);\n      timeoutId = setTimeout(() => {\n        reject(new Error('Geolocation permission timeout'));\n      }, 5000);\n    });\n\n    if (data) {\n      return data as {\n        latitude: number;\n        longitude: number;\n      };\n    } else {\n      return null;\n    }\n  } catch (error) {\n    console.error('Error:', error);\n    return null;\n  }\n\n  return null;\n};\n\n//get location data from the browser and google maps api\n\nexport const getGeolocationDataFromBrowserAndGoogle = async () => {\n  try {\n    const browserData = await getBrowserGeolocationData();\n\n    if (browserData) {\n      const { latitude, longitude } = browserData as {\n        latitude: number;\n        longitude: number;\n      };\n\n      const locationData = await getLocationDataFromLatLong(\n        latitude,\n        longitude\n      );\n\n      if (locationData?.zip && locationData?.country) {\n        const geolocationData: GeolocationType = {\n          address: '',\n          latitude,\n          longitude,\n          zip: locationData.zip,\n          country: locationData.country\n        };\n\n        updateGeolocationDataProperties(geolocationData);\n\n        return geolocationData;\n      }\n    }\n  } catch (error) {\n    console.error(error);\n  }\n\n  return null;\n};\n\n//Get the latitude and longitude from the zip code using google maps api\n\nexport const getLatLongFromZip = async (zip: string, country: string) => {\n  let countryCode = country;\n\n  if (country.length === 3) {\n    countryCode = country.slice(0, -1);\n  }\n\n  const response = await window.fetch(\n    `https://maps.googleapis.com/maps/api/geocode/json?key=${MAPS_API_KEY}&components=postal_code:${zip}|country:${countryCode}`\n  );\n\n  const data = await response.json();\n\n  if (data.status === 'OK') {\n    const { lat, lng } = data.results[0].geometry.location;\n    const formattedAddress = data.results[0].formatted_address;\n\n    return {\n      latitude: lat,\n      longitude: lng,\n      address: formattedAddress\n    };\n  }\n\n  window.dispatchEvent(new Event(INVALID_GOOGLE_ZIP_EVENT));\n  return {\n    latitude: undefined,\n    longitude: undefined,\n    address: undefined\n  };\n};\n\n//Get the location from the ip address using maxmind geoip2\n\nexport const getLocationByIpAddress = async () => {\n  let result = null;\n\n  try {\n    const newData = await new Promise((resolve, reject) => {\n      const global = window as ExtendedWindowType;\n\n      if (global.geoip2 && global.geoip2.city) {\n        global.geoip2.city(\n          (data: MaxmindResponse) => {\n            const { latitude, longitude } = data.location;\n            const zip = data.postal.code;\n            const country = data.country.iso_code;\n\n            if (zip && country && latitude && longitude) {\n              const locationData: GeolocationType = {\n                address: '',\n                latitude,\n                longitude,\n                zip,\n                country: country.toLowerCase()\n              };\n\n              updateGeolocationDataProperties(locationData);\n\n              resolve(locationData);\n            } else {\n              reject(`Missing parameters`);\n            }\n          },\n          (error: MaxmindErrorResponse) => {\n            reject(`Error Code: ${error.code}, ${error.error}`);\n          }\n        );\n      } else {\n        reject(`geoip2.city is not available`);\n      }\n    });\n\n    result = newData as GeolocationType;\n  } catch (error) {\n    console.error(error);\n  }\n\n  return result;\n};\n\n//get postal code and country code from url\n\nexport const getZipAndCountryFromUrl = () => {\n  const url = new URL(window.location.href);\n  const zip =\n    url.searchParams.get('postalCode') || url.searchParams.get('PostalCode');\n  const country =\n    url.searchParams.get('countryCode') || url.searchParams.get('CountryCode');\n\n  if (zip && country) {\n    return {\n      zip,\n      country: country.toLowerCase()\n    };\n  }\n\n  return null;\n};\n\n//get postal code and country code from url and get lat long from google\n\nexport const INVALID_GOOGLE_ZIP_EVENT = 'invalid-google-zip';\n\nexport const getGeolocationDataFromUrlAndGoogle = async () => {\n  const data = getZipAndCountryFromUrl();\n\n  if (data && data.zip && data.country) {\n    const { latitude, longitude } = await getLatLongFromZip(\n      data.zip,\n      data.country\n    );\n\n    if (latitude && longitude) {\n      const locationData: GeolocationType = {\n        latitude,\n        longitude,\n        zip: data.zip,\n        country: data.country\n      };\n\n      return locationData;\n    } else {\n      setTimeout(() => {\n        window.dispatchEvent(new Event(INVALID_GOOGLE_ZIP_EVENT));\n      }, 500);\n\n      return {\n        latitude: undefined,\n        longitude: undefined,\n        zip: data.zip,\n        country: data.country\n      };\n    }\n  }\n\n  return null;\n};\n\nexport const COUNTRY_VALUES = ['us', 'ca', 'usa', 'can'];\n\n//update a property in the geolocation object\n\nexport const updateGeolocationDataProperty = (key: string, value: string) => {\n  let newGeolocationData: GeolocationType | null = null;\n  const geolocationData = getStoredGeolocationData();\n\n  if (geolocationData) {\n    newGeolocationData = {\n      ...geolocationData,\n      [key]: value\n    };\n  } else {\n    newGeolocationData = {\n      country: '',\n      zip: '',\n      [key]: value\n    } as GeolocationType;\n  }\n\n  secureStorage.set(\n    COOKIE_NAMES.geolocation,\n    JSON.stringify(newGeolocationData)\n  );\n};\n\n//update multiple properties in the geolocation object\n\nexport const updateGeolocationDataProperties = (\n  properties: Partial<GeolocationType>\n) => {\n  let newGeolocationData: GeolocationType | null = null;\n\n  newGeolocationData = {\n    ...properties\n  } as GeolocationType;\n\n  const now = new Date();\n  const time = now.getTime() + GEOLOCATION_EXPIRATION_TIME;\n\n  secureStorage.set(GEOLOCATION_EXPIRATION_KEY, time.toString());\n\n  secureStorage.set(\n    COOKIE_NAMES.geolocation,\n    JSON.stringify(newGeolocationData)\n  );\n};\n","import Cookies from 'cookies-ts';\nimport { COOKIE_NAMES, USER_PERSONALIZATION_KEY } from './global-storage';\nimport modules from '../modules';\nimport create from '@verndale/core';\nimport {\n  getGeolocationDataFromBrowserAndGoogle,\n  getLocationByIpAddress,\n  getStoredGeolocationData\n} from './geolocation';\nimport DOMPurify from 'dompurify';\nimport { ExtendedWindowType } from './global-types';\n\ntype AkGeoType = {\n  postal: string;\n  city: string;\n  fips: string;\n  region: string;\n  country: string;\n  dma: string;\n  msa: string;\n  pmsa: string;\n  lat: number;\n  long: number;\n};\n\nconst _window = window as ExtendedWindowType;\n\nexport const PERSONALIZE_COMPONENT_LOADED_EVENT = 'personalizeComponentLoaded';\n\nconst setPersonaLanguageMap = (persona = true) => {\n  const personalizeMapElement = document.querySelector(\n    '[data-persona-mapping]'\n  ) as HTMLElement;\n\n  let personalizeMap: { [key: string]: string } = {};\n\n  let personalizeLanguage: { [key: string]: [] | '' } = {};\n\n  if (personalizeMapElement) {\n    if (personalizeMapElement.dataset.personaMapping) {\n      personalizeMap = JSON.parse(\n        personalizeMapElement.dataset.personaMapping as string\n      );\n    }\n    if (personalizeMapElement.dataset.languageMapping) {\n      personalizeLanguage = JSON.parse(\n        personalizeMapElement.dataset.languageMapping as string\n      );\n    }\n  }\n  if (persona) {\n    return personalizeMap;\n  }\n\n  return personalizeLanguage;\n};\n\nconst checkContractorCommercialRedirect = (persona: string) => {\n  const contractorRedirect = (\n    document.querySelector('#personalize-contractor') as HTMLDivElement\n  )?.dataset.personalize;\n\n  if (contractorRedirect) {\n    const event = new CustomEvent('commercialChange', {\n      detail: contractorRedirect.split(',').includes(persona)\n    });\n    window.dispatchEvent(event);\n  }\n};\n\nconst checkTerritoryManagerCommercial = (persona: string) => {\n  const territoryRedirect = (\n    document.querySelector('#personalize-territory') as HTMLDivElement\n  )?.dataset.personalize;\n\n  if (territoryRedirect) {\n    const event = new CustomEvent('territoryChange', {\n      detail: territoryRedirect.split(',').includes(persona)\n    });\n\n    window.dispatchEvent(event);\n  }\n};\n\nconst checkDocumentLandingCommercial = (persona: string) => {\n  const documentRedirect = (\n    document.querySelector('#personalize-document-landing') as HTMLDivElement\n  )?.dataset.personalize;\n\n  if (documentRedirect) {\n    const event = new CustomEvent('documentLandingChange', {\n      detail: documentRedirect.split(',').includes(persona)\n    });\n    window.dispatchEvent(event);\n  }\n};\n\nconst languageSelector = (langMapping: {\n  [key: string]: string[] | string;\n}) => {\n  const language: string = window.location.pathname.split('/')[1];\n\n  if (langMapping?.languages?.includes(language)) {\n    return language;\n  } else {\n    return langMapping.default;\n  }\n};\n\nexport const productDetailContent = async (persona: string) => {\n  const personalizeMap = setPersonaLanguageMap();\n  const personalizeLanguage = setPersonaLanguageMap(false);\n\n  const replaceContentPdp = document.querySelector(\n    '#personalize-pdp'\n  ) as HTMLDivElement;\n\n  if (replaceContentPdp && personalizeMap?.productDetailFull) {\n    const personalizationData = {\n      channel: 'WEB',\n      currency: 'USD',\n      pointOfSale: _window.Engage?.settings?.pointOfSale,\n      friendlyId: personalizeMap.productDetailFull as string,\n      // optional attributes:\n      params: {\n        zipCode: persona,\n        language: languageSelector(personalizeLanguage)\n      }\n    };\n\n    const response = await (window as ExtendedWindowType).engage.personalize(\n      personalizationData\n    );\n\n    const divToInsert = document.querySelector(\n      replaceContentPdp.dataset.personalize as string\n    );\n\n    if (divToInsert) {\n      if (response?.html) {\n        divToInsert.innerHTML = DOMPurify.sanitize(response.html);\n      } else {\n        divToInsert.innerHTML = '';\n      }\n    }\n  }\n};\n\nexport const stormRules = async (zip: string) => {\n  const storm = document.querySelector('#personalize-storm-rule');\n  const personalizeMap = setPersonaLanguageMap();\n  const personalizeLanguage = setPersonaLanguageMap(false);\n\n  if (personalizeMap?.stormRule && storm) {\n    const personalizationData = {\n      channel: 'WEB',\n      currency: 'USD',\n      pointOfSale: _window.Engage?.settings?.pointOfSale,\n      friendlyId: personalizeMap?.stormRule as string,\n      // optional attributes:\n      params: {\n        zipCode: zip,\n        language: languageSelector(personalizeLanguage)\n      }\n    };\n\n    const response = await (window as ExtendedWindowType).engage.personalize(\n      personalizationData\n    );\n\n    if (\n      response.stormRuleButton &&\n      !window.location.href.includes(response.stormRuleButton.url)\n    ) {\n      window.location.href = response.stormRuleButton.url as string;\n    }\n  }\n};\n\nexport const codeRuleRedirect = async (zip: string) => {\n  const personalizeMap = setPersonaLanguageMap();\n  const personalizeLanguage = setPersonaLanguageMap(false);\n\n  const codeRuleRedirect = document.querySelector(\n    '#personalize-code-rule-redirect'\n  );\n\n  if (personalizeMap?.codeRuleRedirect && codeRuleRedirect) {\n    const personalizationData = {\n      channel: 'WEB',\n      currency: 'USD',\n      pointOfSale: _window.Engage?.settings?.pointOfSale,\n      friendlyId: personalizeMap.codeRuleRedirect as string,\n      // optional attributes:\n      params: {\n        zipCode: zip,\n        language: languageSelector(personalizeLanguage)\n      }\n    };\n\n    const response = await (window as ExtendedWindowType).engage.personalize(\n      personalizationData\n    );\n\n    if (\n      response?.codeRuleButton &&\n      !window.location.href.includes(response.codeRuleButton.url)\n    ) {\n      window.location.href = response.codeRuleButton.url as string;\n    }\n  }\n};\n\nconst runFullStackExperience = async () => {\n  const personalizeMap = setPersonaLanguageMap();\n  const personalizeLanguage = setPersonaLanguageMap(false);\n\n  handleStormCodeRules();\n  let redirect = false;\n  let existingCookie = new Cookies().get(USER_PERSONALIZATION_KEY);\n\n  const persona = document.querySelector('#persona') as HTMLDivElement;\n\n  if (persona?.dataset?.personalize && !existingCookie) {\n    existingCookie = persona?.dataset?.personalize;\n    new Cookies().set(USER_PERSONALIZATION_KEY, existingCookie, {\n      expires: 60 * 60 * 24 * 30\n    });\n  }\n\n  const homePersona =\n    (document.querySelector('#personalize-home') as HTMLDivElement)?.dataset\n      .personalize || '';\n\n  if (existingCookie) {\n    if (homePersona === 'default') {\n      redirect = true;\n    } else {\n      checkContractorCommercialRedirect(existingCookie);\n      checkTerritoryManagerCommercial(existingCookie);\n      checkDocumentLandingCommercial(existingCookie);\n      productDetailContent(existingCookie);\n    }\n  }\n\n  const linksToHome = Array.from(\n    document.querySelectorAll<HTMLAnchorElement>('a[href=\"/\"]')\n  );\n\n  (personalizeLanguage?.languages as [])?.forEach((lang: string) => {\n    const languageLinks = Array.from(\n      document.querySelectorAll<HTMLAnchorElement>(`a[href=\"/${lang}/\"]`)\n    );\n    linksToHome.push(...languageLinks);\n  });\n\n  _window.linksToHome = linksToHome;\n\n  if (personalizeMap?.homeUrl) {\n    const personalizationData = {\n      channel: 'WEB',\n      currency: 'USD',\n      pointOfSale: _window.Engage?.settings?.pointOfSale,\n      friendlyId: personalizeMap.homeUrl as string,\n      // optional attributes:\n      params: {\n        person_type: existingCookie ? existingCookie : ''\n      }\n    };\n\n    const response = await (window as ExtendedWindowType).engage.personalize(\n      personalizationData\n    );\n\n    if (response?.url) {\n      if (!window.location.href.includes(response.url) && redirect) {\n        window.location.href = response.url;\n      } else {\n        _window.linksToHome?.forEach(element =>\n          element.setAttribute('href', response.url as string)\n        );\n      }\n    }\n  }\n};\n\nconst handleStormCodeRules = async () => {\n  const data = getStoredGeolocationData();\n  if (data) {\n    stormRules(data.zip);\n    codeRuleRedirect(data.zip);\n  } else {\n    const google = await getGeolocationDataFromBrowserAndGoogle();\n    if (google) {\n      stormRules(google.zip);\n      codeRuleRedirect(google.zip);\n    } else {\n      const maxmind = await getLocationByIpAddress();\n      if (maxmind) {\n        stormRules(maxmind.zip);\n        codeRuleRedirect(maxmind.zip);\n      }\n    }\n  }\n};\n\nexport const personalizeAddressData = async (_body: object) => {\n  const personalizeMap = setPersonaLanguageMap();\n\n  if (personalizeMap) {\n    const personalizationData = {\n      channel: 'WEB',\n      currency: 'USD',\n      pointOfSale: _window.Engage?.settings?.pointOfSale,\n      friendlyId: personalizeMap.addressData as string,\n      // optional attributes:\n      params: {\n        body: _body\n      }\n    };\n\n    await (window as ExtendedWindowType).engage.personalize(\n      personalizationData\n    );\n  }\n};\n\nexport const codeRule = async (zip: string) => {\n  const personalizeMap = setPersonaLanguageMap();\n  const personalizeLanguage = setPersonaLanguageMap(false);\n\n  if (personalizeMap?.codeRule) {\n    const personalizationData = {\n      channel: 'WEB',\n      currency: 'USD',\n      pointOfSale: _window.Engage?.settings?.pointOfSale,\n      friendlyId: personalizeMap.codeRule as string,\n      // optional attributes:\n      params: {\n        zipCode: zip,\n        language: languageSelector(personalizeLanguage)\n      }\n    };\n\n    const response = await (window as ExtendedWindowType).engage.personalize(\n      personalizationData\n    );\n\n    return response;\n  }\n  return;\n};\n\nexport const dispatchPersonaViewEvent = () => {\n  const _window = window as ExtendedWindowType;\n\n  //get page url\n  const url = window.location.href;\n  //get language from url. Ex: https://www.example.com/en-us/ => en-us\n  let language = url.split('/')[3];\n\n  //check if language has language format using refex. Ex: en-us\n  if (language && !/^[a-z]{2}-[a-z]{2}$/.test(language)) {\n    language = '';\n  }\n\n  if (!language) {\n    url.includes('.ca') ? (language = 'en-ca') : (language = 'en-us');\n  }\n\n  const cookieManager = new Cookies();\n  const personaCookie = cookieManager.get(COOKIE_NAMES.persona);\n  const akGeo = cookieManager.get('ak_geo') as unknown as AkGeoType;\n  let zip = '';\n\n  if (akGeo?.postal) {\n    zip = akGeo.postal.split('-')[0];\n  }\n\n  const event = {\n    channel: 'WEB',\n    language,\n    currency: 'USD',\n    page: url\n  };\n  const extensionData = {\n    state: akGeo?.region || '',\n    city: akGeo?.city || '',\n    zipCode: zip || '',\n    dmaRegionCode: akGeo?.dma || '',\n    metroCode: akGeo?.msa || '',\n    pmsaCode: akGeo?.pmsa || '',\n    country: akGeo?.country || '',\n    fips: akGeo?.fips || '',\n    personaName: personaCookie || '',\n    language\n  };\n  // Send VIEW event\n  if (_window.engage) {\n    _window.engage.pageView(event, extensionData);\n  }\n};\n\nlet savedZip = '';\n\nexport const shingleDetailContent = async (zip: string, persona?: string) => {\n  const personalizeMap = setPersonaLanguageMap();\n  const personalizeLanguage = setPersonaLanguageMap(false);\n  let _persona = '';\n\n  if (zip) {\n    savedZip = zip;\n  }\n\n  const savedPersona = new Cookies().get(USER_PERSONALIZATION_KEY);\n  if (!persona && savedPersona) {\n    _persona = savedPersona;\n  } else if (persona) {\n    _persona = persona;\n  }\n  const replaceContentShingle = document.querySelector(\n    '#personalize-shingle-code-rule'\n  ) as HTMLDivElement;\n\n  if (replaceContentShingle && personalizeMap?.productShingleFull) {\n    const personalizationData = {\n      channel: 'WEB',\n      currency: 'USD',\n      pointOfSale: _window.Engage?.settings?.pointOfSale,\n      friendlyId: personalizeMap.productShingleFull as string,\n      // optional attributes:\n      params: {\n        zipCode: savedZip,\n        persona: _persona,\n        language: languageSelector(personalizeLanguage)\n      }\n    };\n\n    const response = await (window as ExtendedWindowType).engage.personalize(\n      personalizationData\n    );\n\n    const divToInsert = document.querySelector(\n      (replaceContentShingle as HTMLElement).dataset.personalize as string\n    );\n\n    if (divToInsert) {\n      if (response?.html) {\n        divToInsert.innerHTML = DOMPurify.sanitize(response.html);\n      } else {\n        divToInsert.innerHTML = '';\n      }\n    }\n  }\n};\n\nexport const handlePersonalizeComponentLoaded = (e: CustomEventInit) => {\n  const elementId = e.detail.id;\n  const element = document.getElementById(elementId);\n\n  if (element) {\n    const elementDataModule = element.dataset.module;\n    const childrenWithModule =\n      (element.querySelectorAll('[data-module]') as NodeListOf<HTMLElement>) ||\n      [];\n\n    const modulesName = [elementDataModule];\n\n    childrenWithModule.forEach(child => {\n      const dataModule = child.dataset.module;\n\n      if (dataModule) {\n        modulesName.push();\n      }\n    });\n\n    const modulesToLoad = modules.filter(module =>\n      modulesName.includes(module.name)\n    );\n\n    create(modulesToLoad);\n  }\n};\n\nexport const handleChangePersona = async (persona: string) => {\n  new Cookies().set(USER_PERSONALIZATION_KEY, persona, {\n    expires: 60 * 60 * 24 * 30\n  });\n\n  const isHome =\n    (document.querySelector('#personalize-home') as HTMLDivElement)?.dataset\n      .personalize || '';\n\n  const personalizeMap = setPersonaLanguageMap();\n\n  if (personalizeMap?.homeUrl) {\n    const personalizationData = {\n      channel: 'WEB',\n      currency: 'USD',\n      pointOfSale: _window.Engage?.settings?.pointOfSale,\n      friendlyId: personalizeMap.homeUrl as string,\n      // optional attributes:\n      params: {\n        person_type: persona\n      }\n    };\n\n    const response = await (window as ExtendedWindowType).engage.personalize(\n      personalizationData\n    );\n\n    if (response?.url) {\n      if (isHome !== '' && !window.location.href.includes(response.url)) {\n        window.location.href = response.url;\n      } else {\n        _window.linksToHome?.forEach(element =>\n          element.setAttribute('href', response.url as string)\n        );\n      }\n    }\n  }\n\n  checkContractorCommercialRedirect(persona);\n  checkTerritoryManagerCommercial(persona);\n  checkDocumentLandingCommercial(persona);\n  productDetailContent(persona);\n};\n\nconst initPersonalize = () => {\n  const settings = _window.personalizeSettings;\n  if (settings) {\n    _window.Engage.init(settings).then(e => {\n      _window.engage = e;\n      dispatchPersonaViewEvent();\n      runFullStackExperience();\n    });\n  } else {\n    console.error('Personalize settings not found');\n  }\n};\n\nexport const initPersonalizeActions = () => {\n  if (_window.Engage) {\n    initPersonalize();\n  } else {\n    const retryInterval = setInterval(() => {\n      if (_window.Engage) {\n        initPersonalize();\n        clearInterval(retryInterval);\n      }\n    }, 100);\n  }\n};\n","import 'focus-visible';\nimport create from '@verndale/core';\nimport modules from './modules';\nimport Rtf from './modules/rtf';\nimport {\n  emailClick,\n  phoneClick,\n  detectScrollThresholds,\n  detectSectionIsVisible\n} from './helpers/helpers';\nimport {\n  QUIZ_RESULT_NAMES,\n  getSummaryResults\n} from './react-components/quiz-results/helpers';\nimport { secureStorage } from './helpers/global-storage';\nimport {\n  handlePersonalizeComponentLoaded,\n  initPersonalizeActions,\n  PERSONALIZE_COMPONENT_LOADED_EVENT\n} from './helpers/personalize';\nimport { ExtendedWindowType } from './helpers/global-types';\n\n//Backend dispatch this event when the personalize component is loaded. Code is in personalize platform.\nwindow.addEventListener(\n  PERSONALIZE_COMPONENT_LOADED_EVENT,\n  handlePersonalizeComponentLoaded\n);\n\ninitPersonalizeActions();\n\nexport const initRtf = () => {\n  const rtfs = document.querySelectorAll<HTMLElement>('.rtf');\n\n  rtfs?.forEach(rtf => {\n    new Rtf(rtf);\n  });\n};\n\nexport const expireStorage = () => {\n  const now = new Date();\n  const userProfileExpiration = secureStorage.get('userProfileExpiration');\n  const geolocationExpiration = secureStorage.get('geolocationExpiration');\n\n  if (userProfileExpiration) {\n    const userProfileExpirationDate = new Date(+userProfileExpiration);\n    if (now > userProfileExpirationDate) {\n      window.localStorage.removeItem('userProfile');\n      window.localStorage.removeItem('userProfileExpiration');\n    }\n  }\n\n  if (geolocationExpiration) {\n    const geolocationExpirationDate = new Date(+geolocationExpiration);\n    if (now > geolocationExpirationDate) {\n      window.localStorage.removeItem('geolocation');\n      window.localStorage.removeItem('geolocationExpiration');\n    }\n  }\n\n  const quizzesResults = getSummaryResults();\n  if (quizzesResults) {\n    const { contractorResults, costEstimateResults, shingleResults } =\n      quizzesResults;\n\n    if (contractorResults?.expirationDate) {\n      const contractorResultsExpirationDate = new Date(\n        contractorResults.expirationDate\n      );\n      if (now > contractorResultsExpirationDate) {\n        window.localStorage.removeItem(QUIZ_RESULT_NAMES.contractor);\n      }\n    }\n\n    if (costEstimateResults?.expirationDate) {\n      const costEstimateResultsExpirationDate = new Date(\n        costEstimateResults.expirationDate\n      );\n      if (now > costEstimateResultsExpirationDate) {\n        window.localStorage.removeItem(QUIZ_RESULT_NAMES.costEstimates);\n      }\n    }\n\n    if (shingleResults?.expirationDate) {\n      const shingleResultsExpirationDate = new Date(\n        shingleResults.expirationDate\n      );\n      if (now > shingleResultsExpirationDate) {\n        window.localStorage.removeItem(QUIZ_RESULT_NAMES.shingle);\n      }\n    }\n  }\n};\n\nconst isStorybook = !!document.getElementById('storybook-root');\nconst body = document.querySelector('body') as HTMLBodyElement;\nconst _window = window as ExtendedWindowType;\n\nconst pushSection = (e: IntersectionObserverEntry) => {\n  const info = (e.target as HTMLElement).dataset.layerVisible;\n  if (info) {\n    const infoObj = JSON.parse(info);\n    const prevData = _window?.dataLayer?.find(\n      obj =>\n        (obj as { event_category: string; event_action: string })\n          .event_category === infoObj.event_category &&\n        (obj as { event_category: string; event_action: string })\n          .event_action === infoObj.event_action\n    );\n    if (!prevData) {\n      _window.dataLayer.push(infoObj);\n    }\n  }\n};\n\nconst setIphoneViewport = () => {\n  if (navigator.userAgent.indexOf('iPhone') > -1) {\n    document\n      .querySelector('[name=viewport]')\n      ?.setAttribute(\n        'content',\n        'width=device-width, initial-scale=1, maximum-scale=1'\n      );\n  }\n};\n\nconst pushDataLayer = (e: Event) => {\n  const dataset =\n    ((e.target as HTMLElement)?.closest('[data-layer]') as HTMLElement)\n      ?.dataset || (e.target as HTMLElement)?.dataset;\n  if (dataset.layer) {\n    const datasetLayers = JSON.parse(dataset.layer as string);\n    datasetLayers?.forEach((layer: { event: string }) => {\n      if (dataset.oneTime) {\n        const prevData = _window?.dataLayer?.find(\n          obj => (obj as { event: string }).event === layer.event\n        );\n        if (!prevData) {\n          _window.dataLayer.push(layer);\n        }\n      } else {\n        _window.dataLayer.push(layer);\n      }\n    });\n  }\n\n  phoneClick(e);\n  emailClick(e);\n};\n\ndocument.addEventListener(\n  'DOMContentLoaded',\n  async () => {\n    if (!body.dataset.modulesLoaded || isStorybook) {\n      expireStorage();\n      create(modules).then(() => {\n        body.dataset.modulesLoaded = 'true';\n        setIphoneViewport();\n        initRtf();\n        window.addEventListener('click', e => pushDataLayer(e));\n        detectScrollThresholds();\n        detectSectionIsVisible(pushSection, '[data-layer-visible]');\n      });\n    }\n  },\n  false\n);\n","import DOMPurify from 'dompurify';\n\ntype SvgXHRProps = {\n  filename: string;\n};\n\nconst svgXHR = (options: SvgXHRProps) => {\n  let url: string | undefined = undefined;\n  let baseUrl: string | undefined = undefined;\n\n  options && options.filename ? (url = options.filename) : null;\n\n  if (!url) return;\n  let _ajax = new XMLHttpRequest();\n\n  if (typeof XMLHttpRequest !== 'undefined') {\n    _ajax = new XMLHttpRequest();\n  }\n\n  if (typeof baseUrl === 'undefined') {\n    if (typeof baseUrl !== 'undefined') {\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      baseUrl = (window as any).baseUrl;\n    } else {\n      baseUrl =\n        window.location.protocol +\n        '//' +\n        window.location.hostname +\n        (window.location.port ? ':' + window.location.port : '');\n    }\n  }\n\n  const _fullPath = (baseUrl + '/' + url).replace(/([^:]\\/)\\/+/g, '$1');\n  _ajax.open('GET', _fullPath, true);\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  _ajax.onprogress = function () {};\n  _ajax.onload = function () {\n    if (_ajax.status < 200 || _ajax.status >= 300) {\n      return;\n    }\n\n    if (!_ajax.responseText || _ajax.responseText.substr(0, 5) !== '<?xml') {\n      throw Error('Invalid SVG Response');\n    }\n\n    const div = document.createElement('div');\n    const cleanHtml = DOMPurify.sanitize(_ajax.responseText);\n    div.innerHTML = cleanHtml;\n    div.style.maxBlockSize = '0';\n    div.style.maxWidth = '0';\n    div.style.overflow = 'hidden';\n    div.id = 'svg-sprite';\n\n    domready(() => {\n      if ((document.body.childNodes[0] as HTMLElement)?.id !== 'svg-sprite') {\n        document.body.insertBefore(div, document.body.childNodes[0]);\n      }\n    });\n  };\n  _ajax.send();\n};\n\nconst domready = (callback: () => void) => {\n  if (\n    document.readyState === 'complete' ||\n    document.readyState === 'interactive'\n  ) {\n    callback();\n  } else {\n    document.addEventListener('DOMContentLoaded', callback);\n  }\n};\n\nexport default svgXHR;\n","// Public path\n// if set, make sure it ends with /\n// e.g. 'assets/'\nexport const PUBLIC_PATH = 'Areas/GAF/';\n\nexport default {\n  // Directory names\n  get dir() {\n    return {\n      source: 'src',\n\n      assets: {\n        html: 'html',\n        scripts: 'scripts',\n        scss: 'scss',\n        static: 'static',\n        svgSprites: 'svg-sprites',\n        stories: 'stories',\n        htmlTemplates: 'templates',\n        htmlModules: 'modules',\n        htmlComponents: 'components'\n      },\n\n      // Asset paths\n      get paths() {\n        return {\n          // source\n          srcStatic: `${this.source}/${this.assets.static}`,\n          srcScripts: `${this.source}/${this.assets.scripts}`,\n          srcStyles: `${this.source}/${this.assets.scss}`,\n          srcHtml: `${this.source}/${this.assets.html}`,\n          srcSvgSprites: `${this.source}/${this.assets.static}/${this.assets.svgSprites}`,\n          srcStories: `${this.source}/${this.assets.stories}`,\n          // scaffold\n          srcTemplates: `${this.source}/${this.assets.html}/${this.assets.htmlTemplates}`,\n          storyTemplates: `${this.source}/${this.assets.stories}/${this.assets.htmlTemplates}`,\n          srcModules: `${this.source}/${this.assets.html}/${this.assets.htmlModules}`,\n          storyModules: `${this.source}/${this.assets.stories}/${this.assets.htmlModules}`,\n          srcComponents: `${this.source}/${this.assets.html}/${this.assets.htmlComponents}`,\n          storyComponents: `${this.source}/${this.assets.stories}/${this.assets.htmlComponents}`\n        };\n      }\n    };\n  }\n};\n","import 'vite/modulepreload-polyfill';\nimport './src/scripts/index';\nimport svgxhr from './src/scripts/helpers/svgxhr';\nimport.meta.glob('./src/static/images/**/*');\nimport { PUBLIC_PATH } from './config';\n\nsvgxhr({ filename: `${PUBLIC_PATH}images/svgsheet.svg` });\n"],"file":"Areas/GAF/scripts/main-ace90804.bundle.js"}