{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/rFaR3YhTcAT7VRczsv1Q/ez5bYyIsRU9LQqG0pm8E/InjectorSub.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsInCurrentNavigationTarget}from\"framer\";import{motion}from\"framer-motion\";const injectCode=()=>{const settings=JSON.parse(localStorage.getItem(\"advancedCodeInjectorSettings\")||\"{}\");if(settings.injectCode&&settings.codeSnippets){settings.codeSnippets.forEach(snippet=>{const element=snippet.type===\"js\"?document.createElement(\"script\"):document.createElement(\"style\");element.textContent=snippet.code;let targetElement;switch(snippet.injectionPoint){case\"startOfHead\":targetElement=document.head;targetElement.insertBefore(element,targetElement.firstChild);break;case\"endOfHead\":targetElement=document.head;targetElement.appendChild(element);break;case\"startOfBody\":targetElement=document.body;targetElement.insertBefore(element,targetElement.firstChild);break;case\"endOfBody\":case\"footer\":targetElement=document.querySelector(\"footer\")||document.body;targetElement.appendChild(element);break;}});}};export function GlobalInjectorStatus(props){const{text,width,height,showCode}=props;const[status,setStatus]=React.useState({injectCode:false,codeSnippets:[]});const isInCurrentNavigationTarget=useIsInCurrentNavigationTarget();const[isInjecting,setIsInjecting]=React.useState(false);const[injectionComplete,setInjectionComplete]=React.useState(false);React.useEffect(()=>{if(isInCurrentNavigationTarget){const updateStatus=()=>{const savedSettings=localStorage.getItem(\"advancedCodeInjectorSettings\");if(savedSettings){const settings=JSON.parse(savedSettings);setStatus(settings);setIsInjecting(true);injectCode();setIsInjecting(false);setInjectionComplete(true);}};updateStatus();}},[isInCurrentNavigationTarget]);return /*#__PURE__*/_jsxs(motion.div,{style:{width,height,padding:16,border:\"1px solid #ccc\",borderRadius:8,backgroundColor:\"#f5f5f5\",overflow:\"auto\"},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.3},children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:\"0 0 10px 0\"},children:text}),/*#__PURE__*/_jsx(StatusIndicator,{active:status.injectCode,isInjecting:isInjecting}),/*#__PURE__*/_jsx(InjectionDetails,{status:status}),showCode&&/*#__PURE__*/_jsx(CodeDisplay,{codeSnippets:status.codeSnippets}),isInjecting&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:12,color:\"#888\"},children:\"Injecting code...\"}),injectionComplete&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:12,color:\"#4CAF50\"},children:\"Code injection complete\"})]});}const StatusIndicator=({active,isInjecting})=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",marginBottom:10},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:10,height:10,borderRadius:\"50%\",backgroundColor:active?isInjecting?\"#FFA500\":\"#4CAF50\":\"#F44336\",marginRight:5}}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:12,color:active?isInjecting?\"#FFA500\":\"#4CAF50\":\"#F44336\"},children:active?isInjecting?\"Injecting...\":\"Active\":\"Inactive\"})]});const InjectionDetails=({status})=>/*#__PURE__*/_jsx(\"div\",{style:{fontSize:12,marginBottom:10},children:/*#__PURE__*/_jsxs(\"p\",{children:[\"Number of Code Snippets: \",status.codeSnippets.length]})});const CodeDisplay=({codeSnippets})=>/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:12,marginTop:8},children:[/*#__PURE__*/_jsx(\"p\",{style:{marginBottom:4},children:\"Stored Code Snippets:\"}),codeSnippets.map((snippet,index)=>/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:10},children:[/*#__PURE__*/_jsxs(\"p\",{children:[\"Type: \",snippet.type.toUpperCase()]}),/*#__PURE__*/_jsxs(\"p\",{children:[\"Injection Point: \",snippet.injectionPoint]}),/*#__PURE__*/_jsx(\"pre\",{style:{background:\"#f0f0f0\",padding:8,borderRadius:4,overflowX:\"auto\",whiteSpace:\"pre-wrap\",wordWrap:\"break-word\",maxHeight:100},children:snippet.code||\"No code stored\"})]},index))]});GlobalInjectorStatus.defaultProps={text:\"Global Injector Status\",width:250,height:200,showCode:false};addPropertyControls(GlobalInjectorStatus,{text:{type:ControlType.String,title:\"Title\"},showCode:{type:ControlType.Boolean,title:\"Show Stored Code\",enabledTitle:\"Yes\",disabledTitle:\"No\"},width:{type:ControlType.Number,title:\"Width\",min:200,max:500,step:10},height:{type:ControlType.Number,title:\"Height\",min:150,max:500,step:10}});GlobalInjectorStatus.displayName=\"Global Injector Status\";\nexport const __FramerMetadata__ = {\"exports\":{\"GlobalInjectorStatus\":{\"type\":\"reactComponent\",\"name\":\"GlobalInjectorStatus\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InjectorSub.map"],
  "mappings": "4HAA0M,IAAMA,EAAW,IAAI,CAAC,IAAMC,EAAS,KAAK,MAAM,aAAa,QAAQ,8BAA8B,GAAG,IAAI,EAAKA,EAAS,YAAYA,EAAS,cAAcA,EAAS,aAAa,QAAQC,GAAS,CAAC,IAAMC,EAAQD,EAAQ,OAAO,KAAK,SAAS,cAAc,QAAQ,EAAE,SAAS,cAAc,OAAO,EAAEC,EAAQ,YAAYD,EAAQ,KAAK,IAAIE,EAAc,OAAOF,EAAQ,eAAe,CAAC,IAAI,cAAcE,EAAc,SAAS,KAAKA,EAAc,aAAaD,EAAQC,EAAc,UAAU,EAAE,MAAM,IAAI,YAAYA,EAAc,SAAS,KAAKA,EAAc,YAAYD,CAAO,EAAE,MAAM,IAAI,cAAcC,EAAc,SAAS,KAAKA,EAAc,aAAaD,EAAQC,EAAc,UAAU,EAAE,MAAM,IAAI,YAAY,IAAI,SAASA,EAAc,SAAS,cAAc,QAAQ,GAAG,SAAS,KAAKA,EAAc,YAAYD,CAAO,EAAE,KAAM,CAAC,CAAC,CAAG,EAAS,SAASE,EAAqBC,EAAM,CAAC,GAAK,CAAC,KAAAC,EAAK,MAAAC,EAAM,OAAAC,EAAO,SAAAC,CAAQ,EAAEJ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AgB,CAAC,CAAC,CAAC,EAAE4B,CAAK,CAAC,CAAC,CAAC,CAAC,EAAEzB,EAAqB,aAAa,CAAC,KAAK,yBAAyB,MAAM,IAAI,OAAO,IAAI,SAAS,EAAK,EAAE0B,EAAoB1B,EAAqB,CAAC,KAAK,CAAC,KAAK2B,EAAY,OAAO,MAAM,OAAO,EAAE,SAAS,CAAC,KAAKA,EAAY,QAAQ,MAAM,mBAAmB,aAAa,MAAM,cAAc,IAAI,EAAE,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,QAAQ,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,EAAE,OAAO,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,EAAE3B,EAAqB,YAAY",
  "names": ["injectCode", "settings", "snippet", "element", "targetElement", "GlobalInjectorStatus", "props", "text", "width", "height", "showCode", "status", "setStatus", "ye", "isInCurrentNavigationTarget", "useIsInCurrentNavigationTarget", "isInjecting", "setIsInjecting", "injectionComplete", "setInjectionComplete", "ue", "savedSettings", "u", "motion", "p", "StatusIndicator", "InjectionDetails", "CodeDisplay", "active", "codeSnippets", "index", "addPropertyControls", "ControlType"]
}
