text: (function(e,t){"use strict";e=e||{};var o=function(e,t){return this.initialize(e,t)};o.defaults={targetClass:".section-scroll",dotsNav:!0},o.prototype={initialize:function(e,t){return e.data("__sectionScroll")?this:(this.$el=e,this.setData().setOptions(t).build().events(),this)},setData:function(){return this.$el.data("__sectionScroll",this),this},setOptions:function(e){return this.options=t.extend(!0,{},o.defaults,e,{wrapper:this.$el}),this},build:function(){var e=this;this.options.wrapper;e.$header=t("#header"),t("html").addClass("overflow-hidden"),e.updateSectionsHeight(),t(this.options.targetClass).wrap('<div class="section-wrapper"></div>'),t(".section-wrapper").each(function(){t(this).height(t(this).find(".section-scroll").outerHeight())}),t(".section-wrapper").first().addClass("active");var o=!1,i=!1,n="",s=0,a=0;t(window).on("touchstart",function(e){s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0].screenY:e.originalEvent.touches[0].screenY});var r="onwheel"in document?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";return(t(window).width()<992||"ontouchstart"in window||navigator.msMaxTouchPoints)&&(r="onwheel"in document?"wheel touchend":void 0!==document.onmousewheel?"mousewheel touchend":"DOMMouseScroll touchend"),t(window).on(r,function(r){if(!t(".porto-popup-menu.opened").length){var c=void 0==r.originalEvent.wheelDelta?r.originalEvent.deltaY>0:r.originalEvent.wheelDelta<0;if(!r.type||"touchend"!=r.type||((a=event.changedTouches&&event.changedTouches.length?event.changedTouches[0].screenY:event.originalEvent.touches[0].screenY)<=s&&(n="up"),a>=s&&(n="down"),a!=s)){var l=t(".section-wrapper").eq(e.getCurrentIndex()).find(".section-scroll"),d=e.getNextSection(c,n);if(t(window).width()<992&&setTimeout(function(){t(".section-wrapper").eq(e.getCurrentIndex()).find(".section-scroll").hasClass("section-scroll-scrollable")?t("html").removeClass("overflow-hidden"):t("html").addClass("overflow-hidden")},1200),!l.hasClass("section-scroll-scrollable")||o||i){if(!o&&!i){if(c||"up"==n){if(e.getCurrentIndex()==t(".section-wrapper").length-1)return!1;e.changeSectionActiveState(d),setTimeout(function(){e.moveTo(d.offset().top)},150)}else{if(0==e.getCurrentIndex())return!1;e.changeSectionActiveState(d),d.height()>t(window).height()?e.moveTo(l.offset().top-t(window).height()):setTimeout(function(){e.moveTo(d.offset().top)},150)}e.changeDotsActiveState(),e.$header.css({opacity:0,transition:"ease opacity 500ms"}),d.css({position:"relative",opacity:1,"z-index":1,transform:"translate3d(0,0,0) scale(1)"}),l.css({position:"fixed",width:"100%",top:0,left:0,opacity:0,"z-index":0,transform:"translate3d(0,0,-10px) scale(0.7)",transition:"ease transform 600ms, ease opacity 600ms"});var h=parseInt(l.css("marginLeft"),10)+parseInt(l.css("marginRight"),10);h<0&&l.css("width","calc(100% + "+-1*h+"px)"),setTimeout(function(){l.css({position:"relative",opacity:1,transform:"translate3d(0,0,-10px) scale(1)"}),e.$header.css({opacity:1}),e.$header.trigger("porto_section_scroll_scrolled",[e.getCurrentIndex()]),setTimeout(function(){o=!1},500)},1e3),o=!0}}else{if(c||"up"==n){if(t(window).scrollTop()+t(window).height()>=d.offset().top){if(o=!0,setTimeout(function(){setTimeout(function(){o=!1},500)},1e3),e.getCurrentIndex()==t(".section-wrapper").length-1)return!1;e.moveTo(l.offset().top+l.outerHeight()),e.changeSectionActiveState(d),e.$header.css({opacity:0,transition:"ease opacity 500ms"})}if(t(window).width()>991)for(u=1;u<100;u++)if(t("body, html").scrollTop(t(window).scrollTop()+1),t(window).scrollTop()+t(window).height()>=d.offset().top){i=!0,setTimeout(function(){i=!1},500);break}}else{if(t(window).scrollTop()<=l.offset().top){if(o=!0,setTimeout(function(){setTimeout(function(){o=!1},500)},1e3),0==e.getCurrentIndex())return!1;e.moveTo(l.offset().top-t(window).height()),e.changeSectionActiveState(d),e.$header.css({opacity:0,transition:"ease opacity 500ms"})}if(t(window).width()>991)for(var u=1;u<100;u++)if(t("body, html").scrollTop(t(window).scrollTop()-1),t(window).scrollTop()<=l.offset().top){i=!0,setTimeout(function(){i=!1},500);break}}e.changeDotsActiveState()}}}}),this.options.dotsNav&&e.dotsNavigation(),setTimeout(function(){if(t(window.location.hash).get(0))e.moveTo(t(window.location.hash).parent().offset().top),e.changeSectionActiveState(t(window.location.hash)),e.changeDotsActiveState(),e.updateHash(!0);else{var o=window.location.hash,i=o.replace("#","");o||(i=1),e.moveTo(t(".section-wrapper").eq(i-1).offset().top),e.changeSectionActiveState(t(".section-wrapper").eq(i-1).find(".section-scroll")),e.changeDotsActiveState(),e.updateHash(!0)}t(window).trigger("section.scroll.ready"),e.$header.trigger("porto_section_scroll_scrolled",[e.getCurrentIndex()])},500),this},updateSectionsHeight:function(){return t(".section-scroll").each(function(){t(this).outerHeight()<t(window).height()+3?t(this).css({height:"100vh"}):t(this).addClass("section-scroll-scrollable")}),this},updateHash:function(e){if(window.location.hash){if(!e){var t=this.getCurrentIndex()+1;window.location.hash=t}}else window.location.hash=1;return this},getCurrentIndex:function(){var e=0;return t(".section-wrapper").each(function(o){if(t(this).hasClass("active"))return e=o}),e},moveTo:function(e,o){var i=this;return t("body, html").animate({scrollTop:e},1e3,"easeOutQuint"),setTimeout(function(){i.updateHash()},500),this},getNextSection:function(e,o){return e||"up"==o?t(".section-wrapper").eq(this.getCurrentIndex()+1).children().eq(0):t(".section-wrapper").eq(this.getCurrentIndex()-1).children().eq(0)},changeSectionActiveState:function(e){return t(".section-wrapper").removeClass("active"),e.parent().addClass("active"),this},changeDotsActiveState:function(){return t(".section-scroll-dots-navigation > ul > li").removeClass("active"),t(".section-scroll-dots-navigation > ul > li").eq(this.getCurrentIndex()).addClass("active"),this},dotsNavigation:function(){var e=this,o=t('<div class="section-scroll-dots-navigation"><ul class="list list-unstyled"></ul></div>'),i=e.getCurrentIndex();e.options.dotsClass&&o.addClass(e.options.dotsClass);for(var n=0;n<t(".section-scroll").length;n++){var s=t(".section-wrapper").eq(n).find(".section-scroll").data("section-scroll-title");o.find("> ul").append("<li"+(i==n?' class="active"':"")+'><a href="#'+n+'" data-nav-id="'+n+'"><span>'+s+"</span></a></li>")}return t(".page-wrapper").append(o),o.find("a[data-nav-id]").on("click touchstart",function(o){o.preventDefault();var i=t(this);t(".section-scroll").css({opacity:0,transition:"ease opacity 300ms"}),e.$header.css({opacity:0,transition:"ease opacity 500ms"}),setTimeout(function(){e.moveTo(t(".section-wrapper").eq(i.data("nav-id")).offset().top),t(".section-wrapper").removeClass("active"),t(".section-wrapper").eq(i.data("nav-id")).addClass("active"),t(".section-wrapper").eq(e.getCurrentIndex()).find(".section-scroll").css({opacity:1}),setTimeout(function(){t(".section-scroll").css({opacity:1}),e.$header.css({opacity:1}),e.$header.trigger("porto_section_scroll_scrolled",[e.getCurrentIndex()])},500),e.changeDotsActiveState()},500)}),this},events:function(){var e=this;return t(window).on("section.scroll.ready",function(){t(window).scrollTop(0)}),t(document).ready(function(){t(window).smartresize(function(){e.updateSectionsHeight()})}),this}},t.extend(e,{PluginSectionScroll:o}),t.fn.themePluginSectionScroll=function(e){return this.map(function(){var i=t(this);return i.data("__sectionScroll")?i.data("__sectionScroll"):new o(i,e)})}}).apply(this,[window.theme,jQuery]);