(()=>{"use strict";const e=window,d=e.document;(new class{constructor(){this.isReady=!1,this.hasDirectSold=!1,this.modules=[],this.hasPlacement=!1,e._taboola=e._taboola||[],e.blogherads=e.blogherads||{},e.blogherads.adq=e.blogherads.adq||[]}init(){var d,t;const s=e.pmc_taboola||[];Array.isArray(s)&&(e.pmc_taboola=this,s&&s.length&&s.forEach((e=>{this.push(e)})),null!==(d=e.pmc)&&void 0!==d&&null!==(t=d.hooks)&&void 0!==t&&t.add_action&&e.pmc.hooks.add_action("pmc_adm_dfp_direct_sold",this.handleDirectSold.bind(this)),this.detectDirectSold()?this.handleReady():e.blogherads.adq.push((()=>{e.blogherads.addEventListener("anchorSlotRendered",this.handleAnchorSlotRendered.bind(this))})))}push(e){const d=e.pmc_defer?"deferred":"ready";delete e.pmc_defer,this.hasPlacement||(this.hasPlacement=Boolean(e.placement));const t={status:d,data:e};this.isReady&&this.renderReadyModule(t),this.modules.push(t)}handleAnchorSlotRendered(){this.alreadyHandledAnchorSlotRendered||(setTimeout(this.handleReady.bind(this),200),this.alreadyHandledAnchorSlotRendered=!0)}detectDirectSold(){var t,s;return!this.hasDirectSold&&(null!==(t=e.pmc)&&void 0!==t&&null!==(s=t.displayAds)&&void 0!==s&&s.is_direct_sold||d.documentElement.classList.contains("pmcadm-direct-sold"))&&(this.hasDirectSold=!0),this.hasDirectSold}handleDirectSold(){this.hasDirectSold=!0,this.handleReady()}handleReady(){const e=this.modules;this.isHandlingReady||(this.detectDirectSold(),this.isHandlingReady=!0,this.isReady=!0,this.hasPlacement&&e.forEach(this.renderReadyModule.bind(this)),this.isHandlingReady=!1)}renderReadyModule(d){if("ready"!==d.status)return;d.status="rendering";const t=Object.assign({},d.data);this.hasDirectSold&&t.placement&&(t.placement+=" - No Video"),e._taboola.push(t),d.status="rendered"}}).init()})();