Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/themify-builder/js/modules/parallax.min.js
Ðазад
((i,t)=>{"use strict";let l,s=null,a=null,o,e,n;const r="builder-parallax-scrolling",c=new Map,p=new Set,d=!!t.Notification,u=e=>{const t=tbLocalScript.breakpoints;let s="desktop";return e<=t.mobile?s="mobile":e<=t.tablet[1]?s="tablet":e<=t.tablet_landscape[1]&&(s="tablet_landscape"),s},g=()=>{e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{for(let[e,t]of c)t&&e&&e.isConnected?!0!==t.visible&&!1!=d||!e.classList.contains(r)||t.update():t&&t.destroy()})},h=e=>{e&&(n&&clearTimeout(n),n=setTimeout(()=>{o&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{const s=u(e.w);for(let[e,t]of c)t&&e?.isConnected?l!==s&&(t.isInBreakpoint()?t.getImage().catch(e=>{t&&t.destroy()}):(p.add(t),t&&t.destroy())):t&&t.destroy();if(l!==s){l=s;for(let e of p)e.el.isConnected?e.isInBreakpoint()&&(e.init(),p.delete(e)):p.delete(e)}o=n=null})},20))};class b{constructor(e){if(i.is_builder_active){const t=c.get(e);t&&t.destroy()}else e.removeAttribute("data-parallax-bg");this.el=e,this.isInBreakpoint()?this.init():(e.classList.remove(r),p.add(this)),null===a&&(a=!0,i.on("tfsmartresize",h))}init(){const e=this.el;(this.pos=null)===s&&(s=new IntersectionObserver((l,e)=>{for(let i=l.length-1;-1<i;--i){let e=l[i].target,t=!0===l[i].isIntersecting&&e.classList.contains(r),s=c.get(e);!0!==t||s.pos||(s.setPos(),s.update()),s.visible=t}},{rootMargin:"10px 0px 10px 0px"}),t.tfOn("scroll",g,{passive:!0})),this.getImage().then(()=>{e.classList.add(r),c.set(e,this),!0==d&&s.observe(e)}).catch(e=>{})}setPos(){this.pos=getComputedStyle(this.el).getPropertyValue("background-position-y")||"50%"}isInBreakpoint(){return"parallax"===getComputedStyle(this.el).getPropertyValue("--tbBg")}getImage(){return new Promise((i,t)=>{let s=getComputedStyle(this.el).getPropertyValue("background-image");if(s&&"none"!==s&&"initial"!==s&&"unset"!==s){if(s=s.replace(/(url\(|\)|")/g,""),/\.(jpg|jpeg|png|webp|avif|gif|svg|apng)$/.test(s)){const e=new Image;e.src=s,e.decode().then(()=>{if(d)this.visible&&this.setPos();else{this.setPos();const e=this.el.offsetHeight,t=1e3<e?70:800<e?60:50,s=100+parseInt(this.pos);this.el.style.backgroundSize="auto calc("+s+"% + "+t+"px)",this.update()}i()}).catch(e=>{console.error("Parrallax("+s+"): "+e),t()})}}else t()})}destroy(){const e=this.el;this.pos=null,c.delete(e),e.classList.remove(r),e.style.backgroundSize=e.style.backgroundPositionY="",s.unobserve(e),0===c.size&&(s.disconnect(),t.tfOff("scroll",g,{passive:!0}),0===p.size&&(i.off("tfsmartresize",h),a=null),s=null)}update(){requestAnimationFrame(()=>{this.el.style.backgroundPositionY="calc("+this.pos+" + "+(.1*this.el.getBoundingClientRect().top+.5<<0)+"px)"})}}l=u(i.w),i.on("builder_load_module_partial",(e,t)=>{let s;if(!0===t){if(!e.hasAttribute("data-parallax-bg"))return;s=[e]}else s=i.selectWithParent("[data-parallax-bg]",e);for(let e=s.length-1;-1<e;--e)new b(s[e])})})(Themify,window);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка