!function(e){function t(){e("[data-motion-effects]").each(function(){const e=function(e){const t=e.dataset.motionEffects;try{return JSON.parse(t)}catch(e){return null}}(this),t=this;gsap.registerPlugin(ScrollTrigger);const i=[],n=t.dataset.scrollDevices||"small-visibility, medium-visibility, large-visibility";let a=!0,s="large-visibility";Modernizr.mq("only screen and (max-width: "+fusionJSVars.visibility_medium+"px)")&&(s="medium-visibility"),Modernizr.mq("only screen and (max-width: "+fusionJSVars.visibility_small+"px)")&&(s="small-visibility"),n.includes(s)||(a=!1),e.forEach(e=>{const n={};if("scroll"===e.type&&a){const r=e.scroll_type||"transition",l=e.start_element||"top",c=e.start_viewport||"bottom",u=e.end_element||"bottom",f=e.end_viewport||"up";let p="+=0";if(n.type=r,"transition"===r){const m=e.scroll_direction||"up",y=e.transition_speed||1;"up"===m?(n.from={y:50*y},n.y=-50*y,p="-="+50*y):"down"===m?(n.from={y:-50*y},n.y=50*y):"right"===m?(n.from={x:-50*y},n.x=50*y):"left"===m&&(n.from={x:50*y},n.x=-50*y)}else if("fade"===r){const d=e.fade_type||"in";"in"===d?(n.from={opacity:0},n.opacity=1):"out"===d&&(n.from={opacity:1},n.opacity=0)}else if("scale"===r){const w=e.scale_type||"up",g=e.initial_scale||1,_=e.max_scale||1.5,x=e.min_scale||.5;n.from={scale:g},"up"===w?n.scale=_:"down"===w&&(n.scale=x)}else if("rotate"===r){const b=e.initial_rotate||1,P=e.end_rotate||30;n.from={rotation:b},n.rotation=P}else if("blur"===r){const v=e.initial_blur||0,h=e.end_blur||3;n.from={filter:`blur(${v}px)`},n.blur=h}n.start=`${l}${p} ${c}`,n.end=`${u} ${f}`,i.push(n)}if("mouse"===e.type){const O=e.mouse_effect||"track",I=e.mouse_effect_direction||"opposite",T=e.mouse_effect_speed||2;let $,E,M,k,L=5*T;function s(){M=gsap.utils.mapRange(0,innerWidth,-L,L),k=gsap.utils.mapRange(0,innerHeight,-L,L)}if("tilt"===O&&(L=3*T),window.addEventListener("resize",s),s(),"track"===O){const S=function(){gsap.to(t,{xPercent:"same"===I?$:-$,yPercent:"same"===I?E:-E,ease:"none"})};gsap.ticker.add(S)}else if("tilt"===O){const z=function(){$||($=0),E||(E=0),gsap.to(t,{rotationX:"same"===I?-E*T:E*T,rotationY:"same"===I?$*T:-$*T,ease:"none",transformPerspective:1500})};gsap.ticker.add(z)}window.addEventListener("mousemove",function(e){$=M(e.clientX),E=k(e.clientY)})}if("infinite"===e.type){const J=e.infinite_animation||"float",q=e.infinite_animation_speed||2;if("float"===J){const D=new TimelineMax({repeat:-1});D.to(t,6/q,{y:"-="+o(22,30),x:"+="+o(13,20),rotation:"-=3",ease:Power1.easeInOut}).to(t,6/q,{y:"+="+o(22,30),x:"-="+o(13,20),rotation:"+=3",ease:Power1.easeInOut}).to(t,6/q,{y:"-="+o(22,30),rotation:"+="+o(2,4),ease:Power1.easeInOut}).to(t,6/q,{y:"+="+o(22,30),rotation:"-="+o(2,4),ease:Power1.easeInOut}).to(t,6/q,{y:"-="+o(22,30),rotation:"+="+o(2,4),ease:Power1.easeInOut}).to(t,6/q,{y:"+="+o(22,30),rotation:"-="+o(2,4),ease:Power1.easeInOut}).to(t,6/q,{y:"-="+o(22,30),rotation:"+="+o(2,4),ease:Power1.easeInOut}).to(t,6/q,{y:"+="+o(22,30),rotation:"-="+o(2,4),ease:Power1.easeInOut}).to(t,6/q,{y:"-="+o(12,20),ease:Power1.easeInOut}).to(t,6/q,{y:"+="+o(12,20),ease:Power1.easeInOut}),TweenLite.to(D,27,{ease:Power1.easeInOut})}else if("pulse"===J){const R=new TimelineMax;R.to(t,3/q,{scale:1.3,repeat:-1,yoyo:!0}),TweenLite.to(R,27,{ease:Power3.easeInOut})}else"rotate"===J?gsap.timeline().fromTo(t,{opacity:0,scale:0},{opacity:1,scale:1,duration:1,ease:"power2.out"}).fromTo(t,{rotation:0},{rotation:360,duration:10/q,repeat:-1,repeatDelay:.01,ease:"linear"},0):"wiggle"===J&&(gsap.set(t,{xPercent:-10,x:-1}),gsap.to(t,{repeat:-1,yoyo:!0,xPercent:10,duration:2/q,ease:"power1.inOut"}))}}),i.length&&i.forEach(e=>{const o={scrollTrigger:{trigger:t,scrub:0,start:e.start,end:e.end}};"y"in e&&(o.y=e.y),"x"in e&&(o.x=e.x),"opacity"in e&&(o.opacity=e.opacity),"scale"in e&&(o.scale=e.scale),"rotation"in e&&(o.rotation=e.rotation),"blur"in e&&(o.filter=`blur(${e.blur}px)`),gsap.set(t,e.from),gsap.to(t,o)})})}function o(e,t){return(e+(t-e))*Math.random()}t(),e("body").on("avada-studio-preview-done",function(){t()})}(jQuery);