: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
for (i = 0; i < zOrder.length; i++) {
zOrder[i].getEl().style.zIndex = zIndex;
zOrder[i].zIndex = zIndex;
var modalBlockEl = global$7('#' + ctrl.classPrefix + 'modal-block', ctrl.getContainerElm())[0];
global$7(modalBlockEl).css('z-index', topModal.zIndex - 1);
} else if (modalBlockEl) {
modalBlockEl.parentNode.removeChild(modalBlockEl);
FloatPanel.currentZIndex = zIndex;
var FloatPanel = Panel.extend({
init: function (settings) {
self.classes.add('floatpanel');
bindDocumentClickHandler();
bindWindowResizeHandler();
visiblePanels.push(self);
bindDocumentScrollHandler();
self.on('move', function () {
self.on('postrender show', function (e) {
if (e.control === self) {
var prefix_1 = self.classPrefix;
if (self.modal && !hasModal) {
$modalBlockEl_1 = global$7('#' + prefix_1 + 'modal-block', self.getContainerElm());
if (!$modalBlockEl_1[0]) {
$modalBlockEl_1 = global$7('<div id="' + prefix_1 + 'modal-block" class="' + prefix_1 + 'reset ' + prefix_1 + 'fade"></div>').appendTo(self.getContainerElm());
global$3.setTimeout(function () {
$modalBlockEl_1.addClass(prefix_1 + 'in');
global$7(self.getEl()).addClass(prefix_1 + 'in');
self.on('show', function () {
self.parents().each(function (ctrl) {
if (ctrl.state.get('fixed')) {
self._preBodyHtml = '<div class="' + self.classPrefix + 'arrow"></div>';
self.classes.add('popover').add('bottom').add(self.isRtl() ? 'end' : 'start');
self.aria('label', settings.ariaLabel);
self.aria('labelledby', self._id);
self.aria('describedby', self.describedBy || self._id + '-none');
fixed: function (state) {
if (self.state.get('fixed') !== state) {
if (self.state.get('rendered')) {
var viewport = funcs.getViewPort();
self.layoutRect().y -= viewport.y;
self.layoutRect().y += viewport.y;
self.classes.toggle('fixed', state);
self.state.set('fixed', state);
var state = self._super();
i = visiblePanels.length;
if (visiblePanels[i] === self) {
visiblePanels.push(self);
removeVisiblePanel(this);
if (!self.fire('close').isDefaultPrevented()) {
removeVisiblePanel(this);
postRender: function () {
if (self.settings.bodyRole) {
this.getEl('body').setAttribute('role', self.settings.bodyRole);
FloatPanel.hideAll = function () {
var i = visiblePanels.length;
var panel = visiblePanels[i];
if (panel && panel.settings.autohide) {
visiblePanels.splice(i, 1);
function removeVisiblePanel(panel) {
i = visiblePanels.length;
if (visiblePanels[i] === panel) {
visiblePanels.splice(i, 1);
if (zOrder[i] === panel) {
function toggleFullScreenState(state) {
var noScaleMetaValue = 'width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0';
var viewport = global$7('meta[name=viewport]')[0], contentValue;
if (global$1.overrideViewPort === false) {
viewport = domGlobals.document.createElement('meta');
viewport.setAttribute('name', 'viewport');
domGlobals.document.getElementsByTagName('head')[0].appendChild(viewport);
contentValue = viewport.getAttribute('content');
if (contentValue && typeof oldMetaValue !== 'undefined') {
oldMetaValue = contentValue;
viewport.setAttribute('content', state ? noScaleMetaValue : oldMetaValue);
function toggleBodyFullScreenClasses(classPrefix, state) {
if (checkFullscreenWindows() && state === false) {
domGlobals.document.documentElement,
]).removeClass(classPrefix + 'fullscreen');
function checkFullscreenWindows() {
for (var i = 0; i < windows.length; i++) {
if (windows[i]._fullscreen) {
function handleWindowResize() {
w: domGlobals.window.innerWidth,
h: domGlobals.window.innerHeight
global$3.setInterval(function () {
var w = domGlobals.window.innerWidth, h = domGlobals.window.innerHeight;
if (lastSize_1.w !== w || lastSize_1.h !== h) {
global$7(domGlobals.window).trigger('resize');
var rect = funcs.getWindowSize();
for (i = 0; i < windows.length; i++) {
layoutRect = windows[i].layoutRect();
windows[i].moveTo(windows[i].settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2), windows[i].settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2));
global$7(domGlobals.window).on('resize', reposition);
var Window = FloatPanel.extend({
this.fire('submit', { data: this.toJSON() });
init: function (settings) {
self.classes.add('window');
self.bodyClasses.add('window-body');
self.state.set('fixed', true);
self.statusbar = new Panel({
pack: self.isRtl() ? 'start' : 'end',
defaults: { type: 'button' },
self.statusbar.classes.add('foot');
self.statusbar.parent(self);
self.on('click', function (e) {
var closeClass = self.classPrefix + 'close';
if (funcs.hasClass(e.target, closeClass) || funcs.hasClass(e.target.parentNode, closeClass)) {
self.on('cancel', function () {
self.on('move', function (e) {
if (e.control === self) {
self.aria('describedby', self.describedBy || self._id + '-none');
self.aria('label', settings.title);
self._fullscreen = false;
var statusbar = self.statusbar;
var layoutRect, width, x, needsRecalc;
self.layoutRect(funcs.getWindowSize());
self.layoutRect().contentH = self.layoutRect().innerH;
layoutRect = self.layoutRect();
if (self.settings.title && !self._fullscreen) {
width = layoutRect.headerW;
if (width > layoutRect.w) {
x = layoutRect.x - Math.max(0, width / 2);
statusbar.layoutRect({ w: self.layoutRect().innerW }).recalc();
width = statusbar.layoutRect().minW + layoutRect.deltaW;
if (width > layoutRect.w) {
x = layoutRect.x - Math.max(0, width - layoutRect.w);
initLayoutRect: function () {
var layoutRect = self._super();
if (self.settings.title && !self._fullscreen) {
headEl = self.getEl('head');
var size = funcs.getSize(headEl);
layoutRect.headerW = size.width;
layoutRect.headerH = size.height;
deltaH += layoutRect.headerH;
deltaH += self.statusbar.layoutRect().h;
layoutRect.deltaH += deltaH;
layoutRect.minH += deltaH;
var rect = funcs.getWindowSize();
layoutRect.x = self.settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2);
layoutRect.y = self.settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2);
renderHtml: function () {
var self = this, layout = self._layout, id = self._id, prefix = self.classPrefix;
var settings = self.settings;
var headerHtml = '', footerHtml = '', html = settings.html;
headerHtml = '<div id="' + id + '-head" class="' + prefix + 'window-head">' + '<div id="' + id + '-title" class="' + prefix + 'title">' + self.encode(settings.title) + '</div>' + '<div id="' + id + '-dragh" class="' + prefix + 'dragh"></div>' + '<button type="button" class="' + prefix + 'close" aria-hidden="true">' + '<i class="mce-ico mce-i-remove"></i>' + '</button>' + '</div>';
html = '<iframe src="' + settings.url + '" tabindex="-1"></iframe>';
if (typeof html === 'undefined') {
html = layout.renderHtml(self);
footerHtml = self.statusbar.renderHtml();
return '<div id="' + id + '" class="' + self.classes + '" hidefocus="1">' + '<div class="' + self.classPrefix + 'reset" role="application">' + headerHtml + '<div id="' + id + '-body" class="' + self.bodyClasses + '">' + html + '</div>' + footerHtml + '</div>' + '</div>';
fullscreen: function (state) {
var documentElement = domGlobals.document.documentElement;
var prefix = self.classPrefix;
if (state !== self._fullscreen) {
global$7(domGlobals.window).on('resize', function () {
time = new Date().getTime();
var rect = funcs.getWindowSize();
self.moveTo(0, 0).resizeTo(rect.w, rect.h);
if (new Date().getTime() - time > 50) {
self._timer = global$3.setTimeout(function () {
var rect = funcs.getWindowSize();
self.moveTo(0, 0).resizeTo(rect.w, rect.h);
layoutRect = self.layoutRect();
self._fullscreen = state;
self.borderBox = BoxUtils.parseBox(self.settings.border);
self.getEl('head').style.display = '';
layoutRect.deltaH += layoutRect.headerH;
]).removeClass(prefix + 'fullscreen');
self.classes.remove('fullscreen');
self.moveTo(self._initial.x, self._initial.y).resizeTo(self._initial.w, self._initial.h);
self.borderBox = BoxUtils.parseBox('0');
self.getEl('head').style.display = 'none';
layoutRect.deltaH -= layoutRect.headerH + 2;
]).addClass(prefix + 'fullscreen');
self.classes.add('fullscreen');
var rect = funcs.getWindowSize();
self.moveTo(0, 0).resizeTo(rect.w, rect.h);
postRender: function () {
self.statusbar.postRender();
this.dragHelper = new DragHelper(self._id + '-dragh', {
self.moveTo(startPos.x + e.deltaX, startPos.y + e.deltaY);
self.on('submit', function (e) {
if (!e.isDefaultPrevented()) {
toggleFullScreenState(true);
return this.fire('submit', { data: this.toJSON() });
self.dragHelper.destroy();
toggleBodyFullScreenClasses(self.classPrefix, false);
if (windows[i] === self) {
toggleFullScreenState(windows.length > 0);
getContentWindow: function () {
var ifr = this.getEl().getElementsByTagName('iframe')[0];
return ifr ? ifr.contentWindow : null;
var MessageBox = Window.extend({
init: function (settings) {