Liferay.Loader.define("dynamic-data-mapping-form-field-type$liferay-ckeditor@4.16.2-liferay.1/ckeditor/plugins/maximize/plugin", ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    /*
    Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
    For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
    */
    (function () {
      function n(a) {
        if (!a || a.type != CKEDITOR.NODE_ELEMENT || "form" != a.getName()) return [];for (var d = [], f = ["style", "className"], e = 0; e < f.length; e++) {
          var b = a.$.elements.namedItem(f[e]);b && (b = new CKEDITOR.dom.element(b), d.push([b, b.nextSibling]), b.remove());
        }return d;
      }function t(a, d) {
        if (a && a.type == CKEDITOR.NODE_ELEMENT && "form" == a.getName() && 0 < d.length) for (var f = d.length - 1; 0 <= f; f--) {
          var e = d[f][0],
              b = d[f][1];b ? e.insertBefore(b) : e.appendTo(a);
        }
      }function r(a, d) {
        var f = n(a),
            e = {},
            b = a.$;d || (e["class"] = b.className || "", b.className = "");e.inline = b.style.cssText || "";d || (b.style.cssText = "position: static; overflow: visible");t(f);return e;
      }function u(a, d) {
        var f = n(a),
            e = a.$;"class" in d && (e.className = d["class"]);"inline" in d && (e.style.cssText = d.inline);t(f);
      }function v(a) {
        !a.editable().isInline() && a.editable().hasFocus && (a.toolbox.focus(), a.focus());
      }CKEDITOR.plugins.add("maximize", { lang: "af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn",
        icons: "maximize", hidpi: !0, init: function (a) {
          function d() {
            var d = b.getViewPaneSize();a.resize(d.width, d.height, null, !0);
          }if (a.elementMode != CKEDITOR.ELEMENT_MODE_INLINE) {
            var f = a.lang,
                e = CKEDITOR.document,
                b = e.getWindow(),
                l,
                m,
                p,
                n = CKEDITOR.TRISTATE_OFF;a.addCommand("maximize", { modes: { wysiwyg: !CKEDITOR.env.iOS, source: !CKEDITOR.env.iOS }, readOnly: 1, editorFocus: !1, exec: function () {
                var h = a.container.getFirst(function (a) {
                  return a.type == CKEDITOR.NODE_ELEMENT && a.hasClass("cke_inner");
                }),
                    g = a.ui.space("contents");if ("wysiwyg" == a.mode) {
                  var c = a.getSelection();l = c && c.getRanges();m = b.getScrollPosition();
                } else {
                  var k = a.editable().$;l = !CKEDITOR.env.ie && [k.selectionStart, k.selectionEnd];m = [k.scrollLeft, k.scrollTop];
                }if (this.state == CKEDITOR.TRISTATE_OFF) {
                  b.on("resize", d);p = b.getScrollPosition();for (c = a.container; c = c.getParent();) c.setCustomData("maximize_saved_styles", r(c)), c.setStyle("z-index", a.config.baseFloatZIndex - 5);g.setCustomData("maximize_saved_styles", r(g, !0));h.setCustomData("maximize_saved_styles", r(h, !0));g = { overflow: CKEDITOR.env.webkit ? "" : "hidden", width: 0, height: 0 };e.getDocumentElement().setStyles(g);!CKEDITOR.env.gecko && e.getDocumentElement().setStyle("position", "fixed");CKEDITOR.env.gecko && CKEDITOR.env.quirks || e.getBody().setStyles(g);CKEDITOR.env.ie ? setTimeout(function () {
                    b.$.scrollTo(0, 0);
                  }, 0) : b.$.scrollTo(0, 0);h.setStyle("position", CKEDITOR.env.gecko && CKEDITOR.env.quirks ? "fixed" : "absolute");h.$.offsetLeft;h.setStyles({ "z-index": a.config.baseFloatZIndex - 5, left: "0px", top: "0px" });h.addClass("cke_maximized");d();g = h.getDocumentPosition();
                  h.setStyles({ left: -1 * g.x + "px", top: -1 * g.y + "px" });CKEDITOR.env.gecko && v(a);
                } else if (this.state == CKEDITOR.TRISTATE_ON) {
                  b.removeListener("resize", d);for (var c = [g, h], q = 0; q < c.length; q++) u(c[q], c[q].getCustomData("maximize_saved_styles")), c[q].removeCustomData("maximize_saved_styles");for (c = a.container; c = c.getParent();) u(c, c.getCustomData("maximize_saved_styles")), c.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie ? setTimeout(function () {
                    b.$.scrollTo(p.x, p.y);
                  }, 0) : b.$.scrollTo(p.x, p.y);h.removeClass("cke_maximized");
                  CKEDITOR.env.webkit && (h.setStyle("display", "inline"), setTimeout(function () {
                    h.setStyle("display", "block");
                  }, 0));a.fire("resize", { outerHeight: a.container.$.offsetHeight, contentsHeight: g.$.offsetHeight, outerWidth: a.container.$.offsetWidth });
                }this.toggleState();if (c = this.uiItems[0]) g = this.state == CKEDITOR.TRISTATE_OFF ? f.maximize.maximize : f.maximize.minimize, c = CKEDITOR.document.getById(c._.id), c.getChild(1).setHtml(g), c.setAttribute("title", g), c.setAttribute("href", 'javascript:void("' + g + '");');"wysiwyg" == a.mode ? l ? (CKEDITOR.env.gecko && v(a), a.getSelection().selectRanges(l), (k = a.getSelection().getStartElement()) && k.scrollIntoView(!0)) : b.$.scrollTo(m.x, m.y) : (l && (k.selectionStart = l[0], k.selectionEnd = l[1]), k.scrollLeft = m[0], k.scrollTop = m[1]);l = m = null;n = this.state;a.fire("maximize", this.state);
              }, canUndo: !1 });a.ui.addButton && a.ui.addButton("Maximize", { label: f.maximize.maximize, command: "maximize", toolbar: "tools,10" });a.on("mode", function () {
              var b = a.getCommand("maximize");b.setState(b.state == CKEDITOR.TRISTATE_DISABLED ? CKEDITOR.TRISTATE_DISABLED : n);
            }, null, null, 100);
          }
        } });
    })();
  }
});
//# sourceMappingURL=plugin.js.map