(()=>{var q=Object.create;var{getPrototypeOf:F,defineProperty:x,getOwnPropertyNames:P,getOwnPropertyDescriptor:J}=Object,j=Object.prototype.hasOwnProperty;var Q=(t,n,o)=>{o=t!=null?q(F(t)):{};let e=n||!t||!t.__esModule?x(o,"default",{value:t,enumerable:!0}):o;for(let c of P(t))if(!j.call(e,c))x(e,c,{get:()=>t[c],enumerable:!0});return e},K=new WeakMap,Z=(t)=>{var n=K.get(t),o;if(n)return n;if(n=x({},"__esModule",{value:!0}),t&&typeof t==="object"||typeof t==="function")P(t).map((e)=>!j.call(n,e)&&x(n,e,{get:()=>t[e],enumerable:!(o=J(t,e))||o.enumerable}));return K.set(t,n),n},$=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports);var z=(t,n)=>{for(var o in n)x(t,o,{get:n[o],enumerable:!0,configurable:!0,set:(e)=>n[o]=()=>e})};var T=$((E,W)=>{(function(t,n){typeof E=="object"&&typeof W!="undefined"?W.exports=n():typeof define=="function"&&define.amd?define(n):(t||self).virtualScroll=n()})(E,function(){var t=0;function n(y){return"__private_"+t+++"_"+y}function o(y,b){if(!Object.prototype.hasOwnProperty.call(y,b))throw new TypeError("attempted to use private field on non-instance");return y}function e(){}e.prototype={on:function(y,b,f){var h=this.e||(this.e={});return(h[y]||(h[y]=[])).push({fn:b,ctx:f}),this},once:function(y,b,f){var h=this;function i(){h.off(y,i),b.apply(f,arguments)}return i._=b,this.on(y,i,f)},emit:function(y){for(var b=[].slice.call(arguments,1),f=((this.e||(this.e={}))[y]||[]).slice(),h=0,i=f.length;h1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1}),o(this,l)[l]=Object.assign({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",useKeyboard:!0,useTouch:!0},f),o(this,u)[u]=new c,o(this,m)[m]={y:0,x:0,deltaX:0,deltaY:0},o(this,v)[v]={x:null,y:null},o(this,M)[M]=null,o(this,l)[l].passive!==void 0&&(this.listenerOptions={passive:o(this,l)[l].passive})}var b=y.prototype;return b._notify=function(f){var h=o(this,m)[m];h.x+=h.deltaX,h.y+=h.deltaY,o(this,u)[u].emit(p,{x:h.x,y:h.y,deltaX:h.deltaX,deltaY:h.deltaY,originalEvent:f})},b._bind=function(){a.hasWheelEvent&&o(this,s)[s].addEventListener("wheel",this._onWheel,this.listenerOptions),a.hasMouseWheelEvent&&o(this,s)[s].addEventListener("mousewheel",this._onMouseWheel,this.listenerOptions),a.hasTouch&&o(this,l)[l].useTouch&&(o(this,s)[s].addEventListener("touchstart",this._onTouchStart,this.listenerOptions),o(this,s)[s].addEventListener("touchmove",this._onTouchMove,this.listenerOptions)),a.hasPointer&&a.hasTouchWin&&(o(this,M)[M]=document.body.style.msTouchAction,document.body.style.msTouchAction="none",o(this,s)[s].addEventListener("MSPointerDown",this._onTouchStart,!0),o(this,s)[s].addEventListener("MSPointerMove",this._onTouchMove,!0)),a.hasKeyDown&&o(this,l)[l].useKeyboard&&document.addEventListener("keydown",this._onKeyDown)},b._unbind=function(){a.hasWheelEvent&&o(this,s)[s].removeEventListener("wheel",this._onWheel),a.hasMouseWheelEvent&&o(this,s)[s].removeEventListener("mousewheel",this._onMouseWheel),a.hasTouch&&(o(this,s)[s].removeEventListener("touchstart",this._onTouchStart),o(this,s)[s].removeEventListener("touchmove",this._onTouchMove)),a.hasPointer&&a.hasTouchWin&&(document.body.style.msTouchAction=o(this,M)[M],o(this,s)[s].removeEventListener("MSPointerDown",this._onTouchStart,!0),o(this,s)[s].removeEventListener("MSPointerMove",this._onTouchMove,!0)),a.hasKeyDown&&o(this,l)[l].useKeyboard&&document.removeEventListener("keydown",this._onKeyDown)},b.on=function(f,h){o(this,u)[u].on(p,f,h);var i=o(this,u)[u].e;i&&i[p]&&i[p].length===1&&this._bind()},b.off=function(f,h){o(this,u)[u].off(p,f,h);var i=o(this,u)[u].e;(!i[p]||i[p].length<=0)&&this._unbind()},b.destroy=function(){o(this,u)[u].off(),this._unbind()},y}()})});var L={};z(L,{symmetricMod:()=>Y,lerp:()=>O,default:()=>B,damp:()=>d});var X=Q(T());function O(t,n,o){return t*(1-o)+n*o}function d(t,n,o,e){let c=1-Math.exp(-o*e);return t+(n-t)*c}function Y(t,n){let o=t%n;if(Math.abs(o)>n/2)o=o>0?o-n:o+n;return o}var N={infinite:!0,snap:!0,dragSensitivity:0.005,lerpFactor:0.3,scrollSensitivity:1,snapStrength:0.1,speedDecay:0.85,bounceLimit:1,virtualScroll:{mouseMultiplier:0.5,touchMultiplier:2,firefoxMultiplier:30,useKeyboard:!1,passive:!0},setOffset:({itemWidth:t,wrapperWidth:n})=>t,scrollInput:!1};class k{speed=0;#e=0;#a=0;#r=0;deltaTime=0;#t=!0;#n=!1;#o=0;#u=0;config;wrapper;items;viewport;isDragging=!1;dragStart=0;dragStartTarget=0;isVisible=!1;current=0;target=0;maxScroll=0;resizeTimeout;virtualScroll;observer;touchStartY;touchStartX;touchPreviousX;scrollDirection;parallaxValues;webglValue=0;onSlideChange;onResize;onUpdate;constructor(t,n={}){if(this.config={...N,...n},n.onSlideChange)this.onSlideChange=n.onSlideChange;if(n.onResize)this.onResize=n.onResize;if(n.onUpdate)this.onUpdate=n.onUpdate;delete this.config.onSlideChange,delete this.config.onResize,delete this.config.onUpdate,this.wrapper=t,this.items=[...t.children],this.current=0,this.target=0,this.isDragging=!1,this.dragStart=0,this.dragStartTarget=0,this.isVisible=!1,this.#o=0,this.#u=0,this.#f(),this.#y(),this.#b(),this.wrapper.style.cursor="grab",this.#f(),this.#v()}#y(){let t={root:null,rootMargin:"50px",threshold:0};this.observer=new IntersectionObserver((n)=>{n.forEach((o)=>{this.isVisible=o.isIntersecting})},t),this.observer.observe(this.wrapper)}#f(){this.viewport={itemWidth:this.items[0].getBoundingClientRect().width,wrapperWidth:this.wrapper.clientWidth,totalWidth:this.items.reduce((t,n)=>t+n.clientWidth,0)},this.#a=this.config.setOffset(this.viewport),this.maxScroll=-(this.viewport.totalWidth-this.#a)/this.viewport.itemWidth,queueMicrotask(()=>{this.onResize?.(this)})}#b(){let t=(s)=>this.#h(s),n=(s)=>this.#i(s),o=()=>this.#s();this.wrapper.addEventListener("mousedown",t),window.addEventListener("mousemove",n),window.addEventListener("mouseup",o);let e=5,c=(s)=>{let u=s.touches[0];this.touchStartY=u.clientY,this.touchStartX=u.clientX,this.touchPreviousX=u.clientX,this.scrollDirection=void 0,this.#h(u)},a=(s)=>{let u=s.touches[0],m=Math.abs(u.clientY-this.touchStartY),v=Math.abs(u.clientX-this.touchStartX);if(!this.scrollDirection&&(v>e||m>e))this.scrollDirection=v>m?"horizontal":"vertical";if(this.scrollDirection==="horizontal")s.preventDefault(),this.#i(u),this.touchPreviousX=u.clientX},p=()=>{this.scrollDirection=void 0,this.touchPreviousX=void 0,this.#s()};this.wrapper.addEventListener("touchstart",c),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",p),new ResizeObserver(()=>{if(this.resizeTimeout)clearTimeout(this.resizeTimeout);this.resizeTimeout=setTimeout(()=>this.resize(),10)}).observe(this.wrapper)}#l(t){if(!this.config.infinite){if(t>this.config.bounceLimit)return this.config.bounceLimit;else if(t{if(!this.isDragging&&!this.#n){if(n.touchDevice){let a=Math.abs(n.deltaY),p=Math.abs(n.deltaX);if(ap)return}let e=(!this.config.scrollInput?n.deltaX:Math.abs(n.deltaX)>Math.abs(n.deltaY)?n.deltaX:n.deltaY)*this.config.scrollSensitivity*0.001,c=this.target+e;if(!this.config.infinite){if(c>0)c=0;else if(c0)this.target=0;else if(this.target{let o=this.current*this.viewport.itemWidth;return t.style.transform=`translateX(${o}px)`,o})}#_(){this.parallaxValues=this.items.map((t,n)=>{let o=this.current+n,c=(Y(o,this.items.length)-n)*this.viewport.itemWidth;return t.style.transform=`translateX(${c}px)`,Y(o,this.items.length)})}#p(){this.#e=d(this.#e,this.speed,1/this.config.lerpFactor,this.deltaTime),this.speed*=this.config.speedDecay}goToNext(){if(!this.config.infinite)this.target=Math.max(this.maxScroll,Math.round(this.target-1));else this.target=Math.round(this.target-1)}goToPrev(){if(!this.config.infinite)this.target=Math.min(0,Math.round(this.target+1));else this.target=Math.round(this.target+1)}goToIndex(t){this.target=-t}set snap(t){this.config.snap=t}getProgress(){let t=this.items.length;return Math.abs(this.current)%t/t}destroy(){if(this.kill(),window.removeEventListener("mousemove",(t)=>this.#i(t)),window.removeEventListener("mouseup",()=>this.#s()),window.removeEventListener("touchmove",(t)=>{let n=t.touches[0];this.#i(n)}),window.removeEventListener("touchend",()=>this.#s()),this.wrapper.removeEventListener("mousedown",(t)=>this.#h(t)),this.wrapper.removeEventListener("touchstart",(t)=>{let n=t.touches[0];this.#h(n)}),this.resizeTimeout)clearTimeout(this.resizeTimeout);if(this.virtualScroll&&this.config.scrollInput)this.virtualScroll.destroy();if(this.observer)this.observer.disconnect()}get currentSlide(){return this.#o}#c(t){if(this.#o!==t)this.#u=this.#o,this.#o=t,this.onSlideChange?.(this.#o,this.#u)}kill(){this.#t=!1,this.items.forEach((t)=>{t.style.transform=""}),this.current=0,this.target=0,this.speed=0,this.#e=0,this.touchPreviousX=void 0}init(){this.#t=!0,this.#r=performance.now()}set paused(t){this.#n=t}get paused(){return this.#n}get progress(){if(this.config.infinite){let t=-this.target,n=this.items.length;return(t%n+n)%n/(n-1)}else{let t=Math.abs(this.current),n=Math.abs(this.maxScroll);return Math.max(0,Math.min(1,t/n))}}resize(){this.#f();let t=this.#t,n=this.isVisible;this.#t=!0,this.isVisible=!0,this.update(),this.#t=t,this.isVisible=n}}var B=k; if (typeof window !== 'undefined') { window.Smooothy = B; } else if (typeof globalThis !== 'undefined') { globalThis.Smooothy = B; } else if (typeof self !== 'undefined') { self.Smooothy = B; } })();