import{t as e}from"./rolldown-runtime.BB3S47xo.mjs";import{B as t,I as n,M as r,N as i,P as a,c as o,h as s,k as c,o as l,w as u,z as d}from"./react.Eit2hu2Y.mjs";import{t as f,x as p,z as m}from"./motion.Btzp5pz3.mjs";import{M as h,Z as g,a as _,gt as v,w as y}from"./framer.BEePfEDD.mjs";var b,x,S,C=e((()=>{g(),b={position:`relative`,width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},x={...b,borderRadius:6,background:`rgba(136, 85, 255, 0.3)`,color:`#85F`,border:`1px dashed #85F`,flexDirection:`column`},S={onClick:{type:_.EventHandler},onMouseEnter:{type:_.EventHandler},onMouseLeave:{type:_.EventHandler}},_.Number,_.Boolean,_.String,_.Enum}));function ee(e,t){return w(!0,e,t)}function te(e,t){return w(!1,e,t)}function w(e,t,n=!0){let r=v();a(()=>{n&&r===e&&t()},[r])}var T=e((()=>{g(),u()})),E=e((()=>{u()})),D=e((()=>{g()})),O=e((()=>{g()})),ne=e((()=>{u()})),k=e((()=>{g()})),A,j,M=e((()=>{d(),u(),A=()=>{if(t!==void 0){let e=t.userAgent.toLowerCase();return(e.indexOf(`safari`)>-1||e.indexOf(`framermobile`)>-1||e.indexOf(`framerx`)>-1)&&e.indexOf(`chrome`)<0}else return!1},j=()=>r(()=>A(),[])})),N=e((()=>{u(),O()})),P=e((()=>{u(),g(),O(),E()})),F=e((()=>{g(),u(),C()}));function re(){return r(()=>y.current(),[])}function I(){return r(()=>y.current()===y.canvas,[])}var L=e((()=>{u(),g()})),R=e((()=>{u()}));function z(e){let{borderRadius:t,isMixedBorderRadius:n,topLeftRadius:i,topRightRadius:a,bottomRightRadius:o,bottomLeftRadius:s}=e;return r(()=>n?`${i}px ${a}px ${o}px ${s}px`:`${t}px`,[t,n,i,a,o,s])}var B,V=e((()=>{u(),g(),B={borderRadius:{title:`Radius`,type:_.FusedNumber,toggleKey:`isMixedBorderRadius`,toggleTitles:[`Radius`,`Radius per corner`],valueKeys:[`topLeftRadius`,`topRightRadius`,`bottomRightRadius`,`bottomLeftRadius`],valueLabels:[`TL`,`TR`,`BR`,`BL`],min:0}},_.FusedNumber})),H=e((()=>{C(),T(),E(),D(),O(),ne(),k(),M(),N(),P(),F(),L(),R(),V()}));function U(e){let{width:t,height:n,topLeft:r,topRight:i,bottomRight:a,bottomLeft:o,id:s,children:c,...l}=e;return l}function W(e){return o(X,{...U(e)})}function ie(e){let t=v(),n=c(!1),r=c(!1),a=i(t=>{if(!e.current)return;let n=(t===1?.999:t)*e.current.duration,r=Math.abs(e.current.currentTime-n)<.1;e.current.duration>0&&!r&&(e.current.currentTime=n)},[]);return{play:i(()=>{let i=e.current;i&&(i.preload=`auto`,!(i.currentTime>0&&i.onplaying&&!i.paused&&!i.ended&&i.readyState>=i.HAVE_CURRENT_DATA)&&i&&!n.current&&t&&(n.current=!0,r.current=!0,i.play().catch(e=>{}).finally(()=>n.current=!1)))},[]),pause:i(()=>{!e.current||n.current||(e.current.pause(),r.current=!1)},[]),setProgress:a,isPlaying:r}}function ae({playingProp:e,muted:t,loop:r,playsinline:i,controls:a}){let[o]=n(()=>e),[s,c]=n(!1);e!==o&&!s&&c(!0);let l=o&&t&&r&&i&&!a&&!s,u;return u=l?`on-viewport`:o?`on-mount`:`no-autoplay`,u}function G(e){return e.charAt(0).toUpperCase()+e.slice(1)}function K(e){return(e.match(/[A-Z]{2,}|[A-Z][a-z]+|[a-z]+|[A-Z]|\d+/gu)||[]).map(G).join(` `)}var q,J,Y,X,Z,Q=e((()=>{l(),g(),f(),H(),u(),(function(e){e.Fill=`fill`,e.Contain=`contain`,e.Cover=`cover`,e.None=`none`,e.ScaleDown=`scale-down`})(q||={}),(function(e){e.Video=`Upload`,e.Url=`URL`})(J||={}),Y=(location.origin+"/assets/framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4"),X=s(function(e){let{srcType:t=`URL`,srcUrl:n,srcFile:i=``,posterEnabled:s=!1,controls:l=!1,playing:u=!0,loop:d=!0,muted:f=!0,playsinline:h=!0,restartOnEnter:g=!1,objectFit:_=`cover`,backgroundColor:v=`rgba(0,0,0,0)`,radius:b=0,volume:x=25,startTime:S=0,poster:C,playing:w,progress:T,onSeeked:E,onPause:D,onPlay:O,onEnd:ne,onClick:k,onMouseEnter:A,onMouseLeave:M,onMouseDown:N,onMouseUp:P}=e,F=c(),L=j(),R=c(null),B=c(null),V=I(),H=re(),U=V||H===y.export,W=z(e),G=U?`no-autoplay`:ae({playingProp:w,muted:f,loop:d,playsinline:h,controls:l}),K=U?!0:m(F),q=U?!1:m(F,{margin:`10%`,once:!0}),J=S===100?99.9:S,{play:X,pause:Z,setProgress:Q,isPlaying:$}=ie(F);a(()=>{U||G!==`on-viewport`&&(w?X():Z())},[G,w]),a(()=>{U||(K&&w&&G!==`no-autoplay`&&X(),G===`on-viewport`&&Z())},[G,K,w]),a(()=>{!V||C||s||J||!F.current||(F.current.currentTime=.01)},[s,C,J]);let oe=c(!1);a(()=>{if(!oe.current){oe.current=!0;return}Q(((p(T)?T.get():(T??0)*.01)??0)||(J??0)/100)},[J,i,n,T]),a(()=>{if(p(T))return T.on(`change`,e=>Q(e))},[T]),ee(()=>{R.current!==null&&F.current&&(!B&&d||!R.current)&&X()}),te(()=>{F.current&&(B.current=F.current.ended,R.current=F.current.paused,Z())});let se=r(()=>{if(t===`URL`)return n+``;if(t===`Upload`)return i+``},[t,i,n,J]);return a(()=>{L&&F.current&&G===`on-mount`&&setTimeout(()=>X(),50)},[]),a(()=>{F.current&&!f&&(F.current.volume=(x??0)/100)},[x]),o(`video`,{onClick:k,onMouseEnter:A,onMouseLeave:M,onMouseDown:N,onMouseUp:P,src:se,loop:d,ref:F,onSeeked:e=>E?.(e),onPause:e=>D?.(e),onPlay:e=>O?.(e),onEnded:e=>ne?.(e),autoPlay:$.current||G===`on-mount`||w&&G===`on-viewport`&&K,preload:$.current?`auto`:U&&!C?`metadata`:G!==`on-mount`&&!q?`none`:`metadata`,poster:s&&!i&&n===Y?(location.origin+"/assets/framerusercontent.com/images/5ILRvlYXf72kHSVHqpa3snGzjU.jpg"):s&&C?C:void 0,onLoadedData:()=>{let e=F.current;e&&(e.currentTime<.3&&J>0&&Q((J??0)*.01),($.current||G===`on-mount`||w&&G===`on-viewport`&&K)&&X())},controls:l,muted:U?!0:f,playsInline:h,style:{cursor:k?`pointer`:`auto`,width:`100%`,height:`100%`,borderRadius:W,display:`block`,objectFit:_,backgroundColor:v,objectPosition:`50% 50%`}})}),W.displayName=`Video`,Z=[`cover`,`fill`,`contain`,`scale-down`,`none`],h(W,{srcType:{type:_.Enum,displaySegmentedControl:!0,title:`Source`,options:[`URL`,`Upload`]},srcUrl:{type:_.String,title:`URL`,defaultValue:(location.origin+"/assets/framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4"),hidden(e){return e.srcType===`Upload`}},srcFile:{type:_.File,title:`File`,allowedFileTypes:[`mp4`,`webm`],hidden(e){return e.srcType===`URL`}},playing:{type:_.Boolean,title:`Playing`,enabledTitle:`Yes`,disabledTitle:`No`},...B,posterEnabled:{type:_.Boolean,title:`Poster`,enabledTitle:`Yes`,disabledTitle:`No`},poster:{type:_.Image,title:`Image`,hidden:({posterEnabled:e})=>!e,description:`We recommend adding a poster. [Learn more](https://www.framer.com/help/articles/how-are-videos-optimized-in-framer/).`},backgroundColor:{type:_.Color,title:`Background`,defaultValue:`rgba(0,0,0,0)`},startTime:{title:`Start Time`,type:_.Number,min:0,max:100,step:.1,unit:`%`},loop:{type:_.Boolean,title:`Loop`,enabledTitle:`Yes`,disabledTitle:`No`},objectFit:{type:_.Enum,title:`Fit`,options:Z,optionTitles:Z.map(K)},controls:{type:_.Boolean,title:`Controls`,enabledTitle:`Show`,disabledTitle:`Hide`,defaultValue:!1},muted:{type:_.Boolean,title:`Muted`,enabledTitle:`Yes`,disabledTitle:`No`},volume:{type:_.Number,max:100,min:0,unit:`%`,hidden:({muted:e})=>e,defaultValue:25},onEnd:{type:_.EventHandler},onSeeked:{type:_.EventHandler},onPause:{type:_.EventHandler},onPlay:{type:_.EventHandler},...S})}));export{z as a,S as c,B as i,x as l,Q as n,I as o,H as r,b as s,W as t}; //# sourceMappingURL=Video.B6dQ05wg.mjs.map