PageSourceSearch

https://touptek-astro.com.cn/assets/js/imagesloaded.pkgd.min.js

js touptek-astro.com.cn collected 2026-10-02 06:48:25 UTC 5,711 bytes, 9 lines download raw bytes

1/*!
2 * imagesLoaded PACKAGED v4.1.4
3 * JavaScript is all like "You images are done yet or what?"
4 * MIT License
5 */(function(u,a){typeof define=="function"&&define.amd?define("ev-emitter/ev-emitter",a):typeof module=="object"&&module.exports?module.exports=a():u.EvEmitter=a()})(typeof window!="undefined"?window:this,function(){function u(){}var a=u.prototype;return a.on=function(s,o){if(!(!s||!o)){var r=this._events=this._events||{},f=r[s]=r[s]||[];return f.indexOf(o)==-1&&f.push(o),this}},a.once=function(s,o){if(!(!s||!o)){this.on(s,o);var r=this._onceEvents=this._onceEvents||{},f=r[s]=r[s]||{};return f[o]=!0,this}},a.off=function(s,o){var r=this._events&&this._events[s];if(!(!r||!r.length)){var f=r.indexOf(o);return f!=-1&&r.splice(f,1),this}},a.emitEvent=function(s,o){var r=this._events&&this._events[s];if(!(!r||!r.length)){r=r.slice(0),o=o||[];for(var f=this._onceEvents&&this._onceEvents[s],m=0;m<r.length;m++){var c=r[m],h=f&&f[c];h&&(this.off(s,c),delete f[c]),c.apply(this,o)}return this}},a.allOff=function(){delete this._events,delete this._onceEvents},u});/*!
6 * imagesLoaded v4.1.4
7 * JavaScript is all like "You images are done yet or what?"
8 * MIT License
9 */(function(u,a){"use strict";typeof define=="function"&&define.amd?define(["ev-emitter/ev-emitter"],function(s){return a(u,s)}):typeof module=="object"&&module.exports?module.exports=a(u,require("ev-emitter")):u.imagesLoaded=a(u,u.EvEmitter)})(typeof window!="undefined"?window:this,function(a,s){var o=a.jQuery,r=a.console;function f(e,t){for(var i in t)e[i]=t[i];return e}var m=Array.prototype.slice;function c(e){if(Array.isArray(e))return e;var t=typeof e=="object"&&typeof e.length=="number";return t?m.call(e):[e]}function h(e,t,i){if(!(this instanceof h))return new h(e,t,i);var n=e;if(typeof e=="string"&&(n=document.querySelectorAll(e)),!n){r.error("Bad element for imagesLoaded "+(n||e));return}this.elements=c(n),this.options=f({},this.options),typeof t=="function"?i=t:f(this.options,t),i&&this.on("always",i),this.getImages(),o&&(this.jqDeferred=new o.Deferred),setTimeout(this.check.bind(this))}h.prototype=Object.create(s.prototype),h.prototype.options={},h.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},h.prototype.addElementImages=function(e){e.nodeName=="IMG"&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(!(!t||!l[t])){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var p=i[n];this.addImage(p)}if(typeof this.options.background=="string"){var v=e.querySelectorAll(this.options.background);for(n=0;n<v.length;n++){var y=v[n];this.addElementBackgroundImages(y)}}}};var l={1:!0,9:!0,11:!0};h.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);n!==null;){var p=n&&n[2];p&&this.addBackground(p,e),n=i.exec(t.backgroundImage)}},h.prototype.addImage=function(e){var t=new d(e);this.images.push(t)},h.prototype.addBackground=function(e,t){var i=new g(e,t);this.images.push(i)},h.prototype.check=function(){var e=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}function t(i,n,p){setTimeout(function(){e.progress(i,n,p)})}this.images.forEach(function(i){i.once("progress",t),i.check()})},h.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&r&&r.log("progress: "+i,e,t)},h.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}};function d(e){this.img=e}d.prototype=Object.create(s.prototype),d.prototype.check=function(){var e=this.getIsImageComplete();if(e){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src},d.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWi
vendor: 1,298 bytes, line 9
9dth},d.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},d.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},d.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},d.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},d.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)};function g(e,t){this.url=e,this.element=t,this.img=new Image}return g.prototype=Object.create(d.prototype),g.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},g.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},g.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},h.makeJQueryPlugin=function(e){e=e||a.jQuery,e&&(o=e,o.fn.imagesLoaded=function(t,i){var n=new h(this,t,i);return n.jqDeferred.promise(o(this))})},h.makeJQueryPlugin(),h});

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.