Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vanilla-lazyload

Package Overview
Dependencies
Maintainers
1
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilla-lazyload - npm Package Compare versions

Comparing version 15.1.0 to 15.1.1

16

CHANGELOG.md

@@ -5,2 +5,6 @@ # CHANGELOG

#### 15.1.1
Fixed a bug when loading lazy background images on HiDPI screens, `data-bg-hidpi` was mandatory, not it fallbacks to `data-bg`. #430
#### 15.1.0

@@ -25,2 +29,8 @@

---
**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
## Version 14

@@ -61,2 +71,8 @@

---
**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
## Version 13

@@ -63,0 +79,0 @@

14

dist/lazyload.amd.js

@@ -260,6 +260,8 @@ define(function () { 'use strict';

var setBackground = function setBackground(element, settings, instance) {
var srcDataValue = getData(element, isHiDpi ? settings.data_bg_hidpi : settings.data_bg);
if (!srcDataValue) return;
element.style.backgroundImage = "url(\"".concat(srcDataValue, "\")");
getTempImage(element).setAttribute("src", srcDataValue); // Annotate and notify loading
var bg1xValue = getData(element, settings.data_bg);
var bgHiDpiValue = getData(element, settings.data_bg_hidpi);
var bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;
if (!bgDataValue) return;
element.style.backgroundImage = "url(\"".concat(bgDataValue, "\")");
getTempImage(element).setAttribute("src", bgDataValue); // Annotate and notify loading

@@ -276,3 +278,5 @@ increaseLoadingCount(instance);

var setMultiBackground = function setMultiBackground(element, settings, instance) {
var bgDataValue = getData(element, isHiDpi ? settings.data_bg_multi_hidpi : settings.data_bg_multi);
var bg1xValue = getData(element, settings.data_bg_multi);
var bgHiDpiValue = getData(element, settings.data_bg_multi_hidpi);
var bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;
if (!bgDataValue) return;

@@ -279,0 +283,0 @@ element.style.backgroundImage = bgDataValue; // Annotate and notify applied

@@ -1,1 +0,1 @@

define((function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t}).apply(this,arguments)}var n="undefined"!=typeof window,e=n&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=n&&"IntersectionObserver"in window,i=n&&"classList"in document.createElement("p"),o=n&&window.devicePixelRatio>1,r={elements_selector:"img",container:e||n?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},l=function(n){return t({},r,n)},c=function(t,n){var e,a=new t(n);try{e=new CustomEvent("LazyLoad::Initialized",{detail:{instance:a}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:a})}window.dispatchEvent(e)},s=function(t,n){return t.getAttribute("data-"+n)},u=function(t,n,e){var a="data-"+n;null!==e?t.setAttribute(a,e):t.removeAttribute(a)},d=function(t,n){return u(t,"ll-status",n)},f=function(t,n){return u(t,"ll-timeout",n)},_=function(t){return s(t,"ll-timeout")},g=function(t,n,e,a){t&&(void 0===a?void 0===e?t(n):t(n,e):t(n,e,a))},v=function(t,n){i?t.classList.add(n):t.className+=(t.className?" ":"")+n},b=function(t,n){i?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},h=function(t){return t.llTempImage},p=function(t){t&&(t.loadingCount+=1)},m=function(t){for(var n,e=[],a=0;n=t.children[a];a+=1)"SOURCE"===n.tagName&&e.push(n);return e},E=function(t,n,e){e&&t.setAttribute(n,e)},y=function(t,n){E(t,"sizes",s(t,n.data_sizes)),E(t,"srcset",s(t,n.data_srcset)),E(t,"src",s(t,n.data_src))},w={IMG:function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&m(e).forEach((function(t){y(t,n)}));y(t,n)},IFRAME:function(t,n){E(t,"src",s(t,n.data_src))},VIDEO:function(t,n){m(t).forEach((function(t){E(t,"src",s(t,n.data_src))})),E(t,"poster",s(t,n.data_poster)),E(t,"src",s(t,n.data_src)),t.load()}},I=function(t,n,e){var a=w[t.tagName];a&&(a(t,n),p(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))},k=["IMG","IFRAME","VIDEO"],L=function(t,n){!n||n.toLoadCount||n.loadingCount||g(t.callback_finish,n)},C=function(t,n,e){t.addEventListener(n,e)},A=function(t,n,e){t.removeEventListener(n,e)},O=function(t,n,e){A(t,"load",n),A(t,"loadeddata",n),A(t,"error",e)},z=function(t,n,e){!function(t){delete t.llTempImage}(t),function(t,n){n&&(n.loadingCount-=1)}(0,e),b(t,n.class_loading)},N=function(t,n,e){var a=h(t)||t,i=function i(r){!function(t,n,e,a){z(n,e,a),v(n,e.class_loaded),d(n,"loaded"),g(e.callback_loaded,n,a),L(e,a)}(0,t,n,e),O(a,i,o)},o=function o(r){!function(t,n,e,a){z(n,e,a),v(n,e.class_error),d(n,"error"),g(e.callback_error,n,a),L(e,a)}(0,t,n,e),O(a,i,o)};!function(t,n,e){C(t,"load",n),C(t,"loadeddata",n),C(t,"error",e)}(a,i,o)},M=function(t,n){n&&(n.toLoadCount-=1)},R=function(t,n,e){!function(t){t.llTempImage=document.createElement("img")}(t),N(t,n,e),function(t,n,e){var a=s(t,o?n.data_bg_hidpi:n.data_bg);a&&(t.style.backgroundImage='url("'.concat(a,'")'),h(t).setAttribute("src",a),p(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))}(t,n,e),function(t,n,e){var a=s(t,o?n.data_bg_multi_hidpi:n.data_bg_multi);a&&(t.style.backgroundImage=a,v(t,n.class_applied),d(t,"applied"),g(n.callback_applied,t,e))}(t,n,e)},x=function(t,n,e){!function(t){return k.indexOf(t.tagName)>-1}(t)?R(t,n,e):function(t,n,e){N(t,n,e),I(t,n,e)}(t,n,e),M(0,e),function(t,n){if(n){var e=n._observer;e&&n._settings.auto_unobserve&&e.unobserve(t)}}(t,e),L(n,e)},T=function(t){var n=_(t);n&&(clearTimeout(n),f(t,null))},F=function(t,n,e){var a=e._settings;g(a.callback_enter,t,n,e),a.load_delay?function(t,n,e){var a=n.load_delay,i=_(t);i||(i=setTimeout((function(){x(t,n,e),T(t)}),a),f(t,i))}(t,a,e):x(t,a,e)},G=["IMG","IFRAME"],P=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},j=function(t,n,e){t.forEach((function(t){-1!==G.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,n,e){N(t,n,e),I(t,n,e),M(0,e),d(t,"native"),L(n,e)}(t,n,e))})),e.toLoadCount=0},D=function(t,n){!function(t){t.disconnect()}(t),function(t,n){n.forEach((function(n){t.observe(n),d(n,"observed")}))}(t,n)},S=function(t){var n;a&&!P(t._settings)&&(t._observer=new IntersectionObserver((function(n){n.forEach((function(n){return function(t){return t.isIntersecting||t.intersectionRatio>0}(n)?F(n.target,n,t):function(t,n,e){var a=e._settings;g(a.callback_exit,t,n,e),a.load_delay&&T(t)}(n.target,n,t)}))}),{root:(n=t._settings).container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))},U=function(t){return Array.prototype.slice.call(t)},V=function(t){return t.container.querySelectorAll(t.elements_selector)},$=function(t){return!function(t){return null!==s(t,"ll-status")}(t)||function(t){return"observed"===s(t,"ll-status")}(t)},q=function(t){return function(t){return"error"===s(t,"ll-status")}(t)},H=function(t,n){return function(t){return U(t).filter($)}(t||V(n))},B=function(t){var n,e=t._settings;(n=V(e),U(n).filter(q)).forEach((function(t){b(t,e.class_error),function(t){u(t,"ll-status",null)}(t)})),t.update()},J=function(t,e){var a;this._settings=l(t),this.loadingCount=0,S(this),a=this,n&&window.addEventListener("online",(function(t){B(a)})),this.update(e)};return J.prototype={update:function(t){var n=this._settings,i=H(t,n);this.toLoadCount=i.length,!e&&a?P(n)?j(i,n,this):D(this._observer,i):this.loadAll(i)},destroy:function(){this._observer&&this._observer.disconnect(),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var n=this,e=this._settings;H(t,e).forEach((function(t){x(t,e,n)}))},load:function(t){x(t,this._settings,this)}},J.load=function(t,n){var e=l(n);x(t,e)},n&&function(t,n){if(n)if(n.length)for(var e,a=0;e=n[a];a+=1)c(t,e);else c(t,n)}(J,window.lazyLoadOptions),J}));
define((function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t}).apply(this,arguments)}var n="undefined"!=typeof window,e=n&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=n&&"IntersectionObserver"in window,i=n&&"classList"in document.createElement("p"),o=n&&window.devicePixelRatio>1,r={elements_selector:"img",container:e||n?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},l=function(n){return t({},r,n)},c=function(t,n){var e,a=new t(n);try{e=new CustomEvent("LazyLoad::Initialized",{detail:{instance:a}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:a})}window.dispatchEvent(e)},s=function(t,n){return t.getAttribute("data-"+n)},u=function(t,n,e){var a="data-"+n;null!==e?t.setAttribute(a,e):t.removeAttribute(a)},d=function(t,n){return u(t,"ll-status",n)},f=function(t,n){return u(t,"ll-timeout",n)},_=function(t){return s(t,"ll-timeout")},g=function(t,n,e,a){t&&(void 0===a?void 0===e?t(n):t(n,e):t(n,e,a))},v=function(t,n){i?t.classList.add(n):t.className+=(t.className?" ":"")+n},b=function(t,n){i?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},h=function(t){return t.llTempImage},p=function(t){t&&(t.loadingCount+=1)},m=function(t){for(var n,e=[],a=0;n=t.children[a];a+=1)"SOURCE"===n.tagName&&e.push(n);return e},E=function(t,n,e){e&&t.setAttribute(n,e)},y=function(t,n){E(t,"sizes",s(t,n.data_sizes)),E(t,"srcset",s(t,n.data_srcset)),E(t,"src",s(t,n.data_src))},w={IMG:function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&m(e).forEach((function(t){y(t,n)}));y(t,n)},IFRAME:function(t,n){E(t,"src",s(t,n.data_src))},VIDEO:function(t,n){m(t).forEach((function(t){E(t,"src",s(t,n.data_src))})),E(t,"poster",s(t,n.data_poster)),E(t,"src",s(t,n.data_src)),t.load()}},I=function(t,n,e){var a=w[t.tagName];a&&(a(t,n),p(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))},k=["IMG","IFRAME","VIDEO"],L=function(t,n){!n||n.toLoadCount||n.loadingCount||g(t.callback_finish,n)},C=function(t,n,e){t.addEventListener(n,e)},A=function(t,n,e){t.removeEventListener(n,e)},O=function(t,n,e){A(t,"load",n),A(t,"loadeddata",n),A(t,"error",e)},z=function(t,n,e){!function(t){delete t.llTempImage}(t),function(t,n){n&&(n.loadingCount-=1)}(0,e),b(t,n.class_loading)},N=function(t,n,e){var a=h(t)||t,i=function i(r){!function(t,n,e,a){z(n,e,a),v(n,e.class_loaded),d(n,"loaded"),g(e.callback_loaded,n,a),L(e,a)}(0,t,n,e),O(a,i,o)},o=function o(r){!function(t,n,e,a){z(n,e,a),v(n,e.class_error),d(n,"error"),g(e.callback_error,n,a),L(e,a)}(0,t,n,e),O(a,i,o)};!function(t,n,e){C(t,"load",n),C(t,"loadeddata",n),C(t,"error",e)}(a,i,o)},M=function(t,n){n&&(n.toLoadCount-=1)},R=function(t,n,e){!function(t){t.llTempImage=document.createElement("img")}(t),N(t,n,e),function(t,n,e){var a=s(t,n.data_bg),i=s(t,n.data_bg_hidpi),r=o&&i?i:a;r&&(t.style.backgroundImage='url("'.concat(r,'")'),h(t).setAttribute("src",r),p(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))}(t,n,e),function(t,n,e){var a=s(t,n.data_bg_multi),i=s(t,n.data_bg_multi_hidpi),r=o&&i?i:a;r&&(t.style.backgroundImage=r,v(t,n.class_applied),d(t,"applied"),g(n.callback_applied,t,e))}(t,n,e)},x=function(t,n,e){!function(t){return k.indexOf(t.tagName)>-1}(t)?R(t,n,e):function(t,n,e){N(t,n,e),I(t,n,e)}(t,n,e),M(0,e),function(t,n){if(n){var e=n._observer;e&&n._settings.auto_unobserve&&e.unobserve(t)}}(t,e),L(n,e)},T=function(t){var n=_(t);n&&(clearTimeout(n),f(t,null))},F=function(t,n,e){var a=e._settings;g(a.callback_enter,t,n,e),a.load_delay?function(t,n,e){var a=n.load_delay,i=_(t);i||(i=setTimeout((function(){x(t,n,e),T(t)}),a),f(t,i))}(t,a,e):x(t,a,e)},G=["IMG","IFRAME"],P=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},j=function(t,n,e){t.forEach((function(t){-1!==G.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,n,e){N(t,n,e),I(t,n,e),M(0,e),d(t,"native"),L(n,e)}(t,n,e))})),e.toLoadCount=0},D=function(t,n){!function(t){t.disconnect()}(t),function(t,n){n.forEach((function(n){t.observe(n),d(n,"observed")}))}(t,n)},S=function(t){var n;a&&!P(t._settings)&&(t._observer=new IntersectionObserver((function(n){n.forEach((function(n){return function(t){return t.isIntersecting||t.intersectionRatio>0}(n)?F(n.target,n,t):function(t,n,e){var a=e._settings;g(a.callback_exit,t,n,e),a.load_delay&&T(t)}(n.target,n,t)}))}),{root:(n=t._settings).container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))},U=function(t){return Array.prototype.slice.call(t)},V=function(t){return t.container.querySelectorAll(t.elements_selector)},$=function(t){return!function(t){return null!==s(t,"ll-status")}(t)||function(t){return"observed"===s(t,"ll-status")}(t)},q=function(t){return function(t){return"error"===s(t,"ll-status")}(t)},H=function(t,n){return function(t){return U(t).filter($)}(t||V(n))},B=function(t){var n,e=t._settings;(n=V(e),U(n).filter(q)).forEach((function(t){b(t,e.class_error),function(t){u(t,"ll-status",null)}(t)})),t.update()},J=function(t,e){var a;this._settings=l(t),this.loadingCount=0,S(this),a=this,n&&window.addEventListener("online",(function(t){B(a)})),this.update(e)};return J.prototype={update:function(t){var n=this._settings,i=H(t,n);this.toLoadCount=i.length,!e&&a?P(n)?j(i,n,this):D(this._observer,i):this.loadAll(i)},destroy:function(){this._observer&&this._observer.disconnect(),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var n=this,e=this._settings;H(t,e).forEach((function(t){x(t,e,n)}))},load:function(t){x(t,this._settings,this)}},J.load=function(t,n){var e=l(n);x(t,e)},n&&function(t,n){if(n)if(n.length)for(var e,a=0;e=n[a];a+=1)c(t,e);else c(t,n)}(J,window.lazyLoadOptions),J}));

