{"version":3,"file":"shared-lib.CiEluVly.mjs","names":[],"sources":["https:/framerusercontent.com/modules/uqn6XvkE75ToHoxpEVug/2umDg5zXFffTLyCWhZwk/AttributionBridge.js","https:/framerusercontent.com/modules/xq2rWChbvt43mtt9puXr/5VNsy9k0U50oZAVxjyz8/siteMetadata.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";const DEFAULT_APP_URL=\"https://app.noops.sh/login\";function readCookie(name){if(typeof document===\"undefined\"){return null;}const parts=document.cookie.split(\";\");for(const part of parts){const[rawName,...rest]=part.split(\"=\");if(rawName?.trim()===name){return decodeURIComponent(rest.join(\"=\").trim());}}return null;}function buildRedirectHref(input){if(typeof window===\"undefined\"){return null;}const appBaseUrl=input.appBaseUrl.trim();if(!appBaseUrl){return null;}let candidate;try{candidate=new URL(input.href,window.location.href);}catch{return null;}let appUrl;try{appUrl=new URL(appBaseUrl);}catch{return null;}// Only rewrite links that point to the app\nif(candidate.hostname!==appUrl.hostname){return null;}const currentUrl=new URL(window.location.href);const merged=new URL(candidate.toString());const trackedKeys=[\"utm_source\",\"utm_medium\",\"utm_campaign\",\"utm_term\",\"utm_content\",\"campaign_id\",\"adset_id\",\"ad_id\",\"fbclid\",\"gclid\",\"ref\"];for(const key of trackedKeys){const value=currentUrl.searchParams.get(key);if(value&&!merged.searchParams.has(key)){merged.searchParams.set(key,value);}}const fbc=currentUrl.searchParams.get(\"fbc\")||currentUrl.searchParams.get(\"_fbc\")||readCookie(\"_fbc\");const fbp=currentUrl.searchParams.get(\"fbp\")||currentUrl.searchParams.get(\"_fbp\")||readCookie(\"_fbp\");if(fbc&&!merged.searchParams.has(\"fbc\")){merged.searchParams.set(\"fbc\",fbc);}if(fbp&&!merged.searchParams.has(\"fbp\")){merged.searchParams.set(\"fbp\",fbp);}if(!merged.searchParams.has(\"landing_url\")){merged.searchParams.set(\"landing_url\",currentUrl.toString());}if(document.referrer&&!merged.searchParams.has(\"referrer\")){merged.searchParams.set(\"referrer\",document.referrer);}return merged.toString();}export default function AttributionBridge(props){useEffect(()=>{if(typeof document===\"undefined\"){return;}const rewriteAnchor=node=>{if(!(node instanceof HTMLAnchorElement)){return;}const href=node.getAttribute(\"href\");if(!href){return;}const redirectHref=buildRedirectHref({href,appBaseUrl:props.appBaseUrl});if(!redirectHref){return;}if(node.href!==redirectHref){node.href=redirectHref;}};const rewriteAllAnchors=()=>{const anchors=Array.from(document.querySelectorAll(\"a[href]\"));for(const anchor of anchors){rewriteAnchor(anchor);}};const handleClick=event=>{const target=event.target;if(!(target instanceof Element)){return;}const closestAnchor=target.closest(\"a[href]\");if(!(closestAnchor instanceof HTMLAnchorElement)){return;}const redirectHref=buildRedirectHref({href:closestAnchor.href,appBaseUrl:props.appBaseUrl});if(!redirectHref){return;}closestAnchor.href=redirectHref;};rewriteAllAnchors();const observer=new MutationObserver(()=>{rewriteAllAnchors();});observer.observe(document.body,{subtree:true,childList:true,attributes:true,attributeFilter:[\"href\"]});document.addEventListener(\"click\",handleClick,true);return()=>{observer.disconnect();document.removeEventListener(\"click\",handleClick,true);};},[props.appBaseUrl]);return /*#__PURE__*/_jsx(\"div\",{style:{width:0,height:0,overflow:\"hidden\",pointerEvents:\"none\"}});}AttributionBridge.defaultProps={appBaseUrl:DEFAULT_APP_URL};addPropertyControls(AttributionBridge,{appBaseUrl:{type:ControlType.String,title:\"App URL\",defaultValue:DEFAULT_APP_URL}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AttributionBridge\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AttributionBridge.map","// Generated by Framer (6d165e2)\nexport default function metadata(params,activeLocale){return{description:\"Connect your GitHub repo and noops gets your app live in minutes: deploys, domain, database, auth, observability, and AI agents that catch runtime errors and open PRs with fixes.\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/qEPxbgM2aHWSEvkeupmEi56J16U.png\",title:\"Noops - Ship AI-Built Apps to Production\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"wLAA+K,SAAS,EAAW,EAAK,CAAC,GAAG,OAAO,SAAW,IAAa,OAAO,KAAM,IAAM,EAAM,SAAS,OAAO,MAAM,IAAI,CAAC,IAAI,IAAM,KAAQ,EAAM,CAAC,GAAK,CAAC,EAAQ,GAAG,GAAM,EAAK,MAAM,IAAI,CAAC,GAAG,GAAS,MAAM,GAAG,EAAM,OAAO,mBAAmB,EAAK,KAAK,IAAI,CAAC,MAAM,CAAC,CAAG,OAAO,KAAM,SAAS,EAAkB,EAAM,CAAC,GAAU,IAAS,OAAa,OAAO,KAAM,IAAM,EAAW,EAAM,WAAW,MAAM,CAAC,GAAG,CAAC,EAAY,OAAO,KAAM,IAAI,EAAU,GAAG,CAAC,EAAU,IAAI,IAAI,EAAM,KAAK,EAAO,SAAS,KAAK,MAAO,CAAC,OAAO,KAAM,IAAI,EAAO,GAAG,CAAC,EAAO,IAAI,IAAI,EAAW,MAAO,CAAC,OAAO,KAChuB,GAAG,EAAU,WAAW,EAAO,SAAU,OAAO,KAAM,IAAM,EAAW,IAAI,IAAI,EAAO,SAAS,KAAK,CAAO,EAAO,IAAI,IAAI,EAAU,UAAU,CAAC,CAA+I,IAAI,IAAM,IAAtI,CAAC,aAAa,aAAa,eAAe,WAAW,cAAc,cAAc,WAAW,QAAQ,SAAS,QAAQ,MAAM,CAA8B,CAAC,IAAM,EAAM,EAAW,aAAa,IAAI,EAAI,CAAI,GAAO,CAAC,EAAO,aAAa,IAAI,EAAI,EAAE,EAAO,aAAa,IAAI,EAAI,EAAM,CAAG,IAAM,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