{"version":3,"file":"LD_JSON_ScriptInjector.DPSZq-2x.mjs","names":["_Fragment","__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","c","addPropertyControls","init_framer_DKWANagr","ControlType","SchemaInjector","schemaString","error","script","l","init_LD_JSON_ScriptInjector"],"sources":["https:/framerusercontent.com/modules/mY039FmM8FIlYloNN4Xt/PkpvXOTGdCSJNrgs11RQ/LD_JSON_ScriptInjector.js"],"sourcesContent":["import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function SchemaInjector({schemaString}){useEffect(()=>{// Do nothing if the string is empty.\nif(!schemaString){return;}// Validate that the string is actual JSON before injecting.\ntry{JSON.parse(schemaString);}catch(error){// If JSON.parse fails, the string is not valid JSON.\n// We log an error in the console and stop.\nconsole.error(\"Framer SchemaInjector: Invalid JSON string provided.\",error);return;}const script=document.createElement(\"script\");script.type=\"application/ld+json\";// If the JSON is valid, set the script's content.\nscript.textContent=schemaString;document.head.appendChild(script);},[schemaString])// The effect runs when the schemaString prop changes.\n;return /*#__PURE__*/_jsx(_Fragment,{});}addPropertyControls(SchemaInjector,{ld_type:{title:\"Schema JSON Type\",type:ControlType.String,displayTextArea:true,description:\"Mention JSON-LD schema type.\",defaultValue:\"\"},schemaString:{title:\"Schema JSON\",type:ControlType.String,displayTextArea:true,description:\"Paste your complete JSON-LD schema object here.\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SchemaInjector\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LD_JSON_ScriptInjector.map"],"mappings":"A,iLAAkJ,SAAwBS,EAAe,CAAC,gBAAc,CAMvM,OANwMN,MAAc,CACvN,GAAG,CAACO,EAAc,OAClB,GAAG,CAAC,KAAK,MAAMA,CAAY,CAAE,OAAOC,EAAM,CAE1C,QAAQ,MAAM,uDAAuDA,CAAK,EAAE,MAAO,CAAC,IAAMC,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,KAAK,sBAC9I,EAAO,YAAYF,EAAa,SAAS,KAAK,YAAYE,CAAM,CAAE,EAAE,CAACF,CAAY,CAAC,EAC7D,gBAAKV,EAAU,CAAC,CAAC,CAAE,C,0CAACM,EAAoBG,EAAe,CAAC,QAAQ,CAAC,MAAM,mBAAmB,KAAKD,EAAY,OAAO,gBAAgB,GAAK,YAAY,+BAA+B,aAAa,EAAE,EAAE,aAAa,CAAC,MAAM,cAAc,KAAKA,EAAY,OAAO,gBAAgB,GAAK,YAAY,kDAAkD,aAAa,EAAE,CAAC,CAAC,C"}