{"version":3,"file":"shared-lib.uEB7F-nX.mjs","names":[],"sources":["https:/framerusercontent.com/modules/0rjSOwOiwruc7G9b970X/aI2GFatsPmGruNuWZz40/Video_Override_3.js","https:/framerusercontent.com/modules/xhaCiSP9GVEl62s3OMjK/lcBZij0Tw7vTXJcBgLEN/siteMetadata.js"],"sourcesContent":["//NOTE: this is a working scroll-based video scrubbing code override\n//Use this code ovverride applied both on the parent STACK as well the video element\nimport{jsx as _jsx}from\"react/jsx-runtime\";// Scroll-controlled video override for Framer\nexport function withScrollVideo(Component){return props=>{// Create refs for tracking scroll and component\nconst componentRef=React.useRef(null);// Set up the effect to control video based on scroll\nReact.useEffect(()=>{// Wait until the component is mounted\nif(!componentRef.current)return;// Find the actual video element\n// First try to find it as a direct child\nlet videoElement=componentRef.current.querySelector(\"video\");// If not found, look for it in the DOM tree\nif(!videoElement){const allVideos=document.querySelectorAll(\"video\");// Find the closest video to our component\nconst componentRect=componentRef.current.getBoundingClientRect();let closestDistance=Infinity;allVideos.forEach(video=>{const videoRect=video.getBoundingClientRect();const distance=Math.abs(videoRect.top-componentRect.top)+Math.abs(videoRect.left-componentRect.left);if(distance<closestDistance){closestDistance=distance;videoElement=video;}});}// Exit if we couldn't find the video\nif(!videoElement){console.error(\"Scroll video override: No video element found\");return;}// Make sure the video is loaded\nvideoElement.load();// Ensure the video has preload attributes for better performance\nvideoElement.preload=\"auto\";// Pause the video initially - we'll control it with scroll\nvideoElement.pause();// Get the nearest scrollable parent\nlet scrollContainer=document.body;let currentNode=componentRef.current.parentElement;while(currentNode){const style=window.getComputedStyle(currentNode);const overflowY=style.getPropertyValue(\"overflow-y\");if(overflowY===\"auto\"||overflowY===\"scroll\"){scrollContainer=currentNode;break;}currentNode=currentNode.parentElement;}// Calculate the start and end scroll positions\n// Video will be controlled when the container is in view\nconst calculateBounds=()=>{const componentRect=componentRef.current.getBoundingClientRect();const scrollRect=scrollContainer.getBoundingClientRect();// Get document height for calculations\nconst docHeight=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight);return{start:Math.max(0,componentRect.top-window.innerHeight),end:Math.min(docHeight,componentRect.bottom),total:docHeight-window.innerHeight};};// Handle scroll events\nconst handleScroll=()=>{// Get current scroll position\nconst scrollTop=window.scrollY||document.documentElement.scrollTop;// Calculate bounds on each scroll to handle dynamic content\nconst bounds=calculateBounds();// Calculate visible progress (0 to 1)\nlet scrollProgress;// Add this inside the handleScroll function\nconsole.log(\"Scroll progress:\",scrollProgress,\"Video time:\",videoElement.currentTime);if(bounds.end<=bounds.start){scrollProgress=0;}else{scrollProgress=Math.max(0,Math.min(1,(scrollTop-bounds.start)/(bounds.end-bounds.start)));}// Check if video has a duration\nif(videoElement.duration){// Update video time based on scroll progress\nvideoElement.currentTime=videoElement.duration*scrollProgress;}};// Add scroll listener\nwindow.addEventListener(\"scroll\",handleScroll);// Initial position setup\n// Wait a bit to ensure video is loaded\nsetTimeout(handleScroll,100);// Clean up event listeners\nreturn()=>{window.removeEventListener(\"scroll\",handleScroll);};},[]);// Return the component with ref attached\nreturn /*#__PURE__*/_jsx(Component,{...props,ref:componentRef});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withScrollVideo\":{\"type\":\"reactHoc\",\"name\":\"withScrollVideo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Video_Override_3.map","// Generated by Framer (04b9457)\nexport default function metadata(params,activeLocale){return{description:\"We help podcasts reach a wider set of relevant audience through efficient content repurposing.\",favicon:\"https://framerusercontent.com/assets/yu9M98BaNVB9hbQm3awvIeo09YE.png\",robots:\"max-image-preview:large\",title:\"Alora\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerM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