import t from "./_castPath.js";
import a from "./isArguments.js";
import u from "./isArray.js";
import o from "./_isIndex.js";
import e from "./isLength.js";
import g from "./_toKey.js";
function P(r, m, s) {
  m = t(m, r);
  for (var n = -1, i = m.length, f = !1; ++n < i; ) {
    var l = g(m[n]);
    if (!(f = r != null && s(r, l)))
      break;
    r = r[l];
  }
  return f || ++n != i ? f : (i = r == null ? 0 : r.length, !!i && e(i) && o(l, i) && (u(r) || a(r)));
}
export {
  P as default
};
