import { factorySpace as o } from "../../../../micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js";
import { markdownSpace as B, markdownLineEnding as c } from "../../../../micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js";
const q = {
  name: "thematicBreak",
  tokenize: p
};
function p(t, u, m) {
  let a = 0, e;
  return k;
  function k(r) {
    return t.enter("thematicBreak"), h(r);
  }
  function h(r) {
    return e = r, n(r);
  }
  function n(r) {
    return r === e ? (t.enter("thematicBreakSequence"), i(r)) : a >= 3 && (r === null || c(r)) ? (t.exit("thematicBreak"), u(r)) : m(r);
  }
  function i(r) {
    return r === e ? (t.consume(r), a++, i) : (t.exit("thematicBreakSequence"), B(r) ? o(t, n, "whitespace")(r) : n(r));
  }
}
export {
  q as thematicBreak
};
//# sourceMappingURL=thematic-break.js.map
