{"version":3,"file":"ForwardTraffic_Prod.DsEEBZ1H.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,CAAC,GAAe,EAAM,CAGnI,MAHoI,GAAgB,IAAI,CACxJ,IAAM,EAAsB,IAAmB,aAAuB,EAAO,aAAA,IAAuB,EAAO,iBAAA,IAC3G,IAAI,GAAuB,GAAG,EAAc,CAAC,IAAI,EAAS,EAAuI,CAAvH,EAAS,WAAW,WAAW,GAAG,EAAS,WAAW,UAAU,GAAE,EAAS,WAAW,GAAU,GAAiB,EAAK,CAAI,EAAc,EAAO,KAAK,EAAS,SAAS,CAAO,EAAO,SAAS,KAAK,CAAW,CAAC,EAAC,CAAC,EAAY,EAAa,CAAc,EAAC,CAC9S,EAAKA,EAAU,CAAE,EAAC,AAAE,oBALxC,GAAiE,IAA4B,IAAoD,CAKzG,EAAe,YAAY,kBAAkB,EAAoB,EAAe,CAAC,YAAY,CAAC,MAAM,MAAM,KAAK,EAAY,OAAO,aAAa,oBAAoB,YAAY,wDAAyD,EAAC,aAAa,CAAC,MAAM,UAAU,KAAK,EAAY,QAAQ,cAAa,EAAM,aAAa,MAAM,cAAc,KAAK,YAAY,oEAAqE,CAAC,EAAC,GAAgB"}