import e from "./ascending.js";
import t from "./descending.js";
//#region ../../node_modules/d3-array/src/bisector.js
function n(n) {
	let i, a, o;
	n.length === 2 ? (i = n === e || n === t ? n : r, a = n, o = n) : (i = e, a = (t, r) => e(n(t), r), o = (e, t) => n(e) - t);
	function s(e, t, n = 0, r = e.length) {
		if (n < r) {
			if (i(t, t) !== 0) return r;
			do {
				let i = n + r >>> 1;
				a(e[i], t) < 0 ? n = i + 1 : r = i;
			} while (n < r);
		}
		return n;
	}
	function c(e, t, n = 0, r = e.length) {
		if (n < r) {
			if (i(t, t) !== 0) return r;
			do {
				let i = n + r >>> 1;
				a(e[i], t) <= 0 ? n = i + 1 : r = i;
			} while (n < r);
		}
		return n;
	}
	function l(e, t, n = 0, r = e.length) {
		let i = s(e, t, n, r - 1);
		return i > n && o(e[i - 1], t) > -o(e[i], t) ? i - 1 : i;
	}
	return {
		left: s,
		center: l,
		right: c
	};
}
function r() {
	return 0;
}
//#endregion
export { n as default };
