| Current Path : /home/rtorresani/www/pub/static/adminhtml/Magento/backend/en_US/js/bundle/ |
| Current File : //home/rtorresani/www/pub/static/adminhtml/Magento/backend/en_US/js/bundle/bundle6.js |
require.config({"config": {
"jsbuild":{"Magento_Swatches/js/text.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'mage/template',\n 'uiRegistry',\n 'jquery/ui',\n 'prototype',\n 'validation'\n], function (jQuery, mageTemplate, rg) {\n 'use strict';\n\n return function (config) {\n var swatchOptionTextDefaultInputType = 'radio',\n swatchTextOption = {\n table: $('swatch-text-options-table'),\n itemCount: 0,\n totalItems: 0,\n rendered: 0,\n isReadOnly: config.isReadOnly,\n template: mageTemplate('#swatch-text-row-template'),\n\n /**\n * Add option\n *\n * @param {Object} data\n * @param {Object} render\n */\n add: function (data, render) {\n var isNewOption = false,\n element;\n\n if (typeof data.id == 'undefined') {\n data = {\n 'id': 'option_' + this.itemCount,\n 'sort_order': this.itemCount + 1\n };\n isNewOption = true;\n }\n\n if (!data.intype) {\n data.intype = swatchOptionTextDefaultInputType;\n }\n\n element = this.template({\n data: data\n });\n\n if (isNewOption && !this.isReadOnly) {\n this.enableNewOptionDeleteButton(data.id);\n }\n this.itemCount++;\n this.totalItems++;\n this.elements += element;\n\n if (render) {\n this.render();\n }\n },\n\n /**\n * Remove option\n *\n * @param {Object} event\n */\n remove: function (event) {\n var element = $(Event.findElement(event, 'tr')),\n elementFlags; // !!! Button already have table parent in safari\n\n // Safari workaround\n element.ancestors().each(function (parentItem) {\n if (parentItem.hasClassName('option-row')) {\n element = parentItem;\n throw $break;\n } else if (parentItem.hasClassName('box')) {\n throw $break;\n }\n });\n\n if (element) {\n elementFlags = element.getElementsByClassName('delete-flag');\n\n if (elementFlags[0]) {\n elementFlags[0].value = 1;\n }\n\n element.addClassName('no-display');\n element.addClassName('template');\n element.hide();\n this.totalItems--;\n this.updateItemsCountField();\n }\n },\n\n /**\n * Update items count field\n */\n updateItemsCountField: function () {\n $('swatch-text-option-count-check').value = this.totalItems > 0 ? '1' : '';\n },\n\n /**\n * Enable delete button for new option\n *\n * @param {String} id\n */\n enableNewOptionDeleteButton: function (id) {\n $$('#delete_button_swatch_container_' + id + ' button').each(function (button) {\n button.enable();\n button.removeClassName('disabled');\n });\n },\n\n /**\n * Bind remove button\n */\n bindRemoveButtons: function () {\n jQuery('#swatch-text-options-panel').on('click', '.delete-option', this.remove.bind(this));\n },\n\n /**\n * Render action\n */\n render: function () {\n Element.insert($$('[data-role=swatch-text-options-container]')[0], this.elements);\n this.elements = '';\n },\n\n /**\n * Render action with delay (performance fix)\n *\n * @param {Object} data\n * @param {Number} from\n * @param {Number} step\n * @param {Number} delay\n * @returns {Boolean}\n */\n renderWithDelay: function (data, from, step, delay) {\n var arrayLength = data.length,\n len;\n\n for (len = from + step; from < len && from < arrayLength; from++) {\n this.add(data[from]);\n }\n this.render();\n\n if (from === arrayLength) {\n this.updateItemsCountField();\n this.rendered = 1;\n jQuery('body').trigger('processStop');\n\n return true;\n }\n setTimeout(this.renderWithDelay.bind(this, data, from, step, delay), delay);\n },\n\n /**\n * Ignore validate action\n */\n ignoreValidate: function () {\n var ignore = '.ignore-validate input, ' +\n '.ignore-validate select, ' +\n '.ignore-validate textarea';\n\n jQuery('#edit_form').data('validator').settings.forceIgnore = ignore;\n }\n };\n\n if ($('add_new_swatch_text_option_button')) {\n Event.observe(\n 'add_new_swatch_text_option_button',\n 'click',\n swatchTextOption.add.bind(swatchTextOption, true)\n );\n }\n jQuery('#swatch-text-options-panel').on('render', function () {\n swatchTextOption.ignoreValidate();\n\n if (swatchTextOption.rendered) {\n return false;\n }\n jQuery('body').trigger('processStart');\n swatchTextOption.renderWithDelay(config.attributesData, 0, 100, 300);\n swatchTextOption.bindRemoveButtons();\n });\n\n if (config.isSortable) {\n jQuery(function ($) {\n $('[data-role=swatch-text-options-container]').sortable({\n distance: 8,\n tolerance: 'pointer',\n cancel: 'input, button',\n axis: 'y',\n\n /**\n * Update components\n */\n update: function () {\n $('[data-role=swatch-text-options-container] [data-role=order]').each(\n function (index, element) {\n $(element).val(index + 1);\n }\n );\n }\n });\n });\n }\n\n jQuery(function () {\n if (jQuery('#frontend_input').val() !== 'swatch_text') {\n jQuery('.swatch-text-field-0').removeClass('required-option');\n }\n });\n\n window.swatchTextOption = swatchTextOption;\n window.swatchOptionTextDefaultInputType = swatchOptionTextDefaultInputType;\n\n rg.set('swatch-text-options-panel', swatchTextOption);\n };\n});\n","Magento_Swatches/js/visual.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* global FORM_KEY */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'mage/template',\n 'uiRegistry',\n 'jquery/colorpicker/js/colorpicker',\n 'prototype',\n 'jquery/ui',\n 'validation'\n], function (jQuery, mageTemplate, rg) {\n 'use strict';\n\n return function (config) {\n var swatchOptionVisualDefaultInputType = 'radio',\n swatchVisualOption = {\n table: $('swatch-visual-options-table'),\n itemCount: 0,\n totalItems: 0,\n rendered: 0,\n isReadOnly: config.isReadOnly,\n template: mageTemplate('#swatch-visual-row-template'),\n\n /**\n * Add new option using template\n *\n * @param {Object} data\n * @param {Object} render\n */\n add: function (data, render) {\n var isNewOption = false,\n element;\n\n if (typeof data.id == 'undefined') {\n data = {\n 'id': 'option_' + this.itemCount,\n 'sort_order': this.itemCount + 1,\n 'empty_class': 'unavailable'\n };\n isNewOption = true;\n } else if (data.defaultswatch0 === '') {\n data['empty_class'] = 'unavailable';\n }\n\n if (!data.intype) {\n data.intype = swatchOptionVisualDefaultInputType;\n }\n\n element = this.template({\n data: data\n });\n\n if (isNewOption && !this.isReadOnly) {\n this.enableNewOptionDeleteButton(data.id);\n }\n this.itemCount++;\n this.totalItems++;\n this.elements += element;\n\n if (render) {\n this.render();\n }\n },\n\n /**\n * ColorPicker initialization process\n */\n initColorPicker: function () {\n var element = this,\n hiddenColorPicker = !jQuery(element).data('colorpickerId');\n\n jQuery(this).ColorPicker({\n\n /**\n * ColorPicker onShow action\n */\n onShow: function () {\n var color = jQuery(element).parent().parent().prev().prev('input').val(),\n menu = jQuery(this).parents('.swatch_sub-menu_container');\n\n menu.hide();\n jQuery(element).ColorPickerSetColor(color);\n },\n\n /**\n * ColorPicker onSubmit action\n *\n * @param {String} hsb\n * @param {String} hex\n * @param {String} rgb\n * @param {String} el\n */\n onSubmit: function (hsb, hex, rgb, el) {\n var container = jQuery(el).parent().parent().prev();\n\n jQuery(el).ColorPickerHide();\n container.parent().removeClass('unavailable');\n container.prev('input').val('#' + hex);\n container.css('background', '#' + hex);\n }\n });\n\n if (hiddenColorPicker) {\n jQuery(this).ColorPickerShow();\n }\n },\n\n /**\n * Remove action\n *\n * @param {Object} event\n */\n remove: function (event) {\n var element = $(Event.findElement(event, 'tr')),\n elementFlags; // !!! Button already have table parent in safari\n\n // Safari workaround\n element.ancestors().each(function (parentItem) {\n if (parentItem.hasClassName('option-row')) {\n element = parentItem;\n throw $break;\n } else if (parentItem.hasClassName('box')) {\n throw $break;\n }\n });\n\n if (element) {\n elementFlags = element.getElementsByClassName('delete-flag');\n\n if (elementFlags[0]) {\n elementFlags[0].value = 1;\n }\n\n element.addClassName('no-display');\n element.addClassName('template');\n element.hide();\n this.totalItems--;\n this.updateItemsCountField();\n }\n },\n\n /**\n * Update items count field\n */\n updateItemsCountField: function () {\n $('swatch-visual-option-count-check').value = this.totalItems > 0 ? '1' : '';\n },\n\n /**\n * Enable delete button for new option\n *\n * @param {String} id\n */\n enableNewOptionDeleteButton: function (id) {\n $$('#delete_button_swatch_container_' + id + ' button').each(function (button) {\n button.enable();\n button.removeClassName('disabled');\n });\n },\n\n /**\n * Bind remove button\n */\n bindRemoveButtons: function () {\n jQuery('#swatch-visual-options-panel').on('click', '.delete-option', this.remove.bind(this));\n },\n\n /**\n * Render options\n */\n render: function () {\n Element.insert($$('[data-role=swatch-visual-options-container]')[0], this.elements);\n this.elements = '';\n },\n\n /**\n * Render elements with delay (performance fix)\n *\n * @param {Object} data\n * @param {Number} from\n * @param {Number} step\n * @param {Number} delay\n * @returns {Boolean}\n */\n renderWithDelay: function (data, from, step, delay) {\n var arrayLength = data.length,\n len;\n\n for (len = from + step; from < len && from < arrayLength; from++) {\n this.add(data[from]);\n }\n this.render();\n\n if (from === arrayLength) {\n this.updateItemsCountField();\n this.rendered = 1;\n jQuery('body').trigger('processStop');\n\n return true;\n }\n setTimeout(this.renderWithDelay.bind(this, data, from, step, delay), delay);\n },\n\n /**\n * Ignore validate action\n */\n ignoreValidate: function () {\n var ignore = '.ignore-validate input, ' +\n '.ignore-validate select, ' +\n '.ignore-validate textarea';\n\n jQuery('#edit_form').data('validator').settings.forceIgnore = ignore;\n }\n };\n\n if ($('add_new_swatch_visual_option_button')) {\n Event.observe(\n 'add_new_swatch_visual_option_button',\n 'click',\n swatchVisualOption.add.bind(swatchVisualOption, {}, true)\n );\n }\n\n jQuery('#swatch-visual-options-panel').on('render', function () {\n swatchVisualOption.ignoreValidate();\n\n if (swatchVisualOption.rendered) {\n return false;\n }\n jQuery('body').trigger('processStart');\n swatchVisualOption.renderWithDelay(config.attributesData, 0, 100, 300);\n swatchVisualOption.bindRemoveButtons();\n jQuery('#swatch-visual-options-panel').on(\n 'click',\n '.colorpicker_handler',\n swatchVisualOption.initColorPicker\n );\n });\n jQuery('body').on('click', function (event) {\n var element = jQuery(event.target);\n\n if (\n element.parents('.swatch_sub-menu_container').length === 1 ||\n element.next('div.swatch_sub-menu_container').length === 1\n ) {\n return true;\n }\n jQuery('.swatch_sub-menu_container').hide();\n });\n\n if (config.isSortable) {\n jQuery(function ($) {\n $('[data-role=swatch-visual-options-container]').sortable({\n distance: 8,\n tolerance: 'pointer',\n cancel: 'input, button',\n axis: 'y',\n\n /**\n * Update component\n */\n update: function () {\n $('[data-role=swatch-visual-options-container] [data-role=order]').each(\n function (index, element) {\n $(element).val(index + 1);\n }\n );\n }\n });\n });\n }\n\n window.swatchVisualOption = swatchVisualOption;\n window.swatchOptionVisualDefaultInputType = swatchOptionVisualDefaultInputType;\n\n rg.set('swatch-visual-options-panel', swatchVisualOption);\n\n jQuery(function ($) {\n\n var swatchComponents = {\n\n /**\n * div wrapper for to hide all evement\n */\n wrapper: null,\n\n /**\n * iframe component to perform file upload without page reload\n */\n iframe: null,\n\n /**\n * form component for upload image\n */\n form: null,\n\n /**\n * Input file component for upload image\n */\n inputFile: null,\n\n /**\n * Create swatch component for upload files\n *\n * @this {swatchComponents}\n * @public\n */\n create: function () {\n this.wrapper = $('<div>').css({\n display: 'none'\n }).appendTo($('body'));\n\n this.iframe = $('<iframe></iframe>', {\n id: 'upload_iframe',\n name: 'upload_iframe'\n }).appendTo(this.wrapper);\n\n this.form = $('<form></form>', {\n id: 'swatch_form_image_upload',\n name: 'swatch_form_image_upload',\n target: 'upload_iframe',\n method: 'post',\n enctype: 'multipart/form-data',\n class: 'ignore-validate',\n action: config.uploadActionUrl\n }).appendTo(this.wrapper);\n\n this.inputFile = $('<input />', {\n type: 'file',\n name: 'datafile',\n class: 'swatch_option_file'\n }).appendTo(this.form);\n\n $('<input />', {\n type: 'hidden',\n name: 'form_key',\n value: FORM_KEY\n }).appendTo(this.form);\n }\n };\n\n /**\n * Create swatch components\n */\n swatchComponents.create();\n\n /**\n * Register event for swatch input[type=file] change\n */\n swatchComponents.inputFile.change(function () {\n var container = $('#' + $(this).attr('data-called-by')).parents().eq(2).children('.swatch_window'),\n\n /**\n * @this {iframe}\n */\n iframeHandler = function () {\n var imageParams = $.parseJSON($(this).contents().find('body').html()),\n fullMediaUrl = imageParams['swatch_path'] + imageParams['file_path'];\n\n container.prev('input').val(imageParams['file_path']);\n container.css({\n 'background-image': 'url(' + fullMediaUrl + ')',\n 'background-size': 'cover'\n });\n container.parent().removeClass('unavailable');\n };\n\n swatchComponents.iframe.off('load');\n swatchComponents.iframe.on('load', iframeHandler);\n swatchComponents.form.submit();\n $(this).val('');\n });\n\n /**\n * Register event for choose \"upload image\" option\n */\n $(document).on('click', '.btn_choose_file_upload', function () {\n swatchComponents.inputFile.attr('data-called-by', $(this).attr('id'));\n swatchComponents.inputFile.trigger('click');\n });\n\n /**\n * Register event for remove option\n */\n $(document).on('click', '.btn_remove_swatch', function () {\n var optionPanel = $(this).parents().eq(2);\n\n optionPanel.children('input').val('');\n optionPanel.children('.swatch_window').css('background', '');\n\n optionPanel.addClass('unavailable');\n\n jQuery('.swatch_sub-menu_container').hide();\n });\n\n /**\n * Toggle color upload chooser\n */\n $(document).on('click', '.swatches-visual-col', function () {\n var currentElement = $(this).find('.swatch_sub-menu_container');\n\n jQuery('.swatch_sub-menu_container').not(currentElement).hide();\n currentElement.toggle();\n });\n });\n };\n});\n","Magento_Swatches/js/form/element/swatch-visual.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* global FORM_KEY */\n\n/**\n * @api\n */\ndefine([\n 'underscore',\n 'Magento_Ui/js/lib/view/utils/async',\n 'mage/template',\n 'uiRegistry',\n 'prototype',\n 'Magento_Ui/js/form/element/abstract',\n 'jquery/colorpicker/js/colorpicker',\n 'jquery/ui'\n], function (_, jQuery, mageTemplate, rg, prototype, Abstract) {\n 'use strict';\n\n /**\n * Former implementation.\n *\n * @param {*} value\n * @param {Object} container\n * @param {String} uploadUrl\n * @param {String} elementName\n */\n function oldCode(value, container, uploadUrl, elementName) {\n var swatchVisualOption = {\n itemCount: 0,\n totalItems: 0,\n rendered: 0,\n isReadOnly: false,\n\n /**\n * Initialize.\n */\n initialize: function () {\n if (_.isEmpty(value)) {\n container.addClassName('unavailable');\n }\n\n jQuery(container).on(\n 'click',\n '.colorpicker_handler',\n this.initColorPicker\n );\n },\n\n /**\n * ColorPicker initialization process\n */\n initColorPicker: function () {\n var element = this,\n hiddenColorPicker = !jQuery(element).data('colorpickerId');\n\n jQuery(this).ColorPicker({\n\n /**\n * ColorPicker onShow action\n */\n onShow: function () {\n var color = jQuery(element).parent().parent().prev().prev('input').val(),\n menu = jQuery(this).parents('.swatch_sub-menu_container');\n\n menu.hide();\n jQuery(element).ColorPickerSetColor(color);\n },\n\n /**\n * ColorPicker onSubmit action\n *\n * @param {String} hsb\n * @param {String} hex\n * @param {String} rgb\n * @param {String} el\n */\n onSubmit: function (hsb, hex, rgb, el) {\n var localContainer = jQuery(el).parent().parent().prev();\n\n jQuery(el).ColorPickerHide();\n localContainer.parent().removeClass('unavailable');\n localContainer.prev('input').val('#' + hex).trigger('change');\n localContainer.css('background', '#' + hex);\n }\n });\n\n if (hiddenColorPicker) {\n jQuery(this).ColorPickerShow();\n }\n },\n\n /**\n * Remove action\n *\n * @param {Object} event\n */\n remove: function (event) {\n var element = $(Event.findElement(event, 'tr')),\n elementFlags; // !!! Button already have table parent in safari\n\n // Safari workaround\n element.ancestors().each(function (parentItem) {\n if (parentItem.hasClassName('option-row')) {\n element = parentItem;\n throw $break;\n } else if (parentItem.hasClassName('box')) {\n throw $break;\n }\n });\n\n if (element) {\n elementFlags = element.getElementsByClassName('delete-flag');\n\n if (elementFlags[0]) {\n elementFlags[0].value = 1;\n }\n\n element.addClassName('no-display');\n element.addClassName('template');\n element.hide();\n this.totalItems--;\n this.updateItemsCountField();\n }\n },\n\n /**\n * Update items count field\n */\n updateItemsCountField: function () {\n $('swatch-visual-option-count-check').value = this.totalItems > 0 ? '1' : '';\n }\n };\n\n //swatchVisualOption.initColorPicker();\n\n jQuery('body').on('click', function (event) {\n var element = jQuery(event.target);\n\n if (\n element.parents('.swatch_sub-menu_container').length === 1 ||\n element.next('div.swatch_sub-menu_container').length === 1\n ) {\n return true;\n }\n jQuery('.swatch_sub-menu_container').hide();\n });\n\n jQuery(function ($) {\n\n var swatchComponents = {\n\n /**\n * div wrapper for to hide all evement\n */\n wrapper: null,\n\n /**\n * iframe component to perform file upload without page reload\n */\n iframe: null,\n\n /**\n * form component for upload image\n */\n form: null,\n\n /**\n * Input file component for upload image\n */\n inputFile: null,\n\n /**\n * Create swatch component for upload files\n *\n * @this {swatchComponents}\n * @public\n */\n create: function () {\n this.wrapper = $('<div>').css({\n display: 'none'\n }).appendTo($('body'));\n\n this.iframe = $('<iframe></iframe>', {\n name: 'upload_iframe_' + elementName\n }).appendTo(this.wrapper);\n\n this.form = $('<form></form>', {\n name: 'swatch_form_image_upload_' + elementName,\n target: 'upload_iframe_' + elementName,\n method: 'post',\n enctype: 'multipart/form-data',\n class: 'ignore-validate',\n action: uploadUrl\n }).appendTo(this.wrapper);\n\n this.inputFile = $('<input />', {\n type: 'file',\n name: 'datafile',\n class: 'swatch_option_file'\n }).appendTo(this.form);\n\n $('<input />', {\n type: 'hidden',\n name: 'form_key',\n value: FORM_KEY\n }).appendTo(this.form);\n }\n };\n\n swatchVisualOption.initialize();\n\n /**\n * Create swatch components\n */\n swatchComponents.create();\n\n /**\n * Register event for swatch input[type=file] change\n */\n swatchComponents.inputFile.change(function () {\n var localContainer = $('.' + $(this).attr('data-called-by')).parents().eq(2).children('.swatch_window'),\n\n /**\n * @this {iframe}\n */\n iframeHandler = function () {\n var imageParams = $.parseJSON($(this).contents().find('body').html()),\n fullMediaUrl = imageParams['swatch_path'] + imageParams['file_path'];\n\n localContainer.prev('input').val(imageParams['file_path']).trigger('change');\n localContainer.css({\n 'background-image': 'url(' + fullMediaUrl + ')',\n 'background-size': 'cover'\n });\n localContainer.parent().removeClass('unavailable');\n };\n\n swatchComponents.iframe.off('load');\n swatchComponents.iframe.on('load', iframeHandler);\n swatchComponents.form.submit();\n $(this).val('');\n });\n\n /**\n * Register event for choose \"upload image\" option\n */\n $(container).on('click', '.btn_choose_file_upload', function () {\n swatchComponents.inputFile.attr('data-called-by', $(this).data('class'));\n swatchComponents.inputFile.trigger('click');\n });\n\n /**\n * Register event for remove option\n */\n $(container).on('click', '.btn_remove_swatch', function () {\n var optionPanel = $(this).parents().eq(2);\n\n optionPanel.children('input').val('').trigger('change');\n optionPanel.children('.swatch_window').css('background', '');\n optionPanel.addClass('unavailable');\n jQuery('.swatch_sub-menu_container').hide();\n });\n\n /**\n * Toggle color upload chooser\n */\n $(container).on('click', '.swatch_window', function () {\n jQuery('.swatch_sub-menu_container').hide();\n $(this).next('div').toggle();\n });\n });\n }\n\n return Abstract.extend({\n defaults: {\n elementId: 0,\n prefixName: '',\n prefixElementName: '',\n elementName: '',\n value: '',\n uploadUrl: ''\n },\n\n /**\n * Parses options and merges the result with instance\n *\n * @returns {Object} Chainable.\n */\n initConfig: function () {\n this._super();\n\n this.configureDataScope();\n\n return this;\n },\n\n /**\n * Initialize.\n *\n * @returns {Object} Chainable.\n */\n initialize: function () {\n this._super()\n .initOldCode()\n .on('value', this.onChangeColor.bind(this));\n\n return this;\n },\n\n /**\n * Handler function that execute when color changes.\n *\n * @param {String} data - color\n */\n onChangeColor: function (data) {\n if (!data) {\n jQuery('.' + this.elementName).parent().removeClass('unavailable');\n }\n },\n\n /**\n * Initialize wrapped former implementation.\n *\n * @returns {Object} Chainable.\n */\n initOldCode: function () {\n jQuery.async('.' + this.elementName, this.name, function (elem) {\n oldCode(this.value(), elem.parentElement, this.uploadUrl, this.elementName);\n }.bind(this));\n\n return this;\n },\n\n /**\n * Configure data scope.\n */\n configureDataScope: function () {\n var recordId, prefixName;\n\n // Get recordId\n recordId = this.parentName.split('.').last();\n\n prefixName = this.dataScopeToHtmlArray(this.prefixName);\n this.elementName = this.prefixElementName + recordId;\n\n this.inputName = prefixName + '[' + this.elementName + ']';\n this.exportDataLink = 'data.' + this.prefixName + '.' + this.elementName;\n this.exports.value = this.provider + ':' + this.exportDataLink;\n },\n\n /** @inheritdoc */\n destroy: function () {\n this._super();\n\n this.source.remove(this.exportDataLink);\n },\n\n /**\n * Get HTML array from data scope.\n *\n * @param {String} dataScopeString\n * @returns {String}\n */\n dataScopeToHtmlArray: function (dataScopeString) {\n var dataScopeArray, dataScope, reduceFunction;\n\n /**\n * Add new level of nesting.\n *\n * @param {String} prev\n * @param {String} curr\n * @returns {String}\n */\n reduceFunction = function (prev, curr) {\n return prev + '[' + curr + ']';\n };\n\n dataScopeArray = dataScopeString.split('.');\n\n dataScope = dataScopeArray.shift();\n dataScope += dataScopeArray.reduce(reduceFunction, '');\n\n return dataScope;\n }\n });\n});\n","Mageplaza_Blog/js/grid/columns/select.js":"/**\r\n * Mageplaza\r\n *\r\n * NOTICE OF LICENSE\r\n *\r\n * This source file is subject to the Mageplaza.com license sliderConfig is\r\n * available through the world-wide-web at this URL:\r\n * https://www.mageplaza.com/LICENSE.txt\r\n *\r\n * DISCLAIMER\r\n *\r\n * Do not edit or add to this file if you wish to upgrade this extension to newer\r\n * version in the future.\r\n *\r\n * @category Mageplaza\r\n * @package Mageplaza_Blog\r\n * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)\r\n * @license https://www.mageplaza.com/LICENSE.txt\r\n */\r\n\r\ndefine([\r\n 'Magento_Ui/js/grid/columns/select'\r\n], function (Column) {\r\n 'use strict';\r\n\r\n return Column.extend({\r\n defaults: {\r\n bodyTmpl: 'ui/grid/cells/html'\r\n },\r\n getLabel: function (record) {\r\n var label = this._super(record);\r\n\r\n if (label !== '') {\r\n switch (record.status) {\r\n case '1':\r\n label = '<span class=\"grid-severity-notice\"><span>' + label + '</span></span>';\r\n break;\r\n case '2':\r\n label = '<span class=\"grid-severity-critical\"><span>' + label + '</span></span>';\r\n break;\r\n case '3':\r\n label = '<span class=\"grid-severity-minor\"><span>' + label + '</span></span>';\r\n break;\r\n }\r\n }\r\n return label;\r\n }\r\n });\r\n});","Mageplaza_Blog/js/grid/columns/enable.js":"/**\r\n * Mageplaza\r\n *\r\n * NOTICE OF LICENSE\r\n *\r\n * This source file is subject to the Mageplaza.com license sliderConfig is\r\n * available through the world-wide-web at this URL:\r\n * https://www.mageplaza.com/LICENSE.txt\r\n *\r\n * DISCLAIMER\r\n *\r\n * Do not edit or add to this file if you wish to upgrade this extension to newer\r\n * version in the future.\r\n *\r\n * @category Mageplaza\r\n * @package Mageplaza_Blog\r\n * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)\r\n * @license https://www.mageplaza.com/LICENSE.txt\r\n */\r\n\r\ndefine([\r\n 'Magento_Ui/js/grid/columns/select'\r\n], function (Column) {\r\n 'use strict';\r\n\r\n return Column.extend({\r\n defaults: {\r\n bodyTmpl: 'ui/grid/cells/html'\r\n },\r\n getLabel: function (record) {\r\n var label = this._super(record);\r\n\r\n if (label !== '') {\r\n switch (record.enabled) {\r\n case '1':\r\n label = '<span class=\"grid-severity-notice\"><span>' + label + '</span></span>';\r\n break;\r\n case '0':\r\n label = '<span class=\"grid-severity-critical\"><span>' + label + '</span></span>';\r\n break;\r\n case '2':\r\n label = '<span class=\"grid-severity-critical\"><span>' + label + '</span></span>';\r\n break;\r\n }\r\n }\r\n return label;\r\n }\r\n });\r\n});","Mageplaza_Blog/js/view/author.js":"/**\r\n * Mageplaza\r\n *\r\n * NOTICE OF LICENSE\r\n *\r\n * This source file is subject to the Mageplaza.com license that is\r\n * available through the world-wide-web at this URL:\r\n * https://www.mageplaza.com/LICENSE.txt\r\n *\r\n * DISCLAIMER\r\n *\r\n * Do not edit or add to this file if you wish to upgrade this extension to newer\r\n * version in the future.\r\n *\r\n * @category Mageplaza\r\n * @package Mageplaza_Blog\r\n * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)\r\n * @license https://www.mageplaza.com/LICENSE.txt\r\n */\r\n\r\ndefine([\r\n 'jquery',\r\n 'Magento_Ui/js/modal/modal',\r\n 'mage/translate'\r\n], function ($, modal, $t) {\r\n \"use strict\";\r\n\r\n $.widget('mageplaza.mpBlogAuthor', {\r\n options: {\r\n url: ''\r\n },\r\n isloaded: false,\r\n\r\n /**\r\n * This method constructs a new widget.\r\n * @private\r\n */\r\n _create: function () {\r\n this.initCustomerGrid();\r\n this.selectCustomer();\r\n },\r\n\r\n /**\r\n * Init popup\r\n * Popup will automatic open\r\n */\r\n initPopup: function () {\r\n var options = {\r\n type: 'popup',\r\n responsive: true,\r\n innerScroll: true,\r\n title: $t('Select Customer'),\r\n buttons: []\r\n },\r\n customerGridEl = $('#customer-grid');\r\n\r\n modal(options, customerGridEl);\r\n customerGridEl.modal('openModal');\r\n },\r\n\r\n /**\r\n * Init select customer\r\n */\r\n selectCustomer: function () {\r\n $('body').delegate('#customer-grid_table tbody tr', 'click', function () {\r\n var first_name = $(this).find('td:nth-child(3)').text().trim(),\r\n last_name = $(this).find('td:nth-child(4)').text().trim();\r\n\r\n $(\"#author_customer_id\").val($(this).find('input').val().trim());\r\n $(\"#author_customer\").val(first_name+' '+last_name);\r\n $('#customer-grid').data('mageModal').closeModal();\r\n });\r\n },\r\n\r\n /**\r\n * Init customer grid\r\n */\r\n initCustomerGrid: function () {\r\n var self = this;\r\n\r\n $(\"#author_customer\").click(function () {\r\n $.ajax({\r\n method: 'POST',\r\n url: self.options.url,\r\n data: {form_key: window.FORM_KEY},\r\n showLoader: true\r\n }).done(function (response) {\r\n $('#customer-grid').html(response);\r\n self.initPopup();\r\n });\r\n });\r\n }\r\n });\r\n\r\n return $.mageplaza.mpBlogAuthor;\r\n});\r\n\r\n","Mageplaza_Blog/js/components/new-category.js":"/**\r\n * Mageplaza\r\n *\r\n * NOTICE OF LICENSE\r\n *\r\n * This source file is subject to the Mageplaza.com license that is\r\n * available through the world-wide-web at this URL:\r\n * https://www.mageplaza.com/LICENSE.txt\r\n *\r\n * DISCLAIMER\r\n *\r\n * Do not edit or add to this file if you wish to upgrade this extension to newer\r\n * version in the future.\r\n *\r\n * @category Mageplaza\r\n * @package Mageplaza_Blog\r\n * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)\r\n * @license https://www.mageplaza.com/LICENSE.txt\r\n */\r\n\r\ndefine([\r\n 'underscore',\r\n 'Magento_Catalog/js/components/new-category'\r\n], function (_, Category) {\r\n 'use strict';\r\n\r\n /**\r\n * Processing options list\r\n *\r\n * @param {Array} array - Property array\r\n * @param {String} separator - Level separator\r\n * @param {Array} created - list to add new options\r\n *\r\n * @return {Array} Plain options list\r\n */\r\n function flattenCollection(array, separator, created) {\r\n var i = 0,\r\n length,\r\n childCollection;\r\n\r\n array = _.compact(array);\r\n length = array.length;\r\n created = created || [];\r\n\r\n for (i; i < length; i++) {\r\n created.push(array[i]);\r\n\r\n if (array[i].hasOwnProperty(separator)) {\r\n childCollection = array[i][separator];\r\n delete array[i][separator];\r\n flattenCollection.call(this, childCollection, separator, created);\r\n }\r\n }\r\n\r\n return created;\r\n }\r\n\r\n return Category.extend({\r\n /**\r\n * Get path to current option\r\n *\r\n * @param {Object} data - option data\r\n * @returns {String} path\r\n */\r\n getPath: function (data) {\r\n var pathParts,\r\n createdPath = '';\r\n\r\n if (this.renderPath && typeof data.path !== \"undefined\") {\r\n pathParts = data.path.split('.');\r\n _.each(pathParts, function (curData) {\r\n createdPath = createdPath ? createdPath + ' / ' + curData : curData;\r\n });\r\n\r\n return createdPath;\r\n }\r\n },\r\n\r\n /**\r\n * Set option to options array.\r\n *\r\n * @param {Object} option\r\n * @param {Array} options\r\n */\r\n setOption: function (option, options) {\r\n // eslint-disable-next-line radix\r\n var parent = parseInt(option.parent),\r\n copyOptionsTree;\r\n\r\n if (_.contains([0, 1], parent)) {\r\n options = options || this.cacheOptions.tree;\r\n options.push(option);\r\n\r\n copyOptionsTree = JSON.parse(JSON.stringify(this.cacheOptions.tree));\r\n this.cacheOptions.plain = flattenCollection(copyOptionsTree, this.separator);\r\n this.options(this.cacheOptions.tree);\r\n } else {\r\n this._super(option, options);\r\n }\r\n }\r\n });\r\n});\r\n","Mageplaza_Blog/category/form.js":"/**\r\n * Mageplaza\r\n *\r\n * NOTICE OF LICENSE\r\n *\r\n * This source file is subject to the Mageplaza.com license that is\r\n * available through the world-wide-web at this URL:\r\n * https://www.mageplaza.com/LICENSE.txt\r\n *\r\n * DISCLAIMER\r\n *\r\n * Do not edit or add to this file if you wish to upgrade this extension to newer\r\n * version in the future.\r\n *\r\n * @category Mageplaza\r\n * @package Mageplaza_Blog\r\n * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)\r\n * @license https://www.mageplaza.com/LICENSE.txt\r\n */\r\n\r\n/*jshint jquery:true browser:true*/\r\n/*global Ajax:true alert:true*/\r\ndefine([\r\n \"jquery\",\r\n \"mage/backend/form\",\r\n \"jquery/ui\",\r\n \"prototype\"\r\n], function ($) {\r\n \"use strict\";\r\n\r\n $.widget(\"mage.categoryForm\", $.mage.form, {\r\n options: {\r\n categoryIdSelector: 'input[name=\"category[category_id]\"]',\r\n categoryPathSelector: 'input[name=\"category[path]\"]'\r\n },\r\n\r\n /**\r\n * Form creation\r\n * @protected\r\n */\r\n _create: function () {\r\n this._super();\r\n $('body').on('categoryMove.tree', $.proxy(this.refreshPath, this));\r\n },\r\n\r\n /**\r\n * Sending ajax to server to refresh field 'category[path]'\r\n * @protected\r\n */\r\n refreshPath: function () {\r\n var that = this;\r\n if (!this.element.find(this.options.categoryIdSelector).prop('value')) {\r\n return false;\r\n }\r\n $.ajax({\r\n type: 'POST',\r\n url: this.options.refreshUrl,\r\n dataType: 'json',\r\n data: {\r\n form_key: FORM_KEY\r\n }\r\n }).success(function (data) {\r\n that._refreshPathSuccess(data);\r\n });\r\n },\r\n _refreshPathSuccess: function (response) {\r\n if (response.error) {\r\n alert(response.message);\r\n } else {\r\n if (this.element.find(this.options.categoryIdSelector).prop('value') == response.id) {\r\n this.element.find(this.options.categoryPathSelector)\r\n .prop('value', response.path);\r\n }\r\n }\r\n }\r\n });\r\n\r\n return $.mage.categoryForm;\r\n});\r\n","Mageplaza_Blog/category/edit.js":"/**\r\n * Mageplaza\r\n *\r\n * NOTICE OF LICENSE\r\n *\r\n * This source file is subject to the Mageplaza.com license that is\r\n * available through the world-wide-web at this URL:\r\n * https://www.mageplaza.com/LICENSE.txt\r\n *\r\n * DISCLAIMER\r\n *\r\n * Do not edit or add to this file if you wish to upgrade this extension to newer\r\n * version in the future.\r\n *\r\n * @category Mageplaza\r\n * @package Mageplaza_Blog\r\n * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)\r\n * @license https://www.mageplaza.com/LICENSE.txt\r\n */\r\n\r\ndefine([\r\n 'jquery',\r\n 'prototype'\r\n], function (jQuery) {\r\n\r\n var categorySubmit = function (url, useAjax) {\r\n var activeTab = $('active_tab_id');\r\n if (activeTab) {\r\n if (activeTab.tabsJsObject && activeTab.tabsJsObject.tabs('activeAnchor')) {\r\n activeTab.value = activeTab.tabsJsObject.tabs('activeAnchor').prop('id');\r\n }\r\n }\r\n\r\n var params = {};\r\n var fields = $('category_edit_form').getElementsBySelector('input', 'select');\r\n for (var i = 0; i < fields.length; i++) {\r\n if (!fields[i].name) {\r\n continue;\r\n }\r\n params[fields[i].name] = fields[i].getValue();\r\n }\r\n\r\n // Get info about what we're submitting - to properly update tree nodes\r\n var categoryId = params['category[id]'] ? params['category[id]'] : 0;\r\n var isCreating = categoryId == 0; // Separate variable is needed because '0' in javascript converts to TRUE\r\n var path = params['category[path]'].split('/');\r\n var parentId = path.pop();\r\n if (parentId == categoryId) { // Maybe path includes Blog Category id itself\r\n parentId = path.pop();\r\n }\r\n\r\n // Make operations with Blog Category tree\r\n if (isCreating) {\r\n if (!tree.currentNodeId) {\r\n // First submit of form - select some node to be current\r\n tree.currentNodeId = parentId;\r\n }\r\n tree.addNodeTo = parentId;\r\n }\r\n\r\n // Submit form\r\n jQuery('#category_edit_form').trigger('submit');\r\n };\r\n\r\n return function (config, element) {\r\n config = config || {};\r\n jQuery(element).on('click', function (event) {\r\n categorySubmit(config.url, config.ajax);\r\n });\r\n };\r\n});\r\n","Magento_LoginAsCustomerAdminUi/js/confirmation-popup.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'uiComponent',\n 'Magento_Ui/js/modal/confirm',\n 'jquery',\n 'ko',\n 'mage/translate',\n 'mage/template',\n 'underscore',\n 'Magento_Ui/js/modal/alert',\n 'text!Magento_LoginAsCustomerAdminUi/template/confirmation-popup/store-view-ptions.html'\n], function (Component, confirm, $, ko, $t, template, _, alert, selectTpl) {\n\n 'use strict';\n\n return Component.extend({\n /**\n * Initialize Component\n */\n initialize: function () {\n var self = this,\n content;\n\n this._super();\n\n content = '<div class=\"message message-warning\">' + self.content + '</div>';\n\n if (self.showStoreViewOptions) {\n content = template(\n selectTpl,\n {\n data: {\n showStoreViewOptions: self.showStoreViewOptions,\n storeViewOptions: self.storeViewOptions,\n label: $t('Store')\n }\n }) + content;\n }\n\n /**\n * Confirmation popup\n *\n * @param {String} url\n * @returns {Boolean}\n */\n window.lacConfirmationPopup = function (url) {\n confirm({\n title: self.title,\n content: content,\n modalClass: 'confirm lac-confirm',\n actions: {\n /**\n * Confirm action.\n */\n confirm: function () {\n var storeId = $('#lac-confirmation-popup-store-id').val(),\n formKey = $('input[name=\"form_key\"]').val(),\n params = {};\n\n // jscs:disable requireCamelCaseOrUpperCaseIdentifiers\n if (storeId) {\n params.store_id = storeId;\n }\n\n if (formKey) {\n params.form_key = formKey;\n }\n // jscs:enable requireCamelCaseOrUpperCaseIdentifiers\n\n $.ajax({\n url: url,\n type: 'POST',\n dataType: 'json',\n data: params,\n showLoader: true,\n\n /**\n * Open redirect URL in new window, or show messages if they are present\n *\n * @param {Object} data\n */\n success: function (data) {\n var messages = data.messages || [];\n\n if (data.message) {\n messages.push(data.message);\n }\n\n if (data.redirectUrl) {\n window.open(data.redirectUrl);\n } else if (messages.length) {\n messages = messages.map(function (message) {\n return _.escape(message);\n });\n\n alert({\n content: messages.join('<br>')\n });\n }\n },\n\n /**\n * Show XHR response text\n *\n * @param {Object} jqXHR\n */\n error: function (jqXHR) {\n alert({\n content: _.escape(jqXHR.responseText)\n });\n }\n });\n }\n },\n buttons: [{\n text: $t('Cancel'),\n class: 'action-secondary action-dismiss',\n\n /**\n * Click handler.\n */\n click: function (event) {\n this.closeModal(event);\n }\n }, {\n text: $t('Login as Customer'),\n class: 'action-primary action-accept',\n\n /**\n * Click handler.\n */\n click: function (event) {\n this.closeModal(event, true);\n }\n }]\n });\n\n return false;\n };\n }\n });\n});\n","js-storage/storage-wrapper.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'js-storage/js.storage'\n], function ($, storage) {\n 'use strict';\n\n if (window.cookieStorage) {\n var cookiesConfig = window.cookiesConfig || {};\n\n $.extend(window.cookieStorage, {\n _secure: !!cookiesConfig.secure,\n _samesite: cookiesConfig.samesite ? cookiesConfig.samesite : 'lax',\n\n /**\n * Set value under name\n * @param {String} name\n * @param {String} value\n * @param {Object} [options]\n */\n setItem: function (name, value, options) {\n var _default = {\n expires: this._expires,\n path: this._path,\n domain: this._domain,\n secure: this._secure,\n samesite: this._samesite\n };\n\n $.cookie(this._prefix + name, value, $.extend(_default, options || {}));\n },\n\n /**\n * Set default options\n * @param {Object} c\n * @returns {storage}\n */\n setConf: function (c) {\n if (c.path) {\n this._path = c.path;\n }\n\n if (c.domain) {\n this._domain = c.domain;\n }\n\n if (c.expires) {\n this._expires = c.expires;\n }\n\n if (typeof c.secure !== 'undefined') {\n this._secure = c.secure;\n }\n\n if (typeof c.samesite !== 'undefined') {\n this._samesite = c.samesite;\n }\n\n return this;\n }\n });\n }\n\n $.alwaysUseJsonInStorage = $.alwaysUseJsonInStorage || storage.alwaysUseJsonInStorage;\n $.cookieStorage = $.cookieStorage || storage.cookieStorage;\n $.initNamespaceStorage = $.initNamespaceStorage || storage.initNamespaceStorage;\n $.localStorage = $.localStorage || storage.localStorage;\n $.namespaceStorages = $.namespaceStorages || storage.namespaceStorages;\n $.removeAllStorages = $.removeAllStorages || storage.removeAllStorages;\n $.sessionStorage = $.sessionStorage || storage.sessionStorage;\n});\n","js-storage/js.storage.js":"/*\n * JS Storage Plugin\n *\n * Copyright (c) 2019 Julien Maurel\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * Project home:\n * https://github.com/julien-maurel/js-storage\n *\n * Version: 1.1.0\n */\n(function (factory) {\n var registeredInModuleLoader = false;\n if (typeof define === 'function' && define.amd) {\n define(['jquery', 'jquery/jquery.cookie'], factory);\n registeredInModuleLoader = true;\n }\n if (typeof exports === 'object') {\n module.exports = factory();\n registeredInModuleLoader = true;\n }\n if (!registeredInModuleLoader) {\n var OldStorages = window.Storages;\n var api = window.Storages = factory();\n api.noConflict = function () {\n window.Storages = OldStorages;\n return api;\n };\n }\n}(function () {\n // Variables used by utilities functions (like isPlainObject...)\n var class2type = {};\n var toString = class2type.toString;\n var hasOwn = class2type.hasOwnProperty;\n var fnToString = hasOwn.toString;\n var ObjectFunctionString = fnToString.call(Object);\n var getProto = Object.getPrototypeOf;\n var apis = {};\n\n // Prefix to use with cookie fallback\n var cookie_local_prefix = \"ls_\";\n var cookie_session_prefix = \"ss_\";\n\n // Get items from a storage\n function _get() {\n var storage = this._type, l = arguments.length, s = window[storage], a = arguments, a0 = a[0], vi, ret, tmp, i, j;\n if (l < 1) {\n throw new Error('Minimum 1 argument must be given');\n } else if (Array.isArray(a0)) {\n // If second argument is an array, return an object with value of storage for each item in this array\n ret = {};\n for (i in a0) {\n if (a0.hasOwnProperty(i)) {\n vi = a0[i];\n try {\n ret[vi] = JSON.parse(s.getItem(vi));\n } catch (e) {\n ret[vi] = s.getItem(vi);\n }\n }\n }\n return ret;\n } else if (l == 1) {\n // If only 1 argument, return value directly\n try {\n return JSON.parse(s.getItem(a0));\n } catch (e) {\n return s.getItem(a0);\n }\n } else {\n // If more than 1 argument, parse storage to retrieve final value to return it\n // Get first level\n try {\n ret = JSON.parse(s.getItem(a0));\n if (!ret) {\n throw new ReferenceError(a0 + ' is not defined in this storage');\n }\n } catch (e) {\n throw new ReferenceError(a0 + ' is not defined in this storage');\n }\n // Parse next levels\n for (i = 1; i < l - 1; i++) {\n ret = ret[a[i]];\n if (ret === undefined) {\n throw new ReferenceError([].slice.call(a, 0, i + 1).join('.') + ' is not defined in this storage');\n }\n }\n // If last argument is an array, return an object with value for each item in this array\n // Else return value normally\n if (Array.isArray(a[i])) {\n tmp = ret;\n ret = {};\n for (j in a[i]) {\n if (a[i].hasOwnProperty(j)) {\n ret[a[i][j]] = tmp[a[i][j]];\n }\n }\n return ret;\n } else {\n return ret[a[i]];\n }\n }\n }\n\n // Set items of a storage\n function _set() {\n var storage = this._type, l = arguments.length, s = window[storage], a = arguments, a0 = a[0], a1 = a[1], vi, to_store = isNaN(a1) ? {} : [], type, tmp, i;\n if (l < 1 || !_isPlainObject(a0) && l < 2) {\n throw new Error('Minimum 2 arguments must be given or first parameter must be an object');\n } else if (_isPlainObject(a0)) {\n // If first argument is an object, set values of storage for each property of this object\n for (i in a0) {\n if (a0.hasOwnProperty(i)) {\n vi = a0[i];\n if (!_isPlainObject(vi) && !this.alwaysUseJson) {\n s.setItem(i, vi);\n } else {\n s.setItem(i, JSON.stringify(vi));\n }\n }\n }\n return a0;\n } else if (l == 2) {\n // If only 2 arguments, set value of storage directly\n if (typeof a1 === 'object' || this.alwaysUseJson) {\n s.setItem(a0, JSON.stringify(a1));\n } else {\n s.setItem(a0, a1);\n }\n return a1;\n } else {\n // If more than 3 arguments, parse storage to retrieve final node and set value\n // Get first level\n try {\n tmp = s.getItem(a0);\n if (tmp != null) {\n to_store = JSON.parse(tmp);\n }\n } catch (e) {\n }\n tmp = to_store;\n // Parse next levels and set value\n for (i = 1; i < l - 2; i++) {\n vi = a[i];\n type = isNaN(a[i + 1]) ? \"object\" : \"array\";\n if (!tmp[vi] || type == \"object\" && !_isPlainObject(tmp[vi]) || type == \"array\" && !Array.isArray(tmp[vi])) {\n if (type == \"array\") tmp[vi] = [];\n else tmp[vi] = {};\n }\n tmp = tmp[vi];\n }\n tmp[a[i]] = a[i + 1];\n s.setItem(a0, JSON.stringify(to_store));\n return to_store;\n }\n }\n\n // Remove items from a storage\n function _remove() {\n var storage = this._type, l = arguments.length, s = window[storage], a = arguments, a0 = a[0], to_store, tmp, i, j;\n if (l < 1) {\n throw new Error('Minimum 1 argument must be given');\n } else if (Array.isArray(a0)) {\n // If first argument is an array, remove values from storage for each item of this array\n for (i in a0) {\n if (a0.hasOwnProperty(i)) {\n s.removeItem(a0[i]);\n }\n }\n return true;\n } else if (l == 1) {\n // If only 2 arguments, remove value from storage directly\n s.removeItem(a0);\n return true;\n } else {\n // If more than 2 arguments, parse storage to retrieve final node and remove value\n // Get first level\n try {\n to_store = tmp = JSON.parse(s.getItem(a0));\n } catch (e) {\n throw new ReferenceError(a0 + ' is not defined in this storage');\n }\n // Parse next levels and remove value\n for (i = 1; i < l - 1; i++) {\n tmp = tmp[a[i]];\n if (tmp === undefined) {\n throw new ReferenceError([].slice.call(a, 1, i).join('.') + ' is not defined in this storage');\n }\n }\n // If last argument is an array,remove value for each item in this array\n // Else remove value normally\n if (Array.isArray(a[i])) {\n for (j in a[i]) {\n if (a[i].hasOwnProperty(j)) {\n delete tmp[a[i][j]];\n }\n }\n } else {\n delete tmp[a[i]];\n }\n s.setItem(a0, JSON.stringify(to_store));\n return true;\n }\n }\n\n // Remove all items from a storage\n function _removeAll(reinit_ns) {\n var keys = _keys.call(this), i;\n for (i in keys) {\n if (keys.hasOwnProperty(i)) {\n _remove.call(this, keys[i]);\n }\n }\n // Reinitialize all namespace storages\n if (reinit_ns) {\n for (i in apis.namespaceStorages) {\n if (apis.namespaceStorages.hasOwnProperty(i)) {\n _createNamespace(i);\n }\n }\n }\n }\n\n // Check if items of a storage are empty\n function _isEmpty() {\n var l = arguments.length, a = arguments, a0 = a[0], i;\n if (l == 0) {\n // If no argument, test if storage is empty\n return (_keys.call(this).length == 0);\n } else if (Array.isArray(a0)) {\n // If first argument is an array, test each item of this array and return true only if all items are empty\n for (i = 0; i < a0.length; i++) {\n if (!_isEmpty.call(this, a0[i])) {\n return false;\n }\n }\n return true;\n } else {\n // If at least 1 argument, try to get value and test it\n try {\n var v = _get.apply(this, arguments);\n // Convert result to an object (if last argument is an array, _get return already an object) and test each item\n if (!Array.isArray(a[l - 1])) {\n v = {'totest': v};\n }\n for (i in v) {\n if (v.hasOwnProperty(i) && !(\n (_isPlainObject(v[i]) && _isEmptyObject(v[i])) ||\n (Array.isArray(v[i]) && !v[i].length) ||\n (typeof v[i] !== 'boolean' && !v[i])\n )) {\n return false;\n }\n }\n return true;\n } catch (e) {\n return true;\n }\n }\n }\n\n // Check if items of a storage exist\n function _isSet() {\n var l = arguments.length, a = arguments, a0 = a[0], i;\n if (l < 1) {\n throw new Error('Minimum 1 argument must be given');\n }\n if (Array.isArray(a0)) {\n // If first argument is an array, test each item of this array and return true only if all items exist\n for (i = 0; i < a0.length; i++) {\n if (!_isSet.call(this, a0[i])) {\n return false;\n }\n }\n return true;\n } else {\n // For other case, try to get value and test it\n try {\n var v = _get.apply(this, arguments);\n // Convert result to an object (if last argument is an array, _get return already an object) and test each item\n if (!Array.isArray(a[l - 1])) {\n v = {'totest': v};\n }\n for (i in v) {\n if (v.hasOwnProperty(i) && !(v[i] !== undefined && v[i] !== null)) {\n return false;\n }\n }\n return true;\n } catch (e) {\n return false;\n }\n }\n }\n\n // Get keys of a storage or of an item of the storage\n function _keys() {\n var storage = this._type, l = arguments.length, s = window[storage], keys = [], o = {};\n // If at least 1 argument, get value from storage to retrieve keys\n // Else, use storage to retrieve keys\n if (l > 0) {\n o = _get.apply(this, arguments);\n } else {\n o = s;\n }\n if (o && o._cookie) {\n // If storage is a cookie, use js-cookie to retrieve keys\n var cookies = Cookies.get();\n for (var key in cookies) {\n if (cookies.hasOwnProperty(key) && key != '') {\n keys.push(key.replace(o._prefix, ''));\n }\n }\n } else {\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n keys.push(i);\n }\n }\n }\n return keys;\n }\n\n // Create new namespace storage\n function _createNamespace(name) {\n if (!name || typeof name != \"string\") {\n throw new Error('First parameter must be a string');\n }\n if (storage_available) {\n if (!window.localStorage.getItem(name)) {\n window.localStorage.setItem(name, '{}');\n }\n if (!window.sessionStorage.getItem(name)) {\n window.sessionStorage.setItem(name, '{}');\n }\n } else {\n if (!window.localCookieStorage.getItem(name)) {\n window.localCookieStorage.setItem(name, '{}');\n }\n if (!window.sessionCookieStorage.getItem(name)) {\n window.sessionCookieStorage.setItem(name, '{}');\n }\n }\n var ns = {\n localStorage: _extend({}, apis.localStorage, {_ns: name}),\n sessionStorage: _extend({}, apis.sessionStorage, {_ns: name})\n };\n if (cookies_available) {\n if (!window.cookieStorage.getItem(name)) {\n window.cookieStorage.setItem(name, '{}');\n }\n ns.cookieStorage = _extend({}, apis.cookieStorage, {_ns: name});\n }\n apis.namespaceStorages[name] = ns;\n return ns;\n }\n\n // Test if storage is natively available on browser\n function _testStorage(name) {\n var foo = 'jsapi';\n try {\n if (!window[name]) {\n return false;\n }\n window[name].setItem(foo, foo);\n window[name].removeItem(foo);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Test if a variable is a plain object (from jQuery)\n function _isPlainObject(obj) {\n var proto, Ctor;\n\n // Detect obvious negatives\n // Use toString instead of jQuery.type to catch host objects\n if (!obj || toString.call(obj) !== \"[object Object]\") {\n return false;\n }\n\n proto = getProto(obj);\n\n // Objects with no prototype (e.g., `Object.create( null )`) are plain\n if (!proto) {\n return true;\n }\n\n // Objects with prototype are plain iff they were constructed by a global Object function\n Ctor = hasOwn.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && fnToString.call(Ctor) === ObjectFunctionString;\n }\n\n // Test if a variable is an empty object (from jQuery)\n function _isEmptyObject(obj) {\n var name;\n\n for (name in obj) {\n return false;\n }\n return true;\n }\n\n // Merge objects\n function _extend() {\n var i = 1;\n var result = arguments[0];\n for (; i < arguments.length; i++) {\n var attributes = arguments[i];\n for (var key in attributes) {\n if (attributes.hasOwnProperty(key)) {\n result[key] = attributes[key];\n }\n }\n }\n return result;\n }\n\n // Check if storages are natively available on browser and check is js-cookie is present\n var storage_available = _testStorage('localStorage');\n var cookies_available = typeof Cookies !== 'undefined';\n\n // Namespace object\n var storage = {\n _type: '',\n _ns: '',\n _callMethod: function (f, a) {\n a = Array.prototype.slice.call(a);\n var p = [], a0 = a[0];\n if (this._ns) {\n p.push(this._ns);\n }\n if (typeof a0 === 'string' && a0.indexOf('.') !== -1) {\n a.shift();\n [].unshift.apply(a, a0.split('.'));\n }\n [].push.apply(p, a);\n return f.apply(this, p);\n },\n // Define if plugin always use JSON to store values (even to store simple values like string, int...) or not\n alwaysUseJson: false,\n // Get items. If no parameters and storage have a namespace, return all namespace\n get: function () {\n if (!storage_available && !cookies_available){\n return null;\n }\n return this._callMethod(_get, arguments);\n },\n // Set items\n set: function () {\n var l = arguments.length, a = arguments, a0 = a[0];\n if (l < 1 || !_isPlainObject(a0) && l < 2) {\n throw new Error('Minimum 2 arguments must be given or first parameter must be an object');\n }\n if (!storage_available && !cookies_available){\n return null;\n }\n // If first argument is an object and storage is a namespace storage, set values individually\n if (_isPlainObject(a0) && this._ns) {\n for (var i in a0) {\n if (a0.hasOwnProperty(i)) {\n this._callMethod(_set, [i, a0[i]]);\n }\n }\n return a0;\n } else {\n var r = this._callMethod(_set, a);\n if (this._ns) {\n return r[a0.split('.')[0]];\n } else {\n return r;\n }\n }\n },\n // Delete items\n remove: function () {\n if (arguments.length < 1) {\n throw new Error('Minimum 1 argument must be given');\n }\n if (!storage_available && !cookies_available){\n return null;\n }\n return this._callMethod(_remove, arguments);\n },\n // Delete all items\n removeAll: function (reinit_ns) {\n if (!storage_available && !cookies_available){\n return null;\n }\n if (this._ns) {\n this._callMethod(_set, [{}]);\n return true;\n } else {\n return this._callMethod(_removeAll, [reinit_ns]);\n }\n },\n // Items empty\n isEmpty: function () {\n if (!storage_available && !cookies_available){\n return null;\n }\n return this._callMethod(_isEmpty, arguments);\n },\n // Items exists\n isSet: function () {\n if (arguments.length < 1) {\n throw new Error('Minimum 1 argument must be given');\n }\n if (!storage_available && !cookies_available){\n return null;\n }\n return this._callMethod(_isSet, arguments);\n },\n // Get keys of items\n keys: function () {\n if (!storage_available && !cookies_available){\n return null;\n }\n return this._callMethod(_keys, arguments);\n }\n };\n\n // Use js-cookie for compatibility with old browsers and give access to cookieStorage\n if (cookies_available) {\n // sessionStorage is valid for one window/tab. To simulate that with cookie, we set a name for the window and use it for the name of the cookie\n if (!window.name) {\n window.name = Math.floor(Math.random() * 100000000);\n }\n var cookie_storage = {\n _cookie: true,\n _prefix: '',\n _expires: null,\n _path: null,\n _domain: null,\n _secure: false,\n setItem: function (n, v) {\n Cookies.set(this._prefix + n, v, {expires: this._expires, path: this._path, domain: this._domain, secure: this._secure});\n },\n getItem: function (n) {\n return Cookies.get(this._prefix + n);\n },\n removeItem: function (n) {\n return Cookies.remove(this._prefix + n, {path: this._path});\n },\n clear: function () {\n var cookies = Cookies.get();\n for (var key in cookies) {\n if (cookies.hasOwnProperty(key) && key != '') {\n if (!this._prefix && key.indexOf(cookie_local_prefix) === -1 && key.indexOf(cookie_session_prefix) === -1 || this._prefix && key.indexOf(this._prefix) === 0) {\n Cookies.remove(key);\n }\n }\n }\n },\n setExpires: function (e) {\n this._expires = e;\n return this;\n },\n setPath: function (p) {\n this._path = p;\n return this;\n },\n setDomain: function (d) {\n this._domain = d;\n return this;\n },\n setSecure: function (s) {\n this._secure = s;\n return this;\n },\n setConf: function (c) {\n if (c.path) {\n this._path = c.path;\n }\n if (c.domain) {\n this._domain = c.domain;\n }\n if (c.secure) {\n this._secure = c.secure;\n }\n if (c.expires) {\n this._expires = c.expires;\n }\n return this;\n },\n setDefaultConf: function () {\n this._path = this._domain = this._expires = null;\n this._secure = false;\n }\n };\n if (!storage_available) {\n window.localCookieStorage = _extend({}, cookie_storage, {\n _prefix: cookie_local_prefix,\n _expires: 365 * 10,\n _secure: true\n });\n window.sessionCookieStorage = _extend({}, cookie_storage, {\n _prefix: cookie_session_prefix + window.name + '_',\n _secure: true\n });\n }\n window.cookieStorage = _extend({}, cookie_storage);\n // cookieStorage API\n apis.cookieStorage = _extend({}, storage, {\n _type: 'cookieStorage',\n setExpires: function (e) {\n window.cookieStorage.setExpires(e);\n return this;\n },\n setPath: function (p) {\n window.cookieStorage.setPath(p);\n return this;\n },\n setDomain: function (d) {\n window.cookieStorage.setDomain(d);\n return this;\n },\n setSecure: function (s) {\n window.cookieStorage.setSecure(s);\n return this;\n },\n setConf: function (c) {\n window.cookieStorage.setConf(c);\n return this;\n },\n setDefaultConf: function () {\n window.cookieStorage.setDefaultConf();\n return this;\n }\n });\n }\n\n // Get a new API on a namespace\n apis.initNamespaceStorage = function (ns) {\n return _createNamespace(ns);\n };\n if (storage_available) {\n // localStorage API\n apis.localStorage = _extend({}, storage, {_type: 'localStorage'});\n // sessionStorage API\n apis.sessionStorage = _extend({}, storage, {_type: 'sessionStorage'});\n } else {\n // localStorage API\n apis.localStorage = _extend({}, storage, {_type: 'localCookieStorage'});\n // sessionStorage API\n apis.sessionStorage = _extend({}, storage, {_type: 'sessionCookieStorage'});\n }\n // List of all namespace storage\n apis.namespaceStorages = {};\n // Remove all items in all storages\n apis.removeAllStorages = function (reinit_ns) {\n apis.localStorage.removeAll(reinit_ns);\n apis.sessionStorage.removeAll(reinit_ns);\n if (apis.cookieStorage) {\n apis.cookieStorage.removeAll(reinit_ns);\n }\n if (!reinit_ns) {\n apis.namespaceStorages = {};\n }\n };\n // About alwaysUseJson\n // By default, all values are string on html storages and the plugin don't use json to store simple values (strings, int, float...)\n // So by default, if you do storage.setItem('test',2), value in storage will be \"2\", not 2\n // If you set this property to true, all values set with the plugin will be stored as json to have typed values in any cases\n apis.alwaysUseJsonInStorage = function (value) {\n storage.alwaysUseJson = value;\n apis.localStorage.alwaysUseJson = value;\n apis.sessionStorage.alwaysUseJson = value;\n if (apis.cookieStorage) {\n apis.cookieStorage.alwaysUseJson = value;\n }\n };\n\n return apis;\n}));\n","Magento_Security/js/escaper.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * A loose JavaScript version of Magento\\Framework\\Escaper\n *\n * Due to differences in how XML/HTML is processed in PHP vs JS there are a couple of minor differences in behavior\n * from the PHP counterpart.\n *\n * The first difference is that the default invocation of escapeHtml without allowedTags will double-escape existing\n * entities as the intention of such an invocation is that the input isn't supposed to contain any HTML.\n *\n * The second difference is that escapeHtml will not escape quotes. Since the input is actually being processed by the\n * DOM there is no chance of quotes being mixed with HTML syntax. And, since escapeHtml is not\n * intended to be used with raw injection into a HTML attribute, this is acceptable.\n *\n * @api\n */\ndefine([], function () {\n 'use strict';\n\n return {\n neverAllowedElements: ['script', 'img', 'embed', 'iframe', 'video', 'source', 'object', 'audio'],\n generallyAllowedAttributes: ['id', 'class', 'href', 'title', 'style'],\n forbiddenAttributesByElement: {\n a: ['style']\n },\n\n /**\n * Escape a string for safe injection into HTML\n *\n * @param {String} data\n * @param {Array|null} allowedTags\n * @returns {String}\n */\n escapeHtml: function (data, allowedTags) {\n var domParser = new DOMParser(),\n fragment = domParser.parseFromString('<div></div>', 'text/html');\n\n fragment = fragment.body.childNodes[0];\n allowedTags = typeof allowedTags === 'object' && allowedTags.length ? allowedTags : null;\n\n if (allowedTags) {\n fragment.innerHTML = data || '';\n allowedTags = this._filterProhibitedTags(allowedTags);\n\n this._removeComments(fragment);\n this._removeNotAllowedElements(fragment, allowedTags);\n this._removeNotAllowedAttributes(fragment);\n\n return fragment.innerHTML;\n }\n\n fragment.textContent = data || '';\n\n return fragment.innerHTML;\n },\n\n /**\n * Remove the always forbidden tags from a list of provided tags\n *\n * @param {Array} tags\n * @returns {Array}\n * @private\n */\n _filterProhibitedTags: function (tags) {\n return tags.filter(function (n) {\n return this.neverAllowedElements.indexOf(n) === -1;\n }.bind(this));\n },\n\n /**\n * Remove comment nodes from the given node\n *\n * @param {Node} node\n * @private\n */\n _removeComments: function (node) {\n var treeWalker = node.ownerDocument.createTreeWalker(\n node,\n NodeFilter.SHOW_COMMENT,\n function () {\n return NodeFilter.FILTER_ACCEPT;\n },\n false\n ),\n nodesToRemove = [];\n\n while (treeWalker.nextNode()) {\n nodesToRemove.push(treeWalker.currentNode);\n }\n\n nodesToRemove.forEach(function (nodeToRemove) {\n nodeToRemove.parentNode.removeChild(nodeToRemove);\n });\n },\n\n /**\n * Strip the given node of all disallowed tags while permitting any nested text nodes\n *\n * @param {Node} node\n * @param {Array|null} allowedTags\n * @private\n */\n _removeNotAllowedElements: function (node, allowedTags) {\n var treeWalker = node.ownerDocument.createTreeWalker(\n node,\n NodeFilter.SHOW_ELEMENT,\n function (currentNode) {\n return allowedTags.indexOf(currentNode.nodeName.toLowerCase()) === -1 ?\n NodeFilter.FILTER_ACCEPT\n // SKIP instead of REJECT because REJECT also rejects child nodes\n : NodeFilter.FILTER_SKIP;\n },\n false\n ),\n nodesToRemove = [];\n\n while (treeWalker.nextNode()) {\n if (allowedTags.indexOf(treeWalker.currentNode.nodeName.toLowerCase()) === -1) {\n nodesToRemove.push(treeWalker.currentNode);\n }\n }\n\n nodesToRemove.forEach(function (nodeToRemove) {\n nodeToRemove.parentNode.replaceChild(\n node.ownerDocument.createTextNode(nodeToRemove.textContent),\n nodeToRemove\n );\n });\n },\n\n /**\n * Remove any invalid attributes from the given node\n *\n * @param {Node} node\n * @private\n */\n _removeNotAllowedAttributes: function (node) {\n var treeWalker = node.ownerDocument.createTreeWalker(\n node,\n NodeFilter.SHOW_ELEMENT,\n function () {\n return NodeFilter.FILTER_ACCEPT;\n },\n false\n ),\n i,\n attribute,\n nodeName,\n attributesToRemove = [];\n\n while (treeWalker.nextNode()) {\n for (i = 0; i < treeWalker.currentNode.attributes.length; i++) {\n attribute = treeWalker.currentNode.attributes[i];\n nodeName = treeWalker.currentNode.nodeName.toLowerCase();\n\n if (this.generallyAllowedAttributes.indexOf(attribute.name) === -1 || // eslint-disable-line max-depth,max-len\n this._checkHrefValue(attribute) ||\n this.forbiddenAttributesByElement[nodeName] &&\n this.forbiddenAttributesByElement[nodeName].indexOf(attribute.name) !== -1\n ) {\n attributesToRemove.push(attribute);\n }\n }\n }\n\n attributesToRemove.forEach(function (attributeToRemove) {\n attributeToRemove.ownerElement.removeAttribute(attributeToRemove.name);\n });\n },\n\n /**\n * Check that attribute contains script content\n *\n * @param {Object} attribute\n * @private\n */\n _checkHrefValue: function (attribute) {\n return attribute.nodeName === 'href' && attribute.nodeValue.startsWith('javascript');\n }\n };\n});\n","Magento_Security/js/confirm-redirect.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n/*eslint-disable no-undef*/\ndefine(\n ['jquery'],\n function ($) {\n 'use strict';\n\n return function (config, element) {\n $(element).on('click', config, function () {\n confirmSetLocation(config.message, config.url);\n });\n };\n }\n);\n","Magento_Security/js/system/config/session-size.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/translate',\n 'Magento_Ui/js/modal/confirm',\n 'domReady!'\n], function ($, $t, confirm) {\n 'use strict';\n\n return function (config, inputEl) {\n var $inputEl = $(inputEl);\n\n $inputEl.on('blur', function () {\n var inputVal = parseInt($inputEl.val(), 10);\n\n if (inputVal < 256000) {\n confirm({\n title: $t(config.modalTitleText),\n content: $t(config.modalContentBody),\n buttons: [{\n text: $t('No'),\n class: 'action-secondary action-dismiss',\n\n /**\n * Close modal and trigger 'cancel' action on click\n */\n click: function (event) {\n this.closeModal(event);\n }\n }, {\n text: $t('Yes'),\n class: 'action-primary action-accept',\n\n /**\n * Close modal and trigger 'confirm' action on click\n */\n click: function (event) {\n this.closeModal(event, true);\n }\n }],\n actions: {\n\n /**\n * Revert back to original value\n */\n cancel: function () {\n $inputEl.val(256000);\n }\n }\n });\n }\n });\n };\n});\n","Magento_InventoryCatalogAdminUi/js/product/form/qty.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_CatalogInventory/js/components/qty-validator-changer'\n], function (Abstract) {\n 'use strict';\n\n return Abstract.extend({\n defaults: {\n links: {\n value: false\n }\n },\n\n /** @inheritdoc */\n getInitialValue: function () {\n var values = [this.source.get(this.dataScope), this.default],\n value;\n\n values.some(function (v) {\n if (v !== null && v !== undefined) {\n value = v;\n\n return true;\n }\n\n return false;\n });\n\n return this.normalizeData(value);\n },\n\n /** @inheritdoc */\n setDifferedFromDefault: function () {\n var initialValue;\n\n this._super();\n initialValue = this.source.data.product['current_product_id'] !== null ? this.initialValue : 0;\n\n if (this.value() &&\n parseFloat(initialValue) !== parseFloat(this.value())\n ) {\n this.source.set(this.dataScope, this.value());\n } else {\n this.source.remove(this.dataScope);\n }\n }\n });\n});\n","Magento_InventoryCatalogAdminUi/js/product/form/stock-status.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/select'\n], function (Select) {\n 'use strict';\n\n return Select.extend({\n defaults: {\n links: {\n linkedValue: false\n }\n },\n\n /** @inheritdoc */\n getInitialValue: function () {\n var values = [this.source.get(this.dataScope), this.default],\n value;\n\n values.some(function (v) {\n if (v !== null && v !== undefined) {\n value = v;\n\n return true;\n }\n\n return false;\n });\n\n return this.normalizeData(value);\n },\n\n /** @inheritdoc */\n setDifferedFromDefault: function () {\n this._super();\n\n if (parseFloat(this.initialValue) !== parseFloat(this.value())) {\n this.source.set(this.dataScope, this.value());\n } else {\n this.source.remove(this.dataScope);\n }\n }\n });\n});\n","Magento_InventoryCatalogAdminUi/js/product/form/source-items.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/components/fieldset',\n 'uiRegistry',\n 'underscore'\n], function (Fieldset, registry, _) {\n 'use strict';\n\n return Fieldset.extend({\n defaults: {\n advancedInventoryButtonIndex: '',\n imports: {\n onStockChange: '${ $.provider }:data.product.stock_data.manage_stock'\n }\n },\n\n /**\n * \"Advanced Inventory\" button should stay active in any case.\n *\n * @param {Integer} canManageStock\n */\n onStockChange: function (canManageStock) {\n var advancedInventoryButton = registry.get('index = ' + this.advancedInventoryButtonIndex);\n\n if (canManageStock === 0) {\n if (!_.isUndefined(advancedInventoryButton)) {\n advancedInventoryButton.disabled(false);\n }\n }\n }\n });\n});\n","Magento_InventoryCatalogAdminUi/js/product/form/sources/qty.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_CatalogInventory/js/components/qty-validator-changer'\n], function (Validator) {\n 'use strict';\n\n return Validator.extend({\n\n /**\n * Set default value for source quantity, depends on 'Use Decimal\" value.\n *\n * @param {Integer} isDecimal\n * @returns void\n */\n setDefaultValue: function (isDecimal) {\n if (!this.value()) {\n isDecimal ? this.value('0.0') : this.value('0');\n }\n }\n });\n});\n","Magento_InventoryCatalogAdminUi/js/product/grid/cell/quantity-per-source.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/grid/columns/column'\n], function (Column) {\n 'use strict';\n\n return Column.extend({\n defaults: {\n bodyTmpl: 'Magento_InventoryCatalogAdminUi/product/grid/cell/source-items.html',\n itemsToDisplay: 5\n },\n\n /**\n * Get source items data (source name and qty)\n *\n * @param {Object} record - Record object\n * @returns {Array} Result array\n */\n getSourceItemsData: function (record) {\n return record[this.index] ? record[this.index] : [];\n },\n\n /**\n * @param {Object} record - Record object\n * @returns {Array} Result array\n */\n getSourceItemsDataCut: function (record) {\n return this.getSourceItemsData(record).slice(0, this.itemsToDisplay);\n }\n });\n});\n","Magento_InventoryCatalogAdminUi/js/product/attribute/edit/inventory/toggle/toggle-editability.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery'\n], function ($) {\n 'use strict';\n\n $('[data-role=toggle-editability]').on('change', function () {\n var useConfigSettings = $(this),\n field = useConfigSettings.parents('.field'),\n someEditable = $('input[type!=\"checkbox\"], select, textarea', field);\n\n someEditable.prop('disabled', useConfigSettings.prop('checked'));\n });\n});\n","Magento_InventoryCatalogAdminUi/js/product/attribute/edit/inventory/toggle/toggle-editability-all.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery'\n], function ($) {\n 'use strict';\n\n $('[data-role=toggle-editability-all]').on('change', function () {\n var toggler = $(this),\n field = toggler.parents('.field'),\n someEditable = $('input[type!=\"checkbox\"], select, textarea', field),\n someEditableCheckboxes = $('input[type=\"checkbox\"]', field).not(toggler);\n\n if (someEditableCheckboxes.length) {\n someEditable.prop('disabled', !toggler.prop('checked') || someEditableCheckboxes.prop('checked'));\n someEditableCheckboxes.prop('disabled', !toggler.prop('checked'));\n } else {\n someEditable.prop('disabled', !toggler.prop('checked'));\n }\n });\n});\n","Magento_LoginAsCustomerAssistance/js/not-allowed-popup.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'uiComponent',\n 'Magento_Ui/js/modal/confirm',\n 'mage/translate'\n], function (Component, confirm, $t) {\n\n 'use strict';\n\n return Component.extend({\n /**\n * Initialize Component\n */\n initialize: function () {\n var self = this,\n content;\n\n this._super();\n\n content = '<div class=\"message message-warning\">' + self.content + '</div>';\n\n /**\n * Not Allowed popup\n *\n * @returns {Boolean}\n */\n window.lacNotAllowedPopup = function () {\n confirm({\n title: self.title,\n content: content,\n modalClass: 'confirm lac-confirm',\n buttons: [\n {\n text: $t('Close'),\n class: 'action-secondary action-dismiss',\n\n /**\n * Click handler.\n */\n click: function (event) {\n this.closeModal(event);\n }\n }\n ]\n });\n\n return false;\n };\n }\n });\n});\n","Magento_AdobeStockAdminUi/js/connection.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'ko',\n 'uiComponent',\n 'jquery'\n], function (ko, Component, $) {\n 'use strict';\n\n return Component.extend({\n defaults: {\n template: 'Magento_AdobeStockAdminUi/connection',\n connectionFailedMessage: 'Connection test failed.',\n emptyApiKeyMessage: 'Please fill the \"API Key (Client ID)\" field for a connection test',\n apiKeyInputId: 'system_adobe_stock_integration_api_key',\n url: '',\n success: false,\n message: '',\n visible: false\n },\n\n /**\n * Init observable variables\n * @return {Object}\n */\n initObservable: function () {\n this._super()\n .observe([\n 'success',\n 'message',\n 'visible'\n ]);\n\n return this;\n },\n\n /**\n * @override\n */\n initialize: function () {\n this._super();\n this.messageClass = ko.computed(function () {\n return 'message-validation message message-' + (this.success() ? 'success' : 'error');\n }, this);\n\n if (!this.success()) {\n this.showMessage(false, this.connectionFailedMessage);\n }\n },\n\n /**\n * @param {bool} success\n * @param {String} message\n */\n showMessage: function (success, message) {\n this.message(message);\n this.success(success);\n this.visible(true);\n },\n\n /**\n * Send request to server to test connection to Adobe Stock API and display the result\n */\n testConnection: function () {\n var apiKey = document.getElementById(this.apiKeyInputId).value;\n\n if (apiKey.length === 0) {\n this.showMessage(false, this.emptyApiKeyMessage);\n\n return;\n }\n\n this.visible(false);\n\n $.ajax({\n type: 'POST',\n url: this.url,\n dataType: 'json',\n data: {\n 'api_key': apiKey\n },\n success: function (response) {\n this.showMessage(response.success === true, response.message);\n }.bind(this),\n error: function () {\n this.showMessage(false, this.connectionFailedMessage);\n }.bind(this)\n });\n }\n });\n});\n","Magento_Customer/js/form/components/form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'jquery',\n 'Magento_Ui/js/modal/alert',\n 'Magento_Ui/js/modal/confirm',\n 'Magento_Ui/js/form/form',\n 'underscore',\n 'mage/translate'\n], function ($, uiAlert, uiConfirm, Form, _, $t) {\n 'use strict';\n\n return Form.extend({\n defaults: {\n deleteConfirmationMessage: '',\n ajaxSettings: {\n method: 'POST',\n dataType: 'json'\n }\n },\n\n /**\n * Delete customer address by provided url.\n * Will call confirmation message to be sure that user is really wants to delete this address\n *\n * @param {String} url - ajax url\n */\n deleteAddress: function (url) {\n var that = this;\n\n uiConfirm({\n content: this.deleteConfirmationMessage,\n actions: {\n /** @inheritdoc */\n confirm: function () {\n that._delete(url);\n }\n }\n });\n },\n\n /**\n * Perform asynchronous DELETE request to server.\n * @param {String} url - ajax url\n * @returns {Deferred}\n */\n _delete: function (url) {\n var settings = _.extend({}, this.ajaxSettings, {\n url: url,\n data: {\n 'form_key': window.FORM_KEY\n }\n }),\n that = this;\n\n $('body').trigger('processStart');\n\n return $.ajax(settings)\n .done(function (response) {\n if (response.error) {\n uiAlert({\n content: response.message\n });\n } else {\n that.trigger('deleteAddressAction', that.source.get('data.entity_id'));\n }\n })\n .fail(function () {\n uiAlert({\n content: $t('Sorry, there has been an error processing your request. Please try again later.')\n });\n })\n .always(function () {\n $('body').trigger('processStop');\n });\n\n }\n });\n});\n","Magento_Customer/js/form/components/insert-listing.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/components/insert-listing',\n 'underscore'\n], function (Insert, _) {\n 'use strict';\n\n return Insert.extend({\n\n /**\n * On action call\n *\n * @param {Object} data - customer address and actions\n */\n onAction: function (data) {\n this[data.action + 'Action'].call(this, data.data);\n },\n\n /**\n * On mass action call\n *\n * @param {Object} data - customer address\n */\n onMassAction: function (data) {\n this[data.action + 'Massaction'].call(this, data.data);\n },\n\n /**\n * Set default billing address\n *\n * @param {Object} data - customer address\n */\n setDefaultBillingAction: function (data) {\n this.source.set('data.default_billing_address', data);\n },\n\n /**\n * Set default shipping address\n *\n * @param {Object} data - customer address\n */\n setDefaultShippingAction: function (data) {\n this.source.set('data.default_shipping_address', data);\n },\n\n /**\n * Delete customer address\n *\n * @param {Object} data - customer address\n */\n deleteAction: function (data) {\n this._delete([parseFloat(data[data['id_field_name']])]);\n },\n\n /**\n * Mass action delete\n *\n * @param {Object} data - customer address\n */\n deleteMassaction: function (data) {\n var ids = data.selected || this.selections().selected();\n\n ids = _.map(ids, function (val) {\n return parseFloat(val);\n });\n\n this._delete(ids);\n },\n\n /**\n * Delete customer address and selections by provided ids.\n *\n * @param {Array} ids\n */\n _delete: function (ids) {\n var defaultShippingId = parseFloat(this.source.get('data.default_shipping_address.entity_id')),\n defaultBillingId = parseFloat(this.source.get('data.default_billing_address.entity_id'));\n\n if (ids.indexOf(defaultShippingId) !== -1) {\n this.source.set('data.default_shipping_address', []);\n }\n\n if (ids.indexOf(defaultBillingId) !== -1) {\n this.source.set('data.default_billing_address', []);\n }\n\n _.each(ids, function (id) {\n this.selections().deselect(id.toString(), false);\n }, this);\n }\n });\n});\n","Magento_Customer/js/form/components/insert-form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/components/insert-form'\n], function (Insert) {\n 'use strict';\n\n return Insert.extend({\n defaults: {\n listens: {\n responseData: 'onResponse'\n },\n modules: {\n addressListing: '${ $.addressListingProvider }',\n addressModal: '${ $.addressModalProvider }'\n }\n },\n\n /**\n * Close modal, reload customer address listing and save customer address\n *\n * @param {Object} responseData\n */\n onResponse: function (responseData) {\n var data;\n\n if (!responseData.error) {\n this.addressModal().closeModal();\n this.addressListing().reload({\n refresh: true\n });\n data = this.externalSource().get('data');\n this.saveAddress(responseData, data);\n }\n },\n\n /**\n * Save customer address to customer form data source\n *\n * @param {Object} responseData\n * @param {Object} data - customer address\n */\n saveAddress: function (responseData, data) {\n data['entity_id'] = responseData.data['entity_id'];\n\n if (parseFloat(data['default_billing'])) {\n this.source.set('data.default_billing_address', data);\n } else if (\n parseFloat(this.source.get('data.default_billing_address')['entity_id']) === data['entity_id']\n ) {\n this.source.set('data.default_billing_address', []);\n }\n\n if (parseFloat(data['default_shipping'])) {\n this.source.set('data.default_shipping_address', data);\n } else if (\n parseFloat(this.source.get('data.default_shipping_address')['entity_id']) === data['entity_id']\n ) {\n this.source.set('data.default_shipping_address', []);\n }\n },\n\n /**\n * Event method that closes \"Edit customer address\" modal and refreshes grid after customer address\n * was removed through \"Delete\" button on the \"Edit customer address\" modal\n *\n * @param {String} id - customer address ID to delete\n */\n onAddressDelete: function (id) {\n this.addressModal().closeModal();\n this.addressListing().reload({\n refresh: true\n });\n this.addressListing()._delete([parseFloat(id)]);\n }\n });\n});\n","Magento_Customer/js/form/element/website.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/website',\n 'uiRegistry',\n 'underscore'\n], function (Website, registry, _) {\n 'use strict';\n\n return Website.extend({\n /**\n * On value change handler.\n *\n * @param {String} value\n */\n onUpdate: function (value) {\n var groupIdFieldKey = 'group_id',\n sendEmailStoreIdFieldKey = 'sendemail_store_id',\n groupId = registry.get('index = ' + groupIdFieldKey),\n sendEmailStoreId = registry.get('index = ' + sendEmailStoreIdFieldKey),\n customerAttributes = registry.filter('parentScope = data.customer'),\n option = this.getOption(value);\n\n customerAttributes.forEach(element => {\n var requiredWebsites = element.validation['required-entry-website'];\n\n if (!_.isArray(requiredWebsites)) {\n return;\n }\n if (requiredWebsites.includes(parseInt(value, 10))) {\n element.validation['required-entry'] = true;\n element.required(true);\n } else {\n delete element.validation['required-entry'];\n element.required(false);\n }\n });\n\n if (groupId) {\n groupId.value(option[groupIdFieldKey]);\n }\n\n if (sendEmailStoreId && option['default_store_view_id']) {\n sendEmailStoreId.value(option['default_store_view_id']);\n }\n return this._super();\n }\n });\n});\n","Magento_Customer/js/form/element/region.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/region'\n], function (Region) {\n 'use strict';\n\n return Region.extend({\n defaults: {\n regionScope: 'data.region'\n },\n\n /**\n * Set region to customer address form\n *\n * @param {String} value - region\n */\n setDifferedFromDefault: function (value) {\n this._super();\n\n if (parseFloat(value)) {\n this.source.set(this.regionScope, this.indexedOptions[value].label);\n }\n }\n });\n});\n","Magento_Customer/js/form/element/country.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/country'\n], function (Country) {\n 'use strict';\n\n return Country.extend({\n defaults: {\n countryScope: 'data.country'\n },\n\n /**\n * Set country to customer address form\n *\n * @param {String} value - country\n */\n setDifferedFromDefault: function (value) {\n this._super();\n\n if (value) {\n this.source.set(this.countryScope, this.indexedOptions[value].label);\n }\n }\n });\n});\n","Magento_Customer/js/grid/massactions.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/grid/massactions',\n 'Magento_Ui/js/modal/alert',\n 'underscore',\n 'jquery',\n 'mage/translate'\n], function (Massactions, uiAlert, _, $, $t) {\n 'use strict';\n\n return Massactions.extend({\n defaults: {\n ajaxSettings: {\n method: 'POST',\n dataType: 'json'\n },\n listens: {\n massaction: 'onAction'\n }\n },\n\n /**\n * Reload customer addresses listing\n *\n * @param {Object} data\n */\n onAction: function (data) {\n if (data.action === 'delete') {\n this.source.reload({\n refresh: true\n });\n }\n },\n\n /**\n * Default action callback. Send selections data\n * via POST request.\n *\n * @param {Object} action - Action data.\n * @param {Object} data - Selections data.\n */\n defaultCallback: function (action, data) {\n var itemsType, selections;\n\n if (action.isAjax) {\n itemsType = data.excludeMode ? 'excluded' : 'selected';\n selections = {};\n\n selections[itemsType] = data[itemsType];\n\n if (!selections[itemsType].length) {\n selections[itemsType] = false;\n }\n\n _.extend(selections, data.params || {});\n\n this.request(action.url, selections).done(function (response) {\n if (!response.error) {\n this.trigger('massaction', {\n action: action.type,\n data: selections\n });\n }\n }.bind(this));\n } else {\n this._super();\n }\n },\n\n /**\n * Send customer address listing mass action ajax request\n *\n * @param {String} href\n * @param {Object} data\n */\n request: function (href, data) {\n var settings = _.extend({}, this.ajaxSettings, {\n url: href,\n data: data\n });\n\n $('body').trigger('processStart');\n\n return $.ajax(settings)\n .done(function (response) {\n if (response.error) {\n uiAlert({\n content: response.message\n });\n }\n })\n .fail(function () {\n uiAlert({\n content: $t('Sorry, there has been an error processing your request. Please try again later.')\n });\n })\n .always(function () {\n $('body').trigger('processStop');\n });\n }\n });\n});\n","Magento_Customer/js/grid/columns/actions.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/grid/columns/actions',\n 'Magento_Ui/js/modal/alert',\n 'underscore',\n 'jquery',\n 'mage/translate'\n], function (Actions, uiAlert, _, $, $t) {\n 'use strict';\n\n return Actions.extend({\n defaults: {\n ajaxSettings: {\n method: 'POST',\n dataType: 'json'\n },\n listens: {\n action: 'onAction'\n },\n ignoreTmpls: {\n fieldAction: true,\n options: true,\n action: true\n }\n },\n\n /**\n * Reload customer address listing data source after customer address delete action\n *\n * @param {Object} data\n */\n onAction: function (data) {\n if (data.action === 'delete') {\n this.source().reload({\n refresh: true\n });\n }\n },\n\n /**\n * Default action callback. Redirects to\n * the specified in action's data url.\n *\n * @param {String} actionIndex - Action's identifier.\n * @param {(Number|String)} recordId - Id of the record associated\n * with a specified action.\n * @param {Object} action - Action's data.\n */\n defaultCallback: function (actionIndex, recordId, action) {\n if (action.isAjax) {\n this.request(action.href).done(function (response) {\n var data;\n\n if (!response.error) {\n data = _.findWhere(this.rows, {\n _rowIndex: action.rowIndex\n });\n\n this.trigger('action', {\n action: actionIndex,\n data: data\n });\n }\n }.bind(this));\n\n } else {\n this._super();\n }\n },\n\n /**\n * Send customer address listing ajax request\n *\n * @param {String} href\n */\n request: function (href) {\n var settings = _.extend({}, this.ajaxSettings, {\n url: href,\n data: {\n 'form_key': window.FORM_KEY\n }\n });\n\n $('body').trigger('processStart');\n\n return $.ajax(settings)\n .done(function (response) {\n if (response.error) {\n uiAlert({\n content: response.message\n });\n }\n })\n .fail(function () {\n uiAlert({\n content: $t('Sorry, there has been an error processing your request. Please try again later.')\n });\n })\n .always(function () {\n $('body').trigger('processStop');\n });\n }\n });\n});\n","Magento_Customer/js/grid/filters/filters.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/grid/filters/filters'\n], function (Filters) {\n 'use strict';\n\n return Filters.extend({\n defaults: {\n chipsConfig: {\n name: '${ $.name }_chips',\n provider: '${ $.chipsConfig.name }',\n component: 'Magento_Customer/js/grid/filters/chips'\n }\n }\n });\n});\n","Magento_Customer/js/grid/filters/chips.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/grid/filters/chips'\n], function (Chips) {\n 'use strict';\n\n return Chips.extend({\n\n /**\n * Clear previous filters while initializing element to prevent filters sharing between customers\n *\n * @param {Object} elem\n */\n initElement: function (elem) {\n this.clear();\n this._super(elem);\n }\n });\n});\n","Magento_Customer/js/address/default-address.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/components/button',\n 'underscore'\n], function (Button, _) {\n 'use strict';\n\n return Button.extend({\n defaults: {\n entityId: null,\n parentId: null,\n listens: {\n entity: 'changeVisibility'\n }\n },\n\n /**\n * Apply action on target component,\n * but previously create this component from template if it is not existed\n *\n * @param {Object} action - action configuration\n */\n applyAction: function (action) {\n if (action.params && action.params[0]) {\n action.params[0]['entity_id'] = this.entityId;\n action.params[0]['parent_id'] = this.parentId;\n } else {\n action.params = [{\n 'entity_id': this.entityId,\n 'parent_id': this.parentId\n }];\n }\n\n this._super();\n },\n\n /**\n * Change visibility of the default address shipping/billing blocks\n *\n * @param {Object} entity - customer address\n */\n changeVisibility: function (entity) {\n this.visible(!_.isEmpty(entity));\n }\n });\n});\n","Magento_Customer/js/bootstrap/customer-post-action.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\nrequire([\n 'Magento_Customer/edit/post-wrapper'\n]);\n","Magento_Customer/edit/post-wrapper.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/modal/confirm',\n 'mage/translate'\n], function ($, confirm) {\n 'use strict';\n\n /**\n * @param {String} url\n * @returns {Object}\n */\n function getForm(url) {\n return $('<form>', {\n 'action': url,\n 'method': 'POST'\n }).append($('<input>', {\n 'name': 'form_key',\n 'value': window.FORM_KEY,\n 'type': 'hidden'\n }));\n }\n\n $('#customer-edit-delete-button').on('click', function () {\n var msg = $.mage.__('Are you sure you want to do this?'),\n url = $('#customer-edit-delete-button').data('url');\n\n confirm({\n 'content': msg,\n 'actions': {\n\n /**\n * 'Confirm' action handler.\n */\n confirm: function () {\n getForm(url).appendTo('body').submit();\n }\n }\n });\n\n return false;\n });\n});\n","Magento_InventoryShippingAdminUi/js/form/form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'jquery',\n 'Magento_Ui/js/form/form',\n 'underscore',\n 'mageUtils'\n], function ($, Form, _, utils) {\n 'use strict';\n\n return Form.extend({\n defaults: {\n sourceSelectionUrl: '${ $.sourceSelectionUrl }'\n },\n\n /**\n * Process source selection algorithm\n *\n * @param {String} redirect\n * @param {Object} data\n */\n processAlgorithm: function (redirect, data) {\n var formData = utils.filterFormData(this.source.get('data'));\n\n data.requestData = [];\n\n _.each(formData.items, function (item) {\n data.requestData.push({\n orderItem: item.orderItemId,\n sku: item.sku,\n qty: item.qtyToShip\n });\n });\n\n data.orderId = formData['order_id'];\n data.websiteId = formData.websiteId;\n data = utils.serialize(utils.filterFormData(data));\n data['form_key'] = window.FORM_KEY;\n\n if (!this.sourceSelectionUrl || this.sourceSelectionUrl === 'undefined') {\n return $.Deferred.resolve();\n }\n\n $('body').trigger('processStart');\n\n $.ajax({\n url: this.sourceSelectionUrl,\n data: data,\n\n /**\n * Success callback.\n *\n * @param {Object} response\n */\n success: function (response) {\n var dataItems = this.source.get('data.items');\n\n _.each(dataItems, function (item) {\n if (response[item.orderItemId]) {\n this.source.set('data.items.' + item['record_id'] + '.sources', response[item.orderItemId]);\n }\n }.bind(this));\n this.source.trigger('reInitSources');\n this.source.set('data.sourceCodes', response.sourceCodes ? response.sourceCodes : []);\n }.bind(this),\n\n /**\n * Complete callback.\n */\n complete: function () {\n $('body').trigger('processStop');\n }\n });\n }\n });\n});\n","Magento_InventoryShippingAdminUi/js/form/element/qty_to_deduct.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/abstract',\n 'mageUtils'\n], function (Abstract, utils) {\n 'use strict';\n\n return Abstract.extend({\n defaults: {\n sourceCode: null,\n qtyAvailable: 0\n },\n\n /**\n * @inheritdoc\n */\n initialize: function () {\n var path,\n qtyToShip,\n isManageStock;\n\n this._super();\n\n //TODO: Is it right way?\n path = utils.getPart(utils.getPart(this.parentScope, -2), -2);\n qtyToShip = this.source.get(path + '.qtyToShip');\n isManageStock = this.source.get(path + '.isManageStock');\n\n this.validation['less-than-equals-to'] = isManageStock ? this.qtyAvailable : qtyToShip;\n\n return this;\n },\n\n /**\n * Toggle disabled state.\n *\n * @param {String} selected\n */\n toggleDisable: function (selected) {\n this.disabled(selected ? selected.toString() !== this.sourceCode : !selected);\n }\n });\n});\n","Magento_InventoryShippingAdminUi/js/form/element/source_code.js":"define([\n 'underscore',\n 'Magento_Ui/js/form/element/select'\n], function (_, select) {\n 'use strict';\n\n return select.extend({\n /**\n * @inheritdoc\n */\n setOptions: function (data) {\n var result = this._super(data);\n\n if (data.length === 1) {\n this.value(data[0].value);\n }\n\n return result;\n }\n });\n});\n","Magento_InventoryShippingAdminUi/js/order/grid/cell/allocated-sources.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/grid/columns/column'\n], function (Column) {\n 'use strict';\n\n return Column.extend({\n defaults: {\n bodyTmpl: 'Magento_InventoryShippingAdminUi/order/grid/cell/allocated-sources-cell.html',\n itemsToDisplay: 5\n },\n\n /**\n *\n * @param {Array} record\n * @returns {Array}\n */\n getTooltipData: function (record) {\n return record[this.index];\n },\n\n /**\n * @param {Object} record - Record object\n * @returns {Array} Result array\n */\n getAllocatedSources: function (record) {\n return this.getTooltipData(record).slice(0, this.itemsToDisplay);\n }\n });\n});\n","Mageplaza_Core/js/bootstrap.min.js":"/*!\r\n * Bootstrap v3.3.6 (http://getbootstrap.com)\r\n * Copyright 2011-2015 Twitter, Inc.\r\n * Licensed under the MIT license\r\n */\r\nif(\"undefined\"==typeof jQuery)throw new Error(\"Bootstrap's JavaScript requires jQuery\");+function(a){\"use strict\";var b=a.fn.jquery.split(\" \")[0].split(\".\");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error(\"Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3\")}(jQuery),+function(a){\"use strict\";function b(){var a=document.createElement(\"bootstrap\"),b={WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd otransitionend\",transition:\"transitionend\"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(\"bsTransitionEnd\",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){\"use strict\";function b(b){return this.each(function(){var c=a(this),e=c.data(\"bs.alert\");e||c.data(\"bs.alert\",e=new d(this)),\"string\"==typeof b&&e[b].call(c)})}var c='[data-dismiss=\"alert\"]',d=function(b){a(b).on(\"click\",c,this.close)};d.VERSION=\"3.3.6\",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger(\"closed.bs.alert\").remove()}var e=a(this),f=e.attr(\"data-target\");f||(f=e.attr(\"href\"),f=f&&f.replace(/.*(?=#[^\\s]*$)/,\"\"));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(\".alert\")),g.trigger(b=a.Event(\"close.bs.alert\")),b.isDefaultPrevented()||(g.removeClass(\"in\"),a.support.transition&&g.hasClass(\"fade\")?g.one(\"bsTransitionEnd\",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on(\"click.bs.alert.data-api\",c,d.prototype.close)}(jQuery),+function(a){\"use strict\";function b(b){return this.each(function(){var d=a(this),e=d.data(\"bs.button\"),f=\"object\"==typeof b&&b;e||d.data(\"bs.button\",e=new c(this,f)),\"toggle\"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION=\"3.3.6\",c.DEFAULTS={loadingText:\"loading...\"},c.prototype.setState=function(b){var c=\"disabled\",d=this.$element,e=d.is(\"input\")?\"val\":\"html\",f=d.data();b+=\"Text\",null==f.resetText&&d.data(\"resetText\",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),\"loadingText\"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle=\"buttons\"]');if(b.length){var c=this.$element.find(\"input\");\"radio\"==c.prop(\"type\")?(c.prop(\"checked\")&&(a=!1),b.find(\".active\").removeClass(\"active\"),this.$element.addClass(\"active\")):\"checkbox\"==c.prop(\"type\")&&(c.prop(\"checked\")!==this.$element.hasClass(\"active\")&&(a=!1),this.$element.toggleClass(\"active\")),c.prop(\"checked\",this.$element.hasClass(\"active\")),a&&c.trigger(\"change\")}else this.$element.attr(\"aria-pressed\",!this.$element.hasClass(\"active\")),this.$element.toggleClass(\"active\")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on(\"click.bs.button.data-api\",'[data-toggle^=\"button\"]',function(c){var d=a(c.target);d.hasClass(\"btn\")||(d=d.closest(\".btn\")),b.call(d,\"toggle\"),a(c.target).is('input[type=\"radio\"]')||a(c.target).is('input[type=\"checkbox\"]')||c.preventDefault()}).on(\"focus.bs.button.data-api blur.bs.button.data-api\",'[data-toggle^=\"button\"]',function(b){a(b.target).closest(\".btn\").toggleClass(\"focus\",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){\"use strict\";function b(b){return this.each(function(){var d=a(this),e=d.data(\"bs.carousel\"),f=a.extend({},c.DEFAULTS,d.data(),\"object\"==typeof b&&b),g=\"string\"==typeof b?b:f.slide;e||d.data(\"bs.carousel\",e=new c(this,f)),\"number\"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(\".carousel-indicators\"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on(\"keydown.bs.carousel\",a.proxy(this.keydown,this)),\"hover\"==this.options.pause&&!(\"ontouchstart\"in document.documentElement)&&this.$element.on(\"mouseenter.bs.carousel\",a.proxy(this.pause,this)).on(\"mouseleave.bs.carousel\",a.proxy(this.cycle,this))};c.VERSION=\"3.3.6\",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:\"hover\",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(\".item\"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d=\"prev\"==a&&0===c||\"next\"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e=\"prev\"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(\".item.active\"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one(\"slid.bs.carousel\",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?\"next\":\"prev\",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(\".next, .prev\").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide(\"next\")},c.prototype.prev=function(){return this.sliding?void 0:this.slide(\"prev\")},c.prototype.slide=function(b,d){var e=this.$element.find(\".item.active\"),f=d||this.getItemForDirection(b,e),g=this.interval,h=\"next\"==b?\"left\":\"right\",i=this;if(f.hasClass(\"active\"))return this.sliding=!1;var j=f[0],k=a.Event(\"slide.bs.carousel\",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(\".active\").removeClass(\"active\");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass(\"active\")}var m=a.Event(\"slid.bs.carousel\",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass(\"slide\")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one(\"bsTransitionEnd\",function(){f.removeClass([b,h].join(\" \")).addClass(\"active\"),e.removeClass([\"active\",h].join(\" \")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass(\"active\"),f.addClass(\"active\"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr(\"data-target\")||(d=e.attr(\"href\"))&&d.replace(/.*(?=#[^\\s]+$)/,\"\"));if(f.hasClass(\"carousel\")){var g=a.extend({},f.data(),e.data()),h=e.attr(\"data-slide-to\");h&&(g.interval=!1),b.call(f,g),h&&f.data(\"bs.carousel\").to(h),c.preventDefault()}};a(document).on(\"click.bs.carousel.data-api\",\"[data-slide]\",e).on(\"click.bs.carousel.data-api\",\"[data-slide-to]\",e),a(window).on(\"load\",function(){a('[data-ride=\"carousel\"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){\"use strict\";function b(b){var c,d=b.attr(\"data-target\")||(c=b.attr(\"href\"))&&c.replace(/.*(?=#[^\\s]+$)/,\"\");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data(\"bs.collapse\"),f=a.extend({},d.DEFAULTS,c.data(),\"object\"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data(\"bs.collapse\",e=new d(this,f)),\"string\"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle=\"collapse\"][href=\"#'+b.id+'\"],[data-toggle=\"collapse\"][data-target=\"#'+b.id+'\"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION=\"3.3.6\",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass(\"width\");return a?\"width\":\"height\"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass(\"in\")){var b,e=this.$parent&&this.$parent.children(\".panel\").children(\".in, .collapsing\");if(!(e&&e.length&&(b=e.data(\"bs.collapse\"),b&&b.transitioning))){var f=a.Event(\"show.bs.collapse\");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,\"hide\"),b||e.data(\"bs.collapse\",null));var g=this.dimension();this.$element.removeClass(\"collapse\").addClass(\"collapsing\")[g](0).attr(\"aria-expanded\",!0),this.$trigger.removeClass(\"collapsed\").attr(\"aria-expanded\",!0),this.transitioning=1;var h=function(){this.$element.removeClass(\"collapsing\").addClass(\"collapse in\")[g](\"\"),this.transitioning=0,this.$element.trigger(\"shown.bs.collapse\")};if(!a.support.transition)return h.call(this);var i=a.camelCase([\"scroll\",g].join(\"-\"));this.$element.one(\"bsTransitionEnd\",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass(\"in\")){var b=a.Event(\"hide.bs.collapse\");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass(\"collapsing\").removeClass(\"collapse in\").attr(\"aria-expanded\",!1),this.$trigger.addClass(\"collapsed\").attr(\"aria-expanded\",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass(\"collapsing\").addClass(\"collapse\").trigger(\"hidden.bs.collapse\")};return a.support.transition?void this.$element[c](0).one(\"bsTransitionEnd\",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass(\"in\")?\"hide\":\"show\"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle=\"collapse\"][data-parent=\"'+this.options.parent+'\"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass(\"in\");a.attr(\"aria-expanded\",c),b.toggleClass(\"collapsed\",!c).attr(\"aria-expanded\",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on(\"click.bs.collapse.data-api\",'[data-toggle=\"collapse\"]',function(d){var e=a(this);e.attr(\"data-target\")||d.preventDefault();var f=b(e),g=f.data(\"bs.collapse\"),h=g?\"toggle\":e.data();c.call(f,h)})}(jQuery),+function(a){\"use strict\";function b(b){var c=b.attr(\"data-target\");c||(c=b.attr(\"href\"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\\s]*$)/,\"\"));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass(\"open\")&&(c&&\"click\"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event(\"hide.bs.dropdown\",f)),c.isDefaultPrevented()||(d.attr(\"aria-expanded\",\"false\"),e.removeClass(\"open\").trigger(a.Event(\"hidden.bs.dropdown\",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data(\"bs.dropdown\");d||c.data(\"bs.dropdown\",d=new g(this)),\"string\"==typeof b&&d[b].call(c)})}var e=\".dropdown-backdrop\",f='[data-toggle=\"dropdown\"]',g=function(b){a(b).on(\"click.bs.dropdown\",this.toggle)};g.VERSION=\"3.3.6\",g.prototype.toggle=function(d){var e=a(this);if(!e.is(\".disabled, :disabled\")){var f=b(e),g=f.hasClass(\"open\");if(c(),!g){\"ontouchstart\"in document.documentElement&&!f.closest(\".navbar-nav\").length&&a(document.createElement(\"div\")).addClass(\"dropdown-backdrop\").insertAfter(a(this)).on(\"click\",c);var h={relatedTarget:this};if(f.trigger(d=a.Event(\"show.bs.dropdown\",h)),d.isDefaultPrevented())return;e.trigger(\"focus\").attr(\"aria-expanded\",\"true\"),f.toggleClass(\"open\").trigger(a.Event(\"shown.bs.dropdown\",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(\".disabled, :disabled\")){var e=b(d),g=e.hasClass(\"open\");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger(\"focus\"),d.trigger(\"click\");var h=\" li:not(.disabled):visible a\",i=e.find(\".dropdown-menu\"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger(\"focus\")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on(\"click.bs.dropdown.data-api\",c).on(\"click.bs.dropdown.data-api\",\".dropdown form\",function(a){a.stopPropagation()}).on(\"click.bs.dropdown.data-api\",f,g.prototype.toggle).on(\"keydown.bs.dropdown.data-api\",f,g.prototype.keydown).on(\"keydown.bs.dropdown.data-api\",\".dropdown-menu\",g.prototype.keydown)}(jQuery),+function(a){\"use strict\";function b(b,d){return this.each(function(){var e=a(this),f=e.data(\"bs.modal\"),g=a.extend({},c.DEFAULTS,e.data(),\"object\"==typeof b&&b);f||e.data(\"bs.modal\",f=new c(this,g)),\"string\"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(\".modal-dialog\"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(\".modal-content\").load(this.options.remote,a.proxy(function(){this.$element.trigger(\"loaded.bs.modal\")},this))};c.VERSION=\"3.3.6\",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event(\"show.bs.modal\",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass(\"modal-open\"),this.escape(),this.resize(),this.$element.on(\"click.dismiss.bs.modal\",'[data-dismiss=\"modal\"]',a.proxy(this.hide,this)),this.$dialog.on(\"mousedown.dismiss.bs.modal\",function(){d.$element.one(\"mouseup.dismiss.bs.modal\",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass(\"fade\");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass(\"in\"),d.enforceFocus();var f=a.Event(\"shown.bs.modal\",{relatedTarget:b});e?d.$dialog.one(\"bsTransitionEnd\",function(){d.$element.trigger(\"focus\").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger(\"focus\").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event(\"hide.bs.modal\"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off(\"focusin.bs.modal\"),this.$element.removeClass(\"in\").off(\"click.dismiss.bs.modal\").off(\"mouseup.dismiss.bs.modal\"),this.$dialog.off(\"mousedown.dismiss.bs.modal\"),a.support.transition&&this.$element.hasClass(\"fade\")?this.$element.one(\"bsTransitionEnd\",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off(\"focusin.bs.modal\").on(\"focusin.bs.modal\",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger(\"focus\")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on(\"keydown.dismiss.bs.modal\",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off(\"keydown.dismiss.bs.modal\")},c.prototype.resize=function(){this.isShown?a(window).on(\"resize.bs.modal\",a.proxy(this.handleUpdate,this)):a(window).off(\"resize.bs.modal\")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass(\"modal-open\"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger(\"hidden.bs.modal\")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass(\"fade\")?\"fade\":\"\";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement(\"div\")).addClass(\"modal-backdrop \"+e).appendTo(this.$body),this.$element.on(\"click.dismiss.bs.modal\",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&(\"static\"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass(\"in\"),!b)return;f?this.$backdrop.one(\"bsTransitionEnd\",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass(\"in\");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass(\"fade\")?this.$backdrop.one(\"bsTransitionEnd\",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:\"\",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:\"\"})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:\"\",paddingRight:\"\"})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css(\"padding-right\")||0,10);this.originalBodyPad=document.body.style.paddingRight||\"\",this.bodyIsOverflowing&&this.$body.css(\"padding-right\",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css(\"padding-right\",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement(\"div\");a.className=\"modal-scrollbar-measure\",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on(\"click.bs.modal.data-api\",'[data-toggle=\"modal\"]',function(c){var d=a(this),e=d.attr(\"href\"),f=a(d.attr(\"data-target\")||e&&e.replace(/.*(?=#[^\\s]+$)/,\"\")),g=f.data(\"bs.modal\")?\"toggle\":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is(\"a\")&&c.preventDefault(),f.one(\"show.bs.modal\",function(a){a.isDefaultPrevented()||f.one(\"hidden.bs.modal\",function(){d.is(\":visible\")&&d.trigger(\"focus\")})}),b.call(f,g,this)})}(jQuery),+function(a){\"use strict\";function b(b){return this.each(function(){var d=a(this),e=d.data(\"bs.tooltip\"),f=\"object\"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data(\"bs.tooltip\",e=new c(this,f)),\"string\"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init(\"tooltip\",a,b)};c.VERSION=\"3.3.6\",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:\"top\",selector:!1,template:'<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',trigger:\"hover focus\",title:\"\",delay:0,html:!1,container:!1,viewport:{selector:\"body\",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error(\"`selector` option must be specified when initializing \"+this.type+\" on the window.document object!\");for(var e=this.options.trigger.split(\" \"),f=e.length;f--;){var g=e[f];if(\"click\"==g)this.$element.on(\"click.\"+this.type,this.options.selector,a.proxy(this.toggle,this));else if(\"manual\"!=g){var h=\"hover\"==g?\"mouseenter\":\"focusin\",i=\"hover\"==g?\"mouseleave\":\"focusout\";this.$element.on(h+\".\"+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+\".\"+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:\"manual\",selector:\"\"}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&\"number\"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data(\"bs.\"+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data(\"bs.\"+this.type,c)),b instanceof a.Event&&(c.inState[\"focusin\"==b.type?\"focus\":\"hover\"]=!0),c.tip().hasClass(\"in\")||\"in\"==c.hoverState?void(c.hoverState=\"in\"):(clearTimeout(c.timeout),c.hoverState=\"in\",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){\"in\"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data(\"bs.\"+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data(\"bs.\"+this.type,c)),b instanceof a.Event&&(c.inState[\"focusout\"==b.type?\"focus\":\"hover\"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState=\"out\",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){\"out\"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event(\"show.bs.\"+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr(\"id\",g),this.$element.attr(\"aria-describedby\",g),this.options.animation&&f.addClass(\"fade\");var h=\"function\"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\\s?auto?\\s?/i,j=i.test(h);j&&(h=h.replace(i,\"\")||\"top\"),f.detach().css({top:0,left:0,display:\"block\"}).addClass(h).data(\"bs.\"+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger(\"inserted.bs.\"+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h=\"bottom\"==h&&k.bottom+m>o.bottom?\"top\":\"top\"==h&&k.top-m<o.top?\"bottom\":\"right\"==h&&k.right+l>o.width?\"left\":\"left\"==h&&k.left-l<o.left?\"right\":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger(\"shown.bs.\"+e.type),e.hoverState=null,\"out\"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass(\"fade\")?f.one(\"bsTransitionEnd\",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css(\"margin-top\"),10),h=parseInt(d.css(\"margin-left\"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass(\"in\");var i=d[0].offsetWidth,j=d[0].offsetHeight;\"top\"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?\"offsetWidth\":\"offsetHeight\";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?\"left\":\"top\",50*(1-a/b)+\"%\").css(c?\"top\":\"left\",\"\")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(\".tooltip-inner\")[this.options.html?\"html\":\"text\"](b),a.removeClass(\"fade in top bottom left right\")},c.prototype.hide=function(b){function d(){\"in\"!=e.hoverState&&f.detach(),e.$element.removeAttr(\"aria-describedby\").trigger(\"hidden.bs.\"+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event(\"hide.bs.\"+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass(\"in\"),a.support.transition&&f.hasClass(\"fade\")?f.one(\"bsTransitionEnd\",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr(\"title\")||\"string\"!=typeof a.attr(\"data-original-title\"))&&a.attr(\"data-original-title\",a.attr(\"title\")||\"\").attr(\"title\",\"\")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d=\"BODY\"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return\"bottom\"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:\"top\"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:\"left\"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr(\"data-original-title\")||(\"function\"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+\" `template` option must consist of exactly 1 top-level element!\");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".tooltip-arrow\")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data(\"bs.\"+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data(\"bs.\"+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass(\"in\")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off(\".\"+a.type).removeData(\"bs.\"+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){\"use strict\";function b(b){return this.each(function(){var d=a(this),e=d.data(\"bs.popover\"),f=\"object\"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data(\"bs.popover\",e=new c(this,f)),\"string\"==typeof b&&e[b]())})}var c=function(a,b){this.init(\"popover\",a,b)};if(!a.fn.tooltip)throw new Error(\"Popover requires tooltip.js\");c.VERSION=\"3.3.6\",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:\"right\",trigger:\"click\",content:\"\",template:'<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(\".popover-title\")[this.options.html?\"html\":\"text\"](b),a.find(\".popover-content\").children().detach().end()[this.options.html?\"string\"==typeof c?\"html\":\"append\":\"text\"](c),a.removeClass(\"fade top bottom left right in\"),a.find(\".popover-title\").html()||a.find(\".popover-title\").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr(\"data-content\")||(\"function\"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".arrow\")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){\"use strict\";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||\"\")+\" .nav li > a\",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on(\"scroll.bs.scrollspy\",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data(\"bs.scrollspy\"),f=\"object\"==typeof c&&c;e||d.data(\"bs.scrollspy\",e=new b(this,f)),\"string\"==typeof c&&e[c]()})}b.VERSION=\"3.3.6\",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c=\"offset\",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c=\"position\",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data(\"target\")||b.attr(\"href\"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(\":visible\")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target=\"'+b+'\"],'+this.selector+'[href=\"'+b+'\"]',d=a(c).parents(\"li\").addClass(\"active\");\r\n d.parent(\".dropdown-menu\").length&&(d=d.closest(\"li.dropdown\").addClass(\"active\")),d.trigger(\"activate.bs.scrollspy\")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,\".active\").removeClass(\"active\")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on(\"load.bs.scrollspy.data-api\",function(){a('[data-spy=\"scroll\"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){\"use strict\";function b(b){return this.each(function(){var d=a(this),e=d.data(\"bs.tab\");e||d.data(\"bs.tab\",e=new c(this)),\"string\"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION=\"3.3.6\",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest(\"ul:not(.dropdown-menu)\"),d=b.data(\"target\");if(d||(d=b.attr(\"href\"),d=d&&d.replace(/.*(?=#[^\\s]*$)/,\"\")),!b.parent(\"li\").hasClass(\"active\")){var e=c.find(\".active:last a\"),f=a.Event(\"hide.bs.tab\",{relatedTarget:b[0]}),g=a.Event(\"show.bs.tab\",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest(\"li\"),c),this.activate(h,h.parent(),function(){e.trigger({type:\"hidden.bs.tab\",relatedTarget:b[0]}),b.trigger({type:\"shown.bs.tab\",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass(\"active\").find(\"> .dropdown-menu > .active\").removeClass(\"active\").end().find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!1),b.addClass(\"active\").find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!0),h?(b[0].offsetWidth,b.addClass(\"in\")):b.removeClass(\"fade\"),b.parent(\".dropdown-menu\").length&&b.closest(\"li.dropdown\").addClass(\"active\").end().find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!0),e&&e()}var g=d.find(\"> .active\"),h=e&&a.support.transition&&(g.length&&g.hasClass(\"fade\")||!!d.find(\"> .fade\").length);g.length&&h?g.one(\"bsTransitionEnd\",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass(\"in\")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),\"show\")};a(document).on(\"click.bs.tab.data-api\",'[data-toggle=\"tab\"]',e).on(\"click.bs.tab.data-api\",'[data-toggle=\"pill\"]',e)}(jQuery),+function(a){\"use strict\";function b(b){return this.each(function(){var d=a(this),e=d.data(\"bs.affix\"),f=\"object\"==typeof b&&b;e||d.data(\"bs.affix\",e=new c(this,f)),\"string\"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on(\"scroll.bs.affix.data-api\",a.proxy(this.checkPosition,this)).on(\"click.bs.affix.data-api\",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION=\"3.3.6\",c.RESET=\"affix affix-top affix-bottom\",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&\"top\"==this.affixed)return c>e?\"top\":!1;if(\"bottom\"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:\"bottom\":a-d>=e+g?!1:\"bottom\";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?\"top\":null!=d&&i+j>=a-d?\"bottom\":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass(\"affix\");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(\":visible\")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());\"object\"!=typeof d&&(f=e=d),\"function\"==typeof e&&(e=d.top(this.$element)),\"function\"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css(\"top\",\"\");var i=\"affix\"+(h?\"-\"+h:\"\"),j=a.Event(i+\".bs.affix\");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin=\"bottom\"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace(\"affix\",\"affixed\")+\".bs.affix\")}\"bottom\"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on(\"load\",function(){a('[data-spy=\"affix\"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);","Mageplaza_Core/js/jscolor.min.js":"/**\n * jscolor - JavaScript Color Picker\n *\n * @link http://jscolor.com\n * @license For open source use: GPLv3\n * For commercial use: JSColor Commercial License\n * @author Jan Odvarko\n *\n * See usage examples at http://jscolor.com/examples/\n */\"use strict\";window.jscolor||(window.jscolor=function(){var e={register:function(){e.attachDOMReadyEvent(e.init),e.attachEvent(document,\"mousedown\",e.onDocumentMouseDown),e.attachEvent(document,\"touchstart\",e.onDocumentTouchStart),e.attachEvent(window,\"resize\",e.onWindowResize)},init:function(){e.jscolor.lookupClass&&e.jscolor.installByClassName(e.jscolor.lookupClass)},tryInstallOnElements:function(t,n){var r=new RegExp(\"(^|\\\\s)(\"+n+\")(\\\\s*(\\\\{[^}]*\\\\})|\\\\s|$)\",\"i\");for(var i=0;i<t.length;i+=1){if(t[i].type!==undefined&&t[i].type.toLowerCase()==\"color\"&&e.isColorAttrSupported)continue;var s;if(!t[i].jscolor&&t[i].className&&(s=t[i].className.match(r))){var o=t[i],u=null,a=e.getDataAttr(o,\"jscolor\");a!==null?u=a:s[4]&&(u=s[4]);var f={};if(u)try{f=(new Function(\"return (\"+u+\")\"))()}catch(l){e.warn(\"Error parsing jscolor options: \"+l+\":\\n\"+u)}o.jscolor=new e.jscolor(o,f)}}},isColorAttrSupported:function(){var e=document.createElement(\"input\");if(e.setAttribute){e.setAttribute(\"type\",\"color\");if(e.type.toLowerCase()==\"color\")return!0}return!1}(),isCanvasSupported:function(){var e=document.createElement(\"canvas\");return!!e.getContext&&!!e.getContext(\"2d\")}(),fetchElement:function(e){return typeof e==\"string\"?document.getElementById(e):e},isElementType:function(e,t){return e.nodeName.toLowerCase()===t.toLowerCase()},getDataAttr:function(e,t){var n=\"data-\"+t,r=e.getAttribute(n);return r!==null?r:null},attachEvent:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent(\"on\"+t,n)},detachEvent:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent(\"on\"+t,n)},_attachedGroupEvents:{},attachGroupEvent:function(t,n,r,i){e._attachedGroupEvents.hasOwnProperty(t)||(e._attachedGroupEvents[t]=[]),e._attachedGroupEvents[t].push([n,r,i]),e.attachEvent(n,r,i)},detachGroupEvents:function(t){if(e._attachedGroupEvents.hasOwnProperty(t)){for(var n=0;n<e._attachedGroupEvents[t].length;n+=1){var r=e._attachedGroupEvents[t][n];e.detachEvent(r[0],r[1],r[2])}delete e._attachedGroupEvents[t]}},attachDOMReadyEvent:function(e){var t=!1,n=function(){t||(t=!0,e())};if(document.readyState===\"complete\"){setTimeout(n,1);return}if(document.addEventListener)document.addEventListener(\"DOMContentLoaded\",n,!1),window.addEventListener(\"load\",n,!1);else if(document.attachEvent){document.attachEvent(\"onreadystatechange\",function(){document.readyState===\"complete\"&&(document.detachEvent(\"onreadystatechange\",arguments.callee),n())}),window.attachEvent(\"onload\",n);if(document.documentElement.doScroll&&window==window.top){var r=function(){if(!document.body)return;try{document.documentElement.doScroll(\"left\"),n()}catch(e){setTimeout(r,1)}};r()}}},warn:function(e){window.console&&window.console.warn&&window.console.warn(e)},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(t){t.setCapture&&(e._capturedTarget=t,e._capturedTarget.setCapture())},releaseTarget:function(){e._capturedTarget&&(e._capturedTarget.releaseCapture(),e._capturedTarget=null)},fireEvent:function(e,t){if(!e)return;if(document.createEvent){var n=document.createEvent(\"HTMLEvents\");n.initEvent(t,!0,!0),e.dispatchEvent(n)}else if(document.createEventObject){var n=document.createEventObject();e.fireEvent(\"on\"+t,n)}else e[\"on\"+t]&&e[\"on\"+t]()},classNameToList:function(e){return e.replace(/^\\s+|\\s+$/g,\"\").split(/\\s+/)},hasClass:function(e,t){return t?-1!=(\" \"+e.className.replace(/\\s+/g,\" \")+\" \").indexOf(\" \"+t+\" \"):!1},setClass:function(t,n){var r=e.classNameToList(n);for(var i=0;i<r.length;i+=1)e.hasClass(t,r[i])||(t.className+=(t.className?\" \":\"\")+r[i])},unsetClass:function(t,n){var r=e.classNameToList(n);for(var i=0;i<r.length;i+=1){var s=new RegExp(\"^\\\\s*\"+r[i]+\"\\\\s*|\"+\"\\\\s*\"+r[i]+\"\\\\s*$|\"+\"\\\\s+\"+r[i]+\"(\\\\s+)\",\"g\");t.className=t.className.replace(s,\"$1\")}},getStyle:function(e){return window.getComputedStyle?window.getComputedStyle(e):e.currentStyle},setStyle:function(){var e=document.createElement(\"div\"),t=function(t){for(var n=0;n<t.length;n+=1)if(t[n]in e.style)return t[n]},n={borderRadius:t([\"borderRadius\",\"MozBorderRadius\",\"webkitBorderRadius\"]),boxShadow:t([\"boxShadow\",\"MozBoxShadow\",\"webkitBoxShadow\"])};return function(e,t,r){switch(t.toLowerCase()){case\"opacity\":var i=Math.round(parseFloat(r)*100);e.style.opacity=r,e.style.filter=\"alpha(opacity=\"+i+\")\";break;default:e.style[n[t]]=r}}}(),setBorderRadius:function(t,n){e.setStyle(t,\"borderRadius\",n||\"0\")},setBoxShadow:function(t,n){e.setStyle(t,\"boxShadow\",n||\"none\")},getElementPos:function(t,n){var r=0,i=0,s=t.getBoundingClientRect();r=s.left,i=s.top;if(!n){var o=e.getViewPos();r+=o[0],i+=o[1]}return[r,i]},getElementSize:function(e){return[e.offsetWidth,e.offsetHeight]},getAbsPointerPos:function(e){e||(e=window.event);var t=0,n=0;return typeof e.changedTouches!=\"undefined\"&&e.changedTouches.length?(t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY):typeof e.clientX==\"number\"&&(t=e.clientX,n=e.clientY),{x:t,y:n}},getRelPointerPos:function(e){e||(e=window.event);var t=e.target||e.srcElement,n=t.getBoundingClientRect(),r=0,i=0,s=0,o=0;return typeof e.changedTouches!=\"undefined\"&&e.changedTouches.length?(s=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):typeof e.clientX==\"number\"&&(s=e.clientX,o=e.clientY),r=s-n.left,i=o-n.top,{x:r,y:i}},getViewPos:function(){var e=document.documentElement;return[(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0),(window.pageYOffset||e.scrollTop)-(e.clientTop||0)]},getViewSize:function(){var e=document.documentElement;return[window.innerWidth||e.clientWidth,window.innerHeight||e.clientHeight]},redrawPosition:function(){if(e.picker&&e.picker.owner){var t=e.picker.owner,n,r;t.fixed?(n=e.getElementPos(t.targetElement,!0),r=[0,0]):(n=e.getElementPos(t.targetElement),r=e.getViewPos());var i=e.getElementSize(t.targetElement),s=e.getViewSize(),o=e.getPickerOuterDims(t),u,a,f;switch(t.position.toLowerCase()){case\"left\":u=1,a=0,f=-1;break;case\"right\":u=1,a=0,f=1;break;case\"top\":u=0,a=1,f=-1;break;default:u=0,a=1,f=1}var l=(i[a]+o[a])/2;if(!t.smartPosition)var c=[n[u],n[a]+i[a]-l+l*f];else var c=[-r[u]+n[u]+o[u]>s[u]?-r[u]+n[u]+i[u]/2>s[u]/2&&n[u]+i[u]-o[u]>=0?n[u]+i[u]-o[u]:n[u]:n[u],-r[a]+n[a]+i[a]+o[a]-l+l*f>s[a]?-r[a]+n[a]+i[a]/2>s[a]/2&&n[a]+i[a]-l-l*f>=0?n[a]+i[a]-l-l*f:n[a]+i[a]-l+l*f:n[a]+i[a]-l+l*f>=0?n[a]+i[a]-l+l*f:n[a]+i[a]-l-l*f];var h=c[u],p=c[a],d=t.fixed?\"fixed\":\"absolute\",v=(c[0]+o[0]>n[0]||c[0]<n[0]+i[0])&&c[1]+o[1]<n[1]+i[1];e._drawPosition(t,h,p,d,v)}},_drawPosition:function(t,n,r,i,s){var o=s?0:t.shadowBlur;e.picker.wrap.style.position=i,e.picker.wrap.style.left=n+\"px\",e.picker.wrap.style.top=r+\"px\",e.setBoxShadow(e.picker.boxS,t.shadow?new e.BoxShadow(0,o,t.shadowBlur,0,t.shadowColor):null)},getPickerDims:function(t){var n=!!e.getSliderComponent(t),r=[2*t.insetWidth+2*t.padding+t.width+(n?2*t.insetWidth+e.getPadToSliderPadding(t)+t.sliderSize:0),2*t.insetWidth+2*t.padding+t.height+(t.closable?2*t.insetWidth+t.padding+t.buttonHeight:0)];return r},getPickerOuterDims:function(t){var n=e.getPickerDims(t);return[n[0]+2*t.borderWidth,n[1]+2*t.borderWidth]},getPadToSliderPadding:function(e){return Math.max(e.padding,1.5*(2*e.pointerBorderWidth+e.pointerThickness))},getPadYComponent:function(e){switch(e.mode.charAt(1).toLowerCase()){case\"v\":return\"v\"}return\"s\"},getSliderComponent:function(e){if(e.mode.length>2)switch(e.mode.charAt(2).toLowerCase()){case\"s\":return\"s\";case\"v\":return\"v\"}return null},onDocumentMouseDown:function(t){t||(t=window.event);var n=t.target||t.srcElement;n._jscLinkedInstance?n._jscLinkedInstance.showOnClick&&n._jscLinkedInstance.show():n._jscControlName?e.onControlPointerStart(t,n,n._jscControlName,\"mouse\"):e.picker&&e.picker.owner&&e.picker.owner.hide()},onDocumentTouchStart:function(t){t||(t=window.event);var n=t.target||t.srcElement;n._jscLinkedInstance?n._jscLinkedInstance.showOnClick&&n._jscLinkedInstance.show():n._jscControlName?e.onControlPointerStart(t,n,n._jscControlName,\"touch\"):e.picker&&e.picker.owner&&e.picker.owner.hide()},onWindowResize:function(t){e.redrawPosition()},onParentScroll:function(t){e.picker&&e.picker.owner&&e.picker.owner.hide()},_pointerMoveEvent:{mouse:\"mousemove\",touch:\"touchmove\"},_pointerEndEvent:{mouse:\"mouseup\",touch:\"touchend\"},_pointerOrigin:null,_capturedTarget:null,onControlPointerStart:function(t,n,r,i){var s=n._jscInstance;e.preventDefault(t),e.captureTarget(n);var o=function(s,o){e.attachGroupEvent(\"drag\",s,e._pointerMoveEvent[i],e.onDocumentPointerMove(t,n,r,i,o)),e.attachGroupEvent(\"drag\",s,e._pointerEndEvent[i],e.onDocumentPointerEnd(t,n,r,i))};o(document,[0,0]);if(window.parent&&window.frameElement){var u=window.frameElement.getBoundingClientRect(),a=[-u.left,-u.top];o(window.parent.window.document,a)}var f=e.getAbsPointerPos(t),l=e.getRelPointerPos(t);e._pointerOrigin={x:f.x-l.x,y:f.y-l.y};switch(r){case\"pad\":switch(e.getSliderComponent(s)){case\"s\":s.hsv[1]===0&&s.fromHSV(null,100,null);break;case\"v\":s.hsv[2]===0&&s.fromHSV(null,null,100)}e.setPad(s,t,0,0);break;case\"sld\":e.setSld(s,t,0)}e.dispatchFineChange(s)},onDocumentPointerMove:function(t,n,r,i,s){return function(t){var i=n._jscInstance;switch(r){case\"pad\":t||(t=window.event),e.setPad(i,t,s[0],s[1]),e.dispatchFineChange(i);break;case\"sld\":t||(t=window.event),e.setSld(i,t,s[1]),e.dispatchFineChange(i)}}},onDocumentPointerEnd:function(t,n,r,i){return function(t){var r=n._jscInstance;e.detachGroupEvents(\"drag\"),e.releaseTarget(),e.dispatchChange(r)}},dispatchChange:function(t){t.valueElement&&e.isElementType(t.valueElement,\"input\")&&e.fireEvent(t.valueElement,\"change\")},dispatchFineChange:function(e){if(e.onFineChange){var t;typeof e.onFineChange==\"string\"?t=new Function(e.onFineChange):t=e.onFineChange,t.call(e)}},setPad:function(t,n,r,i){var s=e.getAbsPointerPos(n),o=r+s.x-e._pointerOrigin.x-t.padding-t.insetWidth,u=i+s.y-e._pointerOrigin.y-t.padding-t.insetWidth,a=o*(360/(t.width-1)),f=100-u*(100/(t.height-1));switch(e.getPadYComponent(t)){case\"s\":t.fromHSV(a,f,null,e.leaveSld);break;case\"v\":t.fromHSV(a,null,f,e.leaveSld)}},setSld:function(t,n,r){var i=e.getAbsPointerPos(n),s=r+i.y-e._pointerOrigin.y-t.padding-t.insetWidth,o=100-s*(100/(t.height-1));switch(e.getSliderComponent(t)){case\"s\":t.fromHSV(null,o,null,e.leavePad);break;case\"v\":t.fromHSV(null,null,o,e.leavePad)}},_vmlNS:\"jsc_vml_\",_vmlCSS:\"jsc_vml_css_\",_vmlReady:!1,initVML:function(){if(!e._vmlReady){var t=document;t.namespaces[e._vmlNS]||t.namespaces.add(e._vmlNS,\"urn:schemas-microsoft-com:vml\");if(!t.styleSheets[e._vmlCSS]){var n=[\"shape\",\"shapetype\",\"group\",\"background\",\"path\",\"formulas\",\"handles\",\"fill\",\"stroke\",\"shadow\",\"textbox\",\"textpath\",\"imagedata\",\"line\",\"polyline\",\"curve\",\"rect\",\"roundrect\",\"oval\",\"arc\",\"image\"],r=t.createStyleSheet();r.owningElement.id=e._vmlCSS;for(var i=0;i<n.length;i+=1)r.addRule(e._vmlNS+\"\\\\:\"+n[i],\"behavior:url(#default#VML);\")}e._vmlReady=!0}},createPalette:function(){var t={elm:null,draw:null};if(e.isCanvasSupported){var n=document.createElement(\"canvas\"),r=n.getContext(\"2d\"),i=function(e,t,i){n.width=e,n.height=t,r.clearRect(0,0,n.width,n.height);var s=r.createLinearGradient(0,0,n.width,0);s.addColorStop(0,\"#F00\"),s.addColorStop(1/6,\"#FF0\"),s.addColorStop(2/6,\"#0F0\"),s.addColorStop(.5,\"#0FF\"),s.addColorStop(4/6,\"#00F\"),s.addColorStop(5/6,\"#F0F\"),s.addColorStop(1,\"#F00\"),r.fillStyle=s,r.fillRect(0,0,n.width,n.height);var o=r.createLinearGradient(0,0,0,n.height);switch(i.toLowerCase()){case\"s\":o.addColorStop(0,\"rgba(255,255,255,0)\"),o.addColorStop(1,\"rgba(255,255,255,1)\");break;case\"v\":o.addColorStop(0,\"rgba(0,0,0,0)\"),o.addColorStop(1,\"rgba(0,0,0,1)\")}r.fillStyle=o,r.fillRect(0,0,n.width,n.height)};t.elm=n,t.draw=i}else{e.initVML();var s=document.createElement(\"div\");s.style.position=\"relative\",s.style.overflow=\"hidden\";var o=document.createElement(e._vmlNS+\":fill\");o.type=\"gradient\",o.method=\"linear\",o.angle=\"90\",o.colors=\"16.67% #F0F, 33.33% #00F, 50% #0FF, 66.67% #0F0, 83.33% #FF0\";var u=document.createElement(e._vmlNS+\":rect\");u.style.position=\"absolute\",u.style.left=\"-1px\",u.style.top=\"-1px\",u.stroked=!1,u.appendChild(o),s.appendChild(u);var a=document.createElement(e._vmlNS+\":fill\");a.type=\"gradient\",a.method=\"linear\",a.angle=\"180\",a.opacity=\"0\";var f=document.createElement(e._vmlNS+\":rect\");f.style.position=\"absolute\",f.style.left=\"-1px\",f.style.top=\"-1px\",f.stroked=!1,f.appendChild(a),s.appendChild(f);var i=function(e,t,n){s.style.width=e+\"px\",s.style.height=t+\"px\",u.style.width=f.style.width=e+1+\"px\",u.style.height=f.style.height=t+1+\"px\",o.color=\"#F00\",o.color2=\"#F00\";switch(n.toLowerCase()){case\"s\":a.color=a.color2=\"#FFF\";break;case\"v\":a.color=a.color2=\"#000\"}};t.elm=s,t.draw=i}return t},createSliderGradient:function(){var t={elm:null,draw:null};if(e.isCanvasSupported){var n=document.createElement(\"canvas\"),r=n.getContext(\"2d\"),i=function(e,t,i,s){n.width=e,n.height=t,r.clearRect(0,0,n.width,n.height);var o=r.createLinearGradient(0,0,0,n.height);o.addColorStop(0,i),o.addColorStop(1,s),r.fillStyle=o,r.fillRect(0,0,n.width,n.height)};t.elm=n,t.draw=i}else{e.initVML();var s=document.createElement(\"div\");s.style.position=\"relative\",s.style.overflow=\"hidden\";var o=document.createElement(e._vmlNS+\":fill\");o.type=\"gradient\",o.method=\"linear\",o.angle=\"180\";var u=document.createElement(e._vmlNS+\":rect\");u.style.position=\"absolute\",u.style.left=\"-1px\",u.style.top=\"-1px\",u.stroked=!1,u.appendChild(o),s.appendChild(u);var i=function(e,t,n,r){s.style.width=e+\"px\",s.style.height=t+\"px\",u.style.width=e+1+\"px\",u.style.height=t+1+\"px\",o.color=n,o.color2=r};t.elm=s,t.draw=i}return t},leaveValue:1,leaveStyle:2,leavePad:4,leaveSld:8,BoxShadow:function(){var e=function(e,t,n,r,i,s){this.hShadow=e,this.vShadow=t,this.blur=n,this.spread=r,this.color=i,this.inset=!!s};return e.prototype.toString=function(){var e=[Math.round(this.hShadow)+\"px\",Math.round(this.vShadow)+\"px\",Math.round(this.blur)+\"px\",Math.round(this.spread)+\"px\",this.color];return this.inset&&e.push(\"inset\"),e.join(\" \")},e}(),jscolor:function(t,n){function i(e,t,n){e/=255,t/=255,n/=255;var r=Math.min(Math.min(e,t),n),i=Math.max(Math.max(e,t),n),s=i-r;if(s===0)return[null,0,100*i];var o=e===r?3+(n-t)/s:t===r?5+(e-n)/s:1+(t-e)/s;return[60*(o===6?0:o),100*(s/i),100*i]}function s(e,t,n){var r=255*(n/100);if(e===null)return[r,r,r];e/=60,t/=100;var i=Math.floor(e),s=i%2?e-i:1-(e-i),o=r*(1-t),u=r*(1-t*s);switch(i){case 6:case 0:return[r,u,o];case 1:return[u,r,o];case 2:return[o,r,u];case 3:return[o,u,r];case 4:return[u,o,r];case 5:return[r,o,u]}}function o(){e.unsetClass(d.targetElement,d.activeClass),e.picker.wrap.parentNode.removeChild(e.picker.wrap),delete e.picker.owner}function u(){function l(){var e=d.insetColor.split(/\\s+/),n=e.length<2?e[0]:e[1]+\" \"+e[0]+\" \"+e[0]+\" \"+e[1];t.btn.style.borderColor=n}d._processParentElementsInDOM(),e.picker||(e.picker={owner:null,wrap:document.createElement(\"div\"),box:document.createElement(\"div\"),boxS:document.createElement(\"div\"),boxB:document.createElement(\"div\"),pad:document.createElement(\"div\"),padB:document.createElement(\"div\"),padM:document.createElement(\"div\"),padPal:e.createPalette(),cross:document.createElement(\"div\"),crossBY:document.createElement(\"div\"),crossBX:document.createElement(\"div\"),crossLY:document.createElement(\"div\"),crossLX:document.createElement(\"div\"),sld:document.createElement(\"div\"),sldB:document.createElement(\"div\"),sldM:document.createElement(\"div\"),sldGrad:e.createSliderGradient(),sldPtrS:document.createElement(\"div\"),sldPtrIB:document.createElement(\"div\"),sldPtrMB:document.createElement(\"div\"),sldPtrOB:document.createElement(\"div\"),btn:document.createElement(\"div\"),btnT:document.createElement(\"span\")},e.picker.pad.appendChild(e.picker.padPal.elm),e.picker.padB.appendChild(e.picker.pad),e.picker.cross.appendChild(e.picker.crossBY),e.picker.cross.appendChild(e.picker.crossBX),e.picker.cross.appendChild(e.picker.crossLY),e.picker.cross.appendChild(e.picker.crossLX),e.picker.padB.appendChild(e.picker.cross),e.picker.box.appendChild(e.picker.padB),e.picker.box.appendChild(e.picker.padM),e.picker.sld.appendChild(e.picker.sldGrad.elm),e.picker.sldB.appendChild(e.picker.sld),e.picker.sldB.appendChild(e.picker.sldPtrOB),e.picker.sldPtrOB.appendChild(e.picker.sldPtrMB),e.picker.sldPtrMB.appendChild(e.picker.sldPtrIB),e.picker.sldPtrIB.appendChild(e.picker.sldPtrS),e.picker.box.appendChild(e.picker.sldB),e.picker.box.appendChild(e.picker.sldM),e.picker.btn.appendChild(e.picker.btnT),e.picker.box.appendChild(e.picker.btn),e.picker.boxB.appendChild(e.picker.box),e.picker.wrap.appendChild(e.picker.boxS),e.picker.wrap.appendChild(e.picker.boxB));var t=e.picker,n=!!e.getSliderComponent(d),r=e.getPickerDims(d),i=2*d.pointerBorderWidth+d.pointerThickness+2*d.crossSize,s=e.getPadToSliderPadding(d),o=Math.min(d.borderRadius,Math.round(d.padding*Math.PI)),u=\"crosshair\";t.wrap.style.clear=\"both\",t.wrap.style.width=r[0]+2*d.borderWidth+\"px\",t.wrap.style.height=r[1]+2*d.borderWidth+\"px\",t.wrap.style.zIndex=d.zIndex,t.box.style.width=r[0]+\"px\",t.box.style.height=r[1]+\"px\",t.boxS.style.position=\"absolute\",t.boxS.style.left=\"0\",t.boxS.style.top=\"0\",t.boxS.style.width=\"100%\",t.boxS.style.height=\"100%\",e.setBorderRadius(t.boxS,o+\"px\"),t.boxB.style.position=\"relative\",t.boxB.style.border=d.borderWidth+\"px solid\",t.boxB.style.borderColor=d.borderColor,t.boxB.style.background=d.backgroundColor,e.setBorderRadius(t.boxB,o+\"px\"),t.padM.style.background=t.sldM.style.background=\"#FFF\",e.setStyle(t.padM,\"opacity\",\"0\"),e.setStyle(t.sldM,\"opacity\",\"0\"),t.pad.style.position=\"relative\",t.pad.style.width=d.width+\"px\",t.pad.style.height=d.height+\"px\",t.padPal.draw(d.width,d.height,e.getPadYComponent(d)),t.padB.style.position=\"absolute\",t.padB.style.left=d.padding+\"px\",t.padB.style.top=d.padding+\"px\",t.padB.style.border=d.insetWidth+\"px solid\",t.padB.style.borderColor=d.insetColor,t.padM._jscInstance=d,t.padM._jscControlName=\"pad\",t.padM.style.position=\"absolute\",t.padM.style.left=\"0\",t.padM.style.top=\"0\",t.padM.style.width=d.padding+2*d.insetWidth+d.width+s/2+\"px\",t.padM.style.height=r[1]+\"px\",t.padM.style.cursor=u,t.cross.style.position=\"absolute\",t.cross.style.left=t.cross.style.top=\"0\",t.cross.style.width=t.cross.style.height=i+\"px\",t.crossBY.style.position=t.crossBX.style.position=\"absolute\",t.crossBY.style.background=t.crossBX.style.background=d.pointerBorderColor,t.crossBY.style.width=t.crossBX.style.height=2*d.pointerBorderWidth+d.pointerThickness+\"px\",t.crossBY.style.height=t.crossBX.style.width=i+\"px\",t.crossBY.style.left=t.crossBX.style.top=Math.floor(i/2)-Math.floor(d.pointerThickness/2)-d.pointerBorderWidth+\"px\",t.crossBY.style.top=t.crossBX.style.left=\"0\",t.crossLY.style.position=t.crossLX.style.position=\"absolute\",t.crossLY.style.background=t.crossLX.style.background=d.pointerColor,t.crossLY.style.height=t.crossLX.style.width=i-2*d.pointerBorderWidth+\"px\",t.crossLY.style.width=t.crossLX.style.height=d.pointerThickness+\"px\",t.crossLY.style.left=t.crossLX.style.top=Math.floor(i/2)-Math.floor(d.pointerThickness/2)+\"px\",t.crossLY.style.top=t.crossLX.style.left=d.pointerBorderWidth+\"px\",t.sld.style.overflow=\"hidden\",t.sld.style.width=d.sliderSize+\"px\",t.sld.style.height=d.height+\"px\",t.sldGrad.draw(d.sliderSize,d.height,\"#000\",\"#000\"),t.sldB.style.display=n?\"block\":\"none\",t.sldB.style.position=\"absolute\",t.sldB.style.right=d.padding+\"px\",t.sldB.style.top=d.padding+\"px\",t.sldB.style.border=d.insetWidth+\"px solid\",t.sldB.style.borderColor=d.insetColor,t.sldM._jscInstance=d,t.sldM._jscControlName=\"sld\",t.sldM.style.display=n?\"block\":\"none\",t.sldM.style.position=\"absolute\",t.sldM.style.right=\"0\",t.sldM.style.top=\"0\",t.sldM.style.width=d.sliderSize+s/2+d.padding+2*d.insetWidth+\"px\",t.sldM.style.height=r[1]+\"px\",t.sldM.style.cursor=\"default\",t.sldPtrIB.style.border=t.sldPtrOB.style.border=d.pointerBorderWidth+\"px solid \"+d.pointerBorderColor,t.sldPtrOB.style.position=\"absolute\",t.sldPtrOB.style.left=-(2*d.pointerBorderWidth+d.pointerThickness)+\"px\",t.sldPtrOB.style.top=\"0\",t.sldPtrMB.style.border=d.pointerThickness+\"px solid \"+d.pointerColor,t.sldPtrS.style.width=d.sliderSize+\"px\",t.sldPtrS.style.height=m+\"px\",t.btn.style.display=d.closable?\"block\":\"none\",t.btn.style.position=\"absolute\",t.btn.style.left=d.padding+\"px\",t.btn.style.bottom=d.padding+\"px\",t.btn.style.padding=\"0 15px\",t.btn.style.height=d.buttonHeight+\"px\",t.btn.style.border=d.insetWidth+\"px solid\",l(),t.btn.style.color=d.buttonColor,t.btn.style.font=\"12px sans-serif\",t.btn.style.textAlign=\"center\";try{t.btn.style.cursor=\"pointer\"}catch(c){t.btn.style.cursor=\"hand\"}t.btn.onmousedown=function(){d.hide()},t.btnT.style.lineHeight=d.buttonHeight+\"px\",t.btnT.innerHTML=\"\",t.btnT.appendChild(document.createTextNode(d.closeText)),a(),f(),e.picker.owner&&e.picker.owner!==d&&e.unsetClass(e.picker.owner.targetElement,d.activeClass),e.picker.owner=d,e.isElementType(v,\"body\")?e.redrawPosition():e._drawPosition(d,0,0,\"relative\",!1),t.wrap.parentNode!=v&&v.appendChild(t.wrap),e.setClass(d.targetElement,d.activeClass)}function a(){switch(e.getPadYComponent(d)){case\"s\":var t=1;break;case\"v\":var t=2}var n=Math.round(d.hsv[0]/360*(d.width-1)),r=Math.round((1-d.hsv[t]/100)*(d.height-1)),i=2*d.pointerBorderWidth+d.pointerThickness+2*d.crossSize,o=-Math.floor(i/2);e.picker.cross.style.left=n+o+\"px\",e.picker.cross.style.top=r+o+\"px\";switch(e.getSliderComponent(d)){case\"s\":var u=s(d.hsv[0],100,d.hsv[2]),a=s(d.hsv[0],0,d.hsv[2]),f=\"rgb(\"+Math.round(u[0])+\",\"+Math.round(u[1])+\",\"+Math.round(u[2])+\")\",l=\"rgb(\"+Math.round(a[0])+\",\"+Math.round(a[1])+\",\"+Math.round(a[2])+\")\";e.picker.sldGrad.draw(d.sliderSize,d.height,f,l);break;case\"v\":var c=s(d.hsv[0],d.hsv[1],100),f=\"rgb(\"+Math.round(c[0])+\",\"+Math.round(c[1])+\",\"+Math.round(c[2])+\")\",l=\"#000\";e.picker.sldGrad.draw(d.sliderSize,d.height,f,l)}}function f(){var t=e.getSliderComponent(d);if(t){switch(t){case\"s\":var n=1;break;case\"v\":var n=2}var r=Math.round((1-d.hsv[n]/100)*(d.height-1));e.picker.sldPtrOB.style.top=r-(2*d.pointerBorderWidth+d.pointerThickness)-Math.floor(m/2)+\"px\"}}function l(){return e.picker&&e.picker.owner===d}function c(){d.importColor()}this.value=null,this.valueElement=t,this.styleElement=t,this.required=!0,this.refine=!0,this.hash=!1,this.uppercase=!0,this.onFineChange=null,this.activeClass=\"jscolor-active\",this.minS=0,this.maxS=100,this.minV=0,this.maxV=100,this.hsv=[0,0,100],this.rgb=[255,255,255],this.width=181,this.height=101,this.showOnClick=!0,this.mode=\"HSV\",this.position=\"bottom\",this.smartPosition=!0,this.sliderSize=16,this.crossSize=8,this.closable=!1,this.closeText=\"Close\",this.buttonColor=\"#000000\",this.buttonHeight=18,this.padding=12,this.backgroundColor=\"#FFFFFF\",this.borderWidth=1,this.borderColor=\"#BBBBBB\",this.borderRadius=8,this.insetWidth=1,this.insetColor=\"#BBBBBB\",this.shadow=!0,this.shadowBlur=15,this.shadowColor=\"rgba(0,0,0,0.2)\",this.pointerColor=\"#4C4C4C\",this.pointerBorderColor=\"#FFFFFF\",this.pointerBorderWidth=1,this.pointerThickness=2,this.zIndex=1e3,this.container=null;for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.hide=function(){l()&&o()},this.show=function(){u()},this.redraw=function(){l()&&u()},this.importColor=function(){this.valueElement?e.isElementType(this.valueElement,\"input\")?this.refine?!this.required&&/^\\s*$/.test(this.valueElement.value)?(this.valueElement.value=\"\",this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(e.leaveValue|e.leaveStyle)):this.fromString(this.valueElement.value)||this.exportColor():this.fromString(this.valueElement.value,e.leaveValue)||(this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(e.leaveValue|e.leaveStyle)):this.exportColor():this.exportColor()},this.exportColor=function(t){if(!(t&e.leaveValue)&&this.valueElement){var n=this.toString();this.uppercase&&(n=n.toUpperCase()),this.hash&&(n=\"#\"+n),e.isElementType(this.valueElement,\"input\")?this.valueElement.value=n:this.valueElement.innerHTML=n}t&e.leaveStyle||this.styleElement&&(this.styleElement.style.backgroundImage=\"none\",this.styleElement.style.backgroundColor=\"#\"+this.toString(),this.styleElement.style.color=this.isLight()?\"#000\":\"#FFF\"),!(t&e.leavePad)&&l()&&a(),!(t&e.leaveSld)&&l()&&f()},this.fromHSV=function(e,t,n,r){if(e!==null){if(isNaN(e))return!1;e=Math.max(0,Math.min(360,e))}if(t!==null){if(isNaN(t))return!1;t=Math.max(0,Math.min(100,this.maxS,t),this.minS)}if(n!==null){if(isNaN(n))return!1;n=Math.max(0,Math.min(100,this.maxV,n),this.minV)}this.rgb=s(e===null?this.hsv[0]:this.hsv[0]=e,t===null?this.hsv[1]:this.hsv[1]=t,n===null?this.hsv[2]:this.hsv[2]=n),this.exportColor(r)},this.fromRGB=function(e,t,n,r){if(e!==null){if(isNaN(e))return!1;e=Math.max(0,Math.min(255,e))}if(t!==null){if(isNaN(t))return!1;t=Math.max(0,Math.min(255,t))}if(n!==null){if(isNaN(n))return!1;n=Math.max(0,Math.min(255,n))}var o=i(e===null?this.rgb[0]:e,t===null?this.rgb[1]:t,n===null?this.rgb[2]:n);o[0]!==null&&(this.hsv[0]=Math.max(0,Math.min(360,o[0]))),o[2]!==0&&(this.hsv[1]=o[1]===null?null:Math.max(0,this.minS,Math.min(100,this.maxS,o[1]))),this.hsv[2]=o[2]===null?null:Math.max(0,this.minV,Math.min(100,this.maxV,o[2]));var u=s(this.hsv[0],this.hsv[1],this.hsv[2]);this.rgb[0]=u[0],this.rgb[1]=u[1],this.rgb[2]=u[2],this.exportColor(r)},this.fromString=function(e,t){var n;if(n=e.match(/^\\W*([0-9A-F]{3}([0-9A-F]{3})?)\\W*$/i))return n[1].length===6?this.fromRGB(parseInt(n[1].substr(0,2),16),parseInt(n[1].substr(2,2),16),parseInt(n[1].substr(4,2),16),t):this.fromRGB(parseInt(n[1].charAt(0)+n[1].charAt(0),16),parseInt(n[1].charAt(1)+n[1].charAt(1),16),parseInt(n[1].charAt(2)+n[1].charAt(2),16),t),!0;if(n=e.match(/^\\W*rgba?\\(([^)]*)\\)\\W*$/i)){var r=n[1].split(\",\"),i=/^\\s*(\\d*)(\\.\\d+)?\\s*$/,s,o,u;if(r.length>=3&&(s=r[0].match(i))&&(o=r[1].match(i))&&(u=r[2].match(i))){var a=parseFloat((s[1]||\"0\")+(s[2]||\"\")),f=parseFloat((o[1]||\"0\")+(o[2]||\"\")),l=parseFloat((u[1]||\"0\")+(u[2]||\"\"));return this.fromRGB(a,f,l,t),!0}}return!1},this.toString=function(){return(256|Math.round(this.rgb[0])).toString(16).substr(1)+(256|Math.round(this.rgb[1])).toString(16).substr(1)+(256|Math.round(this.rgb[2])).toString(16).substr(1)},this.toHEXString=function(){return\"#\"+this.toString().toUpperCase()},this.toRGBString=function(){return\"rgb(\"+Math.round(this.rgb[0])+\",\"+Math.round(this.rgb[1])+\",\"+Math.round(this.rgb[2])+\")\"},this.isLight=function(){return.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]>127.5},this._processParentElementsInDOM=function(){if(this._linkedElementsProcessed)return;this._linkedElementsProcessed=!0;var t=this.targetElement;do{var n=e.getStyle(t);n&&n.position.toLowerCase()===\"fixed\"&&(this.fixed=!0),t!==this.targetElement&&(t._jscEventsAttached||(e.attachEvent(t,\"scroll\",e.onParentScroll),t._jscEventsAttached=!0))}while((t=t.parentNode)&&!e.isElementType(t,\"body\"))};if(typeof t==\"string\"){var h=t,p=document.getElementById(h);p?this.targetElement=p:e.warn(\"Could not find target element with ID '\"+h+\"'\")}else t?this.targetElement=t:e.warn(\"Invalid target element: '\"+t+\"'\");if(this.targetElement._jscLinkedInstance){e.warn(\"Cannot link jscolor twice to the same element. Skipping.\");return}this.targetElement._jscLinkedInstance=this,this.valueElement=e.fetchElement(this.valueElement),this.styleElement=e.fetchElement(this.styleElement);var d=this,v=this.container?e.fetchElement(this.container):document.getElementsByTagName(\"body\")[0],m=3;if(e.isElementType(this.targetElement,\"button\"))if(this.targetElement.onclick){var g=this.targetElement.onclick;this.targetElement.onclick=function(e){return g.call(this,e),!1}}else this.targetElement.onclick=function(){return!1};if(this.valueElement&&e.isElementType(this.valueElement,\"input\")){var y=function(){d.fromString(d.valueElement.value,e.leaveValue),e.dispatchFineChange(d)};e.attachEvent(this.valueElement,\"keyup\",y),e.attachEvent(this.valueElement,\"input\",y),e.attachEvent(this.valueElement,\"blur\",c),this.valueElement.setAttribute(\"autocomplete\",\"off\")}this.styleElement&&(this.styleElement._jscOrigStyle={backgroundImage:this.styleElement.style.backgroundImage,backgroundColor:this.styleElement.style.backgroundColor,color:this.styleElement.style.color}),this.value?this.fromString(this.value)||this.exportColor():this.importColor()}};return e.jscolor.lookupClass=\"jscolor\",e.jscolor.installByClassName=function(t){var n=document.getElementsByTagName(\"input\"),r=document.getElementsByTagName(\"button\");e.tryInstallOnElements(n,t),e.tryInstallOnElements(r,t)},e.register(),e.jscolor}());","Mageplaza_Core/js/jquery.ui.touch-punch.min.js":"/*!\r\n * jQuery UI Touch Punch 0.2.3\r\n *\r\n * Copyright 2011\u20132014, Dave Furfero\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n *\r\n * Depends:\r\n * jquery.ui.widget.js\r\n * jquery.ui.mouse.js\r\n */\r\n!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent(\"MouseEvents\");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch=\"ontouchend\"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,\"mouseover\"),f(a,\"mousemove\"),f(a,\"mousedown\"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,\"mousemove\"))},b._touchEnd=function(a){e&&(f(a,\"mouseup\"),f(a,\"mouseout\"),this._touchMoved||f(a,\"click\"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,\"_touchStart\"),touchmove:a.proxy(b,\"_touchMove\"),touchend:a.proxy(b,\"_touchEnd\")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,\"_touchStart\"),touchmove:a.proxy(b,\"_touchMove\"),touchend:a.proxy(b,\"_touchEnd\")}),d.call(b)}}}(jQuery);\r\n","Mageplaza_Core/js/ion.rangeSlider.min.js":"// Ion.RangeSlider | version 2.1.6 | https://github.com/IonDen/ion.rangeSlider\r\n;(function(f){\"function\"===typeof define&&define.amd?define([\"jquery\"],function(p){return f(p,document,window,navigator)}):\"object\"===typeof exports?f(require(\"jquery\"),document,window,navigator):f(jQuery,document,window,navigator)})(function(f,p,h,t,q){var u=0,m=function(){var a=t.userAgent,b=/msie\\s\\d+/i;return 0<a.search(b)&&(a=b.exec(a).toString(),a=a.split(\" \")[1],9>a)?(f(\"html\").addClass(\"lt-ie9\"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,d=[].slice;if(\"function\"!=\r\n typeof b)throw new TypeError;var c=d.call(arguments,1),e=function(){if(this instanceof e){var g=function(){};g.prototype=b.prototype;var g=new g,l=b.apply(g,c.concat(d.call(arguments)));return Object(l)===l?l:g}return b.apply(a,c.concat(d.call(arguments)))};return e});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var d;if(null==this)throw new TypeError('\"this\" is null or not defined');var c=Object(this),e=c.length>>>0;if(0===e)return-1;d=+b||0;Infinity===Math.abs(d)&&(d=0);if(d>=\r\n e)return-1;for(d=Math.max(0<=d?d:e-Math.abs(d),0);d<e;){if(d in c&&c[d]===a)return d;d++}return-1});var r=function(a,b,d){this.VERSION=\"2.1.6\";this.input=a;this.plugin_count=d;this.old_to=this.old_from=this.update_tm=this.calc_count=this.current_plugin=0;this.raf_id=this.old_min_interval=null;this.is_update=this.is_key=this.no_diapason=this.force_redraw=this.dragging=!1;this.is_start=this.is_first_update=!0;this.is_click=this.is_resize=this.is_active=this.is_finish=!1;b=b||{};this.$cache={win:f(h),\r\n body:f(p.body),input:f(a),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]};this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],\r\n big_x:[]};this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var c=this.$cache.input;a=c.prop(\"value\");var e;d={type:\"single\",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:\" \",prettify:null,\r\n force_edges:!1,keyboard:!1,keyboard_step:5,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:\"\",postfix:\"\",max_postfix:\"\",decorate_both:!0,values_separator:\" \\u2014 \",input_values_separator:\";\",disable:!1,onStart:null,onChange:null,onFinish:null,onUpdate:null};\"INPUT\"!==c[0].nodeName&&console&&console.warn&&console.warn(\"Base element should be <input>!\",c[0]);c={type:c.data(\"type\"),min:c.data(\"min\"),max:c.data(\"max\"),from:c.data(\"from\"),to:c.data(\"to\"),step:c.data(\"step\"),\r\n min_interval:c.data(\"minInterval\"),max_interval:c.data(\"maxInterval\"),drag_interval:c.data(\"dragInterval\"),values:c.data(\"values\"),from_fixed:c.data(\"fromFixed\"),from_min:c.data(\"fromMin\"),from_max:c.data(\"fromMax\"),from_shadow:c.data(\"fromShadow\"),to_fixed:c.data(\"toFixed\"),to_min:c.data(\"toMin\"),to_max:c.data(\"toMax\"),to_shadow:c.data(\"toShadow\"),prettify_enabled:c.data(\"prettifyEnabled\"),prettify_separator:c.data(\"prettifySeparator\"),force_edges:c.data(\"forceEdges\"),keyboard:c.data(\"keyboard\"),\r\n keyboard_step:c.data(\"keyboardStep\"),grid:c.data(\"grid\"),grid_margin:c.data(\"gridMargin\"),grid_num:c.data(\"gridNum\"),grid_snap:c.data(\"gridSnap\"),hide_min_max:c.data(\"hideMinMax\"),hide_from_to:c.data(\"hideFromTo\"),prefix:c.data(\"prefix\"),postfix:c.data(\"postfix\"),max_postfix:c.data(\"maxPostfix\"),decorate_both:c.data(\"decorateBoth\"),values_separator:c.data(\"valuesSeparator\"),input_values_separator:c.data(\"inputValuesSeparator\"),disable:c.data(\"disable\")};c.values=c.values&&c.values.split(\",\");for(e in c)c.hasOwnProperty(e)&&\r\n(c[e]!==q&&\"\"!==c[e]||delete c[e]);a!==q&&\"\"!==a&&(a=a.split(c.input_values_separator||b.input_values_separator||\";\"),a[0]&&a[0]==+a[0]&&(a[0]=+a[0]),a[1]&&a[1]==+a[1]&&(a[1]=+a[1]),b&&b.values&&b.values.length?(d.from=a[0]&&b.values.indexOf(a[0]),d.to=a[1]&&b.values.indexOf(a[1])):(d.from=a[0]&&+a[0],d.to=a[1]&&+a[1]));f.extend(d,b);f.extend(d,c);this.options=d;this.update_check={};this.validate();this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,\r\n from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.init()};r.prototype={init:function(a){this.no_diapason=!1;this.coords.p_step=this.convertToPercent(this.options.step,!0);this.target=\"base\";this.toggleInput();this.append();this.setMinMax();a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart());this.updateScene()},append:function(){this.$cache.input.before('<span class=\"irs js-irs-'+this.plugin_count+'\"></span>');\r\n this.$cache.input.prop(\"readonly\",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html('<span class=\"irs\"><span class=\"irs-line\" tabindex=\"-1\"><span class=\"irs-line-left\"></span><span class=\"irs-line-mid\"></span><span class=\"irs-line-right\"></span></span><span class=\"irs-min\">0</span><span class=\"irs-max\">1</span><span class=\"irs-from\">0</span><span class=\"irs-to\">0</span><span class=\"irs-single\">0</span></span><span class=\"irs-grid\"></span><span class=\"irs-bar\"></span>');\r\n this.$cache.rs=this.$cache.cont.find(\".irs\");this.$cache.min=this.$cache.cont.find(\".irs-min\");this.$cache.max=this.$cache.cont.find(\".irs-max\");this.$cache.from=this.$cache.cont.find(\".irs-from\");this.$cache.to=this.$cache.cont.find(\".irs-to\");this.$cache.single=this.$cache.cont.find(\".irs-single\");this.$cache.bar=this.$cache.cont.find(\".irs-bar\");this.$cache.line=this.$cache.cont.find(\".irs-line\");this.$cache.grid=this.$cache.cont.find(\".irs-grid\");\"single\"===this.options.type?(this.$cache.cont.append('<span class=\"irs-bar-edge\"></span><span class=\"irs-shadow shadow-single\"></span><span class=\"irs-slider single\"></span>'),\r\n this.$cache.edge=this.$cache.cont.find(\".irs-bar-edge\"),this.$cache.s_single=this.$cache.cont.find(\".single\"),this.$cache.from[0].style.visibility=\"hidden\",this.$cache.to[0].style.visibility=\"hidden\",this.$cache.shad_single=this.$cache.cont.find(\".shadow-single\")):(this.$cache.cont.append('<span class=\"irs-shadow shadow-from\"></span><span class=\"irs-shadow shadow-to\"></span><span class=\"irs-slider from\"></span><span class=\"irs-slider to\"></span>'),this.$cache.s_from=this.$cache.cont.find(\".from\"),\r\n this.$cache.s_to=this.$cache.cont.find(\".to\"),this.$cache.shad_from=this.$cache.cont.find(\".shadow-from\"),this.$cache.shad_to=this.$cache.cont.find(\".shadow-to\"),this.setTopHandler());this.options.hide_from_to&&(this.$cache.from[0].style.display=\"none\",this.$cache.to[0].style.display=\"none\",this.$cache.single[0].style.display=\"none\");this.appendGrid();this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.cont.removeClass(\"irs-disabled\"),this.$cache.input[0].disabled=\r\n !1,this.bindEvents());this.options.drag_interval&&(this.$cache.bar[0].style.cursor=\"ew-resize\")},setTopHandler:function(){var a=this.options.max,b=this.options.to;this.options.from>this.options.min&&b===a?this.$cache.s_from.addClass(\"type_last\"):b<a&&this.$cache.s_to.addClass(\"type_last\")},changeLevel:function(a){switch(a){case \"single\":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake);break;case \"from\":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake);\r\n this.$cache.s_from.addClass(\"state_hover\");this.$cache.s_from.addClass(\"type_last\");this.$cache.s_to.removeClass(\"type_last\");break;case \"to\":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake);this.$cache.s_to.addClass(\"state_hover\");this.$cache.s_to.addClass(\"type_last\");this.$cache.s_from.removeClass(\"type_last\");break;case \"both\":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-\r\n this.coords.p_pointer),this.$cache.s_to.removeClass(\"type_last\"),this.$cache.s_from.removeClass(\"type_last\")}},appendDisableMask:function(){this.$cache.cont.append('<span class=\"irs-disable-mask\"></span>');this.$cache.cont.addClass(\"irs-disabled\")},remove:function(){this.$cache.cont.remove();this.$cache.cont=null;this.$cache.line.off(\"keydown.irs_\"+this.plugin_count);this.$cache.body.off(\"touchmove.irs_\"+this.plugin_count);this.$cache.body.off(\"mousemove.irs_\"+this.plugin_count);this.$cache.win.off(\"touchend.irs_\"+\r\n this.plugin_count);this.$cache.win.off(\"mouseup.irs_\"+this.plugin_count);m&&(this.$cache.body.off(\"mouseup.irs_\"+this.plugin_count),this.$cache.body.off(\"mouseleave.irs_\"+this.plugin_count));this.$cache.grid_labels=[];this.coords.big=[];this.coords.big_w=[];this.coords.big_p=[];this.coords.big_x=[];cancelAnimationFrame(this.raf_id)},bindEvents:function(){if(!this.no_diapason){this.$cache.body.on(\"touchmove.irs_\"+this.plugin_count,this.pointerMove.bind(this));this.$cache.body.on(\"mousemove.irs_\"+this.plugin_count,\r\n this.pointerMove.bind(this));this.$cache.win.on(\"touchend.irs_\"+this.plugin_count,this.pointerUp.bind(this));this.$cache.win.on(\"mouseup.irs_\"+this.plugin_count,this.pointerUp.bind(this));this.$cache.line.on(\"touchstart.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\"));this.$cache.line.on(\"mousedown.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\"));this.options.drag_interval&&\"double\"===this.options.type?(this.$cache.bar.on(\"touchstart.irs_\"+this.plugin_count,this.pointerDown.bind(this,\r\n \"both\")),this.$cache.bar.on(\"mousedown.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"both\"))):(this.$cache.bar.on(\"touchstart.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\")),this.$cache.bar.on(\"mousedown.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\")));\"single\"===this.options.type?(this.$cache.single.on(\"touchstart.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"single\")),this.$cache.s_single.on(\"touchstart.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"single\")),\r\n this.$cache.shad_single.on(\"touchstart.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\")),this.$cache.single.on(\"mousedown.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"single\")),this.$cache.s_single.on(\"mousedown.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"single\")),this.$cache.edge.on(\"mousedown.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\")),this.$cache.shad_single.on(\"mousedown.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\"))):(this.$cache.single.on(\"touchstart.irs_\"+\r\n this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on(\"mousedown.irs_\"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on(\"touchstart.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"from\")),this.$cache.s_from.on(\"touchstart.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"from\")),this.$cache.to.on(\"touchstart.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"to\")),this.$cache.s_to.on(\"touchstart.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"to\")),\r\n this.$cache.shad_from.on(\"touchstart.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\")),this.$cache.shad_to.on(\"touchstart.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\")),this.$cache.from.on(\"mousedown.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"from\")),this.$cache.s_from.on(\"mousedown.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"from\")),this.$cache.to.on(\"mousedown.irs_\"+this.plugin_count,this.pointerDown.bind(this,\"to\")),this.$cache.s_to.on(\"mousedown.irs_\"+\r\n this.plugin_count,this.pointerDown.bind(this,\"to\")),this.$cache.shad_from.on(\"mousedown.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\")),this.$cache.shad_to.on(\"mousedown.irs_\"+this.plugin_count,this.pointerClick.bind(this,\"click\")));if(this.options.keyboard)this.$cache.line.on(\"keydown.irs_\"+this.plugin_count,this.key.bind(this,\"keyboard\"));m&&(this.$cache.body.on(\"mouseup.irs_\"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on(\"mouseleave.irs_\"+this.plugin_count,this.pointerUp.bind(this)))}},\r\n pointerMove:function(a){this.dragging&&(this.coords.x_pointer=(a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX)-this.coords.x_gap,this.calc())},pointerUp:function(a){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(\".state_hover\").removeClass(\"state_hover\"),this.force_redraw=!0,m&&f(\"*\").prop(\"unselectable\",!1),this.updateScene(),this.restoreOriginalMinInterval(),(f.contains(this.$cache.cont[0],a.target)||this.dragging)&&this.callOnFinish(),\r\n this.dragging=!1)},pointerDown:function(a,b){b.preventDefault();var d=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(\"both\"===a&&this.setTempMinInterval(),a||(a=this.target||\"from\"),this.current_plugin=this.plugin_count,this.target=a,this.dragging=this.is_active=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(a),m&&f(\"*\").prop(\"unselectable\",!0),this.$cache.line.trigger(\"focus\"),\r\n this.updateScene())},pointerClick:function(a,b){b.preventDefault();var d=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(d-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger(\"focus\"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault();\r\n this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,b=a?b+this.options.keyboard_step:b-this.options.keyboard_step;this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b);this.is_key=!0;this.calc()},setMinMax:function(){this.options&&(this.options.hide_min_max?(this.$cache.min[0].style.display=\"none\",this.$cache.max[0].style.display=\"none\"):(this.options.values.length?(this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),\r\n this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]))):(this.$cache.min.html(this.decorate(this._prettify(this.options.min),this.options.min)),this.$cache.max.html(this.decorate(this._prettify(this.options.max),this.options.max))),this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)))},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval);\r\n this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options){this.calc_count++;if(10===this.calc_count||a)this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent();if(this.coords.w_rs){this.calcPointerPercent();a=this.getHandleX();\"both\"===this.target&&(this.coords.p_gap=0,a=this.getHandleX());\"click\"===this.target&&(this.coords.p_gap=\r\n this.coords.p_handle/2,a=this.getHandleX(),this.target=this.options.drag_interval?\"both_one\":this.chooseHandle(a));switch(this.target){case \"base\":var b=(this.options.max-this.options.min)/100;a=(this.result.from-this.options.min)/b;b=(this.result.to-this.options.min)/b;this.coords.p_single_real=this.toFixed(a);this.coords.p_from_real=this.toFixed(a);this.coords.p_to_real=this.toFixed(b);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);\r\n this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);this.target=null;break;case \"single\":if(this.options.from_fixed)break;\r\n this.coords.p_single_real=this.convertToRealPercent(a);this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case \"from\":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(a);this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real>\r\n this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,\"from\");this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,\"from\");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case \"to\":if(this.options.to_fixed)break;\r\n this.coords.p_to_real=this.convertToRealPercent(a);this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,\"to\");this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,\"to\");\r\n this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case \"both\":if(this.options.from_fixed||this.options.to_fixed)break;a=this.toFixed(a+.001*this.coords.p_handle);this.coords.p_from_real=this.convertToRealPercent(a)-this.coords.p_gap_left;this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,\r\n this.coords.p_to_real,\"from\");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.convertToRealPercent(a)+this.coords.p_gap_right;this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,\"to\");this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);\r\n break;case \"both_one\":if(!this.options.from_fixed&&!this.options.to_fixed){var d=this.convertToRealPercent(a);a=this.result.to_percent-this.result.from_percent;var c=a/2,b=d-c,d=d+c;0>b&&(b=0,d=b+a);100<d&&(d=100,b=d-a);this.coords.p_from_real=this.calcWithStep(b);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.calcWithStep(d);this.coords.p_to_real=\r\n this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}}\"single\"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=\r\n this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to]));\r\n this.calcMinMax();this.calcLabels()}}},calcPointerPercent:function(){this.coords.w_rs?(0>this.coords.x_pointer||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=\r\n 100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);0>b?b=0:b>a&&(b=a);return b},calcHandlePercent:function(){this.coords.w_handle=\"single\"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1);this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return\"single\"===this.options.type?\"single\":a>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?\r\n \"from\":\"to\":this.options.from_fixed?\"to\":\"from\"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&(\"single\"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/\r\n 2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,\r\n this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=\r\n this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null);clearTimeout(this.update_tm);this.update_tm=null;this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1);\r\n if(this.coords.w_rs){this.coords.w_rs!==this.coords.w_rs_old&&(this.target=\"base\",this.is_resize=!0);if(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow();if(this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)){if(this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||\r\n this.is_key){this.drawLabels();this.$cache.bar[0].style.left=this.coords.p_bar_x+\"%\";this.$cache.bar[0].style.width=this.coords.p_bar_w+\"%\";if(\"single\"===this.options.type)this.$cache.s_single[0].style.left=this.coords.p_single_fake+\"%\";else{this.$cache.s_from[0].style.left=this.coords.p_from_fake+\"%\";this.$cache.s_to[0].style.left=this.coords.p_to_fake+\"%\";if(this.old_from!==this.result.from||this.force_redraw)this.$cache.from[0].style.left=this.labels.p_from_left+\"%\";if(this.old_to!==this.result.to||\r\n this.force_redraw)this.$cache.to[0].style.left=this.labels.p_to_left+\"%\"}this.$cache.single[0].style.left=this.labels.p_single_left+\"%\";this.writeToInput();this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger(\"change\"),this.$cache.input.trigger(\"input\"));this.old_from=this.result.from;this.old_to=this.result.to;this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange();if(this.is_key||this.is_click||this.is_first_update)this.is_first_update=\r\n this.is_click=this.is_key=!1,this.callOnFinish();this.is_finish=this.is_resize=this.is_update=!1}this.force_redraw=this.is_click=this.is_key=this.is_start=!1}}},drawLabels:function(){if(this.options){var a=this.options.values.length,b=this.options.p_values,d;if(!this.options.hide_from_to)if(\"single\"===this.options.type)a=a?this.decorate(b[this.result.from]):this.decorate(this._prettify(this.result.from),this.result.from),this.$cache.single.html(a),this.calcLabels(),this.$cache.min[0].style.visibility=\r\n this.labels.p_single_left<this.labels.p_min+1?\"hidden\":\"visible\",this.$cache.max[0].style.visibility=this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?\"hidden\":\"visible\";else{a?(this.options.decorate_both?(a=this.decorate(b[this.result.from]),a+=this.options.values_separator,a+=this.decorate(b[this.result.to])):a=this.decorate(b[this.result.from]+this.options.values_separator+b[this.result.to]),d=this.decorate(b[this.result.from]),b=this.decorate(b[this.result.to])):(this.options.decorate_both?\r\n (a=this.decorate(this._prettify(this.result.from),this.result.from),a+=this.options.values_separator,a+=this.decorate(this._prettify(this.result.to),this.result.to)):a=this.decorate(this._prettify(this.result.from)+this.options.values_separator+this._prettify(this.result.to),this.result.to),d=this.decorate(this._prettify(this.result.from),this.result.from),b=this.decorate(this._prettify(this.result.to),this.result.to));this.$cache.single.html(a);this.$cache.from.html(d);this.$cache.to.html(b);this.calcLabels();\r\n b=Math.min(this.labels.p_single_left,this.labels.p_from_left);a=this.labels.p_single_left+this.labels.p_single_fake;d=this.labels.p_to_left+this.labels.p_to_fake;var c=Math.max(a,d);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility=\"hidden\",this.$cache.to[0].style.visibility=\"hidden\",this.$cache.single[0].style.visibility=\"visible\",this.result.from===this.result.to?(\"from\"===this.target?this.$cache.from[0].style.visibility=\"visible\":\"to\"===\r\n this.target?this.$cache.to[0].style.visibility=\"visible\":this.target||(this.$cache.from[0].style.visibility=\"visible\"),this.$cache.single[0].style.visibility=\"hidden\",c=d):(this.$cache.from[0].style.visibility=\"hidden\",this.$cache.to[0].style.visibility=\"hidden\",this.$cache.single[0].style.visibility=\"visible\",c=Math.max(a,d))):(this.$cache.from[0].style.visibility=\"visible\",this.$cache.to[0].style.visibility=\"visible\",this.$cache.single[0].style.visibility=\"hidden\");this.$cache.min[0].style.visibility=\r\n b<this.labels.p_min+1?\"hidden\":\"visible\";this.$cache.max[0].style.visibility=c>100-this.labels.p_max-1?\"hidden\":\"visible\"}}},drawShadow:function(){var a=this.options,b=this.$cache,d=\"number\"===typeof a.from_min&&!isNaN(a.from_min),c=\"number\"===typeof a.from_max&&!isNaN(a.from_max),e=\"number\"===typeof a.to_min&&!isNaN(a.to_min),g=\"number\"===typeof a.to_max&&!isNaN(a.to_max);\"single\"===a.type?a.from_shadow&&(d||c)?(d=this.convertToPercent(d?a.from_min:a.min),c=this.convertToPercent(c?a.from_max:a.max)-\r\n d,d=this.toFixed(d-this.coords.p_handle/100*d),c=this.toFixed(c-this.coords.p_handle/100*c),d+=this.coords.p_handle/2,b.shad_single[0].style.display=\"block\",b.shad_single[0].style.left=d+\"%\",b.shad_single[0].style.width=c+\"%\"):b.shad_single[0].style.display=\"none\":(a.from_shadow&&(d||c)?(d=this.convertToPercent(d?a.from_min:a.min),c=this.convertToPercent(c?a.from_max:a.max)-d,d=this.toFixed(d-this.coords.p_handle/100*d),c=this.toFixed(c-this.coords.p_handle/100*c),d+=this.coords.p_handle/2,b.shad_from[0].style.display=\r\n \"block\",b.shad_from[0].style.left=d+\"%\",b.shad_from[0].style.width=c+\"%\"):b.shad_from[0].style.display=\"none\",a.to_shadow&&(e||g)?(e=this.convertToPercent(e?a.to_min:a.min),a=this.convertToPercent(g?a.to_max:a.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),a=this.toFixed(a-this.coords.p_handle/100*a),e+=this.coords.p_handle/2,b.shad_to[0].style.display=\"block\",b.shad_to[0].style.left=e+\"%\",b.shad_to[0].style.width=a+\"%\"):b.shad_to[0].style.display=\"none\")},writeToInput:function(){\"single\"===\r\n this.options.type?(this.options.values.length?this.$cache.input.prop(\"value\",this.result.from_value):this.$cache.input.prop(\"value\",this.result.from),this.$cache.input.data(\"from\",this.result.from)):(this.options.values.length?this.$cache.input.prop(\"value\",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop(\"value\",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data(\"from\",this.result.from),this.$cache.input.data(\"to\",\r\n this.result.to))},callOnStart:function(){this.writeToInput();if(this.options.onStart&&\"function\"===typeof this.options.onStart)this.options.onStart(this.result)},callOnChange:function(){this.writeToInput();if(this.options.onChange&&\"function\"===typeof this.options.onChange)this.options.onChange(this.result)},callOnFinish:function(){this.writeToInput();if(this.options.onFinish&&\"function\"===typeof this.options.onFinish)this.options.onFinish(this.result)},callOnUpdate:function(){this.writeToInput();\r\n if(this.options.onUpdate&&\"function\"===typeof this.options.onUpdate)this.options.onUpdate(this.result)},toggleInput:function(){this.$cache.input.toggleClass(\"irs-hidden-input\")},convertToPercent:function(a,b){var d=this.options.max-this.options.min;return d?this.toFixed((b?a:a-this.options.min)/(d/100)):(this.no_diapason=!0,0)},convertToValue:function(a){var b=this.options.min,d=this.options.max,c=b.toString().split(\".\")[1],e=d.toString().split(\".\")[1],g,l,f=0,k=0;if(0===a)return this.options.min;\r\n if(100===a)return this.options.max;c&&(f=g=c.length);e&&(f=l=e.length);g&&l&&(f=g>=l?g:l);0>b&&(k=Math.abs(b),b=+(b+k).toFixed(f),d=+(d+k).toFixed(f));a=(d-b)/100*a+b;(b=this.options.step.toString().split(\".\")[1])?a=+a.toFixed(b.length):(a/=this.options.step,a*=this.options.step,a=+a.toFixed(0));k&&(a-=k);k=b?+a.toFixed(b.length):this.toFixed(a);k<this.options.min?k=this.options.min:k>this.options.max&&(k=this.options.max);return k},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*\r\n this.coords.p_step;100<b&&(b=100);100===a&&(b=100);return this.toFixed(b)},checkMinInterval:function(a,b,d){var c=this.options;if(!c.min_interval)return a;a=this.convertToValue(a);b=this.convertToValue(b);\"from\"===d?b-a<c.min_interval&&(a=b-c.min_interval):a-b<c.min_interval&&(a=b+c.min_interval);return this.convertToPercent(a)},checkMaxInterval:function(a,b,d){var c=this.options;if(!c.max_interval)return a;a=this.convertToValue(a);b=this.convertToValue(b);\"from\"===d?b-a>c.max_interval&&(a=b-c.max_interval):\r\n a-b>c.max_interval&&(a=b+c.max_interval);return this.convertToPercent(a)},checkDiapason:function(a,b,d){a=this.convertToValue(a);var c=this.options;\"number\"!==typeof b&&(b=c.min);\"number\"!==typeof d&&(d=c.max);a<b&&(a=b);a>d&&(a=d);return this.convertToPercent(a)},toFixed:function(a){a=a.toFixed(20);return+a},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&\"function\"===typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\\d{1,3}(?=(?:\\d\\d\\d)+(?!\\d)))/g,\r\n \"$1\"+this.options.prettify_separator)},checkEdges:function(a,b){if(!this.options.force_edges)return this.toFixed(a);0>a?a=0:a>100-b&&(a=100-b);return this.toFixed(a)},validate:function(){var a=this.options,b=this.result,d=a.values,c=d.length,e,g;\"string\"===typeof a.min&&(a.min=+a.min);\"string\"===typeof a.max&&(a.max=+a.max);\"string\"===typeof a.from&&(a.from=+a.from);\"string\"===typeof a.to&&(a.to=+a.to);\"string\"===typeof a.step&&(a.step=+a.step);\"string\"===typeof a.from_min&&(a.from_min=+a.from_min);\r\n \"string\"===typeof a.from_max&&(a.from_max=+a.from_max);\"string\"===typeof a.to_min&&(a.to_min=+a.to_min);\"string\"===typeof a.to_max&&(a.to_max=+a.to_max);\"string\"===typeof a.keyboard_step&&(a.keyboard_step=+a.keyboard_step);\"string\"===typeof a.grid_num&&(a.grid_num=+a.grid_num);a.max<a.min&&(a.max=a.min);if(c)for(a.p_values=[],a.min=0,a.max=c-1,a.step=1,a.grid_num=a.max,a.grid_snap=!0,g=0;g<c;g++)e=+d[g],isNaN(e)?e=d[g]:(d[g]=e,e=this._prettify(e)),a.p_values.push(e);if(\"number\"!==typeof a.from||isNaN(a.from))a.from=\r\n a.min;if(\"number\"!==typeof a.to||isNaN(a.to))a.to=a.max;\"single\"===a.type?(a.from<a.min&&(a.from=a.min),a.from>a.max&&(a.from=a.max)):(a.from<a.min&&(a.from=a.min),a.from>a.max&&(a.from=a.max),a.to<a.min&&(a.to=a.min),a.to>a.max&&(a.to=a.max),this.update_check.from&&(this.update_check.from!==a.from&&a.from>a.to&&(a.from=a.to),this.update_check.to!==a.to&&a.to<a.from&&(a.to=a.from)),a.from>a.to&&(a.from=a.to),a.to<a.from&&(a.to=a.from));if(\"number\"!==typeof a.step||isNaN(a.step)||!a.step||0>a.step)a.step=\r\n 1;if(\"number\"!==typeof a.keyboard_step||isNaN(a.keyboard_step)||!a.keyboard_step||0>a.keyboard_step)a.keyboard_step=5;\"number\"===typeof a.from_min&&a.from<a.from_min&&(a.from=a.from_min);\"number\"===typeof a.from_max&&a.from>a.from_max&&(a.from=a.from_max);\"number\"===typeof a.to_min&&a.to<a.to_min&&(a.to=a.to_min);\"number\"===typeof a.to_max&&a.from>a.to_max&&(a.to=a.to_max);if(b){b.min!==a.min&&(b.min=a.min);b.max!==a.max&&(b.max=a.max);if(b.from<b.min||b.from>b.max)b.from=a.from;if(b.to<b.min||b.to>\r\n b.max)b.to=a.to}if(\"number\"!==typeof a.min_interval||isNaN(a.min_interval)||!a.min_interval||0>a.min_interval)a.min_interval=0;if(\"number\"!==typeof a.max_interval||isNaN(a.max_interval)||!a.max_interval||0>a.max_interval)a.max_interval=0;a.min_interval&&a.min_interval>a.max-a.min&&(a.min_interval=a.max-a.min);a.max_interval&&a.max_interval>a.max-a.min&&(a.max_interval=a.max-a.min)},decorate:function(a,b){var d=\"\",c=this.options;c.prefix&&(d+=c.prefix);d+=a;c.max_postfix&&(c.values.length&&a===c.p_values[c.max]?\r\n (d+=c.max_postfix,c.postfix&&(d+=\" \")):b===c.max&&(d+=c.max_postfix,c.postfix&&(d+=\" \")));c.postfix&&(d+=c.postfix);return d},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.convertToPercent(this.result.from);this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.convertToPercent(this.result.to);this.options.values&&(this.result.to_value=this.options.values[this.result.to])},\r\n updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(this.options.grid){var a=this.options,b,d;b=a.max-a.min;var c=a.grid_num,e,g,f=4,h,k,m,n=\"\";this.calcGridMargin();a.grid_snap?(c=b/a.step,e=this.toFixed(a.step/(b/100))):e=this.toFixed(100/c);4<c&&(f=3);7<c&&(f=2);14<c&&(f=1);28<c&&(f=0);for(b=0;b<c+1;b++){h=f;g=this.toFixed(e*b);100<g&&(g=100,h-=2,0>h&&(h=0));this.coords.big[b]=g;k=(g-e*(b-1))/(h+1);\r\n for(d=1;d<=h&&0!==g;d++)m=this.toFixed(g-k*d),n+='<span class=\"irs-grid-pol small\" style=\"left: '+m+'%\"></span>';n+='<span class=\"irs-grid-pol\" style=\"left: '+g+'%\"></span>';d=this.convertToValue(g);d=a.values.length?a.p_values[d]:this._prettify(d);n+='<span class=\"irs-grid-text js-grid-text-'+b+'\" style=\"left: '+g+'%\">'+d+\"</span>\"}this.coords.big_num=Math.ceil(c+1);this.$cache.cont.addClass(\"irs-with-grid\");this.$cache.grid.html(n);this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,d=this.coords.big_num;\r\n for(b=0;b<d;b++)a=this.$cache.grid.find(\".js-grid-text-\"+b),this.$cache.grid_labels.push(a);this.calcGridLabels()},calcGridLabels:function(){var a,b;b=[];var d=[],c=this.coords.big_num;for(a=0;a<c;a++)this.coords.big_w[a]=this.$cache.grid_labels[a].outerWidth(!1),this.coords.big_p[a]=this.toFixed(this.coords.big_w[a]/this.coords.w_rs*100),this.coords.big_x[a]=this.toFixed(this.coords.big_p[a]/2),b[a]=this.toFixed(this.coords.big[a]-this.coords.big_x[a]),d[a]=this.toFixed(b[a]+this.coords.big_p[a]);\r\n this.options.force_edges&&(b[0]<-this.coords.grid_gap&&(b[0]=-this.coords.grid_gap,d[0]=this.toFixed(b[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),d[c-1]>100+this.coords.grid_gap&&(d[c-1]=100+this.coords.grid_gap,b[c-1]=this.toFixed(d[c-1]-this.coords.big_p[c-1]),this.coords.big_x[c-1]=this.toFixed(this.coords.big_p[c-1]-this.coords.grid_gap)));this.calcGridCollision(2,b,d);this.calcGridCollision(4,b,d);for(a=0;a<c;a++)b=this.$cache.grid_labels[a][0],this.coords.big_x[a]!==\r\n Number.POSITIVE_INFINITY&&(b.style.marginLeft=-this.coords.big_x[a]+\"%\")},calcGridCollision:function(a,b,d){var c,e,g,f=this.coords.big_num;for(c=0;c<f;c+=a){e=c+a/2;if(e>=f)break;g=this.$cache.grid_labels[e][0];g.style.visibility=d[c]<=b[e]?\"visible\":\"hidden\"}},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_handle=\"single\"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),\r\n this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+\"%\",this.$cache.grid[0].style.left=this.coords.grid_gap+\"%\"))},update:function(a){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=f.extend(this.options,a),\r\n this.validate(),this.updateResult(a),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop(\"readonly\",!1),f.data(this.input,\"ionRangeSlider\",null),this.remove(),this.options=this.input=null)}};f.fn.ionRangeSlider=function(a){return this.each(function(){f.data(this,\"ionRangeSlider\")||f.data(this,\"ionRangeSlider\",new r(this,a,u++))})};(function(){for(var a=0,b=[\"ms\",\r\n \"moz\",\"webkit\",\"o\"],d=0;d<b.length&&!h.requestAnimationFrame;++d)h.requestAnimationFrame=h[b[d]+\"RequestAnimationFrame\"],h.cancelAnimationFrame=h[b[d]+\"CancelAnimationFrame\"]||h[b[d]+\"CancelRequestAnimationFrame\"];h.requestAnimationFrame||(h.requestAnimationFrame=function(b,d){var c=(new Date).getTime(),e=Math.max(0,16-(c-a)),f=h.setTimeout(function(){b(c+e)},e);a=c+e;return f});h.cancelAnimationFrame||(h.cancelAnimationFrame=function(a){clearTimeout(a)})})()});\r\n","Mageplaza_Core/js/jquery.magnific-popup.min.js":"// Magnific Popup v1.1.0 by Dmitry Semenov\r\n// http://bit.ly/magnific-popup#build=inline+image+ajax+iframe+gallery+retina+imagezoom\r\n(function(a){typeof define==\"function\"&&define.amd?define([\"jquery\"],a):typeof exports==\"object\"?a(require(\"jquery\")):a(window.jQuery||window.Zepto)})(function(a){var b=\"Close\",c=\"BeforeClose\",d=\"AfterClose\",e=\"BeforeAppend\",f=\"MarkupParse\",g=\"Open\",h=\"Change\",i=\"mfp\",j=\".\"+i,k=\"mfp-ready\",l=\"mfp-removing\",m=\"mfp-prevent-close\",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w=function(a,b){n.ev.on(i+a+j,b)},x=function(b,c,d,e){var f=document.createElement(\"div\");return f.className=\"mfp-\"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},z=function(b){if(b!==v||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace(\"%title%\",n.st.tClose)),v=b;return n.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},B=function(){var a=document.createElement(\"p\").style,b=[\"ms\",\"O\",\"Moz\",\"Webkit\"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+\"Transition\"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isLowIE=n.isIE8=document.all&&!document.addEventListener,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=B(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),s=a(document),n.popupsCache={}},open:function(b){var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c<d.length;c++){e=d[c],e.parsed&&(e=e.el[0]);if(e===b.el[0]){n.index=c;break}}}else n.items=a.isArray(b.items)?b.items:[b.items],n.index=b.index||0;if(n.isOpen){n.updateItemHTML();return}n.types=[],u=\"\",b.mainEl&&b.mainEl.length?n.ev=b.mainEl.eq(0):n.ev=s,b.key?(n.popupsCache[b.key]||(n.popupsCache[b.key]={}),n.currTemplate=n.popupsCache[b.key]):n.currTemplate={},n.st=a.extend(!0,{},a.magnificPopup.defaults,b),n.fixedContentPos=n.st.fixedContentPos===\"auto\"?!n.probablyMobile:n.st.fixedContentPos,n.st.modal&&(n.st.closeOnContentClick=!1,n.st.closeOnBgClick=!1,n.st.showCloseBtn=!1,n.st.enableEscapeKey=!1),n.bgOverlay||(n.bgOverlay=x(\"bg\").on(\"click\"+j,function(){n.close()}),n.wrap=x(\"wrap\").attr(\"tabindex\",-1).on(\"click\"+j,function(a){n._checkIfClose(a.target)&&n.close()}),n.container=x(\"container\",n.wrap)),n.contentContainer=x(\"content\"),n.st.preloader&&(n.preloader=x(\"preloader\",n.container,n.st.tLoading));var h=a.magnificPopup.modules;for(c=0;c<h.length;c++){var i=h[c];i=i.charAt(0).toUpperCase()+i.slice(1),n[\"init\"+i].call(n)}y(\"BeforeOpen\"),n.st.showCloseBtn&&(n.st.closeBtnInside?(w(f,function(a,b,c,d){c.close_replaceWith=z(d.type)}),u+=\" mfp-close-btn-in\"):n.wrap.append(z())),n.st.alignTop&&(u+=\" mfp-align-top\"),n.fixedContentPos?n.wrap.css({overflow:n.st.overflowY,overflowX:\"hidden\",overflowY:n.st.overflowY}):n.wrap.css({top:r.scrollTop(),position:\"absolute\"}),(n.st.fixedBgPos===!1||n.st.fixedBgPos===\"auto\"&&!n.fixedContentPos)&&n.bgOverlay.css({height:s.height(),position:\"absolute\"}),n.st.enableEscapeKey&&s.on(\"keyup\"+j,function(a){a.keyCode===27&&n.close()}),r.on(\"resize\"+j,function(){n.updateSize()}),n.st.closeOnContentClick||(u+=\" mfp-auto-cursor\"),u&&n.wrap.addClass(u);var l=n.wH=r.height(),m={};if(n.fixedContentPos&&n._hasScrollBar(l)){var o=n._getScrollbarSize();o&&(m.marginRight=o)}n.fixedContentPos&&(n.isIE7?a(\"body, html\").css(\"overflow\",\"hidden\"):m.overflow=\"hidden\");var p=n.st.mainClass;return n.isIE7&&(p+=\" mfp-ie7\"),p&&n._addClassToMFP(p),n.updateItemHTML(),y(\"BuildControls\"),a(\"html\").css(m),n.bgOverlay.add(n.wrap).prependTo(n.st.prependTo||a(document.body)),n._lastFocusedEl=document.activeElement,setTimeout(function(){n.content?(n._addClassToMFP(k),n._setFocus()):n.bgOverlay.addClass(k),s.on(\"focusin\"+j,n._onFocusIn)},16),n.isOpen=!0,n.updateSize(l),y(g),b},close:function(){if(!n.isOpen)return;y(c),n.isOpen=!1,n.st.removalDelay&&!n.isLowIE&&n.supportsTransition?(n._addClassToMFP(l),setTimeout(function(){n._close()},n.st.removalDelay)):n._close()},_close:function(){y(b);var c=l+\" \"+k+\" \";n.bgOverlay.detach(),n.wrap.detach(),n.container.empty(),n.st.mainClass&&(c+=n.st.mainClass+\" \"),n._removeClassFromMFP(c);if(n.fixedContentPos){var e={marginRight:\"\"};n.isIE7?a(\"body, html\").css(\"overflow\",\"\"):e.overflow=\"\",a(\"html\").css(e)}s.off(\"keyup\"+j+\" focusin\"+j),n.ev.off(j),n.wrap.attr(\"class\",\"mfp-wrap\").removeAttr(\"style\"),n.bgOverlay.attr(\"class\",\"mfp-bg\"),n.container.attr(\"class\",\"mfp-container\"),n.st.showCloseBtn&&(!n.st.closeBtnInside||n.currTemplate[n.currItem.type]===!0)&&n.currTemplate.closeBtn&&n.currTemplate.closeBtn.detach(),n.st.autoFocusLast&&n._lastFocusedEl&&a(n._lastFocusedEl).focus(),n.currItem=null,n.content=null,n.currTemplate=null,n.prevHeight=0,y(d)},updateSize:function(a){if(n.isIOS){var b=document.documentElement.clientWidth/window.innerWidth,c=window.innerHeight*b;n.wrap.css(\"height\",c),n.wH=c}else n.wH=a||r.height();n.fixedContentPos||n.wrap.css(\"height\",n.wH),y(\"Resize\")},updateItemHTML:function(){var b=n.items[n.index];n.contentContainer.detach(),n.content&&n.content.detach(),b.parsed||(b=n.parseEl(n.index));var c=b.type;y(\"BeforeChange\",[n.currItem?n.currItem.type:\"\",c]),n.currItem=b;if(!n.currTemplate[c]){var d=n.st[c]?n.st[c].markup:!1;y(\"FirstMarkupParse\",d),d?n.currTemplate[c]=a(d):n.currTemplate[c]=!0}t&&t!==b.type&&n.container.removeClass(\"mfp-\"+t+\"-holder\");var e=n[\"get\"+c.charAt(0).toUpperCase()+c.slice(1)](b,n.currTemplate[c]);n.appendContent(e,c),b.preloaded=!0,y(h,b),t=b.type,n.container.prepend(n.contentContainer),y(\"AfterChange\")},appendContent:function(a,b){n.content=a,a?n.st.showCloseBtn&&n.st.closeBtnInside&&n.currTemplate[b]===!0?n.content.find(\".mfp-close\").length||n.content.append(z()):n.content=a:n.content=\"\",y(e),n.container.addClass(\"mfp-\"+b+\"-holder\"),n.contentContainer.append(n.content)},parseEl:function(b){var c=n.items[b],d;c.tagName?c={el:a(c)}:(d=c.type,c={data:c,src:c.src});if(c.el){var e=n.types;for(var f=0;f<e.length;f++)if(c.el.hasClass(\"mfp-\"+e[f])){d=e[f];break}c.src=c.el.attr(\"data-mfp-src\"),c.src||(c.src=c.el.attr(\"href\"))}return c.type=d||n.st.type||\"inline\",c.index=b,c.parsed=!0,n.items[b]=c,y(\"ElementParse\",c),n.items[b]},addGroup:function(a,b){var c=function(c){c.mfpEl=this,n._openClick(c,a,b)};b||(b={});var d=\"click.magnificPopup\";b.mainEl=a,b.items?(b.isObj=!0,a.off(d).on(d,c)):(b.isObj=!1,b.delegate?a.off(d).on(d,b.delegate,c):(b.items=a,a.off(d).on(d,c)))},_openClick:function(b,c,d){var e=d.midClick!==undefined?d.midClick:a.magnificPopup.defaults.midClick;if(!e&&(b.which===2||b.ctrlKey||b.metaKey||b.altKey||b.shiftKey))return;var f=d.disableOn!==undefined?d.disableOn:a.magnificPopup.defaults.disableOn;if(f)if(a.isFunction(f)){if(!f.call(n))return!0}else if(r.width()<f)return!0;b.type&&(b.preventDefault(),n.isOpen&&b.stopPropagation()),d.el=a(b.mfpEl),d.delegate&&(d.items=c.find(d.delegate)),n.open(d)},updateStatus:function(a,b){if(n.preloader){q!==a&&n.container.removeClass(\"mfp-s-\"+q),!b&&a===\"loading\"&&(b=n.st.tLoading);var c={status:a,text:b};y(\"UpdateStatus\",c),a=c.status,b=c.text,n.preloader.html(b),n.preloader.find(\"a\").on(\"click\",function(a){a.stopImmediatePropagation()}),n.container.addClass(\"mfp-s-\"+a),q=a}},_checkIfClose:function(b){if(a(b).hasClass(m))return;var c=n.st.closeOnContentClick,d=n.st.closeOnBgClick;if(c&&d)return!0;if(!n.content||a(b).hasClass(\"mfp-close\")||n.preloader&&b===n.preloader[0])return!0;if(b!==n.content[0]&&!a.contains(n.content[0],b)){if(d&&a.contains(document,b))return!0}else if(c)return!0;return!1},_addClassToMFP:function(a){n.bgOverlay.addClass(a),n.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),n.wrap.removeClass(a)},_hasScrollBar:function(a){return(n.isIE7?s.height():document.body.scrollHeight)>(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(f,[b,c,d]),a.each(c,function(c,d){if(d===undefined||d===!1)return!0;e=c.split(\"_\");if(e.length>1){var f=b.find(j+\"-\"+e[0]);if(f.length>0){var g=e[1];g===\"replaceWith\"?f[0]!==d[0]&&f.replaceWith(d):g===\"img\"?f.is(\"img\")?f.attr(\"src\",d):f.replaceWith(a(\"<img>\").attr(\"src\",d).attr(\"class\",f.attr(\"class\"))):f.attr(e[1],d)}}else b.find(j+\"-\"+c).html(d)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement(\"div\");a.style.cssText=\"width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;\",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return A(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:\"\",preloader:!0,focus:\"\",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:\"auto\",fixedBgPos:\"auto\",overflowY:\"auto\",closeMarkup:'<button title=\"%title%\" type=\"button\" class=\"mfp-close\">×</button>',tClose:\"Close (Esc)\",tLoading:\"Loading...\",autoFocusLast:!0}},a.fn.magnificPopup=function(b){A();var c=a(this);if(typeof b==\"string\")if(b===\"open\"){var d,e=p?c.data(\"magnificPopup\"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data(\"magnificPopup\",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var C=\"inline\",D,E,F,G=function(){F&&(E.after(F.addClass(D)).detach(),F=null)};a.magnificPopup.registerModule(C,{options:{hiddenClass:\"hide\",markup:\"\",tNotFound:\"Content not found\"},proto:{initInline:function(){n.types.push(C),w(b+\".\"+C,function(){G()})},getInline:function(b,c){G();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(E||(D=d.hiddenClass,E=x(D),D=\"mfp-\"+D),F=e.after(E).detach().removeClass(D)),n.updateStatus(\"ready\")}else n.updateStatus(\"error\",d.tNotFound),e=a(\"<div>\");return b.inlineElement=e,e}return n.updateStatus(\"ready\"),n._parseMarkup(c,{},b),c}}});var H=\"ajax\",I,J=function(){I&&a(document.body).removeClass(I)},K=function(){J(),n.req&&n.req.abort()};a.magnificPopup.registerModule(H,{options:{settings:null,cursor:\"mfp-ajax-cur\",tError:'<a href=\"%url%\">The content</a> could not be loaded.'},proto:{initAjax:function(){n.types.push(H),I=n.st.ajax.cursor,w(b+\".\"+H,K),w(\"BeforeChange.\"+H,K)},getAjax:function(b){I&&a(document.body).addClass(I),n.updateStatus(\"loading\");var c=a.extend({url:b.src,success:function(c,d,e){var f={data:c,xhr:e};y(\"ParseAjax\",f),n.appendContent(a(f.data),H),b.finished=!0,J(),n._setFocus(),setTimeout(function(){n.wrap.addClass(k)},16),n.updateStatus(\"ready\"),y(\"AjaxContentAdded\")},error:function(){J(),b.finished=b.loadError=!0,n.updateStatus(\"error\",n.st.ajax.tError.replace(\"%url%\",b.src))}},n.st.ajax.settings);return n.req=a.ajax(c),\"\"}}});var L,M=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||\"\"}return\"\"};a.magnificPopup.registerModule(\"image\",{options:{markup:'<div class=\"mfp-figure\"><div class=\"mfp-close\"></div><figure><div class=\"mfp-img\"></div><figcaption><div class=\"mfp-bottom-bar\"><div class=\"mfp-title\"></div><div class=\"mfp-counter\"></div></div></figcaption></figure></div>',cursor:\"mfp-zoom-out-cur\",titleSrc:\"title\",verticalFit:!0,tError:'<a href=\"%url%\">The image</a> could not be loaded.'},proto:{initImage:function(){var c=n.st.image,d=\".image\";n.types.push(\"image\"),w(g+d,function(){n.currItem.type===\"image\"&&c.cursor&&a(document.body).addClass(c.cursor)}),w(b+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),r.off(\"resize\"+j)}),w(\"Resize\"+d,n.resizeImage),n.isLowIE&&w(\"AfterChange\",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css(\"padding-top\"),10)+parseInt(a.img.css(\"padding-bottom\"),10)),a.img.css(\"max-height\",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y(\"ImageHasSize\",a),a.imgHidden&&(n.content&&n.content.removeClass(\"mfp-loading\"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){L&&clearInterval(L),L=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(L),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(\".mfploader\"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus(\"ready\")),b.hasSize=!0,b.loaded=!0,y(\"ImageLoadComplete\")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(\".mfploader\"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus(\"error\",g.tError.replace(\"%url%\",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(\".mfp-img\");if(h.length){var i=document.createElement(\"img\");i.className=\"mfp-img\",b.el&&b.el.find(\"img\").length&&(i.alt=b.el.find(\"img\").attr(\"alt\")),b.img=a(i).on(\"load.mfploader\",e).on(\"error.mfploader\",f),i.src=b.src,h.is(\"img\")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:M(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(L&&clearInterval(L),b.loadError?(c.addClass(\"mfp-loading\"),n.updateStatus(\"error\",g.tError.replace(\"%url%\",b.src))):(c.removeClass(\"mfp-loading\"),n.updateStatus(\"ready\")),c):(n.updateStatus(\"loading\"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass(\"mfp-loading\"),n.findImageSize(b)),c)}}});var N,O=function(){return N===undefined&&(N=document.createElement(\"p\").style.MozTransform!==undefined),N};a.magnificPopup.registerModule(\"zoom\",{options:{enabled:!1,easing:\"ease-in-out\",duration:300,opener:function(a){return a.is(\"img\")?a:a.find(\"img\")}},proto:{initZoom:function(){var a=n.st.zoom,d=\".zoom\",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr(\"style\").removeAttr(\"class\").addClass(\"mfp-animated-image\"),d=\"all \"+a.duration/1e3+\"s \"+a.easing,e={position:\"fixed\",zIndex:9999,left:0,top:0,\"-webkit-backface-visibility\":\"hidden\"},f=\"transition\";return e[\"-webkit-\"+f]=e[\"-moz-\"+f]=e[\"-o-\"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css(\"visibility\",\"visible\")},i,j;w(\"BuildControls\"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css(\"visibility\",\"hidden\"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,y(\"ZoomAnimationEnded\")},16)},f)},16)}}),w(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css(\"visibility\",\"hidden\"),setTimeout(function(){j.css(n._getOffset())},16)}}),w(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type===\"image\"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css(\"padding-top\"),10),f=parseInt(c.css(\"padding-bottom\"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return O()?g[\"-moz-transform\"]=g.transform=\"translate(\"+d.left+\"px,\"+d.top+\"px)\":(g.left=d.left,g.top=d.top),g}}});var P=\"iframe\",Q=\"//about:blank\",R=function(a){if(n.currTemplate[P]){var b=n.currTemplate[P].find(\"iframe\");b.length&&(a||(b[0].src=Q),n.isIE8&&b.css(\"display\",a?\"block\":\"none\"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class=\"mfp-iframe-scaler\"><div class=\"mfp-close\"></div><iframe class=\"mfp-iframe\" src=\"//about:blank\" frameborder=\"0\" allowfullscreen></iframe></div>',srcAction:\"iframe_src\",patterns:{youtube:{index:\"youtube.com\",id:\"v=\",src:\"//www.youtube.com/embed/%id%?autoplay=1\"},vimeo:{index:\"vimeo.com/\",id:\"/\",src:\"//player.vimeo.com/video/%id%?autoplay=1\"},gmaps:{index:\"//maps.google.\",src:\"%id%&output=embed\"}}},proto:{initIframe:function(){n.types.push(P),w(\"BeforeChange\",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(b+\".\"+P,function(){R()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id==\"string\"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace(\"%id%\",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus(\"ready\"),c}}});var S=function(a){var b=n.items.length;return a>b-1?a-b:a<0?b+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule(\"gallery\",{options:{enabled:!1,arrowMarkup:'<button title=\"%title%\" type=\"button\" class=\"mfp-arrow mfp-arrow-%dir%\"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:\"Previous (Left arrow key)\",tNext:\"Next (Right arrow key)\",tCounter:\"%curr% of %total%\"},proto:{initGallery:function(){var c=n.st.gallery,d=\".mfp-gallery\";n.direction=!0;if(!c||!c.enabled)return!1;u+=\" mfp-gallery\",w(g+d,function(){c.navigateByImgClick&&n.wrap.on(\"click\"+d,\".mfp-img\",function(){if(n.items.length>1)return n.next(),!1}),s.on(\"keydown\"+d,function(a){a.keyCode===37?n.prev():a.keyCode===39&&n.next()})}),w(\"UpdateStatus\"+d,function(a,b){b.text&&(b.text=T(b.text,n.currItem.index,n.items.length))}),w(f+d,function(a,b,d,e){var f=n.items.length;d.counter=f>1?T(c.tCounter,e.index,f):\"\"}),w(\"BuildControls\"+d,function(){if(n.items.length>1&&c.arrows&&!n.arrowLeft){var b=c.arrowMarkup,d=n.arrowLeft=a(b.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,\"left\")).addClass(m),e=n.arrowRight=a(b.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,\"right\")).addClass(m);d.click(function(){n.prev()}),e.click(function(){n.next()}),n.container.append(d.add(e))}}),w(h+d,function(){n._preloadTimeout&&clearTimeout(n._preloadTimeout),n._preloadTimeout=setTimeout(function(){n.preloadNearbyImages(),n._preloadTimeout=null},16)}),w(b+d,function(){s.off(d),n.wrap.off(\"click\"+d),n.arrowRight=n.arrowLeft=null})},next:function(){n.direction=!0,n.index=S(n.index+1),n.updateItemHTML()},prev:function(){n.direction=!1,n.index=S(n.index-1),n.updateItemHTML()},goTo:function(a){n.direction=a>=n.index,n.index=a,n.updateItemHTML()},preloadNearbyImages:function(){var a=n.st.gallery.preload,b=Math.min(a[0],n.items.length),c=Math.min(a[1],n.items.length),d;for(d=1;d<=(n.direction?c:b);d++)n._preloadItem(n.index+d);for(d=1;d<=(n.direction?b:c);d++)n._preloadItem(n.index-d)},_preloadItem:function(b){b=S(b);if(n.items[b].preloaded)return;var c=n.items[b];c.parsed||(c=n.parseEl(b)),y(\"LazyLoad\",c),c.type===\"image\"&&(c.img=a('<img class=\"mfp-img\" />').on(\"load.mfploader\",function(){c.hasSize=!0}).on(\"error.mfploader\",function(){c.hasSize=!0,c.loadError=!0,y(\"LazyLoadError\",c)}).attr(\"src\",c.src)),c.preloaded=!0}}});var U=\"retina\";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\\.\\w+$/,function(a){return\"@2x\"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=n.st.retina,b=a.ratio;b=isNaN(b)?b():b,b>1&&(w(\"ImageHasSize.\"+U,function(a,c){c.img.css({\"max-width\":c.img[0].naturalWidth/b,width:\"100%\"})}),w(\"ElementParse.\"+U,function(c,d){d.src=a.replaceSrc(d,b)}))}}}}),A()})","Mageplaza_Core/js/jquery.autocomplete.min.js":"/**\r\n * Ajax Autocomplete for jQuery, version 1.3.0\r\n * (c) 2017 Tomas Kirda\r\n *\r\n * Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.\r\n * For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete\r\n */\r\n!function(a){\"use strict\";\"function\"==typeof define&&define.amd?define([\"jquery\"],a):a(\"object\"==typeof exports&&\"function\"==typeof require?require(\"jquery\"):jQuery)}(function(a){\"use strict\";function b(c,d){var e=a.noop,f=this,g={ajaxSettings:{},autoSelectFirst:!1,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:\"auto\",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:b.formatResult,formatGroup:b.formatGroup,delimiter:null,zIndex:9999,type:\"GET\",noCache:!1,onSearchStart:e,onSearchComplete:e,onSearchError:e,preserveInput:!1,containerClass:\"autocomplete-suggestions\",tabDisabled:!1,dataType:\"text\",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(a,b,c){return-1!==a.value.toLowerCase().indexOf(c)},paramName:\"query\",transformResult:function(b){return\"string\"==typeof b?a.parseJSON(b):b},showNoSuggestionNotice:!1,noSuggestionNotice:\"No results\",orientation:\"bottom\",forceFixPosition:!1};f.element=c,f.el=a(c),f.suggestions=[],f.badQueries=[],f.selectedIndex=-1,f.currentValue=f.element.value,f.intervalId=0,f.cachedResponse={},f.onChangeInterval=null,f.onChange=null,f.isLocal=!1,f.suggestionsContainer=null,f.noSuggestionsContainer=null,f.options=a.extend({},g,d),f.classes={selected:\"autocomplete-selected\",suggestion:\"autocomplete-suggestion\"},f.hint=null,f.hintValue=\"\",f.selection=null,f.initialize(),f.setOptions(d)}var c=function(){return{escapeRegExChars:function(a){return a.replace(/[|\\\\{}()[\\]^$+*?.]/g,\"\\\\$&\")},createNode:function(a){var b=document.createElement(\"div\");return b.className=a,b.style.position=\"absolute\",b.style.display=\"none\",b}}}(),d={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40};b.utils=c,a.Autocomplete=b,b.formatResult=function(a,b){if(!b)return a.value;var d=\"(\"+c.escapeRegExChars(b)+\")\";return a.value.replace(new RegExp(d,\"gi\"),\"<strong>$1</strong>\").replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/<(\\/?strong)>/g,\"<$1>\")},b.formatGroup=function(a,b){return'<div class=\"autocomplete-group\"><strong>'+b+\"</strong></div>\"},b.prototype={killerFn:null,initialize:function(){var c,d=this,e=\".\"+d.classes.suggestion,f=d.classes.selected,g=d.options;d.element.setAttribute(\"autocomplete\",\"off\"),d.killerFn=function(b){a(b.target).closest(\".\"+d.options.containerClass).length||(d.killSuggestions(),d.disableKillerFn())},d.noSuggestionsContainer=a('<div class=\"autocomplete-no-suggestion\"></div>').html(this.options.noSuggestionNotice).get(0),d.suggestionsContainer=b.utils.createNode(g.containerClass),c=a(d.suggestionsContainer),c.appendTo(g.appendTo),\"auto\"!==g.width&&c.css(\"width\",g.width),c.on(\"mouseover.autocomplete\",e,function(){d.activate(a(this).data(\"index\"))}),c.on(\"mouseout.autocomplete\",function(){d.selectedIndex=-1,c.children(\".\"+f).removeClass(f)}),c.on(\"click.autocomplete\",e,function(){return d.select(a(this).data(\"index\")),!1}),d.fixPositionCapture=function(){d.visible&&d.fixPosition()},a(window).on(\"resize.autocomplete\",d.fixPositionCapture),d.el.on(\"keydown.autocomplete\",function(a){d.onKeyPress(a)}),d.el.on(\"keyup.autocomplete\",function(a){d.onKeyUp(a)}),d.el.on(\"blur.autocomplete\",function(){d.onBlur()}),d.el.on(\"focus.autocomplete\",function(){d.onFocus()}),d.el.on(\"change.autocomplete\",function(a){d.onKeyUp(a)}),d.el.on(\"input.autocomplete\",function(a){d.onKeyUp(a)})},onFocus:function(){var a=this;a.fixPosition(),a.el.val().length>=a.options.minChars&&a.onValueChange()},onBlur:function(){this.enableKillerFn()},abortAjax:function(){var a=this;a.currentRequest&&(a.currentRequest.abort(),a.currentRequest=null)},setOptions:function(b){var c=this,d=c.options;a.extend(d,b),c.isLocal=a.isArray(d.lookup),c.isLocal&&(d.lookup=c.verifySuggestionsFormat(d.lookup)),d.orientation=c.validateOrientation(d.orientation,\"bottom\"),a(c.suggestionsContainer).css({\"max-height\":d.maxHeight+\"px\",width:d.width+\"px\",\"z-index\":d.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue=\"\",this.suggestions=[]},disable:function(){var a=this;a.disabled=!0,clearInterval(a.onChangeInterval),a.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var b=this,c=a(b.suggestionsContainer),d=c.parent().get(0);if(d===document.body||b.options.forceFixPosition){var e=b.options.orientation,f=c.outerHeight(),g=b.el.outerHeight(),h=b.el.offset(),i={top:h.top,left:h.left};if(\"auto\"===e){var j=a(window).height(),k=a(window).scrollTop(),l=-k+h.top-f,m=k+j-(h.top+g+f);e=Math.max(l,m)===l?\"top\":\"bottom\"}if(\"top\"===e?i.top+=-f:i.top+=g,d!==document.body){var n,o=c.css(\"opacity\");b.visible||c.css(\"opacity\",0).show(),n=c.offsetParent().offset(),i.top-=n.top,i.left-=n.left,b.visible||c.css(\"opacity\",o).hide()}\"auto\"===b.options.width&&(i.width=b.el.outerWidth()+\"px\"),c.css(i)}},enableKillerFn:function(){var b=this;a(document).on(\"click.autocomplete\",b.killerFn)},disableKillerFn:function(){var b=this;a(document).off(\"click.autocomplete\",b.killerFn)},killSuggestions:function(){var a=this;a.stopKillSuggestions(),a.intervalId=window.setInterval(function(){a.visible&&(a.options.preserveInput||a.el.val(a.currentValue),a.hide()),a.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var a,b=this,c=b.el.val().length,d=b.element.selectionStart;return\"number\"==typeof d?d===c:document.selection?(a=document.selection.createRange(),a.moveStart(\"character\",-c),c===a.text.length):!0},onKeyPress:function(a){var b=this;if(!b.disabled&&!b.visible&&a.which===d.DOWN&&b.currentValue)return void b.suggest();if(!b.disabled&&b.visible){switch(a.which){case d.ESC:b.el.val(b.currentValue),b.hide();break;case d.RIGHT:if(b.hint&&b.options.onHint&&b.isCursorAtEnd()){b.selectHint();break}return;case d.TAB:if(b.hint&&b.options.onHint)return void b.selectHint();if(-1===b.selectedIndex)return void b.hide();if(b.select(b.selectedIndex),b.options.tabDisabled===!1)return;break;case d.RETURN:if(-1===b.selectedIndex)return void b.hide();b.select(b.selectedIndex);break;case d.UP:b.moveUp();break;case d.DOWN:b.moveDown();break;default:return}a.stopImmediatePropagation(),a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case d.UP:case d.DOWN:return}clearInterval(b.onChangeInterval),b.currentValue!==b.el.val()&&(b.findBestHint(),b.options.deferRequestBy>0?b.onChangeInterval=setInterval(function(){b.onValueChange()},b.options.deferRequestBy):b.onValueChange())}},onValueChange:function(){var b=this,c=b.options,d=b.el.val(),e=b.getQuery(d);return b.selection&&b.currentValue!==e&&(b.selection=null,(c.onInvalidateSelection||a.noop).call(b.element)),clearInterval(b.onChangeInterval),b.currentValue=d,b.selectedIndex=-1,c.triggerSelectOnValidInput&&b.isExactMatch(e)?void b.select(0):void(e.length<c.minChars?b.hide():b.getSuggestions(e))},isExactMatch:function(a){var b=this.suggestions;return 1===b.length&&b[0].value.toLowerCase()===a.toLowerCase()},getQuery:function(b){var c,d=this.options.delimiter;return d?(c=b.split(d),a.trim(c[c.length-1])):b},getSuggestionsLocal:function(b){var c,d=this,e=d.options,f=b.toLowerCase(),g=e.lookupFilter,h=parseInt(e.lookupLimit,10);return c={suggestions:a.grep(e.lookup,function(a){return g(a,b,f)})},h&&c.suggestions.length>h&&(c.suggestions=c.suggestions.slice(0,h)),c},getSuggestions:function(b){var c,d,e,f,g=this,h=g.options,i=h.serviceUrl;if(h.params[h.paramName]=b,d=h.ignoreParams?null:h.params,h.onSearchStart.call(g.element,h.params)!==!1){if(a.isFunction(h.lookup))return void h.lookup(b,function(a){g.suggestions=a.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,a.suggestions)});g.isLocal?c=g.getSuggestionsLocal(b):(a.isFunction(i)&&(i=i.call(g.element,b)),e=i+\"?\"+a.param(d||{}),c=g.cachedResponse[e]),c&&a.isArray(c.suggestions)?(g.suggestions=c.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,c.suggestions)):g.isBadQuery(b)?h.onSearchComplete.call(g.element,b,[]):(g.abortAjax(),f={url:i,data:d,type:h.type,dataType:h.dataType},a.extend(f,h.ajaxSettings),g.currentRequest=a.ajax(f).done(function(a){var c;g.currentRequest=null,c=h.transformResult(a,b),g.processResponse(c,b,e),h.onSearchComplete.call(g.element,b,c.suggestions)}).fail(function(a,c,d){h.onSearchError.call(g.element,b,a,c,d)}))}},isBadQuery:function(a){if(!this.options.preventBadQueries)return!1;for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){var b=this,c=a(b.suggestionsContainer);a.isFunction(b.options.onHide)&&b.visible&&b.options.onHide.call(b.element,c),b.visible=!1,b.selectedIndex=-1,clearInterval(b.onChangeInterval),a(b.suggestionsContainer).hide(),b.signalHint(null)},suggest:function(){if(!this.suggestions.length)return void(this.options.showNoSuggestionNotice?this.noSuggestions():this.hide());var b,c=this,d=c.options,e=d.groupBy,f=d.formatResult,g=c.getQuery(c.currentValue),h=c.classes.suggestion,i=c.classes.selected,j=a(c.suggestionsContainer),k=a(c.noSuggestionsContainer),l=d.beforeRender,m=\"\",n=function(a,c){var f=a.data[e];return b===f?\"\":(b=f,d.formatGroup(a,b))};return d.triggerSelectOnValidInput&&c.isExactMatch(g)?void c.select(0):(a.each(c.suggestions,function(a,b){e&&(m+=n(b,g,a)),m+='<div class=\"'+h+'\" data-index=\"'+a+'\">'+f(b,g,a)+\"</div>\"}),this.adjustContainerWidth(),k.detach(),j.html(m),a.isFunction(l)&&l.call(c.element,j,c.suggestions),c.fixPosition(),j.show(),d.autoSelectFirst&&(c.selectedIndex=0,j.scrollTop(0),j.children(\".\"+h).first().addClass(i)),c.visible=!0,void c.findBestHint())},noSuggestions:function(){var b=this,c=a(b.suggestionsContainer),d=a(b.noSuggestionsContainer);this.adjustContainerWidth(),d.detach(),c.empty(),c.append(d),b.fixPosition(),c.show(),b.visible=!0},adjustContainerWidth:function(){var b,c=this,d=c.options,e=a(c.suggestionsContainer);\"auto\"===d.width?(b=c.el.outerWidth(),e.css(\"width\",b>0?b:300)):\"flex\"===d.width&&e.css(\"width\",\"\")},findBestHint:function(){var b=this,c=b.el.val().toLowerCase(),d=null;c&&(a.each(b.suggestions,function(a,b){var e=0===b.value.toLowerCase().indexOf(c);return e&&(d=b),!e}),b.signalHint(d))},signalHint:function(b){var c=\"\",d=this;b&&(c=d.currentValue+b.value.substr(d.currentValue.length)),d.hintValue!==c&&(d.hintValue=c,d.hint=b,(this.options.onHint||a.noop)(c))},verifySuggestionsFormat:function(b){return b.length&&\"string\"==typeof b[0]?a.map(b,function(a){return{value:a,data:null}}):b},validateOrientation:function(b,c){return b=a.trim(b||\"\").toLowerCase(),-1===a.inArray(b,[\"auto\",\"bottom\",\"top\"])&&(b=c),b},processResponse:function(a,b,c){var d=this,e=d.options;a.suggestions=d.verifySuggestionsFormat(a.suggestions),e.noCache||(d.cachedResponse[c]=a,e.preventBadQueries&&!a.suggestions.length&&d.badQueries.push(b)),b===d.getQuery(d.currentValue)&&(d.suggestions=a.suggestions,d.suggest())},activate:function(b){var c,d=this,e=d.classes.selected,f=a(d.suggestionsContainer),g=f.find(\".\"+d.classes.suggestion);return f.find(\".\"+e).removeClass(e),d.selectedIndex=b,-1!==d.selectedIndex&&g.length>d.selectedIndex?(c=g.get(d.selectedIndex),a(c).addClass(e),c):null},selectHint:function(){var b=this,c=a.inArray(b.hint,b.suggestions);b.select(c)},select:function(a){var b=this;b.hide(),b.onSelect(a),b.disableKillerFn()},moveUp:function(){var b=this;if(-1!==b.selectedIndex)return 0===b.selectedIndex?(a(b.suggestionsContainer).children().first().removeClass(b.classes.selected),b.selectedIndex=-1,b.el.val(b.currentValue),void b.findBestHint()):void b.adjustScroll(b.selectedIndex-1)},moveDown:function(){var a=this;a.selectedIndex!==a.suggestions.length-1&&a.adjustScroll(a.selectedIndex+1)},adjustScroll:function(b){var c=this,d=c.activate(b);if(d){var e,f,g,h=a(d).outerHeight();e=d.offsetTop,f=a(c.suggestionsContainer).scrollTop(),g=f+c.options.maxHeight-h,f>e?a(c.suggestionsContainer).scrollTop(e):e>g&&a(c.suggestionsContainer).scrollTop(e-c.options.maxHeight+h),c.options.preserveInput||c.el.val(c.getValue(c.suggestions[b].value)),c.signalHint(null)}},onSelect:function(b){var c=this,d=c.options.onSelect,e=c.suggestions[b];c.currentValue=c.getValue(e.value),c.currentValue===c.el.val()||c.options.preserveInput||c.el.val(c.currentValue),c.signalHint(null),c.suggestions=[],c.selection=e,a.isFunction(d)&&d.call(c.element,e)},getValue:function(a){var b,c,d=this,e=d.options.delimiter;return e?(b=d.currentValue,c=b.split(e),1===c.length?a:b.substr(0,b.length-c[c.length-1].length)+a):a},dispose:function(){var b=this;b.el.off(\".autocomplete\").removeData(\"autocomplete\"),b.disableKillerFn(),a(window).off(\"resize.autocomplete\",b.fixPositionCapture),a(b.suggestionsContainer).remove()}},a.fn.autocomplete=a.fn.devbridgeAutocomplete=function(c,d){var e=\"autocomplete\";return arguments.length?this.each(function(){var f=a(this),g=f.data(e);\"string\"==typeof c?g&&\"function\"==typeof g[c]&&g[c](d):(g&&g.dispose&&g.dispose(),g=new b(this,c),f.data(e,g))}):this.first().data(e)}});","Mageplaza_Core/js/owl.carousel.min.js":"/**\r\n * Owl Carousel v2.3.4\r\n * Copyright 2013-2018 David Deutsch\r\n * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE\r\n */\r\n!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:[\"busy\"],animating:[\"busy\"],dragging:[\"interacting\"]}},a.each([\"onResize\",\"onThrottledResize\"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:\"swing\",slideTransition:\"\",info:!1,nestedItemSelector:!1,itemElement:\"div\",stageElement:\"div\",refreshClass:\"owl-refresh\",loadedClass:\"owl-loaded\",loadingClass:\"owl-loading\",rtlClass:\"owl-rtl\",responsiveClass:\"owl-responsive\",dragClass:\"owl-drag\",itemClass:\"owl-item\",stageClass:\"owl-stage\",stageOuterClass:\"owl-stage-outer\",grabClass:\"owl-grab\"},e.Width={Default:\"default\",Inner:\"inner\",Outer:\"outer\"},e.Type={Event:\"event\",State:\"state\"},e.Plugins={},e.Workers=[{filter:[\"width\",\"settings\"],run:function(){this._width=this.$element.width()}},{filter:[\"width\",\"items\",\"settings\"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:[\"items\",\"settings\"],run:function(){this.$stage.children(\".cloned\").remove()}},{filter:[\"width\",\"items\",\"settings\"],run:function(a){var b=this.settings.margin||\"\",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:\"auto\",\"margin-left\":d?b:\"\",\"margin-right\":d?\"\":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:[\"width\",\"items\",\"settings\"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:[\"items\",\"settings\"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h=\"\",i=\"\";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass(\"cloned\").appendTo(this.$stage),a(i).addClass(\"cloned\").prependTo(this.$stage)}},{filter:[\"width\",\"items\",\"settings\"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:[\"width\",\"items\",\"settings\"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,\"padding-left\":a||\"\",\"padding-right\":a||\"\"};this.$stage.css(c)}},{filter:[\"width\",\"items\",\"settings\"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:[\"items\"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr(\"style\")}},{filter:[\"width\",\"items\",\"settings\"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:[\"position\"],run:function(){this.animate(this.coordinates(this._current))}},{filter:[\"width\",\"position\",\"items\",\"settings\"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,\"<=\",g)&&this.op(a,\">\",h)||this.op(b,\"<\",g)&&this.op(b,\">\",h))&&i.push(c);this.$stage.children(\".active\").removeClass(\"active\"),this.$stage.children(\":eq(\"+i.join(\"), :eq(\")+\")\").addClass(\"active\"),this.$stage.children(\".center\").removeClass(\"center\"),this.settings.center&&this.$stage.children().eq(this.current()).addClass(\"center\")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find(\".\"+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a(\"<\"+this.settings.stageElement+\">\",{class:this.settings.stageClass}).wrap(a(\"<div/>\",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(\".owl-item\");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate(\"width\"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter(\"initializing\"),this.trigger(\"initialize\"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is(\"pre-loading\")){var a,b,c;a=this.$element.find(\"img\"),b=this.settings.nestedItemSelector?\".\"+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave(\"initializing\"),this.trigger(\"initialized\")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(\":visible\")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),\"function\"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr(\"class\",this.$element.attr(\"class\").replace(new RegExp(\"(\"+this.options.responsiveClass+\"-)\\\\S+\\\\s\",\"g\"),\"$1\"+d))):e=a.extend({},this.options),this.trigger(\"change\",{property:{name:\"settings\",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate(\"settings\"),this.trigger(\"changed\",{property:{name:\"settings\",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger(\"prepare\",{content:b});return c.data||(c.data=a(\"<\"+this.settings.itemElement+\"/>\").addClass(this.options.itemClass).append(b)),this.trigger(\"prepared\",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is(\"valid\")&&this.enter(\"valid\")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter(\"refreshing\"),this.trigger(\"refresh\"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave(\"refreshing\"),this.trigger(\"refreshed\")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter(\"resizing\"),this.trigger(\"resize\").isDefaultPrevented()?(this.leave(\"resizing\"),!1):(this.invalidate(\"width\"),this.refresh(),this.leave(\"resizing\"),void this.trigger(\"resized\")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+\".owl.core\",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,\"resize\",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on(\"mousedown.owl.core\",a.proxy(this.onDragStart,this)),this.$stage.on(\"dragstart.owl.core selectstart.owl.core\",function(){return!1})),this.settings.touchDrag&&(this.$stage.on(\"touchstart.owl.core\",a.proxy(this.onDragStart,this)),this.$stage.on(\"touchcancel.owl.core\",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css(\"transform\").replace(/.*\\(|\\)| /g,\"\").split(\",\"),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is(\"animating\")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate(\"position\")),this.$element.toggleClass(this.options.grabClass,\"mousedown\"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on(\"mouseup.owl.core touchend.owl.core\",a.proxy(this.onDragEnd,this)),a(c).one(\"mousemove.owl.core touchmove.owl.core\",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on(\"mousemove.owl.core touchmove.owl.core\",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is(\"valid\")||(b.preventDefault(),this.enter(\"dragging\"),this.trigger(\"drag\"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is(\"dragging\")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?\"left\":\"right\";a(c).off(\".owl.core\"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is(\"dragging\")||!this.is(\"valid\"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate(\"position\"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one(\"click.owl.core\",function(){return!1})),this.is(\"dragging\")&&(this.leave(\"dragging\"),this.trigger(\"dragged\"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return\"left\"===c&&b>i-f&&b<i+f?e=a:\"right\"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,\"<\",i)&&this.op(b,\">\",h[a+1]!==d?h[a+1]:i-g)&&(e=\"left\"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,\">\",h[this.minimum()])?e=b=this.minimum():this.op(b,\"<\",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is(\"animating\")&&this.onTransitionEnd(),c&&(this.enter(\"animating\"),this.trigger(\"translate\")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:\"translate3d(\"+b+\"px,0px,0px)\",transition:this.speed()/1e3+\"s\"+(this.settings.slideTransition?\" \"+this.settings.slideTransition:\"\")}):c?this.$stage.animate({left:b+\"px\"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+\"px\"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger(\"change\",{property:{name:\"position\",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate(\"position\"),this.trigger(\"changed\",{property:{name:\"position\",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return\"string\"===a.type(b)&&(this._invalidated[b]=!0,this.is(\"valid\")&&this.leave(\"valid\")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress([\"translate\",\"translated\"]),this.animate(this.coordinates(a)),this.release([\"translate\",\"translated\"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave(\"animating\"),this.trigger(\"translated\")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn(\"Can not detect viewport width.\"),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find(\".\"+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find(\"[data-merge]\").addBack(\"[data-merge]\").attr(\"data-merge\")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate(\"items\")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger(\"add\",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find(\"[data-merge]\").addBack(\"[data-merge]\").attr(\"data-merge\")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find(\"[data-merge]\").addBack(\"[data-merge]\").attr(\"data-merge\")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate(\"items\"),this.trigger(\"added\",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger(\"remove\",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate(\"items\"),this.trigger(\"removed\",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter(\"pre-loading\"),c=a(c),a(new Image).one(\"load\",a.proxy(function(a){c.attr(\"src\",a.target.src),c.css(\"opacity\",1),this.leave(\"pre-loading\"),!this.is(\"pre-loading\")&&!this.is(\"initializing\")&&this.refresh()},this)).attr(\"src\",c.attr(\"src\")||c.attr(\"data-src\")||c.attr(\"data-src-retina\"))},this))},e.prototype.destroy=function(){this.$element.off(\".owl.core\"),this.$stage.off(\".owl.core\"),a(c).off(\".owl.core\"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,\"resize\",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(\".cloned\").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr(\"class\",this.$element.attr(\"class\").replace(new RegExp(this.options.responsiveClass+\"-\\\\S+\\\\s\",\"g\"),\"\")).removeData(\"owl.carousel\")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case\"<\":return d?a>c:a<c;case\">\":return d?a<c:a>c;case\">=\":return d?a<=c:a>=c;case\"<=\":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent(\"on\"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent(\"on\"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep([\"on\",b,d],function(a){return a}).join(\"-\").toLowerCase()),j=a.Event([b,\"owl\",d||\"carousel\"].join(\".\").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&\"function\"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf(\"owl\")?a.namespace&&a.namespace.indexOf(\"owl\")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data(\"owl.carousel\");f||(f=new e(this,\"object\"==typeof b&&b),d.data(\"owl.carousel\",f),a.each([\"next\",\"prev\",\"to\",\"destroy\",\"refresh\",\"replace\",\"add\",\"remove\"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+\".owl.carousel.core\",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),\"string\"==typeof b&&\"_\"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={\"initialized.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass(\"owl-hidden\",!this._visible),this._visible&&this._core.invalidate(\"width\")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))\"function\"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={\"initialized.owl.carousel change.owl.carousel resized.owl.carousel\":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&\"position\"==b.property.name||\"initialized\"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(\".owl-lazy\");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr(\"data-src-retina\")||f.attr(\"data-src\")||f.attr(\"data-srcset\");this._core.trigger(\"load\",{element:f,url:g},\"lazy\"),f.is(\"img\")?f.one(\"load.owl.lazy\",a.proxy(function(){f.css(\"opacity\",1),this._core.trigger(\"loaded\",{element:f,url:g},\"lazy\")},this)).attr(\"src\",g):f.is(\"source\")?f.one(\"load.owl.lazy\",a.proxy(function(){this._core.trigger(\"loaded\",{element:f,url:g},\"lazy\")},this)).attr(\"srcset\",g):(e=new Image,e.onload=a.proxy(function(){f.css({\"background-image\":'url(\"'+g+'\")',opacity:\"1\"}),this._core.trigger(\"loaded\",{element:f,url:g},\"lazy\")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))\"function\"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={\"initialized.owl.carousel refreshed.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),\"changed.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&\"position\"===a.property.name&&this.update()},this),\"loaded.owl.lazy\":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest(\".\"+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on(\"load\",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:\"owl-height\"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))\"function\"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={\"initialized.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.register({type:\"state\",name:\"playing\",tags:[\"interacting\"]})},this),\"resize.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),\"refreshed.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.is(\"resizing\")&&this._core.$stage.find(\".cloned .owl-video-frame\").remove()},this),\"changed.owl.carousel\":a.proxy(function(a){a.namespace&&\"position\"===a.property.name&&this._playing&&this.stop()},this),\"prepared.owl.carousel\":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(\".owl-video\");c.length&&(c.css(\"display\",\"none\"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on(\"click.owl.video\",\".owl-video-play-icon\",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr(\"data-vimeo-id\")?\"vimeo\":a.attr(\"data-vzaar-id\")?\"vzaar\":\"youtube\"}(),d=a.attr(\"data-vimeo-id\")||a.attr(\"data-youtube-id\")||a.attr(\"data-vzaar-id\"),e=a.attr(\"data-width\")||this._core.settings.videoWidth,f=a.attr(\"data-height\")||this._core.settings.videoHeight,g=a.attr(\"href\");if(!g)throw new Error(\"Missing video URL.\");if(d=g.match(/(http:|https:|)\\/\\/(player.|www.|app.)?(vimeo\\.com|youtu(be\\.com|\\.be|be\\.googleapis\\.com|be\\-nocookie\\.com)|vzaar\\.com)\\/(video\\/|videos\\/|embed\\/|channels\\/.+\\/|groups\\/.+\\/|watch\\?v=|v\\/)?([A-Za-z0-9._%-]*)(\\&\\S+)?/),d[3].indexOf(\"youtu\")>-1)c=\"youtube\";else if(d[3].indexOf(\"vimeo\")>-1)c=\"vimeo\";else{if(!(d[3].indexOf(\"vzaar\")>-1))throw new Error(\"Video URL not supported.\");c=\"vzaar\"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr(\"data-video\",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?\"width:\"+c.width+\"px;height:\"+c.height+\"px;\":\"\",h=b.find(\"img\"),i=\"src\",j=\"\",k=this._core.settings,l=function(c){e='<div class=\"owl-video-play-icon\"></div>',d=k.lazyLoad?a(\"<div/>\",{class:\"owl-video-tn \"+j,srcType:c}):a(\"<div/>\",{class:\"owl-video-tn\",style:\"opacity:1;background-image:url(\"+c+\")\"}),b.after(d),b.after(e)};if(b.wrap(a(\"<div/>\",{class:\"owl-video-wrapper\",style:g})),this._core.settings.lazyLoad&&(i=\"data-src\",j=\"owl-lazy\"),h.length)return l(h.attr(i)),h.remove(),!1;\"youtube\"===c.type?(f=\"//img.youtube.com/vi/\"+c.id+\"/hqdefault.jpg\",l(f)):\"vimeo\"===c.type?a.ajax({type:\"GET\",url:\"//vimeo.com/api/v2/video/\"+c.id+\".json\",jsonp:\"callback\",dataType:\"jsonp\",success:function(a){f=a[0].thumbnail_large,l(f)}}):\"vzaar\"===c.type&&a.ajax({type:\"GET\",url:\"//vzaar.com/api/videos/\"+c.id+\".json\",jsonp:\"callback\",dataType:\"jsonp\",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger(\"stop\",null,\"video\"),this._playing.find(\".owl-video-frame\").remove(),this._playing.removeClass(\"owl-video-playing\"),this._playing=null,this._core.leave(\"playing\"),this._core.trigger(\"stopped\",null,\"video\")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest(\".\"+this._core.settings.itemClass),f=this._videos[e.attr(\"data-video\")],g=f.width||\"100%\",h=f.height||this._core.$stage.height();this._playing||(this._core.enter(\"playing\"),this._core.trigger(\"play\",null,\"video\"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe frameborder=\"0\" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'),c.attr(\"height\",h),c.attr(\"width\",g),\"youtube\"===f.type?c.attr(\"src\",\"//www.youtube.com/embed/\"+f.id+\"?autoplay=1&rel=0&v=\"+f.id):\"vimeo\"===f.type?c.attr(\"src\",\"//player.vimeo.com/video/\"+f.id+\"?autoplay=1\"):\"vzaar\"===f.type&&c.attr(\"src\",\"//view.vzaar.com/\"+f.id+\"/player?autoplay=true\"),a(c).wrap('<div class=\"owl-video-frame\" />').insertAfter(e.find(\".owl-video\")),this._playing=e.addClass(\"owl-video-playing\"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass(\"owl-video-frame\")},e.prototype.destroy=function(){var a,b;this._core.$element.off(\"click.owl.video\");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))\"function\"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={\"change.owl.carousel\":a.proxy(function(a){a.namespace&&\"position\"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),\"drag.owl.carousel dragged.owl.carousel translated.owl.carousel\":a.proxy(function(a){a.namespace&&(this.swapping=\"translated\"==a.type)},this),\"translate.owl.carousel\":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,\r\nanimateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+\"px\"}).addClass(\"animated owl-animated-out\").addClass(g)),f&&e.one(a.support.animation.end,c).addClass(\"animated owl-animated-in\").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:\"\"}).removeClass(\"animated owl-animated-out owl-animated-in\").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))\"function\"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={\"changed.owl.carousel\":a.proxy(function(a){a.namespace&&\"settings\"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&\"position\"===a.property.name&&this._paused&&(this._time=0)},this),\"initialized.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),\"play.owl.autoplay\":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),\"stop.owl.autoplay\":a.proxy(function(a){a.namespace&&this.stop()},this),\"mouseover.owl.autoplay\":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is(\"rotating\")&&this.pause()},this),\"mouseleave.owl.autoplay\":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is(\"rotating\")&&this.play()},this),\"touchstart.owl.core\":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is(\"rotating\")&&this.pause()},this),\"touchend.owl.core\":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is(\"interacting\")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is(\"rotating\")||this._core.enter(\"rotating\"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is(\"rotating\")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave(\"rotating\"))},e.prototype.pause=function(){this._core.is(\"rotating\")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))\"function\"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){\"use strict\";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={\"prepared.owl.carousel\":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class=\"'+this._core.settings.dotClass+'\">'+a(b.content).find(\"[data-dot]\").addBack(\"[data-dot]\").attr(\"data-dot\")+\"</div>\")},this),\"added.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),\"remove.owl.carousel\":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),\"changed.owl.carousel\":a.proxy(function(a){a.namespace&&\"position\"==a.property.name&&this.draw()},this),\"initialized.owl.carousel\":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger(\"initialize\",null,\"navigation\"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger(\"initialized\",null,\"navigation\"))},this),\"refreshed.owl.carousel\":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger(\"refresh\",null,\"navigation\"),this.update(),this.draw(),this._core.trigger(\"refreshed\",null,\"navigation\"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label=\"Previous\">‹</span>','<span aria-label=\"Next\">›</span>'],navSpeed:!1,navElement:'button type=\"button\" role=\"presentation\"',navContainer:!1,navContainerClass:\"owl-nav\",navClass:[\"owl-prev\",\"owl-next\"],slideBy:1,dotClass:\"owl-dot\",dotsClass:\"owl-dots\",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a(\"<div>\").addClass(c.navContainerClass).appendTo(this.$element)).addClass(\"disabled\"),this._controls.$previous=a(\"<\"+c.navElement+\">\").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on(\"click\",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a(\"<\"+c.navElement+\">\").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on(\"click\",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role=\"button\">').addClass(c.dotClass).append(a(\"<span>\")).prop(\"outerHTML\")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a(\"<div>\").addClass(c.dotsClass).appendTo(this.$element)).addClass(\"disabled\"),this._controls.$absolute.on(\"click\",\"button\",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)\"$relative\"===b&&e.navContainer?this._controls[b].html(\"\"):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))\"function\"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if(\"page\"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||\"page\"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass(\"disabled\",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass(\"disabled\",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass(\"disabled\",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass(\"disabled\",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join(\"\")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(\".active\").removeClass(\"active\"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass(\"active\"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return\"page\"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){\"use strict\";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={\"initialized.owl.carousel\":a.proxy(function(c){c.namespace&&\"URLHash\"===this._core.settings.startPosition&&a(b).trigger(\"hashchange.owl.navigation\")},this),\"prepared.owl.carousel\":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(\"[data-hash]\").addBack(\"[data-hash]\").attr(\"data-hash\");if(!c)return;this._hashes[c]=b.content}},this),\"changed.owl.carousel\":a.proxy(function(c){if(c.namespace&&\"position\"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on(\"hashchange.owl.navigation\",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off(\"hashchange.owl.navigation\");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))\"function\"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+\" \"+h.join(f+\" \")+f).split(\" \"),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a(\"<support>\").get(0).style,h=\"Webkit Moz O ms\".split(\" \"),i={transition:{end:{WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd\",transition:\"transitionend\"}},animation:{end:{WebkitAnimation:\"webkitAnimationEnd\",MozAnimation:\"animationend\",OAnimation:\"oAnimationEnd\",animation:\"animationend\"}}},j={csstransforms:function(){return!!e(\"transform\")},csstransforms3d:function(){return!!e(\"perspective\")},csstransitions:function(){return!!e(\"transition\")},cssanimations:function(){return!!e(\"animation\")}};j.csstransitions()&&(a.support.transition=new String(f(\"transition\")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f(\"animation\")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f(\"transform\")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);","Mageplaza_Core/js/help.js":"/**\n * Mageplaza\n *\n * NOTICE OF LICENSE\n *\n * This source file is subject to the mageplaza.com license that is\n * available through the world-wide-web at this URL:\n * https://www.mageplaza.com/LICENSE.txt\n *\n * DISCLAIMER\n *\n * Do not edit or add to this file if you wish to upgrade this extension to newer\n * version in the future.\n *\n * @category Mageplaza\n * @package Mageplaza_Core\n * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)\n * @license https://www.mageplaza.com/LICENSE.txt\n */\n\nrequire([\n 'jquery',\n 'underscore'\n], function ($, _) {\n 'use strict';\n\n var mpHelpDb = {\n 'admin/system_config/index': [\n {\n 'css_selector': '#general_single_store_mode_enabled',\n 'type': 'link',\n 'text': 'How to enable Single Store Mode, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-enable-single-store-mode-magento-2.html',\n 'anchor': 'learn more'\n }\n ],\n 'theme/design_config/edit/scope/websites/scope_id': [\n {\n 'css_selector': 'input[name*=\"header_welcome\"]',\n 'type': 'link',\n 'text': 'How to change the welcome message, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-change-welcome-message-magento-2.html',\n 'anchor': 'learn more'\n }\n ],\n 'system_config/edit/section/contact': [\n {\n 'css_selector': '#contact_contact_enabled',\n 'type': 'link',\n 'text': 'How to configure Contact Us form, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-configure-contacts-email-address-magento-2.html',\n 'anchor': 'learn more'\n }\n ],\n //Not Configuration\n 'catalog/product/edit': [\n {\n 'css_selector': '#media_gallery_content',\n 'type': 'link',\n 'text': 'How to upload Images Product, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-to-upload-images-product-in-magento-2.html',\n 'anchor': 'learn more'\n }\n ],\n 'type/configurable/key/': [\n {\n 'css_selector': '.page-actions-placeholder',\n 'type': 'link',\n 'text': 'Create Configurable Product, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-create-configurable-product-magento-2.html',\n 'anchor': 'learn more'\n }\n ],\n 'system_config/edit/section/general': [\n {\n 'css_selector': '#general_region_state_required',\n 'type': 'link',\n 'text': 'How to setup State, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-setup-locale-state-country-magento-2.html#set-up-state',\n 'anchor': 'learn more'\n },\n {\n 'css_selector': '#general_country_default',\n 'type': 'link',\n 'text': 'How to setup Country, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-setup-locale-state-country-magento-2.html#set-up-country',\n 'anchor': 'learn more'\n },\n {\n 'css_selector': '#general_locale_timezone',\n 'type': 'link',\n 'text': 'How to setup Locale, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-setup-locale-state-country-magento-2.html#login-magento-2',\n 'anchor': 'learn more'\n },\n {\n 'css_selector': '#general_store_information_name',\n 'type': 'link',\n 'text': 'How to setup store information, {link}.',\n 'url': 'https://www.mageplaza.com/kb/how-setup-store-information-magento-2.html',\n 'anchor': 'learn more'\n }\n\n ],\n 'system_config/edit/section/trans_email': [\n {\n 'css_selector': '#trans_email_ident_sales_email',\n 'type': 'link',\n 'text': 'About 79% of visitors drop their shopping cart at the checkout page. This proven abandoned cart email templates that can improve that number, {link}.',\n 'url': 'https://pages.mageplaza.com/abandoned-cart-email-templates-for-magento/',\n 'anchor': 'learn more'\n },\n ],\n 'system_config/edit/section/newsletter': [\n {\n 'css_selector': '#newsletter_subscription_success_email_template',\n 'type': 'link',\n 'text': 'Welcome emails generate 4 times the total open rates and 5 times the click rates compared to other bulk promotions. Get proven welcome email templates, {link}.',\n 'url': 'https://pages.mageplaza.com/welcome-email-templates-for-magento-2/',\n 'anchor': 'get a copy'\n }\n\n\n ],\n 'admin/email_template/new': [\n {\n 'css_selector': '#template_select',\n 'type': 'link',\n 'text': 'Get {link} templates that convert',\n 'url': 'https://pages.mageplaza.com/bundle-of-email-follow-up-templates/',\n 'anchor': 'bundle of follow up emails'\n }\n\n\n ]\n };\n\n function buildHtml(data) {\n var link = '<a href=\"' + data.url + '?utm_source=store&utm_medium=link&utm_campaign=mageplaza-helps\" target=\"_blank\">' + data.anchor + '</a>';\n var text = data.text.replace('{link}', link);\n\n return '<p class=\"note\">' + text + '</p>';\n }\n\n var url = window.location.href;\n for (var path in mpHelpDb) {\n if (mpHelpDb.hasOwnProperty(path) && url.search(path)) {\n var datas = mpHelpDb[path];\n _.each(datas, function (data) {\n var html = buildHtml(data);\n html && $(html).insertAfter(data.css_selector); //only insert if html is not empty\n });\n }\n }\n});","Magento_Catalog/js/product-gallery.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'underscore',\n 'mage/template',\n 'uiRegistry',\n 'jquery/ui',\n 'baseImage'\n], function ($, _, mageTemplate, registry) {\n 'use strict';\n\n /**\n * Formats incoming bytes value to a readable format.\n *\n * @param {Number} bytes\n * @returns {String}\n */\n function bytesToSize(bytes) {\n var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'],\n i;\n\n if (bytes === 0) {\n return '0 Byte';\n }\n\n i = window.parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));\n\n return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];\n }\n\n /**\n * Product gallery widget\n */\n $.widget('mage.productGallery', {\n options: {\n imageSelector: '[data-role=image]',\n imageElementSelector: '[data-role=image-element]',\n template: '[data-template=image]',\n imageResolutionLabel: '[data-role=resolution]',\n imgTitleSelector: '[data-role=img-title]',\n imageSizeLabel: '[data-role=size]',\n types: null,\n initialized: false\n },\n\n /**\n * Gallery creation\n * @protected\n */\n _create: function () {\n this.options.types = this.options.types || this.element.data('types');\n this.options.images = this.options.images || this.element.data('images');\n this.options.parentComponent = this.options.parentComponent || this.element.data('parent-component');\n\n this.imgTmpl = mageTemplate(this.element.find(this.options.template).html().trim());\n\n this._bind();\n\n this._isInitializingItems = true;\n this._initializedItemCount = 0;\n this._lastInitializedElement = null;\n\n $.each(this.options.images, $.proxy(function (index, imageData) {\n this.element.trigger('addItem', imageData);\n }, this));\n\n this._updateImagesRoles();\n this._contentUpdated();\n\n this._isInitializingItems = false;\n this.options.initialized = true;\n },\n\n /**\n * Bind handler to elements\n * @protected\n */\n _bind: function () {\n this._on({\n updateImageTitle: '_updateImageTitle',\n updateVisibility: '_updateVisibility',\n openDialog: '_onOpenDialog',\n addItem: '_addItem',\n removeItem: '_removeItem',\n setImageType: '_setImageType',\n setPosition: '_setPosition',\n resort: '_resort',\n\n /**\n * @param {jQuery.Event} event\n */\n 'mouseup [data-role=delete-button]': function (event) {\n var $imageContainer;\n\n event.preventDefault();\n $imageContainer = $(event.currentTarget).closest(this.options.imageSelector);\n this.element.find('[data-role=dialog]').trigger('close');\n this.element.trigger('removeItem', $imageContainer.data('imageData'));\n },\n\n /**\n * @param {jQuery.Event} event\n */\n 'mouseup [data-role=make-base-button]': function (event) {\n var $imageContainer,\n imageData;\n\n event.preventDefault();\n event.stopImmediatePropagation();\n $imageContainer = $(event.currentTarget).closest(this.options.imageSelector);\n imageData = $imageContainer.data('imageData');\n this.setBase(imageData);\n }\n });\n\n this.element.sortable({\n distance: 8,\n items: this.options.imageSelector,\n tolerance: 'pointer',\n cancel: 'input, button, .uploader',\n update: $.proxy(function () {\n this.element.trigger('resort');\n }, this)\n });\n },\n\n /**\n * Set image as main\n * @param {Object} imageData\n * @private\n */\n setBase: function (imageData) {\n var baseImage = this.options.types.image,\n sameImages = $.grep(\n $.map(this.options.types, function (el) {\n return el;\n }),\n function (el) {\n return el.value === baseImage.value;\n }\n ),\n isImageOpened = this.findElement(imageData).hasClass('active');\n\n $.each(sameImages, $.proxy(function (index, image) {\n this.element.trigger('setImageType', {\n type: image.code,\n imageData: imageData\n });\n\n if (isImageOpened) {\n this.element.find('.item').addClass('selected');\n this.element.find('[data-role=type-selector]').prop({\n 'checked': true\n });\n }\n }, this));\n },\n\n /**\n * Find element by fileName\n * @param {Object} data\n * @returns {Element}\n */\n findElement: function (data) {\n return this.element.find(this.options.imageSelector).filter(function () {\n return $(this).data('imageData').file === data.file;\n }).first();\n },\n\n /**\n * Mark parent fieldset that content was updated\n */\n _contentUpdated: function () {\n if (this.options.initialized && this.options.parentComponent) {\n registry.async(this.options.parentComponent)(\n function (parentComponent) {\n parentComponent.bubble('update', true);\n }\n );\n }\n },\n\n /**\n * Add image\n * @param {jQuery.Event} event\n * @param {Object} imageData\n * @private\n */\n _addItem: function (event, imageData) {\n var element,\n imgElement,\n lastElement,\n count,\n position;\n\n if (this._isInitializingItems) {\n count = this._initializedItemCount++;\n lastElement = this._lastInitializedElement;\n } else {\n count = this.element.find(this.options.imageSelector).length;\n lastElement = this.element.find(this.options.imageSelector + ':last');\n }\n\n position = count + 1;\n\n if (lastElement && lastElement.length === 1) {\n position = parseInt(lastElement.data('imageData').position || count, 10) + 1;\n }\n imageData = $.extend({\n 'file_id': imageData['value_id'] ? imageData['value_id'] : Math.random().toString(33).substr(2, 18),\n 'disabled': imageData.disabled ? imageData.disabled : 0,\n 'position': position,\n sizeLabel: bytesToSize(imageData.size)\n }, imageData);\n\n element = this.imgTmpl({\n data: imageData\n });\n\n element = $(element).data('imageData', imageData);\n\n if (count === 0) {\n element.prependTo(this.element);\n } else {\n element.insertAfter(lastElement);\n }\n\n this._lastInitializedElement = element;\n\n if (!this.options.initialized &&\n this.options.images.length === 0 ||\n this.options.initialized &&\n this.element.find(this.options.imageSelector + ':not(.removed)').length === 1\n ) {\n this.setBase(imageData);\n }\n\n imgElement = element.find(this.options.imageElementSelector);\n\n imgElement.on('load', this._updateImageDimesions.bind(this, element));\n\n $.each(this.options.types, $.proxy(function (index, image) {\n if (imageData.file === image.value) {\n this.element.trigger('setImageType', {\n type: image.code,\n imageData: imageData\n });\n }\n }, this));\n\n if (!this._isInitializingItems) {\n this._updateImagesRoles();\n this._contentUpdated();\n }\n },\n\n /**\n * Returns a list of current images.\n *\n * @returns {jQueryCollection}\n */\n _getImages: function () {\n return this.element.find(this.options.imageSelector);\n },\n\n /**\n * Returns a list of images roles.\n *\n * @return {Object}\n */\n _getRoles: function () {\n return _.mapObject(this.options.types, function (data, key) {\n var elem = this.element.find('.image-' + key);\n\n return {\n index: key,\n value: elem.val(),\n elem: elem\n };\n }, this);\n },\n\n /**\n * Updates labels with roles information for each image.\n */\n _updateImagesRoles: function () {\n var $images = this._getImages().toArray(),\n roles = this._getRoles();\n\n $images.forEach(function (img) {\n var $img = $(img),\n data = $img.data('imageData');\n\n $img.find('[data-role=roles-labels] li').each(function (index, elem) {\n var $elem = $(elem),\n roleCode = $elem.data('roleCode'),\n role = roles[roleCode];\n\n role.value === data.file ?\n $elem.show() :\n $elem.hide();\n });\n\n });\n },\n\n /**\n * Updates image's dimensions information.\n *\n * @param {jQeuryCollection} imgContainer\n */\n _updateImageDimesions: function (imgContainer) {\n var $img = imgContainer.find(this.options.imageElementSelector)[0],\n $dimens = imgContainer.find('[data-role=image-dimens]');\n\n $dimens.text($img.naturalWidth + 'x' + $img.naturalHeight + ' px');\n },\n\n /**\n *\n * @param {jQuery.Event} event\n * @param {Object} data\n */\n _updateImageTitle: function (event, data) {\n var imageData = data.imageData,\n $imgContainer = this.findElement(imageData),\n $title = $imgContainer.find(this.options.imgTitleSelector),\n value;\n\n value = imageData['media_type'] === 'external-video' ?\n imageData['video_title'] :\n imageData.label;\n\n $title.text(value);\n\n this._contentUpdated();\n },\n\n /**\n * Remove Image\n * @param {jQuery.Event} event\n * @param {Object} imageData\n * @private\n */\n _removeItem: function (event, imageData) {\n var $imageContainer = this.findElement(imageData);\n\n imageData.isRemoved = true;\n $imageContainer.addClass('removed').hide().find('.is-removed').val(1);\n\n this._contentUpdated();\n },\n\n /**\n * Set image type\n * @param {jQuery.Event} event\n * @param {Obejct} data\n * @private\n */\n _setImageType: function (event, data) {\n if (data.type === 'image') {\n this.element.find('.base-image').removeClass('base-image');\n }\n\n if (data.imageData) {\n this.options.types[data.type].value = data.imageData.file;\n\n if (data.type === 'image') {\n this.findElement(data.imageData).addClass('base-image');\n }\n } else {\n this.options.types[data.type].value = 'no_selection';\n }\n this.element.find('.image-' + data.type).val(this.options.types[data.type].value || 'no_selection');\n this._updateImagesRoles();\n this._contentUpdated();\n },\n\n /**\n * Resort images\n * @private\n */\n _resort: function () {\n this.element.find('.position').each($.proxy(function (index, element) {\n var value = $(element).val();\n\n if (value != index) { //eslint-disable-line eqeqeq\n this.element.trigger('moveElement', {\n imageData: $(element).closest(this.options.imageSelector).data('imageData'),\n position: index\n });\n $(element).val(index);\n }\n }, this));\n\n this._contentUpdated();\n },\n\n /**\n * Set image position\n * @param {jQuery.Event} event\n * @param {Object} data\n * @private\n */\n _setPosition: function (event, data) {\n var $element = this.findElement(data.imageData),\n curIndex = this.element.find(this.options.imageSelector).index($element),\n newPosition = data.position + (curIndex > data.position ? -1 : 0);\n\n if (data.position != curIndex) { //eslint-disable-line eqeqeq\n if (data.position === 0) {\n this.element.prepend($element);\n } else {\n $element.insertAfter(\n this.element.find(this.options.imageSelector).eq(newPosition)\n );\n }\n this.element.trigger('resort');\n }\n\n this._contentUpdated();\n }\n });\n\n // Extension for mage.productGallery - Add advanced settings block\n $.widget('mage.productGallery', $.mage.productGallery, {\n options: {\n dialogTemplate: '[data-role=img-dialog-tmpl]',\n dialogContainerTmpl: '[data-role=img-dialog-container-tmpl]'\n },\n\n /** @inheritdoc */\n _create: function () {\n var template = this.element.find(this.options.dialogTemplate),\n containerTmpl = this.element.find(this.options.dialogContainerTmpl);\n\n this._super();\n this.modalPopupInit = false;\n\n if (template.length) {\n this.dialogTmpl = mageTemplate(template.html().trim());\n }\n\n if (containerTmpl.length) {\n this.dialogContainerTmpl = mageTemplate(containerTmpl.html().trim());\n } else {\n this.dialogContainerTmpl = mageTemplate('');\n }\n\n this._initDialog();\n },\n\n /**\n * Bind handler to elements\n * @protected\n */\n _bind: function () {\n var events = {};\n\n this._super();\n\n events['click [data-role=close-panel]'] = $.proxy(function () {\n this.element.find('[data-role=dialog]').trigger('close');\n }, this);\n\n /**\n * @param {jQuery.Event} event\n */\n events['click ' + this.options.imageSelector] = function (event) {\n var imageData, $imageContainer;\n\n if (!$(event.currentTarget).is('.ui-sortable-helper')) {\n $(event.currentTarget).addClass('active');\n imageData = $(event.currentTarget).data('imageData');\n $imageContainer = this.findElement(imageData);\n\n if ($imageContainer.is('.removed')) {\n return;\n }\n this.element.trigger('openDialog', [imageData]);\n }\n };\n this._on(events);\n this.element.on('sortstart', $.proxy(function () {\n this.element.find('[data-role=dialog]').trigger('close');\n }, this));\n },\n\n /**\n * Initializes dialog element.\n */\n _initDialog: function () {\n var $dialog = $(this.dialogContainerTmpl());\n\n $dialog.modal({\n 'type': 'slide',\n title: $.mage.__('Image Detail'),\n buttons: [],\n\n /** @inheritdoc */\n opened: function () {\n $dialog.trigger('open');\n },\n\n /** @inheritdoc */\n closed: function () {\n $dialog.trigger('close');\n }\n });\n\n $dialog.on('open', this.onDialogOpen.bind(this));\n $dialog.on('close', function () {\n var $imageContainer = $dialog.data('imageContainer');\n\n $imageContainer.removeClass('active');\n $dialog.find('#hide-from-product-page').remove();\n });\n\n $dialog.on('change', '[data-role=type-selector]', function () {\n var parent = $(this).closest('.item'),\n selectedClass = 'selected';\n\n parent.toggleClass(selectedClass, $(this).prop('checked'));\n });\n\n $dialog.on('change', '[data-role=type-selector]', $.proxy(this._notifyType, this));\n\n $dialog.on('change', '[data-role=visibility-trigger]', $.proxy(function (e) {\n var imageData = $dialog.data('imageData');\n\n this.element.trigger('updateVisibility', {\n disabled: $(e.currentTarget).is(':checked'),\n imageData: imageData\n });\n }, this));\n\n $dialog.on('change', '[data-role=\"image-description\"]', function (e) {\n var target = $(e.target),\n targetName = target.attr('name'),\n desc = target.val(),\n imageData = $dialog.data('imageData');\n\n this.element.find('input[type=\"hidden\"][name=\"' + targetName + '\"]').val(desc);\n\n imageData.label = desc;\n imageData['label_default'] = desc;\n\n this.element.trigger('updateImageTitle', {\n imageData: imageData\n });\n }.bind(this));\n\n this.$dialog = $dialog;\n },\n\n /**\n * @param {Object} imageData\n * @private\n */\n _showDialog: function (imageData) {\n var $imageContainer = this.findElement(imageData),\n $template;\n\n $template = this.dialogTmpl({\n 'data': imageData\n });\n\n this.$dialog\n .html($template)\n .data('imageData', imageData)\n .data('imageContainer', $imageContainer)\n .modal('openModal');\n },\n\n /**\n * Handles dialog open event.\n *\n * @param {EventObject} event\n */\n onDialogOpen: function (event) {\n var imageData = this.$dialog.data('imageData'),\n imageSizeKb = imageData.sizeLabel,\n image = document.createElement('img'),\n sizeSpan = this.$dialog.find(this.options.imageSizeLabel)\n .find('[data-message]'),\n resolutionSpan = this.$dialog.find(this.options.imageResolutionLabel)\n .find('[data-message]'),\n sizeText = sizeSpan.attr('data-message').replace('{size}', imageSizeKb),\n resolutionText;\n\n image.src = imageData.url;\n\n resolutionText = resolutionSpan\n .attr('data-message')\n .replace('{width}^{height}', image.width + 'x' + image.height);\n\n sizeSpan.text(sizeText);\n resolutionSpan.text(resolutionText);\n\n $(event.target)\n .find('[data-role=type-selector]')\n .each($.proxy(function (index, checkbox) {\n var $checkbox = $(checkbox),\n parent = $checkbox.closest('.item'),\n selectedClass = 'selected',\n isChecked = this.options.types[$checkbox.val()].value == imageData.file; //eslint-disable-line\n\n $checkbox.prop(\n 'checked',\n isChecked\n );\n parent.toggleClass(selectedClass, isChecked);\n }, this));\n },\n\n /**\n *\n * Click by image handler\n *\n * @param {jQuery.Event} e\n * @param {Object} imageData\n * @private\n */\n _onOpenDialog: function (e, imageData) {\n if (imageData['media_type'] && imageData['media_type'] != 'image') { //eslint-disable-line eqeqeq\n return;\n }\n this._showDialog(imageData);\n },\n\n /**\n * Change visibility\n *\n * @param {jQuery.Event} event\n * * @param {Object} data\n * @private\n */\n _updateVisibility: function (event, data) {\n var imageData = data.imageData,\n disabled = +data.disabled,\n $imageContainer = this.findElement(imageData);\n\n !!disabled ? //eslint-disable-line no-extra-boolean-cast\n $imageContainer.addClass('hidden-for-front') :\n $imageContainer.removeClass('hidden-for-front');\n\n $imageContainer.find('[name*=\"disabled\"]').val(disabled);\n imageData.disabled = disabled;\n\n this._contentUpdated();\n },\n\n /**\n * Set image\n * @param {jQuery.Event} event\n * @private\n */\n _notifyType: function (event) {\n var $checkbox = $(event.currentTarget),\n $imageContainer = $checkbox.closest('[data-role=dialog]').data('imageContainer');\n\n this.element.trigger('setImageType', {\n type: $checkbox.val(),\n imageData: $checkbox.is(':checked') ? $imageContainer.data('imageData') : null\n });\n\n this._updateImagesRoles();\n }\n });\n\n return $.mage.productGallery;\n});\n","Magento_Catalog/js/price-box.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'Magento_Catalog/js/price-utils',\n 'underscore',\n 'mage/template',\n 'jquery-ui-modules/widget'\n], function ($, utils, _, mageTemplate) {\n 'use strict';\n\n var globalOptions = {\n productId: null,\n priceConfig: null,\n prices: {},\n priceTemplate: '<span class=\"price\"><%- data.formatted %></span>'\n };\n\n $.widget('mage.priceBox', {\n options: globalOptions,\n qtyInfo: '#qty',\n\n /**\n * Widget initialisation.\n * Every time when option changed prices also can be changed. So\n * changed options.prices -> changed cached prices -> recalculation -> redraw price box\n */\n _init: function initPriceBox() {\n var box = this.element;\n\n box.trigger('updatePrice');\n this.cache.displayPrices = utils.deepClone(this.options.prices);\n },\n\n /**\n * Widget creating.\n */\n _create: function createPriceBox() {\n var box = this.element;\n\n this.cache = {};\n this._setDefaultsFromPriceConfig();\n this._setDefaultsFromDataSet();\n\n box.on('reloadPrice', this.reloadPrice.bind(this));\n box.on('updatePrice', this.onUpdatePrice.bind(this));\n $(this.qtyInfo).on('input', this.updateProductTierPrice.bind(this));\n box.trigger('price-box-initialized');\n },\n\n /**\n * Call on event updatePrice. Proxy to updatePrice method.\n * @param {Event} event\n * @param {Object} prices\n */\n onUpdatePrice: function onUpdatePrice(event, prices) {\n return this.updatePrice(prices);\n },\n\n /**\n * Updates price via new (or additional values).\n * It expects object like this:\n * -----\n * \"option-hash\":\n * \"price-code\":\n * \"amount\": 999.99999,\n * ...\n * -----\n * Empty option-hash object or empty price-code object treats as zero amount.\n * @param {Object} newPrices\n */\n updatePrice: function updatePrice(newPrices) {\n var prices = this.cache.displayPrices,\n additionalPrice = {},\n pricesCode = [],\n priceValue, origin, finalPrice;\n\n this.cache.additionalPriceObject = this.cache.additionalPriceObject || {};\n\n if (newPrices) {\n $.extend(this.cache.additionalPriceObject, newPrices);\n }\n\n if (!_.isEmpty(additionalPrice)) {\n pricesCode = _.keys(additionalPrice);\n } else if (!_.isEmpty(prices)) {\n pricesCode = _.keys(prices);\n }\n\n _.each(this.cache.additionalPriceObject, function (additional) {\n if (additional && !_.isEmpty(additional)) {\n pricesCode = _.keys(additional);\n }\n _.each(pricesCode, function (priceCode) {\n priceValue = additional[priceCode] || {};\n priceValue.amount = +priceValue.amount || 0;\n priceValue.adjustments = priceValue.adjustments || {};\n\n additionalPrice[priceCode] = additionalPrice[priceCode] || {\n 'amount': 0,\n 'adjustments': {}\n };\n additionalPrice[priceCode].amount = 0 + (additionalPrice[priceCode].amount || 0) +\n priceValue.amount;\n _.each(priceValue.adjustments, function (adValue, adCode) {\n additionalPrice[priceCode].adjustments[adCode] = 0 +\n (additionalPrice[priceCode].adjustments[adCode] || 0) + adValue;\n });\n });\n });\n\n if (_.isEmpty(additionalPrice)) {\n this.cache.displayPrices = utils.deepClone(this.options.prices);\n } else {\n _.each(additionalPrice, function (option, priceCode) {\n origin = this.options.prices[priceCode] || {};\n finalPrice = prices[priceCode] || {};\n option.amount = option.amount || 0;\n origin.amount = origin.amount || 0;\n origin.adjustments = origin.adjustments || {};\n finalPrice.adjustments = finalPrice.adjustments || {};\n\n finalPrice.amount = 0 + origin.amount + option.amount;\n _.each(option.adjustments, function (pa, paCode) {\n finalPrice.adjustments[paCode] = 0 + (origin.adjustments[paCode] || 0) + pa;\n });\n }, this);\n }\n\n this.element.trigger('priceUpdated', this.cache.displayPrices);\n this.element.trigger('reloadPrice');\n },\n\n /*eslint-disable no-extra-parens*/\n /**\n * Render price unit block.\n */\n reloadPrice: function reDrawPrices() {\n var priceFormat = (this.options.priceConfig && this.options.priceConfig.priceFormat) || {},\n priceTemplate = mageTemplate(this.options.priceTemplate);\n\n _.each(this.cache.displayPrices, function (price, priceCode) {\n price.final = _.reduce(price.adjustments, function (memo, amount) {\n return memo + amount;\n }, price.amount);\n\n price.formatted = utils.formatPriceLocale(price.final, priceFormat);\n\n $('[data-price-type=\"' + priceCode + '\"]', this.element).html(priceTemplate({\n data: price\n }));\n }, this);\n },\n\n /*eslint-enable no-extra-parens*/\n /**\n * Overwrites initial (default) prices object.\n * @param {Object} prices\n */\n setDefault: function setDefaultPrices(prices) {\n this.cache.displayPrices = utils.deepClone(prices);\n this.options.prices = utils.deepClone(prices);\n },\n\n /**\n * Custom behavior on getting options:\n * now widget able to deep merge of accepted configuration.\n * @param {Object} options\n * @return {mage.priceBox}\n */\n _setOptions: function setOptions(options) {\n $.extend(true, this.options, options);\n\n if ('disabled' in options) {\n this._setOption('disabled', options.disabled);\n }\n\n return this;\n },\n\n /**\n * setDefaultsFromDataSet\n */\n _setDefaultsFromDataSet: function _setDefaultsFromDataSet() {\n var box = this.element,\n priceHolders = $('[data-price-type]', box),\n prices = this.options.prices;\n\n this.options.productId = box.data('productId');\n\n if (_.isEmpty(prices)) {\n priceHolders.each(function (index, element) {\n var type = $(element).data('priceType'),\n amount = parseFloat($(element).data('priceAmount'));\n\n if (type && !_.isNaN(amount)) {\n prices[type] = {\n amount: amount\n };\n }\n });\n }\n },\n\n /**\n * setDefaultsFromPriceConfig\n */\n _setDefaultsFromPriceConfig: function _setDefaultsFromPriceConfig() {\n var config = this.options.priceConfig;\n\n if (config && config.prices) {\n this.options.prices = config.prices;\n }\n },\n\n /**\n * Updates product final and base price according to tier prices\n */\n updateProductTierPrice: function updateProductTierPrice() {\n var originalPrice,\n prices = {'prices': {}};\n\n if (this.options.prices.finalPrice) {\n originalPrice = this.options.prices.finalPrice.amount;\n prices.prices.finalPrice = {'amount': this.getPrice('price') - originalPrice};\n }\n\n if (this.options.prices.basePrice) {\n originalPrice = this.options.prices.basePrice.amount;\n prices.prices.basePrice = {'amount': this.getPrice('basePrice') - originalPrice};\n }\n\n this.updatePrice(prices);\n },\n\n /**\n * Returns price.\n *\n * @param {String} priceKey\n * @returns {Number}\n */\n getPrice: function (priceKey) {\n var productQty = $(this.qtyInfo).val(),\n result,\n tierPriceItem,\n i;\n\n for (i = 0; i < this.options.priceConfig.tierPrices.length; i++) {\n tierPriceItem = this.options.priceConfig.tierPrices[i];\n if (productQty >= tierPriceItem.qty && tierPriceItem[priceKey]) {\n result = tierPriceItem[priceKey];\n }\n }\n\n return result;\n }\n });\n\n return $.mage.priceBox;\n});\n","Magento_Catalog/js/price-option-file.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'jquery-ui-modules/widget'\n], function ($) {\n 'use strict';\n\n $.widget('mage.priceOptionFile', {\n options: {\n fileName: '',\n fileNamed: '',\n fieldNameAction: '',\n changeFileSelector: '',\n deleteFileSelector: ''\n },\n\n /**\n * Creates instance of widget\n * @private\n */\n _create: function () {\n this.fileDeleteFlag = this.fileChangeFlag = false;\n this.inputField = this.element.find('input[name=' + this.options.fileName + ']')[0];\n this.inputFieldAction = this.element.find('input[name=' + this.options.fieldNameAction + ']')[0];\n this.fileNameSpan = this.element.parent('dd').find('.' + this.options.fileNamed);\n\n $(this.options.changeFileSelector).on('click', $.proxy(function () {\n this._toggleFileChange();\n }, this));\n $(this.options.deleteFileSelector).on('click', $.proxy(function () {\n this._toggleFileDelete();\n }, this));\n },\n\n /**\n * Toggles whether the current file is being changed or not. If the file is being deleted\n * then the option to change the file is disabled.\n * @private\n */\n _toggleFileChange: function () {\n this.element.toggle();\n this.fileChangeFlag = !this.fileChangeFlag;\n\n if (!this.fileDeleteFlag) {\n $(this.inputFieldAction).attr('value', this.fileChangeFlag ? 'save_new' : 'save_old');\n this.inputField.disabled = !this.fileChangeFlag;\n }\n },\n\n /**\n * Toggles whether the file is to be deleted. When the file is being deleted, the name of\n * the file is decorated with strike-through text and the option to change the file is\n * disabled.\n * @private\n */\n _toggleFileDelete: function () {\n this.fileDeleteFlag = $(this.options.deleteFileSelector + ':checked').val();\n $(this.inputFieldAction).attr('value',\n this.fileDeleteFlag ? '' : this.fileChangeFlag ? 'save_new' : 'save_old');\n this.inputField.disabled = this.fileDeleteFlag || !this.fileChangeFlag;\n this.fileNameSpan.css('text-decoration', this.fileDeleteFlag ? 'line-through' : 'none');\n }\n });\n\n return $.mage.priceOptionFile;\n});\n","Magento_Catalog/js/custom-options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/template',\n 'Magento_Ui/js/modal/alert',\n 'jquery/ui',\n 'useDefault',\n 'collapsable',\n 'mage/translate',\n 'mage/backend/validation',\n 'Magento_Ui/js/modal/modal'\n], function ($, mageTemplate, alert) {\n 'use strict';\n\n $.widget('mage.customOptions', {\n options: {\n selectionItemCount: {}\n },\n\n /** @inheritdoc */\n _create: function () {\n this.baseTmpl = mageTemplate('#custom-option-base-template');\n this.rowTmpl = mageTemplate('#custom-option-select-type-row-template');\n\n this._initOptionBoxes();\n this._initSortableSelections();\n this._bindCheckboxHandlers();\n this._bindReadOnlyMode();\n this._addValidation();\n },\n\n /**\n * @private\n */\n _addValidation: function () {\n $.validator.addMethod(\n 'required-option-select', function (value) {\n return value !== '';\n }, $.mage.__('Select type of option.'));\n\n $.validator.addMethod(\n 'required-option-select-type-rows', function (value, element) {\n var optionContainerElm = element.up('div[id*=_type_]'),\n selectTypesFlag = false,\n selectTypeElements = $('#' + optionContainerElm.id + ' .select-type-title');\n\n selectTypeElements.each(function () {\n if (!$(this).closest('tr').hasClass('ignore-validate')) {\n selectTypesFlag = true;\n }\n });\n\n return selectTypesFlag;\n }, $.mage.__('Please add rows to option.'));\n },\n\n /**\n * @private\n */\n _initOptionBoxes: function () {\n var syncOptionTitle;\n\n if (!this.options.isReadonly) {\n this.element.sortable({\n axis: 'y',\n handle: '[data-role=draggable-handle]',\n items: '#product_options_container_top > div',\n update: this._updateOptionBoxPositions,\n tolerance: 'pointer'\n });\n }\n\n /**\n * @param {jQuery.Event} event\n */\n syncOptionTitle = function (event) {\n var currentValue = $(event.target).val(),\n optionBoxTitle = $(\n '.admin__collapsible-title > span',\n $(event.target).closest('.fieldset-wrapper')\n ),\n newOptionTitle = $.mage.__('New Option');\n\n optionBoxTitle.text(currentValue === '' ? newOptionTitle : currentValue);\n };\n this._on({\n /**\n * Reset field value to Default\n */\n 'click .use-default-label': function (event) {\n $(event.target).closest('label').find('input').prop('checked', true).trigger('change');\n },\n\n /**\n * Remove custom option or option row for 'select' type of custom option\n */\n 'click button[id^=product_option_][id$=_delete]': function (event) {\n var element = $(event.target).closest('#product_options_container_top > div.fieldset-wrapper,tr');\n\n if (element.length) {\n $('#product_' + element.attr('id').replace('product_', '') + '_is_delete').val(1);\n element.addClass('ignore-validate').hide();\n this.refreshSortableElements();\n }\n },\n\n /**\n * Minimize custom option block\n */\n 'click #product_options_container_top [data-target$=-content]': function () {\n if (this.options.isReadonly) {\n return false;\n }\n },\n\n /**\n * Add new custom option\n */\n 'click #add_new_defined_option': function (event) {\n this.addOption(event);\n },\n\n /**\n * Add new option row for 'select' type of custom option\n */\n 'click button[id^=product_option_][id$=_add_select_row]': function (event) {\n this.addSelection(event);\n },\n\n /**\n * Import custom options from products\n */\n 'click #import_new_defined_option': function () {\n var importContainer = $('#import-container'),\n widget = this;\n\n importContainer.modal({\n title: $.mage.__('Select Product'),\n type: 'slide',\n\n /** @inheritdoc */\n opened: function () {\n $(document).off().on('click', '#productGrid_massaction-form button', function () {\n $('.import-custom-options-apply-button').trigger('click', 'massActionTrigger');\n });\n },\n buttons: [{\n text: $.mage.__('Import'),\n attr: {\n id: 'import-custom-options-apply-button'\n },\n 'class': 'action-primary action-import import-custom-options-apply-button',\n\n /** @inheritdoc */\n click: function (event, massActionTrigger) {\n var request = [];\n\n $(this.element).find('input[name=product]:checked').map(function () {\n request.push(this.value);\n });\n\n if (request.length === 0) {\n if (!massActionTrigger) {\n alert({\n content: $.mage.__('An item needs to be selected. Select and try again.')\n });\n }\n\n return;\n }\n\n $.post(widget.options.customOptionsUrl, {\n 'products[]': request,\n 'form_key': widget.options.formKey\n }, function ($data) {\n $.each(JSON.parse($data), function (el) {\n var i;\n\n el.id = widget.getFreeOptionId(el.id);\n el['option_id'] = el.id;\n\n if (typeof el.optionValues !== 'undefined') {\n for (i = 0; i < el.optionValues.length; i++) {\n el.optionValues[i]['option_id'] = el.id;\n }\n }\n //Adding option\n widget.addOption(el);\n //Will save new option on server side\n $('#product_option_' + el.id + '_option_id').val(0);\n $('#option_' + el.id + ' input[name$=\"option_type_id]\"]').val(-1);\n });\n importContainer.modal('closeModal');\n });\n }\n }]\n });\n importContainer.load(\n this.options.productGridUrl,\n {\n 'form_key': this.options.formKey,\n 'current_product_id': this.options.currentProductId\n },\n function () {\n importContainer.modal('openModal');\n }\n );\n },\n\n /**\n * Change custom option type\n */\n 'change select[id^=product_option_][id$=_type]': function (event, data) {\n var widget = this,\n currentElement = $(event.target),\n parentId = '#' + currentElement.closest('.fieldset-alt').attr('id'),\n group = currentElement.find('[value=\"' + currentElement.val() + '\"]')\n .closest('optgroup').attr('data-optgroup-name'),\n previousGroup = $(parentId + '_previous_group').val(),\n previousBlock = $(parentId + '_type_' + previousGroup),\n tmpl, disabledBlock, priceType;\n\n data = data || {};\n\n if (typeof group !== 'undefined') {\n group = group.toLowerCase();\n }\n\n if (previousGroup !== group) {\n if (previousBlock.length) {\n previousBlock.addClass('ignore-validate').hide();\n }\n $(parentId + '_previous_group').val(group);\n\n if (typeof group === 'undefined') {\n return;\n }\n disabledBlock = $(parentId).find(parentId + '_type_' + group);\n\n if (disabledBlock.length) {\n disabledBlock.removeClass('ignore-validate').show();\n } else {\n if ($.isEmptyObject(data)) { //eslint-disable-line max-depth\n data['option_id'] = $(parentId + '_id').val();\n data.price = data.sku = '';\n }\n data.group = group;\n\n tmpl = widget.element.find('#custom-option-' + group + '-type-template').html();\n tmpl = mageTemplate(tmpl, {\n data: data\n });\n\n $(tmpl).insertAfter($(parentId));\n\n if (data['price_type']) { //eslint-disable-line max-depth\n priceType = $('#' + widget.options.fieldId + '_' + data['option_id'] + '_price_type');\n priceType.val(data['price_type']).attr('data-store-label', data['price_type']);\n }\n this._bindUseDefault(widget.options.fieldId + '_' + data['option_id'], data);\n //Add selections\n\n if (data.optionValues) { //eslint-disable-line max-depth\n data.optionValues.each(function (value) {\n widget.addSelection(value);\n });\n }\n }\n }\n },\n //Sync title\n 'change .field-option-title > .control > input[id$=\"_title\"]': syncOptionTitle,\n 'keyup .field-option-title > .control > input[id$=\"_title\"]': syncOptionTitle,\n 'paste .field-option-title > .control > input[id$=\"_title\"]': syncOptionTitle\n });\n },\n\n /**\n * @private\n */\n _initSortableSelections: function () {\n if (!this.options.isReadonly) {\n this.element.find('[id^=product_option_][id$=_type_select] tbody').sortable({\n axis: 'y',\n handle: '[data-role=draggable-handle]',\n\n /** @inheritdoc */\n helper: function (event, ui) {\n ui.children().each(function () {\n $(this).width($(this).width());\n });\n\n return ui;\n },\n update: this._updateSelectionsPositions,\n tolerance: 'pointer'\n });\n }\n },\n\n /**\n * Sync sort order checkbox with hidden dropdown\n */\n _bindCheckboxHandlers: function () {\n this._on({\n /**\n * @param {jQuery.Event} event\n */\n 'change [id^=product_option_][id$=_required]': function (event) {\n var $this = $(event.target);\n\n $this.closest('#product_options_container_top > div')\n .find('[name$=\"[is_require]\"]').val($this.is(':checked') ? 1 : 0);\n }\n });\n this.element.find('[id^=product_option_][id$=_required]').each(function () {\n $(this).prop('checked', $(this).closest('#product_options_container_top > div')\n .find('[name$=\"[is_require]\"]').val() > 0);\n });\n },\n\n /**\n * Update Custom option position\n */\n _updateOptionBoxPositions: function () {\n $(this).find('div[id^=option_]:not(.ignore-validate) .fieldset-alt > [name$=\"[sort_order]\"]').each(\n function (index) {\n $(this).val(index);\n });\n },\n\n /**\n * Update selections positions for 'select' type of custom option\n */\n _updateSelectionsPositions: function () {\n $(this).find('tr:not(.ignore-validate) [name$=\"[sort_order]\"]').each(function (index) {\n $(this).val(index);\n });\n },\n\n /**\n * Disable input data if \"Read Only\"\n */\n _bindReadOnlyMode: function () {\n if (this.options.isReadonly) {\n $('div.product-custom-options').find('button,input,select,textarea').each(function () {\n $(this).prop('disabled', true);\n\n if ($(this).is('button')) {\n $(this).addClass('disabled');\n }\n });\n }\n },\n\n /**\n * @param {String} id\n * @param {Object} data\n * @private\n */\n _bindUseDefault: function (id, data) {\n var title = $('#' + id + '_title'),\n price = $('#' + id + '_price'),\n priceType = $('#' + id + '_price_type');\n\n //enable 'use default' link for title\n if (data.checkboxScopeTitle) {\n title.useDefault({\n field: '.field',\n useDefault: 'label[for$=_title]',\n checkbox: 'input[id$=_title_use_default]',\n label: 'span'\n });\n }\n //enable 'use default' link for price and price_type\n if (data.checkboxScopePrice) {\n price.useDefault({\n field: '.field',\n useDefault: 'label[for$=_price]',\n checkbox: 'input[id$=_price_use_default]',\n label: 'span'\n });\n //not work set default value for second field\n priceType.useDefault({\n field: '.field',\n useDefault: 'label[for$=_price]',\n checkbox: 'input[id$=_price_use_default]',\n label: 'span'\n });\n }\n },\n\n /**\n * Add selection value for 'select' type of custom option\n */\n addSelection: function (event) {\n var data = {},\n element = event.target || event.srcElement || event.currentTarget,\n rowTmpl, priceType;\n\n if (typeof element !== 'undefined') {\n data.id = $(element).closest('#product_options_container_top > div')\n .find('[name^=\"product[options]\"][name$=\"[id]\"]').val();\n data['option_type_id'] = -1;\n\n if (!this.options.selectionItemCount[data.id]) {\n this.options.selectionItemCount[data.id] = 1;\n }\n\n data['select_id'] = this.options.selectionItemCount[data.id];\n data.price = data.sku = '';\n } else {\n data = event;\n data.id = data['option_id'];\n data['select_id'] = data['option_type_id'];\n this.options.selectionItemCount[data.id] = data['item_count'];\n }\n\n rowTmpl = this.rowTmpl({\n data: data\n });\n\n $(rowTmpl).appendTo($('#select_option_type_row_' + data.id));\n\n //set selected price_type value if set\n if (data['price_type']) {\n priceType = $('#' + this.options.fieldId + '_' + data.id + '_select_' + data['select_id'] +\n '_price_type');\n priceType.val(data['price_type']).attr('data-store-label', data['price_type']);\n }\n\n this._bindUseDefault(this.options.fieldId + '_' + data.id + '_select_' + data['select_id'], data);\n this.refreshSortableElements();\n this.options.selectionItemCount[data.id] = parseInt(this.options.selectionItemCount[data.id], 10) + 1;\n\n $('#' + this.options.fieldId + '_' + data.id + '_select_' + data['select_id'] + '_title').trigger('focus');\n },\n\n /**\n * Add custom option\n */\n addOption: function (event) {\n var data = {},\n element = event.target || event.srcElement || event.currentTarget,\n baseTmpl;\n\n if (typeof element !== 'undefined') {\n data.id = this.options.itemCount;\n data.type = '';\n data['option_id'] = 0;\n } else {\n data = event;\n this.options.itemCount = data['item_count'];\n }\n\n baseTmpl = this.baseTmpl({\n data: data\n });\n\n $(baseTmpl)\n .appendTo(this.element.find('#product_options_container_top'))\n .find('.collapse').collapsable();\n\n //set selected type value if set\n if (data.type) {\n $('#' + this.options.fieldId + '_' + data.id + '_type').val(data.type).trigger('change', data);\n }\n\n //set selected is_require value if set\n if (data['is_require']) {\n $('#' + this.options.fieldId + '_' + data.id + '_is_require').val(data['is_require']).trigger('change');\n }\n\n this.refreshSortableElements();\n this._bindCheckboxHandlers();\n this._bindReadOnlyMode();\n this.options.itemCount++;\n $('#' + this.options.fieldId + '_' + data.id + '_title').trigger('change');\n },\n\n /**\n * @return {Object}\n */\n refreshSortableElements: function () {\n if (!this.options.isReadonly) {\n this.element.sortable('refresh');\n this._updateOptionBoxPositions.apply(this.element);\n this._updateSelectionsPositions.apply(this.element);\n this._initSortableSelections();\n }\n\n return this;\n },\n\n /**\n * @param {String} id\n * @return {*}\n */\n getFreeOptionId: function (id) {\n return $('#' + this.options.fieldId + '_' + id).length ? this.getFreeOptionId(parseInt(id, 10) + 1) : id;\n }\n });\n\n});\n","Magento_Catalog/js/price-option-date.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'priceUtils',\n 'priceOptions',\n 'jquery-ui-modules/widget'\n], function ($, utils) {\n 'use strict';\n\n var globalOptions = {\n fromSelector: 'form',\n dropdownsSelector: '[data-role=calendar-dropdown]'\n },\n optionHandler = {};\n\n optionHandler.optionHandlers = {};\n\n /**\n * Custom handler for Date-with-Dropdowns option type.\n * @param {jQuery} siblings\n * @return {Function} function that return object { optionHash : optionAdditionalPrice }\n */\n function onCalendarDropdownChange(siblings) {\n return function (element, optionConfig) {\n var changes = {},\n optionId = utils.findOptionId(element),\n overhead = optionConfig[optionId].prices,\n isNeedToUpdate = true,\n optionHash = 'price-option-calendar-' + optionId;\n\n siblings.each(function (index, el) {\n isNeedToUpdate = isNeedToUpdate && !!$(el).val();\n });\n\n overhead = isNeedToUpdate ? overhead : {};\n changes[optionHash] = overhead;\n\n return changes;\n };\n }\n\n /**\n * Returns number of days for special month and year\n * @param {Number} month\n * @param {Number} year\n * @return {Number}\n */\n function getDaysInMonth(month, year) {\n return new Date(year, month, 0).getDate();\n }\n\n /**\n * Adjusts the number of days in the day option element based on which month or year\n * is selected (changed). Adjusts the days to 28, 29, 30, or 31 typically.\n * @param {jQuery} dropdowns\n */\n function onDateChange(dropdowns) {\n var daysNodes,\n curMonth, curYear, expectedDays,\n options, needed,\n month = dropdowns.filter('[data-calendar-role=month]'),\n year = dropdowns.filter('[data-calendar-role=year]');\n\n if (month.length && year.length) {\n daysNodes = dropdowns.filter('[data-calendar-role=day]').find('option');\n\n curMonth = month.val() || '01';\n curYear = year.val() || '2000';\n expectedDays = getDaysInMonth(curMonth, curYear);\n\n if (daysNodes.length - 1 > expectedDays) { // remove unnecessary option nodes\n daysNodes.each(function (i, e) {\n if (e.value > expectedDays) {\n $(e).remove();\n }\n });\n } else if (daysNodes.length - 1 < expectedDays) { // add missing option nodes\n options = [];\n needed = expectedDays - daysNodes.length + 1;\n\n while (needed--) { //eslint-disable-line max-depth\n options.push(\n '<option value=\"' + (expectedDays - needed) + '\">' + (expectedDays - needed) + '</option>'\n );\n }\n $(options.join('')).insertAfter(daysNodes.last());\n }\n }\n }\n\n $.widget('mage.priceOptionDate', {\n options: globalOptions,\n\n /**\n * Function-initializer of priceOptionDate widget\n * @private\n */\n _create: function initOptionDate() {\n var field = this.element,\n form = field.closest(this.options.fromSelector),\n dropdowns = $(this.options.dropdownsSelector, field),\n dateOptionId;\n\n if (dropdowns.length) {\n dateOptionId = this.options.dropdownsSelector + dropdowns.attr('name');\n\n optionHandler.optionHandlers[dateOptionId] = onCalendarDropdownChange(dropdowns);\n\n form.priceOptions(optionHandler);\n\n dropdowns.data('role', dateOptionId);\n dropdowns.on('change', onDateChange.bind(this, dropdowns));\n }\n }\n });\n\n return $.mage.priceOptionDate;\n});\n","Magento_Catalog/js/category-checkbox-tree.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* global Ext, varienWindowOnload, varienElementMethods */\n\ndefine([\n 'jquery',\n 'prototype',\n 'extjs/ext-tree-checkbox',\n 'mage/adminhtml/form'\n], function (jQuery) {\n 'use strict';\n\n return function (config) {\n var tree,\n options = {\n dataUrl: config.dataUrl,\n divId: config.divId,\n rootVisible: config.rootVisible,\n useAjax: config.useAjax,\n currentNodeId: config.currentNodeId,\n jsFormObject: window[config.jsFormObject],\n name: config.name,\n checked: config.checked,\n allowDrop: config.allowDrop,\n rootId: config.rootId,\n expanded: config.expanded,\n categoryId: config.categoryId,\n treeJson: config.treeJson\n },\n data = {},\n parameters = {},\n root = {},\n key = '';\n\n /**\n * Fix ext compatibility with prototype 1.6\n */\n Ext.lib.Event.getTarget = function (e) {\n var ee = e.browserEvent || e;\n\n return ee.target ? Event.element(ee) : null;\n };\n\n /**\n * @param {Object} el\n * @param {Object} nodeConfig\n */\n Ext.tree.TreePanel.Enhanced = function (el, nodeConfig) {\n Ext.tree.TreePanel.Enhanced.superclass.constructor.call(this, el, nodeConfig);\n };\n\n Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {\n /**\n * @param {Object} treeConfig\n * @param {Boolean} firstLoad\n */\n loadTree: function (treeConfig, firstLoad) {\n parameters = treeConfig.parameters,\n data = treeConfig.data,\n root = new Ext.tree.TreeNode(parameters);\n\n if (typeof parameters.rootVisible !== 'undefined') {\n this.rootVisible = parameters.rootVisible * 1;\n }\n\n this.nodeHash = {};\n this.setRootNode(root);\n\n if (firstLoad) {\n this.addListener('click', this.categoryClick.createDelegate(this));\n }\n\n this.loader.buildCategoryTree(root, data);\n this.el.dom.innerHTML = '';\n // render the tree\n this.render();\n },\n\n /**\n * @param {Object} node\n */\n categoryClick: function (node) {\n node.getUI().check(!node.getUI().checked());\n }\n });\n\n jQuery(function () {\n var categoryLoader = new Ext.tree.TreeLoader({\n dataUrl: config.dataUrl\n });\n\n /**\n * @param {Object} response\n * @param {Object} parent\n * @param {Function} callback\n */\n categoryLoader.processResponse = function (response, parent, callback) {\n config = JSON.parse(response.responseText);\n\n this.buildCategoryTree(parent, config);\n\n if (typeof callback === 'function') {\n callback(this, parent);\n }\n };\n\n /**\n * @param {Object} nodeConfig\n * @returns {Object}\n */\n categoryLoader.createNode = function (nodeConfig) {\n var node;\n\n nodeConfig.uiProvider = Ext.tree.CheckboxNodeUI;\n\n if (nodeConfig.children && !nodeConfig.children.length) {\n delete nodeConfig.children;\n node = new Ext.tree.AsyncTreeNode(nodeConfig);\n } else {\n node = new Ext.tree.TreeNode(nodeConfig);\n }\n\n return node;\n };\n\n /**\n * @param {Object} parent\n * @param {Object} nodeConfig\n * @param {Integer} i\n */\n categoryLoader.processCategoryTree = function (parent, nodeConfig, i) {\n var node,\n _node = {};\n\n nodeConfig[i].uiProvider = Ext.tree.CheckboxNodeUI;\n\n _node = Object.clone(nodeConfig[i]);\n\n if (_node.children && !_node.children.length) {\n delete _node.children;\n node = new Ext.tree.AsyncTreeNode(_node);\n } else {\n node = new Ext.tree.TreeNode(nodeConfig[i]);\n }\n parent.appendChild(node);\n node.loader = node.getOwnerTree().loader;\n\n if (_node.children) {\n categoryLoader.buildCategoryTree(node, _node.children);\n }\n };\n\n /**\n * @param {Object} parent\n * @param {Object} nodeConfig\n * @returns {void}\n */\n categoryLoader.buildCategoryTree = function (parent, nodeConfig) {\n var i = 0;\n\n if (!nodeConfig) {\n return null;\n }\n\n if (parent && nodeConfig && nodeConfig.length) {\n for (i; i < nodeConfig.length; i++) {\n categoryLoader.processCategoryTree(parent, nodeConfig, i);\n }\n }\n };\n\n /**\n *\n * @param {Object} hash\n * @param {Object} node\n * @returns {Object}\n */\n categoryLoader.buildHashChildren = function (hash, node) {\n var i = 0,\n len;\n\n if (node.childNodes.length > 0 || node.loaded === false && node.loading === false) {\n hash.children = [];\n\n for (i, len = node.childNodes.length; i < len; i++) {\n hash.children = hash.children ? hash.children : [];\n hash.children.push(this.buildHash(node.childNodes[i]));\n }\n }\n\n return hash;\n };\n\n /**\n * @param {Object} node\n * @returns {Object}\n */\n categoryLoader.buildHash = function (node) {\n var hash = {};\n\n hash = this.toArray(node.attributes);\n\n return categoryLoader.buildHashChildren(hash, node);\n };\n\n /**\n * @param {Object} attributes\n * @returns {Object}\n */\n categoryLoader.toArray = function (attributes) {\n data = {};\n\n for (key in attributes) {\n\n if (attributes[key]) {\n data[key] = attributes[key];\n }\n }\n\n return data;\n };\n\n categoryLoader.on('beforeload', function (treeLoader, node) {\n treeLoader.baseParams.id = node.attributes.id;\n treeLoader.baseParams.selected = options.jsFormObject.updateElement.value;\n });\n\n categoryLoader.on('load', function () {\n varienWindowOnload();\n });\n\n tree = new Ext.tree.TreePanel.Enhanced(options.divId, {\n animate: false,\n loader: categoryLoader,\n enableDD: false,\n containerScroll: true,\n selModel: new Ext.tree.CheckNodeMultiSelectionModel(),\n rootVisible: options.rootVisible,\n useAjax: options.useAjax,\n currentNodeId: options.currentNodeId,\n addNodeTo: false,\n rootUIProvider: Ext.tree.CheckboxNodeUI\n });\n\n tree.on('check', function (node) {\n options.jsFormObject.updateElement.value = this.getChecked().join(', ');\n varienElementMethods.setHasChanges(node.getUI().checkbox);\n }, tree);\n\n // set the root node\n //jscs:disable requireCamelCaseOrUpperCaseIdentifiers\n parameters = {\n text: options.name,\n draggable: false,\n checked: options.checked,\n uiProvider: Ext.tree.CheckboxNodeUI,\n allowDrop: options.allowDrop,\n id: options.rootId,\n expanded: options.expanded,\n category_id: options.categoryId\n };\n //jscs:enable requireCamelCaseOrUpperCaseIdentifiers\n\n tree.loadTree({\n parameters: parameters, data: options.treeJson\n }, true);\n });\n };\n});\n","Magento_Catalog/js/options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* eslint-disable no-undef */\n// jscs:disable jsDoc\n\ndefine([\n 'jquery',\n 'mage/template',\n 'uiRegistry',\n 'jquery/ui',\n 'prototype',\n 'form',\n 'validation',\n 'mage/translate'\n], function (jQuery, mageTemplate, rg) {\n 'use strict';\n\n return function (config) {\n var optionPanel = jQuery('#manage-options-panel'),\n editForm = jQuery('#edit_form'),\n attributeOption = {\n table: $('attribute-options-table'),\n itemCount: 0,\n totalItems: 0,\n rendered: 0,\n template: mageTemplate('#row-template'),\n newOptionClass: 'new-option',\n isReadOnly: config.isReadOnly,\n add: function (data, render) {\n var isNewOption = false,\n element;\n\n if (typeof data.id == 'undefined') {\n data = {\n 'id': 'option_' + this.itemCount,\n 'sort_order': this.itemCount + 1,\n 'rowClasses': this.newOptionClass\n };\n isNewOption = true;\n }\n\n if (!data.intype) {\n data.intype = this.getOptionInputType();\n }\n\n element = this.template({\n data: data\n });\n\n if (isNewOption && !this.isReadOnly) {\n this.enableNewOptionDeleteButton(data.id);\n }\n this.itemCount++;\n this.totalItems++;\n this.elements += element;\n\n if (render) {\n this.render();\n this.updateItemsCountField();\n }\n },\n remove: function (event) {\n var element = $(Event.findElement(event, 'tr')),\n elementFlags; // !!! Button already have table parent in safari\n\n // Safari workaround\n element.ancestors().each(function (parentItem) {\n if (parentItem.hasClassName('option-row')) {\n element = parentItem;\n throw $break;\n } else if (parentItem.hasClassName('box')) {\n throw $break;\n }\n });\n\n if (element) {\n elementFlags = element.getElementsByClassName('delete-flag');\n\n if (elementFlags[0]) {\n elementFlags[0].value = 1;\n }\n\n element.addClassName('no-display');\n element.addClassName('template');\n element.hide();\n this.totalItems--;\n this.updateItemsCountField();\n }\n\n if (element.hasClassName(this.newOptionClass)) {\n element.remove();\n }\n },\n updateItemsCountField: function () {\n $('option-count-check').value = this.totalItems > 0 ? '1' : '';\n },\n enableNewOptionDeleteButton: function (id) {\n $$('#delete_button_container_' + id + ' button').each(function (button) {\n button.enable();\n button.removeClassName('disabled');\n });\n },\n bindRemoveButtons: function () {\n jQuery('#swatch-visual-options-panel').on('click', '.delete-option', this.remove.bind(this));\n },\n render: function () {\n Element.insert($$('[data-role=options-container]')[0], this.elements);\n this.elements = '';\n },\n renderWithDelay: function (data, from, step, delay) {\n var arrayLength = data.length,\n len;\n\n for (len = from + step; from < len && from < arrayLength; from++) {\n this.add(data[from]);\n }\n this.render();\n\n if (from === arrayLength) {\n this.updateItemsCountField();\n this.rendered = 1;\n jQuery('body').trigger('processStop');\n\n return true;\n }\n setTimeout(this.renderWithDelay.bind(this, data, from, step, delay), delay);\n },\n ignoreValidate: function () {\n var ignore = '.ignore-validate input, ' +\n '.ignore-validate select, ' +\n '.ignore-validate textarea';\n\n jQuery('#edit_form').data('validator').settings.forceIgnore = ignore;\n },\n getOptionInputType: function () {\n var optionDefaultInputType = 'radio';\n\n if ($('frontend_input') && $('frontend_input').value === 'multiselect') {\n optionDefaultInputType = 'checkbox';\n }\n\n return optionDefaultInputType;\n }\n },\n tableBody = jQuery(),\n activePanelClass = 'selected-type-options';\n\n if ($('add_new_option_button')) {\n Event.observe('add_new_option_button', 'click', attributeOption.add.bind(attributeOption, {}, true));\n }\n $('manage-options-panel').on('click', '.delete-option', function (event) {\n attributeOption.remove(event);\n });\n\n optionPanel.on('render', function () {\n attributeOption.ignoreValidate();\n\n if (attributeOption.rendered) {\n return false;\n }\n jQuery('body').trigger('processStart');\n attributeOption.renderWithDelay(config.attributesData, 0, 100, 300);\n attributeOption.bindRemoveButtons();\n });\n\n if (config.isSortable) {\n jQuery(function ($) {\n $('[data-role=options-container]').sortable({\n distance: 8,\n tolerance: 'pointer',\n cancel: 'input, button',\n axis: 'y',\n update: function () {\n $('[data-role=options-container] [data-role=order]').each(function (index, element) {\n $(element).val(index + 1);\n });\n }\n });\n });\n }\n editForm.on('beforeSubmit', function () {\n var optionContainer = optionPanel.find('table tbody'),\n optionsValues;\n\n if (optionPanel.hasClass(activePanelClass)) {\n optionsValues = jQuery.map(\n optionContainer.find('tr'),\n function (row) {\n return jQuery(row).find('input, select, textarea').serialize();\n }\n );\n jQuery('<input>')\n .attr({\n type: 'hidden',\n name: 'serialized_options'\n })\n .val(JSON.stringify(optionsValues))\n .prependTo(editForm);\n }\n tableBody = optionContainer.detach();\n });\n editForm.on('afterValidate.error highlight.validate', function () {\n if (optionPanel.hasClass(activePanelClass)) {\n optionPanel.find('table').append(tableBody);\n jQuery('input[name=\"serialized_options\"]').remove();\n }\n });\n window.attributeOption = attributeOption;\n window.optionDefaultInputType = attributeOption.getOptionInputType();\n\n rg.set('manage-options-panel', attributeOption);\n };\n});\n","Magento_Catalog/js/new-category-dialog.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @deprecated since version 2.2.0\n */\n/*global FORM_KEY*/\ndefine([\n 'jquery',\n 'jquery/ui',\n 'Magento_Ui/js/modal/modal',\n 'mage/translate',\n 'mage/backend/tree-suggest',\n 'mage/backend/validation'\n], function ($) {\n 'use strict';\n\n /** Clear parent category. */\n var clearParentCategory = function () {\n $('#new_category_parent').find('option').each(function () {\n $('#new_category_parent-suggest').treeSuggest('removeOption', null, this);\n });\n };\n\n $.widget('mage.newCategoryDialog', {\n /** @inheritdoc */\n _create: function () {\n var widget = this,\n newCategoryForm;\n\n $('#new_category_parent').before($('<input>', {\n id: 'new_category_parent-suggest',\n placeholder: $.mage.__('start typing to search category')\n }));\n\n $('#new_category_parent-suggest').treeSuggest(this.options.suggestOptions)\n .on('suggestbeforeselect', function (event) {\n clearParentCategory();\n $(event.target).treeSuggest('close');\n });\n\n $.validator.addMethod('validate-parent-category', function () {\n return $('#new_category_parent').val() || $('#new_category_parent-suggest').val() === '';\n }, $.mage.__('Choose existing category.'));\n newCategoryForm = $('#new_category_form');\n newCategoryForm.mage('validation', {\n /**\n * @param {jQuery} error\n * @param {*} element\n */\n errorPlacement: function (error, element) {\n error.insertAfter(element.is('#new_category_parent') ?\n $('#new_category_parent-suggest').closest('.mage-suggest') :\n element);\n }\n }).on('highlight.validate', function (e) {\n var options = $(this).validation('option');\n\n if ($(e.target).is('#new_category_parent')) {\n options.highlight($('#new_category_parent-suggest').get(0),\n options.errorClass, options.validClass || '');\n }\n });\n this.element.modal({\n type: 'slide',\n modalClass: 'mage-new-category-dialog form-inline',\n title: $.mage.__('Create Category'),\n\n /** @inheritdoc */\n opened: function () {\n var enteredName = $('#category_ids-suggest').val();\n\n $('#new_category_name').val(enteredName);\n\n if (enteredName === '') {\n $('#new_category_name').trigger('focus');\n }\n $('#new_category_messages').html('');\n },\n\n /** @inheritdoc */\n closed: function () {\n var validationOptions = newCategoryForm.validation('option');\n\n $('#new_category_name, #new_category_parent-suggest').val('');\n validationOptions.unhighlight($('#new_category_parent-suggest').get(0),\n validationOptions.errorClass, validationOptions.validClass || '');\n newCategoryForm.validation('clearError');\n $('#category_ids-suggest').trigger('focus');\n },\n buttons: [{\n text: $.mage.__('Create Category'),\n class: 'action-primary',\n\n /** @inheritdoc */\n click: function (e) {\n var thisButton;\n\n if (!newCategoryForm.valid()) {\n return;\n }\n thisButton = $(e.currentTarget);\n\n thisButton.prop('disabled', true);\n $.ajax({\n type: 'POST',\n url: widget.options.saveCategoryUrl,\n data: {\n name: $('#new_category_name').val(),\n parent: $('#new_category_parent').val(),\n 'is_active': 1,\n 'include_in_menu': 1,\n 'use_config': ['available_sort_by', 'default_sort_by'],\n 'form_key': FORM_KEY,\n 'return_session_messages_only': 1\n },\n dataType: 'json',\n context: $('body')\n }).done(function (data) {\n var $suggest;\n\n if (!data.error) {\n $suggest = $('#category_ids-suggest');\n\n $suggest.trigger('selectItem', {\n id: data.category['entity_id'],\n label: data.category.name\n });\n $('#new_category_name, #new_category_parent-suggest').val('');\n $suggest.val('');\n clearParentCategory();\n $(widget.element).modal('closeModal');\n } else {\n $('#new_category_messages').html(data.messages);\n }\n }).always(\n function () {\n thisButton.prop('disabled', false);\n }\n );\n }\n }]\n });\n }\n });\n\n return $.mage.newCategoryDialog;\n});\n","Magento_Catalog/js/bundle-proxy-button.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n * @deprecated since version 2.2.0\n */\ndefine([\n 'Magento_Ui/js/form/components/button',\n 'uiRegistry',\n 'underscore'\n], function (Button, registry, _) {\n 'use strict';\n\n return Button.extend({\n defaults: {\n currentRecordNamespace: 'bundle_current_record',\n listingDataProvider: '',\n value: [],\n imports: {\n currentRecordName: '${ $.provider }:${ $.currentRecordNamespace }',\n listingData: '${ $.provider }:${ $.listingDataProvider }'\n },\n links: {\n value: '${ $.provider }:${ $.dataScope }'\n },\n listens: {\n listingData: 'setListingData'\n }\n },\n\n /**\n * Initializes component.\n *\n * @returns {Object} Chainable.\n */\n initialize: function () {\n this._super()\n .initSource();\n\n return this;\n },\n\n /**\n * Calls 'initObservable' of parent\n *\n * @returns {Object} Chainable.\n */\n initObservable: function () {\n this._super()\n .observe([\n 'value',\n 'listingData'\n ]);\n\n return this;\n },\n\n /**\n * Calls 'destroy' of parent and\n * clear listing provider source\n *\n * @returns {Object} Chainable.\n */\n destroy: function () {\n this._super();\n this.source.set(this.listingDataProvider, []);\n\n return this;\n },\n\n /**\n * Call parent \"action\" method\n * and set new data to record and listing.\n *\n * @returns {Object} Chainable.\n */\n\n action: function () {\n this._super();\n this.source.set(this.currentRecordNamespace, this.name);\n this.source.set(this.listingDataProvider, this.value());\n\n return this;\n },\n\n /**\n * Init current source.\n *\n * @returns {Object} Chainable.\n */\n initSource: function () {\n if (!_.isFunction(this.source)) {\n this.source = registry.get(this.provider);\n }\n\n return this;\n },\n\n /**\n * Set data to listing source.\n *\n * @returns {Object} Chainable.\n */\n setListingData: function (data) {\n if (this.name === this.currentRecordName) {\n this.source.set(this.dataScope, data);\n }\n\n return this;\n }\n });\n});\n","Magento_Catalog/js/custom-options-type.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'underscore',\n 'uiRegistry',\n 'Magento_Ui/js/form/element/ui-select'\n], function ($, _, registry, UiSelect) {\n 'use strict';\n\n return UiSelect.extend({\n defaults: {\n previousGroup: null,\n groupsConfig: {},\n valuesMap: {},\n indexesMap: {},\n filterPlaceholder: 'ns = ${ $.ns }, parentScope = ${ $.parentScope }'\n },\n\n /**\n * Initialize component.\n * @returns {Element}\n */\n initialize: function () {\n return this\n ._super()\n .initMapping()\n .updateComponents(this.initialValue, true);\n },\n\n /**\n * Create additional mappings.\n *\n * @returns {Element}\n */\n initMapping: function () {\n _.each(this.groupsConfig, function (groupData, group) {\n _.each(groupData.values, function (value) {\n this.valuesMap[value] = group;\n }, this);\n\n _.each(groupData.indexes, function (index) {\n if (!this.indexesMap[index]) {\n this.indexesMap[index] = [];\n }\n\n this.indexesMap[index].push(group);\n }, this);\n }, this);\n\n return this;\n },\n\n /**\n * Callback that fires when 'value' property is updated.\n *\n * @param {String} currentValue\n * @returns {*}\n */\n onUpdate: function (currentValue) {\n this.updateComponents(currentValue);\n\n return this._super();\n },\n\n /**\n * Show, hide or clear components based on the current type value.\n *\n * @param {String} currentValue\n * @param {Boolean} isInitialization\n * @returns {Element}\n */\n updateComponents: function (currentValue, isInitialization) {\n var currentGroup = this.valuesMap[currentValue];\n\n if (currentGroup !== this.previousGroup) {\n _.each(this.indexesMap, function (groups, index) {\n var template = this.filterPlaceholder + ', index = ' + index,\n visible = groups.indexOf(currentGroup) !== -1,\n component;\n\n switch (index) {\n case 'container_type_static':\n case 'values':\n template = 'ns=' + this.ns +\n ', dataScope=' + this.parentScope +\n ', index=' + index;\n break;\n }\n\n /*eslint-disable max-depth */\n if (isInitialization) {\n registry.async(template)(\n function (currentComponent) {\n currentComponent.visible(visible);\n }\n );\n } else {\n component = registry.get(template);\n\n if (component) {\n component.visible(visible);\n }\n }\n }, this);\n\n this.previousGroup = currentGroup;\n }\n\n return this;\n }\n });\n});\n","Magento_Catalog/js/category-tree.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'jquery/ui',\n 'jquery/jstree/jquery.jstree'\n], function ($) {\n 'use strict';\n\n $.widget('mage.categoryTree', {\n options: {\n url: '',\n data: [],\n tree: {\n core: {\n themes: {\n dots: false\n }\n }\n }\n },\n\n /** @inheritdoc */\n _create: function () {\n var options = this.options,\n treeOptions = $.extend(\n true,\n {},\n options.tree,\n {\n core: {\n data: this._convertData(this.options.data).children\n }\n }\n );\n\n this.element.jstree(treeOptions);\n this.element.on('select_node.jstree', $.proxy(this._selectNode, this));\n },\n\n /**\n * @param {jQuery.Event} event\n * @param {Object} data\n * @private\n */\n _selectNode: function (event, data) {\n var node = data.node;\n\n if (!node.state.disabled) {\n window.location = window.location + '/' + node.id;\n } else {\n event.preventDefault();\n }\n },\n\n /**\n * @param {Array} nodes\n * @returns {Array}\n * @private\n */\n _convertDataNodes: function (nodes) {\n var nodesData = [];\n\n nodes.children.forEach(function (node) {\n nodesData.push(this._convertData(node));\n }, this);\n\n return nodesData;\n },\n\n /**\n * @param {Object} node\n * @return {*}\n * @private\n */\n _convertData: function (node) {\n var self = this,\n result;\n\n if (!node) {\n return result;\n }\n // jscs:disable requireCamelCaseOrUpperCaseIdentifiers\n result = {\n id: node.id,\n text: node.name + ' (' + node.product_count + ')',\n li_attr: {\n class: node.cls + (!!node.disabled ? ' disabled' : '') //eslint-disable-line no-extra-boolean-cast\n },\n state: {\n disabled: node.disabled,\n opened: !!node.children_count && node.expanded\n }\n };\n // jscs:enable requireCamelCaseOrUpperCaseIdentifiers\n if (node.children) {\n result.children = [];\n $.each(node.children, function () {\n result.children.push(self._convertData(this));\n });\n }\n\n return result;\n }\n });\n\n return $.mage.categoryTree;\n});\n","Magento_Catalog/js/price-options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'underscore',\n 'mage/template',\n 'priceUtils',\n 'priceBox',\n 'jquery-ui-modules/widget'\n], function ($, _, mageTemplate, utils) {\n 'use strict';\n\n var globalOptions = {\n productId: null,\n priceHolderSelector: '.price-box', //data-role=\"priceBox\"\n optionsSelector: '.product-custom-option',\n optionConfig: {},\n optionHandlers: {},\n optionTemplate: '<%= data.label %>' +\n '<% if (data.finalPrice.value > 0) { %>' +\n ' +<%- data.finalPrice.formatted %>' +\n '<% } else if (data.finalPrice.value < 0) { %>' +\n ' <%- data.finalPrice.formatted %>' +\n '<% } %>',\n controlContainer: 'dd'\n };\n\n /**\n * Custom option preprocessor\n * @param {jQuery} element\n * @param {Object} optionsConfig - part of config\n * @return {Object}\n */\n function defaultGetOptionValue(element, optionsConfig) {\n var changes = {},\n optionValue = element.val(),\n optionId = utils.findOptionId(element[0]),\n optionName = element.prop('name'),\n optionType = element.prop('type'),\n optionConfig = optionsConfig[optionId],\n optionHash = optionName;\n\n switch (optionType) {\n case 'text':\n case 'textarea':\n changes[optionHash] = optionValue ? optionConfig.prices : {};\n break;\n\n case 'radio':\n if (element.is(':checked')) {\n changes[optionHash] = optionConfig[optionValue] && optionConfig[optionValue].prices || {};\n }\n break;\n\n case 'select-one':\n changes[optionHash] = optionConfig[optionValue] && optionConfig[optionValue].prices || {};\n break;\n\n case 'select-multiple':\n _.each(optionConfig, function (row, optionValueCode) {\n optionHash = optionName + '##' + optionValueCode;\n changes[optionHash] = _.contains(optionValue, optionValueCode) ? row.prices : {};\n });\n break;\n\n case 'checkbox':\n optionHash = optionName + '##' + optionValue;\n changes[optionHash] = element.is(':checked') ? optionConfig[optionValue].prices : {};\n break;\n\n case 'file':\n // Checking for 'disable' property equal to checking DOMNode with id*=\"change-\"\n changes[optionHash] = optionValue || element.prop('disabled') ? optionConfig.prices : {};\n break;\n }\n\n return changes;\n }\n\n $.widget('mage.priceOptions', {\n options: globalOptions,\n\n /**\n * @private\n */\n _init: function initPriceBundle() {\n $(this.options.optionsSelector, this.element).trigger('change');\n },\n\n /**\n * Widget creating method.\n * Triggered once.\n * @private\n */\n _create: function createPriceOptions() {\n var form = this.element,\n options = $(this.options.optionsSelector, form),\n priceBox = $(this.options.priceHolderSelector, $(this.options.optionsSelector).element);\n\n if (priceBox.data('magePriceBox') &&\n priceBox.priceBox('option') &&\n priceBox.priceBox('option').priceConfig\n ) {\n if (priceBox.priceBox('option').priceConfig.optionTemplate) {\n this._setOption('optionTemplate', priceBox.priceBox('option').priceConfig.optionTemplate);\n }\n this._setOption('priceFormat', priceBox.priceBox('option').priceConfig.priceFormat);\n }\n\n this._applyOptionNodeFix(options);\n\n options.on('change', this._onOptionChanged.bind(this));\n },\n\n /**\n * Custom option change-event handler\n * @param {Event} event\n * @private\n */\n _onOptionChanged: function onOptionChanged(event) {\n var changes,\n option = $(event.target),\n handler = this.options.optionHandlers[option.data('role')];\n\n option.data('optionContainer', option.closest(this.options.controlContainer));\n\n if (handler && handler instanceof Function) {\n changes = handler(option, this.options.optionConfig, this);\n } else {\n changes = defaultGetOptionValue(option, this.options.optionConfig);\n }\n $(this.options.priceHolderSelector).trigger('updatePrice', changes);\n },\n\n /**\n * Helper to fix issue with option nodes:\n * - you can't place any html in option ->\n * so you can't style it via CSS\n * @param {jQuery} options\n * @private\n */\n _applyOptionNodeFix: function applyOptionNodeFix(options) {\n var config = this.options,\n format = config.priceFormat,\n template = config.optionTemplate;\n\n template = mageTemplate(template);\n options.filter('select').each(function (index, element) {\n var $element = $(element),\n optionId = utils.findOptionId($element),\n optionConfig = config.optionConfig && config.optionConfig[optionId];\n\n $element.find('option').each(function (idx, option) {\n var $option,\n optionValue,\n toTemplate,\n prices;\n\n $option = $(option);\n optionValue = $option.val();\n\n if (!optionValue && optionValue !== 0) {\n return;\n }\n\n toTemplate = {\n data: {\n label: optionConfig[optionValue] && optionConfig[optionValue].name\n }\n };\n prices = optionConfig[optionValue] ? optionConfig[optionValue].prices : null;\n\n if (prices) {\n _.each(prices, function (price, type) {\n var value = +price.amount;\n\n value += _.reduce(price.adjustments, function (sum, x) { //eslint-disable-line\n return sum + x;\n }, 0);\n toTemplate.data[type] = {\n value: value,\n formatted: utils.formatPriceLocale(value, format)\n };\n });\n\n $option.text(template(toTemplate));\n }\n });\n });\n },\n\n /**\n * Custom behavior on getting options:\n * now widget able to deep merge accepted configuration with instance options.\n * @param {Object} options\n * @return {$.Widget}\n * @private\n */\n _setOptions: function setOptions(options) {\n $.extend(true, this.options, options);\n this._super(options);\n\n return this;\n }\n });\n\n return $.mage.priceOptions;\n});\n","Magento_Catalog/js/edit-tree.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* eslint-disable no-undef */\n// jscs:disable jsDoc\n\nrequire([\n 'jquery',\n 'Magento_Ui/js/modal/confirm',\n 'Magento_Ui/js/modal/alert',\n 'loadingPopup',\n 'mage/backend/floating-header'\n], function (jQuery, confirm) {\n 'use strict';\n\n /**\n * Delete some category\n * This routine get categoryId explicitly, so even if currently selected tree node is out of sync\n * with this form, we surely delete same category in the tree and at backend.\n *\n * @deprecated\n * @see deleteConfirm\n */\n function categoryDelete(url) {\n confirm({\n content: 'Are you sure you want to delete this category?',\n actions: {\n confirm: function () {\n location.href = url;\n }\n }\n });\n }\n\n function displayLoadingMask() {\n jQuery('body').loadingPopup();\n }\n\n window.categoryDelete = categoryDelete;\n window.displayLoadingMask = displayLoadingMask;\n});\n","Magento_Catalog/js/price-utils.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'underscore'\n], function ($, _) {\n 'use strict';\n\n var globalPriceFormat = {\n requiredPrecision: 2,\n integerRequired: 1,\n decimalSymbol: ',',\n groupSymbol: ',',\n groupLength: ','\n };\n\n /**\n * Repeats {string} {times} times\n * @param {String} string\n * @param {Number} times\n * @return {String}\n */\n function stringPad(string, times) {\n return new Array(times + 1).join(string);\n }\n\n /**\n * Format the price with the compliance to the specified locale\n *\n * @param {Number} amount\n * @param {Object} format\n * @param {Boolean} isShowSign\n */\n function formatPriceLocale(amount, format, isShowSign)\n {\n var s = '',\n precision, pattern, locale, r;\n\n format = _.extend(globalPriceFormat, format);\n precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision;\n pattern = format.pattern || '%s';\n locale = window.LOCALE || 'en-US';\n if (isShowSign === undefined || isShowSign === true) {\n s = amount < 0 ? '-' : isShowSign ? '+' : '';\n } else if (isShowSign === false) {\n s = '';\n }\n pattern = pattern.indexOf('{sign}') < 0 ? s + pattern : pattern.replace('{sign}', s);\n amount = Number(Math.round(Math.abs(+amount || 0) + 'e+' + precision) + ('e-' + precision));\n r = amount.toLocaleString(locale, {minimumFractionDigits: precision});\n\n return pattern.replace('%s', r).replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n /**\n * Formatter for price amount\n * @param {Number} amount\n * @param {Object} format\n * @param {Boolean} isShowSign\n * @return {String} Formatted value\n * @deprecated\n */\n function formatPrice(amount, format, isShowSign) {\n var s = '',\n precision, integerRequired, decimalSymbol, groupSymbol, groupLength, pattern, i, pad, j, re, r, am;\n\n format = _.extend(globalPriceFormat, format);\n\n // copied from price-option.js | Could be refactored with varien/js.js\n\n precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision;\n integerRequired = isNaN(format.integerRequired = Math.abs(format.integerRequired)) ? 1 : format.integerRequired;\n decimalSymbol = format.decimalSymbol === undefined ? ',' : format.decimalSymbol;\n groupSymbol = format.groupSymbol === undefined ? '.' : format.groupSymbol;\n groupLength = format.groupLength === undefined ? 3 : format.groupLength;\n pattern = format.pattern || '%s';\n\n if (isShowSign === undefined || isShowSign === true) {\n s = amount < 0 ? '-' : isShowSign ? '+' : '';\n } else if (isShowSign === false) {\n s = '';\n }\n pattern = pattern.indexOf('{sign}') < 0 ? s + pattern : pattern.replace('{sign}', s);\n\n // we're avoiding the usage of to fixed, and using round instead with the e representation to address\n // numbers like 1.005 = 1.01. Using ToFixed to only provide trailing zeroes in case we have a whole number\n i = parseInt(\n amount = Number(Math.round(Math.abs(+amount || 0) + 'e+' + precision) + ('e-' + precision)),\n 10\n ) + '';\n pad = i.length < integerRequired ? integerRequired - i.length : 0;\n\n i = stringPad('0', pad) + i;\n\n j = i.length > groupLength ? i.length % groupLength : 0;\n re = new RegExp('(\\\\d{' + groupLength + '})(?=\\\\d)', 'g');\n\n // replace(/-/, 0) is only for fixing Safari bug which appears\n // when Math.abs(0).toFixed() executed on '0' number.\n // Result is '0.-0' :(\n\n am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision));\n r = (j ? i.substr(0, j) + groupSymbol : '') +\n i.substr(j).replace(re, '$1' + groupSymbol) +\n (precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : '');\n\n return pattern.replace('%s', r).replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n /**\n * Deep clone of Object. Doesn't support functions\n * @param {Object} obj\n * @return {Object}\n */\n function objectDeepClone(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n\n /**\n * Helper to find ID in name attribute\n * @param {jQuery} element\n * @returns {undefined|String}\n */\n function findOptionId(element) {\n var re, id, name;\n\n if (!element) {\n return id;\n }\n name = $(element).attr('name');\n\n if (name.indexOf('[') !== -1) {\n re = /\\[([^\\]]+)?\\]/;\n } else {\n re = /_([^\\]]+)?_/; // just to support file-type-option\n }\n id = re.exec(name) && re.exec(name)[1];\n\n if (id) {\n return id;\n }\n }\n\n return {\n formatPriceLocale: formatPriceLocale,\n formatPrice: formatPrice,\n deepClone: objectDeepClone,\n strPad: stringPad,\n findOptionId: findOptionId\n };\n});\n","Magento_Catalog/js/product/weight-handler.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery'\n], function ($) {\n 'use strict';\n\n return {\n\n /**\n * Get weight\n * @returns {*|jQuery|HTMLElement}\n */\n $weight: function () {\n return $('#weight');\n },\n\n /**\n * Weight Switcher\n * @returns {*|jQuery|HTMLElement}\n */\n $weightSwitcher: function () {\n return $('[data-role=weight-switcher]');\n },\n\n /**\n * Weight Change Toggle\n * @returns {*|jQuery|HTMLElement}\n */\n $weightChangeToggle: function () {\n return $('#toggle_weight');\n },\n\n /**\n * Is locked\n * @returns {*}\n */\n isLocked: function () {\n return this.$weight().is('[data-locked]');\n },\n\n /**\n * Disabled\n */\n disabled: function () {\n this.$weight().addClass('ignore-validate').prop('disabled', true);\n },\n\n /**\n * Enabled\n */\n enabled: function () {\n this.$weight().removeClass('ignore-validate').prop('disabled', false);\n },\n\n /**\n * Disabled Switcher\n */\n disabledSwitcher: function () {\n this.$weightSwitcher().find('input[type=\"radio\"]').addClass('ignore-validate').prop('disabled', true);\n },\n\n /**\n * Enabled Switcher\n */\n enabledSwitcher: function () {\n this.$weightSwitcher().find('input[type=\"radio\"]').removeClass('ignore-validate').prop('disabled', false);\n },\n\n /**\n * Switch Weight\n * @returns {*}\n */\n switchWeight: function () {\n if (this.hasWeightChangeToggle()) {\n return;\n }\n\n return this.productHasWeightBySwitcher() ? this.enabled() : this.disabled();\n },\n\n /**\n * Toggle Switcher\n */\n toggleSwitcher: function () {\n this.isWeightChanging() ? this.enabledSwitcher() : this.disabledSwitcher();\n },\n\n /**\n * Hide weight switcher\n */\n hideWeightSwitcher: function () {\n this.$weightSwitcher().hide();\n },\n\n /**\n * Has weight switcher\n * @returns {*}\n */\n hasWeightSwitcher: function () {\n return this.$weightSwitcher().is(':visible');\n },\n\n /**\n * Has weight\n * @returns {*}\n */\n hasWeight: function () {\n return this.$weight.is(':visible');\n },\n\n /**\n * Has weight change toggle\n * @returns {*}\n */\n hasWeightChangeToggle: function () {\n return this.$weightChangeToggle().is(':visible');\n },\n\n /**\n * Product has weight\n * @returns {Bool}\n */\n productHasWeightBySwitcher: function () {\n return $('input:checked', this.$weightSwitcher()).val() === '1';\n },\n\n /**\n * Product weight toggle is checked\n * @returns {Bool}\n */\n isWeightChanging: function () {\n return this.$weightChangeToggle().is(':checked');\n },\n\n /**\n * Change\n * @param {String} data\n */\n change: function (data) {\n var value = data !== undefined ? +data : !this.productHasWeightBySwitcher();\n\n $('input[value=' + value + ']', this.$weightSwitcher()).prop('checked', true);\n this.switchWeight();\n },\n\n /**\n * Constructor component\n */\n 'Magento_Catalog/js/product/weight-handler': function () {\n this.bindAll();\n\n if (this.hasWeightSwitcher()) {\n this.switchWeight();\n }\n\n if (this.hasWeightChangeToggle()) {\n this.toggleSwitcher();\n }\n },\n\n /**\n * Bind all\n */\n bindAll: function () {\n this.$weightSwitcher().find('input').on('change', this.switchWeight.bind(this));\n }\n };\n});\n","Magento_Catalog/js/product/addtocompare-button.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/grid/columns/column',\n 'Magento_Catalog/js/product/uenc-processor',\n 'Magento_Catalog/js/product/list/column-status-validator'\n], function (Column, uencProcessor, columnStatusValidator) {\n 'use strict';\n\n return Column.extend({\n defaults: {\n label: ''\n },\n\n /**\n * Prepare Data-Post data that will be used in data-mage-init\n *\n * @param {Object} row\n * @returns {Array}\n */\n getDataPost: function (row) {\n return uencProcessor(row['add_to_compare_button'].url ||\n row['add_to_compare_button']['post_data']);\n },\n\n /**\n * Depends on this option, \"Add to compare\" button can be shown or hide. Depends on backend configuration\n *\n * @returns {Boolean}\n */\n isAllowed: function () {\n return columnStatusValidator.isValid(this.source(), 'add_to_compare', 'show_buttons');\n },\n\n /**\n * Get button label.\n *\n * @return {String}\n */\n getLabel: function () {\n return this.label;\n }\n });\n});\n","Magento_Catalog/js/product/name.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/grid/columns/column',\n 'Magento_Catalog/js/product/list/column-status-validator',\n 'escaper'\n], function (Column, columnStatusValidator, escaper) {\n 'use strict';\n\n return Column.extend({\n defaults: {\n allowedTags: ['div', 'span', 'b', 'strong', 'i', 'em', 'u', 'a']\n },\n\n /**\n * Depends on this option, product name can be shown or hide. Depends on backend configuration\n *\n * @returns {Boolean}\n */\n isAllowed: function () {\n return columnStatusValidator.isValid(this.source(), 'name', 'show_attributes');\n },\n\n /**\n * Name column.\n *\n * @param {String} label\n * @returns {String}\n */\n getNameUnsanitizedHtml: function (label) {\n return escaper.escapeHtml(label, this.allowedTags);\n }\n });\n});\n","Magento_Catalog/js/product/addtocart-button.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/grid/columns/column',\n 'Magento_Catalog/js/product/uenc-processor',\n 'Magento_Catalog/js/product/list/column-status-validator'\n], function (Element, uencProcessor, columnStatusValidator) {\n 'use strict';\n\n return Element.extend({\n defaults: {\n label: ''\n },\n\n /**\n * Prepare data, that will be inserted as data-mage-init attribute into button. With help of this attribute\n * Add To * buttons can understand post data and urls\n *\n * @param {Object} row\n * @returns {String}\n */\n getDataMageInit: function (row) {\n return '{\"redirectUrl\": { \"url\" : \"' + uencProcessor(row['add_to_cart_button'].url) + '\"}}';\n },\n\n /**\n * Prepare Data-Post data that will be used in data-mage-init\n *\n * @param {Object} row\n * @return {String}\n */\n getDataPost: function (row) {\n return uencProcessor(row['add_to_cart_button']['post_data']);\n },\n\n /**\n * Check if product has required options.\n *\n * @param {Object} row\n * @return {Boolean}\n */\n hasRequiredOptions: function (row) {\n return row['add_to_cart_button']['required_options'];\n },\n\n /**\n * Depends on this option, \"Add to cart\" button can be shown or hide\n *\n * @param {Object} row\n * @returns {Boolean}\n */\n isSalable: function (row) {\n return row['is_salable'];\n },\n\n /**\n * Depends on this option, stock status text can be \"In stock\" or \"Out Of Stock\"\n *\n * @param {Object} row\n * @returns {Boolean}\n */\n isAvailable: function (row) {\n return row['is_available'];\n },\n\n /**\n * Depends on this option, \"Add to cart\" button can be shown or hide. Depends on backend configuration\n *\n * @returns {Boolean}\n */\n isAllowed: function () {\n return columnStatusValidator.isValid(this.source(), 'add_to_cart', 'show_buttons');\n },\n\n /**\n * Get button label.\n *\n * @return {String}\n */\n getLabel: function () {\n return this.label;\n }\n });\n});\n","Magento_Catalog/js/product/learn-more.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/grid/columns/column',\n 'Magento_Catalog/js/product/list/column-status-validator'\n], function (Column, columnStatusValidator) {\n 'use strict';\n\n return Column.extend({\n /**\n * Depends on this option, \"Learn More\" link can be shown or hide. Depends on backend configuration\n *\n * @returns {Boolean}\n */\n isAllowed: function () {\n return columnStatusValidator.isValid(this.source(), 'learn_more', 'show_attributes');\n }\n });\n});\n","Magento_Catalog/js/product/list/listing.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'ko',\n 'underscore',\n 'Magento_Ui/js/grid/listing'\n], function (ko, _, Listing) {\n 'use strict';\n\n return Listing.extend({\n defaults: {\n additionalClasses: '',\n filteredRows: {},\n limit: 5,\n listens: {\n elems: 'filterRowsFromCache',\n '${ $.provider }:data.items': 'filterRowsFromServer'\n }\n },\n\n /** @inheritdoc */\n initialize: function () {\n this._super();\n this.filteredRows = ko.observable();\n this.initProductsLimit();\n this.hideLoader();\n },\n\n /**\n * Initialize product limit\n * Product limit can be configured through Ui component.\n * Product limit are present in widget form\n *\n * @returns {exports}\n */\n initProductsLimit: function () {\n if (this.source['page_size']) {\n this.limit = this.source['page_size'];\n }\n\n return this;\n },\n\n /**\n * Initializes observable properties.\n *\n * @returns {Listing} Chainable.\n */\n initObservable: function () {\n this._super()\n .track({\n rows: []\n });\n\n return this;\n },\n\n /**\n * Sort and filter rows, that are already in magento storage cache\n *\n * @return void\n */\n filterRowsFromCache: function () {\n this._filterRows(this.rows);\n },\n\n /**\n * Sort and filter rows, that are come from backend\n *\n * @param {Object} rows\n */\n filterRowsFromServer: function (rows) {\n this._filterRows(rows);\n },\n\n /**\n * Filter rows by limit and sort them\n *\n * @param {Array} rows\n * @private\n */\n _filterRows: function (rows) {\n this.filteredRows(_.sortBy(rows, 'added_at').reverse().slice(0, this.limit));\n },\n\n /**\n * Can retrieve product url\n *\n * @param {Object} row\n * @returns {String}\n */\n getUrl: function (row) {\n return row.url;\n },\n\n /**\n * Get product attribute by code.\n *\n * @param {String} code\n * @return {Object}\n */\n getComponentByCode: function (code) {\n var elems = this.elems() ? this.elems() : ko.getObservable(this, 'elems'),\n component;\n\n component = _.filter(elems, function (elem) {\n return elem.index === code;\n }, this).pop();\n\n return component;\n }\n });\n});\n","Magento_Catalog/js/product/list/column-status-validator.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'underscore'\n], function (_) {\n 'use strict';\n\n return _.extend({\n /**\n * Check whether we can show column depends on server settings or not\n *\n * @param {Object} source\n * @param {String} attributeCode\n * @param {String} type\n * @returns {Boolean}\n */\n isValid: function (source, attributeCode, type) {\n var attributes;\n\n if (!source[type]) {\n return false;\n }\n\n attributes = source[type].split(',');\n\n return _.contains(attributes, attributeCode);\n }\n });\n});\n","Magento_Catalog/js/product/list/columns/price-box.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'ko',\n 'underscore',\n 'uiRegistry',\n 'mageUtils',\n 'uiCollection',\n 'Magento_Catalog/js/product/list/column-status-validator',\n 'uiLayout'\n], function (ko, _, registry, utils, Collection, columnStatusValidator, layout) {\n 'use strict';\n\n return Collection.extend({\n defaults: {\n label: '',\n hasSpecialPrice: false,\n showMinimalPrice: false,\n useLinkForAsLowAs: false,\n visible: true,\n headerTmpl: 'ui/grid/columns/text',\n bodyTmpl: 'Magento_Catalog/product/price/price_box',\n disableAction: false,\n controlVisibility: true,\n sortable: false,\n sorting: false,\n draggable: true,\n fieldClass: {},\n renders: {\n default: {}\n },\n ignoreTmpls: {\n fieldAction: true\n },\n statefull: {\n visible: true,\n sorting: true\n },\n imports: {\n exportSorting: 'sorting'\n },\n listens: {\n elems: ''\n },\n modules: {\n source: '${ $.provider }'\n },\n pricesInit: {}\n },\n\n /**\n * Sort prices api\n *\n * @returns {exports}\n */\n sort: function () {\n return this;\n },\n\n /**\n * Check whether is allowed to render price or not\n *\n * @returns {*}\n */\n isAllowed: function () {\n return columnStatusValidator.isValid(this.source(), 'price', 'show_attributes');\n },\n\n /**\n * Retrieve array of prices, that should be rendered for specific product\n *\n * @param {Array} row\n * @return {Array}\n */\n getPrices: function (row) {\n var elems = this.elems() ? this.elems() : ko.getObservable(this, 'elems'),\n result;\n\n //we cant take type of product from row\n this.initPrices(row);\n result = _.filter(elems, function (elem) {\n return elem.productType === row.type;\n });\n\n return result;\n },\n\n /**\n * Recursive Merging of objects\n *\n * @param {Array} target\n * @param {Array} source\n * @returns {Array}\n * @private\n */\n _deepObjectExtend: function (target, source) {\n var _target = utils.copy(target);\n\n _.each(source, function (value, key) {\n if (_.keys(value).length && typeof _target[key] !== 'undefined') {\n _target[key] = this._deepObjectExtend(_target[key], value);\n } else {\n _target[key] = value;\n }\n }, this);\n\n return _target;\n },\n\n /**\n * Init price type box, in cases when product type has custom component or bodyTmpl\n *\n * @param {String} productType\n * @private\n */\n _initPriceWithCustomMetaData: function (productType) {\n var price = this._deepObjectExtend(\n this.renders.prices['default'],\n this.renders.prices[productType]\n );\n\n price.name = productType + '.default';\n price.parent = this.name;\n price.source = this.source;\n price.productType = productType;\n layout([price]);\n },\n\n /**\n * Init Prices by product type and add them to layout\n *\n * @param {Array} _priceData\n * @param {String} productType\n * @private\n */\n _initPricesForProductType: function (_priceData, productType) {\n var prices = [];\n\n this._setPriceNamesToPrices(_priceData, productType);\n _.sortBy(_priceData, this._comparePrices);\n\n _.each(_priceData, function (priceData) {\n if (!priceData.component) {\n return;\n }\n\n priceData.parent = this.name;\n priceData.provider = this.provider;\n priceData.productType = productType;\n priceData = utils.template(priceData, this);\n prices.push(priceData);\n }, this);\n\n layout(prices);\n },\n\n /**\n * Init dynamic price components\n *\n * @param {Array} row\n * @returns {void}\n */\n initPrices: function (row) {\n var _priceData = [],\n productType = row.type,\n defaultPrice = this.renders.prices['default'];\n\n if (this.pricesInit[productType]) {\n return true;\n }\n\n this.pricesInit[productType] = true;\n\n if (this.renders.prices[productType] && this._needToApplyCustomTemplate(this.renders.prices[productType])) {\n return this._initPriceWithCustomMetaData(productType);\n }\n\n if (this.renders.prices[productType] && this.renders.prices[productType].children) {\n _priceData = this._deepObjectExtend(defaultPrice.children, this.renders.prices[productType].children);\n } else {\n _priceData = defaultPrice.children;\n }\n\n return this._initPricesForProductType(_priceData, productType);\n },\n\n /**\n * Set name to all price components\n *\n * @param {Array} prices\n * @param {String} productType\n * @private\n */\n _setPriceNamesToPrices: function (prices, productType) {\n _.each(prices, function (price, name) {\n price.priceType = name;\n price.name = name + '.' + productType;\n });\n\n return prices;\n },\n\n /**\n * Sort callback to compare prices by sort order\n *\n * @param {Number} firstPrice\n * @param {Number} secondPrice\n * @returns {Number}\n * @private\n */\n _comparePrices: function (firstPrice, secondPrice) {\n if (firstPrice.sortOrder < secondPrice.sortOrder) {\n return -1;\n }\n\n if (firstPrice.sortOrder > secondPrice.sortOrder) {\n return 1;\n }\n\n return 0;\n },\n\n /**\n * Check whether metadata of product type prices was changed, and we should\n * to apply custom template or custom component\n *\n * @param {Array} productData\n * @returns {*}\n * @private\n */\n _needToApplyCustomTemplate: function (productData) {\n return productData.bodyTmpl || productData.component;\n },\n\n /**\n * Returns path to the columns' body template.\n *\n * @returns {String}\n */\n getBody: function () {\n return this.bodyTmpl;\n },\n\n /**\n * Get price label.\n *\n * @returns {String}\n */\n getLabel: function () {\n return this.label;\n }\n });\n});\n","Magento_Catalog/js/product/list/columns/final-price.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'underscore',\n 'uiRegistry',\n 'mageUtils',\n 'uiCollection'\n], function (_, registry, utils, Collection) {\n 'use strict';\n\n return Collection.extend({\n defaults: {\n label: false,\n headerTmpl: 'ui/grid/columns/text',\n showMinimalPrice: false,\n showMaximumPrice: false,\n useLinkForAsLowAs: false,\n bodyTmpl: 'Magento_Catalog/product/final_price',\n priceWrapperCssClasses: '',\n priceWrapperAttr: {}\n },\n\n /**\n * Get product final price.\n *\n * @param {Object} row\n * @return {HTMLElement} final price html\n */\n getPrice: function (row) {\n return row['price_info']['formatted_prices']['final_price'];\n },\n\n /**\n * UnsanitizedHtml version of getPrice.\n *\n * @param {Object} row\n * @return {HTMLElement} final price html\n */\n getPriceUnsanitizedHtml: function (row) {\n return this.getPrice(row);\n },\n\n /**\n * Get product regular price.\n *\n * @param {Object} row\n * @return {HTMLElement} regular price html\n */\n getRegularPrice: function (row) {\n return row['price_info']['formatted_prices']['regular_price'];\n },\n\n /**\n * UnsanitizedHtml version of getRegularPrice.\n *\n * @param {Object} row\n * @return {HTMLElement} regular price html\n */\n getRegularPriceUnsanitizedHtml: function (row) {\n return this.getRegularPrice(row);\n },\n\n /**\n * Check if product has a price range.\n *\n * @param {Object} row\n * @return {Boolean}\n */\n hasPriceRange: function (row) {\n return row['price_info']['max_regular_price'] !== row['price_info']['min_regular_price'];\n },\n\n /**\n * Check if product has special price.\n *\n * @param {Object} row\n * @return {HTMLElement} special price html\n */\n hasSpecialPrice: function (row) {\n return row['price_info']['regular_price'] > row['price_info']['final_price'];\n },\n\n /**\n * Check if product has minimal price.\n *\n * @param {Object} row\n * @return {HTMLElement} minimal price html\n */\n isMinimalPrice: function (row) {\n return row['price_info']['minimal_price'] < row['price_info']['final_price'];\n },\n\n /**\n * Get product minimal price.\n *\n * @param {Object} row\n * @return {HTMLElement} minimal price html\n */\n getMinimalPrice: function (row) {\n return row['price_info']['formatted_prices']['minimal_price'];\n },\n\n /**\n * UnsanitizedHtml version of getMinimalPrice.\n *\n * @param {Object} row\n * @return {HTMLElement} minimal price html\n */\n getMinimalPriceUnsanitizedHtml: function (row) {\n return this.getMinimalPrice(row);\n },\n\n /**\n * Check if product is salable.\n *\n * @param {Object} row\n * @return {Boolean}\n */\n isSalable: function (row) {\n return row['is_salable'];\n },\n\n /**\n * Get product maximum price.\n *\n * @param {Object} row\n * @return {HTMLElement} maximum price html\n */\n getMaxPrice: function (row) {\n return row['price_info']['formatted_prices']['max_price'];\n },\n\n /**\n * UnsanitizedHtml version of getMaxPrice.\n *\n * @param {Object} row\n * @return {HTMLElement} maximum price html\n */\n getMaxPriceUnsanitizedHtml: function (row) {\n return this.getMaxPrice(row);\n },\n\n /**\n * Get product maximum regular price in case of price range and special price.\n *\n * @param {Object} row\n * @return {HTMLElement} maximum regular price html\n */\n getMaxRegularPrice: function (row) {\n return row['price_info']['formatted_prices']['max_regular_price'];\n },\n\n /**\n * UnsanitizedHtml version of getMaxRegularPrice.\n *\n * @param {Object} row\n * @return {HTMLElement} maximum regular price html\n */\n getMaxRegularPriceUnsanitizedHtml: function (row) {\n return this.getMaxRegularPrice(row);\n },\n\n /**\n * Get product minimal regular price in case of price range and special price.\n *\n * @param {Object} row\n * @return {HTMLElement} minimal regular price html\n */\n getMinRegularPrice: function (row) {\n return row['price_info']['formatted_prices']['min_regular_price'];\n },\n\n /**\n * UnsanitizedHtml version of getMinRegularPrice.\n *\n * @param {Object} row\n * @return {HTMLElement} minimal regular price html\n */\n getMinRegularPriceUnsanitizedHtml: function (row) {\n return this.getMinRegularPrice(row);\n },\n\n /**\n * Get adjustments names and return as string.\n *\n * @return {String} adjustments classes\n */\n getAdjustmentCssClasses: function () {\n return _.pluck(this.getAdjustments(), 'index').join(' ');\n },\n\n /**\n * Get product minimal price as number.\n *\n * @param {Object} row\n * @return {Number} minimal price amount\n */\n getMinimalPriceAmount: function (row) {\n return row['price_info']['minimal_price'];\n },\n\n /**\n * UnsanitizedHtml version of getMinimalPriceAmount\n *\n * @param {Object} row\n * @return {Number} minimal price amount\n */\n getMinimalPriceAmountUnsanitizedHtml: function (row) {\n return this.getMinimalPriceAmount(row);\n },\n\n /**\n * Get product minimal regular price as number in case of special price.\n *\n * @param {Object} row\n * @return {Number} minimal regular price amount\n */\n getMinimalRegularPriceAmount: function (row) {\n return row['price_info']['min_regular_price'];\n },\n\n /**\n * Get product maximum price as number.\n *\n * @param {Object} row\n * @return {Number} maximum price amount\n */\n getMaximumPriceAmount: function (row) {\n return row['price_info']['max_price'];\n },\n\n /**\n * Get product maximum regular price as number in case of special price.\n *\n * @param {Object} row\n * @return {Number} maximum regular price amount\n */\n getMaximumRegularPriceAmount: function (row) {\n return row['price_info']['max_regular_price'];\n },\n\n /**\n * Check if minimal regular price exist for product.\n *\n * @param {Object} row\n * @return {Boolean}\n */\n showMinRegularPrice: function (row) {\n return this.getMinimalPriceAmount(row) < this.getMinimalRegularPriceAmount(row);\n },\n\n /**\n * Check if maximum regular price exist for product.\n *\n * @param {Object} row\n * @return {Boolean}\n */\n showMaxRegularPrice: function (row) {\n return this.getMaximumPriceAmount(row) < this.getMaximumRegularPriceAmount(row);\n },\n\n /**\n * Get path to the columns' body template.\n *\n * @returns {String}\n */\n getBody: function () {\n return this.bodyTmpl;\n },\n\n /**\n * Get all price adjustments.\n *\n * @returns {Object}\n */\n getAdjustments: function () {\n var adjustments = this.elems();\n\n _.each(adjustments, function (adjustment) {\n adjustment.setPriceType(this.priceType);\n adjustment.source = this.source;\n }, this);\n\n return adjustments;\n }\n });\n});\n","Magento_Catalog/js/product/list/columns/pricetype-box.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'ko',\n 'underscore',\n 'uiCollection'\n], function (ko, _, Collection) {\n 'use strict';\n\n return Collection.extend({\n /**\n * Find from all price ui components, price with specific code, init source on it and set priceType\n *\n * @param {String} code\n * @returns {*|T}\n */\n getPriceByCode: function (code) {\n var elems = this.elems() ? this.elems() : ko.getObservable(this, 'elems'),\n price;\n\n price = _.filter(elems, function (elem) {\n return elem.index.split('.').shift() === code;\n }, this).pop();\n\n price.source = this.source();\n price.priceType = code;\n\n return price;\n },\n\n /**\n * Retrieve body template\n *\n * @returns {String}\n */\n getBody: function () {\n return this.bodyTmpl;\n },\n\n /**\n * Check whether price has price range, depends on different options, that can be choose\n *\n * @param {Object} row\n * @returns {Boolean}\n */\n hasPriceRange: function (row) {\n return row['price_info']['max_regular_price'] !== row['price_info']['min_regular_price'];\n }\n });\n});\n","Magento_Catalog/js/product/list/columns/image.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'underscore',\n 'Magento_Ui/js/grid/columns/column',\n 'Magento_Catalog/js/product/list/column-status-validator'\n], function (_, Element, columnStatusValidator) {\n 'use strict';\n\n return Element.extend({\n defaults: {\n bodyTmpl: 'Magento_Catalog/product/list/columns/image',\n imageCode: 'default',\n image: {}\n },\n\n /**\n * Find image by code in scope of images\n *\n * @param {Object} images\n * @returns {*|T}\n */\n getImage: function (images) {\n return _.filter(images, function (image) {\n return this.imageCode === image.code;\n }, this).pop();\n },\n\n /**\n * Get image path.\n *\n * @param {Object} row\n * @return {String}\n */\n getImageUrl: function (row) {\n return this.getImage(row.images).url;\n },\n\n /**\n * Get image box width.\n *\n * @param {Object} row\n * @return {Number}\n */\n getWidth: function (row) {\n return this.getImage(row.images).width;\n },\n\n /**\n * Get image box height.\n *\n * @param {Object} row\n * @return {Number}\n */\n getHeight: function (row) {\n return this.getImage(row.images).height;\n },\n\n /**\n * Get resized image width.\n *\n * @param {Object} row\n * @return {Number}\n */\n getResizedImageWidth: function (row) {\n return this.getImage(row.images)['resized_width'];\n },\n\n /**\n * Get resized image height.\n *\n * @param {Object} row\n * @return {Number}\n */\n getResizedImageHeight: function (row) {\n return this.getImage(row.images)['resized_height'];\n },\n\n /**\n * Get image alt text.\n *\n * @param {Object} row\n * @return {String}\n */\n getLabel: function (row) {\n if (!this.imageExists(row)) {\n return this._super();\n }\n\n return this.getImage(row.images).label;\n },\n\n /**\n * Check if image exist.\n *\n * @param {Object} row\n * @return {Boolean}\n */\n imageExists: function (row) {\n return this.getImage(row.images) !== 'undefined';\n },\n\n /**\n * Check if component must be shown.\n *\n * @return {Boolean}\n */\n isAllowed: function () {\n return columnStatusValidator.isValid(this.source(), 'image', 'show_attributes');\n }\n });\n});\n","Magento_Catalog/js/form/element/action-delete.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'underscore',\n 'Magento_Ui/js/form/element/abstract'\n], function (_, Abstract) {\n 'use strict';\n\n return Abstract.extend({\n defaults: {\n prefixName: '',\n prefixElementName: '',\n elementName: '',\n suffixName: ''\n },\n\n /**\n * Parses options and merges the result with instance\n *\n * @param {Object} config\n * @returns {Object} Chainable.\n */\n initConfig: function (config) {\n this._super(config);\n\n this.configureDataScope();\n\n return this;\n },\n\n /**\n * Configure data scope.\n */\n configureDataScope: function () {\n var recordId,\n prefixName,\n suffixName;\n\n // Get recordId\n recordId = this.parentName.split('.').last();\n\n prefixName = this.dataScopeToHtmlArray(this.prefixName);\n this.elementName = this.prefixElementName + recordId;\n\n suffixName = '';\n\n if (!_.isEmpty(this.suffixName) || _.isNumber(this.suffixName)) {\n suffixName = '[' + this.suffixName + ']';\n }\n this.inputName = prefixName + '[' + this.elementName + ']' + suffixName;\n\n suffixName = '';\n\n if (!_.isEmpty(this.suffixName) || _.isNumber(this.suffixName)) {\n suffixName = '.' + this.suffixName;\n }\n this.dataScope = 'data.' + this.prefixName + '.' + this.elementName + suffixName;\n\n this.links.value = this.provider + ':' + this.dataScope;\n },\n\n /**\n * Get HTML array from data scope.\n *\n * @param {String} dataScopeString\n * @returns {String}\n */\n dataScopeToHtmlArray: function (dataScopeString) {\n var dataScopeArray, dataScope, reduceFunction;\n\n /**\n * Reduce\n *\n * @param {String} prev\n * @param {String} curr\n * @returns {String}\n */\n reduceFunction = function (prev, curr) {\n return prev + '[' + curr + ']';\n };\n\n dataScopeArray = dataScopeString.split('.');\n\n dataScope = dataScopeArray.shift();\n dataScope += dataScopeArray.reduce(reduceFunction, '');\n\n return dataScope;\n },\n\n /**\n * Delete record instance\n * update data provider dataScope\n *\n * @param {Object} parents\n */\n deleteRecord: function (parents) {\n this.value(1);\n parents[1].deleteRecord(parents[0].index, parents[0].recordId);\n\n return this;\n }\n });\n});\n","Magento_Catalog/js/form/element/checkbox.js":"/**\r\n * Copyright \u00a9 Magento, Inc. All rights reserved.\r\n * See COPYING.txt for license details.\r\n */\r\n\r\ndefine([\r\n 'Magento_Ui/js/form/element/single-checkbox'\r\n], function (Checkbox) {\r\n 'use strict';\r\n\r\n return Checkbox.extend({\r\n defaults: {\r\n inputCheckBoxName: '',\r\n prefixElementName: '',\r\n parentDynamicRowName: 'visual_swatch'\r\n },\r\n\r\n /**\r\n * Parses options and merges the result with instance\r\n *\r\n * @returns {Object} Chainable.\r\n */\r\n initConfig: function () {\r\n this._super();\r\n this.configureDataScope();\r\n\r\n return this;\r\n },\r\n\r\n /** @inheritdoc */\r\n initialize: function () {\r\n this._super();\r\n\r\n if (this.rows && this.rows().elems().length === 0) {\r\n this.checked(true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Configure data scope.\r\n */\r\n configureDataScope: function () {\r\n var recordId,\r\n value;\r\n\r\n recordId = this.parentName.split('.').last();\r\n value = this.prefixElementName + recordId;\r\n\r\n this.dataScope = 'data.' + this.inputCheckBoxName;\r\n this.inputName = this.dataScopeToHtmlArray(this.inputCheckBoxName);\r\n\r\n this.initialValue = value;\r\n\r\n this.links.value = this.provider + ':' + this.dataScope;\r\n },\r\n\r\n /**\r\n * Get HTML array from data scope.\r\n *\r\n * @param {String} dataScopeString\r\n * @returns {String}\r\n */\r\n dataScopeToHtmlArray: function (dataScopeString) {\r\n var dataScopeArray, dataScope, reduceFunction;\r\n\r\n /**\r\n * Add new level of nesting.\r\n *\r\n * @param {String} prev\r\n * @param {String} curr\r\n * @returns {String}\r\n */\r\n reduceFunction = function (prev, curr) {\r\n return prev + '[' + curr + ']';\r\n };\r\n\r\n dataScopeArray = dataScopeString.split('.');\r\n\r\n dataScope = dataScopeArray.shift();\r\n dataScope += dataScopeArray.reduce(reduceFunction, '');\r\n\r\n return dataScope;\r\n }\r\n });\r\n});\r\n","Magento_Catalog/js/form/element/input.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'underscore',\n 'Magento_Ui/js/form/element/abstract'\n], function (_, Abstract) {\n 'use strict';\n\n return Abstract.extend({\n defaults: {\n prefixName: '',\n prefixElementName: '',\n elementName: '',\n suffixName: ''\n },\n\n /**\n * Parses options and merges the result with instance\n *\n * @returns {Object} Chainable.\n */\n initConfig: function () {\n this._super();\n this.configureDataScope();\n\n return this;\n },\n\n /**\n * Configure data scope.\n */\n configureDataScope: function () {\n var recordId,\n prefixName,\n suffixName;\n\n // Get recordId\n recordId = this.parentName.split('.').last();\n\n prefixName = this.dataScopeToHtmlArray(this.prefixName);\n this.elementName = this.prefixElementName + recordId;\n\n suffixName = '';\n\n if (!_.isEmpty(this.suffixName) || _.isNumber(this.suffixName)) {\n suffixName = '[' + this.suffixName + ']';\n }\n this.inputName = prefixName + '[' + this.elementName + ']' + suffixName;\n\n suffixName = '';\n\n if (!_.isEmpty(this.suffixName) || _.isNumber(this.suffixName)) {\n suffixName = '.' + this.suffixName;\n }\n\n this.exportDataLink = 'data.' + this.prefixName + '.' + this.elementName + suffixName;\n this.exports.value = this.provider + ':' + this.exportDataLink;\n },\n\n /** @inheritdoc */\n destroy: function () {\n this._super();\n\n this.source.remove(this.exportDataLink);\n },\n\n /**\n * Get HTML array from data scope.\n *\n * @param {String} dataScopeString\n * @returns {String}\n */\n dataScopeToHtmlArray: function (dataScopeString) {\n var dataScopeArray, dataScope, reduceFunction;\n\n /**\n * Add new level of nesting.\n *\n * @param {String} prev\n * @param {String} curr\n * @returns {String}\n */\n reduceFunction = function (prev, curr) {\n return prev + '[' + curr + ']';\n };\n\n dataScopeArray = dataScopeString.split('.');\n\n dataScope = dataScopeArray.shift();\n dataScope += dataScopeArray.reduce(reduceFunction, '');\n\n return dataScope;\n }\n });\n});\n","Magento_Catalog/js/components/custom-options-component.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'underscore',\n 'Magento_Ui/js/form/element/abstract'\n], function (_, Abstract) {\n 'use strict';\n\n return Abstract.extend({\n /**\n * {@inheritdoc}\n */\n setInitialValue: function () {\n this._super();\n\n this.addBefore(this.addbefore);\n\n return this;\n },\n\n /**\n * {@inheritdoc}\n */\n initObservable: function () {\n this._super();\n\n this.observe('addBefore');\n\n return this;\n }\n });\n});\n","Magento_Catalog/js/components/website-currency-symbol.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/select'\n], function (Select) {\n 'use strict';\n\n return Select.extend({\n defaults: {\n currenciesForWebsites: {},\n tracks: {\n currency: true\n }\n },\n\n /**\n * Set currency symbol per website\n *\n * @param {String} value - currency symbol\n */\n setDifferedFromDefault: function (value) {\n this.currency = this.currenciesForWebsites[value];\n\n return this._super();\n }\n });\n});\n","Magento_Catalog/js/components/disable-hide-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/select',\n 'Magento_Catalog/js/components/visible-on-option/strategy',\n 'Magento_Catalog/js/components/disable-on-option/strategy'\n], function (Element, visibleStrategy, disableStrategy) {\n 'use strict';\n\n return Element.extend(visibleStrategy).extend(disableStrategy);\n});\n","Magento_Catalog/js/components/dynamic-rows-tier-price.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'underscore',\n 'Magento_Ui/js/dynamic-rows/dynamic-rows'\n], function (_, DynamicRows) {\n 'use strict';\n\n /**\n * @deprecated Parent method contains labels sorting.\n * @see Magento_Ui/js/dynamic-rows/dynamic-rows\n */\n return DynamicRows.extend({\n\n /**\n * Init header elements\n */\n initHeader: function () {\n var labels;\n\n this._super();\n labels = _.clone(this.labels());\n labels = _.sortBy(labels, function (label) {\n return label.sortOrder;\n });\n\n this.labels(labels);\n }\n });\n});\n","Magento_Catalog/js/components/attributes-grid-paging.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/grid/paging/paging',\n 'underscore'\n], function (Paging, _) {\n 'use strict';\n\n return Paging.extend({\n defaults: {\n totalTmpl: 'Magento_Catalog/attributes/grid/paging',\n modules: {\n selectionColumn: '${ $.selectProvider }'\n },\n listens: {\n '${ $.selectProvider }:selected': 'changeLabel'\n },\n label: '',\n selectedAttrs: []\n },\n\n /**\n * Change label.\n *\n * @param {Array} selected\n */\n changeLabel: function (selected) {\n this.selectedAttrs = [];\n _.each(this.selectionColumn().rows(), function (row) {\n if (selected.indexOf(row['attribute_id']) !== -1) {\n this.selectedAttrs.push(row['attribute_code']);\n }\n }, this);\n\n this.label(this.selectedAttrs.join(', '));\n },\n\n /** @inheritdoc */\n initObservable: function () {\n this._super()\n .observe('label');\n\n return this;\n }\n });\n});\n","Magento_Catalog/js/components/url-key-handle-changes.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'Magento_Ui/js/form/element/single-checkbox'\n], function (Checkbox) {\n 'use strict';\n\n return Checkbox.extend({\n defaults: {\n imports: {\n handleUseDefault: '${ $.parentName }.use_default.url_key:checked',\n urlKey: '${ $.provider }:data.url_key'\n },\n listens: {\n urlKey: 'handleChanges'\n },\n modules: {\n useDefault: '${ $.parentName }.use_default.url_key'\n }\n },\n\n /**\n * Disable checkbox field, when 'url_key' field without changes or 'use default' field is checked\n */\n handleChanges: function (newValue) {\n this.disabled(newValue === this.valueMap['true'] || this.useDefault.checked);\n },\n\n /**\n * Disable checkbox field, when 'url_key' field without changes or 'use default' field is checked\n */\n handleUseDefault: function (checkedUseDefault) {\n this.disabled(this.urlKey === this.valueMap['true'] || checkedUseDefault);\n }\n });\n});\n","Magento_Catalog/js/components/dynamic-rows-per-page.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/dynamic-rows/dynamic-rows',\n 'underscore',\n 'mageUtils',\n 'uiLayout',\n 'rjsResolver'\n], function (DynamicRows, _, utils, layout, resolver) {\n 'use strict';\n\n return DynamicRows.extend({\n defaults: {\n sizesConfig: {\n component: 'Magento_Ui/js/grid/paging/sizes',\n name: '${ $.name }_sizes',\n options: {\n '20': {\n value: 20,\n label: 20\n },\n '30': {\n value: 30,\n label: 30\n },\n '50': {\n value: 50,\n label: 50\n },\n '100': {\n value: 100,\n label: 100\n },\n '200': {\n value: 200,\n label: 200\n }\n },\n storageConfig: {\n provider: '${ $.storageConfig.provider }',\n namespace: '${ $.storageConfig.namespace }'\n },\n enabled: false\n },\n links: {\n options: '${ $.sizesConfig.name }:options',\n pageSize: '${ $.sizesConfig.name }:value'\n },\n listens: {\n 'pageSize': 'onPageSizeChange'\n },\n modules: {\n sizes: '${ $.sizesConfig.name }'\n }\n },\n\n /**\n * Initializes paging component.\n *\n * @returns {Paging} Chainable.\n */\n initialize: function () {\n this._super()\n .initSizes();\n\n return this;\n },\n\n /**\n * Initializes sizes component.\n *\n * @returns {Paging} Chainable.\n */\n initSizes: function () {\n if (this.sizesConfig.enabled) {\n layout([this.sizesConfig]);\n }\n\n return this;\n },\n\n /**\n * Initializes observable properties.\n *\n * @returns {Paging} Chainable.\n */\n initObservable: function () {\n this._super()\n .track([\n 'pageSize'\n ]);\n\n return this;\n },\n\n /**\n * Handles changes of the page size.\n */\n onPageSizeChange: function () {\n resolver(function () {\n if (this.elems().length) {\n this.reload();\n }\n }, this);\n }\n });\n});\n","Magento_Catalog/js/components/new-category.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/ui-select'\n], function (Select) {\n 'use strict';\n\n return Select.extend({\n\n /**\n * Parse data and set it to options.\n *\n * @param {Object} data - Response data object.\n * @returns {Object}\n */\n setParsed: function (data) {\n var option = this.parseData(data);\n\n if (data.error) {\n return this;\n }\n\n this.options([]);\n this.setOption(option);\n this.set('newOption', option);\n },\n\n /**\n * Normalize option object.\n *\n * @param {Object} data - Option object.\n * @returns {Object}\n */\n parseData: function (data) {\n return {\n 'is_active': data.category['is_active'],\n level: data.category.level,\n value: data.category['entity_id'],\n label: data.category.name,\n parent: data.category.parent\n };\n }\n });\n});\n","Magento_Catalog/js/components/new-attribute-form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/form/form',\n 'Magento_Ui/js/modal/prompt',\n 'Magento_Ui/js/modal/alert'\n], function ($, Form, prompt, alert) {\n 'use strict';\n\n return Form.extend({\n defaults: {\n newSetPromptMessage: '',\n listens: {\n responseData: 'processResponseData'\n },\n modules: {\n productForm: 'product_form.product_form'\n }\n },\n\n /**\n * Process response data\n *\n * @param {Object} data\n */\n processResponseData: function (data) {\n if (data.params['new_attribute_set_id']) {\n this.productForm().params = {\n set: data.params['new_attribute_set_id']\n };\n }\n },\n\n /**\n * Process Save In New Attribute Set prompt\n */\n saveAttributeInNewSet: function () {\n\n var self = this;\n\n this.validate();\n\n if (!this.additionalInvalid && !this.source.get('params.invalid')) {\n prompt({\n content: this.newSetPromptMessage,\n actions: {\n\n /**\n * @param {String} val\n * @this {actions}\n */\n confirm: function (val) {\n var rules = ['required-entry', 'validate-no-html-tags'],\n editForm = self,\n newAttributeSetName = val,\n i,\n params = {};\n\n if (!newAttributeSetName) {\n return;\n }\n\n for (i = 0; i < rules.length; i++) {\n if (!$.validator.methods[rules[i]](newAttributeSetName)) {\n alert({\n content: $.validator.messages[rules[i]]\n });\n\n return;\n }\n }\n\n params['new_attribute_set_name'] = newAttributeSetName;\n editForm.setAdditionalData(params);\n editForm.save();\n }\n }\n });\n } else {\n this.focusInvalid();\n }\n }\n });\n});\n","Magento_Catalog/js/components/attributes-fieldset.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/components/fieldset',\n 'Magento_Ui/js/core/app'\n], function (Fieldset, app) {\n 'use strict';\n\n return Fieldset.extend({\n defaults: {\n listens: {\n '${ $.provider }:additionalAttributes': 'onAttributeAdd'\n }\n },\n\n /**\n * On attribute add trigger\n *\n * @param {Object} listOfNewAttributes\n */\n onAttributeAdd: function (listOfNewAttributes) {\n app(listOfNewAttributes, true);\n }\n });\n});\n","Magento_Catalog/js/components/dynamic-rows-import-custom-options.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/dynamic-rows/dynamic-rows-grid',\n 'underscore',\n 'mageUtils'\n], function (DynamicRows, _, utils) {\n 'use strict';\n\n return DynamicRows.extend({\n defaults: {\n mappingSettings: {\n enabled: false,\n distinct: false\n },\n update: true,\n map: {\n 'option_id': 'option_id'\n },\n identificationProperty: 'option_id',\n identificationDRProperty: 'option_id'\n },\n\n /** @inheritdoc */\n processingInsertData: function (data) {\n var options = [],\n currentOption,\n generalContext = this;\n\n if (!data) {\n return;\n }\n _.each(data, function (item) {\n if (!item.options) {\n return;\n }\n _.each(item.options, function (option) {\n currentOption = utils.copy(option);\n\n if (currentOption.hasOwnProperty('option_id')) {\n delete currentOption['option_id'];\n }\n\n if (currentOption.values.length > 0) {\n generalContext.removeOptionsIds(currentOption.values);\n }\n options.push(currentOption);\n });\n });\n\n if (!options.length) {\n return;\n }\n this.cacheGridData = options;\n _.each(options, function (opt) {\n this.mappingValue(opt);\n }, this);\n\n this.insertData([]);\n },\n\n /**\n * Removes option_id and option_type_id from every option\n *\n * @param {Array} options\n */\n removeOptionsIds: function (options) {\n _.each(options, function (optionValue) {\n delete optionValue['option_id'];\n delete optionValue['option_type_id'];\n });\n },\n\n /** @inheritdoc */\n processingAddChild: function (ctx, index, prop) {\n if (!ctx) {\n this.showSpinner(true);\n this.addChild(ctx, index, prop);\n\n return;\n }\n\n this._super(ctx, index, prop);\n },\n\n /**\n * Set empty array to dataProvider\n */\n clearDataProvider: function () {\n this.source.set(this.dataProvider, []);\n },\n\n /**\n * Mutes parent method\n */\n updateInsertData: function () {\n return false;\n }\n });\n});\n","Magento_Catalog/js/components/attribute-set-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/ui-select'\n], function (Select) {\n 'use strict';\n\n return Select.extend({\n defaults: {\n listens: {\n 'value': 'changeFormSubmitUrl'\n },\n modules: {\n formProvider: '${ $.provider }'\n }\n },\n\n /**\n * Change set parameter in save and validate urls of form\n *\n * @param {String|Number} value\n */\n changeFormSubmitUrl: function (value) {\n var pattern = /(set\\/)(\\d)*?\\//,\n change = '$1' + value + '/';\n\n this.formProvider().client.urls.save = this.formProvider().client.urls.save.replace(pattern, change);\n this.formProvider().client.urls.beforeSave = this.formProvider().client.urls.beforeSave.replace(\n pattern,\n change\n );\n }\n });\n});\n","Magento_Catalog/js/components/custom-options-price-type.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'underscore',\n 'Magento_Ui/js/form/element/select',\n 'uiRegistry'\n], function (_, Select, uiRegistry) {\n 'use strict';\n\n return Select.extend({\n /**\n * {@inheritdoc}\n */\n onUpdate: function () {\n this._super();\n\n this.updateAddBeforeForPrice();\n },\n\n /**\n * {@inheritdoc}\n */\n setInitialValue: function () {\n this._super();\n\n this.updateAddBeforeForPrice();\n\n return this;\n },\n\n /**\n * Update addbefore for price field. Change it to currency or % depends of price_type value.\n */\n updateAddBeforeForPrice: function () {\n var addBefore, currentValue, priceIndex, priceName, uiPrice;\n\n priceIndex = typeof this.imports.priceIndex == 'undefined' ? 'price' : this.imports.priceIndex;\n priceName = this.parentName + '.' + priceIndex;\n\n uiPrice = uiRegistry.get(priceName);\n\n if (uiPrice && uiPrice.addbeforePool) {\n currentValue = this.value();\n\n uiPrice.addbeforePool.forEach(function (item) {\n if (item.value === currentValue) {\n addBefore = item.label;\n }\n });\n\n if (typeof addBefore != 'undefined') {\n uiPrice.addBefore(addBefore);\n }\n }\n }\n });\n});\n","Magento_Catalog/js/components/reset-dynamic-rows-grid-row-position-on-delete.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'underscore',\n 'uiRegistry',\n 'rjsResolver',\n 'Magento_Ui/js/dynamic-rows/dynamic-rows-grid'\n], function (_, registry, resolver, dynamicRowsGrid) {\n 'use strict';\n\n return dynamicRowsGrid.extend({\n\n /** @inheritdoc */\n deleteRecord: function () {\n this._super();\n this.resetPosition();\n },\n\n /**\n * Reset the position on delete of the record.\n */\n resetPosition() {\n let self = this,\n position = 0;\n\n _.filter(this.elems(), function (elem, index) {\n if (index === 0) {\n position = (self.currentPage() - 1) * self.pageSize + 1;\n }\n _.filter(elem.elems(),function (childElem) {\n if (childElem.index === 'position') {\n childElem.value(position);\n }\n });\n position++;\n });\n },\n\n /** @inheritdoc */\n nextPage: function () {\n this._super();\n resolver(function () {\n if (this.elems().length) {\n this.resetPosition();\n }\n }, this);\n }\n });\n});\n","Magento_Catalog/js/components/import-handler.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/abstract',\n 'underscore',\n 'uiRegistry'\n], function (Abstract, _, registry) {\n 'use strict';\n\n return Abstract.extend({\n defaults: {\n allowImport: true,\n autoImportIfEmpty: false,\n values: {},\n mask: '',\n queryTemplate: 'ns = ${ $.ns }, index = '\n },\n\n /** @inheritdoc */\n initialize: function () {\n this._super();\n\n if (this.allowImport) {\n this.setHandlers();\n }\n },\n\n /**\n * Split mask placeholder and attach events to placeholder fields.\n */\n setHandlers: function () {\n var str = this.mask || '',\n placeholders;\n\n placeholders = str.match(/{{(.*?)}}/g); // Get placeholders\n\n _.each(placeholders, function (placeholder) {\n placeholder = placeholder.replace(/[{{}}]/g, ''); // Remove curly braces\n\n registry.get(this.queryTemplate + placeholder, function (component) {\n this.values[placeholder] = component.getPreview();\n component.on('value', this.updateValue.bind(this, placeholder, component));\n component.valueUpdate = 'keyup';\n }.bind(this));\n }, this);\n },\n\n /**\n * Update field with mask value, if it's allowed.\n *\n * @param {Object} placeholder\n * @param {Object} component\n */\n updateValue: function (placeholder, component) {\n var string = this.mask || '',\n nonEmptyValueFlag = false;\n\n if (placeholder) {\n this.values[placeholder] = component.getPreview() || '';\n }\n\n if (!this.allowImport) {\n return;\n }\n\n _.each(this.values, function (propertyValue, propertyName) {\n string = string.replace('{{' + propertyName + '}}', propertyValue);\n nonEmptyValueFlag = nonEmptyValueFlag || !!propertyValue;\n });\n\n if (nonEmptyValueFlag) {\n string = string.replace(/(<([^>]+)>)/ig, ''); // Remove html tags\n this.value(string);\n } else {\n this.value('');\n }\n },\n\n /**\n * Disallow import when initial value isn't empty string\n *\n * @returns {*}\n */\n setInitialValue: function () {\n this._super();\n\n if (this.initialValue !== '') {\n this.allowImport = false;\n }\n\n return this;\n },\n\n /**\n * Callback when value is changed by user,\n * and disallow/allow import value\n */\n userChanges: function () {\n\n /**\n * As userChanges is called before updateValue,\n * we forced to get value from component by reference\n */\n var actualValue = arguments[1].currentTarget.value;\n\n this._super();\n\n if (actualValue === '') {\n this.allowImport = true;\n\n if (this.autoImportIfEmpty) {\n this.updateValue(null, null);\n }\n } else {\n this.allowImport = false;\n }\n }\n });\n});\n","Magento_Catalog/js/components/new-attribute-insert-form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/components/insert-form'\n], function (InsertForm) {\n 'use strict';\n\n return InsertForm.extend({\n defaults: {\n modules: {\n productForm: 'product_form.product_form'\n },\n listens: {\n responseStatus: 'processResponseStatus'\n },\n attributeSetId: 0,\n productId: 0\n },\n\n /**\n * Process response status.\n */\n processResponseStatus: function () {\n if (this.responseStatus()) {\n\n if (this.productForm().params === undefined) {\n this.productForm().params = {\n set: this.attributeSetId\n };\n }\n\n if (this.productId) {\n this.productForm().params.id = this.productId;\n }\n this.productForm().params.type = this.productType;\n\n this.productForm().reload();\n this.resetForm();\n }\n }\n });\n});\n","Magento_Catalog/js/components/checkbox.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @deprecated since version 2.2.0\n */\ndefine([\n 'Magento_Ui/js/form/element/abstract',\n 'knockout'\n], function (Abstract, ko) {\n 'use strict';\n\n return Abstract.extend({\n\n /**\n * Initializes observable properties of instance\n *\n * @returns {Element} Chainable.\n */\n initObservable: function () {\n this._super()\n .observe('checked');\n\n this.value = ko.pureComputed({\n\n /**\n * use 'mappedValue' as value if checked\n */\n read: function () {\n return this.checked() ? this.mappedValue : '';\n },\n\n /**\n * any value made checkbox checked\n */\n write: function (val) {\n if (val) {\n this.checked(true);\n }\n },\n owner: this\n });\n\n return this;\n }\n });\n});\n","Magento_Catalog/js/components/messages.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/components/html'\n], function (Html) {\n 'use strict';\n\n return Html.extend({\n defaults: {\n form: '${ $.namespace }.${ $.namespace }',\n visible: false,\n imports: {\n responseData: '${ $.form }:responseData',\n visible: 'responseData.error',\n content: 'responseData.messages'\n },\n listens: {\n '${ $.provider }:data.reset': 'hide'\n }\n },\n\n /**\n * Show messages.\n */\n show: function () {\n this.visible(true);\n },\n\n /**\n * Hide messages.\n */\n hide: function () {\n this.visible(false);\n }\n });\n});\n","Magento_Catalog/js/components/dynamic-rows-import-custom-options-per-page.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Catalog/js/components/dynamic-rows-import-custom-options',\n 'underscore',\n 'mageUtils',\n 'uiLayout',\n 'rjsResolver'\n], function (DrCustomOptions, _, utils, layout, resolver) {\n 'use strict';\n\n return DrCustomOptions.extend({\n defaults: {\n sizesConfig: {\n component: 'Magento_Ui/js/grid/paging/sizes',\n name: '${ $.name }_sizes',\n options: {\n '20': {\n value: 20,\n label: 20\n },\n '30': {\n value: 30,\n label: 30\n },\n '50': {\n value: 50,\n label: 50\n },\n '100': {\n value: 100,\n label: 100\n },\n '200': {\n value: 200,\n label: 200\n }\n },\n storageConfig: {\n provider: '${ $.storageConfig.provider }',\n namespace: '${ $.storageConfig.namespace }'\n },\n enabled: false\n },\n links: {\n options: '${ $.sizesConfig.name }:options',\n pageSize: '${ $.sizesConfig.name }:value'\n },\n listens: {\n 'pageSize': 'onPageSizeChange'\n },\n modules: {\n sizes: '${ $.sizesConfig.name }'\n }\n },\n\n /**\n * Initializes paging component.\n *\n * @returns {Paging} Chainable.\n */\n initialize: function () {\n this._super()\n .initSizes();\n\n return this;\n },\n\n /**\n * Initializes sizes component.\n *\n * @returns {Paging} Chainable.\n */\n initSizes: function () {\n if (this.sizesConfig.enabled) {\n layout([this.sizesConfig]);\n }\n\n return this;\n },\n\n /**\n * Initializes observable properties.\n *\n * @returns {Paging} Chainable.\n */\n initObservable: function () {\n this._super()\n .track([\n 'pageSize'\n ]);\n\n return this;\n },\n\n /**\n * Handles changes of the page size.\n */\n onPageSizeChange: function () {\n resolver(function () {\n if (this.elems().length) {\n this.reload();\n }\n }, this);\n }\n });\n});\n","Magento_Catalog/js/components/product-ui-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @deprecated see Magento/Ui/view/base/web/js/grid/filters/elements/ui-select.js\n */\ndefine([\n 'Magento_Ui/js/form/element/ui-select',\n 'jquery',\n 'underscore'\n], function (Select, $, _) {\n 'use strict';\n\n return Select.extend({\n defaults: {\n validationUrl: false,\n loadedOption: [],\n validationLoading: true\n },\n\n /** @inheritdoc */\n initialize: function () {\n this._super();\n\n this.validateInitialValue();\n\n return this;\n },\n\n /**\n * Validate initial value actually exists\n */\n validateInitialValue: function () {\n if (!_.isEmpty(this.value())) {\n $.ajax({\n url: this.validationUrl,\n type: 'GET',\n dataType: 'json',\n context: this,\n data: {\n productId: this.value()\n },\n\n /** @param {Object} response */\n success: function (response) {\n if (!_.isEmpty(response)) {\n this.options([response]);\n this.loadedOption = response;\n }\n },\n\n /** set empty array if error occurs */\n error: function () {\n this.options([]);\n },\n\n /** stop loader */\n complete: function () {\n this.validationLoading(false);\n this.setCaption();\n }\n });\n } else {\n this.validationLoading(false);\n }\n },\n\n /** @inheritdoc */\n getSelected: function () {\n var options = this._super();\n\n if (!_.isEmpty(this.loadedOption)) {\n return this.value() === this.loadedOption.value ? [this.loadedOption] : options;\n }\n\n return options;\n }\n });\n});\n","Magento_Catalog/js/components/attributes-insert-listing.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/lib/view/utils/async',\n 'uiRegistry',\n 'underscore',\n 'Magento_Ui/js/form/components/insert-listing'\n], function ($, registry, _, InsertListing) {\n 'use strict';\n\n return InsertListing.extend({\n defaults: {\n addAttributeUrl: '',\n attributeSetId: '',\n attributeIds: '',\n groupCode: '',\n groupName: '',\n groupSortOrder: 0,\n productId: 0,\n formProvider: '',\n modules: {\n form: '${ $.formProvider }',\n modal: '${ $.parentName }'\n },\n productType: ''\n },\n\n /**\n * Render attribute\n */\n render: function () {\n this._super();\n },\n\n /**\n * Save attribute\n */\n save: function () {\n this.addSelectedAttributes();\n this._super();\n },\n\n /**\n * Add selected attributes\n */\n addSelectedAttributes: function () {\n $.ajax({\n url: this.addAttributeUrl,\n type: 'POST',\n dataType: 'json',\n data: {\n attributeIds: this.selections().getSelections(),\n templateId: this.attributeSetId,\n groupCode: this.groupCode,\n groupName: this.groupName,\n groupSortOrder: this.groupSortOrder,\n productId: this.productId,\n componentJson: 1\n },\n success: function () {\n this.form().params = {\n set: this.attributeSetId,\n id: this.productId,\n type: this.productType\n };\n this.form().reload();\n this.modal().state(false);\n this.reload();\n }.bind(this)\n });\n }\n });\n});\n","Magento_Catalog/js/components/disable-on-option/strategy.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine(function () {\n 'use strict';\n\n return {\n defaults: {\n valuesForEnable: [],\n disabled: true,\n imports: {\n toggleDisable:\n 'product_attribute_add_form.product_attribute_add_form.base_fieldset.frontend_input:value'\n }\n },\n\n /**\n * Toggle disabled state.\n *\n * @param {Number} selected\n */\n toggleDisable: function (selected) {\n this.disabled(!(selected in this.valuesForEnable));\n }\n };\n});\n","Magento_Catalog/js/components/disable-on-option/select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/select',\n 'Magento_Catalog/js/components/disable-on-option/strategy'\n], function (Element, strategy) {\n 'use strict';\n\n return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/disable-on-option/input.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/abstract',\n 'Magento_Catalog/js/components/disable-on-option/strategy'\n], function (Element, strategy) {\n 'use strict';\n\n return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/disable-on-option/yesno.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/single-checkbox',\n 'Magento_Catalog/js/components/disable-on-option/strategy'\n], function (Element, strategy) {\n 'use strict';\n\n var comp = Element.extend(strategy).extend({\n\n defaults: {\n listens: {\n disabled: 'updateValueForDisabledField',\n visible: 'updateValueForDisabledField'\n }\n },\n\n /**\n * {@inheritdoc}\n */\n initialize: function () {\n this._super();\n this.updateValueForDisabledField();\n\n return this;\n },\n\n /**\n * Set element value to O(No) if element is invisible and disabled\n * Set element value to initialValue if element becomes visible and enable\n */\n updateValueForDisabledField: function () {\n if (!this.disabled() && this.visible()) {\n this.set('value', this.initialValue);\n } else {\n this.set('value', 0);\n }\n }\n });\n\n return comp.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/fieldset.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/components/fieldset',\n 'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Fieldset, strategy) {\n 'use strict';\n\n return Fieldset.extend(strategy).extend(\n {\n defaults: {\n openOnShow: true\n },\n\n /**\n * Toggle visibility state.\n */\n toggleVisibility: function () {\n this._super();\n\n if (this.openOnShow) {\n this.opened(this.inverseVisibility ? !this.isShown : this.isShown);\n }\n }\n }\n );\n});\n","Magento_Catalog/js/components/visible-on-option/strategy.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine(function () {\n 'use strict';\n\n return {\n defaults: {\n valuesForOptions: [],\n imports: {\n toggleVisibility:\n 'product_attribute_add_form.product_attribute_add_form.base_fieldset.frontend_input:value'\n },\n isShown: false,\n inverseVisibility: false\n },\n\n /**\n * Toggle visibility state.\n *\n * @param {Number} selected\n */\n toggleVisibility: function (selected) {\n this.isShown = selected in this.valuesForOptions;\n this.visible(this.inverseVisibility ? !this.isShown : this.isShown);\n }\n };\n});\n","Magento_Catalog/js/components/visible-on-option/select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/select',\n 'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n 'use strict';\n\n return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/date.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/date',\n 'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n 'use strict';\n\n return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/input.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/abstract',\n 'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n 'use strict';\n\n return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/textarea.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/textarea',\n 'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n 'use strict';\n\n return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/visible-on-option/yesno.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/single-checkbox',\n 'Magento_Catalog/js/components/visible-on-option/strategy'\n], function (Element, strategy) {\n 'use strict';\n\n return Element.extend(strategy);\n});\n","Magento_Catalog/js/components/use-parent-settings/select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'Magento_Ui/js/form/element/select'\n], function (Component) {\n 'use strict';\n\n return Component;\n});\n","Magento_Catalog/js/components/use-parent-settings/single-checkbox.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'Magento_Ui/js/form/element/single-checkbox'\n], function (Component) {\n 'use strict';\n\n return Component;\n});\n","Magento_Catalog/js/components/use-parent-settings/textarea.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'Magento_Ui/js/form/element/textarea'\n], function (Component) {\n 'use strict';\n\n return Component;\n});\n","Magento_Catalog/js/components/use-parent-settings/toggle-disabled-mixin.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'underscore'\n], function (_) {\n 'use strict';\n\n var mixin = {\n defaults: {\n imports: {\n toggleDisabled: '${ $.parentName }.custom_use_parent_settings:checked'\n },\n useParent: false,\n useDefaults: false\n },\n\n /**\n * Disable form input if settings for parent section is used\n * or default value is applied.\n *\n * @param {Boolean} isUseParent\n */\n toggleDisabled: function (isUseParent) {\n var disabled = this.useParent = isUseParent;\n\n if (!disabled && !_.isUndefined(this.service)) {\n disabled = !!this.isUseDefault();\n }\n\n this.saveUseDefaults();\n this.disabled(disabled);\n },\n\n /**\n * Stores original state of the field.\n */\n saveUseDefaults: function () {\n this.useDefaults = this.disabled();\n },\n\n /** @inheritdoc */\n setInitialValue: function () {\n this._super();\n this.isUseDefault(this.useDefaults);\n\n return this;\n },\n\n /** @inheritdoc */\n toggleUseDefault: function (state) {\n this._super();\n this.disabled(state || this.useParent);\n }\n };\n\n return function (target) {\n return target.extend(mixin);\n };\n});\n","Magento_Catalog/js/utils/percentage-price-calculator.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine(['Magento_Ui/js/lib/validation/utils'], function (utils) {\n 'use strict';\n\n /**\n * Calculates the price input value when entered percentage value.\n *\n * @param {String} price\n * @param {String} input\n *\n * @returns {String}\n */\n return function (price, input) {\n var result,\n lastInputSymbol = input.slice(-1),\n inputPercent = input.slice(0, -1),\n parsedPercent = utils.parseNumber(inputPercent),\n parsedPrice = utils.parseNumber(price);\n\n if (lastInputSymbol !== '%') {\n result = input;\n } else if (\n input === '%' ||\n isNaN(parsedPrice) ||\n parsedPercent != inputPercent || /* eslint eqeqeq:0 */\n isNaN(parsedPercent) ||\n input === ''\n ) {\n result = '';\n } else if (parsedPercent > 100) {\n result = '0.00';\n } else if (lastInputSymbol === '%') {\n result = parsedPrice - parsedPrice * (inputPercent / 100);\n result = result.toFixed(2);\n } else {\n result = input;\n }\n\n return result;\n };\n});\n","Magento_Catalog/js/tier-price/value-type-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/select',\n 'uiRegistry',\n 'underscore'\n], function (Select, uiRegistry, _) {\n 'use strict';\n\n return Select.extend({\n defaults: {\n prices: {}\n },\n\n /**\n * {@inheritdoc}\n */\n initialize: function () {\n this._super();\n delete this.prices.__disableTmpl;\n this.prepareForm();\n },\n\n /**\n * {@inheritdoc}\n */\n setInitialValue: function () {\n this.initialValue = this.getInitialValue();\n\n if (this.value.peek() !== this.initialValue) {\n this.value(this.initialValue);\n }\n\n this.isUseDefault(this.disabled());\n\n return this;\n },\n\n /**\n * {@inheritdoc}\n */\n prepareForm: function () {\n var elements = this.getElementsByPrices(),\n prices = this.prices,\n currencyType = _.keys(prices)[0],\n select = this;\n\n uiRegistry.get(elements, function () {\n _.each(arguments, function (currentValue) {\n if (parseFloat(currentValue.value()) > 0) {\n _.each(prices, function (priceValue, priceKey) {\n if (priceValue === currentValue.name) {\n currencyType = priceKey;\n }\n });\n }\n });\n select.value(currencyType);\n select.on('value', select.onUpdate.bind(select));\n select.onUpdate();\n });\n },\n\n /**\n * @returns {Array}\n */\n getElementsByPrices: function () {\n var elements = [];\n\n _.each(this.prices, function (currentValue) {\n elements.push(currentValue);\n });\n\n return elements;\n },\n\n /**\n * Callback that fires when 'value' property is updated\n */\n onUpdate: function () {\n var value = this.value(),\n prices = this.prices,\n select = this,\n parentDataScopeArr = this.dataScope.split('.'),\n parentDataScope,\n elements = this.getElementsByPrices();\n\n parentDataScopeArr.pop();\n parentDataScope = parentDataScopeArr.join('.');\n\n uiRegistry.get(elements, function () {\n var sourceData = select.source.get(parentDataScope);\n\n _.each(arguments, function (currentElement) {\n var index;\n\n _.each(prices, function (priceValue, priceKey) {\n if (priceValue === currentElement.name) {\n index = priceKey;\n }\n });\n\n if (value === index) {\n currentElement.visible(true);\n sourceData[currentElement.index] = currentElement.value();\n } else {\n currentElement.value('');\n currentElement.visible(false);\n delete sourceData[currentElement.index];\n }\n });\n select.source.set(parentDataScope, sourceData);\n });\n }\n });\n});\n","Magento_Catalog/js/tier-price/percentage-processor.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'uiElement',\n 'underscore',\n 'Magento_Ui/js/lib/view/utils/async',\n 'Magento_Catalog/js/utils/percentage-price-calculator'\n], function (Element, _, $, percentagePriceCalculator) {\n 'use strict';\n\n return Element.extend({\n defaults: {\n priceElem: '${ $.parentName }.price',\n selector: 'input',\n imports: {\n priceValue: '${ $.priceElem }:priceValue'\n },\n exports: {\n calculatedVal: '${ $.priceElem }:value'\n }\n },\n\n /**\n * {@inheritdoc}\n */\n initialize: function () {\n this._super();\n\n _.bindAll(this, 'initPriceListener', 'onInput');\n\n $.async({\n component: this.priceElem,\n selector: this.selector\n }, this.initPriceListener);\n\n return this;\n },\n\n /**\n * {@inheritdoc}\n */\n initObservable: function () {\n return this._super()\n .observe(['visible']);\n },\n\n /**\n * Handles keyup event on price input.\n *\n * {@param} HTMLElement elem\n */\n initPriceListener: function (elem) {\n $(elem).on('keyup.priceCalc', this.onInput);\n },\n\n /**\n * Delegates calculation of the price input value to percentagePriceCalculator.\n *\n * {@param} object event\n */\n onInput: function (event) {\n var value = event.currentTarget.value;\n\n if (value.slice(-1) === '%') {\n value = percentagePriceCalculator(this.priceValue, value);\n this.set('calculatedVal', value);\n }\n }\n });\n});\n","Magento_Catalog/catalog/product-attributes.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'underscore',\n 'uiRegistry',\n 'jquery/ui',\n 'mage/translate'\n], function ($, _, registry) {\n 'use strict';\n\n $.widget('mage.productAttributes', {\n /** @inheritdoc */\n _create: function () {\n this._on({\n 'click': '_showPopup'\n });\n },\n\n /**\n * @private\n */\n _initModal: function () {\n var self = this;\n\n this.modal = $('<div id=\"create_new_attribute\"></div>').modal({\n title: $.mage.__('New Attribute'),\n type: 'slide',\n buttons: [],\n\n /** @inheritdoc */\n opened: function () {\n $(this).parent().addClass('modal-content-new-attribute');\n self.iframe = $('<iframe id=\"create_new_attribute_container\"></iframe>').attr({\n src: self._prepareUrl(),\n frameborder: 0\n });\n self.modal.append(self.iframe);\n self._changeIframeSize();\n $(window).off().on('resize.modal', _.debounce(self._changeIframeSize.bind(self), 400));\n },\n\n /** @inheritdoc */\n closed: function () {\n var doc = self.iframe.get(0).document;\n\n if (doc && typeof doc.execCommand === 'function') {\n //IE9 break script loading but not execution on iframe removing\n doc.execCommand('stop');\n self.iframe.remove();\n }\n self.modal.data('mageModal').modal.remove();\n $(window).off('resize.modal');\n }\n });\n },\n\n /**\n * @return {Number}\n * @private\n */\n _getHeight: function () {\n var modal = this.modal.data('mageModal').modal,\n modalHead = modal.find('header'),\n modalHeadHeight = modalHead.outerHeight(),\n modalHeight = modal.outerHeight(),\n modalContentPadding = this.modal.parent().outerHeight() - this.modal.parent().height();\n\n return modalHeight - modalHeadHeight - modalContentPadding;\n },\n\n /**\n * @return {Number}\n * @private\n */\n _getWidth: function () {\n return this.modal.width();\n },\n\n /**\n * @private\n */\n _changeIframeSize: function () {\n this.modal.parent().outerHeight(this._getHeight());\n this.iframe.outerHeight(this._getHeight());\n this.iframe.outerWidth(this._getWidth());\n\n },\n\n /**\n * @return {String}\n * @private\n */\n _prepareUrl: function () {\n var productSource,\n attributeSetId = '';\n\n if (this.options.dataProvider) {\n try {\n productSource = registry.get(this.options.dataProvider);\n attributeSetId = productSource.data.product['attribute_set_id'];\n } catch (e) {}\n }\n\n return this.options.url +\n (/\\?/.test(this.options.url) ? '&' : '?') +\n 'set=' + attributeSetId;\n },\n\n /**\n * @private\n */\n _showPopup: function () {\n this._initModal();\n this.modal.modal('openModal');\n }\n });\n\n return $.mage.productAttributes;\n});\n","Magento_Catalog/catalog/apply-to-type-switcher.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'jquery',\n 'Magento_Catalog/catalog/type-events'\n], function ($, productType) {\n 'use strict';\n\n return {\n\n /**\n * Bind event\n */\n bindAll: function () {\n $('[data-form=edit-product] [data-role=tabs]').on(\n 'contentUpdated',\n this._switchToTypeByApplyAttr.bind(this)\n );\n\n $('#product_info_tabs').on(\n 'beforePanelsMove tabscreate tabsactivate',\n this._switchToTypeByApplyAttr.bind(this)\n );\n\n $(document).on('changeTypeProduct', this._switchToTypeByApplyAttr.bind(this));\n },\n\n /**\n * Constructor component\n */\n 'Magento_Catalog/catalog/apply-to-type-switcher': function () {\n this.bindAll();\n this._switchToTypeByApplyAttr();\n },\n\n /**\n * Show/hide elements based on type\n *\n * @private\n */\n _switchToTypeByApplyAttr: function () {\n $('[data-apply-to]:not(.removed)').each(function (index, element) {\n var attrContainer = $(element),\n applyTo = attrContainer.data('applyTo') || [],\n $inputs = attrContainer.find('select, input, textarea');\n\n if (applyTo.length === 0 || $.inArray(productType.type.current, applyTo) !== -1) {\n attrContainer.removeClass('not-applicable-attribute');\n $inputs.removeClass('ignore-validate');\n } else {\n attrContainer.addClass('not-applicable-attribute');\n $inputs.addClass('ignore-validate');\n }\n });\n }\n };\n});\n","Magento_Catalog/catalog/type-events.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery'\n], function ($) {\n 'use strict';\n\n return {\n $type: $('#product_type_id'),\n\n /**\n * Init\n */\n init: function () {\n this.type = {\n init: this.$type.val(),\n current: this.$type.val()\n };\n\n this.bindAll();\n },\n\n /**\n * Bind all\n */\n bindAll: function () {\n $(document).on('setTypeProduct', function (event, type) {\n this.setType(type);\n }.bind(this));\n\n //direct change type input\n this.$type.on('change', function () {\n this.type.current = this.$type.val();\n this._notifyType();\n }.bind(this));\n },\n\n /**\n * Set type\n * @param {String} type - type product (downloadable, simple, virtual ...)\n * @returns {*}\n */\n setType: function (type) {\n return this.$type.val(type || this.type.init).trigger('change');\n },\n\n /**\n * Notify type\n * @private\n */\n _notifyType: function () {\n $(document).trigger('changeTypeProduct', this.type);\n }\n };\n});\n","Magento_Catalog/catalog/base-image-uploader.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/template',\n 'Magento_Ui/js/modal/alert',\n 'jquery/ui',\n 'jquery/file-uploader',\n 'mage/translate',\n 'mage/backend/notification'\n], function ($, mageTemplate, alert) {\n 'use strict';\n\n $.widget('mage.baseImage', {\n /**\n * Button creation\n * @protected\n */\n options: {\n maxImageUploadCount: 10\n },\n\n /** @inheritdoc */\n _create: function () {\n var $container = this.element,\n imageTmpl = mageTemplate(this.element.find('[data-template=image]').html()),\n $dropPlaceholder = this.element.find('.image-placeholder'),\n $galleryContainer = $('#media_gallery_content'),\n mainClass = 'base-image',\n maximumImageCount = 5,\n $fieldCheckBox = $container.closest('[data-attribute-code=image]').find(':checkbox'),\n isDefaultChecked = $fieldCheckBox.is(':checked'),\n findElement, updateVisibility;\n\n if (isDefaultChecked) {\n $fieldCheckBox.trigger('click');\n }\n\n /**\n * @param {Object} data\n * @return {HTMLElement}\n */\n findElement = function (data) {\n return $container.find('.image:not(.image-placeholder)').filter(function () {\n if (!$(this).data('image')) {\n return false;\n }\n\n return $(this).data('image').file === data.file;\n }).first();\n };\n\n /** Update image visibility. */\n updateVisibility = function () {\n var elementsList = $container.find('.image:not(.removed-item)');\n\n elementsList.each(function (index) {\n $(this)[index < maximumImageCount ? 'show' : 'hide']();\n });\n $dropPlaceholder[elementsList.length > maximumImageCount ? 'hide' : 'show']();\n };\n\n $galleryContainer.on('setImageType', function (event, data) {\n if (data.type === 'image') {\n $container.find('.' + mainClass).removeClass(mainClass);\n\n if (data.imageData) {\n findElement(data.imageData).addClass(mainClass);\n }\n }\n });\n\n $galleryContainer.on('addItem', function (event, data) {\n var tmpl = imageTmpl({\n data: data\n });\n\n $(tmpl).data('image', data).insertBefore($dropPlaceholder);\n\n updateVisibility();\n });\n\n $galleryContainer.on('removeItem', function (event, image) {\n findElement(image).addClass('removed-item').hide();\n updateVisibility();\n });\n\n $galleryContainer.on('moveElement', function (event, data) {\n var $element = findElement(data.imageData),\n $after;\n\n if (data.position === 0) {\n $container.prepend($element);\n } else {\n $after = $container.find('.image').eq(data.position);\n\n if (!$element.is($after)) {\n $element.insertAfter($after);\n }\n }\n updateVisibility();\n });\n\n $container.on('click', '[data-role=make-base-button]', function (event) {\n var data;\n\n event.preventDefault();\n data = $(event.target).closest('.image').data('image');\n $galleryContainer.productGallery('setBase', data);\n });\n\n $container.on('click', '[data-role=delete-button]', function (event) {\n event.preventDefault();\n $galleryContainer.trigger('removeItem', $(event.target).closest('.image').data('image'));\n });\n\n $container.sortable({\n axis: 'x',\n items: '.image:not(.image-placeholder)',\n distance: 8,\n tolerance: 'pointer',\n\n /**\n * @param {jQuery.Event} event\n * @param {Object} data\n */\n stop: function (event, data) {\n $galleryContainer.trigger('setPosition', {\n imageData: data.item.data('image'),\n position: $container.find('.image').index(data.item)\n });\n $galleryContainer.trigger('resort');\n }\n }).disableSelection();\n\n this.element.find('input[type=\"file\"]').fileupload({\n dataType: 'json',\n dropZone: $dropPlaceholder.closest('[data-attribute-code]'),\n acceptFileTypes: /(\\.|\\/)(gif|jpe?g|png)$/i,\n maxFileSize: this.element.data('maxFileSize'),\n\n /**\n * @param {jQuery.Event} event\n * @param {Object} data\n */\n done: function (event, data) {\n $dropPlaceholder.find('.progress-bar').text('').removeClass('in-progress');\n\n if (!data.result) {\n return;\n }\n\n if (!data.result.error) {\n $galleryContainer.trigger('addItem', data.result);\n } else {\n alert({\n content: $.mage.__('We don\\'t recognize or support this file extension type.')\n });\n }\n },\n\n /**\n * @param {jQuery.Event} e\n * @param {Object} data\n */\n change: function (e, data) {\n if (data.files.length > this.options.maxImageUploadCount) {\n $('body').notification('clear').notification('add', {\n error: true,\n message: $.mage.__('You can\\'t upload more than ' + this.options.maxImageUploadCount +\n ' images in one time'),\n\n /**\n * @param {*} message\n */\n insertMethod: function (message) {\n $('.page-main-actions').after(message);\n }\n });\n\n return false;\n }\n }.bind(this),\n\n /**\n * @param {jQuery.Event} event\n * @param {*} data\n */\n add: function (event, data) {\n $(this).fileupload('process', data).done(function () {\n data.submit();\n });\n },\n\n /**\n * @param {jQuery.Event} e\n * @param {Object} data\n */\n progress: function (e, data) {\n var progress = parseInt(data.loaded / data.total * 100, 10);\n\n $dropPlaceholder.find('.progress-bar').addClass('in-progress').text(progress + '%');\n },\n\n /**\n * @param {jQuery.Event} event\n */\n start: function (event) {\n var uploaderContainer = $(event.target).closest('.image-placeholder');\n\n uploaderContainer.addClass('loading');\n },\n\n /**\n * @param {jQuery.Event} event\n */\n stop: function (event) {\n var uploaderContainer = $(event.target).closest('.image-placeholder');\n\n uploaderContainer.removeClass('loading');\n }\n });\n }\n });\n\n return $.mage.baseImage;\n});\n","Magento_Catalog/catalog/product.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\nrequire([\n 'jquery'\n], function ($) {\n 'use strict';\n\n window.Product = {};\n\n /**\n * @param {String} id\n * @return {*|jQuery|HTMLElement}\n */\n function byId(id) {\n return $('#' + id);\n }\n\n /**\n * @param {String} fieldId\n */\n function disableFieldEditMode(fieldId) {\n var field = byId(fieldId);\n\n field.prop('disabled', true);\n\n if (field.next().hasClass('addafter')) {\n field.parent().addClass('_update-attributes-disabled');\n }\n\n if (byId(fieldId + '_hidden').length) {\n byId(fieldId + '_hidden').prop('disabled', true);\n }\n }\n\n /**\n * @param {String} fieldId\n */\n function enableFieldEditMode(fieldId) {\n var field = byId(fieldId);\n\n field.prop('disabled', false);\n\n if (field.parent().hasClass('_update-attributes-disabled')) {\n field.parent().removeClass('_update-attributes-disabled');\n }\n\n if (byId(fieldId + '_hidden').length) {\n byId(fieldId + '_hidden').prop('disabled', false);\n }\n }\n\n /**\n * @param {String} toogleIdentifier\n * @param {String} fieldId\n */\n function toogleFieldEditMode(toogleIdentifier, fieldId) {\n if ($(toogleIdentifier).is(':checked')) {\n enableFieldEditMode(fieldId);\n } else {\n disableFieldEditMode(fieldId);\n }\n }\n\n /**\n * On complete disable.\n */\n function onCompleteDisableInited() {\n var item;\n\n $.each($('[data-disable]'), function () {\n item = $(this).data('disable');\n disableFieldEditMode(item);\n });\n }\n\n /**\n * @param {String} urlKey\n */\n function onUrlkeyChanged(urlKey) {\n var hidden, chbx, oldValue;\n\n urlKey = byId(urlKey);\n hidden = urlKey.siblings('input[type=hidden]');\n chbx = urlKey.siblings('input[type=checkbox]');\n oldValue = chbx.val();\n\n chbx.prop('disabled', oldValue === urlKey.val());\n hidden.prop('disabled', chbx.prop('disabled'));\n }\n\n /**\n * @param {HTMLElement} element\n */\n function onCustomUseParentChanged(element) {\n var useParent, parent;\n\n element = $(element);\n useParent = element.val() == 1; //eslint-disable-line eqeqeq\n parent = element.offsetParent().parent();\n\n parent.find('input, select, textarea').each(function (i, el) {\n el = $(el);\n\n if (element.prop('id') !== el.prop('id')) {\n el.prop('disabled', useParent);\n }\n });\n\n parent.find('img').each(function (i, el) {\n if (useParent) {\n $(el).hide();\n } else {\n $(el).show();\n }\n });\n }\n\n window.onCustomUseParentChanged = onCustomUseParentChanged;\n window.onUrlkeyChanged = onUrlkeyChanged;\n window.toogleFieldEditMode = toogleFieldEditMode;\n\n $(onCompleteDisableInited);\n});\n","Magento_Catalog/catalog/product/composite/configure.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n 'jquery',\n 'Magento_Ui/js/lib/view/utils/async',\n 'jquery/ui',\n 'mage/translate',\n 'prototype',\n 'Magento_Ui/js/modal/modal'\n], function (jQuery) {\n\n window.ProductConfigure = Class.create();\n\n ProductConfigure.prototype = {\n\n listTypes: $H({}),\n current: $H({}),\n itemsFilter: $H({}),\n blockWindow: null,\n blockForm: null,\n blockFormFields: null,\n blockFormAdd: null,\n blockFormConfirmed: null,\n blockConfirmed: null,\n blockIFrame: null,\n blockCancelBtn: null,\n blockMask: null,\n blockMsg: null,\n blockMsgError: null,\n windowHeight: null,\n confirmedCurrentId: null,\n confirmCallback: {},\n cancelCallback: {},\n onLoadIFrameCallback: {},\n showWindowCallback: {},\n beforeSubmitCallback: {},\n iFrameJSVarname: null,\n _listTypeId: 1,\n\n /**\n * Initialize object\n */\n initialize: function () {\n var self = this,\n popupDialog = jQuery('#product_composite_configure');\n\n this._initWindowElements();\n jQuery.async('#product_composite_configure', function (el) {\n if (el !== popupDialog[0]) {\n el = popupDialog[0];\n }\n self.dialog = jQuery(el).modal({\n title: jQuery.mage.__('Configure Product'),\n type: 'slide',\n buttons: [{\n text: jQuery.mage.__('OK'),\n 'class': 'action-primary',\n click: function () {\n self.onConfirmBtn();\n }\n }],\n closed: function () {\n self.clean('window');\n },\n });\n });\n },\n\n /**\n * Initialize window elements\n */\n _initWindowElements: function () {\n this.blockWindow = $('product_composite_configure');\n this.blockForm = $('product_composite_configure_form');\n this.blockFormFields = $('product_composite_configure_form_fields');\n this.blockFormAdd = $('product_composite_configure_form_additional');\n this.blockFormConfirmed = $('product_composite_configure_form_confirmed');\n this.blockConfirmed = $('product_composite_configure_confirmed');\n this.blockIFrame = $('product_composite_configure_iframe');\n this.blockCancelBtn = $('product_composite_configure_form_cancel');\n this.blockMsg = $('product_composite_configure_messages');\n this.blockMsgError = this.blockMsg.select('.message.error div')[0];\n this.iFrameJSVarname = this.blockForm.select('input[name=\"as_js_varname\"]')[0].value;\n },\n\n /**\n * Returns next unique list type id\n */\n _generateListTypeId: function () {\n return '_internal_lt_' + this._listTypeId++;\n },\n\n /**\n * Add product list types as scope and their urls\n * example: addListType('product_to_add', {urlFetch: 'http://magento...'})\n * example: addListType('wishlist', {urlSubmit: 'http://magento...'})\n *\n * @param type types as scope\n * @param urls obj can be\n * - {urlFetch: 'http://magento...'} for fetching configuration fields through ajax\n * - {urlConfirm: 'http://magento...'} for submit configured data through iFrame when clicked confirm button\n * - {urlSubmit: 'http://magento...'} for submit configured data through iFrame\n */\n addListType: function (type, urls) {\n if ('undefined' == typeof this.listTypes[type]) {\n this.listTypes[type] = {};\n }\n Object.extend(this.listTypes[type], urls);\n\n return this;\n },\n\n /**\n * Adds complex list type - that is used to submit several list types at once\n * Only urlSubmit is possible for this list type\n * example: addComplexListType(['wishlist', 'product_list'], 'http://magento...')\n *\n * @param type types as scope\n * @param urls obj can be\n * - {urlSubmit: 'http://magento...'} for submit configured data through iFrame\n * @return type string\n */\n addComplexListType: function (types, urlSubmit) {\n var type = this._generateListTypeId();\n\n this.listTypes[type] = {};\n this.listTypes[type].complexTypes = types;\n this.listTypes[type].urlSubmit = urlSubmit;\n\n return type;\n },\n\n /**\n * Add filter of items\n *\n * @param listType scope name\n * @param itemsFilter\n */\n addItemsFilter: function (listType, itemsFilter) {\n if (!listType || !itemsFilter) {\n return false;\n }\n\n if ('undefined' == typeof this.itemsFilter[listType]) {\n this.itemsFilter[listType] = [];\n }\n this.itemsFilter[listType] = this.itemsFilter[listType].concat(itemsFilter);\n\n return this;\n },\n\n /**\n * Returns id of block where configuration for an item is stored\n *\n * @param listType scope name\n * @param itemId\n * @return string\n */\n _getConfirmedBlockId: function (listType, itemId) {\n return this.blockConfirmed.id + '[' + listType + '][' + itemId + ']';\n },\n\n /**\n * Checks whether item has some configuration fields\n *\n * @param listType scope name\n * @param itemId\n * @return bool\n */\n itemConfigured: function (listType, itemId) {\n var confirmedBlockId = this._getConfirmedBlockId(listType, itemId);\n var itemBlock = $(confirmedBlockId);\n\n return !!(itemBlock && itemBlock.innerHTML);\n },\n\n /**\n * Show configuration fields of item, if it not found then get it through ajax\n *\n * @param listType scope name\n * @param itemId\n */\n showItemConfiguration: function (listType, itemId) {\n if (!listType || !itemId) {\n return false;\n }\n\n this.initialize();\n this.current.listType = listType;\n this.current.itemId = itemId;\n this.confirmedCurrentId = this._getConfirmedBlockId(listType, itemId);\n\n if (!this.itemConfigured(listType, itemId)) {\n this._requestItemConfiguration(listType, itemId);\n } else {\n this._processFieldsData('item_restore');\n this._showWindow();\n }\n },\n\n /**\n * Get configuration fields of product through ajax and show them\n *\n * @param listType scope name\n * @param itemId\n */\n _requestItemConfiguration: function (listType, itemId) {\n if (!this.listTypes[listType].urlFetch) {\n return false;\n }\n var url = this.listTypes[listType].urlFetch;\n\n if (url) {\n new Ajax.Request(url, {\n parameters: {\n id: itemId\n },\n onSuccess: function (transport) {\n var response = transport.responseText;\n\n if (response.isJSON()) {\n response = response.evalJSON();\n\n if (response.error) {\n this.blockMsg.show();\n this.blockMsgError.innerHTML = response.message;\n if(this.blockCancelBtn) {\n this.blockCancelBtn.hide();\n }\n this.setConfirmCallback(listType, null);\n this._showWindow();\n }\n } else if (response) {\n response += '';\n this.blockFormFields.update(response);\n\n // Add special div to hold mage data, e.g. scripts to execute on every popup show\n var mageData = {};\n var scripts = response.extractScripts();\n\n mageData.scripts = scripts;\n\n var scriptHolder = new Element('div', {\n 'style': 'display:none'\n });\n\n scriptHolder.mageData = mageData;\n this.blockFormFields.insert(scriptHolder);\n\n // Show window\n this._showWindow();\n }\n }.bind(this)\n });\n }\n },\n\n /**\n * Triggered on confirm button click\n * Do submit configured data through iFrame if needed\n */\n onConfirmBtn: function () {\n if (jQuery(this.blockForm).valid()) {\n if (this.listTypes[this.current.listType].urlConfirm) {\n this.submit();\n } else {\n this._processFieldsData('item_confirm');\n this._closeWindow();\n\n if (Object.isFunction(this.confirmCallback[this.current.listType])) {\n this.confirmCallback[this.current.listType]();\n }\n }\n }\n\n return this;\n },\n\n /**\n * Triggered on cancel button click\n */\n onCancelBtn: function () {\n this._closeWindow();\n\n if (Object.isFunction(this.cancelCallback[this.current.listType])) {\n this.cancelCallback[this.current.listType]();\n }\n\n return this;\n },\n\n /**\n * Submit configured data through iFrame\n *\n * @param listType scope name\n */\n submit: function (listType) {\n // prepare data\n if (listType) {\n this.current.listType = listType;\n this.current.itemId = null;\n }\n var urlConfirm = this.listTypes[this.current.listType].urlConfirm;\n var urlSubmit = this.listTypes[this.current.listType].urlSubmit;\n\n if (!urlConfirm && !urlSubmit) {\n return false;\n }\n\n if (urlConfirm) {\n this.blockForm.action = urlConfirm;\n this.addFields([new Element('input', {\n type: 'hidden', name: 'id', value: this.current.itemId\n })]);\n } else {\n this.blockForm.action = urlSubmit;\n\n var complexTypes = this.listTypes[this.current.listType].complexTypes;\n\n if (complexTypes) {\n this.addFields([new Element('input', {\n type: 'hidden', name: 'configure_complex_list_types', value: complexTypes.join(',')\n })]);\n }\n\n this._processFieldsData('current_confirmed_to_form');\n\n // Disable item controls that duplicate added fields (e.g. sometimes qty controls can intersect)\n // so they won't be submitted\n var tagNames = ['input', 'select', 'textarea'];\n\n var names = {}; // Map of added field names\n\n for (var i = 0, len = tagNames.length; i < len; i++) {\n var tagName = tagNames[i];\n var elements = this.blockFormAdd.getElementsByTagName(tagName);\n\n for (var index = 0, elLen = elements.length; index < elLen; index++) {\n names[elements[index].name] = true;\n }\n }\n\n for (var i = 0, len = tagNames.length; i < len; i++) {\n var tagName = tagNames[i];\n var elements = this.blockFormConfirmed.getElementsByTagName(tagName);\n\n for (var index = 0, elLen = elements.length; index < elLen; index++) {\n var element = elements[index];\n\n if (names[element.name]) {\n element.setAttribute('configure_disabled', 1);\n element.setAttribute('configure_prev_disabled', element.disabled ? 1 : 0);\n element.disabled = true;\n } else {\n element.setAttribute('configure_disabled', 0);\n }\n }\n }\n }\n // do submit\n if (Object.isFunction(this.beforeSubmitCallback[this.current.listType])) {\n this.beforeSubmitCallback[this.current.listType]();\n }\n this.blockForm.submit();\n\n // Show loader\n jQuery(this.blockForm).trigger('processStart');\n\n return this;\n },\n\n /**\n * Add dynamically additional fields for form\n *\n * @param fields\n */\n addFields: function (fields) {\n fields.each(function (elm) {\n this.blockFormAdd.insert(elm);\n }.bind(this));\n\n return this;\n },\n\n /**\n * Triggered when form was submitted and iFrame was loaded. Get response from iFrame and handle it\n */\n onLoadIFrame: function () {\n this.blockFormConfirmed.select('[configure_disabled=1]').each(function (element) {\n element.disabled = element.getAttribute('configure_prev_disabled') == '1';\n });\n\n this._processFieldsData('form_confirmed_to_confirmed');\n\n var response = this.blockIFrame.contentWindow[this.iFrameJSVarname];\n\n if (response && 'object' == typeof response) {\n if (this.listTypes[this.current.listType].urlConfirm) {\n if (response.ok) {\n this._closeWindow();\n this.clean('current');\n } else if (response.error) {\n this.showItemConfiguration(this.current.listType, this.current.itemId);\n this.blockMsg.show();\n this.blockMsgError.innerHTML = response.message;\n this._showWindow();\n\n jQuery(this.blockForm).trigger('processStop');\n return false;\n }\n }\n\n if (Object.isFunction(this.onLoadIFrameCallback[this.current.listType])) {\n this.onLoadIFrameCallback[this.current.listType](response);\n }\n document.fire(this.current.listType + ':afterIFrameLoaded');\n }\n // Hide loader\n jQuery(this.blockForm).trigger('processStop');\n\n this.clean('current');\n this.initialize();\n },\n\n /**\n * Helper for fetching content from iFrame\n */\n _getIFrameContent: function () {\n var content = this.blockIFrame.contentWindow || this.blockIFrame.contentDocument;\n\n if (content.document) {\n content = content.document;\n }\n\n return content;\n },\n\n /**\n * Helper to find qty of currently confirmed item\n */\n getCurrentConfirmedQtyElement: function () {\n var elms = $(this.confirmedCurrentId).getElementsByTagName('input');\n\n for (var i = 0; i < elms.length; i++) {\n if (elms[i].name == 'qty') {\n return elms[i];\n }\n }\n },\n\n /**\n * Helper to find select element of currently confirmed item\n */\n getCurrentConfirmedSelectElement: function () {\n return $(this.confirmedCurrentId).getElementsByTagName('select');\n },\n\n /**\n * Helper to find qty of active form\n */\n getCurrentFormQtyElement: function () {\n var elms = this.blockFormFields.getElementsByTagName('input');\n\n for (var i = 0; i < elms.length; i++) {\n if (elms[i].name == 'qty') {\n return elms[i];\n }\n }\n },\n\n /**\n * Show configuration window\n */\n _showWindow: function () {\n this.dialog.modal('openModal');\n //this._toggleSelectsExceptBlock(false);\n\n if (Object.isFunction(this.showWindowCallback[this.current.listType])) {\n this.showWindowCallback[this.current.listType]();\n }\n },\n\n /**\n * Close configuration window\n */\n _closeWindow: function () {\n this.dialog.modal('closeModal');\n //this.blockWindow.style.display = 'none';\n //this.clean('window');\n },\n\n /**\n * Attach callback function triggered when confirm button was clicked\n *\n * @param confirmCallback\n */\n setConfirmCallback: function (listType, confirmCallback) {\n this.confirmCallback[listType] = confirmCallback;\n\n return this;\n },\n\n /**\n * Attach callback function triggered when cancel button was clicked\n *\n * @param cancelCallback\n */\n setCancelCallback: function (listType, cancelCallback) {\n this.cancelCallback[listType] = cancelCallback;\n\n return this;\n },\n\n /**\n * Attach callback function triggered when iFrame was loaded\n *\n * @param onLoadIFrameCallback\n */\n setOnLoadIFrameCallback: function (listType, onLoadIFrameCallback) {\n this.onLoadIFrameCallback[listType] = onLoadIFrameCallback;\n\n return this;\n },\n\n /**\n * Attach callback function triggered when iFrame was loaded\n *\n * @param showWindowCallback\n */\n setShowWindowCallback: function (listType, showWindowCallback) {\n this.showWindowCallback[listType] = showWindowCallback;\n\n return this;\n },\n\n /**\n * Attach callback function triggered before submitting form\n *\n * @param beforeSubmitCallback\n */\n setBeforeSubmitCallback: function (listType, beforeSubmitCallback) {\n this.beforeSubmitCallback[listType] = beforeSubmitCallback;\n\n return this;\n },\n\n /**\n * Clean object data\n *\n * @param method can be 'all' or 'current'\n */\n clean: function (method) {\n var listInfo = null;\n var listTypes = null;\n var removeConfirmed = function (listTypes) {\n this.blockConfirmed.childElements().each(function (elm) {\n for (var i = 0, len = listTypes.length; i < len; i++) {\n var pattern = this.blockConfirmed.id + '[' + listTypes[i] + ']';\n\n if (elm.id.indexOf(pattern) == 0) {\n elm.remove();\n break;\n }\n }\n }.bind(this));\n }.bind(this);\n\n switch (method) {\n case 'current':\n listInfo = this.listTypes[this.current.listType];\n listTypes = [this.current.listType];\n\n if (listInfo && listInfo.complexTypes) {\n listTypes = listTypes.concat(listInfo.complexTypes);\n }\n removeConfirmed(listTypes);\n break;\n\n case 'window':\n this.blockFormFields.update();\n this.blockMsg.hide();\n this.blockMsgError.update();\n if(this.blockCancelBtn) {\n this.blockCancelBtn.show();\n }\n break;\n default:\n // search in list types for its cleaning\n if (this.listTypes[method]) {\n listInfo = this.listTypes[method];\n listTypes = [method];\n\n if (listInfo.complexTypes) {\n listTypes = listTypes.concat(listInfo.complexTypes);\n }\n removeConfirmed(listTypes);\n // clean all\n } else if (!method) {\n this.current = $H({});\n this.blockConfirmed.update();\n this.blockFormFields.update();\n this.blockMsg.hide();\n this.blockMsgError.update();\n if(this.blockCancelBtn) {\n this.blockCancelBtn.show();\n }\n }\n break;\n }\n this._getIFrameContent().body.innerHTML = '';\n this.blockIFrame.contentWindow[this.iFrameJSVarname] = {};\n this.blockFormAdd.update();\n this.blockFormConfirmed.update();\n this.blockForm.action = '';\n\n return this;\n },\n\n /**\n * Process fields data: save, restore, move saved to form and back\n *\n * @param method can be 'item_confirm', 'item_restore', 'current_confirmed_to_form', 'form_confirmed_to_confirmed'\n */\n _processFieldsData: function (method) {\n var self = this;\n\n /**\n * Internal function for rename fields names of some list type\n * if listType is not specified, then it won't be added as prefix to all names\n *\n * @param method can be 'current_confirmed_to_form', 'form_confirmed_to_confirmed'\n * @param blockItem\n */\n var _renameFields = function (method, blockItem, listType) {\n var pattern = null;\n var patternFlat = null;\n var patternPrefix = RegExp('\\\\s', 'g');\n var replacement = null;\n var replacementFlat = null;\n var replacementPrefix = '_';\n var scopeArr = blockItem.id.match(/.*\\[\\w+\\]\\[([^\\]]+)\\]$/);\n var itemId = scopeArr[1];\n\n if (method == 'current_confirmed_to_form') {\n pattern = RegExp('(\\\\w+)(\\\\[?)');\n patternFlat = RegExp('(\\\\w+)');\n replacement = 'item[' + itemId + '][$1]$2';\n replacementFlat = 'item_' + itemId + '_$1';\n\n if (listType) {\n replacement = 'list[' + listType + '][item][' + itemId + '][$1]$2';\n replacementFlat = 'list_' + listType + '_' + replacementFlat;\n }\n } else if (method == 'form_confirmed_to_confirmed') {\n var stPattern = 'item\\\\[' + itemId + '\\\\]\\\\[(\\\\w+)\\\\](.*)';\n var stPatternFlat = 'item_' + itemId + '_(\\\\w+)';\n\n if (listType) {\n stPattern = 'list\\\\[' + listType + '\\\\]\\\\[item\\\\]\\\\[' + itemId + '\\\\]\\\\[(\\\\w+)\\\\](.*)';\n stPatternFlat = 'list_' + listType + '_' + stPatternFlat;\n }\n pattern = new RegExp(stPattern);\n patternFlat = new RegExp(stPatternFlat);\n replacement = '$1$2';\n replacementFlat = '$1';\n } else {\n return false;\n }\n var rename = function (elms) {\n for (var i = 0; i < elms.length; i++) {\n if (elms[i].name && elms[i].type == 'file') {\n var prefixName = 'options[files_prefix]',\n prefixValue = 'item_' + itemId + '_';\n\n self.blockFormFields.insert(new Element('input', {\n type: 'hidden',\n name: prefixName.replace(pattern, replacement),\n value: prefixValue.replace(patternPrefix, replacementPrefix)\n }));\n elms[i].name = elms[i].name.replace(patternFlat, replacementFlat);\n } else if (elms[i].name) {\n elms[i].name = elms[i].name.replace(pattern, replacement);\n }\n }\n };\n\n rename(blockItem.getElementsByTagName('input'));\n rename(blockItem.getElementsByTagName('select'));\n rename(blockItem.getElementsByTagName('textarea'));\n };\n\n switch (method) {\n case 'item_confirm':\n if (!$(this.confirmedCurrentId)) {\n this.blockConfirmed.insert(new Element('div', {\n id: this.confirmedCurrentId\n }));\n } else {\n $(this.confirmedCurrentId).update();\n }\n this.blockFormFields.childElements().each(function (elm) {\n $(this.confirmedCurrentId).insert(elm);\n }.bind(this));\n break;\n\n case 'item_restore':\n this.blockFormFields.update();\n\n // clone confirmed to form\n var mageData = null;\n\n $(this.confirmedCurrentId).childElements().each(function (elm) {\n var cloned = elm.cloneNode(true);\n\n if (elm.mageData) {\n cloned.mageData = elm.mageData;\n mageData = elm.mageData;\n }\n this.blockFormFields.insert(cloned);\n }.bind(this));\n\n // get confirmed values\n var fieldsValue = {};\n var getConfirmedValues = function (elms) {\n for (var i = 0; i < elms.length; i++) {\n if (elms[i].name) {\n if ('undefined' == typeof fieldsValue[elms[i].name]) {\n fieldsValue[elms[i].name] = {};\n }\n\n if (elms[i].type == 'checkbox') {\n fieldsValue[elms[i].name][elms[i].value] = elms[i].checked;\n } else if (elms[i].type == 'radio') {\n if (elms[i].checked) {\n fieldsValue[elms[i].name] = elms[i].value;\n }\n } else {\n fieldsValue[elms[i].name] = Form.Element.getValue(elms[i]);\n }\n }\n }\n };\n\n getConfirmedValues($(this.confirmedCurrentId).getElementsByTagName('input'));\n getConfirmedValues($(this.confirmedCurrentId).getElementsByTagName('select'));\n getConfirmedValues($(this.confirmedCurrentId).getElementsByTagName('textarea'));\n\n // restore confirmed values\n var restoreConfirmedValues = function (elms) {\n for (var i = 0; i < elms.length; i++) {\n if ('undefined' != typeof fieldsValue[elms[i].name]) {\n if (elms[i].type != 'file') {\n if (elms[i].type == 'checkbox') {\n elms[i].checked = fieldsValue[elms[i].name][elms[i].value];\n } else if (elms[i].type == 'radio') {\n if (elms[i].value == fieldsValue[elms[i].name]) {\n elms[i].checked = true;\n }\n } else {\n elms[i].setValue(fieldsValue[elms[i].name]);\n }\n }\n }\n }\n };\n\n restoreConfirmedValues(this.blockFormFields.getElementsByTagName('input'));\n restoreConfirmedValues(this.blockFormFields.getElementsByTagName('select'));\n restoreConfirmedValues(this.blockFormFields.getElementsByTagName('textarea'));\n\n // Execute scripts\n if (mageData && mageData.scripts) {\n this.restorePhase = true;\n\n try {\n mageData.scripts.map(function (script) {\n return eval(script);\n });\n } catch (e) {\n\n }\n this.restorePhase = false;\n }\n break;\n\n case 'current_confirmed_to_form':\n var allowedListTypes = {};\n\n allowedListTypes[this.current.listType] = true;\n var listInfo = this.listTypes[this.current.listType];\n\n if (listInfo.complexTypes) {\n for (var i = 0, len = listInfo.complexTypes.length; i < len; i++) {\n allowedListTypes[listInfo.complexTypes[i]] = true;\n }\n }\n\n this.blockFormConfirmed.update();\n this.blockConfirmed.childElements().each(function (blockItem) {\n var scopeArr = blockItem.id.match(/.*\\[(\\w+)\\]\\[([^\\]]+)\\]$/);\n var listType = scopeArr[1];\n var itemId = scopeArr[2];\n\n if (allowedListTypes[listType] && (!this.itemsFilter[listType] ||\n this.itemsFilter[listType].indexOf(itemId) != -1)) {\n _renameFields(method, blockItem, listInfo.complexTypes ? listType : null);\n this.blockFormConfirmed.insert(blockItem);\n }\n }.bind(this));\n break;\n\n case 'form_confirmed_to_confirmed':\n var listInfo = this.listTypes[this.current.listType];\n\n this.blockFormConfirmed.childElements().each(function (blockItem) {\n var scopeArr = blockItem.id.match(/.*\\[(\\w+)\\]\\[([^\\]]+)\\]$/);\n var listType = scopeArr[1];\n\n _renameFields(method, blockItem, listInfo.complexTypes ? listType : null);\n this.blockConfirmed.insert(blockItem);\n }.bind(this));\n break;\n }\n },\n\n /**\n * Check if qty selected correctly\n *\n * @param object element\n * @param object event\n */\n changeOptionQty: function (element, event) {\n var checkQty = true;\n\n if ('undefined' != typeof event) {\n if (event.keyCode == 8 || event.keyCode == 46) {\n checkQty = false;\n }\n }\n\n if (checkQty && (Number(element.value) <= 0 || isNaN(Number(element.value)))) {\n element.value = 1;\n }\n }\n };\n\n productConfigure = new ProductConfigure();\n jQuery(document).trigger('productConfigure:inited');\n jQuery(document).data('productConfigureInited', true);\n});\n","Magento_Catalog/catalog/product/edit/attribute.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/mage',\n 'validation'\n], function ($) {\n 'use strict';\n\n return function (config, element) {\n $(element).mage('form').validation({\n validationUrl: config.validationUrl\n });\n };\n});\n","Magento_Catalog/catalog/product/attribute/unique-validate.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'mage/backend/validation'\n], function (jQuery) {\n 'use strict';\n\n return function (config) {\n var msg = '',\n _config = jQuery.extend({\n element: null,\n message: '',\n uniqueClass: 'required-unique'\n }, config),\n\n /** @inheritdoc */\n messager = function () {\n return msg;\n };\n\n if (typeof _config.element === 'string') {\n jQuery.validator.addMethod(\n _config.element,\n\n function (value, element) {\n var inputs = jQuery(element)\n .closest('table')\n .find('.' + _config.uniqueClass + ':visible'),\n valuesHash = {},\n isValid = true,\n duplicates = [];\n\n inputs.each(function (el) {\n var inputValue = inputs[el].value;\n\n if (typeof valuesHash[inputValue] !== 'undefined') {\n isValid = false;\n duplicates.push(inputValue);\n }\n valuesHash[inputValue] = el;\n });\n\n if (!isValid) {\n msg = _config.message + ' (' + duplicates.join(', ') + ')';\n }\n\n return isValid;\n },\n\n messager\n );\n }\n };\n});\n","Magento_Catalog/catalog/category/form.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/modal/alert'\n], function ($, alert) {\n 'use strict';\n\n return function (config) {\n var categoryForm = {\n options: {\n categoryIdSelector: 'input[name=\"id\"]',\n categoryPathSelector: 'input[name=\"path\"]',\n categoryParentSelector: 'input[name=\"parent\"]',\n categoryLevelSelector: 'input[name=\"level\"]',\n refreshUrl: config.refreshUrl\n },\n\n /**\n * Sending ajax to server to refresh field 'path'\n * @protected\n */\n refreshPath: function () {\n if (!$(this.options.categoryIdSelector)) {\n return false;\n }\n $.ajax({\n url: this.options.refreshUrl,\n method: 'GET',\n showLoader: true\n }).done(this._refreshPathSuccess.bind(this));\n },\n\n /**\n * Refresh field 'path' on ajax success\n * @param {Object} data\n * @private\n */\n _refreshPathSuccess: function (data) {\n if (data.error) {\n alert({\n content: data.message\n });\n } else {\n $(this.options.categoryIdSelector).val(data.id).trigger('change');\n $(this.options.categoryPathSelector).val(data.path).trigger('change');\n $(this.options.categoryParentSelector).val(data.parentId).trigger('change');\n $(this.options.categoryLevelSelector).val(data.level).trigger('change');\n }\n }\n };\n\n $('body').on('categoryMove.tree', $.proxy(categoryForm.refreshPath.bind(categoryForm), this));\n };\n});\n","Magento_Catalog/catalog/category/assign-products.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'mage/adminhtml/grid'\n], function () {\n 'use strict';\n\n return function (config) {\n var selectedProducts = config.selectedProducts,\n categoryProducts = $H(selectedProducts),\n gridJsObject = window[config.gridJsObjectName],\n tabIndex = 1000;\n\n $('in_category_products').value = Object.toJSON(categoryProducts);\n\n /**\n * Register Category Product\n *\n * @param {Object} grid\n * @param {Object} element\n * @param {Boolean} checked\n */\n function registerCategoryProduct(grid, element, checked) {\n if (checked) {\n if (element.positionElement) {\n element.positionElement.disabled = false;\n categoryProducts.set(element.value, element.positionElement.value);\n }\n } else {\n if (element.positionElement) {\n element.positionElement.disabled = true;\n }\n categoryProducts.unset(element.value);\n }\n $('in_category_products').value = Object.toJSON(categoryProducts);\n grid.reloadParams = {\n 'selected_products[]': categoryProducts.keys()\n };\n }\n\n /**\n * Click on product row\n *\n * @param {Object} grid\n * @param {String} event\n */\n function categoryProductRowClick(grid, event) {\n var trElement = Event.findElement(event, 'tr'),\n eventElement = Event.element(event),\n isInputCheckbox = eventElement.tagName === 'INPUT' && eventElement.type === 'checkbox',\n isInputPosition = grid.targetElement &&\n grid.targetElement.tagName === 'INPUT' &&\n grid.targetElement.name === 'position',\n checked = false,\n checkbox = null;\n\n if (eventElement.tagName === 'LABEL' &&\n trElement.querySelector('#' + eventElement.htmlFor) &&\n trElement.querySelector('#' + eventElement.htmlFor).type === 'checkbox'\n ) {\n event.stopPropagation();\n trElement.querySelector('#' + eventElement.htmlFor).trigger('click');\n\n return;\n }\n\n if (trElement && !isInputPosition) {\n checkbox = Element.getElementsBySelector(trElement, 'input');\n\n if (checkbox[0]) {\n checked = isInputCheckbox ? checkbox[0].checked : !checkbox[0].checked;\n gridJsObject.setCheckboxChecked(checkbox[0], checked);\n }\n }\n }\n\n /**\n * Change product position\n *\n * @param {String} event\n */\n function positionChange(event) {\n var element = Event.element(event);\n\n if (element && element.checkboxElement && element.checkboxElement.checked) {\n categoryProducts.set(element.checkboxElement.value, element.value);\n $('in_category_products').value = Object.toJSON(categoryProducts);\n }\n }\n\n /**\n * Initialize category product row\n *\n * @param {Object} grid\n * @param {String} row\n */\n function categoryProductRowInit(grid, row) {\n var checkbox = $(row).getElementsByClassName('checkbox')[0],\n position = $(row).getElementsByClassName('input-text')[0];\n\n if (checkbox && position) {\n checkbox.positionElement = position;\n position.checkboxElement = checkbox;\n position.disabled = !checkbox.checked;\n position.tabIndex = tabIndex++;\n Event.observe(position, 'keyup', positionChange);\n }\n }\n\n gridJsObject.rowClickCallback = categoryProductRowClick;\n gridJsObject.initRowCallback = categoryProductRowInit;\n gridJsObject.checkboxCheckCallback = registerCategoryProduct;\n\n if (gridJsObject.rows) {\n gridJsObject.rows.each(function (row) {\n categoryProductRowInit(gridJsObject, row);\n });\n }\n };\n});\n","Magento_Catalog/component/select-type-grid.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/dynamic-rows/dynamic-rows'\n], function ($, Abstract) {\n 'use strict';\n\n return Abstract.extend({\n\n /**\n * Checks is relevant value\n *\n * @param {String} value\n * @returns {Boolean}\n */\n isRelevant: function (value) {\n if ($.inArray(value, ['drop_down', 'radio', 'checkbox', 'multiple']) !== -1) {\n this.disabled(false);\n this.visible(true);\n\n return true;\n }\n\n this.reset();\n this.disabled(true);\n this.visible(false);\n\n return false;\n }\n });\n});\n","Magento_Catalog/component/static-type-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/form/element/select'\n], function ($, Abstract) {\n 'use strict';\n\n return Abstract.extend({\n\n /**\n * Checks is relevant value\n *\n * @param {String} value\n * @returns {Boolean}\n */\n isRelevant: function (value) {\n if (!value || $.inArray(value, ['drop_down', 'radio', 'checkbox', 'multiple']) !== -1) {\n this.reset();\n this.disabled(true);\n\n return false;\n }\n\n this.disabled(false);\n\n return true;\n }\n });\n});\n","Magento_Catalog/component/image-size-field.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/lib/validation/utils',\n 'Magento_Ui/js/form/element/abstract',\n 'Magento_Ui/js/lib/validation/validator',\n 'mage/translate'\n], function ($, utils, Abstract, validator) {\n 'use strict';\n\n validator.addRule(\n 'validate-image-size-range',\n function (value) {\n var dataAttrRange = /^(\\d+)x(\\d+)$/,\n m;\n\n if (utils.isEmptyNoTrim(value)) {\n return true;\n }\n\n m = dataAttrRange.exec(value);\n\n return !!(m && m[1] > 0 && m[2] > 0);\n },\n $.mage.__('This value does not follow the specified format (for example, 200X300).')\n );\n\n return Abstract.extend({\n\n /**\n * Checks for relevant value\n *\n * @returns {Boolean}\n */\n isRangeCorrect: function () {\n return validator('validate-image-size-range', this.value()).passed;\n }\n });\n});\n","Magento_Catalog/component/static-type-input.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'uiRegistry',\n 'Magento_Ui/js/form/element/abstract'\n], function (registry, Abstract) {\n 'use strict';\n\n return Abstract.extend({\n defaults: {\n parentOption: null\n },\n\n /**\n * Initialize component.\n *\n * @returns {Element}\n */\n initialize: function () {\n return this\n ._super()\n .initLinkToParent();\n },\n\n /**\n * Cache link to parent component - option holder.\n *\n * @returns {Element}\n */\n initLinkToParent: function () {\n var pathToParent = this.parentName.replace(/(\\.[^.]*){2}$/, '');\n\n this.parentOption = registry.async(pathToParent);\n this.value() && this.parentOption('label', this.value());\n\n return this;\n },\n\n /**\n * On value change handler.\n *\n * @param {String} value\n */\n onUpdate: function (value) {\n this.parentOption(function (component) {\n component.set('label', value ? value : component.get('headerLabel'));\n });\n\n return this._super();\n }\n });\n});\n","Magento_Catalog/component/file-type-field.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/abstract'\n], function (Abstract) {\n 'use strict';\n\n return Abstract.extend({\n\n /**\n * Checks is relevant value\n *\n * @param {String} value\n * @returns {Boolean}\n */\n isRelevant: function (value) {\n if (value === 'file') {\n this.disabled(false);\n this.visible(true);\n\n return true;\n }\n\n this.reset();\n this.disabled(true);\n this.visible(false);\n\n return false;\n }\n });\n});\n","Magento_Catalog/component/text-type-field.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/form/element/abstract'\n], function ($, Abstract) {\n 'use strict';\n\n return Abstract.extend({\n\n /**\n * Checks for relevant value\n *\n * @param {*} value\n * @returns {Boolean}\n */\n isRelevant: function (value) {\n if ($.inArray(value, ['field', 'area']) !== -1) {\n this.disabled(false);\n this.visible(true);\n\n return true;\n }\n\n this.reset();\n this.disabled(true);\n this.visible(false);\n\n return false;\n }\n });\n});\n","Magento_Catalog/component/static-type-container.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/form/components/group'\n], function ($, Group) {\n 'use strict';\n\n return Group.extend({\n\n /**\n * Checks is relevant value\n *\n * @param {String} value\n * @returns {Boolean}\n */\n isRelevant: function (value) {\n if ($.inArray(value, ['field', 'area', 'file', 'date', 'date_time', 'time']) !== -1) {\n this.visible(true);\n\n return true;\n }\n\n this.visible(false);\n\n return false;\n }\n });\n});\n","requirejs/domReady.js":"/**\n * @license RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/requirejs/domReady for details\n */\n/*jslint */\n/*global require: false, define: false, requirejs: false,\n window: false, clearInterval: false, document: false,\n self: false, setInterval: false */\n\n\ndefine(function () {\n 'use strict';\n\n var isTop, testDiv, scrollIntervalId,\n isBrowser = typeof window !== \"undefined\" && window.document,\n isPageLoaded = !isBrowser,\n doc = isBrowser ? document : null,\n readyCalls = [];\n\n function runCallbacks(callbacks) {\n var i;\n for (i = 0; i < callbacks.length; i += 1) {\n callbacks[i](doc);\n }\n }\n\n function callReady() {\n var callbacks = readyCalls;\n\n if (isPageLoaded) {\n //Call the DOM ready callbacks\n if (callbacks.length) {\n readyCalls = [];\n runCallbacks(callbacks);\n }\n }\n }\n\n /**\n * Sets the page as loaded.\n */\n function pageLoaded() {\n if (!isPageLoaded) {\n isPageLoaded = true;\n if (scrollIntervalId) {\n clearInterval(scrollIntervalId);\n }\n\n callReady();\n }\n }\n\n if (isBrowser) {\n if (document.addEventListener) {\n //Standards. Hooray! Assumption here that if standards based,\n //it knows about DOMContentLoaded.\n document.addEventListener(\"DOMContentLoaded\", pageLoaded, false);\n window.addEventListener(\"load\", pageLoaded, false);\n } else if (window.attachEvent) {\n window.attachEvent(\"onload\", pageLoaded);\n\n testDiv = document.createElement('div');\n try {\n isTop = window.frameElement === null;\n } catch (e) {}\n\n //DOMContentLoaded approximation that uses a doScroll, as found by\n //Diego Perini: http://javascript.nwbox.com/IEContentLoaded/,\n //but modified by other contributors, including jdalton\n if (testDiv.doScroll && isTop && window.external) {\n scrollIntervalId = setInterval(function () {\n try {\n testDiv.doScroll();\n pageLoaded();\n } catch (e) {}\n }, 30);\n }\n }\n\n //Check if document is no longer loading, and if so, just trigger page load\n //listeners. Latest webkit browsers also use \"interactive\", and\n //will fire the onDOMContentLoaded before \"interactive\" but not after\n //entering \"interactive\" or \"complete\". More details:\n //http://dev.w3.org/html5/spec/the-end.html#the-end\n //http://stackoverflow.com/questions/3665561/document-readystate-of-interactive-vs-ondomcontentloaded\n //Hmm, this is more complicated on further use, see \"firing too early\"\n //bug: https://github.com/requirejs/domReady/issues/1\n //so removing the || document.readyState === \"interactive\" test.\n //There is still a window.onload binding that should get fired if\n //DOMContentLoaded is missed.\n if (document.readyState !== \"loading\") {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n setTimeout(pageLoaded);\n }\n }\n\n /** START OF PUBLIC API **/\n\n /**\n * Registers a callback for DOM ready. If DOM is already ready, the\n * callback is called immediately.\n * @param {Function} callback\n */\n function domReady(callback) {\n if (isPageLoaded) {\n callback(doc);\n } else {\n readyCalls.push(callback);\n }\n return domReady;\n }\n\n domReady.version = '2.0.1';\n\n /**\n * Loader Plugin API method\n */\n domReady.load = function (name, req, onLoad, config) {\n if (config.isBuild) {\n onLoad(null);\n } else {\n domReady(onLoad);\n }\n };\n\n /** END OF PUBLIC API **/\n\n return domReady;\n});\n","Magento_Weee/js/fpt-group.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/components/group',\n 'uiRegistry',\n 'Magento_Ui/js/lib/validation/validator',\n 'mage/translate',\n 'underscore'\n], function (Group, uiRegistry, validation, $t, _) {\n 'use strict';\n\n return Group.extend({\n defaults: {\n visible: true,\n label: '',\n showLabel: true,\n required: false,\n template: 'ui/group/group',\n fieldTemplate: 'ui/form/field',\n breakLine: true,\n validateWholeGroup: false,\n additionalClasses: {}\n },\n\n /** @inheritdoc */\n initialize: function () {\n validation.addRule('validate-fpt-group', function (value) {\n if (value.indexOf('?') !== -1) {\n\n return false;\n }\n\n return true;\n }, $t(\n 'Set unique country-state combinations within the same fixed product tax. ' +\n 'Verify the combinations and try again.'\n ));\n\n this._super();\n },\n\n /**\n *\n * @private\n */\n _handleOptionsAvailability: function () {\n var parent,\n dup;\n\n dup = {};\n parent = uiRegistry.get(uiRegistry.get(this.parentName).parentName);\n _.each(parent.elems(), function (elem) {\n var country,\n state,\n val,\n key;\n\n country = uiRegistry.get(elem.name + '.countryState.country');\n state = uiRegistry.get(elem.name + '.countryState.state');\n val = uiRegistry.get(elem.name + '.countryState.val');\n\n key = country.value() + (state.value() > 0 ? state.value() : 0);\n dup[key]++;\n\n if (!dup[key]) {\n dup[key] = 1;\n val.value('');\n } else {\n dup[key]++;\n val.value(country.value() + '?' + country.name);\n }\n });\n },\n\n /** @inheritdoc */\n initElement: function (elem) {\n var obj;\n\n obj = this;\n this._super();\n elem.on('value', function () {\n obj._handleOptionsAvailability();\n });\n\n return this;\n }\n });\n});\n","Magento_Weee/js/fpt-attribute.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* global RegionUpdater */\ndefine([\n 'jquery',\n 'mage/template',\n 'jquery/ui',\n 'mage/adminhtml/form'\n], function ($, mageTemplate) {\n 'use strict';\n\n $.widget('mage.fptAttribute', {\n /** @inheritdoc */\n _create: function () {\n var widget = this;\n\n this.rowTmpl = mageTemplate(this.element.find('[data-role=\"row-template\"]').html());\n\n this._initOptionItem();\n\n if ($(this.options.bundlePriceType).val() === '0') {\n this.element.hide();\n }\n\n $.each(this.options.itemsData, function () {\n widget.addItem(this);\n });\n },\n\n /**\n * @private\n */\n _initOptionItem: function () {\n var widget = this,\n isOriginalRequired = $(widget.element).hasClass('required');\n\n this._on({\n /**\n * Add new tax item.\n *\n * @param {jQuery.Event} event\n */\n 'click [data-action=add-fpt-item]': function (event) {\n this.addItem(event);\n },\n\n /**\n * Delete tax item.\n *\n * @param {jQuery.Event} event\n */\n 'click [data-action=delete-fpt-item]': function (event) {\n var parent = $(event.target).closest('[data-role=\"fpt-item-row\"]');\n\n parent.find('[data-role=\"delete-fpt-item\"]').val(1);\n parent.addClass('ignore-validate').hide();\n },\n\n /**\n * Change tax item country/state.\n *\n * @param {jQuery.Event} event\n * @param {Object} data\n */\n 'change [data-role=\"select-country\"]': function (event, data) {\n var currentElement = event.target || event.srcElement || event.currentTarget,\n parentElement = $(currentElement).closest('[data-role=\"fpt-item-row\"]'),\n updater;\n\n data = data || {};\n updater = new RegionUpdater(\n parentElement.find('[data-role=\"select-country\"]').attr('id'), null,\n parentElement.find('[data-role=\"select-state\"]').attr('id'),\n widget.options.region, 'disable', true\n );\n updater.update();\n //set selected state value if set\n if (data.state) {\n parentElement.find('[data-role=\"select-state\"]').val(data.state);\n }\n\n if (!isOriginalRequired && $(widget.element).hasClass('required')) {\n $(widget.element).removeClass('required');\n }\n }\n });\n\n $(this.options.bundlePriceType).on('change', function (event) {\n var attributeItems = widget.element.find('[data-role=\"delete-fpt-item\"]');\n\n if ($(event.target).val() === '0') {\n widget.element.hide();\n attributeItems.each(function () {\n $(this).val(1);\n });\n } else {\n widget.element.show();\n attributeItems.each(function () {\n if ($(this).closest('[data-role=\"fpt-item-row\"]').is(':visible')) {\n $(this).val(0);\n }\n });\n }\n });\n },\n\n /**\n * Add custom option.\n *\n * @param {jQuery.Event} event\n */\n addItem: function (event) {\n var data = {},\n currentElement = event.target || event.srcElement || event.currentTarget,\n tmpl;\n\n if (typeof currentElement !== 'undefined') {\n data['website_id'] = 0;\n } else {\n data = event;\n }\n\n data.index = this.element.find('[data-role=\"fpt-item-row\"]').length;\n\n tmpl = this.rowTmpl({\n data: data\n });\n\n $(tmpl).appendTo(this.element.find('[data-role=\"fpt-item-container\"]'));\n\n //set selected website_id value if set\n if (data['website_id']) {\n this.element.find('[data-role=\"select-website\"][id$=\"_' + data.index + '_website\"]')\n .val(data['website_id']);\n }\n\n //set selected country value if set\n if (data.country) {\n this.element.find('[data-role=\"select-country\"][id$=\"_' + data.index + '_country\"]')\n .val(data.country).trigger('change', data);\n }\n }\n });\n\n return $.mage.fptAttribute;\n});\n","Magento_Weee/js/regions-tax-select.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/select'\n], function (Select) {\n 'use strict';\n\n return Select.extend({\n defaults: {\n filterBy: {\n field: 'country',\n target: '${ $.parentName }.country:value'\n }\n },\n\n /** @inheritdoc */\n filter: function () {\n this._super();\n this.disableSelect();\n },\n\n /**\n * Disables select if there's no regions/states\n *\n * @returns {*} instance - Chainable\n */\n disableSelect: function () {\n var empty = !this.options().length;\n\n this.disabled(empty);\n\n if (empty) {\n this.error('');\n }\n\n return this;\n }\n });\n});\n","Magento_Weee/js/price/adjustment.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/grid/columns/column'\n], function (Element) {\n 'use strict';\n\n return Element.extend({\n defaults: {\n bodyTmpl: 'Magento_Weee/price/adjustment',\n dataSource: '${ $.parentName }.provider',\n //Weee configuration constants can be configured from backend\n inclFptWithDesc: 1,//show FPT and description\n inclFpt: 0, //show FPT attribute\n exclFpt: 2, //do not show FPT\n bothFptPrices: 3 //show price without FPT and with FPT and with description\n },\n\n /**\n * Get Weee attributes.\n *\n * @param {Object} row\n * @return {HTMLElement} Weee html\n */\n getWeeeAttributes: function (row) {\n return row['price_info']['extension_attributes']['weee_attributes'];\n },\n\n /**\n * Get Weee without Tax attributes.\n *\n * @param {Object} taxAmount\n * @return {HTMLElement} Weee html\n */\n getWeeeTaxWithoutTax: function (taxAmount) {\n return taxAmount['amount_excl_tax'];\n },\n\n /**\n * UnsanitizedHtml version of getWeeeTaxWithoutTax.\n *\n * @param {Object} taxAmount\n * @return {HTMLElement} Weee html\n */\n getWeeeTaxWithoutTaxUnsanitizedHtml: function (taxAmount) {\n return this.getWeeeTaxWithoutTax(taxAmount);\n },\n\n /**\n * Get Weee with Tax attributes.\n *\n * @param {Object} taxAmount\n * @return {HTMLElement} Weee html\n */\n getWeeeTaxWithTax: function (taxAmount) {\n return taxAmount['tax_amount_incl_tax'];\n },\n\n /**\n * UnsanitizedHtml version of getWeeeTaxWithTax.\n *\n * @param {Object} taxAmount\n * @return {HTMLElement} Weee html\n */\n getWeeeTaxWithTaxUnsanitizedHtml: function (taxAmount) {\n return this.getWeeeTaxWithTax(taxAmount);\n },\n\n /**\n * Get Weee Tax name.\n *\n * @param {String} taxAmount\n * @return {String} Weee name\n */\n getWeeTaxAttributeName: function (taxAmount) {\n return taxAmount['attribute_code'];\n },\n\n /**\n * Set price type.\n *\n * @param {String} priceType\n * @return {Object}\n */\n setPriceType: function (priceType) {\n this.taxPriceType = priceType;\n\n return this;\n },\n\n /**\n * Check if Weee Tax must be shown.\n *\n * @param {Object} row\n * @return {Boolean}\n */\n isShown: function (row) {\n return row['price_info']['extension_attributes']['weee_attributes'].length;\n },\n\n /**\n * Get Weee final price.\n *\n * @param {Object} row\n * @return {HTMLElement} Weee final price html\n */\n getWeeeAdjustment: function (row) {\n return row['price_info']['extension_attributes']['weee_adjustment'];\n },\n\n /**\n * UnsanitizedHtml version of getWeeeAdjustment.\n *\n * @param {Object} row\n * @return {HTMLElement} Weee final price html\n */\n getWeeeAdjustmentUnsanitizedHtml: function (row) {\n return this.getWeeeAdjustment(row);\n },\n\n /**\n * Return whether display setting is to display price including FPT only.\n *\n * @return {Boolean}\n */\n displayPriceInclFpt: function () {\n return +this.source.data.displayWeee === this.inclFpt;\n },\n\n /**\n * Return whether display setting is to display\n * price including FPT and FPT description.\n *\n * @return {Boolean}\n */\n displayPriceInclFptDescr: function () {\n return +this.source.data.displayWeee === this.inclFptWithDesc;\n },\n\n /**\n * Return whether display setting is to display price\n * excluding FPT but including FPT description and final price.\n *\n * @return {Boolean}\n */\n displayPriceExclFptDescr: function () {\n return +this.source.data.displayWeee === this.exclFpt;\n },\n\n /**\n * Return whether display setting is to display price excluding FPT.\n *\n * @return {Boolean}\n */\n displayPriceExclFpt: function () {\n return +this.source.data.displayWeee === this.bothFptPrices;\n },\n\n /**\n * Return whether display setting is to display price excluding tax.\n *\n * @return {Boolean}\n */\n displayPriceExclTax: function () {\n return +this.source.data.displayTaxes === this.inclFptWithDesc;\n },\n\n /**\n * Return whether display setting is to display price including tax.\n *\n * @return {Boolean}\n */\n displayPriceInclTax: function () {\n return +this.source.data.displayTaxes === this.exclFpt;\n },\n\n /**\n * Return whether display setting is to display\n * both price including tax and price excluding tax.\n *\n * @return {Boolean}\n */\n displayBothPricesTax: function () {\n return +this.source.data.displayTaxes === this.bothFptPrices;\n }\n });\n});\n","Magento_InventoryLowQuantityNotificationAdminUi/js/components/notify-stock-qty.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/abstract'\n], function (AbstractField) {\n 'use strict';\n\n return AbstractField.extend({\n defaults: {\n notifyStockQtyUseDefault: '',\n manageStock: '',\n listens: {\n notifyStockQtyUseDefault: 'onChange',\n manageStock: 'onChange'\n }\n },\n\n /**\n * @inheritdoc\n */\n initObservable: function () {\n return this\n ._super()\n .observe(['notifyStockQtyUseDefault', 'manageStock']);\n },\n\n /**\n * Disable input when Manage Stock switched off or Notify Quantity Use Default\n */\n onChange: function () {\n this.disabled(\n this.notifyStockQtyUseDefault() ||\n this.manageStock()\n );\n }\n });\n});\n","Magento_InventoryLowQuantityNotificationAdminUi/js/components/use-config-settings.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'Magento_Ui/js/form/element/single-checkbox'\n], function (checkbox) {\n 'use strict';\n\n return checkbox.extend({\n defaults: {\n valueFromConfig: '',\n linkedValue: ''\n },\n\n /**\n * @inheritdoc\n */\n initObservable: function () {\n return this\n ._super()\n .observe(['valueFromConfig', 'linkedValue']);\n },\n\n /**\n * @inheritdoc\n */\n 'onCheckedChanged': function (newChecked) {\n if (newChecked) {\n this.linkedValue(this.valueFromConfig());\n }\n\n this._super(newChecked);\n },\n\n /**\n * @returns {String}\n */\n getInitialValue: function () {\n var values = [this.value(), this.default],\n value;\n\n values.some(function (v) {\n value = v || !!v;\n\n return value;\n });\n\n return this.normalizeData(value);\n }\n });\n});\n","Magento_InventoryInStorePickupSalesAdminUi/order/create/scripts-mixin.js":"/*\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(\n [\n 'jquery',\n 'prototype'\n ],\n function (jQuery) {\n 'use strict';\n\n return function () {\n var STORE_PICKUP_METHOD = 'instore_pickup',\n SOURCES_FIELD_SELECTOR = '#shipping_form_pickup_location_source',\n SAME_AS_BILLING_SELECTOR = '#order-shipping_same_as_billing',\n CUSTOMER_SHIPPING_ADDRESS_ID_SELECTOR = '#order-shipping_address_customer_address_id',\n CUSTOMER_ADDRESS_SAVE_IN_ADDRESS_BOOK_SELECTOR = '#order-shipping_address_save_in_address_book',\n IN_STORE_PICKUP_CHECKBOX_SELECTOR = '#s_method_instore_pickup';\n\n /**\n * Display sources dropdown field;\n * And vice-versa\n *\n * @param {Boolean} isStorePickup\n */\n function setStorePickupMethod(isStorePickup) {\n var sourcesInput = jQuery(SOURCES_FIELD_SELECTOR),\n shippingAddressSaveInAddressBook = jQuery(CUSTOMER_ADDRESS_SAVE_IN_ADDRESS_BOOK_SELECTOR);\n\n if (isStorePickup) {\n shippingAddressSaveInAddressBook.prop('checked', false);\n sourcesInput.show();\n\n return;\n }\n window.order.disableShippingAddress(jQuery(SAME_AS_BILLING_SELECTOR).prop('checked'));\n sourcesInput.hide();\n }\n\n /**\n * Verify is store pickup delivery method is checked.\n */\n function isStorePickupSelected() {\n var storePickupCheckbox = jQuery(IN_STORE_PICKUP_CHECKBOX_SELECTOR);\n\n return storePickupCheckbox.length && storePickupCheckbox.prop('checked');\n }\n\n /**\n * Always disable unwanted shipping address fields in case store pickup is selected.\n */\n window.AdminOrder.prototype.disableShippingAddress =\n window.AdminOrder.prototype.disableShippingAddress.wrap(function (proceed, flag) {\n var shippingAddressId = jQuery(CUSTOMER_SHIPPING_ADDRESS_ID_SELECTOR),\n theSameAsBillingCheckBox = jQuery(SAME_AS_BILLING_SELECTOR),\n shippingAddressSaveInAddressBook = jQuery(CUSTOMER_ADDRESS_SAVE_IN_ADDRESS_BOOK_SELECTOR);\n\n proceed(flag);\n\n if (isStorePickupSelected()) {\n shippingAddressId.prop('disabled', true);\n theSameAsBillingCheckBox.prop('disabled', true);\n shippingAddressSaveInAddressBook.prop('disabled', true);\n }\n });\n\n /**\n * Set shipping method override\n *\n * @param {String} method\n */\n window.AdminOrder.prototype.setShippingMethod = function (method) {\n var data = {},\n areas = [\n 'shipping_method',\n 'totals',\n 'billing_method',\n 'shipping_address'\n ];\n\n data['order[shipping_method]'] = method;\n\n if (method === STORE_PICKUP_METHOD) {\n data = this.serializeData(this.shippingAddressContainer).toObject();\n data['order[shipping_method]'] = method;\n data['shipping_as_billing'] = 0;\n data['save_in_address_book'] = 0;\n this.shippingAsBilling = 0;\n this.saveInAddressBook = 0;\n }\n\n this.loadArea(areas, true, data).then(\n function () {\n setStorePickupMethod(method === STORE_PICKUP_METHOD);\n }\n );\n };\n\n /**\n * Replace shipping method area.\n * Restore store pickup shipping method if it was already selected.\n */\n window.AdminOrder.prototype.resetShippingMethod = function () {\n var storePickupCheckbox = jQuery(IN_STORE_PICKUP_CHECKBOX_SELECTOR);\n\n if (!this.isOnlyVirtualProduct) {\n /* eslint-disable no-undef */\n $(this.getAreaId('shipping_method')).update(this.shippingTemplate);\n\n if (isStorePickupSelected()) {\n window.order.setShippingMethod(storePickupCheckbox.val());\n }\n }\n };\n };\n }\n);\n","Magento_InventoryInStorePickupSalesAdminUi/order/create/trigger-shipping-method-update.js":"/*\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(\n [\n 'jquery',\n 'Magento_Sales/order/create/form'\n ],\n function ($) {\n 'use strict';\n\n return function () {\n var storePickupCheckbox = $('#s_method_instore_pickup');\n\n if (storePickupCheckbox.length && storePickupCheckbox.prop('checked')) {\n window.order.setShippingMethod(storePickupCheckbox.val());\n }\n };\n }\n);\n","Magento_Rule/conditions-data-normalizer.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'underscore'\n], function ($, _) {\n 'use strict';\n\n /**\n * @constructor\n */\n var ConditionsDataNormalizer = function () {\n this.patterns = {\n validate: /^[a-z0-9_.-][a-z0-9_.-]*(?:\\[(?:\\d*|[a-z0-9_.-]+)\\])*$/i,\n key: /[a-z0-9_.-]+|(?=\\[\\])/gi,\n push: /^$/,\n fixed: /^\\d+$/,\n named: /^[a-z0-9_.-]+$/i\n };\n };\n\n ConditionsDataNormalizer.prototype = {\n /**\n * Will convert an object:\n * {\n * \"foo[bar][1][baz]\": 123,\n * \"foo[bar][1][blah]\": 321\n * \"foo[bar][1--1][ah]\": 456\n * }\n *\n * to\n * {\n * \"foo\": {\n * \"bar\": {\n * \"1\": {\n * \"baz\": 123,\n * \"blah\": 321\n * },\n * \"1--1\": {\n * \"ah\": 456\n * }\n * }\n * }\n * }\n */\n normalize: function normalize(value) {\n var el, _this = this;\n\n this.pushes = {};\n this.data = {};\n\n _.each(value, function (e, i) {\n el = {};\n el[i] = e;\n\n _this._addPair({\n name: i,\n value: e\n });\n });\n\n return this.data;\n },\n\n /**\n * @param {Object} base\n * @param {String} key\n * @param {String} value\n * @return {Object}\n * @private\n */\n _build: function build(base, key, value) {\n base[key] = value;\n\n return base;\n },\n\n /**\n * @param {Object} root\n * @param {String} value\n * @return {*}\n * @private\n */\n _makeObject: function makeObject(root, value) {\n var keys = root.match(this.patterns.key),\n k, idx; // nest, nest, ..., nest\n\n while ((k = keys.pop()) !== undefined) {\n // foo[]\n if (this.patterns.push.test(k)) {\n idx = this._incrementPush(root.replace(/\\[\\]$/, ''));\n value = this._build([], idx, value);\n } // foo[n]\n else if (this.patterns.fixed.test(k)) {\n value = this._build({}, k, value);\n } // foo; foo[bar]\n else if (this.patterns.named.test(k)) {\n value = this._build({}, k, value);\n }\n }\n\n return value;\n },\n\n /**\n * @param {String} key\n * @return {Number}\n * @private\n */\n _incrementPush: function incrementPush(key) {\n if (this.pushes[key] === undefined) {\n this.pushes[key] = 0;\n }\n\n return this.pushes[key]++;\n },\n\n /**\n * @param {Object} pair\n * @return {Object}\n * @private\n */\n _addPair: function addPair(pair) {\n var obj = this._makeObject(pair.name, pair.value);\n\n if (!this.patterns.validate.test(pair.name)) {\n return this;\n }\n\n this.data = $.extend(true, this.data, obj);\n\n return this;\n }\n };\n\n return ConditionsDataNormalizer;\n});\n","Magento_Rule/rules.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\n\ndefine([\n 'jquery',\n 'Magento_Ui/js/modal/alert',\n 'mage/translate',\n 'prototype'\n], function (jQuery) {\n 'use strict';\n\n var VarienRulesForm = new Class.create();\n\n VarienRulesForm.prototype = {\n initialize: function (parent, newChildUrl) {\n this.parent = $(parent);\n this.newChildUrl = newChildUrl;\n this.shownElement = null;\n this.updateElement = null;\n this.chooserSelectedItems = $H({});\n this.readOnly = false;\n\n var elems = this.parent.getElementsByClassName('rule-param');\n\n for (var i = 0; i < elems.length; i++) {\n this.initParam(elems[i]);\n }\n },\n\n setReadonly: function (readonly) {\n this.readOnly = readonly;\n var elems = this.parent.getElementsByClassName('rule-param-remove');\n\n for (var i = 0; i < elems.length; i++) {\n var element = elems[i];\n\n if (this.readOnly) {\n element.hide();\n } else {\n element.show();\n }\n }\n\n var elems = this.parent.getElementsByClassName('rule-param-new-child');\n\n for (var i = 0; i < elems.length; i++) {\n var element = elems[i];\n\n if (this.readOnly) {\n element.hide();\n } else {\n element.show();\n }\n }\n\n var elems = this.parent.getElementsByClassName('rule-param');\n\n for (var i = 0; i < elems.length; i++) {\n var container = elems[i];\n var label = Element.down(container, '.label');\n\n if (label) {\n if (this.readOnly) {\n label.addClassName('label-disabled');\n } else {\n label.removeClassName('label-disabled');\n }\n }\n }\n },\n\n initParam: function (container) {\n container.rulesObject = this;\n var label = Element.down(container, '.label');\n\n if (label) {\n Event.observe(label, 'click', this.showParamInputField.bind(this, container));\n }\n\n var elem = Element.down(container, '.element');\n\n if (elem) {\n var trig = elem.down('.rule-chooser-trigger');\n\n if (trig) {\n Event.observe(trig, 'click', this.toggleChooser.bind(this, container));\n }\n\n var apply = elem.down('.rule-param-apply');\n\n if (apply) {\n Event.observe(apply, 'click', this.hideParamInputField.bind(this, container));\n } else {\n elem = elem.down('.element-value-changer');\n elem.container = container;\n\n if (!elem.multiple) {\n Event.observe(elem, 'change', this.hideParamInputField.bind(this, container));\n\n this.changeVisibilityForValueRuleParam(elem);\n\n }\n Event.observe(elem, 'blur', this.hideParamInputField.bind(this, container));\n }\n }\n\n var remove = Element.down(container, '.rule-param-remove');\n\n if (remove) {\n Event.observe(remove, 'click', this.removeRuleEntry.bind(this, container));\n }\n },\n\n showChooserElement: function (chooser) {\n this.chooserSelectedItems = $H({});\n\n if (chooser.hasClassName('no-split')) {\n this.chooserSelectedItems.set(this.updateElement.value, 1);\n } else {\n var values = this.updateElement.value.split(','),\n s = '';\n\n for (var i = 0; i < values.length; i++) {\n s = values[i].strip();\n\n if (s != '') {\n this.chooserSelectedItems.set(s, 1);\n }\n }\n }\n new Ajax.Request(chooser.getAttribute('url'), {\n evalScripts: true,\n parameters: {\n 'form_key': FORM_KEY, 'selected[]': this.chooserSelectedItems.keys()\n },\n onSuccess: function (transport) {\n if (this._processSuccess(transport)) {\n jQuery(chooser).html(transport.responseText);\n this.showChooserLoaded(chooser, transport);\n jQuery(chooser).trigger('contentUpdated');\n }\n }.bind(this),\n onFailure: this._processFailure.bind(this)\n });\n },\n\n showChooserLoaded: function (chooser, transport) {\n chooser.style.display = 'block';\n },\n\n showChooser: function (container, event) {\n var chooser = container.up('li');\n\n if (!chooser) {\n return;\n }\n chooser = chooser.down('.rule-chooser');\n\n if (!chooser) {\n return;\n }\n this.showChooserElement(chooser);\n },\n\n hideChooser: function (container, event) {\n var chooser = container.up('li');\n\n if (!chooser) {\n return;\n }\n chooser = chooser.down('.rule-chooser');\n\n if (!chooser) {\n return;\n }\n chooser.style.display = 'none';\n },\n\n toggleChooser: function (container, event) {\n if (this.readOnly) {\n return false;\n }\n\n var chooser = container.up('li').down('.rule-chooser');\n\n if (!chooser) {\n return;\n }\n\n if (chooser.style.display == 'block') {\n chooser.style.display = 'none';\n this.cleanChooser(container, event);\n } else {\n this.showChooserElement(chooser);\n }\n },\n\n cleanChooser: function (container, event) {\n var chooser = container.up('li').down('.rule-chooser');\n\n if (!chooser) {\n return;\n }\n chooser.innerHTML = '';\n },\n\n showParamInputField: function (container, event) {\n if (this.readOnly) {\n return false;\n }\n\n if (this.shownElement) {\n this.hideParamInputField(this.shownElement, event);\n }\n\n Element.addClassName(container, 'rule-param-edit');\n var elemContainer = Element.down(container, '.element');\n\n var elem = Element.down(elemContainer, 'input.input-text');\n\n jQuery(elem).trigger('contentUpdated');\n\n if (elem) {\n elem.focus();\n\n if (elem && elem.id && elem.id.match(/__value$/)) {\n this.updateElement = elem;\n }\n\n }\n\n var elem = Element.down(elemContainer, '.element-value-changer');\n\n if (elem) {\n elem.focus();\n }\n\n this.shownElement = container;\n },\n\n hideParamInputField: function (container, event) {\n Element.removeClassName(container, 'rule-param-edit');\n var label = Element.down(container, '.label'),\n elem;\n\n if (!container.hasClassName('rule-param-new-child')) {\n elem = Element.down(container, '.element-value-changer');\n\n if (elem && elem.options) {\n var selectedOptions = [];\n\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n selectedOptions.push(elem.options[i].text);\n }\n }\n\n var str = selectedOptions.join(', ');\n\n label.innerHTML = str != '' ? str : '...';\n }\n\n this.changeVisibilityForValueRuleParam(elem);\n\n elem = Element.down(container, 'input.input-text');\n\n if (elem) {\n var str = elem.value.replace(/(^\\s+|\\s+$)/g, '');\n\n elem.value = str;\n\n if (str == '') {\n str = '...';\n } else if (str.length > 30) {\n str = str.substr(0, 30) + '...';\n }\n label.innerHTML = str.escapeHTML();\n }\n } else {\n elem = container.down('.element-value-changer');\n\n if (elem.value) {\n this.addRuleNewChild(elem);\n }\n elem.value = '';\n }\n\n if (elem && elem.id && elem.id.match(/__value$/)) {\n this.hideChooser(container, event);\n this.updateElement = null;\n }\n\n this.shownElement = null;\n },\n\n changeVisibilityForValueRuleParam: function(elem) {\n var parsedElementId = elem.id.split('__');\n if (parsedElementId[2] !== 'operator') {\n return false;\n }\n\n var valueElement = jQuery('#' + parsedElementId[0] + '__' + parsedElementId[1] + '__value');\n\n if(elem.value === '<=>') {\n valueElement.closest('.rule-param').hide();\n } else {\n valueElement.closest('.rule-param').show();\n }\n\n return true;\n },\n\n addRuleNewChild: function (elem) {\n var parent_id = elem.id.replace(/^.*__(.*)__.*$/, '$1');\n var children_ul_id = elem.id.replace(/__/g, ':').replace(/[^:]*$/, 'children').replace(/:/g, '__');\n var children_ul = $(this.parent).select('#' + children_ul_id)[0];\n var max_id = 0,\n i;\n var children_inputs = Selector.findChildElements(children_ul, $A(['input.hidden']));\n\n if (children_inputs.length) {\n children_inputs.each(function (el) {\n if (el.id.match(/__type$/)) {\n i = 1 * el.id.replace(/^.*__.*?([0-9]+)__.*$/, '$1');\n max_id = i > max_id ? i : max_id;\n }\n });\n }\n var new_id = parent_id + '--' + (max_id + 1);\n var new_type = elem.value;\n var new_elem = document.createElement('LI');\n\n new_elem.className = 'rule-param-wait';\n new_elem.innerHTML = jQuery.mage.__('This won\\'t take long . . .');\n children_ul.insertBefore(new_elem, $(elem).up('li'));\n\n new Ajax.Request(this.newChildUrl, {\n evalScripts: true,\n parameters: {\n form_key: FORM_KEY, type: new_type.replace('/', '-'), id: new_id\n },\n onComplete: this.onAddNewChildComplete.bind(this, new_elem),\n onSuccess: function (transport) {\n if (this._processSuccess(transport)) {\n $(new_elem).update(transport.responseText);\n }\n }.bind(this),\n onFailure: this._processFailure.bind(this)\n });\n },\n\n _processSuccess: function (transport) {\n if (transport.responseText.isJSON()) {\n var response = transport.responseText.evalJSON();\n\n if (response.error) {\n alert(response.message);\n }\n\n if (response.ajaxExpired && response.ajaxRedirect) {\n setLocation(response.ajaxRedirect);\n }\n\n return false;\n }\n\n return true;\n },\n\n _processFailure: function (transport) {\n location.href = BASE_URL;\n },\n\n onAddNewChildComplete: function (new_elem) {\n if (this.readOnly) {\n return false;\n }\n\n $(new_elem).removeClassName('rule-param-wait');\n var elems = new_elem.getElementsByClassName('rule-param');\n\n for (var i = 0; i < elems.length; i++) {\n this.initParam(elems[i]);\n }\n },\n\n removeRuleEntry: function (container, event) {\n var li = Element.up(container, 'li');\n\n li.parentNode.removeChild(li);\n },\n\n chooserGridInit: function (grid) {\n //grid.reloadParams = {'selected[]':this.chooserSelectedItems.keys()};\n },\n\n chooserGridRowInit: function (grid, row) {\n if (!grid.reloadParams) {\n grid.reloadParams = {\n 'selected[]': this.chooserSelectedItems.keys()\n };\n }\n },\n\n chooserGridRowClick: function (grid, event) {\n var trElement = Event.findElement(event, 'tr');\n var isInput = Event.element(event).tagName == 'INPUT';\n\n if (trElement) {\n var checkbox = Element.select(trElement, 'input');\n\n if (checkbox[0]) {\n var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;\n\n grid.setCheckboxChecked(checkbox[0], checked);\n\n }\n }\n },\n\n chooserGridCheckboxCheck: function (grid, element, checked) {\n if (checked) {\n if (!element.up('th')) {\n this.chooserSelectedItems.set(element.value, 1);\n }\n } else {\n this.chooserSelectedItems.unset(element.value);\n }\n grid.reloadParams = {\n 'selected[]': this.chooserSelectedItems.keys()\n };\n this.updateElement.value = this.chooserSelectedItems.keys().join(', ');\n }\n };\n\n return VarienRulesForm;\n});\n","Magento_InventoryInStorePickupAdminUi/js/form/components/fieldset.js":"/*\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/components/fieldset',\n 'ko'\n], function (Fieldset, ko) {\n 'use strict';\n\n /**\n * TODO Remove when issue is resolved in core.\n * @see Please check issue in core for more details: https://github.com/magento/magento2/issues/22067.\n */\n return Fieldset.extend(ko).extend(\n {\n /**\n * Convert `visible` value from string ('1', '0') to bool (true, false)\n */\n initialize: function () {\n this._super();\n\n // eslint-disable-next-line vars-on-top\n var visible = this.visible;\n\n this.visible = ko.computed({\n /**\n * @returns {Boolean}\n */\n read: function () {\n return visible();\n },\n\n /**\n * @param {String} value\n */\n write: function (value) {\n value = Boolean(value) === value ? value : Boolean(parseInt(value, 10));\n visible(value);\n },\n owner: this\n });\n this.visible(visible());\n }\n }\n );\n});\n","Magento_InventoryInStorePickupAdminUi/js/form/element/conditional-required.js":"/*\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'Magento_Ui/js/form/element/abstract',\n 'ko',\n 'underscore',\n 'mageUtils'\n], function (uiElement, ko, _, utils) {\n 'use strict';\n\n /**\n * Provide possibility to make field required by dependency on other field value.\n */\n return uiElement.extend(\n {\n /**\n * Convert `required` value from string ('1', '0') to bool (true, false)\n */\n initialize: function () {\n this._super();\n\n // eslint-disable-next-line vars-on-top\n var required = this.required;\n\n this.required = ko.computed({\n /**\n * @returns {Boolean}\n */\n read: function () {\n return required();\n },\n\n /**\n * @param {String|Boolean} value\n */\n write: function (value) {\n value = Boolean(value) === value ? value : Boolean(parseInt(value, 10));\n\n if (required() !== value) {\n required(value);\n this.setValidation('required-entry', required());\n }\n },\n owner: this\n });\n this.required(required());\n },\n\n /**\n * @param {(String|Object)} rule\n * @param {(Object|Boolean)} [options]\n * @returns {Abstract} Chainable.\n */\n setValidation: function (rule, options) {\n var rules = utils.copy(this.validation),\n changed;\n\n if (_.isObject(rule)) {\n _.extend(this.validation, rule);\n } else {\n this.validation[rule] = options;\n }\n\n changed = !utils.compare(rules, this.validation).equal;\n\n if (changed) {\n this.required(!!this.validation['required-entry']);\n this.validate();\n }\n\n return this;\n }\n }\n );\n});\n","jquery/jquery.metadata.js":"/*\n * Metadata - jQuery plugin for parsing metadata from elements\n *\n * Copyright (c) 2006 John Resig, Yehuda Katz, J\u00ef\u00bf\u00bd\u00c3\u00b6rn Zaefferer, Paul McLanahan\n *\n * Dual licensed under the MIT and GPL licenses:\n * http://www.opensource.org/licenses/mit-license.php\n * http://www.gnu.org/licenses/gpl.html\n *\n * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $\n *\n */\n\n/**\n * Sets the type of metadata to use. Metadata is encoded in JSON, and each property\n * in the JSON will become a property of the element itself.\n *\n * There are four supported types of metadata storage:\n *\n * attr: Inside an attribute. The name parameter indicates *which* attribute.\n *\n * class: Inside the class attribute, wrapped in curly braces: { }\n *\n * elem: Inside a child element (e.g. a script tag). The\n * name parameter indicates *which* element.\n * html5: Values are stored in data-* attributes.\n *\n * The metadata for an element is loaded the first time the element is accessed via jQuery.\n *\n * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements\n * matched by expr, then redefine the metadata type and run another $(expr) for other elements.\n *\n * @name $.metadata.setType\n *\n * @example <p id=\"one\" class=\"some_class {item_id: 1, item_label: 'Label'}\">This is a p</p>\n * @before $.metadata.setType(\"class\")\n * @after $(\"#one\").metadata().item_id == 1; $(\"#one\").metadata().item_label == \"Label\"\n * @desc Reads metadata from the class attribute\n *\n * @example <p id=\"one\" class=\"some_class\" data=\"{item_id: 1, item_label: 'Label'}\">This is a p</p>\n * @before $.metadata.setType(\"attr\", \"data\")\n * @after $(\"#one\").metadata().item_id == 1; $(\"#one\").metadata().item_label == \"Label\"\n * @desc Reads metadata from a \"data\" attribute\n *\n * @example <p id=\"one\" class=\"some_class\"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>\n * @before $.metadata.setType(\"elem\", \"script\")\n * @after $(\"#one\").metadata().item_id == 1; $(\"#one\").metadata().item_label == \"Label\"\n * @desc Reads metadata from a nested script element\n *\n * @example <p id=\"one\" class=\"some_class\" data-item_id=\"1\" data-item_label=\"Label\">This is a p</p>\n * @before $.metadata.setType(\"html5\")\n * @after $(\"#one\").metadata().item_id == 1; $(\"#one\").metadata().item_label == \"Label\"\n * @desc Reads metadata from a series of data-* attributes\n *\n * @param String type The encoding type\n * @param String name The name of the attribute to be used to get metadata (optional)\n * @cat Plugins/Metadata\n * @descr Sets the type of encoding to be used when loading metadata for the first time\n * @type undefined\n * @see metadata()\n */\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n define([\"jquery\"], factory);\n } else {\n factory(jQuery);\n }\n}(function ($) {\n\n\n $.extend({\n metadata : {\n defaults : {\n type: 'class',\n name: 'metadata',\n cre: /({.*})/,\n single: 'metadata',\n meta:'validate'\n },\n setType: function( type, name ){\n this.defaults.type = type;\n this.defaults.name = name;\n },\n get: function( elem, opts ){\n var settings = $.extend({},this.defaults,opts);\n // check for empty string in single property\n if (!settings.single.length) {\n settings.single = 'metadata';\n }\n if (!settings.meta.length) {\n settings.meta = 'validate';\n }\n\n var data = $.data(elem, settings.single);\n // returned cached data if it already exists\n if ( data ) return data;\n\n data = \"{}\";\n\n var getData = function(data) {\n if(typeof data != \"string\") return data;\n\n if( data.indexOf('{') < 0 ) {\n data = eval(\"(\" + data + \")\");\n }\n }\n\n var getObject = function(data) {\n if(typeof data != \"string\") return data;\n\n data = eval(\"(\" + data + \")\");\n return data;\n }\n\n if ( settings.type == \"html5\" ) {\n var object = {};\n $( elem.attributes ).each(function() {\n var name = this.nodeName;\n if (name.indexOf('data-' + settings.meta) === 0) {\n name = name.replace(/^data-/, '');\n }\n else {\n return true;\n }\n object[name] = getObject(this.value);\n });\n } else {\n if ( settings.type == \"class\" ) {\n var m = settings.cre.exec( elem.className );\n if ( m )\n data = m[1];\n } else if ( settings.type == \"elem\" ) {\n if( !elem.getElementsByTagName ) return;\n var e = elem.getElementsByTagName(settings.name);\n if ( e.length )\n data = $.trim(e[0].innerHTML);\n } else if ( elem.getAttribute != undefined ) {\n var attr = elem.getAttribute( settings.name );\n if ( attr )\n data = attr;\n }\n object = getObject(data.indexOf(\"{\") < 0 ? \"{\" + data + \"}\" : data);\n }\n\n $.data( elem, settings.single, object );\n return object;\n }\n }\n });\n\n /**\n * Returns the metadata object for the first member of the jQuery object.\n *\n * @name metadata\n * @descr Returns element's metadata object\n * @param Object opts An object contianing settings to override the defaults\n * @type jQuery\n * @cat Plugins/Metadata\n */\n $.fn.metadata = function( opts ){\n return $.metadata.get( this[0], opts );\n };\n\n}));","jquery/jquery-ui-timepicker-addon.js":"/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20\n* http://trentrichardson.com/examples/timepicker\n* Copyright (c) 2016 Trent Richardson; Licensed MIT */\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery', 'jquery/ui'], factory);\n } else {\n factory(jQuery);\n }\n}(function ($) {\n\n /*\n * Lets not redefine timepicker, Prevent \"Uncaught RangeError: Maximum call stack size exceeded\"\n */\n $.ui.timepicker = $.ui.timepicker || {};\n if ($.ui.timepicker.version) {\n return;\n }\n\n /*\n * Extend jQueryUI, get it started with our version number\n */\n $.extend($.ui, {\n timepicker: {\n version: \"1.6.3\"\n }\n });\n\n /*\n * Timepicker manager.\n * Use the singleton instance of this class, $.timepicker, to interact with the time picker.\n * Settings for (groups of) time pickers are maintained in an instance object,\n * allowing multiple different settings on the same page.\n */\n var Timepicker = function () {\n this.regional = []; // Available regional settings, indexed by language code\n this.regional[''] = { // Default regional settings\n currentText: 'Now',\n closeText: 'Done',\n amNames: ['AM', 'A'],\n pmNames: ['PM', 'P'],\n timeFormat: 'HH:mm',\n timeSuffix: '',\n timeOnlyTitle: 'Choose Time',\n timeText: 'Time',\n hourText: 'Hour',\n minuteText: 'Minute',\n secondText: 'Second',\n millisecText: 'Millisecond',\n microsecText: 'Microsecond',\n timezoneText: 'Time Zone',\n isRTL: false\n };\n this._defaults = { // Global defaults for all the datetime picker instances\n showButtonPanel: true,\n timeOnly: false,\n timeOnlyShowDate: false,\n showHour: null,\n showMinute: null,\n showSecond: null,\n showMillisec: null,\n showMicrosec: null,\n showTimezone: null,\n showTime: true,\n stepHour: 1,\n stepMinute: 1,\n stepSecond: 1,\n stepMillisec: 1,\n stepMicrosec: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisec: 0,\n microsec: 0,\n timezone: null,\n hourMin: 0,\n minuteMin: 0,\n secondMin: 0,\n millisecMin: 0,\n microsecMin: 0,\n hourMax: 23,\n minuteMax: 59,\n secondMax: 59,\n millisecMax: 999,\n microsecMax: 999,\n minDateTime: null,\n maxDateTime: null,\n maxTime: null,\n minTime: null,\n onSelect: null,\n hourGrid: 0,\n minuteGrid: 0,\n secondGrid: 0,\n millisecGrid: 0,\n microsecGrid: 0,\n alwaysSetTime: true,\n separator: ' ',\n altFieldTimeOnly: true,\n altTimeFormat: null,\n altSeparator: null,\n altTimeSuffix: null,\n altRedirectFocus: true,\n pickerTimeFormat: null,\n pickerTimeSuffix: null,\n showTimepicker: true,\n timezoneList: null,\n addSliderAccess: false,\n sliderAccessArgs: null,\n controlType: 'slider',\n oneLine: false,\n defaultValue: null,\n parse: 'strict',\n afterInject: null\n };\n $.extend(this._defaults, this.regional['']);\n };\n\n $.extend(Timepicker.prototype, {\n $input: null,\n $altInput: null,\n $timeObj: null,\n inst: null,\n hour_slider: null,\n minute_slider: null,\n second_slider: null,\n millisec_slider: null,\n microsec_slider: null,\n timezone_select: null,\n maxTime: null,\n minTime: null,\n hour: 0,\n minute: 0,\n second: 0,\n millisec: 0,\n microsec: 0,\n timezone: null,\n hourMinOriginal: null,\n minuteMinOriginal: null,\n secondMinOriginal: null,\n millisecMinOriginal: null,\n microsecMinOriginal: null,\n hourMaxOriginal: null,\n minuteMaxOriginal: null,\n secondMaxOriginal: null,\n millisecMaxOriginal: null,\n microsecMaxOriginal: null,\n ampm: '',\n formattedDate: '',\n formattedTime: '',\n formattedDateTime: '',\n timezoneList: null,\n units: ['hour', 'minute', 'second', 'millisec', 'microsec'],\n support: {},\n control: null,\n\n /*\n * Override the default settings for all instances of the time picker.\n * @param {Object} settings object - the new settings to use as defaults (anonymous object)\n * @return {Object} the manager object\n */\n setDefaults: function (settings) {\n extendRemove(this._defaults, settings || {});\n return this;\n },\n\n /*\n * Create a new Timepicker instance\n */\n _newInst: function ($input, opts) {\n var tp_inst = new Timepicker(),\n inlineSettings = {},\n fns = {},\n overrides, i;\n\n for (var attrName in this._defaults) {\n if (this._defaults.hasOwnProperty(attrName)) {\n var attrValue = $input.attr('time:' + attrName);\n if (attrValue) {\n try {\n inlineSettings[attrName] = eval(attrValue);\n } catch (err) {\n inlineSettings[attrName] = attrValue;\n }\n }\n }\n }\n\n overrides = {\n beforeShow: function (input, dp_inst) {\n if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) {\n return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst);\n }\n },\n onChangeMonthYear: function (year, month, dp_inst) {\n // Update the time as well : this prevents the time from disappearing from the $input field.\n // tp_inst._updateDateTime(dp_inst);\n if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {\n tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);\n }\n },\n onClose: function (dateText, dp_inst) {\n if (tp_inst.timeDefined === true && $input.val() !== '') {\n tp_inst._updateDateTime(dp_inst);\n }\n if ($.isFunction(tp_inst._defaults.evnts.onClose)) {\n tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst);\n }\n }\n };\n for (i in overrides) {\n if (overrides.hasOwnProperty(i)) {\n fns[i] = opts[i] || this._defaults[i] || null;\n }\n }\n\n tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, {\n evnts: fns,\n timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');\n });\n tp_inst.amNames = $.map(tp_inst._defaults.amNames, function (val) {\n return val.toUpperCase();\n });\n tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function (val) {\n return val.toUpperCase();\n });\n\n // detect which units are supported\n tp_inst.support = detectSupport(\n tp_inst._defaults.timeFormat +\n (tp_inst._defaults.pickerTimeFormat ? tp_inst._defaults.pickerTimeFormat : '') +\n (tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat : ''));\n\n // controlType is string - key to our this._controls\n if (typeof(tp_inst._defaults.controlType) === 'string') {\n if (tp_inst._defaults.controlType === 'slider' && typeof($.ui.slider) === 'undefined') {\n tp_inst._defaults.controlType = 'select';\n }\n tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];\n }\n // controlType is an object and must implement create, options, value methods\n else {\n tp_inst.control = tp_inst._defaults.controlType;\n }\n\n // prep the timezone options\n var timezoneList = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -270, -240, -210, -180, -120, -60,\n 0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 525, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840];\n if (tp_inst._defaults.timezoneList !== null) {\n timezoneList = tp_inst._defaults.timezoneList;\n }\n var tzl = timezoneList.length, tzi = 0, tzv = null;\n if (tzl > 0 && typeof timezoneList[0] !== 'object') {\n for (; tzi < tzl; tzi++) {\n tzv = timezoneList[tzi];\n timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) };\n }\n }\n tp_inst._defaults.timezoneList = timezoneList;\n\n // set the default units\n tp_inst.timezone = tp_inst._defaults.timezone !== null ? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) :\n ((new Date()).getTimezoneOffset() * -1);\n tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ? tp_inst._defaults.hourMin :\n tp_inst._defaults.hour > tp_inst._defaults.hourMax ? tp_inst._defaults.hourMax : tp_inst._defaults.hour;\n tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin :\n tp_inst._defaults.minute > tp_inst._defaults.minuteMax ? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;\n tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin :\n tp_inst._defaults.second > tp_inst._defaults.secondMax ? tp_inst._defaults.secondMax : tp_inst._defaults.second;\n tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin :\n tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;\n tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin :\n tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec;\n tp_inst.ampm = '';\n tp_inst.$input = $input;\n\n if (tp_inst._defaults.altField) {\n tp_inst.$altInput = $(tp_inst._defaults.altField);\n if (tp_inst._defaults.altRedirectFocus === true) {\n tp_inst.$altInput.css({\n cursor: 'pointer'\n }).focus(function () {\n $input.trigger(\"focus\");\n });\n }\n }\n\n if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {\n tp_inst._defaults.minDate = new Date();\n }\n if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) {\n tp_inst._defaults.maxDate = new Date();\n }\n\n // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..\n if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) {\n tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());\n }\n if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) {\n tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());\n }\n if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) {\n tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());\n }\n if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {\n tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());\n }\n tp_inst.$input.bind('focus', function () {\n tp_inst._onFocus();\n });\n\n return tp_inst;\n },\n\n /*\n * add our sliders to the calendar\n */\n _addTimePicker: function (dp_inst) {\n var currDT = $.trim((this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val());\n\n this.timeDefined = this._parseTime(currDT);\n this._limitMinMaxDateTime(dp_inst, false);\n this._injectTimePicker();\n this._afterInject();\n },\n\n /*\n * parse the time string from input value or _setTime\n */\n _parseTime: function (timeString, withDate) {\n if (!this.inst) {\n this.inst = $.datepicker._getInst(this.$input[0]);\n }\n\n if (withDate || !this._defaults.timeOnly) {\n var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');\n try {\n var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults);\n if (!parseRes.timeObj) {\n return false;\n }\n $.extend(this, parseRes.timeObj);\n } catch (err) {\n $.timepicker.log(\"Error parsing the date/time string: \" + err +\n \"\\ndate/time string = \" + timeString +\n \"\\ntimeFormat = \" + this._defaults.timeFormat +\n \"\\ndateFormat = \" + dp_dateFormat);\n return false;\n }\n return true;\n } else {\n var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults);\n if (!timeObj) {\n return false;\n }\n $.extend(this, timeObj);\n return true;\n }\n },\n\n /*\n * Handle callback option after injecting timepicker\n */\n _afterInject: function() {\n var o = this.inst.settings;\n if ($.isFunction(o.afterInject)) {\n o.afterInject.call(this);\n }\n },\n\n /*\n * generate and inject html for timepicker into ui datepicker\n */\n _injectTimePicker: function () {\n var $dp = this.inst.dpDiv,\n o = this.inst.settings,\n tp_inst = this,\n litem = '',\n uitem = '',\n show = null,\n max = {},\n gridSize = {},\n size = null,\n i = 0,\n l = 0;\n\n // Prevent displaying twice\n if ($dp.find(\"div.ui-timepicker-div\").length === 0 && o.showTimepicker) {\n var noDisplay = ' ui_tpicker_unit_hide',\n html = '<div class=\"ui-timepicker-div' + (o.isRTL ? ' ui-timepicker-rtl' : '') + (o.oneLine && o.controlType === 'select' ? ' ui-timepicker-oneLine' : '') + '\"><dl>' + '<dt class=\"ui_tpicker_time_label' + ((o.showTime) ? '' : noDisplay) + '\">' + o.timeText + '</dt>' +\n '<dd class=\"ui_tpicker_time '+ ((o.showTime) ? '' : noDisplay) + '\"><input class=\"ui_tpicker_time_input\" ' + (o.timeInput ? '' : 'disabled') + '/></dd>';\n\n // Create the markup\n for (i = 0, l = this.units.length; i < l; i++) {\n litem = this.units[i];\n uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1);\n show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem];\n\n // Added by Peter Medeiros:\n // - Figure out what the hour/minute/second max should be based on the step values.\n // - Example: if stepMinute is 15, then minMax is 45.\n max[litem] = parseInt((o[litem + 'Max'] - ((o[litem + 'Max'] - o[litem + 'Min']) % o['step' + uitem])), 10);\n gridSize[litem] = 0;\n\n html += '<dt class=\"ui_tpicker_' + litem + '_label' + (show ? '' : noDisplay) + '\">' + o[litem + 'Text'] + '</dt>' +\n '<dd class=\"ui_tpicker_' + litem + (show ? '' : noDisplay) + '\"><div class=\"ui_tpicker_' + litem + '_slider' + (show ? '' : noDisplay) + '\"></div>';\n\n if (show && o[litem + 'Grid'] > 0) {\n html += '<div style=\"padding-left: 1px\"><table class=\"ui-tpicker-grid-label\"><tr>';\n\n if (litem === 'hour') {\n for (var h = o[litem + 'Min']; h <= max[litem]; h += parseInt(o[litem + 'Grid'], 10)) {\n gridSize[litem]++;\n var tmph = $.datepicker.formatTime(this.support.ampm ? 'hht' : 'HH', {hour: h}, o);\n html += '<td data-for=\"' + litem + '\">' + tmph + '</td>';\n }\n }\n else {\n for (var m = o[litem + 'Min']; m <= max[litem]; m += parseInt(o[litem + 'Grid'], 10)) {\n gridSize[litem]++;\n html += '<td data-for=\"' + litem + '\">' + ((m < 10) ? '0' : '') + m + '</td>';\n }\n }\n\n html += '</tr></table></div>';\n }\n html += '</dd>';\n }\n\n // Timezone\n var showTz = o.showTimezone !== null ? o.showTimezone : this.support.timezone;\n html += '<dt class=\"ui_tpicker_timezone_label' + (showTz ? '' : noDisplay) + '\">' + o.timezoneText + '</dt>';\n html += '<dd class=\"ui_tpicker_timezone' + (showTz ? '' : noDisplay) + '\"></dd>';\n\n // Create the elements from string\n html += '</dl></div>';\n var $tp = $(html);\n\n // if we only want time picker...\n if (o.timeOnly === true) {\n $tp.prepend('<div class=\"ui-widget-header ui-helper-clearfix ui-corner-all\">' + '<div class=\"ui-datepicker-title\">' + o.timeOnlyTitle + '</div>' + '</div>');\n $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();\n }\n\n // add sliders, adjust grids, add events\n for (i = 0, l = tp_inst.units.length; i < l; i++) {\n litem = tp_inst.units[i];\n uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1);\n show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem];\n\n // add the slider\n tp_inst[litem + '_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_' + litem + '_slider'), litem, tp_inst[litem], o[litem + 'Min'], max[litem], o['step' + uitem]);\n\n // adjust the grid and add click event\n if (show && o[litem + 'Grid'] > 0) {\n size = 100 * gridSize[litem] * o[litem + 'Grid'] / (max[litem] - o[litem + 'Min']);\n $tp.find('.ui_tpicker_' + litem + ' table').css({\n width: size + \"%\",\n marginLeft: o.isRTL ? '0' : ((size / (-2 * gridSize[litem])) + \"%\"),\n marginRight: o.isRTL ? ((size / (-2 * gridSize[litem])) + \"%\") : '0',\n borderCollapse: 'collapse'\n }).find(\"td\").click(function (e) {\n var $t = $(this),\n h = $t.html(),\n n = parseInt(h.replace(/[^0-9]/g), 10),\n ap = h.replace(/[^apm]/ig),\n f = $t.data('for'); // loses scope, so we use data-for\n\n if (f === 'hour') {\n if (ap.indexOf('p') !== -1 && n < 12) {\n n += 12;\n }\n else {\n if (ap.indexOf('a') !== -1 && n === 12) {\n n = 0;\n }\n }\n }\n\n tp_inst.control.value(tp_inst, tp_inst[f + '_slider'], litem, n);\n\n tp_inst._onTimeChange();\n tp_inst._onSelectHandler();\n }).css({\n cursor: 'pointer',\n width: (100 / gridSize[litem]) + '%',\n textAlign: 'center',\n overflow: 'hidden'\n });\n } // end if grid > 0\n } // end for loop\n\n // Add timezone options\n this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find(\"select\");\n $.fn.append.apply(this.timezone_select,\n $.map(o.timezoneList, function (val, idx) {\n return $(\"<option />\").val(typeof val === \"object\" ? val.value : val).text(typeof val === \"object\" ? val.label : val);\n }));\n if (typeof(this.timezone) !== \"undefined\" && this.timezone !== null && this.timezone !== \"\") {\n var local_timezone = (new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset() * -1;\n if (local_timezone === this.timezone) {\n selectLocalTimezone(tp_inst);\n } else {\n this.timezone_select.val(this.timezone);\n }\n } else {\n if (typeof(this.hour) !== \"undefined\" && this.hour !== null && this.hour !== \"\") {\n this.timezone_select.val(o.timezone);\n } else {\n selectLocalTimezone(tp_inst);\n }\n }\n this.timezone_select.change(function () {\n tp_inst._onTimeChange();\n tp_inst._onSelectHandler();\n tp_inst._afterInject();\n });\n // End timezone options\n\n // inject timepicker into datepicker\n var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');\n if ($buttonPanel.length) {\n $buttonPanel.before($tp);\n } else {\n $dp.append($tp);\n }\n\n this.$timeObj = $tp.find('.ui_tpicker_time_input');\n this.$timeObj.change(function () {\n var timeFormat = tp_inst.inst.settings.timeFormat;\n var parsedTime = $.datepicker.parseTime(timeFormat, this.value);\n var update = new Date();\n if (parsedTime) {\n update.setHours(parsedTime.hour);\n update.setMinutes(parsedTime.minute);\n update.setSeconds(parsedTime.second);\n $.datepicker._setTime(tp_inst.inst, update);\n } else {\n this.value = tp_inst.formattedTime;\n this.blur();\n }\n });\n\n if (this.inst !== null) {\n var timeDefined = this.timeDefined;\n this._onTimeChange();\n this.timeDefined = timeDefined;\n }\n\n // slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/\n if (this._defaults.addSliderAccess) {\n var sliderAccessArgs = this._defaults.sliderAccessArgs,\n rtl = this._defaults.isRTL;\n sliderAccessArgs.isRTL = rtl;\n\n setTimeout(function () { // fix for inline mode\n if ($tp.find('.ui-slider-access').length === 0) {\n $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);\n\n // fix any grids since sliders are shorter\n var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);\n if (sliderAccessWidth) {\n $tp.find('table:visible').each(function () {\n var $g = $(this),\n oldWidth = $g.outerWidth(),\n oldMarginLeft = $g.css(rtl ? 'marginRight' : 'marginLeft').toString().replace('%', ''),\n newWidth = oldWidth - sliderAccessWidth,\n newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%',\n css = { width: newWidth, marginRight: 0, marginLeft: 0 };\n css[rtl ? 'marginRight' : 'marginLeft'] = newMarginLeft;\n $g.css(css);\n });\n }\n }\n }, 10);\n }\n // end slideAccess integration\n\n tp_inst._limitMinMaxDateTime(this.inst, true);\n }\n },\n\n /*\n * This function tries to limit the ability to go outside the\n * min/max date range\n */\n _limitMinMaxDateTime: function (dp_inst, adjustSliders) {\n var o = this._defaults,\n dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);\n\n if (!this._defaults.showTimepicker) {\n return;\n } // No time so nothing to check here\n\n if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) {\n var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),\n minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);\n\n if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) {\n this.hourMinOriginal = o.hourMin;\n this.minuteMinOriginal = o.minuteMin;\n this.secondMinOriginal = o.secondMin;\n this.millisecMinOriginal = o.millisecMin;\n this.microsecMinOriginal = o.microsecMin;\n }\n\n if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() === dp_date.getTime()) {\n this._defaults.hourMin = minDateTime.getHours();\n if (this.hour <= this._defaults.hourMin) {\n this.hour = this._defaults.hourMin;\n this._defaults.minuteMin = minDateTime.getMinutes();\n if (this.minute <= this._defaults.minuteMin) {\n this.minute = this._defaults.minuteMin;\n this._defaults.secondMin = minDateTime.getSeconds();\n if (this.second <= this._defaults.secondMin) {\n this.second = this._defaults.secondMin;\n this._defaults.millisecMin = minDateTime.getMilliseconds();\n if (this.millisec <= this._defaults.millisecMin) {\n this.millisec = this._defaults.millisecMin;\n this._defaults.microsecMin = minDateTime.getMicroseconds();\n } else {\n if (this.microsec < this._defaults.microsecMin) {\n this.microsec = this._defaults.microsecMin;\n }\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n } else {\n this._defaults.millisecMin = this.millisecMinOriginal;\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n } else {\n this._defaults.secondMin = this.secondMinOriginal;\n this._defaults.millisecMin = this.millisecMinOriginal;\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n } else {\n this._defaults.minuteMin = this.minuteMinOriginal;\n this._defaults.secondMin = this.secondMinOriginal;\n this._defaults.millisecMin = this.millisecMinOriginal;\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n } else {\n this._defaults.hourMin = this.hourMinOriginal;\n this._defaults.minuteMin = this.minuteMinOriginal;\n this._defaults.secondMin = this.secondMinOriginal;\n this._defaults.millisecMin = this.millisecMinOriginal;\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n }\n\n if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) {\n var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),\n maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);\n\n if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) {\n this.hourMaxOriginal = o.hourMax;\n this.minuteMaxOriginal = o.minuteMax;\n this.secondMaxOriginal = o.secondMax;\n this.millisecMaxOriginal = o.millisecMax;\n this.microsecMaxOriginal = o.microsecMax;\n }\n\n if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() === dp_date.getTime()) {\n this._defaults.hourMax = maxDateTime.getHours();\n if (this.hour >= this._defaults.hourMax) {\n this.hour = this._defaults.hourMax;\n this._defaults.minuteMax = maxDateTime.getMinutes();\n if (this.minute >= this._defaults.minuteMax) {\n this.minute = this._defaults.minuteMax;\n this._defaults.secondMax = maxDateTime.getSeconds();\n if (this.second >= this._defaults.secondMax) {\n this.second = this._defaults.secondMax;\n this._defaults.millisecMax = maxDateTime.getMilliseconds();\n if (this.millisec >= this._defaults.millisecMax) {\n this.millisec = this._defaults.millisecMax;\n this._defaults.microsecMax = maxDateTime.getMicroseconds();\n } else {\n if (this.microsec > this._defaults.microsecMax) {\n this.microsec = this._defaults.microsecMax;\n }\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n } else {\n this._defaults.millisecMax = this.millisecMaxOriginal;\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n } else {\n this._defaults.secondMax = this.secondMaxOriginal;\n this._defaults.millisecMax = this.millisecMaxOriginal;\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n } else {\n this._defaults.minuteMax = this.minuteMaxOriginal;\n this._defaults.secondMax = this.secondMaxOriginal;\n this._defaults.millisecMax = this.millisecMaxOriginal;\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n } else {\n this._defaults.hourMax = this.hourMaxOriginal;\n this._defaults.minuteMax = this.minuteMaxOriginal;\n this._defaults.secondMax = this.secondMaxOriginal;\n this._defaults.millisecMax = this.millisecMaxOriginal;\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n }\n\n if (dp_inst.settings.minTime!==null) {\n var tempMinTime=new Date(\"01/01/1970 \" + dp_inst.settings.minTime);\n if (this.hour<tempMinTime.getHours()) {\n this.hour=this._defaults.hourMin=tempMinTime.getHours();\n this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();\n } else if (this.hour===tempMinTime.getHours() && this.minute<tempMinTime.getMinutes()) {\n this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();\n } else {\n if (this._defaults.hourMin<tempMinTime.getHours()) {\n this._defaults.hourMin=tempMinTime.getHours();\n this._defaults.minuteMin=tempMinTime.getMinutes();\n } else if (this._defaults.hourMin===tempMinTime.getHours()===this.hour && this._defaults.minuteMin<tempMinTime.getMinutes()) {\n this._defaults.minuteMin=tempMinTime.getMinutes();\n } else {\n this._defaults.minuteMin=0;\n }\n }\n }\n\n if (dp_inst.settings.maxTime!==null) {\n var tempMaxTime=new Date(\"01/01/1970 \" + dp_inst.settings.maxTime);\n if (this.hour>tempMaxTime.getHours()) {\n this.hour=this._defaults.hourMax=tempMaxTime.getHours();\n this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();\n } else if (this.hour===tempMaxTime.getHours() && this.minute>tempMaxTime.getMinutes()) {\n this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();\n } else {\n if (this._defaults.hourMax>tempMaxTime.getHours()) {\n this._defaults.hourMax=tempMaxTime.getHours();\n this._defaults.minuteMax=tempMaxTime.getMinutes();\n } else if (this._defaults.hourMax===tempMaxTime.getHours()===this.hour && this._defaults.minuteMax>tempMaxTime.getMinutes()) {\n this._defaults.minuteMax=tempMaxTime.getMinutes();\n } else {\n this._defaults.minuteMax=59;\n }\n }\n }\n\n if (adjustSliders !== undefined && adjustSliders === true) {\n var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),\n minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),\n secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),\n millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10),\n microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10);\n\n if (this.hour_slider) {\n this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax, step: this._defaults.stepHour });\n this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour));\n }\n if (this.minute_slider) {\n this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax, step: this._defaults.stepMinute });\n this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute));\n }\n if (this.second_slider) {\n this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax, step: this._defaults.stepSecond });\n this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond));\n }\n if (this.millisec_slider) {\n this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax, step: this._defaults.stepMillisec });\n this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec));\n }\n if (this.microsec_slider) {\n this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax, step: this._defaults.stepMicrosec });\n this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec));\n }\n }\n\n },\n\n /*\n * when a slider moves, set the internal time...\n * on time change is also called when the time is updated in the text field\n */\n _onTimeChange: function () {\n if (!this._defaults.showTimepicker) {\n return;\n }\n var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,\n minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,\n second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,\n millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false,\n microsec = (this.microsec_slider) ? this.control.value(this, this.microsec_slider, 'microsec') : false,\n timezone = (this.timezone_select) ? this.timezone_select.val() : false,\n o = this._defaults,\n pickerTimeFormat = o.pickerTimeFormat || o.timeFormat,\n pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix;\n\n if (typeof(hour) === 'object') {\n hour = false;\n }\n if (typeof(minute) === 'object') {\n minute = false;\n }\n if (typeof(second) === 'object') {\n second = false;\n }\n if (typeof(millisec) === 'object') {\n millisec = false;\n }\n if (typeof(microsec) === 'object') {\n microsec = false;\n }\n if (typeof(timezone) === 'object') {\n timezone = false;\n }\n\n if (hour !== false) {\n hour = parseInt(hour, 10);\n }\n if (minute !== false) {\n minute = parseInt(minute, 10);\n }\n if (second !== false) {\n second = parseInt(second, 10);\n }\n if (millisec !== false) {\n millisec = parseInt(millisec, 10);\n }\n if (microsec !== false) {\n microsec = parseInt(microsec, 10);\n }\n if (timezone !== false) {\n timezone = timezone.toString();\n }\n\n var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];\n\n // If the update was done in the input field, the input field should not be updated.\n // If the update was done using the sliders, update the input field.\n var hasChanged = (\n hour !== parseInt(this.hour,10) || // sliders should all be numeric\n minute !== parseInt(this.minute,10) ||\n second !== parseInt(this.second,10) ||\n millisec !== parseInt(this.millisec,10) ||\n microsec !== parseInt(this.microsec,10) ||\n (this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||\n (this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or \"EST\" format, so use toString()\n );\n\n if (hasChanged) {\n\n if (hour !== false) {\n this.hour = hour;\n }\n if (minute !== false) {\n this.minute = minute;\n }\n if (second !== false) {\n this.second = second;\n }\n if (millisec !== false) {\n this.millisec = millisec;\n }\n if (microsec !== false) {\n this.microsec = microsec;\n }\n if (timezone !== false) {\n this.timezone = timezone;\n }\n\n if (!this.inst) {\n this.inst = $.datepicker._getInst(this.$input[0]);\n }\n\n this._limitMinMaxDateTime(this.inst, true);\n }\n if (this.support.ampm) {\n this.ampm = ampm;\n }\n\n // Updates the time within the timepicker\n this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);\n if (this.$timeObj) {\n if (pickerTimeFormat === o.timeFormat) {\n this.$timeObj.val(this.formattedTime + pickerTimeSuffix);\n }\n else {\n this.$timeObj.val($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);\n }\n if (this.$timeObj[0].setSelectionRange) {\n var sPos = this.$timeObj[0].selectionStart;\n var ePos = this.$timeObj[0].selectionEnd;\n this.$timeObj[0].setSelectionRange(sPos, ePos);\n }\n }\n\n this.timeDefined = true;\n if (hasChanged) {\n this._updateDateTime();\n //this.$input.focus(); // may automatically open the picker on setDate\n }\n },\n\n /*\n * call custom onSelect.\n * bind to sliders slidestop, and grid click.\n */\n _onSelectHandler: function () {\n var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;\n var inputEl = this.$input ? this.$input[0] : null;\n if (onSelect && inputEl) {\n onSelect.apply(inputEl, [this.formattedDateTime, this]);\n }\n },\n\n /*\n * update our input with the new date time..\n */\n _updateDateTime: function (dp_inst) {\n dp_inst = this.inst || dp_inst;\n var dtTmp = (dp_inst.currentYear > 0?\n new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay) :\n new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),\n dt = $.datepicker._daylightSavingAdjust(dtTmp),\n //dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),\n //dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay)),\n dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),\n formatCfg = $.datepicker._getFormatConfig(dp_inst),\n timeAvailable = dt !== null && this.timeDefined;\n this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);\n var formattedDateTime = this.formattedDate;\n\n // if a slider was changed but datepicker doesn't have a value yet, set it\n if (dp_inst.lastVal === \"\") {\n dp_inst.currentYear = dp_inst.selectedYear;\n dp_inst.currentMonth = dp_inst.selectedMonth;\n dp_inst.currentDay = dp_inst.selectedDay;\n }\n\n /*\n * remove following lines to force every changes in date picker to change the input value\n * Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker.\n * If the user manually empty the value in the input field, the date picker will never change selected value.\n */\n //if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) {\n //\treturn;\n //}\n\n if (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === false) {\n formattedDateTime = this.formattedTime;\n } else if ((this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) || (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === true)) {\n formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;\n }\n\n this.formattedDateTime = formattedDateTime;\n\n if (!this._defaults.showTimepicker) {\n this.$input.val(this.formattedDate);\n } else if (this.$altInput && this._defaults.timeOnly === false && this._defaults.altFieldTimeOnly === true) {\n this.$altInput.val(this.formattedTime);\n this.$input.val(this.formattedDate);\n } else if (this.$altInput) {\n this.$input.val(formattedDateTime);\n var altFormattedDateTime = '',\n altSeparator = this._defaults.altSeparator !== null ? this._defaults.altSeparator : this._defaults.separator,\n altTimeSuffix = this._defaults.altTimeSuffix !== null ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;\n\n if (!this._defaults.timeOnly) {\n if (this._defaults.altFormat) {\n altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);\n }\n else {\n altFormattedDateTime = this.formattedDate;\n }\n\n if (altFormattedDateTime) {\n altFormattedDateTime += altSeparator;\n }\n }\n\n if (this._defaults.altTimeFormat !== null) {\n altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix;\n }\n else {\n altFormattedDateTime += this.formattedTime + altTimeSuffix;\n }\n this.$altInput.val(altFormattedDateTime);\n } else {\n this.$input.val(formattedDateTime);\n }\n\n this.$input.trigger(\"change\");\n },\n\n _onFocus: function () {\n if (!this.$input.val() && this._defaults.defaultValue) {\n this.$input.val(this._defaults.defaultValue);\n var inst = $.datepicker._getInst(this.$input.get(0)),\n tp_inst = $.datepicker._get(inst, 'timepicker');\n if (tp_inst) {\n if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {\n try {\n $.datepicker._updateDatepicker(inst);\n } catch (err) {\n $.timepicker.log(err);\n }\n }\n }\n }\n },\n\n /*\n * Small abstraction to control types\n * We can add more, just be sure to follow the pattern: create, options, value\n */\n _controls: {\n // slider methods\n slider: {\n create: function (tp_inst, obj, unit, val, min, max, step) {\n var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60\n return obj.prop('slide', null).slider({\n orientation: \"horizontal\",\n value: rtl ? val * -1 : val,\n min: rtl ? max * -1 : min,\n max: rtl ? min * -1 : max,\n step: step,\n slide: function (event, ui) {\n tp_inst.control.value(tp_inst, $(this), unit, rtl ? ui.value * -1 : ui.value);\n tp_inst._onTimeChange();\n },\n stop: function (event, ui) {\n tp_inst._onSelectHandler();\n }\n });\n },\n options: function (tp_inst, obj, unit, opts, val) {\n if (tp_inst._defaults.isRTL) {\n if (typeof(opts) === 'string') {\n if (opts === 'min' || opts === 'max') {\n if (val !== undefined) {\n return obj.slider(opts, val * -1);\n }\n return Math.abs(obj.slider(opts));\n }\n return obj.slider(opts);\n }\n var min = opts.min,\n max = opts.max;\n opts.min = opts.max = null;\n if (min !== undefined) {\n opts.max = min * -1;\n }\n if (max !== undefined) {\n opts.min = max * -1;\n }\n return obj.slider(opts);\n }\n if (typeof(opts) === 'string' && val !== undefined) {\n return obj.slider(opts, val);\n }\n return obj.slider(opts);\n },\n value: function (tp_inst, obj, unit, val) {\n if (tp_inst._defaults.isRTL) {\n if (val !== undefined) {\n return obj.slider('value', val * -1);\n }\n return Math.abs(obj.slider('value'));\n }\n if (val !== undefined) {\n return obj.slider('value', val);\n }\n return obj.slider('value');\n }\n },\n // select methods\n select: {\n create: function (tp_inst, obj, unit, val, min, max, step) {\n var sel = '<select class=\"ui-timepicker-select ui-state-default ui-corner-all\" data-unit=\"' + unit + '\" data-min=\"' + min + '\" data-max=\"' + max + '\" data-step=\"' + step + '\">',\n format = tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat;\n\n for (var i = min; i <= max; i += step) {\n sel += '<option value=\"' + i + '\"' + (i === val ? ' selected' : '') + '>';\n if (unit === 'hour') {\n sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig, '')), {hour: i}, tp_inst._defaults);\n }\n else if (unit === 'millisec' || unit === 'microsec' || i >= 10) { sel += i; }\n else {sel += '0' + i.toString(); }\n sel += '</option>';\n }\n sel += '</select>';\n\n obj.children('select').remove();\n\n $(sel).appendTo(obj).change(function (e) {\n tp_inst._onTimeChange();\n tp_inst._onSelectHandler();\n tp_inst._afterInject();\n });\n\n return obj;\n },\n options: function (tp_inst, obj, unit, opts, val) {\n var o = {},\n $t = obj.children('select');\n if (typeof(opts) === 'string') {\n if (val === undefined) {\n return $t.data(opts);\n }\n o[opts] = val;\n }\n else { o = opts; }\n return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min>=0 ? o.min : $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));\n },\n value: function (tp_inst, obj, unit, val) {\n var $t = obj.children('select');\n if (val !== undefined) {\n return $t.val(val);\n }\n return $t.val();\n }\n }\n } // end _controls\n\n });\n\n $.fn.extend({\n /*\n * shorthand just to use timepicker.\n */\n timepicker: function (o) {\n o = o || {};\n var tmp_args = Array.prototype.slice.call(arguments);\n\n if (typeof o === 'object') {\n tmp_args[0] = $.extend(o, {\n timeOnly: true\n });\n }\n\n return $(this).each(function () {\n $.fn.datetimepicker.apply($(this), tmp_args);\n });\n },\n\n /*\n * extend timepicker to datepicker\n */\n datetimepicker: function (o) {\n o = o || {};\n var tmp_args = arguments;\n\n if (typeof(o) === 'string') {\n if (o === 'getDate' || (o === 'option' && tmp_args.length === 2 && typeof (tmp_args[1]) === 'string')) {\n return $.fn.datepicker.apply($(this[0]), tmp_args);\n } else {\n return this.each(function () {\n var $t = $(this);\n $t.datepicker.apply($t, tmp_args);\n });\n }\n } else {\n return this.each(function () {\n var $t = $(this);\n $t.datepicker($.timepicker._newInst($t, o)._defaults);\n });\n }\n }\n });\n\n /*\n * Public Utility to parse date and time\n */\n $.datepicker.parseDateTime = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {\n var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings);\n if (parseRes.timeObj) {\n var t = parseRes.timeObj;\n parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);\n parseRes.date.setMicroseconds(t.microsec);\n }\n\n return parseRes.date;\n };\n\n /*\n * Public utility to parse time\n */\n $.datepicker.parseTime = function (timeFormat, timeString, options) {\n var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}),\n iso8601 = (timeFormat.replace(/\\'.*?\\'/g, '').indexOf('Z') !== -1);\n\n // Strict parse requires the timeString to match the timeFormat exactly\n var strictParse = function (f, s, o) {\n\n // pattern for standard and localized AM/PM markers\n var getPatternAmpm = function (amNames, pmNames) {\n var markers = [];\n if (amNames) {\n $.merge(markers, amNames);\n }\n if (pmNames) {\n $.merge(markers, pmNames);\n }\n markers = $.map(markers, function (val) {\n return val.replace(/[.*+?|()\\[\\]{}\\\\]/g, '\\\\$&');\n });\n return '(' + markers.join('|') + ')?';\n };\n\n // figure out position of time elements.. cause js cant do named captures\n var getFormatPositions = function (timeFormat) {\n var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),\n orders = {\n h: -1,\n m: -1,\n s: -1,\n l: -1,\n c: -1,\n t: -1,\n z: -1\n };\n\n if (finds) {\n for (var i = 0; i < finds.length; i++) {\n if (orders[finds[i].toString().charAt(0)] === -1) {\n orders[finds[i].toString().charAt(0)] = i + 1;\n }\n }\n }\n return orders;\n };\n\n var regstr = '^' + f.toString()\n .replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {\n var ml = match.length;\n switch (match.charAt(0).toLowerCase()) {\n case 'h':\n return ml === 1 ? '(\\\\d?\\\\d)' : '(\\\\d{' + ml + '})';\n case 'm':\n return ml === 1 ? '(\\\\d?\\\\d)' : '(\\\\d{' + ml + '})';\n case 's':\n return ml === 1 ? '(\\\\d?\\\\d)' : '(\\\\d{' + ml + '})';\n case 'l':\n return '(\\\\d?\\\\d?\\\\d)';\n case 'c':\n return '(\\\\d?\\\\d?\\\\d)';\n case 'z':\n return '(z|[-+]\\\\d\\\\d:?\\\\d\\\\d|\\\\S+)?';\n case 't':\n return getPatternAmpm(o.amNames, o.pmNames);\n default: // literal escaped in quotes\n return '(' + match.replace(/\\'/g, \"\").replace(/(\\.|\\$|\\^|\\\\|\\/|\\(|\\)|\\[|\\]|\\?|\\+|\\*)/g, function (m) { return \"\\\\\" + m; }) + ')?';\n }\n })\n .replace(/\\s/g, '\\\\s?') +\n o.timeSuffix + '$',\n order = getFormatPositions(f),\n ampm = '',\n treg;\n\n treg = s.match(new RegExp(regstr, 'i'));\n\n var resTime = {\n hour: 0,\n minute: 0,\n second: 0,\n millisec: 0,\n microsec: 0\n };\n\n if (treg) {\n if (order.t !== -1) {\n if (treg[order.t] === undefined || treg[order.t].length === 0) {\n ampm = '';\n resTime.ampm = '';\n } else {\n ampm = $.inArray(treg[order.t].toUpperCase(), $.map(o.amNames, function (x,i) { return x.toUpperCase(); })) !== -1 ? 'AM' : 'PM';\n resTime.ampm = o[ampm === 'AM' ? 'amNames' : 'pmNames'][0];\n }\n }\n\n if (order.h !== -1) {\n if (ampm === 'AM' && treg[order.h] === '12') {\n resTime.hour = 0; // 12am = 0 hour\n } else {\n if (ampm === 'PM' && treg[order.h] !== '12') {\n resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12\n } else {\n resTime.hour = Number(treg[order.h]);\n }\n }\n }\n\n if (order.m !== -1) {\n resTime.minute = Number(treg[order.m]);\n }\n if (order.s !== -1) {\n resTime.second = Number(treg[order.s]);\n }\n if (order.l !== -1) {\n resTime.millisec = Number(treg[order.l]);\n }\n if (order.c !== -1) {\n resTime.microsec = Number(treg[order.c]);\n }\n if (order.z !== -1 && treg[order.z] !== undefined) {\n resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]);\n }\n\n\n return resTime;\n }\n return false;\n };// end strictParse\n\n // First try JS Date, if that fails, use strictParse\n var looseParse = function (f, s, o) {\n try {\n var d = new Date('2012-01-01 ' + s);\n if (isNaN(d.getTime())) {\n d = new Date('2012-01-01T' + s);\n if (isNaN(d.getTime())) {\n d = new Date('01/01/2012 ' + s);\n if (isNaN(d.getTime())) {\n throw \"Unable to parse time with native Date: \" + s;\n }\n }\n }\n\n return {\n hour: d.getHours(),\n minute: d.getMinutes(),\n second: d.getSeconds(),\n millisec: d.getMilliseconds(),\n microsec: d.getMicroseconds(),\n timezone: d.getTimezoneOffset() * -1\n };\n }\n catch (err) {\n try {\n return strictParse(f, s, o);\n }\n catch (err2) {\n $.timepicker.log(\"Unable to parse \\ntimeString: \" + s + \"\\ntimeFormat: \" + f);\n }\n }\n return false;\n }; // end looseParse\n\n if (typeof o.parse === \"function\") {\n return o.parse(timeFormat, timeString, o);\n }\n if (o.parse === 'loose') {\n return looseParse(timeFormat, timeString, o);\n }\n return strictParse(timeFormat, timeString, o);\n };\n\n /**\n * Public utility to format the time\n * @param {string} format format of the time\n * @param {Object} time Object not a Date for timezones\n * @param {Object} [options] essentially the regional[].. amNames, pmNames, ampm\n * @returns {string} the formatted time\n */\n $.datepicker.formatTime = function (format, time, options) {\n options = options || {};\n options = $.extend({}, $.timepicker._defaults, options);\n time = $.extend({\n hour: 0,\n minute: 0,\n second: 0,\n millisec: 0,\n microsec: 0,\n timezone: null\n }, time);\n\n var tmptime = format,\n ampmName = options.amNames[0],\n hour = parseInt(time.hour, 10);\n\n if (hour > 11) {\n ampmName = options.pmNames[0];\n }\n\n tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {\n switch (match) {\n case 'HH':\n return ('0' + hour).slice(-2);\n case 'H':\n return hour;\n case 'hh':\n return ('0' + convert24to12(hour)).slice(-2);\n case 'h':\n return convert24to12(hour);\n case 'mm':\n return ('0' + time.minute).slice(-2);\n case 'm':\n return time.minute;\n case 'ss':\n return ('0' + time.second).slice(-2);\n case 's':\n return time.second;\n case 'l':\n return ('00' + time.millisec).slice(-3);\n case 'c':\n return ('00' + time.microsec).slice(-3);\n case 'z':\n return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, false);\n case 'Z':\n return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, true);\n case 'T':\n return ampmName.charAt(0).toUpperCase();\n case 'TT':\n return ampmName.toUpperCase();\n case 't':\n return ampmName.charAt(0).toLowerCase();\n case 'tt':\n return ampmName.toLowerCase();\n default:\n return match.replace(/'/g, \"\");\n }\n });\n\n return tmptime;\n };\n\n /*\n * the bad hack :/ override datepicker so it doesn't close on select\n // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378\n */\n $.datepicker._base_selectDate = $.datepicker._selectDate;\n $.datepicker._selectDate = function (id, dateStr) {\n var inst = this._getInst($(id)[0]),\n tp_inst = this._get(inst, 'timepicker'),\n was_inline;\n\n if (tp_inst && inst.settings.showTimepicker) {\n tp_inst._limitMinMaxDateTime(inst, true);\n was_inline = inst.inline;\n inst.inline = inst.stay_open = true;\n //This way the onSelect handler called from calendarpicker get the full dateTime\n this._base_selectDate(id, dateStr);\n inst.inline = was_inline;\n inst.stay_open = false;\n this._notifyChange(inst);\n this._updateDatepicker(inst);\n } else {\n this._base_selectDate(id, dateStr);\n }\n };\n\n /*\n * second bad hack :/ override datepicker so it triggers an event when changing the input field\n * and does not redraw the datepicker on every selectDate event\n */\n $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;\n $.datepicker._updateDatepicker = function (inst) {\n\n // don't popup the datepicker if there is another instance already opened\n var input = inst.input[0];\n if ($.datepicker._curInst && $.datepicker._curInst !== inst && $.datepicker._datepickerShowing && $.datepicker._lastInput !== input) {\n return;\n }\n\n if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {\n\n this._base_updateDatepicker(inst);\n\n // Reload the time control when changing something in the input text field.\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n tp_inst._addTimePicker(inst);\n }\n }\n };\n\n /*\n * third bad hack :/ override datepicker so it allows spaces and colon in the input field\n */\n $.datepicker._base_doKeyPress = $.datepicker._doKeyPress;\n $.datepicker._doKeyPress = function (event) {\n var inst = $.datepicker._getInst(event.target),\n tp_inst = $.datepicker._get(inst, 'timepicker');\n\n if (tp_inst) {\n if ($.datepicker._get(inst, 'constrainInput')) {\n var ampm = tp_inst.support.ampm,\n tz = tp_inst._defaults.showTimezone !== null ? tp_inst._defaults.showTimezone : tp_inst.support.timezone,\n dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),\n datetimeChars = tp_inst._defaults.timeFormat.toString()\n .replace(/[hms]/g, '')\n .replace(/TT/g, ampm ? 'APM' : '')\n .replace(/Tt/g, ampm ? 'AaPpMm' : '')\n .replace(/tT/g, ampm ? 'AaPpMm' : '')\n .replace(/T/g, ampm ? 'AP' : '')\n .replace(/tt/g, ampm ? 'apm' : '')\n .replace(/t/g, ampm ? 'ap' : '') +\n \" \" + tp_inst._defaults.separator +\n tp_inst._defaults.timeSuffix +\n (tz ? tp_inst._defaults.timezoneList.join('') : '') +\n (tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +\n dateChars,\n chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);\n return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);\n }\n }\n\n return $.datepicker._base_doKeyPress(event);\n };\n\n /*\n * Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField\n * Update any alternate field to synchronise with the main field.\n */\n $.datepicker._base_updateAlternate = $.datepicker._updateAlternate;\n $.datepicker._updateAlternate = function (inst) {\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n var altField = tp_inst._defaults.altField;\n if (altField) { // update alternate field too\n var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat,\n date = this._getDate(inst),\n formatCfg = $.datepicker._getFormatConfig(inst),\n altFormattedDateTime = '',\n altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,\n altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,\n altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;\n\n altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix;\n if (!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null) {\n if (tp_inst._defaults.altFormat) {\n altFormattedDateTime = $.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) + altSeparator + altFormattedDateTime;\n }\n else {\n altFormattedDateTime = tp_inst.formattedDate + altSeparator + altFormattedDateTime;\n }\n }\n $(altField).val( inst.input.val() ? altFormattedDateTime : \"\");\n }\n }\n else {\n $.datepicker._base_updateAlternate(inst);\n }\n };\n\n /*\n * Override key up event to sync manual input changes.\n */\n $.datepicker._base_doKeyUp = $.datepicker._doKeyUp;\n $.datepicker._doKeyUp = function (event) {\n var inst = $.datepicker._getInst(event.target),\n tp_inst = $.datepicker._get(inst, 'timepicker');\n\n if (tp_inst) {\n if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {\n try {\n $.datepicker._updateDatepicker(inst);\n } catch (err) {\n $.timepicker.log(err);\n }\n }\n }\n\n return $.datepicker._base_doKeyUp(event);\n };\n\n /*\n * override \"Today\" button to also grab the time and set it to input field.\n */\n $.datepicker._base_gotoToday = $.datepicker._gotoToday;\n $.datepicker._gotoToday = function (id) {\n var inst = this._getInst($(id)[0]);\n this._base_gotoToday(id);\n var tp_inst = this._get(inst, 'timepicker');\n if (!tp_inst) {\n return;\n }\n\n var tzoffset = $.timepicker.timezoneOffsetNumber(tp_inst.timezone);\n var now = new Date();\n now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + parseInt(tzoffset, 10));\n this._setTime(inst, now);\n this._setDate(inst, now);\n tp_inst._onSelectHandler();\n };\n\n /*\n * Disable & enable the Time in the datetimepicker\n */\n $.datepicker._disableTimepickerDatepicker = function (target) {\n var inst = this._getInst(target);\n if (!inst) {\n return;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n $(target).datepicker('getDate'); // Init selected[Year|Month|Day]\n if (tp_inst) {\n inst.settings.showTimepicker = false;\n tp_inst._defaults.showTimepicker = false;\n tp_inst._updateDateTime(inst);\n }\n };\n\n $.datepicker._enableTimepickerDatepicker = function (target) {\n var inst = this._getInst(target);\n if (!inst) {\n return;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n $(target).datepicker('getDate'); // Init selected[Year|Month|Day]\n if (tp_inst) {\n inst.settings.showTimepicker = true;\n tp_inst._defaults.showTimepicker = true;\n tp_inst._addTimePicker(inst); // Could be disabled on page load\n tp_inst._updateDateTime(inst);\n }\n };\n\n /*\n * Create our own set time function\n */\n $.datepicker._setTime = function (inst, date) {\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n var defaults = tp_inst._defaults;\n\n // calling _setTime with no date sets time to defaults\n tp_inst.hour = date ? date.getHours() : defaults.hour;\n tp_inst.minute = date ? date.getMinutes() : defaults.minute;\n tp_inst.second = date ? date.getSeconds() : defaults.second;\n tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;\n tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec;\n\n //check if within min/max times..\n tp_inst._limitMinMaxDateTime(inst, true);\n\n tp_inst._onTimeChange();\n tp_inst._updateDateTime(inst);\n }\n };\n\n /*\n * Create new public method to set only time, callable as $().datepicker('setTime', date)\n */\n $.datepicker._setTimeDatepicker = function (target, date, withDate) {\n var inst = this._getInst(target);\n if (!inst) {\n return;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n\n if (tp_inst) {\n this._setDateFromField(inst);\n var tp_date;\n if (date) {\n if (typeof date === \"string\") {\n tp_inst._parseTime(date, withDate);\n tp_date = new Date();\n tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);\n tp_date.setMicroseconds(tp_inst.microsec);\n } else {\n tp_date = new Date(date.getTime());\n tp_date.setMicroseconds(date.getMicroseconds());\n }\n if (tp_date.toString() === 'Invalid Date') {\n tp_date = undefined;\n }\n this._setTime(inst, tp_date);\n }\n }\n\n };\n\n /*\n * override setDate() to allow setting time too within Date object\n */\n $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;\n $.datepicker._setDateDatepicker = function (target, _date) {\n var inst = this._getInst(target);\n var date = _date;\n if (!inst) {\n return;\n }\n\n if (typeof(_date) === 'string') {\n date = new Date(_date);\n if (!date.getTime()) {\n this._base_setDateDatepicker.apply(this, arguments);\n date = $(target).datepicker('getDate');\n }\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n var tp_date;\n if (date instanceof Date) {\n tp_date = new Date(date.getTime());\n tp_date.setMicroseconds(date.getMicroseconds());\n } else {\n tp_date = date;\n }\n\n // This is important if you are using the timezone option, javascript's Date\n // object will only return the timezone offset for the current locale, so we\n // adjust it accordingly. If not using timezone option this won't matter..\n // If a timezone is different in tp, keep the timezone as is\n if (tp_inst && tp_date) {\n // look out for DST if tz wasn't specified\n if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {\n tp_inst.timezone = tp_date.getTimezoneOffset() * -1;\n }\n date = $.timepicker.timezoneAdjust(date, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset()), tp_inst.timezone);\n tp_date = $.timepicker.timezoneAdjust(tp_date, $.timepicker.timezoneOffsetString(-tp_date.getTimezoneOffset()), tp_inst.timezone);\n }\n\n this._updateDatepicker(inst);\n this._base_setDateDatepicker.apply(this, arguments);\n this._setTimeDatepicker(target, tp_date, true);\n };\n\n /*\n * override getDate() to allow getting time too within Date object\n */\n $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;\n $.datepicker._getDateDatepicker = function (target, noDefault) {\n var inst = this._getInst(target);\n if (!inst) {\n return;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n\n if (tp_inst) {\n // if it hasn't yet been defined, grab from field\n if (inst.lastVal === undefined) {\n this._setDateFromField(inst, noDefault);\n }\n\n var date = this._getDate(inst);\n\n var currDT = null;\n\n if (tp_inst.$altInput && tp_inst._defaults.altFieldTimeOnly) {\n currDT = tp_inst.$input.val() + ' ' + tp_inst.$altInput.val();\n }\n else if (tp_inst.$input.get(0).tagName !== 'INPUT' && tp_inst.$altInput) {\n /**\n * in case the datetimepicker has been applied to a non-input tag for inline UI,\n * and the user has not configured the plugin to display only time in altInput,\n * pick current date time from the altInput (and hope for the best, for now, until \"ER1\" is applied)\n *\n * @todo ER1. Since altInput can have a totally difference format, convert it to standard format by reading input format from \"altFormat\" and \"altTimeFormat\" option values\n */\n currDT = tp_inst.$altInput.val();\n }\n else {\n currDT = tp_inst.$input.val();\n }\n\n if (date && tp_inst._parseTime(currDT, !inst.settings.timeOnly)) {\n date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);\n date.setMicroseconds(tp_inst.microsec);\n\n // This is important if you are using the timezone option, javascript's Date\n // object will only return the timezone offset for the current locale, so we\n // adjust it accordingly. If not using timezone option this won't matter..\n if (tp_inst.timezone != null) {\n // look out for DST if tz wasn't specified\n if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {\n tp_inst.timezone = date.getTimezoneOffset() * -1;\n }\n date = $.timepicker.timezoneAdjust(date, tp_inst.timezone, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset()));\n }\n }\n return date;\n }\n return this._base_getDateDatepicker(target, noDefault);\n };\n\n /*\n * override parseDate() because UI 1.8.14 throws an error about \"Extra characters\"\n * An option in datapicker to ignore extra format characters would be nicer.\n */\n $.datepicker._base_parseDate = $.datepicker.parseDate;\n $.datepicker.parseDate = function (format, value, settings) {\n var date;\n try {\n date = this._base_parseDate(format, value, settings);\n } catch (err) {\n // Hack! The error message ends with a colon, a space, and\n // the \"extra\" characters. We rely on that instead of\n // attempting to perfectly reproduce the parsing algorithm.\n if (err.indexOf(\":\") >= 0) {\n date = this._base_parseDate(format, value.substring(0, value.length - (err.length - err.indexOf(':') - 2)), settings);\n $.timepicker.log(\"Error parsing the date string: \" + err + \"\\ndate string = \" + value + \"\\ndate format = \" + format);\n } else {\n throw err;\n }\n }\n return date;\n };\n\n /*\n * override formatDate to set date with time to the input\n */\n $.datepicker._base_formatDate = $.datepicker._formatDate;\n $.datepicker._formatDate = function (inst, day, month, year) {\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n tp_inst._updateDateTime(inst);\n return tp_inst.$input.val();\n }\n return this._base_formatDate(inst);\n };\n\n /*\n * override options setter to add time to maxDate(Time) and minDate(Time). MaxDate\n */\n $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;\n $.datepicker._optionDatepicker = function (target, name, value) {\n var inst = this._getInst(target),\n name_clone;\n if (!inst) {\n return null;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n var min = null,\n max = null,\n onselect = null,\n overrides = tp_inst._defaults.evnts,\n fns = {},\n prop,\n ret,\n oldVal,\n $target;\n if (typeof name === 'string') { // if min/max was set with the string\n if (name === 'minDate' || name === 'minDateTime') {\n min = value;\n } else if (name === 'maxDate' || name === 'maxDateTime') {\n max = value;\n } else if (name === 'onSelect') {\n onselect = value;\n } else if (overrides.hasOwnProperty(name)) {\n if (typeof (value) === 'undefined') {\n return overrides[name];\n }\n fns[name] = value;\n name_clone = {}; //empty results in exiting function after overrides updated\n }\n } else if (typeof name === 'object') { //if min/max was set with the JSON\n if (name.minDate) {\n min = name.minDate;\n } else if (name.minDateTime) {\n min = name.minDateTime;\n } else if (name.maxDate) {\n max = name.maxDate;\n } else if (name.maxDateTime) {\n max = name.maxDateTime;\n }\n for (prop in overrides) {\n if (overrides.hasOwnProperty(prop) && name[prop]) {\n fns[prop] = name[prop];\n }\n }\n }\n for (prop in fns) {\n if (fns.hasOwnProperty(prop)) {\n overrides[prop] = fns[prop];\n if (!name_clone) { name_clone = $.extend({}, name); }\n delete name_clone[prop];\n }\n }\n if (name_clone && isEmptyObject(name_clone)) { return; }\n if (min) { //if min was set\n if (min === 0) {\n min = new Date();\n } else {\n min = new Date(min);\n }\n tp_inst._defaults.minDate = min;\n tp_inst._defaults.minDateTime = min;\n } else if (max) { //if max was set\n if (max === 0) {\n max = new Date();\n } else {\n max = new Date(max);\n }\n tp_inst._defaults.maxDate = max;\n tp_inst._defaults.maxDateTime = max;\n } else if (onselect) {\n tp_inst._defaults.onSelect = onselect;\n }\n\n // Datepicker will override our date when we call _base_optionDatepicker when\n // calling minDate/maxDate, so we will first grab the value, call\n // _base_optionDatepicker, then set our value back.\n if(min || max){\n $target = $(target);\n oldVal = $target.datetimepicker('getDate');\n ret = this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);\n $target.datetimepicker('setDate', oldVal);\n return ret;\n }\n }\n if (value === undefined) {\n return this._base_optionDatepicker.call($.datepicker, target, name);\n }\n return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);\n };\n\n /*\n * jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype,\n * it will return false for all objects\n */\n var isEmptyObject = function (obj) {\n var prop;\n for (prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n return true;\n };\n\n /*\n * jQuery extend now ignores nulls!\n */\n var extendRemove = function (target, props) {\n $.extend(target, props);\n for (var name in props) {\n if (props[name] === null || props[name] === undefined) {\n target[name] = props[name];\n }\n }\n return target;\n };\n\n /*\n * Determine by the time format which units are supported\n * Returns an object of booleans for each unit\n */\n var detectSupport = function (timeFormat) {\n var tf = timeFormat.replace(/'.*?'/g, '').toLowerCase(), // removes literals\n isIn = function (f, t) { // does the format contain the token?\n return f.indexOf(t) !== -1 ? true : false;\n };\n return {\n hour: isIn(tf, 'h'),\n minute: isIn(tf, 'm'),\n second: isIn(tf, 's'),\n millisec: isIn(tf, 'l'),\n microsec: isIn(tf, 'c'),\n timezone: isIn(tf, 'z'),\n ampm: isIn(tf, 't') && isIn(timeFormat, 'h'),\n iso8601: isIn(timeFormat, 'Z')\n };\n };\n\n /*\n * Converts 24 hour format into 12 hour\n * Returns 12 hour without leading 0\n */\n var convert24to12 = function (hour) {\n hour %= 12;\n\n if (hour === 0) {\n hour = 12;\n }\n\n return String(hour);\n };\n\n var computeEffectiveSetting = function (settings, property) {\n return settings && settings[property] ? settings[property] : $.timepicker._defaults[property];\n };\n\n /*\n * Splits datetime string into date and time substrings.\n * Throws exception when date can't be parsed\n * Returns {dateString: dateString, timeString: timeString}\n */\n var splitDateTime = function (dateTimeString, timeSettings) {\n // The idea is to get the number separator occurrences in datetime and the time format requested (since time has\n // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split.\n var separator = computeEffectiveSetting(timeSettings, 'separator'),\n format = computeEffectiveSetting(timeSettings, 'timeFormat'),\n timeParts = format.split(separator), // how many occurrences of separator may be in our format?\n timePartsLen = timeParts.length,\n allParts = dateTimeString.split(separator),\n allPartsLen = allParts.length;\n\n if (allPartsLen > 1) {\n return {\n dateString: allParts.splice(0, allPartsLen - timePartsLen).join(separator),\n timeString: allParts.splice(0, timePartsLen).join(separator)\n };\n }\n\n return {\n dateString: dateTimeString,\n timeString: ''\n };\n };\n\n /*\n * Internal function to parse datetime interval\n * Returns: {date: Date, timeObj: Object}, where\n * date - parsed date without time (type Date)\n * timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional\n */\n var parseDateTimeInternal = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {\n var date,\n parts,\n parsedTime;\n\n parts = splitDateTime(dateTimeString, timeSettings);\n date = $.datepicker._base_parseDate(dateFormat, parts.dateString, dateSettings);\n\n if (parts.timeString === '') {\n return {\n date: date\n };\n }\n\n parsedTime = $.datepicker.parseTime(timeFormat, parts.timeString, timeSettings);\n\n if (!parsedTime) {\n throw 'Wrong time format';\n }\n\n return {\n date: date,\n timeObj: parsedTime\n };\n };\n\n /*\n * Internal function to set timezone_select to the local timezone\n */\n var selectLocalTimezone = function (tp_inst, date) {\n if (tp_inst && tp_inst.timezone_select) {\n var now = date || new Date();\n tp_inst.timezone_select.val(-now.getTimezoneOffset());\n }\n };\n\n /*\n * Create a Singleton Instance\n */\n $.timepicker = new Timepicker();\n\n /**\n * Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5)\n * @param {number} tzMinutes if not a number, less than -720 (-1200), or greater than 840 (+1400) this value is returned\n * @param {boolean} iso8601 if true formats in accordance to iso8601 \"+12:45\"\n * @return {string}\n */\n $.timepicker.timezoneOffsetString = function (tzMinutes, iso8601) {\n if (isNaN(tzMinutes) || tzMinutes > 840 || tzMinutes < -720) {\n return tzMinutes;\n }\n\n var off = tzMinutes,\n minutes = off % 60,\n hours = (off - minutes) / 60,\n iso = iso8601 ? ':' : '',\n tz = (off >= 0 ? '+' : '-') + ('0' + Math.abs(hours)).slice(-2) + iso + ('0' + Math.abs(minutes)).slice(-2);\n\n if (tz === '+00:00') {\n return 'Z';\n }\n return tz;\n };\n\n /**\n * Get the number in minutes that represents a timezone string\n * @param {string} tzString formatted like \"+0500\", \"-1245\", \"Z\"\n * @return {number} the offset minutes or the original string if it doesn't match expectations\n */\n $.timepicker.timezoneOffsetNumber = function (tzString) {\n var normalized = tzString.toString().replace(':', ''); // excuse any iso8601, end up with \"+1245\"\n\n if (normalized.toUpperCase() === 'Z') { // if iso8601 with Z, its 0 minute offset\n return 0;\n }\n\n if (!/^(\\-|\\+)\\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back\n return parseInt(tzString, 10);\n }\n\n return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or minus\n ((parseInt(normalized.substr(1, 2), 10) * 60) + // hours (converted to minutes)\n parseInt(normalized.substr(3, 2), 10))); // minutes\n };\n\n /**\n * No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate)\n * @param {Date} date\n * @param {string} fromTimezone formatted like \"+0500\", \"-1245\"\n * @param {string} toTimezone formatted like \"+0500\", \"-1245\"\n * @return {Date}\n */\n $.timepicker.timezoneAdjust = function (date, fromTimezone, toTimezone) {\n var fromTz = $.timepicker.timezoneOffsetNumber(fromTimezone);\n var toTz = $.timepicker.timezoneOffsetNumber(toTimezone);\n if (!isNaN(toTz)) {\n date.setMinutes(date.getMinutes() + (-fromTz) - (-toTz));\n }\n return date;\n };\n\n /**\n * Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to\n * enforce date range limits.\n * n.b. The input value must be correctly formatted (reformatting is not supported)\n * @param {Element} startTime\n * @param {Element} endTime\n * @param {Object} options Options for the timepicker() call\n * @return {jQuery}\n */\n $.timepicker.timeRange = function (startTime, endTime, options) {\n return $.timepicker.handleRange('timepicker', startTime, endTime, options);\n };\n\n /**\n * Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to\n * enforce date range limits.\n * @param {Element} startTime\n * @param {Element} endTime\n * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`,\n * a boolean value that can be used to reformat the input values to the `dateFormat`.\n * @param {string} method Can be used to specify the type of picker to be added\n * @return {jQuery}\n */\n $.timepicker.datetimeRange = function (startTime, endTime, options) {\n $.timepicker.handleRange('datetimepicker', startTime, endTime, options);\n };\n\n /**\n * Calls `datepicker` on the `startTime` and `endTime` elements, and configures them to\n * enforce date range limits.\n * @param {Element} startTime\n * @param {Element} endTime\n * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`,\n * a boolean value that can be used to reformat the input values to the `dateFormat`.\n * @return {jQuery}\n */\n $.timepicker.dateRange = function (startTime, endTime, options) {\n $.timepicker.handleRange('datepicker', startTime, endTime, options);\n };\n\n /**\n * Calls `method` on the `startTime` and `endTime` elements, and configures them to\n * enforce date range limits.\n * @param {string} method Can be used to specify the type of picker to be added\n * @param {Element} startTime\n * @param {Element} endTime\n * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`,\n * a boolean value that can be used to reformat the input values to the `dateFormat`.\n * @return {jQuery}\n */\n $.timepicker.handleRange = function (method, startTime, endTime, options) {\n options = $.extend({}, {\n minInterval: 0, // min allowed interval in milliseconds\n maxInterval: 0, // max allowed interval in milliseconds\n start: {}, // options for start picker\n end: {} // options for end picker\n }, options);\n\n // for the mean time this fixes an issue with calling getDate with timepicker()\n var timeOnly = false;\n if(method === 'timepicker'){\n timeOnly = true;\n method = 'datetimepicker';\n }\n\n function checkDates(changed, other) {\n var startdt = startTime[method]('getDate'),\n enddt = endTime[method]('getDate'),\n changeddt = changed[method]('getDate');\n\n if (startdt !== null) {\n var minDate = new Date(startdt.getTime()),\n maxDate = new Date(startdt.getTime());\n\n minDate.setMilliseconds(minDate.getMilliseconds() + options.minInterval);\n maxDate.setMilliseconds(maxDate.getMilliseconds() + options.maxInterval);\n\n if (options.minInterval > 0 && minDate > enddt) { // minInterval check\n endTime[method]('setDate', minDate);\n }\n else if (options.maxInterval > 0 && maxDate < enddt) { // max interval check\n endTime[method]('setDate', maxDate);\n }\n else if (startdt > enddt) {\n other[method]('setDate', changeddt);\n }\n }\n }\n\n function selected(changed, other, option) {\n if (!changed.val()) {\n return;\n }\n var date = changed[method].call(changed, 'getDate');\n if (date !== null && options.minInterval > 0) {\n if (option === 'minDate') {\n date.setMilliseconds(date.getMilliseconds() + options.minInterval);\n }\n if (option === 'maxDate') {\n date.setMilliseconds(date.getMilliseconds() - options.minInterval);\n }\n }\n\n if (date.getTime) {\n other[method].call(other, 'option', option, date);\n }\n }\n\n $.fn[method].call(startTime, $.extend({\n timeOnly: timeOnly,\n onClose: function (dateText, inst) {\n checkDates($(this), endTime);\n },\n onSelect: function (selectedDateTime) {\n selected($(this), endTime, 'minDate');\n }\n }, options, options.start));\n $.fn[method].call(endTime, $.extend({\n timeOnly: timeOnly,\n onClose: function (dateText, inst) {\n checkDates($(this), startTime);\n },\n onSelect: function (selectedDateTime) {\n selected($(this), startTime, 'maxDate');\n }\n }, options, options.end));\n\n checkDates(startTime, endTime);\n\n selected(startTime, endTime, 'minDate');\n selected(endTime, startTime, 'maxDate');\n\n return $([startTime.get(0), endTime.get(0)]);\n };\n\n /**\n * Log error or data to the console during error or debugging\n * @param {Object} err pass any type object to log to the console during error or debugging\n * @return {void}\n */\n $.timepicker.log = function () {\n // Older IE (9, maybe 10) throw error on accessing `window.console.log.apply`, so check first.\n if (window.console && window.console.log && window.console.log.apply) {\n window.console.log.apply(window.console, Array.prototype.slice.call(arguments));\n }\n };\n\n /*\n * Add util object to allow access to private methods for testability.\n */\n $.timepicker._util = {\n _extendRemove: extendRemove,\n _isEmptyObject: isEmptyObject,\n _convert24to12: convert24to12,\n _detectSupport: detectSupport,\n _selectLocalTimezone: selectLocalTimezone,\n _computeEffectiveSetting: computeEffectiveSetting,\n _splitDateTime: splitDateTime,\n _parseDateTimeInternal: parseDateTimeInternal\n };\n\n /*\n * Microsecond support\n */\n if (!Date.prototype.getMicroseconds) {\n Date.prototype.microseconds = 0;\n Date.prototype.getMicroseconds = function () { return this.microseconds; };\n Date.prototype.setMicroseconds = function (m) {\n this.setMilliseconds(this.getMilliseconds() + Math.floor(m / 1000));\n this.microseconds = m % 1000;\n return this;\n };\n }\n\n /*\n * Keep up with the version\n */\n $.timepicker.version = \"1.6.3\";\n\n}));\n","jquery/z-index.js":"/*!\n * zIndex plugin from jQuery UI Core - v1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\ndefine([\n 'jquery'\n], function ($, undefined) {\n\n// plugins\n $.fn.extend({\n zIndex: function (zIndex) {\n if (zIndex !== undefined) {\n return this.css(\"zIndex\", zIndex);\n }\n\n if (this.length) {\n var elem = $(this[0]), position, value;\n while (elem.length && elem[0] !== document) {\n // Ignore z-index if position is set to a value where z-index is ignored by the browser\n // This makes behavior of this function consistent across browsers\n // WebKit always returns auto if the element is positioned\n position = elem.css(\"position\");\n if (position === \"absolute\" || position === \"relative\" || position === \"fixed\") {\n // IE returns 0 when zIndex is not specified\n // other browsers return a string\n // we ignore the case of nested elements with an explicit value of 0\n // <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\n value = parseInt(elem.css(\"zIndex\"), 10);\n if (!isNaN(value) && value !== 0) {\n return value;\n }\n }\n elem = elem.parent();\n }\n }\n\n return 0;\n }\n });\n});\n","jquery/jquery.tabs.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n \"jquery\",\n \"jquery/bootstrap/tab\",\n \"jquery/bootstrap/collapse\",\n], function () {\n\n});\n","jquery/jquery.cookie.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n 'jquery',\n 'js-cookie/cookie-wrapper'\n], function () {\n\n});\n","jquery/jquery.validate.js":"/*!\n * jQuery Validation Plugin v1.19.5\n *\n * https://jqueryvalidation.org/\n *\n * Copyright (c) 2022 J\u00f6rn Zaefferer\n * Released under the MIT license\n */\n(function( factory ) {\n if ( typeof define === \"function\" && define.amd ) {\n define( [\"jquery\", \"jquery/jquery.metadata\"], factory );\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory( require( \"jquery\" ) );\n } else {\n factory( jQuery );\n }\n}(function( $ ) {\n\n $.extend( $.fn, {\n\n // https://jqueryvalidation.org/validate/\n validate: function( options ) {\n\n // If nothing is selected, return nothing; can't chain anyway\n if ( !this.length ) {\n if ( options && options.debug && window.console ) {\n console.warn( \"Nothing selected, can't validate, returning nothing.\" );\n }\n return;\n }\n\n // Check if a validator for this form was already created\n var validator = $.data( this[ 0 ], \"validator\" );\n if ( validator ) {\n return validator;\n }\n\n // Add novalidate tag if HTML5.\n this.attr( \"novalidate\", \"novalidate\" );\n\n validator = new $.validator( options, this[ 0 ] );\n $.data( this[ 0 ], \"validator\", validator );\n\n if ( validator.settings.onsubmit ) {\n\n this.on( \"click.validate\", \":submit\", function( event ) {\n\n // Track the used submit button to properly handle scripted\n // submits later.\n validator.submitButton = event.currentTarget;\n\n // Allow suppressing validation by adding a cancel class to the submit button\n if ( $( this ).hasClass( \"cancel\" ) ) {\n validator.cancelSubmit = true;\n }\n\n // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n if ( $( this ).attr( \"formnovalidate\" ) !== undefined ) {\n validator.cancelSubmit = true;\n }\n } );\n\n // Validate the form on submit\n this.on( \"submit.validate\", function( event ) {\n if ( validator.settings.debug ) {\n\n // Prevent form submit to be able to see console output\n event.preventDefault();\n }\n\n function handle() {\n var hidden, result;\n\n // Insert a hidden input as a replacement for the missing submit button\n // The hidden input is inserted in two cases:\n // - A user defined a `submitHandler`\n // - There was a pending request due to `remote` method and `stopRequest()`\n // was called to submit the form in case it's valid\n if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {\n hidden = $( \"<input type='hidden'/>\" )\n .attr( \"name\", validator.submitButton.name )\n .val( $( validator.submitButton ).val() )\n .appendTo( validator.currentForm );\n }\n\n if ( validator.settings.submitHandler && !validator.settings.debug ) {\n result = validator.settings.submitHandler.call( validator, validator.currentForm, event );\n if ( hidden ) {\n\n // And clean up afterwards; thanks to no-block-scope, hidden can be referenced\n hidden.remove();\n }\n if ( result !== undefined ) {\n return result;\n }\n return false;\n }\n return true;\n }\n\n // Prevent submit for invalid forms or custom submit handlers\n if ( validator.cancelSubmit ) {\n validator.cancelSubmit = false;\n return handle();\n }\n if ( validator.form() ) {\n if ( validator.pendingRequest ) {\n validator.formSubmitted = true;\n return false;\n }\n return handle();\n } else {\n validator.focusInvalid();\n return false;\n }\n } );\n }\n\n return validator;\n },\n\n // https://jqueryvalidation.org/valid/\n valid: function() {\n var valid, validator, errorList;\n\n if ( $( this[ 0 ] ).is( \"form\" ) ) {\n valid = this.validate().form();\n } else {\n errorList = [];\n valid = true;\n validator = $( this[ 0 ].form ).validate();\n this.each( function() {\n valid = validator.element( this ) && valid;\n if ( !valid ) {\n errorList = errorList.concat( validator.errorList );\n }\n } );\n validator.errorList = errorList;\n }\n return valid;\n },\n\n // https://jqueryvalidation.org/rules/\n rules: function( command, argument ) {\n var element = this[ 0 ],\n isContentEditable = typeof this.attr( \"contenteditable\" ) !== \"undefined\" && this.attr( \"contenteditable\" ) !== \"false\",\n settings, staticRules, existingRules, data, param, filtered;\n\n // If nothing is selected, return empty object; can't chain anyway\n if ( element == null ) {\n return;\n }\n\n if ( !element.form && isContentEditable ) {\n element.form = this.closest( \"form\" )[ 0 ];\n element.name = this.attr( \"name\" );\n }\n\n if ( element.form == null ) {\n return;\n }\n\n if ( command ) {\n settings = $.data( element.form, \"validator\" ).settings;\n staticRules = settings.rules;\n existingRules = $.validator.staticRules( element );\n switch ( command ) {\n case \"add\":\n $.extend( existingRules, $.validator.normalizeRule( argument ) );\n\n // Remove messages from rules, but allow them to be set separately\n delete existingRules.messages;\n staticRules[ element.name ] = existingRules;\n if ( argument.messages ) {\n settings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages );\n }\n break;\n case \"remove\":\n if ( !argument ) {\n delete staticRules[ element.name ];\n return existingRules;\n }\n filtered = {};\n $.each( argument.split( /\\s/ ), function( index, method ) {\n filtered[ method ] = existingRules[ method ];\n delete existingRules[ method ];\n } );\n return filtered;\n }\n }\n\n data = $.validator.normalizeRules(\n $.extend(\n {},\n $.validator.metadataRules(element),\n $.validator.classRules( element ),\n $.validator.attributeRules( element ),\n $.validator.dataRules( element ),\n $.validator.staticRules( element )\n ), element );\n\n // Make sure required is at front\n if ( data.required ) {\n param = data.required;\n delete data.required;\n data = $.extend( { required: param }, data );\n }\n\n // Make sure remote is at back\n if ( data.remote ) {\n param = data.remote;\n delete data.remote;\n data = $.extend( data, { remote: param } );\n }\n\n return data;\n }\n } );\n\n// JQuery trim is deprecated, provide a trim method based on String.prototype.trim\n var trim = function( str ) {\n\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill\n return str.replace( /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\" );\n };\n\n// Custom selectors\n $.extend( $.expr.pseudos || $.expr[ \":\" ], {\t\t// '|| $.expr[ \":\" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support\n\n // https://jqueryvalidation.org/blank-selector/\n blank: function( a ) {\n return !trim( \"\" + $( a ).val() );\n },\n\n // https://jqueryvalidation.org/filled-selector/\n filled: function( a ) {\n var val = $( a ).val();\n return val !== null && !!trim( \"\" + val );\n },\n\n // https://jqueryvalidation.org/unchecked-selector/\n unchecked: function( a ) {\n return !$( a ).prop( \"checked\" );\n }\n } );\n\n// Constructor for validator\n $.validator = function( options, form ) {\n this.settings = $.extend( true, {}, $.validator.defaults, options );\n this.currentForm = form;\n this.init();\n };\n\n// https://jqueryvalidation.org/jQuery.validator.format/\n $.validator.format = function( source, params ) {\n if ( arguments.length === 1 ) {\n return function() {\n var args = $.makeArray( arguments );\n args.unshift( source );\n return $.validator.format.apply( this, args );\n };\n }\n if ( params === undefined ) {\n return source;\n }\n if ( arguments.length > 2 && params.constructor !== Array ) {\n params = $.makeArray( arguments ).slice( 1 );\n }\n if ( params.constructor !== Array ) {\n params = [ params ];\n }\n $.each( params, function( i, n ) {\n source = source.replace( new RegExp( \"\\\\{\" + i + \"\\\\}\", \"g\" ), function() {\n return n;\n } );\n } );\n return source;\n };\n\n $.extend( $.validator, {\n\n defaults: {\n messages: {},\n groups: {},\n rules: {},\n errorClass: \"error\",\n pendingClass: \"pending\",\n validClass: \"valid\",\n errorElement: \"label\",\n focusCleanup: false,\n focusInvalid: true,\n errorContainer: $( [] ),\n errorLabelContainer: $( [] ),\n onsubmit: true,\n ignore: \":hidden\",\n ignoreTitle: false,\n onfocusin: function( element ) {\n this.lastActive = element;\n\n // Hide error label and remove error class on focus if enabled\n if ( this.settings.focusCleanup ) {\n if ( this.settings.unhighlight ) {\n this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n }\n this.hideThese( this.errorsFor( element ) );\n }\n },\n onfocusout: function( element ) {\n if ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) {\n this.element( element );\n }\n },\n onkeyup: function( element, event ) {\n\n // Avoid revalidate the field when pressing one of the following keys\n // Shift => 16\n // Ctrl => 17\n // Alt => 18\n // Caps lock => 20\n // End => 35\n // Home => 36\n // Left arrow => 37\n // Up arrow => 38\n // Right arrow => 39\n // Down arrow => 40\n // Insert => 45\n // Num lock => 144\n // AltGr key => 225\n var excludedKeys = [\n 16, 17, 18, 20, 35, 36, 37,\n 38, 39, 40, 45, 144, 225\n ];\n\n if ( event.which === 9 && this.elementValue( element ) === \"\" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {\n return;\n } else if ( element.name in this.submitted || element.name in this.invalid ) {\n this.element( element );\n }\n },\n onclick: function( element ) {\n\n // Click on selects, radiobuttons and checkboxes\n if ( element.name in this.submitted ) {\n this.element( element );\n\n // Or option elements, check parent select in that case\n } else if ( element.parentNode.name in this.submitted ) {\n this.element( element.parentNode );\n }\n },\n highlight: function( element, errorClass, validClass ) {\n if ( element.type === \"radio\" ) {\n this.findByName( element.name ).addClass( errorClass ).removeClass( validClass );\n } else {\n $( element ).addClass( errorClass ).removeClass( validClass );\n }\n },\n unhighlight: function( element, errorClass, validClass ) {\n if ( element.type === \"radio\" ) {\n this.findByName( element.name ).removeClass( errorClass ).addClass( validClass );\n } else {\n $( element ).removeClass( errorClass ).addClass( validClass );\n }\n }\n },\n\n // https://jqueryvalidation.org/jQuery.validator.setDefaults/\n setDefaults: function( settings ) {\n $.extend( $.validator.defaults, settings );\n },\n\n messages: {\n required: \"This field is required.\",\n remote: \"Please fix this field.\",\n email: \"Please enter a valid email address.\",\n url: \"Please enter a valid URL.\",\n date: \"Please enter a valid date.\",\n dateISO: \"Please enter a valid date (ISO).\",\n number: \"Please enter a valid number.\",\n digits: \"Please enter only digits.\",\n equalTo: \"Please enter the same value again.\",\n maxlength: $.validator.format( \"Please enter no more than {0} characters.\" ),\n minlength: $.validator.format( \"Please enter at least {0} characters.\" ),\n rangelength: $.validator.format( \"Please enter a value between {0} and {1} characters long.\" ),\n range: $.validator.format( \"Please enter a value between {0} and {1}.\" ),\n max: $.validator.format( \"Please enter a value less than or equal to {0}.\" ),\n min: $.validator.format( \"Please enter a value greater than or equal to {0}.\" ),\n step: $.validator.format( \"Please enter a multiple of {0}.\" )\n },\n\n autoCreateRanges: false,\n\n prototype: {\n\n init: function() {\n this.labelContainer = $( this.settings.errorLabelContainer );\n this.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm );\n this.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer );\n this.submitted = {};\n this.valueCache = {};\n this.pendingRequest = 0;\n this.pending = {};\n this.invalid = {};\n this.reset();\n\n var currentForm = this.currentForm,\n groups = ( this.groups = {} ),\n rules;\n $.each( this.settings.groups, function( key, value ) {\n if ( typeof value === \"string\" ) {\n value = value.split( /\\s/ );\n }\n $.each( value, function( index, name ) {\n groups[ name ] = key;\n } );\n } );\n rules = this.settings.rules;\n $.each( rules, function( key, value ) {\n rules[ key ] = $.validator.normalizeRule( value );\n } );\n\n function delegate( event ) {\n var isContentEditable = typeof $( this ).attr( \"contenteditable\" ) !== \"undefined\" && $( this ).attr( \"contenteditable\" ) !== \"false\";\n\n // Set form expando on contenteditable\n if ( !this.form && isContentEditable ) {\n this.form = $( this ).closest( \"form\" )[ 0 ];\n this.name = $( this ).attr( \"name\" );\n }\n\n // Ignore the element if it belongs to another form. This will happen mainly\n // when setting the `form` attribute of an input to the id of another form.\n if ( currentForm !== this.form ) {\n return;\n }\n\n var validator = $.data( this.form, \"validator\" ),\n eventType = \"on\" + event.type.replace( /^validate/, \"\" ),\n settings = validator.settings;\n if ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) {\n settings[ eventType ].call( validator, this, event );\n }\n }\n\n $( this.currentForm )\n .on( \"focusin.validate focusout.validate keyup.validate\",\n \":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], \" +\n \"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], \" +\n \"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], \" +\n \"[type='radio'], [type='checkbox'], [contenteditable], [type='button']\", delegate )\n\n // Support: Chrome, oldIE\n // \"select\" is provided as event.target when clicking a option\n .on( \"click.validate\", \"select, option, [type='radio'], [type='checkbox']\", delegate );\n\n if ( this.settings.invalidHandler ) {\n $( this.currentForm ).on( \"invalid-form.validate\", this.settings.invalidHandler );\n }\n },\n\n // https://jqueryvalidation.org/Validator.form/\n form: function() {\n this.checkForm();\n $.extend( this.submitted, this.errorMap );\n this.invalid = $.extend( {}, this.errorMap );\n if ( !this.valid() ) {\n $( this.currentForm ).triggerHandler( \"invalid-form\", [ this ] );\n }\n this.showErrors();\n return this.valid();\n },\n\n checkForm: function() {\n this.prepareForm();\n for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {\n this.check( elements[ i ] );\n }\n return this.valid();\n },\n\n // https://jqueryvalidation.org/Validator.element/\n element: function( element ) {\n var cleanElement = this.clean( element ),\n checkElement = this.validationTargetFor( cleanElement ),\n v = this,\n result = true,\n rs, group;\n\n if ( checkElement === undefined ) {\n delete this.invalid[ cleanElement.name ];\n } else {\n this.prepareElement( checkElement );\n this.currentElements = $( checkElement );\n\n // If this element is grouped, then validate all group elements already\n // containing a value\n group = this.groups[ checkElement.name ];\n if ( group ) {\n $.each( this.groups, function( name, testgroup ) {\n if ( testgroup === group && name !== checkElement.name ) {\n cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );\n if ( cleanElement && cleanElement.name in v.invalid ) {\n v.currentElements.push( cleanElement );\n result = v.check( cleanElement ) && result;\n }\n }\n } );\n }\n\n rs = this.check( checkElement ) !== false;\n result = result && rs;\n if ( rs ) {\n this.invalid[ checkElement.name ] = false;\n } else {\n this.invalid[ checkElement.name ] = true;\n }\n\n if ( !this.numberOfInvalids() ) {\n\n // Hide error containers on last error\n this.toHide = this.toHide.add( this.containers );\n }\n this.showErrors();\n\n // Add aria-invalid status for screen readers\n $( element ).attr( \"aria-invalid\", !rs );\n }\n\n return result;\n },\n\n // https://jqueryvalidation.org/Validator.showErrors/\n showErrors: function( errors ) {\n if ( errors ) {\n var validator = this;\n\n // Add items to error list and map\n $.extend( this.errorMap, errors );\n this.errorList = $.map( this.errorMap, function( message, name ) {\n return {\n message: message,\n element: validator.findByName( name )[ 0 ]\n };\n } );\n\n // Remove items from success list\n this.successList = $.grep( this.successList, function( element ) {\n return !( element.name in errors );\n } );\n }\n if ( this.settings.showErrors ) {\n this.settings.showErrors.call( this, this.errorMap, this.errorList );\n } else {\n this.defaultShowErrors();\n }\n },\n\n // https://jqueryvalidation.org/Validator.resetForm/\n resetForm: function() {\n if ( $.fn.resetForm ) {\n $( this.currentForm ).resetForm();\n }\n this.invalid = {};\n this.submitted = {};\n this.prepareForm();\n this.hideErrors();\n var elements = this.elements()\n .removeData( \"previousValue\" )\n .removeAttr( \"aria-invalid\" );\n\n this.resetElements( elements );\n },\n\n resetElements: function( elements ) {\n var i;\n\n if ( this.settings.unhighlight ) {\n for ( i = 0; elements[ i ]; i++ ) {\n this.settings.unhighlight.call( this, elements[ i ],\n this.settings.errorClass, \"\" );\n this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );\n }\n } else {\n elements\n .removeClass( this.settings.errorClass )\n .removeClass( this.settings.validClass );\n }\n },\n\n numberOfInvalids: function() {\n return this.objectLength( this.invalid );\n },\n\n objectLength: function( obj ) {\n /* jshint unused: false */\n var count = 0,\n i;\n for ( i in obj ) {\n\n // This check allows counting elements with empty error\n // message as invalid elements\n if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {\n count++;\n }\n }\n return count;\n },\n\n hideErrors: function() {\n this.hideThese( this.toHide );\n },\n\n hideThese: function( errors ) {\n errors.not( this.containers ).text( \"\" );\n this.addWrapper( errors ).hide();\n },\n\n valid: function() {\n return this.size() === 0;\n },\n\n size: function() {\n return this.errorList.length;\n },\n\n focusInvalid: function() {\n if ( this.settings.focusInvalid ) {\n try {\n $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )\n .filter( \":visible\" )\n .trigger( \"focus\" )\n\n // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n .trigger( \"focusin\" );\n } catch ( e ) {\n\n // Ignore IE throwing errors when focusing hidden elements\n }\n }\n },\n\n findLastActive: function() {\n var lastActive = this.lastActive;\n return lastActive && $.grep( this.errorList, function( n ) {\n return n.element.name === lastActive.name;\n } ).length === 1 && lastActive;\n },\n\n elements: function() {\n var validator = this,\n rulesCache = {};\n\n // Select all valid inputs inside the form (no submit or reset buttons)\n return $( this.currentForm )\n .find( \"input, select, textarea, [contenteditable]\" )\n .not( \":submit, :reset, :image, :disabled\" )\n .not( this.settings.ignore )\n .filter( function() {\n var name = this.name || $( this ).attr( \"name\" ); // For contenteditable\n var isContentEditable = typeof $( this ).attr( \"contenteditable\" ) !== \"undefined\" && $( this ).attr( \"contenteditable\" ) !== \"false\";\n\n if ( !name && validator.settings.debug && window.console ) {\n console.error( \"%o has no name assigned\", this );\n }\n\n // Set form expando on contenteditable\n if ( isContentEditable ) {\n this.form = $( this ).closest( \"form\" )[ 0 ];\n this.name = name;\n }\n\n // Ignore elements that belong to other/nested forms\n if ( this.form !== validator.currentForm ) {\n return false;\n }\n\n // Select only the first element for each name, and only those with rules specified\n if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {\n return false;\n }\n\n rulesCache[ name ] = true;\n return true;\n } );\n },\n\n clean: function( selector ) {\n return $( selector )[ 0 ];\n },\n\n errors: function() {\n var errorClass = this.settings.errorClass.split( \" \" ).join( \".\" );\n return $( this.settings.errorElement + \".\" + errorClass, this.errorContext );\n },\n\n resetInternals: function() {\n this.successList = [];\n this.errorList = [];\n this.errorMap = {};\n this.toShow = $( [] );\n this.toHide = $( [] );\n },\n\n reset: function() {\n this.resetInternals();\n this.currentElements = $( [] );\n },\n\n prepareForm: function() {\n this.reset();\n this.toHide = this.errors().add( this.containers );\n },\n\n prepareElement: function( element ) {\n this.reset();\n this.toHide = this.errorsFor( element );\n },\n\n elementValue: function( element ) {\n var $element = $( element ),\n type = element.type,\n isContentEditable = typeof $element.attr( \"contenteditable\" ) !== \"undefined\" && $element.attr( \"contenteditable\" ) !== \"false\",\n val, idx;\n\n if ( type === \"radio\" || type === \"checkbox\" ) {\n return this.findByName( element.name ).filter( \":checked\" ).val();\n } else if ( type === \"number\" && typeof element.validity !== \"undefined\" ) {\n return element.validity.badInput ? \"NaN\" : $element.val();\n }\n\n if ( isContentEditable ) {\n val = $element.text();\n } else {\n val = $element.val();\n }\n\n if ( type === \"file\" ) {\n\n // Modern browser (chrome & safari)\n if ( val.substr( 0, 12 ) === \"C:\\\\fakepath\\\\\" ) {\n return val.substr( 12 );\n }\n\n // Legacy browsers\n // Unix-based path\n idx = val.lastIndexOf( \"/\" );\n if ( idx >= 0 ) {\n return val.substr( idx + 1 );\n }\n\n // Windows-based path\n idx = val.lastIndexOf( \"\\\\\" );\n if ( idx >= 0 ) {\n return val.substr( idx + 1 );\n }\n\n // Just the file name\n return val;\n }\n\n if ( typeof val === \"string\" ) {\n return val.replace( /\\r/g, \"\" );\n }\n return val;\n },\n\n check: function( element ) {\n element = this.validationTargetFor( this.clean( element ) );\n\n var rules = $( element ).rules(),\n rulesCount = $.map( rules, function( n, i ) {\n return i;\n } ).length,\n dependencyMismatch = false,\n val = this.elementValue( element ),\n result, method, rule, normalizer;\n\n // Prioritize the local normalizer defined for this element over the global one\n // if the former exists, otherwise user the global one in case it exists.\n if ( typeof rules.normalizer === \"function\" ) {\n normalizer = rules.normalizer;\n } else if (\ttypeof this.settings.normalizer === \"function\" ) {\n normalizer = this.settings.normalizer;\n }\n\n // If normalizer is defined, then call it to the changed value instead\n // of using the real one.\n // Note that `this` in the normalizer is `element`.\n if ( normalizer ) {\n val = normalizer.call( element, val );\n\n // Delete the normalizer from rules to avoid treating it as a pre-defined method.\n delete rules.normalizer;\n }\n\n for ( method in rules ) {\n rule = { method: method, parameters: rules[ method ] };\n try {\n result = $.validator.methods[ method ].call( this, val, element, rule.parameters );\n\n // If a method indicates that the field is optional and therefore valid,\n // don't mark it as valid when there are no other rules\n if ( result === \"dependency-mismatch\" && rulesCount === 1 ) {\n dependencyMismatch = true;\n continue;\n }\n dependencyMismatch = false;\n\n if ( result === \"pending\" ) {\n this.toHide = this.toHide.not( this.errorsFor( element ) );\n return;\n }\n\n if ( !result ) {\n this.formatAndAdd( element, rule );\n return false;\n }\n } catch ( e ) {\n if ( this.settings.debug && window.console ) {\n console.log( \"Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\", e );\n }\n if ( e instanceof TypeError ) {\n e.message += \". Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\";\n }\n\n throw e;\n }\n }\n if ( dependencyMismatch ) {\n return;\n }\n if ( this.objectLength( rules ) ) {\n this.successList.push( element );\n }\n return true;\n },\n\n // Return the custom message for the given element and validation method\n // specified in the element's HTML5 data attribute\n // return the generic message if present and no method specific message is present\n customDataMessage: function( element, method ) {\n return $( element ).data( \"msg\" + method.charAt( 0 ).toUpperCase() +\n method.substring( 1 ).toLowerCase() ) || $( element ).data( \"msg\" );\n },\n\n // Return the custom message for the given element name and validation method\n customMessage: function( name, method ) {\n var m = this.settings.messages[ name ];\n return m && ( m.constructor === String ? m : m[ method ] );\n },\n\n // Return the first defined argument, allowing empty strings\n findDefined: function() {\n for ( var i = 0; i < arguments.length; i++ ) {\n if ( arguments[ i ] !== undefined ) {\n return arguments[ i ];\n }\n }\n return undefined;\n },\n\n // The second parameter 'rule' used to be a string, and extended to an object literal\n // of the following form:\n // rule = {\n // method: \"method name\",\n // parameters: \"the given method parameters\"\n // }\n //\n // The old behavior still supported, kept to maintain backward compatibility with\n // old code, and will be removed in the next major release.\n defaultMessage: function( element, rule ) {\n if ( typeof rule === \"string\" ) {\n rule = { method: rule };\n }\n\n var message = this.findDefined(\n this.customMessage( element.name, rule.method ),\n this.customDataMessage( element, rule.method ),\n\n // 'title' is never undefined, so handle empty string as undefined\n !this.settings.ignoreTitle && element.title || undefined,\n $.validator.messages[ rule.method ],\n \"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n ),\n theregex = /\\$?\\{(\\d+)\\}/g;\n if ( typeof message === \"function\" ) {\n message = message.call( this, rule.parameters, element );\n } else if ( theregex.test( message ) ) {\n message = $.validator.format( message.replace( theregex, \"{$1}\" ), rule.parameters );\n }\n\n return message;\n },\n\n formatAndAdd: function( element, rule ) {\n var message = this.defaultMessage( element, rule );\n\n this.errorList.push( {\n message: message,\n element: element,\n method: rule.method\n } );\n\n this.errorMap[ element.name ] = message;\n this.submitted[ element.name ] = message;\n },\n\n addWrapper: function( toToggle ) {\n if ( this.settings.wrapper ) {\n toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n }\n return toToggle;\n },\n\n defaultShowErrors: function() {\n var i, elements, error;\n for ( i = 0; this.errorList[ i ]; i++ ) {\n error = this.errorList[ i ];\n if ( this.settings.highlight ) {\n this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n }\n this.showLabel( error.element, error.message );\n }\n if ( this.errorList.length ) {\n this.toShow = this.toShow.add( this.containers );\n }\n if ( this.settings.success ) {\n for ( i = 0; this.successList[ i ]; i++ ) {\n this.showLabel( this.successList[ i ] );\n }\n }\n if ( this.settings.unhighlight ) {\n for ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) {\n this.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass );\n }\n }\n this.toHide = this.toHide.not( this.toShow );\n this.hideErrors();\n this.addWrapper( this.toShow ).show();\n },\n\n validElements: function() {\n return this.currentElements.not( this.invalidElements() );\n },\n\n invalidElements: function() {\n return $( this.errorList ).map( function() {\n return this.element;\n } );\n },\n\n showLabel: function( element, message ) {\n var place, group, errorID, v,\n error = this.errorsFor( element ),\n elementID = this.idOrName( element ),\n describedBy = $( element ).attr( \"aria-describedby\" );\n\n if ( error.length ) {\n\n // Refresh error/success class\n error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\n // Replace message on existing label\n error.html( message );\n } else {\n\n // Create error element\n error = $( \"<\" + this.settings.errorElement + \">\" )\n .attr( \"id\", elementID + \"-error\" )\n .addClass( this.settings.errorClass )\n .html( message || \"\" );\n\n // Maintain reference to the element to be placed into the DOM\n place = error;\n if ( this.settings.wrapper ) {\n\n // Make sure the element is visible, even in IE\n // actually showing the wrapped element is handled elsewhere\n place = error.hide().show().wrap( \"<\" + this.settings.wrapper + \"/>\" ).parent();\n }\n if ( this.labelContainer.length ) {\n this.labelContainer.append( place );\n } else if ( this.settings.errorPlacement ) {\n this.settings.errorPlacement.call( this, place, $( element ) );\n } else {\n place.insertAfter( element );\n }\n\n // Link error back to the element\n if ( error.is( \"label\" ) ) {\n\n // If the error is a label, then associate using 'for'\n error.attr( \"for\", elementID );\n\n // If the element is not a child of an associated label, then it's necessary\n // to explicitly apply aria-describedby\n } else if ( error.parents( \"label[for='\" + this.escapeCssMeta( elementID ) + \"']\" ).length === 0 ) {\n errorID = error.attr( \"id\" );\n\n // Respect existing non-error aria-describedby\n if ( !describedBy ) {\n describedBy = errorID;\n } else if ( !describedBy.match( new RegExp( \"\\\\b\" + this.escapeCssMeta( errorID ) + \"\\\\b\" ) ) ) {\n\n // Add to end of list if not already present\n describedBy += \" \" + errorID;\n }\n $( element ).attr( \"aria-describedby\", describedBy );\n\n // If this element is grouped, then assign to all elements in the same group\n group = this.groups[ element.name ];\n if ( group ) {\n v = this;\n $.each( v.groups, function( name, testgroup ) {\n if ( testgroup === group ) {\n $( \"[name='\" + v.escapeCssMeta( name ) + \"']\", v.currentForm )\n .attr( \"aria-describedby\", error.attr( \"id\" ) );\n }\n } );\n }\n }\n }\n if ( !message && this.settings.success ) {\n error.text( \"\" );\n if ( typeof this.settings.success === \"string\" ) {\n error.addClass( this.settings.success );\n } else {\n this.settings.success( error, element );\n }\n }\n this.toShow = this.toShow.add( error );\n },\n\n errorsFor: function( element ) {\n var name = this.escapeCssMeta( this.idOrName( element ) ),\n describer = $( element ).attr( \"aria-describedby\" ),\n selector = \"label[for='\" + name + \"'], label[for='\" + name + \"'] *\";\n\n // 'aria-describedby' should directly reference the error element\n if ( describer ) {\n selector = selector + \", #\" + this.escapeCssMeta( describer )\n .replace( /\\s+/g, \", #\" ) + \":visible\";\n }\n\n return this\n .errors()\n .filter( selector );\n },\n\n // See https://api.jquery.com/category/selectors/, for CSS\n // meta-characters that should be escaped in order to be used with JQuery\n // as a literal part of a name/id or any selector.\n escapeCssMeta: function( string ) {\n if ( string === undefined ) {\n return \"\";\n }\n\n return string.replace( /([\\\\!\"#$%&'()*+,./:;<=>?@\\[\\]^`{|}~])/g, \"\\\\$1\" );\n },\n\n idOrName: function( element ) {\n return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );\n },\n\n validationTargetFor: function( element ) {\n\n // If radio/checkbox, validate first element in group instead\n if ( this.checkable( element ) ) {\n element = this.findByName( element.name );\n }\n\n // Always apply ignore filter\n return $( element ).not( this.settings.ignore )[ 0 ];\n },\n\n checkable: function( element ) {\n return ( /radio|checkbox/i ).test( element.type );\n },\n\n findByName: function( name ) {\n return $( this.currentForm ).find( \"[name='\" + this.escapeCssMeta( name ) + \"']\" );\n },\n\n getLength: function( value, element ) {\n switch ( element.nodeName.toLowerCase() ) {\n case \"select\":\n return $( \"option:selected\", element ).length;\n case \"input\":\n if ( this.checkable( element ) ) {\n return this.findByName( element.name ).filter( \":checked\" ).length;\n }\n }\n return value.length;\n },\n\n depend: function( param, element ) {\n return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;\n },\n\n dependTypes: {\n \"boolean\": function( param ) {\n return param;\n },\n \"string\": function( param, element ) {\n return !!$( param, element.form ).length;\n },\n \"function\": function( param, element ) {\n return param( element );\n }\n },\n\n optional: function( element ) {\n var val = this.elementValue( element );\n return !$.validator.methods.required.call( this, val, element ) && \"dependency-mismatch\";\n },\n\n startRequest: function( element ) {\n if ( !this.pending[ element.name ] ) {\n this.pendingRequest++;\n $( element ).addClass( this.settings.pendingClass );\n this.pending[ element.name ] = true;\n }\n },\n\n stopRequest: function( element, valid ) {\n this.pendingRequest--;\n\n // Sometimes synchronization fails, make sure pendingRequest is never < 0\n if ( this.pendingRequest < 0 ) {\n this.pendingRequest = 0;\n }\n delete this.pending[ element.name ];\n $( element ).removeClass( this.settings.pendingClass );\n if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {\n $( this.currentForm ).trigger( \"submit\" );\n\n // Remove the hidden input that was used as a replacement for the\n // missing submit button. The hidden input is added by `handle()`\n // to ensure that the value of the used submit button is passed on\n // for scripted submits triggered by this method\n if ( this.submitButton ) {\n $( \"input:hidden[name='\" + this.submitButton.name + \"']\", this.currentForm ).remove();\n }\n\n this.formSubmitted = false;\n } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {\n $( this.currentForm ).triggerHandler( \"invalid-form\", [ this ] );\n this.formSubmitted = false;\n }\n },\n\n previousValue: function( element, method ) {\n method = typeof method === \"string\" && method || \"remote\";\n\n return $.data( element, \"previousValue\" ) || $.data( element, \"previousValue\", {\n old: null,\n valid: true,\n message: this.defaultMessage( element, { method: method } )\n } );\n },\n\n // Cleans up all forms and elements, removes validator-specific events\n destroy: function() {\n this.resetForm();\n\n $( this.currentForm )\n .off( \".validate\" )\n .removeData( \"validator\" )\n .find( \".validate-equalTo-blur\" )\n .off( \".validate-equalTo\" )\n .removeClass( \"validate-equalTo-blur\" )\n .find( \".validate-lessThan-blur\" )\n .off( \".validate-lessThan\" )\n .removeClass( \"validate-lessThan-blur\" )\n .find( \".validate-lessThanEqual-blur\" )\n .off( \".validate-lessThanEqual\" )\n .removeClass( \"validate-lessThanEqual-blur\" )\n .find( \".validate-greaterThanEqual-blur\" )\n .off( \".validate-greaterThanEqual\" )\n .removeClass( \"validate-greaterThanEqual-blur\" )\n .find( \".validate-greaterThan-blur\" )\n .off( \".validate-greaterThan\" )\n .removeClass( \"validate-greaterThan-blur\" );\n }\n\n },\n\n classRuleSettings: {\n required: { required: true },\n email: { email: true },\n url: { url: true },\n date: { date: true },\n dateISO: { dateISO: true },\n number: { number: true },\n digits: { digits: true },\n creditcard: { creditcard: true }\n },\n\n addClassRules: function( className, rules ) {\n if ( className.constructor === String ) {\n this.classRuleSettings[ className ] = rules;\n } else {\n $.extend( this.classRuleSettings, className );\n }\n },\n\n classRules: function( element ) {\n var rules = {},\n classes = $( element ).attr( \"class\" );\n\n if ( classes ) {\n $.each( classes.split( \" \" ), function() {\n if ( this in $.validator.classRuleSettings ) {\n $.extend( rules, $.validator.classRuleSettings[ this ] );\n }\n } );\n }\n return rules;\n },\n\n normalizeAttributeRule: function( rules, type, method, value ) {\n\n // Convert the value to a number for number inputs, and for text for backwards compability\n // allows type=\"date\" and others to be compared as strings\n if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\n value = Number( value );\n\n // Support Opera Mini, which returns NaN for undefined minlength\n if ( isNaN( value ) ) {\n value = undefined;\n }\n }\n\n if ( value || value === 0 ) {\n rules[ method ] = value;\n } else if ( type === method && type !== \"range\" ) {\n\n // Exception: the jquery validate 'range' method\n // does not test for the html5 'range' type\n rules[ type === \"date\" ? \"dateISO\" : method ] = true;\n }\n },\n\n attributeRules: function( element ) {\n var rules = {},\n $element = $( element ),\n type = element.getAttribute( \"type\" ),\n method, value;\n\n for ( method in $.validator.methods ) {\n\n // Support for <input required> in both html5 and older browsers\n if ( method === \"required\" ) {\n value = element.getAttribute( method );\n\n // Some browsers return an empty string for the required attribute\n // and non-HTML5 browsers might have required=\"\" markup\n if ( value === \"\" ) {\n value = true;\n }\n\n // Force non-HTML5 browsers to return bool\n value = !!value;\n } else {\n value = $element.attr( method );\n }\n\n this.normalizeAttributeRule( rules, type, method, value );\n }\n\n // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs\n if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {\n delete rules.maxlength;\n }\n\n return rules;\n },\n\n metadataRules: function (element) {\n if (!$.metadata) {\n return {};\n }\n\n var meta = $.data(element.form, 'validator').settings.meta;\n return meta ?\n $(element).metadata()[meta] :\n $(element).metadata();\n },\n\n dataRules: function( element ) {\n var rules = {},\n $element = $( element ),\n type = element.getAttribute( \"type\" ),\n method, value;\n\n for ( method in $.validator.methods ) {\n value = $element.data( \"rule\" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );\n\n // Cast empty attributes like `data-rule-required` to `true`\n if ( value === \"\" ) {\n value = true;\n }\n\n this.normalizeAttributeRule( rules, type, method, value );\n }\n return rules;\n },\n\n staticRules: function( element ) {\n var rules = {},\n validator = $.data( element.form, \"validator\" );\n\n if ( validator.settings.rules ) {\n rules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {};\n }\n return rules;\n },\n\n normalizeRules: function( rules, element ) {\n\n // Handle dependency check\n $.each( rules, function( prop, val ) {\n\n // Ignore rule when param is explicitly false, eg. required:false\n if ( val === false ) {\n delete rules[ prop ];\n return;\n }\n if ( val.param || val.depends ) {\n var keepRule = true;\n switch ( typeof val.depends ) {\n case \"string\":\n keepRule = !!$( val.depends, element.form ).length;\n break;\n case \"function\":\n keepRule = val.depends.call( element, element );\n break;\n }\n if ( keepRule ) {\n rules[ prop ] = val.param !== undefined ? val.param : true;\n } else {\n $.data( element.form, \"validator\" ).resetElements( $( element ) );\n delete rules[ prop ];\n }\n }\n } );\n\n // Evaluate parameters\n $.each( rules, function( rule, parameter ) {\n rules[ rule ] = typeof parameter === \"function\" && rule !== \"normalizer\" ? parameter( element ) : parameter;\n } );\n\n // Clean number parameters\n $.each( [ \"minlength\", \"maxlength\" ], function() {\n if ( rules[ this ] ) {\n rules[ this ] = Number( rules[ this ] );\n }\n } );\n $.each( [ \"rangelength\", \"range\" ], function() {\n var parts;\n if ( rules[ this ] ) {\n if ( Array.isArray( rules[ this ] ) ) {\n rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];\n } else if ( typeof rules[ this ] === \"string\" ) {\n parts = rules[ this ].replace( /[\\[\\]]/g, \"\" ).split( /[\\s,]+/ );\n rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];\n }\n }\n } );\n\n if ( $.validator.autoCreateRanges ) {\n\n // Auto-create ranges\n if ( rules.min != null && rules.max != null ) {\n rules.range = [ rules.min, rules.max ];\n delete rules.min;\n delete rules.max;\n }\n if ( rules.minlength != null && rules.maxlength != null ) {\n rules.rangelength = [ rules.minlength, rules.maxlength ];\n delete rules.minlength;\n delete rules.maxlength;\n }\n }\n\n return rules;\n },\n\n // Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n normalizeRule: function( data ) {\n if ( typeof data === \"string\" ) {\n var transformed = {};\n $.each( data.split( /\\s/ ), function() {\n transformed[ this ] = true;\n } );\n data = transformed;\n }\n return data;\n },\n\n // https://jqueryvalidation.org/jQuery.validator.addMethod/\n addMethod: function( name, method, message ) {\n $.validator.methods[ name ] = method;\n $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];\n if ( method.length < 3 ) {\n $.validator.addClassRules( name, $.validator.normalizeRule( name ) );\n }\n },\n\n // https://jqueryvalidation.org/jQuery.validator.methods/\n methods: {\n\n // https://jqueryvalidation.org/required-method/\n required: function( value, element, param ) {\n\n // Check if dependency is met\n if ( !this.depend( param, element ) ) {\n return \"dependency-mismatch\";\n }\n if ( element.nodeName.toLowerCase() === \"select\" ) {\n\n // Could be an array for select-multiple or a string, both are fine this way\n var val = $( element ).val();\n return val && val.length > 0;\n }\n if ( this.checkable( element ) ) {\n return this.getLength( value, element ) > 0;\n }\n return value !== undefined && value !== null && value.length > 0;\n },\n\n // https://jqueryvalidation.org/email-method/\n email: function( value, element ) {\n\n // From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\n // Retrieved 2014-01-14\n // If you have a problem with this implementation, report a bug against the above spec\n // Or use custom methods to implement your own email validation\n return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );\n },\n\n // https://jqueryvalidation.org/url-method/\n url: function( value, element ) {\n\n // Copyright (c) 2010-2013 Diego Perini, MIT licensed\n // https://gist.github.com/dperini/729294\n // see also https://mathiasbynens.be/demo/url-regex\n // modified to allow protocol-relative URLs\n return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:(?:[^\\]\\[?\\/<~#`!@$^&*()+=}|:\";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\\]\\[?\\/<~#`!@$^&*()+=}|:\";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test( value );\n },\n\n // https://jqueryvalidation.org/date-method/\n date: ( function() {\n var called = false;\n\n return function( value, element ) {\n if ( !called ) {\n called = true;\n if ( this.settings.debug && window.console ) {\n console.warn(\n \"The `date` method is deprecated and will be removed in version '2.0.0'.\\n\" +\n \"Please don't use it, since it relies on the Date constructor, which\\n\" +\n \"behaves very differently across browsers and locales. Use `dateISO`\\n\" +\n \"instead or one of the locale specific methods in `localizations/`\\n\" +\n \"and `additional-methods.js`.\"\n );\n }\n }\n\n return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );\n };\n }() ),\n\n // https://jqueryvalidation.org/dateISO-method/\n dateISO: function( value, element ) {\n return this.optional( element ) || /^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );\n },\n\n // https://jqueryvalidation.org/number-method/\n number: function( value, element ) {\n return this.optional( element ) || /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test( value );\n },\n\n // https://jqueryvalidation.org/digits-method/\n digits: function( value, element ) {\n return this.optional( element ) || /^\\d+$/.test( value );\n },\n\n // https://jqueryvalidation.org/minlength-method/\n minlength: function( value, element, param ) {\n var length = Array.isArray( value ) ? value.length : this.getLength( value, element );\n return this.optional( element ) || length >= param;\n },\n\n // https://jqueryvalidation.org/maxlength-method/\n maxlength: function( value, element, param ) {\n var length = Array.isArray( value ) ? value.length : this.getLength( value, element );\n return this.optional( element ) || length <= param;\n },\n\n // https://jqueryvalidation.org/rangelength-method/\n rangelength: function( value, element, param ) {\n var length = Array.isArray( value ) ? value.length : this.getLength( value, element );\n return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );\n },\n\n // https://jqueryvalidation.org/min-method/\n min: function( value, element, param ) {\n return this.optional( element ) || value >= param;\n },\n\n // https://jqueryvalidation.org/max-method/\n max: function( value, element, param ) {\n return this.optional( element ) || value <= param;\n },\n\n // https://jqueryvalidation.org/range-method/\n range: function( value, element, param ) {\n return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );\n },\n\n // https://jqueryvalidation.org/step-method/\n step: function( value, element, param ) {\n var type = $( element ).attr( \"type\" ),\n errorMessage = \"Step attribute on input type \" + type + \" is not supported.\",\n supportedTypes = [ \"text\", \"number\", \"range\" ],\n re = new RegExp( \"\\\\b\" + type + \"\\\\b\" ),\n notSupported = type && !re.test( supportedTypes.join() ),\n decimalPlaces = function( num ) {\n var match = ( \"\" + num ).match( /(?:\\.(\\d+))?$/ );\n if ( !match ) {\n return 0;\n }\n\n // Number of digits right of decimal point.\n return match[ 1 ] ? match[ 1 ].length : 0;\n },\n toInt = function( num ) {\n return Math.round( num * Math.pow( 10, decimals ) );\n },\n valid = true,\n decimals;\n\n // Works only for text, number and range input types\n // TODO find a way to support input types date, datetime, datetime-local, month, time and week\n if ( notSupported ) {\n throw new Error( errorMessage );\n }\n\n decimals = decimalPlaces( param );\n\n // Value can't have too many decimals\n if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {\n valid = false;\n }\n\n return this.optional( element ) || valid;\n },\n\n // https://jqueryvalidation.org/equalTo-method/\n equalTo: function( value, element, param ) {\n\n // Bind to the blur event of the target in order to revalidate whenever the target field is updated\n var target = $( param );\n if ( this.settings.onfocusout && target.not( \".validate-equalTo-blur\" ).length ) {\n target.addClass( \"validate-equalTo-blur\" ).on( \"blur.validate-equalTo\", function() {\n $( element ).valid();\n } );\n }\n return value === target.val();\n },\n\n // https://jqueryvalidation.org/remote-method/\n remote: function( value, element, param, method ) {\n if ( this.optional( element ) ) {\n return \"dependency-mismatch\";\n }\n\n method = typeof method === \"string\" && method || \"remote\";\n\n var previous = this.previousValue( element, method ),\n validator, data, optionDataString;\n\n if ( !this.settings.messages[ element.name ] ) {\n this.settings.messages[ element.name ] = {};\n }\n previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];\n this.settings.messages[ element.name ][ method ] = previous.message;\n\n param = typeof param === \"string\" && { url: param } || param;\n optionDataString = $.param( $.extend( { data: value }, param.data ) );\n if ( previous.old === optionDataString ) {\n return previous.valid;\n }\n\n previous.old = optionDataString;\n validator = this;\n this.startRequest( element );\n data = {};\n data[ element.name ] = value;\n $.ajax( $.extend( true, {\n mode: \"abort\",\n port: \"validate\" + element.name,\n dataType: \"json\",\n data: data,\n context: validator.currentForm,\n success: function( response ) {\n var valid = response === true || response === \"true\",\n errors, message, submitted;\n\n validator.settings.messages[ element.name ][ method ] = previous.originalMessage;\n if ( valid ) {\n submitted = validator.formSubmitted;\n validator.resetInternals();\n validator.toHide = validator.errorsFor( element );\n validator.formSubmitted = submitted;\n validator.successList.push( element );\n validator.invalid[ element.name ] = false;\n validator.showErrors();\n } else {\n errors = {};\n message = response || validator.defaultMessage( element, { method: method, parameters: value } );\n errors[ element.name ] = previous.message = message;\n validator.invalid[ element.name ] = true;\n validator.showErrors( errors );\n }\n previous.valid = valid;\n validator.stopRequest( element, valid );\n }\n }, param ) );\n return \"pending\";\n }\n }\n\n } );\n\n// Ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n\n var pendingRequests = {},\n ajax;\n\n// Use a prefilter if available (1.5+)\n if ( $.ajaxPrefilter ) {\n $.ajaxPrefilter( function( settings, _, xhr ) {\n var port = settings.port;\n if ( settings.mode === \"abort\" ) {\n if ( pendingRequests[ port ] ) {\n pendingRequests[ port ].abort();\n }\n pendingRequests[ port ] = xhr;\n }\n } );\n } else {\n\n // Proxy ajax\n ajax = $.ajax;\n $.ajax = function( settings ) {\n var mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n port = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n if ( mode === \"abort\" ) {\n if ( pendingRequests[ port ] ) {\n pendingRequests[ port ].abort();\n }\n pendingRequests[ port ] = ajax.apply( this, arguments );\n return pendingRequests[ port ];\n }\n return ajax.apply( this, arguments );\n };\n }\n return $;\n}));\n","jquery/compat.js":"// Import every plugin under the sun. Bad for performance,\n// but prevents the store from breaking in situations\n// where a dependency was missed during the migration from\n// a monolith build of jQueryUI to a modular one\n\ndefine([\n 'jquery-ui-modules/core',\n 'jquery-ui-modules/accordion',\n 'jquery-ui-modules/autocomplete',\n 'jquery-ui-modules/button',\n 'jquery-ui-modules/datepicker',\n 'jquery-ui-modules/dialog',\n 'jquery-ui-modules/draggable',\n 'jquery-ui-modules/droppable',\n 'jquery-ui-modules/effect-blind',\n 'jquery-ui-modules/effect-bounce',\n 'jquery-ui-modules/effect-clip',\n 'jquery-ui-modules/effect-drop',\n 'jquery-ui-modules/effect-explode',\n 'jquery-ui-modules/effect-fade',\n 'jquery-ui-modules/effect-fold',\n 'jquery-ui-modules/effect-highlight',\n 'jquery-ui-modules/effect-scale',\n 'jquery-ui-modules/effect-pulsate',\n 'jquery-ui-modules/effect-shake',\n 'jquery-ui-modules/effect-slide',\n 'jquery-ui-modules/effect-transfer',\n 'jquery-ui-modules/effect',\n 'jquery-ui-modules/menu',\n 'jquery-ui-modules/mouse',\n 'jquery-ui-modules/position',\n 'jquery-ui-modules/progressbar',\n 'jquery-ui-modules/resizable',\n 'jquery-ui-modules/selectable',\n 'jquery-ui-modules/slider',\n 'jquery-ui-modules/sortable',\n 'jquery-ui-modules/spinner',\n 'jquery-ui-modules/tabs',\n 'jquery-ui-modules/timepicker',\n 'jquery-ui-modules/tooltip',\n 'jquery-ui-modules/widget'\n], function() {\n console.warn(\n 'Fallback to JQueryUI Compat activated. ' +\n 'Your store is missing a dependency for a ' +\n 'jQueryUI widget. Identifying and addressing the dependency ' +\n 'will drastically improve the performance of your site.'\n );\n});\n","jquery/timepicker.js":"/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20\n* http://trentrichardson.com/examples/timepicker\n* Copyright (c) 2016 Trent Richardson; Licensed MIT */\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery', 'jquery-ui-modules/datepicker', 'jquery-ui-modules/slider'], factory);\n } else {\n factory(jQuery);\n }\n}(function ($) {\n\n /*\n * Lets not redefine timepicker, Prevent \"Uncaught RangeError: Maximum call stack size exceeded\"\n */\n $.ui.timepicker = $.ui.timepicker || {};\n if ($.ui.timepicker.version) {\n return;\n }\n\n /*\n * Extend jQueryUI, get it started with our version number\n */\n $.extend($.ui, {\n timepicker: {\n version: \"1.6.3\"\n }\n });\n\n /*\n * Timepicker manager.\n * Use the singleton instance of this class, $.timepicker, to interact with the time picker.\n * Settings for (groups of) time pickers are maintained in an instance object,\n * allowing multiple different settings on the same page.\n */\n var Timepicker = function () {\n this.regional = []; // Available regional settings, indexed by language code\n this.regional[''] = { // Default regional settings\n currentText: 'Now',\n closeText: 'Done',\n amNames: ['AM', 'A'],\n pmNames: ['PM', 'P'],\n timeFormat: 'HH:mm',\n timeSuffix: '',\n timeOnlyTitle: 'Choose Time',\n timeText: 'Time',\n hourText: 'Hour',\n minuteText: 'Minute',\n secondText: 'Second',\n millisecText: 'Millisecond',\n microsecText: 'Microsecond',\n timezoneText: 'Time Zone',\n isRTL: false\n };\n this._defaults = { // Global defaults for all the datetime picker instances\n showButtonPanel: true,\n timeOnly: false,\n timeOnlyShowDate: false,\n showHour: null,\n showMinute: null,\n showSecond: null,\n showMillisec: null,\n showMicrosec: null,\n showTimezone: null,\n showTime: true,\n stepHour: 1,\n stepMinute: 1,\n stepSecond: 1,\n stepMillisec: 1,\n stepMicrosec: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisec: 0,\n microsec: 0,\n timezone: null,\n hourMin: 0,\n minuteMin: 0,\n secondMin: 0,\n millisecMin: 0,\n microsecMin: 0,\n hourMax: 23,\n minuteMax: 59,\n secondMax: 59,\n millisecMax: 999,\n microsecMax: 999,\n minDateTime: null,\n maxDateTime: null,\n maxTime: null,\n minTime: null,\n onSelect: null,\n hourGrid: 0,\n minuteGrid: 0,\n secondGrid: 0,\n millisecGrid: 0,\n microsecGrid: 0,\n alwaysSetTime: true,\n separator: ' ',\n altFieldTimeOnly: true,\n altTimeFormat: null,\n altSeparator: null,\n altTimeSuffix: null,\n altRedirectFocus: true,\n pickerTimeFormat: null,\n pickerTimeSuffix: null,\n showTimepicker: true,\n timezoneList: null,\n addSliderAccess: false,\n sliderAccessArgs: null,\n controlType: 'slider',\n oneLine: false,\n defaultValue: null,\n parse: 'strict',\n afterInject: null\n };\n $.extend(this._defaults, this.regional['']);\n };\n\n $.extend(Timepicker.prototype, {\n $input: null,\n $altInput: null,\n $timeObj: null,\n inst: null,\n hour_slider: null,\n minute_slider: null,\n second_slider: null,\n millisec_slider: null,\n microsec_slider: null,\n timezone_select: null,\n maxTime: null,\n minTime: null,\n hour: 0,\n minute: 0,\n second: 0,\n millisec: 0,\n microsec: 0,\n timezone: null,\n hourMinOriginal: null,\n minuteMinOriginal: null,\n secondMinOriginal: null,\n millisecMinOriginal: null,\n microsecMinOriginal: null,\n hourMaxOriginal: null,\n minuteMaxOriginal: null,\n secondMaxOriginal: null,\n millisecMaxOriginal: null,\n microsecMaxOriginal: null,\n ampm: '',\n formattedDate: '',\n formattedTime: '',\n formattedDateTime: '',\n timezoneList: null,\n units: ['hour', 'minute', 'second', 'millisec', 'microsec'],\n support: {},\n control: null,\n\n /*\n * Override the default settings for all instances of the time picker.\n * @param {Object} settings object - the new settings to use as defaults (anonymous object)\n * @return {Object} the manager object\n */\n setDefaults: function (settings) {\n extendRemove(this._defaults, settings || {});\n return this;\n },\n\n /*\n * Create a new Timepicker instance\n */\n _newInst: function ($input, opts) {\n var tp_inst = new Timepicker(),\n inlineSettings = {},\n fns = {},\n overrides, i;\n\n for (var attrName in this._defaults) {\n if (this._defaults.hasOwnProperty(attrName)) {\n var attrValue = $input.attr('time:' + attrName);\n if (attrValue) {\n try {\n inlineSettings[attrName] = eval(attrValue);\n } catch (err) {\n inlineSettings[attrName] = attrValue;\n }\n }\n }\n }\n\n overrides = {\n beforeShow: function (input, dp_inst) {\n if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) {\n return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst);\n }\n },\n onChangeMonthYear: function (year, month, dp_inst) {\n // Update the time as well : this prevents the time from disappearing from the $input field.\n // tp_inst._updateDateTime(dp_inst);\n if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {\n tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);\n }\n },\n onClose: function (dateText, dp_inst) {\n if (tp_inst.timeDefined === true && $input.val() !== '') {\n tp_inst._updateDateTime(dp_inst);\n }\n if ($.isFunction(tp_inst._defaults.evnts.onClose)) {\n tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst);\n }\n }\n };\n for (i in overrides) {\n if (overrides.hasOwnProperty(i)) {\n fns[i] = opts[i] || this._defaults[i] || null;\n }\n }\n\n tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, {\n evnts: fns,\n timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');\n });\n tp_inst.amNames = $.map(tp_inst._defaults.amNames, function (val) {\n return val.toUpperCase();\n });\n tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function (val) {\n return val.toUpperCase();\n });\n\n // detect which units are supported\n tp_inst.support = detectSupport(\n tp_inst._defaults.timeFormat +\n (tp_inst._defaults.pickerTimeFormat ? tp_inst._defaults.pickerTimeFormat : '') +\n (tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat : ''));\n\n // controlType is string - key to our this._controls\n if (typeof(tp_inst._defaults.controlType) === 'string') {\n if (tp_inst._defaults.controlType === 'slider' && typeof($.ui.slider) === 'undefined') {\n tp_inst._defaults.controlType = 'select';\n }\n tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];\n }\n // controlType is an object and must implement create, options, value methods\n else {\n tp_inst.control = tp_inst._defaults.controlType;\n }\n\n // prep the timezone options\n var timezoneList = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -270, -240, -210, -180, -120, -60,\n 0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 525, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840];\n if (tp_inst._defaults.timezoneList !== null) {\n timezoneList = tp_inst._defaults.timezoneList;\n }\n var tzl = timezoneList.length, tzi = 0, tzv = null;\n if (tzl > 0 && typeof timezoneList[0] !== 'object') {\n for (; tzi < tzl; tzi++) {\n tzv = timezoneList[tzi];\n timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) };\n }\n }\n tp_inst._defaults.timezoneList = timezoneList;\n\n // set the default units\n tp_inst.timezone = tp_inst._defaults.timezone !== null ? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) :\n ((new Date()).getTimezoneOffset() * -1);\n tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ? tp_inst._defaults.hourMin :\n tp_inst._defaults.hour > tp_inst._defaults.hourMax ? tp_inst._defaults.hourMax : tp_inst._defaults.hour;\n tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin :\n tp_inst._defaults.minute > tp_inst._defaults.minuteMax ? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;\n tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin :\n tp_inst._defaults.second > tp_inst._defaults.secondMax ? tp_inst._defaults.secondMax : tp_inst._defaults.second;\n tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin :\n tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;\n tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin :\n tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec;\n tp_inst.ampm = '';\n tp_inst.$input = $input;\n\n if (tp_inst._defaults.altField) {\n tp_inst.$altInput = $(tp_inst._defaults.altField);\n if (tp_inst._defaults.altRedirectFocus === true) {\n tp_inst.$altInput.css({\n cursor: 'pointer'\n }).focus(function () {\n $input.trigger(\"focus\");\n });\n }\n }\n\n if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {\n tp_inst._defaults.minDate = new Date();\n }\n if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) {\n tp_inst._defaults.maxDate = new Date();\n }\n\n // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..\n if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) {\n tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());\n }\n if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) {\n tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());\n }\n if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) {\n tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());\n }\n if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {\n tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());\n }\n tp_inst.$input.bind('focus', function () {\n tp_inst._onFocus();\n });\n\n return tp_inst;\n },\n\n /*\n * add our sliders to the calendar\n */\n _addTimePicker: function (dp_inst) {\n var currDT = $.trim((this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val());\n\n this.timeDefined = this._parseTime(currDT);\n this._limitMinMaxDateTime(dp_inst, false);\n this._injectTimePicker();\n this._afterInject();\n },\n\n /*\n * parse the time string from input value or _setTime\n */\n _parseTime: function (timeString, withDate) {\n if (!this.inst) {\n this.inst = $.datepicker._getInst(this.$input[0]);\n }\n\n if (withDate || !this._defaults.timeOnly) {\n var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');\n try {\n var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults);\n if (!parseRes.timeObj) {\n return false;\n }\n $.extend(this, parseRes.timeObj);\n } catch (err) {\n $.timepicker.log(\"Error parsing the date/time string: \" + err +\n \"\\ndate/time string = \" + timeString +\n \"\\ntimeFormat = \" + this._defaults.timeFormat +\n \"\\ndateFormat = \" + dp_dateFormat);\n return false;\n }\n return true;\n } else {\n var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults);\n if (!timeObj) {\n return false;\n }\n $.extend(this, timeObj);\n return true;\n }\n },\n\n /*\n * Handle callback option after injecting timepicker\n */\n _afterInject: function() {\n var o = this.inst.settings;\n if ($.isFunction(o.afterInject)) {\n o.afterInject.call(this);\n }\n },\n\n /*\n * generate and inject html for timepicker into ui datepicker\n */\n _injectTimePicker: function () {\n var $dp = this.inst.dpDiv,\n o = this.inst.settings,\n tp_inst = this,\n litem = '',\n uitem = '',\n show = null,\n max = {},\n gridSize = {},\n size = null,\n i = 0,\n l = 0;\n\n // Prevent displaying twice\n if ($dp.find(\"div.ui-timepicker-div\").length === 0 && o.showTimepicker) {\n var noDisplay = ' ui_tpicker_unit_hide',\n html = '<div class=\"ui-timepicker-div' + (o.isRTL ? ' ui-timepicker-rtl' : '') + (o.oneLine && o.controlType === 'select' ? ' ui-timepicker-oneLine' : '') + '\"><dl>' + '<dt class=\"ui_tpicker_time_label' + ((o.showTime) ? '' : noDisplay) + '\">' + o.timeText + '</dt>' +\n '<dd class=\"ui_tpicker_time '+ ((o.showTime) ? '' : noDisplay) + '\"><input class=\"ui_tpicker_time_input\" ' + (o.timeInput ? '' : 'disabled') + '/></dd>';\n\n // Create the markup\n for (i = 0, l = this.units.length; i < l; i++) {\n litem = this.units[i];\n uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1);\n show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem];\n\n // Added by Peter Medeiros:\n // - Figure out what the hour/minute/second max should be based on the step values.\n // - Example: if stepMinute is 15, then minMax is 45.\n max[litem] = parseInt((o[litem + 'Max'] - ((o[litem + 'Max'] - o[litem + 'Min']) % o['step' + uitem])), 10);\n gridSize[litem] = 0;\n\n html += '<dt class=\"ui_tpicker_' + litem + '_label' + (show ? '' : noDisplay) + '\">' + o[litem + 'Text'] + '</dt>' +\n '<dd class=\"ui_tpicker_' + litem + (show ? '' : noDisplay) + '\"><div class=\"ui_tpicker_' + litem + '_slider' + (show ? '' : noDisplay) + '\"></div>';\n\n if (show && o[litem + 'Grid'] > 0) {\n html += '<div style=\"padding-left: 1px\"><table class=\"ui-tpicker-grid-label\"><tr>';\n\n if (litem === 'hour') {\n for (var h = o[litem + 'Min']; h <= max[litem]; h += parseInt(o[litem + 'Grid'], 10)) {\n gridSize[litem]++;\n var tmph = $.datepicker.formatTime(this.support.ampm ? 'hht' : 'HH', {hour: h}, o);\n html += '<td data-for=\"' + litem + '\">' + tmph + '</td>';\n }\n }\n else {\n for (var m = o[litem + 'Min']; m <= max[litem]; m += parseInt(o[litem + 'Grid'], 10)) {\n gridSize[litem]++;\n html += '<td data-for=\"' + litem + '\">' + ((m < 10) ? '0' : '') + m + '</td>';\n }\n }\n\n html += '</tr></table></div>';\n }\n html += '</dd>';\n }\n\n // Timezone\n var showTz = o.showTimezone !== null ? o.showTimezone : this.support.timezone;\n html += '<dt class=\"ui_tpicker_timezone_label' + (showTz ? '' : noDisplay) + '\">' + o.timezoneText + '</dt>';\n html += '<dd class=\"ui_tpicker_timezone' + (showTz ? '' : noDisplay) + '\"></dd>';\n\n // Create the elements from string\n html += '</dl></div>';\n var $tp = $(html);\n\n // if we only want time picker...\n if (o.timeOnly === true) {\n $tp.prepend('<div class=\"ui-widget-header ui-helper-clearfix ui-corner-all\">' + '<div class=\"ui-datepicker-title\">' + o.timeOnlyTitle + '</div>' + '</div>');\n $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();\n }\n\n // add sliders, adjust grids, add events\n for (i = 0, l = tp_inst.units.length; i < l; i++) {\n litem = tp_inst.units[i];\n uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1);\n show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem];\n\n // add the slider\n tp_inst[litem + '_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_' + litem + '_slider'), litem, tp_inst[litem], o[litem + 'Min'], max[litem], o['step' + uitem]);\n\n // adjust the grid and add click event\n if (show && o[litem + 'Grid'] > 0) {\n size = 100 * gridSize[litem] * o[litem + 'Grid'] / (max[litem] - o[litem + 'Min']);\n $tp.find('.ui_tpicker_' + litem + ' table').css({\n width: size + \"%\",\n marginLeft: o.isRTL ? '0' : ((size / (-2 * gridSize[litem])) + \"%\"),\n marginRight: o.isRTL ? ((size / (-2 * gridSize[litem])) + \"%\") : '0',\n borderCollapse: 'collapse'\n }).find(\"td\").click(function (e) {\n var $t = $(this),\n h = $t.html(),\n n = parseInt(h.replace(/[^0-9]/g), 10),\n ap = h.replace(/[^apm]/ig),\n f = $t.data('for'); // loses scope, so we use data-for\n\n if (f === 'hour') {\n if (ap.indexOf('p') !== -1 && n < 12) {\n n += 12;\n }\n else {\n if (ap.indexOf('a') !== -1 && n === 12) {\n n = 0;\n }\n }\n }\n\n tp_inst.control.value(tp_inst, tp_inst[f + '_slider'], litem, n);\n\n tp_inst._onTimeChange();\n tp_inst._onSelectHandler();\n }).css({\n cursor: 'pointer',\n width: (100 / gridSize[litem]) + '%',\n textAlign: 'center',\n overflow: 'hidden'\n });\n } // end if grid > 0\n } // end for loop\n\n // Add timezone options\n this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find(\"select\");\n $.fn.append.apply(this.timezone_select,\n $.map(o.timezoneList, function (val, idx) {\n return $(\"<option />\").val(typeof val === \"object\" ? val.value : val).text(typeof val === \"object\" ? val.label : val);\n }));\n if (typeof(this.timezone) !== \"undefined\" && this.timezone !== null && this.timezone !== \"\") {\n var local_timezone = (new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset() * -1;\n if (local_timezone === this.timezone) {\n selectLocalTimezone(tp_inst);\n } else {\n this.timezone_select.val(this.timezone);\n }\n } else {\n if (typeof(this.hour) !== \"undefined\" && this.hour !== null && this.hour !== \"\") {\n this.timezone_select.val(o.timezone);\n } else {\n selectLocalTimezone(tp_inst);\n }\n }\n this.timezone_select.change(function () {\n tp_inst._onTimeChange();\n tp_inst._onSelectHandler();\n tp_inst._afterInject();\n });\n // End timezone options\n\n // inject timepicker into datepicker\n var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');\n if ($buttonPanel.length) {\n $buttonPanel.before($tp);\n } else {\n $dp.append($tp);\n }\n\n this.$timeObj = $tp.find('.ui_tpicker_time_input');\n this.$timeObj.change(function () {\n var timeFormat = tp_inst.inst.settings.timeFormat;\n var parsedTime = $.datepicker.parseTime(timeFormat, this.value);\n var update = new Date();\n if (parsedTime) {\n update.setHours(parsedTime.hour);\n update.setMinutes(parsedTime.minute);\n update.setSeconds(parsedTime.second);\n $.datepicker._setTime(tp_inst.inst, update);\n } else {\n this.value = tp_inst.formattedTime;\n this.blur();\n }\n });\n\n if (this.inst !== null) {\n var timeDefined = this.timeDefined;\n this._onTimeChange();\n this.timeDefined = timeDefined;\n }\n\n // slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/\n if (this._defaults.addSliderAccess) {\n var sliderAccessArgs = this._defaults.sliderAccessArgs,\n rtl = this._defaults.isRTL;\n sliderAccessArgs.isRTL = rtl;\n\n setTimeout(function () { // fix for inline mode\n if ($tp.find('.ui-slider-access').length === 0) {\n $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);\n\n // fix any grids since sliders are shorter\n var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);\n if (sliderAccessWidth) {\n $tp.find('table:visible').each(function () {\n var $g = $(this),\n oldWidth = $g.outerWidth(),\n oldMarginLeft = $g.css(rtl ? 'marginRight' : 'marginLeft').toString().replace('%', ''),\n newWidth = oldWidth - sliderAccessWidth,\n newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%',\n css = { width: newWidth, marginRight: 0, marginLeft: 0 };\n css[rtl ? 'marginRight' : 'marginLeft'] = newMarginLeft;\n $g.css(css);\n });\n }\n }\n }, 10);\n }\n // end slideAccess integration\n\n tp_inst._limitMinMaxDateTime(this.inst, true);\n }\n },\n\n /*\n * This function tries to limit the ability to go outside the\n * min/max date range\n */\n _limitMinMaxDateTime: function (dp_inst, adjustSliders) {\n var o = this._defaults,\n dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);\n\n if (!this._defaults.showTimepicker) {\n return;\n } // No time so nothing to check here\n\n if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) {\n var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),\n minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);\n\n if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) {\n this.hourMinOriginal = o.hourMin;\n this.minuteMinOriginal = o.minuteMin;\n this.secondMinOriginal = o.secondMin;\n this.millisecMinOriginal = o.millisecMin;\n this.microsecMinOriginal = o.microsecMin;\n }\n\n if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() === dp_date.getTime()) {\n this._defaults.hourMin = minDateTime.getHours();\n if (this.hour <= this._defaults.hourMin) {\n this.hour = this._defaults.hourMin;\n this._defaults.minuteMin = minDateTime.getMinutes();\n if (this.minute <= this._defaults.minuteMin) {\n this.minute = this._defaults.minuteMin;\n this._defaults.secondMin = minDateTime.getSeconds();\n if (this.second <= this._defaults.secondMin) {\n this.second = this._defaults.secondMin;\n this._defaults.millisecMin = minDateTime.getMilliseconds();\n if (this.millisec <= this._defaults.millisecMin) {\n this.millisec = this._defaults.millisecMin;\n this._defaults.microsecMin = minDateTime.getMicroseconds();\n } else {\n if (this.microsec < this._defaults.microsecMin) {\n this.microsec = this._defaults.microsecMin;\n }\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n } else {\n this._defaults.millisecMin = this.millisecMinOriginal;\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n } else {\n this._defaults.secondMin = this.secondMinOriginal;\n this._defaults.millisecMin = this.millisecMinOriginal;\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n } else {\n this._defaults.minuteMin = this.minuteMinOriginal;\n this._defaults.secondMin = this.secondMinOriginal;\n this._defaults.millisecMin = this.millisecMinOriginal;\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n } else {\n this._defaults.hourMin = this.hourMinOriginal;\n this._defaults.minuteMin = this.minuteMinOriginal;\n this._defaults.secondMin = this.secondMinOriginal;\n this._defaults.millisecMin = this.millisecMinOriginal;\n this._defaults.microsecMin = this.microsecMinOriginal;\n }\n }\n\n if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) {\n var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),\n maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);\n\n if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) {\n this.hourMaxOriginal = o.hourMax;\n this.minuteMaxOriginal = o.minuteMax;\n this.secondMaxOriginal = o.secondMax;\n this.millisecMaxOriginal = o.millisecMax;\n this.microsecMaxOriginal = o.microsecMax;\n }\n\n if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() === dp_date.getTime()) {\n this._defaults.hourMax = maxDateTime.getHours();\n if (this.hour >= this._defaults.hourMax) {\n this.hour = this._defaults.hourMax;\n this._defaults.minuteMax = maxDateTime.getMinutes();\n if (this.minute >= this._defaults.minuteMax) {\n this.minute = this._defaults.minuteMax;\n this._defaults.secondMax = maxDateTime.getSeconds();\n if (this.second >= this._defaults.secondMax) {\n this.second = this._defaults.secondMax;\n this._defaults.millisecMax = maxDateTime.getMilliseconds();\n if (this.millisec >= this._defaults.millisecMax) {\n this.millisec = this._defaults.millisecMax;\n this._defaults.microsecMax = maxDateTime.getMicroseconds();\n } else {\n if (this.microsec > this._defaults.microsecMax) {\n this.microsec = this._defaults.microsecMax;\n }\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n } else {\n this._defaults.millisecMax = this.millisecMaxOriginal;\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n } else {\n this._defaults.secondMax = this.secondMaxOriginal;\n this._defaults.millisecMax = this.millisecMaxOriginal;\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n } else {\n this._defaults.minuteMax = this.minuteMaxOriginal;\n this._defaults.secondMax = this.secondMaxOriginal;\n this._defaults.millisecMax = this.millisecMaxOriginal;\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n } else {\n this._defaults.hourMax = this.hourMaxOriginal;\n this._defaults.minuteMax = this.minuteMaxOriginal;\n this._defaults.secondMax = this.secondMaxOriginal;\n this._defaults.millisecMax = this.millisecMaxOriginal;\n this._defaults.microsecMax = this.microsecMaxOriginal;\n }\n }\n\n if (dp_inst.settings.minTime!==null) {\n var tempMinTime=new Date(\"01/01/1970 \" + dp_inst.settings.minTime);\n if (this.hour<tempMinTime.getHours()) {\n this.hour=this._defaults.hourMin=tempMinTime.getHours();\n this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();\n } else if (this.hour===tempMinTime.getHours() && this.minute<tempMinTime.getMinutes()) {\n this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();\n } else {\n if (this._defaults.hourMin<tempMinTime.getHours()) {\n this._defaults.hourMin=tempMinTime.getHours();\n this._defaults.minuteMin=tempMinTime.getMinutes();\n } else if (this._defaults.hourMin===tempMinTime.getHours()===this.hour && this._defaults.minuteMin<tempMinTime.getMinutes()) {\n this._defaults.minuteMin=tempMinTime.getMinutes();\n } else {\n this._defaults.minuteMin=0;\n }\n }\n }\n\n if (dp_inst.settings.maxTime!==null) {\n var tempMaxTime=new Date(\"01/01/1970 \" + dp_inst.settings.maxTime);\n if (this.hour>tempMaxTime.getHours()) {\n this.hour=this._defaults.hourMax=tempMaxTime.getHours();\n this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();\n } else if (this.hour===tempMaxTime.getHours() && this.minute>tempMaxTime.getMinutes()) {\n this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();\n } else {\n if (this._defaults.hourMax>tempMaxTime.getHours()) {\n this._defaults.hourMax=tempMaxTime.getHours();\n this._defaults.minuteMax=tempMaxTime.getMinutes();\n } else if (this._defaults.hourMax===tempMaxTime.getHours()===this.hour && this._defaults.minuteMax>tempMaxTime.getMinutes()) {\n this._defaults.minuteMax=tempMaxTime.getMinutes();\n } else {\n this._defaults.minuteMax=59;\n }\n }\n }\n\n if (adjustSliders !== undefined && adjustSliders === true) {\n var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),\n minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),\n secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),\n millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10),\n microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10);\n\n if (this.hour_slider) {\n this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax, step: this._defaults.stepHour });\n this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour));\n }\n if (this.minute_slider) {\n this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax, step: this._defaults.stepMinute });\n this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute));\n }\n if (this.second_slider) {\n this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax, step: this._defaults.stepSecond });\n this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond));\n }\n if (this.millisec_slider) {\n this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax, step: this._defaults.stepMillisec });\n this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec));\n }\n if (this.microsec_slider) {\n this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax, step: this._defaults.stepMicrosec });\n this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec));\n }\n }\n\n },\n\n /*\n * when a slider moves, set the internal time...\n * on time change is also called when the time is updated in the text field\n */\n _onTimeChange: function () {\n if (!this._defaults.showTimepicker) {\n return;\n }\n var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,\n minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,\n second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,\n millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false,\n microsec = (this.microsec_slider) ? this.control.value(this, this.microsec_slider, 'microsec') : false,\n timezone = (this.timezone_select) ? this.timezone_select.val() : false,\n o = this._defaults,\n pickerTimeFormat = o.pickerTimeFormat || o.timeFormat,\n pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix;\n\n if (typeof(hour) === 'object') {\n hour = false;\n }\n if (typeof(minute) === 'object') {\n minute = false;\n }\n if (typeof(second) === 'object') {\n second = false;\n }\n if (typeof(millisec) === 'object') {\n millisec = false;\n }\n if (typeof(microsec) === 'object') {\n microsec = false;\n }\n if (typeof(timezone) === 'object') {\n timezone = false;\n }\n\n if (hour !== false) {\n hour = parseInt(hour, 10);\n }\n if (minute !== false) {\n minute = parseInt(minute, 10);\n }\n if (second !== false) {\n second = parseInt(second, 10);\n }\n if (millisec !== false) {\n millisec = parseInt(millisec, 10);\n }\n if (microsec !== false) {\n microsec = parseInt(microsec, 10);\n }\n if (timezone !== false) {\n timezone = timezone.toString();\n }\n\n var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];\n\n // If the update was done in the input field, the input field should not be updated.\n // If the update was done using the sliders, update the input field.\n var hasChanged = (\n hour !== parseInt(this.hour,10) || // sliders should all be numeric\n minute !== parseInt(this.minute,10) ||\n second !== parseInt(this.second,10) ||\n millisec !== parseInt(this.millisec,10) ||\n microsec !== parseInt(this.microsec,10) ||\n (this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||\n (this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or \"EST\" format, so use toString()\n );\n\n if (hasChanged) {\n\n if (hour !== false) {\n this.hour = hour;\n }\n if (minute !== false) {\n this.minute = minute;\n }\n if (second !== false) {\n this.second = second;\n }\n if (millisec !== false) {\n this.millisec = millisec;\n }\n if (microsec !== false) {\n this.microsec = microsec;\n }\n if (timezone !== false) {\n this.timezone = timezone;\n }\n\n if (!this.inst) {\n this.inst = $.datepicker._getInst(this.$input[0]);\n }\n\n this._limitMinMaxDateTime(this.inst, true);\n }\n if (this.support.ampm) {\n this.ampm = ampm;\n }\n\n // Updates the time within the timepicker\n this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);\n if (this.$timeObj) {\n if (pickerTimeFormat === o.timeFormat) {\n this.$timeObj.val(this.formattedTime + pickerTimeSuffix);\n }\n else {\n this.$timeObj.val($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);\n }\n if (this.$timeObj[0].setSelectionRange) {\n var sPos = this.$timeObj[0].selectionStart;\n var ePos = this.$timeObj[0].selectionEnd;\n this.$timeObj[0].setSelectionRange(sPos, ePos);\n }\n }\n\n this.timeDefined = true;\n if (hasChanged) {\n this._updateDateTime();\n //this.$input.focus(); // may automatically open the picker on setDate\n }\n },\n\n /*\n * call custom onSelect.\n * bind to sliders slidestop, and grid click.\n */\n _onSelectHandler: function () {\n var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;\n var inputEl = this.$input ? this.$input[0] : null;\n if (onSelect && inputEl) {\n onSelect.apply(inputEl, [this.formattedDateTime, this]);\n }\n },\n\n /*\n * update our input with the new date time..\n */\n _updateDateTime: function (dp_inst) {\n dp_inst = this.inst || dp_inst;\n var dtTmp = (dp_inst.currentYear > 0?\n new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay) :\n new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),\n dt = $.datepicker._daylightSavingAdjust(dtTmp),\n //dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),\n //dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay)),\n dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),\n formatCfg = $.datepicker._getFormatConfig(dp_inst),\n timeAvailable = dt !== null && this.timeDefined;\n this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);\n var formattedDateTime = this.formattedDate;\n\n // if a slider was changed but datepicker doesn't have a value yet, set it\n if (dp_inst.lastVal === \"\") {\n dp_inst.currentYear = dp_inst.selectedYear;\n dp_inst.currentMonth = dp_inst.selectedMonth;\n dp_inst.currentDay = dp_inst.selectedDay;\n }\n\n /*\n * remove following lines to force every changes in date picker to change the input value\n * Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker.\n * If the user manually empty the value in the input field, the date picker will never change selected value.\n */\n //if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) {\n //\treturn;\n //}\n\n if (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === false) {\n formattedDateTime = this.formattedTime;\n } else if ((this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) || (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === true)) {\n formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;\n }\n\n this.formattedDateTime = formattedDateTime;\n\n if (!this._defaults.showTimepicker) {\n this.$input.val(this.formattedDate);\n } else if (this.$altInput && this._defaults.timeOnly === false && this._defaults.altFieldTimeOnly === true) {\n this.$altInput.val(this.formattedTime);\n this.$input.val(this.formattedDate);\n } else if (this.$altInput) {\n this.$input.val(formattedDateTime);\n var altFormattedDateTime = '',\n altSeparator = this._defaults.altSeparator !== null ? this._defaults.altSeparator : this._defaults.separator,\n altTimeSuffix = this._defaults.altTimeSuffix !== null ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;\n\n if (!this._defaults.timeOnly) {\n if (this._defaults.altFormat) {\n altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);\n }\n else {\n altFormattedDateTime = this.formattedDate;\n }\n\n if (altFormattedDateTime) {\n altFormattedDateTime += altSeparator;\n }\n }\n\n if (this._defaults.altTimeFormat !== null) {\n altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix;\n }\n else {\n altFormattedDateTime += this.formattedTime + altTimeSuffix;\n }\n this.$altInput.val(altFormattedDateTime);\n } else {\n this.$input.val(formattedDateTime);\n }\n\n this.$input.trigger(\"change\");\n },\n\n _onFocus: function () {\n if (!this.$input.val() && this._defaults.defaultValue) {\n this.$input.val(this._defaults.defaultValue);\n var inst = $.datepicker._getInst(this.$input.get(0)),\n tp_inst = $.datepicker._get(inst, 'timepicker');\n if (tp_inst) {\n if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {\n try {\n $.datepicker._updateDatepicker(inst);\n } catch (err) {\n $.timepicker.log(err);\n }\n }\n }\n }\n },\n\n /*\n * Small abstraction to control types\n * We can add more, just be sure to follow the pattern: create, options, value\n */\n _controls: {\n // slider methods\n slider: {\n create: function (tp_inst, obj, unit, val, min, max, step) {\n var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60\n return obj.prop('slide', null).slider({\n orientation: \"horizontal\",\n value: rtl ? val * -1 : val,\n min: rtl ? max * -1 : min,\n max: rtl ? min * -1 : max,\n step: step,\n slide: function (event, ui) {\n tp_inst.control.value(tp_inst, $(this), unit, rtl ? ui.value * -1 : ui.value);\n tp_inst._onTimeChange();\n },\n stop: function (event, ui) {\n tp_inst._onSelectHandler();\n }\n });\n },\n options: function (tp_inst, obj, unit, opts, val) {\n if (tp_inst._defaults.isRTL) {\n if (typeof(opts) === 'string') {\n if (opts === 'min' || opts === 'max') {\n if (val !== undefined) {\n return obj.slider(opts, val * -1);\n }\n return Math.abs(obj.slider(opts));\n }\n return obj.slider(opts);\n }\n var min = opts.min,\n max = opts.max;\n opts.min = opts.max = null;\n if (min !== undefined) {\n opts.max = min * -1;\n }\n if (max !== undefined) {\n opts.min = max * -1;\n }\n return obj.slider(opts);\n }\n if (typeof(opts) === 'string' && val !== undefined) {\n return obj.slider(opts, val);\n }\n return obj.slider(opts);\n },\n value: function (tp_inst, obj, unit, val) {\n if (tp_inst._defaults.isRTL) {\n if (val !== undefined) {\n return obj.slider('value', val * -1);\n }\n return Math.abs(obj.slider('value'));\n }\n if (val !== undefined) {\n return obj.slider('value', val);\n }\n return obj.slider('value');\n }\n },\n // select methods\n select: {\n create: function (tp_inst, obj, unit, val, min, max, step) {\n var sel = '<select class=\"ui-timepicker-select ui-state-default ui-corner-all\" data-unit=\"' + unit + '\" data-min=\"' + min + '\" data-max=\"' + max + '\" data-step=\"' + step + '\">',\n format = tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat;\n\n for (var i = min; i <= max; i += step) {\n sel += '<option value=\"' + i + '\"' + (i === val ? ' selected' : '') + '>';\n if (unit === 'hour') {\n sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig, '')), {hour: i}, tp_inst._defaults);\n }\n else if (unit === 'millisec' || unit === 'microsec' || i >= 10) { sel += i; }\n else {sel += '0' + i.toString(); }\n sel += '</option>';\n }\n sel += '</select>';\n\n obj.children('select').remove();\n\n $(sel).appendTo(obj).change(function (e) {\n tp_inst._onTimeChange();\n tp_inst._onSelectHandler();\n tp_inst._afterInject();\n });\n\n return obj;\n },\n options: function (tp_inst, obj, unit, opts, val) {\n var o = {},\n $t = obj.children('select');\n if (typeof(opts) === 'string') {\n if (val === undefined) {\n return $t.data(opts);\n }\n o[opts] = val;\n }\n else { o = opts; }\n return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min>=0 ? o.min : $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));\n },\n value: function (tp_inst, obj, unit, val) {\n var $t = obj.children('select');\n if (val !== undefined) {\n return $t.val(val);\n }\n return $t.val();\n }\n }\n } // end _controls\n\n });\n\n $.fn.extend({\n /*\n * shorthand just to use timepicker.\n */\n timepicker: function (o) {\n o = o || {};\n var tmp_args = Array.prototype.slice.call(arguments);\n\n if (typeof o === 'object') {\n tmp_args[0] = $.extend(o, {\n timeOnly: true\n });\n }\n\n return $(this).each(function () {\n $.fn.datetimepicker.apply($(this), tmp_args);\n });\n },\n\n /*\n * extend timepicker to datepicker\n */\n datetimepicker: function (o) {\n o = o || {};\n var tmp_args = arguments;\n\n if (typeof(o) === 'string') {\n if (o === 'getDate' || (o === 'option' && tmp_args.length === 2 && typeof (tmp_args[1]) === 'string')) {\n return $.fn.datepicker.apply($(this[0]), tmp_args);\n } else {\n return this.each(function () {\n var $t = $(this);\n $t.datepicker.apply($t, tmp_args);\n });\n }\n } else {\n return this.each(function () {\n var $t = $(this);\n $t.datepicker($.timepicker._newInst($t, o)._defaults);\n });\n }\n }\n });\n\n /*\n * Public Utility to parse date and time\n */\n $.datepicker.parseDateTime = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {\n var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings);\n if (parseRes.timeObj) {\n var t = parseRes.timeObj;\n parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);\n parseRes.date.setMicroseconds(t.microsec);\n }\n\n return parseRes.date;\n };\n\n /*\n * Public utility to parse time\n */\n $.datepicker.parseTime = function (timeFormat, timeString, options) {\n var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}),\n iso8601 = (timeFormat.replace(/\\'.*?\\'/g, '').indexOf('Z') !== -1);\n\n // Strict parse requires the timeString to match the timeFormat exactly\n var strictParse = function (f, s, o) {\n\n // pattern for standard and localized AM/PM markers\n var getPatternAmpm = function (amNames, pmNames) {\n var markers = [];\n if (amNames) {\n $.merge(markers, amNames);\n }\n if (pmNames) {\n $.merge(markers, pmNames);\n }\n markers = $.map(markers, function (val) {\n return val.replace(/[.*+?|()\\[\\]{}\\\\]/g, '\\\\$&');\n });\n return '(' + markers.join('|') + ')?';\n };\n\n // figure out position of time elements.. cause js cant do named captures\n var getFormatPositions = function (timeFormat) {\n var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),\n orders = {\n h: -1,\n m: -1,\n s: -1,\n l: -1,\n c: -1,\n t: -1,\n z: -1\n };\n\n if (finds) {\n for (var i = 0; i < finds.length; i++) {\n if (orders[finds[i].toString().charAt(0)] === -1) {\n orders[finds[i].toString().charAt(0)] = i + 1;\n }\n }\n }\n return orders;\n };\n\n var regstr = '^' + f.toString()\n .replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {\n var ml = match.length;\n switch (match.charAt(0).toLowerCase()) {\n case 'h':\n return ml === 1 ? '(\\\\d?\\\\d)' : '(\\\\d{' + ml + '})';\n case 'm':\n return ml === 1 ? '(\\\\d?\\\\d)' : '(\\\\d{' + ml + '})';\n case 's':\n return ml === 1 ? '(\\\\d?\\\\d)' : '(\\\\d{' + ml + '})';\n case 'l':\n return '(\\\\d?\\\\d?\\\\d)';\n case 'c':\n return '(\\\\d?\\\\d?\\\\d)';\n case 'z':\n return '(z|[-+]\\\\d\\\\d:?\\\\d\\\\d|\\\\S+)?';\n case 't':\n return getPatternAmpm(o.amNames, o.pmNames);\n default: // literal escaped in quotes\n return '(' + match.replace(/\\'/g, \"\").replace(/(\\.|\\$|\\^|\\\\|\\/|\\(|\\)|\\[|\\]|\\?|\\+|\\*)/g, function (m) { return \"\\\\\" + m; }) + ')?';\n }\n })\n .replace(/\\s/g, '\\\\s?') +\n o.timeSuffix + '$',\n order = getFormatPositions(f),\n ampm = '',\n treg;\n\n treg = s.match(new RegExp(regstr, 'i'));\n\n var resTime = {\n hour: 0,\n minute: 0,\n second: 0,\n millisec: 0,\n microsec: 0\n };\n\n if (treg) {\n if (order.t !== -1) {\n if (treg[order.t] === undefined || treg[order.t].length === 0) {\n ampm = '';\n resTime.ampm = '';\n } else {\n ampm = $.inArray(treg[order.t].toUpperCase(), $.map(o.amNames, function (x,i) { return x.toUpperCase(); })) !== -1 ? 'AM' : 'PM';\n resTime.ampm = o[ampm === 'AM' ? 'amNames' : 'pmNames'][0];\n }\n }\n\n if (order.h !== -1) {\n if (ampm === 'AM' && treg[order.h] === '12') {\n resTime.hour = 0; // 12am = 0 hour\n } else {\n if (ampm === 'PM' && treg[order.h] !== '12') {\n resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12\n } else {\n resTime.hour = Number(treg[order.h]);\n }\n }\n }\n\n if (order.m !== -1) {\n resTime.minute = Number(treg[order.m]);\n }\n if (order.s !== -1) {\n resTime.second = Number(treg[order.s]);\n }\n if (order.l !== -1) {\n resTime.millisec = Number(treg[order.l]);\n }\n if (order.c !== -1) {\n resTime.microsec = Number(treg[order.c]);\n }\n if (order.z !== -1 && treg[order.z] !== undefined) {\n resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]);\n }\n\n\n return resTime;\n }\n return false;\n };// end strictParse\n\n // First try JS Date, if that fails, use strictParse\n var looseParse = function (f, s, o) {\n try {\n var d = new Date('2012-01-01 ' + s);\n if (isNaN(d.getTime())) {\n d = new Date('2012-01-01T' + s);\n if (isNaN(d.getTime())) {\n d = new Date('01/01/2012 ' + s);\n if (isNaN(d.getTime())) {\n throw \"Unable to parse time with native Date: \" + s;\n }\n }\n }\n\n return {\n hour: d.getHours(),\n minute: d.getMinutes(),\n second: d.getSeconds(),\n millisec: d.getMilliseconds(),\n microsec: d.getMicroseconds(),\n timezone: d.getTimezoneOffset() * -1\n };\n }\n catch (err) {\n try {\n return strictParse(f, s, o);\n }\n catch (err2) {\n $.timepicker.log(\"Unable to parse \\ntimeString: \" + s + \"\\ntimeFormat: \" + f);\n }\n }\n return false;\n }; // end looseParse\n\n if (typeof o.parse === \"function\") {\n return o.parse(timeFormat, timeString, o);\n }\n if (o.parse === 'loose') {\n return looseParse(timeFormat, timeString, o);\n }\n return strictParse(timeFormat, timeString, o);\n };\n\n /**\n * Public utility to format the time\n * @param {string} format format of the time\n * @param {Object} time Object not a Date for timezones\n * @param {Object} [options] essentially the regional[].. amNames, pmNames, ampm\n * @returns {string} the formatted time\n */\n $.datepicker.formatTime = function (format, time, options) {\n options = options || {};\n options = $.extend({}, $.timepicker._defaults, options);\n time = $.extend({\n hour: 0,\n minute: 0,\n second: 0,\n millisec: 0,\n microsec: 0,\n timezone: null\n }, time);\n\n var tmptime = format,\n ampmName = options.amNames[0],\n hour = parseInt(time.hour, 10);\n\n if (hour > 11) {\n ampmName = options.pmNames[0];\n }\n\n tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {\n switch (match) {\n case 'HH':\n return ('0' + hour).slice(-2);\n case 'H':\n return hour;\n case 'hh':\n return ('0' + convert24to12(hour)).slice(-2);\n case 'h':\n return convert24to12(hour);\n case 'mm':\n return ('0' + time.minute).slice(-2);\n case 'm':\n return time.minute;\n case 'ss':\n return ('0' + time.second).slice(-2);\n case 's':\n return time.second;\n case 'l':\n return ('00' + time.millisec).slice(-3);\n case 'c':\n return ('00' + time.microsec).slice(-3);\n case 'z':\n return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, false);\n case 'Z':\n return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, true);\n case 'T':\n return ampmName.charAt(0).toUpperCase();\n case 'TT':\n return ampmName.toUpperCase();\n case 't':\n return ampmName.charAt(0).toLowerCase();\n case 'tt':\n return ampmName.toLowerCase();\n default:\n return match.replace(/'/g, \"\");\n }\n });\n\n return tmptime;\n };\n\n /*\n * the bad hack :/ override datepicker so it doesn't close on select\n // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378\n */\n $.datepicker._base_selectDate = $.datepicker._selectDate;\n $.datepicker._selectDate = function (id, dateStr) {\n var inst = this._getInst($(id)[0]),\n tp_inst = this._get(inst, 'timepicker'),\n was_inline;\n\n if (tp_inst && inst.settings.showTimepicker) {\n tp_inst._limitMinMaxDateTime(inst, true);\n was_inline = inst.inline;\n inst.inline = inst.stay_open = true;\n //This way the onSelect handler called from calendarpicker get the full dateTime\n this._base_selectDate(id, dateStr);\n inst.inline = was_inline;\n inst.stay_open = false;\n this._notifyChange(inst);\n this._updateDatepicker(inst);\n } else {\n this._base_selectDate(id, dateStr);\n }\n };\n\n /*\n * second bad hack :/ override datepicker so it triggers an event when changing the input field\n * and does not redraw the datepicker on every selectDate event\n */\n $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;\n $.datepicker._updateDatepicker = function (inst) {\n\n // don't popup the datepicker if there is another instance already opened\n var input = inst.input[0];\n if ($.datepicker._curInst && $.datepicker._curInst !== inst && $.datepicker._datepickerShowing && $.datepicker._lastInput !== input) {\n return;\n }\n\n if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {\n\n this._base_updateDatepicker(inst);\n\n // Reload the time control when changing something in the input text field.\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n tp_inst._addTimePicker(inst);\n }\n }\n };\n\n /*\n * third bad hack :/ override datepicker so it allows spaces and colon in the input field\n */\n $.datepicker._base_doKeyPress = $.datepicker._doKeyPress;\n $.datepicker._doKeyPress = function (event) {\n var inst = $.datepicker._getInst(event.target),\n tp_inst = $.datepicker._get(inst, 'timepicker');\n\n if (tp_inst) {\n if ($.datepicker._get(inst, 'constrainInput')) {\n var ampm = tp_inst.support.ampm,\n tz = tp_inst._defaults.showTimezone !== null ? tp_inst._defaults.showTimezone : tp_inst.support.timezone,\n dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),\n datetimeChars = tp_inst._defaults.timeFormat.toString()\n .replace(/[hms]/g, '')\n .replace(/TT/g, ampm ? 'APM' : '')\n .replace(/Tt/g, ampm ? 'AaPpMm' : '')\n .replace(/tT/g, ampm ? 'AaPpMm' : '')\n .replace(/T/g, ampm ? 'AP' : '')\n .replace(/tt/g, ampm ? 'apm' : '')\n .replace(/t/g, ampm ? 'ap' : '') +\n \" \" + tp_inst._defaults.separator +\n tp_inst._defaults.timeSuffix +\n (tz ? tp_inst._defaults.timezoneList.join('') : '') +\n (tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +\n dateChars,\n chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);\n return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);\n }\n }\n\n return $.datepicker._base_doKeyPress(event);\n };\n\n /*\n * Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField\n * Update any alternate field to synchronise with the main field.\n */\n $.datepicker._base_updateAlternate = $.datepicker._updateAlternate;\n $.datepicker._updateAlternate = function (inst) {\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n var altField = tp_inst._defaults.altField;\n if (altField) { // update alternate field too\n var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat,\n date = this._getDate(inst),\n formatCfg = $.datepicker._getFormatConfig(inst),\n altFormattedDateTime = '',\n altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,\n altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,\n altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;\n\n altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix;\n if (!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null) {\n if (tp_inst._defaults.altFormat) {\n altFormattedDateTime = $.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) + altSeparator + altFormattedDateTime;\n }\n else {\n altFormattedDateTime = tp_inst.formattedDate + altSeparator + altFormattedDateTime;\n }\n }\n $(altField).val( inst.input.val() ? altFormattedDateTime : \"\");\n }\n }\n else {\n $.datepicker._base_updateAlternate(inst);\n }\n };\n\n /*\n * Override key up event to sync manual input changes.\n */\n $.datepicker._base_doKeyUp = $.datepicker._doKeyUp;\n $.datepicker._doKeyUp = function (event) {\n var inst = $.datepicker._getInst(event.target),\n tp_inst = $.datepicker._get(inst, 'timepicker');\n\n if (tp_inst) {\n if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {\n try {\n $.datepicker._updateDatepicker(inst);\n } catch (err) {\n $.timepicker.log(err);\n }\n }\n }\n\n return $.datepicker._base_doKeyUp(event);\n };\n\n /*\n * override \"Today\" button to also grab the time and set it to input field.\n */\n $.datepicker._base_gotoToday = $.datepicker._gotoToday;\n $.datepicker._gotoToday = function (id) {\n var inst = this._getInst($(id)[0]);\n this._base_gotoToday(id);\n var tp_inst = this._get(inst, 'timepicker');\n if (!tp_inst) {\n return;\n }\n\n var tzoffset = $.timepicker.timezoneOffsetNumber(tp_inst.timezone);\n var now = new Date();\n now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + parseInt(tzoffset, 10));\n this._setTime(inst, now);\n this._setDate(inst, now);\n tp_inst._onSelectHandler();\n };\n\n /*\n * Disable & enable the Time in the datetimepicker\n */\n $.datepicker._disableTimepickerDatepicker = function (target) {\n var inst = this._getInst(target);\n if (!inst) {\n return;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n $(target).datepicker('getDate'); // Init selected[Year|Month|Day]\n if (tp_inst) {\n inst.settings.showTimepicker = false;\n tp_inst._defaults.showTimepicker = false;\n tp_inst._updateDateTime(inst);\n }\n };\n\n $.datepicker._enableTimepickerDatepicker = function (target) {\n var inst = this._getInst(target);\n if (!inst) {\n return;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n $(target).datepicker('getDate'); // Init selected[Year|Month|Day]\n if (tp_inst) {\n inst.settings.showTimepicker = true;\n tp_inst._defaults.showTimepicker = true;\n tp_inst._addTimePicker(inst); // Could be disabled on page load\n tp_inst._updateDateTime(inst);\n }\n };\n\n /*\n * Create our own set time function\n */\n $.datepicker._setTime = function (inst, date) {\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n var defaults = tp_inst._defaults;\n\n // calling _setTime with no date sets time to defaults\n tp_inst.hour = date ? date.getHours() : defaults.hour;\n tp_inst.minute = date ? date.getMinutes() : defaults.minute;\n tp_inst.second = date ? date.getSeconds() : defaults.second;\n tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;\n tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec;\n\n //check if within min/max times..\n tp_inst._limitMinMaxDateTime(inst, true);\n\n tp_inst._onTimeChange();\n tp_inst._updateDateTime(inst);\n }\n };\n\n /*\n * Create new public method to set only time, callable as $().datepicker('setTime', date)\n */\n $.datepicker._setTimeDatepicker = function (target, date, withDate) {\n var inst = this._getInst(target);\n if (!inst) {\n return;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n\n if (tp_inst) {\n this._setDateFromField(inst);\n var tp_date;\n if (date) {\n if (typeof date === \"string\") {\n tp_inst._parseTime(date, withDate);\n tp_date = new Date();\n tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);\n tp_date.setMicroseconds(tp_inst.microsec);\n } else {\n tp_date = new Date(date.getTime());\n tp_date.setMicroseconds(date.getMicroseconds());\n }\n if (tp_date.toString() === 'Invalid Date') {\n tp_date = undefined;\n }\n this._setTime(inst, tp_date);\n }\n }\n\n };\n\n /*\n * override setDate() to allow setting time too within Date object\n */\n $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;\n $.datepicker._setDateDatepicker = function (target, _date) {\n var inst = this._getInst(target);\n var date = _date;\n if (!inst) {\n return;\n }\n\n if (typeof(_date) === 'string') {\n date = new Date(_date);\n if (!date.getTime()) {\n this._base_setDateDatepicker.apply(this, arguments);\n date = $(target).datepicker('getDate');\n }\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n var tp_date;\n if (date instanceof Date) {\n tp_date = new Date(date.getTime());\n tp_date.setMicroseconds(date.getMicroseconds());\n } else {\n tp_date = date;\n }\n\n // This is important if you are using the timezone option, javascript's Date\n // object will only return the timezone offset for the current locale, so we\n // adjust it accordingly. If not using timezone option this won't matter..\n // If a timezone is different in tp, keep the timezone as is\n if (tp_inst && tp_date) {\n // look out for DST if tz wasn't specified\n if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {\n tp_inst.timezone = tp_date.getTimezoneOffset() * -1;\n }\n date = $.timepicker.timezoneAdjust(date, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset()), tp_inst.timezone);\n tp_date = $.timepicker.timezoneAdjust(tp_date, $.timepicker.timezoneOffsetString(-tp_date.getTimezoneOffset()), tp_inst.timezone);\n }\n\n this._updateDatepicker(inst);\n this._base_setDateDatepicker.apply(this, arguments);\n this._setTimeDatepicker(target, tp_date, true);\n };\n\n /*\n * override getDate() to allow getting time too within Date object\n */\n $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;\n $.datepicker._getDateDatepicker = function (target, noDefault) {\n var inst = this._getInst(target);\n if (!inst) {\n return;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n\n if (tp_inst) {\n // if it hasn't yet been defined, grab from field\n if (inst.lastVal === undefined) {\n this._setDateFromField(inst, noDefault);\n }\n\n var date = this._getDate(inst);\n\n var currDT = null;\n\n if (tp_inst.$altInput && tp_inst._defaults.altFieldTimeOnly) {\n currDT = tp_inst.$input.val() + ' ' + tp_inst.$altInput.val();\n }\n else if (tp_inst.$input.get(0).tagName !== 'INPUT' && tp_inst.$altInput) {\n /**\n * in case the datetimepicker has been applied to a non-input tag for inline UI,\n * and the user has not configured the plugin to display only time in altInput,\n * pick current date time from the altInput (and hope for the best, for now, until \"ER1\" is applied)\n *\n * @todo ER1. Since altInput can have a totally difference format, convert it to standard format by reading input format from \"altFormat\" and \"altTimeFormat\" option values\n */\n currDT = tp_inst.$altInput.val();\n }\n else {\n currDT = tp_inst.$input.val();\n }\n\n if (date && tp_inst._parseTime(currDT, !inst.settings.timeOnly)) {\n date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);\n date.setMicroseconds(tp_inst.microsec);\n\n // This is important if you are using the timezone option, javascript's Date\n // object will only return the timezone offset for the current locale, so we\n // adjust it accordingly. If not using timezone option this won't matter..\n if (tp_inst.timezone != null) {\n // look out for DST if tz wasn't specified\n if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {\n tp_inst.timezone = date.getTimezoneOffset() * -1;\n }\n date = $.timepicker.timezoneAdjust(date, tp_inst.timezone, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset()));\n }\n }\n return date;\n }\n return this._base_getDateDatepicker(target, noDefault);\n };\n\n /*\n * override parseDate() because UI 1.8.14 throws an error about \"Extra characters\"\n * An option in datapicker to ignore extra format characters would be nicer.\n */\n $.datepicker._base_parseDate = $.datepicker.parseDate;\n $.datepicker.parseDate = function (format, value, settings) {\n var date;\n try {\n date = this._base_parseDate(format, value, settings);\n } catch (err) {\n // Hack! The error message ends with a colon, a space, and\n // the \"extra\" characters. We rely on that instead of\n // attempting to perfectly reproduce the parsing algorithm.\n if (err.indexOf(\":\") >= 0) {\n date = this._base_parseDate(format, value.substring(0, value.length - (err.length - err.indexOf(':') - 2)), settings);\n $.timepicker.log(\"Error parsing the date string: \" + err + \"\\ndate string = \" + value + \"\\ndate format = \" + format);\n } else {\n throw err;\n }\n }\n return date;\n };\n\n /*\n * override formatDate to set date with time to the input\n */\n $.datepicker._base_formatDate = $.datepicker._formatDate;\n $.datepicker._formatDate = function (inst, day, month, year) {\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n tp_inst._updateDateTime(inst);\n return tp_inst.$input.val();\n }\n return this._base_formatDate(inst);\n };\n\n /*\n * override options setter to add time to maxDate(Time) and minDate(Time). MaxDate\n */\n $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;\n $.datepicker._optionDatepicker = function (target, name, value) {\n var inst = this._getInst(target),\n name_clone;\n if (!inst) {\n return null;\n }\n\n var tp_inst = this._get(inst, 'timepicker');\n if (tp_inst) {\n var min = null,\n max = null,\n onselect = null,\n overrides = tp_inst._defaults.evnts,\n fns = {},\n prop,\n ret,\n oldVal,\n $target;\n if (typeof name === 'string') { // if min/max was set with the string\n if (name === 'minDate' || name === 'minDateTime') {\n min = value;\n } else if (name === 'maxDate' || name === 'maxDateTime') {\n max = value;\n } else if (name === 'onSelect') {\n onselect = value;\n } else if (overrides.hasOwnProperty(name)) {\n if (typeof (value) === 'undefined') {\n return overrides[name];\n }\n fns[name] = value;\n name_clone = {}; //empty results in exiting function after overrides updated\n }\n } else if (typeof name === 'object') { //if min/max was set with the JSON\n if (name.minDate) {\n min = name.minDate;\n } else if (name.minDateTime) {\n min = name.minDateTime;\n } else if (name.maxDate) {\n max = name.maxDate;\n } else if (name.maxDateTime) {\n max = name.maxDateTime;\n }\n for (prop in overrides) {\n if (overrides.hasOwnProperty(prop) && name[prop]) {\n fns[prop] = name[prop];\n }\n }\n }\n for (prop in fns) {\n if (fns.hasOwnProperty(prop)) {\n overrides[prop] = fns[prop];\n if (!name_clone) { name_clone = $.extend({}, name); }\n delete name_clone[prop];\n }\n }\n if (name_clone && isEmptyObject(name_clone)) { return; }\n if (min) { //if min was set\n if (min === 0) {\n min = new Date();\n } else {\n min = new Date(min);\n }\n tp_inst._defaults.minDate = min;\n tp_inst._defaults.minDateTime = min;\n } else if (max) { //if max was set\n if (max === 0) {\n max = new Date();\n } else {\n max = new Date(max);\n }\n tp_inst._defaults.maxDate = max;\n tp_inst._defaults.maxDateTime = max;\n } else if (onselect) {\n tp_inst._defaults.onSelect = onselect;\n }\n\n // Datepicker will override our date when we call _base_optionDatepicker when\n // calling minDate/maxDate, so we will first grab the value, call\n // _base_optionDatepicker, then set our value back.\n if(min || max){\n $target = $(target);\n oldVal = $target.datetimepicker('getDate');\n ret = this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);\n $target.datetimepicker('setDate', oldVal);\n return ret;\n }\n }\n if (value === undefined) {\n return this._base_optionDatepicker.call($.datepicker, target, name);\n }\n return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);\n };\n\n /*\n * jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype,\n * it will return false for all objects\n */\n var isEmptyObject = function (obj) {\n var prop;\n for (prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n return true;\n };\n\n /*\n * jQuery extend now ignores nulls!\n */\n var extendRemove = function (target, props) {\n $.extend(target, props);\n for (var name in props) {\n if (props[name] === null || props[name] === undefined) {\n target[name] = props[name];\n }\n }\n return target;\n };\n\n /*\n * Determine by the time format which units are supported\n * Returns an object of booleans for each unit\n */\n var detectSupport = function (timeFormat) {\n var tf = timeFormat.replace(/'.*?'/g, '').toLowerCase(), // removes literals\n isIn = function (f, t) { // does the format contain the token?\n return f.indexOf(t) !== -1 ? true : false;\n };\n return {\n hour: isIn(tf, 'h'),\n minute: isIn(tf, 'm'),\n second: isIn(tf, 's'),\n millisec: isIn(tf, 'l'),\n microsec: isIn(tf, 'c'),\n timezone: isIn(tf, 'z'),\n ampm: isIn(tf, 't') && isIn(timeFormat, 'h'),\n iso8601: isIn(timeFormat, 'Z')\n };\n };\n\n /*\n * Converts 24 hour format into 12 hour\n * Returns 12 hour without leading 0\n */\n var convert24to12 = function (hour) {\n hour %= 12;\n\n if (hour === 0) {\n hour = 12;\n }\n\n return String(hour);\n };\n\n var computeEffectiveSetting = function (settings, property) {\n return settings && settings[property] ? settings[property] : $.timepicker._defaults[property];\n };\n\n /*\n * Splits datetime string into date and time substrings.\n * Throws exception when date can't be parsed\n * Returns {dateString: dateString, timeString: timeString}\n */\n var splitDateTime = function (dateTimeString, timeSettings) {\n // The idea is to get the number separator occurrences in datetime and the time format requested (since time has\n // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split.\n var separator = computeEffectiveSetting(timeSettings, 'separator'),\n format = computeEffectiveSetting(timeSettings, 'timeFormat'),\n timeParts = format.split(separator), // how many occurrences of separator may be in our format?\n timePartsLen = timeParts.length,\n allParts = dateTimeString.split(separator),\n allPartsLen = allParts.length;\n\n if (allPartsLen > 1) {\n return {\n dateString: allParts.splice(0, allPartsLen - timePartsLen).join(separator),\n timeString: allParts.splice(0, timePartsLen).join(separator)\n };\n }\n\n return {\n dateString: dateTimeString,\n timeString: ''\n };\n };\n\n /*\n * Internal function to parse datetime interval\n * Returns: {date: Date, timeObj: Object}, where\n * date - parsed date without time (type Date)\n * timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional\n */\n var parseDateTimeInternal = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {\n var date,\n parts,\n parsedTime;\n\n parts = splitDateTime(dateTimeString, timeSettings);\n date = $.datepicker._base_parseDate(dateFormat, parts.dateString, dateSettings);\n\n if (parts.timeString === '') {\n return {\n date: date\n };\n }\n\n parsedTime = $.datepicker.parseTime(timeFormat, parts.timeString, timeSettings);\n\n if (!parsedTime) {\n throw 'Wrong time format';\n }\n\n return {\n date: date,\n timeObj: parsedTime\n };\n };\n\n /*\n * Internal function to set timezone_select to the local timezone\n */\n var selectLocalTimezone = function (tp_inst, date) {\n if (tp_inst && tp_inst.timezone_select) {\n var now = date || new Date();\n tp_inst.timezone_select.val(-now.getTimezoneOffset());\n }\n };\n\n /*\n * Create a Singleton Instance\n */\n $.timepicker = new Timepicker();\n\n /**\n * Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5)\n * @param {number} tzMinutes if not a number, less than -720 (-1200), or greater than 840 (+1400) this value is returned\n * @param {boolean} iso8601 if true formats in accordance to iso8601 \"+12:45\"\n * @return {string}\n */\n $.timepicker.timezoneOffsetString = function (tzMinutes, iso8601) {\n if (isNaN(tzMinutes) || tzMinutes > 840 || tzMinutes < -720) {\n return tzMinutes;\n }\n\n var off = tzMinutes,\n minutes = off % 60,\n hours = (off - minutes) / 60,\n iso = iso8601 ? ':' : '',\n tz = (off >= 0 ? '+' : '-') + ('0' + Math.abs(hours)).slice(-2) + iso + ('0' + Math.abs(minutes)).slice(-2);\n\n if (tz === '+00:00') {\n return 'Z';\n }\n return tz;\n };\n\n /**\n * Get the number in minutes that represents a timezone string\n * @param {string} tzString formatted like \"+0500\", \"-1245\", \"Z\"\n * @return {number} the offset minutes or the original string if it doesn't match expectations\n */\n $.timepicker.timezoneOffsetNumber = function (tzString) {\n var normalized = tzString.toString().replace(':', ''); // excuse any iso8601, end up with \"+1245\"\n\n if (normalized.toUpperCase() === 'Z') { // if iso8601 with Z, its 0 minute offset\n return 0;\n }\n\n if (!/^(\\-|\\+)\\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back\n return parseInt(tzString, 10);\n }\n\n return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or minus\n ((parseInt(normalized.substr(1, 2), 10) * 60) + // hours (converted to minutes)\n parseInt(normalized.substr(3, 2), 10))); // minutes\n };\n\n /**\n * No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate)\n * @param {Date} date\n * @param {string} fromTimezone formatted like \"+0500\", \"-1245\"\n * @param {string} toTimezone formatted like \"+0500\", \"-1245\"\n * @return {Date}\n */\n $.timepicker.timezoneAdjust = function (date, fromTimezone, toTimezone) {\n var fromTz = $.timepicker.timezoneOffsetNumber(fromTimezone);\n var toTz = $.timepicker.timezoneOffsetNumber(toTimezone);\n if (!isNaN(toTz)) {\n date.setMinutes(date.getMinutes() + (-fromTz) - (-toTz));\n }\n return date;\n };\n\n /**\n * Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to\n * enforce date range limits.\n * n.b. The input value must be correctly formatted (reformatting is not supported)\n * @param {Element} startTime\n * @param {Element} endTime\n * @param {Object} options Options for the timepicker() call\n * @return {jQuery}\n */\n $.timepicker.timeRange = function (startTime, endTime, options) {\n return $.timepicker.handleRange('timepicker', startTime, endTime, options);\n };\n\n /**\n * Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to\n * enforce date range limits.\n * @param {Element} startTime\n * @param {Element} endTime\n * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`,\n * a boolean value that can be used to reformat the input values to the `dateFormat`.\n * @param {string} method Can be used to specify the type of picker to be added\n * @return {jQuery}\n */\n $.timepicker.datetimeRange = function (startTime, endTime, options) {\n $.timepicker.handleRange('datetimepicker', startTime, endTime, options);\n };\n\n /**\n * Calls `datepicker` on the `startTime` and `endTime` elements, and configures them to\n * enforce date range limits.\n * @param {Element} startTime\n * @param {Element} endTime\n * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`,\n * a boolean value that can be used to reformat the input values to the `dateFormat`.\n * @return {jQuery}\n */\n $.timepicker.dateRange = function (startTime, endTime, options) {\n $.timepicker.handleRange('datepicker', startTime, endTime, options);\n };\n\n /**\n * Calls `method` on the `startTime` and `endTime` elements, and configures them to\n * enforce date range limits.\n * @param {string} method Can be used to specify the type of picker to be added\n * @param {Element} startTime\n * @param {Element} endTime\n * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`,\n * a boolean value that can be used to reformat the input values to the `dateFormat`.\n * @return {jQuery}\n */\n $.timepicker.handleRange = function (method, startTime, endTime, options) {\n options = $.extend({}, {\n minInterval: 0, // min allowed interval in milliseconds\n maxInterval: 0, // max allowed interval in milliseconds\n start: {}, // options for start picker\n end: {} // options for end picker\n }, options);\n\n // for the mean time this fixes an issue with calling getDate with timepicker()\n var timeOnly = false;\n if(method === 'timepicker'){\n timeOnly = true;\n method = 'datetimepicker';\n }\n\n function checkDates(changed, other) {\n var startdt = startTime[method]('getDate'),\n enddt = endTime[method]('getDate'),\n changeddt = changed[method]('getDate');\n\n if (startdt !== null) {\n var minDate = new Date(startdt.getTime()),\n maxDate = new Date(startdt.getTime());\n\n minDate.setMilliseconds(minDate.getMilliseconds() + options.minInterval);\n maxDate.setMilliseconds(maxDate.getMilliseconds() + options.maxInterval);\n\n if (options.minInterval > 0 && minDate > enddt) { // minInterval check\n endTime[method]('setDate', minDate);\n }\n else if (options.maxInterval > 0 && maxDate < enddt) { // max interval check\n endTime[method]('setDate', maxDate);\n }\n else if (startdt > enddt) {\n other[method]('setDate', changeddt);\n }\n }\n }\n\n function selected(changed, other, option) {\n if (!changed.val()) {\n return;\n }\n var date = changed[method].call(changed, 'getDate');\n if (date !== null && options.minInterval > 0) {\n if (option === 'minDate') {\n date.setMilliseconds(date.getMilliseconds() + options.minInterval);\n }\n if (option === 'maxDate') {\n date.setMilliseconds(date.getMilliseconds() - options.minInterval);\n }\n }\n\n if (date.getTime) {\n other[method].call(other, 'option', option, date);\n }\n }\n\n $.fn[method].call(startTime, $.extend({\n timeOnly: timeOnly,\n onClose: function (dateText, inst) {\n checkDates($(this), endTime);\n },\n onSelect: function (selectedDateTime) {\n selected($(this), endTime, 'minDate');\n }\n }, options, options.start));\n $.fn[method].call(endTime, $.extend({\n timeOnly: timeOnly,\n onClose: function (dateText, inst) {\n checkDates($(this), startTime);\n },\n onSelect: function (selectedDateTime) {\n selected($(this), startTime, 'maxDate');\n }\n }, options, options.end));\n\n checkDates(startTime, endTime);\n\n selected(startTime, endTime, 'minDate');\n selected(endTime, startTime, 'maxDate');\n\n return $([startTime.get(0), endTime.get(0)]);\n };\n\n /**\n * Log error or data to the console during error or debugging\n * @param {Object} err pass any type object to log to the console during error or debugging\n * @return {void}\n */\n $.timepicker.log = function () {\n // Older IE (9, maybe 10) throw error on accessing `window.console.log.apply`, so check first.\n if (window.console && window.console.log && window.console.log.apply) {\n window.console.log.apply(window.console, Array.prototype.slice.call(arguments));\n }\n };\n\n /*\n * Add util object to allow access to private methods for testability.\n */\n $.timepicker._util = {\n _extendRemove: extendRemove,\n _isEmptyObject: isEmptyObject,\n _convert24to12: convert24to12,\n _detectSupport: detectSupport,\n _selectLocalTimezone: selectLocalTimezone,\n _computeEffectiveSetting: computeEffectiveSetting,\n _splitDateTime: splitDateTime,\n _parseDateTimeInternal: parseDateTimeInternal\n };\n\n /*\n * Microsecond support\n */\n if (!Date.prototype.getMicroseconds) {\n Date.prototype.microseconds = 0;\n Date.prototype.getMicroseconds = function () { return this.microseconds; };\n Date.prototype.setMicroseconds = function (m) {\n this.setMilliseconds(this.getMilliseconds() + Math.floor(m / 1000));\n this.microseconds = m % 1000;\n return this;\n };\n }\n\n /*\n * Keep up with the version\n */\n $.timepicker.version = \"1.6.3\";\n\n}));\n","jquery/ui-modules/form.js":"( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// Support: IE8 Only\n// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop\n// with a string, so we need to find the proper form.\nreturn $.fn._form = function() {\n\treturn typeof this[ 0 ].form === \"string\" ? this.closest( \"form\" ) : $( this[ 0 ].form );\n};\n\n} );\n","jquery/ui-modules/scroll-parent.js":"/*!\n * jQuery UI Scroll Parent 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: scrollParent\n//>>group: Core\n//>>description: Get the closest ancestor element that is scrollable.\n//>>docs: http://api.jqueryui.com/scrollParent/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.scrollParent = function( includeHidden ) {\n\tvar position = this.css( \"position\" ),\n\t\texcludeStaticParent = position === \"absolute\",\n\t\toverflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,\n\t\tscrollParent = this.parents().filter( function() {\n\t\t\tvar parent = $( this );\n\t\t\tif ( excludeStaticParent && parent.css( \"position\" ) === \"static\" ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn overflowRegex.test( parent.css( \"overflow\" ) + parent.css( \"overflow-y\" ) +\n\t\t\t\tparent.css( \"overflow-x\" ) );\n\t\t} ).eq( 0 );\n\n\treturn position === \"fixed\" || !scrollParent.length ?\n\t\t$( this[ 0 ].ownerDocument || document ) :\n\t\tscrollParent;\n};\n\n} );\n","jquery/ui-modules/data.js":"/*!\n * jQuery UI :data 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :data Selector\n//>>group: Core\n//>>description: Selects elements which have data stored under the specified key.\n//>>docs: http://api.jqueryui.com/data-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.extend( $.expr.pseudos, {\n\tdata: $.expr.createPseudo ?\n\t\t$.expr.createPseudo( function( dataName ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn !!$.data( elem, dataName );\n\t\t\t};\n\t\t} ) :\n\n\t\t// Support: jQuery <1.8\n\t\tfunction( elem, i, match ) {\n\t\t\treturn !!$.data( elem, match[ 3 ] );\n\t\t}\n} );\n} );\n","jquery/ui-modules/keycode.js":"/*!\n * jQuery UI Keycode 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Keycode\n//>>group: Core\n//>>description: Provide keycodes as keynames\n//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.ui.keyCode = {\n\tBACKSPACE: 8,\n\tCOMMA: 188,\n\tDELETE: 46,\n\tDOWN: 40,\n\tEND: 35,\n\tENTER: 13,\n\tESCAPE: 27,\n\tHOME: 36,\n\tLEFT: 37,\n\tPAGE_DOWN: 34,\n\tPAGE_UP: 33,\n\tPERIOD: 190,\n\tRIGHT: 39,\n\tSPACE: 32,\n\tTAB: 9,\n\tUP: 38\n};\n\n} );\n","jquery/ui-modules/form-reset-mixin.js":"/*!\n * jQuery UI Form Reset Mixin 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Form Reset Mixin\n//>>group: Core\n//>>description: Refresh input widgets when their form is reset\n//>>docs: http://api.jqueryui.com/form-reset-mixin/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"./form\",\n\t\t\t\"./version\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.ui.formResetMixin = {\n\t_formResetHandler: function() {\n\t\tvar form = $( this );\n\n\t\t// Wait for the form reset to actually happen before refreshing\n\t\tsetTimeout( function() {\n\t\t\tvar instances = form.data( \"ui-form-reset-instances\" );\n\t\t\t$.each( instances, function() {\n\t\t\t\tthis.refresh();\n\t\t\t} );\n\t\t} );\n\t},\n\n\t_bindFormResetHandler: function() {\n\t\tthis.form = this.element._form();\n\t\tif ( !this.form.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar instances = this.form.data( \"ui-form-reset-instances\" ) || [];\n\t\tif ( !instances.length ) {\n\n\t\t\t// We don't use _on() here because we use a single event handler per form\n\t\t\tthis.form.on( \"reset.ui-form-reset\", this._formResetHandler );\n\t\t}\n\t\tinstances.push( this );\n\t\tthis.form.data( \"ui-form-reset-instances\", instances );\n\t},\n\n\t_unbindFormResetHandler: function() {\n\t\tif ( !this.form.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar instances = this.form.data( \"ui-form-reset-instances\" );\n\t\tinstances.splice( $.inArray( this, instances ), 1 );\n\t\tif ( instances.length ) {\n\t\t\tthis.form.data( \"ui-form-reset-instances\", instances );\n\t\t} else {\n\t\t\tthis.form\n\t\t\t\t.removeData( \"ui-form-reset-instances\" )\n\t\t\t\t.off( \"reset.ui-form-reset\" );\n\t\t}\n\t}\n};\n\n} );\n","jquery/ui-modules/labels.js":"/*!\n * jQuery UI Labels 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: labels\n//>>group: Core\n//>>description: Find all the labels associated with a given input\n//>>docs: http://api.jqueryui.com/labels/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.labels = function() {\n\tvar ancestor, selector, id, labels, ancestors;\n\n\tif ( !this.length ) {\n\t\treturn this.pushStack( [] );\n\t}\n\n\t// Check control.labels first\n\tif ( this[ 0 ].labels && this[ 0 ].labels.length ) {\n\t\treturn this.pushStack( this[ 0 ].labels );\n\t}\n\n\t// Support: IE <= 11, FF <= 37, Android <= 2.3 only\n\t// Above browsers do not support control.labels. Everything below is to support them\n\t// as well as document fragments. control.labels does not work on document fragments\n\tlabels = this.eq( 0 ).parents( \"label\" );\n\n\t// Look for the label based on the id\n\tid = this.attr( \"id\" );\n\tif ( id ) {\n\n\t\t// We don't search against the document in case the element\n\t\t// is disconnected from the DOM\n\t\tancestor = this.eq( 0 ).parents().last();\n\n\t\t// Get a full set of top level ancestors\n\t\tancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );\n\n\t\t// Create a selector for the label based on the id\n\t\tselector = \"label[for='\" + $.escapeSelector( id ) + \"']\";\n\n\t\tlabels = labels.add( ancestors.find( selector ).addBack( selector ) );\n\n\t}\n\n\t// Return whatever we have found for labels\n\treturn this.pushStack( labels );\n};\n\n} );\n","jquery/ui-modules/ie.js":"( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// This file is deprecated\nreturn $.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n} );\n","jquery/ui-modules/tabbable.js":"/*!\n * jQuery UI Tabbable 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :tabbable Selector\n//>>group: Core\n//>>description: Selects elements which can be tabbed to.\n//>>docs: http://api.jqueryui.com/tabbable-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\", \"./focusable\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.extend( $.expr.pseudos, {\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\thasTabindex = tabIndex != null;\n\t\treturn ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );\n\t}\n} );\n\n} );\n","jquery/ui-modules/safe-blur.js":"( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.ui.safeBlur = function( element ) {\n\n\t// Support: IE9 - 10 only\n\t// If the <body> is blurred, IE will switch windows, see #9420\n\tif ( element && element.nodeName.toLowerCase() !== \"body\" ) {\n\t\t$( element ).trigger( \"blur\" );\n\t}\n};\n\n} );\n","jquery/ui-modules/version.js":"( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.ui = $.ui || {};\n\nreturn $.ui.version = \"1.13.1\";\n\n} );\n","jquery/ui-modules/unique-id.js":"/*!\n * jQuery UI Unique ID 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: uniqueId\n//>>group: Core\n//>>description: Functions to generate and remove uniqueId's\n//>>docs: http://api.jqueryui.com/uniqueId/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.extend( {\n\tuniqueId: ( function() {\n\t\tvar uuid = 0;\n\n\t\treturn function() {\n\t\t\treturn this.each( function() {\n\t\t\t\tif ( !this.id ) {\n\t\t\t\t\tthis.id = \"ui-id-\" + ( ++uuid );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tremoveUniqueId: function() {\n\t\treturn this.each( function() {\n\t\t\tif ( /^ui-id-\\d+$/.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n} );\n","jquery/ui-modules/focusable.js":"/*!\n * jQuery UI Focusable 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :focusable Selector\n//>>group: Core\n//>>description: Selects elements which can be focused.\n//>>docs: http://api.jqueryui.com/focusable-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// Selectors\n$.ui.focusable = function( element, hasTabindex ) {\n\tvar map, mapName, img, focusableIfVisible, fieldset,\n\t\tnodeName = element.nodeName.toLowerCase();\n\n\tif ( \"area\" === nodeName ) {\n\t\tmap = element.parentNode;\n\t\tmapName = map.name;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap='#\" + mapName + \"']\" );\n\t\treturn img.length > 0 && img.is( \":visible\" );\n\t}\n\n\tif ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {\n\t\tfocusableIfVisible = !element.disabled;\n\n\t\tif ( focusableIfVisible ) {\n\n\t\t\t// Form controls within a disabled fieldset are disabled.\n\t\t\t// However, controls within the fieldset's legend do not get disabled.\n\t\t\t// Since controls generally aren't placed inside legends, we skip\n\t\t\t// this portion of the check.\n\t\t\tfieldset = $( element ).closest( \"fieldset\" )[ 0 ];\n\t\t\tif ( fieldset ) {\n\t\t\t\tfocusableIfVisible = !fieldset.disabled;\n\t\t\t}\n\t\t}\n\t} else if ( \"a\" === nodeName ) {\n\t\tfocusableIfVisible = element.href || hasTabindex;\n\t} else {\n\t\tfocusableIfVisible = hasTabindex;\n\t}\n\n\treturn focusableIfVisible && $( element ).is( \":visible\" ) && visible( $( element ) );\n};\n\n// Support: IE 8 only\n// IE 8 doesn't resolve inherit to visible/hidden for computed values\nfunction visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility === \"visible\";\n}\n\n$.extend( $.expr.pseudos, {\n\tfocusable: function( element ) {\n\t\treturn $.ui.focusable( element, $.attr( element, \"tabindex\" ) != null );\n\t}\n} );\n\nreturn $.ui.focusable;\n\n} );\n","jquery/ui-modules/jquery-var-for-color.js":"( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\t\"use strict\";\n\n// Create a local jQuery because jQuery Color relies on it and the\n// global may not exist with AMD and a custom build (#10199).\n// This module is a noop if used as a regular AMD module.\n// eslint-disable-next-line no-unused-vars\nvar jQuery = $;\n\n} );\n","jquery/ui-modules/widget.js":"/*!\n * jQuery UI Widget 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Widget\n//>>group: Core\n//>>description: Provides a factory for creating stateful widgets with a common API.\n//>>docs: http://api.jqueryui.com/jQuery.widget/\n//>>demos: http://jqueryui.com/widget/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nvar widgetUuid = 0;\nvar widgetHasOwnProperty = Array.prototype.hasOwnProperty;\nvar widgetSlice = Array.prototype.slice;\n\n$.cleanData = ( function( orig ) {\n\treturn function( elems ) {\n\t\tvar events, elem, i;\n\t\tfor ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {\n\n\t\t\t// Only trigger remove when necessary to save time\n\t\t\tevents = $._data( elem, \"events\" );\n\t\t\tif ( events && events.remove ) {\n\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t}\n\t\t}\n\t\torig( elems );\n\t};\n} )( $.cleanData );\n\n$.widget = function( name, base, prototype ) {\n\tvar existingConstructor, constructor, basePrototype;\n\n\t// ProxiedPrototype allows the provided prototype to remain unmodified\n\t// so that it can be used as a mixin for multiple widgets (#8876)\n\tvar proxiedPrototype = {};\n\n\tvar namespace = name.split( \".\" )[ 0 ];\n\tname = name.split( \".\" )[ 1 ];\n\tvar fullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\tif ( Array.isArray( prototype ) ) {\n\t\tprototype = $.extend.apply( null, [ {} ].concat( prototype ) );\n\t}\n\n\t// Create selector for plugin\n\t$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\n\t\t// Allow instantiation without \"new\" keyword\n\t\tif ( !this || !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// Allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\n\t// Extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\n\t\t// Copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\n\t\t// Track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t} );\n\n\tbasePrototype = new base();\n\n\t// We need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( typeof value !== \"function\" ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = ( function() {\n\t\t\tfunction _super() {\n\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t}\n\n\t\t\tfunction _superApply( args ) {\n\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t}\n\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super;\n\t\t\t\tvar __superApply = this._superApply;\n\t\t\t\tvar returnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t} )();\n\t} );\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t} );\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// Redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor,\n\t\t\t\tchild._proto );\n\t\t} );\n\n\t\t// Remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n\n\treturn constructor;\n};\n\n$.widget.extend = function( target ) {\n\tvar input = widgetSlice.call( arguments, 1 );\n\tvar inputIndex = 0;\n\tvar inputLength = input.length;\n\tvar key;\n\tvar value;\n\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {\n\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\";\n\t\tvar args = widgetSlice.call( arguments, 1 );\n\t\tvar returnValue = this;\n\n\t\tif ( isMethodCall ) {\n\n\t\t\t// If this is an empty collection, we need to have the instance method\n\t\t\t// return undefined instead of the jQuery instance\n\t\t\tif ( !this.length && options === \"instance\" ) {\n\t\t\t\treturnValue = undefined;\n\t\t\t} else {\n\t\t\t\tthis.each( function() {\n\t\t\t\t\tvar methodValue;\n\t\t\t\t\tvar instance = $.data( this, fullName );\n\n\t\t\t\t\tif ( options === \"instance\" ) {\n\t\t\t\t\t\treturnValue = instance;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\treturn $.error( \"cannot call methods on \" + name +\n\t\t\t\t\t\t\t\" prior to initialization; \" +\n\t\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof instance[ options ] !== \"function\" ||\n\t\t\t\t\t\toptions.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name +\n\t\t\t\t\t\t\t\" widget instance\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\n\t\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\t\tmethodValue;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Allow multiple hashes to be passed on init\n\t\t\tif ( args.length ) {\n\t\t\t\toptions = $.widget.extend.apply( null, [ options ].concat( args ) );\n\t\t\t}\n\n\t\t\tthis.each( function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} );\n\t\t\t\t\tif ( instance._init ) {\n\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\n\toptions: {\n\t\tclasses: {},\n\t\tdisabled: false,\n\n\t\t// Callbacks\n\t\tcreate: null\n\t},\n\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = widgetUuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\t\tthis.classesElementLookup = {};\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\tthis.document = $( element.style ?\n\n\t\t\t\t// Element within the document\n\t\t\t\telement.ownerDocument :\n\n\t\t\t\t// Element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );\n\t\t}\n\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis._create();\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._setOptionDisabled( this.options.disabled );\n\t\t}\n\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\n\t_getCreateOptions: function() {\n\t\treturn {};\n\t},\n\n\t_getCreateEventData: $.noop,\n\n\t_create: $.noop,\n\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tvar that = this;\n\n\t\tthis._destroy();\n\t\t$.each( this.classesElementLookup, function( key, value ) {\n\t\t\tthat._removeClass( value, key );\n\t\t} );\n\n\t\t// We can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeData( this.widgetFullName );\n\t\tthis.widget()\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" );\n\n\t\t// Clean up events and states\n\t\tthis.bindings.off( this.eventNamespace );\n\t},\n\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key;\n\t\tvar parts;\n\t\tvar curOption;\n\t\tvar i;\n\n\t\tif ( arguments.length === 0 ) {\n\n\t\t\t// Don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\n\t\t\t// Handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"classes\" ) {\n\t\t\tthis._setOptionClasses( value );\n\t\t}\n\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._setOptionDisabled( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOptionClasses: function( value ) {\n\t\tvar classKey, elements, currentElements;\n\n\t\tfor ( classKey in value ) {\n\t\t\tcurrentElements = this.classesElementLookup[ classKey ];\n\t\t\tif ( value[ classKey ] === this.options.classes[ classKey ] ||\n\t\t\t\t\t!currentElements ||\n\t\t\t\t\t!currentElements.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// We are doing this to create a new jQuery object because the _removeClass() call\n\t\t\t// on the next line is going to destroy the reference to the current elements being\n\t\t\t// tracked. We need to save a copy of this collection so that we can add the new classes\n\t\t\t// below.\n\t\t\telements = $( currentElements.get() );\n\t\t\tthis._removeClass( currentElements, classKey );\n\n\t\t\t// We don't use _addClass() here, because that uses this.options.classes\n\t\t\t// for generating the string of classes. We want to use the value passed in from\n\t\t\t// _setOption(), this is the new value of the classes option which was passed to\n\t\t\t// _setOption(). We pass this value directly to _classes().\n\t\t\telements.addClass( this._classes( {\n\t\t\t\telement: elements,\n\t\t\t\tkeys: classKey,\n\t\t\t\tclasses: value,\n\t\t\t\tadd: true\n\t\t\t} ) );\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null, !!value );\n\n\t\t// If the widget is becoming disabled, then nothing is interactive\n\t\tif ( value ) {\n\t\t\tthis._removeClass( this.hoverable, null, \"ui-state-hover\" );\n\t\t\tthis._removeClass( this.focusable, null, \"ui-state-focus\" );\n\t\t}\n\t},\n\n\tenable: function() {\n\t\treturn this._setOptions( { disabled: false } );\n\t},\n\n\tdisable: function() {\n\t\treturn this._setOptions( { disabled: true } );\n\t},\n\n\t_classes: function( options ) {\n\t\tvar full = [];\n\t\tvar that = this;\n\n\t\toptions = $.extend( {\n\t\t\telement: this.element,\n\t\t\tclasses: this.options.classes || {}\n\t\t}, options );\n\n\t\tfunction bindRemoveEvent() {\n\t\t\tvar nodesToBind = [];\n\n\t\t\toptions.element.each( function( _, element ) {\n\t\t\t\tvar isTracked = $.map( that.classesElementLookup, function( elements ) {\n\t\t\t\t\treturn elements;\n\t\t\t\t} )\n\t\t\t\t\t.some( function( elements ) {\n\t\t\t\t\t\treturn elements.is( element );\n\t\t\t\t\t} );\n\n\t\t\t\tif ( !isTracked ) {\n\t\t\t\t\tnodesToBind.push( element );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tthat._on( $( nodesToBind ), {\n\t\t\t\tremove: \"_untrackClassesElement\"\n\t\t\t} );\n\t\t}\n\n\t\tfunction processClassString( classes, checkOption ) {\n\t\t\tvar current, i;\n\t\t\tfor ( i = 0; i < classes.length; i++ ) {\n\t\t\t\tcurrent = that.classesElementLookup[ classes[ i ] ] || $();\n\t\t\t\tif ( options.add ) {\n\t\t\t\t\tbindRemoveEvent();\n\t\t\t\t\tcurrent = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );\n\t\t\t\t} else {\n\t\t\t\t\tcurrent = $( current.not( options.element ).get() );\n\t\t\t\t}\n\t\t\t\tthat.classesElementLookup[ classes[ i ] ] = current;\n\t\t\t\tfull.push( classes[ i ] );\n\t\t\t\tif ( checkOption && options.classes[ classes[ i ] ] ) {\n\t\t\t\t\tfull.push( options.classes[ classes[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( options.keys ) {\n\t\t\tprocessClassString( options.keys.match( /\\S+/g ) || [], true );\n\t\t}\n\t\tif ( options.extra ) {\n\t\t\tprocessClassString( options.extra.match( /\\S+/g ) || [] );\n\t\t}\n\n\t\treturn full.join( \" \" );\n\t},\n\n\t_untrackClassesElement: function( event ) {\n\t\tvar that = this;\n\t\t$.each( that.classesElementLookup, function( key, value ) {\n\t\t\tif ( $.inArray( event.target, value ) !== -1 ) {\n\t\t\t\tthat.classesElementLookup[ key ] = $( value.not( event.target ).get() );\n\t\t\t}\n\t\t} );\n\n\t\tthis._off( $( event.target ) );\n\t},\n\n\t_removeClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, false );\n\t},\n\n\t_addClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, true );\n\t},\n\n\t_toggleClass: function( element, keys, extra, add ) {\n\t\tadd = ( typeof add === \"boolean\" ) ? add : extra;\n\t\tvar shift = ( typeof element === \"string\" || element === null ),\n\t\t\toptions = {\n\t\t\t\textra: shift ? keys : extra,\n\t\t\t\tkeys: shift ? element : keys,\n\t\t\t\telement: shift ? this.element : element,\n\t\t\t\tadd: add\n\t\t\t};\n\t\toptions.element.toggleClass( this._classes( options ), add );\n\t\treturn this;\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement;\n\t\tvar instance = this;\n\n\t\t// No suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// No element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\n\t\t\t\t// Allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// Copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^([\\w:-]*)\\s*(.*)$/ );\n\t\t\tvar eventName = match[ 1 ] + instance.eventNamespace;\n\t\t\tvar selector = match[ 2 ];\n\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.on( eventName, selector, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.on( eventName, handlerProxy );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = ( eventName || \"\" ).split( \" \" ).join( this.eventNamespace + \" \" ) +\n\t\t\tthis.eventNamespace;\n\t\telement.off( eventName );\n\n\t\t// Clear the stack to avoid memory leaks (#10056)\n\t\tthis.bindings = $( this.bindings.not( element ).get() );\n\t\tthis.focusable = $( this.focusable.not( element ).get() );\n\t\tthis.hoverable = $( this.hoverable.not( element ).get() );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig;\n\t\tvar callback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\n\t\t// The original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// Copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( typeof callback === \"function\" &&\n\t\t\tcallback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\n\t\tvar hasOptions;\n\t\tvar effectName = !options ?\n\t\t\tmethod :\n\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\tdefaultEffect :\n\t\t\t\toptions.effect || defaultEffect;\n\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t} else if ( options === true ) {\n\t\t\toptions = {};\n\t\t}\n\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue( function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t} );\n\t\t}\n\t};\n} );\n\nreturn $.widget;\n\n} );\n","jquery/ui-modules/safe-active-element.js":"( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.ui.safeActiveElement = function( document ) {\n\tvar activeElement;\n\n\t// Support: IE 9 only\n\t// IE9 throws an \"Unspecified error\" accessing document.activeElement from an <iframe>\n\ttry {\n\t\tactiveElement = document.activeElement;\n\t} catch ( error ) {\n\t\tactiveElement = document.body;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE may return null instead of an element\n\t// Interestingly, this only seems to occur when NOT in an iframe\n\tif ( !activeElement ) {\n\t\tactiveElement = document.body;\n\t}\n\n\t// Support: IE 11 only\n\t// IE11 returns a seemingly empty object in some cases when accessing\n\t// document.activeElement from an <iframe>\n\tif ( !activeElement.nodeName ) {\n\t\tactiveElement = document.body;\n\t}\n\n\treturn activeElement;\n};\n\n} );\n","jquery/ui-modules/plugin.js":"( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// $.ui.plugin is deprecated. Use $.widget() extensions instead.\nreturn $.ui.plugin = {\n\tadd: function( module, option, set ) {\n\t\tvar i,\n\t\t\tproto = $.ui[ module ].prototype;\n\t\tfor ( i in set ) {\n\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t}\n\t},\n\tcall: function( instance, name, args, allowDisconnected ) {\n\t\tvar i,\n\t\t\tset = instance.plugins[ name ];\n\n\t\tif ( !set ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||\n\t\t\t\tinstance.element[ 0 ].parentNode.nodeType === 11 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t}\n\t\t}\n\t}\n};\n\n} );\n","jquery/ui-modules/jquery-patch.js":"/*!\n * jQuery UI Support for jQuery core 1.8.x and newer 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n */\n\n//>>label: jQuery 1.8+ Support\n//>>group: Core\n//>>description: Support version 1.8.x and newer of jQuery core\n\n( function( factory ) {\n\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// Support: jQuery 1.9.x or older\n// $.expr[ \":\" ] is deprecated.\nif ( !$.expr.pseudos ) {\n\t$.expr.pseudos = $.expr[ \":\" ];\n}\n\n// Support: jQuery 1.11.x or older\n// $.unique has been renamed to $.uniqueSort\nif ( !$.uniqueSort ) {\n\t$.uniqueSort = $.unique;\n}\n\n// Support: jQuery 2.2.x or older.\n// This method has been defined in jQuery 3.0.0.\n// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js\nif ( !$.escapeSelector ) {\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\tvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\n\tvar fcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t};\n\n\t$.escapeSelector = function( sel ) {\n\t\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n\t};\n}\n\n// Support: jQuery 3.4.x or older\n// These methods have been defined in jQuery 3.5.0.\nif ( !$.fn.even || !$.fn.odd ) {\n\t$.fn.extend( {\n\t\teven: function() {\n\t\t\treturn this.filter( function( i ) {\n\t\t\t\treturn i % 2 === 0;\n\t\t\t} );\n\t\t},\n\t\todd: function() {\n\t\t\treturn this.filter( function( i ) {\n\t\t\t\treturn i % 2 === 1;\n\t\t\t} );\n\t\t}\n\t} );\n}\n\n} );\n","jquery/ui-modules/position.js":"/*!\n * jQuery UI Position 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/position/\n */\n\n//>>label: Position\n//>>group: Core\n//>>description: Positions elements relative to other elements.\n//>>docs: http://api.jqueryui.com/position/\n//>>demos: http://jqueryui.com/position/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n( function() {\nvar cachedScrollbarWidth,\n\tmax = Math.max,\n\tabs = Math.abs,\n\trhorizontal = /left|center|right/,\n\trvertical = /top|center|bottom/,\n\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\trposition = /^\\w+/,\n\trpercent = /%$/,\n\t_position = $.fn.position;\n\nfunction getOffsets( offsets, width, height ) {\n\treturn [\n\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t];\n}\n\nfunction parseCss( element, property ) {\n\treturn parseInt( $.css( element, property ), 10 ) || 0;\n}\n\nfunction isWindow( obj ) {\n\treturn obj != null && obj === obj.window;\n}\n\nfunction getDimensions( elem ) {\n\tvar raw = elem[ 0 ];\n\tif ( raw.nodeType === 9 ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: 0, left: 0 }\n\t\t};\n\t}\n\tif ( isWindow( raw ) ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t};\n\t}\n\tif ( raw.preventDefault ) {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t};\n\t}\n\treturn {\n\t\twidth: elem.outerWidth(),\n\t\theight: elem.outerHeight(),\n\t\toffset: elem.offset()\n\t};\n}\n\n$.position = {\n\tscrollbarWidth: function() {\n\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\treturn cachedScrollbarWidth;\n\t\t}\n\t\tvar w1, w2,\n\t\t\tdiv = $( \"<div style=\" +\n\t\t\t\t\"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>\" +\n\t\t\t\t\"<div style='height:300px;width:auto;'></div></div>\" ),\n\t\t\tinnerDiv = div.children()[ 0 ];\n\n\t\t$( \"body\" ).append( div );\n\t\tw1 = innerDiv.offsetWidth;\n\t\tdiv.css( \"overflow\", \"scroll\" );\n\n\t\tw2 = innerDiv.offsetWidth;\n\n\t\tif ( w1 === w2 ) {\n\t\t\tw2 = div[ 0 ].clientWidth;\n\t\t}\n\n\t\tdiv.remove();\n\n\t\treturn ( cachedScrollbarWidth = w1 - w2 );\n\t},\n\tgetScrollInfo: function( within ) {\n\t\tvar overflowX = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-x\" ),\n\t\t\toverflowY = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-y\" ),\n\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t( overflowX === \"auto\" && within.width < within.element[ 0 ].scrollWidth ),\n\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t( overflowY === \"auto\" && within.height < within.element[ 0 ].scrollHeight );\n\t\treturn {\n\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t};\n\t},\n\tgetWithinInfo: function( element ) {\n\t\tvar withinElement = $( element || window ),\n\t\t\tisElemWindow = isWindow( withinElement[ 0 ] ),\n\t\t\tisDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,\n\t\t\thasOffset = !isElemWindow && !isDocument;\n\t\treturn {\n\t\t\telement: withinElement,\n\t\t\tisWindow: isElemWindow,\n\t\t\tisDocument: isDocument,\n\t\t\toffset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: withinElement.outerWidth(),\n\t\t\theight: withinElement.outerHeight()\n\t\t};\n\t}\n};\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// Make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\n\t\t// Make sure string options are treated as CSS selectors\n\t\ttarget = typeof options.of === \"string\" ?\n\t\t\t$( document ).find( options.of ) :\n\t\t\t$( options.of ),\n\n\t\twithin = $.position.getWithinInfo( options.within ),\n\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffsets = {};\n\n\tdimensions = getDimensions( target );\n\tif ( target[ 0 ].preventDefault ) {\n\n\t\t// Force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t}\n\ttargetWidth = dimensions.width;\n\ttargetHeight = dimensions.height;\n\ttargetOffset = dimensions.offset;\n\n\t// Clone to reuse original targetOffset later\n\tbasePosition = $.extend( {}, targetOffset );\n\n\t// Force my and at to have valid horizontal and vertical positions\n\t// if a value is missing or invalid, it will be converted to center\n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\thorizontalOffset,\n\t\t\tverticalOffset;\n\n\t\tif ( pos.length === 1 ) {\n\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t}\n\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\n\t\t// Calculate offsets\n\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\toffsets[ this ] = [\n\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t];\n\n\t\t// Reduce to just the positions without the offsets\n\t\toptions[ this ] = [\n\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t];\n\t} );\n\n\t// Normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\tif ( options.at[ 0 ] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\tbasePosition.left += atOffset[ 0 ];\n\tbasePosition.top += atOffset[ 1 ];\n\n\treturn this.each( function() {\n\t\tvar collisionPosition, using,\n\t\t\telem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) +\n\t\t\t\tscrollInfo.width,\n\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) +\n\t\t\t\tscrollInfo.height,\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\n\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\tposition.left += myOffset[ 0 ];\n\t\tposition.top += myOffset[ 1 ];\n\n\t\tcollisionPosition = {\n\t\t\tmarginLeft: marginLeft,\n\t\t\tmarginTop: marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at,\n\t\t\t\t\twithin: within,\n\t\t\t\t\telem: elem\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tif ( options.using ) {\n\n\t\t\t// Adds feedback as second argument to using callback, if present\n\t\t\tusing = function( props ) {\n\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\tfeedback = {\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t};\n\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t}\n\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t}\n\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t} else {\n\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t}\n\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t};\n\t\t}\n\n\t\telem.offset( $.extend( position, { using: using } ) );\n\t} );\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\touterWidth = within.width,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\tnewOverRight;\n\n\t\t\t// Element is wider than within\n\t\t\tif ( data.collisionWidth > outerWidth ) {\n\n\t\t\t\t// Element is initially over the left side of within\n\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.left += overLeft - newOverRight;\n\n\t\t\t\t// Element is initially over right side of within\n\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\tposition.left = withinOffset;\n\n\t\t\t\t// Element is initially over both left and right sides of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far left -> align with left edge\n\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\tposition.left += overLeft;\n\n\t\t\t// Too far right -> align with right edge\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tposition.left -= overRight;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\touterHeight = data.within.height,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\tnewOverBottom;\n\n\t\t\t// Element is taller than within\n\t\t\tif ( data.collisionHeight > outerHeight ) {\n\n\t\t\t\t// Element is initially over the top of within\n\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.top += overTop - newOverBottom;\n\n\t\t\t\t// Element is initially over bottom of within\n\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\tposition.top = withinOffset;\n\n\t\t\t\t// Element is initially over both top and bottom of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far up -> align with top\n\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\tposition.top += overTop;\n\n\t\t\t// Too far down -> align with bottom edge\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tposition.top -= overBottom;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t}\n\t\t}\n\t},\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\touterWidth = within.width,\n\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\tnewOverRight,\n\t\t\t\tnewOverLeft;\n\n\t\t\tif ( overLeft < 0 ) {\n\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -\n\t\t\t\t\touterWidth - withinOffset;\n\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +\n\t\t\t\t\tatOffset + offset - offsetLeft;\n\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\touterHeight = within.height,\n\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\tmyOffset = top ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\tnewOverTop,\n\t\t\t\tnewOverBottom;\n\t\t\tif ( overTop < 0 ) {\n\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -\n\t\t\t\t\touterHeight - withinOffset;\n\t\t\t\tif ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +\n\t\t\t\t\toffset - offsetTop;\n\t\t\t\tif ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tflipfit: {\n\t\tleft: function() {\n\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t},\n\t\ttop: function() {\n\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t}\n\t}\n};\n\n} )();\n\nreturn $.ui.position;\n\n} );\n","jquery/ui-modules/core.js":"// This file is deprecated in 1.12.0 to be removed in 1.14\n( function() {\n\"use strict\";\n\ndefine( [\n\t\"jquery\",\n\t\"./data\",\n\t\"./disable-selection\",\n\t\"./focusable\",\n\t\"./form\",\n\t\"./ie\",\n\t\"./keycode\",\n\t\"./labels\",\n\t\"./jquery-patch\",\n\t\"./plugin\",\n\t\"./safe-active-element\",\n\t\"./safe-blur\",\n\t\"./scroll-parent\",\n\t\"./tabbable\",\n\t\"./unique-id\",\n\t\"./version\"\n] );\n} )();\n","jquery/ui-modules/disable-selection.js":"/*!\n * jQuery UI Disable Selection 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: disableSelection\n//>>group: Core\n//>>description: Disable selection of text content within the set of matched elements.\n//>>docs: http://api.jqueryui.com/disableSelection/\n\n// This file is deprecated\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.extend( {\n\tdisableSelection: ( function() {\n\t\tvar eventType = \"onselectstart\" in document.createElement( \"div\" ) ?\n\t\t\t\"selectstart\" :\n\t\t\t\"mousedown\";\n\n\t\treturn function() {\n\t\t\treturn this.on( eventType + \".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tenableSelection: function() {\n\t\treturn this.off( \".ui-disableSelection\" );\n\t}\n} );\n\n} );\n","jquery/ui-modules/effect.js":"/*!\n * jQuery UI Effects 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Effects Core\n//>>group: Effects\n/* eslint-disable max-len */\n//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.\n/* eslint-enable max-len */\n//>>docs: http://api.jqueryui.com/category/effects-core/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"./jquery-var-for-color\",\n\t\t\t\"./vendor/jquery-color/jquery.color\",\n\t\t\t\"./version\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nvar dataSpace = \"ui-effects-\",\n\tdataSpaceStyle = \"ui-effects-style\",\n\tdataSpaceAnimated = \"ui-effects-animated\";\n\n$.effects = {\n\teffect: {}\n};\n\n/******************************************************************************/\n/****************************** CLASS ANIMATIONS ******************************/\n/******************************************************************************/\n( function() {\n\nvar classAnimationActions = [ \"add\", \"remove\", \"toggle\" ],\n\tshorthandStyles = {\n\t\tborder: 1,\n\t\tborderBottom: 1,\n\t\tborderColor: 1,\n\t\tborderLeft: 1,\n\t\tborderRight: 1,\n\t\tborderTop: 1,\n\t\tborderWidth: 1,\n\t\tmargin: 1,\n\t\tpadding: 1\n\t};\n\n$.each(\n\t[ \"borderLeftStyle\", \"borderRightStyle\", \"borderBottomStyle\", \"borderTopStyle\" ],\n\tfunction( _, prop ) {\n\t\t$.fx.step[ prop ] = function( fx ) {\n\t\t\tif ( fx.end !== \"none\" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {\n\t\t\t\tjQuery.style( fx.elem, prop, fx.end );\n\t\t\t\tfx.setAttr = true;\n\t\t\t}\n\t\t};\n\t}\n);\n\nfunction camelCase( string ) {\n\treturn string.replace( /-([\\da-z])/gi, function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t} );\n}\n\nfunction getElementStyles( elem ) {\n\tvar key, len,\n\t\tstyle = elem.ownerDocument.defaultView ?\n\t\t\telem.ownerDocument.defaultView.getComputedStyle( elem, null ) :\n\t\t\telem.currentStyle,\n\t\tstyles = {};\n\n\tif ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {\n\t\tlen = style.length;\n\t\twhile ( len-- ) {\n\t\t\tkey = style[ len ];\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ camelCase( key ) ] = style[ key ];\n\t\t\t}\n\t\t}\n\n\t// Support: Opera, IE <9\n\t} else {\n\t\tfor ( key in style ) {\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ key ] = style[ key ];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn styles;\n}\n\nfunction styleDifference( oldStyle, newStyle ) {\n\tvar diff = {},\n\t\tname, value;\n\n\tfor ( name in newStyle ) {\n\t\tvalue = newStyle[ name ];\n\t\tif ( oldStyle[ name ] !== value ) {\n\t\t\tif ( !shorthandStyles[ name ] ) {\n\t\t\t\tif ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {\n\t\t\t\t\tdiff[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn diff;\n}\n\n// Support: jQuery <1.8\nif ( !$.fn.addBack ) {\n\t$.fn.addBack = function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t};\n}\n\n$.effects.animateClass = function( value, duration, easing, callback ) {\n\tvar o = $.speed( duration, easing, callback );\n\n\treturn this.queue( function() {\n\t\tvar animated = $( this ),\n\t\t\tbaseClass = animated.attr( \"class\" ) || \"\",\n\t\t\tapplyClassChange,\n\t\t\tallAnimations = o.children ? animated.find( \"*\" ).addBack() : animated;\n\n\t\t// Map the animated objects to store the original styles.\n\t\tallAnimations = allAnimations.map( function() {\n\t\t\tvar el = $( this );\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tstart: getElementStyles( this )\n\t\t\t};\n\t\t} );\n\n\t\t// Apply class change\n\t\tapplyClassChange = function() {\n\t\t\t$.each( classAnimationActions, function( i, action ) {\n\t\t\t\tif ( value[ action ] ) {\n\t\t\t\t\tanimated[ action + \"Class\" ]( value[ action ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t\tapplyClassChange();\n\n\t\t// Map all animated objects again - calculate new styles and diff\n\t\tallAnimations = allAnimations.map( function() {\n\t\t\tthis.end = getElementStyles( this.el[ 0 ] );\n\t\t\tthis.diff = styleDifference( this.start, this.end );\n\t\t\treturn this;\n\t\t} );\n\n\t\t// Apply original class\n\t\tanimated.attr( \"class\", baseClass );\n\n\t\t// Map all animated objects again - this time collecting a promise\n\t\tallAnimations = allAnimations.map( function() {\n\t\t\tvar styleInfo = this,\n\t\t\t\tdfd = $.Deferred(),\n\t\t\t\topts = $.extend( {}, o, {\n\t\t\t\t\tqueue: false,\n\t\t\t\t\tcomplete: function() {\n\t\t\t\t\t\tdfd.resolve( styleInfo );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\tthis.el.animate( this.diff, opts );\n\t\t\treturn dfd.promise();\n\t\t} );\n\n\t\t// Once all animations have completed:\n\t\t$.when.apply( $, allAnimations.get() ).done( function() {\n\n\t\t\t// Set the final class\n\t\t\tapplyClassChange();\n\n\t\t\t// For each animated element,\n\t\t\t// clear all css properties that were animated\n\t\t\t$.each( arguments, function() {\n\t\t\t\tvar el = this.el;\n\t\t\t\t$.each( this.diff, function( key ) {\n\t\t\t\t\tel.css( key, \"\" );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t// This is guarnteed to be there if you use jQuery.speed()\n\t\t\t// it also handles dequeuing the next anim...\n\t\t\to.complete.call( animated[ 0 ] );\n\t\t} );\n\t} );\n};\n\n$.fn.extend( {\n\taddClass: ( function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn speed ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ add: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t} )( $.fn.addClass ),\n\n\tremoveClass: ( function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn arguments.length > 1 ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ remove: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t} )( $.fn.removeClass ),\n\n\ttoggleClass: ( function( orig ) {\n\t\treturn function( classNames, force, speed, easing, callback ) {\n\t\t\tif ( typeof force === \"boolean\" || force === undefined ) {\n\t\t\t\tif ( !speed ) {\n\n\t\t\t\t\t// Without speed parameter\n\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t\t( force ? { add: classNames } : { remove: classNames } ),\n\t\t\t\t\t\tspeed, easing, callback );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Without force parameter\n\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t{ toggle: classNames }, force, speed, easing );\n\t\t\t}\n\t\t};\n\t} )( $.fn.toggleClass ),\n\n\tswitchClass: function( remove, add, speed, easing, callback ) {\n\t\treturn $.effects.animateClass.call( this, {\n\t\t\tadd: add,\n\t\t\tremove: remove\n\t\t}, speed, easing, callback );\n\t}\n} );\n\n} )();\n\n/******************************************************************************/\n/*********************************** EFFECTS **********************************/\n/******************************************************************************/\n\n( function() {\n\nif ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {\n\t$.expr.pseudos.animated = ( function( orig ) {\n\t\treturn function( elem ) {\n\t\t\treturn !!$( elem ).data( dataSpaceAnimated ) || orig( elem );\n\t\t};\n\t} )( $.expr.pseudos.animated );\n}\n\nif ( $.uiBackCompat !== false ) {\n\t$.extend( $.effects, {\n\n\t\t// Saves a set of properties in a data storage\n\t\tsave: function( element, set ) {\n\t\t\tvar i = 0, length = set.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\t\telement.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Restores a set of previously saved properties from a data storage\n\t\trestore: function( element, set ) {\n\t\t\tvar val, i = 0, length = set.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\t\tval = element.data( dataSpace + set[ i ] );\n\t\t\t\t\telement.css( set[ i ], val );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tsetMode: function( el, mode ) {\n\t\t\tif ( mode === \"toggle\" ) {\n\t\t\t\tmode = el.is( \":hidden\" ) ? \"show\" : \"hide\";\n\t\t\t}\n\t\t\treturn mode;\n\t\t},\n\n\t\t// Wraps the element around a wrapper that copies position properties\n\t\tcreateWrapper: function( element ) {\n\n\t\t\t// If the element is already wrapped, return it\n\t\t\tif ( element.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\t\treturn element.parent();\n\t\t\t}\n\n\t\t\t// Wrap the element\n\t\t\tvar props = {\n\t\t\t\t\twidth: element.outerWidth( true ),\n\t\t\t\t\theight: element.outerHeight( true ),\n\t\t\t\t\t\"float\": element.css( \"float\" )\n\t\t\t\t},\n\t\t\t\twrapper = $( \"<div></div>\" )\n\t\t\t\t\t.addClass( \"ui-effects-wrapper\" )\n\t\t\t\t\t.css( {\n\t\t\t\t\t\tfontSize: \"100%\",\n\t\t\t\t\t\tbackground: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\tpadding: 0\n\t\t\t\t\t} ),\n\n\t\t\t\t// Store the size in case width/height are defined in % - Fixes #5245\n\t\t\t\tsize = {\n\t\t\t\t\twidth: element.width(),\n\t\t\t\t\theight: element.height()\n\t\t\t\t},\n\t\t\t\tactive = document.activeElement;\n\n\t\t\t// Support: Firefox\n\t\t\t// Firefox incorrectly exposes anonymous content\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=561664\n\t\t\ttry {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\tactive.id;\n\t\t\t} catch ( e ) {\n\t\t\t\tactive = document.body;\n\t\t\t}\n\n\t\t\telement.wrap( wrapper );\n\n\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t$( active ).trigger( \"focus\" );\n\t\t\t}\n\n\t\t\t// Hotfix for jQuery 1.4 since some change in wrap() seems to actually\n\t\t\t// lose the reference to the wrapped element\n\t\t\twrapper = element.parent();\n\n\t\t\t// Transfer positioning properties to the wrapper\n\t\t\tif ( element.css( \"position\" ) === \"static\" ) {\n\t\t\t\twrapper.css( { position: \"relative\" } );\n\t\t\t\telement.css( { position: \"relative\" } );\n\t\t\t} else {\n\t\t\t\t$.extend( props, {\n\t\t\t\t\tposition: element.css( \"position\" ),\n\t\t\t\t\tzIndex: element.css( \"z-index\" )\n\t\t\t\t} );\n\t\t\t\t$.each( [ \"top\", \"left\", \"bottom\", \"right\" ], function( i, pos ) {\n\t\t\t\t\tprops[ pos ] = element.css( pos );\n\t\t\t\t\tif ( isNaN( parseInt( props[ pos ], 10 ) ) ) {\n\t\t\t\t\t\tprops[ pos ] = \"auto\";\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\telement.css( {\n\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tright: \"auto\",\n\t\t\t\t\tbottom: \"auto\"\n\t\t\t\t} );\n\t\t\t}\n\t\t\telement.css( size );\n\n\t\t\treturn wrapper.css( props ).show();\n\t\t},\n\n\t\tremoveWrapper: function( element ) {\n\t\t\tvar active = document.activeElement;\n\n\t\t\tif ( element.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\t\telement.parent().replaceWith( element );\n\n\t\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t\t$( active ).trigger( \"focus\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn element;\n\t\t}\n\t} );\n}\n\n$.extend( $.effects, {\n\tversion: \"1.13.1\",\n\n\tdefine: function( name, mode, effect ) {\n\t\tif ( !effect ) {\n\t\t\teffect = mode;\n\t\t\tmode = \"effect\";\n\t\t}\n\n\t\t$.effects.effect[ name ] = effect;\n\t\t$.effects.effect[ name ].mode = mode;\n\n\t\treturn effect;\n\t},\n\n\tscaledDimensions: function( element, percent, direction ) {\n\t\tif ( percent === 0 ) {\n\t\t\treturn {\n\t\t\t\theight: 0,\n\t\t\t\twidth: 0,\n\t\t\t\touterHeight: 0,\n\t\t\t\touterWidth: 0\n\t\t\t};\n\t\t}\n\n\t\tvar x = direction !== \"horizontal\" ? ( ( percent || 100 ) / 100 ) : 1,\n\t\t\ty = direction !== \"vertical\" ? ( ( percent || 100 ) / 100 ) : 1;\n\n\t\treturn {\n\t\t\theight: element.height() * y,\n\t\t\twidth: element.width() * x,\n\t\t\touterHeight: element.outerHeight() * y,\n\t\t\touterWidth: element.outerWidth() * x\n\t\t};\n\n\t},\n\n\tclipToBox: function( animation ) {\n\t\treturn {\n\t\t\twidth: animation.clip.right - animation.clip.left,\n\t\t\theight: animation.clip.bottom - animation.clip.top,\n\t\t\tleft: animation.clip.left,\n\t\t\ttop: animation.clip.top\n\t\t};\n\t},\n\n\t// Injects recently queued functions to be first in line (after \"inprogress\")\n\tunshift: function( element, queueLength, count ) {\n\t\tvar queue = element.queue();\n\n\t\tif ( queueLength > 1 ) {\n\t\t\tqueue.splice.apply( queue,\n\t\t\t\t[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );\n\t\t}\n\t\telement.dequeue();\n\t},\n\n\tsaveStyle: function( element ) {\n\t\telement.data( dataSpaceStyle, element[ 0 ].style.cssText );\n\t},\n\n\trestoreStyle: function( element ) {\n\t\telement[ 0 ].style.cssText = element.data( dataSpaceStyle ) || \"\";\n\t\telement.removeData( dataSpaceStyle );\n\t},\n\n\tmode: function( element, mode ) {\n\t\tvar hidden = element.is( \":hidden\" );\n\n\t\tif ( mode === \"toggle\" ) {\n\t\t\tmode = hidden ? \"show\" : \"hide\";\n\t\t}\n\t\tif ( hidden ? mode === \"hide\" : mode === \"show\" ) {\n\t\t\tmode = \"none\";\n\t\t}\n\t\treturn mode;\n\t},\n\n\t// Translates a [top,left] array into a baseline value\n\tgetBaseline: function( origin, original ) {\n\t\tvar y, x;\n\n\t\tswitch ( origin[ 0 ] ) {\n\t\tcase \"top\":\n\t\t\ty = 0;\n\t\t\tbreak;\n\t\tcase \"middle\":\n\t\t\ty = 0.5;\n\t\t\tbreak;\n\t\tcase \"bottom\":\n\t\t\ty = 1;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ty = origin[ 0 ] / original.height;\n\t\t}\n\n\t\tswitch ( origin[ 1 ] ) {\n\t\tcase \"left\":\n\t\t\tx = 0;\n\t\t\tbreak;\n\t\tcase \"center\":\n\t\t\tx = 0.5;\n\t\t\tbreak;\n\t\tcase \"right\":\n\t\t\tx = 1;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tx = origin[ 1 ] / original.width;\n\t\t}\n\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t},\n\n\t// Creates a placeholder element so that the original element can be made absolute\n\tcreatePlaceholder: function( element ) {\n\t\tvar placeholder,\n\t\t\tcssPosition = element.css( \"position\" ),\n\t\t\tposition = element.position();\n\n\t\t// Lock in margins first to account for form elements, which\n\t\t// will change margin if you explicitly set height\n\t\t// see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380\n\t\t// Support: Safari\n\t\telement.css( {\n\t\t\tmarginTop: element.css( \"marginTop\" ),\n\t\t\tmarginBottom: element.css( \"marginBottom\" ),\n\t\t\tmarginLeft: element.css( \"marginLeft\" ),\n\t\t\tmarginRight: element.css( \"marginRight\" )\n\t\t} )\n\t\t.outerWidth( element.outerWidth() )\n\t\t.outerHeight( element.outerHeight() );\n\n\t\tif ( /^(static|relative)/.test( cssPosition ) ) {\n\t\t\tcssPosition = \"absolute\";\n\n\t\t\tplaceholder = $( \"<\" + element[ 0 ].nodeName + \">\" ).insertAfter( element ).css( {\n\n\t\t\t\t// Convert inline to inline block to account for inline elements\n\t\t\t\t// that turn to inline block based on content (like img)\n\t\t\t\tdisplay: /^(inline|ruby)/.test( element.css( \"display\" ) ) ?\n\t\t\t\t\t\"inline-block\" :\n\t\t\t\t\t\"block\",\n\t\t\t\tvisibility: \"hidden\",\n\n\t\t\t\t// Margins need to be set to account for margin collapse\n\t\t\t\tmarginTop: element.css( \"marginTop\" ),\n\t\t\t\tmarginBottom: element.css( \"marginBottom\" ),\n\t\t\t\tmarginLeft: element.css( \"marginLeft\" ),\n\t\t\t\tmarginRight: element.css( \"marginRight\" ),\n\t\t\t\t\"float\": element.css( \"float\" )\n\t\t\t} )\n\t\t\t.outerWidth( element.outerWidth() )\n\t\t\t.outerHeight( element.outerHeight() )\n\t\t\t.addClass( \"ui-effects-placeholder\" );\n\n\t\t\telement.data( dataSpace + \"placeholder\", placeholder );\n\t\t}\n\n\t\telement.css( {\n\t\t\tposition: cssPosition,\n\t\t\tleft: position.left,\n\t\t\ttop: position.top\n\t\t} );\n\n\t\treturn placeholder;\n\t},\n\n\tremovePlaceholder: function( element ) {\n\t\tvar dataKey = dataSpace + \"placeholder\",\n\t\t\t\tplaceholder = element.data( dataKey );\n\n\t\tif ( placeholder ) {\n\t\t\tplaceholder.remove();\n\t\t\telement.removeData( dataKey );\n\t\t}\n\t},\n\n\t// Removes a placeholder if it exists and restores\n\t// properties that were modified during placeholder creation\n\tcleanUp: function( element ) {\n\t\t$.effects.restoreStyle( element );\n\t\t$.effects.removePlaceholder( element );\n\t},\n\n\tsetTransition: function( element, list, factor, value ) {\n\t\tvalue = value || {};\n\t\t$.each( list, function( i, x ) {\n\t\t\tvar unit = element.cssUnit( x );\n\t\t\tif ( unit[ 0 ] > 0 ) {\n\t\t\t\tvalue[ x ] = unit[ 0 ] * factor + unit[ 1 ];\n\t\t\t}\n\t\t} );\n\t\treturn value;\n\t}\n} );\n\n// Return an effect options object for the given parameters:\nfunction _normalizeArguments( effect, options, speed, callback ) {\n\n\t// Allow passing all options as the first parameter\n\tif ( $.isPlainObject( effect ) ) {\n\t\toptions = effect;\n\t\teffect = effect.effect;\n\t}\n\n\t// Convert to an object\n\teffect = { effect: effect };\n\n\t// Catch (effect, null, ...)\n\tif ( options == null ) {\n\t\toptions = {};\n\t}\n\n\t// Catch (effect, callback)\n\tif ( typeof options === \"function\" ) {\n\t\tcallback = options;\n\t\tspeed = null;\n\t\toptions = {};\n\t}\n\n\t// Catch (effect, speed, ?)\n\tif ( typeof options === \"number\" || $.fx.speeds[ options ] ) {\n\t\tcallback = speed;\n\t\tspeed = options;\n\t\toptions = {};\n\t}\n\n\t// Catch (effect, options, callback)\n\tif ( typeof speed === \"function\" ) {\n\t\tcallback = speed;\n\t\tspeed = null;\n\t}\n\n\t// Add options to effect\n\tif ( options ) {\n\t\t$.extend( effect, options );\n\t}\n\n\tspeed = speed || options.duration;\n\teffect.duration = $.fx.off ? 0 :\n\t\ttypeof speed === \"number\" ? speed :\n\t\tspeed in $.fx.speeds ? $.fx.speeds[ speed ] :\n\t\t$.fx.speeds._default;\n\n\teffect.complete = callback || options.complete;\n\n\treturn effect;\n}\n\nfunction standardAnimationOption( option ) {\n\n\t// Valid standard speeds (nothing, number, named speed)\n\tif ( !option || typeof option === \"number\" || $.fx.speeds[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Invalid strings - treat as \"normal\" speed\n\tif ( typeof option === \"string\" && !$.effects.effect[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Complete callback\n\tif ( typeof option === \"function\" ) {\n\t\treturn true;\n\t}\n\n\t// Options hash (but not naming an effect)\n\tif ( typeof option === \"object\" && !option.effect ) {\n\t\treturn true;\n\t}\n\n\t// Didn't match any standard API\n\treturn false;\n}\n\n$.fn.extend( {\n\teffect: function( /* effect, options, speed, callback */ ) {\n\t\tvar args = _normalizeArguments.apply( this, arguments ),\n\t\t\teffectMethod = $.effects.effect[ args.effect ],\n\t\t\tdefaultMode = effectMethod.mode,\n\t\t\tqueue = args.queue,\n\t\t\tqueueName = queue || \"fx\",\n\t\t\tcomplete = args.complete,\n\t\t\tmode = args.mode,\n\t\t\tmodes = [],\n\t\t\tprefilter = function( next ) {\n\t\t\t\tvar el = $( this ),\n\t\t\t\t\tnormalizedMode = $.effects.mode( el, mode ) || defaultMode;\n\n\t\t\t\t// Sentinel for duck-punching the :animated pseudo-selector\n\t\t\t\tel.data( dataSpaceAnimated, true );\n\n\t\t\t\t// Save effect mode for later use,\n\t\t\t\t// we can't just call $.effects.mode again later,\n\t\t\t\t// as the .show() below destroys the initial state\n\t\t\t\tmodes.push( normalizedMode );\n\n\t\t\t\t// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14\n\t\t\t\tif ( defaultMode && ( normalizedMode === \"show\" ||\n\t\t\t\t\t\t( normalizedMode === defaultMode && normalizedMode === \"hide\" ) ) ) {\n\t\t\t\t\tel.show();\n\t\t\t\t}\n\n\t\t\t\tif ( !defaultMode || normalizedMode !== \"none\" ) {\n\t\t\t\t\t$.effects.saveStyle( el );\n\t\t\t\t}\n\n\t\t\t\tif ( typeof next === \"function\" ) {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( $.fx.off || !effectMethod ) {\n\n\t\t\t// Delegate to the original method (e.g., .show()) if possible\n\t\t\tif ( mode ) {\n\t\t\t\treturn this[ mode ]( args.duration, complete );\n\t\t\t} else {\n\t\t\t\treturn this.each( function() {\n\t\t\t\t\tif ( complete ) {\n\t\t\t\t\t\tcomplete.call( this );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tfunction run( next ) {\n\t\t\tvar elem = $( this );\n\n\t\t\tfunction cleanup() {\n\t\t\t\telem.removeData( dataSpaceAnimated );\n\n\t\t\t\t$.effects.cleanUp( elem );\n\n\t\t\t\tif ( args.mode === \"hide\" ) {\n\t\t\t\t\telem.hide();\n\t\t\t\t}\n\n\t\t\t\tdone();\n\t\t\t}\n\n\t\t\tfunction done() {\n\t\t\t\tif ( typeof complete === \"function\" ) {\n\t\t\t\t\tcomplete.call( elem[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\tif ( typeof next === \"function\" ) {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override mode option on a per element basis,\n\t\t\t// as toggle can be either show or hide depending on element state\n\t\t\targs.mode = modes.shift();\n\n\t\t\tif ( $.uiBackCompat !== false && !defaultMode ) {\n\t\t\t\tif ( elem.is( \":hidden\" ) ? mode === \"hide\" : mode === \"show\" ) {\n\n\t\t\t\t\t// Call the core method to track \"olddisplay\" properly\n\t\t\t\t\telem[ mode ]();\n\t\t\t\t\tdone();\n\t\t\t\t} else {\n\t\t\t\t\teffectMethod.call( elem[ 0 ], args, done );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( args.mode === \"none\" ) {\n\n\t\t\t\t\t// Call the core method to track \"olddisplay\" properly\n\t\t\t\t\telem[ mode ]();\n\t\t\t\t\tdone();\n\t\t\t\t} else {\n\t\t\t\t\teffectMethod.call( elem[ 0 ], args, cleanup );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Run prefilter on all elements first to ensure that\n\t\t// any showing or hiding happens before placeholder creation,\n\t\t// which ensures that any layout changes are correctly captured.\n\t\treturn queue === false ?\n\t\t\tthis.each( prefilter ).each( run ) :\n\t\t\tthis.queue( queueName, prefilter ).queue( queueName, run );\n\t},\n\n\tshow: ( function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"show\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t} )( $.fn.show ),\n\n\thide: ( function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"hide\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t} )( $.fn.hide ),\n\n\ttoggle: ( function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) || typeof option === \"boolean\" ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"toggle\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t} )( $.fn.toggle ),\n\n\tcssUnit: function( key ) {\n\t\tvar style = this.css( key ),\n\t\t\tval = [];\n\n\t\t$.each( [ \"em\", \"px\", \"%\", \"pt\" ], function( i, unit ) {\n\t\t\tif ( style.indexOf( unit ) > 0 ) {\n\t\t\t\tval = [ parseFloat( style ), unit ];\n\t\t\t}\n\t\t} );\n\t\treturn val;\n\t},\n\n\tcssClip: function( clipObj ) {\n\t\tif ( clipObj ) {\n\t\t\treturn this.css( \"clip\", \"rect(\" + clipObj.top + \"px \" + clipObj.right + \"px \" +\n\t\t\t\tclipObj.bottom + \"px \" + clipObj.left + \"px)\" );\n\t\t}\n\t\treturn parseClip( this.css( \"clip\" ), this );\n\t},\n\n\ttransfer: function( options, done ) {\n\t\tvar element = $( this ),\n\t\t\ttarget = $( options.to ),\n\t\t\ttargetFixed = target.css( \"position\" ) === \"fixed\",\n\t\t\tbody = $( \"body\" ),\n\t\t\tfixTop = targetFixed ? body.scrollTop() : 0,\n\t\t\tfixLeft = targetFixed ? body.scrollLeft() : 0,\n\t\t\tendPosition = target.offset(),\n\t\t\tanimation = {\n\t\t\t\ttop: endPosition.top - fixTop,\n\t\t\t\tleft: endPosition.left - fixLeft,\n\t\t\t\theight: target.innerHeight(),\n\t\t\t\twidth: target.innerWidth()\n\t\t\t},\n\t\t\tstartPosition = element.offset(),\n\t\t\ttransfer = $( \"<div class='ui-effects-transfer'></div>\" );\n\n\t\ttransfer\n\t\t\t.appendTo( \"body\" )\n\t\t\t.addClass( options.className )\n\t\t\t.css( {\n\t\t\t\ttop: startPosition.top - fixTop,\n\t\t\t\tleft: startPosition.left - fixLeft,\n\t\t\t\theight: element.innerHeight(),\n\t\t\t\twidth: element.innerWidth(),\n\t\t\t\tposition: targetFixed ? \"fixed\" : \"absolute\"\n\t\t\t} )\n\t\t\t.animate( animation, options.duration, options.easing, function() {\n\t\t\t\ttransfer.remove();\n\t\t\t\tif ( typeof done === \"function\" ) {\n\t\t\t\t\tdone();\n\t\t\t\t}\n\t\t\t} );\n\t}\n} );\n\nfunction parseClip( str, element ) {\n\t\tvar outerWidth = element.outerWidth(),\n\t\t\touterHeight = element.outerHeight(),\n\t\t\tclipRegex = /^rect\\((-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto)\\)$/,\n\t\t\tvalues = clipRegex.exec( str ) || [ \"\", 0, outerWidth, outerHeight, 0 ];\n\n\t\treturn {\n\t\t\ttop: parseFloat( values[ 1 ] ) || 0,\n\t\t\tright: values[ 2 ] === \"auto\" ? outerWidth : parseFloat( values[ 2 ] ),\n\t\t\tbottom: values[ 3 ] === \"auto\" ? outerHeight : parseFloat( values[ 3 ] ),\n\t\t\tleft: parseFloat( values[ 4 ] ) || 0\n\t\t};\n}\n\n$.fx.step.clip = function( fx ) {\n\tif ( !fx.clipInit ) {\n\t\tfx.start = $( fx.elem ).cssClip();\n\t\tif ( typeof fx.end === \"string\" ) {\n\t\t\tfx.end = parseClip( fx.end, fx.elem );\n\t\t}\n\t\tfx.clipInit = true;\n\t}\n\n\t$( fx.elem ).cssClip( {\n\t\ttop: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,\n\t\tright: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,\n\t\tbottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,\n\t\tleft: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left\n\t} );\n};\n\n} )();\n\n/******************************************************************************/\n/*********************************** EASING ***********************************/\n/******************************************************************************/\n\n( function() {\n\n// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\nvar baseEasings = {};\n\n$.each( [ \"Quad\", \"Cubic\", \"Quart\", \"Quint\", \"Expo\" ], function( i, name ) {\n\tbaseEasings[ name ] = function( p ) {\n\t\treturn Math.pow( p, i + 2 );\n\t};\n} );\n\n$.extend( baseEasings, {\n\tSine: function( p ) {\n\t\treturn 1 - Math.cos( p * Math.PI / 2 );\n\t},\n\tCirc: function( p ) {\n\t\treturn 1 - Math.sqrt( 1 - p * p );\n\t},\n\tElastic: function( p ) {\n\t\treturn p === 0 || p === 1 ? p :\n\t\t\t-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );\n\t},\n\tBack: function( p ) {\n\t\treturn p * p * ( 3 * p - 2 );\n\t},\n\tBounce: function( p ) {\n\t\tvar pow2,\n\t\t\tbounce = 4;\n\n\t\twhile ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}\n\t\treturn 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );\n\t}\n} );\n\n$.each( baseEasings, function( name, easeIn ) {\n\t$.easing[ \"easeIn\" + name ] = easeIn;\n\t$.easing[ \"easeOut\" + name ] = function( p ) {\n\t\treturn 1 - easeIn( 1 - p );\n\t};\n\t$.easing[ \"easeInOut\" + name ] = function( p ) {\n\t\treturn p < 0.5 ?\n\t\t\teaseIn( p * 2 ) / 2 :\n\t\t\t1 - easeIn( p * -2 + 2 ) / 2;\n\t};\n} );\n\n} )();\n\nreturn $.effects;\n\n} );\n","jquery/ui-modules/effects/effect-pulsate.js":"/*!\n * jQuery UI Effects Pulsate 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Pulsate Effect\n//>>group: Effects\n//>>description: Pulsates an element n times by changing the opacity to zero and back.\n//>>docs: http://api.jqueryui.com/pulsate-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"pulsate\", \"show\", function( options, done ) {\n\tvar element = $( this ),\n\t\tmode = options.mode,\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tshowhide = show || hide,\n\n\t\t// Showing or hiding leaves off the \"last\" animation\n\t\tanims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),\n\t\tduration = options.duration / anims,\n\t\tanimateTo = 0,\n\t\ti = 1,\n\t\tqueuelen = element.queue().length;\n\n\tif ( show || !element.is( \":visible\" ) ) {\n\t\telement.css( \"opacity\", 0 ).show();\n\t\tanimateTo = 1;\n\t}\n\n\t// Anims - 1 opacity \"toggles\"\n\tfor ( ; i < anims; i++ ) {\n\t\telement.animate( { opacity: animateTo }, duration, options.easing );\n\t\tanimateTo = 1 - animateTo;\n\t}\n\n\telement.animate( { opacity: animateTo }, duration, options.easing );\n\n\telement.queue( done );\n\n\t$.effects.unshift( element, queuelen, anims + 1 );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-fold.js":"/*!\n * jQuery UI Effects Fold 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Fold Effect\n//>>group: Effects\n//>>description: Folds an element first horizontally and then vertically.\n//>>docs: http://api.jqueryui.com/fold-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"fold\", \"hide\", function( options, done ) {\n\n\t// Create element\n\tvar element = $( this ),\n\t\tmode = options.mode,\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tsize = options.size || 15,\n\t\tpercent = /([0-9]+)%/.exec( size ),\n\t\thorizFirst = !!options.horizFirst,\n\t\tref = horizFirst ? [ \"right\", \"bottom\" ] : [ \"bottom\", \"right\" ],\n\t\tduration = options.duration / 2,\n\n\t\tplaceholder = $.effects.createPlaceholder( element ),\n\n\t\tstart = element.cssClip(),\n\t\tanimation1 = { clip: $.extend( {}, start ) },\n\t\tanimation2 = { clip: $.extend( {}, start ) },\n\n\t\tdistance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],\n\n\t\tqueuelen = element.queue().length;\n\n\tif ( percent ) {\n\t\tsize = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];\n\t}\n\tanimation1.clip[ ref[ 0 ] ] = size;\n\tanimation2.clip[ ref[ 0 ] ] = size;\n\tanimation2.clip[ ref[ 1 ] ] = 0;\n\n\tif ( show ) {\n\t\telement.cssClip( animation2.clip );\n\t\tif ( placeholder ) {\n\t\t\tplaceholder.css( $.effects.clipToBox( animation2 ) );\n\t\t}\n\n\t\tanimation2.clip = start;\n\t}\n\n\t// Animate\n\telement\n\t\t.queue( function( next ) {\n\t\t\tif ( placeholder ) {\n\t\t\t\tplaceholder\n\t\t\t\t\t.animate( $.effects.clipToBox( animation1 ), duration, options.easing )\n\t\t\t\t\t.animate( $.effects.clipToBox( animation2 ), duration, options.easing );\n\t\t\t}\n\n\t\t\tnext();\n\t\t} )\n\t\t.animate( animation1, duration, options.easing )\n\t\t.animate( animation2, duration, options.easing )\n\t\t.queue( done );\n\n\t$.effects.unshift( element, queuelen, 4 );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-puff.js":"/*!\n * jQuery UI Effects Puff 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Puff Effect\n//>>group: Effects\n//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.\n//>>docs: http://api.jqueryui.com/puff-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\",\n\t\t\t\"./effect-scale\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"puff\", \"hide\", function( options, done ) {\n\tvar newOptions = $.extend( true, {}, options, {\n\t\tfade: true,\n\t\tpercent: parseInt( options.percent, 10 ) || 150\n\t} );\n\n\t$.effects.effect.scale.call( this, newOptions, done );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-transfer.js":"/*!\n * jQuery UI Effects Transfer 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Transfer Effect\n//>>group: Effects\n//>>description: Displays a transfer effect from one element to another.\n//>>docs: http://api.jqueryui.com/transfer-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nvar effect;\nif ( $.uiBackCompat !== false ) {\n\teffect = $.effects.define( \"transfer\", function( options, done ) {\n\t\t$( this ).transfer( options, done );\n\t} );\n}\nreturn effect;\n\n} );\n","jquery/ui-modules/effects/effect-highlight.js":"/*!\n * jQuery UI Effects Highlight 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Highlight Effect\n//>>group: Effects\n//>>description: Highlights the background of an element in a defined color for a custom duration.\n//>>docs: http://api.jqueryui.com/highlight-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"highlight\", \"show\", function( options, done ) {\n\tvar element = $( this ),\n\t\tanimation = {\n\t\t\tbackgroundColor: element.css( \"backgroundColor\" )\n\t\t};\n\n\tif ( options.mode === \"hide\" ) {\n\t\tanimation.opacity = 0;\n\t}\n\n\t$.effects.saveStyle( element );\n\n\telement\n\t\t.css( {\n\t\t\tbackgroundImage: \"none\",\n\t\t\tbackgroundColor: options.color || \"#ffff99\"\n\t\t} )\n\t\t.animate( animation, {\n\t\t\tqueue: false,\n\t\t\tduration: options.duration,\n\t\t\teasing: options.easing,\n\t\t\tcomplete: done\n\t\t} );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-shake.js":"/*!\n * jQuery UI Effects Shake 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Shake Effect\n//>>group: Effects\n//>>description: Shakes an element horizontally or vertically n times.\n//>>docs: http://api.jqueryui.com/shake-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"shake\", function( options, done ) {\n\n\tvar i = 1,\n\t\telement = $( this ),\n\t\tdirection = options.direction || \"left\",\n\t\tdistance = options.distance || 20,\n\t\ttimes = options.times || 3,\n\t\tanims = times * 2 + 1,\n\t\tspeed = Math.round( options.duration / anims ),\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tpositiveMotion = ( direction === \"up\" || direction === \"left\" ),\n\t\tanimation = {},\n\t\tanimation1 = {},\n\t\tanimation2 = {},\n\n\t\tqueuelen = element.queue().length;\n\n\t$.effects.createPlaceholder( element );\n\n\t// Animation\n\tanimation[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance;\n\tanimation1[ ref ] = ( positiveMotion ? \"+=\" : \"-=\" ) + distance * 2;\n\tanimation2[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance * 2;\n\n\t// Animate\n\telement.animate( animation, speed, options.easing );\n\n\t// Shakes\n\tfor ( ; i < times; i++ ) {\n\t\telement\n\t\t\t.animate( animation1, speed, options.easing )\n\t\t\t.animate( animation2, speed, options.easing );\n\t}\n\n\telement\n\t\t.animate( animation1, speed, options.easing )\n\t\t.animate( animation, speed / 2, options.easing )\n\t\t.queue( done );\n\n\t$.effects.unshift( element, queuelen, anims + 1 );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-scale.js":"/*!\n * jQuery UI Effects Scale 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Scale Effect\n//>>group: Effects\n//>>description: Grows or shrinks an element and its content.\n//>>docs: http://api.jqueryui.com/scale-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\",\n\t\t\t\"./effect-size\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"scale\", function( options, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\tmode = options.mode,\n\t\tpercent = parseInt( options.percent, 10 ) ||\n\t\t\t( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== \"effect\" ? 0 : 100 ) ),\n\n\t\tnewOptions = $.extend( true, {\n\t\t\tfrom: $.effects.scaledDimensions( el ),\n\t\t\tto: $.effects.scaledDimensions( el, percent, options.direction || \"both\" ),\n\t\t\torigin: options.origin || [ \"middle\", \"center\" ]\n\t\t}, options );\n\n\t// Fade option to support puff\n\tif ( options.fade ) {\n\t\tnewOptions.from.opacity = 1;\n\t\tnewOptions.to.opacity = 0;\n\t}\n\n\t$.effects.effect.size.call( this, newOptions, done );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-blind.js":"/*!\n * jQuery UI Effects Blind 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Blind Effect\n//>>group: Effects\n//>>description: Blinds the element.\n//>>docs: http://api.jqueryui.com/blind-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"blind\", \"hide\", function( options, done ) {\n\tvar map = {\n\t\t\tup: [ \"bottom\", \"top\" ],\n\t\t\tvertical: [ \"bottom\", \"top\" ],\n\t\t\tdown: [ \"top\", \"bottom\" ],\n\t\t\tleft: [ \"right\", \"left\" ],\n\t\t\thorizontal: [ \"right\", \"left\" ],\n\t\t\tright: [ \"left\", \"right\" ]\n\t\t},\n\t\telement = $( this ),\n\t\tdirection = options.direction || \"up\",\n\t\tstart = element.cssClip(),\n\t\tanimate = { clip: $.extend( {}, start ) },\n\t\tplaceholder = $.effects.createPlaceholder( element );\n\n\tanimate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];\n\n\tif ( options.mode === \"show\" ) {\n\t\telement.cssClip( animate.clip );\n\t\tif ( placeholder ) {\n\t\t\tplaceholder.css( $.effects.clipToBox( animate ) );\n\t\t}\n\n\t\tanimate.clip = start;\n\t}\n\n\tif ( placeholder ) {\n\t\tplaceholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );\n\t}\n\n\telement.animate( animate, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: done\n\t} );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-bounce.js":"/*!\n * jQuery UI Effects Bounce 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Bounce Effect\n//>>group: Effects\n//>>description: Bounces an element horizontally or vertically n times.\n//>>docs: http://api.jqueryui.com/bounce-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"bounce\", function( options, done ) {\n\tvar upAnim, downAnim, refValue,\n\t\telement = $( this ),\n\n\t\t// Defaults:\n\t\tmode = options.mode,\n\t\thide = mode === \"hide\",\n\t\tshow = mode === \"show\",\n\t\tdirection = options.direction || \"up\",\n\t\tdistance = options.distance,\n\t\ttimes = options.times || 5,\n\n\t\t// Number of internal animations\n\t\tanims = times * 2 + ( show || hide ? 1 : 0 ),\n\t\tspeed = options.duration / anims,\n\t\teasing = options.easing,\n\n\t\t// Utility:\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ),\n\t\ti = 0,\n\n\t\tqueuelen = element.queue().length;\n\n\t$.effects.createPlaceholder( element );\n\n\trefValue = element.css( ref );\n\n\t// Default distance for the BIGGEST bounce is the outer Distance / 3\n\tif ( !distance ) {\n\t\tdistance = element[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]() / 3;\n\t}\n\n\tif ( show ) {\n\t\tdownAnim = { opacity: 1 };\n\t\tdownAnim[ ref ] = refValue;\n\n\t\t// If we are showing, force opacity 0 and set the initial position\n\t\t// then do the \"first\" animation\n\t\telement\n\t\t\t.css( \"opacity\", 0 )\n\t\t\t.css( ref, motion ? -distance * 2 : distance * 2 )\n\t\t\t.animate( downAnim, speed, easing );\n\t}\n\n\t// Start at the smallest distance if we are hiding\n\tif ( hide ) {\n\t\tdistance = distance / Math.pow( 2, times - 1 );\n\t}\n\n\tdownAnim = {};\n\tdownAnim[ ref ] = refValue;\n\n\t// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here\n\tfor ( ; i < times; i++ ) {\n\t\tupAnim = {};\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\telement\n\t\t\t.animate( upAnim, speed, easing )\n\t\t\t.animate( downAnim, speed, easing );\n\n\t\tdistance = hide ? distance * 2 : distance / 2;\n\t}\n\n\t// Last Bounce when Hiding\n\tif ( hide ) {\n\t\tupAnim = { opacity: 0 };\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\telement.animate( upAnim, speed, easing );\n\t}\n\n\telement.queue( done );\n\n\t$.effects.unshift( element, queuelen, anims + 1 );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-fade.js":"/*!\n * jQuery UI Effects Fade 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Fade Effect\n//>>group: Effects\n//>>description: Fades the element.\n//>>docs: http://api.jqueryui.com/fade-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"fade\", \"toggle\", function( options, done ) {\n\tvar show = options.mode === \"show\";\n\n\t$( this )\n\t\t.css( \"opacity\", show ? 0 : 1 )\n\t\t.animate( {\n\t\t\topacity: show ? 1 : 0\n\t\t}, {\n\t\t\tqueue: false,\n\t\t\tduration: options.duration,\n\t\t\teasing: options.easing,\n\t\t\tcomplete: done\n\t\t} );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-drop.js":"/*!\n * jQuery UI Effects Drop 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Drop Effect\n//>>group: Effects\n//>>description: Moves an element in one direction and hides it at the same time.\n//>>docs: http://api.jqueryui.com/drop-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"drop\", \"hide\", function( options, done ) {\n\n\tvar distance,\n\t\telement = $( this ),\n\t\tmode = options.mode,\n\t\tshow = mode === \"show\",\n\t\tdirection = options.direction || \"left\",\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ) ? \"-=\" : \"+=\",\n\t\toppositeMotion = ( motion === \"+=\" ) ? \"-=\" : \"+=\",\n\t\tanimation = {\n\t\t\topacity: 0\n\t\t};\n\n\t$.effects.createPlaceholder( element );\n\n\tdistance = options.distance ||\n\t\telement[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true ) / 2;\n\n\tanimation[ ref ] = motion + distance;\n\n\tif ( show ) {\n\t\telement.css( animation );\n\n\t\tanimation[ ref ] = oppositeMotion + distance;\n\t\tanimation.opacity = 1;\n\t}\n\n\t// Animate\n\telement.animate( animation, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: done\n\t} );\n} );\n\n} );\n","jquery/ui-modules/effects/effect-explode.js":"/*!\n * jQuery UI Effects Explode 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Explode Effect\n//>>group: Effects\n/* eslint-disable max-len */\n//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.\n/* eslint-enable max-len */\n//>>docs: http://api.jqueryui.com/explode-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"explode\", \"hide\", function( options, done ) {\n\n\tvar i, j, left, top, mx, my,\n\t\trows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,\n\t\tcells = rows,\n\t\telement = $( this ),\n\t\tmode = options.mode,\n\t\tshow = mode === \"show\",\n\n\t\t// Show and then visibility:hidden the element before calculating offset\n\t\toffset = element.show().css( \"visibility\", \"hidden\" ).offset(),\n\n\t\t// Width and height of a piece\n\t\twidth = Math.ceil( element.outerWidth() / cells ),\n\t\theight = Math.ceil( element.outerHeight() / rows ),\n\t\tpieces = [];\n\n\t// Children animate complete:\n\tfunction childComplete() {\n\t\tpieces.push( this );\n\t\tif ( pieces.length === rows * cells ) {\n\t\t\tanimComplete();\n\t\t}\n\t}\n\n\t// Clone the element for each row and cell.\n\tfor ( i = 0; i < rows; i++ ) { // ===>\n\t\ttop = offset.top + i * height;\n\t\tmy = i - ( rows - 1 ) / 2;\n\n\t\tfor ( j = 0; j < cells; j++ ) { // |||\n\t\t\tleft = offset.left + j * width;\n\t\t\tmx = j - ( cells - 1 ) / 2;\n\n\t\t\t// Create a clone of the now hidden main element that will be absolute positioned\n\t\t\t// within a wrapper div off the -left and -top equal to size of our pieces\n\t\t\telement\n\t\t\t\t.clone()\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.wrap( \"<div></div>\" )\n\t\t\t\t.css( {\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\tvisibility: \"visible\",\n\t\t\t\t\tleft: -j * width,\n\t\t\t\t\ttop: -i * height\n\t\t\t\t} )\n\n\t\t\t\t// Select the wrapper - make it overflow: hidden and absolute positioned based on\n\t\t\t\t// where the original was located +left and +top equal to the size of pieces\n\t\t\t\t.parent()\n\t\t\t\t\t.addClass( \"ui-effects-explode\" )\n\t\t\t\t\t.css( {\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\theight: height,\n\t\t\t\t\t\tleft: left + ( show ? mx * width : 0 ),\n\t\t\t\t\t\ttop: top + ( show ? my * height : 0 ),\n\t\t\t\t\t\topacity: show ? 0 : 1\n\t\t\t\t\t} )\n\t\t\t\t\t.animate( {\n\t\t\t\t\t\tleft: left + ( show ? 0 : mx * width ),\n\t\t\t\t\t\ttop: top + ( show ? 0 : my * height ),\n\t\t\t\t\t\topacity: show ? 1 : 0\n\t\t\t\t\t}, options.duration || 500, options.easing, childComplete );\n\t\t}\n\t}\n\n\tfunction animComplete() {\n\t\telement.css( {\n\t\t\tvisibility: \"visible\"\n\t\t} );\n\t\t$( pieces ).remove();\n\t\tdone();\n\t}\n} );\n\n} );\n","jquery/ui-modules/effects/effect-size.js":"/*!\n * jQuery UI Effects Size 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Size Effect\n//>>group: Effects\n//>>description: Resize an element to a specified width and height.\n//>>docs: http://api.jqueryui.com/size-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"size\", function( options, done ) {\n\n\t// Create element\n\tvar baseline, factor, temp,\n\t\telement = $( this ),\n\n\t\t// Copy for children\n\t\tcProps = [ \"fontSize\" ],\n\t\tvProps = [ \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\" ],\n\t\thProps = [ \"borderLeftWidth\", \"borderRightWidth\", \"paddingLeft\", \"paddingRight\" ],\n\n\t\t// Set options\n\t\tmode = options.mode,\n\t\trestore = mode !== \"effect\",\n\t\tscale = options.scale || \"both\",\n\t\torigin = options.origin || [ \"middle\", \"center\" ],\n\t\tposition = element.css( \"position\" ),\n\t\tpos = element.position(),\n\t\toriginal = $.effects.scaledDimensions( element ),\n\t\tfrom = options.from || original,\n\t\tto = options.to || $.effects.scaledDimensions( element, 0 );\n\n\t$.effects.createPlaceholder( element );\n\n\tif ( mode === \"show\" ) {\n\t\ttemp = from;\n\t\tfrom = to;\n\t\tto = temp;\n\t}\n\n\t// Set scaling factor\n\tfactor = {\n\t\tfrom: {\n\t\t\ty: from.height / original.height,\n\t\t\tx: from.width / original.width\n\t\t},\n\t\tto: {\n\t\t\ty: to.height / original.height,\n\t\t\tx: to.width / original.width\n\t\t}\n\t};\n\n\t// Scale the css box\n\tif ( scale === \"box\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tfrom = $.effects.setTransition( element, vProps, factor.from.y, from );\n\t\t\tto = $.effects.setTransition( element, vProps, factor.to.y, to );\n\t\t}\n\n\t\t// Horizontal props scaling\n\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\tfrom = $.effects.setTransition( element, hProps, factor.from.x, from );\n\t\t\tto = $.effects.setTransition( element, hProps, factor.to.x, to );\n\t\t}\n\t}\n\n\t// Scale the content\n\tif ( scale === \"content\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tfrom = $.effects.setTransition( element, cProps, factor.from.y, from );\n\t\t\tto = $.effects.setTransition( element, cProps, factor.to.y, to );\n\t\t}\n\t}\n\n\t// Adjust the position properties based on the provided origin points\n\tif ( origin ) {\n\t\tbaseline = $.effects.getBaseline( origin, original );\n\t\tfrom.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;\n\t\tfrom.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;\n\t\tto.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;\n\t\tto.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;\n\t}\n\tdelete from.outerHeight;\n\tdelete from.outerWidth;\n\telement.css( from );\n\n\t// Animate the children if desired\n\tif ( scale === \"content\" || scale === \"both\" ) {\n\n\t\tvProps = vProps.concat( [ \"marginTop\", \"marginBottom\" ] ).concat( cProps );\n\t\thProps = hProps.concat( [ \"marginLeft\", \"marginRight\" ] );\n\n\t\t// Only animate children with width attributes specified\n\t\t// TODO: is this right? should we include anything with css width specified as well\n\t\telement.find( \"*[width]\" ).each( function() {\n\t\t\tvar child = $( this ),\n\t\t\t\tchildOriginal = $.effects.scaledDimensions( child ),\n\t\t\t\tchildFrom = {\n\t\t\t\t\theight: childOriginal.height * factor.from.y,\n\t\t\t\t\twidth: childOriginal.width * factor.from.x,\n\t\t\t\t\touterHeight: childOriginal.outerHeight * factor.from.y,\n\t\t\t\t\touterWidth: childOriginal.outerWidth * factor.from.x\n\t\t\t\t},\n\t\t\t\tchildTo = {\n\t\t\t\t\theight: childOriginal.height * factor.to.y,\n\t\t\t\t\twidth: childOriginal.width * factor.to.x,\n\t\t\t\t\touterHeight: childOriginal.height * factor.to.y,\n\t\t\t\t\touterWidth: childOriginal.width * factor.to.x\n\t\t\t\t};\n\n\t\t\t// Vertical props scaling\n\t\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\t\tchildFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );\n\t\t\t\tchildTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );\n\t\t\t}\n\n\t\t\t// Horizontal props scaling\n\t\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\t\tchildFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );\n\t\t\t\tchildTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );\n\t\t\t}\n\n\t\t\tif ( restore ) {\n\t\t\t\t$.effects.saveStyle( child );\n\t\t\t}\n\n\t\t\t// Animate children\n\t\t\tchild.css( childFrom );\n\t\t\tchild.animate( childTo, options.duration, options.easing, function() {\n\n\t\t\t\t// Restore children\n\t\t\t\tif ( restore ) {\n\t\t\t\t\t$.effects.restoreStyle( child );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Animate\n\telement.animate( to, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: function() {\n\n\t\t\tvar offset = element.offset();\n\n\t\t\tif ( to.opacity === 0 ) {\n\t\t\t\telement.css( \"opacity\", from.opacity );\n\t\t\t}\n\n\t\t\tif ( !restore ) {\n\t\t\t\telement\n\t\t\t\t\t.css( \"position\", position === \"static\" ? \"relative\" : position )\n\t\t\t\t\t.offset( offset );\n\n\t\t\t\t// Need to save style here so that automatic style restoration\n\t\t\t\t// doesn't restore to the original styles from before the animation.\n\t\t\t\t$.effects.saveStyle( element );\n\t\t\t}\n\n\t\t\tdone();\n\t\t}\n\t} );\n\n} );\n\n} );\n","jquery/ui-modules/effects/effect-clip.js":"/*!\n * jQuery UI Effects Clip 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Clip Effect\n//>>group: Effects\n//>>description: Clips the element on and off like an old TV.\n//>>docs: http://api.jqueryui.com/clip-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"clip\", \"hide\", function( options, done ) {\n\tvar start,\n\t\tanimate = {},\n\t\telement = $( this ),\n\t\tdirection = options.direction || \"vertical\",\n\t\tboth = direction === \"both\",\n\t\thorizontal = both || direction === \"horizontal\",\n\t\tvertical = both || direction === \"vertical\";\n\n\tstart = element.cssClip();\n\tanimate.clip = {\n\t\ttop: vertical ? ( start.bottom - start.top ) / 2 : start.top,\n\t\tright: horizontal ? ( start.right - start.left ) / 2 : start.right,\n\t\tbottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,\n\t\tleft: horizontal ? ( start.right - start.left ) / 2 : start.left\n\t};\n\n\t$.effects.createPlaceholder( element );\n\n\tif ( options.mode === \"show\" ) {\n\t\telement.cssClip( animate.clip );\n\t\tanimate.clip = start;\n\t}\n\n\telement.animate( animate, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: done\n\t} );\n\n} );\n\n} );\n","jquery/ui-modules/effects/effect-slide.js":"/*!\n * jQuery UI Effects Slide 1.13.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Slide Effect\n//>>group: Effects\n//>>description: Slides an element in and out of the viewport.\n//>>docs: http://api.jqueryui.com/slide-effect/\n//>>demos: http://jqueryui.com/effect/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../version\",\n\t\t\t\"../effect\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.effects.define( \"slide\", \"show\", function( options, done ) {\n\tvar startClip, startRef,\n\t\telement = $( this ),\n\t\tmap = {\n\t\t\tup: [ \"bottom\", \"top\" ],\n\t\t\tdown: [ \"top\", \"bottom\" ],\n\t\t\tleft: [ \"right\", \"left\" ],\n\t\t\tright: [ \"left\", \"right\" ]\n\t\t},\n\t\tmode = options.mode,\n\t\tdirection = options.direction || \"left\",\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tpositiveMotion = ( direction === \"up\" || direction === \"left\" ),\n\t\tdistance = options.distance ||\n\t\t\telement[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true ),\n\t\tanimation = {};\n\n\t$.effects.createPlaceholder( element );\n\n\tstartClip = element.cssClip();\n\tstartRef = element.position()[ ref ];\n\n\t// Define hide animation\n\tanimation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;\n\tanimation.clip = element.cssClip();\n\tanimation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];\n\n\t// Reverse the animation if we're showing\n\tif ( mode === \"show\" ) {\n\t\telement.cssClip( animation.clip );\n\t\telement.css( ref, animation[ ref ] );\n\t\tanimation.clip = startClip;\n\t\tanimation[ ref ] = startRef;\n\t}\n\n\t// Actually animate\n\telement.animate( animation, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: done\n\t} );\n} );\n\n} );\n","jquery/ui-modules/vendor/jquery-color/jquery.color.js":"/*!\n * jQuery Color Animations v2.2.0\n * https://github.com/jquery/jquery-color\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * Date: Sun May 10 09:02:36 2020 +0200\n */\n\n( function( root, factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\" ], factory );\n\t} else if ( typeof exports === \"object\" ) {\n\t\tmodule.exports = factory( require( \"jquery\" ) );\n\t} else {\n\t\tfactory( root.jQuery );\n\t}\n} )( this, function( jQuery, undefined ) {\n\n\tvar stepHooks = \"backgroundColor borderBottomColor borderLeftColor borderRightColor \" +\n\t\t\"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\",\n\n\tclass2type = {},\n\ttoString = class2type.toString,\n\n\t// plusequals test for += 100 -= 100\n\trplusequals = /^([\\-+])=\\s*(\\d+\\.?\\d*)/,\n\n\t// a set of RE's that can match strings and generate color tuples.\n\tstringParsers = [ {\n\t\t\tre: /rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ],\n\t\t\t\t\texecResult[ 3 ],\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ] * 2.55,\n\t\t\t\t\texecResult[ 2 ] * 2.55,\n\t\t\t\t\texecResult[ 3 ] * 2.55,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\n\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ], 16 ),\n\t\t\t\t\texecResult[ 4 ] ?\n\t\t\t\t\t\t( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :\n\t\t\t\t\t\t1\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\n\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),\n\t\t\t\t\texecResult[ 4 ] ?\n\t\t\t\t\t\t( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )\n\t\t\t\t\t\t\t.toFixed( 2 ) :\n\t\t\t\t\t\t1\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tspace: \"hsla\",\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ] / 100,\n\t\t\t\t\texecResult[ 3 ] / 100,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t} ],\n\n\t// jQuery.Color( )\n\tcolor = jQuery.Color = function( color, green, blue, alpha ) {\n\t\treturn new jQuery.Color.fn.parse( color, green, blue, alpha );\n\t},\n\tspaces = {\n\t\trgba: {\n\t\t\tprops: {\n\t\t\t\tred: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tgreen: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tblue: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\thsla: {\n\t\t\tprops: {\n\t\t\t\thue: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"degrees\"\n\t\t\t\t},\n\t\t\t\tsaturation: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t},\n\t\t\t\tlightness: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tpropTypes = {\n\t\t\"byte\": {\n\t\t\tfloor: true,\n\t\t\tmax: 255\n\t\t},\n\t\t\"percent\": {\n\t\t\tmax: 1\n\t\t},\n\t\t\"degrees\": {\n\t\t\tmod: 360,\n\t\t\tfloor: true\n\t\t}\n\t},\n\tsupport = color.support = {},\n\n\t// element for support tests\n\tsupportElem = jQuery( \"<p>\" )[ 0 ],\n\n\t// colors = jQuery.Color.names\n\tcolors,\n\n\t// local aliases of functions called often\n\teach = jQuery.each;\n\n// determine rgba support immediately\nsupportElem.style.cssText = \"background-color:rgba(1,1,1,.5)\";\nsupport.rgba = supportElem.style.backgroundColor.indexOf( \"rgba\" ) > -1;\n\n// define cache name and alpha properties\n// for rgba and hsla spaces\neach( spaces, function( spaceName, space ) {\n\tspace.cache = \"_\" + spaceName;\n\tspace.props.alpha = {\n\t\tidx: 3,\n\t\ttype: \"percent\",\n\t\tdef: 1\n\t};\n} );\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction getType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\treturn typeof obj === \"object\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n\nfunction clamp( value, prop, allowEmpty ) {\n\tvar type = propTypes[ prop.type ] || {};\n\n\tif ( value == null ) {\n\t\treturn ( allowEmpty || !prop.def ) ? null : prop.def;\n\t}\n\n\t// ~~ is an short way of doing floor for positive numbers\n\tvalue = type.floor ? ~~value : parseFloat( value );\n\n\t// IE will pass in empty strings as value for alpha,\n\t// which will hit this case\n\tif ( isNaN( value ) ) {\n\t\treturn prop.def;\n\t}\n\n\tif ( type.mod ) {\n\n\t\t// we add mod before modding to make sure that negatives values\n\t\t// get converted properly: -10 -> 350\n\t\treturn ( value + type.mod ) % type.mod;\n\t}\n\n\t// for now all property types without mod have min and max\n\treturn Math.min( type.max, Math.max( 0, value ) );\n}\n\nfunction stringParse( string ) {\n\tvar inst = color(),\n\t\trgba = inst._rgba = [];\n\n\tstring = string.toLowerCase();\n\n\teach( stringParsers, function( _i, parser ) {\n\t\tvar parsed,\n\t\t\tmatch = parser.re.exec( string ),\n\t\t\tvalues = match && parser.parse( match ),\n\t\t\tspaceName = parser.space || \"rgba\";\n\n\t\tif ( values ) {\n\t\t\tparsed = inst[ spaceName ]( values );\n\n\t\t\t// if this was an rgba parse the assignment might happen twice\n\t\t\t// oh well....\n\t\t\tinst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];\n\t\t\trgba = inst._rgba = parsed._rgba;\n\n\t\t\t// exit each( stringParsers ) here because we matched\n\t\t\treturn false;\n\t\t}\n\t} );\n\n\t// Found a stringParser that handled it\n\tif ( rgba.length ) {\n\n\t\t// if this came from a parsed string, force \"transparent\" when alpha is 0\n\t\t// chrome, (and maybe others) return \"transparent\" as rgba(0,0,0,0)\n\t\tif ( rgba.join() === \"0,0,0,0\" ) {\n\t\t\tjQuery.extend( rgba, colors.transparent );\n\t\t}\n\t\treturn inst;\n\t}\n\n\t// named colors\n\treturn colors[ string ];\n}\n\ncolor.fn = jQuery.extend( color.prototype, {\n\tparse: function( red, green, blue, alpha ) {\n\t\tif ( red === undefined ) {\n\t\t\tthis._rgba = [ null, null, null, null ];\n\t\t\treturn this;\n\t\t}\n\t\tif ( red.jquery || red.nodeType ) {\n\t\t\tred = jQuery( red ).css( green );\n\t\t\tgreen = undefined;\n\t\t}\n\n\t\tvar inst = this,\n\t\t\ttype = getType( red ),\n\t\t\trgba = this._rgba = [];\n\n\t\t// more than 1 argument specified - assume ( red, green, blue, alpha )\n\t\tif ( green !== undefined ) {\n\t\t\tred = [ red, green, blue, alpha ];\n\t\t\ttype = \"array\";\n\t\t}\n\n\t\tif ( type === \"string\" ) {\n\t\t\treturn this.parse( stringParse( red ) || colors._default );\n\t\t}\n\n\t\tif ( type === \"array\" ) {\n\t\t\teach( spaces.rgba.props, function( _key, prop ) {\n\t\t\t\trgba[ prop.idx ] = clamp( red[ prop.idx ], prop );\n\t\t\t} );\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( type === \"object\" ) {\n\t\t\tif ( red instanceof color ) {\n\t\t\t\teach( spaces, function( _spaceName, space ) {\n\t\t\t\t\tif ( red[ space.cache ] ) {\n\t\t\t\t\t\tinst[ space.cache ] = red[ space.cache ].slice();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\teach( spaces, function( _spaceName, space ) {\n\t\t\t\t\tvar cache = space.cache;\n\t\t\t\t\teach( space.props, function( key, prop ) {\n\n\t\t\t\t\t\t// if the cache doesn't exist, and we know how to convert\n\t\t\t\t\t\tif ( !inst[ cache ] && space.to ) {\n\n\t\t\t\t\t\t\t// if the value was null, we don't need to copy it\n\t\t\t\t\t\t\t// if the key was alpha, we don't need to copy it either\n\t\t\t\t\t\t\tif ( key === \"alpha\" || red[ key ] == null ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinst[ cache ] = space.to( inst._rgba );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// this is the only case where we allow nulls for ALL properties.\n\t\t\t\t\t\t// call clamp with alwaysAllowEmpty\n\t\t\t\t\t\tinst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );\n\t\t\t\t\t} );\n\n\t\t\t\t\t// everything defined but alpha?\n\t\t\t\t\tif ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {\n\n\t\t\t\t\t\t// use the default of 1\n\t\t\t\t\t\tif ( inst[ cache ][ 3 ] == null ) {\n\t\t\t\t\t\t\tinst[ cache ][ 3 ] = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( space.from ) {\n\t\t\t\t\t\t\tinst._rgba = space.from( inst[ cache ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t},\n\tis: function( compare ) {\n\t\tvar is = color( compare ),\n\t\t\tsame = true,\n\t\t\tinst = this;\n\n\t\teach( spaces, function( _, space ) {\n\t\t\tvar localCache,\n\t\t\t\tisCache = is[ space.cache ];\n\t\t\tif ( isCache ) {\n\t\t\t\tlocalCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];\n\t\t\t\teach( space.props, function( _, prop ) {\n\t\t\t\t\tif ( isCache[ prop.idx ] != null ) {\n\t\t\t\t\t\tsame = ( isCache[ prop.idx ] === localCache[ prop.idx ] );\n\t\t\t\t\t\treturn same;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn same;\n\t\t} );\n\t\treturn same;\n\t},\n\t_space: function() {\n\t\tvar used = [],\n\t\t\tinst = this;\n\t\teach( spaces, function( spaceName, space ) {\n\t\t\tif ( inst[ space.cache ] ) {\n\t\t\t\tused.push( spaceName );\n\t\t\t}\n\t\t} );\n\t\treturn used.pop();\n\t},\n\ttransition: function( other, distance ) {\n\t\tvar end = color( other ),\n\t\t\tspaceName = end._space(),\n\t\t\tspace = spaces[ spaceName ],\n\t\t\tstartColor = this.alpha() === 0 ? color( \"transparent\" ) : this,\n\t\t\tstart = startColor[ space.cache ] || space.to( startColor._rgba ),\n\t\t\tresult = start.slice();\n\n\t\tend = end[ space.cache ];\n\t\teach( space.props, function( _key, prop ) {\n\t\t\tvar index = prop.idx,\n\t\t\t\tstartValue = start[ index ],\n\t\t\t\tendValue = end[ index ],\n\t\t\t\ttype = propTypes[ prop.type ] || {};\n\n\t\t\t// if null, don't override start value\n\t\t\tif ( endValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if null - use end\n\t\t\tif ( startValue === null ) {\n\t\t\t\tresult[ index ] = endValue;\n\t\t\t} else {\n\t\t\t\tif ( type.mod ) {\n\t\t\t\t\tif ( endValue - startValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue += type.mod;\n\t\t\t\t\t} else if ( startValue - endValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue -= type.mod;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );\n\t\t\t}\n\t\t} );\n\t\treturn this[ spaceName ]( result );\n\t},\n\tblend: function( opaque ) {\n\n\t\t// if we are already opaque - return ourself\n\t\tif ( this._rgba[ 3 ] === 1 ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar rgb = this._rgba.slice(),\n\t\t\ta = rgb.pop(),\n\t\t\tblend = color( opaque )._rgba;\n\n\t\treturn color( jQuery.map( rgb, function( v, i ) {\n\t\t\treturn ( 1 - a ) * blend[ i ] + a * v;\n\t\t} ) );\n\t},\n\ttoRgbaString: function() {\n\t\tvar prefix = \"rgba(\",\n\t\t\trgba = jQuery.map( this._rgba, function( v, i ) {\n\t\t\t\tif ( v != null ) {\n\t\t\t\t\treturn v;\n\t\t\t\t}\n\t\t\t\treturn i > 2 ? 1 : 0;\n\t\t\t} );\n\n\t\tif ( rgba[ 3 ] === 1 ) {\n\t\t\trgba.pop();\n\t\t\tprefix = \"rgb(\";\n\t\t}\n\n\t\treturn prefix + rgba.join() + \")\";\n\t},\n\ttoHslaString: function() {\n\t\tvar prefix = \"hsla(\",\n\t\t\thsla = jQuery.map( this.hsla(), function( v, i ) {\n\t\t\t\tif ( v == null ) {\n\t\t\t\t\tv = i > 2 ? 1 : 0;\n\t\t\t\t}\n\n\t\t\t\t// catch 1 and 2\n\t\t\t\tif ( i && i < 3 ) {\n\t\t\t\t\tv = Math.round( v * 100 ) + \"%\";\n\t\t\t\t}\n\t\t\t\treturn v;\n\t\t\t} );\n\n\t\tif ( hsla[ 3 ] === 1 ) {\n\t\t\thsla.pop();\n\t\t\tprefix = \"hsl(\";\n\t\t}\n\t\treturn prefix + hsla.join() + \")\";\n\t},\n\ttoHexString: function( includeAlpha ) {\n\t\tvar rgba = this._rgba.slice(),\n\t\t\talpha = rgba.pop();\n\n\t\tif ( includeAlpha ) {\n\t\t\trgba.push( ~~( alpha * 255 ) );\n\t\t}\n\n\t\treturn \"#\" + jQuery.map( rgba, function( v ) {\n\n\t\t\t// default to 0 when nulls exist\n\t\t\tv = ( v || 0 ).toString( 16 );\n\t\t\treturn v.length === 1 ? \"0\" + v : v;\n\t\t} ).join( \"\" );\n\t},\n\ttoString: function() {\n\t\treturn this._rgba[ 3 ] === 0 ? \"transparent\" : this.toRgbaString();\n\t}\n} );\ncolor.fn.parse.prototype = color.fn;\n\n// hsla conversions adapted from:\n// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021\n\nfunction hue2rgb( p, q, h ) {\n\th = ( h + 1 ) % 1;\n\tif ( h * 6 < 1 ) {\n\t\treturn p + ( q - p ) * h * 6;\n\t}\n\tif ( h * 2 < 1 ) {\n\t\treturn q;\n\t}\n\tif ( h * 3 < 2 ) {\n\t\treturn p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;\n\t}\n\treturn p;\n}\n\nspaces.hsla.to = function( rgba ) {\n\tif ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {\n\t\treturn [ null, null, null, rgba[ 3 ] ];\n\t}\n\tvar r = rgba[ 0 ] / 255,\n\t\tg = rgba[ 1 ] / 255,\n\t\tb = rgba[ 2 ] / 255,\n\t\ta = rgba[ 3 ],\n\t\tmax = Math.max( r, g, b ),\n\t\tmin = Math.min( r, g, b ),\n\t\tdiff = max - min,\n\t\tadd = max + min,\n\t\tl = add * 0.5,\n\t\th, s;\n\n\tif ( min === max ) {\n\t\th = 0;\n\t} else if ( r === max ) {\n\t\th = ( 60 * ( g - b ) / diff ) + 360;\n\t} else if ( g === max ) {\n\t\th = ( 60 * ( b - r ) / diff ) + 120;\n\t} else {\n\t\th = ( 60 * ( r - g ) / diff ) + 240;\n\t}\n\n\t// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%\n\t// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)\n\tif ( diff === 0 ) {\n\t\ts = 0;\n\t} else if ( l <= 0.5 ) {\n\t\ts = diff / add;\n\t} else {\n\t\ts = diff / ( 2 - add );\n\t}\n\treturn [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];\n};\n\nspaces.hsla.from = function( hsla ) {\n\tif ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {\n\t\treturn [ null, null, null, hsla[ 3 ] ];\n\t}\n\tvar h = hsla[ 0 ] / 360,\n\t\ts = hsla[ 1 ],\n\t\tl = hsla[ 2 ],\n\t\ta = hsla[ 3 ],\n\t\tq = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,\n\t\tp = 2 * l - q;\n\n\treturn [\n\t\tMath.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),\n\t\ta\n\t];\n};\n\n\neach( spaces, function( spaceName, space ) {\n\tvar props = space.props,\n\t\tcache = space.cache,\n\t\tto = space.to,\n\t\tfrom = space.from;\n\n\t// makes rgba() and hsla()\n\tcolor.fn[ spaceName ] = function( value ) {\n\n\t\t// generate a cache for this space if it doesn't exist\n\t\tif ( to && !this[ cache ] ) {\n\t\t\tthis[ cache ] = to( this._rgba );\n\t\t}\n\t\tif ( value === undefined ) {\n\t\t\treturn this[ cache ].slice();\n\t\t}\n\n\t\tvar ret,\n\t\t\ttype = getType( value ),\n\t\t\tarr = ( type === \"array\" || type === \"object\" ) ? value : arguments,\n\t\t\tlocal = this[ cache ].slice();\n\n\t\teach( props, function( key, prop ) {\n\t\t\tvar val = arr[ type === \"object\" ? key : prop.idx ];\n\t\t\tif ( val == null ) {\n\t\t\t\tval = local[ prop.idx ];\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = clamp( val, prop );\n\t\t} );\n\n\t\tif ( from ) {\n\t\t\tret = color( from( local ) );\n\t\t\tret[ cache ] = local;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn color( local );\n\t\t}\n\t};\n\n\t// makes red() green() blue() alpha() hue() saturation() lightness()\n\teach( props, function( key, prop ) {\n\n\t\t// alpha is included in more than one space\n\t\tif ( color.fn[ key ] ) {\n\t\t\treturn;\n\t\t}\n\t\tcolor.fn[ key ] = function( value ) {\n\t\t\tvar local, cur, match, fn,\n\t\t\t\tvtype = getType( value );\n\n\t\t\tif ( key === \"alpha\" ) {\n\t\t\t\tfn = this._hsla ? \"hsla\" : \"rgba\";\n\t\t\t} else {\n\t\t\t\tfn = spaceName;\n\t\t\t}\n\t\t\tlocal = this[ fn ]();\n\t\t\tcur = local[ prop.idx ];\n\n\t\t\tif ( vtype === \"undefined\" ) {\n\t\t\t\treturn cur;\n\t\t\t}\n\n\t\t\tif ( vtype === \"function\" ) {\n\t\t\t\tvalue = value.call( this, cur );\n\t\t\t\tvtype = getType( value );\n\t\t\t}\n\t\t\tif ( value == null && prop.empty ) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif ( vtype === \"string\" ) {\n\t\t\t\tmatch = rplusequals.exec( value );\n\t\t\t\tif ( match ) {\n\t\t\t\t\tvalue = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === \"+\" ? 1 : -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = value;\n\t\t\treturn this[ fn ]( local );\n\t\t};\n\t} );\n} );\n\n// add cssHook and .fx.step function for each named hook.\n// accept a space separated string of properties\ncolor.hook = function( hook ) {\n\tvar hooks = hook.split( \" \" );\n\teach( hooks, function( _i, hook ) {\n\t\tjQuery.cssHooks[ hook ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar parsed, curElem,\n\t\t\t\t\tbackgroundColor = \"\";\n\n\t\t\t\tif ( value !== \"transparent\" && ( getType( value ) !== \"string\" || ( parsed = stringParse( value ) ) ) ) {\n\t\t\t\t\tvalue = color( parsed || value );\n\t\t\t\t\tif ( !support.rgba && value._rgba[ 3 ] !== 1 ) {\n\t\t\t\t\t\tcurElem = hook === \"backgroundColor\" ? elem.parentNode : elem;\n\t\t\t\t\t\twhile (\n\t\t\t\t\t\t\t( backgroundColor === \"\" || backgroundColor === \"transparent\" ) &&\n\t\t\t\t\t\t\tcurElem && curElem.style\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tbackgroundColor = jQuery.css( curElem, \"backgroundColor\" );\n\t\t\t\t\t\t\t\tcurElem = curElem.parentNode;\n\t\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvalue = value.blend( backgroundColor && backgroundColor !== \"transparent\" ?\n\t\t\t\t\t\t\tbackgroundColor :\n\t\t\t\t\t\t\t\"_default\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = value.toRgbaString();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\telem.style[ hook ] = value;\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// wrapped to prevent IE from throwing errors on \"invalid\" values like 'auto' or 'inherit'\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tjQuery.fx.step[ hook ] = function( fx ) {\n\t\t\tif ( !fx.colorInit ) {\n\t\t\t\tfx.start = color( fx.elem, hook );\n\t\t\t\tfx.end = color( fx.end );\n\t\t\t\tfx.colorInit = true;\n\t\t\t}\n\t\t\tjQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );\n\t\t};\n\t} );\n\n};\n\ncolor.hook( stepHooks );\n\njQuery.cssHooks.borderColor = {\n\texpand: function( value ) {\n\t\tvar expanded = {};\n\n\t\teach( [ \"Top\", \"Right\", \"Bottom\", \"Left\" ], function( _i, part ) {\n\t\t\texpanded[ \"border\" + part + \"Color\" ] = value;\n\t\t} );\n\t\treturn expanded;\n\t}\n};\n\n// Basic color names only.\n// Usage of any of the other color names requires adding yourself or including\n// jquery.color.svg-names.js.\ncolors = jQuery.Color.names = {\n\n\t// 4.1. Basic color keywords\n\taqua: \"#00ffff\",\n\tblack: \"#000000\",\n\tblue: \"#0000ff\",\n\tfuchsia: \"#ff00ff\",\n\tgray: \"#808080\",\n\tgreen: \"#008000\",\n\tlime: \"#00ff00\",\n\tmaroon: \"#800000\",\n\tnavy: \"#000080\",\n\tolive: \"#808000\",\n\tpurple: \"#800080\",\n\tred: \"#ff0000\",\n\tsilver: \"#c0c0c0\",\n\tteal: \"#008080\",\n\twhite: \"#ffffff\",\n\tyellow: \"#ffff00\",\n\n\t// 4.2.3. \"transparent\" color keyword\n\ttransparent: [ null, null, null, 0 ],\n\n\t_default: \"#ffffff\"\n};\n\n} );\n"}
}});