\", {\n title: item.element.attr(\"title\")\n });\n\n if (item.disabled) {\n this._addClass(li, null, \"ui-state-disabled\");\n }\n\n this._setText(wrapper, item.label);\n\n return li.append(wrapper).appendTo(ul);\n },\n _setText: function (element, value) {\n if (value) {\n element.text(value);\n } else {\n element.html(\" \");\n }\n },\n _move: function (direction, event) {\n var item,\n next,\n filter = \".ui-menu-item\";\n\n if (this.isOpen) {\n item = this.menuItems.eq(this.focusIndex).parent(\"li\");\n } else {\n item = this.menuItems.eq(this.element[0].selectedIndex).parent(\"li\");\n filter += \":not(.ui-state-disabled)\";\n }\n\n if (direction === \"first\" || direction === \"last\") {\n next = item[direction === \"first\" ? \"prevAll\" : \"nextAll\"](filter).eq(-1);\n } else {\n next = item[direction + \"All\"](filter).eq(0);\n }\n\n if (next.length) {\n this.menuInstance.focus(event, next);\n }\n },\n _getSelectedItem: function () {\n return this.menuItems.eq(this.element[0].selectedIndex).parent(\"li\");\n },\n _toggle: function (event) {\n this[this.isOpen ? \"close\" : \"open\"](event);\n },\n _setSelection: function () {\n var selection;\n\n if (!this.range) {\n return;\n }\n\n if (window.getSelection) {\n selection = window.getSelection();\n selection.removeAllRanges();\n selection.addRange(this.range); // Support: IE8\n } else {\n this.range.select();\n } // Support: IE\n // Setting the text selection kills the button focus in IE, but\n // restoring the focus doesn't kill the selection.\n\n\n this.button.focus();\n },\n _documentClick: {\n mousedown: function (event) {\n if (!this.isOpen) {\n return;\n }\n\n if (!$(event.target).closest(\".ui-selectmenu-menu, #\" + $.ui.escapeSelector(this.ids.button)).length) {\n this.close(event);\n }\n }\n },\n _buttonEvents: {\n // Prevent text selection from being reset when interacting with the selectmenu (#10144)\n mousedown: function () {\n var selection;\n\n if (window.getSelection) {\n selection = window.getSelection();\n\n if (selection.rangeCount) {\n this.range = selection.getRangeAt(0);\n } // Support: IE8\n\n } else {\n this.range = document.selection.createRange();\n }\n },\n click: function (event) {\n this._setSelection();\n\n this._toggle(event);\n },\n keydown: function (event) {\n var preventDefault = true;\n\n switch (event.keyCode) {\n case $.ui.keyCode.TAB:\n case $.ui.keyCode.ESCAPE:\n this.close(event);\n preventDefault = false;\n break;\n\n case $.ui.keyCode.ENTER:\n if (this.isOpen) {\n this._selectFocusedItem(event);\n }\n\n break;\n\n case $.ui.keyCode.UP:\n if (event.altKey) {\n this._toggle(event);\n } else {\n this._move(\"prev\", event);\n }\n\n break;\n\n case $.ui.keyCode.DOWN:\n if (event.altKey) {\n this._toggle(event);\n } else {\n this._move(\"next\", event);\n }\n\n break;\n\n case $.ui.keyCode.SPACE:\n if (this.isOpen) {\n this._selectFocusedItem(event);\n } else {\n this._toggle(event);\n }\n\n break;\n\n case $.ui.keyCode.LEFT:\n this._move(\"prev\", event);\n\n break;\n\n case $.ui.keyCode.RIGHT:\n this._move(\"next\", event);\n\n break;\n\n case $.ui.keyCode.HOME:\n case $.ui.keyCode.PAGE_UP:\n this._move(\"first\", event);\n\n break;\n\n case $.ui.keyCode.END:\n case $.ui.keyCode.PAGE_DOWN:\n this._move(\"last\", event);\n\n break;\n\n default:\n this.menu.trigger(event);\n preventDefault = false;\n }\n\n if (preventDefault) {\n event.preventDefault();\n }\n }\n },\n _selectFocusedItem: function (event) {\n var item = this.menuItems.eq(this.focusIndex).parent(\"li\");\n\n if (!item.hasClass(\"ui-state-disabled\")) {\n this._select(item.data(\"ui-selectmenu-item\"), event);\n }\n },\n _select: function (item, event) {\n var oldIndex = this.element[0].selectedIndex; // Change native select element\n\n this.element[0].selectedIndex = item.index;\n this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(item));\n\n this._setAria(item);\n\n this._trigger(\"select\", event, {\n item: item\n });\n\n if (item.index !== oldIndex) {\n this._trigger(\"change\", event, {\n item: item\n });\n }\n\n this.close(event);\n },\n _setAria: function (item) {\n var id = this.menuItems.eq(item.index).attr(\"id\");\n this.button.attr({\n \"aria-labelledby\": id,\n \"aria-activedescendant\": id\n });\n this.menu.attr(\"aria-activedescendant\", id);\n },\n _setOption: function (key, value) {\n if (key === \"icons\") {\n var icon = this.button.find(\"span.ui-icon\");\n\n this._removeClass(icon, null, this.options.icons.button)._addClass(icon, null, value.button);\n }\n\n this._super(key, value);\n\n if (key === \"appendTo\") {\n this.menuWrap.appendTo(this._appendTo());\n }\n\n if (key === \"width\") {\n this._resizeButton();\n }\n },\n _setOptionDisabled: function (value) {\n this._super(value);\n\n this.menuInstance.option(\"disabled\", value);\n this.button.attr(\"aria-disabled\", value);\n\n this._toggleClass(this.button, null, \"ui-state-disabled\", value);\n\n this.element.prop(\"disabled\", value);\n\n if (value) {\n this.button.attr(\"tabindex\", -1);\n this.close();\n } else {\n this.button.attr(\"tabindex\", 0);\n }\n },\n _appendTo: function () {\n var element = this.options.appendTo;\n\n if (element) {\n element = element.jquery || element.nodeType ? $(element) : this.document.find(element).eq(0);\n }\n\n if (!element || !element[0]) {\n element = this.element.closest(\".ui-front, dialog\");\n }\n\n if (!element.length) {\n element = this.document[0].body;\n }\n\n return element;\n },\n _toggleAttr: function () {\n this.button.attr(\"aria-expanded\", this.isOpen); // We can't use two _toggleClass() calls here, because we need to make sure\n // we always remove classes first and add them second, otherwise if both classes have the\n // same theme class, it will be removed after we add it.\n\n this._removeClass(this.button, \"ui-selectmenu-button-\" + (this.isOpen ? \"closed\" : \"open\"))._addClass(this.button, \"ui-selectmenu-button-\" + (this.isOpen ? \"open\" : \"closed\"))._toggleClass(this.menuWrap, \"ui-selectmenu-open\", null, this.isOpen);\n\n this.menu.attr(\"aria-hidden\", !this.isOpen);\n },\n _resizeButton: function () {\n var width = this.options.width; // For `width: false`, just remove inline style and stop\n\n if (width === false) {\n this.button.css(\"width\", \"\");\n return;\n } // For `width: null`, match the width of the original element\n\n\n if (width === null) {\n width = this.element.show().outerWidth();\n this.element.hide();\n }\n\n this.button.outerWidth(width);\n },\n _resizeMenu: function () {\n this.menu.outerWidth(Math.max(this.button.outerWidth(), // Support: IE10\n // IE10 wraps long text (possibly a rounding bug)\n // so we add 1px to avoid the wrapping\n this.menu.width(\"\").outerWidth() + 1));\n },\n _getCreateOptions: function () {\n var options = this._super();\n\n options.disabled = this.element.prop(\"disabled\");\n return options;\n },\n _parseOptions: function (options) {\n var that = this,\n data = [];\n options.each(function (index, item) {\n data.push(that._parseOption($(item), index));\n });\n this.items = data;\n },\n _parseOption: function (option, index) {\n var optgroup = option.parent(\"optgroup\");\n return {\n element: option,\n index: index,\n value: option.val(),\n label: option.text(),\n optgroup: optgroup.attr(\"label\") || \"\",\n disabled: optgroup.prop(\"disabled\") || option.prop(\"disabled\")\n };\n },\n _destroy: function () {\n this._unbindFormResetHandler();\n\n this.menuWrap.remove();\n this.button.remove();\n this.element.show();\n this.element.removeUniqueId();\n this.labels.attr(\"for\", this.ids.element);\n }\n }]);\n /*!\n * jQuery UI Slider 1.12.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 //>>label: Slider\n //>>group: Widgets\n //>>description: Displays a flexible slider with ranges and accessibility via keyboard.\n //>>docs: http://api.jqueryui.com/slider/\n //>>demos: http://jqueryui.com/slider/\n //>>css.structure: ../../themes/base/core.css\n //>>css.structure: ../../themes/base/slider.css\n //>>css.theme: ../../themes/base/theme.css\n\n var widgetsSlider = $.widget(\"ui.slider\", $.ui.mouse, {\n version: \"1.12.1\",\n widgetEventPrefix: \"slide\",\n options: {\n animate: false,\n classes: {\n \"ui-slider\": \"ui-corner-all\",\n \"ui-slider-handle\": \"ui-corner-all\",\n // Note: ui-widget-header isn't the most fittingly semantic framework class for this\n // element, but worked best visually with a variety of themes\n \"ui-slider-range\": \"ui-corner-all ui-widget-header\"\n },\n distance: 0,\n max: 100,\n min: 0,\n orientation: \"horizontal\",\n range: false,\n step: 1,\n value: 0,\n values: null,\n // Callbacks\n change: null,\n slide: null,\n start: null,\n stop: null\n },\n // Number of pages in a slider\n // (how many times can you page up/down to go through the whole range)\n numPages: 5,\n _create: function () {\n this._keySliding = false;\n this._mouseSliding = false;\n this._animateOff = true;\n this._handleIndex = null;\n\n this._detectOrientation();\n\n this._mouseInit();\n\n this._calculateNewMax();\n\n this._addClass(\"ui-slider ui-slider-\" + this.orientation, \"ui-widget ui-widget-content\");\n\n this._refresh();\n\n this._animateOff = false;\n },\n _refresh: function () {\n this._createRange();\n\n this._createHandles();\n\n this._setupEvents();\n\n this._refreshValue();\n },\n _createHandles: function () {\n var i,\n handleCount,\n options = this.options,\n existingHandles = this.element.find(\".ui-slider-handle\"),\n handle = \"
\",\n handles = [];\n handleCount = options.values && options.values.length || 1;\n\n if (existingHandles.length > handleCount) {\n existingHandles.slice(handleCount).remove();\n existingHandles = existingHandles.slice(0, handleCount);\n }\n\n for (i = existingHandles.length; i < handleCount; i++) {\n handles.push(handle);\n }\n\n this.handles = existingHandles.add($(handles.join(\"\")).appendTo(this.element));\n\n this._addClass(this.handles, \"ui-slider-handle\", \"ui-state-default\");\n\n this.handle = this.handles.eq(0);\n this.handles.each(function (i) {\n $(this).data(\"ui-slider-handle-index\", i).attr(\"tabIndex\", 0);\n });\n },\n _createRange: function () {\n var options = this.options;\n\n if (options.range) {\n if (options.range === true) {\n if (!options.values) {\n options.values = [this._valueMin(), this._valueMin()];\n } else if (options.values.length && options.values.length !== 2) {\n options.values = [options.values[0], options.values[0]];\n } else if ($.isArray(options.values)) {\n options.values = options.values.slice(0);\n }\n }\n\n if (!this.range || !this.range.length) {\n this.range = $(\"
\").appendTo(this.element);\n\n this._addClass(this.range, \"ui-slider-range\");\n } else {\n this._removeClass(this.range, \"ui-slider-range-min ui-slider-range-max\"); // Handle range switching from true to min/max\n\n\n this.range.css({\n \"left\": \"\",\n \"bottom\": \"\"\n });\n }\n\n if (options.range === \"min\" || options.range === \"max\") {\n this._addClass(this.range, \"ui-slider-range-\" + options.range);\n }\n } else {\n if (this.range) {\n this.range.remove();\n }\n\n this.range = null;\n }\n },\n _setupEvents: function () {\n this._off(this.handles);\n\n this._on(this.handles, this._handleEvents);\n\n this._hoverable(this.handles);\n\n this._focusable(this.handles);\n },\n _destroy: function () {\n this.handles.remove();\n\n if (this.range) {\n this.range.remove();\n }\n\n this._mouseDestroy();\n },\n _mouseCapture: function (event) {\n var position,\n normValue,\n distance,\n closestHandle,\n index,\n allowed,\n offset,\n mouseOverHandle,\n that = this,\n o = this.options;\n\n if (o.disabled) {\n return false;\n }\n\n this.elementSize = {\n width: this.element.outerWidth(),\n height: this.element.outerHeight()\n };\n this.elementOffset = this.element.offset();\n position = {\n x: event.pageX,\n y: event.pageY\n };\n normValue = this._normValueFromMouse(position);\n distance = this._valueMax() - this._valueMin() + 1;\n this.handles.each(function (i) {\n var thisDistance = Math.abs(normValue - that.values(i));\n\n if (distance > thisDistance || distance === thisDistance && (i === that._lastChangedValue || that.values(i) === o.min)) {\n distance = thisDistance;\n closestHandle = $(this);\n index = i;\n }\n });\n allowed = this._start(event, index);\n\n if (allowed === false) {\n return false;\n }\n\n this._mouseSliding = true;\n this._handleIndex = index;\n\n this._addClass(closestHandle, null, \"ui-state-active\");\n\n closestHandle.trigger(\"focus\");\n offset = closestHandle.offset();\n mouseOverHandle = !$(event.target).parents().addBack().is(\".ui-slider-handle\");\n this._clickOffset = mouseOverHandle ? {\n left: 0,\n top: 0\n } : {\n left: event.pageX - offset.left - closestHandle.width() / 2,\n top: event.pageY - offset.top - closestHandle.height() / 2 - (parseInt(closestHandle.css(\"borderTopWidth\"), 10) || 0) - (parseInt(closestHandle.css(\"borderBottomWidth\"), 10) || 0) + (parseInt(closestHandle.css(\"marginTop\"), 10) || 0)\n };\n\n if (!this.handles.hasClass(\"ui-state-hover\")) {\n this._slide(event, index, normValue);\n }\n\n this._animateOff = true;\n return true;\n },\n _mouseStart: function () {\n return true;\n },\n _mouseDrag: function (event) {\n var position = {\n x: event.pageX,\n y: event.pageY\n },\n normValue = this._normValueFromMouse(position);\n\n this._slide(event, this._handleIndex, normValue);\n\n return false;\n },\n _mouseStop: function (event) {\n this._removeClass(this.handles, null, \"ui-state-active\");\n\n this._mouseSliding = false;\n\n this._stop(event, this._handleIndex);\n\n this._change(event, this._handleIndex);\n\n this._handleIndex = null;\n this._clickOffset = null;\n this._animateOff = false;\n return false;\n },\n _detectOrientation: function () {\n this.orientation = this.options.orientation === \"vertical\" ? \"vertical\" : \"horizontal\";\n },\n _normValueFromMouse: function (position) {\n var pixelTotal, pixelMouse, percentMouse, valueTotal, valueMouse;\n\n if (this.orientation === \"horizontal\") {\n pixelTotal = this.elementSize.width;\n pixelMouse = position.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0);\n } else {\n pixelTotal = this.elementSize.height;\n pixelMouse = position.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0);\n }\n\n percentMouse = pixelMouse / pixelTotal;\n\n if (percentMouse > 1) {\n percentMouse = 1;\n }\n\n if (percentMouse < 0) {\n percentMouse = 0;\n }\n\n if (this.orientation === \"vertical\") {\n percentMouse = 1 - percentMouse;\n }\n\n valueTotal = this._valueMax() - this._valueMin();\n valueMouse = this._valueMin() + percentMouse * valueTotal;\n return this._trimAlignValue(valueMouse);\n },\n _uiHash: function (index, value, values) {\n var uiHash = {\n handle: this.handles[index],\n handleIndex: index,\n value: value !== undefined ? value : this.value()\n };\n\n if (this._hasMultipleValues()) {\n uiHash.value = value !== undefined ? value : this.values(index);\n uiHash.values = values || this.values();\n }\n\n return uiHash;\n },\n _hasMultipleValues: function () {\n return this.options.values && this.options.values.length;\n },\n _start: function (event, index) {\n return this._trigger(\"start\", event, this._uiHash(index));\n },\n _slide: function (event, index, newVal) {\n var allowed,\n otherVal,\n currentValue = this.value(),\n newValues = this.values();\n\n if (this._hasMultipleValues()) {\n otherVal = this.values(index ? 0 : 1);\n currentValue = this.values(index);\n\n if (this.options.values.length === 2 && this.options.range === true) {\n newVal = index === 0 ? Math.min(otherVal, newVal) : Math.max(otherVal, newVal);\n }\n\n newValues[index] = newVal;\n }\n\n if (newVal === currentValue) {\n return;\n }\n\n allowed = this._trigger(\"slide\", event, this._uiHash(index, newVal, newValues)); // A slide can be canceled by returning false from the slide callback\n\n if (allowed === false) {\n return;\n }\n\n if (this._hasMultipleValues()) {\n this.values(index, newVal);\n } else {\n this.value(newVal);\n }\n },\n _stop: function (event, index) {\n this._trigger(\"stop\", event, this._uiHash(index));\n },\n _change: function (event, index) {\n if (!this._keySliding && !this._mouseSliding) {\n //store the last changed value index for reference when handles overlap\n this._lastChangedValue = index;\n\n this._trigger(\"change\", event, this._uiHash(index));\n }\n },\n value: function (newValue) {\n if (arguments.length) {\n this.options.value = this._trimAlignValue(newValue);\n\n this._refreshValue();\n\n this._change(null, 0);\n\n return;\n }\n\n return this._value();\n },\n values: function (index, newValue) {\n var vals, newValues, i;\n\n if (arguments.length > 1) {\n this.options.values[index] = this._trimAlignValue(newValue);\n\n this._refreshValue();\n\n this._change(null, index);\n\n return;\n }\n\n if (arguments.length) {\n if ($.isArray(arguments[0])) {\n vals = this.options.values;\n newValues = arguments[0];\n\n for (i = 0; i < vals.length; i += 1) {\n vals[i] = this._trimAlignValue(newValues[i]);\n\n this._change(null, i);\n }\n\n this._refreshValue();\n } else {\n if (this._hasMultipleValues()) {\n return this._values(index);\n } else {\n return this.value();\n }\n }\n } else {\n return this._values();\n }\n },\n _setOption: function (key, value) {\n var i,\n valsLength = 0;\n\n if (key === \"range\" && this.options.range === true) {\n if (value === \"min\") {\n this.options.value = this._values(0);\n this.options.values = null;\n } else if (value === \"max\") {\n this.options.value = this._values(this.options.values.length - 1);\n this.options.values = null;\n }\n }\n\n if ($.isArray(this.options.values)) {\n valsLength = this.options.values.length;\n }\n\n this._super(key, value);\n\n switch (key) {\n case \"orientation\":\n this._detectOrientation();\n\n this._removeClass(\"ui-slider-horizontal ui-slider-vertical\")._addClass(\"ui-slider-\" + this.orientation);\n\n this._refreshValue();\n\n if (this.options.range) {\n this._refreshRange(value);\n } // Reset positioning from previous orientation\n\n\n this.handles.css(value === \"horizontal\" ? \"bottom\" : \"left\", \"\");\n break;\n\n case \"value\":\n this._animateOff = true;\n\n this._refreshValue();\n\n this._change(null, 0);\n\n this._animateOff = false;\n break;\n\n case \"values\":\n this._animateOff = true;\n\n this._refreshValue(); // Start from the last handle to prevent unreachable handles (#9046)\n\n\n for (i = valsLength - 1; i >= 0; i--) {\n this._change(null, i);\n }\n\n this._animateOff = false;\n break;\n\n case \"step\":\n case \"min\":\n case \"max\":\n this._animateOff = true;\n\n this._calculateNewMax();\n\n this._refreshValue();\n\n this._animateOff = false;\n break;\n\n case \"range\":\n this._animateOff = true;\n\n this._refresh();\n\n this._animateOff = false;\n break;\n }\n },\n _setOptionDisabled: function (value) {\n this._super(value);\n\n this._toggleClass(null, \"ui-state-disabled\", !!value);\n },\n //internal value getter\n // _value() returns value trimmed by min and max, aligned by step\n _value: function () {\n var val = this.options.value;\n val = this._trimAlignValue(val);\n return val;\n },\n //internal values getter\n // _values() returns array of values trimmed by min and max, aligned by step\n // _values( index ) returns single value trimmed by min and max, aligned by step\n _values: function (index) {\n var val, vals, i;\n\n if (arguments.length) {\n val = this.options.values[index];\n val = this._trimAlignValue(val);\n return val;\n } else if (this._hasMultipleValues()) {\n // .slice() creates a copy of the array\n // this copy gets trimmed by min and max and then returned\n vals = this.options.values.slice();\n\n for (i = 0; i < vals.length; i += 1) {\n vals[i] = this._trimAlignValue(vals[i]);\n }\n\n return vals;\n } else {\n return [];\n }\n },\n // Returns the step-aligned value that val is closest to, between (inclusive) min and max\n _trimAlignValue: function (val) {\n if (val <= this._valueMin()) {\n return this._valueMin();\n }\n\n if (val >= this._valueMax()) {\n return this._valueMax();\n }\n\n var step = this.options.step > 0 ? this.options.step : 1,\n valModStep = (val - this._valueMin()) % step,\n alignValue = val - valModStep;\n\n if (Math.abs(valModStep) * 2 >= step) {\n alignValue += valModStep > 0 ? step : -step;\n } // Since JavaScript has problems with large floats, round\n // the final value to 5 digits after the decimal point (see #4124)\n\n\n return parseFloat(alignValue.toFixed(5));\n },\n _calculateNewMax: function () {\n var max = this.options.max,\n min = this._valueMin(),\n step = this.options.step,\n aboveMin = Math.round((max - min) / step) * step;\n\n max = aboveMin + min;\n\n if (max > this.options.max) {\n //If max is not divisible by step, rounding off may increase its value\n max -= step;\n }\n\n this.max = parseFloat(max.toFixed(this._precision()));\n },\n _precision: function () {\n var precision = this._precisionOf(this.options.step);\n\n if (this.options.min !== null) {\n precision = Math.max(precision, this._precisionOf(this.options.min));\n }\n\n return precision;\n },\n _precisionOf: function (num) {\n var str = num.toString(),\n decimal = str.indexOf(\".\");\n return decimal === -1 ? 0 : str.length - decimal - 1;\n },\n _valueMin: function () {\n return this.options.min;\n },\n _valueMax: function () {\n return this.max;\n },\n _refreshRange: function (orientation) {\n if (orientation === \"vertical\") {\n this.range.css({\n \"width\": \"\",\n \"left\": \"\"\n });\n }\n\n if (orientation === \"horizontal\") {\n this.range.css({\n \"height\": \"\",\n \"bottom\": \"\"\n });\n }\n },\n _refreshValue: function () {\n var lastValPercent,\n valPercent,\n value,\n valueMin,\n valueMax,\n oRange = this.options.range,\n o = this.options,\n that = this,\n animate = !this._animateOff ? o.animate : false,\n _set = {};\n\n if (this._hasMultipleValues()) {\n this.handles.each(function (i) {\n valPercent = (that.values(i) - that._valueMin()) / (that._valueMax() - that._valueMin()) * 100;\n _set[that.orientation === \"horizontal\" ? \"left\" : \"bottom\"] = valPercent + \"%\";\n $(this).stop(1, 1)[animate ? \"animate\" : \"css\"](_set, o.animate);\n\n if (that.options.range === true) {\n if (that.orientation === \"horizontal\") {\n if (i === 0) {\n that.range.stop(1, 1)[animate ? \"animate\" : \"css\"]({\n left: valPercent + \"%\"\n }, o.animate);\n }\n\n if (i === 1) {\n that.range[animate ? \"animate\" : \"css\"]({\n width: valPercent - lastValPercent + \"%\"\n }, {\n queue: false,\n duration: o.animate\n });\n }\n } else {\n if (i === 0) {\n that.range.stop(1, 1)[animate ? \"animate\" : \"css\"]({\n bottom: valPercent + \"%\"\n }, o.animate);\n }\n\n if (i === 1) {\n that.range[animate ? \"animate\" : \"css\"]({\n height: valPercent - lastValPercent + \"%\"\n }, {\n queue: false,\n duration: o.animate\n });\n }\n }\n }\n\n lastValPercent = valPercent;\n });\n } else {\n value = this.value();\n valueMin = this._valueMin();\n valueMax = this._valueMax();\n valPercent = valueMax !== valueMin ? (value - valueMin) / (valueMax - valueMin) * 100 : 0;\n _set[this.orientation === \"horizontal\" ? \"left\" : \"bottom\"] = valPercent + \"%\";\n this.handle.stop(1, 1)[animate ? \"animate\" : \"css\"](_set, o.animate);\n\n if (oRange === \"min\" && this.orientation === \"horizontal\") {\n this.range.stop(1, 1)[animate ? \"animate\" : \"css\"]({\n width: valPercent + \"%\"\n }, o.animate);\n }\n\n if (oRange === \"max\" && this.orientation === \"horizontal\") {\n this.range.stop(1, 1)[animate ? \"animate\" : \"css\"]({\n width: 100 - valPercent + \"%\"\n }, o.animate);\n }\n\n if (oRange === \"min\" && this.orientation === \"vertical\") {\n this.range.stop(1, 1)[animate ? \"animate\" : \"css\"]({\n height: valPercent + \"%\"\n }, o.animate);\n }\n\n if (oRange === \"max\" && this.orientation === \"vertical\") {\n this.range.stop(1, 1)[animate ? \"animate\" : \"css\"]({\n height: 100 - valPercent + \"%\"\n }, o.animate);\n }\n }\n },\n _handleEvents: {\n keydown: function (event) {\n var allowed,\n curVal,\n newVal,\n step,\n index = $(event.target).data(\"ui-slider-handle-index\");\n\n switch (event.keyCode) {\n case $.ui.keyCode.HOME:\n case $.ui.keyCode.END:\n case $.ui.keyCode.PAGE_UP:\n case $.ui.keyCode.PAGE_DOWN:\n case $.ui.keyCode.UP:\n case $.ui.keyCode.RIGHT:\n case $.ui.keyCode.DOWN:\n case $.ui.keyCode.LEFT:\n event.preventDefault();\n\n if (!this._keySliding) {\n this._keySliding = true;\n\n this._addClass($(event.target), null, \"ui-state-active\");\n\n allowed = this._start(event, index);\n\n if (allowed === false) {\n return;\n }\n }\n\n break;\n }\n\n step = this.options.step;\n\n if (this._hasMultipleValues()) {\n curVal = newVal = this.values(index);\n } else {\n curVal = newVal = this.value();\n }\n\n switch (event.keyCode) {\n case $.ui.keyCode.HOME:\n newVal = this._valueMin();\n break;\n\n case $.ui.keyCode.END:\n newVal = this._valueMax();\n break;\n\n case $.ui.keyCode.PAGE_UP:\n newVal = this._trimAlignValue(curVal + (this._valueMax() - this._valueMin()) / this.numPages);\n break;\n\n case $.ui.keyCode.PAGE_DOWN:\n newVal = this._trimAlignValue(curVal - (this._valueMax() - this._valueMin()) / this.numPages);\n break;\n\n case $.ui.keyCode.UP:\n case $.ui.keyCode.RIGHT:\n if (curVal === this._valueMax()) {\n return;\n }\n\n newVal = this._trimAlignValue(curVal + step);\n break;\n\n case $.ui.keyCode.DOWN:\n case $.ui.keyCode.LEFT:\n if (curVal === this._valueMin()) {\n return;\n }\n\n newVal = this._trimAlignValue(curVal - step);\n break;\n }\n\n this._slide(event, index, newVal);\n },\n keyup: function (event) {\n var index = $(event.target).data(\"ui-slider-handle-index\");\n\n if (this._keySliding) {\n this._keySliding = false;\n\n this._stop(event, index);\n\n this._change(event, index);\n\n this._removeClass($(event.target), null, \"ui-state-active\");\n }\n }\n }\n });\n /*!\n * jQuery UI Sortable 1.12.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 //>>label: Sortable\n //>>group: Interactions\n //>>description: Enables items in a list to be sorted using the mouse.\n //>>docs: http://api.jqueryui.com/sortable/\n //>>demos: http://jqueryui.com/sortable/\n //>>css.structure: ../../themes/base/sortable.css\n\n var widgetsSortable = $.widget(\"ui.sortable\", $.ui.mouse, {\n version: \"1.12.1\",\n widgetEventPrefix: \"sort\",\n ready: false,\n options: {\n appendTo: \"parent\",\n axis: false,\n connectWith: false,\n containment: false,\n cursor: \"auto\",\n cursorAt: false,\n dropOnEmpty: true,\n forcePlaceholderSize: false,\n forceHelperSize: false,\n grid: false,\n handle: false,\n helper: \"original\",\n items: \"> *\",\n opacity: false,\n placeholder: false,\n revert: false,\n scroll: true,\n scrollSensitivity: 20,\n scrollSpeed: 20,\n scope: \"default\",\n tolerance: \"intersect\",\n zIndex: 1000,\n // Callbacks\n activate: null,\n beforeStop: null,\n change: null,\n deactivate: null,\n out: null,\n over: null,\n receive: null,\n remove: null,\n sort: null,\n start: null,\n stop: null,\n update: null\n },\n _isOverAxis: function (x, reference, size) {\n return x >= reference && x < reference + size;\n },\n _isFloating: function (item) {\n return /left|right/.test(item.css(\"float\")) || /inline|table-cell/.test(item.css(\"display\"));\n },\n _create: function () {\n this.containerCache = {};\n\n this._addClass(\"ui-sortable\"); //Get the items\n\n\n this.refresh(); //Let's determine the parent's offset\n\n this.offset = this.element.offset(); //Initialize mouse events for interaction\n\n this._mouseInit();\n\n this._setHandleClassName(); //We're ready to go\n\n\n this.ready = true;\n },\n _setOption: function (key, value) {\n this._super(key, value);\n\n if (key === \"handle\") {\n this._setHandleClassName();\n }\n },\n _setHandleClassName: function () {\n var that = this;\n\n this._removeClass(this.element.find(\".ui-sortable-handle\"), \"ui-sortable-handle\");\n\n $.each(this.items, function () {\n that._addClass(this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item, \"ui-sortable-handle\");\n });\n },\n _destroy: function () {\n this._mouseDestroy();\n\n for (var i = this.items.length - 1; i >= 0; i--) {\n this.items[i].item.removeData(this.widgetName + \"-item\");\n }\n\n return this;\n },\n _mouseCapture: function (event, overrideHandle) {\n var currentItem = null,\n validHandle = false,\n that = this;\n\n if (this.reverting) {\n return false;\n }\n\n if (this.options.disabled || this.options.type === \"static\") {\n return false;\n } //We have to refresh the items data once first\n\n\n this._refreshItems(event); //Find out if the clicked node (or one of its parents) is a actual item in this.items\n\n\n $(event.target).parents().each(function () {\n if ($.data(this, that.widgetName + \"-item\") === that) {\n currentItem = $(this);\n return false;\n }\n });\n\n if ($.data(event.target, that.widgetName + \"-item\") === that) {\n currentItem = $(event.target);\n }\n\n if (!currentItem) {\n return false;\n }\n\n if (this.options.handle && !overrideHandle) {\n $(this.options.handle, currentItem).find(\"*\").addBack().each(function () {\n if (this === event.target) {\n validHandle = true;\n }\n });\n\n if (!validHandle) {\n return false;\n }\n }\n\n this.currentItem = currentItem;\n\n this._removeCurrentsFromItems();\n\n return true;\n },\n _mouseStart: function (event, overrideHandle, noActivation) {\n var i,\n body,\n o = this.options;\n this.currentContainer = this; //We only need to call refreshPositions, because the refreshItems call has been moved to\n // mouseCapture\n\n this.refreshPositions(); //Create and append the visible helper\n\n this.helper = this._createHelper(event); //Cache the helper size\n\n this._cacheHelperProportions();\n /*\n * - Position generation -\n * This block generates everything position related - it's the core of draggables.\n */\n //Cache the margins of the original element\n\n\n this._cacheMargins(); //Get the next scrolling parent\n\n\n this.scrollParent = this.helper.scrollParent(); //The element's absolute position on the page minus margins\n\n this.offset = this.currentItem.offset();\n this.offset = {\n top: this.offset.top - this.margins.top,\n left: this.offset.left - this.margins.left\n };\n $.extend(this.offset, {\n click: {\n //Where the click happened, relative to the element\n left: event.pageX - this.offset.left,\n top: event.pageY - this.offset.top\n },\n parent: this._getParentOffset(),\n // This is a relative to absolute position minus the actual position calculation -\n // only used for relative positioned helper\n relative: this._getRelativeOffset()\n }); // Only after we got the offset, we can change the helper's position to absolute\n // TODO: Still need to figure out a way to make relative sorting possible\n\n this.helper.css(\"position\", \"absolute\");\n this.cssPosition = this.helper.css(\"position\"); //Generate the original position\n\n this.originalPosition = this._generatePosition(event);\n this.originalPageX = event.pageX;\n this.originalPageY = event.pageY; //Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\n o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt); //Cache the former DOM position\n\n this.domPosition = {\n prev: this.currentItem.prev()[0],\n parent: this.currentItem.parent()[0]\n }; // If the helper is not the original, hide the original so it's not playing any role during\n // the drag, won't cause anything bad this way\n\n if (this.helper[0] !== this.currentItem[0]) {\n this.currentItem.hide();\n } //Create the placeholder\n\n\n this._createPlaceholder(); //Set a containment if given in the options\n\n\n if (o.containment) {\n this._setContainment();\n }\n\n if (o.cursor && o.cursor !== \"auto\") {\n // cursor option\n body = this.document.find(\"body\"); // Support: IE\n\n this.storedCursor = body.css(\"cursor\");\n body.css(\"cursor\", o.cursor);\n this.storedStylesheet = $(\"\").appendTo(body);\n }\n\n if (o.opacity) {\n // opacity option\n if (this.helper.css(\"opacity\")) {\n this._storedOpacity = this.helper.css(\"opacity\");\n }\n\n this.helper.css(\"opacity\", o.opacity);\n }\n\n if (o.zIndex) {\n // zIndex option\n if (this.helper.css(\"zIndex\")) {\n this._storedZIndex = this.helper.css(\"zIndex\");\n }\n\n this.helper.css(\"zIndex\", o.zIndex);\n } //Prepare scrolling\n\n\n if (this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== \"HTML\") {\n this.overflowOffset = this.scrollParent.offset();\n } //Call callbacks\n\n\n this._trigger(\"start\", event, this._uiHash()); //Recache the helper size\n\n\n if (!this._preserveHelperProportions) {\n this._cacheHelperProportions();\n } //Post \"activate\" events to possible containers\n\n\n if (!noActivation) {\n for (i = this.containers.length - 1; i >= 0; i--) {\n this.containers[i]._trigger(\"activate\", event, this._uiHash(this));\n }\n } //Prepare possible droppables\n\n\n if ($.ui.ddmanager) {\n $.ui.ddmanager.current = this;\n }\n\n if ($.ui.ddmanager && !o.dropBehaviour) {\n $.ui.ddmanager.prepareOffsets(this, event);\n }\n\n this.dragging = true;\n\n this._addClass(this.helper, \"ui-sortable-helper\"); // Execute the drag once - this causes the helper not to be visiblebefore getting its\n // correct position\n\n\n this._mouseDrag(event);\n\n return true;\n },\n _mouseDrag: function (event) {\n var i,\n item,\n itemElement,\n intersection,\n o = this.options,\n scrolled = false; //Compute the helpers position\n\n this.position = this._generatePosition(event);\n this.positionAbs = this._convertPositionTo(\"absolute\");\n\n if (!this.lastPositionAbs) {\n this.lastPositionAbs = this.positionAbs;\n } //Do scrolling\n\n\n if (this.options.scroll) {\n if (this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== \"HTML\") {\n if (this.overflowOffset.top + this.scrollParent[0].offsetHeight - event.pageY < o.scrollSensitivity) {\n this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;\n } else if (event.pageY - this.overflowOffset.top < o.scrollSensitivity) {\n this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;\n }\n\n if (this.overflowOffset.left + this.scrollParent[0].offsetWidth - event.pageX < o.scrollSensitivity) {\n this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;\n } else if (event.pageX - this.overflowOffset.left < o.scrollSensitivity) {\n this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;\n }\n } else {\n if (event.pageY - this.document.scrollTop() < o.scrollSensitivity) {\n scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed);\n } else if (this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) {\n scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed);\n }\n\n if (event.pageX - this.document.scrollLeft() < o.scrollSensitivity) {\n scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);\n } else if (this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) {\n scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed);\n }\n }\n\n if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n $.ui.ddmanager.prepareOffsets(this, event);\n }\n } //Regenerate the absolute position used for position checks\n\n\n this.positionAbs = this._convertPositionTo(\"absolute\"); //Set the helper position\n\n if (!this.options.axis || this.options.axis !== \"y\") {\n this.helper[0].style.left = this.position.left + \"px\";\n }\n\n if (!this.options.axis || this.options.axis !== \"x\") {\n this.helper[0].style.top = this.position.top + \"px\";\n } //Rearrange\n\n\n for (i = this.items.length - 1; i >= 0; i--) {\n //Cache variables and intersection, continue if no intersection\n item = this.items[i];\n itemElement = item.item[0];\n intersection = this._intersectsWithPointer(item);\n\n if (!intersection) {\n continue;\n } // Only put the placeholder inside the current Container, skip all\n // items from other containers. This works because when moving\n // an item from one container to another the\n // currentContainer is switched before the placeholder is moved.\n //\n // Without this, moving items in \"sub-sortables\" can cause\n // the placeholder to jitter between the outer and inner container.\n\n\n if (item.instance !== this.currentContainer) {\n continue;\n } // Cannot intersect with itself\n // no useless actions that have been done before\n // no action if the item moved is the parent of the item checked\n\n\n if (itemElement !== this.currentItem[0] && this.placeholder[intersection === 1 ? \"next\" : \"prev\"]()[0] !== itemElement && !$.contains(this.placeholder[0], itemElement) && (this.options.type === \"semi-dynamic\" ? !$.contains(this.element[0], itemElement) : true)) {\n this.direction = intersection === 1 ? \"down\" : \"up\";\n\n if (this.options.tolerance === \"pointer\" || this._intersectsWithSides(item)) {\n this._rearrange(event, item);\n } else {\n break;\n }\n\n this._trigger(\"change\", event, this._uiHash());\n\n break;\n }\n } //Post events to containers\n\n\n this._contactContainers(event); //Interconnect with droppables\n\n\n if ($.ui.ddmanager) {\n $.ui.ddmanager.drag(this, event);\n } //Call callbacks\n\n\n this._trigger(\"sort\", event, this._uiHash());\n\n this.lastPositionAbs = this.positionAbs;\n return false;\n },\n _mouseStop: function (event, noPropagation) {\n if (!event) {\n return;\n } //If we are using droppables, inform the manager about the drop\n\n\n if ($.ui.ddmanager && !this.options.dropBehaviour) {\n $.ui.ddmanager.drop(this, event);\n }\n\n if (this.options.revert) {\n var that = this,\n cur = this.placeholder.offset(),\n axis = this.options.axis,\n animation = {};\n\n if (!axis || axis === \"x\") {\n animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft);\n }\n\n if (!axis || axis === \"y\") {\n animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop);\n }\n\n this.reverting = true;\n $(this.helper).animate(animation, parseInt(this.options.revert, 10) || 500, function () {\n that._clear(event);\n });\n } else {\n this._clear(event, noPropagation);\n }\n\n return false;\n },\n cancel: function () {\n if (this.dragging) {\n this._mouseUp(new $.Event(\"mouseup\", {\n target: null\n }));\n\n if (this.options.helper === \"original\") {\n this.currentItem.css(this._storedCSS);\n\n this._removeClass(this.currentItem, \"ui-sortable-helper\");\n } else {\n this.currentItem.show();\n } //Post deactivating events to containers\n\n\n for (var i = this.containers.length - 1; i >= 0; i--) {\n this.containers[i]._trigger(\"deactivate\", null, this._uiHash(this));\n\n if (this.containers[i].containerCache.over) {\n this.containers[i]._trigger(\"out\", null, this._uiHash(this));\n\n this.containers[i].containerCache.over = 0;\n }\n }\n }\n\n if (this.placeholder) {\n //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,\n // it unbinds ALL events from the original node!\n if (this.placeholder[0].parentNode) {\n this.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n }\n\n if (this.options.helper !== \"original\" && this.helper && this.helper[0].parentNode) {\n this.helper.remove();\n }\n\n $.extend(this, {\n helper: null,\n dragging: false,\n reverting: false,\n _noFinalSort: null\n });\n\n if (this.domPosition.prev) {\n $(this.domPosition.prev).after(this.currentItem);\n } else {\n $(this.domPosition.parent).prepend(this.currentItem);\n }\n }\n\n return this;\n },\n serialize: function (o) {\n var items = this._getItemsAsjQuery(o && o.connected),\n str = [];\n\n o = o || {};\n $(items).each(function () {\n var res = ($(o.item || this).attr(o.attribute || \"id\") || \"\").match(o.expression || /(.+)[\\-=_](.+)/);\n\n if (res) {\n str.push((o.key || res[1] + \"[]\") + \"=\" + (o.key && o.expression ? res[1] : res[2]));\n }\n });\n\n if (!str.length && o.key) {\n str.push(o.key + \"=\");\n }\n\n return str.join(\"&\");\n },\n toArray: function (o) {\n var items = this._getItemsAsjQuery(o && o.connected),\n ret = [];\n\n o = o || {};\n items.each(function () {\n ret.push($(o.item || this).attr(o.attribute || \"id\") || \"\");\n });\n return ret;\n },\n\n /* Be careful with the following core functions */\n _intersectsWith: function (item) {\n var x1 = this.positionAbs.left,\n x2 = x1 + this.helperProportions.width,\n y1 = this.positionAbs.top,\n y2 = y1 + this.helperProportions.height,\n l = item.left,\n r = l + item.width,\n t = item.top,\n b = t + item.height,\n dyClick = this.offset.click.top,\n dxClick = this.offset.click.left,\n isOverElementHeight = this.options.axis === \"x\" || y1 + dyClick > t && y1 + dyClick < b,\n isOverElementWidth = this.options.axis === \"y\" || x1 + dxClick > l && x1 + dxClick < r,\n isOverElement = isOverElementHeight && isOverElementWidth;\n\n if (this.options.tolerance === \"pointer\" || this.options.forcePointerForContainers || this.options.tolerance !== \"pointer\" && this.helperProportions[this.floating ? \"width\" : \"height\"] > item[this.floating ? \"width\" : \"height\"]) {\n return isOverElement;\n } else {\n return l < x1 + this.helperProportions.width / 2 && // Right Half\n x2 - this.helperProportions.width / 2 < r && // Left Half\n t < y1 + this.helperProportions.height / 2 && // Bottom Half\n y2 - this.helperProportions.height / 2 < b; // Top Half\n }\n },\n _intersectsWithPointer: function (item) {\n var verticalDirection,\n horizontalDirection,\n isOverElementHeight = this.options.axis === \"x\" || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),\n isOverElementWidth = this.options.axis === \"y\" || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),\n isOverElement = isOverElementHeight && isOverElementWidth;\n\n if (!isOverElement) {\n return false;\n }\n\n verticalDirection = this._getDragVerticalDirection();\n horizontalDirection = this._getDragHorizontalDirection();\n return this.floating ? horizontalDirection === \"right\" || verticalDirection === \"down\" ? 2 : 1 : verticalDirection && (verticalDirection === \"down\" ? 2 : 1);\n },\n _intersectsWithSides: function (item) {\n var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + item.height / 2, item.height),\n isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + item.width / 2, item.width),\n verticalDirection = this._getDragVerticalDirection(),\n horizontalDirection = this._getDragHorizontalDirection();\n\n if (this.floating && horizontalDirection) {\n return horizontalDirection === \"right\" && isOverRightHalf || horizontalDirection === \"left\" && !isOverRightHalf;\n } else {\n return verticalDirection && (verticalDirection === \"down\" && isOverBottomHalf || verticalDirection === \"up\" && !isOverBottomHalf);\n }\n },\n _getDragVerticalDirection: function () {\n var delta = this.positionAbs.top - this.lastPositionAbs.top;\n return delta !== 0 && (delta > 0 ? \"down\" : \"up\");\n },\n _getDragHorizontalDirection: function () {\n var delta = this.positionAbs.left - this.lastPositionAbs.left;\n return delta !== 0 && (delta > 0 ? \"right\" : \"left\");\n },\n refresh: function (event) {\n this._refreshItems(event);\n\n this._setHandleClassName();\n\n this.refreshPositions();\n return this;\n },\n _connectWith: function () {\n var options = this.options;\n return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;\n },\n _getItemsAsjQuery: function (connected) {\n var i,\n j,\n cur,\n inst,\n items = [],\n queries = [],\n connectWith = this._connectWith();\n\n if (connectWith && connected) {\n for (i = connectWith.length - 1; i >= 0; i--) {\n cur = $(connectWith[i], this.document[0]);\n\n for (j = cur.length - 1; j >= 0; j--) {\n inst = $.data(cur[j], this.widgetFullName);\n\n if (inst && inst !== this && !inst.options.disabled) {\n queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), inst]);\n }\n }\n }\n }\n\n queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, {\n options: this.options,\n item: this.currentItem\n }) : $(this.options.items, this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), this]);\n\n function addItems() {\n items.push(this);\n }\n\n for (i = queries.length - 1; i >= 0; i--) {\n queries[i][0].each(addItems);\n }\n\n return $(items);\n },\n _removeCurrentsFromItems: function () {\n var list = this.currentItem.find(\":data(\" + this.widgetName + \"-item)\");\n this.items = $.grep(this.items, function (item) {\n for (var j = 0; j < list.length; j++) {\n if (list[j] === item.item[0]) {\n return false;\n }\n }\n\n return true;\n });\n },\n _refreshItems: function (event) {\n this.items = [];\n this.containers = [this];\n\n var i,\n j,\n cur,\n inst,\n targetData,\n _queries,\n item,\n queriesLength,\n items = this.items,\n queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, {\n item: this.currentItem\n }) : $(this.options.items, this.element), this]],\n connectWith = this._connectWith(); //Shouldn't be run the first time through due to massive slow-down\n\n\n if (connectWith && this.ready) {\n for (i = connectWith.length - 1; i >= 0; i--) {\n cur = $(connectWith[i], this.document[0]);\n\n for (j = cur.length - 1; j >= 0; j--) {\n inst = $.data(cur[j], this.widgetFullName);\n\n if (inst && inst !== this && !inst.options.disabled) {\n queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, {\n item: this.currentItem\n }) : $(inst.options.items, inst.element), inst]);\n this.containers.push(inst);\n }\n }\n }\n }\n\n for (i = queries.length - 1; i >= 0; i--) {\n targetData = queries[i][1];\n _queries = queries[i][0];\n\n for (j = 0, queriesLength = _queries.length; j < queriesLength; j++) {\n item = $(_queries[j]); // Data for target checking (mouse manager)\n\n item.data(this.widgetName + \"-item\", targetData);\n items.push({\n item: item,\n instance: targetData,\n width: 0,\n height: 0,\n left: 0,\n top: 0\n });\n }\n }\n },\n refreshPositions: function (fast) {\n // Determine whether items are being displayed horizontally\n this.floating = this.items.length ? this.options.axis === \"x\" || this._isFloating(this.items[0].item) : false; //This has to be redone because due to the item being moved out/into the offsetParent,\n // the offsetParent's position will change\n\n if (this.offsetParent && this.helper) {\n this.offset.parent = this._getParentOffset();\n }\n\n var i, item, t, p;\n\n for (i = this.items.length - 1; i >= 0; i--) {\n item = this.items[i]; //We ignore calculating positions of all connected containers when we're not over them\n\n if (item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {\n continue;\n }\n\n t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;\n\n if (!fast) {\n item.width = t.outerWidth();\n item.height = t.outerHeight();\n }\n\n p = t.offset();\n item.left = p.left;\n item.top = p.top;\n }\n\n if (this.options.custom && this.options.custom.refreshContainers) {\n this.options.custom.refreshContainers.call(this);\n } else {\n for (i = this.containers.length - 1; i >= 0; i--) {\n p = this.containers[i].element.offset();\n this.containers[i].containerCache.left = p.left;\n this.containers[i].containerCache.top = p.top;\n this.containers[i].containerCache.width = this.containers[i].element.outerWidth();\n this.containers[i].containerCache.height = this.containers[i].element.outerHeight();\n }\n }\n\n return this;\n },\n _createPlaceholder: function (that) {\n that = that || this;\n var className,\n o = that.options;\n\n if (!o.placeholder || o.placeholder.constructor === String) {\n className = o.placeholder;\n o.placeholder = {\n element: function () {\n var nodeName = that.currentItem[0].nodeName.toLowerCase(),\n element = $(\"<\" + nodeName + \">\", that.document[0]);\n\n that._addClass(element, \"ui-sortable-placeholder\", className || that.currentItem[0].className)._removeClass(element, \"ui-sortable-helper\");\n\n if (nodeName === \"tbody\") {\n that._createTrPlaceholder(that.currentItem.find(\"tr\").eq(0), $(\"
\", that.document[0]).appendTo(element));\n } else if (nodeName === \"tr\") {\n that._createTrPlaceholder(that.currentItem, element);\n } else if (nodeName === \"img\") {\n element.attr(\"src\", that.currentItem.attr(\"src\"));\n }\n\n if (!className) {\n element.css(\"visibility\", \"hidden\");\n }\n\n return element;\n },\n update: function (container, p) {\n // 1. If a className is set as 'placeholder option, we don't force sizes -\n // the class is responsible for that\n // 2. The option 'forcePlaceholderSize can be enabled to force it even if a\n // class name is specified\n if (className && !o.forcePlaceholderSize) {\n return;\n } //If the element doesn't have a actual height by itself (without styles coming\n // from a stylesheet), it receives the inline height from the dragged item\n\n\n if (!p.height()) {\n p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css(\"paddingTop\") || 0, 10) - parseInt(that.currentItem.css(\"paddingBottom\") || 0, 10));\n }\n\n if (!p.width()) {\n p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css(\"paddingLeft\") || 0, 10) - parseInt(that.currentItem.css(\"paddingRight\") || 0, 10));\n }\n }\n };\n } //Create the placeholder\n\n\n that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); //Append it after the actual current item\n\n that.currentItem.after(that.placeholder); //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\n o.placeholder.update(that, that.placeholder);\n },\n _createTrPlaceholder: function (sourceTr, targetTr) {\n var that = this;\n sourceTr.children().each(function () {\n $(\" | \", that.document[0]).attr(\"colspan\", $(this).attr(\"colspan\") || 1).appendTo(targetTr);\n });\n },\n _contactContainers: function (event) {\n var i,\n j,\n dist,\n itemWithLeastDistance,\n posProperty,\n sizeProperty,\n cur,\n nearBottom,\n floating,\n axis,\n innermostContainer = null,\n innermostIndex = null; // Get innermost container that intersects with item\n\n for (i = this.containers.length - 1; i >= 0; i--) {\n // Never consider a container that's located within the item itself\n if ($.contains(this.currentItem[0], this.containers[i].element[0])) {\n continue;\n }\n\n if (this._intersectsWith(this.containers[i].containerCache)) {\n // If we've already found a container and it's more \"inner\" than this, then continue\n if (innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {\n continue;\n }\n\n innermostContainer = this.containers[i];\n innermostIndex = i;\n } else {\n // container doesn't intersect. trigger \"out\" event if necessary\n if (this.containers[i].containerCache.over) {\n this.containers[i]._trigger(\"out\", event, this._uiHash(this));\n\n this.containers[i].containerCache.over = 0;\n }\n }\n } // If no intersecting containers found, return\n\n\n if (!innermostContainer) {\n return;\n } // Move the item into the container if it's not there already\n\n\n if (this.containers.length === 1) {\n if (!this.containers[innermostIndex].containerCache.over) {\n this.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\n this.containers[innermostIndex].containerCache.over = 1;\n }\n } else {\n // When entering a new container, we will find the item with the least distance and\n // append our item near it\n dist = 10000;\n itemWithLeastDistance = null;\n floating = innermostContainer.floating || this._isFloating(this.currentItem);\n posProperty = floating ? \"left\" : \"top\";\n sizeProperty = floating ? \"width\" : \"height\";\n axis = floating ? \"pageX\" : \"pageY\";\n\n for (j = this.items.length - 1; j >= 0; j--) {\n if (!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {\n continue;\n }\n\n if (this.items[j].item[0] === this.currentItem[0]) {\n continue;\n }\n\n cur = this.items[j].item.offset()[posProperty];\n nearBottom = false;\n\n if (event[axis] - cur > this.items[j][sizeProperty] / 2) {\n nearBottom = true;\n }\n\n if (Math.abs(event[axis] - cur) < dist) {\n dist = Math.abs(event[axis] - cur);\n itemWithLeastDistance = this.items[j];\n this.direction = nearBottom ? \"up\" : \"down\";\n }\n } //Check if dropOnEmpty is enabled\n\n\n if (!itemWithLeastDistance && !this.options.dropOnEmpty) {\n return;\n }\n\n if (this.currentContainer === this.containers[innermostIndex]) {\n if (!this.currentContainer.containerCache.over) {\n this.containers[innermostIndex]._trigger(\"over\", event, this._uiHash());\n\n this.currentContainer.containerCache.over = 1;\n }\n\n return;\n }\n\n itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);\n\n this._trigger(\"change\", event, this._uiHash());\n\n this.containers[innermostIndex]._trigger(\"change\", event, this._uiHash(this));\n\n this.currentContainer = this.containers[innermostIndex]; //Update the placeholder\n\n this.options.placeholder.update(this.currentContainer, this.placeholder);\n\n this.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\n this.containers[innermostIndex].containerCache.over = 1;\n }\n },\n _createHelper: function (event) {\n var o = this.options,\n helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : o.helper === \"clone\" ? this.currentItem.clone() : this.currentItem; //Add the helper to the DOM if that didn't happen already\n\n if (!helper.parents(\"body\").length) {\n $(o.appendTo !== \"parent\" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);\n }\n\n if (helper[0] === this.currentItem[0]) {\n this._storedCSS = {\n width: this.currentItem[0].style.width,\n height: this.currentItem[0].style.height,\n position: this.currentItem.css(\"position\"),\n top: this.currentItem.css(\"top\"),\n left: this.currentItem.css(\"left\")\n };\n }\n\n if (!helper[0].style.width || o.forceHelperSize) {\n helper.width(this.currentItem.width());\n }\n\n if (!helper[0].style.height || o.forceHelperSize) {\n helper.height(this.currentItem.height());\n }\n\n return helper;\n },\n _adjustOffsetFromHelper: function (obj) {\n if (typeof obj === \"string\") {\n obj = obj.split(\" \");\n }\n\n if ($.isArray(obj)) {\n obj = {\n left: +obj[0],\n top: +obj[1] || 0\n };\n }\n\n if (\"left\" in obj) {\n this.offset.click.left = obj.left + this.margins.left;\n }\n\n if (\"right\" in obj) {\n this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n }\n\n if (\"top\" in obj) {\n this.offset.click.top = obj.top + this.margins.top;\n }\n\n if (\"bottom\" in obj) {\n this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n }\n },\n _getParentOffset: function () {\n //Get the offsetParent and cache its position\n this.offsetParent = this.helper.offsetParent();\n var po = this.offsetParent.offset(); // This is a special case where we need to modify a offset calculated on start, since the\n // following happened:\n // 1. The position of the helper is absolute, so it's position is calculated based on the\n // next positioned parent\n // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't\n // the document, which means that the scroll is included in the initial calculation of the\n // offset of the parent, and never recalculated upon drag\n\n if (this.cssPosition === \"absolute\" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n po.left += this.scrollParent.scrollLeft();\n po.top += this.scrollParent.scrollTop();\n } // This needs to be actually done for all browsers, since pageX/pageY includes this\n // information with an ugly IE fix\n\n\n if (this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === \"html\" && $.ui.ie) {\n po = {\n top: 0,\n left: 0\n };\n }\n\n return {\n top: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"), 10) || 0),\n left: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"), 10) || 0)\n };\n },\n _getRelativeOffset: function () {\n if (this.cssPosition === \"relative\") {\n var p = this.currentItem.position();\n return {\n top: p.top - (parseInt(this.helper.css(\"top\"), 10) || 0) + this.scrollParent.scrollTop(),\n left: p.left - (parseInt(this.helper.css(\"left\"), 10) || 0) + this.scrollParent.scrollLeft()\n };\n } else {\n return {\n top: 0,\n left: 0\n };\n }\n },\n _cacheMargins: function () {\n this.margins = {\n left: parseInt(this.currentItem.css(\"marginLeft\"), 10) || 0,\n top: parseInt(this.currentItem.css(\"marginTop\"), 10) || 0\n };\n },\n _cacheHelperProportions: function () {\n this.helperProportions = {\n width: this.helper.outerWidth(),\n height: this.helper.outerHeight()\n };\n },\n _setContainment: function () {\n var ce,\n co,\n over,\n o = this.options;\n\n if (o.containment === \"parent\") {\n o.containment = this.helper[0].parentNode;\n }\n\n if (o.containment === \"document\" || o.containment === \"window\") {\n this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, o.containment === \"document\" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, (o.containment === \"document\" ? this.document.height() || document.body.parentNode.scrollHeight : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];\n }\n\n if (!/^(document|window|parent)$/.test(o.containment)) {\n ce = $(o.containment)[0];\n co = $(o.containment).offset();\n over = $(ce).css(\"overflow\") !== \"hidden\";\n this.containment = [co.left + (parseInt($(ce).css(\"borderLeftWidth\"), 10) || 0) + (parseInt($(ce).css(\"paddingLeft\"), 10) || 0) - this.margins.left, co.top + (parseInt($(ce).css(\"borderTopWidth\"), 10) || 0) + (parseInt($(ce).css(\"paddingTop\"), 10) || 0) - this.margins.top, co.left + (over ? Math.max(ce.scrollWidth, ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css(\"borderLeftWidth\"), 10) || 0) - (parseInt($(ce).css(\"paddingRight\"), 10) || 0) - this.helperProportions.width - this.margins.left, co.top + (over ? Math.max(ce.scrollHeight, ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css(\"borderTopWidth\"), 10) || 0) - (parseInt($(ce).css(\"paddingBottom\"), 10) || 0) - this.helperProportions.height - this.margins.top];\n }\n },\n _convertPositionTo: function (d, pos) {\n if (!pos) {\n pos = this.position;\n }\n\n var mod = d === \"absolute\" ? 1 : -1,\n scroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,\n scrollIsRootNode = /(html|body)/i.test(scroll[0].tagName);\n return {\n top: // The absolute mouse position\n pos.top + // Only for relative positioned nodes: Relative offset from element to offset parent\n this.offset.relative.top * mod + // The offsetParent's offset without borders (offset + border)\n this.offset.parent.top * mod - (this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : scrollIsRootNode ? 0 : scroll.scrollTop()) * mod,\n left: // The absolute mouse position\n pos.left + // Only for relative positioned nodes: Relative offset from element to offset parent\n this.offset.relative.left * mod + // The offsetParent's offset without borders (offset + border)\n this.offset.parent.left * mod - (this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft()) * mod\n };\n },\n _generatePosition: function (event) {\n var top,\n left,\n o = this.options,\n pageX = event.pageX,\n pageY = event.pageY,\n scroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,\n scrollIsRootNode = /(html|body)/i.test(scroll[0].tagName); // This is another very weird special case that only happens for relative elements:\n // 1. If the css position is relative\n // 2. and the scroll parent is the document or similar to the offset parent\n // we have to refresh the relative offset during the scroll so there are no jumps\n\n if (this.cssPosition === \"relative\" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) {\n this.offset.relative = this._getRelativeOffset();\n }\n /*\n * - Position constraining -\n * Constrain the position to a mix of grid, containment.\n */\n\n\n if (this.originalPosition) {\n //If we are not dragging yet, we won't check for options\n if (this.containment) {\n if (event.pageX - this.offset.click.left < this.containment[0]) {\n pageX = this.containment[0] + this.offset.click.left;\n }\n\n if (event.pageY - this.offset.click.top < this.containment[1]) {\n pageY = this.containment[1] + this.offset.click.top;\n }\n\n if (event.pageX - this.offset.click.left > this.containment[2]) {\n pageX = this.containment[2] + this.offset.click.left;\n }\n\n if (event.pageY - this.offset.click.top > this.containment[3]) {\n pageY = this.containment[3] + this.offset.click.top;\n }\n }\n\n if (o.grid) {\n top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];\n pageY = this.containment ? top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3] ? top : top - this.offset.click.top >= this.containment[1] ? top - o.grid[1] : top + o.grid[1] : top;\n left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];\n pageX = this.containment ? left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2] ? left : left - this.offset.click.left >= this.containment[0] ? left - o.grid[0] : left + o.grid[0] : left;\n }\n }\n\n return {\n top: // The absolute mouse position\n pageY - // Click offset (relative to the element)\n this.offset.click.top - // Only for relative positioned nodes: Relative offset from element to offset parent\n this.offset.relative.top - // The offsetParent's offset without borders (offset + border)\n this.offset.parent.top + (this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : scrollIsRootNode ? 0 : scroll.scrollTop()),\n left: // The absolute mouse position\n pageX - // Click offset (relative to the element)\n this.offset.click.left - // Only for relative positioned nodes: Relative offset from element to offset parent\n this.offset.relative.left - // The offsetParent's offset without borders (offset + border)\n this.offset.parent.left + (this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft())\n };\n },\n _rearrange: function (event, i, a, hardRefresh) {\n a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], this.direction === \"down\" ? i.item[0] : i.item[0].nextSibling); //Various things done here to improve the performance:\n // 1. we create a setTimeout, that calls refreshPositions\n // 2. on the instance, we have a counter variable, that get's higher after every append\n // 3. on the local scope, we copy the counter variable, and check in the timeout,\n // if it's still the same\n // 4. this lets only the last addition to the timeout stack through\n\n this.counter = this.counter ? ++this.counter : 1;\n var counter = this.counter;\n\n this._delay(function () {\n if (counter === this.counter) {\n //Precompute after each DOM insertion, NOT on mousemove\n this.refreshPositions(!hardRefresh);\n }\n });\n },\n _clear: function (event, noPropagation) {\n this.reverting = false; // We delay all events that have to be triggered to after the point where the placeholder\n // has been removed and everything else normalized again\n\n var i,\n delayedTriggers = []; // We first have to update the dom position of the actual currentItem\n // Note: don't do it if the current item is already removed (by a user), or it gets\n // reappended (see #4088)\n\n if (!this._noFinalSort && this.currentItem.parent().length) {\n this.placeholder.before(this.currentItem);\n }\n\n this._noFinalSort = null;\n\n if (this.helper[0] === this.currentItem[0]) {\n for (i in this._storedCSS) {\n if (this._storedCSS[i] === \"auto\" || this._storedCSS[i] === \"static\") {\n this._storedCSS[i] = \"\";\n }\n }\n\n this.currentItem.css(this._storedCSS);\n\n this._removeClass(this.currentItem, \"ui-sortable-helper\");\n } else {\n this.currentItem.show();\n }\n\n if (this.fromOutside && !noPropagation) {\n delayedTriggers.push(function (event) {\n this._trigger(\"receive\", event, this._uiHash(this.fromOutside));\n });\n }\n\n if ((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(\".ui-sortable-helper\")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {\n // Trigger update callback if the DOM position has changed\n delayedTriggers.push(function (event) {\n this._trigger(\"update\", event, this._uiHash());\n });\n } // Check if the items Container has Changed and trigger appropriate\n // events.\n\n\n if (this !== this.currentContainer) {\n if (!noPropagation) {\n delayedTriggers.push(function (event) {\n this._trigger(\"remove\", event, this._uiHash());\n });\n delayedTriggers.push(function (c) {\n return function (event) {\n c._trigger(\"receive\", event, this._uiHash(this));\n };\n }.call(this, this.currentContainer));\n delayedTriggers.push(function (c) {\n return function (event) {\n c._trigger(\"update\", event, this._uiHash(this));\n };\n }.call(this, this.currentContainer));\n }\n } //Post events to containers\n\n\n function delayEvent(type, instance, container) {\n return function (event) {\n container._trigger(type, event, instance._uiHash(instance));\n };\n }\n\n for (i = this.containers.length - 1; i >= 0; i--) {\n if (!noPropagation) {\n delayedTriggers.push(delayEvent(\"deactivate\", this, this.containers[i]));\n }\n\n if (this.containers[i].containerCache.over) {\n delayedTriggers.push(delayEvent(\"out\", this, this.containers[i]));\n this.containers[i].containerCache.over = 0;\n }\n } //Do what was originally in plugins\n\n\n if (this.storedCursor) {\n this.document.find(\"body\").css(\"cursor\", this.storedCursor);\n this.storedStylesheet.remove();\n }\n\n if (this._storedOpacity) {\n this.helper.css(\"opacity\", this._storedOpacity);\n }\n\n if (this._storedZIndex) {\n this.helper.css(\"zIndex\", this._storedZIndex === \"auto\" ? \"\" : this._storedZIndex);\n }\n\n this.dragging = false;\n\n if (!noPropagation) {\n this._trigger(\"beforeStop\", event, this._uiHash());\n } //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,\n // it unbinds ALL events from the original node!\n\n\n this.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\n if (!this.cancelHelperRemoval) {\n if (this.helper[0] !== this.currentItem[0]) {\n this.helper.remove();\n }\n\n this.helper = null;\n }\n\n if (!noPropagation) {\n for (i = 0; i < delayedTriggers.length; i++) {\n // Trigger all delayed events\n delayedTriggers[i].call(this, event);\n }\n\n this._trigger(\"stop\", event, this._uiHash());\n }\n\n this.fromOutside = false;\n return !this.cancelHelperRemoval;\n },\n _trigger: function () {\n if ($.Widget.prototype._trigger.apply(this, arguments) === false) {\n this.cancel();\n }\n },\n _uiHash: function (_inst) {\n var inst = _inst || this;\n return {\n helper: inst.helper,\n placeholder: inst.placeholder || $([]),\n position: inst.position,\n originalPosition: inst.originalPosition,\n offset: inst.positionAbs,\n item: inst.currentItem,\n sender: _inst ? _inst.element : null\n };\n }\n });\n /*!\n * jQuery UI Spinner 1.12.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 //>>label: Spinner\n //>>group: Widgets\n //>>description: Displays buttons to easily input numbers via the keyboard or mouse.\n //>>docs: http://api.jqueryui.com/spinner/\n //>>demos: http://jqueryui.com/spinner/\n //>>css.structure: ../../themes/base/core.css\n //>>css.structure: ../../themes/base/spinner.css\n //>>css.theme: ../../themes/base/theme.css\n\n function spinnerModifer(fn) {\n return function () {\n var previous = this.element.val();\n fn.apply(this, arguments);\n\n this._refresh();\n\n if (previous !== this.element.val()) {\n this._trigger(\"change\");\n }\n };\n }\n\n $.widget(\"ui.spinner\", {\n version: \"1.12.1\",\n defaultElement: \"\",\n widgetEventPrefix: \"spin\",\n options: {\n classes: {\n \"ui-spinner\": \"ui-corner-all\",\n \"ui-spinner-down\": \"ui-corner-br\",\n \"ui-spinner-up\": \"ui-corner-tr\"\n },\n culture: null,\n icons: {\n down: \"ui-icon-triangle-1-s\",\n up: \"ui-icon-triangle-1-n\"\n },\n incremental: true,\n max: null,\n min: null,\n numberFormat: null,\n page: 10,\n step: 1,\n change: null,\n spin: null,\n start: null,\n stop: null\n },\n _create: function () {\n // handle string values that need to be parsed\n this._setOption(\"max\", this.options.max);\n\n this._setOption(\"min\", this.options.min);\n\n this._setOption(\"step\", this.options.step); // Only format if there is a value, prevents the field from being marked\n // as invalid in Firefox, see #9573.\n\n\n if (this.value() !== \"\") {\n // Format the value, but don't constrain.\n this._value(this.element.val(), true);\n }\n\n this._draw();\n\n this._on(this._events);\n\n this._refresh(); // Turning off autocomplete prevents the browser from remembering the\n // value when navigating through history, so we re-enable autocomplete\n // if the page is unloaded before the widget is destroyed. #7790\n\n\n this._on(this.window, {\n beforeunload: function () {\n this.element.removeAttr(\"autocomplete\");\n }\n });\n },\n _getCreateOptions: function () {\n var options = this._super();\n\n var element = this.element;\n $.each([\"min\", \"max\", \"step\"], function (i, option) {\n var value = element.attr(option);\n\n if (value != null && value.length) {\n options[option] = value;\n }\n });\n return options;\n },\n _events: {\n keydown: function (event) {\n if (this._start(event) && this._keydown(event)) {\n event.preventDefault();\n }\n },\n keyup: \"_stop\",\n focus: function () {\n this.previous = this.element.val();\n },\n blur: function (event) {\n if (this.cancelBlur) {\n delete this.cancelBlur;\n return;\n }\n\n this._stop();\n\n this._refresh();\n\n if (this.previous !== this.element.val()) {\n this._trigger(\"change\", event);\n }\n },\n mousewheel: function (event, delta) {\n if (!delta) {\n return;\n }\n\n if (!this.spinning && !this._start(event)) {\n return false;\n }\n\n this._spin((delta > 0 ? 1 : -1) * this.options.step, event);\n\n clearTimeout(this.mousewheelTimer);\n this.mousewheelTimer = this._delay(function () {\n if (this.spinning) {\n this._stop(event);\n }\n }, 100);\n event.preventDefault();\n },\n \"mousedown .ui-spinner-button\": function (event) {\n var previous; // We never want the buttons to have focus; whenever the user is\n // interacting with the spinner, the focus should be on the input.\n // If the input is focused then this.previous is properly set from\n // when the input first received focus. If the input is not focused\n // then we need to set this.previous based on the value before spinning.\n\n previous = this.element[0] === $.ui.safeActiveElement(this.document[0]) ? this.previous : this.element.val();\n\n function checkFocus() {\n var isActive = this.element[0] === $.ui.safeActiveElement(this.document[0]);\n\n if (!isActive) {\n this.element.trigger(\"focus\");\n this.previous = previous; // support: IE\n // IE sets focus asynchronously, so we need to check if focus\n // moved off of the input because the user clicked on the button.\n\n this._delay(function () {\n this.previous = previous;\n });\n }\n } // Ensure focus is on (or stays on) the text field\n\n\n event.preventDefault();\n checkFocus.call(this); // Support: IE\n // IE doesn't prevent moving focus even with event.preventDefault()\n // so we set a flag to know when we should ignore the blur event\n // and check (again) if focus moved off of the input.\n\n this.cancelBlur = true;\n\n this._delay(function () {\n delete this.cancelBlur;\n checkFocus.call(this);\n });\n\n if (this._start(event) === false) {\n return;\n }\n\n this._repeat(null, $(event.currentTarget).hasClass(\"ui-spinner-up\") ? 1 : -1, event);\n },\n \"mouseup .ui-spinner-button\": \"_stop\",\n \"mouseenter .ui-spinner-button\": function (event) {\n // button will add ui-state-active if mouse was down while mouseleave and kept down\n if (!$(event.currentTarget).hasClass(\"ui-state-active\")) {\n return;\n }\n\n if (this._start(event) === false) {\n return false;\n }\n\n this._repeat(null, $(event.currentTarget).hasClass(\"ui-spinner-up\") ? 1 : -1, event);\n },\n // TODO: do we really want to consider this a stop?\n // shouldn't we just stop the repeater and wait until mouseup before\n // we trigger the stop event?\n \"mouseleave .ui-spinner-button\": \"_stop\"\n },\n // Support mobile enhanced option and make backcompat more sane\n _enhance: function () {\n this.uiSpinner = this.element.attr(\"autocomplete\", \"off\").wrap(\"\").parent() // Add buttons\n .append(\"\");\n },\n _draw: function () {\n this._enhance();\n\n this._addClass(this.uiSpinner, \"ui-spinner\", \"ui-widget ui-widget-content\");\n\n this._addClass(\"ui-spinner-input\");\n\n this.element.attr(\"role\", \"spinbutton\"); // Button bindings\n\n this.buttons = this.uiSpinner.children(\"a\").attr(\"tabIndex\", -1).attr(\"aria-hidden\", true).button({\n classes: {\n \"ui-button\": \"\"\n }\n }); // TODO: Right now button does not support classes this is already updated in button PR\n\n this._removeClass(this.buttons, \"ui-corner-all\");\n\n this._addClass(this.buttons.first(), \"ui-spinner-button ui-spinner-up\");\n\n this._addClass(this.buttons.last(), \"ui-spinner-button ui-spinner-down\");\n\n this.buttons.first().button({\n \"icon\": this.options.icons.up,\n \"showLabel\": false\n });\n this.buttons.last().button({\n \"icon\": this.options.icons.down,\n \"showLabel\": false\n }); // IE 6 doesn't understand height: 50% for the buttons\n // unless the wrapper has an explicit height\n\n if (this.buttons.height() > Math.ceil(this.uiSpinner.height() * 0.5) && this.uiSpinner.height() > 0) {\n this.uiSpinner.height(this.uiSpinner.height());\n }\n },\n _keydown: function (event) {\n var options = this.options,\n keyCode = $.ui.keyCode;\n\n switch (event.keyCode) {\n case keyCode.UP:\n this._repeat(null, 1, event);\n\n return true;\n\n case keyCode.DOWN:\n this._repeat(null, -1, event);\n\n return true;\n\n case keyCode.PAGE_UP:\n this._repeat(null, options.page, event);\n\n return true;\n\n case keyCode.PAGE_DOWN:\n this._repeat(null, -options.page, event);\n\n return true;\n }\n\n return false;\n },\n _start: function (event) {\n if (!this.spinning && this._trigger(\"start\", event) === false) {\n return false;\n }\n\n if (!this.counter) {\n this.counter = 1;\n }\n\n this.spinning = true;\n return true;\n },\n _repeat: function (i, steps, event) {\n i = i || 500;\n clearTimeout(this.timer);\n this.timer = this._delay(function () {\n this._repeat(40, steps, event);\n }, i);\n\n this._spin(steps * this.options.step, event);\n },\n _spin: function (step, event) {\n var value = this.value() || 0;\n\n if (!this.counter) {\n this.counter = 1;\n }\n\n value = this._adjustValue(value + step * this._increment(this.counter));\n\n if (!this.spinning || this._trigger(\"spin\", event, {\n value: value\n }) !== false) {\n this._value(value);\n\n this.counter++;\n }\n },\n _increment: function (i) {\n var incremental = this.options.incremental;\n\n if (incremental) {\n return $.isFunction(incremental) ? incremental(i) : Math.floor(i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1);\n }\n\n return 1;\n },\n _precision: function () {\n var precision = this._precisionOf(this.options.step);\n\n if (this.options.min !== null) {\n precision = Math.max(precision, this._precisionOf(this.options.min));\n }\n\n return precision;\n },\n _precisionOf: function (num) {\n var str = num.toString(),\n decimal = str.indexOf(\".\");\n return decimal === -1 ? 0 : str.length - decimal - 1;\n },\n _adjustValue: function (value) {\n var base,\n aboveMin,\n options = this.options; // Make sure we're at a valid step\n // - find out where we are relative to the base (min or 0)\n\n base = options.min !== null ? options.min : 0;\n aboveMin = value - base; // - round to the nearest step\n\n aboveMin = Math.round(aboveMin / options.step) * options.step; // - rounding is based on 0, so adjust back to our base\n\n value = base + aboveMin; // Fix precision from bad JS floating point math\n\n value = parseFloat(value.toFixed(this._precision())); // Clamp the value\n\n if (options.max !== null && value > options.max) {\n return options.max;\n }\n\n if (options.min !== null && value < options.min) {\n return options.min;\n }\n\n return value;\n },\n _stop: function (event) {\n if (!this.spinning) {\n return;\n }\n\n clearTimeout(this.timer);\n clearTimeout(this.mousewheelTimer);\n this.counter = 0;\n this.spinning = false;\n\n this._trigger(\"stop\", event);\n },\n _setOption: function (key, value) {\n var prevValue, first, last;\n\n if (key === \"culture\" || key === \"numberFormat\") {\n prevValue = this._parse(this.element.val());\n this.options[key] = value;\n this.element.val(this._format(prevValue));\n return;\n }\n\n if (key === \"max\" || key === \"min\" || key === \"step\") {\n if (typeof value === \"string\") {\n value = this._parse(value);\n }\n }\n\n if (key === \"icons\") {\n first = this.buttons.first().find(\".ui-icon\");\n\n this._removeClass(first, null, this.options.icons.up);\n\n this._addClass(first, null, value.up);\n\n last = this.buttons.last().find(\".ui-icon\");\n\n this._removeClass(last, null, this.options.icons.down);\n\n this._addClass(last, null, value.down);\n }\n\n this._super(key, value);\n },\n _setOptionDisabled: function (value) {\n this._super(value);\n\n this._toggleClass(this.uiSpinner, null, \"ui-state-disabled\", !!value);\n\n this.element.prop(\"disabled\", !!value);\n this.buttons.button(value ? \"disable\" : \"enable\");\n },\n _setOptions: spinnerModifer(function (options) {\n this._super(options);\n }),\n _parse: function (val) {\n if (typeof val === \"string\" && val !== \"\") {\n val = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(val, 10, this.options.culture) : +val;\n }\n\n return val === \"\" || isNaN(val) ? null : val;\n },\n _format: function (value) {\n if (value === \"\") {\n return \"\";\n }\n\n return window.Globalize && this.options.numberFormat ? Globalize.format(value, this.options.numberFormat, this.options.culture) : value;\n },\n _refresh: function () {\n this.element.attr({\n \"aria-valuemin\": this.options.min,\n \"aria-valuemax\": this.options.max,\n // TODO: what should we do with values that can't be parsed?\n \"aria-valuenow\": this._parse(this.element.val())\n });\n },\n isValid: function () {\n var value = this.value(); // Null is invalid\n\n if (value === null) {\n return false;\n } // If value gets adjusted, it's invalid\n\n\n return value === this._adjustValue(value);\n },\n // Update the value without triggering change\n _value: function (value, allowAny) {\n var parsed;\n\n if (value !== \"\") {\n parsed = this._parse(value);\n\n if (parsed !== null) {\n if (!allowAny) {\n parsed = this._adjustValue(parsed);\n }\n\n value = this._format(parsed);\n }\n }\n\n this.element.val(value);\n\n this._refresh();\n },\n _destroy: function () {\n this.element.prop(\"disabled\", false).removeAttr(\"autocomplete role aria-valuemin aria-valuemax aria-valuenow\");\n this.uiSpinner.replaceWith(this.element);\n },\n stepUp: spinnerModifer(function (steps) {\n this._stepUp(steps);\n }),\n _stepUp: function (steps) {\n if (this._start()) {\n this._spin((steps || 1) * this.options.step);\n\n this._stop();\n }\n },\n stepDown: spinnerModifer(function (steps) {\n this._stepDown(steps);\n }),\n _stepDown: function (steps) {\n if (this._start()) {\n this._spin((steps || 1) * -this.options.step);\n\n this._stop();\n }\n },\n pageUp: spinnerModifer(function (pages) {\n this._stepUp((pages || 1) * this.options.page);\n }),\n pageDown: spinnerModifer(function (pages) {\n this._stepDown((pages || 1) * this.options.page);\n }),\n value: function (newVal) {\n if (!arguments.length) {\n return this._parse(this.element.val());\n }\n\n spinnerModifer(this._value).call(this, newVal);\n },\n widget: function () {\n return this.uiSpinner;\n }\n }); // DEPRECATED\n // TODO: switch return back to widget declaration at top of file when this is removed\n\n if ($.uiBackCompat !== false) {\n // Backcompat for spinner html extension points\n $.widget(\"ui.spinner\", $.ui.spinner, {\n _enhance: function () {\n this.uiSpinner = this.element.attr(\"autocomplete\", \"off\").wrap(this._uiSpinnerHtml()).parent() // Add buttons\n .append(this._buttonHtml());\n },\n _uiSpinnerHtml: function () {\n return \"\";\n },\n _buttonHtml: function () {\n return \"\";\n }\n });\n }\n\n var widgetsSpinner = $.ui.spinner;\n /*!\n * jQuery UI Tabs 1.12.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 //>>label: Tabs\n //>>group: Widgets\n //>>description: Transforms a set of container elements into a tab structure.\n //>>docs: http://api.jqueryui.com/tabs/\n //>>demos: http://jqueryui.com/tabs/\n //>>css.structure: ../../themes/base/core.css\n //>>css.structure: ../../themes/base/tabs.css\n //>>css.theme: ../../themes/base/theme.css\n\n $.widget(\"ui.tabs\", {\n version: \"1.12.1\",\n delay: 300,\n options: {\n active: null,\n classes: {\n \"ui-tabs\": \"ui-corner-all\",\n \"ui-tabs-nav\": \"ui-corner-all\",\n \"ui-tabs-panel\": \"ui-corner-bottom\",\n \"ui-tabs-tab\": \"ui-corner-top\"\n },\n collapsible: false,\n event: \"click\",\n heightStyle: \"content\",\n hide: null,\n show: null,\n // Callbacks\n activate: null,\n beforeActivate: null,\n beforeLoad: null,\n load: null\n },\n _isLocal: function () {\n var rhash = /#.*$/;\n return function (anchor) {\n var anchorUrl, locationUrl;\n anchorUrl = anchor.href.replace(rhash, \"\");\n locationUrl = location.href.replace(rhash, \"\"); // Decoding may throw an error if the URL isn't UTF-8 (#9518)\n\n try {\n anchorUrl = decodeURIComponent(anchorUrl);\n } catch (error) {}\n\n try {\n locationUrl = decodeURIComponent(locationUrl);\n } catch (error) {}\n\n return anchor.hash.length > 1 && anchorUrl === locationUrl;\n };\n }(),\n _create: function () {\n var that = this,\n options = this.options;\n this.running = false;\n\n this._addClass(\"ui-tabs\", \"ui-widget ui-widget-content\");\n\n this._toggleClass(\"ui-tabs-collapsible\", null, options.collapsible);\n\n this._processTabs();\n\n options.active = this._initialActive(); // Take disabling tabs via class attribute from HTML\n // into account and update option properly.\n\n if ($.isArray(options.disabled)) {\n options.disabled = $.unique(options.disabled.concat($.map(this.tabs.filter(\".ui-state-disabled\"), function (li) {\n return that.tabs.index(li);\n }))).sort();\n } // Check for length avoids error when initializing empty list\n\n\n if (this.options.active !== false && this.anchors.length) {\n this.active = this._findActive(options.active);\n } else {\n this.active = $();\n }\n\n this._refresh();\n\n if (this.active.length) {\n this.load(options.active);\n }\n },\n _initialActive: function () {\n var active = this.options.active,\n collapsible = this.options.collapsible,\n locationHash = location.hash.substring(1);\n\n if (active === null) {\n // check the fragment identifier in the URL\n if (locationHash) {\n this.tabs.each(function (i, tab) {\n if ($(tab).attr(\"aria-controls\") === locationHash) {\n active = i;\n return false;\n }\n });\n } // Check for a tab marked active via a class\n\n\n if (active === null) {\n active = this.tabs.index(this.tabs.filter(\".ui-tabs-active\"));\n } // No active tab, set to false\n\n\n if (active === null || active === -1) {\n active = this.tabs.length ? 0 : false;\n }\n } // Handle numbers: negative, out of range\n\n\n if (active !== false) {\n active = this.tabs.index(this.tabs.eq(active));\n\n if (active === -1) {\n active = collapsible ? false : 0;\n }\n } // Don't allow collapsible: false and active: false\n\n\n if (!collapsible && active === false && this.anchors.length) {\n active = 0;\n }\n\n return active;\n },\n _getCreateEventData: function () {\n return {\n tab: this.active,\n panel: !this.active.length ? $() : this._getPanelForTab(this.active)\n };\n },\n _tabKeydown: function (event) {\n var focusedTab = $($.ui.safeActiveElement(this.document[0])).closest(\"li\"),\n selectedIndex = this.tabs.index(focusedTab),\n goingForward = true;\n\n if (this._handlePageNav(event)) {\n return;\n }\n\n switch (event.keyCode) {\n case $.ui.keyCode.RIGHT:\n case $.ui.keyCode.DOWN:\n selectedIndex++;\n break;\n\n case $.ui.keyCode.UP:\n case $.ui.keyCode.LEFT:\n goingForward = false;\n selectedIndex--;\n break;\n\n case $.ui.keyCode.END:\n selectedIndex = this.anchors.length - 1;\n break;\n\n case $.ui.keyCode.HOME:\n selectedIndex = 0;\n break;\n\n case $.ui.keyCode.SPACE:\n // Activate only, no collapsing\n event.preventDefault();\n clearTimeout(this.activating);\n\n this._activate(selectedIndex);\n\n return;\n\n case $.ui.keyCode.ENTER:\n // Toggle (cancel delayed activation, allow collapsing)\n event.preventDefault();\n clearTimeout(this.activating); // Determine if we should collapse or activate\n\n this._activate(selectedIndex === this.options.active ? false : selectedIndex);\n\n return;\n\n default:\n return;\n } // Focus the appropriate tab, based on which key was pressed\n\n\n event.preventDefault();\n clearTimeout(this.activating);\n selectedIndex = this._focusNextTab(selectedIndex, goingForward); // Navigating with control/command key will prevent automatic activation\n\n if (!event.ctrlKey && !event.metaKey) {\n // Update aria-selected immediately so that AT think the tab is already selected.\n // Otherwise AT may confuse the user by stating that they need to activate the tab,\n // but the tab will already be activated by the time the announcement finishes.\n focusedTab.attr(\"aria-selected\", \"false\");\n this.tabs.eq(selectedIndex).attr(\"aria-selected\", \"true\");\n this.activating = this._delay(function () {\n this.option(\"active\", selectedIndex);\n }, this.delay);\n }\n },\n _panelKeydown: function (event) {\n if (this._handlePageNav(event)) {\n return;\n } // Ctrl+up moves focus to the current tab\n\n\n if (event.ctrlKey && event.keyCode === $.ui.keyCode.UP) {\n event.preventDefault();\n this.active.trigger(\"focus\");\n }\n },\n // Alt+page up/down moves focus to the previous/next tab (and activates)\n _handlePageNav: function (event) {\n if (event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP) {\n this._activate(this._focusNextTab(this.options.active - 1, false));\n\n return true;\n }\n\n if (event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN) {\n this._activate(this._focusNextTab(this.options.active + 1, true));\n\n return true;\n }\n },\n _findNextTab: function (index, goingForward) {\n var lastTabIndex = this.tabs.length - 1;\n\n function constrain() {\n if (index > lastTabIndex) {\n index = 0;\n }\n\n if (index < 0) {\n index = lastTabIndex;\n }\n\n return index;\n }\n\n while ($.inArray(constrain(), this.options.disabled) !== -1) {\n index = goingForward ? index + 1 : index - 1;\n }\n\n return index;\n },\n _focusNextTab: function (index, goingForward) {\n index = this._findNextTab(index, goingForward);\n this.tabs.eq(index).trigger(\"focus\");\n return index;\n },\n _setOption: function (key, value) {\n if (key === \"active\") {\n // _activate() will handle invalid values and update this.options\n this._activate(value);\n\n return;\n }\n\n this._super(key, value);\n\n if (key === \"collapsible\") {\n this._toggleClass(\"ui-tabs-collapsible\", null, value); // Setting collapsible: false while collapsed; open first panel\n\n\n if (!value && this.options.active === false) {\n this._activate(0);\n }\n }\n\n if (key === \"event\") {\n this._setupEvents(value);\n }\n\n if (key === \"heightStyle\") {\n this._setupHeightStyle(value);\n }\n },\n _sanitizeSelector: function (hash) {\n return hash ? hash.replace(/[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g, \"\\\\$&\") : \"\";\n },\n refresh: function () {\n var options = this.options,\n lis = this.tablist.children(\":has(a[href])\"); // Get disabled tabs from class attribute from HTML\n // this will get converted to a boolean if needed in _refresh()\n\n options.disabled = $.map(lis.filter(\".ui-state-disabled\"), function (tab) {\n return lis.index(tab);\n });\n\n this._processTabs(); // Was collapsed or no tabs\n\n\n if (options.active === false || !this.anchors.length) {\n options.active = false;\n this.active = $(); // was active, but active tab is gone\n } else if (this.active.length && !$.contains(this.tablist[0], this.active[0])) {\n // all remaining tabs are disabled\n if (this.tabs.length === options.disabled.length) {\n options.active = false;\n this.active = $(); // activate previous tab\n } else {\n this._activate(this._findNextTab(Math.max(0, options.active - 1), false));\n } // was active, active tab still exists\n\n } else {\n // make sure active index is correct\n options.active = this.tabs.index(this.active);\n }\n\n this._refresh();\n },\n _refresh: function () {\n this._setOptionDisabled(this.options.disabled);\n\n this._setupEvents(this.options.event);\n\n this._setupHeightStyle(this.options.heightStyle);\n\n this.tabs.not(this.active).attr({\n \"aria-selected\": \"false\",\n \"aria-expanded\": \"false\",\n tabIndex: -1\n });\n this.panels.not(this._getPanelForTab(this.active)).hide().attr({\n \"aria-hidden\": \"true\"\n }); // Make sure one tab is in the tab order\n\n if (!this.active.length) {\n this.tabs.eq(0).attr(\"tabIndex\", 0);\n } else {\n this.active.attr({\n \"aria-selected\": \"true\",\n \"aria-expanded\": \"true\",\n tabIndex: 0\n });\n\n this._addClass(this.active, \"ui-tabs-active\", \"ui-state-active\");\n\n this._getPanelForTab(this.active).show().attr({\n \"aria-hidden\": \"false\"\n });\n }\n },\n _processTabs: function () {\n var that = this,\n prevTabs = this.tabs,\n prevAnchors = this.anchors,\n prevPanels = this.panels;\n this.tablist = this._getList().attr(\"role\", \"tablist\");\n\n this._addClass(this.tablist, \"ui-tabs-nav\", \"ui-helper-reset ui-helper-clearfix ui-widget-header\"); // Prevent users from focusing disabled tabs via click\n\n\n this.tablist.on(\"mousedown\" + this.eventNamespace, \"> li\", function (event) {\n if ($(this).is(\".ui-state-disabled\")) {\n event.preventDefault();\n }\n }) // Support: IE <9\n // Preventing the default action in mousedown doesn't prevent IE\n // from focusing the element, so if the anchor gets focused, blur.\n // We don't have to worry about focusing the previously focused\n // element since clicking on a non-focusable element should focus\n // the body anyway.\n .on(\"focus\" + this.eventNamespace, \".ui-tabs-anchor\", function () {\n if ($(this).closest(\"li\").is(\".ui-state-disabled\")) {\n this.blur();\n }\n });\n this.tabs = this.tablist.find(\"> li:has(a[href])\").attr({\n role: \"tab\",\n tabIndex: -1\n });\n\n this._addClass(this.tabs, \"ui-tabs-tab\", \"ui-state-default\");\n\n this.anchors = this.tabs.map(function () {\n return $(\"a\", this)[0];\n }).attr({\n role: \"presentation\",\n tabIndex: -1\n });\n\n this._addClass(this.anchors, \"ui-tabs-anchor\");\n\n this.panels = $();\n this.anchors.each(function (i, anchor) {\n var selector,\n panel,\n panelId,\n anchorId = $(anchor).uniqueId().attr(\"id\"),\n tab = $(anchor).closest(\"li\"),\n originalAriaControls = tab.attr(\"aria-controls\"); // Inline tab\n\n if (that._isLocal(anchor)) {\n selector = anchor.hash;\n panelId = selector.substring(1);\n panel = that.element.find(that._sanitizeSelector(selector)); // remote tab\n } else {\n // If the tab doesn't already have aria-controls,\n // generate an id by using a throw-away element\n panelId = tab.attr(\"aria-controls\") || $({}).uniqueId()[0].id;\n selector = \"#\" + panelId;\n panel = that.element.find(selector);\n\n if (!panel.length) {\n panel = that._createPanel(panelId);\n panel.insertAfter(that.panels[i - 1] || that.tablist);\n }\n\n panel.attr(\"aria-live\", \"polite\");\n }\n\n if (panel.length) {\n that.panels = that.panels.add(panel);\n }\n\n if (originalAriaControls) {\n tab.data(\"ui-tabs-aria-controls\", originalAriaControls);\n }\n\n tab.attr({\n \"aria-controls\": panelId,\n \"aria-labelledby\": anchorId\n });\n panel.attr(\"aria-labelledby\", anchorId);\n });\n this.panels.attr(\"role\", \"tabpanel\");\n\n this._addClass(this.panels, \"ui-tabs-panel\", \"ui-widget-content\"); // Avoid memory leaks (#10056)\n\n\n if (prevTabs) {\n this._off(prevTabs.not(this.tabs));\n\n this._off(prevAnchors.not(this.anchors));\n\n this._off(prevPanels.not(this.panels));\n }\n },\n // Allow overriding how to find the list for rare usage scenarios (#7715)\n _getList: function () {\n return this.tablist || this.element.find(\"ol, ul\").eq(0);\n },\n _createPanel: function (id) {\n return $(\"\").attr(\"id\", id).data(\"ui-tabs-destroy\", true);\n },\n _setOptionDisabled: function (disabled) {\n var currentItem, li, i;\n\n if ($.isArray(disabled)) {\n if (!disabled.length) {\n disabled = false;\n } else if (disabled.length === this.anchors.length) {\n disabled = true;\n }\n } // Disable tabs\n\n\n for (i = 0; li = this.tabs[i]; i++) {\n currentItem = $(li);\n\n if (disabled === true || $.inArray(i, disabled) !== -1) {\n currentItem.attr(\"aria-disabled\", \"true\");\n\n this._addClass(currentItem, null, \"ui-state-disabled\");\n } else {\n currentItem.removeAttr(\"aria-disabled\");\n\n this._removeClass(currentItem, null, \"ui-state-disabled\");\n }\n }\n\n this.options.disabled = disabled;\n\n this._toggleClass(this.widget(), this.widgetFullName + \"-disabled\", null, disabled === true);\n },\n _setupEvents: function (event) {\n var events = {};\n\n if (event) {\n $.each(event.split(\" \"), function (index, eventName) {\n events[eventName] = \"_eventHandler\";\n });\n }\n\n this._off(this.anchors.add(this.tabs).add(this.panels)); // Always prevent the default action, even when disabled\n\n\n this._on(true, this.anchors, {\n click: function (event) {\n event.preventDefault();\n }\n });\n\n this._on(this.anchors, events);\n\n this._on(this.tabs, {\n keydown: \"_tabKeydown\"\n });\n\n this._on(this.panels, {\n keydown: \"_panelKeydown\"\n });\n\n this._focusable(this.tabs);\n\n this._hoverable(this.tabs);\n },\n _setupHeightStyle: function (heightStyle) {\n var maxHeight,\n parent = this.element.parent();\n\n if (heightStyle === \"fill\") {\n maxHeight = parent.height();\n maxHeight -= this.element.outerHeight() - this.element.height();\n this.element.siblings(\":visible\").each(function () {\n var elem = $(this),\n position = elem.css(\"position\");\n\n if (position === \"absolute\" || position === \"fixed\") {\n return;\n }\n\n maxHeight -= elem.outerHeight(true);\n });\n this.element.children().not(this.panels).each(function () {\n maxHeight -= $(this).outerHeight(true);\n });\n this.panels.each(function () {\n $(this).height(Math.max(0, maxHeight - $(this).innerHeight() + $(this).height()));\n }).css(\"overflow\", \"auto\");\n } else if (heightStyle === \"auto\") {\n maxHeight = 0;\n this.panels.each(function () {\n maxHeight = Math.max(maxHeight, $(this).height(\"\").height());\n }).height(maxHeight);\n }\n },\n _eventHandler: function (event) {\n var options = this.options,\n active = this.active,\n anchor = $(event.currentTarget),\n tab = anchor.closest(\"li\"),\n clickedIsActive = tab[0] === active[0],\n collapsing = clickedIsActive && options.collapsible,\n toShow = collapsing ? $() : this._getPanelForTab(tab),\n toHide = !active.length ? $() : this._getPanelForTab(active),\n eventData = {\n oldTab: active,\n oldPanel: toHide,\n newTab: collapsing ? $() : tab,\n newPanel: toShow\n };\n event.preventDefault();\n\n if (tab.hasClass(\"ui-state-disabled\") || // tab is already loading\n tab.hasClass(\"ui-tabs-loading\") || // can't switch durning an animation\n this.running || // click on active header, but not collapsible\n clickedIsActive && !options.collapsible || // allow canceling activation\n this._trigger(\"beforeActivate\", event, eventData) === false) {\n return;\n }\n\n options.active = collapsing ? false : this.tabs.index(tab);\n this.active = clickedIsActive ? $() : tab;\n\n if (this.xhr) {\n this.xhr.abort();\n }\n\n if (!toHide.length && !toShow.length) {\n $.error(\"jQuery UI Tabs: Mismatching fragment identifier.\");\n }\n\n if (toShow.length) {\n this.load(this.tabs.index(tab), event);\n }\n\n this._toggle(event, eventData);\n },\n // Handles show/hide for selecting tabs\n _toggle: function (event, eventData) {\n var that = this,\n toShow = eventData.newPanel,\n toHide = eventData.oldPanel;\n this.running = true;\n\n function complete() {\n that.running = false;\n\n that._trigger(\"activate\", event, eventData);\n }\n\n function show() {\n that._addClass(eventData.newTab.closest(\"li\"), \"ui-tabs-active\", \"ui-state-active\");\n\n if (toShow.length && that.options.show) {\n that._show(toShow, that.options.show, complete);\n } else {\n toShow.show();\n complete();\n }\n } // Start out by hiding, then showing, then completing\n\n\n if (toHide.length && this.options.hide) {\n this._hide(toHide, this.options.hide, function () {\n that._removeClass(eventData.oldTab.closest(\"li\"), \"ui-tabs-active\", \"ui-state-active\");\n\n show();\n });\n } else {\n this._removeClass(eventData.oldTab.closest(\"li\"), \"ui-tabs-active\", \"ui-state-active\");\n\n toHide.hide();\n show();\n }\n\n toHide.attr(\"aria-hidden\", \"true\");\n eventData.oldTab.attr({\n \"aria-selected\": \"false\",\n \"aria-expanded\": \"false\"\n }); // If we're switching tabs, remove the old tab from the tab order.\n // If we're opening from collapsed state, remove the previous tab from the tab order.\n // If we're collapsing, then keep the collapsing tab in the tab order.\n\n if (toShow.length && toHide.length) {\n eventData.oldTab.attr(\"tabIndex\", -1);\n } else if (toShow.length) {\n this.tabs.filter(function () {\n return $(this).attr(\"tabIndex\") === 0;\n }).attr(\"tabIndex\", -1);\n }\n\n toShow.attr(\"aria-hidden\", \"false\");\n eventData.newTab.attr({\n \"aria-selected\": \"true\",\n \"aria-expanded\": \"true\",\n tabIndex: 0\n });\n },\n _activate: function (index) {\n var anchor,\n active = this._findActive(index); // Trying to activate the already active panel\n\n\n if (active[0] === this.active[0]) {\n return;\n } // Trying to collapse, simulate a click on the current active header\n\n\n if (!active.length) {\n active = this.active;\n }\n\n anchor = active.find(\".ui-tabs-anchor\")[0];\n\n this._eventHandler({\n target: anchor,\n currentTarget: anchor,\n preventDefault: $.noop\n });\n },\n _findActive: function (index) {\n return index === false ? $() : this.tabs.eq(index);\n },\n _getIndex: function (index) {\n // meta-function to give users option to provide a href string instead of a numerical index.\n if (typeof index === \"string\") {\n index = this.anchors.index(this.anchors.filter(\"[href$='\" + $.ui.escapeSelector(index) + \"']\"));\n }\n\n return index;\n },\n _destroy: function () {\n if (this.xhr) {\n this.xhr.abort();\n }\n\n this.tablist.removeAttr(\"role\").off(this.eventNamespace);\n this.anchors.removeAttr(\"role tabIndex\").removeUniqueId();\n this.tabs.add(this.panels).each(function () {\n if ($.data(this, \"ui-tabs-destroy\")) {\n $(this).remove();\n } else {\n $(this).removeAttr(\"role tabIndex \" + \"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded\");\n }\n });\n this.tabs.each(function () {\n var li = $(this),\n prev = li.data(\"ui-tabs-aria-controls\");\n\n if (prev) {\n li.attr(\"aria-controls\", prev).removeData(\"ui-tabs-aria-controls\");\n } else {\n li.removeAttr(\"aria-controls\");\n }\n });\n this.panels.show();\n\n if (this.options.heightStyle !== \"content\") {\n this.panels.css(\"height\", \"\");\n }\n },\n enable: function (index) {\n var disabled = this.options.disabled;\n\n if (disabled === false) {\n return;\n }\n\n if (index === undefined) {\n disabled = false;\n } else {\n index = this._getIndex(index);\n\n if ($.isArray(disabled)) {\n disabled = $.map(disabled, function (num) {\n return num !== index ? num : null;\n });\n } else {\n disabled = $.map(this.tabs, function (li, num) {\n return num !== index ? num : null;\n });\n }\n }\n\n this._setOptionDisabled(disabled);\n },\n disable: function (index) {\n var disabled = this.options.disabled;\n\n if (disabled === true) {\n return;\n }\n\n if (index === undefined) {\n disabled = true;\n } else {\n index = this._getIndex(index);\n\n if ($.inArray(index, disabled) !== -1) {\n return;\n }\n\n if ($.isArray(disabled)) {\n disabled = $.merge([index], disabled).sort();\n } else {\n disabled = [index];\n }\n }\n\n this._setOptionDisabled(disabled);\n },\n load: function (index, event) {\n index = this._getIndex(index);\n\n var that = this,\n tab = this.tabs.eq(index),\n anchor = tab.find(\".ui-tabs-anchor\"),\n panel = this._getPanelForTab(tab),\n eventData = {\n tab: tab,\n panel: panel\n },\n complete = function (jqXHR, status) {\n if (status === \"abort\") {\n that.panels.stop(false, true);\n }\n\n that._removeClass(tab, \"ui-tabs-loading\");\n\n panel.removeAttr(\"aria-busy\");\n\n if (jqXHR === that.xhr) {\n delete that.xhr;\n }\n }; // Not remote\n\n\n if (this._isLocal(anchor[0])) {\n return;\n }\n\n this.xhr = $.ajax(this._ajaxSettings(anchor, event, eventData)); // Support: jQuery <1.8\n // jQuery <1.8 returns false if the request is canceled in beforeSend,\n // but as of 1.8, $.ajax() always returns a jqXHR object.\n\n if (this.xhr && this.xhr.statusText !== \"canceled\") {\n this._addClass(tab, \"ui-tabs-loading\");\n\n panel.attr(\"aria-busy\", \"true\");\n this.xhr.done(function (response, status, jqXHR) {\n // support: jQuery <1.8\n // http://bugs.jquery.com/ticket/11778\n setTimeout(function () {\n panel.html(response);\n\n that._trigger(\"load\", event, eventData);\n\n complete(jqXHR, status);\n }, 1);\n }).fail(function (jqXHR, status) {\n // support: jQuery <1.8\n // http://bugs.jquery.com/ticket/11778\n setTimeout(function () {\n complete(jqXHR, status);\n }, 1);\n });\n }\n },\n _ajaxSettings: function (anchor, event, eventData) {\n var that = this;\n return {\n // Support: IE <11 only\n // Strip any hash that exists to prevent errors with the Ajax request\n url: anchor.attr(\"href\").replace(/#.*$/, \"\"),\n beforeSend: function (jqXHR, settings) {\n return that._trigger(\"beforeLoad\", event, $.extend({\n jqXHR: jqXHR,\n ajaxSettings: settings\n }, eventData));\n }\n };\n },\n _getPanelForTab: function (tab) {\n var id = $(tab).attr(\"aria-controls\");\n return this.element.find(this._sanitizeSelector(\"#\" + id));\n }\n }); // DEPRECATED\n // TODO: Switch return back to widget declaration at top of file when this is removed\n\n if ($.uiBackCompat !== false) {\n // Backcompat for ui-tab class (now ui-tabs-tab)\n $.widget(\"ui.tabs\", $.ui.tabs, {\n _processTabs: function () {\n this._superApply(arguments);\n\n this._addClass(this.tabs, \"ui-tab\");\n }\n });\n }\n\n var widgetsTabs = $.ui.tabs;\n /*!\n * jQuery UI Tooltip 1.12.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 //>>label: Tooltip\n //>>group: Widgets\n //>>description: Shows additional information for any element on hover or focus.\n //>>docs: http://api.jqueryui.com/tooltip/\n //>>demos: http://jqueryui.com/tooltip/\n //>>css.structure: ../../themes/base/core.css\n //>>css.structure: ../../themes/base/tooltip.css\n //>>css.theme: ../../themes/base/theme.css\n\n $.widget(\"ui.tooltip\", {\n version: \"1.12.1\",\n options: {\n classes: {\n \"ui-tooltip\": \"ui-corner-all ui-widget-shadow\"\n },\n content: function () {\n // support: IE<9, Opera in jQuery <1.7\n // .text() can't accept undefined, so coerce to a string\n var title = $(this).attr(\"title\") || \"\"; // Escape title, since we're going from an attribute to raw HTML\n\n return $(\"
\").text(title).html();\n },\n hide: true,\n // Disabled elements have inconsistent behavior across browsers (#8661)\n items: \"[title]:not([disabled])\",\n position: {\n my: \"left top+15\",\n at: \"left bottom\",\n collision: \"flipfit flip\"\n },\n show: true,\n track: false,\n // Callbacks\n close: null,\n open: null\n },\n _addDescribedBy: function (elem, id) {\n var describedby = (elem.attr(\"aria-describedby\") || \"\").split(/\\s+/);\n describedby.push(id);\n elem.data(\"ui-tooltip-id\", id).attr(\"aria-describedby\", $.trim(describedby.join(\" \")));\n },\n _removeDescribedBy: function (elem) {\n var id = elem.data(\"ui-tooltip-id\"),\n describedby = (elem.attr(\"aria-describedby\") || \"\").split(/\\s+/),\n index = $.inArray(id, describedby);\n\n if (index !== -1) {\n describedby.splice(index, 1);\n }\n\n elem.removeData(\"ui-tooltip-id\");\n describedby = $.trim(describedby.join(\" \"));\n\n if (describedby) {\n elem.attr(\"aria-describedby\", describedby);\n } else {\n elem.removeAttr(\"aria-describedby\");\n }\n },\n _create: function () {\n this._on({\n mouseover: \"open\",\n focusin: \"open\"\n }); // IDs of generated tooltips, needed for destroy\n\n\n this.tooltips = {}; // IDs of parent tooltips where we removed the title attribute\n\n this.parents = {}; // Append the aria-live region so tooltips announce correctly\n\n this.liveRegion = $(\"\").attr({\n role: \"log\",\n \"aria-live\": \"assertive\",\n \"aria-relevant\": \"additions\"\n }).appendTo(this.document[0].body);\n\n this._addClass(this.liveRegion, null, \"ui-helper-hidden-accessible\");\n\n this.disabledTitles = $([]);\n },\n _setOption: function (key, value) {\n var that = this;\n\n this._super(key, value);\n\n if (key === \"content\") {\n $.each(this.tooltips, function (id, tooltipData) {\n that._updateContent(tooltipData.element);\n });\n }\n },\n _setOptionDisabled: function (value) {\n this[value ? \"_disable\" : \"_enable\"]();\n },\n _disable: function () {\n var that = this; // Close open tooltips\n\n $.each(this.tooltips, function (id, tooltipData) {\n var event = $.Event(\"blur\");\n event.target = event.currentTarget = tooltipData.element[0];\n that.close(event, true);\n }); // Remove title attributes to prevent native tooltips\n\n this.disabledTitles = this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function () {\n var element = $(this);\n\n if (element.is(\"[title]\")) {\n return element.data(\"ui-tooltip-title\", element.attr(\"title\")).removeAttr(\"title\");\n }\n }));\n },\n _enable: function () {\n // restore title attributes\n this.disabledTitles.each(function () {\n var element = $(this);\n\n if (element.data(\"ui-tooltip-title\")) {\n element.attr(\"title\", element.data(\"ui-tooltip-title\"));\n }\n });\n this.disabledTitles = $([]);\n },\n open: function (event) {\n var that = this,\n target = $(event ? event.target : this.element) // we need closest here due to mouseover bubbling,\n // but always pointing at the same event target\n .closest(this.options.items); // No element to show a tooltip for or the tooltip is already open\n\n if (!target.length || target.data(\"ui-tooltip-id\")) {\n return;\n }\n\n if (target.attr(\"title\")) {\n target.data(\"ui-tooltip-title\", target.attr(\"title\"));\n }\n\n target.data(\"ui-tooltip-open\", true); // Kill parent tooltips, custom or native, for hover\n\n if (event && event.type === \"mouseover\") {\n target.parents().each(function () {\n var parent = $(this),\n blurEvent;\n\n if (parent.data(\"ui-tooltip-open\")) {\n blurEvent = $.Event(\"blur\");\n blurEvent.target = blurEvent.currentTarget = this;\n that.close(blurEvent, true);\n }\n\n if (parent.attr(\"title\")) {\n parent.uniqueId();\n that.parents[this.id] = {\n element: this,\n title: parent.attr(\"title\")\n };\n parent.attr(\"title\", \"\");\n }\n });\n }\n\n this._registerCloseHandlers(event, target);\n\n this._updateContent(target, event);\n },\n _updateContent: function (target, event) {\n var content,\n contentOption = this.options.content,\n that = this,\n eventType = event ? event.type : null;\n\n if (typeof contentOption === \"string\" || contentOption.nodeType || contentOption.jquery) {\n return this._open(event, target, contentOption);\n }\n\n content = contentOption.call(target[0], function (response) {\n // IE may instantly serve a cached response for ajax requests\n // delay this call to _open so the other call to _open runs first\n that._delay(function () {\n // Ignore async response if tooltip was closed already\n if (!target.data(\"ui-tooltip-open\")) {\n return;\n } // JQuery creates a special event for focusin when it doesn't\n // exist natively. To improve performance, the native event\n // object is reused and the type is changed. Therefore, we can't\n // rely on the type being correct after the event finished\n // bubbling, so we set it back to the previous value. (#8740)\n\n\n if (event) {\n event.type = eventType;\n }\n\n this._open(event, target, response);\n });\n });\n\n if (content) {\n this._open(event, target, content);\n }\n },\n _open: function (event, target, content) {\n var tooltipData,\n tooltip,\n delayedShow,\n a11yContent,\n positionOption = $.extend({}, this.options.position);\n\n if (!content) {\n return;\n } // Content can be updated multiple times. If the tooltip already\n // exists, then just update the content and bail.\n\n\n tooltipData = this._find(target);\n\n if (tooltipData) {\n tooltipData.tooltip.find(\".ui-tooltip-content\").html(content);\n return;\n } // If we have a title, clear it to prevent the native tooltip\n // we have to check first to avoid defining a title if none exists\n // (we don't want to cause an element to start matching [title])\n //\n // We use removeAttr only for key events, to allow IE to export the correct\n // accessible attributes. For mouse events, set to empty string to avoid\n // native tooltip showing up (happens only when removing inside mouseover).\n\n\n if (target.is(\"[title]\")) {\n if (event && event.type === \"mouseover\") {\n target.attr(\"title\", \"\");\n } else {\n target.removeAttr(\"title\");\n }\n }\n\n tooltipData = this._tooltip(target);\n tooltip = tooltipData.tooltip;\n\n this._addDescribedBy(target, tooltip.attr(\"id\"));\n\n tooltip.find(\".ui-tooltip-content\").html(content); // Support: Voiceover on OS X, JAWS on IE <= 9\n // JAWS announces deletions even when aria-relevant=\"additions\"\n // Voiceover will sometimes re-read the entire log region's contents from the beginning\n\n this.liveRegion.children().hide();\n a11yContent = $(\"
\").html(tooltip.find(\".ui-tooltip-content\").html());\n a11yContent.removeAttr(\"name\").find(\"[name]\").removeAttr(\"name\");\n a11yContent.removeAttr(\"id\").find(\"[id]\").removeAttr(\"id\");\n a11yContent.appendTo(this.liveRegion);\n\n function position(event) {\n positionOption.of = event;\n\n if (tooltip.is(\":hidden\")) {\n return;\n }\n\n tooltip.position(positionOption);\n }\n\n if (this.options.track && event && /^mouse/.test(event.type)) {\n this._on(this.document, {\n mousemove: position\n }); // trigger once to override element-relative positioning\n\n\n position(event);\n } else {\n tooltip.position($.extend({\n of: target\n }, this.options.position));\n }\n\n tooltip.hide();\n\n this._show(tooltip, this.options.show); // Handle tracking tooltips that are shown with a delay (#8644). As soon\n // as the tooltip is visible, position the tooltip using the most recent\n // event.\n // Adds the check to add the timers only when both delay and track options are set (#14682)\n\n\n if (this.options.track && this.options.show && this.options.show.delay) {\n delayedShow = this.delayedShow = setInterval(function () {\n if (tooltip.is(\":visible\")) {\n position(positionOption.of);\n clearInterval(delayedShow);\n }\n }, $.fx.interval);\n }\n\n this._trigger(\"open\", event, {\n tooltip: tooltip\n });\n },\n _registerCloseHandlers: function (event, target) {\n var events = {\n keyup: function (event) {\n if (event.keyCode === $.ui.keyCode.ESCAPE) {\n var fakeEvent = $.Event(event);\n fakeEvent.currentTarget = target[0];\n this.close(fakeEvent, true);\n }\n }\n }; // Only bind remove handler for delegated targets. Non-delegated\n // tooltips will handle this in destroy.\n\n if (target[0] !== this.element[0]) {\n events.remove = function () {\n this._removeTooltip(this._find(target).tooltip);\n };\n }\n\n if (!event || event.type === \"mouseover\") {\n events.mouseleave = \"close\";\n }\n\n if (!event || event.type === \"focusin\") {\n events.focusout = \"close\";\n }\n\n this._on(true, target, events);\n },\n close: function (event) {\n var tooltip,\n that = this,\n target = $(event ? event.currentTarget : this.element),\n tooltipData = this._find(target); // The tooltip may already be closed\n\n\n if (!tooltipData) {\n // We set ui-tooltip-open immediately upon open (in open()), but only set the\n // additional data once there's actually content to show (in _open()). So even if the\n // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in\n // the period between open() and _open().\n target.removeData(\"ui-tooltip-open\");\n return;\n }\n\n tooltip = tooltipData.tooltip; // Disabling closes the tooltip, so we need to track when we're closing\n // to avoid an infinite loop in case the tooltip becomes disabled on close\n\n if (tooltipData.closing) {\n return;\n } // Clear the interval for delayed tracking tooltips\n\n\n clearInterval(this.delayedShow); // Only set title if we had one before (see comment in _open())\n // If the title attribute has changed since open(), don't restore\n\n if (target.data(\"ui-tooltip-title\") && !target.attr(\"title\")) {\n target.attr(\"title\", target.data(\"ui-tooltip-title\"));\n }\n\n this._removeDescribedBy(target);\n\n tooltipData.hiding = true;\n tooltip.stop(true);\n\n this._hide(tooltip, this.options.hide, function () {\n that._removeTooltip($(this));\n });\n\n target.removeData(\"ui-tooltip-open\");\n\n this._off(target, \"mouseleave focusout keyup\"); // Remove 'remove' binding only on delegated targets\n\n\n if (target[0] !== this.element[0]) {\n this._off(target, \"remove\");\n }\n\n this._off(this.document, \"mousemove\");\n\n if (event && event.type === \"mouseleave\") {\n $.each(this.parents, function (id, parent) {\n $(parent.element).attr(\"title\", parent.title);\n delete that.parents[id];\n });\n }\n\n tooltipData.closing = true;\n\n this._trigger(\"close\", event, {\n tooltip: tooltip\n });\n\n if (!tooltipData.hiding) {\n tooltipData.closing = false;\n }\n },\n _tooltip: function (element) {\n var tooltip = $(\"
\").attr(\"role\", \"tooltip\"),\n content = $(\"
\").appendTo(tooltip),\n id = tooltip.uniqueId().attr(\"id\");\n\n this._addClass(content, \"ui-tooltip-content\");\n\n this._addClass(tooltip, \"ui-tooltip\", \"ui-widget ui-widget-content\");\n\n tooltip.appendTo(this._appendTo(element));\n return this.tooltips[id] = {\n element: element,\n tooltip: tooltip\n };\n },\n _find: function (target) {\n var id = target.data(\"ui-tooltip-id\");\n return id ? this.tooltips[id] : null;\n },\n _removeTooltip: function (tooltip) {\n tooltip.remove();\n delete this.tooltips[tooltip.attr(\"id\")];\n },\n _appendTo: function (target) {\n var element = target.closest(\".ui-front, dialog\");\n\n if (!element.length) {\n element = this.document[0].body;\n }\n\n return element;\n },\n _destroy: function () {\n var that = this; // Close open tooltips\n\n $.each(this.tooltips, function (id, tooltipData) {\n // Delegate to close method to handle common cleanup\n var event = $.Event(\"blur\"),\n element = tooltipData.element;\n event.target = event.currentTarget = element[0];\n that.close(event, true); // Remove immediately; destroying an open tooltip doesn't use the\n // hide animation\n\n $(\"#\" + id).remove(); // Restore the title\n\n if (element.data(\"ui-tooltip-title\")) {\n // If the title attribute has changed since open(), don't restore\n if (!element.attr(\"title\")) {\n element.attr(\"title\", element.data(\"ui-tooltip-title\"));\n }\n\n element.removeData(\"ui-tooltip-title\");\n }\n });\n this.liveRegion.remove();\n }\n }); // DEPRECATED\n // TODO: Switch return back to widget declaration at top of file when this is removed\n\n if ($.uiBackCompat !== false) {\n // Backcompat for tooltipClass option\n $.widget(\"ui.tooltip\", $.ui.tooltip, {\n options: {\n tooltipClass: null\n },\n _tooltip: function () {\n var tooltipData = this._superApply(arguments);\n\n if (this.options.tooltipClass) {\n tooltipData.tooltip.addClass(this.options.tooltipClass);\n }\n\n return tooltipData;\n }\n });\n }\n\n var widgetsTooltip = $.ui.tooltip;\n});","/*!\n * jQuery JavaScript Library v3.6.0\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2021-03-02T17:08Z\n */\n(function (global, factory) {\n \"use strict\";\n\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n // For CommonJS and CommonJS-like environments where a proper `window`\n // is present, execute the factory and get jQuery.\n // For environments that do not have a `window` with a `document`\n // (such as Node.js), expose a factory as module.exports.\n // This accentuates the need for the creation of a real `window`.\n // e.g. var jQuery = require(\"jquery\")(window);\n // See ticket #14549 for more info.\n module.exports = global.document ? factory(global, true) : function (w) {\n if (!w.document) {\n throw new Error(\"jQuery requires a window with a document\");\n }\n\n return factory(w);\n };\n } else {\n factory(global);\n } // Pass this if window is not defined yet\n\n})(typeof window !== \"undefined\" ? window : this, function (window, noGlobal) {\n // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n // enough that all such attempts are guarded in a try block.\n \"use strict\";\n\n var arr = [];\n var getProto = Object.getPrototypeOf;\n var slice = arr.slice;\n var flat = arr.flat ? function (array) {\n return arr.flat.call(array);\n } : function (array) {\n return arr.concat.apply([], array);\n };\n var push = arr.push;\n var indexOf = arr.indexOf;\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 support = {};\n\n var isFunction = function isFunction(obj) {\n // Support: Chrome <=57, Firefox <=52\n // In some browsers, typeof returns \"function\" for HTML