import { Selection as e } from "./index.js";
//#region ../../node_modules/d3-selection/src/selection/sort.js
function t(t) {
	t ||= n;
	function r(e, n) {
		return e && n ? t(e.__data__, n.__data__) : !e - !n;
	}
	for (var i = this._groups, a = i.length, o = Array(a), s = 0; s < a; ++s) {
		for (var c = i[s], l = c.length, u = o[s] = Array(l), d, f = 0; f < l; ++f) (d = c[f]) && (u[f] = d);
		u.sort(r);
	}
	return new e(o, this._parents).order();
}
function n(e, t) {
	return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
//#endregion
export { t as default };
