1/*! lazyload 1.5.5 by Andrea "verlok" Verlicchi*/ 2!function (a, b) { 3 "function" == typeof define && define.amd ? define([], b) : "object" == typeof exports ? module.exports = b() : a.LazyLoad = b() 4}(this, function () { 5 function a(a, b, c) { 6 return m ? void a.addEventListener(b, c) : void(n && (a.attachEvent("on" + b, function (a) { 7 return function () { 8 c.call(a, window.event) 9 } 10 }(a)), a = null)) 11 } 12 13 function b(a, b, c) { 14 return m ? void a.removeEventListener(b, c) : void(n && a.detachEvent("on" + b, c)) 15 } 16 17 function c(a, b, c) { 18 function d() { 19 return window.innerWidth || l.documentElement.clientWidth || document.body.clientWidth 20 } 21 22 function e() { 23 return window.innerHeight || l.documentElement.clientHeight || document.body.clientHeight 24 } 25 26 function f(a) { 27 return a.getBoundingClientRect().top + m - l.documentElement.clientTop 28 } 29 30 function g(a) { 31 return a.getBoundingClientRect().left + n - l.documentElement.clientLeft 32 } 33 34 function h() { 35 var d; 36 return d = b === window ? e() + m : f(b) + b.offsetHeight, d <= f(a) - c 37 } 38 39 function i() { 40 var e; 41 return e = b === window ? d() + window.pageXOffset : g(b) + d(), e <= g(a) - c 42 } 43 44 function j() { 45 var d; 46 return d = b === window ? m : f(b), d >= f(a) + c + a.offsetHeight 47 } 48 49 function k() { 50 var d; 51 return d = b === window ? n : g(b), d >= g(a) + c + a.offsetWidth 52 } 53 54 var l, m, n; 55 return l = a.ownerDocument, m = window.pageYOffset || l.body.scrollTop, n = window.pageXOffset || l.body.scrollLeft, !(h() || j() || i() || k()) 56 } 57 58 function d() { 59 var a = new Date; 60 return a.getTime() 61 } 62 63 function e(a, b) { 64 var c, d = {}; 65 for (c in a)a.hasOwnProperty(c) && (d[c] = a[c]); 66 for (c in b)b.hasOwnProperty(c) && (d[c] = b[c]); 67 return d 68 } 69 70 function f(a) { 71 try { 72 return Array.prototype.slice.call(a) 73 } catch (b) { 74 var c, d = [], e = a.length; 75 for (c = 0; e > c; c++)d.push(a[c]); 76 return d 77 } 78 } 79 80 function g(a, b) { 81 return o ? void a.classList.add(b) : void(a.className += (a.className ? " " : "") + b) 82 } 83 84 function h(a, b) { 85 return o ? void a.classList.remove(b) : void(a.className = a.className.replace(new RegExp("(^|\\s+)" + b + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, "")) 86 } 87 88 function i(a, b, c, d) { 89 var e = b.getAttribute("data-" + c), f = b.getAttribute("data-" + d); 90 e && a.setAttribute("srcset", e), f && a.setAttribute("src", f) 91 } 92 93 function j(a, b) { 94 return function () { 95 return a.apply(b, arguments) 96 } 97 } 98 99 function k(b) { 100 this._settings = e(l, b), this._queryOriginNode = this._settings.container === window ? document : this._settings.container, this._previousLoopTime = 0, this._loopTimeout = null, this._handleScrollFn = j(this.handleScroll, this), a(window, "resize", this._handleScrollFn), this.update() 101 } 102 103 var l = { 104 elements_selector: "img", 105 container: window, 106 threshold: 300, 107 throttle: 50, 108 data_src: "original", 109 data_srcset: "original-set", 110 class_loading: "loading", 111 class_loaded: "loaded", 112 skip_invisible: !0, 113 show_while_loading: !1, 114 callback_load: null, 115 callback_set: null, 116 callback_processed: null, 117 placeholder: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" 118 }, m = !!window.addEventListener, n = !!window.attachEvent, o = !!document.body.classList; 119 return k.prototype._showOnLoad = function (c) { 120 function d() { 121 null !== f && (f.callback_load && f.callback_load(c), i(c, c, f.data_srcset, f.data_src), f.callback_set && f.callback_set(c), h(c, f.class_loading), g(c, f.class_loaded), b(e, "load", d)) 122 } 123 124 var e, f = this._settings; 125 c.getAttribute("src") || c.setAttribute("src", f.placeholder), e = document.createElement("img"), a(e, "load", d), g(c, f.class_loading), i(e, c, f.data_srcset, f.data_src) 126 }, k.prototype._showOnAppear = function (c) { 127 function d() { 128 null !== e && (e.callback_load && e.callback_load(c), h(c, e.class_loading), g(c, e.class_loaded), b(c, "load", d)) 129 } 130 131 var e = this._settings; 132 a(c, "load", d), g(c, e.class_loading), i(c, c, e.data_srcset, e.data_src), e.callback_set && e.callback_set(c) 133 }, k.prototype._loopThroughElements = function () { 134 var a, b, d = this._settings, e = this._elements, f = e ? e.length : 0, g = []; 135 for (a = 0; f > a; a++)b = e[a], d.skip_invisible && null === b.offsetParent || c(b, d.container, d.threshold) && (d.show_while_loading ? this._showOnAppear(b) : this._showOnLoad(b), g.push(a), b.wasProcessed = !0); 136 for (; g.length > 0;)e.splice(g.pop(), 1), d.callback_processed && d.callback_processed(e.length); 137 0 === f && this._stopScrollHandler() 138 }, k.prototype._purgeElements = function () { 139 var a, b, c = this._elements, d = c.length, e = []; 140 for (a = 0; d > a; a++)b = c[a], b.wasProcessed && e.push(a); 141 for (; e.length > 0;)c.splice(e.pop(), 1) 142 }, k.prototype._startScrollHandler = function () { 143 this._isHandlingScroll || (this._isHandlingScroll = !0, a(this._settings.container, "scroll", this._handleScrollFn)) 144 }, k.prototype._stopScrollHandler = function () { 145 this._isHandlingScroll && (this._isHandlingScroll = !1, b(this._settings.container, "scroll", this._handleScrollFn)) 146 }, k.prototype.handleScroll = function () { 147 var a, b, c; 148 this._settings && (b = d(), c = this._settings.throttle, 0 !== c ? (a = c - (b - this._previousLoopTime), 0 >= a || a > c ? (this._loopTimeout && (clearTimeout(this._loopTimeout), this._loopTimeout = null), this._previousLoopTime = b, this._loopThroughElements()) : this._loopTimeout || (this._loopTimeout = setTimeout(j(function () { 149 this._previousLoopTime = d(), this._loopTimeout = null, this._loopThroughElements() 150 }, this), a))) : this._loopThroughElements()) 151 }, k.prototype.update = function () { 152 this._elements = f(this._queryOriginNode.querySelectorAll(this._settings.elements_selector)), this._purgeElements(), this._loopThroughElements(), this._startScrollHandler() 153 }, k.prototype.destroy = function () { 154 b(window, "resize", this._handleScrollFn), this._loopTimeout && (clearTimeout(this._loopTimeout), this._loopTimeout = null), this._stopScrollHandler(), this._elements = null, this._queryOriginNode = null, this._settings = null 155 }, k 156}); 157//# sourceMappingURL=lazyload.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.