{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/HYcHVPAbe8jLEeU7c4mp/QiycTxX7vdblEOi3o00G/Time.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget,useLocaleCode}from\"framer\";import{startTransition,useCallback,useEffect,useRef,useState}from\"react\";const fontStack=`\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"`;function formatTimeOrDate(outputType,{showYear,showMonth,showWeekday,showMinutes,showSeconds},timeFormat,monthFormat,localCode){const date=new Date;const onlyYearIsShown=!showWeekday&&!showMonth&&showYear;switch(outputType){case\"date\":return new Intl.DateTimeFormat(localCode,{weekday:showWeekday?\"long\":undefined,day:onlyYearIsShown?undefined:\"numeric\",month:showMonth?monthFormat:undefined,year:showYear?\"numeric\":undefined}).format(date);case\"time\":return new Intl.DateTimeFormat(localCode,{hour:\"numeric\",minute:showMinutes?\"numeric\":undefined,second:showSeconds&&showMinutes?\"numeric\":undefined,hour12:timeFormat===\"12h\"}).format(date);default:return new Intl.DateTimeFormat(localCode).format(date);}}const defaultProps={height:20,width:140,outputType:\"time\",color:\"#999\",timeFormat:\"24h\",showYear:true,showMonth:true,showWeekday:true,showMinutes:true,showSeconds:true,monthFormat:\"long\",alignment:\"center\"};/**\n * TIME AND DATE\n * FORKED FROM PROTOTYPING\n *\n * @framerIntrinsicWidth 140\n * @framerIntrinsicHeight 20\n *\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export function Time(props){const mergedProps={...defaultProps,...props};const{outputType,timeFormat,showYear,showMonth,showWeekday,// showHours,\nshowMinutes,showSeconds,monthFormat,color,font,tabularFont}=mergedProps;const localCode=useLocaleCode();const getTextContent=useCallback(()=>formatTimeOrDate(outputType,{showYear,showMonth,showWeekday,// showHours,\n    showMinutes,showSeconds},timeFormat,monthFormat,localCode),[localCode,monthFormat,outputType,showMinutes,showMonth,showSeconds,showWeekday,showYear,timeFormat]);const timeoutRef=useRef()// FIXME: With React 19, we can remove this and return a cleanup from the ref callback\n;const updateCountdown=useCallback(node=>{if(node===null){// React calls w/ `null` on unmount or if the ref function changes.\nclearTimeout(timeoutRef.current);return;}let prev;const tick=()=>{const date=new Date;const next=new Date().setSeconds(date.getSeconds()+1,0)-+date;timeoutRef.current=setTimeout(tick,next);const textContent=getTextContent();if(prev!==textContent){node.textContent=textContent;prev=textContent;}};tick();},[getTextContent]);const[visible,setIsVisible]=useState(false);const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{startTransition(()=>setIsVisible(true));// Don\u2019t want real time on Canvas\nif(isCanvas)return;},[isCanvas]);return /*#__PURE__*/_jsx(\"p\",{suppressHydrationWarning:true,style:{margin:0,padding:0,color,fontFamily:fontStack,fontWeight:500,fontSize:16,lineHeight:1,visibility:visible?\"visible\":\"hidden\",...font,fontVariantNumeric:tabularFont?\"tabular-nums\":\"normal\",whiteSpace:\"nowrap\"},ref:isCanvas?undefined:updateCountdown,children:getTextContent()});}Time.displayName=\"Time & Date\";addPropertyControls(Time,{outputType:{title:\"Type\",type:ControlType.Enum,displaySegmentedControl:true,options:[\"date\",\"time\"],optionTitles:[\"Date\",\"Time\"],defaultValue:defaultProps.outputType},showWeekday:{title:\"Day\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:defaultProps.showWeekday,hidden:props=>props.outputType!==\"date\"},showMonth:{title:\"Month\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:defaultProps.showMonth,hidden:props=>props.outputType!==\"date\"},monthFormat:{title:\"Format\",type:ControlType.Enum,options:[\"short\",\"long\",\"numeric\"],optionTitles:[\"Short\",\"Long\",\"Numeric\"],defaultValue:defaultProps.monthFormat,hidden:props=>props.outputType!==\"date\"||!props.showMonth},showYear:{title:\"Year\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:defaultProps.showYear,hidden:props=>props.outputType!==\"date\"},timeFormat:{title:\"Format\",type:ControlType.Enum,options:[\"12h\",\"24h\"],optionTitles:[\"12h\",\"24h\"],displaySegmentedControl:true,defaultValue:defaultProps.timeFormat,hidden:props=>props.outputType!==\"time\"},// showHours: {\n//     title: \"Hours\",\n//     type: ControlType.Boolean,\n//     enabledTitle: \"Show\",\n//     disabledTitle: \"Hide\",\n//     defaultValue: defaultProps.showHours,\n//     hidden: (props) => props.outputType !== \"time\",\n// },\nshowMinutes:{title:\"Minutes\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:defaultProps.showMinutes,hidden:props=>props.outputType!==\"time\"},showSeconds:{title:\"Seconds\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:defaultProps.showSeconds,hidden:props=>props.outputType!==\"time\"||!props.showMinutes},font:{type:ControlType.Font,controls:\"extended\"},tabularFont:{title:\"Tabular\",type:ControlType.Boolean,defaultValue:true},color:{type:ControlType.Color,defaultValue:defaultProps.color}});\nexport const __FramerMetadata__ = {\"exports\":{\"Time\":{\"type\":\"reactComponent\",\"name\":\"Time\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"20\",\"framerSupportedLayoutHeight\":\"any\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"140\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Time.map"],
  "mappings": "0IAAmM,IAAMA,EAAU,oKAAoK,SAASC,EAAiBC,EAAW,CAAC,SAAAC,EAAS,UAAAC,EAAU,YAAAC,EAAY,YAAAC,EAAY,YAAAC,CAAW,EAAEC,EAAWC,EAAYC,EAAU,CAAC,IAAMC,EAAK,IAAI,KAAWC,EAAgB,CAACP,GAAa,CAACD,G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AAY,CAAC,MAAM,SAAS,KAAKyB,EAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,SAAS,EAAE,aAAa,CAAC,QAAQ,OAAO,SAAS,EAAE,aAAa3B,EAAa,YAAY,OAAOE,GAAOA,EAAM,aAAa,QAAQ,CAACA,EAAM,SAAS,EAAE,SAAS,CAAC,MAAM,OAAO,KAAKyB,EAAY,QAAQ,aAAa,OAAO,cAAc,OAAO,aAAa3B,EAAa,SAAS,OAAOE,GAAOA,EAAM,aAAa,MAAM,EAAE,WAAW,CAAC,MAAM,SAAS,KAAKyB,EAAY,KAAK,QAAQ,CAAC,MAAM,KAAK,EAAE,aAAa,CAAC,MAAM,KAAK,EAAE,wBAAwB,GAAK,aAAa3B,EAAa,WAAW,OAAOE,GAAOA,EAAM,aAAa,MAAM,EAQx/C,YAAY,CAAC,MAAM,UAAU,KAAKyB,EAAY,QAAQ,aAAa,OAAO,cAAc,OAAO,aAAa3B,EAAa,YAAY,OAAOE,GAAOA,EAAM,aAAa,MAAM,EAAE,YAAY,CAAC,MAAM,UAAU,KAAKyB,EAAY,QAAQ,aAAa,OAAO,cAAc,OAAO,aAAa3B,EAAa,YAAY,OAAOE,GAAOA,EAAM,aAAa,QAAQ,CAACA,EAAM,WAAW,EAAE,KAAK,CAAC,KAAKyB,EAAY,KAAK,SAAS,UAAU,EAAE,YAAY,CAAC,MAAM,UAAU,KAAKA,EAAY,QAAQ,aAAa,EAAI,EAAE,MAAM,CAAC,KAAKA,EAAY,MAAM,aAAa3B,EAAa,KAAK,CAAC,CAAC",
  "names": ["fontStack", "formatTimeOrDate", "outputType", "showYear", "showMonth", "showWeekday", "showMinutes", "showSeconds", "timeFormat", "monthFormat", "localCode", "date", "onlyYearIsShown", "defaultProps", "Time", "props", "mergedProps", "color", "font", "tabularFont", "useLocaleCode", "getTextContent", "te", "timeoutRef", "pe", "updateCountdown", "node", "prev", "tick", "next", "textContent", "visible", "setIsVisible", "ye", "isCanvas", "RenderTarget", "ue", "Z", "p", "addPropertyControls", "ControlType"]
}
