{"version":3,"file":"CustomHeadCode_10.B2CFkryF.mjs","names":["__esmMin","init_npm_react_18_3_1","init_jsx_runtime","c","ce","init_framer_D1IzEvwH","addPropertyControls","ControlType","CustomHeadCode","headCode","injected","node","source","tag","el","a","init_CustomHeadCode_10"],"sources":["https:/framerusercontent.com/modules/U2xfyBlVFnj0jau1PBX0/JjsqcmUGiIQhG3kF5dI1/CustomHeadCode_10.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function CustomHeadCode({headCode}){useEffect(()=>{if(!headCode||!headCode.trim())return;const injected=[];try{const parser=new DOMParser;const doc=parser.parseFromString(`<head>${headCode}</head>`,\"text/html\");doc.head.childNodes.forEach(node=>{if(node.nodeType!==Node.ELEMENT_NODE)return;const source=node;const tag=source.tagName.toLowerCase();if(![\"script\",\"link\",\"meta\",\"style\"].includes(tag))return;const el=document.createElement(tag);Array.from(source.attributes).forEach(a=>el.setAttribute(a.name,a.value));if((tag===\"script\"||tag===\"style\")&&source.textContent){el.textContent=source.textContent;}document.head.appendChild(el);injected.push(el);});}catch(e){console.warn(\"CustomHeadCode: parse error\",e);}return()=>{injected.forEach(el=>{try{document.head.removeChild(el);}catch{}});};},[headCode]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}addPropertyControls(CustomHeadCode,{headCode:{type:ControlType.String,title:\"Head Code\",defaultValue:\"\",displayTextArea:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomHeadCode\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomHeadCode_10.map"],"mappings":"A,0KAA4H,SAAwBQ,EAAe,CAAC,YAAU,CAAswB,OAArwBJ,MAAc,CAAC,GAAG,CAACK,GAAU,CAACA,EAAS,KAAK,EAAE,OAAO,IAAMC,EAAS,CAAC,EAA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