{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/AuIvBQDgULXbPXi15bJc/7qWnG8ACXWA0KgXSjNLH/Utils.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect,useCallback}from\"react\";// Learn more: https://www.framer.com/developers/overrides/\nlet globalCurrentPlayingVideo=null;function useVideoRefEffect(videoRef){const animationFrameId=useRef();const moveToNextSlide=useCallback(()=>{var _parentButtonElement_children_;const parentButtonElement=document.querySelector(\".framer--slideshow-controls\");const nextButton=parentButtonElement===null||parentButtonElement===void 0?void 0:(_parentButtonElement_children_=parentButtonElement.children[0])===null||_parentButtonElement_children_===void 0?void 0:_parentButtonElement_children_.querySelector('[aria-label=\"Next\"]');if(nextButton instanceof HTMLElement){nextButton.click();}},[]);const handleCenterCheck=useCallback(()=>{if(!videoRef.current)return;const rect=videoRef.current.getBoundingClientRect();// const centerTolerance = rect.width / 2\nconst windowCenterX=window.innerWidth/2;const elementCenterX=rect.left+rect.width/2;const centerTolerance=rect.width/2+(elementCenterX>=windowCenterX?32:0);const isCentered=Math.abs(windowCenterX-elementCenterX)<centerTolerance;const containerDiv=videoRef.current.children[2];const videoElement=containerDiv===null||containerDiv===void 0?void 0:containerDiv.querySelector(\"video\");if(!videoElement)return;const handleVideoChange=shouldPlay=>{if(shouldPlay){globalCurrentPlayingVideo=videoElement;videoElement.muted=true;videoElement.addEventListener(\"ended\",moveToNextSlide);videoElement.play().catch(error=>{console.error(\"Error playing video:\",error);});}else{videoElement.pause();videoElement.autoplay=false;videoElement.removeEventListener(\"ended\",moveToNextSlide);globalCurrentPlayingVideo=null;}};if(isCentered){if(globalCurrentPlayingVideo&&globalCurrentPlayingVideo!==videoElement){globalCurrentPlayingVideo.pause();globalCurrentPlayingVideo.autoplay=false;globalCurrentPlayingVideo.removeEventListener(\"ended\",moveToNextSlide);}if(globalCurrentPlayingVideo!==videoElement){handleVideoChange(true);}}else if(globalCurrentPlayingVideo===videoElement){handleVideoChange(false);}},[moveToNextSlide]);useEffect(()=>{const checkLoop=()=>{handleCenterCheck();animationFrameId.current=requestAnimationFrame(checkLoop);};// Start the continuous position check\ncheckLoop();// Perform checks on scroll and resize events\nwindow.addEventListener(\"scroll\",handleCenterCheck);window.addEventListener(\"resize\",handleCenterCheck);// Cleanup on unmount\nreturn()=>{if(animationFrameId.current){cancelAnimationFrame(animationFrameId.current);}// Clean up all event listeners\nif(globalCurrentPlayingVideo){globalCurrentPlayingVideo.removeEventListener(\"ended\",moveToNextSlide);}window.removeEventListener(\"scroll\",handleCenterCheck);window.removeEventListener(\"resize\",handleCenterCheck);};},[handleCenterCheck]);}export function withCentered(Component){return props=>{const videoRef=useRef(null);useVideoRefEffect(videoRef);return /*#__PURE__*/_jsx(Component,{...props,ref:videoRef});};}export function withFullScreenWidth(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{width:\"100vw\"}});};}export function withMaskClipFix(Component){return props=>{console.log(\"props: \",props);useEffect(()=>{// Wait for the DOM to be ready\nconst screenMasks=document.querySelectorAll('[data-framer-name=\"Screen Mask\"]');if(screenMasks.length>0){screenMasks.forEach(screenMask=>{if(!screenMask.style.webkitMaskSize||!screenMask.style.webkitMaskImage){console.log(\"Applying mask styles to:\",screenMask);screenMask.style.webkitMaskImage=\"url('https://framerusercontent.com/images/qv6dX5DJvWx1MG8Aqv53oAlDTI0.png')\";screenMask.style.webkitMaskSize=\"cover\";// screenMask.style.webkitMaskPosition = \"center\";\n}});}},[]);return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withFullScreenWidth\":{\"type\":\"reactHoc\",\"name\":\"withFullScreenWidth\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCentered\":{\"type\":\"reactHoc\",\"name\":\"withCentered\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMaskClipFix\":{\"type\":\"reactHoc\",\"name\":\"withMaskClipFix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__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cC,EAAkB,EAAK,CAAG,EAAE,CAACd,CAAe,CAAC,EAAEiB,EAAU,IAAI,CAAC,IAAMC,EAAU,IAAI,CAACb,EAAkB,EAAEP,EAAiB,QAAQ,sBAAsBoB,CAAS,CAAE,EACvyC,OAAAA,EAAU,EACVV,EAAO,iBAAiB,SAASH,CAAiB,EAAEG,EAAO,iBAAiB,SAASH,CAAiB,EAChG,IAAI,CAAIP,EAAiB,SAAS,qBAAqBA,EAAiB,OAAO,EAClFH,GAA2BA,EAA0B,oBAAoB,QAAQK,CAAe,EAAGQ,EAAO,oBAAoB,SAASH,CAAiB,EAAEG,EAAO,oBAAoB,SAASH,CAAiB,CAAE,CAAE,EAAE,CAACA,CAAiB,CAAC,CAAE,CAAQ,SAASc,EAAaC,EAAU,CAAC,OAAOC,GAAO,CAAC,IAAMxB,EAASE,EAAO,IAAI,EAAE,OAAAH,EAAkBC,CAAQ,EAAsByB,EAAKF,EAAU,CAAC,GAAGC,EAAM,IAAIxB,CAAQ,CAAC,CAAE,CAAE,CAA8I,SAAS0B,EAAgBC,EAAU,CAAC,OAAOC,IAAQ,QAAQ,IAAI,UAAUA,CAAK,EAAEC,EAAU,IAAI,CACvoB,IAAMC,EAAY,SAAS,iBAAiB,kCAAkC,EAAKA,EAAY,OAAO,GAAGA,EAAY,QAAQC,GAAY,EAAI,CAACA,EAAW,MAAM,gBAAgB,CAACA,EAAW,MAAM,mBAAiB,QAAQ,IAAI,2BAA2BA,CAAU,EAAEA,EAAW,MAAM,gBAAgB,8EAA8EA,EAAW,MAAM,eAAe,QACnZ,CAAC,CAAG,EAAE,CAAC,CAAC,EAAsBC,EAAKL,EAAU,CAAC,GAAGC,CAAK,CAAC,EAAI",
  "names": ["init_ssg_sandbox_shims", "globalCurrentPlayingVideo", "useVideoRefEffect", "videoRef", "animationFrameId", "pe", "moveToNextSlide", "te", "_parentButtonElement_children_", "parentButtonElement", "nextButton", "handleCenterCheck", "rect", "windowCenterX", "window", "elementCenterX", "centerTolerance", "isCentered", "containerDiv", "videoElement", "handleVideoChange", "shouldPlay", "error", "ue", "checkLoop", "withCentered", "Component", "props", "p", "withMaskClipFix", "Component", "props", "ue", "screenMasks", "screenMask", "p"]
}
