var VM=VM||{};VM.Widgets={wordCount:0,noinject:!1,injects:[],container:null,init:function(){this.initProperties();this.detailsInjects();this.categoryInjects()},initProperties:function(){this.container===null&&(this.container=document.getElementById("details-body"),this.container&&(this.noinject=this.container.classList.contains("noinject"),this.wordCount=parseInt(this.container.getAttribute("data-words"),10)))},detailsInjects:function(){if(this.container){var n=document.querySelectorAll("#details-body > p");document.querySelectorAll("aside .widget-inject").forEach(function(t){VM.Widgets.inject(t,n)})}},categoryInjects:function(){if(!this.container&&(this.container=document.getElementById("category-items"),this.container)){var n=this.container.children;document.querySelectorAll("section .widget-inject").forEach(function(t){VM.Widgets.inject(t,n)})}},inject:function(n,t,i){var u,e,o,h;if(!t||t.length===0||n.classList.contains("widget-injected")||(u=VM.Widgets,e=parseInt(n.getAttribute("data-min")||0,10),e>0&&u.wordCount>0&&e>u.wordCount)||u.noinject&&!n.classList.contains("widget-inject-override"))return!0;var s=parseInt(n.getAttribute("data-per"),10)/100,c=Math.max(Math.round(s*t.length)-1,0),r=n.cloneNode(!0),f=document.createElement("div");return f.classList.add("widget","injected"),f.setAttribute("data-id",n.getAttribute("data-id")),r.classList.add("widget-injected"),n.replaceWith(f),r.data_placeholder=f,s===1?(o=document.getElementById("widget-inject-100"),o?o.appendChild(r):u.container.appendChild(r)):(h=t[c],h.insertAdjacentElement("afterend",r)),u.injects.push(r),f.data_injected=r,typeof i=="function"?i(r):void 0}};VM.Slots={requestedSlotKeys:[],hasHeaderBidding:!1,outOfPage:null,init:function(){typeof googletag!="undefined"&&(this.hasHeaderBidding=document.body.classList.contains("has-hb"),this.loadSlots(),googletag.cmd.push(function(){googletag.pubads().addEventListener("slotRenderEnded",function(n){var i=document.getElementById(n.slot.getSlotElementId()),t;i&&(t=i.parentNode,n.isEmpty?t.classList.add("slot-is-empty"):(t.classList.add("slot-show"),t.classList.contains("slot-alert")?(document.body.classList.add("has-slot-alert"),i.querySelector("iframe").height="28"):t.classList.contains("slot-leaderboard")?VM.Scroll.initLeaderboard(i):t.classList.contains("slot-footer")&&VM.Slots.processFooter(t)),t.classList.contains("slot-widget")&&VM.Slots.processWidget(t,n.isEmpty,n.size))});googletag.pubads().addEventListener("impressionViewable",function(n){document.getElementById(n.slot.getSlotElementId()).parentNode.classList.add("slot-viewed")});googletag.pubads().addEventListener("slotVisibilityChanged",function(n){n.slot.getOutOfPage()&&VM.Slots.outOfPage==="INTERSTITIAL"&&window.setTimeout(function(){googletag.destroySlots([n.slot])},15e3)})}))},processWidget:function(n,t,i){var r=n.parentNode;t?r.classList.contains("widget-inject")&&r.classList.remove("widget-injected"):i[0]===0&&r.classList.contains("widget-inject")&&r.classList.add("widget-dfp-fluid")},processFooter:function(n){n.classList.add("slot-fixed");var t=document.createElement("div");t.classList.add("slot-close");t.setAttribute("aria-label","close");t.innerHTML="×";n.appendChild(t);t.addEventListener("click",function(){n.parentNode.removeChild(n)})},loadSlots:function(){if(!document.body.classList.contains("noads")&&googletag){var n=this;document.querySelectorAll(".gam").forEach(function(t){n.loadSlot(t)});googletag.cmd.push(function(){googletag.enableServices();n.refreshSlots(VM.slots)})}},loadSlot:function(n,t){if(!n.classList.contains("widget-inject")||n.classList.contains("widget-injected")){var r=n.classList.contains("widget"),i=null;i=n.hasAttribute("data-dim")?n.getAttribute("data-dim"):window.innerWidth>767?window.innerWidth>991&&(r||window.innerWidth>1049)?n.getAttribute("data-dim-d"):n.getAttribute("data-dim-t"):n.getAttribute("data-dim-m");i?(n.setAttribute("data-size",i),n.innerHTML=r?'
<\/span><\/div>':'<\/span>',this.hasHeaderBidding&&n.getAttribute("data-lazy")==="true"?n.classList.add("lazyad"):this.buildSlotFromElement(n,function(n){typeof t=="function"?t(n):VM.slots.push(n)})):n.removeAttribute("style")}},buildSlotFromElement:function(n,t){var u=this,i={path:n.getAttribute("data-path"),slotid:this.getSlotId(n),mapping:n.getAttribute("data-mapping"),size:n.getAttribute("data-size").replace(/'/g,'"'),targeting:n.getAttribute("data-targeting")||"[]"};try{i.size=JSON.parse(i.size)}catch(r){console.error("Error parsing props.size",i.size,r);return}try{i.targeting=JSON.parse(i.targeting)}catch(r){console.error("Error parsing props.targeting",i.targeting,r);return}googletag.cmd.push(function(){var r,e,f;if(n.hasAttribute("data-oop"))if(e=n.getAttribute("data-oop"),r=googletag.defineOutOfPageSlot(i.path,googletag.enums.OutOfPageFormat[e]),r)r.addService(googletag.pubads()),u.outOfPage=e;else return;else r=googletag.defineSlot(i.path,i.size,i.slotid).addService(googletag.pubads()),i.mapping&&i.mapping!=="null"&&r.defineSizeMapping(window[i.mapping]);if(i.targeting&&i.targeting.length>0)for(f=0;f