{"version":3,"file":"shared-lib.c2mswOOY.mjs","names":["React.useState","React.useCallback","React.useMemo"],"sources":["https:/framerusercontent.com/modules/hZL5UVTWQcgl3cJOWHDU/XkcWegQCN1RC5bCqLmSl/WeddingCountdown.js","https:/framerusercontent.com/modules/pLgs7kgzF5NF1zJjo6YM/Ska8Kjs5SiOoDHTUok52/Z_jN3RR1D.js"],"sourcesContent":["// User request: Create a new self-contained Framer code component named “Wedding Countdown”. It must calculate a live countdown from the visitor’s current time to an editable target date/time, defaulting to 2027-06-12T00:00:00+02:00 (Europe/Warsaw wedding date). Display exactly four values: days, hours, minutes, seconds. Update every second and clamp at zero after the event. Visually match a refined wedding editorial site: use Cormorant Garamond for the large values, in uppercase, with tabular numerals to prevent shifting. Keep each unit arranged in a responsive horizontal row that can wrap cleanly on narrow widths. Expose property controls for targetDate, textColor, labelColor, fontSize, labelSize, gap, and alignment. Avoid external requests and make it accessible with an aria-label describing the remaining time. This is a new canvas-insertable code component, not an override.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const defaultTargetDate=\"2027-06-12T00:00:00+02:00\";function getTimeLeft(targetDate){const targetMs=new Date(targetDate).getTime();const nowMs=Date.now();if(!Number.isFinite(targetMs)){return{days:0,hours:0,minutes:0,seconds:0};}const diff=Math.max(0,targetMs-nowMs);const totalSeconds=Math.floor(diff/1e3);const days=Math.floor(totalSeconds/86400);const hours=Math.floor(totalSeconds%86400/3600);const minutes=Math.floor(totalSeconds%3600/60);const seconds=totalSeconds%60;return{days,hours,minutes,seconds};}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function WeddingCountdown(props){const{targetDate=defaultTargetDate,textColor=\"#000000\",labelColor=\"#CCCCCC\",headingFont={fontSize:64,lineHeight:1,letterSpacing:\"0.06em\",fontWeight:500,fontStyle:\"normal\"},uppercaseNumbers=true,showLabels=true,labelSize=14,labelGap=8,gap=24,alignment=\"center\"}=props;const[timeLeft,setTimeLeft]=React.useState(()=>getTimeLeft(targetDate));const updateCountdown=React.useCallback(()=>{const next=getTimeLeft(targetDate);React.startTransition(()=>{setTimeLeft(next);});},[targetDate]);React.useEffect(()=>{updateCountdown();if(typeof window!==\"undefined\"){const intervalId=window.setInterval(updateCountdown,1e3);return()=>window.clearInterval(intervalId);}return undefined;},[updateCountdown]);const units=React.useMemo(()=>[{label:\"Dni\",value:timeLeft.days},{label:\"Godziny\",value:timeLeft.hours},{label:\"Minuty\",value:timeLeft.minutes},{label:\"Sekundy\",value:timeLeft.seconds}],[timeLeft.days,timeLeft.hours,timeLeft.minutes,timeLeft.seconds]);const justifyContent=React.useMemo(()=>{if(alignment===\"left\")return\"flex-start\";if(alignment===\"right\")return\"flex-end\";return\"center\";},[alignment]);const ariaLabel=React.useMemo(()=>`Do ślubu pozostało: ${timeLeft.days} dni, ${timeLeft.hours} godzin, ${timeLeft.minutes} minut, ${timeLeft.seconds} sekund.`,[timeLeft.days,timeLeft.hours,timeLeft.minutes,timeLeft.seconds]);return /*#__PURE__*/_jsx(\"section\",{role:\"timer\",\"aria-live\":\"polite\",\"aria-atomic\":\"true\",\"aria-label\":ariaLabel,style:{position:\"relative\",width:\"100%\",display:\"flex\",flexWrap:\"wrap\",justifyContent,alignItems:\"flex-start\",gap},children:units.map(unit=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:alignment===\"left\"?\"flex-start\":alignment===\"right\"?\"flex-end\":\"center\",minWidth:\"max-content\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,fontFamily:headingFont.fontFamily||'\"Cormorant Garamond\", \"Times New Roman\", serif',fontSize:headingFont.fontSize??64,lineHeight:headingFont.lineHeight??1,letterSpacing:headingFont.letterSpacing??\"0.06em\",fontVariantNumeric:\"lining-nums tabular-nums\",fontFeatureSettings:'\"lnum\" 1, \"tnum\" 1',fontWeight:headingFont.fontWeight??500,fontStyle:headingFont.fontStyle??\"normal\",textTransform:uppercaseNumbers?\"uppercase\":\"none\"},children:String(unit.value).padStart(2,\"0\")}),showLabels?/*#__PURE__*/_jsx(\"span\",{style:{marginTop:labelGap,color:labelColor,fontSize:labelSize,lineHeight:1.2,letterSpacing:\"0.14em\",fontVariantNumeric:\"tabular-nums\",fontFeatureSettings:'\"tnum\" 1',fontWeight:500,textTransform:\"uppercase\"},children:unit.label}):null]},unit.label))});}addPropertyControls(WeddingCountdown,{targetDate:{type:ControlType.Date,title:\"Target Date\",defaultValue:defaultTargetDate,displayTime:true},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},headingFont:{type:ControlType.Font,title:\"Kr\\xf3j cyfr\",defaultValue:{fontSize:64,variant:\"Medium\",letterSpacing:\"0.06em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},uppercaseNumbers:{type:ControlType.Boolean,title:\"Wersaliki cyfr\",defaultValue:true,enabledTitle:\"Tak\",disabledTitle:\"Nie\"},showLabels:{type:ControlType.Boolean,title:\"Pokaż etykiety\",defaultValue:true,enabledTitle:\"Tak\",disabledTitle:\"Nie\"},labelColor:{type:ControlType.Color,title:\"Label Color\",defaultValue:\"#CCCCCC\"},labelSize:{type:ControlType.Number,title:\"Label Size\",defaultValue:14,min:8,max:48,step:1},labelGap:{type:ControlType.Number,title:\"Odstęp od etykiety\",defaultValue:8,min:0,max:64,step:1},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:24,min:0,max:120,step:1},alignment:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"center\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WeddingCountdown\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WeddingCountdown.map","// Generated by Framer (65a4904)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"FS;Montserrat-regular\",\"FS;Montserrat-bold\",\"FS;Montserrat-bold italic\",\"FS;Montserrat-italic\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Montserrat\",source:\"fontshare\",style:\"normal\",uiFamilyName:\"Montserrat\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/NZ67QOF3FXYLOR27ABJOZVKKBKNRMKMF/EHBFE55HTLOOJHTZSLD54GSL3EBTAFNQ/DI2GHUWG3WKRXISSCTNDMTWKWZC25UIW.woff2\",weight:\"400\"},{cssFamilyName:\"Montserrat\",source:\"fontshare\",style:\"normal\",uiFamilyName:\"Montserrat\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/KDZE2GHZ4MXZP7RVHASNN75AFABT2ZB2/G33WYZOWF5RLCYVGCMU5BFGBXH4DMKUK/SHZ3SDA4YUDBQPNRSIGO7XNSCQQUBDYR.woff2\",weight:\"700\"},{cssFamilyName:\"Montserrat\",source:\"fontshare\",style:\"italic\",uiFamilyName:\"Montserrat\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/WVRVHC26IF7VQKSULH6U5DSAGCYOIAQ7/CPARYH2DVA55XB4ZSTA7WTMPVZAVMNA5/BOBO2BRVXZQHPXSPDS5WN3IZQ5SL56OZ.woff2\",weight:\"700\"},{cssFamilyName:\"Montserrat\",source:\"fontshare\",style:\"italic\",uiFamilyName:\"Montserrat\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/CC6FT7O535LIU5P34T6V2W7R57LGKSDT/KUZZS4REMM64PV6S4GGM77HZQUVJPYU2/3ZPIFBJ6EZFOZSYT4ISIO7DHQQODA5IR.woff2\",weight:\"400\"}]}];export const css=['.framer-hTyMu .framer-styles-preset-c3ssem:not(.rich-text-wrapper), .framer-hTyMu .framer-styles-preset-c3ssem.rich-text-wrapper p { --framer-font-family: \"Montserrat\", \"Montserrat Placeholder\", sans-serif; --framer-font-family-bold: \"Montserrat\", \"Montserrat Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Montserrat\", \"Montserrat Placeholder\", sans-serif; --framer-font-family-italic: \"Montserrat\", \"Montserrat Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv09\\' on, \\'cv11\\' on; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: -0.005em; --framer-line-height: 1.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-01f47848-21f2-4514-8807-37b3b27cd8b1, #4d4d4d); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; --framer-text-wrap: balance; }','@media (max-width: 767px) and (min-width: 320px) { .framer-hTyMu .framer-styles-preset-c3ssem:not(.rich-text-wrapper), .framer-hTyMu .framer-styles-preset-c3ssem.rich-text-wrapper p { --framer-font-family: \"Montserrat\", \"Montserrat Placeholder\", sans-serif; --framer-font-family-bold: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-family-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv09\\' on, \\'cv11\\' on; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: -0.005em; --framer-line-height: 1.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-01f47848-21f2-4514-8807-37b3b27cd8b1, #4d4d4d); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; --framer-text-wrap: balance; } }','@media (max-width: 319px) and (min-width: 0px) { .framer-hTyMu .framer-styles-preset-c3ssem:not(.rich-text-wrapper), .framer-hTyMu .framer-styles-preset-c3ssem.rich-text-wrapper p { --framer-font-family: \"Montserrat\", \"Montserrat Placeholder\", sans-serif; --framer-font-family-bold: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-family-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv09\\' on, \\'cv11\\' on; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: -0.005em; --framer-line-height: 1.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-01f47848-21f2-4514-8807-37b3b27cd8b1, #4d4d4d); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; --framer-text-wrap: balance; } }'];export const className=\"framer-hTyMu\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"6NAC6L,SAAS,EAAY,EAAW,CAAC,IA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