!function(i){"use strict";window.LaStudioKitsTimeLineVertical=function(t){var e=i(window),n=this,o=t.find(".lakit-vtimeline__line"),a=o.find(".lakit-vtimeline__line-progress"),s=t.find(".lakit-vtimeline-item"),l=t.find(".lakit-vtimeline-item__point"),r=e.scrollTop(),d=-1,f=i(window).height(),c=e.outerHeight(),u=!1;n.debounce=function(i,t){var e;return function(n){e&&clearTimeout(e),e=setTimeout((function(){t.call(this,n),e=null}),i)}},n.onScroll=function(){r=e.scrollTop(),n.updateFrame(),n.animateCards()},n.onResize=function(){r=e.scrollTop(),f=e.height(),n.updateFrame()},n.updateWindow=function(){u=!1,o.css({top:s.first().find(l).offset().top-s.first().offset().top,bottom:t.offset().top+t.outerHeight()-s.last().find(l).offset().top}),d!==r&&(d=r,f,n.updateProgress())},n.updateProgress=function(){var t=s.last().find(l).offset().top,e=r-a.offset().top+c/2;t<=r+c/2&&(e=t-a.offset().top),a.css({height:e+"px"}),s.each((function(){i(this).find(l).offset().top<r+.5*c?i(this).addClass("is--active"):i(this).removeClass("is--active")}))},n.updateFrame=function(){u||requestAnimationFrame(n.updateWindow),u=!0},n.animateCards=function(){s.each((function(){i(this).offset().top<=r+.9*c&&i(this).hasClass("lakit-vtimeline-item--animated")&&i(this).addClass("is--show")}))},n.init=function(){i(document).ready(n.onScroll),i(window).on("scroll.LaStudioKitsTimeLineVertical",n.onScroll),i(window).on("resize.LaStudioKitsTimeLineVertical orientationchange.LaStudioKitsTimeLineVertical",n.debounce(50,n.onResize))}},i(window).on("elementor/frontend/init",(function(){window.elementorFrontend.hooks.addAction("frontend/element_ready/lakit-timeline-vertical.default",(function(i){var t=i.find(".lakit-vtimeline");t.length&&new LaStudioKitsTimeLineVertical(t).init()}))}))}(jQuery);