import{ah as pt,ai as vt}from"./EchoChannel-Bg1-kez_.js";var st={};const mt=pt(vt);Object.defineProperty(st,"__esModule",{value:!0});var Y=mt,B=function(){return B=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++)for(var f in n=arguments[i])Object.prototype.hasOwnProperty.call(n,f)&&(t[f]=n[f]);return t},B.apply(this,arguments)};function ct(t,n,i){for(var o,f=0,a=n.length;f<a;f++)!o&&f in n||(o||(o=Array.prototype.slice.call(n,0,f)),o[f]=n[f]);return t.concat(o||Array.prototype.slice.call(n))}function rt(t){return Array.prototype.slice.call(t)}function at(t,n){var i=Math.floor(t);return i===n||i+1===n?t:n}function ot(){return Date.now()}function Z(t,n,i){if(n="data-keen-slider-"+n,i===null)return t.removeAttribute(n);t.setAttribute(n,i||"")}function Q(t,n){return n=n||document,typeof t=="function"&&(t=t(n)),Array.isArray(t)?t:typeof t=="string"?rt(n.querySelectorAll(t)):t instanceof HTMLElement?[t]:t instanceof NodeList?rt(t):[]}function $(t){t.raw&&(t=t.raw),t.cancelable&&!t.defaultPrevented&&t.preventDefault()}function U(t){t.raw&&(t=t.raw),t.stopPropagation&&t.stopPropagation()}function dt(){var t=[];return{add:function(n,i,o,f){n.addListener?n.addListener(o):n.addEventListener(i,o,f),t.push([n,i,o,f])},input:function(n,i,o,f){this.add(n,i,function(a){return function(r){r.nativeEvent&&(r=r.nativeEvent);var y=r.changedTouches||[],x=r.targetTouches||[],d=r.detail&&r.detail.x?r.detail:null;return a({id:d?d.identifier?d.identifier:"i":x[0]?x[0]?x[0].identifier:"e":"d",idChanged:d?d.identifier?d.identifier:"i":y[0]?y[0]?y[0].identifier:"e":"d",raw:r,x:d&&d.x?d.x:x[0]?x[0].screenX:d?d.x:r.pageX,y:d&&d.y?d.y:x[0]?x[0].screenY:d?d.y:r.pageY})}}(o),f)},purge:function(){t.forEach(function(n){n[0].removeListener?n[0].removeListener(n[2]):n[0].removeEventListener(n[1],n[2],n[3])}),t=[]}}}function tt(t,n,i){return Math.min(Math.max(t,n),i)}function F(t){return(t>0?1:0)-(t<0?1:0)||+t}function ut(t){var n=t.getBoundingClientRect();return{height:at(n.height,t.offsetHeight),width:at(n.width,t.offsetWidth)}}function N(t,n,i,o){var f=t&&t[n];return f==null?i:o&&typeof f=="function"?f():f}function j(t){return Math.round(1e6*t)/1e6}function ht(t){var n,i,o,f,a,r;function y(M){r||(r=M),x(!0);var E=M-r;E>o&&(E=o);var v=f[i];if(v[3]<E)return i++,y(M);var T=v[2],z=v[4],m=v[0],h=v[1]*(0,v[5])(z===0?1:(E-T)/z);if(h&&t.track.to(m+h),E<o)return C();r=null,x(!1),d(null),t.emit("animationEnded")}function x(M){n.active=M}function d(M){n.targetIdx=M}function C(){var M;M=y,a=window.requestAnimationFrame(M)}function S(){var M;M=a,window.cancelAnimationFrame(M),x(!1),d(null),r&&t.emit("animationStopped"),r=null}return n={active:!1,start:function(M){if(S(),t.track.details){var E=0,v=t.track.details.position;i=0,o=0,f=M.map(function(T){var z,m=Number(v),h=(z=T.earlyExit)!==null&&z!==void 0?z:T.duration,p=T.easing,O=T.distance*p(h/T.duration)||0;v+=O;var A=o;return o+=h,E+=O,[m,T.distance,A,o,T.duration,p]}),d(t.track.distToIdx(E)),C(),t.emit("animationStarted")}},stop:S,targetIdx:null}}function gt(t){var n,i,o,f,a,r,y,x,d,C,S,M,E,v,T=1/0,z=[],m=null,h=0;function p(l){q(h+l)}function O(l){var s=A(h+l).abs;return w(s)?s:null}function A(l){var s=Math.floor(Math.abs(j(l/i))),e=j((l%i+i)%i);e===i&&(e=0);var b=F(l),c=y.indexOf(ct([],y).reduce(function(I,D){return Math.abs(D-e)<Math.abs(I-e)?D:I})),k=c;return b<0&&s++,c===r&&(k=0,s+=b>0?1:-1),{abs:k+s*r*b,origin:c,rel:k}}function L(l,s,e){var b;if(s||!W())return u(l,e);if(!w(l))return null;var c=A(e??h),k=c.abs,I=l-c.rel,D=k+I;b=u(D);var P=u(D-r*F(I));return(P!==null&&Math.abs(P)<Math.abs(b)||b===null)&&(b=P),j(b)}function u(l,s){if(s==null&&(s=j(h)),!w(l)||l===null)return null;l=Math.round(l);var e=A(s),b=e.abs,c=e.rel,k=e.origin,I=R(l),D=(s%i+i)%i,P=y[k],V=Math.floor((l-(b-c))/r)*i;return j(P-D-P+y[I]+V+(k===r?i:0))}function w(l){return _(l)===l}function _(l){return tt(l,d,C)}function W(){return f.loop}function R(l){return(l%r+r)%r}function q(l){var s;s=l-h,z.push({distance:s,timestamp:ot()}),z.length>6&&(z=z.slice(-6)),h=j(l);var e=g().abs;if(e!==m){var b=m!==null;m=e,b&&t.emit("slideChanged")}}function g(l){var s=l?null:function(){if(r){var e=W(),b=e?(h%i+i)%i:h,c=(e?h%i:h)-a[0][2],k=0-(c<0&&e?i-Math.abs(c):c),I=0,D=A(h),P=D.abs,V=D.rel,G=a[V][2],J=a.map(function(X,lt){var H=k+I;(H<0-X[0]||H>1)&&(H+=(Math.abs(H)>i-1&&e?i:0)*F(-H));var it=lt-V,nt=F(it),K=it+P;e&&(nt===-1&&H>G&&(K+=r),nt===1&&H<G&&(K-=r),S!==null&&K<S&&(H+=i),M!==null&&K>M&&(H-=i));var et=H+X[0]+X[1],ft=Math.max(H>=0&&et<=1?1:et<0||H>1?0:H<0?Math.min(1,(X[0]+H)/X[0]):(1-H)/X[0],0);return I+=X[0]+X[1],{abs:K,distance:f.rtl?-1*H+1-X[0]:H,portion:ft,size:X[0]}});return P=_(P),V=R(P),{abs:_(P),length:o,max:v,maxIdx:C,min:E,minIdx:d,position:h,progress:e?b/i:h/o,rel:V,slides:J,slidesLength:i}}}();return n.details=s,t.emit("detailsChanged"),s}return n={absToRel:R,add:p,details:null,distToIdx:O,idxToDist:L,init:function(l){if(function(){if(f=t.options,a=(f.trackConfig||[]).map(function(c){return[N(c,"size",1),N(c,"spacing",0),N(c,"origin",0)]}),r=a.length){i=j(a.reduce(function(c,k){return c+k[0]+k[1]},0));var e,b=r-1;o=j(i+a[0][2]-a[b][0]-a[b][2]-a[b][1]),y=a.reduce(function(c,k){if(!c)return[0];var I=a[c.length-1],D=c[c.length-1]+(I[0]+I[2])+I[1];return D-=k[2],c[c.length-1]>D&&(D=c[c.length-1]),D=j(D),c.push(D),(!e||e<D)&&(x=c.length-1),e=D,c},null),o===0&&(x=0),y.push(j(i))}}(),!r)return g(!0);var s;(function(){var e=t.options.range,b=t.options.loop;S=d=b?N(b,"min",-1/0):0,M=C=b?N(b,"max",T):x;var c=N(e,"min",null),k=N(e,"max",null);c!==null&&(d=c),k!==null&&(C=k),E=d===-1/0?d:t.track.idxToDist(d||0,!0,0),v=C===T?C:L(C,!0,0),k===null&&(M=C),N(e,"align",!1)&&C!==T&&a[R(C)][2]===0&&(v-=1-a[R(C)][0],C=O(v-h)),E=j(E),v=j(v)})(),s=l,Number(s)===s?p(u(_(l))):g()},to:q,velocity:function(){var l=ot(),s=z.reduce(function(e,b){var c=b.distance,k=b.timestamp;return l-k>200||(F(c)!==F(e.distance)&&e.distance&&(e={distance:0,lastTimestamp:0,time:0}),e.time&&(e.distance+=c),e.lastTimestamp&&(e.time+=k-e.lastTimestamp),e.lastTimestamp=k),e},{distance:0,lastTimestamp:0,time:0});return s.distance/s.time||0}}}function bt(t){var n,i,o,f,a,r,y,x;function d(m){return 2*m}function C(m){return tt(m,y,x)}function S(m){return 1-Math.pow(1-m,3)}function M(){return o?t.track.velocity():0}function E(){z();var m=t.options.mode==="free-snap",h=t.track,p=M();f=F(p);var O=t.track.details,A=[];if(p||!m){var L=v(p),u=L.dist,w=L.dur;if(w=d(w),u*=f,m){var _=h.idxToDist(h.distToIdx(u),!0);_&&(u=_)}A.push({distance:u,duration:w,easing:S});var W=O.position,R=W+u;if(R<a||R>r){var q=R<a?a-W:r-W,g=0,l=p;if(F(q)===f){var s=Math.min(Math.abs(q)/Math.abs(u),1),e=function(k){return 1-Math.pow(1-k,1/3)}(s)*w;A[0].earlyExit=e,l=p*(1-s)}else A[0].earlyExit=0,g+=q;var b=v(l,100),c=b.dist*f;t.options.rubberband&&(A.push({distance:c,duration:d(b.dur),easing:S}),A.push({distance:-c+g,duration:500,easing:S}))}t.animator.start(A)}else t.moveToIdx(C(O.abs),!0,{duration:500,easing:function(k){return 1+--k*k*k*k*k}})}function v(m,h){h===void 0&&(h=1e3);var p=147e-9+(m=Math.abs(m))/h;return{dist:Math.pow(m,2)/p,dur:m/p}}function T(){var m=t.track.details;m&&(a=m.min,r=m.max,y=m.minIdx,x=m.maxIdx)}function z(){t.animator.stop()}t.on("updated",T),t.on("optionsChanged",T),t.on("created",T),t.on("dragStarted",function(){o=!1,z(),n=i=t.track.details.abs}),t.on("dragChecked",function(){o=!0}),t.on("dragEnded",function(){var m=t.options.mode;m==="snap"&&function(){var h=t.track,p=t.track.details,O=p.position,A=F(M());(O>r||O<a)&&(A=0);var L=n+A;p.slides[h.absToRel(L)].portion===0&&(L-=A),n!==i&&(L=i),F(h.idxToDist(L,!0))!==A&&(L+=A),L=C(L);var u=h.idxToDist(L,!0);t.animator.start([{distance:u,duration:500,easing:function(w){return 1+--w*w*w*w*w}}])}(),m!=="free"&&m!=="free-snap"||E()}),t.on("dragged",function(){i=t.track.details.abs})}function xt(t){var n,i,o,f,a,r,y,x,d,C,S,M,E,v,T,z,m,h,p=dt();function O(g){if(r&&x===g.id){var l=w(g);if(d){if(!u(g))return L(g);C=l,d=!1,t.emit("dragChecked")}if(z)return C=l;$(g);var s=function(b){if(m===-1/0&&h===1/0)return b;var c=t.track.details,k=c.length,I=c.position,D=tt(b,m-I,h-I);if(k===0)return 0;if(!t.options.rubberband)return D;if(I<=h&&I>=m||I<m&&i>0||I>h&&i<0)return b;var P=(I<m?I-m:I-h)/k,V=f*k,G=Math.abs(P*V),J=Math.max(0,1-G/a*2);return J*J*b}(y(C-l)/f*o);i=F(s);var e=t.track.details.position;(e>m&&e<h||e===m&&i>0||e===h&&i<0)&&U(g),S+=s,!M&&Math.abs(S*f)>5&&(M=!0),t.track.add(s),C=l,t.emit("dragged")}}function A(g){!r&&t.track.details&&t.track.details.length&&(S=0,r=!0,M=!1,d=!0,x=g.id,u(g),C=w(g),t.emit("dragStarted"))}function L(g){r&&x===g.idChanged&&(r=!1,t.emit("dragEnded"))}function u(g){var l=_(),s=l?g.y:g.x,e=l?g.x:g.y,b=E!==void 0&&v!==void 0&&Math.abs(v-e)<=Math.abs(E-s);return E=s,v=e,b}function w(g){return _()?g.y:g.x}function _(){return t.options.vertical}function W(){f=t.size,a=_()?window.innerHeight:window.innerWidth;var g=t.track.details;g&&(m=g.min,h=g.max)}function R(g){M&&(U(g),$(g))}function q(){if(p.purge(),t.options.drag&&!t.options.disabled){var g;g=t.options.dragSpeed||1,y=typeof g=="function"?g:function(s){return s*g},o=t.options.rtl?-1:1,W(),n=t.container,function(){var s="data-keen-slider-clickable";Q("[".concat(s,"]:not([").concat(s,"=false])"),n).map(function(e){p.add(e,"dragstart",U),p.add(e,"mousedown",U),p.add(e,"touchstart",U)})}(),p.add(n,"dragstart",function(s){$(s)}),p.add(n,"click",R,{capture:!0}),p.input(n,"ksDragStart",A),p.input(n,"ksDrag",O),p.input(n,"ksDragEnd",L),p.input(n,"mousedown",A),p.input(n,"mousemove",O),p.input(n,"mouseleave",L),p.input(n,"mouseup",L),p.input(n,"touchstart",A,{passive:!0}),p.input(n,"touchmove",O,{passive:!1}),p.input(n,"touchend",L),p.input(n,"touchcancel",L),p.add(window,"wheel",function(s){r&&$(s)});var l="data-keen-slider-scrollable";Q("[".concat(l,"]:not([").concat(l,"=false])"),t.container).map(function(s){return function(e){var b;p.input(e,"touchstart",function(c){b=w(c),z=!0,T=!0},{passive:!0}),p.input(e,"touchmove",function(c){var k=_(),I=k?e.scrollHeight-e.clientHeight:e.scrollWidth-e.clientWidth,D=b-w(c),P=k?e.scrollTop:e.scrollLeft,V=k&&e.style.overflowY==="scroll"||!k&&e.style.overflowX==="scroll";if(b=w(c),(D<0&&P>0||D>0&&P<I)&&T&&V)return z=!0;T=!1,$(c),z=!1}),p.input(e,"touchend",function(){z=!1})}(s)})}}t.on("updated",W),t.on("optionsChanged",q),t.on("created",q),t.on("destroyed",p.purge)}function kt(t){var n,i,o=null;function f(E,v,T){t.animator.active?r(E,v,T):requestAnimationFrame(function(){return r(E,v,T)})}function a(){f(!1,!1,i)}function r(E,v,T){var z=0,m=t.size,h=t.track.details;if(h&&n){var p=h.slides;n.forEach(function(O,A){if(E)!o&&v&&x(O,null,T),d(O,null,T);else{if(!p[A])return;var L=p[A].size*m;!o&&v&&x(O,L,T),d(O,p[A].distance*m-z,T),z+=L}})}}function y(E){return t.options.renderMode==="performance"?Math.round(E):E}function x(E,v,T){var z=T?"height":"width";v!==null&&(v=y(v)+"px"),E.style["min-"+z]=v,E.style["max-"+z]=v}function d(E,v,T){if(v!==null){v=y(v);var z=T?v:0;v="translate3d(".concat(T?0:v,"px, ").concat(z,"px, 0)")}E.style.transform=v,E.style["-webkit-transform"]=v}function C(){n&&(r(!0,!0,i),n=null),t.on("detailsChanged",a,!0)}function S(){f(!1,!0,i)}function M(){C(),i=t.options.vertical,t.options.disabled||t.options.renderMode==="custom"||(o=N(t.options.slides,"perView",null)==="auto",t.on("detailsChanged",a),(n=t.slides).length&&S())}t.on("created",M),t.on("optionsChanged",M),t.on("beforeOptionsChanged",function(){C()}),t.on("updated",S),t.on("destroyed",C)}function yt(t,n){return function(i){var o,f,a,r,y,x=dt();function d(u){var w;Z(i.container,"reverse",(w=i.container,window.getComputedStyle(w,null).getPropertyValue("direction")!=="rtl"||u?null:"")),Z(i.container,"v",i.options.vertical&&!u?"":null),Z(i.container,"disabled",i.options.disabled&&!u?"":null)}function C(){S()&&z()}function S(){var u=null;if(r.forEach(function(_){_.matches&&(u=_.__media)}),u===o)return!1;o||i.emit("beforeOptionsChanged"),o=u;var w=u?a.breakpoints[u]:a;return i.options=B(B({},a),w),d(),A(),L(),h(),!0}function M(u){var w=ut(u);return(i.options.vertical?w.height:w.width)/i.size||1}function E(){return i.options.trackConfig.length}function v(u){for(var w in o=!1,a=B(B({},n),u),x.purge(),f=i.size,r=[],a.breakpoints||[]){var _=window.matchMedia(w);_.__media=w,r.push(_),x.add(_,"change",C)}x.add(window,"orientationchange",O),x.add(window,"resize",p),S()}function T(u){i.animator.stop();var w=i.track.details;i.track.init(u??(w?w.abs:0))}function z(u){T(u),i.emit("optionsChanged")}function m(u,w){if(u)return v(u),void z(w);A(),L();var _=E();h(),E()!==_?z(w):T(w),i.emit("updated")}function h(){var u=i.options.slides;if(typeof u=="function")return i.options.trackConfig=u(i.size,i.slides);for(var w=i.slides,_=w.length,W=typeof u=="number"?u:N(u,"number",_,!0),R=[],q=N(u,"perView",1,!0),g=N(u,"spacing",0,!0)/i.size||0,l=q==="auto"?g:g/q,s=N(u,"origin","auto"),e=0,b=0;b<W;b++){var c=q==="auto"?M(w[b]):1/q-g+l,k=s==="center"?.5-c/2:s==="auto"?0:s;R.push({origin:k,size:c,spacing:g}),e+=c}if(e+=g*(W-1),s==="auto"&&!i.options.loop&&q!==1){var I=0;R.map(function(D){var P=e-I;return I+=D.size+g,P>=1||(D.origin=1-P-(e>1?0:1-e)),D})}i.options.trackConfig=R}function p(){A();var u=i.size;i.options.disabled||u===f||(f=u,m())}function O(){p(),setTimeout(p,500),setTimeout(p,2e3)}function A(){var u=ut(i.container);i.size=(i.options.vertical?u.height:u.width)||1}function L(){i.slides=Q(i.options.selector,i.container)}i.container=(y=Q(t,document)).length?y[0]:null,i.destroy=function(){x.purge(),i.emit("destroyed"),d(!0)},i.prev=function(){i.moveToIdx(i.track.details.abs-1,!0)},i.next=function(){i.moveToIdx(i.track.details.abs+1,!0)},i.update=m,v(i.options)}}var wt=function(t,n,i){try{return function(o,f){var a,r={};return a={emit:function(y){r[y]&&r[y].forEach(function(d){d(a)});var x=a.options&&a.options[y];x&&x(a)},moveToIdx:function(y,x,d){var C=a.track.idxToDist(y,x);if(C){var S=a.options.defaultAnimation;a.animator.start([{distance:C,duration:N(d||S,"duration",500),easing:N(d||S,"easing",function(M){return 1+--M*M*M*M*M})}])}},on:function(y,x,d){d===void 0&&(d=!1),r[y]||(r[y]=[]);var C=r[y].indexOf(x);C>-1?d&&delete r[y][C]:d||r[y].push(x)},options:o},function(){if(a.track=gt(a),a.animator=ht(a),f)for(var y=0,x=f;y<x.length;y++)(0,x[y])(a);a.track.init(a.options.initial||0),a.emit("created")}(),a}(n,ct([yt(t,{drag:!0,mode:"snap",renderMode:"precision",rubberband:!0,selector:".keen-slider__slide"}),kt,xt,bt],i||[],!0))}catch(o){console.error(o)}},Tt=st.useKeenSlider=function(t,n){var i=Y.ref(),o=Y.ref();return Y.isRef(t)&&Y.watch(t,function(f,a){o.value&&o.value.update(f)}),Y.onMounted(function(){i.value&&(o.value=new wt(i.value,Y.isRef(t)?t.value:t,n))}),Y.onUnmounted(function(){o.value&&o.value.destroy()}),[i,o]};export{Tt as u};