{"version":3,"names":["window","jQuery","$","on","length","wrap","attr","parent","listOfFeatureItem","i","text","trim","hide","spantTextToReplace","document","querySelectorAll","getAttribute","empty","textContent","replaceBrandName","setTimeout","setTimerInterval","setInterval","dataLayer","forEach","item","index","event","eventType","componentId","undefined","componentName","includes","clearInterval","click","e","elementText","target","innerHTML","toLowerCase","originalEvent","keyCode","ready","analytics","eventConfig","push","codeId","events","eventTarget","tags","destinationUrl","elementType","rule","value"],"sources":["assets/feature/promotion/PromotionList/PromotionListPromoType/js/_PromotionListPromoType.js"],"sourcesContent":["(function () {\r\n $(window).on(\"load\", initalLoadComplete);\r\n $(document).ready(function () {\r\n $('.promotion-details .promotion-expiration svg.tag').attr('tabindex', '-1');\r\n $('.promotion-details .promotion-expiration svg.tag path').attr('tabindex', '-1');\r\n setTimeout(function () {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && (item.eventType === 'lightbox loaded' || item.eventType == 'location set' || item.eventType == 'embedded loaded' || item.eventType == 'online seller click' || item.eventType == 'get directions click' || item.eventType == 'phone number click')) {\r\n item.componentId = item.componentId == undefined ? \"prs\" : item.componentId;\r\n item.componentName = item.componentName.includes(\"pricespider - \") ? item.componentName : \"pricespider - \" + item.componentName;\r\n }\r\n });\r\n }, 5000);\r\n });\r\n function initalLoadComplete() {\r\n if ($(\"header .nav-main-search .CoveoSearchbox .magic-box .magic-box-input input\").length) {\r\n $(\"header .nav-main-search .CoveoSearchbox .magic-box .magic-box-input input\").wrap(\"
\").attr(\"type\", \"search\").attr(\"id\", \"header-coveo-search\");\r\n $(\"header .nav-main-search .CoveoSearchbox .magic-box .magic-box-input input\").parent().attr(\"action\", \"/\");\r\n $(\"header .nav-main-search .CoveoSearchbox .magic-box .magic-box-input input\").attr(\"autocomplete\", \"off\");\r\n }\r\n var listOfFeatureItem = $(\".featured-item-slide-title-copy\");\r\n for (var i = 0; i < listOfFeatureItem.length; i++) {\r\n if ($(listOfFeatureItem[i]).text().trim() === \"\") {\r\n $(listOfFeatureItem[i]).hide();\r\n }\r\n }\r\n replaceBrandName();\r\n\r\n setTimeout(function () {\r\n if (($('.ps-widget') && $('.ps-widget').length) || ($('.ps-container') && $('.ps-container').length) || ($('.ps-lightbox') && $('.ps-lightbox').length)) {\r\n var setTimerInterval = setInterval(function () {\r\n if (($('.ps-widget') && $('.ps-widget').length) || ($('.ps-container') && $('.ps-container').length) || ($('.ps-lightbox') && $('.ps-lightbox').length)) {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && (item.eventType === 'lightbox loaded' || item.eventType == 'location set' || item.eventType == 'embedded loaded' || item.eventType == 'online seller click' || item.eventType == 'get directions click' || item.eventType == 'phone number click')) {\r\n item.componentId = item.componentId == undefined ? \"prs\" : item.componentId;\r\n item.componentName = item.componentName.includes(\"pricespider - \") ? item.componentName : \"pricespider - \" + item.componentName;\r\n }\r\n });\r\n } else {\r\n clearInterval(setTimerInterval);\r\n }\r\n }, 1000);\r\n }\r\n $('.ps-widget.product-details-button .ps-button-label').click(function (e) {\r\n setTimeout(function () {\r\n if ($('.ps-container.ps-lightbox') && $('.ps-container.ps-lightbox').length) {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && item.eventType === 'lightbox loaded') {\r\n item.elementText = e.target.innerHTML.toLowerCase();\r\n }\r\n });\r\n }\r\n }, 5000);\r\n });\r\n $('.ps-widget .ps-button-label').click(function (e) {\r\n setTimeout(function () {\r\n if ($('.ps-container.ps-lightbox') && $('.ps-container.ps-lightbox').length) {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && item.eventType === 'lightbox loaded') {\r\n item.elementText = e.target.innerHTML.toLowerCase();\r\n }\r\n if (item.event === 'pricespider' && (item.eventType === 'lightbox loaded' || item.eventType == 'location set' || item.eventType == 'embedded loaded' || item.eventType == 'online seller click' || item.eventType == 'get directions click' || item.eventType == 'phone number click')) {\r\n item.componentId = item.componentId == undefined ? \"prs\" : item.componentId;\r\n item.componentName = item.componentName.includes(\"pricespider - \") ? item.componentName : \"pricespider - \" + item.componentName;\r\n }\r\n });\r\n }\r\n }, 5000);\r\n });\r\n $('.ps-map-location-textbox').on('keypress', function (e) {\r\n if (e.originalEvent.keyCode == 13) {\r\n setTimeout(function () {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && (item.eventType === 'lightbox loaded' || item.eventType == 'location set' || item.eventType == 'embedded loaded' || item.eventType == 'online seller click' || item.eventType == 'get directions click' || item.eventType == 'phone number click')) {\r\n item.componentId = item.componentId == undefined ? \"prs\" : item.componentId;\r\n item.componentName = item.componentName.includes(\"pricespider - \") ? item.componentName : \"pricespider - \" + item.componentName;\r\n }\r\n });\r\n }, 5000);\r\n }\r\n });\r\n $('.ps-map-location-button').on('click', function (e) {\r\n setTimeout(function () {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && (item.eventType === 'lightbox loaded' || item.eventType == 'location set' || item.eventType == 'embedded loaded' || item.eventType == 'online seller click' || item.eventType == 'get directions click' || item.eventType == 'phone number click')) {\r\n item.componentId = item.componentId == undefined ? \"prs\" : item.componentId;\r\n item.componentName = item.componentName.includes(\"pricespider - \") ? item.componentName : \"pricespider - \" + item.componentName;\r\n }\r\n });\r\n }, 5000);\r\n });\r\n $('.ps-address span a[href^=\"tel:\"]').on('click', function (e) {\r\n setTimeout(function () {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && (item.eventType === 'lightbox loaded' || item.eventType == 'location set' || item.eventType == 'embedded loaded' || item.eventType == 'online seller click' || item.eventType == 'get directions click' || item.eventType == 'phone number click')) {\r\n item.componentId = item.componentId == undefined ? \"prs\" : item.componentId;\r\n item.componentName = item.componentName.includes(\"pricespider - \") ? item.componentName : \"pricespider - \" + item.componentName;\r\n }\r\n });\r\n }, 5000);\r\n });\r\n $('.ps-get-directions-button').on('click', function (e) {\r\n setTimeout(function () {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && (item.eventType === 'lightbox loaded' || item.eventType == 'location set' || item.eventType == 'embedded loaded' || item.eventType == 'online seller click' || item.eventType == 'get directions click' || item.eventType == 'phone number click')) {\r\n item.componentId = item.componentId == undefined ? \"prs\" : item.componentId;\r\n item.componentName = item.componentName.includes(\"pricespider - \") ? item.componentName : \"pricespider - \" + item.componentName;\r\n }\r\n });\r\n }, 5000);\r\n });\r\n $('.ps-online-seller-button').on('click', function (e) {\r\n setTimeout(function () {\r\n var getPriceSpider = window.dataLayer;\r\n getPriceSpider.forEach(function (item, index) {\r\n if (item.event === 'pricespider' && (item.eventType === 'lightbox loaded' || item.eventType == 'location set' || item.eventType == 'embedded loaded' || item.eventType == 'online seller click' || item.eventType == 'get directions click' || item.eventType == 'phone number click')) {\r\n item.componentId = item.componentId == undefined ? \"prs\" : item.componentId;\r\n item.componentName = item.componentName.includes(\"pricespider - \") ? item.componentName : \"pricespider - \" + item.componentName;\r\n }\r\n });\r\n }, 5000);\r\n });\r\n }, 5000);\r\n }\r\n function replaceBrandName() {\r\n var spantTextToReplace = $(\".oembrandreplace\");\r\n if (document.querySelectorAll(\"[data-oem-brand]\").length && document.querySelectorAll(\"[data-oem-brand]\")[0].getAttribute(\"data-oem-brand\").length) {\r\n for (var i = 0; i < spantTextToReplace.length; i++) {\r\n $(spantTextToReplace[i]).empty();\r\n $(spantTextToReplace[i])[0].textContent = document.querySelectorAll(\"[data-oem-brand]\")[0].getAttribute(\"data-oem-brand\");\r\n }\r\n }\r\n }\r\n \r\n}(window.jQuery));\r\n\r\n/*Analytics*/\r\nanalytics.eventConfig.push(\r\n {\r\n \"target\": \"div:not(.slide-column) > .promotion\",\r\n \"codeId\": \"prl\",\r\n \"events\": [\r\n {\r\n \"eventTarget\": \"a\",\r\n \"eventType\": \"click\",\r\n \"tags\": {\r\n \"componentId\": \"prl\",\r\n \"componentName\": \"promotion list\",\r\n \"destinationUrl\": \"\",\r\n \"elementText\": \"\",\r\n \"elementType\": [\r\n {\r\n \"rule\": \"$(context).parents('.promotion').find('.promotion-expiration .date[style*=#A6192E]').length > 0 && $(context).find('.promotion-image').length > 0\",\r\n \"value\": \"recently ended promo image\"\r\n },\r\n {\r\n \"rule\": \"$(context).parents('.promotion').find('.promotion-expiration .date[style*=#A6192E]').length > 0 && $(context).find('.promotion-image').length === 0\",\r\n \"value\": \"recently ended promo link\"\r\n },\r\n {\r\n \"rule\": \"$(context).parents('.promotion').find('.promotion-expiration .date[style*=#A6192E]').length === 0 && $(context).find('.promotion-image').length > 0\",\r\n \"value\": \"active promo image\"\r\n },\r\n {\r\n \"rule\": \"true\",\r\n \"value\": \"active promo link\"\r\n }\r\n ],\r\n \"event\": \"navigation\",\r\n \"eventType\": [\r\n {\r\n \"rule\": \"$(context).parents('.promotion').find('.promotion-expiration .date[style*=#A6192E]').length > 0\",\r\n \"value\": \"recent promo internal navigation click\"\r\n },\r\n {\r\n \"rule\": \"true\",\r\n \"value\": \"active promo internal navigation click\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n);\r\n"],"mappings":"AA8IEA,OAAOC,OA7ILC,EAAEF,QAAQG,GAAG,QAcb,WACQD,EAAE,6EAA6EE,SAC/EF,EAAE,6EAA6EG,KAAK,UAAUC,KAAK,OAAQ,UAAUA,KAAK,KAAM,uBAChIJ,EAAE,6EAA6EK,SAASD,KAAK,SAAU,KACvGJ,EAAE,6EAA6EI,KAAK,eAAgB,QAGxG,IADA,IAAIE,EAAoBN,EAAE,mCACjBO,EAAI,EAAGA,EAAID,EAAkBJ,OAAQK,IACI,KAA1CP,EAAEM,EAAkBC,IAAIC,OAAOC,QAC/BT,EAAEM,EAAkB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