{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/src/js/utils/string-utils.js","webpack:///./assets/src/js/modules/awning-configurator/utils/configuration-utils.js","webpack:///./assets/src/js/modules/awning-configurator/steps/model.js","webpack:///./assets/src/js/awning-configurator.js","webpack:///./assets/src/js/modules/awning-configurator/utils/constants.js","webpack:///./assets/src/js/utils/cart-utils.js","webpack:///./assets/src/js/modules/awning-configurator/steps/series.js","webpack:///./assets/src/js/modules/awning-configurator/utils/cart-utils.js","webpack:///./assets/src/js/utils/ga-ecommerce-utils.js","webpack:///./assets/src/js/modules/awning-configurator/steps/fabric.js","webpack:///./assets/src/js/modules/content-toggle.js","webpack:///./assets/src/js/utils/scrolling-utils.js","webpack:///./assets/src/js/utils/session-storage-utils.js","webpack:///./assets/src/js/modules/awning-configurator/steps/mount.js","webpack:///./assets/src/js/modules/awning-configurator/steps/frame-color.js","webpack:///./assets/src/js/modules/awning-configurator/steps/projection.js","webpack:///./assets/src/js/modules/awning-configurator/utils/validation-utils.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","capitalizeFirstLetter","str","charAt","toUpperCase","slice","encodeKebabCase","toLowerCase","replace","formatInDollars","num","toFixed","toString","isJson","JSON","parse","e","getHeaderOffset","header","document","querySelector","offsetHeight","getAvailableOptions","querySelectorAll","step","isStepHidden","length","isStepOnPage","getElementById","resetStepSelections","optionList","map","item","checked","scrollToError","setTimeout","offset","element","scrollToElement","scrollToSection","state","model","getModelContentDivByName","toggleStepAvailability","options","stepWrappers","classList","remove","add","optionIpt","indexOf","toggleOptionStepsAvailability","toggleStepByName","status","toggleStepTitleByName","stepTitle","updateAvailableStepNums","stepHeaders","filter","closest","forEach","index","textContent","isProUpgradable","modelCode","fabricCollection","includes","isProModel","id","getModelDataByCode","code","callback","scope","Promise","resolve","reject","fetch","method","then","response","ok","json","catch","console","error","getModelSteps","data","hideAllModels","btnList","contentList","btn","setAttribute","content","updateContentHeight","showFirstModel","showModelByName","updateModelButtonLabels","active","series","option","size","getAttribute","selector","updateModelsBySeries","hidePrices","window","wrapper","text","getModels","innerHTML","AwningConfigurator","this","aluminumHood","aluminumHoodUpgrade","cordSide","fabric","fabricCode","frameColor","hasFrameColorOpt","itemNumber","isCostco","masonryKit","mount","price","scrollToModels","projection","projectionUpgrade1","projectionUpgrade2","projectionUpgradeModel","projectionUpgradeSelected","projectionWithProUpgradeModel","proUpgrade","proUpgradeFabrics","proUpgradeModel","rafterAdapterBrackets","sstDescription","sstDiscount","valanceStyle","variantCode","led","modelData","na","sessionStorageKey","swatchesJs","init","addEventListener","event","optionBtn","target","Constants","resetProperty","setState","render","continueBtn","preventDefault","getState","validate","addAwningToSstParamList","removeAttribute","href","location","getAwningItemNumber","saveToSession","stringify","addToEpiCart","sstUnitDiscount","sstUnitPrice","addAwningToGtmDataLayer","log","success","alert","saveSelectionsErrorMessage","initializeFabricDataAttributes","resetInputs","keys","key1","key2","proScreenColor","proFsColor","pro","resetMountUI","prop","that","f","updateProjectionUpgradeOptions","continue","resetStateForSeriesSelection","updateSeriesWrapper","updateSeriesButtonLabels","updateSeriesHeading","resetStateForModelSelection","defaultFabricCollection","getCollectionNameFromHash","updateCollectionsBySeries","updateSelectedCollection","getSwatchesJs","activeCollection","getSelectedCollection","updateCollection","fabricOptions","getSelectedFabricOptions","onModelDataReceived","updateSoffitBracketPrice","updateAluminumHoodPrice","sunsetterLaminated","isValanceAvailable","waveValance","updateFrameColorUI","updateProjectionUI","updateMountUI","updateAluminumHoodUI","selectedSeries","getActiveSeriesBtn","getEpiCartItems","url","protocol","hostname","headers","accept","removeFromEpiCart","seriesBtns","activeSeriesElement","activeLabel","getActiveLabel","defaultLabel","getDefaultLabel","seriesLabel","substr","stepTitleHtml","getPrice","shortColl","encodeModelCode","getUrlParam","pushToDataLayer","ecommerce","items","item_id","item_name","affiliation","coupon","currency","discount","item_brand","item_category","item_category2","item_category3","item_category4","item_category5","item_list_id","item_list_name","item_variant","location_id","quantity","p1","props","propName","substring","lastIndexOf","convertPropsToUrlParams","fabricName","hood","modelName","Math","floor","getProductVariantCode","appendOptionParamsToProductVariantCode","checkedInputs","input","dataLayer","push","getEventData","checkout","addPaymentInfo","paymentType","addShippingInfo","gaAddToCart","type","viewCart","viewItem","viewItemList","category","fabricCollectionNav","fabricCollectionNavItems","fabricCollectionSelect","fabricCollectionSelectOptions","navItemCt","collectionName","selectedSwatch","fabricSwatchList","ipt","label","fabricList","match","find","tab","parentNode","panelId","panel","selectedVal","filteredNavCt","updateNavAlignment","selectedTab","resetSelectedCollectionAndFabric","tabId","prevSelectedOptions","updateSelectedOption","col","updateOasisFabrics","getContentHeight","innerDiv","parseInt","getComputedStyle","paddingBottom","initContentToggle","expand","ariaControls","openLabel","style","height","toggleContent","closedLabel","close","contentToggleBtns","position","y","offsetTop","scrollTo","top","behavior","retreiveFromSession","sessionStorage","getItem","setItem","expandedContent","aluminumHoodDiv","isAluminumDiv","getAluminumHoodPrice","costcoPrice","listPrice","aluminumHoodListPrice","aluminumHoodCostcoPrice","aluminumHoodSavingsPrice","rafterBracketPrice","getSoffitBracketPrice","selectedOption","img","src","upgrades","div","validProps","costcoValidProps","stepErrors","invalidProps","arr","getInvalidProps","valid","v","isValid","visibleErrors"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAM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ACXC,YAAWA,EACX5E,OAAMA,EACNiF,OAAMA,EACNG,YAAWA,EACXzB,MAAKA,EACLqC,cAAaA,G,EAsDbmB,SAxBe,SAACpH,GAAW,IACrBuT,EAAa5U,SAASI,iBAAiB,qBACvCyU,EA7BgB,SAACxT,GAAW,IAC5ByT,EAAM,GAENnG,EADetN,EAAbgF,SACiBsO,EAAmBD,EAS5C,OARAlX,OAAOmM,KAAKgF,GAAOlM,SAAQ,SAACpE,GACP,KAAf,EAAMA,IACRsQ,EAAMtQ,IAAN,EACAyW,EAAIpF,KAAKrR,IAETsQ,EAAMtQ,IAAN,KAGGyW,EAiBcC,CAAgB1T,GAC/B2T,EAfQ,SAAC3T,GAAW,IACtB4T,KAEEtG,EADetN,EAAbgF,SACiBsO,EAAmBD,EAM5C,OALAlX,OAAOmM,KAAKgF,GAAOlM,SAAQ,SAACpE,GACrBsQ,EAAMtQ,KACT4W,SAGGA,EAMOC,CAAQ7T,GAUtB,GATA2C,QAAQqF,IAAIwL,GACZ,GAAGjU,IAAI3D,KAAK2X,GAAY,SAAC/T,GACvB,IAAMR,EAAOQ,EAAKqE,aAAa,oBACK,IAAhC,EAAanD,QAAQ1B,GAGvBQ,EAAKc,UAAUE,IAAI,UAFnBhB,EAAKc,UAAUC,OAAO,cAKrBoT,EAAO,CACV,IAAMG,EAAgBnV,SAASI,iBAAiB,kCAChD,GAA2B,EAAvB,EAAcG,OAAY,CAC5B,IAAMF,EAAO8U,EAAc,GAAGjQ,aAAa,oBAC3C,IAAAnE,eAAcV,IAGlB,OAAO2U","file":"awning-configurator.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","const encodeKebabCase = (str) => {\n if (!str) {\n return '';\n }\n return str.toLowerCase().replace(/\\s/g, '-');\n};\n\nconst formatInDollars = num => (\n `$${num.toFixed(2).toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')}`\n);\n\nconst capitalizeFirstLetter = str => (\n str.charAt(0).toUpperCase() + str.slice(1)\n);\n\nconst isJson = (str) => {\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n};\n\nexport {\n capitalizeFirstLetter,\n encodeKebabCase,\n formatInDollars,\n isJson,\n};\n","/* eslint-disable no-console */\nimport { getModelContentDivByName } from '../steps/model';\nimport { scrollToElement } from '../../../utils/scrolling-utils';\n\nconst getHeaderOffset = () => {\n const header = document.querySelector('.primary-nav-wrapper');\n if (header !== null) {\n return (header.offsetHeight + 15) * -1;\n }\n return 0;\n};\n\nconst scrollToSection = (name, state) => {\n const { model } = state;\n setTimeout(() => {\n // Get offset for fixed header\n const offset = getHeaderOffset();\n // Check if model, scroll to model w/in accordion\n let element = document.querySelector(`[data-step=\"${name}\"]`);\n if (name === 'model' && model !== '') {\n element = getModelContentDivByName(model);\n }\n scrollToElement({\n element,\n offset,\n });\n }, 100);\n};\n\nconst scrollToError = (name) => {\n setTimeout(() => {\n // Get offset for fixed header\n const offset = getHeaderOffset();\n const element = document.querySelector(`[data-step-error=\"${name}\"]`);\n scrollToElement({\n element,\n offset,\n });\n }, 100);\n};\n\nconst toggleOptionStepsAvailability = (step, options) => {\n // Get all options in step\n const optionList = document.querySelectorAll(`[data-step=\"${step}\"] .option-item`);\n [].map.call(optionList, (item) => {\n const optionIpt = item.querySelector('input');\n if (options.indexOf(optionIpt.value) !== -1) {\n item.classList.remove('hidden');\n } else {\n item.classList.add('hidden');\n }\n });\n};\n\nconst resetStepSelections = (step) => {\n // Get all options in step\n const optionList = document.querySelectorAll(`[data-step=\"${step}\"] .option-item, [data-step=\"${step}\"] .swatch-checkbox`);\n [].map.call(optionList, (item) => {\n const optionIpt = item.querySelector('input');\n optionIpt.checked = false;\n });\n};\n\n\nconst isProUpgradable = (modelCode, fabricCollection) => {\n const xx = ['M', 'MXL', 'M-P', 'MXL-P', '8--2', '8--6'];\n return xx.includes(modelCode) && fabricCollection.indexOf('Laminated') > -1;\n};\n\nconst isProModel = (modelCode) => {\n const xx = ['MPROXL', 'MPRO', 'MPRO-P', 'MPROXL-P', '8--4', '8--7'];\n return xx.includes(modelCode);\n};\n\nconst isStepHidden = step => (\n document.querySelectorAll(`[data-step=\"${step}\"].hidden`).length > 0\n);\n\nconst getAvailableOptions = step => (\n document.querySelectorAll(`[data-step=\"${step}\"]:not(.hidden)`)\n);\n\nconst toggleStepAvailability = (step, options) => {\n const stepWrappers = document.querySelectorAll(`[data-step=\"${step}\"]`);\n if (stepWrappers.length === 0) {\n return;\n }\n [].map.call(stepWrappers, (item) => {\n if (options.length > 1) {\n item.classList.remove('hidden');\n } else {\n item.classList.add('hidden');\n }\n });\n toggleOptionStepsAvailability(step, options);\n};\n\nconst toggleStepByName = (name, status) => {\n const stepWrappers = document.querySelectorAll(`[data-step=\"${name}\"]`);\n [].map.call(stepWrappers, (step) => {\n if (status === 'show') {\n step.classList.remove('hidden');\n } else {\n step.classList.add('hidden');\n }\n });\n};\n\nconst toggleStepTitleByName = (name, status) => {\n const stepTitle = document.querySelector(`.build-awning-step-heading[data-step=\"${name}\"]`);\n if (status === 'show' && stepTitle) {\n stepTitle.classList.remove('hidden');\n } else if (status === 'hide' && stepTitle) {\n stepTitle.classList.add('hidden');\n }\n};\n\nconst updateAvailableStepNums = () => {\n const stepHeaders = document.querySelectorAll('.build-awning-step-heading .step-num');\n const availableSteps = [].filter.call(stepHeaders, step => step.closest('[data-step]:not(.hidden)'));\n availableSteps.forEach((step, index) => {\n step.textContent = index + 1;\n });\n};\n\nconst isStepOnPage = step => (\n document.getElementById(step) !== null\n);\n\nexport {\n getAvailableOptions,\n isStepHidden,\n isStepOnPage,\n resetStepSelections,\n scrollToError,\n scrollToSection,\n toggleStepAvailability,\n toggleStepByName,\n toggleStepTitleByName,\n updateAvailableStepNums,\n isProUpgradable,\n isProModel,\n};\n/* eslint-enable no-console */\n","/* eslint-disable no-console */\nimport { encodeKebabCase } from '../../../utils/string-utils';\nimport { updateContentHeight } from '../../content-toggle';\n\nconst getModelContentDivByName = (name) => {\n const id = encodeKebabCase(name);\n return document.querySelector(`[aria-controls=\"${id}-content\"]`);\n};\n\nconst showModelByName = (name) => {\n const id = encodeKebabCase(name);\n const btn = document.querySelector(`[aria-controls=\"${id}-content\"]`);\n const content = document.getElementById(`${id}-content`);\n btn.setAttribute('aria-expanded', 'true');\n content.classList.add('expand-content');\n updateContentHeight();\n};\n\nconst showFirstModel = () => {\n const btn = document.querySelectorAll('#pricingContentWrapper .content-toggle-btn')[0];\n const content = document.querySelectorAll('#pricingContentWrapper .content-toggle-content')[0];\n btn.setAttribute('aria-expanded', 'true');\n content.classList.add('expand-content');\n updateContentHeight();\n};\n\nconst hideAllModels = () => {\n const btnList = document.querySelectorAll('#pricingContentWrapper .content-toggle-btn');\n const contentList = document.querySelectorAll('#pricingContentWrapper .content-toggle-content');\n [].map.call(btnList, (btn) => {\n btn.setAttribute('aria-expanded', 'false');\n });\n [].map.call(contentList, (content) => {\n content.classList.remove('expand-content');\n });\n updateContentHeight();\n};\n\nconst updateModelButtonLabels = (state) => {\n const { active, series } = state;\n const { element, option } = active;\n const btnList = document.querySelectorAll(`[data-awning-option=\"${option}\"]`);\n [].map.call(btnList, (btn) => {\n const size = btn.getAttribute('data-size');\n if (btn === element) {\n btn.classList = 'button-transparent';\n btn.textContent = `${size}ft. Awning Selected`;\n btn.closest('tr').classList.add('active');\n } else {\n let selector = 'button-reset button-dark-blue-lg';\n if (series === 'SunSetter Series Awnings') {\n selector = 'button-reset button-light-yellow-lg';\n }\n btn.classList = selector;\n btn.textContent = `Build My ${size}ft. Awning`;\n btn.closest('tr').classList.remove('active');\n }\n });\n};\n\nconst getModels = (series, hidePrices) => {\n const url = `GetModelSizesBySeries?series=${series}&hidePrices=${hidePrices}`;\n return new Promise((resolve, reject) => {\n fetch(url, {\n method: 'POST',\n })\n .then((response) => {\n if (response.ok) {\n response.text().then(resolve);\n } else {\n response.text().then(reject);\n }\n })\n .catch(console.error);\n });\n};\n\nconst getModelSteps = (code) => {\n const url = `GetAvailableStepsByModelCode?code=${code}`;\n return new Promise((resolve, reject) => {\n fetch(url, {\n method: 'POST',\n })\n .then((response) => {\n if (response.ok) {\n response.json().then(resolve);\n } else {\n response.json().then(reject);\n }\n })\n .catch(console.error);\n });\n};\n// Need to passback scope (this)\nconst getModelDataByCode = (code, callback, scope) => {\n getModelSteps(code)\n .then((data) => {\n if (callback) {\n callback(data, scope);\n }\n });\n};\n\nconst updateModelsBySeries = (state, callback) => {\n const { hidePrices } = window;\n const { series } = state;\n const wrapper = document.getElementById('pricingContentWrapper');\n wrapper.classList.add('updating');\n wrapper.classList.add('updating-content');\n getModels(series, hidePrices)\n .then((data) => {\n wrapper.classList.remove('updating');\n wrapper.classList.remove('updating-content');\n wrapper.innerHTML = data;\n updateContentHeight();\n if (callback !== null) {\n callback();\n }\n });\n};\n\nexport {\n getModelContentDivByName,\n getModelDataByCode,\n hideAllModels,\n showFirstModel,\n showModelByName,\n updateModelButtonLabels,\n updateModelsBySeries,\n};\n/* eslint-enable no-console */\n","/* eslint-disable no-console */\nimport Constants from './modules/awning-configurator/utils/constants';\nimport { addToEpiCart } from './utils/cart-utils';\nimport {\n getActiveSeriesBtn,\n updateSeriesButtonLabels,\n updateSeriesHeading,\n updateSeriesWrapper,\n} from './modules/awning-configurator/steps/series';\nimport {\n addAwningToGtmDataLayer,\n addAwningToSstParamList,\n getAwningItemNumber,\n resetInputs,\n} from './modules/awning-configurator/utils/cart-utils';\nimport {\n getCollectionNameFromHash,\n getSelectedCollection,\n getSelectedFabricOptions,\n initializeFabricDataAttributes,\n updateCollectionsBySeries,\n updateSelectedCollection,\n} from './modules/awning-configurator/steps/fabric';\nimport {\n getModelDataByCode,\n hideAllModels,\n // showFirstModel,\n showModelByName,\n updateModelButtonLabels,\n updateModelsBySeries,\n} from './modules/awning-configurator/steps/model';\nimport {\n isStepHidden,\n resetStepSelections,\n scrollToSection,\n toggleStepAvailability,\n toggleStepByName,\n toggleStepTitleByName,\n updateAvailableStepNums,\n isProUpgradable,\n isProModel,\n} from './modules/awning-configurator/utils/configuration-utils';\nimport {\n saveToSession,\n} from './utils/session-storage-utils';\nimport {\n resetMountUI,\n updateAluminumHoodPrice,\n updateAluminumHoodUI,\n updateMountUI,\n updateSoffitBracketPrice,\n} from './modules/awning-configurator/steps/mount';\nimport { updateFrameColorUI } from './modules/awning-configurator/steps/frame-color';\nimport {\n updateProjectionUI,\n updateProjectionUpgradeOptions,\n} from './modules/awning-configurator/steps/projection';\nimport { validate } from './modules/awning-configurator/utils/validation-utils';\n\nexport default class AwningConfigurator {\n constructor() {\n this.state = {\n aluminumHood: '',\n aluminumHoodUpgrade: '',\n active: {\n element: '',\n option: '',\n },\n cordSide: '',\n fabric: '',\n fabricCode: '',\n fabricCollection: '',\n frameColor: '',\n hasFrameColorOpt: true,\n itemNumber: '',\n isCostco: false,\n masonryKit: '',\n model: '',\n modelCode: '',\n mount: '',\n price: {},\n scrollToModels: false,\n projection: '',\n projectionUpgrade1: '',\n projectionUpgrade2: '',\n projectionUpgradeModel: '',\n projectionUpgradeSelected: '',\n projectionWithProUpgradeModel: '',\n proUpgrade: '',\n proUpgradeFabrics: '',\n proUpgradeModel: '',\n rafterAdapterBrackets: '',\n series: '',\n size: '',\n sstDescription: '',\n sstDiscount: '',\n valanceStyle: '',\n variantCode: '',\n led: '',\n };\n this.modelData = {};\n this.na = 'N/A';\n this.sessionStorageKey = 'sst-awning-config';\n this.swatchesJs = null;\n this.init();\n }\n\n init() {\n document.addEventListener('click', (event) => {\n const optionAttr = 'data-awning-option';\n const optionValAttr = 'data-awning-option-value';\n const optionBtn = event.target.closest(`[${optionValAttr}]`);\n if (optionBtn) {\n const data = JSON.parse(optionBtn.getAttribute(optionValAttr));\n // Set active element, option\n const option = optionBtn.getAttribute(optionAttr);\n data.active = {\n element: optionBtn,\n option,\n };\n if (option === Constants.model) {\n this.resetProperty('price');\n }\n this.setState(data);\n this.render();\n }\n });\n // Add event handler for continue button\n const continueBtn = document.querySelector('.continue-btn');\n if (continueBtn) {\n continueBtn.addEventListener('click', (event) => {\n event.preventDefault();\n continueBtn.classList.add('updating');\n continueBtn.setAttribute('disabled', 'disabled');\n const state = this.getState();\n // Validate configuration\n if (!validate(state)) {\n continueBtn.classList.remove('updating');\n continueBtn.removeAttribute('disabled');\n return;\n }\n // If costco site\n\n // debugger;\n const { isCostco } = state;\n if (isCostco) {\n addAwningToSstParamList(state)\n .then(() => {\n // Will likely need to check if success true/false\n continueBtn.classList.remove('updating');\n continueBtn.removeAttribute('disabled');\n const href = event.target.getAttribute('href');\n window.location = href;\n });\n return;\n }\n // Look up the awning variant code based on the\n // model, fabric, and, width... then append the\n // other selection values to code\n getAwningItemNumber(state, (itemNumber, variantCode) => {\n if (itemNumber === '') {\n continueBtn.classList.remove('updating');\n continueBtn.removeAttribute('disabled');\n const { alert, saveSelectionsErrorMessage } = window;\n // Need to move to CMS...\n alert(saveSelectionsErrorMessage);\n return;\n }\n // Save item number to state\n this.setState({ itemNumber, variantCode });\n // Save state to session storage\n saveToSession(this.sessionStorageKey, JSON.stringify(state));\n // Add to cart\n // Get url from event.target and set location\n addToEpiCart(variantCode)\n .then(() => {\n addAwningToSstParamList(state)\n .then((data) => {\n this.setState({\n sstDescription: data.sstDescription,\n sstDiscount: data.sstDiscount,\n sstUnitDiscount: data.sstUnitDiscount,\n sstUnitPrice: data.sstUnitPrice,\n });\n addAwningToGtmDataLayer(state);\n continueBtn.classList.remove('updating');\n continueBtn.removeAttribute('disabled');\n console.log(data);\n if (!data.success) {\n const { alert, saveSelectionsErrorMessage } = window;\n alert(saveSelectionsErrorMessage);\n return;\n }\n const href = event.target.getAttribute('href');\n window.location = href;\n });\n });\n });\n });\n }\n // Add data attributes to fabric buttons\n initializeFabricDataAttributes();\n // Deselect any inputs on page that have been checked previously\n resetInputs();\n }\n\n setState(data) {\n Object.keys(data).forEach((key1) => {\n if (typeof data[key1] !== 'object') {\n this.state[key1] = data[key1];\n } else {\n Object.keys(data[key1]).forEach((key2) => {\n this.state[key1][key2] = data[key1][key2];\n });\n }\n });\n console.log(this.getState());\n }\n\n getState() {\n return this.state;\n }\n\n resetStateForSeriesSelection() {\n this.setState({\n aluminumHood: '',\n aluminumHoodUpgrade: '',\n cordSide: '',\n fabric: '',\n fabricCode: '',\n fabricCollection: '',\n frameColor: '',\n hasFrameColorOpt: true,\n itemNumber: '',\n masonryKit: '',\n model: '',\n modelCode: '',\n mount: '',\n price: {},\n projection: '',\n projectionUpgrade1: '',\n projectionUpgrade2: '',\n projectionUpgradeModel: '',\n projectionUpgradeSelected: '',\n projectionWithProUpgradeModel: '',\n proUpgrade: '',\n proScreenColor: '',\n proUpgradeFabrics: '',\n proUpgradeModel: '',\n rafterAdapterBrackets: '',\n size: '',\n sstDescription: '',\n sstDiscount: '',\n valanceStyle: '',\n variantCode: '',\n led: '',\n });\n }\n\n resetStateForModelSelection() {\n this.setState({\n aluminumHood: '',\n aluminumHoodUpgrade: '',\n cordSide: '',\n fabric: '',\n fabricCode: '',\n fabricCollection: '',\n frameColor: '',\n hasFrameColorOpt: true,\n itemNumber: '',\n masonryKit: '',\n mount: '',\n projection: '',\n projectionUpgrade1: '',\n projectionUpgrade2: '',\n projectionUpgradeModel: '',\n projectionUpgradeSelected: '',\n projectionWithProUpgradeModel: '',\n proUpgrade: '',\n proUpgradeFabrics: '',\n proUpgradeModel: '',\n rafterAdapterBrackets: '',\n valanceStyle: '',\n variantCode: '',\n led: '',\n });\n // Fabric should be reset to first item\n resetStepSelections(Constants.frameColor);\n resetStepSelections(Constants.projection);\n resetStepSelections(Constants.valanceStyle);\n resetStepSelections(Constants.proUpgrade);\n resetStepSelections(Constants.proFsColor);\n resetStepSelections(Constants.pro);\n resetStepSelections(Constants.cordSide);\n resetStepSelections(Constants.mount);\n resetStepSelections(Constants.led);\n const state = this.getState();\n resetMountUI(state);\n }\n\n resetProperty(prop) {\n const state = this.getState();\n Object.keys(state).forEach((key1) => {\n if (key1 === prop) {\n this.state[key1] = {};\n } else if (typeof state[key1] === 'object') {\n Object.keys(state[key1]).forEach((key2) => {\n if (key2 === prop) {\n this.state[key1][key2] = {};\n }\n });\n }\n });\n }\n\n onModelDataReceived(data, scope) {\n let that = this;\n if (!that) {\n that = scope;\n }\n const {\n aluminumHoodUpgrade,\n cordSide,\n frameColor,\n mount,\n projection,\n projectionUpgrade1,\n projectionUpgrade2,\n projectionUpgradeModel,\n projectionWithProUpgradeModel,\n proUpgrade,\n proUpgradeFabrics,\n } = data;\n const state = that.getState();\n const { size, modelCode, fabricCollection } = state;\n // Set reference to model data in case additional reference needed,\n // ...i.e. for reseting hidden valance step\n that.modelData = data;\n // Toggle step availabilty\n Object.keys(data).forEach((key) => {\n toggleStepAvailability(key, data[key]);\n // Set state values to 'N/A' if step is hidden\n // and (critically) there are no options for\n // the product. Do not need to unset, since\n // reseting model will automatically reset\n // the state properties.\n if (isStepHidden(key) && data[key].length === 0) {\n that.setState(JSON.parse(`{ \"${key}\": \"${that.na}\" }`));\n }\n });\n // If only 1 option, set value in state\n // Default is \"Cream\"\n if (frameColor.length === 1) {\n that.setState({\n frameColor: 'Cream',\n hasFrameColorOpt: false,\n });\n }\n // Projection only has one option (not including upgrades)\n that.setState({ projection: projection[0] });\n if (projectionUpgrade1 !== null) {\n that.setState({ projectionUpgrade1 });\n }\n if (projectionUpgrade2 !== null) {\n that.setState({ projectionUpgrade2 });\n }\n if (aluminumHoodUpgrade !== null) {\n that.setState({ aluminumHoodUpgrade });\n }\n const validateProj1 = size >= projectionUpgrade1 && projectionUpgrade1 !== null;\n const validateProj2 = size >= projectionUpgrade2 && projectionUpgrade2 !== null;\n if (validateProj1 || validateProj2) {\n toggleStepByName(Constants.projection, 'show');\n }\n // Set projection upgrade model\n if (projectionUpgradeModel !== '') {\n that.setState({ projectionUpgradeModel });\n }\n // Set PRO XL upgrade model\n if (projectionWithProUpgradeModel !== '') {\n that.setState({ projectionWithProUpgradeModel });\n }\n // Set PRO upgrade model\n if (proUpgrade !== '') {\n that.setState({\n proUpgradeModel: proUpgrade,\n proUpgradeFabrics: proUpgradeFabrics.toString(),\n });\n }\n // If cordSide hidden and mount visible, show mount step title, else hide\n let status = 'hide';\n if (cordSide.length === 0 && mount.length !== 0) {\n status = 'show';\n }\n toggleStepTitleByName(Constants.mount, status);\n updateProjectionUpgradeOptions(state);\n // Update step numbers based on available steps\n updateAvailableStepNums();\n\n toggleStepByName(Constants.continue, 'show');\n\n toggleStepByName(Constants.proFsColor, 'hide');\n toggleStepByName(Constants.proUpgrade, 'hide');\n\n if (isProModel(modelCode)) {\n toggleStepByName(Constants.proFsColor, 'show');\n } else if (isProUpgradable(modelCode, fabricCollection)) {\n toggleStepByName(Constants.proUpgrade, 'show');\n }\n }\n\n render() {\n const state = this.getState();\n const {\n active,\n fabricCollection,\n price,\n model,\n modelCode,\n mount,\n proUpgradeFabrics,\n series,\n } = state;\n const {\n element,\n option,\n } = active;\n switch (option) {\n case 'series':\n this.resetStateForSeriesSelection();\n updateModelsBySeries(state, () => {\n updateSeriesWrapper(state);\n toggleStepByName(Constants.model, 'show');\n toggleStepByName(Constants.fabric, 'hide');\n toggleStepByName(Constants.frameColor, 'hide');\n toggleStepByName(Constants.projection, 'hide');\n toggleStepByName(Constants.valanceStyle, 'hide');\n toggleStepByName(Constants.cordSide, 'hide');\n toggleStepByName(Constants.mount, 'hide');\n toggleStepByName(Constants.proUpgrade, 'hide');\n toggleStepByName(Constants.proFsColor, 'hide');\n toggleStepByName(Constants.led, 'hide');\n toggleStepByName(Constants.continue, 'hide');\n if (model !== '') {\n // Reset selected model\n this.setState({ model });\n // Scroll to selected model\n hideAllModels();\n showModelByName(model);\n // Do we need to add a timeout here?...\n setTimeout(() => {\n scrollToSection(Constants.model, state);\n }, 200);\n }/* else {\n showFirstModel();\n } */\n updateSeriesButtonLabels(active);\n updateSeriesHeading(series);\n });\n break;\n case Constants.model: {\n this.resetStateForModelSelection();\n updateModelButtonLabels(state);\n // Update state w/ collection name\n const defaultFabricCollection = getCollectionNameFromHash(Object.keys(price)[0]);\n this.setState({ fabricCollection: defaultFabricCollection });\n updateCollectionsBySeries(state);\n updateSelectedCollection(state);\n // Update active swatch in swatches.js\n const swatchesJs = this.getSwatchesJs();\n if (swatchesJs) {\n swatchesJs.setState({\n activeCollection: {\n element: getSelectedCollection(defaultFabricCollection),\n id: Object.keys(price)[0],\n },\n });\n swatchesJs.updateCollection();\n }\n toggleStepByName(Constants.model, 'show');\n toggleStepByName(Constants.fabric, 'show');\n // Set selected fabric/fabricCode to default swatch values\n const fabricOptions = getSelectedFabricOptions();\n if (fabricOptions) {\n this.setState(fabricOptions);\n }\n // Update visible steps based on ajax call\n getModelDataByCode(modelCode, this.onModelDataReceived, this);\n // Update price for soffit bracket mount based on size\n updateSoffitBracketPrice(state);\n // Update price for aluminum hood upgrade based on model, size\n updateAluminumHoodPrice(state);\n // Scroll to fabrics\n setTimeout(() => {\n scrollToSection(Constants.fabric, state);\n }, 200);\n break;\n }\n case Constants.fabric: {\n if (proUpgradeFabrics.indexOf(fabricCollection) === -1) {\n toggleStepByName(Constants.proUpgrade, 'hide');\n this.setState({ proUpgrade: 'No' });\n } else {\n toggleStepByName(Constants.proUpgrade, 'show');\n }\n\n // vb 202501\n if (fabricCollection === Constants.sunsetterLaminated) {\n toggleStepByName(Constants.proUpgrade, 'hide');\n this.setState({ proUpgrade: '' });\n } else if (isProUpgradable(modelCode, fabricCollection)) {\n toggleStepByName(Constants.proUpgrade, 'show');\n this.setState({ proUpgrade: 'yes' });\n }\n // vb 202502 hasLEDOption\n if (model.indexOf(' XL ') > -1) {\n toggleStepByName(Constants.led, 'show');\n this.setState({ led: 'yes' });\n } else {\n toggleStepByName(Constants.led, 'hide');\n this.setState({ led: '' });\n }\n //\n if (isProModel(modelCode)) {\n toggleStepByName(Constants.proFsColor, 'show');\n this.setState({ proScreenColor: 'W' });\n }\n // --\n\n // Depending on collection selected, show/hide valance step and set default to \"wave\"\n const { valanceStyle } = this.modelData;\n const isValanceAvailable = valanceStyle.length > 0;\n if (fabricCollection === Constants.sunsetterLaminated && isValanceAvailable) {\n toggleStepByName(Constants.valanceStyle, 'hide');\n this.setState({ valanceStyle: Constants.waveValance });\n } else if (fabricCollection !== Constants.sunsetterLaminated && isValanceAvailable) {\n toggleStepByName(Constants.valanceStyle, 'show');\n this.setState({ valanceStyle: '' });\n }\n break;\n }\n case Constants.frameColor:\n updateFrameColorUI();\n break;\n case Constants.projection:\n updateProjectionUI();\n // If option w/ ancestor selector of .upgrade-available\n // set projectionUpgradeSelected to Yes, otherwise No\n if (element.closest('.upgrade-available')) {\n this.setState({ projectionUpgradeSelected: 'Yes' });\n } else {\n this.setState({ projectionUpgradeSelected: 'No' });\n }\n break;\n case Constants.mount:\n updateMountUI();\n // Set/unset 'N/A' values...\n if (mount === 'Wall Bracket') {\n this.setState({\n masonryKit: 'No',\n rafterAdapterBrackets: this.na,\n });\n } else if (mount === 'Soffit Bracket') {\n this.setState({\n masonryKit: this.na,\n rafterAdapterBrackets: 'No',\n });\n }\n updateAluminumHoodUI(state);\n break;\n default:\n }\n updateAvailableStepNums();\n }\n\n setActiveSeries(selectedSeries) {\n const series = getActiveSeriesBtn(selectedSeries);\n this.setState({\n active: {\n element: series,\n option: Constants.series,\n },\n });\n }\n\n getSwatchesJs() {\n return this.swatchesJs;\n }\n\n setSwatchesJs(swatchesJs) {\n this.swatchesJs = swatchesJs;\n }\n}\nwindow.AwningConfigurator = AwningConfigurator;\n/* eslint-enable no-console */\n","export default class Constants { }\n\nConstants.continue = 'continue';\nConstants.cordSide = 'cordSide';\nConstants.fabric = 'fabric';\nConstants.frameColor = 'frameColor';\nConstants.model = 'model';\nConstants.mount = 'mount';\nConstants.projection = 'projection';\nConstants.proUpgrade = 'proUpgrade';\nConstants.proFsColor = 'fsColor';\nConstants.led = 'led';\nConstants.series = 'series';\nConstants.valanceStyle = 'valanceStyle';\nConstants.sunsetterLaminated = 'SunSetter Laminated';\nConstants.waveValance = 'Wave Valance';\n","const getEpiCartItems = () => { // getCartItems()\n const url = `${window.location.protocol}//${window.location.hostname}/api/v1/cart`;\n return new Promise((resolve, reject) => {\n fetch(url)\n .then(r => r.json())\n .then(resolve)\n .catch(reject);\n });\n};\n\nconst addToEpiCart = code => ( // addToCart()\n new Promise((resolve, reject) => {\n fetch(`${window.location.protocol}//${window.location.hostname}/api/v1/cart/items/${code}`, {\n method: 'POST',\n headers: {\n accept: 'application/json',\n 'content-type': 'application/json',\n },\n })\n .then((r) => {\n if (r.ok) {\n r.json().then(resolve);\n } else {\n r.json().then(reject);\n }\n })\n .catch(reject);\n })\n);\n\n\nconst removeFromEpiCart = (code) => { // removeFromCart()\n const url = `${window.location.protocol}//${window.location.hostname}/api/v1/cart/items/${code}`;\n return new Promise((resolve, reject) => {\n fetch(url, { method: 'DELETE' })\n .then((r) => {\n if (r.ok) {\n resolve();\n } else {\n r.json().then(reject);\n }\n })\n .catch(reject);\n });\n};\n\nexport {\n getEpiCartItems,\n addToEpiCart,\n removeFromEpiCart,\n};\n","/* eslint-disable no-console */\nimport { encodeKebabCase } from '../../../utils/string-utils';\n\nconst getActiveSeriesBtn = (series) => {\n const seriesBtns = document.querySelectorAll('[data-awning-option=\"series\"]');\n let activeSeriesElement = seriesBtns[0];\n for (let i = 0; i < seriesBtns.length; i++) { /* eslint-disable-line no-plusplus */\n const btn = seriesBtns[i];\n const btnAttr = btn.getAttribute('data-awning-option-value');\n if (btnAttr.indexOf(series) !== -1) {\n activeSeriesElement = btn;\n }\n }\n return activeSeriesElement;\n};\n\nconst getActiveLabel = (btn) => {\n const activeLabel = btn.getAttribute('data-active-label');\n if (activeLabel) {\n if (activeLabel === '') {\n return btn.textContent;\n }\n return activeLabel;\n }\n return btn.textContent;\n};\n\nconst getDefaultLabel = (btn) => {\n const defaultLabel = btn.getAttribute('data-default-label');\n if (defaultLabel) {\n if (defaultLabel === '') {\n return btn.textContent;\n }\n return defaultLabel;\n }\n return btn.textContent;\n};\n\nconst updateSeriesButtonLabels = (active) => {\n const { element, option } = active;\n const btnList = document.querySelectorAll(`[data-awning-option=\"${option}\"]`);\n [].map.call(btnList, (btn) => {\n if (btn === element) {\n btn.textContent = getActiveLabel(btn);\n btn.classList.add('button-white-lg');\n btn.classList.remove('button-light-blue-lg');\n } else {\n btn.textContent = getDefaultLabel(btn);\n btn.classList.remove('button-white-lg');\n btn.classList.add('button-light-blue-lg');\n }\n });\n};\n\nconst updateSeriesHeading = (series) => {\n const stepTitle = document.querySelector('#model h3');\n const seriesLabel = series.substr(0, series.indexOf(' '));\n let stepTitleHtml = stepTitle.innerHTML;\n stepTitleHtml = stepTitleHtml.replace(/Platinum|SunSetter/, seriesLabel);\n stepTitle.innerHTML = stepTitleHtml;\n};\n\nconst updateSeriesWrapper = (state) => {\n const wrapper = document.getElementById('awning-configurator');\n wrapper.classList = `build-awning-steps ${encodeKebabCase(state.series)}`;\n};\n\nexport {\n getActiveSeriesBtn,\n updateSeriesButtonLabels,\n updateSeriesHeading,\n updateSeriesWrapper,\n};\n/* eslint-enable no-console */\n","/* eslint-disable no-console */\nimport { capitalizeFirstLetter, encodeKebabCase } from '../../../utils/string-utils';\nimport { pushToDataLayer } from '../../../utils/ga-ecommerce-utils';\n\n\nconst getProductVariantCode = (state) => {\n const {\n fabric,\n model,\n // projectionUpgradeModel,\n projectionUpgradeSelected,\n projectionWithProUpgradeModel,\n proUpgrade,\n proUpgradeModel,\n size,\n } = state;\n let modelName = model;\n // XL upgrade\n /* if (projectionUpgradeSelected === 'Yes' && projectionUpgradeModel !== '') {\n modelCode = projectionUpgradeModel;\n } */\n // PRO upgrade\n if (proUpgrade === 'Yes') {\n modelName = proUpgradeModel;\n }\n // PRO XL upgrade\n if (proUpgrade === 'Yes' && projectionUpgradeSelected === 'Yes' && projectionWithProUpgradeModel !== '') {\n modelName = projectionWithProUpgradeModel;\n }\n const url = `GetProductVariantCode?fabric=${fabric}&model=${modelName}&size=${size}`;\n return new Promise((resolve, reject) => {\n fetch(url, {\n method: 'POST',\n })\n .then((response) => {\n if (response.ok) {\n response.json().then(resolve);\n } else {\n response.json().then(reject);\n }\n })\n .catch(console.error);\n });\n};\n\nconst appendOptionParamsToProductVariantCode = (itemNumber, state) => {\n const {\n cordSide,\n frameColor,\n mount,\n } = state;\n let code = itemNumber;\n if (mount === 'Soffit Bracket') {\n code += 'S';\n }\n if (cordSide === 'Left Side') {\n code += 'L';\n }\n if (frameColor === 'White') {\n code += 'W';\n }\n return code;\n};\n\nconst getAwningItemNumber = (state, callback) => {\n getProductVariantCode(state)\n .then((data) => {\n const { variantCode } = data;\n let itemNumber = variantCode;\n if (itemNumber !== '') {\n itemNumber = appendOptionParamsToProductVariantCode(variantCode, state);\n }\n if (callback) {\n callback(itemNumber, variantCode);\n }\n });\n};\n\nconst getPrice = (state) => {\n // Match price based on selected collection\n const {\n fabricCollection,\n price,\n } = state;\n let s = '';\n Object.keys(price).forEach((key) => {\n const shortColl = encodeKebabCase(fabricCollection);\n const containsColl = key.indexOf(shortColl) !== -1;\n if (containsColl) {\n s = price[key];\n }\n });\n // console.log(`Price: ${s}`);\n return s;\n};\n\n// Repalce dashes w/ asterisks\nconst encodeModelCode = code => (\n code.replace(/--/g, '**')\n);\n\nconst convertPropsToUrlParams = (props) => {\n let s = '';\n Object.keys(props).forEach((key) => {\n const propName = capitalizeFirstLetter(key);\n s += `${propName}=${props[key]}&`;\n });\n return s.substring(0, s.lastIndexOf('&'));\n};\n\nconst getUrlParam = (prop) => {\n if (prop === 'N/A') {\n return 'N';\n }\n return prop.charAt(0);\n};\n\nconst addAwningToSstParamList = (state) => {\n const {\n aluminumHood,\n cordSide,\n fabric,\n fabricCode,\n fabricCollection,\n frameColor,\n hasFrameColorOpt,\n masonryKit,\n model,\n modelCode,\n mount,\n projection,\n rafterAdapterBrackets,\n series,\n size,\n valanceStyle,\n proUpgrade,\n proScreenColor,\n led,\n } = state;\n const props = {\n cordSide: getUrlParam(cordSide),\n fabricCode,\n fabricCollection,\n fabricName: fabric,\n frameColor: getUrlParam(frameColor),\n hasFrameColorOpt,\n hood: getUrlParam(aluminumHood),\n masonryKit: getUrlParam(masonryKit),\n modelCode: encodeModelCode(modelCode),\n modelName: model,\n mount: getUrlParam(mount),\n price: getPrice(state),\n projection: Math.floor(projection),\n rafterAdapterBrackets: getUrlParam(rafterAdapterBrackets),\n series,\n size,\n valanceStyle: getUrlParam(valanceStyle),\n proUpgrade,\n proScreenColor,\n led,\n };\n const p1 = convertPropsToUrlParams(props);\n // console.log(p1);\n const url = `AddAwningToSstParamList?${p1}`;\n return new Promise((resolve, reject) => {\n fetch(url, {\n method: 'POST',\n })\n .then((response) => {\n if (response.ok) {\n response.json().then(resolve);\n } else {\n response.json().then(reject);\n }\n })\n .catch(console.error);\n });\n};\n\nconst addAwningToGtmDataLayer = (state) => {\n const {\n itemNumber,\n model,\n series,\n sstDescription,\n sstDiscount,\n } = state;\n pushToDataLayer({\n event: 'add_to_cart',\n ecommerce: {\n items: [\n {\n item_id: itemNumber,\n item_name: model,\n affiliation: 'sunsetter.com',\n coupon: sstDiscount,\n currency: 'USD',\n discount: 0,\n index: 0,\n item_brand: 'SunSetter',\n item_category: 'Awnings',\n item_category2: series,\n item_category3: '',\n item_category4: '',\n item_category5: '',\n item_list_id: '',\n item_list_name: '',\n item_variant: sstDescription,\n location_id: '',\n price: getPrice(state),\n quantity: 1,\n },\n ],\n },\n });\n};\n\nconst resetInputs = () => {\n const checkedInputs = document.querySelectorAll('input:checked');\n [].map.call(checkedInputs, (input) => {\n input.checked = false;\n });\n};\n\nexport {\n addAwningToGtmDataLayer,\n addAwningToSstParamList,\n getAwningItemNumber,\n resetInputs,\n};\n/* eslint-enable no-console */\n","/* eslint-disable no-console */\nconst pushToDataLayer = (data) => {\n console.log(data);\n const { dataLayer } = window;\n if (dataLayer === null || data === null) return;\n dataLayer.push({ ecommerce: null });\n dataLayer.push(data);\n};\n\nconst getEventData = url => (\n new Promise((resolve, reject) => {\n fetch(url, {\n method: 'POST',\n headers: {\n accept: 'application/json',\n 'content-type': 'application/json',\n },\n })\n .then((response) => {\n if (response.ok) {\n response.json().then(resolve);\n } else {\n response.json().then(reject);\n }\n })\n .catch(console.error);\n })\n);\n\nconst addPaymentInfo = (paymentType) => {\n const url = `/ga/AddPaymentInfoFormatter?paymentType=${paymentType}`;\n getEventData(url)\n .then(ecommerce => (\n pushToDataLayer({\n event: 'add_payment_info',\n ecommerce,\n })\n ));\n};\n\nconst addShippingInfo = () => {\n const url = '/ga/AddShippingInfoFormatter';\n getEventData(url)\n .then(ecommerce => (\n pushToDataLayer({\n event: 'add_shipping_info',\n ecommerce,\n })\n ));\n};\n\nconst checkout = () => {\n const url = '/ga/CheckoutFormatter';\n getEventData(url)\n .then(ecommerce => (\n pushToDataLayer({\n event: 'begin_checkout',\n ecommerce,\n })\n ));\n};\n\nconst gaAddToCart = (code, type) => {\n const url = `/ga/AddToCartFormatter?code=${code}&type=${type}`;\n return new Promise((resolve, reject) => {\n fetch(url, {\n method: 'POST',\n headers: {\n accept: 'application/json',\n 'content-type': 'application/json',\n },\n })\n .then((response) => {\n if (response.ok) {\n response.json()\n .then((ecommerce) => {\n pushToDataLayer({\n event: 'add_to_cart',\n ecommerce,\n });\n })\n .then(resolve);\n } else {\n response.json().then(reject);\n }\n })\n .catch(console.error);\n });\n};\n\nconst init = () => {\n // Add in catch for all checkout buttons\n document.addEventListener('click', (event) => {\n const { target } = event;\n const { href } = target;\n if (href) {\n if (href.indexOf('checkout') !== -1) {\n checkout();\n }\n }\n });\n};\n\nconst viewCart = () => {\n const url = '/ga/ViewCartFormatter';\n getEventData(url)\n .then(ecommerce => (\n pushToDataLayer({\n event: 'view_cart',\n ecommerce,\n })\n ));\n};\n\nconst viewItem = (code, type) => {\n const url = `/ga/ViewItemFormatter?code=${code}&type=${type}`;\n getEventData(url)\n .then(ecommerce => (\n pushToDataLayer({\n event: 'view_item',\n ecommerce,\n })\n ));\n};\n\nconst viewItemList = (category) => {\n const url = `/ga/ViewItemListFormatter?name=${category}`;\n getEventData(url)\n .then((ecommerce) => {\n if (ecommerce === null) return;\n pushToDataLayer({\n event: 'view_item_list',\n ecommerce,\n });\n });\n};\n\nexport {\n addPaymentInfo,\n addShippingInfo,\n checkout,\n gaAddToCart,\n init,\n pushToDataLayer,\n viewCart,\n viewItem,\n viewItemList,\n};\n/* eslint-enable no-console */\n","/* eslint-disable no-console */\nimport { encodeKebabCase } from '../../../utils/string-utils';\n\nconst fabricCollectionNav = document.querySelector('.fabric-collection-nav');\nconst fabricCollectionNavItems = document.querySelectorAll('.fabric-collection-nav button');\nconst fabricCollectionSelect = document.querySelector('#AwningFabric');\nconst fabricCollectionSelectOptions = document.querySelectorAll('#AwningFabric option');\nconst hiddenSelector = 'hidden';\nconst filteredSelector = 'filter-applied';\nconst navItemCt = fabricCollectionNavItems.length;\n\nconst getCollectionNameFromHash = (id) => {\n let name = '';\n [].map.call(fabricCollectionNavItems, (item) => {\n const collectionName = item.getAttribute('aria-label');\n if (encodeKebabCase(collectionName) === id) {\n name = collectionName;\n }\n });\n return name;\n};\n\nconst updateNavAlignment = (filteredNavCt) => {\n if (filteredNavCt < navItemCt) {\n fabricCollectionNav.classList.add(filteredSelector);\n } else {\n fabricCollectionNav.classList.remove(filteredSelector);\n }\n};\n\nconst getSelectedCollection = (collectionName) => {\n const id = `panel-${encodeKebabCase(collectionName)}`;\n return document.getElementById(id);\n};\n\nconst resetSelectedCollectionAndFabric = () => {\n // Reset selected swatch\n const selectedTab = fabricCollectionNav.querySelector('[aria-selected=\"true\"]');\n if (!selectedTab) {\n return;\n }\n selectedTab.setAttribute('aria-selected', 'false');\n const panelId = selectedTab.getAttribute('aria-controls');\n const panel = document.getElementById(panelId);\n panel.setAttribute(hiddenSelector, hiddenSelector);\n const option = panel.querySelector('.swatch-checkbox input:checked');\n if (option) {\n option.checked = false;\n }\n};\n\nconst updateOasisFabrics = (state, panel) => {\n // For Oasis Manual/Motorized we ARE NOT displaying\n // Sea Shore (4949) or Lake Blue (6969)\n const { modelCode } = state;\n const fabricCodeList = [4949, 6969];\n const hideFabrics = modelCode === 'SO' || modelCode === 'SOM';\n fabricCodeList.forEach((fabricCode) => {\n const ipt = panel.querySelector(`[value=\"${fabricCode}\"]`);\n if (ipt) {\n const col = ipt.closest('.col');\n const btn = col.querySelector('.swatch-details-btn');\n if (hideFabrics) {\n col.classList.add('hidden');\n btn.classList.add('hidden');\n } else {\n col.classList.remove('hidden');\n btn.classList.remove('hidden');\n }\n }\n });\n};\n\nconst updateSelectedOption = (panel) => {\n // Remove selected state from any other swatches in this panel\n const prevSelectedOptions = panel.querySelectorAll('.selected');\n [].map.call(prevSelectedOptions, (option) => {\n option.classList.remove('selected');\n });\n const selectedSwatch = document.querySelector('.swatch-card input:checked');\n if (selectedSwatch) {\n setTimeout(() => {\n selectedSwatch.parentNode.classList.add('selected');\n }, 100);\n }\n};\n\nconst updateSelectedCollection = (state) => {\n const { fabricCollection } = state;\n // Remove selected state from previous any previously selected tab\n resetSelectedCollectionAndFabric();\n // Set selected states for new tab/content\n const tabId = `tab-${encodeKebabCase(fabricCollection)}`;\n const panelId = `panel-${encodeKebabCase(fabricCollection)}`;\n const tab = document.getElementById(tabId);\n const panel = document.getElementById(panelId);\n tab.setAttribute('aria-selected', 'true');\n panel.removeAttribute(hiddenSelector);\n // If new collection is selected, default select first fabric\n const option = panel.querySelectorAll('.swatch-checkbox input')[0];\n if (option) {\n // Add selected state\n option.checked = true;\n }\n updateSelectedOption(panel);\n updateOasisFabrics(state, panel);\n};\n\nconst getSelectedFabricOptions = () => {\n const selectedSwatch = document.querySelector('.swatch-card input:checked');\n if (selectedSwatch) {\n const options = selectedSwatch.getAttribute('data-awning-option-value');\n if (options) {\n return JSON.parse(options);\n }\n return null;\n }\n return null;\n};\n\nconst updateCollectionsBySeries = (state) => {\n const { price } = state;\n const fabricList = Object.keys(price).map(key => (key));\n [].map.call(fabricCollectionNavItems, (item) => {\n const match = fabricList.find(fabric => `tab-${fabric}` === item.id);\n const tab = item.parentNode;\n const panelId = item.getAttribute('aria-controls');\n const panel = document.getElementById(panelId);\n if (match) {\n tab.classList.remove(hiddenSelector);\n } else {\n // Hide both tab and panel of non-available series...\n tab.classList.add(hiddenSelector);\n panel.setAttribute(hiddenSelector, hiddenSelector);\n }\n });\n let selectedVal = '';\n [].map.call(fabricCollectionSelectOptions, (option) => {\n const match = fabricList.find(fabric => fabric === option.value);\n // Select dropdown option\n if (match) {\n option.classList.remove(hiddenSelector);\n if (selectedVal === '') {\n selectedVal = option.value;\n }\n } else {\n option.classList.add(hiddenSelector);\n }\n });\n // Set selected value in dropdown to first non-hidden value\n // console.log(selectedVal);\n fabricCollectionSelect.value = selectedVal;\n updateNavAlignment(fabricList.length);\n};\n\nconst initializeFabricDataAttributes = () => {\n // Add options to fabric tabs\n [].map.call(fabricCollectionNavItems, (item) => {\n item.setAttribute('data-awning-option', 'fabricCollection');\n const name = item.getAttribute('aria-label');\n item.setAttribute('data-awning-option-value', `{\"fabricCollection\":\"${name}\"}`);\n });\n // Add options to fabric swatches\n const fabricSwatchList = document.querySelectorAll('[data-step=\"fabric\"] .swatch-card');\n [].map.call(fabricSwatchList, (item) => {\n const ipt = item.querySelector('input');\n const label = item.querySelector('.swatch-color-name');\n ipt.setAttribute('data-awning-option', 'fabric');\n ipt.setAttribute('data-awning-option-value', `{\"fabric\":\"${label.textContent}\", \"fabricCode\":\"${ipt.value}\"}`);\n });\n};\n\nexport {\n getCollectionNameFromHash,\n getSelectedCollection,\n getSelectedFabricOptions,\n initializeFabricDataAttributes,\n updateCollectionsBySeries,\n updateSelectedCollection,\n};\n/* eslint-enable no-console */\n","/* eslint-disable no-console */\nconst getContentHeight = (content) => {\n const innerDiv = content.querySelector('div:first-child');\n const height = innerDiv.offsetHeight;\n const paddingBottom = parseInt(window.getComputedStyle(innerDiv).paddingBottom, 10);\n return `${height - paddingBottom}px`;\n};\n\nconst initContentToggle = () => {\n const expand = (btn) => {\n const ariaControls = btn.getAttribute('aria-controls');\n const content = document.getElementById(ariaControls);\n const openLabel = btn.getAttribute('data-openlabel');\n btn.setAttribute('aria-expanded', 'true');\n if (openLabel) {\n btn.innerHTML = openLabel;\n }\n content.classList.add('expand-content');\n content.style.height = getContentHeight(content);\n };\n\n const close = (btn) => {\n const ariaControls = btn.getAttribute('aria-controls');\n const closedLabel = btn.getAttribute('data-closedlabel');\n const content = document.getElementById(ariaControls);\n btn.setAttribute('aria-expanded', 'false');\n if (closedLabel) {\n btn.innerHTML = closedLabel;\n }\n content.classList.remove('expand-content');\n content.removeAttribute('style');\n };\n\n const toggleContent = (btn) => {\n const ariaExpanded = btn.getAttribute('aria-expanded');\n if (ariaExpanded === 'false') {\n expand(btn);\n } else {\n close(btn);\n }\n };\n\n const contentToggleBtns = document.querySelectorAll('.content-toggle-btn');\n [].map.call(contentToggleBtns, (btn) => {\n // If button's aria-expanded attr is set to true on page load...\n const ariaExpanded = btn.getAttribute('aria-expanded');\n if (ariaExpanded === 'true') {\n expand(btn);\n }\n });\n\n document.addEventListener('click', (event) => {\n const btn = event.target.closest('.content-toggle-btn');\n if (btn) {\n toggleContent(btn);\n }\n });\n\n if (contentToggleBtns.length > 0) {\n window.addEventListener('resize', () => {\n [].map.call(contentToggleBtns, (btn) => {\n // If button's aria-expanded attr is set to true on page load...\n const ariaExpanded = btn.getAttribute('aria-expanded');\n if (ariaExpanded === 'true') {\n const ariaControls = btn.getAttribute('aria-controls');\n const content = document.getElementById(ariaControls);\n content.style.height = getContentHeight(content);\n }\n });\n });\n }\n};\n\nconst updateContentHeight = () => {\n const contentToggleBtns = document.querySelectorAll('.content-toggle-btn');\n [].map.call(contentToggleBtns, (btn) => {\n // If button's aria-expanded attr is set to true on page load...\n const ariaExpanded = btn.getAttribute('aria-expanded');\n if (ariaExpanded === 'true') {\n const ariaControls = btn.getAttribute('aria-controls');\n const content = document.getElementById(ariaControls);\n const openLabel = btn.getAttribute('data-openlabel');\n if (openLabel) {\n btn.innerHTML = openLabel;\n }\n content.classList.add('expand-content');\n content.style.height = getContentHeight(content);\n }\n });\n};\n\nexport {\n initContentToggle,\n updateContentHeight,\n};\n/* eslint-enable no-console */\n","/* eslint-disable import/prefer-default-export */\nconst scrollToElement = (options) => {\n const { element, offset, position } = options;\n let y = 0;\n if (element) {\n // console.log(`scrolling-utils.js, scrollToElement, ${element.offsetTop}`);\n y = element.offsetTop;\n }\n if (position) {\n y = position;\n }\n if (offset) {\n y += offset;\n }\n window.scrollTo({\n top: y,\n behavior: 'smooth',\n });\n};\n\nexport {\n scrollToElement,\n};\n/* eslint-enable import/prefer-default-export */\n","/* eslint-disable no-console */\nconst saveToSession = (key, data) => {\n const { sessionStorage } = window;\n sessionStorage.setItem(key, data);\n};\n\nconst retreiveFromSession = (key) => {\n const { sessionStorage } = window;\n sessionStorage.getItem(key);\n};\n\nexport {\n retreiveFromSession,\n saveToSession,\n};\n/* eslint-disable no-console */\n","/* eslint-disable no-console */\nconst updateMountUI = () => {\n const optionList = document.querySelectorAll('[name=\"mount\"]');\n [].map.call(optionList, (option) => {\n const id = option.getAttribute('aria-controls');\n const expandedContent = document.getElementById(id);\n if (option.checked) {\n expandedContent.classList.remove('hidden');\n } else {\n expandedContent.classList.add('hidden');\n }\n });\n};\n\nconst getSoffitBracketPrice = (size) => {\n const url = `GetAdapterBracketPrice?size=${size}`;\n return new Promise((resolve, reject) => {\n fetch(url, {\n method: 'POST',\n })\n .then((response) => {\n if (response.ok) {\n response.json().then(resolve);\n } else {\n response.json().then(reject);\n }\n })\n .catch(console.error);\n });\n};\n\nconst updateSoffitBracketPrice = (state) => {\n const rafterBracketPrice = document.getElementById('rafterBracketPrice');\n const isRafterBracketPrice = rafterBracketPrice !== null;\n if (!isRafterBracketPrice) return;\n const { size } = state;\n getSoffitBracketPrice(size)\n .then((data) => {\n const { success, price } = data;\n if (success) {\n if (rafterBracketPrice && price !== '') {\n rafterBracketPrice.textContent = `of $${price}`;\n }\n }\n });\n};\n\nconst updateAluminumHoodUI = (state) => {\n const {\n aluminumHoodUpgrade,\n isCostco,\n mount,\n } = state;\n const aluminumHoodDiv = document.getElementById('aluminumHood');\n const isAluminumDiv = aluminumHoodDiv !== null;\n const isAluminumHoodUpgrade = aluminumHoodUpgrade === 'Yes';\n if (mount === 'Wall Bracket' && isCostco && isAluminumDiv && isAluminumHoodUpgrade) {\n aluminumHoodDiv.classList.remove('hidden');\n return;\n }\n if (isAluminumDiv) {\n aluminumHoodDiv.classList.add('hidden');\n }\n};\n\nconst getAluminumHoodPrice = (modelCode, size) => {\n const url = `GetAluminumHoodPrice?model=${modelCode}&size=${size}`;\n return new Promise((resolve, reject) => {\n fetch(url, {\n method: 'POST',\n })\n .then((response) => {\n if (response.ok) {\n response.json().then(resolve);\n } else {\n response.json().then(reject);\n }\n })\n .catch(console.error);\n });\n};\n\nconst updateAluminumHoodPrice = (state) => {\n const { modelCode, size } = state;\n const aluminumHoodDiv = document.getElementById('aluminumHood');\n const isAluminumDiv = aluminumHoodDiv !== null;\n if (!isAluminumDiv) return;\n getAluminumHoodPrice(modelCode, size)\n .then((data) => {\n const {\n costcoPrice,\n listPrice,\n success,\n } = data;\n if (success) {\n // Update 3 aluminum hood price fields on page\n const aluminumHoodListPrice = document.getElementById('aluminumHoodListPrice');\n const aluminumHoodCostcoPrice = document.getElementById('aluminumHoodCostcoPrice');\n const aluminumHoodSavingsPrice = document.getElementById('aluminumHoodSavingsPrice');\n aluminumHoodListPrice.textContent = `$${listPrice.toFixed(2)}`;\n aluminumHoodCostcoPrice.textContent = `$${costcoPrice.toFixed(2)}`;\n aluminumHoodSavingsPrice.textContent = `$${(listPrice - costcoPrice).toFixed(2)}`;\n }\n });\n};\n\nconst resetMountUI = (state) => {\n updateMountUI();\n updateAluminumHoodUI(state);\n};\n\nexport {\n resetMountUI,\n updateAluminumHoodPrice,\n updateAluminumHoodUI,\n updateSoffitBracketPrice,\n updateMountUI,\n};\n/* eslint-enable no-console */\n","/* eslint-disable no-console, import/prefer-default-export */\nimport { isStepOnPage } from '../utils/configuration-utils';\n\nconst updateFrameColorUI = () => {\n if (!isStepOnPage('frameColor')) return;\n const selectedOption = document.querySelector('[name=\"frameColor\"]:checked');\n const img = document.querySelector('.frame-color-image img');\n if (selectedOption && img) {\n img.src = selectedOption.getAttribute('data-option-img');\n }\n};\n\nexport {\n updateFrameColorUI,\n};\n/* eslint-enable no-console, import/prefer-default-export */\n","/* eslint-disable no-console */\nimport { isStepOnPage } from '../utils/configuration-utils';\n\nconst updateProjectionUI = () => {\n if (!isStepOnPage('projection')) return;\n const selectedOption = document.querySelector('[name=\"projection\"]:checked');\n const img = document.querySelector('.awning-projection-image img');\n if (selectedOption && img) {\n img.src = selectedOption.getAttribute('data-option-img');\n }\n};\n\nconst updateProjectionUpgradeOptions = (state) => {\n if (!isStepOnPage('projection')) return;\n const {\n projectionUpgrade1,\n projectionUpgrade2,\n size,\n } = state;\n const upgrades = {\n projectionUpgrade1,\n projectionUpgrade2,\n };\n const upgradeSelector = 'upgrade-available';\n Object.keys(upgrades).forEach((key) => {\n const div = document.getElementById(key);\n if (size >= upgrades[key] && upgrades[key] !== '') {\n div.classList.add(upgradeSelector);\n } else {\n div.classList.remove(upgradeSelector);\n }\n });\n};\n\nexport {\n updateProjectionUI,\n updateProjectionUpgradeOptions,\n};\n/* eslint-enable no-console */\n","/* eslint-disable no-console, import/prefer-default-export */\nimport { scrollToError } from './configuration-utils';\n\n// For some props, we'll need to check whether step is\n// \"avaialble\" (hidden) to determine if empty string is\n// valid.\nconst validProps = {\n cordSide: false,\n fabric: false,\n fabricCode: false,\n frameColor: false,\n model: false,\n mount: false,\n projection: false,\n size: false,\n valanceStyle: false,\n};\n\nconst costcoValidProps = {\n cordSide: false,\n fabric: false,\n fabricCode: false,\n frameColor: false,\n model: false,\n mount: false,\n projection: false,\n size: false,\n valanceStyle: false,\n};\n\nconst getInvalidProps = (state) => {\n const arr = [];\n const { isCostco } = state;\n const props = isCostco ? costcoValidProps : validProps;\n Object.keys(props).forEach((key) => {\n if (state[key] === '') {\n props[key] = false;\n arr.push(key);\n } else {\n props[key] = true;\n }\n });\n return arr;\n};\n\nconst isValid = (state) => {\n let v = true;\n const { isCostco } = state;\n const props = isCostco ? costcoValidProps : validProps;\n Object.keys(props).forEach((key) => {\n if (!props[key]) {\n v = false;\n }\n });\n return v;\n};\n\nconst validate = (state) => {\n const stepErrors = document.querySelectorAll('[data-step-error]');\n const invalidProps = getInvalidProps(state);\n const valid = isValid(state);\n console.log(invalidProps);\n [].map.call(stepErrors, (item) => {\n const step = item.getAttribute('data-step-error');\n if (invalidProps.indexOf(step) !== -1) {\n item.classList.remove('hidden');\n } else {\n item.classList.add('hidden');\n }\n });\n if (!valid) {\n const visibleErrors = document.querySelectorAll('[data-step-error]:not(.hidden)');\n if (visibleErrors.length > 0) {\n const step = visibleErrors[0].getAttribute('data-step-error');\n scrollToError(step);\n }\n }\n return valid;\n};\n\nexport {\n validate,\n};\n/* eslint-enable no-console, import/prefer-default-export */\n"],"sourceRoot":""}