{"version":3,"file":"Time.XAIvalUJ.mjs","names":["moment"],"sources":["https:/framerusercontent.com/modules/DmCGm4ywP4nTBcBcQz5t/FniH8AhNd5CAozR5Peen/Time.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------\n * Time\n * --------------------------------------------------------------------\n * Distributed under the VIAL License:\n * https://www.abruptive.com/policies/vial\n *\n * Unauthorized access or use of this code will result in prosecution\n * according to the furthest extent of the law.\n *\n * © Abruptive LLC · All Rights Reserved\n * --------------------------------------------------------------------\n */import{jsx as _jsx}from\"react/jsx-runtime\";import moment from\"moment\";import{addPropertyControls,ControlType}from\"framer\";import{isFramer}from\"https://framer.com/m/Capsule-oSSG.js\";/**\n * --------------------------------------------------------------------\n * Component\n * --------------------------------------------------------------------\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth 100%\n * @framerSupportedLayoutHeight 100%\n */export default function Time(props){const{dateString,formatString,font,color}=props;// Attempt to parse the given date string\nlet finalDateText=\"\";if(dateString){const parsedDate=moment(dateString);if(parsedDate.isValid()){finalDateText=parsedDate.format(formatString);}else if(isFramer){finalDateText=\"Invalid Date\";}}else if(isFramer){finalDateText=\"No date string provided\";}const textStyle={color,...font};return /*#__PURE__*/_jsx(\"div\",{style:textStyle,children:finalDateText});}/**\n * --------------------------------------------------------------------\n * Time\n * --------------------------------------------------------------------\n */Time.defaultProps={dateString:\"2024-10-28T00:34:00\",formatString:\"MMMM D, YYYY\",color:\"#ffffff\",font:{family:\"Inter\"}};/**\n * --------------------------------------------------------------------\n * Controls\n * --------------------------------------------------------------------\n */addPropertyControls(Time,{dateString:{title:\"Date/Time\",type:ControlType.String,defaultValue:\"2024-10-28T00:34:00\",description:\"Any valid date/time string parseable by Moment\"},formatString:{title:\"Format\",type:ControlType.String,defaultValue:\"MMMM D, YYYY\",description:\"Moment.js format string (e.g. 'h:mm A', 'YYYY-MM-DD', etc.)\"},font:{// @ts-ignore\ntype:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:\"Inter\"},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#ffffff\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Time\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"* @framerSupportedLayoutWidth 100%\",\"framerSupportedLayoutHeight\":\"100%\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Time.map"],"mappings":"qQAmBG,SAAwB,EAAK,EAAM,CAAC,GAAK,CAAC,aAAW,eAAa,OAAK,SAAO,EAC7E,EAAc,GAAG,GAAG,EAAW,CAAC,IAAM,EAAWA,EAAO,EAAW,CAAI,EAAW,SAAS,CAAE,EAAc,EAAW,OAAO,EAAa,CAAU,IAAU,EAAc,qBAAyB,IAAU,EAAc,2BAA2D,OAAoB,EAAK,MAAM,CAAC,MAAhD,CAAC,QAAM,GAAG,EAAK,CAAiD,SAAS,EAAc,CAAC,kBARtT,IAA2B,IAAoD,IAA2D,CAYrL,EAAK,aAAa,CAAC,WAAW,sBAAsB,aAAa,eAAe,MAAM,UAAU,KAAK,CAAC,OAAO,QAAQ,CAAC,CAItH,EAAoB,EAAK,CAAC,WAAW,CAAC,MAAM,YAAY,KAAK,EAAY,OAAO,aAAa,sBAAsB,YAAY,iDAAiD,CAAC,aAAa,CAAC,MAAM,SAAS,KAAK,EAAY,OAAO,aAAa,eAAe,YAAY,8DAA8D,CAAC,KAAK,CACrV,KAAK,EAAY,KAAK,MAAM,OAAO,SAAS,WAAW,aAAa,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,aAAa,aAAa,UAAU,CAAC,CAAC"}