{"version":3,"file":"ScrollReveal.BIPfb3FW.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/Vkh90o44kTeoGr4a64OI/swdtbWfmRcrQIhd4J02O/ScrollReveal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";function useScrollDepth(threshold){const[triggered,setTriggered]=useState(false);useEffect(()=>{const handleScroll=()=>{const scrolled=window.scrollY/(document.body.scrollHeight-window.innerHeight);setTriggered(scrolled>=threshold);};handleScroll();window.addEventListener(\"scroll\",handleScroll);return()=>window.removeEventListener(\"scroll\",handleScroll);},[threshold]);return triggered;}export function SlideFromRight(Component){return props=>{const visible=useScrollDepth(.5);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,transition:\"transform 0.6s cubic-bezier(0.4, 0, 0.2, 1)\",transform:visible?\"translateX(0)\":\"translateX(200%)\"}});};}export function SlideFromLeft(Component){return props=>{const visible=useScrollDepth(.5);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,transition:\"transform 0.6s cubic-bezier(0.4, 0, 0.2, 1)\",transform:visible?\"translateX(0)\":\"translateX(-200%)\"}});};}export function CopyEmail(Component){return props=>{const[copied,setCopied]=useState(false);const handleClick=()=>{navigator.clipboard.writeText(\"david@situationnormal.co\");setCopied(true);setTimeout(()=>setCopied(false),2e3);};return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",cursor:\"pointer\"},onClick:handleClick,children:[/*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:copied?0:1,transition:\"opacity 0.2s ease\"}}),copied&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontFamily:props.style?.fontFamily,fontSize:props.style?.fontSize,fontWeight:props.style?.fontWeight,color:props.style?.color,letterSpacing:props.style?.letterSpacing},children:\"Copied!\"})]});};}export function DraggableCard(Component){return props=>{const startX=useRef(0);const startY=useRef(0);const handleMouseDown=e=>{startX.current=e.clientX;startY.current=e.clientY;};const handleMouseUp=e=>{const distX=Math.abs(e.clientX-startX.current);const distY=Math.abs(e.clientY-startY.current);if(distX<=5&&distY<=5){window.location.href=props.link;}};return /*#__PURE__*/_jsx(Component,{...props,link:undefined,onMouseDown:handleMouseDown,onMouseUp:handleMouseUp});};}\nexport const __FramerMetadata__ = {\"exports\":{\"CopyEmail\":{\"type\":\"reactHoc\",\"name\":\"CopyEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SlideFromLeft\":{\"type\":\"reactHoc\",\"name\":\"SlideFromLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SlideFromRight\":{\"type\":\"reactHoc\",\"name\":\"SlideFromRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"DraggableCard\":{\"type\":\"reactHoc\",\"name\":\"DraggableCard\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollReveal.map"],"mappings":"uJAAsG,SAAS,EAAe,EAAU,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAmS,OAAlS,MAAc,CAAC,IAAM,MAAiB,CAA+E,EAA/D,EAAO,SAAS,SAAS,KAAK,aAAa,EAAO,cAAoC,EAAU,EAAiE,OAA9D,GAAc,CAAC,EAAO,iBAAiB,SAAS,EAAa,KAAW,EAAO,oBAAoB,SAAS,EAAa,EAAG,CAAC,EAAU,CAAC,CAAQ,EAAW,SAAgB,EAAe,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAQ,EAAe,GAAG,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,WAAW,8CAA8C,UAAU,EAAQ,gBAAgB,mBAAmB,CAAC,CAAC,EAAqR,SAAgB,EAAU,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,GAAM,CAAyI,O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