123movies-seo/public/build/assets/lazyload.esm-12OIww4J.js

2 lines
7.7 KiB
JavaScript
Raw Normal View History

2024-08-25 18:55:48 +03:00
const u=typeof window<"u",j=u&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),J=u&&"IntersectionObserver"in window,U=u&&"classList"in document.createElement("p"),q=u&&window.devicePixelRatio>1,pt={elements_selector:".lazy",container:j||u?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_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},W=t=>Object.assign({},pt,t),B=function(t,o){let r;const s="LazyLoad::Initialized",a=new t(o);try{r=new CustomEvent(s,{detail:{instance:a}})}catch{r=document.createEvent("CustomEvent"),r.initCustomEvent(s,!1,!1,{instance:a})}window.dispatchEvent(r)},vt=(t,o)=>{if(o)if(!o.length)B(t,o);else for(let r=0,s;s=o[r];r+=1)B(t,s)},i="src",C="srcset",N="sizes",Z="poster",v="llOriginalAttrs",K="data",w="loading",Q="loaded",X="applied",Et="entered",y="error",Y="native",m="data-",tt="ll-status",c=(t,o)=>t.getAttribute(m+o),It=(t,o,r)=>{const s=m+o;if(r===null){t.removeAttribute(s);return}t.setAttribute(s,r)},E=t=>c(t,tt),f=(t,o)=>It(t,tt,o),L=t=>f(t,null),x=t=>E(t)===null,Lt=t=>E(t)===w,St=t=>E(t)===y,V=t=>E(t)===Y,At=[w,Q,X,y],Ot=t=>At.indexOf(E(t))>=0,l=(t,o,r,s)=>{if(!(!t||typeof t!="function")){if(s!==void 0){t(o,r,s);return}if(r!==void 0){t(o,r);return}t(o)}},h=(t,o)=>{if(U){t.classList.add(o);return}t.className+=(t.className?" ":"")+o},n=(t,o)=>{if(U){t.classList.remove(o);return}t.className=t.className.replace(new RegExp("(^|\\s+)"+o+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},kt=t=>{t.llTempImage=document.createElement("IMG")},Tt=t=>{delete t.llTempImage},ot=t=>t.llTempImage,S=(t,o)=>{if(!o)return;const r=o._observer;r&&r.unobserve(t)},Ct=t=>{t.disconnect()},Nt=(t,o,r)=>{o.unobserve_entered&&S(t,r)},D=(t,o)=>{t&&(t.loadingCount+=o)},wt=t=>{t&&(t.toLoadCount-=1)},rt=(t,o)=>{t&&(t.toLoadCount=o)},yt=t=>t.loadingCount>0,xt=t=>t.toLoadCount>0,st=t=>{let o=[];for(let r=0,s;s=t.children[r];r+=1)s.tagName==="SOURCE"&&o.push(s);return o},H=(t,o)=>{const r=t.parentNode;if(!r||r.tagName!=="PICTURE")return;st(r).forEach(o)},at=(t,o)=>{st(t).forEach(o)},A=[i],ct=[i,Z],p=[i,C,N],et=[K],O=t=>!!t[v],nt=t=>t[v],it=t=>delete t[v],b=(t,o)=>{if(O(t))return;const r={};o.forEach(s=>{r[s]=t.getAttribute(s)}),t[v]=r},Vt=t=>{O(t)||(t[v]={backgroundImage:t.style.backgroundImage})},Dt=(t,o,r)=>{if(!r){t.removeAttribute(o);return}t.setAttribute(o,r)},g=(t,o)=>{if(!O(t))return;const r=nt(t);o.forEach(s=>{Dt(t,s,r[s])})},Ht=t=>{if(!O(t))return;const o=nt(t);t.style.backgroundImage=o.backgroundImage},dt=(t,o,r)=>{h(t,o.class_applied),f(t,X),r&&(o.unobserve_completed&&S(t,o),l(o.callback_applied,t,r))},ut=(t,o,r)=>{h(t,o.class_loading),f(t,w),r&&(D(r,1),l(o.callback_loading,t,r))},d=(t,o,r)=>{r&&t.setAttribute(o,r)},F=(t,o)=>{d(t,N,c(t,o.data_sizes)),d(t,C,c(t,o.data_srcset)),d(t,i,c(t,o.data_src))},Rt=(t,o)=>{H(t,r=>{b(r,p),F(r,o)}),b(t,p),F(t,o)},zt=(t,o)=>{b(t,A),d(t,i,c(t,o.data_src))},Mt=(t,o)=>{at(t,r=>{b(r,A),d(r,i,c(r,o.data_src))}),b(t,ct),d(t,Z,c(t,o.data_poster)),d(t,i,c(t,o.data_src)),t.load()},Bt=(t,o)=>{b(t,et),d(t,K,c(t,o.data_src))},Ft=(t,o,r)=>{const s=c(t,o.data_bg),a=c(t,o.data_bg_hidpi),e=q&&a?a:s;e&&(t.style.backgroundImage=`url("${e}")`,ot(t).setAttribute(i,e),ut(t,o,r))},Gt=(t,o,r)=>{const s=c(t,o.data_bg_multi),a=c(t,o.data_bg_multi_hidpi),e=q&&a?a:s;e&&(t.style.backgroundImage=e,dt(t,o,r))},Pt=(t,o,r)=>{const s=c(t,o.data_bg_set);if(!s)return;const a=s.split("|");let e=a.map(_=>`image-set(${_})`);t.style.backgroundImage=e.join(),t.style.backgroundImage===""&&(e=a.map(_=>`-webkit-image-set(${_})`),t.sty