{"version":3,"file":"VisualHouseMotion.BhFxmd6n.mjs","names":["useRef","useState","_Fragment","__esmMin","init_ssg_sandbox_shims","window","l","_e","p","J","init_jsx_runtime","ce","init_npm_react_18_3_1","de","useReducedMotion","init_framer_motion_DhsWWWsN","extractText","depth","value","item","withCountUp","reduced","finalText","props","eligible","format","part","progress","targetRef","displayText","setDisplayText","target","frame","start","observer","entries","entry","tick","time","Component","forwardedRef","setRef","instance","withLinkUnderline","withCardMotion","incomingHover","incomingTransition","rest","hover","hoverEffect","easeOut","withImageReveal","withBlogContentMotion","rootRef","root","images","phone","observers","image","element","withFormFocus","init_VisualHouseMotion"],"sources":["https:/framerusercontent.com/modules/uHtuQTKDFtuI3gwwANQk/0mEP8INNDWn7FxxZOvMF/VisualHouseMotion.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef,useState}from\"react\";import{useReducedMotion}from\"framer-motion\";const easeOut=[.16,1,.3,1];function extractText(value,depth=0){if(depth>6||value==null)return\"\";if(typeof value===\"string\"||typeof value===\"number\")return String(value);if(Array.isArray(value))return value.map(item=>extractText(item,depth+1)).join(\"\");if(typeof value===\"object\"){if(typeof value.text===\"string\")return value.text;if(typeof value.props?.text===\"string\")return value.props.text;if(value.props?.children!=null)return extractText(value.props.children,depth+1);if(value.children!=null)return extractText(value.children,depth+1);}return\"\";}export function withCountUp(Component){return /*#__PURE__*/forwardRef(function CountUp(props,forwardedRef){const reduced=useReducedMotion();const finalText=typeof props.text===\"string\"?props.text:extractText(props.text)||extractText(props.children);const eligible=/^(?:\\d+\\/\\d+|\\d+%|\\d+\\+)$/u.test(finalText);const format=progress=>finalText.replace(/\\d+/g,part=>String(Math.round(Number(part)*progress)));const targetRef=useRef(null);const[displayText,setDisplayText]=useState(eligible&&!reduced?format(0):finalText);useEffect(()=>{if(!eligible||reduced){setDisplayText(finalText);return;}const target=targetRef.current;if(!target||typeof IntersectionObserver===\"undefined\"){setDisplayText(finalText);return;}let frame=0;let start=0;const observer=new IntersectionObserver(entries=>{if(!entries.some(entry=>entry.isIntersecting))return;observer.disconnect();const tick=time=>{if(!start)start=time;const progress=Math.min((time-start)/1200,1);setDisplayText(format(1-Math.pow(1-progress,3)));if(progress<1)frame=requestAnimationFrame(tick);};frame=requestAnimationFrame(tick);},{threshold:.25});observer.observe(target);return()=>{observer.disconnect();cancelAnimationFrame(frame);};},[eligible,finalText,reduced]);if(!eligible)return /*#__PURE__*/_jsx(Component,{...props,ref:forwardedRef});const setRef=instance=>{targetRef.current=typeof Element!==\"undefined\"&&instance instanceof Element?instance:null;if(typeof forwardedRef===\"function\")forwardedRef(instance);else if(forwardedRef)forwardedRef.current=instance;};return /*#__PURE__*/_jsx(Component,{...props,ref:setRef,text:displayText});});}export function withLinkUnderline(Component){return /*#__PURE__*/forwardRef(function LinkUnderline(props,ref){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n          .vh-motion-link-scope a {\n            text-decoration: none !important;\n            background-image: linear-gradient(var(--token-wJ2S1DyEN), var(--token-wJ2S1DyEN));\n            background-repeat: no-repeat;\n            background-position: 0 100%;\n            background-size: 0% 1px;\n            transition: background-size 250ms ease-out;\n          }\n          .vh-motion-link-scope a:hover,\n          .vh-motion-link-scope a:focus-visible { background-size: 100% 1px; }\n          @media (prefers-reduced-motion: reduce) {\n            .vh-motion-link-scope a { transition: none; }\n            .vh-motion-link-scope a:hover,\n            .vh-motion-link-scope a:focus-visible { background-size: 100% 1px; }\n          }\n        `}),/*#__PURE__*/_jsx(\"span\",{className:\"vh-motion-link-scope\",style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props,ref:ref})})]});});}export function withCardMotion(Component){return /*#__PURE__*/forwardRef(function CardMotion(props,ref){const reduced=useReducedMotion();const{hoverEffect,whileHover:incomingHover,transition:incomingTransition,...rest}=props;const hover={...hoverEffect||{},...incomingHover||{}};return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,whileHover:reduced?undefined:{...hover,y:-4,borderColor:\"var(--token-Pcu0Xzfes)\"},transition:reduced?undefined:{duration:.3,ease:easeOut,...incomingTransition||{}}});});}export function withHeroImageZoom(Component){return /*#__PURE__*/forwardRef(function HeroImageZoom(props,ref){const reduced=useReducedMotion();if(reduced)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsx(Component,{...props,ref:ref,initial:{scale:1.04},animate:{scale:1},transition:{duration:1.2,ease:easeOut}});});}export function withImageReveal(Component){return /*#__PURE__*/forwardRef(function ImageReveal(props,ref){const reduced=useReducedMotion();if(reduced)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsx(Component,{...props,initial:{opacity:0,filter:\"blur(8px)\"},whileInView:{opacity:1,filter:\"blur(0px)\"},viewport:{once:true,amount:.15},transition:{duration:.55,ease:easeOut}});});}export function withBlogContentMotion(Component){return /*#__PURE__*/forwardRef(function BlogContentMotion(props,forwardedRef){const reduced=useReducedMotion();const rootRef=useRef(null);useEffect(()=>{const root=rootRef.current;if(!root)return;const images=Array.from(root.querySelectorAll(\"img\"));const phone=typeof window!==\"undefined\"&&window.matchMedia(\"(max-width: 809.98px)\").matches;if(reduced||phone||typeof IntersectionObserver===\"undefined\")return;const observers=images.map(image=>{image.classList.add(\"vh-blog-image-reveal\");const observer=new IntersectionObserver(entries=>{for(const entry of entries){if(!entry.isIntersecting)continue;entry.target.classList.add(\"vh-blog-image-visible\");observer.unobserve(entry.target);}},{threshold:.12});observer.observe(image);return observer;});return()=>observers.forEach(observer=>observer.disconnect());},[reduced,props.text]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n          .vh-blog-motion-scope ul {\n            padding-inline-start: 1.4em !important;\n            margin-inline-start: 0 !important;\n            list-style: none !important;\n          }\n          .vh-blog-motion-scope li {\n            list-style: none !important;\n            position: relative;\n          }\n          .vh-blog-motion-scope li::before {\n            content: \"•\";\n            color: var(--token-wJ2S1DyEN);\n            position: absolute;\n            inset-inline-start: -1.2em;\n            top: 0;\n          }\n          .vh-blog-motion-scope li::marker {\n            color: var(--token-wJ2S1DyEN);\n          }\n          .vh-blog-motion-scope .vh-blog-image-reveal {\n            filter: blur(8px);\n            transition: filter 550ms cubic-bezier(0.16, 1, 0.3, 1);\n          }\n          .vh-blog-motion-scope .vh-blog-image-reveal.vh-blog-image-visible {\n            filter: blur(0);\n          }\n          @media (prefers-reduced-motion: reduce) {\n            .vh-blog-motion-scope .vh-blog-image-reveal {\n              filter: none !important;\n              transition: none !important;\n            }\n          }\n        `}),/*#__PURE__*/_jsx(\"span\",{ref:element=>{rootRef.current=element;if(typeof forwardedRef===\"function\")forwardedRef(element);else if(forwardedRef)forwardedRef.current=element;},className:\"vh-blog-motion-scope\",style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})})]});});}export function withFormFocus(Component){return /*#__PURE__*/forwardRef(function FormFocus(props,ref){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n          .vh-form-focus-scope input,\n          .vh-form-focus-scope textarea,\n          .vh-form-focus-scope select {\n            transition: border-color 250ms ease-out;\n          }\n          @media (prefers-reduced-motion: reduce) {\n            .vh-form-focus-scope input,\n            .vh-form-focus-scope textarea,\n            .vh-form-focus-scope select {\n              transition: none;\n            }\n          }\n        `}),/*#__PURE__*/_jsx(\"span\",{className:\"vh-form-focus-scope\",style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props,ref:ref})})]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withCardMotion\":{\"type\":\"reactHoc\",\"name\":\"withCardMotion\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBlogContentMotion\":{\"type\":\"reactHoc\",\"name\":\"withBlogContentMotion\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFormFocus\":{\"type\":\"reactHoc\",\"name\":\"withFormFocus\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCountUp\":{\"type\":\"reactHoc\",\"name\":\"withCountUp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLinkUnderline\":{\"type\":\"reactHoc\",\"name\":\"withLinkUnderline\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroImageZoom\":{\"type\":\"reactHoc\",\"name\":\"withHeroImageZoom\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withImageReveal\":{\"type\":\"reactHoc\",\"name\":\"withImageReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VisualHouseMotion.map"],"mappings":"A,+MAA8M,SAASgB,EAAY,EAAM,EAAM,EAAE,CAAC,GAAGC,EAAM,GAAGC,GAAO,KAAK,MAAM,GAAG,GAAG,OAAOA,GAAQ,UAAU,OAAOA,GAAQ,SAAS,OAAO,OAAOA,CAAK,EAAE,GAAG,MAAM,QAAQA,CAAK,EAAE,OAAOA,EAAM,IAAI,GAAMF,EAAYG,EAAKF,EAAM,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,GAAG,OAAOC,GAAQ,SAAS,CAAC,GAAG,OAAOA,EAAM,MAAO,SAAS,OAAOA,EAAM,KAAK,GAAG,OAAOA,EAAM,OAAO,MAAO,SAAS,OAAOA,EAAM,MAAM,KAAK,GAAGA,EAAM,OAAO,UAAU,KAAK,OAAOF,EAAYE,EAAM,MAAM,SAASD,EAAM,CAAC,EAAE,GAAGC,EAAM,UAAU,KAAK,OAAOF,EAAYE,EAAM,SAASD,EAAM,CAAC,CAAE,CAAC,MAAM,EAAG,CAAC,SAAgBG,EAAY,EAAU,CAAC,MAAoB,gBAAW,SAAiB,EAAM,EAAa,CAAC,IAAMC,EAAQP,EAAiB,EAAQQ,EAAU,OAAOC,EAAM,MAAO,SAASA,EAAM,KAAKP,EAAYO,EAAM,IAAI,GAAGP,EAAYO,EAAM,QAAQ,EAAQC,EAAS,6BAA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