!function(a){var f="advads_procfp",b="advanced_ads_ad_clicks",c=null,d=null,g;function e(a){try{return JSON.parse(a)}catch(a){return null}}a(document).on("advads-passive-cb-conditions",function(c,a){a.conditions.ad_clicks="check_ad_clicks",a.check_ad_clicks=function(d,f){var a,g,c;if(advads.cookie_exists(b+"_"+f.id)&&(a=advads.get_cookie(b+"_"+f.id),a=e(a)),a){g=parseInt((new Date).getTime()/1e3);for(c in a)if("_"+d.expiration==c&&a[c].ttl>=g&&a[c].count>=parseInt(d.limit))return!1}return!0}}),g=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()},g.prototype={constructor:g,init:function(){const b=this;let c;a(document).on("click","a[data-cfpa]",function(){b.onClick(parseInt(a(this).attr("data-cfpa")))}),a(window).on("blur",function(a){setTimeout(function(){if(!b.currentIFrame)for(let a=document.activeElement;a&&a!==this&&a!==document&&(b.currentIFrame=b.checkWrappers(a),!b.currentIFrame);a=a.parentNode);b.currentIFrame&&(b.onClick(b.currentIFrame),b.focusLost=!0,top.focus())},0)}),a(document).on("mouseenter","div[data-cfpa]",function(){var c=parseInt(a(this).attr("data-cfpa"));b.addElement(c)}),document.addEventListener("touchmove",function(){c=!0},!1),document.addEventListener("touchstart",function(){c=!1},!1),["click","touchend"].forEach(function(a){document.addEventListener(a,function(d){if(c||b.getTimestamp()-b.lastClick<1)return;let a=null;for(let c=d.target;c&&c!==this&&c!==document;c=c.parentNode){if(a=b.checkWrappers(c),a){b.onClick(a);break}if(c.hasAttribute("data-cfpa")&&c.hasAttribute("data-cfptl")){a=parseInt(c.getAttribute("data-cfpa"),10),b.onClick(a);break}}})})},getTimestamp:function(){return Math.floor(Date.now()/1e3)},checkWrappers:function(a){for(let b=0,d=this.wrappers.length,c=null;b<d;b++)if(c=this.wrappers[b],a.matches&&a.matches(c))return".google-auto-placed"===c?"google-auto-placed":null;for(const[b,c]of Object.entries(this.attributes))if(a.hasAttribute(b)&&a.getAttribute(b)===c)return"google-auto-placed";return null},addElement:function(f){var k,i,g,l,m,h,n,j,o;if(!1==f instanceof jQuery&&(f=a('div[data-cfpa="'+f+'"]').first()),k=!!f.find("iframe").length,k||f.find("a").length)if(i=parseInt(f.attr("data-cfpa")),this.$elements[i]=f,f.removeAttr("data-cfpa"),k?(f.find("iframe").first().attr({"data-cfpa":i}),f.attr("data-cfph")&&f.find("iframe").first().attr({"data-cfph":f.attr("data-cfph")})):(f.find("a").not(".advads-edit-button").first().attr({"data-cfpa":i}),f.attr("data-cfph")&&f.find("a").not(".advads-edit-button").first().attr({"data-cfph":f.attr("data-cfph")})),f.removeAttr("data-cfph"),advads.cookie_exists(b+"_"+i))if(g=advads.get_cookie(b+"_"+i),g=e(g)){l=parseInt((new Date).getTime()/1e3),m=!1;for(h in g)if(g.hasOwnProperty(h)&&"exp"!=h&&g[h].ttl<l){for(n=parseFloat(h.substr(1)),j=g[h].ttl;j<l;)j+=60*n*60;g[h].ttl=j,g[h].count=0,m=!0}m&&(o=new Date(g.exp),advads.set_cookie_sec(b+"_"+i,JSON.stringify(g,"false",!1),parseInt(o.getTime()/1e3),c,d))}},_banVisitor:function(){var b=new Date,a=new Date,e;a.setTime(a.getTime()+24*advadsCfpBan*60*60*1e3),e=(a.getTime()-b.getTime())/1e3,advads.set_cookie_sec("advads_pro_cfp_ban",1,e,c,d),document.querySelectorAll("[data-cfpw]:not([data-cfp-exclude])").forEach(function(a){a.remove()}),this.removeEmptyWrappers(),this.wrappers.forEach(function(a){jQuery(a).remove()});for(const[a,b]of Object.entries(this.attributes))jQuery("["+a+'="'+b+'"]').remove()},removeEmptyWrappers:function(){document.querySelectorAll("[data-cfptl]:not([data-cfpw])").forEach(function(a){a.querySelectorAll("[data-cfpw]").length||a.remove()})},onClick:function(h){var n=this,m=!1,i=!1,g,k,r,l,o,p,j,q;if(this.lastClick=this.getTimestamp(),"google-auto-placed"!==h&&a('[data-cfpa="'+h+'"]').attr("data-cfph")){advads.cookie_exists(b+"_"+h)&&(i=e(advads.get_cookie(b+"_"+h)));const f=e(a('[data-cfpa="'+h+'"]').attr("data-cfph"));if(i){const a=parseInt((new Date).getTime()/1e3,10),e=document.querySelectorAll('[data-cfpw="'+h+'"]');for(g in i)i.hasOwnProperty(g)&&"exp"!==g&&(i[g].count=parseInt(i[g].count,10)+1,i[g].ttl>=a&&i[g].count>=parseInt(f[g],10)&&(e.forEach(function(a){a.remove()}),n.removeEmptyWrappers()));k=new Date,r=new Date(i.exp),l=parseInt((r.getTime()-k.getTime())/1e3),advads.set_cookie_sec(b+"_"+h,JSON.stringify(i,"false",!1),l,c,d)}else{o={},p=0,j=new Date,k=new Date;for(g in f)g=g.substring(1),parseFloat(g)>p&&(p=parseFloat(g)),o["_"+g]={count:1,ttl:parseInt(k.getTime()/1e3+3600*parseFloat(g),10)};j.setTime(j.getTime()+60*p*60*1e3),q="expires="+j.toUTCString(),l=parseInt((j.getTime()-k.getTime())/1e3),o.exp=q,advads.set_cookie_sec(b+"_"+h,JSON.stringify(o,"false",!1),l,c,d)}}advads.cookie_exists(f+"_"+h)&&(m=e(advads.get_cookie(f+"_"+h))),m?(m.count=parseInt(m.count,10)+1,k=new Date,l=((r=new Date(m.exp)).getTime()-k.getTime())/1e3,advads.set_cookie_sec(f+"_"+h,JSON.stringify(m,"false",!1),l,c,d),advadsCfpClickLimit<=m.count&&"undefined"!=typeof advadsCfpBan&&n._banVisitor()):(j=new Date,k=new Date,j.setTime(j.getTime()+60*advadsCfpExpHours*60*1e3),q="expires="+j.toUTCString(),l=(j.getTime()-k.getTime())/1e3,advads.set_cookie_sec(f+"_"+h,'{"count":1,"exp":"'+q+'"}',l,c,d),1===advadsCfpClickLimit&&"undefined"!=typeof advadsCfpBan&&n._banVisitor())}},a(function(){for(var b in window.advadsProCfp=new g,a(document).on("mouseenter","iframe[data-cfpa]",function(c){var b=parseInt(a(this).attr("data-cfpa"));advadsProCfp.currentIFrame=b}).on("mouseenter",".google-auto-placed",function(a){advadsProCfp.currentIFrame="google-auto-placed"}).on("mouseleave mouseout","[data-cfpa], .google-auto-placed",function(){advadsProCfp.currentIFrame=!1,advadsProCfp.focusLost&&(advadsProCfp.focusLost=!1,a(window).trigger("focus"))}),advadsCfpQueue)advadsCfpQueue.hasOwnProperty(b)&&advadsProCfp.addElement(advadsCfpQueue[b]);advadsCfpQueue=[],void 0!==window.advadsCfpPath&&(""!=advadsCfpPath&&(c=advadsCfpPath),""!=advadsCfpDomain&&(d=advadsCfpDomain))})}(window.jQuery)