{"version":3,"file":"Video.4NhbXDIR.mjs","names":["useRef","useState","HomeFactory","React","defaultEvents","useRef","useCallback","useState","useMemo"],"sources":["https:/framerusercontent.com/modules/eTFACFXlvp5mgG2YpBpd/r3pQNmZVI0ezN9aYaWYM/Home.js","https:/framer.com/m/hero-icons/Home.js@0.0.27","https:/framerusercontent.com/modules/hKjtTuWGYB451ckw6eTN/rQJeCcsGr1fSnWO0FT2G/Hero.js","https:/framerusercontent.com/modules/lRDHiNWNVWmE0lqtoVHP/qXQVWG1AZxpdrbBmhE1U/Video.js"],"sourcesContent":["let r;\nvar l = (e) => {\n    if (!r) {\n        const t = ({size: o = 24, ...a}, n) => {\n            return e.createElement(\"svg\", {viewBox: \"0 0 20 20\", fill: \"currentColor\", width: o, height: o, ref: n, ...a}, e.createElement(\"path\", {d: \"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z\"}));\n        };\n        r = e.forwardRef(t);\n    }\n    return r;\n};\nconst __FramerMetadata__ = {exports: {default: {type: \"reactComponent\", slots: [], annotations: {framerContractVersion: \"1\"}}, __FramerMetadata__: {type: \"variable\"}}};\nexport { __FramerMetadata__, l as default };","/*\n * Home (hero-icons/Home@0.0.27)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/eTFACFXlvp5mgG2YpBpd/r3pQNmZVI0ezN9aYaWYM/Home.js\"\nexport { default } from \"https://framerusercontent.com/modules/eTFACFXlvp5mgG2YpBpd/r3pQNmZVI0ezN9aYaWYM/Home.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{useState,useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion}from\"framer-motion\";import{NullState}from\"https://framer.com/m/framer/icon-nullstate.js@0.7.0\";import HomeFactory from\"https://framer.com/m/hero-icons/Home.js@0.0.27\";import{defaultEvents,useIconSelection}from\"https://framerusercontent.com/modules/Ma20hU0GGRxLxZphbywl/OSpwWF91FHPVFyQJjMHt/utils.js\";export const iconKeys=[\"AcademicCap\",\"AcademicCapOutline\",\"Adjustments\",\"AdjustmentsOutline\",\"Annotation\",\"AnnotationOutline\",\"Archive\",\"ArchiveOutline\",\"ArrowCircleDown\",\"ArrowCircleLeft\",\"ArrowCircleRight\",\"ArrowCircleUp\",\"ArrowCircleUpOutline\",\"ArrowDown\",\"ArrowDownOutline\",\"ArrowLeft\",\"ArrowLeftOutline\",\"ArrowNarrowDown\",\"ArrowNarrowLeft\",\"ArrowNarrowRight\",\"ArrowNarrowUp\",\"ArrowNarrowUpOutline\",\"ArrowRight\",\"ArrowRightOutline\",\"ArrowUp\",\"ArrowUpOutline\",\"ArrowsExpand\",\"ArrowsExpandOutline\",\"AtSymbol\",\"AtSymbolOutline\",\"Backspace\",\"BackspaceOutline\",\"BadgeCheck\",\"BadgeCheckOutline\",\"Ban\",\"BanOutline\",\"Beaker\",\"BeakerOutline\",\"Bell\",\"BellOutline\",\"BookOpen\",\"BookOpenOutline\",\"Bookmark\",\"BookmarkAlt\",\"BookmarkAltOutline\",\"BookmarkOutline\",\"Briefcase\",\"BriefcaseOutline\",\"Cake\",\"CakeOutline\",\"Calculator\",\"CalculatorOutline\",\"Calendar\",\"CalendarOutline\",\"Camera\",\"CameraOutline\",\"Cash\",\"CashOutline\",\"ChartBar\",\"ChartBarOutline\",\"ChartPie\",\"ChartPieOutline\",\"ChartSquareBar\",\"Chat\",\"ChatAlt\",\"ChatAlt2\",\"ChatAlt2Outline\",\"ChatAltOutline\",\"ChatOutline\",\"Check\",\"CheckCircle\",\"CheckCircleOutline\",\"CheckOutline\",\"ChevronDoubleDown\",\"ChevronDoubleLeft\",\"ChevronDoubleRight\",\"ChevronDoubleUp\",\"ChevronDown\",\"ChevronDownOutline\",\"ChevronLeft\",\"ChevronLeftOutline\",\"ChevronRight\",\"ChevronRightOutline\",\"ChevronUp\",\"ChevronUpOutline\",\"Chip\",\"ChipOutline\",\"Clipboard\",\"ClipboardCheck\",\"ClipboardCopy\",\"ClipboardCopyOutline\",\"ClipboardList\",\"ClipboardListOutline\",\"ClipboardOutline\",\"Clock\",\"ClockOutline\",\"Cloud\",\"CloudDownload\",\"CloudDownloadOutline\",\"CloudOutline\",\"CloudUpload\",\"CloudUploadOutline\",\"Code\",\"CodeOutline\",\"Cog\",\"CogOutline\",\"Collection\",\"CollectionOutline\",\"ColorSwatch\",\"ColorSwatchOutline\",\"CreditCard\",\"CreditCardOutline\",\"Cube\",\"CubeOutline\",\"CubeTransparent\",\"CurrencyBangladeshi\",\"CurrencyDollar\",\"CurrencyEuro\",\"CurrencyEuroOutline\",\"CurrencyPound\",\"CurrencyPoundOutline\",\"CurrencyRupee\",\"CurrencyRupeeOutline\",\"CurrencyYen\",\"CurrencyYenOutline\",\"CursorClick\",\"CursorClickOutline\",\"Database\",\"DatabaseOutline\",\"DesktopComputer\",\"DeviceMobile\",\"DeviceMobileOutline\",\"DeviceTablet\",\"DeviceTabletOutline\",\"Document\",\"DocumentAdd\",\"DocumentAddOutline\",\"DocumentDownload\",\"DocumentDuplicate\",\"DocumentOutline\",\"DocumentRemove\",\"DocumentReport\",\"DocumentSearch\",\"DocumentText\",\"DocumentTextOutline\",\"DotsCircleHorizontal\",\"DotsHorizontal\",\"DotsVertical\",\"DotsVerticalOutline\",\"Download\",\"DownloadOutline\",\"Duplicate\",\"DuplicateOutline\",\"EmojiHappy\",\"EmojiHappyOutline\",\"EmojiSad\",\"EmojiSadOutline\",\"Exclamation\",\"ExclamationCircle\",\"ExclamationOutline\",\"ExternalLink\",\"ExternalLinkOutline\",\"Eye\",\"EyeOff\",\"EyeOffOutline\",\"EyeOutline\",\"FastForward\",\"FastForwardOutline\",\"Film\",\"FilmOutline\",\"Filter\",\"FilterOutline\",\"FingerPrint\",\"FingerPrintOutline\",\"Fire\",\"FireOutline\",\"Flag\",\"FlagOutline\",\"Folder\",\"FolderAdd\",\"FolderAddOutline\",\"FolderDownload\",\"FolderOpen\",\"FolderOpenOutline\",\"FolderOutline\",\"FolderRemove\",\"FolderRemoveOutline\",\"Gift\",\"GiftOutline\",\"Globe\",\"GlobeAlt\",\"GlobeAltOutline\",\"GlobeOutline\",\"Hand\",\"HandOutline\",\"Hashtag\",\"HashtagOutline\",\"Heart\",\"HeartOutline\",\"Home\",\"HomeOutline\",\"Identification\",\"Inbox\",\"InboxIn\",\"InboxInOutline\",\"InboxOutline\",\"InformationCircle\",\"Key\",\"KeyOutline\",\"Library\",\"LibraryOutline\",\"LightBulb\",\"LightBulbOutline\",\"LightningBolt\",\"LightningBoltOutline\",\"Link\",\"LinkOutline\",\"LocationMarker\",\"LockClosed\",\"LockClosedOutline\",\"LockOpen\",\"LockOpenOutline\",\"Login\",\"LoginOutline\",\"Logout\",\"LogoutOutline\",\"Mail\",\"MailOpen\",\"MailOpenOutline\",\"MailOutline\",\"Map\",\"MapOutline\",\"Menu\",\"MenuAlt1\",\"MenuAlt1Outline\",\"MenuAlt2\",\"MenuAlt2Outline\",\"MenuAlt3\",\"MenuAlt3Outline\",\"MenuAlt4\",\"MenuAlt4Outline\",\"MenuOutline\",\"Microphone\",\"MicrophoneOutline\",\"Minus\",\"MinusCircle\",\"MinusCircleOutline\",\"MinusOutline\",\"MinusSm\",\"MinusSmOutline\",\"Moon\",\"MoonOutline\",\"MusicNote\",\"MusicNoteOutline\",\"Newspaper\",\"NewspaperOutline\",\"OfficeBuilding\",\"PaperAirplane\",\"PaperAirplaneOutline\",\"PaperClip\",\"PaperClipOutline\",\"Pause\",\"PauseOutline\",\"Pencil\",\"PencilAlt\",\"PencilAltOutline\",\"PencilOutline\",\"Phone\",\"PhoneIncoming\",\"PhoneIncomingOutline\",\"PhoneMissedCall\",\"PhoneOutgoing\",\"PhoneOutgoingOutline\",\"PhoneOutline\",\"Photograph\",\"PhotographOutline\",\"Play\",\"PlayOutline\",\"Plus\",\"PlusCircle\",\"PlusCircleOutline\",\"PlusOutline\",\"PlusSm\",\"PlusSmOutline\",\"PresentationChartBar\",\"Printer\",\"PrinterOutline\",\"Puzzle\",\"PuzzleOutline\",\"Qrcode\",\"QrcodeOutline\",\"QuestionMarkCircle\",\"ReceiptRefund\",\"ReceiptRefundOutline\",\"ReceiptTax\",\"ReceiptTaxOutline\",\"Refresh\",\"RefreshOutline\",\"Reply\",\"ReplyOutline\",\"Rewind\",\"RewindOutline\",\"Rss\",\"RssOutline\",\"Save\",\"SaveAs\",\"SaveAsOutline\",\"SaveOutline\",\"Scale\",\"ScaleOutline\",\"Scissors\",\"ScissorsOutline\",\"Search\",\"SearchCircle\",\"SearchCircleOutline\",\"SearchOutline\",\"Selector\",\"SelectorOutline\",\"Server\",\"ServerOutline\",\"Share\",\"ShareOutline\",\"ShieldCheck\",\"ShieldCheckOutline\",\"ShieldExclamation\",\"ShoppingBag\",\"ShoppingBagOutline\",\"ShoppingCart\",\"ShoppingCartOutline\",\"SortAscending\",\"SortAscendingOutline\",\"SortDescending\",\"Sparkles\",\"SparklesOutline\",\"Speakerphone\",\"SpeakerphoneOutline\",\"Star\",\"StarOutline\",\"StatusOffline\",\"StatusOfflineOutline\",\"StatusOnline\",\"StatusOnlineOutline\",\"Stop\",\"StopOutline\",\"Sun\",\"SunOutline\",\"Support\",\"SupportOutline\",\"SwitchHorizontal\",\"SwitchVertical\",\"Table\",\"TableOutline\",\"Tag\",\"TagOutline\",\"Template\",\"TemplateOutline\",\"Terminal\",\"TerminalOutline\",\"ThumbDown\",\"ThumbDownOutline\",\"ThumbUp\",\"ThumbUpOutline\",\"Ticket\",\"TicketOutline\",\"Translate\",\"TranslateOutline\",\"Trash\",\"TrashOutline\",\"TrendingDown\",\"TrendingDownOutline\",\"TrendingUp\",\"TrendingUpOutline\",\"Truck\",\"TruckOutline\",\"Upload\",\"UploadOutline\",\"User\",\"UserAdd\",\"UserAddOutline\",\"UserCircle\",\"UserCircleOutline\",\"UserGroup\",\"UserGroupOutline\",\"UserOutline\",\"UserRemove\",\"UserRemoveOutline\",\"Users\",\"UsersOutline\",\"Variable\",\"VariableOutline\",\"VideoCamera\",\"VideoCameraOutline\",\"ViewBoards\",\"ViewBoardsOutline\",\"ViewGrid\",\"ViewGridAdd\",\"ViewGridAddOutline\",\"ViewGridOutline\",\"ViewList\",\"ViewListOutline\",\"VolumeOff\",\"VolumeOffOutline\",\"VolumeUp\",\"VolumeUpOutline\",\"Wifi\",\"WifiOutline\",\"X\",\"XCircle\",\"XCircleOutline\",\"XOutline\",\"ZoomIn\",\"ZoomInOutline\",\"ZoomOut\",\"ZoomOutOutline\",];const moduleBaseUrl=\"https://framer.com/m/hero-icons/\";const lowercaseIconKeyPairs=iconKeys.reduce((res,key)=>{res[key.toLowerCase()]=key;return res;},{});/**\n * HERO\n *\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export function Icon(props){const{color,selectByList,iconSearch,iconSelection,onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,mirrored}=props;const isMounted=useRef(false);const iconKey=useIconSelection(iconKeys,selectByList,iconSearch,iconSelection,lowercaseIconKeyPairs);// Selected Icon Module\nconst[SelectedIcon,setSelectedIcon]=useState(iconKey===\"Home\"?HomeFactory(React):null);// Import the selected module or reset so null state\nasync function importModule(){// Get the selected module\ntry{const iconModuleUrl=`${moduleBaseUrl}${iconKey}.js@0.0.27`;const module=await import(/* webpackIgnore: true */ iconModuleUrl);if(isMounted.current)setSelectedIcon(module.default(React));}catch{if(isMounted.current)setSelectedIcon(null);}}// Import module when new style or icon is selected\nuseEffect(()=>{isMounted.current=true;importModule();return()=>{isMounted.current=false;};},[iconKey]);const isOnCanvas=RenderTarget.current()===RenderTarget.canvas;const emptyState=isOnCanvas?/*#__PURE__*/ _jsx(NullState,{}):null;return /*#__PURE__*/ _jsx(motion.div,{style:{display:\"contents\"},onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,children:SelectedIcon?/*#__PURE__*/ _jsx(SelectedIcon,{style:{width:\"100%\",height:\"100%\",transform:mirrored?\"scale(-1, 1)\":undefined},color:color}):emptyState});}Icon.displayName=\"Hero\";Icon.defaultProps={width:24,height:24,iconSelection:\"Home\",iconSearch:\"Home\",color:\"#66F\",selectByList:true,mirrored:false};addPropertyControls(Icon,{selectByList:{type:ControlType.Boolean,title:\"Select\",enabledTitle:\"List\",disabledTitle:\"Search\",defaultValue:Icon.defaultProps.selectByList},iconSelection:{type:ControlType.Enum,options:iconKeys,defaultValue:Icon.defaultProps.iconSelection,title:\"Name\",hidden:({selectByList})=>!selectByList,description:\"Find every icon name on the [Hero site](https://heroicons.com/)\"},iconSearch:{type:ControlType.String,title:\"Name\",placeholder:\"Menu, Wifi, Box…\",hidden:({selectByList})=>selectByList},mirrored:{type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:Icon.defaultProps.mirrored},color:{type:ControlType.Color,title:\"Color\",defaultValue:Icon.defaultProps.color},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"iconKeys\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Icon\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"24\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"24\"}},\"IconProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Hero.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsInCurrentNavigationTarget}from\"framer\";import{isMotionValue,useInView}from\"framer-motion\";import{borderRadiusControl,defaultEvents,useIsBrowserSafari,useIsOnCanvas,useOnEnter,useOnExit,useRadius}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{memo,useCallback,useEffect,useMemo,useRef,useState}from\"react\";var ObjectFitType;(function(ObjectFitType){ObjectFitType[\"Fill\"]=\"fill\";ObjectFitType[\"Contain\"]=\"contain\";ObjectFitType[\"Cover\"]=\"cover\";ObjectFitType[\"None\"]=\"none\";ObjectFitType[\"ScaleDown\"]=\"scale-down\";})(ObjectFitType||(ObjectFitType={}));var SrcType;(function(SrcType){SrcType[\"Video\"]=\"Upload\";SrcType[\"Url\"]=\"URL\";})(SrcType||(SrcType={}));// Reduce renders\nfunction getProps(props){const{width,height,topLeft,topRight,bottomRight,bottomLeft,id,children,...rest}=props;return rest;}/**\n * VIDEO\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 112\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */ export function Video(props){const newProps=getProps(props);return /*#__PURE__*/ _jsx(VideoMemo,{...newProps});}function usePlaybackControls(videoRef){const isInCurrentNavigationTarget=useIsInCurrentNavigationTarget();const requestingPlay=useRef(false);const setProgress=useCallback(rawProgress=>{if(!videoRef.current)return;const newProgress=(rawProgress===1?.999:rawProgress)*videoRef.current.duration;const isAlreadySet=Math.abs(videoRef.current.currentTime-newProgress)<.1;if(videoRef.current.duration>0&&!isAlreadySet){videoRef.current.currentTime=newProgress;}},[]);const play=useCallback(()=>{const isPlaying=videoRef.current.currentTime>0&&videoRef.current.onplaying&&!videoRef.current.paused&&!videoRef.current.ended&&videoRef.current.readyState>videoRef.current.HAVE_CURRENT_DATA;if(!isPlaying&&videoRef.current&&!requestingPlay.current&&isInCurrentNavigationTarget){requestingPlay.current=true;videoRef.current.play().catch(e=>{}) // It's likely fine, swallow error\n.finally(()=>requestingPlay.current=false);}},[]);const pause=useCallback(()=>{if(!videoRef.current||requestingPlay.current)return;videoRef.current.pause();},[]);return{play,pause,setProgress};}function useAutoplayBehavior({playingProp,muted,loop,playsinline,controls}){const[initialPlayingProp]=useState(()=>playingProp);const[hasPlayingPropChanged,setHasPlayingPropChanged]=useState(false);if(playingProp!==initialPlayingProp&&!hasPlayingPropChanged){setHasPlayingPropChanged(true);}const behavesAsGif=// passing `playing === true` on mount indicates that the video should\n// autoplay, like a GIF\ninitialPlayingProp&&muted&&loop&&playsinline&&!controls&&// Some users of the <Video> component use it by wrapping it with\n// another smart component and adding their own controls on top. (The\n// controls use transitions to control the video: e.g., when clicking\n// the play button, the smart component will transition to a state with\n// <Video playing={true} />.) In this case, we don't want the video to\n// behave as a gif, as it will be weird if the video suddenly started\n// acting as such (and auto-pausing when leaving the viewport) as soon\n// as the site visitor mutes it and clicks “Play”.\n!hasPlayingPropChanged;let autoplay;if(behavesAsGif)autoplay=\"on-viewport\";else if(initialPlayingProp)autoplay=\"on-mount\";else autoplay=\"no-autoplay\";return autoplay;}/**\n * The Video component has some effects that sync the video element with props\n * like `startTime`, `progress`, etc. React calls these effects whenever these\n * props change. However, it also calls them on the first mount, and this is\n * troublesome – if we’re doing SSR, and the user changed the video state before\n * the video was hydrated, the initial `useEffect` call will reset the video\n * state. To avoid this, we use this flag.\n */ let isMountedAndReadyForProgressChanges=false;const VideoMemo=/*#__PURE__*/ memo(function VideoInner(props){const{srcType,srcFile,srcUrl,playing:playingProp,muted,playsinline,controls,progress,objectFit,backgroundColor,onSeeked,onPause,onPlay,onEnd,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,poster,posterEnabled,startTime:startTimeProp,volume,loop}=props;const videoRef=useRef();const isSafari=useIsBrowserSafari();const wasPausedOnLeave=useRef(null);const wasEndedOnLeave=useRef(null);const isOnCanvas=useIsOnCanvas();const borderRadius=useRadius(props);// Hard-coding `autoplayBehavior` and `isInViewport` when on canvas as a\n// tiny perf optimization. isOnCanvas won’t change through the lifecycle of\n// the component, so using these hooks conditionally should be safe\nconst autoplayBehavior=isOnCanvas?\"no-autoplay\":useAutoplayBehavior({playingProp,muted,loop,playsinline,controls});const isInViewport=isOnCanvas?true:useInView(videoRef);// Video elements behave oddly at 100% duration\nconst startTime=startTimeProp===100?99.9:startTimeProp;const{play,pause,setProgress}=usePlaybackControls(videoRef);// Pause/play via props\nuseEffect(()=>{if(isOnCanvas)return;if(playingProp)play();else pause();},[playingProp]);// Pause/play via viewport\nuseEffect(()=>{if(isOnCanvas)return;if(autoplayBehavior!==\"on-viewport\")return;if(isInViewport)play();else pause();},[autoplayBehavior,isInViewport]);// Allow scrubbling via progress prop\n// 1) Handle cases when the progress prop itself changes\nuseEffect(()=>{if(!isMountedAndReadyForProgressChanges){isMountedAndReadyForProgressChanges=true;return;}const rawProgressValue=isMotionValue(progress)?progress.get():(progress!==null&&progress!==void 0?progress:0)*.01;setProgress(// When the progress value exists (e.g. <Video startTime={10}\n// progress={50} />), we respect the `progress` value over\n// `startTime`, even if `startTime` changes. That’s because\n// `startTime` == start == changing it shouldn’t affect the current\n// progress\n(rawProgressValue!==null&&rawProgressValue!==void 0?rawProgressValue:0)||// Then why fall back to `startTime` when `progress` doesn’t exist,\n// you might ask? Now, that’s for\n// - canvas UX: we want the video progress to change when the user\n//   is scrobbling the “Start Time” in component settings.\n// - backwards compatibility: maybe some users *are* scrobbling\n//   using `startTime` instead of `progress`? We don’t know, and it\n//   always supported it, so let’s not break it\n(startTime!==null&&startTime!==void 0?startTime:0)/100);},[startTime,srcFile,srcUrl,progress]);// 2) Handle cases when the motion value inside the progress prop changes\nuseEffect(()=>{if(!isMotionValue(progress))return;return progress.on(\"change\",value=>setProgress(value));},[progress]);// (Prototyping) Checking if we need to play on navigation enter\nuseOnEnter(()=>{if(wasPausedOnLeave.current===null)return;if(videoRef.current){// if (restartOnEnter) setProgress(0)\nif(!wasEndedOnLeave&&loop||!wasPausedOnLeave.current)play();}});// (Prototyping) Pausing & saving playing state on navigation exit\nuseOnExit(()=>{if(videoRef.current){wasEndedOnLeave.current=videoRef.current.ended;wasPausedOnLeave.current=videoRef.current.paused;pause();}});const src=useMemo(()=>{let fragment=\"\";// if (\n//     startTime > 0 &&\n//     videoRef.current &&\n//     !isNaN(videoRef.current.duration) &&\n//     !isOnCanvas\n// ) {\n//     console.log(startTime, videoRef.current.duration)\n//     fragment = `#t=${startTime * videoRef.current.duration}`\n// }\nif(srcType===SrcType.Url)return srcUrl+fragment;if(srcType===SrcType.Video)return srcFile+fragment;},[srcType,srcFile,srcUrl,startTime]);// Autoplay via JS to work in Safari\nuseEffect(()=>{if(isSafari&&videoRef.current&&autoplayBehavior===\"on-mount\"){setTimeout(()=>play(),50);}},[]);// Volume Control\nuseEffect(()=>{if(videoRef.current&&!muted)videoRef.current.volume=(volume!==null&&volume!==void 0?volume:0)/100;},[volume]);// When video is ready, set start-time, then autoplay if needed\nconst handleReady=()=>{if(!videoRef.current)return;if(videoRef.current.currentTime<.3)setProgress((startTime!==null&&startTime!==void 0?startTime:0)*.01);if(autoplayBehavior===\"on-mount\")play();};return /*#__PURE__*/ _jsx(\"video\",{onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,src:src,loop:loop,ref:videoRef,onSeeked:e=>{return onSeeked===null||onSeeked===void 0?void 0:onSeeked(e);},onPause:e=>{return onPause===null||onPause===void 0?void 0:onPause(e);},onPlay:e=>{return onPlay===null||onPlay===void 0?void 0:onPlay(e);},onEnded:e=>{return onEnd===null||onEnd===void 0?void 0:onEnd(e);},autoPlay:autoplayBehavior===\"on-mount\",poster:posterEnabled?poster:undefined,onLoadedData:handleReady,controls:controls,muted:isOnCanvas?true:muted,playsInline:playsinline,style:{cursor:!!onClick?\"pointer\":\"auto\",width:\"100%\",height:\"100%\",borderRadius,display:\"block\",objectFit:objectFit,backgroundColor:backgroundColor,objectPosition:\"50% 50%\"}});});Video.displayName=\"Video\";Video.defaultProps={srcType:SrcType.Url,srcUrl:\"https://assets.mixkit.co/videos/preview/mixkit-ice-cream-glass-of-red-soda-5094-small.mp4\",srcFile:\"\",posterEnabled:false,controls:false,playing:true,loop:true,muted:true,playsinline:true,restartOnEnter:false,objectFit:ObjectFitType.Cover,backgroundColor:\"rgba(0,0,0,0)\",radius:0,volume:25,startTime:0};const groupsRegex=/[A-Z]{2,}|[A-Z][a-z]+|[a-z]+|[A-Z]|\\d+/gu;function capitalizeFirstLetter(value){return value.charAt(0).toUpperCase()+value.slice(1);}export function titleCase(value){const groups=value.match(groupsRegex)||[];return groups.map(capitalizeFirstLetter).join(\" \");}const objectFitOptions=[ObjectFitType.Cover,ObjectFitType.Fill,ObjectFitType.Contain,ObjectFitType.ScaleDown,ObjectFitType.None,];addPropertyControls(Video,{srcType:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Source\",options:[SrcType.Url,SrcType.Video]},srcUrl:{type:ControlType.String,title:\" \",placeholder:\"../example.mp4\",hidden(props){return props.srcType===SrcType.Video;},description:\"Hosted video file URL. For YouTube, use the YouTube component.\"},srcFile:{type:ControlType.File,title:\" \",allowedFileTypes:[\"mp4\"],hidden(props){return props.srcType===SrcType.Url;}},playing:{type:ControlType.Boolean,title:\"Playing\",enabledTitle:\"Yes\",disabledTitle:\"No\"},posterEnabled:{type:ControlType.Boolean,title:\"Poster\",enabledTitle:\"Yes\",disabledTitle:\"No\"},poster:{type:ControlType.Image,title:\" \",hidden:({posterEnabled})=>!posterEnabled},backgroundColor:{type:ControlType.Color,title:\"Background\"},...borderRadiusControl,startTime:{title:\"Start Time\",type:ControlType.Number,min:0,max:100,step:.1,unit:\"%\"},loop:{type:ControlType.Boolean,title:\"Loop\",enabledTitle:\"Yes\",disabledTitle:\"No\"},objectFit:{type:ControlType.Enum,title:\"Fit\",options:objectFitOptions,optionTitles:objectFitOptions.map(titleCase)},// restartOnEnter: {\n//     type: ControlType.Boolean,\n//     title: \"On ReEnter\",\n//     enabledTitle: \"Restart\",\n//     disabledTitle: \"Resume\",\n// },\ncontrols:{type:ControlType.Boolean,title:\"Controls\",enabledTitle:\"Show\",disabledTitle:\"Hide\"},muted:{type:ControlType.Boolean,title:\"Muted\",enabledTitle:\"Yes\",disabledTitle:\"No\"},volume:{type:ControlType.Number,max:100,min:0,unit:\"%\",hidden:({muted})=>muted},onEnd:{type:ControlType.EventHandler},onSeeked:{type:ControlType.EventHandler},onPause:{type:ControlType.EventHandler},onPlay:{type:ControlType.EventHandler},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"VideoProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"titleCase\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Video\":{\"type\":\"reactComponent\",\"name\":\"Video\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"112\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Video.map"],"mappings":"weACI,EAAK,IACL,AAII,IAAI,EAAE,YAHK,CAAC,KAAM,EAAI,GAAI,GAAG,GAAI,IACtB,EAAE,cAAc,MAAO,CAAC,QAAS,YAAa,KAAM,eAAgB,MAAO,EAAG,OAAQ,EAAG,IAAK,EAAG,GAAG,EAAE,CAAE,EAAE,cAAc,OAAQ,CAAC,EAAG,mMAAmM,CAAC,CAAC,CAEjU,CAEhB,uBCDsG,ICC7G,SAAgB,EAAK,EAAM,CAAC,GAAK,CAAC,QAAM,eAAa,aAAW,gBAAc,UAAQ,cAAY,YAAU,eAAa,eAAa,YAAU,EAAY,EAAUA,EAAO,GAAM,CAAO,EAAQ,EAAiB,EAAS,EAAa,EAAW,EAAc,EAAsB,CACvR,CAAC,EAAa,GAAiBC,EAAS,IAAU,OAAOC,EAAYC,EAAM,CAAC,KAAK,CACtF,eAAe,GAAc,CAC7B,GAAG,CAA4D,IAAM,EAAO,MAAM,OAA1D,GAAG,IAAgB,EAAQ,aAAkF,EAAU,SAAQ,EAAgB,EAAO,QAAQA,EAAM,C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