1/*! 2 * imagesLoaded PACKAGED v5.0.0 3 * JavaScript is all like "You images are done yet or what?" 4 * MIT License 5 */ 6!(function (t, e) { 7 "object" == typeof module && module.exports 8 ? (module.exports = e()) 9 : (t.EvEmitter = e()); 10})("undefined" != typeof window ? window : this, function () { 11 function t() {} 12 let e = t.prototype; 13 return ( 14 (e.on = function (t, e) { 15 if (!t || !e) return this; 16 let i = (this._events = this._events || {}), 17 s = (i[t] = i[t] || []); 18 return s.includes(e) || s.push(e), this; 19 }), 20 (e.once = function (t, e) { 21 if (!t || !e) return this; 22 this.on(t, e); 23 let i = (this._onceEvents = this._onceEvents || {}); 24 return ((i[t] = i[t] || {})[e] = !0), this; 25 }), 26 (e.off = function (t, e) { 27 let i = this._events && this._events[t]; 28 if (!i || !i.length) return this; 29 let s = i.indexOf(e); 30 return -1 != s && i.splice(s, 1), this; 31 }), 32 (e.emitEvent = function (t, e) { 33 let i = this._events && this._events[t]; 34 if (!i || !i.length) return this; 35 (i = i.slice(0)), (e = e || []); 36 let s = this._onceEvents && this._onceEvents[t]; 37 for (let n of i) { 38 s && s[n] && (this.off(t, n), delete s[n]), n.apply(this, e); 39 } 40 return this; 41 }), 42 (e.allOff = function () { 43 return delete this._events, delete this._onceEvents, this; 44 }), 45 t 46 ); 47}), 48 /*! 49 * imagesLoaded v5.0.0 50 * JavaScript is all like "You images are done yet or what?" 51 * MIT License 52 */ 53 (function (t, e) { 54 "object" == typeof module && module.exports 55 ? (module.exports = e(t, require("ev-emitter"))) 56 : (t.imagesLoaded = e(t, t.EvEmitter)); 57 })("undefined" != typeof window ? window : this, function (t, e) { 58 let i = t.jQuery, 59 s = t.console; 60 function n(t, e, o) { 61 if (!(this instanceof n)) return new n(t, e, o); 62 let r = t; 63 var h; 64 ("string" == typeof t && (r = document.querySelectorAll(t)), r) 65 ? ((this.elements = 66 ((h = r), 67 Array.isArray(h) 68 ? h 69 : "object" == typeof h && "number" == typeof h.length 70 ? [...h] 71 : [h])), 72 (this.options = {}), 73 "function" == typeof e 74 ? (o = e) 75 : Object.assign(this.options, e), 76 o && this.on("always", o), 77 this.getImages(), 78 i && (this.jqDeferred = new i.Deferred()), 79 setTimeout(this.check.bind(this))) 80 : s.error(`Bad element for imagesLoaded ${r || t}`); 81 } 82 (n.prototype = Object.create(e.prototype)), 83 (n.prototype.getImages = function () { 84 (this.images = []), 85 this.elements.forEach(this.addElementImages, this); 86 }); 87 const o = [1, 9, 11]; 88 n.prototype.addElementImages = function (t) { 89 "IMG" === t.nodeName && this.addImage(t), 90 !0 === this.options.background && 91 this.addElementBackgroundImages(t); 92 let { nodeType: e } = t; 93 if (!e || !o.includes(e)) return; 94 let i = t.querySelectorAll("img"); 95 for (let t of i) this.addImage(t); 96 if ("string" == typeof this.options.background) { 97 let e = t.querySelectorAll(this.options.background); 98 for (let t of e) this.addElementBackgroundImages(t); 99 } 100 }; 101 const r = /url\((['"])?(.*?)\1\)/gi; 102 function h(t) { 103 this.img = t; 104 } 105 function d(t, e) { 106 (this.url = t), (this.element = e), (this.img = new Image()); 107 } 108 return (
109 (n.prototype.addElementBackgroundImages = function (t) { 110 let e = getComputedStyle(t); 111 if (!e) return; 112 let i = r.exec(e.backgroundImage); 113 for (; null !== i; ) { 114 let s = i && i[2]; 115 s && this.addBackground(s, t), 116 (i = r.exec(e.backgroundImage)); 117 } 118 }), 119 (n.prototype.addImage = function (t) { 120 let e = new h(t); 121 this.images.push(e); 122 }), 123 (n.prototype.addBackground = function (t, e) { 124 let i = new d(t, e); 125 this.images.push(i); 126 }), 127 (n.prototype.check = function () { 128 if ( 129 ((this.progressedCount = 0), 130 (this.hasAnyBroken = !1), 131 !this.images.length) 132 ) 133 return void this.complete(); 134 let t = (t, e, i) => { 135 setTimeout(() => { 136 this.progress(t, e, i); 137 }); 138 }; 139 this.images.forEach(function (e) { 140 e.once("progress", t), e.check(); 141 }); 142 }), 143 (n.prototype.progress = function (t, e, i) { 144 this.progressedCount++, 145 (this.hasAnyBroken = this.hasAnyBroken || !t.isLoaded), 146 this.emitEvent("progress", [this, t, e]), 147 this.jqDeferred && 148 this.jqDeferred.notify && 149 this.jqDeferred.notify(this, t), 150 this.progressedCount === this.images.length && 151 this.complete(), 152 this.options.debug && s && s.log(`progress: ${i}`, t, e); 153 }), 154 (n.prototype.complete = function () { 155 let t = this.hasAnyBroken ? "fail" : "done"; 156 if ( 157 ((this.isComplete = !0), 158 this.emitEvent(t, [this]), 159 this.emitEvent("always", [this]), 160 this.jqDeferred) 161 ) { 162 let t = this.hasAnyBroken ? "reject" : "resolve"; 163 this.jqDeferred[t](this); 164 } 165 }), 166 (h.prototype = Object.create(e.prototype)), 167 (h.prototype.check = function () { 168 this.getIsImageComplete() 169 ? this.confirm(0 !== this.img.naturalWidth, "naturalWidth") 170 : ((this.proxyImage = new Image()), 171 this.img.crossOrigin && 172 (this.proxyImage.crossOrigin = this.img.crossOrigin), 173 this.proxyImage.addEventListener("load", this), 174 this.proxyImage.addEventListener("error", this), 175 this.img.addEventListener("load", this), 176 this.img.addEventListener("error", this), 177 (this.proxyImage.src = 178 this.img.currentSrc || this.img.src)); 179 }), 180 (h.prototype.getIsImageComplete = function () { 181 return this.img.complete && this.img.naturalWidth; 182 }), 183 (h.prototype.confirm = function (t, e) { 184 this.isLoaded = t; 185 let { parentNode: i } = this.img, 186 s = "PICTURE" === i.nodeName ? i : this.img; 187 this.emitEvent("progress", [this, s, e]); 188 }), 189 (h.prototype.handleEvent = function (t) { 190 let e = "on" + t.type; 191 this[e] && this[e](t); 192 }), 193 (h.prototype.onload = function () { 194 this.confirm(!0, "onload"), this.unbindEvents(); 195 }), 196 (h.prototype.onerror = function () { 197 this.confirm(!1, "onerror"), this.unbindEvents(); 198 }), 199 (h.prototype.unbindEvents = function () { 200 this.proxyImage.removeEventListener("load", this), 201 this.proxyImage.removeEventListener("error", this), 202 this.img.removeEventListener("load", this), 203 this.img.removeEventListener("error", this); 204 }), 205 (d.prototype = Object.create(h.prototype)),
206 (d.prototype.check = function () { 207 this.img.addEventListener("load", this), 208 this.img.addEventListener("error", this), 209 (this.img.src = this.url), 210 this.getIsImageComplete() && 211 (this.confirm( 212 0 !== this.img.naturalWidth, 213 "naturalWidth" 214 ), 215 this.unbindEvents()); 216 }), 217 (d.prototype.unbindEvents = function () { 218 this.img.removeEventListener("load", this), 219 this.img.removeEventListener("error", this); 220 }), 221 (d.prototype.confirm = function (t, e) { 222 (this.isLoaded = t), 223 this.emitEvent("progress", [this, this.element, e]); 224 }), 225 (n.makeJQueryPlugin = function (e) { 226 (e = e || t.jQuery) && 227 ((i = e), 228 (i.fn.imagesLoaded = function (t, e) { 229 return new n(this, t, e).jqDeferred.promise(i(this)); 230 })); 231 }), 232 n.makeJQueryPlugin(), 233 n 234 ); 235 });
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.