import { convert as e } from "../../unist-util-is/lib/index.js";
//#region ../../node_modules/unist-util-find-after/lib/index.js
var t = (function(t, n, r) {
	let i = e(r);
	if (!t || !t.type || !t.children) throw Error("Expected parent node");
	if (typeof n == "number") {
		if (n < 0 || n === Infinity) throw Error("Expected positive finite number as index");
	} else if (n = t.children.indexOf(n), n < 0) throw Error("Expected child node or index");
	for (; ++n < t.children.length;) if (i(t.children[n], n, t)) return t.children[n];
});
//#endregion
export { t as findAfter };
