{"version":3,"file":"BlogHeroFocus.BoGufl0z.mjs","names":["__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","window","init_jsx_runtime","c","ce","addPropertyControls","init_framer_Bf4_tcb2","BlogHeroFocus","el","anim","a","holdMs","hold","skipHold","scrollStart","CSS","COVER","init_BlogHeroFocus","ControlType"],"sources":["https:/framerusercontent.com/modules/W4j0EoVCLLmYPZghmE6r/gpdszV4lSxC8zy1eVcdD/BlogHeroFocus.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Blog post hero cover, the PSES way round. PSESBackdropTheme shows the story cover sharp, holds\n// 2s, then eases it over 1.4s (ease-out) to blur(12px) and a lower opacity, as a CSS animation that\n// starts at first paint. The old blog hero (Unfocused+) did the opposite: it opened blurred and pulled\n// into focus. This uses the same CSS animation: the cover paints sharp, holds 2s, then eases over 1.4s\n// to blur(12px) and brightness(0.72) (scale 1.06 hides the soft blurred edge) so the title, badge and\n// meta stay readable. Scrolling past scrollStart skips the rest of the hold.\n// Reduced motion: no animation, the cover is in its final soft state from the first paint.\n// Brightness replaces PSES's opacity drop because in light mode the hero sits on a light page, where\n// lower opacity would wash the cover towards white behind white text.\nconst COVER='html body [data-framer-name=\"Hero cover\"][data-framer-name]';const EASE=\"cubic-bezier(0, 0, 0.58, 1)\";const CSS=`\n${COVER}{animation:o2nBlogHeroSoft 1.4s ${EASE} 2s both;will-change:filter,transform}\n@keyframes o2nBlogHeroSoft{from{filter:blur(0px) brightness(1);transform:scale(1)}to{filter:blur(12px) brightness(0.72);transform:scale(1.06)}}\n@media (prefers-reduced-motion: reduce){${COVER}{animation:none!important;filter:blur(12px) brightness(0.72)!important;transform:scale(1.06)!important}}\n[data-framer-name=\"Blog Items\"] a:focus-visible,[data-framer-name=\"Blogs Wrapper\"] a:focus-visible{outline:2px solid #0099FF;outline-offset:4px;border-radius:18px}\n@media (hover: hover) and (prefers-reduced-motion: no-preference){[data-framer-name=\"Blog Items\"] a[href*=\"blog/\"]:has([data-framer-name=\"Post type badge\"]),[data-framer-name=\"Blogs Wrapper\"] a[href*=\"blog/\"]:has([data-framer-name=\"Post type badge\"]){transition:translate .25s cubic-bezier(.2,.8,.2,1)}[data-framer-name=\"Blog Items\"] a[href*=\"blog/\"]:has([data-framer-name=\"Post type badge\"]):hover,[data-framer-name=\"Blogs Wrapper\"] a[href*=\"blog/\"]:has([data-framer-name=\"Post type badge\"]):hover{translate:0 -4px}}\n`;/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function BlogHeroFocus({hold=2,scrollStart=40,style}){React.useEffect(()=>{// The hold and the ease run in CSS from first paint (like PSES), so they don't wait for\n// hydration. Scrolling past scrollStart skips whatever is left of the hold.\nconst el=document.querySelector('[data-framer-name=\"Hero cover\"]');if(!el||typeof el.getAnimations!==\"function\")return;const anim=el.getAnimations().find(a=>a.animationName===\"o2nBlogHeroSoft\");if(!anim)return;const holdMs=Math.max(0,hold)*1e3;if(holdMs!==2e3&&anim.effect?.updateTiming)anim.effect.updateTiming({delay:holdMs});const skipHold=()=>{if(window.scrollY<=scrollStart)return;const t=Number(anim.currentTime??0);if(t<holdMs)anim.currentTime=holdMs;window.removeEventListener(\"scroll\",skipHold);};window.addEventListener(\"scroll\",skipHold,{passive:true});document.documentElement.setAttribute(\"data-o2n-hero\",\"armed\");skipHold();return()=>{window.removeEventListener(\"scroll\",skipHold);document.documentElement.removeAttribute(\"data-o2n-hero\");};},[hold,scrollStart]);return /*#__PURE__*/_jsx(\"style\",{style:style,dangerouslySetInnerHTML:{__html:CSS}});}addPropertyControls(BlogHeroFocus,{hold:{type:ControlType.Number,title:\"Hold (s)\",defaultValue:2,min:0,max:10,step:.1},scrollStart:{type:ControlType.Number,title:\"Scroll start\",defaultValue:40,min:0,max:600,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogHeroFocus\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogHeroFocus.map"],"mappings":"A,oLAkBG,SAAwBS,EAAc,CAAC,OAAK,EAAE,cAAY,GAAG,SAAO,CAEksB,OAFjsBH,MAAoB,CAE5F,IAAMI,EAAG,SAAS,cAAc,iCAAiC,EAAE,GAAG,CAACA,GAAI,OAAOA,EAAG,eAAgB,WAAW,OAAO,IAAMC,EAAKD,EAAG,cAAc,CAAC,CAAC,KAAK,GAAGE,EAAE,gBAAgB,iBAAiB,EAAE,GAAG,CAACD,EAAK,OAAO,IAAME,EAAO,KAAK,IAAI,EAAEC,CAAI,EAAE,IAAOD,IAAS,KAAKF,EAAK,QAAQ,cAAaA,EAAK,OAAO,aAAa,CAAC,MAAME,CAAM,CAAC,EAAE,IAAME,MAAa,CAAIZ,EAAO,SAASa,IAA2B,OAAOL,EAAK,aAAa,CAAM,EAAEE,IAAO,EAAK,YAAYA,GAAOV,EAAO,oBAAoB,SAASY,CAAQ,EAAE,EAAsI,OAApIZ,EAAO,iBAAiB,SAASY,EAAS,CAAC,QAAQ,EAAI,CAAC,EAAE,SAAS,gBAAgB,aAAa,gBAAgB,OAAO,EAAEA,EAAS,MAAY,CAACZ,EAAO,oBAAoB,SAASY,CAAQ,EAAE,SAAS,gBAAgB,gBAAgB,eAAe,CAAE,CAAE,EAAE,CAACD,EAAKE,CAAW,CAAC,EAAsB,gBAAK,QAAQ,CAAO,QAAM,wBAAwB,CAAC,OAAOC,CAAG,CAAC,CAAC,CAAE,C,sDAXx1B,EAAM,8DAA6G,EAAI;EAC3HC,EAAM;;0CAEkCA,EAAM;;;EAQ+yBX,EAAoBE,EAAc,CAAC,KAAK,CAAC,KAAKW,EAAY,OAAO,MAAM,WAAW,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,MAAM,eAAe,aAAa,GAAG,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,C"}