{"version":3,"file":"VideoLoop.xpcZ1ebH.mjs","names":[],"sources":["https:/framerusercontent.com/modules/QNIMtyYNUEvjbogeGQZp/lPQZ2zy7Z0HtYuHeQwSP/VideoLoop.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";export function withSeamlessLoop(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{...props,ref:ref,autoPlay:true,loop:true,muted:true,playsInline:true,// 비디오가 끝났을 때(Ended) 텀 없이 즉시 0초로 이동 후 재생\nonEnded:e=>{const video=e.target;video.currentTime=0;video.play();},// 브라우저가 루프를 처리하기 전 미리 0초로 되돌리는 트리거\nonTimeUpdate:e=>{const video=e.target;// 영상 끝 0.1초 전에 미리 핸들링 (선택 사항)\nif(video.currentTime>video.duration-.1){video.currentTime=0;video.play();}}});});}// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSeamlessLoop\":{\"type\":\"reactHoc\",\"name\":\"withSeamlessLoop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoLoop.map"],"mappings":"wKAAmN,SAAgB,EAAiB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAA2B,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,SAAS,GAAK,KAAK,GAAK,MAAM,GAAK,YAAY,GAChZ,QAAQ,GAAG,CAAC,IAAM,EAAM,EAAE,OAAO,EAAM,YAAY,EAAE,EAAM,MAAM,EACjE,aAAa,GAAG,CAAC,IAAM,EAAM,EAAE,OAC5B,EAAM,YAAY,EAAM,SAAS,KAAI,EAAM,YAAY,EAAE,EAAM,MAAM,GAAI,CAAC,CAAG,kBAHrC,IAA8B,IAAqE,IAAqE,CAIpM,EAAY,CAAC,WAAW,UAAU,CAAC"}