{"version":3,"file":"TimeVisibility.DHE8XMft.mjs","names":["useRef","useState","React.useState","useState","useState"],"sources":["https:/framerusercontent.com/modules/jfK7C7JmdHGaVBsvt1V7/Tu6E3lau5mSdWGeVHqah/DotLottie.js","https:/framerusercontent.com/modules/VR3zQcyjVNwEvzMx5Bcf/bvtw9A5wPbhQWWzNNQsK/Time.js","https:/framerusercontent.com/modules/nogwZ2NZOXokxDp8oI1p/By1msHxNY5JCdh6nGCjg/TimeVisibility.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useRef,useState}from\"react\";const placeholderUrl=\"https://lottie.host/d826e0a7-b7e8-4072-8afe-c943ed2dd2ca/DpX3m5yT5Z.lottie\";/**\n * DOT LOTTIE\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function DotLottie(props){return /*#__PURE__*/_jsx(OptimizationFriendly,{loading:/*#__PURE__*/_jsx(\"div\",{}),loaded:/*#__PURE__*/_jsx(LottiePlayer,{...props})});}function LottiePlayer(props){/* Checks */const isCanvas=RenderTarget.current()===RenderTarget.canvas;const lottieInstanceRef=useRef(null);const shouldPlay=isCanvas||props.hover===true||props.autoplay===false?null:true;/* File or URL */let src;switch(props.srcType){case\"url\":src=props.srcUrl;break;case\"file\":src=props.srcFile;break;default:src=placeholderUrl;break;}/* Progress */const[isReady,setIsReady]=useState(false);/* For canvas states */useEffect(()=>{if(!lottieInstanceRef.current)return;lottieInstanceRef.current.addEventListener(\"ready\",()=>setIsReady(true));},[]);useEffect(()=>{if(!lottieInstanceRef.current)return;lottieInstanceRef.current.seek(`${props.progress}%`);},[isReady,props.progress]);const lastVariant=useRef();/* For component variant support */useEffect(()=>{if(isCanvas)return;if(lastVariant.current!==props.autoplay){if(!lottieInstanceRef.current)return;if(props.autoplay===true){lottieInstanceRef.current.play();}if(props.autoplay===false){lottieInstanceRef.current.pause();}}lastVariant.current=props.autoplay;},[props.autoplay]);return(// @ts-ignore\n/*#__PURE__*/_jsx(\"dotlottie-player\",{src:src,ref:lottieInstanceRef,autoplay:shouldPlay,loop:props.loop?true:null,hover:props.hover?true:null,controls:props.controls?true:null,background:props.background?props.background:null,speed:props.speed,direction:props.direction,style:{...props.style,width:\"100%\",height:\"100%\"}},src));}DotLottie.defaultProps={srcUrl:placeholderUrl,autoplay:true,background:\"#05F\",controls:false,direction:1,hover:false,loop:true,speed:1};DotLottie.displayName=\"Dot Lottie\";addPropertyControls(DotLottie,{srcType:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Source\",options:[\"url\",\"file\"],optionTitles:[\"URL\",\"File\"]},srcUrl:{type:ControlType.String,title:\"Link\",placeholder:\"../example.lottie\",hidden:props=>props.srcType===\"file\"},srcFile:{type:ControlType.File,title:\"File\",allowedFileTypes:[\".lottie\",\".json\"],hidden:props=>props.srcType===\"url\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:true},background:{type:ControlType.Color,title:\"Backdrop\",defaultValue:\"#05F\"},controls:{type:ControlType.Boolean,title:\"Controls\"},direction:{type:ControlType.Enum,title:\"Direction\",defaultValue:\"1\",displaySegmentedControl:true,segmentedControlDirection:\"horizontal\",options:[\"1\",\"-1\"],optionTitles:[\"Normal\",\"Reverse\"]},hover:{type:ControlType.Boolean,title:\"Hover Play\"},loop:{type:ControlType.Boolean,title:\"Loop\"},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:1,max:10,unit:\"x\",step:.5,displayStepper:true},progress:{type:ControlType.Number,title:\"Progress\",defaultValue:0,min:0,max:100,step:1,description:\"This component is made for Lottie files. [Learn more here](https://dotlottie.io/).\"}});/* For SSG */function OptimizationFriendly({loading,loaded}){const[isLoading,setLoading]=React.useState(true);// We can't load web-components in ssg on the server,\n// so we defer rendering until we hit the client.\nReact.useEffect(()=>{import(\"https://unpkg.com/@dotlottie/player-component@2.7.12/dist/dotlottie-player.js\").then(()=>{setLoading(false);});},[]);return isLoading?loading:loaded;}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DotLottie\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DotLottie.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export function withDubaiTime(Component){return props=>{const[time,setTime]=useState(\"\");useEffect(()=>{const update=()=>{const now=new Date;const formatted=now.toLocaleTimeString(\"en-US\",{timeZone:\"Europe/London\",hour:\"2-digit\",minute:\"2-digit\",hour12:true});setTime(formatted);};update();const interval=setInterval(update,1e3);return()=>clearInterval(interval);},[]);return /*#__PURE__*/_jsx(Component,{...props,text:time});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDubaiTime\":{\"type\":\"reactHoc\",\"name\":\"withDubaiTime\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Time.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export function TimeVisibility(Component){return props=>{const[visible,setVisible]=useState(()=>{const hour=new Date().getUTCHours();return hour>=9&&hour<19;});useEffect(()=>{const check=()=>{const hour=new Date().getUTCHours();setVisible(hour>=9&&hour<19);};const interval=setInterval(check,6e4);return()=>clearInterval(interval);},[]);if(!visible){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"},children:/*#__PURE__*/_jsx(Component,{...props})});}return /*#__PURE__*/_jsx(Component,{...props});};}export function TimeVisibilityInverted(Component){return props=>{const[visible,setVisible]=useState(()=>{const hour=new Date().getUTCHours();return hour<9||hour>=19;});useEffect(()=>{const check=()=>{const hour=new Date().getUTCHours();setVisible(hour<9||hour>=19);};const interval=setInterval(check,6e4);return()=>clearInterval(interval);},[]);if(!visible){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"},children:/*#__PURE__*/_jsx(Component,{...props})});}return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"TimeVisibilityInverted\":{\"type\":\"reactHoc\",\"name\":\"TimeVisibilityInverted\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"TimeVisibility\":{\"type\":\"reactHoc\",\"name\":\"TimeVisibility\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TimeVisibility.map"],"mappings":"sMASG,SAAwB,EAAU,EAAM,CAAC,OAAoB,EAAK,EAAqB,CAAC,QAAqB,EAAK,MAAM,CAAC,CAAC,EAAE,OAAoB,EAAK,EAAa,CAAC,GAAG,CAAK,CAAC,CAAC,CAAC,CAAE,CAAC,SAAS,EAAa,EAAM,CAAa,IAAM,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAa,EAAkBA,EAAO,IAAI,EAAQ,EAAW,GAAU,EAAM,QAAQ,IAAM,EAAM,WAAW,GAAM,KAAK,GAA0B,EAAI,OAAO,EAAM,QAAb,CAAsB,IAAI,MAAM,EAAI,EAAM,OAAO,MAAM,IAAI,OAAO,EAAI,EAAM,QAAQ,MAAM,QAAQ,EAAI,EAAe,KAAM,CAAe,GAAK,CAAC,EAAQ,GAAYC,EAAS,EAAK,EAAyB,MAAc,CAAK,EAAkB,SAAe,EAAkB,QAAQ,iBAAiB,YAAY,EAAW,EAAI,CAAC,CAAE,EAAE,CAAC,CAAC,EAAE,MAAc,CAAK,EAAkB,SAAe,EAAkB,QAAQ,KAAK,GAAG,EAAM,SAAS,EAAE,CAAE,EAAE,CAAC,EAAQ,EAAM,QAAQ,CAAC,EAAE,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