text: /*! jQuery UI - v1.9.2 - 2013-08-29
   * http://jqueryui.com
   * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.resizable.js, jquery.ui.autocomplete.js, jquery.ui.menu.js
   * Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
  
  (function (e, t) {
     function i(t, n) {
        var r, i, o, u = t.nodeName.toLowerCase();
        return"area" === u ? (r = t.parentNode, i = r.name, !t.href || !i || r.nodeName.toLowerCase() !== "map" ? !1 : (o = e("img[usemap=#" + i + "]")[0], !!o && s(o))) : (/input|select|textarea|button|object/.test(u) ? !t.disabled : "a" === u ? t.href || n : n) && s(t)
     }
  
     function s(t) {
        return e.expr.filters.visible(t) && !e(t).parents().andSelf().filter(function () {
           return e.css(this, "visibility") === "hidden"
        }).length
     }
  
     var n = 0, r = /^ui-id-\d+$/;
     e.ui = e.ui || {};
     if (e.ui.version)return;
     e.extend(e.ui, {version: "1.9.2", keyCode: {BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38}}), e.fn.extend({_focus: e.fn.focus, focus: function (t, n) {
        return typeof t == "number" ? this.each(function () {
           var r = this;
           setTimeout(function () {
              e(r).focus(), n && n.call(r)
           }, t)
        }) : this._focus.apply(this, arguments)
     }, scrollParent: function () {
        var t;
        return e.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? t = this.parents().filter(function () {
           return/(relative|absolute|fixed)/.test(e.css(this, "position")) && /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x"))
        }).eq(0) : t = this.parents().filter(function () {
           return/(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x"))
        }).eq(0), /fixed/.test(this.css("position")) || !t.length ? e(document) : t
     }, zIndex: function (n) {
        if (n !== t)return this.css("zIndex", n);
        if (this.length) {
           var r = e(this[0]), i, s;
           while (r.length && r[0] !== document) {
              i = r.css("position");
              if (i === "absolute" || i === "relative" || i === "fixed") {
                 s = parseInt(r.css("zIndex"), 10);
                 if (!isNaN(s) && s !== 0)return s
              }
              r = r.parent()
           }
        }
        return 0
     }, uniqueId: function () {
        return this.each(function () {
           this.id || (this.id = "ui-id-" + ++n)
        })
     }, removeUniqueId: function () {
        return this.each(function () {
           r.test(this.id) && e(this).removeAttr("id")
        })
     }}), e.extend(e.expr[":"], {data: e.expr.createPseudo ? e.expr.createPseudo(function (t) {
        return function (n) {
           return!!e.data(n, t)
        }
     }) : function (t, n, r) {
        return!!e.data(t, r[3])
     }, focusable: function (t) {
        return i(t, !isNaN(e.attr(t, "tabindex")))
     }, tabbable: function (t) {
        var n = e.attr(t, "tabindex"), r = isNaN(n);
        return(r || n >= 0) && i(t, !r)
     }}), e(function () {
        var t = document.body, n = t.appendChild(n = document.createElement("div"));
        n.offsetHeight, e.extend(n.style, {minHeight: "100px", height: "auto", padding: 0, borderWidth: 0}), e.support.minHeight = n.offsetHeight === 100, e.support.selectstart = "onselectstart"in n, t.removeChild(n).style.display = "none"
     }), e("<a>").outerWidth(1).jquery || e.each(["Width", "Height"], function (n, r) {
        function u(t, n, r, s) {
           return e.each(i, function () {
              n -= parseFloat(e.css(t, "padding" + this)) || 0, r && (n -= parseFloat(e.css(t, "border" + this + "Width")) || 0), s && (n -= parseFloat(e.css(t, "margin" + this)) || 0)
           }), n
        }
  
        var i = r === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], s = r.toLowerCase(), o = {innerWidth: e.fn.innerWidth, innerHeight: e.fn.innerHeight, outerWidth: e.fn.outerWidth, outerHeight: e.fn.outerHeight};
        e.fn["inner" + r] = function (n) {
           return n === t ? o["inner" + r].call(this) : this.each(function () {
              e(this).css(s, u(this, n) + "px")
           })
        }, e.fn["outer" + r] = function (t, n) {
           return typeof t != "number" ? o["outer" + r].call(this, t) : this.each(function () {
              e(this).css(s, u(this, t, !0, n) + "px")
           })
        }
     }), e("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (e.fn.removeData = function (t) {
        return function (n) {
           return arguments.length ? t.call(this, e.camelCase(n)) : t.call(this)
        }
     }(e.fn.removeData)), function () {
        var t = /msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) || [];
        e.ui.ie = t.length ? !0 : !1, e.ui.ie6 = parseFloat(t[1], 10) === 6
     }(), e.fn.extend({disableSelection: function () {
        return this.bind((e.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (e) {
           e.preventDefault()
        })
     }, enableSelection: function () {
        return this.unbind(".ui-disableSelection")
     }}), e.extend(e.ui, {plugin: {add: function (t, n, r) {
        var i, s = e.ui[t].prototype;
        for (i in r)s.plugins[i] = s.plugins[i] || [], s.plugins[i].push([n, r[i]])
     }, call: function (e, t, n) {
        var r, i = e.plugins[t];
        if (!i || !e.element[0].parentNode || e.element[0].parentNode.nodeType === 11)return;
        for (r = 0; r < i.length; r++)e.options[i[r][0]] && i[r][1].apply(e.element, n)
     }}, contains: e.contains, hasScroll: function (t, n) {
        if (e(t).css("overflow") === "hidden")return!1;
        var r = n && n === "left" ? "scrollLeft" : "scrollTop", i = !1;
        return t[r] > 0 ? !0 : (t[r] = 1, i = t[r] > 0, t[r] = 0, i)
     }, isOverAxis: function (e, t, n) {
        return e > t && e < t + n
     }, isOver: function (t, n, r, i, s, o) {
        return e.ui.isOverAxis(t, r, s) && e.ui.isOverAxis(n, i, o)
     }})
  })(jQuery);
  (function (e, t) {
     var n = 0, r = Array.prototype.slice, i = e.cleanData;
     e.cleanData = function (t) {
        for (var n = 0, r; (r = t[n]) != null; n++)try {
           e(r).triggerHandler("remove")
        } catch (s) {
        }
        i(t)
     }, e.widget = function (t, n, r) {
        var i, s, o, u, a = t.split(".")[0];
        t = t.split(".")[1], i = a + "-" + t, r || (r = n, n = e.Widget), e.expr[":"][i.toLowerCase()] = function (t) {
           return!!e.data(t, i)
        }, e[a] = e[a] || {}, s = e[a][t], o = e[a][t] = function (e, t) {
           if (!this._createWidget)return new o(e, t);
           arguments.length && this._createWidget(e, t)
        }, e.extend(o, s, {version: r.version, _proto: e.extend({}, r), _childConstructors: []}), u = new n, u.options = e.widget.extend({}, u.options), e.each(r, function (t, i) {
           e.isFunction(i) && (r[t] = function () {
              var e = function () {
                 return n.prototype[t].apply(this, arguments)
              }, r = function (e) {
                 return n.prototype[t].apply(this, e)
              };
              return function () {
                 var t = this._super, n = this._superApply, s;
                 return this._super = e, this._superApply = r, s = i.apply(this, arguments), this._super = t, this._superApply = n, s
              }
           }())
        }), o.prototype = e.widget.extend(u, {widgetEventPrefix: s ? u.widgetEventPrefix : t}, r, {constructor: o, namespace: a, widgetName: t, widgetBaseClass: i, widgetFullName: i}), s ? (e.each(s._childConstructors, function (t, n) {
           var r = n.prototype;
           e.widget(r.namespace + "." + r.widgetName, o, n._proto)
        }), delete s._childConstructors) : n._childConstructors.push(o), e.widget.bridge(t, o)
     }, e.widget.extend = function (n) {
        var i = r.call(arguments, 1), s = 0, o = i.length, u, a;
        for (; s < o; s++)for (u in i[s])a = i[s][u], i[s].hasOwnProperty(u) && a !== t && (e.isPlainObject(a) ? n[u] = e.isPlainObject(n[u]) ? e.widget.extend({}, n[u], a) : e.widget.extend({}, a) : n[u] = a);
        return n
     }, e.widget.bridge = function (n, i) {
        var s = i.prototype.widgetFullName || n;
        e.fn[n] = function (o) {
           var u = typeof o == "string", a = r.call(arguments, 1), f = this;
           return o = !u && a.length ? e.widget.extend.apply(null, [o].concat(a)) : o, u ? this.each(function () {
              var r, i = e.data(this, s);
              if (!i)return e.error("cannot call methods on " + n + " prior to initialization; " + "attempted to call method '" + o + "'");
              if (!e.isFunction(i[o]) || o.charAt(0) === "_")return e.error("no such method '" + o + "' for " + n + " widget instance");
              r = i[o].apply(i, a);
              if (r !== i && r !== t)return f = r && r.jquery ? f.pushStack(r.get()) : r, !1
           }) : this.each(function () {
              var t = e.data(this, s);
              t ? t.option(o || {})._init() : e.data(this, s, new i(o, this))
           }), f
        }
     }, e.Widget = function () {
     }, e.Widget._childConstructors = [], e.Widget.prototype = {widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: {disabled: !1, create: null}, _createWidget: function (t, r) {
        r = e(r || this.defaultElement || this)[0], this.element = e(r), this.uuid = n++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t), this.bindings = e(), this.hoverable = e(), this.focusable = e(), r !== this && (e.data(r, this.widgetName, this), e.data(r, this.widgetFullName, this), this._on(!0, this.element, {remove: function (e) {
           e.target === r && this.destroy()
        }}), this.document = e(r.style ? r.ownerDocument : r.document || r), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
     }, _getCreateOptions: e.noop, _getCreateEventData: e.noop, _create: e.noop, _init: e.noop, destroy: function () {
        this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
     }, _destroy: e.noop, widget: function () {
        return this.element
     }, option: function (n, r) {
        var i = n, s, o, u;
        if (arguments.length === 0)return e.widget.extend({}, this.options);
        if (typeof n == "string") {
           i = {}, s = n.split("."), n = s.shift();
           if (s.length) {
              o = i[n] = e.widget.extend({}, this.options[n]);
              for (u = 0; u < s.length - 1; u++)o[s[u]] = o[s[u]] || {}, o = o[s[u]];
              n = s.pop();
              if (r === t)return o[n] === t ? null : o[n];
              o[n] = r
           } else {
              if (r === t)return this.options[n] === t ? null : this.options[n];
              i[n] = r
           }
        }
        return this._setOptions(i), this
     }, _setOptions: function (e) {
        var t;
        for (t in e)this._setOption(t, e[t]);
        return this
     }, _setOption: function (e, t) {
        return this.options[e] = t, e === "disabled" && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!t).attr("aria-disabled", t), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this
     }, enable: function () {
        return this._setOption("disabled", !1)
     }, disable: function () {
        return this._setOption("disabled", !0)
     }, _on: function (t, n, r) {
        var i, s = this;
        typeof t != "boolean" && (r = n, n = t, t = !1), r ? (n = i = e(n), this.bindings = this.bindings.add(n)) : (r = n, n = this.element, i = this.widget()), e.each(r, function (r, o) {
           function u() {
              if (!t && (s.options.disabled === !0 || e(this).hasClass("ui-state-disabled")))return;
              return(typeof o == "string" ? s[o] : o).apply(s, arguments)
           }
  
           typeof o != "string" && (u.guid = o.guid = o.guid || u.guid || e.guid++);
           var a = r.match(/^(\w+)\s*(.*)$/), f = a[1] + s.eventNamespace, l = a[2];
           l ? i.delegate(l, f, u) : n.bind(f, u)
        })
     }, _off: function (e, t) {
        t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(t).undelegate(t)
     }, _delay: function (e, t) {
        function n() {
           return(typeof e == "string" ? r[e] : e).apply(r, arguments)
        }
  
        var r = this;
        return setTimeout(n, t || 0)
     }, _hoverable: function (t) {
        this.hoverable = this.hoverable.add(t), this._on(t, {mouseenter: function (t) {
           e(t.currentTarget).addClass("ui-state-hover")
        }, mouseleave: function (t) {
           e(t.currentTarget).removeClass("ui-state-hover")
        }})
     }, _focusable: function (t) {
        this.focusable = this.focusable.add(t), this._on(t, {focusin: function (t) {
           e(t.currentTarget).addClass("ui-state-focus")
        }, focusout: function (t) {
           e(t.currentTarget).removeClass("ui-state-focus")
        }})
     }, _trigger: function (t, n, r) {
        var i, s, o = this.options[t];
        r = r || {}, n = e.Event(n), n.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), n.target = this.element[0], s = n.originalEvent;
        if (s)for (i in s)i in n || (n[i] = s[i]);
        return this.element.trigger(n, r), !(e.isFunction(o) && o.apply(this.element[0], [n].concat(r)) === !1 || n.isDefaultPrevented())
     }}, e.each({show: "fadeIn", hide: "fadeOut"}, function (t, n) {
        e.Widget.prototype["_" + t] = function (r, i, s) {
           typeof i == "string" && (i = {effect: i});
           var o, u = i ? i === !0 || typeof i == "number" ? n : i.effect || n : t;
           i = i || {}, typeof i == "number" && (i = {duration: i}), o = !e.isEmptyObject(i), i.complete = s, i.delay && r.delay(i.delay), o && e.effects && (e.effects.effect[u] || e.uiBackCompat !== !1 && e.effects[u]) ? r[t](i) : u !== t && r[u] ? r[u](i.duration, i.easing, s) : r.queue(function (n) {
              e(this)[t](), s && s.call(r[0]), n()
           })
        }
     }), e.uiBackCompat !== !1 && (e.Widget.prototype._getCreateOptions = function () {
        return e.metadata && e.metadata.get(this.element[0])[this.widgetName]
     })
  })(jQuery);
  (function (e, t) {
     var n = !1;
     e(document).mouseup(function (e) {
        n = !1
     }), e.widget("ui.mouse", {version: "1.9.2", options: {cancel: "input,textarea,button,select,option", distance: 1, delay: 0}, _mouseInit: function () {
        var t = this;
        this.element.bind("mousedown." + this.widgetName,function (e) {
           return t._mouseDown(e)
        }).bind("click." + this.widgetName, function (n) {
           if (!0 === e.data(n.target, t.widgetName + ".preventClickEvent"))return e.removeData(n.target, t.widgetName + ".preventClickEvent"), n.stopImmediatePropagation(), !1
        }), this.started = !1
     }, _mouseDestroy: function () {
        this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
     }, _mouseDown: function (t) {
        if (n)return;
        this._mouseStarted && this._mouseUp(t), this._mouseDownEvent = t;
        var r = this, i = t.which === 1, s = typeof this.options.cancel == "string" && t.target.nodeName ? e(t.target).closest(this.options.cancel).length : !1;
        if (!i || s || !this._mouseCapture(t))return!0;
        this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () {
           r.mouseDelayMet = !0
        }, this.options.delay));
        if (this._mouseDistanceMet(t) && this._mouseDelayMet(t)) {
           this._mouseStarted = this._mouseStart(t) !== !1;
           if (!this._mouseStarted)return t.preventDefault(), !0
        }
        return!0 === e.data(t.target, this.widgetName + ".preventClickEvent") && e.removeData(t.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (e) {
           return r._mouseMove(e)
        }, this._mouseUpDelegate = function (e) {
           return r._mouseUp(e)
        }, e(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), t.preventDefault(), n = !0, !0
     }, _mouseMove: function (t) {
        return!e.ui.ie || document.documentMode >= 9 || !!t.button ? this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted) : this._mouseUp(t)
     }, _mouseUp: function (t) {
        return e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && e.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), !1
     }, _mouseDistanceMet: function (e) {
        return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance
     }, _mouseDelayMet: function (e) {
        return this.mouseDelayMet
     }, _mouseStart: function (e) {
     }, _mouseDrag: function (e) {
     }, _mouseStop: function (e) {
     }, _mouseCapture: function (e) {
        return!0
     }})
  })(jQuery);
  (function (e, t) {
     function h(e, t, n) {
        return[parseInt(e[0], 10) * (l.test(e[0]) ? t / 100 : 1), parseInt(e[1], 10) * (l.test(e[1]) ? n / 100 : 1)]
     }
  
     function p(t, n) {
        return parseInt(e.css(t, n), 10) || 0
     }
  
     e.ui = e.ui || {};
     var n, r = Math.max, i = Math.abs, s = Math.round, o = /left|center|right/, u = /top|center|bottom/, a = /[\+\-]\d+%?/, f = /^\w+/, l = /%$/, c = e.fn.position;
     e.position = {scrollbarWidth: function () {
        if (n !== t)return n;
        var r, i, s = e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), o = s.children()[0];
        return e("body").append(s), r = o.offsetWidth, s.css("overflow", "scroll"), i = o.offsetWidth, r === i && (i = s[0].clientWidth), s.remove(), n = r - i
     }, getScrollInfo: function (t) {
        var n = t.isWindow ? "" : t.element.css("overflow-x"), r = t.isWindow ? "" : t.element.css("overflow-y"), i = n === "scroll" || n === "auto" && t.width < t.element[0].scrollWidth, s = r === "scroll" || r === "auto" && t.height < t.element[0].scrollHeight;
        return{width: i ? e.position.scrollbarWidth() : 0, height: s ? e.position.scrollbarWidth() : 0}
     }, getWithinInfo: function (t) {
        var n = e(t || window), r = e.isWindow(n[0]);
        return{element: n, isWindow: r, offset: n.offset() || {left: 0, top: 0}, scrollLeft: n.scrollLeft(), scrollTop: n.scrollTop(), width: r ? n.width() : n.outerWidth(), height: r ? n.height() : n.outerHeight()}
     }}, e.fn.position = function (t) {
        if (!t || !t.of)return c.apply(this, arguments);
        t = e.extend({}, t);
        var n, l, d, v, m, g = e(t.of), y = e.position.getWithinInfo(t.within), b = e.position.getScrollInfo(y), w = g[0], E = (t.collision || "flip").split(" "), S = {};
        return w.nodeType === 9 ? (l = g.width(), d = g.height(), v = {top: 0, left: 0}) : e.isWindow(w) ? (l = g.width(), d = g.height(), v = {top: g.scrollTop(), left: g.scrollLeft()}) : w.preventDefault ? (t.at = "left top", l = d = 0, v = {top: w.pageY, left: w.pageX}) : (l = g.outerWidth(), d = g.outerHeight(), v = g.offset()), m = e.extend({}, v), e.each(["my", "at"], function () {
           var e = (t[this] || "").split(" "), n, r;
           e.length === 1 && (e = o.test(e[0]) ? e.concat(["center"]) : u.test(e[0]) ? ["center"].concat(e) : ["center", "center"]), e[0] = o.test(e[0]) ? e[0] : "center", e[1] = u.test(e[1]) ? e[1] : "center", n = a.exec(e[0]), r = a.exec(e[1]), S[this] = [n ? n[0] : 0, r ? r[0] : 0], t[this] = [f.exec(e[0])[0], f.exec(e[1])[0]]
        }), E.length === 1 && (E[1] = E[0]), t.at[0] === "right" ? m.left += l : t.at[0] === "center" && (m.left += l / 2), t.at[1] === "bottom" ? m.top += d : t.at[1] === "center" && (m.top += d / 2), n = h(S.at, l, d), m.left += n[0], m.top += n[1], this.each(function () {
           var o, u, a = e(this), f = a.outerWidth(), c = a.outerHeight(), w = p(this, "marginLeft"), x = p(this, "marginTop"), T = f + w + p(this, "marginRight") + b.width, N = c + x + p(this, "marginBottom") + b.height, C = e.extend({}, m), k = h(S.my, a.outerWidth(), a.outerHeight());
           t.my[0] === "right" ? C.left -= f : t.my[0] === "center" && (C.left -= f / 2), t.my[1] === "bottom" ? C.top -= c : t.my[1] === "center" && (C.top -= c / 2), C.left += k[0], C.top += k[1], e.support.offsetFractions || (C.left = s(C.left), C.top = s(C.top)), o = {marginLeft: w, marginTop: x}, e.each(["left", "top"], function (r, i) {
              e.ui.position[E[r]] && e.ui.position[E[r]][i](C, {targetWidth: l, targetHeight: d, elemWidth: f, elemHeight: c, collisionPosition: o, collisionWidth: T, collisionHeight: N, offset: [n[0] + k[0], n[1] + k[1]], my: t.my, at: t.at, within: y, elem: a})
           }), e.fn.bgiframe && a.bgiframe(), t.using && (u = function (e) {
              var n = v.left - C.left, s = n + l - f, o = v.top - C.top, u = o + d - c, h = {target: {element: g, left: v.left, top: v.top, width: l, height: d}, element: {element: a, left: C.left, top: C.top, width: f, height: c}, horizontal: s < 0 ? "left" : n > 0 ? "right" : "center", vertical: u < 0 ? "top" : o > 0 ? "bottom" : "middle"};
              l < f && i(n + s) < l && (h.horizontal = "center"), d < c && i(o + u) < d && (h.vertical = "middle"), r(i(n), i(s)) > r(i(o), i(u)) ? h.important = "horizontal" : h.important = "vertical", t.using.call(this, e, h)
           }), a.offset(e.extend(C, {using: u}))
        })
     }, e.ui.position = {fit: {left: function (e, t) {
        var n = t.within, i = n.isWindow ? n.scrollLeft : n.offset.left, s = n.width, o = e.left - t.collisionPosition.marginLeft, u = i - o, a = o + t.collisionWidth - s - i, f;
        t.collisionWidth > s ? u > 0 && a <= 0 ? (f = e.left + u + t.collisionWidth - s - i, e.left += u - f) : a > 0 && u <= 0 ? e.left = i : u > a ? e.left = i + s - t.collisionWidth : e.left = i : u > 0 ? e.left += u : a > 0 ? e.left -= a : e.left = r(e.left - o, e.left)
     }, top: function (e, t) {
        var n = t.within, i = n.isWindow ? n.scrollTop : n.offset.top, s = t.within.height, o = e.top - t.collisionPosition.marginTop, u = i - o, a = o + t.collisionHeight - s - i, f;
        t.collisionHeight > s ? u > 0 && a <= 0 ? (f = e.top + u + t.collisionHeight - s - i, e.top += u - f) : a > 0 && u <= 0 ? e.top = i : u > a ? e.top = i + s - t.collisionHeight : e.top = i : u > 0 ? e.top += u : a > 0 ? e.top -= a : e.top = r(e.top - o, e.top)
     }}, flip: {left: function (e, t) {
        var n = t.within, r = n.offset.left + n.scrollLeft, s = n.width, o = n.isWindow ? n.scrollLeft : n.offset.left, u = e.left - t.collisionPosition.marginLeft, a = u - o, f = u + t.collisionWidth - s - o, l = t.my[0] === "left" ? -t.elemWidth : t.my[0] === "right" ? t.elemWidth : 0, c = t.at[0] === "left" ? t.targetWidth : t.at[0] === "right" ? -t.targetWidth : 0, h = -2 * t.offset[0], p, d;
        if (a < 0) {
           p = e.left + l + c + h + t.collisionWidth - s - r;
           if (p < 0 || p < i(a))e.left += l + c + h
        } else if (f > 0) {
           d = e.left - t.collisionPosition.marginLeft + l + c + h - o;
           if (d > 0 || i(d) < f)e.left += l + c + h
        }
     }, top: function (e, t) {
        var n = t.within, r = n.offset.top + n.scrollTop, s = n.height, o = n.isWindow ? n.scrollTop : n.offset.top, u = e.top - t.collisionPosition.marginTop, a = u - o, f = u + t.collisionHeight - s - o, l = t.my[1] === "top", c = l ? -t.elemHeight : t.my[1] === "bottom" ? t.elemHeight : 0, h = t.at[1] === "top" ? t.targetHeight : t.at[1] === "bottom" ? -t.targetHeight : 0, p = -2 * t.offset[1], d, v;
        a < 0 ? (v = e.top + c + h + p + t.collisionHeight - s - r, e.top + c + h + p > a && (v < 0 || v < i(a)) && (e.top += c + h + p)) : f > 0 && (d = e.top - t.collisionPosition.marginTop + c + h + p - o, e.top + c + h + p > f && (d > 0 || i(d) < f) && (e.top += c + h + p))
     }}, flipfit: {left: function () {
        e.ui.position.flip.left.apply(this, arguments), e.ui.position.fit.left.apply(this, arguments)
     }, top: function () {
        e.ui.position.flip.top.apply(this, arguments), e.ui.position.fit.top.apply(this, arguments)
     }}}, function () {
        var t, n, r, i, s, o = document.getElementsByTagName("body")[0], u = document.createElement("div");
        t = document.createElement(o ? "div" : "body"), r = {visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none"}, o && e.extend(r, {position: "absolute", left: "-1000px", top: "-1000px"});
        for (s in r)t.style[s] = r[s];
        t.appendChild(u), n = o || document.documentElement, n.insertBefore(t, n.firstChild), u.style.cssText = "position: absolute; left: 10.7432222px;", i = e(u).offset().left, e.support.offsetFractions = i > 10 && i < 11, t.innerHTML = "", n.removeChild(t)
     }(), e.uiBackCompat !== !1 && function (e) {
        var n = e.fn.position;
        e.fn.position = function (r) {
           if (!r || !r.offset)return n.call(this, r);
           var i = r.offset.split(" "), s = r.at.split(" ");
           return i.length === 1 && (i[1] = i[0]), /^\d/.test(i[0]) && (i[0] = "+" + i[0]), /^\d/.test(i[1]) && (i[1] = "+" + i[1]), s.length === 1 && (/left|center|right/.test(s[0]) ? s[1] = "center" : (s[1] = s[0], s[0] = "center")), n.call(this, e.extend(r, {at: s[0] + i[0] + " " + s[1] + i[1], offset: t}))
        }
     }(jQuery)
  })(jQuery);
  (function (e, t) {
     e.widget("ui.resizable", e.ui.mouse, {version: "1.9.2", widgetEventPrefix: "resize", options: {alsoResize: !1, animate: !1, animateDuration: "slow", animateEasing: "swing", aspectRatio: !1, autoHide: !1, containment: !1, ghost: !1, grid: !1, handles: "e,s,se", helper: !1, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 1e3}, _create: function () {
        var t = this, n = this.options;
        this.element.addClass("ui-resizable"), e.extend(this, {_aspectRatio: !!n.aspectRatio, aspectRatio: n.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: n.helper || n.ghost || n.animate ? n.helper || "ui-resizable-helper" : null}), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left")})), this.element = this.element.parent().data("resizable", this.element.data("resizable")), this.elementIsWrapper = !0, this.element.css({marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom")}), this.originalElement.css({marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({position: "static", zoom: 1, display: "block"})), this.originalElement.css({margin: this.originalElement.css("margin")}), this._proportionallyResize()), this.handles = n.handles || (e(".ui-resizable-handle", this.element).length ? {n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw"} : "e,s,se");
        if (this.handles.constructor == String) {
           this.handles == "all" && (this.handles = "n,e,s,w,se,sw,ne,nw");
           var r = this.handles.split(",");
           this.handles = {};
           for (var i = 0; i < r.length; i++) {
              var s = e.trim(r[i]), o = "ui-resizable-" + s, u = e('<div class="ui-resizable-handle ' + o + '"></div>');
              u.css({zIndex: n.zIndex}), "se" == s && u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[s] = ".ui-resizable-" + s, this.element.append(u)
           }
        }
        this._renderAxis = function (t) {
           t = t || this.element;
           for (var n in this.handles) {
              this.handles[n].constructor == String && (this.handles[n] = e(this.handles[n], this.element).show());
              if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
                 var r = e(this.handles[n], this.element), i = 0;
                 i = /sw|ne|nw|se|n|s/.test(n) ? r.outerHeight() : r.outerWidth();
                 var s = ["padding", /ne|nw|n/.test(n) ? "Top" : /se|sw|s/.test(n) ? "Bottom" : /^e$/.test(n) ? "Right" : "Left"].join("");
                 t.css(s, i), this._proportionallyResize()
              }
              if (!e(this.handles[n]).length)continue
           }
        }, this._renderAxis(this.element), this._handles = e(".ui-resizable-handle", this.element).disableSelection(), this._handles.mouseover(function () {
           if (!t.resizing) {
              if (this.className)var e = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
              t.axis = e && e[1] ? e[1] : "se"
           }
        }), n.autoHide && (this._handles.hide(), e(this.element).addClass("ui-resizable-autohide").mouseenter(function () {
           if (n.disabled)return;
           e(this).removeClass("ui-resizable-autohide"), t._handles.show()
        }).mouseleave(function () {
           if (n.disabled)return;
           t.resizing || (e(this).addClass("ui-resizable-autohide"), t._handles.hide())
        })), this._mouseInit()
     }, _destroy: function () {
        this._mouseDestroy();
        var t = function (t) {
           e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
        };
        if (this.elementIsWrapper) {
           t(this.element);
           var n = this.element;
           this.originalElement.css({position: n.css("position"), width: n.outerWidth(), height: n.outerHeight(), top: n.css("top"), left: n.css("left")}).insertAfter(n), n.remove()
        }
        return this.originalElement.css("resize", this.originalResizeStyle), t(this.originalElement), this
     }, _mouseCapture: function (t) {
        var n = !1;
        for (var r in this.handles)e(this.handles[r])[0] == t.target && (n = !0);
        return!this.options.disabled && n
     }, _mouseStart: function (t) {
        var r = this.options, i = this.element.position(), s = this.element;
        this.resizing = !0, this.documentScroll = {top: e(document).scrollTop(), left: e(document).scrollLeft()}, (s.is(".ui-draggable") || /absolute/.test(s.css("position"))) && s.css({position: "absolute", top: i.top, left: i.left}), this._renderProxy();
        var o = n(this.helper.css("left")), u = n(this.helper.css("top"));
        r.containment && (o += e(r.containment).scrollLeft() || 0, u += e(r.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {left: o, top: u}, this.size = this._helper ? {width: s.outerWidth(), height: s.outerHeight()} : {width: s.width(), height: s.height()}, this.originalSize = this._helper ? {width: s.outerWidth(), height: s.outerHeight()} : {width: s.width(), height: s.height()}, this.originalPosition = {left: o, top: u}, this.sizeDiff = {width: s.outerWidth() - s.width(), height: s.outerHeight() - s.height()}, this.originalMousePosition = {left: t.pageX, top: t.pageY}, this.aspectRatio = typeof r.aspectRatio == "number" ? r.aspectRatio : this.originalSize.width / this.originalSize.height || 1;
        var a = e(".ui-resizable-" + this.axis).css("cursor");
        return e("body").css("cursor", a == "auto" ? this.axis + "-resize" : a), s.addClass("ui-resizable-resizing"), this._propagate("start", t), !0
     }, _mouseDrag: function (e) {
        var t = this.helper, n = this.options, r = {}, i = this, s = this.originalMousePosition, o = this.axis, u = e.pageX - s.left || 0, a = e.pageY - s.top || 0, f = this._change[o];
        if (!f)return!1;
        var l = f.apply(this, [e, u, a]);
        this._updateVirtualBoundaries(e.shiftKey);
        if (this._aspectRatio || e.shiftKey)l = this._updateRatio(l, e);
        return l = this._respectSize(l, e), this._propagate("resize", e), t.css({top: this.position.top + "px", left: this.position.left + "px", width: this.size.width + "px", height: this.size.height + "px"}), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), this._updateCache(l), this._trigger("resize", e, this.ui()), !1
     }, _mouseStop: function (t) {
        this.resizing = !1;
        var n = this.options, r = this;
        if (this._helper) {
           var i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(i[0].nodeName), o = s && e.ui.hasScroll(i[0], "left") ? 0 : r.sizeDiff.height, u = s ? 0 : r.sizeDiff.width, a = {width: r.helper.width() - u, height: r.helper.height() - o}, f = parseInt(r.element.css("left"), 10) + (r.position.left - r.originalPosition.left) || null, l = parseInt(r.element.css("top"), 10) + (r.position.top - r.originalPosition.top) || null;
           n.animate || this.element.css(e.extend(a, {top: l, left: f})), r.helper.height(r.size.height), r.helper.width(r.size.width), this._helper && !n.animate && this._proportionallyResize()
        }
        return e("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1
     }, _updateVirtualBoundaries: function (e) {
        var t = this.options, n, i, s, o, u;
        u = {minWidth: r(t.minWidth) ? t.minWidth : 0, maxWidth: r(t.maxWidth) ? t.maxWidth : Infinity, minHeight: r(t.minHeight) ? t.minHeight : 0, maxHeight: r(t.maxHeight) ? t.maxHeight : Infinity};
        if (this._aspectRatio || e)n = u.minHeight * this.aspectRatio, s = u.minWidth / this.aspectRatio, i = u.maxHeight * this.aspectRatio, o = u.maxWidth / this.aspectRatio, n > u.minWidth && (u.minWidth = n), s > u.minHeight && (u.minHeight = s), i < u.maxWidth && (u.maxWidth = i), o < u.maxHeight && (u.maxHeight = o);
        this._vBoundaries = u
     }, _updateCache: function (e) {
        var t = this.options;
        this.offset = this.helper.offset(), r(e.left) && (this.position.left = e.left), r(e.top) && (this.position.top = e.top), r(e.height) && (this.size.height = e.height), r(e.width) && (this.size.width = e.width)
     }, _updateRatio: function (e, t) {
        var n = this.options, i = this.position, s = this.size, o = this.axis;
        return r(e.height) ? e.width = e.height * this.aspectRatio : r(e.width) && (e.height = e.width / this.aspectRatio), o == "sw" && (e.left = i.left + (s.width - e.width), e.top = null), o == "nw" && (e.top = i.top + (s.height - e.height), e.left = i.left + (s.width - e.width)), e
     }, _respectSize: function (e, t) {
        var n = this.helper, i = this._vBoundaries, s = this._aspectRatio || t.shiftKey, o = this.axis, u = r(e.width) && i.maxWidth && i.maxWidth < e.width, a = r(e.height) && i.maxHeight && i.maxHeight < e.height, f = r(e.width) && i.minWidth && i.minWidth > e.width, l = r(e.height) && i.minHeight && i.minHeight > e.height;
        f && (e.width = i.minWidth), l && (e.height = i.minHeight), u && (e.width = i.maxWidth), a && (e.height = i.maxHeight);
        var c = this.originalPosition.left + this.originalSize.width, h = this.position.top + this.size.height, p = /sw|nw|w/.test(o), d = /nw|ne|n/.test(o);
        f && p && (e.left = c - i.minWidth), u && p && (e.left = c - i.maxWidth), l && d && (e.top = h - i.minHeight), a && d && (e.top = h - i.maxHeight);
        var v = !e.width && !e.height;
        return v && !e.left && e.top ? e.top = null : v && !e.top && e.left && (e.left = null), e
     }, _proportionallyResize: function () {
        var t = this.options;
        if (!this._proportionallyResizeElements.length)return;
        var n = this.helper || this.element;
        for (var r = 0; r < this._proportionallyResizeElements.length; r++) {
           var i = this._proportionallyResizeElements[r];
           if (!this.borderDif) {
              var s = [i.css("borderTopWidth"), i.css("borderRightWidth"), i.css("borderBottomWidth"), i.css("borderLeftWidth")], o = [i.css("paddingTop"), i.css("paddingRight"), i.css("paddingBottom"), i.css("paddingLeft")];
              this.borderDif = e.map(s, function (e, t) {
                 var n = parseInt(e, 10) || 0, r = parseInt(o[t], 10) || 0;
                 return n + r
              })
           }
           i.css({height: n.height() - this.borderDif[0] - this.borderDif[2] || 0, width: n.width() - this.borderDif[1] - this.borderDif[3] || 0})
        }
     }, _renderProxy: function () {
        var t = this.element, n = this.options;
        this.elementOffset = t.offset();
        if (this._helper) {
           this.helper = this.helper || e('<div style="overflow:hidden;"></div>');
           var r = e.ui.ie6 ? 1 : 0, i = e.ui.ie6 ? 2 : -1;
           this.helper.addClass(this._helper).css({width: this.element.outerWidth() + i, height: this.element.outerHeight() + i, position: "absolute", left: this.elementOffset.left - r + "px", top: this.elementOffset.top - r + "px", zIndex: ++n.zIndex}), this.helper.appendTo("body").disableSelection()
        } else this.helper = this.element
     }, _change: {e: function (e, t, n) {
        return{width: this.originalSize.width + t}
     }, w: function (e, t, n) {
        var r = this.options, i = this.originalSize, s = this.originalPosition;
        return{left: s.left + t, width: i.width - t}
     }, n: function (e, t, n) {
        var r = this.options, i = this.originalSize, s = this.originalPosition;
        return{top: s.top + n, height: i.height - n}
     }, s: function (e, t, n) {
        return{height: this.originalSize.height + n}
     }, se: function (t, n, r) {
        return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, n, r]))
     }, sw: function (t, n, r) {
        return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, n, r]))
     }, ne: function (t, n, r) {
        return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, n, r]))
     }, nw: function (t, n, r) {
        return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, n, r]))
     }}, _propagate: function (t, n) {
        e.ui.plugin.call(this, t, [n, this.ui()]), t != "resize" && this._trigger(t, n, this.ui())
     }, plugins: {}, ui: function () {
        return{originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition}
     }}), e.ui.plugin.add("resizable", "alsoResize", {start: function (t, n) {
        var r = e(this).data("resizable"), i = r.options, s = function (t) {
           e(t).each(function () {
              var t = e(this);
              t.data("resizable-alsoresize", {width: parseInt(t.width(), 10), height: parseInt(t.height(), 10), left: parseInt(t.css("left"), 10), top: parseInt(t.css("top"), 10)})
           })
        };
        typeof i.alsoResize == "object" && !i.alsoResize.parentNode ? i.alsoResize.length ? (i.alsoResize = i.alsoResize[0], s(i.alsoResize)) : e.each(i.alsoResize, function (e) {
           s(e)
        }) : s(i.alsoResize)
     }, resize: function (t, n) {
        var r = e(this).data("resizable"), i = r.options, s = r.originalSize, o = r.originalPosition, u = {height: r.size.height - s.height || 0, width: r.size.width - s.width || 0, top: r.position.top - o.top || 0, left: r.position.left - o.left || 0}, a = function (t, r) {
           e(t).each(function () {
              var t = e(this), i = e(this).data("resizable-alsoresize"), s = {}, o = r && r.length ? r : t.parents(n.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
              e.each(o, function (e, t) {
                 var n = (i[t] || 0) + (u[t] || 0);
                 n && n >= 0 && (s[t] = n || null)
              }), t.css(s)
           })
        };
        typeof i.alsoResize == "object" && !i.alsoResize.nodeType ? e.each(i.alsoResize, function (e, t) {
           a(e, t)
        }) : a(i.alsoResize)
     }, stop: function (t, n) {
        e(this).removeData("resizable-alsoresize")
     }}), e.ui.plugin.add("resizable", "animate", {stop: function (t, n) {
        var r = e(this).data("resizable"), i = r.options, s = r._proportionallyResizeElements, o = s.length && /textarea/i.test(s[0].nodeName), u = o && e.ui.hasScroll(s[0], "left") ? 0 : r.sizeDiff.height, a = o ? 0 : r.sizeDiff.width, f = {width: r.size.width - a, height: r.size.height - u}, l = parseInt(r.element.css("left"), 10) + (r.position.left - r.originalPosition.left) || null, c = parseInt(r.element.css("top"), 10) + (r.position.top - r.originalPosition.top) || null;
        r.element.animate(e.extend(f, c && l ? {top: c, left: l} : {}), {duration: i.animateDuration, easing: i.animateEasing, step: function () {
           var n = {width: parseInt(r.element.css("width"), 10), height: parseInt(r.element.css("height"), 10), top: parseInt(r.element.css("top"), 10), left: parseInt(r.element.css("left"), 10)};
           s && s.length && e(s[0]).css({width: n.width, height: n.height}), r._updateCache(n), r._propagate("resize", t)
        }})
     }}), e.ui.plugin.add("resizable", "containment", {start: function (t, r) {
        var i = e(this).data("resizable"), s = i.options, o = i.element, u = s.containment, a = u instanceof e ? u.get(0) : /parent/.test(u) ? o.parent().get(0) : u;
        if (!a)return;
        i.containerElement = e(a);
        if (/document/.test(u) || u == document)i.containerOffset = {left: 0, top: 0}, i.containerPosition = {left: 0, top: 0}, i.parentData = {element: e(document), left: 0, top: 0, width: e(document).width(), height: e(document).height() || document.body.parentNode.scrollHeight}; else {
           var f = e(a), l = [];
           e(["Top", "Right", "Left", "Bottom"]).each(function (e, t) {
              l[e] = n(f.css("padding" + t))
           }), i.containerOffset = f.offset(), i.containerPosition = f.position(), i.containerSize = {height: f.innerHeight() - l[3], width: f.innerWidth() - l[1]};
           var c = i.containerOffset, h = i.containerSize.height, p = i.containerSize.width, d = e.ui.hasScroll(a, "left") ? a.scrollWidth : p, v = e.ui.hasScroll(a) ? a.scrollHeight : h;
           i.parentData = {element: a, left: c.left, top: c.top, width: d, height: v}
        }
     }, resize: function (t, n) {
        var r = e(this).data("resizable"), i = r.options, s = r.containerSize, o = r.containerOffset, u = r.size, a = r.position, f = r._aspectRatio || t.shiftKey, l = {top: 0, left: 0}, c = r.containerElement;
        c[0] != document && /static/.test(c.css("position")) && (l = o), a.left < (r._helper ? o.left : 0) && (r.size.width = r.size.width + (r._helper ? r.position.left - o.left : r.position.left - l.left), f && (r.size.height = r.size.width / r.aspectRatio), r.position.left = i.helper ? o.left : 0), a.top < (r._helper ? o.top : 0) && (r.size.height = r.size.height + (r._helper ? r.position.top - o.top : r.position.top), f && (r.size.width = r.size.height * r.aspectRatio), r.position.top = r._helper ? o.top : 0), r.offset.left = r.parentData.left + r.position.left, r.offset.top = r.parentData.top + r.position.top;
        var h = Math.abs((r._helper ? r.offset.left - l.left : r.offset.left - l.left) + r.sizeDiff.width), p = Math.abs((r._helper ? r.offset.top - l.top : r.offset.top - o.top) + r.sizeDiff.height), d = r.containerElement.get(0) == r.element.parent().get(0), v = /relative|absolute/.test(r.containerElement.css("position"));
        d && v && (h -= r.parentData.left), h + r.size.width >= r.parentData.width && (r.size.width = r.parentData.width - h, f && (r.size.height = r.size.width / r.aspectRatio)), p + r.size.height >= r.parentData.height && (r.size.height = r.parentData.height - p, f && (r.size.width = r.size.height * r.aspectRatio))
     }, stop: function (t, n) {
        var r = e(this).data("resizable"), i = r.options, s = r.position, o = r.containerOffset, u = r.containerPosition, a = r.containerElement, f = e(r.helper), l = f.offset(), c = f.outerWidth() - r.sizeDiff.width, h = f.outerHeight() - r.sizeDiff.height;
        r._helper && !i.animate && /relative/.test(a.css("position")) && e(this).css({left: l.left - u.left - o.left, width: c, height: h}), r._helper && !i.animate && /static/.test(a.css("position")) && e(this).css({left: l.left - u.left - o.left, width: c, height: h})
     }}), e.ui.plugin.add("resizable", "ghost", {start: function (t, n) {
        var r = e(this).data("resizable"), i = r.options, s = r.size;
        r.ghost = r.originalElement.clone(), r.ghost.css({opacity: .25, display: "block", position: "relative", height: s.height, width: s.width, margin: 0, left: 0, top: 0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost == "string" ? i.ghost : ""), r.ghost.appendTo(r.helper)
     }, resize: function (t, n) {
        var r = e(this).data("resizable"), i = r.options;
        r.ghost && r.ghost.css({position: "relative", height: r.size.height, width: r.size.width})
     }, stop: function (t, n) {
        var r = e(this).data("resizable"), i = r.options;
        r.ghost && r.helper && r.helper.get(0).removeChild(r.ghost.get(0))
     }}), e.ui.plugin.add("resizable", "grid", {resize: function (t, n) {
        var r = e(this).data("resizable"), i = r.options, s = r.size, o = r.originalSize, u = r.originalPosition, a = r.axis, f = i._aspectRatio || t.shiftKey;
        i.grid = typeof i.grid == "number" ? [i.grid, i.grid] : i.grid;
        var l = Math.round((s.width - o.width) / (i.grid[0] || 1)) * (i.grid[0] || 1), c = Math.round((s.height - o.height) / (i.grid[1] || 1)) * (i.grid[1] || 1);
        /^(se|s|e)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c) : /^(ne)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c, r.position.top = u.top - c) : /^(sw)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c, r.position.left = u.left - l) : (r.size.width = o.width + l, r.size.height = o.height + c, r.position.top = u.top - c, r.position.left = u.left - l)
     }});
     var n = function (e) {
        return parseInt(e, 10) || 0
     }, r = function (e) {
        return!isNaN(parseInt(e, 10))
     }
  })(jQuery);
  (function (e, t) {
     var n = 0;
     e.widget("ui.autocomplete", {version: "1.9.2", defaultElement: "<input>", options: {appendTo: "body", autoFocus: !1, delay: 300, minLength: 1, position: {my: "left top", at: "left bottom", collision: "none"}, source: null, change: null, close: null, focus: null, open: null, response: null, search: null, select: null}, pending: 0, _create: function () {
        var t, n, r;
        this.isMultiLine = this._isMultiLine(), this.valueMethod = this.element[this.element.is("input,textarea") ? "val" : "text"], this.isNewMenu = !0, this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off"), this._on(this.element, {keydown: function (i) {
           if (this.element.prop("readOnly")) {
              t = !0, r = !0, n = !0;
              return
           }
           t = !1, r = !1, n = !1;
           var s = e.ui.keyCode;
           switch (i.keyCode) {
              case s.PAGE_UP:
                 t = !0, this._move("previousPage", i);
                 break;
              case s.PAGE_DOWN:
                 t = !0, this._move("nextPage", i);
                 break;
              case s.UP:
                 t = !0, this._keyEvent("previous", i);
                 break;
              case s.DOWN:
                 t = !0, this._keyEvent("next", i);
                 break;
              case s.ENTER:
              case s.NUMPAD_ENTER:
                 this.menu.active && (t = !0, i.preventDefault(), this.menu.select(i));
                 break;
              case s.TAB:
                 this.menu.active && this.menu.select(i);
                 break;
              case s.ESCAPE:
                 this.menu.element.is(":visible") && (this._value(this.term), this.close(i), i.preventDefault());
                 break;
              default:
                 n = !0, this._searchTimeout(i)
           }
        }, keypress: function (r) {
           if (t) {
              t = !1, r.preventDefault();
              return
           }
           if (n)return;
           var i = e.ui.keyCode;
           switch (r.keyCode) {
              case i.PAGE_UP:
                 this._move("previousPage", r);
                 break;
              case i.PAGE_DOWN:
                 this._move("nextPage", r);
                 break;
              case i.UP:
                 this._keyEvent("previous", r);
                 break;
              case i.DOWN:
                 this._keyEvent("next", r)
           }
        }, input: function (e) {
           if (r) {
              r = !1, e.preventDefault();
              return
           }
           this._searchTimeout(e)
        }, focus: function () {
           this.selectedItem = null, this.previous = this._value()
        }, blur: function (e) {
           if (this.cancelBlur) {
              delete this.cancelBlur;
              return
           }
           clearTimeout(this.searching), this.close(e), this._change(e)
        }}), this._initSource(), this.menu = e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo || "body")[0]).menu({input: e(), role: null}).zIndex(this.element.zIndex() + 1).hide().data("menu"), this._on(this.menu.element, {mousedown: function (t) {
           t.preventDefault(), this.cancelBlur = !0, this._delay(function () {
              delete this.cancelBlur
           });
           var n = this.menu.element[0];
           e(t.target).closest(".ui-menu-item").length || this._delay(function () {
              var t = this;
              this.document.one("mousedown", function (r) {
                 r.target !== t.element[0] && r.target !== n && !e.contains(n, r.target) && t.close()
              })
           })
        }, menufocus: function (t, n) {
           if (this.isNewMenu) {
              this.isNewMenu = !1;
              if (t.originalEvent && /^mouse/.test(t.originalEvent.type)) {
                 this.menu.blur(), this.document.one("mousemove", function () {
                    e(t.target).trigger(t.originalEvent)
                 });
                 return
              }
           }
           var r = n.item.data("ui-autocomplete-item") || n.item.data("item.autocomplete");
           !1 !== this._trigger("focus", t, {item: r}) ? t.originalEvent && /^key/.test(t.originalEvent.type) && this._value(r.value) : this.liveRegion.text(r.value)
        }, menuselect: function (e, t) {
           var n = t.item.data("ui-autocomplete-item") || t.item.data("item.autocomplete"), r = this.previous;
           this.element[0] !== this.document[0].activeElement && (this.element.focus(), this.previous = r, this._delay(function () {
              this.previous = r, this.selectedItem = n
           })), !1 !== this._trigger("select", e, {item: n}) && this._value(n.value), this.term = this._value(), this.close(e), this.selectedItem = n
        }}), this.liveRegion = e("<span>", {role: "status", "aria-live": "polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element), e.fn.bgiframe && this.menu.element.bgiframe(), this._on(this.window, {beforeunload: function () {
           this.element.removeAttr("autocomplete")
        }})
     }, _destroy: function () {
        clearTimeout(this.searching), this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"), this.menu.element.remove(), this.liveRegion.remove()
     }, _setOption: function (e, t) {
        this._super(e, t), e === "source" && this._initSource(), e === "appendTo" && this.menu.element.appendTo(this.document.find(t || "body")[0]), e === "disabled" && t && this.xhr && this.xhr.abort()
     }, _isMultiLine: function () {
        return this.element.is("textarea") ? !0 : this.element.is("input") ? !1 : this.element.prop("isContentEditable")
     }, _initSource: function () {
        var t, n, r = this;
        e.isArray(this.options.source) ? (t = this.options.source, this.source = function (n, r) {
           r(e.ui.autocomplete.filter(t, n.term))
        }) : typeof this.options.source == "string" ? (n = this.options.source, this.source = function (t, i) {
           r.xhr && r.xhr.abort(), r.xhr = e.ajax({url: n, data: t, dataType: "json", success: function (e) {
              i(e)
           }, error: function () {
              i([])
           }})
        }) : this.source = this.options.source
     }, _searchTimeout: function (e) {
        clearTimeout(this.searching), this.searching = this._delay(function () {
           this.term !== this._value() && (this.selectedItem = null, this.search(null, e))
        }, this.options.delay)
     }, search: function (e, t) {
        e = e != null ? e : this._value(), this.term = this._value();
        if (e.length < this.options.minLength)return this.close(t);
        if (this._trigger("search", t) === !1)return;
        return this._search(e)
     }, _search: function (e) {
        this.pending++, this.element.addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({term: e}, this._response())
     }, _response: function () {
        var e = this, t = ++n;
        return function (r) {
           t === n && e.__response(r), e.pending--, e.pending || e.element.removeClass("ui-autocomplete-loading")
        }
     }, __response: function (e) {
        e && (e = this._normalize(e)), this._trigger("response", null, {content: e}), !this.options.disabled && e && e.length && !this.cancelSearch ? (this._suggest(e), this._trigger("open")) : this._close()
     }, close: function (e) {
        this.cancelSearch = !0, this._close(e)
     }, _close: function (e) {
        this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", e))
     }, _change: function (e) {
        this.previous !== this._value() && this._trigger("change", e, {item: this.selectedItem})
     }, _normalize: function (t) {
        return t.length && t[0].label && t[0].value ? t : e.map(t, function (t) {
           return typeof t == "string" ? {label: t, value: t} : e.extend({label: t.label || t.value, value: t.value || t.label}, t)
        })
     }, _suggest: function (t) {
        var n = this.menu.element.empty().zIndex(this.element.zIndex() + 1);
        this._renderMenu(n, t), this.menu.refresh(), n.show(), this._resizeMenu(), n.position(e.extend({of: this.element}, this.options.position)), this.options.autoFocus && this.menu.next()
     }, _resizeMenu: function () {
        var e = this.menu.element;
        e.outerWidth(Math.max(e.width("").outerWidth() + 1, this.element.outerWidth()))
     }, _renderMenu: function (t, n) {
        var r = this;
        e.each(n, function (e, n) {
           r._renderItemData(t, n)
        })
     }, _renderItemData: function (e, t) {
        return this._renderItem(e, t).data("ui-autocomplete-item", t)
     }, _renderItem: function (t, n) {
        return e("<li>").append(e("<a>").text(n.label)).appendTo(t)
     }, _move: function (e, t) {
        if (!this.menu.element.is(":visible")) {
           this.search(null, t);
           return
        }
        if (this.menu.isFirstItem() && /^previous/.test(e) || this.menu.isLastItem() && /^next/.test(e)) {
           this._value(this.term), this.menu.blur();
           return
        }
        this.menu[e](t)
     }, widget: function () {
        return this.menu.element
     }, _value: function () {
        return this.valueMethod.apply(this.element, arguments)
     }, _keyEvent: function (e, t) {
        if (!this.isMultiLine || this.menu.element.is(":visible"))this._move(e, t), t.preventDefault()
     }}), e.extend(e.ui.autocomplete, {escapeRegex: function (e) {
        return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
     }, filter: function (t, n) {
        var r = new RegExp(e.ui.autocomplete.escapeRegex(n), "i");
        return e.grep(t, function (e) {
           return r.test(e.label || e.value || e)
        })
     }}), e.widget("ui.autocomplete", e.ui.autocomplete, {options: {messages: {noResults: "No search results.", results: function (e) {
        return e + (e > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate."
     }}}, __response: function (e) {
        var t;
        this._superApply(arguments);
        if (this.options.disabled || this.cancelSearch)return;
        e && e.length ? t = this.options.messages.results(e.length) : t = this.options.messages.noResults, this.liveRegion.text(t)
     }})
  })(jQuery);
  (function (e, t) {
     var n = !1;
     e.widget("ui.menu", {version: "1.9.2", defaultElement: "<ul>", delay: 300, options: {icons: {submenu: "ui-icon-carat-1-e"}, menus: "ul", position: {my: "left top", at: "right top"}, role: "menu", blur: null, focus: null, select: null}, _create: function () {
        this.activeMenu = this.element, this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length).attr({role: this.options.role, tabIndex: 0}).bind("click" + this.eventNamespace, e.proxy(function (e) {
           this.options.disabled && e.preventDefault()
        }, this)), this.options.disabled && this.element.addClass("ui-state-disabled").attr("aria-disabled", "true"), this._on({"mousedown .ui-menu-item > a": function (e) {
           e.preventDefault()
        }, "click .ui-state-disabled > a": function (e) {
           e.preventDefault()
        }, "click .ui-menu-item:has(a)": function (t) {
           var r = e(t.target).closest(".ui-menu-item");
           !n && r.not(".ui-state-disabled").length && (n = !0, this.select(t), r.has(".ui-menu").length ? this.expand(t) : this.element.is(":focus") || (this.element.trigger("focus", [!0]), this.active && this.active.parents(".ui-menu").length === 1 && clearTimeout(this.timer)))
        }, "mouseenter .ui-menu-item": function (t) {
           var n = e(t.currentTarget);
           n.siblings().children(".ui-state-active").removeClass("ui-state-active"), this.focus(t, n)
        }, mouseleave: "collapseAll", "mouseleave .ui-menu": "collapseAll", focus: function (e, t) {
           var n = this.active || this.element.children(".ui-menu-item").eq(0);
           t || this.focus(e, n)
        }, blur: function (t) {
           this._delay(function () {
              e.contains(this.element[0], this.document[0].activeElement) || this.collapseAll(t)
           })
        }, keydown: "_keydown"}), this.refresh(), this._on(this.document, {click: function (t) {
           e(t.target).closest(".ui-menu").length || this.collapseAll(t), n = !1
        }})
     }, _destroy: function () {
        this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(), this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function () {
           var t = e(this);
           t.data("ui-menu-submenu-carat") && t.remove()
        }), this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
     }, _keydown: function (t) {
        function a(e) {
           return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
        }
  
        var n, r, i, s, o, u = !0;
        switch (t.keyCode) {
           case e.ui.keyCode.PAGE_UP:
              this.previousPage(t);
              break;
           case e.ui.keyCode.PAGE_DOWN:
              this.nextPage(t);
              break;
           case e.ui.keyCode.HOME:
              this._move("first", "first", t);
              break;
           case e.ui.keyCode.END:
              this._move("last", "last", t);
              break;
           case e.ui.keyCode.UP:
              this.previous(t);
              break;
           case e.ui.keyCode.DOWN:
              this.next(t);
              break;
           case e.ui.keyCode.LEFT:
              this.collapse(t);
              break;
           case e.ui.keyCode.RIGHT:
              this.active && !this.active.is(".ui-state-disabled") && this.expand(t);
              break;
           case e.ui.keyCode.ENTER:
           case e.ui.keyCode.SPACE:
              this._activate(t);
              break;
           case e.ui.keyCode.ESCAPE:
              this.collapse(t);
              break;
           default:
              u = !1, r = this.previousFilter || "", i = String.fromCharCode(t.keyCode), s = !1, clearTimeout(this.filterTimer), i === r ? s = !0 : i = r + i, o = new RegExp("^" + a(i), "i"), n = this.activeMenu.children(".ui-menu-item").filter(function () {
                 return o.test(e(this).children("a").text())
              }), n = s && n.index(this.active.next()) !== -1 ? this.active.nextAll(".ui-menu-item") : n, n.length || (i = String.fromCharCode(t.keyCode), o = new RegExp("^" + a(i), "i"), n = this.activeMenu.children(".ui-menu-item").filter(function () {
                 return o.test(e(this).children("a").text())
              })), n.length ? (this.focus(t, n), n.length > 1 ? (this.previousFilter = i, this.filterTimer = this._delay(function () {
                 delete this.previousFilter
              }, 1e3)) : delete this.previousFilter) : delete this.previousFilter
        }
        u && t.preventDefault()
     }, _activate: function (e) {
        this.active.is(".ui-state-disabled") || (this.active.children("a[aria-haspopup='true']").length ? this.expand(e) : this.select(e))
     }, refresh: function () {
        var t, n = this.options.icons.submenu, r = this.element.find(this.options.menus);
        r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role: this.options.role, "aria-hidden": "true", "aria-expanded": "false"}).each(function () {
           var t = e(this), r = t.prev("a"), i = e("<span>").addClass("ui-menu-icon ui-icon " + n).data("ui-menu-submenu-carat", !0);
           r.attr("aria-haspopup", "true").prepend(i), t.attr("aria-labelledby", r.attr("id"))
        }), t = r.add(this.element), t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex: -1, role: this._itemRole()}), t.children(":not(.ui-menu-item)").each(function () {
           var t = e(this);
           /[^\-—–\s]/.test(t.text()) || t.addClass("ui-widget-content ui-menu-divider")
        }), t.children(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !e.contains(this.element[0], this.active[0]) && this.blur()
     }, _itemRole: function () {
        return{menu: "menuitem", listbox: "option"}[this.options.role]
     }, focus: function (e, t) {
        var n, r;
        this.blur(e, e && e.type === "focus"), this._scrollIntoView(t), this.active = t.first(), r = this.active.children("a").addClass("ui-state-focus"), this.options.role && this.element.attr("aria-activedescendant", r.attr("id")), this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"), e && e.type === "keydown" ? this._close() : this.timer = this._delay(function () {
           this._close()
        }, this.delay), n = t.children(".ui-menu"), n.length && /^mouse/.test(e.type) && this._startOpening(n), this.activeMenu = t.parent(), this._trigger("focus", e, {item: t})
     }, _scrollIntoView: function (t) {
        var n, r, i, s, o, u;
        this._hasScroll() && (n = parseFloat(e.css(this.activeMenu[0], "borderTopWidth")) || 0, r = parseFloat(e.css(this.activeMenu[0], "paddingTop")) || 0, i = t.offset().top - this.activeMenu.offset().top - n - r, s = this.activeMenu.scrollTop(), o = this.activeMenu.height(), u = t.height(), i < 0 ? this.activeMenu.scrollTop(s + i) : i + u > o && this.activeMenu.scrollTop(s + i - o + u))
     }, blur: function (e, t) {
        t || clearTimeout(this.timer);
        if (!this.active)return;
        this.active.children("a").removeClass("ui-state-focus"), this.active = null, this._trigger("blur", e, {item: this.active})
     }, _startOpening: function (e) {
        clearTimeout(this.timer);
        if (e.attr("aria-hidden") !== "true")return;
        this.timer = this._delay(function () {
           this._close(), this._open(e)
        }, this.delay)
     }, _open: function (t) {
        var n = e.extend({of: this.active}, this.options.position);
        clearTimeout(this.timer), this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"), t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(n)
     }, collapseAll: function (t, n) {
        clearTimeout(this.timer), this.timer = this._delay(function () {
           var r = n ? this.element : e(t && t.target).closest(this.element.find(".ui-menu"));
           r.length || (r = this.element), this._close(r), this.blur(t), this.activeMenu = r
        }, this.delay)
     }, _close: function (e) {
        e || (e = this.active ? this.active.parent() : this.element), e.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find("a.ui-state-active").removeClass("ui-state-active")
     }, collapse: function (e) {
        var t = this.active && this.active.parent().closest(".ui-menu-item", this.element);
        t && t.length && (this._close(), this.focus(e, t))
     }, expand: function (e) {
        var t = this.active && this.active.children(".ui-menu ").children(".ui-menu-item").first();
        t && t.length && (this._open(t.parent()), this._delay(function () {
           this.focus(e, t)
        }))
     }, next: function (e) {
        this._move("next", "first", e)
     }, previous: function (e) {
        this._move("prev", "last", e)
     }, isFirstItem: function () {
        return this.active && !this.active.prevAll(".ui-menu-item").length
     }, isLastItem: function () {
        return this.active && !this.active.nextAll(".ui-menu-item").length
     }, _move: function (e, t, n) {
        var r;
        this.active && (e === "first" || e === "last" ? r = this.active[e === "first" ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : r = this.active[e + "All"](".ui-menu-item").eq(0));
        if (!r || !r.length || !this.active)r = this.activeMenu.children(".ui-menu-item")[t]();
        this.focus(n, r)
     }, nextPage: function (t) {
        var n, r, i;
        if (!this.active) {
           this.next(t);
           return
        }
        if (this.isLastItem())return;
        this._hasScroll() ? (r = this.active.offset().top, i = this.element.height(), this.active.nextAll(".ui-menu-item").each(function () {
           return n = e(this), n.offset().top - r - i < 0
        }), this.focus(t, n)) : this.focus(t, this.activeMenu.children(".ui-menu-item")[this.active ? "last" : "first"]())
     }, previousPage: function (t) {
        var n, r, i;
        if (!this.active) {
           this.next(t);
           return
        }
        if (this.isFirstItem())return;
        this._hasScroll() ? (r = this.active.offset().top, i = this.element.height(), this.active.prevAll(".ui-menu-item").each(function () {
           return n = e(this), n.offset().top - r + i > 0
        }), this.focus(t, n)) : this.focus(t, this.activeMenu.children(".ui-menu-item").first())
     }, _hasScroll: function () {
        return this.element.outerHeight() < this.element.prop("scrollHeight")
     }, select: function (t) {
        this.active = this.active || e(t.target).closest(".ui-menu-item");
        var n = {item: this.active};
        this.active.has(".ui-menu").length || this.collapseAll(t, !0), this._trigger("select", t, n)
     }})
  })(jQuery);