import{reporter}from"../../../tools/notifiers/reporter.js";async function parseTsxFrontMatter(content){const regex=/export\s+(?:const|let|var)\s+frontmatter\s*=\s*(\{[^;]*\});/m,match=regex.exec(content);if(!match)return{};try{const environment=eval(`
      (function() {
        const frontmatterTranslate = (key, defaultValue) => \`frontmatterTranslate('\${key}', '\${defaultValue.replace(/'/g, "\\'")}')\`;
        return (${match[1]});
      })()
    `);return environment}catch{await reporter.panicOnBuildContentError("Invalid format of frontmatter. We support only basic object definition.")}}export{parseTsxFrontMatter};
