HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wppartneramazingsecret/wp-content/themes/themify-ultra/themify/js/modules/tf_wow.js
/**
 * wow module
 */
;
(function (Themify) {
    'use strict';
    let is_working=false;
	const hoverCallback=function() {
		if (is_working === false) {
			is_working = true;
			const animation = this.style['animationName'],
				hover=this.getAttribute('data-tf-animation_hover');
			if (animation) {
				this.style['animationIterationCount']=this.style['animationDelay']=this.style['animationName'] = '';
				this.classList.remove(animation);
			}
			this.addEventListener('animationend',function(e){
				this.classList.remove('animated','tb_hover_animate',e.animationName);
				this.style['animationName'] = '';
				is_working = false;
			},{passive:true,once:true});
			this.style['animationName'] = hover;
			this.classList.add('animated','tb_hover_animate',hover);
		}
	},
	hover=function(el) {
		const ev=Themify.isTouch?'touchstart':'mouseenter',
		events = [ev,'tf_custom_animate'];
		for (let i = events.length - 1; i > -1; --i) {
			el.removeEventListener(events[i], hoverCallback, {passive: true});
			el.addEventListener(events[i], hoverCallback, {passive: true});
		}
	},
	animate=function(el) {
		Themify.imagesLoad(el, function (instance) {
			const item =instance.elements[0];
			item.style['visibility'] = 'visible';
			if (item.hasAttribute('data-tf-animation')) {
					if (item.hasAttribute('data-tf-animation_repeat')) {
							item.style['animationIterationCount'] = item.getAttribute('data-tf-animation_repeat');
					}
					if (item.hasAttribute('data-tf-animation_delay')) {
							item.style['animationDelay'] = item.getAttribute('data-tf-animation_delay') + 's';
					}
					const cl=item.getAttribute('data-tf-animation');
					item.classList.add(cl);
					item.style['animationName'] = cl;
					item.addEventListener('animationend', function () {
						this.style['animationIterationCount']=this.style['animationDelay']='';
						this.classList.remove('animated',cl);
						this.removeAttribute('data-tf-animation');
					}, {passive: true, once: true});
					item.classList.add('animated');
			}
			if (item.classList.contains('hover-wow')) {
				hover(item);
			}
		});
	},
	observer= new IntersectionObserver(function (entries, _self) {
			for (let i = entries.length - 1; i > -1; --i) {
				if (entries[i].isIntersecting === true) {
					_self.unobserve(entries[i].target);
					animate(entries[i].target);
				}
			}
	}, {
		threshold: .01
	}),
	init=function(items) {
		if (items instanceof jQuery) {
			items = items.get();
		}	
		for (let i = items.length - 1; i > -1; --i) {
			observer.observe(items[i]);
		}
	};
    Themify.on('tf_wow_init', function ( items) {
        if (!Themify.cssLazy['animate']) {
            Themify.loadAnimateCss(function () {
				init(items);
            });
        }
        else {
            init(items);
        }
    });

})(Themify);