1(self.webpackChunk=self.webpackChunk||[]).push([[105],{17281:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{var $=__webpack_require__(19755);__webpack_require__.g.LeadGenSlideUp=function(custom_config){var config=custom_config||{},thisObjectGAID=setDefault(config.id,"slideup1"),popupType=setDefault(config.popupType,"slideup"),aggressive=setDefault(config.aggressive,!1),checkNewsletter=setDefault(config.checkNewsletter,!0),daysToStore=setDefault(config.daysToStore,30),scrollThreshold=setDefault(config.scrollThreshold,300),showAfterSeconds=setDefault(config.showAfterSeconds,3),newsletterSlug=setDefault(config.newsletterSlug,"updates");showFormOnMobile=setDefault(config.showFormOnMobile,!0);var showPopupEvent=new Event("showPopup");if("slideup"==popupType)var thisObject="#lead-generation";else var thisObject="#lead-generation--modal";function setDefault(e,t){return void 0===e?t:e}var VisibleState=Object.freeze({CLOSED:0,OPEN:1}),ElementState={gaOpenSent:!1,popup:VisibleState.CLOSED,success:0,shouldWeShowPopup:!1,subscribedNewsletter:!1};function localStorageAvailable(){return"undefined"!=typeof Storage}function setPopupState(e){e==VisibleState.OPEN&&($(thisObject).addClass("open"),"slideup"==popupType&&$(thisObject).height($(thisObject+"-inner").height()+40),ElementState.gaOpenSent||(gtag("event","LeadGen Open Popup "+thisObjectGAID,{event_category:"leadgen",event_label:thisObjectGAID}),fathom.trackEvent("LeadGen Open Popup "+thisObjectGAID),ElementState.gaOpenSent=!0),localStorageAvailable()&&sessionStorage.setItem("LeadGenSlideupShown_"+thisObjectGAID,"true")),e==VisibleState.CLOSED&&$(thisObject).removeClass("open"),ElementState.popup=e}function shouldWeShowPopup(){if(localStorageAvailable()){if("true"===sessionStorage.getItem("LeadGenSlideupShown_"+thisObjectGAID))return void(ElementState.shouldWeShowPopup=!1);if(localStorage.getItem("DoNotShowLeadGenAgain_"+thisObjectGAID)&&"true"===localStorage.getItem("DoNotShowLeadGenAgain_"+thisObjectGAID))return void(ElementState.shouldWeShowPopup=!1);if(checkNewsletter&&localStorage.getItem("subscribedNewsletter_"+thisObjectGAID)&&"true"===localStorage.getItem("subscribedNewsletter_"+thisObjectGAID))return ElementState.subscribedNewsletter=!0,void(ElementState.shouldWeShowPopup=!1);if(checkNewsletter&&localStorage.getItem("subscribedNewsletter_"+thisObjectGAID)&&"false"==localStorage.getItem("subscribedNewsletter_"+thisObjectGAID))return ElementState.subscribedNewsletter=!1,ElementState.shouldWeShowPopup=!0,void window.dispatchEvent(showPopupEvent);if(!loggedIn||!checkNewsletter)return void(ElementState.shouldWeShowPopup=!0);$.ajax({url:"/newsletters/web-api/"+newsletterSlug+"/is-subscribed",success:function(e){return e.is_subscribed?(saveNewsletterSubscribed(),void(ElementState.shouldWeShowPopup=!1)):(ElementState.subscribedNewsletter=!1,localStorage.setItem("subscribedNewsletter_"+thisObjectGAID,"false"),ElementState.shouldWeShowPopup=!0,void window.dispatchEvent(showPopupEvent))}})}}function showOnScroll(e){$(window).scrollTop>scrollThreshold&&setPopupState(VisibleState.OPEN)}function hideAfterClose(){setPopupState(VisibleState.CLOSED),window.removeEventListener("scroll",showOnScroll),localStorageAvailable()&&(localStorage.setItem("DoNotShowLeadGenAgain_"+thisObjectGAID,"true"),localStorage.setItem("DoNotShowLeadGenAgainTime_"+thisObjectGAID,+new Date)),1!=ElementState.success&&(gtag("event","LeadGen Close Popup "+thisObjectGAID,{event_category:"leadgen",event_label:thisObjectGAID}),fathom.trackEvent("LeadGen Close Popup "+thisObjectGAID))}function showFullFormOnMobile(){showFormOnMobile&&($(thisObject).css("height","100vh"),$(thisObject).css("bottom","0"),$(thisObject).css("z-index","1000"),$(thisObject+"__mobile").hide(),$(thisObject+"__form-wrapper").show())}function showLoadingSpinner(){$(thisObject+" .lead-generation-button").html('Please Wait <i class="fa fa-circle-o-notch fa-spin" style="font-size: 24px !important"></i>'),$(thisObject+" .lead-generation-button").prop("disabled",!0),$(thisObject+"-form input").prop("disabled",!0)}function showThankYou(e,t){if($(thisObject+"__form-wrapper").hide(),"SUBSCRIBED"===e)$(thisObject+"__already").show();else if("UNSUBSCRIBED"===e)$(thisObject+"__unsubscribed").show();else{var o=window.location.origin+"/register?source=dgi&new=true&firstname="+t.firstname+"&lastname="+t.lastname+"&email="+t.email;$("#createAccountUrlLink").attr("href",o),$(thisObject+"__thank-you").show()}saveNewsletterSubscribed(),gtag("event","LeadGen Subscribed "+thisObjectGAID,{event_category:"leadgen",event_label:thisObjectGAID}),fathom.trackEvent("LeadGen Subscribed "+thisObjectGAID)}function saveNewsletterSubscribed(){localStorageAvailable()&&localStorage.setItem("subscribedNewsletter_"+thisObjectGAID,"true"),ElementState.subscribedNewsletter=!0}function showErrors(message){var err=eval("("+message+")");err.alreadySubscribed?($(thisObject+"__form-wrapper").hide(),$(thisObject+"__already").show(),saveNewsletterSubscribed(),gtag("event","LeadGen AlreadySubscribed "+thisObjectGAID,{event_category:"leadgen",event_label:thisObjectGAID}),fathom.trackEvent("LeadGen AlreadySubscribed "+thisObjectGAID)):($(thisObject+" .lead-generation__errors").html("Some of your information is missing or incorrect. Please try again."),$(thisObject).height("600px"),$(thisObject+" .lead-generation-button").html("Try Again"),$(thisObject+" .lead-generation-button").prop("disabled",!1),$(thisObject+"-form input").prop("disabled",!1),gtag("event","LeadGen Error "+thisObjectGAID,{event_category:"leadgen",event_label:thisObjectGAID}),fathom.trackEvent("LeadGen Error "+thisObjectGAID))}function submitForm(e){e.preventDefault(),showLoadingSpinner();var t={_token:$('input[name="_token"]').val(),email:$(thisObject+" input[name=dgi__email]").val(),firstname:$(thisObject+" input[name=dgi__firstname]").val(),lastname:$(thisObject+" input[name=dgi__lastname]").val(),newsletter_source:"DGI Slideup - "+thisObjectGAID};return $.ajax({type:"POST",url:"/newsletters/web-api/"+newsletterSlug,data:t,dataType:"json",success:function(e){showThankYou(e.previous_subscription_status,t),ElementState.success=1},error:function(e,t,o){showErrors(e.responseText)}}),!1}function resetLocalStorage(){var e;null!=localStorage.getItem("DoNotShowLeadGenAgainTime_"+thisObjectGAID)&&(e=new Date(parseInt(localStorage.getItem("DoNotShowLeadGenAgainTime_"+thisObjectGAID))),Date.dateDiff("d",e.getTime(),(new Date).getTime())>daysToStore&&(localStorage.removeItem("DoNotShowLeadGenAgain_"+thisObjectGAID),localStorage.removeItem("DoNotShowLeadGenAgainTime_"+thisObjectGAID)))}function setupTimings(){setTimeout((function(){window.addEventListener("scroll",showOnScroll)}),500),setTimeout((function(){setPopupState(VisibleState.OPEN)}),1e3*showAfterSeconds)}function componentDidMount(){resetLocalStorage(),aggressive?ElementState.shouldWeShowPopup=!0:shouldWeShowPopup(),window.addEventListener("showPopup",setupTimings)}
1function init(){componentDidMount(),$(thisObject+"-form").on("submit",submitForm),"slideup"==popupType&&(ElementState.shouldWeShowPopup&&window.dispatchEvent(showPopupEvent),$(".lead-generation-close-action").click(hideAfterClose),$(thisObject+"-button-mobile").click(showFullFormOnMobile)),"modal"==popupType&&ElementState.shouldWeShowPopup&&(ouibounce($(thisObject)[0],{cookieExpire:daysToStore,aggressive,callback:function(){$("#lead-generation").hide()}}),$(".lead-generation--modal-close-action").click((function(){$(thisObject).hide()})),$(thisObject+"-form").on("submit",submitForm))}Date.dateDiff=function(e,t,o){e=e.toLowerCase();var s=o-t;return Math.floor(s/{w:6048e5,d:864e5,h:36e5,n:6e4,s:1e3}[e])},init()}}},e=>{e.O(0,[898],(()=>{return t=17281,e(e.s=t);var t}));e.O()}]); 2//# sourceMappingURL=lead-generation.js.map
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.