import { jsx } from "react/jsx-runtime";
import hardenReactMarkdownImport from "../../../../_virtual/index4.js";
import { memo } from "react";
import rehypeKatex from "../../../../_vendor/rehype-katex/lib-index.js";
import remarkGfm from "../../../../_vendor/remark-gfm/lib-index.js";
import remarkBreaks from "../../../../_vendor/remark-breaks/lib-index.js";
import remarkMath from "../../../../_vendor/remark-math/lib-index.js";
import { Markdown } from "../../../../_vendor/react-markdown/lib-index.js";
const hardenReactMarkdown = hardenReactMarkdownImport.default || hardenReactMarkdownImport;
const HardenedMarkdown = hardenReactMarkdown(Markdown);
const MarkdownBlock = memo(
  function MarkdownBlock2(props) {
    const {
      content,
      components,
      allowedLinkPrefixes = ["https://", "http://", "#", "mailto:"],
      allowedImagePrefixes = ["https://", "http://", "data:image/"],
      defaultOrigin = typeof window !== "undefined" ? window.location.origin : "http://localhost",
      ...rest
    } = props;
    return /* @__PURE__ */ jsx(
      HardenedMarkdown,
      {
        remarkPlugins: [remarkGfm, remarkBreaks, remarkMath],
        rehypePlugins: [rehypeKatex],
        components,
        allowedLinkPrefixes,
        allowedImagePrefixes,
        defaultOrigin,
        ...rest,
        children: content
      }
    );
  },
  function propsAreEqual(prevProps, nextProps) {
    return prevProps.content === nextProps.content;
  }
);
export {
  MarkdownBlock
};
//# sourceMappingURL=markdown-block.js.map
