{"version":3,"file":"TextSettle.CuHh2eGR.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/M6nb9MhYOjhXlPngUlqv/LcojAEDb7xHoi6Uin9qk/TextSettle.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";/**\n * Releases the GPU layers of a native text effect once it has played.\n * Framer's text effect splits the text into many small spans and keeps\n * will-change: transform on each of them after the effect is over. On phones\n * hundreds of these layers made scrolling stutter. The effect itself is not\n * touched: this only waits until it is finished, then drops will-change.\n */const CSS=\"[data-text-settled] *{will-change:auto !important}\";export function withTextSettle(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(typeof document===\"undefined\")return;if(!document.getElementById(\"text-settle-css\")){const st=document.createElement(\"style\");st.id=\"text-settle-css\";st.textContent=CSS;document.head.appendChild(st);}const host=ref.current;if(!host)return;// the longest page text effect (delay + duration + stagger) ends well before this\nconst t=window.setTimeout(()=>{const el=host.firstElementChild;el?.setAttribute(\"data-text-settled\",\"\");},6e3);return()=>window.clearTimeout(t);},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTextSettle\":{\"type\":\"reactHoc\",\"name\":\"withTextSettle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextSettle.map"],"mappings":"uIAMkE,SAAgB,EAAe,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,IAAI,EACM,OADJ,MAAc,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,GAAG,CAAC,SAAS,eAAe,iBAAiB,EAAE,CAAC,IAAM,EAAG,SAAS,cAAc,OAAO,EAAE,EAAG,GAAG,kBAAkB,EAAG,YAAY,EAAI,SAAS,KAAK,YAAY,CAAE,CAAE,CAAC,IAAM,EAAK,EAAI,QAAQ,GAAG,CAAC,EAAK,OAC5Y,IAAM,EAAE,EAAO,eAAe,CAAiC,EAAlB,mBAAsB,aAAa,oBAAoB,EAAE,CAAE,EAAE,GAAG,EAAE,UAAU,EAAO,aAAa,CAAC,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,MAAM,CAAK,MAAI,MAAM,CAAC,QAAQ,UAAU,EAAE,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAC,CAAC,CAAE,CAAE,uBAPpO,IAAoC,EAMrE,EAAI"}