@@ -236,6 +236,8 @@ const runningOnBrowser = typeof window !== "undefined";

const setBackground = (element, settings, instance) => {
const srcDataValue = getData(element, isHiDpi ? settings.data_bg_hidpi : settings.data_bg);
if (!srcDataValue) return;
element.style.backgroundImage = `url("${srcDataValue}")`;
getTempImage(element).setAttribute("src", srcDataValue);
const bg1xValue = getData(element, settings.data_bg);
const bgHiDpiValue = getData(element, settings.data_bg_hidpi);
const bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;
if (!bgDataValue) return;
element.style.backgroundImage = `url("${bgDataValue}")`;
getTempImage(element).setAttribute("src", bgDataValue);
// Annotate and notify loading

@@ -253,6 +255,5 @@ increaseLoadingCount(instance);

const setMultiBackground = (element, settings, instance) => {
const bgDataValue = getData(
element,
isHiDpi ? settings.data_bg_multi_hidpi : settings.data_bg_multi
);
const bg1xValue = getData(element, settings.data_bg_multi);
const bgHiDpiValue = getData(element, settings.data_bg_multi_hidpi);
const bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;
if (!bgDataValue) return;

@@ -259,0 +260,0 @@ element.style.backgroundImage = bgDataValue;

@@ -1,1 +0,1 @@

const t="undefined"!=typeof window,e=t&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=t&&"IntersectionObserver"in window,l=t&&"classList"in document.createElement("p"),s=t&&window.devicePixelRatio>1,o={elements_selector:"img",container:e||t?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},n=t=>Object.assign({},o,t),i=function(t,e){var a;let l=new t(e);try{a=new CustomEvent("LazyLoad::Initialized",{detail:{instance:l}})}catch(t){(a=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:l})}window.dispatchEvent(a)},r=(t,e)=>t.getAttribute("data-"+e),d=(t,e,a)=>{var l="data-"+e;null!==a?t.setAttribute(l,a):t.removeAttribute(l)},c=(t,e)=>d(t,"ll-status",e),_=(t,e)=>d(t,"ll-timeout",e),u=t=>r(t,"ll-timeout"),g=(t,e,a,l)=>{t&&(void 0===l?void 0===a?t(e):t(e,a):t(e,a,l))},b=(t,e)=>{l?t.classList.add(e):t.className+=(t.className?" ":"")+e},h=(t,e)=>{l?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},p=t=>t.llTempImage,m=t=>{t&&(t.loadingCount+=1)},v=t=>{let e=[];for(let a,l=0;a=t.children[l];l+=1)"SOURCE"===a.tagName&&e.push(a);return e},f=(t,e,a)=>{a&&t.setAttribute(e,a)},E=(t,e)=>{f(t,"sizes",r(t,e.data_sizes)),f(t,"srcset",r(t,e.data_srcset)),f(t,"src",r(t,e.data_src))},I={IMG:(t,e)=>{const a=t.parentNode;if(a&&"PICTURE"===a.tagName){v(a).forEach(t=>{E(t,e)})}E(t,e)},IFRAME:(t,e)=>{f(t,"src",r(t,e.data_src))},VIDEO:(t,e)=>{v(t).forEach(t=>{f(t,"src",r(t,e.data_src))}),f(t,"poster",r(t,e.data_poster)),f(t,"src",r(t,e.data_src)),t.load()}},k=(t,e,a)=>{const l=I[t.tagName];l&&(l(t,e),m(a),b(t,e.class_loading),c(t,"loading"),g(e.callback_loading,t,a),g(e.callback_reveal,t,a))},w=["IMG","IFRAME","VIDEO"],y=(t,e)=>{!e||e.toLoadCount||e.loadingCount||g(t.callback_finish,e)},L=(t,e,a)=>{t.addEventListener(e,a)},C=(t,e,a)=>{t.removeEventListener(e,a)},A=(t,e,a)=>{C(t,"load",e),C(t,"loadeddata",e),C(t,"error",a)},z=(t,e,a)=>{(t=>{delete t.llTempImage})(t),((t,e)=>{e&&(e.loadingCount-=1)})(0,a),h(t,e.class_loading)},N=(t,e,a)=>{const l=p(t)||t,s=n=>{((t,e,a,l)=>{z(e,a,l),b(e,a.class_loaded),c(e,"loaded"),g(a.callback_loaded,e,l),y(a,l)})(0,t,e,a),A(l,s,o)},o=n=>{((t,e,a,l)=>{z(e,a,l),b(e,a.class_error),c(e,"error"),g(a.callback_error,e,l),y(a,l)})(0,t,e,a),A(l,s,o)};((t,e,a)=>{L(t,"load",e),L(t,"loadeddata",e),L(t,"error",a)})(l,s,o)},O=(t,e)=>{e&&(e.toLoadCount-=1)},x=(t,e,a)=>{(t=>{t.llTempImage=document.createElement("img")})(t),N(t,e,a),((t,e,a)=>{const l=r(t,s?e.data_bg_hidpi:e.data_bg);l&&(t.style.backgroundImage=`url("${l}")`,p(t).setAttribute("src",l),m(a),b(t,e.class_loading),c(t,"loading"),g(e.callback_loading,t,a),g(e.callback_reveal,t,a))})(t,e,a),((t,e,a)=>{const l=r(t,s?e.data_bg_multi_hidpi:e.data_bg_multi);l&&(t.style.backgroundImage=l,b(t,e.class_applied),c(t,"applied"),g(e.callback_applied,t,a))})(t,e,a)},M=(t,e,a)=>{(t=>w.indexOf(t.tagName)>-1)(t)?((t,e,a)=>{N(t,e,a),k(t,e,a)})(t,e,a):x(t,e,a),O(0,a),((t,e)=>{if(!e)return;const a=e._observer;a&&e._settings.auto_unobserve&&a.unobserve(t)})(t,a),y(e,a)},R=t=>{var e=u(t);e&&(clearTimeout(e),_(t,null))},T=(t,e,a)=>{const l=a._settings;g(l.callback_enter,t,e,a),l.load_delay?((t,e,a)=>{const l=e.load_delay;let s=u(t);s||(s=setTimeout((function(){M(t,e,a),R(t)}),l),_(t,s))})(t,l,a):M(t,l,a)},F=["IMG","IFRAME"],G=t=>t.use_native&&"loading"in HTMLImageElement.prototype,$=(t,e,a)=>{t.forEach(t=>{-1!==F.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),((t,e,a)=>{N(t,e,a),k(t,e,a),O(0,a),c(t,"native"),y(e,a)})(t,e,a))}),a.toLoadCount=0},D=(t,e)=>{(t=>{t.disconnect()})(t),((t,e)=>{e.forEach(e=>{t.observe(e),c(e,"observed")})})(t,e)},P=t=>{var e;a&&!G(t._settings)&&(t._observer=new IntersectionObserver(e=>{e.forEach(e=>(t=>t.isIntersecting||t.intersectionRatio>0)(e)?T(e.target,e,t):((t,e,a)=>{const l=a._settings;g(l.callback_exit,t,e,a),l.load_delay&&R(t)})(e.target,e,t))},{root:(e=t._settings).container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}))},S=t=>Array.prototype.slice.call(t),U=t=>t.container.querySelectorAll(t.elements_selector),V=t=>!(t=>null!==r(t,"ll-status"))(t)||(t=>"observed"===r(t,"ll-status"))(t),j=t=>(t=>"error"===r(t,"ll-status"))(t),q=(t,e)=>(t=>S(t).filter(V))(t||U(e)),H=t=>{const e=t._settings;var a;(a=U(e),S(a).filter(j)).forEach(t=>{h(t,e.class_error),(t=>{d(t,"ll-status",null)})(t)}),t.update()},B=function(e,a){var l;this._settings=n(e),this.loadingCount=0,P(this),l=this,t&&window.addEventListener("online",t=>{H(l)}),this.update(a)};B.prototype={update:function(t){const l=this._settings,s=q(t,l);this.toLoadCount=s.length,!e&&a?G(l)?$(s,l,this):D(this._observer,s):this.loadAll(s)},destroy:function(){this._observer&&this._observer.disconnect(),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){const e=this._settings;q(t,e).forEach(t=>{M(t,e,this)})},load:function(t){M(t,this._settings,this)}},B.load=(t,e)=>{const a=n(e);M(t,a)},t&&((t,e)=>{if(e)if(e.length)for(let a,l=0;a=e[l];l+=1)i(t,a);else i(t,e)})(B,window.lazyLoadOptions);export default B;
const t="undefined"!=typeof window,e=t&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=t&&"IntersectionObserver"in window,l=t&&"classList"in document.createElement("p"),s=t&&window.devicePixelRatio>1,o={elements_selector:"img",container:e||t?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},n=t=>Object.assign({},o,t),i=function(t,e){var a;let l=new t(e);try{a=new CustomEvent("LazyLoad::Initialized",{detail:{instance:l}})}catch(t){(a=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:l})}window.dispatchEvent(a)},r=(t,e)=>t.getAttribute("data-"+e),d=(t,e,a)=>{var l="data-"+e;null!==a?t.setAttribute(l,a):t.removeAttribute(l)},c=(t,e)=>d(t,"ll-status",e),_=(t,e)=>d(t,"ll-timeout",e),u=t=>r(t,"ll-timeout"),g=(t,e,a,l)=>{t&&(void 0===l?void 0===a?t(e):t(e,a):t(e,a,l))},b=(t,e)=>{l?t.classList.add(e):t.className+=(t.className?" ":"")+e},h=(t,e)=>{l?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},p=t=>t.llTempImage,m=t=>{t&&(t.loadingCount+=1)},v=t=>{let e=[];for(let a,l=0;a=t.children[l];l+=1)"SOURCE"===a.tagName&&e.push(a);return e},f=(t,e,a)=>{a&&t.setAttribute(e,a)},E=(t,e)=>{f(t,"sizes",r(t,e.data_sizes)),f(t,"srcset",r(t,e.data_srcset)),f(t,"src",r(t,e.data_src))},I={IMG:(t,e)=>{const a=t.parentNode;if(a&&"PICTURE"===a.tagName){v(a).forEach(t=>{E(t,e)})}E(t,e)},IFRAME:(t,e)=>{f(t,"src",r(t,e.data_src))},VIDEO:(t,e)=>{v(t).forEach(t=>{f(t,"src",r(t,e.data_src))}),f(t,"poster",r(t,e.data_poster)),f(t,"src",r(t,e.data_src)),t.load()}},k=(t,e,a)=>{const l=I[t.tagName];l&&(l(t,e),m(a),b(t,e.class_loading),c(t,"loading"),g(e.callback_loading,t,a),g(e.callback_reveal,t,a))},w=["IMG","IFRAME","VIDEO"],y=(t,e)=>{!e||e.toLoadCount||e.loadingCount||g(t.callback_finish,e)},L=(t,e,a)=>{t.addEventListener(e,a)},C=(t,e,a)=>{t.removeEventListener(e,a)},A=(t,e,a)=>{C(t,"load",e),C(t,"loadeddata",e),C(t,"error",a)},z=(t,e,a)=>{(t=>{delete t.llTempImage})(t),((t,e)=>{e&&(e.loadingCount-=1)})(0,a),h(t,e.class_loading)},N=(t,e,a)=>{const l=p(t)||t,s=n=>{((t,e,a,l)=>{z(e,a,l),b(e,a.class_loaded),c(e,"loaded"),g(a.callback_loaded,e,l),y(a,l)})(0,t,e,a),A(l,s,o)},o=n=>{((t,e,a,l)=>{z(e,a,l),b(e,a.class_error),c(e,"error"),g(a.callback_error,e,l),y(a,l)})(0,t,e,a),A(l,s,o)};((t,e,a)=>{L(t,"load",e),L(t,"loadeddata",e),L(t,"error",a)})(l,s,o)},O=(t,e)=>{e&&(e.toLoadCount-=1)},x=(t,e,a)=>{(t=>{t.llTempImage=document.createElement("img")})(t),N(t,e,a),((t,e,a)=>{const l=r(t,e.data_bg),o=r(t,e.data_bg_hidpi),n=s&&o?o:l;n&&(t.style.backgroundImage=`url("${n}")`,p(t).setAttribute("src",n),m(a),b(t,e.class_loading),c(t,"loading"),g(e.callback_loading,t,a),g(e.callback_reveal,t,a))})(t,e,a),((t,e,a)=>{const l=r(t,e.data_bg_multi),o=r(t,e.data_bg_multi_hidpi),n=s&&o?o:l;n&&(t.style.backgroundImage=n,b(t,e.class_applied),c(t,"applied"),g(e.callback_applied,t,a))})(t,e,a)},M=(t,e,a)=>{(t=>w.indexOf(t.tagName)>-1)(t)?((t,e,a)=>{N(t,e,a),k(t,e,a)})(t,e,a):x(t,e,a),O(0,a),((t,e)=>{if(!e)return;const a=e._observer;a&&e._settings.auto_unobserve&&a.unobserve(t)})(t,a),y(e,a)},R=t=>{var e=u(t);e&&(clearTimeout(e),_(t,null))},T=(t,e,a)=>{const l=a._settings;g(l.callback_enter,t,e,a),l.load_delay?((t,e,a)=>{const l=e.load_delay;let s=u(t);s||(s=setTimeout((function(){M(t,e,a),R(t)}),l),_(t,s))})(t,l,a):M(t,l,a)},F=["IMG","IFRAME"],G=t=>t.use_native&&"loading"in HTMLImageElement.prototype,$=(t,e,a)=>{t.forEach(t=>{-1!==F.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),((t,e,a)=>{N(t,e,a),k(t,e,a),O(0,a),c(t,"native"),y(e,a)})(t,e,a))}),a.toLoadCount=0},D=(t,e)=>{(t=>{t.disconnect()})(t),((t,e)=>{e.forEach(e=>{t.observe(e),c(e,"observed")})})(t,e)},P=t=>{var e;a&&!G(t._settings)&&(t._observer=new IntersectionObserver(e=>{e.forEach(e=>(t=>t.isIntersecting||t.intersectionRatio>0)(e)?T(e.target,e,t):((t,e,a)=>{const l=a._settings;g(l.callback_exit,t,e,a),l.load_delay&&R(t)})(e.target,e,t))},{root:(e=t._settings).container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}))},S=t=>Array.prototype.slice.call(t),U=t=>t.container.querySelectorAll(t.elements_selector),V=t=>!(t=>null!==r(t,"ll-status"))(t)||(t=>"observed"===r(t,"ll-status"))(t),j=t=>(t=>"error"===r(t,"ll-status"))(t),q=(t,e)=>(t=>S(t).filter(V))(t||U(e)),H=t=>{const e=t._settings;var a;(a=U(e),S(a).filter(j)).forEach(t=>{h(t,e.class_error),(t=>{d(t,"ll-status",null)})(t)}),t.update()},B=function(e,a){var l;this._settings=n(e),this.loadingCount=0,P(this),l=this,t&&window.addEventListener("online",t=>{H(l)}),this.update(a)};B.prototype={update:function(t){const l=this._settings,s=q(t,l);this.toLoadCount=s.length,!e&&a?G(l)?$(s,l,this):D(this._observer,s):this.loadAll(s)},destroy:function(){this._observer&&this._observer.disconnect(),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){const e=this._settings;q(t,e).forEach(t=>{M(t,e,this)})},load:function(t){M(t,this._settings,this)}},B.load=(t,e)=>{const a=n(e);M(t,a)},t&&((t,e)=>{if(e)if(e.length)for(let a,l=0;a=e[l];l+=1)i(t,a);else i(t,e)})(B,window.lazyLoadOptions);export default B;

