import array from "../array.js";
import selectorAll_default from "../selectorAll.js";
import { Selection } from "./index.js";
function arrayAll(r) {
	return function() {
		return array(r.apply(this, arguments));
	};
}
function selectAll_default(e) {
	e = typeof e == "function" ? arrayAll(e) : selectorAll_default(e);
	for (var i = this._groups, a = i.length, o = [], s = [], c = 0; c < a; ++c) for (var l = i[c], u = l.length, d, f = 0; f < u; ++f) (d = l[f]) && (o.push(e.call(d, d.__data__, f, l)), s.push(d));
	return new Selection(o, s);
}
export { selectAll_default as default };
