{"version":3,"file":"UncodeRedirect.D6o7n_Y9.mjs","names":[],"sources":["https:/framerusercontent.com/modules/jjmdDergCfDicbSdpgKd/Wy2gb8AlSlTqt1Ke3Okp/UncodeRedirect.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{RenderTarget}from\"framer\";function UncodeRedirect({targetUrl,delayInSeconds}){useEffect(()=>{if(RenderTarget.current()===RenderTarget.preview||RenderTarget.current()===RenderTarget.publish){const currentUrl=window.location.href;if(currentUrl!==targetUrl){const timer=setTimeout(()=>{window.location.href=targetUrl;},delayInSeconds*1e3);return()=>clearTimeout(timer);}}},[targetUrl,delayInSeconds]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"1px\",height:\"1px\",opacity:0}});}addPropertyControls(UncodeRedirect,{targetUrl:{type:ControlType.Link,title:\"Target URL\",defaultValue:\"\",placeholder:\"https://example.com\",description:\"URL para redirecionamento se n\\xe3o for igual \\xe0 atual.\"},delayInSeconds:{type:ControlType.Number,title:\"Delay (s)\",defaultValue:0,min:0,unit:\"s\",description:\"Tempo de atraso antes do redirecionamento.\"},autor:{type:ControlType.String,title:\"Autor\",defaultValue:\"Autor:\",description:\"Code by UncodeStack and @omatusaelhorch.\"}});export default UncodeRedirect/*\n  Code by @omatusaelhorch\n*/;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"UncodeRedirect\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UncodeRedirect.map"],"mappings":"gMAA6J,SAAS,EAAe,CAAC,YAAU,kBAAgB,CAAiU,OAAhU,MAAc,CAAC,IAAG,EAAa,QAAQ,IAAI,EAAa,SAAS,EAAa,QAAQ,IAAI,EAAa,UAA0B,EAAO,SAAS,OAAqB,EAAU,CAAC,IAAM,EAAM,eAAe,CAAC,EAAO,SAAS,KAAK,CAAU,EAAE,EAAe,GAAG,EAAE,UAAU,aAAa,CAAK,CAAE,CAAE,EAAE,CAAC,EAAU,CAAc,CAAC,EAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,MAAM,OAAO,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAE,qBAApjB,IAA6B,IAAoD,EAAoe,EAAoB,EAAe,CAAC,UAAU,CAAC,KAAK,EAAY,KAAK,MAAM,aAAa,aAAa,GAAG,YAAY,sBAAsB,YAAY,qDAA2D,EAAE,eAAe,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,aAAa,EAAE,IAAI,EAAE,KAAK,IAAI,YAAY,4CAA4C,EAAE,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa,SAAS,YAAY,0CAA0C,CAAC,CAAC"}