@@ -261,6 +261,8 @@ var LazyLoad = (function () {

var setBackground = function setBackground(element, settings, instance) {
var srcDataValue = getData(element, isHiDpi ? settings.data_bg_hidpi : settings.data_bg);
if (!srcDataValue) return;
element.style.backgroundImage = "url(\"".concat(srcDataValue, "\")");
getTempImage(element).setAttribute("src", srcDataValue); // Annotate and notify loading
var bg1xValue = getData(element, settings.data_bg);
var bgHiDpiValue = getData(element, settings.data_bg_hidpi);
var bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;
if (!bgDataValue) return;
element.style.backgroundImage = "url(\"".concat(bgDataValue, "\")");
getTempImage(element).setAttribute("src", bgDataValue); // Annotate and notify loading

@@ -277,3 +279,5 @@ increaseLoadingCount(instance);

var setMultiBackground = function setMultiBackground(element, settings, instance) {
var bgDataValue = getData(element, isHiDpi ? settings.data_bg_multi_hidpi : settings.data_bg_multi);
var bg1xValue = getData(element, settings.data_bg_multi);
var bgHiDpiValue = getData(element, settings.data_bg_multi_hidpi);
var bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;
if (!bgDataValue) return;

@@ -280,0 +284,0 @@ element.style.backgroundImage = bgDataValue; // Annotate and notify applied

@@ -1,1 +0,1 @@

var LazyLoad=function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t}).apply(this,arguments)}var n="undefined"!=typeof window,e=n&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=n&&"IntersectionObserver"in window,o=n&&"classList"in document.createElement("p"),i=n&&window.devicePixelRatio>1,r={elements_selector:"img",container:e||n?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},l=function(n){return t({},r,n)},c=function(t,n){var e,a=new t(n);try{e=new CustomEvent("LazyLoad::Initialized",{detail:{instance:a}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:a})}window.dispatchEvent(e)},s=function(t,n){return t.getAttribute("data-"+n)},u=function(t,n,e){var a="data-"+n;null!==e?t.setAttribute(a,e):t.removeAttribute(a)},d=function(t,n){return u(t,"ll-status",n)},f=function(t,n){return u(t,"ll-timeout",n)},_=function(t){return s(t,"ll-timeout")},g=function(t,n,e,a){t&&(void 0===a?void 0===e?t(n):t(n,e):t(n,e,a))},v=function(t,n){o?t.classList.add(n):t.className+=(t.className?" ":"")+n},b=function(t,n){o?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},h=function(t){return t.llTempImage},p=function(t){t&&(t.loadingCount+=1)},m=function(t){for(var n,e=[],a=0;n=t.children[a];a+=1)"SOURCE"===n.tagName&&e.push(n);return e},E=function(t,n,e){e&&t.setAttribute(n,e)},y=function(t,n){E(t,"sizes",s(t,n.data_sizes)),E(t,"srcset",s(t,n.data_srcset)),E(t,"src",s(t,n.data_src))},w={IMG:function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&m(e).forEach((function(t){y(t,n)}));y(t,n)},IFRAME:function(t,n){E(t,"src",s(t,n.data_src))},VIDEO:function(t,n){m(t).forEach((function(t){E(t,"src",s(t,n.data_src))})),E(t,"poster",s(t,n.data_poster)),E(t,"src",s(t,n.data_src)),t.load()}},I=function(t,n,e){var a=w[t.tagName];a&&(a(t,n),p(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))},k=["IMG","IFRAME","VIDEO"],L=function(t,n){!n||n.toLoadCount||n.loadingCount||g(t.callback_finish,n)},C=function(t,n,e){t.addEventListener(n,e)},A=function(t,n,e){t.removeEventListener(n,e)},z=function(t,n,e){A(t,"load",n),A(t,"loadeddata",n),A(t,"error",e)},O=function(t,n,e){!function(t){delete t.llTempImage}(t),function(t,n){n&&(n.loadingCount-=1)}(0,e),b(t,n.class_loading)},N=function(t,n,e){var a=h(t)||t,o=function o(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_loaded),d(n,"loaded"),g(e.callback_loaded,n,a),L(e,a)}(0,t,n,e),z(a,o,i)},i=function i(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_error),d(n,"error"),g(e.callback_error,n,a),L(e,a)}(0,t,n,e),z(a,o,i)};!function(t,n,e){C(t,"load",n),C(t,"loadeddata",n),C(t,"error",e)}(a,o,i)},M=function(t,n){n&&(n.toLoadCount-=1)},R=function(t,n,e){!function(t){t.llTempImage=document.createElement("img")}(t),N(t,n,e),function(t,n,e){var a=s(t,i?n.data_bg_hidpi:n.data_bg);a&&(t.style.backgroundImage='url("'.concat(a,'")'),h(t).setAttribute("src",a),p(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))}(t,n,e),function(t,n,e){var a=s(t,i?n.data_bg_multi_hidpi:n.data_bg_multi);a&&(t.style.backgroundImage=a,v(t,n.class_applied),d(t,"applied"),g(n.callback_applied,t,e))}(t,n,e)},x=function(t,n,e){!function(t){return k.indexOf(t.tagName)>-1}(t)?R(t,n,e):function(t,n,e){N(t,n,e),I(t,n,e)}(t,n,e),M(0,e),function(t,n){if(n){var e=n._observer;e&&n._settings.auto_unobserve&&e.unobserve(t)}}(t,e),L(n,e)},T=function(t){var n=_(t);n&&(clearTimeout(n),f(t,null))},F=function(t,n,e){var a=e._settings;g(a.callback_enter,t,n,e),a.load_delay?function(t,n,e){var a=n.load_delay,o=_(t);o||(o=setTimeout((function(){x(t,n,e),T(t)}),a),f(t,o))}(t,a,e):x(t,a,e)},G=["IMG","IFRAME"],P=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},j=function(t,n,e){t.forEach((function(t){-1!==G.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,n,e){N(t,n,e),I(t,n,e),M(0,e),d(t,"native"),L(n,e)}(t,n,e))})),e.toLoadCount=0},D=function(t,n){!function(t){t.disconnect()}(t),function(t,n){n.forEach((function(n){t.observe(n),d(n,"observed")}))}(t,n)},S=function(t){var n;a&&!P(t._settings)&&(t._observer=new IntersectionObserver((function(n){n.forEach((function(n){return function(t){return t.isIntersecting||t.intersectionRatio>0}(n)?F(n.target,n,t):function(t,n,e){var a=e._settings;g(a.callback_exit,t,n,e),a.load_delay&&T(t)}(n.target,n,t)}))}),{root:(n=t._settings).container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))},U=function(t){return Array.prototype.slice.call(t)},V=function(t){return t.container.querySelectorAll(t.elements_selector)},$=function(t){return!function(t){return null!==s(t,"ll-status")}(t)||function(t){return"observed"===s(t,"ll-status")}(t)},q=function(t){return function(t){return"error"===s(t,"ll-status")}(t)},H=function(t,n){return function(t){return U(t).filter($)}(t||V(n))},B=function(t){var n,e=t._settings;(n=V(e),U(n).filter(q)).forEach((function(t){b(t,e.class_error),function(t){u(t,"ll-status",null)}(t)})),t.update()},J=function(t,e){var a;this._settings=l(t),this.loadingCount=0,S(this),a=this,n&&window.addEventListener("online",(function(t){B(a)})),this.update(e)};return J.prototype={update:function(t){var n=this._settings,o=H(t,n);this.toLoadCount=o.length,!e&&a?P(n)?j(o,n,this):D(this._observer,o):this.loadAll(o)},destroy:function(){this._observer&&this._observer.disconnect(),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var n=this,e=this._settings;H(t,e).forEach((function(t){x(t,e,n)}))},load:function(t){x(t,this._settings,this)}},J.load=function(t,n){var e=l(n);x(t,e)},n&&function(t,n){if(n)if(n.length)for(var e,a=0;e=n[a];a+=1)c(t,e);else c(t,n)}(J,window.lazyLoadOptions),J}();
var LazyLoad=function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t}).apply(this,arguments)}var n="undefined"!=typeof window,e=n&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=n&&"IntersectionObserver"in window,o=n&&"classList"in document.createElement("p"),i=n&&window.devicePixelRatio>1,r={elements_selector:"img",container:e||n?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},l=function(n){return t({},r,n)},c=function(t,n){var e,a=new t(n);try{e=new CustomEvent("LazyLoad::Initialized",{detail:{instance:a}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:a})}window.dispatchEvent(e)},s=function(t,n){return t.getAttribute("data-"+n)},u=function(t,n,e){var a="data-"+n;null!==e?t.setAttribute(a,e):t.removeAttribute(a)},d=function(t,n){return u(t,"ll-status",n)},f=function(t,n){return u(t,"ll-timeout",n)},_=function(t){return s(t,"ll-timeout")},g=function(t,n,e,a){t&&(void 0===a?void 0===e?t(n):t(n,e):t(n,e,a))},v=function(t,n){o?t.classList.add(n):t.className+=(t.className?" ":"")+n},b=function(t,n){o?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},h=function(t){return t.llTempImage},p=function(t){t&&(t.loadingCount+=1)},m=function(t){for(var n,e=[],a=0;n=t.children[a];a+=1)"SOURCE"===n.tagName&&e.push(n);return e},E=function(t,n,e){e&&t.setAttribute(n,e)},y=function(t,n){E(t,"sizes",s(t,n.data_sizes)),E(t,"srcset",s(t,n.data_srcset)),E(t,"src",s(t,n.data_src))},w={IMG:function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&m(e).forEach((function(t){y(t,n)}));y(t,n)},IFRAME:function(t,n){E(t,"src",s(t,n.data_src))},VIDEO:function(t,n){m(t).forEach((function(t){E(t,"src",s(t,n.data_src))})),E(t,"poster",s(t,n.data_poster)),E(t,"src",s(t,n.data_src)),t.load()}},I=function(t,n,e){var a=w[t.tagName];a&&(a(t,n),p(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))},k=["IMG","IFRAME","VIDEO"],L=function(t,n){!n||n.toLoadCount||n.loadingCount||g(t.callback_finish,n)},C=function(t,n,e){t.addEventListener(n,e)},A=function(t,n,e){t.removeEventListener(n,e)},z=function(t,n,e){A(t,"load",n),A(t,"loadeddata",n),A(t,"error",e)},O=function(t,n,e){!function(t){delete t.llTempImage}(t),function(t,n){n&&(n.loadingCount-=1)}(0,e),b(t,n.class_loading)},N=function(t,n,e){var a=h(t)||t,o=function o(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_loaded),d(n,"loaded"),g(e.callback_loaded,n,a),L(e,a)}(0,t,n,e),z(a,o,i)},i=function i(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_error),d(n,"error"),g(e.callback_error,n,a),L(e,a)}(0,t,n,e),z(a,o,i)};!function(t,n,e){C(t,"load",n),C(t,"loadeddata",n),C(t,"error",e)}(a,o,i)},M=function(t,n){n&&(n.toLoadCount-=1)},R=function(t,n,e){!function(t){t.llTempImage=document.createElement("img")}(t),N(t,n,e),function(t,n,e){var a=s(t,n.data_bg),o=s(t,n.data_bg_hidpi),r=i&&o?o:a;r&&(t.style.backgroundImage='url("'.concat(r,'")'),h(t).setAttribute("src",r),p(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))}(t,n,e),function(t,n,e){var a=s(t,n.data_bg_multi),o=s(t,n.data_bg_multi_hidpi),r=i&&o?o:a;r&&(t.style.backgroundImage=r,v(t,n.class_applied),d(t,"applied"),g(n.callback_applied,t,e))}(t,n,e)},x=function(t,n,e){!function(t){return k.indexOf(t.tagName)>-1}(t)?R(t,n,e):function(t,n,e){N(t,n,e),I(t,n,e)}(t,n,e),M(0,e),function(t,n){if(n){var e=n._observer;e&&n._settings.auto_unobserve&&e.unobserve(t)}}(t,e),L(n,e)},T=function(t){var n=_(t);n&&(clearTimeout(n),f(t,null))},F=function(t,n,e){var a=e._settings;g(a.callback_enter,t,n,e),a.load_delay?function(t,n,e){var a=n.load_delay,o=_(t);o||(o=setTimeout((function(){x(t,n,e),T(t)}),a),f(t,o))}(t,a,e):x(t,a,e)},G=["IMG","IFRAME"],P=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},j=function(t,n,e){t.forEach((function(t){-1!==G.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,n,e){N(t,n,e),I(t,n,e),M(0,e),d(t,"native"),L(n,e)}(t,n,e))})),e.toLoadCount=0},D=function(t,n){!function(t){t.disconnect()}(t),function(t,n){n.forEach((function(n){t.observe(n),d(n,"observed")}))}(t,n)},S=function(t){var n;a&&!P(t._settings)&&(t._observer=new IntersectionObserver((function(n){n.forEach((function(n){return function(t){return t.isIntersecting||t.intersectionRatio>0}(n)?F(n.target,n,t):function(t,n,e){var a=e._settings;g(a.callback_exit,t,n,e),a.load_delay&&T(t)}(n.target,n,t)}))}),{root:(n=t._settings).container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))},U=function(t){return Array.prototype.slice.call(t)},V=function(t){return t.container.querySelectorAll(t.elements_selector)},$=function(t){return!function(t){return null!==s(t,"ll-status")}(t)||function(t){return"observed"===s(t,"ll-status")}(t)},q=function(t){return function(t){return"error"===s(t,"ll-status")}(t)},H=function(t,n){return function(t){return U(t).filter($)}(t||V(n))},B=function(t){var n,e=t._settings;(n=V(e),U(n).filter(q)).forEach((function(t){b(t,e.class_error),function(t){u(t,"ll-status",null)}(t)})),t.update()},J=function(t,e){var a;this._settings=l(t),this.loadingCount=0,S(this),a=this,n&&window.addEventListener("online",(function(t){B(a)})),this.update(e)};return J.prototype={update:function(t){var n=this._settings,o=H(t,n);this.toLoadCount=o.length,!e&&a?P(n)?j(o,n,this):D(this._observer,o):this.loadAll(o)},destroy:function(){this._observer&&this._observer.disconnect(),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var n=this,e=this._settings;H(t,e).forEach((function(t){x(t,e,n)}))},load:function(t){x(t,this._settings,this)}},J.load=function(t,n){var e=l(n);x(t,e)},n&&function(t,n){if(n)if(n.length)for(var e,a=0;e=n[a];a+=1)c(t,e);else c(t,n)}(J,window.lazyLoadOptions),J}();

