{"version":3,"file":"LightBox.CUV0AwGy.mjs","names":["useState","useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/iCT15RoLnUA3HQGrcqU3/ApZB1X5i388rGRdAPNo0/LightBox.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,motion,AnimatePresence}from\"framer\";import{useRef,useState,useEffect}from\"react\";/**\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 300\n * @framerDisableUnlink\n */export default function LightboxImage(props){const{image=\"\",alt=\"\",style}=props;const[showLightbox,setShowLightbox]=useState(false);const mouseDownTime=useRef(0);const mouseDownPosition=useRef({x:0,y:0});// Effect to prevent scrolling when lightbox is open\nuseEffect(()=>{if(showLightbox){// Save current body styles\nconst originalStyles={overflow:document.body.style.overflow,position:document.body.style.position,top:document.body.style.top,width:document.body.style.width,height:document.body.style.height};// Get current scroll position\nconst scrollY=window.scrollY;// Apply fixed position to body\ndocument.body.style.overflow=\"hidden\";document.body.style.position=\"fixed\";document.body.style.top=`-${scrollY}px`;document.body.style.width=\"100%\";document.body.style.height=\"100%\";// Restore on cleanup\nreturn()=>{// Restore body styles\ndocument.body.style.overflow=originalStyles.overflow;document.body.style.position=originalStyles.position;document.body.style.top=originalStyles.top;document.body.style.width=originalStyles.width;document.body.style.height=originalStyles.height;// Restore scroll position\nwindow.scrollTo(0,scrollY);};}},[showLightbox]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(AnimatePresence,{children:showLightbox&&/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{position:\"fixed\",top:0,left:0,right:0,bottom:0,backgroundColor:\"rgba(0, 0, 0, 0.9)\",zIndex:2147483647,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",touchAction:\"none\",isolation:\"isolate\"},onClick:()=>setShowLightbox(false),children:/*#__PURE__*/_jsx(motion.img,{src:image,alt:alt,initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:\"spring\",damping:25,stiffness:120},style:{maxWidth:\"90vw\",maxHeight:\"90vh\",objectFit:\"contain\",cursor:\"pointer\"},onClick:e=>{e.stopPropagation();setShowLightbox(false);}})})}),/*#__PURE__*/_jsx(motion.div,{style:{...style,width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",cursor:\"pointer\"},whileHover:{boxShadow:\"0px 4px 12px rgba(0, 0, 0, 0.08)\"},initial:{boxShadow:\"0px 0px 0px rgba(0, 0, 0, 0)\"},transition:{duration:.2},onMouseDown:e=>{mouseDownTime.current=Date.now();mouseDownPosition.current={x:e.clientX,y:e.clientY};},onClick:e=>{const clickDuration=Date.now()-mouseDownTime.current;// Calculate distance moved\nconst deltaX=Math.abs(e.clientX-mouseDownPosition.current.x);const deltaY=Math.abs(e.clientY-mouseDownPosition.current.y);const distance=Math.sqrt(deltaX*deltaX+deltaY*deltaY);// Only trigger if it was both quick and minimal movement\nif(clickDuration<150&&distance<5){setShowLightbox(true);}},children:/*#__PURE__*/_jsx(\"img\",{src:image,alt:alt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\",userSelect:\"none\",WebkitUserDrag:\"none\"},draggable:false})})]});}addPropertyControls(LightboxImage,{image:{type:ControlType.Image,title:\"Image\"},alt:{type:ControlType.String,title:\"Alt Text\",defaultValue:\"\",optional:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LightboxImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"300\",\"framerDisableUnlink\":\"\",\"framerIntrinsicWidth\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LightBox.map"],"mappings":"4YAIG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,QAAM,GAAG,MAAI,GAAG,QAAM,CAAC,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