{"version":3,"file":"YouTube.DOL3vuId.mjs","names":["PlayOptions","ThumbnailOptions","ThumbnailFormat"],"sources":["https:/framer.com/m/framer/default-utils.js@^0.45.0","https:/framerusercontent.com/modules/fwunS6QkNTm68H6FKxjY/Bovbd2IyDBRFn0T60HEY/vJ8vpmz20.js","https:/framerusercontent.com/modules/NEd4VmDdsxM3StIUbddO/bZxrMUxBPAhoXlARkK9C/YouTube.js"],"sourcesContent":["import{defaultEvents,localeOptions,fontControls,fontSizeOptions,emptyStateStyle,containerStyles,fontStack}from\"https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js\";import{useOnEnter,useOnExit}from\"https://framerusercontent.com/modules/D4TWeLfcxT6Tysr2BlYg/iZjmqdxVx1EOiM3k1FaW/useOnNavigationTargetChange.js\";import{useConstant}from\"https://framerusercontent.com/modules/ExNgrA7EJTKUPpH6vIlN/eiOrSJ2Ab5M9jPCvVwUz/useConstant.js\";import{colorTokentoValue,colorFromToken}from\"https://framerusercontent.com/modules/D2Lz5CmnNVPZFFiZXalt/QaCzPbriZBfXWZIIycFI/colorFromToken.js\";import{isMotionValue}from\"https://framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/5fbRLvOpxZC0JOXugvwm/isMotionValue.js\";import{useUniqueClassName,randomID}from\"https://framerusercontent.com/modules/xDiQsqBGXzmMsv7AlEVy/uhunpMiNsbXxzjlXsg1y/useUniqueClassName.js\";import{getVariantControls}from\"https://framerusercontent.com/modules/ETACN5BJyFTSo0VVDJfu/NHRqowOiXkF9UwOzczF7/variantUtils.js\";import{useIsBrowserSafari}from\"https://framerusercontent.com/modules/eMBrwoqQK7h6mEeGQUH8/GuplvPJVjmxpk9zqOTcb/isBrowser.js\";import{useMultiOnChange,useOnChange}from\"https://framerusercontent.com/modules/v9AWX2URmiYsHf7GbctE/XxKAZ9KlhWqf5x1JMyyF/useOnChange.js\";import{mstoMinAndSec,secondsToMinutes}from\"https://framerusercontent.com/modules/4zHZnO5JojN1PrIbu2jm/revv9QCWpkh8lPzi2jje/time.js\";import{useAutoMotionValue}from\"https://framerusercontent.com/modules/kNDwabfjDEb3vUxkQlZS/fSIr3AOAYbGlfSPgXpYu/useAutoMotionValue.js\";import{useFontControls}from\"https://framerusercontent.com/modules/cuQH4dmpDnV8YK1mSgQX/KqRXqunFjE6ufhpc7ZRu/useFontControls.js\";import{useRenderTarget,useIsInPreview,useIsOnCanvas}from\"https://framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/m3q7puE2tbo1S2C0s0CT/useRenderTarget.js\";import{useControlledState}from\"https://framerusercontent.com/modules/zGkoP8tPDCkoBzMdt5uq/0zFSjxIYliHxrQQnryFX/useControlledState.js\";import{usePadding,useRadius,paddingControl,borderRadiusControl}from\"https://framerusercontent.com/modules/5SM58HxZHxjjv7aLMOgQ/WXz9i6mVki0bBCrKdqB3/propUtils.js\";import{detectAutoSizingAxis}from\"https://framerusercontent.com/modules/8CkHAZatUz1UR8jNTcfD/HwbnIAZlUmQ2oTpcLkaH/detectAutoSizingAxis.js\";export{useOnEnter,useOnExit,defaultEvents,isMotionValue,colorFromToken,colorTokentoValue,localeOptions,fontControls,fontSizeOptions,emptyStateStyle,containerStyles,fontStack,useUniqueClassName,getVariantControls,useIsBrowserSafari,randomID,useConstant,useMultiOnChange,useOnChange,usePadding,useRadius,paddingControl,borderRadiusControl,mstoMinAndSec,useFontControls,secondsToMinutes,useAutoMotionValue,useRenderTarget,useIsInPreview,useControlledState,detectAutoSizingAxis,useIsOnCanvas,};\nexport const __FramerMetadata__ = {\"exports\":{\"useConstant\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useUniqueClassName\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMultiOnChange\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnChange\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsOnCanvas\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnExit\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontSizeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorTokentoValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRadius\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getVariantControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorFromToken\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePadding\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontStack\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useControlledState\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useFontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useAutoMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsInPreview\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsBrowserSafari\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"detectAutoSizingAxis\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"borderRadiusControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"mstoMinAndSec\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomID\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"localeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnEnter\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"secondsToMinutes\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRenderTarget\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"paddingControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}","// Generated by Framer (e1022ef)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,RichText,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";const cycleOrder=[\"pTtJnsyxM\",\"XtSgKKwNB\"];const serializationHash=\"framer-rUfw9\";const variantClassNames={pTtJnsyxM:\"framer-v-obe5e6\",XtSgKKwNB:\"framer-v-i09f5t\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants===null||variants===void 0?void 0:variants.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transitions={default:{damping:60,delay:0,mass:1,stiffness:500,type:\"spring\"}};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value!==null&&value!==void 0?value:config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const Variants=motion(React.Fragment);const humanReadableVariantMap={Dark:\"XtSgKKwNB\",Light:\"pTtJnsyxM\"};const getProps=({height,id,text,width,...props})=>{var _humanReadableVariantMap_props_variant,_ref,_ref1;return{...props,variant:(_ref=(_humanReadableVariantMap_props_variant=humanReadableVariantMap[props.variant])!==null&&_humanReadableVariantMap_props_variant!==void 0?_humanReadableVariantMap_props_variant:props.variant)!==null&&_ref!==void 0?_ref:\"pTtJnsyxM\",VshpJedt4:(_ref1=text!==null&&text!==void 0?text:props.VshpJedt4)!==null&&_ref1!==void 0?_ref1:\"SECTION NAME\"};};const createLayoutDependency=(props,variants)=>variants.join(\"-\")+props.layoutDependency;const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{activeLocale,setLocale}=useLocaleInfo();const{style,className,layoutId,variant,VshpJedt4,...restProps}=getProps(props);const{baseVariant,classNames,gestureVariant,setGestureState,setVariant,transition,variants}=useVariantState({cycleOrder,defaultVariant:\"pTtJnsyxM\",transitions,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const ref1=React.useRef(null);const defaultLayoutId=React.useId();const sharedStyleClassNames=[];return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId!==null&&layoutId!==void 0?layoutId:defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition,children:/*#__PURE__*/_jsxs(motion.div,{...restProps,className:cx(serializationHash,...sharedStyleClassNames,\"framer-obe5e6\",className,classNames),\"data-framer-name\":\"Light\",layoutDependency:layoutDependency,layoutId:\"pTtJnsyxM\",onHoverEnd:()=>setGestureState({isHovered:false}),onHoverStart:()=>setGestureState({isHovered:true}),onTap:()=>setGestureState({isPressed:false}),onTapCancel:()=>setGestureState({isPressed:false}),onTapStart:()=>setGestureState({isPressed:true}),ref:ref!==null&&ref!==void 0?ref:ref1,style:{backgroundColor:\"rgb(244, 243, 251)\",borderBottomLeftRadius:6,borderBottomRightRadius:6,borderTopLeftRadius:6,borderTopRightRadius:6,...style},variants:{XtSgKKwNB:{backgroundColor:\"rgb(29, 6, 79)\"}},...addPropertyOverrides({XtSgKKwNB:{\"data-framer-name\":\"Dark\"}},baseVariant,gestureVariant),children:[/*#__PURE__*/_jsx(motion.div,{className:\"framer-1d8fsrl\",\"data-framer-name\":\"Dot\",layoutDependency:layoutDependency,layoutId:\"xc7_Kkpsr\",style:{backgroundColor:\"var(--token-dff3d0cf-ef4a-406d-9cb0-0ecf978e319a, rgb(124, 58, 237))\",borderBottomLeftRadius:\"100%\",borderBottomRightRadius:\"100%\",borderTopLeftRadius:\"100%\",borderTopRightRadius:\"100%\"},variants:{XtSgKKwNB:{backgroundColor:\"var(--token-805b7add-313e-4da5-8247-579e5a659af2, rgb(221, 214, 254))\"}}}),/*#__PURE__*/_jsx(RichText,{__fromCanvasComponent:true,children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"R0Y7SUJNIFBsZXggTW9uby02MDA=\",\"--framer-font-family\":'\"IBM Plex Mono\", monospace',\"--framer-font-size\":\"12px\",\"--framer-font-weight\":\"600\",\"--framer-letter-spacing\":\"0.06em\",\"--framer-line-height\":\"20px\",\"--framer-text-alignment\":\"center\",\"--framer-text-color\":\"var(--extracted-r6o4lv, var(--token-dff3d0cf-ef4a-406d-9cb0-0ecf978e319a, rgb(124, 58, 237)))\"},children:\"SECTION NAME\"})}),className:\"framer-tq76gg\",\"data-framer-name\":\"Text\",fonts:[\"GF;IBM Plex Mono-600\"],layoutDependency:layoutDependency,layoutId:\"z5Zbe8hj6\",style:{\"--extracted-r6o4lv\":\"var(--token-dff3d0cf-ef4a-406d-9cb0-0ecf978e319a, rgb(124, 58, 237))\",\"--framer-paragraph-spacing\":\"14px\"},text:VshpJedt4,variants:{XtSgKKwNB:{\"--extracted-r6o4lv\":\"var(--token-805b7add-313e-4da5-8247-579e5a659af2, rgb(221, 214, 254))\"}},verticalAlignment:\"top\",withExternalLayout:true,...addPropertyOverrides({XtSgKKwNB:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"R0Y7SUJNIFBsZXggTW9uby02MDA=\",\"--framer-font-family\":'\"IBM Plex Mono\", monospace',\"--framer-font-size\":\"12px\",\"--framer-font-weight\":\"600\",\"--framer-letter-spacing\":\"0.06em\",\"--framer-line-height\":\"20px\",\"--framer-text-alignment\":\"center\",\"--framer-text-color\":\"var(--extracted-r6o4lv, var(--token-805b7add-313e-4da5-8247-579e5a659af2, rgb(221, 214, 254)))\"},children:\"SECTION NAME\"})})}},baseVariant,gestureVariant)})]})})})});});const css=['.framer-rUfw9[data-border=\"true\"]::after, .framer-rUfw9 [data-border=\"true\"]::after { content: \"\"; border-width: var(--border-top-width, 0) var(--border-right-width, 0) var(--border-bottom-width, 0) var(--border-left-width, 0); border-color: var(--border-color, none); border-style: var(--border-style, none); width: 100%; height: 100%; position: absolute; box-sizing: border-box; left: 0; top: 0; border-radius: inherit; pointer-events: none; }',\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-rUfw9.framer-5dpru4, .framer-rUfw9 .framer-5dpru4 { display: block; }\",\".framer-rUfw9.framer-obe5e6 { align-content: center; align-items: center; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 6px; height: min-content; justify-content: flex-start; overflow: visible; padding: 4px 8px 4px 8px; position: relative; width: min-content; }\",\".framer-rUfw9 .framer-1d8fsrl { aspect-ratio: 1 / 1; flex: none; height: var(--framer-aspect-ratio-supported, 6px); position: relative; width: 6px; }\",\".framer-rUfw9 .framer-tq76gg { flex: none; height: auto; position: relative; white-space: pre; width: auto; }\",\"@supports (background: -webkit-named-image(i)) and (not (font-palette:dark)) { .framer-rUfw9.framer-obe5e6 { gap: 0px; } .framer-rUfw9.framer-obe5e6 > * { margin: 0px; margin-left: calc(6px / 2); margin-right: calc(6px / 2); } .framer-rUfw9.framer-obe5e6 > :first-child { margin-left: 0px; } .framer-rUfw9.framer-obe5e6 > :last-child { margin-right: 0px; } }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 28\n * @framerIntrinsicWidth 123\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"auto\",\"auto\"]},\"XtSgKKwNB\":{\"layout\":[\"auto\",\"auto\"]}}}\n * @framerVariables {\"VshpJedt4\":\"text\"}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n */const FramervJ8vpmz20=withCSS(Component,css,\"framer-rUfw9\");export default FramervJ8vpmz20;FramervJ8vpmz20.displayName=\"Section Badge\";FramervJ8vpmz20.defaultProps={height:28,width:123};addPropertyControls(FramervJ8vpmz20,{variant:{options:[\"pTtJnsyxM\",\"XtSgKKwNB\"],optionTitles:[\"Light\",\"Dark\"],title:\"Variant\",type:ControlType.Enum},VshpJedt4:{defaultValue:\"SECTION NAME\",displayTextArea:false,title:\"Text\",type:ControlType.String}});addFonts(FramervJ8vpmz20,[{family:\"IBM Plex Mono\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/ibmplexmono/v19/-F6qfjptAgt5VM-kVkqdyU8n3vAO8lJPg-IUDNg.woff2\",weight:\"600\"}]);\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"FramervJ8vpmz20\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisplayContentsDiv\":\"false\",\"framerVariables\":\"{\\\"VshpJedt4\\\":\\\"text\\\"}\",\"framerIntrinsicWidth\":\"123\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"auto\\\",\\\"auto\\\"]},\\\"XtSgKKwNB\\\":{\\\"layout\\\":[\\\"auto\\\",\\\"auto\\\"]}}}\",\"framerIntrinsicHeight\":\"28\",\"framerImmutableVariables\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./vJ8vpmz20.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useReducer,useState}from\"react\";import{ControlType,addPropertyControls}from\"framer\";import{useIsOnCanvas,emptyStateStyle,containerStyles,defaultEvents,useRadius,borderRadiusControl}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";var PlayOptions;(function(PlayOptions){PlayOptions[\"Normal\"]=\"Off\";PlayOptions[\"Auto\"]=\"On\";PlayOptions[\"Loop\"]=\"Loop\";})(PlayOptions||(PlayOptions={}));var ThumbnailOptions;(function(ThumbnailOptions){ThumbnailOptions[\"High\"]=\"High Quality\";ThumbnailOptions[\"Medium\"]=\"Medium Quality\";ThumbnailOptions[\"Low\"]=\"Low Quality\";ThumbnailOptions[\"Off\"]=\"Off\";})(ThumbnailOptions||(ThumbnailOptions={}));var ThumbnailFormat;(function(ThumbnailFormat){ThumbnailFormat[\"WebP\"]=\"webp\";ThumbnailFormat[\"JPG\"]=\"jpg\";})(ThumbnailFormat||(ThumbnailFormat={}));/**\n * @framerIntrinsicWidth 560\n * @framerIntrinsicHeight 315\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n *\n * @framerComponentPresetProps isRed, borderRadius\n */ export function Youtube({url,play,shouldMute,thumbnail,isRed,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,...props}){const onCanvas=useIsOnCanvas();const isAutoplay=play!==PlayOptions.Normal;const showThumbnail=onCanvas||thumbnail!==ThumbnailOptions.Off&&!isAutoplay;const[isPreloading,preloadVideo]=useReducer(()=>true,false);const[showVideo,startVideo]=useReducer(()=>true,!showThumbnail);const[isHovered,setHovered]=useState(false);const borderRadius=useRadius(props);const hasBorderRadius=borderRadius!==\"0px 0px 0px 0px\"&&borderRadius!==\"0px\";if(url===\"\"){return /*#__PURE__*/ _jsx(Instructions,{});}const parsedURL=parseVideoURL(url);if(parsedURL===undefined){return /*#__PURE__*/ _jsx(ErrorMessage,{message:\"Invalid Youtube URL.\"});}const[videoId,embedURL]=parsedURL;// https://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api\nconst thumbnailURL=getThumbnailURL(videoId,thumbnail,getWebPSupported()?ThumbnailFormat.WebP:ThumbnailFormat.JPG);// https://developers.google.com/youtube/player_parameters\nconst searchParams=embedURL.searchParams;searchParams.set(\"iv_load_policy\",\"3\");searchParams.set(\"rel\",\"0\");searchParams.set(\"modestbranding\",\"1\");searchParams.set(\"playsinline\",\"1\");if(isAutoplay||showThumbnail){searchParams.set(\"autoplay\",\"1\");}if(isAutoplay&&shouldMute){searchParams.set(\"mute\",\"1\");}if(play===PlayOptions.Loop){searchParams.set(\"loop\",\"1\");searchParams.set(\"playlist\",videoId);}if(!isRed){searchParams.set(\"color\",\"white\");}return /*#__PURE__*/ _jsxs(\"article\",{onPointerEnter:()=>setHovered(true),onPointerLeave:()=>setHovered(false),onPointerOver:preloadVideo,onClick:startVideo,style:{...wrapperStyle,borderRadius,transform:// Safari sometimes struggles to render border-radius:\n// - on the canvas when changing from 0 to any other value\n// - or when rendering an iframe\nhasBorderRadius&&(showVideo||onCanvas)?\"translateZ(0.000001px)\":\"unset\",cursor:\"pointer\",overflow:\"hidden\"},children:[isPreloading&&/*#__PURE__*/ _jsx(\"link\",{rel:\"preconnect\",href:\"https://www.youtube.com\"}),isPreloading&&/*#__PURE__*/ _jsx(\"link\",{rel:\"preconnect\",href:\"https://www.google.com\"}),/*#__PURE__*/ _jsx(\"div\",{style:{...videoStyle,background:showThumbnail?`center / cover url(${thumbnailURL}) no-repeat`:undefined}}),showVideo?/*#__PURE__*/ _jsx(\"iframe\",{style:videoStyle,src:embedURL.href,frameBorder:\"0\",allow:\"presentation; fullscreen; accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\",onClick:onClick,onMouseEnter:onMouseEnter,onMouseLeave:onMouseLeave,onMouseDown:onMouseDown,onMouseUp:onMouseUp}):/*#__PURE__*/ _jsx(PlayButton,{onClick:startVideo,isHovered:isHovered,isRed:isRed})]});}Youtube.displayName=\"YouTube\";addPropertyControls(Youtube,{url:{type:ControlType.String,title:\"Video\"},play:{type:ControlType.Enum,title:\"Autoplay\",options:Object.values(PlayOptions)},shouldMute:{title:\"Mute\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden(props){return props.play===PlayOptions.Normal;}},thumbnail:{title:\"Thumbnail\",description:\"Showing a thumbnail improves performance.\",type:ControlType.Enum,options:Object.values(ThumbnailOptions),hidden(props){return props.play!==PlayOptions.Normal;}},isRed:{title:\"Color\",type:ControlType.Boolean,enabledTitle:\"Red\",disabledTitle:\"White\"},...borderRadiusControl,...defaultEvents});const defaultProps={url:\"https://youtu.be/smPos0mJvh8\",play:PlayOptions.Normal,shouldMute:true,thumbnail:ThumbnailOptions.Medium,isRed:true};Youtube.defaultProps=defaultProps;function parseVideoURL(urlString){let url;try{url=new URL(urlString);}catch{const embedURL=getEmbedURL(urlString);return[urlString,embedURL];}if(url.hostname===\"youtube.com\"||url.hostname===\"www.youtube.com\"||url.hostname===\"youtube-nocookie.com\"||url.hostname===\"www.youtube-nocookie.com\"){const pathSegments=url.pathname.slice(1).split(\"/\");// https://www.youtube.com/watch?v=Fop2oskTug8\nif(pathSegments[0]===\"watch\"){const videoId=url.searchParams.get(\"v\");const embedURL1=getEmbedURL(videoId);return[videoId,embedURL1];}// https://www.youtube.com/embed/Fop2oskTug8\nif(pathSegments[0]===\"embed\"){const videoId1=pathSegments[1];return[videoId1,url];}}// https://youtu.be/Fop2oskTug8\nif(url.hostname===\"youtu.be\"){const videoId2=url.pathname.slice(1);const embedURL2=getEmbedURL(videoId2);return[videoId2,embedURL2];}}function getEmbedURL(videoId){return new URL(`https://www.youtube.com/embed/${videoId}`);}function getThumbnailURL(videoId,res,format=ThumbnailFormat.JPG){// https://gist.github.com/a1ip/be4514c1fd392a8c13b05e082c4da363\nconst pre=ThumbnailFormat.WebP?\"https://i.ytimg.com/vi_webp/\":\"https://i.ytimg.com/vi/\";const ext=ThumbnailFormat.WebP?\"webp\":\"jpg\";switch(res){case ThumbnailOptions.Low:return`${pre}${videoId}/hqdefault.${ext}`;case ThumbnailOptions.Medium:return`${pre}${videoId}/sddefault.${ext}`;case ThumbnailOptions.High:return`${pre}${videoId}/maxresdefault.${ext}`;default:return`${pre}${videoId}/0.${ext}`;}}let _getWebPSupported;// https://stackoverflow.com/a/27232658\nfunction getWebPSupported(){// We're going to default to webp because it's pretty widely supported by now\nif(!window){return true;}if(_getWebPSupported!==undefined){return _getWebPSupported;}const element=document.createElement(\"canvas\");if(!!(element.getContext&&element.getContext(\"2d\"))){// was able or not to get WebP representation\nreturn element.toDataURL(\"image/webp\").indexOf(\"data:image/webp\")==0;}else{// very old browser like IE 8, canvas not supported\nreturn false;}}// Helper components\nfunction Instructions(){return /*#__PURE__*/ _jsx(\"div\",{style:{...emptyStateStyle,overflow:\"hidden\"},children:/*#__PURE__*/ _jsx(\"div\",{style:centerTextStyle,children:\"To embed a Youtube video, add the URL to the properties\\xa0panel.\"})});}function ErrorMessage({message}){return /*#__PURE__*/ _jsx(\"div\",{className:\"framerInternalUI-errorPlaceholder\",style:{...containerStyles,overflow:\"hidden\"},children:/*#__PURE__*/ _jsxs(\"div\",{style:centerTextStyle,children:[\"Error: \",message]})});}function PlayButton({onClick,isHovered,isRed}){return /*#__PURE__*/ _jsx(\"button\",{onClick:onClick,\"aria-label\":\"Play\",style:buttonStyle,children:/*#__PURE__*/ _jsxs(\"svg\",{height:\"100%\",version:\"1.1\",viewBox:\"0 0 68 48\",width:\"100%\",children:[/*#__PURE__*/ _jsx(\"path\",{d:\"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z\",fill:isHovered?isRed?\"#f00\":\"#000\":\"#212121\",fillOpacity:isHovered?isRed?1:.8:.8,style:{transition:\"fill .1s cubic-bezier(0.4, 0, 1, 1), fill-opacity .1s cubic-bezier(0.4, 0, 1, 1)\"}}),/*#__PURE__*/ _jsx(\"path\",{d:\"M 45,24 27,14 27,34\",fill:\"#fff\"})]})});}const buttonStyle={position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",width:68,height:48,padding:0,border:\"none\",background:\"transparent\",cursor:\"pointer\"};const wrapperStyle={position:\"relative\",width:\"100%\",height:\"100%\"};const centerTextStyle={textAlign:\"center\",minWidth:140};const videoStyle={position:\"absolute\",top:0,left:0,height:\"100%\",width:\"100%\"};\nexport const __FramerMetadata__ = {\"exports\":{\"Youtube\":{\"type\":\"reactComponent\",\"name\":\"Youtube\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"315\",\"framerIntrinsicWidth\":\"560\",\"framerComponentPresetProps\":\"isRed, borderRadius\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./YouTube.map"],"mappings":"ulCAAA,IAA6M,KAAiJ,KAAwH,KAAgJ,KAA4H,KAA+I,KAAgI,KAA6H,KAAyI,CAAoI,IAAsI,KAAgI,KAA6J,KAAsI,KAAkK,GCC5pD,SAAS,EAAqB,EAAU,GAAG,EAAS,CAAC,IAAM,EAAc,CAAE,EAA+H,MAApF,CAA1C,GAAmD,QAAQ,GAAS,GAAS,OAAO,OAAO,EAAc,EAAU,GAAS,CAAC,CAAQ,CAAe,0CAQnN,AARvb,GAAyD,IAA+G,IAAkE,IAA4B,CAAM,EAAW,CAAC,YAAY,WAAY,EAAO,EAAkB,eAAqB,EAAkB,CAAC,UAAU,kBAAkB,UAAU,iBAAkB,EAAuO,EAAY,CAAC,QAAQ,CAAC,QAAQ,GAAG,MAAM,EAAE,KAAK,EAAE,UAAU,IAAI,KAAK,QAAS,CAAC,EAAO,EAAW,CAA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