Liferay.Loader.define("frontend-editor-ckeditor-web@4.0.36/editor/Editor", ['module', 'exports', 'require', 'frontend-editor-ckeditor-web$ckeditor4-react', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    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);
    }

    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Editor = void 0;

    var _ckeditor4React = _interopRequireDefault(require("frontend-editor-ckeditor-web$ckeditor4-react"));

    var _react = _interopRequireWildcard(require("frontend-js-react-web$react"));

    function _getRequireWildcardCache() {
      if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {
        return cache;
      };return cache;
    }

    function _interopRequireWildcard(obj) {
      if (obj && obj.__esModule) {
        return obj;
      }if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
        return { default: obj };
      }var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {
        return cache.get(obj);
      }var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, key)) {
          var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {
            Object.defineProperty(newObj, key, desc);
          } else {
            newObj[key] = obj[key];
          }
        }
      }newObj.default = obj;if (cache) {
        cache.set(obj, newObj);
      }return newObj;
    }

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    function _extends() {
      _extends = Object.assign || function (target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
              target[key] = source[key];
            }
          }
        }return target;
      };return _extends.apply(this, arguments);
    }

    var BASEPATH = '/o/frontend-editor-ckeditor-web/ckeditor/';

    var Editor = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
      (0, _react.useEffect)(function () {
        Liferay.once('beforeScreenFlip', function () {
          if (window.CKEDITOR && Object.keys(window.CKEDITOR.instances).length === 0) {
            delete window.CKEDITOR;
          }
        });
      }, []);
      return (/*#__PURE__*/_react.default.createElement(_ckeditor4React.default, _extends({
          ref: ref
        }, props))
      );
    });

    exports.Editor = Editor;
    _ckeditor4React.default.editorUrl = "".concat(BASEPATH, "ckeditor.js");
    window.CKEDITOR_BASEPATH = BASEPATH;
    //# sourceMappingURL=Editor.js.map
  }
});
//# sourceMappingURL=Editor.js.map