{"version":3,"file":"MetaPixelTracker.INeOxLbL.mjs","names":["useMemo","useCallback"],"sources":["https:/framerusercontent.com/modules/L7WbtGZD97sfN2D4Z7id/ELxZrcjMUxDuXipejkdz/MetaPixelTracker.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useEffect,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function MetaPixelTracker(props){const{pixelId}=props;const resolvedPixelId=useMemo(()=>{const value=(pixelId??\"\").trim();return value.length>0?value:\"4094558604155293\";},[pixelId]);const initializeAndTrack=useCallback(()=>{if(typeof window===\"undefined\")return;if(!resolvedPixelId)return;const w=window;if(typeof w.fbq!==\"function\"){const fbq=function(...args){if(fbq.callMethod){fbq.callMethod.apply(fbq,args);}else{fbq.queue.push(args);}};fbq.push=fbq;fbq.loaded=true;fbq.version=\"2.0\";fbq.queue=[];w.fbq=fbq;w._fbq=w._fbq||fbq;}const scriptSelector='script#meta-pixel-script, script[src=\"https://connect.facebook.net/en_US/fbevents.js\"]';const existingScript=document.querySelector(scriptSelector);if(!existingScript){const script=document.createElement(\"script\");script.id=\"meta-pixel-script\";script.async=true;script.src=\"https://connect.facebook.net/en_US/fbevents.js\";const firstScript=document.getElementsByTagName(\"script\")[0];if(firstScript&&firstScript.parentNode){firstScript.parentNode.insertBefore(script,firstScript);}else{document.head.appendChild(script);}}w.fbq(\"init\",resolvedPixelId);w.fbq(\"track\",\"PageView\");},[resolvedPixelId]);useEffect(()=>{if(typeof window!==\"undefined\"){initializeAndTrack();}},[initializeAndTrack]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{position:\"relative\",width:0,height:0,overflow:\"hidden\",pointerEvents:\"none\"}});}addPropertyControls(MetaPixelTracker,{pixelId:{type:ControlType.String,title:\"Pixel ID\",defaultValue:\"4094558604155293\",placeholder:\"Enter Meta Pixel ID\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MetaPixelTracker\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MetaPixelTracker.map"],"mappings":"4LAGG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,WAAS,EAAY,EAAgBA,MAAY,CAAC,IAAM,GAAO,GAAS,GAAA,CAAI,KAAK,EAAE,OAAO,EAAM,OAAO,EAAE,EAAM,kBAAmB,EAAE,CAAC,CAAO,CAAC,EAAQ,EAAmBC,MAAgB,CAAuC,GAA5B,IAAS,QAAsB,CAAC,EAAgB,OAAO,IAAM,EAAE,EAAO,GAAG,OAAO,EAAE,KAAM,WAAW,CAAC,IAAM,EAAI,SAAS,GAAG,EAAK,CAAI,EAAI,WAAY,EAAI,WAAW,MAAM,EAAI,CAAI,EAAQ,EAAI,MAAM,KAAK,CAAI,CAAG,EAAE,EAAI,KAAK,EAAI,EAAI,OAAO,GAAK,EAAI,QAAQ,MAAM,EAAI,MAAM,CAAC,EAAE,EAAE,IAAI,EAAI,EAAE,KAAK,EAAE,MAAM,CAAI,CAA2K,GAAG,CAA1C,SAAS,cAAc,wFAAiC,EAAE,CAAC,IAAM,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,GAAG,oBAAoB,EAAO,MAAM,GAAK,EAAO,IAAI,iDAAiD,IAAM,EAAY,SAAS,qBAAqB,QAAQ,CAAC,CAAC,GAAM,GAAa,EAAY,WAAY,EAAY,WAAW,aAAa,EAAO,CAAW,EAAQ,SAAS,KAAK,YAAY,CAAM,CAAG,CAAC,EAAE,IAAI,OAAO,CAAe,EAAE,EAAE,IAAI,QAAQ,UAAU,CAAE,EAAE,CAAC,CAAe,CAAC,EAA+F,OAA7F,MAAc,CAAW,IAAS,QAAa,EAAmB,CAAG,EAAE,CAAC,CAA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