"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.compareFilters = compareFilters;
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
function compareFilters(filters, filters1, filters2) {
  const keys = Array.from(new Set([...Object.keys(filters1), ...Object.keys(filters2)])).filter(key => !!filters[key]);
  return keys.every(key => {
    const value1 = filters1[key];
    const value2 = filters2[key];
    if (value1 === undefined && value2 === undefined) {
      return true;
    }
    if (value1 === undefined || value2 === undefined) {
      return false;
    }
    const filter = filters[key];
    const equals = (filter == null ? void 0 : filter.equals) ?? _isEqual.default;
    return equals(value1, value2);
  });
}
//# sourceMappingURL=compareFilters.js.map