Files
OfficialSite/www/assets/scripts/app.js
Chauncey McAskill 9d18205b0f Update NPM dependencies
Updated:
- autoprefixer v10.4.0 → v10.4.2
- esbuild v0.13.12 → v0.14.14
- node-sass v6.0.1 → v7.0.1
- postcss v8.3.11 → v8.4.5
2022-01-28 16:00:57 -05:00

14 lines
67 KiB
JavaScript

(()=>{var Jt=Object.create;var H=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames,dt=Object.getOwnPropertySymbols,ee=Object.getPrototypeOf,vt=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable;var pt=(s,n,t)=>n in s?H(s,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[n]=t,mt=(s,n)=>{for(var t in n||(n={}))vt.call(n,t)&&pt(s,t,n[t]);if(dt)for(var t of dt(n))ie.call(n,t)&&pt(s,t,n[t]);return s};var ne=s=>H(s,"__esModule",{value:!0});var se=(s,n)=>()=>(n||s((n={exports:{}}).exports,n),n.exports),re=(s,n)=>{for(var t in n)H(s,t,{get:n[t],enumerable:!0})},oe=(s,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of te(n))!vt.call(s,e)&&(t||e!=="default")&&H(s,e,{get:()=>n[e],enumerable:!(i=Qt(n,e))||i.enumerable});return s},ae=(s,n)=>oe(ne(H(s!=null?Jt(ee(s)):{},"default",!n&&s&&s.__esModule?{get:()=>s.default,enumerable:!0}:{value:s,enumerable:!0})),s);var yt=(s,n,t)=>new Promise((i,e)=>{var r=l=>{try{a(t.next(l))}catch(c){e(c)}},o=l=>{try{a(t.throw(l))}catch(c){e(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,n)).next())});var Ft=se((qt,Z)=>{(function(s,n){typeof define=="function"&&define.amd?define([],function(){return s.svg4everybody=n()}):typeof Z=="object"&&Z.exports?Z.exports=n():s.svg4everybody=n()})(qt,function(){function s(e,r,o){if(o){var a=document.createDocumentFragment(),l=!r.hasAttribute("viewBox")&&o.getAttribute("viewBox");l&&r.setAttribute("viewBox",l);for(var c=o.cloneNode(!0);c.childNodes.length;)a.appendChild(c.firstChild);e.appendChild(a)}}function n(e){e.onreadystatechange=function(){if(e.readyState===4){var r=e._cachedDocument;r||(r=e._cachedDocument=document.implementation.createHTMLDocument(""),r.body.innerHTML=e.responseText,e._cachedTarget={}),e._embeds.splice(0).map(function(o){var a=e._cachedTarget[o.id];a||(a=e._cachedTarget[o.id]=r.getElementById(o.id)),s(o.parent,o.svg,a)})}},e.onreadystatechange()}function t(e){function r(){for(var A=0;A<C.length;){var k=C[A],w=k.parentNode,d=i(w),p=k.getAttribute("xlink:href")||k.getAttribute("href");if(!p&&a.attributeName&&(p=k.getAttribute(a.attributeName)),d&&p){if(o)if(!a.validate||a.validate(p,d,k)){w.removeChild(k);var b=p.split("#"),y=b.shift(),T=b.join("#");if(y.length){var g=h[y];g||(g=h[y]=new XMLHttpRequest,g.open("GET",y),g.send(),g._embeds=[]),g._embeds.push({parent:w,svg:d,id:T}),n(g)}else s(w,d,document.getElementById(T))}else++A,++L}else++A}(!C.length||C.length-L>0)&&m(r,67)}var o,a=Object(e),l=/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/,c=/\bAppleWebKit\/(\d+)\b/,f=/\bEdge\/12\.(\d+)\b/,u=/\bEdge\/.(\d+)\b/,v=window.top!==window.self;o="polyfill"in a?a.polyfill:l.test(navigator.userAgent)||(navigator.userAgent.match(f)||[])[1]<10547||(navigator.userAgent.match(c)||[])[1]<537||u.test(navigator.userAgent)&&v;var h={},m=window.requestAnimationFrame||setTimeout,C=document.getElementsByTagName("use"),L=0;o&&r()}function i(e){for(var r=e;r.nodeName.toLowerCase()!=="svg"&&(r=r.parentNode););return r}return t})});function V(s){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(n){return typeof n}:V=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},V(s)}function gt(s,n){if(!(s instanceof n))throw new TypeError("Cannot call a class as a function")}function bt(s,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}function wt(s,n,t){return n&&bt(s.prototype,n),t&&bt(s,t),s}function St(s,n,t){return n in s?Object.defineProperty(s,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[n]=t,s}function q(s,n){return he(s)||fe(s,n)||Et(s,n)||ve()}function le(s){return ce(s)||ue(s)||Et(s)||de()}function ce(s){if(Array.isArray(s))return tt(s)}function he(s){if(Array.isArray(s))return s}function ue(s){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(s))return Array.from(s)}function fe(s,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(s)))){var t=[],i=!0,e=!1,r=void 0;try{for(var o=s[Symbol.iterator](),a;!(i=(a=o.next()).done)&&(t.push(a.value),!(n&&t.length===n));i=!0);}catch(l){e=!0,r=l}finally{try{!i&&o.return!=null&&o.return()}finally{if(e)throw r}}return t}}function Et(s,n){if(!!s){if(typeof s=="string")return tt(s,n);var t=Object.prototype.toString.call(s).slice(8,-1);if(t==="Object"&&s.constructor&&(t=s.constructor.name),t==="Map"||t==="Set")return Array.from(s);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tt(s,n)}}function tt(s,n){(n==null||n>s.length)&&(n=s.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=s[t];return i}function de(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F=function(){function s(n){gt(this,s),this.mAttr="data-"+n.dataName,this.mCaptureEvents=["mouseenter","mouseleave"],this.el=n.el}return wt(s,[{key:"mInit",value:function(t){var i=this;this.modules=t,this.mCheckEventTarget=this.mCheckEventTarget.bind(this),this.events&&Object.keys(this.events).forEach(function(e){return i.mAddEvent(e)})}},{key:"mUpdate",value:function(t){this.modules=t}},{key:"mDestroy",value:function(){var t=this;this.events&&Object.keys(this.events).forEach(function(i){return t.mRemoveEvent(i)})}},{key:"mAddEvent",value:function(t){var i=!!this.mCaptureEvents.includes(t);this.el.addEventListener(t,this.mCheckEventTarget,i)}},{key:"mRemoveEvent",value:function(t){var i=!!this.mCaptureEvents.includes(t);this.el.removeEventListener(t,this.mCheckEventTarget,i)}},{key:"mCheckEventTarget",value:function(t){var i=this.events[t.type];if(typeof i=="string")this[i](t);else{var e="["+this.mAttr+"]",r=t.target;if(this.mCaptureEvents.includes(t.type))r.matches(e)&&this.mCallEventMethod(t,i,r);else for(;r&&r!==document&&!(r.matches(e)&&this.mCallEventMethod(t,i,r)!="undefined");)r=r.parentNode}}},{key:"mCallEventMethod",value:function(t,i,e){var r=e.getAttribute(this.mAttr);if(i.hasOwnProperty(r)){var o=i[r];t.hasOwnProperty("currentTarget")||Object.defineProperty(t,"currentTarget",{value:e}),t.hasOwnProperty("curTarget")||Object.defineProperty(t,"curTarget",{value:e}),this[o](t)}}},{key:"$",value:function(t,i){var e=t.indexOf("."),r=t.indexOf("#"),o=t.indexOf("["),a=[e,r,o].filter(function(v){return v!=-1}),l=!1,c=t,f="",u=this.el;return a.length&&(l=Math.min.apply(Math,le(a)),c=t.slice(0,l),f=t.slice(l)),V(i)=="object"&&(u=i),u.querySelectorAll("["+this.mAttr+"="+c+"]"+f)}},{key:"parent",value:function(t,i){for(var e="["+this.mAttr+"="+t+"]",r=i.parentNode;r&&r!==document;){if(r.matches(e))return r;r=r.parentNode}}},{key:"getData",value:function(t,i){var e=i||this.el;return e.getAttribute(this.mAttr+"-"+t)}},{key:"setData",value:function(t,i,e){var r=e||this.el;return r.setAttribute(this.mAttr+"-"+t,i)}},{key:"call",value:function(t,i,e,r){var o=this;i&&!e&&(e=i,i=!1),this.modules[e]&&(r?this.modules[e][r]&&this.modules[e][r][t](i):Object.keys(this.modules[e]).forEach(function(a){o.modules[e][a][t](i)}))}},{key:"on",value:function(t,i,e,r){var o=this;this.modules[i]&&(r?this.modules[i][r].el.addEventListener(t,function(a){return e(a)}):Object.keys(this.modules[i]).forEach(function(a){o.modules[i][a].el.addEventListener(t,function(l){return e(l)})}))}},{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),s}(),pe=function(){function s(n){gt(this,s),this.app,this.modules=n.modules,this.currentModules={},this.activeModules={},this.newModules={},this.moduleId=0}return wt(s,[{key:"init",value:function(t,i){var e=this,r=i||document,o=r.querySelectorAll("*");t&&!this.app&&(this.app=t),this.activeModules.app={app:this.app},o.forEach(function(a){Array.from(a.attributes).forEach(function(l){if(l.name.startsWith("data-module")){var c=!1,f=l.name.split("-").splice(2),u=e.toCamel(f);if(e.modules[u]?c=!0:e.modules[e.toUpper(u)]&&(u=e.toUpper(u),c=!0),c){var v={el:a,name:u,dataName:f.join("-")},h=new e.modules[u](v),m=l.value;m||(e.moduleId++,m="m"+e.moduleId,a.setAttribute(l.name,m)),e.addActiveModule(u,m,h);var C=u+"-"+m;i?e.newModules[C]=h:e.currentModules[C]=h}}})}),Object.entries(this.currentModules).forEach(function(a){var l=q(a,2),c=l[0],f=l[1];if(i){var u=c.split("-"),v=u.shift(),h=u.pop();e.addActiveModule(v,h,f)}else e.initModule(f)})}},{key:"initModule",value:function(t){t.mInit(this.activeModules),t.init()}},{key:"addActiveModule",value:function(t,i,e){this.activeModules[t]?Object.assign(this.activeModules[t],St({},i,e)):this.activeModules[t]=St({},i,e)}},{key:"update",value:function(t){var i=this;this.init(this.app,t),Object.entries(this.currentModules).forEach(function(e){var r=q(e,2),o=r[0],a=r[1];a.mUpdate(i.activeModules)}),Object.entries(this.newModules).forEach(function(e){var r=q(e,2),o=r[0],a=r[1];i.initModule(a)}),Object.assign(this.currentModules,this.newModules)}},{key:"destroy",value:function(t){t?this.destroyScope(t):this.destroyModules()}},{key:"destroyScope",value:function(t){var i=this,e=t.querySelectorAll("*");e.forEach(function(r){Array.from(r.attributes).forEach(function(o){if(o.name.startsWith("data-module")){var a=o.value,l=o.name.split("-").splice(2),c=i.toCamel(l)+"-"+a,f=!1;i.currentModules[c]?f=!0:i.currentModules[i.toUpper(c)]&&(c=i.toUpper(c),f=!0),f&&(i.destroyModule(i.currentModules[c]),delete i.currentModules[c])}})}),this.activeModules={},this.newModules={}}},{key:"destroyModules",value:function(){var t=this;Object.entries(this.currentModules).forEach(function(i){var e=q(i,2),r=e[0],o=e[1];t.destroyModule(o)}),this.currentModules=[]}},{key:"destroyModule",value:function(t){t.mDestroy(),t.destroy()}},{key:"toCamel",value:function(t){var i=this;return t.reduce(function(e,r){return e+i.toUpper(r)})}},{key:"toUpper",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}]),s}(),kt=pe;var lt={};re(lt,{Load:()=>et,Scroll:()=>at});function me(s,n){if(!(s instanceof n))throw new TypeError("Cannot call a class as a function")}function Tt(s,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}function ye(s,n,t){return n&&Tt(s.prototype,n),t&&Tt(s,t),s}function ge(s,n){return be(s)||we(s,n)||Se(s,n)||Ee()}function be(s){if(Array.isArray(s))return s}function we(s,n){var t=s==null?null:typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(t!=null){var i=[],e=!0,r=!1,o,a;try{for(t=t.call(s);!(e=(o=t.next()).done)&&(i.push(o.value),!(n&&i.length===n));e=!0);}catch(l){r=!0,a=l}finally{try{!e&&t.return!=null&&t.return()}finally{if(r)throw a}}return i}}function Se(s,n){if(!!s){if(typeof s=="string")return At(s,n);var t=Object.prototype.toString.call(s).slice(8,-1);if(t==="Object"&&s.constructor&&(t=s.constructor.name),t==="Map"||t==="Set")return Array.from(s);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return At(s,n)}}function At(s,n){(n==null||n>s.length)&&(n=s.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=s[t];return i}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ke=function(){function s(n){me(this,s),this.defaults={name:"load",loadingClass:"is-loading",loadedClass:"is-loaded",readyClass:"is-ready",transitionsPrefix:"is-",transitionsHistory:!0,enterDelay:0,exitDelay:0,loadedDelay:0,isLoaded:!1,isEntered:!1,isUrl:!1,transitionContainer:null,popstateIgnore:!1},Object.assign(this,this.defaults,n),this.options=n,this.namespace="modular",this.html=document.documentElement,this.href=window.location.href,this.container="data-"+this.name+"-container",this.subContainer=!1,this.prevTransition=null,this.loadAttributes=["src","srcset","style","href"],this.isInserted=!1,this.isLoading=!1,this.enterTimeout=!1,this.controller=new AbortController,this.classContainer=this.html,this.isChrome=navigator.userAgent.indexOf("Chrome")!=-1,this.init()}return ye(s,[{key:"init",value:function(){var t=this;window.addEventListener("popstate",function(i){return t.checkState(i)},!1),this.html.addEventListener("click",function(i){return t.checkClick(i)},!1),this.loadEls(document)}},{key:"checkClick",value:function(t){if(!t.ctrlKey&&!t.metaKey)for(var i=t.target;i&&i!==document;){if(i.matches("a")&&i.getAttribute("download")==null){var e=i.getAttribute("href");!e.startsWith("#")&&!e.startsWith("mailto:")&&!e.startsWith("tel:")&&(t.preventDefault(),this.reset(),this.getClickOptions(i));break}i=i.parentNode}}},{key:"checkState",value:function(){typeof this.popstateIgnore=="string"&&window.location.href.indexOf(this.popstateIgnore)>-1||(this.reset(),this.getStateOptions())}},{key:"reset",value:function(){this.isLoading&&(this.controller.abort(),this.isLoading=!1,this.controller=new AbortController),window.clearTimeout(this.enterTimeout),this.isInserted&&this.removeContainer(),this.classContainer=this.html,Object.assign(this,this.defaults,this.options)}},{key:"getClickOptions",value:function(t){this.transition=t.getAttribute("data-"+this.name),this.isUrl=t.getAttribute("data-"+this.name+"-url");var i=t.getAttribute("href"),e=t.getAttribute("target");if(e=="_blank"){window.open(i,"_blank");return}if(this.transition=="false"){window.location=i;return}this.setOptions(i,!0)}},{key:"getStateOptions",value:function(){this.transitionsHistory?this.transition=history.state:this.transition=!1;var t=window.location.href;this.setOptions(t)}},{key:"goTo",value:function(t,i,e){this.reset(),this.transition=i,this.isUrl=e,this.setOptions(t,!0)}},{key:"setOptions",value:function(t,i){var e="["+this.container+"]",r;this.transition&&this.transition!="true"&&(this.transitionContainer="["+this.container+'="'+this.transition+'"]',this.loadingClass=this.transitions[this.transition].loadingClass||this.loadingClass,this.loadedClass=this.transitions[this.transition].loadedClass||this.loadedClass,this.readyClass=this.transitions[this.transition].readyClass||this.readyClass,this.transitionsPrefix=this.transitions[this.transition].transitionsPrefix||this.transitionsPrefix,this.enterDelay=this.transitions[this.transition].enterDelay||this.enterDelay,this.exitDelay=this.transitions[this.transition].exitDelay||this.exitDelay,this.loadedDelay=this.transitions[this.transition].loadedDelay||this.loadedDelay,r=document.querySelector(this.transitionContainer)),r?(e=this.transitionContainer,this.oldContainer=r,this.classContainer=this.oldContainer.parentNode,this.subContainer||history.replaceState(this.transition,null,this.href),this.subContainer=!0):(this.oldContainer=document.querySelector(e),this.subContainer&&history.replaceState(this.prevTransition,null,this.href),this.subContainer=!1),this.href=t,this.parentContainer=this.oldContainer.parentNode,this.isUrl===""||this.isUrl!=null&&this.isUrl!="false"&&this.isUrl!=!1?history.pushState(this.transition,null,t):(this.oldContainer.classList.add("is-old"),this.setLoading(),this.startEnterDelay(),this.loadHref(t,e,i))}},{key:"setLoading",value:function(){this.classContainer.classList.remove(this.loadedClass,this.readyClass),this.classContainer.classList.add(this.loadingClass),this.classContainer.classList.remove(this.transitionsPrefix+this.prevTransition),this.transition&&this.classContainer.classList.add(this.transitionsPrefix+this.transition),this.subContainer||(this.prevTransition=this.transition);var t=new Event(this.namespace+"loading");window.dispatchEvent(t)}},{key:"startEnterDelay",value:function(){var t=this;this.enterTimeout=window.setTimeout(function(){t.isEntered=!0,t.isLoaded&&t.transitionContainers()},this.enterDelay)}},{key:"loadHref",value:function(t,i,e){var r=this;this.isLoading=!0;var o=this.controller.signal;fetch(t,{signal:o}).then(function(a){return a.text()}).then(function(a){e&&history.pushState(r.transition,null,t);var l=new DOMParser;r.data=l.parseFromString(a,"text/html"),r.newContainer=r.data.querySelector(i),r.newContainer.classList.add("is-new"),r.parentNewContainer=r.newContainer.parentNode,r.hideContainer(),r.parentContainer.insertBefore(r.newContainer,r.oldContainer),r.isInserted=!0,r.setSvgs(),r.isLoaded=!0,r.isEntered&&r.transitionContainers(),r.loadEls(r.newContainer),r.isLoading=!1}).catch(function(a){window.location=t})}},{key:"transitionContainers",value:function(){var t=this;this.setAttributes(),this.showContainer(),this.setLoaded(),setTimeout(function(){t.removeContainer(),t.setReady()},this.exitDelay)}},{key:"setSvgs",value:function(){if(this.isChrome){var t=this.newContainer.querySelectorAll("use");t.length&&t.forEach(function(i){var e=i.getAttribute("xlink:href");if(e)i.parentNode.innerHTML='<use xlink:href="'+e+'"></use>';else{var r=i.getAttribute("href");r&&(i.parentNode.innerHTML='<use href="'+r+'"></use>')}})}}},{key:"setAttributes",value:function(){var t=this,i=this.data.getElementsByTagName("title")[0],e=this.data.head.querySelector('meta[name="description"]'),r=document.head.querySelector('meta[name="description"]'),o,a;this.subContainer?(a=this.parentNewContainer,o=document.querySelector(this.transitionContainer).parentNode):(a=this.data.querySelector("html"),o=document.querySelector("html"));var l=Object.assign({},a.dataset);i&&(document.title=i.innerText),r&&e&&r.setAttribute("content",e.getAttribute("content")),l&&Object.entries(l).forEach(function(c){var f=ge(c,2),u=f[0],v=f[1];o.setAttribute("data-"+t.toDash(u),v)})}},{key:"toDash",value:function(t){return t.split(/(?=[A-Z])/).join("-").toLowerCase()}},{key:"hideContainer",value:function(){this.newContainer.style.visibility="hidden",this.newContainer.style.height=0,this.newContainer.style.overflow="hidden"}},{key:"showContainer",value:function(){this.newContainer.style.visibility="",this.newContainer.style.height="",this.newContainer.style.overflow=""}},{key:"loadEls",value:function(t){var i=this,e=[];this.loadAttributes.forEach(function(r){var o="data-"+i.name+"-"+r,a=t.querySelectorAll("["+o+"]");a.length&&a.forEach(function(l){var c=l.getAttribute(o);if(l.setAttribute(r,c),r=="src"||r=="srcset"){var f=new Promise(function(u){l.onload=function(){return u(l)}});e.push(f)}})}),Promise.all(e).then(function(r){var o=new Event(i.namespace+"images");window.dispatchEvent(o)})}},{key:"setLoaded",value:function(){var t=this;this.classContainer.classList.remove(this.loadingClass),setTimeout(function(){t.classContainer.classList.add(t.loadedClass)},this.loadedDelay);var i=new Event(this.namespace+"loaded");window.dispatchEvent(i)}},{key:"removeContainer",value:function(){this.parentContainer.removeChild(this.oldContainer),this.newContainer.classList.remove("is-new"),this.isInserted=!1}},{key:"setReady",value:function(){this.classContainer.classList.add(this.readyClass);var t=new Event(this.namespace+"ready");window.dispatchEvent(t)}},{key:"on",value:function(t,i){var e=this;window.addEventListener(this.namespace+t,function(){switch(t){case"loading":return i(e.transition,e.oldContainer);case"loaded":return i(e.transition,e.oldContainer,e.newContainer);case"ready":return i(e.transition,e.newContainer);default:return i()}},!1)}}]),s}(),Ct=ke;var et=class extends F{constructor(s){super(s)}init(){new Ct({enterDelay:0,transitions:{customTransition:{}}}).on("loaded",(n,t,i)=>{this.call("destroy",t,"app"),this.call("update",i,"app")})}};var _t=[];function Te(s,n={}){return new Promise((t,i)=>{let e=new Image;n.crossOrigin&&(e.crossOrigin=n.crossOrigin);let r=()=>{t(mt({element:e},Ae(e)))};e.decode?(e.src=s,e.decode().then(r).catch(o=>{i(o)})):(e.onload=r,e.onerror=o=>{i(o)},e.src=s)})}function Ae(s){return{url:s.src,width:s.naturalWidth,height:s.naturalHeight,ratio:s.naturalWidth/s.naturalHeight}}function xt(s,n,t){return yt(this,null,function*(){let i=n||s.dataset.src,e=_t.find(r=>r.url===i);if(!e){if(e=yield Te(i),!e.url)return;_t.push(e)}s.src!==i&&(s.tagName==="IMG"?s.src=e.url:s.style.backgroundImage=`url(${e.url})`,requestAnimationFrame(()=>{let r=s.closest(".c-lazy");r&&(r.classList.add("-lazy-loaded"),r.style.backgroundImage=""),s.classList.add("-lazy-loaded"),t==null||t()}))})}function X(s,n){if(!(s instanceof n))throw new TypeError("Cannot call a class as a function")}function Ot(s,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}function K(s,n,t){return n&&Ot(s.prototype,n),t&&Ot(s,t),s}function Ce(s,n,t){return n in s?Object.defineProperty(s,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[n]=t,s}function Lt(s,n){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);n&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable})),t.push.apply(t,i)}return t}function it(s){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Lt(Object(t),!0).forEach(function(i){Ce(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Lt(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function Dt(s,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(n&&n.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),n&&nt(s,n)}function D(s){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},D(s)}function nt(s,n){return nt=Object.setPrototypeOf||function(i,e){return i.__proto__=e,i},nt(s,n)}function _e(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(s){return!1}}function Mt(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function xe(s,n){return n&&(typeof n=="object"||typeof n=="function")?n:Mt(s)}function It(s){var n=_e();return function(){var i=D(s),e;if(n){var r=D(this).constructor;e=Reflect.construct(i,arguments,r)}else e=i.apply(this,arguments);return xe(this,e)}}function Oe(s,n){for(;!Object.prototype.hasOwnProperty.call(s,n)&&(s=D(s),s!==null););return s}function I(s,n,t){return typeof Reflect!="undefined"&&Reflect.get?I=Reflect.get:I=function(e,r,o){var a=Oe(e,r);if(!!a){var l=Object.getOwnPropertyDescriptor(a,r);return l.get?l.get.call(o):l.value}},I(s,n,t||s)}function j(s,n){return Me(s)||Pe(s,n)||Pt(s,n)||Re()}function Le(s){return De(s)||Ie(s)||Pt(s)||Be()}function De(s){if(Array.isArray(s))return st(s)}function Me(s){if(Array.isArray(s))return s}function Ie(s){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(s))return Array.from(s)}function Pe(s,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(s)))){var t=[],i=!0,e=!1,r=void 0;try{for(var o=s[Symbol.iterator](),a;!(i=(a=o.next()).done)&&(t.push(a.value),!(n&&t.length===n));i=!0);}catch(l){e=!0,r=l}finally{try{!i&&o.return!=null&&o.return()}finally{if(e)throw r}}return t}}function Pt(s,n){if(!!s){if(typeof s=="string")return st(s,n);var t=Object.prototype.toString.call(s).slice(8,-1);if(t==="Object"&&s.constructor&&(t=s.constructor.name),t==="Map"||t==="Set")return Array.from(s);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return st(s,n)}}function st(s,n){(n==null||n>s.length)&&(n=s.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=s[t];return i}function Be(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Re(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var W={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"}},Bt=function(){function s(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};X(this,s),Object.assign(this,W,n),this.smartphone=W.smartphone,n.smartphone&&Object.assign(this.smartphone,n.smartphone),this.tablet=W.tablet,n.tablet&&Object.assign(this.tablet,n.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),this.direction==="horizontal"?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)}return K(s,[{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)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||this.windowWidth<this.tablet.breakpoint,this.isTablet=this.isMobile&&this.windowWidth>=this.tablet.breakpoint;var t=this.context;if(this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",t!=this.context){var i=t=="desktop"?this.smooth:this[t].smooth,e=this.context=="desktop"?this.smooth:this[this.context].smooth;i!=e&&window.location.reload()}}}},{key:"initEvents",value:function(){var t=this;this.scrollToEls=this.el.querySelectorAll("[data-".concat(this.name,"-to]")),this.setScrollTo=this.setScrollTo.bind(this),this.scrollToEls.forEach(function(i){i.addEventListener("click",t.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(t){var i=this,e=this.instance.scroll.y,r=e+this.windowHeight,o=this.instance.scroll.x,a=o+this.windowWidth;Object.entries(this.els).forEach(function(l){var c=j(l,2),f=c[0],u=c[1];if(u&&(!u.inView||t)&&(i.direction==="horizontal"?a>=u.left&&o<u.right&&i.setInView(u,f):r>=u.top&&e<u.bottom&&i.setInView(u,f)),u&&u.inView)if(i.direction==="horizontal"){var v=u.right-u.left;u.progress=(i.instance.scroll.x-(u.left-i.windowWidth))/(v+i.windowWidth),(a<u.left||o>u.right)&&i.setOutOfView(u,f)}else{var h=u.bottom-u.top;u.progress=(i.instance.scroll.y-(u.top-i.windowHeight))/(h+i.windowHeight),(r<u.top||e>u.bottom)&&i.setOutOfView(u,f)}}),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,i){this.els[i].inView=!0,t.el.classList.add(t.class),this.currentElements[i]=t,t.call&&this.hasCallEventSet&&(this.dispatchCall(t,"enter"),t.repeat||(this.els[i].call=!1))}},{key:"setOutOfView",value:function(t,i){var e=this;this.els[i].inView=!1,Object.keys(this.currentElements).forEach(function(r){r===i&&delete e.currentElements[r]}),t.call&&this.hasCallEventSet&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,i){this.callWay=i,this.callValue=t.call.split(",").map(function(r){return r.trim()}),this.callObj=t,this.callValue.length==1&&(this.callValue=this.callValue[0]);var e=new Event(this.namespace+"call");this.el.dispatchEvent(e)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");this.el.dispatchEvent(t)}},{key:"setEvents",value:function(t,i){this.listeners[t]||(this.listeners[t]=[]);var e=this.listeners[t];e.push(i),e.length===1&&this.el.addEventListener(this.namespace+t,this.checkEvent,!1),t==="call"&&(this.hasCallEventSet=!0,this.detectElements(!0))}},{key:"unsetEvents",value:function(t,i){if(!!this.listeners[t]){var e=this.listeners[t],r=e.indexOf(i);r<0||(e.splice(r,1),e.index===0&&this.el.removeEventListener(this.namespace+t,this.checkEvent,!1))}}},{key:"checkEvent",value:function(t){var i=this,e=t.type.replace(this.namespace,""),r=this.listeners[e];!r||r.length===0||r.forEach(function(o){switch(e){case"scroll":return o(i.instance);case"call":return o(i.callValue,i.callWay,i.callObj);default:return o()}})}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,i){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var t=this;window.removeEventListener("resize",this.checkResize,!1),Object.keys(this.listeners).forEach(function(i){t.el.removeEventListener(t.namespace+i,t.checkEvent,!1)}),this.listeners={},this.scrollToEls.forEach(function(i){i.removeEventListener("click",t.setScrollTo,!1)}),this.html.classList.remove(this.initClass)}}]),s}(),je=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Rt(s,n){return n={exports:{}},s(n,n.exports),n.exports}var jt=Rt(function(s,n){(function(){function t(){var i=window,e=document;if("scrollBehavior"in e.documentElement.style&&i.__forceSmoothScrollPolyfill__!==!0)return;var r=i.HTMLElement||i.Element,o=468,a={scroll:i.scroll||i.scrollTo,scrollBy:i.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},l=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now;function c(d){var p=["MSIE ","Trident/","Edge/"];return new RegExp(p.join("|")).test(d)}var f=c(i.navigator.userAgent)?1:0;function u(d,p){this.scrollLeft=d,this.scrollTop=p}function v(d){return .5*(1-Math.cos(Math.PI*d))}function h(d){if(d===null||typeof d!="object"||d.behavior===void 0||d.behavior==="auto"||d.behavior==="instant")return!0;if(typeof d=="object"&&d.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+d.behavior+" is not a valid value for enumeration ScrollBehavior.")}function m(d,p){if(p==="Y")return d.clientHeight+f<d.scrollHeight;if(p==="X")return d.clientWidth+f<d.scrollWidth}function C(d,p){var b=i.getComputedStyle(d,null)["overflow"+p];return b==="auto"||b==="scroll"}function L(d){var p=m(d,"Y")&&C(d,"Y"),b=m(d,"X")&&C(d,"X");return p||b}function A(d){for(;d!==e.body&&L(d)===!1;)d=d.parentNode||d.host;return d}function k(d){var p=l(),b,y,T,g=(p-d.startTime)/o;g=g>1?1:g,b=v(g),y=d.startX+(d.x-d.startX)*b,T=d.startY+(d.y-d.startY)*b,d.method.call(d.scrollable,y,T),(y!==d.x||T!==d.y)&&i.requestAnimationFrame(k.bind(i,d))}function w(d,p,b){var y,T,g,S,B=l();d===e.body?(y=i,T=i.scrollX||i.pageXOffset,g=i.scrollY||i.pageYOffset,S=a.scroll):(y=d,T=d.scrollLeft,g=d.scrollTop,S=u),k({scrollable:y,method:S,startTime:B,startX:T,startY:g,x:p,y:b})}i.scroll=i.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){a.scroll.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:i.scrollY||i.pageYOffset);return}w.call(i,e.body,arguments[0].left!==void 0?~~arguments[0].left:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:i.scrollY||i.pageYOffset)}},i.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])){a.scrollBy.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}w.call(i,e.body,~~arguments[0].left+(i.scrollX||i.pageXOffset),~~arguments[0].top+(i.scrollY||i.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}var d=arguments[0].left,p=arguments[0].top;w.call(this,this,typeof d=="undefined"?this.scrollLeft:~~d,typeof p=="undefined"?this.scrollTop:~~p)}},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(h(arguments[0])===!0){a.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}var d=A(this),p=d.getBoundingClientRect(),b=this.getBoundingClientRect();d!==e.body?(w.call(this,d,d.scrollLeft+b.left-p.left,d.scrollTop+b.top-p.top),i.getComputedStyle(d).position!=="fixed"&&i.scrollBy({left:p.left,top:p.top,behavior:"smooth"})):i.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}s.exports={polyfill:t}})()}),yi=jt.polyfill,We=function(s){Dt(t,s);var n=It(t);function t(){var i,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return X(this,t),i=n.call(this,e),i.resetNativeScroll&&(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),window.addEventListener("scroll",i.checkScroll,!1),window.smoothscrollPolyfill===void 0&&(window.smoothscrollPolyfill=jt,window.smoothscrollPolyfill.polyfill()),i}return K(t,[{key:"init",value:function(){this.instance.scroll.y=window.pageYOffset,this.addElements(),this.detectElements(),I(D(t.prototype),"init",this).call(this)}},{key:"checkScroll",value:function(){var e=this;I(D(t.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(){e.detectElements()}),this.hasScrollTicking=!0))}},{key:"addDirection",value:function(){window.pageYOffset>this.instance.scroll.y?this.instance.direction!=="down"&&(this.instance.direction="down"):window.pageYOffset<this.instance.scroll.y&&this.instance.direction!=="up"&&(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 e=this;this.els={};var r=this.el.querySelectorAll("[data-"+this.name+"]");r.forEach(function(o,a){var l=o.getBoundingClientRect(),c=o.dataset[e.name+"Class"]||e.class,f=typeof o.dataset[e.name+"Id"]=="string"?o.dataset[e.name+"Id"]:a,u,v,h=typeof o.dataset[e.name+"Offset"]=="string"?o.dataset[e.name+"Offset"].split(","):e.offset,m=o.dataset[e.name+"Repeat"],C=o.dataset[e.name+"Call"],L=o.dataset[e.name+"Target"],A;L!==void 0?A=document.querySelector("".concat(L)):A=o;var k=A.getBoundingClientRect();u=k.top+e.instance.scroll.y,v=k.left+e.instance.scroll.x;var w=u+A.offsetHeight,d=v+A.offsetWidth;m=="false"?m=!1:m!=null?m=!0:m=e.repeat;var p=e.getRelativeOffset(h);u=u+p[0],w=w-p[1];var b={el:o,targetEl:A,id:f,class:c,top:u,bottom:w,left:v,right:d,offset:h,progress:0,repeat:m,inView:!1,call:C};e.els[f]=b,o.classList.contains(c)&&e.setInView(e.els[f],f)})}},{key:"updateElements",value:function(){var e=this;Object.entries(this.els).forEach(function(r){var o=j(r,2),a=o[0],l=o[1],c=l.targetEl.getBoundingClientRect().top+e.instance.scroll.y,f=c+l.targetEl.offsetHeight,u=e.getRelativeOffset(l.offset);e.els[a].top=c+u[0],e.els[a].bottom=f-u[1]}),this.hasScrollTicking=!1}},{key:"getRelativeOffset",value:function(e){var r=[0,0];if(e)for(var o=0;o<e.length;o++)typeof e[o]=="string"?e[o].includes("%")?r[o]=parseInt(e[o].replace("%","")*this.windowHeight/100):r[o]=parseInt(e[o]):r[o]=e[o];return r}},{key:"scrollTo",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=parseInt(r.offset)||0,a=r.callback?r.callback:!1;if(typeof e=="string"){if(e==="top")e=this.html;else if(e==="bottom")e=this.html.offsetHeight-window.innerHeight;else if(e=document.querySelector(e),!e)return}else if(typeof e=="number")e=parseInt(e);else if(!(e&&e.tagName)){console.warn("`target` parameter is not valid");return}typeof e!="number"?o=e.getBoundingClientRect().top+o+this.instance.scroll.y:o=e+o;var l=function(){return parseInt(window.pageYOffset)===parseInt(o)};if(a)if(l()){a();return}else{var c=function f(){l()&&(window.removeEventListener("scroll",f),a())};window.addEventListener("scroll",c)}window.scrollTo({top:o,behavior:r.duration===0?"auto":"smooth"})}},{key:"update",value:function(){this.addElements(),this.detectElements()}},{key:"destroy",value:function(){I(D(t.prototype),"destroy",this).call(this),window.removeEventListener("scroll",this.checkScroll,!1)}}]),t}(Bt);var Wt=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable;function Ye(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function Ne(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;var i=Object.getOwnPropertyNames(n).map(function(r){return n[r]});if(i.join("")!=="0123456789")return!1;var e={};return"abcdefghijklmnopqrst".split("").forEach(function(r){e[r]=r}),Object.keys(Object.assign({},e)).join("")==="abcdefghijklmnopqrst"}catch(r){return!1}}var Ue=Ne()?Object.assign:function(s,n){for(var t,i=Ye(s),e,r=1;r<arguments.length;r++){t=Object(arguments[r]);for(var o in t)He.call(t,o)&&(i[o]=t[o]);if(Wt){e=Wt(t);for(var a=0;a<e.length;a++)ze.call(t,e[a])&&(i[e[a]]=t[e[a]])}}return i};function Ht(){}Ht.prototype={on:function(s,n,t){var i=this.e||(this.e={});return(i[s]||(i[s]=[])).push({fn:n,ctx:t}),this},once:function(s,n,t){var i=this;function e(){i.off(s,e),n.apply(t,arguments)}return e._=n,this.on(s,e,t)},emit:function(s){var n=[].slice.call(arguments,1),t=((this.e||(this.e={}))[s]||[]).slice(),i=0,e=t.length;for(i;i<e;i++)t[i].fn.apply(t[i].ctx,n);return this},off:function(s,n){var t=this.e||(this.e={}),i=t[s],e=[];if(i&&n)for(var r=0,o=i.length;r<o;r++)i[r].fn!==n&&i[r].fn._!==n&&e.push(i[r]);return e.length?t[s]=e:delete t[s],this}};var Ve=Ht,qe=Rt(function(s,n){(function(){var t;t=n!==null?n:this,t.Lethargy=function(){function i(e,r,o,a){this.stability=e!=null?Math.abs(e):8,this.sensitivity=r!=null?1+Math.abs(r):100,this.tolerance=o!=null?1+Math.abs(o):1.1,this.delay=a!=null?a:150,this.lastUpDeltas=function(){var l,c,f;for(f=[],l=1,c=this.stability*2;1<=c?l<=c:l>=c;1<=c?l++:l--)f.push(null);return f}.call(this),this.lastDownDeltas=function(){var l,c,f;for(f=[],l=1,c=this.stability*2;1<=c?l<=c:l>=c;1<=c?l++:l--)f.push(null);return f}.call(this),this.deltasTimestamp=function(){var l,c,f;for(f=[],l=1,c=this.stability*2;1<=c?l<=c:l>=c;1<=c?l++:l--)f.push(null);return f}.call(this)}return i.prototype.check=function(e){var r;return e=e.originalEvent||e,e.wheelDelta!=null?r=e.wheelDelta:e.deltaY!=null?r=e.deltaY*-40:(e.detail!=null||e.detail===0)&&(r=e.detail*-40),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),r>0?(this.lastUpDeltas.push(r),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(r),this.lastDownDeltas.shift(),this.isInertia(-1))},i.prototype.isInertia=function(e){var r,o,a,l,c,f,u;return r=e===-1?this.lastDownDeltas:this.lastUpDeltas,r[0]===null?e:this.deltasTimestamp[this.stability*2-2]+this.delay>Date.now()&&r[0]===r[this.stability*2-1]?!1:(a=r.slice(0,this.stability),o=r.slice(this.stability,this.stability*2),u=a.reduce(function(v,h){return v+h}),c=o.reduce(function(v,h){return v+h}),f=u/a.length,l=c/o.length,Math.abs(f)<Math.abs(l*this.tolerance)&&this.sensitivity<Math.abs(l)?e:!1)},i.prototype.showLastUpDeltas=function(){return this.lastUpDeltas},i.prototype.showLastDownDeltas=function(){return this.lastDownDeltas},i}()}).call(je)}),_=function(){return{hasWheelEvent:"onwheel"in document,hasMouseWheelEvent:"onmousewheel"in document,hasTouch:"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,hasTouchWin:navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1}}(),Fe=Object.prototype.toString,Xe=Object.prototype.hasOwnProperty,Ke=function(s){if(!s)return console.warn("bindAll requires at least one argument.");var n=Array.prototype.slice.call(arguments,1);if(n.length===0)for(var t in s)Xe.call(s,t)&&typeof s[t]=="function"&&Fe.call(s[t])=="[object Function]"&&n.push(t);for(var i=0;i<n.length;i++){var e=n[i];s[e]=Ge(s[e],s)}};function Ge(s,n){return function(){return s.apply(n,arguments)}}var $e=qe.Lethargy,R="virtualscroll",Ze=x,z={LEFT:37,UP:38,RIGHT:39,DOWN:40,SPACE:32};function x(s){Ke(this,"_onWheel","_onMouseWheel","_onTouchStart","_onTouchMove","_onKeyDown"),this.el=window,s&&s.el&&(this.el=s.el,delete s.el),this.options=Ue({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",limitInertia:!1,useKeyboard:!0,useTouch:!0},s),this.options.limitInertia&&(this._lethargy=new $e),this._emitter=new Ve,this._event={y:0,x:0,deltaX:0,deltaY:0},this.touchStartX=null,this.touchStartY=null,this.bodyTouchAction=null,this.options.passive!==void 0&&(this.listenerOptions={passive:this.options.passive})}x.prototype._notify=function(s){var n=this._event;n.x+=n.deltaX,n.y+=n.deltaY,this._emitter.emit(R,{x:n.x,y:n.y,deltaX:n.deltaX,deltaY:n.deltaY,originalEvent:s})};x.prototype._onWheel=function(s){var n=this.options;if(!(this._lethargy&&this._lethargy.check(s)===!1)){var t=this._event;t.deltaX=s.wheelDeltaX||s.deltaX*-1,t.deltaY=s.wheelDeltaY||s.deltaY*-1,_.isFirefox&&s.deltaMode==1&&(t.deltaX*=n.firefoxMultiplier,t.deltaY*=n.firefoxMultiplier),t.deltaX*=n.mouseMultiplier,t.deltaY*=n.mouseMultiplier,this._notify(s)}};x.prototype._onMouseWheel=function(s){if(!(this.options.limitInertia&&this._lethargy.check(s)===!1)){var n=this._event;n.deltaX=s.wheelDeltaX?s.wheelDeltaX:0,n.deltaY=s.wheelDeltaY?s.wheelDeltaY:s.wheelDelta,this._notify(s)}};x.prototype._onTouchStart=function(s){var n=s.targetTouches?s.targetTouches[0]:s;this.touchStartX=n.pageX,this.touchStartY=n.pageY};x.prototype._onTouchMove=function(s){var n=this.options;n.preventTouch&&!s.target.classList.contains(n.unpreventTouchClass)&&s.preventDefault();var t=this._event,i=s.targetTouches?s.targetTouches[0]:s;t.deltaX=(i.pageX-this.touchStartX)*n.touchMultiplier,t.deltaY=(i.pageY-this.touchStartY)*n.touchMultiplier,this.touchStartX=i.pageX,this.touchStartY=i.pageY,this._notify(s)};x.prototype._onKeyDown=function(s){var n=this._event;n.deltaX=n.deltaY=0;var t=window.innerHeight-40;switch(s.keyCode){case z.LEFT:case z.UP:n.deltaY=this.options.keyStep;break;case z.RIGHT:case z.DOWN:n.deltaY=-this.options.keyStep;break;case s.shiftKey:n.deltaY=t;break;case z.SPACE:n.deltaY=-t;break;default:return}this._notify(s)};x.prototype._bind=function(){_.hasWheelEvent&&this.el.addEventListener("wheel",this._onWheel,this.listenerOptions),_.hasMouseWheelEvent&&this.el.addEventListener("mousewheel",this._onMouseWheel,this.listenerOptions),_.hasTouch&&this.options.useTouch&&(this.el.addEventListener("touchstart",this._onTouchStart,this.listenerOptions),this.el.addEventListener("touchmove",this._onTouchMove,this.listenerOptions)),_.hasPointer&&_.hasTouchWin&&(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)),_.hasKeyDown&&this.options.useKeyboard&&document.addEventListener("keydown",this._onKeyDown)};x.prototype._unbind=function(){_.hasWheelEvent&&this.el.removeEventListener("wheel",this._onWheel),_.hasMouseWheelEvent&&this.el.removeEventListener("mousewheel",this._onMouseWheel),_.hasTouch&&(this.el.removeEventListener("touchstart",this._onTouchStart),this.el.removeEventListener("touchmove",this._onTouchMove)),_.hasPointer&&_.hasTouchWin&&(document.body.style.msTouchAction=this.bodyTouchAction,this.el.removeEventListener("MSPointerDown",this._onTouchStart,!0),this.el.removeEventListener("MSPointerMove",this._onTouchMove,!0)),_.hasKeyDown&&this.options.useKeyboard&&document.removeEventListener("keydown",this._onKeyDown)};x.prototype.on=function(s,n){this._emitter.on(R,s,n);var t=this._emitter.e;t&&t[R]&&t[R].length===1&&this._bind()};x.prototype.off=function(s,n){this._emitter.off(R,s,n);var t=this._emitter.e;(!t[R]||t[R].length<=0)&&this._unbind()};x.prototype.reset=function(){var s=this._event;s.x=0,s.y=0};x.prototype.destroy=function(){this._emitter.off(),this._unbind()};function rt(s,n,t){return(1-t)*s+t*n}function O(s){var n={};if(!!window.getComputedStyle){var t=getComputedStyle(s),i=t.transform||t.webkitTransform||t.mozTransform,e=i.match(/^matrix3d\((.+)\)$/);return e?(n.x=e?parseFloat(e[1].split(", ")[12]):0,n.y=e?parseFloat(e[1].split(", ")[13]):0):(e=i.match(/^matrix\((.+)\)$/),n.x=e?parseFloat(e[1].split(", ")[4]):0,n.y=e?parseFloat(e[1].split(", ")[5]):0),n}}function ot(s){for(var n=[];s&&s!==document;s=s.parentNode)n.push(s);return n}var Je=4,Qe=.001,ti=1e-7,ei=10,Y=11,G=1/(Y-1),ii=typeof Float32Array=="function";function zt(s,n){return 1-3*n+3*s}function Yt(s,n){return 3*n-6*s}function Nt(s){return 3*s}function $(s,n,t){return((zt(n,t)*s+Yt(n,t))*s+Nt(n))*s}function Ut(s,n,t){return 3*zt(n,t)*s*s+2*Yt(n,t)*s+Nt(n)}function ni(s,n,t,i,e){var r,o,a=0;do o=n+(t-n)/2,r=$(o,i,e)-s,r>0?t=o:n=o;while(Math.abs(r)>ti&&++a<ei);return o}function si(s,n,t,i){for(var e=0;e<Je;++e){var r=Ut(n,t,i);if(r===0)return n;var o=$(n,t,i)-s;n-=o/r}return n}function ri(s){return s}var oi=function(n,t,i,e){if(!(0<=n&&n<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===t&&i===e)return ri;for(var r=ii?new Float32Array(Y):new Array(Y),o=0;o<Y;++o)r[o]=$(o*G,n,i);function a(l){for(var c=0,f=1,u=Y-1;f!==u&&r[f]<=l;++f)c+=G;--f;var v=(l-r[f])/(r[f+1]-r[f]),h=c+v*G,m=Ut(h,n,i);return m>=Qe?si(l,h,n,i):m===0?h:ni(l,c,c+G,n,i)}return function(c){return c===0?0:c===1?1:$(a(c),t,e)}},P={LEFT:37,UP:38,RIGHT:39,DOWN:40,SPACE:32,TAB:9,PAGEUP:33,PAGEDOWN:34,HOME:36,END:35},ai=function(s){Dt(t,s);var n=It(t);function t(){var i,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return X(this,t),history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0),i=n.call(this,e),i.inertia&&(i.lerp=i.inertia*.1),i.isScrolling=!1,i.isDraggingScrollbar=!1,i.isTicking=!1,i.hasScrollTicking=!1,i.parallaxElements={},i.stop=!1,i.scrollbarContainer=e.scrollbarContainer,i.checkKey=i.checkKey.bind(Mt(i)),window.addEventListener("keydown",i.checkKey,!1),i}return K(t,[{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=it({delta:{x:this.initPosition.x,y:this.initPosition.y},scroll:{x:this.initPosition.x,y:this.initPosition.y}},this.instance),this.vs=new Ze({el:this.scrollFromAnywhere?document:this.el,mouseMultiplier:navigator.platform.indexOf("Win")>-1?1:.4,firefoxMultiplier:this.firefoxMultiplier,touchMultiplier:this.touchMultiplier,useKeyboard:!1,passive:!0}),this.vs.on(function(r){e.stop||e.isDraggingScrollbar||requestAnimationFrame(function(){e.updateDelta(r),e.isScrolling||e.startScrolling()})}),this.setScrollLimit(),this.initScrollBar(),this.addSections(),this.addElements(),this.checkScroll(!0),this.transformElements(!0,!0),I(D(t.prototype),"init",this).call(this)}},{key:"setScrollLimit",value:function(){if(this.instance.limit.y=this.el.offsetHeight-this.windowHeight,this.direction==="horizontal"){for(var e=0,r=this.el.children,o=0;o<r.length;o++)e+=r[o].offsetWidth;this.instance.limit.x=e-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(e){var r=this;if(this.stop){e.keyCode==P.TAB&&requestAnimationFrame(function(){r.html.scrollTop=0,document.body.scrollTop=0,r.html.scrollLeft=0,document.body.scrollLeft=0});return}switch(e.keyCode){case P.TAB:requestAnimationFrame(function(){r.html.scrollTop=0,document.body.scrollTop=0,r.html.scrollLeft=0,document.body.scrollLeft=0,r.scrollTo(document.activeElement,{offset:-window.innerHeight/2})});break;case P.UP:this.instance.delta[this.directionAxis]-=240;break;case P.DOWN:this.instance.delta[this.directionAxis]+=240;break;case P.PAGEUP:this.instance.delta[this.directionAxis]-=window.innerHeight;break;case P.PAGEDOWN:this.instance.delta[this.directionAxis]+=window.innerHeight;break;case P.HOME:this.instance.delta[this.directionAxis]-=this.instance.limit[this.directionAxis];break;case P.END:this.instance.delta[this.directionAxis]+=this.instance.limit[this.directionAxis];break;case P.SPACE:!(document.activeElement instanceof HTMLInputElement)&&!(document.activeElement instanceof HTMLTextAreaElement)&&(e.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 e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(r||this.isScrolling||this.isDraggingScrollbar){this.hasScrollTicking||(this.checkScrollRaf=requestAnimationFrame(function(){return e.checkScroll()}),this.hasScrollTicking=!0),this.updateScroll();var o=Math.abs(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis]),a=Date.now()-this.startScrollTs;if(!this.animatingScroll&&a>100&&(o<.5&&this.instance.delta[this.directionAxis]!=0||o<.5&&this.instance.delta[this.directionAxis]==0)&&this.stopScrolling(),Object.entries(this.sections).forEach(function(c){var f=j(c,2),u=f[0],v=f[1];v.persistent||e.instance.scroll[e.directionAxis]>v.offset[e.directionAxis]&&e.instance.scroll[e.directionAxis]<v.limit[e.directionAxis]?(e.direction==="horizontal"?e.transform(v.el,-e.instance.scroll[e.directionAxis],0):e.transform(v.el,0,-e.instance.scroll[e.directionAxis]),v.inView||(v.inView=!0,v.el.style.opacity=1,v.el.style.pointerEvents="all",v.el.setAttribute("data-".concat(e.name,"-section-inview"),""))):((v.inView||r)&&(v.inView=!1,v.el.style.opacity=0,v.el.style.pointerEvents="none",v.el.removeAttribute("data-".concat(e.name,"-section-inview"))),e.transform(v.el,0,0))}),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.detectElements(),this.transformElements(),this.hasScrollbar){var l=this.instance.scroll[this.directionAxis]/this.instance.limit[this.directionAxis]*this.scrollBarLimit[this.directionAxis];this.direction==="horizontal"?this.transform(this.scrollbarThumb,l,0):this.transform(this.scrollbarThumb,0,l)}I(D(t.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(e){var r,o=this[this.context]&&this[this.context].gestureDirection?this[this.context].gestureDirection:this.gestureDirection;o==="both"?r=e.deltaX+e.deltaY:o==="vertical"?r=e.deltaY:o==="horizontal"?r=e.deltaX:r=e.deltaY,this.instance.delta[this.directionAxis]-=r*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(e){this.isScrolling||this.isDraggingScrollbar?this.instance.scroll[this.directionAxis]=rt(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?this.instance.direction!=="down"&&(this.instance.direction="down"):this.instance.delta.y<this.instance.scroll.y&&this.instance.direction!=="up"&&(this.instance.direction="up"),this.instance.delta.x>this.instance.scroll.x?this.instance.direction!=="right"&&(this.instance.direction="right"):this.instance.delta.x<this.instance.scroll.x&&this.instance.direction!=="left"&&(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,this.direction=="horizontal"){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,this.direction==="horizontal"?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,this.direction=="horizontal"){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,this.direction==="horizontal"?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(e){this.isDraggingScrollbar=!0,this.checkScroll(),this.html.classList.remove(this.scrollingClass),this.html.classList.add(this.draggingClass)}},{key:"releaseScrollBar",value:function(e){this.isDraggingScrollbar=!1,this.isScrolling&&this.html.classList.add(this.scrollingClass),this.html.classList.remove(this.draggingClass)}},{key:"moveScrollBar",value:function(e){var r=this;this.isDraggingScrollbar&&requestAnimationFrame(function(){var o=(e.clientX-r.scrollbarBCR.left)*100/r.scrollbarWidth*r.instance.limit.x/100,a=(e.clientY-r.scrollbarBCR.top)*100/r.scrollbarHeight*r.instance.limit.y/100;a>0&&a<r.instance.limit.y&&(r.instance.delta.y=a),o>0&&o<r.instance.limit.x&&(r.instance.delta.x=o)})}},{key:"addElements",value:function(){var e=this;this.els={},this.parallaxElements={};var r=this.el.querySelectorAll("[data-".concat(this.name,"]"));r.forEach(function(o,a){var l=ot(o),c=Object.entries(e.sections).map(function(Q){var ft=j(Q,2),ci=ft[0],Zt=ft[1];return Zt}).find(function(Q){return l.includes(Q.el)}),f=o.dataset[e.name+"Class"]||e.class,u=typeof o.dataset[e.name+"Id"]=="string"?o.dataset[e.name+"Id"]:"el"+a,v,h,m=o.dataset[e.name+"Repeat"],C=o.dataset[e.name+"Call"],L=o.dataset[e.name+"Position"],A=o.dataset[e.name+"Delay"],k=o.dataset[e.name+"Direction"],w=typeof o.dataset[e.name+"Sticky"]=="string",d=o.dataset[e.name+"Speed"]?parseFloat(o.dataset[e.name+"Speed"])/10:!1,p=typeof o.dataset[e.name+"Offset"]=="string"?o.dataset[e.name+"Offset"].split(","):e.offset,b=o.dataset[e.name+"Target"],y;b!==void 0?y=document.querySelector("".concat(b)):y=o;var T=y.getBoundingClientRect();c===null||c.inView?(v=T.top+e.instance.scroll.y-O(y).y,h=T.left+e.instance.scroll.x-O(y).x):(v=T.top-O(c.el).y-O(y).y,h=T.left-O(c.el).x-O(y).x);var g=v+y.offsetHeight,S=h+y.offsetWidth,B={x:(S-h)/2+h,y:(g-v)/2+v};if(w){var J=o.getBoundingClientRect(),U=J.top,ct=J.left,ht={x:ct-h,y:U-v};v+=window.innerHeight,h+=window.innerWidth,g=U+y.offsetHeight-o.offsetHeight-ht[e.directionAxis],S=ct+y.offsetWidth-o.offsetWidth-ht[e.directionAxis],B={x:(S-h)/2+h,y:(g-v)/2+v}}m=="false"?m=!1:m!=null?m=!0:m=e.repeat;var M=[0,0];if(p)if(e.direction==="horizontal"){for(var E=0;E<p.length;E++)typeof p[E]=="string"?p[E].includes("%")?M[E]=parseInt(p[E].replace("%","")*e.windowWidth/100):M[E]=parseInt(p[E]):M[E]=p[E];h=h+M[0],S=S-M[1]}else{for(var E=0;E<p.length;E++)typeof p[E]=="string"?p[E].includes("%")?M[E]=parseInt(p[E].replace("%","")*e.windowHeight/100):M[E]=parseInt(p[E]):M[E]=p[E];v=v+M[0],g=g-M[1]}var ut={el:o,id:u,class:f,section:c,top:v,middle:B,bottom:g,left:h,right:S,offset:p,progress:0,repeat:m,inView:!1,call:C,speed:d,delay:A,position:L,target:y,direction:k,sticky:w};e.els[u]=ut,o.classList.contains(f)&&e.setInView(e.els[u],u),(d!==!1||w)&&(e.parallaxElements[u]=ut)})}},{key:"addSections",value:function(){var e=this;this.sections={};var r=this.el.querySelectorAll("[data-".concat(this.name,"-section]"));r.length===0&&(r=[this.el]),r.forEach(function(o,a){var l=typeof o.dataset[e.name+"Id"]=="string"?o.dataset[e.name+"Id"]:"section"+a,c=o.getBoundingClientRect(),f={x:c.left-window.innerWidth*1.5-O(o).x,y:c.top-window.innerHeight*1.5-O(o).y},u={x:f.x+c.width+window.innerWidth*2,y:f.y+c.height+window.innerHeight*2},v=typeof o.dataset[e.name+"Persistent"]=="string";o.setAttribute("data-scroll-section-id",l);var h={el:o,offset:f,limit:u,inView:!1,persistent:v,id:l};e.sections[l]=h})}},{key:"transform",value:function(e,r,o,a){var l;if(!a)l="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0,".concat(r,",").concat(o,",0,1)");else{var c=O(e),f=rt(c.x,r,a),u=rt(c.y,o,a);l="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0,".concat(f,",").concat(u,",0,1)")}e.style.webkitTransform=l,e.style.msTransform=l,e.style.transform=l}},{key:"transformElements",value:function(e){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.instance.scroll.x+this.windowWidth,l=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(f){var u=j(f,2),v=u[0],h=u[1],m=!1;if(e&&(m=0),h.inView||o)switch(h.position){case"top":m=r.instance.scroll[r.directionAxis]*-h.speed;break;case"elementTop":m=(l-h.top)*-h.speed;break;case"bottom":m=(r.instance.limit[r.directionAxis]-l+r.windowHeight)*h.speed;break;case"left":m=r.instance.scroll[r.directionAxis]*-h.speed;break;case"elementLeft":m=(a-h.left)*-h.speed;break;case"right":m=(r.instance.limit[r.directionAxis]-a+r.windowHeight)*h.speed;break;default:m=(c[r.directionAxis]-h.middle[r.directionAxis])*-h.speed;break}h.sticky&&(h.inView?r.direction==="horizontal"?m=r.instance.scroll.x-h.left+window.innerWidth:m=r.instance.scroll.y-h.top+window.innerHeight:r.direction==="horizontal"?r.instance.scroll.x<h.left-window.innerWidth&&r.instance.scroll.x<h.left-window.innerWidth/2?m=0:r.instance.scroll.x>h.right&&r.instance.scroll.x>h.right+100?m=h.right-h.left+window.innerWidth:m=!1:r.instance.scroll.y<h.top-window.innerHeight&&r.instance.scroll.y<h.top-window.innerHeight/2?m=0:r.instance.scroll.y>h.bottom&&r.instance.scroll.y>h.bottom+100?m=h.bottom-h.top+window.innerHeight:m=!1),m!==!1&&(h.direction==="horizontal"||r.direction==="horizontal"&&h.direction!=="vertical"?r.transform(h.el,m,0,e?!1:h.delay):r.transform(h.el,0,m,e?!1:h.delay))})}},{key:"scrollTo",value:function(e){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=parseInt(o.offset)||0,l=isNaN(parseInt(o.duration))?1e3:parseInt(o.duration),c=o.easing||[.25,0,.35,1],f=!!o.disableLerp,u=o.callback?o.callback:!1;if(c=oi.apply(void 0,Le(c)),typeof e=="string"){if(e==="top")e=0;else if(e==="bottom")e=this.instance.limit.y;else if(e==="left")e=0;else if(e==="right")e=this.instance.limit.x;else if(e=document.querySelector(e),!e)return}else if(typeof e=="number")e=parseInt(e);else if(!(e&&e.tagName)){console.warn("`target` parameter is not valid");return}if(typeof e!="number"){var v=ot(e).includes(this.el);if(!v)return;var h=e.getBoundingClientRect(),m=h.top,C=h.left,L=ot(e),A=L.find(function(g){return Object.entries(r.sections).map(function(S){var B=j(S,2),J=B[0],U=B[1];return U}).find(function(S){return S.el==g})}),k=0;A?k=O(A)[this.directionAxis]:k=-this.instance.scroll[this.directionAxis],this.direction==="horizontal"?a=C+a-k:a=m+a-k}else a=e+a;var w=parseFloat(this.instance.delta[this.directionAxis]),d=Math.max(0,Math.min(a,this.instance.limit[this.directionAxis])),p=d-w,b=function(S){f?r.direction==="horizontal"?r.setScroll(w+p*S,r.instance.delta.y):r.setScroll(r.instance.delta.x,w+p*S):r.instance.delta[r.directionAxis]=w+p*S};this.animatingScroll=!0,this.stopScrolling(),this.startScrolling();var y=Date.now(),T=function g(){var S=(Date.now()-y)/l;S>1?(b(1),r.animatingScroll=!1,l==0&&r.update(),u&&u()):(r.scrollToRaf=requestAnimationFrame(g),b(c(S)))};T()}},{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(e,r){this.instance=it(it({},this.instance),{},{scroll:{x:e,y:r},delta:{x:e,y:r},speed:0})}},{key:"destroy",value:function(){I(D(t.prototype),"destroy",this).call(this),this.stopScrolling(),this.html.classList.remove(this.smoothClass),this.vs.destroy(),this.destroyScrollBar(),window.removeEventListener("keydown",this.checkKey,!1)}}]),t}(Bt),li=function(){function s(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};X(this,s),this.options=n,Object.assign(this,W,n),this.smartphone=W.smartphone,n.smartphone&&Object.assign(this.smartphone,n.smartphone),this.tablet=W.tablet,n.tablet&&Object.assign(this.tablet,n.tablet),!this.smooth&&this.direction=="horizontal"&&console.warn("\u{1F6A8} `smooth:false` & `horizontal` direction are not yet compatible"),!this.tablet.smooth&&this.tablet.direction=="horizontal"&&console.warn("\u{1F6A8} `smooth:false` & `horizontal` direction are not yet compatible (tablet)"),!this.smartphone.smooth&&this.smartphone.direction=="horizontal"&&console.warn("\u{1F6A8} `smooth:false` & `horizontal` direction are not yet compatible (smartphone)"),this.init()}return K(s,[{key:"init",value:function(){if(this.options.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||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 ai(this.options):this.scroll=new We(this.options),this.scroll.init(),window.location.hash){var t=window.location.hash.slice(1,window.location.hash.length),i=document.getElementById(t);i&&this.scroll.scrollTo(i)}}},{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,i){this.scroll.scrollTo(t,i)}},{key:"setScroll",value:function(t,i){this.scroll.setScroll(t,i)}},{key:"on",value:function(t,i){this.scroll.setEvents(t,i)}},{key:"off",value:function(t,i){this.scroll.unsetEvents(t,i)}},{key:"destroy",value:function(){this.scroll.destroy()}}]),s}();var Vt=li;var at=class extends F{constructor(s){super(s)}init(){this.scroll=new Vt({el:this.el,smooth:!0}),this.scroll.on("call",(s,n,t,i)=>{this.call(s[0],{way:n,obj:t},s[1],s[2])}),this.scroll.on("scroll",s=>{})}lazyLoad(s){xt(s.obj.el,null,()=>{})}destroy(){this.scroll.destroy()}};var Xt=ae(Ft(),1);function Kt(){(0,Xt.default)()}var N=document.documentElement,Ci=document.body,_i=N.hasAttribute("data-debug");var Gt=new kt({modules:lt});window.onload=s=>{let n=document.getElementById("main-css");n?n.isLoaded?$t():n.addEventListener("load",t=>{$t()}):console.warn('The "main-css" stylesheet not found')};function $t(){Kt(),Gt.init(Gt),N.classList.add("is-loaded"),N.classList.add("is-ready"),N.classList.remove("is-loading")}})();
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*! svg4everybody v2.1.9 | github.com/jonathantneal/svg4everybody */
//# sourceMappingURL=app.js.map