import i from "../../../@babel/runtime/helpers/esm/toConsumableArray.mjs";
import c from "../../../@babel/runtime/helpers/esm/typeof.mjs";
import s from "../../../rc-util/es/utils/get.mjs";
import o from "../../../rc-util/es/utils/set.mjs";
import { toArray as g } from "./typeUtil.mjs";
function b(t) {
  return g(t);
}
function y(t, e) {
  var r = {};
  return e.forEach(function(n) {
    var u = s(t, n);
    r = o(r, n, u);
  }), r;
}
function S(t, e) {
  var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  return t && t.some(function(n) {
    return m(e, n, r);
  });
}
function m(t, e) {
  var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  return !t || !e || !r && t.length !== e.length ? !1 : e.every(function(n, u) {
    return t[u] === n;
  });
}
function k(t, e) {
  if (t === e)
    return !0;
  if (!t && e || t && !e || !t || !e || c(t) !== "object" || c(e) !== "object")
    return !1;
  var r = Object.keys(t), n = Object.keys(e), u = new Set([].concat(r, n));
  return i(u).every(function(f) {
    var l = t[f], a = e[f];
    return typeof l == "function" && typeof a == "function" ? !0 : l === a;
  });
}
function w(t) {
  var e = arguments.length <= 1 ? void 0 : arguments[1];
  return e && e.target && c(e.target) === "object" && t in e.target ? e.target[t] : e;
}
function A(t, e, r) {
  var n = t.length;
  if (e < 0 || e >= n || r < 0 || r >= n)
    return t;
  var u = t[e], f = e - r;
  return f > 0 ? [].concat(i(t.slice(0, r)), [u], i(t.slice(r, e)), i(t.slice(e + 1, n))) : f < 0 ? [].concat(i(t.slice(0, e)), i(t.slice(e + 1, r + 1)), [u], i(t.slice(r + 1, n))) : t;
}
export {
  y as cloneByNamePathList,
  S as containsNamePath,
  w as defaultGetValueFromEvent,
  b as getNamePath,
  s as getValue,
  k as isSimilar,
  m as matchNamePath,
  A as move,
  o as setValue
};
