PageSourceSearch

https://spidersoftwareindia.com/js/imagesloaded.pkgd.min.js

js spidersoftwareindia.com collected 2026-10-09 00:14:50 UTC 7,414 bytes, 165 lines download raw bytes

vendor: 4,113 bytes, lines 1-114
1/*!
2 * imagesLoaded PACKAGED v4.1.0
3 * JavaScript is all like "You images are done yet or what?"
4 * MIT License
5 */
6
7! function(t, e) {
8    "function" == typeof define && define.amd ? define("ev-emitter/ev-emitter", e) : "object" == typeof module && module.exports ? module.exports = e() : t.EvEmitter = e()
9}(this, function() {
10    function t() {}
11    var e = t.prototype;
12    return e.on = function(t, e) {
13        if (t && e) {
14            var i = this._events = this._events || {},
15                n = i[t] = i[t] || [];
16            return -1 == n.indexOf(e) && n.push(e), this
17        }
18    }, e.once = function(t, e) {
19        if (t && e) {
20            this.on(t, e);
21            var i = this._onceEvents = this._onceEvents || {},
22                n = i[t] = i[t] || [];
23            return n[e] = !0, this
24        }
25    }, e.off = function(t, e) {
26        var i = this._events && this._events[t];
27        if (i && i.length) {
28            var n = i.indexOf(e);
29            return -1 != n && i.splice(n, 1), this
30        }
31    }, e.emitEvent = function(t, e) {
32        var i = this._events && this._events[t];
33        if (i && i.length) {
34            var n = 0,
35                o = i[n];
36            e = e || [];
37            for (var r = this._onceEvents && this._onceEvents[t]; o;) {
38                var s = r && r[o];
39                s && (this.off(t, o), delete r[o]), o.apply(this, e), n += s ? 0 : 1, o = i[n]
40            }
41            return this
42        }
43    }, t
44}),
45function(t, e) {
46    "use strict";
47    "function" == typeof define && define.amd ? define(["ev-emitter/ev-emitter"], function(i) {
48        return e(t, i)
49    }) : "object" == typeof module && module.exports ? module.exports = e(t, require("ev-emitter")) : t.imagesLoaded = e(t, t.EvEmitter)
50}(window, function(t, e) {
51    function i(t, e) {
52        for (var i in e) t[i] = e[i];
53        return t
54    }
55
56    function n(t) {
57        var e = [];
58        if (Array.isArray(t)) e = t;
59        else if ("number" == typeof t.length)
60            for (var i = 0; i < t.length; i++) e.push(t[i]);
61        else e.push(t);
62        return e
63    }
64
65    function o(t, e, r) {
66        return this instanceof o ? ("string" == typeof t && (t = document.querySelectorAll(t)), this.elements = n(t), this.options = i({}, this.options), "function" == typeof e ? r = e : i(this.options, e), r && this.on("always", r), this.getImages(), h && (this.jqDeferred = new h.Deferred), void setTimeout(function() {
67            this.check()
68        }.bind(this))) : new o(t, e, r)
69    }
70
71    function r(t) {
72        this.img = t
73    }
74
75    function s(t, e) {
76        this.url = t, this.element = e, this.img = new Image
77    }
78    var h = t.jQuery,
79        a = t.console;
80    o.prototype = Object.create(e.prototype), o.prototype.options = {}, o.prototype.getImages = function() {
81        this.images = [], this.elements.forEach(this.addElementImages, this)
82    }, o.prototype.addElementImages = function(t) {
83        "IMG" == t.nodeName && this.addImage(t), this.options.background === !0 && this.addElementBackgroundImages(t);
84        var e = t.nodeType;
85        if (e && d[e]) {
86            for (var i = t.querySelectorAll("img"), n = 0; n < i.length; n++) {
87                var o = i[n];
88                this.addImage(o)
89            }
90            if ("string" == typeof this.options.background) {
91                var r = t.querySelectorAll(this.options.background);
92                for (n = 0; n < r.length; n++) {
93                    var s = r[n];
94                    this.addElementBackgroundImages(s)
95                }
96            }
97        }
98    };
99    var d = {
100        1: !0,
101        9: !0,
102        11: !0
103    };
104    return o.prototype.addElementBackgroundImages = function(t) {
105        var e = getComputedStyle(t);
106        if (e)
107            for (var i = /url\((['"])?(.*?)\1\)/gi, n = i.exec(e.backgroundImage); null !== n;) {
108                var o = n && n[2];
109                o && this.addBackground(o, t), n = i.exec(e.backgroundImage)
110            }
111    }, o.prototype.addImage = function(t) {
112        var e = new r(t);
113        this.images.push(e)
114    }
vendor: 3,301 bytes, lines 114-165
114, o.prototype.addBackground = function(t, e) {
115        var i = new s(t, e);
116        this.images.push(i)
117    }, o.prototype.check = function() {
118        function t(t, i, n) {
119            setTimeout(function() {
120                e.progress(t, i, n)
121            })
122        }
123        var e = this;
124        return this.progressedCount = 0, this.hasAnyBroken = !1, this.images.length ? void this.images.forEach(function(e) {
125            e.once("progress", t), e.check()
126        }) : void this.complete()
127    }, o.prototype.progress = function(t, e, i) {
128        this.progressedCount++, this.hasAnyBroken = this.hasAnyBroken || !t.isLoaded, this.emitEvent("progress", [this, t, e]), this.jqDeferred && this.jqDeferred.notify && this.jqDeferred.notify(this, t), this.progressedCount == this.images.length && this.complete(), this.options.debug && a && a.log("progress: " + i, t, e)
129    }, o.prototype.complete = function() {
130        var t = this.hasAnyBroken ? "fail" : "done";
131        if (this.isComplete = !0, this.emitEvent(t, [this]), this.emitEvent("always", [this]), this.jqDeferred) {
132            var e = this.hasAnyBroken ? "reject" : "resolve";
133            this.jqDeferred[e](this)
134        }
135    }, r.prototype = Object.create(e.prototype), r.prototype.check = function() {
136        var t = this.getIsImageComplete();
137        return t ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image, this.proxyImage.addEventListener("load", this), this.proxyImage.addEventListener("error", this), this.img.addEventListener("load", this), this.img.addEventListener("error", this), void(this.proxyImage.src = this.img.src))
138    }, r.prototype.getIsImageComplete = function() {
139        return this.img.complete && void 0 !== this.img.naturalWidth
140    }, r.prototype.confirm = function(t, e) {
141        this.isLoaded = t, this.emitEvent("progress", [this, this.img, e])
142    }, r.prototype.handleEvent = function(t) {
143        var e = "on" + t.type;
144        this[e] && this[e](t)
145    }, r.prototype.onload = function() {
146        this.confirm(!0, "onload"), this.unbindEvents()
147    }, r.prototype.onerror = function() {
148        this.confirm(!1, "onerror"), this.unbindEvents()
149    }, r.prototype.unbindEvents = function() {
150        this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this)
151    }, s.prototype = Object.create(r.prototype), s.prototype.check = function() {
152        this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url;
153        var t = this.getIsImageComplete();
154        t && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents())
155    }, s.prototype.unbindEvents = function() {
156        this.img.removeEventListener("load", this), this.img.removeEventListener("error", this)
157    }, s.prototype.confirm = function(t, e) {
158        this.isLoaded = t, this.emitEvent("progress", [this, this.element, e])
159    }, o.makeJQueryPlugin = function(e) {
160        e = e || t.jQuery, e && (h = e, h.fn.imagesLoaded = function(t, e) {
161            var i = new o(this, t, e);
162            return i.jqDeferred.promise(h(this))
163        })
164    }, o.makeJQueryPlugin(), o
165});

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.