"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("./src-selection-index.cjs");
const array = require("./src-array.cjs");
const selectorAll = require("./src-selectorAll.cjs");
function arrayAll(select) {
  return function() {
    return array.default(select.apply(this, arguments));
  };
}
function selection_selectAll(select) {
  if (typeof select === "function") select = arrayAll(select);
  else select = selectorAll.default(select);
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
      if (node = group[i]) {
        subgroups.push(select.call(node, node.__data__, i, group));
        parents.push(node);
      }
    }
  }
  return new index.Selection(subgroups, parents);
}
exports.default = selection_selectAll;
//# sourceMappingURL=src-selection-selectAll.cjs.map
