! function a(b, c, d) { function e(g, h) { if (!c[g]) { if (!b[g]) { var i = "function" == typeof require && require; if (!h && i) return i(g, !0); if (f) return f(g, !0); var j = new Error("Cannot find module '" + g + "'"); throw j.code = "MODULE_NOT_FOUND", j } var k = c[g] = { exports: {} }; b[g][0].call(k.exports, function(a) { var c = b[g][1][a]; return e(c ? c : a) }, k, k.exports, a, b, c, d) } return c[g].exports } for (var f = "function" == typeof require && require, g = 0; g < d.length; g++) e(d[g]); return e }({ 1: [function(a, b, c) { "use strict"; var d = a("./ImageLoaded.js"), e = { create: function() { this.element = document.createElement("img"), this.element.setAttribute("src", this.src) }, preload: function(a) { d(this.element, function(b, c) { a(b, c) }) } }; b.exports = function(a) { var b = Object.create(e); return b.src = a, b.element = null, "undefined" != typeof a && b.create(), b } }, { "./ImageLoaded.js": 2 }], 2: [function(a, b, c) { "use strict"; function d(a, b) { function c(a, b, c, d) { a.addEventListener ? a[c ? "addEventListener" : "removeEventListener"](b, d) : a[c ? "attachEvent" : "detachEvent"]("on" + b, d) } function d() { c(a, "load", !1, d), c(a, "error", !1, d), b(null, !1) } var f; return a.nodeName ? "img" !== a.nodeName.toLowerCase() ? b(new Error("Element supplied is not an image")) : a.src && a.complete && void 0 !== a.naturalWidth ? b(null, !0) : (c(a, "load", !0, d), c(a, "error", !0, d), void((a.readyState || a.complete) && (f = a.src, a.src = e, a.src = f))) : b(new Error("First argument must be an image element")) } var e = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; b.exports = d }, {}], 3: [function(a, b, c) { "use strict"; var d = a("./Image.js"), e = { getImageSrcs: function(a) { if (this.sources = [], "undefined" != typeof a && (this.findImageInElement(a), this.deepSearch === !0)) for (var b = a.querySelectorAll("*"), c = 0; c < b.length; c++) "SCRIPT" !== b[c].tagName && this.findImageInElement(b[c]); return this.sources.length || this.sources.push("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"), this.sources }, findAndPreload: function(a) { if ("undefined" != typeof a) { this.sources = this.getImageSrcs(a); for (var b = 0; b < this.sources.length; b++) { var c = d(this.sources[b]); c.preload(this.imageLoaded.bind(this)), this.images.push(c) } } }, imageLoaded: function() { this.loaded++, this.updateProgress() }, updateProgress: function() { this.parent.updateProgress(this.loaded, this.sources.length) }, findImageInElement: function(a) { var b = this.determineUrlAndType(a); if (!this.hasGradient(b.url)) { b.url = this.stripUrl(b.url); for (var c = b.url.split(", "), d = 0; d < c.length; d++) if (this.validUrl(c[d]) && this.urlIsNew(c[d])) { var e = ""; (this.isIE() || this.isOpera()) && (e = "?rand=" + Math.random()), this.sources.push(c[d] + e) } } }, determineUrlAndType: function(a) { var b = "", c = "normal", d = a.currentStyle || window.getComputedStyle(a, null); return "undefined" != typeof d.backgroundImage && "" !== d.backgroundImage && "none" !== d.backgroundImage || "undefined" != typeof a.style.backgroundImage && "" !== a.style.backgroundImage && "none" !== a.style.backgroundImage ? (b = d.backgroundImage || a.style.backgroundImage, c = "background") : "img" === a.nodeName.toLowerCase() && (b = a.src), { url: b, type: c } }, hasGradient: function(a) { return !(!a || "undefined" == typeof a.indexOf) && -1 !== a.indexOf("gradient(") }, stripUrl: function(a) { return a = a.replace(/url\(\'/g, ""), a = a.replace(/url\(/g, ""), a = a.replace(/\'\)/g, ""), a = a.replace(/\)/g, ""), a = a.replace(/"/g, "") }, validUrl: function(a) { return a.length > 0 && !a.match(/^(data:)/i) }, urlIsNew: function(a) { return -1 === this.sources.indexOf(a) }, isIE: function() { return navigator.userAgent.match(/msie/i) }, isOpera: function() { return navigator.userAgent.match(/Opera/i) } }; b.exports = function(a) { var b = Object.create(e); return b.parent = a, b.sources = [], b.images = [], b.loaded = 0, b.deepSearch = !0, b } }, { "./Image.js": 1 }], 4: [function(a, b, c) { "use strict"; var d = a("./PercentageParser"), e = { create: function() { this.element = document.createElement("div"), this.element.setAttribute("class", this.className), this.setStyling(), this.updateProgress(0, 0) }, setStyling: function() { this.element.style.height = this.barHeight + "px", this.element.style.marginTop = "-" + this.barHeight / 2 + "px", this.element.style.backgroundColor = this.barColor, this.element.style.position = "absolute", this.element.style.top = "0%", this.setTransitionTime(100) }, updateProgress: function(a, b) { 0 !== b && this.setTransitionTime(b), a = d(a), this.element.style.width = a + "%" }, setTransitionTime: function(a) { this.element.style.WebkitTransition = "width " + a + "ms", this.element.style.MozTransition = "width " + a + "ms", this.element.style.OTransition = "width " + a + "ms", this.element.style.MsTransition = "width " + a + "ms", this.element.style.Transition = "width " + a + "ms" } }; b.exports = function() { var a = Object.create(e); return a.element = null, a.className = "queryloader__overlay__bar", a.barHeight = 1, a.barColor = "#fff", a } }, { "./PercentageParser": 6 }], 5: [function(a, b, c) { "use strict"; var d = a("./PercentageParser"), e = { create: function() { this.element = document.createElement("div"), this.element.setAttribute("class", this.className), this.element.setAttribute("id", this.idName), this.applyStyling(), this.updateProgress(0, 0) }, applyStyling: function() { this.element.style.height = "40px", this.element.style.width = "100%", this.element.style.position = "absolute", this.element.style.fontSize = "2.2em", this.element.style.top = "50%", this.element.style.left = "0", this.element.style.marginTop = "-" + (59 + this.barHeight) + "px", this.element.style.textAlign = "center", this.element.style.color = this.barColor, this.element.style.transform = "translateY(-50%)" }, updateProgress: function(a, b) { a = d(a), this.element.innerHTML = a + "%" } }; b.exports = function() { var a = Object.create(e); return a.element = null, a.idName = "qlPercentage", a.className = "queryloader__overlay__percentage", a.barHeight = 1, a.barColor = "#fff", a } }, { "./PercentageParser": 6 }], 6: [function(a, b, c) { "use strict"; function d(a) { return parseInt(a) < 0 ? 0 : parseInt(a) > 100 ? 100 : parseInt(a) } b.exports = d }, {}], 7: [function(a, b, c) { "use strict"; var d = a("./LoadingBar"), e = a("./Percentage"), f = { init: function() { this.create(), this.loadingBar = d(), this.loadingBar.barHeight = this.barHeight, this.loadingBar.barColor = this.barColor, this.loadingBar.create(), this.element.appendChild(this.loadingBar.element), this.showPercentage && (this.percentage = e(), this.percentage.barColor = this.barColor, this.percentage.idName = this.percentageId, this.percentage.create(), this.element.appendChild(this.percentage.element)), this.parentElement.appendChild(this.element) }, create: function() { this.element = document.querySelector("#" + this.idName) || document.createElement("div"), this.element.setAttribute("class", this.className), this.element.setAttribute("id", this.idName), this.applyStyling() }, applyStyling: function() { this.element.style.position = this.calculatePosition(), this.element.style.width = "100%", this.element.style.height = "100%", this.element.style.backgroundColor = this.backgroundColor, this.element.style.backgroundPosition = "fixed", this.element.style.zIndex = 666999, this.element.style.top = "0", this.element.style.left = "0", this.element.style.WebkitTransition = "opacity " + this.fadeOutTime + "ms", this.element.style.MozTransition = "opacity " + this.fadeOutTime + "ms", this.element.style.OTransition = "opacity " + this.fadeOutTime + "ms", this.element.style.MsTransition = "opacity " + this.fadeOutTime + "ms", this.element.style.Transition = "opacity " + this.fadeOutTime + "ms" }, calculatePosition: function() { var a = "absolute"; return "body" === this.parentElement.tagName.toLowerCase() ? a = "fixed" : "fixed" === this.parentElement.style.position && "absolute" === this.parentElement.style.position || (this.parentElement.style.position = "relative"), a }, updateProgress: function(a, b) { null !== this.loadingBar && this.loadingBar.updateProgress(a, b), null !== this.percentage && this.percentage.updateProgress(a, b) }, remove: function() { this.canRemove(this.element) && this.element.parentNode.removeChild(this.element) }, canRemove: function(a) { return a.parentNode && "undefined" != typeof a.parentNode.removeChild } }; b.exports = function(a) { var b = Object.create(f); return b.parentElement = a, b.idName = "qLoverlay", b.percentageId = "qlPercentage", b.className = "queryloader__overlay", b.element = null, b.loadingBar = null, b.percentage = null, b.barColor = "#ff0000", b.backgroundColor = "#000", b.barHeight = 1, b.fadeOutTime = 300, b.showPercentage = !1, b } }, { "./LoadingBar": 4, "./Percentage": 5 }], 8: [function(a, b, c) { Function.prototype.bind || (Function.prototype.bind = function(a) { "use strict"; if ("function" != typeof this) throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); var b = Array.prototype.slice.call(arguments, 1), c = this, d = function() {}, e = function() { return c.apply(this instanceof d && a ? this : a, b.concat(Array.prototype.slice.call(arguments))) }; return d.prototype = this.prototype, e.prototype = new d, e }), "function" != typeof Object.create && (Object.create = function() { function a() {} var b = Object.prototype.hasOwnProperty; return function(c) { if ("object" != typeof c) throw TypeError("Object prototype may only be an Object or null"); a.prototype = c; var d = new a; if (a.prototype = null, arguments.length > 1) { var e = Object(arguments[1]); for (var f in e) b.call(e, f) && (d[f] = e[f]) } return d } }()) }, {}], 9: [function(a, b, c) { "use strict"; b.exports = function() { var a = window.setInterval(function() { if ("undefined" != typeof document.getElementsByTagName("body")[0]) { var b = document.createElement("div"); b.style.position = "fixed", b.style.width = "100%", b.style.height = "100%", b.style.zIndex = "9999", b.style.backgroundColor = "#000", b.style.left = "0", b.style.top = "0", b.setAttribute("id", "qLtempOverlay"), document.getElementsByTagName("body")[0].appendChild(b), window.clearInterval(a) } }, 1) } }, {}], 10: [function(a, b, c) { "use strict"; var d = a("./../ImagePreloader"), e = a("./../Overlay"), f = { init: function(a, b) { this.options = this.extend(b, a), "undefined" != typeof this.element && (this.createOverlay(), this.removeTempOverlay(), this.createPreloader(), this.startMaxTimeout()) }, extend: function(a, b) { "undefined" == typeof a && (a = {}); for (var c in b) b.hasOwnProperty(c) && (a[c] = b[c]); return a }, startMaxTimeout: function() { this.maxTimeout = window.setTimeout(this.doneLoading.bind(this), this.options.maxTime) }, createOverlay: function() { this.overlay = e(this.element), this.overlay.idName = this.options.overlayId, this.overlay.percentageId = this.options.percentageId, this.overlay.backgroundColor = this.options.backgroundColor, this.overlay.barHeight = this.options.barHeight, this.overlay.barColor = this.options.barColor, this.overlay.showPercentage = this.options.percentage, this.overlay.fadeOutTime = this.options.fadeOutTime, "undefined" != typeof this.element && this.overlay.init() }, removeTempOverlay: function() { window.setTimeout(function() { var a = document.getElementById("qLtempOverlay"); a && a.parentNode && a.parentNode.removeChild(a) }, 0) }, createPreloader: function() { this.preloader = d(this), this.preloader.deepSearch = this.options.deepSearch, window.setTimeout(function() { this.preloader.findAndPreload(this.element) }.bind(this), 100) }, updateProgress: function(a, b) { var c = a / b * 100; this.overlay.updateProgress(c, this.options.minimumTime), "function" == typeof this.options.onProgress && this.options.onProgress(c, a, b), a === b && this.done === !1 && (window.clearTimeout(this.maxTimeout), window.setTimeout(this.doneLoading.bind(this), this.options.minimumTime)) }, doneLoading: function() { window.clearTimeout(this.maxTimeout), this.done = !0, this.overlay.element.style.opacity = 0, window.setTimeout(this.destroy.bind(this), this.options.fadeOutTime) }, destroy: function() { this.overlay.remove(), this.options.onComplete() } }; b.exports = function(a, b) { var c = Object.create(f); if (c.element = a, c.options = {}, c.done = !1, c.maxTimeout = null, c.overlay = null, c.preloader = null, null !== a) { var d = function() {}; c.init(b, { onComplete: d, onProgress: d, backgroundColor: "#000", barColor: "#fff", overlayId: "qLoverlay", percentageId: "qLpercentage", barHeight: 1, percentage: !1, deepSearch: !0, minimumTime: 300, maxTime: 1e4, fadeOutTime: 1e3 }) } return c } }, { "./../ImagePreloader": 3, "./../Overlay": 7 }], 11: [function(a, b, c) { a("./Polyfills"); var d = a("./QueryLoader"), e = a("./QueryLoader/TempOverlay"); (window.jQuery || window.Zepto) && ! function(a) { "use strict"; a.fn.queryLoader2 = function(a) { return this.each(function() { d(this, a) }) } }(window.jQuery || window.Zepto), "undefined" != typeof b && (b.exports = d), "function" == typeof define && define.amd && define([], function() { "use strict"; return d }), window.QueryLoader2 = d, e() }, { "./Polyfills": 8, "./QueryLoader": 10, "./QueryLoader/TempOverlay": 9 }] }, {}, [11]);