{"version":3,"file":"htmlToTextPlugin.mjs","names":[],"sources":["../../../../../../src/components/Message/renderText/remarkPlugins/htmlToTextPlugin.ts"],"sourcesContent":["import type { Visitor } from 'unist-util-visit';\nimport { visit } from 'unist-util-visit';\n\n// `Nodes` is not part of hast-util-find-and-replace's public surface; derive\n// the visit-compatible tree type from `visit` itself.\ntype Nodes = Parameters<typeof visit>[0];\n\nconst visitor: Visitor = (node) => {\n  if (node.type !== 'html') return;\n\n  node.type = 'text';\n};\nconst transform = (tree: Nodes) => {\n  visit(tree, visitor);\n};\n\nexport const htmlToTextPlugin = () => transform;\n"],"mappings":";;AAOA,IAAM,WAAoB,SAAS;CACjC,IAAI,KAAK,SAAS,QAAQ;CAE1B,KAAK,OAAO;AACd;AACA,IAAM,aAAa,SAAgB;CACjC,MAAM,MAAM,OAAO;AACrB;AAEA,IAAa,yBAAyB"}