import { cr as e, cs as t, ct as n, cu as r, cv as i, cw as o, cx as s, cy as a, cz as c, cA as l, cB as u, cC as d, cD as f, cE as h, cF as p, cG as m, cH as g, cI as k } from "./vendor-208d0ff5.js";
import * as y from "react";
function x(t2) {
  return function(n2, r2) {
    return e(n2, { ...t2, file: r2 });
  };
}
function v(e2) {
  return function(n2) {
    return t(n2, e2);
  };
}
function b(e2, t2 = {}) {
  const n2 = (t2.align || []).concat(), r2 = t2.stringLength || w, i2 = [], o2 = [], s2 = [], a2 = [];
  let c2 = 0, l2 = -1;
  for (; ++l2 < e2.length; ) {
    const n3 = [], i3 = [];
    let d3 = -1;
    for (e2[l2].length > c2 && (c2 = e2[l2].length); ++d3 < e2[l2].length; ) {
      const o3 = null == (u2 = e2[l2][d3]) ? "" : String(u2);
      if (false !== t2.alignDelimiters) {
        const e3 = r2(o3);
        i3[d3] = e3, (void 0 === a2[d3] || e3 > a2[d3]) && (a2[d3] = e3);
      }
      n3.push(o3);
    }
    o2[l2] = n3, s2[l2] = i3;
  }
  var u2;
  let d2 = -1;
  if ("object" == typeof n2 && "length" in n2)
    for (; ++d2 < c2; )
      i2[d2] = E(n2[d2]);
  else {
    const e3 = E(n2);
    for (; ++d2 < c2; )
      i2[d2] = e3;
  }
  d2 = -1;
  const f2 = [], h2 = [];
  for (; ++d2 < c2; ) {
    const e3 = i2[d2];
    let n3 = "", r3 = "";
    99 === e3 ? (n3 = ":", r3 = ":") : 108 === e3 ? n3 = ":" : 114 === e3 && (r3 = ":");
    let o3 = false === t2.alignDelimiters ? 1 : Math.max(1, a2[d2] - n3.length - r3.length);
    const s3 = n3 + "-".repeat(o3) + r3;
    false !== t2.alignDelimiters && (o3 = n3.length + o3 + r3.length, o3 > a2[d2] && (a2[d2] = o3), h2[d2] = o3), f2[d2] = s3;
  }
  o2.splice(1, 0, f2), s2.splice(1, 0, h2), l2 = -1;
  const p2 = [];
  for (; ++l2 < o2.length; ) {
    const e3 = o2[l2], n3 = s2[l2];
    d2 = -1;
    const r3 = [];
    for (; ++d2 < c2; ) {
      const o3 = e3[d2] || "";
      let s3 = "", l3 = "";
      if (false !== t2.alignDelimiters) {
        const e4 = a2[d2] - (n3[d2] || 0), t3 = i2[d2];
        114 === t3 ? s3 = " ".repeat(e4) : 99 === t3 ? e4 % 2 ? (s3 = " ".repeat(e4 / 2 + 0.5), l3 = " ".repeat(e4 / 2 - 0.5)) : (s3 = " ".repeat(e4 / 2), l3 = s3) : l3 = " ".repeat(e4);
      }
      false === t2.delimiterStart || d2 || r3.push("|"), false === t2.padding || false === t2.alignDelimiters && "" === o3 || false === t2.delimiterStart && !d2 || r3.push(" "), false !== t2.alignDelimiters && r3.push(s3), r3.push(o3), false !== t2.alignDelimiters && r3.push(l3), false !== t2.padding && r3.push(" "), false === t2.delimiterEnd && d2 === c2 - 1 || r3.push("|");
    }
    p2.push(false === t2.delimiterEnd ? r3.join("").replace(/ +$/, "") : r3.join(""));
  }
  return p2.join("\n");
}
function w(e2) {
  return e2.length;
}
function E(e2) {
  const t2 = "string" == typeof e2 ? e2.codePointAt(0) : 0;
  return 67 === t2 || 99 === t2 ? 99 : 76 === t2 || 108 === t2 ? 108 : 82 === t2 || 114 === t2 ? 114 : 0;
}
function S(e2, t2, n2) {
  return ">" + (n2 ? "" : " ") + e2;
}
function T(e2, t2, n2) {
  if ("string" == typeof t2 && (t2 = [t2]), !t2 || 0 === t2.length)
    return n2;
  let r2 = -1;
  for (; ++r2 < t2.length; )
    if (e2.includes(t2[r2]))
      return true;
  return false;
}
function C(e2, t2, n2, r2) {
  let i2 = -1;
  for (; ++i2 < n2.unsafe.length; )
    if ("\n" === n2.unsafe[i2].character && (o2 = n2.stack, s2 = n2.unsafe[i2], T(o2, s2.inConstruct, true) && !T(o2, s2.notInConstruct, false)))
      return /[ \t]/.test(r2.before) ? "" : " ";
  var o2, s2;
  return "\\\n";
}
function I(e2, t2, n2) {
  return (n2 ? "" : "    ") + e2;
}
function $(e2) {
  const t2 = e2.options.quote || '"';
  if ('"' !== t2 && "'" !== t2)
    throw new Error("Cannot serialize title with `" + t2 + "` for `options.quote`, expected `\"`, or `'`");
  return t2;
}
function L(e2, t2, n2, r2) {
  const i2 = function(e3) {
    const t3 = e3.options.emphasis || "*";
    if ("*" !== t3 && "_" !== t3)
      throw new Error("Cannot serialize emphasis with `" + t3 + "` for `options.emphasis`, expected `*`, or `_`");
    return t3;
  }(n2), o2 = n2.enter("emphasis"), s2 = n2.createTracker(r2);
  let a2 = s2.move(i2);
  return a2 += s2.move(n2.containerPhrasing(e2, { before: a2, after: i2, ...s2.current() })), a2 += s2.move(i2), o2(), a2;
}
function R(e2) {
  return e2.value || "";
}
function z(e2, t2, n2, r2) {
  const i2 = $(n2), o2 = '"' === i2 ? "Quote" : "Apostrophe", s2 = n2.enter("image");
  let a2 = n2.enter("label");
  const c2 = n2.createTracker(r2);
  let l2 = c2.move("![");
  return l2 += c2.move(n2.safe(e2.alt, { before: l2, after: "]", ...c2.current() })), l2 += c2.move("]("), a2(), !e2.url && e2.title || /[\0- \u007F]/.test(e2.url) ? (a2 = n2.enter("destinationLiteral"), l2 += c2.move("<"), l2 += c2.move(n2.safe(e2.url, { before: l2, after: ">", ...c2.current() })), l2 += c2.move(">")) : (a2 = n2.enter("destinationRaw"), l2 += c2.move(n2.safe(e2.url, { before: l2, after: e2.title ? " " : ")", ...c2.current() }))), a2(), e2.title && (a2 = n2.enter(`title${o2}`), l2 += c2.move(" " + i2), l2 += c2.move(n2.safe(e2.title, { before: l2, after: i2, ...c2.current() })), l2 += c2.move(i2), a2()), l2 += c2.move(")"), s2(), l2;
}
function F(e2, t2, n2, r2) {
  const i2 = e2.referenceType, o2 = n2.enter("imageReference");
  let s2 = n2.enter("label");
  const a2 = n2.createTracker(r2);
  let c2 = a2.move("![");
  const l2 = n2.safe(e2.alt, { before: c2, after: "]", ...a2.current() });
  c2 += a2.move(l2 + "]["), s2();
  const u2 = n2.stack;
  n2.stack = [], s2 = n2.enter("reference");
  const d2 = n2.safe(n2.associationId(e2), { before: c2, after: "]", ...a2.current() });
  return s2(), n2.stack = u2, o2(), "full" !== i2 && l2 && l2 === d2 ? "shortcut" === i2 ? c2 = c2.slice(0, -1) : c2 += a2.move("]") : c2 += a2.move(d2 + "]"), c2;
}
function O(e2, t2, n2) {
  let r2 = e2.value || "", i2 = "`", o2 = -1;
  for (; new RegExp("(^|[^`])" + i2 + "([^`]|$)").test(r2); )
    i2 += "`";
  for (/[^ \r\n]/.test(r2) && (/^[ \r\n]/.test(r2) && /[ \r\n]$/.test(r2) || /^`|`$/.test(r2)) && (r2 = " " + r2 + " "); ++o2 < n2.unsafe.length; ) {
    const e3 = n2.unsafe[o2], t3 = n2.compilePattern(e3);
    let i3;
    if (e3.atBreak)
      for (; i3 = t3.exec(r2); ) {
        let e4 = i3.index;
        10 === r2.charCodeAt(e4) && 13 === r2.charCodeAt(e4 - 1) && e4--, r2 = r2.slice(0, e4) + " " + r2.slice(i3.index + 1);
      }
  }
  return i2 + r2 + i2;
}
function M(e2, t2) {
  const n2 = o(e2);
  return Boolean(!t2.options.resourceLink && e2.url && !e2.title && e2.children && 1 === e2.children.length && "text" === e2.children[0].type && (n2 === e2.url || "mailto:" + n2 === e2.url) && /^[a-z][a-z+.-]+:/i.test(e2.url) && !/[\0- <>\u007F]/.test(e2.url));
}
function A(e2, t2, n2, r2) {
  const i2 = $(n2), o2 = '"' === i2 ? "Quote" : "Apostrophe", s2 = n2.createTracker(r2);
  let a2, c2;
  if (M(e2, n2)) {
    const t3 = n2.stack;
    n2.stack = [], a2 = n2.enter("autolink");
    let r3 = s2.move("<");
    return r3 += s2.move(n2.containerPhrasing(e2, { before: r3, after: ">", ...s2.current() })), r3 += s2.move(">"), a2(), n2.stack = t3, r3;
  }
  a2 = n2.enter("link"), c2 = n2.enter("label");
  let l2 = s2.move("[");
  return l2 += s2.move(n2.containerPhrasing(e2, { before: l2, after: "](", ...s2.current() })), l2 += s2.move("]("), c2(), !e2.url && e2.title || /[\0- \u007F]/.test(e2.url) ? (c2 = n2.enter("destinationLiteral"), l2 += s2.move("<"), l2 += s2.move(n2.safe(e2.url, { before: l2, after: ">", ...s2.current() })), l2 += s2.move(">")) : (c2 = n2.enter("destinationRaw"), l2 += s2.move(n2.safe(e2.url, { before: l2, after: e2.title ? " " : ")", ...s2.current() }))), c2(), e2.title && (c2 = n2.enter(`title${o2}`), l2 += s2.move(" " + i2), l2 += s2.move(n2.safe(e2.title, { before: l2, after: i2, ...s2.current() })), l2 += s2.move(i2), c2()), l2 += s2.move(")"), a2(), l2;
}
function B(e2, t2, n2, r2) {
  const i2 = e2.referenceType, o2 = n2.enter("linkReference");
  let s2 = n2.enter("label");
  const a2 = n2.createTracker(r2);
  let c2 = a2.move("[");
  const l2 = n2.containerPhrasing(e2, { before: c2, after: "]", ...a2.current() });
  c2 += a2.move(l2 + "]["), s2();
  const u2 = n2.stack;
  n2.stack = [], s2 = n2.enter("reference");
  const d2 = n2.safe(n2.associationId(e2), { before: c2, after: "]", ...a2.current() });
  return s2(), n2.stack = u2, o2(), "full" !== i2 && l2 && l2 === d2 ? "shortcut" === i2 ? c2 = c2.slice(0, -1) : c2 += a2.move("]") : c2 += a2.move(d2 + "]"), c2;
}
function P(e2) {
  const t2 = e2.options.bullet || "*";
  if ("*" !== t2 && "+" !== t2 && "-" !== t2)
    throw new Error("Cannot serialize items with `" + t2 + "` for `options.bullet`, expected `*`, `+`, or `-`");
  return t2;
}
function D(e2) {
  const t2 = e2.options.rule || "*";
  if ("*" !== t2 && "-" !== t2 && "_" !== t2)
    throw new Error("Cannot serialize rules with `" + t2 + "` for `options.rule`, expected `*`, `-`, or `_`");
  return t2;
}
function H(e2, t2, n2, r2) {
  const i2 = function(e3) {
    const t3 = e3.options.strong || "*";
    if ("*" !== t3 && "_" !== t3)
      throw new Error("Cannot serialize strong with `" + t3 + "` for `options.strong`, expected `*`, or `_`");
    return t3;
  }(n2), o2 = n2.enter("strong"), s2 = n2.createTracker(r2);
  let a2 = s2.move(i2 + i2);
  return a2 += s2.move(n2.containerPhrasing(e2, { before: a2, after: i2, ...s2.current() })), a2 += s2.move(i2 + i2), o2(), a2;
}
L.peek = function(e2, t2, n2) {
  return n2.options.emphasis || "*";
}, R.peek = function() {
  return "<";
}, z.peek = function() {
  return "!";
}, F.peek = function() {
  return "!";
}, O.peek = function() {
  return "`";
}, A.peek = function(e2, t2, n2) {
  return M(e2, n2) ? "<" : "[";
}, B.peek = function() {
  return "[";
}, H.peek = function(e2, t2, n2) {
  return n2.options.strong || "*";
};
const j = { blockquote: function(e2, t2, n2, r2) {
  const i2 = n2.enter("blockquote"), o2 = n2.createTracker(r2);
  o2.move("> "), o2.shift(2);
  const s2 = n2.indentLines(n2.containerFlow(e2, o2.current()), S);
  return i2(), s2;
}, break: C, code: function(e2, t2, r2, i2) {
  const o2 = function(e3) {
    const t3 = e3.options.fence || "`";
    if ("`" !== t3 && "~" !== t3)
      throw new Error("Cannot serialize code with `" + t3 + "` for `options.fence`, expected `` ` `` or `~`");
    return t3;
  }(r2), s2 = e2.value || "", a2 = "`" === o2 ? "GraveAccent" : "Tilde";
  if (function(e3, t3) {
    return Boolean(false === t3.options.fences && e3.value && !e3.lang && /[^ \r\n]/.test(e3.value) && !/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e3.value));
  }(e2, r2)) {
    const e3 = r2.enter("codeIndented"), t3 = r2.indentLines(s2, I);
    return e3(), t3;
  }
  const c2 = r2.createTracker(i2), l2 = o2.repeat(Math.max(n(s2, o2) + 1, 3)), u2 = r2.enter("codeFenced");
  let d2 = c2.move(l2);
  if (e2.lang) {
    const t3 = r2.enter(`codeFencedLang${a2}`);
    d2 += c2.move(r2.safe(e2.lang, { before: d2, after: " ", encode: ["`"], ...c2.current() })), t3();
  }
  if (e2.lang && e2.meta) {
    const t3 = r2.enter(`codeFencedMeta${a2}`);
    d2 += c2.move(" "), d2 += c2.move(r2.safe(e2.meta, { before: d2, after: "\n", encode: ["`"], ...c2.current() })), t3();
  }
  return d2 += c2.move("\n"), s2 && (d2 += c2.move(s2 + "\n")), d2 += c2.move(l2), u2(), d2;
}, definition: function(e2, t2, n2, r2) {
  const i2 = $(n2), o2 = '"' === i2 ? "Quote" : "Apostrophe", s2 = n2.enter("definition");
  let a2 = n2.enter("label");
  const c2 = n2.createTracker(r2);
  let l2 = c2.move("[");
  return l2 += c2.move(n2.safe(n2.associationId(e2), { before: l2, after: "]", ...c2.current() })), l2 += c2.move("]: "), a2(), !e2.url || /[\0- \u007F]/.test(e2.url) ? (a2 = n2.enter("destinationLiteral"), l2 += c2.move("<"), l2 += c2.move(n2.safe(e2.url, { before: l2, after: ">", ...c2.current() })), l2 += c2.move(">")) : (a2 = n2.enter("destinationRaw"), l2 += c2.move(n2.safe(e2.url, { before: l2, after: e2.title ? " " : "\n", ...c2.current() }))), a2(), e2.title && (a2 = n2.enter(`title${o2}`), l2 += c2.move(" " + i2), l2 += c2.move(n2.safe(e2.title, { before: l2, after: i2, ...c2.current() })), l2 += c2.move(i2), a2()), s2(), l2;
}, emphasis: L, hardBreak: C, heading: function(e2, t2, n2, s2) {
  const a2 = Math.max(Math.min(6, e2.depth || 1), 1), c2 = n2.createTracker(s2);
  if (function(e3, t3) {
    let n3 = false;
    return r(e3, function(e4) {
      if ("value" in e4 && /\r?\n|\r/.test(e4.value) || "break" === e4.type)
        return n3 = true, i;
    }), Boolean((!e3.depth || e3.depth < 3) && o(e3) && (t3.options.setext || n3));
  }(e2, n2)) {
    const t3 = n2.enter("headingSetext"), r2 = n2.enter("phrasing"), i2 = n2.containerPhrasing(e2, { ...c2.current(), before: "\n", after: "\n" });
    return r2(), t3(), i2 + "\n" + (1 === a2 ? "=" : "-").repeat(i2.length - (Math.max(i2.lastIndexOf("\r"), i2.lastIndexOf("\n")) + 1));
  }
  const l2 = "#".repeat(a2), u2 = n2.enter("headingAtx"), d2 = n2.enter("phrasing");
  c2.move(l2 + " ");
  let f2 = n2.containerPhrasing(e2, { before: "# ", after: "\n", ...c2.current() });
  return /^[\t ]/.test(f2) && (f2 = "&#x" + f2.charCodeAt(0).toString(16).toUpperCase() + ";" + f2.slice(1)), f2 = f2 ? l2 + " " + f2 : l2, n2.options.closeAtx && (f2 += " " + l2), d2(), u2(), f2;
}, html: R, image: z, imageReference: F, inlineCode: O, link: A, linkReference: B, list: function(e2, t2, n2, r2) {
  const i2 = n2.enter("list"), o2 = n2.bulletCurrent;
  let s2 = e2.ordered ? function(e3) {
    const t3 = e3.options.bulletOrdered || ".";
    if ("." !== t3 && ")" !== t3)
      throw new Error("Cannot serialize items with `" + t3 + "` for `options.bulletOrdered`, expected `.` or `)`");
    return t3;
  }(n2) : P(n2);
  const a2 = e2.ordered ? "." === s2 ? ")" : "." : function(e3) {
    const t3 = P(e3), n3 = e3.options.bulletOther;
    if (!n3)
      return "*" === t3 ? "-" : "*";
    if ("*" !== n3 && "+" !== n3 && "-" !== n3)
      throw new Error("Cannot serialize items with `" + n3 + "` for `options.bulletOther`, expected `*`, `+`, or `-`");
    if (n3 === t3)
      throw new Error("Expected `bullet` (`" + t3 + "`) and `bulletOther` (`" + n3 + "`) to be different");
    return n3;
  }(n2);
  let c2 = !(!t2 || !n2.bulletLastUsed) && s2 === n2.bulletLastUsed;
  if (!e2.ordered) {
    const t3 = e2.children ? e2.children[0] : void 0;
    if ("*" !== s2 && "-" !== s2 || !t3 || t3.children && t3.children[0] || "list" !== n2.stack[n2.stack.length - 1] || "listItem" !== n2.stack[n2.stack.length - 2] || "list" !== n2.stack[n2.stack.length - 3] || "listItem" !== n2.stack[n2.stack.length - 4] || 0 !== n2.indexStack[n2.indexStack.length - 1] || 0 !== n2.indexStack[n2.indexStack.length - 2] || 0 !== n2.indexStack[n2.indexStack.length - 3] || (c2 = true), D(n2) === s2 && t3) {
      let t4 = -1;
      for (; ++t4 < e2.children.length; ) {
        const n3 = e2.children[t4];
        if (n3 && "listItem" === n3.type && n3.children && n3.children[0] && "thematicBreak" === n3.children[0].type) {
          c2 = true;
          break;
        }
      }
    }
  }
  c2 && (s2 = a2), n2.bulletCurrent = s2;
  const l2 = n2.containerFlow(e2, r2);
  return n2.bulletLastUsed = s2, n2.bulletCurrent = o2, i2(), l2;
}, listItem: function(e2, t2, n2, r2) {
  const i2 = function(e3) {
    const t3 = e3.options.listItemIndent || "one";
    if ("tab" !== t3 && "one" !== t3 && "mixed" !== t3)
      throw new Error("Cannot serialize items with `" + t3 + "` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");
    return t3;
  }(n2);
  let o2 = n2.bulletCurrent || P(n2);
  t2 && "list" === t2.type && t2.ordered && (o2 = ("number" == typeof t2.start && t2.start > -1 ? t2.start : 1) + (false === n2.options.incrementListMarker ? 0 : t2.children.indexOf(e2)) + o2);
  let s2 = o2.length + 1;
  ("tab" === i2 || "mixed" === i2 && (t2 && "list" === t2.type && t2.spread || e2.spread)) && (s2 = 4 * Math.ceil(s2 / 4));
  const a2 = n2.createTracker(r2);
  a2.move(o2 + " ".repeat(s2 - o2.length)), a2.shift(s2);
  const c2 = n2.enter("listItem"), l2 = n2.indentLines(n2.containerFlow(e2, a2.current()), function(e3, t3, n3) {
    if (t3)
      return (n3 ? "" : " ".repeat(s2)) + e3;
    return (n3 ? o2 : o2 + " ".repeat(s2 - o2.length)) + e3;
  });
  return c2(), l2;
}, paragraph: function(e2, t2, n2, r2) {
  const i2 = n2.enter("paragraph"), o2 = n2.enter("phrasing"), s2 = n2.containerPhrasing(e2, r2);
  return o2(), i2(), s2;
}, root: function(e2, t2, n2, r2) {
  const i2 = e2.children.some(function(e3) {
    return s(e3);
  });
  return (i2 ? n2.containerPhrasing : n2.containerFlow).call(n2, e2, r2);
}, strong: H, text: function(e2, t2, n2, r2) {
  return n2.safe(e2.value, r2);
}, thematicBreak: function(e2, t2, n2) {
  const r2 = (D(n2) + (n2.options.ruleSpaces ? " " : "")).repeat(function(e3) {
    const t3 = e3.options.ruleRepetition || 3;
    if (t3 < 3)
      throw new Error("Cannot serialize rules with repetition `" + t3 + "` for `options.ruleRepetition`, expected `3` or more");
    return t3;
  }(n2));
  return n2.options.ruleSpaces ? r2.slice(0, -1) : r2;
} }, U = {};
function _(e2) {
  const t2 = e2 || U, n2 = this.data(), r2 = n2.micromarkExtensions || (n2.micromarkExtensions = []), i2 = n2.fromMarkdownExtensions || (n2.fromMarkdownExtensions = []), o2 = n2.toMarkdownExtensions || (n2.toMarkdownExtensions = []);
  r2.push(a(t2)), i2.push(c()), o2.push(l(t2));
}
function N(e2) {
  return e2 && "object" == typeof e2 ? "position" in e2 || "type" in e2 ? Q(e2.position) : "start" in e2 || "end" in e2 ? Q(e2) : "line" in e2 || "column" in e2 ? V(e2) : "" : "";
}
function V(e2) {
  return q(e2 && e2.line) + ":" + q(e2 && e2.column);
}
function Q(e2) {
  return V(e2 && e2.start) + "-" + V(e2 && e2.end);
}
function q(e2) {
  return e2 && "number" == typeof e2 ? e2 : 1;
}
const W = {}.hasOwnProperty;
function G(e2, t2, n2) {
  return "string" != typeof t2 && (n2 = t2, t2 = void 0), function(e3) {
    const t3 = { transforms: [], canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"], enter: { autolink: s2(de2), autolinkProtocol: R2, autolinkEmail: R2, atxHeading: s2(ae2), blockQuote: s2(ne2), characterEscape: R2, characterReference: R2, codeFenced: s2(re2), codeFencedFenceInfo: a2, codeFencedFenceMeta: a2, codeIndented: s2(re2, a2), codeText: s2(ie2, a2), codeTextData: R2, data: R2, codeFlowValue: R2, definition: s2(oe2), definitionDestinationString: a2, definitionLabelString: a2, definitionTitleString: a2, emphasis: s2(se2), hardBreakEscape: s2(ce2), hardBreakTrailing: s2(ce2), htmlFlow: s2(le2, a2), htmlFlowData: R2, htmlText: s2(le2, a2), htmlTextData: R2, image: s2(ue2), label: a2, link: s2(de2), listItem: s2(he2), listItemValue: k2, listOrdered: s2(fe2, f2), listUnordered: s2(fe2), paragraph: s2(pe2), reference: Q2, referenceString: a2, resourceDestinationString: a2, resourceTitleString: a2, setextHeading: s2(ae2), strong: s2(me2), thematicBreak: s2(ke2) }, exit: { atxHeading: l2(), atxHeadingSequence: C2, autolink: l2(), autolinkEmail: te2, autolinkProtocol: ee2, blockQuote: l2(), characterEscapeValue: z2, characterReferenceMarkerHexadecimal: G2, characterReferenceMarkerNumeric: G2, characterReferenceValue: J2, characterReference: Y2, codeFenced: l2(b2), codeFencedFence: v2, codeFencedFenceInfo: y2, codeFencedFenceMeta: x2, codeFlowValue: z2, codeIndented: l2(w2), codeText: l2(B2), codeTextData: z2, data: z2, definition: l2(), definitionDestinationString: T2, definitionLabelString: E2, definitionTitleString: S2, emphasis: l2(), hardBreakEscape: l2(O2), hardBreakTrailing: l2(O2), htmlFlow: l2(M2), htmlFlowData: z2, htmlText: l2(A2), htmlTextData: z2, image: l2(D2), label: j2, labelText: H2, lineEnding: F2, link: l2(P2), listItem: l2(), listOrdered: l2(), listUnordered: l2(), paragraph: l2(), referenceString: q2, resourceDestinationString: U2, resourceTitleString: _2, resource: V2, setextHeading: l2(L2), setextHeadingLineSequence: $2, setextHeadingText: I2, strong: l2(), thematicBreak: l2() } };
    X(t3, (e3 || {}).mdastExtensions || []);
    const n3 = {};
    return r2;
    function r2(e4) {
      let r3 = { type: "root", children: [] };
      const o2 = { stack: [r3], tokenStack: [], config: t3, enter: c2, exit: u2, buffer: a2, resume: d2, data: n3 }, s3 = [];
      let l3 = -1;
      for (; ++l3 < e4.length; )
        if ("listOrdered" === e4[l3][1].type || "listUnordered" === e4[l3][1].type)
          if ("enter" === e4[l3][0])
            s3.push(l3);
          else {
            l3 = i2(e4, s3.pop(), l3);
          }
      for (l3 = -1; ++l3 < e4.length; ) {
        const n4 = t3[e4[l3][0]];
        W.call(n4, e4[l3][1].type) && n4[e4[l3][1].type].call(Object.assign({ sliceSerialize: e4[l3][2].sliceSerialize }, o2), e4[l3][1]);
      }
      if (o2.tokenStack.length > 0) {
        const e5 = o2.tokenStack[o2.tokenStack.length - 1];
        (e5[1] || K).call(o2, void 0, e5[0]);
      }
      for (r3.position = { start: Z(e4.length > 0 ? e4[0][1].start : { line: 1, column: 1, offset: 0 }), end: Z(e4.length > 0 ? e4[e4.length - 2][1].end : { line: 1, column: 1, offset: 0 }) }, l3 = -1; ++l3 < t3.transforms.length; )
        r3 = t3.transforms[l3](r3) || r3;
      return r3;
    }
    function i2(e4, t4, n4) {
      let r3, i3, o2, s3, a3 = t4 - 1, c3 = -1, l3 = false;
      for (; ++a3 <= n4; ) {
        const t5 = e4[a3];
        switch (t5[1].type) {
          case "listUnordered":
          case "listOrdered":
          case "blockQuote":
            "enter" === t5[0] ? c3++ : c3--, s3 = void 0;
            break;
          case "lineEndingBlank":
            "enter" === t5[0] && (!r3 || s3 || c3 || o2 || (o2 = a3), s3 = void 0);
            break;
          case "linePrefix":
          case "listItemValue":
          case "listItemMarker":
          case "listItemPrefix":
          case "listItemPrefixWhitespace":
            break;
          default:
            s3 = void 0;
        }
        if (!c3 && "enter" === t5[0] && "listItemPrefix" === t5[1].type || -1 === c3 && "exit" === t5[0] && ("listUnordered" === t5[1].type || "listOrdered" === t5[1].type)) {
          if (r3) {
            let s4 = a3;
            for (i3 = void 0; s4--; ) {
              const t6 = e4[s4];
              if ("lineEnding" === t6[1].type || "lineEndingBlank" === t6[1].type) {
                if ("exit" === t6[0])
                  continue;
                i3 && (e4[i3][1].type = "lineEndingBlank", l3 = true), t6[1].type = "lineEnding", i3 = s4;
              } else if ("linePrefix" !== t6[1].type && "blockQuotePrefix" !== t6[1].type && "blockQuotePrefixWhitespace" !== t6[1].type && "blockQuoteMarker" !== t6[1].type && "listItemIndent" !== t6[1].type)
                break;
            }
            o2 && (!i3 || o2 < i3) && (r3._spread = true), r3.end = Object.assign({}, i3 ? e4[i3][1].start : t5[1].end), e4.splice(i3 || a3, 0, ["exit", r3, t5[2]]), a3++, n4++;
          }
          if ("listItemPrefix" === t5[1].type) {
            const i4 = { type: "listItem", _spread: false, start: Object.assign({}, t5[1].start), end: void 0 };
            r3 = i4, e4.splice(a3, 0, ["enter", i4, t5[2]]), a3++, n4++, o2 = void 0, s3 = true;
          }
        }
      }
      return e4[t4][1]._spread = l3, n4;
    }
    function s2(e4, t4) {
      return n4;
      function n4(n5) {
        c2.call(this, e4(n5), n5), t4 && t4.call(this, n5);
      }
    }
    function a2() {
      this.stack.push({ type: "fragment", children: [] });
    }
    function c2(e4, t4, n4) {
      this.stack[this.stack.length - 1].children.push(e4), this.stack.push(e4), this.tokenStack.push([t4, n4]), e4.position = { start: Z(t4.start), end: void 0 };
    }
    function l2(e4) {
      return t4;
      function t4(t5) {
        e4 && e4.call(this, t5), u2.call(this, t5);
      }
    }
    function u2(e4, t4) {
      const n4 = this.stack.pop(), r3 = this.tokenStack.pop();
      if (!r3)
        throw new Error("Cannot close `" + e4.type + "` (" + N({ start: e4.start, end: e4.end }) + "): it’s not open");
      if (r3[0].type !== e4.type)
        if (t4)
          t4.call(this, e4, r3[0]);
        else {
          (r3[1] || K).call(this, e4, r3[0]);
        }
      n4.position.end = Z(e4.end);
    }
    function d2() {
      return o(this.stack.pop());
    }
    function f2() {
      this.data.expectingFirstListItemValue = true;
    }
    function k2(e4) {
      if (this.data.expectingFirstListItemValue) {
        this.stack[this.stack.length - 2].start = Number.parseInt(this.sliceSerialize(e4), 10), this.data.expectingFirstListItemValue = void 0;
      }
    }
    function y2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].lang = e4;
    }
    function x2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].meta = e4;
    }
    function v2() {
      this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = true);
    }
    function b2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].value = e4.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
    }
    function w2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].value = e4.replace(/(\r?\n|\r)$/g, "");
    }
    function E2(e4) {
      const t4 = this.resume(), n4 = this.stack[this.stack.length - 1];
      n4.label = t4, n4.identifier = h(this.sliceSerialize(e4)).toLowerCase();
    }
    function S2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].title = e4;
    }
    function T2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].url = e4;
    }
    function C2(e4) {
      const t4 = this.stack[this.stack.length - 1];
      if (!t4.depth) {
        const n4 = this.sliceSerialize(e4).length;
        t4.depth = n4;
      }
    }
    function I2() {
      this.data.setextHeadingSlurpLineEnding = true;
    }
    function $2(e4) {
      this.stack[this.stack.length - 1].depth = 61 === this.sliceSerialize(e4).codePointAt(0) ? 1 : 2;
    }
    function L2() {
      this.data.setextHeadingSlurpLineEnding = void 0;
    }
    function R2(e4) {
      const t4 = this.stack[this.stack.length - 1].children;
      let n4 = t4[t4.length - 1];
      n4 && "text" === n4.type || (n4 = ge2(), n4.position = { start: Z(e4.start), end: void 0 }, t4.push(n4)), this.stack.push(n4);
    }
    function z2(e4) {
      const t4 = this.stack.pop();
      t4.value += this.sliceSerialize(e4), t4.position.end = Z(e4.end);
    }
    function F2(e4) {
      const n4 = this.stack[this.stack.length - 1];
      if (this.data.atHardBreak) {
        return n4.children[n4.children.length - 1].position.end = Z(e4.end), void (this.data.atHardBreak = void 0);
      }
      !this.data.setextHeadingSlurpLineEnding && t3.canContainEols.includes(n4.type) && (R2.call(this, e4), z2.call(this, e4));
    }
    function O2() {
      this.data.atHardBreak = true;
    }
    function M2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].value = e4;
    }
    function A2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].value = e4;
    }
    function B2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].value = e4;
    }
    function P2() {
      const e4 = this.stack[this.stack.length - 1];
      if (this.data.inReference) {
        const t4 = this.data.referenceType || "shortcut";
        e4.type += "Reference", e4.referenceType = t4, delete e4.url, delete e4.title;
      } else
        delete e4.identifier, delete e4.label;
      this.data.referenceType = void 0;
    }
    function D2() {
      const e4 = this.stack[this.stack.length - 1];
      if (this.data.inReference) {
        const t4 = this.data.referenceType || "shortcut";
        e4.type += "Reference", e4.referenceType = t4, delete e4.url, delete e4.title;
      } else
        delete e4.identifier, delete e4.label;
      this.data.referenceType = void 0;
    }
    function H2(e4) {
      const t4 = this.sliceSerialize(e4), n4 = this.stack[this.stack.length - 2];
      n4.label = p(t4), n4.identifier = h(t4).toLowerCase();
    }
    function j2() {
      const e4 = this.stack[this.stack.length - 1], t4 = this.resume(), n4 = this.stack[this.stack.length - 1];
      if (this.data.inReference = true, "link" === n4.type) {
        const t5 = e4.children;
        n4.children = t5;
      } else
        n4.alt = t4;
    }
    function U2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].url = e4;
    }
    function _2() {
      const e4 = this.resume();
      this.stack[this.stack.length - 1].title = e4;
    }
    function V2() {
      this.data.inReference = void 0;
    }
    function Q2() {
      this.data.referenceType = "collapsed";
    }
    function q2(e4) {
      const t4 = this.resume(), n4 = this.stack[this.stack.length - 1];
      n4.label = t4, n4.identifier = h(this.sliceSerialize(e4)).toLowerCase(), this.data.referenceType = "full";
    }
    function G2(e4) {
      this.data.characterReferenceType = e4.type;
    }
    function J2(e4) {
      const t4 = this.sliceSerialize(e4), n4 = this.data.characterReferenceType;
      let r3;
      if (n4)
        r3 = g(t4, "characterReferenceMarkerNumeric" === n4 ? 10 : 16), this.data.characterReferenceType = void 0;
      else {
        r3 = m(t4);
      }
      this.stack[this.stack.length - 1].value += r3;
    }
    function Y2(e4) {
      this.stack.pop().position.end = Z(e4.end);
    }
    function ee2(e4) {
      z2.call(this, e4);
      this.stack[this.stack.length - 1].url = this.sliceSerialize(e4);
    }
    function te2(e4) {
      z2.call(this, e4);
      this.stack[this.stack.length - 1].url = "mailto:" + this.sliceSerialize(e4);
    }
    function ne2() {
      return { type: "blockquote", children: [] };
    }
    function re2() {
      return { type: "code", lang: null, meta: null, value: "" };
    }
    function ie2() {
      return { type: "inlineCode", value: "" };
    }
    function oe2() {
      return { type: "definition", identifier: "", label: null, title: null, url: "" };
    }
    function se2() {
      return { type: "emphasis", children: [] };
    }
    function ae2() {
      return { type: "heading", depth: 0, children: [] };
    }
    function ce2() {
      return { type: "break" };
    }
    function le2() {
      return { type: "html", value: "" };
    }
    function ue2() {
      return { type: "image", title: null, url: "", alt: null };
    }
    function de2() {
      return { type: "link", title: null, url: "", children: [] };
    }
    function fe2(e4) {
      return { type: "list", ordered: "listOrdered" === e4.type, start: null, spread: e4._spread, children: [] };
    }
    function he2(e4) {
      return { type: "listItem", spread: e4._spread, checked: null, children: [] };
    }
    function pe2() {
      return { type: "paragraph", children: [] };
    }
    function me2() {
      return { type: "strong", children: [] };
    }
    function ge2() {
      return { type: "text", value: "" };
    }
    function ke2() {
      return { type: "thematicBreak" };
    }
  }(n2)(u(d(n2).document().write(f()(e2, t2, true))));
}
function Z(e2) {
  return { line: e2.line, column: e2.column, offset: e2.offset };
}
function X(e2, t2) {
  let n2 = -1;
  for (; ++n2 < t2.length; ) {
    const r2 = t2[n2];
    Array.isArray(r2) ? X(e2, r2) : J(e2, r2);
  }
}
function J(e2, t2) {
  let n2;
  for (n2 in t2)
    if (W.call(t2, n2))
      switch (n2) {
        case "canContainEols": {
          const r2 = t2[n2];
          r2 && e2[n2].push(...r2);
          break;
        }
        case "transforms": {
          const r2 = t2[n2];
          r2 && e2[n2].push(...r2);
          break;
        }
        case "enter":
        case "exit": {
          const r2 = t2[n2];
          r2 && Object.assign(e2[n2], r2);
          break;
        }
      }
}
function K(e2, t2) {
  throw e2 ? new Error("Cannot close `" + e2.type + "` (" + N({ start: e2.start, end: e2.end }) + "): a different token (`" + t2.type + "`, " + N({ start: t2.start, end: t2.end }) + ") is open") : new Error("Cannot close document, a token (`" + t2.type + "`, " + N({ start: t2.start, end: t2.end }) + ") is still open");
}
function Y(e2) {
  const t2 = this;
  t2.parser = function(n2) {
    return G(n2, { ...t2.data("settings"), ...e2, extensions: t2.data("micromarkExtensions") || [], mdastExtensions: t2.data("fromMarkdownExtensions") || [] });
  };
}
function ee(e2, t2) {
  return e2 && "run" in e2 ? async function(n2, r2) {
    const i2 = k(n2, { file: r2, ...t2 });
    await e2.run(i2, r2);
  } : function(n2, r2) {
    return k(n2, { file: r2, ...t2 || e2 });
  };
}
function te() {
  return te = Object.assign ? Object.assign.bind() : function(e2) {
    for (var t2 = 1; t2 < arguments.length; t2++) {
      var n2 = arguments[t2];
      for (var r2 in n2)
        Object.prototype.hasOwnProperty.call(n2, r2) && (e2[r2] = n2[r2]);
    }
    return e2;
  }, te.apply(this, arguments);
}
const ne = ["children", "options"];
var re, ie, oe;
(oe = re || (re = {})).blockQuote = "0", oe.breakLine = "1", oe.breakThematic = "2", oe.codeBlock = "3", oe.codeFenced = "4", oe.codeInline = "5", oe.footnote = "6", oe.footnoteReference = "7", oe.gfmTask = "8", oe.heading = "9", oe.headingSetext = "10", oe.htmlBlock = "11", oe.htmlComment = "12", oe.htmlSelfClosing = "13", oe.image = "14", oe.link = "15", oe.linkAngleBraceStyleDetector = "16", oe.linkBareUrlDetector = "17", oe.linkMailtoDetector = "18", oe.newlineCoalescer = "19", oe.orderedList = "20", oe.paragraph = "21", oe.ref = "22", oe.refImage = "23", oe.refLink = "24", oe.table = "25", oe.tableSeparator = "26", oe.text = "27", oe.textBolded = "28", oe.textEmphasized = "29", oe.textEscaped = "30", oe.textMarked = "31", oe.textStrikethroughed = "32", oe.unorderedList = "33", function(e2) {
  e2[e2.MAX = 0] = "MAX", e2[e2.HIGH = 1] = "HIGH", e2[e2.MED = 2] = "MED", e2[e2.LOW = 3] = "LOW", e2[e2.MIN = 4] = "MIN";
}(ie || (ie = {}));
const se = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "className", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e2, t2) => (e2[t2.toLowerCase()] = t2, e2), { for: "htmlFor" }), ae = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, ce = ["style", "script"], le = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, ue = /mailto:/i, de = /\n{2,}$/, fe = /^(\s*>[\s\S]*?)(?=\n{2,})/, he = /^ *> ?/gm, pe = /^ {2,}\n/, me = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, ge = /^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/, ke = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, ye = /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, xe = /^(?:\n *)*\n/, ve = /\r\n?/g, be = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, we = /^\[\^([^\]]+)]/, Ee = /\f/g, Se = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Te = /^\s*?\[(x|\s)\]/, Ce = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ie = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, $e = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, Le = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Re = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, ze = /^<!--[\s\S]*?(?:-->)/, Fe = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Oe = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Me = /^\{.*\}$/, Ae = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Be = /^<([^ >]+@[^ >]+)>/, Pe = /^<([^ >]+:\/[^ >]+)>/, De = /-([a-z])?/gi, He = /^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, je = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Ue = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, _e = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Ne = /(\[|\])/g, Ve = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Qe = /\t/g, qe = /(^ *\||\| *$)/g, We = /^ *:-+: *$/, Ge = /^ *:-+ *$/, Ze = /^ *-+: *$/, Xe = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)", Je = new RegExp(`^([*_])\\1${Xe}\\1\\1(?!\\1)`), Ke = new RegExp(`^([*_])${Xe}\\1(?!\\1|\\w)`), Ye = new RegExp(`^==${Xe}==`), et = new RegExp(`^~~${Xe}~~`), tt = /^\\([^0-9A-Za-z\s])/, nt = /^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i, rt = /^\n+/, it = /^([ \t]*)/, ot = /\\([^\\])/g, st = / *\n+$/, at = /(?:^|\n)( *)$/, ct = "(?:\\d+\\.)", lt = "(?:[*+-])";
function ut(e2) {
  return "( *)(" + (1 === e2 ? ct : lt) + ") +";
}
const dt = ut(1), ft = ut(2);
function ht(e2) {
  return new RegExp("^" + (1 === e2 ? dt : ft));
}
const pt = ht(1), mt = ht(2);
function gt(e2) {
  return new RegExp("^" + (1 === e2 ? dt : ft) + "[^\\n]*(?:\\n(?!\\1" + (1 === e2 ? ct : lt) + " )[^\\n]*)*(\\n|$)", "gm");
}
const kt = gt(1), yt = gt(2);
function xt(e2) {
  const t2 = 1 === e2 ? ct : lt;
  return new RegExp("^( *)(" + t2 + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t2 + " (?!" + t2 + " ))\\n*|\\s*\\n*$)");
}
const vt = xt(1), bt = xt(2);
function wt(e2, t2) {
  const n2 = 1 === t2, r2 = n2 ? vt : bt, i2 = n2 ? kt : yt, o2 = n2 ? pt : mt;
  return { match(e3, t3, n3) {
    const i3 = at.exec(n3);
    return i3 && (t3.list || !t3.inline && !t3.simple) ? r2.exec(e3 = i3[1] + e3) : null;
  }, order: 1, parse(e3, t3, r3) {
    const s2 = n2 ? +e3[2] : void 0, a2 = e3[0].replace(de, "\n").match(i2);
    let c2 = false;
    return { items: a2.map(function(e4, n3) {
      const i3 = o2.exec(e4)[0].length, s3 = new RegExp("^ {1," + i3 + "}", "gm"), l2 = e4.replace(s3, "").replace(o2, ""), u2 = n3 === a2.length - 1, d2 = -1 !== l2.indexOf("\n\n") || u2 && c2;
      c2 = d2;
      const f2 = r3.inline, h2 = r3.list;
      let p2;
      r3.list = true, d2 ? (r3.inline = false, p2 = l2.replace(st, "\n\n")) : (r3.inline = true, p2 = l2.replace(st, ""));
      const m2 = t3(p2, r3);
      return r3.inline = f2, r3.list = h2, m2;
    }), ordered: n2, start: s2 };
  }, render: (t3, n3, r3) => e2(t3.ordered ? "ol" : "ul", { key: r3.key, start: "20" === t3.type ? t3.start : void 0 }, t3.items.map(function(t4, i3) {
    return e2("li", { key: i3 }, n3(t4, r3));
  })) };
}
const Et = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), St = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Tt = [fe, ge, ke, Ce, $e, Ie, ze, He, kt, vt, yt, bt], Ct = [...Tt, /^[^\n]+(?:  \n|\n{2,})/, Le, Oe];
function It(e2) {
  return e2.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
}
function $t(e2) {
  return Ze.test(e2) ? "right" : We.test(e2) ? "center" : Ge.test(e2) ? "left" : null;
}
function Lt(e2, t2, n2, r2) {
  const i2 = n2.inTable;
  n2.inTable = true;
  let o2 = e2.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce((e3, i3) => ("|" === i3.trim() ? e3.push(r2 ? { type: "26" } : { type: "27", text: i3 }) : "" !== i3 && e3.push.apply(e3, t2(i3, n2)), e3), []);
  n2.inTable = i2;
  let s2 = [[]];
  return o2.forEach(function(e3, t3) {
    "26" === e3.type ? 0 !== t3 && t3 !== o2.length - 1 && s2.push([]) : ("27" !== e3.type || null != o2[t3 + 1] && "26" !== o2[t3 + 1].type || (e3.text = e3.text.trimEnd()), s2[s2.length - 1].push(e3));
  }), s2;
}
function Rt(e2, t2, n2) {
  n2.inline = true;
  const r2 = e2[2] ? e2[2].replace(qe, "").split("|").map($t) : [], i2 = e2[3] ? function(e3, t3, n3) {
    return e3.trim().split("\n").map(function(e4) {
      return Lt(e4, t3, n3, true);
    });
  }(e2[3], t2, n2) : [], o2 = Lt(e2[1], t2, n2, !!i2.length);
  return n2.inline = false, i2.length ? { align: r2, cells: i2, header: o2, type: "25" } : { children: o2, type: "21" };
}
function zt(e2, t2) {
  return null == e2.align[t2] ? {} : { textAlign: e2.align[t2] };
}
function Ft(e2) {
  return function(t2, n2) {
    return n2.inline ? e2.exec(t2) : null;
  };
}
function Ot(e2) {
  return function(t2, n2) {
    return n2.inline || n2.simple ? e2.exec(t2) : null;
  };
}
function Mt(e2) {
  return function(t2, n2) {
    return n2.inline || n2.simple ? null : e2.exec(t2);
  };
}
function At(e2) {
  return function(t2) {
    return e2.exec(t2);
  };
}
function Bt(e2, t2, n2) {
  if (t2.inline || t2.simple)
    return null;
  if (n2 && !n2.endsWith("\n"))
    return null;
  let r2 = "";
  e2.split("\n").every((e3) => !Tt.some((t3) => t3.test(e3)) && (r2 += e3 + "\n", e3.trim()));
  const i2 = r2.trimEnd();
  return "" == i2 ? null : [r2, i2];
}
function Pt(e2) {
  try {
    if (decodeURIComponent(e2).replace(/[^A-Za-z0-9/:]/g, "").match(/^\s*(javascript|vbscript|data(?!:image)):/i))
      return;
  } catch (e3) {
    return null;
  }
  return e2;
}
function Dt(e2) {
  return e2.replace(ot, "$1");
}
function Ht(e2, t2, n2) {
  const r2 = n2.inline || false, i2 = n2.simple || false;
  n2.inline = true, n2.simple = true;
  const o2 = e2(t2, n2);
  return n2.inline = r2, n2.simple = i2, o2;
}
function jt(e2, t2, n2) {
  const r2 = n2.inline || false, i2 = n2.simple || false;
  n2.inline = false, n2.simple = true;
  const o2 = e2(t2, n2);
  return n2.inline = r2, n2.simple = i2, o2;
}
function Ut(e2, t2, n2) {
  const r2 = n2.inline || false;
  n2.inline = false;
  const i2 = e2(t2, n2);
  return n2.inline = r2, i2;
}
const _t = (e2, t2, n2) => ({ children: Ht(t2, e2[1], n2) });
function Nt() {
  return {};
}
function Vt() {
  return null;
}
function Qt(...e2) {
  return e2.filter(Boolean).join(" ");
}
function qt(e2, t2, n2) {
  let r2 = e2;
  const i2 = t2.split(".");
  for (; i2.length && (r2 = r2[i2[0]], void 0 !== r2); )
    i2.shift();
  return r2 || n2;
}
function Wt(e2 = "", t2 = {}) {
  t2.overrides = t2.overrides || {}, t2.slugify = t2.slugify || It, t2.namedCodesToUnicode = t2.namedCodesToUnicode ? te({}, ae, t2.namedCodesToUnicode) : ae;
  const n2 = t2.createElement || y.createElement;
  function r2(e3, r3, ...i3) {
    const o3 = qt(t2.overrides, `${e3}.props`, {});
    return n2(function(e4, t3) {
      const n3 = qt(t3, e4);
      return n3 ? "function" == typeof n3 || "object" == typeof n3 && "render" in n3 ? n3 : qt(t3, `${e4}.component`, e4) : e4;
    }(e3, t2.overrides), te({}, r3, o3, { className: Qt(null == r3 ? void 0 : r3.className, o3.className) || void 0 }), ...i3);
  }
  function i2(e3) {
    e3 = e3.replace(Se, "");
    let n3 = false;
    t2.forceInline ? n3 = true : t2.forceBlock || (n3 = false === Ve.test(e3));
    const i3 = u2(l2(n3 ? e3 : `${e3.trimEnd().replace(rt, "")}

`, { inline: n3 }));
    for (; "string" == typeof i3[i3.length - 1] && !i3[i3.length - 1].trim(); )
      i3.pop();
    if (null === t2.wrapper)
      return i3;
    const o3 = t2.wrapper || (n3 ? "span" : "div");
    let s3;
    if (i3.length > 1 || t2.forceWrapper)
      s3 = i3;
    else {
      if (1 === i3.length)
        return s3 = i3[0], "string" == typeof s3 ? r2("span", { key: "outer" }, s3) : s3;
      s3 = null;
    }
    return y.createElement(o3, { key: "outer" }, s3);
  }
  function o2(e3) {
    const t3 = e3.match(le);
    return t3 ? t3.reduce(function(e4, t4, n3) {
      const r3 = t4.indexOf("=");
      if (-1 !== r3) {
        const o3 = function(e5) {
          return -1 !== e5.indexOf("-") && null === e5.match(Fe) && (e5 = e5.replace(De, function(e6, t5) {
            return t5.toUpperCase();
          })), e5;
        }(t4.slice(0, r3)).trim(), s3 = function(e5) {
          const t5 = e5[0];
          return ('"' === t5 || "'" === t5) && e5.length >= 2 && e5[e5.length - 1] === t5 ? e5.slice(1, -1) : e5;
        }(t4.slice(r3 + 1).trim()), a3 = se[o3] || o3, c3 = e4[a3] = function(e5, t5) {
          return "style" === e5 ? t5.split(/;\s?/).reduce(function(e6, t6) {
            const n4 = t6.slice(0, t6.indexOf(":"));
            return e6[n4.trim().replace(/(-[a-z])/g, (e7) => e7[1].toUpperCase())] = t6.slice(n4.length + 1).trim(), e6;
          }, {}) : "href" === e5 || "src" === e5 ? Pt(t5) : (t5.match(Me) && (t5 = t5.slice(1, t5.length - 1)), "true" === t5 || "false" !== t5 && t5);
        }(o3, s3);
        "string" == typeof c3 && (Le.test(c3) || Oe.test(c3)) && (e4[a3] = y.cloneElement(i2(c3.trim()), { key: n3 }));
      } else
        "style" !== t4 && (e4[se[t4] || t4] = true);
      return e4;
    }, {}) : null;
  }
  const s2 = [], a2 = {}, c2 = { 0: { match: Mt(fe), order: 1, parse: (e3, t3, n3) => ({ children: t3(e3[0].replace(he, ""), n3) }), render: (e3, t3, n3) => r2("blockquote", { key: n3.key }, t3(e3.children, n3)) }, 1: { match: At(pe), order: 1, parse: Nt, render: (e3, t3, n3) => r2("br", { key: n3.key }) }, 2: { match: Mt(me), order: 1, parse: Nt, render: (e3, t3, n3) => r2("hr", { key: n3.key }) }, 3: { match: Mt(ke), order: 0, parse: (e3) => ({ lang: void 0, text: e3[0].replace(/^ {4}/gm, "").replace(/\n+$/, "") }), render: (e3, t3, n3) => r2("pre", { key: n3.key }, r2("code", te({}, e3.attrs, { className: e3.lang ? `lang-${e3.lang}` : "" }), e3.text)) }, 4: { match: Mt(ge), order: 0, parse: (e3) => ({ attrs: o2(e3[3] || ""), lang: e3[2] || void 0, text: e3[4], type: "3" }) }, 5: { match: Ot(ye), order: 3, parse: (e3) => ({ text: e3[2] }), render: (e3, t3, n3) => r2("code", { key: n3.key }, e3.text) }, 6: { match: Mt(be), order: 0, parse: (e3) => (s2.push({ footnote: e3[2], identifier: e3[1] }), {}), render: Vt }, 7: { match: Ft(we), order: 1, parse: (e3) => ({ target: `#${t2.slugify(e3[1])}`, text: e3[1] }), render: (e3, t3, n3) => r2("a", { key: n3.key, href: Pt(e3.target) }, r2("sup", { key: n3.key }, e3.text)) }, 8: { match: Ft(Te), order: 1, parse: (e3) => ({ completed: "x" === e3[1].toLowerCase() }), render: (e3, t3, n3) => r2("input", { checked: e3.completed, key: n3.key, readOnly: true, type: "checkbox" }) }, 9: { match: Mt(t2.enforceAtxHeadings ? Ie : Ce), order: 1, parse: (e3, n3, r3) => ({ children: Ht(n3, e3[2], r3), id: t2.slugify(e3[2]), level: e3[1].length }), render: (e3, t3, n3) => r2(`h${e3.level}`, { id: e3.id, key: n3.key }, t3(e3.children, n3)) }, 10: { match: Mt($e), order: 0, parse: (e3, t3, n3) => ({ children: Ht(t3, e3[1], n3), level: "=" === e3[2] ? 1 : 2, type: "9" }) }, 11: { match: At(Le), order: 1, parse(e3, t3, n3) {
    const [, r3] = e3[3].match(it), i3 = new RegExp(`^${r3}`, "gm"), s3 = e3[3].replace(i3, ""), a3 = (c3 = s3, Ct.some((e4) => e4.test(c3)) ? Ut : Ht);
    var c3;
    const l3 = e3[1].toLowerCase(), u3 = -1 !== ce.indexOf(l3), d3 = { attrs: o2(e3[2]), noInnerParse: u3, tag: (u3 ? l3 : e3[1]).trim() };
    return n3.inAnchor = n3.inAnchor || "a" === l3, u3 ? d3.text = e3[3] : d3.children = a3(t3, s3, n3), n3.inAnchor = false, d3;
  }, render: (e3, t3, n3) => r2(e3.tag, te({ key: n3.key }, e3.attrs), e3.text || t3(e3.children, n3)) }, 13: { match: At(Oe), order: 1, parse: (e3) => ({ attrs: o2(e3[2] || ""), tag: e3[1].trim() }), render: (e3, t3, n3) => r2(e3.tag, te({}, e3.attrs, { key: n3.key })) }, 12: { match: At(ze), order: 1, parse: () => ({}), render: Vt }, 14: { match: Ot(St), order: 1, parse: (e3) => ({ alt: e3[1], target: Dt(e3[2]), title: e3[3] }), render: (e3, t3, n3) => r2("img", { key: n3.key, alt: e3.alt || void 0, title: e3.title || void 0, src: Pt(e3.target) }) }, 15: { match: Ft(Et), order: 3, parse: (e3, t3, n3) => ({ children: jt(t3, e3[1], n3), target: Dt(e3[2]), title: e3[3] }), render: (e3, t3, n3) => r2("a", { key: n3.key, href: Pt(e3.target), title: e3.title }, t3(e3.children, n3)) }, 16: { match: Ft(Pe), order: 0, parse: (e3) => ({ children: [{ text: e3[1], type: "27" }], target: e3[1], type: "15" }) }, 17: { match: (e3, t3) => t3.inAnchor ? null : Ft(Ae)(e3, t3), order: 0, parse: (e3) => ({ children: [{ text: e3[1], type: "27" }], target: e3[1], title: void 0, type: "15" }) }, 18: { match: Ft(Be), order: 0, parse(e3) {
    let t3 = e3[1], n3 = e3[1];
    return ue.test(n3) || (n3 = "mailto:" + n3), { children: [{ text: t3.replace("mailto:", ""), type: "27" }], target: n3, type: "15" };
  } }, 20: wt(r2, 1), 33: wt(r2, 2), 19: { match: Mt(xe), order: 3, parse: Nt, render: () => "\n" }, 21: { match: Bt, order: 3, parse: _t, render: (e3, t3, n3) => r2("p", { key: n3.key }, t3(e3.children, n3)) }, 22: { match: Ft(je), order: 0, parse: (e3) => (a2[e3[1]] = { target: e3[2], title: e3[4] }, {}), render: Vt }, 23: { match: Ot(Ue), order: 0, parse: (e3) => ({ alt: e3[1] || void 0, ref: e3[2] }), render: (e3, t3, n3) => a2[e3.ref] ? r2("img", { key: n3.key, alt: e3.alt, src: Pt(a2[e3.ref].target), title: a2[e3.ref].title }) : null }, 24: { match: Ft(_e), order: 0, parse: (e3, t3, n3) => ({ children: t3(e3[1], n3), fallbackChildren: t3(e3[0].replace(Ne, "\\$1"), n3), ref: e3[2] }), render: (e3, t3, n3) => a2[e3.ref] ? r2("a", { key: n3.key, href: Pt(a2[e3.ref].target), title: a2[e3.ref].title }, t3(e3.children, n3)) : r2("span", { key: n3.key }, t3(e3.fallbackChildren, n3)) }, 25: { match: Mt(He), order: 1, parse: Rt, render(e3, t3, n3) {
    const i3 = e3;
    return r2("table", { key: n3.key }, r2("thead", null, r2("tr", null, i3.header.map(function(e4, o3) {
      return r2("th", { key: o3, style: zt(i3, o3) }, t3(e4, n3));
    }))), r2("tbody", null, i3.cells.map(function(e4, o3) {
      return r2("tr", { key: o3 }, e4.map(function(e5, o4) {
        return r2("td", { key: o4, style: zt(i3, o4) }, t3(e5, n3));
      }));
    })));
  } }, 27: { match: At(nt), order: 4, parse: (e3) => ({ text: e3[0].replace(Re, (e4, n3) => t2.namedCodesToUnicode[n3] ? t2.namedCodesToUnicode[n3] : e4) }), render: (e3) => e3.text }, 28: { match: Ot(Je), order: 2, parse: (e3, t3, n3) => ({ children: t3(e3[2], n3) }), render: (e3, t3, n3) => r2("strong", { key: n3.key }, t3(e3.children, n3)) }, 29: { match: Ot(Ke), order: 3, parse: (e3, t3, n3) => ({ children: t3(e3[2], n3) }), render: (e3, t3, n3) => r2("em", { key: n3.key }, t3(e3.children, n3)) }, 30: { match: Ot(tt), order: 1, parse: (e3) => ({ text: e3[1], type: "27" }) }, 31: { match: Ot(Ye), order: 3, parse: _t, render: (e3, t3, n3) => r2("mark", { key: n3.key }, t3(e3.children, n3)) }, 32: { match: Ot(et), order: 3, parse: _t, render: (e3, t3, n3) => r2("del", { key: n3.key }, t3(e3.children, n3)) } };
  true === t2.disableParsingRawHTML && (delete c2[11], delete c2[13]);
  const l2 = function(e3) {
    let t3 = Object.keys(e3);
    function n3(r3, i3) {
      let o3 = [], s3 = "";
      for (; r3; ) {
        let a3 = 0;
        for (; a3 < t3.length; ) {
          const c3 = t3[a3], l3 = e3[c3], u3 = l3.match(r3, i3, s3);
          if (u3) {
            const e4 = u3[0];
            r3 = r3.substring(e4.length);
            const t4 = l3.parse(u3, n3, i3);
            null == t4.type && (t4.type = c3), o3.push(t4), s3 = e4;
            break;
          }
          a3++;
        }
      }
      return o3;
    }
    return t3.sort(function(t4, n4) {
      let r3 = e3[t4].order, i3 = e3[n4].order;
      return r3 !== i3 ? r3 - i3 : t4 < n4 ? -1 : 1;
    }), function(e4, t4) {
      return n3(function(e5) {
        return e5.replace(ve, "\n").replace(Ee, "").replace(Qe, "    ");
      }(e4), t4);
    };
  }(c2), u2 = (d2 = function(e3, t3) {
    return function(n3, r3, i3) {
      const o3 = e3[n3.type].render;
      return t3 ? t3(() => o3(n3, r3, i3), n3, r3, i3) : o3(n3, r3, i3);
    };
  }(c2, t2.renderRule), function e3(t3, n3 = {}) {
    if (Array.isArray(t3)) {
      const r3 = n3.key, i3 = [];
      let o3 = false;
      for (let r4 = 0; r4 < t3.length; r4++) {
        n3.key = r4;
        const s3 = e3(t3[r4], n3), a3 = "string" == typeof s3;
        a3 && o3 ? i3[i3.length - 1] += s3 : null !== s3 && i3.push(s3), o3 = a3;
      }
      return n3.key = r3, i3;
    }
    return d2(t3, e3, n3);
  });
  var d2;
  const f2 = i2(e2);
  return s2.length ? r2("div", null, f2, r2("footer", { key: "footer" }, s2.map(function(e3) {
    return r2("div", { id: t2.slugify(e3.identifier), key: e3.identifier }, e3.identifier, u2(l2(e3.footnote, { inline: true })));
  }))) : f2;
}
const Gt = (e2) => {
  let { children: t2 = "", options: n2 } = e2, r2 = function(e3, t3) {
    if (null == e3)
      return {};
    var n3, r3, i2 = {}, o2 = Object.keys(e3);
    for (r3 = 0; r3 < o2.length; r3++)
      t3.indexOf(n3 = o2[r3]) >= 0 || (i2[n3] = e3[n3]);
    return i2;
  }(e2, ne);
  return y.cloneElement(Wt(t2, n2), r2);
};
export {
  Gt as M,
  x as a,
  v as b,
  Y as c,
  ee as d,
  j as h,
  b as m,
  _ as r
};
