{"version":3,"file":"ContainedPngIcon.MvMFRHpn.mjs","names":["useRef","useCallback","__esmMin","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","c","J","ce","de","ContainedPngIcon","hostRef","setRefs","node","ref","host","restoreRecords","setStyleWithRestore","record","element","property","value","clearStyles","previousValue","apply","img","rafId","resizeObserver","Component","props","init_ContainedPngIcon","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/CrredLY2OCqxlCWqG34H/9WQ9tVRIYmMb1ecjgcI0/ContainedPngIcon.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect,useRef}from\"react\";// User request: Create a Framer code override ContainedPngIcon that preserves native image/frame layer content/selectability while applying centered, no-repeat, internally-contained PNG background rendering to avoid edge clipping.\nexport function ContainedPngIcon(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const hostRef=useRef(null);const setRefs=useCallback(node=>{hostRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref){ref.current=node;}},[ref]);useEffect(()=>{const host=hostRef.current;if(!host||typeof window===\"undefined\")return;const restoreRecords=new Map;const setStyleWithRestore=(element,property,value)=>{let record=restoreRecords.get(element);if(!record){record=new Map;restoreRecords.set(element,record);}if(!record.has(property)){record.set(property,element.style.getPropertyValue(property));}element.style.setProperty(property,value);};const clearStyles=()=>{restoreRecords.forEach((record,element)=>{record.forEach((previousValue,property)=>{if(previousValue){element.style.setProperty(property,previousValue);}else{element.style.removeProperty(property);}});});restoreRecords.clear();};const apply=()=>{clearStyles();setStyleWithRestore(host,\"display\",\"flex\");setStyleWithRestore(host,\"align-items\",\"center\");setStyleWithRestore(host,\"justify-content\",\"center\");setStyleWithRestore(host,\"overflow\",\"visible\");const img=host.querySelector(\"img\");if(!(img instanceof HTMLElement))return;setStyleWithRestore(img,\"width\",\"80%\");setStyleWithRestore(img,\"height\",\"80%\");setStyleWithRestore(img,\"object-fit\",\"contain\");setStyleWithRestore(img,\"object-position\",\"center\");setStyleWithRestore(img,\"position\",\"relative\");setStyleWithRestore(img,\"inset\",\"auto\");};const rafId=window.requestAnimationFrame(apply);let resizeObserver=null;if(typeof ResizeObserver!==\"undefined\"){resizeObserver=new ResizeObserver(()=>apply());resizeObserver.observe(host);}return()=>{window.cancelAnimationFrame(rafId);resizeObserver?.disconnect();clearStyles();};},[]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props,style:{...props.style,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"visible\",backgroundPosition:\"center\",backgroundRepeat:\"no-repeat\",backgroundSize:\"80% 80%\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"ContainedPngIcon\":{\"type\":\"reactHoc\",\"name\":\"ContainedPngIcon\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ContainedPngIcon.map"],"mappings":"A,gJACA,SAAgBW,EAAiB,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAM,CAAC,IAAMC,EAAQZ,EAAO,IAAI,EAAQa,EAAQZ,EAAY,GAAM,CAAC,EAAQ,QAAQa,EAAQ,OAAOC,GAAM,WAAYA,EAAID,CAAI,EAAWC,IAAK,EAAI,QAAQD,EAAM,EAAE,CAACC,CAAG,CAAC,EAAu+C,OAAr+CN,MAAc,CAAC,IAAMO,EAAKJ,EAAQ,QAAQ,GAAG,CAACI,GAAaV,IAAS,OAAY,OAAO,IAAMW,kBAAe,IAAI,IAAUC,GAAqB,EAAQ,EAAS,IAAQ,CAAC,IAAIC,EAAOF,EAAe,IAAIG,CAAO,EAAMD,IAAQ,kBAAO,IAAI,IAAIF,EAAe,IAAIG,EAAQD,CAAM,GAAOA,EAAO,IAAIE,CAAQ,GAAGF,EAAO,IAAIE,EAASD,EAAQ,MAAM,iBAAiBC,CAAQ,CAAC,EAAGD,EAAQ,MAAM,YAAYC,EAASC,CAAK,CAAE,EAAQC,MAAgB,CAACN,EAAe,SAAS,EAAO,IAAU,CAACE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