import{t as e}from"./rolldown-runtime.CMAw1HyY.mjs";import{B as t,F as n,M as r,N as i,O as a,R as o,S as s,T as c,k as l,l as u,s as d,u as f,v as p,w as m}from"./react.D3LpXLeJ.mjs";import{B as h,C as g,G as _,R as v,f as y,t as b}from"./motion.DmxynPzX.mjs";import{S as x,Y as ee,a as S,k as te}from"./framer.B9eBDazG.mjs";import{a as ne,i as re,n as C,r as w,t as T}from"./index.es.BBDHDHx3.mjs";import{i as ie,r as E}from"./OIjZRBmWDcIE2B6qgG1j.C7ytnr-7.mjs";import{t as ae}from"./default-utils.js@_0.45.BxBfodVv.mjs";function oe([e,t]){return e+(100-e)*(t/100)*.5}function se(){let[e,r]=n(!1);return s(()=>{p(()=>r(t.matchMedia(`(pointer:fine)`).matches))},[]),e}function D(e,t,{edgeOpacity:n,moreItems:r,buttonRef:i},a){r.current&&e===t?(r.current=!1,y(n,1,a),i.current.setAttribute(`disabled`,``)):!r.current&&e!==t&&(r.current=!0,y(n,0,a),i.current.removeAttribute(`disabled`))}function O(e,t){let n=a(e),r=v(n.current?0:1),i=_(r,[0,1],[t||0,1]),o=_(r,e=>1-e),s=a(null),c=_(o,e=>e>.2?`auto`:`none`),l=_(c,e=>e===`auto`?`pointer`:`default`);return{moreItems:n,fadeOpacity:i,edgeOpacity:r,buttonStyle:{...P,opacity:o,pointerEvents:c,cursor:l},buttonRef:s}}function ce({element:e}){e.setAttribute(`aria-hidden`,!1)}function le(e,t,n,r,a,o,s){i(()=>{if(!e.current)return;let i=w(e=>{n.current=e[t],e[t].current===a.current&&(a.current=void 0),r(e[t].current),o()},{container:e.current,axis:t}),c=C(e.current,()=>{s(),o()});return()=>{i(),c()}},[o,s])}function k({slots:e,gap:t,axis:o,align:s,sizingObject:d,fadeObject:m,arrowObject:y,snapObject:b,progressObject:ee,ariaLabel:S,borderRadius:te,effectsObject:ne,...C}){let w=e.filter(Boolean),T=c.count(w),E=x.current()===x.canvas,ae=ie(C),k=o?`x`:`y`,{fadeContent:A,fadeWidth:j,fadeInset:M,fadeTransition:N,fadeAlpha:I}=m,{snap:L,snapEdge:R,fluid:_e}=b,{widthType:ve,widthInset:ye,widthColumns:be,heightType:xe,heightInset:Se,heightRows:Ce}=d,{showScrollbar:we,showProgressDots:Te,dotSize:Ee,dotsInset:De,dotsRadius:Oe,dotsPadding:ke,dotsGap:Ae,dotsFill:je,dotsBackground:Me,dotsActiveOpacity:Ne,dotsOpacity:Pe,dotsBlur:Fe}=ee,{showMouseControls:z,arrowSize:B,arrowRadius:Ie,arrowFill:Le,leftArrow:Re,rightArrow:ze,arrowPadding:Be}=y,V=a(void 0),H=a(void 0),U=v(0),Ve=e=>{U.set(H.current===void 0?e:H.current)};se();let W=O(!1,I),G=O(!0,I),K=v(M*.5),He=_(K,e=>100-e),Ue=v(j),We=_([K,Ue],oe),Ge=_(We,e=>100-e),Ke=v(o?`right`:`bottom`),qe=_([Ke,W.fadeOpacity,K,We,G.fadeOpacity,He,Ge],e=>`linear-gradient(to ${e[0]}, rgb(0, 0, 0, ${e[1]}) ${e[2]}%, rgb(0, 0, 0, 1) ${e[3]}%, rgba(0, 0, 0, 1) ${e[6]}%, rgb(0, 0, 0, ${e[4]}) ${e[5]}%)`),q=a(null),[J,Je]=n(E?4:1),Y={scrollSnapAlign:R,flexShrink:0},X={};s===`stretch`&&(o?(X.height=`100%`,Y.height=`auto`):(X.width=`100%`,Y.width=`auto`)),_e||(Y.scrollSnapStop=`always`),ve===`stretch`?(Y.width=`calc(100% - ${ye||0}px)`,X.width=`100%`):ve===`columns`&&(Y.width=`calc(${100/be}% - ${t}px + ${t/be}px)`,X.width=`100%`),xe===`stretch`?(Y.height=`calc(100% - ${Se||0}px)`,X.height=`100%`):xe===`rows`&&(Y.height=`calc(${100/Ce}% - ${t}px + ${t/Ce}px)`,X.height=`100%`);let Ye=E?`hidden`:`auto`,Xe={...pe,padding:ae},Ze={...me,gap:t,alignItems:s,flexDirection:o?`row`:`column`,overflowX:o?Ye:`hidden`,overflowY:o?`hidden`:Ye,scrollSnapType:L?`${k} mandatory`:void 0,WebkitOverflowScrolling:`touch`,WebkitMaskImage:A?qe:void 0,maskImage:A?qe:void 0,borderRadius:te},Qe={"aria-roledescription":`carousel`};S&&(Qe[`aria-title`]=S);let Z={};if(s===`stretch`&&(Z[`aria-role`]=`group`,Z[`aria-roledescription`]=`slide`),!E){let e=a([]);le(q,k,V,Ve,H,r(()=>{if(!V.current)return;let{targetLength:t,containerLength:n,scrollLength:r}=V.current,i=U.get();if(!t&&!n)return;if(t>n){D(i,0,W,N),D(i,r,G,N);for(let t=0;ti+n?r.setAttribute(`aria-hidden`,!0):r.setAttribute(`aria-hidden`,!1)}}else D(0,0,W,N),D(1,1,G,N),e.current.forEach(ce);let a=Math.ceil(t/n);isNaN(a)||(a/T>.65&&(a=T),a!==J&&Je(a))},[J]),r(()=>{q.current&&(e.current=Array.from(q.current.children).map(e=>o?{element:e,start:e.offsetLeft,end:e.offsetLeft+e.offsetWidth}:{element:e,start:e.offsetTop,end:e.offsetTop+e.offsetHeight}))},[]))}E&&(i(()=>{Ue.set(j)},[j]),i(()=>{K.set(M*.5)},[M]),i(()=>{Ke.set(o?`right`:`bottom`)},[o]));let $e=h(),et=e=>{H.current=e;let t=o?{left:e}:{top:e};q.current.scrollTo({...t,behavior:$e?`auto`:`smooth`})},tt=(e,t)=>{if(!V.current)return;let{scrollLength:n}=V.current,r=n/(J-1);et(e*r+t*r)},nt=e=>()=>{if(!V.current)return;let{containerLength:t,scrollLength:n}=V.current,r=U.get(),i=n/J,a=re(0,J-1,Math.floor(r/i)),o=0;L&&(R===`start`||R===`end`)&&e>=1&&(o=.4),tt(a+e,o)};if(T===0)return u(de,{});let Q=[],$={};if(J>1&&Te&&!we){for(let e=0;ep(()=>tt(e)),currentScroll:U,scrollInfo:V,total:J,index:e,gap:Ae,padding:ke,axis:o}))}Fe&&($.backdropFilter=$.WebkitBackdropFilter=`blur(${Fe}px)`)}return f(`section`,{style:Xe,...Qe,children:[u(g.ul,{ref:q,style:Ze,className:`framer--carousel`,"data-show-scrollbar":we,"aria-atomic":`false`,"aria-live":`polite`,onWheel:()=>H.current=void 0,children:c.map(w,(e,t)=>u(`li`,{style:Y,...Z,"aria-label":`${t+1} of ${T}`,children:l(e,{...e.props,style:{...e.props?.style,...X}})}))}),f(`fieldset`,{style:{...he,padding:Be,display:`flex`,flexDirection:o?`row`:`column`},"aria-label":`Carousel pagination controls`,className:`framer--carousel-controls`,"data-show-mouse-controls":z,children:[u(g.button,{ref:W.buttonRef,type:`button`,style:{...W.buttonStyle,backgroundColor:Le,width:B,height:B,borderRadius:Ie,rotate:o?0:90,display:z?`block`:`none`},onClick:nt(-1),"aria-label":`Previous`,whileTap:{scale:.9},transition:{duration:.05},children:u(`img`,{decoding:`async`,alt:``,width:B,height:B,src:Re||`assets/images/back-arrow.svg`})}),u(g.button,{ref:G.buttonRef,type:`button`,style:{...G.buttonStyle,backgroundColor:Le,width:B,height:B,borderRadius:Ie,rotate:o?0:90,display:z?`block`:`none`},onClick:nt(1),"aria-label":`Next`,whileTap:{scale:.9},transition:{duration:.05},children:u(`img`,{decoding:`async`,alt:``,width:B,height:B,src:ze||`assets/images/next-arrow.svg`})}),Q.length>1?u(`div`,{style:{...ge,left:o?`50%`:De,top:o?`unset`:`50%`,transform:o?`translateX(-50%)`:`translateY(-50%)`,flexDirection:o?`row`:`column`,bottom:o?De:`unset`,borderRadius:Oe,backgroundColor:Me,...$},children:Q}):null]}),u(fe,{})]})}function ue({currentScroll:e,scrollInfo:t,isSelected:n,selectedOpacity:r,opacity:i,total:a,index:o,dotStyle:s,buttonStyle:c,gap:l,padding:d,axis:f,...p}){let m=_(e,e=>{if(!t.current?.scrollLength)return o===0?r:i;let n=t.current?.scrollLength/a,s=n*o,c=s+n;return e>=s&&(o0?h:d,y=!f&&o!==a-1?h:d,b=f&&o!==a-1?h:d,x=f&&o>0?h:d;return u(`button`,{"aria-label":`Scroll to page ${o+1}`,type:`button`,...p,style:{...c,padding:`${v}px ${b}px ${y}px ${x}px`},children:u(g.div,{style:{...s,opacity:m}})})}function de(){return f(`section`,{style:A,children:[u(`div`,{style:j,children:`✨`}),u(`p`,{style:M,children:`Connect to Content`}),u(`p`,{style:N,children:`Add layers or components to swipe between.`})]})}function fe(){return u(`div`,{dangerouslySetInnerHTML:{__html:``}})}var A,j,M,N,pe,me,P,he,ge,F,I=e((()=>{o(),d(),m(),ee(),T(),ne(),b(),ae(),k.defaultProps={gap:10,padding:10,progressObject:{showScrollbar:!1,showProgressDots:!1},sizingObject:{widthType:`auto`,widthOffset:0,widthColumns:2,heightType:`auto`,heightOffset:0,heightRows:2},borderRadius:0},te(k,{slots:{type:S.Array,title:`Children`,control:{type:S.ComponentInstance}},axis:{type:S.Enum,title:`Direction`,options:[!0,!1],optionIcons:[`direction-horizontal`,`direction-vertical`],displaySegmentedControl:!0},align:{type:S.Enum,title:`Align`,options:[`flex-start`,`center`,`flex-end`],optionIcons:{axis:{true:[`align-top`,`align-middle`,`align-bottom`],false:[`align-left`,`align-center`,`align-right`]}},defaultValue:`center`,displaySegmentedControl:!0},gap:{type:S.Number,title:`Gap`},...E,sizingObject:{type:S.Object,title:`Sizing`,controls:{widthType:{type:S.Enum,title:`Width`,options:[`auto`,`stretch`,`columns`],optionTitles:[`Auto`,`Stretch`,`Columns`],defaultValue:`auto`},widthInset:{type:S.Number,title:`Inset`,min:0,max:500,defaultValue:0,hidden:e=>e.widthType!==`stretch`},widthColumns:{type:S.Number,title:`Columns`,min:1,max:10,defaultValue:2,displayStepper:!0,hidden:e=>e.widthType!==`columns`},heightType:{type:S.Enum,title:`Height`,options:[`auto`,`stretch`,`rows`],optionTitles:[`Auto`,`Stretch`,`Rows`],defaultValue:`auto`},heightInset:{type:S.Number,title:`Inset`,min:0,max:500,defaultValue:0,hidden:e=>e.heightType!==`stretch`},heightRows:{type:S.Number,title:`Rows`,min:1,max:10,defaultValue:2,displayStepper:!0,hidden:e=>e.heightType!==`rows`}}},snapObject:{type:S.Object,title:`Snapping`,controls:{snap:{type:S.Boolean,title:`Enable`},snapEdge:{type:S.Enum,title:`Edge`,options:[`start`,`center`,`end`],optionTitles:[`Left`,`Center`,`Right`],defaultValue:`center`,hidden:e=>!e.snap},fluid:{type:S.Boolean,title:`Fluid`,defaultValue:!1,hidden:e=>!e.snap}}},fadeObject:{type:S.Object,title:`Fading`,controls:{fadeContent:{type:S.Boolean,title:`Enable`,defaultValue:!1},fadeWidth:{type:S.Number,title:`Width`,defaultValue:25,min:0,max:100,unit:`%`,hidden:e=>!e.fadeContent},fadeInset:{type:S.Number,title:`Inset`,defaultValue:0,min:0,max:100,unit:`%`,hidden:e=>!e.fadeContent},fadeAlpha:{type:S.Number,title:`Opacity`,hidden:e=>!e.fadeContent,min:0,max:1,step:.05,defaultValue:0},fadeTransition:{type:S.Transition,title:`Transition`,hidden:e=>!e.fadeContent}}},progressObject:{type:S.Object,title:`Progress`,controls:{showScrollbar:{type:S.Boolean,title:`Scroll Bar`,defaultValue:!1},showProgressDots:{type:S.Boolean,title:`Dots`,defaultValue:!1,hidden:e=>e.showScrollbar},dotSize:{type:S.Number,title:`Size`,min:1,max:100,defaultValue:10,displayStepper:!0,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsInset:{type:S.Number,title:`Inset`,min:0,max:100,defaultValue:10,displayStepper:!0,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsGap:{type:S.Number,title:`Gap`,min:0,max:100,defaultValue:10,displayStepper:!0,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsPadding:{type:S.Number,title:`Padding`,min:0,max:100,defaultValue:10,displayStepper:!0,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsFill:{type:S.Color,title:`Fill`,defaultValue:`#fff`,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsBackground:{type:S.Color,title:`Backdrop`,defaultValue:`rgba(0,0,0,0.2)`,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsRadius:{type:S.Number,title:`Radius`,min:0,max:200,defaultValue:50,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsOpacity:{type:S.Number,title:`Opacity`,min:0,max:1,defaultValue:.5,step:.1,displayStepper:!0,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsActiveOpacity:{type:S.Number,title:`Current`,min:0,max:1,defaultValue:1,step:.1,displayStepper:!0,hidden:e=>!e.showProgressDots||e.showScrollbar},dotsBlur:{type:S.Number,title:`Blur`,min:0,max:50,defaultValue:4,step:1,hidden:e=>!e.showProgressDots||e.showScrollbar}}},arrowObject:{type:S.Object,title:`Arrows`,controls:{showMouseControls:{type:S.Boolean,title:`Show`,defaultValue:!0},arrowFill:{type:S.Color,title:`Fill`,defaultValue:`rgba(0,0,0,0.2)`,hidden:e=>!e.showMouseControls},leftArrow:{type:S.Image,title:`Previous`,hidden:e=>!e.showMouseControls},rightArrow:{type:S.Image,title:`Next`,hidden:e=>!e.showMouseControls},arrowSize:{type:S.Number,title:`Size`,min:0,max:200,displayStepper:!0,defaultValue:40,hidden:e=>!e.showMouseControls},arrowRadius:{type:S.Number,title:`Radius`,min:0,max:500,defaultValue:40,hidden:e=>!e.showMouseControls},arrowPadding:{type:S.Number,title:`Inset`,min:0,max:100,defaultValue:20,displayStepper:!0,hidden:e=>!e.showMouseControls}}},ariaLabel:{type:S.String,title:`Aria Label`,placeholder:`Movies...`},borderRadius:{type:S.Number,title:`Radius`,min:0,max:500,displayStepper:!0,defaultValue:0}}),A={display:`flex`,width:`100%`,height:`100%`,placeContent:`center`,placeItems:`center`,flexDirection:`column`,color:`#96F`,background:`rgba(136, 85, 255, 0.1)`,fontSize:11,overflow:`hidden`,padding:`20px 20px 30px 20px`},j={fontSize:32,marginBottom:10},M={margin:0,marginBottom:10,fontWeight:600,textAlign:`center`},N={margin:0,opacity:.7,maxWidth:130,lineHeight:1.5,textAlign:`center`},pe={display:`flex`,overflow:`hidden`,width:`100%`,height:`100%`,position:`relative`},me={padding:0,margin:0,listStyle:`none`,position:`relative`,display:`flex`,flex:`1 1 100%`,width:`100%`,height:`100%`},P={border:`none`,display:`flex`,placeContent:`center`,placeItems:`center`,overflow:`hidden`,background:`transparent`,cursor:`pointer`,margin:0,padding:0},he={display:`flex`,justifyContent:`space-between`,alignItems:`center`,position:`absolute`,top:0,left:0,right:0,bottom:0,pointerEvents:`none`,border:0,padding:0,margin:0},ge={display:`flex`,placeContent:`center`,placeItems:`center`,overflow:`hidden`,position:`absolute`,pointerEvents:`auto`},F={borderRadius:`50%`,background:`white`,cursor:`pointer`,border:`none`,placeContent:`center`,placeItems:`center`,padding:0}}));export{I as n,k as t}; //# sourceMappingURL=Carousel.BZPUde6i.mjs.map