{"version":3,"file":"VimeoPlayer.CTVC0KdT.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/vhEBdxWyditvmkFDNiLH/qMZfpdIGufgj6YmsNzs4/VimeoPlayer.js"],"sourcesContent":["// Vimeo video component with cover position support\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * Vimeo Player with Cover Position\n *\n * @framerIntrinsicWidth 640\n * @framerIntrinsicHeight 360\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function VimeoPlayer(props){const{videoId=\"76979871\",autoplay=false,loop=false,muted=false,controls=true,showTitle=false,showByline=false,showPortrait=false,color=\"00adef\",coverPosition=\"center\",radius=0,style}=props;const containerRef=useRef(null);const iframeRef=useRef(null);const cleanColor=color.replace(\"#\",\"\");// Autoplay requires muted to be true for browser policies\nconst shouldMute=autoplay?true:muted;const vimeoUrl=`https://player.vimeo.com/video/${videoId}?autoplay=${autoplay?1:0}&loop=${loop?1:0}&muted=${shouldMute?1:0}&controls=${controls?1:0}&title=${showTitle?1:0}&byline=${showByline?1:0}&portrait=${showPortrait?1:0}&color=${cleanColor}&autopause=0`;const isStatic=RenderTarget.current()===RenderTarget.thumbnail;const getCoverStyles=()=>{const aspectRatio=16/9;// Calculate scale to cover container\n// We need to scale the iframe so it covers the entire container\n// while maintaining its 16:9 aspect ratio\nconst baseStyles={position:\"absolute\",left:\"50%\",border:\"none\",objectFit:\"cover\"};// Use calc to ensure proper scaling\n// If container is wider than 16:9, scale by width\n// If container is taller than 16:9, scale by height\nconst scaleStyles={width:`max(100%, ${aspectRatio*100}vh)`,height:`max(100%, ${100/aspectRatio}vw)`};// Adjust vertical position based on coverPosition\nswitch(coverPosition){case\"top\":return{...baseStyles,...scaleStyles,top:0,transform:\"translateX(-50%)\"};case\"bottom\":return{...baseStyles,...scaleStyles,bottom:0,transform:\"translateX(-50%)\"};case\"center\":default:return{...baseStyles,...scaleStyles,top:\"50%\",transform:\"translate(-50%, -50%)\"};}};return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",backgroundColor:\"rgba(255, 255, 255,  0) \",borderRadius:radius},children:[/*#__PURE__*/_jsx(\"iframe\",{ref:iframeRef,src:vimeoUrl,style:getCoverStyles(),allow:\"autoplay; fullscreen; picture-in-picture\",allowFullScreen:true,title:\"Vimeo video player\"}),isStatic&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"rgba(255, 255, 255,  0) \",color:\"#fff\",fontSize:14,fontFamily:\"system-ui, -apple-system, sans-serif\"},children:\"Vimeo Player\"})]});}addPropertyControls(VimeoPlayer,{videoId:{type:ControlType.String,title:\"Video ID\",defaultValue:\"76979871\",placeholder:\"Enter Vimeo video ID\"},coverPosition:{type:ControlType.Enum,title:\"Cover Position\",options:[\"top\",\"center\",\"bottom\"],optionTitles:[\"Top\",\"Center\",\"Bottom\"],defaultValue:\"center\",displaySegmentedControl:true},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},muted:{type:ControlType.Boolean,title:\"Muted\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\",hidden:({autoplay})=>autoplay},controls:{type:ControlType.Boolean,title:\"Controls\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showTitle:{type:ControlType.Boolean,title:\"Show Title\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showByline:{type:ControlType.Boolean,title:\"Show Byline\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showPortrait:{type:ControlType.Boolean,title:\"Show Portrait\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},color:{type:ControlType.Color,title:\"Player Color\",defaultValue:\"#00adef\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VimeoPlayer\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"640\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"360\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VimeoPlayer.map"],"mappings":"yLASG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,UAAQ,WAAW,WAAS,GAAM,OAAK,GAAM,QAAM,GAAM,WAAS,GAAK,YAAU,GAAM,aAAW,GAAM,eAAa,GAAM,QAAM,SAAS,gBAAc,SAAS,SAAO,EAAE,SAAO,EAAY,EAAaA,EAAO,KAAK,CAAO,EAAUA,EAAO,KAAK,CAAO,EAAW,EAAM,QAAQ,IAAI,GAAG,CACnS,EAAS,kCAAkC,EAAQ,YAAY,EAAS,EAAE,EAAE,QAAQ,EAAK,EAAE,EAAE,SAAvH,GAAc,EAA6H,EAAE,EAAE,YAAY,EAAS,EAAE,EAAE,SAAS,EAAU,EAAE,EAAE,UAAU,EAAW,EAAE,EAAE,YAAY,EAAa,EAAE,EAAE,SAAS,EAAW,cAAoB,EAAS,EAAa,SAAS,GAAG,EAAa,UAAgB,MAAmB,CAAC,IAAM,EAAY,GAAG,EAGhZ,EAAW,CAAC,SAAS,WAAW,KAAK,MAAM,OAAO,OAAO,UAAU,QAAQ,CAG3E,EAAY,CAAC,MAAM,aAAa,EAAY,IAAI,KAAK,OAAO,aAAa,IAAI,EAAY,KAAK,CACpG,OAAO,EAAP,CAAsB,IAAI,MAAM,MAAM,CAAC,GAAG,EAAW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