{"version":3,"file":"CaseStudyVideo.DfK-u447.mjs","names":["React.useRef","React.useState","__esmMin","window","init_npm_react_18_3_1","init_ssg_sandbox_shims","ce","init_jsx_runtime","c","p","_e","de","init_framer_CN96F41L","ControlType","addPropertyControls","CaseStudyVideo","props","ref","started","setStarted","posterSrc","poster","start","v","group","onSeek","d","style","radius","video","label","accent","init_CaseStudyVideo"],"sources":["https:/framerusercontent.com/modules/Hv997QEzkuFbaWOxsiF8/tb9u6pmhBALUjMK3SkDR/CaseStudyVideo.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Case study video with a large centered play button over the poster.\n * Clicking the poster or the button starts playback; native controls appear after that.\n * While playing, the full 16:9 frame shows uncropped (contain, dark letterbox) so burned-in captions stay visible.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function CaseStudyVideo(props){const{video,poster,radius=24,accent=\"#F25519\",label=\"Play video\",group=\"\",style}=props;const ref=React.useRef(null);const[started,setStarted]=React.useState(false);const posterSrc=typeof poster===\"string\"?poster:poster?.src;const start=()=>{setStarted(true);const v=ref.current;if(v){const p=v.play();if(p&&typeof p.catch===\"function\")p.catch(()=>{});}};React.useEffect(()=>{if(!group||typeof window===\"undefined\")return;const onSeek=e=>{const d=e&&e.detail;if(!d||d.group!==group)return;const v=ref.current;if(!v)return;setStarted(true);try{v.currentTime=Number(d.time)||0;}catch(err){}const p=v.play();if(p&&typeof p.catch===\"function\")p.catch(()=>{});};window.addEventListener(\"csv-seek\",onSeek);return()=>window.removeEventListener(\"csv-seek\",onSeek);},[group]);return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:radius,overflow:\"hidden\",background:\"#000\"},children:[/*#__PURE__*/_jsx(\"video\",{ref:ref,src:video,poster:posterSrc,controls:started,playsInline:true,preload:\"metadata\",onPlay:()=>setStarted(true),style:{width:\"100%\",height:\"100%\",objectFit:started?\"contain\":\"cover\",display:\"block\",background:\"#000\"}}),!started&&/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":label,onClick:start,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",border:\"none\",padding:0,margin:0,background:\"rgba(0, 0, 0, 0.12)\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"span\",{style:{width:\"clamp(56px, 13%, 96px)\",aspectRatio:\"1 / 1\",borderRadius:\"50%\",background:\"#FFFFFF\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:\"0 8px 28px rgba(0, 0, 0, 0.28)\"},children:/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",style:{width:\"40%\",height:\"40%\",marginLeft:\"8%\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 3.5 L20.5 12 L6 20.5 Z\",fill:accent})})})})]});}addPropertyControls(CaseStudyVideo,{video:{type:ControlType.File,title:\"Video\",allowedFileTypes:[\"mp4\",\"webm\"]},poster:{type:ControlType.ResponsiveImage,title:\"Poster\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:24,min:0,max:80},accent:{type:ControlType.Color,title:\"Play Color\",defaultValue:\"#F25519\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Play video\"},group:{type:ControlType.String,title:\"Chapter Group\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CaseStudyVideo\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CaseStudyVideo.map"],"mappings":"A,6MAOG,SAAwBe,EAAe,EAAM,CAAC,GAAK,CAAC,QAAM,SAAO,SAAO,GAAG,S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