import{j as n}from"./ui-vendor-CPlxOuHz.js";import{r as t}from"./react-vendor-DjUmVRt1.js";import{e,B as r}from"./index-09CqdSdZ.js";import{r as o,i}from"./icons-ClkGBw8e.js";function s(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function c(n,t){const e=Object.keys(n),r=Object.keys(t);if(e.length!==r.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&e.every(e=>{const r=n[e],o=t[e];return"function"==typeof r?`${r}`==`${o}`:s(r)&&s(o)?c(r,o):r===o})}function u(n){return n.concat().sort((n,t)=>n.name>t.name?1:-1).map(n=>n.options)}function a(n){return"number"==typeof n}function l(n){return"string"==typeof n}function d(n){return"boolean"==typeof n}function f(n){return"[object Object]"===Object.prototype.toString.call(n)}function p(n){return Math.abs(n)}function m(n){return Math.sign(n)}function g(n,t){return p(n-t)}function h(n){return w(n).map(Number)}function x(n){return n[y(n)]}function y(n){return Math.max(0,n.length-1)}function v(n,t){return t===y(n)}function b(n,t=0){return Array.from(Array(n),(n,e)=>t+e)}function w(n){return Object.keys(n)}function S(n,t){return[n,t].reduce((n,t)=>(w(t).forEach(e=>{const r=n[e],o=t[e],i=f(r)&&f(o);n[e]=i?S(r,o):o}),n),{})}function N(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function E(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(r,o,i),s=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),s=()=>n.removeListener(o)}return n.push(s),t},clear:function(){n=n.filter(n=>n())}};return t}function L(n,t,e,r){const o=E(),i=1e3/60;let s=null,c=0,u=0;function a(n){if(!u)return;s||(s=n,e(),e());const o=n-s;for(s=n,c+=o;c>=i;)e(),c-=i;r(c/i),u&&(u=t.requestAnimationFrame(a))}function l(){t.cancelAnimationFrame(u),s=null,c=0,u=0}return{init:function(){o.add(n,"visibilitychange",()=>{n.hidden&&(s=null,c=0)})},destroy:function(){l(),o.clear()},start:function(){u||(u=t.requestAnimationFrame(a))},stop:l,update:e,render:r}}function k(n=0,t=0){const e=p(n-t);function r(t){return t<n}function o(n){return n>t}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function D(n,t,e){const{constrain:r}=k(0,n),o=n+1;let i=s(t);function s(n){return e?p((o+n)%o):r(n)}function c(){return i}function u(){return D(n,c(),e)}const a={get:c,set:function(n){return i=s(n),a},add:function(n){return u().set(c()+n)},clone:u};return a}function O(n,t,e,r,o,i,s,c,u,a,l,f,h,x,y,v,b,w,S){const{cross:L,direction:D}=n,O=["INPUT","SELECT","TEXTAREA"],j={passive:!1},C=E(),I=E(),A=k(50,225).constrain(x.measure(20)),P={mouse:300,touch:400},z={mouse:500,touch:600},M=y?43:25;let F=!1,T=0,R=0,H=!1,V=!1,B=!1,G=!1;function q(n){if(!N(n,r)&&n.touches.length>=2)return $(n);const t=i.readPoint(n),e=i.readPoint(n,L),s=g(t,T),u=g(e,R);if(!V&&!G){if(!n.cancelable)return $(n);if(V=s>u,!V)return $(n)}const l=i.pointerMove(n);s>v&&(B=!0),a.useFriction(.3).useDuration(.75),c.start(),o.add(D(l)),n.preventDefault()}function $(n){const t=l.byDistance(0,!1).index!==f.get(),e=i.pointerUp(n)*(y?z:P)[G?"mouse":"touch"],r=function(n,t){const e=f.add(-1*m(n)),r=l.byDistance(n,!y).distance;return y||p(n)<A?r:b&&t?.5*r:l.byIndex(e.get(),0).distance}(D(e),t),o=function(n,t){if(0===n||0===t)return 0;if(p(n)<=p(t))return 0;const e=g(p(n),p(t));return p(e/n)}(e,r),s=M-10*o,c=w+o/50;V=!1,H=!1,I.clear(),a.useDuration(s).useFriction(c),u.distance(r,!y),G=!1,h.emit("pointerUp")}function U(n){B&&(n.stopPropagation(),n.preventDefault(),B=!1)}return{init:function(n){if(!S)return;function c(c){(d(S)||S(n,c))&&function(n){const c=N(n,r);if(G=c,B=y&&c&&!n.buttons&&F,F=g(o.get(),s.get())>=2,c&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return O.includes(t)}(n.target))return;H=!0,i.pointerDown(n),a.useFriction(0).useDuration(0),o.set(s),function(){const n=G?e:t;I.add(n,"touchmove",q,j).add(n,"touchend",$).add(n,"mousemove",q,j).add(n,"mouseup",$)}(),T=i.readPoint(n),R=i.readPoint(n,L),h.emit("pointerDown")}(c)}const u=t;C.add(u,"dragstart",n=>n.preventDefault(),j).add(u,"touchmove",()=>{},j).add(u,"touchend",()=>{}).add(u,"touchstart",c).add(u,"mousedown",c).add(u,"touchcancel",$).add(u,"contextmenu",$).add(u,"click",U,!0)},destroy:function(){C.clear(),I.clear()},pointerDown:function(){return H}}}function j(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(N(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),s=o(n)-o(e)>170;return r=n,s&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),s=o(n)-o(e),c=o(n)-o(r)>170,u=t/s;return s&&!c&&p(u)>.1?u:0},readPoint:i}}function C(n,t,e,r,o,i,s){const c=[n].concat(r);let u,a,l=[],f=!1;function m(n){return o.measureSize(s.measure(n))}return{init:function(o){i&&(a=m(n),l=r.map(m),u=new ResizeObserver(e=>{(d(i)||i(o,e))&&function(e){for(const i of e){if(f)return;const e=i.target===n,s=r.indexOf(i.target),c=e?a:l[s];if(p(m(e?n:r[s])-c)>=.5){o.reInit(),t.emit("resize");break}}}(e)}),e.requestAnimationFrame(()=>{c.forEach(n=>u.observe(n))}))},destroy:function(){f=!0,u&&u.disconnect()}}}function I(n,t,e,r,o){const i=o.measure(10),s=o.measure(50),c=k(.1,.99);let u=!1;function a(){return!u&&(!!n.reachedAny(e.get())&&!!n.reachedAny(t.get()))}return{shouldConstrain:a,constrain:function(o){if(!a())return;const u=n.reachedMin(t.get())?"min":"max",l=p(n[u]-t.get()),d=e.get()-t.get(),f=c.constrain(l/s);e.subtract(d*f),!o&&p(d)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){u=!n}}}function A(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=k(o,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const o=n*(-1*t);r.forEach(n=>n.add(o))}}}function P(n,t,e,r,o){const{reachedAny:i,removeOffset:s,constrain:c}=r;function u(n){return n.concat().sort((n,t)=>p(n)-p(t))[0]}function a(t,r){const o=[t,t+e,t-e];if(!n)return t;if(!r)return u(o);const i=o.filter(n=>m(n)===r);return i.length?u(i):x(o)-e}return{byDistance:function(e,r){const u=o.get()+e,{index:l,distance:d}=function(e){const r=n?s(e):c(e),o=t.map((n,t)=>({diff:a(n-r,0),index:t})).sort((n,t)=>p(n.diff)-p(t.diff)),{index:i}=o[0];return{index:i,distance:r}}(u),f=!n&&i(u);return!r||f?{index:l,distance:e}:{index:l,distance:e+a(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:a(t[n]-o.get(),e)}},shortcut:a}}function z(n,t,e,r,o,i,s,c){const u={passive:!0,capture:!0};let l=0;function f(n){"Tab"===n.code&&(l=(new Date).getTime())}return{init:function(p){c&&(i.add(document,"keydown",f,!1),t.forEach((t,f)=>{i.add(t,"focus",t=>{(d(c)||c(p,t))&&function(t){if((new Date).getTime()-l>10)return;s.emit("slideFocusStart"),n.scrollLeft=0;const i=e.findIndex(n=>n.includes(t));a(i)&&(o.useDuration(0),r.index(i,0),s.emit("slideFocus"))}(f)},u)}))}}}function M(n){let t=n;function e(n){return a(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function F(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},r=t.style;let o=null,i=!1;return{clear:function(){i||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=(c=n.direction(t),Math.round(100*c)/100);var c;s!==o&&(r.transform=e(s),o=s)},toggleActive:function(n){i=!n}}}function T(n,t,e,r,o,i,s,c,u){const a=h(o),l=h(o).reverse(),d=function(){const n=s[0];return m(p(l,n),e,!1)}().concat(function(){const n=t-s[0]-1;return m(p(a,n),-e,!0)}());function f(n,t){return n.reduce((n,t)=>n-o[t],t)}function p(n,t){return n.reduce((n,e)=>f(n,t)>0?n.concat([e]):n,[])}function m(o,s,a){const l=function(n){return i.map((e,o)=>({start:e-r[o]+.5+n,end:e+t-.5+n}))}(s);return o.map(t=>{const r=a?0:-e,o=a?e:0,i=a?"end":"start",s=l[t][i];return{index:t,loopPoint:s,slideLocation:M(-1),translate:F(n,u[t]),target:()=>c.get()>s?r:o}})}return{canLoop:function(){return d.every(({index:n})=>f(a.filter(t=>t!==n),t)<=.1)},clear:function(){d.forEach(n=>n.translate.clear())},loop:function(){d.forEach(n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))})},loopPoints:d}}function R(n,t,e){let r,o=!1;return{init:function(i){e&&(r=new MutationObserver(n=>{o||(d(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)}),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function H(n,t,e,r){const o={};let i,s=null,c=null,u=!1;return{init:function(){i=new IntersectionObserver(n=>{u||(n.forEach(n=>{const e=t.indexOf(n.target);o[e]=n}),s=null,c=null,e.emit("slidesInView"))},{root:n.parentElement,threshold:r}),t.forEach(n=>i.observe(n))},destroy:function(){i&&i.disconnect(),u=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return w(o).reduce((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t},[])}(n);return n&&(s=t),n||(c=t),t}}}function V(n,t,e,r,o,i,s,c,u){const{startEdge:l,endEdge:d,direction:f}=n,m=a(e);return{groupSlides:function(n){return m?function(n,t){return h(n).filter(n=>n%t===0).map(e=>n.slice(e,e+t))}(n,e):function(n){return n.length?h(n).reduce((e,a,m)=>{const g=x(e)||0,h=0===g,v=a===y(n),b=o[l]-i[g][l],w=o[l]-i[a][d],S=!r&&h?f(s):0,N=p(w-(!r&&v?f(c):0)-(b+S));return m&&N>t+u&&e.push(a),v&&e.push(n.length),e},[]).map((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)}):[]}(n)}}}function B(n,t,e,r,o,i,s){const{align:c,axis:u,direction:a,startIndex:d,loop:f,duration:w,dragFree:S,dragThreshold:N,inViewThreshold:B,slidesToScroll:G,skipSnaps:q,containScroll:$,watchResize:U,watchSlides:W,watchDrag:J,watchFocus:Q}=i,X={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;return{top:t,right:e+r,bottom:t+o,left:e,width:r,height:o}}},K=X.measure(t),Y=e.map(X.measure),Z=function(n,t){const e="rtl"===t,r="y"===n,o=!r&&e?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":e?"right":"left",endEdge:r?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return r?t:e},direction:function(n){return n*o}}}(u,a),_=Z.measureSize(K),nn=function(n){return{measure:function(t){return n*(t/100)}}}(_),tn=function(n,t){const e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r,o){return l(n)?e[n](r):n(t,r,o)}}}(c,_),en=!f&&!!$,rn=f||!!$,{slideSizes:on,slideSizesWithGaps:sn,startGap:cn,endGap:un}=function(n,t,e,r,o,i){const{measureSize:s,startEdge:c,endEdge:u}=n,a=e[0]&&o,l=function(){if(!a)return 0;const n=e[0];return p(t[c]-n[c])}(),d=function(){if(!a)return 0;const n=i.getComputedStyle(x(r));return parseFloat(n.getPropertyValue(`margin-${u}`))}(),f=e.map(s),m=e.map((n,t,e)=>{const r=!t,o=v(e,t);return r?f[t]+l:o?f[t]+d:e[t+1][c]-n[c]}).map(p);return{slideSizes:f,slideSizesWithGaps:m,startGap:l,endGap:d}}(Z,K,Y,e,rn,o),an=V(Z,_,G,f,K,Y,cn,un,2),{snaps:ln,snapsAligned:dn}=function(n,t,e,r,o){const{startEdge:i,endEdge:s}=n,{groupSlides:c}=o,u=c(r).map(n=>x(n)[s]-n[0][i]).map(p).map(t.measure),a=r.map(n=>e[i]-n[i]).map(n=>-p(n)),l=c(a).map(n=>n[0]).map((n,t)=>n+u[t]);return{snaps:a,snapsAligned:l}}(Z,tn,K,Y,an),fn=-x(ln)+x(sn),{snapsContained:pn,scrollContainLimit:mn}=function(n,t,e,r,o){const i=k(-t+n,0),s=e.map((n,t)=>{const{min:r,max:o}=i,s=i.constrain(n),c=!t,a=v(e,t);return c?o:a||u(r,s)?r:u(o,s)?o:s}).map(n=>parseFloat(n.toFixed(3))),c=function(){const n=s[0],t=x(s);return k(s.lastIndexOf(n),s.indexOf(t)+1)}();function u(n,t){return g(n,t)<=1}return{snapsContained:function(){if(t<=n+o)return[i.max];if("keepSnaps"===r)return s;const{min:e,max:u}=c;return s.slice(e,u)}(),scrollContainLimit:c}}(_,fn,dn,$,2),gn=en?pn:dn,{limit:hn}=function(n,t,e){const r=t[0];return{limit:k(e?r-n:x(t),r)}}(fn,gn,f),xn=D(y(gn),d,f),yn=xn.clone(),vn=h(e),bn=L(r,o,()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}})=>{r||e.constrain(n.pointerDown()),t.seek()})(zn),n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,previousLocation:o,scrollLooper:i,slideLooper:s,dragHandler:c,animation:u,eventHandler:a,scrollBounds:l,options:{loop:d}},f)=>{const p=n.settled(),m=!l.shouldConstrain(),g=d?p:p&&m,h=g&&!c.pointerDown();h&&u.stop();const x=e.get()*f+o.get()*(1-f);r.set(x),d&&(i.loop(n.direction()),s.loop()),t.to(r.get()),h&&a.emit("settle"),g||a.emit("scroll")})(zn,n)),wn=gn[xn.get()],Sn=M(wn),Nn=M(wn),En=M(wn),Ln=M(wn),kn=function(n,t,e,r,o,i){let s=0,c=0,u=o,a=i,l=n.get(),d=0;function f(n){return u=n,h}function g(n){return a=n,h}const h={direction:function(){return c},duration:function(){return u},velocity:function(){return s},seek:function(){const t=r.get()-n.get();let o=0;return u?(e.set(n),s+=t/u,s*=a,l+=s,n.add(s),o=l-d):(s=0,e.set(r),n.set(r),o=t),c=m(o),d=l,h},settled:function(){return p(r.get()-t.get())<.001},useBaseFriction:function(){return g(i)},useBaseDuration:function(){return f(o)},useFriction:g,useDuration:f};return h}(Sn,En,Nn,Ln,w,.68),Dn=P(f,gn,fn,hn,Ln),On=function(n,t,e,r,o,i,s){function c(o){const c=o.distance,u=o.index!==t.get();i.add(c),c&&(r.duration()?n.start():(n.update(),n.render(1),n.update())),u&&(e.set(t.get()),t.set(o.index),s.emit("select"))}return{distance:function(n,t){c(o.byDistance(n,t))},index:function(n,e){const r=t.clone().set(n);c(o.byIndex(r.get(),e))}}}(bn,xn,yn,kn,Dn,Ln,s),jn=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(hn),Cn=E(),In=H(t,e,s,B),{slideRegistry:An}=function(n,t,e,r,o,i){const{groupSlides:s}=o,{min:c,max:u}=r;return{slideRegistry:function(){const r=s(i),o=!n||"keepSnaps"===t;return 1===e.length?[i]:o?r:r.slice(c,u).map((n,t,e)=>{const r=!t,o=v(e,t);return r?b(x(e[0])+1):o?b(y(i)-x(e)[0]+1,x(e)[0]):n})}()}}(en,$,gn,mn,an,vn),Pn=z(n,e,An,On,kn,Cn,s,Q),zn={ownerDocument:r,ownerWindow:o,eventHandler:s,containerRect:K,slideRects:Y,animation:bn,axis:Z,dragHandler:O(Z,n,r,o,Ln,j(Z,o),Sn,bn,On,kn,Dn,xn,s,nn,S,N,q,.68,J),eventStore:Cn,percentOfView:nn,index:xn,indexPrevious:yn,limit:hn,location:Sn,offsetLocation:En,previousLocation:Nn,options:i,resizeHandler:C(t,s,o,e,Z,U,X),scrollBody:kn,scrollBounds:I(hn,En,Ln,kn,nn),scrollLooper:A(fn,hn,En,[Sn,En,Nn,Ln]),scrollProgress:jn,scrollSnapList:gn.map(jn.get),scrollSnaps:gn,scrollTarget:Dn,scrollTo:On,slideLooper:T(Z,_,fn,on,sn,ln,gn,En,e),slideFocus:Pn,slidesHandler:R(t,s,W),slidesInView:In,slideIndexes:vn,slideRegistry:An,slidesToScroll:an,target:Ln,translate:F(Z,t)};return zn}const G={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function q(n){function t(n,t){return S(n,t||{})}return{mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=w(r).filter(t=>n.matchMedia(t).matches).map(n=>r[n]).reduce((n,e)=>t(n,e),{});return t(e,o)},optionsMediaQueries:function(t){return t.map(n=>w(n.breakpoints||{})).reduce((n,t)=>n.concat(t),[]).map(n.matchMedia)}}}function $(n,t,e){const r=n.ownerDocument,o=r.defaultView,i=q(o),s=function(n){let t=[];return{init:function(e,r){return t=r.filter(({options:t})=>!1!==n.optionsAtMedia(t).active),t.forEach(t=>t.init(e,n)),r.reduce((n,t)=>Object.assign(n,{[t.name]:t}),{})},destroy:function(){t=t.filter(n=>n.destroy())}}}(i),c=E(),u=function(){let n,t={};function e(n){return t[n]||[]}const r={init:function(t){n=t},emit:function(t){return e(t).forEach(e=>e(n,t)),r},off:function(n,o){return t[n]=e(n).filter(n=>n!==o),r},on:function(n,o){return t[n]=e(n).concat([o]),r},clear:function(){t={}}};return r}(),{mergeOptions:a,optionsAtMedia:d,optionsMediaQueries:f}=i,{on:p,off:m,emit:g}=u,h=O;let x,y,v,b,w=!1,S=a(G,$.globalOptions),N=a(S),L=[];function k(t){const e=B(n,v,b,r,o,t,u);if(t.loop&&!e.slideLooper.canLoop()){return k(Object.assign({},t,{loop:!1}))}return e}function D(t,e){w||(S=a(S,t),N=d(S),L=e||L,function(){const{container:t,slides:e}=N,r=l(t)?n.querySelector(t):t;v=r||n.children[0];const o=l(e)?v.querySelectorAll(e):e;b=[].slice.call(o||v.children)}(),x=k(N),f([S,...L.map(({options:n})=>n)]).forEach(n=>c.add(n,"change",O)),N.active&&(x.translate.to(x.location.get()),x.animation.init(),x.slidesInView.init(),x.slideFocus.init(A),x.eventHandler.init(A),x.resizeHandler.init(A),x.slidesHandler.init(A),x.options.loop&&x.slideLooper.loop(),v.offsetParent&&b.length&&x.dragHandler.init(A),y=s.init(A,L)))}function O(n,t){const e=I();j(),D(a({startIndex:e},n),t),u.emit("reInit")}function j(){x.dragHandler.destroy(),x.eventStore.clear(),x.translate.clear(),x.slideLooper.clear(),x.resizeHandler.destroy(),x.slidesHandler.destroy(),x.slidesInView.destroy(),x.animation.destroy(),s.destroy(),c.clear()}function C(n,t,e){N.active&&!w&&(x.scrollBody.useBaseFriction().useDuration(!0===t?0:N.duration),x.scrollTo.index(n,e||0))}function I(){return x.index.get()}const A={canScrollNext:function(){return x.index.add(1).get()!==I()},canScrollPrev:function(){return x.index.add(-1).get()!==I()},containerNode:function(){return v},internalEngine:function(){return x},destroy:function(){w||(w=!0,c.clear(),j(),u.emit("destroy"),u.clear())},off:m,on:p,emit:g,plugins:function(){return y},previousScrollSnap:function(){return x.indexPrevious.get()},reInit:h,rootNode:function(){return n},scrollNext:function(n){C(x.index.add(1).get(),n,-1)},scrollPrev:function(n){C(x.index.add(-1).get(),n,1)},scrollProgress:function(){return x.scrollProgress.get(x.offsetLocation.get())},scrollSnapList:function(){return x.scrollSnapList},scrollTo:C,selectedScrollSnap:I,slideNodes:function(){return b},slidesInView:function(){return x.slidesInView.get()},slidesNotInView:function(){return x.slidesInView.get(!1)}};return D(t,e),setTimeout(()=>u.emit("init"),0),A}function U(n={},e=[]){const r=t.useRef(n),o=t.useRef(e),[i,s]=t.useState(),[a,l]=t.useState(),d=t.useCallback(()=>{i&&i.reInit(r.current,o.current)},[i]);return t.useEffect(()=>{c(r.current,n)||(r.current=n,d())},[n,d]),t.useEffect(()=>{(function(n,t){if(n.length!==t.length)return!1;const e=u(n),r=u(t);return e.every((n,t)=>c(n,r[t]))})(o.current,e)||(o.current=e,d())},[e,d]),t.useEffect(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&a){$.globalOptions=U.globalOptions;const n=$(a,r.current,o.current);return s(n),()=>n.destroy()}s(void 0)},[a,s]),[l,i]}$.globalOptions=void 0,U.globalOptions=void 0;const W=t.createContext(null);function J(){const n=t.useContext(W);if(!n)throw new Error("useCarousel must be used within a <Carousel />");return n}const Q=t.forwardRef(({orientation:r="horizontal",opts:o,setApi:i,plugins:s,className:c,children:u,...a},l)=>{const[d,f]=U({...o,axis:"horizontal"===r?"x":"y"},s),[p,m]=t.useState(!1),[g,h]=t.useState(!1),x=t.useCallback(n=>{n&&(m(n.canScrollPrev()),h(n.canScrollNext()))},[]),y=t.useCallback(()=>{null==f||f.scrollPrev()},[f]),v=t.useCallback(()=>{null==f||f.scrollNext()},[f]),b=t.useCallback(n=>{"ArrowLeft"===n.key?(n.preventDefault(),y()):"ArrowRight"===n.key&&(n.preventDefault(),v())},[y,v]);return t.useEffect(()=>{f&&i&&i(f)},[f,i]),t.useEffect(()=>{if(f)return x(f),f.on("reInit",x),f.on("select",x),()=>{null==f||f.off("select",x)}},[f,x]),n.jsx(W.Provider,{value:{carouselRef:d,api:f,opts:o,orientation:r||("y"===(null==o?void 0:o.axis)?"vertical":"horizontal"),scrollPrev:y,scrollNext:v,canScrollPrev:p,canScrollNext:g},children:n.jsx("div",{ref:l,onKeyDownCapture:b,className:e("relative",c),role:"region","aria-roledescription":"carousel",...a,children:u})})});Q.displayName="Carousel";const X=t.forwardRef(({className:t,...r},o)=>{const{carouselRef:i,orientation:s}=J();return n.jsx("div",{ref:i,className:"overflow-hidden",children:n.jsx("div",{ref:o,className:e("flex","horizontal"===s?"-ml-4":"-mt-4 flex-col",t),...r})})});X.displayName="CarouselContent";const K=t.forwardRef(({className:t,...r},o)=>{const{orientation:i}=J();return n.jsx("div",{ref:o,role:"group","aria-roledescription":"slide",className:e("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",t),...r})});K.displayName="CarouselItem";const Y=t.forwardRef(({className:t,variant:i="outline",size:s="icon",...c},u)=>{const{orientation:a,scrollPrev:l,canScrollPrev:d}=J();return n.jsxs(r,{ref:u,variant:i,size:s,className:e("absolute h-8 w-8 rounded-full","horizontal"===a?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!d,onClick:l,...c,children:[n.jsx(o,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Previous slide"})]})});Y.displayName="CarouselPrevious";const Z=t.forwardRef(({className:t,variant:o="outline",size:s="icon",...c},u)=>{const{orientation:a,scrollNext:l,canScrollNext:d}=J();return n.jsxs(r,{ref:u,variant:o,size:s,className:e("absolute h-8 w-8 rounded-full","horizontal"===a?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!d,onClick:l,...c,children:[n.jsx(i,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Next slide"})]})});Z.displayName="CarouselNext";export{Q as C,X as a,K as b,Y as c,Z as d};