/* eslint-disable */
/* One day we'll make this file mean something */
import $ from './jQuery';
export default function responsiveAdScript() {
  const b = function () {
    const a = document.createElement('p');
    a.style.width = '100%';
    a.style.height = '200px';
    const b = document.createElement('div');
    b.style.position = 'absolute';
    b.style.top = '0px';
    b.style.left = '0px';
    b.style.visibility = 'hidden';
    b.style.width = '200px';
    b.style.height = '150px';
    b.style.overflow = 'hidden';
    b.appendChild(a);
    window.document.body.appendChild(b);
    const c = a.offsetWidth;
    b.style.overflow = 'scroll';
    let d = a.offsetWidth;
    return c === d && (d = b.clientWidth), document.body.removeChild(b), c - d;
  };
  const c = function c() {
    typeof googletag !== 'undefined' && window.googletag.cmd.push(() => {
      window.googletag.pubads().refresh();
    });
  };
  const d = function d() {
    let a = 'alpha';
    return i >= 748 && i < 990 ? a = 'beta' : i >= 990 && i < l ? a = 'gamma' : i >= l && i < 1028 ? a = 'delta' : i >= 1028 && (a = 'epsilon'), a != 'epsilon' && a != 'delta' && ($('.global-utility-bar .reveal-toggle .reveal').removeClass('is-active'), $('.utility-bar-bottom').removeClass('is-active'), $('.dynamic-ad-wrapper .ad-slot').remove(), $('.global-utility-bar .dynamic-ad-wrapper').html('')), a;
  };
  const e = {
    currentAdThreshold: ''
  };
  const f = function f() {
    const a = d();
    e.currentAdThreshold !== a && (e.currentAdThreshold = a, c());
  };
  const g = function g() {
    e.currentAdThreshold = d();
  };
  $(window).on('resize', () => {
    i = document.documentElement.clientWidth + h, f();
  });
  var h = b();
  var i = document.documentElement.clientWidth + h;
  var l = 1012;
  g();
}