Liferay.Loader.define("layout-content-page-editor-web@2.0.157/page_editor/app/utils/checkDeepEqual", ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.deepEqual = deepEqual;

    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */

    /**
     * Returns true if a and b are deeply equal
     * @param a
     * @param b
     * @returns {boolean}
     */
    function deepEqual(a, b) {
      if (a === b) {
        return true;
      }

      if (Array.isArray(a) && Array.isArray(b)) {
        if (a.length !== b.length) {
          return false;
        }

        return a.every(function (value, index) {
          return deepEqual(value, b[index]);
        });
      }

      if (a && b && _typeof(a) === 'object' && _typeof(b) === 'object') {
        var keys = Object.keys(a);

        if (keys.length !== Object.keys(b).length) {
          return false;
        }

        return keys.every(function (key) {
          return deepEqual(a[key], b[key]);
        });
      }

      return false;
    }
    //# sourceMappingURL=checkDeepEqual.js.map
  }
});
//# sourceMappingURL=checkDeepEqual.js.map