import m from "./_arrayMap.js";
import c from "./_baseGet.js";
import l from "./_baseIteratee.js";
import y from "./_baseMap.js";
import b from "./_baseSortBy.js";
import d from "./_baseUnary.js";
import e from "./_compareMultiple.js";
import s from "./identity.js";
import v from "./isArray.js";
function S(f, o, i) {
  o.length ? o = m(o, function(r) {
    return v(r) ? function(n) {
      return c(n, r.length === 1 ? r[0] : r);
    } : r;
  }) : o = [s];
  var t = -1;
  o = m(o, d(l));
  var u = y(f, function(r, n, x) {
    var p = m(o, function(a) {
      return a(r);
    });
    return { criteria: p, index: ++t, value: r };
  });
  return b(u, function(r, n) {
    return e(r, n, i);
  });
}
export {
  S as default
};
