{"version":3,"file":"BlancLoopVideo.bW03u_oZ.mjs","names":["useRef","useState","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","init_jsx_runtime","c","_e","de","init_framer_BisrWwwE","addPropertyControls","ControlType","useIsStaticRenderer","BlancLoopVideo","isStatic","ref","still","setStill","rm","update","v","io","e","fill","focus","style","video","poster","init_BlancLoopVideo"],"sources":["https:/framerusercontent.com/modules/lvt09my8X6ncfphE25Nc/OzD2QUjuF8pUP15J2TEG/BlancLoopVideo.js"],"sourcesContent":["// Blanc · quiet looping video (A-統籌 2026-11-20). Silent, loops, plays only while on screen.\n// Reduced motion or the Framer canvas = still poster only. Decorative: hidden from screen readers.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function BlancLoopVideo({video,poster,focus,style}){const isStatic=useIsStaticRenderer();const ref=useRef(null);const[still,setStill]=useState(true);useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;const rm=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const update=()=>setStill(rm.matches);update();rm.addEventListener?.(\"change\",update);return()=>rm.removeEventListener?.(\"change\",update);},[isStatic]);useEffect(()=>{const v=ref.current;if(!v||still)return;const io=new IntersectionObserver(([e])=>{if(e.isIntersecting)v.play().catch(()=>{});else v.pause();},{rootMargin:\"200px 0px\"});io.observe(v);return()=>io.disconnect();},[still]);const fill={width:\"100%\",height:\"100%\",objectFit:\"cover\",objectPosition:focus||\"50% 50%\",display:\"block\"};return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{...style,position:\"relative\",overflow:\"hidden\",backgroundColor:\"#EFE6D6\"},children:isStatic||still||!video?poster?/*#__PURE__*/_jsx(\"img\",{src:poster,alt:\"\",style:fill}):null:/*#__PURE__*/_jsx(\"video\",{ref:ref,src:video,poster:poster,muted:true,loop:true,playsInline:true,preload:\"none\",disablePictureInPicture:true,style:fill})});}addPropertyControls(BlancLoopVideo,{video:{type:ControlType.File,title:\"Video\",allowedFileTypes:[\"mp4\",\"webm\"]},poster:{type:ControlType.Image,title:\"Poster\"},focus:{type:ControlType.String,title:\"Focus\",defaultValue:\"50% 50%\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlancLoopVideo\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlancLoopVideo.map"],"mappings":"A,8MAKG,SAAwBe,EAAe,CAAC,QAAM,SAAO,QAAM,SAAO,CAAC,IAAMC,EAASF,EAAoB,EAAQG,EAAIjB,EAAO,IAAI,EAAO,CAACkB,EAAMC,GAAUlB,EAAS,EAAI,EAAEK,MAAc,CAAC,GAAGU,GAAiBb,IAAS,OAAY,OAAO,IAAMiB,EAAGjB,EAAO,WAAW,kCAAkC,EAAQkB,MAAWF,EAASC,EAAG,OAAO,EAAkD,OAAhDC,EAAO,EAAED,EAAG,mBAAmB,SAASC,CAAM,MAAYD,EAAG,sBAAsB,SAASC,CAAM,CAAE,EAAE,CAACL,CAAQ,CAAC,EAAEV,MAAc,CAAC,IAAMgB,EAAEL,EAAI,QAAQ,GAAG,CAACK,GAAGJ,EAAM,OAAO,IAAMK,EAAG,IAAI,sBAAsB,CAACC,KAAK,CAAIA,EAAE,eAAeF,EAAE,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,EAAOA,EAAE,MAAM,CAAE,EAAE,CAAC,WAAW,WAAW,CAAC,EAAgB,OAAdC,EAAG,QAAQD,CAAC,MAAYC,EAAG,WAAW,CAAE,EAAE,CAACL,CAAK,CAAC,EAAE,IAAMO,EAAK,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,QAAQ,eAAeC,G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