/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/
(function (e, t) {
var n, r, i = typeof t, o = e.document, a = e.location, s = e.jQuery, u = e.$, l = {}, c = [], p = "1.9.1",
f = c.concat, d = c.push, h = c.slice, g = c.indexOf, m = l.toString, y = l.hasOwnProperty, v = p.trim,
b = function (e, t) {
return new b.fn.init(e, t, r)
}, x = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, w = /\S+/g, T = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
N = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, C = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, k = /^[\],:{}\s]*$/,
E = /(?:^|:|,)(?:\s*\[)+/g, S = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
A = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, j = /^-ms-/, D = /-([\da-z])/gi,
L = function (e, t) {
return t.toUpperCase()
}, H = function (e) {
(o.addEventListener || "load" === e.type || "complete" === o.readyState) && (q(), b.ready())
}, q = function () {
o.addEventListener ? (o.removeEventListener("DOMContentLoaded", H, !1), e.removeEventListener("load", H, !1)) : (o.detachEvent("onreadystatechange", H), e.detachEvent("onload", H))
};
b.fn = b.prototype = {
jquery: p, constructor: b, init: function (e, n, r) {
var i, a;
if (!e) return this;
if ("string" == typeof e) {
if (i = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3 ? [null, e, null] : N.exec(e), !i || !i[1] && n) return !n || n.jquery ? (n || r).find(e) : this.constructor(n).find(e);
if (i[1]) {
if (n = n instanceof b ? n[0] : n, b.merge(this, b.parseHTML(i[1], n && n.nodeType ? n.ownerDocument || n : o, !0)), C.test(i[1]) && b.isPlainObject(n)) for (i in n) b.isFunction(this[i]) ? this[i](n[i]) : this.attr(i, n[i]);
return this
}
if (a = o.getElementById(i[2]), a && a.parentNode) {
if (a.id !== i[2]) return r.find(e);
this.length = 1, this[0] = a
}
return this.context = o, this.selector = e, this
}
return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : b.isFunction(e) ? r.ready(e) : (e.selector !== t && (this.selector = e.selector, this.context = e.context), b.makeArray(e, this))
}, selector: "", length: 0, size: function () {
return this.length
}, toArray: function () {
return h.call(this)
}, get: function (e) {
return null == e ? this.toArray() : 0 > e ? this[this.length + e] : this[e]
}, pushStack: function (e) {
var t = b.merge(this.constructor(), e);
return t.prevObject = this, t.context = this.context, t
}, each: function (e, t) {
return b.each(this, e, t)
}, ready: function (e) {
return b.ready.promise().done(e), this
}, slice: function () {
return this.pushStack(h.apply(this, arguments))
}, first: function () {
return this.eq(0)
}, last: function () {
return this.eq(-1)
}, eq: function (e) {
var t = this.length, n = +e + (0 > e ? t : 0);
return this.pushStack(n >= 0 && t > n ? [this[n]] : [])
}, map: function (e) {
return this.pushStack(b.map(this, function (t, n) {
return e.call(t, n, t)
}))
}, end: function () {
return this.prevObject || this.constructor(null)
}, push: d, sort: [].sort, splice: [].splice
}, b.fn.init.prototype = b.fn, b.extend = b.fn.extend = function () {
var e, n, r, i, o, a, s = arguments[0] || {}, u = 1, l = arguments.length, c = !1;
for ("boolean" == typeof s && (c = s, s = arguments[1] || {}, u = 2), "object" == typeof s || b.isFunction(s) || (s = {}), l === u && (s = this, --u); l > u; u++) if (null != (o = arguments[u])) for (i in o) e = s[i], r = o[i], s !== r && (c && r && (b.isPlainObject(r) || (n = b.isArray(r))) ? (n ? (n = !1, a = e && b.isArray(e) ? e : []) : a = e && b.isPlainObject(e) ? e : {}, s[i] = b.extend(c, a, r)) : r !== t && (s[i] = r));
return s
}, b.extend({
noConflict: function (t) {
return e.$ === b && (e.$ = u), t && e.jQuery === b && (e.jQuery = s), b
}, isReady: !1, readyWait: 1, holdReady: function (e) {
e ? b.readyWait++ : b.ready(!0)
}, ready: function (e) {
if (e === !0 ? !--b.readyWait : !b.isReady) {
if (!o.body) return setTimeout(b.ready);
b.isReady = !0, e !== !0 && --b.readyWait > 0 || (n.resolveWith(o, [b]), b.fn.trigger && b(o).trigger("ready").off("ready"))
}
}, isFunction: function (e) {
return "function" === b.type(e)
}, isArray: Array.isArray || function (e) {
return "array" === b.type(e)
}, isWindow: function (e) {
return null != e && e == e.window
}, isNumeric: function (e) {
return !isNaN(parseFloat(e)) && isFinite(e)
}, type: function (e) {
return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? l[m.call(e)] || "object" : typeof e
}, isPlainObject: function (e) {
if (!e || "object" !== b.type(e) || e.nodeType || b.isWindow(e)) return !1;
try {
if (e.constructor && !y.call(e, "constructor") && !y.call(e.constructor.prototype, "isPrototypeOf")) return !1
} catch (n) {
return !1
}
var r;
for (r in e) ;
return r === t || y.call(e, r)
}, isEmptyObject: function (e) {
var t;
for (t in e) return !1;
return !0
}, error: function (e) {
throw Error(e)
}, parseHTML: function (e, t, n) {
if (!e || "string" != typeof e) return null;
"boolean" == typeof t && (n = t, t = !1), t = t || o;
var r = C.exec(e), i = !n && [];
return r ? [t.createElement(r[1])] : (r = b.buildFragment([e], t, i), i && b(i).remove(), b.merge([], r.childNodes))
}, parseJSON: function (n) {
return e.JSON && e.JSON.parse ? e.JSON.parse(n) : null === n ? n : "string" == typeof n && (n = b.trim(n), n && k.test(n.replace(S, "@").replace(A, "]").replace(E, ""))) ? Function("return " + n)() : (b.error("Invalid JSON: " + n), t)
}, parseXML: function (n) {
var r, i;
if (!n || "string" != typeof n) return null;
try {
e.DOMParser ? (i = new DOMParser, r = i.parseFromString(n, "text/xml")) : (r = new ActiveXObject("Microsoft.XMLDOM"), r.async = "false", r.loadXML(n))
} catch (o) {
r = t
}
return r && r.documentElement && !r.getElementsByTagName("parsererror").length || b.error("Invalid XML: " + n), r
}, noop: function () {
}, globalEval: function (t) {
t && b.trim(t) && (e.execScript || function (t) {
e.eval.call(e, t)
})(t)
}, camelCase: function (e) {
return e.replace(j, "ms-").replace(D, L)
}, nodeName: function (e, t) {
return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase()
}, each: function (e, t, n) {
var r, i = 0, o = e.length, a = M(e);
if (n) {
if (a) {
for (; o > i; i++) if (r = t.apply(e[i], n), r === !1) break
} else for (i in e) if (r = t.apply(e[i], n), r === !1) break
} else if (a) {
for (; o > i; i++) if (r = t.call(e[i], i, e[i]), r === !1) break
} else for (i in e) if (r = t.call(e[i], i, e[i]), r === !1) break;
return e
}, trim: v && !v.call("\ufeff\u00a0") ? function (e) {
return null == e ? "" : v.call(e)
} : function (e) {
return null == e ? "" : (e + "").replace(T, "")
}, makeArray: function (e, t) {
var n = t || [];
return null != e && (M(Object(e)) ? b.merge(n, "string" == typeof e ? [e] : e) : d.call(n, e)), n
}, inArray: function (e, t, n) {
var r;
if (t) {
if (g) return g.call(t, e, n);
for (r = t.length, n = n ? 0 > n ? Math.max(0, r + n) : n : 0; r > n; n++) if (n in t && t[n] === e) return n
}
return -1
}, merge: function (e, n) {
var r = n.length, i = e.length, o = 0;
if ("number" == typeof r) for (; r > o; o++) e[i++] = n[o]; else while (n[o] !== t) e[i++] = n[o++];
return e.length = i, e
}, grep: function (e, t, n) {
var r, i = [], o = 0, a = e.length;
for (n = !!n; a > o; o++) r = !!t(e[o], o), n !== r && i.push(e[o]);
return i
}, map: function (e, t, n) {
var r, i = 0, o = e.length, a = M(e), s = [];
if (a) for (; o > i; i++) r = t(e[i], i, n), null != r && (s[s.length] = r); else for (i in e) r = t(e[i], i, n), null != r && (s[s.length] = r);
return f.apply([], s)
}, guid: 1, proxy: function (e, n) {
var r, i, o;
return "string" == typeof n && (o = e[n], n = e, e = o), b.isFunction(e) ? (r = h.call(arguments, 2), i = function () {
return e.apply(n || this, r.concat(h.call(arguments)))
}, i.guid = e.guid = e.guid || b.guid++, i) : t
}, access: function (e, n, r, i, o, a, s) {
var u = 0, l = e.length, c = null == r;
if ("object" === b.type(r)) {
o = !0;
for (u in r) b.access(e, n, u, r[u], !0, a, s)
} else if (i !== t && (o = !0, b.isFunction(i) || (s = !0), c && (s ? (n.call(e, i), n = null) : (c = n, n = function (e, t, n) {
return c.call(b(e), n)
})), n)) for (; l > u; u++) n(e[u], r, s ? i : i.call(e[u], u, n(e[u], r)));
return o ? e : c ? n.call(e) : l ? n(e[0], r) : a
}, now: function () {
return (new Date).getTime()
}
}), b.ready.promise = function (t) {
if (!n) if (n = b.Deferred(), "complete" === o.readyState) setTimeout(b.ready); else if (o.addEventListener) o.addEventListener("DOMContentLoaded", H, !1), e.addEventListener("load", H, !1); else {
o.attachEvent("onreadystatechange", H), e.attachEvent("onload", H);
var r = !1;
try {
r = null == e.frameElement && o.documentElement
} catch (i) {
}
r && r.doScroll && function a() {
if (!b.isReady) {
try {
r.doScroll("left")
} catch (e) {
return setTimeout(a, 50)
}
q(), b.ready()
}
}()
}
return n.promise(t)
}, b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (e, t) {
l["[object " + t + "]"] = t.toLowerCase()
});
function M(e) {
var t = e.length, n = b.type(e);
return b.isWindow(e) ? !1 : 1 === e.nodeType && t ? !0 : "array" === n || "function" !== n && (0 === t || "number" == typeof t && t > 0 && t - 1 in e)
}
r = b(o);
var _ = {};
function F(e) {
var t = _[e] = {};
return b.each(e.match(w) || [], function (e, n) {
t[n] = !0
}), t
}
b.Callbacks = function (e) {
e = "string" == typeof e ? _[e] || F(e) : b.extend({}, e);
var n, r, i, o, a, s, u = [], l = !e.once && [], c = function (t) {
for (r = e.memory && t, i = !0, a = s || 0, s = 0, o = u.length, n = !0; u && o > a; a++) if (u[a].apply(t[0], t[1]) === !1 && e.stopOnFalse) {
r = !1;
break
}
n = !1, u && (l ? l.length && c(l.shift()) : r ? u = [] : p.disable())
}, p = {
add: function () {
if (u) {
var t = u.length;
(function i(t) {
b.each(t, function (t, n) {
var r = b.type(n);
"function" === r ? e.unique && p.has(n) || u.push(n) : n && n.length && "string" !== r && i(n)
})
})(arguments), n ? o = u.length : r && (s = t, c(r))
}
return this
}, remove: function () {
return u && b.each(arguments, function (e, t) {
var r;
while ((r = b.inArray(t, u, r)) > -1) u.splice(r, 1), n && (o >= r && o--, a >= r && a--)
}), this
}, has: function (e) {
return e ? b.inArray(e, u) > -1 : !(!u || !u.length)
}, empty: function () {
return u = [], this
}, disable: function () {
return u = l = r = t, this
}, disabled: function () {
return !u
}, lock: function () {
return l = t, r || p.disable(), this
}, locked: function () {
return !l
}, fireWith: function (e, t) {
return t = t || [], t = [e, t.slice ? t.slice() : t], !u || i && !l || (n ? l.push(t) : c(t)), this
}, fire: function () {
return p.fireWith(this, arguments), this
}, fired: function () {
return !!i
}
};
return p
}, b.extend({
Deferred: function (e) {
var t = [["resolve", "done", b.Callbacks("once memory"), "resolved"], ["reject", "fail", b.Callbacks("once memory"), "rejected"], ["notify", "progress", b.Callbacks("memory")]],
n = "pending", r = {
state: function () {
return n
}, always: function () {
return i.done(arguments).fail(arguments), this
}, then: function () {
var e = arguments;
return b.Deferred(function (n) {
b.each(t, function (t, o) {
var a = o[0], s = b.isFunction(e[t]) && e[t];
i[o[1]](function () {
var e = s && s.apply(this, arguments);
e && b.isFunction(e.promise) ? e.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[a + "With"](this === r ? n.promise() : this, s ? [e] : arguments)
})
}), e = null
}).promise()
}, promise: function (e) {
return null != e ? b.extend(e, r) : r
}
}, i = {};
return r.pipe = r.then, b.each(t, function (e, o) {
var a = o[2], s = o[3];
r[o[1]] = a.add, s && a.add(function () {
n = s
}, t[1 ^ e][2].disable, t[2][2].lock), i[o[0]] = function () {
return i[o[0] + "With"](this === i ? r : this, arguments), this
}, i[o[0] + "With"] = a.fireWith
}), r.promise(i), e && e.call(i, i), i
}, when: function (e) {
var t = 0, n = h.call(arguments), r = n.length, i = 1 !== r || e && b.isFunction(e.promise) ? r : 0,
o = 1 === i ? e : b.Deferred(), a = function (e, t, n) {
return function (r) {
t[e] = this, n[e] = arguments.length > 1 ? h.call(arguments) : r, n === s ? o.notifyWith(t, n) : --i || o.resolveWith(t, n)
}
}, s, u, l;
if (r > 1) for (s = Array(r), u = Array(r), l = Array(r); r > t; t++) n[t] && b.isFunction(n[t].promise) ? n[t].promise().done(a(t, l, n)).fail(o.reject).progress(a(t, u, s)) : --i;
return i || o.resolveWith(l, n), o.promise()
}
}), b.support = function () {
var t, n, r, a, s, u, l, c, p, f, d = o.createElement("div");
if (d.setAttribute("className", "t"), d.innerHTML = "
"]
}, jt = dt(o), Dt = jt.appendChild(o.createElement("div"));
At.optgroup = At.option, At.tbody = At.tfoot = At.colgroup = At.caption = At.thead, At.th = At.td, b.fn.extend({
text: function (e) {
return b.access(this, function (e) {
return e === t ? b.text(this) : this.empty().append((this[0] && this[0].ownerDocument || o).createTextNode(e))
}, null, e, arguments.length)
}, wrapAll: function (e) {
if (b.isFunction(e)) return this.each(function (t) {
b(this).wrapAll(e.call(this, t))
});
if (this[0]) {
var t = b(e, this[0].ownerDocument).eq(0).clone(!0);
this[0].parentNode && t.insertBefore(this[0]), t.map(function () {
var e = this;
while (e.firstChild && 1 === e.firstChild.nodeType) e = e.firstChild;
return e
}).append(this)
}
return this
}, wrapInner: function (e) {
return b.isFunction(e) ? this.each(function (t) {
b(this).wrapInner(e.call(this, t))
}) : this.each(function () {
var t = b(this), n = t.contents();
n.length ? n.wrapAll(e) : t.append(e)
})
}, wrap: function (e) {
var t = b.isFunction(e);
return this.each(function (n) {
b(this).wrapAll(t ? e.call(this, n) : e)
})
}, unwrap: function () {
return this.parent().each(function () {
b.nodeName(this, "body") || b(this).replaceWith(this.childNodes)
}).end()
}, append: function () {
return this.domManip(arguments, !0, function (e) {
(1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && this.appendChild(e)
})
}, prepend: function () {
return this.domManip(arguments, !0, function (e) {
(1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && this.insertBefore(e, this.firstChild)
})
}, before: function () {
return this.domManip(arguments, !1, function (e) {
this.parentNode && this.parentNode.insertBefore(e, this)
})
}, after: function () {
return this.domManip(arguments, !1, function (e) {
this.parentNode && this.parentNode.insertBefore(e, this.nextSibling)
})
}, remove: function (e, t) {
var n, r = 0;
for (; null != (n = this[r]); r++) (!e || b.filter(e, [n]).length > 0) && (t || 1 !== n.nodeType || b.cleanData(Ot(n)), n.parentNode && (t && b.contains(n.ownerDocument, n) && Mt(Ot(n, "script")), n.parentNode.removeChild(n)));
return this
}, empty: function () {
var e, t = 0;
for (; null != (e = this[t]); t++) {
1 === e.nodeType && b.cleanData(Ot(e, !1));
while (e.firstChild) e.removeChild(e.firstChild);
e.options && b.nodeName(e, "select") && (e.options.length = 0)
}
return this
}, clone: function (e, t) {
return e = null == e ? !1 : e, t = null == t ? e : t, this.map(function () {
return b.clone(this, e, t)
})
}, html: function (e) {
return b.access(this, function (e) {
var n = this[0] || {}, r = 0, i = this.length;
if (e === t) return 1 === n.nodeType ? n.innerHTML.replace(gt, "") : t;
if (!("string" != typeof e || Tt.test(e) || !b.support.htmlSerialize && mt.test(e) || !b.support.leadingWhitespace && yt.test(e) || At[(bt.exec(e) || ["", ""])[1].toLowerCase()])) {
e = e.replace(vt, "<$1>$2>");
try {
for (; i > r; r++) n = this[r] || {}, 1 === n.nodeType && (b.cleanData(Ot(n, !1)), n.innerHTML = e);
n = 0
} catch (o) {
}
}
n && this.empty().append(e)
}, null, e, arguments.length)
}, replaceWith: function (e) {
var t = b.isFunction(e);
return t || "string" == typeof e || (e = b(e).not(this).detach()), this.domManip([e], !0, function (e) {
var t = this.nextSibling, n = this.parentNode;
n && (b(this).remove(), n.insertBefore(e, t))
})
}, detach: function (e) {
return this.remove(e, !0)
}, domManip: function (e, n, r) {
e = f.apply([], e);
var i, o, a, s, u, l, c = 0, p = this.length, d = this, h = p - 1, g = e[0], m = b.isFunction(g);
if (m || !(1 >= p || "string" != typeof g || b.support.checkClone) && Ct.test(g)) return this.each(function (i) {
var o = d.eq(i);
m && (e[0] = g.call(this, i, n ? o.html() : t)), o.domManip(e, n, r)
});
if (p && (l = b.buildFragment(e, this[0].ownerDocument, !1, this), i = l.firstChild, 1 === l.childNodes.length && (l = i), i)) {
for (n = n && b.nodeName(i, "tr"), s = b.map(Ot(l, "script"), Ht), a = s.length; p > c; c++) o = l, c !== h && (o = b.clone(o, !0, !0), a && b.merge(s, Ot(o, "script"))), r.call(n && b.nodeName(this[c], "table") ? Lt(this[c], "tbody") : this[c], o, c);
if (a) for (u = s[s.length - 1].ownerDocument, b.map(s, qt), c = 0; a > c; c++) o = s[c], kt.test(o.type || "") && !b._data(o, "globalEval") && b.contains(u, o) && (o.src ? b.ajax({
url: o.src,
type: "GET",
dataType: "script",
async: !1,
global: !1,
"throws": !0
}) : b.globalEval((o.text || o.textContent || o.innerHTML || "").replace(St, "")));
l = i = null
}
return this
}
});
function Lt(e, t) {
return e.getElementsByTagName(t)[0] || e.appendChild(e.ownerDocument.createElement(t))
}
function Ht(e) {
var t = e.getAttributeNode("type");
return e.type = (t && t.specified) + "/" + e.type, e
}
function qt(e) {
var t = Et.exec(e.type);
return t ? e.type = t[1] : e.removeAttribute("type"), e
}
function Mt(e, t) {
var n, r = 0;
for (; null != (n = e[r]); r++) b._data(n, "globalEval", !t || b._data(t[r], "globalEval"))
}
function _t(e, t) {
if (1 === t.nodeType && b.hasData(e)) {
var n, r, i, o = b._data(e), a = b._data(t, o), s = o.events;
if (s) {
delete a.handle, a.events = {};
for (n in s) for (r = 0, i = s[n].length; i > r; r++) b.event.add(t, n, s[n][r])
}
a.data && (a.data = b.extend({}, a.data))
}
}
function Ft(e, t) {
var n, r, i;
if (1 === t.nodeType) {
if (n = t.nodeName.toLowerCase(), !b.support.noCloneEvent && t[b.expando]) {
i = b._data(t);
for (r in i.events) b.removeEvent(t, r, i.handle);
t.removeAttribute(b.expando)
}
"script" === n && t.text !== e.text ? (Ht(t).text = e.text, qt(t)) : "object" === n ? (t.parentNode && (t.outerHTML = e.outerHTML), b.support.html5Clone && e.innerHTML && !b.trim(t.innerHTML) && (t.innerHTML = e.innerHTML)) : "input" === n && Nt.test(e.type) ? (t.defaultChecked = t.checked = e.checked, t.value !== e.value && (t.value = e.value)) : "option" === n ? t.defaultSelected = t.selected = e.defaultSelected : ("input" === n || "textarea" === n) && (t.defaultValue = e.defaultValue)
}
}
b.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function (e, t) {
b.fn[e] = function (e) {
var n, r = 0, i = [], o = b(e), a = o.length - 1;
for (; a >= r; r++) n = r === a ? this : this.clone(!0), b(o[r])[t](n), d.apply(i, n.get());
return this.pushStack(i)
}
});
function Ot(e, n) {
var r, o, a = 0,
s = typeof e.getElementsByTagName !== i ? e.getElementsByTagName(n || "*") : typeof e.querySelectorAll !== i ? e.querySelectorAll(n || "*") : t;
if (!s) for (s = [], r = e.childNodes || e; null != (o = r[a]); a++) !n || b.nodeName(o, n) ? s.push(o) : b.merge(s, Ot(o, n));
return n === t || n && b.nodeName(e, n) ? b.merge([e], s) : s
}
function Bt(e) {
Nt.test(e.type) && (e.defaultChecked = e.checked)
}
b.extend({
clone: function (e, t, n) {
var r, i, o, a, s, u = b.contains(e.ownerDocument, e);
if (b.support.html5Clone || b.isXMLDoc(e) || !mt.test("<" + e.nodeName + ">") ? o = e.cloneNode(!0) : (Dt.innerHTML = e.outerHTML, Dt.removeChild(o = Dt.firstChild)), !(b.support.noCloneEvent && b.support.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || b.isXMLDoc(e))) for (r = Ot(o), s = Ot(e), a = 0; null != (i = s[a]); ++a) r[a] && Ft(i, r[a]);
if (t) if (n) for (s = s || Ot(e), r = r || Ot(o), a = 0; null != (i = s[a]); a++) _t(i, r[a]); else _t(e, o);
return r = Ot(o, "script"), r.length > 0 && Mt(r, !u && Ot(e, "script")), r = s = i = null, o
}, buildFragment: function (e, t, n, r) {
var i, o, a, s, u, l, c, p = e.length, f = dt(t), d = [], h = 0;
for (; p > h; h++) if (o = e[h], o || 0 === o) if ("object" === b.type(o)) b.merge(d, o.nodeType ? [o] : o); else if (wt.test(o)) {
s = s || f.appendChild(t.createElement("div")), u = (bt.exec(o) || ["", ""])[1].toLowerCase(), c = At[u] || At._default, s.innerHTML = c[1] + o.replace(vt, "<$1>$2>") + c[2], i = c[0];
while (i--) s = s.lastChild;
if (!b.support.leadingWhitespace && yt.test(o) && d.push(t.createTextNode(yt.exec(o)[0])), !b.support.tbody) {
o = "table" !== u || xt.test(o) ? "
" !== c[1] || xt.test(o) ? 0 : s : s.firstChild, i = o && o.childNodes.length;
while (i--) b.nodeName(l = o.childNodes[i], "tbody") && !l.childNodes.length && o.removeChild(l)
}
b.merge(d, s.childNodes), s.textContent = "";
while (s.firstChild) s.removeChild(s.firstChild);
s = f.lastChild
} else d.push(t.createTextNode(o));
s && f.removeChild(s), b.support.appendChecked || b.grep(Ot(d, "input"), Bt), h = 0;
while (o = d[h++]) if ((!r || -1 === b.inArray(o, r)) && (a = b.contains(o.ownerDocument, o), s = Ot(f.appendChild(o), "script"), a && Mt(s), n)) {
i = 0;
while (o = s[i++]) kt.test(o.type || "") && n.push(o)
}
return s = null, f
}, cleanData: function (e, t) {
var n, r, o, a, s = 0, u = b.expando, l = b.cache, p = b.support.deleteExpando, f = b.event.special;
for (; null != (n = e[s]); s++) if ((t || b.acceptData(n)) && (o = n[u], a = o && l[o])) {
if (a.events) for (r in a.events) f[r] ? b.event.remove(n, r) : b.removeEvent(n, r, a.handle);
l[o] && (delete l[o], p ? delete n[u] : typeof n.removeAttribute !== i ? n.removeAttribute(u) : n[u] = null, c.push(o))
}
}
});
var Pt, Rt, Wt, $t = /alpha\([^)]*\)/i, It = /opacity\s*=\s*([^)]*)/, zt = /^(top|right|bottom|left)$/,
Xt = /^(none|table(?!-c[ea]).+)/, Ut = /^margin/, Vt = RegExp("^(" + x + ")(.*)$", "i"),
Yt = RegExp("^(" + x + ")(?!px)[a-z%]+$", "i"), Jt = RegExp("^([+-])=(" + x + ")", "i"), Gt = {BODY: "block"},
Qt = {position: "absolute", visibility: "hidden", display: "block"}, Kt = {letterSpacing: 0, fontWeight: 400},
Zt = ["Top", "Right", "Bottom", "Left"], en = ["Webkit", "O", "Moz", "ms"];
function tn(e, t) {
if (t in e) return t;
var n = t.charAt(0).toUpperCase() + t.slice(1), r = t, i = en.length;
while (i--) if (t = en[i] + n, t in e) return t;
return r
}
function nn(e, t) {
return e = t || e, "none" === b.css(e, "display") || !b.contains(e.ownerDocument, e)
}
function rn(e, t) {
var n, r, i, o = [], a = 0, s = e.length;
for (; s > a; a++) r = e[a], r.style && (o[a] = b._data(r, "olddisplay"), n = r.style.display, t ? (o[a] || "none" !== n || (r.style.display = ""), "" === r.style.display && nn(r) && (o[a] = b._data(r, "olddisplay", un(r.nodeName)))) : o[a] || (i = nn(r), (n && "none" !== n || !i) && b._data(r, "olddisplay", i ? n : b.css(r, "display"))));
for (a = 0; s > a; a++) r = e[a], r.style && (t && "none" !== r.style.display && "" !== r.style.display || (r.style.display = t ? o[a] || "" : "none"));
return e
}
b.fn.extend({
css: function (e, n) {
return b.access(this, function (e, n, r) {
var i, o, a = {}, s = 0;
if (b.isArray(n)) {
for (o = Rt(e), i = n.length; i > s; s++) a[n[s]] = b.css(e, n[s], !1, o);
return a
}
return r !== t ? b.style(e, n, r) : b.css(e, n)
}, e, n, arguments.length > 1)
}, show: function () {
return rn(this, !0)
}, hide: function () {
return rn(this)
}, toggle: function (e) {
var t = "boolean" == typeof e;
return this.each(function () {
(t ? e : nn(this)) ? b(this).show() : b(this).hide()
})
}
}), b.extend({
cssHooks: {
opacity: {
get: function (e, t) {
if (t) {
var n = Wt(e, "opacity");
return "" === n ? "1" : n
}
}
}
},
cssNumber: {
columnCount: !0,
fillOpacity: !0,
fontWeight: !0,
lineHeight: !0,
opacity: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
},
cssProps: {"float": b.support.cssFloat ? "cssFloat" : "styleFloat"},
style: function (e, n, r, i) {
if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
var o, a, s, u = b.camelCase(n), l = e.style;
if (n = b.cssProps[u] || (b.cssProps[u] = tn(l, u)), s = b.cssHooks[n] || b.cssHooks[u], r === t) return s && "get" in s && (o = s.get(e, !1, i)) !== t ? o : l[n];
if (a = typeof r, "string" === a && (o = Jt.exec(r)) && (r = (o[1] + 1) * o[2] + parseFloat(b.css(e, n)), a = "number"), !(null == r || "number" === a && isNaN(r) || ("number" !== a || b.cssNumber[u] || (r += "px"), b.support.clearCloneStyle || "" !== r || 0 !== n.indexOf("background") || (l[n] = "inherit"), s && "set" in s && (r = s.set(e, r, i)) === t))) try {
l[n] = r
} catch (c) {
}
}
},
css: function (e, n, r, i) {
var o, a, s, u = b.camelCase(n);
return n = b.cssProps[u] || (b.cssProps[u] = tn(e.style, u)), s = b.cssHooks[n] || b.cssHooks[u], s && "get" in s && (a = s.get(e, !0, r)), a === t && (a = Wt(e, n, i)), "normal" === a && n in Kt && (a = Kt[n]), "" === r || r ? (o = parseFloat(a), r === !0 || b.isNumeric(o) ? o || 0 : a) : a
},
swap: function (e, t, n, r) {
var i, o, a = {};
for (o in t) a[o] = e.style[o], e.style[o] = t[o];
i = n.apply(e, r || []);
for (o in t) e.style[o] = a[o];
return i
}
}), e.getComputedStyle ? (Rt = function (t) {
return e.getComputedStyle(t, null)
}, Wt = function (e, n, r) {
var i, o, a, s = r || Rt(e), u = s ? s.getPropertyValue(n) || s[n] : t, l = e.style;
return s && ("" !== u || b.contains(e.ownerDocument, e) || (u = b.style(e, n)), Yt.test(u) && Ut.test(n) && (i = l.width, o = l.minWidth, a = l.maxWidth, l.minWidth = l.maxWidth = l.width = u, u = s.width, l.width = i, l.minWidth = o, l.maxWidth = a)), u
}) : o.documentElement.currentStyle && (Rt = function (e) {
return e.currentStyle
}, Wt = function (e, n, r) {
var i, o, a, s = r || Rt(e), u = s ? s[n] : t, l = e.style;
return null == u && l && l[n] && (u = l[n]), Yt.test(u) && !zt.test(n) && (i = l.left, o = e.runtimeStyle, a = o && o.left, a && (o.left = e.currentStyle.left), l.left = "fontSize" === n ? "1em" : u, u = l.pixelLeft + "px", l.left = i, a && (o.left = a)), "" === u ? "auto" : u
});
function on(e, t, n) {
var r = Vt.exec(t);
return r ? Math.max(0, r[1] - (n || 0)) + (r[2] || "px") : t
}
function an(e, t, n, r, i) {
var o = n === (r ? "border" : "content") ? 4 : "width" === t ? 1 : 0, a = 0;
for (; 4 > o; o += 2) "margin" === n && (a += b.css(e, n + Zt[o], !0, i)), r ? ("content" === n && (a -= b.css(e, "padding" + Zt[o], !0, i)), "margin" !== n && (a -= b.css(e, "border" + Zt[o] + "Width", !0, i))) : (a += b.css(e, "padding" + Zt[o], !0, i), "padding" !== n && (a += b.css(e, "border" + Zt[o] + "Width", !0, i)));
return a
}
function sn(e, t, n) {
var r = !0, i = "width" === t ? e.offsetWidth : e.offsetHeight, o = Rt(e),
a = b.support.boxSizing && "border-box" === b.css(e, "boxSizing", !1, o);
if (0 >= i || null == i) {
if (i = Wt(e, t, o), (0 > i || null == i) && (i = e.style[t]), Yt.test(i)) return i;
r = a && (b.support.boxSizingReliable || i === e.style[t]), i = parseFloat(i) || 0
}
return i + an(e, t, n || (a ? "border" : "content"), r, o) + "px"
}
function un(e) {
var t = o, n = Gt[e];
return n || (n = ln(e, t), "none" !== n && n || (Pt = (Pt || b("").css("cssText", "display:block !important")).appendTo(t.documentElement), t = (Pt[0].contentWindow || Pt[0].contentDocument).document, t.write(""), t.close(), n = ln(e, t), Pt.detach()), Gt[e] = n), n
}
function ln(e, t) {
var n = b(t.createElement(e)).appendTo(t.body), r = b.css(n[0], "display");
return n.remove(), r
}
b.each(["height", "width"], function (e, n) {
b.cssHooks[n] = {
get: function (e, r, i) {
return r ? 0 === e.offsetWidth && Xt.test(b.css(e, "display")) ? b.swap(e, Qt, function () {
return sn(e, n, i)
}) : sn(e, n, i) : t
}, set: function (e, t, r) {
var i = r && Rt(e);
return on(e, t, r ? an(e, n, r, b.support.boxSizing && "border-box" === b.css(e, "boxSizing", !1, i), i) : 0)
}
}
}), b.support.opacity || (b.cssHooks.opacity = {
get: function (e, t) {
return It.test((t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : t ? "1" : ""
}, set: function (e, t) {
var n = e.style, r = e.currentStyle, i = b.isNumeric(t) ? "alpha(opacity=" + 100 * t + ")" : "",
o = r && r.filter || n.filter || "";
n.zoom = 1, (t >= 1 || "" === t) && "" === b.trim(o.replace($t, "")) && n.removeAttribute && (n.removeAttribute("filter"), "" === t || r && !r.filter) || (n.filter = $t.test(o) ? o.replace($t, i) : o + " " + i)
}
}), b(function () {
b.support.reliableMarginRight || (b.cssHooks.marginRight = {
get: function (e, n) {
return n ? b.swap(e, {display: "inline-block"}, Wt, [e, "marginRight"]) : t
}
}), !b.support.pixelPosition && b.fn.position && b.each(["top", "left"], function (e, n) {
b.cssHooks[n] = {
get: function (e, r) {
return r ? (r = Wt(e, n), Yt.test(r) ? b(e).position()[n] + "px" : r) : t
}
}
})
}), b.expr && b.expr.filters && (b.expr.filters.hidden = function (e) {
return 0 >= e.offsetWidth && 0 >= e.offsetHeight || !b.support.reliableHiddenOffsets && "none" === (e.style && e.style.display || b.css(e, "display"))
}, b.expr.filters.visible = function (e) {
return !b.expr.filters.hidden(e)
}), b.each({margin: "", padding: "", border: "Width"}, function (e, t) {
b.cssHooks[e + t] = {
expand: function (n) {
var r = 0, i = {}, o = "string" == typeof n ? n.split(" ") : [n];
for (; 4 > r; r++) i[e + Zt[r] + t] = o[r] || o[r - 2] || o[0];
return i
}
}, Ut.test(e) || (b.cssHooks[e + t].set = on)
});
var cn = /%20/g, pn = /\[\]$/, fn = /\r?\n/g, dn = /^(?:submit|button|image|reset|file)$/i,
hn = /^(?:input|select|textarea|keygen)/i;
b.fn.extend({
serialize: function () {
return b.param(this.serializeArray())
}, serializeArray: function () {
return this.map(function () {
var e = b.prop(this, "elements");
return e ? b.makeArray(e) : this
}).filter(function () {
var e = this.type;
return this.name && !b(this).is(":disabled") && hn.test(this.nodeName) && !dn.test(e) && (this.checked || !Nt.test(e))
}).map(function (e, t) {
var n = b(this).val();
return null == n ? null : b.isArray(n) ? b.map(n, function (e) {
return {name: t.name, value: e.replace(fn, "\r\n")}
}) : {name: t.name, value: n.replace(fn, "\r\n")}
}).get()
}
}), b.param = function (e, n) {
var r, i = [], o = function (e, t) {
t = b.isFunction(t) ? t() : null == t ? "" : t, i[i.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t)
};
if (n === t && (n = b.ajaxSettings && b.ajaxSettings.traditional), b.isArray(e) || e.jquery && !b.isPlainObject(e)) b.each(e, function () {
o(this.name, this.value)
}); else for (r in e) gn(r, e[r], n, o);
return i.join("&").replace(cn, "+")
};
function gn(e, t, n, r) {
var i;
if (b.isArray(t)) b.each(t, function (t, i) {
n || pn.test(e) ? r(e, i) : gn(e + "[" + ("object" == typeof i ? t : "") + "]", i, n, r)
}); else if (n || "object" !== b.type(t)) r(e, t); else for (i in t) gn(e + "[" + i + "]", t[i], n, r)
}
b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (e, t) {
b.fn[t] = function (e, n) {
return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t)
}
}), b.fn.hover = function (e, t) {
return this.mouseenter(e).mouseleave(t || e)
};
var mn, yn, vn = b.now(), bn = /\?/, xn = /#.*$/, wn = /([?&])_=[^&]*/, Tn = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
Nn = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, Cn = /^(?:GET|HEAD)$/, kn = /^\/\//,
En = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, Sn = b.fn.load, An = {}, jn = {}, Dn = "*/".concat("*");
try {
yn = a.href
} catch (Ln) {
yn = o.createElement("a"), yn.href = "", yn = yn.href
}
mn = En.exec(yn.toLowerCase()) || [];
function Hn(e) {
return function (t, n) {
"string" != typeof t && (n = t, t = "*");
var r, i = 0, o = t.toLowerCase().match(w) || [];
if (b.isFunction(n)) while (r = o[i++]) "+" === r[0] ? (r = r.slice(1) || "*", (e[r] = e[r] || []).unshift(n)) : (e[r] = e[r] || []).push(n)
}
}
function qn(e, n, r, i) {
var o = {}, a = e === jn;
function s(u) {
var l;
return o[u] = !0, b.each(e[u] || [], function (e, u) {
var c = u(n, r, i);
return "string" != typeof c || a || o[c] ? a ? !(l = c) : t : (n.dataTypes.unshift(c), s(c), !1)
}), l
}
return s(n.dataTypes[0]) || !o["*"] && s("*")
}
function Mn(e, n) {
var r, i, o = b.ajaxSettings.flatOptions || {};
for (i in n) n[i] !== t && ((o[i] ? e : r || (r = {}))[i] = n[i]);
return r && b.extend(!0, e, r), e
}
b.fn.load = function (e, n, r) {
if ("string" != typeof e && Sn) return Sn.apply(this, arguments);
var i, o, a, s = this, u = e.indexOf(" ");
return u >= 0 && (i = e.slice(u, e.length), e = e.slice(0, u)), b.isFunction(n) ? (r = n, n = t) : n && "object" == typeof n && (a = "POST"), s.length > 0 && b.ajax({
url: e,
type: a,
dataType: "html",
data: n
}).done(function (e) {
o = arguments, s.html(i ? b("
").append(b.parseHTML(e)).find(i) : e)
}).complete(r && function (e, t) {
s.each(r, o || [e.responseText, t, e])
}), this
}, b.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (e, t) {
b.fn[t] = function (e) {
return this.on(t, e)
}
}), b.each(["get", "post"], function (e, n) {
b[n] = function (e, r, i, o) {
return b.isFunction(r) && (o = o || i, i = r, r = t), b.ajax({
url: e,
type: n,
dataType: o,
data: r,
success: i
})
}
}), b.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: yn,
type: "GET",
isLocal: Nn.test(mn[1]),
global: !0,
processData: !0,
async: !0,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": Dn,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {xml: /xml/, html: /html/, json: /json/},
responseFields: {xml: "responseXML", text: "responseText"},
converters: {"* text": e.String, "text html": !0, "text json": b.parseJSON, "text xml": b.parseXML},
flatOptions: {url: !0, context: !0}
},
ajaxSetup: function (e, t) {
return t ? Mn(Mn(e, b.ajaxSettings), t) : Mn(b.ajaxSettings, e)
},
ajaxPrefilter: Hn(An),
ajaxTransport: Hn(jn),
ajax: function (e, n) {
"object" == typeof e && (n = e, e = t), n = n || {};
var r, i, o, a, s, u, l, c, p = b.ajaxSetup({}, n), f = p.context || p,
d = p.context && (f.nodeType || f.jquery) ? b(f) : b.event, h = b.Deferred(),
g = b.Callbacks("once memory"), m = p.statusCode || {}, y = {}, v = {}, x = 0, T = "canceled", N = {
readyState: 0, getResponseHeader: function (e) {
var t;
if (2 === x) {
if (!c) {
c = {};
while (t = Tn.exec(a)) c[t[1].toLowerCase()] = t[2]
}
t = c[e.toLowerCase()]
}
return null == t ? null : t
}, getAllResponseHeaders: function () {
return 2 === x ? a : null
}, setRequestHeader: function (e, t) {
var n = e.toLowerCase();
return x || (e = v[n] = v[n] || e, y[e] = t), this
}, overrideMimeType: function (e) {
return x || (p.mimeType = e), this
}, statusCode: function (e) {
var t;
if (e) if (2 > x) for (t in e) m[t] = [m[t], e[t]]; else N.always(e[N.status]);
return this
}, abort: function (e) {
var t = e || T;
return l && l.abort(t), k(0, t), this
}
};
if (h.promise(N).complete = g.add, N.success = N.done, N.error = N.fail, p.url = ((e || p.url || yn) + "").replace(xn, "").replace(kn, mn[1] + "//"), p.type = n.method || n.type || p.method || p.type, p.dataTypes = b.trim(p.dataType || "*").toLowerCase().match(w) || [""], null == p.crossDomain && (r = En.exec(p.url.toLowerCase()), p.crossDomain = !(!r || r[1] === mn[1] && r[2] === mn[2] && (r[3] || ("http:" === r[1] ? 80 : 443)) == (mn[3] || ("http:" === mn[1] ? 80 : 443)))), p.data && p.processData && "string" != typeof p.data && (p.data = b.param(p.data, p.traditional)), qn(An, p, n, N), 2 === x) return N;
u = p.global, u && 0 === b.active++ && b.event.trigger("ajaxStart"), p.type = p.type.toUpperCase(), p.hasContent = !Cn.test(p.type), o = p.url, p.hasContent || (p.data && (o = p.url += (bn.test(o) ? "&" : "?") + p.data, delete p.data), p.cache === !1 && (p.url = wn.test(o) ? o.replace(wn, "$1_=" + vn++) : o + (bn.test(o) ? "&" : "?") + "_=" + vn++)), p.ifModified && (b.lastModified[o] && N.setRequestHeader("If-Modified-Since", b.lastModified[o]), b.etag[o] && N.setRequestHeader("If-None-Match", b.etag[o])), (p.data && p.hasContent && p.contentType !== !1 || n.contentType) && N.setRequestHeader("Content-Type", p.contentType), N.setRequestHeader("Accept", p.dataTypes[0] && p.accepts[p.dataTypes[0]] ? p.accepts[p.dataTypes[0]] + ("*" !== p.dataTypes[0] ? ", " + Dn + "; q=0.01" : "") : p.accepts["*"]);
for (i in p.headers) N.setRequestHeader(i, p.headers[i]);
if (p.beforeSend && (p.beforeSend.call(f, N, p) === !1 || 2 === x)) return N.abort();
T = "abort";
for (i in{success: 1, error: 1, complete: 1}) N[i](p[i]);
if (l = qn(jn, p, n, N)) {
N.readyState = 1, u && d.trigger("ajaxSend", [N, p]), p.async && p.timeout > 0 && (s = setTimeout(function () {
N.abort("timeout")
}, p.timeout));
try {
x = 1, l.send(y, k)
} catch (C) {
if (!(2 > x)) throw C;
k(-1, C)
}
} else k(-1, "No Transport");
function k(e, n, r, i) {
var c, y, v, w, T, C = n;
2 !== x && (x = 2, s && clearTimeout(s), l = t, a = i || "", N.readyState = e > 0 ? 4 : 0, r && (w = _n(p, N, r)), e >= 200 && 300 > e || 304 === e ? (p.ifModified && (T = N.getResponseHeader("Last-Modified"), T && (b.lastModified[o] = T), T = N.getResponseHeader("etag"), T && (b.etag[o] = T)), 204 === e ? (c = !0, C = "nocontent") : 304 === e ? (c = !0, C = "notmodified") : (c = Fn(p, w), C = c.state, y = c.data, v = c.error, c = !v)) : (v = C, (e || !C) && (C = "error", 0 > e && (e = 0))), N.status = e, N.statusText = (n || C) + "", c ? h.resolveWith(f, [y, C, N]) : h.rejectWith(f, [N, C, v]), N.statusCode(m), m = t, u && d.trigger(c ? "ajaxSuccess" : "ajaxError", [N, p, c ? y : v]), g.fireWith(f, [N, C]), u && (d.trigger("ajaxComplete", [N, p]), --b.active || b.event.trigger("ajaxStop")))
}
return N
},
getScript: function (e, n) {
return b.get(e, t, n, "script")
},
getJSON: function (e, t, n) {
return b.get(e, t, n, "json")
}
});
function _n(e, n, r) {
var i, o, a, s, u = e.contents, l = e.dataTypes, c = e.responseFields;
for (s in c) s in r && (n[c[s]] = r[s]);
while ("*" === l[0]) l.shift(), o === t && (o = e.mimeType || n.getResponseHeader("Content-Type"));
if (o) for (s in u) if (u[s] && u[s].test(o)) {
l.unshift(s);
break
}
if (l[0] in r) a = l[0]; else {
for (s in r) {
if (!l[0] || e.converters[s + " " + l[0]]) {
a = s;
break
}
i || (i = s)
}
a = a || i
}
return a ? (a !== l[0] && l.unshift(a), r[a]) : t
}
function Fn(e, t) {
var n, r, i, o, a = {}, s = 0, u = e.dataTypes.slice(), l = u[0];
if (e.dataFilter && (t = e.dataFilter(t, e.dataType)), u[1]) for (i in e.converters) a[i.toLowerCase()] = e.converters[i];
for (; r = u[++s];) if ("*" !== r) {
if ("*" !== l && l !== r) {
if (i = a[l + " " + r] || a["* " + r], !i) for (n in a) if (o = n.split(" "), o[1] === r && (i = a[l + " " + o[0]] || a["* " + o[0]])) {
i === !0 ? i = a[n] : a[n] !== !0 && (r = o[0], u.splice(s--, 0, r));
break
}
if (i !== !0) if (i && e["throws"]) t = i(t); else try {
t = i(t)
} catch (c) {
return {state: "parsererror", error: i ? c : "No conversion from " + l + " to " + r}
}
}
l = r
}
return {state: "success", data: t}
}
b.ajaxSetup({
accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents: {script: /(?:java|ecma)script/},
converters: {
"text script": function (e) {
return b.globalEval(e), e
}
}
}), b.ajaxPrefilter("script", function (e) {
e.cache === t && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1)
}), b.ajaxTransport("script", function (e) {
if (e.crossDomain) {
var n, r = o.head || b("head")[0] || o.documentElement;
return {
send: function (t, i) {
n = o.createElement("script"), n.async = !0, e.scriptCharset && (n.charset = e.scriptCharset), n.src = e.url, n.onload = n.onreadystatechange = function (e, t) {
(t || !n.readyState || /loaded|complete/.test(n.readyState)) && (n.onload = n.onreadystatechange = null, n.parentNode && n.parentNode.removeChild(n), n = null, t || i(200, "success"))
}, r.insertBefore(n, r.firstChild)
}, abort: function () {
n && n.onload(t, !0)
}
}
}
});
var On = [], Bn = /(=)\?(?=&|$)|\?\?/;
b.ajaxSetup({
jsonp: "callback", jsonpCallback: function () {
var e = On.pop() || b.expando + "_" + vn++;
return this[e] = !0, e
}
}), b.ajaxPrefilter("json jsonp", function (n, r, i) {
var o, a, s,
u = n.jsonp !== !1 && (Bn.test(n.url) ? "url" : "string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && Bn.test(n.data) && "data");
return u || "jsonp" === n.dataTypes[0] ? (o = n.jsonpCallback = b.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, u ? n[u] = n[u].replace(Bn, "$1" + o) : n.jsonp !== !1 && (n.url += (bn.test(n.url) ? "&" : "?") + n.jsonp + "=" + o), n.converters["script json"] = function () {
return s || b.error(o + " was not called"), s[0]
}, n.dataTypes[0] = "json", a = e[o], e[o] = function () {
s = arguments
}, i.always(function () {
e[o] = a, n[o] && (n.jsonpCallback = r.jsonpCallback, On.push(o)), s && b.isFunction(a) && a(s[0]), s = a = t
}), "script") : t
});
var Pn, Rn, Wn = 0, $n = e.ActiveXObject && function () {
var e;
for (e in Pn) Pn[e](t, !0)
};
function In() {
try {
return new e.XMLHttpRequest
} catch (t) {
}
}
function zn() {
try {
return new e.ActiveXObject("Microsoft.XMLHTTP")
} catch (t) {
}
}
b.ajaxSettings.xhr = e.ActiveXObject ? function () {
return !this.isLocal && In() || zn()
} : In, Rn = b.ajaxSettings.xhr(), b.support.cors = !!Rn && "withCredentials" in Rn, Rn = b.support.ajax = !!Rn, Rn && b.ajaxTransport(function (n) {
if (!n.crossDomain || b.support.cors) {
var r;
return {
send: function (i, o) {
var a, s, u = n.xhr();
if (n.username ? u.open(n.type, n.url, n.async, n.username, n.password) : u.open(n.type, n.url, n.async), n.xhrFields) for (s in n.xhrFields) u[s] = n.xhrFields[s];
n.mimeType && u.overrideMimeType && u.overrideMimeType(n.mimeType), n.crossDomain || i["X-Requested-With"] || (i["X-Requested-With"] = "XMLHttpRequest");
try {
for (s in i) u.setRequestHeader(s, i[s])
} catch (l) {
}
u.send(n.hasContent && n.data || null), r = function (e, i) {
var s, l, c, p;
try {
if (r && (i || 4 === u.readyState)) if (r = t, a && (u.onreadystatechange = b.noop, $n && delete Pn[a]), i) 4 !== u.readyState && u.abort(); else {
p = {}, s = u.status, l = u.getAllResponseHeaders(), "string" == typeof u.responseText && (p.text = u.responseText);
try {
c = u.statusText
} catch (f) {
c = ""
}
s || !n.isLocal || n.crossDomain ? 1223 === s && (s = 204) : s = p.text ? 200 : 404
}
} catch (d) {
i || o(-1, d)
}
p && o(s, c, p, l)
}, n.async ? 4 === u.readyState ? setTimeout(r) : (a = ++Wn, $n && (Pn || (Pn = {}, b(e).unload($n)), Pn[a] = r), u.onreadystatechange = r) : r()
}, abort: function () {
r && r(t, !0)
}
}
}
});
var Xn, Un, Vn = /^(?:toggle|show|hide)$/, Yn = RegExp("^(?:([+-])=|)(" + x + ")([a-z%]*)$", "i"),
Jn = /queueHooks$/, Gn = [nr], Qn = {
"*": [function (e, t) {
var n, r, i = this.createTween(e, t), o = Yn.exec(t), a = i.cur(), s = +a || 0, u = 1, l = 20;
if (o) {
if (n = +o[2], r = o[3] || (b.cssNumber[e] ? "" : "px"), "px" !== r && s) {
s = b.css(i.elem, e, !0) || n || 1;
do u = u || ".5", s /= u, b.style(i.elem, e, s + r); while (u !== (u = i.cur() / a) && 1 !== u && --l)
}
i.unit = r, i.start = s, i.end = o[1] ? s + (o[1] + 1) * n : n
}
return i
}]
};
function Kn() {
return setTimeout(function () {
Xn = t
}), Xn = b.now()
}
function Zn(e, t) {
b.each(t, function (t, n) {
var r = (Qn[t] || []).concat(Qn["*"]), i = 0, o = r.length;
for (; o > i; i++) if (r[i].call(e, t, n)) return
})
}
function er(e, t, n) {
var r, i, o = 0, a = Gn.length, s = b.Deferred().always(function () {
delete u.elem
}), u = function () {
if (i) return !1;
var t = Xn || Kn(), n = Math.max(0, l.startTime + l.duration - t), r = n / l.duration || 0, o = 1 - r,
a = 0, u = l.tweens.length;
for (; u > a; a++) l.tweens[a].run(o);
return s.notifyWith(e, [l, o, n]), 1 > o && u ? n : (s.resolveWith(e, [l]), !1)
}, l = s.promise({
elem: e,
props: b.extend({}, t),
opts: b.extend(!0, {specialEasing: {}}, n),
originalProperties: t,
originalOptions: n,
startTime: Xn || Kn(),
duration: n.duration,
tweens: [],
createTween: function (t, n) {
var r = b.Tween(e, l.opts, t, n, l.opts.specialEasing[t] || l.opts.easing);
return l.tweens.push(r), r
},
stop: function (t) {
var n = 0, r = t ? l.tweens.length : 0;
if (i) return this;
for (i = !0; r > n; n++) l.tweens[n].run(1);
return t ? s.resolveWith(e, [l, t]) : s.rejectWith(e, [l, t]), this
}
}), c = l.props;
for (tr(c, l.opts.specialEasing); a > o; o++) if (r = Gn[o].call(l, e, c, l.opts)) return r;
return Zn(l, c), b.isFunction(l.opts.start) && l.opts.start.call(e, l), b.fx.timer(b.extend(u, {
elem: e,
anim: l,
queue: l.opts.queue
})), l.progress(l.opts.progress).done(l.opts.done, l.opts.complete).fail(l.opts.fail).always(l.opts.always)
}
function tr(e, t) {
var n, r, i, o, a;
for (i in e) if (r = b.camelCase(i), o = t[r], n = e[i], b.isArray(n) && (o = n[1], n = e[i] = n[0]), i !== r && (e[r] = n, delete e[i]), a = b.cssHooks[r], a && "expand" in a) {
n = a.expand(n), delete e[r];
for (i in n) i in e || (e[i] = n[i], t[i] = o)
} else t[r] = o
}
b.Animation = b.extend(er, {
tweener: function (e, t) {
b.isFunction(e) ? (t = e, e = ["*"]) : e = e.split(" ");
var n, r = 0, i = e.length;
for (; i > r; r++) n = e[r], Qn[n] = Qn[n] || [], Qn[n].unshift(t)
}, prefilter: function (e, t) {
t ? Gn.unshift(e) : Gn.push(e)
}
});
function nr(e, t, n) {
var r, i, o, a, s, u, l, c, p, f = this, d = e.style, h = {}, g = [], m = e.nodeType && nn(e);
n.queue || (c = b._queueHooks(e, "fx"), null == c.unqueued && (c.unqueued = 0, p = c.empty.fire, c.empty.fire = function () {
c.unqueued || p()
}), c.unqueued++, f.always(function () {
f.always(function () {
c.unqueued--, b.queue(e, "fx").length || c.empty.fire()
})
})), 1 === e.nodeType && ("height" in t || "width" in t) && (n.overflow = [d.overflow, d.overflowX, d.overflowY], "inline" === b.css(e, "display") && "none" === b.css(e, "float") && (b.support.inlineBlockNeedsLayout && "inline" !== un(e.nodeName) ? d.zoom = 1 : d.display = "inline-block")), n.overflow && (d.overflow = "hidden", b.support.shrinkWrapBlocks || f.always(function () {
d.overflow = n.overflow[0], d.overflowX = n.overflow[1], d.overflowY = n.overflow[2]
}));
for (i in t) if (a = t[i], Vn.exec(a)) {
if (delete t[i], u = u || "toggle" === a, a === (m ? "hide" : "show")) continue;
g.push(i)
}
if (o = g.length) {
s = b._data(e, "fxshow") || b._data(e, "fxshow", {}), "hidden" in s && (m = s.hidden), u && (s.hidden = !m), m ? b(e).show() : f.done(function () {
b(e).hide()
}), f.done(function () {
var t;
b._removeData(e, "fxshow");
for (t in h) b.style(e, t, h[t])
});
for (i = 0; o > i; i++) r = g[i], l = f.createTween(r, m ? s[r] : 0), h[r] = s[r] || b.style(e, r), r in s || (s[r] = l.start, m && (l.end = l.start, l.start = "width" === r || "height" === r ? 1 : 0))
}
}
function rr(e, t, n, r, i) {
return new rr.prototype.init(e, t, n, r, i)
}
b.Tween = rr, rr.prototype = {
constructor: rr, init: function (e, t, n, r, i, o) {
this.elem = e, this.prop = n, this.easing = i || "swing", this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (b.cssNumber[n] ? "" : "px")
}, cur: function () {
var e = rr.propHooks[this.prop];
return e && e.get ? e.get(this) : rr.propHooks._default.get(this)
}, run: function (e) {
var t, n = rr.propHooks[this.prop];
return this.pos = t = this.options.duration ? b.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : rr.propHooks._default.set(this), this
}
}, rr.prototype.init.prototype = rr.prototype, rr.propHooks = {
_default: {
get: function (e) {
var t;
return null == e.elem[e.prop] || e.elem.style && null != e.elem.style[e.prop] ? (t = b.css(e.elem, e.prop, ""), t && "auto" !== t ? t : 0) : e.elem[e.prop]
}, set: function (e) {
b.fx.step[e.prop] ? b.fx.step[e.prop](e) : e.elem.style && (null != e.elem.style[b.cssProps[e.prop]] || b.cssHooks[e.prop]) ? b.style(e.elem, e.prop, e.now + e.unit) : e.elem[e.prop] = e.now
}
}
}, rr.propHooks.scrollTop = rr.propHooks.scrollLeft = {
set: function (e) {
e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now)
}
}, b.each(["toggle", "show", "hide"], function (e, t) {
var n = b.fn[t];
b.fn[t] = function (e, r, i) {
return null == e || "boolean" == typeof e ? n.apply(this, arguments) : this.animate(ir(t, !0), e, r, i)
}
}), b.fn.extend({
fadeTo: function (e, t, n, r) {
return this.filter(nn).css("opacity", 0).show().end().animate({opacity: t}, e, n, r)
}, animate: function (e, t, n, r) {
var i = b.isEmptyObject(e), o = b.speed(t, n, r), a = function () {
var t = er(this, b.extend({}, e), o);
a.finish = function () {
t.stop(!0)
}, (i || b._data(this, "finish")) && t.stop(!0)
};
return a.finish = a, i || o.queue === !1 ? this.each(a) : this.queue(o.queue, a)
}, stop: function (e, n, r) {
var i = function (e) {
var t = e.stop;
delete e.stop, t(r)
};
return "string" != typeof e && (r = n, n = e, e = t), n && e !== !1 && this.queue(e || "fx", []), this.each(function () {
var t = !0, n = null != e && e + "queueHooks", o = b.timers, a = b._data(this);
if (n) a[n] && a[n].stop && i(a[n]); else for (n in a) a[n] && a[n].stop && Jn.test(n) && i(a[n]);
for (n = o.length; n--;) o[n].elem !== this || null != e && o[n].queue !== e || (o[n].anim.stop(r), t = !1, o.splice(n, 1));
(t || !r) && b.dequeue(this, e)
})
}, finish: function (e) {
return e !== !1 && (e = e || "fx"), this.each(function () {
var t, n = b._data(this), r = n[e + "queue"], i = n[e + "queueHooks"], o = b.timers,
a = r ? r.length : 0;
for (n.finish = !0, b.queue(this, e, []), i && i.cur && i.cur.finish && i.cur.finish.call(this), t = o.length; t--;) o[t].elem === this && o[t].queue === e && (o[t].anim.stop(!0), o.splice(t, 1));
for (t = 0; a > t; t++) r[t] && r[t].finish && r[t].finish.call(this);
delete n.finish
})
}
});
function ir(e, t) {
var n, r = {height: e}, i = 0;
for (t = t ? 1 : 0; 4 > i; i += 2 - t) n = Zt[i], r["margin" + n] = r["padding" + n] = e;
return t && (r.opacity = r.width = e), r
}
b.each({
slideDown: ir("show"),
slideUp: ir("hide"),
slideToggle: ir("toggle"),
fadeIn: {opacity: "show"},
fadeOut: {opacity: "hide"},
fadeToggle: {opacity: "toggle"}
}, function (e, t) {
b.fn[e] = function (e, n, r) {
return this.animate(t, e, n, r)
}
}), b.speed = function (e, t, n) {
var r = e && "object" == typeof e ? b.extend({}, e) : {
complete: n || !n && t || b.isFunction(e) && e,
duration: e,
easing: n && t || t && !b.isFunction(t) && t
};
return r.duration = b.fx.off ? 0 : "number" == typeof r.duration ? r.duration : r.duration in b.fx.speeds ? b.fx.speeds[r.duration] : b.fx.speeds._default, (null == r.queue || r.queue === !0) && (r.queue = "fx"), r.old = r.complete, r.complete = function () {
b.isFunction(r.old) && r.old.call(this), r.queue && b.dequeue(this, r.queue)
}, r
}, b.easing = {
linear: function (e) {
return e
}, swing: function (e) {
return .5 - Math.cos(e * Math.PI) / 2
}
}, b.timers = [], b.fx = rr.prototype.init, b.fx.tick = function () {
var e, n = b.timers, r = 0;
for (Xn = b.now(); n.length > r; r++) e = n[r], e() || n[r] !== e || n.splice(r--, 1);
n.length || b.fx.stop(), Xn = t
}, b.fx.timer = function (e) {
e() && b.timers.push(e) && b.fx.start()
}, b.fx.interval = 13, b.fx.start = function () {
Un || (Un = setInterval(b.fx.tick, b.fx.interval))
}, b.fx.stop = function () {
clearInterval(Un), Un = null
}, b.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
}, b.fx.step = {}, b.expr && b.expr.filters && (b.expr.filters.animated = function (e) {
return b.grep(b.timers, function (t) {
return e === t.elem
}).length
}), b.fn.offset = function (e) {
if (arguments.length) return e === t ? this : this.each(function (t) {
b.offset.setOffset(this, e, t)
});
var n, r, o = {top: 0, left: 0}, a = this[0], s = a && a.ownerDocument;
if (s) return n = s.documentElement, b.contains(n, a) ? (typeof a.getBoundingClientRect !== i && (o = a.getBoundingClientRect()), r = or(s), {
top: o.top + (r.pageYOffset || n.scrollTop) - (n.clientTop || 0),
left: o.left + (r.pageXOffset || n.scrollLeft) - (n.clientLeft || 0)
}) : o
}, b.offset = {
setOffset: function (e, t, n) {
var r = b.css(e, "position");
"static" === r && (e.style.position = "relative");
var i = b(e), o = i.offset(), a = b.css(e, "top"), s = b.css(e, "left"),
u = ("absolute" === r || "fixed" === r) && b.inArray("auto", [a, s]) > -1, l = {}, c = {}, p, f;
u ? (c = i.position(), p = c.top, f = c.left) : (p = parseFloat(a) || 0, f = parseFloat(s) || 0), b.isFunction(t) && (t = t.call(e, n, o)), null != t.top && (l.top = t.top - o.top + p), null != t.left && (l.left = t.left - o.left + f), "using" in t ? t.using.call(e, l) : i.css(l)
}
}, b.fn.extend({
position: function () {
if (this[0]) {
var e, t, n = {top: 0, left: 0}, r = this[0];
return "fixed" === b.css(r, "position") ? t = r.getBoundingClientRect() : (e = this.offsetParent(), t = this.offset(), b.nodeName(e[0], "html") || (n = e.offset()), n.top += b.css(e[0], "borderTopWidth", !0), n.left += b.css(e[0], "borderLeftWidth", !0)), {
top: t.top - n.top - b.css(r, "marginTop", !0),
left: t.left - n.left - b.css(r, "marginLeft", !0)
}
}
}, offsetParent: function () {
return this.map(function () {
var e = this.offsetParent || o.documentElement;
while (e && !b.nodeName(e, "html") && "static" === b.css(e, "position")) e = e.offsetParent;
return e || o.documentElement
})
}
}), b.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (e, n) {
var r = /Y/.test(n);
b.fn[e] = function (i) {
return b.access(this, function (e, i, o) {
var a = or(e);
return o === t ? a ? n in a ? a[n] : a.document.documentElement[i] : e[i] : (a ? a.scrollTo(r ? b(a).scrollLeft() : o, r ? o : b(a).scrollTop()) : e[i] = o, t)
}, e, i, arguments.length, null)
}
});
function or(e) {
return b.isWindow(e) ? e : 9 === e.nodeType ? e.defaultView || e.parentWindow : !1
}
b.each({Height: "height", Width: "width"}, function (e, n) {
b.each({padding: "inner" + e, content: n, "": "outer" + e}, function (r, i) {
b.fn[i] = function (i, o) {
var a = arguments.length && (r || "boolean" != typeof i),
s = r || (i === !0 || o === !0 ? "margin" : "border");
return b.access(this, function (n, r, i) {
var o;
return b.isWindow(n) ? n.document.documentElement["client" + e] : 9 === n.nodeType ? (o = n.documentElement, Math.max(n.body["scroll" + e], o["scroll" + e], n.body["offset" + e], o["offset" + e], o["client" + e])) : i === t ? b.css(n, r, s) : b.style(n, r, i, s)
}, n, a ? i : t, a, null)
}
})
}), e.jQuery = e.$ = b, "function" == typeof define && define.amd && define.amd.jQuery && define("jquery", [], function () {
return b
})
})(window);
/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute === void 0 && (jQuery.migrateMute = !0), function (e, t, n) {
function r(n) {
var r = t.console;
i[n] || (i[n] = !0, e.migrateWarnings.push(n), r && r.warn && !e.migrateMute && (r.warn("JQMIGRATE: " + n), e.migrateTrace && r.trace && r.trace()))
}
function a(t, a, i, o) {
if (Object.defineProperty) try {
return Object.defineProperty(t, a, {
configurable: !0, enumerable: !0, get: function () {
return r(o), i
}, set: function (e) {
r(o), i = e
}
}), n
} catch (s) {
}
e._definePropertyBroken = !0, t[a] = i
}
var i = {};
e.migrateWarnings = [], !e.migrateMute && t.console && t.console.log && t.console.log("JQMIGRATE: Logging is active"), e.migrateTrace === n && (e.migrateTrace = !0), e.migrateReset = function () {
i = {}, e.migrateWarnings.length = 0
}, "BackCompat" === document.compatMode && r("jQuery is not compatible with Quirks Mode");
var o = e("", {size: 1}).attr("size") && e.attrFn, s = e.attr,
u = e.attrHooks.value && e.attrHooks.value.get || function () {
return null
}, c = e.attrHooks.value && e.attrHooks.value.set || function () {
return n
}, l = /^(?:input|button)$/i, d = /^[238]$/,
p = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
f = /^(?:checked|selected)$/i;
a(e, "attrFn", o || {}, "jQuery.attrFn is deprecated"), e.attr = function (t, a, i, u) {
var c = a.toLowerCase(), g = t && t.nodeType;
return u && (4 > s.length && r("jQuery.fn.attr( props, pass ) is deprecated"), t && !d.test(g) && (o ? a in o : e.isFunction(e.fn[a]))) ? e(t)[a](i) : ("type" === a && i !== n && l.test(t.nodeName) && t.parentNode && r("Can't change the 'type' of an input or button in IE 6/7/8"), !e.attrHooks[c] && p.test(c) && (e.attrHooks[c] = {
get: function (t, r) {
var a, i = e.prop(t, r);
return i === !0 || "boolean" != typeof i && (a = t.getAttributeNode(r)) && a.nodeValue !== !1 ? r.toLowerCase() : n
}, set: function (t, n, r) {
var a;
return n === !1 ? e.removeAttr(t, r) : (a = e.propFix[r] || r, a in t && (t[a] = !0), t.setAttribute(r, r.toLowerCase())), r
}
}, f.test(c) && r("jQuery.fn.attr('" + c + "') may use property instead of attribute")), s.call(e, t, a, i))
}, e.attrHooks.value = {
get: function (e, t) {
var n = (e.nodeName || "").toLowerCase();
return "button" === n ? u.apply(this, arguments) : ("input" !== n && "option" !== n && r("jQuery.fn.attr('value') no longer gets properties"), t in e ? e.value : null)
}, set: function (e, t) {
var a = (e.nodeName || "").toLowerCase();
return "button" === a ? c.apply(this, arguments) : ("input" !== a && "option" !== a && r("jQuery.fn.attr('value', val) no longer sets properties"), e.value = t, n)
}
};
var g, h, v = e.fn.init, m = e.parseJSON, y = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
e.fn.init = function (t, n, a) {
var i;
return t && "string" == typeof t && !e.isPlainObject(n) && (i = y.exec(e.trim(t))) && i[0] && ("<" !== t.charAt(0) && r("$(html) HTML strings must start with '<' character"), i[3] && r("$(html) HTML text after last tag is ignored"), "#" === i[0].charAt(0) && (r("HTML string cannot start with a '#' character"), e.error("JQMIGRATE: Invalid selector string (XSS)")), n && n.context && (n = n.context), e.parseHTML) ? v.call(this, e.parseHTML(i[2], n, !0), n, a) : v.apply(this, arguments)
}, e.fn.init.prototype = e.fn, e.parseJSON = function (e) {
return e || null === e ? m.apply(this, arguments) : (r("jQuery.parseJSON requires a valid JSON string"), null)
}, e.uaMatch = function (e) {
e = e.toLowerCase();
var t = /(chrome)[ \/]([\w.]+)/.exec(e) || /(webkit)[ \/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e) || /(msie) ([\w.]+)/.exec(e) || 0 > e.indexOf("compatible") && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e) || [];
return {browser: t[1] || "", version: t[2] || "0"}
}, e.browser || (g = e.uaMatch(navigator.userAgent), h = {}, g.browser && (h[g.browser] = !0, h.version = g.version), h.chrome ? h.webkit = !0 : h.webkit && (h.safari = !0), e.browser = h), a(e, "browser", e.browser, "jQuery.browser is deprecated"), e.sub = function () {
function t(e, n) {
return new t.fn.init(e, n)
}
e.extend(!0, t, this), t.superclass = this, t.fn = t.prototype = this(), t.fn.constructor = t, t.sub = this.sub, t.fn.init = function (r, a) {
return a && a instanceof e && !(a instanceof t) && (a = t(a)), e.fn.init.call(this, r, a, n)
}, t.fn.init.prototype = t.fn;
var n = t(document);
return r("jQuery.sub() is deprecated"), t
}, e.ajaxSetup({converters: {"text json": e.parseJSON}});
var b = e.fn.data;
e.fn.data = function (t) {
var a, i, o = this[0];
return !o || "events" !== t || 1 !== arguments.length || (a = e.data(o, t), i = e._data(o, t), a !== n && a !== i || i === n) ? b.apply(this, arguments) : (r("Use of jQuery.fn.data('events') is deprecated"), i)
};
var j = /\/(java|ecma)script/i, w = e.fn.andSelf || e.fn.addBack;
e.fn.andSelf = function () {
return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"), w.apply(this, arguments)
}, e.clean || (e.clean = function (t, a, i, o) {
a = a || document, a = !a.nodeType && a[0] || a, a = a.ownerDocument || a, r("jQuery.clean() is deprecated");
var s, u, c, l, d = [];
if (e.merge(d, e.buildFragment(t, a).childNodes), i) for (c = function (e) {
return !e.type || j.test(e.type) ? o ? o.push(e.parentNode ? e.parentNode.removeChild(e) : e) : i.appendChild(e) : n
}, s = 0; null != (u = d[s]); s++) e.nodeName(u, "script") && c(u) || (i.appendChild(u), u.getElementsByTagName !== n && (l = e.grep(e.merge([], u.getElementsByTagName("script")), c), d.splice.apply(d, [s + 1, 0].concat(l)), s += l.length));
return d
});
var Q = e.event.add, x = e.event.remove, k = e.event.trigger, N = e.fn.toggle, T = e.fn.live, M = e.fn.die,
S = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess", C = RegExp("\\b(?:" + S + ")\\b"),
H = /(?:^|\s)hover(\.\S+|)\b/, A = function (t) {
return "string" != typeof t || e.event.special.hover ? t : (H.test(t) && r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"), t && t.replace(H, "mouseenter$1 mouseleave$1"))
};
e.event.props && "attrChange" !== e.event.props[0] && e.event.props.unshift("attrChange", "attrName", "relatedNode", "srcElement"), e.event.dispatch && a(e.event, "handle", e.event.dispatch, "jQuery.event.handle is undocumented and deprecated"), e.event.add = function (e, t, n, a, i) {
e !== document && C.test(t) && r("AJAX events should be attached to document: " + t), Q.call(this, e, A(t || ""), n, a, i)
}, e.event.remove = function (e, t, n, r, a) {
x.call(this, e, A(t) || "", n, r, a)
}, e.fn.error = function () {
var e = Array.prototype.slice.call(arguments, 0);
return r("jQuery.fn.error() is deprecated"), e.splice(0, 0, "error"), arguments.length ? this.bind.apply(this, e) : (this.triggerHandler.apply(this, e), this)
}, e.fn.toggle = function (t, n) {
if (!e.isFunction(t) || !e.isFunction(n)) return N.apply(this, arguments);
r("jQuery.fn.toggle(handler, handler...) is deprecated");
var a = arguments, i = t.guid || e.guid++, o = 0, s = function (n) {
var r = (e._data(this, "lastToggle" + t.guid) || 0) % o;
return e._data(this, "lastToggle" + t.guid, r + 1), n.preventDefault(), a[r].apply(this, arguments) || !1
};
for (s.guid = i; a.length > o;) a[o++].guid = i;
return this.click(s)
}, e.fn.live = function (t, n, a) {
return r("jQuery.fn.live() is deprecated"), T ? T.apply(this, arguments) : (e(this.context).on(t, this.selector, n, a), this)
}, e.fn.die = function (t, n) {
return r("jQuery.fn.die() is deprecated"), M ? M.apply(this, arguments) : (e(this.context).off(t, this.selector || "**", n), this)
}, e.event.trigger = function (e, t, n, a) {
return n || C.test(e) || r("Global events are undocumented and deprecated"), k.call(this, e, t, n || document, a)
}, e.each(S.split("|"), function (t, n) {
e.event.special[n] = {
setup: function () {
var t = this;
return t !== document && (e.event.add(document, n + "." + e.guid, function () {
e.event.trigger(n, null, t, !0)
}), e._data(this, n, e.guid++)), !1
}, teardown: function () {
return this !== document && e.event.remove(document, n + "." + e._data(this, n)), !1
}
}
})
}(jQuery, window);
/*! jQuery UI - v1.10.3 - 2013-07-31
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.sortable.js, jquery.ui.datepicker.js, jquery.ui.slider.js, jquery.ui.effect.js, jquery.ui.effect-slide.js
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
(function (e, t) {
function i(t, i) {
var a, n, r, o = t.nodeName.toLowerCase();
return "area" === o ? (a = t.parentNode, n = a.name, t.href && n && "map" === a.nodeName.toLowerCase() ? (r = e("img[usemap=#" + n + "]")[0], !!r && s(r)) : !1) : (/input|select|textarea|button|object/.test(o) ? !t.disabled : "a" === o ? t.href || i : i) && s(t)
}
function s(t) {
return e.expr.filters.visible(t) && !e(t).parents().addBack().filter(function () {
return "hidden" === e.css(this, "visibility")
}).length
}
var a = 0, n = /^ui-id-\d+$/;
e.ui = e.ui || {}, e.extend(e.ui, {
version: "1.10.3",
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: function (t) {
return function (i, s) {
return "number" == typeof i ? this.each(function () {
var t = this;
setTimeout(function () {
e(t).focus(), s && s.call(t)
}, i)
}) : t.apply(this, arguments)
}
}(e.fn.focus), scrollParent: function () {
var t;
return t = e.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? 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) : 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 (i) {
if (i !== t) return this.css("zIndex", i);
if (this.length) for (var s, a, n = e(this[0]); n.length && n[0] !== document;) {
if (s = n.css("position"), ("absolute" === s || "relative" === s || "fixed" === s) && (a = parseInt(n.css("zIndex"), 10), !isNaN(a) && 0 !== a)) return a;
n = n.parent()
}
return 0
}, uniqueId: function () {
return this.each(function () {
this.id || (this.id = "ui-id-" + ++a)
})
}, removeUniqueId: function () {
return this.each(function () {
n.test(this.id) && e(this).removeAttr("id")
})
}
}), e.extend(e.expr[":"], {
data: e.expr.createPseudo ? e.expr.createPseudo(function (t) {
return function (i) {
return !!e.data(i, t)
}
}) : function (t, i, s) {
return !!e.data(t, s[3])
}, focusable: function (t) {
return i(t, !isNaN(e.attr(t, "tabindex")))
}, tabbable: function (t) {
var s = e.attr(t, "tabindex"), a = isNaN(s);
return (a || s >= 0) && i(t, !a)
}
}), e("").outerWidth(1).jquery || e.each(["Width", "Height"], function (i, s) {
function a(t, i, s, a) {
return e.each(n, function () {
i -= parseFloat(e.css(t, "padding" + this)) || 0, s && (i -= parseFloat(e.css(t, "border" + this + "Width")) || 0), a && (i -= parseFloat(e.css(t, "margin" + this)) || 0)
}), i
}
var n = "Width" === s ? ["Left", "Right"] : ["Top", "Bottom"], r = s.toLowerCase(), o = {
innerWidth: e.fn.innerWidth,
innerHeight: e.fn.innerHeight,
outerWidth: e.fn.outerWidth,
outerHeight: e.fn.outerHeight
};
e.fn["inner" + s] = function (i) {
return i === t ? o["inner" + s].call(this) : this.each(function () {
e(this).css(r, a(this, i) + "px")
})
}, e.fn["outer" + s] = function (t, i) {
return "number" != typeof t ? o["outer" + s].call(this, t) : this.each(function () {
e(this).css(r, a(this, t, !0, i) + "px")
})
}
}), e.fn.addBack || (e.fn.addBack = function (e) {
return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
}), e("").data("a-b", "a").removeData("a-b").data("a-b") && (e.fn.removeData = function (t) {
return function (i) {
return arguments.length ? t.call(this, e.camelCase(i)) : t.call(this)
}
}(e.fn.removeData)), e.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), e.support.selectstart = "onselectstart" in document.createElement("div"), 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, i, s) {
var a, n = e.ui[t].prototype;
for (a in s) n.plugins[a] = n.plugins[a] || [], n.plugins[a].push([i, s[a]])
}, call: function (e, t, i) {
var s, a = e.plugins[t];
if (a && e.element[0].parentNode && 11 !== e.element[0].parentNode.nodeType) for (s = 0; a.length > s; s++) e.options[a[s][0]] && a[s][1].apply(e.element, i)
}
}, hasScroll: function (t, i) {
if ("hidden" === e(t).css("overflow")) return !1;
var s = i && "left" === i ? "scrollLeft" : "scrollTop", a = !1;
return t[s] > 0 ? !0 : (t[s] = 1, a = t[s] > 0, t[s] = 0, a)
}
})
})(jQuery);
(function (e, t) {
var i = 0, s = Array.prototype.slice, n = e.cleanData;
e.cleanData = function (t) {
for (var i, s = 0; null != (i = t[s]); s++) try {
e(i).triggerHandler("remove")
} catch (a) {
}
n(t)
}, e.widget = function (i, s, n) {
var a, r, o, h, l = {}, u = i.split(".")[0];
i = i.split(".")[1], a = u + "-" + i, n || (n = s, s = e.Widget), e.expr[":"][a.toLowerCase()] = function (t) {
return !!e.data(t, a)
}, e[u] = e[u] || {}, r = e[u][i], o = e[u][i] = function (e, i) {
return this._createWidget ? (arguments.length && this._createWidget(e, i), t) : new o(e, i)
}, e.extend(o, r, {
version: n.version,
_proto: e.extend({}, n),
_childConstructors: []
}), h = new s, h.options = e.widget.extend({}, h.options), e.each(n, function (i, n) {
return e.isFunction(n) ? (l[i] = function () {
var e = function () {
return s.prototype[i].apply(this, arguments)
}, t = function (e) {
return s.prototype[i].apply(this, e)
};
return function () {
var i, s = this._super, a = this._superApply;
return this._super = e, this._superApply = t, i = n.apply(this, arguments), this._super = s, this._superApply = a, i
}
}(), t) : (l[i] = n, t)
}), o.prototype = e.widget.extend(h, {widgetEventPrefix: r ? h.widgetEventPrefix : i}, l, {
constructor: o,
namespace: u,
widgetName: i,
widgetFullName: a
}), r ? (e.each(r._childConstructors, function (t, i) {
var s = i.prototype;
e.widget(s.namespace + "." + s.widgetName, o, i._proto)
}), delete r._childConstructors) : s._childConstructors.push(o), e.widget.bridge(i, o)
}, e.widget.extend = function (i) {
for (var n, a, r = s.call(arguments, 1), o = 0, h = r.length; h > o; o++) for (n in r[o]) a = r[o][n], r[o].hasOwnProperty(n) && a !== t && (i[n] = e.isPlainObject(a) ? e.isPlainObject(i[n]) ? e.widget.extend({}, i[n], a) : e.widget.extend({}, a) : a);
return i
}, e.widget.bridge = function (i, n) {
var a = n.prototype.widgetFullName || i;
e.fn[i] = function (r) {
var o = "string" == typeof r, h = s.call(arguments, 1), l = this;
return r = !o && h.length ? e.widget.extend.apply(null, [r].concat(h)) : r, o ? this.each(function () {
var s, n = e.data(this, a);
return n ? e.isFunction(n[r]) && "_" !== r.charAt(0) ? (s = n[r].apply(n, h), s !== n && s !== t ? (l = s && s.jquery ? l.pushStack(s.get()) : s, !1) : t) : e.error("no such method '" + r + "' for " + i + " widget instance") : e.error("cannot call methods on " + i + " prior to initialization; " + "attempted to call method '" + r + "'")
}) : this.each(function () {
var t = e.data(this, a);
t ? t.option(r || {})._init() : e.data(this, a, new n(r, this))
}), l
}
}, e.Widget = function () {
}, e.Widget._childConstructors = [], e.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "
" : "", c = parseInt(this._get(t, "firstDay"), 10), c = isNaN(c) ? 0 : c, u = this._get(t, "showWeek"), d = this._get(t, "dayNames"), p = this._get(t, "dayNamesMin"), f = this._get(t, "monthNames"), m = this._get(t, "monthNamesShort"), g = this._get(t, "beforeShowDay"), v = this._get(t, "showOtherMonths"), _ = this._get(t, "selectOtherMonths"), b = this._getDefaultDate(t), y = "", k = 0; Q[0] > k; k++) {
for (w = "", this.maxRows = 4, D = 0; Q[1] > D; D++) {
if (T = this._daylightSavingAdjust(new Date(te, Z, t.selectedDay)), C = " ui-corner-all", M = "", q) {
if (M += "
"
}
for (M += "
" + (/all|left/.test(C) && 0 === k ? Y ? a : s : "") + (/all|right/.test(C) && 0 === k ? Y ? s : a : "") + this._generateMonthYearHeader(t, Z, te, G, $, k > 0 || D > 0, f, m) + "
" + "
", S = u ? "
" + this._get(t, "weekHeader") + "
" : "", x = 0; 7 > x; x++) N = (x + c) % 7, S += "
", I = this._getDaysInMonth(te, Z), te === t.selectedYear && Z === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, I)), P = (this._getFirstDayOfMonth(te, Z) - c + 7) % 7, A = Math.ceil((P + I) / 7), z = q ? this.maxRows > A ? this.maxRows : A : A, this.maxRows = z, H = this._daylightSavingAdjust(new Date(te, Z, 1 - P)), E = 0; z > E; E++) {
for (M += "
", F = u ? "
" + this._get(t, "calculateWeek")(H) + "
" : "", x = 0; 7 > x; x++) O = g ? g.apply(t.input ? t.input[0] : null, [H]) : [!0, ""], W = H.getMonth() !== Z, j = W && !_ || !O[0] || G && G > H || $ && H > $, F += "
", H.setDate(H.getDate() + 1), H = this._daylightSavingAdjust(H);
M += F + "
"
}
Z++, Z > 11 && (Z = 0, te++), M += "
" + (q ? "
" + (Q[0] > 0 && D === Q[1] - 1 ? "" : "") : ""), w += M
}
y += w
}
return y += l, t._keyEvent = !1, y
},
_generateMonthYearHeader: function (t, e, i, s, n, a, r, o) {
var h, l, c, u, d, p, f, m, g = this._get(t, "changeMonth"), v = this._get(t, "changeYear"),
_ = this._get(t, "showMonthAfterYear"), b = "
", y = "";
if (a || !g) y += "" + r[e] + ""; else {
for (h = s && s.getFullYear() === i, l = n && n.getFullYear() === i, y += ""
}
if (_ || (b += y + (!a && g && v ? "" : " ")), !t.yearshtml) if (t.yearshtml = "", a || !v) b += "" + i + ""; else {
for (u = this._get(t, "yearRange").split(":"), d = (new Date).getFullYear(), p = function (t) {
var e = t.match(/c[+\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(/[+\-].*/) ? d + parseInt(t, 10) : parseInt(t, 10);
return isNaN(e) ? d : e
}, f = p(u[0]), m = Math.max(f, p(u[1] || "")), f = s ? Math.max(f, s.getFullYear()) : f, m = n ? Math.min(m, n.getFullYear()) : m, t.yearshtml += "", b += t.yearshtml, t.yearshtml = null
}
return b += this._get(t, "yearSuffix"), _ && (b += (!a && g && v ? "" : " ") + y), b += "
"
},
_adjustInstDate: function (t, e, i) {
var s = t.drawYear + ("Y" === i ? e : 0), n = t.drawMonth + ("M" === i ? e : 0),
a = Math.min(t.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i ? e : 0),
r = this._restrictMinMax(t, this._daylightSavingAdjust(new Date(s, n, a)));
t.selectedDay = r.getDate(), t.drawMonth = t.selectedMonth = r.getMonth(), t.drawYear = t.selectedYear = r.getFullYear(), ("M" === i || "Y" === i) && this._notifyChange(t)
},
_restrictMinMax: function (t, e) {
var i = this._getMinMaxDate(t, "min"), s = this._getMinMaxDate(t, "max"), n = i && i > e ? i : e;
return s && n > s ? s : n
},
_notifyChange: function (t) {
var e = this._get(t, "onChangeMonthYear");
e && e.apply(t.input ? t.input[0] : null, [t.selectedYear, t.selectedMonth + 1, t])
},
_getNumberOfMonths: function (t) {
var e = this._get(t, "numberOfMonths");
return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e
},
_getMinMaxDate: function (t, e) {
return this._determineDate(t, this._get(t, e + "Date"), null)
},
_getDaysInMonth: function (t, e) {
return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate()
},
_getFirstDayOfMonth: function (t, e) {
return new Date(t, e, 1).getDay()
},
_canAdjustMonth: function (t, e, i, s) {
var n = this._getNumberOfMonths(t),
a = this._daylightSavingAdjust(new Date(i, s + (0 > e ? e : n[0] * n[1]), 1));
return 0 > e && a.setDate(this._getDaysInMonth(a.getFullYear(), a.getMonth())), this._isInRange(t, a)
},
_isInRange: function (t, e) {
var i, s, n = this._getMinMaxDate(t, "min"), a = this._getMinMaxDate(t, "max"), r = null, o = null,
h = this._get(t, "yearRange");
return h && (i = h.split(":"), s = (new Date).getFullYear(), r = parseInt(i[0], 10), o = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (r += s), i[1].match(/[+\-].*/) && (o += s)), (!n || e.getTime() >= n.getTime()) && (!a || e.getTime() <= a.getTime()) && (!r || e.getFullYear() >= r) && (!o || o >= e.getFullYear())
},
_getFormatConfig: function (t) {
var e = this._get(t, "shortYearCutoff");
return e = "string" != typeof e ? e : (new Date).getFullYear() % 100 + parseInt(e, 10), {
shortYearCutoff: e,
dayNamesShort: this._get(t, "dayNamesShort"),
dayNames: this._get(t, "dayNames"),
monthNamesShort: this._get(t, "monthNamesShort"),
monthNames: this._get(t, "monthNames")
}
},
_formatDate: function (t, e, i, s) {
e || (t.currentDay = t.selectedDay, t.currentMonth = t.selectedMonth, t.currentYear = t.selectedYear);
var n = e ? "object" == typeof e ? e : this._daylightSavingAdjust(new Date(s, i, e)) : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay));
return this.formatDate(this._get(t, "dateFormat"), n, this._getFormatConfig(t))
}
}), t.fn.datepicker = function (e) {
if (!this.length) return this;
t.datepicker.initialized || (t(document).mousedown(t.datepicker._checkExternalClick), t.datepicker.initialized = !0), 0 === t("#" + t.datepicker._mainDivId).length && t("body").append(t.datepicker.dpDiv);
var i = Array.prototype.slice.call(arguments, 1);
return "string" != typeof e || "isDisabled" !== e && "getDate" !== e && "widget" !== e ? "option" === e && 2 === arguments.length && "string" == typeof arguments[1] ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i)) : this.each(function () {
"string" == typeof e ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this].concat(i)) : t.datepicker._attachDatepicker(this, e)
}) : t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i))
}, t.datepicker = new i, t.datepicker.initialized = !1, t.datepicker.uuid = (new Date).getTime(), t.datepicker.version = "1.10.3"
})(jQuery);
(function (t) {
var e = 5;
t.widget("ui.slider", t.ui.mouse, {
version: "1.10.3",
widgetEventPrefix: "slide",
options: {
animate: !1,
distance: 0,
max: 100,
min: 0,
orientation: "horizontal",
range: !1,
step: 1,
value: 0,
values: null,
change: null,
slide: null,
start: null,
stop: null
},
_create: function () {
this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget" + " ui-widget-content" + " ui-corner-all"), this._refresh(), this._setOption("disabled", this.options.disabled), this._animateOff = !1
},
_refresh: function () {
this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue()
},
_createHandles: function () {
var e, i, s = this.options,
n = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),
a = "", o = [];
for (i = s.values && s.values.length || 1, n.length > i && (n.slice(i).remove(), n = n.slice(0, i)), e = n.length; i > e; e++) o.push(a);
this.handles = n.add(t(o.join("")).appendTo(this.element)), this.handle = this.handles.eq(0), this.handles.each(function (e) {
t(this).data("ui-slider-handle-index", e)
})
},
_createRange: function () {
var e = this.options, i = "";
e.range ? (e.range === !0 && (e.values ? e.values.length && 2 !== e.values.length ? e.values = [e.values[0], e.values[0]] : t.isArray(e.values) && (e.values = e.values.slice(0)) : e.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({
left: "",
bottom: ""
}) : (this.range = t("").appendTo(this.element), i = "ui-slider-range ui-widget-header ui-corner-all"), this.range.addClass(i + ("min" === e.range || "max" === e.range ? " ui-slider-range-" + e.range : ""))) : this.range = t([])
},
_setupEvents: function () {
var t = this.handles.add(this.range).filter("a");
this._off(t), this._on(t, this._handleEvents), this._hoverable(t), this._focusable(t)
},
_destroy: function () {
this.handles.remove(), this.range.remove(), this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"), this._mouseDestroy()
},
_mouseCapture: function (e) {
var i, s, n, a, o, r, h, l, u = this, c = this.options;
return c.disabled ? !1 : (this.elementSize = {
width: this.element.outerWidth(),
height: this.element.outerHeight()
}, this.elementOffset = this.element.offset(), i = {
x: e.pageX,
y: e.pageY
}, s = this._normValueFromMouse(i), n = this._valueMax() - this._valueMin() + 1, this.handles.each(function (e) {
var i = Math.abs(s - u.values(e));
(n > i || n === i && (e === u._lastChangedValue || u.values(e) === c.min)) && (n = i, a = t(this), o = e)
}), r = this._start(e, o), r === !1 ? !1 : (this._mouseSliding = !0, this._handleIndex = o, a.addClass("ui-state-active").focus(), h = a.offset(), l = !t(e.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = l ? {
left: 0,
top: 0
} : {
left: e.pageX - h.left - a.width() / 2,
top: e.pageY - h.top - a.height() / 2 - (parseInt(a.css("borderTopWidth"), 10) || 0) - (parseInt(a.css("borderBottomWidth"), 10) || 0) + (parseInt(a.css("marginTop"), 10) || 0)
}, this.handles.hasClass("ui-state-hover") || this._slide(e, o, s), this._animateOff = !0, !0))
},
_mouseStart: function () {
return !0
},
_mouseDrag: function (t) {
var e = {x: t.pageX, y: t.pageY}, i = this._normValueFromMouse(e);
return this._slide(t, this._handleIndex, i), !1
},
_mouseStop: function (t) {
return this.handles.removeClass("ui-state-active"), this._mouseSliding = !1, this._stop(t, this._handleIndex), this._change(t, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1, !1
},
_detectOrientation: function () {
this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
},
_normValueFromMouse: function (t) {
var e, i, s, n, a;
return "horizontal" === this.orientation ? (e = this.elementSize.width, i = t.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (e = this.elementSize.height, i = t.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), s = i / e, s > 1 && (s = 1), 0 > s && (s = 0), "vertical" === this.orientation && (s = 1 - s), n = this._valueMax() - this._valueMin(), a = this._valueMin() + s * n, this._trimAlignValue(a)
},
_start: function (t, e) {
var i = {handle: this.handles[e], value: this.value()};
return this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("start", t, i)
},
_slide: function (t, e, i) {
var s, n, a;
this.options.values && this.options.values.length ? (s = this.values(e ? 0 : 1), 2 === this.options.values.length && this.options.range === !0 && (0 === e && i > s || 1 === e && s > i) && (i = s), i !== this.values(e) && (n = this.values(), n[e] = i, a = this._trigger("slide", t, {
handle: this.handles[e],
value: i,
values: n
}), s = this.values(e ? 0 : 1), a !== !1 && this.values(e, i, !0))) : i !== this.value() && (a = this._trigger("slide", t, {
handle: this.handles[e],
value: i
}), a !== !1 && this.value(i))
},
_stop: function (t, e) {
var i = {handle: this.handles[e], value: this.value()};
this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("stop", t, i)
},
_change: function (t, e) {
if (!this._keySliding && !this._mouseSliding) {
var i = {handle: this.handles[e], value: this.value()};
this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._lastChangedValue = e, this._trigger("change", t, i)
}
},
value: function (t) {
return arguments.length ? (this.options.value = this._trimAlignValue(t), this._refreshValue(), this._change(null, 0), undefined) : this._value()
},
values: function (e, i) {
var s, n, a;
if (arguments.length > 1) return this.options.values[e] = this._trimAlignValue(i), this._refreshValue(), this._change(null, e), undefined;
if (!arguments.length) return this._values();
if (!t.isArray(arguments[0])) return this.options.values && this.options.values.length ? this._values(e) : this.value();
for (s = this.options.values, n = arguments[0], a = 0; s.length > a; a += 1) s[a] = this._trimAlignValue(n[a]), this._change(null, a);
this._refreshValue()
},
_setOption: function (e, i) {
var s, n = 0;
switch ("range" === e && this.options.range === !0 && ("min" === i ? (this.options.value = this._values(0), this.options.values = null) : "max" === i && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), t.isArray(this.options.values) && (n = this.options.values.length), t.Widget.prototype._setOption.apply(this, arguments), e) {
case"orientation":
this._detectOrientation(), this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation), this._refreshValue();
break;
case"value":
this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1;
break;
case"values":
for (this._animateOff = !0, this._refreshValue(), s = 0; n > s; s += 1) this._change(null, s);
this._animateOff = !1;
break;
case"min":
case"max":
this._animateOff = !0, this._refreshValue(), this._animateOff = !1;
break;
case"range":
this._animateOff = !0, this._refresh(), this._animateOff = !1
}
},
_value: function () {
var t = this.options.value;
return t = this._trimAlignValue(t)
},
_values: function (t) {
var e, i, s;
if (arguments.length) return e = this.options.values[t], e = this._trimAlignValue(e);
if (this.options.values && this.options.values.length) {
for (i = this.options.values.slice(), s = 0; i.length > s; s += 1) i[s] = this._trimAlignValue(i[s]);
return i
}
return []
},
_trimAlignValue: function (t) {
if (this._valueMin() >= t) return this._valueMin();
if (t >= this._valueMax()) return this._valueMax();
var e = this.options.step > 0 ? this.options.step : 1, i = (t - this._valueMin()) % e, s = t - i;
return 2 * Math.abs(i) >= e && (s += i > 0 ? e : -e), parseFloat(s.toFixed(5))
},
_valueMin: function () {
return this.options.min
},
_valueMax: function () {
return this.options.max
},
_refreshValue: function () {
var e, i, s, n, a, o = this.options.range, r = this.options, h = this,
l = this._animateOff ? !1 : r.animate, u = {};
this.options.values && this.options.values.length ? this.handles.each(function (s) {
i = 100 * ((h.values(s) - h._valueMin()) / (h._valueMax() - h._valueMin())), u["horizontal" === h.orientation ? "left" : "bottom"] = i + "%", t(this).stop(1, 1)[l ? "animate" : "css"](u, r.animate), h.options.range === !0 && ("horizontal" === h.orientation ? (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({left: i + "%"}, r.animate), 1 === s && h.range[l ? "animate" : "css"]({width: i - e + "%"}, {
queue: !1,
duration: r.animate
})) : (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({bottom: i + "%"}, r.animate), 1 === s && h.range[l ? "animate" : "css"]({height: i - e + "%"}, {
queue: !1,
duration: r.animate
}))), e = i
}) : (s = this.value(), n = this._valueMin(), a = this._valueMax(), i = a !== n ? 100 * ((s - n) / (a - n)) : 0, u["horizontal" === this.orientation ? "left" : "bottom"] = i + "%", this.handle.stop(1, 1)[l ? "animate" : "css"](u, r.animate), "min" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({width: i + "%"}, r.animate), "max" === o && "horizontal" === this.orientation && this.range[l ? "animate" : "css"]({width: 100 - i + "%"}, {
queue: !1,
duration: r.animate
}), "min" === o && "vertical" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({height: i + "%"}, r.animate), "max" === o && "vertical" === this.orientation && this.range[l ? "animate" : "css"]({height: 100 - i + "%"}, {
queue: !1,
duration: r.animate
}))
},
_handleEvents: {
keydown: function (i) {
var s, n, a, o, r = t(i.target).data("ui-slider-handle-index");
switch (i.keyCode) {
case t.ui.keyCode.HOME:
case t.ui.keyCode.END:
case t.ui.keyCode.PAGE_UP:
case t.ui.keyCode.PAGE_DOWN:
case t.ui.keyCode.UP:
case t.ui.keyCode.RIGHT:
case t.ui.keyCode.DOWN:
case t.ui.keyCode.LEFT:
if (i.preventDefault(), !this._keySliding && (this._keySliding = !0, t(i.target).addClass("ui-state-active"), s = this._start(i, r), s === !1)) return
}
switch (o = this.options.step, n = a = this.options.values && this.options.values.length ? this.values(r) : this.value(), i.keyCode) {
case t.ui.keyCode.HOME:
a = this._valueMin();
break;
case t.ui.keyCode.END:
a = this._valueMax();
break;
case t.ui.keyCode.PAGE_UP:
a = this._trimAlignValue(n + (this._valueMax() - this._valueMin()) / e);
break;
case t.ui.keyCode.PAGE_DOWN:
a = this._trimAlignValue(n - (this._valueMax() - this._valueMin()) / e);
break;
case t.ui.keyCode.UP:
case t.ui.keyCode.RIGHT:
if (n === this._valueMax()) return;
a = this._trimAlignValue(n + o);
break;
case t.ui.keyCode.DOWN:
case t.ui.keyCode.LEFT:
if (n === this._valueMin()) return;
a = this._trimAlignValue(n - o)
}
this._slide(i, r, a)
}, click: function (t) {
t.preventDefault()
}, keyup: function (e) {
var i = t(e.target).data("ui-slider-handle-index");
this._keySliding && (this._keySliding = !1, this._stop(e, i), this._change(e, i), t(e.target).removeClass("ui-state-active"))
}
}
})
})(jQuery);
(function (t, e) {
var i = "ui-effects-";
t.effects = {effect: {}}, function (t, e) {
function i(t, e, i) {
var s = u[e.type] || {};
return null == t ? i || !e.def ? null : e.def : (t = s.floor ? ~~t : parseFloat(t), isNaN(t) ? e.def : s.mod ? (t + s.mod) % s.mod : 0 > t ? 0 : t > s.max ? s.max : t)
}
function s(i) {
var s = l(), n = s._rgba = [];
return i = i.toLowerCase(), f(h, function (t, a) {
var o, r = a.re.exec(i), h = r && a.parse(r), l = a.space || "rgba";
return h ? (o = s[l](h), s[c[l].cache] = o[c[l].cache], n = s._rgba = o._rgba, !1) : e
}), n.length ? ("0,0,0,0" === n.join() && t.extend(n, a.transparent), s) : a[i]
}
function n(t, e, i) {
return i = (i + 1) % 1, 1 > 6 * i ? t + 6 * (e - t) * i : 1 > 2 * i ? e : 2 > 3 * i ? t + 6 * (e - t) * (2 / 3 - i) : t
}
var a,
o = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
r = /^([\-+])=\s*(\d+\.?\d*)/, h = [{
re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
parse: function (t) {
return [t[1], t[2], t[3], t[4]]
}
}, {
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
parse: function (t) {
return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]]
}
}, {
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (t) {
return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)]
}
}, {
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (t) {
return [parseInt(t[1] + t[1], 16), parseInt(t[2] + t[2], 16), parseInt(t[3] + t[3], 16)]
}
}, {
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
space: "hsla",
parse: function (t) {
return [t[1], t[2] / 100, t[3] / 100, t[4]]
}
}], l = t.Color = function (e, i, s, n) {
return new t.Color.fn.parse(e, i, s, n)
}, c = {
rgba: {
props: {
red: {idx: 0, type: "byte"},
green: {idx: 1, type: "byte"},
blue: {idx: 2, type: "byte"}
}
},
hsla: {
props: {
hue: {idx: 0, type: "degrees"},
saturation: {idx: 1, type: "percent"},
lightness: {idx: 2, type: "percent"}
}
}
}, u = {"byte": {floor: !0, max: 255}, percent: {max: 1}, degrees: {mod: 360, floor: !0}}, d = l.support = {},
p = t("
")[0], f = t.each;
p.style.cssText = "background-color:rgba(1,1,1,.5)", d.rgba = p.style.backgroundColor.indexOf("rgba") > -1, f(c, function (t, e) {
e.cache = "_" + t, e.props.alpha = {idx: 3, type: "percent", def: 1}
}), l.fn = t.extend(l.prototype, {
parse: function (n, o, r, h) {
if (n === e) return this._rgba = [null, null, null, null], this;
(n.jquery || n.nodeType) && (n = t(n).css(o), o = e);
var u = this, d = t.type(n), p = this._rgba = [];
return o !== e && (n = [n, o, r, h], d = "array"), "string" === d ? this.parse(s(n) || a._default) : "array" === d ? (f(c.rgba.props, function (t, e) {
p[e.idx] = i(n[e.idx], e)
}), this) : "object" === d ? (n instanceof l ? f(c, function (t, e) {
n[e.cache] && (u[e.cache] = n[e.cache].slice())
}) : f(c, function (e, s) {
var a = s.cache;
f(s.props, function (t, e) {
if (!u[a] && s.to) {
if ("alpha" === t || null == n[t]) return;
u[a] = s.to(u._rgba)
}
u[a][e.idx] = i(n[t], e, !0)
}), u[a] && 0 > t.inArray(null, u[a].slice(0, 3)) && (u[a][3] = 1, s.from && (u._rgba = s.from(u[a])))
}), this) : e
}, is: function (t) {
var i = l(t), s = !0, n = this;
return f(c, function (t, a) {
var o, r = i[a.cache];
return r && (o = n[a.cache] || a.to && a.to(n._rgba) || [], f(a.props, function (t, i) {
return null != r[i.idx] ? s = r[i.idx] === o[i.idx] : e
})), s
}), s
}, _space: function () {
var t = [], e = this;
return f(c, function (i, s) {
e[s.cache] && t.push(i)
}), t.pop()
}, transition: function (t, e) {
var s = l(t), n = s._space(), a = c[n], o = 0 === this.alpha() ? l("transparent") : this,
r = o[a.cache] || a.to(o._rgba), h = r.slice();
return s = s[a.cache], f(a.props, function (t, n) {
var a = n.idx, o = r[a], l = s[a], c = u[n.type] || {};
null !== l && (null === o ? h[a] = l : (c.mod && (l - o > c.mod / 2 ? o += c.mod : o - l > c.mod / 2 && (o -= c.mod)), h[a] = i((l - o) * e + o, n)))
}), this[n](h)
}, blend: function (e) {
if (1 === this._rgba[3]) return this;
var i = this._rgba.slice(), s = i.pop(), n = l(e)._rgba;
return l(t.map(i, function (t, e) {
return (1 - s) * n[e] + s * t
}))
}, toRgbaString: function () {
var e = "rgba(", i = t.map(this._rgba, function (t, e) {
return null == t ? e > 2 ? 1 : 0 : t
});
return 1 === i[3] && (i.pop(), e = "rgb("), e + i.join() + ")"
}, toHslaString: function () {
var e = "hsla(", i = t.map(this.hsla(), function (t, e) {
return null == t && (t = e > 2 ? 1 : 0), e && 3 > e && (t = Math.round(100 * t) + "%"), t
});
return 1 === i[3] && (i.pop(), e = "hsl("), e + i.join() + ")"
}, toHexString: function (e) {
var i = this._rgba.slice(), s = i.pop();
return e && i.push(~~(255 * s)), "#" + t.map(i, function (t) {
return t = (t || 0).toString(16), 1 === t.length ? "0" + t : t
}).join("")
}, toString: function () {
return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
}
}), l.fn.parse.prototype = l.fn, c.hsla.to = function (t) {
if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
var e, i, s = t[0] / 255, n = t[1] / 255, a = t[2] / 255, o = t[3], r = Math.max(s, n, a),
h = Math.min(s, n, a), l = r - h, c = r + h, u = .5 * c;
return e = h === r ? 0 : s === r ? 60 * (n - a) / l + 360 : n === r ? 60 * (a - s) / l + 120 : 60 * (s - n) / l + 240, i = 0 === l ? 0 : .5 >= u ? l / c : l / (2 - c), [Math.round(e) % 360, i, u, null == o ? 1 : o]
}, c.hsla.from = function (t) {
if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
var e = t[0] / 360, i = t[1], s = t[2], a = t[3], o = .5 >= s ? s * (1 + i) : s + i - s * i, r = 2 * s - o;
return [Math.round(255 * n(r, o, e + 1 / 3)), Math.round(255 * n(r, o, e)), Math.round(255 * n(r, o, e - 1 / 3)), a]
}, f(c, function (s, n) {
var a = n.props, o = n.cache, h = n.to, c = n.from;
l.fn[s] = function (s) {
if (h && !this[o] && (this[o] = h(this._rgba)), s === e) return this[o].slice();
var n, r = t.type(s), u = "array" === r || "object" === r ? s : arguments, d = this[o].slice();
return f(a, function (t, e) {
var s = u["object" === r ? t : e.idx];
null == s && (s = d[e.idx]), d[e.idx] = i(s, e)
}), c ? (n = l(c(d)), n[o] = d, n) : l(d)
}, f(a, function (e, i) {
l.fn[e] || (l.fn[e] = function (n) {
var a, o = t.type(n), h = "alpha" === e ? this._hsla ? "hsla" : "rgba" : s, l = this[h](),
c = l[i.idx];
return "undefined" === o ? c : ("function" === o && (n = n.call(this, c), o = t.type(n)), null == n && i.empty ? this : ("string" === o && (a = r.exec(n), a && (n = c + parseFloat(a[2]) * ("+" === a[1] ? 1 : -1))), l[i.idx] = n, this[h](l)))
})
})
}), l.hook = function (e) {
var i = e.split(" ");
f(i, function (e, i) {
t.cssHooks[i] = {
set: function (e, n) {
var a, o, r = "";
if ("transparent" !== n && ("string" !== t.type(n) || (a = s(n)))) {
if (n = l(a || n), !d.rgba && 1 !== n._rgba[3]) {
for (o = "backgroundColor" === i ? e.parentNode : e; ("" === r || "transparent" === r) && o && o.style;) try {
r = t.css(o, "backgroundColor"), o = o.parentNode
} catch (h) {
}
n = n.blend(r && "transparent" !== r ? r : "_default")
}
n = n.toRgbaString()
}
try {
e.style[i] = n
} catch (h) {
}
}
}, t.fx.step[i] = function (e) {
e.colorInit || (e.start = l(e.elem, i), e.end = l(e.end), e.colorInit = !0), t.cssHooks[i].set(e.elem, e.start.transition(e.end, e.pos))
}
})
}, l.hook(o), t.cssHooks.borderColor = {
expand: function (t) {
var e = {};
return f(["Top", "Right", "Bottom", "Left"], function (i, s) {
e["border" + s + "Color"] = t
}), e
}
}, a = t.Color.names = {
aqua: "#00ffff",
black: "#000000",
blue: "#0000ff",
fuchsia: "#ff00ff",
gray: "#808080",
green: "#008000",
lime: "#00ff00",
maroon: "#800000",
navy: "#000080",
olive: "#808000",
purple: "#800080",
red: "#ff0000",
silver: "#c0c0c0",
teal: "#008080",
white: "#ffffff",
yellow: "#ffff00",
transparent: [null, null, null, 0],
_default: "#ffffff"
}
}(jQuery), function () {
function i(e) {
var i, s,
n = e.ownerDocument.defaultView ? e.ownerDocument.defaultView.getComputedStyle(e, null) : e.currentStyle,
a = {};
if (n && n.length && n[0] && n[n[0]]) for (s = n.length; s--;) i = n[s], "string" == typeof n[i] && (a[t.camelCase(i)] = n[i]); else for (i in n) "string" == typeof n[i] && (a[i] = n[i]);
return a
}
function s(e, i) {
var s, n, o = {};
for (s in i) n = i[s], e[s] !== n && (a[s] || (t.fx.step[s] || !isNaN(parseFloat(n))) && (o[s] = n));
return o
}
var n = ["add", "remove", "toggle"], a = {
border: 1,
borderBottom: 1,
borderColor: 1,
borderLeft: 1,
borderRight: 1,
borderTop: 1,
borderWidth: 1,
margin: 1,
padding: 1
};
t.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (e, i) {
t.fx.step[i] = function (t) {
("none" !== t.end && !t.setAttr || 1 === t.pos && !t.setAttr) && (jQuery.style(t.elem, i, t.end), t.setAttr = !0)
}
}), t.fn.addBack || (t.fn.addBack = function (t) {
return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
}), t.effects.animateClass = function (e, a, o, r) {
var h = t.speed(a, o, r);
return this.queue(function () {
var a, o = t(this), r = o.attr("class") || "", l = h.children ? o.find("*").addBack() : o;
l = l.map(function () {
var e = t(this);
return {el: e, start: i(this)}
}), a = function () {
t.each(n, function (t, i) {
e[i] && o[i + "Class"](e[i])
})
}, a(), l = l.map(function () {
return this.end = i(this.el[0]), this.diff = s(this.start, this.end), this
}), o.attr("class", r), l = l.map(function () {
var e = this, i = t.Deferred(), s = t.extend({}, h, {
queue: !1, complete: function () {
i.resolve(e)
}
});
return this.el.animate(this.diff, s), i.promise()
}), t.when.apply(t, l.get()).done(function () {
a(), t.each(arguments, function () {
var e = this.el;
t.each(this.diff, function (t) {
e.css(t, "")
})
}), h.complete.call(o[0])
})
})
}, t.fn.extend({
addClass: function (e) {
return function (i, s, n, a) {
return s ? t.effects.animateClass.call(this, {add: i}, s, n, a) : e.apply(this, arguments)
}
}(t.fn.addClass), removeClass: function (e) {
return function (i, s, n, a) {
return arguments.length > 1 ? t.effects.animateClass.call(this, {remove: i}, s, n, a) : e.apply(this, arguments)
}
}(t.fn.removeClass), toggleClass: function (i) {
return function (s, n, a, o, r) {
return "boolean" == typeof n || n === e ? a ? t.effects.animateClass.call(this, n ? {add: s} : {remove: s}, a, o, r) : i.apply(this, arguments) : t.effects.animateClass.call(this, {toggle: s}, n, a, o)
}
}(t.fn.toggleClass), switchClass: function (e, i, s, n, a) {
return t.effects.animateClass.call(this, {add: i, remove: e}, s, n, a)
}
})
}(), function () {
function s(e, i, s, n) {
return t.isPlainObject(e) && (i = e, e = e.effect), e = {effect: e}, null == i && (i = {}), t.isFunction(i) && (n = i, s = null, i = {}), ("number" == typeof i || t.fx.speeds[i]) && (n = s, s = i, i = {}), t.isFunction(s) && (n = s, s = null), i && t.extend(e, i), s = s || i.duration, e.duration = t.fx.off ? 0 : "number" == typeof s ? s : s in t.fx.speeds ? t.fx.speeds[s] : t.fx.speeds._default, e.complete = n || i.complete, e
}
function n(e) {
return !e || "number" == typeof e || t.fx.speeds[e] ? !0 : "string" != typeof e || t.effects.effect[e] ? t.isFunction(e) ? !0 : "object" != typeof e || e.effect ? !1 : !0 : !0
}
t.extend(t.effects, {
version: "1.10.3", save: function (t, e) {
for (var s = 0; e.length > s; s++) null !== e[s] && t.data(i + e[s], t[0].style[e[s]])
}, restore: function (t, s) {
var n, a;
for (a = 0; s.length > a; a++) null !== s[a] && (n = t.data(i + s[a]), n === e && (n = ""), t.css(s[a], n))
}, setMode: function (t, e) {
return "toggle" === e && (e = t.is(":hidden") ? "show" : "hide"), e
}, getBaseline: function (t, e) {
var i, s;
switch (t[0]) {
case"top":
i = 0;
break;
case"middle":
i = .5;
break;
case"bottom":
i = 1;
break;
default:
i = t[0] / e.height
}
switch (t[1]) {
case"left":
s = 0;
break;
case"center":
s = .5;
break;
case"right":
s = 1;
break;
default:
s = t[1] / e.width
}
return {x: s, y: i}
}, createWrapper: function (e) {
if (e.parent().is(".ui-effects-wrapper")) return e.parent();
var i = {width: e.outerWidth(!0), height: e.outerHeight(!0), "float": e.css("float")},
s = t("
").addClass("ui-effects-wrapper").css({
fontSize: "100%",
background: "transparent",
border: "none",
margin: 0,
padding: 0
}), n = {width: e.width(), height: e.height()}, a = document.activeElement;
try {
a.id
} catch (o) {
a = document.body
}
return e.wrap(s), (e[0] === a || t.contains(e[0], a)) && t(a).focus(), s = e.parent(), "static" === e.css("position") ? (s.css({position: "relative"}), e.css({position: "relative"})) : (t.extend(i, {
position: e.css("position"),
zIndex: e.css("z-index")
}), t.each(["top", "left", "bottom", "right"], function (t, s) {
i[s] = e.css(s), isNaN(parseInt(i[s], 10)) && (i[s] = "auto")
}), e.css({
position: "relative",
top: 0,
left: 0,
right: "auto",
bottom: "auto"
})), e.css(n), s.css(i).show()
}, removeWrapper: function (e) {
var i = document.activeElement;
return e.parent().is(".ui-effects-wrapper") && (e.parent().replaceWith(e), (e[0] === i || t.contains(e[0], i)) && t(i).focus()), e
}, setTransition: function (e, i, s, n) {
return n = n || {}, t.each(i, function (t, i) {
var a = e.cssUnit(i);
a[0] > 0 && (n[i] = a[0] * s + a[1])
}), n
}
}), t.fn.extend({
effect: function () {
function e(e) {
function s() {
t.isFunction(a) && a.call(n[0]), t.isFunction(e) && e()
}
var n = t(this), a = i.complete, r = i.mode;
(n.is(":hidden") ? "hide" === r : "show" === r) ? (n[r](), s()) : o.call(n[0], i, s)
}
var i = s.apply(this, arguments), n = i.mode, a = i.queue, o = t.effects.effect[i.effect];
return t.fx.off || !o ? n ? this[n](i.duration, i.complete) : this.each(function () {
i.complete && i.complete.call(this)
}) : a === !1 ? this.each(e) : this.queue(a || "fx", e)
}, show: function (t) {
return function (e) {
if (n(e)) return t.apply(this, arguments);
var i = s.apply(this, arguments);
return i.mode = "show", this.effect.call(this, i)
}
}(t.fn.show), hide: function (t) {
return function (e) {
if (n(e)) return t.apply(this, arguments);
var i = s.apply(this, arguments);
return i.mode = "hide", this.effect.call(this, i)
}
}(t.fn.hide), toggle: function (t) {
return function (e) {
if (n(e) || "boolean" == typeof e) return t.apply(this, arguments);
var i = s.apply(this, arguments);
return i.mode = "toggle", this.effect.call(this, i)
}
}(t.fn.toggle), cssUnit: function (e) {
var i = this.css(e), s = [];
return t.each(["em", "px", "%", "pt"], function (t, e) {
i.indexOf(e) > 0 && (s = [parseFloat(i), e])
}), s
}
})
}(), function () {
var e = {};
t.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (t, i) {
e[i] = function (e) {
return Math.pow(e, t + 2)
}
}), t.extend(e, {
Sine: function (t) {
return 1 - Math.cos(t * Math.PI / 2)
}, Circ: function (t) {
return 1 - Math.sqrt(1 - t * t)
}, Elastic: function (t) {
return 0 === t || 1 === t ? t : -Math.pow(2, 8 * (t - 1)) * Math.sin((80 * (t - 1) - 7.5) * Math.PI / 15)
}, Back: function (t) {
return t * t * (3 * t - 2)
}, Bounce: function (t) {
for (var e, i = 4; ((e = Math.pow(2, --i)) - 1) / 11 > t;) ;
return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2)
}
}), t.each(e, function (e, i) {
t.easing["easeIn" + e] = i, t.easing["easeOut" + e] = function (t) {
return 1 - i(1 - t)
}, t.easing["easeInOut" + e] = function (t) {
return .5 > t ? i(2 * t) / 2 : 1 - i(-2 * t + 2) / 2
}
})
}()
})(jQuery);
(function (t) {
t.effects.effect.slide = function (e, i) {
var s, n = t(this), a = ["position", "top", "bottom", "left", "right", "width", "height"],
o = t.effects.setMode(n, e.mode || "show"), r = "show" === o, h = e.direction || "left",
l = "up" === h || "down" === h ? "top" : "left", c = "up" === h || "left" === h, u = {};
t.effects.save(n, a), n.show(), s = e.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0), t.effects.createWrapper(n).css({overflow: "hidden"}), r && n.css(l, c ? isNaN(s) ? "-" + s : -s : s), u[l] = (r ? c ? "+=" : "-=" : c ? "-=" : "+=") + s, n.animate(u, {
queue: !1,
duration: e.duration,
easing: e.easing,
complete: function () {
"hide" === o && n.hide(), t.effects.restore(n, a), t.effects.removeWrapper(n), i()
}
})
}
})(jQuery);
/*!
* jquery.customscroll 1.0
*
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
*/
;(function ($) {
$.customscrollOptions = {
always: false,
show: {
on: 'mouseenter scrollstart',
effect: 'fadeIn',
speed: 250,
delay: 0
},
hide: {
on: 'mouseleave scrollstop',
effect: 'fadeOut',
speed: 250,
delay: 750
},
grow: {
size: 3,
speed: 100
},
pageUpnDown: {
speed: 100
}
};
$.fn.customscroll = function (options) {
options = $.extend(true, {}, $.customscrollOptions, options || {});
return this.each(function () {
var object = $(this);
// build template
object.addClass('customscroll');
object.html([
'
',
'
',
object.html(),
'
',
'
',
'
',
'
',
'',
'
',
'
'
].join(''));
// get elements
var wrapper = object.children('.wrapper'),
placeholder = object.children('.placeholder'),
track = placeholder.children('.track'),
grip = track.children('.grip');
// object hover
var showHideTimer,
show = function (event) {
if (object.height() >= wrapper[0].scrollHeight) {
// we dont need scroll
return;
}
if (wrapper[0].scrollHeight < parseInt(object.css('max-height'))) {
// this is a fix for IE
return;
}
// show
clearInterval(showHideTimer);
showHideTimer = setTimeout(function () {
track[options.show.effect](options.show.speed);
}, options.show.delay);
if (!event || event.type !== 'scrollstart') {
// used for adjusting sizes
wrapper.trigger('scroll');
}
};
wrapper.on(options.show.on, show);
wrapper.on(options.hide.on, function callback() {
// don't hide if always is true
if (options.always) {
return;
}
if (wrapper.hasClass('keep')) {
// someone says do not hide, try again later
return setTimeout(function () {
callback();
}, 250);
}
// hide
clearInterval(showHideTimer);
showHideTimer = setTimeout(function () {
track[options.hide.effect](options.hide.speed);
}, options.hide.delay);
});
// bind scroll event
var scrollingTimer;
wrapper.on('scroll', function (event) {
var height = object.height();
grip.css({
// grip height is view height / scroll height * 200 (4 is for margins)
height: height / this.scrollHeight * height - parseInt(object.css('paddingTop')) - parseInt(object.css('paddingBottom')),
// scroll position
marginTop: this.scrollTop * 100 / this.scrollHeight * height / 100 + 'px'
});
// custom scroll start / end events
if (!scrollingTimer) {
wrapper.trigger('scrollstart');
}
clearInterval(scrollingTimer);
scrollingTimer = setTimeout(function () {
wrapper.trigger('scrollstop');
scrollingTimer = null;
}, 200);
});
// placeholder and track hover
wrapper.on('mouseover', function () {
// do not hide track and show
wrapper.addClass('keep');
show();
});
// placeholder and track hover
wrapper.on('mouseleave', function () {
// do not hide track and show
wrapper.removeClass('keep');
});
placeholder.on('mouseover', function () {
// do not hide track and show
wrapper.addClass('keep');
show();
});
placeholder.on('mouseleave', function () {
// hide track
wrapper.removeClass('keep');
});
track.on('mouseenter', function () {
track.addClass('hover');
if (options.grow) {
// stop animation queue and animate
track.stop(true, true);
track.animate({width: '+=' + options.grow.size + 'px'}, options.grow.speed);
}
});
track.on('mouseleave', function hover() {
track.removeClass('hover');
if (options.grow) {
// stop animation queue and animate
track.stop(true, true);
track.animate({width: '-=' + options.grow.size + 'px'}, options.grow.speed);
}
});
// page up / down (track click)
track.on('click', function (event) {
if ($(event.target).hasClass('grip')) {
// do not trigger when clicking the egrip
return;
}
if (event.pageY - track.offset().top > parseInt(grip.css('marginTop'))) {
// clicked after grip
var operation = '+';
} else {
// clicked before grip
var operation = '-';
}
// scroll
wrapper.animate({
scrollTop: operation + '=' + object.height() + 'px'
}, options.pageUpnDown.speed);
});
// show initially if always is true
if (options.always) {
show();
}
// grip drag
var dragging = false;
grip.on('mousedown', function (event) {
// do not hide
wrapper.addClass('keep');
// mark as dragging
dragging = true;
// prevent text selection
$('body').addClass('dragging');
});
$(document).on('mousemove', function (event) {
if (dragging) {
// we have drag, move
wrapper.scrollTop(wrapper[0].scrollHeight * (event.pageY - track.offset().top - grip.height() / 2) / object.height());
event.preventDefault();
}
});
$(document).on('mouseup', function () {
if (dragging) {
// we have drag, remove
wrapper.removeClass('keep');
dragging = false;
$('body').removeClass('dragging');
}
});
});
};
})(jQuery);
!function (e, t, n) {
"use strict";
!function o(e, t, n) {
function a(s, l) {
if (!t[s]) {
if (!e[s]) {
var i = "function" == typeof require && require;
if (!l && i) return i(s, !0);
if (r) return r(s, !0);
var u = new Error("Cannot find module '" + s + "'");
throw u.code = "MODULE_NOT_FOUND", u
}
var c = t[s] = {exports: {}};
e[s][0].call(c.exports, function (t) {
var n = e[s][1][t];
return a(n ? n : t)
}, c, c.exports, o, e, t, n)
}
return t[s].exports
}
for (var r = "function" == typeof require && require, s = 0; s < n.length; s++) a(n[s]);
return a
}({
1: [function (o, a, r) {
var s = function (e) {
return e && e.__esModule ? e : {"default": e}
};
Object.defineProperty(r, "__esModule", {value: !0});
var l, i, u, c, d = o("./modules/handle-dom"), f = o("./modules/utils"), p = o("./modules/handle-swal-dom"),
m = o("./modules/handle-click"), v = o("./modules/handle-key"), y = s(v),
h = o("./modules/default-params"), b = s(h), g = o("./modules/set-params"), w = s(g);
r["default"] = u = c = function () {
function o(e) {
var t = a;
return t[e] === n ? b["default"][e] : t[e]
}
var a = arguments[0];
if (d.addClass(t.body, "stop-scrolling"), p.resetInput(), a === n) return f.logStr("SweetAlert expects at least 1 attribute!"), !1;
var r = f.extend({}, b["default"]);
switch (typeof a) {
case"string":
r.title = a, r.text = arguments[1] || "", r.type = arguments[2] || "";
break;
case"object":
if (a.title === n) return f.logStr('Missing "title" argument!'), !1;
r.title = a.title;
for (var s in b["default"]) r[s] = o(s);
r.confirmButtonText = r.showCancelButton ? "Confirm" : b["default"].confirmButtonText, r.confirmButtonText = o("confirmButtonText"), r.doneFunction = arguments[1] || null;
break;
default:
return f.logStr('Unexpected type of argument! Expected "string" or "object", got ' + typeof a), !1
}
w["default"](r), p.fixVerticalPosition(), p.openModal(arguments[1]);
for (var u = p.getModal(), v = u.querySelectorAll("button"), h = ["onclick", "onmouseover", "onmouseout", "onmousedown", "onmouseup", "onfocus"], g = function (e) {
return m.handleButton(e, r, u)
}, C = 0; C < v.length; C++) for (var S = 0; S < h.length; S++) {
var x = h[S];
v[C][x] = g
}
p.getOverlay().onclick = g, l = e.onkeydown;
var k = function (e) {
return y["default"](e, r, u)
};
e.onkeydown = k, e.onfocus = function () {
setTimeout(function () {
i !== n && (i.focus(), i = n)
}, 0)
}, c.enableButtons()
}, u.setDefaults = c.setDefaults = function (e) {
if (!e) throw new Error("userParams is required");
if ("object" != typeof e) throw new Error("userParams has to be a object");
f.extend(b["default"], e)
}, u.close = c.close = function () {
var o = p.getModal();
d.fadeOut(p.getOverlay(), 5), d.fadeOut(o, 5), d.removeClass(o, "showSweetAlert"), d.addClass(o, "hideSweetAlert"), d.removeClass(o, "visible");
var a = o.querySelector(".sa-icon.sa-success");
d.removeClass(a, "animate"), d.removeClass(a.querySelector(".sa-tip"), "animateSuccessTip"), d.removeClass(a.querySelector(".sa-long"), "animateSuccessLong");
var r = o.querySelector(".sa-icon.sa-error");
d.removeClass(r, "animateErrorIcon"), d.removeClass(r.querySelector(".sa-x-mark"), "animateXMark");
var s = o.querySelector(".sa-icon.sa-warning");
return d.removeClass(s, "pulseWarning"), d.removeClass(s.querySelector(".sa-body"), "pulseWarningIns"), d.removeClass(s.querySelector(".sa-dot"), "pulseWarningIns"), setTimeout(function () {
var e = o.getAttribute("data-custom-class");
d.removeClass(o, e)
}, 300), d.removeClass(t.body, "stop-scrolling"), e.onkeydown = l, e.previousActiveElement && e.previousActiveElement.focus(), i = n, clearTimeout(o.timeout), !0
}, u.showInputError = c.showInputError = function (e) {
var t = p.getModal(), n = t.querySelector(".sa-input-error");
d.addClass(n, "show");
var o = t.querySelector(".sa-error-container");
d.addClass(o, "show"), o.querySelector("p").innerHTML = e, setTimeout(function () {
u.enableButtons()
}, 1), t.querySelector("input").focus()
}, u.resetInputError = c.resetInputError = function (e) {
if (e && 13 === e.keyCode) return !1;
var t = p.getModal(), n = t.querySelector(".sa-input-error");
d.removeClass(n, "show");
var o = t.querySelector(".sa-error-container");
d.removeClass(o, "show")
}, u.disableButtons = c.disableButtons = function () {
var e = p.getModal(), t = e.querySelector("button.confirm"), n = e.querySelector("button.cancel");
t.disabled = !0, n.disabled = !0
}, u.enableButtons = c.enableButtons = function () {
var e = p.getModal(), t = e.querySelector("button.confirm"), n = e.querySelector("button.cancel");
t.disabled = !1, n.disabled = !1
}, "undefined" != typeof e ? e.sweetAlert = e.swal = u : f.logStr("SweetAlert is a frontend module!"), a.exports = r["default"]
}, {
"./modules/default-params": 2,
"./modules/handle-click": 3,
"./modules/handle-dom": 4,
"./modules/handle-key": 5,
"./modules/handle-swal-dom": 6,
"./modules/set-params": 8,
"./modules/utils": 9
}], 2: [function (e, t, n) {
Object.defineProperty(n, "__esModule", {value: !0});
var o = {
title: "",
text: "",
type: null,
allowOutsideClick: !1,
showConfirmButton: !0,
showCancelButton: !1,
closeOnConfirm: !0,
closeOnCancel: !0,
confirmButtonText: "OK",
confirmButtonColor: "#8CD4F5",
cancelButtonText: "Cancel",
imageUrl: null,
imageSize: null,
timer: null,
customClass: "",
html: !1,
animation: !0,
allowEscapeKey: !0,
inputType: "text",
inputPlaceholder: "",
inputValue: "",
showLoaderOnConfirm: !1
};
n["default"] = o, t.exports = n["default"]
}, {}], 3: [function (t, n, o) {
Object.defineProperty(o, "__esModule", {value: !0});
var a = t("./utils"), r = (t("./handle-swal-dom"), t("./handle-dom")), s = function (t, n, o) {
function s(e) {
m && n.confirmButtonColor && (p.style.backgroundColor = e)
}
var u, c, d, f = t || e.event, p = f.target || f.srcElement, m = -1 !== p.className.indexOf("confirm"),
v = -1 !== p.className.indexOf("sweet-overlay"), y = r.hasClass(o, "visible"),
h = n.doneFunction && "true" === o.getAttribute("data-has-done-function");
switch (m && n.confirmButtonColor && (u = n.confirmButtonColor, c = a.colorLuminance(u, -.04), d = a.colorLuminance(u, -.14)), f.type) {
case"mouseover":
s(c);
break;
case"mouseout":
s(u);
break;
case"mousedown":
s(d);
break;
case"mouseup":
s(c);
break;
case"focus":
var b = o.querySelector("button.confirm"), g = o.querySelector("button.cancel");
m ? g.style.boxShadow = "none" : b.style.boxShadow = "none";
break;
case"click":
var w = o === p, C = r.isDescendant(o, p);
if (!w && !C && y && !n.allowOutsideClick) break;
m && h && y ? l(o, n) : h && y || v ? i(o, n) : r.isDescendant(o, p) && "BUTTON" === p.tagName && sweetAlert.close()
}
}, l = function (e, t) {
var n = !0;
r.hasClass(e, "show-input") && (n = e.querySelector("input").value, n || (n = "")), t.doneFunction(n), t.closeOnConfirm && sweetAlert.close(), t.showLoaderOnConfirm && sweetAlert.disableButtons()
}, i = function (e, t) {
var n = String(t.doneFunction).replace(/\s/g, ""),
o = "function(" === n.substring(0, 9) && ")" !== n.substring(9, 10);
o && t.doneFunction(!1), t.closeOnCancel && sweetAlert.close()
};
o["default"] = {handleButton: s, handleConfirm: l, handleCancel: i}, n.exports = o["default"]
}, {"./handle-dom": 4, "./handle-swal-dom": 6, "./utils": 9}], 4: [function (n, o, a) {
Object.defineProperty(a, "__esModule", {value: !0});
var r = function (e, t) {
return new RegExp(" " + t + " ").test(" " + e.className + " ")
}, s = function (e, t) {
r(e, t) || (e.className += " " + t)
}, l = function (e, t) {
var n = " " + e.className.replace(/[\t\r\n]/g, " ") + " ";
if (r(e, t)) {
for (; n.indexOf(" " + t + " ") >= 0;) n = n.replace(" " + t + " ", " ");
e.className = n.replace(/^\s+|\s+$/g, "")
}
}, i = function (e) {
var n = t.createElement("div");
return n.appendChild(t.createTextNode(e)), n.innerHTML
}, u = function (e) {
e.style.opacity = "", e.style.display = "block"
}, c = function (e) {
if (e && !e.length) return u(e);
for (var t = 0; t < e.length; ++t) u(e[t])
}, d = function (e) {
e.style.opacity = "", e.style.display = "none"
}, f = function (e) {
if (e && !e.length) return d(e);
for (var t = 0; t < e.length; ++t) d(e[t])
}, p = function (e, t) {
for (var n = t.parentNode; null !== n;) {
if (n === e) return !0;
n = n.parentNode
}
return !1
}, m = function (e) {
e.style.left = "-9999px", e.style.display = "block";
var t, n = e.clientHeight;
return t = "undefined" != typeof getComputedStyle ? parseInt(getComputedStyle(e).getPropertyValue("padding-top"), 10) : parseInt(e.currentStyle.padding), e.style.left = "", e.style.display = "none", "-" + parseInt((n + t) / 2) + "px"
}, v = function (e, t) {
if (+e.style.opacity < 1) {
t = t || 16, e.style.opacity = 0, e.style.display = "block";
var n = +new Date, o = function (e) {
function t() {
return e.apply(this, arguments)
}
return t.toString = function () {
return e.toString()
}, t
}(function () {
e.style.opacity = +e.style.opacity + (new Date - n) / 100, n = +new Date, +e.style.opacity < 1 && setTimeout(o, t)
});
o()
}
e.style.display = "block"
}, y = function (e, t) {
t = t || 16, e.style.opacity = 1;
var n = +new Date, o = function (e) {
function t() {
return e.apply(this, arguments)
}
return t.toString = function () {
return e.toString()
}, t
}(function () {
e.style.opacity = +e.style.opacity - (new Date - n) / 100, n = +new Date, +e.style.opacity > 0 ? setTimeout(o, t) : e.style.display = "none"
});
o()
}, h = function (n) {
if ("function" == typeof MouseEvent) {
var o = new MouseEvent("click", {view: e, bubbles: !1, cancelable: !0});
n.dispatchEvent(o)
} else if (t.createEvent) {
var a = t.createEvent("MouseEvents");
a.initEvent("click", !1, !1), n.dispatchEvent(a)
} else t.createEventObject ? n.fireEvent("onclick") : "function" == typeof n.onclick && n.onclick()
}, b = function (t) {
"function" == typeof t.stopPropagation ? (t.stopPropagation(), t.preventDefault()) : e.event && e.event.hasOwnProperty("cancelBubble") && (e.event.cancelBubble = !0)
};
a.hasClass = r, a.addClass = s, a.removeClass = l, a.escapeHtml = i, a._show = u, a.show = c, a._hide = d, a.hide = f, a.isDescendant = p, a.getTopMargin = m, a.fadeIn = v, a.fadeOut = y, a.fireClick = h, a.stopEventPropagation = b
}, {}], 5: [function (t, o, a) {
Object.defineProperty(a, "__esModule", {value: !0});
var r = t("./handle-dom"), s = t("./handle-swal-dom"), l = function (t, o, a) {
var l = t || e.event, i = l.keyCode || l.which, u = a.querySelector("button.confirm"),
c = a.querySelector("button.cancel"), d = a.querySelectorAll("button[tabindex]");
if (-1 !== [9, 13, 32, 27].indexOf(i)) {
for (var f = l.target || l.srcElement, p = -1, m = 0; m < d.length; m++) if (f === d[m]) {
p = m;
break
}
9 === i ? (f = -1 === p ? u : p === d.length - 1 ? d[0] : d[p + 1], r.stopEventPropagation(l), f.focus(), o.confirmButtonColor && s.setFocusStyle(f, o.confirmButtonColor)) : 13 === i ? ("INPUT" === f.tagName && (f = u, u.focus()), f = -1 === p ? u : n) : 27 === i && o.allowEscapeKey === !0 ? (f = c, r.fireClick(f, l)) : f = n
}
};
a["default"] = l, o.exports = a["default"]
}, {"./handle-dom": 4, "./handle-swal-dom": 6}], 6: [function (n, o, a) {
var r = function (e) {
return e && e.__esModule ? e : {"default": e}
};
Object.defineProperty(a, "__esModule", {value: !0});
var s = n("./utils"), l = n("./handle-dom"), i = n("./default-params"), u = r(i), c = n("./injected-html"),
d = r(c), f = ".sweet-alert", p = ".sweet-overlay", m = function () {
var e = t.createElement("div");
for (e.innerHTML = d["default"]; e.firstChild;) t.body.appendChild(e.firstChild)
}, v = function (e) {
function t() {
return e.apply(this, arguments)
}
return t.toString = function () {
return e.toString()
}, t
}(function () {
var e = t.querySelector(f);
return e || (m(), e = v()), e
}), y = function () {
var e = v();
return e ? e.querySelector("input") : void 0
}, h = function () {
return t.querySelector(p)
}, b = function (e, t) {
var n = s.hexToRgb(t);
e.style.boxShadow = "0 0 2px rgba(" + n + ", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"
}, g = function (n) {
var o = v();
l.fadeIn(h(), 10), l.show(o), l.addClass(o, "showSweetAlert"), l.removeClass(o, "hideSweetAlert"), e.previousActiveElement = t.activeElement;
var a = o.querySelector("button.confirm");
a.focus(), setTimeout(function () {
l.addClass(o, "visible")
}, 500);
var r = o.getAttribute("data-timer");
if ("null" !== r && "" !== r) {
var s = n;
o.timeout = setTimeout(function () {
var e = (s || null) && "true" === o.getAttribute("data-has-done-function");
e ? s(null) : sweetAlert.close()
}, r)
}
}, w = function () {
var e = v(), t = y();
l.removeClass(e, "show-input"), t.value = u["default"].inputValue, t.setAttribute("type", u["default"].inputType), t.setAttribute("placeholder", u["default"].inputPlaceholder), C()
}, C = function (e) {
if (e && 13 === e.keyCode) return !1;
var t = v(), n = t.querySelector(".sa-input-error");
l.removeClass(n, "show");
var o = t.querySelector(".sa-error-container");
l.removeClass(o, "show")
}, S = function () {
var e = v();
e.style.marginTop = l.getTopMargin(v())
};
a.sweetAlertInitialize = m, a.getModal = v, a.getOverlay = h, a.getInput = y, a.setFocusStyle = b, a.openModal = g, a.resetInput = w, a.resetInputError = C, a.fixVerticalPosition = S
}, {"./default-params": 2, "./handle-dom": 4, "./injected-html": 7, "./utils": 9}], 7: [function (e, t, n) {
Object.defineProperty(n, "__esModule", {value: !0});
var o = '
\n \n \n \n \n
\n \n \n
\n \n \n\n \n \n
Title
\n
Text
\n
\n
!
\n
Not valid!
\n
\n \n
\n
\n \n \n \n
\n
\n
';
n["default"] = o, t.exports = n["default"]
}, {}], 8: [function (e, t, o) {
Object.defineProperty(o, "__esModule", {value: !0});
var a = e("./utils"), r = e("./handle-swal-dom"), s = e("./handle-dom"),
l = ["error", "warning", "info", "success", "input", "prompt"], i = function (e) {
var t = r.getModal(), o = t.querySelector("h2"), i = t.querySelector("p"),
u = t.querySelector("button.cancel"), c = t.querySelector("button.confirm");
if (o.innerHTML = e.html ? e.title : s.escapeHtml(e.title).split("\n").join(" "), i.innerHTML = e.html ? e.text : s.escapeHtml(e.text || "").split("\n").join(" "), e.text && s.show(i), e.customClass) s.addClass(t, e.customClass), t.setAttribute("data-custom-class", e.customClass); else {
var d = t.getAttribute("data-custom-class");
s.removeClass(t, d), t.setAttribute("data-custom-class", "")
}
if (s.hide(t.querySelectorAll(".sa-icon")), e.type && !a.isIE8()) {
var f = function () {
for (var o = !1, a = 0; a < l.length; a++) if (e.type === l[a]) {
o = !0;
break
}
if (!o) return logStr("Unknown alert type: " + e.type), {v: !1};
var i = ["success", "error", "warning", "info"], u = n;
-1 !== i.indexOf(e.type) && (u = t.querySelector(".sa-icon.sa-" + e.type), s.show(u));
var c = r.getInput();
switch (e.type) {
case"success":
s.addClass(u, "animate"), s.addClass(u.querySelector(".sa-tip"), "animateSuccessTip"), s.addClass(u.querySelector(".sa-long"), "animateSuccessLong");
break;
case"error":
s.addClass(u, "animateErrorIcon"), s.addClass(u.querySelector(".sa-x-mark"), "animateXMark");
break;
case"warning":
s.addClass(u, "pulseWarning"), s.addClass(u.querySelector(".sa-body"), "pulseWarningIns"), s.addClass(u.querySelector(".sa-dot"), "pulseWarningIns");
break;
case"input":
case"prompt":
c.setAttribute("type", e.inputType), c.value = e.inputValue, c.setAttribute("placeholder", e.inputPlaceholder), s.addClass(t, "show-input"), setTimeout(function () {
c.focus(), c.addEventListener("keyup", swal.resetInputError)
}, 400)
}
}();
if ("object" == typeof f) return f.v
}
if (e.imageUrl) {
var p = t.querySelector(".sa-icon.sa-custom");
p.style.backgroundImage = "url(" + e.imageUrl + ")", s.show(p);
var m = 80, v = 80;
if (e.imageSize) {
var y = e.imageSize.toString().split("x"), h = y[0], b = y[1];
h && b ? (m = h, v = b) : logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got " + e.imageSize)
}
p.setAttribute("style", p.getAttribute("style") + "width:" + m + "px; height:" + v + "px")
}
t.setAttribute("data-has-cancel-button", e.showCancelButton), e.showCancelButton ? u.style.display = "inline-block" : s.hide(u), t.setAttribute("data-has-confirm-button", e.showConfirmButton), e.showConfirmButton ? c.style.display = "inline-block" : s.hide(c), e.cancelButtonText && (u.innerHTML = s.escapeHtml(e.cancelButtonText)), e.confirmButtonText && (c.innerHTML = s.escapeHtml(e.confirmButtonText)), e.confirmButtonColor && (c.style.backgroundColor = e.confirmButtonColor, c.style.borderLeftColor = e.confirmLoadingButtonColor, c.style.borderRightColor = e.confirmLoadingButtonColor, r.setFocusStyle(c, e.confirmButtonColor)), t.setAttribute("data-allow-outside-click", e.allowOutsideClick);
var g = e.doneFunction ? !0 : !1;
t.setAttribute("data-has-done-function", g), e.animation ? "string" == typeof e.animation ? t.setAttribute("data-animation", e.animation) : t.setAttribute("data-animation", "pop") : t.setAttribute("data-animation", "none"), t.setAttribute("data-timer", e.timer)
};
o["default"] = i, t.exports = o["default"]
}, {"./handle-dom": 4, "./handle-swal-dom": 6, "./utils": 9}], 9: [function (t, n, o) {
Object.defineProperty(o, "__esModule", {value: !0});
var a = function (e, t) {
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
return e
}, r = function (e) {
var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
return t ? parseInt(t[1], 16) + ", " + parseInt(t[2], 16) + ", " + parseInt(t[3], 16) : null
}, s = function () {
return e.attachEvent && !e.addEventListener
}, l = function (t) {
e.console && e.console.log("SweetAlert: " + t)
}, i = function (e, t) {
e = String(e).replace(/[^0-9a-f]/gi, ""), e.length < 6 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), t = t || 0;
var n, o, a = "#";
for (o = 0; 3 > o; o++) n = parseInt(e.substr(2 * o, 2), 16), n = Math.round(Math.min(Math.max(0, n + n * t), 255)).toString(16), a += ("00" + n).substr(n.length);
return a
};
o.extend = a, o.hexToRgb = r, o.isIE8 = s, o.logStr = l, o.colorLuminance = i
}, {}]
}, {}, [1]), "function" == typeof define && define.amd ? define(function () {
return sweetAlert
}) : "undefined" != typeof module && module.exports && (module.exports = sweetAlert)
}(window, document);
/*!
* Bootstrap v3.3.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery");
+function (a) {
var b = a.fn.jquery.split(" ")[0].split(".");
if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")
}(jQuery), +function (a) {
"use strict";
function b() {
var a = document.createElement("bootstrap"), b = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var c in b) if (void 0 !== a.style[c]) return {end: b[c]};
return !1
}
a.fn.emulateTransitionEnd = function (b) {
var c = !1, d = this;
a(this).one("bsTransitionEnd", function () {
c = !0
});
var e = function () {
c || a(d).trigger(a.support.transition.end)
};
return setTimeout(e, b), this
}, a(function () {
a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = {
bindType: a.support.transition.end,
delegateType: a.support.transition.end,
handle: function (b) {
return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0
}
})
})
}(jQuery), +function (a) {
"use strict";
function b(b) {
return this.each(function () {
var c = a(this), e = c.data("bs.alert");
e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c)
})
}
var c = '[data-dismiss="alert"]', d = function (b) {
a(b).on("click", c, this.close)
};
d.VERSION = "3.3.1", d.TRANSITION_DURATION = 150, d.prototype.close = function (b) {
function c() {
g.detach().trigger("closed.bs.alert").remove()
}
var e = a(this), f = e.attr("data-target");
f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, ""));
var g = a(f);
b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c())
};
var e = a.fn.alert;
a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function () {
return a.fn.alert = e, this
}, a(document).on("click.bs.alert.data-api", c, d.prototype.close)
}(jQuery), +function (a) {
"use strict";
function b(b) {
return this.each(function () {
var d = a(this), e = d.data("bs.button"), f = "object" == typeof b && b;
e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b)
})
}
var c = function (b, d) {
this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1
};
c.VERSION = "3.3.1", c.DEFAULTS = {loadingText: "loading..."}, c.prototype.setState = function (b) {
var c = "disabled", d = this.$element, e = d.is("input") ? "val" : "html", f = d.data();
b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function () {
d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c))
}, this), 0)
}, c.prototype.toggle = function () {
var a = !0, b = this.$element.closest('[data-toggle="buttons"]');
if (b.length) {
var c = this.$element.find("input");
"radio" == c.prop("type") && (c.prop("checked") && this.$element.hasClass("active") ? a = !1 : b.find(".active").removeClass("active")), a && c.prop("checked", !this.$element.hasClass("active")).trigger("change")
} else this.$element.attr("aria-pressed", !this.$element.hasClass("active"));
a && this.$element.toggleClass("active")
};
var d = a.fn.button;
a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function () {
return a.fn.button = d, this
}, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function (c) {
var d = a(c.target);
d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), c.preventDefault()
}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function (b) {
a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))
})
}(jQuery), +function (a) {
"use strict";
function b(b) {
return this.each(function () {
var d = a(this), e = d.data("bs.carousel"),
f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b),
g = "string" == typeof b ? b : f.slide;
e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()
})
}
var c = function (b, c) {
this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = this.sliding = this.interval = this.$active = this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this))
};
c.VERSION = "3.3.1", c.TRANSITION_DURATION = 600, c.DEFAULTS = {
interval: 5e3,
pause: "hover",
wrap: !0,
keyboard: !0
}, c.prototype.keydown = function (a) {
if (!/input|textarea/i.test(a.target.tagName)) {
switch (a.which) {
case 37:
this.prev();
break;
case 39:
this.next();
break;
default:
return
}
a.preventDefault()
}
}, c.prototype.cycle = function (b) {
return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this
}, c.prototype.getItemIndex = function (a) {
return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active)
}, c.prototype.getItemForDirection = function (a, b) {
var c = "prev" == a ? -1 : 1, d = this.getItemIndex(b), e = (d + c) % this.$items.length;
return this.$items.eq(e)
}, c.prototype.to = function (a) {
var b = this, c = this.getItemIndex(this.$active = this.$element.find(".item.active"));
return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function () {
b.to(a)
}) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a))
}, c.prototype.pause = function (b) {
return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
}, c.prototype.next = function () {
return this.sliding ? void 0 : this.slide("next")
}, c.prototype.prev = function () {
return this.sliding ? void 0 : this.slide("prev")
}, c.prototype.slide = function (b, d) {
var e = this.$element.find(".item.active"), f = d || this.getItemForDirection(b, e), g = this.interval,
h = "next" == b ? "left" : "right", i = "next" == b ? "first" : "last", j = this;
if (!f.length) {
if (!this.options.wrap) return;
f = this.$element.find(".item")[i]()
}
if (f.hasClass("active")) return this.sliding = !1;
var k = f[0], l = a.Event("slide.bs.carousel", {relatedTarget: k, direction: h});
if (this.$element.trigger(l), !l.isDefaultPrevented()) {
if (this.sliding = !0, g && this.pause(), this.$indicators.length) {
this.$indicators.find(".active").removeClass("active");
var m = a(this.$indicators.children()[this.getItemIndex(f)]);
m && m.addClass("active")
}
var n = a.Event("slid.bs.carousel", {relatedTarget: k, direction: h});
return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function () {
f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), j.sliding = !1, setTimeout(function () {
j.$element.trigger(n)
}, 0)
}).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(n)), g && this.cycle(), this
}
};
var d = a.fn.carousel;
a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function () {
return a.fn.carousel = d, this
};
var e = function (c) {
var d, e = a(this), f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));
if (f.hasClass("carousel")) {
var g = a.extend({}, f.data(), e.data()), h = e.attr("data-slide-to");
h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault()
}
};
a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function () {
a('[data-ride="carousel"]').each(function () {
var c = a(this);
b.call(c, c.data())
})
})
}(jQuery), +function (a) {
"use strict";
function b(b) {
var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "");
return a(d)
}
function c(b) {
return this.each(function () {
var c = a(this), e = c.data("bs.collapse"),
f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b);
!e && f.toggle && "show" == b && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]()
})
}
var d = function (b, c) {
this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a(this.options.trigger).filter('[href="#' + b.id + '"], [data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
};
d.VERSION = "3.3.1", d.TRANSITION_DURATION = 350, d.DEFAULTS = {
toggle: !0,
trigger: '[data-toggle="collapse"]'
}, d.prototype.dimension = function () {
var a = this.$element.hasClass("width");
return a ? "width" : "height"
}, d.prototype.show = function () {
if (!this.transitioning && !this.$element.hasClass("in")) {
var b, e = this.$parent && this.$parent.find("> .panel").children(".in, .collapsing");
if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) {
var f = a.Event("show.bs.collapse");
if (this.$element.trigger(f), !f.isDefaultPrevented()) {
e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null));
var g = this.dimension();
this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
var h = function () {
this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
};
if (!a.support.transition) return h.call(this);
var i = a.camelCase(["scroll", g].join("-"));
this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])
}
}
}
}, d.prototype.hide = function () {
if (!this.transitioning && this.$element.hasClass("in")) {
var b = a.Event("hide.bs.collapse");
if (this.$element.trigger(b), !b.isDefaultPrevented()) {
var c = this.dimension();
this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
var e = function () {
this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
};
return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this)
}
}
}, d.prototype.toggle = function () {
this[this.$element.hasClass("in") ? "hide" : "show"]()
}, d.prototype.getParent = function () {
return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function (c, d) {
var e = a(d);
this.addAriaAndCollapsedClass(b(e), e)
}, this)).end()
}, d.prototype.addAriaAndCollapsedClass = function (a, b) {
var c = a.hasClass("in");
a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c)
};
var e = a.fn.collapse;
a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function () {
return a.fn.collapse = e, this
}, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function (d) {
var e = a(this);
e.attr("data-target") || d.preventDefault();
var f = b(e), g = f.data("bs.collapse"), h = g ? "toggle" : a.extend({}, e.data(), {trigger: this});
c.call(f, h)
})
}(jQuery), +function (a) {
"use strict";
function b(b) {
b && 3 === b.which || (a(e).remove(), a(f).each(function () {
var d = a(this), e = c(d), f = {relatedTarget: this};
e.hasClass("open") && (e.trigger(b = a.Event("hide.bs.dropdown", f)), b.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger("hidden.bs.dropdown", f)))
}))
}
function c(b) {
var c = b.attr("data-target");
c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ""));
var d = c && a(c);
return d && d.length ? d : b.parent()
}
function d(b) {
return this.each(function () {
var c = a(this), d = c.data("bs.dropdown");
d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c)
})
}
var e = ".dropdown-backdrop", f = '[data-toggle="dropdown"]', g = function (b) {
a(b).on("click.bs.dropdown", this.toggle)
};
g.VERSION = "3.3.1", g.prototype.toggle = function (d) {
var e = a(this);
if (!e.is(".disabled, :disabled")) {
var f = c(e), g = f.hasClass("open");
if (b(), !g) {
"ontouchstart" in document.documentElement && !f.closest(".navbar-nav").length && a('').insertAfter(a(this)).on("click", b);
var h = {relatedTarget: this};
if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented()) return;
e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger("shown.bs.dropdown", h)
}
return !1
}
}, g.prototype.keydown = function (b) {
if (/(38|40|27|32)/.test(b.which) && !/input|textarea/i.test(b.target.tagName)) {
var d = a(this);
if (b.preventDefault(), b.stopPropagation(), !d.is(".disabled, :disabled")) {
var e = c(d), g = e.hasClass("open");
if (!g && 27 != b.which || g && 27 == b.which) return 27 == b.which && e.find(f).trigger("focus"), d.trigger("click");
var h = " li:not(.divider):visible a", i = e.find('[role="menu"]' + h + ', [role="listbox"]' + h);
if (i.length) {
var j = i.index(b.target);
38 == b.which && j > 0 && j--, 40 == b.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus")
}
}
}
};
var h = a.fn.dropdown;
a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function () {
return a.fn.dropdown = h, this
}, a(document).on("click.bs.dropdown.data-api", b).on("click.bs.dropdown.data-api", ".dropdown form", function (a) {
a.stopPropagation()
}).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", '[role="menu"]', g.prototype.keydown).on("keydown.bs.dropdown.data-api", '[role="listbox"]', g.prototype.keydown)
}(jQuery), +function (a) {
"use strict";
function b(b, d) {
return this.each(function () {
var e = a(this), f = e.data("bs.modal"), g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b);
f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d)
})
}
var c = function (b, c) {
this.options = c, this.$body = a(document.body), this.$element = a(b), this.$backdrop = this.isShown = null, this.scrollbarWidth = 0, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function () {
this.$element.trigger("loaded.bs.modal")
}, this))
};
c.VERSION = "3.3.1", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = {
backdrop: !0,
keyboard: !0,
show: !0
}, c.prototype.toggle = function (a) {
return this.isShown ? this.hide() : this.show(a)
}, c.prototype.show = function (b) {
var d = this, e = a.Event("show.bs.modal", {relatedTarget: b});
this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.backdrop(function () {
var e = a.support.transition && d.$element.hasClass("fade");
d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.options.backdrop && d.adjustBackdrop(), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in").attr("aria-hidden", !1), d.enforceFocus();
var f = a.Event("shown.bs.modal", {relatedTarget: b});
e ? d.$element.find(".modal-dialog").one("bsTransitionEnd", function () {
d.$element.trigger("focus").trigger(f)
}).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f)
}))
}, c.prototype.hide = function (b) {
b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal())
}, c.prototype.enforceFocus = function () {
a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) {
this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")
}, this))
}, c.prototype.escape = function () {
this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function (a) {
27 == a.which && this.hide()
}, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
}, c.prototype.resize = function () {
this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal")
}, c.prototype.hideModal = function () {
var a = this;
this.$element.hide(), this.backdrop(function () {
a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal")
})
}, c.prototype.removeBackdrop = function () {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
}, c.prototype.backdrop = function (b) {
var d = this, e = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var f = a.support.transition && e;
if (this.$backdrop = a('').prependTo(this.$element).on("click.dismiss.bs.modal", a.proxy(function (a) {
a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this))
}, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return;
f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass("in");
var g = function () {
d.removeBackdrop(), b && b()
};
a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g()
} else b && b()
}, c.prototype.handleUpdate = function () {
this.options.backdrop && this.adjustBackdrop(), this.adjustDialog()
}, c.prototype.adjustBackdrop = function () {
this.$backdrop.css("height", 0).css("height", this.$element[0].scrollHeight)
}, c.prototype.adjustDialog = function () {
var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "",
paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""
})
}, c.prototype.resetAdjustments = function () {
this.$element.css({paddingLeft: "", paddingRight: ""})
}, c.prototype.checkScrollbar = function () {
this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight, this.scrollbarWidth = this.measureScrollbar()
}, c.prototype.setScrollbar = function () {
var a = parseInt(this.$body.css("padding-right") || 0, 10);
this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)
}, c.prototype.resetScrollbar = function () {
this.$body.css("padding-right", "")
}, c.prototype.measureScrollbar = function () {
var a = document.createElement("div");
a.className = "modal-scrollbar-measure", this.$body.append(a);
var b = a.offsetWidth - a.clientWidth;
return this.$body[0].removeChild(a), b
};
var d = a.fn.modal;
a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function () {
return a.fn.modal = d, this
}, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (c) {
var d = a(this), e = d.attr("href"), f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")),
g = f.data("bs.modal") ? "toggle" : a.extend({remote: !/#/.test(e) && e}, f.data(), d.data());
d.is("a") && c.preventDefault(), f.one("show.bs.modal", function (a) {
a.isDefaultPrevented() || f.one("hidden.bs.modal", function () {
d.is(":visible") && d.trigger("focus")
})
}), b.call(f, g, this)
})
}(jQuery), +function (a) {
"use strict";
function b(b) {
return this.each(function () {
var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof b && b, g = f && f.selector;
(e || "destroy" != b) && (g ? (e || d.data("bs.tooltip", e = {}), e[g] || (e[g] = new c(this, f))) : e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]())
})
}
var c = function (a, b) {
this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null, this.init("tooltip", a, b)
};
c.VERSION = "3.3.1", c.TRANSITION_DURATION = 150, c.DEFAULTS = {
animation: !0,
placement: "top",
selector: !1,
template: '
',
trigger: "hover focus",
title: "",
delay: 0,
html: !1,
container: !1,
viewport: {selector: "body", padding: 0}
}, c.prototype.init = function (b, c, d) {
this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(this.options.viewport.selector || this.options.viewport);
for (var e = this.options.trigger.split(" "), f = e.length; f--;) {
var g = e[f];
if ("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g) {
var h = "hover" == g ? "mouseenter" : "focusin", i = "hover" == g ? "mouseleave" : "focusout";
this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this))
}
}
this.options.selector ? this._options = a.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle()
}, c.prototype.getDefaults = function () {
return c.DEFAULTS
}, c.prototype.getOptions = function (b) {
return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {
show: b.delay,
hide: b.delay
}), b
}, c.prototype.getDelegateOptions = function () {
var b = {}, c = this.getDefaults();
return this._options && a.each(this._options, function (a, d) {
c[a] != d && (b[a] = d)
}), b
}, c.prototype.enter = function (b) {
var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
return c && c.$tip && c.$tip.is(":visible") ? void(c.hoverState = "in") : (c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void(c.timeout = setTimeout(function () {
"in" == c.hoverState && c.show()
}, c.options.delay.show)) : c.show())
}, c.prototype.leave = function (b) {
var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void(c.timeout = setTimeout(function () {
"out" == c.hoverState && c.hide()
}, c.options.delay.hide)) : c.hide()
}, c.prototype.show = function () {
var b = a.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
this.$element.trigger(b);
var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
if (b.isDefaultPrevented() || !d) return;
var e = this, f = this.tip(), g = this.getUID(this.type);
this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");
var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement,
i = /\s?auto?\s?/i, j = i.test(h);
j && (h = h.replace(i, "") || "top"), f.detach().css({
top: 0,
left: 0,
display: "block"
}).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element);
var k = this.getPosition(), l = f[0].offsetWidth, m = f[0].offsetHeight;
if (j) {
var n = h, o = this.options.container ? a(this.options.container) : this.$element.parent(),
p = this.getPosition(o);
h = "bottom" == h && k.bottom + m > p.bottom ? "top" : "top" == h && k.top - m < p.top ? "bottom" : "right" == h && k.right + l > p.width ? "left" : "left" == h && k.left - l < p.left ? "right" : h, f.removeClass(n).addClass(h)
}
var q = this.getCalculatedOffset(h, k, l, m);
this.applyPlacement(q, h);
var r = function () {
var a = e.hoverState;
e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e)
};
a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", r).emulateTransitionEnd(c.TRANSITION_DURATION) : r()
}
}, c.prototype.applyPlacement = function (b, c) {
var d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10),
h = parseInt(d.css("margin-left"), 10);
isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top = b.top + g, b.left = b.left + h, a.offset.setOffset(d[0], a.extend({
using: function (a) {
d.css({top: Math.round(a.top), left: Math.round(a.left)})
}
}, b), 0), d.addClass("in");
var i = d[0].offsetWidth, j = d[0].offsetHeight;
"top" == c && j != f && (b.top = b.top + f - j);
var k = this.getViewportAdjustedDelta(c, b, i, j);
k.left ? b.left += k.left : b.top += k.top;
var l = /top|bottom/.test(c), m = l ? 2 * k.left - e + i : 2 * k.top - f + j,
n = l ? "offsetWidth" : "offsetHeight";
d.offset(b), this.replaceArrow(m, d[0][n], l)
}, c.prototype.replaceArrow = function (a, b, c) {
this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "")
}, c.prototype.setContent = function () {
var a = this.tip(), b = this.getTitle();
a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right")
}, c.prototype.hide = function (b) {
function d() {
"in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b()
}
var e = this, f = this.tip(), g = a.Event("hide.bs." + this.type);
return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass("in"), a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this)
}, c.prototype.fixTitle = function () {
var a = this.$element;
(a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")
}, c.prototype.hasContent = function () {
return this.getTitle()
}, c.prototype.getPosition = function (b) {
b = b || this.$element;
var c = b[0], d = "BODY" == c.tagName, e = c.getBoundingClientRect();
null == e.width && (e = a.extend({}, e, {width: e.right - e.left, height: e.bottom - e.top}));
var f = d ? {top: 0, left: 0} : b.offset(),
g = {scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop()},
h = d ? {width: a(window).width(), height: a(window).height()} : null;
return a.extend({}, e, g, h, f)
}, c.prototype.getCalculatedOffset = function (a, b, c, d) {
return "bottom" == a ? {
top: b.top + b.height,
left: b.left + b.width / 2 - c / 2
} : "top" == a ? {
top: b.top - d,
left: b.left + b.width / 2 - c / 2
} : "left" == a ? {top: b.top + b.height / 2 - d / 2, left: b.left - c} : {
top: b.top + b.height / 2 - d / 2,
left: b.left + b.width
}
}, c.prototype.getViewportAdjustedDelta = function (a, b, c, d) {
var e = {top: 0, left: 0};
if (!this.$viewport) return e;
var f = this.options.viewport && this.options.viewport.padding || 0, g = this.getPosition(this.$viewport);
if (/right|left/.test(a)) {
var h = b.top - f - g.scroll, i = b.top + f - g.scroll + d;
h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i)
} else {
var j = b.left - f, k = b.left + f + c;
j < g.left ? e.left = g.left - j : k > g.width && (e.left = g.left + g.width - k)
}
return e
}, c.prototype.getTitle = function () {
var a, b = this.$element, c = this.options;
return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title)
}, c.prototype.getUID = function (a) {
do a += ~~(1e6 * Math.random()); while (document.getElementById(a));
return a
}, c.prototype.tip = function () {
return this.$tip = this.$tip || a(this.options.template)
}, c.prototype.arrow = function () {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}, c.prototype.enable = function () {
this.enabled = !0
}, c.prototype.disable = function () {
this.enabled = !1
}, c.prototype.toggleEnabled = function () {
this.enabled = !this.enabled
}, c.prototype.toggle = function (b) {
var c = this;
b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), c.tip().hasClass("in") ? c.leave(c) : c.enter(c)
}, c.prototype.destroy = function () {
var a = this;
clearTimeout(this.timeout), this.hide(function () {
a.$element.off("." + a.type).removeData("bs." + a.type)
})
};
var d = a.fn.tooltip;
a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function () {
return a.fn.tooltip = d, this
}
}(jQuery), +function (a) {
"use strict";
function b(b) {
return this.each(function () {
var d = a(this), e = d.data("bs.popover"), f = "object" == typeof b && b, g = f && f.selector;
(e || "destroy" != b) && (g ? (e || d.data("bs.popover", e = {}), e[g] || (e[g] = new c(this, f))) : e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]())
})
}
var c = function (a, b) {
this.init("popover", a, b)
};
if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js");
c.VERSION = "3.3.1", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
placement: "right",
trigger: "click",
content: "",
template: '
'
}), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function () {
return c.DEFAULTS
}, c.prototype.setContent = function () {
var a = this.tip(), b = this.getTitle(), c = this.getContent();
a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide()
}, c.prototype.hasContent = function () {
return this.getTitle() || this.getContent()
}, c.prototype.getContent = function () {
var a = this.$element, b = this.options;
return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content)
}, c.prototype.arrow = function () {
return this.$arrow = this.$arrow || this.tip().find(".arrow")
}, c.prototype.tip = function () {
return this.$tip || (this.$tip = a(this.options.template)), this.$tip
};
var d = a.fn.popover;
a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function () {
return a.fn.popover = d, this
}
}(jQuery), +function (a) {
"use strict";
function b(c, d) {
var e = a.proxy(this.process, this);
this.$body = a("body"), this.$scrollElement = a(a(c).is("body") ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", e), this.refresh(), this.process()
}
function c(c) {
return this.each(function () {
var d = a(this), e = d.data("bs.scrollspy"), f = "object" == typeof c && c;
e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]()
})
}
b.VERSION = "3.3.1", b.DEFAULTS = {offset: 10}, b.prototype.getScrollHeight = function () {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}, b.prototype.refresh = function () {
var b = "offset", c = 0;
a.isWindow(this.$scrollElement[0]) || (b = "position", c = this.$scrollElement.scrollTop()), this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight();
var d = this;
this.$body.find(this.selector).map(function () {
var d = a(this), e = d.data("target") || d.attr("href"), f = /^#./.test(e) && a(e);
return f && f.length && f.is(":visible") && [[f[b]().top + c, e]] || null
}).sort(function (a, b) {
return a[0] - b[0]
}).each(function () {
d.offsets.push(this[0]), d.targets.push(this[1])
})
}, b.prototype.process = function () {
var a, b = this.$scrollElement.scrollTop() + this.options.offset, c = this.getScrollHeight(),
d = this.options.offset + c - this.$scrollElement.height(), e = this.offsets, f = this.targets,
g = this.activeTarget;
if (this.scrollHeight != c && this.refresh(), b >= d) return g != (a = f[f.length - 1]) && this.activate(a);
if (g && b < e[0]) return this.activeTarget = null, this.clear();
for (a = e.length; a--;) g != f[a] && b >= e[a] && (!e[a + 1] || b <= e[a + 1]) && this.activate(f[a])
}, b.prototype.activate = function (b) {
this.activeTarget = b, this.clear();
var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]',
d = a(c).parents("li").addClass("active");
d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy")
}, b.prototype.clear = function () {
a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
};
var d = a.fn.scrollspy;
a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function () {
return a.fn.scrollspy = d, this
}, a(window).on("load.bs.scrollspy.data-api", function () {
a('[data-spy="scroll"]').each(function () {
var b = a(this);
c.call(b, b.data())
})
})
}(jQuery), +function (a) {
"use strict";
function b(b) {
return this.each(function () {
var d = a(this), e = d.data("bs.tab");
e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]()
})
}
var c = function (b) {
this.element = a(b)
};
c.VERSION = "3.3.1", c.TRANSITION_DURATION = 150, c.prototype.show = function () {
var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target");
if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {
var e = c.find(".active:last a"), f = a.Event("hide.bs.tab", {relatedTarget: b[0]}),
g = a.Event("show.bs.tab", {relatedTarget: e[0]});
if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {
var h = a(d);
this.activate(b.closest("li"), c), this.activate(h, h.parent(), function () {
e.trigger({type: "hidden.bs.tab", relatedTarget: b[0]}), b.trigger({
type: "shown.bs.tab",
relatedTarget: e[0]
})
})
}
}
}, c.prototype.activate = function (b, d, e) {
function f() {
g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu") && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e()
}
var g = d.find("> .active"),
h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length);
g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in")
};
var d = a.fn.tab;
a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function () {
return a.fn.tab = d, this
};
var e = function (c) {
c.preventDefault(), b.call(a(this), "show")
};
a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)
}(jQuery), +function (a) {
"use strict";
function b(b) {
return this.each(function () {
var d = a(this), e = d.data("bs.affix"), f = "object" == typeof b && b;
e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]()
})
}
var c = function (b, d) {
this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = this.unpin = this.pinnedOffset = null, this.checkPosition()
};
c.VERSION = "3.3.1", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = {
offset: 0,
target: window
}, c.prototype.getState = function (a, b, c, d) {
var e = this.$target.scrollTop(), f = this.$element.offset(), g = this.$target.height();
if (null != c && "top" == this.affixed) return c > e ? "top" : !1;
if ("bottom" == this.affixed) return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom";
var h = null == this.affixed, i = h ? e : f.top, j = h ? g : b;
return null != c && c >= i ? "top" : null != d && i + j >= a - d ? "bottom" : !1
}, c.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset;
this.$element.removeClass(c.RESET).addClass("affix");
var a = this.$target.scrollTop(), b = this.$element.offset();
return this.pinnedOffset = b.top - a
}, c.prototype.checkPositionWithEventLoop = function () {
setTimeout(a.proxy(this.checkPosition, this), 1)
}, c.prototype.checkPosition = function () {
if (this.$element.is(":visible")) {
var b = this.$element.height(), d = this.options.offset, e = d.top, f = d.bottom, g = a("body").height();
"object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));
var h = this.getState(g, b, e, f);
if (this.affixed != h) {
null != this.unpin && this.$element.css("top", "");
var i = "affix" + (h ? "-" + h : ""), j = a.Event(i + ".bs.affix");
if (this.$element.trigger(j), j.isDefaultPrevented()) return;
this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix")
}
"bottom" == h && this.$element.offset({top: g - b - f})
}
};
var d = a.fn.affix;
a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function () {
return a.fn.affix = d, this
}, a(window).on("load", function () {
a('[data-spy="affix"]').each(function () {
var c = a(this), d = c.data();
d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d)
})
})
}(jQuery);
/*
* metismenu - v2.0.2
* A jQuery menu plugin
* https://github.com/onokumus/metisMenu
*
* Made by Osman Nuri Okumus
* Under MIT License
*/
!function (a) {
"use strict";
function b() {
var a = document.createElement("mm"), b = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var c in b) if (void 0 !== a.style[c]) return {end: b[c]};
return !1
}
function c(b) {
return this.each(function () {
var c = a(this), d = c.data("mm"), f = a.extend({}, e.DEFAULTS, c.data(), "object" == typeof b && b);
d || c.data("mm", d = new e(this, f)), "string" == typeof b && d[b]()
})
}
a.fn.emulateTransitionEnd = function (b) {
var c = !1, e = this;
a(this).one("mmTransitionEnd", function () {
c = !0
});
var f = function () {
c || a(e).trigger(d.end)
};
return setTimeout(f, b), this
};
var d = b();
d && (a.event.special.mmTransitionEnd = {
bindType: d.end, delegateType: d.end, handle: function (b) {
return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0
}
});
var e = function (b, c) {
this.$element = a(b), this.options = a.extend({}, e.DEFAULTS, c), this.transitioning = null, this.init()
};
e.TRANSITION_DURATION = 350, e.DEFAULTS = {
toggle: !0,
doubleTapToGo: !1,
activeClass: "active"
}, e.prototype.init = function () {
var b = this, c = this.options.activeClass;
this.$element.find("li." + c).has("ul").children("ul").addClass("collapse in"), this.$element.find("li").not("." + c).has("ul").children("ul").addClass("collapse"), this.options.doubleTapToGo && this.$element.find("li." + c).has("ul").children("a").addClass("doubleTapToGo"), this.$element.find("li").has("ul").children("a").on("click.metisMenu", function (d) {
var e = a(this), f = e.parent("li"), g = f.children("ul");
return d.preventDefault(), f.hasClass(c) ? b.hide(g) : b.show(g), b.options.doubleTapToGo && b.doubleTapToGo(e) && "#" !== e.attr("href") && "" !== e.attr("href") ? (d.stopPropagation(), void(document.location = e.attr("href"))) : void 0
})
}, e.prototype.doubleTapToGo = function (a) {
var b = this.$element;
return a.hasClass("doubleTapToGo") ? (a.removeClass("doubleTapToGo"), !0) : a.parent().children("ul").length ? (b.find(".doubleTapToGo").removeClass("doubleTapToGo"), a.addClass("doubleTapToGo"), !1) : void 0
}, e.prototype.show = function (b) {
var c = this.options.activeClass, f = a(b), g = f.parent("li");
if (!this.transitioning && !f.hasClass("in")) {
g.addClass(c), this.options.toggle && this.hide(g.siblings().children("ul.in")), f.removeClass("collapse").addClass("collapsing").height(0), this.transitioning = 1;
var h = function () {
f.removeClass("collapsing").addClass("collapse in").height(""), this.transitioning = 0
};
return d ? void f.one("mmTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(e.TRANSITION_DURATION).height(f[0].scrollHeight) : h.call(this)
}
}, e.prototype.hide = function (b) {
var c = this.options.activeClass, f = a(b);
if (!this.transitioning && f.hasClass("in")) {
f.parent("li").removeClass(c), f.height(f.height())[0].offsetHeight, f.addClass("collapsing").removeClass("collapse").removeClass("in"), this.transitioning = 1;
var g = function () {
this.transitioning = 0, f.removeClass("collapsing").addClass("collapse")
};
return d ? void f.height(0).one("mmTransitionEnd", a.proxy(g, this)).emulateTransitionEnd(e.TRANSITION_DURATION) : g.call(this)
}
};
var f = a.fn.metisMenu;
a.fn.metisMenu = c, a.fn.metisMenu.Constructor = e, a.fn.metisMenu.noConflict = function () {
return a.fn.metisMenu = f, this
}
}(jQuery);
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.3.6
*
*/
(function (e) {
e.fn.extend({
slimScroll: function (g) {
var a = e.extend({
width: "auto",
height: "250px",
size: "7px",
color: "#000",
position: "right",
distance: "1px",
start: "top",
opacity: .4,
alwaysVisible: !1,
disableFadeOut: !1,
railVisible: !1,
railColor: "#333",
railOpacity: .2,
railDraggable: !0,
railClass: "slimScrollRail",
barClass: "slimScrollBar",
wrapperClass: "slimScrollDiv",
allowPageScroll: !1,
wheelStep: 20,
touchScrollStep: 200,
borderRadius: "7px",
railBorderRadius: "7px"
}, g);
this.each(function () {
function v(d) {
if (r) {
d = d || window.event;
var c = 0;
d.wheelDelta && (c = -d.wheelDelta / 120);
d.detail && (c = d.detail / 3);
e(d.target || d.srcTarget || d.srcElement).closest("." + a.wrapperClass).is(b.parent()) && m(c, !0);
d.preventDefault && !k && d.preventDefault();
k || (d.returnValue = !1)
}
}
function m(d, e, g) {
k = !1;
var f = d, h = b.outerHeight() - c.outerHeight();
e && (f = parseInt(c.css("top")) + d * parseInt(a.wheelStep) / 100 * c.outerHeight(), f = Math.min(Math.max(f, 0), h), f = 0 < d ? Math.ceil(f) : Math.floor(f), c.css({top: f + "px"}));
l = parseInt(c.css("top")) / (b.outerHeight() - c.outerHeight());
f = l * (b[0].scrollHeight - b.outerHeight());
g && (f = d, d = f / b[0].scrollHeight * b.outerHeight(), d = Math.min(Math.max(d, 0), h), c.css({top: d + "px"}));
b.scrollTop(f);
b.trigger("slimscrolling", ~~f);
w();
p()
}
function x() {
u = Math.max(b.outerHeight() / b[0].scrollHeight * b.outerHeight(), 30);
c.css({height: u + "px"});
var a = u == b.outerHeight() ? "none" : "block";
c.css({display: a})
}
function w() {
x();
clearTimeout(B);
l == ~~l ? (k = a.allowPageScroll, C != l && b.trigger("slimscroll", 0 == ~~l ? "top" : "bottom")) : k = !1;
C = l;
u >= b.outerHeight() ? k = !0 : (c.stop(!0,
!0).fadeIn("fast"), a.railVisible && h.stop(!0, !0).fadeIn("fast"))
}
function p() {
a.alwaysVisible || (B = setTimeout(function () {
a.disableFadeOut && r || y || z || (c.fadeOut("slow"), h.fadeOut("slow"))
}, 1E3))
}
var r, y, z, B, A, u, l, C, k = !1, b = e(this);
if (b.parent().hasClass(a.wrapperClass)) {
var n = b.scrollTop(), c = b.closest("." + a.barClass), h = b.closest("." + a.railClass);
x();
if (e.isPlainObject(g)) {
if ("height" in g && "auto" == g.height) {
b.parent().css("height", "auto");
b.css("height", "auto");
var q = b.parent().parent().height();
b.parent().css("height",
q);
b.css("height", q)
}
if ("scrollTo" in g) n = parseInt(a.scrollTo); else if ("scrollBy" in g) n += parseInt(a.scrollBy); else if ("destroy" in g) {
c.remove();
h.remove();
b.unwrap();
return
}
m(n, !1, !0)
}
} else if (!(e.isPlainObject(g) && "destroy" in g)) {
a.height = "auto" == a.height ? b.parent().height() : a.height;
n = e("").addClass(a.wrapperClass).css({
position: "relative",
overflow: "hidden",
width: a.width,
height: a.height
});
b.css({overflow: "hidden", width: a.width, height: a.height});
var h = e("").addClass(a.railClass).css({
width: a.size,
height: "100%",
position: "absolute",
top: 0,
display: a.alwaysVisible && a.railVisible ? "block" : "none",
"border-radius": a.railBorderRadius,
background: a.railColor,
opacity: a.railOpacity,
zIndex: 90
}), c = e("").addClass(a.barClass).css({
background: a.color,
width: a.size,
position: "absolute",
top: 0,
opacity: a.opacity,
display: a.alwaysVisible ? "block" : "none",
"border-radius": a.borderRadius,
BorderRadius: a.borderRadius,
MozBorderRadius: a.borderRadius,
WebkitBorderRadius: a.borderRadius,
zIndex: 99
}), q = "right" == a.position ?
{right: a.distance} : {left: a.distance};
h.css(q);
c.css(q);
b.wrap(n);
b.parent().append(c);
b.parent().append(h);
a.railDraggable && c.bind("mousedown", function (a) {
var b = e(document);
z = !0;
t = parseFloat(c.css("top"));
pageY = a.pageY;
b.bind("mousemove.slimscroll", function (a) {
currTop = t + a.pageY - pageY;
c.css("top", currTop);
m(0, c.position().top, !1)
});
b.bind("mouseup.slimscroll", function (a) {
z = !1;
p();
b.unbind(".slimscroll")
});
return !1
}).bind("selectstart.slimscroll", function (a) {
a.stopPropagation();
a.preventDefault();
return !1
});
h.hover(function () {
w()
}, function () {
p()
});
c.hover(function () {
y = !0
}, function () {
y = !1
});
b.hover(function () {
r = !0;
w();
p()
}, function () {
r = !1;
p()
});
b.bind("touchstart", function (a, b) {
a.originalEvent.touches.length && (A = a.originalEvent.touches[0].pageY)
});
b.bind("touchmove", function (b) {
k || b.originalEvent.preventDefault();
b.originalEvent.touches.length && (m((A - b.originalEvent.touches[0].pageY) / a.touchScrollStep, !0), A = b.originalEvent.touches[0].pageY)
});
x();
"bottom" === a.start ? (c.css({top: b.outerHeight() - c.outerHeight()}),
m(0, !0)) : "top" !== a.start && (m(e(a.start).position().top, null, !0), a.alwaysVisible || c.hide());
window.addEventListener ? (this.addEventListener("DOMMouseScroll", v, !1), this.addEventListener("mousewheel", v, !1)) : document.attachEvent("onmousewheel", v)
}
});
return this
}
});
e.fn.extend({slimscroll: e.fn.slimScroll})
})(jQuery);
$(document).ready(function () {
// Add body-small class if window less than 768px
if ($(this).width() < 769) {
$('body').addClass('body-small')
} else {
$('body').removeClass('body-small')
}
// MetsiMenu
$('#side-menu').metisMenu();
// Collapse ibox function
$('.collapse-link').click(function () {
var ibox = $(this).closest('div.ibox');
var button = $(this).find('i');
var content = ibox.find('div.ibox-content');
content.slideToggle(200);
button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');
ibox.toggleClass('').toggleClass('border-bottom');
setTimeout(function () {
ibox.resize();
ibox.find('[id^=map-]').resize();
}, 50);
});
// Close ibox function
$('.close-link').click(function () {
var content = $(this).closest('div.ibox');
content.remove();
});
// Close menu in canvas mode
$('.close-canvas-menu').click(function () {
$("body").toggleClass("mini-navbar");
SmoothlyMenu();
});
// Open close right sidebar
$('.right-sidebar-toggle').click(function () {
$('#right-sidebar').toggleClass('sidebar-open');
});
// Initialize slimscroll for right sidebar
$('.sidebar-container').slimScroll({
height: '100%',
railOpacity: 0.4,
wheelStep: 10
});
// Open close small chat
$('.open-small-chat').click(function () {
$(this).children().toggleClass('fa-comments').toggleClass('fa-remove');
$('.small-chat-box').toggleClass('active');
});
// Initialize slimscroll for small chat
$('.small-chat-box .content').slimScroll({
height: '234px',
railOpacity: 0.4
});
// Small todo handler
$('.check-link').click(function () {
var button = $(this).find('i');
var label = $(this).next('span');
button.toggleClass('fa-check-square').toggleClass('fa-square-o');
label.toggleClass('todo-completed');
return false;
});
// Minimalize menu
$('.navbar-minimalize').click(function () {
$("body").toggleClass("mini-navbar");
SmoothlyMenu();
});
// Tooltips demo
$('.tooltip-demo').tooltip({
selector: "[data-toggle=tooltip]",
container: "body"
});
// Move modal to body
// Fix Bootstrap backdrop issu with animation.css
$('.modal').appendTo("body");
// Full height of sidebar
function fix_height() {
var heightWithoutNavbar = $("body > #wrapper").height() - 61;
$(".sidebard-panel").css("min-height", heightWithoutNavbar + "px");
var navbarHeigh = $('nav.navbar-default').height();
var wrapperHeigh = $('#page-wrapper').height();
if (navbarHeigh > wrapperHeigh) {
$('#page-wrapper').css("min-height", navbarHeigh + "px");
}
if (navbarHeigh < wrapperHeigh) {
$('#page-wrapper').css("min-height", $(window).height() + "px");
}
if ($('body').hasClass('fixed-nav')) {
$('#page-wrapper').css("min-height", $(window).height() - 60 + "px");
}
}
fix_height();
// Fixed Sidebar
$(window).bind("load", function () {
if ($("body").hasClass('fixed-sidebar')) {
$('.sidebar-collapse').slimScroll({
height: '100%',
railOpacity: 0.9
});
}
})
// Move right sidebar top after scroll
$(window).scroll(function () {
if ($(window).scrollTop() > 0 && !$('body').hasClass('fixed-nav')) {
$('#right-sidebar').addClass('sidebar-top');
} else {
$('#right-sidebar').removeClass('sidebar-top');
}
});
$(window).bind("load resize scroll", function () {
if (!$("body").hasClass('body-small')) {
fix_height();
}
});
$("[data-toggle=popover]")
.popover();
// Add slimscroll to element
$('.full-height-scroll').slimscroll({
height: '100%'
})
});
// Minimalize menu when screen is less than 768px
$(window).bind("resize", function () {
if ($(this).width() < 769) {
$('body').addClass('body-small')
} else {
$('body').removeClass('body-small')
}
});
// For demo purpose - animation css script
function animationHover(element, animation) {
element = $(element);
element.hover(
function () {
element.addClass('animated ' + animation);
},
function () {
//wait for animation to finish before removing classes
window.setTimeout(function () {
element.removeClass('animated ' + animation);
}, 2000);
});
}
function SmoothlyMenu() {
if (!$('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) {
// Hide menu in order to smoothly turn on when maximize menu
$('#side-menu').hide();
// For smoothly turn on menu
setTimeout(
function () {
$('#side-menu').fadeIn(500);
}, 100);
} else if ($('body').hasClass('fixed-sidebar')) {
$('#side-menu').hide();
setTimeout(
function () {
$('#side-menu').fadeIn(500);
}, 300);
} else {
// Remove all inline style from jquery fadeIn function to reset menu state
$('#side-menu').removeAttr('style');
}
}
/*! pace 1.0.0 */
(function () {
var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K,
L, M, N, O, P, Q, R, S, T, U, V, W, X = [].slice, Y = {}.hasOwnProperty, Z = function (a, b) {
function c() {
this.constructor = a
}
for (var d in b) Y.call(b, d) && (a[d] = b[d]);
return c.prototype = b.prototype, a.prototype = new c, a.__super__ = b.prototype, a
}, $ = [].indexOf || function (a) {
for (var b = 0, c = this.length; c > b; b++) if (b in this && this[b] === a) return b;
return -1
};
for (u = {
catchupTime: 100,
initialRate: .03,
minTime: 250,
ghostTime: 100,
maxProgressPerFrame: 20,
easeFactor: 1.25,
startOnPageLoad: !0,
restartOnPushState: !0,
restartOnRequestAfter: 500,
target: "body",
elements: {checkInterval: 100, selectors: ["body"]},
eventLag: {minSamples: 10, sampleCount: 3, lagThreshold: 3},
ajax: {trackMethods: ["GET"], trackWebSockets: !0, ignoreURLs: []}
}, C = function () {
var a;
return null != (a = "undefined" != typeof performance && null !== performance && "function" == typeof performance.now ? performance.now() : void 0) ? a : +new Date
}, E = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame, t = window.cancelAnimationFrame || window.mozCancelAnimationFrame, null == E && (E = function (a) {
return setTimeout(a, 50)
}, t = function (a) {
return clearTimeout(a)
}), G = function (a) {
var b, c;
return b = C(), (c = function () {
var d;
return d = C() - b, d >= 33 ? (b = C(), a(d, function () {
return E(c)
})) : setTimeout(c, 33 - d)
})()
}, F = function () {
var a, b, c;
return c = arguments[0], b = arguments[1], a = 3 <= arguments.length ? X.call(arguments, 2) : [], "function" == typeof c[b] ? c[b].apply(c, a) : c[b]
}, v = function () {
var a, b, c, d, e, f, g;
for (b = arguments[0], d = 2 <= arguments.length ? X.call(arguments, 1) : [], f = 0, g = d.length; g > f; f++) if (c = d[f]) for (a in c) Y.call(c, a) && (e = c[a], null != b[a] && "object" == typeof b[a] && null != e && "object" == typeof e ? v(b[a], e) : b[a] = e);
return b
}, q = function (a) {
var b, c, d, e, f;
for (c = b = 0, e = 0, f = a.length; f > e; e++) d = a[e], c += Math.abs(d), b++;
return c / b
}, x = function (a, b) {
var c, d, e;
if (null == a && (a = "options"), null == b && (b = !0), e = document.querySelector("[data-pace-" + a + "]")) {
if (c = e.getAttribute("data-pace-" + a), !b) return c;
try {
return JSON.parse(c)
} catch (f) {
return d = f, "undefined" != typeof console && null !== console ? console.error("Error parsing inline pace options", d) : void 0
}
}
}, g = function () {
function a() {
}
return a.prototype.on = function (a, b, c, d) {
var e;
return null == d && (d = !1), null == this.bindings && (this.bindings = {}), null == (e = this.bindings)[a] && (e[a] = []), this.bindings[a].push({
handler: b,
ctx: c,
once: d
})
}, a.prototype.once = function (a, b, c) {
return this.on(a, b, c, !0)
}, a.prototype.off = function (a, b) {
var c, d, e;
if (null != (null != (d = this.bindings) ? d[a] : void 0)) {
if (null == b) return delete this.bindings[a];
for (c = 0, e = []; c < this.bindings[a].length;) e.push(this.bindings[a][c].handler === b ? this.bindings[a].splice(c, 1) : c++);
return e
}
}, a.prototype.trigger = function () {
var a, b, c, d, e, f, g, h, i;
if (c = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], null != (g = this.bindings) ? g[c] : void 0) {
for (e = 0, i = []; e < this.bindings[c].length;) h = this.bindings[c][e], d = h.handler, b = h.ctx, f = h.once, d.apply(null != b ? b : this, a), i.push(f ? this.bindings[c].splice(e, 1) : e++);
return i
}
}, a
}(), j = window.Pace || {}, window.Pace = j, v(j, g.prototype), D = j.options = v({}, u, window.paceOptions, x()), U = ["ajax", "document", "eventLag", "elements"], Q = 0, S = U.length; S > Q; Q++) K = U[Q], D[K] === !0 && (D[K] = u[K]);
i = function (a) {
function b() {
return V = b.__super__.constructor.apply(this, arguments)
}
return Z(b, a), b
}(Error), b = function () {
function a() {
this.progress = 0
}
return a.prototype.getElement = function () {
var a;
if (null == this.el) {
if (a = document.querySelector(D.target), !a) throw new i;
this.el = document.createElement("div"), this.el.className = "pace pace-active", document.body.className = document.body.className.replace(/pace-done/g, ""), document.body.className += " pace-running", this.el.innerHTML = '
\n \n
\n', null != a.firstChild ? a.insertBefore(this.el, a.firstChild) : a.appendChild(this.el)
}
return this.el
}, a.prototype.finish = function () {
var a;
return a = this.getElement(), a.className = a.className.replace("pace-active", ""), a.className += " pace-inactive", document.body.className = document.body.className.replace("pace-running", ""), document.body.className += " pace-done"
}, a.prototype.update = function (a) {
return this.progress = a, this.render()
}, a.prototype.destroy = function () {
try {
this.getElement().parentNode.removeChild(this.getElement())
} catch (a) {
i = a
}
return this.el = void 0
}, a.prototype.render = function () {
var a, b, c, d, e, f, g;
if (null == document.querySelector(D.target)) return !1;
for (a = this.getElement(), d = "translate3d(" + this.progress + "%, 0, 0)", g = ["webkitTransform", "msTransform", "transform"], e = 0, f = g.length; f > e; e++) b = g[e], a.children[0].style[b] = d;
return (!this.lastRenderedProgress || this.lastRenderedProgress | 0 !== this.progress | 0) && (a.children[0].setAttribute("data-progress-text", "" + (0 | this.progress) + "%"), this.progress >= 100 ? c = "99" : (c = this.progress < 10 ? "0" : "", c += 0 | this.progress), a.children[0].setAttribute("data-progress", "" + c)), this.lastRenderedProgress = this.progress
}, a.prototype.done = function () {
return this.progress >= 100
}, a
}(), h = function () {
function a() {
this.bindings = {}
}
return a.prototype.trigger = function (a, b) {
var c, d, e, f, g;
if (null != this.bindings[a]) {
for (f = this.bindings[a], g = [], d = 0, e = f.length; e > d; d++) c = f[d], g.push(c.call(this, b));
return g
}
}, a.prototype.on = function (a, b) {
var c;
return null == (c = this.bindings)[a] && (c[a] = []), this.bindings[a].push(b)
}, a
}(), P = window.XMLHttpRequest, O = window.XDomainRequest, N = window.WebSocket, w = function (a, b) {
var c, d, e, f;
f = [];
for (d in b.prototype) try {
e = b.prototype[d], f.push(null == a[d] && "function" != typeof e ? a[d] = e : void 0)
} catch (g) {
c = g
}
return f
}, A = [], j.ignore = function () {
var a, b, c;
return b = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], A.unshift("ignore"), c = b.apply(null, a), A.shift(), c
}, j.track = function () {
var a, b, c;
return b = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], A.unshift("track"), c = b.apply(null, a), A.shift(), c
}, J = function (a) {
var b;
if (null == a && (a = "GET"), "track" === A[0]) return "force";
if (!A.length && D.ajax) {
if ("socket" === a && D.ajax.trackWebSockets) return !0;
if (b = a.toUpperCase(), $.call(D.ajax.trackMethods, b) >= 0) return !0
}
return !1
}, k = function (a) {
function b() {
var a, c = this;
b.__super__.constructor.apply(this, arguments), a = function (a) {
var b;
return b = a.open, a.open = function (d, e) {
return J(d) && c.trigger("request", {type: d, url: e, request: a}), b.apply(a, arguments)
}
}, window.XMLHttpRequest = function (b) {
var c;
return c = new P(b), a(c), c
};
try {
w(window.XMLHttpRequest, P)
} catch (d) {
}
if (null != O) {
window.XDomainRequest = function () {
var b;
return b = new O, a(b), b
};
try {
w(window.XDomainRequest, O)
} catch (d) {
}
}
if (null != N && D.ajax.trackWebSockets) {
window.WebSocket = function (a, b) {
var d;
return d = null != b ? new N(a, b) : new N(a), J("socket") && c.trigger("request", {
type: "socket",
url: a,
protocols: b,
request: d
}), d
};
try {
w(window.WebSocket, N)
} catch (d) {
}
}
}
return Z(b, a), b
}(h), R = null, y = function () {
return null == R && (R = new k), R
}, I = function (a) {
var b, c, d, e;
for (e = D.ajax.ignoreURLs, c = 0, d = e.length; d > c; c++) if (b = e[c], "string" == typeof b) {
if (-1 !== a.indexOf(b)) return !0
} else if (b.test(a)) return !0;
return !1
}, y().on("request", function (b) {
var c, d, e, f, g;
return f = b.type, e = b.request, g = b.url, I(g) ? void 0 : j.running || D.restartOnRequestAfter === !1 && "force" !== J(f) ? void 0 : (d = arguments, c = D.restartOnRequestAfter || 0, "boolean" == typeof c && (c = 0), setTimeout(function () {
var b, c, g, h, i, k;
if (b = "socket" === f ? e.readyState < 2 : 0 < (h = e.readyState) && 4 > h) {
for (j.restart(), i = j.sources, k = [], c = 0, g = i.length; g > c; c++) {
if (K = i[c], K instanceof a) {
K.watch.apply(K, d);
break
}
k.push(void 0)
}
return k
}
}, c))
}), a = function () {
function a() {
var a = this;
this.elements = [], y().on("request", function () {
return a.watch.apply(a, arguments)
})
}
return a.prototype.watch = function (a) {
var b, c, d, e;
return d = a.type, b = a.request, e = a.url, I(e) ? void 0 : (c = "socket" === d ? new n(b) : new o(b), this.elements.push(c))
}, a
}(), o = function () {
function a(a) {
var b, c, d, e, f, g, h = this;
if (this.progress = 0, null != window.ProgressEvent) for (c = null, a.addEventListener("progress", function (a) {
return h.progress = a.lengthComputable ? 100 * a.loaded / a.total : h.progress + (100 - h.progress) / 2
}, !1), g = ["load", "abort", "timeout", "error"], d = 0, e = g.length; e > d; d++) b = g[d], a.addEventListener(b, function () {
return h.progress = 100
}, !1); else f = a.onreadystatechange, a.onreadystatechange = function () {
var b;
return 0 === (b = a.readyState) || 4 === b ? h.progress = 100 : 3 === a.readyState && (h.progress = 50), "function" == typeof f ? f.apply(null, arguments) : void 0
}
}
return a
}(), n = function () {
function a(a) {
var b, c, d, e, f = this;
for (this.progress = 0, e = ["error", "open"], c = 0, d = e.length; d > c; c++) b = e[c], a.addEventListener(b, function () {
return f.progress = 100
}, !1)
}
return a
}(), d = function () {
function a(a) {
var b, c, d, f;
for (null == a && (a = {}), this.elements = [], null == a.selectors && (a.selectors = []), f = a.selectors, c = 0, d = f.length; d > c; c++) b = f[c], this.elements.push(new e(b))
}
return a
}(), e = function () {
function a(a) {
this.selector = a, this.progress = 0, this.check()
}
return a.prototype.check = function () {
var a = this;
return document.querySelector(this.selector) ? this.done() : setTimeout(function () {
return a.check()
}, D.elements.checkInterval)
}, a.prototype.done = function () {
return this.progress = 100
}, a
}(), c = function () {
function a() {
var a, b, c = this;
this.progress = null != (b = this.states[document.readyState]) ? b : 100, a = document.onreadystatechange, document.onreadystatechange = function () {
return null != c.states[document.readyState] && (c.progress = c.states[document.readyState]), "function" == typeof a ? a.apply(null, arguments) : void 0
}
}
return a.prototype.states = {loading: 0, interactive: 50, complete: 100}, a
}(), f = function () {
function a() {
var a, b, c, d, e, f = this;
this.progress = 0, a = 0, e = [], d = 0, c = C(), b = setInterval(function () {
var g;
return g = C() - c - 50, c = C(), e.push(g), e.length > D.eventLag.sampleCount && e.shift(), a = q(e), ++d >= D.eventLag.minSamples && a < D.eventLag.lagThreshold ? (f.progress = 100, clearInterval(b)) : f.progress = 100 * (3 / (a + 3))
}, 50)
}
return a
}(), m = function () {
function a(a) {
this.source = a, this.last = this.sinceLastUpdate = 0, this.rate = D.initialRate, this.catchup = 0, this.progress = this.lastProgress = 0, null != this.source && (this.progress = F(this.source, "progress"))
}
return a.prototype.tick = function (a, b) {
var c;
return null == b && (b = F(this.source, "progress")), b >= 100 && (this.done = !0), b === this.last ? this.sinceLastUpdate += a : (this.sinceLastUpdate && (this.rate = (b - this.last) / this.sinceLastUpdate), this.catchup = (b - this.progress) / D.catchupTime, this.sinceLastUpdate = 0, this.last = b), b > this.progress && (this.progress += this.catchup * a), c = 1 - Math.pow(this.progress / 100, D.easeFactor), this.progress += c * this.rate * a, this.progress = Math.min(this.lastProgress + D.maxProgressPerFrame, this.progress), this.progress = Math.max(0, this.progress), this.progress = Math.min(100, this.progress), this.lastProgress = this.progress, this.progress
}, a
}(), L = null, H = null, r = null, M = null, p = null, s = null, j.running = !1, z = function () {
return D.restartOnPushState ? j.restart() : void 0
}, null != window.history.pushState && (T = window.history.pushState, window.history.pushState = function () {
return z(), T.apply(window.history, arguments)
}), null != window.history.replaceState && (W = window.history.replaceState, window.history.replaceState = function () {
return z(), W.apply(window.history, arguments)
}), l = {ajax: a, elements: d, document: c, eventLag: f}, (B = function () {
var a, c, d, e, f, g, h, i;
for (j.sources = L = [], g = ["ajax", "elements", "document", "eventLag"], c = 0, e = g.length; e > c; c++) a = g[c], D[a] !== !1 && L.push(new l[a](D[a]));
for (i = null != (h = D.extraSources) ? h : [], d = 0, f = i.length; f > d; d++) K = i[d], L.push(new K(D));
return j.bar = r = new b, H = [], M = new m
})(), j.stop = function () {
return j.trigger("stop"), j.running = !1, r.destroy(), s = !0, null != p && ("function" == typeof t && t(p), p = null), B()
}, j.restart = function () {
return j.trigger("restart"), j.stop(), j.start()
}, j.go = function () {
var a;
return j.running = !0, r.render(), a = C(), s = !1, p = G(function (b, c) {
var d, e, f, g, h, i, k, l, n, o, p, q, t, u, v, w;
for (l = 100 - r.progress, e = p = 0, f = !0, i = q = 0, u = L.length; u > q; i = ++q) for (K = L[i], o = null != H[i] ? H[i] : H[i] = [], h = null != (w = K.elements) ? w : [K], k = t = 0, v = h.length; v > t; k = ++t) g = h[k], n = null != o[k] ? o[k] : o[k] = new m(g), f &= n.done, n.done || (e++, p += n.tick(b));
return d = p / e, r.update(M.tick(b, d)), r.done() || f || s ? (r.update(100), j.trigger("done"), setTimeout(function () {
return r.finish(), j.running = !1, j.trigger("hide")
}, Math.max(D.ghostTime, Math.max(D.minTime - (C() - a), 0)))) : c()
})
}, j.start = function (a) {
v(D, a), j.running = !0;
try {
r.render()
} catch (b) {
i = b
}
return document.querySelector(".pace") ? (j.trigger("start"), j.go()) : setTimeout(j.start, 50)
}, "function" == typeof define && define.amd ? define(function () {
return j
}) : "object" == typeof exports ? module.exports = j : D.startOnPageLoad && j.start()
}).call(this);
var QRCode;
!function () {
function a(a) {
this.mode = c.MODE_8BIT_BYTE, this.data = a, this.parsedData = [];
for (var b = [], d = 0, e = this.data.length; e > d; d++) {
var f = this.data.charCodeAt(d);
f > 65536 ? (b[0] = 240 | (1835008 & f) >>> 18, b[1] = 128 | (258048 & f) >>> 12, b[2] = 128 | (4032 & f) >>> 6, b[3] = 128 | 63 & f) : f > 2048 ? (b[0] = 224 | (61440 & f) >>> 12, b[1] = 128 | (4032 & f) >>> 6, b[2] = 128 | 63 & f) : f > 128 ? (b[0] = 192 | (1984 & f) >>> 6, b[1] = 128 | 63 & f) : b[0] = f, this.parsedData = this.parsedData.concat(b)
}
this.parsedData.length != this.data.length && (this.parsedData.unshift(191), this.parsedData.unshift(187), this.parsedData.unshift(239))
}
function b(a, b) {
this.typeNumber = a, this.errorCorrectLevel = b, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.dataList = []
}
function i(a, b) {
if (void 0 == a.length) throw new Error(a.length + "/" + b);
for (var c = 0; c < a.length && 0 == a[c];) c++;
this.num = new Array(a.length - c + b);
for (var d = 0; d < a.length - c; d++) this.num[d] = a[d + c]
}
function j(a, b) {
this.totalCount = a, this.dataCount = b
}
function k() {
this.buffer = [], this.length = 0
}
function m() {
return "undefined" != typeof CanvasRenderingContext2D
}
function n() {
var a = !1, b = navigator.userAgent;
return /android/i.test(b) && (a = !0, aMat = b.toString().match(/android ([0-9]\.[0-9])/i), aMat && aMat[1] && (a = parseFloat(aMat[1]))), a
}
function r(a, b) {
for (var c = 1, e = s(a), f = 0, g = l.length; g >= f; f++) {
var h = 0;
switch (b) {
case d.L:
h = l[f][0];
break;
case d.M:
h = l[f][1];
break;
case d.Q:
h = l[f][2];
break;
case d.H:
h = l[f][3]
}
if (h >= e) break;
c++
}
if (c > l.length) throw new Error("Too long data");
return c
}
function s(a) {
var b = encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g, "a");
return b.length + (b.length != a ? 3 : 0)
}
a.prototype = {
getLength: function () {
return this.parsedData.length
}, write: function (a) {
for (var b = 0, c = this.parsedData.length; c > b; b++) a.put(this.parsedData[b], 8)
}
}, b.prototype = {
addData: function (b) {
var c = new a(b);
this.dataList.push(c), this.dataCache = null
}, isDark: function (a, b) {
if (0 > a || this.moduleCount <= a || 0 > b || this.moduleCount <= b) throw new Error(a + "," + b);
return this.modules[a][b]
}, getModuleCount: function () {
return this.moduleCount
}, make: function () {
this.makeImpl(!1, this.getBestMaskPattern())
}, makeImpl: function (a, c) {
this.moduleCount = 4 * this.typeNumber + 17, this.modules = new Array(this.moduleCount);
for (var d = 0; d < this.moduleCount; d++) {
this.modules[d] = new Array(this.moduleCount);
for (var e = 0; e < this.moduleCount; e++) this.modules[d][e] = null
}
this.setupPositionProbePattern(0, 0), this.setupPositionProbePattern(this.moduleCount - 7, 0), this.setupPositionProbePattern(0, this.moduleCount - 7), this.setupPositionAdjustPattern(), this.setupTimingPattern(), this.setupTypeInfo(a, c), this.typeNumber >= 7 && this.setupTypeNumber(a), null == this.dataCache && (this.dataCache = b.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)), this.mapData(this.dataCache, c)
}, setupPositionProbePattern: function (a, b) {
for (var c = -1; 7 >= c; c++) if (!(-1 >= a + c || this.moduleCount <= a + c)) for (var d = -1; 7 >= d; d++) -1 >= b + d || this.moduleCount <= b + d || (this.modules[a + c][b + d] = c >= 0 && 6 >= c && (0 == d || 6 == d) || d >= 0 && 6 >= d && (0 == c || 6 == c) || c >= 2 && 4 >= c && d >= 2 && 4 >= d ? !0 : !1)
}, getBestMaskPattern: function () {
for (var a = 0, b = 0, c = 0; 8 > c; c++) {
this.makeImpl(!0, c);
var d = f.getLostPoint(this);
(0 == c || a > d) && (a = d, b = c)
}
return b
}, createMovieClip: function (a, b, c) {
var d = a.createEmptyMovieClip(b, c), e = 1;
this.make();
for (var f = 0; f < this.modules.length; f++) for (var g = f * e, h = 0; h < this.modules[f].length; h++) {
var i = h * e, j = this.modules[f][h];
j && (d.beginFill(0, 100), d.moveTo(i, g), d.lineTo(i + e, g), d.lineTo(i + e, g + e), d.lineTo(i, g + e), d.endFill())
}
return d
}, setupTimingPattern: function () {
for (var a = 8; a < this.moduleCount - 8; a++) null == this.modules[a][6] && (this.modules[a][6] = 0 == a % 2);
for (var b = 8; b < this.moduleCount - 8; b++) null == this.modules[6][b] && (this.modules[6][b] = 0 == b % 2)
}, setupPositionAdjustPattern: function () {
for (var a = f.getPatternPosition(this.typeNumber), b = 0; b < a.length; b++) for (var c = 0; c < a.length; c++) {
var d = a[b], e = a[c];
if (null == this.modules[d][e]) for (var g = -2; 2 >= g; g++) for (var h = -2; 2 >= h; h++) this.modules[d + g][e + h] = -2 == g || 2 == g || -2 == h || 2 == h || 0 == g && 0 == h ? !0 : !1
}
}, setupTypeNumber: function (a) {
for (var b = f.getBCHTypeNumber(this.typeNumber), c = 0; 18 > c; c++) {
var d = !a && 1 == (1 & b >> c);
this.modules[Math.floor(c / 3)][c % 3 + this.moduleCount - 8 - 3] = d
}
for (var c = 0; 18 > c; c++) {
var d = !a && 1 == (1 & b >> c);
this.modules[c % 3 + this.moduleCount - 8 - 3][Math.floor(c / 3)] = d
}
}, setupTypeInfo: function (a, b) {
for (var c = this.errorCorrectLevel << 3 | b, d = f.getBCHTypeInfo(c), e = 0; 15 > e; e++) {
var g = !a && 1 == (1 & d >> e);
6 > e ? this.modules[e][8] = g : 8 > e ? this.modules[e + 1][8] = g : this.modules[this.moduleCount - 15 + e][8] = g
}
for (var e = 0; 15 > e; e++) {
var g = !a && 1 == (1 & d >> e);
8 > e ? this.modules[8][this.moduleCount - e - 1] = g : 9 > e ? this.modules[8][15 - e - 1 + 1] = g : this.modules[8][15 - e - 1] = g
}
this.modules[this.moduleCount - 8][8] = !a
}, mapData: function (a, b) {
for (var c = -1, d = this.moduleCount - 1, e = 7, g = 0, h = this.moduleCount - 1; h > 0; h -= 2) for (6 == h && h--; ;) {
for (var i = 0; 2 > i; i++) if (null == this.modules[d][h - i]) {
var j = !1;
g < a.length && (j = 1 == (1 & a[g] >>> e));
var k = f.getMask(b, d, h - i);
k && (j = !j), this.modules[d][h - i] = j, e--, -1 == e && (g++, e = 7)
}
if (d += c, 0 > d || this.moduleCount <= d) {
d -= c, c = -c;
break
}
}
}
}, b.PAD0 = 236, b.PAD1 = 17, b.createData = function (a, c, d) {
for (var e = j.getRSBlocks(a, c), g = new k, h = 0; h < d.length; h++) {
var i = d[h];
g.put(i.mode, 4), g.put(i.getLength(), f.getLengthInBits(i.mode, a)), i.write(g)
}
for (var l = 0, h = 0; h < e.length; h++) l += e[h].dataCount;
if (g.getLengthInBits() > 8 * l) throw new Error("code length overflow. (" + g.getLengthInBits() + ">" + 8 * l + ")");
for (g.getLengthInBits() + 4 <= 8 * l && g.put(0, 4); 0 != g.getLengthInBits() % 8;) g.putBit(!1);
for (; ;) {
if (g.getLengthInBits() >= 8 * l) break;
if (g.put(b.PAD0, 8), g.getLengthInBits() >= 8 * l) break;
g.put(b.PAD1, 8)
}
return b.createBytes(g, e)
}, b.createBytes = function (a, b) {
for (var c = 0, d = 0, e = 0, g = new Array(b.length), h = new Array(b.length), j = 0; j < b.length; j++) {
var k = b[j].dataCount, l = b[j].totalCount - k;
d = Math.max(d, k), e = Math.max(e, l), g[j] = new Array(k);
for (var m = 0; m < g[j].length; m++) g[j][m] = 255 & a.buffer[m + c];
c += k;
var n = f.getErrorCorrectPolynomial(l), o = new i(g[j], n.getLength() - 1), p = o.mod(n);
h[j] = new Array(n.getLength() - 1);
for (var m = 0; m < h[j].length; m++) {
var q = m + p.getLength() - h[j].length;
h[j][m] = q >= 0 ? p.get(q) : 0
}
}
for (var r = 0, m = 0; m < b.length; m++) r += b[m].totalCount;
for (var s = new Array(r), t = 0, m = 0; d > m; m++) for (var j = 0; j < b.length; j++) m < g[j].length && (s[t++] = g[j][m]);
for (var m = 0; e > m; m++) for (var j = 0; j < b.length; j++) m < h[j].length && (s[t++] = h[j][m]);
return s
};
for (var c = {MODE_NUMBER: 1, MODE_ALPHA_NUM: 2, MODE_8BIT_BYTE: 4, MODE_KANJI: 8}, d = {
L: 1,
M: 0,
Q: 3,
H: 2
}, e = {
PATTERN000: 0,
PATTERN001: 1,
PATTERN010: 2,
PATTERN011: 3,
PATTERN100: 4,
PATTERN101: 5,
PATTERN110: 6,
PATTERN111: 7
}, f = {
PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
G15: 1335,
G18: 7973,
G15_MASK: 21522,
getBCHTypeInfo: function (a) {
for (var b = a << 10; f.getBCHDigit(b) - f.getBCHDigit(f.G15) >= 0;) b ^= f.G15 << f.getBCHDigit(b) - f.getBCHDigit(f.G15);
return (a << 10 | b) ^ f.G15_MASK
},
getBCHTypeNumber: function (a) {
for (var b = a << 12; f.getBCHDigit(b) - f.getBCHDigit(f.G18) >= 0;) b ^= f.G18 << f.getBCHDigit(b) - f.getBCHDigit(f.G18);
return a << 12 | b
},
getBCHDigit: function (a) {
for (var b = 0; 0 != a;) b++, a >>>= 1;
return b
},
getPatternPosition: function (a) {
return f.PATTERN_POSITION_TABLE[a - 1]
},
getMask: function (a, b, c) {
switch (a) {
case e.PATTERN000:
return 0 == (b + c) % 2;
case e.PATTERN001:
return 0 == b % 2;
case e.PATTERN010:
return 0 == c % 3;
case e.PATTERN011:
return 0 == (b + c) % 3;
case e.PATTERN100:
return 0 == (Math.floor(b / 2) + Math.floor(c / 3)) % 2;
case e.PATTERN101:
return 0 == b * c % 2 + b * c % 3;
case e.PATTERN110:
return 0 == (b * c % 2 + b * c % 3) % 2;
case e.PATTERN111:
return 0 == (b * c % 3 + (b + c) % 2) % 2;
default:
throw new Error("bad maskPattern:" + a)
}
},
getErrorCorrectPolynomial: function (a) {
for (var b = new i([1], 0), c = 0; a > c; c++) b = b.multiply(new i([1, g.gexp(c)], 0));
return b
},
getLengthInBits: function (a, b) {
if (b >= 1 && 10 > b) switch (a) {
case c.MODE_NUMBER:
return 10;
case c.MODE_ALPHA_NUM:
return 9;
case c.MODE_8BIT_BYTE:
return 8;
case c.MODE_KANJI:
return 8;
default:
throw new Error("mode:" + a)
} else if (27 > b) switch (a) {
case c.MODE_NUMBER:
return 12;
case c.MODE_ALPHA_NUM:
return 11;
case c.MODE_8BIT_BYTE:
return 16;
case c.MODE_KANJI:
return 10;
default:
throw new Error("mode:" + a)
} else {
if (!(41 > b)) throw new Error("type:" + b);
switch (a) {
case c.MODE_NUMBER:
return 14;
case c.MODE_ALPHA_NUM:
return 13;
case c.MODE_8BIT_BYTE:
return 16;
case c.MODE_KANJI:
return 12;
default:
throw new Error("mode:" + a)
}
}
},
getLostPoint: function (a) {
for (var b = a.getModuleCount(), c = 0, d = 0; b > d; d++) for (var e = 0; b > e; e++) {
for (var f = 0, g = a.isDark(d, e), h = -1; 1 >= h; h++) if (!(0 > d + h || d + h >= b)) for (var i = -1; 1 >= i; i++) 0 > e + i || e + i >= b || (0 != h || 0 != i) && g == a.isDark(d + h, e + i) && f++;
f > 5 && (c += 3 + f - 5)
}
for (var d = 0; b - 1 > d; d++) for (var e = 0; b - 1 > e; e++) {
var j = 0;
a.isDark(d, e) && j++, a.isDark(d + 1, e) && j++, a.isDark(d, e + 1) && j++, a.isDark(d + 1, e + 1) && j++, (0 == j || 4 == j) && (c += 3)
}
for (var d = 0; b > d; d++) for (var e = 0; b - 6 > e; e++) a.isDark(d, e) && !a.isDark(d, e + 1) && a.isDark(d, e + 2) && a.isDark(d, e + 3) && a.isDark(d, e + 4) && !a.isDark(d, e + 5) && a.isDark(d, e + 6) && (c += 40);
for (var e = 0; b > e; e++) for (var d = 0; b - 6 > d; d++) a.isDark(d, e) && !a.isDark(d + 1, e) && a.isDark(d + 2, e) && a.isDark(d + 3, e) && a.isDark(d + 4, e) && !a.isDark(d + 5, e) && a.isDark(d + 6, e) && (c += 40);
for (var k = 0, e = 0; b > e; e++) for (var d = 0; b > d; d++) a.isDark(d, e) && k++;
var l = Math.abs(100 * k / b / b - 50) / 5;
return c += 10 * l
}
}, g = {
glog: function (a) {
if (1 > a) throw new Error("glog(" + a + ")");
return g.LOG_TABLE[a]
}, gexp: function (a) {
for (; 0 > a;) a += 255;
for (; a >= 256;) a -= 255;
return g.EXP_TABLE[a]
}, EXP_TABLE: new Array(256), LOG_TABLE: new Array(256)
}, h = 0; 8 > h; h++) g.EXP_TABLE[h] = 1 << h;
for (var h = 8; 256 > h; h++) g.EXP_TABLE[h] = g.EXP_TABLE[h - 4] ^ g.EXP_TABLE[h - 5] ^ g.EXP_TABLE[h - 6] ^ g.EXP_TABLE[h - 8];
for (var h = 0; 255 > h; h++) g.LOG_TABLE[g.EXP_TABLE[h]] = h;
i.prototype = {
get: function (a) {
return this.num[a]
}, getLength: function () {
return this.num.length
}, multiply: function (a) {
for (var b = new Array(this.getLength() + a.getLength() - 1), c = 0; c < this.getLength(); c++) for (var d = 0; d < a.getLength(); d++) b[c + d] ^= g.gexp(g.glog(this.get(c)) + g.glog(a.get(d)));
return new i(b, 0)
}, mod: function (a) {
if (this.getLength() - a.getLength() < 0) return this;
for (var b = g.glog(this.get(0)) - g.glog(a.get(0)), c = new Array(this.getLength()), d = 0; d < this.getLength(); d++) c[d] = this.get(d);
for (var d = 0; d < a.getLength(); d++) c[d] ^= g.gexp(g.glog(a.get(d)) + b);
return new i(c, 0).mod(a)
}
}, j.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]], j.getRSBlocks = function (a, b) {
var c = j.getRsBlockTable(a, b);
if (void 0 == c) throw new Error("bad rs block @ typeNumber:" + a + "/errorCorrectLevel:" + b);
for (var d = c.length / 3, e = [], f = 0; d > f; f++) for (var g = c[3 * f + 0], h = c[3 * f + 1], i = c[3 * f + 2], k = 0; g > k; k++) e.push(new j(h, i));
return e
}, j.getRsBlockTable = function (a, b) {
switch (b) {
case d.L:
return j.RS_BLOCK_TABLE[4 * (a - 1) + 0];
case d.M:
return j.RS_BLOCK_TABLE[4 * (a - 1) + 1];
case d.Q:
return j.RS_BLOCK_TABLE[4 * (a - 1) + 2];
case d.H:
return j.RS_BLOCK_TABLE[4 * (a - 1) + 3];
default:
return void 0
}
}, k.prototype = {
get: function (a) {
var b = Math.floor(a / 8);
return 1 == (1 & this.buffer[b] >>> 7 - a % 8)
}, put: function (a, b) {
for (var c = 0; b > c; c++) this.putBit(1 == (1 & a >>> b - c - 1))
}, getLengthInBits: function () {
return this.length
}, putBit: function (a) {
var b = Math.floor(this.length / 8);
this.buffer.length <= b && this.buffer.push(0), a && (this.buffer[b] |= 128 >>> this.length % 8), this.length++
}
};
var l = [[17, 14, 11, 7], [32, 26, 20, 14], [53, 42, 32, 24], [78, 62, 46, 34], [106, 84, 60, 44], [134, 106, 74, 58], [154, 122, 86, 64], [192, 152, 108, 84], [230, 180, 130, 98], [271, 213, 151, 119], [321, 251, 177, 137], [367, 287, 203, 155], [425, 331, 241, 177], [458, 362, 258, 194], [520, 412, 292, 220], [586, 450, 322, 250], [644, 504, 364, 280], [718, 560, 394, 310], [792, 624, 442, 338], [858, 666, 482, 382], [929, 711, 509, 403], [1003, 779, 565, 439], [1091, 857, 611, 461], [1171, 911, 661, 511], [1273, 997, 715, 535], [1367, 1059, 751, 593], [1465, 1125, 805, 625], [1528, 1190, 868, 658], [1628, 1264, 908, 698], [1732, 1370, 982, 742], [1840, 1452, 1030, 790], [1952, 1538, 1112, 842], [2068, 1628, 1168, 898], [2188, 1722, 1228, 958], [2303, 1809, 1283, 983], [2431, 1911, 1351, 1051], [2563, 1989, 1423, 1093], [2699, 2099, 1499, 1139], [2809, 2213, 1579, 1219], [2953, 2331, 1663, 1273]],
o = function () {
var a = function (a, b) {
this._el = a, this._htOption = b
};
return a.prototype.draw = function (a) {
function g(a, b) {
var c = document.createElementNS("http://www.w3.org/2000/svg", a);
for (var d in b) b.hasOwnProperty(d) && c.setAttribute(d, b[d]);
return c
}
var b = this._htOption, c = this._el, d = a.getModuleCount();
Math.floor(b.width / d), Math.floor(b.height / d), this.clear();
var h = g("svg", {
viewBox: "0 0 " + String(d) + " " + String(d),
width: "100%",
height: "100%",
fill: b.colorLight
});
h.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), c.appendChild(h), h.appendChild(g("rect", {
fill: b.colorDark,
width: "1",
height: "1",
id: "template"
}));
for (var i = 0; d > i; i++) for (var j = 0; d > j; j++) if (a.isDark(i, j)) {
var k = g("use", {x: String(i), y: String(j)});
k.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"), h.appendChild(k)
}
}, a.prototype.clear = function () {
for (; this._el.hasChildNodes();) this._el.removeChild(this._el.lastChild)
}, a
}(), p = "svg" === document.documentElement.tagName.toLowerCase(), q = p ? o : m() ? function () {
function a() {
this._elImage.src = this._elCanvas.toDataURL("image/png"), this._elImage.style.display = "block", this._elCanvas.style.display = "none"
}
function d(a, b) {
var c = this;
if (c._fFail = b, c._fSuccess = a, null === c._bSupportDataURI) {
var d = document.createElement("img"), e = function () {
c._bSupportDataURI = !1, c._fFail && _fFail.call(c)
}, f = function () {
c._bSupportDataURI = !0, c._fSuccess && c._fSuccess.call(c)
};
return d.onabort = e, d.onerror = e, d.onload = f, d.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", void 0
}
c._bSupportDataURI === !0 && c._fSuccess ? c._fSuccess.call(c) : c._bSupportDataURI === !1 && c._fFail && c._fFail.call(c)
}
if (this._android && this._android <= 2.1) {
var b = 1 / window.devicePixelRatio, c = CanvasRenderingContext2D.prototype.drawImage;
CanvasRenderingContext2D.prototype.drawImage = function (a, d, e, f, g, h, i, j) {
if ("nodeName" in a && /img/i.test(a.nodeName)) for (var l = arguments.length - 1; l >= 1; l--) arguments[l] = arguments[l] * b; else "undefined" == typeof j && (arguments[1] *= b, arguments[2] *= b, arguments[3] *= b, arguments[4] *= b);
c.apply(this, arguments)
}
}
var e = function (a, b) {
this._bIsPainted = !1, this._android = n(), this._htOption = b, this._elCanvas = document.createElement("canvas"), this._elCanvas.width = b.width, this._elCanvas.height = b.height, a.appendChild(this._elCanvas), this._el = a, this._oContext = this._elCanvas.getContext("2d"), this._bIsPainted = !1, this._elImage = document.createElement("img"), this._elImage.style.display = "none", this._el.appendChild(this._elImage), this._bSupportDataURI = null
};
return e.prototype.draw = function (a) {
var b = this._elImage, c = this._oContext, d = this._htOption, e = a.getModuleCount(), f = d.width / e,
g = d.height / e, h = Math.round(f), i = Math.round(g);
b.style.display = "none", this.clear();
for (var j = 0; e > j; j++) for (var k = 0; e > k; k++) {
var l = a.isDark(j, k), m = k * f, n = j * g;
c.strokeStyle = l ? d.colorDark : d.colorLight, c.lineWidth = 1, c.fillStyle = l ? d.colorDark : d.colorLight, c.fillRect(m, n, f, g), c.strokeRect(Math.floor(m) + .5, Math.floor(n) + .5, h, i), c.strokeRect(Math.ceil(m) - .5, Math.ceil(n) - .5, h, i)
}
this._bIsPainted = !0
}, e.prototype.makeImage = function () {
this._bIsPainted && d.call(this, a)
}, e.prototype.isPainted = function () {
return this._bIsPainted
}, e.prototype.clear = function () {
this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height), this._bIsPainted = !1
}, e.prototype.round = function (a) {
return a ? Math.floor(1e3 * a) / 1e3 : a
}, e
}() : function () {
var a = function (a, b) {
this._el = a, this._htOption = b
};
return a.prototype.draw = function (a) {
for (var b = this._htOption, c = this._el, d = a.getModuleCount(), e = Math.floor(b.width / d), f = Math.floor(b.height / d), g = ['
'], h = 0; d > h; h++) {
g.push("
");
for (var i = 0; d > i; i++) g.push('
');
g.push("
")
}
g.push("
"), c.innerHTML = g.join("");
var j = c.childNodes[0], k = (b.width - j.offsetWidth) / 2, l = (b.height - j.offsetHeight) / 2;
k > 0 && l > 0 && (j.style.margin = l + "px " + k + "px")
}, a.prototype.clear = function () {
this._el.innerHTML = ""
}, a
}();
QRCode = function (a, b) {
if (this._htOption = {
width: 256,
height: 256,
typeNumber: 4,
colorDark: "#000000",
colorLight: "#ffffff",
correctLevel: d.H
}, "string" == typeof b && (b = {text: b}), b) for (var c in b) this._htOption[c] = b[c];
"string" == typeof a && (a = document.getElementById(a)), this._android = n(), this._el = a, this._oQRCode = null, this._oDrawing = new q(this._el, this._htOption), this._htOption.text && this.makeCode(this._htOption.text)
}, QRCode.prototype.makeCode = function (a) {
this._oQRCode = new b(r(a, this._htOption.correctLevel), this._htOption.correctLevel), this._oQRCode.addData(a), this._oQRCode.make(), this._el.title = a, this._oDrawing.draw(this._oQRCode), this.makeImage()
}, QRCode.prototype.makeImage = function () {
"function" == typeof this._oDrawing.makeImage && (!this._android || this._android >= 3) && this._oDrawing.makeImage()
}, QRCode.prototype.clear = function () {
this._oDrawing.clear()
}, QRCode.CorrectLevel = d
}();
/*
Copyright 2012 Igor Vaynberg
Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition that you accept all of the terms of either the Apache
License or the GPL License.
You may obtain a copy of the Apache License and the GPL License at:
http://www.apache.org/licenses/LICENSE-2.0
http://www.gnu.org/licenses/gpl-2.0.html
Unless required by applicable law or agreed to in writing, software distributed under the
Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
the specific language governing permissions and limitations under the Apache License and the GPL License.
*/
(function ($) {
if (typeof $.fn.each2 == "undefined") {
$.fn.extend({
/*
* 4-10 times faster .each replacement
* use it carefully, as it overrides jQuery context of element on each iteration
*/
each2: function (c) {
var j = $([0]), i = -1, l = this.length;
while (
++i < l
&& (j.context = j[0] = this[i])
&& c.call(j[0], i, j) !== false //"this"=DOM, i=index, j=jQuery object
) ;
return this;
}
});
}
})(jQuery);
(function ($, undefined) {
"use strict";
/*global document, window, jQuery, console */
if (window.Select2 !== undefined) {
return;
}
var KEY, AbstractSelect2, SingleSelect2, MultiSelect2, nextUid, sizer,
lastMousePosition = {x: 0, y: 0}, $document, scrollBarDimensions,
KEY = {
TAB: 9,
ENTER: 13,
ESC: 27,
SPACE: 32,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
SHIFT: 16,
CTRL: 17,
ALT: 18,
PAGE_UP: 33,
PAGE_DOWN: 34,
HOME: 36,
END: 35,
BACKSPACE: 8,
DELETE: 46,
isArrow: function (k) {
k = k.which ? k.which : k;
switch (k) {
case KEY.LEFT:
case KEY.RIGHT:
case KEY.UP:
case KEY.DOWN:
return true;
}
return false;
},
isControl: function (e) {
var k = e.which;
switch (k) {
case KEY.SHIFT:
case KEY.CTRL:
case KEY.ALT:
return true;
}
if (e.metaKey) return true;
return false;
},
isFunctionKey: function (k) {
k = k.which ? k.which : k;
return k >= 112 && k <= 123;
}
},
MEASURE_SCROLLBAR_TEMPLATE = "";
$document = $(document);
nextUid = (function () {
var counter = 1;
return function () {
return counter++;
};
}());
function indexOf(value, array) {
var i = 0, l = array.length;
for (; i < l; i = i + 1) {
if (equal(value, array[i])) return i;
}
return -1;
}
function measureScrollbar() {
var $template = $(MEASURE_SCROLLBAR_TEMPLATE);
$template.appendTo('body');
var dim = {
width: $template.width() - $template[0].clientWidth,
height: $template.height() - $template[0].clientHeight
};
$template.remove();
return dim;
}
/**
* Compares equality of a and b
* @param a
* @param b
*/
function equal(a, b) {
if (a === b) return true;
if (a === undefined || b === undefined) return false;
if (a === null || b === null) return false;
// Check whether 'a' or 'b' is a string (primitive or object).
// The concatenation of an empty string (+'') converts its argument to a string's primitive.
if (a.constructor === String) return a + '' === b + ''; // a+'' - in case 'a' is a String object
if (b.constructor === String) return b + '' === a + ''; // b+'' - in case 'b' is a String object
return false;
}
/**
* Splits the string into an array of values, trimming each value. An empty array is returned for nulls or empty
* strings
* @param string
* @param separator
*/
function splitVal(string, separator) {
var val, i, l;
if (string === null || string.length < 1) return [];
val = string.split(separator);
for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);
return val;
}
function getSideBorderPadding(element) {
return element.outerWidth(false) - element.width();
}
function installKeyUpChangeEvent(element) {
var key = "keyup-change-value";
element.on("keydown", function () {
if ($.data(element, key) === undefined) {
$.data(element, key, element.val());
}
});
element.on("keyup", function () {
var val = $.data(element, key);
if (val !== undefined && element.val() !== val) {
$.removeData(element, key);
element.trigger("keyup-change");
}
});
}
$document.on("mousemove", function (e) {
lastMousePosition.x = e.pageX;
lastMousePosition.y = e.pageY;
});
/**
* filters mouse events so an event is fired only if the mouse moved.
*
* filters out mouse events that occur when mouse is stationary but
* the elements under the pointer are scrolled.
*/
function installFilteredMouseMove(element) {
element.on("mousemove", function (e) {
var lastpos = lastMousePosition;
if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {
$(e.target).trigger("mousemove-filtered", e);
}
});
}
/**
* Debounces a function. Returns a function that calls the original fn function only if no invocations have been made
* within the last quietMillis milliseconds.
*
* @param quietMillis number of milliseconds to wait before invoking fn
* @param fn function to be debounced
* @param ctx object to be used as this reference within fn
* @return debounced version of fn
*/
function debounce(quietMillis, fn, ctx) {
ctx = ctx || undefined;
var timeout;
return function () {
var args = arguments;
window.clearTimeout(timeout);
timeout = window.setTimeout(function () {
fn.apply(ctx, args);
}, quietMillis);
};
}
/**
* A simple implementation of a thunk
* @param formula function used to lazily initialize the thunk
* @return {Function}
*/
function thunk(formula) {
var evaluated = false,
value;
return function () {
if (evaluated === false) {
value = formula();
evaluated = true;
}
return value;
};
};
function installDebouncedScroll(threshold, element) {
var notify = debounce(threshold, function (e) {
element.trigger("scroll-debounced", e);
});
element.on("scroll", function (e) {
if (indexOf(e.target, element.get()) >= 0) notify(e);
});
}
function focus($el) {
if ($el[0] === document.activeElement) return;
/* set the focus in a 0 timeout - that way the focus is set after the processing
of the current event has finished - which seems like the only reliable way
to set focus */
window.setTimeout(function () {
var el = $el[0], pos = $el.val().length, range;
$el.focus();
/* make sure el received focus so we do not error out when trying to manipulate the caret.
sometimes modals or others listeners may steal it after its set */
if ($el.is(":visible") && el === document.activeElement) {
/* after the focus is set move the caret to the end, necessary when we val()
just before setting focus */
if (el.setSelectionRange) {
el.setSelectionRange(pos, pos);
}
else if (el.createTextRange) {
range = el.createTextRange();
range.collapse(false);
range.select();
}
}
}, 0);
}
function getCursorInfo(el) {
el = $(el)[0];
var offset = 0;
var length = 0;
if ('selectionStart' in el) {
offset = el.selectionStart;
length = el.selectionEnd - offset;
} else if ('selection' in document) {
el.focus();
var sel = document.selection.createRange();
length = document.selection.createRange().text.length;
sel.moveStart('character', -el.value.length);
offset = sel.text.length - length;
}
return {offset: offset, length: length};
}
function killEvent(event) {
event.preventDefault();
event.stopPropagation();
}
function killEventImmediately(event) {
event.preventDefault();
event.stopImmediatePropagation();
}
function measureTextWidth(e) {
if (!sizer) {
var style = e[0].currentStyle || window.getComputedStyle(e[0], null);
sizer = $(document.createElement("div")).css({
position: "absolute",
left: "-10000px",
top: "-10000px",
display: "none",
fontSize: style.fontSize,
fontFamily: style.fontFamily,
fontStyle: style.fontStyle,
fontWeight: style.fontWeight,
letterSpacing: style.letterSpacing,
textTransform: style.textTransform,
whiteSpace: "nowrap"
});
sizer.attr("class", "select2-sizer");
$("body").append(sizer);
}
sizer.text(e.val());
return sizer.width();
}
function syncCssClasses(dest, src, adapter) {
var classes, replacements = [], adapted;
classes = dest.attr("class");
if (classes) {
classes = '' + classes; // for IE which returns object
$(classes.split(" ")).each2(function () {
if (this.indexOf("select2-") === 0) {
replacements.push(this);
}
});
}
classes = src.attr("class");
if (classes) {
classes = '' + classes; // for IE which returns object
$(classes.split(" ")).each2(function () {
if (this.indexOf("select2-") !== 0) {
adapted = adapter(this);
if (adapted) {
replacements.push(this);
}
}
});
}
dest.attr("class", replacements.join(" "));
}
function markMatch(text, term, markup, escapeMarkup) {
var match = text.toUpperCase().indexOf(term.toUpperCase()),
tl = term.length;
if (match < 0) {
markup.push(escapeMarkup(text));
return;
}
markup.push(escapeMarkup(text.substring(0, match)));
markup.push("");
markup.push(escapeMarkup(text.substring(match, match + tl)));
markup.push("");
markup.push(escapeMarkup(text.substring(match + tl, text.length)));
}
function defaultEscapeMarkup(markup) {
var replace_map = {
'\\': '\',
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": ''',
"/": '/'
};
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
return replace_map[match];
});
}
/**
* Produces an ajax-based query function
*
* @param options object containing configuration paramters
* @param options.params parameter map for the transport ajax call, can contain such options as cache, jsonpCallback, etc. see $.ajax
* @param options.transport function that will be used to execute the ajax request. must be compatible with parameters supported by $.ajax
* @param options.url url for the data
* @param options.data a function(searchTerm, pageNumber, context) that should return an object containing query string parameters for the above url.
* @param options.dataType request data type: ajax, jsonp, other datatatypes supported by jQuery's $.ajax function or the transport function if specified
* @param options.quietMillis (optional) milliseconds to wait before making the ajaxRequest, helps debounce the ajax function if invoked too often
* @param options.results a function(remoteData, pageNumber) that converts data returned form the remote request to the format expected by Select2.
* The expected format is an object containing the following keys:
* results array of objects that will be used as choices
* more (optional) boolean indicating whether there are more results available
* Example: {results:[{id:1, text:'Red'},{id:2, text:'Blue'}], more:true}
*/
function ajax(options) {
var timeout, // current scheduled but not yet executed request
requestSequence = 0, // sequence used to drop out-of-order responses
handler = null,
quietMillis = options.quietMillis || 100,
ajaxUrl = options.url,
self = this;
return function (query) {
window.clearTimeout(timeout);
timeout = window.setTimeout(function () {
requestSequence += 1; // increment the sequence
var requestNumber = requestSequence, // this request's sequence number
data = options.data, // ajax data function
url = ajaxUrl, // ajax url string or function
transport = options.transport || $.fn.select2.ajaxDefaults.transport,
// deprecated - to be removed in 4.0 - use params instead
deprecated = {
type: options.type || 'GET', // set type of request (GET or POST)
cache: options.cache || false,
jsonpCallback: options.jsonpCallback || undefined,
dataType: options.dataType || "json"
},
params = $.extend({}, $.fn.select2.ajaxDefaults.params, deprecated);
data = data ? data.call(self, query.term, query.page, query.context) : null;
url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;
if (handler) {
handler.abort();
}
if (options.params) {
if ($.isFunction(options.params)) {
$.extend(params, options.params.call(self));
} else {
$.extend(params, options.params);
}
}
$.extend(params, {
url: url,
dataType: options.dataType,
data: data,
success: function (data) {
if (requestNumber < requestSequence) {
return;
}
// TODO - replace query.page with query so users have access to term, page, etc.
var results = options.results(data, query.page);
query.callback(results);
}
});
handler = transport.call(self, params);
}, quietMillis);
};
}
/**
* Produces a query function that works with a local array
*
* @param options object containing configuration parameters. The options parameter can either be an array or an
* object.
*
* If the array form is used it is assumed that it contains objects with 'id' and 'text' keys.
*
* If the object form is used ti is assumed that it contains 'data' and 'text' keys. The 'data' key should contain
* an array of objects that will be used as choices. These objects must contain at least an 'id' key. The 'text'
* key can either be a String in which case it is expected that each element in the 'data' array has a key with the
* value of 'text' which will be used to match choices. Alternatively, text can be a function(item) that can extract
* the text.
*/
function local(options) {
var data = options, // data elements
dataText,
tmp,
text = function (item) {
return "" + item.text;
}; // function used to retrieve the text portion of a data item that is matched against the search
if ($.isArray(data)) {
tmp = data;
data = {results: tmp};
}
if ($.isFunction(data) === false) {
tmp = data;
data = function () {
return tmp;
};
}
var dataItem = data();
if (dataItem.text) {
text = dataItem.text;
// if text is not a function we assume it to be a key name
if (!$.isFunction(text)) {
dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
text = function (item) {
return item[dataText];
};
}
}
return function (query) {
var t = query.term, filtered = {results: []}, process;
if (t === "") {
query.callback(data());
return;
}
process = function (datum, collection) {
var group, attr;
datum = datum[0];
if (datum.children) {
group = {};
for (attr in datum) {
if (datum.hasOwnProperty(attr)) group[attr] = datum[attr];
}
group.children = [];
$(datum.children).each2(function (i, childDatum) {
process(childDatum, group.children);
});
if (group.children.length || query.matcher(t, text(group), datum)) {
collection.push(group);
}
} else {
if (query.matcher(t, text(datum), datum)) {
collection.push(datum);
}
}
};
$(data().results).each2(function (i, datum) {
process(datum, filtered.results);
});
query.callback(filtered);
};
}
// TODO javadoc
function tags(data) {
var isFunc = $.isFunction(data);
return function (query) {
var t = query.term, filtered = {results: []};
$(isFunc ? data() : data).each(function () {
var isObject = this.text !== undefined,
text = isObject ? this.text : this;
if (t === "" || query.matcher(t, text)) {
filtered.results.push(isObject ? this : {id: this, text: this});
}
});
query.callback(filtered);
};
}
/**
* Checks if the formatter function should be used.
*
* Throws an error if it is not a function. Returns true if it should be used,
* false if no formatting should be performed.
*
* @param formatter
*/
function checkFormatter(formatter, formatterName) {
if ($.isFunction(formatter)) return true;
if (!formatter) return false;
throw new Error(formatterName + " must be a function or a falsy value");
}
function evaluate(val) {
return $.isFunction(val) ? val() : val;
}
function countResults(results) {
var count = 0;
$.each(results, function (i, item) {
if (item.children) {
count += countResults(item.children);
} else {
count++;
}
});
return count;
}
/**
* Default tokenizer. This function uses breaks the input on substring match of any string from the
* opts.tokenSeparators array and uses opts.createSearchChoice to create the choice object. Both of those
* two options have to be defined in order for the tokenizer to work.
*
* @param input text user has typed so far or pasted into the search field
* @param selection currently selected choices
* @param selectCallback function(choice) callback tho add the choice to selection
* @param opts select2's opts
* @return undefined/null to leave the current input unchanged, or a string to change the input to the returned value
*/
function defaultTokenizer(input, selection, selectCallback, opts) {
var original = input, // store the original so we can compare and know if we need to tell the search to update its text
dupe = false, // check for whether a token we extracted represents a duplicate selected choice
token, // token
index, // position at which the separator was found
i, l, // looping variables
separator; // the matched separator
if (!opts.createSearchChoice || !opts.tokenSeparators || opts.tokenSeparators.length < 1) return undefined;
while (true) {
index = -1;
for (i = 0, l = opts.tokenSeparators.length; i < l; i++) {
separator = opts.tokenSeparators[i];
index = input.indexOf(separator);
if (index >= 0) break;
}
if (index < 0) break; // did not find any token separator in the input string, bail
token = input.substring(0, index);
input = input.substring(index + separator.length);
if (token.length > 0) {
token = opts.createSearchChoice.call(this, token, selection);
if (token !== undefined && token !== null && opts.id(token) !== undefined && opts.id(token) !== null) {
dupe = false;
for (i = 0, l = selection.length; i < l; i++) {
if (equal(opts.id(token), opts.id(selection[i]))) {
dupe = true;
break;
}
}
if (!dupe) selectCallback(token);
}
}
}
if (original !== input) return input;
}
/**
* Creates a new class
*
* @param superClass
* @param methods
*/
function clazz(SuperClass, methods) {
var constructor = function () {
};
constructor.prototype = new SuperClass;
constructor.prototype.constructor = constructor;
constructor.prototype.parent = SuperClass.prototype;
constructor.prototype = $.extend(constructor.prototype, methods);
return constructor;
}
AbstractSelect2 = clazz(Object, {
// abstract
bind: function (func) {
var self = this;
return function () {
func.apply(self, arguments);
};
},
// abstract
init: function (opts) {
var results, search, resultsSelector = ".select2-results", disabled, readonly;
// prepare options
this.opts = opts = this.prepareOpts(opts);
this.id = opts.id;
// destroy if called on an existing component
if (opts.element.data("select2") !== undefined &&
opts.element.data("select2") !== null) {
opts.element.data("select2").destroy();
}
this.container = this.createContainer();
this.containerId = "s2id_" + (opts.element.attr("id") || "autogen" + nextUid());
this.containerSelector = "#" + this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
this.container.attr("id", this.containerId);
// cache the body so future lookups are cheap
this.body = thunk(function () {
return opts.element.closest("body");
});
syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
this.container.css(evaluate(opts.containerCss));
this.container.addClass(evaluate(opts.containerCssClass));
this.elementTabIndex = this.opts.element.attr("tabindex");
// swap container for the element
this.opts.element
.data("select2", this)
.attr("tabindex", "-1")
.before(this.container);
this.container.data("select2", this);
this.dropdown = this.container.find(".select2-drop");
this.dropdown.addClass(evaluate(opts.dropdownCssClass));
this.dropdown.data("select2", this);
this.results = results = this.container.find(resultsSelector);
this.search = search = this.container.find("input.select2-input");
this.resultsPage = 0;
this.context = null;
// initialize the container
this.initContainer();
installFilteredMouseMove(this.results);
this.dropdown.on("mousemove-filtered touchstart touchmove touchend", resultsSelector, this.bind(this.highlightUnderEvent));
installDebouncedScroll(80, this.results);
this.dropdown.on("scroll-debounced", resultsSelector, this.bind(this.loadMoreIfNeeded));
// do not propagate change event from the search field out of the component
$(this.container).on("change", ".select2-input", function (e) {
e.stopPropagation();
});
$(this.dropdown).on("change", ".select2-input", function (e) {
e.stopPropagation();
});
// if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel
if ($.fn.mousewheel) {
results.mousewheel(function (e, delta, deltaX, deltaY) {
var top = results.scrollTop(), height;
if (deltaY > 0 && top - deltaY <= 0) {
results.scrollTop(0);
killEvent(e);
} else if (deltaY < 0 && results.get(0).scrollHeight - results.scrollTop() + deltaY <= results.height()) {
results.scrollTop(results.get(0).scrollHeight - results.height());
killEvent(e);
}
});
}
installKeyUpChangeEvent(search);
search.on("keyup-change input paste", this.bind(this.updateResults));
search.on("focus", function () {
search.addClass("select2-focused");
});
search.on("blur", function () {
search.removeClass("select2-focused");
});
this.dropdown.on("mouseup", resultsSelector, this.bind(function (e) {
if ($(e.target).closest(".select2-result-selectable").length > 0) {
this.highlightUnderEvent(e);
this.selectHighlighted(e);
}
}));
// trap all mouse events from leaving the dropdown. sometimes there may be a modal that is listening
// for mouse events outside of itself so it can close itself. since the dropdown is now outside the select2's
// dom it will trigger the popup close, which is not what we want
this.dropdown.on("click mouseup mousedown", function (e) {
e.stopPropagation();
});
if ($.isFunction(this.opts.initSelection)) {
// initialize selection based on the current value of the source element
this.initSelection();
// if the user has provided a function that can set selection based on the value of the source element
// we monitor the change event on the element and trigger it, allowing for two way synchronization
this.monitorSource();
}
if (opts.maximumInputLength !== null) {
this.search.attr("maxlength", opts.maximumInputLength);
}
var disabled = opts.element.prop("disabled");
if (disabled === undefined) disabled = false;
this.enable(!disabled);
var readonly = opts.element.prop("readonly");
if (readonly === undefined) readonly = false;
this.readonly(readonly);
// Calculate size of scrollbar
scrollBarDimensions = scrollBarDimensions || measureScrollbar();
this.autofocus = opts.element.prop("autofocus")
opts.element.prop("autofocus", false);
if (this.autofocus) this.focus();
},
// abstract
destroy: function () {
var element = this.opts.element, select2 = element.data("select2");
if (this.propertyObserver) {
delete this.propertyObserver;
this.propertyObserver = null;
}
if (select2 !== undefined) {
select2.container.remove();
select2.dropdown.remove();
element
.removeClass("select2-offscreen")
.removeData("select2")
.off(".select2")
.prop("autofocus", this.autofocus || false);
if (this.elementTabIndex) {
element.attr({tabindex: this.elementTabIndex});
} else {
element.removeAttr("tabindex");
}
element.show();
}
},
// abstract
optionToData: function (element) {
if (element.is("option")) {
return {
id: element.prop("value"),
text: element.text(),
element: element.get(),
css: element.attr("class"),
disabled: element.prop("disabled"),
locked: equal(element.attr("locked"), "locked") || equal(element.data("locked"), true)
};
} else if (element.is("optgroup")) {
return {
text: element.attr("label"),
children: [],
element: element.get(),
css: element.attr("class")
};
}
},
// abstract
prepareOpts: function (opts) {
var element, select, idKey, ajaxUrl, self = this;
element = opts.element;
if (element.get(0).tagName.toLowerCase() === "select") {
this.select = select = opts.element;
}
if (select) {
// these options are not allowed when attached to a select because they are picked up off the element itself
$.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () {
if (this in opts) {
throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a
"] || (!c.indexOf("
", "
"] || [0, "", ""];
a = "ignored
" + c[1] + a + c[2] + "
";
for ("function" == typeof w.innerShiv ? d.appendChild(w.innerShiv(a)) : d.innerHTML = a; c[0]--;) d = d.lastChild;
d = b.a.L(d.lastChild.childNodes)
}
return d
};
b.a.ca = function (a, d) {
b.a.ka(a);
d = b.a.d(d);
if (d !== n && d !== H) if ("string" != typeof d && (d = d.toString()), "undefined" != typeof E) E(a).html(d); else for (var c =
b.a.sa(d), e = 0; e < c.length; e++) a.appendChild(c[e])
};
b.b("utils.parseHtmlFragment", b.a.sa);
b.b("utils.setHtml", b.a.ca);
var Q = {};
b.s = {
qa: function (a) {
"function" != typeof a && i(Error("You can only pass a function to ko.memoization.memoize()"));
var b = (4294967296 * (1 + Math.random()) | 0).toString(16).substring(1) + (4294967296 * (1 + Math.random()) | 0).toString(16).substring(1);
Q[b] = a;
return "<\!--[ko_memo:" + b + "]--\>"
}, gb: function (a, b) {
var c = Q[a];
c === H && i(Error("Couldn't find any memo with ID " + a + ". Perhaps it's already been unmemoized."));
try {
return c.apply(n, b || []), l
} finally {
delete Q[a]
}
}, hb: function (a, d) {
var c = [];
ba(a, c);
for (var e = 0, f = c.length; e < f; e++) {
var g = c[e].rb, h = [g];
d && b.a.P(h, d);
b.s.gb(c[e].Eb, h);
g.nodeValue = "";
g.parentNode && g.parentNode.removeChild(g)
}
}, Ta: function (a) {
return (a = a.match(/^\[ko_memo\:(.*?)\]$/)) ? a[1] : n
}
};
b.b("memoization", b.s);
b.b("memoization.memoize", b.s.qa);
b.b("memoization.unmemoize", b.s.gb);
b.b("memoization.parseMemoText", b.s.Ta);
b.b("memoization.unmemoizeDomNodeAndDescendants", b.s.hb);
b.La = {
throttle: function (a,
d) {
a.throttleEvaluation = d;
var c = n;
return b.j({
read: a, write: function (b) {
clearTimeout(c);
c = setTimeout(function () {
a(b)
}, d)
}
})
}, notify: function (a, d) {
a.equalityComparer = "always" == d ? t(q) : b.m.fn.equalityComparer;
return a
}
};
b.b("extenders", b.La);
b.eb = function (a, d, c) {
this.target = a;
this.ha = d;
this.qb = c;
b.p(this, "dispose", this.B)
};
b.eb.prototype.B = function () {
this.Bb = l;
this.qb()
};
b.S = function () {
this.w = {};
b.a.extend(this, b.S.fn);
b.p(this, "subscribe", this.xa);
b.p(this, "extend", this.extend);
b.p(this, "getSubscriptionsCount",
this.xb)
};
b.S.fn = {
xa: function (a, d, c) {
var c = c || "change", a = d ? a.bind(d) : a, e = new b.eb(this, a, function () {
b.a.ga(this.w[c], e)
}.bind(this));
this.w[c] || (this.w[c] = []);
this.w[c].push(e);
return e
}, notifySubscribers: function (a, d) {
d = d || "change";
this.w[d] && b.r.K(function () {
b.a.o(this.w[d].slice(0), function (b) {
b && b.Bb !== l && b.ha(a)
})
}, this)
}, xb: function () {
var a = 0, b;
for (b in this.w) this.w.hasOwnProperty(b) && (a += this.w[b].length);
return a
}, extend: function (a) {
var d = this;
if (a) for (var c in a) {
var e = b.La[c];
"function" ==
typeof e && (d = e(d, a[c]))
}
return d
}
};
b.Pa = function (a) {
return "function" == typeof a.xa && "function" == typeof a.notifySubscribers
};
b.b("subscribable", b.S);
b.b("isSubscribable", b.Pa);
var B = [];
b.r = {
lb: function (a) {
B.push({ha: a, Ka: []})
}, end: function () {
B.pop()
}, Va: function (a) {
b.Pa(a) || i(Error("Only subscribable things can act as dependencies"));
if (0 < B.length) {
var d = B[B.length - 1];
d && !(0 <= b.a.i(d.Ka, a)) && (d.Ka.push(a), d.ha(a))
}
}, K: function (a, b, c) {
try {
return B.push(n), a.apply(b, c || [])
} finally {
B.pop()
}
}
};
var la = {
undefined: l,
"boolean": l, number: l, string: l
};
b.m = function (a) {
function d() {
if (0 < arguments.length) {
if (!d.equalityComparer || !d.equalityComparer(c, arguments[0])) d.H(), c = arguments[0], d.G();
return this
}
b.r.Va(d);
return c
}
var c = a;
b.S.call(d);
d.t = function () {
return c
};
d.G = function () {
d.notifySubscribers(c)
};
d.H = function () {
d.notifySubscribers(c, "beforeChange")
};
b.a.extend(d, b.m.fn);
b.p(d, "peek", d.t);
b.p(d, "valueHasMutated", d.G);
b.p(d, "valueWillMutate", d.H);
return d
};
b.m.fn = {
equalityComparer: function (a, b) {
return a === n || typeof a in
la ? a === b : q
}
};
var D = b.m.Jb = "__ko_proto__";
b.m.fn[D] = b.m;
b.la = function (a, d) {
return a === n || a === H || a[D] === H ? q : a[D] === d ? l : b.la(a[D], d)
};
b.$ = function (a) {
return b.la(a, b.m)
};
b.Qa = function (a) {
return "function" == typeof a && a[D] === b.m || "function" == typeof a && a[D] === b.j && a.yb ? l : q
};
b.b("observable", b.m);
b.b("isObservable", b.$);
b.b("isWriteableObservable", b.Qa);
b.R = function (a) {
0 == arguments.length && (a = []);
a !== n && (a !== H && !("length" in a)) && i(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));
var d = b.m(a);
b.a.extend(d, b.R.fn);
return d
};
b.R.fn = {
remove: function (a) {
for (var b = this.t(), c = [], e = "function" == typeof a ? a : function (b) {
return b === a
}, f = 0; f < b.length; f++) {
var g = b[f];
e(g) && (0 === c.length && this.H(), c.push(g), b.splice(f, 1), f--)
}
c.length && this.G();
return c
}, removeAll: function (a) {
if (a === H) {
var d = this.t(), c = d.slice(0);
this.H();
d.splice(0, d.length);
this.G();
return c
}
return !a ? [] : this.remove(function (d) {
return 0 <= b.a.i(a, d)
})
}, destroy: function (a) {
var b = this.t(), c = "function" == typeof a ? a : function (b) {
return b ===
a
};
this.H();
for (var e = b.length - 1; 0 <= e; e--) c(b[e]) && (b[e]._destroy = l);
this.G()
}, destroyAll: function (a) {
return a === H ? this.destroy(t(l)) : !a ? [] : this.destroy(function (d) {
return 0 <= b.a.i(a, d)
})
}, indexOf: function (a) {
var d = this();
return b.a.i(d, a)
}, replace: function (a, b) {
var c = this.indexOf(a);
0 <= c && (this.H(), this.t()[c] = b, this.G())
}
};
b.a.o("pop push reverse shift sort splice unshift".split(" "), function (a) {
b.R.fn[a] = function () {
var b = this.t();
this.H();
b = b[a].apply(b, arguments);
this.G();
return b
}
});
b.a.o(["slice"],
function (a) {
b.R.fn[a] = function () {
var b = this();
return b[a].apply(b, arguments)
}
});
b.b("observableArray", b.R);
b.j = function (a, d, c) {
function e() {
b.a.o(y, function (a) {
a.B()
});
y = []
}
function f() {
var a = h.throttleEvaluation;
a && 0 <= a ? (clearTimeout(s), s = setTimeout(g, a)) : g()
}
function g() {
if (!p) if (m && v()) z(); else {
p = l;
try {
var a = b.a.V(y, function (a) {
return a.target
});
b.r.lb(function (c) {
var d;
0 <= (d = b.a.i(a, c)) ? a[d] = H : y.push(c.xa(f))
});
for (var c = r.call(d), e = a.length - 1; 0 <= e; e--) a[e] && y.splice(e, 1)[0].B();
m = l;
h.notifySubscribers(k,
"beforeChange");
k = c
} finally {
b.r.end()
}
h.notifySubscribers(k);
p = q;
y.length || z()
}
}
function h() {
if (0 < arguments.length) return "function" === typeof u ? u.apply(d, arguments) : i(Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.")), this;
m || g();
b.r.Va(h);
return k
}
function j() {
return !m || 0 < y.length
}
var k, m = q, p = q, r = a;
r && "object" == typeof r ? (c = r, r = c.read) : (c = c || {}, r || (r = c.read));
"function" != typeof r && i(Error("Pass a function that returns the value of the ko.computed"));
var u = c.write, F = c.disposeWhenNodeIsRemoved || c.W || n, v = c.disposeWhen || c.Ja || t(q), z = e,
y = [], s = n;
d || (d = c.owner);
h.t = function () {
m || g();
return k
};
h.wb = function () {
return y.length
};
h.yb = "function" === typeof c.write;
h.B = function () {
z()
};
h.oa = j;
b.S.call(h);
b.a.extend(h, b.j.fn);
b.p(h, "peek", h.t);
b.p(h, "dispose", h.B);
b.p(h, "isActive", h.oa);
b.p(h, "getDependenciesCount", h.wb);
c.deferEvaluation !== l && g();
if (F && j()) {
z = function () {
b.a.F.Wa(F, arguments.callee);
e()
};
b.a.F.Ba(F, z);
var C = v, v = function () {
return !b.a.X(F) || C()
}
}
return h
};
b.Ab = function (a) {
return b.la(a, b.j)
};
v = b.m.Jb;
b.j[v] = b.m;
b.j.fn = {};
b.j.fn[v] = b.j;
b.b("dependentObservable", b.j);
b.b("computed", b.j);
b.b("isComputed", b.Ab);
b.fb = function (a) {
0 == arguments.length && i(Error("When calling ko.toJS, pass the object you want to convert."));
return aa(a, function (a) {
for (var c = 0; b.$(a) && 10 > c; c++) a = a();
return a
})
};
b.toJSON = function (a, d, c) {
a = b.fb(a);
return b.a.wa(a, d, c)
};
b.b("toJS", b.fb);
b.b("toJSON", b.toJSON);
b.k = {
q: function (a) {
switch (b.a.u(a)) {
case "option":
return a.__ko__hasDomDataOptionValue__ ===
l ? b.a.f.get(a, b.c.options.ra) : 7 >= b.a.Z ? a.getAttributeNode("value").specified ? a.value : a.text : a.value;
case "select":
return 0 <= a.selectedIndex ? b.k.q(a.options[a.selectedIndex]) : H;
default:
return a.value
}
}, T: function (a, d) {
switch (b.a.u(a)) {
case "option":
switch (typeof d) {
case "string":
b.a.f.set(a, b.c.options.ra, H);
"__ko__hasDomDataOptionValue__" in a && delete a.__ko__hasDomDataOptionValue__;
a.value = d;
break;
default:
b.a.f.set(a, b.c.options.ra, d), a.__ko__hasDomDataOptionValue__ = l, a.value = "number" === typeof d ?
d : ""
}
break;
case "select":
for (var c = a.options.length - 1; 0 <= c; c--) if (b.k.q(a.options[c]) == d) {
a.selectedIndex = c;
break
}
break;
default:
if (d === n || d === H) d = "";
a.value = d
}
}
};
b.b("selectExtensions", b.k);
b.b("selectExtensions.readValue", b.k.q);
b.b("selectExtensions.writeValue", b.k.T);
var ja = /\@ko_token_(\d+)\@/g, ma = ["true", "false"],
na = /^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i;
b.g = {
Q: [], aa: function (a) {
var d = b.a.D(a);
if (3 > d.length) return [];
"{" === d.charAt(0) && (d = d.substring(1, d.length - 1));
for (var a = [],
c = n, e, f = 0; f < d.length; f++) {
var g = d.charAt(f);
if (c === n) switch (g) {
case '"':
case "'":
case "/":
c = f, e = g
} else if (g == e && "\\" !== d.charAt(f - 1)) {
g = d.substring(c, f + 1);
a.push(g);
var h = "@ko_token_" + (a.length - 1) + "@", d = d.substring(0, c) + h + d.substring(f + 1),
f = f - (g.length - h.length), c = n
}
}
e = c = n;
for (var j = 0, k = n, f = 0; f < d.length; f++) {
g = d.charAt(f);
if (c === n) switch (g) {
case "{":
c = f;
k = g;
e = "}";
break;
case "(":
c = f;
k = g;
e = ")";
break;
case "[":
c = f, k = g, e = "]"
}
g === k ? j++ : g === e && (j--, 0 === j && (g = d.substring(c, f + 1), a.push(g), h = "@ko_token_" + (a.length -
1) + "@", d = d.substring(0, c) + h + d.substring(f + 1), f -= g.length - h.length, c = n))
}
e = [];
d = d.split(",");
c = 0;
for (f = d.length; c < f; c++) j = d[c], k = j.indexOf(":"), 0 < k && k < j.length - 1 ? (g = j.substring(k + 1), e.push({
key: O(j.substring(0, k), a),
value: O(g, a)
})) : e.push({unknown: O(j, a)});
return e
}, ba: function (a) {
for (var d = "string" === typeof a ? b.g.aa(a) : a, c = [], a = [], e, f = 0; e = d[f]; f++) if (0 < c.length && c.push(","), e.key) {
var g;
a:{
g = e.key;
var h = b.a.D(g);
switch (h.length && h.charAt(0)) {
case "'":
case '"':
break a;
default:
g = "'" + h + "'"
}
}
e = e.value;
c.push(g);
c.push(":");
c.push(e);
e = b.a.D(e);
0 <= b.a.i(ma, b.a.D(e).toLowerCase()) ? e = q : (h = e.match(na), e = h === n ? q : h[1] ? "Object(" + h[1] + ")" + h[2] : e);
e && (0 < a.length && a.push(", "), a.push(g + " : function(__ko_value) { " + e + " = __ko_value; }"))
} else e.unknown && c.push(e.unknown);
d = c.join("");
0 < a.length && (d = d + ", '_ko_property_writers' : { " + a.join("") + " } ");
return d
}, Db: function (a, d) {
for (var c = 0; c < a.length; c++) if (b.a.D(a[c].key) == d) return l;
return q
}, ea: function (a, d, c, e, f) {
if (!a || !b.Qa(a)) {
if ((a = d()._ko_property_writers) &&
a[c]) a[c](e)
} else (!f || a.t() !== e) && a(e)
}
};
b.b("expressionRewriting", b.g);
b.b("expressionRewriting.bindingRewriteValidators", b.g.Q);
b.b("expressionRewriting.parseObjectLiteral", b.g.aa);
b.b("expressionRewriting.preProcessBindings", b.g.ba);
b.b("jsonExpressionRewriting", b.g);
b.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson", b.g.ba);
var J = "<\!--test--\>" === x.createComment("test").text,
ia = J ? /^<\!--\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*--\>$/ : /^\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*$/,
ha = J ? /^<\!--\s*\/ko\s*--\>$/ :
/^\s*\/ko\s*$/, oa = {ul: l, ol: l};
b.e = {
I: {}, childNodes: function (a) {
return A(a) ? $(a) : a.childNodes
}, Y: function (a) {
if (A(a)) for (var a = b.e.childNodes(a), d = 0, c = a.length; d < c; d++) b.removeNode(a[d]); else b.a.ka(a)
}, N: function (a, d) {
if (A(a)) {
b.e.Y(a);
for (var c = a.nextSibling, e = 0, f = d.length; e < f; e++) c.parentNode.insertBefore(d[e], c)
} else b.a.N(a, d)
}, Ua: function (a, b) {
A(a) ? a.parentNode.insertBefore(b, a.nextSibling) : a.firstChild ? a.insertBefore(b, a.firstChild) : a.appendChild(b)
}, Oa: function (a, d, c) {
c ? A(a) ? a.parentNode.insertBefore(d,
c.nextSibling) : c.nextSibling ? a.insertBefore(d, c.nextSibling) : a.appendChild(d) : b.e.Ua(a, d)
}, firstChild: function (a) {
return !A(a) ? a.firstChild : !a.nextSibling || G(a.nextSibling) ? n : a.nextSibling
}, nextSibling: function (a) {
A(a) && (a = Z(a));
return a.nextSibling && G(a.nextSibling) ? n : a.nextSibling
}, ib: function (a) {
return (a = A(a)) ? a[1] : n
}, Sa: function (a) {
if (oa[b.a.u(a)]) {
var d = a.firstChild;
if (d) {
do if (1 === d.nodeType) {
var c;
c = d.firstChild;
var e = n;
if (c) {
do if (e) e.push(c); else if (A(c)) {
var f = Z(c, l);
f ? c = f : e = [c]
} else G(c) &&
(e = [c]); while (c = c.nextSibling)
}
if (c = e) {
e = d.nextSibling;
for (f = 0; f < c.length; f++) e ? a.insertBefore(c[f], e) : a.appendChild(c[f])
}
} while (d = d.nextSibling)
}
}
}
};
b.b("virtualElements", b.e);
b.b("virtualElements.allowedBindings", b.e.I);
b.b("virtualElements.emptyNode", b.e.Y);
b.b("virtualElements.insertAfter", b.e.Oa);
b.b("virtualElements.prepend", b.e.Ua);
b.b("virtualElements.setDomNodeChildren", b.e.N);
b.J = function () {
this.Ga = {}
};
b.a.extend(b.J.prototype, {
nodeHasBindings: function (a) {
switch (a.nodeType) {
case 1:
return a.getAttribute("data-bind") !=
n;
case 8:
return b.e.ib(a) != n;
default:
return q
}
}, getBindings: function (a, b) {
var c = this.getBindingsString(a, b);
return c ? this.parseBindingsString(c, b, a) : n
}, getBindingsString: function (a) {
switch (a.nodeType) {
case 1:
return a.getAttribute("data-bind");
case 8:
return b.e.ib(a);
default:
return n
}
}, parseBindingsString: function (a, d, c) {
try {
var e;
if (!(e = this.Ga[a])) {
var f = this.Ga, g = "with($context){with($data||{}){return{" + b.g.ba(a) + "}}}";
e = f[a] = new Function("$context", "$element", g)
}
return e(d, c)
} catch (h) {
i(Error("Unable to parse bindings.\nMessage: " +
h + ";\nBindings value: " + a))
}
}
});
b.J.instance = new b.J;
b.b("bindingProvider", b.J);
b.c = {};
b.z = function (a, d, c) {
d ? (b.a.extend(this, d), this.$parentContext = d, this.$parent = d.$data, this.$parents = (d.$parents || []).slice(0), this.$parents.unshift(this.$parent)) : (this.$parents = [], this.$root = a, this.ko = b);
this.$data = a;
c && (this[c] = a)
};
b.z.prototype.createChildContext = function (a, d) {
return new b.z(a, this, d)
};
b.z.prototype.extend = function (a) {
var d = b.a.extend(new b.z, this);
return b.a.extend(d, a)
};
b.cb = function (a, d) {
if (2 ==
arguments.length) b.a.f.set(a, "__ko_bindingContext__", d); else return b.a.f.get(a, "__ko_bindingContext__")
};
b.Ea = function (a, d, c) {
1 === a.nodeType && b.e.Sa(a);
return W(a, d, c, l)
};
b.Da = function (a, b) {
(1 === b.nodeType || 8 === b.nodeType) && Y(a, b, l)
};
b.Ca = function (a, b) {
b && (1 !== b.nodeType && 8 !== b.nodeType) && i(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));
b = b || w.document.body;
X(a, b, l)
};
b.ja = function (a) {
switch (a.nodeType) {
case 1:
case 8:
var d = b.cb(a);
if (d) return d;
if (a.parentNode) return b.ja(a.parentNode)
}
return H
};
b.ob = function (a) {
return (a = b.ja(a)) ? a.$data : H
};
b.b("bindingHandlers", b.c);
b.b("applyBindings", b.Ca);
b.b("applyBindingsToDescendants", b.Da);
b.b("applyBindingsToNode", b.Ea);
b.b("contextFor", b.ja);
b.b("dataFor", b.ob);
var ea = {"class": "className", "for": "htmlFor"};
b.c.attr = {
update: function (a, d) {
var c = b.a.d(d()) || {}, e;
for (e in c) if ("string" == typeof e) {
var f = b.a.d(c[e]), g = f === q || f === n || f === H;
g && a.removeAttribute(e);
8 >= b.a.Z && e in ea ? (e = ea[e], g ? a.removeAttribute(e) :
a[e] = f) : g || a.setAttribute(e, f.toString());
"name" === e && b.a.$a(a, g ? "" : f.toString())
}
}
};
b.c.checked = {
init: function (a, d, c) {
b.a.n(a, "click", function () {
var e;
if ("checkbox" == a.type) e = a.checked; else if ("radio" == a.type && a.checked) e = a.value; else return;
var f = d(), g = b.a.d(f);
"checkbox" == a.type && g instanceof Array ? (e = b.a.i(g, a.value), a.checked && 0 > e ? f.push(a.value) : !a.checked && 0 <= e && f.splice(e, 1)) : b.g.ea(f, c, "checked", e, l)
});
"radio" == a.type && !a.name && b.c.uniqueName.init(a, t(l))
}, update: function (a, d) {
var c = b.a.d(d());
"checkbox" == a.type ? a.checked = c instanceof Array ? 0 <= b.a.i(c, a.value) : c : "radio" == a.type && (a.checked = a.value == c)
}
};
b.c.css = {
update: function (a, d) {
var c = b.a.d(d());
if ("object" == typeof c) for (var e in c) {
var f = b.a.d(c[e]);
b.a.da(a, e, f)
} else c = String(c || ""), b.a.da(a, a.__ko__cssValue, q), a.__ko__cssValue = c, b.a.da(a, c, l)
}
};
b.c.enable = {
update: function (a, d) {
var c = b.a.d(d());
c && a.disabled ? a.removeAttribute("disabled") : !c && !a.disabled && (a.disabled = l)
}
};
b.c.disable = {
update: function (a, d) {
b.c.enable.update(a, function () {
return !b.a.d(d())
})
}
};
b.c.event = {
init: function (a, d, c, e) {
var f = d() || {}, g;
for (g in f) (function () {
var f = g;
"string" == typeof f && b.a.n(a, f, function (a) {
var g, m = d()[f];
if (m) {
var p = c();
try {
var r = b.a.L(arguments);
r.unshift(e);
g = m.apply(e, r)
} finally {
g !== l && (a.preventDefault ? a.preventDefault() : a.returnValue = q)
}
p[f + "Bubble"] === q && (a.cancelBubble = l, a.stopPropagation && a.stopPropagation())
}
})
})()
}
};
b.c.foreach = {
Ra: function (a) {
return function () {
var d = a(), c = b.a.ta(d);
if (!c || "number" == typeof c.length) return {foreach: d, templateEngine: b.C.na};
b.a.d(d);
return {
foreach: c.data,
as: c.as,
includeDestroyed: c.includeDestroyed,
afterAdd: c.afterAdd,
beforeRemove: c.beforeRemove,
afterRender: c.afterRender,
beforeMove: c.beforeMove,
afterMove: c.afterMove,
templateEngine: b.C.na
}
}
}, init: function (a, d) {
return b.c.template.init(a, b.c.foreach.Ra(d))
}, update: function (a, d, c, e, f) {
return b.c.template.update(a, b.c.foreach.Ra(d), c, e, f)
}
};
b.g.Q.foreach = q;
b.e.I.foreach = l;
b.c.hasfocus = {
init: function (a, d, c) {
function e(e) {
a.__ko_hasfocusUpdating = l;
var f = a.ownerDocument;
"activeElement" in
f && (e = f.activeElement === a);
f = d();
b.g.ea(f, c, "hasfocus", e, l);
a.__ko_hasfocusUpdating = q
}
var f = e.bind(n, l), g = e.bind(n, q);
b.a.n(a, "focus", f);
b.a.n(a, "focusin", f);
b.a.n(a, "blur", g);
b.a.n(a, "focusout", g)
}, update: function (a, d) {
var c = b.a.d(d());
a.__ko_hasfocusUpdating || (c ? a.focus() : a.blur(), b.r.K(b.a.Aa, n, [a, c ? "focusin" : "focusout"]))
}
};
b.c.html = {
init: function () {
return {controlsDescendantBindings: l}
}, update: function (a, d) {
b.a.ca(a, d())
}
};
var ca = "__ko_withIfBindingData";
P("if");
P("ifnot", q, l);
P("with", l, q, function (a,
b) {
return a.createChildContext(b)
});
b.c.options = {
update: function (a, d, c) {
"select" !== b.a.u(a) && i(Error("options binding applies only to SELECT elements"));
for (var e = 0 == a.length, f = b.a.V(b.a.fa(a.childNodes, function (a) {
return a.tagName && "option" === b.a.u(a) && a.selected
}), function (a) {
return b.k.q(a) || a.innerText || a.textContent
}), g = a.scrollTop, h = b.a.d(d()); 0 < a.length;) b.A(a.options[0]), a.remove(0);
if (h) {
var c = c(), j = c.optionsIncludeDestroyed;
"number" != typeof h.length && (h = [h]);
if (c.optionsCaption) {
var k = x.createElement("option");
b.a.ca(k, c.optionsCaption);
b.k.T(k, H);
a.appendChild(k)
}
for (var d = 0, m = h.length; d < m; d++) {
var p = h[d];
if (!p || !p._destroy || j) {
var k = x.createElement("option"), r = function (a, b, c) {
var d = typeof b;
return "function" == d ? b(a) : "string" == d ? a[b] : c
}, u = r(p, c.optionsValue, p);
b.k.T(k, b.a.d(u));
p = r(p, c.optionsText, u);
b.a.bb(k, p);
a.appendChild(k)
}
}
h = a.getElementsByTagName("option");
d = j = 0;
for (m = h.length; d < m; d++) 0 <= b.a.i(f, b.k.q(h[d])) && (b.a.ab(h[d], l), j++);
a.scrollTop = g;
e && "value" in c && da(a, b.a.ta(c.value), l);
b.a.tb(a)
}
}
};
b.c.options.ra = "__ko.optionValueDomData__";
b.c.selectedOptions = {
init: function (a, d, c) {
b.a.n(a, "change", function () {
var e = d(), f = [];
b.a.o(a.getElementsByTagName("option"), function (a) {
a.selected && f.push(b.k.q(a))
});
b.g.ea(e, c, "value", f)
})
}, update: function (a, d) {
"select" != b.a.u(a) && i(Error("values binding applies only to SELECT elements"));
var c = b.a.d(d());
c && "number" == typeof c.length && b.a.o(a.getElementsByTagName("option"), function (a) {
var d = 0 <= b.a.i(c, b.k.q(a));
b.a.ab(a, d)
})
}
};
b.c.style = {
update: function (a,
d) {
var c = b.a.d(d() || {}), e;
for (e in c) if ("string" == typeof e) {
var f = b.a.d(c[e]);
a.style[e] = f || ""
}
}
};
b.c.submit = {
init: function (a, d, c, e) {
"function" != typeof d() && i(Error("The value for a submit binding must be a function"));
b.a.n(a, "submit", function (b) {
var c, h = d();
try {
c = h.call(e, a)
} finally {
c !== l && (b.preventDefault ? b.preventDefault() : b.returnValue = q)
}
})
}
};
b.c.text = {
update: function (a, d) {
b.a.bb(a, d())
}
};
b.e.I.text = l;
b.c.uniqueName = {
init: function (a, d) {
if (d()) {
var c = "ko_unique_" + ++b.c.uniqueName.nb;
b.a.$a(a,
c)
}
}
};
b.c.uniqueName.nb = 0;
b.c.value = {
init: function (a, d, c) {
function e() {
h = q;
var e = d(), f = b.k.q(a);
b.g.ea(e, c, "value", f)
}
var f = ["change"], g = c().valueUpdate, h = q;
g && ("string" == typeof g && (g = [g]), b.a.P(f, g), f = b.a.Fa(f));
if (b.a.Z && ("input" == a.tagName.toLowerCase() && "text" == a.type && "off" != a.autocomplete && (!a.form || "off" != a.form.autocomplete)) && -1 == b.a.i(f, "propertychange")) b.a.n(a, "propertychange", function () {
h = l
}), b.a.n(a, "blur", function () {
h && e()
});
b.a.o(f, function (c) {
var d = e;
b.a.Nb(c, "after") && (d = function () {
setTimeout(e,
0)
}, c = c.substring(5));
b.a.n(a, c, d)
})
}, update: function (a, d) {
var c = "select" === b.a.u(a), e = b.a.d(d()), f = b.k.q(a), g = e != f;
0 === e && (0 !== f && "0" !== f) && (g = l);
g && (f = function () {
b.k.T(a, e)
}, f(), c && setTimeout(f, 0));
c && 0 < a.length && da(a, e, q)
}
};
b.c.visible = {
update: function (a, d) {
var c = b.a.d(d()), e = "none" != a.style.display;
c && !e ? a.style.display = "" : !c && e && (a.style.display = "none")
}
};
b.c.click = {
init: function (a, d, c, e) {
return b.c.event.init.call(this, a, function () {
var a = {};
a.click = d();
return a
}, c, e)
}
};
b.v = function () {
};
b.v.prototype.renderTemplateSource =
function () {
i(Error("Override renderTemplateSource"))
};
b.v.prototype.createJavaScriptEvaluatorBlock = function () {
i(Error("Override createJavaScriptEvaluatorBlock"))
};
b.v.prototype.makeTemplateSource = function (a, d) {
if ("string" == typeof a) {
var d = d || x, c = d.getElementById(a);
c || i(Error("Cannot find template with ID " + a));
return new b.l.h(c)
}
if (1 == a.nodeType || 8 == a.nodeType) return new b.l.O(a);
i(Error("Unknown template type: " + a))
};
b.v.prototype.renderTemplate = function (a, b, c, e) {
a = this.makeTemplateSource(a, e);
return this.renderTemplateSource(a, b, c)
};
b.v.prototype.isTemplateRewritten = function (a, b) {
return this.allowTemplateRewriting === q ? l : this.makeTemplateSource(a, b).data("isRewritten")
};
b.v.prototype.rewriteTemplate = function (a, b, c) {
a = this.makeTemplateSource(a, c);
b = b(a.text());
a.text(b);
a.data("isRewritten", l)
};
b.b("templateEngine", b.v);
var pa = /(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,
qa = /<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;
b.ya = {
ub: function (a,
d, c) {
d.isTemplateRewritten(a, c) || d.rewriteTemplate(a, function (a) {
return b.ya.Fb(a, d)
}, c)
}, Fb: function (a, b) {
return a.replace(pa, function (a, e, f, g, h, j, k) {
return V(k, e, b)
}).replace(qa, function (a, e) {
return V(e, "<\!-- ko --\>", b)
})
}, jb: function (a) {
return b.s.qa(function (d, c) {
d.nextSibling && b.Ea(d.nextSibling, a, c)
})
}
};
b.b("__tr_ambtns", b.ya.jb);
b.l = {};
b.l.h = function (a) {
this.h = a
};
b.l.h.prototype.text = function () {
var a = b.a.u(this.h), a = "script" === a ? "text" : "textarea" === a ? "value" : "innerHTML";
if (0 == arguments.length) return this.h[a];
var d = arguments[0];
"innerHTML" === a ? b.a.ca(this.h, d) : this.h[a] = d
};
b.l.h.prototype.data = function (a) {
if (1 === arguments.length) return b.a.f.get(this.h, "templateSourceData_" + a);
b.a.f.set(this.h, "templateSourceData_" + a, arguments[1])
};
b.l.O = function (a) {
this.h = a
};
b.l.O.prototype = new b.l.h;
b.l.O.prototype.text = function () {
if (0 == arguments.length) {
var a = b.a.f.get(this.h, "__ko_anon_template__") || {};
a.za === H && a.ia && (a.za = a.ia.innerHTML);
return a.za
}
b.a.f.set(this.h, "__ko_anon_template__", {za: arguments[0]})
};
b.l.h.prototype.nodes =
function () {
if (0 == arguments.length) return (b.a.f.get(this.h, "__ko_anon_template__") || {}).ia;
b.a.f.set(this.h, "__ko_anon_template__", {ia: arguments[0]})
};
b.b("templateSources", b.l);
b.b("templateSources.domElement", b.l.h);
b.b("templateSources.anonymousTemplate", b.l.O);
var N;
b.va = function (a) {
a != H && !(a instanceof b.v) && i(Error("templateEngine must inherit from ko.templateEngine"));
N = a
};
b.ua = function (a, d, c, e, f) {
c = c || {};
(c.templateEngine || N) == H && i(Error("Set a template engine before calling renderTemplate"));
f = f || "replaceChildren";
if (e) {
var g = M(e);
return b.j(function () {
var h = d && d instanceof b.z ? d : new b.z(b.a.d(d)),
j = "function" == typeof a ? a(h.$data, h) : a, h = S(e, f, j, h, c);
"replaceNode" == f && (e = h, g = M(e))
}, n, {
Ja: function () {
return !g || !b.a.X(g)
}, W: g && "replaceNode" == f ? g.parentNode : g
})
}
return b.s.qa(function (e) {
b.ua(a, d, c, e, "replaceNode")
})
};
b.Lb = function (a, d, c, e, f) {
function g(a, b) {
T(b, j);
c.afterRender && c.afterRender(b, a)
}
function h(d, e) {
j = f.createChildContext(b.a.d(d), c.as);
j.$index = e;
var g = "function" == typeof a ?
a(d, j) : a;
return S(n, "ignoreTargetNode", g, j, c)
}
var j;
return b.j(function () {
var a = b.a.d(d) || [];
"undefined" == typeof a.length && (a = [a]);
a = b.a.fa(a, function (a) {
return c.includeDestroyed || a === H || a === n || !b.a.d(a._destroy)
});
b.r.K(b.a.Za, n, [e, a, h, c, g])
}, n, {W: e})
};
b.c.template = {
init: function (a, d) {
var c = b.a.d(d());
if ("string" != typeof c && !c.name && (1 == a.nodeType || 8 == a.nodeType)) c = 1 == a.nodeType ? a.childNodes : b.e.childNodes(a), c = b.a.Gb(c), (new b.l.O(a)).nodes(c);
return {controlsDescendantBindings: l}
}, update: function (a,
d, c, e, f) {
var d = b.a.d(d()), c = {}, e = l, g, h = n;
"string" != typeof d && (c = d, d = c.name, "if" in c && (e = b.a.d(c["if"])), e && "ifnot" in c && (e = !b.a.d(c.ifnot)), g = b.a.d(c.data));
"foreach" in c ? h = b.Lb(d || a, e && c.foreach || [], c, a, f) : e ? (f = "data" in c ? f.createChildContext(g, c.as) : f, h = b.ua(d || a, f, c, a)) : b.e.Y(a);
f = h;
(g = b.a.f.get(a, "__ko__templateComputedDomDataKey__")) && "function" == typeof g.B && g.B();
b.a.f.set(a, "__ko__templateComputedDomDataKey__", f && f.oa() ? f : H)
}
};
b.g.Q.template = function (a) {
a = b.g.aa(a);
return 1 == a.length && a[0].unknown ||
b.g.Db(a, "name") ? n : "This template engine does not support anonymous templates nested within its templates"
};
b.e.I.template = l;
b.b("setTemplateEngine", b.va);
b.b("renderTemplate", b.ua);
b.a.Ia = function (a, b, c) {
a = a || [];
b = b || [];
return a.length <= b.length ? R(a, b, "added", "deleted", c) : R(b, a, "deleted", "added", c)
};
b.b("utils.compareArrays", b.a.Ia);
b.a.Za = function (a, d, c, e, f) {
function g(a, b) {
s = k[b];
v !== b && (y[a] = s);
s.ma(v++);
L(s.M);
r.push(s);
z.push(s)
}
function h(a, c) {
if (a) for (var d = 0, e = c.length; d < e; d++) c[d] && b.a.o(c[d].M,
function (b) {
a(b, d, c[d].U)
})
}
for (var d = d || [], e = e || {}, j = b.a.f.get(a, "setDomNodeChildrenFromArrayMapping_lastMappingResult") === H, k = b.a.f.get(a, "setDomNodeChildrenFromArrayMapping_lastMappingResult") || [], m = b.a.V(k, function (a) {
return a.U
}), p = b.a.Ia(m, d), r = [], u = 0, v = 0, A = [], z = [], d = [], y = [], m = [], s, C = 0, B, D; B = p[C]; C++) switch (D = B.moved, B.status) {
case "deleted":
D === H && (s = k[u], s.j && s.j.B(), A.push.apply(A, L(s.M)), e.beforeRemove && (d[C] = s, z.push(s)));
u++;
break;
case "retained":
g(C, u++);
break;
case "added":
D !== H ? g(C,
D) : (s = {U: B.value, ma: b.m(v++)}, r.push(s), z.push(s), j || (m[C] = s))
}
h(e.beforeMove, y);
b.a.o(A, e.beforeRemove ? b.A : b.removeNode);
for (var C = 0, j = b.e.firstChild(a), G; s = z[C]; C++) {
s.M || b.a.extend(s, ga(a, c, s.U, f, s.ma));
for (u = 0; p = s.M[u]; j = p.nextSibling, G = p, u++) p !== j && b.e.Oa(a, p, G);
!s.zb && f && (f(s.U, s.M, s.ma), s.zb = l)
}
h(e.beforeRemove, d);
h(e.afterMove, y);
h(e.afterAdd, m);
b.a.f.set(a, "setDomNodeChildrenFromArrayMapping_lastMappingResult", r)
};
b.b("utils.setDomNodeChildrenFromArrayMapping", b.a.Za);
b.C = function () {
this.allowTemplateRewriting =
q
};
b.C.prototype = new b.v;
b.C.prototype.renderTemplateSource = function (a) {
var d = !(9 > b.a.Z) && a.nodes ? a.nodes() : n;
if (d) return b.a.L(d.cloneNode(l).childNodes);
a = a.text();
return b.a.sa(a)
};
b.C.na = new b.C;
b.va(b.C.na);
b.b("nativeTemplateEngine", b.C);
b.pa = function () {
var a = this.Cb = function () {
if ("undefined" == typeof E || !E.tmpl) return 0;
try {
if (0 <= E.tmpl.tag.tmpl.open.toString().indexOf("__")) return 2
} catch (a) {
}
return 1
}();
this.renderTemplateSource = function (b, c, e) {
e = e || {};
2 > a && i(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));
var f = b.data("precompiled");
f || (f = b.text() || "", f = E.template(n, "{{ko_with $item.koBindingContext}}" + f + "{{/ko_with}}"), b.data("precompiled", f));
b = [c.$data];
c = E.extend({koBindingContext: c}, e.templateOptions);
c = E.tmpl(f, b, c);
c.appendTo(x.createElement("div"));
E.fragments = {};
return c
};
this.createJavaScriptEvaluatorBlock = function (a) {
return "{{ko_code ((function() { return " + a + " })()) }}"
};
this.addTemplate = function (a, b) {
x.write("