@@ -264,6 +264,8 @@ (function (global, factory) {

var setBackground = function setBackground(element, settings, instance) {
var srcDataValue = getData(element, isHiDpi ? settings.data_bg_hidpi : settings.data_bg);
if (!srcDataValue) return;
element.style.backgroundImage = "url(\"".concat(srcDataValue, "\")");
getTempImage(element).setAttribute("src", srcDataValue); // Annotate and notify loading
var bg1xValue = getData(element, settings.data_bg);
var bgHiDpiValue = getData(element, settings.data_bg_hidpi);
var bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;
if (!bgDataValue) return;
element.style.backgroundImage = "url(\"".concat(bgDataValue, "\")");
getTempImage(element).setAttribute("src", bgDataValue); // Annotate and notify loading

@@ -280,3 +282,5 @@ increaseLoadingCount(instance);

var setMultiBackground = function setMultiBackground(element, settings, instance) {
var bgDataValue = getData(element, isHiDpi ? settings.data_bg_multi_hidpi : settings.data_bg_multi);
var bg1xValue = getData(element, settings.data_bg_multi);
var bgHiDpiValue = getData(element, settings.data_bg_multi_hidpi);
var bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;
if (!bgDataValue) return;

@@ -283,0 +287,0 @@ element.style.backgroundImage = bgDataValue; // Annotate and notify applied

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).LazyLoad=n()}(this,(function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t}).apply(this,arguments)}var n="undefined"!=typeof window,e=n&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=n&&"IntersectionObserver"in window,o=n&&"classList"in document.createElement("p"),i=n&&window.devicePixelRatio>1,r={elements_selector:"img",container:e||n?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},l=function(n){return t({},r,n)},c=function(t,n){var e,a=new t(n);try{e=new CustomEvent("LazyLoad::Initialized",{detail:{instance:a}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:a})}window.dispatchEvent(e)},s=function(t,n){return t.getAttribute("data-"+n)},u=function(t,n,e){var a="data-"+n;null!==e?t.setAttribute(a,e):t.removeAttribute(a)},d=function(t,n){return u(t,"ll-status",n)},f=function(t,n){return u(t,"ll-timeout",n)},_=function(t){return s(t,"ll-timeout")},g=function(t,n,e,a){t&&(void 0===a?void 0===e?t(n):t(n,e):t(n,e,a))},v=function(t,n){o?t.classList.add(n):t.className+=(t.className?" ":"")+n},p=function(t,n){o?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},b=function(t){return t.llTempImage},h=function(t){t&&(t.loadingCount+=1)},m=function(t){for(var n,e=[],a=0;n=t.children[a];a+=1)"SOURCE"===n.tagName&&e.push(n);return e},y=function(t,n,e){e&&t.setAttribute(n,e)},E=function(t,n){y(t,"sizes",s(t,n.data_sizes)),y(t,"srcset",s(t,n.data_srcset)),y(t,"src",s(t,n.data_src))},w={IMG:function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&m(e).forEach((function(t){E(t,n)}));E(t,n)},IFRAME:function(t,n){y(t,"src",s(t,n.data_src))},VIDEO:function(t,n){m(t).forEach((function(t){y(t,"src",s(t,n.data_src))})),y(t,"poster",s(t,n.data_poster)),y(t,"src",s(t,n.data_src)),t.load()}},I=function(t,n,e){var a=w[t.tagName];a&&(a(t,n),h(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))},k=["IMG","IFRAME","VIDEO"],L=function(t,n){!n||n.toLoadCount||n.loadingCount||g(t.callback_finish,n)},C=function(t,n,e){t.addEventListener(n,e)},A=function(t,n,e){t.removeEventListener(n,e)},z=function(t,n,e){A(t,"load",n),A(t,"loadeddata",n),A(t,"error",e)},O=function(t,n,e){!function(t){delete t.llTempImage}(t),function(t,n){n&&(n.loadingCount-=1)}(0,e),p(t,n.class_loading)},N=function(t,n,e){var a=b(t)||t,o=function o(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_loaded),d(n,"loaded"),g(e.callback_loaded,n,a),L(e,a)}(0,t,n,e),z(a,o,i)},i=function i(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_error),d(n,"error"),g(e.callback_error,n,a),L(e,a)}(0,t,n,e),z(a,o,i)};!function(t,n,e){C(t,"load",n),C(t,"loadeddata",n),C(t,"error",e)}(a,o,i)},x=function(t,n){n&&(n.toLoadCount-=1)},M=function(t,n,e){!function(t){t.llTempImage=document.createElement("img")}(t),N(t,n,e),function(t,n,e){var a=s(t,i?n.data_bg_hidpi:n.data_bg);a&&(t.style.backgroundImage='url("'.concat(a,'")'),b(t).setAttribute("src",a),h(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))}(t,n,e),function(t,n,e){var a=s(t,i?n.data_bg_multi_hidpi:n.data_bg_multi);a&&(t.style.backgroundImage=a,v(t,n.class_applied),d(t,"applied"),g(n.callback_applied,t,e))}(t,n,e)},R=function(t,n,e){!function(t){return k.indexOf(t.tagName)>-1}(t)?M(t,n,e):function(t,n,e){N(t,n,e),I(t,n,e)}(t,n,e),x(0,e),function(t,n){if(n){var e=n._observer;e&&n._settings.auto_unobserve&&e.unobserve(t)}}(t,e),L(n,e)},T=function(t){var n=_(t);n&&(clearTimeout(n),f(t,null))},j=function(t,n,e){var a=e._settings;g(a.callback_enter,t,n,e),a.load_delay?function(t,n,e){var a=n.load_delay,o=_(t);o||(o=setTimeout((function(){R(t,n,e),T(t)}),a),f(t,o))}(t,a,e):R(t,a,e)},F=["IMG","IFRAME"],G=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},P=function(t,n,e){t.forEach((function(t){-1!==F.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,n,e){N(t,n,e),I(t,n,e),x(0,e),d(t,"native"),L(n,e)}(t,n,e))})),e.toLoadCount=0},D=function(t,n){!function(t){t.disconnect()}(t),function(t,n){n.forEach((function(n){t.observe(n),d(n,"observed")}))}(t,n)},S=function(t){var n;a&&!G(t._settings)&&(t._observer=new IntersectionObserver((function(n){n.forEach((function(n){return function(t){return t.isIntersecting||t.intersectionRatio>0}(n)?j(n.target,n,t):function(t,n,e){var a=e._settings;g(a.callback_exit,t,n,e),a.load_delay&&T(t)}(n.target,n,t)}))}),{root:(n=t._settings).container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))},U=function(t){return Array.prototype.slice.call(t)},V=function(t){return t.container.querySelectorAll(t.elements_selector)},$=function(t){return!function(t){return null!==s(t,"ll-status")}(t)||function(t){return"observed"===s(t,"ll-status")}(t)},q=function(t){return function(t){return"error"===s(t,"ll-status")}(t)},H=function(t,n){return function(t){return U(t).filter($)}(t||V(n))},B=function(t){var n,e=t._settings;(n=V(e),U(n).filter(q)).forEach((function(t){p(t,e.class_error),function(t){u(t,"ll-status",null)}(t)})),t.update()},J=function(t,e){var a;this._settings=l(t),this.loadingCount=0,S(this),a=this,n&&window.addEventListener("online",(function(t){B(a)})),this.update(e)};return J.prototype={update:function(t){var n=this._settings,o=H(t,n);this.toLoadCount=o.length,!e&&a?G(n)?P(o,n,this):D(this._observer,o):this.loadAll(o)},destroy:function(){this._observer&&this._observer.disconnect(),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var n=this,e=this._settings;H(t,e).forEach((function(t){R(t,e,n)}))},load:function(t){R(t,this._settings,this)}},J.load=function(t,n){var e=l(n);R(t,e)},n&&function(t,n){if(n)if(n.length)for(var e,a=0;e=n[a];a+=1)c(t,e);else c(t,n)}(J,window.lazyLoadOptions),J}));
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).LazyLoad=n()}(this,(function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t}).apply(this,arguments)}var n="undefined"!=typeof window,e=n&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=n&&"IntersectionObserver"in window,o=n&&"classList"in document.createElement("p"),i=n&&window.devicePixelRatio>1,r={elements_selector:"img",container:e||n?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},l=function(n){return t({},r,n)},c=function(t,n){var e,a=new t(n);try{e=new CustomEvent("LazyLoad::Initialized",{detail:{instance:a}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:a})}window.dispatchEvent(e)},s=function(t,n){return t.getAttribute("data-"+n)},u=function(t,n,e){var a="data-"+n;null!==e?t.setAttribute(a,e):t.removeAttribute(a)},d=function(t,n){return u(t,"ll-status",n)},f=function(t,n){return u(t,"ll-timeout",n)},_=function(t){return s(t,"ll-timeout")},g=function(t,n,e,a){t&&(void 0===a?void 0===e?t(n):t(n,e):t(n,e,a))},v=function(t,n){o?t.classList.add(n):t.className+=(t.className?" ":"")+n},p=function(t,n){o?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},b=function(t){return t.llTempImage},h=function(t){t&&(t.loadingCount+=1)},m=function(t){for(var n,e=[],a=0;n=t.children[a];a+=1)"SOURCE"===n.tagName&&e.push(n);return e},y=function(t,n,e){e&&t.setAttribute(n,e)},E=function(t,n){y(t,"sizes",s(t,n.data_sizes)),y(t,"srcset",s(t,n.data_srcset)),y(t,"src",s(t,n.data_src))},w={IMG:function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&m(e).forEach((function(t){E(t,n)}));E(t,n)},IFRAME:function(t,n){y(t,"src",s(t,n.data_src))},VIDEO:function(t,n){m(t).forEach((function(t){y(t,"src",s(t,n.data_src))})),y(t,"poster",s(t,n.data_poster)),y(t,"src",s(t,n.data_src)),t.load()}},I=function(t,n,e){var a=w[t.tagName];a&&(a(t,n),h(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))},k=["IMG","IFRAME","VIDEO"],L=function(t,n){!n||n.toLoadCount||n.loadingCount||g(t.callback_finish,n)},C=function(t,n,e){t.addEventListener(n,e)},A=function(t,n,e){t.removeEventListener(n,e)},z=function(t,n,e){A(t,"load",n),A(t,"loadeddata",n),A(t,"error",e)},O=function(t,n,e){!function(t){delete t.llTempImage}(t),function(t,n){n&&(n.loadingCount-=1)}(0,e),p(t,n.class_loading)},N=function(t,n,e){var a=b(t)||t,o=function o(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_loaded),d(n,"loaded"),g(e.callback_loaded,n,a),L(e,a)}(0,t,n,e),z(a,o,i)},i=function i(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_error),d(n,"error"),g(e.callback_error,n,a),L(e,a)}(0,t,n,e),z(a,o,i)};!function(t,n,e){C(t,"load",n),C(t,"loadeddata",n),C(t,"error",e)}(a,o,i)},x=function(t,n){n&&(n.toLoadCount-=1)},M=function(t,n,e){!function(t){t.llTempImage=document.createElement("img")}(t),N(t,n,e),function(t,n,e){var a=s(t,n.data_bg),o=s(t,n.data_bg_hidpi),r=i&&o?o:a;r&&(t.style.backgroundImage='url("'.concat(r,'")'),b(t).setAttribute("src",r),h(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))}(t,n,e),function(t,n,e){var a=s(t,n.data_bg_multi),o=s(t,n.data_bg_multi_hidpi),r=i&&o?o:a;r&&(t.style.backgroundImage=r,v(t,n.class_applied),d(t,"applied"),g(n.callback_applied,t,e))}(t,n,e)},R=function(t,n,e){!function(t){return k.indexOf(t.tagName)>-1}(t)?M(t,n,e):function(t,n,e){N(t,n,e),I(t,n,e)}(t,n,e),x(0,e),function(t,n){if(n){var e=n._observer;e&&n._settings.auto_unobserve&&e.unobserve(t)}}(t,e),L(n,e)},T=function(t){var n=_(t);n&&(clearTimeout(n),f(t,null))},j=function(t,n,e){var a=e._settings;g(a.callback_enter,t,n,e),a.load_delay?function(t,n,e){var a=n.load_delay,o=_(t);o||(o=setTimeout((function(){R(t,n,e),T(t)}),a),f(t,o))}(t,a,e):R(t,a,e)},F=["IMG","IFRAME"],G=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},P=function(t,n,e){t.forEach((function(t){-1!==F.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,n,e){N(t,n,e),I(t,n,e),x(0,e),d(t,"native"),L(n,e)}(t,n,e))})),e.toLoadCount=0},D=function(t,n){!function(t){t.disconnect()}(t),function(t,n){n.forEach((function(n){t.observe(n),d(n,"observed")}))}(t,n)},S=function(t){var n;a&&!G(t._settings)&&(t._observer=new IntersectionObserver((function(n){n.forEach((function(n){return function(t){return t.isIntersecting||t.intersectionRatio>0}(n)?j(n.target,n,t):function(t,n,e){var a=e._settings;g(a.callback_exit,t,n,e),a.load_delay&&T(t)}(n.target,n,t)}))}),{root:(n=t._settings).container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))},U=function(t){return Array.prototype.slice.call(t)},V=function(t){return t.container.querySelectorAll(t.elements_selector)},$=function(t){return!function(t){return null!==s(t,"ll-status")}(t)||function(t){return"observed"===s(t,"ll-status")}(t)},q=function(t){return function(t){return"error"===s(t,"ll-status")}(t)},H=function(t,n){return function(t){return U(t).filter($)}(t||V(n))},B=function(t){var n,e=t._settings;(n=V(e),U(n).filter(q)).forEach((function(t){p(t,e.class_error),function(t){u(t,"ll-status",null)}(t)})),t.update()},J=function(t,e){var a;this._settings=l(t),this.loadingCount=0,S(this),a=this,n&&window.addEventListener("online",(function(t){B(a)})),this.update(e)};return J.prototype={update:function(t){var n=this._settings,o=H(t,n);this.toLoadCount=o.length,!e&&a?G(n)?P(o,n,this):D(this._observer,o):this.loadAll(o)},destroy:function(){this._observer&&this._observer.disconnect(),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var n=this,e=this._settings;H(t,e).forEach((function(t){R(t,e,n)}))},load:function(t){R(t,this._settings,this)}},J.load=function(t,n){var e=l(n);R(t,e)},n&&function(t,n){if(n)if(n.length)for(var e,a=0;e=n[a];a+=1)c(t,e);else c(t,n)}(J,window.lazyLoadOptions),J}));
{
"name": "vanilla-lazyload",
"version": "15.1.0",
"version": "15.1.1",
"description": "A fast, lightweight script to load images as they enter the viewport. SEO friendly, it supports responsive images (both srcset + sizes and picture) and progressive JPEG",

@@ -59,3 +59,7 @@ "main": "dist/lazyload.min.js",

},
"homepage": "http://verlok.github.io/lazyload"
"homepage": "http://verlok.github.io/lazyload",
"funding": {
"type": "individual",
"url": "https://www.buymeacoffee.com/verlok"
}
}

