import q from "../../../../@gilbarbara_deep-equal@0.1.2/node_modules/@gilbarbara/deep-equal/esm/index.js";
import c from "../../../../is-lite@0.8.2/node_modules/is-lite/esm/index.js";
import { compareValues as v, nested as o, includesOrEqualsTo as i, compareNumbers as m, getIterables as h } from "./helpers.js";
function C(d, a) {
  if ([d, a].some(c.nullOrUndefined))
    throw new Error("Missing required parameters");
  if (![d, a].every(function(e) {
    return c.plainObject(e) || c.array(e);
  }))
    throw new Error("Expected plain objects or array");
  var y = function(e, r) {
    try {
      return v(d, a, { key: e, type: "added", value: r });
    } catch {
      return !1;
    }
  }, s = function(e, r, n) {
    try {
      var t = o(d, e), f = o(a, e), u = c.defined(r), l = c.defined(n);
      if (u || l) {
        var T = l ? i(n, t) : !i(r, t), j = i(r, f);
        return T && j;
      }
      return [t, f].every(c.array) || [t, f].every(c.plainObject) ? !q(t, f) : t !== f;
    } catch {
      return !1;
    }
  }, p = function(e, r, n) {
    if (!c.defined(e))
      return !1;
    try {
      var t = o(d, e), f = o(a, e), u = c.defined(n);
      return i(r, t) && (u ? i(n, f) : !u);
    } catch {
      return !1;
    }
  }, g = function(e, r) {
    return c.defined(e) ? (process.env.NODE_ENV === "development" && console.warn("`changedTo` is deprecated! Replace it with `change`"), s(e, r)) : !1;
  }, b = function(e, r, n) {
    if (!c.defined(e))
      return !1;
    try {
      return m(d, a, { key: e, actual: r, previous: n, type: "decreased" });
    } catch {
      return !1;
    }
  }, _ = function(e) {
    try {
      var r = h(d, a, { key: e }), n = r[0], t = r[1];
      return !!n.length && !t.length;
    } catch {
      return !1;
    }
  }, w = function(e) {
    try {
      var r = h(d, a, { key: e }), n = r[0], t = r[1];
      return !n.length && !!t.length;
    } catch {
      return !1;
    }
  }, E = function(e, r, n) {
    if (!c.defined(e))
      return !1;
    try {
      return m(d, a, { key: e, actual: r, previous: n, type: "increased" });
    } catch {
      return !1;
    }
  }, O = function(e, r) {
    try {
      return v(d, a, { key: e, type: "removed", value: r });
    } catch {
      return !1;
    }
  };
  return { added: y, changed: s, changedFrom: p, changedTo: g, decreased: b, emptied: _, filled: w, increased: E, removed: O };
}
export {
  C as default
};
//# sourceMappingURL=index.js.map
