\r\n parentNode = sourceNode;\r\n }\r\n\r\n // Find the template and add it to the container\r\n var template = findFirstChild(parentNode, namedTemplate ? null : 'data-template');\r\n container.insertBefore(template.cloneNode(true), null);\r\n\r\n // Remove the template node\r\n ko.removeNode(template);\r\n\r\n return container;\r\n }\r\n\r\n // Add an existing element\r\n function valueToChangeAddExistingItem(value, index) {\r\n return {\r\n status: 'existing',\r\n value: value,\r\n index: index\r\n };\r\n }\r\n\r\n function InitializedForeach(spec) {\r\n var self = this;\r\n this.element = spec.element;\r\n this.container = isVirtualNode(this.element) ?\r\n this.element.parentNode : this.element;\r\n this.$context = spec.$context;\r\n this.data = spec.data;\r\n this.as = spec.as;\r\n this.noContext = spec.noContext;\r\n this.namedTemplate = spec.name !== undefined;\r\n this.templateNode = makeTemplateNode(\r\n spec.name ? document.getElementById(spec.name).cloneNode(true) : spec.element,\r\n this.namedTemplate\r\n );\r\n this.afterQueueFlush = spec.afterQueueFlush;\r\n this.beforeQueueFlush = spec.beforeQueueFlush;\r\n this.changeQueue = [];\r\n this.lastNodesList = [];\r\n this.indexesToDelete = [];\r\n this.rendering_queued = false;\r\n\r\n // Find the existing elements that will be bound to the data array\r\n this.existingElements = findChildren(this.container, this.namedTemplate ? null : 'data-init');\r\n\r\n // Check to see if we should manually create the array elements\r\n if (typeof spec.createElement === 'function') {\r\n ko.utils.arrayForEach(this.existingElements, function (existingElement) {\r\n self.data.push(spec.createElement());\r\n });\r\n }\r\n\r\n // Prime content\r\n var primeData = ko.unwrap(this.data);\r\n if (primeData.map) {\r\n this.onArrayChange(primeData.map(valueToChangeAddExistingItem));\r\n }\r\n\r\n // Watch for changes\r\n if (ko.isObservable(this.data)) {\r\n if (!this.data.indexOf) {\r\n // Make sure the observable is trackable.\r\n this.data = this.data.extend({ trackArrayChanges: true });\r\n }\r\n this.changeSubs = this.data.subscribe(this.onArrayChange, this, 'arrayChange');\r\n }\r\n }\r\n\r\n\r\n InitializedForeach.animateFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||\r\n window.mozRequestAnimationFrame || window.msRequestAnimationFrame ||\r\n function (cb) { return window.setTimeout(cb, 1000 / 60); };\r\n\r\n\r\n InitializedForeach.prototype.dispose = function () {\r\n if (this.changeSubs) {\r\n this.changeSubs.dispose();\r\n }\r\n };\r\n\r\n\r\n // If the array changes we register the change.\r\n InitializedForeach.prototype.onArrayChange = function (changeSet) {\r\n var self = this;\r\n var changeMap = {\r\n added: [],\r\n existing: [],\r\n deleted: [],\r\n };\r\n\r\n ko.utils.arrayForEach(changeSet, function (changeItem) {\r\n changeMap[changeItem.status].push(changeItem);\r\n });\r\n\r\n if (changeMap.deleted.length > 0) {\r\n this.changeQueue.push.apply(this.changeQueue, changeMap.deleted);\r\n this.changeQueue.push({ status: 'clearDeletedIndexes' })\r\n }\r\n\r\n this.changeQueue.push.apply(this.changeQueue, changeMap.existing);\r\n this.changeQueue.push.apply(this.changeQueue, changeMap.added);\r\n\r\n // Once a change is registered, the ticking count-down starts for the processQueue.\r\n if (this.changeQueue.length > 0 && !this.rendering_queued) {\r\n this.rendering_queued = true;\r\n InitializedForeach.animateFrame.call(window, function () { self.processQueue(); });\r\n }\r\n };\r\n\r\n\r\n // Reflect all the changes in the queue in the DOM, then wipe the queue.\r\n InitializedForeach.prototype.processQueue = function () {\r\n var self = this;\r\n\r\n // Callback so folks can do things before the queue flush.\r\n if (typeof this.beforeQueueFlush === 'function') {\r\n this.beforeQueueFlush(this.changeQueue);\r\n }\r\n\r\n ko.utils.arrayForEach(this.changeQueue, function (changeItem) {\r\n self[changeItem.status](changeItem.index, changeItem.value);\r\n });\r\n this.rendering_queued = false;\r\n\r\n // Callback so folks can do things.\r\n if (typeof this.afterQueueFlush === 'function') {\r\n this.afterQueueFlush(this.changeQueue);\r\n }\r\n this.changeQueue = [];\r\n };\r\n\r\n\r\n // Process a changeItem with {status: 'existing', ...}\r\n InitializedForeach.prototype.existing = function (index, value) {\r\n var childContext;\r\n\r\n if (this.noContext) {\r\n childContext = this.$context.extend({\r\n '$item': value\r\n });\r\n } else {\r\n childContext = this.$context.createChildContext(value, this.as || null);\r\n }\r\n\r\n var existingElement = this.existingElements[index];\r\n\r\n this.lastNodesList.splice(index, 0, existingElement);\r\n ko.applyBindings(childContext, existingElement);\r\n };\r\n\r\n\r\n // Process a changeItem with {status: 'added', ...}\r\n InitializedForeach.prototype.added = function (index, value) {\r\n var referenceElement = this.lastNodesList[index - 1] || null;\r\n var templateClone = this.templateNode.cloneNode(true);\r\n var childNodes = ko.virtualElements.childNodes(templateClone);\r\n var childContext;\r\n\r\n if (this.noContext) {\r\n childContext = this.$context.extend({\r\n '$item': value\r\n });\r\n } else {\r\n childContext = this.$context.createChildContext(value, this.as || null);\r\n }\r\n\r\n this.lastNodesList.splice(index, 0, childNodes[childNodes.length - 1]);\r\n ko.applyBindingsToDescendants(childContext, templateClone);\r\n\r\n // Nodes are inserted in reverse order - pushed down immediately after\r\n // the last node for the previous item or as the first node of element.\r\n for (var i = childNodes.length - 1; i >= 0; --i) {\r\n var child = childNodes[i];\r\n if (!child) return;\r\n ko.virtualElements.insertAfter(this.element, child, referenceElement);\r\n }\r\n };\r\n\r\n\r\n // Process a changeItem with {status: 'deleted', ...}\r\n InitializedForeach.prototype.deleted = function (index, value) {\r\n var ptr = this.lastNodesList[index],\r\n // We use this.element because that will be the last previous node\r\n // for virtual element lists.\r\n lastNode = this.lastNodesList[index - 1] || this.element;\r\n\r\n do {\r\n ptr = ptr.previousSibling;\r\n ko.removeNode((ptr && ptr.nextSibling) || ko.virtualElements.firstChild(this.element));\r\n } while (ptr && ptr !== lastNode);\r\n\r\n // The \"last node\" in the DOM from which we begin our delets of the next adjacent node is\r\n // now the sibling that preceded the first node of this item. \r\n this.lastNodesList[index] = this.lastNodesList[index - 1];\r\n this.indexesToDelete.push(index);\r\n };\r\n\r\n\r\n // We batch our deletion of item indexes in our parallel array.\r\n // See brianmhunt/knockout-fast-foreach#6/#8\r\n InitializedForeach.prototype.clearDeletedIndexes = function () {\r\n // We iterate in reverse on the presumption (following the unit tests) that KO's diff engine\r\n // processes diffs (esp. deletes) monotonically ascending i.e. from index 0 -> N.\r\n for (var i = this.indexesToDelete.length - 1; i >= 0; --i) {\r\n this.lastNodesList.splice(this.indexesToDelete[i], 1);\r\n }\r\n\r\n this.indexesToDelete = [];\r\n };\r\n\r\n // This binding handler is similar to the regular foreach binding handler, but with\r\n // one major difference: it binds the underlying array to existing HTML elements instead\r\n // of creating new elements. Existing elements must be marked with the \"data-init\" attribute.\r\n // What happens is that when the foreachInit binding handler is initialized, it will look for\r\n // all child elements with the \"data-init\" attribute and bind them to the values in the \r\n // underlying (observable) array. To be able to support adding new items, there must be a template.\r\n // This template is found by looking for a mode marked with the \"data-template\" attribute.\r\n ko.bindingHandlers.foreachInit = {\r\n // Valid valueAccessors:\r\n // []\r\n // ko.observable([])\r\n // ko.observableArray([])\r\n // ko.computed\r\n // {data: array, name: string, as: string}\r\n init: function init(element, valueAccessor, bindings, viewModel, context) {\r\n var value = valueAccessor(),\r\n initializedForeach;\r\n\r\n if (isPlainObject(value)) {\r\n value.element = value.element || element;\r\n value.$context = context;\r\n initializedForeach = new InitializedForeach(value);\r\n } else {\r\n initializedForeach = new InitializedForeach({\r\n element: element,\r\n data: ko.unwrap(context.$rawData) === value ? context.$rawData : value,\r\n $context: context,\r\n createElement: value.createElement\r\n });\r\n }\r\n\r\n ko.utils.domNodeDisposal.addDisposeCallback(element, function () {\r\n initializedForeach.dispose();\r\n });\r\n\r\n return { controlsDescendantBindings: true };\r\n },\r\n\r\n // Export for testing, debugging, and overloading.\r\n InitializedForeach: InitializedForeach,\r\n };\r\n\r\n ko.virtualElements.allowedBindings.foreachInit = true;\r\n\r\n // This binding handler initializes an observable to a value from the HTML element\r\n ko.bindingHandlers.init = {\r\n init: function (element, valueAccessor, allBindings, viewModel) {\r\n var value = valueAccessor(),\r\n unwrappedValue = ko.utils.peekObservable(value);\r\n\r\n // Check to see if the value passed is actually an object with explicit values\r\n var isObjectWithExplicitValues = isPlainObject(value) &&\r\n value['value'] === undefined &&\r\n value['convert'] === undefined &&\r\n value['field'] === undefined;\r\n\r\n if (isObjectWithExplicitValues) {\r\n\r\n // Loop through all the properties and set the observable values\r\n for (var key in value) {\r\n if (value.hasOwnProperty(key)) {\r\n viewModel[key](value[key]);\r\n }\r\n }\r\n\r\n } else {\r\n // Determine the element from which to retrieve the value\r\n var valueElement = isVirtualNode(element) ? ko.virtualElements.firstChild(element) : element;\r\n\r\n // Get the actual value from the element. If the binding handler does not\r\n // have an explicit value, try to retrieve it from the value of inner text content\r\n var fieldValue = (isPlainObject(value) && value['value'] !== undefined) ? value['value'] :\r\n (allBindings.get('checked') ? valueElement.checked : valueElement.value);\r\n\r\n // If a convert function was passed, apply it to the field value.\r\n // This can be used to convert the input string to the correct field value\r\n if (isPlainObject(value) && typeof value['convert'] === 'function') {\r\n fieldValue = value['convert'](fieldValue);\r\n }\r\n\r\n // Find the field accessor. If the init binding does not point to an observable\r\n // or the field parameter doesn't, we try the text and value binding\r\n var fieldAccessor = (ko.isObservable(value) ? value : undefined) ||\r\n (isPlainObject(value) ? value['field'] : undefined) ||\r\n allBindings.get('autoNumeric') || allBindings.get('autoMoney') ||\r\n allBindings.get('rustigDate') ||\r\n allBindings.get('text') ||\r\n allBindings.get('textInput') ||\r\n allBindings.get('value') ||\r\n allBindings.get('checked');\r\n\r\n // Finally, update the observable with the value\r\n fieldAccessor(fieldValue, unwrappedValue);\r\n }\r\n }\r\n };\r\n\r\n ko.virtualElements.allowedBindings.init = true;\r\n}));","(function (errorHandling, $, undefined) {\r\n var self = errorHandling;\r\n\r\n self.Handle = function (data) {\r\n if ($(\"#confirmation-dialog\").length > 0) {\r\n Rustig.Modal.close();\r\n }\r\n Rustig.Modal.open({ content: data.html });\r\n }\r\n\r\n}(window.errorHandling = window.errorHandling || {}, jQuery));\r\n","//https://github.com/hustcc/timeago.js\r\n!function (t, e) { \"object\" == typeof module && module.exports ? (module.exports = e(t), module.exports.default = module.exports) : t.timeago = e(t) }(\"undefined\" != typeof window ? window : this, function () { function t(t) { return t instanceof Date ? t : isNaN(t) ? /^\\d+$/.test(t) ? new Date(e(t)) : (t = (t || \"\").trim().replace(/\\.\\d+/, \"\").replace(/-/, \"/\").replace(/-/, \"/\").replace(/(\\d)T(\\d)/, \"$1 $2\").replace(/Z/, \" UTC\").replace(/([\\+\\-]\\d\\d)\\:?(\\d\\d)/, \" $1$2\"), new Date(t)) : new Date(e(t)) } function e(t) { return parseInt(t) } function n(t, n, r) { n = p[n] ? n : p[r] ? r : \"en\"; var o = 0, i = t < 0 ? 1 : 0; for (t = Math.abs(t) ; t >= h[o] && o < m; o++) t /= h[o]; return t = e(t), o *= 2, t > (0 === o ? 9 : 1) && (o += 1), p[n](t, o)[i].replace(\"%s\", t) } function r(e, n) { return n = n ? t(n) : new Date, (n - t(e)) / 1e3 } function o(t) { for (var e = 1, n = 0, r = Math.abs(t) ; t >= h[n] && n < m; n++) t /= h[n], e *= h[n]; return r %= e, r = r ? e - r : e, Math.ceil(r) } function i(t) { return t.dataset.timeago ? t.dataset.timeago : a(t, w) } function a(t, e) { return t.getAttribute ? t.getAttribute(e) : t.attr ? t.attr(e) : void 0 } function u(t, e) { return t.setAttribute ? t.setAttribute(_, e) : t.attr ? t.attr(_, e) : void 0 } function c(t) { return a(t, _) } function d(t, e) { this.nowDate = t, this.defaultLocale = e || \"en\" } function f(t, e) { return new d(t, e) } var s = \"second_minute_hour_day_week_month_year\".split(\"_\"), l = \"秒_分钟_小时_天_周_月_年\".split(\"_\"), p = { en: function (t, e) { if (0 === e) return [\"just now\", \"right now\"]; var n = s[parseInt(e / 2)]; return t > 1 && (n += \"s\"), [t + \" \" + n + \" ago\", \"in \" + t + \" \" + n] }, zh_CN: function (t, e) { if (0 === e) return [\"刚刚\", \"片刻后\"]; var n = l[parseInt(e / 2)]; return [t + n + \"前\", t + n + \"后\"] } }, h = [60, 60, 24, 7, 365 / 7 / 12, 12], m = 6, w = \"datetime\", _ = \"data-tid\", v = {}; return d.prototype.doRender = function (t, e, i) { var a, c = r(e, this.nowDate), d = this; t.innerHTML = n(c, i, this.defaultLocale), v[a = setTimeout(function () { d.doRender(t, e, i) }, Math.min(1e3 * o(c), 2147483647))] = 0, u(t, a) }, d.prototype.format = function (t, e) { return n(r(t, this.nowDate), e, this.defaultLocale) }, d.prototype.render = function (t, e) { void 0 === t.length && (t = [t]); for (var n = 0, r = t.length; n < r; n++) this.doRender(t[n], i(t[n]), e) }, d.prototype.setLocale = function (t) { this.defaultLocale = t }, f.register = function (t, e) { p[t] = e }, f.cancel = function (t) { var e; if (t && (e = c(t))) clearTimeout(e), delete v[e]; else { for (e in v) clearTimeout(e); v = {} } }, f })","var en_short = function (number, index) {\r\n return [\r\n ['just now', 'right now'],\r\n ['%ss ago', 'in %ss'],\r\n ['1m ago', 'in 1m'],\r\n ['%sm ago', 'in %sm'],\r\n ['1h ago', 'in 1h'],\r\n ['%sh ago', 'in %sh'],\r\n ['1d ago', 'in 1d'],\r\n ['%sd ago', 'in %sd'],\r\n ['1w ago', 'in 1w'],\r\n ['%sw ago', 'in %sw'],\r\n ['1mo ago', 'in 1mo'],\r\n ['%smo ago', 'in %smo'],\r\n ['1yr ago', 'in 1yr'],\r\n ['%syr ago', 'in %syr']\r\n ][index];\r\n}\r\n\r\ntimeago.register(\"en_short\", en_short);\r\n\r\n$(function () {\r\n var t = new timeago();\r\n t.render($(\"time.timeago-short\"), \"en_short\");\r\n t.render($(\"time.timeago\"));\r\n})","/*! jQuery UI - v1.12.1 - 2018-09-10\r\n* http://jqueryui.com\r\n* Includes: widget.js, data.js, scroll-parent.js, widgets/draggable.js, widgets/mouse.js\r\n* Copyright jQuery Foundation and other contributors; Licensed MIT */\r\n\r\n(function(t){\"function\"==typeof define&&define.amd?define([\"jquery\"],t):t(jQuery)})(function(t){t.ui=t.ui||{},t.ui.version=\"1.12.1\";var e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,\"events\"),s&&s.remove&&t(n).triggerHandler(\"remove\")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(\".\")[0];e=e.split(\".\")[1];var h=l+\"-\"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[\":\"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+\".\"+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a=\"string\"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||\"instance\"!==o?this.each(function(){var i,s=t.data(this,n);return\"instance\"===o?(l=s,!1):s?t.isFunction(s[o])&&\"_\"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error(\"no such method '\"+o+\"' for \"+e+\" widget instance\"):t.error(\"cannot call methods on \"+e+\" prior to initialization; \"+\"attempted to call method '\"+o+\"'\")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:\"widget\",widgetEventPrefix:\"\",defaultElement:\"
\",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr(\"aria-disabled\"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if(\"string\"==typeof e)if(a={},s=e.split(\".\"),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return\"classes\"===t&&this._setOptionClasses(e),this.options[t]=e,\"disabled\"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+\"-disabled\",null,!!t),t&&(this._removeClass(this.hoverable,null,\"ui-state-hover\"),this._removeClass(this.focusable,null,\"ui-state-focus\"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:\"_untrackClassesElement\"}),e.keys&&i(e.keys.match(/\\S+/g)||[],!0),e.extra&&i(e.extra.match(/\\S+/g)||[]),s.join(\" \")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s=\"boolean\"==typeof s?s:i;var n=\"string\"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;\"boolean\"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass(\"ui-state-disabled\")?(\"string\"==typeof a?o[a]:a).apply(o,arguments):void 0}\"string\"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\\w:-]*)\\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||\"\").split(\" \").join(this.eventNamespace+\" \")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return(\"string\"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,\"ui-state-hover\")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,\"ui-state-hover\")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,\"ui-state-focus\")},focusout:function(e){this._removeClass(t(e.currentTarget),null,\"ui-state-focus\")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:\"fadeIn\",hide:\"fadeOut\"},function(e,i){t.Widget.prototype[\"_\"+e]=function(s,n,o){\"string\"==typeof n&&(n={effect:n});var a,r=n?n===!0||\"number\"==typeof n?i:n.effect||i:e;n=n||{},\"number\"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,t.extend(t.expr[\":\"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.scrollParent=function(e){var i=this.css(\"position\"),s=\"absolute\"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&\"static\"===e.css(\"position\")?!1:n.test(e.css(\"overflow\")+e.css(\"overflow-y\")+e.css(\"overflow-x\"))}).eq(0);return\"fixed\"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.ui.ie=!!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase());var s=!1;t(document).on(\"mouseup\",function(){s=!1}),t.widget(\"ui.mouse\",{version:\"1.12.1\",options:{cancel:\"input, textarea, button, select, option\",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on(\"mousedown.\"+this.widgetName,function(t){return e._mouseDown(t)}).on(\"click.\"+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+\".preventClickEvent\")?(t.removeData(i.target,e.widgetName+\".preventClickEvent\"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off(\".\"+this.widgetName),this._mouseMoveDelegate&&this.document.off(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).off(\"mouseup.\"+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,o=\"string\"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+\".preventClickEvent\")&&t.removeData(e.target,this.widgetName+\".preventClickEvent\"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).on(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),e.preventDefault(),s=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).off(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&\"body\"!==e.nodeName.toLowerCase()&&t(e).trigger(\"blur\")},t.widget(\"ui.draggable\",t.ui.mouse,{version:\"1.12.1\",widgetEventPrefix:\"drag\",options:{addClasses:!0,appendTo:\"parent\",axis:!1,connectToSortable:!1,containment:!1,cursor:\"auto\",cursorAt:!1,grid:!1,handle:!1,helper:\"original\",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:\"default\",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:\"both\",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){\"original\"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass(\"ui-draggable\"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),\"handle\"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(\".ui-draggable-dragging\")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(\".ui-resizable-handle\").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?\"iframe\":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t(\"
\").css(\"position\",\"absolute\").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,\"ui-draggable-dragging\"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css(\"position\"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return\"fixed\"===t(this).css(\"position\")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger(\"start\",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo(\"absolute\"),!i){var s=this._uiHash();if(this._trigger(\"drag\",e,s)===!1)return this._mouseUp(new t.Event(\"mouseup\",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+\"px\",this.helper[0].style.top=this.position.top+\"px\",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),\"invalid\"===this.options.revert&&!s||\"valid\"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger(\"stop\",e)!==!1&&i._clear()}):this._trigger(\"stop\",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger(\"focus\"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(\".ui-draggable-dragging\")?this._mouseUp(new t.Event(\"mouseup\",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,\"ui-draggable-handle\")},_removeHandleClassName:function(){this._removeClass(this.handleElement,\"ui-draggable-handle\")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):\"clone\"===i.helper?this.element.clone().removeAttr(\"id\"):this.element;return n.parents(\"body\").length||n.appendTo(\"parent\"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css(\"position\"))||n.css(\"position\",\"absolute\"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css(\"position\"))||(this.element[0].style.position=\"relative\")},_adjustOffsetFromHelper:function(e){\"string\"==typeof e&&(e=e.split(\" \")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),\"left\"in e&&(this.offset.click.left=e.left+this.margins.left),\"right\"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),\"top\"in e&&(this.offset.click.top=e.top+this.margins.top),\"bottom\"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return\"absolute\"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css(\"borderTopWidth\"),10)||0),left:e.left+(parseInt(this.offsetParent.css(\"borderLeftWidth\"),10)||0)}},_getRelativeOffset:function(){if(\"relative\"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css(\"top\"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css(\"left\"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css(\"marginLeft\"),10)||0,top:parseInt(this.element.css(\"marginTop\"),10)||0,right:parseInt(this.element.css(\"marginRight\"),10)||0,bottom:parseInt(this.element.css(\"marginBottom\"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?\"window\"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):\"document\"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):(\"parent\"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css(\"overflow\")),this.containment=[(parseInt(i.css(\"borderLeftWidth\"),10)||0)+(parseInt(i.css(\"paddingLeft\"),10)||0),(parseInt(i.css(\"borderTopWidth\"),10)||0)+(parseInt(i.css(\"paddingTop\"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css(\"borderRightWidth\"),10)||0)-(parseInt(i.css(\"paddingRight\"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css(\"borderBottomWidth\"),10)||0)-(parseInt(i.css(\"paddingBottom\"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i=\"absolute\"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-(\"fixed\"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-(\"fixed\"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),\"y\"===a.axis&&(l=this.originalPageX),\"x\"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,\"ui-draggable-dragging\"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo(\"absolute\"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add(\"draggable\",\"connectToSortable\",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable(\"instance\");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger(\"activate\",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css(\"position\"),top:t.placeholder.css(\"top\"),left:t.placeholder.css(\"left\")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger(\"deactivate\",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data(\"ui-sortable-item\",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger(\"toSortable\",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger(\"out\",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger(\"fromSortable\",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add(\"draggable\",\"cursor\",{start:function(e,i,s){var n=t(\"body\"),o=s.options;n.css(\"cursor\")&&(o._cursor=n.css(\"cursor\")),n.css(\"cursor\",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t(\"body\").css(\"cursor\",n._cursor)}}),t.ui.plugin.add(\"draggable\",\"opacity\",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css(\"opacity\")&&(o._opacity=n.css(\"opacity\")),n.css(\"opacity\",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css(\"opacity\",n._opacity)}}),t.ui.plugin.add(\"draggable\",\"scroll\",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&\"HTML\"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&\"HTML\"!==a.tagName?(n.axis&&\"x\"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY=0;d--)l=s.snapElements[d].left-s.margins.left,h=l+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,l-g>_||m>h+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):(\"inner\"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(l-_),r=g>=Math.abs(h-m),n&&(i.position.top=s._convertPositionTo(\"relative\",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo(\"relative\",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo(\"relative\",{top:0,left:l-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo(\"relative\",{top:0,left:h}).left)),p=n||o||a||r,\"outer\"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(l-m),r=g>=Math.abs(h-_),n&&(i.position.top=s._convertPositionTo(\"relative\",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo(\"relative\",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo(\"relative\",{top:0,left:l}).left),r&&(i.position.left=s._convertPositionTo(\"relative\",{top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add(\"draggable\",\"stack\",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css(\"zIndex\"),10)||0)-(parseInt(t(i).css(\"zIndex\"),10)||0)});a.length&&(n=parseInt(t(a[0]).css(\"zIndex\"),10)||0,t(a).each(function(e){t(this).css(\"zIndex\",n+e)}),this.css(\"zIndex\",n+a.length))}}),t.ui.plugin.add(\"draggable\",\"zIndex\",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css(\"zIndex\")&&(o._zIndex=n.css(\"zIndex\")),n.css(\"zIndex\",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css(\"zIndex\",n._zIndex)}}),t.ui.draggable});"]}