@@ -11,2 +11,6 @@ LazyLoad is a fast, lightweight and flexible script that **speeds up your web application** by loading your content images, videos and iframes only **as they enter the viewport**. It's written in plain "vanilla" JavaScript, it leverages the [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) API, it works with [responsive images](https://alistapart.com/article/responsive-images-in-practice) and it supports native lazy loading. See [notable features](#-notable-features) for more.

**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
## 👨‍💻 Getting started - HTML

@@ -135,5 +139,11 @@

---
**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
## 👩‍💻 Getting started - Script
The latest, recommended version of LazyLoad is **15.1.0**.
The latest, recommended version of LazyLoad is **15.1.1**.

@@ -155,3 +165,3 @@ Quickly understand how to upgrade from a previous version reading the [practical upgrade guide](UPGRADE.md).

```html
<script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.0/dist/lazyload.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.1/dist/lazyload.min.js"></script>
```

@@ -163,3 +173,3 @@

<script src="https://cdn.jsdelivr.net/npm/intersection-observer@0.7.0/intersection-observer.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.0/dist/lazyload.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.1/dist/lazyload.min.js"></script>
```

@@ -197,3 +207,3 @@

```js
var lazyLoadAmdUrl = "https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.0/dist/lazyload.amd.min.js";
var lazyLoadAmdUrl = "https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.1/dist/lazyload.amd.min.js";
var polyfillAmdUrl = "https://cdn.jsdelivr.net/npm/intersection-observer-amd@2.0.1/intersection-observer-amd.js";

@@ -244,3 +254,3 @@

async
src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.0/dist/lazyload.min.js"
src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.1/dist/lazyload.min.js"
></script>

@@ -278,3 +288,3 @@ ```

async
src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.0/dist/lazyload.min.js"
src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@15.1.1/dist/lazyload.min.js"
></script>

@@ -361,2 +371,8 @@ ```

---
**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
## 🥧 Recipes

@@ -515,2 +531,6 @@

**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
## 📺 Demos

@@ -558,2 +578,6 @@

**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
## 😋 Tips & tricks

@@ -607,7 +631,5 @@

<!--
MOAR points to add to the README:
---
* When your images source change before or after they was lazily loaded - and you want to lazy load the change too. See issue #84 (closed)
-->
**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**

@@ -714,2 +736,6 @@ ---

**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
## 😯 Notable features

@@ -742,1 +768,7 @@

<a href="http://browserstack.com/"><img alt="BrowserStack Logo" src="./img/browserstack-logo-600x315.png" width="300" height="158"/></a>
---
**Like this project? 👍☕ [Buy me a coffee!](https://www.buymeacoffee.com/verlok)**
---
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc