{"version":3,"file":"VideoLoop.BeTPJh7Z.mjs","names":["__esmMin","init_npm_react_18_3_1","c","J","init_jsx_runtime","init_store_js__1_0","createStore","withSeamlessLoop","Component","props","video","init_VideoLoop","init_utils_js__0_9"],"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":"A,wKAAmN,SAAgBO,EAAiB,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAA2B,gBAAKC,EAAU,CAAC,GAAGC,EAAU,MAAI,SAAS,GAAK,KAAK,GAAK,MAAM,GAAK,YAAY,GAChZ,QAAQ,GAAG,CAAC,IAAMC,EAAM,EAAE,OAAO,EAAM,YAAY,EAAEA,EAAM,KAAK,CAAE,EAClE,aAAa,GAAG,CAAC,IAAMA,EAAM,EAAE,OAC5BA,EAAM,YAAYA,EAAM,SAAS,KAAI,EAAM,YAAY,EAAEA,EAAM,KAAK,EAAG,CAAC,CAAC,CAAG,CAAE,C,8CAClEJ,EAAY,CAAC,WAAW,SAAS,CAAC,C"}