// source --> https://brunsham.nl/wp-content/plugins/cookie-law-info/legacy/public/js/cookie-law-info-public.js?ver=3.4.0 
CLI_ACCEPT_COOKIE_NAME = (typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy');
CLI_PREFERENCE_COOKIE = (typeof CLI_PREFERENCE_COOKIE !== 'undefined' ? CLI_PREFERENCE_COOKIE : 'CookieLawInfoConsent');
CLI_ACCEPT_COOKIE_EXPIRE = (typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365);
CLI_COOKIEBAR_AS_POPUP = (typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false);
var CLI_Cookie = {
	set: function (name, value, days) {
		var secure = "";
		if (true === Boolean(Cli_Data.secure_cookies)) {
			secure = ";secure";
		}
		if (days) {
			var date = new Date();
			date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
			var expires = "; expires=" + date.toGMTString();
		} else {
			var expires = "";
		}
		document.cookie = name + "=" + value + secure + expires + "; path=/";
		if (days < 1) {
			host_name = window.location.hostname;
			document.cookie = name + "=" + value + expires + "; path=/; domain=." + host_name + ";";
			if (host_name.indexOf("www") != 1) {
				var host_name_withoutwww = host_name.replace('www', '');
				document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name_withoutwww + ";";
			}
			host_name = host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".") - 1));
			document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name + ";";
		}
	},
	read: function (name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for (var i = 0; i < ca.length; i++) {
			var c = ca[i];
			while (c.charAt(0) == ' ') {
				c = c.substring(1, c.length);
			}
			if (c.indexOf(nameEQ) === 0) {
				return c.substring(nameEQ.length, c.length);
			}
		}
		return null;
	},
	erase: function (name) {
		this.set(name, "", -10);
	},
	exists: function (name) {
		return (this.read(name) !== null);
	},
	getallcookies: function () {
		var pairs = document.cookie.split(";");
		var cookieslist = {};
		for (var i = 0; i < pairs.length; i++) {
			var pair = pairs[i].split("=");
			cookieslist[(pair[0] + '').trim()] = unescape(pair[1]);
		}
		return cookieslist;
	}
}
var CLI =
{
	bar_config: {},
	showagain_config: {},
	allowedCategories: [],
	js_blocking_enabled: false,
	set: function (args) {
		if (typeof JSON.parse !== "function") {
			console.log("CookieLawInfo requires JSON.parse but your browser doesn't support it");
			return;
		}
		if (typeof args.settings !== 'object') {
			this.settings = JSON.parse(args.settings);
		} else {
			this.settings = args.settings;
		}
		this.js_blocking_enabled = Boolean(Cli_Data.js_blocking);
		this.settings = args.settings;
		this.bar_elm = jQuery(this.settings.notify_div_id);
		this.showagain_elm = jQuery(this.settings.showagain_div_id);
		this.settingsModal = jQuery('#cliSettingsPopup');

		/* buttons */
		this.main_button = jQuery('.cli-plugin-main-button');
		this.main_link = jQuery('.cli-plugin-main-link');
		this.reject_link = jQuery('.cookie_action_close_header_reject');
		this.delete_link = jQuery(".cookielawinfo-cookie-delete");
		this.settings_button = jQuery('.cli_settings_button');
		this.accept_all_button = jQuery('.wt-cli-accept-all-btn');
		if (this.settings.cookie_bar_as == 'popup') {
			CLI_COOKIEBAR_AS_POPUP = true;
		}
		this.mayBeSetPreferenceCookie();
		this.addStyleAttribute();
		this.configBar();
		this.toggleBar();
		this.attachDelete();
		this.attachEvents();
		this.configButtons();
		this.reviewConsent();
		var cli_hidebar_on_readmore = this.hideBarInReadMoreLink();
		if (Boolean(this.settings.scroll_close) === true && cli_hidebar_on_readmore === false) {
			window.addEventListener("scroll", CLI.closeOnScroll, false);
		}

	},
	hideBarInReadMoreLink: function () {
		if (Boolean(CLI.settings.button_2_hidebar) === true && this.main_link.length > 0 && this.main_link.hasClass('cli-minimize-bar')) {
			this.hideHeader();
			cliBlocker.cookieBar(false);
			this.showagain_elm.slideDown(this.settings.animate_speed_show);
			return true;
		}
		return false;
	},
	attachEvents: function () {
		jQuery(document).on(
			'click',
			'.wt-cli-privacy-btn',
			function (e) {
				e.preventDefault();
				CLI.accept_close();
				CLI.settingsPopUpClose();
			}
		);

		jQuery('.wt-cli-accept-btn').on(
			"click",
			function (e) {
				e.preventDefault();
				CLI.acceptRejectCookies(jQuery(this));
			});
		jQuery('.wt-cli-accept-all-btn').on(
			"click",
			function (e) {
				e.preventDefault();
				CLI.acceptRejectCookies(jQuery(this), 'accept');
			});
		jQuery('.wt-cli-reject-btn').on(
			"click",
			function (e) {
				e.preventDefault();
				CLI.acceptRejectCookies(jQuery(this), 'reject');
			});
		this.settingsPopUp();
		this.settingsTabbedAccordion();
		this.toggleUserPreferenceCheckBox();
		this.hideCookieBarOnClose();
		this.cookieLawInfoRunCallBacks();

	},
	acceptRejectCookies(element, action = 'custom') {
		var open_link = element[0].hasAttribute("href") && element.attr("href") != '#' ? true : false;
		var new_window = false;
		if (action == 'accept') {
			this.enableAllCookies();
			this.accept_close();
			new_window = CLI.settings.button_7_new_win ? true : false;

		} else if (action == 'reject') {
			this.disableAllCookies();
			this.reject_close();
			new_window = Boolean(this.settings.button_3_new_win) ? true : false;
		} else {
			this.accept_close();
			new_window = Boolean(this.settings.button_1_new_win) ? true : false;
		}
		if (open_link) {
			if (new_window) {
				window.open(element.attr("href"), '_blank');
			} else {
				window.location.href = element.attr("href");
			}
		}
	},
	toggleUserPreferenceCheckBox: function () {

		jQuery('.cli-user-preference-checkbox').each(
			function () {

				categoryCookie = 'cookielawinfo-' + jQuery(this).attr('data-id');
				categoryCookieValue = CLI_Cookie.read(categoryCookie);
				if (categoryCookieValue == null) {
					if (jQuery(this).is(':checked')) {
						CLI_Cookie.set(categoryCookie, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
					} else {
						CLI_Cookie.set(categoryCookie, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
					}
				} else {
					if (categoryCookieValue == "yes") {
						jQuery(this).prop("checked", true);
					} else {
						jQuery(this).prop("checked", false);
					}

				}

			}
		);
		jQuery('.cli-user-preference-checkbox').on(
			"click",
			function (e) {
				var dataID = jQuery(this).attr('data-id');
				var currentToggleElm = jQuery('.cli-user-preference-checkbox[data-id=' + dataID + ']');
				if (jQuery(this).is(':checked')) {
					CLI_Cookie.set('cookielawinfo-' + dataID, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
					currentToggleElm.prop('checked', true);
				} else {
					CLI_Cookie.set('cookielawinfo-' + dataID, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
					currentToggleElm.prop('checked', false);
				}
				CLI.checkCategories();
				CLI.generateConsent();
			}
		);

	},
	settingsPopUp: function () {
		jQuery(document).on(
			'click',
			'.cli_settings_button',
			function (e) {
				e.preventDefault();
				CLI.settingsModal.addClass("cli-show").css({ 'opacity': 0 }).animate({ 'opacity': 1 });
				CLI.settingsModal.removeClass('cli-blowup cli-out').addClass("cli-blowup");
				jQuery('body').addClass("cli-modal-open");
				jQuery(".cli-settings-overlay").addClass("cli-show");
				jQuery("#cookie-law-info-bar").css({ 'opacity': .1 });
				if (!jQuery('.cli-settings-mobile').is(':visible')) {
					CLI.settingsModal.find('.cli-nav-link:eq(0)').trigger("click");
				}
			}
		);
		jQuery('#cliModalClose').on(
			"click",
			function (e) {
				CLI.settingsPopUpClose();
			}
		);
		CLI.settingsModal.on(
			"click",
			function (e) {
				if (!(document.getElementsByClassName('cli-modal-dialog')[0].contains(e.target))) {
					CLI.settingsPopUpClose();
				}
			}
		);
		jQuery('.cli_enable_all_btn').on(
			"click",
			function (e) {
				var cli_toggle_btn = jQuery(this);
				var enable_text = cli_toggle_btn.attr('data-enable-text');
				var disable_text = cli_toggle_btn.attr('data-disable-text');
				if (cli_toggle_btn.hasClass('cli-enabled')) {
					CLI.disableAllCookies();
					cli_toggle_btn.html(enable_text);
				} else {
					CLI.enableAllCookies();
					cli_toggle_btn.html(disable_text);

				}
				jQuery(this).toggleClass('cli-enabled');
			}
		);

		this.privacyReadmore();
	},
	settingsTabbedAccordion: function () {
		jQuery(".cli-tab-header").on(
			"click",
			function (e) {
				if (!(jQuery(e.target).hasClass('cli-slider') || jQuery(e.target).hasClass('cli-user-preference-checkbox'))) {
					if (jQuery(this).hasClass("cli-tab-active")) {
						jQuery(this).removeClass("cli-tab-active");
						jQuery(this)
							.siblings(".cli-tab-content")
							.slideUp(200);

					} else {
						jQuery(".cli-tab-header").removeClass("cli-tab-active");
						jQuery(this).addClass("cli-tab-active");
						jQuery(".cli-tab-content").slideUp(200);
						jQuery(this)
							.siblings(".cli-tab-content")
							.slideDown(200);
					}
				}
			}
		);
	},
	settingsPopUpClose: function () {
		this.settingsModal.removeClass('cli-show');
		this.settingsModal.addClass('cli-out');
		jQuery('body').removeClass("cli-modal-open");
		jQuery(".cli-settings-overlay").removeClass("cli-show");
		jQuery("#cookie-law-info-bar").css({ 'opacity': 1 });
	},
	privacyReadmore: function () {
		var el = jQuery('.cli-privacy-content .cli-privacy-content-text');
		if (el.length > 0) {
			var clone = el.clone(),
				originalHtml = clone.html(),
				originalHeight = el.outerHeight(),
				Trunc = {
					addReadmore: function (textBlock) {
						if (textBlock.html().length > 250) {
							jQuery('.cli-privacy-readmore').show();
						} else {
							jQuery('.cli-privacy-readmore').hide();
						}
					},
					truncateText: function (textBlock) {
						var strippedText = jQuery('<div />').html(textBlock.html());
						strippedText.find('table').remove();
						textBlock.html(strippedText.html());
						currentText = textBlock.text();
						if (currentText.trim().length > 250) {
							var newStr = currentText.substring(0, 250);
							textBlock.empty().html(newStr).append('...');
						}
					},
					replaceText: function (textBlock, original) {
						return textBlock.html(original);
					}

				};
			Trunc.addReadmore(el);
			Trunc.truncateText(el);
			jQuery('a.cli-privacy-readmore').on(
				"click",
				function (e) {
					e.preventDefault();
					if (jQuery('.cli-privacy-overview').hasClass('cli-collapsed')) {
						Trunc.truncateText(el);
						jQuery('.cli-privacy-overview').removeClass('cli-collapsed');
						el.css('height', '100%');
					} else {
						jQuery('.cli-privacy-overview').addClass('cli-collapsed');
						Trunc.replaceText(el, originalHtml);
					}

				}
			);
		}

	},
	attachDelete: function () {
		this.delete_link.on(
			"click",
			function (e) {
				CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME);
				for (var k in Cli_Data.nn_cookie_ids) {
					CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
				}
				CLI.generateConsent();
				return false;
			}
		);

	},
	configButtons: function () {
		/*[cookie_button] */
		this.main_button.css('color', this.settings.button_1_link_colour);
		if (Boolean(this.settings.button_1_as_button)) {
			this.main_button.css('background-color', this.settings.button_1_button_colour);

			this.main_button.on(
				'mouseenter',
				function () {
					jQuery(this).css('background-color', CLI.settings.button_1_button_hover);
				}
			)
				.on(
					'mouseleave',
					function () {
						jQuery(this).css('background-color', CLI.settings.button_1_button_colour);
					}
				);
		}

		/* [cookie_link] */
		this.main_link.css('color', this.settings.button_2_link_colour);
		if (Boolean(this.settings.button_2_as_button)) {
			this.main_link.css('background-color', this.settings.button_2_button_colour);

			this.main_link.on(
				'mouseenter',
				function () {
					jQuery(this).css('background-color', CLI.settings.button_2_button_hover);
				}
			)
				.on(
					'mouseleave',
					function () {
						jQuery(this).css('background-color', CLI.settings.button_2_button_colour);
					}
				);

		}
		/* [cookie_reject] */
		this.reject_link.css('color', this.settings.button_3_link_colour);
		if (Boolean(this.settings.button_3_as_button)) {

			this.reject_link.css('background-color', this.settings.button_3_button_colour);
			this.reject_link.on(
				'mouseenter',
				function () {
					jQuery(this).css('background-color', CLI.settings.button_3_button_hover);
				}
			)
				.on(
					'mouseleave',
					function () {
						jQuery(this).css('background-color', CLI.settings.button_3_button_colour);
					}
				);
		}
		/* [cookie_settings] */
		this.settings_button.css('color', this.settings.button_4_link_colour);
		if (Boolean(this.settings.button_4_as_button)) {
			this.settings_button.css('background-color', this.settings.button_4_button_colour);
			this.settings_button.on(
				'mouseenter',
				function () {
					jQuery(this).css('background-color', CLI.settings.button_4_button_hover);
				}
			)
				.on(
					'mouseleave',
					function () {
						jQuery(this).css('background-color', CLI.settings.button_4_button_colour);
					}
				);
		}
		/* [cookie_accept_all] */
		this.accept_all_button.css('color', this.settings.button_7_link_colour);
		if (this.settings.button_7_as_button) {
			this.accept_all_button.css('background-color', this.settings.button_7_button_colour);
			this.accept_all_button.on(
				'mouseenter',
				function () {
					jQuery(this).css('background-color', CLI.settings.button_7_button_hover);
				}
			)
				.on(
					'mouseleave',
					function () {
						jQuery(this).css('background-color', CLI.settings.button_7_button_colour);
					}
				);
		}
	},
	toggleBar: function () {
		if (CLI_COOKIEBAR_AS_POPUP) {
			this.barAsPopUp(1);
		}
		if (CLI.settings.cookie_bar_as == 'widget') {
			this.barAsWidget(1);
		}
		if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
			this.displayHeader();
		} else {
			this.hideHeader();
		}
		if (Boolean(this.settings.show_once_yn)) {
			setTimeout(
				function () {
					CLI.close_header();
				},
				CLI.settings.show_once
			);
		}
		if (CLI.js_blocking_enabled === false) {
			if (Boolean(Cli_Data.ccpaEnabled) === true) {
				if (Cli_Data.ccpaType === 'ccpa' && Boolean(Cli_Data.ccpaBarEnabled) === false) {
					cliBlocker.cookieBar(false);
				}
			} else {
				jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove();
			}
		}

		this.showagain_elm.on(
			"click",
			function (e) {
				e.preventDefault();
				CLI.showagain_elm.slideUp(
					CLI.settings.animate_speed_hide,
					function () {
						CLI.bar_elm.slideDown(CLI.settings.animate_speed_show);
						if (CLI_COOKIEBAR_AS_POPUP) {
							CLI.showPopupOverlay();
						}
					}
				);
			}
		);
	},
	configShowAgain: function () {
		this.showagain_config = {
			'background-color': this.settings.background,
			'color': this.l1hs(this.settings.text),
			'position': 'fixed',
			'font-family': this.settings.font_family
		};
		if (Boolean(this.settings.border_on)) {
			var border_to_hide = 'border-' + this.settings.notify_position_vertical;
			this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border);
			this.showagain_config[border_to_hide] = 'none';
		}
		var cli_win = jQuery(window);
		var cli_winw = cli_win.width();
		var showagain_x_pos = this.settings.showagain_x_position;
		if (cli_winw < 300) {
			showagain_x_pos = 10;
			this.showagain_config.width = cli_winw - 20;
		} else {
			this.showagain_config.width = 'auto';
		}
		var cli_defw = cli_winw > 400 ? 500 : cli_winw - 20;
		if (CLI_COOKIEBAR_AS_POPUP) { /* cookie bar as popup */
			var sa_pos = this.settings.popup_showagain_position;
			var sa_pos_arr = sa_pos.split('-');
			if (sa_pos_arr[1] == 'left') {
				this.showagain_config.left = showagain_x_pos;
			} else if (sa_pos_arr[1] == 'right') {
				this.showagain_config.right = showagain_x_pos;
			}
			if (sa_pos_arr[0] == 'top') {
				this.showagain_config.top = 0;

			} else if (sa_pos_arr[0] == 'bottom') {
				this.showagain_config.bottom = 0;
			}
			this.bar_config['position'] = 'fixed';

		} else if (this.settings.cookie_bar_as == 'widget') {
			this.showagain_config.bottom = 0;
			if (this.settings.widget_position == 'left') {
				this.showagain_config.left = showagain_x_pos;
			} else if (this.settings.widget_position == 'right') {
				this.showagain_config.right = showagain_x_pos;
			}
		} else {
			if (this.settings.notify_position_vertical == "top") {
				this.showagain_config.top = '0';
			} else if (this.settings.notify_position_vertical == "bottom") {
				this.bar_config['position'] = 'fixed';
				this.bar_config['bottom'] = '0';
				this.showagain_config.bottom = '0';
			}
			if (this.settings.notify_position_horizontal == "left") {
				this.showagain_config.left = showagain_x_pos;
			} else if (this.settings.notify_position_horizontal == "right") {
				this.showagain_config.right = showagain_x_pos;
			}
		}
		this.showagain_elm.css(this.showagain_config);
	},
	configBar: function () {
		this.bar_config = {
			'background-color': this.settings.background,
			'color': this.settings.text,
			'font-family': this.settings.font_family
		};
		if (this.settings.notify_position_vertical == "top") {
			this.bar_config['top'] = '0';
			if (Boolean(this.settings.header_fix) === true) {
				this.bar_config['position'] = 'fixed';
			}
		} else {
			this.bar_config['bottom'] = '0';
		}
		this.configShowAgain();
		this.bar_elm.css(this.bar_config).hide();
	},
	l1hs: function (str) {
		if (str.charAt(0) == "#") {
			str = str.substring(1, str.length);
		} else {
			return "#" + str;
		}
		return this.l1hs(str);
	},
	close_header: function () {
		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
		this.hideHeader();
	},
	accept_close: function () {
		this.hidePopupOverlay();
		this.generateConsent();
		this.cookieLawInfoRunCallBacks();

		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
		if (Boolean(this.settings.notify_animate_hide)) {
			if (CLI.js_blocking_enabled === true) {
				this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
			} else {
				this.bar_elm.slideUp(this.settings.animate_speed_hide);
			}

		} else {
			if (CLI.js_blocking_enabled === true) {
				this.bar_elm.hide(0, cliBlocker.runScripts);

			} else {
				this.bar_elm.hide();
			}
		}
		if (Boolean(this.settings.showagain_tab)) {
			this.showagain_elm.slideDown(this.settings.animate_speed_show);
		}
		if (Boolean(this.settings.accept_close_reload) === true) {
			this.reload_current_page();
		}
		return false;
	},
	reject_close: function () {
		this.hidePopupOverlay();
		this.generateConsent();
		this.cookieLawInfoRunCallBacks();
		for (var k in Cli_Data.nn_cookie_ids) {
			CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
		}
		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'no', CLI_ACCEPT_COOKIE_EXPIRE);

		if (Boolean(this.settings.notify_animate_hide)) {
			if (CLI.js_blocking_enabled === true) {

				this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);

			} else {

				this.bar_elm.slideUp(this.settings.animate_speed_hide);
			}

		} else {
			if (CLI.js_blocking_enabled === true) {

				this.bar_elm.hide(cliBlocker.runScripts);

			} else {

				this.bar_elm.hide();

			}

		}
		if (Boolean(this.settings.showagain_tab)) {
			this.showagain_elm.slideDown(this.settings.animate_speed_show);
		}
		if (Boolean(this.settings.reject_close_reload) === true) {
			this.reload_current_page();
		}
		return false;
	},
	reload_current_page: function () {

		window.location.reload(true);
	},
	closeOnScroll: function () {
		if (window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) {
			CLI.accept_close();
			if (Boolean(CLI.settings.scroll_close_reload) === true) {
				window.location.reload();
			}
			window.removeEventListener("scroll", CLI.closeOnScroll, false);
		}
	},
	displayHeader: function () {
		if (Boolean(this.settings.notify_animate_show)) {
			this.bar_elm.slideDown(this.settings.animate_speed_show);
		} else {
			this.bar_elm.show();
		}
		this.showagain_elm.hide();
		if (CLI_COOKIEBAR_AS_POPUP) {
			this.showPopupOverlay();
		}
	},
	hideHeader: function () {
		if (Boolean(this.settings.showagain_tab)) {
			if (Boolean(this.settings.notify_animate_show)) {
				this.showagain_elm.slideDown(this.settings.animate_speed_show);
			} else {
				this.showagain_elm.show();
			}
		} else {
			this.showagain_elm.hide();
		}
		this.bar_elm.slideUp(this.settings.animate_speed_show);
		this.hidePopupOverlay();
	},
	hidePopupOverlay: function () {
		jQuery('body').removeClass("cli-barmodal-open");
		jQuery(".cli-popupbar-overlay").removeClass("cli-show");
	},
	showPopupOverlay: function () {
		if (this.bar_elm.length) {
			if (Boolean(this.settings.popup_overlay)) {
				jQuery('body').addClass("cli-barmodal-open");
				jQuery(".cli-popupbar-overlay").addClass("cli-show");
			}
		}

	},
	barAsWidget: function (a) {
		var cli_elm = this.bar_elm;
		cli_elm.attr('data-cli-type', 'widget');
		var cli_win = jQuery(window);
		var cli_winh = cli_win.height() - 40;
		var cli_winw = cli_win.width();
		var cli_defw = cli_winw > 400 ? 300 : cli_winw - 30;
		cli_elm.css(
			{
				'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'overflow': 'auto', 'position': 'fixed', 'box-sizing': 'border-box'
			}
		);
		if (this.checkifStyleAttributeExist() === false) {
			cli_elm.css({ 'padding': '25px 15px' });
		}
		if (this.settings.widget_position == 'left') {
			cli_elm.css(
				{
					'left': '15px', 'right': 'auto', 'bottom': '15px', 'top': 'auto'
				}
			);
		} else {
			cli_elm.css(
				{
					'left': 'auto', 'right': '15px', 'bottom': '15px', 'top': 'auto'
				}
			);
		}
		if (a) {
			this.setResize();
		}
	},
	barAsPopUp: function (a) {
		if (typeof cookie_law_info_bar_as_popup === 'function') {
			return false;
		}
		var cli_elm = this.bar_elm;
		cli_elm.attr('data-cli-type', 'popup');
		var cli_win = jQuery(window);
		var cli_winh = cli_win.height() - 40;
		var cli_winw = cli_win.width();
		var cli_defw = cli_winw > 700 ? 500 : cli_winw - 20;

		cli_elm.css(
			{
				'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'bottom': '', 'top': '50%', 'left': '50%', 'margin-left': (cli_defw / 2) * -1, 'margin-top': '-100px', 'overflow': 'auto'
			}
		).addClass('cli-bar-popup cli-modal-content');
		if (this.checkifStyleAttributeExist() === false) {
			cli_elm.css({ 'padding': '25px 15px' });
		}
		cli_h = cli_elm.height();
		li_h = cli_h < 200 ? 200 : cli_h;
		cli_elm.css({ 'top': '50%', 'margin-top': ((cli_h / 2) + 30) * -1 });
		setTimeout(
			function () {
				cli_elm.css(
					{
						'bottom': ''
					}
				);
			},
			100
		);
		if (a) {
			this.setResize();
		}
	},
	setResize: function () {
		var resizeTmr = null;
		jQuery(window).resize(
			function () {
				clearTimeout(resizeTmr);
				resizeTmr = setTimeout(
					function () {
						if (CLI_COOKIEBAR_AS_POPUP) {
							CLI.barAsPopUp();
						}
						if (CLI.settings.cookie_bar_as == 'widget') {
							CLI.barAsWidget();
						}
						CLI.configShowAgain();
					},
					500
				);
			}
		);
	},
	enableAllCookies: function () {

		jQuery('.cli-user-preference-checkbox').each(
			function () {
				var cli_chkbox_elm = jQuery(this);
				var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
				if (cli_chkbox_data_id != 'checkbox-necessary') {
					cli_chkbox_elm.prop('checked', true);
					CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
				}
			}
		);
	},
	disableAllCookies: function () {
		jQuery('.cli-user-preference-checkbox').each(
			function () {

				var cli_chkbox_elm = jQuery(this);
				var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
				cliCategorySlug = cli_chkbox_data_id.replace('checkbox-', '');
				if (Cli_Data.strictlyEnabled.indexOf(cliCategorySlug) === -1) {
					cli_chkbox_elm.prop('checked', false);
					CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
				}
			}
		);
	},
	hideCookieBarOnClose: function () {
		jQuery(document).on(
			'click',
			'.cli_cookie_close_button',
			function (e) {
				e.preventDefault();
				var elm = jQuery(this);
				if (Cli_Data.ccpaType === 'ccpa') {
					CLI.enableAllCookies();
				}
				CLI.accept_close();
			}
		);
	},
	checkCategories: function () {
		var cliAllowedCategories = [];
		var cli_categories = {};
		jQuery('.cli-user-preference-checkbox').each(
			function () {
				var status = false;
				cli_chkbox_elm = jQuery(this);
				cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
				cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', '');
				cli_chkbox_data_id_trimmed = cli_chkbox_data_id.replace('-', '_')
				if (jQuery(cli_chkbox_elm).is(':checked')) {
					status = true;
					cliAllowedCategories.push(cli_chkbox_data_id);
				}

				cli_categories[cli_chkbox_data_id_trimmed] = status;
			}
		);
		CLI.allowedCategories = cliAllowedCategories;
	},
	cookieLawInfoRunCallBacks: function () {
		this.checkCategories();
		if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes') {
			if ("function" == typeof CookieLawInfo_Accept_Callback) {
				CookieLawInfo_Accept_Callback();
			}
		}
	},
	generateConsent: function () {
		var preferenceCookie = CLI_Cookie.read(CLI_PREFERENCE_COOKIE);
		cliConsent = {};
		if (preferenceCookie !== null) {
			cliConsent = window.atob(preferenceCookie);
			cliConsent = JSON.parse(cliConsent);
		}
		cliConsent.ver = Cli_Data.consentVersion;
		categories = [];
		jQuery('.cli-user-preference-checkbox').each(
			function () {
				categoryVal = '';
				cli_chkbox_data_id = jQuery(this).attr('data-id');
				cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', '');
				if (jQuery(this).is(':checked')) {
					categoryVal = true;
				} else {
					categoryVal = false;
				}
				cliConsent[cli_chkbox_data_id] = categoryVal;
			}
		);
		cliConsent = JSON.stringify(cliConsent);
		cliConsent = window.btoa(cliConsent);
		CLI_Cookie.set(CLI_PREFERENCE_COOKIE, cliConsent, CLI_ACCEPT_COOKIE_EXPIRE);
	},
	addStyleAttribute: function () {
		var bar = this.bar_elm;
		var styleClass = '';
		if (jQuery(bar).find('.cli-bar-container').length > 0) {
			styleClass = jQuery('.cli-bar-container').attr('class');
			styleClass = styleClass.replace('cli-bar-container', '');
			styleClass = styleClass.trim();
			jQuery(bar).attr('data-cli-style', styleClass);
		}
	},
	getParameterByName: function (name, url) {
		if (!url) {
			url = window.location.href;
		}
		name = name.replace(/[\[\]]/g, '\\$&');
		var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
			results = regex.exec(url);
		if (!results) {
			return null;
		}
		if (!results[2]) {
			return '';
		}
		return decodeURIComponent(results[2].replace(/\+/g, ' '));
	},
	CookieLawInfo_Callback: function (enableBar, enableBlocking) {
		enableBar = typeof enableBar !== 'undefined' ? enableBar : true;
		enableBlocking = typeof enableBlocking !== 'undefined' ? enableBlocking : true;
		if (CLI.js_blocking_enabled === true && Boolean(Cli_Data.custom_integration) === true) {
			cliBlocker.cookieBar(enableBar);
			cliBlocker.runScripts(enableBlocking);
		}
	},
	checkifStyleAttributeExist: function () {
		var exist = false;
		var attr = this.bar_elm.attr('data-cli-style');
		if (typeof attr !== typeof undefined && attr !== false) {
			exist = true;
		}
		return exist;
	},
	reviewConsent: function () {
		jQuery(document).on(
			'click',
			'.cli_manage_current_consent,.wt-cli-manage-consent-link',
			function () {
				CLI.displayHeader();
			}
		);
	},
	mayBeSetPreferenceCookie: function () {
		if (CLI.getParameterByName('cli_bypass') === "1") {
			CLI.generateConsent();
		}
	}
}
var cliBlocker =
{
	blockingStatus: true,
	scriptsLoaded: false,
	ccpaEnabled: false,
	ccpaRegionBased: false,
	ccpaApplicable: false,
	ccpaBarEnabled: false,
	cliShowBar: true,
	isBypassEnabled: CLI.getParameterByName('cli_bypass'),
	checkPluginStatus: function (callbackA, callbackB) {
		this.ccpaEnabled = Boolean(Cli_Data.ccpaEnabled);
		this.ccpaRegionBased = Boolean(Cli_Data.ccpaRegionBased);
		this.ccpaBarEnabled = Boolean(Cli_Data.ccpaBarEnabled);

		if (Boolean(Cli_Data.custom_integration) === true) {
			callbackA(false);
		} else {
			if (this.ccpaEnabled === true) {
				this.ccpaApplicable = true;
				if (Cli_Data.ccpaType === 'ccpa') {
					if (this.ccpaBarEnabled !== true) {
						this.cliShowBar = false;
						this.blockingStatus = false;
					}
				}
			} else {
				jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove();
			}
			if (cliBlocker.isBypassEnabled === "1") {
				cliBlocker.blockingStatus = false;
			}
			callbackA(this.cliShowBar);
			callbackB(this.blockingStatus);
		}

	},
	cookieBar: function (showbar) {
		showbar = typeof showbar !== 'undefined' ? showbar : true;
		cliBlocker.cliShowBar = showbar;
		if (cliBlocker.cliShowBar === false) {
			CLI.bar_elm.hide();
			CLI.showagain_elm.hide();
			CLI.settingsModal.removeClass('cli-blowup cli-out');
			CLI.hidePopupOverlay();
			jQuery(".cli-settings-overlay").removeClass("cli-show");
		} else {
			if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
				CLI.displayHeader();
			} else {
				CLI.hideHeader();
			}
		}
	},
	removeCookieByCategory: function () {

		if (cliBlocker.blockingStatus === true) {
			if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) !== null) {
				var non_necessary_cookies = Cli_Data.non_necessary_cookies;
				for (var key in non_necessary_cookies) {
					currentCategory = key;
					if (CLI.allowedCategories.indexOf(currentCategory) === -1) {
						var nonNecessaryCookies = non_necessary_cookies[currentCategory];
						for (var i = 0; i < nonNecessaryCookies.length; i++) {
							if (CLI_Cookie.read(nonNecessaryCookies[i]) !== null) {
								CLI_Cookie.erase(nonNecessaryCookies[i]);
							}

						}
					}
				}
			}
		}
	},
	runScripts: function (blocking) {
		blocking = typeof blocking !== 'undefined' ? blocking : true;
		cliBlocker.blockingStatus = blocking;
		srcReplaceableElms = ['iframe', 'IFRAME', 'EMBED', 'embed', 'OBJECT', 'object', 'IMG', 'img'];
		var genericFuncs =
		{

			renderByElement: function (callback) {
				cliScriptFuncs.renderScripts();
				callback();
				cliBlocker.scriptsLoaded = true;
			},

		};
		var cliScriptFuncs =
		{
			// trigger DOMContentLoaded
			scriptsDone: function () {
				if (typeof Cli_Data.triggerDomRefresh !== 'undefined') {
					if (Boolean(Cli_Data.triggerDomRefresh) === true) {
						var DOMContentLoadedEvent = document.createEvent('Event')
						DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true)
						window.document.dispatchEvent(DOMContentLoadedEvent);
					}
				}
			},
			seq: function (arr, callback, index) {
				// first call, without an index
				if (typeof index === 'undefined') {
					index = 0
				}

				arr[index](
					function () {
						index++
						if (index === arr.length) {
							callback()
						} else {
							cliScriptFuncs.seq(arr, callback, index)
						}
					}
				)
			},
			/* script runner */
			insertScript: function ($script, callback) {
				var s = '';
				var scriptType = $script.getAttribute('data-cli-script-type');
				var elementPosition = $script.getAttribute('data-cli-element-position');
				var isBlock = $script.getAttribute('data-cli-block');
				var s = document.createElement('script');
				var ccpaOptedOut = cliBlocker.ccpaOptedOut();
				s.type = 'text/plain';
				if ($script.async) {
					s.async = $script.async;
				}
				if ($script.defer) {
					s.defer = $script.defer;
				}
				if ($script.src) {
					s.onload = callback
					s.onerror = callback
					s.src = $script.src
				} else {
					s.textContent = $script.innerText
				}
				var attrs = jQuery($script).prop("attributes");
				for (var ii = 0; ii < attrs.length; ++ii) {
					if (attrs[ii].nodeName !== 'id') {
						s.setAttribute(attrs[ii].nodeName, attrs[ii].value);
					}
				}
				if (cliBlocker.blockingStatus === true) {

					if ((CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes' && CLI.allowedCategories.indexOf(scriptType) !== -1)) {
						s.setAttribute('data-cli-consent', 'accepted');
						s.type = 'text/javascript';
					}
					if (cliBlocker.ccpaApplicable === true) {
						if (ccpaOptedOut === true || CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null) {
							s.type = 'text/plain';
						}
					}
				} else {
					s.type = 'text/javascript';
				}

				if ($script.type != s.type) {
					if (elementPosition === 'head') {
						document.head.appendChild(s);
					} else {
						document.body.appendChild(s);
					}
					if (!$script.src) {
						callback()
					}
					$script.parentNode.removeChild($script);

				} else {

					callback();
				}
			},
			renderScripts: function () {
				var $scripts = document.querySelectorAll('script[data-cli-class="cli-blocker-script"]');
				if ($scripts.length > 0) {
					var runList = []
					var typeAttr
					Array.prototype.forEach.call(
						$scripts,
						function ($script) {
							// only run script tags without the type attribute
							// or with a javascript mime attribute value
							typeAttr = $script.getAttribute('type')
							runList.push(
								function (callback) {
									cliScriptFuncs.insertScript($script, callback)
								}
							)
						}
					)
					cliScriptFuncs.seq(runList, cliScriptFuncs.scriptsDone);
				}
			}
		};
		genericFuncs.renderByElement(cliBlocker.removeCookieByCategory);
	},
	ccpaOptedOut: function () {
		var ccpaOptedOut = false;
		var preferenceCookie = CLI_Cookie.read(CLI_PREFERENCE_COOKIE);
		if (preferenceCookie !== null) {
			cliConsent = window.atob(preferenceCookie);
			cliConsent = JSON.parse(cliConsent);
			if (typeof cliConsent.ccpaOptout !== 'undefined') {
				ccpaOptedOut = cliConsent.ccpaOptout;
			}
		}
		return ccpaOptedOut;
	}
}
jQuery(document).ready(
	function () {
		if (typeof cli_cookiebar_settings != 'undefined') {
			CLI.set(
				{
					settings: cli_cookiebar_settings
				}
			);
			if (CLI.js_blocking_enabled === true) {
				cliBlocker.checkPluginStatus(cliBlocker.cookieBar, cliBlocker.runScripts);
			}
		}
	}
);
// source --> https://brunsham.nl/wp-content/plugins/wp-file-upload/js/wordpress_file_upload_functions.js?ver=4795fce695febf56e23e158ffe581923 
function wfu_run_js_from_bank(){if("undefined"!=typeof WFU_JS_BANK)for(;WFU_JS_BANK.length>0;){var e=wfu_js_decode_obj(WFU_JS_BANK[0].obj_str);e&&e[WFU_JS_BANK[0].func].call(e),WFU_JS_BANK.splice(0,1)}}function wfu_Initialize_Consts(e){if(void 0===GlobalData.consts){GlobalData.consts=new Object;for(var a=e.split(";"),t=0;t<a.length;t++)const_txt=a[t].split(":"),GlobalData.consts[wfu_plugin_decode_string(const_txt[0])]=wfu_plugin_decode_string(const_txt[1])}}function wfu_Load_Code_Connectors(e){"undefined"==typeof wfu_Code_Objects&&(wfu_Code_Objects={}),wfu_Code_Objects[e]=new wfu_Code_Object(e);for(var a=0;a<Code_Initializators.length;a++)wfu_Code_Objects[e].additem(Code_Initializators[a](e))}function wfu_Code_Object(e){this.sid=e,this.items=[],this._calc_prioritized_list=function(e){for(var a,t,r=[],s=[],o=[],n=0;n<this.items.length;n++)(a=this.items[n])[e]&&(t=-1,a.priority&&(t=a.priority),a[e].priority&&(t=a[e].priority),t>=0?(r.push(t),s.push(n)):o.push(n));for(n=1;n<r.length;n++)for(var i=n;i<r.length;i++)if(r[i]<r[n-1]){var l=r[i];r[i]=r[n-1],r[n-1]=l,l=s[i],s[i]=s[n-1],s[n-1]=l}return s.concat(o)},this.additem=function(e){this.items.push(e)},this.apply_filters=function(e,a){if(void 0===a)return null;var t=this._calc_prioritized_list(e);if(0==t.length)return a;for(var r=0;r<t.length;r++){var s=this.items[t[r]],o=null;"function"==typeof s[e]?o=s[e]:"function"==typeof s[e].func&&(o=s[e].func),null!=o&&(a=o.apply(this,Array.prototype.slice.call(arguments,1)),arguments[1]=a)}return a},this.do_action=function(e){var a=this._calc_prioritized_list(e);if(0!=a.length)for(var t=0;t<a.length;t++){var r=this.items[a[t]],s=null;"function"==typeof r[e]?s=r[e]:"function"==typeof r[e].func&&(s=r[e].func),null!=s&&s.apply(this,Array.prototype.slice.call(arguments,1))}}}function wfu_plugin_load_action(e){var a=GlobalData.WFU[e];wfu_Code_Objects[e].do_action("pre_load"),wfu_install_unload_hook(),a.visualeditorbutton_exist&&(a.visualeditorbutton.init(),a.visualeditorbutton.attachInvokeHandler((function(){wfu_invoke_shortcode_editor(a)}))),a.is_formupload?a.uploadaction=function(){wfu_redirect_to_classic(e,0,0)}:a.uploadaction=function(){wfu_HTML5UploadFile(e)};var t=function(){wfu_selectbutton_clicked(e)};a.uploadform_exist&&a.uploadform.attachActions(t,(function(a){var t=GlobalData.WFU[e];wfu_selectbutton_changed(e,0),wfu_update_uploadbutton_status(e),t.singlebutton&&a&&t.uploadaction()})),a.consent_exist&&(a.consent.attachActions((function(a){wfu_set_stored_formdata(e,"consentresult_"+e,a)})),a.consent.update("init")),a.submit_exist&&(t=a.testmode?function(){alert(GlobalData.consts.notify_testmode)}:function(){a.uploadaction()},a.submit.attachClickAction(t))}function wfu_install_unload_hook(){window.onbeforeunload=wfu_unload_hook}function wfu_unload_hook(){if(""!=GlobalData.UploadInProgressString&&""!=GlobalData.UploadInProgressString.trim())return GlobalData.consts.wfu_pageexit_prompt}function wfu_Check_Browser_Capabilities(){if("undefined"==typeof wfu_BrowserCaps){wfu_BrowserCaps=new Object;var e=wfu_GetHttpRequestObject();wfu_BrowserCaps.supportsAJAX=null!=e,wfu_BrowserCaps.supportsUploadProgress=!!(e&&"upload"in e&&"onprogress"in e.upload);var a=null;try{a=new FormData}catch(t){}wfu_BrowserCaps.supportsHTML5=null!=a;var t=document.createElement("iframe");wfu_BrowserCaps.supportsIFRAME=null!=t,wfu_BrowserCaps.supportsDRAGDROP=!!window.FileReader,wfu_BrowserCaps.supportsAnimation=wfu_check_animation(),wfu_BrowserCaps.isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0}}function wfu_check_animation(){var e=!1,a="Webkit Moz O ms Khtml".split(" "),t=document.createElement("DIV");if(t.style.animationName&&(e=!0),!1===e)for(var r=0;r<a.length;r++)if(void 0!==t.style[a[r]+"AnimationName"]){a[r].toLowerCase(),e=!0;break}return e}function wfu_join_strings(e){for(var a=[].slice.call(arguments),t="",r=1;r<a.length;r++)t+=(""==t||""==a[r]?"":e)+a[r];return t}function wfu_plugin_decode_string(e){for(var a,t,r=0,s="";r<e.length;)t=(a=parseInt(e.substr(r,2),16))<128?a:a<224?((31&a)<<6)+(63&parseInt(e.substr(r+=2,2),16)):((15&a)<<12)+((63&parseInt(e.substr(r+=2,2),16))<<6)+(63&parseInt(e.substr(r+=2,2),16)),s+=String.fromCharCode(t),r+=2;return s}function wfu_plugin_encode_string(e){var a=0,t="",r="";for(a=0;a<e.length;a++)num=e.charCodeAt(a),num>=2048?num=((16773120&num|917504)<<4)+((4032&num|8192)<<2)+(63&num|128):num>=128&&(num=((65472&num|12288)<<2)+(63&num|128)),1!=(r=num.toString(16)).length&&3!=r.length&&5!=r.length||(r="0"+r),t+=r;return t}function wfu_decode_array_from_string(e){var a=wfu_plugin_decode_string(e),t=null;try{t=JSON.parse(a)}catch(e){}return t}function wfu_randomString(e){for(var a=e,t="",r=0;r<a;r++){var s=Math.floor(61*Math.random());t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".substring(s,s+1)}return t}function wfu_addEventHandler(e,a,t){e.addEventListener?e.addEventListener(a,t,!1):e.attachEvent?e.attachEvent("on"+a,t):e["on"+a]=t}function wfu_attach_element_handlers(e,a){for(var t=["DOMAttrModified","textInput","input","change","keypress","paste","focus","propertychange"],r=0;r<t.length;r++)wfu_addEventHandler(e,t[r],a)}function wfu_GetHttpRequestObject(){var e=null;try{e=new XMLHttpRequest}catch(a){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}}if(null==e&&window.createRequest)try{xmlhttp=window.createRequest()}catch(e){}return e}function wfu_get_filelist(e,a){var t=GlobalData.WFU[e];a=void 0===a||a;var r=[];return t.uploadform_exist&&(r=t.uploadform.files()),a&&void 0!==t.filearray&&(r=t.filearray),r}function wfu_add_files(e,a){var t=GlobalData.WFU[e];void 0===t.filearray&&(t.filearray=Array(),t.filearrayprops=Array()),t.uploadform_exist&&t.uploadform.reset(),t.filearray.length=t.filearrayprops.length=0;for(var r=0;r<a.length;r++)t.filearray.push(a[r].file),t.filearrayprops.push(a[r].props)}function wfu_attach_cancel_event(e,a){function t(){var a=wfu_Initialize_Params();a.general.shortcode_id=e,a.general.unique_id="",a.general.files_count=0,a.general.state=16,wfu_ProcessUploadComplete(e,0,a,"no-ajax","",[!1,null,!1]),s.uploadform_exist&&(s.uploadform.reset(),s.uploadform.submit(),s.uploadform.lock())}function r(r,s){var o=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_cancel_upload&wfu_uploader_nonce="+wfu_get_stored_formdata(e,"wfu_uploader_nonce_"+e)+"&sid="+e+"&unique_id="+a+"&index="+s+"&session_token="+GlobalData.WFU[e].session+"&mode="+r,n=wfu_GetHttpRequestObject();if(null==n){var i=document.createElement("iframe");if(i)return i.style.display="none",i.src=o,document.body.appendChild(i),void(i.onload=function(){t()})}n.open("GET",o,!0),"no-ajax"==r&&(n.onreadystatechange=function(){4==n.readyState&&200==n.status&&t()}),n.send(null)}var s=GlobalData.WFU[e];s.textbox_exist&&s.textbox.attachCancelHandler((function(){var t=!1;if(s.is_formupload)1==(t=confirm(GlobalData.consts.cancel_upload_prompt))&&r("no-ajax",0);else{if(!GlobalData[e]||0==GlobalData[e].xhrs.length)return!1;if(1==(t=confirm(GlobalData.consts.cancel_upload_prompt))){r("ajax",-1);for(var o=wfu_get_filelist(e),n=[],i=[],l=0;l<o.length;l++)n.push(null),i.push(o[l].name);for(l=0;l<GlobalData[e].xhrs.length;l++){var u=GlobalData[e].xhrs[l].file_id-1;u>=0&&null==n[u]&&(n[u]=GlobalData[e].xhrs[l])}for(s.debugmode&&console.log("upload cancelled!"),l=0;l<n.length;l++)if(null==n[l]&&(n[l]=wfu_GetHttpRequestObject(),null!=n[l]&&wfu_initialize_fileupload_xhr(n[l],e,a,l,i[l])),-1!=n[l]){var _={target:{responseText:"force_cancel_code",shortcode_id:e}};wfu_uploadComplete.call(n[l],_)}}}return t}))}function wfu_dettach_cancel_event(e){var a=GlobalData.WFU[e];a.textbox_exist&&a.textbox.dettachCancelHandler()}function wfu_selectbutton_changed(e,a){wfu_BrowserCaps.supportsAJAX&&wfu_BrowserCaps.supportsHTML5||(a=0);var t=wfu_get_filelist(e,!1);if(1==a){void 0===GlobalData.WFU[e].filearray&&(GlobalData.WFU[e].filearray=Array());for(var r=0;r<t.length;r++)GlobalData.WFU[e].filearray.push(t[r])}else void 0!==GlobalData.WFU[e].filearray&&delete GlobalData.WFU[e].filearray;wfu_update_filename_text(e),wfu_webcam_update_preview(e)}function wfu_selectbutton_clicked(e){var a=GlobalData.WFU[e];a.message_exist&&a.message.reset(),a.uploadform_exist&&a.uploadform.reset()}function wfu_update_uploadbutton_status(e){var a=GlobalData.WFU[e];if(a.submit_exist){var t=a.submit,r=wfu_get_filelist(e).length>0||a.allownofile;r=wfu_Code_Objects[e].apply_filters("uploadbutton_status",r),t.toggle(r)}}function wfu_update_filename_text(e){var a=GlobalData.WFU[e];if(a.textbox_exist){for(var t=wfu_get_filelist(e),r=[],s=0;s<t.length;s++)r.push(t[s].name);a.textbox.update("set",r)}}function wfu_init_userdata_handlers(e,a){var t=GlobalData.WFU[e],r=t.userdata.props[a],s=t.userdata.codes[a],o=t.userdata;s.init=function(){},s.value=function(){return""},s.lock=function(){},s.unlock=function(){},s.reset=function(){},s.empty=function(){return""},s.validate=null,s.typehook=null,"text"==r.type||"multitext"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,r.default),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_empty:""}):"number"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.typehook?s.typehook(e):r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,r.default),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_empty:""},s.validate=function(){var e=/^(\+|\-)?[0-9]*$/i;return"f"==r.format&&(e=/^(\+|\-)?[0-9]*?\.?[0-9]*$/i),e.test(o.getValue(r))?"":o.error_invalid_number},s.typehook=function(e){var a=/^(\+|\-)?[0-9]*$/i;"f"==r.format&&(a=/^(\+|\-)?[0-9]*?\.?[0-9]*$/i),a.test(e.target.value)?r.store():e.target.value=r.getstored()}):"email"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,r.default),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_empty:""},s.validate=function(){return""==o.getValue(r)||/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(o.getValue(r))?"":o.error_invalid_email}):"confirmemail"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,r.default),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_empty:""},s.validate=function(){for(var e=null,a=0;a<t.userdata.props.length;a++)if(t.userdata.props[a]&&"email"==t.userdata.props[a].type&&t.userdata.props[a].group==r.group){e=t.userdata.props[a];break}return null!=e?o.getValue(r)==o.getValue(e)?"":o.error_confirm_email_nomatch:o.error_confirm_email_nobase}):"password"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,r.default),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_empty:""}):"confirmpassword"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,r.default),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_empty:""},s.validate=function(){for(var e=null,a=0;a<t.userdata.props.length;a++)if(t.userdata.props[a]&&"password"==t.userdata.props[a].type&&t.userdata.props[a].group==r.group){e=t.userdata.props[a];break}return null!=e?o.getValue(r)==o.getValue(e)?"":o.error_confirm_password_nomatch:o.error_confirm_password_nobase}):"checkbox"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)?"true":"false"},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,"true"==r.default),r.store()},s.empty=function(){return o.getValue(r)?"":o.error_checkbox_notchecked}):"radiobutton"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,r.default),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_radio_notselected:""}):"date"==r.type||"time"==r.type||"datetime"==r.type?(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){def=r.default.trim(),"("==def.substr(0,1)&&")"==def.substr(def.length-1,1)?def=def.substr(1,def.length-2):def="",o.setValue(r,def),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_empty:""}):("list"==r.type||"dropdown"==r.type||"countrylist"==r.type||"honeypot"==r.type)&&(s.init=function(){o.initField(r),o.attachHandlers(r,(function(e){r.store()}))},s.value=function(){return o.getValue(r)},s.lock=function(){o.disable(r)},s.unlock=function(){o.enable(r)},s.reset=function(){o.setValue(r,r.default),r.store()},s.empty=function(){return""===o.getValue(r)?o.error_empty:""}),s.init()}function wfu_Redirect(e){window.location=e}function wfu_loadStart(e){}function wfu_update_upload_metrics(e){for(var a=0,t=0,r=0,s=Array(),o=wfu_get_filelist(e),n=0;n<o.length;n++)s[n]={size:o[n].size,aborted:!1,loaded:0,delta:0};for(n=0;n<GlobalData[e].xhrs.length;n++)(i=GlobalData[e].xhrs[n].file_id)>0&&GlobalData[e].xhrs[n].aborted&&s[i-1]&&(s[i-1].aborted=!0);for(n=0;n<GlobalData[e].xhrs.length;n++){var i;(i=GlobalData[e].xhrs[n].file_id)>0&&s[i-1]&&!s[i-1].aborted?(s[i-1].size=Math.max(GlobalData[e].xhrs[n].totalsize,s[i-1].size),s[i-1].loaded+=GlobalData[e].xhrs[n].sizeloaded,s[i-1].delta+=Math.max(GlobalData[e].xhrs[n].deltaloaded,0)):i>0&&s[i-1]&&s[i-1].aborted&&(s[i-1].hasOwnProperty("abort_metrics")||(s[i-1].abort_metrics={size:o[i-1].size,loaded:0,delta:0}),s[i-1].abort_metrics.size=Math.max(GlobalData[e].xhrs[n].totalsize,s[i-1].abort_metrics.size),s[i-1].abort_metrics.loaded+=GlobalData[e].xhrs[n].sizeloaded,s[i-1].abort_metrics.delta+=Math.max(GlobalData[e].xhrs[n].deltaloaded,0))}var l=(new Date).getTime();for(n=0;n<o.length;n++){var u=GlobalData[e].metrics[n];!s[n].aborted&&s[n].size>0?(u.size=s[n].size,"incremental"==GlobalData.consts.wfu_uploadprogress_mode?u.size-u.loaded!=0?u.progress_pos=Math.min(u.progress_pos+(1-u.progress_pos)*s[n].delta/(u.size-u.loaded),1):u.progress_pos=1:u.progress_pos=s[n].loaded/s[n].size,u.loaded=s[n].loaded,u.last_time=l,a+=u.size,t+=u.loaded,r+=s[n].delta):(u.size=0,u.progress_pos=0,u.loaded=0,s[n].aborted&&s[n].size>0&&!u.hasOwnProperty("abort_metrics")&&(u.last_time=0,u.aborted=!0,u.abort_metrics={size:s[n].abort_metrics.size,loaded:s[n].abort_metrics.loaded,abort_time:l}))}(u=GlobalData[e].metricstotal).size=a,"incremental"==GlobalData.consts.wfu_uploadprogress_mode?u.size-u.loaded!=0?u.progress_pos=Math.min(u.progress_pos+(1-u.progress_pos)*r/(u.size-u.loaded),1):u.progress_pos=1:u.progress_pos=t/a,u.loaded=t,u.last_time=l}function wfu_uploadProgress(e,a,t,r){var s=GlobalData.WFU[a];r&&void 0===this.xhr&&(console.log("total="+e.total+", loaded="+e.loaded),console.log(e));var o=GlobalData[a].xhrs[t];if(0!=o.file_id){var n=0,i=!!s.progressbar_exist;if(e.lengthComputable){if(o.deltaloaded=e.loaded-o.sizeloaded,o.sizeloaded=e.loaded,o.size<e.total&&e.total>0){n=e.total-o.size,o.deltasize+=n,o.size+=n;for(var l=0;l<GlobalData[a].xhrs.length;l++)GlobalData[a].xhrs[l].file_id==o.file_id&&(GlobalData[a].xhrs[l].totalsize+=n)}wfu_update_upload_metrics(a),o.deltaloaded=0;var u=Math.round(100*GlobalData[a].metricstotal.progress_pos);wfu_Code_Objects[a].do_action("update_total_progress",u),i&&s.progressbar.update(u)}else wfu_Code_Objects[a].do_action("update_total_progress",0),i&&s.progressbar.update(0)}}function wfu_notify_WPFilebase(e,a,t){var r=wfu_GetHttpRequestObject();if(null==r)return(n=document.createElement("iframe")).style.display="none",n.src=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_notify_wpfilebase&params_index="+a+"&session_token="+t,void document.body.appendChild(n);var s=GlobalData.consts.ajax_url;params=new Array(4),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_notify_wpfilebase",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=a,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=t,params[3]=new Array(2),params[3][0]="nonce",params[3][1]=wfu_get_stored_formdata(e,"wfu_uploader_nonce_"+e);for(var o="",n=0;n<params.length;n++)o+=(n>0?"&":"")+params[n][0]+"="+encodeURI(params[n][1]);r.open("POST",s,!0),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.onreadystatechange=function(){},r.send(o)}function wfu_send_email_notification(e,a){var t=GlobalData.WFU[e],r=wfu_GetHttpRequestObject();if(null!=r){var s=GlobalData.consts.ajax_url;params=new Array(5),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_send_email_notification",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=t.params_index,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=t.session,params[3]=new Array(2),params[3][0]="uniqueuploadid_"+e,params[3][1]=a,params[4]=new Array(2),params[4][0]="nonce",params[4][1]=wfu_get_stored_formdata(e,"wfu_uploader_nonce_"+e);for(var o="",n=0;n<params.length;n++)o+=(n>0?"&":"")+params[n][0]+"="+encodeURI(params[n][1]);wfu_initialize_fileupload_xhr(r,e,a,-1,""),r.success_message_header="",r.error_message_header="",r.error_adminmessage_unknown="",r.open("POST",s,!0),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.addEventListener("load",wfu_uploadComplete,!1),r.addEventListener("error",wfu_uploadFailed,!1),r.addEventListener("abort",wfu_uploadCanceled,!1),r.send(o)}}function wfu_uploadComplete(e){var a=new Date,t=this.shortcode_id,r=GlobalData.WFU[t],s=(this.file_id,!1),o="",n="",i="",l="unknown",u=null;this.loading=!1,this.end_time=a.getTime();var _=e.target.responseText,d=_,c="error";if(-1!=_&&(_.indexOf("force_errorabort_code")>-1&&(c="errorabort",_=_.replace("force_errorabort_code","")),_.indexOf("force_cancel_code")>-1&&(c="errorcancel",_=_.replace("force_cancel_code","")),_.indexOf("force_abortsuccess_code")>-1&&(c="errorabortsuccess",_=_.replace("force_abortsuccess_code",""))),-1!=_){var f=_.indexOf("wfu_fileupload_success:"),p="";if(f>-1&&(r.debugmode&&(p=_.substr(0,f)),f=(d=_.substr(f+23)).indexOf(":"),o=d.substr(0,f),f=(d=d.substr(f+1)).indexOf(":"),i=d.substr(0,f),n=d.substr(f+1)),""!=p){var m="";"fileupload"==this.requesttype?m="Debug Data - File: "+this.file_id:"email"==this.requesttype&&(m="Debug Data - Email Notification"),u={title:m,data:p}}if(""!=i){var g=i.split(";");if(1==parseInt(g[2])){var b=g[3].split(",");l=wfu_plugin_decode_string(b[0]),b[4]}}}if(""==n||""==i){var w=wfu_Initialize_Params();w.general.shortcode_id=t,w.general.unique_id=this.unique_id,w.general.state=7,w.general.files_count="fileupload"==this.requesttype?1:0,w.general.upload_finish_time=this.finish_time;var h=r.fail_colors.split(","),v=this.error_message_header,G=c;"errorabortsuccess"==c?(w.general.fail_message="",w.general.fail_admin_message="",h=r.success_colors.split(","),v=this.success_message_header,G="success"):"errorcancel"!=c?(w.general.fail_message=GlobalData.consts.message_unknown,w.general.fail_admin_message=wfu_join_strings("<br />",this.error_adminmessage_unknown,this.requesttype+":"+d)):(w.general.fail_message=GlobalData.consts.file_cancelled,w.general.fail_admin_message=""),w.general.files_count>0?(w[0]={},w[0].color=h[0],w[0].bgcolor=h[1],w[0].borcolor=h[2],w[0].message_type=G,l=c,w[0].header=v,w[0].message=GlobalData.consts.message_timelimit,w[0].admin_messages=r.is_admin?GlobalData.consts.message_admin_timelimit:""):w.general.admin_messages.other=r.is_admin?GlobalData.consts.message_admin_timelimit:"",w.general.upload_finish_time>0&&a.getTime()<w.general.upload_finish_time&&(w.general.files_count>0?(w[0].message=w.general.fail_message,w[0].admin_messages=r.is_admin?w.general.fail_admin_message:""):w.general.admin_messages.other=r.is_admin?w.general.fail_admin_message:"")}if(""==n||""==i?(r.debugmode&&console.log("wfu_ProcessUploadComplete: ",t,this.file_id,"Params obj",this.unique_id,"",[r.debugmode,u,r.is_admin],this.requesttype,""),s=wfu_ProcessUploadComplete(t,this.file_id,w,this.unique_id,"",[r.debugmode,u,r.is_admin],this.requesttype,"")):(r.debugmode&&console.log("wfu_ProcessUploadComplete: ",t,this.file_id,"Params str",this.unique_id,i,[r.debugmode,u,r.is_admin],this.requesttype,o),s=wfu_ProcessUploadComplete(t,this.file_id,n,this.unique_id,i,[r.debugmode,u,r.is_admin],this.requesttype,o)),s&&(wfu_dettach_cancel_event(t),wfu_unlock_upload(t),r.progressbar_exist&&r.progressbar.hide(),wfu_clear(t)),e.target.return_status)return l}function wfu_ProcessUploadComplete(sid,file_id,upload_params,unique_id,safe_output,debug_data,request_type,js_script_enc){var WFU=GlobalData.WFU[sid];if(sid&&!(sid<0)&&null!=upload_params&&""!=upload_params&&""!=unique_id&&("no-ajax"==unique_id||GlobalData[sid])){var do_redirect=!1;if("string"==typeof upload_params){upload_params=wfu_plugin_decode_string(upload_params.replace(/^\s+|\s+$/g,""));var Params=null;try{Params=JSON.parse(upload_params)}catch(e){}if(null==Params){var safe_parts=safe_output.split(";");Params=wfu_Initialize_Params(),Params.general.shortcode_id=sid,Params.general.unique_id=unique_id,Params.general.state=safe_parts[0],4==Params.general.state&&Params.general.state++;var default_colors=safe_parts[1].split(","),filedata="",error_jsonparse_filemessage=GlobalData.consts.jsonparse_filemessage,error_jsonparse_message=GlobalData.consts.jsonparse_message,error_jsonparse_adminmessage=GlobalData.consts.jsonparse_adminmessage;Params.general.files_count=parseInt(safe_parts[2]);for(var i=0;i<Params.general.files_count;i++)Params[i]={},Params[i].color=default_colors[0],Params[i].bgcolor=default_colors[1],Params[i].borcolor=default_colors[2],filedata=safe_parts[i+3].split(","),Params[i].message_type=wfu_plugin_decode_string(filedata[0]),Params[i].header=wfu_plugin_decode_string(filedata[1]),"success"==Params[i].message_type&&(Params[i].header+=error_jsonparse_filemessage,Params[i].message_type="warning"),Params[i].message=wfu_join_strings("<br />",error_jsonparse_message,wfu_plugin_decode_string(filedata[2])),Params[i].admin_messages=wfu_join_strings("<br />",error_jsonparse_adminmessage,wfu_plugin_decode_string(filedata[3]))}}else{if("object"!=typeof upload_params)return;var Params=upload_params}WFU.debugmode&&console.log("wfu_ProcessUploadComplete debug: ",debug_data),WFU.debugmode&&console.log("wfu_ProcessUploadComplete Params: ",Params);var message_types=[];for(i=0;Params[i];)Params[i].message_type&&(message_types.push(Params[i].message_type),"error"==Params[i].message_type.substr(0,5)&&(Params[i].message_type=Params[i].message_type.substr(0,5))),i++;GlobalData[sid]||(GlobalData[sid]=Object());var G=GlobalData[sid];if("no-ajax"==unique_id)G.last=!1,G.unique_id="",G.files_count=Params.general.files_count,0==Params.general.state&&(Params.general.files_count=0),G.files_processed=Params.general.files_count,G.upload_state=Params.general.state,G.nofileupload=Params.general.state>12&&Params.general.state<16,"message"in G||(G.message=[]),""!=Params.general.message?G.message.push(Params.general.message):G.message=[],G.update_wpfilebase=Params.general.update_wpfilebase,G.redirect_link=Params.general.redirect_link,G.notify_by_email=0,G.admin_messages={},G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase,G.admin_messages.notify=Params.general.admin_messages.notify,G.admin_messages.redirect=Params.general.admin_messages.redirect,"debug"in G.admin_messages||(G.admin_messages.debug=[]),null!==debug_data[1]&&G.admin_messages.debug.push(debug_data[1]),"other"in G.admin_messages||(G.admin_messages.other=[]),""!=Params.general.admin_messages.other&&G.admin_messages.other.push(Params.general.admin_messages.other),G.errors={},G.errors.wpfilebase=Params.general.errors.wpfilebase,G.errors.notify=Params.general.errors.notify,G.errors.redirect=Params.general.errors.redirect,G.current_size=0,G.total_size=0;else{if(""==G.unique_id||G.unique_id!=unique_id||G.unique_id!=Params.general.unique_id)return;if(G.last)return;0==Params.general.files_count&&Params[0]&&"error"==Params[0].message_type&&(Params.general.files_count=1);for(var file_status="",i=0;i<Params.general.files_count;i++)file_status="error"==Params[i].message_type&&0==G.files_processed?"error1":"error"==Params[i].message_type&&G.files_processed>0?"error2":Params[i].message_type,G.upload_state=GlobalData.filestatematch[file_status][G.upload_state];G.files_processed+=Params.general.files_count,""!=Params.general.message&&G.message.push(Params.general.message),""==G.update_wpfilebase&&(G.update_wpfilebase=Params.general.update_wpfilebase),(!request_type||request_type&&"email"!=request_type)&&(G.redirect_link=Params.general.redirect_link),G.notify_by_email+=parseInt("0"+Params.general.notify_by_email),null!==debug_data[1]&&G.admin_messages.debug.push(debug_data[1]),""!=Params.general.admin_messages.other&&G.admin_messages.other.push(Params.general.admin_messages.other),""==G.admin_messages.wpfilebase&&(G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase),""==G.admin_messages.notify&&(G.admin_messages.notify=Params.general.admin_messages.notify),""==G.admin_messages.redirect&&(G.admin_messages.redirect=Params.general.admin_messages.redirect),""==G.errors.wpfilebase&&(G.errors.wpfilebase=Params.general.errors.wpfilebase),""==G.errors.notify&&(G.errors.notify=Params.general.errors.notify),""==G.errors.redirect&&(G.errors.redirect=Params.general.errors.redirect)}G.files_processed==G.files_count&&(G.last=!0,""!=G.update_wpfilebase&&(G.admin_messages.wpfilebase="",wfu_notify_WPFilebase(sid,WFU.params_index,WFU.session)),G.notify_by_email>0&&(G.admin_messages.notify="",wfu_send_email_notification(sid,unique_id),G.last=!1,G.notify_by_email=0),G.last&&(GlobalData[sid].metricstotal&&(GlobalData[sid].metricstotal.end_time=(new Date).getTime()),"no-ajax"==unique_id||G.nofileupload||wfu_notify_server_upload_ended(sid,unique_id),GlobalData.UploadInProgressString=GlobalData.UploadInProgressString.replace(new RegExp("\\["+unique_id+"\\]","g"),"")),""!=G.errors.redirect&&(G.redirect_link=""),""!=G.redirect_link&&G.last&&""==GlobalData.UploadInProgressString.trim()&&(G.upload_state=11,do_redirect=!0));var nonadmin_message=G.message,admin_message=[].concat(G.admin_messages.other,""!=G.admin_messages.wpfilebase?[G.admin_messages.wpfilebase]:[],""!=G.admin_messages.notify?[G.admin_messages.notify]:[],""!=G.admin_messages.redirect?[G.admin_messages.redirect]:[]);if(G.last&&(G.nofileupload?("no-ajax"!=unique_id&&(0==G.upload_state?G.upload_state=14:G.upload_state<4&&(G.upload_state=15)),15==G.upload_state&&Params[0]&&(nonadmin_message.push(Params[0].message),admin_message.push(Params[0].admin_messages))):(G.files_count>0&&G.store_nothing&&G.upload_state<3&&(G.upload_state=19),0==G.files_count&&12!=G.upload_state&&G.upload_state<16?G.upload_state=8:G.upload_state<4&&(G.upload_state+=4),4==G.upload_state&&admin_message.length>0?G.upload_state++:5==G.upload_state&&0==admin_message.length&&0==nonadmin_message.length&&G.upload_state--)),WFU.message_exist){var suffix="";1!=G.files_count||5!=G.upload_state&&7!=G.upload_state||(suffix="_singlefile");for(var final_upload_state=0==G.upload_state&&G.nofileupload?13:G.upload_state,data={files_count:G.nofileupload?0:G.files_count,files_processed:G.nofileupload?0:G.files_processed,state:final_upload_state,single:1==G.files_count&&0==nonadmin_message.length&&0==admin_message.length&&G.last&&!do_redirect&&!G.nofileupload,color:GlobalData.States["State"+final_upload_state+suffix].color,bgcolor:GlobalData.States["State"+final_upload_state+suffix].bgcolor,borcolor:GlobalData.States["State"+final_upload_state+suffix].borcolor,message1:GlobalData.States["State"+final_upload_state+suffix].message,message2:nonadmin_message,message3:admin_message,debug_data:G.admin_messages.debug,files:[]},i=0;i<Params.general.files_count;i++)data.files[i]={index:i+file_id,result:Params[i].message_type,message1:Params[i].header,message2:Params[i].message,message3:Params[i].admin_messages};WFU.message.update(data)}return js_script_enc&&eval(wfu_plugin_decode_string(js_script_enc)),do_redirect&&wfu_Redirect(G.redirect_link),G.last}}function wfu_uploadFailed(e,a){a&&(console.log("failure report following"),console.log(e));var t=e.target,r={target:{responseText:"",shortcode_id:t.shortcode_id}};wfu_uploadComplete.call(t,r)}function wfu_uploadCanceled(e){}function wfu_notify_server_upload_ended(e,a){var t=GlobalData.WFU[e],r=wfu_GetHttpRequestObject();if(null!=r){var s=GlobalData.consts.ajax_url;params=new Array(6),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action",params[1]=new Array(2),params[1][0]="wfu_uploader_nonce",params[1][1]=wfu_get_stored_formdata(e,"wfu_uploader_nonce_"+e),params[2]=new Array(2),params[2][0]="uniqueuploadid_"+e,params[2][1]=a,params[3]=new Array(2),params[3][0]="params_index",params[3][1]=t.params_index,params[4]=new Array(2),params[4][0]="session_token",params[4][1]=t.session,params[5]=new Array(2),params[5][0]="upload_finished",params[5][1]=1;for(var o="",n=0;n<params.length;n++)o+=(n>0?"&":"")+params[n][0]+"="+encodeURI(params[n][1]);r.open("POST",s,!0),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.onreadystatechange=function(){4==r.readyState&&200==r.status&&wfu_Code_Objects[e].do_action("after_upload",r.responseText)},r.send(o)}}function wfu_Initialize_Params(){var e={version:"full",general:{}};return e.general.shortcode_id=0,e.general.unique_id="",e.general.state=0,e.general.files_count=0,e.general.update_wpfilebase="",e.general.redirect_link="",e.general.upload_finish_time=0,e.general.message="",e.general.message_type="",e.general.admin_messages={},e.general.admin_messages.wpfilebase="",e.general.admin_messages.notify="",e.general.admin_messages.redirect="",e.general.admin_messages.other="",e.general.errors={},e.general.errors.wpfilebase="",e.general.errors.notify="",e.general.errors.redirect="",e.general.color="",e.general.bgcolor="",e.general.borcolor="",e.general.notify_by_email=0,e.general.fail_message="",e.general.fail_admin_message="",e}function wfu_redirect_to_classic(e,a,t){var r=GlobalData.WFU[e];r.is_formupload=!0;var s=wfu_filesselected(e);(0!=s||r.allownofile)&&(r.subfolders_exist&&s>0&&!r.subfolders.check()||wfu_check_required_userdata(e,!0)&&wfu_Code_Objects[e].apply_filters("pre_start_check",!0)&&wfu_redirect_to_classic_cont(e,a,t))}function wfu_redirect_to_classic_cont(e,a,t){var r=function(r){var o=GlobalData.WFU[e],n="",i=(o.session,"wfu_askserver_success:"),l=r.indexOf(i),u=r.indexOf("wfu_askserver_error:");if(l>-1){n=r.substr(l+22);var _=wfu_filesselected(e),d=0==_&&o.allownofile;wfu_Code_Objects[e].do_action("askserver_success",n,"no-ajax"),o.progressbar_exist&&!d&&o.progressbar.show("shuffle"),wfu_attach_cancel_event(e,s);var c=wfu_Initialize_Params();c.general.shortcode_id=e,c.general.unique_id="",c.general.files_count=_,d&&(c.general.state=13),wfu_ProcessUploadComplete(e,0,c,"no-ajax","",[!1,null,!1]),wfu_set_stored_formdata(e,"uniqueuploadid_"+e,s),wfu_set_stored_formdata(e,"nofileupload_"+e,d?"1":"0");var f="";1==a&&(f="_redirected"),o.uploadform_exist&&o.uploadform.changeFileName("uploadedfile_"+e+f),wfu_set_stored_formdata(e,"adminerrorcodes_"+e,t>0?t:""),o.uploadform_exist&&(o.uploadform.submit(),o.uploadform.lock())}else u>-1&&(n=r.substr(u+20),wfu_unlock_upload(e),wfu_Code_Objects[e].do_action("askserver_error",n))},s=wfu_randomString(10);wfu_lock_upload(e),wfu_Code_Objects[e].do_action("pre_start");var o="",n=wfu_Code_Objects[e].apply_filters("askserver_pass_params",{});for(var i in n)n.hasOwnProperty(i)&&(o+="&"+i+"="+n[i]);var l=new Date,u=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_ask_server&wfu_uploader_nonce="+wfu_get_stored_formdata(e,"wfu_uploader_nonce_"+e)+"&sid="+e+"&unique_id="+s+"&start_time="+l.getTime()+"&session_token="+GlobalData.WFU[e].session+o,_=wfu_GetHttpRequestObject();if(null==_){var d=document.createElement("iframe");return d?(d.style.display="none",d.src=u,document.body.appendChild(d),void(d.onload=function(){r(d.contentDocument.body.innerHTML)})):void wfu_Code_Objects[e].do_action("not_supported")}_.open("GET",u,!0),_.onreadystatechange=function(){4==_.readyState&&(200==_.status?r(_.responseText):(alert(GlobalData.consts.remoteserver_noresult),wfu_Code_Objects[e].do_action("askserver_noresult")))},_.send(null)}function wfu_filesselected(e){var a=GlobalData.WFU[e],t=wfu_get_filelist(e);return 0==t.length&&!a.allownofile&&a.textbox_exist&&a.textbox.update("nofile"),t.length}function wfu_get_stored_formdata(e,a){var t=GlobalData.WFU[e];return t.uploadform_exist?t.uploadform.getStoreddata?t.uploadform.getStoreddata(a):document.getElementById(a).value:null}function wfu_set_stored_formdata(e,a,t){var r=GlobalData.WFU[e];if(!r.uploadform_exist)return null;r.uploadform.setStoreddata?r.uploadform.setStoreddata(a,t):document.getElementById(a).value=t}function wfu_check_required_userdata(e,a){for(var t=GlobalData.WFU[e],r=wfu_get_userdata_count(e),s=!1,o=0;o<r;o++){t.userdata.props[o].store();var n="";t.userdata.props[o].required&&(n=t.userdata.codes[o].empty()),""===n&&null!=t.userdata.codes[o].validate&&t.userdata.props[o].validate&&(n=t.userdata.codes[o].validate()),""!==n&&(a&&t.userdata.prompt(t.userdata.props[o],n),s=!0)}return!s}function wfu_HTML5UploadFile(e){var a=GlobalData.WFU[e];if(wfu_BrowserCaps.supportsAJAX)if(wfu_BrowserCaps.supportsHTML5){var t=wfu_GetHttpRequestObject();if(null!=t){var r=wfu_filesselected(e);if(0!=r||a.allownofile)if(0==r&&wfu_selectbutton_clicked(e),a.subfolders_exist&&r>0&&!a.subfolders.check())a.singlebutton&&wfu_clear_files(e);else{var s=r;if(s+=s,wfu_check_required_userdata(e,!0)){if(wfu_Code_Objects[e].apply_filters("pre_start_check",!0)){var o=wfu_randomString(10);if(wfu_lock_upload(e),wfu_Code_Objects[e].do_action("pre_start"),wfu_Code_Objects[e].apply_filters("pre_start_ask_server",!1,a.has_filters?"true":"false")){var n=GlobalData.consts.ajax_url;params=new Array(5),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_ask_server",params[1]=new Array(2),params[1][0]="session_token",params[1][1]=a.session,params[2]=new Array(2),params[2][0]="sid",params[2][1]=e,params[3]=new Array(2),params[3][0]="unique_id",params[3][1]=o,params[4]=new Array(2),params[4][0]="wfu_uploader_nonce",params[4][1]=wfu_get_stored_formdata(e,"wfu_uploader_nonce_"+e);var i=wfu_Code_Objects[e].apply_filters("askserver_pass_params",{});for(var l in i)i.hasOwnProperty(l)&&params.push([l,i[l]]);for(var u="",_=0;_<params.length;_++)u+=(_>0?"&":"")+params[_][0]+"="+encodeURI(params[_][1]);t.open("POST",n,!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onreadystatechange=function(){if(4==t.readyState)if(200==t.status){var a=t.responseText,r="",s=a.indexOf("wfu_askserver_success:"),n=a.indexOf("wfu_askserver_error:");s>-1?(r=a.substr(s+22),wfu_Code_Objects[e].do_action("askserver_success",r,"ajax"),wfu_HTML5UploadFile_cont(e,o)):n>-1&&(r=a.substr(n+20),wfu_unlock_upload(e),wfu_Code_Objects[e].do_action("askserver_error",r))}else alert(GlobalData.consts.remoteserver_noresult),wfu_unlock_upload(e),wfu_Code_Objects[e].do_action("askserver_noresult")},t.send(u)}else wfu_HTML5UploadFile_cont(e,o)}}else a.singlebutton&&wfu_clear_files(e)}}}else wfu_redirect_to_classic(e,1,2);else wfu_redirect_to_classic(e,1,1)}function wfu_HTML5UploadFile_cont(e,a){var t=GlobalData.WFU[e],r=-1;t.subfolders_exist&&(r=t.subfolders.index());var s=wfu_get_filelist(e),o=!1;0==s.length&&t.allownofile&&(o=!0,s=[{name:"dummy.txt",size:0}]);GlobalData.UploadInProgressString+="["+a+"]",GlobalData[e]={},GlobalData[e].unique_id=a,GlobalData[e].last=!1,GlobalData[e].files_count=1,GlobalData[e].files_processed=0,GlobalData[e].upload_state=0,GlobalData[e].nofileupload=o,GlobalData[e].store_nothing=!!t.consent_exist&&"no"==wfu_get_stored_formdata(e,"consentresult_"+e)&&t.not_store_files,GlobalData[e].message=[],GlobalData[e].update_wpfilebase="",GlobalData[e].redirect_link="",GlobalData[e].notify_by_email=0,GlobalData[e].admin_messages={},GlobalData[e].admin_messages.wpfilebase="",GlobalData[e].admin_messages.notify="",GlobalData[e].admin_messages.redirect="",GlobalData[e].admin_messages.debug=[],GlobalData[e].admin_messages.other=[],GlobalData[e].errors={},GlobalData[e].errors.wpfilebase="",GlobalData[e].errors.notify="",GlobalData[e].errors.redirect="",GlobalData[e].xhrs=Array(),GlobalData[e].metricstotal={size:s[0].size,loaded:0,progress_pos:0,start_time:(new Date).getTime(),last_time:0,end_time:0},GlobalData[e].metrics=[{size:s[0].size,loaded:0,progress_pos:0,start_time:0,last_time:0,end_time:0,aborted:!1}],wfu_Code_Objects[e].do_action("update_total_progress",0),t.progressbar_exist&&!o&&t.progressbar.show("progressive"),wfu_attach_cancel_event(e,a);var n=wfu_Initialize_Params();n.general.shortcode_id=e,n.general.unique_id=a,wfu_ProcessUploadComplete(e,0,n,a,"",[!1,null,!1]);var i=!0;!function n(l,u,_,d){i=!0;var c=wfu_GetHttpRequestObject(),f=wfu_GetHttpRequestObject();if(null!=c&&null!=f){var p=null,m=null;try{p=new FormData,m=new FormData}catch(e){}if(null!=p&&null!=m){p.append("action","wfu_ajax_action"),p.append("wfu_uploader_nonce",wfu_get_stored_formdata(e,"wfu_uploader_nonce_"+e)),_||p.append("uploadedfile_"+e,u),s[l].isBlob&&p.append("uploadedfile_"+e+"_isblob",1),p.append("uploadedfile_"+e+"_index",l),p.append("uploadedfile_"+e+"_name",wfu_plugin_encode_string(s[l].name)),p.append("uploadedfile_"+e+"_size",s[l].size),p.append("uniqueuploadid_"+e,a),p.append("params_index",t.params_index),p.append("subdir_sel_index",r),p.append("nofileupload_"+e,o?"1":"0"),_?p.append("only_check","1"):p.append("only_check","0"),p.append("session_token",t.session);var g=wfu_Code_Objects[e].apply_filters("upload_pass_params",{},"ajax");for(var b in g)g.hasOwnProperty(b)&&p.append(b,g[b]);for(var w=wfu_get_userdata_count(e),h=0;h<w;h++)p.append("hiddeninput_"+e+"_userdata_"+h,wfu_get_stored_formdata(e,"hiddeninput_"+e+"_userdata_"+h));if(wfu_initialize_fileupload_xhr(c,e,a,l,s[l].name),c.loading=!0,_||(c.size=u.size,c.totalsize=s[l].size),d){m.append("action","wfu_ajax_action"),m.append("wfu_uploader_nonce",wfu_get_stored_formdata(e,"wfu_uploader_nonce_"+e)),m.append("params_index",t.params_index),m.append("session_token",t.session),m.append("force_connection_close","1"),f.open("POST",GlobalData.consts.ajax_url,!1);try{f.send(m)}catch(e){}i=f.responseText.indexOf("success")>-1}if(i)_?(c.addEventListener("load",(function(a){a={target:{responseText:a.target.responseText,shortcode_id:e,return_status:!0}};var t=wfu_uploadComplete.call(c,a);c.file_id=0,(i="success"==t||"warning"==t)&&!o&&n(l,u,!1,!1)}),!1),c.addEventListener("error",(function(e){}),!1),c.open("POST",GlobalData.consts.ajax_url,!0),c.send(p)):(c.upload.xhr=c,c.upload.dummy=1,c.upload.addEventListener("loadstart",wfu_loadStart,!1),c.upload.addEventListener("progress",new Function("evt","wfu_uploadProgress(evt, "+e+", "+c.xhrid+", "+(t.debugmode?"true":"false")+");"),!1),c.addEventListener("load",wfu_uploadComplete,!1),c.addEventListener("error",new Function("evt","wfu_uploadFailed(evt, "+(t.debugmode?"true":"false")+");"),!1),c.addEventListener("abort",wfu_uploadCanceled,!1),c.open("POST",GlobalData.consts.ajax_url,!0),c.send(p));else{var v={target:{responseText:"",shortcode_id:e}};wfu_uploadComplete.call(c,v)}return i}}}(0,s[0],!0,!1)}function wfu_initialize_fileupload_xhr(e,a,t,r,s){var o=GlobalData.WFU[a],n=r>=0?GlobalData[a].xhrs.push(e)-1:-1,i=new Date;e.xhrid=n,e.shortcode_id=a,e.requesttype=r>=0?"fileupload":"email",e.file_id=r+1,e.size=0,e.totalsize=0,e.loading=!1,e.deltasize=0,e.deltaloaded=0,e.sizeloaded=0,e.aborted=!1,e.unique_id=t,e.start_time=i.getTime(),e.end_time=e.start_time,e.finish_time=e.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),e.success_message_header=o.success_header.replace(/%username%/g,"no data"),e.success_message_header=e.success_message_header.replace(/%useremail%/g,"no data"),e.success_message_header=e.success_message_header.replace(/%filename%/g,s),e.success_message_header=e.success_message_header.replace(/%filepath%/g,s),e.error_message_header=o.error_header.replace(/%username%/g,"no data"),e.error_message_header=e.error_message_header.replace(/%useremail%/g,"no data"),e.error_message_header=e.error_message_header.replace(/%filename%/g,s),e.error_message_header=e.error_message_header.replace(/%filepath%/g,s),e.error_message_failed=GlobalData.consts.message_failed,e.error_message_cancelled=GlobalData.consts.message_cancelled,e.error_adminmessage_unknown=GlobalData.consts.adminmessage_unknown.replace(/%username%/g,"no data"),e.error_adminmessage_unknown=e.error_adminmessage_unknown.replace(/%useremail%/g,"no data"),e.error_adminmessage_unknown=e.error_adminmessage_unknown.replace(/%filename%/g,s),e.error_adminmessage_unknown=e.error_adminmessage_unknown.replace(/%filepath%/g,s)}function wfu_get_userdata_count(e){var a=GlobalData.WFU[e],t=0;return a.userdata_exist&&(t=a.userdata.props.length),t}function wfu_lock_upload(e){var a=GlobalData.WFU[e];a.textbox_exist&&a.textbox.update("lock"),a.uploadform_exist&&a.uploadform.lock(),a.subfolders_exist&&a.subfolders.toggle(!1),a.submit_exist&&a.submit.toggle(!1);for(var t=wfu_get_userdata_count(e),r=0;r<t;r++)a.userdata.codes[r].lock();wfu_Code_Objects[e].do_action("lock_upload")}function wfu_unlock_upload(e){var a=GlobalData.WFU[e];a.textbox_exist&&a.textbox.update("unlock"),a.uploadform_exist&&a.uploadform.unlock(),a.subfolders_exist&&a.subfolders.toggle(!0),a.submit_exist&&a.submit.toggle(!0);for(var t=wfu_get_userdata_count(e),r=0;r<t;r++)a.userdata.codes[r].unlock();wfu_Code_Objects[e].do_action("unlock_upload")}function wfu_clear_files(e){var a=GlobalData.WFU[e];a.uploadform_exist&&a.uploadform.reset(),void 0!==a.filearray&&(a.filearray.length=0,a.filearrayprops.length=0),a.textbox_exist&&a.textbox.update("clear"),a.webcam_exist&&wfu_reinitialize_webcam(e)}function wfu_check_reset(e){var a=GlobalData.WFU[e],t=GlobalData[e];return"always"==a.resetmode||"never"!=a.resetmode&&("onsuccess"==a.resetmode?[4,5,6,14].indexOf(t.upload_state)>-1:"onfullsuccess"!=a.resetmode||[4,5,14].indexOf(t.upload_state)>-1)}function wfu_clear(e){var a=GlobalData.WFU[e],t=wfu_check_reset(e);if(wfu_clear_files(e),t){a.subfolders_exist&&a.subfolders.reset();for(var r=wfu_get_userdata_count(e),s=0;s<r;s++)a.userdata.codes[s].reset();a.uploadform_exist&&a.uploadform.resetDummy()}wfu_Code_Objects[e].do_action("clear_upload")}function wfu_invoke_shortcode_editor(e){var a=e.shortcode_id,t=0,r=GlobalData.WFU.n,s="wfu_uploader_editor_nonce_"+a;"wordpress_file_upload_browser"==e.shortcode_tag&&(r=GlobalData.WFUB.n,s="wfu_browser_editor_nonce_"+a);for(var o=0;o<r.length;o++)r[o]==a&&t++;if(0!=t)if(t>1)alert(GlobalData.consts.same_pluginid);else{var n=wfu_GetHttpRequestObject();if(null!=n){e.visualeditorbutton.update("on_invoke");var i=GlobalData.consts.ajax_url;params=new Array(7),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_edit_shortcode",params[1]=new Array(2),params[1][0]="upload_id",params[1][1]=a,params[2]=new Array(2),params[2][0]="post_id",params[2][1]=e.post_id,params[3]=new Array(2),params[3][0]="post_hash",params[3][1]=e.post_hash,params[4]=new Array(2),params[4][0]="shortcode_tag",params[4][1]=e.shortcode_tag,params[5]=new Array(2),params[5][0]="widget_id",params[5][1]=e.widgetid?e.widgetid:"",params[6]=new Array(2),params[6][0]="nonce",params[6][1]=document.getElementById(s).value;var l="";for(o=0;o<params.length;o++)l+=(o>0?"&":"")+params[o][0]+"="+encodeURI(params[o][1]);n.open("POST",i,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){if(4==n.readyState&&200==n.status){e.visualeditorbutton.update("on_open");var a=n.responseText.indexOf("wfu_edit_shortcode:");-1==a&&(a=n.responseText.length),n.responseText.substr(0,a);var t=n.responseText.substr(a+19,n.responseText.length-a-19);a=t.indexOf(":");var r=t.substr(0,a);if(txt_value=t.substr(a+1,t.length-a-1),"success"==r){var s=window.open(wfu_plugin_decode_string(txt_value),"_blank");s?s.plugin_window=window:alert(GlobalData.consts.enable_popups)}else"check_page_obsolete"==r&&alert(txt_value)}},n.send(l)}}}GlobalData={},Code_Initializators=[],GlobalData.WFU={n:[]},GlobalData.WFUB={n:[]},GlobalData.filestatematch={},GlobalData.filestatematch.success=[0,1,2,2],GlobalData.filestatematch.warning=[1,1,2,2],GlobalData.filestatematch.error1=[3,3,2,3],GlobalData.filestatematch.error2=[2,2,2,3],GlobalData.UploadInProgressString="",GlobalData.FreeChangeHandler=!1,wfu_Check_Browser_Capabilities(),"undefined"==typeof wfu_js_decode_obj&&(wfu_js_decode_obj=function(e){var a=null;if("window"==e)a=window;else{var t=String.fromCharCode(92),r=e.match(new RegExp("GlobalData("+t+".(WFU|WFUB)"+t+"[(.*?)"+t+"]("+t+".(.*))?)?$"));r&&(a=GlobalData,r[3]&&(a=a[r[2]][r[3]]),r[5]&&(a=a[r[5]]))}return a}),Code_Initializators[Code_Initializators.length]=function(sid){var CBUV_Code_Objects={pre_start_check:function(e){if(!e)return e;var a=this.sid,t=!0;return GlobalData.WFU[a].consent_exist&&("prompt"!=GlobalData.WFU[a].consent.consent_format&&""==wfu_get_stored_formdata(a,"consentresult_"+a)?(alert(GlobalData.consts.wfu_consent_notcompleted),t=!1):"prompt"==GlobalData.WFU[a].consent.consent_format&&(wfu_set_stored_formdata(a,"consentresult_"+a,confirm(GlobalData.WFU[a].consent.consent_question)?"yes":"no"),t=!0),GlobalData.WFU[a].consent.no_rejects_upload&&"no"==wfu_get_stored_formdata(a,"consentresult_"+a)&&(alert(GlobalData.WFU[a].consent_rejection_message),t=!1)),t},pre_start_ask_server:function(e,a){if(e)return e;var t=this.sid,r=GlobalData.WFU[t].consent_maybe_ask_server&&!GlobalData.WFU[t].consent_exist;return"true"==a||r},askserver_pass_params:function(e){for(var a=this.sid,t=wfu_get_filelist(a),r="",s="",o=0;o<t.length;o++)o>0&&(r+=";",s+=";"),r+=wfu_plugin_encode_string(t[o].name),s+=t[o].size;var n=[],i=wfu_get_userdata_count(a);for(o=0;o<i;o++)n.push("_"+wfu_plugin_encode_string(wfu_get_stored_formdata(a,"hiddeninput_"+a+"_userdata_"+o)));return e.filenames=r,e.filesizes=s,e.userdata=n.join(";"),GlobalData.WFU[a].consent_maybe_ask_server&&!GlobalData.WFU[a].consent_exist&&(e.consent_check="1",e.consent_rejection_message=GlobalData.WFU[a].consent_rejection_message),e},askserver_success:function(response,mode){var sid=this.sid,upload_status="success",txt_match=response.match(/CBUVJS\[(.*?)\]/),txt_header=txt_match&&void 0!==txt_match[1]?txt_match[1]:"";""!=txt_header&&eval(wfu_plugin_decode_string(txt_header))},askserver_error:function(response,mode){var sid=this.sid,upload_status="error",txt_match=response.match(/CBUVJS\[(.*?)\]/),txt_header=txt_match&&void 0!==txt_match[1]?txt_match[1]:"";if(""!=txt_header&&eval(wfu_plugin_decode_string(txt_header)),txt_match=response.match(/CBUV\[(.*?)\]/),txt_header=txt_match&&void 0!==txt_match[1]?txt_match[1]:"",""!=txt_header){var Params=wfu_Initialize_Params();GlobalData[sid]={},Params.general.shortcode_id=sid,Params.general.message=txt_header,Params.general.state=12,wfu_ProcessUploadComplete(sid,0,Params,"no-ajax","",[!1,null,!1]),wfu_clear(sid)}},lock_upload:function(){var e=this.sid;GlobalData.WFU[e].consent_exist&&GlobalData.WFU[e].consent.update("lock")},unlock_upload:function(){var e=this.sid;GlobalData.WFU[e].consent_exist&&GlobalData.WFU[e].consent.update("unlock")},clear_upload:function(){var e=this.sid,a=GlobalData.WFU[e];a.consent_exist&&(a.consent.remember_consent?(a.consent.update("clear"),a.consent_exist=!1):a.consent.update("init"))},upload_pass_params:function(e,a){var t=this.sid;return GlobalData.WFU[t].consent_exist&&(e.consent_result=wfu_get_stored_formdata(t,"consentresult_"+t)),e},after_upload:function(response){var sid=this.sid,txt_match=response.match(/CBUVJS\[(.*?)\]/),txt_header=txt_match&&void 0!==txt_match[1]?txt_match[1]:"";""!=txt_header&&eval(wfu_plugin_decode_string(txt_header))}};return CBUV_Code_Objects},Code_Initializators[Code_Initializators.length]=function(e){var a={pre_load:function(e){var a=this.sid,t=GlobalData.WFU[a];t.RR||(t.RR=e=>{let a;return t.R?t.R[e]?a=t.R[e]:console.log("Template "+e+" not loaded yet"):console.log("React not loaded yet when loading "+e),a})}};return a},wfu_create_react_dom=(e,a)=>{var t=("shadow-dom"==a.forceSpecificity?document.getElementById("wordpress_file_upload_block_"+a.ID).dom:document).getElementById(e);a.root=(a.root??[]).concat([t])},wfu_render_react_component=e=>{window.WFUReact?window.WFUReact[e.slot](e):(GlobalData.reactLoadSlots||(GlobalData.reactLoadSlots=[]),GlobalData.reactLoadSlots.push(e))},wfu_initialize_webcam=function(e,a,t,r,s,o,n,i,l,u){"undefined"==typeof wfu_parse_video_width&&(wfu_parse_video_width=function(e){var a=parseInt(e);a>0&&(this.empty=!1,this.video.width={ideal:a})}),"undefined"==typeof wfu_parse_video_height&&(wfu_parse_video_height=function(e){var a=parseInt(e);a>0&&(this.empty=!1,this.video.height={ideal:a})}),"undefined"==typeof wfu_parse_video_aspectratio&&(wfu_parse_video_aspectratio=function(e){var a=parseFloat(e);a>0&&(this.empty=!1,this.video.aspectRatio=a)}),"undefined"==typeof wfu_parse_video_framerate&&(wfu_parse_video_framerate=function(e){var a=parseFloat(e);a>0&&(this.empty=!1,this.video.frameRate=a)}),"undefined"==typeof wfu_parse_video_facingmode&&(wfu_parse_video_facingmode=function(e){var a="front"==e?"user":"back"==e?"environment":"";""!=a&&(this.empty=!1,this.video.facingMode=a)});var _={empty:!0,video:{}};wfu_parse_video_width.call(_,r),wfu_parse_video_height.call(_,s),wfu_parse_video_aspectratio.call(_,o),wfu_parse_video_framerate.call(_,n),wfu_parse_video_facingmode.call(_,i);var d={mode:a,audio:"true"==t,video:!!_.empty||_.video,maxrecordtime:l};if(GlobalData.WFU[e].webcamProps=d,u??=!1,u){wfu_webcam_init_callback(e);var c=GlobalData.WFU[e].webcam;c.initButtons(a),c.updateStatus("off")}else wfu_reinitialize_webcam(e)},wfu_reinitialize_webcam=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;t.active=!0,t.width=0,t.height=0,t.timeStart=0,t.duration=0,t.counting=!1,t.stream=null,t.media=null,t.blobs=null,t.playing=!1;var r=t;a.updateStatus("idle");var s={audio:r.audio,video:r.video};"undefined"==typeof Promise&&(Promise=function(e){this.mainCallback=e,this.then=function(e){return this.successCallback=e,this},this.catch=function(a){e(this.successCallback,a)}},PromiseRejected=function(e){this.then=function(e){return this},this.catch=function(a){a(e)}},Promise.reject=function(e){return new PromiseRejected(e)}),void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e,a,t){var r=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return r&&"undefined"!=typeof MediaRecorder?new Promise((function(a,t){r.call(navigator,e,a,t)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia(s).then((function(s){t.stream=s,a.setVideoProperties({autoplay:!0,ontimeupdate:null,onerror:null,onloadeddata:function(a){wfu_webcam_init_callback(e)},srcObject:s}),a.initButtons(r.mode)})).catch((function(e){console.log("Video not supported!",e),a.updateStatus("video_notsupported")}))},wfu_webcam_init_callback=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps,r=a.videoSize();t.width=r.width,t.height=r.height,a.initCallback()},wfu_webcam_counter_status=function(e,a){var t=GlobalData.WFU[e].webcamProps;if("start"==a){var r=new Date;t.duration=0,t.timeStart=r.getTime()/1e3,t.counting=!0,wfu_webcam_update_counter(e)}else r=new Date,t.duration=r.getTime()/1e3-t.timeStart,t.counting=!1},wfu_webcam_update_counter=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;if(t.counting){var r=(new Date).getTime()/1e3-t.timeStart;a.updateTimer(r),setTimeout((function(){wfu_webcam_update_counter(e)}),100)}},wfu_webcam_video_devices=function(e){return GlobalData.WFU[e].webcamProps,navigator.mediaDevices?.enumerateDevices?navigator.mediaDevices.enumerateDevices().then((e=>{var a=[];return e.forEach((e=>{"videoinput"==e.kind&&a.push(e.deviceId)})),0==a.length&&(a=null),a})).catch((e=>(console.error(`${e.name}: ${e.message}`),null))):new Promise((e=>e(null)))},wfu_webcam_switch_devices=function(e){var a=GlobalData.WFU[e].webcamProps;!0===a.video&&(a.video={}),wfu_webcam_video_devices(e).then((t=>{if(null!=t&&t.length>0){if(a.videoDeviceId){var r=t.indexOf(a.videoDeviceId)+1;r>=t.length&&(r=0),a.videoDeviceId=t[r]}else a.videoDeviceId=t[0];a.video.deviceId=a.videoDeviceId,wfu_webcam_reset_stream(e),wfu_reinitialize_webcam(e)}else wfu_webcam_switch(e)}))},wfu_webcam_switch=function(e){var a=GlobalData.WFU[e].webcamProps;!0===a.video&&(a.video={});var t=null;a.video.facingMode&&(t=a.video.facingMode),a.video.facingMode="environment"==t?"user":"environment",wfu_webcam_reset_stream(e),wfu_reinitialize_webcam(e)},wfu_webcam_reset_stream=function(e){var a=GlobalData.WFU[e].webcamProps;null!=a.stream&&a.stream.getTracks&&a.stream.getTracks().forEach((function(e){e.stop()}))},wfu_webcam_onoff=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;t.active?(a.updateStatus("off"),wfu_webcam_reset_stream(e),t.stream=null,t.media=null,t.blobs=null,t.active=!1):(wfu_webcam_reset_stream(e),wfu_reinitialize_webcam(e)),wfu_selectbutton_clicked(e)},wfu_webcam_golive=function(e){GlobalData.WFU[e].webcamProps.playing||(wfu_webcam_reset_stream(e),wfu_reinitialize_webcam(e),wfu_add_files(e,[],!1),wfu_selectbutton_clicked(e),wfu_update_uploadbutton_status(e))},wfu_webcam_start_rec=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;if(!t.media||!t.media.state||"recording"!=t.media.state){var r=wfu_mediarecorder_mimetype(e);if(null!=r){try{t.media=new MediaRecorder(t.stream,{mimeType:r})}catch(e){return void alert(GlobalData.consts.webcam_video_notsupported)}t.blobs=[],t.media.ondataavailable=function(a){var r=(new Date).getTime()/1e3-t.timeStart;-1==t.maxrecordtime||t.maxrecordtime>0&&r<=t.maxrecordtime?a.data&&a.data.size>0&&t.blobs.push(a.data):wfu_webcam_stop_rec(e)},a.updateButtonStatus("recording"),wfu_webcam_counter_status(e,"start"),t.media.onstop=function(t){wfu_webcam_counter_status(e,"stop"),a.updateButtonStatus("after_recording"),wfu_webcam_onstop(t,e)},t.media.start(10)}else alert(GlobalData.consts.webcam_video_notsupported)}},wfu_webcam_stop_rec=function(e){GlobalData.WFU[e].webcamProps.media.stop()},wfu_webcam_onstop=function(e,a){var t=GlobalData.WFU[a].webcam,r=GlobalData.WFU[a].webcamProps;if(0==r.blobs.length)alert(GlobalData.consts.webcam_video_nothingrecorded),wfu_webcam_golive(a);else{r.stream&&t.screenshot();var s=new Blob(r.blobs,{type:"video/mp4"});t.setVideoProperties({autoplay:!!/iPad|iPhone|iPod/.test(navigator.userAgent),ontimeupdate:function(e){wfu_webcam_update_pos(a)},onended:function(e){wfu_webcam_ended(a)},onloadeddata:function(e){wfu_webcam_pause(a),t.readyState()>=2&&t.updateButtonStatus("ready_playback")},onerror:function(e){t.setVideoProperties({onloadeddata:null,srcObject:r.stream})},srcObject:s}),s.name="videostream.mp4",s.isBlob=!0,wfu_add_files(a,[{file:s,props:{}}],!1),wfu_update_filename_text(a),wfu_update_uploadbutton_status(a)}},wfu_webcam_play=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;t.playing||(a.updateButtonStatus("playing"),t.playing=!0,a.play())},wfu_webcam_ended=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;a.ended(),a.updateButtonStatus("ready_playback"),t.playing=!1},wfu_webcam_pause=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;a.pause(),a.updateButtonStatus("ready_playback"),t.playing=!1},wfu_webcam_back=function(e){GlobalData.WFU[e].webcam.back()},wfu_webcam_fwd=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;a.fwd(t.duration)},wfu_webcam_update_preview=function(e){if(GlobalData.WFU[e].webcam_exist){var a=wfu_get_filelist(e);0!=a&&GlobalData.WFU[e].webcam.updateImage(a[0])}},wfu_webcam_take_picture=function(e){var a=GlobalData.WFU[e].webcam;GlobalData.WFU[e].webcamProps.stream&&(a.screenshot((function(a){a.name="screenshot.png",a.isBlob=!0,wfu_add_files(e,[{file:a,props:{}}],!1),wfu_update_filename_text(e),wfu_update_uploadbutton_status(e)}),"image/png"),a.updateButtonStatus("after_screenshot"))},wfu_webcam_screenshot_error=function(e){GlobalData.WFU[e].webcam.initButtons(GlobalData.WFU[e].webcamProps.mode)},wfu_webcam_update_pos=function(e){var a=GlobalData.WFU[e].webcam,t=GlobalData.WFU[e].webcamProps;a.updatePlayProgress(t.duration),a.updateTimer()},wfu_webcam_init_svginjector=function(){!function(e,a){"use strict";var t="file:"===e.location.protocol,r=a.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),s=Array.prototype.forEach||function(e,a){if(null==this||"function"!=typeof e)throw new TypeError;var t,r=this.length>>>0;for(t=0;r>t;++t)t in this&&e.call(a,this[t],t,this)},o={},n=0,i=[],l=[],u={},_=function(e){return e.cloneNode(!0)},d=function(e,a){l[e]=l[e]||[],l[e].push(a)},c=function(a,r){if(void 0!==o[a])o[a]instanceof SVGSVGElement?r(_(o[a])):d(a,r);else{if(!e.XMLHttpRequest)return r("Browser does not support XMLHttpRequest"),!1;o[a]={},d(a,r);var s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState){if(404===s.status||null===s.responseXML)return r("Unable to load SVG file: "+a),t&&r("Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver."),r(),!1;if(!(200===s.status||t&&0===s.status))return r("There was a problem injecting the SVG: "+s.status+" "+s.statusText),!1;if(s.responseXML instanceof Document)o[a]=s.responseXML.documentElement;else if(DOMParser&&DOMParser instanceof Function){var e;try{e=(new DOMParser).parseFromString(s.responseText,"text/xml")}catch(a){e=void 0}if(!e||e.getElementsByTagName("parsererror").length)return r("Unable to parse SVG file: "+a),!1;o[a]=e.documentElement}!function(e){for(var a=0,t=l[e].length;t>a;a++)!function(a){setTimeout((function(){l[e][a](_(o[e]))}),0)}(a)}(a)}},s.open("GET",a),s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()}},f=function(a,t,o,l){var _=a.getAttribute("data-src")||a.getAttribute("src");if(/\.svg/i.test(_))if(r)-1===i.indexOf(a)&&(i.push(a),a.setAttribute("src",""),c(_,(function(r){if(void 0===r||"string"==typeof r)return l(r),!1;var o=a.getAttribute("id");o&&r.setAttribute("id",o);var d=a.getAttribute("title");d&&r.setAttribute("title",d);var c=[].concat(r.getAttribute("class")||[],"injected-svg",a.getAttribute("class")||[]).join(" ");r.setAttribute("class",function(e){for(var a={},t=(e=e.split(" ")).length,r=[];t--;)a.hasOwnProperty(e[t])||(a[e[t]]=1,r.unshift(e[t]));return r.join(" ")}(c));var f=a.getAttribute("style");f&&r.setAttribute("style",f);var p=[].filter.call(a.attributes,(function(e){return/^data-\w[\w\-]*$/.test(e.name)}));s.call(p,(function(e){e.name&&e.value&&r.setAttribute(e.name,e.value)}));var m,g,b,w,h,v={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(v).forEach((function(e){m=e,b=v[e];for(var a=0,t=(g=r.querySelectorAll("defs "+m+"[id]")).length;t>a;a++){var o;w=g[a].id,h=w+"-"+n,s.call(b,(function(e){for(var a=0,t=(o=r.querySelectorAll("["+e+'*="'+w+'"]')).length;t>a;a++)o[a].setAttribute(e,"url(#"+h+")")})),g[a].id=h}})),r.removeAttribute("xmlns:a");for(var G,y,x=r.querySelectorAll("script"),D=[],k=0,P=x.length;P>k;k++)(y=x[k].getAttribute("type"))&&"application/ecmascript"!==y&&"application/javascript"!==y||(G=x[k].innerText||x[k].textContent,D.push(G),r.removeChild(x[k]));if(D.length>0&&("always"===t||"once"===t&&!u[_])){for(var U=0,F=D.length;F>U;U++)new Function(D[U])(e);u[_]=!0}var j=r.querySelectorAll("style");s.call(j,(function(e){e.textContent+=""})),a.parentNode.replaceChild(r,a),delete i[i.indexOf(a)],a=null,n++,l(r)})));else{var d=a.getAttribute("data-fallback")||a.getAttribute("data-png");d?(a.setAttribute("src",d),l(null)):o?(a.setAttribute("src",o+"/"+_.split("/").pop().replace(".svg",".png")),l(null)):l("This browser does not support SVG and no PNG fallback was defined.")}else l("Attempted to inject a file with a non-svg extension: "+_)},p=function(e,a,t){var r=(a=a||{}).evalScripts||"always",o=a.pngFallback||!1,n=a.each;if(void 0!==e.length){var i=0;s.call(e,(function(a){f(a,r,o,(function(a){n&&"function"==typeof n&&n(a),t&&e.length===++i&&t(i)}))}))}else e?f(e,r,o,(function(a){n&&"function"==typeof n&&n(a),t&&t(1),e=null})):t&&t(0)};"object"==typeof module&&"object"==typeof module.exports?module.exports=exports=p:"function"==typeof define&&define.amd?define((function(){return p})):"object"==typeof e&&(e.SVGInjector=p)}(window,document)},wfu_webcam_initialize_toBlob=function(){!function(e){"use strict";var a=e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype,t=e.Blob&&function(){try{return Boolean(new Blob)}catch(e){return!1}}(),r=t&&e.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(e){return!1}}(),s=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,o=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,n=(t||s)&&e.atob&&e.ArrayBuffer&&e.Uint8Array&&function(e){var a,n,i,l,u,_,d,c,f;if(!(a=e.match(o)))throw new Error("invalid data URI");for(n=a[2]?a[1]:"text/plain"+(a[3]||";charset=US-ASCII"),i=!!a[4],l=e.slice(a[0].length),u=i?atob(l):decodeURIComponent(l),_=new ArrayBuffer(u.length),d=new Uint8Array(_),c=0;c<u.length;c+=1)d[c]=u.charCodeAt(c);return t?new Blob([r?d:_],{type:n}):((f=new s).append(_),f.getBlob(n))};e.HTMLCanvasElement&&!a.toBlob&&(a.mozGetAsFile?a.toBlob=function(e,t,r){e(r&&a.toDataURL&&n?n(this.toDataURL(t,r)):this.mozGetAsFile("blob",t))}:a.toDataURL&&n&&(a.toBlob=function(e,a,t){e(n(this.toDataURL(a,t)))})),"function"==typeof define&&define.amd?define((function(){return n})):"object"==typeof module&&module.exports?module.exports=n:e.dataURLtoBlob=n}(window),window.wfu_toBlob_function_initialized=!0},wfu_mediarecorder_mimetype=function(e){var a=["webm","mp4","x-matroska","ogg"],t=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","mpeg","theora"],r=["opus","vorbis","aac","mpeg","mp4a","pcm"],s=GlobalData.WFU[e].webcamProps,o=null;if(""!=GlobalData.consts.notify_testmode.wfu_mediarecorder_mimetype&&MediaRecorder.isTypeSupported(GlobalData.consts.notify_testmode.wfu_mediarecorder_mimetype))return GlobalData.consts.notify_testmode.wfu_mediarecorder_mimetype;if(!0===s.audio)for(var n=0;n<a.length;++n){for(var i=a[n],l=0;l<t.length;++l){for(var u=t[l],_=0;_<r.length;++_){var d=`video/${i};codecs=${u},${r[_]}`;if(MediaRecorder.isTypeSupported(d)){o=d;break}}if(null!=o)break}if(null!=o)break}else for(n=0;n<a.length;++n){for(i=a[n],l=0;l<t.length;++l)if(d=`video/${i};codecs=${u=t[l]}`,MediaRecorder.isTypeSupported(d)){o=d;break}if(null!=o)break}return o},wfu_run_js_from_bank();
// source --> https://brunsham.nl/wp-includes/js/jquery/ui/core.min.js?ver=1.13.3 
/*! jQuery UI - v1.13.3 - 2024-04-26
* https://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
/*!
 * jQuery UI :data 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
/*!
 * jQuery UI Disable Selection 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
/*!
 * jQuery UI Focusable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
/*!
 * jQuery UI Form Reset Mixin 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
/*!
 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 */
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
/*!
 * jQuery UI Keycode 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
/*!
 * jQuery UI Labels 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
/*!
 * jQuery UI Position 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 * https://api.jqueryui.com/position/
 */
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
/*!
 * jQuery UI Scroll Parent 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
/*!
 * jQuery UI Tabbable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
/*!
 * jQuery UI Unique ID 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
/*!
 * jQuery UI Widget 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
// source --> https://brunsham.nl/wp-includes/js/jquery/ui/datepicker.min.js?ver=1.13.3 
/*!
 * jQuery UI Datepicker 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../keycode"],e):e(jQuery)}(function(V){"use strict";var n;function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=a(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",t,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",t,d)}function d(){V.datepicker._isDisabledDatepicker((n.inline?n.dpDiv.parent():n.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function c(e,t){for(var a in V.extend(e,t),t)null==t[a]&&(e[a]=t[a])}return V.extend(V.ui,{datepicker:{version:"1.13.3"}}),V.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return c(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var a,i=e.nodeName.toLowerCase(),s="div"===i||"span"===i;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(a=this._newInst(V(e),s)).settings=V.extend({},t||{}),"input"===i?this._connectDatepicker(e,a):s&&this._inlineDatepicker(e,a)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?a(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var a=V(e);t.append=V([]),t.trigger=V([]),a.hasClass(this.markerClassName)||(this._attachments(a,t),a.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(t),V.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var a,i=this._get(t,"appendText"),s=this._get(t,"isRTL");t.append&&t.append.remove(),i&&(t.append=V("<span>").addClass(this._appendClass).text(i),e[s?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(i=this._get(t,"showOn"))&&"both"!==i||e.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(i=this._get(t,"buttonText"),a=this._get(t,"buttonImage"),this._get(t,"buttonImageOnly")?t.trigger=V("<img>").addClass(this._triggerClass).attr({src:a,alt:i,title:i}):(t.trigger=V("<button type='button'>").addClass(this._triggerClass),a?t.trigger.html(V("<img>").attr({src:a,alt:i,title:i})):t.trigger.text(i)),e[s?"before":"after"](t.trigger),t.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===e[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==e[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,a,i,s,r,n;this._get(e,"autoSize")&&!e.inline&&(r=new Date(2009,11,20),(n=this._get(e,"dateFormat")).match(/[DM]/)&&(r.setMonth((t=function(e){for(s=i=a=0;s<e.length;s++)e[s].length>a&&(a=e[s].length,i=s);return i})(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length))},_inlineDatepicker:function(e,t){var a=V(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(t.dpDiv),V.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,a,i,s){var r,n=this._dialogInst;return n||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(n=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",n)),c(n.settings,i||{}),t=t&&t.constructor===Date?this._formatDate(n,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(r=document.documentElement.clientWidth,i=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[r/2-100+t,i/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",n),this},_destroyDatepicker:function(e){var t,a=V(e),i=V.data(e,"datepicker");a.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),V.removeData(e,"datepicker"),"input"===t?(i.append.remove(),i.trigger.remove(),a.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||a.removeClass(this.markerClassName).empty(),n===i)&&(n=null,this._curInst=null)},_enableDatepicker:function(t){var e,a=V(t),i=V.data(t,"datepicker");a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,a=V(t),i=V.data(t,"datepicker");a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(e)for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return V.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,a){var i,s,r=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?V.extend({},V.datepicker._defaults):r?"all"===t?V.extend({},r.settings):this._get(r,t):null;i=t||{},"string"==typeof t&&((i={})[t]=a),r&&(this._curInst===r&&this._hideDatepicker(),t=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(r,"min"),s=this._getMinMaxDate(r,"max"),c(r.settings,i),null!==a&&void 0!==i.dateFormat&&void 0===i.minDate&&(r.settings.minDate=this._formatDate(r,a)),null!==s&&void 0!==i.dateFormat&&void 0===i.maxDate&&(r.settings.maxDate=this._formatDate(r,s)),"disabled"in i&&(i.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(V(e),r),this._autoSize(r),this._setDate(r,t),this._updateAlternate(r),this._updateDatepicker(r))},_changeDatepicker:function(e,t,a){this._optionDatepicker(e,t,a)},_refreshDatepicker:function(e){e=this._getInst(e);e&&this._updateDatepicker(e)},_setDateDatepicker:function(e,t){e=this._getInst(e);e&&(this._setDate(e,t),this._updateDatepicker(e),this._updateAlternate(e))},_getDateDatepicker:function(e,t){e=this._getInst(e);return e&&!e.inline&&this._setDateFromField(e,t),e?this._getDate(e):null},_doKeyDown:function(e){var t,a,i=V.datepicker._getInst(e.target),s=!0,r=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,V.datepicker._datepickerShowing)switch(e.keyCode){case 9:V.datepicker._hideDatepicker(),s=!1;break;case 13:return(a=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",i.dpDiv))[0]&&V.datepicker._selectDay(e.target,i.selectedMonth,i.selectedYear,a[0]),(a=V.datepicker._get(i,"onSelect"))?(t=V.datepicker._formatDate(i),a.apply(i.input?i.input[0]:null,[t,i])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(e.target,e.ctrlKey?-V.datepicker._get(i,"stepBigMonths"):-V.datepicker._get(i,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(e.target,e.ctrlKey?+V.datepicker._get(i,"stepBigMonths"):+V.datepicker._get(i,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&V.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&V.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,r?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&V.datepicker._adjustDate(e.target,e.ctrlKey?-V.datepicker._get(i,"stepBigMonths"):-V.datepicker._get(i,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,r?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&V.datepicker._adjustDate(e.target,e.ctrlKey?+V.datepicker._get(i,"stepBigMonths"):+V.datepicker._get(i,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?V.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,a=V.datepicker._getInst(e.target);if(V.datepicker._get(a,"constrainInput"))return a=V.datepicker._possibleChars(V.datepicker._get(a,"dateFormat")),t=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||t<" "||!a||-1<a.indexOf(t)},_doKeyUp:function(e){e=V.datepicker._getInst(e.target);if(e.input.val()!==e.lastVal)try{V.datepicker.parseDate(V.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,V.datepicker._getFormatConfig(e))&&(V.datepicker._setDateFromField(e),V.datepicker._updateAlternate(e),V.datepicker._updateDatepicker(e))}catch(e){}return!0},_showDatepicker:function(e){var t,a,i,s;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=V("input",e.parentNode)[0]),V.datepicker._isDisabledDatepicker(e)||V.datepicker._lastInput===e||(s=V.datepicker._getInst(e),V.datepicker._curInst&&V.datepicker._curInst!==s&&(V.datepicker._curInst.dpDiv.stop(!0,!0),s)&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0]),!1===(a=(a=V.datepicker._get(s,"beforeShow"))?a.apply(e,[e,s]):{}))||(c(s.settings,a),s.lastVal=null,V.datepicker._lastInput=e,V.datepicker._setDateFromField(s),V.datepicker._inDialog&&(e.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(e),V.datepicker._pos[1]+=e.offsetHeight),t=!1,V(e).parents().each(function(){return!(t|="fixed"===V(this).css("position"))}),a={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(s),a=V.datepicker._checkOffset(s,a,t),s.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":t?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),s.inline)||(a=V.datepicker._get(s,"showAnim"),i=V.datepicker._get(s,"duration"),s.dpDiv.css("z-index",function(e){for(var t;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(t=parseInt(e.css("zIndex"),10),!isNaN(t))&&0!==t)return t;e=e.parent()}return 0}(V(e))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[a]?s.dpDiv.show(a,V.datepicker._get(s,"showOptions"),i):s.dpDiv[a||"show"](a?i:null),V.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),V.datepicker._curInst=s)},_updateDatepicker:function(e){this.maxRows=4,(n=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,a=this._getNumberOfMonths(e),i=a[1],s=e.dpDiv.find("."+this._dayOverClass+" a"),r=V.datepicker._get(e,"onUpdateDatepicker");0<s.length&&d.apply(s.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<i&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"),e.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year").first().replaceWith(e.yearshtml),t=e.yearshtml=null},0)),r&&r.apply(e.input?e.input[0]:null,[e])},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,a){var i=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,n=e.input?e.input.outerHeight():0,d=document.documentElement.clientWidth+(a?0:V(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:V(document).scrollTop());return t.left-=this._get(e,"isRTL")?i-r:0,t.left-=a&&t.left===e.input.offset().left?V(document).scrollLeft():0,t.top-=a&&t.top===e.input.offset().top+n?V(document).scrollTop():0,t.left-=Math.min(t.left,d<t.left+i&&i<d?Math.abs(t.left+i-d):0),t.top-=Math.min(t.top,c<t.top+s&&s<c?Math.abs(s+n):0),t},_findPos:function(e){for(var t=this._getInst(e),a=this._get(t,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||V.expr.pseudos.hidden(e));)e=e[a?"previousSibling":"nextSibling"];return[(t=V(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,a,i=this._curInst;!i||e&&i!==V.data(e,"datepicker")||this._datepickerShowing&&(e=this._get(i,"showAnim"),a=this._get(i,"duration"),t=function(){V.datepicker._tidyDialog(i)},V.effects&&(V.effects.effect[e]||V.effects[e])?i.dpDiv.hide(e,V.datepicker._get(i,"showOptions"),a,t):i.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?a:null,t),e||t(),this._datepickerShowing=!1,(a=this._get(i,"onClose"))&&a.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI)&&(V.unblockUI(),V("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){var t;V.datepicker._curInst&&(e=V(e.target),t=V.datepicker._getInst(e[0]),!(e[0].id===V.datepicker._mainDivId||0!==e.parents("#"+V.datepicker._mainDivId).length||e.hasClass(V.datepicker.markerClassName)||e.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)||e.hasClass(V.datepicker.markerClassName)&&V.datepicker._curInst!==t)&&V.datepicker._hideDatepicker()},_adjustDate:function(e,t,a){var e=V(e),i=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(i,t,a),this._updateDatepicker(i))},_gotoToday:function(e){var t,e=V(e),a=this._getInst(e[0]);this._get(a,"gotoCurrent")&&a.currentDay?(a.selectedDay=a.currentDay,a.drawMonth=a.selectedMonth=a.currentMonth,a.drawYear=a.selectedYear=a.currentYear):(t=new Date,a.selectedDay=t.getDate(),a.drawMonth=a.selectedMonth=t.getMonth(),a.drawYear=a.selectedYear=t.getFullYear()),this._notifyChange(a),this._adjustDate(e)},_selectMonthYear:function(e,t,a){var e=V(e),i=this._getInst(e[0]);i["selected"+("M"===a?"Month":"Year")]=i["draw"+("M"===a?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(e)},_selectDay:function(e,t,a,i){var s=V(e);V(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=s.currentDay=parseInt(V("a",i).attr("data-date")),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=a,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){e=V(e);this._selectDate(e,"")},_selectDate:function(e,t){var a,e=V(e),e=this._getInst(e[0]);t=null!=t?t:this._formatDate(e),e.input&&e.input.val(t),this._updateAlternate(e),(a=this._get(e,"onSelect"))?a.apply(e.input?e.input[0]:null,[t,e]):e.input&&e.input.trigger("change"),e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var t,a,i=this._get(e,"altField");i&&(a=this._get(e,"altFormat")||this._get(e,"dateFormat"),t=this._getDate(e),a=this.formatDate(a,t,this._getFormatConfig(e)),V(document).find(i).val(a))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t,e=new Date(e.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(t,s,e){if(null==t||null==s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;for(var a,i,r=0,n=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,n="string"!=typeof n?n:(new Date).getFullYear()%100+parseInt(n,10),d=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,c=(e?e.dayNames:null)||this._defaults.dayNames,o=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,l=(e?e.monthNames:null)||this._defaults.monthNames,h=-1,u=-1,p=-1,g=-1,_=!1,f=function(e){e=y+1<t.length&&t.charAt(y+1)===e;return e&&y++,e},k=function(e){var t=f(e),t="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,e=new RegExp("^\\d{"+("y"===e?t:1)+","+t+"}"),t=s.substring(r).match(e);if(t)return r+=t[0].length,parseInt(t[0],10);throw"Missing number at position "+r},D=function(e,t,a){var i=-1,e=V.map(f(e)?a:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(V.each(e,function(e,t){var a=t[1];if(s.substr(r,a.length).toLowerCase()===a.toLowerCase())return i=t[0],r+=a.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+r},m=function(){if(s.charAt(r)!==t.charAt(y))throw"Unexpected literal at position "+r;r++},y=0;y<t.length;y++)if(_)"'"!==t.charAt(y)||f("'")?m():_=!1;else switch(t.charAt(y)){case"d":p=k("d");break;case"D":D("D",d,c);break;case"o":g=k("o");break;case"m":u=k("m");break;case"M":u=D("M",o,l);break;case"y":h=k("y");break;case"@":h=(i=new Date(k("@"))).getFullYear(),u=i.getMonth()+1,p=i.getDate();break;case"!":h=(i=new Date((k("!")-this._ticksTo1970)/1e4)).getFullYear(),u=i.getMonth()+1,p=i.getDate();break;case"'":f("'")?m():_=!0;break;default:m()}if(r<s.length&&(e=s.substr(r),!/^\s+/.test(e)))throw"Extra/unparsed characters found in date: "+e;if(-1===h?h=(new Date).getFullYear():h<100&&(h+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h<=n?0:-100)),-1<g)for(u=1,p=g;;){if(p<=(a=this._getDaysInMonth(h,u-1)))break;u++,p-=a}if((i=this._daylightSavingAdjust(new Date(h,u-1,p))).getFullYear()!==h||i.getMonth()+1!==u||i.getDate()!==p)throw"Invalid date";return i},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,a){if(!e)return"";function i(e,t,a){var i=""+t;if(l(e))for(;i.length<a;)i="0"+i;return i}function s(e,t,a,i){return(l(e)?i:a)[t]}var r,n=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,d=(a?a.dayNames:null)||this._defaults.dayNames,c=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,o=(a?a.monthNames:null)||this._defaults.monthNames,l=function(e){e=r+1<t.length&&t.charAt(r+1)===e;return e&&r++,e},h="",u=!1;if(e)for(r=0;r<t.length;r++)if(u)"'"!==t.charAt(r)||l("'")?h+=t.charAt(r):u=!1;else switch(t.charAt(r)){case"d":h+=i("d",e.getDate(),2);break;case"D":h+=s("D",e.getDay(),n,d);break;case"o":h+=i("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=i("m",e.getMonth()+1,2);break;case"M":h+=s("M",e.getMonth(),c,o);break;case"y":h+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":u=!0;break;default:h+=t.charAt(r)}return h},_possibleChars:function(t){for(var e="",a=!1,i=function(e){e=s+1<t.length&&t.charAt(s+1)===e;return e&&s++,e},s=0;s<t.length;s++)if(a)"'"!==t.charAt(s)||i("'")?e+=t.charAt(s):a=!1;else switch(t.charAt(s)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":i("'")?e+="'":a=!0;break;default:e+=t.charAt(s)}return e},_get:function(e,t){return(void 0!==e.settings[t]?e.settings:this._defaults)[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var a=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),r=s,n=this._getFormatConfig(e);try{r=this.parseDate(a,i,n)||s}catch(e){i=t?"":i}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=i?r.getDate():0,e.currentMonth=i?r.getMonth():0,e.currentYear=i?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(d,e,t){var a,i=null==e||""===e?t:"string"==typeof e?function(e){try{return V.datepicker.parseDate(V.datepicker._get(d,"dateFormat"),e,V.datepicker._getFormatConfig(d))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?V.datepicker._getDate(d):null)||new Date,a=t.getFullYear(),i=t.getMonth(),s=t.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,n=r.exec(e);n;){switch(n[2]||"d"){case"d":case"D":s+=parseInt(n[1],10);break;case"w":case"W":s+=7*parseInt(n[1],10);break;case"m":case"M":i+=parseInt(n[1],10),s=Math.min(s,V.datepicker._getDaysInMonth(a,i));break;case"y":case"Y":a+=parseInt(n[1],10),s=Math.min(s,V.datepicker._getDaysInMonth(a,i))}n=r.exec(e)}return new Date(a,i,s)}(e):"number"==typeof e?isNaN(e)?t:(i=e,(a=new Date).setDate(a.getDate()+i),a):new Date(e.getTime());return(i=i&&"Invalid Date"===i.toString()?t:i)&&(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,a){var i=!t,s=e.selectedMonth,r=e.selectedYear,t=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=t.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=t.getMonth(),e.drawYear=e.selectedYear=e.currentYear=t.getFullYear(),s===e.selectedMonth&&r===e.selectedYear||a||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),a="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){V.datepicker._adjustDate(a,-t,"M")},next:function(){V.datepicker._adjustDate(a,+t,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(a)},selectDay:function(){return V.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(a,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,a,i,s,r,O,L,R,H,n,d,W,c,o,l,h,u,p,g,_,f,k,E,D,m,U,y,P,z,v,M,b,w=new Date,B=this._daylightSavingAdjust(new Date(w.getFullYear(),w.getMonth(),w.getDate())),C=this._get(e,"isRTL"),w=this._get(e,"showButtonPanel"),I=this._get(e,"hideIfNoPrevNext"),x=this._get(e,"navigationAsDateFormat"),Y=this._getNumberOfMonths(e),S=this._get(e,"showCurrentAtPos"),F=this._get(e,"stepMonths"),J=1!==Y[0]||1!==Y[1],N=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),T=this._getMinMaxDate(e,"min"),A=this._getMinMaxDate(e,"max"),K=e.drawMonth-S,j=e.drawYear;if(K<0&&(K+=12,j--),A)for(t=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth()-Y[0]*Y[1]+1,A.getDate())),t=T&&t<T?T:t;this._daylightSavingAdjust(new Date(j,K,1))>t;)--K<0&&(K=11,j--);for(e.drawMonth=K,e.drawYear=j,S=this._get(e,"prevText"),S=x?this.formatDate(S,this._daylightSavingAdjust(new Date(j,K-F,1)),this._getFormatConfig(e)):S,a=this._canAdjustMonth(e,-1,j,K)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"e":"w")).text(S))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"e":"w")).text(S))[0].outerHTML,S=this._get(e,"nextText"),S=x?this.formatDate(S,this._daylightSavingAdjust(new Date(j,K+F,1)),this._getFormatConfig(e)):S,i=this._canAdjustMonth(e,1,j,K)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"w":"e")).text(S))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:S}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(C?"w":"e")).text(S))[0].outerHTML,F=this._get(e,"currentText"),I=this._get(e,"gotoCurrent")&&e.currentDay?N:B,F=x?this.formatDate(F,I,this._getFormatConfig(e)):F,S="",e.inline||(S=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(e,"closeText"))[0].outerHTML),x="",w&&(x=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(C?S:"").append(this._isInRange(e,I)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(F):"").append(C?"":S)[0].outerHTML),s=parseInt(this._get(e,"firstDay"),10),s=isNaN(s)?0:s,r=this._get(e,"showWeek"),O=this._get(e,"dayNames"),L=this._get(e,"dayNamesMin"),R=this._get(e,"monthNames"),H=this._get(e,"monthNamesShort"),n=this._get(e,"beforeShowDay"),d=this._get(e,"showOtherMonths"),W=this._get(e,"selectOtherMonths"),c=this._getDefaultDate(e),o="",h=0;h<Y[0];h++){for(u="",this.maxRows=4,p=0;p<Y[1];p++){if(g=this._daylightSavingAdjust(new Date(j,K,e.selectedDay)),_=" ui-corner-all",f="",J){if(f+="<div class='ui-datepicker-group",1<Y[1])switch(p){case 0:f+=" ui-datepicker-group-first",_=" ui-corner-"+(C?"right":"left");break;case Y[1]-1:f+=" ui-datepicker-group-last",_=" ui-corner-"+(C?"left":"right");break;default:f+=" ui-datepicker-group-middle",_=""}f+="'>"}for(f+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+_+"'>"+(/all|left/.test(_)&&0===h?C?i:a:"")+(/all|right/.test(_)&&0===h?C?a:i:"")+this._generateMonthYearHeader(e,K,j,T,A,0<h||0<p,R,H)+"</div><table class='ui-datepicker-calendar'><thead><tr>",k=r?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",l=0;l<7;l++)k+="<th scope='col'"+(5<=(l+s+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+O[E=(l+s)%7]+"'>"+L[E]+"</span></th>";for(f+=k+"</tr></thead><tbody>",m=this._getDaysInMonth(j,K),j===e.selectedYear&&K===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,m)),D=(this._getFirstDayOfMonth(j,K)-s+7)%7,m=Math.ceil((D+m)/7),U=J&&this.maxRows>m?this.maxRows:m,this.maxRows=U,y=this._daylightSavingAdjust(new Date(j,K,1-D)),P=0;P<U;P++){for(f+="<tr>",z=r?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(y)+"</td>":"",l=0;l<7;l++)v=n?n.apply(e.input?e.input[0]:null,[y]):[!0,""],b=(M=y.getMonth()!==K)&&!W||!v[0]||T&&y<T||A&&A<y,z+="<td class='"+(5<=(l+s+6)%7?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(y.getTime()===g.getTime()&&K===e.selectedMonth&&e._keyEvent||c.getTime()===y.getTime()&&c.getTime()===g.getTime()?" "+this._dayOverClass:"")+(b?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!d?"":" "+v[1]+(y.getTime()===N.getTime()?" "+this._currentClass:"")+(y.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(M&&!d||!v[2]?"":" title='"+v[2].replace(/'/g,"&#39;")+"'")+(b?"":" data-handler='selectDay' data-event='click' data-month='"+y.getMonth()+"' data-year='"+y.getFullYear()+"'")+">"+(M&&!d?"&#xa0;":b?"<span class='ui-state-default'>"+y.getDate()+"</span>":"<a class='ui-state-default"+(y.getTime()===B.getTime()?" ui-state-highlight":"")+(y.getTime()===N.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#' aria-current='"+(y.getTime()===N.getTime()?"true":"false")+"' data-date='"+y.getDate()+"'>"+y.getDate()+"</a>")+"</td>",y.setDate(y.getDate()+1),y=this._daylightSavingAdjust(y);f+=z+"</tr>"}11<++K&&(K=0,j++),u+=f+="</tbody></table>"+(J?"</div>"+(0<Y[0]&&p===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}o+=u}return o+=x,e._keyEvent=!1,o},_generateMonthYearHeader:function(e,t,a,i,s,r,n,d){var c,o,l,h,u,p,g=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),f=this._get(e,"showMonthAfterYear"),k=this._get(e,"selectMonthLabel"),D=this._get(e,"selectYearLabel"),m="<div class='ui-datepicker-title'>",y="";if(r||!g)y+="<span class='ui-datepicker-month'>"+n[t]+"</span>";else{for(c=i&&i.getFullYear()===a,o=s&&s.getFullYear()===a,y+="<select class='ui-datepicker-month' aria-label='"+k+"' data-handler='selectMonth' data-event='change'>",l=0;l<12;l++)(!c||l>=i.getMonth())&&(!o||l<=s.getMonth())&&(y+="<option value='"+l+"'"+(l===t?" selected='selected'":"")+">"+d[l]+"</option>");y+="</select>"}if(f||(m+=y+(!r&&g&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",r||!_)m+="<span class='ui-datepicker-year'>"+a+"</span>";else{for(n=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),u=(k=function(e){e=e.match(/c[+\-].*/)?a+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(e)?h:e})(n[0]),p=Math.max(u,k(n[1]||"")),u=i?Math.max(u,i.getFullYear()):u,p=s?Math.min(p,s.getFullYear()):p,e.yearshtml+="<select class='ui-datepicker-year' aria-label='"+D+"' data-handler='selectYear' data-event='change'>";u<=p;u++)e.yearshtml+="<option value='"+u+"'"+(u===a?" selected='selected'":"")+">"+u+"</option>";e.yearshtml+="</select>",m+=e.yearshtml,e.yearshtml=null}return m+=this._get(e,"yearSuffix"),f&&(m+=(!r&&g&&_?"":"&#xa0;")+y),m+="</div>"},_adjustInstDate:function(e,t,a){var i=e.selectedYear+("Y"===a?t:0),s=e.selectedMonth+("M"===a?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(i,s))+("D"===a?t:0),i=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,s,t)));e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),"M"!==a&&"Y"!==a||this._notifyChange(e)},_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),a=a&&t<a?a:t;return e&&e<a?e:a},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){e=this._get(e,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,a,i){var s=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(a,i+(t<0?t:s[0]*s[1]),1));return t<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var a,i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),r=null,n=null,e=this._get(e,"yearRange");return e&&(e=e.split(":"),a=(new Date).getFullYear(),r=parseInt(e[0],10),n=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(r+=a),e[1].match(/[+\-].*/))&&(n+=a),(!i||t.getTime()>=i.getTime())&&(!s||t.getTime()<=s.getTime())&&(!r||t.getFullYear()>=r)&&(!n||t.getFullYear()<=n)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,a,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);i=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),V.fn.datepicker=function(e){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+e+"Datepicker"].apply(V.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?V.datepicker["_"+e+"Datepicker"].apply(V.datepicker,[this].concat(t)):V.datepicker._attachDatepicker(this,e)})},V.datepicker=new e,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.13.3",V.datepicker});