import { markdownLineEnding as e } from "../../micromark-util-character/index.js";
import { factorySpace as t } from "../../micromark-factory-space/index.js";
import { subtokenize as n } from "../../micromark-util-subtokenize/index.js";
//#region ../../node_modules/micromark-core-commonmark/lib/content.js
var r = {
	resolve: a,
	tokenize: o
}, i = {
	partial: !0,
	tokenize: s
};
function a(e) {
	return n(e), e;
}
function o(t, n) {
	let r;
	return a;
	function a(e) {
		return t.enter("content"), r = t.enter("chunkContent", { contentType: "content" }), o(e);
	}
	function o(n) {
		return n === null ? s(n) : e(n) ? t.check(i, c, s)(n) : (t.consume(n), o);
	}
	function s(e) {
		return t.exit("chunkContent"), t.exit("content"), n(e);
	}
	function c(e) {
		return t.consume(e), t.exit("chunkContent"), r.next = t.enter("chunkContent", {
			contentType: "content",
			previous: r
		}), r = r.next, o;
	}
}
function s(n, r, i) {
	let a = this;
	return o;
	function o(e) {
		return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"), t(n, s, "linePrefix");
	}
	function s(t) {
		if (t === null || e(t)) return i(t);
		let o = a.events[a.events.length - 1];
		return !a.parser.constructs.disable.null.includes("codeIndented") && o && o[1].type === "linePrefix" && o[2].sliceSerialize(o[1], !0).length >= 4 ? r(t) : n.interrupt(a.parser.constructs.flow, i, r)(t);
	}
}
//#endregion
export { r as content };
