{"version":3,"file":"ArticleSchema.C4e5Bwgr.mjs","names":["useMemo","__esmMin","pe","c","init_jsx_runtime","init_npm_react_18_3_1","addPropertyControls","init_framer_BisrWwwE","RenderTarget","ControlType","normalizeSchemaInput","trimmed","input","scriptMatch","serializeSafeJsonLd","normalized","parsed","ArticleSchema","props","safeJsonLd","schemaJson","style","init_ArticleSchema"],"sources":["https:/framerusercontent.com/modules/6yflLWL8XcWNUzhR4xht/F3G1hbP5wAIPedFtO5yC/ArticleSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useMemo}from\"react\";function normalizeSchemaInput(input){const trimmed=input.trim();if(!trimmed)return\"\";const scriptMatch=trimmed.match(/^<script\\b[^>]*type=[\"']application\\/ld\\+json[\"'][^>]*>([\\s\\S]*?)<\\/script>$/i);return scriptMatch?scriptMatch[1].trim():trimmed;}function serializeSafeJsonLd(input){const normalized=normalizeSchemaInput(input);if(!normalized)return\"\";try{const parsed=JSON.parse(normalized);const isObjectOrArray=typeof parsed===\"object\"&&parsed!==null&&(Array.isArray(parsed)||!Array.isArray(parsed));if(!isObjectOrArray)return\"\";return JSON.stringify(parsed).replace(/</g,\"\\\\u003C\").replace(/\\u2028/g,\"\\\\u2028\").replace(/\\u2029/g,\"\\\\u2029\");}catch{return\"\";}}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ArticleSchema(props){const{schemaJson,style}=props;const safeJsonLd=useMemo(()=>serializeSafeJsonLd(schemaJson),[schemaJson]);const isCanvas=RenderTarget.current()===RenderTarget.canvas;if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",minHeight:36,border:\"1px dashed #EEEEEE\",borderRadius:8,background:\"#F5F5F5\",color:\"#000000\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:12,lineHeight:1.2,padding:8,textAlign:\"center\",...style},children:\"ArticleSchema (JSON-LD)\"});}return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:0,overflow:\"hidden\",pointerEvents:\"none\",...style},\"aria-hidden\":true,children:safeJsonLd?/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:safeJsonLd}}):null});}addPropertyControls(ArticleSchema,{schemaJson:{type:ControlType.String,title:\"Schema JSON\",defaultValue:\"\",displayTextArea:true,placeholder:'{ \"@context\": \"https://schema.org\", \"@type\": \"Article\" }'}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArticleSchema\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArticleSchema.map"],"mappings":"A,kLAAuI,SAASU,EAAqB,EAAM,CAAC,IAAMC,EAAQC,EAAM,KAAK,EAAE,GAAG,CAACD,EAAQ,MAAM,GAAG,IAAME,EAAYF,EAAQ,MAAM,+EAA+E,EAAE,OAAOE,EAAYA,EAAY,EAAE,CAAC,KAAK,EAAEF,CAAQ,CAAC,SAASG,EAAoB,EAAM,CAAC,IAAMC,EAAWL,EAAqBE,CAAK,EAAE,GAAG,CAACG,EAAW,MAAM,GAAG,GAAG,CAAC,IAAMC,EAAO,KAAK,MAAMD,CAAU,EAA8I,OAAtH,OAAOC,GAAS,UAAU,IAAgB,OAAM,QAAQA,CAAM,GAAI,MAAM,QAAQA,CAAM,EAA6B,GAAU,KAAK,UAAUA,CAAM,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,QAAQ,UAAU,SAAS,CAAC,CAAC,QAAQ,UAAU,SAAS,CAAE,MAAM,CAAC,MAAM,EAAG,CAAC,CAG1xB,SAAwBC,EAAc,EAAM,CAAC,GAAK,CAAC,aAAW,SAAOC,EAAYC,EAAWnB,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