Liferay.Loader.define("app-builder-web@1.0.73/js/utils/utils.es", ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.getValidName = exports.isEqualObjects = exports.concatValues = void 0;

    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.
     */
    var concatValues = function concatValues(values) {
      return values.join(', ').replace(/, ([^,]*)$/, " ".concat(Liferay.Language.get('and').toLowerCase(), " $1"));
    };

    exports.concatValues = concatValues;

    var isEqualObjects = function isEqualObjects() {
      var firstObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var secondObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

      if (_typeof(firstObj) !== 'object' || _typeof(secondObj) !== 'object') {
        return false;
      }

      return JSON.stringify(firstObj) === JSON.stringify(secondObj);
    };

    exports.isEqualObjects = isEqualObjects;

    var getValidName = function getValidName(defaultName, name) {
      return name && name.toLowerCase() !== 'null' ? name : defaultName;
    };

    exports.getValidName = getValidName;
    //# sourceMappingURL=utils.es.js.map
  }
});
//# sourceMappingURL=utils.es.js.map