{"version":3,"file":"Counter.CFJ_qqoB.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/DKFJAkDYnJuIa0j6jVgN/cJAUufWsy6TCyLUtnw8Q/Counter.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useRef,useEffect}from\"react\";import{motion,useInView,animate}from\"framer-motion\";// =====================================================================\n// Premium scroll + interaction overrides for the Forma homepage.\n// Subtle-but-premium intensity.\n// =====================================================================\nconst easePremium=[.22,1,.36,1];// ---- Scroll reveal: fade + slide-up + blur-to-sharp -----------------\nfunction reveal(Component,distance,duration,delay){return /*#__PURE__*/forwardRef((props,ref)=>{const localRef=useRef(null);const inView=useInView(localRef,{once:true,margin:\"0px 0px -30% 0px\"});return /*#__PURE__*/_jsx(motion.div,{ref:localRef,initial:{opacity:0,y:distance,filter:\"blur(8px)\"},animate:inView?{opacity:1,y:0,filter:\"blur(0px)\"}:{opacity:0,y:distance,filter:\"blur(8px)\"},transition:{duration,ease:easePremium,delay},style:{width:\"100%\",willChange:\"transform, opacity, filter\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}export function withScrollReveal(Component){return reveal(Component,28,1.1,0);}export function withReveal1(Component){return reveal(Component,28,1.1,0);}export function withReveal2(Component){return reveal(Component,28,1.1,.1);}export function withReveal3(Component){return reveal(Component,28,1.1,.2);}export function withReveal4(Component){return reveal(Component,28,1.1,.3);}// ---- Count-up for stat numbers --------------------------------------\n// Finds the deepest text node, parses a leading integer, then animates\n// from 0 up to it on scroll-into-view, preserving prefix/suffix\n// (e.g. \"+\", \"%\"). Non-numeric text (fractions etc.) is left untouched.\nexport function withCountUp(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const wrapRef=useRef(null);const inView=useInView(wrapRef,{once:true,margin:\"-15% 0px\"});useEffect(()=>{if(!inView)return;const root=wrapRef.current;if(!root)return;const walker=document.createTreeWalker(root,NodeFilter.SHOW_TEXT);let node=null;while(walker.nextNode()){const t=walker.currentNode;if(t.textContent&&/\\d/.test(t.textContent)){node=t;break;}}if(!node)return;const original=(node.textContent||\"\").trim();const match=original.match(RegExp(\"^(\\\\D*)(\\\\d[\\\\d,]*)(.*)$\",\"s\"));if(!match)return;const prefix=match[1];const target=parseInt(match[2].replace(/,/g,\"\"),10);const suffix=match[3];const controls=animate(0,target,{duration:1.4,ease:easePremium,onUpdate:val=>{if(node)node.textContent=prefix+Math.round(val)+suffix;},onComplete:()=>{if(node)node.textContent=original;}});return()=>controls.stop();},[inView]);return /*#__PURE__*/_jsx(\"div\",{ref:wrapRef,style:{width:\"100%\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}// ---- Card hover: scale + lift ---------------------------------------\nexport function withCardHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",willChange:\"transform\"},initial:{scale:1,y:0},whileHover:{scale:1.025,y:-8},transition:{type:\"spring\",stiffness:300,damping:26},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}// ---- Reveal + card hover combined (for work cards) ------------------\nexport function withRevealCard(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const localRef=useRef(null);const inView=useInView(localRef,{once:true,margin:\"0px 0px -30% 0px\"});return /*#__PURE__*/_jsx(motion.div,{ref:localRef,initial:{opacity:0,y:28,filter:\"blur(8px)\"},animate:inView?{opacity:1,y:0,filter:\"blur(0px)\"}:{opacity:0,y:28,filter:\"blur(8px)\"},transition:{duration:1.1,ease:easePremium},whileHover:{scale:1.025,y:-8},style:{width:\"100%\",willChange:\"transform, opacity, filter\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withCardHover\":{\"type\":\"reactHoc\",\"name\":\"withCardHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withReveal1\":{\"type\":\"reactHoc\",\"name\":\"withReveal1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollReveal\":{\"type\":\"reactHoc\",\"name\":\"withScrollReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCountUp\":{\"type\":\"reactHoc\",\"name\":\"withCountUp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRevealCard\":{\"type\":\"reactHoc\",\"name\":\"withRevealCard\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withReveal3\":{\"type\":\"reactHoc\",\"name\":\"withReveal3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withReveal2\":{\"type\":\"reactHoc\",\"name\":\"withReveal2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withReveal4\":{\"type\":\"reactHoc\",\"name\":\"withReveal4\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Counter.map"],"mappings":"+LAKA,SAAS,EAAO,EAAU,EAAS,EAAS,EAAM,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAASA,EAAO,KAAK,CAAO,EAAO,EAAU,EAAS,CAAC,KAAK,GAAK,OAAO,mBAAmB,CAAC,CAAC,OAAoB,EAAK,EAAO,IAAI,CAAC,IAAI,EAAS,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAS,OAAO,YAAY,CAAC,QAAQ,EAAO,CAAC,QAAQ,EAAE,EAAE,EAAE,OAAO,YAAY,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAS,OAAO,YAAY,CAAC,WAAW,CAAC,WAAS,KAAK,EAAY,QAAM,CAAC,MAAM,CAAC,MAAM,OAAO,WAAW,6BAA6B,CAAC,SAAsB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,CAAC,CAAC,CAAC,EAAG,CAAiF,SAAgB,EAAY,EAAU,CAAC,OAAO,EAAO,EAAU,GAAG,IAAI,EAAE,CAAwJ,SAAgB,EAAY,EAAU,CAAC,OAAO,EAAO,EAAU,GAAG,IAAI,GAAG,CAIp6B,SAAgB,EAAY,EAAU,CAAC,OAAoB,G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