"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).LocomotiveScroll=e()}(void 0,function(){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function e(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t}function i(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function l(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(t){var e,i,s;e=n,s=o[i=t],i in e?Object.defineProperty(e,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[i]=s}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))})}return n}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(s){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(s);if(n){var i=a(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!=_typeof(e)&&"function"!=typeof e?c(t):e}(this,t)}}function d(t,e,i){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var s=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(s){var n=Object.getOwnPropertyDescriptor(s,e);return n.get?n.get.call(i):n.value}})(t,e,i||t)}function L(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var i=[],s=!0,n=!1,o=void 0;try{for(var l,r=t[Symbol.iterator]();!(s=(l=r.next()).done)&&(i.push(l.value),!e||i.length!==e);s=!0);}catch(t){n=!0,o=t}finally{try{s||null==r.return||r.return()}finally{if(n)throw o}}return i}}(t,e)||v(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){if(t){if("string"==typeof t)return b(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(t,e):void 0}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}var u={el:document,name:"scroll",offset:[0,0],repeat:!1,smooth:!1,initPosition:{x:0,y:0},direction:"vertical",gestureDirection:"vertical",reloadOnContextChange:!1,lerp:.1,class:"is-inview",scrollbarContainer:!1,scrollbarClass:"c-scrollbar",scrollingClass:"has-scroll-scrolling",draggingClass:"has-scroll-dragging",smoothClass:"has-scroll-smooth",initClass:"has-scroll-init",getSpeed:!1,getDirection:!1,scrollFromAnywhere:!1,multiplier:1,firefoxMultiplier:50,touchMultiplier:2,resetNativeScroll:!0,tablet:{smooth:!1,direction:"vertical",gestureDirection:"vertical",breakpoint:1024},smartphone:{smooth:!1,direction:"vertical",gestureDirection:"vertical"}},f=(e(m,[{key:"init",value:function(){this.initEvents()}},{key:"checkScroll",value:function(){this.dispatchScroll()}},{key:"checkResize",value:function(){var t=this;this.resizeTick||(this.resizeTick=!0,requestAnimationFrame(function(){t.resize(),t.resizeTick=!1}))}},{key:"resize",value:function(){}},{key:"checkContext",value:function(){if(this.reloadOnContextChange){this.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints||this.windowWidth<this.tablet.breakpoint,this.isTablet=this.isMobile&&this.windowWidth>=this.tablet.breakpoint;var t=this.context;this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",t==this.context||("desktop"==t?this.smooth:this[t].smooth)!=("desktop"==this.context?this.smooth:this[this.context].smooth)&&window.location.reload()}}},{key:"initEvents",value:function(){var e=this;this.scrollToEls=this.el.querySelectorAll("[data-".concat(this.name,"-to]")),this.setScrollTo=this.setScrollTo.bind(this),this.scrollToEls.forEach(function(t){t.addEventListener("click",e.setScrollTo,!1)})}},{key:"setScrollTo",value:function(t){t.preventDefault(),this.scrollTo(t.currentTarget.getAttribute("data-".concat(this.name,"-href"))||t.currentTarget.getAttribute("href"),{offset:t.currentTarget.getAttribute("data-".concat(this.name,"-offset"))})}},{key:"addElements",value:function(){}},{key:"detectElements",value:function(l){var r=this,a=this.instance.scroll.y,c=a+this.windowHeight,h=this.instance.scroll.x,d=h+this.windowWidth;Object.entries(this.els).forEach(function(t){var e=L(t,2),i=e[0],s=e[1];if(!s||s.inView&&!l||("horizontal"===r.direction?d>=s.left&&h<s.right&&r.setInView(s,i):c>=s.top&&a<s.bottom&&r.setInView(s,i)),s&&s.inView)if("horizontal"===r.direction){var n=s.right-s.left;s.progress=(r.instance.scroll.x-(s.left-r.windowWidth))/(n+r.windowWidth),(d<s.left||h>s.right)&&r.setOutOfView(s,i)}else{var o=s.bottom-s.top;s.progress=(r.instance.scroll.y-(s.top-r.windowHeight))/(o+r.windowHeight),(c<s.top||a>s.bottom)&&r.setOutOfView(s,i)}}),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),(this.currentElements[e]=t).call&&this.hasCallEventSet&&(this.dispatchCall(t,"enter"),t.repeat||(this.els[e].call=!1))}},{key:"setOutOfView",value:function(t,e){var i=this;this.els[e].inView=!1,Object.keys(this.currentElements).forEach(function(t){t===e&&delete i.currentElements[t]}),t.call&&this.hasCallEventSet&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map(function(t){return t.trim()}),this.callObj=t,1==this.callValue.length&&(this.callValue=this.callValue[0]);var i=new Event(this.namespace+"call");this.el.dispatchEvent(i)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");this.el.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){this.listeners[t]||(this.listeners[t]=[]);var i=this.listeners[t];i.push(e),1===i.length&&this.el.addEventListener(this.namespace+t,this.checkEvent,!1),"call"===t&&(this.hasCallEventSet=!0,this.detectElements(!0))}},{key:"unsetEvents",value:function(t,e){if(this.listeners[t]){var i=this.listeners[t],s=i.indexOf(e);s<0||(i.splice(s,1),0===i.index&&this.el.removeEventListener(this.namespace+t,this.checkEvent,!1))}}},{key:"checkEvent",value:function(t){var e=this,i=t.type.replace(this.namespace,""),s=this.listeners[i];s&&0!==s.length&&s.forEach(function(t){switch(i){case"scroll":return t(e.instance);case"call":return t(e.callValue,e.callWay,e.callObj);default:return t()}})}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var e=this;window.removeEventListener("resize",this.checkResize,!1),Object.keys(this.listeners).forEach(function(t){e.el.removeEventListener(e.namespace+t,e.checkEvent,!1)}),this.listeners={},this.scrollToEls.forEach(function(t){t.removeEventListener("click",e.setScrollTo,!1)}),this.html.classList.remove(this.initClass)}}]),m),p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};n(this,m),Object.assign(this,u,t),this.smartphone=u.smartphone,t.smartphone&&Object.assign(this.smartphone,t.smartphone),this.tablet=u.tablet,t.tablet&&Object.assign(this.tablet,t.tablet),this.namespace="locomotive",this.html=document.documentElement,this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.els={},this.currentElements={},this.listeners={},this.hasScrollTicking=!1,this.hasCallEventSet=!1,this.checkScroll=this.checkScroll.bind(this),this.checkResize=this.checkResize.bind(this),this.checkEvent=this.checkEvent.bind(this),this.instance={scroll:{x:0,y:0},limit:{x:this.html.offsetWidth,y:this.html.offsetHeight},currentElements:this.currentElements},this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",this.isMobile&&(this.direction=this[this.context].direction),"horizontal"===this.direction?this.directionAxis="x":this.directionAxis="y",this.getDirection&&(this.instance.direction=null),this.getDirection&&(this.instance.speed=0),this.html.classList.add(this.initClass),window.addEventListener("resize",this.checkResize,!1)}function t(t,e){return t(e={exports:{}},e.exports),e.exports}var y=t(function(t,e){t.exports={polyfill:function(){var a=window,c=document;if(!("scrollBehavior"in c.documentElement.style)||!0===a.__forceSmoothScrollPolyfill__){var t,e=a.HTMLElement||a.Element,h={scroll:a.scroll||a.scrollTo,scrollBy:a.scrollBy,elementScroll:e.prototype.scroll||u,scrollIntoView:e.prototype.scrollIntoView},d=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now,i=(t=a.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(t)?1:0);a.scroll=a.scrollTo=function(){void 0!==arguments[0]&&(!0!==s(arguments[0])?l.call(a,c.body,void 0!==arguments[0].left?~~arguments[0].left:a.scrollX||a.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:a.scrollY||a.pageYOffset):h.scroll.call(a,void 0!==arguments[0].left?arguments[0].left:"object"!=_typeof(arguments[0])?arguments[0]:a.scrollX||a.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:a.scrollY||a.pageYOffset))},a.scrollBy=function(){void 0!==arguments[0]&&(s(arguments[0])?h.scrollBy.call(a,void 0!==arguments[0].left?arguments[0].left:"object"!=_typeof(arguments[0])?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):l.call(a,c.body,~~arguments[0].left+(a.scrollX||a.pageXOffset),~~arguments[0].top+(a.scrollY||a.pageYOffset)))},e.prototype.scroll=e.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==s(arguments[0])){var t=arguments[0].left,e=arguments[0].top;l.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");h.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=_typeof(arguments[0])?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},e.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==s(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):h.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},e.prototype.scrollIntoView=function(){if(!0!==s(arguments[0])){var t=function(t){for(;t!==c.body&&!1===(e=t,void 0,void 0,i=n(e,"Y")&&o(e,"Y"),s=n(e,"X")&&o(e,"X"),i||s);)t=t.parentNode||t.host;var e,i,s;return t}(this),e=t.getBoundingClientRect(),i=this.getBoundingClientRect();t!==c.body?(l.call(this,t,t.scrollLeft+i.left-e.left,t.scrollTop+i.top-e.top),"fixed"!==a.getComputedStyle(t).position&&a.scrollBy({left:e.left,top:e.top,behavior:"smooth"})):a.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else h.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(t,e){this.scrollLeft=t,this.scrollTop=e}function s(t){if(null===t||"object"!=_typeof(t)||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==_typeof(t)&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function n(t,e){return"Y"===e?t.clientHeight+i<t.scrollHeight:"X"===e?t.clientWidth+i<t.scrollWidth:void 0}function o(t,e){var i=a.getComputedStyle(t,null)["overflow"+e];return"auto"===i||"scroll"===i}function l(t,e,i){var s,n,o,l,r=d();l=t===c.body?(n=(s=a).scrollX||a.pageXOffset,o=a.scrollY||a.pageYOffset,h.scroll):(n=(s=t).scrollLeft,o=t.scrollTop,u),function t(e){var i,s,n,o,l=(d()-e.startTime)/468;o=l=1<l?1:l,i=.5*(1-Math.cos(Math.PI*o)),s=e.startX+(e.x-e.startX)*i,n=e.startY+(e.y-e.startY)*i,e.method.call(e.scrollable,s,n),s===e.x&&n===e.y||a.requestAnimationFrame(t.bind(a,e))}({scrollable:s,method:l,startTime:r,startX:n,startY:o,x:e,y:i})}}}}),g=(y.polyfill,function(t){r(s,f);var i=h(s);function s(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return n(this,s),(t=i.call(this,e)).resetNativeScroll&&(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),window.addEventListener("scroll",t.checkScroll,!1),void 0===window.smoothscrollPolyfill&&(window.smoothscrollPolyfill=y,window.smoothscrollPolyfill.polyfill()),t}return e(s,[{key:"init",value:function(){this.instance.scroll.y=window.pageYOffset,this.addElements(),this.detectElements(),d(a(s.prototype),"init",this).call(this)}},{key:"checkScroll",value:function(){var t=this;d(a(s.prototype),"checkScroll",this).call(this),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.instance.scroll.y=window.pageYOffset,Object.entries(this.els).length&&(this.hasScrollTicking||(requestAnimationFrame(function(){t.detectElements()}),this.hasScrollTicking=!0))}},{key:"addDirection",value:function(){window.pageYOffset>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):window.pageYOffset<this.instance.scroll.y&&"up"!==this.instance.direction&&(this.instance.direction="up")}},{key:"addSpeed",value:function(){window.pageYOffset!=this.instance.scroll.y?this.instance.speed=(window.pageYOffset-this.instance.scroll.y)/Math.max(1,Date.now()-this.speedTs):this.instance.speed=0}},{key:"resize",value:function(){Object.entries(this.els).length&&(this.windowHeight=window.innerHeight,this.updateElements())}},{key:"addElements",value:function(){var y=this;this.els={},this.el.querySelectorAll("[data-"+this.name+"]").forEach(function(t,e){t.getBoundingClientRect();var i,s,n,o=t.dataset[y.name+"Class"]||y.class,l="string"==typeof t.dataset[y.name+"Id"]?t.dataset[y.name+"Id"]:e,r="string"==typeof t.dataset[y.name+"Offset"]?t.dataset[y.name+"Offset"].split(","):y.offset,a=t.dataset[y.name+"Repeat"],c=t.dataset[y.name+"Call"],h=t.dataset[y.name+"Target"],d=(n=void 0!==h?document.querySelector("".concat(h)):t).getBoundingClientRect();i=d.top+y.instance.scroll.y,s=d.left+y.instance.scroll.x;var u=i+n.offsetHeight,f=s+n.offsetWidth;a="false"!=a&&(null!=a||y.repeat);var p=y.getRelativeOffset(r),m={el:t,targetEl:n,id:l,class:o,top:i+=p[0],bottom:u-=p[1],left:s,right:f,offset:r,progress:0,repeat:a,inView:!1,call:c};y.els[l]=m,t.classList.contains(o)&&y.setInView(y.els[l],l)})}},{key:"updateElements",value:function(){var r=this;Object.entries(this.els).forEach(function(t){var e=L(t,2),i=e[0],s=e[1],n=s.targetEl.getBoundingClientRect().top+r.instance.scroll.y,o=n+s.targetEl.offsetHeight,l=r.getRelativeOffset(s.offset);r.els[i].top=n+l[0],r.els[i].bottom=o-l[1]}),this.hasScrollTicking=!1}},{key:"getRelativeOffset",value:function(t){var e=[0,0];if(t)for(var i=0;i<t.length;i++)"string"==typeof t[i]?t[i].includes("%")?e[i]=parseInt(t[i].replace("%","")*this.windowHeight/100):e[i]=parseInt(t[i]):e[i]=t[i];return e}},{key:"scrollTo",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=parseInt(e.offset)||0,s=!!e.callback&&e.callback;if("string"==typeof t){if("top"===t)t=this.html;else if("bottom"===t)t=this.html.offsetHeight-window.innerHeight;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");i="number"!=typeof t?t.getBoundingClientRect().top+i+this.instance.scroll.y:t+i;function n(){return parseInt(window.pageYOffset)===parseInt(i)}if(s){if(n())return void s();window.addEventListener("scroll",function t(){n()&&(window.removeEventListener("scroll",t),s())})}window.scrollTo({top:i,behavior:0===e.duration?"auto":"smooth"})}},{key:"update",value:function(){this.addElements(),this.detectElements()}},{key:"destroy",value:function(){d(a(s.prototype),"destroy",this).call(this),window.removeEventListener("scroll",this.checkScroll,!1)}}]),s}()),w=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var k=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(t){s[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,s,n=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),o=1;o<arguments.length;o++){for(var l in i=Object(arguments[o]))x.call(i,l)&&(n[l]=i[l]);if(w){s=w(i);for(var r=0;r<s.length;r++)S.call(i,s[r])&&(n[s[r]]=i[s[r]])}}return n};function T(){}T.prototype={on:function(t,e,i){var s=this.e||(this.e={});return(s[t]||(s[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var s=this;function n(){s.off(t,n),e.apply(i,arguments)}return n._=e,this.on(t,n,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),s=0,n=i.length;s<n;s++)i[s].fn.apply(i[s].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),s=i[t],n=[];if(s&&e)for(var o=0,l=s.length;o<l;o++)s[o].fn!==e&&s[o].fn._!==e&&n.push(s[o]);return n.length?i[t]=n:delete i[t],this}};var E=T,A=t(function(t,e){(function(){function t(t,e,i,s){this.stability=null!=t?Math.abs(t):8,this.sensitivity=null!=e?1+Math.abs(e):100,this.tolerance=null!=i?1+Math.abs(i):1.1,this.delay=null!=s?s:150,this.lastUpDeltas=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:e<=t;1<=e?t++:t--)i.push(null);return i}.call(this),this.lastDownDeltas=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:e<=t;1<=e?t++:t--)i.push(null);return i}.call(this),this.deltasTimestamp=function(){var t,e,i;for(i=[],t=1,e=2*this.stability;1<=e?t<=e:e<=t;1<=e?t++:t--)i.push(null);return i}.call(this)}(null!==e?e:this).Lethargy=(t.prototype.check=function(t){var e;return null!=(t=t.originalEvent||t).wheelDelta?e=t.wheelDelta:null!=t.deltaY?e=-40*t.deltaY:null==t.detail&&0!==t.detail||(e=-40*t.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),0<e?(this.lastUpDeltas.push(e),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(e),this.lastDownDeltas.shift(),this.isInertia(-1))},t.prototype.isInertia=function(t){var e,i,s,n,o,l,r;return null===(e=-1===t?this.lastDownDeltas:this.lastUpDeltas)[0]?t:!(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&e[0]===e[2*this.stability-1])&&(s=e.slice(0,this.stability),i=e.slice(this.stability,2*this.stability),r=s.reduce(function(t,e){return t+e}),o=i.reduce(function(t,e){return t+e}),l=r/s.length,n=o/i.length,Math.abs(l)<Math.abs(n*this.tolerance)&&this.sensitivity<Math.abs(n)&&t)},t.prototype.showLastUpDeltas=function(){return this.lastUpDeltas},t.prototype.showLastDownDeltas=function(){return this.lastDownDeltas},t)}).call(p)}),O="onwheel"in document,C="onmousewheel"in document,D="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,_=navigator.msMaxTouchPoints&&1<navigator.msMaxTouchPoints,M=!!window.navigator.msPointerEnabled,j="onkeydown"in document,B=-1<navigator.userAgent.indexOf("Firefox"),H=Object.prototype.toString,R=Object.prototype.hasOwnProperty;function W(t,e){return function(){return t.apply(e,arguments)}}var Y=A.Lethargy,I="virtualscroll",P=z;function z(t){!function(t){if(!t)return console.warn("bindAll requires at least one argument.");var e=Array.prototype.slice.call(arguments,1);if(0===e.length)for(var i in t)R.call(t,i)&&"function"==typeof t[i]&&"[object Function]"==H.call(t[i])&&e.push(i);for(var s=0;s<e.length;s++){var n=e[s];t[n]=W(t[n],t)}}(this,"_onWheel","_onMouseWheel","_onTouchStart","_onTouchMove","_onKeyDown"),this.el=window,t&&t.el&&(this.el=t.el,delete t.el),this.options=k({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",limitInertia:!1,useKeyboard:!0,useTouch:!0},t),this.options.limitInertia&&(this._lethargy=new Y),this._emitter=new E,this._event={y:0,x:0,deltaX:0,deltaY:0},this.touchStartX=null,this.touchStartY=null,this.bodyTouchAction=null,void 0!==this.options.passive&&(this.listenerOptions={passive:this.options.passive})}function X(t,e,i){return(1-i)*t+i*e}function V(t){var e={};if(window.getComputedStyle){var i=getComputedStyle(t),s=i.transform||i.webkitTransform||i.mozTransform,n=s.match(/^matrix3d\((.+)\)$/);return n?(e.x=n?parseFloat(n[1].split(", ")[12]):0,e.y=n?parseFloat(n[1].split(", ")[13]):0):(n=s.match(/^matrix\((.+)\)$/),e.x=n?parseFloat(n[1].split(", ")[4]):0,e.y=n?parseFloat(n[1].split(", ")[5]):0),e}}function F(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}z.prototype._notify=function(t){var e=this._event;e.x+=e.deltaX,e.y+=e.deltaY,this._emitter.emit(I,{x:e.x,y:e.y,deltaX:e.deltaX,deltaY:e.deltaY,originalEvent:t})},z.prototype._onWheel=function(t){var e=this.options;if(!this._lethargy||!1!==this._lethargy.check(t)){var i=this._event;i.deltaX=t.wheelDeltaX||-1*t.deltaX,i.deltaY=t.wheelDeltaY||-1*t.deltaY,B&&1==t.deltaMode&&(i.deltaX*=e.firefoxMultiplier,i.deltaY*=e.firefoxMultiplier),i.deltaX*=e.mouseMultiplier,i.deltaY*=e.mouseMultiplier,this._notify(t)}},z.prototype._onMouseWheel=function(t){if(!this.options.limitInertia||!1!==this._lethargy.check(t)){var e=this._event;e.deltaX=t.wheelDeltaX?t.wheelDeltaX:0,e.deltaY=t.wheelDeltaY?t.wheelDeltaY:t.wheelDelta,this._notify(t)}},z.prototype._onTouchStart=function(t){var e=t.targetTouches?t.targetTouches[0]:t;this.touchStartX=e.pageX,this.touchStartY=e.pageY},z.prototype._onTouchMove=function(t){var e=this.options;e.preventTouch&&!t.target.classList.contains(e.unpreventTouchClass)&&t.preventDefault();var i=this._event,s=t.targetTouches?t.targetTouches[0]:t;i.deltaX=(s.pageX-this.touchStartX)*e.touchMultiplier,i.deltaY=(s.pageY-this.touchStartY)*e.touchMultiplier,this.touchStartX=s.pageX,this.touchStartY=s.pageY,this._notify(t)},z.prototype._onKeyDown=function(t){var e=this._event;e.deltaX=e.deltaY=0;var i=window.innerHeight-40;switch(t.keyCode){case 37:case 38:e.deltaY=this.options.keyStep;break;case 39:case 40:e.deltaY=-this.options.keyStep;break;case t.shiftKey:e.deltaY=i;break;case 32:e.deltaY=-i;break;default:return}this._notify(t)},z.prototype._bind=function(){O&&this.el.addEventListener("wheel",this._onWheel,this.listenerOptions),C&&this.el.addEventListener("mousewheel",this._onMouseWheel,this.listenerOptions),D&&this.options.useTouch&&(this.el.addEventListener("touchstart",this._onTouchStart,this.listenerOptions),this.el.addEventListener("touchmove",this._onTouchMove,this.listenerOptions)),M&&_&&(this.bodyTouchAction=document.body.style.msTouchAction,document.body.style.msTouchAction="none",this.el.addEventListener("MSPointerDown",this._onTouchStart,!0),this.el.addEventListener("MSPointerMove",this._onTouchMove,!0)),j&&this.options.useKeyboard&&document.addEventListener("keydown",this._onKeyDown)},z.prototype._unbind=function(){O&&this.el.removeEventListener("wheel",this._onWheel),C&&this.el.removeEventListener("mousewheel",this._onMouseWheel),D&&(this.el.removeEventListener("touchstart",this._onTouchStart),this.el.removeEventListener("touchmove",this._onTouchMove)),M&&_&&(document.body.style.msTouchAction=this.bodyTouchAction,this.el.removeEventListener("MSPointerDown",this._onTouchStart,!0),this.el.removeEventListener("MSPointerMove",this._onTouchMove,!0)),j&&this.options.useKeyboard&&document.removeEventListener("keydown",this._onKeyDown)},z.prototype.on=function(t,e){this._emitter.on(I,t,e);var i=this._emitter.e;i&&i[I]&&1===i[I].length&&this._bind()},z.prototype.off=function(t,e){this._emitter.off(I,t,e);var i=this._emitter.e;(!i[I]||i[I].length<=0)&&this._unbind()},z.prototype.reset=function(){var t=this._event;t.x=0,t.y=0},z.prototype.destroy=function(){this._emitter.off(),this._unbind()};var q="function"==typeof Float32Array;function K(t,e){return 1-3*e+3*t}function N(t,e){return 3*e-6*t}function U(t){return 3*t}function $(t,e,i){return((K(e,i)*t+N(e,i))*t+U(e))*t}function G(t,e,i){return 3*K(e,i)*t*t+2*N(e,i)*t+U(e)}function J(t){return t}function Q(o,e,l,i){if(!(0<=o&&o<=1&&0<=l&&l<=1))throw new Error("bezier x values must be in [0, 1] range");if(o===e&&l===i)return J;for(var r=q?new Float32Array(11):new Array(11),t=0;t<11;++t)r[t]=$(.1*t,o,l);return function(t){return 0===t?0:1===t?1:$(function(t){for(var e=0,i=1;10!==i&&r[i]<=t;++i)e+=.1;var s=e+(t-r[--i])/(r[i+1]-r[i])*.1,n=G(s,o,l);return.001<=n?function(t,e,i,s){for(var n=0;n<4;++n){var o=G(e,i,s);if(0===o)return e;e-=($(e,i,s)-t)/o}return e}(t,s,o,l):0===n?s:function(t,e,i,s,n){for(var o,l,r=0;0<(o=$(l=e+(i-e)/2,s,n)-t)?i=l:e=l,1e-7<Math.abs(o)&&++r<10;);return l}(t,e,e+.1,o,l)}(t),e,i)}}var Z=function(t){r(o,f);var i=h(o);function o(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return n(this,o),history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0),(t=i.call(this,e)).inertia&&(t.lerp=.1*t.inertia),t.isScrolling=!1,t.isDraggingScrollbar=!1,t.isTicking=!1,t.hasScrollTicking=!1,t.parallaxElements={},t.stop=!1,t.scrollbarContainer=e.scrollbarContainer,t.checkKey=t.checkKey.bind(c(t)),window.addEventListener("keydown",t.checkKey,!1),t}return e(o,[{key:"init",value:function(){var e=this;this.html.classList.add(this.smoothClass),this.html.setAttribute("data-".concat(this.name,"-direction"),this.direction),this.instance=l({delta:{x:this.initPosition.x,y:this.initPosition.y},scroll:{x:this.initPosition.x,y:this.initPosition.y}},this.instance),this.vs=new P({el:this.scrollFromAnywhere?document:this.el,mouseMultiplier:-1<navigator.platform.indexOf("Win")?1:.4,firefoxMultiplier:this.firefoxMultiplier,touchMultiplier:this.touchMultiplier,useKeyboard:!1,passive:!0}),this.vs.on(function(t){e.stop||e.isDraggingScrollbar||requestAnimationFrame(function(){e.updateDelta(t),e.isScrolling||e.startScrolling()})}),this.setScrollLimit(),this.initScrollBar(),this.addSections(),this.addElements(),this.checkScroll(!0),this.transformElements(!0,!0),d(a(o.prototype),"init",this).call(this)}},{key:"setScrollLimit",value:function(){if(this.instance.limit.y=this.el.offsetHeight-this.windowHeight,"horizontal"===this.direction){for(var t=0,e=this.el.children,i=0;i<e.length;i++)t+=e[i].offsetWidth;this.instance.limit.x=t-this.windowWidth}}},{key:"startScrolling",value:function(){this.startScrollTs=Date.now(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}},{key:"stopScrolling",value:function(){cancelAnimationFrame(this.checkScrollRaf),this.startScrollTs=void 0,this.scrollToRaf&&(cancelAnimationFrame(this.scrollToRaf),this.scrollToRaf=null),this.isScrolling=!1,this.instance.scroll.y=Math.round(this.instance.scroll.y),this.html.classList.remove(this.scrollingClass)}},{key:"checkKey",value:function(t){var e=this;if(this.stop)9==t.keyCode&&requestAnimationFrame(function(){e.html.scrollTop=0,document.body.scrollTop=0,e.html.scrollLeft=0,document.body.scrollLeft=0});else{switch(t.keyCode){case 9:requestAnimationFrame(function(){e.html.scrollTop=0,document.body.scrollTop=0,e.html.scrollLeft=0,document.body.scrollLeft=0,e.scrollTo(document.activeElement,{offset:-window.innerHeight/2})});break;case 38:this.instance.delta[this.directionAxis]-=240;break;case 40:this.instance.delta[this.directionAxis]+=240;break;case 33:this.instance.delta[this.directionAxis]-=window.innerHeight;break;case 34:this.instance.delta[this.directionAxis]+=window.innerHeight;break;case 36:this.instance.delta[this.directionAxis]-=this.instance.limit[this.directionAxis];break;case 35:this.instance.delta[this.directionAxis]+=this.instance.limit[this.directionAxis];break;case 32:document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||(t.shiftKey?this.instance.delta[this.directionAxis]-=window.innerHeight:this.instance.delta[this.directionAxis]+=window.innerHeight);break;default:return}this.instance.delta[this.directionAxis]<0&&(this.instance.delta[this.directionAxis]=0),this.instance.delta[this.directionAxis]>this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis]),this.stopScrolling(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}}},{key:"checkScroll",value:function(){var s=this,n=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(n||this.isScrolling||this.isDraggingScrollbar){this.hasScrollTicking||(this.checkScrollRaf=requestAnimationFrame(function(){return s.checkScroll()}),this.hasScrollTicking=!0),this.updateScroll();var t=Math.abs(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis]),e=Date.now()-this.startScrollTs;if(!this.animatingScroll&&100<e&&(t<.5&&0!=this.instance.delta[this.directionAxis]||t<.5&&0==this.instance.delta[this.directionAxis])&&this.stopScrolling(),Object.entries(this.sections).forEach(function(t){var e=L(t,2),i=(e[0],e[1]);i.persistent||s.instance.scroll[s.directionAxis]>i.offset[s.directionAxis]&&s.instance.scroll[s.directionAxis]<i.limit[s.directionAxis]?("horizontal"===s.direction?s.transform(i.el,-s.instance.scroll[s.directionAxis],0):s.transform(i.el,0,-s.instance.scroll[s.directionAxis]),i.inView||(i.inView=!0,i.el.style.opacity=1,i.el.style.pointerEvents="all",i.el.setAttribute("data-".concat(s.name,"-section-inview"),""))):((i.inView||n)&&(i.inView=!1,i.el.style.opacity=0,i.el.style.pointerEvents="none",i.el.removeAttribute("data-".concat(s.name,"-section-inview"))),s.transform(i.el,0,0))}),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.detectElements(),this.transformElements(),this.hasScrollbar){var i=this.instance.scroll[this.directionAxis]/this.instance.limit[this.directionAxis]*this.scrollBarLimit[this.directionAxis];"horizontal"===this.direction?this.transform(this.scrollbarThumb,i,0):this.transform(this.scrollbarThumb,0,i)}d(a(o.prototype),"checkScroll",this).call(this),this.hasScrollTicking=!1}}},{key:"resize",value:function(){this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.checkContext(),this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.update()}},{key:"updateDelta",value:function(t){var e,i=this[this.context]&&this[this.context].gestureDirection?this[this.context].gestureDirection:this.gestureDirection;e="both"===i?t.deltaX+t.deltaY:"vertical"===i?t.deltaY:"horizontal"===i?t.deltaX:t.deltaY,this.instance.delta[this.directionAxis]-=e*this.multiplier,this.instance.delta[this.directionAxis]<0&&(this.instance.delta[this.directionAxis]=0),this.instance.delta[this.directionAxis]>this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis])}},{key:"updateScroll",value:function(t){this.isScrolling||this.isDraggingScrollbar?this.instance.scroll[this.directionAxis]=X(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis],this.lerp):this.instance.scroll[this.directionAxis]>this.instance.limit[this.directionAxis]?this.setScroll(this.instance.scroll[this.directionAxis],this.instance.limit[this.directionAxis]):this.instance.scroll.y<0?this.setScroll(this.instance.scroll[this.directionAxis],0):this.setScroll(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis])}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):this.instance.delta.y<this.instance.scroll.y&&"up"!==this.instance.direction&&(this.instance.direction="up"),this.instance.delta.x>this.instance.scroll.x?"right"!==this.instance.direction&&(this.instance.direction="right"):this.instance.delta.x<this.instance.scroll.x&&"left"!==this.instance.direction&&(this.instance.direction="left")}},{key:"addSpeed",value:function(){this.instance.delta[this.directionAxis]!=this.instance.scroll[this.directionAxis]?this.instance.speed=(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis])/Math.max(1,Date.now()-this.speedTs):this.instance.speed=0}},{key:"initScrollBar",value:function(){if(this.scrollbar=document.createElement("span"),this.scrollbarThumb=document.createElement("span"),this.scrollbar.classList.add("".concat(this.scrollbarClass)),this.scrollbarThumb.classList.add("".concat(this.scrollbarClass,"_thumb")),this.scrollbar.append(this.scrollbarThumb),this.scrollbarContainer?this.scrollbarContainer.append(this.scrollbar):document.body.append(this.scrollbar),this.getScrollBar=this.getScrollBar.bind(this),this.releaseScrollBar=this.releaseScrollBar.bind(this),this.moveScrollBar=this.moveScrollBar.bind(this),this.scrollbarThumb.addEventListener("mousedown",this.getScrollBar),window.addEventListener("mouseup",this.releaseScrollBar),window.addEventListener("mousemove",this.moveScrollBar),this.hasScrollbar=!1,"horizontal"==this.direction){if(this.instance.limit.x+this.windowWidth<=this.windowWidth)return}else if(this.instance.limit.y+this.windowHeight<=this.windowHeight)return;this.hasScrollbar=!0,this.scrollbarBCR=this.scrollbar.getBoundingClientRect(),this.scrollbarHeight=this.scrollbarBCR.height,this.scrollbarWidth=this.scrollbarBCR.width,"horizontal"===this.direction?this.scrollbarThumb.style.width="".concat(this.scrollbarWidth*this.scrollbarWidth/(this.instance.limit.x+this.scrollbarWidth),"px"):this.scrollbarThumb.style.height="".concat(this.scrollbarHeight*this.scrollbarHeight/(this.instance.limit.y+this.scrollbarHeight),"px"),this.scrollbarThumbBCR=this.scrollbarThumb.getBoundingClientRect(),this.scrollBarLimit={x:this.scrollbarWidth-this.scrollbarThumbBCR.width,y:this.scrollbarHeight-this.scrollbarThumbBCR.height}}},{key:"reinitScrollBar",value:function(){if(this.hasScrollbar=!1,"horizontal"==this.direction){if(this.instance.limit.x+this.windowWidth<=this.windowWidth)return}else if(this.instance.limit.y+this.windowHeight<=this.windowHeight)return;this.hasScrollbar=!0,this.scrollbarBCR=this.scrollbar.getBoundingClientRect(),this.scrollbarHeight=this.scrollbarBCR.height,this.scrollbarWidth=this.scrollbarBCR.width,"horizontal"===this.direction?this.scrollbarThumb.style.width="".concat(this.scrollbarWidth*this.scrollbarWidth/(this.instance.limit.x+this.scrollbarWidth),"px"):this.scrollbarThumb.style.height="".concat(this.scrollbarHeight*this.scrollbarHeight/(this.instance.limit.y+this.scrollbarHeight),"px"),this.scrollbarThumbBCR=this.scrollbarThumb.getBoundingClientRect(),this.scrollBarLimit={x:this.scrollbarWidth-this.scrollbarThumbBCR.width,y:this.scrollbarHeight-this.scrollbarThumbBCR.height}}},{key:"destroyScrollBar",value:function(){this.scrollbarThumb.removeEventListener("mousedown",this.getScrollBar),window.removeEventListener("mouseup",this.releaseScrollBar),window.removeEventListener("mousemove",this.moveScrollBar),this.scrollbar.remove()}},{key:"getScrollBar",value:function(t){this.isDraggingScrollbar=!0,this.checkScroll(),this.html.classList.remove(this.scrollingClass),this.html.classList.add(this.draggingClass)}},{key:"releaseScrollBar",value:function(t){this.isDraggingScrollbar=!1,this.isScrolling&&this.html.classList.add(this.scrollingClass),this.html.classList.remove(this.draggingClass)}},{key:"moveScrollBar",value:function(i){var s=this;this.isDraggingScrollbar&&requestAnimationFrame(function(){var t=100*(i.clientX-s.scrollbarBCR.left)/s.scrollbarWidth*s.instance.limit.x/100,e=100*(i.clientY-s.scrollbarBCR.top)/s.scrollbarHeight*s.instance.limit.y/100;0<e&&e<s.instance.limit.y&&(s.instance.delta.y=e),0<t&&t<s.instance.limit.x&&(s.instance.delta.x=t)})}},{key:"addElements",value:function(){var D=this;this.els={},this.parallaxElements={},this.el.querySelectorAll("[data-".concat(this.name,"]")).forEach(function(t,e){var i,s,n,o=F(t),l=Object.entries(D.sections).map(function(t){var e=L(t,2);return e[0],e[1]}).find(function(t){return o.includes(t.el)}),r=t.dataset[D.name+"Class"]||D.class,a="string"==typeof t.dataset[D.name+"Id"]?t.dataset[D.name+"Id"]:"el"+e,c=t.dataset[D.name+"Repeat"],h=t.dataset[D.name+"Call"],d=t.dataset[D.name+"Position"],u=t.dataset[D.name+"Delay"],f=t.dataset[D.name+"Direction"],p="string"==typeof t.dataset[D.name+"Sticky"],m=!!t.dataset[D.name+"Speed"]&&parseFloat(t.dataset[D.name+"Speed"])/10,y="string"==typeof t.dataset[D.name+"Offset"]?t.dataset[D.name+"Offset"].split(","):D.offset,v=t.dataset[D.name+"Target"],b=(n=void 0!==v?document.querySelector("".concat(v)):t).getBoundingClientRect();s=null===l||l.inView?(i=b.top+D.instance.scroll.y-V(n).y,b.left+D.instance.scroll.x-V(n).x):(i=b.top-V(l.el).y-V(n).y,b.left-V(l.el).x-V(n).x);var g=i+n.offsetHeight,w=s+n.offsetWidth,x={x:(w-s)/2+s,y:(g-i)/2+i};if(p){var S=t.getBoundingClientRect(),k=S.top,T=S.left,E={x:T-s,y:k-i};i+=window.innerHeight,s+=window.innerWidth,g=k+n.offsetHeight-t.offsetHeight-E[D.directionAxis],x={x:((w=T+n.offsetWidth-t.offsetWidth-E[D.directionAxis])-s)/2+s,y:(g-i)/2+i}}c="false"!=c&&(null!=c||D.repeat);var A=[0,0];if(y)if("horizontal"===D.direction){for(var O=0;O<y.length;O++)"string"==typeof y[O]?y[O].includes("%")?A[O]=parseInt(y[O].replace("%","")*D.windowWidth/100):A[O]=parseInt(y[O]):A[O]=y[O];s+=A[0],w-=A[1]}else{for(O=0;O<y.length;O++)"string"==typeof y[O]?y[O].includes("%")?A[O]=parseInt(y[O].replace("%","")*D.windowHeight/100):A[O]=parseInt(y[O]):A[O]=y[O];i+=A[0],g-=A[1]}var C={el:t,id:a,class:r,section:l,top:i,middle:x,bottom:g,left:s,right:w,offset:y,progress:0,repeat:c,inView:!1,call:h,speed:m,delay:u,position:d,target:n,direction:f,sticky:p};D.els[a]=C,t.classList.contains(r)&&D.setInView(D.els[a],a),!1===m&&!p||(D.parallaxElements[a]=C)})}},{key:"addSections",value:function(){var a=this;this.sections={};var t=this.el.querySelectorAll("[data-".concat(this.name,"-section]"));0===t.length&&(t=[this.el]),t.forEach(function(t,e){var i="string"==typeof t.dataset[a.name+"Id"]?t.dataset[a.name+"Id"]:"section"+e,s=t.getBoundingClientRect(),n={x:s.left-1.5*window.innerWidth-V(t).x,y:s.top-1.5*window.innerHeight-V(t).y},o={x:n.x+s.width+2*window.innerWidth,y:n.y+s.height+2*window.innerHeight},l="string"==typeof t.dataset[a.name+"Persistent"];t.setAttribute("data-scroll-section-id",i);var r={el:t,offset:n,limit:o,inView:!1,persistent:l,id:i};a.sections[i]=r})}},{key:"transform",value:function(t,e,i,s){var n;if(s){var o=V(t),l=X(o.x,e,s),r=X(o.y,i,s);n="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0,".concat(l,",").concat(r,",0,1)")}else n="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0,".concat(e,",").concat(i,",0,1)");t.style.webkitTransform=n,t.style.msTransform=n,t.style.transform=n}},{key:"transformElements",value:function(n){var o=this,l=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=this.instance.scroll.x+this.windowWidth,a=this.instance.scroll.y+this.windowHeight,c={x:this.instance.scroll.x+this.windowMiddle.x,y:this.instance.scroll.y+this.windowMiddle.y};Object.entries(this.parallaxElements).forEach(function(t){var e=L(t,2),i=(e[0],e[1]),s=!1;if(n&&(s=0),i.inView||l)switch(i.position){case"top":s=o.instance.scroll[o.directionAxis]*-i.speed;break;case"elementTop":s=(a-i.top)*-i.speed;break;case"bottom":s=(o.instance.limit[o.directionAxis]-a+o.windowHeight)*i.speed;break;case"left":s=o.instance.scroll[o.directionAxis]*-i.speed;break;case"elementLeft":s=(r-i.left)*-i.speed;break;case"right":s=(o.instance.limit[o.directionAxis]-r+o.windowHeight)*i.speed;break;default:s=(c[o.directionAxis]-i.middle[o.directionAxis])*-i.speed}i.sticky&&(s=i.inView?"horizontal"===o.direction?o.instance.scroll.x-i.left+window.innerWidth:o.instance.scroll.y-i.top+window.innerHeight:"horizontal"===o.direction?o.instance.scroll.x<i.left-window.innerWidth&&o.instance.scroll.x<i.left-window.innerWidth/2?0:o.instance.scroll.x>i.right&&o.instance.scroll.x>i.right+100&&i.right-i.left+window.innerWidth:o.instance.scroll.y<i.top-window.innerHeight&&o.instance.scroll.y<i.top-window.innerHeight/2?0:o.instance.scroll.y>i.bottom&&o.instance.scroll.y>i.bottom+100&&i.bottom-i.top+window.innerHeight),!1!==s&&("horizontal"===i.direction||"horizontal"===o.direction&&"vertical"!==i.direction?o.transform(i.el,s,0,!n&&i.delay):o.transform(i.el,0,s,!n&&i.delay))})}},{key:"scrollTo",value:function(t){var i=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},s=parseInt(e.offset)||0,n=isNaN(parseInt(e.duration))?1e3:parseInt(e.duration),o=e.easing||[.25,0,.35,1],l=!!e.disableLerp,r=!!e.callback&&e.callback;if(o=Q.apply(void 0,function(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||v(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o)),"string"==typeof t){if("top"===t)t=0;else if("bottom"===t)t=this.instance.limit.y;else if("left"===t)t=0;else if("right"===t)t=this.instance.limit.x;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");if("number"!=typeof t){if(!F(t).includes(this.el))return;var a,c=t.getBoundingClientRect(),h=c.top,d=c.left,u=F(t).find(function(e){return Object.entries(i.sections).map(function(t){var e=L(t,2);return e[0],e[1]}).find(function(t){return t.el==e})});a=u?V(u)[this.directionAxis]:-this.instance.scroll[this.directionAxis],s="horizontal"===this.direction?d+s-a:h+s-a}else s=t+s;function f(t){l?"horizontal"===i.direction?i.setScroll(p+m*t,i.instance.delta.y):i.setScroll(i.instance.delta.x,p+m*t):i.instance.delta[i.directionAxis]=p+m*t}var p=parseFloat(this.instance.delta[this.directionAxis]),m=Math.max(0,Math.min(s,this.instance.limit[this.directionAxis]))-p;this.animatingScroll=!0,this.stopScrolling(),this.startScrolling();var y=Date.now();!function t(){var e=(Date.now()-y)/n;1<e?(f(1),i.animatingScroll=!1,0==n&&i.update(),r&&r()):(i.scrollToRaf=requestAnimationFrame(t),f(o(e)))}()}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0),this.reinitScrollBar(),this.checkScroll(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(t,e){this.instance=l(l({},this.instance),{},{scroll:{x:t,y:e},delta:{x:t,y:e},speed:0})}},{key:"destroy",value:function(){d(a(o.prototype),"destroy",this).call(this),this.stopScrolling(),this.html.classList.remove(this.smoothClass),this.vs.destroy(),this.destroyScrollBar(),window.removeEventListener("keydown",this.checkKey,!1)}}]),o}();return e(tt,[{key:"init",value:function(){if(this.options.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints||window.innerWidth<this.tablet.breakpoint,this.options.isTablet=this.options.isMobile&&window.innerWidth>=this.tablet.breakpoint,this.smooth&&!this.options.isMobile||this.tablet.smooth&&this.options.isTablet||this.smartphone.smooth&&this.options.isMobile&&!this.options.isTablet?this.scroll=new Z(this.options):this.scroll=new g(this.options),this.scroll.init(),window.location.hash){var t=window.location.hash.slice(1,window.location.hash.length),e=document.getElementById(t);e&&this.scroll.scrollTo(e)}}},{key:"update",value:function(){this.scroll.update()}},{key:"start",value:function(){this.scroll.startScroll()}},{key:"stop",value:function(){this.scroll.stopScroll()}},{key:"scrollTo",value:function(t,e){this.scroll.scrollTo(t,e)}},{key:"setScroll",value:function(t,e){this.scroll.setScroll(t,e)}},{key:"on",value:function(t,e){this.scroll.setEvents(t,e)}},{key:"off",value:function(t,e){this.scroll.unsetEvents(t,e)}},{key:"destroy",value:function(){this.scroll.destroy()}}]),tt;function tt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};n(this,tt),this.options=t,Object.assign(this,u,t),this.smartphone=u.smartphone,t.smartphone&&Object.assign(this.smartphone,t.smartphone),this.tablet=u.tablet,t.tablet&&Object.assign(this.tablet,t.tablet),this.smooth||"horizontal"!=this.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible"),this.tablet.smooth||"horizontal"!=this.tablet.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (tablet)"),this.smartphone.smooth||"horizontal"!=this.smartphone.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (smartphone)"),this.init()}});