{"version":3,"file":"script.min.js","sources":["script.js"],"sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i -1;\n\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n } // init boxzilla\n\n\n Boxzilla.init(); // on window.load, create DOM elements for boxes\n\n window.addEventListener('load', createBoxesFromConfig);\n})();\n\n},{\"boxzilla\":4}],2:[function(require,module,exports){\n\"use strict\";\n\nvar duration = 320;\n\nfunction css(element, styles) {\n for (var property in styles) {\n if (!styles.hasOwnProperty(property)) {\n continue;\n }\n\n element.style[property] = styles[property];\n }\n}\n\nfunction initObjectProperties(properties, value) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n\n return newObject;\n}\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\n\n\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n * @param callbackFn\n */\n\n\nfunction toggle(element, animation, callbackFn) {\n var nowVisible = element.style.display !== 'none' || element.offsetLeft > 0; // create clone for reference\n\n var clone = element.cloneNode(true);\n\n var cleanup = function cleanup() {\n element.removeAttribute('data-animated');\n element.setAttribute('style', clone.getAttribute('style'));\n element.style.display = nowVisible ? 'none' : '';\n\n if (callbackFn) {\n callbackFn();\n }\n }; // store attribute so everyone knows we're animating this element\n\n\n element.setAttribute('data-animated', 'true'); // toggle element visiblity right away if we're making something visible\n\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles;\n var visibleStyles; // animate properties\n\n if (animation === 'slide') {\n hiddenStyles = initObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], 0);\n visibleStyles = {};\n\n if (!nowVisible) {\n var computedStyles = window.getComputedStyle(element);\n visibleStyles = copyObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], computedStyles); // in some browsers, getComputedStyle returns \"auto\" value. this falls back to getBoundingClientRect() in those browsers since we need an actual height.\n\n if (!isFinite(visibleStyles.height)) {\n var clientRect = element.getBoundingClientRect();\n visibleStyles.height = clientRect.height;\n }\n\n css(element, hiddenStyles);\n } // don't show a scrollbar during animation\n\n\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = {\n opacity: 0\n };\n visibleStyles = {\n opacity: 1\n };\n\n if (!nowVisible) {\n css(element, hiddenStyles);\n }\n\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n }\n}\n\nfunction animate(element, targetStyles, fn) {\n var last = +new Date();\n var initialStyles = window.getComputedStyle(element);\n var currentStyles = {};\n var propSteps = {};\n\n for (var property in targetStyles) {\n if (!targetStyles.hasOwnProperty(property)) {\n continue;\n } // make sure we have an object filled with floats\n\n\n targetStyles[property] = parseFloat(targetStyles[property]); // calculate step size & current value\n\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]); // is there something to do?\n\n if (current === to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n\n currentStyles[property] = current;\n }\n\n var tick = function tick() {\n var now = +new Date();\n var timeSinceLastTick = now - last;\n var done = true;\n var step, to, increment, newValue;\n\n for (var _property in targetStyles) {\n if (!targetStyles.hasOwnProperty(_property)) {\n continue;\n }\n\n step = propSteps[_property];\n to = targetStyles[_property];\n increment = step * timeSinceLastTick;\n newValue = currentStyles[_property] + increment;\n\n if (step > 0 && newValue >= to || step < 0 && newValue <= to) {\n newValue = to;\n } else {\n done = false;\n } // store new value\n\n\n currentStyles[_property] = newValue;\n element.style[_property] = _property !== 'opacity' ? newValue + 'px' : newValue;\n }\n\n last = +new Date();\n\n if (!done) {\n // keep going until we're done for all props\n window.requestAnimationFrame(tick);\n } else {\n // call callback\n fn && fn();\n }\n };\n\n tick();\n}\n\nmodule.exports = {\n toggle: toggle,\n animate: animate,\n animated: animated\n};\n\n},{}],3:[function(require,module,exports){\n\"use strict\";\n\nvar defaults = {\n animation: 'fade',\n rehide: false,\n content: '',\n cookie: null,\n icon: '×',\n screenWidthCondition: null,\n position: 'center',\n testMode: false,\n trigger: false,\n closable: true\n};\n\nvar Animator = require('./animator.js');\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\n\n\nfunction merge(obj1, obj2) {\n var obj3 = {}; // add obj1 to obj3\n\n for (var attrname in obj1) {\n if (obj1.hasOwnProperty(attrname)) {\n obj3[attrname] = obj1[attrname];\n }\n } // add obj2 to obj3\n\n\n for (var _attrname in obj2) {\n if (obj2.hasOwnProperty(_attrname)) {\n obj3[_attrname] = obj2[_attrname];\n }\n }\n\n return obj3;\n}\n/**\n * Get the real height of entire document.\n * @returns {number}\n */\n\n\nfunction getDocumentHeight() {\n var body = document.body;\n var html = document.documentElement;\n return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n} // Box Object\n\n\nfunction Box(id, config, fireEvent) {\n this.id = id;\n this.fireEvent = fireEvent; // store config values\n\n this.config = merge(defaults, config); // add overlay element to dom and store ref to overlay\n\n this.overlay = document.createElement('div');\n this.overlay.style.display = 'none';\n this.overlay.id = 'boxzilla-overlay-' + this.id;\n this.overlay.classList.add('boxzilla-overlay');\n document.body.appendChild(this.overlay); // state\n\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = this.calculateTriggerHeight();\n this.cookieSet = this.isCookieSet();\n this.element = null;\n this.contentElement = null;\n this.closeIcon = null; // create dom elements for this box\n\n this.dom(); // further initialise the box\n\n this.events();\n} // initialise the box\n\n\nBox.prototype.events = function () {\n var box = this; // attach event to \"close\" icon inside box\n\n if (this.closeIcon) {\n this.closeIcon.addEventListener('click', function (evt) {\n evt.preventDefault();\n box.dismiss();\n });\n }\n\n this.element.addEventListener('click', function (evt) {\n if (evt.target.tagName === 'A' || evt.target.tagName === 'AREA') {\n box.fireEvent('box.interactions.link', [box, evt.target]);\n }\n }, false);\n this.element.addEventListener('submit', function (evt) {\n box.setCookie();\n box.fireEvent('box.interactions.form', [box, evt.target]);\n }, false);\n this.overlay.addEventListener('click', function (evt) {\n var x = evt.offsetX;\n var y = evt.offsetY; // calculate if click was less than 40px outside box to avoid closing it by accident\n\n var rect = box.element.getBoundingClientRect();\n var margin = 40; // if click was not anywhere near box, dismiss it.\n\n if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {\n box.dismiss();\n }\n });\n}; // generate dom elements for this box\n\n\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n var box = document.createElement('div');\n box.id = 'boxzilla-' + this.id;\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n var content;\n\n if (typeof this.config.content === 'string') {\n content = document.createElement('div');\n content.innerHTML = this.config.content;\n } else {\n content = this.config.content; // make sure element is visible\n\n content.style.display = '';\n }\n\n content.className = 'boxzilla-content';\n box.appendChild(content);\n\n if (this.config.closable && this.config.icon) {\n var closeIcon = document.createElement('span');\n closeIcon.className = 'boxzilla-close-icon';\n closeIcon.innerHTML = this.config.icon;\n closeIcon.setAttribute('aria-label', 'close');\n box.appendChild(closeIcon);\n this.closeIcon = closeIcon;\n }\n\n document.body.appendChild(wrapper);\n this.contentElement = content;\n this.element = box;\n}; // set (calculate) custom box styling depending on box options\n\n\nBox.prototype.setCustomBoxStyling = function () {\n // reset element to its initial state\n var origDisplay = this.element.style.display;\n this.element.style.display = '';\n this.element.style.overflowY = '';\n this.element.style.maxHeight = ''; // get new dimensions\n\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight; // add scrollbar to box and limit height\n\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + 'px';\n this.element.style.overflowY = 'scroll';\n } // set new top margin for boxes which are centered\n\n\n if (this.config.position === 'center') {\n var newTopMargin = (windowHeight - boxHeight) / 2;\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + 'px';\n }\n\n this.element.style.display = origDisplay;\n}; // toggle visibility of the box\n\n\nBox.prototype.toggle = function (show, animate) {\n show = typeof show === 'undefined' ? !this.visible : show;\n animate = typeof animate === 'undefined' ? true : animate; // is box already at desired visibility?\n\n if (show === this.visible) {\n return false;\n } // is box being animated?\n\n\n if (Animator.animated(this.element)) {\n return false;\n } // if box should be hidden but is not closable, bail.\n\n\n if (!show && !this.config.closable) {\n return false;\n } // set new visibility status\n\n\n this.visible = show; // calculate new styling rules\n\n this.setCustomBoxStyling(); // trigger event\n\n this.fireEvent('box.' + (show ? 'show' : 'hide'), [this]); // show or hide box using selected animation\n\n if (this.config.position === 'center') {\n this.overlay.classList.toggle('boxzilla-' + this.id + '-overlay');\n\n if (animate) {\n Animator.toggle(this.overlay, 'fade');\n } else {\n this.overlay.style.display = show ? '' : 'none';\n }\n }\n\n if (animate) {\n Animator.toggle(this.element, this.config.animation, function () {\n if (this.visible) {\n return;\n }\n\n this.contentElement.innerHTML = this.contentElement.innerHTML + '';\n }.bind(this));\n } else {\n this.element.style.display = show ? '' : 'none';\n }\n\n return true;\n}; // show the box\n\n\nBox.prototype.show = function (animate) {\n return this.toggle(true, animate);\n}; // hide the box\n\n\nBox.prototype.hide = function (animate) {\n return this.toggle(false, animate);\n}; // calculate trigger height\n\n\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger) {\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n\n if (triggerElement) {\n var offset = triggerElement.getBoundingClientRect();\n triggerHeight = offset.top;\n }\n } else if (this.config.trigger.method === 'percentage') {\n triggerHeight = this.config.trigger.value / 100 * getDocumentHeight();\n }\n }\n\n return triggerHeight;\n};\n\nBox.prototype.fits = function () {\n if (!this.config.screenWidthCondition || !this.config.screenWidthCondition.value) {\n return true;\n }\n\n switch (this.config.screenWidthCondition.condition) {\n case 'larger':\n return window.innerWidth > this.config.screenWidthCondition.value;\n\n case 'smaller':\n return window.innerWidth < this.config.screenWidthCondition.value;\n } // meh.. condition should be \"smaller\" or \"larger\", just return true.\n\n\n return true;\n};\n\nBox.prototype.onResize = function () {\n this.triggerHeight = this.calculateTriggerHeight();\n this.setCustomBoxStyling();\n}; // is this box enabled?\n\n\nBox.prototype.mayAutoShow = function () {\n if (this.dismissed) {\n return false;\n } // check if box fits on given minimum screen width\n\n\n if (!this.fits()) {\n return false;\n } // if trigger empty or error in calculating triggerHeight, return false\n\n\n if (!this.config.trigger) {\n return false;\n } // rely on cookie value (show if not set, don't show if set)\n\n\n return !this.cookieSet;\n};\n\nBox.prototype.mayRehide = function () {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function () {\n // always show on test mode or when no auto-trigger is configured\n if (this.config.testMode || !this.config.trigger) {\n return false;\n } // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n\n\n if (!this.config.cookie || !this.config.cookie.triggered && !this.config.cookie.dismissed) {\n return false;\n }\n\n return document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + 'boxzilla_box_' + this.id + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1') === 'true';\n}; // set cookie that disables automatically showing the box\n\n\nBox.prototype.setCookie = function (hours) {\n var expiryDate = new Date();\n expiryDate.setHours(expiryDate.getHours() + hours);\n document.cookie = 'boxzilla_box_' + this.id + '=true; expires=' + expiryDate.toUTCString() + '; path=/';\n};\n\nBox.prototype.trigger = function () {\n var shown = this.show();\n\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\n }\n};\n/**\n * Dismisses the box and optionally sets a cookie.\n * @param animate\n * @returns {boolean}\n */\n\n\nBox.prototype.dismiss = function (animate) {\n // only dismiss box if it's currently open.\n if (!this.visible) {\n return false;\n } // hide box element\n\n\n this.hide(animate); // set cookie\n\n if (this.config.cookie && this.config.cookie.dismissed) {\n this.setCookie(this.config.cookie.dismissed);\n }\n\n this.dismissed = true;\n this.fireEvent('box.dismiss', [this]);\n return true;\n};\n\nmodule.exports = Box;\n\n},{\"./animator.js\":2}],4:[function(require,module,exports){\n\"use strict\";\n\nvar Box = require('./box.js');\n\nvar throttle = require('./util.js').throttle;\n\nvar styles = require('./styles.js');\n\nvar ExitIntent = require('./triggers/exit-intent.js');\n\nvar Scroll = require('./triggers/scroll.js');\n\nvar Pageviews = require('./triggers/pageviews.js');\n\nvar Time = require('./triggers/time.js');\n\nvar initialised = false;\nvar boxes = [];\nvar listeners = {};\n\nfunction onKeyUp(evt) {\n if (evt.key === 'Escape' || evt.key === 'Esc') {\n dismiss();\n }\n}\n\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n return box.onResize();\n });\n}\n\nfunction onElementClick(evt) {\n // bubble up to or element\n var el = evt.target;\n\n for (var i = 0; i <= 3; i++) {\n if (!el || el.tagName === 'A' || el.tagName === 'AREA') {\n break;\n }\n\n el = el.parentElement;\n }\n\n if (!el || el.tagName !== 'A' && el.tagName !== 'AREA' || !el.href) {\n return;\n }\n\n var match = el.href.match(/[#&]boxzilla-(.+)/i);\n\n if (match && match.length > 1) {\n toggle(match[1]);\n }\n}\n\nfunction trigger(event, args) {\n listeners[event] && listeners[event].forEach(function (f) {\n return f.apply(null, args);\n });\n}\n\nfunction on(event, fn) {\n listeners[event] = listeners[event] || [];\n listeners[event].push(fn);\n}\n\nfunction off(event, fn) {\n listeners[event] && listeners[event].filter(function (f) {\n return f !== fn;\n });\n} // initialise & add event listeners\n\n\nfunction init() {\n if (initialised) {\n return;\n } // insert styles into DOM\n\n\n var styleElement = document.createElement('style');\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement); // init triggers\n\n ExitIntent(boxes);\n Pageviews(boxes);\n Scroll(boxes);\n Time(boxes);\n document.body.addEventListener('click', onElementClick, true);\n window.addEventListener('resize', throttle(recalculateHeights));\n window.addEventListener('load', recalculateHeights);\n document.addEventListener('keyup', onKeyUp);\n trigger('ready');\n initialised = true; // ensure this function doesn't run again\n}\n\nfunction create(id, opts) {\n // preserve backwards compat for minimumScreenWidth option\n if (typeof opts.minimumScreenWidth !== 'undefined') {\n opts.screenWidthCondition = {\n condition: 'larger',\n value: opts.minimumScreenWidth\n };\n }\n\n id = String(id);\n var box = new Box(id, opts, trigger);\n boxes.push(box);\n return box;\n}\n\nfunction get(id) {\n id = String(id);\n\n for (var i = 0; i < boxes.length; i++) {\n if (boxes[i].id === id) {\n return boxes[i];\n }\n }\n\n throw new Error('No box exists with ID ' + id);\n} // dismiss a single box (or all by omitting id param)\n\n\nfunction dismiss(id, animate) {\n if (id) {\n get(id).dismiss(animate);\n } else {\n boxes.forEach(function (box) {\n return box.dismiss(animate);\n });\n }\n}\n\nfunction hide(id, animate) {\n if (id) {\n get(id).hide(animate);\n } else {\n boxes.forEach(function (box) {\n return box.hide(animate);\n });\n }\n}\n\nfunction show(id, animate) {\n if (id) {\n get(id).show(animate);\n } else {\n boxes.forEach(function (box) {\n return box.show(animate);\n });\n }\n}\n\nfunction toggle(id, animate) {\n if (id) {\n get(id).toggle(animate);\n } else {\n boxes.forEach(function (box) {\n return box.toggle(animate);\n });\n }\n} // expose boxzilla object\n\n\nvar Boxzilla = {\n off: off,\n on: on,\n get: get,\n init: init,\n create: create,\n trigger: trigger,\n show: show,\n hide: hide,\n dismiss: dismiss,\n toggle: toggle,\n boxes: boxes\n};\nwindow.Boxzilla = Boxzilla;\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = Boxzilla;\n}\n\n},{\"./box.js\":3,\"./styles.js\":5,\"./triggers/exit-intent.js\":7,\"./triggers/pageviews.js\":8,\"./triggers/scroll.js\":9,\"./triggers/time.js\":10,\"./util.js\":11}],5:[function(require,module,exports){\n\"use strict\";\n\nvar styles = \"#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}\";\nmodule.exports = styles;\n\n},{}],6:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = function Timer() {\n this.time = 0;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function () {\n this.time++;\n};\n\nTimer.prototype.start = function () {\n if (!this.interval) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function () {\n if (this.interval) {\n window.clearInterval(this.interval);\n this.interval = 0;\n }\n};\n\nmodule.exports = Timer;\n\n},{}],7:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var timeout = null;\n var touchStart = {};\n\n function trigger() {\n document.documentElement.removeEventListener('mouseleave', onMouseLeave);\n document.documentElement.removeEventListener('mouseenter', onMouseEnter);\n document.documentElement.removeEventListener('click', clearTimeout);\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchend', onTouchEnd); // show boxes with exit intent trigger\n\n boxes.forEach(function (box) {\n if (box.mayAutoShow() && box.config.trigger.method === 'exit_intent') {\n box.trigger();\n }\n });\n }\n\n function clearTimeout() {\n if (timeout === null) {\n return;\n }\n\n window.clearTimeout(timeout);\n timeout = null;\n }\n\n function onMouseEnter() {\n clearTimeout();\n }\n\n function getAddressBarY() {\n if (document.documentMode || /Edge\\//.test(navigator.userAgent)) {\n return 5;\n }\n\n return 0;\n }\n\n function onMouseLeave(evt) {\n clearTimeout(); // did mouse leave at top of window?\n // add small exception space in the top-right corner\n\n if (evt.clientY <= getAddressBarY() && evt.clientX < 0.8 * window.innerWidth) {\n timeout = window.setTimeout(trigger, 600);\n }\n }\n\n function onTouchStart() {\n clearTimeout();\n touchStart = {\n timestamp: performance.now(),\n scrollY: window.scrollY,\n windowHeight: window.innerHeight\n };\n }\n\n function onTouchEnd(evt) {\n clearTimeout(); // did address bar appear?\n\n if (window.innerHeight > touchStart.windowHeight) {\n return;\n } // allow a tiny tiny margin for error, to not fire on clicks\n\n\n if (window.scrollY + 20 > touchStart.scrollY) {\n return;\n }\n\n if (performance.now() - touchStart.timestamp > 300) {\n return;\n }\n\n if (['A', 'INPUT', 'BUTTON'].indexOf(evt.target.tagName) > -1) {\n return;\n }\n\n timeout = window.setTimeout(trigger, 800);\n }\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchend', onTouchEnd);\n document.documentElement.addEventListener('mouseenter', onMouseEnter);\n document.documentElement.addEventListener('mouseleave', onMouseLeave);\n document.documentElement.addEventListener('click', clearTimeout);\n};\n\n},{}],8:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var pageviews;\n\n try {\n pageviews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n sessionStorage.setItem('boxzilla_pageviews', ++pageviews);\n } catch (e) {\n pageviews = 0;\n }\n\n window.setTimeout(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'pageviews' && pageviews > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{}],9:[function(require,module,exports){\n\"use strict\";\n\nvar throttle = require('../util.js').throttle;\n\nmodule.exports = function (boxes) {\n // check triggerHeight criteria for all boxes\n function checkHeightCriteria() {\n var scrollY = window.hasOwnProperty('pageYOffset') ? window.pageYOffset : window.scrollTop;\n scrollY = scrollY + window.innerHeight * 0.9;\n boxes.forEach(function (box) {\n if (!box.mayAutoShow() || box.triggerHeight <= 0) {\n return;\n }\n\n if (scrollY > box.triggerHeight) {\n box.trigger();\n } else if (box.mayRehide() && scrollY < box.triggerHeight - 5) {\n // if box may auto-hide and scrollY is less than triggerHeight (with small margin of error), hide box\n box.hide();\n }\n });\n }\n\n window.addEventListener('touchstart', throttle(checkHeightCriteria), true);\n window.addEventListener('scroll', throttle(checkHeightCriteria), true);\n};\n\n},{\"../util.js\":11}],10:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = require('../timer.js');\n\nmodule.exports = function (boxes) {\n var siteTimer = new Timer();\n var pageTimer = new Timer();\n var timers = {\n start: function start() {\n try {\n var sessionTime = parseInt(sessionStorage.getItem('boxzilla_timer'));\n\n if (sessionTime) {\n siteTimer.time = sessionTime;\n }\n } catch (e) {}\n\n siteTimer.start();\n pageTimer.start();\n },\n stop: function stop() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n }; // start timers\n\n timers.start(); // stop timers when leaving page or switching to other tab\n\n document.addEventListener('visibilitychange', function () {\n document.hidden ? timers.stop() : timers.start();\n });\n window.addEventListener('beforeunload', function () {\n timers.stop();\n });\n window.setInterval(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n } else if (box.config.trigger.method === 'time_on_page' && pageTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{\"../timer.js\":6}],11:[function(require,module,exports){\n\"use strict\";\n\nfunction throttle(fn, threshold, scope) {\n threshold || (threshold = 800);\n var last;\n var deferTimer;\n return function () {\n var context = scope || this;\n var now = +new Date();\n var args = arguments;\n\n if (last && now < last + threshold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\nmodule.exports = {\n throttle: throttle\n};\n\n},{}]},{},[1]);\n; })();"],"names":["require","undefined","r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","module","_typeof","obj","Symbol","iterator","constructor","prototype","Boxzilla","options","isLoggedIn","window","boxzilla_options","document","body","className","indexOf","testMode","console","log","init","addEventListener","inited","key","boxes","boxOpts","boxContentElement","getElementById","id","content","box","create","element","post","slug","styles","css","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","firstChild","lastChild","fits","location","hash","match","elementId","querySelector","locationHashRefersBox","show","trigger","mc4wp_forms_config","submitted_form","mc4wp_submitted_form","selector","element_id","forEach","maybeOpenMailChimpForWordPressBox","boxzilla","2","duration","property","hasOwnProperty","animate","targetStyles","fn","to","current","last","Date","initialStyles","getComputedStyle","currentStyles","propSteps","parseFloat","tick","step","newValue","_property","timeSinceLastTick","done","increment","requestAnimationFrame","toggle","animation","callbackFn","cleanup","removeAttribute","setAttribute","clone","getAttribute","display","nowVisible","visibleStyles","hiddenStyles","offsetLeft","cloneNode","properties","value","newObject","initObjectProperties","object","copyObjectProperties","isFinite","height","clientRect","getBoundingClientRect","overflowY","opacity","animated","3","defaults","rehide","cookie","icon","screenWidthCondition","position","closable","Animator","Box","config","fireEvent","this","obj1","obj2","attrname","_attrname","obj3","merge","overlay","createElement","classList","add","appendChild","visible","dismissed","triggered","triggerHeight","calculateTriggerHeight","cookieSet","isCookieSet","contentElement","closeIcon","dom","events","evt","preventDefault","dismiss","target","tagName","setCookie","x","offsetX","y","offsetY","rect","left","right","top","bottom","wrapper","innerHTML","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","clientHeight","newTopMargin","marginTop","bind","hide","html","method","triggerElement","documentElement","Math","max","scrollHeight","offsetHeight","condition","innerWidth","onResize","mayAutoShow","mayRehide","replace","RegExp","hours","expiryDate","setHours","getHours","toUTCString","./animator.js","4","throttle","ExitIntent","Scroll","Pageviews","Time","initialised","listeners","onKeyUp","recalculateHeights","onElementClick","el","parentElement","href","event","args","apply","get","String","off","filter","on","push","styleElement","head","opts","minimumScreenWidth","./box.js","./styles.js","./triggers/exit-intent.js","./triggers/pageviews.js","./triggers/scroll.js","./triggers/time.js","./util.js","5","6","Timer","time","interval","start","setInterval","stop","clearInterval","7","timeout","touchStart","removeEventListener","onMouseLeave","onMouseEnter","clearTimeout","onTouchStart","onTouchEnd","clientY","documentMode","test","navigator","userAgent","clientX","setTimeout","timestamp","performance","now","scrollY","8","pageviews","sessionStorage","getItem","setItem","9","checkHeightCriteria","pageYOffset","scrollTop","../util.js","10","siteTimer","pageTimer","timers","sessionTime","hidden","../timer.js","11","threshold","scope","deferTimer","context","arguments"],"mappings":"CAAA,WAAe,IAAIA,OAAUC,GAAgG,SAASC,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,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