{"version":3,"file":"ForwardTraffic_Prod.DCAFbRIe.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/wcHpgIhIMvxWVY132xNn/UbKJnZcUk7TQHLnjR9Ed/ForwardTraffic_Prod.js"],"sourcesContent":["import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n */function ForwardTraffic(props){const{redirectUrl,openInNewTab}=props;const[hasRedirected,setHasRedirected]=React.useState(false);React.useEffect(()=>{// Check if we're in the Framer environment\nconst isInFramerEnvironment=()=>{return typeof window!==\"undefined\"&&(window[\"Framer\"]!==undefined||window[\"__framer__\"]!==undefined);};// Only redirect if we're not in the Framer environment and haven't redirected yet\nif(!isInFramerEnvironment()&&!hasRedirected){let finalUrl=redirectUrl;if(!finalUrl.startsWith(\"https://\")&&!finalUrl.startsWith(\"http://\")){finalUrl=\"https://\"+finalUrl;}setHasRedirected(true);if(openInNewTab){window.open(finalUrl,\"_blank\");}else{window.location.href=finalUrl;}}},[redirectUrl,openInNewTab,hasRedirected]);// Render nothing\nreturn /*#__PURE__*/_jsx(_Fragment,{});}ForwardTraffic.displayName=\"Forward Traffic\";addPropertyControls(ForwardTraffic,{redirectUrl:{title:\"URL\",type:ControlType.String,defaultValue:\"framer.university\",description:\"Enter the URL to redirect to when the page is visited.\"},openInNewTab:{title:\"New Tab\",type:ControlType.Boolean,defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"More components at [Framer University](https://frameruni.link/cc).\"}});export default ForwardTraffic;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ForwardTraffic\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ForwardTraffic_Prod.map"],"mappings":"yTAEG,SAAS,EAAe,EAAM,CAAC,GAAK,CAAC,cAAY,eAAa,CAAC,EAAW,CAAC,EAAc,EAAiB,CAAA,EAAgB,IAG7H,OAHoI,MAAoB,CACxJ,IAAM,MAAyC,IAAS,SAAc,EAAO,SAAY,IAAA,IAAW,EAAO,aAAgB,IAAA,IAC3H,GAAG,CAAC,KAAyB,CAAC,EAAc,CAAC,IAAI,EAAS,EAAe,CAAC,EAAS,WAAW,aAAa,CAAC,EAAS,WAAW,aAAY,EAAS,WAAW,GAAU,EAAiB,IAAS,EAAc,EAAO,KAAK,EAAS,UAAgB,EAAO,SAAS,KAAK,CAAW,CAAC,EAAC,CAAC,EAAY,EAAa,EAAc,EAC7S,EAAKA,EAAU,EAAE,CAAG,iCAAe,YAAY,kBAAkB,EAAoB,EAAe,CAAC,YAAY,CAAC,MAAM,MAAM,KAAK,EAAY,OAAO,aAAa,oBAAoB,YAAY,yDAAyD,CAAC,aAAa,CAAC,MAAM,UAAU,KAAK,EAAY,QAAQ,aAAa,GAAM,aAAa,MAAM,cAAc,KAAK,YAAY,qEAAqE,CAAC"}