import { S as isObject_default, _ as _isIndex_default } from "./_baseFor-BGiY-cm1.js";
import { c as _castPath_default, o as _baseGet_default, s as _toKey_default, t as hasIn_default } from "./hasIn-COs6vImh.js";
import { d as _overRest_default, h as _setToString_default, p as _assignValue_default } from "./merge-CHn7Yx0N.js";
import { t as flatten_default } from "./flatten-CzBvFdvC.js";
function flatRest(e) {
  return _setToString_default(_overRest_default(e, void 0, flatten_default), e + "");
}
var _flatRest_default = flatRest;
function baseSet(o, c, l, u) {
  if (!isObject_default(o)) return o;
  c = _castPath_default(c, o);
  for (var f = -1, p = c.length, m = p - 1, h = o; h != null && ++f < p; ) {
    var g = _toKey_default(c[f]), _ = l;
    if (g === "__proto__" || g === "constructor" || g === "prototype") return o;
    if (f != m) {
      var v = h[g];
      _ = u ? u(v, g, h) : void 0, _ === void 0 && (_ = isObject_default(v) ? v : _isIndex_default(c[f + 1]) ? [] : {});
    }
    _assignValue_default(h, g, _), h = h[g];
  }
  return o;
}
var _baseSet_default = baseSet;
function basePickBy(e, i, s) {
  for (var c = -1, l = i.length, u = {}; ++c < l; ) {
    var d = i[c], f = _baseGet_default(e, d);
    s(f, d) && _baseSet_default(u, _castPath_default(d, e), f);
  }
  return u;
}
var _basePickBy_default = basePickBy;
function basePick(e, i) {
  return _basePickBy_default(e, i, function(i2, a) {
    return hasIn_default(e, a);
  });
}
var _basePick_default = basePick, pick_default = _flatRest_default(function(e, i) {
  return e == null ? {} : _basePick_default(e, i);
});
export {
  _baseSet_default as n,
  pick_default as t
};
