{"version":3,"file":"Two_line_wrap.D9HLEMBs.mjs","names":["useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/fhyCTmNa76Swr8yx6HhH/GVqxsyumRMV7VGpwiXdh/Two_line_wrap.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useLayoutEffect,useRef}from\"react\";export function withTwoLineEllipsis(Component){return props=>{const newStyle={...props.style,display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",overflow:\"hidden\",WebkitLineClamp:2,textOverflow:\"ellipsis\"};return /*#__PURE__*/_jsx(Component,{...props,style:newStyle});};}export function resetScrollOnContentChange(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const localRef=useRef(null);const previousTextRef=useRef(\"\");const setRefs=useCallback(node=>{localRef.current=node;if(typeof ref===\"function\"){ref(node);return;}if(ref&&\"current\"in ref){ref.current=node;}},[ref]);useLayoutEffect(()=>{if(typeof window===\"undefined\")return;const element=localRef.current;if(!element)return;const currentText=element.textContent??\"\";if(previousTextRef.current!==currentText){element.scrollTop=0;previousTextRef.current=currentText;}});return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"resetScrollOnContentChange\":{\"type\":\"reactHoc\",\"name\":\"resetScrollOnContentChange\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTwoLineEllipsis\":{\"type\":\"reactHoc\",\"name\":\"withTwoLineEllipsis\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Two_line_wrap.map"],"mappings":"qJAA4G,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAS,CAAC,GAAG,EAAM,MAAM,QAAQ,cAAc,gBAAgB,WAAW,SAAS,SAAS,gBAAgB,EAAE,aAAa,UAAU,EAAE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAQ,CAAC,CAAE,CAAE,CAAC,SAAgB,EAA2B,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAASA,EAAO,IAAI,EAAQ,EAAgBA,EAAO,EAAE,EAAQ,EAAQC,EAAY,GAAM,CAAuB,GAAtB,EAAS,QAAQ,EAAQ,OAAO,GAAM,WAAW,CAAC,EAAI,CAAI,EAAE,MAAO,CAAI,GAAK,YAAY,IAAK,EAAI,QAAQ,EAAM,EAAE,CAAC,CAAG,CAAC,EAA+P,OAA7P,MAAoB,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAQ,EAAS,QAAQ,GAAG,CAAC,EAAQ,OAAO,IAAM,EAAY,EAAQ,aAAa,GAAM,EAAgB,UAAU,IAAa,EAAQ,UAAU,EAAE,EAAgB,QAAQ,EAAa,CAAC,EAAsB,EAAK,EAAU,CAAC,IAAI,EAAQ,GAAG,CAAK,CAAC,CAAE,CAAC,CAAE,qBAAl8B,IAAiE"}