{"version":3,"file":"MetaPixelTracker.3bUp6aR3.mjs","names":["useMemo","useCallback","__esmMin","pe","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","ce","init_framer_CKT6jEEQ","ControlType","addPropertyControls","MetaPixelTracker","props","resolvedPixelId","value","pixelId","initializeAndTrack","w","fbq","args","script","firstScript","init_MetaPixelTracker","init_jsx_runtime"],"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":"A,4LAGG,SAAwBY,EAAiB,EAAM,CAAC,GAAK,CAAC,WAASC,EAAYC,EAAgBd,MAAY,CAAC,IAAMe,GAAOC,GAAS,GAAA,CAAI,KAAK,EAAE,OAAOD,EAAM,OAAO,EAAEA,EAAM,kBAAmB,EAAE,CAACC,CAAO,CAAC,EAAQC,EAAmBhB,MAAgB,CAAuC,GAA5BM,IAAS,QAAsB,CAACO,EAAgB,OAAO,IAAMI,EAAEX,EAAO,GAAG,OAAOW,EAAE,KAAM,WAAW,CAAC,IAAMC,EAAI,SAAS,GAAGC,EAAK,CAAID,EAAI,WAAYA,EAAI,WAAW,MAAMA,EAAIC,CAAI,EAAQD,EAAI,MAAM,KAAKC,CAAI,CAAG,EAAE,EAAI,KAAKD,EAAI,EAAI,OAAO,GAAK,EAAI,QAAQ,MAAM,EAAI,MAAM,CAAC,EAAE,EAAE,IAAIA,EAAI,EAAE,KAAKD,EAAE,MAAMC,CAAI,CAA2K,GAAG,CAA1C,SAAS,cAAc,wFAAiC,EAAE,CAAC,IAAME,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,GAAG,oBAAoB,EAAO,MAAM,GAAK,EAAO,IAAI,iDAAiD,IAAMC,EAAY,SAAS,qBAAqB,QAAQ,CAAC,CAAC,GAAMA,GAAaA,EAAY,WAAYA,EAAY,WAAW,aAAa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