{"version":3,"file":"FAQSchema.jIE333L6.mjs","names":[],"sources":["https:/framerusercontent.com/modules/1R0azUDw3IiVHKSEZQUV/m71jVzT5pIIyeGn0vC56/FAQSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";function questionCount(raw){if(!raw)return 0;try{const parsed=JSON.parse(raw);const entities=parsed&&parsed.mainEntity;return Array.isArray(entities)?entities.length:0;}catch(error){return-1;}}/**\n * FAQ Schema\n *\n * Emits FAQPage JSON-LD for an ANKOR article.\n *\n * Bind the article's \"FAQ schema\" field to the Schema property. That field is\n * generated from the FAQ rich text field at authoring time, because Framer\n * cannot bind a richtext variable to a string property control. Regenerate it\n * whenever the FAQ field changes, or the two will drift apart.\n *\n * Renders nothing on the published page.\n *\n * @framerIntrinsicWidth 0\n * @framerIntrinsicHeight 0\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function FAQSchema(props){const{schema=\"\"}=props;const count=questionCount(schema);if(RenderTarget.current()===RenderTarget.canvas){const invalid=count===-1;const label=invalid?\"FAQPage schema \\xb7 invalid JSON\":\"FAQPage schema \\xb7 \"+count+\" questions\";return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"max-content\",padding:\"6px 10px\",borderRadius:6,border:invalid?\"1px dashed rgba(200, 0, 0, 0.6)\":\"1px dashed rgba(0, 0, 0, 0.3)\",color:invalid?\"rgba(160, 0, 0, 0.9)\":\"rgba(0, 0, 0, 0.6)\",fontSize:11,fontFamily:\"sans-serif\",whiteSpace:\"nowrap\"},children:label});}if(count<=0)return null;const safe=schema.replace(/</g,\"\\\\u003c\").replace(/>/g,\"\\\\u003e\");return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:safe}});}addPropertyControls(FAQSchema,{schema:{type:ControlType.String,title:\"Schema\",defaultValue:\"\",displayTextArea:true,description:\"Bind the article's FAQ schema field.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQSchema\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"0\",\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicWidth\":\"0\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQSchema.map"],"mappings":"mKAA4G,SAAS,EAAc,EAAI,CAAC,GAAG,CAAC,EAAI,MAAO,GAAE,GAAG,CAAC,IAAM,EAAO,KAAK,MAAM,CAAG,EAAQ,EAAS,GAAQ,EAAO,WAAW,OAAO,MAAM,QAAQ,CAAQ,EAAE,EAAS,OAAO,CAAE,MAAa,CAAC,MAAM,EAAG,CAAC,CAiBzS,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,SAAO,IAAI,EAAY,EAAM,EAAc,CAAM,EAAE,GAAG,EAAa,QAAQ,IAAI,EAAa,OAAO,CAAC,IAAM,EAAQ,IAAQ,GAAS,EAAM,EAAQ,gCAAmC,oBAAuB,EAAM,aAAa,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,cAAc,QAAQ,WAAW,aAAa,EAAE,OAAO,EAAQ,kCAAkC,gCAAgC,MAAM,EAAQ,uBAAuB,qBAAqB,SAAS,GAAG,WAAW,aAAa,WAAW,QAAQ,EAAE,SAAS,CAAK,CAAC,CAAE,CAA2F,OAAvF,GAAO,EAAS,KAA2F,EAAK,SAAS,CAAC,KAAK,sBAAsB,wBAAwB,CAAC,OAA9I,EAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,QAAQ,KAAK,SAA4G,CAAC,CAAC,CAAC,CAAE,iBAjB7uB,IAAiE,EAiB6qB,EAAoB,EAAU,CAAC,OAAO,CAAC,KAAK,EAAY,OAAO,MAAM,SAAS,aAAa,GAAG,gBAAgB,GAAK,YAAY,sCAAsC,CAAC,CAAC"}