(()=>{!function(e){var t="advads_procfp",a="advanced_ads_ad_clicks",o=null,n=null;function i(e){try{return JSON.parse(e)}catch(e){return null}}e(document).on("advads-passive-cb-conditions",function(e,t){t.conditions.ad_clicks="check_ad_clicks",t.check_ad_clicks=function(e,t){if(advads.cookie_exists(a+"_"+t.id)){var o=advads.get_cookie(a+"_"+t.id);o=i(o)}if(o){var n=parseInt((new Date).getTime()/1e3);for(var r in o)if("_"+e.expiration==r&&o[r].ttl>=n&&o[r].count>=parseInt(e.limit))return!1}return!0}});var r=function(){this.$elements={},this.currentIFrame=!1,this.focusLost=!1,this.wrappers=[".google-auto-placed"],this.attributes={"data-anchor-status":"displayed","data-vignette-loaded":"true"},this.lastClick=0,this.init()};r.prototype={constructor:r,init:function(){const t=this;let a;e(document).on("click","a[data-cfpa]",function(){t.onClick(parseInt(e(this).attr("data-cfpa")))}),e(window).on("blur",function(e){setTimeout(function(){if(!t.currentIFrame)for(let e=document.activeElement;e&&e!==this&&e!==document&&(t.currentIFrame=t.checkWrappers(e),!t.currentIFrame);e=e.parentNode);t.currentIFrame&&(t.onClick(t.currentIFrame),t.focusLost=!0,top.focus())},0)}),e(document).on("mouseenter","div[data-cfpa]",function(){var a=parseInt(e(this).attr("data-cfpa"));t.addElement(a)}),document.addEventListener("touchmove",function(){a=!0},!1),document.addEventListener("touchstart",function(){a=!1},!1),["click","touchend"].forEach(function(e){document.addEventListener(e,function(e){if(a||t.getTimestamp()-t.lastClick<1)return;let o=null;for(let a=e.target;a&&a!==this&&a!==document;a=a.parentNode){if(o=t.checkWrappers(a),o){t.onClick(o);break}if(a.hasAttribute("data-cfpa")&&a.hasAttribute("data-cfptl")){o=parseInt(a.getAttribute("data-cfpa"),10),t.onClick(o);break}}})})},getTimestamp:function(){return Math.floor(Date.now()/1e3)},checkWrappers:function(e){for(let t=0,a=this.wrappers.length,o=null;t<a;t++)if(o=this.wrappers[t],e.matches&&e.matches(o))return".google-auto-placed"===o?"google-auto-placed":null;for(const[t,a]of Object.entries(this.attributes))if(e.hasAttribute(t)&&e.getAttribute(t)===a)return"google-auto-placed";return null},addElement:function(t){0==t instanceof jQuery&&(t=e('div[data-cfpa="'+t+'"]').first());var r=!!t.find("iframe").length;if(r||t.find("a").length){var d=parseInt(t.attr("data-cfpa"));if(this.$elements[d]=t,t.removeAttr("data-cfpa"),r?(t.find("iframe").first().attr({"data-cfpa":d}),t.attr("data-cfph")&&t.find("iframe").first().attr({"data-cfph":t.attr("data-cfph")})):(t.find("a").not(".advads-edit-button").first().attr({"data-cfpa":d}),t.attr("data-cfph")&&t.find("a").not(".advads-edit-button").first().attr({"data-cfph":t.attr("data-cfph")})),t.removeAttr("data-cfph"),advads.cookie_exists(a+"_"+d)){var c=advads.get_cookie(a+"_"+d);if(c=i(c)){var s=parseInt((new Date).getTime()/1e3),f=!1;for(var p in c)if(c.hasOwnProperty(p)&&"exp"!=p&&c[p].ttl<s){for(var u=parseFloat(p.substr(1)),v=c[p].ttl;v<s;)v+=60*u*60;c[p].ttl=v,c[p].count=0,f=!0}if(f){var l=new Date(c.exp);advads.set_cookie_sec(a+"_"+d,JSON.stringify(c,"false",!1),parseInt(l.getTime()/1e3),o,n)}}}}},_banVisitor:function(){var e=new Date,t=new Date;t.setTime(t.getTime()+24*advadsCfpInfo.cfpBan*60*60*1e3);var a=(t.getTime()-e.getTime())/1e3;advads.set_cookie_sec("advads_pro_cfp_ban",1,a,o,n),document.querySelectorAll("[data-cfpw]:not([data-cfp-exclude])").forEach(function(e){e.remove()}),this.removeEmptyWrappers(),this.wrappers.forEach(function(e){jQuery(e).remove()});for(const[e,t]of Object.entries(this.attributes))jQuery("["+e+'="'+t+'"]').remove()},removeEmptyWrappers:function(){document.querySelectorAll("[data-cfptl]:not([data-cfpw])").forEach(function(e){e.querySelectorAll("[data-cfpw]").length||e.remove()})},onClick:function(r){var d=this,c=!1,s=!1;if(this.lastClick=this.getTimestamp(),"google-auto-placed"!==r&&e('[data-cfpa="'+r+'"]').attr("data-cfph")){advads.cookie_exists(a+"_"+r)&&(s=i(advads.get_cookie(a+"_"+r)));const t=i(e('[data-cfpa="'+r+'"]').attr("data-cfph"));if(s){const e=parseInt((new Date).getTime()/1e3,10),i=document.querySelectorAll('[data-cfpw="'+r+'"]');for(var f in s)s.hasOwnProperty(f)&&"exp"!==f&&(s[f].count=parseInt(s[f].count,10)+1,s[f].ttl>=e&&s[f].count>=parseInt(t[f],10)&&(i.forEach(function(e){e.remove()}),d.removeEmptyWrappers()));var p=new Date,u=new Date(s.exp),v=parseInt((u.getTime()-p.getTime())/1e3);advads.set_cookie_sec(a+"_"+r,JSON.stringify(s,"false",!1),v,o,n)}else{var l={},m=0,h=new Date;for(var f in p=new Date,t)f=f.substring(1),parseFloat(f)>m&&(m=parseFloat(f)),l["_"+f]={count:1,ttl:parseInt(p.getTime()/1e3+3600*parseFloat(f),10)};h.setTime(h.getTime()+60*m*60*1e3);var _="expires="+h.toUTCString();v=parseInt((h.getTime()-p.getTime())/1e3),l.exp=_,advads.set_cookie_sec(a+"_"+r,JSON.stringify(l,"false",!1),v,o,n),1===t[Object.keys(t)[0]]&&(document.querySelectorAll('[data-cfpw="'+r+'"]').forEach(function(e){e.remove()}),this.removeEmptyWrappers())}}"1"===advadsCfpInfo.cfpEnabled&&(advads.cookie_exists(t+"_"+r)&&(c=i(advads.get_cookie(t+"_"+r))),c?(c.count=parseInt(c.count,10)+1,p=new Date,v=((u=new Date(c.exp)).getTime()-p.getTime())/1e3,advads.set_cookie_sec(t+"_"+r,JSON.stringify(c,"false",!1),v,o,n),parseInt(advadsCfpInfo.cfpClickLimit,10)<=c.count&&d._banVisitor()):(h=new Date,p=new Date,h.setTime(h.getTime()+60*parseInt(advadsCfpInfo.cfpExpHours,10)*60*1e3),_="expires="+h.toUTCString(),v=(h.getTime()-p.getTime())/1e3,advads.set_cookie_sec(t+"_"+r,'{"count":1,"exp":"'+_+'"}',v,o,n),1===parseInt(advadsCfpInfo.cfpClickLimit,10)&&d._banVisitor()))}},e(function(){for(var t in window.advadsProCfp=new r,e(document).on("mouseenter","iframe[data-cfpa]",function(t){var a=parseInt(e(this).attr("data-cfpa"));advadsProCfp.currentIFrame=a}).on("mouseenter",".google-auto-placed",function(e){advadsProCfp.currentIFrame="google-auto-placed"}).on("mouseleave mouseout","[data-cfpa], .google-auto-placed",function(){advadsProCfp.currentIFrame=!1,advadsProCfp.focusLost&&(advadsProCfp.focusLost=!1,e(window).trigger("focus"))}),advadsCfpQueue)advadsCfpQueue.hasOwnProperty(t)&&advadsProCfp.addElement(advadsCfpQueue[t]);advadsCfpQueue=[],void 0!==window.advadsCfpInfo.cfpPath&&(""!=advadsCfpInfo.cfpPath&&(o=advadsCfpInfo.cfpPath),""!=advadsCfpInfo.cfpDomain&&(n=advadsCfpInfo.cfpDomain))})}(window.jQuery);var e=d();if(void 0!==wpCookies){var t=wpCookies.get("advanced_ads_visitor"),a=t?JSON.parse(t):{};a.browser_width&&a.browser_width===e||n(e)}function o(){r(function(){if(e!==(e=d())){n(e);var t=window.advanced_ads_responsive||{};window.jQuery&&parseInt(t.reload_on_resize,10)&&jQuery(document).triggerHandler("advanced-ads-resize-window")}},1e3)}function n(e){if(void 0!==wpCookies){var t=advancedAds.cookieConsent,a=wpCookies.get("advanced_ads_visitor");if(void 0!==t){var o=a?JSON.parse(a):{};o.browser_width=e,wpCookies.set("advanced_ads_visitor",JSON.stringify(o),30,advanced_ads_cookies.cookie_path,advanced_ads_cookies.cookie_domain)}else wpCookies.remove("advanced_ads_visitor",advanced_ads_cookies.cookie_path,advanced_ads_cookies.cookie_domain)}}window.addEventListener?window.addEventListener("resize",o,!1):window.attachEvent&&window.attachEvent("onresize",o);var i,r=(i=0,function(e,t){clearTimeout(i),i=setTimeout(e,t)});function d(){if(window.jQuery)return jQuery(window).width();var e=0;return"number"==typeof window.innerWidth?e=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?e=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(e=document.body.clientWidth),e}})();