{"version":3,"file":"Time.C59IOCMz.mjs","names":["React.useState","React.useMemo","_Fragment"],"sources":["https:/framerusercontent.com/modules/zxRMJHIkwxmYQyqLEJmG/9Mf1wLpH3FeU71E45WOd/Time.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Запасной список используется только в браузерах,\n * где Intl.supportedValuesOf(\"timeZone\") недоступен.\n */const FALLBACK_TIMEZONES=[\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Johannesburg\",\"Africa/Lagos\",\"Africa/Nairobi\",\"America/Anchorage\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Chicago\",\"America/Denver\",\"America/Halifax\",\"America/Honolulu\",\"America/Los_Angeles\",\"America/Mexico_City\",\"America/New_York\",\"America/Phoenix\",\"America/Sao_Paulo\",\"America/Toronto\",\"America/Vancouver\",\"Asia/Bangkok\",\"Asia/Dubai\",\"Asia/Hong_Kong\",\"Asia/Jerusalem\",\"Asia/Kolkata\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Tokyo\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Berlin\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Oslo\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Warsaw\",\"Europe/Zurich\",\"Pacific/Auckland\",\"Pacific/Fiji\",\"Pacific/Guam\",\"Pacific/Honolulu\"];function getSupportedTimeZones(){try{const supportedValuesOf=Intl.supportedValuesOf;if(typeof supportedValuesOf===\"function\"){const zones=supportedValuesOf.call(Intl,\"timeZone\");if(Array.isArray(zones)&&zones.length>0){return zones;}}}catch(error){console.warn(\"Could not load the complete IANA timezone list.\",error);}return FALLBACK_TIMEZONES;}/**\n * Australia/Melbourne → Melbourne\n * America/Argentina/Buenos_Aires → Buenos Aires\n * Pacific/Port_Moresby → Port Moresby\n */function getCityName(timeZone){const parts=timeZone.split(\"/\");const rawCity=parts[parts.length-1]||timeZone;return rawCity.replaceAll(\"_\",\" \");}/**\n * Названия для выпадающего списка:\n * Melbourne — Australia\n * New York — America\n * Buenos Aires — Argentina\n */function getTimeZoneTitle(timeZone){const parts=timeZone.split(\"/\");const city=getCityName(timeZone);if(parts.length>=3){const area=parts[parts.length-2].replaceAll(\"_\",\" \");return`${city} — ${area}`;}if(parts.length>=2){const region=parts[0].replaceAll(\"_\",\" \");return`${city} — ${region}`;}return city;}const TIMEZONES=Array.from(new Set(getSupportedTimeZones())).sort((a,b)=>{const cityA=getCityName(a);const cityB=getCityName(b);return cityA.localeCompare(cityB,\"en\",{sensitivity:\"base\",numeric:true});});const TIMEZONE_TITLES=TIMEZONES.map(getTimeZoneTitle);function getTimeParts(date,timeZone,hourFormat){try{const formatter=new Intl.DateTimeFormat(hourFormat===\"12\"?\"en-US\":\"en-GB\",{timeZone,hour:\"2-digit\",minute:\"2-digit\",hour12:hourFormat===\"12\"});const parts=formatter.formatToParts(date);const getPart=type=>parts.find(part=>part.type===type)?.value??\"\";return{hour:getPart(\"hour\"),minute:getPart(\"minute\"),dayPeriod:getPart(\"dayPeriod\").toUpperCase()};}catch(error){console.warn(`Invalid timezone: ${timeZone}`,error);return{hour:\"--\",minute:\"--\",dayPeriod:\"\"};}}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 320\n * @framerIntrinsicHeight 24\n */export default function WorldClock(props){const{timeZone=\"Australia/Melbourne\",locationLabel=\"South Yarra, AUS\",hourFormat=\"12\",blinkColon=true,blinkDuration=1,gap=12,verticalAlign=\"center\",timeFont={fontFamily:\"Roboto\",fontSize:16,fontWeight:400,lineHeight:\"1.4em\",letterSpacing:\"-0.03em\"},timeColor=\"#FFFFFF\",timeOpacity=.5,locationFont={fontFamily:\"Roboto\",fontSize:16,fontWeight:400,lineHeight:\"1.4em\",letterSpacing:\"-0.03em\"},locationColor=\"#FFFFFF\",locationOpacity=1,style}=props;const[now,setNow]=React.useState(()=>new Date);React.useEffect(()=>{const interval=window.setInterval(()=>{setNow(new Date);},1e3);return()=>window.clearInterval(interval);},[]);const{hour,minute,dayPeriod}=React.useMemo(()=>getTimeParts(now,timeZone,hourFormat),[now,timeZone,hourFormat]);const displayedLocation=locationLabel.trim()||getCityName(timeZone);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                /*\n                 * Жесткое цифровое мигание:\n                 * двоеточие мгновенно включается и выключается,\n                 * без плавного изменения opacity.\n                 */\n                @keyframes framer-world-clock-colon-pulse {\n                    0%,\n                    49.999% {\n                        opacity: 1;\n                    }\n\n                    50%,\n                    99.999% {\n                        opacity: 0;\n                    }\n\n                    100% {\n                        opacity: 1;\n                    }\n                }\n\n                /*\n                 * Позволяет выделять и копировать текст.\n                 * Курсор отображается как текстовая каретка,\n                 * а не как палец или ссылка.\n                 */\n                .framer-world-clock-selectable,\n                .framer-world-clock-selectable * {\n                    -webkit-user-select: text !important;\n                    user-select: text !important;\n                    cursor: text !important;\n                }\n\n                .framer-world-clock-selectable::selection,\n                .framer-world-clock-selectable *::selection {\n                    background: rgba(70, 130, 255, 0.38);\n                }\n            `}),/*#__PURE__*/_jsxs(\"div\",{className:\"framer-world-clock-selectable\",style:{display:\"flex\",flexDirection:\"row\",alignItems:verticalAlign,width:\"max-content\",maxWidth:\"100%\",minWidth:0,gap,whiteSpace:\"nowrap\",cursor:\"text\",userSelect:\"text\",WebkitUserSelect:\"text\",pointerEvents:\"auto\",boxSizing:\"border-box\",...style},children:[/*#__PURE__*/_jsxs(\"span\",{style:{display:\"inline-flex\",alignItems:\"baseline\",flexShrink:0,color:timeColor,opacity:timeOpacity,whiteSpace:\"nowrap\",cursor:\"text\",userSelect:\"text\",WebkitUserSelect:\"text\",fontVariantNumeric:\"tabular-nums\",...timeFont},children:[/*#__PURE__*/_jsx(\"span\",{children:hour}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"inline-block\",animation:blinkColon&&blinkDuration>0?`framer-world-clock-colon-pulse ${blinkDuration}s steps(1, end) infinite`:\"none\"},children:\":\"}),/*#__PURE__*/_jsx(\"span\",{children:minute}),hourFormat===\"12\"&&dayPeriod&&/*#__PURE__*/_jsxs(\"span\",{children:[\"\\xa0\",dayPeriod]})]}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",minWidth:0,color:locationColor,opacity:locationOpacity,whiteSpace:\"nowrap\",cursor:\"text\",userSelect:\"text\",WebkitUserSelect:\"text\",...locationFont},children:displayedLocation})]})]});}WorldClock.defaultProps={timeZone:\"Australia/Melbourne\",locationLabel:\"South Yarra, AUS\",hourFormat:\"12\",blinkColon:true,blinkDuration:1,gap:12,verticalAlign:\"center\",timeColor:\"#FFFFFF\",timeOpacity:.5,locationColor:\"#FFFFFF\",locationOpacity:1,timeFont:{fontFamily:\"Roboto\",fontSize:16,fontWeight:400,lineHeight:\"1.4em\",letterSpacing:\"-0.03em\"},locationFont:{fontFamily:\"Roboto\",fontSize:16,fontWeight:400,lineHeight:\"1.4em\",letterSpacing:\"-0.03em\"}};addPropertyControls(WorldClock,{timeZone:{type:ControlType.Enum,title:\"Time Zone\",options:TIMEZONES,optionTitles:TIMEZONE_TITLES,defaultValue:\"Australia/Melbourne\"},locationLabel:{type:ControlType.String,title:\"Location\",defaultValue:\"South Yarra, AUS\",placeholder:\"City, Country\"},hourFormat:{type:ControlType.Enum,title:\"Format\",options:[\"12\",\"24\"],optionTitles:[\"12 Hour\",\"24 Hour\"],defaultValue:\"12\",displaySegmentedControl:true},blinkColon:{type:ControlType.Boolean,title:\"Blink Colon\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},blinkDuration:{type:ControlType.Number,title:\"Blink Speed\",defaultValue:1,min:.2,max:4,step:.1,unit:\"s\",hidden:props=>!props.blinkColon},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,min:0,max:200,step:1,unit:\"px\"},verticalAlign:{type:ControlType.Enum,title:\"Alignment\",options:[\"flex-start\",\"center\",\"flex-end\"],optionTitles:[\"Top\",\"Center\",\"Bottom\"],defaultValue:\"center\",displaySegmentedControl:true},timeFont:{type:ControlType.Font,title:\"Time Font\",defaultFontType:\"sans-serif\",defaultFontSize:\"16px\",displayTextAlignment:false,displayFontSize:true,controls:\"extended\",defaultValue:{fontFamily:\"Roboto\",fontSize:16,fontWeight:400,lineHeight:\"1.4em\",letterSpacing:\"-0.03em\"}},timeColor:{type:ControlType.Color,title:\"Time Color\",defaultValue:\"#FFFFFF\"},timeOpacity:{type:ControlType.Number,title:\"Time Opacity\",defaultValue:.5,min:0,max:1,step:.05},locationFont:{type:ControlType.Font,title:\"Place Font\",defaultFontType:\"sans-serif\",defaultFontSize:\"16px\",displayTextAlignment:false,displayFontSize:true,controls:\"extended\",defaultValue:{fontFamily:\"Roboto\",fontSize:16,fontWeight:400,lineHeight:\"1.4em\",letterSpacing:\"-0.03em\"}},locationColor:{type:ControlType.Color,title:\"Place Color\",defaultValue:\"#FFFFFF\"},locationOpacity:{type:ControlType.Number,title:\"Place Opacity\",defaultValue:1,min:0,max:1,step:.05}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WorldClock\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"320\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\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