",
options: {disabled: !1, create: null},
_createWidget: function (t, i) {
i = e(i || this.defaultElement || this)[0], this.element = e(i), this.uuid = s++, this.eventNamespace = "." + this.widgetName + this.uuid, this.bindings = e(), this.hoverable = e(), this.focusable = e(), i !== this && (e.data(i, this.widgetFullName, this), this._on(!0, this.element, {
remove: function (e) {
e.target === i && this.destroy()
}
}), this.document = e(i.style ? i.ownerDocument : i.document || i), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t), 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.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 (t, i) {
var s, n, a, o = t;
if (0 === arguments.length)return e.widget.extend({}, this.options);
if ("string" == typeof t)if (o = {}, s = t.split("."), t = s.shift(), s.length) {
for (n = o[t] = e.widget.extend({}, this.options[t]), a = 0; s.length - 1 > a; a++)n[s[a]] = n[s[a]] || {}, n = n[s[a]];
if (t = s.pop(), 1 === arguments.length)return void 0 === n[t] ? null : n[t];
n[t] = i
} else {
if (1 === arguments.length)return void 0 === this.options[t] ? null : this.options[t];
o[t] = i
}
return this._setOptions(o), 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, "disabled" === e && (this.widget().toggleClass(this.widgetFullName + "-disabled", !!t), t && (this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus"))), this
},
enable: function () {
return this._setOptions({disabled: !1})
},
disable: function () {
return this._setOptions({disabled: !0})
},
_on: function (t, i, s) {
var n, a = this;
"boolean" != typeof t && (s = i, i = t, t = !1), s ? (i = n = e(i), this.bindings = this.bindings.add(i)) : (s = i, i = this.element, n = this.widget()), e.each(s, function (s, o) {
function r() {
return t || a.options.disabled !== !0 && !e(this).hasClass("ui-state-disabled") ? ("string" == typeof o ? a[o] : o).apply(a, arguments) : void 0
}
"string" != typeof o && (r.guid = o.guid = o.guid || r.guid || e.guid++);
var h = s.match(/^([\w:-]*)\s*(.*)$/), l = h[1] + a.eventNamespace, u = h[2];
u ? n.delegate(u, l, r) : i.bind(l, r)
})
},
_off: function (t, i) {
i = (i || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t.unbind(i).undelegate(i), this.bindings = e(this.bindings.not(t).get()), this.focusable = e(this.focusable.not(t).get()), this.hoverable = e(this.hoverable.not(t).get())
},
_delay: function (e, t) {
function i() {
return ("string" == typeof e ? s[e] : e).apply(s, arguments)
}
var s = this;
return setTimeout(i, 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, i, s) {
var n, a, o = this.options[t];
if (s = s || {}, i = e.Event(i), i.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), i.target = this.element[0], a = i.originalEvent)for (n in a)n in i || (i[n] = a[n]);
return this.element.trigger(i, s), !(e.isFunction(o) && o.apply(this.element[0], [i].concat(s)) === !1 || i.isDefaultPrevented())
}
}, e.each({show: "fadeIn", hide: "fadeOut"}, function (t, i) {
e.Widget.prototype["_" + t] = function (s, n, a) {
"string" == typeof n && (n = {effect: n});
var o, r = n ? n === !0 || "number" == typeof n ? i : n.effect || i : t;
n = n || {}, "number" == typeof n && (n = {duration: n}), o = !e.isEmptyObject(n), n.complete = a, n.delay && s.delay(n.delay), o && e.effects && e.effects.effect[r] ? s[t](n) : r !== t && s[r] ? s[r](n.duration, n.easing, a) : s.queue(function (i) {
e(this)[t](), a && a.call(s[0]), i()
})
}
}), e.widget;
var a = !1;
e(document).mouseup(function () {
a = !1
}), e.widget("ui.mouse", {
version: "1.11.4",
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 (i) {
return !0 === e.data(i.target, t.widgetName + ".preventClickEvent") ? (e.removeData(i.target, t.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1) : void 0
}), this.started = !1
},
_mouseDestroy: function () {
this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
},
_mouseDown: function (t) {
if (!a) {
this._mouseMoved = !1, this._mouseStarted && this._mouseUp(t), this._mouseDownEvent = t;
var i = this, s = 1 === t.which, n = "string" == typeof this.options.cancel && t.target.nodeName ? e(t.target).closest(this.options.cancel).length : !1;
return s && !n && this._mouseCapture(t) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () {
i.mouseDelayMet = !0
}, this.options.delay)), this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(t) !== !1, !this._mouseStarted) ? (t.preventDefault(), !0) : (!0 === e.data(t.target, this.widgetName + ".preventClickEvent") && e.removeData(t.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (e) {
return i._mouseMove(e)
}, this._mouseUpDelegate = function (e) {
return i._mouseUp(e)
}, this.document.bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), t.preventDefault(), a = !0, !0)) : !0
}
},
_mouseMove: function (t) {
if (this._mouseMoved) {
if (e.ui.ie && (!document.documentMode || 9 > document.documentMode) && !t.button)return this._mouseUp(t);
if (!t.which)return this._mouseUp(t)
}
return (t.which || t.button) && (this._mouseMoved = !0), 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)
},
_mouseUp: function (t) {
return this.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)), a = !1, !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 () {
return this.mouseDelayMet
},
_mouseStart: function () {
},
_mouseDrag: function () {
},
_mouseStop: function () {
},
_mouseCapture: function () {
return !0
}
}), function () {
function t(e, t, i) {
return [parseFloat(e[0]) * (p.test(e[0]) ? t / 100 : 1), parseFloat(e[1]) * (p.test(e[1]) ? i / 100 : 1)]
}
function i(t, i) {
return parseInt(e.css(t, i), 10) || 0
}
function s(t) {
var i = t[0];
return 9 === i.nodeType ? {
width: t.width(),
height: t.height(),
offset: {top: 0, left: 0}
} : e.isWindow(i) ? {
width: t.width(),
height: t.height(),
offset: {top: t.scrollTop(), left: t.scrollLeft()}
} : i.preventDefault ? {
width: 0,
height: 0,
offset: {top: i.pageY, left: i.pageX}
} : {width: t.outerWidth(), height: t.outerHeight(), offset: t.offset()}
}
e.ui = e.ui || {};
var n, a, o = Math.max, r = Math.abs, h = Math.round, l = /left|center|right/, u = /top|center|bottom/, d = /[\+\-]\d+(\.[\d]+)?%?/, c = /^\w+/, p = /%$/, f = e.fn.position;
e.position = {
scrollbarWidth: function () {
if (void 0 !== n)return n;
var t, i, s = e("
"), a = s.children()[0];
return e("body").append(s), t = a.offsetWidth, s.css("overflow", "scroll"), i = a.offsetWidth, t === i && (i = s[0].clientWidth), s.remove(), n = t - i
}, getScrollInfo: function (t) {
var i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"), s = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"), n = "scroll" === i || "auto" === i && t.width < t.element[0].scrollWidth, a = "scroll" === s || "auto" === s && t.height < t.element[0].scrollHeight;
return {width: a ? e.position.scrollbarWidth() : 0, height: n ? e.position.scrollbarWidth() : 0}
}, getWithinInfo: function (t) {
var i = e(t || window), s = e.isWindow(i[0]), n = !!i[0] && 9 === i[0].nodeType;
return {
element: i,
isWindow: s,
isDocument: n,
offset: i.offset() || {left: 0, top: 0},
scrollLeft: i.scrollLeft(),
scrollTop: i.scrollTop(),
width: s || n ? i.width() : i.outerWidth(),
height: s || n ? i.height() : i.outerHeight()
}
}
}, e.fn.position = function (n) {
if (!n || !n.of)return f.apply(this, arguments);
n = e.extend({}, n);
var p, m, g, v, y, b, _ = e(n.of), x = e.position.getWithinInfo(n.within), w = e.position.getScrollInfo(x), k = (n.collision || "flip").split(" "), T = {};
return b = s(_), _[0].preventDefault && (n.at = "left top"), m = b.width, g = b.height, v = b.offset, y = e.extend({}, v), e.each(["my", "at"], function () {
var e, t, i = (n[this] || "").split(" ");
1 === i.length && (i = l.test(i[0]) ? i.concat(["center"]) : u.test(i[0]) ? ["center"].concat(i) : ["center", "center"]), i[0] = l.test(i[0]) ? i[0] : "center", i[1] = u.test(i[1]) ? i[1] : "center", e = d.exec(i[0]), t = d.exec(i[1]), T[this] = [e ? e[0] : 0, t ? t[0] : 0], n[this] = [c.exec(i[0])[0], c.exec(i[1])[0]]
}), 1 === k.length && (k[1] = k[0]), "right" === n.at[0] ? y.left += m : "center" === n.at[0] && (y.left += m / 2), "bottom" === n.at[1] ? y.top += g : "center" === n.at[1] && (y.top += g / 2), p = t(T.at, m, g), y.left += p[0], y.top += p[1], this.each(function () {
var s, l, u = e(this), d = u.outerWidth(), c = u.outerHeight(), f = i(this, "marginLeft"), b = i(this, "marginTop"), D = d + f + i(this, "marginRight") + w.width, S = c + b + i(this, "marginBottom") + w.height, N = e.extend({}, y), M = t(T.my, u.outerWidth(), u.outerHeight());
"right" === n.my[0] ? N.left -= d : "center" === n.my[0] && (N.left -= d / 2), "bottom" === n.my[1] ? N.top -= c : "center" === n.my[1] && (N.top -= c / 2), N.left += M[0], N.top += M[1], a || (N.left = h(N.left), N.top = h(N.top)), s = {
marginLeft: f,
marginTop: b
}, e.each(["left", "top"], function (t, i) {
e.ui.position[k[t]] && e.ui.position[k[t]][i](N, {
targetWidth: m,
targetHeight: g,
elemWidth: d,
elemHeight: c,
collisionPosition: s,
collisionWidth: D,
collisionHeight: S,
offset: [p[0] + M[0], p[1] + M[1]],
my: n.my,
at: n.at,
within: x,
elem: u
})
}), n.using && (l = function (e) {
var t = v.left - N.left, i = t + m - d, s = v.top - N.top, a = s + g - c, h = {
target: {
element: _,
left: v.left,
top: v.top,
width: m,
height: g
},
element: {element: u, left: N.left, top: N.top, width: d, height: c},
horizontal: 0 > i ? "left" : t > 0 ? "right" : "center",
vertical: 0 > a ? "top" : s > 0 ? "bottom" : "middle"
};
d > m && m > r(t + i) && (h.horizontal = "center"), c > g && g > r(s + a) && (h.vertical = "middle"), h.important = o(r(t), r(i)) > o(r(s), r(a)) ? "horizontal" : "vertical", n.using.call(this, e, h)
}), u.offset(e.extend(N, {using: l}))
})
}, e.ui.position = {
fit: {
left: function (e, t) {
var i, s = t.within, n = s.isWindow ? s.scrollLeft : s.offset.left, a = s.width, r = e.left - t.collisionPosition.marginLeft, h = n - r, l = r + t.collisionWidth - a - n;
t.collisionWidth > a ? h > 0 && 0 >= l ? (i = e.left + h + t.collisionWidth - a - n, e.left += h - i) : e.left = l > 0 && 0 >= h ? n : h > l ? n + a - t.collisionWidth : n : h > 0 ? e.left += h : l > 0 ? e.left -= l : e.left = o(e.left - r, e.left)
}, top: function (e, t) {
var i, s = t.within, n = s.isWindow ? s.scrollTop : s.offset.top, a = t.within.height, r = e.top - t.collisionPosition.marginTop, h = n - r, l = r + t.collisionHeight - a - n;
t.collisionHeight > a ? h > 0 && 0 >= l ? (i = e.top + h + t.collisionHeight - a - n, e.top += h - i) : e.top = l > 0 && 0 >= h ? n : h > l ? n + a - t.collisionHeight : n : h > 0 ? e.top += h : l > 0 ? e.top -= l : e.top = o(e.top - r, e.top)
}
}, flip: {
left: function (e, t) {
var i, s, n = t.within, a = n.offset.left + n.scrollLeft, o = n.width, h = n.isWindow ? n.scrollLeft : n.offset.left, l = e.left - t.collisionPosition.marginLeft, u = l - h, d = l + t.collisionWidth - o - h, c = "left" === t.my[0] ? -t.elemWidth : "right" === t.my[0] ? t.elemWidth : 0, p = "left" === t.at[0] ? t.targetWidth : "right" === t.at[0] ? -t.targetWidth : 0, f = -2 * t.offset[0];
0 > u ? (i = e.left + c + p + f + t.collisionWidth - o - a, (0 > i || r(u) > i) && (e.left += c + p + f)) : d > 0 && (s = e.left - t.collisionPosition.marginLeft + c + p + f - h, (s > 0 || d > r(s)) && (e.left += c + p + f))
}, top: function (e, t) {
var i, s, n = t.within, a = n.offset.top + n.scrollTop, o = n.height, h = n.isWindow ? n.scrollTop : n.offset.top, l = e.top - t.collisionPosition.marginTop, u = l - h, d = l + t.collisionHeight - o - h, c = "top" === t.my[1], p = c ? -t.elemHeight : "bottom" === t.my[1] ? t.elemHeight : 0, f = "top" === t.at[1] ? t.targetHeight : "bottom" === t.at[1] ? -t.targetHeight : 0, m = -2 * t.offset[1];
0 > u ? (s = e.top + p + f + m + t.collisionHeight - o - a, (0 > s || r(u) > s) && (e.top += p + f + m)) : d > 0 && (i = e.top - t.collisionPosition.marginTop + p + f + m - h, (i > 0 || d > r(i)) && (e.top += p + f + m))
}
}, 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, i, s, n, o, r = document.getElementsByTagName("body")[0], h = document.createElement("div");
t = document.createElement(r ? "div" : "body"), s = {
visibility: "hidden",
width: 0,
height: 0,
border: 0,
margin: 0,
background: "none"
}, r && e.extend(s, {position: "absolute", left: "-1000px", top: "-1000px"});
for (o in s)t.style[o] = s[o];
t.appendChild(h), i = r || document.documentElement, i.insertBefore(t, i.firstChild), h.style.cssText = "position: absolute; left: 10.7432222px;", n = e(h).offset().left, a = n > 10 && 11 > n, t.innerHTML = "", i.removeChild(t)
}()
}(), e.ui.position
});