{"version":3,"file":"ProgressBar.CZJNitAM.mjs","names":["useState","useRef","useState","useRef"],"sources":["https:/framerusercontent.com/modules/6ffgsaDzsjdxRp9dCkQD/iwpJh5WdbOq7ENFllKSh/VideoFrameShared.js","https:/framerusercontent.com/modules/b5kSp4Xnk0S4rHvhxP7R/uM8sP7F1UEi1et6asuMP/VideoButton.js","https:/framerusercontent.com/modules/hIYj3jkSfLqJkUkKRSNP/2IY6PdHjw4RzsbhHSgEs/ProgressBar.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{ControlType}from\"framer\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{motion}from\"framer-motion\";export const VIDEO_ID_ATTRIBUTE=\"custom-video-id\";export const useVideoStore=createStore({});export const createId=()=>\"a\"+String(Math.floor(Math.random()*999999999));export function getVideoId(element){while(element){let id=element.getAttribute(VIDEO_ID_ATTRIBUTE);if(id){return id;}element=element.parentElement;}return null;}export function Icon({image,color,size,style={},defaultImage}){let colorValue=color||((image===null||image===void 0?void 0:image.src)?undefined:\"#999\");return /*#__PURE__*/_jsx(\"div\",{\"aria-label\":image===null||image===void 0?void 0:image.alt,style:{width:size,height:size,minWidth:size,minHeight:size,pointerEvents:\"none\",backgroundColor:colorValue,backgroundImage:colorValue?\"none\":`url('${image===null||image===void 0?void 0:image.src}')`,maskImage:(image===null||image===void 0?void 0:image.src)?`url('${image===null||image===void 0?void 0:image.src}')`:defaultImage,backgroundSize:\"contain\",backgroundPosition:\"center\",maskSize:\"contain\",maskPosition:\"center\",...style}});}Icon.displayName=\"VideoFrame/Icon\";export function borderProp({defaultValue=false}={}){return{type:ControlType.Object,optional:true,defaultValue:defaultValue?{color:\"#999\"}:undefined,controls:{color:{type:ControlType.Color,defaultValue:\"#999\"},width:{type:ControlType.Padding,defaultValue:\"1px\"},style:{type:ControlType.Enum,defaultValue:\"solid\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"]}}};}export function Border({width,style,color,borderRadius=\"inherit\",transition=null,opacity=1}){return /*#__PURE__*/_jsx(motion.div,{animate:{borderColor:color,opacity},style:{position:\"absolute\",inset:0,borderWidth:width,borderStyle:style,borderRadius,pointerEvents:\"none\"},initial:false,transition:transition});}Border.displayName=\"VideoFrame/Border\";\nexport const __FramerMetadata__ = {\"exports\":{\"Icon\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"getVideoId\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"borderProp\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useVideoStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Border\":{\"type\":\"reactComponent\",\"name\":\"Border\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"VIDEO_ID_ATTRIBUTE\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createId\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoFrameShared.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useRef}from\"react\";import{Icon,useVideoStore,getVideoId}from\"https://framerusercontent.com/modules/6ffgsaDzsjdxRp9dCkQD/iwpJh5WdbOq7ENFllKSh/VideoFrameShared.js\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 40\n * @framerIntrinsicHeight 40\n */export default function VideoButton(props){var _state_videoRef,_state_playerRef;const{type,skipTime}=props;const[videoState,setVideoState]=useVideoStore();const[videoId,setVideoId]=useState(null);const state=videoState[videoId];const ref=useRef(null);const videoRef=state===null||state===void 0?void 0:(_state_videoRef=state.videoRef)===null||_state_videoRef===void 0?void 0:_state_videoRef.current;const playerRef=state===null||state===void 0?void 0:(_state_playerRef=state.playerRef)===null||_state_playerRef===void 0?void 0:_state_playerRef.current;useEffect(()=>{setVideoState({});},[]);useEffect(()=>{const videoId=getVideoId(ref.current);setVideoId(videoId);},[ref]);let icon=null;let defaultIcon=null;let onClick=null;switch(type){case\"play\":icon=(state===null||state===void 0?void 0:state.playing)?props.pauseIcon:props.playIcon;defaultIcon=(state===null||state===void 0?void 0:state.playing)?`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='currentColor' class='icon icon-tabler icons-tabler-filled icon-tabler-player-pause'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z' /%3E%3Cpath d='M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z' /%3E%3C/svg%3E\")`:`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='currentColor' class='icon icon-tabler icons-tabler-filled icon-tabler-player-play'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setPlaying){state.setPlaying(!state.playing);}};break;case\"fullscreen\":icon=props.fullscreenIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-arrows-maximize'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M16 4l4 0l0 4' /%3E%3Cpath d='M14 10l6 -6' /%3E%3Cpath d='M8 20l-4 0l0 -4' /%3E%3Cpath d='M4 20l6 -6' /%3E%3Cpath d='M16 20l4 0l0 -4' /%3E%3Cpath d='M14 14l6 6' /%3E%3Cpath d='M8 4l-4 0l0 4' /%3E%3Cpath d='M4 4l6 6' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setFullscreen){state.setFullscreen(!state.fullscreen);}};break;case\"skipForward\":icon=props.skipIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-reload'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747' /%3E%3Cpath d='M20 4v5h-5' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setTime){state.setTime(state.getTime()+skipTime);}};break;case\"skipBackward\":icon=props.skipIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.06694 13.041C4.25577 14.4809 4.83302 15.8423 5.73677 16.9792C6.64053 18.116 7.83669 18.9853 9.19698 19.494C10.5573 20.0027 12.0304 20.1315 13.4583 19.8666C14.8862 19.6017 16.2151 18.953 17.3024 17.9903C18.3897 17.0275 19.1944 15.787 19.6303 14.4016C20.0661 13.0163 20.1166 11.5384 19.7764 10.1266C19.4361 8.7147 18.718 7.42208 17.699 6.38734C16.6799 5.3526 15.3984 4.61477 13.9919 4.25298C10.0929 3.25298 6.05694 5.25998 4.56694 8.99998' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 4V9H9' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setTime){state.setTime(state.getTime()-skipTime);}};break;case\"mute\":icon=(state===null||state===void 0?void 0:state.muted)?props.unmuteIcon:props.muteIcon;defaultIcon=(state===null||state===void 0?void 0:state.muted)?`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-volume'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M15 8a5 5 0 0 1 0 8' /%3E%3Cpath d='M17.7 5a9 9 0 0 1 0 14' /%3E%3Cpath d='M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a.8 .8 0 0 1 1.5 .5v14a.8 .8 0 0 1 -1.5 .5l-3.5 -4.5' /%3E%3C/svg%3E\")`:`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-volume-off'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M15 8a5 5 0 0 1 1.912 4.934m-1.377 2.602a5 5 0 0 1 -.535 .464' /%3E%3Cpath d='M17.7 5a9 9 0 0 1 2.362 11.086m-1.676 2.299a9 9 0 0 1 -.686 .615' /%3E%3Cpath d='M9.069 5.054l.431 -.554a.8 .8 0 0 1 1.5 .5v2m0 4v8a.8 .8 0 0 1 -1.5 .5l-3.5 -4.5h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l1.294 -1.664' /%3E%3Cpath d='M3 3l18 18' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setMuted){state.setMuted(!state.muted);}};break;case\"pictureInPicture\":icon=props.pictureInPictureIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-picture-in-picture'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M11 19h-6a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v4' /%3E%3Cpath d='M14 14m0 1a1 1 0 0 1 1 -1h5a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1z' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setPiP){state.setPiP(!state.pip);}};break;case\"restart\":icon=props.restartIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='currentColor' class='icon icon-tabler icons-tabler-filled icon-tabler-player-track-prev'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z' /%3E%3Cpath d='M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setTime){state.setTime(0);}};break;case\"toggleLoop\":icon=(state===null||state===void 0?void 0:state.loop)?props.loopOnIcon:props.loopOffIcon;defaultIcon=(state===null||state===void 0?void 0:state.loop)?`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-repeat'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3' /%3E%3Cpath d='M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3' /%3E%3C/svg%3E\")`:`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-repeat-off'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M4 12v-3c0 -1.336 .873 -2.468 2.08 -2.856m3.92 -.144h10m-3 -3l3 3l-3 3' /%3E%3Cpath d='M20 12v3a3 3 0 0 1 -.133 .886m-1.99 1.984a3 3 0 0 1 -.877 .13h-13m3 3l-3 -3l3 -3' /%3E%3Cpath d='M3 3l18 18' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setLoop){state.setLoop(!state.loop);}};break;}return /*#__PURE__*/_jsx(\"div\",{ref:ref,onMouseEnter:props.hoverEvent,onClick:()=>{var _props_clickEvent;onClick===null||onClick===void 0?void 0:onClick();(_props_clickEvent=props.clickEvent)===null||_props_clickEvent===void 0?void 0:_props_clickEvent.call(props);},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",...props.style},children:/*#__PURE__*/_jsx(Icon,{image:icon,color:props.iconColor,size:props.iconSize,defaultImage:defaultIcon})});}VideoButton.displayName=\"Video Button\";addPropertyControls(VideoButton,{type:{type:ControlType.Enum,defaultValue:\"play\",options:[\"play\",\"fullscreen\",\"skipForward\",\"skipBackward\",\"mute\",\"pictureInPicture\",\"restart\",\"toggleLoop\"],optionTitles:[\"Play/Pause\",\"Fullscreen\",\"Skip Forward\",\"Skip Backward\",\"Mute\",\"Picture-in-Picture\",\"Restart\",\"Toggle Loop\"],title:\"Action\"},skipTime:{type:ControlType.Number,defaultValue:10,min:1,step:1,displayStepper:true,unit:\"s\",title:\"Time\",hidden:props=>props.type!==\"skipForward\"&&props.type!==\"skipBackward\"},playIcon:{type:ControlType.ResponsiveImage,hidden:props=>props.type!==\"play\"},pauseIcon:{type:ControlType.ResponsiveImage,hidden:props=>props.type!==\"play\"},fullscreenIcon:{type:ControlType.ResponsiveImage,title:\"Fullscreen\",hidden:props=>props.type!==\"fullscreen\"},minimizeIcon:{type:ControlType.ResponsiveImage,title:\"Minimize\",hidden:props=>props.type!==\"fullscreen\"},skipIcon:{type:ControlType.ResponsiveImage,title:\"Icon\",hidden:props=>props.type!==\"skipForward\"&&props.type!==\"skipBackward\"},muteIcon:{type:ControlType.ResponsiveImage,title:\"Mute\",hidden:props=>props.type!==\"mute\"},unmuteIcon:{type:ControlType.ResponsiveImage,title:\"Unmute\",hidden:props=>props.type!==\"mute\"},pictureInPictureIcon:{type:ControlType.ResponsiveImage,title:\"Icon\",hidden:props=>props.type!==\"pictureInPicture\"},restartIcon:{type:ControlType.ResponsiveImage,title:\"Icon\",hidden:props=>props.type!==\"restart\"},loopOnIcon:{type:ControlType.ResponsiveImage,title:\"Loop On\",hidden:props=>props.type!==\"toggleLoop\"},loopOffIcon:{type:ControlType.ResponsiveImage,title:\"Loop Off\",hidden:props=>props.type!==\"toggleLoop\"},iconColor:{type:ControlType.Color,defaultValue:\"#FFF\",optional:true},iconSize:{type:ControlType.Number,defaultValue:20,min:1,step:1,displayStepper:true},hoverEvent:{type:ControlType.EventHandler,title:\"Hover\"},clickEvent:{type:ControlType.EventHandler,title:\"Click\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"40\",\"framerIntrinsicHeight\":\"40\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useRef}from\"react\";import{useVideoStore,getVideoId,createId}from\"https://framerusercontent.com/modules/6ffgsaDzsjdxRp9dCkQD/iwpJh5WdbOq7ENFllKSh/VideoFrameShared.js\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 200\n */export default function ProgressBar(props){var _handle_border,_handle_border1;const{line,handle}=props;const id=props.id||createId();const[videoState,setVideoState]=useVideoStore();const[videoId,setVideoId]=useState(null);const[isDragging,setIsDragging]=useState(false);const[dragValue,setDragValue]=useState(0);const[videoTime,setVideoTime]=useState(0);const[loadedTime,setLoadedTime]=useState(0);const state=videoState[videoId];const duration=(state===null||state===void 0?void 0:state.duration)||0;const ref=useRef(null);const inputRef=useRef(null);const wasPlayingRef=useRef(false);useEffect(()=>{const callback=time=>{if(time[0]!==null){setVideoTime(time[0]);}if(time[1]!==null){setLoadedTime(time[1]);}};if(state===null||state===void 0?void 0:state.addTimeCallback){state.addTimeCallback(callback);}return()=>{if(state===null||state===void 0?void 0:state.removeTimeCallback){state.removeTimeCallback(callback);}};},[!state]);useEffect(()=>{setVideoState({});},[]);useEffect(()=>{const videoId=getVideoId(ref.current);setVideoId(videoId);},[ref]);const value=isDragging?dragValue:videoTime;const step=.1;var _handle_border_color;const handleCSS=`appearance: none;\n        -webkit-appearance: none;\n        width: ${handle.size}px;\n        height: ${handle.size}px;\n        border-radius: ${handle.radius};\n        background-color: ${handle.fill};\n        box-sizing: border-box;\n        translate: 0 ${(-handle.size+line.height)/2-(line.border?Math.min(line.border.width,line.height/2):0)}px;\n        border-width: ${((_handle_border=handle.border)===null||_handle_border===void 0?void 0:_handle_border.width)||0}px;\n        border-style: ${handle.border?\"solid\":\"none\"};\n        border-color: ${(_handle_border_color=(_handle_border1=handle.border)===null||_handle_border1===void 0?void 0:_handle_border1.color)!==null&&_handle_border_color!==void 0?_handle_border_color:\"none\"};\n        box-shadow: ${handle.shadows};`;const lineCSS=`appearance: none;\n        -webkit-appearance: none;\n        height: ${line.height}px;`;const percent=getPercentage(value,0,duration);const loadedPercent=getPercentage(loadedTime,0,duration);const onChange=event=>{if(isDragging){const newTime=Number(event.target.value);setDragValue(newTime);}};const onDragStart=()=>{if(state===null||state===void 0?void 0:state.playing){wasPlayingRef.current=true;state.setPlaying(false);}setIsDragging(true);};const onDragEnd=()=>{if(state&&wasPlayingRef.current){wasPlayingRef.current=false;state.setTime(dragValue);state.setPlaying(true);// if (state?.videoRef?.current) {\n//     state.videoRef.current.currentTime = newTime\n// } else if (state?.playerRef?.current) {\n//     state.playerRef.current.seekTo(newTime, true)\n// }\n}setIsDragging(false);};return /*#__PURE__*/_jsxs(\"div\",{ref:ref,id:id,style:{display:\"flex\",flexDirection:\"row\",alignItems:\"center\",...props.style},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",flex:1,height:Math.max(handle.size,line.height),display:\"flex\",flexDirection:\"row\",alignItems:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{height:line.height,background:loadedPercent>percent&&line.loadedFill?`linear-gradient(to right, ${line.playedFill} ${percent}%, ${line.loadedFill} ${percent}%, ${line.loadedFill} ${loadedPercent}%, ${line.unplayedFill} ${loadedPercent}%)`:`linear-gradient(to right, ${line.playedFill} ${percent}%, ${line.unplayedFill} ${percent}%)`,boxShadow:line.shadows,borderRadius:line.radius,flex:1}}),/*#__PURE__*/_jsx(\"input\",{ref:inputRef,type:\"range\",name:props.name,min:0,max:duration,step:step,value:value,onChange:onChange,onMouseDown:onDragStart,onMouseUp:onDragEnd,onMouseLeave:onDragEnd,style:{position:\"absolute\",inset:0,display:\"block\",appearance:\"none\",outline:\"none\",margin:0,cursor:\"pointer\",background:\"none\"}})]}),/*#__PURE__*/_jsx(\"style\",{children:`#${id} input[type=range]::-webkit-slider-thumb {${handleCSS}}\n                #${id} input[type=range]::-moz-range-thumb {${handleCSS}}\n\n                #${id} input[type=range]::-webkit-slider-runnable-track {${lineCSS}}\n                #${id} input[type=range]::-moz-range-track {${lineCSS}}\n                #${id} input[type=range]::-moz-range-progress {${lineCSS}}`})]});}ProgressBar.displayName=\"Progress Bar\";addPropertyControls(ProgressBar,{line:{type:ControlType.Object,buttonTitle:\"Style\",controls:{height:{type:ControlType.Number,defaultValue:4,min:1,step:1,displayStepper:true},playedFill:{type:ControlType.Color,defaultValue:\"#FFF\",title:\"Played\"},unplayedFill:{type:ControlType.Color,defaultValue:\"rgba(187, 187, 187, 0.3)\",title:\"Unplayed\"},loadedFill:{type:ControlType.Color,optional:true,defaultValue:\"rgba(187, 187, 187, 0.5)\",title:\"Loaded\",description:\"Only for YouTube and Vimeo videos\"},radius:{type:ControlType.BorderRadius,defaultValue:\"2px\"},shadows:{type:ControlType.BoxShadow}}},handle:{type:ControlType.Object,buttonTitle:\"Style\",controls:{size:{type:ControlType.Number,defaultValue:16,min:0,step:1},fill:{type:ControlType.Color,defaultValue:\"#FFF\"},radius:{type:ControlType.BorderRadius,defaultValue:\"8px\"},border:{type:ControlType.Object,optional:true,controls:{color:{type:ControlType.Color,defaultValue:\"#222\"},width:{type:ControlType.Number,defaultValue:1,min:0,step:1,displayStepper:true},style:{type:ControlType.Enum,defaultValue:\"solid\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"]}}},shadows:{type:ControlType.BoxShadow,defaultValue:\"0px 4px 6px 0px rgba(0, 0, 0, 0.2)\"}}}});function getPercentage(value,min,max){if(min===max){return value===min?0:100;}// Ensure min is less than max by swapping if necessary\nif(min>max){[min,max]=[max,min];}// Clamp the value to be within the min and max range\nvalue=Math.max(min,Math.min(value,max));const percentage=(value-min)/(max-min)*100;return percentage;}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressBar\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressBar.map"],"mappings":"wSAAyV,SAAgB,EAAW,EAAQ,CAAC,KAAM,GAAQ,CAAC,IAAI,EAAG,EAAQ,aAAa,EAAmB,CAAC,GAAG,EAAI,OAAO,EAAI,EAAQ,EAAQ,cAAe,OAAO,KAAM,SAAgB,EAAK,CAAC,QAAM,QAAM,OAAK,QAAM,EAAE,CAAC,gBAAc,CAAC,IAAI,EAAW,IAAS,GAA0C,IAAK,IAAA,GAAU,QAAQ,OAAoB,EAAK,MAAM,CAAC,aAAa,GAA0C,IAAI,MAAM,CAAC,MAAM,EAAK,OAAO,EAAK,SAAS,EAAK,UAAU,EAAK,cAAc,OAAO,gBAAgB,EAAW,gBAAgB,EAAW,OAAO,QAAQ,GAA0C,IAAI,IAAI,UAAW,GAA0C,IAAK,QAAQ,GAA0C,IAAI,IAAI,EAAa,eAAe,UAAU,mBAAmB,SAAS,SAAS,UAAU,aAAa,SAAS,GAAG,EAAM,CAAC,CAAC,CAAqC,SAAgB,EAAW,CAAC,eAAa,IAAO,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAY,OAAO,SAAS,GAAK,aAAa,EAAa,CAAC,MAAM,OAAO,CAAC,IAAA,GAAU,SAAS,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,aAAa,OAAO,CAAC,MAAM,CAAC,KAAK,EAAY,QAAQ,aAAa,MAAM,CAAC,MAAM,CAAC,KAAK,EAAY,KAAK,aAAa,QAAQ,QAAQ,CAAC,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