{"version":3,"file":"InlineArticle.DbDX_CBS.mjs","names":["React.useRef","__esmMin","init_npm_react_18_3_1","c","init_jsx_runtime","ce","de","init_framer_DDfsYcI0","addPropertyControls","ControlType","InlineArticle","props","ref","el","html","root","s","a","old","style","init_InlineArticle"],"sources":["https:/framerusercontent.com/modules/s9USKKXgl8uGS9chthun/UDqbflvU1hi12yJDROz3/InlineArticle.js"],"sourcesContent":["// InlineArticle: renders a WarfighterForged article's HTML straight into the page (no iframe),\n// so Mediavine can read the content and fill in-content ad slots. Same HTML as the old Embed.\n// Scripts: on the live site they run natively from the pre-rendered HTML; the boot marker at the end of\n// the HTML sets data-booted on #wff-root. If that marker is missing (editor canvas, or React re-rendered\n// the markup), the effect re-creates every <script> so it runs once.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function InlineArticle(props){const{html,style}=props;const ref=React.useRef(null);React.useEffect(()=>{const el=ref.current;if(!el||!html)return;const root=el.querySelector(\"#wff-root\");if(root&&root.getAttribute(\"data-booted\")===\"1\")return;el.querySelectorAll(\"script\").forEach(old=>{const s=document.createElement(\"script\");for(const a of Array.from(old.attributes))s.setAttribute(a.name,a.value);s.text=old.textContent||\"\";old.parentNode&&old.parentNode.replaceChild(s,old);});},[html]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,className:\"wff-inline-article\",style:{width:\"100%\",...style},dangerouslySetInnerHTML:{__html:html||\"\"}});}addPropertyControls(InlineArticle,{html:{type:ControlType.String,title:\"HTML\",displayTextArea:true,defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"InlineArticle\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InlineArticle.map"],"mappings":"A,iLAQG,SAAwBU,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,SAAOC,EAAYC,EAAIZ,EAAa,IAAI,EAA0Z,OAAxZK,MAAoB,CAAC,IAAMQ,EAAGD,EAAI,QAAQ,GAAG,CAACC,GAAI,CAACC,EAAK,OAAO,IAAMC,EAAKF,EAAG,cAAc,WAAW,EAAKE,GAAMA,EAAK,aAAa,aAAa,IAAI,KAAWF,EAAG,iBAAiB,QAAQ,CAAC,CAAC,QAAQ,GAAK,CAAC,IAAMG,EAAE,SAAS,cAAc,QAAQ,EAAE,IAAI,IAAMC,KAAK,MAAM,KAAKC,EAAI,UAAU,EAAEF,EAAE,aAAaC,EAAE,KAAKA,EAAE,KAAK,EAAE,EAAE,KAAKC,EAAI,aAAa,GAAGA,EAAI,YAAYA,EAAI,WAAW,aAAaF,EAAEE,CAAG,CAAE,CAAC,CAAE,EAAE,CAACJ,CAAI,CAAC,EAAsB,gBAAK,MAAM,CAAK,MAAI,UAAU,qBAAqB,MAAM,CAAC,MAAM,OAAO,GAAGK,CAAK,EAAE,wBAAwB,CAAC,OAAOL,GAAM,EAAE,CAAC,CAAC,CAAE,C,0CAACN,EAAoBE,EAAc,CAAC,KAAK,CAAC,KAAKD,EAAY,OAAO,MAAM,OAAO,gBAAgB,GAAK,aAAa,EAAE,CAAC,CAAC,C"}