vendor: 14,460 bytes, lines 1-42
1/* Minification failed. Returning unminified contents. 2(9939,16-17): run-time error JS1195: Expected expression: . 3(9939,21-22): run-time error JS1003: Expected ':': ) 4(9944,9-11): run-time error JS1010: Expected identifier: if 5(9944,13-14): run-time error JS1010: Expected identifier: ! 6(9944,13-14): run-time error JS1326: Expected binding syntax: ! 7(9944,13-14): run-time error JS1193: Expected ',' or ')': ! 8(9944,13-14): run-time error JS1006: Expected ')': ! 9(9944,13-14): run-time error JS1008: Expected '{': ! 10(9944,38): run-time error JS1004: Expected ';' 11(9944,38-39): run-time error JS1195: Expected expression: ) 12(9971,5-12): run-time error JS1009: Expected '}': console 13(9971,5-12): run-time error JS1006: Expected ')': console 14(9944,9,9969,6): run-time error JS1314: Implicit property name must be identifier: if (!dataObject.tealium_event) { 15 console.error("No tealium_event defined for the link call. Please define a tealium_event key-value pair."); 16 return; 17 } 18 19 //Force everything to be strings 20 var objString = Object.fromEntries( 21 Object.entries(dataObject).map(([key, value]) => { 22 if (typeof value === 'object' && value !== null) { 23 if (Array.isArray(value)) { 24 var newValue = []; 25 for (var i = 0; i < value.length; i++) { 26 newValue[i] = String(value[i]); 27 } 28 return [key, newValue]; 29 } 30 console.log('Tealium link() calls do not accept any objects outside of arrays and strings, ommitting object from data set.'); 31 return [key, '']; 32 } 33 return [key, String(value)]; 34 }) 35 ); 36 37 window.utag.link(objString); 38 return; 39 } 40 */ 41/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ 42!function (e, t) { "use strict"; "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function (e) { if (!e.document) throw new Error("jQuery requires a window with a document"); return t(e) } : t(e) }("undefined" != typeof window ? window : this, function (C, e) { "use strict"; var t = [], r = Object.getPrototypeOf, s = t.slice, g = t.flat ? function (e) { return t.flat.call(e) } : function (e) { return t.concat.apply([], e) }, u = t.push, i = t.indexOf, n = {}, o = n.toString, v = n.hasOwnProperty, a = v.toString, l = a.call(Object), y = {}, m = function (e) { return "function" == typeof e && "number" != typeof e.nodeType }, x = function (e) { return null != e && e === e.window }, E = C.document, c = { type: !0, src: !0, nonce: !0, noModule: !0 }; function b(e, t, n) { var r, i, o = (n = n || E).createElement("script"); if (o.text = e, t) for (r in c) (i = t[r] || t.getAttribute && t.getAttribute(r)) && o.setAttribute(r, i); n.head.appendChild(o).parentNode.removeChild(o) } function w(e) { return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? n[o.call(e)] || "object" : typeof e } var f = "3.5.1", S = function (e, t) { return new S.fn.init(e, t) }; function p(e) { var t = !!e && "length" in e && e.length, n = w(e); return !m(e) && !x(e) && ("array" === n || 0 === t || "number" == typeof t && 0 < t && t - 1 in e) } S.fn = S.prototype = { jquery: f, constructor: S, length: 0, toArray: function () { return s.call(this) }, get: function (e) { return null == e ? s.call(this) : e < 0 ? this[e + this.length] : this[e] }, pushStack: function (e) { var t = S.merge(this.constructor(), e); return t.prevObject = this, t }, each: function (e) { return S.each(this, e) }, map: function (n) { return this.pushStack(S.map(this, function (e, t) { return n.call(e, t, e) })) }, slice: function () { return this.pushStack(s.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, even: function () { return this.pushStack(S.grep(this, function (e, t) { return (t + 1) % 2 })) }, odd: function () { return this.pushStack(S.grep(this, function (e, t) { return t % 2 })) }, eq: function (e) { var t = this.length, n = +e + (e < 0 ? t : 0); return this.pushStack(0 <= n && n < t ? [this[n]] : []) }, end: function () { return this.prevObject || this.constructor() }, push: u, sort: t.sort, splice: t.splice }, S.extend = S.fn.extend = function () { var e, t, n, r, i, o, a = arguments[0] || {}, s = 1, u = arguments.length, l = !1; for ("boolean" == typeof a && (l = a, a = arguments[s] || {}, s++), "object" == typeof a || m(a) || (a = {}), s === u && (a = this, s--) ; s < u; s++) if (null != (e = arguments[s])) for (t in e) r = e[t], "__proto__" !== t && a !== r && (l && r && (S.isPlainObject(r) || (i = Array.isArray(r))) ? (n = a[t], o = i && !Array.isArray(n) ? [] : i || S.isPlainObject(n) ? n : {}, i = !1, a[t] = S.extend(l, o, r)) : void 0 !== r && (a[t] = r)); return a }, S.extend({ expando: "jQuery" + (f + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (e) { throw new Error(e) }, noop: function () { }, isPlainObject: function (e) { var t, n; return !(!e || "[object Object]" !== o.call(e)) && (!(t = r(e)) || "function" == typeof (n = v.call(t, "constructor") && t.constructor) && a.call(n) === l) }, isEmptyObject: function (e) { var t; for (t in e) return !1; return !0 }, globalEval: function (e, t, n) { b(e, { nonce: t && t.nonce }, n) }, each: function (e, t) { var n, r = 0; if (p(e)) { for (n = e.length; r < n; r++) if (!1 === t.call(e[r], r, e[r])) break } else for (r in e) if (!1 === t.call(e[r], r, e[r])) break; return e }, makeArray: function (e, t) { var n = t || []; return null != e && (p(Object(e)) ? S.merge(n, "string" == typeof e ? [e] : e) : u.call(n, e)), n }, inArray: function (e, t, n) { return null == t ? -1 : i.call(t, e, n) }, merge: function (e, t) { for (var n = +t.length, r = 0, i = e.length; r < n; r++) e[i++] = t[r]; return e.length = i, e }, grep: function (e, t, n) { for (var r = [], i = 0, o = e.length, a = !n; i < o; i++) !t(e[i], i) !== a && r.push(e[i]); return r }, map: function (e, t, n) { var r, i, o = 0, a = []; if (p(e)) for (r = e.length; o < r; o++) null != (i = t(e[o], o, n)) && a.push(i); else for (o in e) null != (i = t(e[o], o, n)) && a.push(i); return g(a) }, guid: 1, support: y }), "function" == typeof Symbol && (S.fn[Symbol.iterator] = t[Symbol.iterator]), S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (e, t) { n["[object " + t + "]"] = t.toLowerCase() }); var d = function (n) { var e, d, b, o, i, h, f, g, w, u, l, T, C, a, E, v, s, c, y, S = "sizzle" + 1 * new Date, p = n.document, k = 0, r = 0, m = ue(), x = ue(), A = ue(), N = ue(), D = function (e, t) { return e === t && (l = !0), 0 }, j = {}.hasOwnProperty, t = [], q = t.pop, L = t.push, H = t.push, O = t.slice, P = function (e, t) { for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; return -1 }, R = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", M = "[\\x20\\t\\r\\n\\f]", I = "(?:\\\\[\\da-fA-F]{1,6}" + M + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", W = "\\[" + M + "*(" + I + ")(?:" + M + "*([*^$|!~]?=)" + M + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + I + "))|)" + M + "*\\]", F = ":(" + I + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + W + ")*)|.*)\\)|)", B = new RegExp(M + "+", "g"), $ = new RegExp("^" + M + "+|((?:^|[^\\\\])(?:\\\\.)*)" + M + "+$", "g"), _ = new RegExp("^" + M + "*," + M + "*"), z = new RegExp("^" + M + "*([>+~]|" + M + ")" + M + "*"), U = new RegExp(M + "|>"), X = new RegExp(F), V = new RegExp("^" + I + "$"), G = { ID: new RegExp("^#(" + I + ")"), CLASS: new RegExp("^\\.(" + I + ")"), TAG: new RegExp("^(" + I + "|[*])"), ATTR: new RegExp("^" + W), PSEUDO: new RegExp("^" + F), CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + M + "*(even|odd|(([+-]|)(\\d*)n|)" + M + "*(?:([+-]|)" + M + "*(\\d+)|))" + M + "*\\)|)", "i"), bool: new RegExp("^(?:" + R + ")$", "i"), needsContext: new RegExp("^" + M + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + M + "*((?:-\\d)?\\d*)" + M + "*\\)|)(?=[^-]|$)", "i") }, Y = /HTML$/i, Q = /^(?:input|select|textarea|button)$/i, J = /^h\d$/i, K = /^[^{]+\{\s*\[native \w/, Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, ee = /[+~]/, te = new RegExp("\\\\[\\da-fA-F]{1,6}" + M + "?|\\\\([^\\r\\n\\f])", "g"), ne = function (e, t) { var n = "0x" + e.slice(1) - 65536; return t || (n < 0 ? String.fromCharCode(n + 65536) : String.fromCharCode(n >> 10 | 55296, 1023 & n | 56320)) }, re = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, ie = function (e, t) { return t ? "\0" === e ? "\ufffd" : e.slice(0, -1) + "\\" + e.charCodeAt(e.length - 1).toString(16) + " " : "\\" + e }, oe = function () { T() }, ae = be(function (e) { return !0 === e.disabled && "fieldset" === e.nodeName.toLowerCase() }, { dir: "parentNode", next: "legend" }); try { H.apply(t = O.call(p.childNodes), p.childNodes), t[p.childNodes.length].nodeType } catch (e) { H = { apply: t.length ? function (e, t) { L.apply(e, O.call(t)) } : function (e, t) { var n = e.length, r = 0; while (e[n++] = t[r++]); e.length = n - 1 } } } function se(t, e, n, r) { var i, o, a, s, u, l, c, f = e && e.ownerDocument, p = e ? e.nodeType : 9; if (n = n || [], "string" != typeof t || !t || 1 !== p && 9 !== p && 11 !== p) return n; if (!r && (T(e), e = e || C, E)) { if (11 !== p && (u = Z.exec(t))) if (i = u[1]) { if (9 === p) { if (!(a = e.getElementById(i))) return n; if (a.id === i) return n.push(a), n } else if (f && (a = f.getElementById(i)) && y(e, a) && a.id === i) return n.push(a), n } else { if (u[2]) return H.apply(n, e.getElementsByTagName(t)), n; if ((i = u[3]) && d.getElementsByClassName && e.getElementsByClassName) return H.apply(n, e.getElementsByClassName(i)), n } if (d.qsa && !N[t + " "] && (!v || !v.test(t)) && (1 !== p || "object" !== e.nodeName.toLowerCase())) { if (c = t, f = e, 1 === p && (U.test(t) || z.test(t))) { (f = ee.test(t) && ye(e.parentNode) || e) === e && d.scope || ((s = e.getAttribute("id")) ? s = s.replace(re, ie) : e.setAttribute("id", s = S)), o = (l = h(t)).length; while (o--) l[o] = (s ? "#" + s : ":scope") + " " + xe(l[o]); c = l.join(",") } try { return H.apply(n, f.querySelectorAll(c)), n } catch (e) { N(t, !0) } finally { s === S && e.removeAttribute("id") } } } return g(t.replace($, "$1"), e, n, r) } function ue() { var r = []; return function e(t, n) { return r.push(t + " ") > b.cacheLength && delete e[r.shift()], e[t + " "] = n } } function le(e) { return e[S] = !0, e } function ce(e) { var t = C.createElement("fieldset"); try { return !!e(t) } catch (e) { return !1 } finally { t.parentNode && t.parentNode.removeChild(t), t = null } } function fe(e, t) { var n = e.split("|"), r = n.length; while (r--) b.attrHandle[n[r]] = t } function pe(e, t) { var n = t && e, r = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex; if (r) return r; if (n) while (n = n.nextSibling) if (n === t) return -1; return e ? 1 : -1 } function de(t) { return function (e) { return "input" === e.nodeName.toLowerCase() && e.type === t } } function he(n) { return function (e) { var t = e.nodeName.toLowerCase(); return ("input" === t || "button" === t) && e.type === n } } function ge(t) { return function (e) { return "form" in e ? e.parentNode && !1 === e.disabled ? "label" in e ? "label" in e.parentNode ? e.parentNode.disabled === t : e.disabled === t : e.isDisabled === t || e.isDisabled !== !t && ae(e) === t : e.disabled === t : "label" in e && e.disabled === t } } function ve(a) { return le(function (o) { return o = +o, le(function (e, t) { var n, r = a([], e.length, o), i = r.length; while (i--) e[n = r[i]] && (e[n] = !(t[n] = e[n])) }) }) } function ye(e) { return e && "undefined" != typeof e.getElementsByTagName && e } for (e in d = se.support = {}, i = se.isXML = function (e) { var t = e.namespaceURI, n = (e.ownerDocument || e).documentElement; return !Y.test(t || n && n.nodeName || "HTML") }, T = se.setDocument = function (e) { var t, n, r = e ? e.ownerDocument || e : p; return r != C && 9 === r.nodeType && r.documentElement && (a = (C = r).documentElement, E = !i(C), p != C && (n = C.defaultView) && n.top !== n && (n.addEventListener ? n.addEventListener("unload", oe, !1) : n.attachEvent && n.attachEvent("onunload", oe)), d.scope = ce(function (e) { return a.appendChild(e).appendChild(C.createElement("div")), "undefined" != typeof e.querySelectorAll && !e.querySelectorAll(":scope fieldset div").length }), d.attributes = ce(function (e) { return e.className = "i", !e.getAttribute("className") }), d.getElementsByTagName = ce(function (e) { return e.appendChild(C.createComment("")), !e.getElementsByTagName("*").length }), d.getElementsByClassName = K.test(C.getElementsByClassName), d.getById = ce(function (e) { return a.appendChild(e).id = S, !C.getElementsByName || !C.getElementsByName(S).length }), d.getById ? (b.filter.ID = function (e) { var t = e.replace(te, ne); return function (e) { return e.getAttribute("id") === t } }, b.find.ID = function (e, t) { if ("undefined" != typeof t.getElementById && E) { var n = t.getElementById(e); return n ? [n] : [] } }) : (b.filter.ID = function (e) { var n = e.replace(te, ne); return function (e) { var t = "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id"); return t && t.value === n } }, b.find.ID = function (e, t) { if ("undefined" != typeof t.getElementById && E) { var n, r, i, o = t.getElementById(e); if (o) { if ((n = o.getAttributeNode("id")) && n.value === e) return [o]; i = t.getElementsByName(e), r = 0; while (o = i[r++]) if ((n = o.getAttributeNode("id")) && n.value === e) return [o] } return [] } }), b.find.TAG = d.getElementsByTagName ? function (e, t) { return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : d.qsa ? t.querySelectorAll(e) : void 0 } : function (e, t) { var n, r = [], i = 0, o = t.getElementsByTagName(e); if ("*" === e) { while (n = o[i++]) 1 === n.nodeType && r.push(n); return r } return o }, b.find.CLASS = d.getElementsByClassName && function (e, t) { if ("undefined" != typeof t.getElementsByClassName && E) return t.getElementsByClassName(e) }
vendor: 4,344 bytes, line 42
42, s = [], v = [], (d.qsa = K.test(C.querySelectorAll)) && (ce(function (e) { var t; a.appendChild(e).innerHTML = "<a id='" + S + "'></a><select id='" + S + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && v.push("[*^$]=" + M + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || v.push("\\[" + M + "*(?:value|" + R + ")"), e.querySelectorAll("[id~=" + S + "-]").length || v.push("~="), (t = C.createElement("input")).setAttribute("name", ""), e.appendChild(t), e.querySelectorAll("[name='']").length || v.push("\\[" + M + "*name" + M + "*=" + M + "*(?:''|\"\")"), e.querySelectorAll(":checked").length || v.push(":checked"), e.querySelectorAll("a#" + S + "+*").length || v.push(".#.+[+~]"), e.querySelectorAll("\\\f"), v.push("[\\r\\n\\f]") }), ce(function (e) { e.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>"; var t = C.createElement("input"); t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && v.push("name" + M + "*[*^$|!~]?="), 2 !== e.querySelectorAll(":enabled").length && v.push(":enabled", ":disabled"), a.appendChild(e).disabled = !0, 2 !== e.querySelectorAll(":disabled").length && v.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), v.push(",.*:") })), (d.matchesSelector = K.test(c = a.matches || a.webkitMatchesSelector || a.mozMatchesSelector || a.oMatchesSelector || a.msMatchesSelector)) && ce(function (e) { d.disconnectedMatch = c.call(e, "*"), c.call(e, "[s!='']:x"), s.push("!=", F) }), v = v.length && new RegExp(v.join("|")), s = s.length && new RegExp(s.join("|")), t = K.test(a.compareDocumentPosition), y = t || K.test(a.contains) ? function (e, t) { var n = 9 === e.nodeType ? e.documentElement : e, r = t && t.parentNode; return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r))) } : function (e, t) { if (t) while (t = t.parentNode) if (t === e) return !0; return !1 }, D = t ? function (e, t) { if (e === t) return l = !0, 0; var n = !e.compareDocumentPosition - !t.compareDocumentPosition; return n || (1 & (n = (e.ownerDocument || e) == (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !d.sortDetached && t.compareDocumentPosition(e) === n ? e == C || e.ownerDocument == p && y(p, e) ? -1 : t == C || t.ownerDocument == p && y(p, t) ? 1 : u ? P(u, e) - P(u, t) : 0 : 4 & n ? -1 : 1) } : function (e, t) { if (e === t) return l = !0, 0; var n, r = 0, i = e.parentNode, o = t.parentNode, a = [e], s = [t]; if (!i || !o) return e == C ? -1 : t == C ? 1 : i ? -1 : o ? 1 : u ? P(u, e) - P(u, t) : 0; if (i === o) return pe(e, t); n = e; while (n = n.parentNode) a.unshift(n); n = t; while (n = n.parentNode) s.unshift(n); while (a[r] === s[r]) r++; return r ? pe(a[r], s[r]) : a[r] == p ? -1 : s[r] == p ? 1 : 0 }), C }, se.matches = function (e, t) { return se(e, null, null, t) }, se.matchesSelector = function (e, t) { if (T(e), d.matchesSelector && E && !N[t + " "] && (!s || !s.test(t)) && (!v || !v.test(t))) try { var n = c.call(e, t); if (n || d.disconnectedMatch || e.document && 11 !== e.document.nodeType) return n } catch (e) { N(t, !0) } return 0 < se(t, C, null, [e]).length }, se.contains = function (e, t) { return (e.ownerDocument || e) != C && T(e), y(e, t) }, se.attr = function (e, t) { (e.ownerDocument || e) != C && T(e); var n = b.attrHandle[t.toLowerCase()], r = n && j.call(b.attrHandle, t.toLowerCase()) ? n(e, t, !E) : void 0; return void 0 !== r ? r : d.attributes || !E ? e.getAttribute(t) : (r = e.getAttributeNode(t)) && r.specified ? r.value : null }, se.escape = function (e) { return (e + "").replace(re, ie) }, se.error = function (e) { throw new Error("Syntax error, unrecognized expression: " + e) }, se.uniqueSort = function (e) { var t, n = [], r = 0, i = 0; if (l = !d.detectDuplicates, u = !d.sortStable && e.slice(0), e.sort(D), l) { while (t = e[i++]) t === e[i] && (r = n.push(i)); while (r--) e.splice(n[r], 1) } return u = null, e }, o = se.getText = function (e) { var t, n = "", r = 0, i = e.nodeType; if (i) { if (1 === i || 9 === i || 11 === i) { if ("string" == typeof e.textContent) return e.textContent; for (e = e.firstChild; e; e = e.nextSibling) n += o(e) }
vendor: 19,794 bytes, line 42
42 else if (3 === i || 4 === i) return e.nodeValue } else while (t = e[r++]) n += o(t); return n }, (b = se.selectors = { cacheLength: 50, createPseudo: le, match: G, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling" } }, preFilter: { ATTR: function (e) { return e[1] = e[1].replace(te, ne), e[3] = (e[3] || e[4] || e[5] || "").replace(te, ne), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) }, CHILD: function (e) { return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || se.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && se.error(e[0]), e }, PSEUDO: function (e) { var t, n = !e[6] && e[2]; return G.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && X.test(n) && (t = h(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) } }, filter: { TAG: function (e) { var t = e.replace(te, ne).toLowerCase(); return "*" === e ? function () { return !0 } : function (e) { return e.nodeName && e.nodeName.toLowerCase() === t } }, CLASS: function (e) { var t = m[e + " "]; return t || (t = new RegExp("(^|" + M + ")" + e + "(" + M + "|$)")) && m(e, function (e) { return t.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "") }) }, ATTR: function (n, r, i) { return function (e) { var t = se.attr(e, n); return null == t ? "!=" === r : !r || (t += "", "=" === r ? t === i : "!=" === r ? t !== i : "^=" === r ? i && 0 === t.indexOf(i) : "*=" === r ? i && -1 < t.indexOf(i) : "$=" === r ? i && t.slice(-i.length) === i : "~=" === r ? -1 < (" " + t.replace(B, " ") + " ").indexOf(i) : "|=" === r && (t === i || t.slice(0, i.length + 1) === i + "-")) } }, CHILD: function (h, e, t, g, v) { var y = "nth" !== h.slice(0, 3), m = "last" !== h.slice(-4), x = "of-type" === e; return 1 === g && 0 === v ? function (e) { return !!e.parentNode } : function (e, t, n) { var r, i, o, a, s, u, l = y !== m ? "nextSibling" : "previousSibling", c = e.parentNode, f = x && e.nodeName.toLowerCase(), p = !n && !x, d = !1; if (c) { if (y) { while (l) { a = e; while (a = a[l]) if (x ? a.nodeName.toLowerCase() === f : 1 === a.nodeType) return !1; u = l = "only" === h && !u && "nextSibling" } return !0 } if (u = [m ? c.firstChild : c.lastChild], m && p) { d = (s = (r = (i = (o = (a = c)[S] || (a[S] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] || [])[0] === k && r[1]) && r[2], a = s && c.childNodes[s]; while (a = ++s && a && a[l] || (d = s = 0) || u.pop()) if (1 === a.nodeType && ++d && a === e) { i[h] = [k, s, d]; break } } else if (p && (d = s = (r = (i = (o = (a = e)[S] || (a[S] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] || [])[0] === k && r[1]), !1 === d) while (a = ++s && a && a[l] || (d = s = 0) || u.pop()) if ((x ? a.nodeName.toLowerCase() === f : 1 === a.nodeType) && ++d && (p && ((i = (o = a[S] || (a[S] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] = [k, d]), a === e)) break; return (d -= v) === g || d % g == 0 && 0 <= d / g } } }, PSEUDO: function (e, o) { var t, a = b.pseudos[e] || b.setFilters[e.toLowerCase()] || se.error("unsupported pseudo: " + e); return a[S] ? a(o) : 1 < a.length ? (t = [e, e, "", o], b.setFilters.hasOwnProperty(e.toLowerCase()) ? le(function (e, t) { var n, r = a(e, o), i = r.length; while (i--) e[n = P(e, r[i])] = !(t[n] = r[i]) }) : function (e) { return a(e, 0, t) }) : a } }, pseudos: { not: le(function (e) { var r = [], i = [], s = f(e.replace($, "$1")); return s[S] ? le(function (e, t, n, r) { var i, o = s(e, null, r, []), a = e.length; while (a--) (i = o[a]) && (e[a] = !(t[a] = i)) }) : function (e, t, n) { return r[0] = e, s(r, null, n, i), r[0] = null, !i.pop() } }), has: le(function (t) { return function (e) { return 0 < se(t, e).length } }), contains: le(function (t) { return t = t.replace(te, ne), function (e) { return -1 < (e.textContent || o(e)).indexOf(t) } }), lang: le(function (n) { return V.test(n || "") || se.error("unsupported lang: " + n), n = n.replace(te, ne).toLowerCase(), function (e) { var t; do { if (t = E ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return (t = t.toLowerCase()) === n || 0 === t.indexOf(n + "-") } while ((e = e.parentNode) && 1 === e.nodeType); return !1 } }), target: function (e) { var t = n.location && n.location.hash; return t && t.slice(1) === e.id }, root: function (e) { return e === a }, focus: function (e) { return e === C.activeElement && (!C.hasFocus || C.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) }, enabled: ge(!1), disabled: ge(!0), checked: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && !!e.checked || "option" === t && !!e.selected }, selected: function (e) { return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected }, empty: function (e) { for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeType < 6) return !1; return !0 }, parent: function (e) { return !b.pseudos.empty(e) }, header: function (e) { return J.test(e.nodeName) }, input: function (e) { return Q.test(e.nodeName) }, button: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && "button" === e.type || "button" === t }, text: function (e) { var t; return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) }, first: ve(function () { return [0] }), last: ve(function (e, t) { return [t - 1] }), eq: ve(function (e, t, n) { return [n < 0 ? n + t : n] }), even: ve(function (e, t) { for (var n = 0; n < t; n += 2) e.push(n); return e }), odd: ve(function (e, t) { for (var n = 1; n < t; n += 2) e.push(n); return e }), lt: ve(function (e, t, n) { for (var r = n < 0 ? n + t : t < n ? t : n; 0 <= --r;) e.push(r); return e }), gt: ve(function (e, t, n) { for (var r = n < 0 ? n + t : n; ++r < t;) e.push(r); return e }) } }).pseudos.nth = b.pseudos.eq, { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) b.pseudos[e] = de(e); for (e in { submit: !0, reset: !0 }) b.pseudos[e] = he(e); function me() { } function xe(e) { for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value; return r } function be(s, e, t) { var u = e.dir, l = e.next, c = l || u, f = t && "parentNode" === c, p = r++; return e.first ? function (e, t, n) { while (e = e[u]) if (1 === e.nodeType || f) return s(e, t, n); return !1 } : function (e, t, n) { var r, i, o, a = [k, p]; if (n) { while (e = e[u]) if ((1 === e.nodeType || f) && s(e, t, n)) return !0 } else while (e = e[u]) if (1 === e.nodeType || f) if (i = (o = e[S] || (e[S] = {}))[e.uniqueID] || (o[e.uniqueID] = {}), l && l === e.nodeName.toLowerCase()) e = e[u] || e; else { if ((r = i[c]) && r[0] === k && r[1] === p) return a[2] = r[2]; if ((i[c] = a)[2] = s(e, t, n)) return !0 } return !1 } } function we(i) { return 1 < i.length ? function (e, t, n) { var r = i.length; while (r--) if (!i[r](e, t, n)) return !1; return !0 } : i[0] } function Te(e, t, n, r, i) { for (var o, a = [], s = 0, u = e.length, l = null != t; s < u; s++) (o = e[s]) && (n && !n(o, r, i) || (a.push(o), l && t.push(s))); return a } function Ce(d, h, g, v, y, e) { return v && !v[S] && (v = Ce(v)), y && !y[S] && (y = Ce(y, e)), le(function (e, t, n, r) { var i, o, a, s = [], u = [], l = t.length, c = e || function (e, t, n) { for (var r = 0, i = t.length; r < i; r++) se(e, t[r], n); return n }(h || "*", n.nodeType ? [n] : n, []), f = !d || !e && h ? c : Te(c, s, d, n, r), p = g ? y || (e ? d : l || v) ? [] : t : f; if (g && g(f, p, n, r), v) { i = Te(p, u), v(i, [], n, r), o = i.length; while (o--) (a = i[o]) && (p[u[o]] = !(f[u[o]] = a)) } if (e) { if (y || d) { if (y) { i = [], o = p.length; while (o--) (a = p[o]) && i.push(f[o] = a); y(null, p = [], i, r) } o = p.length; while (o--) (a = p[o]) && -1 < (i = y ? P(e, a) : s[o]) && (e[i] = !(t[i] = a)) } } else p = Te(p === t ? p.splice(l, p.length) : p), y ? y(null, t, p, r) : H.apply(t, p) }) } function Ee(e) { for (var i, t, n, r = e.length, o = b.relative[e[0].type], a = o || b.relative[" "], s = o ? 1 : 0, u = be(function (e) { return e === i }, a, !0), l = be(function (e) { return -1 < P(i, e) }, a, !0), c = [function (e, t, n) { var r = !o && (n || t !== w) || ((i = t).nodeType ? u(e, t, n) : l(e, t, n)); return i = null, r }]; s < r; s++) if (t = b.relative[e[s].type]) c = [be(we(c), t)]; else { if ((t = b.filter[e[s].type].apply(null, e[s].matches))[S]) { for (n = ++s; n < r; n++) if (b.relative[e[n].type]) break; return Ce(1 < s && we(c), 1 < s && xe(e.slice(0, s - 1).concat({ value: " " === e[s - 2].type ? "*" : "" })).replace($, "$1"), t, s < n && Ee(e.slice(s, n)), n < r && Ee(e = e.slice(n)), n < r && xe(e)) } c.push(t) } return we(c) } return me.prototype = b.filters = b.pseudos, b.setFilters = new me, h = se.tokenize = function (e, t) { var n, r, i, o, a, s, u, l = x[e + " "]; if (l) return t ? 0 : l.slice(0); a = e, s = [], u = b.preFilter; while (a) { for (o in n && !(r = _.exec(a)) || (r && (a = a.slice(r[0].length) || a), s.push(i = [])), n = !1, (r = z.exec(a)) && (n = r.shift(), i.push({ value: n, type: r[0].replace($, " ") }), a = a.slice(n.length)), b.filter) !(r = G[o].exec(a)) || u[o] && !(r = u[o](r)) || (n = r.shift(), i.push({ value: n, type: o, matches: r }), a = a.slice(n.length)); if (!n) break } return t ? a.length : a ? se.error(e) : x(e, s).slice(0) }, f = se.compile = function (e, t) { var n, v, y, m, x, r, i = [], o = [], a = A[e + " "]; if (!a) { t || (t = h(e)), n = t.length; while (n--) (a = Ee(t[n]))[S] ? i.push(a) : o.push(a); (a = A(e, (v = o, m = 0 < (y = i).length, x = 0 < v.length, r = function (e, t, n, r, i) { var o, a, s, u = 0, l = "0", c = e && [], f = [], p = w, d = e || x && b.find.TAG("*", i), h = k += null == p ? 1 : Math.random() || .1, g = d.length; for (i && (w = t == C || t || i) ; l !== g && null != (o = d[l]) ; l++) { if (x && o) { a = 0, t || o.ownerDocument == C || (T(o), n = !E); while (s = v[a++]) if (s(o, t || C, n)) { r.push(o); break } i && (k = h) } m && ((o = !s && o) && u--, e && c.push(o)) } if (u += l, m && l !== u) { a = 0; while (s = y[a++]) s(c, f, t, n); if (e) { if (0 < u) while (l--) c[l] || f[l] || (f[l] = q.call(r)); f = Te(f) } H.apply(r, f), i && !e && 0 < f.length && 1 < u + y.length && se.uniqueSort(r) } return i && (k = h, w = p), c }, m ? le(r) : r))).selector = e } return a }, g = se.select = function (e, t, n, r) { var i, o, a, s, u, l = "function" == typeof e && e, c = !r && h(e = l.selector || e); if (n = n || [], 1 === c.length) { if (2 < (o = c[0] = c[0].slice(0)).length && "ID" === (a = o[0]).type && 9 === t.nodeType && E && b.relative[o[1].type]) { if (!(t = (b.find.ID(a.matches[0].replace(te, ne), t) || [])[0])) return n; l && (t = t.parentNode), e = e.slice(o.shift().value.length) } i = G.needsContext.test(e) ? 0 : o.length; while (i--) { if (a = o[i], b.relative[s = a.type]) break; if ((u = b.find[s]) && (r = u(a.matches[0].replace(te, ne), ee.test(o[0].type) && ye(t.parentNode) || t))) { if (o.splice(i, 1), !(e = r.length && xe(o))) return H.apply(n, r), n; break } } } return (l || f(e, c))(r, t, !E, n, !t || ee.test(e) && ye(t.parentNode) || t), n }, d.sortStable = S.split("").sort(D).join("") === S, d.detectDuplicates = !!l, T(), d.sortDetached = ce(function (e) { return 1 & e.compareDocumentPosition(C.createElement("fieldset")) }), ce(function (e) { return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href") }) || fe("type|href|height|width", function (e, t, n) { if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) }), d.attributes && ce(function (e) { return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value") }) || fe("value", function (e, t, n) { if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue }), ce(function (e) { return null == e.getAttribute("disabled") }) || fe(R, function (e, t, n) { var r; if (!n) return !0 === e[t] ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null }), se }(C); S.find = d, S.expr = d.selectors, S.expr[":"] = S.expr.pseudos, S.uniqueSort = S.unique = d.uniqueSort, S.text = d.getText, S.isXMLDoc = d.isXML, S.contains = d.contains, S.escapeSelector = d.escape; var h = function (e, t, n) { var r = [], i = void 0 !== n; while ((e = e[t]) && 9 !== e.nodeType) if (1 === e.nodeType) { if (i && S(e).is(n)) break; r.push(e) } return r }, T = function (e, t) { for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e); return n }, k = S.expr.match.needsContext; function A(e, t) { return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() } var N = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; function D(e, n, r) { return m(n) ? S.grep(e, function (e, t) { return !!n.call(e, t, e) !== r }) : n.nodeType ? S.grep(e, function (e) { return e === n !== r }) : "string" != typeof n ? S.grep(e, function (e) { return -1 < i.call(n, e) !== r }) : S.filter(n, e, r) } S.filter = function (e, t, n) { var r = t[0]; return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === r.nodeType ? S.find.matchesSelector(r, e) ? [r] : [] : S.find.matches(e, S.grep(t, function (e) { return 1 === e.nodeType })) }, S.fn.extend({ find: function (e) { var t, n, r = this.length, i = this; if ("string" != typeof e) return this.pushStack(S(e).filter(function () { for (t = 0; t < r; t++) if (S.contains(i[t], this)) return !0 })); for (n = this.pushStack([]), t = 0; t < r; t++) S.find(e, i[t], n); return 1 < r ? S.uniqueSort(n) : n }, filter: function (e) { return this.pushStack(D(this, e || [], !1)) }, not: function (e) { return this.pushStack(D(this, e || [], !0)) }, is: function (e) { return !!D(this, "string" == typeof e && k.test(e) ? S(e) : e || [], !1).length } }); var j, q = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; (S.fn.init = function (e, t, n) { var r, i; if (!e) return this; if (n = n || j, "string" == typeof e) { if (!(r = "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length ? [null, e, null] : q.exec(e)) || !r[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); if (r[1]) { if (t = t instanceof S ? t[0] : t, S.merge(this, S.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : E, !0)), N.test(r[1]) && S.isPlainObject(t)) for (r in t) m(this[r]) ? this[r](t[r]) : this.attr(r, t[r]); return this } return (i = E.getElementById(r[2])) && (this[0] = i, this.length = 1), this } return e.nodeType ? (this[0] = e, this.length = 1, this) : m(e) ? void 0 !== n.ready ? n.ready(e) : e(S) : S.makeArray(e, this) }).prototype = S.fn, j = S(E); var L = /^(?:parents|prev(?:Until|All))/, H = { children: !0, contents: !0, next: !0, prev: !0 }; function O(e, t) { while ((e = e[t]) && 1 !== e.nodeType); return e } S.fn.extend({ has: function (e) { var t = S(e, this), n = t.length; return this.filter(function () { for (var e = 0; e < n; e++) if (S.contains(this, t[e])) return !0 }) }, closest: function (e, t) { var n, r = 0, i = this.length, o = [], a = "string" != typeof e && S(e); if (!k.test(e)) for (; r < i; r++) for (n = this[r]; n && n !== t; n = n.parentNode) if (n.nodeType < 11 && (a ? -1 < a.index(n) : 1 === n.nodeType && S.find.matchesSelector(n, e))) { o.push(n); break } return this.pushStack(1 < o.length ? S.uniqueSort(o) : o) }, index: function (e) { return e ? "string" == typeof e ? i.call(S(e), this[0]) : i.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, add: function (e, t) { return this.pushStack(S.uniqueSort(S.merge(this.get(), S(e, t)))) }, addBack: function (e) { return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) } }), S.each({ parent: function (e) { var t = e.parentNode; return t && 11 !== t.nodeType ? t : null }, parents: function (e) { return h(e, "parentNode") }, parentsUntil: function (e, t, n) { return h(e, "parentNode", n) }, next: function (e) { return O(e, "nextSibling") }, prev: function (e) { return O(e, "previousSibling") }, nextAll: function (e) { return h(e, "nextSibling") }, prevAll: function (e) { return h(e, "previousSibling") }, nextUntil: function (e, t, n) { return h(e, "nextSibling", n) }, prevUntil: function (e, t, n) { return h(e, "previousSibling", n) }, siblings: function (e) { return T((e.parentNode || {}).firstChild, e) }, children: function (e) { return T(e.firstChild) }, contents: function (e) { return null != e.contentDocument && r(e.contentDocument) ? e.contentDocument : (A(e, "template") && (e = e.content || e), S.merge([], e.childNodes)) } }, function (r, i) { S.fn[r] = function (e, t) { var n = S.map(this, i, e); return "Until" !== r.slice(-5) && (t = e), t && "string" == typeof t && (n = S.filter(t, n)), 1 < this.length && (H[r] || S.uniqueSort(n), L.test(r) && n.reverse()), this.pushStack(n) } }); var P = /[^\x20\t\r\n\f]+/g; function R(e) { return e } function M(e) { throw e } function I(e, t, n, r) { var i; try { e && m(i = e.promise) ? i.call(e).done(t).fail(n) : e && m(i = e.then) ? i.call(e, t, n) : t.apply(void 0, [e].slice(r)) } catch (e) { n.apply(void 0, [e]) } } S.Callbacks = function (r) { var e, n; r = "string" == typeof r ? (e = r, n = {}, S.each(e.match(P) || [], function (e, t) { n[t] = !0 }), n) : S.extend({}, r); var i, t, o, a, s = [], u = [], l = -1, c = function () { for (a = a || r.once, o = i = !0; u.length; l = -1) { t = u.shift(); while (++l < s.length) !1 === s[l].apply(t[0], t[1]) && r.stopOnFalse && (l = s.length, t = !1) } r.memory || (t = !1), i = !1, a && (s = t ? [] : "") }, f = { add: function () { return s && (t && !i && (l = s.length - 1, u.push(t)), function n(e) { S.each(e, function (e, t) { m(t) ? r.unique && f.has(t) || s.push(t) : t && t.length && "string" !== w(t) && n(t) }) }(arguments), t && !i && c()), this }, remove: function () { return S.each(arguments, function (e, t) { var n; while (-1 < (n = S.inArray(t, s, n))) s.splice(n, 1), n <= l && l-- }), this }, has: function (e) { return e ? -1 < S.inArray(e, s) : 0 < s.length }, empty: function () { return s && (s = []), this }, disable: function () { return a = u = [], s = t = "", this }, disabled: function () { return !s }, lock: function () { return a = u = [], t || i || (s = t = ""), this }, locked: function () { return !!a }, fireWith: function (e, t) { return a || (t = [e, (t = t || []).slice ? t.slice() : t], u.push(t), i || c()), this }, fire: function () { return f.fireWith(this, arguments), this }, fired: function () { return !!o } }; return f }, S.extend({ Deferred: function (e) { var o = [["notify", "progress", S.Callbacks("memory"), S.Callbacks("memory"), 2], ["resolve", "done", S.Callbacks("once memory"), S.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", S.Callbacks("once memory"), S.Callbacks("once memory"), 1, "rejected"]], i = "pending", a = { state: function () { return i }, always: function () { return s.done(arguments).fail(arguments), this }, "catch": function (e) { return a.then(null, e) }, pipe: function () { var i = arguments; return S.Deferred(function (r) { S.each(o, function (e, t) { var n = m(i[t[4]]) && i[t[4]]; s[t[1]](function () { var e = n && n.apply(this, arguments); e && m(e.promise) ? e.promise().progress(r.notify).done(r.resolve).fail(r.reject) : r[t[0] + "With"](this, n ? [e] : arguments) }) }), i = null }).promise() }, then: function (t, n, r) { var u = 0; function l(i, o, a, s) { return function () { var n = this, r = arguments, e = function () { var e, t; if (!(i < u)) { if ((e = a.apply(n, r)) === o.promise()) throw new TypeError("Thenable self
42-resolution"); t = e && ("object" == typeof e || "function" == typeof e) && e.then, m(t) ? s ? t.call(e, l(u, o, R, s), l(u, o, M, s)) : (u++, t.call(e, l(u, o, R, s), l(u, o, M, s), l(u, o, R, o.notifyWith))) : (a !== R && (n = void 0, r = [e]), (s || o.resolveWith)(n, r)) } }, t = s ? e : function () { try { e() } catch (e) { S.Deferred.exceptionHook && S.Deferred.exceptionHook(e, t.stackTrace), u <= i + 1 && (a !== M && (n = void 0, r = [e]), o.rejectWith(n, r)) } }; i ? t() : (S.Deferred.getStackHook && (t.stackTrace = S.Deferred.getStackHook()), C.setTimeout(t)) } } return S.Deferred(function (e) { o[0][3].add(l(0, e, m(r) ? r : R, e.notifyWith)), o[1][3].add(l(0, e, m(t) ? t : R)), o[2][3].add(l(0, e, m(n) ? n : M)) }).promise() }, promise: function (e) { return null != e ? S.extend(e, a) : a } }, s = {}; return S.each(o, function (e, t) { var n = t[2], r = t[5]; a[t[1]] = n.add, r && n.add(function () { i = r }, o[3 - e][2].disable, o[3 - e][3].disable, o[0][2].lock, o[0][3].lock), n.add(t[3].fire), s[t[0]] = function () { return s[t[0] + "With"](this === s ? void 0 : this, arguments), this }, s[t[0] + "With"] = n.fireWith }), a.promise(s), e && e.call(s, s), s }, when: function (e) { var n = arguments.length, t = n, r = Array(t), i = s.call(arguments), o = S.Deferred(), a = function (t) { return function (e) { r[t] = this, i[t] = 1 < arguments.length ? s.call(arguments) : e, --n || o.resolveWith(r, i) } }; if (n <= 1 && (I(e, o.done(a(t)).resolve, o.reject, !n), "pending" === o.state() || m(i[t] && i[t].then))) return o.then(); while (t--) I(i[t], a(t), o.reject); return o.promise() } }); var W = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; S.Deferred.exceptionHook = function (e, t) { C.console && C.console.warn && e && W.test(e.name) && C.console.warn("jQuery.Deferred exception: " + e.message, e.stack, t) }, S.readyException = function (e) { C.setTimeout(function () { throw e }) }; var F = S.Deferred(); function B() { E.removeEventListener("DOMContentLoaded", B), C.removeEventListener("load", B), S.ready() } S.fn.ready = function (e) { return F.then(e)["catch"](function (e) { S.readyException(e) }), this }, S.extend({ isReady: !1, readyWait: 1, ready: function (e) { (!0 === e ? --S.readyWait : S.isReady) || (S.isReady = !0) !== e && 0 < --S.readyWait || F.resolveWith(E, [S]) } }), S.ready.then = F.then, "complete" === E.readyState || "loading" !== E.readyState && !E.documentElement.doScroll ? C.setTimeout(S.ready) : (E.addEventListener("DOMContentLoaded", B), C.addEventListener("load", B)); var $ = function (e, t, n, r, i, o, a) { var s = 0, u = e.length, l = null == n; if ("object" === w(n)) for (s in i = !0, n) $(e, t, s, n[s], !0, o, a); else if (void 0 !== r && (i = !0, m(r) || (a = !0), l && (a ? (t.call(e, r), t = null) : (l = t, t = function (e, t, n) { return l.call(S(e), n) })), t)) for (; s < u; s++) t(e[s], n, a ? r : r.call(e[s], s, t(e[s], n))); return i ? e : l ? t.call(e) : u ? t(e[0], n) : o }, _ = /^-ms-/, z = /-([a-z])/g; function U(e, t) { return t.toUpperCase() } function X(e) { return e.replace(_, "ms-").replace(z, U) } var V = function (e) { return 1 === e.nodeType || 9 === e.nodeType || !+e.n
vendor: 5,299 bytes, line 42
42odeType }; function G() { this.expando = S.expando + G.uid++ } G.uid = 1, G.prototype = { cache: function (e) { var t = e[this.expando]; return t || (t = {}, V(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { value: t, configurable: !0 }))), t }, set: function (e, t, n) { var r, i = this.cache(e); if ("string" == typeof t) i[X(t)] = n; else for (r in t) i[X(r)] = t[r]; return i }, get: function (e, t) { return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][X(t)] }, access: function (e, t, n) { return void 0 === t || t && "string" == typeof t && void 0 === n ? this.get(e, t) : (this.set(e, t, n), void 0 !== n ? n : t) }, remove: function (e, t) { var n, r = e[this.expando]; if (void 0 !== r) { if (void 0 !== t) { n = (t = Array.isArray(t) ? t.map(X) : (t = X(t)) in r ? [t] : t.match(P) || []).length; while (n--) delete r[t[n]] } (void 0 === t || S.isEmptyObject(r)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando]) } }, hasData: function (e) { var t = e[this.expando]; return void 0 !== t && !S.isEmptyObject(t) } }; var Y = new G, Q = new G, J = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, K = /[A-Z]/g; function Z(e, t, n) { var r, i; if (void 0 === n && 1 === e.nodeType) if (r = "data-" + t.replace(K, "-$&").toLowerCase(), "string" == typeof (n = e.getAttribute(r))) { try { n = "true" === (i = n) || "false" !== i && ("null" === i ? null : i === +i + "" ? +i : J.test(i) ? JSON.parse(i) : i) } catch (e) { } Q.set(e, t, n) } else n = void 0; return n } S.extend({ hasData: function (e) { return Q.hasData(e) || Y.hasData(e) }, data: function (e, t, n) { return Q.access(e, t, n) }, removeData: function (e, t) { Q.remove(e, t) }, _data: function (e, t, n) { return Y.access(e, t, n) }, _removeData: function (e, t) { Y.remove(e, t) } }), S.fn.extend({ data: function (n, e) { var t, r, i, o = this[0], a = o && o.attributes; if (void 0 === n) { if (this.length && (i = Q.get(o), 1 === o.nodeType && !Y.get(o, "hasDataAttrs"))) { t = a.length; while (t--) a[t] && 0 === (r = a[t].name).indexOf("data-") && (r = X(r.slice(5)), Z(o, r, i[r])); Y.set(o, "hasDataAttrs", !0) } return i } return "object" == typeof n ? this.each(function () { Q.set(this, n) }) : $(this, function (e) { var t; if (o && void 0 === e) return void 0 !== (t = Q.get(o, n)) ? t : void 0 !== (t = Z(o, n)) ? t : void 0; this.each(function () { Q.set(this, n, e) }) }, null, e, 1 < arguments.length, null, !0) }, removeData: function (e) { return this.each(function () { Q.remove(this, e) }) } }), S.extend({ queue: function (e, t, n) { var r; if (e) return t = (t || "fx") + "queue", r = Y.get(e, t), n && (!r || Array.isArray(n) ? r = Y.access(e, t, S.makeArray(n)) : r.push(n)), r || [] }, dequeue: function (e, t) { t = t || "fx"; var n = S.queue(e, t), r = n.length, i = n.shift(), o = S._queueHooks(e, t); "inprogress" === i && (i = n.shift(), r--), i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, function () { S.dequeue(e, t) }, o)), !r && o && o.empty.fire() }, _queueHooks: function (e, t) { var n = t + "queueHooks"; return Y.get(e, n) || Y.access(e, n, { empty: S.Callbacks("once memory").add(function () { Y.remove(e, [t + "queue", n]) }) }) } }), S.fn.extend({ queue: function (t, n) { var e = 2; return "string" != typeof t && (n = t, t = "fx", e--), arguments.length < e ? S.queue(this[0], t) : void 0 === n ? this : this.each(function () { var e = S.queue(this, t, n); S._queueHooks(this, t), "fx" === t && "inprogress" !== e[0] && S.dequeue(this, t) }) }, dequeue: function (e) { return this.each(function () { S.dequeue(this, e) }) }, clearQueue: function (e) { return this.queue(e || "fx", []) }, promise: function (e, t) { var n, r = 1, i = S.Deferred(), o = this, a = this.length, s = function () { --r || i.resolveWith(o, [o]) }; "string" != typeof e && (t = e, e = void 0), e = e || "fx"; while (a--) (n = Y.get(o[a], e + "queueHooks")) && n.empty && (r++, n.empty.add(s)); return s(), i.promise(t) } }); var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, te = new RegExp("^(?:([+-])=|)(" + ee + ")([a-z%]*)$", "i"), ne = ["Top", "Right", "Bottom", "Left"], re = E.documentElement, ie = function (e) { return S.contains(e.ownerDocument, e) }, oe = { composed: !0 }; re.getRootNode && (ie = function (e) { return S.contains(e.ownerDocument, e) || e.getRootNode(oe) === e.ownerDocument }); var ae = function (e, t) { return "none" === (e = t || e).style.display || "" === e.style.display && ie(e) && "none" === S.css(e, "display") }; function se(e, t, n, r) { var i, o, a = 20, s = r ? function () { return r.cur() } : function () { return S.css(e, t, "") }, u = s(), l = n && n[3] || (S.cssNumber[t] ? "" : "px"), c = e.nodeType && (S.cssNumber[t] || "px" !== l && +u) && te.exec(S.css(e, t)); if (c && c[3] !== l) { u /= 2, l = l || c[3], c = +u || 1; while (a--) S.style(e, t, c + l), (1 - o) * (1 - (o = s() / u || .5)) <= 0 && (a = 0), c /= o; c *= 2, S.style(e, t, c + l), n = n || [] } return n && (c = +c || +u || 0, i = n[1] ? c + (n[1] + 1) * n[2] : +n[2], r && (r.unit = l, r.start = c, r.end = i)), i } var ue = {}; function le(e, t) { for (var n, r, i, o, a, s, u, l = [], c = 0, f = e.length; c < f; c++) (r = e[c]).style && (n = r.style.display, t ? ("none" === n && (l[c] = Y.get(r, "dis
vendor: 14,051 bytes, line 42
42play") || null, l[c] || (r.style.display = "")), "" === r.style.display && ae(r) && (l[c] = (u = a = o = void 0, a = (i = r).ownerDocument, s = i.nodeName, (u = ue[s]) || (o = a.body.appendChild(a.createElement(s)), u = S.css(o, "display"), o.parentNode.removeChild(o), "none" === u && (u = "block"), ue[s] = u)))) : "none" !== n && (l[c] = "none", Y.set(r, "display", n))); for (c = 0; c < f; c++) null != l[c] && (e[c].style.display = l[c]); return e } S.fn.extend({ show: function () { return le(this, !0) }, hide: function () { return le(this) }, toggle: function (e) { return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function () { ae(this) ? S(this).show() : S(this).hide() }) } }); var ce, fe, pe = /^(?:checkbox|radio)$/i, de = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i, he = /^$|^module$|\/(?:java|ecma)script/i; ce = E.createDocumentFragment().appendChild(E.createElement("div")), (fe = E.createElement("input")).setAttribute("type", "radio"), fe.setAttribute("checked", "checked"), fe.setAttribute("name", "t"), ce.appendChild(fe), y.checkClone = ce.cloneNode(!0).cloneNode(!0).lastChild.checked, ce.innerHTML = "<textarea>x</textarea>", y.noCloneChecked = !!ce.cloneNode(!0).lastChild.defaultValue, ce.innerHTML = "<option></option>", y.option = !!ce.lastChild; var ge = { thead: [1, "<table>", "</table>"], col: [2, "<table><colgroup>", "</colgroup></table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], _default: [0, "", ""] }; function ve(e, t) { var n; return n = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : [], void 0 === t || t && A(e, t) ? S.merge([e], n) : n } function ye(e, t) { for (var n = 0, r = e.length; n < r; n++) Y.set(e[n], "globalEval", !t || Y.get(t[n], "globalEval")) } ge.tbody = ge.tfoot = ge.colgroup = ge.caption = ge.thead, ge.th = ge.td, y.option || (ge.optgroup = ge.option = [1, "<select multiple='multiple'>", "</select>"]); var me = /<|&#?\w+;/; function xe(e, t, n, r, i) { for (var o, a, s, u, l, c, f = t.createDocumentFragment(), p = [], d = 0, h = e.length; d < h; d++) if ((o = e[d]) || 0 === o) if ("object" === w(o)) S.merge(p, o.nodeType ? [o] : o); else if (me.test(o)) { a = a || f.appendChild(t.createElement("div")), s = (de.exec(o) || ["", ""])[1].toLowerCase(), u = ge[s] || ge._default, a.innerHTML = u[1] + S.htmlPrefilter(o) + u[2], c = u[0]; while (c--) a = a.lastChild; S.merge(p, a.childNodes), (a = f.firstChild).textContent = "" } else p.push(t.createTextNode(o)); f.textContent = "", d = 0; while (o = p[d++]) if (r && -1 < S.inArray(o, r)) i && i.push(o); else if (l = ie(o), a = ve(f.appendChild(o), "script"), l && ye(a), n) { c = 0; while (o = a[c++]) he.test(o.type || "") && n.push(o) } return f } var be = /^key/, we = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, Te = /^([^.]*)(?:\.(.+)|)/; function Ce() { return !0 } function Ee() { return !1 } function Se(e, t) { return e === function () { try { return E.activeElement } catch (e) { } }() == ("focus" === t) } function ke(e, t, n, r, i, o) { var a, s; if ("object" == typeof t) { for (s in "string" != typeof n && (r = r || n, n = void 0), t) ke(e, s, n, r, t[s], o); return e } if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ("string" == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), !1 === i) i = Ee; else if (!i) return e; return 1 === o && (a = i, (i = function (e) { return S().off(e), a.apply(this, arguments) }).guid = a.guid || (a.guid = S.guid++)), e.each(function () { S.event.add(this, t, i, r, n) }) } function Ae(e, i, o) { o ? (Y.set(e, i, !1), S.event.add(e, i, { namespace: !1, handler: function (e) { var t, n, r = Y.get(this, i); if (1 & e.isTrigger && this[i]) { if (r.length) (S.event.special[i] || {}).delegateType && e.stopPropagation(); else if (r = s.call(arguments), Y.set(this, i, r), t = o(this, i), this[i](), r !== (n = Y.get(this, i)) || t ? Y.set(this, i, !1) : n = {}, r !== n) return e.stopImmediatePropagation(), e.preventDefault(), n.value } else r.length && (Y.set(this, i, { value: S.event.trigger(S.extend(r[0], S.Event.prototype), r.slice(1), this) }), e.stopImmediatePropagation()) } })) : void 0 === Y.get(e, i) && S.event.add(e, i, Ce) } S.event = { global: {}, add: function (t, e, n, r, i) { var o, a, s, u, l, c, f, p, d, h, g, v = Y.get(t); if (V(t)) { n.handler && (n = (o = n).handler, i = o.selector), i && S.find.matchesSelector(re, i), n.guid || (n.guid = S.guid++), (u = v.events) || (u = v.events = Object.create(null)), (a = v.handle) || (a = v.handle = function (e) { return "undefined" != typeof S && S.event.triggered !== e.type ? S.event.dispatch.apply(t, arguments) : void 0 }), l = (e = (e || "").match(P) || [""]).length; while (l--) d = g = (s = Te.exec(e[l]) || [])[1], h = (s[2] || "").split(".").sort(), d && (f = S.event.special[d] || {}, d = (i ? f.delegateType : f.bindType) || d, f = S.event.special[d] || {}, c = S.extend({ type: d, origType: g, data: r, handler: n, guid: n.guid, selector: i, needsContext: i && S.expr.match.needsContext.test(i), namespace: h.join(".") }, o), (p = u[d]) || ((p = u[d] = []).delegateCount = 0, f.setup && !1 !== f.setup.call(t, r, h, a) || t.addEventListener && t.addEventListener(d, a)), f.add && (f.add.call(t, c), c.handler.guid || (c.handler.guid = n.guid)), i ? p.splice(p.delegateCount++, 0, c) : p.push(c), S.event.global[d] = !0) } }, remove: function (e, t, n, r, i) { var o, a, s, u, l, c, f, p, d, h, g, v = Y.hasData(e) && Y.get(e); if (v && (u = v.events)) { l = (t = (t || "").match(P) || [""]).length; while (l--) if (d = g = (s = Te.exec(t[l]) || [])[1], h = (s[2] || "").split(".").sort(), d) { f = S.event.special[d] || {}, p = u[d = (r ? f.delegateType : f.bindType) || d] || [], s = s[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), a = o = p.length; while (o--) c = p[o], !i && g !== c.origType || n && n.guid !== c.guid || s && !s.test(c.namespace) || r && r !== c.selector && ("**" !== r || !c.selector) || (p.splice(o, 1), c.selector && p.delegateCount--, f.remove && f.remove.call(e, c)); a && !p.length && (f.teardown && !1 !== f.teardown.call(e, h, v.handle) || S.removeEvent(e, d, v.handle), delete u[d]) } else for (d in u) S.event.remove(e, d + t[l], n, r, !0); S.isEmptyObject(u) && Y.remove(e, "handle events") } }, dispatch: function (e) { var t, n, r, i, o, a, s = new Array(arguments.length), u = S.event.fix(e), l = (Y.get(this, "events") || Object.create(null))[u.type] || [], c = S.event.special[u.type] || {}; for (s[0] = u, t = 1; t < arguments.length; t++) s[t] = arguments[t]; if (u.delegateTarget = this, !c.preDispatch || !1 !== c.preDispatch.call(this, u)) { a = S.event.handlers.call(this, u, l), t = 0; while ((i = a[t++]) && !u.isPropagationStopped()) { u.currentTarget = i.elem, n = 0; while ((o = i.handlers[n++]) && !u.isImmediatePropagationStopped()) u.rnamespace && !1 !== o.namespace && !u.rnamespace.test(o.namespace) || (u.handleObj = o, u.data = o.data, void 0 !== (r = ((S.event.special[o.origType] || {}).handle || o.handler).apply(i.elem, s)) && !1 === (u.result = r) && (u.preventDefault(), u.stopPropagation())) } return c.postDispatch && c.postDispatch.call(this, u), u.result } }, handlers: function (e, t) { var n, r, i, o, a, s = [], u = t.delegateCount, l = e.target; if (u && l.nodeType && !("click" === e.type && 1 <= e.button)) for (; l !== this; l = l.parentNode || this) if (1 === l.nodeType && ("click" !== e.type || !0 !== l.disabled)) { for (o = [], a = {}, n = 0; n < u; n++) void 0 === a[i = (r = t[n]).selector + " "] && (a[i] = r.needsContext ? -1 < S(i, this).index(l) : S.find(i, this, null, [l]).length), a[i] && o.push(r); o.length && s.push({ elem: l, handlers: o }) } return l = this, u < t.length && s.push({ elem: l, handlers: t.slice(u) }), s }, addProp: function (t, e) { Object.defineProperty(S.Event.prototype, t, { enumerable: !0, configurable: !0, get: m(e) ? function () { if (this.originalEvent) return e(this.originalEvent) } : function () { if (this.originalEvent) return this.originalEvent[t] }, set: function (e) { Object.defineProperty(this, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) } }) }, fix: function (e) { return e[S.expando] ? e : new S.Event(e) }, special: { load: { noBubble: !0 }, click: { setup: function (e) { var t = this || e; return pe.test(t.type) && t.click && A(t, "input") && Ae(t, "click", Ce), !1 }, trigger: function (e) { var t = this || e; return pe.test(t.type) && t.click && A(t, "input") && Ae(t, "click"), !0 }, _default: function (e) { var t = e.target; return pe.test(t.type) && t.click && A(t, "input") && Y.get(t, "click") || A(t, "a") } }, beforeunload: { postDispatch: function (e) { void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result) } } } }, S.removeEvent = function (e, t, n) { e.removeEventListener && e.removeEventListener(t, n) }, S.Event = function (e, t) { if (!(this instanceof S.Event)) return new S.Event(e, t); e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && !1 === e.returnValue ? Ce : Ee, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, t && S.extend(this, t), this.timeStamp = e && e.timeStamp || Date.now(), this[S.expando] = !0 }, S.Event.prototype = { constructor: S.Event, isDefaultPrevented: Ee, isPropagationStopped: Ee, isImmediatePropagationStopped: Ee, isSimulated: !1, preventDefault: function () { var e = this.originalEvent; this.isDefaultPrevented = Ce, e && !this.isSimulated && e.preventDefault() }, stopPropagation: function () { var e = this.originalEvent; this.isPropagationStopped = Ce, e && !this.isSimulated && e.stopPropagation() }, stopImmediatePropagation: function () { var e = this.originalEvent; this.isImmediatePropagationStopped = Ce, e && !this.isSimulated && e.stopImmediatePropagation(), this.stopPropagation() } }, S.each({ altKey: !0, bubbles: !0, cancelable: !0, changedTouches: !0, ctrlKey: !0, detail: !0, eventPhase: !0, metaKey: !0, pageX: !0, pageY: !0, shiftKey: !0, view: !0, "char": !0, code: !0, charCode: !0, key: !0, keyCode: !0, button: !0, buttons: !0, clientX: !0, clientY: !0, offsetX: !0, offsetY: !0, pointerId: !0, pointerType: !0, screenX: !0, screenY: !0, targetTouches: !0, toElement: !0, touches: !0, which: function (e) { var t = e.button; return null == e.which && be.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && void 0 !== t && we.test(e.type) ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : e.which } }, S.event.addProp), S.each({ focus: "focusin", blur: "focusout" }, function (e, t) { S.event.special[e] = { setup: function () { return Ae(this, e, Se), !1 }, trigger: function () { return Ae(this, e), !0 }, delegateType: t } }), S.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function (e, i) { S.event.special[e] = { delegateType: i, bindType: i, handle: function (e) { var t, n = e.relatedTarget, r = e.handleObj; return n && (n === this || S.contains(this, n)) || (e.type = r.origType, t = r.handler.apply(this, arguments), e.type = i), t } } }), S.fn.extend({ on: function (e, t, n, r) { return ke(this, e, t, n, r) }, one: function (e, t, n, r) { return ke(this, e, t, n, r, 1) }, off: function (e, t, n) { var r, i; if (e && e.preventDefault && e.handleObj) return r = e.handleObj, S(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this; if ("object" == typeof e) { for (i in e) this.off(i, t, e[i]); return this } return !1 !== t && "function" != typeof t || (n = t, t = void 0), !1 === n && (n = Ee), this.each(function () { S.event.remove(this, e, n, t) }) } }); var Ne = /<script|<style|<link/i, De = /checked\s*(?:[^=]|=\s*.checked.)/i, je = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; function qe(e, t) { return A(e, "table") && A(11 !== t.nodeType ? t : t.firstChild, "tr") && S(e).children("tbody")[0] || e } function Le(e) { return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e } function He(e) { return "true/" === (e.type || "").slice(0, 5) ? e.type = e.type.slice(5) : e.removeAttribute("type"), e } function Oe(e, t) { var n, r, i, o, a, s; if (1 === t.nodeType) { if (Y.hasData(e) && (s = Y.get(e).events)) for (i in Y.remove(t, "handle events"), s) for (n = 0, r = s[i].length; n < r; n++) S.event.add(t, i, s[i][n]); Q.hasData(e) && (o = Q.access(e), a = S.extend({}, o), Q.set(t, a)) } } function Pe(n, r, i, o) { r = g(r); var e, t, a, s, u, l, c = 0, f = n.length, p = f - 1, d = r[0], h = m(d); if (h || 1 < f && "string" == typeof d && !y.checkClone && De.test(d)) return n.each(function (e) { var t = n.eq(e); h && (r[0] = d.call(this, e, t.html())), Pe(t, r, i, o) }); if (f && (t = (e = xe(r, n[0].ownerDocument, !1, n, o)).firstChild, 1 === e.childNodes.length && (e = t), t || o)) { for (s = (a = S.map(ve(e, "script"), Le)).length; c < f; c++) u = e, c !== p && (u = S.clone(u, !0, !0), s && S.merge(a, ve(u, "script"))), i.call(n[c], u, c); if (s) for (l = a[a.length - 1].ownerDocument, S.map(a, He), c = 0; c < s; c++) u = a[c], he.test(u.type || "") && !Y.access(u, "globalEval") && S.contains(l, u) && (u.src && "module" !== (u.type || "").toLowerCase() ? S._evalUrl && !u.noModule && S._evalUrl(u.src, { nonce: u.nonce || u.getAttribute("nonce") }, l) : b(u.textContent.replace(je, ""), u, l)) } return n } function Re(e, t, n) { for (var r, i = t ? S.filter(t, e) : e, o = 0; null != (r = i[o]) ; o++) n || 1 !== r.nodeType || S.cleanData(ve(r)), r.parentNode && (n && ie(r) && ye(ve(r, "script")), r.parentNode.removeChild(r)); return e } S.extend({ htmlPrefilter: function (e) { return e }, clone: function (e, t, n) { var r, i, o, a, s, u, l, c = e.cloneNode(!0), f = ie(e);
vendor: 5,262 bytes, line 42
42 if (!(y.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || S.isXMLDoc(e))) for (a = ve(c), r = 0, i = (o = ve(e)).length; r < i; r++) s = o[r], u = a[r], void 0, "input" === (l = u.nodeName.toLowerCase()) && pe.test(s.type) ? u.checked = s.checked : "input" !== l && "textarea" !== l || (u.defaultValue = s.defaultValue); if (t) if (n) for (o = o || ve(e), a = a || ve(c), r = 0, i = o.length; r < i; r++) Oe(o[r], a[r]); else Oe(e, c); return 0 < (a = ve(c, "script")).length && ye(a, !f && ve(e, "script")), c }, cleanData: function (e) { for (var t, n, r, i = S.event.special, o = 0; void 0 !== (n = e[o]) ; o++) if (V(n)) { if (t = n[Y.expando]) { if (t.events) for (r in t.events) i[r] ? S.event.remove(n, r) : S.removeEvent(n, r, t.handle); n[Y.expando] = void 0 } n[Q.expando] && (n[Q.expando] = void 0) } } }), S.fn.extend({ detach: function (e) { return Re(this, e, !0) }, remove: function (e) { return Re(this, e) }, text: function (e) { return $(this, function (e) { return void 0 === e ? S.text(this) : this.empty().each(function () { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) }) }, null, e, arguments.length) }, append: function () { return Pe(this, arguments, function (e) { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || qe(this, e).appendChild(e) }) }, prepend: function () { return Pe(this, arguments, function (e) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var t = qe(this, e); t.insertBefore(e, t.firstChild) } }) }, before: function () { return Pe(this, arguments, function (e) { this.parentNode && this.parentNode.insertBefore(e, this) }) }, after: function () { return Pe(this, arguments, function (e) { this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) }) }, empty: function () { for (var e, t = 0; null != (e = this[t]) ; t++) 1 === e.nodeType && (S.cleanData(ve(e, !1)), e.textContent = ""); return this }, clone: function (e, t) { return e = null != e && e, t = null == t ? e : t, this.map(function () { return S.clone(this, e, t) }) }, html: function (e) { return $(this, function (e) { var t = this[0] || {}, n = 0, r = this.length; if (void 0 === e && 1 === t.nodeType) return t.innerHTML; if ("string" == typeof e && !Ne.test(e) && !ge[(de.exec(e) || ["", ""])[1].toLowerCase()]) { e = S.htmlPrefilter(e); try { for (; n < r; n++) 1 === (t = this[n] || {}).nodeType && (S.cleanData(ve(t, !1)), t.innerHTML = e); t = 0 } catch (e) { } } t && this.empty().append(e) }, null, e, arguments.length) }, replaceWith: function () { var n = []; return Pe(this, arguments, function (e) { var t = this.parentNode; S.inArray(this, n) < 0 && (S.cleanData(ve(this)), t && t.replaceChild(e, this)) }, n) } }), S.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (e, a) { S.fn[e] = function (e) { for (var t, n = [], r = S(e), i = r.length - 1, o = 0; o <= i; o++) t = o === i ? this : this.clone(!0), S(r[o])[a](t), u.apply(n, t.get()); return this.pushStack(n) } }); var Me = new RegExp("^(" + ee + ")(?!px)[a-z%]+$", "i"), Ie = function (e) { var t = e.ownerDocument.defaultView; return t && t.opener || (t = C), t.getComputedStyle(e) }, We = function (e, t, n) { var r, i, o = {}; for (i in t) o[i] = e.style[i], e.style[i] = t[i]; for (i in r = n.call(e), t) e.style[i] = o[i]; return r }, Fe = new RegExp(ne.join("|"), "i"); function Be(e, t, n) { var r, i, o, a, s = e.style; return (n = n || Ie(e)) && ("" !== (a = n.getPropertyValue(t) || n[t]) || ie(e) || (a = S.style(e, t)), !y.pixelBoxStyles() && Me.test(a) && Fe.test(t) && (r = s.width, i = s.minWidth, o = s.maxWidth, s.minWidth = s.maxWidth = s.width = a, a = n.width, s.width = r, s.minWidth = i, s.maxWidth = o)), void 0 !== a ? a + "" : a } function $e(e, t) { return { get: function () { if (!e()) return (this.get = t).apply(this, arguments); delete this.get } } } !function () { function e() { if (l) { u.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0", l.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%", re.appendChild(u).appendChild(l); var e = C.getComputedStyle(l); n = "1%" !== e.top, s = 12 === t(e.marginLeft), l.style.right = "60%", o = 36 === t(e.right), r = 36 === t(e.width), l.style.position = "absolute", i = 12 === t(l.offsetWidth / 3), re.removeChild(u), l = null } } function t(e) { return Math.round(parseFloat(e)) } var n, r, i, o, a, s, u = E.createElement("div"), l = E.createElement("div"); l.style && (l.style.backgroundClip = "content-box", l.cloneNode(!0).style.backgroundClip = "", y.clearCloneStyle = "content-box" === l.style.backgroundClip, S.extend(y, { boxSizingReliable: function () { return e(), r }, pixelBoxStyles: function () { return e(), o }, pixelPosition: function () { return e(), n }, reliableMarginLeft: function () { return e(), s }, scrollboxSize: function () { return e(), i }, reliableTrDimensions: function () { var e, t, n, r; return null == a && (e = E.createElement("table"), t = E.createElement("tr"), n = E.createElement("div"), e.style.cssText = "position:absolute;
42left:-11111px", t.style.height = "1px", n.style.height = "9px", re.appendChild(e).appendChild(t).appendChild(n), r = C.getComputedStyle(t), a = 3 < parseInt(r.height), re.removeChild(e)), a } })) }(); var _e = ["Webkit", "Moz", "ms"], ze = E.createElement("div").style, Ue = {}; function Xe(e) { var t = S.cssProps[e] || Ue[e]; return t || (e in ze ? e : Ue[e] = function (e) { var t = e[0].toUpperCase() + e.slice(1), n = _e.length; while (n--) if ((e = _e[n] + t) in ze) return e }(e) || e) } var Ve = /^(none|table(?!-c[ea]).+)/, Ge = /^--/, Ye = { position: "absolute", visibility: "hidden", display: "block" }, Qe = { letterSpacing: "0", fontWeight: "400" }; function Je(e, t, n) { var r = te.exec(t); return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || "px") : t } function Ke(e, t, n, r, i, o) { var a = "width" === t ? 1 : 0, s = 0, u = 0; if (n === (r ? "border" : "content")) return 0; for (; a < 4; a += 2) "margin" === n && (u += S.css(e, n + ne[a], !0, i)), r ? ("content" === n && (u -= S.css(e, "padding" + ne[a], !0, i)), "margin" !== n && (u -= S.css(e, "border" + ne[a] + "Width", !0, i))) : (u += S.css(e, "padding" + ne[a], !0, i), "padding" !== n ? u += S.css(e, "border" + ne[a] + "Width", !0, i) : s += S.css(e, "border" + ne[a] + "Width", !0, i)); return !r && 0 <= o && (u += Math.max(0, Math.ceil(e["offset" + t[0].toUpperCase() + t.slice(1)] - o - u - s - .5)) || 0), u } function Ze(e, t, n) { var r = Ie(e), i = (!y.boxSizingReliable() || n) && "border-box" === S.css(e, "boxSizing", !1, r), o = i, a = Be(e, t, r), s = "offset" + t[0].toUpperCase() + t.slice(1); if (Me.test(a)) { if (!n) return a; a = "auto" } return (!y.boxSizingReliable() && i || !y.reliableTrDimensions() && A(e, "tr") || "auto" === a || !parseFloat(a) && "inline" === S.css(e, "display", !1, r)) && e.getClientRects().length && (i = "border-box" === S.css(e, "boxSizing", !1, r), (o = s in e) && (a = e[s])), (a = parseFloat(a) || 0) + Ke(e, t, n || (i ? "border" : "content"), o, r, a) + "px" } function et(e, t, n, r, i) { return new et.prototype.init(e, t, n, r, i) } S.extend({ cssHooks: { opacity: { get: function (e, t) { if (t) { var n = Be(e, "opacity"); return "" === n ? "1" : n } } } }, cssNumber: { animationIterationCount: !0, columnCount: !0, fillOpacity: !0, flexGrow: !0, flexShrink: !0, fontWeight: !0, gridArea: !0, gridColumn: !0, gridColumnEnd: !0, gridColumnStart: !0, gridRow: !0, gridRowEnd: !0, gridRowStart: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: {}, style: function (e, t, n, r) { if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { var i, o, a, s = X(t), u = Ge.test(t), l = e.style; if (u || (t = Xe(s)), a = S.cssHooks[t] || S.cssHooks[s], void 0 === n) return a && "get" in a && void 0 !== (i = a.get(e, !1, r)) ? i : l[t]; "string" === (o = typeof n) && (i = te.exec(n)) && i[1] && (n = se(e, t, i), o = "number"), null != n && n == n && ("number" !== o || u || (n += i && i[3] || (S.cssNumber[s] ? "" : "px")), y.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (l[t] = "inherit"), a && "set" in a && void 0 === (n = a.set(e, n, r)) || (u ? l.setProperty(t, n) : l[t] = n)) } }, css: function (e, t, n, r) { var i, o, a, s = X(t); return Ge.test(t) || (t = Xe(s)), (a = S.cssHooks[t] || S.cssHooks[s]) && "get" in a && (i = a.get(e, !0, n)), void 0 === i && (i = Be(e, t, r)), "normal" === i && t in Qe && (i = Qe[t]), "" === n || n ? (o = parseFloat(i), !0 === n || isFinite(o) ? o || 0 : i) : i } }), S.each(["height", "width"], function (e, u) { S.cssHooks[u] = { get: function (e, t, n) { if (t) return !Ve.test(S.css(e, "display")) || e.getClientRects().length && e.getBoundingClientRect().width ? Ze(e, u, n) : We(e, Ye, function () { return Ze(e, u, n) }) }, set: function (e, t, n) { var r, i = Ie(e), o = !y.scrollboxSize() && "absolute" === i.position, a = (o || n) && "border-box" === S.css(e, "boxSizing", !1, i), s = n ? Ke(e, u, n, a, i) : 0; return a && o && (s -= Math.ceil(e["offset" + u[0].toUpperCase() + u.slice(1)] - parseFloat(i[u]) - Ke(e, u, "border", !1, i) - .5)), s && (r = te.exec(t)) && "px" !== (r[3] || "px") && (e.style[u] = t, t = S.css(e, u)), Je(0, t, s) } } }), S.cssHooks.marginLeft = $e(y.reliableMarginLeft, function (e, t) { if (t) return (parseFloat(Be(e, "marginLeft")) || e.getBoundingClientRect().left - We(e, { marginLeft: 0 }, function () { return e.getBoundingClientRect().left })) + "px" }), S.each({ margin: "", padding: "", border: "Width" }, function (i, o) { S.cssHooks[i + o] = { expand: function (e) { for (var t = 0, n = {}, r = "string" == typeof e ? e.split(" ") : [e]; t < 4; t++) n[i + ne[t] + o] = r[t] || r[t - 2] || r[0]; return n } }, "margin" !== i && (S.cssHooks[i + o].set = Je) }), S.fn.extend({ css: function (e, t) { return $(this, function (e, t, n) { var r, i, o = {}, a = 0; if (Array.isArray(t)) { for (r = Ie(e), i = t.length; a < i; a++) o[t[a]] = S.css(e, t[a], !1, r); return o } return void 0 !== n ? S.style(e, t, n) : S.css(e, t) }, e, t, 1 < arguments.length) } }), ((S.Tween = et).prototype = { constructor: et, init: function (e, t, n, r, i, o) { this.elem = e, this.prop = n, this.easing = i || S.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (S.cssNumber[n] ? "" : "px") }, cur: function () { var e = et.propHooks[this.prop]; return e && e.get ? e.get(this) : et.propHooks._default.get(this) }, run: function (e) { var t, n = et.propHooks[this.prop]; return this.options.duration ? this.pos = t = S.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end
vendor: 8,304 bytes, line 42
42- this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : et.propHooks._default.set(this), this } }).init.prototype = et.prototype, (et.propHooks = { _default: { get: function (e) { var t; return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = S.css(e.elem, e.prop, "")) && "auto" !== t ? t : 0 }, set: function (e) { S.fx.step[e.prop] ? S.fx.step[e.prop](e) : 1 !== e.elem.nodeType || !S.cssHooks[e.prop] && null == e.elem.style[Xe(e.prop)] ? e.elem[e.prop] = e.now : S.style(e.elem, e.prop, e.now + e.unit) } } }).scrollTop = et.propHooks.scrollLeft = { set: function (e) { e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) } }, S.easing = { linear: function (e) { return e }, swing: function (e) { return .5 - Math.cos(e * Math.PI) / 2 }, _default: "swing" }, S.fx = et.prototype.init, S.fx.step = {}; var tt, nt, rt, it, ot = /^(?:toggle|show|hide)$/, at = /queueHooks$/; function st() { nt && (!1 === E.hidden && C.requestAnimationFrame ? C.requestAnimationFrame(st) : C.setTimeout(st, S.fx.interval), S.fx.tick()) } function ut() { return C.setTimeout(function () { tt = void 0 }), tt = Date.now() } function lt(e, t) { var n, r = 0, i = { height: e }; for (t = t ? 1 : 0; r < 4; r += 2 - t) i["margin" + (n = ne[r])] = i["padding" + n] = e; return t && (i.opacity = i.width = e), i } function ct(e, t, n) { for (var r, i = (ft.tweeners[t] || []).concat(ft.tweeners["*"]), o = 0, a = i.length; o < a; o++) if (r = i[o].call(n, t, e)) return r } function ft(o, e, t) { var n, a, r = 0, i = ft.prefilters.length, s = S.Deferred().always(function () { delete u.elem }), u = function () { if (a) return !1; for (var e = tt || ut(), t = Math.max(0, l.startTime + l.duration - e), n = 1 - (t / l.duration || 0), r = 0, i = l.tweens.length; r < i; r++) l.tweens[r].run(n); return s.notifyWith(o, [l, n, t]), n < 1 && i ? t : (i || s.notifyWith(o, [l, 1, 0]), s.resolveWith(o, [l]), !1) }, l = s.promise({ elem: o, props: S.extend({}, e), opts: S.extend(!0, { specialEasing: {}, easing: S.easing._default }, t), originalProperties: e, originalOptions: t, startTime: tt || ut(), duration: t.duration, tweens: [], createTween: function (e, t) { var n = S.Tween(o, l.opts, e, t, l.opts.specialEasing[e] || l.opts.easing); return l.tweens.push(n), n }, stop: function (e) { var t = 0, n = e ? l.tweens.length : 0; if (a) return this; for (a = !0; t < n; t++) l.tweens[t].run(1); return e ? (s.notifyWith(o, [l, 1, 0]), s.resolveWith(o, [l, e])) : s.rejectWith(o, [l, e]), this } }), c = l.props; for (!function (e, t) { var n, r, i, o, a; for (n in e) if (i = t[r = X(n)], o = e[n], Array.isArray(o) && (i = o[1], o = e[n] = o[0]), n !== r && (e[r] = o, delete e[n]), (a = S.cssHooks[r]) && "expand" in a) for (n in o = a.expand(o), delete e[r], o) n in e || (e[n] = o[n], t[n] = i); else t[r] = i }(c, l.opts.specialEasing) ; r < i; r++) if (n = ft.prefilters[r].call(l, o, c, l.opts)) return m(n.stop) && (S._queueHooks(l.elem, l.opts.queue).stop = n.stop.bind(n)), n; return S.map(c, ct, l), m(l.opts.start) && l.opts.start.call(o, l), l.progress(l.opts.progress).done(l.opts.done, l.opts.complete).fail(l.opts.fail).always(l.opts.always), S.fx.timer(S.extend(u, { elem: o, anim: l, queue: l.opts.queue })), l } S.Animation = S.extend(ft, { tweeners: { "*": [function (e, t) { var n = this.createTween(e, t); return se(n.elem, e, te.exec(t), n), n }] }, tweener: function (e, t) { m(e) ? (t = e, e = ["*"]) : e = e.match(P); for (var n, r = 0, i = e.length; r < i; r++) n = e[r], ft.tweeners[n] = ft.tweeners[n] || [], ft.tweeners[n].unshift(t) }, prefilters: [function (e, t, n) { var r, i, o, a, s, u, l, c, f = "width" in t || "height" in t, p = this, d = {}, h = e.style, g = e.nodeType && ae(e), v = Y.get(e, "fxshow"); for (r in n.queue || (null == (a = S._queueHooks(e, "fx")).unqueued && (a.unqueued = 0, s = a.empty.fire, a.empty.fire = function () { a.unqueued || s() }), a.unqueued++, p.always(function () { p.always(function () { a.unqueued--, S.queue(e, "fx").length || a.empty.fire() }) })), t) if (i = t[r], ot.test(i)) { if (delete t[r], o = o || "toggle" === i, i === (g ? "hide" : "show")) { if ("show" !== i || !v || void 0 === v[r]) continue; g = !0 } d[r] = v && v[r] || S.style(e, r) } if ((u = !S.isEmptyObject(t)) || !S.isEmptyObject(d)) for (r in f && 1 === e.nodeType && (n.overflow = [h.overflow, h.overflowX, h.overflowY], null == (l = v && v.display) && (l = Y.get(e, "display")), "none" === (c = S.css(e, "display")) && (l ? c = l : (le([e], !0), l = e.style.display || l, c = S.css(e, "display"), le([e]))), ("inline" === c || "inline-block" === c && null != l) && "none" === S.css(e, "float") && (u || (p.done(function () { h.display = l }), null == l && (c = h.display, l = "none" === c ? "" : c)), h.display = "inline-block")), n.overflow && (h.overflow = "hidden", p.always(function () { h.overflow = n.overflow[0], h.overflowX = n.overflow[1], h.overflowY = n.overflow[2] })), u = !1, d) u || (v ? "hidden" in v && (g = v.hidden) : v = Y.access(e, "fxshow", { display: l }), o && (v.hidden = !g), g && le([e], !0), p.done(function () { for (r in g || le([e]), Y.remove(e, "fxshow"), d) S.style(e, r, d[r]) })), u = ct(g ? v[r] : 0, r, p), r in v || (v[r] = u.start, g && (u.end = u.start, u.start = 0)) }], prefilter: function (e, t) { t ? ft.prefilters.unshift(e) : ft.prefilters.push(e) } }), S.speed = function (e, t, n) { var r = e && "object" == typeof e ? S.extend({}, e) : { complete: n || !n && t || m(e) && e, duration: e, easing: n && t || t && !m(t) && t }; return S.fx.off ? r.duration = 0 : "number" != typeof r.duration && (r.duration in S.fx.speeds ? r.duration = S.fx.speeds[r.duration] : r.duration = S.fx.speeds._default), null != r.queue && !0 !== r.queue || (r.queue = "fx"), r.old = r.complete, r.complete = function () { m(r.old) && r.old.call(this), r.queue && S.dequeue(this, r.queue) }, r }, S.fn.extend({ fadeTo: function (e, t, n, r) { return this.filter(ae).css("opacity", 0).show().end().animate({ opacity: t }, e, n, r) }, animate: function (t, e, n, r) { var i = S.isEmptyObject(t), o = S.speed(e, n, r), a = function () { var e = ft(this, S.extend({}, t), o); (i || Y.get(this, "finish")) && e.stop(!0) }; return a.finish = a, i || !1 === o.queue ? this.each(a) : this.queue(o.queue, a) }, stop: function (i, e, o) { var a = function (e) { var t = e.stop; delete e.stop, t(o) }; return "string" != typeof i && (o = e, e = i, i = void 0), e && this.queue(i || "fx", []), this.each(function () { var e = !0, t = null != i && i + "queueHooks", n = S.timers, r = Y.get(this); if (t) r[t] && r[t].stop && a(r[t]); else for (t in r) r[t] && r[t].stop && at.test(t) && a(r[t]); for (t = n.length; t--;) n[t].elem !== this || null != i && n[t].queue !== i || (n[t].anim.stop(o), e = !1, n.splice(t, 1)); !e && o || S.dequeue(this, i) }) }, finish: function (a) { return !1 !== a && (a = a || "fx"), this.each(function () { var e, t = Y.get(this), n = t[a + "queue"], r = t[a + "queueHooks"], i = S.timers, o = n ? n.length : 0; for (t.finish = !0, S.queue(this, a, []), r && r.stop && r.stop.call(this, !0), e = i.length; e--;) i[e].elem === this && i[e].queue === a && (i[e].anim.stop(!0), i.splice(e, 1)); for (e = 0; e < o; e++) n[e] && n[e].finish && n[e].finish.call(this); delete t.finish }) } }), S.each(["toggle", "show", "hide"], function (e, r) { var i = S.fn[r]; S.fn[r] = function (e, t, n) { return null == e || "boolean" == typeof e ? i.apply(this, arguments) : this.animate(lt(r, !0), e, t, n) } }), S.each({ slideDown: lt("show"), slideUp: lt("hide"), slideToggle: lt("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (e, r) { S.fn[e] = function (e, t, n) { return this.animate(r, e, t, n) } }), S.timers = [], S.fx.tick = function () { var e, t = 0, n = S.timers; for (tt = Date.now() ; t < n.length; t++) (e = n[t])() || n[t] !== e || n.splice(t--, 1); n.length || S.fx.stop(), tt = void 0 }, S.fx.timer = function (e) { S.timers.push(e), S.fx.start() }, S.fx.interval = 13, S.fx.start = function () { nt || (nt = !0, st()) }, S.fx.stop = function () { nt = null }, S.fx.speeds = { slow: 600, fast: 200, _default: 400 }
vendor: 4,476 bytes, line 42
42, S.fn.delay = function (r, e) { return r = S.fx && S.fx.speeds[r] || r, e = e || "fx", this.queue(e, function (e, t) { var n = C.setTimeout(e, r); t.stop = function () { C.clearTimeout(n) } }) }, rt = E.createElement("input"), it = E.createElement("select").appendChild(E.createElement("option")), rt.type = "checkbox", y.checkOn = "" !== rt.value, y.optSelected = it.selected, (rt = E.createElement("input")).value = "t", rt.type = "radio", y.radioValue = "t" === rt.value; var pt, dt = S.expr.attrHandle; S.fn.extend({ attr: function (e, t) { return $(this, S.attr, e, t, 1 < arguments.length) }, removeAttr: function (e) { return this.each(function () { S.removeAttr(this, e) }) } }), S.extend({ attr: function (e, t, n) { var r, i, o = e.nodeType; if (3 !== o && 8 !== o && 2 !== o) return "undefined" == typeof e.getAttribute ? S.prop(e, t, n) : (1 === o && S.isXMLDoc(e) || (i = S.attrHooks[t.toLowerCase()] || (S.expr.match.bool.test(t) ? pt : void 0)), void 0 !== n ? null === n ? void S.removeAttr(e, t) : i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : (e.setAttribute(t, n + ""), n) : i && "get" in i && null !== (r = i.get(e, t)) ? r : null == (r = S.find.attr(e, t)) ? void 0 : r) }, attrHooks: { type: { set: function (e, t) { if (!y.radioValue && "radio" === t && A(e, "input")) { var n = e.value; return e.setAttribute("type", t), n && (e.value = n), t } } } }, removeAttr: function (e, t) { var n, r = 0, i = t && t.match(P); if (i && 1 === e.nodeType) while (n = i[r++]) e.removeAttribute(n) } }), pt = { set: function (e, t, n) { return !1 === t ? S.removeAttr(e, n) : e.setAttribute(n, n), n } }, S.each(S.expr.match.bool.source.match(/\w+/g), function (e, t) { var a = dt[t] || S.find.attr; dt[t] = function (e, t, n) { var r, i, o = t.toLowerCase(); return n || (i = dt[o], dt[o] = r, r = null != a(e, t, n) ? o : null, dt[o] = i), r } }); var ht = /^(?:input|select|textarea|button)$/i, gt = /^(?:a|area)$/i; function vt(e) { return (e.match(P) || []).join(" ") } function yt(e) { return e.getAttribute && e.getAttribute("class") || "" } function mt(e) { return Array.isArray(e) ? e : "string" == typeof e && e.match(P) || [] } S.fn.extend({ prop: function (e, t) { return $(this, S.prop, e, t, 1 < arguments.length) }, removeProp: function (e) { return this.each(function () { delete this[S.propFix[e] || e] }) } }), S.extend({ prop: function (e, t, n) { var r, i, o = e.nodeType; if (3 !== o && 8 !== o && 2 !== o) return 1 === o && S.isXMLDoc(e) || (t = S.propFix[t] || t, i = S.propHooks[t]), void 0 !== n ? i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : e[t] = n : i && "get" in i && null !== (r = i.get(e, t)) ? r : e[t] }, propHooks: { tabIndex: { get: function (e) { var t = S.find.attr(e, "tabindex"); return t ? parseInt(t, 10) : ht.test(e.nodeName) || gt.test(e.nodeName) && e.href ? 0 : -1 } } }, propFix: { "for": "htmlFor", "class": "className" } }), y.optSelected || (S.propHooks.selected = { get: function (e) { var t = e.parentNode; return t && t.parentNode && t.parentNode.selectedIndex, null }, set: function (e) { var t = e.parentNode; t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) } }), S.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { S.propFix[this.toLowerCase()] = this }), S.fn.extend({ addClass: function (t) { var e, n, r, i, o, a, s, u = 0; if (m(t)) return this.each(function (e) { S(this).addClass(t.call(this, e, yt(this))) }); if ((e = mt(t)).length) while (n = this[u++]) if (i = yt(n), r = 1 === n.nodeType && " " + vt(i) + " ") { a = 0; while (o = e[a++]) r.indexOf(" " + o + " ") < 0 && (r += o + " "); i !== (s = vt(r)) && n.setAttribute("class", s) } return this }, removeClass: function (t) { var e, n, r, i, o, a, s, u = 0; if (m(t)) return this.each(function (e) { S(this).removeClass(t.call(this, e, yt(this))) }); if (!arguments.length) return this.attr("class", ""); if ((e = mt(t)).length) while (n = this[u++]) if (i = yt(n), r = 1 === n.nodeType && " " + vt(i) + " ") { a = 0; while (o = e[a++]) while (-1 < r.indexOf(" " + o + " ")) r = r.replace(" " + o + " ", " "); i !== (s = vt(r)) && n.setAttribute("class", s) } return this }, toggleClass: function (i, t) { var o = typeof i, a = "string" === o || Array.isArray(i); return "boolean" == typeof t && a ? t ? this.addClass(i) : this.removeClass(i) : m(i) ? this.each(function (e) { S(this).toggleClass(i.
vendor: 22,365 bytes, line 42
42call(this, e, yt(this), t), t) }) : this.each(function () { var e, t, n, r; if (a) { t = 0, n = S(this), r = mt(i); while (e = r[t++]) n.hasClass(e) ? n.removeClass(e) : n.addClass(e) } else void 0 !== i && "boolean" !== o || ((e = yt(this)) && Y.set(this, "__className__", e), this.setAttribute && this.setAttribute("class", e || !1 === i ? "" : Y.get(this, "__className__") || "")) }) }, hasClass: function (e) { var t, n, r = 0; t = " " + e + " "; while (n = this[r++]) if (1 === n.nodeType && -1 < (" " + vt(yt(n)) + " ").indexOf(t)) return !0; return !1 } }); var xt = /\r/g; S.fn.extend({ val: function (n) { var r, e, i, t = this[0]; return arguments.length ? (i = m(n), this.each(function (e) { var t; 1 === this.nodeType && (null == (t = i ? n.call(this, e, S(this).val()) : n) ? t = "" : "number" == typeof t ? t += "" : Array.isArray(t) && (t = S.map(t, function (e) { return null == e ? "" : e + "" })), (r = S.valHooks[this.type] || S.valHooks[this.nodeName.toLowerCase()]) && "set" in r && void 0 !== r.set(this, t, "value") || (this.value = t)) })) : t ? (r = S.valHooks[t.type] || S.valHooks[t.nodeName.toLowerCase()]) && "get" in r && void 0 !== (e = r.get(t, "value")) ? e : "string" == typeof (e = t.value) ? e.replace(xt, "") : null == e ? "" : e : void 0 } }), S.extend({ valHooks: { option: { get: function (e) { var t = S.find.attr(e, "value"); return null != t ? t : vt(S.text(e)) } }, select: { get: function (e) { var t, n, r, i = e.options, o = e.selectedIndex, a = "select-one" === e.type, s = a ? null : [], u = a ? o + 1 : i.length; for (r = o < 0 ? u : a ? o : 0; r < u; r++) if (((n = i[r]).selected || r === o) && !n.disabled && (!n.parentNode.disabled || !A(n.parentNode, "optgroup"))) { if (t = S(n).val(), a) return t; s.push(t) } return s }, set: function (e, t) { var n, r, i = e.options, o = S.makeArray(t), a = i.length; while (a--) ((r = i[a]).selected = -1 < S.inArray(S.valHooks.option.get(r), o)) && (n = !0); return n || (e.selectedIndex = -1), o } } } }), S.each(["radio", "checkbox"], function () { S.valHooks[this] = { set: function (e, t) { if (Array.isArray(t)) return e.checked = -1 < S.inArray(S(e).val(), t) } }, y.checkOn || (S.valHooks[this].get = function (e) { return null === e.getAttribute("value") ? "on" : e.value }) }), y.focusin = "onfocusin" in C; var bt = /^(?:focusinfocus|focusoutblur)$/, wt = function (e) { e.stopPropagation() }; S.extend(S.event, { trigger: function (e, t, n, r) { var i, o, a, s, u, l, c, f, p = [n || E], d = v.call(e, "type") ? e.type : e, h = v.call(e, "namespace") ? e.namespace.split(".") : []; if (o = f = a = n = n || E, 3 !== n.nodeType && 8 !== n.nodeType && !bt.test(d + S.event.triggered) && (-1 < d.indexOf(".") && (d = (h = d.split(".")).shift(), h.sort()), u = d.indexOf(":") < 0 && "on" + d, (e = e[S.expando] ? e : new S.Event(d, "object" == typeof e && e)).isTrigger = r ? 2 : 3, e.namespace = h.join("."), e.rnamespace = e.namespace ? new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, e.result = void 0, e.target || (e.target = n), t = null == t ? [e] : S.makeArray(t, [e]), c = S.event.special[d] || {}, r || !c.trigger || !1 !== c.trigger.apply(n, t))) { if (!r && !c.noBubble && !x(n)) { for (s = c.delegateType || d, bt.test(s + d) || (o = o.parentNode) ; o; o = o.parentNode) p.push(o), a = o; a === (n.ownerDocument || E) && p.push(a.defaultView || a.parentWindow || C) } i = 0; while ((o = p[i++]) && !e.isPropagationStopped()) f = o, e.type = 1 < i ? s : c.bindType || d, (l = (Y.get(o, "events") || Object.create(null))[e.type] && Y.get(o, "handle")) && l.apply(o, t), (l = u && o[u]) && l.apply && V(o) && (e.result = l.apply(o, t), !1 === e.result && e.preventDefault()); return e.type = d, r || e.isDefaultPrevented() || c._default && !1 !== c._default.apply(p.pop(), t) || !V(n) || u && m(n[d]) && !x(n) && ((a = n[u]) && (n[u] = null), S.event.triggered = d, e.isPropagationStopped() && f.addEventListener(d, wt), n[d](), e.isPropagationStopped() && f.removeEventListener(d, wt), S.event.triggered = void 0, a && (n[u] = a)), e.result } }, simulate: function (e, t, n) { var r = S.extend(new S.Event, n, { type: e, isSimulated: !0 }); S.event.trigger(r, null, t) } }), S.fn.extend({ trigger: function (e, t) { return this.each(function () { S.event.trigger(e, t, this) }) }, triggerHandler: function (e, t) { var n = this[0]; if (n) return S.event.trigger(e, t, n, !0) } }), y.focusin || S.each({ focus: "focusin", blur: "focusout" }, function (n, r) { var i = function (e) { S.event.simulate(r, e.target, S.event.fix(e)) }; S.event.special[r] = { setup: function () { var e = this.ownerDocument || this.document || this, t = Y.access(e, r); t || e.addEventListener(n, i, !0), Y.access(e, r, (t || 0) + 1) }, teardown: function () { var e = this.ownerDocument || this.document || this, t = Y.access(e, r) - 1; t ? Y.access(e, r, t) : (e.removeEventListener(n, i, !0), Y.remove(e, r)) } } }); var Tt = C.location, Ct = { guid: Date.now() }, Et = /\?/; S.parseXML = function (e) { var t; if (!e || "string" != typeof e) return null; try { t = (new C.DOMParser).parseFromString(e, "text/xml") } catch (e) { t = void 0 } return t && !t.getElementsByTagName("parsererror").length || S.error("Invalid XML: " + e), t }; var St = /\[\]$/, kt = /\r?\n/g, At = /^(?:submit|button|image|reset|file)$/i, Nt = /^(?:input|select|textarea|keygen)/i; function Dt(n, e, r, i) { var t; if (Array.isArray(e)) S.each(e, function (e, t) { r || St.test(n) ? i(n, t) : Dt(n + "[" + ("object" == typeof t && null != t ? e : "") + "]", t, r, i) }); else if (r || "object" !== w(e)) i(n, e); else for (t in e) Dt(n + "[" + t + "]", e[t], r, i) } S.param = function (e, t) { var n, r = [], i = function (e, t) { var n = m(t) ? t() : t; r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(null == n ? "" : n) }; if (null == e) return ""; if (Array.isArray(e) || e.jquery && !S.isPlainObject(e)) S.each(e, function () { i(this.name, this.value) }); else for (n in e) Dt(n, e[n], t, i); return r.join("&") }, S.fn.extend({ serialize: function () { return S.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { var e = S.prop(this, "elements"); return e ? S.makeArray(e) : this }).filter(function () { var e = this.type; return this.name && !S(this).is(":disabled") && Nt.test(this.nodeName) && !At.test(e) && (this.checked || !pe.test(e)) }).map(function (e, t) { var n = S(this).val(); return null == n ? null : Array.isArray(n) ? S.map(n, function (e) { return { name: t.name, value: e.replace(kt, "\r\n") } }) : { name: t.name, value: n.replace(kt, "\r\n") } }).get() } }); var jt = /%20/g, qt = /#.*$/, Lt = /([?&])_=[^&]*/, Ht = /^(.*?):[ \t]*([^\r\n]*)$/gm, Ot = /^(?:GET|HEAD)$/, Pt = /^\/\//, Rt = {}, Mt = {}, It = "*/".concat("*"), Wt = E.createElement("a"); function Ft(o) { return function (e, t) { "string" != typeof e && (t = e, e = "*"); var n, r = 0, i = e.toLowerCase().match(P) || []; if (m(t)) while (n = i[r++]) "+" === n[0] ? (n = n.slice(1) || "*", (o[n] = o[n] || []).unshift(t)) : (o[n] = o[n] || []).push(t) } } function Bt(t, i, o, a) { var s = {}, u = t === Mt; function l(e) { var r; return s[e] = !0, S.each(t[e] || [], function (e, t) { var n = t(i, o, a); return "string" != typeof n || u || s[n] ? u ? !(r = n) : void 0 : (i.dataTypes.unshift(n), l(n), !1) }), r } return l(i.dataTypes[0]) || !s["*"] && l("*") } function $t(e, t) { var n, r, i = S.ajaxSettings.flatOptions || {}; for (n in t) void 0 !== t[n] && ((i[n] ? e : r || (r = {}))[n] = t[n]); return r && S.extend(!0, e, r), e } Wt.href = Tt.href, S.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: Tt.href, type: "GET", isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol), global: !0, processData: !0, async: !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": It, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, converters: { "* text": String, "text html": !0, "text json": JSON.parse, "text xml": S.parseXML }, flatOptions: { url: !0, context: !0 } }, ajaxSetup: function (e, t) { return t ? $t($t(e, S.ajaxSettings), t) : $t(S.ajaxSettings, e) }, ajaxPrefilter: Ft(Rt), ajaxTransport: Ft(Mt), ajax: function (e, t) { "object" == typeof e && (t = e, e = void 0), t = t || {}; var c, f, p, n, d, r, h, g, i, o, v = S.ajaxSetup({}, t), y = v.context || v, m = v.context && (y.nodeType || y.jquery) ? S(y) : S.event, x = S.Deferred(), b = S.Callbacks("once memory"), w = v.statusCode || {}, a = {}, s = {}, u = "canceled", T = { readyState: 0, getResponseHeader: function (e) { var t; if (h) { if (!n) { n = {}; while (t = Ht.exec(p)) n[t[1].toLowerCase() + " "] = (n[t[1].toLowerCase() + " "] || []).concat(t[2]) } t = n[e.toLowerCase() + " "] } return null == t ? null : t.join(", ") }, getAllResponseHeaders: function () { return h ? p : null }, setRequestHeader: function (e, t) { return null == h && (e = s[e.toLowerCase()] = s[e.toLowerCase()] || e, a[e] = t), this }, overrideMimeType: function (e) { return null == h && (v.mimeType = e), this }, statusCode: function (e) { var t; if (e) if (h) T.always(e[T.status]); else for (t in e) w[t] = [w[t], e[t]]; return this }, abort: function (e) { var t = e || u; return c && c.abort(t), l(0, t), this } }; if (x.promise(T), v.url = ((e || v.url || Tt.href) + "").replace(Pt, Tt.protocol + "//"), v.type = t.method || t.type || v.method || v.type, v.dataTypes = (v.dataType || "*").toLowerCase().match(P) || [""], null == v.crossDomain) { r = E.createElement("a"); try { r.href = v.url, r.href = r.href, v.crossDomain = Wt.protocol + "//" + Wt.host != r.protocol + "//" + r.host } catch (e) { v.crossDomain = !0 } } if (v.data && v.processData && "string" != typeof v.data && (v.data = S.param(v.data, v.traditional)), Bt(Rt, v, t, T), h) return T; for (i in (g = S.event && v.global) && 0 == S.active++ && S.event.trigger("ajaxStart"), v.type = v.type.toUpperCase(), v.hasContent = !Ot.test(v.type), f = v.url.replace(qt, ""), v.hasContent ? v.data && v.processData && 0 === (v.contentType || "").indexOf("application/x-www-form-urlencoded") && (v.data = v.data.replace(jt, "+")) : (o = v.url.slice(f.length), v.data && (v.processData || "string" == typeof v.data) && (f += (Et.test(f) ? "&" : "?") + v.data, delete v.data), !1 === v.cache && (f = f.replace(Lt, "$1"), o = (Et.test(f) ? "&" : "?") + "_=" + Ct.guid++ + o), v.url = f + o), v.ifModified && (S.lastModified[f] && T.setRequestHeader("If-Modified-Since", S.lastModified[f]), S.etag[f] && T.setRequestHeader("If-None-Match", S.etag[f])), (v.data && v.hasContent && !1 !== v.contentType || t.contentType) && T.setRequestHeader("Content-Type", v.contentType), T.setRequestHeader("Accept", v.dataTypes[0] && v.accepts[v.dataTypes[0]] ? v.accepts[v.dataTypes[0]] + ("*" !== v.dataTypes[0] ? ", " + It + "; q=0.01" : "") : v.accepts["*"]), v.headers) T.setRequestHeader(i, v.headers[i]); if (v.beforeSend && (!1 === v.beforeSend.call(y, T, v) || h)) return T.abort(); if (u = "abort", b.add(v.complete), T.done(v.success), T.fail(v.error), c = Bt(Mt, v, t, T)) { if (T.readyState = 1, g && m.trigger("ajaxSend", [T, v]), h) return T; v.async && 0 < v.timeout && (d = C.setTimeout(function () { T.abort("timeout") }, v.timeout)); try { h = !1, c.send(a, l) } catch (e) { if (h) throw e; l(-1, e) } } else l(-1, "No Transport"); function l(e, t, n, r) { var i, o, a, s, u, l = t; h || (h = !0, d && C.clearTimeout(d), c = void 0, p = r || "", T.readyState = 0 < e ? 4 : 0, i = 200 <= e && e < 300 || 304 === e, n && (s = function (e, t, n) { var r, i, o, a, s = e.contents, u = e.dataTypes; while ("*" === u[0]) u.shift(), void 0 === r && (r = e.mimeType || t.getResponseHeader("Content-Type")); if (r) for (i in s) if (s[i] && s[i].test(r)) { u.unshift(i); break } if (u[0] in n) o = u[0]; else { for (i in n) { if (!u[0] || e.converters[i + " " + u[0]]) { o = i; break } a || (a = i) } o = o || a } if (o) return o !== u[0] && u.unshift(o), n[o] }(v, T, n)), !i && -1 < S.inArray("script", v.dataTypes) && (v.converters["text script"] = function () { }), s = function (e, t, n, r) { var i, o, a, s, u, l = {}, c = e.dataTypes.slice(); if (c[1]) for (a in e.converters) l[a.toLowerCase()] = e.converters[a]; o = c.shift(); while (o) if (e.responseFields[o] && (n[e.responseFields[o]] = t), !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), u = o, o = c.shift()) if ("*" === o) o = u; else if ("*" !== u && u !== o) { if (!(a = l[u + " " + o] || l["* " + o])) for (i in l) if ((s = i.split(" "))[1] === o && (a = l[u + " " + s[0]] || l["* " + s[0]])) { !0 === a ? a = l[i] : !0 !== l[i] && (o = s[0], c.unshift(s[1])); break } if (!0 !== a) if (a && e["throws"]) t = a(t); else try { t = a(t) } catch (e) { return { state: "parsererror", error: a ? e : "No conversion from " + u + " to " + o } } } return { state: "success", data: t } }(v, s, T, i), i ? (v.ifModified && ((u = T.getResponseHeader("Last-Modified")) && (S.lastModified[f] = u), (u = T.getResponseHeader("etag")) && (S.etag[f] = u)), 204 === e || "HEAD" === v.type ? l = "nocontent" : 304 === e ? l = "notmodified" : (l = s.state, o = s.data, i = !(a = s.error))) : (a = l, !e && l || (l = "error", e < 0 && (e = 0))), T.status = e, T.statusText = (t || l) + "", i ? x.resolveWith(y, [o, l, T]) : x.rejectWith(y, [T, l, a]), T.statusCode(w), w = void 0, g && m.trigger(i ? "ajaxSuccess" : "ajaxError", [T, v, i ? o : a]), b.fireWith(y, [T, l]), g && (m.trigger("ajaxComplete", [T, v]), --S.active || S.event.trigger("ajaxStop"))) } return T }, getJSON: function (e, t, n) { return S.get(e, t, n, "json") }, getScript: function (e, t) { return S.get(e, void 0, t, "script") } }), S.each(["get", "post"], function (e, i) { S[i] = function (e, t, n, r) { return m(t) && (r = r || n, n = t, t = void 0), S.ajax(S.extend({ url: e, type: i, dataType: r, data: t, success: n }, S.isPlainObject(e) && e)) } }), S.ajaxPrefilter(function (e) { var t; for (t in e.headers) "content-type" === t.toLowerCase() && (e.contentType = e.headers[t] || "") }), S._evalUrl = function (e, t, n) { return S.ajax({ url: e, type: "GET", dataType: "script", cache: !0, async: !1, global: !1, converters: { "text script": function () { } }, dataFilter: function (e) { S.globalEval(e, t, n) } }) }, S.fn.extend({ wrapAll: function (e) { var t; return this[0] && (m(e) && (e = e.call(this[0])), t = S(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function () { var e = this; while (e.firstElementChild) e = e.firstElementChild; return e }).append(this)), this }, wrapInner: function (n) { return m(n) ? this.each(function (e) { S(this).wrapInner(n.call(this, e)) }) : this.each(function () { var e = S(this), t = e.contents(); t.length ? t.wrapAll(n) : e.append(n) }) }, wrap: function (t) { var n = m(t); return this.each(function (e) { S(this).wrapAll(n ? t.call(this, e) : t) }) }, unwrap: function (e) { return this.parent(e).not("body").each(function () { S(this).replaceWith(this.childNodes) }), this } }), S.expr.pseudos.hidden = function (e) { return !S.expr.pseudos.visible(e) }, S.expr.pseudos.visible = function (e) { return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) }, S.ajaxSettings.xhr = function () { try { return new C.XMLHttpRequest } catch (e) { } }; var _t = { 0: 200, 1223: 204 }, zt = S.ajaxSettings.xhr(); y.cors = !!zt && "withCredentials" in zt, y.ajax = zt = !!zt, S.ajaxTransport(function (i) { var o, a; if (y.cors || zt && !i.crossDomain) return { send: function (e, t) { var n, r = i.xhr(); if (r.open(i.type, i.url, i.async, i.username, i.password), i.xhrFields) for (n in i.xhrFields) r[n] = i.xhrFields[n]; for (n in i.mimeType && r.overrideMimeType && r.overrideMimeType(i.mimeType), i.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest"), e) r.setRequestHeader(n, e[n]); o = function (e) { return function () { o && (o = a = r.onload = r.onerror = r.onabort = r.ontimeout = r.onreadystatechange = null, "abort" === e ? r.abort() : "error" === e ? "number" != typeof r.status ? t(0, "error") : t(r.status, r.statusText) : t(_t[r.status] || r.status, r.statusText, "text" !== (r.responseType || "text") || "string" != typeof r.responseText ? { binary: r.response } : { text: r.responseText }, r.getAllResponseHeaders())) } }, r.onload = o(), a = r.onerror = r.ontimeout = o("error"), void 0 !== r.onabort ? r.onabort = a : r.onreadystatechange = function () { 4 === r.readyState && C.setTimeout(function () { o && a() }) }, o = o("abort"); try { r.send(i.hasContent && i.data || null) } catch (e) { if (o) throw e } }, abort: function () { o && o() } } }), S.ajaxPrefilter(function (e) { e.crossDomain && (e.contents.script = !1) }), S.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function (e) { return S.globalEval(e), e } } }), S.ajaxPrefilter("script", function (e) { void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET") }), S.ajaxTransport("script", function (n) { var r, i; if (n.crossDomain || n.scriptAttrs) return { send: function (e, t) { r = S("<script>").attr(n.scriptAttrs || {}).prop({ charset: n.scriptCharset, src: n.url }).on("load error", i = function (e) { r.remove(), i = null, e && t("error" === e.type ? 404 : 200, e.type) }), E.head.appendChild(r[0]) }, abort: function () { i && i() } } }); var Ut, Xt = [], Vt = /(=)\?(?=&|$)|\?\?/; S.ajaxSetup({ jsonp: "callback", jsonpCallback: function () { var e = Xt.pop() || S.expando + "_" + Ct.guid++; return this[e] = !0, e } }), S.ajaxPrefilter("json jsonp", function (e, t, n) { var r, i, o, a = !1 !== e.jsonp && (Vt.test(e.url) ? "url" : "string" == typeof e.data && 0 === (e.contentType || "").indexOf("application/x-www-form-urlencoded") && Vt.test(e.data) && "data"); if (a || "jsonp" === e.dataTypes[0]) return r = e.jsonpCallback = m(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback, a ? e[a] = e[a].replace(Vt, "$1" + r) : !1 !== e.jsonp && (e.url += (Et.test(e.url) ? "&" : "?") + e.jsonp + "=" + r), e.converters["script json"] = function () { return o || S.error(r + " was not called"), o[0] }, e.dataTypes[0] = "json", i = C[r], C[r] = function () { o = arguments }, n.always(function () { void 0 === i ? S(C).removeProp(r) : C[r] = i, e[r] && (e.jsonpCallback = t.jsonpCallback, Xt.push(r)), o && m(i) && i(o[0]), o = i = void 0 }), "script" }), y.createHTMLDocument = ((Ut = E.implementation.createHTMLDocument("").body).innerHTML = "<form></form><form></form>", 2 === Ut.childNodes.length), S.parseHTML = function (e, t, n) { return "string" != typeof e ? [] : ("boolean" == typeof t && (n = t, t = !1), t || (y.createHTMLDocument ? ((r = (t = E.implementation.createHTMLDocument("")).createElement("base")).href = E.location.href, t.head.appendChild(r)) : t = E), o = !n && [], (i = N.exec(e)) ? [t.createElement(i[1])] : (i = xe([e], t, o), o && o.length && S(o).remove(), S.merge([], i.childNodes))); var r, i, o }, S.fn.load = function (e, t, n) { var r, i, o, a = this, s = e.indexOf(" "); return -1 < s && (r = vt(e.slice(s)), e = e.slice(0, s)), m(t) ? (n = t, t = void 0) : t && "object" == typeof t && (i = "POST"), 0 < a.length && S.ajax({ url: e, type: i || "GET", dataType: "html", data: t }).done(function (e) { o = arguments, a.html(r ? S("<div>").append(S.parseHTML(e)).find(r) : e) }).always(n && function (e, t) { a.each(function () { n.apply(this, o || [e.responseText, t, e]) }) }), this }, S.expr.pseudos.animated = function (t) { return S.grep(S.timers, function (e) { return t === e.elem }).length }, S.offset = { setOffset: function (e, t, n) { var r, i, o, a, s, u, l = S.css(e, "position"), c = S(e), f = {}; "static" === l && (e.style.position = "relative"), s = c.offset(), o = S.css(e, "top"), u = S.css(e, "left"), ("absolute" === l || "fixed" === l) && -1 < (o + u).indexOf("auto") ? (a = (r = c.position()).top, i = r.left) : (a = parseFloat(o) || 0, i = parseFloat(u) || 0), m(t) && (t = t.call(e, n, S.extend({}, s))), null != t.top && (f.top = t.top - s.top + a), null != t.left && (f.left = t.left - s.left + i), "using" in t ? t.using.call(e, f) : ("number" == typeof f.top && (f.top += "px"), "number" == typeof f.left && (f.left += "px"), c.css(f)) } }, S.fn.extend({ offset: function (t) { if (arguments.length) return void 0 === t ? this : this.each(function (e) { S.offset.setOffset(this, t, e) }); var e, n, r = this[0]; return r ? r.getClientRects().length ? (e = r.getBoundingClientRect(), n = r.ownerDocument.defaultView, { top: e.top + n.pageYOffset, left: e.left + n.pageXOffset }) : { top: 0, left: 0 } : void 0 }, position: function () { if (this[0]) { var e, t, n, r = this[0], i = { top: 0, left: 0 }; if ("fixed" === S.css(r, "position")) t = r.getBoundingClientRect(); else { t = this.offset(), n = r.ownerDocument, e = r.offsetParent || n.documentElement; while (e && (e === n.body || e === n.documentElement) && "static" === S.css(e, "position")) e = e.parentNode; e && e !== r && 1 === e.nodeType && ((i = S(e).offset()).top += S.css(e, "borderTopWidth", !0), i.left += S.css(e, "borderLeftWidth", !0)) } return { top: t.top - i.top - S.css(r, "marginTop", !0), left: t.left - i.left - S.css(r, "marginLeft", !0) } } }, offsetParent: function () { return this.map(function () { var e = this.offsetParent; while (e && "static" === S.css(e, "position")) e = e.offsetParent; return e || re }) } }), S.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (t, i) { var o = "pageYOffset" === i; S.fn[t] = function (e) { return $(this, function (e, t, n) { var r; if (x(e) ? r = e : 9 === e.nodeType && (r = e.defaultView), void 0 === n) return r ? r[i] : e[t]; r ? r.scrollTo(o ? r.pageXOffset : n, o ? n : r.pageYOffset) : e[t] = n }, t, e, arguments.length) } }), S.each(["top", "left"], function (e, n) { S.cssHooks[n] = $e(y.pixelPosition, function (e, t) { if (t) return t = Be(e, n), Me.test(t) ? S(e).position()[n] + "px" : t }) }), S.each({ Height: "height", Width: "width" }
vendor: 2,755 bytes, lines 42-46
42, function (a, s) { S.each({ padding: "inner" + a, content: s, "": "outer" + a }, function (r, o) { S.fn[o] = function (e, t) { var n = arguments.length && (r || "boolean" != typeof e), i = r || (!0 === e || !0 === t ? "margin" : "border"); return $(this, function (e, t, n) { var r; return x(e) ? 0 === o.indexOf("outer") ? e["inner" + a] : e.document.documentElement["client" + a] : 9 === e.nodeType ? (r = e.documentElement, Math.max(e.body["scroll" + a], r["scroll" + a], e.body["offset" + a], r["offset" + a], r["client" + a])) : void 0 === n ? S.css(e, t, i) : S.style(e, t, n, i) }, s, n ? e : void 0, n) } }) }), S.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (e, t) { S.fn[t] = function (e) { return this.on(t, e) } }), S.fn.extend({ bind: function (e, t, n) { return this.on(e, null, t, n) }, unbind: function (e, t) { return this.off(e, null, t) }, delegate: function (e, t, n, r) { return this.on(t, e, n, r) }, undelegate: function (e, t, n) { return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n) }, hover: function (e, t) { return this.mouseenter(e).mouseleave(t || e) } }), S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function (e, n) { S.fn[n] = function (e, t) { return 0 < arguments.length ? this.on(n, null, e, t) : this.trigger(n) } }); var Gt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; S.proxy = function (e, t) { var n, r, i; if ("string" == typeof t && (n = e[t], t = e, e = n), m(e)) return r = s.call(arguments, 2), (i = function () { return e.apply(t || this, r.concat(s.call(arguments))) }).guid = e.guid = e.guid || S.guid++, i }, S.holdReady = function (e) { e ? S.readyWait++ : S.ready(!0) }, S.isArray = Array.isArray, S.parseJSON = JSON.parse, S.nodeName = A, S.isFunction = m, S.isWindow = x, S.camelCase = X, S.type = w, S.now = Date.now, S.isNumeric = function (e) { var t = S.type(e); return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e)) }, S.trim = function (e) { return null == e ? "" : (e + "").replace(Gt, "") }, "function" == typeof define && define.amd && define("jquery", [], function () { return S }); var Yt = C.jQuery, Qt = C.$; return S.noConflict = function (e) { return C.$ === S && (C.$ = Qt), e && C.jQuery === S && (C.jQuery = Yt), S }, "undefined" == typeof e && (C.jQuery = C.$ = S), S });; 43/*! jQuery UI - v1.12.1 - 2018-07-30 44* http://jqueryui.com 45* Includes: widget.js, position.js, jquery-1-7.js, keycode.js, unique-id.js, widgets/autocomplete.js, widgets/menu.js, widgets/mouse.js, widgets/slider.js, widgets/tabs.js 46* widget/accordion
vendor: 34,522 bytes, lines 46-1278
46.js 47* Copyright jQuery Foundation and other contributors; Licensed MIT */ 48 49(function( factory ) { 50 if ( typeof define === "function" && define.amd ) { 51 52 // AMD. Register as an anonymous module. 53 define([ "jquery" ], factory ); 54 } else { 55 56 // Browser globals 57 factory( jQuery ); 58 } 59}(function( $ ) { 60 61$.ui = $.ui || {}; 62 63var version = $.ui.version = "1.12.1"; 64 65 66/*! 67 * jQuery UI Widget 1.12.1 68 * http://jqueryui.com 69 * 70 * Copyright jQuery Foundation and other contributors 71 * Released under the MIT license. 72 * http://jquery.org/license 73 */ 74 75//>>label: Widget 76//>>group: Core 77//>>description: Provides a factory for creating stateful widgets with a common API. 78//>>docs: http://api.jqueryui.com/jQuery.widget/ 79//>>demos: http://jqueryui.com/widget/ 80 81 82 83var widgetUuid = 0; 84var widgetSlice = Array.prototype.slice; 85 86$.cleanData = ( function( orig ) { 87 return function( elems ) { 88 var events, elem, i; 89 for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { 90 try { 91 92 // Only trigger remove when necessary to save time 93 events = $._data( elem, "events" ); 94 if ( events && events.remove ) { 95 $( elem ).triggerHandler( "remove" ); 96 } 97 98 // Http://bugs.jquery.com/ticket/8235 99 } catch ( e ) {} 100 } 101 orig( elems ); 102 }; 103} )( $.cleanData ); 104 105$.widget = function( name, base, prototype ) { 106 var existingConstructor, constructor, basePrototype; 107 108 // ProxiedPrototype allows the provided prototype to remain unmodified 109 // so that it can be used as a mixin for multiple widgets (#8876) 110 var proxiedPrototype = {}; 111 112 var namespace = name.split( "." )[ 0 ]; 113 name = name.split( "." )[ 1 ]; 114 var fullName = namespace + "-" + name; 115 116 if ( !prototype ) { 117 prototype = base; 118 base = $.Widget; 119 } 120 121 if ( $.isArray( prototype ) ) { 122 prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); 123 } 124 125 // Create selector for plugin 126 $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { 127 return !!$.data( elem, fullName ); 128 }; 129 130 $[ namespace ] = $[ namespace ] || {}; 131 existingConstructor = $[ namespace ][ name ]; 132 constructor = $[ namespace ][ name ] = function( options, element ) { 133 134 // Allow instantiation without "new" keyword 135 if ( !this._createWidget ) { 136 return new constructor( options, element ); 137 } 138 139 // Allow instantiation without initializing for simple inheritance 140 // must use "new" keyword (the code above always passes args) 141 if ( arguments.length ) { 142 this._createWidget( options, element ); 143 } 144 }; 145 146 // Extend with the existing constructor to carry over any static properties 147 $.extend( constructor, existingConstructor, { 148 version: prototype.version, 149 150 // Copy the object used to create the prototype in case we need to 151 // redefine the widget later 152 _proto: $.extend( {}, prototype ), 153 154 // Track widgets that inherit from this widget in case this widget is 155 // redefined after a widget inherits from it 156 _childConstructors: [] 157 } ); 158 159 basePrototype = new base(); 160 161 // We need to make the options hash a property directly on the new instance 162 // otherwise we'll modify the options hash on the prototype that we're 163 // inheriting from 164 basePrototype.options = $.widget.extend( {}, basePrototype.options ); 165 $.each( prototype, function( prop, value ) { 166 if ( !$.isFunction( value ) ) { 167 proxiedPrototype[ prop ] = value; 168 return; 169 } 170 proxiedPrototype[ prop ] = ( function() { 171 function _super() { 172 return base.prototype[ prop ].apply( this, arguments ); 173 } 174 175 function _superApply( args ) { 176 return base.prototype[ prop ].apply( this, args ); 177 } 178 179 return function() { 180 var __super = this._super; 181 var __superApply = this._superApply; 182 var returnValue; 183 184 this._super = _super; 185 this._superApply = _superApply; 186 187 returnValue = value.apply( this, arguments ); 188 189 this._super = __super; 190 this._superApply = __superApply; 191 192 return returnValue; 193 }; 194 } )(); 195 } ); 196 constructor.prototype = $.widget.extend( basePrototype, { 197 198 // TODO: remove support for widgetEventPrefix 199 // always use the name + a colon as the prefix, e.g., draggable:start 200 // don't prefix for widgets that aren't DOM-based 201 widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name 202 }, proxiedPrototype, { 203 constructor: constructor, 204 namespace: namespace, 205 widgetName: name, 206 widgetFullName: fullName 207 } ); 208 209 // If this widget is being redefined then we need to find all widgets that 210 // are inheriting from it and redefine all of them so that they inherit from 211 // the new version of this widget. We're essentially trying to replace one 212 // level in the prototype chain. 213 if ( existingConstructor ) { 214 $.each( existingConstructor._childConstructors, function( i, child ) { 215 var childPrototype = child.prototype; 216 217 // Redefine the child widget using the same prototype that was 218 // originally used, but inherit from the new version of the base 219 $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, 220 child._proto ); 221 } ); 222 223 // Remove the list of existing child constructors from the old constructor 224 // so the old child constructors can be garbage collected 225 delete existingConstructor._childConstructors; 226 } else { 227 base._childConstructors.push( constructor ); 228 } 229 230 $.widget.bridge( name, constructor ); 231 232 return constructor; 233}; 234 235$.widget.extend = function( target ) { 236 var input = widgetSlice.call( arguments, 1 ); 237 var inputIndex = 0; 238 var inputLength = input.length; 239 var key; 240 var value; 241 242 for ( ; inputIndex < inputLength; inputIndex++ ) { 243 for ( key in input[ inputIndex ] ) { 244 value = input[ inputIndex ][ key ]; 245 if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 246 247 // Clone objects 248 if ( $.isPlainObject( value ) ) { 249 target[ key ] = $.isPlainObject( target[ key ] ) ? 250 $.widget.extend( {}, target[ key ], value ) : 251 252 // Don't extend strings, arrays, etc. with objects 253 $.widget.extend( {}, value ); 254 255 // Copy everything else by reference 256 } else { 257 target[ key ] = value; 258 } 259 } 260 } 261 } 262 return target; 263}; 264 265$.widget.bridge = function( name, object ) { 266 var fullName = object.prototype.widgetFullName || name; 267 $.fn[ name ] = function( options ) { 268 var isMethodCall = typeof options === "string"; 269 var args = widgetSlice.call( arguments, 1 ); 270 var returnValue = this; 271 272 if ( isMethodCall ) { 273 274 // If this is an empty collection, we need to have the instance method 275 // return undefined instead of the jQuery instance 276 if ( !this.length && options === "instance" ) { 277 returnValue = undefined; 278 } else { 279 this.each( function() { 280 var methodValue; 281 var instance = $.data( this, fullName ); 282 283 if ( options === "instance" ) { 284 returnValue = instance; 285 return false; 286 } 287 288 if ( !instance ) { 289 return $.error( "cannot call methods on " + name + 290 " prior to initialization; " + 291 "attempted to call method '" + options + "'" ); 292 } 293 294 if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { 295 return $.error( "no such method '" + options + "' for " + name + 296 " widget instance" ); 297 } 298 299 methodValue = instance[ options ].apply( instance, args ); 300 301 if ( methodValue !== instance && methodValue !== undefined ) { 302 returnValue = methodValue && methodValue.jquery ? 303 returnValue.pushStack( methodValue.get() ) : 304 methodValue; 305 return false; 306 } 307 } ); 308 } 309 } else { 310 311 // Allow multiple hashes to be passed on init 312 if ( args.length ) { 313 options = $.widget.extend.apply( null, [ options ].concat( args ) ); 314 } 315 316 this.each( function() { 317 var instance = $.data( this, fullName ); 318 if ( instance ) { 319 instance.option( options || {} ); 320 if ( instance._init ) { 321 instance._init(); 322 } 323 } else { 324 $.data( this, fullName, new object( options, this ) ); 325 } 326 } ); 327 } 328 329 return returnValue; 330 }; 331}; 332 333$.Widget = function( /* options, element */ ) {}; 334$.Widget._childConstructors = []; 335 336$.Widget.prototype = { 337 widgetName: "widget", 338 widgetEventPrefix: "", 339 defaultElement: "<div>", 340 341 options: { 342 classes: {}, 343 disabled: false, 344 345 // Callbacks 346 create: null 347 }, 348 349 _createWidget: function( options, element ) { 350 element = $( element || this.defaultElement || this )[ 0 ]; 351 this.element = $( element ); 352 this.uuid = widgetUuid++; 353 this.eventNamespace = "." + this.widgetName + this.uuid; 354 355 this.bindings = $(); 356 this.hoverable = $(); 357 this.focusable = $(); 358 this.classesElementLookup = {}; 359 360 if ( element !== this ) { 361 $.data( element, this.widgetFullName, this ); 362 this._on( true, this.element, { 363 remove: function( event ) { 364 if ( event.target === element ) { 365 this.destroy(); 366 } 367 } 368 } ); 369 this.document = $( element.style ? 370 371 // Element within the document 372 element.ownerDocument : 373 374 // Element is window or document 375 element.document || element ); 376 this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); 377 } 378 379 this.options = $.widget.extend( {}, 380 this.options, 381 this._getCreateOptions(), 382 options ); 383 384 this._create(); 385 386 if ( this.options.disabled ) { 387 this._setOptionDisabled( this.options.disabled ); 388 } 389 390 this._trigger( "create", null, this._getCreateEventData() ); 391 this._init(); 392 }, 393 394 _getCreateOptions: function() { 395 return {}; 396 }, 397 398 _getCreateEventData: $.noop, 399 400 _create: $.noop, 401 402 _init: $.noop, 403 404 destroy: function() { 405 var that = this; 406 407 this._destroy(); 408 $.each( this.classesElementLookup, function( key, value ) { 409 that._removeClass( value, key ); 410 } ); 411 412 // We can probably remove the unbind calls in 2.0 413 // all event bindings should go through this._on() 414 this.element 415 .off( this.eventNamespace ) 416 .removeData( this.widgetFullName ); 417 this.widget() 418 .off( this.eventNamespace ) 419 .removeAttr( "aria-disabled" ); 420 421 // Clean up events and states 422 this.bindings.off( this.eventNamespace ); 423 }, 424 425 _destroy: $.noop, 426 427 widget: function() { 428 return this.element; 429 }, 430 431 option: function( key, value ) { 432 var options = key; 433 var parts; 434 var curOption; 435 var i; 436 437 if ( arguments.length === 0 ) { 438 439 // Don't return a reference to the internal hash 440 return $.widget.extend( {}, this.options ); 441 } 442 443 if ( typeof key === "string" ) { 444 445 // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } 446 options = {}; 447 parts = key.split( "." ); 448 key = parts.shift(); 449 if ( parts.length ) { 450 curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 451 for ( i = 0; i < parts.length - 1; i++ ) { 452 curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 453 curOption = curOption[ parts[ i ] ]; 454 } 455 key = parts.pop(); 456 if ( arguments.length === 1 ) { 457 return curOption[ key ] === undefined ? null : curOption[ key ]; 458 } 459 curOption[ key ] = value; 460 } else { 461 if ( arguments.length === 1 ) { 462 return this.options[ key ] === undefined ? null : this.options[ key ]; 463 } 464 options[ key ] = value; 465 } 466 } 467 468 this._setOptions( options ); 469 470 return this; 471 }, 472 473 _setOptions: function( options ) { 474 var key; 475 476 for ( key in options ) { 477 this._setOption( key, options[ key ] ); 478 } 479 480 return this; 481 }, 482 483 _setOption: function( key, value ) { 484 if ( key === "classes" ) { 485 this._setOptionClasses( value ); 486 } 487 488 this.options[ key ] = value; 489 490 if ( key === "disabled" ) { 491 this._setOptionDisabled( value ); 492 } 493 494 return this; 495 }, 496 497 _setOptionClasses: function( value ) { 498 var classKey, elements, currentElements; 499 500 for ( classKey in value ) { 501 currentElements = this.classesElementLookup[ classKey ]; 502 if ( value[ classKey ] === this.options.classes[ classKey ] || 503 !currentElements || 504 !currentElements.length ) { 505 continue; 506 } 507 508 // We are doing this to create a new jQuery object because the _removeClass() call 509 // on the next line is going to destroy the reference to the current elements being 510 // tracked. We need to save a copy of this collection so that we can add the new classes 511 // below. 512 elements = $( currentElements.get() ); 513 this._removeClass( currentElements, classKey ); 514 515 // We don't use _addClass() here, because that uses this.options.classes 516 // for generating the string of classes. We want to use the value passed in from 517 // _setOption(), this is the new value of the classes option which was passed to 518 // _setOption(). We pass this value directly to _classes(). 519 elements.addClass( this._classes( { 520 element: elements, 521 keys: classKey, 522 classes: value, 523 add: true 524 } ) ); 525 } 526 }, 527 528 _setOptionDisabled: function( value ) { 529 this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); 530 531 // If the widget is becoming disabled, then nothing is interactive 532 if ( value ) { 533 this._removeClass( this.hoverable, null, "ui-state-hover" ); 534 this._removeClass( this.focusable, null, "ui-state-focus" ); 535 } 536 }, 537 538 enable: function() { 539 return this._setOptions( { disabled: false } ); 540 }, 541 542 disable: function() { 543 return this._setOptions( { disabled: true } ); 544 }, 545 546 _classes: function( options ) { 547 var full = []; 548 var that = this; 549 550 options = $.extend( { 551 element: this.element, 552 classes: this.options.classes || {} 553 }, options ); 554 555 function processClassString( classes, checkOption ) { 556 var current, i; 557 for ( i = 0; i < classes.length; i++ ) { 558 current = that.classesElementLookup[ classes[ i ] ] || $(); 559 if ( options.add ) { 560 current = $( $.unique( current.get().concat( options.element.get() ) ) ); 561 } else { 562 current = $( current.not( options.element ).get() ); 563 } 564 that.classesElementLookup[ classes[ i ] ] = current; 565 full.push( classes[ i ] ); 566 if ( checkOption && options.classes[ classes[ i ] ] ) { 567 full.push( options.classes[ classes[ i ] ] ); 568 } 569 } 570 } 571 572 this._on( options.element, { 573 "remove": "_untrackClassesElement" 574 } ); 575 576 if ( options.keys ) { 577 processClassString( options.keys.match( /\S+/g ) || [], true ); 578 } 579 if ( options.extra ) { 580 processClassString( options.extra.match( /\S+/g ) || [] ); 581 } 582 583 return full.join( " " ); 584 }, 585 586 _untrackClassesElement: function( event ) { 587 var that = this; 588 $.each( that.classesElementLookup, function( key, value ) { 589 if ( $.inArray( event.target, value ) !== -1 ) { 590 that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); 591 } 592 } ); 593 }, 594 595 _removeClass: function( element, keys, extra ) { 596 return this._toggleClass( element, keys, extra, false ); 597 }, 598 599 _addClass: function( element, keys, extra ) { 600 return this._toggleClass( element, keys, extra, true ); 601 }, 602 603 _toggleClass: function( element, keys, extra, add ) { 604 add = ( typeof add === "boolean" ) ? add : extra; 605 var shift = ( typeof element === "string" || element === null ), 606 options = { 607 extra: shift ? keys : extra, 608 keys: shift ? element : keys, 609 element: shift ? this.element : element, 610 add: add 611 }; 612 options.element.toggleClass( this._classes( options ), add ); 613 return this; 614 }, 615 616 _on: function( suppressDisabledCheck, element, handlers ) { 617 var delegateElement; 618 var instance = this; 619 620 // No suppressDisabledCheck flag, shuffle arguments 621 if ( typeof suppressDisabledCheck !== "boolean" ) { 622 handlers = element; 623 element = suppressDisabledCheck; 624 suppressDisabledCheck = false; 625 } 626 627 // No element argument, shuffle and use this.element 628 if ( !handlers ) { 629 handlers = element; 630 element = this.element; 631 delegateElement = this.widget(); 632 } else { 633 element = delegateElement = $( element ); 634 this.bindings = this.bindings.add( element ); 635 } 636 637 $.each( handlers, function( event, handler ) { 638 function handlerProxy() { 639 640 // Allow widgets to customize the disabled handling 641 // - disabled as an array instead of boolean 642 // - disabled class as method for disabling individual parts 643 if ( !suppressDisabledCheck && 644 ( instance.options.disabled === true || 645 $( this ).hasClass( "ui-state-disabled" ) ) ) { 646 return; 647 } 648 return ( typeof handler === "string" ? instance[ handler ] : handler ) 649 .apply( instance, arguments ); 650 } 651 652 // Copy the guid so direct unbinding works 653 if ( typeof handler !== "string" ) { 654 handlerProxy.guid = handler.guid = 655 handler.guid || handlerProxy.guid || $.guid++; 656 } 657 658 var match = event.match( /^([\w:-]*)\s*(.*)$/ ); 659 var eventName = match[ 1 ] + instance.eventNamespace; 660 var selector = match[ 2 ]; 661 662 if ( selector ) { 663 delegateElement.on( eventName, selector, handlerProxy ); 664 } else { 665 element.on( eventName, handlerProxy ); 666 } 667 } ); 668 }, 669 670 _off: function( element, eventName ) { 671 eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + 672 this.eventNamespace; 673 element.off( eventName ).off( eventName ); 674 675 // Clear the stack to avoid memory leaks (#10056) 676 this.bindings = $( this.bindings.not( element ).get() ); 677 this.focusable = $( this.focusable.not( element ).get() ); 678 this.hoverable = $( this.hoverable.not( element ).get() ); 679 }, 680 681 _delay: function( handler, delay ) { 682 function handlerProxy() { 683 return ( typeof handler === "string" ? instance[ handler ] : handler ) 684 .apply( instance, arguments ); 685 } 686 var instance = this; 687 return setTimeout( handlerProxy, delay || 0 ); 688 }, 689 690 _hoverable: function( element ) { 691 this.hoverable = this.hoverable.add( element ); 692 this._on( element, { 693 mouseenter: function( event ) { 694 this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); 695 }, 696 mouseleave: function( event ) { 697 this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); 698 } 699 } ); 700 }, 701 702 _focusable: function( element ) { 703 this.focusable = this.focusable.add( element ); 704 this._on( element, { 705 focusin: function( event ) { 706 this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); 707 }, 708 focusout: function( event ) { 709 this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); 710 } 711 } ); 712 }, 713 714 _trigger: function( type, event, data ) { 715 var prop, orig; 716 var callback = this.options[ type ]; 717 718 data = data || {}; 719 event = $.Event( event ); 720 event.type = ( type === this.widgetEventPrefix ? 721 type : 722 this.widgetEventPrefix + type ).toLowerCase(); 723 724 // The original event may come from any element 725 // so we need to reset the target on the new event 726 event.target = this.element[ 0 ]; 727 728 // Copy original event properties over to the new event 729 orig = event.originalEvent; 730 if ( orig ) { 731 for ( prop in orig ) { 732 if ( !( prop in event ) ) { 733 event[ prop ] = orig[ prop ]; 734 } 735 } 736 } 737 738 this.element.trigger( event, data ); 739 return !( $.isFunction( callback ) && 740 callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || 741 event.isDefaultPrevented() ); 742 } 743}; 744 745$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 746 $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 747 if ( typeof options === "string" ) { 748 options = { effect: options }; 749 } 750 751 var hasOptions; 752 var effectName = !options ? 753 method : 754 options === true || typeof options === "number" ? 755 defaultEffect : 756 options.effect || defaultEffect; 757 758 options = options || {}; 759 if ( typeof options === "number" ) { 760 options = { duration: options }; 761 } 762 763 hasOptions = !$.isEmptyObject( options ); 764 options.complete = callback; 765 766 if ( options.delay ) { 767 element.delay( options.delay ); 768 } 769 770 if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { 771 element[ method ]( options ); 772 } else if ( effectName !== method && element[ effectName ] ) { 773 element[ effectName ]( options.duration, options.easing, callback ); 774 } else { 775 element.queue( function( next ) { 776 $( this )[ method ](); 777 if ( callback ) { 778 callback.call( element[ 0 ] ); 779 } 780 next(); 781 } ); 782 } 783 }; 784} ); 785 786var widget = $.widget; 787 788 789/*! 790 * jQuery UI Position 1.12.1 791 * http://jqueryui.com 792 * 793 * Copyright jQuery Foundation and other contributors 794 * Released under the MIT license. 795 * http://jquery.org/license 796 * 797 * http://api.jqueryui.com/position/ 798 */ 799 800//>>label: Position 801//>>group: Core 802//>>description: Positions elements relative to other elements. 803//>>docs: http://api.jqueryui.com/position/ 804//>>demos: http://jqueryui.com/position/ 805 806 807( function() { 808var cachedScrollbarWidth, 809 max = Math.max, 810 abs = Math.abs, 811 rhorizontal = /left|center|right/, 812 rvertical = /top|center|bottom/, 813 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 814 rposition = /^\w+/, 815 rpercent = /%$/, 816 _position = $.fn.position; 817 818function getOffsets( offsets, width, height ) { 819 return [ 820 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 821 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 822 ]; 823} 824 825function parseCss( element, property ) { 826 return parseInt( $.css( element, property ), 10 ) || 0; 827} 828 829function getDimensions( elem ) { 830 var raw = elem[ 0 ]; 831 if ( raw.nodeType === 9 ) { 832 return { 833 width: elem.width(), 834 height: elem.height(), 835 offset: { top: 0, left: 0 } 836 }; 837 } 838 if ( $.isWindow( raw ) ) { 839 return { 840 width: elem.width(), 841 height: elem.height(), 842 offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 843 }; 844 } 845 if ( raw.preventDefault ) { 846 return { 847 width: 0, 848 height: 0, 849 offset: { top: raw.pageY, left: raw.pageX } 850 }; 851 } 852 return { 853 width: elem.outerWidth(), 854 height: elem.outerHeight(), 855 offset: elem.offset() 856 }; 857} 858 859$.position = { 860 scrollbarWidth: function() { 861 if ( cachedScrollbarWidth !== undefined ) { 862 return cachedScrollbarWidth; 863 } 864 var w1, w2, 865 div = $( "<div " + 866 "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" + 867 "<div style='height:100px;width:auto;'></div></div>" ), 868 innerDiv = div.children()[ 0 ]; 869 870 $( "body" ).append( div ); 871 w1 = innerDiv.offsetWidth; 872 div.css( "overflow", "scroll" ); 873 874 w2 = innerDiv.offsetWidth; 875 876 if ( w1 === w2 ) { 877 w2 = div[ 0 ].clientWidth; 878 } 879 880 div.remove(); 881 882 return ( cachedScrollbarWidth = w1 - w2 ); 883 }, 884 getScrollInfo: function( within ) { 885 var overflowX = within.isWindow || within.isDocument ? "" : 886 within.element.css( "overflow-x" ), 887 overflowY = within.isWindow || within.isDocument ? "" : 888 within.element.css( "overflow-y" ), 889 hasOverflowX = overflowX === "scroll" || 890 ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), 891 hasOverflowY = overflowY === "scroll" || 892 ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); 893 return { 894 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 895 height: hasOverflowX ? $.position.scrollbarWidth() : 0 896 }; 897 }, 898 getWithinInfo: function( element ) { 899 var withinElement = $( element || window ), 900 isWindow = $.isWindow( withinElement[ 0 ] ), 901 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, 902 hasOffset = !isWindow && !isDocument; 903 return { 904 element: withinElement, 905 isWindow: isWindow, 906 isDocument: isDocument, 907 offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, 908 scrollLeft: withinElement.scrollLeft(), 909 scrollTop: withinElement.scrollTop(), 910 width: withinElement.outerWidth(), 911 height: withinElement.outerHeight() 912 }; 913 } 914}; 915 916$.fn.position = function( options ) { 917 if ( !options || !options.of ) { 918 return _position.apply( this, arguments ); 919 } 920 921 // Make a copy, we don't want to modify arguments 922 options = $.extend( {}, options ); 923 924 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 925 target = $( options.of ), 926 within = $.position.getWithinInfo( options.within ), 927 scrollInfo = $.position.getScrollInfo( within ), 928 collision = ( options.collision || "flip" ).split( " " ), 929 offsets = {}; 930 931 dimensions = getDimensions( target ); 932 if ( target[ 0 ].preventDefault ) { 933 934 // Force left top to allow flipping 935 options.at = "left top"; 936 } 937 targetWidth = dimensions.width; 938 targetHeight = dimensions.height; 939 targetOffset = dimensions.offset; 940 941 // Clone to reuse original targetOffset later 942 basePosition = $.extend( {}, targetOffset ); 943 944 // Force my and at to have valid horizontal and vertical positions 945 // if a value is missing or invalid, it will be converted to center 946 $.each( [ "my", "at" ], function() { 947 var pos = ( options[ this ] || "" ).split( " " ), 948 horizontalOffset, 949 verticalOffset; 950 951 if ( pos.length === 1 ) { 952 pos = rhorizontal.test( pos[ 0 ] ) ? 953 pos.concat( [ "center" ] ) : 954 rvertical.test( pos[ 0 ] ) ? 955 [ "center" ].concat( pos ) : 956 [ "center", "center" ]; 957 } 958 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 959 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 960 961 // Calculate offsets 962 horizontalOffset = roffset.exec( pos[ 0 ] ); 963 verticalOffset = roffset.exec( pos[ 1 ] ); 964 offsets[ this ] = [ 965 horizontalOffset ? horizontalOffset[ 0 ] : 0, 966 verticalOffset ? verticalOffset[ 0 ] : 0 967 ]; 968 969 // Reduce to just the positions without the offsets 970 options[ this ] = [ 971 rposition.exec( pos[ 0 ] )[ 0 ], 972 rposition.exec( pos[ 1 ] )[ 0 ] 973 ]; 974 } ); 975 976 // Normalize collision option 977 if ( collision.length === 1 ) { 978 collision[ 1 ] = collision[ 0 ]; 979 } 980 981 if ( options.at[ 0 ] === "right" ) { 982 basePosition.left += targetWidth; 983 } else if ( options.at[ 0 ] === "center" ) { 984 basePosition.left += targetWidth / 2; 985 } 986 987 if ( options.at[ 1 ] === "bottom" ) { 988 basePosition.top += targetHeight; 989 } else if ( options.at[ 1 ] === "center" ) { 990 basePosition.top += targetHeight / 2; 991 } 992 993 atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 994 basePosition.left += atOffset[ 0 ]; 995 basePosition.top += atOffset[ 1 ]; 996 997 return this.each( function() { 998 var collisionPosition, using, 999 elem = $( this ), 1000 elemWidth = elem.outerWidth(), 1001 elemHeight = elem.outerHeight(), 1002 marginLeft = parseCss( this, "marginLeft" ), 1003 marginTop = parseCss( this, "marginTop" ), 1004 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + 1005 scrollInfo.width, 1006 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + 1007 scrollInfo.height, 1008 position = $.extend( {}, basePosition ), 1009 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 1010 1011 if ( options.my[ 0 ] === "right" ) { 1012 position.left -= elemWidth; 1013 } else if ( options.my[ 0 ] === "center" ) { 1014 position.left -= elemWidth / 2; 1015 } 1016 1017 if ( options.my[ 1 ] === "bottom" ) { 1018 position.top -= elemHeight; 1019 } else if ( options.my[ 1 ] === "center" ) { 1020 position.top -= elemHeight / 2; 1021 } 1022 1023 position.left += myOffset[ 0 ]; 1024 position.top += myOffset[ 1 ]; 1025 1026 collisionPosition = { 1027 marginLeft: marginLeft, 1028 marginTop: marginTop 1029 }; 1030 1031 $.each( [ "left", "top" ], function( i, dir ) { 1032 if ( $.ui.position[ collision[ i ] ] ) { 1033 $.ui.position[ collision[ i ] ][ dir ]( position, { 1034 targetWidth: targetWidth, 1035 targetHeight: targetHeight, 1036 elemWidth: elemWidth, 1037 elemHeight: elemHeight, 1038 collisionPosition: collisionPosition, 1039 collisionWidth: collisionWidth, 1040 collisionHeight: collisionHeight, 1041 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 1042 my: options.my, 1043 at: options.at, 1044 within: within, 1045 elem: elem 1046 } ); 1047 } 1048 } ); 1049 1050 if ( options.using ) { 1051 1052 // Adds feedback as second argument to using callback, if present 1053 using = function( props ) { 1054 var left = targetOffset.left - position.left, 1055 right = left + targetWidth - elemWidth, 1056 top = targetOffset.top - position.top, 1057 bottom = top + targetHeight - elemHeight, 1058 feedback = { 1059 target: { 1060 element: target, 1061 left: targetOffset.left, 1062 top: targetOffset.top, 1063 width: targetWidth, 1064 height: targetHeight 1065 }, 1066 element: { 1067 element: elem, 1068 left: position.left, 1069 top: position.top, 1070 width: elemWidth, 1071 height: elemHeight 1072 }, 1073 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 1074 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 1075 }; 1076 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 1077 feedback.horizontal = "center"; 1078 } 1079 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 1080 feedback.vertical = "middle"; 1081 } 1082 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 1083 feedback.important = "horizontal"; 1084 } else { 1085 feedback.important = "vertical"; 1086 } 1087 options.using.call( this, props, feedback ); 1088 }; 1089 } 1090 1091 elem.offset( $.extend( position, { using: using } ) ); 1092 } ); 1093}; 1094 1095$.ui.position = { 1096 fit: { 1097 left: function( position, data ) { 1098 var within = data.within, 1099 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 1100 outerWidth = within.width, 1101 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 1102 overLeft = withinOffset - collisionPosLeft, 1103 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 1104 newOverRight; 1105 1106 // Element is wider than within 1107 if ( data.collisionWidth > outerWidth ) { 1108 1109 // Element is initially over the left side of within 1110 if ( overLeft > 0 && overRight <= 0 ) { 1111 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - 1112 withinOffset; 1113 position.left += overLeft - newOverRight; 1114 1115 // Element is initially over right side of within 1116 } else if ( overRight > 0 && overLeft <= 0 ) { 1117 position.left = withinOffset; 1118 1119 // Element is initially over both left and right sides of within 1120 } else { 1121 if ( overLeft > overRight ) { 1122 position.left = withinOffset + outerWidth - data.collisionWidth; 1123 } else { 1124 position.left = withinOffset; 1125 } 1126 } 1127 1128 // Too far left -> align with left edge 1129 } else if ( overLeft > 0 ) { 1130 position.left += overLeft; 1131 1132 // Too far right -> align with right edge 1133 } else if ( overRight > 0 ) { 1134 position.left -= overRight; 1135 1136 // Adjust based on position and margin 1137 } else { 1138 position.left = max( position.left - collisionPosLeft, position.left ); 1139 } 1140 }, 1141 top: function( position, data ) { 1142 var within = data.within, 1143 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 1144 outerHeight = data.within.height, 1145 collisionPosTop = position.top - data.collisionPosition.marginTop, 1146 overTop = withinOffset - collisionPosTop, 1147 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 1148 newOverBottom; 1149 1150 // Element is taller than within 1151 if ( data.collisionHeight > outerHeight ) { 1152 1153 // Element is initially over the top of within 1154 if ( overTop > 0 && overBottom <= 0 ) { 1155 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - 1156 withinOffset; 1157 position.top += overTop - newOverBottom; 1158 1159 // Element is initially over bottom of within 1160 } else if ( overBottom > 0 && overTop <= 0 ) { 1161 position.top = withinOffset; 1162 1163 // Element is initially over both top and bottom of within 1164 } else { 1165 if ( overTop > overBottom ) { 1166 position.top = withinOffset + outerHeight - data.collisionHeight; 1167 } else { 1168 position.top = withinOffset; 1169 } 1170 } 1171 1172 // Too far up -> align with top 1173 } else if ( overTop > 0 ) { 1174 position.top += overTop; 1175 1176 // Too far down -> align with bottom edge 1177 } else if ( overBottom > 0 ) { 1178 position.top -= overBottom; 1179 1180 // Adjust based on position and margin 1181 } else { 1182 position.top = max( position.top - collisionPosTop, position.top ); 1183 } 1184 } 1185 }, 1186 flip: { 1187 left: function( position, data ) { 1188 var within = data.within, 1189 withinOffset = within.offset.left + within.scrollLeft, 1190 outerWidth = within.width, 1191 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 1192 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 1193 overLeft = collisionPosLeft - offsetLeft, 1194 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 1195 myOffset = data.my[ 0 ] === "left" ? 1196 -data.elemWidth : 1197 data.my[ 0 ] === "right" ? 1198 data.elemWidth : 1199 0, 1200 atOffset = data.at[ 0 ] === "left" ? 1201 data.targetWidth : 1202 data.at[ 0 ] === "right" ? 1203 -data.targetWidth : 1204 0, 1205 offset = -2 * data.offset[ 0 ], 1206 newOverRight, 1207 newOverLeft; 1208 1209 if ( overLeft < 0 ) { 1210 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - 1211 outerWidth - withinOffset; 1212 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 1213 position.left += myOffset + atOffset + offset; 1214 } 1215 } else if ( overRight > 0 ) { 1216 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + 1217 atOffset + offset - offsetLeft; 1218 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 1219 position.left += myOffset + atOffset + offset; 1220 } 1221 } 1222 }, 1223 top: function( position, data ) { 1224 var within = data.within, 1225 withinOffset = within.offset.top + within.scrollTop, 1226 outerHeight = within.height, 1227 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 1228 collisionPosTop = position.top - data.collisionPosition.marginTop, 1229 overTop = collisionPosTop - offsetTop, 1230 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 1231 top = data.my[ 1 ] === "top", 1232 myOffset = top ? 1233 -data.elemHeight : 1234 data.my[ 1 ] === "bottom" ? 1235 data.elemHeight : 1236 0, 1237 atOffset = data.at[ 1 ] === "top" ? 1238 data.targetHeight : 1239 data.at[ 1 ] === "bottom" ? 1240 -data.targetHeight : 1241 0, 1242 offset = -2 * data.offset[ 1 ], 1243 newOverTop, 1244 newOverBottom; 1245 if ( overTop < 0 ) { 1246 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - 1247 outerHeight - withinOffset; 1248 if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { 1249 position.top += myOffset + atOffset + offset; 1250 } 1251 } else if ( overBottom > 0 ) { 1252 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + 1253 offset - offsetTop; 1254 if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { 1255 position.top += myOffset + atOffset + offset; 1256 } 1257 } 1258 } 1259 }, 1260 flipfit: { 1261 left: function() { 1262 $.ui.position.flip.left.apply( this, arguments ); 1263 $.ui.position.fit.left.apply( this, arguments ); 1264 }, 1265 top: function() { 1266 $.ui.position.flip.top.apply( this, arguments ); 1267 $.ui.position.fit.top.apply( this, arguments ); 1268 } 1269 } 1270}; 1271 1272} )(); 1273 1274var position = $.ui.position; 1275 1276 1277/*! 1278 * jQuery UI
1278Support for jQuery core 1.7.x 1.12.1 1279 * http://jqueryui.com 1280 * 1281 * Copyright jQuery Foundation and other contributors 1282 * Released under the MIT license. 1283 * http://jquery.org/license 1284 * 1285 */ 1286 1287//>>label: jQuery 1.7 Support 1288//>>group: Core 1289//>>description: Support version 1.7.x of jQuery core 1290 1291 1292 1293// Support: jQuery 1.7 only 1294// Not a great way to check versions, but since we only support
vendor: 4,871 bytes, lines 1294-1507
12941.7+ and only 1295// need to detect <1.8, this is a simple check that should suffice. Checking 1296// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 1297// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting 1298// 1.7 anymore). See #11197 for why we're not using feature detection. 1299if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { 1300 1301 // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() 1302 // Unlike jQuery Core 1.8+, these only support numeric values to set the 1303 // dimensions in pixels 1304 $.each( [ "Width", "Height" ], function( i, name ) { 1305 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], 1306 type = name.toLowerCase(), 1307 orig = { 1308 innerWidth: $.fn.innerWidth, 1309 innerHeight: $.fn.innerHeight, 1310 outerWidth: $.fn.outerWidth, 1311 outerHeight: $.fn.outerHeight 1312 }; 1313 1314 function reduce( elem, size, border, margin ) { 1315 $.each( side, function() { 1316 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; 1317 if ( border ) { 1318 size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; 1319 } 1320 if ( margin ) { 1321 size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; 1322 } 1323 } ); 1324 return size; 1325 } 1326 1327 $.fn[ "inner" + name ] = function( size ) { 1328 if ( size === undefined ) { 1329 return orig[ "inner" + name ].call( this ); 1330 } 1331 1332 return this.each( function() { 1333 $( this ).css( type, reduce( this, size ) + "px" ); 1334 } ); 1335 }; 1336 1337 $.fn[ "outer" + name ] = function( size, margin ) { 1338 if ( typeof size !== "number" ) { 1339 return orig[ "outer" + name ].call( this, size ); 1340 } 1341 1342 return this.each( function() { 1343 $( this ).css( type, reduce( this, size, true, margin ) + "px" ); 1344 } ); 1345 }; 1346 } ); 1347 1348 $.fn.addBack = function( selector ) { 1349 return this.add( selector == null ? 1350 this.prevObject : this.prevObject.filter( selector ) 1351 ); 1352 }; 1353} 1354 1355; 1356/*! 1357 * jQuery UI Keycode 1.12.1 1358 * http://jqueryui.com 1359 * 1360 * Copyright jQuery Foundation and other contributors 1361 * Released under the MIT license. 1362 * http://jquery.org/license 1363 */ 1364 1365//>>label: Keycode 1366//>>group: Core 1367//>>description: Provide keycodes as keynames 1368//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ 1369 1370 1371var keycode = $.ui.keyCode = { 1372 BACKSPACE: 8, 1373 COMMA: 188, 1374 DELETE: 46, 1375 //DOWN: 40, 1376 END: 35, 1377 ENTER: 13, 1378 ESCAPE: 27, 1379 HOME: 36, 1380 LEFT: 37, 1381 PAGE_DOWN: 34, 1382 PAGE_UP: 33, 1383 PERIOD: 190, 1384 RIGHT: 39, 1385 SPACE: 32, 1386 TAB: 9//, 1387 //UP: 38 1388}; 1389 1390 1391/*! 1392 * jQuery UI Unique ID 1.12.1 1393 * http://jqueryui.com 1394 * 1395 * Copyright jQuery Foundation and other contributors 1396 * Released under the MIT license. 1397 * http://jquery.org/license 1398 */ 1399 1400//>>label: uniqueId 1401//>>group: Core 1402//>>description: Functions to generate and remove uniqueId's 1403//>>docs: http://api.jqueryui.com/uniqueId/ 1404 1405 1406 1407var uniqueId = $.fn.extend( { 1408 uniqueId: ( function() { 1409 var uuid = 0; 1410 1411 return function() { 1412 return this.each( function() { 1413 if ( !this.id ) { 1414 this.id = "ui-id-" + ( ++uuid ); 1415 } 1416 } ); 1417 }; 1418 } )(), 1419 1420 removeUniqueId: function() { 1421 return this.each( function() { 1422 if ( /^ui-id-\d+$/.test( this.id ) ) { 1423 $( this ).removeAttr( "id" ); 1424 } 1425 } ); 1426 } 1427} ); 1428 1429 1430 1431var safeActiveElement = $.ui.safeActiveElement = function( document ) { 1432 var activeElement; 1433 1434 // Support: IE 9 only 1435 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> 1436 try { 1437 activeElement = document.activeElement; 1438 } catch ( error ) { 1439 activeElement = document.body; 1440 } 1441 1442 // Support: IE 9 - 11 only 1443 // IE may return null instead of an element 1444 // Interestingly, this only seems to occur when NOT in an iframe 1445 if ( !activeElement ) { 1446 activeElement = document.body; 1447 } 1448 1449 // Support: IE 11 only 1450 // IE11 returns a seemingly empty object in some cases when accessing 1451 // document.activeElement from an <iframe> 1452 if ( !activeElement.nodeName ) { 1453 activeElement = document.body; 1454 } 1455 1456 return activeElement; 1457}; 1458 1459 1460/*! 1461 * jQuery UI Menu 1.12.1 1462 * http://jqueryui.com 1463 * 1464 * Copyright jQuery Foundation and other contributors 1465 * Released under the MIT license. 1466 * http://jquery.org/license 1467 */ 1468 1469//>>label: Menu 1470//>>group: Widgets 1471//>>description: Creates nestable menus. 1472//>>docs: http://api.jqueryui.com/menu/ 1473//>>demos: http://jqueryui.com/menu/ 1474//>>css.structure: ../../themes/base/core.css 1475//>>css.structure: ../../themes/base/menu.css 1476//>>css.theme: ../../themes/base/theme.css 1477 1478 1479 1480var widgetsMenu = $.widget( "ui.menu", { 1481 version: "1.12.1", 1482 defaultElement: "<ul>", 1483 delay: 300, 1484 options: { 1485 icons: { 1486 submenu: "ui-icon-caret-1-e" 1487 }, 1488 items: "> *", 1489 menus: "ul", 1490 position: { 1491 my: "left top", 1492 at: "right top" 1493 }, 1494 role: "menu", 1495 1496 // Callbacks 1497 blur: null, 1498 focus: null, 1499 select: null 1500 }, 1501 1502 _create: function() { 1503 this.activeMenu = this.element; 1504 1505 // Flag used to prevent firing of the click handler 1506 // as the event bubbles up through nested menus 1507 this.mouseHandled = false;
vendor: 2,859 bytes, lines 1508-1597
1508 this.element 1509 .uniqueId() 1510 .attr( { 1511 role: this.options.role, 1512 tabIndex: 0 1513 } ); 1514 1515 this._addClass( "ui-menu", "ui-widget ui-widget-content" ); 1516 this._on( { 1517 1518 // Prevent focus from sticking to links inside menu after clicking 1519 // them (focus should always stay on UL during navigation). 1520 "mousedown .ui-menu-item": function( event ) { 1521 event.preventDefault(); 1522 }, 1523 "click .ui-menu-item": function( event ) { 1524 var target = $( event.target ); 1525 var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); 1526 if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { 1527 this.select( event ); 1528 1529 // Only set the mouseHandled flag if the event will bubble, see #9469. 1530 if ( !event.isPropagationStopped() ) { 1531 this.mouseHandled = true; 1532 } 1533 1534 // Open submenu on click 1535 if ( target.has( ".ui-menu" ).length ) { 1536 this.expand( event ); 1537 } else if ( !this.element.is( ":focus" ) && 1538 active.closest( ".ui-menu" ).length ) { 1539 1540 // Redirect focus to the menu 1541 this.element.trigger( "focus", [ true ] ); 1542 1543 // If the active item is on the top level, let it stay active. 1544 // Otherwise, blur the active item since it is no longer visible. 1545 if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { 1546 clearTimeout( this.timer ); 1547 } 1548 } 1549 } 1550 }, 1551 "mouseenter .ui-menu-item": function( event ) { 1552 1553 // Ignore mouse events while typeahead is active, see #10458. 1554 // Prevents focusing the wrong item when typeahead causes a scroll while the mouse 1555 // is over an item in the menu 1556 if ( this.previousFilter ) { 1557 return; 1558 } 1559 1560 var actualTarget = $( event.target ).closest( ".ui-menu-item" ), 1561 target = $( event.currentTarget ); 1562 1563 // Ignore bubbled events on parent items, see #11641 1564 if ( actualTarget[ 0 ] !== target[ 0 ] ) { 1565 return; 1566 } 1567 1568 // Remove ui-state-active class from siblings of the newly focused menu item 1569 // to avoid a jump caused by adjacent elements both having a class with a border 1570 this._removeClass( target.siblings().children( ".ui-state-active" ), 1571 null, "ui-state-active" ); 1572 this.focus( event, target ); 1573 }, 1574 mouseleave: "collapseAll", 1575 "mouseleave .ui-menu": "collapseAll", 1576 focus: function( event, keepActiveItem ) { 1577 1578 // If there's already an active item, keep it active 1579 // If not, activate the first item 1580 var item = this.active || this.element.find( this.options.items ).eq( 0 ); 1581 1582 if ( !keepActiveItem ) { 1583 this.focus( event, item ); 1584 } 1585 }, 1586 blur: function( event ) { 1587 this._delay( function() { 1588 var notContained = !$.contains( 1589 this.element[ 0 ], 1590 $.ui.safeActiveElement( this.document[ 0 ] ) 1591 ); 1592 if ( notContained ) { 1593 this.collapseAll( event ); 1594 } 1595 } ); 1596 }, 1597
vendor: 4,769 bytes, lines 1597-1779
1597keydown: "_keydown" 1598 } ); 1599 1600 this.refresh(); 1601 1602 // Clicks outside of a menu collapse any open menus 1603 this._on( this.document, { 1604 click: function( event ) { 1605 if ( this._closeOnDocumentClick( event ) ) { 1606 this.collapseAll( event ); 1607 } 1608 1609 // Reset the mouseHandled flag 1610 this.mouseHandled = false; 1611 } 1612 } ); 1613 }, 1614 1615 _destroy: function() { 1616 var items = this.element.find( ".ui-menu-item" ) 1617 .removeAttr( "role aria-disabled" ), 1618 submenus = items.children( ".ui-menu-item-wrapper" ) 1619 .removeUniqueId() 1620 .removeAttr( "tabIndex role aria-haspopup" ); 1621 1622 // Destroy (sub)menus 1623 this.element 1624 .removeAttr( "aria-activedescendant" ) 1625 .find( ".ui-menu" ).addBack() 1626 .removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " + 1627 "tabIndex" ) 1628 .removeUniqueId() 1629 .show(); 1630 1631 submenus.children().each( function() { 1632 var elem = $( this ); 1633 if ( elem.data( "ui-menu-submenu-caret" ) ) { 1634 elem.remove(); 1635 } 1636 } ); 1637 }, 1638 1639 _keydown: function( event ) { 1640 var match, prev, character, skip, 1641 preventDefault = true; 1642 1643 switch ( event.keyCode ) { 1644 case $.ui.keyCode.PAGE_UP: 1645 this.previousPage( event ); 1646 break; 1647 case $.ui.keyCode.PAGE_DOWN: 1648 this.nextPage( event ); 1649 break; 1650 case $.ui.keyCode.HOME: 1651 this._move( "first", "first", event ); 1652 break; 1653 case $.ui.keyCode.END: 1654 this._move( "last", "last", event ); 1655 break; 1656 case $.ui.keyCode.UP: 1657 this.previous( event ); 1658 break; 1659 case $.ui.keyCode.DOWN: 1660 this.next( event ); 1661 break; 1662 case $.ui.keyCode.LEFT: 1663 this.collapse( event ); 1664 break; 1665 case $.ui.keyCode.RIGHT: 1666 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 1667 this.expand( event ); 1668 } 1669 break; 1670 case $.ui.keyCode.ENTER: 1671 case $.ui.keyCode.SPACE: 1672 this._activate( event ); 1673 break; 1674 case $.ui.keyCode.ESCAPE: 1675 this.collapse( event ); 1676 break; 1677 default: 1678 preventDefault = false; 1679 prev = this.previousFilter || ""; 1680 skip = false; 1681 1682 // Support number pad values 1683 character = event.keyCode >= 96 && event.keyCode <= 105 ? 1684 ( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode ); 1685 1686 clearTimeout( this.filterTimer ); 1687 1688 if ( character === prev ) { 1689 skip = true; 1690 } else { 1691 character = prev + character; 1692 } 1693 1694 match = this._filterMenuItems( character ); 1695 match = skip && match.index( this.active.next() ) !== -1 ? 1696 this.active.nextAll( ".ui-menu-item" ) : 1697 match; 1698 1699 // If no matches on the current filter, reset to the last character pressed 1700 // to move down the menu to the first item that starts with that character 1701 if ( !match.length ) { 1702 character = String.fromCharCode( event.keyCode ); 1703 match = this._filterMenuItems( character ); 1704 } 1705 1706 if ( match.length ) { 1707 this.focus( event, match ); 1708 this.previousFilter = character; 1709 this.filterTimer = this._delay( function() { 1710 delete this.previousFilter; 1711 }, 1000 ); 1712 } else { 1713 delete this.previousFilter; 1714 } 1715 } 1716 1717 if ( preventDefault ) { 1718 event.preventDefault(); 1719 } 1720 }, 1721 1722 _activate: function( event ) { 1723 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 1724 if ( this.active.children( "[aria-haspopup='true']" ).length ) { 1725 this.expand( event ); 1726 } else { 1727 this.select( event ); 1728 } 1729 } 1730 }, 1731 1732 refresh: function() { 1733 var menus, items, newSubmenus, newItems, newWrappers, 1734 that = this, 1735 icon = this.options.icons.submenu, 1736 submenus = this.element.find( this.options.menus ); 1737 1738 this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length ); 1739 1740 // Initialize nested menus 1741 newSubmenus = submenus.filter( ":not(.ui-menu)" ) 1742 .hide() 1743 .attr( { 1744 role: this.options.role, 1745 "aria-hidden": "true", 1746 "aria-expanded": "false" 1747 } ) 1748 .each( function() { 1749 var menu = $( this ), 1750 item = menu.prev(), 1751 submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true ); 1752 1753 that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon ); 1754 item 1755 .attr( "aria-haspopup", "true" ) 1756 .prepend( submenuCaret ); 1757 menu.attr( "aria-labelledby", item.attr( "id" ) ); 1758 } ); 1759 1760 this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" ); 1761 1762 menus = submenus.add( this.element ); 1763 items = menus.find( this.options.items ); 1764 1765 // Initialize menu-items containing spaces and/or dashes only as dividers 1766 items.not( ".ui-menu-item" ).each( function() { 1767 var item = $( this ); 1768 if ( that._isDivider( item ) ) { 1769 that._addClass( item, "ui-menu-divider", "ui-widget-content" ); 1770 } 1771 } ); 1772 1773 // Don't refresh list items that are already adapted 1774 newItems = items.not( ".ui-menu-item, .ui-menu-divider" ); 1775 newWrappers = newItems.children() 1776 .not( ".ui-menu" ) 1777 .uniqueId() 1778 .attr( { 1779 tabIndex:
vendor: 4,068 bytes, lines 1779-1927
17790, 1780 role: this._itemRole() 1781 } ); 1782 this._addClass( newItems, "ui-menu-item" ) 1783 ._addClass( newWrappers, "ui-menu-item-wrapper" ); 1784 1785 // Add aria-disabled attribute to any disabled menu item 1786 items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); 1787 1788 // If the active item has been removed, blur the menu 1789 if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 1790 this.blur(); 1791 } 1792 }, 1793 1794 _itemRole: function() { 1795 return { 1796 menu: "menuitem", 1797 listbox: "option" 1798 }[ this.options.role ]; 1799 }, 1800 1801 _setOption: function( key, value ) { 1802 if ( key === "icons" ) { 1803 var icons = this.element.find( ".ui-menu-icon" ); 1804 this._removeClass( icons, null, this.options.icons.submenu ) 1805 ._addClass( icons, null, value.submenu ); 1806 } 1807 this._super( key, value ); 1808 }, 1809 1810 _setOptionDisabled: function( value ) { 1811 this._super( value ); 1812 1813 this.element.attr( "aria-disabled", String( value ) ); 1814 this._toggleClass( null, "ui-state-disabled", !!value ); 1815 }, 1816 1817 focus: function( event, item ) { 1818 var nested, focused, activeParent; 1819 this.blur( event, event && event.type === "focus" ); 1820 1821 this._scrollIntoView( item ); 1822 1823 this.active = item.first(); 1824 1825 focused = this.active.children( ".ui-menu-item-wrapper" ); 1826 this._addClass( focused, null, "ui-state-active" ); 1827 1828 // Only update aria-activedescendant if there's a role 1829 // otherwise we assume focus is managed elsewhere 1830 if ( this.options.role ) { 1831 this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); 1832 } 1833 1834 // Highlight active parent menu item, if any 1835 activeParent = this.active 1836 .parent() 1837 .closest( ".ui-menu-item" ) 1838 .children( ".ui-menu-item-wrapper" ); 1839 this._addClass( activeParent, null, "ui-state-active" ); 1840 1841 if ( event && event.type === "keydown" ) { 1842 this._close(); 1843 } else { 1844 this.timer = this._delay( function() { 1845 this._close(); 1846 }, this.delay ); 1847 } 1848 1849 nested = item.children( ".ui-menu" ); 1850 if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { 1851 this._startOpening( nested ); 1852 } 1853 this.activeMenu = item.parent(); 1854 1855 this._trigger( "focus", event, { item: item } ); 1856 }, 1857 1858 _scrollIntoView: function( item ) { 1859 var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; 1860 if ( this._hasScroll() ) { 1861 borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0; 1862 paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0; 1863 offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; 1864 scroll = this.activeMenu.scrollTop(); 1865 elementHeight = this.activeMenu.height(); 1866 itemHeight = item.outerHeight(); 1867 1868 if ( offset < 0 ) { 1869 this.activeMenu.scrollTop( scroll + offset ); 1870 } else if ( offset + itemHeight > elementHeight ) { 1871 this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); 1872 } 1873 } 1874 }, 1875 1876 blur: function( event, fromFocus ) { 1877 if ( !fromFocus ) { 1878 clearTimeout( this.timer ); 1879 } 1880 1881 if ( !this.active ) { 1882 return; 1883 } 1884 1885 this._removeClass( this.active.children( ".ui-menu-item-wrapper" ), 1886 null, "ui-state-active" ); 1887 1888 this._trigger( "blur", event, { item: this.active } ); 1889 this.active = null; 1890 }, 1891 1892 _startOpening: function( submenu ) { 1893 clearTimeout( this.timer ); 1894 1895 // Don't open if already open fixes a Firefox bug that caused a .5 pixel 1896 // shift in the submenu position when mousing over the caret icon 1897 if ( submenu.attr( "aria-hidden" ) !== "true" ) { 1898 return; 1899 } 1900 1901 this.timer = this._delay( function() { 1902 this._close(); 1903 this._open( submenu ); 1904 }, this.delay ); 1905 }, 1906 1907 _open: function( submenu ) { 1908 var position = $.extend( { 1909 of: this.active 1910 }, this.options.position ); 1911 1912 clearTimeout( this.timer ); 1913 this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) 1914 .hide() 1915 .attr( "aria-hidden", "true" ); 1916 1917 submenu 1918 .show() 1919 .removeAttr( "aria-hidden" ) 1920 .attr( "aria-expanded", "true" ) 1921 .position( position ); 1922 }, 1923 1924 collapseAll: function( event, all ) { 1925 clearTimeout( this.timer ); 1926 this.timer = this._delay( function() { 1927
vendor: 7,299 bytes, lines 1928-2200
1928 // If we were passed an event, look for the submenu that contains the event 1929 var currentMenu = all ? this.element : 1930 $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); 1931 1932 // If we found no valid submenu ancestor, use the main menu to close all 1933 // sub menus anyway 1934 if ( !currentMenu.length ) { 1935 currentMenu = this.element; 1936 } 1937 1938 this._close( currentMenu ); 1939 1940 this.blur( event ); 1941 1942 // Work around active item staying active after menu is blurred 1943 this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" ); 1944 1945 this.activeMenu = currentMenu; 1946 }, this.delay ); 1947 }, 1948 1949 // With no arguments, closes the currently active menu - if nothing is active 1950 // it closes all menus. If passed an argument, it will search for menus BELOW 1951 _close: function( startMenu ) { 1952 if ( !startMenu ) { 1953 startMenu = this.active ? this.active.parent() : this.element; 1954 } 1955 1956 startMenu.find( ".ui-menu" ) 1957 .hide() 1958 .attr( "aria-hidden", "true" ) 1959 .attr( "aria-expanded", "false" ); 1960 }, 1961 1962 _closeOnDocumentClick: function( event ) { 1963 return !$( event.target ).closest( ".ui-menu" ).length; 1964 }, 1965 1966 _isDivider: function( item ) { 1967 1968 // Match hyphen, em dash, en dash 1969 return !/[^\-\u2014\u2013\s]/.test( item.text() ); 1970 }, 1971 1972 collapse: function( event ) { 1973 var newItem = this.active && 1974 this.active.parent().closest( ".ui-menu-item", this.element ); 1975 if ( newItem && newItem.length ) { 1976 this._close(); 1977 this.focus( event, newItem ); 1978 } 1979 }, 1980 1981 expand: function( event ) { 1982 var newItem = this.active && 1983 this.active 1984 .children( ".ui-menu " ) 1985 .find( this.options.items ) 1986 .first(); 1987 1988 if ( newItem && newItem.length ) { 1989 this._open( newItem.parent() ); 1990 1991 // Delay so Firefox will not hide activedescendant change in expanding submenu from AT 1992 this._delay( function() { 1993 this.focus( event, newItem ); 1994 } ); 1995 } 1996 }, 1997 1998 next: function( event ) { 1999 this._move( "next", "first", event ); 2000 }, 2001 2002 previous: function( event ) { 2003 this._move( "prev", "last", event ); 2004 }, 2005 2006 isFirstItem: function() { 2007 return this.active && !this.active.prevAll( ".ui-menu-item" ).length; 2008 }, 2009 2010 isLastItem: function() { 2011 return this.active && !this.active.nextAll( ".ui-menu-item" ).length; 2012 }, 2013 2014 _move: function( direction, filter, event ) { 2015 var next; 2016 if ( this.active ) { 2017 if ( direction === "first" || direction === "last" ) { 2018 next = this.active 2019 [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) 2020 .eq( -1 ); 2021 } else { 2022 next = this.active 2023 [ direction + "All" ]( ".ui-menu-item" ) 2024 .eq( 0 ); 2025 } 2026 } 2027 if ( !next || !next.length || !this.active ) { 2028 next = this.activeMenu.find( this.options.items )[ filter ](); 2029 } 2030 2031 this.focus( event, next ); 2032 }, 2033 2034 nextPage: function( event ) { 2035 var item, base, height; 2036 2037 if ( !this.active ) { 2038 this.next( event ); 2039 return; 2040 } 2041 if ( this.isLastItem() ) { 2042 return; 2043 } 2044 if ( this._hasScroll() ) { 2045 base = this.active.offset().top; 2046 height = this.element.height(); 2047 this.active.nextAll( ".ui-menu-item" ).each( function() { 2048 item = $( this ); 2049 return item.offset().top - base - height < 0; 2050 } ); 2051 2052 this.focus( event, item ); 2053 } else { 2054 this.focus( event, this.activeMenu.find( this.options.items ) 2055 [ !this.active ? "first" : "last" ]() ); 2056 } 2057 }, 2058 2059 previousPage: function( event ) { 2060 var item, base, height; 2061 if ( !this.active ) { 2062 this.next( event ); 2063 return; 2064 } 2065 if ( this.isFirstItem() ) { 2066 return; 2067 } 2068 if ( this._hasScroll() ) { 2069 base = this.active.offset().top; 2070 height = this.element.height(); 2071 this.active.prevAll( ".ui-menu-item" ).each( function() { 2072 item = $( this ); 2073 return item.offset().top - base + height > 0; 2074 } ); 2075 2076 this.focus( event, item ); 2077 } else { 2078 this.focus( event, this.activeMenu.find( this.options.items ).first() ); 2079 } 2080 }, 2081 2082 _hasScroll: function() { 2083 return this.element.outerHeight() < this.element.prop( "scrollHeight" ); 2084 }, 2085 2086 select: function( event ) { 2087 2088 // TODO: It should never be possible to not have an active item at this 2089 // point, but the tests don't trigger mouseenter before click. 2090 this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); 2091 var ui = { item: this.active }; 2092 if ( !this.active.has( ".ui-menu" ).length ) { 2093 this.collapseAll( event, true ); 2094 } 2095 this._trigger( "select", event, ui ); 2096 }, 2097 2098 _filterMenuItems: function( character ) { 2099 var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), 2100 regex = new RegExp( "^" + escapedCharacter, "i" ); 2101 2102 return this.activeMenu 2103 .find( this.options.items ) 2104 2105 // Only match on items, not dividers or other content (#10571) 2106 .filter( ".ui-menu-item" ) 2107 .filter( function() { 2108 return regex.test( 2109 $.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) ); 2110 } ); 2111 } 2112} ); 2113 2114 2115/*! 2116 * jQuery UI Autocomplete 1.12.1 2117 * http://jqueryui.com 2118 * 2119 * Copyright jQuery Foundation and other contributors 2120 * Released under the MIT license. 2121 * http://jquery.org/license 2122 */ 2123 2124//>>label: Autocomplete 2125//>>group: Widgets 2126//>>description: Lists suggested words as the user is typing. 2127//>>docs: http://api.jqueryui.com/autocomplete/ 2128//>>demos: http://jqueryui.com/autocomplete/ 2129//>>css.structure: ../../themes/base/core.css 2130//>>css.structure: ../../themes/base/autocomplete.css 2131//>>css.theme: ../../themes/base/theme.css 2132 2133 2134 2135$.widget( "ui.autocomplete", { 2136 version: "1.12.1", 2137 defaultElement: "<input>", 2138 options: { 2139 appendTo: null, 2140 autoFocus: false, 2141 delay: 300, 2142 minLength: 1, 2143 position: { 2144 my: "left top", 2145 at: "left bottom", 2146 collision: "none" 2147 }, 2148 source: null, 2149 2150 // Callbacks 2151 change: null, 2152 close: null, 2153 focus: null, 2154 open: null, 2155 response: null, 2156 search: null, 2157 select: null 2158 }, 2159 2160 requestIndex: 0, 2161 pending: 0, 2162 2163 _create: function() { 2164 2165 // Some browsers only repeat keydown events, not keypress events, 2166 // so we use the suppressKeyPress flag to determine if we've already 2167 // handled the keydown event. #7269 2168 // Unfortunately the code for & in keypress is the same as the up arrow, 2169 // so we use the suppressKeyPressRepeat flag to avoid handling keypress 2170 // events when we know the keydown event was used to modify the 2171 // search term. #7799 2172 var suppressKeyPress, suppressKeyPressRepeat, suppressInput, 2173 nodeName = this.element[ 0 ].nodeName.toLowerCase(), 2174 isTextarea = nodeName === "textarea", 2175 isInput = nodeName === "input"; 2176 2177 // Textareas are always multi-line 2178 // Inputs are always single-line, even if inside a contentEditable element 2179 // IE also treats inputs as contentEditable 2180 // All other element types are determined by whether or not they're contentEditable 2181 this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element ); 2182 2183 this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; 2184 this.isNewMenu = true; 2185 2186 this._addClass( "ui-autocomplete-input" ); 2187 this.element.attr( "autocomplete", "off" ); 2188 2189 this._on( this.element, { 2190 // writing custom key events for ada compliance 2191 /* 2192 keydown: function (event) { 2193 if ( this.element.prop( "readOnly" ) ) { 2194 suppressKeyPress = true; 2195 suppressInput = true; 2196 suppressKeyPressRepeat = true; 2197 return; 2198 } 2199 2200 suppressKeyPress = false;
vendor: 2,881 bytes, lines 2201-2313
2201 suppressInput = false; 2202 suppressKeyPressRepeat = false; 2203 var keyCode = $.ui.keyCode; 2204 switch ( event.keyCode ) { 2205 case keyCode.PAGE_UP: 2206 suppressKeyPress = true; 2207 this._move( "previousPage", event ); 2208 break; 2209 case keyCode.PAGE_DOWN: 2210 suppressKeyPress = true; 2211 this._move( "nextPage", event ); 2212 break; 2213 case keyCode.UP: 2214 suppressKeyPress = true; 2215 this._keyEvent( "previous", event ); 2216 break; 2217 case keyCode.DOWN: 2218 suppressKeyPress = true; 2219 this._keyEvent( "next", event ); 2220 break; 2221 case keyCode.ENTER: 2222 2223 // when menu is open and has focus 2224 if ( this.menu.active ) { 2225 2226 // #6055 - Opera still allows the keypress to occur 2227 // which causes forms to submit 2228 suppressKeyPress = true; 2229 event.preventDefault(); 2230 this.menu.select( event ); 2231 } 2232 break; 2233 case keyCode.TAB: 2234 if ( this.menu.active ) { 2235 this.menu.select( event ); 2236 } 2237 break; 2238 case keyCode.ESCAPE: 2239 if ( this.menu.element.is( ":visible" ) ) { 2240 if ( !this.isMultiLine ) { 2241 this._value( this.term ); 2242 } 2243 this.close( event ); 2244 2245 // Different browsers have different default behavior for escape 2246 // Single press can mean undo or clear 2247 // Double press in IE means clear the whole form 2248 event.preventDefault(); 2249 } 2250 break; 2251 default: 2252 suppressKeyPressRepeat = true; 2253 2254 // search timeout should be triggered before the input value is changed 2255 this._searchTimeout( event ); 2256 break; 2257 } 2258 }, 2259 keypress: function( event ) { 2260 if ( suppressKeyPress ) { 2261 suppressKeyPress = false; 2262 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 2263 event.preventDefault(); 2264 } 2265 return; 2266 } 2267 if ( suppressKeyPressRepeat ) { 2268 return; 2269 } 2270 2271 // Replicate some key handlers to allow them to repeat in Firefox and Opera 2272 var keyCode = $.ui.keyCode; 2273 switch ( event.keyCode ) { 2274 case keyCode.PAGE_UP: 2275 this._move( "previousPage", event ); 2276 break; 2277 case keyCode.PAGE_DOWN: 2278 this._move( "nextPage", event ); 2279 break; 2280 case keyCode.UP: 2281 this._keyEvent( "previous", event ); 2282 break; 2283 case keyCode.DOWN: 2284 this._keyEvent( "next", event ); 2285 break; 2286 } 2287 }, 2288 */ 2289 input: function( event ) { 2290 if ( suppressInput ) { 2291 suppressInput = false; 2292 event.preventDefault(); 2293 return; 2294 } 2295 this._searchTimeout( event ); 2296 }, 2297 focus: function() { 2298 this.selectedItem = null; 2299 this.previous = this._value(); 2300 }//, 2301 // writing custom key events for ada compliance 2302 /* 2303 blur: function (event) { 2304 if ( this.cancelBlur ) { 2305 delete this.cancelBlur; 2306 return; 2307 } 2308 2309 clearTimeout( this.searching ); 2310 this.close( event ); 2311 this._change( event ); 2312 } 2313 */
vendor: 11,726 bytes, lines 2313-2761
2313 2314 } ); 2315 2316 this._initSource(); 2317 this.menu = $( "<ul>" ) 2318 .appendTo( this._appendTo() ) 2319 .menu( { 2320 2321 // disable ARIA support, the live region takes care of that 2322 role: null 2323 } ) 2324 .hide() 2325 .menu( "instance" ); 2326 2327 this._addClass( this.menu.element, "ui-autocomplete", "ui-front" ); 2328 this._on( this.menu.element, { 2329 mousedown: function( event ) { 2330 2331 // prevent moving focus out of the text field 2332 event.preventDefault(); 2333 2334 // IE doesn't prevent moving focus even with event.preventDefault() 2335 // so we set a flag to know when we should ignore the blur event 2336 this.cancelBlur = true; 2337 this._delay( function() { 2338 delete this.cancelBlur; 2339 2340 // Support: IE 8 only 2341 // Right clicking a menu item or selecting text from the menu items will 2342 // result in focus moving out of the input. However, we've already received 2343 // and ignored the blur event because of the cancelBlur flag set above. So 2344 // we restore focus to ensure that the menu closes properly based on the user's 2345 // next actions. 2346 if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { 2347 this.element.trigger( "focus" ); 2348 } 2349 } ); 2350 }, 2351 menufocus: function( event, ui ) { 2352 var label, item; 2353 2354 // support: Firefox 2355 // Prevent accidental activation of menu items in Firefox (#7024 #9118) 2356 if ( this.isNewMenu ) { 2357 this.isNewMenu = false; 2358 if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { 2359 this.menu.blur(); 2360 2361 this.document.one( "mousemove", function() { 2362 $( event.target ).trigger( event.originalEvent ); 2363 } ); 2364 2365 return; 2366 } 2367 } 2368 2369 item = ui.item.data( "ui-autocomplete-item" ); 2370 if ( false !== this._trigger( "focus", event, { item: item } ) ) { 2371 2372 // use value to match what will end up in the input, if it was a key event 2373 if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { 2374 this._value( item.value ); 2375 } 2376 } 2377 2378 // Announce the value in the liveRegion 2379 label = ui.item.attr( "aria-label" ) || item.value; 2380 if ( label && $.trim( label ).length ) { 2381 this.liveRegion.children().hide(); 2382 $( "<div>" ).text( label ).appendTo( this.liveRegion ); 2383 } 2384 }, 2385 menuselect: function( event, ui ) { 2386 var item = ui.item.data( "ui-autocomplete-item" ), 2387 previous = this.previous; 2388 2389 // Only trigger when focus was lost (click on menu) 2390 if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { 2391 this.element.trigger( "focus" ); 2392 this.previous = previous; 2393 2394 // #6109 - IE triggers two focus events and the second 2395 // is asynchronous, so we need to reset the previous 2396 // term synchronously and asynchronously :-( 2397 this._delay( function() { 2398 this.previous = previous; 2399 this.selectedItem = item; 2400 } ); 2401 } 2402 2403 if ( false !== this._trigger( "select", event, { item: item } ) ) { 2404 this._value( item.value ); 2405 } 2406 2407 // reset the term after the select event 2408 // this allows custom select handling to work properly 2409 this.term = this._value(); 2410 2411 this.close( event ); 2412 this.selectedItem = item; 2413 } 2414 } ); 2415 2416 this.liveRegion = $( "<div>", { 2417 role: "status", 2418 "aria-live": "assertive", 2419 "aria-relevant": "additions" 2420 } ) 2421 .appendTo( this.document[ 0 ].body ); 2422 2423 this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" ); 2424 2425 // Turning off autocomplete prevents the browser from remembering the 2426 // value when navigating through history, so we re-enable autocomplete 2427 // if the page is unloaded before the widget is destroyed. #7790 2428 this._on( this.window, { 2429 beforeunload: function() { 2430 this.element.removeAttr( "autocomplete" ); 2431 } 2432 } ); 2433 }, 2434 2435 _destroy: function() { 2436 clearTimeout( this.searching ); 2437 this.element.removeAttr( "autocomplete" ); 2438 this.menu.element.remove(); 2439 this.liveRegion.remove(); 2440 }, 2441 2442 _setOption: function( key, value ) { 2443 this._super( key, value ); 2444 if ( key === "source" ) { 2445 this._initSource(); 2446 } 2447 if ( key === "appendTo" ) { 2448 this.menu.element.appendTo( this._appendTo() ); 2449 } 2450 if ( key === "disabled" && value && this.xhr ) { 2451 this.xhr.abort(); 2452 } 2453 }, 2454 2455 _isEventTargetInWidget: function( event ) { 2456 var menuElement = this.menu.element[ 0 ]; 2457 2458 return event.target === this.element[ 0 ] || 2459 event.target === menuElement || 2460 $.contains( menuElement, event.target ); 2461 }, 2462 2463 _closeOnClickOutside: function( event ) { 2464 if ( !this._isEventTargetInWidget( event ) ) { 2465 this.close(); 2466 } 2467 }, 2468 2469 _appendTo: function() { 2470 var element = this.options.appendTo; 2471 2472 if ( element ) { 2473 element = element.jquery || element.nodeType ? 2474 $( element ) : 2475 this.document.find( element ).eq( 0 ); 2476 } 2477 2478 if ( !element || !element[ 0 ] ) { 2479 element = this.element.closest( ".ui-front, dialog" ); 2480 } 2481 2482 if ( !element.length ) { 2483 element = this.document[ 0 ].body; 2484 } 2485 2486 return element; 2487 }, 2488 2489 _initSource: function() { 2490 var array, url, 2491 that = this; 2492 if ( $.isArray( this.options.source ) ) { 2493 array = this.options.source; 2494 this.source = function( request, response ) { 2495 response( $.ui.autocomplete.filter( array, request.term ) ); 2496 }; 2497 } else if ( typeof this.options.source === "string" ) { 2498 url = this.options.source; 2499 this.source = function( request, response ) { 2500 if ( that.xhr ) { 2501 that.xhr.abort(); 2502 } 2503 that.xhr = $.ajax( { 2504 url: url, 2505 data: request, 2506 dataType: "json", 2507 success: function( data ) { 2508 response( data ); 2509 }, 2510 error: function() { 2511 response( [] ); 2512 } 2513 } ); 2514 }; 2515 } else { 2516 this.source = this.options.source; 2517 } 2518 }, 2519 2520 _searchTimeout: function( event ) { 2521 clearTimeout( this.searching ); 2522 this.searching = this._delay( function() { 2523 2524 // Search if the value has changed, or if the user retypes the same value (see #7434) 2525 var equalValues = this.term === this._value(), 2526 menuVisible = this.menu.element.is( ":visible" ), 2527 modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; 2528 2529 if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) { 2530 this.selectedItem = null; 2531 this.search( null, event ); 2532 } 2533 }, this.options.delay ); 2534 }, 2535 2536 search: function( value, event ) { 2537 value = value != null ? value : this._value(); 2538 2539 // Always save the actual value, not the one passed as an argument 2540 this.term = this._value(); 2541 2542 if ( value.length < this.options.minLength ) { 2543 return this.close( event ); 2544 } 2545 2546 if ( this._trigger( "search", event ) === false ) { 2547 return; 2548 } 2549 2550 return this._search( value ); 2551 }, 2552 2553 _search: function( value ) { 2554 this.pending++; 2555 this._addClass( "ui-autocomplete-loading" ); 2556 this.cancelSearch = false; 2557 2558 this.source( { term: value }, this._response() ); 2559 }, 2560 2561 _response: function() { 2562 var index = ++this.requestIndex; 2563 2564 return $.proxy( function( content ) { 2565 if ( index === this.requestIndex ) { 2566 this.__response( content ); 2567 } 2568 2569 this.pending--; 2570 if ( !this.pending ) { 2571 this._removeClass( "ui-autocomplete-loading" ); 2572 } 2573 }, this ); 2574 }, 2575 2576 __response: function( content ) { 2577 if ( content ) { 2578 content = this._normalize( content ); 2579 } 2580 this._trigger( "response", null, { content: content } ); 2581 if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { 2582 this._suggest( content ); 2583 this._trigger( "open" ); 2584 } else { 2585 2586 // use ._close() instead of .close() so we don't cancel future searches 2587 this._close(); 2588 } 2589 }, 2590 2591 close: function( event ) { 2592 this.cancelSearch = true; 2593 this._close( event ); 2594 }, 2595 2596 _close: function( event ) { 2597 2598 // Remove the handler that closes the menu on outside clicks 2599 this._off( this.document, "mousedown" ); 2600 2601 if ( this.menu.element.is( ":visible" ) ) { 2602 this.menu.element.hide(); 2603 this.menu.blur(); 2604 this.isNewMenu = true; 2605 this._trigger( "close", event ); 2606 } 2607 }, 2608 2609 _change: function( event ) { 2610 if ( this.previous !== this._value() ) { 2611 this._trigger( "change", event, { item: this.selectedItem } ); 2612 } 2613 }, 2614 2615 _normalize: function( items ) { 2616 2617 // assume all items have the right format when the first item is complete 2618 if ( items.length && items[ 0 ].label && items[ 0 ].value ) { 2619 return items; 2620 } 2621 return $.map( items, function( item ) { 2622 if ( typeof item === "string" ) { 2623 return { 2624 label: item, 2625 value: item 2626 }; 2627 } 2628 return $.extend( {}, item, { 2629 label: item.label || item.value, 2630 value: item.value || item.label 2631 } ); 2632 } ); 2633 }, 2634 2635 _suggest: function( items ) { 2636 var ul = this.menu.element.empty(); 2637 this._renderMenu( ul, items ); 2638 this.isNewMenu = true; 2639 this.menu.refresh(); 2640 2641 // Size and position menu 2642 ul.show(); 2643 this._resizeMenu(); 2644 ul.position( $.extend( { 2645 of: this.element 2646 }, this.options.position ) ); 2647 2648 if ( this.options.autoFocus ) { 2649 this.menu.next(); 2650 } 2651 2652 // Listen for interactions outside of the widget (#6642) 2653 this._on( this.document, { 2654 mousedown: "_closeOnClickOutside" 2655 } ); 2656 }, 2657 2658 _resizeMenu: function() { 2659 var ul = this.menu.element; 2660 ul.outerWidth( Math.max( 2661 2662 // Firefox wraps long text (possibly a rounding bug) 2663 // so we add 1px to avoid the wrapping (#7513) 2664 ul.width( "" ).outerWidth() + 1, 2665 this.element.outerWidth() 2666 ) ); 2667 }, 2668 2669 _renderMenu: function( ul, items ) { 2670 var that = this; 2671 $.each( items, function( index, item ) { 2672 that._renderItemData( ul, item ); 2673 } ); 2674 }, 2675 2676 _renderItemData: function( ul, item ) { 2677 return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); 2678 }, 2679 2680 _renderItem: function( ul, item ) { 2681 return $( "<li>" ) 2682 .append( $( "<div>" ).text( item.label ) ) 2683 .appendTo( ul ); 2684 }, 2685 2686 _move: function( direction, event ) { 2687 if ( !this.menu.element.is( ":visible" ) ) { 2688 this.search( null, event ); 2689 return; 2690 } 2691 if ( this.menu.isFirstItem() && /^previous/.test( direction ) || 2692 this.menu.isLastItem() && /^next/.test( direction ) ) { 2693 2694 if ( !this.isMultiLine ) { 2695 this._value( this.term ); 2696 } 2697 2698 this.menu.blur(); 2699 return; 2700 } 2701 this.menu[ direction ]( event ); 2702 }, 2703 2704 widget: function() { 2705 return this.menu.element; 2706 }, 2707 2708 _value: function() { 2709 return this.valueMethod.apply( this.element, arguments ); 2710 }, 2711 2712 _keyEvent: function( keyEvent, event ) { 2713 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 2714 this._move( keyEvent, event ); 2715 2716 // Prevents moving cursor to beginning/end of the text field in some browsers 2717 event.preventDefault(); 2718 } 2719 }, 2720 2721 // Support: Chrome <=50 2722 // We should be able to just use this.element.prop( "isContentEditable" ) 2723 // but hidden elements always report false in Chrome. 2724 // https://code.google.com/p/chromium/issues/detail?id=313082 2725 _isContentEditable: function( element ) { 2726 if ( !element.length ) { 2727 return false; 2728 } 2729 2730 var editable = element.prop( "contentEditable" ); 2731 2732 if ( editable === "inherit" ) { 2733 return this._isContentEditable( element.parent() ); 2734 } 2735 2736 return editable === "true"; 2737 } 2738} ); 2739 2740$.extend( $.ui.autocomplete, { 2741 escapeRegex: function( value ) { 2742 return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); 2743 }, 2744 filter: function( array, term ) { 2745 var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); 2746 return $.grep( array, function( value ) { 2747 return matcher.test( value.label || value.value || value ); 2748 } ); 2749 } 2750} ); 2751 2752// Live region extension, adding a `messages` option 2753// NOTE: This is an experimental API. We are still investigating 2754// a full solution for string manipulation and internationalization. 2755$.widget( "ui.autocomplete", $.ui.autocomplete, { 2756 options: { 2757 messages: { 2758 noResults: "No search results.", 2759 results: function( amount ) { 2760 return amount + ( amount > 1 ? " results are" : " result is" ) + 2761 " available
vendor: 4,090 bytes, lines 2761-2914
2761."; 2762 } 2763 } 2764 }, 2765 2766 __response: function( content ) { 2767 var message; 2768 this._superApply( arguments ); 2769 if ( this.options.disabled || this.cancelSearch ) { 2770 return; 2771 } 2772 if ( content && content.length ) { 2773 message = this.options.messages.results( content.length ); 2774 } else { 2775 message = this.options.messages.noResults; 2776 } 2777 this.liveRegion.children().hide(); 2778 $( "<div>" ).text( message ).appendTo( this.liveRegion ); 2779 } 2780} ); 2781 2782var widgetsAutocomplete = $.ui.autocomplete; 2783 2784 2785 2786 2787// This file is deprecated 2788var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 2789 2790/*! 2791 * jQuery UI Mouse 1.12.1 2792 * http://jqueryui.com 2793 * 2794 * Copyright jQuery Foundation and other contributors 2795 * Released under the MIT license. 2796 * http://jquery.org/license 2797 */ 2798 2799//>>label: Mouse 2800//>>group: Widgets 2801//>>description: Abstracts mouse-based interactions to assist in creating certain widgets. 2802//>>docs: http://api.jqueryui.com/mouse/ 2803 2804 2805 2806var mouseHandled = false; 2807$( document ).on( "mouseup", function() { 2808 mouseHandled = false; 2809} ); 2810 2811var widgetsMouse = $.widget( "ui.mouse", { 2812 version: "1.12.1", 2813 options: { 2814 cancel: "input, textarea, button, select, option", 2815 distance: 1, 2816 delay: 0 2817 }, 2818 _mouseInit: function() { 2819 var that = this; 2820 2821 this.element 2822 .on( "mousedown." + this.widgetName, function( event ) { 2823 return that._mouseDown( event ); 2824 } ) 2825 .on( "click." + this.widgetName, function( event ) { 2826 if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) { 2827 $.removeData( event.target, that.widgetName + ".preventClickEvent" ); 2828 event.stopImmediatePropagation(); 2829 return false; 2830 } 2831 } ); 2832 2833 this.started = false; 2834 }, 2835 2836 // TODO: make sure destroying one instance of mouse doesn't mess with 2837 // other instances of mouse 2838 _mouseDestroy: function() { 2839 this.element.off( "." + this.widgetName ); 2840 if ( this._mouseMoveDelegate ) { 2841 this.document 2842 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 2843 .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 2844 } 2845 }, 2846 2847 _mouseDown: function( event ) { 2848 2849 // don't let more than one widget handle mouseStart 2850 if ( mouseHandled ) { 2851 return; 2852 } 2853 2854 this._mouseMoved = false; 2855 2856 // We may have missed mouseup (out of window) 2857 ( this._mouseStarted && this._mouseUp( event ) ); 2858 2859 this._mouseDownEvent = event; 2860 2861 var that = this, 2862 btnIsLeft = ( event.which === 1 ), 2863 2864 // event.target.nodeName works around a bug in IE 8 with 2865 // disabled inputs (#7620) 2866 elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ? 2867 $( event.target ).closest( this.options.cancel ).length : false ); 2868 if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) { 2869 return true; 2870 } 2871 2872 this.mouseDelayMet = !this.options.delay; 2873 if ( !this.mouseDelayMet ) { 2874 this._mouseDelayTimer = setTimeout( function() { 2875 that.mouseDelayMet = true; 2876 }, this.options.delay ); 2877 } 2878 2879 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 2880 this._mouseStarted = ( this._mouseStart( event ) !== false ); 2881 if ( !this._mouseStarted ) { 2882 event.preventDefault(); 2883 return true; 2884 } 2885 } 2886 2887 // Click event may never have fired (Gecko & Opera) 2888 if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) { 2889 $.removeData( event.target, this.widgetName + ".preventClickEvent" ); 2890 } 2891 2892 // These delegates are required to keep context 2893 this._mouseMoveDelegate = function( event ) { 2894 return that._mouseMove( event ); 2895 }; 2896 this._mouseUpDelegate = function( event ) { 2897 return that._mouseUp( event ); 2898 }; 2899 2900 this.document 2901 .on( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 2902 .on( "mouseup." + this.widgetName, this._mouseUpDelegate ); 2903 2904 event.preventDefault(); 2905 2906 mouseHandled = true; 2907 return true; 2908 }, 2909 2910 _mouseMove: function( event ) { 2911 2912 // Only check for mouseups outside the document if you've moved inside the document 2913 // at least once. This prevents the firing of mouseup in the case of IE<9, which will 2914 // fire a mousemove event if content is placed under the cursor. See #7778
vendor: 4,979 bytes, lines 2915-3105
2915 // Support: IE <9 2916 if ( this._mouseMoved ) { 2917 2918 // IE mouseup check - mouseup happened when mouse was out of window 2919 if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && 2920 !event.button ) { 2921 return this._mouseUp( event ); 2922 2923 // Iframe mouseup check - mouseup occurred in another document 2924 } else if ( !event.which ) { 2925 2926 // Support: Safari <=8 - 9 2927 // Safari sets which to 0 if you press any of the following keys 2928 // during a drag (#14461) 2929 if ( event.originalEvent.altKey || event.originalEvent.ctrlKey || 2930 event.originalEvent.metaKey || event.originalEvent.shiftKey ) { 2931 this.ignoreMissingWhich = true; 2932 } else if ( !this.ignoreMissingWhich ) { 2933 return this._mouseUp( event ); 2934 } 2935 } 2936 } 2937 2938 if ( event.which || event.button ) { 2939 this._mouseMoved = true; 2940 } 2941 2942 if ( this._mouseStarted ) { 2943 this._mouseDrag( event ); 2944 return event.preventDefault(); 2945 } 2946 2947 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 2948 this._mouseStarted = 2949 ( this._mouseStart( this._mouseDownEvent, event ) !== false ); 2950 ( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) ); 2951 } 2952 2953 return !this._mouseStarted; 2954 }, 2955 2956 _mouseUp: function( event ) { 2957 this.document 2958 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 2959 .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 2960 2961 if ( this._mouseStarted ) { 2962 this._mouseStarted = false; 2963 2964 if ( event.target === this._mouseDownEvent.target ) { 2965 $.data( event.target, this.widgetName + ".preventClickEvent", true ); 2966 } 2967 2968 this._mouseStop( event ); 2969 } 2970 2971 if ( this._mouseDelayTimer ) { 2972 clearTimeout( this._mouseDelayTimer ); 2973 delete this._mouseDelayTimer; 2974 } 2975 2976 this.ignoreMissingWhich = false; 2977 mouseHandled = false; 2978 event.preventDefault(); 2979 }, 2980 2981 _mouseDistanceMet: function( event ) { 2982 return ( Math.max( 2983 Math.abs( this._mouseDownEvent.pageX - event.pageX ), 2984 Math.abs( this._mouseDownEvent.pageY - event.pageY ) 2985 ) >= this.options.distance 2986 ); 2987 }, 2988 2989 _mouseDelayMet: function( /* event */ ) { 2990 return this.mouseDelayMet; 2991 }, 2992 2993 // These are placeholder methods, to be overriden by extending plugin 2994 _mouseStart: function( /* event */ ) {}, 2995 _mouseDrag: function( /* event */ ) {}, 2996 _mouseStop: function( /* event */ ) {}, 2997 _mouseCapture: function( /* event */ ) { return true; } 2998} ); 2999 3000 3001/*! 3002 * jQuery UI Slider 1.12.1 3003 * http://jqueryui.com 3004 * 3005 * Copyright jQuery Foundation and other contributors 3006 * Released under the MIT license. 3007 * http://jquery.org/license 3008 */ 3009 3010//>>label: Slider 3011//>>group: Widgets 3012//>>description: Displays a flexible slider with ranges and accessibility via keyboard. 3013//>>docs: http://api.jqueryui.com/slider/ 3014//>>demos: http://jqueryui.com/slider/ 3015//>>css.structure: ../../themes/base/core.css 3016//>>css.structure: ../../themes/base/slider.css 3017//>>css.theme: ../../themes/base/theme.css 3018 3019 3020 3021var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { 3022 version: "1.12.1", 3023 widgetEventPrefix: "slide", 3024 3025 options: { 3026 animate: false, 3027 classes: { 3028 "ui-slider": "ui-corner-all", 3029 "ui-slider-handle": "ui-corner-all", 3030 3031 // Note: ui-widget-header isn't the most fittingly semantic framework class for this 3032 // element, but worked best visually with a variety of themes 3033 "ui-slider-range": "ui-corner-all ui-widget-header" 3034 }, 3035 distance: 0, 3036 max: 100, 3037 min: 0, 3038 orientation: "horizontal", 3039 range: false, 3040 step: 1, 3041 value: 0, 3042 values: null, 3043 3044 // Callbacks 3045 change: null, 3046 slide: null, 3047 start: null, 3048 stop: null 3049 }, 3050 3051 // Number of pages in a slider 3052 // (how many times can you page up/down to go through the whole range) 3053 numPages: 5, 3054 3055 _create: function() { 3056 this._keySliding = false; 3057 this._mouseSliding = false; 3058 this._animateOff = true; 3059 this._handleIndex = null; 3060 this._detectOrientation(); 3061 this._mouseInit(); 3062 this._calculateNewMax(); 3063 3064 this._addClass( "ui-slider ui-slider-" + this.orientation, 3065 "ui-widget ui-widget-content" ); 3066 3067 this._refresh(); 3068 3069 this._animateOff = false; 3070 }, 3071 3072 _refresh: function() { 3073 this._createRange(); 3074 this._createHandles(); 3075 this._setupEvents(); 3076 this._refreshValue(); 3077 }, 3078 3079 _createHandles: function() { 3080 var i, handleCount, 3081 options = this.options, 3082 existingHandles = this.element.find( ".ui-slider-handle" ), 3083 handle = "<span></span>", 3084 handles = []; 3085 3086 handleCount = ( options.values && options.values.length ) || 1; 3087 3088 if ( existingHandles.length > handleCount ) { 3089 existingHandles.slice( handleCount ).remove(); 3090 existingHandles = existingHandles.slice( 0, handleCount ); 3091 } 3092 3093 for ( i = existingHandles.length; i < handleCount; i++ ) { 3094 handles.push( handle ); 3095 } 3096 3097 this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); 3098 3099 this._addClass( this.handles, "ui-slider-handle", "ui-state-default" ); 3100 3101 this.handle = this.handles.eq( 0 ); 3102 3103 this.handles.each( function( i ) { 3104 $(this) 3105 .data("ui-slider-handle-index", i
vendor: 16,640 bytes, lines 3105-3734
3105); 3106 } ); 3107 }, 3108 3109 _createRange: function() { 3110 var options = this.options; 3111 3112 if ( options.range ) { 3113 if ( options.range === true ) { 3114 if ( !options.values ) { 3115 options.values = [ this._valueMin(), this._valueMin() ]; 3116 } else if ( options.values.length && options.values.length !== 2 ) { 3117 options.values = [ options.values[ 0 ], options.values[ 0 ] ]; 3118 } else if ( $.isArray( options.values ) ) { 3119 options.values = options.values.slice( 0 ); 3120 } 3121 } 3122 3123 if ( !this.range || !this.range.length ) { 3124 this.range = $( "<div>" ) 3125 .appendTo( this.element ); 3126 3127 this._addClass( this.range, "ui-slider-range" ); 3128 } else { 3129 this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" ); 3130 3131 // Handle range switching from true to min/max 3132 this.range.css( { 3133 "left": "", 3134 "bottom": "" 3135 } ); 3136 } 3137 if ( options.range === "min" || options.range === "max" ) { 3138 this._addClass( this.range, "ui-slider-range-" + options.range ); 3139 } 3140 } else { 3141 if ( this.range ) { 3142 this.range.remove(); 3143 } 3144 this.range = null; 3145 } 3146 }, 3147 3148 _setupEvents: function() { 3149 this._off( this.handles ); 3150 this._on( this.handles, this._handleEvents ); 3151 this._hoverable( this.handles ); 3152 this._focusable( this.handles ); 3153 }, 3154 3155 _destroy: function() { 3156 this.handles.remove(); 3157 if ( this.range ) { 3158 this.range.remove(); 3159 } 3160 3161 this._mouseDestroy(); 3162 }, 3163 3164 _mouseCapture: function( event ) { 3165 var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, 3166 that = this, 3167 o = this.options; 3168 3169 if ( o.disabled ) { 3170 return false; 3171 } 3172 3173 this.elementSize = { 3174 width: this.element.outerWidth(), 3175 height: this.element.outerHeight() 3176 }; 3177 this.elementOffset = this.element.offset(); 3178 3179 position = { x: event.pageX, y: event.pageY }; 3180 normValue = this._normValueFromMouse( position ); 3181 distance = this._valueMax() - this._valueMin() + 1; 3182 this.handles.each( function( i ) { 3183 var thisDistance = Math.abs( normValue - that.values( i ) ); 3184 if ( ( distance > thisDistance ) || 3185 ( distance === thisDistance && 3186 ( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) { 3187 distance = thisDistance; 3188 closestHandle = $( this ); 3189 index = i; 3190 } 3191 } ); 3192 3193 allowed = this._start( event, index ); 3194 if ( allowed === false ) { 3195 return false; 3196 } 3197 this._mouseSliding = true; 3198 3199 this._handleIndex = index; 3200 3201 this._addClass( closestHandle, null, "ui-state-active" ); 3202 closestHandle.trigger( "focus" ); 3203 3204 offset = closestHandle.offset(); 3205 mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); 3206 this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { 3207 left: event.pageX - offset.left - ( closestHandle.width() / 2 ), 3208 top: event.pageY - offset.top - 3209 ( closestHandle.height() / 2 ) - 3210 ( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) - 3211 ( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) + 3212 ( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 ) 3213 }; 3214 3215 if ( !this.handles.hasClass( "ui-state-hover" ) ) { 3216 this._slide( event, index, normValue ); 3217 } 3218 this._animateOff = true; 3219 return true; 3220 }, 3221 3222 _mouseStart: function() { 3223 return true; 3224 }, 3225 3226 _mouseDrag: function( event ) { 3227 var position = { x: event.pageX, y: event.pageY }, 3228 normValue = this._normValueFromMouse( position ); 3229 3230 this._slide( event, this._handleIndex, normValue ); 3231 3232 return false; 3233 }, 3234 3235 _mouseStop: function( event ) { 3236 this._removeClass( this.handles, null, "ui-state-active" ); 3237 this._mouseSliding = false; 3238 3239 this._stop( event, this._handleIndex ); 3240 this._change( event, this._handleIndex ); 3241 3242 this._handleIndex = null; 3243 this._clickOffset = null; 3244 this._animateOff = false; 3245 3246 return false; 3247 }, 3248 3249 _detectOrientation: function() { 3250 this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; 3251 }, 3252 3253 _normValueFromMouse: function( position ) { 3254 var pixelTotal, 3255 pixelMouse, 3256 percentMouse, 3257 valueTotal, 3258 valueMouse; 3259 3260 if ( this.orientation === "horizontal" ) { 3261 pixelTotal = this.elementSize.width; 3262 pixelMouse = position.x - this.elementOffset.left - 3263 ( this._clickOffset ? this._clickOffset.left : 0 ); 3264 } else { 3265 pixelTotal = this.elementSize.height; 3266 pixelMouse = position.y - this.elementOffset.top - 3267 ( this._clickOffset ? this._clickOffset.top : 0 ); 3268 } 3269 3270 percentMouse = ( pixelMouse / pixelTotal ); 3271 if ( percentMouse > 1 ) { 3272 percentMouse = 1; 3273 } 3274 if ( percentMouse < 0 ) { 3275 percentMouse = 0; 3276 } 3277 if ( this.orientation === "vertical" ) { 3278 percentMouse = 1 - percentMouse; 3279 } 3280 3281 valueTotal = this._valueMax() - this._valueMin(); 3282 valueMouse = this._valueMin() + percentMouse * valueTotal; 3283 3284 return this._trimAlignValue( valueMouse ); 3285 }, 3286 3287 _uiHash: function( index, value, values ) { 3288 var uiHash = { 3289 handle: this.handles[ index ], 3290 handleIndex: index, 3291 value: value !== undefined ? value : this.value() 3292 }; 3293 3294 if ( this._hasMultipleValues() ) { 3295 uiHash.value = value !== undefined ? value : this.values( index ); 3296 uiHash.values = values || this.values(); 3297 } 3298 3299 return uiHash; 3300 }, 3301 3302 _hasMultipleValues: function() { 3303 return this.options.values && this.options.values.length; 3304 }, 3305 3306 _start: function( event, index ) { 3307 return this._trigger( "start", event, this._uiHash( index ) ); 3308 }, 3309 3310 _slide: function( event, index, newVal ) { 3311 var allowed, otherVal, 3312 currentValue = this.value(), 3313 newValues = this.values(); 3314 3315 if ( this._hasMultipleValues() ) { 3316 otherVal = this.values( index ? 0 : 1 ); 3317 currentValue = this.values( index ); 3318 3319 if ( this.options.values.length === 2 && this.options.range === true ) { 3320 newVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal ); 3321 } 3322 3323 newValues[ index ] = newVal; 3324 } 3325 3326 if ( newVal === currentValue ) { 3327 return; 3328 } 3329 3330 allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) ); 3331 3332 // A slide can be canceled by returning false from the slide callback 3333 if ( allowed === false ) { 3334 return; 3335 } 3336 3337 if ( this._hasMultipleValues() ) { 3338 this.values( index, newVal ); 3339 } else { 3340 this.value( newVal ); 3341 } 3342 }, 3343 3344 _stop: function( event, index ) { 3345 this._trigger( "stop", event, this._uiHash( index ) ); 3346 }, 3347 3348 _change: function( event, index ) { 3349 if ( !this._keySliding && !this._mouseSliding ) { 3350 3351 //store the last changed value index for reference when handles overlap 3352 this._lastChangedValue = index; 3353 this._trigger( "change", event, this._uiHash( index ) ); 3354 } 3355 }, 3356 3357 value: function( newValue ) { 3358 if ( arguments.length ) { 3359 this.options.value = this._trimAlignValue( newValue ); 3360 this._refreshValue(); 3361 this._change( null, 0 ); 3362 return; 3363 } 3364 3365 return this._value(); 3366 }, 3367 3368 values: function( index, newValue ) { 3369 var vals, 3370 newValues, 3371 i; 3372 3373 if ( arguments.length > 1 ) { 3374 this.options.values[ index ] = this._trimAlignValue( newValue ); 3375 this._refreshValue(); 3376 this._change( null, index ); 3377 return; 3378 } 3379 3380 if ( arguments.length ) { 3381 if ( $.isArray( arguments[ 0 ] ) ) { 3382 vals = this.options.values; 3383 newValues = arguments[ 0 ]; 3384 for ( i = 0; i < vals.length; i += 1 ) { 3385 vals[ i ] = this._trimAlignValue( newValues[ i ] ); 3386 this._change( null, i ); 3387 } 3388 this._refreshValue(); 3389 } else { 3390 if ( this._hasMultipleValues() ) { 3391 return this._values( index ); 3392 } else { 3393 return this.value(); 3394 } 3395 } 3396 } else { 3397 return this._values(); 3398 } 3399 }, 3400 3401 _setOption: function( key, value ) { 3402 var i, 3403 valsLength = 0; 3404 3405 if ( key === "range" && this.options.range === true ) { 3406 if ( value === "min" ) { 3407 this.options.value = this._values( 0 ); 3408 this.options.values = null; 3409 } else if ( value === "max" ) { 3410 this.options.value = this._values( this.options.values.length - 1 ); 3411 this.options.values = null; 3412 } 3413 } 3414 3415 if ( $.isArray( this.options.values ) ) { 3416 valsLength = this.options.values.length; 3417 } 3418 3419 this._super( key, value ); 3420 3421 switch ( key ) { 3422 case "orientation": 3423 this._detectOrientation(); 3424 this._removeClass( "ui-slider-horizontal ui-slider-vertical" ) 3425 ._addClass( "ui-slider-" + this.orientation ); 3426 this._refreshValue(); 3427 if ( this.options.range ) { 3428 this._refreshRange( value ); 3429 } 3430 3431 // Reset positioning from previous orientation 3432 this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); 3433 break; 3434 case "value": 3435 this._animateOff = true; 3436 this._refreshValue(); 3437 this._change( null, 0 ); 3438 this._animateOff = false; 3439 break; 3440 case "values": 3441 this._animateOff = true; 3442 this._refreshValue(); 3443 3444 // Start from the last handle to prevent unreachable handles (#9046) 3445 for ( i = valsLength - 1; i >= 0; i-- ) { 3446 this._change( null, i ); 3447 } 3448 this._animateOff = false; 3449 break; 3450 case "step": 3451 case "min": 3452 case "max": 3453 this._animateOff = true; 3454 this._calculateNewMax(); 3455 this._refreshValue(); 3456 this._animateOff = false; 3457 break; 3458 case "range": 3459 this._animateOff = true; 3460 this._refresh(); 3461 this._animateOff = false; 3462 break; 3463 } 3464 }, 3465 3466 _setOptionDisabled: function( value ) { 3467 this._super( value ); 3468 3469 this._toggleClass( null, "ui-state-disabled", !!value ); 3470 }, 3471 3472 //internal value getter 3473 // _value() returns value trimmed by min and max, aligned by step 3474 _value: function() { 3475 var val = this.options.value; 3476 val = this._trimAlignValue( val ); 3477 3478 return val; 3479 }, 3480 3481 //internal values getter 3482 // _values() returns array of values trimmed by min and max, aligned by step 3483 // _values( index ) returns single value trimmed by min and max, aligned by step 3484 _values: function( index ) { 3485 var val, 3486 vals, 3487 i; 3488 3489 if ( arguments.length ) { 3490 val = this.options.values[ index ]; 3491 val = this._trimAlignValue( val ); 3492 3493 return val; 3494 } else if ( this._hasMultipleValues() ) { 3495 3496 // .slice() creates a copy of the array 3497 // this copy gets trimmed by min and max and then returned 3498 vals = this.options.values.slice(); 3499 for ( i = 0; i < vals.length; i += 1 ) { 3500 vals[ i ] = this._trimAlignValue( vals[ i ] ); 3501 } 3502 3503 return vals; 3504 } else { 3505 return []; 3506 } 3507 }, 3508 3509 // Returns the step-aligned value that val is closest to, between (inclusive) min and max 3510 _trimAlignValue: function( val ) { 3511 if ( val <= this._valueMin() ) { 3512 return this._valueMin(); 3513 } 3514 if ( val >= this._valueMax() ) { 3515 return this._valueMax(); 3516 } 3517 var step = ( this.options.step > 0 ) ? this.options.step : 1, 3518 valModStep = ( val - this._valueMin() ) % step, 3519 alignValue = val - valModStep; 3520 3521 if ( Math.abs( valModStep ) * 2 >= step ) { 3522 alignValue += ( valModStep > 0 ) ? step : ( -step ); 3523 } 3524 3525 // Since JavaScript has problems with large floats, round 3526 // the final value to 5 digits after the decimal point (see #4124) 3527 return parseFloat( alignValue.toFixed( 5 ) ); 3528 }, 3529 3530 _calculateNewMax: function() { 3531 var max = this.options.max, 3532 min = this._valueMin(), 3533 step = this.options.step, 3534 aboveMin = Math.round( ( max - min ) / step ) * step; 3535 max = aboveMin + min; 3536 if ( max > this.options.max ) { 3537 3538 //If max is not divisible by step, rounding off may increase its value 3539 max -= step; 3540 } 3541 this.max = parseFloat( max.toFixed( this._precision() ) ); 3542 }, 3543 3544 _precision: function() { 3545 var precision = this._precisionOf( this.options.step ); 3546 if ( this.options.min !== null ) { 3547 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 3548 } 3549 return precision; 3550 }, 3551 3552 _precisionOf: function( num ) { 3553 var str = num.toString(), 3554 decimal = str.indexOf( "." ); 3555 return decimal === -1 ? 0 : str.length - decimal - 1; 3556 }, 3557 3558 _valueMin: function() { 3559 return this.options.min; 3560 }, 3561 3562 _valueMax: function() { 3563 return this.max; 3564 }, 3565 3566 _refreshRange: function( orientation ) { 3567 if ( orientation === "vertical" ) { 3568 this.range.css( { "width": "", "left": "" } ); 3569 } 3570 if ( orientation === "horizontal" ) { 3571 this.range.css( { "height": "", "bottom": "" } ); 3572 } 3573 }, 3574 3575 _refreshValue: function() { 3576 var lastValPercent, valPercent, value, valueMin, valueMax, 3577 oRange = this.options.range, 3578 o = this.options, 3579 that = this, 3580 animate = ( !this._animateOff ) ? o.animate : false, 3581 _set = {}; 3582 3583 if ( this._hasMultipleValues() ) { 3584 this.handles.each( function( i ) { 3585 valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() - 3586 that._valueMin() ) * 100; 3587 _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 3588 $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 3589 if ( that.options.range === true ) { 3590 if ( that.orientation === "horizontal" ) { 3591 if ( i === 0 ) { 3592 that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 3593 left: valPercent + "%" 3594 }, o.animate ); 3595 } 3596 if ( i === 1 ) { 3597 that.range[ animate ? "animate" : "css" ]( { 3598 width: ( valPercent - lastValPercent ) + "%" 3599 }, { 3600 queue: false, 3601 duration: o.animate 3602 } ); 3603 } 3604 } else { 3605 if ( i === 0 ) { 3606 that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 3607 bottom: ( valPercent ) + "%" 3608 }, o.animate ); 3609 } 3610 if ( i === 1 ) { 3611 that.range[ animate ? "animate" : "css" ]( { 3612 height: ( valPercent - lastValPercent ) + "%" 3613 }, { 3614 queue: false, 3615 duration: o.animate 3616 } ); 3617 } 3618 } 3619 } 3620 lastValPercent = valPercent; 3621 } ); 3622 } else { 3623 value = this.value(); 3624 valueMin = this._valueMin(); 3625 valueMax = this._valueMax(); 3626 valPercent = ( valueMax !== valueMin ) ? 3627 ( value - valueMin ) / ( valueMax - valueMin ) * 100 : 3628 0; 3629 _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 3630 this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 3631 3632 if ( oRange === "min" && this.orientation === "horizontal" ) { 3633 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 3634 width: valPercent + "%" 3635 }, o.animate ); 3636 } 3637 if ( oRange === "max" && this.orientation === "horizontal" ) { 3638 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 3639 width: ( 100 - valPercent ) + "%" 3640 }, o.animate ); 3641 } 3642 if ( oRange === "min" && this.orientation === "vertical" ) { 3643 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 3644 height: valPercent + "%" 3645 }, o.animate ); 3646 } 3647 if ( oRange === "max" && this.orientation === "vertical" ) { 3648 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 3649 height: ( 100 - valPercent ) + "%" 3650 }, o.animate ); 3651 } 3652 } 3653 }, 3654 3655 _handleEvents: { 3656 keydown: function( event ) { 3657 var allowed, curVal, newVal, step, 3658 index = $( event.target ).data( "ui-slider-handle-index" ); 3659 3660 switch ( event.keyCode ) { 3661 case $.ui.keyCode.HOME: 3662 case $.ui.keyCode.END: 3663 case $.ui.keyCode.PAGE_UP: 3664 case $.ui.keyCode.PAGE_DOWN: 3665 case $.ui.keyCode.UP: 3666 case $.ui.keyCode.RIGHT: 3667 case $.ui.keyCode.DOWN: 3668 case $.ui.keyCode.LEFT: 3669 event.preventDefault(); 3670 if ( !this._keySliding ) { 3671 this._keySliding = true; 3672 this._addClass( $( event.target ), null, "ui-state-active" ); 3673 allowed = this._start( event, index ); 3674 if ( allowed === false ) { 3675 return; 3676 } 3677 } 3678 break; 3679 } 3680 3681 step = this.options.step; 3682 if ( this._hasMultipleValues() ) { 3683 curVal = newVal = this.values( index ); 3684 } else { 3685 curVal = newVal = this.value(); 3686 } 3687 3688 switch ( event.keyCode ) { 3689 case $.ui.keyCode.HOME: 3690 newVal = this._valueMin(); 3691 break; 3692 case $.ui.keyCode.END: 3693 newVal = this._valueMax(); 3694 break; 3695 case $.ui.keyCode.PAGE_UP: 3696 newVal = this._trimAlignValue( 3697 curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) 3698 ); 3699 break; 3700 case $.ui.keyCode.PAGE_DOWN: 3701 newVal = this._trimAlignValue( 3702 curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) ); 3703 break; 3704 case $.ui.keyCode.UP: 3705 case $.ui.keyCode.RIGHT: 3706 if ( curVal === this._valueMax() ) { 3707 return; 3708 } 3709 newVal = this._trimAlignValue( curVal + step ); 3710 break; 3711 case $.ui.keyCode.DOWN: 3712 case $.ui.keyCode.LEFT: 3713 if ( curVal === this._valueMin() ) { 3714 return; 3715 } 3716 newVal = this._trimAlignValue( curVal - step ); 3717 break; 3718 } 3719 3720 this._slide( event, index, newVal ); 3721 }, 3722 keyup: function( event ) { 3723 var index = $( event.target ).data( "ui-slider-handle-index" ); 3724 3725 if ( this._keySliding ) { 3726 this._keySliding = false; 3727 this._stop( event, index ); 3728 this._change( event, index ); 3729 this._removeClass( $( event.target ), null, "ui-state-active" ); 3730 } 3731 } 3732 } 3733} ); 3734
vendor: 12,863 bytes, lines 3735-4121
3735var widgetsTabs = $.widget("ui.tabs", { 3736 version: "1.12.1", 3737 delay: 300, 3738 options: { 3739 active: null, 3740 classes: { 3741 "ui-tabs": "ui-corner-all", 3742 "ui-tabs-nav": "ui-corner-all", 3743 "ui-tabs-panel": "ui-corner-bottom", 3744 "ui-tabs-tab": "ui-corner-top" 3745 }, 3746 collapsible: false, 3747 event: "click", 3748 heightStyle: "content", 3749 hide: null, 3750 show: null, 3751 3752 // Callbacks 3753 activate: null, 3754 beforeActivate: null, 3755 beforeLoad: null, 3756 load: null 3757 }, 3758 3759 _isLocal: (function () { 3760 var rhash = /#.*$/; 3761 3762 return function (anchor) { 3763 var anchorUrl, locationUrl; 3764 3765 anchorUrl = anchor.href.replace(rhash, ""); 3766 locationUrl = location.href.replace(rhash, ""); 3767 3768 // Decoding may throw an error if the URL isn't UTF-8 (#9518) 3769 try { 3770 anchorUrl = decodeURIComponent(anchorUrl); 3771 } catch (error) { } 3772 try { 3773 locationUrl = decodeURIComponent(locationUrl); 3774 } catch (error) { } 3775 3776 return anchor.hash.length > 1 && anchorUrl === locationUrl; 3777 }; 3778 })(), 3779 3780 _create: function () { 3781 var that = this, 3782 options = this.options; 3783 3784 this.running = false; 3785 3786 this._addClass("ui-tabs", "ui-widget ui-widget-content"); 3787 this._toggleClass("ui-tabs-collapsible", null, options.collapsible); 3788 3789 this._processTabs(); 3790 options.active = this._initialActive(); 3791 3792 // Take disabling tabs via class attribute from HTML 3793 // into account and update option properly. 3794 if ($.isArray(options.disabled)) { 3795 options.disabled = $.unique(options.disabled.concat( 3796 $.map(this.tabs.filter(".ui-state-disabled"), function (li) { 3797 return that.tabs.index(li); 3798 }) 3799 )).sort(); 3800 } 3801 3802 // Check for length avoids error when initializing empty list 3803 if (this.options.active !== false && this.anchors.length) { 3804 this.active = this._findActive(options.active); 3805 } else { 3806 this.active = $(); 3807 } 3808 3809 this._refresh(); 3810 3811 if (this.active.length) { 3812 this.load(options.active); 3813 } 3814 }, 3815 3816 _initialActive: function () { 3817 var active = this.options.active, 3818 collapsible = this.options.collapsible, 3819 locationHash = location.hash.substring(1); 3820 3821 if (active === null) { 3822 3823 // check the fragment identifier in the URL 3824 if (locationHash) { 3825 this.tabs.each(function (i, tab) { 3826 if ($(tab).attr("aria-controls") === locationHash) { 3827 active = i; 3828 return false; 3829 } 3830 }); 3831 } 3832 3833 // Check for a tab marked active via a class 3834 if (active === null) { 3835 active = this.tabs.index(this.tabs.filter(".ui-tabs-active")); 3836 } 3837 3838 // No active tab, set to false 3839 if (active === null || active === -1) { 3840 active = this.tabs.length ? 0 : false; 3841 } 3842 } 3843 3844 // Handle numbers: negative, out of range 3845 if (active !== false) { 3846 active = this.tabs.index(this.tabs.eq(active)); 3847 if (active === -1) { 3848 active = collapsible ? false : 0; 3849 } 3850 } 3851 3852 // Don't allow collapsible: false and active: false 3853 if (!collapsible && active === false && this.anchors.length) { 3854 active = 0; 3855 } 3856 3857 return active; 3858 }, 3859 3860 _getCreateEventData: function () { 3861 return { 3862 tab: this.active, 3863 panel: !this.active.length ? $() : this._getPanelForTab(this.active) 3864 }; 3865 }, 3866 3867 _tabKeydown: function (event) { 3868 var focusedTab = $($.ui.safeActiveElement(this.document[0])).closest("li"), 3869 selectedIndex = this.tabs.index(focusedTab), 3870 goingForward = true; 3871 3872 if (this._handlePageNav(event)) { 3873 return; 3874 } 3875 3876 switch (event.keyCode) { 3877 case $.ui.keyCode.RIGHT: 3878 case $.ui.keyCode.DOWN: 3879 selectedIndex++; 3880 break; 3881 case $.ui.keyCode.UP: 3882 case $.ui.keyCode.LEFT: 3883 goingForward = false; 3884 selectedIndex--; 3885 break; 3886 case $.ui.keyCode.END: 3887 selectedIndex = this.anchors.length - 1; 3888 break; 3889 case $.ui.keyCode.HOME: 3890 selectedIndex = 0; 3891 break; 3892 case $.ui.keyCode.SPACE: 3893 3894 // Activate only, no collapsing 3895 event.preventDefault(); 3896 clearTimeout(this.activating); 3897 this._activate(selectedIndex); 3898 return; 3899 case $.ui.keyCode.ENTER: 3900 // Toggle (cancel delayed activation, allow collapsing) 3901 event.preventDefault(); 3902 clearTimeout(this.activating); 3903 3904 // Determine if we should collapse or activate 3905 this._activate(selectedIndex === this.options.active ? false : selectedIndex); 3906 return; 3907 default: 3908 return; 3909 } 3910 3911 // Focus the appropriate tab, based on which key was pressed 3912 event.preventDefault(); 3913 clearTimeout(this.activating); 3914 selectedIndex = this._focusNextTab(selectedIndex, goingForward); 3915 3916 // Navigating with control/command key will prevent automatic activation 3917 if (!event.ctrlKey && !event.metaKey) { 3918 3919 // Update aria-selected immediately so that AT think the tab is already selected. 3920 // Otherwise AT may confuse the user by stating that they need to activate the tab, 3921 // but the tab will already be activated by the time the announcement finishes. 3922 focusedTab.attr("aria-selected", "false"); 3923 this.tabs.eq(selectedIndex).attr("aria-selected", "true"); 3924 3925 this.activating = this._delay(function () { 3926 this.option("active", selectedIndex); 3927 }, this.delay); 3928 } 3929 }, 3930 3931 _panelKeydown: function (event) { 3932 if (this._handlePageNav(event)) { 3933 return; 3934 } 3935 3936 // Ctrl+up moves focus to the current tab 3937 if (event.ctrlKey && event.keyCode === $.ui.keyCode.UP) { 3938 event.preventDefault(); 3939 this.active.trigger("focus"); 3940 } 3941 }, 3942 3943 // Alt+page up/down moves focus to the previous/next tab (and activates) 3944 _handlePageNav: function (event) { 3945 if (event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP) { 3946 this._activate(this._focusNextTab(this.options.active - 1, false)); 3947 return true; 3948 } 3949 if (event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN) { 3950 this._activate(this._focusNextTab(this.options.active + 1, true)); 3951 return true; 3952 } 3953 }, 3954 3955 _findNextTab: function (index, goingForward) { 3956 var lastTabIndex = this.tabs.length - 1; 3957 3958 function constrain() { 3959 if (index > lastTabIndex) { 3960 index = 0; 3961 } 3962 if (index < 0) { 3963 index = lastTabIndex; 3964 } 3965 return index; 3966 } 3967 3968 while ($.inArray(constrain(), this.options.disabled) !== -1) { 3969 index = goingForward ? index + 1 : index - 1; 3970 } 3971 3972 return index; 3973 }, 3974 3975 _focusNextTab: function (index, goingForward) { 3976 index = this._findNextTab(index, goingForward); 3977 this.tabs.eq(index).trigger("focus"); 3978 return index; 3979 }, 3980 3981 _setOption: function (key, value) { 3982 if (key === "active") { 3983 3984 // _activate() will handle invalid values and update this.options 3985 this._activate(value); 3986 return; 3987 } 3988 3989 this._super(key, value); 3990 3991 if (key === "collapsible") { 3992 this._toggleClass("ui-tabs-collapsible", null, value); 3993 3994 // Setting collapsible: false while collapsed; open first panel 3995 if (!value && this.options.active === false) { 3996 this._activate(0); 3997 } 3998 } 3999 4000 if (key === "event") { 4001 this._setupEvents(value); 4002 } 4003 4004 if (key === "heightStyle") { 4005 this._setupHeightStyle(value); 4006 } 4007 }, 4008 4009 _sanitizeSelector: function (hash) { 4010 return hash ? hash.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""; 4011 }, 4012 4013 refresh: function () { 4014 var options = this.options, 4015 lis = this.tablist.children(":has(a[href])"); 4016 4017 // Get disabled tabs from class attribute from HTML 4018 // this will get converted to a boolean if needed in _refresh() 4019 options.disabled = $.map(lis.filter(".ui-state-disabled"), function (tab) { 4020 return lis.index(tab); 4021 }); 4022 4023 this._processTabs(); 4024 4025 // Was collapsed or no tabs 4026 if (options.active === false || !this.anchors.length) { 4027 options.active = false; 4028 this.active = $(); 4029 4030 // was active, but active tab is gone 4031 } else if (this.active.length && !$.contains(this.tablist[0], this.active[0])) { 4032 4033 // all remaining tabs are disabled 4034 if (this.tabs.length === options.disabled.length) { 4035 options.active = false; 4036 this.active = $(); 4037 4038 // activate previous tab 4039 } else { 4040 this._activate(this._findNextTab(Math.max(0, options.active - 1), false)); 4041 } 4042 4043 // was active, active tab still exists 4044 } else { 4045 4046 // make sure active index is correct 4047 options.active = this.tabs.index(this.active); 4048 } 4049 4050 this._refresh(); 4051 }, 4052 4053 _refresh: function () { 4054 this._setOptionDisabled(this.options.disabled); 4055 this._setupEvents(this.options.event); 4056 this._setupHeightStyle(this.options.heightStyle); 4057 4058 this.tabs.not(this.active).attr({ 4059 "aria-selected": "false", 4060 "aria-expanded": "false", 4061 tabIndex: -1 4062 }); 4063 4064 // per a360: some screen readers read the expanded: false attribute 4065 // before / while the tab is activating (going to expanded: true) 4066 // so we are removing that when it's false to avoid that chatter 4067 if (!this.options.collapsible) 4068 this.tabs.removeAttr("aria-expanded"); 4069 4070 this.panels.not(this._getPanelForTab(this.active)) 4071 .hide() 4072 .attr({ 4073 "aria-hidden": "true" 4074 }); 4075 4076 // Make sure one tab is in the tab order 4077 if (!this.active.length) { 4078 this.tabs.eq(0).attr("tabIndex", 0); 4079 } else { 4080 this.active 4081 .attr({ 4082 "aria-selected": "true", 4083 "aria-expanded": "true", 4084 tabIndex: 0 4085 }); 4086 4087 // per a360: some screen readers read the expanded: false attribute 4088 // before / while the tab is activating (going to expanded: true) 4089 // so we are removing that when it's false to avoid that chatter 4090 if (!this.options.collapsible) 4091 this.active.removeAttr("aria-expanded"); 4092 4093 this._addClass(this.active, "ui-tabs-active", "ui-state-active"); 4094 this._getPanelForTab(this.active) 4095 .show() 4096 .attr({ 4097 "aria-hidden": "false" 4098 }); 4099 } 4100 }, 4101 4102 _processTabs: function () { 4103 var that = this, 4104 prevTabs = this.tabs, 4105 prevAnchors = this.anchors, 4106 prevPanels = this.panels; 4107 4108 this.tablist = this._getList().attr("role", "tablist"); 4109 this._addClass(this.tablist, "ui-tabs-nav", 4110 "ui-helper-reset ui-helper-clearfix ui-widget-header"); 4111 4112 // Prevent users from focusing disabled tabs via click 4113 this.tablist 4114 .on("mousedown" + this.eventNamespace, "> li", function (event) { 4115 if ($(this).is(".ui-state-disabled")) { 4116 event.preventDefault(); 4117 } 4118 }) 4119 4120 // Support: IE <9 4121 // Preventing the default action in mousedown doesn't prevent IE
vendor: 15,295 bytes, lines 4122-4580
4122 // from focusing the element, so if the anchor gets focused, blur. 4123 // We don't have to worry about focusing the previously focused 4124 // element since clicking on a non-focusable element should focus 4125 // the body anyway. 4126 .on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () { 4127 if ($(this).closest("li").is(".ui-state-disabled")) { 4128 this.blur(); 4129 } 4130 }); 4131 4132 this.tabs = this.tablist.find("> li:has(a[href])") 4133 .attr({ 4134 role: "tab", 4135 tabIndex: -1 4136 }); 4137 this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"); 4138 4139 this.anchors = this.tabs.map(function () { 4140 return $("a", this)[0]; 4141 }) 4142 .attr({ 4143 role: "presentation", 4144 tabIndex: -1 4145 }); 4146 this._addClass(this.anchors, "ui-tabs-anchor"); 4147 4148 this.panels = $(); 4149 4150 this.anchors.each(function (i, anchor) { 4151 var selector, panel, panelId, 4152 anchorId = $(anchor).uniqueId().attr("id"), 4153 tab = $(anchor).closest("li"), 4154 originalAriaControls = tab.attr("aria-controls"); 4155 4156 // Inline tab 4157 if (that._isLocal(anchor)) { 4158 selector = anchor.hash; 4159 panelId = selector.substring(1); 4160 panel = that.element.find(that._sanitizeSelector(selector)); 4161 4162 // remote tab 4163 } else { 4164 4165 // If the tab doesn't already have aria-controls, 4166 // generate an id by using a throw-away element 4167 panelId = tab.attr("aria-controls") || $({}).uniqueId()[0].id; 4168 selector = "#" + panelId; 4169 panel = that.element.find(selector); 4170 if (!panel.length) { 4171 panel = that._createPanel(panelId); 4172 panel.insertAfter(that.panels[i - 1] || that.tablist); 4173 } 4174 panel.attr("aria-live", "polite"); 4175 } 4176 4177 if (panel.length) { 4178 that.panels = that.panels.add(panel); 4179 } 4180 if (originalAriaControls) { 4181 tab.data("ui-tabs-aria-controls", originalAriaControls); 4182 } 4183 tab.attr({ 4184 "aria-controls": panelId, 4185 "aria-labelledby": anchorId 4186 }); 4187 panel.attr("aria-labelledby", anchorId); 4188 }); 4189 4190 this.panels.attr("role", "tabpanel"); 4191 this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"); 4192 4193 // Avoid memory leaks (#10056) 4194 if (prevTabs) { 4195 this._off(prevTabs.not(this.tabs)); 4196 this._off(prevAnchors.not(this.anchors)); 4197 this._off(prevPanels.not(this.panels)); 4198 } 4199 }, 4200 4201 // Allow overriding how to find the list for rare usage scenarios (#7715) 4202 _getList: function () { 4203 return this.tablist || this.element.find("ol, ul").eq(0); 4204 }, 4205 4206 _createPanel: function (id) { 4207 return $("<div>") 4208 .attr("id", id) 4209 .data("ui-tabs-destroy", true); 4210 }, 4211 4212 _setOptionDisabled: function (disabled) { 4213 var currentItem, li, i; 4214 4215 if ($.isArray(disabled)) { 4216 if (!disabled.length) { 4217 disabled = false; 4218 } else if (disabled.length === this.anchors.length) { 4219 disabled = true; 4220 } 4221 } 4222 4223 // Disable tabs 4224 for (i = 0; (li = this.tabs[i]); i++) { 4225 currentItem = $(li); 4226 if (disabled === true || $.inArray(i, disabled) !== -1) { 4227 currentItem.attr("aria-disabled", "true"); 4228 this._addClass(currentItem, null, "ui-state-disabled"); 4229 } else { 4230 currentItem.removeAttr("aria-disabled"); 4231 this._removeClass(currentItem, null, "ui-state-disabled"); 4232 } 4233 } 4234 4235 this.options.disabled = disabled; 4236 4237 this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, 4238 disabled === true); 4239 }, 4240 4241 _setupEvents: function (event) { 4242 var events = {}; 4243 if (event) { 4244 $.each(event.split(" "), function (index, eventName) { 4245 events[eventName] = "_eventHandler"; 4246 }); 4247 } 4248 4249 this._off(this.anchors.add(this.tabs).add(this.panels)); 4250 4251 // Always prevent the default action, even when disabled 4252 this._on(true, this.anchors, { 4253 click: function (event) { 4254 event.preventDefault(); 4255 } 4256 }); 4257 this._on(this.anchors, events); 4258 this._on(this.tabs, { keydown: "_tabKeydown" }); 4259 this._on(this.panels, { keydown: "_panelKeydown" }); 4260 4261 this._focusable(this.tabs); 4262 this._hoverable(this.tabs); 4263 }, 4264 4265 _setupHeightStyle: function (heightStyle) { 4266 var maxHeight, 4267 parent = this.element.parent(); 4268 4269 if (heightStyle === "fill") { 4270 maxHeight = parent.height(); 4271 maxHeight -= this.element.outerHeight() - this.element.height(); 4272 4273 this.element.siblings(":visible").each(function () { 4274 var elem = $(this), 4275 position = elem.css("position"); 4276 4277 if (position === "absolute" || position === "fixed") { 4278 return; 4279 } 4280 maxHeight -= elem.outerHeight(true); 4281 }); 4282 4283 this.element.children().not(this.panels).each(function () { 4284 maxHeight -= $(this).outerHeight(true); 4285 }); 4286 4287 this.panels.each(function () { 4288 $(this).height(Math.max(0, maxHeight - 4289 $(this).innerHeight() + $(this).height())); 4290 }) 4291 .css("overflow", "auto"); 4292 } else if (heightStyle === "auto") { 4293 maxHeight = 0; 4294 this.panels.each(function () { 4295 maxHeight = Math.max(maxHeight, $(this).height("").height()); 4296 }).height(maxHeight); 4297 } 4298 }, 4299 4300 _eventHandler: function (event) { 4301 var options = this.options, 4302 active = this.active, 4303 anchor = $(event.currentTarget), 4304 tab = anchor.closest("li"), 4305 clickedIsActive = tab[0] === active[0], 4306 collapsing = clickedIsActive && options.collapsible, 4307 toShow = collapsing ? $() : this._getPanelForTab(tab), 4308 toHide = !active.length ? $() : this._getPanelForTab(active), 4309 eventData = { 4310 oldTab: active, 4311 oldPanel: toHide, 4312 newTab: collapsing ? $() : tab, 4313 newPanel: toShow 4314 }; 4315 4316 event.preventDefault(); 4317 4318 if (tab.hasClass("ui-state-disabled") || 4319 4320 // tab is already loading 4321 tab.hasClass("ui-tabs-loading") || 4322 4323 // can't switch durning an animation 4324 this.running || 4325 4326 // click on active header, but not collapsible 4327 (clickedIsActive && !options.collapsible) || 4328 4329 // allow canceling activation 4330 (this._trigger("beforeActivate", event, eventData) === false)) { 4331 return; 4332 } 4333 4334 options.active = collapsing ? false : this.tabs.index(tab); 4335 4336 this.active = clickedIsActive ? $() : tab; 4337 if (this.xhr) { 4338 this.xhr.abort(); 4339 } 4340 4341 if (!toHide.length && !toShow.length) { 4342 $.error("jQuery UI Tabs: Mismatching fragment identifier."); 4343 } 4344 4345 if (toShow.length) { 4346 this.load(this.tabs.index(tab), event); 4347 } 4348 this._toggle(event, eventData); 4349 }, 4350 4351 // Handles show/hide for selecting tabs 4352 _toggle: function (event, eventData) { 4353 var that = this, 4354 toShow = eventData.newPanel, 4355 toHide = eventData.oldPanel; 4356 4357 this.running = true; 4358 4359 function complete() { 4360 that.running = false; 4361 that._trigger("activate", event, eventData); 4362 } 4363 4364 function show() { 4365 that._addClass(eventData.newTab.closest("li"), "ui-tabs-active", "ui-state-active"); 4366 4367 if (toShow.length && that.options.show) { 4368 that._show(toShow, that.options.show, complete); 4369 } else { 4370 toShow.show(); 4371 complete(); 4372 } 4373 } 4374 4375 // Start out by hiding, then showing, then completing 4376 if (toHide.length && this.options.hide) { 4377 this._hide(toHide, this.options.hide, function () { 4378 that._removeClass(eventData.oldTab.closest("li"), 4379 "ui-tabs-active", "ui-state-active"); 4380 show(); 4381 }); 4382 } else { 4383 this._removeClass(eventData.oldTab.closest("li"), 4384 "ui-tabs-active", "ui-state-active"); 4385 toHide.hide(); 4386 show(); 4387 } 4388 4389 toHide.attr("aria-hidden", "true"); 4390 eventData.oldTab.attr({ 4391 "aria-selected": "false", 4392 "aria-expanded": "false" 4393 }); 4394 4395 // per a360: some screen readers read the expanded: false attribute 4396 // before / while the tab is activating (going to expanded: true) 4397 // so we are removing that when it's false to avoid that chatter 4398 if (!this.options.collapsible) 4399 eventData.oldTab.removeAttr("aria-expanded"); 4400 4401 // If we're switching tabs, remove the old tab from the tab order. 4402 // If we're opening from collapsed state, remove the previous tab from the tab order. 4403 // If we're collapsing, then keep the collapsing tab in the tab order. 4404 if (toShow.length && toHide.length) { 4405 eventData.oldTab.attr("tabIndex", -1); 4406 } else if (toShow.length) { 4407 this.tabs.filter(function () { 4408 return $(this).attr("tabIndex") === 0; 4409 }) 4410 .attr("tabIndex", -1); 4411 } 4412 4413 toShow.attr("aria-hidden", "false"); 4414 eventData.newTab.attr({ 4415 "aria-selected": "true", 4416 "aria-expanded": "true", 4417 tabIndex: 0 4418 }); 4419 4420 // per a360: some screen readers read the expanded: false attribute for tabs 4421 // before / while the tab is activating (going to expanded: true) 4422 // so we are removing that when it's false to avoid that chatter 4423 if (!this.options.collapsible) 4424 eventData.newTab.removeAttr("aria-expanded"); 4425 4426 }, 4427 4428 _activate: function (index) { 4429 var anchor, 4430 active = this._findActive(index); 4431 4432 // Trying to activate the already active panel 4433 if (active[0] === this.active[0]) { 4434 return; 4435 } 4436 4437 // Trying to collapse, simulate a click on the current active header 4438 if (!active.length) { 4439 active = this.active; 4440 } 4441 4442 anchor = active.find(".ui-tabs-anchor")[0]; 4443 this._eventHandler({ 4444 target: anchor, 4445 currentTarget: anchor, 4446 preventDefault: $.noop 4447 }); 4448 }, 4449 4450 _findActive: function (index) { 4451 return index === false ? $() : this.tabs.eq(index); 4452 }, 4453 4454 _getIndex: function (index) { 4455 4456 // meta-function to give users option to provide a href string instead of a numerical index. 4457 if (typeof index === "string") { 4458 index = this.anchors.index(this.anchors.filter("[href$='" + 4459 $.ui.escapeSelector(index) + "']")); 4460 } 4461 4462 return index; 4463 }, 4464 4465 _destroy: function () { 4466 if (this.xhr) { 4467 this.xhr.abort(); 4468 } 4469 4470 this.tablist 4471 .removeAttr("role") 4472 .off(this.eventNamespace); 4473 4474 this.anchors 4475 .removeAttr("role tabIndex") 4476 .removeUniqueId(); 4477 4478 this.tabs.add(this.panels).each(function () { 4479 if ($.data(this, "ui-tabs-destroy")) { 4480 $(this).remove(); 4481 } else { 4482 $(this).removeAttr("role tabIndex " + 4483 "aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded"); 4484 } 4485 }); 4486 4487 this.tabs.each(function () { 4488 var li = $(this), 4489 prev = li.data("ui-tabs-aria-controls"); 4490 if (prev) { 4491 li 4492 .attr("aria-controls", prev) 4493 .removeData("ui-tabs-aria-controls"); 4494 } else { 4495 li.removeAttr("aria-controls"); 4496 } 4497 }); 4498 4499 this.panels.show(); 4500 4501 if (this.options.heightStyle !== "content") { 4502 this.panels.css("height", ""); 4503 } 4504 }, 4505 4506 enable: function (index) { 4507 var disabled = this.options.disabled; 4508 if (disabled === false) { 4509 return; 4510 } 4511 4512 if (index === undefined) { 4513 disabled = false; 4514 } else { 4515 index = this._getIndex(index); 4516 if ($.isArray(disabled)) { 4517 disabled = $.map(disabled, function (num) { 4518 return num !== index ? num : null; 4519 }); 4520 } else { 4521 disabled = $.map(this.tabs, function (li, num) { 4522 return num !== index ? num : null; 4523 }); 4524 } 4525 } 4526 this._setOptionDisabled(disabled); 4527 }, 4528 4529 disable: function (index) { 4530 var disabled = this.options.disabled; 4531 if (disabled === true) { 4532 return; 4533 } 4534 4535 if (index === undefined) { 4536 disabled = true; 4537 } else { 4538 index = this._getIndex(index); 4539 if ($.inArray(index, disabled) !== -1) { 4540 return; 4541 } 4542 if ($.isArray(disabled)) { 4543 disabled = $.merge([index], disabled).sort(); 4544 } else { 4545 disabled = [index]; 4546 } 4547 } 4548 this._setOptionDisabled(disabled); 4549 }, 4550 4551 load: function (index, event) { 4552 index = this._getIndex(index); 4553 var that = this, 4554 tab = this.tabs.eq(index), 4555 anchor = tab.find(".ui-tabs-anchor"), 4556 panel = this._getPanelForTab(tab), 4557 eventData = { 4558 tab: tab, 4559 panel: panel 4560 }, 4561 complete = function (jqXHR, status) { 4562 if (status === "abort") { 4563 that.panels.stop(false, true); 4564 } 4565 4566 that._removeClass(tab, "ui-tabs-loading"); 4567 panel.removeAttr("aria-busy"); 4568 4569 if (jqXHR === that.xhr) { 4570 delete that.xhr; 4571 } 4572 }; 4573 4574 // Not remote 4575 if (this._isLocal(anchor[0])) { 4576 return; 4577 } 4578 4579 this.xhr = $.ajax(this._ajaxSettings(anchor, event, eventData)); 4580
vendor: 5,343 bytes, lines 4581-4777
4581 // Support: jQuery <1.8 4582 // jQuery <1.8 returns false if the request is canceled in beforeSend, 4583 // but as of 1.8, $.ajax() always returns a jqXHR object. 4584 if (this.xhr && this.xhr.statusText !== "canceled") { 4585 this._addClass(tab, "ui-tabs-loading"); 4586 panel.attr("aria-busy", "true"); 4587 4588 this.xhr 4589 .done(function (response, status, jqXHR) { 4590 4591 // support: jQuery <1.8 4592 // http://bugs.jquery.com/ticket/11778 4593 setTimeout(function () { 4594 panel.html(response); 4595 that._trigger("load", event, eventData); 4596 4597 complete(jqXHR, status); 4598 }, 1); 4599 }) 4600 .fail(function (jqXHR, status) { 4601 4602 // support: jQuery <1.8 4603 // http://bugs.jquery.com/ticket/11778 4604 setTimeout(function () { 4605 complete(jqXHR, status); 4606 }, 1); 4607 }); 4608 } 4609 }, 4610 4611 _ajaxSettings: function (anchor, event, eventData) { 4612 var that = this; 4613 return { 4614 4615 // Support: IE <11 only 4616 // Strip any hash that exists to prevent errors with the Ajax request 4617 url: anchor.attr("href").replace(/#.*$/, ""), 4618 beforeSend: function (jqXHR, settings) { 4619 return that._trigger("beforeLoad", event, 4620 $.extend({ jqXHR: jqXHR, ajaxSettings: settings }, eventData)); 4621 } 4622 }; 4623 }, 4624 4625 _getPanelForTab: function (tab) { 4626 var id = $(tab).attr("aria-controls"); 4627 return this.element.find(this._sanitizeSelector("#" + id)); 4628 } 4629}); 4630 4631var widgetsAccordion = $.widget( "ui.accordion", { 4632 version: "1.12.1", 4633 options: { 4634 active: 0, 4635 animate: {}, 4636 classes: { 4637 "ui-accordion-header": "ui-corner-top", 4638 "ui-accordion-header-collapsed": "ui-corner-all", 4639 "ui-accordion-content": "ui-corner-bottom" 4640 }, 4641 collapsible: false, 4642 event: "click", 4643 header: "> li > :first-child, > :not(li):even", 4644 heightStyle: "auto", 4645 icons: { 4646 activeHeader: "ui-icon-triangle-1-s", 4647 header: "ui-icon-triangle-1-e" 4648 }, 4649 4650 // Callbacks 4651 activate: null, 4652 beforeActivate: null 4653 }, 4654 4655 hideProps: { 4656 borderTopWidth: "hide", 4657 borderBottomWidth: "hide", 4658 paddingTop: "hide", 4659 paddingBottom: "hide", 4660 height: "hide" 4661 }, 4662 4663 showProps: { 4664 borderTopWidth: "show", 4665 borderBottomWidth: "show", 4666 paddingTop: "show", 4667 paddingBottom: "show", 4668 height: "show" 4669 }, 4670 4671 _create: function() { 4672 var options = this.options; 4673 4674 this.prevShow = this.prevHide = $(); 4675 this._addClass( "ui-accordion", "ui-widget ui-helper-reset" ); 4676 this.element.attr( "role", "tablist" ); 4677 4678 // Don't allow collapsible: false and active: false / null 4679 if ( !options.collapsible && ( options.active === false || options.active == null ) ) { 4680 options.active = 0; 4681 } 4682 4683 this._processPanels(); 4684 4685 // handle negative values 4686 if ( options.active < 0 ) { 4687 options.active += this.headers.length; 4688 } 4689 this._refresh(); 4690 }, 4691 4692 _getCreateEventData: function() { 4693 return { 4694 header: this.active, 4695 panel: !this.active.length ? $() : this.active.next() 4696 }; 4697 }, 4698 4699 _createIcons: function() { 4700 var icon, children, 4701 icons = this.options.icons; 4702 4703 if ( icons ) { 4704 icon = $( "<span>" ); 4705 this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header ); 4706 icon.prependTo( this.headers ); 4707 children = this.active.children( ".ui-accordion-header-icon" ); 4708 this._removeClass( children, icons.header ) 4709 ._addClass( children, null, icons.activeHeader ) 4710 ._addClass( this.headers, "ui-accordion-icons" ); 4711 } 4712 }, 4713 4714 _destroyIcons: function() { 4715 this._removeClass( this.headers, "ui-accordion-icons" ); 4716 this.headers.children( ".ui-accordion-header-icon" ).remove(); 4717 }, 4718 4719 _destroy: function() { 4720 var contents; 4721 4722 // Clean up main element 4723 this.element.removeAttr( "role" ); 4724 4725 // Clean up headers 4726 this.headers 4727 .removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" ) 4728 .removeUniqueId(); 4729 4730 this._destroyIcons(); 4731 4732 // Clean up content panels 4733 contents = this.headers.next() 4734 .css( "display", "" ) 4735 .removeAttr( "role aria-hidden aria-labelledby" ) 4736 .removeUniqueId(); 4737 4738 if ( this.options.heightStyle !== "content" ) { 4739 contents.css( "height", "" ); 4740 } 4741 }, 4742 4743 _setOption: function( key, value ) { 4744 if ( key === "active" ) { 4745 4746 // _activate() will handle invalid values and update this.options 4747 this._activate( value ); 4748 return; 4749 } 4750 4751 if ( key === "event" ) { 4752 if ( this.options.event ) { 4753 this._off( this.headers, this.options.event ); 4754 } 4755 this._setupEvents( value ); 4756 } 4757 4758 this._super( key, value ); 4759 4760 // Setting collapsible: false while collapsed; open first panel 4761 if ( key === "collapsible" && !value && this.options.active === false ) { 4762 this._activate( 0 ); 4763 } 4764 4765 if ( key === "icons" ) { 4766 this._destroyIcons(); 4767 if ( value ) { 4768 this._createIcons(); 4769 } 4770 } 4771 }, 4772 4773 _setOptionDisabled: function( value ) { 4774 this._super( value ); 4775 4776 this.element.attr( "aria-disabled", value ); 4777
vendor: 13,965 bytes, lines 4778-5261
4778 // Support: IE8 Only 4779 // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE 4780 // so we need to add the disabled class to the headers and panels 4781 this._toggleClass( null, "ui-state-disabled", !!value ); 4782 this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", 4783 !!value ); 4784 }, 4785 4786 _keydown: function( event ) { 4787 if ( event.altKey || event.ctrlKey ) { 4788 return; 4789 } 4790 4791 var keyCode = $.ui.keyCode, 4792 length = this.headers.length, 4793 currentIndex = this.headers.index( event.target ), 4794 toFocus = false; 4795 4796 switch ( event.keyCode ) { 4797 case keyCode.RIGHT: 4798 case keyCode.DOWN: 4799 toFocus = this.headers[ ( currentIndex + 1 ) % length ]; 4800 break; 4801 case keyCode.LEFT: 4802 case keyCode.UP: 4803 toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; 4804 break; 4805 case keyCode.SPACE: 4806 case keyCode.ENTER: 4807 this._eventHandler( event ); 4808 break; 4809 case keyCode.HOME: 4810 toFocus = this.headers[ 0 ]; 4811 break; 4812 case keyCode.END: 4813 toFocus = this.headers[ length - 1 ]; 4814 break; 4815 } 4816 4817 if ( toFocus ) { 4818 $( event.target ).attr( "tabIndex", -1 ); 4819 $( toFocus ).attr( "tabIndex", 0 ); 4820 $( toFocus ).trigger( "focus" ); 4821 event.preventDefault(); 4822 } 4823 }, 4824 4825 _panelKeyDown: function( event ) { 4826 if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { 4827 $( event.currentTarget ).prev().trigger( "focus" ); 4828 } 4829 }, 4830 4831 refresh: function() { 4832 var options = this.options; 4833 this._processPanels(); 4834 4835 // Was collapsed or no panel 4836 if ( ( options.active === false && options.collapsible === true ) || 4837 !this.headers.length ) { 4838 options.active = false; 4839 this.active = $(); 4840 4841 // active false only when collapsible is true 4842 } else if ( options.active === false ) { 4843 this._activate( 0 ); 4844 4845 // was active, but active panel is gone 4846 } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 4847 4848 // all remaining panel are disabled 4849 if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) { 4850 options.active = false; 4851 this.active = $(); 4852 4853 // activate previous panel 4854 } else { 4855 this._activate( Math.max( 0, options.active - 1 ) ); 4856 } 4857 4858 // was active, active panel still exists 4859 } else { 4860 4861 // make sure active index is correct 4862 options.active = this.headers.index( this.active ); 4863 } 4864 4865 this._destroyIcons(); 4866 4867 this._refresh(); 4868 }, 4869 4870 _processPanels: function() { 4871 var prevHeaders = this.headers, 4872 prevPanels = this.panels; 4873 4874 this.headers = this.element.find( this.options.header ); 4875 this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", 4876 "ui-state-default" ); 4877 4878 this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide(); 4879 this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" ); 4880 4881 // Avoid memory leaks (#10056) 4882 if ( prevPanels ) { 4883 this._off( prevHeaders.not( this.headers ) ); 4884 this._off( prevPanels.not( this.panels ) ); 4885 } 4886 }, 4887 4888 _refresh: function() { 4889 var maxHeight, 4890 options = this.options, 4891 heightStyle = options.heightStyle, 4892 parent = this.element.parent(); 4893 4894 this.active = this._findActive( options.active ); 4895 this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" ) 4896 ._removeClass( this.active, "ui-accordion-header-collapsed" ); 4897 this._addClass( this.active.next(), "ui-accordion-content-active" ); 4898 this.active.next().show(); 4899 4900 this.headers 4901 .attr( "role", "tab" ) 4902 .each( function() { 4903 var header = $( this ), 4904 headerId = header.uniqueId().attr( "id" ), 4905 panel = header.next(), 4906 panelId = panel.uniqueId().attr( "id" ); 4907 header.attr( "aria-controls", panelId ); 4908 panel.attr( "aria-labelledby", headerId ); 4909 } ) 4910 .next() 4911 .attr( "role", "tabpanel" ); 4912 4913 this.headers 4914 .not( this.active ) 4915 .attr( { 4916 "aria-selected": "false", 4917 "aria-expanded": "false", 4918 tabIndex: -1 4919 } ) 4920 .next() 4921 .attr( { 4922 "aria-hidden": "true" 4923 } ) 4924 .hide(); 4925 4926 // Make sure at least one header is in the tab order 4927 if ( !this.active.length ) { 4928 this.headers.eq( 0 ).attr( "tabIndex", 0 ); 4929 } else { 4930 this.active.attr( { 4931 "aria-selected": "true", 4932 "aria-expanded": "true", 4933 tabIndex: 0 4934 } ) 4935 .next() 4936 .attr( { 4937 "aria-hidden": "false" 4938 } ); 4939 } 4940 4941 this._createIcons(); 4942 4943 this._setupEvents( options.event ); 4944 4945 if ( heightStyle === "fill" ) { 4946 maxHeight = parent.height(); 4947 this.element.siblings( ":visible" ).each( function() { 4948 var elem = $( this ), 4949 position = elem.css( "position" ); 4950 4951 if ( position === "absolute" || position === "fixed" ) { 4952 return; 4953 } 4954 maxHeight -= elem.outerHeight( true ); 4955 } ); 4956 4957 this.headers.each( function() { 4958 maxHeight -= $( this ).outerHeight( true ); 4959 } ); 4960 4961 this.headers.next() 4962 .each( function() { 4963 $( this ).height( Math.max( 0, maxHeight - 4964 $( this ).innerHeight() + $( this ).height() ) ); 4965 } ) 4966 .css( "overflow", "auto" ); 4967 } else if ( heightStyle === "auto" ) { 4968 maxHeight = 0; 4969 this.headers.next() 4970 .each( function() { 4971 var isVisible = $( this ).is( ":visible" ); 4972 if ( !isVisible ) { 4973 $( this ).show(); 4974 } 4975 maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); 4976 if ( !isVisible ) { 4977 $( this ).hide(); 4978 } 4979 } ) 4980 .height( maxHeight ); 4981 } 4982 }, 4983 4984 _activate: function( index ) { 4985 var active = this._findActive( index )[ 0 ]; 4986 4987 // Trying to activate the already active panel 4988 if ( active === this.active[ 0 ] ) { 4989 return; 4990 } 4991 4992 // Trying to collapse, simulate a click on the currently active header 4993 active = active || this.active[ 0 ]; 4994 4995 this._eventHandler( { 4996 target: active, 4997 currentTarget: active, 4998 preventDefault: $.noop 4999 } ); 5000 }, 5001 5002 _findActive: function( selector ) { 5003 return typeof selector === "number" ? this.headers.eq( selector ) : $(); 5004 }, 5005 5006 _setupEvents: function( event ) { 5007 var events = { 5008 keydown: "_keydown" 5009 }; 5010 if ( event ) { 5011 $.each( event.split( " " ), function( index, eventName ) { 5012 events[ eventName ] = "_eventHandler"; 5013 } ); 5014 } 5015 5016 this._off( this.headers.add( this.headers.next() ) ); 5017 this._on( this.headers, events ); 5018 this._on( this.headers.next(), { keydown: "_panelKeyDown" } ); 5019 this._hoverable( this.headers ); 5020 this._focusable( this.headers ); 5021 }, 5022 5023 _eventHandler: function( event ) { 5024 var activeChildren, clickedChildren, 5025 options = this.options, 5026 active = this.active, 5027 clicked = $( event.currentTarget ), 5028 clickedIsActive = clicked[ 0 ] === active[ 0 ], 5029 collapsing = clickedIsActive && options.collapsible, 5030 toShow = collapsing ? $() : clicked.next(), 5031 toHide = active.next(), 5032 eventData = { 5033 oldHeader: active, 5034 oldPanel: toHide, 5035 newHeader: collapsing ? $() : clicked, 5036 newPanel: toShow 5037 }; 5038 5039 event.preventDefault(); 5040 5041 if ( 5042 5043 // click on active header, but not collapsible 5044 ( clickedIsActive && !options.collapsible ) || 5045 5046 // allow canceling activation 5047 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 5048 return; 5049 } 5050 5051 options.active = collapsing ? false : this.headers.index( clicked ); 5052 5053 // When the call to ._toggle() comes after the class changes 5054 // it causes a very odd bug in IE 8 (see #6720) 5055 this.active = clickedIsActive ? $() : clicked; 5056 this._toggle( eventData ); 5057 5058 // Switch classes 5059 // corner classes on the previously active header stay after the animation 5060 this._removeClass( active, "ui-accordion-header-active", "ui-state-active" ); 5061 if ( options.icons ) { 5062 activeChildren = active.children( ".ui-accordion-header-icon" ); 5063 this._removeClass( activeChildren, null, options.icons.activeHeader ) 5064 ._addClass( activeChildren, null, options.icons.header ); 5065 } 5066 5067 if ( !clickedIsActive ) { 5068 this._removeClass( clicked, "ui-accordion-header-collapsed" ) 5069 ._addClass( clicked, "ui-accordion-header-active", "ui-state-active" ); 5070 if ( options.icons ) { 5071 clickedChildren = clicked.children( ".ui-accordion-header-icon" ); 5072 this._removeClass( clickedChildren, null, options.icons.header ) 5073 ._addClass( clickedChildren, null, options.icons.activeHeader ); 5074 } 5075 5076 this._addClass( clicked.next(), "ui-accordion-content-active" ); 5077 } 5078 }, 5079 5080 _toggle: function( data ) { 5081 var toShow = data.newPanel, 5082 toHide = this.prevShow.length ? this.prevShow : data.oldPanel; 5083 5084 // Handle activating a panel during the animation for another activation 5085 this.prevShow.add( this.prevHide ).stop( true, true ); 5086 this.prevShow = toShow; 5087 this.prevHide = toHide; 5088 5089 if ( this.options.animate ) { 5090 this._animate( toShow, toHide, data ); 5091 } else { 5092 toHide.hide(); 5093 toShow.show(); 5094 this._toggleComplete( data ); 5095 } 5096 5097 toHide.attr( { 5098 "aria-hidden": "true" 5099 } ); 5100 toHide.prev().attr( { 5101 "aria-selected": "false", 5102 "aria-expanded": "false" 5103 } ); 5104 5105 // if we're switching panels, remove the old header from the tab order 5106 // if we're opening from collapsed state, remove the previous header from the tab order 5107 // if we're collapsing, then keep the collapsing header in the tab order 5108 if ( toShow.length && toHide.length ) { 5109 toHide.prev().attr( { 5110 "tabIndex": -1, 5111 "aria-expanded": "false" 5112 } ); 5113 } else if ( toShow.length ) { 5114 this.headers.filter( function() { 5115 return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; 5116 } ) 5117 .attr( "tabIndex", -1 ); 5118 } 5119 5120 toShow 5121 .attr( "aria-hidden", "false" ) 5122 .prev() 5123 .attr( { 5124 "aria-selected": "true", 5125 "aria-expanded": "true", 5126 tabIndex: 0 5127 }); 5128 $('html, body').animate({ scrollTop: $('#tabs').offset().top - 100 }, 200); 5129 }, 5130 5131 _animate: function( toShow, toHide, data ) { 5132 var total, easing, duration, 5133 that = this, 5134 adjust = 0, 5135 boxSizing = toShow.css( "box-sizing" ), 5136 down = toShow.length && 5137 ( !toHide.length || ( toShow.index() < toHide.index() ) ), 5138 animate = this.options.animate || {}, 5139 options = down && animate.down || animate, 5140 complete = function() { 5141 that._toggleComplete( data ); 5142 }; 5143 5144 if ( typeof options === "number" ) { 5145 duration = options; 5146 } 5147 if ( typeof options === "string" ) { 5148 easing = options; 5149 } 5150 5151 // fall back from options to animation in case of partial down settings 5152 easing = easing || options.easing || animate.easing; 5153 duration = duration || options.duration || animate.duration; 5154 5155 if ( !toHide.length ) { 5156 return toShow.animate( this.showProps, duration, easing, complete ); 5157 } 5158 if ( !toShow.length ) { 5159 return toHide.animate( this.hideProps, duration, easing, complete ); 5160 } 5161 5162 total = toShow.show().outerHeight(); 5163 toHide.animate( this.hideProps, { 5164 duration: duration, 5165 easing: easing, 5166 step: function( now, fx ) { 5167 fx.now = Math.round( now ); 5168 } 5169 } ); 5170 toShow 5171 .hide() 5172 .animate( this.showProps, { 5173 duration: duration, 5174 easing: easing, 5175 complete: complete, 5176 step: function( now, fx ) { 5177 fx.now = Math.round( now ); 5178 if ( fx.prop !== "height" ) { 5179 if ( boxSizing === "content-box" ) { 5180 adjust += fx.now; 5181 } 5182 } else if ( that.options.heightStyle !== "content" ) { 5183 fx.now = Math.round( total - toHide.outerHeight() - adjust ); 5184 adjust = 0; 5185 } 5186 } 5187 } ); 5188 }, 5189 5190 _toggleComplete: function( data ) { 5191 var toHide = data.oldPanel, 5192 prev = toHide.prev(); 5193 5194 this._removeClass( toHide, "ui-accordion-content-active" ); 5195 this._removeClass( prev, "ui-accordion-header-active" ) 5196 ._addClass( prev, "ui-accordion-header-collapsed" ); 5197 5198 // Work around for rendering bug in IE (#5421) 5199 if ( toHide.length ) { 5200 toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; 5201 } 5202 this._trigger( "activate", null, data ); 5203 } 5204} ); 5205//>>label: :focusable Selector 5206//>>group: Core 5207//>>description: Selects elements which can be focused. 5208//>>docs: http://api.jqueryui.com/focusable-selector/ 5209 5210 5211 5212// Selectors 5213$.ui.focusable = function (element, hasTabindex) { 5214 var map, mapName, img, focusableIfVisible, fieldset, 5215 nodeName = element.nodeName.toLowerCase(); 5216 5217 if ("area" === nodeName) { 5218 map = element.parentNode; 5219 mapName = map.name; 5220 if (!element.href || !mapName || map.nodeName.toLowerCase() !== "map") { 5221 return false; 5222 } 5223 img = $("img[usemap='#" + mapName + "']"); 5224 return img.length > 0 && img.is(":visible"); 5225 } 5226 5227 if (/^(input|select|textarea|button|object)$/.test(nodeName)) { 5228 focusableIfVisible = !element.disabled; 5229 5230 if (focusableIfVisible) { 5231 5232 // Form controls within a disabled fieldset are disabled. 5233 // However, controls within the fieldset's legend do not get disabled. 5234 // Since controls generally aren't placed inside legends, we skip 5235 // this portion of the check. 5236 fieldset = $(element).closest("fieldset")[0]; 5237 if (fieldset) { 5238 focusableIfVisible = !fieldset.disabled; 5239 } 5240 } 5241 } else if ("a" === nodeName) { 5242 focusableIfVisible = element.href || hasTabindex; 5243 } else { 5244 focusableIfVisible = hasTabindex; 5245 } 5246 5247 return focusableIfVisible && $(element).is(":visible") && visible($(element)); 5248}; 5249 5250// Support: IE 8 only 5251// IE 8 doesn't resolve inherit to visible/hidden for computed values 5252function visible(element) { 5253 var visibility = element.css("visibility"); 5254 while (visibility === "inherit") { 5255 element = element.parent(); 5256 visibility = element.css("visibility"); 5257 } 5258 return visibility !== "hidden"; 5259} 5260 5261$.extend($.expr[":"], {
5262 focusable: function (element) { 5263 return $.ui.focusable(element, $.attr(element, "tabindex") != null); 5264 } 5265}); 5266 5267var focusable = $.ui.focusable; 5268 5269}));; 5270/* 5271 This js file contains helper functions related to the jquery-ui library 5272*/ 5273 5274//mark these event listeners as passive, stops the warning from pagespeed insights 5275jQuery.event.special.touchstart = { 5276 setup: function (_, ns, handle) { 5277 this.addEventListener('touchstart', handle, { passive: !ns.includes('noPreventDefault') }); 5278 } 5279}; 5280jQuery.event.special.touchmove = { 5281 setup: function (_, ns, handle) { 5282 this.addEventListener('touchmove', handle, { passive: !ns.includes('noPreventDefault') }); 5283 } 5284}; 5285 5286/* Use this to set tick marks inside a jquery ui slider */ 5287function setSliderTicks(el) { 5288 var $slider = $(el); 5289 var max = $slider.slider("option", "max"); 5290 var min = $slider.slider("option", "min"); 5291 var spacing = 100 / (max - min); 5292 5293 $slider.find('.ui-slider-tick-mark').remove(); 5294 for (var i = 1; i < max - min ; i++) { 5295 $('<span class="ui-slider-tick-mark"></span>').css('left', (spacing * i) + '%').appendTo($slider); 5296 } 5297} 5298 5299/* Use this to setup directional controls for jquery bx sliders */ 5300function setDirectionalControls($el) { 5301 var $btnPrev = $el.find(".bx-prev"); 5302 5303 if ($btnPrev == undefined) { 5304 return; 5305 } 5306 5307 $btnPrev.addClass("inactive"); 5308} 5309 5310/* Use this to set the bx slider directional controls active state on the slide event */ 5311function setDirectionalControlsState($el, newIndex, slideCount) { 5312 var $anchors = $el.find(".bx-controls a"); 5313 if ($anchors == undefined) { 5314 return; 5315 } 5316 $anchors.removeClass("inactive"); 5317 5318 if (newIndex == 0) { 5319 $el.find(".bx-prev").addClass("inactive"); 5320 } 5321 if (newIndex >= slideCount - 1) { 5322 $el.find(".bx-next").addClass("inactive"); 5323 } 5324}; 5325if (typeof Gorilla === 'undefined') { 5326 var Gorilla = {}; 5327} 5328 5329Gorilla.util = { 5330 5331 /** 5332 * Creates a cookie 5333 * 5334 * @param name 5335 * @param value 5336 * @param days 5337 */ 5338 setCookie: function (name, value, days) { 5339 if (days) { 5340 var date = new Date(); 5341 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 5342 var expires = "; expires=" + date.toGMTString(); 5343 } else { 5344 var expires = ""; 5345 } 5346 document.cookie = name + "=" + value + expires + "; path=/; secure=true"; 5347 }, 5348 5349 /** 5350 * sets an array value in a cookie 5351 * 5352 * @param name 5353 * @param key 5354 * @param value 5355 */ 5356 setMultiValueCookie: function (name, key, value, days) { 5357 var cookie = Gorilla.util.getCookie(name); 5358 if (cookie != null) { 5359 var arr = cookie.split("&"); 5360 for (var i = 0; i < arr.length; i++) { 5361 var pattern = new RegExp(key + "="); 5362 if (pattern.test(arr[i])) { 5363 arr[i] = key + "=" + value; 5364 } 5365 } 5366 5367 var date = new Date(); 5368 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 5369 var expires = "; expires=" + date.toGMTString(); 5370 var domain = "; domain=." + location.hostname.split('.').reverse()[1] + "." + location.hostname.split('.').reverse()[0]; 5371 5372 document.cookie = name + "=" + arr.join("&") + expires + domain + "; path=/; secure=true"; 5373 } 5374 }, 5375 5376 /** 5377 * Reads a cookie by name 5378 * 5379 * @param name 5380 * @returns {*} 5381 */ 5382 getCookie: function (name) { 5383 var nameEQ = name + "="; 5384 var ca = document.cookie.split(';'); 5385 for (var i = 0; i < ca.length; i++) { 5386 var c = ca[i]; 5387 while (c.charAt(0) == ' ') c = c.substring(1, c.length); 5388 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); 5389 } 5390 return null; 5391 }, 5392 5393 /** 5394 * Deletes a cookie by name 5395 * 5396 * @param name 5397 */ 5398 deleteCookie: function (name) { 5399 Gorilla.util.setCookie(name, "", -1); 5400 }, 5401 5402 /* 5403 * Height alignment/adjustment for PL Grids 5404 * 5405 * NOTE: To override this calculation for responsive grids, 5406 * add a class of .ignore to the .products-grid element. 5407 * 5408 * @param $objects 5409 * @param childSelector 5410 */ 5411 heightCalculation: function ($objects, selectors, delay, buffer, callback) { 5412 delay || (delay = 500); 5413 window.setTimeout(function () { 5414 Gorilla.util.equalHeightCalculation($objects, selectors, buffer); 5415 5416 if (typeof callback === 'function') { 5417 callback(); 5418 } 5419 }, delay); 5420 }, 5421 5422 equalHeightCalculation: function ($objects, selectors, buffer) { 5423 $objects.not('.ignore').each(function (index, item) { 5424 var height = 0; 5425 jQuery(item).find(selectors).each(function (key, child) { 5426 if (jQuery(child).outerHeight() > height) { 5427 height = jQuery(child).outerHeight(); 5428 } 5429 }); 5430 jQuery(item).find(selectors).css({ 'min-height': (height + buffer) }); 5431 }); 5432 }, 5433 5434 checkValue: function ($elm) { 5435 var $sibling = $elm.parents('.form-list').find('.check-value').not($elm); 5436 5437 if ($elm.val() == '' && $sibling.val() == '') { 5438 $elm.addClass('required'); 5439 $sibling.addClass('required'); 5440 } else if ($elm.val() == '' && $sibling.val() != '') { 5441 $elm.removeClass('required'); 5442 $sibling.addClass('required'); 5443 } else { 5444 $sibling.removeClass('required'); 5445 $sibling.valid(); 5446 } 5447 }, 5448 5449 setHeight : function($grid){
5450 Gorilla.util.heightCalculation($grid, '.new', 0, 0); 5451 Gorilla.util.heightCalculation($grid, '.product-name', 0, 0); 5452 Gorilla.util.heightCalculation($grid, '.starting-at', 0, 0); 5453 Gorilla.util.heightCalculation($grid, '.price-box', 0, 0); 5454 Gorilla.util.heightCalculation($grid, '.rating-box', 0, 0); 5455 Gorilla.util.heightCalculation($grid, '.stock-note', 0, 0); 5456 }, 5457 5458 truncateAndReplaceHtml : function($container, maxLength){ 5459 var html = $container.html(); 5460 var cutString = new CutString(html, maxLength); 5461 var truncatedHtml = cutString.cut(); 5462 5463 if (truncatedHtml.length < html.length) { 5464 $container.html(truncatedHtml); 5465 } 5466 }, 5467 5468 truncateTitle : function($els, truncatePrice) { 5469 $els.find('.product-name').each(function () { 5470 var $titleEl = $(this).find("span"); 5471 var containerHeight = $(this).height(); 5472 5473 while ($titleEl.outerHeight() > containerHeight) { 5474 $titleEl.text(function (index, text) { 5475 return text.replace(/\W*\s(\S)*$/, '...'); 5476 }); 5477 } 5478 }); 5479 5480 if (truncatePrice) { 5481 $els.find('#stickyPricePH').each(function () { 5482 var containerHeight = $(this).height(); 5483 while ($(this).outerHeight() > containerHeight) { 5484 $(this).text(function (index, text) { 5485 return text.replace(/\W*\s(\S)*$/, '...'); 5486 }); 5487 } 5488 }); 5489 } 5490 }, 5491 5492 /** 5493 * Throttling function callbacks to fire at a given timeout. 5494 * Useful for event tracking (such as scrolling or resizing) 5495 * to prevent firing callback every 1ms. 5496 * 5497 * @param fn 5498 * @param threshold 5499 * @param scope 5500 * @returns {Function} 5501 */ 5502 throttle: function (fn, threshold, scope) { 5503 var last, deferTimer; 5504 threshold || (threshold = 250); 5505 return function () { 5506 var context = scope || this; 5507 var now = +new Date, args = arguments; 5508 5509 if (last && now < last + threshold) { 5510 // hold on to it 5511 clearTimeout(deferTimer); 5512 deferTimer = setTimeout(function () { 5513 last = now; 5514 fn.apply(context, args); 5515 }, threshold); 5516 } else { 5517 last = now; 5518 fn.apply(context, args); 5519 } 5520 }; 5521 }, 5522 5523 /** 5524 * Converts a URL protocol to relative protocol 5525 * 5526 * @param url String 5527 */ 5528 prepareURL: function (url) { 5529 return url.replace(/http:|https:/, ''); 5530 }, 5531 5532 /** 5533 * Messages 5534 */ 5535 messages: { 5536 $globalMsgs: $('#global-messages'), 5537 5538 addSuccess: function (msg, append) { 5539 this.addMessage('success', msg, append); 5540 }, 5541 5542 addError: function (msg, append) { 5543 this.addMessage('error', msg, append); 5544 }, 5545 5546 /** 5547 * Adds a message to the global messages area. Has option to append or just overwrite 5548 * 5549 * @param type String 5550 * @param msg String 5551 * @param append boolean 5552 */ 5553 addMessage: function (type, msg, append, $altMsgContainer) { 5554 var $msgsCntr = ($altMsgContainer) ? $altMsgContainer : this.$globalMsgs; 5555 append || (append = false); 5556 switch (type) { 5557 case "success": 5558 // build classes and markup 5559 var message = '<li class="positive">' + msg + '</li>'; 5560 if (append) { 5561 var $appendTo = $msgsCntr.find('.messages .positive').filter(':last-child'); 5562 } 5563 break; 5564 case "error": 5565 // build classes and markup 5566 var message = '<li class="negative">' + msg + '</li>'; 5567 if (append) { 5568 var $appendTo = $msgsCntr.find('.messages .negative').filter(':last-child'); 5569 } 5570 break; 5571 default: 5572 var message = '<li class="neutral">' + msg + '</li>'; 5573 if (append) { 5574 var $appendTo = $msgsCntr.find('.messages .neutral').filter(':last-child'); 5575 } 5576 break; 5577 } 5578 5579 // if set to append, lets append it to the correct ul list else replace html with new messages 5580 if (append) { 5581 if ($appendTo.length) { 5582 $appendTo.after(message); 5583 } else { 5584 if (typeof $msgsCntr !== 'undefined') $msgsCntr.append('<ul class="messages">' + message + '</ul>'); 5585 } 5586 } else { 5587 $msgsCntr.html('<ul class="messages">' + message + '</ul>'); 5588 } 5589 // append to where the messages belong. 5590 }, 5591 5592 clearMessages: function ($altMsgContainer) { 5593 var $msgsCntr = ($altMsgContainer) ? $altMsgContainer : this.$globalMsgs; 5594 $msgsCntr.html(''); 5595 }, 5596 5597 /** 5598 * Adds a group of messages formatted in a json object/array 5599 * 5600 * @param msgs 5601 * @returns {string} 5602 */ 5603 addMessages: function (msgs, type, append, $altMsgContainer) { 5604 type || (type = 'error'); 5605 this.clearMessages($altMsgContainer); 5606 if (msgs instanceof Array) { 5607 for (var i = 0; i < msgs.length; i++) { 5608 this.addMessage(type, msgs[i], append, $altMsgContainer); 5609 } 5610 } else { 5611 this.addMessage(type, msgs, append, $altMsgContainer); 5612 } 5613 } 5614 }, 5615 5616 scrollTo: function ($container, check, duration) { 5617 check || (check = false); 5618 duration || (duration = 300); 5619 if (!check || (check && $container.offset().top < window.scrollY)) { 5620 $('html, body').animate({ scrollTop: $container.offset().top }, duration); 5621 } 5622 }, 5623 5624 /** 5625 * Custom Radio Buttons 5626 */ 5627 customRadio: { 5628 init: function ($customRadios) { 5629 var _self = this; 5630 5631 if ($customRadios.length) { 5632 $customRadios.each(function () { 5633 var $this = jQuery(this); 5634 5635 // if the select has class no-custom-radio or ng material then dont apply drop down overlay 5636 if ($this.hasClass('no-custom-radio') || $this.hasClass('md-visually-hidden')) { 5637 return; 5638 } 5639 5640 if (!$this.parent('.style-radio').length) { 5641 $this.wrap('<div class="style-radio" />'); 5642 } 5643 if ($this.prop('checked')) { 5644 $this.parent('.style-radio').addClass('active'); 5645 } 5646 }); 5647 $customRadios.on('click', function () { 5648 _self.update($(this)); 5649 }); 5650 } 5651 }, 5652 update: function ($radio) { 5653 jQuery('input[name="' + $radio.prop('name') + '"]').prop("checked", false).parent('.style-radio').removeClass('active'); 5654 $radio.prop("checked", true).parent('.style-radio').addClass('active'); 5655 } 5656 }, 5657 5658 /** 5659 * Custom Checkboxes 5660 */ 5661 customCheckbox: { 5662 init: function ($customCheckbox) { 5663 var _self = this; 5664 5665 if ($customCheckbox.length) { 5666 $customCheckbox.each(function () { 5667 var $this = jQuery(this); 5668 5669 // if the select has class no-custom-radio or is ng material then dont apply drop down overlay
5670 if ($this.hasClass('no-custom-checkbox') || $this.hasClass('md-visually-hidden')) { 5671 return; 5672 } 5673 5674 if (!$this.parent('.style-checkbox').length) { 5675 if ($this.parent('.skip-plp').length) { 5676 $this.wrap('<div class="style-checkbox" />'); 5677 } else { 5678 $this.wrap('<div class="style-checkbox" />'); //role="checkbox" aria-checked="false" 5679 } 5680 5681 } 5682 _self.update($this); 5683 }); 5684 $customCheckbox.on('change', function () { 5685 _self.update(jQuery(this)); 5686 }); 5687 5688 //support for space bar toggling the checkbox state 5689 $customCheckbox.on('keyup', function (e) { 5690 if (e.keyCode === 32) { 5691 _self.update(jQuery(this)); 5692 } 5693 }); 5694 } 5695 }, 5696 update: function ($checkBox) { 5697 if ($checkBox.prop("checked") || $checkBox.is(':checked')) { //2nd handles Chrome issue 5698 $checkBox.parent().addClass('active'); 5699 if (!$checkBox.parent().parent('.skip-plp').length) { 5700 //$checkBox.parent().attr('aria-checked', 'true'); A360 5701 } 5702 } else { 5703 $checkBox.parent().removeClass('active'); 5704 if (!$checkBox.parent().parent('.skip-plp').length) { 5705 //$checkBox.parent().attr('aria-checked', 'false'); A360 5706 } 5707 } 5708 5709 if ($checkBox.prop("disabled")) { 5710 $checkBox.parent().addClass('disabled'); 5711 } else { 5712 $checkBox.parent().removeClass('disabled'); 5713 } 5714 } 5715 }, 5716 5717 /** 5718 * Custom Star Radio Buttons for Review Form 5719 */ 5720 starRadios: { 5721 init: function ($starRadios) { 5722 var _self = this; 5723 5724 if ($starRadios.length) { 5725 $starRadios.wrap('<div class="style-radio" />'); 5726 $starRadios.on('click', function () { 5727 jQuery(this).prop("checked", true); 5728 _self.update(jQuery(this)); 5729 }); 5730 $starRadios.hover( 5731 function () { 5732 _self.update(jQuery(this)); 5733 }, 5734 function () { 5735 var checked = jQuery(this).parents('#stars').find($starRadios + ':checked'); 5736 if (checked.length) { 5737 _self.update(jQuery(checked)); 5738 } else { 5739 jQuery('#stars').children().removeClass('active'); 5740 } 5741 } 5742 ); 5743 } 5744 }, 5745 update: function ($this) { 5746 $this.parent().siblings().removeClass('active'); 5747 $this.parent().addClass('active').prevAll().addClass('active'); 5748 } 5749 }, 5750 5751 initForms: function () { 5752 Gorilla.util.customCheckbox.init($(':checkbox')); 5753 Gorilla.util.customRadio.init($(':radio')); 5754 $('form.labelify').labelify({ dim: true }); 5755 $('select').customSelect({ 'calculateWidth': false }); 5756 5757 // this event handler gets added multiple times when quickviews are used :( 5758 //for PDP pages with select boxes, give visual cue to user to select drop downs in correct order if they attempt to select from a disabled option selection box. 5759 $('.customStyleSelectBox.disabled').click(function () { //when clicking disabled option box... 5760 var $form = $(this).closest("form"); 5761 var $selBox = $('.customStyleSelectBox:not(.disabled)', $form).last(); 5762 $selBox.css('border-color', '#AC162C').css('background-color', '#f3a5b1'); //make required first selection box red 5763 5764 var top = $selBox.offset().top - 100; //scroll required box into view if not in current view 5765 if ($(window).scrollTop() > top) 5766 $('html, body').animate({ scrollTop: top }, 250); 5767 5768 setTimeout(function () { //change required box back to normal display after 1.5 seconds. 5769 $selBox.css('border-color', '').css('background-color', ''); 5770 }, 1500); 5771 }); 5772 }, 5773 5774 /** 5775 * Toggle Form element visibility 5776 * @param elm 5777 * @param arg 5778 */ 5779 toggleForm: function ($elm, arg) { 5780 5781 //test boolean or string 5782 if (arg == true || arg == 'true') { 5783 $elm.show(); 5784 Gorilla.util.initForms();
vendor: 6,702 bytes, lines 5785-6033
5785 } else { 5786 $elm.hide(); 5787 } 5788 }, 5789 5790 /** 5791 * Add/Remove validation classes 5792 * @param $elm 5793 * @param arg 5794 */ 5795 //this won't be needed as the plugin doesn't validate hidden elements 5796 toggleValidation: function ($elm, arg) { 5797 if (arg == true || arg == 'true') { 5798 $elm.find('.validate').addClass('required'); 5799 } else { 5800 $elm.find('.validate').removeClass('required'); 5801 } 5802 } 5803}; 5804 5805/* ======================================================================== 5806 * Bootstrap: transition.js v3.0.0 5807 * http://twbs.github.com/bootstrap/javascript.html#transitions 5808 * ======================================================================== 5809 * Copyright 2013 Twitter, Inc. 5810 * 5811 * Licensed under the Apache License, Version 2.0 (the "License"); 5812 * you may not use this file except in compliance with the License. 5813 * You may obtain a copy of the License at 5814 * 5815 * http://www.apache.org/licenses/LICENSE-2.0 5816 * 5817 * Unless required by applicable law or agreed to in writing, software 5818 * distributed under the License is distributed on an "AS IS" BASIS, 5819 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5820 * See the License for the specific language governing permissions and 5821 * limitations under the License. 5822 * ======================================================================== */ 5823 5824+function ($) { 5825 "use strict"; 5826 5827 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 5828 // ============================================================ 5829 5830 function transitionEnd() { 5831 var el = document.createElement('bootstrap') 5832 5833 var transEndEventNames = { 5834 'WebkitTransition': 'webkitTransitionEnd', 5835 'MozTransition': 'transitionend', 5836 'OTransition': 'oTransitionEnd otransitionend', 5837 'transition': 'transitionend' 5838 } 5839 5840 for (var name in transEndEventNames) { 5841 if (el.style[name] !== undefined) { 5842 return { end: transEndEventNames[name] } 5843 } 5844 } 5845 } 5846 5847 // http://blog.alexmaccaw.com/css-transitions 5848 $.fn.emulateTransitionEnd = function (duration) { 5849 var called = false, $el = this 5850 $(this).one($.support.transition.end, function () { 5851 called = true 5852 }) 5853 var callback = function () { 5854 if (!called) { 5855 $($el).trigger($.support.transition.end) 5856 } 5857 } 5858 setTimeout(callback, duration) 5859 return this 5860 } 5861 5862 $(function () { 5863 $.support.transition = transitionEnd() 5864 }) 5865 5866}(window.jQuery);; 5867/* 5868 * jQuery Easing v1.4.0 - http://gsgd.co.uk/sandbox/jquery/easing/ 5869 * Open source under the BSD License. 5870 * Copyright © 2008 George McGinley Smith 5871 * All rights reserved. 5872 * https://raw.github.com/gdsmith/jquery-easing/master/LICENSE 5873*/ 5874 5875(function (factory) { 5876 if (typeof define === "function" && define.amd) { 5877 define(['jquery'], function ($) { 5878 return factory($); 5879 }); 5880 } else if (typeof module === "object" && typeof module.exports === "object") { 5881 exports = factory(require('jquery')); 5882 } else { 5883 factory(jQuery); 5884 } 5885})(function($){ 5886 5887// Preserve the original jQuery "swing" easing as "jswing" 5888$.easing['jswing'] = $.easing['swing']; 5889 5890var pow = Math.pow, 5891 sqrt = Math.sqrt, 5892 sin = Math.sin, 5893 cos = Math.cos, 5894 PI = Math.PI, 5895 c1 = 1.70158, 5896 c2 = c1 * 1.525, 5897 c3 = c1 + 1, 5898 c4 = ( 2 * PI ) / 3, 5899 c5 = ( 2 * PI ) / 4.5; 5900 5901// x is the fraction of animation progress, in the range 0..1 5902function bounceOut(x) { 5903 var n1 = 7.5625, 5904 d1 = 2.75; 5905 if ( x < 1/d1 ) { 5906 return n1*x*x; 5907 } else if ( x < 2/d1 ) { 5908 return n1*(x-=(1.5/d1))*x + .75; 5909 } else if ( x < 2.5/d1 ) { 5910 return n1*(x-=(2.25/d1))*x + .9375; 5911 } else { 5912 return n1*(x-=(2.625/d1))*x + .984375; 5913 } 5914} 5915 5916$.extend( $.easing, 5917{ 5918 def: 'easeOutQuad', 5919 swing: function (x) { 5920 return $.easing[$.easing.def](x); 5921 }, 5922 easeInQuad: function (x) { 5923 return x * x; 5924 }, 5925 easeOutQuad: function (x) { 5926 return 1 - ( 1 - x ) * ( 1 - x ); 5927 }, 5928 easeInOutQuad: function (x) { 5929 return x < 0.5 ? 5930 2 * x * x : 5931 1 - pow( -2 * x + 2, 2 ) / 2; 5932 }, 5933 easeInCubic: function (x) { 5934 return x * x * x; 5935 }, 5936 easeOutCubic: function (x) { 5937 return 1 - pow( 1 - x, 3 ); 5938 }, 5939 easeInOutCubic: function (x) { 5940 return x < 0.5 ? 5941 4 * x * x * x : 5942 1 - pow( -2 * x + 2, 3 ) / 2; 5943 }, 5944 easeInQuart: function (x) { 5945 return x * x * x * x; 5946 }, 5947 easeOutQuart: function (x) { 5948 return 1 - pow( 1 - x, 4 ); 5949 }, 5950 easeInOutQuart: function (x) { 5951 return x < 0.5 ? 5952 8 * x * x * x * x : 5953 1 - pow( -2 * x + 2, 4 ) / 2; 5954 }, 5955 easeInQuint: function (x) { 5956 return x * x * x * x * x; 5957 }, 5958 easeOutQuint: function (x) { 5959 return 1 - pow( 1 - x, 5 ); 5960 }, 5961 easeInOutQuint: function (x) { 5962 return x < 0.5 ? 5963 16 * x * x * x * x * x : 5964 1 - pow( -2 * x + 2, 5 ) / 2; 5965 }, 5966 easeInSine: function (x) { 5967 return 1 - cos( x * PI/2 ); 5968 }, 5969 easeOutSine: function (x) { 5970 return sin( x * PI/2 ); 5971 }, 5972 easeInOutSine: function (x) { 5973 return -( cos( PI * x ) - 1 ) / 2; 5974 }, 5975 easeInExpo: function (x) { 5976 return x === 0 ? 0 : pow( 2, 10 * x - 10 ); 5977 }, 5978 easeOutExpo: function (x) { 5979 return x === 1 ? 1 : 1 - pow( 2, -10 * x ); 5980 }, 5981 easeInOutExpo: function (x) { 5982 return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? 5983 pow( 2, 20 * x - 10 ) / 2 : 5984 ( 2 - pow( 2, -20 * x + 10 ) ) / 2; 5985 }, 5986 easeInCirc: function (x) { 5987 return 1 - sqrt( 1 - pow( x, 2 ) ); 5988 }, 5989 easeOutCirc: function (x) { 5990 return sqrt( 1 - pow( x - 1, 2 ) ); 5991 }, 5992 easeInOutCirc: function (x) { 5993 return x < 0.5 ? 5994 ( 1 - sqrt( 1 - pow( 2 * x, 2 ) ) ) / 2 : 5995 ( sqrt( 1 - pow( -2 * x + 2, 2 ) ) + 1 ) / 2; 5996 }, 5997 easeInElastic: function (x) { 5998 return x === 0 ? 0 : x === 1 ? 1 : 5999 -pow( 2, 10 * x - 10 ) * sin( ( x * 10 - 10.75 ) * c4 ); 6000 }, 6001 easeOutElastic: function (x) { 6002 return x === 0 ? 0 : x === 1 ? 1 : 6003 pow( 2, -10 * x ) * sin( ( x * 10 - 0.75 ) * c4 ) + 1; 6004 }, 6005 easeInOutElastic: function (x) { 6006 return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? 6007 -( pow( 2, 20 * x - 10 ) * sin( ( 20 * x - 11.125 ) * c5 )) / 2 : 6008 pow( 2, -20 * x + 10 ) * sin( ( 20 * x - 11.125 ) * c5 ) / 2 + 1; 6009 }, 6010 easeInBack: function (x) { 6011 return c3 * x * x * x - c1 * x * x; 6012 }, 6013 easeOutBack: function (x) { 6014 return 1 + c3 * pow( x - 1, 3 ) + c1 * pow( x - 1, 2 ); 6015 }, 6016 easeInOutBack: function (x) { 6017 return x < 0.5 ? 6018 ( pow( 2 * x, 2 ) * ( ( c2 + 1 ) * 2 * x - c2 ) ) / 2 : 6019 ( pow( 2 * x - 2, 2 ) *( ( c2 + 1 ) * ( x * 2 - 2 ) + c2 ) + 2 ) / 2; 6020 }, 6021 easeInBounce: function (x) { 6022 return 1 - bounceOut( 1 - x ); 6023 }, 6024 easeOutBounce: bounceOut, 6025 easeInOutBounce: function (x) { 6026 return x < 0.5 ? 6027 ( 1 - bounceOut( 1 - 2 * x ) ) / 2 : 6028 ( 1 + bounceOut( 2 * x - 1 ) ) / 2; 6029 } 6030}); 6031 6032}); 6033;
6034/*! 6035 * jQuery Validation Plugin v1.15.1 6036 * 6037 * http://jqueryvalidation.org/ 6038 * 6039 * Copyright (c) 2016 Jörn Zaefferer 6040 * Released under the MIT license 6041 */ 6042(function( factory ) { 6043 if ( typeof define === "function" && define.amd ) { 6044 define( ["jquery"], factory ); 6045 } else if (typeof module === "object" && module.exports) { 6046 module.exports = factory( require( "jquery" ) ); 6047 } else { 6048 factory( jQuery ); 6049 } 6050}(function( $ ) { 6051 6052$.extend( $.fn, { 6053 6054 // http://jqueryvalidation.org/validate/ 6055 validate: function( options ) { 6056 6057 // If nothing is selected, return nothing; can't chain anyway 6058 if ( !this.length ) { 6059 if ( options && options.debug && window.console ) { 6060 console.warn( "Nothing selected, can't validate, returning nothing." ); 6061 } 6062 return; 6063 } 6064 6065 // Check if a validator for this form was already created 6066 var validator = $.data( this[ 0 ], "validator" ); 6067 if ( validator ) { 6068 return validator; 6069 } 6070 6071 // Add novalidate tag if HTML5. 6072 this.attr( "novalidate", "novalidate" ); 6073 6074 validator = new $.validator( options, this[ 0 ] ); 6075 $.data( this[ 0 ], "validator", validator ); 6076 6077 if ( validator.settings.onsubmit ) { 6078 6079 this.on( "click.validate", ":submit", function( event ) { 6080 if ( validator.settings.submitHandler ) { 6081 validator.submitButton = event.target; 6082 } 6083 6084 // Allow suppressing validation by adding a cancel class to the submit button 6085 if ( $( this ).hasClass( "cancel" ) ) { 6086 validator.cancelSubmit = true; 6087 } 6088 6089 // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button 6090 if ( $( this ).attr( "formnovalidate" ) !== undefined ) { 6091 validator.cancelSubmit = true; 6092 } 6093 } ); 6094 6095 // Validate the form on submit 6096 this.on( "submit.validate", function( event ) { 6097 if ( validator.settings.debug ) { 6098 6099 // Prevent form submit to be able to see console output 6100 event.preventDefault(); 6101 } 6102 function handle() { 6103 var hidden, result; 6104 if ( validator.settings.submitHandler ) { 6105 if ( validator.submitButton ) { 6106 6107 // Insert a hidden input as a replacement for the missing submit button 6108 hidden = $( "<input type='hidden'/>" ) 6109 .attr( "name", validator.submitButton.name ) 6110 .val( $( validator.submitButton ).val() ) 6111 .appendTo( validator.currentForm ); 6112 } 6113 result = validator.settings.submitHandler.call( validator, validator.currentForm, event ); 6114 if ( validator.submitButton ) { 6115 6116 // And clean up afterwards; thanks to no-block-scope, hidden can be referenced 6117 hidden.remove(); 6118 } 6119 if ( result !== undefined ) { 6120 return result; 6121 } 6122 return false; 6123 } 6124 return true; 6125 } 6126 6127 // Prevent submit for invalid forms or custom submit handlers 6128 if ( validator.cancelSubmit ) { 6129 validator.cancelSubmit = false; 6130 return handle(); 6131 } 6132 if ( validator.form() ) { 6133 if ( validator.pendingRequest ) { 6134 validator.formSubmitted = true; 6135 return false; 6136 } 6137 return handle(); 6138 } else { 6139 validator.focusInvalid(); 6140 return false; 6141 } 6142 } ); 6143 } 6144 6145 return validator; 6146 }, 6147 6148 // http://jqueryvalidation.org/valid/ 6149 valid: function() { 6150 var valid, validator, errorList; 6151 6152 if ( $( this[ 0 ] ).is( "form" ) ) { 6153 valid = this.validate().form(); 6154 } else { 6155 errorList = []; 6156 valid = true; 6157 validator = $( this[ 0 ].form ).validate(); 6158 this.each( function() { 6159 valid = validator.element( this ) && valid; 6160 if ( !valid ) { 6161 errorList = errorList.concat( validator.errorList ); 6162 } 6163 } ); 6164 validator.errorList = errorList; 6165 } 6166 return valid; 6167 }, 6168 6169 // http://jqueryvalidation.org/rules/ 6170 rules: function( command, argument ) { 6171 var element = this[ 0 ], 6172 settings, staticRules, existingRules, data, param, filtered; 6173 6174 // If nothing is selected, return empty object; can't chain anyway 6175 if ( element == null || element.form == null ) { 6176 return; 6177 } 6178 6179 if ( command ) { 6180 settings = $.data( element.form, "validator" ).settings; 6181 staticRules = settings.rules; 6182 existingRules = $.validator.staticRules( element ); 6183 switch ( command ) { 6184 case "add": 6185 $.extend( existingRules, $.validator.normalizeRule( argument ) ); 6186 6187 // Remove messages from rules, but allow them to be set separately 6188 delete existingRules.messages; 6189 staticRules[ element.name ] = existingRules; 6190 if ( argument.messages ) { 6191 settings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages ); 6192 } 6193 break; 6194 case "remove": 6195 if ( !argument ) { 6196 delete staticRules[ element.name ]; 6197 return existingRules; 6198 } 6199 filtered = {}; 6200 $.each( argument.split( /\s/ ), function( index, method ) { 6201 filtered[ method ] = existingRules[ method ]; 6202 delete existingRules[ method ]; 6203 if ( method === "required" ) { 6204 $( element ).removeAttr( "aria-required" ); 6205 } 6206 } ); 6207 return filtered; 6208 } 6209 } 6210 6211 data = $.validator.normalizeRules( 6212 $.extend( 6213 {}, 6214 $.validator.classRules( element ), 6215 $.validator.attributeRules( element ), 6216 $.validator.dataRules( element ), 6217 $.validator.staticRules( element ) 6218 ), element ); 6219 6220 // Make sure required is at front 6221 if ( data.required ) { 6222 param = data.required; 6223 delete data.required; 6224 data = $.extend( { required: param }, data ); 6225 $( element ).attr( "aria-required", "true" ); 6226 } 6227 6228 // Make sure remote is at back 6229 if ( data.remote ) { 6230 param = data.remote; 6231 delete data.remote; 6232 data = $.extend( data, { remote: param } ); 6233 } 6234 6235 return data; 6236 } 6237} ); 6238 6239// Custom selectors 6240$.extend( $.expr[ ":" ], { 6241 6242 // http://jqueryvalidation.org/blank-selector/ 6243 blank: function( a ) { 6244 return !$.trim( "" + $( a ).val() ); 6245 }, 6246 6247 // http://jqueryvalidation.org/filled-selector/ 6248 filled: function( a ) { 6249 var val = $( a ).val(); 6250 return val !== null && !!$.trim( "" + val ); 6251 }, 6252 6253 // http://jqueryvalidation.org/unchecked-selector/ 6254 unchecked: function( a ) { 6255 return !$( a ).prop( "checked" ); 6256 } 6257} ); 6258 6259// Constructor for validator 6260$.validator = function( options, form ) { 6261 this.settings = $.extend( true, {}, $.validator.defaults, options ); 6262 this.currentForm = form; 6263 this.init(); 6264}; 6265 6266// http://jqueryvalidation.org/jQuery.validator.format/ 6267$.validator.format = function( source, params ) { 6268 if ( arguments.length === 1 ) { 6269 return function() { 6270 var args = $.makeArray( arguments ); 6271 args.unshift( source ); 6272 return $.validator.format.apply( this, args ); 6273 }; 6274 } 6275 if ( params === undefined ) { 6276 return source; 6277 }
vendor: 10,786 bytes, lines 6278-6595
6278 if ( arguments.length > 2 && params.constructor !== Array ) { 6279 params = $.makeArray( arguments ).slice( 1 ); 6280 } 6281 if ( params.constructor !== Array ) { 6282 params = [ params ]; 6283 } 6284 $.each( params, function( i, n ) { 6285 source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() { 6286 return n; 6287 } ); 6288 } ); 6289 return source; 6290}; 6291 6292$.extend( $.validator, { 6293 6294 defaults: { 6295 messages: {}, 6296 groups: {}, 6297 rules: {}, 6298 errorClass: "error", 6299 pendingClass: "pending", 6300 validClass: "valid", 6301 errorElement: "label", 6302 focusCleanup: false, 6303 focusInvalid: true, 6304 errorContainer: $( [] ), 6305 errorLabelContainer: $( [] ), 6306 onsubmit: true, 6307 ignore: ":hidden", 6308 ignoreTitle: false, 6309 onfocusin: function( element ) { 6310 this.lastActive = element; 6311 6312 // Hide error label and remove error class on focus if enabled 6313 if ( this.settings.focusCleanup ) { 6314 if ( this.settings.unhighlight ) { 6315 this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); 6316 } 6317 this.hideThese( this.errorsFor( element ) ); 6318 } 6319 }, 6320 onfocusout: function( element ) { 6321 // Syntax error, unrecognized expression: label[for=] 6322 // if you find this throwing an error for no apparent reason, you may want to see if the element has an ID. that should help. 6323 // you could also init the field to be ignored via the ignore: property above (see docs: https://jqueryvalidation.org/validate) 6324 if ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) { 6325 this.element( element ); 6326 } 6327 }, 6328 onkeyup: function( element, event ) { 6329 6330 // Avoid revalidate the field when pressing one of the following keys 6331 // Shift => 16 6332 // Ctrl => 17 6333 // Alt => 18 6334 // Caps lock => 20 6335 // End => 35 6336 // Home => 36 6337 // Left arrow => 37 6338 // Up arrow => 38 6339 // Right arrow => 39 6340 // Down arrow => 40 6341 // Insert => 45 6342 // Num lock => 144 6343 // AltGr key => 225 6344 var excludedKeys = [ 6345 16, 17, 18, 20, 35, 36, 37, 6346 38, 39, 40, 45, 144, 225 6347 ]; 6348 6349 if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) { 6350 return; 6351 } else if ( element.name in this.submitted || element.name in this.invalid ) { 6352 this.element( element ); 6353 } 6354 }, 6355 onclick: function( element ) { 6356 6357 // Click on selects, radiobuttons and checkboxes 6358 if ( element.name in this.submitted ) { 6359 this.element( element ); 6360 6361 // Or option elements, check parent select in that case 6362 } else if ( element.parentNode.name in this.submitted ) { 6363 this.element( element.parentNode ); 6364 } 6365 }, 6366 highlight: function( element, errorClass, validClass ) { 6367 if ( element.type === "radio" ) { 6368 this.findByName( element.name ).addClass( errorClass ).removeClass( validClass ); 6369 } else { 6370 $( element ).addClass( errorClass ).removeClass( validClass ); 6371 } 6372 }, 6373 unhighlight: function( element, errorClass, validClass ) { 6374 if ( element.type === "radio" ) { 6375 this.findByName( element.name ).removeClass( errorClass ).addClass( validClass ); 6376 } else { 6377 $( element ).removeClass( errorClass ).addClass( validClass ); 6378 } 6379 } 6380 }, 6381 6382 // http://jqueryvalidation.org/jQuery.validator.setDefaults/ 6383 setDefaults: function( settings ) { 6384 $.extend( $.validator.defaults, settings ); 6385 }, 6386 6387 messages: { 6388 required: "This field is required.", 6389 remote: "Please fix this field.", 6390 email: "Please enter a valid email address.", 6391 url: "Please enter a valid URL.", 6392 date: "Please enter a valid date.", 6393 dateISO: "Please enter a valid date (ISO).", 6394 alpha: "Please enter only letters.", 6395 dogtag: "Please enter only letters, numbers or -/.,;'", 6396 dogtagall: "Please fill in at least one of these fields.", 6397 number: "Please enter a valid number.", 6398 digits: "Please enter only digits.", 6399 creditcard: "Please enter a valid credit card number.", 6400 equalTo: "Please enter the same value again.", 6401 maxlength: $.validator.format( "Please enter no more than {0} characters." ), 6402 minlength: $.validator.format( "Please enter at least {0} characters." ), 6403 rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ), 6404 range: $.validator.format( "Please enter a value between {0} and {1}." ), 6405 max: $.validator.format( "Please enter a value less than or equal to {0}." ), 6406 min: $.validator.format( "Please enter a value greater than or equal to {0}." ), 6407 step: $.validator.format( "Please enter a multiple of {0}." ) 6408 }, 6409 6410 autoCreateRanges: false, 6411 6412 prototype: { 6413 6414 init: function() { 6415 this.labelContainer = $( this.settings.errorLabelContainer ); 6416 this.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm ); 6417 this.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer ); 6418 this.submitted = {}; 6419 this.valueCache = {}; 6420 this.pendingRequest = 0; 6421 this.pending = {}; 6422 this.invalid = {}; 6423 this.reset(); 6424 6425 var groups = ( this.groups = {} ), 6426 rules; 6427 $.each( this.settings.groups, function( key, value ) { 6428 if ( typeof value === "string" ) { 6429 value = value.split( /\s/ ); 6430 } 6431 $.each( value, function( index, name ) { 6432 groups[ name ] = key; 6433 } ); 6434 } ); 6435 rules = this.settings.rules; 6436 $.each( rules, function( key, value ) { 6437 rules[ key ] = $.validator.normalizeRule( value ); 6438 } ); 6439 6440 function delegate( event ) { 6441 6442 // Set form expando on contenteditable 6443 if ( !this.form && this.hasAttribute( "contenteditable" ) ) { 6444 this.form = $( this ).closest( "form" )[ 0 ]; 6445 } 6446 if (this.classList.contains('ng-scope') || $(this).is("md-checkbox") || $(this).is("md-select") || $(this).is("md-datepicker") || $(this).is("md-switch") || $(this).is("md-radio-button")) return false; 6447 var validator = $.data( this.form, "validator" ), 6448 eventType = "on" + event.type.replace( /^validate/, "" ), 6449 settings = validator.settings; 6450 if ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) { 6451 settings[ eventType ].call( validator, this, event ); 6452 } 6453 } 6454 6455 $( this.currentForm ) 6456 .on( "focusin.validate focusout.validate keyup.validate", 6457 ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " + 6458 "[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " + 6459 "[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " + 6460 "[type='radio'], [type='checkbox'], [contenteditable]", delegate ) 6461 6462 // Support: Chrome, oldIE 6463 // "select" is provided as event.target when clicking a option 6464 .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate ); 6465 6466 if ( this.settings.invalidHandler ) { 6467 $( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler ); 6468 } 6469 6470 // Add aria-required to any Static/Data/Class required fields before first validation 6471 // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html 6472 $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" ); 6473 }, 6474 6475 // http://jqueryvalidation.org/Validator.form/ 6476 form: function() { 6477 this.checkForm(); 6478 $.extend( this.submitted, this.errorMap ); 6479 this.invalid = $.extend( {}, this.errorMap ); 6480 if ( !this.valid() ) { 6481 $( this.currentForm ).triggerHandler( "invalid-form", [ this ] ); 6482 } 6483 this.showErrors(); 6484 return this.valid(); 6485 }, 6486 6487 checkForm: function() { 6488 this.prepareForm(); 6489 for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) { 6490 this.check( elements[ i ] ); 6491 } 6492 return this.valid(); 6493 }, 6494 6495 // http://jqueryvalidation.org/Validator.element/ 6496 element: function( element ) { 6497 var cleanElement = this.clean( element ), 6498 checkElement = this.validationTargetFor( cleanElement ), 6499 v = this, 6500 result = true, 6501 rs, group; 6502 6503 if ( checkElement === undefined ) { 6504 delete this.invalid[ cleanElement.name ]; 6505 } else { 6506 this.prepareElement( checkElement ); 6507 this.currentElements = $( checkElement ); 6508 6509 // If this element is grouped, then validate all group elements already 6510 // containing a value 6511 group = this.groups[ checkElement.name ]; 6512 if ( group ) { 6513 $.each( this.groups, function( name, testgroup ) { 6514 if ( testgroup === group && name !== checkElement.name ) { 6515 cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) ); 6516 if ( cleanElement && cleanElement.name in v.invalid ) { 6517 v.currentElements.push( cleanElement ); 6518 result = v.check( cleanElement ) && result; 6519 } 6520 } 6521 } ); 6522 } 6523 6524 rs = this.check( checkElement ) !== false; 6525 result = result && rs; 6526 if ( rs ) { 6527 this.invalid[ checkElement.name ] = false; 6528 } else { 6529 this.invalid[ checkElement.name ] = true; 6530 } 6531 6532 if ( !this.numberOfInvalids() ) { 6533 6534 // Hide error containers on last error 6535 this.toHide = this.toHide.add( this.containers ); 6536 } 6537 this.showErrors(); 6538 6539 // Add aria-invalid status for screen readers 6540 $( element ).attr( "aria-invalid", !rs ); 6541 } 6542 6543 return result; 6544 }, 6545 6546 // http://jqueryvalidation.org/Validator.showErrors/ 6547 showErrors: function( errors ) { 6548 if ( errors ) { 6549 var validator = this; 6550 6551 // Add items to error list and map 6552 $.extend( this.errorMap, errors ); 6553 this.errorList = $.map( this.errorMap, function( message, name ) { 6554 return { 6555 message: message, 6556 element: validator.findByName( name )[ 0 ] 6557 }; 6558 } ); 6559 6560 // Remove items from success list 6561 this.successList = $.grep( this.successList, function( element ) { 6562 return !( element.name in errors ); 6563 } ); 6564 } 6565 if ( this.settings.showErrors ) { 6566 this.settings.showErrors.call( this, this.errorMap, this.errorList ); 6567 } else { 6568 this.defaultShowErrors(); 6569 } 6570 }, 6571 6572 // http://jqueryvalidation.org/Validator.resetForm/ 6573 resetForm: function() { 6574 if ( $.fn.resetForm ) { 6575 $( this.currentForm ).resetForm(); 6576 } 6577 this.invalid = {}; 6578 this.submitted = {}; 6579 this.prepareForm(); 6580 this.hideErrors(); 6581 var elements = this.elements() 6582 .removeData( "previousValue" ) 6583 .removeAttr( "aria-invalid" ); 6584 6585 this.resetElements( elements ); 6586 }, 6587 6588 resetElements: function( elements ) { 6589 var i; 6590 6591 if ( this.settings.unhighlight ) { 6592 for ( i = 0; elements[ i ]; i++ ) { 6593 this.settings.unhighlight.call( this, elements[ i ], 6594 this.settings.errorClass, "" ); 6595 this.findByName( elements[ i ].name ).removeClass( this.settings.val
6595idClass ); 6596 } 6597 } else { 6598 elements 6599 .removeClass( this.settings.errorClass ) 6600 .removeClass( this.settings.validClass ); 6601 } 6602 }, 6603 6604 numberOfInvalids: function() { 6605 return this.objectLength( this.invalid ); 6606 }, 6607 6608 objectLength: function( obj ) { 6609 /* jshint unused: false */ 6610 var count = 0, 6611 i; 6612 for ( i in obj ) { 6613 if ( obj[ i ] ) { 6614 count++; 6615 } 6616 } 6617 return count; 6618 }, 6619 6620 hideErrors: function() { 6621 this.hideThese( this.toHide ); 6622 }, 6623 6624 hideThese: function( errors ) { 6625 errors.not( this.containers ).text( "" ); 6626 this.addWrapper( errors ).hide(); 6627 }, 6628 6629 valid: function() { 6630 return this.size() === 0; 6631 }, 6632 6633 size: function() { 6634 return this.errorList.length; 6635 }, 6636 6637 focusInvalid: function() { 6638 if ( this.settings.focusInvalid ) { 6639 try { 6640 $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] ) 6641 .filter( ":visible" ) 6642 .focus() 6643 6644 // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find 6645 .trigger( "focusin" ); 6646 } catch ( e ) { 6647 6648 // Ignore IE throwing errors when focusing hidden elements 6649 } 6650 } 6651 }, 6652 6653 findLastActive: function() { 6654 var lastActive = this.lastActive; 6655 return lastActive && $.grep( this.errorList, function( n ) { 6656 return n.element.name === lastActive.name; 6657 } ).length === 1 && lastActive; 6658 }, 6659 6660 elements: function() { 6661 var validator = this, 6662 rulesCache = {}; 6663 6664 // Select all valid inputs inside the form (no submit or reset buttons) 6665 return $( this.currentForm ) 6666 .find( "input, select, textarea, [contenteditable]" ) 6667 .not( ":submit, :reset, :image, :disabled" ) 6668 .not( this.settings.ignore ) 6669 .filter( function() { 6670 var name = this.name || $( this ).attr( "name" ); // For contenteditable 6671 if ( !name && validator.settings.debug && window.console ) { 6672 console.error( "%o has no name assigned", this ); 6673 } 6674 6675 // Set form expando on contenteditable 6676 if ( this.hasAttribute( "contenteditable" ) ) { 6677 this.form = $( this ).closest( "form" )[ 0 ]; 6678 } 6679 6680 // Select only the first element for each name, and only those with rules specified 6681 if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) { 6682 return false; 6683 } 6684 6685 rulesCache[ name ] = true; 6686 return true; 6687 } ); 6688 }, 6689 6690 clean: function( selector ) { 6691 return $( selector )[ 0 ]; 6692 }, 6693 6694 errors: function() { 6695 var errorClass = this.settings.errorClass.split( " " ).join( "." ); 6696 return $( this.settings.errorElement + "." + errorClass, this.errorContext ); 6697 }, 6698 6699 resetInternals: function() { 6700 this.successList = []; 6701 this.errorList = []; 6702 this.errorMap = {}; 6703 this.toShow = $( [] ); 6704 this.toHide = $( [] ); 6705 }, 6706 6707 reset: function() { 6708 this.resetInternals(); 6709 this.currentElements = $( [] ); 6710 }, 6711 6712 prepareForm: function() { 6713 this.reset(); 6714 this.toHide = this.errors().add( this.containers ); 6715 }, 6716 6717 prepareElement: function( element ) { 6718 this.reset(); 6719 this.toHide = this.errorsFor( element ); 6720 }, 6721 6722 elementValue: function( element ) { 6723 var $element = $( element ), 6724 type = element.type, 6725 val, idx; 6726 6727 if ( type === "radio" || type === "checkbox" ) { 6728 return this.findByName( element.name ).filter( ":checked" ).val(); 6729 } else if ( type === "number" && typeof element.validity !== "undefined" ) { 6730 return element.validity.badInput ? "NaN" : $element.val(); 6731 } 6732 6733 if ( element.hasAttribute( "contenteditable" ) ) { 6734 val = $element.text(); 6735 } else { 6736 val = $element.val(); 6737 } 6738 6739 if ( type === "file" ) { 6740 6741 // Modern browser (chrome & safari) 6742 if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) { 6743 return val.substr( 12 ); 6744 } 6745 6746 // Legacy browsers 6747 // Unix-based path 6748 idx = val.lastIndexOf( "/" ); 6749 if ( idx >= 0 ) { 6750 return val.substr( idx + 1 ); 6751 } 6752 6753 // Windows-based path 6754 idx = val.lastIndexOf( "\\" ); 6755 if ( idx >= 0 ) { 6756 return val.substr( idx + 1 ); 6757 } 6758 6759 // Just the file name 6760 return val; 6761 } 6762 6763 if ( typeof val === "string" ) { 6764 return val.replace( /\r/g, "" ); 6765 } 6766 return val; 6767 }, 6768 6769 check: function( element ) { 6770 element = this.validationTargetFor( this.clean( element ) ); 6771 6772 var rules = $( element ).rules(), 6773 rulesCount = $.map( rules, function( n, i ) { 6774 return i; 6775 } ).length, 6776 dependencyMismatch = false, 6777 val = this.elementValue( element ), 6778 result, method, rule; 6779 6780 // If a normalizer is defined for this element, then 6781 // call it to retreive the changed value instead 6782 // of using the real one. 6783 // Note that `this` in the normalizer is `element`. 6784 if ( typeof rules.normalizer === "function" ) { 6785 val = rules.normalizer.call( element, val ); 6786 6787 if ( typeof val !== "string" ) { 6788 throw new TypeError( "The normalizer should return a string value." ); 6789 } 6790 6791 // Delete the normalizer from rules to avoid treating 6792 // it as a pre-defined method. 6793 delete rules.normalizer; 6794 } 6795 6796 for ( method in rules ) { 6797 rule = { method: method, parameters: rules[ method ] };
vendor: 24,458 bytes, lines 6798-7535
6798 try { 6799 result = $.validator.methods[ method ].call( this, val, element, rule.parameters ); 6800 6801 // If a method indicates that the field is optional and therefore valid, 6802 // don't mark it as valid when there are no other rules 6803 if ( result === "dependency-mismatch" && rulesCount === 1 ) { 6804 dependencyMismatch = true; 6805 continue; 6806 } 6807 dependencyMismatch = false; 6808 6809 if ( result === "pending" ) { 6810 this.toHide = this.toHide.not( this.errorsFor( element ) ); 6811 return; 6812 } 6813 6814 if ( !result ) { 6815 this.formatAndAdd( element, rule ); 6816 return false; 6817 } 6818 } catch ( e ) { 6819 if ( this.settings.debug && window.console ) { 6820 console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e ); 6821 } 6822 if ( e instanceof TypeError ) { 6823 e.message += ". Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method."; 6824 } 6825 6826 throw e; 6827 } 6828 } 6829 if ( dependencyMismatch ) { 6830 return; 6831 } 6832 if ( this.objectLength( rules ) ) { 6833 this.successList.push( element ); 6834 } 6835 return true; 6836 }, 6837 6838 // Return the custom message for the given element and validation method 6839 // specified in the element's HTML5 data attribute 6840 // return the generic message if present and no method specific message is present 6841 customDataMessage: function( element, method ) { 6842 return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() + 6843 method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" ); 6844 }, 6845 6846 // Return the custom message for the given element name and validation method 6847 customMessage: function( name, method ) { 6848 var m = this.settings.messages[ name ]; 6849 return m && ( m.constructor === String ? m : m[ method ] ); 6850 }, 6851 6852 // Return the first defined argument, allowing empty strings 6853 findDefined: function() { 6854 for ( var i = 0; i < arguments.length; i++ ) { 6855 if ( arguments[ i ] !== undefined ) { 6856 return arguments[ i ]; 6857 } 6858 } 6859 return undefined; 6860 }, 6861 6862 // The second parameter 'rule' used to be a string, and extended to an object literal 6863 // of the following form: 6864 // rule = { 6865 // method: "method name", 6866 // parameters: "the given method parameters" 6867 // } 6868 // 6869 // The old behavior still supported, kept to maintain backward compatibility with 6870 // old code, and will be removed in the next major release. 6871 defaultMessage: function( element, rule ) { 6872 if ( typeof rule === "string" ) { 6873 rule = { method: rule }; 6874 } 6875 6876 var message = this.findDefined( 6877 this.customMessage( element.name, rule.method ), 6878 this.customDataMessage( element, rule.method ), 6879 6880 // 'title' is never undefined, so handle empty string as undefined 6881 !this.settings.ignoreTitle && element.title || undefined, 6882 $.validator.messages[ rule.method ], 6883 "<strong>Warning: No message defined for " + element.name + "</strong>" 6884 ), 6885 theregex = /\$?\{(\d+)\}/g; 6886 if ( typeof message === "function" ) { 6887 message = message.call( this, rule.parameters, element ); 6888 } else if ( theregex.test( message ) ) { 6889 message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters ); 6890 } 6891 6892 return message; 6893 }, 6894 6895 formatAndAdd: function( element, rule ) { 6896 var message = this.defaultMessage( element, rule ); 6897 6898 this.errorList.push( { 6899 message: message, 6900 element: element, 6901 method: rule.method 6902 } ); 6903 6904 this.errorMap[ element.name ] = message; 6905 this.submitted[ element.name ] = message; 6906 }, 6907 6908 addWrapper: function( toToggle ) { 6909 if ( this.settings.wrapper ) { 6910 toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); 6911 } 6912 return toToggle; 6913 }, 6914 6915 defaultShowErrors: function() { 6916 var i, elements, error; 6917 for ( i = 0; this.errorList[ i ]; i++ ) { 6918 error = this.errorList[ i ]; 6919 if ( this.settings.highlight ) { 6920 this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); 6921 } 6922 this.showLabel( error.element, error.message ); 6923 } 6924 if ( this.errorList.length ) { 6925 this.toShow = this.toShow.add( this.containers ); 6926 } 6927 if ( this.settings.success ) { 6928 for ( i = 0; this.successList[ i ]; i++ ) { 6929 this.showLabel( this.successList[ i ] ); 6930 } 6931 } 6932 if ( this.settings.unhighlight ) { 6933 for ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) { 6934 this.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass ); 6935 } 6936 } 6937 this.toHide = this.toHide.not( this.toShow ); 6938 this.hideErrors(); 6939 this.addWrapper( this.toShow ).show(); 6940 }, 6941 6942 validElements: function() { 6943 return this.currentElements.not( this.invalidElements() ); 6944 }, 6945 6946 invalidElements: function() { 6947 return $( this.errorList ).map( function() { 6948 return this.element; 6949 } ); 6950 }, 6951 6952 showLabel: function( element, message ) { 6953 var place, group, errorID, v, 6954 error = this.errorsFor( element ), 6955 elementID = this.idOrName( element ), 6956 describedBy = $( element ).attr( "aria-describedby" ); 6957 6958 if ( error.length ) { 6959 6960 // Refresh error/success class 6961 error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass ); 6962 6963 // Replace message on existing label 6964 error.html( message ); 6965 } else { 6966 6967 // Create error element 6968 error = $( "<" + this.settings.errorElement + ">" ) 6969 .attr( "id", elementID + "-error" ) 6970 .addClass( this.settings.errorClass ) 6971 .html( message || "" ); 6972 6973 // Maintain reference to the element to be placed into the DOM 6974 place = error; 6975 if ( this.settings.wrapper ) { 6976 6977 // Make sure the element is visible, even in IE 6978 // actually showing the wrapped element is handled elsewhere 6979 place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent(); 6980 } 6981 if ( this.labelContainer.length ) { 6982 this.labelContainer.append( place ); 6983 } else if ( this.settings.errorPlacement ) { 6984 this.settings.errorPlacement.call( this, place, $( element ) ); 6985 } else { 6986 place.insertAfter( element ); 6987 } 6988 6989 // Link error back to the element 6990 if ( error.is( "label" ) ) { 6991 6992 // If the error is a label, then associate using 'for' 6993 error.attr( "for", elementID ); 6994 6995 // If the element is not a child of an associated label, then it's necessary 6996 // to explicitly apply aria-describedby 6997 } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) { 6998 errorID = error.attr( "id" ); 6999 7000 // Respect existing non-error aria-describedby 7001 if ( !describedBy ) { 7002 describedBy = errorID; 7003 } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) { 7004 7005 // Add to end of list if not already present 7006 describedBy += " " + errorID; 7007 } 7008 $( element ).attr( "aria-describedby", describedBy ); 7009 7010 // If this element is grouped, then assign to all elements in the same group 7011 group = this.groups[ element.name ]; 7012 if ( group ) { 7013 v = this; 7014 $.each( v.groups, function( name, testgroup ) { 7015 if ( testgroup === group ) { 7016 $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm ) 7017 .attr( "aria-describedby", error.attr( "id" ) ); 7018 } 7019 } ); 7020 } 7021 } 7022 } 7023 if ( !message && this.settings.success ) { 7024 error.text( "" ); 7025 if ( typeof this.settings.success === "string" ) { 7026 error.addClass( this.settings.success ); 7027 } else { 7028 this.settings.success( error, element ); 7029 } 7030 } 7031 this.toShow = this.toShow.add( error ); 7032 }, 7033 7034 errorsFor: function( element ) { 7035 var name = this.escapeCssMeta( this.idOrName( element ) ), 7036 describer = $( element ).attr( "aria-describedby" ), 7037 selector = "label[for='" + name + "'], label[for='" + name + "'] *"; 7038 7039 // 'aria-describedby' should directly reference the error element 7040 if ( describer ) { 7041 selector = selector + ", #" + this.escapeCssMeta( describer ) 7042 .replace( /\s+/g, ", #" ); 7043 } 7044 7045 return this 7046 .errors() 7047 .filter( selector ); 7048 }, 7049 7050 // See https://api.jquery.com/category/selectors/, for CSS 7051 // meta-characters that should be escaped in order to be used with JQuery 7052 // as a literal part of a name/id or any selector. 7053 escapeCssMeta: function( string ) { 7054 return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" ); 7055 }, 7056 7057 idOrName: function( element ) { 7058 return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name ); 7059 }, 7060 7061 validationTargetFor: function( element ) { 7062 7063 // If radio/checkbox, validate first element in group instead 7064 if ( this.checkable( element ) ) { 7065 element = this.findByName( element.name ); 7066 } 7067 7068 // Always apply ignore filter 7069 return $( element ).not( this.settings.ignore )[ 0 ]; 7070 }, 7071 7072 checkable: function( element ) { 7073 return ( /radio|checkbox/i ).test( element.type ); 7074 }, 7075 7076 findByName: function( name ) { 7077 return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" ); 7078 }, 7079 7080 getLength: function( value, element ) { 7081 switch ( element.nodeName.toLowerCase() ) { 7082 case "select": 7083 return $( "option:selected", element ).length; 7084 case "input": 7085 if ( this.checkable( element ) ) { 7086 return this.findByName( element.name ).filter( ":checked" ).length; 7087 } 7088 } 7089 return value.length; 7090 }, 7091 7092 depend: function( param, element ) { 7093 return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true; 7094 }, 7095 7096 dependTypes: { 7097 "boolean": function( param ) { 7098 return param; 7099 }, 7100 "string": function( param, element ) { 7101 return !!$( param, element.form ).length; 7102 }, 7103 "function": function( param, element ) { 7104 return param( element ); 7105 } 7106 }, 7107 7108 optional: function( element ) { 7109 var val = this.elementValue( element ); 7110 return !$.validator.methods.required.call( this, val, element ) && "dependency-mismatch"; 7111 }, 7112 7113 startRequest: function( element ) { 7114 if ( !this.pending[ element.name ] ) { 7115 this.pendingRequest++; 7116 $( element ).addClass( this.settings.pendingClass ); 7117 this.pending[ element.name ] = true; 7118 } 7119 }, 7120 7121 stopRequest: function( element, valid ) { 7122 this.pendingRequest--; 7123 7124 // Sometimes synchronization fails, make sure pendingRequest is never < 0 7125 if ( this.pendingRequest < 0 ) { 7126 this.pendingRequest = 0; 7127 } 7128 delete this.pending[ element.name ]; 7129 $( element ).removeClass( this.settings.pendingClass ); 7130 if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) { 7131 $( this.currentForm ).submit(); 7132 this.formSubmitted = false; 7133 } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) { 7134 $( this.currentForm ).triggerHandler( "invalid-form", [ this ] ); 7135 this.formSubmitted = false; 7136 } 7137 }, 7138 7139 previousValue: function( element, method ) { 7140 method = typeof method === "string" && method || "remote"; 7141 7142 return $.data( element, "previousValue" ) || $.data( element, "previousValue", { 7143 old: null, 7144 valid: true, 7145 message: this.defaultMessage( element, { method: method } ) 7146 } ); 7147 }, 7148 7149 // Cleans up all forms and elements, removes validator-specific events 7150 destroy: function() { 7151 this.resetForm(); 7152 7153 $( this.currentForm ) 7154 .off( ".validate" ) 7155 .removeData( "validator" ) 7156 .find( ".validate-equalTo-blur" ) 7157 .off( ".validate-equalTo" ) 7158 .removeClass( "validate-equalTo-blur" ); 7159 } 7160 7161 }, 7162 7163 classRuleSettings: { 7164 required: { required: true }, 7165 email: { email: true }, 7166 url: { url: true }, 7167 date: { date: true }, 7168 dateISO: { dateISO: true }, 7169 number: { number: true }, 7170 digits: { digits: true }, 7171 creditcard: { creditcard: true } 7172 }, 7173 7174 addClassRules: function( className, rules ) { 7175 if ( className.constructor === String ) { 7176 this.classRuleSettings[ className ] = rules; 7177 } else { 7178 $.extend( this.classRuleSettings, className ); 7179 } 7180 }, 7181 7182 classRules: function( element ) { 7183 var rules = {}, 7184 classes = $( element ).attr( "class" ); 7185 7186 if ( classes ) { 7187 $.each( classes.split( " " ), function() { 7188 if ( this in $.validator.classRuleSettings ) { 7189 $.extend( rules, $.validator.classRuleSettings[ this ] ); 7190 } 7191 } ); 7192 } 7193 return rules; 7194 }, 7195 7196 normalizeAttributeRule: function( rules, type, method, value ) { 7197 7198 // Convert the value to a number for number inputs, and for text for backwards compability 7199 // allows type="date" and others to be compared as strings 7200 if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) { 7201 value = Number( value ); 7202 7203 // Support Opera Mini, which returns NaN for undefined minlength 7204 if ( isNaN( value ) ) { 7205 value = undefined; 7206 } 7207 } 7208 7209 if ( value || value === 0 ) { 7210 rules[ method ] = value; 7211 } else if ( type === method && type !== "range" ) { 7212 7213 // Exception: the jquery validate 'range' method 7214 // does not test for the html5 'range' type 7215 rules[ method ] = true; 7216 } 7217 }, 7218 7219 attributeRules: function( element ) { 7220 var rules = {}, 7221 $element = $( element ), 7222 type = element.getAttribute( "type" ), 7223 method, value; 7224 7225 for ( method in $.validator.methods ) { 7226 7227 // Support for <input required> in both html5 and older browsers 7228 if ( method === "required" ) { 7229 value = element.getAttribute( method ); 7230 7231 // Some browsers return an empty string for the required attribute 7232 // and non-HTML5 browsers might have required="" markup 7233 if ( value === "" ) { 7234 value = true; 7235 } 7236 7237 // Force non-HTML5 browsers to return bool 7238 value = !!value; 7239 } else { 7240 value = $element.attr( method ); 7241 } 7242 7243 this.normalizeAttributeRule( rules, type, method, value ); 7244 } 7245 7246 // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs 7247 if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) { 7248 delete rules.maxlength; 7249 } 7250 7251 return rules; 7252 }, 7253 7254 dataRules: function( element ) { 7255 var rules = {}, 7256 $element = $( element ), 7257 type = element.getAttribute( "type" ), 7258 method, value; 7259 7260 for ( method in $.validator.methods ) { 7261 value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() ); 7262 this.normalizeAttributeRule( rules, type, method, value ); 7263 } 7264 return rules; 7265 }, 7266 7267 staticRules: function( element ) { 7268 var rules = {}, 7269 validator = $.data( element.form, "validator" ); 7270 7271 if ( validator.settings.rules ) { 7272 rules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {}; 7273 } 7274 return rules; 7275 }, 7276 7277 normalizeRules: function( rules, element ) { 7278 7279 // Handle dependency check 7280 $.each( rules, function( prop, val ) { 7281 7282 // Ignore rule when param is explicitly false, eg. required:false 7283 if ( val === false ) { 7284 delete rules[ prop ]; 7285 return; 7286 } 7287 if ( val.param || val.depends ) { 7288 var keepRule = true; 7289 switch ( typeof val.depends ) { 7290 case "string": 7291 keepRule = !!$( val.depends, element.form ).length; 7292 break; 7293 case "function": 7294 keepRule = val.depends.call( element, element ); 7295 break; 7296 } 7297 if ( keepRule ) { 7298 rules[ prop ] = val.param !== undefined ? val.param : true; 7299 } else { 7300 $.data( element.form, "validator" ).resetElements( $( element ) ); 7301 delete rules[ prop ]; 7302 } 7303 } 7304 } ); 7305 7306 // Evaluate parameters 7307 $.each( rules, function( rule, parameter ) { 7308 rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter; 7309 } ); 7310 7311 // Clean number parameters 7312 $.each( [ "minlength", "maxlength" ], function() { 7313 if ( rules[ this ] ) { 7314 rules[ this ] = Number( rules[ this ] ); 7315 } 7316 } ); 7317 $.each( [ "rangelength", "range" ], function() { 7318 var parts; 7319 if ( rules[ this ] ) { 7320 if ( $.isArray( rules[ this ] ) ) { 7321 rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ]; 7322 } else if ( typeof rules[ this ] === "string" ) { 7323 parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ ); 7324 rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ]; 7325 } 7326 } 7327 } ); 7328 7329 if ( $.validator.autoCreateRanges ) { 7330 7331 // Auto-create ranges 7332 if ( rules.min != null && rules.max != null ) { 7333 rules.range = [ rules.min, rules.max ]; 7334 delete rules.min; 7335 delete rules.max; 7336 } 7337 if ( rules.minlength != null && rules.maxlength != null ) { 7338 rules.rangelength = [ rules.minlength, rules.maxlength ]; 7339 delete rules.minlength; 7340 delete rules.maxlength; 7341 } 7342 } 7343 7344 return rules; 7345 }, 7346 7347 // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true} 7348 normalizeRule: function( data ) { 7349 if ( typeof data === "string" ) { 7350 var transformed = {}; 7351 $.each( data.split( /\s/ ), function() { 7352 transformed[ this ] = true; 7353 } ); 7354 data = transformed; 7355 } 7356 return data; 7357 }, 7358 7359 // http://jqueryvalidation.org/jQuery.validator.addMethod/ 7360 addMethod: function( name, method, message ) { 7361 $.validator.methods[ name ] = method; 7362 $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ]; 7363 if ( method.length < 3 ) { 7364 $.validator.addClassRules( name, $.validator.normalizeRule( name ) ); 7365 } 7366 }, 7367 7368 // http://jqueryvalidation.org/jQuery.validator.methods/ 7369 methods: { 7370 7371 // http://jqueryvalidation.org/required-method/ 7372 required: function( value, element, param ) { 7373 7374 // Check if dependency is met 7375 if ( !this.depend( param, element ) ) { 7376 return "dependency-mismatch"; 7377 } 7378 if ( element.nodeName.toLowerCase() === "select" ) { 7379 7380 // Could be an array for select-multiple or a string, both are fine this way 7381 var val = $( element ).val(); 7382 return val && val.length > 0; 7383 } 7384 if ( this.checkable( element ) ) { 7385 return this.getLength( value, element ) > 0; 7386 } 7387 return value.length > 0; 7388 }, 7389 7390 // http://jqueryvalidation.org/email-method/ 7391 email: function( value, element ) { 7392 // we're sticking with the old one for now (jQuery.validate: 1.11.1) 7393 // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/ 7394 return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value); 7395 }, 7396 7397 // http://jqueryvalidation.org/url-method/ 7398 url: function( value, element ) { 7399 7400 // Copyright (c) 2010-2013 Diego Perini, MIT licensed 7401 // https://gist.github.com/dperini/729294 7402 // see also https://mathiasbynens.be/demo/url-regex 7403 // modified to allow protocol-relative URLs 7404 return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value ); 7405 }, 7406 7407 // http://jqueryvalidation.org/date-method/ 7408 date: function( value, element ) { 7409 return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() ); 7410 }, 7411 7412 // http://jqueryvalidation.org/dateISO-method/ 7413 dateISO: function( value, element ) { 7414 return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value ); 7415 }, 7416 7417 // http://jqueryvalidation.org/number-method/ 7418 number: function( value, element ) { 7419 return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value ); 7420 }, 7421 7422 // http://jqueryvalidation.org/digits-method/ 7423 digits: function( value, element ) { 7424 return this.optional( element ) || /^\d+$/.test( value ); 7425 }, 7426 7427 // http://jqueryvalidation.org/minlength-method/ 7428 minlength: function( value, element, param ) { 7429 var length = $.isArray( value ) ? value.length : this.getLength( value, element ); 7430 return this.optional( element ) || length >= param; 7431 }, 7432 7433 // http://jqueryvalidation.org/maxlength-method/ 7434 maxlength: function( value, element, param ) { 7435 var length = $.isArray( value ) ? value.length : this.getLength( value, element ); 7436 return this.optional( element ) || length <= param; 7437 }, 7438 7439 // http://jqueryvalidation.org/rangelength-method/ 7440 rangelength: function( value, element, param ) { 7441 var length = $.isArray( value ) ? value.length : this.getLength( value, element ); 7442 return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] ); 7443 }, 7444 7445 // http://jqueryvalidation.org/min-method/ 7446 min: function( value, element, param ) { 7447 return this.optional( element ) || value >= param; 7448 }, 7449 7450 // http://jqueryvalidation.org/max-method/ 7451 max: function( value, element, param ) { 7452 return this.optional( element ) || value <= param; 7453 }, 7454 7455 // http://jqueryvalidation.org/range-method/ 7456 range: function( value, element, param ) { 7457 return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] ); 7458 }, 7459 7460 // http://jqueryvalidation.org/step-method/ 7461 step: function( value, element, param ) { 7462 var type = $( element ).attr( "type" ), 7463 errorMessage = "Step attribute on input type " + type + " is not supported.", 7464 supportedTypes = [ "text", "number", "range" ], 7465 re = new RegExp( "\\b" + type + "\\b" ), 7466 notSupported = type && !re.test( supportedTypes.join() ), 7467 decimalPlaces = function( num ) { 7468 var match = ( "" + num ).match( /(?:\.(\d+))?$/ ); 7469 if ( !match ) { 7470 return 0; 7471 } 7472 7473 // Number of digits right of decimal point. 7474 return match[ 1 ] ? match[ 1 ].length : 0; 7475 }, 7476 toInt = function( num ) { 7477 return Math.round( num * Math.pow( 10, decimals ) ); 7478 }, 7479 valid = true, 7480 decimals; 7481 7482 // Works only for text, number and range input types 7483 // TODO find a way to support input types date, datetime, datetime-local, month, time and week 7484 if ( notSupported ) { 7485 throw new Error( errorMessage ); 7486 } 7487 7488 decimals = decimalPlaces( param ); 7489 7490 // Value can't have too many decimals 7491 if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) { 7492 valid = false; 7493 } 7494 7495 return this.optional( element ) || valid; 7496 }, 7497 7498 // http://jqueryvalidation.org/equalTo-method/ 7499 equalTo: function( value, element, param ) { 7500 7501 // Bind to the blur event of the target in order to revalidate whenever the target field is updated 7502 var target = $( param ); 7503 if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) { 7504 target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() { 7505 $( element ).valid(); 7506 } ); 7507 } 7508 return value === target.val(); 7509 }, 7510 7511 // http://jqueryvalidation.org/remote-method/ 7512 remote: function( value, element, param, method ) { 7513 if ( this.optional( element ) ) { 7514 return "dependency-mismatch"; 7515 } 7516 7517 method = typeof method === "string" && method || "remote"; 7518 7519 var previous = this.previousValue( element, method ), 7520 validator, data, optionDataString; 7521 7522 if ( !this.settings.messages[ element.name ] ) { 7523 this.settings.messages[ element.name ] = {}; 7524 } 7525 previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ]; 7526 this.settings.messages[ element.name ][ method ] = previous.message; 7527 7528 param = typeof param === "string" && { url: param } || param; 7529 optionDataString = $.param( $.extend( { data: value }, param.data ) ); 7530 if ( previous.old === optionDataString ) { 7531 return previous.valid; 7532 } 7533 7534 previous.old = optionDataString; 7535 validator = this;
7536 this.startRequest( element ); 7537 data = {}; 7538 data[ element.name ] = value; 7539 $.ajax( $.extend( true, { 7540 mode: "abort", 7541 port: "validate" + element.name, 7542 dataType: "json", 7543 data: data, 7544 context: validator.currentForm, 7545 success: function( response ) { 7546 var valid = response === true || response === "true", 7547 errors, message, submitted; 7548 7549 validator.settings.messages[ element.name ][ method ] = previous.originalMessage; 7550 if ( valid ) { 7551 submitted = validator.formSubmitted; 7552 validator.resetInternals(); 7553 validator.toHide = validator.errorsFor( element ); 7554 validator.formSubmitted = submitted; 7555 validator.successList.push( element ); 7556 validator.invalid[ element.name ] = false; 7557 validator.showErrors(); 7558 } else { 7559 errors = {}; 7560 message = response || validator.defaultMessage( element, { method: method, parameters: value } ); 7561 errors[ element.name ] = previous.message = message; 7562 validator.invalid[ element.name ] = true; 7563 validator.showErrors( errors ); 7564 } 7565 previous.valid = valid; 7566 validator.stopRequest( element, valid ); 7567 } 7568 }, param ) ); 7569 return "pending"; 7570 } 7571 } 7572 7573} ); 7574 7575// Ajax mode: abort 7576// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); 7577// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() 7578 7579var pendingRequests = {}, 7580 ajax; 7581 7582// Use a prefilter if available (1.5+) 7583if ( $.ajaxPrefilter ) { 7584 $.ajaxPrefilter( function( settings, _, xhr ) { 7585 var port = settings.port; 7586 if ( settings.mode === "abort" ) { 7587 if ( pendingRequests[ port ] ) { 7588 pendingRequests[ port ].abort(); 7589 } 7590 pendingRequests[ port ] = xhr; 7591 } 7592 } ); 7593} else { 7594 7595 // Proxy ajax 7596 ajax = $.ajax; 7597 $.ajax = function( settings ) { 7598 var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, 7599 port = ( "port" in settings ? settings : $.ajaxSettings ).port; 7600 if ( mode === "abort" ) { 7601 if ( pendingRequests[ port ] ) { 7602 pendingRequests[ port ].abort(); 7603 } 7604 pendingRequests[ port ] = ajax.apply( this, arguments ); 7605 return pendingRequests[ port ]; 7606 } 7607 return ajax.apply( this, arguments ); 7608 }; 7609} 7610 7611})); 7612 7613 7614// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation 7615// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target 7616(function($) { 7617 $.extend($.fn, { 7618 validateDelegate: function( delegate, type, handler ) { 7619 return this.on(type, function( event ) { 7620 var target = $(event.target); 7621 if ( target.is(delegate) ) { 7622 return handler.apply(target, arguments); 7623 } 7624 }); 7625 } 7626 }); 7627}(jQuery)); 7628 7629jQuery.validator.addMethod("alpha", function (t, e) { return this.optional(e) || /^[a-zA-Z\s]$/.test(t) }, "Please enter only letters."); 7630jQuery.validator.addMethod("dogtag", function (t, e) { return this.optional(e) || /^[a-zA-Z\s0-9.,;'/-]*$/.test(t) }, "Please enter only letters, numbers or -/.,;'"); 7631jQuery.validator.addMethod("dogtagall", function (t, e) 7632{ 7633 var isvalid = false; 7634 for (var i = 0; i < 6; i++) 7635 { 7636 var input = $("input[name='RequestTextList[" + i + "]']").val(); 7637 if (input) 7638 isvalid = true; 7639 } 7640 return isvalid; 7641}, "Please fill in at least one of these fields."); 7642//credit cart format regex validations 7643jQuery.validator.addMethod('mastercard', function (t, e) { return this.optional(e) || $.payment.validateCardNumberAgainstType(t) }, "Please enter a valid card number."); 7644jQuery.validator.addMethod('visa', function (t, e) { return this.optional(e) || $.payment.validateCardNumberAgainstType(t) }, "Please enter a valid card number."); 7645jQuery.validator.addMethod('amex', function (t, e) { return this.optional(e) || $.payment.validateCardNumberAgainstType(t) }, "Please enter a valid card number."); 7646jQuery.validator.addMethod('discover', function (t, e) { return this.optional(e) || $.payment.validateCardNumberAgainstType(t) }, "Please enter a valid card number."); 7647jQuery.validator.addMethod('starcard', function (t, e) { return this.optional(e) || $.payment.validateCardNumberAgainstType(t) }, "Please enter a valid card number."); 7648jQuery.validator.addMethod('cc-number', function (t, e) { return this.optional(e) || $.payment.validateCardNumber(t) }, "Please enter a valid card number."); 7649//credit cart expiration check 7650jQuery.validator.addMethod('ccdate', function (t, e) { return this.optional(e) || checkCCDate(
7650) }, "Expired!"); 7651//zip codes 7652jQuery.validator.addMethod('zipUS', function (t, e) { return this.optional(e) || /^[0-9]{5}(-?[0-9]{4})?$/.test(t) }, "Please enter a valid zip code."); 7653jQuery.validator.addMethod('zipCA', function (t, e) { return this.optional(e) || /^[a-zA-Z][0-9][a-zA-Z] *[0-9][a-zA-Z][0-9]$/.test(t) }, "Please enter a valid postal code."); 7654//phone numbers 7655jQuery.validator.addMethod('phoneNonUS', function (t, e) { return this.optional(e) || /^\d{10,15}$/.test(t) }, "Please enter between 10 and 15 digits."); 7656//account password requirement 7657jQuery.validator.addMethod('passwordInput', function (t, e) { return this.optional(e) || /^.*(?=.{8,})(?=.*[\d\W]).*$/.test(t) }, "Must contain at least 8 characters with 1 non-alpha character."); 7658jQuery.validator.addMethod('RegisterAccountEmail', function (t, e) { return this.optional(e) || ValidateEmail(t) }, "Account exists for this email address. <a href=\"/Account/ForgotPassword\" class=\"underline\">Click here to reset password</a> or <a href=\"/authenticate/accountlogin?returnUrl=\" class=\"underline\">sign in now.</a>"); 7659jQuery.validator.addMethod('newAccountEmail', function (t, e) { return this.optional(e) || checkEmail() }, "An account already exists for this email address."); 7660jQuery.validator.addMethod('multipleEmailAddresses', function (t, e) { return this.optional(e) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))(;[\s]*((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*$/i.test(t) }, "Please enter valid email addresses separated by semi-colons."); 7661// base email regex from above, followed by the new stuff: 7662//match start of line: /^ 7663//match the first email: ((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))) 7664//match a semi-colon and another email address 0 or more times (;[\s]*((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))* 7665//match the end of the line and case-insensitive flag $/i 7666 7667jQuery.validator.addMethod('no-html', function (t, e) { return this.optional(e) || !(/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/.test(t)) }, "HTML tags are not allowed."); 7668 7669//cvv 7670jQuery.validator.addMethod('cvv-input', function (t, e) { return this.optional(e) || /^[0-9]+$/.test(t) }, "Please enter a valid number."); 7671 7672//ads instant credit 7673//social security numbers 7674jQuery.validator.addMethod('SSN', function (t, e) { return this.optional(e) || adsICSSNValidation() }, "Please enter a valid Social Security Number."); 7675//split phone numbers 7676jQuery.validator.addMethod('ICphone', function (t, e) { return this.optional(e) || adsICPhoneValidation() }, "Please enter a valid Phone Number."); 7677jQuery.validator.addMethod('ICphoneAlt', function (t, e) { return this.optional(e) || adsICPhoneAltValidation() }, "Please enter a valid Phone Number."); 7678//birth date 7679jQuery.validator.addMethod('ICDOB', function (t, e) { return this.optional(e) || adsICDOBValidation() }, "Must be at least 18 Years of age."); 7680//authorized user 7681jQuery.validator.addMethod('ICAU', function (t, e) { return this.optional(e) || adsICDOBValidation() }, "Please enter a valid user"); 7682 7683//ads credit card above credit limit 7684jQuery.validator.addMethod('ADSCCType', function (t, e, params) { return this.optional(e) || adsCanUseCard(p
7684arams); }, jQuery.validator.format("Unfortunately your current order total exceeds the temporary credit limit of ${0}. Please use a different credit card.")); 7685 7686//address line 2 scam prevention 7687jQuery.validator.addMethod('AddressLine2', function (t, e) { return this.optional(e) || !(/.*\s+[a-zA-Z]{2}\s+[0-9]{5}.*$/).test(t); }, jQuery.validator.format("This field is invalid.")); 7688 7689// exclude EU email addresses from being entered (GDPR) 7690jQuery.validator.addMethod('euemail', function (t, e) { return this.optional(e) || !(/(\.(ad|at|be|bg|hr|cy|cz|dk|ee|fi|fr|de|gr|gp|va|hu|ie|im|it|lv|lt|lu|mt|mq|mc|nl|pl|pt|ro|sk|si|es|bl|mf|se|gb|uk|eu))$/i).test(t); }, jQuery.validator.format("European Union domains no longer allowed.")); 7691 7692/** 7693 * Matches US phone number format 7694 * 7695 * where the area code may not start with 1 and the prefix may not start with 1 7696 * allows '-' or ' ' as a separator and allows parens around area code 7697 * some people may want to put a '1' in front of their number 7698 * 7699 * 1(212)-999-2345 or 7700 * 212 999 2344 or 7701 * 212-999-0983 7702 * 7703 * but not 7704 * 111-123-5434 7705 * and not 7706 * 212 123 4567 7707 */ 7708jQuery.validator.addMethod("phoneUS", function (phone_number, element) { 7709 phone_number = phone_number.replace(/\s+/g, ""); 7710 return this.optional(element) || phone_number.length > 9 && 7711 phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/); 7712}, "Please specify a valid phone number");; 7713/*! 7714 * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+ 7715 * http://cherne.net/brian/resources/jquery.hoverIntent.html 7716 * 7717 * You may use hoverIntent under the terms of the MIT license. 7718 * Copyright 2007, 2013 Brian Cherne 7719 */ 7720(function(e){e.fn.hoverIntent=function(t,n,r){var i={interval:100,sensitivity:7,timeout:0};if(typeof t==="object"){i=e.extend(i,t)}else if(e.isFunction(n)){i=e.extend(i,{over:t,out:n,selector:r})}else{i=e.extend(i,{over:t,out:t,selector:n})}var s,o,u,a;var f=function(e){s=e.pageX;o=e.pageY};var l=function(t,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if(Math.abs(u-s)+Math.abs(a-o)<i.sensitivity){e(n).off("mousemove.hoverIntent",f);n.hoverIntent_s=1;return i.over.apply(n,[t])}else{u=s;a=o;n.hoverIntent_t=setTimeout(function(){l(t,n)},i.interval)}};var c=function(e,t){t.hoverIntent_t=clearTimeout(t.hoverIntent_t);t.hoverIntent_s=0;return i.out.apply(t,[e])};var h=function(t){var n=jQuery.extend({},t);var r=this;if(r.hoverIntent_t){r.hoverIntent_t=clearTimeout(r.hoverIntent_t)}if(t.type=="mouseenter"){u=n.pageX;a=n.pageY;e(r).on("mousemove.hoverIntent",f);if(r.hoverIntent_s!=1){r.hoverIntent_t=setTimeout(function(){l(n,r)},i.interval)}}else{e(r).off("mousemove.hoverIntent",f);if(r.hoverIntent_s==1){r.hoverIntent_t=setTimeout(function(){c(n,r)},i.timeout)}}};return this.on({"mouseenter.hoverIntent":h,"mouseleave.hoverIntent":h},i.selector)}})(jQuery); 7721(function(d){+"use strict";var n="left",m="right",c="up",u="down",b="in",v="out",k="none",q="auto",j="swipe",r="pinch",e="click",x="horizontal",s="vertical",h="all",f="start",i="move",g="end",o="cancel",a="ontouchstart" in window,w="TouchSwipe";var l={fingers:1,threshold:75,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"button, input, select, textarea, a, .noSwipe"};d.fn.swipe=function(A){var z=d(this),y=z.data(w);if(y&&typeof A==="string"){if(y[A]){return y[A].apply(this,Array.prototype.slice.call(arguments,1))}else{d.error("Method "+A+" does not exist on jQuery.swipe")}}else{if(!y&&(typeof A==="object"||!A)){return t.apply(this,arguments)}}return z};d.fn.swipe.defaults=l;d.fn.swipe.phases={PHASE_START:f,PHASE_MOVE:i,PHASE_END:g,PHASE_CANCEL:o};d.fn.swipe.directions={LEFT:n,RIGHT:m,UP:c,DOWN:u,IN:b,OUT:v};d.fn.swipe.pageScroll={NONE:k,HORIZONTAL:x,VERTICAL:s,AUTO:q};d.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:h};function t(y){if(y&&(y.allowPageScroll===undefined&&(y.swipe!==undefined||y.swipeStatus!==undefined))){y.allowPageScroll=k}if(!y){y={}}y=d.extend({},d.fn.swipe.defaults,y);return this.each(function(){var A=d(this);var z=A.data(w);if(!z){z=new p(this,y);A.data(w,z)}})}function p(S,af){var aF=(a||!af.fallbackToMouseEvents),ax=aF?"touchstart":"mousedown",U=aF?"touchmove":"mousemove",au=aF?"touchend":"mou
7721seup",D=aF?null:"mouseleave",R="touchcancel";var ac=0;var N=null;var ag=0;var aB=0;var A=0;var ai=1;var aH=0;var H=d(S);var O="start";var aE=0;var ah=null;var I=0;var Y=0;var aA=0;var aJ=0;try{H.on(ax,ar);H.on(R,M)}catch(aC){d.error("events not supported "+ax+","+R+" on jQuery.swipe")}this.enable=function(){H.on(ax,ar);H.on(R,M);return H};this.disable=function(){Q();return H};this.destroy=function(){Q();H.data(w,null);return H};function ar(aM){if(X()){return}if(d(aM.target).closest(af.excludedElements,H).length>0){return}var aN=aM.originalEvent;var aL,aK=a?aN.touches[0]:aN;O=f;if(a){aE=aN.touches.length}else{aM.preventDefault()}ac=0;N=null;aH=null;ag=0;aB=0;A=0;ai=1;pinchDistance=0;ah=T();z();if(!a||(aE===af.fingers||af.fingers===h)||ao()){aI(0,aK);I=B();if(aE==2){aI(1,aN.touches[1]);aB=A=Z(ah[0].start,ah[1].start)}if(af.swipeStatus||af.pinchStatus){aL=aD(aN,O)}}else{aL=false}if(aL===false){O=o;aD(aN,O);return aL}else{aj(true)}}function P(aN){var aQ=aN.originalEvent;if(O===g||O===o||ae()){return}var aM,aL=a?aQ.touches[0]:aQ;var aO=V(aL);Y=B();if(a){aE=aQ.touches.length}O=i;if(aE==2){if(aB==0){aI(1,aQ.touches[1]);aB=A=Z(ah[0].start,ah[1].start)}else{V(aQ.touches[1]);A=Z(ah[0].end,ah[1].end);aH=an(ah[0].end,ah[1].end)}ai=y(aB,A);pinchDistance=Math.abs(aB-A)}if((aE===af.fingers||af.fingers===h)||!a||ao()){N=aq(aO.start,aO.end);C(aN,N);ac=G(aO.start,aO.end);ag=L();if(af.swipeStatus||af.pinchStatus){aM=aD(aQ,O)}if(!af.triggerOnTouchEnd||af.triggerOnTouchLeave){var aK=true;if(af.triggerOnTouchLeave){var aP=at(this);aK=az(aO.end,aP)}if(!af.triggerOnTouchEnd&&aK){O=aG(i)}else{if(af.triggerOnTouchLeave&&!aK){O=aG(g)}}if(O==o||O==g){aD(aQ,O)}}}else{O=o;aD(aQ,O)}if(aM===false){O=o;aD(aQ,O)}}function aa(aM){var aO=aM.originalEvent;if(a){if(aO.touches.length>0){av();return true}}if(ae()){aE=aJ}aM.preventDefault();Y=B();if(af.triggerOnTouchEnd||(af.triggerOnTouchEnd==false&&O===i)){O=g;var aL=((aE===af.fingers||af.fingers===h)||!a);var aK=ah[0].end.x!==0;var aN=aL&&aK&&(am()||ay());if(aN){aD(aO,O)}else{O=o;aD(aO,O)}}else{if(O===i){O=o;aD(aO,O)}}aj(false)}function M(){aE=0;Y=0;I=0;aB=0;A=0;ai=1;z();aj(false)}function W(aK){var aL=aK.originalEvent;if(af.triggerOnTouchLeave){O=aG(g);aD(aL,O)}}function Q(){H.off(ax,ar);H.off(R,M);H.off(U,P);H.off(au,aa);if(D){H.off(D,W)}aj(false)}function aG(aN){var aM=aN;var aL=ap();var aK=ad();if(!aL){aM=o}else{if(aK&&aN==i&&(!af.triggerOnTouchEnd||af.triggerOnTouchLeave)){aM=g}else{if(!aK&&aN==g&&af.triggerOnTouchLeave){aM=o}}}return aM}function aD(aM,aK){var aL=undefined;if(ab()){aL=al(aM,aK,j)}if(ao()&&aL!==false){aL=al(aM,aK,r)}if(K()&&aL!==false){aL=al(aM,aK,e)}if(aK===o){M(aM)}if(aK===g){if(a){if(aM.touches.length==0){M(aM)}}else{M(aM)}}return aL}function al(aN,aK,aM){var aL=undefined;if(aM==j){if(af.swipeStatus){aL=af.swipeStatus.call(H,aN,aK,N||null,ac||0,ag||0,aE);if(aL===false){return false}}if(aK==g&&ay()){if(af.swipe){aL=af.swipe.call(H,aN,N,ac,ag,aE);if(aL===false){return false}}switch(N){case n:if(af.swipeLeft){aL=af.swipeLeft.call(H,aN,N,ac,ag,aE)}break;case m:if(af.swipeRight){aL=af.swipeRight.call(H,aN,N,ac,ag,aE)}break;case c:if(af.swipeUp){aL=af.swipeUp.call(H,aN,N,ac,ag,aE)}break;case u:if(af.swipeDown){aL=af.swipeDown.call(H,aN,N,ac,ag,aE)}break}}}if(aM==r){if(af.pinchStatus){aL=af.pinchStatus.call(H,aN,aK,aH||null,pinchDistance||0,ag||0,aE,ai);if(aL===false){return false}}if(aK==g&&am()){switch(aH){case b:if(af.pinchIn){aL=af.pinchIn.call(H,aN,aH||null,pinchDistance||0,ag||0,aE,ai)}break;case v:if(af.pinchOut){aL=af.pinchOut.call(H,aN,aH||null,pinchDistance||0,ag||0,aE,ai)}break}}}if(aM==e){if(aK===o){if(af.click&&(aE===1||!a)&&(isNaN(ac)||ac===0)){aL=af.click.call(H,aN,aN.target)}}}return aL}function ad(){if(af.threshold!==null){return ac>=af.threshold}return true}function ak(){if(af.pinchThreshold!==null){return pinchDistance>=af.pinchThreshold}return true}function ap(){var aK;if(af.maxTimeThreshold){if(ag>=af.maxTimeThreshold){aK=false}else{aK=true}}else{aK=true}return aK}function C(aK,aL){if(af.allowPageScroll===k||ao()){aK.preventDefault()}else{var aM=af.allowPageScroll===q;switch(aL){case n:if((af.swipeLeft&&aM)||(!aM&&af.allowPageScroll!=x)){aK.preventDefault()}break;case m:if((af.swipeRight&&aM)||(!aM&&af.allowPageScroll!=x)){aK.preventDefault()}break;case c:if((af.swipeUp&&aM)||(!aM&&af.allowPageScroll!=s)){aK.preventDefault()}break;case u:if((af.swipeDown&&aM)||(!aM&&af.allowPageScroll!=s)){aK.preventDefault()}break}}}function am(){return ak()}function ao(){return !!(af.pinchStatus||af.pinchIn||af.pinchOut)}function aw(){return !!(am()&&ao())}function ay(){var aK=ap();var aM=ad();var aL=aM&&aK;return aL}function ab(){return !!(af.swipe||af.swipeStatus||af.swipeLeft||af.swipeRight||af.swipeUp||af.swipeDown)}function E(){return !!(ay()&&ab())}function K(){return !!(af.click)}function av(){aA=B();aJ=event.touches.length+1}function z(){aA=0;aJ=0}function ae(){var aK=false;if(aA){var aL=B()-aA;if(aL<=af.fingerReleaseThreshold){aK=true}}return aK}function X(){return !!(H.data(w+"_intouch")===true)}function aj(aK){if(aK===true){H.on(U,P);H.on(au,aa);if(D){H.on(D,W)}}else{H.off(U,P,false);H.off(au,aa,false);
7721if(D){H.off(D,W,false)}}H.data(w+"_intouch",aK===true)}function aI(aL,aK){var aM=aK.identifier!==undefined?aK.identifier:0;ah[aL].identifier=aM;ah[aL].start.x=ah[aL].end.x=aK.pageX;ah[aL].start.y=ah[aL].end.y=aK.pageY;return ah[aL]}function V(aK){var aM=aK.identifier!==undefined?aK.identifier:0;var aL=J(aM);aL.end.x=aK.pageX;aL.end.y=aK.pageY;return aL}function J(aL){for(var aK=0;aK<ah.length;aK++){if(ah[aK].identifier==aL){return ah[aK]}}}function T(){var aK=[];for(var aL=0;aL<=5;aL++){aK.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0})}return aK}function L(){return Y-I}function Z(aN,aM){var aL=Math.abs(aN.x-aM.x);var aK=Math.abs(aN.y-aM.y);return Math.round(Math.sqrt(aL*aL+aK*aK))}function y(aK,aL){var aM=(aL/aK)*1;return aM.toFixed(2)}function an(){if(ai<1){return v}else{return b}}function G(aL,aK){return Math.round(Math.sqrt(Math.pow(aK.x-aL.x,2)+Math.pow(aK.y-aL.y,2)))}function F(aN,aL){var aK=aN.x-aL.x;var aP=aL.y-aN.y;var aM=Math.atan2(aP,aK);var aO=Math.round(aM*180/Math.PI);if(aO<0){aO=360-Math.abs(aO)}return aO}function aq(aL,aK){var aM=F(aL,aK);if((aM<=45)&&(aM>=0)){return n}else{if((aM<=360)&&(aM>=315)){return n}else{if((aM>=135)&&(aM<=225)){return m}else{if((aM>45)&&(aM<135)){return u}else{return c}}}}}function B(){var aK=new Date();return aK.getTime()}function at(aK){aK=d(aK);var aM=aK.offset();var aL={left:aM.left,right:aM.left+aK.outerWidth(),top:aM.top,bottom:aM.top+aK.outerHeight()};return aL}function az(aK,aL){return(aK.x>aL.left&&aK.x<aL.right&&aK.y>aL.top&&aK.y<aL.bottom)}}})(jQuery); 7722; 7723// Object to store these functions outside of the global context 7724if (typeof Gorilla === 'undefined') { 7725 var Gorilla = {}; 7726} 7727 7728(function ($) { 7729 7730 var _namespace = 'accordion'; 7731 7732 var Accordion = this.Accordion = function (el, options) { 7733 this.el = el; 7734 this.$el = $(el); 7735 this.options = $.extend({}, this.defaults, options); 7736 this.$el.data(this.namespace, this); 7737 7738 this.trigger = this.$el.find(this.options.trigger); 7739 7740 // set any method overrides 7741 this.select = this.options.select || this.select; 7742 7743 this.init(); 7744 }; 7745 7746 Accordion.prototype = { 7747 namespace: _namespace, 7748 7749 defaults: { 7750 trigger: '.trigger', 7751 container: '.content', 7752 containerInner: '.content-inner', 7753 activeAccordion: 0, 7754 afterInitCallback: null, 7755 onSelectCallback: null 7756 }, 7757 7758 /** 7759 * Constructor/Initialize method 7760 */ 7761 init: function () { 7762 this.bindEvents(); 7763 this.select(); 7764 7765 var self = this; 7766 $(this.trigger).each(function () { 7767 $(this).attr("aria-controls", $(this).next(self.options.container).attr("id")); 7768 $(this).attr("aria-expanded", "false"); 7769 $(this).next(self.options.container).addClass("no-display"); 7770 }); 7771 7772 if (typeof this.options.afterInitCallback === 'function') { 7773 this.options.afterInitCallback(this); 7774 } 7775 }, 7776 7777 /** 7778 * Binds events to elements 7779 */ 7780 bindEvents: function () { 7781 var _self = this; 7782 this.trigger.on('click.accordion', function (e) { 7783 e.preventDefault(); 7784 _self.select(this); 7785 }); 7786 }, 7787 7788 /** 7789 * Selects the active Accordion 7790 */ 7791 select: function (el) { 7792 var $this = $(el); 7793 if ($this.hasClass('open')) { 7794 this.close($this); 7795 } else { 7796 this.open($this); 7797 } 7798 }, 7799 7800 open: function ($trigger) { 7801 var $container = $trigger.parent().find(this.options.container); 7802 7803 $container.removeClass("no-display"); 7804 $container.removeAttr("aria-hidden"); 7805 $trigger.attr("aria-expanded", "true"); 7806 $trigger.attr("aria-hidden", "false"); 7807 $trigger.addClass('open'); 7808 $container.addClass('open'); 7809 7810 if ($.support.transition) { 7811 $container.one($.support.transition.end, function () { 7812 $container.removeClass('content'); 7813 $container.addClass('open'); 7814 $container.css({ 'height': 'auto' }); 7815 7816 setTimeout(function () { 7817 $container.addClass('content'); 7818 }, 350); 7819 }); 7820 7821 } else { 7822 $trigger.addClass('open'); 7823 $container.css({ 'height': 'auto' });
7824 } 7825 7826 var options = $container.find("input"); 7827 7828 options.on('keyup', function () { // adds and removes ada blue outline 7829 $(this).parent().css({ "outline": "2px solid blue" }); 7830 }) 7831 options.on('keydown', function () { 7832 $(this).parent().css({ "outline": ""}); 7833 }) 7834 }, 7835 7836 close: function ($trigger) { 7837 var $container = $trigger.parent().find(this.options.container); 7838 7839 $container.removeClass('content'); 7840 $container.addClass('content'); 7841 $container.addClass("no-display"); 7842 $container.removeAttr("aria-hidden"); 7843 $trigger.attr("aria-expanded", "false"); 7844 $trigger.attr("aria-hidden", "true"); 7845 $trigger.removeClass('open'); 7846 7847 if ($.support.transition) { 7848 $container.one($.support.transition.end, function () { 7849 $container.removeClass('open'); 7850 }); 7851 } else { 7852 $container.removeClass('open'); 7853 } 7854 }, 7855 7856 reset: function () { 7857 this.trigger.off('click.accordion'); 7858 this.init(); 7859 }, 7860 7861 unset: function () { 7862 this.trigger.off('click.accordion').removeClass('open'); 7863 this.$el.find(this.options.container).removeClass('open'); 7864 this.$el.find(this.options.container).css({ 'height': '' }); 7865 7866 $(this.trigger).removeAttr("aria-controls"); 7867 $(this.trigger).removeAttr("aria-expanded"); 7868 $(this.options.container).removeClass("no-display"); 7869 }, 7870 7871 respond: function (isMobile) { 7872 this.isMobile = isMobile; 7873 7874 } 7875 }; 7876 7877 $.fn.gorillaAccordion = function (options) { 7878 var args = arguments; 7879 7880 if (options === undefined) { 7881 options = {}; 7882 } 7883 7884 if (typeof options === "object") { 7885 return this.each(function () { 7886 new Accordion(this, options); 7887 }); 7888 } else { 7889 if (typeof options === 'string' && Accordion.prototype[options]) { 7890 if (obj = $(this).data(Accordion.prototype.namespace)) { 7891 obj[options].apply(obj, Array.prototype.slice.call(args, 1)); 7892 } 7893 } else { 7894 alert('Method ' + options + ' does not exist in ' + Accordion.prototype.namespace); 7895 } 7896 } 7897 }; 7898 7899}).apply(Gorilla, [window.jQuery]);; 7900/*! 7901 * jQuery & Zepto Lazy - v1.7.9 7902 * http://jquery.eisbehr.de/lazy/ 7903 * 7904 * Copyright 2012 - 2018, Daniel 'Eisbehr' Kern 7905 * 7906 * Dual licensed under the MIT and GPL-2.0 licenses: 7907 * http://www.opensource.org/licenses/mit-license.php 7908 * http://www.gnu.org/licenses/gpl-2.0.html 7909 * 7910 * $("img.lazy").lazy(); 7911 */ 7912 7913;(function(window, undefined) { 7914 "use strict"; 7915 7916 // noinspection JSUnresolvedVariable 7917 /** 7918 * library instance - here and not in construct to be shorter in minimization 7919 * @return void 7920 */ 7921 var $ = window.jQuery || window.Zepto, 7922 7923 /** 7924 * unique plugin instance id counter 7925 * @type {number} 7926 */ 7927 lazyInstanceId = 0, 7928 7929 /** 7930 * helper to register window load for jQuery 3 7931 * @type {boolean} 7932 */ 7933 windowLoaded = false; 7934 7935 /** 7936 * make lazy available to jquery - and make it a bit more case-insensitive :) 7937 * @access public 7938 * @type {function} 7939 * @param {object} settings 7940 * @return {LazyPlugin} 7941 */ 7942 $.fn.Lazy = $.fn.lazy = function(settings) { 7943 return new LazyPlugin(this, settings); 7944 }; 7945 7946 /** 7947 * helper to add plugins to lazy prototype configuration 7948 * @access public 7949 * @type {function} 7950 * @param {string|Array} names 7951 * @param {string|Array|function} [elements] 7952 * @param {function} loader 7953 * @return void 7954 */ 7955 $.Lazy = $.lazy = function(names, elements, loader) { 7956 // make second parameter optional 7957 if ($.isFunction(elements)) { 7958 loader = elements; 7959 elements = []; 7960 } 7961 7962 // exit here if parameter is not a callable function 7963 if (!$.isFunction(loader)) { 7964 return; 7965 } 7966 7967 // make parameters an array of names to be sure 7968 names = $.isArray(names) ? names : [names]; 7969 elements = $.isArray(elements) ? elements : [elements]; 7970 7971 var config = LazyPlugin.prototype.config, 7972 forced = config._f || (config._f = {}); 7973 7974 // add the loader plugin for every name 7975 for (var i = 0, l = names.length; i < l; i++) { 7976 if (config[names[i]] === undefined || $.isFunction(config[names[i]])) { 7977 config[names[i]] = loader; 7978 } 7979 } 7980 7981 // add forced elements loader 7982 for (var c = 0, a = elements.length; c < a; c++) { 7983 forced[elements[c]] = names[0]; 7984 } 7985 }; 7986 7987 /** 7988 * contains all logic and the whole element handling 7989 * is packed in a private function outside class to reduce memory usage, because it will not be created on every plugin instance 7990 * @access private 7991 * @type {function} 7992 * @param {LazyPlugin} instance 7993 * @param {object} config 7994 * @param {object|Array} items 7995 * @param {object} events 7996 * @param {string} namespace 7997 * @return void 7998 */ 7999 function _executeLazy(instance, config, items, events, namespace) { 8000 /** 8001 * a helper to trigger the 'onFinishedAll' callback after all other events 8002 * @access private 8003 * @type {number} 8004 */ 8005 var _awaitingAfterLoad = 0, 8006 8007 /** 8008 * visible content width 8009 * @access private 8010 * @type {number} 8011 */ 8012 _actualWidth = -1, 8013 8014 /** 8015 * visible content height 8016 * @access private 8017 * @type {number} 8018 */ 8019 _actualHeight = -1, 8020 8021 /** 8022 * determine possibly detected high pixel density 8023 * @access private 8024 * @type {boolean} 8025 */ 8026 _isRetinaDisplay = false, 8027 8028 /** 8029 * dictionary entry for better minimization 8030 * @access private 8031 * @type {string} 8032 */ 8033 _afterLoad = 'afterLoad', 8034 8035 /** 8036 * dictionary entry for better minimization 8037 * @access private 8038 * @type {string} 8039 */ 8040 _load = 'load', 8041 8042 /** 8043 * dictionary entry for better minimization 8044 * @access private 8045 * @type {string} 8046 */ 8047 _error = 'error', 8048 8049 /** 8050 * dictionary entry for better minimization 8051 * @access private 8052 * @type {string} 8053 */ 8054 _img = 'img', 8055 8056 /** 8057 * dictionary entry for better minimization 8058 * @access private 8059 * @type {string} 8060 */ 8061 _src = 'src', 8062 8063 /** 8064 * dictionary entry for better minimization 8065 * @access private 8066 * @type {string} 8067 */ 8068 _srcset = 'srcset', 8069 8070 /** 8071 * dictionary entry for better minimization 8072 * @access private 8073 * @type {string} 8074 */ 8075 _sizes = 'sizes', 8076 8077 /** 8078 * dictionary entry for better minimization 8079 * @access private 8080 * @type {string} 8081 */ 8082 _backgroundImage = 'background-image'; 8083 8084 /** 8085 * initialize plugin 8086 * bind loading to events or set delay time to load all items at once 8087 * @access private 8088 * @return void 8089 */ 8090 function _initialize() { 8091 // detect actual device pixel ratio 8092 // noinspection JSUnresolvedVariable 8093 _isRetinaDisplay = window.devicePixelRatio > 1; 8094 8095 // prepare all initial items 8096 items = _prepareItems(items); 8097 8098 // if delay time is set load all items at once after delay time 8099 if (config.delay >= 0) { 8100 setTimeout(function() { 8101 _lazyLoadItems(true); 8102 }, config.delay); 8103 } 8104 8105 // if no delay is set or combine usage is active bind events 8106 if (config.delay < 0 || config.combined) { 8107 // create unique event function 8108 events.e = _throttle(config.throttle, function(event) { 8109 // reset detected window size on resize event 8110 if (event.type === 'resize') { 8111 _actualWidth = _actualHeight = -1; 8112 } 8113 8114 // execute 'lazy magic' 8115 _lazyLoadItems(event.all); 8116 }); 8117 8118 // create function to add new items to instance 8119 events.a = function(additionalItems) { 8120 additionalItems = _prepareItems(additionalItems); 8121 items.push.apply(items, additionalItems); 8122 }; 8123 8124 // create function to get all instance items left 8125 events.g = function() { 8126 // filter loaded items before return in case internal filter was not running until now 8127 return (items = $(items).filter(function() { 8128 return !$(this).data(config.loadedName); 8129 })); 8130 }; 8131 8132 // create function to force loading elements 8133 events.f = function(forcedItems) { 8134 for (var i = 0; i < forcedItems.length; i++) { 8135 // only handle item if available in current instance 8136 // use a compare function, because Zepto can't handle object parameter for filter 8137 // var item = items.filter(forcedItems[i]); 8138 /* jshint loopfunc: true */ 8139 var item = items.filter(function() { 8140 return this === forcedItems[i]; 8141 }); 8142 8143 if (item.length) { 8144 _lazyLoadItems(false, item); 8145 } 8146 } 8147 }; 8148 8149 // load initial items 8150 _lazyLoadItems(); 8151 8152 // bind lazy load functions to scroll and resize event 8153 // noinspection JSUnresolvedVariable 8154 $(config.appendScroll).on('scroll.' + namespace + ' resize.' + n
vendor: 19,770 bytes, lines 8154-8674
8154amespace, events.e); 8155 } 8156 } 8157 8158 /** 8159 * prepare items before handle them 8160 * @access private 8161 * @param {Array|object|jQuery} items 8162 * @return {Array|object|jQuery} 8163 */ 8164 function _prepareItems(items) { 8165 // fetch used configurations before loops 8166 var defaultImage = config.defaultImage, 8167 placeholder = config.placeholder, 8168 imageBase = config.imageBase, 8169 srcsetAttribute = config.srcsetAttribute, 8170 loaderAttribute = config.loaderAttribute, 8171 forcedTags = config._f || {}; 8172 8173 // filter items and only add those who not handled yet and got needed attributes available 8174 items = $(items).filter(function() { 8175 var element = $(this), 8176 tag = _getElementTagName(this); 8177 8178 return !element.data(config.handledName) && 8179 (element.attr(config.attribute) || element.attr(srcsetAttribute) || element.attr(loaderAttribute) || forcedTags[tag] !== undefined); 8180 }) 8181 8182 // append plugin instance to all elements 8183 .data('plugin_' + config.name, instance); 8184 8185 for (var i = 0, l = items.length; i < l; i++) { 8186 var element = $(items[i]), 8187 tag = _getElementTagName(items[i]), 8188 elementImageBase = element.attr(config.imageBaseAttribute) || imageBase; 8189 8190 // generate and update source set if an image base is set 8191 if (tag === _img && elementImageBase && element.attr(srcsetAttribute)) { 8192 element.attr(srcsetAttribute, _getCorrectedSrcSet(element.attr(srcsetAttribute), elementImageBase)); 8193 } 8194 8195 // add loader to forced element types 8196 if (forcedTags[tag] !== undefined && !element.attr(loaderAttribute)) { 8197 element.attr(loaderAttribute, forcedTags[tag]); 8198 } 8199 8200 // set default image on every element without source 8201 if (tag === _img && defaultImage && !element.attr(_src)) { 8202 element.attr(_src, defaultImage); 8203 } 8204 8205 // set placeholder on every element without background image 8206 else if (tag !== _img && placeholder && (!element.css(_backgroundImage) || element.css(_backgroundImage) === 'none')) { 8207 element.css(_backgroundImage, "url('" + placeholder + "')"); 8208 } 8209 } 8210 8211 return items; 8212 } 8213 8214 /** 8215 * the 'lazy magic' - check all items 8216 * @access private 8217 * @param {boolean} [allItems] 8218 * @param {object} [forced] 8219 * @return void 8220 */ 8221 function _lazyLoadItems(allItems, forced) { 8222 // skip if no items where left 8223 if (!items.length) { 8224 // destroy instance if option is enabled 8225 if (config.autoDestroy) { 8226 // noinspection JSUnresolvedFunction 8227 instance.destroy(); 8228 } 8229 8230 return; 8231 } 8232 8233 var elements = forced || items, 8234 loadTriggered = false, 8235 imageBase = config.imageBase || '', 8236 srcsetAttribute = config.srcsetAttribute, 8237 handledName = config.handledName; 8238 8239 // loop all available items 8240 for (var i = 0; i < elements.length; i++) { 8241 // item is at least in loadable area 8242 if (allItems || forced || _isInLoadableArea(elements[i])) { 8243 var element = $(elements[i]), 8244 tag = _getElementTagName(elements[i]), 8245 attribute = element.attr(config.attribute), 8246 elementImageBase = element.attr(config.imageBaseAttribute) || imageBase, 8247 customLoader = element.attr(config.loaderAttribute); 8248 8249 // is not already handled 8250 if (!element.data(handledName) && 8251 // and is visible or visibility doesn't matter 8252 (!config.visibleOnly || element.is(':visible')) && ( 8253 // and image source or source set attribute is available 8254 (attribute || element.attr(srcsetAttribute)) && ( 8255 // and is image tag where attribute is not equal source or source set 8256 (tag === _img && (elementImageBase + attribute !== element.attr(_src) || element.attr(srcsetAttribute) !== element.attr(_srcset))) || 8257 // or is non image tag where attribute is not equal background 8258 (tag !== _img && elementImageBase + attribute !== element.css(_backgroundImage)) 8259 ) || 8260 // or custom loader is available 8261 customLoader)) 8262 { 8263 // mark element always as handled as this point to prevent double handling 8264 loadTriggered = true; 8265 element.data(handledName, true); 8266 8267 // load item 8268 _handleItem(element, tag, elementImageBase, customLoader); 8269 } 8270 } 8271 } 8272 8273 // when something was loaded remove them from remaining items 8274 if (loadTriggered) { 8275 items = $(items).filter(function() { 8276 return !$(this).data(handledName); 8277 }); 8278 } 8279 } 8280 8281 /** 8282 * load the given element the lazy way 8283 * @access private 8284 * @param {object} element 8285 * @param {string} tag 8286 * @param {string} imageBase 8287 * @param {function} [customLoader] 8288 * @return void 8289 */ 8290 function _handleItem(element, tag, imageBase, customLoader) { 8291 // increment count of items waiting for after load 8292 ++_awaitingAfterLoad; 8293 8294 // extended error callback for correct 'onFinishedAll' handling 8295 var errorCallback = function() { 8296 _triggerCallback('onError', element); 8297 _reduceAwaiting(); 8298 8299 // prevent further callback calls 8300 errorCallback = $.noop; 8301 }; 8302 8303 // trigger function before loading image 8304 _triggerCallback('beforeLoad', element); 8305 8306 // fetch all double used data here for better code minimization 8307 var srcAttribute = config.attribute, 8308 srcsetAttribute = config.srcsetAttribute, 8309 sizesAttribute = config.sizesAttribute, 8310 retinaAttribute = config.retinaAttribute, 8311 removeAttribute = config.removeAttribute, 8312 loadedName = config.loadedName, 8313 elementRetina = element.attr(retinaAttribute); 8314 8315 // handle custom loader 8316 if (customLoader) { 8317 // on load callback 8318 var loadCallback = function() { 8319 // remove attribute from element 8320 if (removeAttribute) { 8321 element.removeAttr(config.loaderAttribute); 8322 } 8323 8324 // mark element as loaded 8325 element.data(loadedName, true); 8326 8327 // call after load event 8328 _triggerCallback(_afterLoad, element); 8329 8330 // remove item from waiting queue and possibly trigger finished event 8331 // it's needed to be asynchronous to run after filter was in _lazyLoadItems 8332 setTimeout(_reduceAwaiting, 1); 8333 8334 // prevent further callback calls 8335 loadCallback = $.noop; 8336 }; 8337 8338 // bind error event to trigger callback and reduce waiting amount 8339 element.off(_error).one(_error, errorCallback) 8340 8341 // bind after load callback to element 8342 .one(_load, loadCallback); 8343 8344 // trigger custom loader and handle response 8345 if (!_triggerCallback(customLoader, element, function(response) { 8346 if(response) { 8347 element.off(_load); 8348 loadCallback(); 8349 } 8350 else { 8351 element.off(_error); 8352 errorCallback(); 8353 } 8354 })) { 8355 element.trigger(_error); 8356 } 8357 } 8358 8359 // handle images 8360 else { 8361 // create image object 8362 var imageObj = $(new Image()); 8363 8364 // bind error event to trigger callback and reduce waiting amount 8365 imageObj.one(_error, errorCallback) 8366 8367 // bind after load callback to image 8368 .one(_load, function() { 8369 // remove element from view 8370 element.hide(); 8371 8372 // set image back to element 8373 // do it as single 'attr' calls, to be sure 'src' is set after 'srcset' 8374 if (tag === _img) { 8375 element.attr(_sizes, imageObj.attr(_sizes)) 8376 .attr(_srcset, imageObj.attr(_srcset)) 8377 .attr(_src, imageObj.attr(_src)); 8378 } 8379 else { 8380 element.css(_backgroundImage, "url('" + imageObj.attr(_src) + "')"); 8381 } 8382 8383 // bring it back with some effect! 8384 element[config.effect](config.effectTime); 8385 8386 // remove attribute from element 8387 if (removeAttribute) { 8388 element.removeAttr(srcAttribute + ' ' + srcsetAttribute + ' ' + retinaAttribute + ' ' + config.imageBaseAttribute); 8389 8390 // only remove 'sizes' attribute, if it was a custom one 8391 if (sizesAttribute !== _sizes) { 8392 element.removeAttr(sizesAttribute); 8393 } 8394 } 8395 8396 // mark element as loaded 8397 element.data(loadedName, true); 8398 8399 // call after load event 8400 _triggerCallback(_afterLoad, element); 8401 8402 // cleanup image object 8403 imageObj.remove(); 8404 8405 // remove item from waiting queue and possibly trigger finished event 8406 _reduceAwaiting(); 8407 }); 8408 8409 // set sources 8410 // do it as single 'attr' calls, to be sure 'src' is set after 'srcset' 8411 var imageSrc = (_isRetinaDisplay && elementRetina ? elementRetina : element.attr(srcAttribute)) || ''; 8412 imageObj.attr(_sizes, element.attr(sizesAttribute)) 8413 .attr(_srcset, element.attr(srcsetAttribute)) 8414 .attr(_src, imageSrc ? imageBase + imageSrc : null); 8415 8416 // call after load even on cached image 8417 imageObj.complete && imageObj.trigger(_load); // jshint ignore : line 8418 } 8419 } 8420 8421 /** 8422 * check if the given element is inside the current viewport or threshold 8423 * @access private 8424 * @param {object} element 8425 * @return {boolean} 8426 */ 8427 function _isInLoadableArea(element) { 8428 try { 8429 var elementBound = element.getBoundingClientRect(), 8430 direction = config.scrollDirection, 8431 threshold = config.threshold, 8432 vertical = // check if element is in loadable area from top 8433 ((_getActualHeight() + threshold) > elementBound.top) && 8434 // check if element is even in loadable are from bottom 8435 (-threshold < elementBound.bottom), 8436 horizontal = // check if element is in loadable area from left 8437 ((_getActualWidth() + threshold) > elementBound.left) && 8438 // check if element is even in loadable area from right 8439 (-threshold < elementBound.right); 8440 8441 if (direction === 'vertical') { 8442 return vertical; 8443 } 8444 else if (direction === 'horizontal') { 8445 return horizontal; 8446 } 8447 8448 return vertical && horizontal; 8449 } 8450 catch (error) { 8451 return false; 8452 } 8453 } 8454 8455 /** 8456 * receive the current viewed width of the browser 8457 * @access private 8458 * @return {number} 8459 */ 8460 function _getActualWidth() { 8461 return _actualWidth >= 0 ? _actualWidth : (_actualWidth = $(window).width()); 8462 } 8463 8464 /** 8465 * receive the current viewed height of the browser 8466 * @access private 8467 * @return {number} 8468 */ 8469 function _getActualHeight() { 8470 return _actualHeight >= 0 ? _actualHeight : (_actualHeight = $(window).height()); 8471 } 8472 8473 /** 8474 * get lowercase tag name of an element 8475 * @access private 8476 * @param {object} element 8477 * @returns {string} 8478 */ 8479 function _getElementTagName(element) { 8480 return element.tagName.toLowerCase(); 8481 } 8482 8483 /** 8484 * prepend image base to all srcset entries 8485 * @access private 8486 * @param {string} srcset 8487 * @param {string} imageBase 8488 * @returns {string} 8489 */ 8490 function _getCorrectedSrcSet(srcset, imageBase) { 8491 if (imageBase) { 8492 // trim, remove unnecessary spaces and split entries 8493 var entries = srcset.split(','); 8494 srcset = ''; 8495 8496 for (var i = 0, l = entries.length; i < l; i++) { 8497 srcset += imageBase + entries[i].trim() + (i !== l - 1 ? ',' : ''); 8498 } 8499 } 8500 8501 return srcset; 8502 } 8503 8504 /** 8505 * helper function to throttle down event triggering 8506 * @access private 8507 * @param {number} delay 8508 * @param {function} callback 8509 * @return {function} 8510 */ 8511 function _throttle(delay, callback) { 8512 var timeout, 8513 lastExecute = 0; 8514 8515 return function(event, ignoreThrottle) { 8516 var elapsed = +new Date() - lastExecute; 8517 8518 function run() { 8519 lastExecute = +new Date(); 8520 // noinspection JSUnresolvedFunction 8521 callback.call(instance, event); 8522 } 8523 8524 timeout && clearTimeout(timeout); // jshint ignore : line 8525 8526 if (elapsed > delay || !config.enableThrottle || ignoreThrottle) { 8527 run(); 8528 } 8529 else { 8530 timeout = setTimeout(run, delay - elapsed); 8531 } 8532 }; 8533 } 8534 8535 /** 8536 * reduce count of awaiting elements to 'afterLoad' event and fire 'onFinishedAll' if reached zero 8537 * @access private 8538 * @return void 8539 */ 8540 function _reduceAwaiting() { 8541 --_awaitingAfterLoad; 8542 8543 // if no items were left trigger finished event 8544 if (!items.length && !_awaitingAfterLoad) { 8545 _triggerCallback('onFinishedAll'); 8546 } 8547 } 8548 8549 /** 8550 * single implementation to handle callbacks, pass element and set 'this' to current instance 8551 * @access private 8552 * @param {string|function} callback 8553 * @param {object} [element] 8554 * @param {*} [args] 8555 * @return {boolean} 8556 */ 8557 function _triggerCallback(callback, element, args) { 8558 if ((callback = config[callback])) { 8559 // jQuery's internal '$(arguments).slice(1)' are causing problems at least on old iPads 8560 // below is shorthand of 'Array.prototype.slice.call(arguments, 1)' 8561 callback.apply(instance, [].slice.call(arguments, 1)); 8562 return true; 8563 } 8564 8565 return false; 8566 } 8567 8568 // if event driven or window is already loaded don't wait for page loading 8569 if (config.bind === 'event' || windowLoaded) { 8570 _initialize(); 8571 } 8572 8573 // otherwise load initial items and start lazy after page load 8574 else { 8575 // noinspection JSUnresolvedVariable 8576 $(window).on(_load + '.' + namespace, _initialize); 8577 } 8578 } 8579 8580 /** 8581 * lazy plugin class constructor 8582 * @constructor 8583 * @access private 8584 * @param {object} elements 8585 * @param {object} settings 8586 * @return {object|LazyPlugin} 8587 */ 8588 function LazyPlugin(elements, settings) { 8589 /** 8590 * this lazy plugin instance 8591 * @access private 8592 * @type {object|LazyPlugin|LazyPlugin.prototype} 8593 */ 8594 var _instance = this, 8595 8596 /** 8597 * this lazy plugin instance configuration 8598 * @access private 8599 * @type {object} 8600 */ 8601 _config = $.extend({}, _instance.config, settings), 8602 8603 /** 8604 * instance generated event executed on container scroll or resize 8605 * packed in an object to be referenceable and short named because properties will not be minified 8606 * @access private 8607 * @type {object} 8608 */ 8609 _events = {}, 8610 8611 /** 8612 * unique namespace for instance related events 8613 * @access private 8614 * @type {string} 8615 */ 8616 _namespace = _config.name + '-' + (++lazyInstanceId); 8617 8618 // noinspection JSUndefinedPropertyAssignment 8619 /** 8620 * wrapper to get or set an entry from plugin instance configuration 8621 * much smaller on minify as direct access 8622 * @access public 8623 * @type {function} 8624 * @param {string} entryName 8625 * @param {*} [value] 8626 * @return {LazyPlugin|*} 8627 */ 8628 _instance.config = function(entryName, value) { 8629 if (value === undefined) { 8630 return _config[entryName]; 8631 } 8632 8633 _config[entryName] = value; 8634 return _instance; 8635 }; 8636 8637 // noinspection JSUndefinedPropertyAssignment 8638 /** 8639 * add additional items to current instance 8640 * @access public 8641 * @param {Array|object|string} items 8642 * @return {LazyPlugin} 8643 */ 8644 _instance.addItems = function(items) { 8645 _events.a && _events.a($.type(items) === 'string' ? $(items) : items); // jshint ignore : line 8646 return _instance; 8647 }; 8648 8649 // noinspection JSUndefinedPropertyAssignment 8650 /** 8651 * get all left items of this instance 8652 * @access public 8653 * @returns {object} 8654 */ 8655 _instance.getItems = function() { 8656 return _events.g ? _events.g() : {}; 8657 }; 8658 8659 // noinspection JSUndefinedPropertyAssignment 8660 /** 8661 * force lazy to load all items in loadable area right now 8662 * by default without throttle 8663 * @access public 8664 * @type {function} 8665 * @param {boolean} [useThrottle] 8666 * @return {LazyPlugin} 8667 */ 8668 _instance.update = function(useThrottle) { 8669 _events.e && _events.e({}, !useThrottle); // jshint ignore : line 8670 return _instance; 8671 }; 8672 8673 // noinspection JSUndefinedPropertyAssignment 8674 /**
8675 * force element(s) to load directly, ignoring the viewport 8676 * @access public 8677 * @param {Array|object|string} items 8678 * @return {LazyPlugin} 8679 */ 8680 _instance.force = function(items) { 8681 _events.f && _events.f($.type(items) === 'string' ? $(items) : items); // jshint ignore : line 8682 return _instance; 8683 }; 8684 8685 // noinspection JSUndefinedPropertyAssignment 8686 /** 8687 * force lazy to load all available items right now 8688 * this call ignores throttling 8689 * @access public 8690 * @type {function} 8691 * @return {LazyPlugin} 8692 */ 8693 _instance.loadAll = function() { 8694 _events.e && _events.e({all: true}, true); // jshint ignore : line 8695 return _instance; 8696 }; 8697 8698 // noinspection JSUndefinedPropertyAssignment 8699 /** 8700 * destroy this plugin instance 8701 * @access public 8702 * @type {function} 8703 * @return undefined 8704 */ 8705 _instance.destroy = function() { 8706 // unbind instance generated events 8707 // noinspection JSUnresolvedFunction, JSUnresolvedVariable 8708 $(_config.appendScroll).off('.' + _namespace, _events.e); 8709 // noinspection JSUnresolvedVariable 8710 $(window).off('.' + _namespace); 8711 8712 // clear events 8713 _events = {}; 8714 8715 return undefined; 8716 }; 8717 8718 // start using lazy and return all elements to be chainable or instance for further use 8719 // noinspection JSUnresolvedVariable 8720 _executeLazy(_instance, _config, elements, _events, _namespace); 8721 return _config.chainable ? elements : _instance; 8722 } 8723 8724 /** 8725 * settings and configuration data 8726 * @access public 8727 * @type {object|*} 8728 */ 8729 LazyPlugin.prototype.config = { 8730 // general 8731 name : 'lazy', 8732 chainable : true, 8733 autoDestroy : true, 8734 bind : 'load', 8735 threshold : 500, 8736 visibleOnly : false, 8737 appendScroll : window, 8738 scrollDirection : 'both', 8739 imageBase : null, 8740 defaultImage : 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==', 8741 placeholder : null, 8742 delay : -1, 8743 combined : false, 8744 8745 // attributes 8746 attribute : 'data-src', 8747 srcsetAttribute : 'data-srcset', 8748 sizesAttribute : 'data-sizes', 8749 retinaAttribute : 'data-retina', 8750 loaderAttribute : 'data-loader', 8751 imageBaseAttribute : 'data-imagebase', 8752 removeAttribute : true, 8753 handledName : 'handled', 8754 loadedName : 'loaded', 8755 8756 // effect 8757 effect : 'show', 8758 effectTime : 0, 8759 8760 // throttle 8761 enableThrottle : true, 8762 throttle : 250, 8763 8764 // callbacks 8765 beforeLoad : undefined, 8766 afterLoad : undefined, 8767 onError : undefined, 8768 onFinishedAll : undefined 8769 }; 8770 8771 // register window load event globally to prevent not loading elements 8772 // since jQuery 3.X ready state is fully async and may be executed after 'load' 8773 $(window).on('load', function() { 8774 windowLoaded = true; 8775 }); 8776})(window);; 8777/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ 8778 8779window.matchMedia || (window.matchMedia = function() { 8780 "use strict"; 8781 8782 // For browsers that support matchMedium api such as IE 9 and webkit 8783 var styleMedia = (window.styleMedia || window.media); 8784 8785 // For those that don't support matchMedium 8786 if (!styleMedia) { 8787 var style = document.createElement('style'), 8788 script = document.getElementsByTagName('script')[0], 8789 info = null; 8790 8791 style.type = 'text/css'; 8792 style.id = 'matchmediajs-test'; 8793 8794 script.parentNode.insertBefore(style, script); 8795 8796 // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 8797 info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle; 8798 8799 styleMedia = { 8800 matchMedium: function(media) { 8801 var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; 8802 8803 // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 8804 if (style.styleSheet) { 8805 style.styleSheet.cssText = text; 8806 } else { 8807 style.textContent = text; 8808 } 8809 8810 // Test if media query is true or false 8811 return info.width === '1px'; 8812 } 8813 }; 8814 } 8815 8816 return function(media) { 8817 return { 8818 matches: styleMedia.matchMedium(media || 'all'), 8819 media: media || 'all' 8820 }; 8821 }; 8822}()); 8823 8824/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */ 8825(function(){ 8826 // Bail out for browsers that have addListener support 8827 if (window.matchMedia && window.matchMedia('all').addListener) { 8828 return false;
8829 } 8830 8831 var localMatchMedia = window.matchMedia, 8832 hasMediaQueries = localMatchMedia('only all').matches, 8833 isListening = false, 8834 timeoutID = 0, // setTimeout for debouncing 'handleChange' 8835 queries = [], // Contains each 'mql' and associated 'listeners' if 'addListener' is used 8836 handleChange = function(evt) { 8837 // Debounce 8838 clearTimeout(timeoutID); 8839 8840 timeoutID = setTimeout(function() { 8841 for (var i = 0, il = queries.length; i < il; i++) { 8842 var mql = queries[i].mql, 8843 listeners = queries[i].listeners || [], 8844 matches = localMatchMedia(mql.media).matches; 8845 8846 // Update mql.matches value and call listeners 8847 // Fire listeners only if transitioning to or from matched state 8848 if (matches !== mql.matches) { 8849 mql.matches = matches; 8850 8851 for (var j = 0, jl = listeners.length; j < jl; j++) { 8852 listeners[j].call(window, mql); 8853 } 8854 } 8855 } 8856 }, 30); 8857 }; 8858 8859 window.matchMedia = function(media) { 8860 var mql = localMatchMedia(media), 8861 listeners = [], 8862 index = 0; 8863 8864 mql.addListener = function(listener) { 8865 // Changes would not occur to css media type so return now (Affects IE <= 8) 8866 if (!hasMediaQueries) { 8867 return; 8868 } 8869 8870 // Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8) 8871 // There should only ever be 1 resize listener running for performance 8872 if (!isListening) { 8873 isListening = true; 8874 window.addEventListener('resize', handleChange, true); 8875 } 8876 8877 // Push object only if it has not been pushed already 8878 if (index === 0) { 8879 index = queries.push({ 8880 mql : mql, 8881 listeners : listeners 8882 }); 8883 } 8884 8885 listeners.push(listener); 8886 }; 8887 8888 mql.removeListener = function(listener) { 8889 for (var i = 0, il = listeners.length; i < il; i++){ 8890 if (listeners[i] === listener){ 8891 listeners.splice(i, 1); 8892 } 8893 } 8894 }; 8895 8896 return mql; 8897 }; 8898}());; 8899;(function(root, factory) { 8900 if (typeof define === 'function' && define.amd) { 8901 define(['jquery'], factory); 8902 } else if (typeof exports === 'object') { 8903 module.exports = factory(require('jquery')); 8904 } else { 8905 root.jquery_mmenu_all_js = factory(root.jQuery); 8906 } 8907}(this, function(jQuery) { 8908/*! 8909 * jQuery mmenu v7.2.2 8910 * @requires jQuery 1.7.0 or later 8911 * 8912 * mmenu.frebsite.nl 8913 * 8914 * Copyright (c) Fred Heusschen 8915 * www.frebsite.nl 8916 * 8917 * License: CC-BY-NC-4.0 8918 * http://creativecommons.org/licenses/by-nc/4.0/ 8919 */ 8920 8921/* 8922 * Commented out the following code to allow the tab use when in the mmenu flyouts 8923 * if(a.$html.hasClass(s.wrapper+"_opened")&&9==e.keyCode)return e.preventDefault(),!1 8924*/ 8925!function(h){var n,p,o,a,t,f="mmenu",e="7.2.2";h[f]&&h[f].version>e||(h[f]=function(t,e,n){return this.$menu=t,this._api=["bind","getInstance","initPanels","openPanel","closePanel","closeAllPanels","setSelected"],this.opts=e,this.conf=n,this.vars={},this.cbck={},this.mtch={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initWrappers(),this._initAddons(),this._initExtensions(),this._initHooks(),this._initMenu(),this._initPanels(),this._initOpened(),this._initAnchors(),this._initMatchMedia(),"function"==typeof this.___debug&&this.___debug(),this},h[f].version=e,h[f].uniqueId=0,h[f].wrappers={},h[f].addons={},h[f].defaults={hooks:{},extensions:[],wrappers:[],navbar:{add:!0,title:"Menu",titleLink:"parent"},onClick:{setSelected:!0},slidingSubmenus:!0},h[f].configuration={classNames:{divider:"Divider",inset:"Inset",nolistview:"NoListview",nopanel:"NoPanel",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,language:null,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},h[f].prototype={getInstance:function(){return this},initPanels:function(t){this._initPanels(t)},openPanel:function(t,e){if(this.trigger("openPanel:before",t),t&&t.length&&(t.is("."+p.panel)||(t=t.closest("."+p.panel)),t.is("."+p.panel))){var n=this;if("boolean"!=typeof e&&(e=!0),t.parent("."+p.listitem+"_vertical").length)t.parents("."+p.listitem+"_vertical").addClass(p.listitem+"_opened").children("."+p.panel).removeClass(p.hidden),this.openPanel
vendor: 10,511 bytes, line 8925
8925(t.parents("."+p.panel).not(function(){return h(this).parent("."+p.listitem+"_vertical").length}).first()),this.trigger("openPanel:start",t),this.trigger("openPanel:finish",t);else{if(t.hasClass(p.panel+"_opened"))return;var i=this.$pnls.children("."+p.panel),s=this.$pnls.children("."+p.panel+"_opened");if(!h[f].support.csstransitions)return s.addClass(p.hidden).removeClass(p.panel+"_opened"),t.removeClass(p.hidden).addClass(p.panel+"_opened"),this.trigger("openPanel:start",t),void this.trigger("openPanel:finish",t);i.not(t).removeClass(p.panel+"_opened-parent");for(var a=t.data(o.parent);a;)(a=a.closest("."+p.panel)).parent("."+p.listitem+"_vertical").length||a.addClass(p.panel+"_opened-parent"),a=a.data(o.parent);i.removeClass(p.panel+"_highest").not(s).not(t).addClass(p.hidden),t.removeClass(p.hidden);var r=function(){s.removeClass(p.panel+"_opened"),t.addClass(p.panel+"_opened"),t.hasClass(p.panel+"_opened-parent")?(s.addClass(p.panel+"_highest"),t.removeClass(p.panel+"_opened-parent")):(s.addClass(p.panel+"_opened-parent"),t.addClass(p.panel+"_highest")),n.trigger("openPanel:start",t)},l=function(){s.removeClass(p.panel+"_highest").addClass(p.hidden),t.removeClass(p.panel+"_highest"),n.trigger("openPanel:finish",t)};e&&!t.hasClass(p.panel+"_noanimation")?setTimeout(function(){n.__transitionend(t,function(){l()},n.conf.transitionDuration),r()},n.conf.openingInterval):(r(),l())}this.trigger("openPanel:after",t)}},closePanel:function(t){this.trigger("closePanel:before",t);var e=t.parent();e.hasClass(p.listitem+"_vertical")&&(e.removeClass(p.listitem+"_opened"),t.addClass(p.hidden),this.trigger("closePanel",t)),this.trigger("closePanel:after",t)},closeAllPanels:function(t){this.trigger("closeAllPanels:before"),this.$pnls.find("."+p.listview).children().removeClass(p.listitem+"_selected").filter("."+p.listitem+"_vertical").removeClass(p.listitem+"_opened");var e=this.$pnls.children("."+p.panel),n=t&&t.length?t:e.first();this.$pnls.children("."+p.panel).not(n).removeClass(p.panel+"_opened").removeClass(p.panel+"_opened-parent").removeClass(p.panel+"_highest").addClass(p.hidden),this.openPanel(n,!1),this.trigger("closeAllPanels:after")},togglePanel:function(t){var e=t.parent();e.hasClass(p.listitem+"_vertical")&&this[e.hasClass(p.listitem+"_opened")?"closePanel":"openPanel"](t)},setSelected:function(t){this.trigger("setSelected:before",t),this.$menu.find("."+p.listitem+"_selected").removeClass(p.listitem+"_selected"),t.addClass(p.listitem+"_selected"),this.trigger("setSelected:after",t)},bind:function(t,e){this.cbck[t]=this.cbck[t]||[],this.cbck[t].push(e)},trigger:function(){var t=Array.prototype.slice.call(arguments),e=t.shift();if(this.cbck[e])for(var n=0,i=this.cbck[e].length;n<i;n++)this.cbck[e][n].apply(this,t)},matchMedia:function(t,e,n){var i={yes:e,no:n};this.mtch[t]=this.mtch[t]||[],this.mtch[t].push(i)},i18n:function(t){return h[f].i18n(t,this.conf.language)},_initHooks:function(){for(var t in this.opts.hooks)this.bind(t,this.opts.hooks[t])},_initWrappers:function(){this.trigger("initWrappers:before");for(var t=0;t<this.opts.wrappers.length;t++){var e=h[f].wrappers[this.opts.wrappers[t]];"function"==typeof e&&e.call(this)}this.trigger("initWrappers:after")},_initAddons:function(){var t;for(t in this.trigger("initAddons:before"),h[f].addons)h[f].addons[t].add.call(this),h[f].addons[t].add=function(){};for(t in h[f].addons)h[f].addons[t].setup.call(this);this.trigger("initAddons:after")},_initExtensions:function(){this.trigger("initExtensions:before");var e=this;for(var t in this.opts.extensions.constructor===Array&&(this.opts.extensions={all:this.opts.extensions}),this.opts.extensions)this.opts.extensions[t]=this.opts.extensions[t].length?p.menu+"_"+this.opts.extensions[t].join(" "+p.menu+"_"):"",this.opts.extensions[t]&&function(t){e.matchMedia(t,function(){this.$menu.addClass(this.opts.extensions[t])},function(){this.$menu.removeClass(this.opts.extensions[t])})}(t);this.trigger("initExtensions:after")},_initMenu:function(){this.trigger("initMenu:before");this.conf.clone&&(this.$orig=this.$menu,this.$menu=this.$orig.clone(),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){h(this).attr("id",p.mm(h(this).attr("id")))})),this.$menu.attr("id",this.$menu.attr("id")||this.__getUniqueId()),this.$pnls=h('<div class="'+p.panels+'" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.addClass(p.menu).parent().addClass(p.wrapper),this.trigger("initMenu:after")},_initPanels:function(t){this.trigger("initPanels:before",t),t=t||this.$pnls.children(this.conf.panelNodetype);var i=h(),s=this,a=function(t){t.filter(s.conf.panelNodetype).each(function(t){var e=s._initPanel(h(this));if(e){s._initNavbar(e),s._initListview(e),i=i.add(e);var n=e.children("."+p.listview).children("li").children(s.conf.panelNodetype).add(e.children("."+s.conf.classNames.panel));n.length&&a(n)}})};a(t),this.trigger("initPanels:after",i)},_initPanel:function(t){this.trigger("initPanel:before",t);if(t.hasClass(p.panel))return t;if(this.__refactorClass(t,this.conf.classNames.panel,p.panel),this.__refactorClass(t,this.conf.classNames.nopanel,p.nopanel),this.__refactorClass(t,this.conf.classNames.inset,p.listview+"_inset"),t.filter("."+p.listview+"_inset").addClass(p.nopanel),t.hasClass(p.nopanel))return!1;var e=t.hasClass(this.conf.classNames.vertical)||!this.opts.slidingSubmenus;t.removeClass(this.conf.classNames.vertical);var n=t.attr("id")||this.__getUniqueId();t.is("ul, ol")&&(t.removeAttr("id"),t.wrap("<div />"),t=t.parent()),t.attr("id",n),t.addClass(p.panel+" "+p.hidden);var i=t.parent("li");return e?i.addClass(p.listitem+"_vertical"):t.appendTo(this.$pnls),i.length&&(i.data(o.child,t),t.data(o.parent,i)),this.trigger("initPanel:after",t),t},_initNavbar:function(t){if(this.trigger("initNavbar:before",t),!t.children("."+p.navbar).length){var e=t.data(o.parent),n=h('<div class="'+p.navbar+'" />'),i=this.__getPanelTitle(t,this.opts.navbar.title),s="";if(e&&e.length){if(e.hasClass(p.listitem+"_vertical"))return;if(e.parent().is("."+p.listview))var a=e.children("a, span").not("."+p.btn+"_next");else a=e.closest("."+p.panel).find('a[href="#'+t.attr("id")+'"]');var r=(e=(a=a.first()).closest("."+p.panel)).attr("id");switch(i=this.__getPanelTitle(t,h("<span>"+a.text()+"</span>").text()),this.opts.navbar.titleLink){case"anchor":s=a.attr("href");break;case"parent":s="#"+r}n.append('<a class="'+p.btn+" "+p.btn+"_prev "+p.navbar+'__btn" href="#'+r+'" />')}else if(!this.opts.navbar.title)return;this.opts.navbar.add&&t.addClass(p.panel+"_has-navbar"),n.append('<a class="'+p.navbar+'__title"'+(s.length?' href="'+s+'"':"")+">"+i+"</a>").prependTo(t),this.trigger("initNavbar:after",t)}},_initListview:function(t){this.trigger("initListview:before",t);var e=this.__childAddBack(t,"ul, ol");this.__refactorClass(e,this.conf.classNames.nolistview,p.nolistview);var n=e.not("."+p.nolistview).addClass(p.listview).children().addClass(p.listitem);this.__refactorClass(n,this.conf.classNames.selected,p.listitem+"_selected"),this.__refactorClass(n,this.conf.classNames.divider,p.listitem+"_divider"),this.__refactorClass(n,this.conf.classNames.spacer,p.listitem+"_spacer"),n.children("a, span").not("."+p.btn).addClass(p.listitem+"__text");var i=t.data(o.parent);if(i&&i.is("."+p.listitem)&&!i.children("."+p.btn).length){var s=i.children("a, span").first(),a=h('<a class="'+p.btn+" "+p.btn+"_next "+p.listitem+'__btn" href="#'+t.attr("id")+'" />');a.insertAfter(s),s.is("span")&&(a.addClass(p.listitem+"__text").html(s.html()),s.remove())}this.trigger("initListview:after",t)},_initOpened:function(){this.trigger("initOpened:before");var t=this.$pnls.find("."+p.listitem+"_selected").removeClass(p.listitem+"_selected").last().addClass(p.listitem+"_selected"),e=t.length?t.closest("."+p.panel):this.$pnls.children("."+p.panel).first();this.openPanel(e,!1),this.trigger("initOpened:after")},_initAnchors:function(){this.trigger("initAnchors:before");var c=this;t.$body.on(a.click+"-oncanvas","a[href]",function(t){var e=h(this),n=e.attr("href"),i=c.$menu.find(e).length,s=e.is("."+p.listitem+" > a"),a=e.is('[rel="external"]')||e.is('[target="_blank"]');if(i&&1<n.length&&"#"==n.slice(0,1))try{var r=c.$menu.find(n);if(r.is("."+p.panel))return c[e.parent().hasClass(p.listitem+"_vertical")?"togglePanel":"openPanel"](r),void t.preventDefault()}catch(t){}var l={close:null,setSelected:null,preventDefault:"#"==n.slice(0,1)};for(var o in h[f].addons){var d=h[f].addons[o].clickAnchor.call(c,e,i,s,a);if(d){if("boolean"==typeof d)return void t.preventDefault();"object"==typeof d&&(l=h.extend({},l,d))}}i&&s&&!a&&(c.__valueOrFn(e,c.opts.onClick.setSelected,l.setSelected)&&c.setSelected(h(t.target).parent()),c.__valueOrFn(e,c.opts.onClick.preventDefault,l.preventDefault)&&t.preventDefault(),c.__valueOrFn(e,c.opts.onClick.close,l.close)&&c.opts.offCanvas&&"function"==typeof c.close&&c.close())}),this.trigger("initAnchors:after")},_initMatchMedia:function(){var n=this;for(var i in this.mtch)!function(){var e=i,t=window.matchMedia(e);n._fireMatchMedia(e,t),t.addListener(function(t){n._fireMatchMedia(e,t)})}()},_fireMatchMedia:function(t,e){for(var n=e.matches?"yes":"no",i=0;i<this.mtch[t].length;i++)this.mtch[t][i][n].call(this)},_getOriginalMenuId:function(){var t=this.$menu.attr("id");return this.conf.clone&&t&&t.length&&(t=p.umm(t)),t},__api:function(){var n=this,i={};return h.each(this._api,function(t){var e=this;i[e]=function(){var t=n[e].apply(n,arguments);return void 0===t?i:t}}),i},__valueOrFn:function(t,e,n){if("function"==typeof e){var i=e.call(t[0]);if(void 0!==i)return i}return"function"!=typeof e&&void 0!==e||void 0===n?e:n},__getPanelTitle:function(t,e){var n;return"function"==typeof this.opts.navbar.title&&(n=this.opts.navbar.title.call(t[0])),void 0===n&&(n=t.data(o.title)),void 0!==n?n:"string"==typeof e?this.i18n(e):this.i18n(h[f].defaults.navbar.title)},__refactorClass:function(t,e,n){return t.filter("."+e).removeClass(e).addClass(n)},__findAddBack:function(t,e){return t.find(e).add(t.filter(e))},__childAddBack:function(t,e){return t.children(e).add(t.filter(e))},__filterListItems:function(t){return t.not("."+p.listitem+"_divider").not("."+p.hidden)},__filterListItemAnchors:function(t){return this.__filterListItems(t).children("a").not("."+p.btn+"_next")},__openPanelWoAnimation:function(t){t.hasClass(p.panel+"_noanimation")||(t.addClass(p.panel+"_noanimation"),this.__transitionend(t,function(){t.removeClass(p.panel+"_noanimation")}
vendor: 48,206 bytes, lines 8925-8946
8925,this.conf.openingInterval),this.openPanel(t))},__transitionend:function(e,n,t){var i=!1,s=function(t){void 0!==t&&t.target!=e[0]||(i||(e.off(a.transitionend),e.off(a.webkitTransitionEnd),n.call(e[0])),i=!0)};e.on(a.transitionend,s),e.on(a.webkitTransitionEnd,s),setTimeout(s,1.1*t)},__getUniqueId:function(){return p.mm(h[f].uniqueId++)}},h.fn[f]=function(n,i){!function(){if(h[f].glbl)return;t={$wndw:h(window),$docu:h(document),$html:h("html"),$body:h("body")},p={},o={},a={},h.each([p,o,a],function(t,i){i.add=function(t){t=t.split(" ");for(var e=0,n=t.length;e<n;e++)i[t[e]]=i.mm(t[e])}}),p.mm=function(t){return"mm-"+t},p.add("wrapper menu panels panel nopanel navbar listview nolistview listitem btn hidden"),p.umm=function(t){return"mm-"==t.slice(0,3)&&(t=t.slice(3)),t},o.mm=function(t){return"mm-"+t},o.add("parent child title"),a.mm=function(t){return t+".mm"},a.add("transitionend webkitTransitionEnd click scroll resize keydown mousedown mouseup touchstart touchmove touchend orientationchange"),h[f]._c=p,h[f]._d=o,h[f]._e=a,h[f].glbl=t}(),n=h.extend(!0,{},h[f].defaults,n),i=h.extend(!0,{},h[f].configuration,i);var s=h();return this.each(function(){var t=h(this);if(!t.data(f)){var e=new h[f](t,n,i);e.$menu.data(f,e.__api()),s=s.add(e.$menu)}}),s},h[f].i18n=(n={},function(t,e){switch(typeof t){case"object":return"string"==typeof e&&(void 0===n[e]&&(n[e]={}),h.extend(n[e],t)),n;case"string":return"string"==typeof e&&void 0!==n[e]&&n[e][t]||t;case"undefined":default:return n}}),h[f].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints||!1,csstransitions:"undefined"==typeof Modernizr||void 0===Modernizr.csstransitions||Modernizr.csstransitions})}(jQuery); 8926!function(r){var s,i,o,a,t="mmenu",p="offCanvas";r[t].addons[p]={setup:function(){if(this.opts[p]){var e=this.opts[p],i=this.conf[p];a=r[t].glbl,this._api=r.merge(this._api,["open","close","setPage"]),"object"!=typeof e&&(e={}),e=this.opts[p]=r.extend(!0,{},r[t].defaults[p],e),"string"!=typeof i.page.selector&&(i.page.selector="> "+i.page.nodetype),this.vars.opened=!1;var o=[s.menu+"_offcanvas"];this.bind("initMenu:after",function(){var e=this;this._initBlocker(),this.setPage(a.$page),this["_initWindow_"+p](),this.$menu.addClass(o.join(" ")).parent("."+s.wrapper).removeClass(s.wrapper),this.$menu[i.menu.insertMethod](i.menu.insertSelector);var t=window.location.hash;if(t){var n=this._getOriginalMenuId();n&&n==t.slice(1)&&setTimeout(function(){e.open()},1e3)}}),this.bind("setPage:after",function(e){a.$blck&&a.$blck.children("a").attr("href","#"+e.attr("id"))}),this.bind("open:start:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!1)}),this.bind("close:finish:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)}),this.bind("initMenu:after:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)}),this.bind("initBlocker:after:sr-text",function(){a.$blck.children("a").html(this.__sr_text(this.i18n(this.conf.screenReader.text.closeMenu)))})}},add:function(){s=r[t]._c,i=r[t]._d,o=r[t]._e,s.add("slideout page no-csstransforms3d"),i.add("style")},clickAnchor:function(e,t){var n=this;if(this.opts[p]){var i=this._getOriginalMenuId();if(i&&e.is('[href="#'+i+'"]')){if(t)return this.open(),!0;var o=e.closest("."+s.menu);if(o.length){var r=o.data("mmenu");if(r&&r.close)return r.close(),n.__transitionend(o,function(){n.open()},n.conf.transitionDuration),!0}return this.open(),!0}if(a.$page)return(i=a.$page.first().attr("id"))&&e.is('[href="#'+i+'"]')?(this.close(),!0):void 0}}},r[t].defaults[p]={blockUI:!0,moveBackground:!0},r[t].configuration[p]={menu:{insertMethod:"prependTo",insertSelector:"body"},page:{nodetype:"div",selector:null,noSelector:[],wrapIfNeeded:!0}},r[t].prototype.open=function(){if(this.trigger("open:before"),!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger("open:after")}},r[t].prototype._openSetup=function(){var e=this,t=this.opts[p];this.closeAllOthers(),a.$page.each(function(){r(this).data(i.style,r(this).attr("style")||"")}),a.$wndw.trigger(o.resize+"-"+p,[!0]);var n=[s.wrapper+"_opened"];t.blockUI&&n.push(s.wrapper+"_blocking"),"modal"==t.blockUI&&n.push(s.wrapper+"_modal"),t.moveBackground&&n.push(s.wrapper+"_background"),a.$html.addClass(n.join(" ")),setTimeout(function(){e.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(s.menu+"_opened")},r[t].prototype._openFinish=function(){var e=this;this.__transitionend(a.$page.first(),function(){e.trigger("open:finish")},this.conf.transitionDuration),this.trigger("open:start"),a.$html.addClass(s.wrapper+"_opening")},r[t].prototype.close=function(){if(this.trigger("close:before"),this.vars.opened){var t=this;this.__transitionend(a.$page.first(),function(){t.$menu.removeClass(s.menu+"_opened");var e=[s.wrapper+"_opened",s.wrapper+"_blocking",s.wrapper+"_modal",s.wrapper+"_background"];a.$html.removeClass(e.join(" ")),a.$page.each(function(){var e=r(this).data(i.style);r(this).attr("style",e)}),t.vars.opened=!1,t.trigger("close:finish")},this.conf.transitionDuration),this.trigger("close:start"),a.$html.removeClass(s.wrapper+"_opening"),this.trigger("close:after")}},r[t].prototype.closeAllOthers=function(){a.$body.find("."+s.menu+"_offcanvas").not(this.$menu).each(function(){var e=r(this).data(t);e&&e.close&&e.close()})},r[t].prototype.setPage=function(e){this.trigger("setPage:before",e);var t=this,n=this.conf[p];e&&e.length||(e=a.$body.find(n.page.selector).not("."+s.menu).not("."+s.wrapper+"__blocker"),n.page.noSelector.length&&(e=e.not(n.page.noSelector.join(", "))),1<e.length&&n.page.wrapIfNeeded&&(e=e.wrapAll("<"+this.conf[p].page.nodetype+" />").parent())),e.addClass(s.page+" "+s.slideout).each(function(){r(this).attr("id",r(this).attr("id")||t.__getUniqueId())}),a.$page=e,this.trigger("setPage:after",e)},r[t].prototype["_initWindow_"+p]=function(){a.$wndw.off(o.keydown+"-"+p).on(o.keydown+"-"+p,function(e){/*if(a.$html.hasClass(s.wrapper+"_opened")&&9==e.keyCode)return e.preventDefault(),!1*/});var i=0;a.$wndw.off(o.resize+"-"+p).on(o.resize+"-"+p,function(e,t){if(1==a.$page.length&&(t||a.$html.hasClass(s.wrapper+"_opened"))){var n=a.$wndw.height();(t||n!=i)&&(i=n,a.$page.css("minHeight",n))}})},r[t].prototype._initBlocker=function(){var t=this,e=this.opts[p],n=this.conf[p];this.trigger("initBlocker:before"),e.blockUI&&(a.$blck||(a.$blck=r('<div class="'+s.wrapper+"__blocker "+s.slideout+'" />').append("<a />")),a.$blck.appendTo(n.menu.insertSelector).off(o.touchstart+"-"+p+" "+o.touchmove+"-"+p).on(o.touchstart+"-"+p+" "+o.touchmove+"-"+p,function(e){e.preventDefault(),e.stopPropagation(),a.$blck.trigger(o.mousedown+"-"+p)}).off(o.mousedown+"-"+p).on(o.mousedown+"-"+p,function(e){e.preventDefault(),a.$html.hasClass(s.wrapper+"_modal")||(t.closeAllOthers(),t.close())}),this.trigger("initBlocker:after"))}}(jQuery); 8927!function(n){var s,o,i="mmenu",e="screenReader";n[i].addons[e]={setup:function(){var r=this,t=this.opts[e],a=this.conf[e];n[i].glbl,"boolean"==typeof t&&(t={aria:t,text:t}),"object"!=typeof t&&(t={}),(t=this.opts[e]=n.extend(!0,{},n[i].defaults[e],t)).aria&&(this.bind("initAddons:after",function(){this.bind("initMenu:after",function(){this.trigger("initMenu:after:sr-aria")}),this.bind("initNavbar:after",function(){this.trigger("initNavbar:after:sr-aria",arguments[0])}),this.bind("openPanel:start",function(){this.trigger("openPanel:start:sr-aria",arguments[0])}),this.bind("close:start",function(){this.trigger("close:start:sr-aria")}),this.bind("close:finish",function(){this.trigger("close:finish:sr-aria")}),this.bind("open:start",function(){this.trigger("open:start:sr-aria")}),this.bind("initOpened:after",function(){this.trigger("initOpened:after:sr-aria")})}),this.bind("updateListview",function(){this.$pnls.find("."+s.listview).children().each(function(){r.__sr_aria(n(this),"hidden",n(this).is("."+s.hidden))})}),this.bind("openPanel:start",function(t){var i=this.$menu.find("."+s.panel).not(t).not(t.parents("."+s.panel)),n=t.add(t.find("."+s.listitem+"_vertical ."+s.listitem+"_opened").children("."+s.panel));this.__sr_aria(i,"hidden",!0),this.__sr_aria(n,"hidden",!1)}),this.bind("closePanel",function(t){this.__sr_aria(t,"hidden",!0)}),this.bind("initPanels:after",function(t){var i=t.find("."+s.btn).each(function(){r.__sr_aria(n(this),"owns",n(this).attr("href").replace("#",""))});this.__sr_aria(i,"haspopup",!0)}),this.bind("initNavbar:after",function(t){var i=t.children("."+s.navbar);this.__sr_aria(i,"hidden",!t.hasClass(s.panel+"_has-navbar"))}),t.text&&"parent"==this.opts.navbar.titleLink&&this.bind("initNavbar:after",function(t){var i=t.children("."+s.navbar),n=!!i.children("."+s.btn+"_prev").length;this.__sr_aria(i.children("."+s.title),"hidden",n)})),t.text&&(this.bind("initAddons:after",function(){this.bind("setPage:after",function(){this.trigger("setPage:after:sr-text",arguments[0])}),this.bind("initBlocker:after",function(){this.trigger("initBlocker:after:sr-text")})}),this.bind("initNavbar:after",function(t){var i=t.children("."+s.navbar),n=this.i18n(a.text.closeSubmenu);i.children("."+s.btn+"_prev").html(this.__sr_text(n))}),this.bind("initListview:after",function(t){var i=t.data(o.parent);if(i&&i.length){var n=i.children("."+s.btn+"_next"),e=this.i18n(a.text[n.parent().is("."+s.listitem+"_vertical")?"toggleSubmenu":"openSubmenu"]);n.append(r.__sr_text(e))}}))},add:function(){s=n[i]._c,o=n[i]._d,n[i]._e,s.add("sronly")},clickAnchor:function(t,i){}},n[i].defaults[e]={aria:!0,text:!0},n[i].configuration[e]={text:{closeMenu:"Close menu",closeSubmenu:"Close submenu",openSubmenu:"Open submenu",toggleSubmenu:"Toggle submenu"}},n[i].prototype.__sr_aria=function(t,i,n){t.prop("aria-"+i,n)[n?"attr":"removeAttr"]("aria-"+i,n)},n[i].prototype.__sr_role=function(t,i){t.prop("role",i)[i?"attr":"removeAttr"]("role",i)},n[i].prototype.__sr_text=function(t){return'<span class="'+s.sronly+'">'+t+"</span>"}}(jQuery); 8928!function(n){var e,r,s,t="mmenu",i="scrollBugFix";n[t].addons[i]={setup:function(){var o=this.opts[i];this.conf[i];s=n[t].glbl,n[t].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&("boolean"==typeof o&&(o={fix:o}),"object"!=typeof o&&(o={}),(o=this.opts[i]=n.extend(!0,{},n[t].defaults[i],o)).fix&&(this.bind("open:start",function(){this.$pnls.children("."+e.panel+"_opened").scrollTop(0)}),this.bind("initMenu:after",function(){this["_initWindow_"+i]()})))},add:function(){e=n[t]._c,n[t]._d,r=n[t]._e},clickAnchor:function(o,t){}},n[t].defaults[i]={fix:!0},n[t].prototype["_initWindow_"+i]=function(){var o=this;n(document).off(r.touchmove+"-"+i).on(r.touchmove+"-"+i,function(o){s.$html.hasClass(e.wrapper+"_opened")&&o.preventDefault()});var t=!1;s.$body.off(r.touchstart+"-"+i).on(r.touchstart+"-"+i,"."+e.panels+"> ."+e.panel,function(o){s.$html.hasClass(e.wrapper+"_opened")&&(t||(t=!0,0===o.currentTarget.scrollTop?o.currentTarget.scrollTop=1:o.currentTarget.scrollHeight===o.currentTarget.scrollTop+o.currentTarget.offsetHeight&&(o.currentTarget.scrollTop-=1),t=!1))}).off(r.touchmove+"-"+i).on(r.touchmove+"-"+i,"."+e.panels+"> ."+e.panel,function(o){s.$html.hasClass(e.wrapper+"_opened")&&n(this)[0].scrollHeight>n(this).innerHeight()&&o.stopPropagation()}),s.$wndw.off(r.orientationchange+"-"+i).on(r.orientationchange+"-"+i,function(){o.$pnls.children("."+e.panel+"_opened").scrollTop(0).css({"-webkit-overflow-scrolling":"auto"}).css({"-webkit-overflow-scrolling":"touch"})})}}(jQuery); 8929!function(s){var a,e="mmenu",i="autoHeight";s[e].addons[i]={setup:function(){var h=this.opts[i];this.conf[i];if(s[e].glbl,"boolean"==typeof h&&h&&(h={height:"auto"}),"string"==typeof h&&(h={height:h}),"object"!=typeof h&&(h={}),"auto"==(h=this.opts[i]=s.extend(!0,{},s[e].defaults[i],h)).height||"highest"==h.height){this.bind("initMenu:after",function(){this.$menu.addClass(a.menu+"_autoheight")});var t=function(t){if(!this.opts.offCanvas||this.vars.opened){var e=Math.max(parseInt(this.$pnls.css("top"),10),0)||0,i=Math.max(parseInt(this.$pnls.css("bottom"),10),0)||0,n=0;this.$menu.addClass(a.menu+"_autoheight-measuring"),"auto"==h.height?((t=t||this.$pnls.children("."+a.panel+"_opened")).parent("."+a.listitem+"_vertical").length&&(t=t.parents("."+a.panel).not(function(){return s(this).parent("."+a.listitem+"_vertical").length})),t.length||(t=this.$pnls.children("."+a.panel)),n=t.first().outerHeight()):"highest"==h.height&&this.$pnls.children("."+a.panel).each(function(){var t=s(this);t.parent("."+a.listitem+"_vertical").length&&(t=t.parents("."+a.panel).not(function(){return s(this).parent("."+a.listitem+"_vertical").length})),n=Math.max(n,t.first().outerHeight())}),this.$menu.height(n+e+i).removeClass(a.menu+"_autoheight-measuring")}};this.opts.offCanvas&&this.bind("open:start",t),"highest"==h.height&&this.bind("initPanels:after",t),"auto"==h.height&&(this.bind("updateListview",t),this.bind("openPanel:start",t),this.bind("closePanel",t))}},add:function(){a=s[e]._c,s[e]._d,s[e]._e.add("resize")},clickAnchor:function(t,e){}},s[e].defaults[i]={height:"default"}}(jQuery); 8930!function(s){var a,h="mmenu",c="backButton";s[h].addons[c]={setup:function(){if(this.opts.offCanvas){var o=this,n=this.opts[c];this.conf[c];s[h].glbl,"boolean"==typeof n&&(n={close:n}),"object"!=typeof n&&(n={}),n=s.extend(!0,{},s[h].defaults[c],n);var e="#"+this.$menu.attr("id");if(n.close){var i=[];function t(){i=[e],this.$pnls.children("."+a.panel+"_opened-parent").add(o.$pnls.children("."+a.panel+"_opened")).each(function(){i.push("#"+s(this).attr("id"))})}this.bind("open:finish",function(){history.pushState(null,document.title,e)}),this.bind("open:finish",t),this.bind("openPanel:finish",t),this.bind("close:finish",function(){i=[],history.back(),history.pushState(null,document.title,location.pathname+location.search)}),s(window).on("popstate",function(n){if(o.vars.opened&&i.length){var t=(i=i.slice(0,-1))[i.length-1];t==e?o.close():(o.openPanel(s(t)),history.pushState(null,document.title,e))}})}n.open&&s(window).on("popstate",function(n){o.vars.opened||location.hash!=e||o.open()})}},add:function(){window.history&&window.history.pushState?(a=s[h]._c,s[h]._d,s[h]._e):s[h].addons[c].setup=function(){}},clickAnchor:function(n,t){}},s[h].defaults[c]={close:!1,open:!1}}(jQuery); 8931!function(t){var o,d,n="mmenu",p="columns";t[n].addons[p]={setup:function(){var i=this.opts[p];this.conf[p];if(t[n].glbl,"boolean"==typeof i&&(i={add:i}),"number"==typeof i&&(i={add:!0,visible:i}),"object"!=typeof i&&(i={}),"number"==typeof i.visible&&(i.visible={min:i.visible,max:i.visible}),(i=this.opts[p]=t.extend(!0,{},t[n].defaults[p],i)).add){i.visible.min=Math.max(1,Math.min(6,i.visible.min)),i.visible.max=Math.max(i.visible.min,Math.min(6,i.visible.max));for(var a="",s="",e=0;e<=i.visible.max;e++)a+=" "+o.menu+"_columns-"+e,s+=" "+o.panel+"_columns-"+e;a.length&&(a=a.slice(1),s=s.slice(1));var l=s+" "+o.panel+"_opened "+o.panel+"_opened-parent "+o.panel+"_highest";this.bind("openPanel:before",function(e){var n=e.data(d.parent);if(n&&(n=n.closest("."+o.panel)).length){var i=n.attr("class");if(i&&(i=i.split(o.panel+"_columns-")[1]))for(i=parseInt(i.split(" ")[0],10)+1;0<i;){var a=this.$pnls.children("."+o.panel+"_columns-"+i);if(!a.length){i=-1;break}i++,a.removeClass(l).addClass(o.hidden)}}}),this.bind("openPanel:start",function(e){var n=this.$pnls.children("."+o.panel+"_opened-parent").length;e.hasClass(o.panel+"_opened-parent")||n++,n=Math.min(i.visible.max,Math.max(i.visible.min,n)),this.$menu.removeClass(a).addClass(o.menu+"_columns-"+n),this.$pnls.children("."+o.panel).removeClass(s).filter("."+o.panel+"_opened-parent").add(e).slice(-i.visible.max).each(function(e){t(this).addClass(o.panel+"_columns-"+e)})})}},add:function(){o=t[n]._c,d=t[n]._d,t[n]._e},clickAnchor:function(e,n){}},t[n].defaults[p]={add:!1,visible:{min:1,max:3}}}(jQuery); 8932!function(a){var s,d,n="mmenu",c="counters";a[n].addons[c]={setup:function(){var i=this,e=this.opts[c];this.conf[c];if(a[n].glbl,"boolean"==typeof e&&(e={add:e,update:e}),"object"!=typeof e&&(e={}),e=this.opts[c]=a.extend(!0,{},a[n].defaults[c],e),this.bind("initListview:after",function(t){var n=this.conf.classNames[c].counter;this.__refactorClass(t.find("."+n),n,s.counter)}),e.add&&this.bind("initListview:after",function(t){var n;switch(e.addTo){case"panels":n=t;break;default:n=t.filter(e.addTo)}n.each(function(){var t=a(this).data(d.parent);t&&(t.find("."+s.counter).length||t.children("."+s.btn).prepend(a('<span class="'+s.counter+'" />')))})}),e.update){var t=function(t){(t=t||this.$pnls.children("."+s.panel)).each(function(){var t=a(this),n=t.data(d.parent);if(n){var e=n.find("."+s.counter);e.length&&(t=t.children("."+s.listview)).length&&e.html(i.__filterListItems(t.children()).length)}})};this.bind("initListview:after",t),this.bind("updateListview",t)}},add:function(){s=a[n]._c,d=a[n]._d,a[n]._e,s.add("counter")},clickAnchor:function(t,n){}},a[n].defaults[c]={add:!1,addTo:"panels",count:!1},a[n].configuration.classNames[c]={counter:"Counter"}}(jQuery); 8933!function(d){var l,i,t="mmenu",a="dividers";d[t].addons[a]={setup:function(){var e=this,n=this.opts[a];this.conf[a];if(d[t].glbl,"boolean"==typeof n&&(n={add:n,fixed:n}),"object"!=typeof n&&(n={}),(n=this.opts[a]=d.extend(!0,{},d[t].defaults[a],n)).type&&this.bind("initMenu:after",function(){this.$menu.addClass(l.menu+"_"+a+"-"+n.type)}),n.add&&this.bind("initListview:after",function(i){var t;switch(n.addTo){case"panels":t=i;break;default:t=i.filter(n.addTo)}t.length&&(t.children("."+l.listitem+"_divider").remove(),t.find("."+l.listview).each(function(){var t="";e.__filterListItems(d(this).children()).each(function(){var i=d.trim(d(this).children("a, span").text()).slice(0,1).toLowerCase();i!=t&&i.length&&(t=i,d('<li class="'+l.listitem+" "+l.listitem+'_divider">'+i+"</li>").insertBefore(this))})}))}),n.fixed){this.bind("initPanels:after",function(){void 0===this.$fixeddivider&&(this.$fixeddivider=d('<ul class="'+l.listview+" "+l.listview+'_fixeddivider"><li class="'+l.listitem+" "+l.listitem+'_divider"></li></ul>').appendTo(this.$pnls).children())});var s=function(i){if(!(i=i||this.$pnls.children("."+l.panel+"_opened")).is(":hidden")){var t=i.find("."+l.listitem+"_divider").not("."+l.hidden),e=i.scrollTop()||0,n="";t.each(function(){d(this).position().top+e<e+1&&(n=d(this).text())}),this.$fixeddivider.text(n),this.$pnls[n.length?"addClass":"removeClass"](l.panel+"_dividers")}};this.bind("open:start",s),this.bind("openPanel:start",s),this.bind("updateListview",s),this.bind("initPanel:after",function(t){t.off(i.scroll+"-"+a+" "+i.touchmove+"-"+a).on(i.scroll+"-"+a+" "+i.touchmove+"-"+a,function(i){t.hasClass(l.panel+"_opened")&&s.call(e,t)})})}},add:function(){l=d[t]._c,d[t]._d,(i=d[t]._e).add("scroll")},clickAnchor:function(i,t){}},d[t].defaults[a]={add:!1,addTo:"panels",fixed:!1,type:null}}(jQuery); 8934!function(y){var x,p,o,n="mmenu",O="drag";function $(n,e,t){return n<e&&(n=e),t<n&&(n=t),n}y[n].addons[O]={setup:function(){if(this.opts.offCanvas){var e=this.opts[O],t=this.conf[O];o=y[n].glbl,"boolean"==typeof e&&(e={menu:e,panels:e}),"object"!=typeof e&&(e={}),"boolean"==typeof e.menu&&(e.menu={open:e.menu}),"object"!=typeof e.menu&&(e.menu={}),"boolean"==typeof e.panels&&(e.panels={close:e.panels}),"object"!=typeof e.panels&&(e.panels={}),(e=this.opts[O]=y.extend(!0,{},y[n].defaults[O],e)).menu.open&&this.bind("setPage:after",function(){(function(e,t,o){var i,a,s,r,p=this,c={events:"panleft panright",typeLower:"x",typeUpper:"X",open_dir:"right",close_dir:"left",negative:!1},d="width",u=c.open_dir,f=function(n){n<=e.maxStartPos&&(m=1)},l=function(){return y("."+x.slideout)},m=0,h=0,g=0,n=this.opts.extensions.all,_=void 0===n?"left":-1<n.indexOf(x.menu+"_position-right")?"right":-1<n.indexOf(x.menu+"_position-top")?"top":-1<n.indexOf(x.menu+"_position-bottom")?"bottom":"left",v=void 0===n?"back":-1<n.indexOf(x.menu+"_position-top")||-1<n.indexOf(x.menu+"_position-bottom")||-1<n.indexOf(x.menu+"_position-front")?"front":"back";switch(_){case"top":case"bottom":c.events="panup pandown",c.typeLower="y",c.typeUpper="Y",d="height"}switch(_){case"right":case"bottom":c.negative=!0,f=function(n){n>=o.$wndw[d]()-e.maxStartPos&&(m=1)}}switch(_){case"right":c.open_dir="left",c.close_dir="right";break;case"top":c.open_dir="down",c.close_dir="up";break;case"bottom":c.open_dir="up",c.close_dir="down"}switch(v){case"front":l=function(){return p.$menu}}var b=this.__valueOrFn(this.$menu,e.node,o.$page);"string"==typeof b&&(b=y(b));var w=new Hammer(b[0],this.opts[O].vendors.hammer);w.on("panstart",function(n){f(n.center[c.typeLower]),r=l(),u=c.open_dir}),w.on(c.events+" panend",function(n){0<m&&n.preventDefault()}),w.on(c.events,function(n){if(i=n["delta"+c.typeUpper],c.negative&&(i=-i),i!=h&&(u=h<=i?c.open_dir:c.close_dir),(h=i)>e.threshold&&1==m){if(o.$html.hasClass(x.wrapper+"_opened"))return;m=2,p._openSetup(),p.trigger("open:start"),o.$html.addClass(x.dragging),g=$(o.$wndw[d]()*t[d].perc,t[d].min,t[d].max)}2==m&&(a=$(h,10,g)-("front"==v?g:0),c.negative&&(a=-a),s="translate"+c.typeUpper+"("+a+"px )",r.css({"-webkit-transform":"-webkit-"+s,transform:s}))}),w.on("panend",function(n){2==m&&(o.$html.removeClass(x.dragging),r.css("transform",""),p[u==c.open_dir?"_openFinish":"close"]()),m=0})}).call(this,e.menu,t.menu,o)}),e.panels.close&&this.bind("initPanel:after",function(n){(function(n,e,t,o){var i=this,a=n.data(p.parent);if(a){a=a.closest("."+x.panel);var s=new Hammer(n[0],i.opts[O].vendors.hammer),r=null;s.on("panright",function(n){r||(i.openPanel(a),r=setTimeout(function(){clearTimeout(r),r=null},i.conf.openingInterval+i.conf.transitionDuration))})}}).call(this,n,e.panels,t.panels,o)})}},add:function(){if("function"!=typeof Hammer||Hammer.VERSION<2)return y[n].addons[O].add=function(){},void(y[n].addons[O].setup=function(){});x=y[n]._c,p=y[n]._d,y[n]._e,x.add("dragging")},clickAnchor:function(n,e){}},y[n].defaults[O]={menu:{open:!1,maxStartPos:100,threshold:50},panels:{close:!1},vendors:{hammer:{}}},y[n].configuration[O]={menu:{width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}},panels:{}}}(jQuery); 8935!function(n){var $,s,a,y,t="mmenu",f="dropdown";n[t].addons[f]={setup:function(){if(this.opts.offCanvas){var o=this,x=this.opts[f],b=this.conf[f];if(y=n[t].glbl,"boolean"==typeof x&&x&&(x={drop:x}),"object"!=typeof x&&(x={}),"string"==typeof x.position&&(x.position={of:x.position}),(x=this.opts[f]=n.extend(!0,{},n[t].defaults[f],x)).drop){var g;this.bind("initMenu:after",function(){if(this.$menu.addClass($.menu+"_"+f),"string"!=typeof x.position.of){var t=this._getOriginalMenuId();t&&t.length&&(x.position.of='[href="#'+t+'"]')}"string"==typeof x.position.of&&(g=n(x.position.of),x.event=x.event.split(" "),1==x.event.length&&(x.event[1]=x.event[0]),"hover"==x.event[0]&&g.on(a.mouseenter+"-"+f,function(){o.open()}),"hover"==x.event[1]&&this.$menu.on(a.mouseleave+"-"+f,function(){o.close()}))}),this.bind("open:start",function(){this.$menu.data(s.style,this.$menu.attr("style")||""),y.$html.addClass($.wrapper+"_dropdown")}),this.bind("close:finish",function(){this.$menu.attr("style",this.$menu.data(s.style)),y.$html.removeClass($.wrapper+"_dropdown")});var e=function(t,o){var e,i,n=o[0],s=o[1],a="x"==t?"scrollLeft":"scrollTop",f="x"==t?"outerWidth":"outerHeight",r="x"==t?"left":"top",p="x"==t?"right":"bottom",l="x"==t?"width":"height",h="x"==t?"maxWidth":"maxHeight",u=null,d=y.$wndw[a](),c=g.offset()[r]-=d,m=c+g[f](),v=y.$wndw[l](),w=b.offset.button[t]+b.offset.viewport[t];if(x.position[t])switch(x.position[t]){case"left":case"bottom":u="after";break;case"right":case"top":u="before"}return null===u&&(u=c+(m-c)/2<v/2?"after":"before"),"after"==u?(i=v-((e="x"==t?c:m)+w),n[r]=e+b.offset.button[t],n[p]="auto",x.tip&&s.push($.menu+"_tip-"+("x"==t?"left":"top"))):(i=(e="x"==t?m:c)-w,n[p]="calc( 100% - "+(e-b.offset.button[t])+"px )",n[r]="auto",x.tip&&s.push($.menu+"_tip-"+("x"==t?"right":"bottom"))),x.fitViewport&&(n[h]=Math.min(b[l].max,i)),[n,s]},i=function(t){if(this.vars.opened){this.$menu.attr("style",this.$menu.data(s.style));var o=[{},[]];o=e.call(this,"y",o),o=e.call(this,"x",o),this.$menu.css(o[0]),x.tip&&this.$menu.removeClass($.tipleft+" "+$.tipright+" "+$.tiptop+" "+$.tipbottom).addClass(o[1].join(" "))}};this.bind("open:start",i),y.$wndw.on(a.resize+"-"+f,function(t){i.call(o)}),this.opts.offCanvas.blockUI||y.$wndw.on(a.scroll+"-"+f,function(t){i.call(o)})}}},add:function(){$=n[t]._c,s=n[t]._d,a=n[t]._e,$.add("dropdown"),a.add("mouseenter mouseleave resize scroll")},clickAnchor:function(t,o){}},n[t].defaults[f]={drop:!1,fitViewport:!0,event:"click",position:{},tip:!0},n[t].configuration[f]={offset:{button:{x:-5,y:5},viewport:{x:20,y:20}},height:{max:880},width:{max:440}}}(jQuery); 8936!function(c){var f,a,s="mmenu",d="fixedElements";c[s].addons[d]={setup:function(){if(this.opts.offCanvas){this.opts[d];var o=this.conf[d];a=c[s].glbl;this.bind("setPage:after",function(s){var t=this.conf.classNames[d].fixed,i=s.find("."+t);this.__refactorClass(i,t,f.slideout),i[o.elemInsertMethod](o.elemInsertSelector);var e=this.conf.classNames[d].sticky,n=s.find("."+e);this.__refactorClass(n,e,f.sticky),(n=s.find("."+f.sticky)).length&&(this.bind("open:start",function(){if("hidden"==a.$html.css("overflow")){var s=a.$wndw.scrollTop()+o.sticky.offset;n.each(function(){c(this).css("top",parseInt(c(this).css("top"),10)+s)})}}),this.bind("close:finish",function(){n.css("top","")}))})}},add:function(){f=c[s]._c,c[s]._d,c[s]._e,f.add("sticky")},clickAnchor:function(s,t){}},c[s].configuration[d]={sticky:{offset:0},elemInsertMethod:"appendTo",elemInsertSelector:"body"},c[s].configuration.classNames[d]={fixed:"Fixed",sticky:"Sticky"}}(jQuery); 8937!function(c){var d,s,a,n="mmenu",t="iconbar";c[n].addons[t]={setup:function(){var e=this,o=this.opts[t];this.conf[t];if(c[n].glbl,o instanceof Array&&(o={add:!0,top:o}),o.add){var r=null;if(c.each(["top","bottom"],function(a,n){var t=o[n];t instanceof Array||(t=[t]);for(var e=c('<div class="'+d.iconbar+"__"+n+'" />'),i=0,s=t.length;i<s;i++)e.append(t[i]);e.children().length&&(r||(r=c('<div class="'+d.iconbar+'" />')),r.append(e))}),r&&(this.bind("initMenu:after",function(){var a=d.menu+"_iconbar";o.size&&(a+=" "+d.menu+"_iconbar-"+o.size),this.$menu.addClass(a).prepend(r)}),"tabs"==o.type)){r.addClass(d.iconbar+"_tabs");var i=r.find("a");i.on(a.click+"-"+t,function(a){var n=c(this);if(n.hasClass(d.iconbar+"__tab_selected"))a.stopImmediatePropagation();else try{var t=c(n.attr("href"));t.hasClass(d.panel)&&(a.preventDefault(),a.stopImmediatePropagation(),e.openPanel(t,!1))}catch(a){}}),this.bind("openPanel:start",function a(n){i.removeClass(d.iconbar+"__tab_selected");var t=i.filter('[href="#'+n.attr("id")+'"]');if(t.length)t.addClass(d.iconbar+"__tab_selected");else{var e=n.data(s.parent);e&&e.length&&a(e.closest("."+d.panel))}})}}},add:function(){d=c[n]._c,s=c[n]._d,a=c[n]._e,d.add(t)},clickAnchor:function(a,n){}},c[n].defaults[t]={add:!1,top:[],bottom:[]},c[n].configuration[t]={}}(jQuery); 8938!function(s){var d,r="mmenu",o="iconPanels";s[r].addons[o]={setup:function(){var n=this,a=this.opts[o],t=(this.conf[o],!1);s[r].glbl,"boolean"==typeof a&&(a={add:a}),"number"!=typeof a&&"string"!=typeof a||(a={add:!0,visible:a}),"object"!=typeof a&&(a={}),"first"==a.visible&&(t=!0,a.visible=1),(a=this.opts[o]=s.extend(!0,{},s[r].defaults[o],a)).visible=Math.min(3,Math.max(1,a.visible)),a.visible++;var l="";if(!t){for(var e=0;e<=a.visible;e++)l+=" "+d.panel+"_iconpanel-"+e;l.length&&(l=l.slice(1))}if(a.add){var i=function(e){if(!e.parent("."+d.listitem+"_vertical").length){var i=n.$pnls.children("."+d.panel);t?i.removeClass(d.panel+"_iconpanel-first").first().addClass(d.panel+"_iconpanel-first"):i.removeClass(l).filter("."+d.panel+"_opened-parent").removeClass(d.hidden).not(function(){return s(this).parent("."+d.listitem+"_vertical").length}).add(e).slice(-a.visible).each(function(e){s(this).addClass(d.panel+"_iconpanel-"+e)})}};this.bind("initMenu:after",function(){var e=[d.menu+"_iconpanel"];a.size&&e.push(d.menu+"_iconpanel-"+a.size),a.hideNavbar&&e.push(d.menu+"_hidenavbar"),a.hideDivider&&e.push(d.menu+"_hidedivider"),this.$menu.addClass(e.join(" "))}),this.bind("openPanel:start",i),this.bind("initPanels:after",function(e){i.call(n,n.$pnls.children("."+d.panel+"_opened"))}),this.bind("initListview:after",function(e){!a.blockPanel||e.parent("."+d.listitem+"_vertical").length||e.children("."+d.panel+"__blocker").length||e.prepend('<a href="#'+e.closest("."+d.panel).attr("id")+'" class="'+d.panel+'__blocker" />')})}},add:function(){d=s[r]._c,s[r]._d,s[r]._e},clickAnchor:function(e,i){}},s[r].defaults[o]={add:!1,blockPanel:!0,hideDivider:!1,hideNavbar:!0,visible:3}}(jQuery); 8939!function(s){var o,d,a,i,r="mmenu",c="keyboardNavigation";s[r].addons[c]={setup:function(){if(!s[r].support.touch){var e=this.opts[c];this.conf[c];if(i=s[r].glbl,"boolean"!=typeof e&&"string"!=typeof e||(e={enable:e}),"object"!=typeof e&&(e={}),(e=this.opts[c]=s.extend(!0,{},s[r].defaults[c],e)).enable){var n=s('<button class="'+o.tabstart+'" tabindex="-1" />'),t=s('<button class="'+o.tabend+'" tabindex="-1" />'),a=s('<button class="'+o.tabend+'" />');this.bind("initMenu:after",function(){e.enhance&&this.$menu.addClass(o.menu+"_keyboardfocus"),this["_initWindow_"+c](e.enhance)}),this.bind("initOpened:before",function(){this.$menu.prepend(n).append(t).children("."+o.mm("navbars-top")+", ."+o.mm("navbars-bottom")).children("."+o.navbar).children("a."+o.title).attr("tabindex",-1)}),this.bind("initBlocker:after",function(){i.$blck.append(a).children("a").addClass(o.tabstart)}),this.bind("open:finish",function(){f.call(this,null,e.enable)}),this.bind("openPanel:finish",function(n){f.call(this,n,e.enable)}),this.bind("initOpened:after:sr-aria",function(){var n=this.$menu.add(i.$blck).children("."+o.tabstart+", ."+o.tabend);this.__sr_aria(n,"hidden",!0),this.__sr_role(n,"presentation")})}}},add:function(){o=s[r]._c,d=s[r]._d,a=s[r]._e,o.add("tabstart tabend"),a.add("focusin keydown")},clickAnchor:function(n,e){}},s[r].defaults[c]={enable:!1,enhance:!1},s[r].configuration[c]={},s[r].prototype["_initWindow_"+c]=function(n){i.$wndw.off(a.keydown+"-offCanvas"),i.$wndw.off(a.focusin+"-"+c).on(a.focusin+"-"+c,function(n){if(i.$html.hasClass(o.wrapper+"_opened")){var e=s(n.target);if(e.is("."+o.tabend)){var t=s();e.parent().is("."+o.menu)&&i.$blck&&(t=i.$blck),e.parent().is("."+o.wrapper+"__blocker")&&(t=i.$body.find("."+o.menu+"_offcanvas").filter("."+o.menu+"_opened")),t.length||(t=e.parent()),t.children("."+o.tabstart).focus()}}}),i.$wndw.off(a.keydown+"-"+c).on(a.keydown+"-"+c,function(n){var e=s(n.target),t=e.closest("."+o.menu);if(t.length){t.data("mmenu");if(e.is("input, textarea"));else switch(n.keyCode){case 13:(e.is(".mm-toggle")||e.is(".mm-check"))&&e.trigger(a.click);break;case 32:case 37:case 38:case 39:case 40:n.preventDefault()}}}),n&&i.$wndw.off(a.keydown+"-"+c).on(a.keydown+"-"+c,function(n){var e=s(n.target),t=e.closest("."+o.menu);if(t.length){var a=t.data("mmenu");if(e.is("input"))switch(n.keyCode){case 27:e.val("")}else switch(n.keyCode){case 8:var i=t.find("."+o.panel+"_opened").data(d.parent);i&&i.length&&a.openPanel(i.closest("."+o.panel));break;case 27:t.hasClass(o.menu+"_offcanvas")&&a.close()}}})};var l="input, select, textarea, button, label, a[href]";function f(n,e){n=n||this.$pnls.children("."+o.panel+"_opened");var t=s(),a=this.$menu.children("."+o.mm("navbars_top")+", ."+o.mm("navbars_bottom")).children("."+o.navbar);a.find(l).filter(":focus").length||("default"==e&&((t=n.children("."+o.listview).find("a[href]").not("."+o.hidden)).length||(t=n.find(l).not("."+o.hidden)),t.length||(t=a.find(l).not("."+o.hidden))),t.length||(t=this.$menu.children("."+o.tabstart)),t.first().focus())}}(jQuery); 8940!function(e){var i,l="mmenu",t="lazySubmenus";e[l].addons[t]={setup:function(){var n=this.opts[t];this.conf[t];e[l].glbl,"boolean"==typeof n&&(n={load:n}),"object"!=typeof n&&(n={}),(n=this.opts[t]=e.extend(!0,{},e[l].defaults[t],n)).load&&(this.bind("initMenu:after",function(){this.$pnls.find("li").children(this.conf.panelNodetype).not("."+i.inset).not("."+i.nolistview).not("."+i.nopanel).addClass(i.panel+"_lazysubmenu "+i.nolistview+" "+i.nopanel)}),this.bind("initPanels:before",function(n){n=n||this.$pnls.children(this.conf.panelNodetype),this.__findAddBack(n,"."+i.panel+"_lazysubmenu").not("."+i.panel+"_lazysubmenu ."+i.panel+"_lazysubmenu").removeClass(i.panel+"_lazysubmenu "+i.nolistview+" "+i.nopanel)}),this.bind("initOpened:before",function(){var n=this.$pnls.find("."+this.conf.classNames.selected).parents("."+i.panel+"_lazysubmenu");n.length&&(n.removeClass(i.panel+"_lazysubmenu "+i.nolistview+" "+i.nopanel),this.initPanels(n.last()))}),this.bind("openPanel:before",function(n){var e=this.__findAddBack(n,"."+i.panel+"_lazysubmenu").not("."+i.panel+"_lazysubmenu ."+i.panel+"_lazysubmenu");e.length&&this.initPanels(e)}))},add:function(){i=e[l]._c,e[l]._d,e[l]._e},clickAnchor:function(n,e){}},e[l].defaults[t]={load:!1},e[l].configuration[t]={}}(jQuery); 8941!function(b){var p,h="mmenu",m="navbars";b[h].addons[m]={setup:function(){var d=this,l=this.opts[m],v=this.conf[m];if(b[h].glbl,void 0!==l){l instanceof Array||(l=[l]);var f={},u={};l.length&&(b.each(l,function(n){var t=l[n];"boolean"==typeof t&&t&&(t={}),"object"!=typeof t&&(t={}),void 0===t.content&&(t.content=["prev","title"]),t.content instanceof Array||(t.content=[t.content]),t=b.extend(!0,{},d.opts.navbar,t);var a=b('<div class="'+p.navbar+'" />'),e=t.height;"number"!=typeof e?e=1:1<(e=Math.min(4,Math.max(1,e)))&&a.addClass(p.navbar+"_size-"+e);var o=t.position;switch(o){case"bottom":break;default:o="top"}f[o]||(f[o]=0),f[o]+=e,u[o]||(u[o]=b('<div class="'+p.navbars+"_"+o+'" />')),u[o].append(a);for(var r=0,s=t.content.length;r<s;r++){var i=b[h].addons[m][t.content[r]]||null;i?i.call(d,a,t,v):((i=t.content[r])instanceof b||(i=b(t.content[r])),a.append(i))}var c=b[h].addons[m][t.type]||null;c&&c.call(d,a,t,v),a.children("."+p.btn).length&&a.addClass(p.navbar+"_has-btns")}),this.bind("initMenu:after",function(){for(var n in f)this.$menu.addClass(p.menu+"_navbar_"+n+"-"+f[n]),this.$menu["bottom"==n?"append":"prepend"](u[n])}))}},add:function(){p=b[h]._c,b[h]._d,b[h]._e,p.add(m)},clickAnchor:function(n,t){}},b[h].configuration[m]={breadcrumbs:{separator:"/",removeFirst:!1}},b[h].configuration.classNames[m]={}}(jQuery); 8942!function(f){var o,i,a,c="mmenu",d="pageScroll";f[c].addons[d]={setup:function(){var n=this,t=this.opts[d],s=this.conf[d];if(a=f[c].glbl,"boolean"==typeof t&&(t={scroll:t}),(t=this.opts[d]=f.extend(!0,{},f[c].defaults[d],t)).scroll&&this.bind("close:finish",function(){h(s.scrollOffset)}),t.update){var e=[],r=[];(n=this).bind("initListview:after",function(t){n.__filterListItemAnchors(t.find("."+o.listview).children("li")).each(function(){var t=f(this).attr("href");p(t)&&e.push(t)}),r=e.reverse()});var l=-1;a.$wndw.on(i.scroll+"-"+d,function(t){for(var e=a.$wndw.scrollTop(),i=0;i<r.length;i++)if(f(r[i]).offset().top<e+s.updateOffset){l!==i&&(l=i,n.setSelected(n.__filterListItemAnchors(n.$pnls.children("."+o.panel+"_opened").find("."+o.listview).children("li")).filter('[href="'+r[i]+'"]').parent()));break}})}},add:function(){o=f[c]._c,f[c]._d,i=f[c]._e},clickAnchor:function(t,e,i){if(s=!1,e&&i&&this.opts.offCanvas&&this.opts[d].scroll&&a.$page&&a.$page.length){var n=t.attr("href");if(p(n)){if(s=f(n),!this.$menu.is("."+o.menu+"_sidebar-expanded")||!a.$html.is("."+o.wrapper+"_sidebar-expanded"))return{close:!0};h(this.conf[d].scrollOffset)}}}},f[c].defaults[d]={scroll:!1,update:!1};var s=!(f[c].configuration[d]={scrollOffset:0,updateOffset:50});function h(t){s&&s.length&&s.is(":visible")&&a.$html.add(a.$body).animate({scrollTop:s.offset().top+t}),s=!1}function p(t){try{return!("#"==t||"#"!=t.slice(0,1)||!a.$page.find(t).length)}catch(t){return!1}}}(jQuery); 8943!function(o){var f,u,h,n="mmenu",_="searchfield";function l(e,n){if(n)for(var s in n)e.attr(s,n[s])}o[n].addons[_]={setup:function(){var a=this,t=this.opts[_],e=this.conf[_];o[n].glbl,"boolean"==typeof t&&(t={add:t}),"object"!=typeof t&&(t={}),"boolean"==typeof t.panel&&(t.panel={add:t.panel}),"object"!=typeof t.panel&&(t.panel={}),t.add&&("panel"==t.addTo&&(t.panel.add=!0),t.panel.add&&(t.showSubPanels=!1,t.panel.splash&&(t.cancel=!0)),t=this.opts[_]=o.extend(!0,{},o[n].defaults[_],t),e=this.conf[_]=o.extend(!0,{},o[n].configuration[_],e),this.bind("close:start",function(){this.$menu.find("."+f.searchfield).children("input").blur()}),this.bind("initPanels:after",function(e){var n,s=o();switch(t.panel.add&&(s=this._initSearchPanel(e)),t.addTo){case"panels":n=e;break;case"panel":n=s;break;default:n=this.$menu.find(t.addTo)}(n.each(function(){var e=a._initSearchfield(o(this));t.search&&e.length&&a._initSearching(e)}),t.noResults)&&(t.panel.add?s:e).each(function(){a._initNoResultsMsg(o(this))})}))},add:function(){f=o[n]._c,u=o[n]._d,h=o[n]._e,f.add("searchfield"),u.add("searchfield"),h.add("input focus blur")},clickAnchor:function(e,n){if(e.hasClass(f.searchfield+"__btn")){if(e.hasClass(f.btn+"_close")){var s=e.closest("."+f.searchfield).find("input");return s.val(""),this.search(s),!0}if(e.hasClass(f.btn+"_next"))return e.closest("."+f.searchfield).submit(),!0}}},o[n].defaults[_]={add:!1,addTo:"panels",noResults:"No results found.",placeholder:"Search",panel:{add:!1,dividers:!0,fx:"none",id:null,splash:null,title:"Search"},search:!0,showTextItems:!1,showSubPanels:!0},o[n].configuration[_]={clear:!1,form:!1,input:!1,submit:!1},o[n].prototype._initSearchPanel=function(e){var n=this.opts[_];this.conf[_];if(this.$pnls.children("."+f.panel+"_search").length)return o();var s=o('<div class="'+f.panel+'_search " />').append("<ul />").appendTo(this.$pnls);switch(n.panel.id&&s.attr("id",n.panel.id),n.panel.title&&s.attr("data-mm-title",n.panel.title),n.panel.fx){case!1:break;case"none":s.addClass(f.panel+"_noanimation");break;default:s.addClass(f.panel+"_fx-"+n.panel.fx)}return n.panel.splash&&s.append('<div class="'+f.panel+'__searchsplash">'+n.panel.splash+"</div>"),this._initPanels(s),s},o[n].prototype._initSearchfield=function(e){var n=this.opts[_],s=this.conf[_];if(e.parent("."+f.listitem+"_vertical").length)return o();if(e.find("."+f.searchfield).length)return e.find("."+f.searchfield);var a=o("<"+(s.form?"form":"div")+' class="'+f.searchfield+'" />'),t=o('<div class="'+f.searchfield+'__input" />'),i=o('<input placeholder="'+this.i18n(n.placeholder)+'" type="text" autocomplete="off" />');return t.append(i).appendTo(a),e.prepend(a),e.hasClass(f.panel)&&e.addClass(f.panel+"_has-searchfield"),l(i,s.input),s.clear&&o('<a class="'+f.btn+" "+f.btn+"_close "+f.searchfield+'__btn" href="#" />').appendTo(t),l(a,s.form),s.form&&s.submit&&!s.clear&&o('<a class="'+f.btn+" "+f.btn+"_next "+f.searchfield+'__btn" href="#" />').appendTo(t),n.cancel&&o('<a href="#" class="'+f.searchfield+'__cancel">'+this.i18n("cancel")+"</a>").appendTo(a),a},o[n].prototype._initSearching=function(e){var n=this,s=this.opts[_],a=(this.conf[_],{});e.closest("."+f.panel+"_search").length?(a.$pnls=this.$pnls.find("."+f.panel),a.$nrsp=e.closest("."+f.panel)):e.closest("."+f.panel).length?(a.$pnls=e.closest("."+f.panel),a.$nrsp=a.$pnls):(a.$pnls=this.$pnls.find("."+f.panel),a.$nrsp=this.$menu),a.$pnls=a.$pnls.not(function(){return o(this).parent("."+f.listitem+"_vertical").length}),s.panel.add&&(a.$pnls=a.$pnls.not("."+f.panel+"_search"));var t=e.find("input"),i=e.find("."+f.searchfield+"__cancel"),l=this.$pnls.children("."+f.panel+"_search"),d=a.$pnls.find("."+f.listitem);a.$itms=d.not("."+f.listitem+"_divider"),a.$dvdr=d.filter("."+f.listitem+"_divider"),s.panel.add&&s.panel.splash&&t.off(h.focus+"-"+_+"-splash").on(h.focus+"-"+_+"-splash",function(e){n.openPanel(l)}),s.cancel&&(t.off(h.focus+"-"+_+"-cancel").on(h.focus+"-"+_+"-cancel",function(e){i.addClass(f.searchfield+"__cancel-active")}),i.off(h.click+"-"+_+"-splash").on(h.click+"-"+_+"-splash",function(e){e.preventDefault(),o(this).removeClass(f.searchfield+"__cancel-active"),l.hasClass(f.panel+"_opened")&&n.openPanel(n.$pnls.children("."+f.panel+"_opened-parent").last())})),s.panel.add&&"panel"==s.addTo&&this.bind("openPanel:finish",function(e){e[0]===l[0]&&t.focus()}),t.data(u.searchfield,a).off(h.input+"-"+_).on(h.input+"-"+_,function(e){(function(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1})(e.keyCode)||n.search(t)}),this.search(t)},o[n].prototype._initNoResultsMsg=function(e){var n=this.opts[_];this.conf[_];if(e.closest("."+f.panel).length||(e=this.$pnls.children("."+f.panel).first()),!e.children("."+f.panel+"__noresultsmsg").length){var s=e.children("."+f.listview).first(),a=o('<div class="'+f.panel+"__noresultsmsg "+f.hidden+'" />').append(this.i18n(n.noResults));s.length?a.insertAfter(s):a.prependTo(e)}},o[n].prototype.search=function(a,s){var t=this,i=this.opts[_];this.conf[_];a=a||this.$menu.find("."+f.searchfield).chidren("input").first(),s=(s=s||a.val()).toLowerCase().trim();var e=a.data(u.searchfield),n=a.closest("."+f.searchfield).find("."+f.btn),l=this.$pnls.children("."+f.panel+"_search"),d=e.$pnls,h=e.$itms,r=e.$dvdr,c=e.$nrsp;if(h.removeClass(f.listitem+"_nosubitems").find("."+f.btn+"_fullwidth-search").removeClass(f.btn+"_fullwidth-search "+f.btn+"_fullwidth"),l.children("."+f.listview).empty(),d.scrollTop(0),s.length){if(h.add(r).addClass(f.hidden),h.each(function(){var e=o(this),n="a";(i.showTextItems||i.showSubPanels&&e.find("."+f.btn+"_next"))&&(n="a, span"),-1<e.children(n).not("."+f.btn+"_next").text().toLowerCase().indexOf(s)&&e.removeClass(f.hidden)}),i.panel.add){var p=o();d.each(function(){var e=t.__filterListItems(o(this).find("."+f.listitem)).clone(!0);e.length&&(i.panel.dividers&&(p=p.add('<li class="'+f.listitem+" "+f.listitem+'_divider">'+o(this).find("."+f.navbar+"__title").text()+"</li>")),p=p.add(e))}),p.find("."+f.mm("toggle")).remove().end().find("."+f.mm("check")).remove().end().find("."+f.btn).remove(),l.children("."+f.listview).append(p),this.openPanel(l)}else i.showSubPanels&&d.each(function(e){var n=o(this);t.__filterListItems(n.find("."+f.listitem)).each(function(){var e=o(this).data(u.child);e&&e.find("."+f.listview).children().removeClass(f.hidden)})}),o(d.get().reverse()).each(function(e){var n=o(this),s=n.data(u.parent);s&&(t.__filterListItems(n.find("."+f.listitem)).length?s.hasClass(f.hidden)&&s.removeClass(f.hidden).children("."+f.btn+"_next").not("."+f.btn+"_fullwidth").addClass(f.btn+"_fullwidth").addClass(f.btn+"_fullwidth-search"):a.closest("."+f.panel).length||((n.hasClass(f.panel+"_opened")||n.hasClass(f.panel+"_opened-parent"))&&setTimeout(function(){t.openPanel(s.closest("."+f.panel))},(e+1)*(1.5*t.conf.openingInterval)),s.addClass(f.listitem+"_nosubitems")))}),this.__filterListItems(d.find("."+f.listitem)).each(function(){o(this).prevAll("."+f.listitem+"_divider").first().removeClass(f.hidden)});n.removeClass(f.hidden),c.find("."+f.panel+"__noresultsmsg")[h.not("."+f.hidden).length?"addClass":"removeClass"](f.hidden),i.panel.add&&(i.panel.splash&&l.find("."+f.panel+"__searchsplash").addClass(f.hidden),h.add(r).removeClass(f.hidden))}else h.add(r).removeClass(f.hidden),n.addClass(f.hidden),c.find("."+f.panel+"__noresultsmsg").addClass(f.hidden),i.panel.add&&(i.panel.splash?l.find("."+f.panel+"__searchsplash").removeClass(f.hidden):a.closest("."+f.panel+"_search").length||this.openPanel(this.$pnls.children("."+f.panel+"_opened-parent").last()));this.trigger("updateListview")}}(jQuery); 8944!function(d){var h,t,e="mmenu",o="sectionIndexer";d[e].addons[o]={setup:function(){var s=this,i=this.opts[o];this.conf[o];d[e].glbl,"boolean"==typeof i&&(i={add:i}),"object"!=typeof i&&(i={}),i=this.opts[o]=d.extend(!0,{},d[e].defaults[o],i);var r=null;this.bind("initPanels:after",function(e){if(i.add){var a;switch(i.addTo){case"panels":a=e;break;default:a=(a=d(i.addTo,this.$menu)).filter("."+h.panel)}a.find("."+h.listitem+"_divider").closest("."+h.panel).addClass(h.panel+"_has-sectionindexer"),r||(r=d('<div class="'+h.sectionindexer+'" />').prependTo(this.$menu).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>')).on(t.mouseover+"-"+o+" "+t.touchstart+"-"+o,"a",function(e){var a=d(e.target).attr("href").slice(1),n=s.$pnls.children("."+h.panel+"_opened"),i=n.find("."+h.listview),r=-1,t=n.scrollTop();n.scrollTop(0),i.children("."+h.listitem+"_divider").not("."+h.hidden).each(function(){r<0&&a==d(this).text().slice(0,1).toLowerCase()&&(r=d(this).position().top)}),n.scrollTop(-1<r?r:t)});var n=function(e){e=e||this.$pnls.children("."+h.panel+"_opened"),this.$menu[(e.hasClass(h.panel+"_has-sectionindexer")?"add":"remove")+"Class"](h.menu+"_has-sectionindexer")};this.bind("openPanel:start",n),this.bind("initPanels:after",n)}})},add:function(){h=d[e]._c,d[e]._d,t=d[e]._e,h.add("sectionindexer"),t.add("mouseover")},clickAnchor:function(e,a){if(e.parent().is("."+h.indexer))return!0}},d[e].defaults[o]={add:!1,addTo:"panels"}}(jQuery); 8945!function(t){var s,a,l="mmenu",r="setSelected";t[l].addons[r]={setup:function(){var n=this,e=this.opts[r];this.conf[r];if(t[l].glbl,"boolean"==typeof e&&(e={hover:e,parent:e}),"object"!=typeof e&&(e={}),"detect"==(e=this.opts[r]=t.extend(!0,{},t[l].defaults[r],e)).current){var i=function(e){e=e.split("?")[0].split("#")[0];var t=n.$menu.find('a[href="'+e+'"], a[href="'+e+'/"]');t.length?n.setSelected(t.parent(),!0):(e=e.split("/").slice(0,-1)).length&&i(e.join("/"))};this.bind("initMenu:after",function(){i(window.location.href)})}else e.current||this.bind("initListview:after",function(e){e.find("."+s.listview).children("."+s.listitem+"_selected").removeClass(s.listitem+"_selected")});e.hover&&this.bind("initMenu:after",function(){this.$menu.addClass(s.menu+"_selected-hover")}),e.parent&&(this.bind("openPanel:finish",function(e){this.$pnls.find("."+s.listview).find("."+s.listitem+"_selected-parent").removeClass(s.listitem+"_selected-parent");for(var t=e.data(a.parent);t;)t.not("."+s.listitem+"_vertical").addClass(s.listitem+"_selected-parent"),t=t.closest("."+s.panel).data(a.parent)}),this.bind("initMenu:after",function(){this.$menu.addClass(s.menu+"_selected-parent")}))},add:function(){s=t[l]._c,a=t[l]._d,t[l]._e},clickAnchor:function(e,t){}},t[l].defaults[r]={current:!0,hover:!1,parent:!1}}(jQuery); 8946!function(a){var n,t,l="mmenu",i="sidebar";a[l].addons[i]={setup:function(){if(this.opts.offCanvas){var e=this.opts[i];this.conf[i];t=a[l].glbl,("string"==typeof e||"boolean"==typeof e&&e||"number"==typeof e)&&(e={expanded:e}),"object"!=typeof e&&(e={}),"boolean"==typeof e.collapsed&&e.collapsed&&(e.collapsed="all"),"string"!=typeof e.collapsed&&"number"!=typeof e.collapsed||(e.collapsed={use:e.collapsed}),"object"!=typeof e.collapsed&&(e.collapsed={}),"number"==typeof e.collapsed.use&&(e.collapsed.use="(min-width: "+e.collapsed.use+"px)"),"boolean"==typeof e.expanded&&e.expanded&&(e.expanded="all"),"string"!=typeof e.expanded&&"number"!=typeof e.expanded||(e.expanded={use:e.expanded}),"object"!=typeof e.expanded&&(e.expanded={}),"number"==typeof e.expanded.use&&(e.expanded.use="(min-width: "+e.expanded.use+"px)"),e=this.opts[i]=a.extend(!0,{},a[l].defaults[i],e);var d=n.wrapper+"_sidebar-collapsed";e.collapsed.size&&(d+=" "+n.wrapper+"_sidebar-collapsed-"+e.collapsed.size);var s=n.wrapper+"_sidebar-expanded";e.expanded.size&&(s+=" "+n.wrapper+"_sidebar-expanded-"+e.expanded.size),e.collapsed.use&&(this.bind("initMenu:after",function(){this.$menu.addClass(n.menu+"_sidebar-collapsed"),e.collapsed.blockMenu&&this.opts.offCanvas&&!this.$menu.children("."+n.menu+"__blocker").length&&this.$menu.prepend('<a class="'+n.menu+'__blocker" href="#'+this.$menu.attr("id")+'" />'),e.collapsed.hideNavbar&&this.$menu.addClass(n.menu+"_hidenavbar"),e.collapsed.hideDivider&&this.$menu.addClass(n.menu+"_hidedivi
8946der")}),"boolean"==typeof e.collapsed.use?this.bind("initMenu:after",function(){t.$html.addClass(d)}):this.matchMedia(e.collapsed.use,function(){t.$html.addClass(d)},function(){t.$html.removeClass(d)})),e.expanded.use&&(this.bind("initMenu:after",function(){this.$menu.addClass(n.menu+"_sidebar-expanded")}),"boolean"==typeof e.expanded.use?this.bind("initMenu:after",function(){t.$html.addClass(s),this.open()}):this.matchMedia(e.expanded.use,function(){t.$html.addClass(s),t.$html.hasClass(n.wrapper+"_sidebar-closed")||this.open()},function(){t.$html.removeClass(s),this.close()}),this.bind("close:start",function(){t.$html.hasClass(s)&&t.$html.addClass(n.wrapper+"_sidebar-closed")}),this.bind("open:start",function(){t.$html.removeClass(n.wrapper+"_sidebar-closed")}))}},add:function(){n=a[l]._c,a[l]._d,a[l]._e},clickAnchor:function(e,d,s){if(this.opts[i].expanded.use&&t.$html.is("."+n.wrapper+"_sidebar-expanded")&&d&&s)return{close:!1}}},a[l].defaults[i]={collapsed:{use:!1,blockMenu:!0,hideDivider:!1,hideNavbar:!0},expanded:{use:!1}},a[l].configuration[i]={}}(jQuery); 8947!function(n){var l,t="mmenu",e="toggles";n[t].addons[e]={setup:function(){var s=this;this.opts[e],this.conf[e];n[t].glbl,this.bind("initPanels:after",function(t){this.__refactorClass(t.find("input"),this.conf.classNames[e].toggle,l.toggle),this.__refactorClass(t.find("input"),this.conf.classNames[e].check,l.check),t.find("input."+l.toggle+", input."+l.check).each(function(){var t=n(this),e=t.closest("li"),c=t.hasClass(l.toggle)?"toggle":"check",i=t.attr("id")||s.__getUniqueId();e.children('label[for="'+i+'"]').length||(t.attr("id",i),e.prepend(t),n('<label for="'+i+'" class="'+l[c]+'"></label>').insertAfter(e.children("."+l.listitem+"__text").last()))})})},add:function(){l=n[t]._c,n[t]._d,n[t]._e,l.add("toggle check")},clickAnchor:function(t,e){}},n[t].configuration.classNames[e]={toggle:"Toggle",check:"Check"}}(jQuery); 8948!function(d){var s="mmenu";d[s].addons.navbars.breadcrumbs=function(a,r,i){var n=this,b=d[s]._c,c=d[s]._d;b.add("separator");var e=d('<span class="'+b.navbar+'__breadcrumbs" />').appendTo(a);this.bind("initNavbar:after",function(a){if(!a.children("."+b.navbar).children("."+b.navbar+"__breadcrumbs").length){a.removeClass(b.panel+"_has-navbar");for(var r=[],n=d('<span class="'+b.navbar+'__breadcrumbs"></span>'),e=a,s=!0;e&&e.length;){if(e.is("."+b.panel)||(e=e.closest("."+b.panel)),!e.parent("."+b.listitem+"_vertical").length){var t=e.children("."+b.navbar).children("."+b.navbar+"__title").text();t.length&&r.unshift(s?"<span>"+t+"</span>":'<a href="#'+e.attr("id")+'">'+t+"</a>"),s=!1}e=e.data(c.parent)}i.breadcrumbs.removeFirst&&r.shift(),n.append(r.join('<span class="'+b.separator+'">'+i.breadcrumbs.separator+"</span>")).appendTo(a.children("."+b.navbar))}}),this.bind("openPanel:start",function(a){var r=a.find("."+b.navbar+"__breadcrumbs");r.length&&e.html(r.html()||"")}),this.bind("initNavbar:after:sr-aria",function(a){a.children("."+b.navbar).children("."+b.breadcrumbs).children("a").each(function(){n.__sr_aria(d(this),"owns",d(this).attr("href").slice(1))})})}}(jQuery); 8949!function(s){var r="mmenu";s[r].addons.navbars.close=function(t,e){var n=s[r]._c;s[r].glbl;n.add("close");var a=s('<a class="'+n.btn+" "+n.btn+"_close "+n.navbar+'__btn" href="#" />').appendTo(t);this.bind("setPage:after",function(t){a.attr("href","#"+t.attr("id"))}),this.bind("setPage:after:sr-text",function(t){a.html(this.__sr_text(this.i18n(this.conf.screenReader.text.closeMenu))),this.__sr_aria(a,"owns",a.attr("href").slice(1))})}}(jQuery); 8950!function(h){var d="mmenu",o="navbars";h[d].addons[o].next=function(a,n){var t,e,s,r=h[d]._c,i=h('<a class="'+r.btn+" "+r.btn+"_next "+r.navbar+'__btn" href="#" />').appendTo(a);this.bind("openPanel:start",function(a){t=a.find("."+this.conf.classNames[o].panelNext),e=t.attr("href"),s=t.html(),e?i.attr("href",e):i.removeAttr("href"),i[e||s?"removeClass":"addClass"](r.hidden),i.html(s)}),this.bind("openPanel:start:sr-aria",function(a){this.__sr_aria(i,"hidden",i.hasClass(r.hidden)),this.__sr_aria(i,"owns",(i.attr("href")||"").slice(1))})},h[d].configuration.classNames[o].panelNext="Next"}(jQuery); 8951!function(h){var l="mmenu",d="navbars";h[l].addons[d].prev=function(a,n){var r,e,t,i=h[l]._c,s=h('<a class="'+i.btn+" "+i.btn+"_prev "+i.navbar+'__btn" href="#" />').appendTo(a);this.bind("initNavbar:after",function(a){a.removeClass(i.panel+"_has-navbar")}),this.bind("openPanel:start",function(a){a.parent("."+i.listitem+"_vertical").length||((r=a.find("."+this.conf.classNames[d].panelPrev)).length||(r=a.children("."+i.navbar).children("."+i.btn+"_prev")),e=r.attr("href"),t=r.html(),e?s.attr("href",e):s.removeAttr("href"),s[e||t?"removeClass":"addClass"](i.hidden),s.html(t))}),this.bind("initNavbar:after:sr-aria",function(a){var n=a.children("."+i.navbar);this.__sr_aria(n,"hidden",!0)}),this.bind("openPanel:start:sr-aria",function(a){this.__sr_aria(s,"hidden",s.hasClass(i.hidden)),this.__sr_aria(s,"owns",(s.attr("href")||"").slice(1))})},h[l].configuration.classNames[d].panelPrev="Prev"}(jQuery); 8952!function(t){var a="mmenu";t[a].addons.navbars.searchfield=function(s,e){t[a]._c;"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=s}}(jQuery); 8953!function(i){var o="mmenu",c="navbars";i[o].addons[c].tabs=function(a,e,t){var s=i[o]._c,r=i[o]._d,n=i[o]._e,l=this,d=a.children("a");a.addClass(s.navbar+"_tabs").parent().addClass(s.navbars+"_has-tabs"),d.on(n.click+"-"+c,function(a){a.preventDefault();var e=i(this);if(e.hasClass(s.navbar+"__tab_selected"))a.stopImmediatePropagation();
vendor: 4,110 bytes, lines 8953-8957
8953else try{l.openPanel(i(e.attr("href")),!1),a.stopImmediatePropagation()}catch(a){}}),this.bind("openPanel:start",function a(e){d.removeClass(s.navbar+"__tab_selected");var t=d.filter('[href="#'+e.attr("id")+'"]');if(t.length)t.addClass(s.navbar+"__tab_selected");else{var n=e.data(r.parent);n&&n.length&&a(n.closest("."+s.panel))}})}}(jQuery); 8954!function(h){var d="mmenu",o="navbars";h[d].addons[o].title=function(t,a){var e,n,i,r,s=h[d]._c,l=h('<a class="'+s.navbar+'__title" />').appendTo(t);this.bind("openPanel:start",function(t){t.parent("."+s.listitem+"_vertical").length||((i=t.find("."+this.conf.classNames[o].panelTitle)).length||(i=t.children("."+s.navbar).children("."+s.navbar+"__title")),e=i.attr("href"),n=i.html()||a.title,e?l.attr("href",e):l.removeAttr("href"),l[e||n?"removeClass":"addClass"](s.hidden),l.html(n))}),this.bind("openPanel:start:sr-aria",function(t){if(this.opts.screenReader.text&&(r||(r=this.$menu.children("."+s.navbars+"_top, ."+s.navbars+"_bottom").children("."+s.navbar).children("."+s.btn+"_prev")),r.length)){var a=!0;"parent"==this.opts.navbar.titleLink&&(a=!r.hasClass(s.hidden)),this.__sr_aria(l,"hidden",a)}})},h[d].configuration.classNames[o].panelTitle="Title"}(jQuery); 8955jQuery.mmenu.wrappers.angular=function(){this.opts.onClick={close:!0,preventDefault:!1,setSelected:!0}}; 8956!function(a){a.mmenu.wrappers.bootstrap3=function(){if(this.$menu.hasClass("navbar-collapse")){this.conf.classNames.selected="active",this.conf.classNames.divider="divider",this.conf.clone=!0,this.opts.hooks=this.opts.hooks||{};for(var n="",a=["nav-tabs","nav-pills","navbar-nav"],e=0;e<a.length;e++)if(this.$menu.find("."+a[e]).length){n=a[e];break}n.length&&(this.opts.hooks["initMenu:before"]=function(){"navbar-nav"==n&&this.$menu.wrapInner("<div />")},this.opts.hooks["initMenu:after"]=function(){t.menu.call(this),t.dropdown.call(this),t[n.split("nav-").join("").split("-nav").join("")].call(this)})}};var t={menu:function(){this.$menu.find(".nav").removeClass("nav").end().find(".sr-only").remove().end().find(".divider:empty").remove();for(var n=["role","aria-haspopup","aria-expanded"],a=0;a<n.length;a++)this.$menu.find("["+n[a]+"]").removeAttr(n[a])},dropdown:function(){var n=this.$menu.find(".dropdown");n.removeClass("dropdown"),n.children(".dropdown-toggle").find(".caret").remove().end().each(function(){a(this).replaceWith("<span>"+a(this).html()+"</span>")}),n.children(".dropdown-menu").removeClass("dropdown-menu")},tabs:function(){this.$menu.find(".nav-tabs").removeClass("nav-tabs")},pills:function(){this.$menu.find(".nav-pills").removeClass("nav-pills")},navbar:function(){var a=this;this.$menu.removeClass("collapse navbar-collapse").find('[class*="navbar-"]').removeClass("navbar-left navbar-right navbar-nav navbar-text navbar-btn");var n=this.$menu.find(".navbar-form");this.conf.searchform={form:{action:n.attr("action"),method:n.attr("method")},input:{name:n.find("input").attr("name")},submit:!0},n.remove(),(this.$orig||this.$menu).closest(".navbar").find(".navbar-header").find(".navbar-toggle").off("click").on("click",function(n){a.open(),n.stopImmediatePropagation(),n.preventDefault()})}}}(jQuery); 8957!function(i){function s(n){for(var a=i("<a />"),e=["href","title","target"],t=0;t<e.length;t++)void 0!==n.attr(e[t])&&a.attr(e[t],n.attr(e[t]));return a.html(n.html()),a.find(".sr-only").remove(),a}function o(n){var e=i("<ul />");return n.children().each(function(){var n=i(this),a=i("<li />");n.hasClass("dropdown-divider")?a.addClass("Divider"):n.hasClass("dropdown-item")&&a.append(s(n)),e.append(a)}),e}i.mmenu.wrappers.bootstrap4=function(){var e=this;if(this.$menu.hasClass("navbar-collapse")){this.conf.clone=!1;var n=i("<nav />"),r=i("<div />");n.append(r),this.$menu.children().each(function(){var n,t,a=i(this);switch(!0){case a.hasClass("navbar-nav"):r.append((n=a,t=i("<ul />"),n.find(".nav-item").each(function(){var n=i(this),a=i("<li />");if(n.hasClass("active")&&a.addClass("Selected"),!n.hasClass("nav-link")){var e=n.children(".dropdown-menu");e.length&&a.append(o(e)),n=n.children(".nav-link")}a.prepend(s(n)),t.append(a)}),t));break;
8957case a.hasClass("dropdown-menu"):r.append(o(a));break;case a.hasClass("form-inline"):e.conf.searchfield.form={action:a.attr("action")||null,method:a.attr("method")||null},e.conf.searchfield.input={name:a.find("input").attr("name")||null},e.conf.searchfield.clear=!1,e.conf.searchfield.submit=!0;break;default:r.append(a.clone(!0))}}),this.bind("initMenu:before",function(){n.prependTo("body"),this.$menu=n}),this.$menu.parent().find(".navbar-toggler").removeAttr("data-target").removeAttr("aria-controls").off("click").on("click",function(n){n.preventDefault(),n.stopImmediatePropagation(),e[e.vars.opened?"close":"open"]()})}}}(jQuery); 8958!function(n){n.mmenu.wrappers.jqueryMobile=function(){var t=this;this.opts.onClick.close=!1,this.conf.offCanvas.page.selector="div.ui-page-active",n("body").on("pagecontainerchange",function(e,n){"function"==typeof t.close&&(t.close(),t.setPage(n.toPage))}),this.bind("initAnchors:after",function(){n("body").on("click",".mm-listview a",function(e){e.isDefaultPrevented()||(e.preventDefault(),n("body").pagecontainer("change",n(this).attr("href")))})})}}(jQuery); 8959jQuery.mmenu.wrappers.magento=function(){this.conf.classNames.selected="active"}; 8960jQuery.mmenu.wrappers.olark=function(){this.conf.offCanvas.page.noSelector.push("#olark")}; 8961!function(o){var r="mmenu";o[r].wrappers.turbolinks=function(){var n,t;o(document).on("turbolinks:before-visit",function(){t=o("html"),n=t.attr("class"),n=o.grep(n.split(/\s+/),function(n){return!/mm-/.test(n)}).join(" ")}).on("turbolinks:load",function(){void 0!==t&&(t.attr("class",n),o[r].glbl=!1)})}}(jQuery); 8962!function(s){s.mmenu.wrappers.wordpress=function(){this.conf.classNames.selected="current-menu-item",s("#wpadminbar").css("position","fixed").addClass("mm-slideout")}}(jQuery); 8963return true; 8964}));; 8965var AjaxJsonPostWrapper = (function () { 8966 8967 var my = {}; 8968 8969 my.async = true; 8970 8971 my.getBaseUrl = function () { 8972 var pathArray = window.location.pathname.split('/'); 8973 return window.location.protocol + "//" + window.location.host; 8974 }; 8975 8976 my.getUrl = function (controller, action) { 8977 return my.getBaseUrl() + '/' + controller + '/' + action; 8978 }; 8979 8980 my.getFormData = function (form) { 8981 // there is an improved version of this function in the admin tool... 8982 var data = $(form).serializeArray(); 8983 var formData = {}; 8984 for (var i = 0; i < data.length; i++) { 8985 formData[data[i].name] = data[i].value; 8986 } 8987 return formData; 8988 }; 8989 8990 my.ajaxUrl = function (url, data, success, error, complete, type) { 8991 var ajaxType = 'POST'; 8992 8993 if (type != undefined) { 8994 ajaxType = type; 8995 } 8996 return $.ajax({ 8997 type: ajaxType, 8998 url: url.toLowerCase(), 8999 async: my.async, 9000 data: JSON.stringify(data), 9001 contentType: 'application/json', 9002 traditional: true, 9003 beforeSend: function () { 9004 }, 9005 success: function (result) { 9006 if (success != undefined) { 9007 success(result); 9008 } 9009 }, 9010 complete: function () { 9011 if (complete != undefined) { 9012 complete(); 9013 } 9014 }, 9015 error: function (XMLHttpRequest, textStatus, errorThrown) { 9016 var errId = XMLHttpRequest.getResponseHeader("System-Error-ID"); 9017 var errIdMsg = ""; 9018 if (errId != null) { 9019 // var newUrl = AjaxJsonPostWrapper.getBaseUrl() + '/error/error?errId=' + errId; 9020 // window.location.replace(newUrl); 9021 errIdMsg = " [" + errId + "]" 9022 } 9023 console.log("An error occurred during ajax operation" + errIdMsg + ".") // mimics what has been "good enough" since redesign, circa 2014. we don't really know what to do but probably don't want to interrupt the user 9024 9025 if (error != undefined) { 9026 error(errorThrown); 9027 } 9028 else 9029 { 9030 Gorilla.util.messages.addMessage('Sorry, there was an error with your request. Please try again shortly.', 'error'); 9031 } 9032 } 9033 }) 9034 .done(function (data) { 9035 if (data.errors) { 9036 onDataError(data); 9037 } 9038 }); 9039 }; 9040 9041 my.ajaxRoute = function (controller, action, data, success, error, complete, type) { 9042 my.async = true; 9043 var url = my.getUrl(controller.toLowerCase(), action.toLowerCase()); 9044 return my.ajaxUrl(url, data, success, error, complete, type); 9045 }; 9046 9047 my.ajaxRouteNonAsync = function (controller, action, data, success, error, complete, type) { 9048 my.async = false; 9049 var url = my.getUrl(controller.toLowerCase(), action.toLowerCase()); 9050 return my.ajaxUrl(url, data, success, error, complete, type); 9051 }; 9052 9053 return my; 9054}());; 9055var $initFooterLinksAccordion = true; 9056var promoCarouselTimeout; 9057var mmenuCloseHookup = true; 9058domReady(function() { 9059 9060 //promo banner "tool tips" 9061 $(document).on("click", ".promo-trigger", function () { 9062 var message = $(this).next("hdncontent"); 9063 $("#site-promo-modal").html(message.text()); 9064 9065 $("#site-promo-modal-trigger").moby({ 9066 //'modalClass': 'cart-limit-modal gradient-gray', 9067 'ariaLabelText': 'Promotion', 9068 'onCompleteCallback': function () { 9069 $(".moby-close").on('click', function (event) { 9070 event.preventDefault(); 9071 $("#site-promo-modal-trigger").moby('hide'); 9072 }); 9073 } 9074 }).moby('show', '#site-promo-modal'); 9075 });
9076 9077 //PDP lightbox "tool tips" 9078 $(document).on("click", ".tooltip-button", function () { 9079 var message = $(this).next(".tooltip-content"); 9080 9081 /* console.log(message[0].innerHTML);*/ 9082 $("#site-modal").html(message[0].innerHTML); 9083 9084 $("#site-modal-trigger").moby({ 9085 'modalClass': 'tooltip-modal', 9086 'ariaLabelText': 'tooltip', 9087 'onCompleteCallback': function () { 9088 $(".moby-close").on('click', function (event) { 9089 event.preventDefault(); 9090 $("#site-modal-trigger").moby('hide'); 9091 }); 9092 } 9093 }).moby('show', '#site-modal'); 9094 }); 9095 9096 // setup a custom override of the jquery-ui's _renderMenu function 9097 $.widget("ui.autocomplete", $.ui.autocomplete, { 9098 options: { 9099 maxItems: 9999 // adds this maxItems property to the object and default to 9999, usually overridden during specific .autocomplete({ inits 9100 }, 9101 _renderMenu: function (ul, items) { // override jQuery-Ui's _renderMenu so we can make use of the maxItems as needed 9102 var that = this; 9103 $.each(items, function (index, item) { // google says this goes in order that they appear in the DOM 9104 if (index < that.options.maxItems) { 9105 that._renderItemData(ul, item); 9106 } 9107 }); 9108 } 9109 }); 9110 9111 //Canada/International Shopping Modal 9112 $(document).on("click", "a.international", function () { 9113 var $intlMoby = $(this).moby({ 9114 'modalClass': 'generic intl-shopping-modal', 9115 'ariaLabelText': 'International options', 9116 'onCompleteCallback': function () { 9117 Gorilla.util.initForms(); 9118 $('#intl-shopping-form').validate(); 9119 $("#intl-shopping").find(".close-link").on("click", function (e) { 9120 e.preventDefault(); 9121 $intlMoby.off('click.moby'); 9122 $intlMoby.moby('remove'); 9123 }); 9124 $(".intl-shopping-modal .moby-close").on("click", function () { 9125 $(this).parent().find('.close-link').click(); 9126 }); 9127 } 9128 }).moby('show', '#intl-shopping'); 9129 }); 9130 9131 var fnSkipToContent = function () { 9132 focusOnFirstEl($("#main[role='main']")); 9133 } 9134 9135 $("#skipToContent > a").on("click", fnSkipToContent); 9136 $("#skipToContent > a").on('keypress', function (e) { 9137 if (e.which === 13) { fnSkipToContent(); } 9138 }); 9139 9140 //allow the space bar to work on mock button elements 9141 $(document).on("keypress", "span[role=button]", function(e) { 9142 e.preventDefault(); 9143 if (e.which === 32) $(this).click(); 9144 }); 9145 9146 //fire the resize handler after we are fully ready... THIS LINE SHOULD BE LAST 9147 layoutResizeHandler(); 9148}); 9149 9150 9151 9152//RESPONSIVE 9153var layoutResizeHandler = function () { 9154 if (matchMedia('(min-width:961px)').matches) { 9155 //Large screens, full menu 9156 $('.shop').find('.fly-out').html("<h4><span>Loading...</span></h4>"); 9157 $('.shop').find('.fly-out').addClass('auto-height'); 9158 9159 if (($nav = $('#nav')).length) { 9160 //init main nav 9161 if (!$nav.attr("data-dropit")) { 9162 $nav.DropIt({ 9163 'triggerSelector': 'li.level-top', 9164 'menuSelector': '.drop-down', 9165 'speed': 0, 9166 'delay': 0, 9167 'showCover': true 9168 }); 9169 } 9170 9171 if (!$nav.find('.shop ul.level0').attr('data-dropit')) { 9172 $nav.find('.shop ul.level0').DropIt({ 9173 'triggerSelector': '> li', 9174 'menuSelector': '.fly-out', 9175 'speed': 0, 9176 'delay': 200, 9177 'onHover': function (elm) { 9178 var $this = $(elm), 9179 busy = false; 9180 9181 if (busy || $this.data('loaded')) { 9182 return; 9183 } 9184 9185 $.ajax({
9186 url: $this.data('menu'), 9187 type: 'post', 9188 dataType: 'html', 9189 beforeSend: function () { 9190 busy = true 9191 } 9192 }) 9193 .done(function (html) { 9194 $this.find('> a').after(html).end().data('loaded', true); 9195 $nav.find('ul.level0').DropIt('showMenu', $this.find('.fly-out')); 9196 }) 9197 .always(function () { 9198 busy = false; 9199 }) 9200 } 9201 }); 9202 } 9203 } 9204 9205 bindDesktopSearch(); 9206 hookUpQuickViews(document); 9207 9208 //footer accordion unset 9209 if (($accordion = $('#footer').find('.accordion')).length) { 9210 $accordion.gorillaAccordion('unset'); 9211 } 9212 $initFooterLinksAccordion = true; 9213 9214 } 9215 9216 if (matchMedia('(min-width: 961px)').matches) { 9217 //site wide promo message banner 9218 if ($('#site-wide-promos').length) { 9219 destroySiteWidePromoSlickSlider(); 9220 } 9221 } else { 9222 //site wide promo message carousel 9223 if ($('#site-wide-promos').length) { 9224 createSiteWidePromoSlickSlider(); 9225 } 9226 } 9227 9228 if (matchMedia('(max-width: 960px)').matches) { 9229 //mobile navigation init 9230 if (($nav = $('#nav')).length) { 9231 if ($nav.DropIt) { 9232 $nav.DropIt('unset'); 9233 $nav.find('ul.level0').DropIt('unset'); 9234 } 9235 } 9236 9237 //footer accordion init 9238 if (($accordion = $('#footer').find('.accordion')).length) { 9239 if ($initFooterLinksAccordion) { 9240 $accordion.gorillaAccordion({ 9241 trigger: 'h2', 9242 container: '.content', 9243 containerInner: '> ul' 9244 }); 9245 $initFooterLinksAccordion = false; 9246 } 9247 } 9248 9249 if (($quickviewSlideout = $("#quickview-mmenu")).length) { 9250 hookUpQuickViews(document); 9251 9252 $quickviewSlideout.mmenu({ 9253 extensions: ["pagedim-black", "position-right", "position-front", "theme-white"], 9254 backButton: { close: false }, 9255 navbar: { title: "" }, //needed to hide the default title menu 9256 navbars: [{ position: "top", content: "<a class='mm-title' href='#' onclick='event.preventDefault();'>Close</a><a class='mm-btn' href='#' onclick='event.preventDefault();' role='button'><span class='mmenu-close'></span><span class='sr-only'>close menu</span></a>" }], 9257 onClick: { close: false, setSelected: false }, 9258 slidingSubmenus: false 9259 }, { 9260 //configuration 9261 offCanvas: { 9262 pageSelector: "#sg-page-wrapper" 9263 } 9264 }); 9265 $("#quickview-mmenu").on("click", ".mm-navbars_top", function (e) { 9266 $("#quickview-mmenu").data("mmenu").close(); 9267 lastFocus.focus(); 9268 }); 9269 } 9270 } 9271 9272 if (matchMedia('(min-width: 681px) and (max-width: 960px)').matches) { 9273 bindTabletSearch(); 9274 } 9275 9276 if (matchMedia('(min-width: 681px)').matches) { 9277 //mobile search to default state for shifting breakpoints 9278 $(".site-search.mobile-search").removeClass("open").addClass("closed").attr("style", ""); 9279 $(".mobile-trigger.search .search-icon").removeClass("open"); 9280 } 9281 9282 if (matchMedia('(max-width: 680px)').matches) { 9283 bindMobileSearch(); 9284 $(document).off("click", "#search-trigger").on("click", 9285 "#search-trigger", 9286 function(e) { 9287 e.preventDefault(); 9288 var $searchDiv = $(".site-search.mobile-search"); 9289 var $searchIcon = $(".mobile-trigger.search .search-icon"); 9290 var $searchInput = $(".site-search.mobile-search .input-text") 9291 if ($searchDiv.hasClass("closed")) { 9292 $searchDiv.slideToggle("fast").removeClass("closed").addClass("open"); 9293 $searchIcon.addClass("open"); 9294 $searchInput.focus(); 9295 } else if ($searchDiv.hasClass("open")) { 9296 $searchDiv.slideToggle("fast").removeClass("open").addClass("closed"); 9297 $searchIcon.removeClass("open"); 9298 $searchInput.blur(); 9299 } 9300 }); 9301 } 9302 9303}
9304window.addEventListener('resize', layoutResizeHandler); 9305 9306 9307 9308 9309function setWishlistQuantityText() { 9310 var cookieValue = "0"; 9311 var cookieData = 9312 decodeURIComponent(document.cookie 9313 .replace(new RegExp("(?:(?:^|.*;)\\s*" + 9314 encodeURIComponent("wlQty").replace(/[\-\.\+\*]/g, "\\$&") + 9315 "\\s*\\=\\s*([^;]*).*$)|^.*$"), 9316 "$1")) || null; 9317 9318 if (cookieData != null) 9319 cookieValue = cookieData; 9320 9321 $('#wishlistQtyText').text(cookieValue); 9322 if (cookieValue != null && cookieValue != "0") { 9323 $('#wishlistQtyText').show(); 9324 $('#wishlistQtyLbl').show(); 9325 } else { 9326 $('#wishlistQtyText').hide(); 9327 $('#wishlistQtyLbl').hide(); 9328 } 9329 9330} 9331 9332//ALL updates to the view cart container need to use this!!! 9333function updateCartContainer(html) { 9334 $('#cartContainer').replaceWith(html); 9335 $('#cartContainer').find($("img.lazy")).lazy(); 9336 Gorilla.util.initForms(); 9337 //need to refresh dynamic data on teh club spiff... 9338 //TODO since that no longer show/hides based on the cart or membership... this should be fixed to be static 9339 AjaxJsonPostWrapper.ajaxRoute('dynamicdata', 'getdata', { page: 'viewcart' }, function (result) { 9340 var $clubDd = $("club-dynamic-data"); 9341 if (result.clubDd && $clubDd.length) { 9342 $("club-dynamic-data").replaceWith(result.clubDd); 9343 } 9344 }); 9345} 9346 9347/****************************** Search SuggestAhead *******************************************/ 9348function getSuggestAheadTerms(request, response) { 9349 var term = $('<div/>').text(request.term).html(); 9350 $.ajax({
9351 type: "POST", 9352 url: window.location.protocol + "//" + window.location.host + "/main/suggestaheadsearchterms", 9353 async: true, 9354 data: JSON.stringify({ term: term }), 9355 contentType: 'application/json', 9356 traditional: true, 9357 success: function (result) { 9358 //dont post old data, the newest response should be used 9359 if ($('#k').val() != result.term) { 9360 //console.log($('#k').val() + " :bad: " + result.term); 9361 return false; 9362 } 9363 //else 9364 //console.log($('#k').val() + " :good: " + result.term); 9365 var fullTerms = result.suggestions.split('|'); 9366 var uniqueKeys = []; 9367 $.each(fullTerms, function (i, el) { 9368 var str = el.trim(); 9369 if ($.inArray(str, uniqueKeys) == -1) uniqueKeys.push(str); 9370 }); 9371 $('#searchProducts').html(result.html); 9372 $itemContainer = $('#product-listing-container'); 9373 $itemContainer.find("img.lazy").lazy({ delay: 0 }); 9374 response(uniqueKeys); 9375 }, 9376 error: function (XMLHttpRequest, textStatus, errorThrown) { 9377 var errId = XMLHttpRequest.getResponseHeader("System-Error-ID"); 9378 var errIdMsg = ""; 9379 if (errId != null) { 9380 errIdMsg = " [" + errId + "]" 9381 } 9382 console.log("An error occurred during ajax operation" + errIdMsg + ".") // mimics what has been "good enough" since redesign, circa 2014. we don't really know what to do but probably don't want to interrupt the user 9383 9384 //if (error != undefined) { 9385 // error(errorThrown); 9386 //} 9387 //else { 9388 // Gorilla.util.messages.addMessage('Sorry, there was an error with your request. Please try again shortly.', 'error'); 9389 //} 9390 } 9391 }) 9392 .done(function (data) { 9393 if (data.errors) { 9394 onDataError(data); 9395 } 9396 9397 // tablet and desktop search, hook up keyboard functionality 9398 if (matchMedia('(min-width: 681px)').matches) { 9399 // add tab indexes to the suggest ahead terms and remove the tab index from the parent list 9400 9401 $("#searchSuggestions li:first").addClass('ac-first'); 9402 $("#searchSuggestions li:last").addClass('ac-last'); 9403 $("#searchSuggestionsQuantity").text($('#searchSuggestions li').length + " autocorrect results"); 9404 $("#searchProductsQuantity").text($('#searchProducts li').length + " product results"); 9405 9406 // triggers off search box 9407 $('#k').off('keydown').on('keydown', function (e) { 9408 if (e.key === 'ArrowDown' || e.keyCode === 40 || ((e.key === 'Tab' || e.keyCode === 9) && !e.shiftKey)) { 9409 //if suggest ahead list is showing and has values 9410 if ($('#searchSuggestions ul li').length > 0) { 9411 e.preventDefault(); 9412 $('#searchSuggestions ul.ui-menu').show(); 9413 $('#searchSuggestions li:first div').focus(); 9414 $('#searchProducts').attr("style", "display:block"); 9415 } 9416 } 9417 else if (e.key === 'ArrowUp' || e.keyCode === 38) { 9418 //if suggest ahead list is showing and has values 9419 if ($('#searchSuggestions ul li').length > 0) { 9420 e.preventDefault(); 9421 $('#searchSuggestions ul.ui-menu').show(); 9422 $('#searchSuggestions li:last div').focus(); 9423 } 9424 } 9425 else if (e.shiftKey && (e.key === 'Tab' || e.keyCode === 9)) { 9426 // leaving search box 9427 $('#searchSuggestions ul.ui-menu').hide(); 9428 $('#searchProducts').hide(); 9429 } 9430 }); 9431 9432 // redefine mouse hover effects 9433 $('#searchSuggestions li').hover(function (event, ui) { 9434 //console.log($(this).text() + " :: " + $(this).index()); 9435 var i = 0; 9436 for (i = 0; i < 11; i++) { 9437 $('#suggestindex-' + i).hide(); 9438 } 9439 $('#suggestindex-' + $(this).index()).show(); 9440 }); 9441 9442 // redefine off hover effects, 9443 // hide if focus leaves all of the three elements (search box, suggest head, suggest products) 9444 $('#kform').focusout(function (e) { 9445 var $elem = $(this); 9446 setTimeout(function () { 9447 var hasFocus = !!($elem.find(':focus').length > 0); 9448 if (!hasFocus) { 9449 $('#searchSuggestions ul.ui-menu').hide(); 9450 $('#searchProducts').hide(); 9451 } 9452 }, 10); 9453 }); 9454 9455 // define focus 9456 $('#searchSuggestions li div').focus(function (event, ui) { 9457 event.preventDefault(); 9458 var i = 0; 9459 for (i = 0; i < 11; i++) { 9460 $('#suggestindex-' + i).hide(); 9461 } 9462 $('#suggestindex-' + $(this).index()).show(); 9463 }); 9464 9465 // define arrow key movement 9466 //left and right moves through products 9467 //up and down (and shift+tab/tab) moves through suggest ahead 9468 $('#searchSuggestions li').on('keydown', function (e) { 9469 if (e.key === 'Enter' || e.keyCode === 13) { 9470 e.preventDefault(); 9471 $("#k").val($(this).text()); 9472 $("#kform").submit(); 9473 } 9474 else if ((e.key === 'Tab' || e.keyCokde === 9) && !e.shiftKey) { 9475 if ($('#searchProducts .category-products ol li').length > 0) { 9476 e.preventDefault(); 9477 $('#searchProducts .category-products ol a:first').focus(); 9478 } 9479 } 9480 }); 9481 9482 // if tabbing past everything then make sure to close auto correct boxes 9483 $('.site-search .icon-wrapper button.button').focus(function () { 9484 $('#searchSuggestions ul.ui-menu').hide(); 9485 $('#searchProducts').hide(); 9486 }); 9487 9488 9489 } else { 9490 // add tab indexes to the suggest ahead terms and remove the tab index from the parent list 9491 9492 9493 $('#searchMobile').off('keydown').on('keydown', function (e) { 9494 if (e.key === 'ArrowDown' || e.keyCode === 40 || ((e.key === 'Tab' || e.keyCode === 9) && !e.shiftKey)) { 9495 //if suggest ahead list is showing and has values 9496 if ($('#searchSuggestionsMobile ul li').length > 0) { 9497 e.preventDefault(); 9498 $('#searchSuggestionsMobile ul.ui-menu').show(); 9499 $('#searchSuggestionsMobile li:first div').focus(); 9500 } 9501 } 9502 else if (e.key === 'ArrowUp' || e.keyCode === 38) { 9503 //if suggest ahead list is showing and has values 9504 if ($('#searchSuggestionsMobile ul li').length > 0) { 9505 e.preventDefault(); 9506 $('#searchSuggestionsMobile ul.ui-menu').show(); 9507 $('#searchSuggestionsMobile li:last div').focus(); 9508 } 9509 } 9510 else if (e.shiftKey && (e.key === 'Tab' || e.keyCode === 9)) { 9511 $('#search-trigger').trigger('click').off('click'); 9512 } 9513 }); 9514 9515 // define arrow key movement 9516 //up and down (and shift+tab/tab) moves through suggest ahead 9517 $('#searchSuggestionsMobile li').on('keydown', function (e) { 9518 if (e.key === 'Enter' || e.keyCode === 13) { 9519 e.preventDefault(); 9520 $("#searchMobile").val($(this).text()); 9521 $("#mobilekform").submit(); 9522 } 9523 else if ((e.key === 'Tab' || e.keyCode === 9) && !e.shiftKey) { 9524 if ($(this).is(':last-child')) { 9525 e.preventDefault(); 9526 $('#search-trigger').trigger('click').off('click'); 9527 $('#menu-trigger').focus(); 9528 } 9529 9530 } 9531 9532 }); 9533 } 9534 }); 9535} 9536 9537// when an item in the suggested terms dropdown gets the focus/hover, call out and get products for that term 9538function getSuggestAheadTermsFocus(liID, label) { 9539 if ($("#" + liID).hasClass('ui-state-active')) { // used to be ui-state-focus in older version of jQuery 9540 getSuggestAheadTermsFocusCall(label); 9541 } 9542} 9543 9544function highlightSearchedTerm($elem) { 9545 var acData = $elem.data('ui-autocomplete'); 9546 acData.menu.element.find('li').each(function () { 9547 var container = $("div", $(this)); // ui-autocomplete now has a div inside the li wrapping the words 9548 var keywords = acData.term.split(' ').join('|'); 9549 container.html(container.html().replace(new RegExp("(" + keywords + ")", "gi"), '<span class="highlight">$1</span>')); 9550 });
9551} 9552 9553 9554function hookUpQuickViews(el) { 9555 if (matchMedia('(min-width: 961px)').matches) { 9556 $(el).find(".btn-quickview > button:not(.bound961)").each(function () { 9557 $(this).removeClass("bound"); 9558 $(this).parent().removeClass("hide-quick-view"); 9559 $(this).off("click"); 9560 $(this).addClass("bound961"); 9561 9562 hookupQuickviewAda($(this)); 9563 9564 //Bloomreach Related Products 9565 $(this).find("[href$='#brqv']").on("click", function () { 9566 swapBRRelProdImage($(this)); 9567 }); 9568 9569 $(this).moby({ 9570 'modalClass': 'quickview', 9571 'ariaLabelText': 'Quick View', 9572 'onCompleteCallback': function (e) { 9573 9574 var $form = $(e).find('form'); 9575 if ($form.length === 0) { // fix latent bug - seems like related products quickview's e is "window" and .find from there doesn't pick up the QV form... 9576 $form = $(".moby-container.quickview.show").find('form'); 9577 } 9578 9579 validateAndInitQuickViewForm($form); 9580 autoselectAttributeIfSingle($(".attribute-select", $form).first()); 9581 }, 9582 'onCloseCallback': function (e) { 9583 callMonetateScripts(); 9584 } 9585 }); 9586 }); 9587 $(el).find(".add-on-quickview:not(.bound961)").each(function () { 9588 $(this).removeClass("bound"); 9589 $(this).off("click"); 9590 $(this).addClass("bound961"); 9591 $(this).moby({ 9592 'modalClass': 'quickview', 9593 'ariaLabelText': 'Quick View', 9594 'onCompleteCallback': function (e) { 9595 9596 var $form = $(e).find('form'); 9597 if ($form.length === 0) { // fix latent bug - seems like related products quickview's e is "window" and .find from there doesn't pick up the QV form... 9598 $form = $(".moby-container.quickview.show").find('form'); 9599 } 9600 9601 validateAndInitQuickViewForm($form); 9602 autoselectAttributeIfSingle($(".attribute-select", $form).first()); 9603 }, 9604 'onCloseCallback': function (e) { 9605 callMonetateScripts(); 9606 } 9607 }); 9608 }); 9609 } 9610 else { 9611 $(el).find(".btn-quickview > button:not(.bound)").each(function () { 9612 $(this).removeClass("bound961"); 9613 $(this).off("click"); 9614 $(this).parent().removeClass("hide-quick-view"); 9615 $(this).addClass("bound"); 9616 9617 hookupQuickviewAda($(this)); 9618 9619 if ($(this).attr("href").indexOf("#brqv") >= 0) { //Bloomreach Related Products 9620 $(this).on("click", function (e) { 9621 e.preventDefault(); 9622 var $divId = $(this).attr("href").substr($(this).attr("href").lastIndexOf('#') + 1); 9623 var $brQVDiv = $("div[id=" + $divId + "]"); 9624 var $brQVImg = $brQVDiv.find('img.brRelProd'); 9625 if ($brQVImg.length) { 9626 $brQVImg.attr('src', $brQVImg.attr('src').replace("/m/", "/e/")); 9627 } 9628 $("#quickview-mmenu .quickview").html($brQVDiv.html()); 9629 $("#quickview-mmenu").data("mmenu").open(); 9630 trapFocus($("#quickview-mmenu")); 9631 validateAndInitQuickViewForm($("#quickview-mmenu").find('form')); 9632 return false; 9633 }); 9634 } 9635 else { 9636 $(this).on("click", function (e) { 9637 e.preventDefault(); 9638 $.ajax({
9639 url: $(this).attr('href'), 9640 type: 'GET', 9641 datatype: "html", 9642 success: function (result) { 9643 $("#quickview-mmenu .quickview").html(result); 9644 $("#quickview-mmenu").data("mmenu").open(); 9645 validateAndInitQuickViewForm($("#quickview-mmenu").find('form')); 9646 } 9647 }); 9648 return false; 9649 }); 9650 } 9651 }); 9652 9653 $(el).find(".add-on-quickview:not(.bound)").each(function () { 9654 $(this).removeClass("bound961"); 9655 $(this).off("click"); 9656 $(this).addClass("bound"); 9657 $(this).on("click", function (e) { 9658 e.preventDefault(); 9659 $.ajax({ 9660 url: $(this).attr('href'), 9661 type: 'GET', 9662 datatype: "html", 9663 success: function (result) { 9664 $("#quickview-mmenu .quickview").html(result); 9665 $("#quickview-mmenu").data("mmenu").open(); 9666 validateAndInitQuickViewForm($("#quickview-mmenu").find('form')); 9667 } 9668 }); 9669 return false; 9670 }); 9671 }); 9672 } 9673} 9674 9675function hookupQuickviewAda(el) { 9676 var $this = $(el); 9677 9678 //ada compliance...if the quickview has focus make it visible 9679 $this.on('focusin', function () { 9680 $(this).parent().addClass("show"); 9681 }).on('focusout', function () { 9682 $(this).parent().removeClass("show"); 9683 }); 9684 9685 //ada compliance... hide all tab focused quick views when mousing over the parent anchor 9686 //this helps prevent a sticky quick view button 9687 $this.closest(".product-image").on("mouseover", function () { 9688 $("body").find(".products-grid .btn-quickview > button:visible").trigger("blur"); 9689 }); 9690 9691} 9692 9693function validateAndInitQuickViewForm(quickViewForm) { 9694 truncateQuickViewAdCopy(quickViewForm); 9695 quickViewForm.validate(); 9696 9697 //register Notify Me Modal trigger in case quick view is of a product on notify 9698 quickViewForm.find('.notifyBtn').find("a").moby({ 9699 'modalClass': 'giveaway-modal', 9700 'ariaLabelText': 'Notify Me', 9701 'onCompleteCallback': function () { 9702 } 9703 }); 9704 Gorilla.util.initForms(); 9705} 9706 9707function createSiteWidePromoSlickSlider() { 9708 var $ss = $("#site-wide-promos"); 9709 $(window).on('load', function () { 9710 if (!$ss.hasClass('slick-initialized') && !$ss.hasClass("checkout-promo")) { 9711 $ss.slick({ 9712 slidesToShow: 1, 9713 slidesToScroll: 1, 9714 dots: true, 9715 appendDots: $('#promoBannerDots'), 9716 arrows: false, 9717 infinite: true, 9718 autoplay: true, 9719 autoplaySpeed: 5000 9720 }); 9721 } 9722 }); 9723} 9724 9725function destroySiteWidePromoSlickSlider() { 9726 var $ss = $("#site-wide-promos"); 9727 if ($ss.hasClass('slick-initialized')) { 9728 $ss.slick('unslick'); 9729 } 9730} 9731 9732function bindMobileSearch() { 9733 var $searchMobile = $("#searchMobile"); 9734 if ($searchMobile.data("ui-autocomplete") != undefined) { 9735 $searchMobile.autocomplete("destroy"); 9736 } 9737 9738 $searchMobile.autocomplete({ 9739 appendTo: "#searchSuggestionsMobile", 9740 source: function (request, response) { 9741 getSuggestAheadTerms(request, response); 9742 }, 9743 minLength: 3, 9744 delay: 200, 9745 maxItems: 5, 9746 9747 select: function (event, ui) { 9748 $searchMobile.val(ui.item.label); 9749 $("#mobilekform").submit(); 9750 }, 9751 9752 open: function (event, ui) { 9753 highlightSearchedTerm($(this)); 9754 } 9755 }); 9756} 9757 9758function bindTabletSearch() { 9759 if ($("#k").data("ui-autocomplete") != undefined) { 9760 $("#k").autocomplete("destroy"); 9761 } 9762 9763 $("#k").autocomplete({ 9764 appendTo: "#searchSuggestions", 9765 source: function (request, response) { 9766 getSuggestAheadTerms(request, response); 9767 }, 9768 minLength: 3, 9769 delay: 200, 9770 maxItems: 10, 9771 9772 select: function (event, ui) { 9773 $("#k").val(ui.item.label); 9774 $("#kform").submit(); 9775 }, 9776 9777 open: function (event, ui) { 9778 highlightSearchedTerm($(this)); 9779 } 9780 });
9781} 9782 9783function bindDesktopSearch() { 9784 if ($("#k").data("ui-autocomplete") != undefined) { 9785 $("#k").autocomplete("destroy"); 9786 } 9787 9788 $("#k").autocomplete({ 9789 appendTo: "#searchSuggestions", 9790 source: function (request, response) { 9791 getSuggestAheadTerms(request, response); 9792 }, 9793 minLength: 3, 9794 delay: 200, 9795 maxItems: 10, 9796 9797 response: function (event, ui) { 9798 $("#searchProducts").css({ display: 'block' }); 9799 }, 9800 9801 select: function (event, ui) { 9802 $("#k").val(ui.item.label); 9803 9804 $("#kform").submit(); 9805 }, 9806 9807 close: function (event, ui) { 9808 event.preventDefault(); 9809 }, 9810 9811 focus: function (event, ui) { 9812 }, 9813 9814 open: function (event, ui) { 9815 highlightSearchedTerm($(this)); 9816 } 9817 }); 9818 9819} 9820 9821function showHideSuggestAhead() { 9822 setTimeout(function () { 9823 if ($("#searchProducts :focus").length === 0) { 9824 $("#searchProducts").css({ display: 'none' }); 9825 } 9826 }, 200); 9827} 9828 9829function updateShowMiniCart(html, showSlide) { 9830 if (html && html !== "") { 9831 setCartQuantityText(); 9832 var $cartSummary = $("#cartSummary"); 9833 setTimeout(function () { 9834 $cartSummary.empty().append(html); 9835 $("#mini-totals").empty().append($cartSummary.find(".mini-totals-container").detach()); 9836 9837 var itemCount = $cartSummary.find(".items-in-cart").detach().text(); 9838 var cartTotal = $("#mini-cart-total-preview").html(); 9839 var fsThreshold = $("#mini-cart-fs-threshold").html(); 9840 var cls = $("#mini-cart-total-preview").attr('class'); 9841 var division = $("#cart-mmenu").data("division"); 9842 $("#cart-mmenu").removeClass("mm-nomap").removeClass("mm-map").removeClass("mm-unset").removeClass("mm-noSavings"); 9843 if (itemCount.length) { 9844 $("#cart-mmenu").addClass(cls); 9845 $("#mini-cart-total").html(cartTotal).show(); 9846 $("#mini-cart-fs-threshold-ds").html(fsThreshold).show(); 9847 $("#mini-count").empty().append(itemCount); 9848 $("#mini-cart-actions").show(); 9849 /*$("#cart-mmenu .mm-navbars_top .mm-navbar").css("height", ""); */ 9850 if (division == 32) { 9851 $("#cart-mmenu .mm-navbars_top .mm-navbar").css("height", ""); 9852 $("#cart-mmenu .mm-navbars_top .mm-navbar").addClass("softball-style"); 9853 } 9854 else if (division == 31) 9855 { 9856 $("#cart-mmenu .mm-navbars_top .mm-navbar").css("height", ""); 9857 } 9858 $("#cart-mmenu.mm-menu_navbar_top-1 .mm-panels").css("top", ""); 9859 } else { 9860 $("#mini-cart-actions").hide(); 9861 $("#cart-mmenu").addClass("mm-unset"); 9862 $("#mini-count").text("0 items in your cart"); 9863 $("#mini-cart-total").hide(); 9864 } 9865 }, 500); 9866 9867 if (showSlide) { 9868 dropMiniCart(); 9869 } 9870 } 9871} 9872 9873function dropMiniCart() { 9874 //close the quickview slideout if its open 9875 if ($("#quickview-mmenu").length && $("#quickview-mmenu").hasClass("mm-menu_opened")) { 9876 $("#quickview-mmenu").data("mmenu").close(); 9877 if (lastFocus) { 9878 lastFocus.focus(); 9879 } 9880 } 9881 9882 $quickorderAdd = $("#quickorder-add"); 9883 if (!$quickorderAdd.length) 9884 setTimeout(function () { 9885 var mmenuHookup = $("#cart-mmenu").data("mmenu").open(); 9886 if (mmenuCloseHookup) { 9887 mmenuCloseHookup = false; 9888 mmenuHookup.bind("close:after", function () { 9889 callMonetateScripts(); 9890 }); 9891 } 9892 trapFocus($("#cart-mmenu")); 9893 $("#cart-mmenu").on("click", ".mm-navbars_top", function (e) { 9894 $("#cart-mmenu").data("mmenu").close(); 9895 }); 9896 }, 500); 9897} 9898 9899function focusOnFirstEl(container) {
9900 var $focusableEl = $(container).find(":focusable").first(); 9901 $focusableEl.focus(); 9902 $([document.documentElement, document.body]).animate({ scrollTop: $focusableEl.offset().top }, 500); 9903} 9904 9905function removeQueryParameter(key, sourceURL) { 9906 var rtn = sourceURL.split("?")[0], 9907 param, 9908 params_arr = [], 9909 queryString = (sourceURL.indexOf("?") !== -1) ? sourceURL.split("?")[1] : ""; 9910 if (queryString !== "") { 9911 params_arr = queryString.split("&"); 9912 for (var i = params_arr.length - 1; i >= 0; i -= 1) { 9913 param = params_arr[i].split("=")[0]; 9914 if (param === key) { 9915 params_arr.splice(i, 1); 9916 } 9917 } 9918 if (params_arr.length) rtn = rtn + "?" + params_arr.join("&"); 9919 } 9920 return rtn; 9921} 9922 9923function monetateClick(recToken) { 9924 if (recToken) { 9925 AjaxJsonPostWrapper.ajaxRoute('monetate', 'monetateclickevent', { recToken: recToken }, function () { }); 9926 } 9927 return false; 9928} 9929 9930function algoliaClick(pid, pos, queryid, name) { 9931 var pids = [pid]; 9932 var poss = [pos]; 9933 AjaxJsonPostWrapper.ajaxRoute('algolia', 'algoliaclickevent', { eventObject: { queryId: queryid, eventName: name, positions: poss, objectIDs: pids } }); 9934 return false; 9935} 9936 9937function buildDDLink(type, typeValue, keepNonInternalQuery) { 9938 AjaxJsonPostWrapper.ajaxRoute('main', 'buildplponchangelink', { basePath: document.location.href, type: type, typeValue: typeValue, keepNonInternalQuery: keepNonInternalQuery }, function (result) { 9939 if(result.newUrl) 9940 document.location.href = result.newUrl; 9941 }); 9942} 9943 9944function callMonetateScripts() { 9945 var fullMonetateScript = ""; 9946 9947 if (window.monetatePageScript && window.monetatePageScript.length) { 9948 fullMonetateScript = window.monetatePageScript; 9949 } 9950 9951 if (window.monetateBreadCrumbScript && window.monetateBreadCrumbScript.length) { 9952 fullMonetateScript = fullMonetateScript + window.monetateBreadCrumbScript; 9953 } 9954 9955 if (window.monetateCartScript && window.monetateCartScript.length) { 9956 fullMonetateScript = fullMonetateScript + window.monetateCartScript; 9957 } 9958 9959 if (window.monetateProductScript && window.monetateProductScript.length) { 9960 fullMonetateScript = fullMonetateScript + window.monetateProductScript; 9961 } 9962 9963 if (window.monetateProductListScript && window.monetateProductListScript.length) { 9964 fullMonetateScript = fullMonetateScript + window.monetateProductListScript; 9965 } 9966 9967 if (fullMonetateScript && fullMonetateScript.length) { 9968 fullMonetateScript = fullMonetateScript + "<script id=\"monetateTrackData\" type=\"text/javascript\"> window.monetateQ.push([\"trackData\"]);<\/script>"; 9969 var monetateDiv = $('#monetateAjax'); 9970 monetateDiv.empty(); 9971 if (monetateDiv && monetateDiv.length) { 9972 monetateDiv.append(fullMonetateScript); 9973 } 9974 } 9975 return false; 9976} 9977 9978function tealiumLinkCall(dataObject) { 9979 if (window?.utag) { //Make sure Tealium is initialized, otherwise will cause JS errors. 9980 //All data in data object should be a string or an array of strings. 9981 //All link calls should include a "tealium_event" key-value pair. 9982 9983 //Checking if "tealium_event" key is defined. 9984 if (!dataObject.tealium_event) { 9985 console.error("No tealium_event defined for the link call. Please define a tealium_event key-value pair."); 9986 return; 9987 } 9988 9989 //Force everything to be strings 9990 var objString = Object.fromEntries( 9991 Object.entries(dataObject).map(([key, value]) => { 9992 if (typeof value === 'object' && value !== null) { 9993 if (Array.isArray(value)) { 9994 var newValue = []; 9995 for (var i = 0; i < value.length; i++) { 9996 newValue[i] = String(value[i]); 9997 } 9998 return [key, newValue]; 9999 } 10000 console.log('Tealium link() calls do not accept any objects outside of arrays and strings, ommitting object from data set.'); 10001 return [key, '']; 10002 } 10003 return [key, String(value)]; 10004 }) 10005 ); 10006 10007 window.utag.link(objString); 10008 return; 10009 } 10010 10011 console.error("Tealium script was not initialized before link function was called. Please check the timing of the link call."); 10012 return; 10013}; 10014var numSlickProductSliders = 0; 10015var workSlickProductSliders = 0; 10016var lastFocus; 10017var windowSize = 0; 10018 10019domReady(function () { 10020 //fire off resize handler for responsive js when window size changes 10021 //from now on to break up js, we will need to add an event listener to the resize event for individual controls 10022 windowSize = $(window).width(); 10023 var resizeHandler = function () { 10024 $(window).on("resize", function () { 10025 if (windowSize !== $(window).width()) { 10026 windowSize = $(window).width(); 10027 } 10028 }); 10029 } 10030 //we were losing the resize event listener using $(window).resize due to an mmenu collision 10031 $(function () { window.addEventListener('resize', resizeHandler, false); }); 10032 10033 //test for csscalc support 10034 Modernizr.addTest('csscalc', function () { 10035 var prop = 'width:'; 10036 var value = 'calc(10px);'; 10037 var el = document.createElement('div'); 10038 10039 el.style.cssText = prop + Modernizr._prefixes.join(value + prop); 10040 10041 return !!el.style.length; 10042 });
10043 if (!Modernizr.csscalc) { 10044 $("html").addClass("no-csscalc"); 10045 } 10046 10047 //fix for keyboard open and position fixed elements with iOS 10048 if (Modernizr.touch) { 10049 var $body = $('body'); 10050 10051 $(document).on('focus', 'input:not(#searchMobile), textarea, select, md-select-menu', function () { 10052 $body.addClass('ios-kb-fix'); 10053 }).on('blur', 'input, textarea, select, md-select-menu', function () { 10054 $body.removeClass('ios-kb-fix'); 10055 }); 10056 } 10057 10058 //init custom form elements 10059 Gorilla.util.initForms(); 10060 10061 if (($modalTrigger = $('.trigger-modal')).length) { 10062 $modalTrigger.moby({ 10063 'modalClass': 'generic' 10064 }); 10065 } 10066 10067 initToolTips(); 10068 10069 if (($lazyImg = $('.lazy')).length) { 10070 $lazyImg.lazy(); 10071 } 10072 10073 //Init default sliders, use data api to set items count and margins 10074 if (($slider = $('.default-slider .products-grid')).length) { 10075 if (!$slider.hasClass('slick-initialized')) { 10076 $slider.slick({ 10077 dots: false, 10078 arrows: true, 10079 slidesToShow: 4, 10080 slidesToScroll: 4, 10081 infinite: false, 10082 lazyLoad: 'ondemand', 10083 prevArrow: '<span class="sg-slick-prev" role="button" aria-label="Previous" tabindex="0"> ‹ </span>', 10084 nextArrow: '<span class="sg-slick-next" role="button" aria-label="Next" tabindex="0"> › </span>', 10085 responsive: [ 10086 { 10087 breakpoint: 1060, 10088 settings: { 10089 slidesToShow: 3, 10090 slidesToScroll: 3, 10091 arrows: true, 10092 dots: true 10093 } 10094 }, 10095 { 10096 breakpoint: 768, 10097 settings: { 10098 slidesToShow: 2, 10099 slidesToScroll: 2, 10100 arrows: true, 10101 dots: true 10102 } 10103 }, 10104 { 10105 breakpoint: 480, 10106 settings: { 10107 slidesToShow: 1, 10108 slidesToScroll: 1, 10109 arrows: true, 10110 dots: true 10111 } 10112 } 10113 ] 10114 }); 10115 numSlickProductSliders += $('.default-slider .products-grid').length; 10116 $slider.on("breakpoint", function (event, slick, breakpoint) { 10117 event.preventDefault(); 10118 processSlickProductSliders(); 10119 }); 10120 } 10121 } 10122 10123 //brands carousel slider 10124 if (($brandslider = $('.slick-brands-carousel')).length) { 10125 if (!$brandslider.hasClass('slick-initialized')) { 10126 $brandslider.slick({ 10127 dots: false, 10128 infinite: true, 10129 respondTo: 'slider', 10130 slidesToShow: 8, 10131 slidesToScroll: 8, 10132 prevArrow: '<span class="sg-slick-prev" role="button" aria-label="Previous" tabindex="0"> ‹ </span>',/*Needs styles*/ 10133 nextArrow: '<span class="sg-slick-next" role="button" aria-label="Next" tabindex="0"> › </span>', 10134 responsive: [ 10135 { 10136 breakpoint: 1400, 10137 settings: { 10138 slidesToShow: 7, 10139 slidesToScroll: 7 10140 } 10141 }, 10142 { 10143 breakpoint: 1200, 10144 settings: { 10145 slidesToShow: 6, 10146 slidesToScroll: 6 10147 } 10148 }, 10149 { 10150 breakpoint: 1060, 10151 settings: { 10152 slidesToShow: 5, 10153 slidesToScroll: 5 10154 } 10155 }, 10156 { 10157 breakpoint: 960, 10158 settings: { 10159 slidesToShow: 4, 10160 slidesToScroll: 4 10161 } 10162 }, 10163 { 10164 breakpoint: 680, 10165 settings: { 10166 slidesToShow: 3, 10167 slidesToScroll: 3 10168 } 10169 }, 10170 { 10171 breakpoint: 480, 10172 settings: { 10173 slidesToShow: 2, 10174 slidesToScroll: 2 10175 } 10176 }, 10177 { 10178 breakpoint: 320, 10179 settings: { 10180 slidesToShow: 1, 10181 slidesToScroll: 1, 10182 variableWidth: true, 10183 centerMode: true,
10184 arrows: false 10185 } 10186 } 10187 ] 10188 }); 10189 $brandslider.find('img').show(); 10190 } 10191 } 10192 10193 if (($navslider = $('.navigation-carousel .bcwp-widgets-wrapper')).length) { 10194 if (!$navslider.hasClass('slick-initialized')) { 10195 $navslider.slick({ 10196 dots: false, 10197 infinite: true, 10198 respondTo: 'slider', 10199 slidesToShow: 6, 10200 slidesToScroll: 6, 10201 prevArrow: '<span class="sg-slick-prev-gray" role="button" aria-label="Previous" tabindex="0"></span>', 10202 nextArrow: '<span class="sg-slick-next-gray" role="button" aria-label="Next" tabindex="0"></span>', 10203 responsive: [ 10204 { 10205 breakpoint: 1400, 10206 settings: { 10207 slidesToShow: 6, 10208 slidesToScroll: 6 10209 } 10210 }, 10211 { 10212 breakpoint: 1060, 10213 settings: { 10214 slidesToShow: 5, 10215 slidesToScroll: 5 10216 } 10217 }, 10218 { 10219 breakpoint: 960, 10220 settings: { 10221 slidesToShow: 4, 10222 slidesToScroll: 4 10223 } 10224 }, 10225 { 10226 breakpoint: 680, 10227 settings: { 10228 slidesToShow: 3, 10229 slidesToScroll: 3 10230 } 10231 } 10232 ] 10233 }); 10234 } 10235 } 10236 10237 //lifestyle plus 5 slider 10238 if (($lsp5slider = $('.lifestylePlusFive-container .bcwp-widgets-wrapper')).length) { 10239 if (!$lsp5slider.hasClass('slick-initialized')) {
10240 $lsp5slider.slick({ 10241 dots: false, 10242 infinite: true, 10243 respondTo: 'slider', 10244 slidesToShow: 1, 10245 slidesToScroll: 1, 10246 prevArrow: '<span class="sg-slick-prev-gray" role="button" aria-label="Previous" tabindex="0"></span>', 10247 nextArrow: '<span class="sg-slick-next-gray" role="button" aria-label="Next" tabindex="0"></span>', 10248 autoplay: false, 10249 autoplaySpeed: 5000 10250 }); 10251 } 10252 } 10253 10254 //new product tiles.. since we cant put an anchor inside an anchor we have to show the quickview using javascript :( 10255 if ($(".product-tile").length) { 10256 $(document).on("mouseenter mouseleave", ".product-tile .product-image, .product-tile .btn-quickview", function (e) { 10257 if (e.type === "mouseenter") { 10258 $(this).closest(".product-tile").find(".btn-quickview").addClass("show"); 10259 } else { 10260 $(this).closest(".product-tile").find(".btn-quickview").removeClass("show"); 10261 } 10262 }); 10263 } 10264 10265 /** 10266 * keep body from scrolling when nav menu is open in iOS 10267 */ 10268 $(document).on('touchmove', function (e) { 10269 if ($('body').hasClass('nav-showing')) { 10270 var $target = $(e.target); 10271 if ($target.is('#nav-wrapper') || $target.parents('#nav-wrapper')) { 10272 e.stopPropagation(); 10273 } 10274 } 10275 }); 10276 10277 // a simple pair of classes was addded to truncate top and bottom abstracts with "..." on mobile 10278 // this allows user to expand and read the whole section if desired. 10279 $(document).on("click", ".single-line-ellipsis-trigger", function () { 10280 $(this).toggleClass("single-line-ellipsis"); 10281 }); 10282 10283 //handle nested links in a button for A360 10284 $(document).on("click", "button.tool-tip", function (e) { 10285 if (e.target.tagName.toLowerCase() === 'a') // let nested links work 10286 return true; 10287 10288 e.preventDefault(); 10289 e.stopPropagation(); 10290 }); 10291 10292 //animate labels to shrink and anchor to left corner to solve the placeholder texts always being visible ADA issue 10293 if (($anchorLabel = $(".input-wrapper .anchor-label")).length) { 10294 $anchorLabel.each(function () { 10295 var $input = $("#" + $(this).attr("for")); 10296 if ($input.length) { 10297 $input.on('focusin', function () { 10298 $(this).closest(".input-wrapper").addClass("anchored"); 10299 }).on('focusout', function () { 10300 if (!$(this).val()) { 10301 $(this).closest(".input-wrapper").removeClass("anchored"); 10302 } 10303 }); 10304 } 10305 }); 10306 } 10307 10308 //fire the resize handler after we are fully ready... THIS LINE SHOULD BE LAST 10309 toolsResizeHandler(); 10310}); //end dom ready 10311 10312 10313 10314//RESPONSIVE 10315var toolsResizeHandler = function () { 10316 //fix for back button issue with mobile menu in IE... IE doesnt support the library's use of window.history.back() 10317 //this is unbound then bound as the menu can be created/destroyed based on breakpoint shifts 10318 var closeEvent = function () { 10319 if (($currentMenu = $('.mm-menu.mm-current.mm-menu_opened')).length) { 10320 $currentMenu.data("mmenu").close(); 10321 lastFocus.focus(); 10322 } 10323 } 10324 $(document).off("click", "a.mm-btn, a.mm-title", closeEvent).on("click", "a.mm-btn, a.mm-title", closeEvent); 10325 10326 if (matchMedia('(min-width: 961px)').matches) { 10327 //reset the nav cover, may have been manipulated if they went down to mobile and then back up to desktop 10328 $(".nav-cover-x").toggleClass("nav-cover nav-cover-x"); 10329 10330 if ($("#mm-nav").length) { //destroy mobile controls if orientation changed 10331 $("#mm-nav").gorillaAccordion('unset'); 10332 $("#mm-nav").find('.drop-down').gorillaAccordion('unset'); 10333 destroyMmenu(); 10334 } 10335 10336 $('body').removeClass('mobileVideo'); 10337 } 10338 10339 if (matchMedia('(max-width: 960px)').matches) { 10340 //remove the nav cover if they ever hit this breakpoint, it can cause an issue with a tablet in landscape mode 10341 $(".nav-cover").hide().toggleClass("nav-cover nav-cover-x"); 10342 $('body').addClass('mobileVideo'); 10343 } 10344 10345 if (matchMedia('(min-width: 480px) and (max-width: 730px)').matches) { 10346 $('body').removeClass('mobile'); 10347 } 10348 10349 if (matchMedia('(min-width: 480px) and (max-width: 560px)').matches) { 10350 $('body').removeClass('mobile'); 10351 } 10352 10353 if (matchMedia('(min-width: 300px) and (max-width: 479px)').matches) { 10354 $('body').addClass('mobile'); 10355 } 10356} 10357window.addEventListener('resize', toolsResizeHandler); 10358 10359 10360 10361function initToolTips() { //lazy-load tool tips on demand.. but not the fake ones (ffl lookup) 10362 $(document).on("click mouseover", "button.tool-tip:not(.not-really)", function (e) { 10363 e.preventDefault(); 10364 var $tip = $(this); 10365 if (!$tip.data('isSet')) { 10366 $tip.tipsy({ 10367 bounds: $('body'), 10368 //show method not publicly exposed... re-fire the event to show the tip after its wired up 10369 afterInitCallback: function () { 10370 if ($(window).width() > 960) { $tip.trigger('click'); } 10371 } 10372 }); 10373 } 10374 });
10375} 10376 10377//this function will de-parameterize a multi-value cookie to easily be able to retrieve a specific value 10378function deparamCookie(params) { 10379 var o = {}; 10380 if (!params) return o; 10381 var a = params.split('&'); 10382 for (var i = 0; i < a.length; i++) { 10383 var pair = a[i].split('='); 10384 o[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]); 10385 } 10386 return o; 10387} 10388 10389function trapFocus(element) { 10390 var focusableEls = 10391 element.find( 10392 'a[href], button:not(.magic-thumbs-button-disabled,[tabindex="-1"],.i18n), textarea, input[type="button"], input[type="text"], input[type="radio"], input[type="checkbox"], select, [tabindex]:not([tabindex="-1"])'), 10393 firstFocusableEl = focusableEls.first()[0], 10394 lastFocusableEl = focusableEls.last()[0], 10395 TABKEYCODE = 9, 10396 ARROWLEFTCODE = 37, 10397 ARROWUPCODE = 38, 10398 ARROWRIGHTCODE = 39, 10399 ARROWDOWNCODE = 40; 10400 10401 if (firstFocusableEl != null) { firstFocusableEl.focus(); } 10402 10403 $(element).off('keydown').on('keydown', function (e) { 10404 // tab (no shift) or the right/down keys 10405 var next = e.key === 'ArrowRight' || e.keyCode === ARROWRIGHTCODE || e.key === 'ArrowDown' || e.keyCode === ARROWDOWNCODE || ((e.key === 'Tab' || e.keyCode === TABKEYCODE) && !e.shiftKey); 10406 // tab (with shift) or the left/up keys 10407 var prev = e.key === 'ArrowLeft' || e.keyCode === ARROWLEFTCODE || e.keyCode === 'ArrowUp' || e.keyCode === ARROWUPCODE || ((e.key === 'Tab' || e.keyCode === TABKEYCODE) && e.shiftKey); 10408 10409 if (!next && !prev) { 10410 return; 10411 } 10412 10413 if (next && document.activeElement === lastFocusableEl) {
10414 firstFocusableEl.focus(); 10415 e.preventDefault(); 10416 } 10417 if (prev && document.activeElement === firstFocusableEl) { 10418 lastFocusableEl.focus(); 10419 e.preventDefault(); 10420 } 10421 }); 10422} 10423 10424function initSGAccordian(openByDefault) { 10425 // wire up events 10426 $(document).on("click", ".sg-accordion-header", function () { 10427 $this = $(this); 10428 $this.toggleClass("active"); 10429 $this.next().slideToggle(250); // the very next element had better be the content... 10430 10431 if (($button = $(".sg-accordion-header-button", $this)).length > 0) { 10432 $button.attr("aria-expanded", $this.hasClass("active")); // A360/ADA -- set aria-expanded as appropriate 10433 } 10434 }); 10435 10436 $(document).on("click", "#accordion-controls-container #expand-all", function () { 10437 $(".sg-accordion-header").each(function (i, v) { // TODO: this selector is probably not specific enough, maybe pass the parent container in? :/ 10438 $this = $(this); 10439 $this.addClass("active"); 10440 10441 if (($button = $(".sg-accordion-header-button", $this)).length > 0) { 10442 $button.attr("aria-expanded", true); 10443 } 10444 }); 10445 10446 $(".sg-accordion-content").slideDown(); 10447 }); 10448 10449 $(document).on("click", "#accordion-controls-container #collapse-all", function () { 10450 $(".sg-accordion-header").each(function (i, v) { // TODO: this selector is probably not specific enough, maybe pass the parent container in? :/ 10451 $this = $(this); 10452 $this.removeClass("active"); 10453 10454 if (($button = $(".sg-accordion-header-button", $this)).length > 0) { 10455 $button.attr("aria-expanded", false); 10456 } 10457 }); 10458 $(".sg-accordion-content").slideUp(); 10459 }); 10460 10461 if (openByDefault) { 10462 // have all panels open by default 10463 $(".sg-accordion-header").addClass("active"); // TODO: this selector is probably not specific enough, maybe pass the parent container in? :/ 10464 $(".sg-accordion-content").show(); // need it fast! // TODO: this selector is probably not specific enough, maybe pass the parent container in? :/ 10465 } 10466 10467 // deal with some FAQ's specific A360/ADA things... Seems like this could be applied to all instances of our .sg-accordion-header, but limiting to the FAQs for now 10468 $("#faqsV3 .sg-accordion-header").each(function (i, v) { 10469 var $this = $(this); 10470 var $next = $this.next(); // the very next element had better be the content... 10471 10472 // generate and assign an id to the associated content block, if needed 10473 var nextId = $next.attr("id"); 10474 if (nextId == undefined) { 10475 nextId = "sgac-" + i; 10476 $next.attr("id", nextId); 10477 } 10478 10479 // add the aria- stuff to $this 10480 if (($button = $(".sg-accordion-header-button", $this)).length > 0) { 10481 $button.attr("aria-expanded", $this.hasClass("active")); 10482 $button.attr("aria-controls", nextId); 10483 } 10484 }); 10485} 10486 10487function processSlickProductSliders() { 10488 workSlickProductSliders++; 10489 if (workSlickProductSliders == numSlickProductSliders) { 10490 $(document).find(".btn-quickview > button").each(function () { 10491 $(this).removeClass("bound"); 10492 $(this).removeClass("bound961"); 10493 }); 10494 initResponsive(); 10495 workSlickProductSliders = 0; 10496 } 10497} 10498 10499function enableTabIndicators(e) { 10500 if (e.keyCode === 9) { // keyboard tabber detected! 10501 document.body.classList.add('user-tab-detected'); 10502 window.removeEventListener('keydown', enableTabIndicators); 10503 } 10504} 10505window.addEventListener('keydown', enableTabIndicators); 10506 10507function setLeftNavActiveLinkProps() { 10508 $("#left-navigation li.active a").each(function (i, v) { // had better be one and only one. if not, last one wins 10509 var $activeAnchor = $(this); 10510 $activeAnchor.attr("aria-current", "page"); 10511 $activeAnchor.closest("aside#left-navigation").attr("aria-label", $activeAnchor.text() + " navigation"); // I asked / double-checked that this should be "page name" vs. "layout name" and A360 was pretty adamant 10512 });
10513} 10514 10515function destroyMmenu() { 10516 $("div#mm-nav").remove(); 10517 $("aside#mm-filters-menu").remove(); 10518 $("div#mm-left-navigation").remove(); 10519 10520 $("#filter-toggle").off("click"); 10521 $("#col-left-menu-toggle").off("click"); 10522} 10523 10524function initializeSlider(id) { // used to be in DynamicDataScript.cshmlt but we want to use it in angularized ViewCart as well 10525 //Init default sliders, use data api to set items count and margins 10526 if (($slider = $(id + ' .products-grid')).length) { 10527 if (!$slider.hasClass('slick-initialized')) { 10528 $slider.slick({ 10529 accessibility: true, 10530 dots: false, 10531 arrows: true, 10532 slidesToShow: 5, 10533 slidesToScroll: 5, 10534 infinite: false, 10535 lazyLoad: 'ondemand', 10536 prevArrow: '<span class="sg-slick-prev" role="button" aria-label="Previous" tabindex="0"> <img class="sg-carousel" src="/images/product/icon-image-left.svg"> </span>', 10537 nextArrow: '<span class="sg-slick-next" role="button" aria-label="Next" tabindex="0"> <img class="sg-carousel" src="/images/product/icon-image-right.svg"> </span>', 10538 responsive: [ 10539 { 10540 breakpoint: 1250, 10541 settings: { 10542 slidesToShow: 4, 10543 slidesToScroll: 4, 10544 arrows: true, 10545 dots: true 10546 } 10547 }, 10548 { 10549 breakpoint: 1060, 10550 settings: { 10551 slidesToShow: 3, 10552 slidesToScroll: 3, 10553 arrows: true, 10554 dots: true 10555 } 10556 }, 10557 { 10558 breakpoint: 768, 10559 settings: { 10560 slidesToShow: 2, 10561 slidesToScroll: 2, 10562 arrows: true, 10563 dots: true 10564 } 10565 }, 10566 { 10567 breakpoint: 480, 10568 settings: { 10569 slidesToShow: 1, 10570 slidesToScroll: 1, 10571 arrows: true, 10572 dots: true 10573 } 10574 } 10575 ] 10576 }); 10577 numSlickProductSliders++; 10578 $slider.on("breakpoint", function (event, slick, breakpoint) { 10579 event.preventDefault(); 10580 processSlickProductSliders(); 10581 }); 10582 } 10583 } 10584} 10585 10586 10587// if they click / tap on a slider in mobile this should be used to take 10588// care of any underlying link / anchor 10589// used during click: function, sister function to swipe: function 10590function sliderTap(event, target) { 10591 switch ($(target).get(0).tagName.toLowerCase()) { 10592 case "a": 10593 document.location.href = target; 10594 break; 10595 case "img": 10596 // this only goes up one level, obviously... 10597 var p = $(target).parent(); 10598 if (p.get(0).tagName.toLowerCase() == "a") { 10599 document.location.href = p.attr("href"); 10600 } 10601 break; 10602 } 10603} 10604 10605function initQtyButtons(containerName) { //qty adjust buttons 10606 if (($container = $(containerName)).length) { 10607 setTimeout(function() { 10608 $(".qty-adjust", $container).click(function (e) { 10609 e.preventDefault(); 10610 10611 var $this = $(this); 10612 var $form = $this.closest("form"); 10613 var $qty = $("#quantity", $form); 10614 var qty = $qty.val(); 10615 10616 // manage new version (button w/ enhanced ADA) vs old version (div no ADA) 10617 if ($this.prop("tagName").toLowerCase() === "button") { // new approach
10618 if ($this.data("direction") == "plus" && qty < 99) { 10619 qty++; 10620 $(".qty-minus").prop("disabled", false); 10621 } else if ($this.data("direction") == "minus" && qty > 1) { 10622 qty--; 10623 if (qty == 1) { 10624 $(".qty-minus").prop("disabled", true); 10625 } 10626 } 10627 } else { // old approach, should go away after PDP A/B test is complete and everything is rolled over to new version 10628 if ($this.text() == "+" && qty < 99) { 10629 qty++; 10630 } else if ($this.text() == "-" && qty > 1) { 10631 qty--; 10632 } 10633 } 10634 10635 // safety / default 10636 if (!$.isNumeric(qty) || qty < 1) { 10637 qty = 1; 10638 } 10639 10640 $qty.val(qty); 10641 $form.validate().element($qty); 10642 }); 10643 }, 1000); 10644 } 10645} 10646 10647function initFitRating(containerName, currentValue) { 10648 if (($container = $(containerName)).length) { 10649 if (($fitRating = $("#BVFitRating", $container)).length) { 10650 $fitRating.slider({ 10651 range: "max", 10652 min: 1, 10653 max: 5, 10654 step: 0.01, 10655 value: currentValue, 10656 disabled: true, 10657 create: function (event, ui) { 10658 setSliderTicks(event.target); 10659 } 10660 }); 10661 } 10662 } 10663} 10664 10665function initWidthRating(containerName, currentValue) { 10666 if (($container = $(containerName)).length) { 10667 if (($widthRating = $("#BVWidthRating", $container)).length) { 10668 $widthRating.slider({ 10669 range: "max", 10670 min: 1, 10671 max: 3, 10672 step: 0.1, 10673 value: currentValue, 10674 disabled: true, 10675 create: function (event, ui) { 10676 setSliderTicks(event.target); 10677 } 10678 }); 10679 } 10680 } 10681} 10682 10683 10684//auto selects the only option in the size/color dropdowns 10685//function initAutoSelect(form) { 10686// var $form = $(form); 10687// processSelectedProductOption($form.find('.auto-select')); 10688//} 10689 10690/****************************** Truncate ad copy*******************************************/ 10691 10692function truncateQuickViewAdCopy(quickViewForm) { 10693 var overflowMaxHeight = 400; 10694 var productDesc = quickViewForm.find('.product-description'), 10695 productMore = quickViewForm.find('#quickViewMoreDetails'); 10696 truncateElementTextToHeight(productDesc, overflowMaxHeight); 10697 productMore.detach().appendTo(productDesc.children().last()); 10698} 10699 10700function truncateElementTextToHeight(elem, overflowMaxHeight) { 10701 if (elem.height() > overflowMaxHeight) { 10702 do { 10703 var lastChild = elem.children().last(); 10704 if ((lastChild.is('ul')) && (lastChild.children().length > 0)) { 10705 lastChild.children().last().remove(); 10706 if (lastChild.children().length == 0) { 10707 lastChild.remove(); 10708 } 10709 } 10710 else { 10711 var text = elem.html(); 10712 text = text.slice(0, text.lastIndexOf(" ")); 10713 elem.html(text); 10714 } 10715 } while (elem.height() > overflowMaxHeight); 10716 } 10717} 10718 10719/****************************** Bloomreach Related Product Quick View Image Swap *******************************************/ 10720 10721function swapBRRelProdImage(anchor) { 10722 var $id = anchor.href.substr(anchor.href.lastIndexOf('#') + 1); 10723 var $div = $("div[id=" + $id + "]"); 10724 var $img = $div.find('img.brRelProd'); 10725 if ($img.length) { 10726 $img.attr("src", $img.attr("data-br-src").replace("/m/", "/e/")); 10727 } 10728 $div.find("#alternate-images img").each(function () { 10729 $(this).attr("src", $(this).attr("data-br-src").replace("/m/", "/e/")); 10730 }); 10731} 10732 10733 10734function autoselectAttributeIfSingle($ddl) { 10735 10736 if ($ddl.length === 0 || $ddl.hasClass("auto-select")) 10737 return; 10738 10739 var $opts = $("option", $ddl); 10740 if ($opts.length === 2) { // "Select an Option" + 1 value 10741 $opts.prop("selected", false); // unset them all 10742 $($opts[1]).prop("selected", "selected"); // make the first one selected 10743 $ddl.change(); // trigger the change event 10744 } 10745} 10746 10747function checkQtyLimit($form) { 10748 var limit = $form.find("#hdnPurchaseQtyLimit").val(); 10749 if (limit === "0" || limit === "99") return false; 10750 setTimeout(function() { 10751 $form.find('#quantity').attr('type', 'number').attr('max', limit); 10752 }, 1000); 10753 if ($form.find("#ammoQtyLimit").length) { 10754 $form.find("#ammoQtyLimit").text(limit); 10755 } else { 10756 $form.find('.pdp-title-flex-container').first().after( 10757 '<div class="bold-text" style="color:#54565a;">* THIS ITEM HAS A LIMIT OF <span id="ammoQtyLimit">' + 10758 limit + '</span> PER ORDER.</div>'); 10759 } 10760};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.