1"use strict";(self.webpackChunksite_client_side=self.webpackChunksite_client_side||[]).push([[113],{3070:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});class i{constructor(t){this.defaultCoupon={PrimaryImage:null,Title:null,Description:null,CampaignID:null},this.element=t}initialize(){this.getCoupons()}getCoupons(){const t=this.element.getAttribute("id"),e=this.element.getAttribute("url");$.post(e,{SiteKey:t,HHTConfig:{SiteKey:t,Implementation:"Catalog"}}).then(function(t){const e=t.Coupons?t.Coupons:new Array,n=this.getEligibleCoupon(e);this.createHtml(n)}.bind(this))}getEligibleCoupon(t){var e,n;if(!Array.isArray(t)||0===t.length)return null;let i;const a=document.getElementById("fireplaceQuoteModalSettings");if(a&&(i=null===(n=null===(e=JSON.parse(a.innerText))||void 0===e?void 0:e.fireplaceJsonData)||void 0===n?void 0:n.productDetail),!i)return console.error("No fireplace product info found. Can't show a valid coupon."),null;const l=t.filter((t=>Array.isArray(t.EligibleProducts)&&t.EligibleProducts.length>0?t.EligibleProducts.some((t=>t.ProductId===i.ProductId)):!(Array.isArray(t.EligibleBrands)&&t.EligibleBrands.length>0&&!t.EligibleBrands.some((t=>t.BrandName.toLowerCase()===i.Brand.toLowerCase()))||Array.isArray(t.EligibleCategories)&&t.EligibleCategories.length>0&&!t.EligibleCategories.some((t=>t.CategoryId===i.CategoryId))||Array.isArray(t.EligibleSubcategories)&&t.EligibleSubcategories.length>0&&!t.EligibleSubcategories.some((t=>t.SubCategoryId===i.SubCategoryId)))));return l.length>0?l[0]:null}createHtml(t){const e=document.querySelector("#rtl-slider-product .rtl-slider-slide");e&&(this.defaultCoupon.PrimaryImage=e.dataset.imgSrc),t=null!=t?t:this.defaultCoupon;const n="its-lit-coupon-modal",i=document.getElementsByTagName("head")[0],a=document.createElement("style"),l=`<div class="row hearth-and-home-coupon">\n <div id="hht-coupon" style="display:flex; flex-direction: column; align-items: center;">\n <div class="coupon-img">\n <img class="img-responsive ${null===t.PrimaryImage?"hidden":""}" src="${t.PrimaryImage}" alt="Product Coupon Image"/> \n </div>\n <div class="text-center coupon-content pad-1x ${t===this.defaultCoupon?"hidden":""}">\n <h2 class="text-uppercase"><strong>${t.Title}</strong></h2>\n <p>${t.Description}</p>\n <button class="btn btn-main margin-right-1x" \n data-target="#coupon-disclaimer-modal-${t.CampaignID}" \n data-toggle="modal" \n aria-controls="coupon-disclaimer-modal-${t.CampaignID}" \n aria-expanded="false" \n data-dotagging-event="cta_interaction"\n data-dotagging-event-action="click"\n data-dotagging-event-action-result="open"\n data-dotagging-event-owner="dealeron"\n data-dotagging-element-order="0"\n data-dotagging-element-type="item_details"\n data-dotagging-element-subtype="cta_button"\n type="button">Offer Details</button>\n <button class="btn btn-cta offer-btn" \n data-target="#its-lit-coupon-modal" \n data-toggle="modal" \n data-form-type="coupon"\n \n data-dotagging-event='cta_interaction'\n data-dotagging-event-action='click'\n data-dotagging-event-action-result='open'\n data-dotagging-event-owner='dealeron'\n data-dotagging-element-order='0'\n data-dotagging-element-type='item_details'\n data-dotagging-element-subtype='cta_button' \n data-form-title="${t.Title}"\n data-coupon-campaign="${t.CampaignID}"\n onclick="SetupCouponModal(this)">Get this offer!</button>\n </div>\n </div>\n </div>`;a.innerHTML=`\n @media only screen and (min-width: 768px) { \n #${n} .modal-content { \n margin-top: 10vh; \n } \n }\n \n #${n} .modal-header {\n background: linear-gradient(175deg,rgba(0,0,0,.4),rgba(0,0,0,.9)), url('static/dealer-${window.DlronGlobal_DealerId}/images/demo12.jpg') no-repeat center / cover;\n padding: 3em 2em;\n color: white;\n text-align: center;\n border-radius: 5px 5px 0 0;\n }\n \n #${n} .modal-header hr {\n width: 40px;\n margin: 1em auto;\n }\n \n #${n} #progressbar {\n overflow: hidden;\n }\n \n #${n} #progressbar li .bg-cta { background: #e87033 !important; }\n \n #${n} #progressbar li {\n list-style-type: none;\n width: 100%;\n float: left;\n position: relative;\n }\n \n #${n} #progressbar li a {\n text-transform: uppercase;\n letter-spacing: 1px;\n font-size: 12px;\n color: #fff;\n }\n \n #${n} #progressbar li a span {\n width: 24px;\n height: 24px;\n line-height: 24px;\n display: block;\n font-size: 12px;\n color: #333;\n background: white;\n border-radius: 25px;\n margin: 0 auto 10px auto;\n }\n \n #${n} #progressbar li a span::after {\n content:""\f040"";\n font-family: 'fontawesome';\n }\n \n #${n} #progressbar li a span.bg-cta {\n color: white;\n }\n \n #${n} #progressbar li a span.bg-cta::after {\n content:""\f00c"";\n font-family: 'fontawesome';\n }\n \n #${n} #progressbar li::after {\n content: '';\n width: 75%;\n height: 2px;\n background: white;\n position: absolute;\n left: 0;\n transform: translateX(-50%);\n top: 11px;\n opacity: .1;\n z-index: 1;\n transition: all .3s ease;\n }\n \n #${n} #progressbar li.edit-success::after {\n opacity: 1;\n background-color: #e87033;\n }\n \n #${n} #progressbar li:first-child::after {\n content: none;\n }`,this.element.innerHTML=l,this.setupOfferDetailsModal(t),i&&i.appendChild(a)}setupOfferDetailsModal(t){const e=document.createElement("div");e.innerHTML=`\x3c!-- Begin Coupon Disclaimer Modal --\x3e\n <div class="modal fade coupon-disclaimer-modal" \n id="coupon-disclaimer-modal-${t.CampaignID}" \n tabindex="-1" role="dialog" \n aria-labelledby="coupon-disclaimer-title-${t.CampaignID}">\n <div class="modal-dialog" role="document" style="width: 80%;">\n <div class="modal-content">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\n <h4 class="hidden" \n id="coupon-disclaimer-title-${t.CampaignID}">
1${t.Description}</h4>\n </div>\n <div class="modal-body text-justify">\n ${t.Disclaimer}\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>\n </div>\n </div>\n </div>\n </div>\n \x3c!-- End Coupon Disclaimer Modal --\x3e`,this.element.appendChild(e)}}class a{constructor(t){this.element=t,this.id=this.element.getAttribute("id"),this.program=this.element.getAttribute("program")||"",this.title=this.element.getAttribute("title"),this.imageUrl=this.element.getAttribute("imageurl"),this.description=this.element.getAttribute("description"),this.disclaimer=this.element.getAttribute("disclaimer"),this.expires=this.element.getAttribute("expires"),this.allSpecialsUrl=this.element.getAttribute("allspecialsurl"),this.initialize()}initialize(){var t;"hht"===(null===(t=this.program)||void 0===t?void 0:t.toLowerCase())?new i(this.element).initialize():this.loadDefaultCoupon()}loadDefaultCoupon(){this.element.innerHTML=`\n <div class="sc-large printArea">\n <div class="panel-heading bg-alt2">\n <div class="graphic">\n <img id="${this.id}-image" class="img-responsive margin-auto" alt="Coupon Image" src="${this.imageUrl}">\n </div>\n <h4 class="text-uppercase">\n <strong>${this.title}</strong>\n </h4>\n </div>\n <div class="panel-body">\n <div class="get-offer clearfix margin-bottom-1x">\n <a class="btn btn-main pull-right" href="#${this.id}-modal" data-toggle="modal" type="button">\n Offer Details\n </a>\n </div>\n <div class="offers-expiration clearfix margin-bottom-1x">\n <a class="offers pull-left" href="${this.allSpecialsUrl}">\n View All Offers\n </a>\n <span class="expire pull-right ${this.shouldShow(this.expires)}">\n Expires: <span class="exp-date">${this.expires}</span>\n </span>\n </div>\n <p class="disclaimer small text-muted">\n <small>${this.disclaimer}</small>\n </p>\n <a class="larger" role="button" data-print="${this.id}">\n <i class="fa fa-print"></i> Print\n </a>\n </div>\n </div>\n <div class="modal fade" id="${this.id}-modal" tabindex="-1" role="dialog">\n <div class="modal-dialog">\n <div class="modal-content">\n <div class="modal-header bg-cta">\n <button type="button" class="close" data-dismiss="modal">x</button>\n </div>\n <div class="modal-title bg-alt2">\n <img src="${this.imageUrl}" class="img-responsive margin-auto" alt="Ford" />\n <h3 class="modal-title text-center margin-bottom-1x">\n <strong>${this.title}</strong>\n </h3>\n </div>\n <div class="modal-body">\n <p>${this.description}</p>\n <p class="${this.shouldShow(this.expires)}">Expires: <span class="exp-date">${this.expires}</span></p>\n <p><small>${this.disclaimer}</small></p>\n <div class="clearfix"></div>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-main" data-print="${this.id}">Print</button>\n </div>\n </div>\n </div>\n </div>`,this.addPrintListeners()}shouldShow(t){if(!t||0===t.length)return"hidden"}addPrintListeners(){const t=this.element.querySelectorAll("[data-print]");if(null!==t)for(let e=0;e<t.length;e++)t[e].addEventListener("click",this.print)}print(t){const e=t.target.dataset.print,n=$(`#${e}-modal .modal-content`)[0].cloneNode(!0),i=document.createElement("div");i.id="printSection",document.body.appendChild(i),i.innerHTML="",i.appendChild(n),window.print(),i.remove()}}}}]); 2//# sourceMappingURL=couponWidgetControllerChunk.js.map?v=23.116.0+20260924.10.cf1de5f1f4d4b9684c3a72f57e64cdbc99f7122f&h=406453d39eb057c91211
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.