{"version":3,"file":"TimedVisibility.ejClAcVj.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/YqG1FdcAagUYVfZXSM3E/fFx7sFiKIlgPlCWQY1w0/nMg_eN8Kw.js","https:/framerusercontent.com/modules/YtV61ybsCAUqylkm9Kr8/6fSnXaOmJSTDGVAiARUA/TimedVisibility.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 9 C 0 4.029 4.029 0 9 0 C 13.971 0 18 4.029 18 9 C 18 13.971 13.971 18 9 18 C 4.029 18 0 13.971 0 9 Z\" fill-opacity=\"var(--1m6trwb, 0)\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"18px\" id=\"DPSMlZgb7\" transform=\"translate(3 3)\" width=\"18px\"/><path d=\"M 0 9 C 0 4.029 4.029 0 9 0 C 13.971 0 18 4.029 18 9 C 18 13.971 13.971 18 9 18 C 4.029 18 0 13.971 0 9 Z\" fill=\"transparent\" height=\"18px\" id=\"Z8oebytmo\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(3 3)\" width=\"18px\"/></svg>';const getProps=({alpha,color,height,id,width,width1,...props})=>{return{...props,ezTt3ayMo:color??props.ezTt3ayMo??\"rgb(0, 0, 0)\",lschgej4H:width1??props.lschgej4H??1.5,qxTvv_EBh:alpha??props.qxTvv_EBh};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,ezTt3ayMo,lschgej4H,qxTvv_EBh,...restProps}=getProps(props);const href=useSVGTemplate(\"2048327766\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-TLxVQ\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m6trwb\":qxTvv_EBh,\"--21h8s6\":ezTt3ayMo,\"--pgex8v\":lschgej4H,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-TLxVQ { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"ezTt3ayMo\":\"color\",\"lschgej4H\":\"width1\",\"qxTvv_EBh\":\"alpha\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Circle\",\"color\":{\"type\":\"variable\",\"value\":\"21h8s6\"},\"set\":{\"localId\":\"vectorSet/NGVKdicsm\",\"id\":\"NGVKdicsm\",\"moduleId\":\"omX0gWFPqDwhaiWwf6ab\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-TLxVQ\");Icon.displayName=\"Circle\";export default Icon;addPropertyControls(Icon,{ezTt3ayMo:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},lschgej4H:{defaultValue:1.5,displayStepper:true,hidden:false,max:6,min:0,step:.5,title:\"Width\",type:ControlType.Number},qxTvv_EBh:{defaultValue:0,displayStepper:true,hidden:false,max:1,min:0,step:.1,title:\"Alpha\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerImmutableVariables\":\"true\",\"framerVector\":\"{\\\"name\\\":\\\"Circle\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"21h8s6\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/NGVKdicsm\\\",\\\"id\\\":\\\"NGVKdicsm\\\",\\\"moduleId\\\":\\\"omX0gWFPqDwhaiWwf6ab\\\"}}\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerDisableUnlink\":\"true\",\"framerVariables\":\"{\\\"ezTt3ayMo\\\":\\\"color\\\",\\\"lschgej4H\\\":\\\"width1\\\",\\\"qxTvv_EBh\\\":\\\"alpha\\\"}\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"24\",\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// TimedVisibility: Shows content only during the specified hours in the selected timezone.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Show Content at Selected Time\n *\n * Shows its slot content only during the specified hours in the selected timezone.\n *\n * @framerIntrinsicWidth 30\n * @framerIntrinsicHeight 30\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ShowContentAtSelectedTime(props){const{hours=[{day:\"Monday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Tuesday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Wednesday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Thursday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Friday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Saturday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Sunday\",start:\"9 AM\",end:\"5 PM\"}],timezone,children,fallback}=props;// Convert 12-hour format to 24-hour\nconst convertTo24Hour=timeStr=>{const[time,period]=timeStr.split(\" \");let hour=parseInt(time);if(period===\"AM\"&&hour===12)hour=0;if(period===\"PM\"&&hour!==12)hour+=12;return hour;};const weekdays=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"];// Get current time in selected timezone and weekday\nconst isVisible=useMemo(()=>{if(typeof window===\"undefined\")return true;try{const now=new Date;const localTime=new Date(now.toLocaleString(\"en-US\",{timeZone:timezone}));const hour=localTime.getHours();const weekday=weekdays[localTime.getDay()];const config=hours.find(h=>h.day===weekday);if(!config||!config.start||!config.end)return fallback?false:true;const start24=convertTo24Hour(config.start);const end24=convertTo24Hour(config.end);if(start24<=end24){return hour>=start24&&hour<end24;}else{// Overnight (e.g. 10 PM - 6 AM)\nreturn hour>=start24||hour<end24;}}catch{return true;}},[hours,timezone]);// Always maintain minimum size, hide content with opacity when not visible\nif(!isVisible){// If out of span and fallback is provided, render it. If not, render nothing.\nif(fallback){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",minWidth:\"30px\",minHeight:\"30px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:fallback});}else{return null;}}return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",minWidth:\"30px\",minHeight:\"30px\",opacity:1,pointerEvents:\"auto\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:children});}addPropertyControls(ShowContentAtSelectedTime,{timezone:{type:ControlType.Enum,title:\"Timezone\",options:[\"America/New_York\",\"America/Chicago\",\"America/Denver\",\"America/Los_Angeles\",\"America/Toronto\",\"America/Vancouver\",\"America/Sao_Paulo\",\"America/Mexico_City\",\"Europe/London\",\"Europe/Berlin\",\"Europe/Paris\",\"Europe/Rome\",\"Europe/Madrid\",\"Europe/Amsterdam\",\"Asia/Tokyo\",\"Asia/Shanghai\",\"Asia/Hong_Kong\",\"Asia/Singapore\",\"Asia/Dubai\",\"Asia/Bangkok\",\"Australia/Sydney\",\"Asia/Kolkata\",\"Africa/Cairo\",\"Pacific/Auckland\"],optionTitles:[\"New York (EST/EDT)\",\"Chicago (CST/CDT)\",\"Denver (MST/MDT)\",\"Los Angeles (PST/PDT)\",\"Toronto (EST/EDT)\",\"Vancouver (PST/PDT)\",\"S\\xe3o Paulo (BRT)\",\"Mexico City (CST/CDT)\",\"London (GMT/BST)\",\"Berlin (CET/CEST)\",\"Paris (CET/CEST)\",\"Rome (CET/CEST)\",\"Madrid (CET/CEST)\",\"Amsterdam (CET/CEST)\",\"Tokyo (JST)\",\"Shanghai (CST)\",\"Hong Kong (HKT)\",\"Singapore (SGT)\",\"Dubai (GST)\",\"Bangkok (ICT)\",\"Sydney (AEDT/AEST)\",\"Mumbai (IST)\",\"Cairo (EET)\",\"Auckland (NZDT/NZST)\"],defaultValue:\"Europe/Berlin\"},hours:{type:ControlType.Array,title:\"Day Hours\",control:{type:ControlType.Object,controls:{day:{type:ControlType.Enum,options:[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\",\"Sunday\"],optionTitles:[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\",\"Sunday\"],defaultValue:\"Monday\"},start:{type:ControlType.Enum,options:[\"12 AM\",\"1 AM\",\"2 AM\",\"3 AM\",\"4 AM\",\"5 AM\",\"6 AM\",\"7 AM\",\"8 AM\",\"9 AM\",\"10 AM\",\"11 AM\",\"12 PM\",\"1 PM\",\"2 PM\",\"3 PM\",\"4 PM\",\"5 PM\",\"6 PM\",\"7 PM\",\"8 PM\",\"9 PM\",\"10 PM\",\"11 PM\"],defaultValue:\"9 AM\"},end:{type:ControlType.Enum,options:[\"12 AM\",\"1 AM\",\"2 AM\",\"3 AM\",\"4 AM\",\"5 AM\",\"6 AM\",\"7 AM\",\"8 AM\",\"9 AM\",\"10 AM\",\"11 AM\",\"12 PM\",\"1 PM\",\"2 PM\",\"3 PM\",\"4 PM\",\"5 PM\",\"6 PM\",\"7 PM\",\"8 PM\",\"9 PM\",\"10 PM\",\"11 PM\"],defaultValue:\"5 PM\"}}},maxCount:7,defaultValue:[{day:\"Monday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Tuesday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Wednesday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Thursday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Friday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Saturday\",start:\"9 AM\",end:\"5 PM\"},{day:\"Sunday\",start:\"9 AM\",end:\"5 PM\"}]},children:{type:ControlType.Slot,title:\"Content\",maxCount:1},fallback:{type:ControlType.Slot,title:\"Fallback Content\",maxCount:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ShowContentAtSelectedTime\",\"slots\":[\"children\",\"fallback\"],\"annotations\":{\"framerIntrinsicWidth\":\"30\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"30\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TimedVisibility.map"],"mappings":"iSAC2C,IAAqF,IAA4B,CAAoC,EAAK,0BAAgC,EAAkB,EAAW,SAAS,EAAM,EAAI,CAAC,OAAoB,EAAK,MAAM,CAAC,GAAG,EAAU,MAAI,SAAS,EAAM,SAAS,CAAC,EAAG,CAAO,EAAU,EAAO,OAAO,EAAK,CAAO,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAc,WAAa,MAAa,WAAS,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAa,WAAS,CAAC,EA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