import { resolveComponent as S, createElementBlock as k, openBlock as j, createElementVNode as u, createTextVNode as m, createVNode as v, withCtx as b } from "vue"; import { k as w } from "./index2.js"; const f = (s = "") => String(s).replace(/&/g, "&").replace(//g, ">"), E = (s = "") => String(s).replace(/[^\w\u4e00-\u9fa5-]/g, ""), p = (s = "") => { const e = [], l = []; let n = String(s); return n = n.replace(/`([^`]+)`/g, (o, t) => (e.push(`${f(t)}`), `\0C${e.length - 1}\0`)), n = n.replace(/<\/?span[^>]*>/g, (o) => (l.push(o), `\0S${l.length - 1}\0`)), n = f(n), n = n.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1'), n = n.replace(/\*\*([^*]+)\*\*/g, "$1"), n = n.replace(/\u0000C(\d+)\u0000/g, (o, t) => e[+t]), n = n.replace(/\u0000S(\d+)\u0000/g, (o, t) => l[+t]), n; }, $ = (s = "") => s.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((e) => e.trim()), x = (s = "") => /^\s*\|?[\s:|-]+\|?\s*$/.test(s) && s.includes("-"), y = (s = "") => { const e = String(s).replace(/\r\n/g, ` `).split(` `), l = e.length; let n = 0, o = "", t = null; const i = () => { t && (o += ` `, t = null); }; for (; n < l; ) { const a = e[n], h = a.match(/^```(\w*)\s*$/); if (h) { i(); const r = h[1]; n++; const c = []; for (; n < l && !/^```\s*$/.test(e[n]); ) c.push(e[n]), n++; n++, o += `
${f(c.join(`
`))}
`; continue; } if (/^\s*$/.test(a)) { i(), n++; continue; } if (/^-{3,}\s*$/.test(a)) { i(), o += `
`, n++; continue; } const d = a.match(/^(#{1,6})\s+(.*)$/); if (d) { i(); const r = d[1].length, c = d[2].trim(); o += `${p(c)} `, n++; continue; } if (/^>\s?/.test(a)) { i(); const r = []; for (; n < l && /^>\s?/.test(e[n]); ) r.push(e[n].replace(/^>\s?/, "")), n++; o += `
${y(r.join(` `))}
`; continue; } if (/^\s*\|/.test(a) && n + 1 < l && x(e[n + 1])) { i(); const r = $(a); n += 2; const c = []; for (; n < l && /^\s*\|/.test(e[n]); ) c.push($(e[n])), n++; o += "" + r.map((g) => ``).join("") + "" + c.map((g) => "" + g.map((_) => ``).join("") + "").join("") + `
${p(g)}
${p(_)}
`; continue; } if (/^\s*[-*]\s+/.test(a)) { t !== "ul" && (i(), o += `