{"version":3,"file":"YouTube.BD5pj4xj.mjs","names":["useMemo","useState","HomeFactory","React","useReducer","useState","_Fragment","emptyStateStyle","containerStyles","defaultEvents"],"sources":["https:/framerusercontent.com/modules/DyldKav0OOAWR3bCAlhK/8c3l9FzyOlGpbPncYhfc/nullstate.js","https:/framer.com/m/framer/icon-nullstate.js@0.7.0","https:/framerusercontent.com/modules/8tFVJ9SCM5akQRM0UzVD/YkxZV5bKC4LrRDEdvAgQ/home.js","https:/framer.com/m/feather-icons/home.js@0.0.29","https:/framerusercontent.com/modules/Ma20hU0GGRxLxZphbywl/OSpwWF91FHPVFyQJjMHt/utils.js","https:/framerusercontent.com/modules/f0DboytQenYh21kfme7W/zb1zVBMZJKgPMiedOi0y/Feather.js","https:/framer.com/m/framer/default-utils.js@^0.45.0","https:/framerusercontent.com/modules/NEd4VmDdsxM3StIUbddO/4sbLnuatuUfmOTwFGSJM/YouTube.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nexport const containerStyles = {\n    width: \"100%\",\n    height: \"100%\",\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nconst nullIconStyle = {\n    minWidth: \"10px\",\n    minHeight: \"10px\",\n    maxWidth: \"20px\",\n    maxHeight: \"20px\",\n    width: \"60%\",\n    height: \"60%\"\n};\nconst emptyStateStyle = {\n    ...containerStyles,\n    borderRadius: 6,\n    background: \"rgba(149, 149, 149, 0.1)\",\n    border: \"1px dashed rgba(149, 149, 149, 0.15)\",\n    color: \"#a5a5a5\",\n    flexDirection: \"column\"\n};\nexport const NullState = /*#__PURE__*/ React.forwardRef((_, ref)=>{\n    return(/*#__PURE__*/ _jsx(\"div\", {\n        style: emptyStateStyle,\n        ref: ref\n    }));\n}) /*\n\n<svg\n                xmlns=\"http://www.w3.org/2000/svg\"\n                viewBox=\"0 0 30 30\"\n                style={nullIconStyle}\n            >\n                <path\n                    d=\"M 12.857 0 C 19.958 0 25.714 5.756 25.714 12.857 C 25.714 19.958 19.958 25.714 12.857 25.714 C 5.756 25.714 0 19.958 0 12.857 C 0 5.756 5.756 0 12.857 0 Z\"\n                    fill=\"#FFFFFF\"\n                ></path>\n                <path\n                    d=\"M 20.357 20.357 L 27.857 27.857\"\n                    fill=\"transparent\"\n                    strokeWidth=\"4.28\"\n                    stroke=\"#FFFFFF\"\n                    strokeLinecap=\"round\"\n                ></path>\n                <g transform=\"translate(9.643 6.429)\">\n                    <path\n                        d=\"M 3.214 12.857 L 3.214 12.857\"\n                        fill=\"transparent\"\n                        strokeWidth=\"3.75\"\n                        stroke=\"currentColor\"\n                        strokeLinecap=\"round\"\n                    ></path>\n                    <path\n                        d=\"M 0 3.214 C 0 1.004 1.843 0 3.214 0 C 4.586 0 6.429 0.603 6.429 3.214 C 6.429 5.826 3.214 5.913 3.214 7.232 C 3.214 8.552 3.214 8.571 3.214 8.571\"\n                        fill=\"transparent\"\n                        strokeWidth=\"3.22\"\n                        stroke=\"currentColor\"\n                        strokeLinecap=\"round\"\n                        strokeLinejoin=\"round\"\n                    ></path>\n                </g>\n            </svg>\n            */ ;\n\nexport const __FramerMetadata__ = {\"exports\":{\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"NullState\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./nullstate.map","/*\n * nullstate (framer/icon-nullstate@0.7.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://stanfordtax-staging.com/framerusercontent/modules/DyldKav0OOAWR3bCAlhK/8c3l9FzyOlGpbPncYhfc/nullstate.js\"\n","let r;\nvar s = (o) => {\n    if (!r) {\n        const n = o.forwardRef(({color: t = \"currentColor\", size: e = 24, ...i}, l) => {\n            return o.createElement(\"svg\", {ref: l, xmlns: \"http://www.w3.org/2000/svg\", width: e, height: e, viewBox: \"0 0 24 24\", fill: \"none\", stroke: t, strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", ...i}, o.createElement(\"path\", {d: \"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"}), o.createElement(\"polyline\", {points: \"9 22 9 12 15 12 15 22\"}));\n        });\n        n.displayName = \"Home\",r = n;\n    }\n    return r;\n};\nconst __FramerMetadata__ = {exports: {default: {type: \"reactComponent\", slots: [], annotations: {framerContractVersion: \"1\"}}, __FramerMetadata__: {type: \"variable\"}}};\nexport { __FramerMetadata__, s as default };","/*\n * home (feather-icons/home@0.0.29)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://stanfordtax-staging.com/framerusercontent/modules/8tFVJ9SCM5akQRM0UzVD/YkxZV5bKC4LrRDEdvAgQ/home.js\"\nexport { default } from \"https://stanfordtax-staging.com/framerusercontent/modules/8tFVJ9SCM5akQRM0UzVD/YkxZV5bKC4LrRDEdvAgQ/home.js\"\n","import{useMemo}from\"react\";import{ControlType}from\"framer\";/*\n ** ICON UTILS\n ** Pull as much re-usable logic into here as possible\n ** This will make it easier to replace in all icon components\n */ export const containerStyles={width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"};export const defaultEvents={onClick:{type:ControlType.EventHandler},onMouseDown:{type:ControlType.EventHandler},onMouseUp:{type:ControlType.EventHandler},onMouseEnter:{type:ControlType.EventHandler},onMouseLeave:{type:ControlType.EventHandler}};const findByArray=(arr,search)=>arr.find(a=>a.toLowerCase().includes(search));export function getIconSelection(iconKeys,selectByList,iconSearch=\"\",iconSelection,lowercaseIconKeyPairs){// gotta get the exact match first THEN find\n// have a set and try to access ?\nif(selectByList)return iconSelection;if(iconSearch==null||(iconSearch===null||iconSearch===void 0?void 0:iconSearch.length)===0)return null;const iconSearchTerm=iconSearch.toLowerCase().replace(/-|\\s/g,\"\");var _iconSearchTerm;// check for exact match, otherwise use .find\nconst searchResult=(_iconSearchTerm=lowercaseIconKeyPairs[iconSearchTerm])!==null&&_iconSearchTerm!==void 0?_iconSearchTerm:findByArray(iconKeys,iconSearchTerm);return searchResult;}export function useIconSelection(iconKeys,selectByList,iconSearch=\"\",iconSelection,lowercaseIconKeyPairs){// Clean search term\nconst iconSearchResult=useMemo(()=>{if(iconSearch==null||(iconSearch===null||iconSearch===void 0?void 0:iconSearch.length)===0)return null;const iconSearchTerm=iconSearch.toLowerCase().replace(/-|\\s/g,\"\");var _iconSearchTerm;// check for exact match, otherwise use .find\nconst searchResult=(_iconSearchTerm=lowercaseIconKeyPairs[iconSearchTerm])!==null&&_iconSearchTerm!==void 0?_iconSearchTerm:findByArray(iconKeys,iconSearchTerm);return searchResult;},[iconSelection,iconSearch]);const name=selectByList?iconSelection:iconSearchResult;return name;}\nexport const __FramerMetadata__ = {\"exports\":{\"getIconSelection\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIconSelection\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./utils.map","import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{useState,useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{NullState}from\"https://framer.com/m/framer/icon-nullstate.js@0.7.0\";import HomeFactory from\"https://framer.com/m/feather-icons/home.js@0.0.29\";import{defaultEvents,useIconSelection}from\"https://stanfordtax-staging.com/framerusercontent/modules/Ma20hU0GGRxLxZphbywl/OSpwWF91FHPVFyQJjMHt/utils.js\";export const iconKeys=[\"activity\",\"airplay\",\"alert-circle\",\"alert-octagon\",\"alert-triangle\",\"align-center\",\"align-justify\",\"align-left\",\"align-right\",\"anchor\",\"aperture\",\"archive\",\"arrow-down\",\"arrow-down-circle\",\"arrow-down-left\",\"arrow-down-right\",\"arrow-left\",\"arrow-left-circle\",\"arrow-right\",\"arrow-right-circle\",\"arrow-up\",\"arrow-up-circle\",\"arrow-up-left\",\"arrow-up-right\",\"at-sign\",\"award\",\"bar-chart\",\"bar-chart-2\",\"battery\",\"battery-charging\",\"bell\",\"bell-off\",\"bluetooth\",\"bold\",\"book\",\"book-open\",\"bookmark\",\"box\",\"briefcase\",\"calendar\",\"camera\",\"camera-off\",\"cast\",\"check\",\"check-circle\",\"check-square\",\"chevron-down\",\"chevron-left\",\"chevron-right\",\"chevron-up\",\"chevrons-down\",\"chevrons-left\",\"chevrons-right\",\"chevrons-up\",\"chrome\",\"circle\",\"clipboard\",\"clock\",\"cloud\",\"cloud-drizzle\",\"cloud-lightning\",\"cloud-off\",\"cloud-rain\",\"cloud-snow\",\"code\",\"codepen\",\"codesandbox\",\"coffee\",\"columns\",\"command\",\"compass\",\"copy\",\"corner-down-left\",\"corner-down-right\",\"corner-left-down\",\"corner-left-up\",\"corner-right-down\",\"corner-right-up\",\"corner-up-left\",\"corner-up-right\",\"cpu\",\"credit-card\",\"crop\",\"crosshair\",\"database\",\"delete\",\"disc\",\"divide\",\"divide-circle\",\"divide-square\",\"dollar-sign\",\"download\",\"download-cloud\",\"dribbble\",\"droplet\",\"edit\",\"edit-2\",\"edit-3\",\"external-link\",\"eye\",\"eye-off\",\"facebook\",\"fast-forward\",\"feather\",\"figma\",\"file\",\"file-minus\",\"file-plus\",\"file-text\",\"film\",\"filter\",\"flag\",\"folder\",\"folder-minus\",\"folder-plus\",\"framer\",\"frown\",\"gift\",\"git-branch\",\"git-commit\",\"git-merge\",\"git-pull-request\",\"github\",\"gitlab\",\"globe\",\"grid\",\"hard-drive\",\"hash\",\"headphones\",\"heart\",\"help-circle\",\"hexagon\",\"home\",\"image\",\"inbox\",\"info\",\"instagram\",\"italic\",\"key\",\"layers\",\"layout\",\"life-buoy\",\"link\",\"link-2\",\"linkedin\",\"list\",\"loader\",\"lock\",\"log-in\",\"log-out\",\"mail\",\"map\",\"map-pin\",\"maximize\",\"maximize-2\",\"meh\",\"menu\",\"message-circle\",\"message-square\",\"mic\",\"mic-off\",\"minimize\",\"minimize-2\",\"minus\",\"minus-circle\",\"minus-square\",\"monitor\",\"moon\",\"more-horizontal\",\"more-vertical\",\"mouse-pointer\",\"move\",\"music\",\"navigation\",\"navigation-2\",\"octagon\",\"package\",\"paperclip\",\"pause\",\"pause-circle\",\"pen-tool\",\"percent\",\"phone\",\"phone-call\",\"phone-forwarded\",\"phone-incoming\",\"phone-missed\",\"phone-off\",\"phone-outgoing\",\"pie-chart\",\"play\",\"play-circle\",\"plus\",\"plus-circle\",\"plus-square\",\"pocket\",\"power\",\"printer\",\"radio\",\"refresh-ccw\",\"refresh-cw\",\"repeat\",\"rewind\",\"rotate-ccw\",\"rotate-cw\",\"rss\",\"save\",\"scissors\",\"search\",\"send\",\"server\",\"settings\",\"share\",\"share-2\",\"shield\",\"shield-off\",\"shopping-bag\",\"shopping-cart\",\"shuffle\",\"sidebar\",\"skip-back\",\"skip-forward\",\"slack\",\"slash\",\"sliders\",\"smartphone\",\"smile\",\"speaker\",\"square\",\"star\",\"stop-circle\",\"sun\",\"sunrise\",\"sunset\",\"tablet\",\"tag\",\"target\",\"terminal\",\"thermometer\",\"thumbs-down\",\"thumbs-up\",\"toggle-left\",\"toggle-right\",\"tool\",\"trash\",\"trash-2\",\"trello\",\"trending-down\",\"trending-up\",\"triangle\",\"truck\",\"tv\",\"twitch\",\"twitter\",\"type\",\"umbrella\",\"underline\",\"unlock\",\"upload\",\"upload-cloud\",\"user\",\"user-check\",\"user-minus\",\"user-plus\",\"user-x\",\"users\",\"video\",\"video-off\",\"voicemail\",\"volume\",\"volume-1\",\"volume-2\",\"volume-x\",\"watch\",\"wifi\",\"wifi-off\",\"wind\",\"x\",\"x-circle\",\"x-octagon\",\"x-square\",\"youtube\",\"zap\",\"zap-off\",\"zoom-in\",\"zoom-out\",];const moduleBaseUrl=\"https://framer.com/m/feather-icons/\";const uppercaseIconKeys=iconKeys.map(name=>name.charAt(0).toUpperCase()+name.slice(1));const lowercaseIconKeyPairs=iconKeys.reduce((res,key)=>{res[key.toLowerCase()]=key;return res;},{});/**\n * FEATHER\n *\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export function Icon(props){const{color,selectByList,iconSearch,iconSelection,onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,mirrored}=props;const isMounted=useRef(false);const iconKey=useIconSelection(iconKeys,selectByList,iconSearch,iconSelection,lowercaseIconKeyPairs);// Selected Icon Module\nconst[SelectedIcon,setSelectedIcon]=useState(iconKey===\"Home\"?HomeFactory(React):null);// Import the selected module or reset so null state\nasync function importModule(){let active=true;// Get the selected module\ntry{const iconModuleUrl=`${moduleBaseUrl}${iconKey}.js@0.0.29`;const module=await import(/* webpackIgnore: true */ iconModuleUrl);// console.log(module.default)\nif(active)setSelectedIcon(module.default(React));}catch(e){console.log(e);if(active)setSelectedIcon(null);}return()=>{active=false;};}// Import module when new style or icon is selected\nuseEffect(()=>{importModule();},[iconKey]);const isOnCanvas=RenderTarget.current()===RenderTarget.canvas;const emptyState=isOnCanvas?/*#__PURE__*/ _jsx(NullState,{}):null;return /*#__PURE__*/ _jsx(\"div\",{style:{display:\"contents\"},onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,children:SelectedIcon?/*#__PURE__*/ _jsx(SelectedIcon,{style:{width:\"100%\",height:\"100%\",transform:mirrored?\"scale(-1, 1)\":undefined},color:color}):emptyState});}Icon.displayName=\"Feather\";Icon.defaultProps={width:24,height:24,iconSelection:\"home\",iconSearch:\"Home\",color:\"#66F\",selectByList:true,mirrored:false};addPropertyControls(Icon,{selectByList:{type:ControlType.Boolean,title:\"Select\",enabledTitle:\"List\",disabledTitle:\"Search\",defaultValue:Icon.defaultProps.selectByList},iconSelection:{type:ControlType.Enum,options:iconKeys,optionTitles:uppercaseIconKeys,defaultValue:Icon.defaultProps.iconSelection,title:\"Name\",hidden:({selectByList})=>!selectByList,description:\"Find every icon name on the [Feather site](https://feathericons.com/)\"},iconSearch:{type:ControlType.String,title:\"Name\",placeholder:\"Menu, Wifi, Box…\",hidden:({selectByList})=>selectByList},mirrored:{type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:Icon.defaultProps.mirrored},color:{type:ControlType.Color,title:\"Color\",defaultValue:Icon.defaultProps.color},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"iconKeys\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Icon\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"24\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"IconProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Feather.map","/*\n * index (framer/default-utils@0.45.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://stanfordtax-staging.com/framerusercontent/modules/G4IfyjvwmaeSBpdb4TWu/OIjZRBmWDcIE2B6qgG1j/index.js\"\n","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}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={}));/**\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,title,...props}){const onCanvas=useIsOnCanvas();const isAutoplay=play!==\"Off\";const showThumbnail=onCanvas||thumbnail!==\"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,originalSearchParams]=parsedURL;const searchParams=embedURL.searchParams;if(originalSearchParams){for(const[param,value]of originalSearchParams){searchParams.set(param,value);if(param===\"t\")searchParams.set(\"start\",value)// embeds have to use `start`, but copying via right-click usually gives you `t=`\n;}}// https://developers.google.com/youtube/player_parameters\nsearchParams.set(\"iv_load_policy\",\"3\");searchParams.set(\"rel\",\"0\");searchParams.set(\"modestbranding\",\"1\");searchParams.set(\"playsinline\",\"1\");if(!showVideo){// if a browser does not support `loading=lazy`, make sure the video doesn't start playing in the background\nsearchParams.set(\"autoplay\",\"0\");}else if(isAutoplay||// when there is no thumbnail, we don't want to autoplay, unless video is started\nshowThumbnail&&showVideo){searchParams.set(\"autoplay\",\"1\");}if(isAutoplay&&shouldMute){searchParams.set(\"mute\",\"1\");}if(play===\"Loop\"){searchParams.set(\"loop\",\"1\");searchParams.set(\"playlist\",videoId);}if(!isRed){searchParams.set(\"color\",\"white\");}const iframeProps={title:title||\"Youtube Video\",allow:\"presentation; fullscreen; accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\",src:embedURL.href,frameBorder:\"0\",onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp};return /*#__PURE__*/_jsxs(\"article\",{onPointerEnter:()=>setHovered(true),onPointerLeave:()=>setHovered(false),onPointerOver:preloadVideo,onKeyDown:startVideo,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\"},role:\"presentation\",children:[isPreloading&&/*#__PURE__*/_jsx(\"link\",{rel:\"preconnect\",href:\"https://www.youtube.com\"}),isPreloading&&/*#__PURE__*/_jsx(\"link\",{rel:\"preconnect\",href:\"https://www.google.com\"}),showThumbnail&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"link\",{rel:\"preconnect\",href:\"https://i.ytimg.com\"}),/*#__PURE__*/_jsx(\"img\",{decoding:\"async\",src:getThumbnailURL(videoId,thumbnail),style:{...videoStyle,objectFit:\"cover\"}})]}),!onCanvas?/*#__PURE__*/_jsx(\"iframe\",{loading:!showVideo?\"lazy\":undefined,style:!showVideo?{...videoStyle,display:\"none\"}:videoStyle,...iframeProps}):null,showVideo?null:/*#__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===\"Off\";}},thumbnail:{title:\"Thumbnail\",description:\"Showing a thumbnail improves performance.\",type:ControlType.Enum,options:Object.values(ThumbnailOptions),hidden(props){return props.play!==\"Off\";}},isRed:{title:\"Color\",type:ControlType.Boolean,enabledTitle:\"Red\",disabledTitle:\"White\"},...borderRadiusControl,...defaultEvents});const defaultProps={url:\"https://youtu.be/8AHPXm9Y6mI\",play:\"Off\",shouldMute:true,thumbnail:\"Medium Quality\",isRed:true};Youtube.defaultProps=defaultProps;function parseVideoURL(urlString){let url;try{url=new URL(urlString);}catch{const embedURL=getEmbedURL(urlString);return[urlString,embedURL,null];}const searchParams=url.searchParams;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(\"/\");const page=pathSegments[0];// https://www.youtube.com/watch?v=Fop2oskTug8\nif(page===\"watch\"){const videoId=url.searchParams.get(\"v\");const embedURL=getEmbedURL(videoId);return[videoId,embedURL,searchParams];}// https://www.youtube.com/embed/Fop2oskTug8\nif(page===\"embed\"){const videoId=pathSegments[1];return[videoId,url,searchParams];}// https://www.youtube.com/shorts/zwMEhBq4kYM / https://www.youtube.com/live/XlWSzaluBKk\nif(page===\"shorts\"||page===\"live\"){const videoId=pathSegments[1];const embedURL=getEmbedURL(videoId);return[videoId,embedURL,searchParams];}}// https://youtu.be/Fop2oskTug8\nif(url.hostname===\"youtu.be\"){const videoId=url.pathname.slice(1);const embedURL=getEmbedURL(videoId);return[videoId,embedURL,searchParams];}}function getEmbedURL(videoId){return new URL(`https://www.youtube.com/embed/${videoId}`);}function getThumbnailURL(videoId,res){// https://gist.github.com/a1ip/be4514c1fd392a8c13b05e082c4da363\nconst pre=\"https://i.ytimg.com/vi_webp/\";const ext=\"webp\";switch(res){case\"Low Quality\":return`${pre}${videoId}/hqdefault.${ext}`;case\"Medium Quality\":return`${pre}${videoId}/sddefault.${ext}`;case\"High Quality\":return`${pre}${videoId}/maxresdefault.${ext}`;default:return`${pre}${videoId}/0.${ext}`;}}// 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\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"315\",\"framerIntrinsicWidth\":\"560\",\"framerComponentPresetProps\":\"isRed, borderRadius\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./YouTube.map"],"mappings":"8XAA+C,IACjB,EACjB,EAAkB,CAC3B,MAAO,OACP,OAAQ,OACR,QAAS,OACT,eAAgB,SAChB,WAAY,QAChB,EASM,EAAkB,CACpB,GAAG,EACH,aAAc,EACd,WAAY,2BACZ,OAAQ,uCACR,MAAO,UACP,cAAe,QACnB,EACa,EAA0B,GAAkB,EAAG,IACnC,EAAK,MAAO,CAC7B,MAAO,EACF,KACT,CAAC,CACJ,oCE7BG,EAAK,GAAM,CACX,GAAI,CAAC,EAAG,CACJ,IAAM,EAAI,EAAE,YAAY,CAAC,MAAO,EAAI,eAAgB,KAAM,EAAI,GAAI,GAAG,GAAI,IAC9D,EAAE,cAAc,MAAO,CAAC,IAAK,EAAG,MAAO,6BAA8B,MAAO,EAAG,OAAQ,EAAG,QAAS,YAAa,KAAM,OAAQ,OAAQ,EAAG,YAAa,IAAK,cAAe,QAAS,eAAgB,QAAS,GAAG,CAAC,EAAG,EAAE,cAAc,OAAQ,CAAC,EAAG,gDAAgD,CAAC,EAAG,EAAE,cAAc,WAAY,CAAC,OAAQ,uBAAuB,CAAC,CAAC,CAC3W,EACD,EAAE,YAAc,OAAO,EAAI,CAC/B,CACA,OAAO,CACX,qBCFgH,KCAsE,SAAgB,EAAiB,EAAS,EAAa,EAAW,GAAG,EAAc,EAAsB,CAC/R,IAAM,EAAiBA,MAAY,CAAC,GAAG,GAAY,MAAO,GAAyD,SAAU,EAAE,OAAO,KAA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