{"version":3,"file":"ProjectVideoLoop.D31NuE4a.mjs","names":["React.useRef","__esmMin","de","c","init_jsx_runtime","init_npm_react_18_3_1","ce","ProjectVideoLoop","ref","root","bound","restart","video","event","sync","observer","style","init_ProjectVideoLoop"],"sources":["https:/framerusercontent.com/modules/QqLF4FPbptfFGkOuPKlJ/flidRqUDFhcsmHJVmF58/ProjectVideoLoop.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";/** @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any */export default function ProjectVideoLoop({style}){const ref=React.useRef(null);React.useEffect(()=>{const root=ref.current?.parentElement;if(!root)return;const bound=new Set;const restart=event=>{const video=event.currentTarget;if(document.visibilityState!==\"visible\"||!video.getClientRects().length)return;video.currentTime=0;void video.play().catch(()=>{});};const sync=()=>{root.querySelectorAll(\"video\").forEach(video=>{video.loop=true;video.muted=true;video.playsInline=true;video.setAttribute(\"playsinline\",\"\");video.setAttribute(\"webkit-playsinline\",\"\");if(!bound.has(video)){bound.add(video);video.addEventListener(\"ended\",restart);}});};sync();const observer=new MutationObserver(sync);observer.observe(root,{childList:true,subtree:true});return()=>{observer.disconnect();bound.forEach(video=>video.removeEventListener(\"ended\",restart));};},[]);return /*#__PURE__*/_jsx(\"span\",{ref:ref,\"aria-hidden\":\"true\",style:{...style,width:1,height:1,pointerEvents:\"none\"}});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProjectVideoLoop\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProjectVideoLoop.map"],"mappings":"A,yHACsC,SAAwBO,EAAiB,CAAC,SAAO,CAAC,IAAMC,EAAIR,EAAa,IAAI,EAAywB,OAAvwBM,MAAoB,CAAC,IAAMG,EAAKD,EAAI,SAAS,cAAc,GAAG,CAACC,EAAK,OAAO,IAAMC,kBAAM,IAAI,IAAUC,EAAQ,GAAO,CAAC,IAAMC,EAAMC,EAAM,cAAiB,SAAS,kBAAkB,WAAYD,EAAM,eAAe,CAAC,CAAC,SAAc,EAAM,YAAY,EAAEA,EAAW,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,EAAQE,MAAS,CAACL,EAAK,iBAAiB,OAAO,CAAC,CAAC,QAAQ,GAAO,CAAC,EAAM,KAAK,GAAK,EAAM,MAAM,GAAK,EAAM,YAAY,GAAKG,EAAM,aAAa,cAAc,EAAE,EAAEA,EAAM,aAAa,qBAAqB,EAAE,EAAMF,EAAM,IAAIE,CAAK,IAAGF,EAAM,IAAIE,CAAK,EAAEA,EAAM,iBAAiB,QAAQD,CAAO,EAAG,CAAC,CAAE,EAAEG,EAAK,EAAE,IAAMC,EAAS,IAAI,iBAAiBD,CAAI,EAAuD,OAArDC,EAAS,QAAQN,EAAK,CAAC,UAAU,GAAK,QAAQ,EAAI,CAAC,MAAY,CAACM,EAAS,WAAW,EAAEL,EAAM,QAAQ,GAAOE,EAAM,oBAAoB,QAAQD,CAAO,CAAC,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsB,gBAAK,OAAO,CAAK,MAAI,cAAc,OAAO,MAAM,CAAC,GAAGK,EAAM,MAAM,EAAE,OAAO,EAAE,cAAc,MAAM,CAAC,CAAC,CAAE,C"}