2 Copyright (c) 2008 Yii Software LLC
3 @license http://www.yiiframework.com/license/
4 @author Qiang Xue <qiang.xue@gmail.com>
8 "object" === typeof module && "object" === typeof module.exports ? module.exports = d.document ? c(d, !0) : function(b) {
9 if (!b.document) throw Error("jQuery requires a window with a document");
12 })("undefined" !== typeof window ? window : this, function(d, c) {
16 return "function" === b || g.isWindow(l) ? !1 : 1 === l.nodeType && a ? !0 : "array" === b || 0 === a || "number" === typeof a && 0 < a && a - 1 in l
20 if (g.isFunction(a)) return g.grep(l, function(l, d) {
24 if (a.nodeType) return g.grep(l, function(l) {
27 if ("string" === typeof a) {
28 if (ib.test(a)) return g.filter(a, l, b);
31 return g.grep(l, function(l) {
32 return 0 <= ua.call(a, l) !== b
38 (l = l[a]) && 1 !== l.nodeType;);
44 g.each(l.match(ca) || [], function(l, b) {
51 M.removeEventListener("DOMContentLoaded", k, !1);
52 d.removeEventListener("load", k, !1);
57 Object.defineProperty(this.cache = {},
63 this.expando = g.expando + Math.random()
67 if (void 0 === b && 1 === l.nodeType)
68 if (b = "data-" + a.replace(jb, "-$1").toLowerCase(), b = l.getAttribute(b), "string" === typeof b) {
70 b = "true" === b ? !0 : "false" === b ? !1 : "null" === b ? null : +b + "" === b ? +b : kb.test(b) ? g.parseJSON(b) : b
87 return M.activeElement
92 return g.nodeName(l, "table") && g.nodeName(11 !== a.nodeType ?
93 a : a.firstChild, "tr") ? l.getElementsByTagName("tbody")[0] || l.appendChild(l.ownerDocument.createElement("tbody")) : l
97 l.type = (null !== l.getAttribute("type")) + "/" + l.type;
102 var a = lb.exec(l.type);
103 a ? l.type = a[1] : l.removeAttribute("type");
108 for (var b = 0, d = l.length; b < d; b++) F.set(l[b], "globalEval", !a || F.get(a[b], "globalEval"))
113 if (1 === a.nodeType) {
114 if (F.hasData(l) && (e = F.access(l), b = F.set(a, e), e = e.events))
115 for (c in delete b.handle,
117 for (b = 0, d = e[c].length; b < d; b++) g.event.add(a, c, e[c][b]);
118 U.hasData(l) && (c = U.access(l), c = g.extend({}, c), U.set(a, c))
123 var b = l.getElementsByTagName ? l.getElementsByTagName(a || "*") : l.querySelectorAll ? l.querySelectorAll(a || "*") : [];
124 return void 0 === a || a && g.nodeName(l, a) ? g.merge([l], b) : b
128 var b = g(a.createElement(l)).appendTo(a.body),
129 c = d.getDefaultComputedStyle ? d.getDefaultComputedStyle(b[0]).display : g.css(b[0], "display");
137 b || (b = L(l, a), "none" !== b && b || (va = (va || g("<iframe frameborder='0' width='0' height='0'/>")).appendTo(a.documentElement), a = va[0].contentDocument, a.write(), a.close(), b = L(l, a), va.detach()), Na[l] = b);
141 function A(l, a, b) {
142 var c, d, e = l.style;
143 (b = b || wa(l)) && (d = b.getPropertyValue(a) || b[a]);
144 b && ("" !== d || g.contains(l.ownerDocument, l) || (d = g.style(l, a)), Ea.test(d) && Oa.test(a) && (l = e.width, a = e.minWidth, c = e.maxWidth, e.minWidth = e.maxWidth = e.width = d, d = b.width, e.width = l, e.minWidth = a, e.maxWidth = c));
152 if (l()) delete this.get;
153 else return (this.get = a).apply(this, arguments)
159 if (a in l) return a;
160 for (var b = a[0].toUpperCase() + a.slice(1), d = a, c = Pa.length; c--;)
161 if (a = Pa[c] + b, a in l) return a;
165 function J(l, a, b) {
166 return (l = mb.exec(a)) ? Math.max(0, l[1] - (b || 0)) + (l[2] || "px") : a
169 function D(l, a, b, d, c) {
170 a = b === (d ? "border" : "content") ? 4 : "width" === a ? 1 : 0;
171 for (var e = 0; 4 > a; a += 2) "margin" === b && (e += g.css(l, b + ha[a], !0, c)), d ? ("content" === b && (e -= g.css(l, "padding" +
172 ha[a], !0, c)), "margin" !== b && (e -= g.css(l, "border" + ha[a] + "Width", !0, c))) : (e += g.css(l, "padding" + ha[a], !0, c), "padding" !== b && (e += g.css(l, "border" + ha[a] + "Width", !0, c)));
176 function P(l, a, b) {
178 c = "width" === a ? l.offsetWidth : l.offsetHeight,
180 h = "border-box" === g.css(l, "boxSizing", !1, e);
181 if (0 >= c || null == c) {
183 if (0 > c || null == c) c = l.style[a];
184 if (Ea.test(c)) return c;
185 d = h && (Q.boxSizingReliable() || c === l.style[a]);
186 c = parseFloat(c) || 0
188 return c + D(l, a, b || (h ? "border" : "content"), d, e) + "px"
193 for (var b, c, d, e = [], h = 0, f = l.length; h < f; h++) c = l[h], c.style && (e[h] = F.get(c, "olddisplay"), b = c.style.display, a ? (e[h] || "none" !== b || (c.style.display = ""), "" === c.style.display && ma(c) && (e[h] = F.access(c, "olddisplay", N(c.nodeName)))) : e[h] || (d = ma(c), (b && "none" !== b || !d) && F.set(c, "olddisplay", d ? b : g.css(c, "display"))));
194 for (h = 0; h < f; h++) c = l[h], !c.style || a && "none" !== c.style.display && "" !== c.style.display || (c.style.display = a ? e[h] || "" : "none");
198 function w(l, a, b, c, d) {
199 return new w.prototype.init(l, a, b, c, d)
203 setTimeout(function() {
215 for (a = a ? 1 : 0; 4 > c; c += 2 - a) b = ha[c], d["margin" + b] = d["padding" + b] = l;
216 a && (d.opacity = d.width = l);
220 function K(l, a, b) {
221 for (var c, d = (ja[a] || []).concat(ja["*"]), e = 0, h = d.length; e < h; e++)
222 if (c = d[e].call(b, a, l)) return c
228 if (c = g.camelCase(b), d = a[c], e = l[b], g.isArray(e) && (d = e[1], e = l[b] = e[0]), b !== c && (l[c] = e, delete l[b]), (h = g.cssHooks[c]) && "expand" in h)
229 for (b in e = h.expand(e), delete l[c], e) b in l || (l[b] = e[b], a[b] =
234 function I(l, a, b) {
237 h = g.Deferred().always(function() {
242 for (var a = ia || z(), a = Math.max(0, n.startTime + n.duration - a), b = 1 - (a / n.duration || 0), d = 0, e = n.tweens.length; d < e; d++) n.tweens[d].run(b);
243 h.notifyWith(l, [n, b, a]);
244 if (1 > b && e) return a;
245 h.resolveWith(l, [n]);
249 props: g.extend({}, a),
253 originalProperties: a,
255 startTime: ia || z(),
256 duration: b.duration,
258 createTween: function(a,
260 var c = g.Tween(l, n.opts, a, b, n.opts.specialEasing[a] || n.opts.easing);
266 d = a ? n.tweens.length : 0;
268 for (c = !0; b < d; b++) n.tweens[b].run(1);
269 a ? h.resolveWith(l, [n, a]) : h.rejectWith(l, [n, a]);
274 for (O(b, n.opts.specialEasing); d < e; d++)
275 if (a = xa[d].call(n, l, b, n.opts)) return a;
277 g.isFunction(n.opts.start) && n.opts.start.call(l, n);
278 g.fx.timer(g.extend(f, {
283 return n.progress(n.opts.progress).done(n.opts.done,
284 n.opts.complete).fail(n.opts.fail).always(n.opts.always)
288 return function(a, b) {
289 "string" !== typeof a && (b = a, a = "*");
291 e = a.toLowerCase().match(ca) || [];
293 for (; c = e[d++];) "+" === c[0] ? (c = c.slice(1) || "*", (l[c] = l[c] || []).unshift(b)) : (l[c] = l[c] || []).push(b)
297 function da(l, a, b, c) {
301 g.each(l[f] || [], function(l, g) {
303 if ("string" === typeof f && !h && !e[f]) return a.dataTypes.unshift(f), d(f), !1;
304 if (h) return !(n = f)
308 var e = {}, h = l === Fa;
309 return d(a.dataTypes[0]) || !e["*"] && d("*")
313 var b, c, d = g.ajaxSettings.flatOptions || {};
314 for (b in a) void 0 !== a[b] && ((d[b] ? l : c || (c = {}))[b] = a[b]);
315 c && g.extend(!0, l, c);
319 function ba(l, a, b, c) {
321 if (g.isArray(a)) g.each(a, function(a, d) {
322 b || nb.test(l) ? c(l, d) : ba(l + "[" + ("object" === typeof d ? a : "") + "]", d, b, c)
324 else if (b || "object" !== g.type(a)) c(l, a);
326 for (d in a) ba(l + "[" + d + "]", a[d], b, c)
330 return g.isWindow(l) ? l : 9 === l.nodeType && l.defaultView
339 Ha = ya.hasOwnProperty,
341 Q = {}, M = d.document,
343 return new g.fn.init(l, a)
346 sb = function(l, a) {
347 return a.toUpperCase()
349 g.fn = g.prototype = {
354 toArray: function() {
358 return null != l ? 0 > l ? this[l + this.length] : this[l] : ea.call(this)
360 pushStack: function(l) {
361 l = g.merge(this.constructor(), l);
363 l.context = this.context;
366 each: function(l, a) {
371 return this.pushStack(g.map(this, function(a, b) {
372 return l.call(a, b, a)
376 return this.pushStack(ea.apply(this, arguments))
386 l = +l + (0 > l ? a : 0);
387 return this.pushStack(0 <= l && l < a ? [this[l]] : [])
390 return this.prevObject || this.constructor(null)
396 g.extend = g.fn.extend = function() {
397 var l, a, b, c, d, e = arguments[0] || {}, h = 1,
398 f = arguments.length,
400 "boolean" === typeof e && (n = e, e = arguments[h] || {}, h++);
401 "object" === typeof e || g.isFunction(e) || (e = {});
402 h === f && (e = this, h--);
404 if (null != (l = arguments[h]))
405 for (a in l) b = e[a], c = l[a], e !== c && (n && c && (g.isPlainObject(c) || (d = g.isArray(c))) ? (d ? (d = !1, b = b && g.isArray(b) ? b : []) : b = b && g.isPlainObject(b) ? b : {}, e[a] = g.extend(n, b, c)) : void 0 !== c && (e[a] = c));
409 expando: "jQuery" + ("2.1.0" + Math.random()).replace(/\D/g, ""),
415 isFunction: function(a) {
416 return "function" ===
419 isArray: Array.isArray,
420 isWindow: function(a) {
421 return null != a && a === a.window
423 isNumeric: function(a) {
424 return 0 <= a - parseFloat(a)
426 isPlainObject: function(a) {
427 if ("object" !== g.type(a) || a.nodeType || g.isWindow(a)) return !1;
429 if (a.constructor && !Ha.call(a.constructor.prototype, "isPrototypeOf")) return !1
435 isEmptyObject: function(a) {
436 for (var b in a) return !1;
440 return null == a ? a + "" : "object" === typeof a || "function" === typeof a ? ya[ob.call(a)] || "object" : typeof a
442 globalEval: function(a) {
445 if (a = g.trim(a)) 1 === a.indexOf("use strict") ? (b = M.createElement("script"), b.text = a, M.head.appendChild(b).parentNode.removeChild(b)) : b(a)
447 camelCase: function(a) {
448 return a.replace(qb, "ms-").replace(rb, sb)
450 nodeName: function(a, b) {
451 return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase()
453 each: function(a, c, d) {
459 for (; h < g && (e = c.apply(a[h], d), !1 !== e); h++);
462 if (e = c.apply(a[h], d), !1 === e) break
464 for (; h < g && (e = c.call(a[h],
465 h, a[h]), !1 !== e); h++);
468 if (e = c.call(a[h], h, a[h]), !1 === e) break;
472 return null == a ? "" : pb.call(a)
474 makeArray: function(a, c) {
476 null != a && (b(Object(a)) ? g.merge(d, "string" === typeof a ? [a] : a) : Ga.call(d, a));
479 inArray: function(a, b, c) {
480 return null == b ? -1 : ua.call(b, a, c)
482 merge: function(a, b) {
483 for (var c = +b.length, d = 0, e = a.length; d < c; d++) a[e++] = b[d];
487 grep: function(a, b, c) {
488 for (var d = [], e = 0, h = a.length, g = !c; e < h; e++) c = !b(a[e], e), c !== g && d.push(a[e]);
491 map: function(a, c, d) {
496 for (; h < g; h++) e = c(a[h], h, d), null != e && f.push(e);
498 for (h in a) e = c(a[h], h, d), null != e && f.push(e);
499 return ra.apply([], f)
502 proxy: function(a, b) {
504 "string" === typeof b && (c = a[b], b = a, a = c);
505 if (g.isFunction(a)) return d = ea.call(arguments, 2), c = function() {
506 return a.apply(b || this, d.concat(ea.call(arguments)))
507 }, c.guid = a.guid = a.guid || g.guid++, c
512 g.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
514 ya["[object " + b + "]"] = b.toLowerCase()
516 var ka = function(a) {
517 function b(a, l, c, d) {
519 (l ? l.ownerDocument || l : W) !== G && aa(l);
522 if (!a || "string" !== typeof a) return c;
523 if (1 !== (E = l.nodeType) && 9 !== E) return [];
528 if ((h = l.getElementById(g)) && h.parentNode) {
529 if (h.id === g) return c.push(h), c
532 if (l.ownerDocument && (h = l.ownerDocument.getElementById(g)) && K(l, h) && h.id === g) return c.push(h), c
534 if (e[2]) return na.apply(c, l.getElementsByTagName(a)),
536 if ((g = e[3]) && D.getElementsByClassName && l.getElementsByClassName) return na.apply(c, l.getElementsByClassName(g)), c
538 if (D.qsa && (!X || !X.test(a))) {
542 if (1 === E && "object" !== l.nodeName.toLowerCase()) {
544 (e = l.getAttribute("id")) ? h = e.replace(Ba, "\\$&") : l.setAttribute("id", h);
545 h = "[id='" + h + "'] ";
546 for (g = E.length; g--;) E[g] = h + r(E[g]);
547 g = qa.test(a) && v(l.parentNode) || l;
551 return na.apply(c, g.querySelectorAll(C)), c
552 } catch (f) {} finally {
553 e || l.removeAttribute("id")
562 if (!d && 1 === h.length) {
563 e = h[0] = h[0].slice(0);
564 if (2 < e.length && "ID" === (n = e[0]).type && D.getById && 9 === l.nodeType && ba && A.relative[e[1].type]) {
565 l = (A.find.ID(n.matches[0].replace(oa, pa), l) || [])[0];
570 a = a.slice(e.shift().value.length)
572 for (E = ra.needsContext.test(a) ? 0 : e.length; E--;) {
574 if (A.relative[g = n.type]) break;
576 if (d = g(n.matches[0].replace(oa, pa), qa.test(e[0].type) && v(l.parentNode) || l)) {
578 a = d.length && r(e);
589 h)(d, l, !ba, c, qa.test(a) && v(l.parentNode) || l);
597 l.push(b + " ") > A.cacheLength && delete a[l.shift()];
598 return a[b + " "] = c
610 var l = G.createElement("div");
616 l.parentNode && l.parentNode.removeChild(l)
621 for (var b = a.split("|"), c = a.length; c--;) A.attrHandle[b[c]] = l
626 c = b && 1 === a.nodeType && 1 === l.nodeType && (~l.sourceIndex || ca) - (~a.sourceIndex ||
630 for (; b = b.nextSibling;)
631 if (b === l) return -1;
637 return "input" === l.nodeName.toLowerCase() && l.type === a
643 var b = l.nodeName.toLowerCase();
644 return ("input" === b || "button" === b) && l.type === a
649 return d(function(l) {
651 return d(function(b, c) {
652 for (var d, e = a([], b.length, l), h = e.length; h--;) b[d = e[h]] && (b[d] = !(c[d] = b[d]))
658 return a && typeof a.getElementsByTagName !== V && a
665 var c, d, e, h, g, C, f;
666 if (g = Q[a + " "]) return l ? 0 : g.slice(0);
669 for (f = A.preFilter; g;) {
670 if (!c || (d = ta.exec(g))) d && (g = g.slice(d[0].length) || g), C.push(e = []);
672 if (d = ua.exec(g)) c = d.shift(), e.push({
674 type: d[0].replace(ga, " ")
675 }), g = g.slice(c.length);
676 for (h in A.filter)!(d = ra[h].exec(g)) || f[h] && !(d = f[h](d)) || (c = d.shift(), e.push({
680 }), g = g.slice(c.length));
683 return l ? g.length : g ? b.error(a) : Q(a, C).slice(0)
687 for (var l = 0, b = a.length, c = ""; l < b; l++) c += a[l].value;
691 function m(a, l, b) {
693 d = b && "parentNode" === c,
695 return l.first ? function(l, b, e) {
697 if (1 === l.nodeType || d) return a(l, b, e)
698 } : function(l, b, h) {
699 var g, E, C = [S, e];
702 if ((1 === l.nodeType || d) && a(l, b, h)) return !0
705 if (1 === l.nodeType || d) {
706 E = l[I] || (l[I] = {});
707 if ((g = E[c]) && g[0] === S && g[1] === e) return C[2] = g[2];
709 if (C[2] = a(l, b, h)) return !0
715 return 1 < a.length ? function(l, b, c) {
716 for (var d = a.length; d--;)
717 if (!a[d](l, b, c)) return !1;
724 for (var e, h = [], g = 0, E = a.length, C = null != l; g < E; g++)
726 if (!b || b(e, c, d)) h.push(e), C && l.push(g);
730 function J(a, l, c, e, h, g) {
731 e && !e[I] && (e = J(e));
732 h && !h[I] && (h = J(h, g));
733 return d(function(d, g, C, f) {
740 for (var R = C.nodeType ? [C] : C, t = [], r = 0, m = R.length; r < m; r++) b(k, R[r], t);
743 k = !a || !d && l ? k : B(k, q, a, C, f);
744 R = c ? h || (d ? a : Z || e) ? [] : g : k;
747 for (n = B(R, v), e(n, [], C, f), C = n.length; C--;)
748 if (T = n[C]) R[v[C]] = !(k[v[C]] = T);
754 R.length; C--;)(T = R[C]) && n.push(k[C] = T);
755 h(null, R = [], n, f)
757 for (C = R.length; C--;)(T = R[C]) && -1 < (n = h ? sa.call(d, T) : q[C]) && (d[n] = !(g[n] = T))
759 } else R = B(R === g ? R.splice(Z, R.length) : R), h ? h(null, g, R, f) : na.apply(g, R)
764 var l, b, c, d = a.length,
765 e = A.relative[a[0].type];
766 b = e || A.relative[" "];
767 for (var h = e ? 1 : 0, g = m(function(a) {
769 }, b, !0), E = m(function(a) {
770 return -1 < sa.call(l, a)
773 return !e && (c || b !== P) || ((l = b).nodeType ? g(a, b, c) : E(a, b, c))
776 if (b = A.relative[a[h].type]) C = [m(L(C),
779 b = A.filter[a[h].type].apply(null, a[h].matches);
781 for (c = ++h; c < d && !A.relative[a[c].type]; c++);
782 return J(1 < h && L(C), 1 < h && r(a.slice(0, h - 1).concat({
783 value: " " === a[h - 2].type ? "*" : ""
784 })).replace(ga, "$1"), b, h < c && p(a.slice(h, c)), c < d && p(a = a.slice(c)), c < d && r(a))
792 var c = 0 < l.length,
794 h = function(d, h, g, C, f) {
800 r = d || e && A.find.TAG("*", f),
801 m = S += null == t ? 1 : Math.random() || 0.1,
803 for (f && (P = h !== G && h); Z !== L && null != (n = r[Z]); Z++) {
806 for (T = 0; q = a[T++];)
813 c && ((n = !q && n) && v--, d && k.push(n))
817 for (T = 0; q = l[T++];) q(k, R, h, g);
820 for (; Z--;) k[Z] || R[Z] || (R[Z] = ha.call(C));
824 f && !d && 0 < R.length && 1 < v + l.length && b.uniqueSort(C)
831 var s, D, A, N, w, u, P, x, z, aa, G, O, ba, X, H, F, K, I = "sizzle" + -new Date,
843 fa = {}.hasOwnProperty,
850 sa = Y.indexOf || function(a) {
851 for (var l = 0, b = this.length; l < b; l++)
852 if (this[l] === a) return l;
854 }, ka = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w", "w#"),
855 ma = "\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + ka + ")|)|)[\\x20\\t\\r\\n\\f]*\\]",
856 ja = ":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + ma.replace(3, 8) + ")*)|.*)\\)|)",
857 ga = RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$", "g"),
858 ta = /^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,
859 ua = /^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,
860 va = RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]", "g"),
862 xa = new RegExp("^" + ka + "$"),
864 ID: /^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,
865 CLASS: /^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,
866 TAG: new RegExp("^(" + "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w", "w*") + ")"),
867 ATTR: new RegExp("^" + ma),
868 PSEUDO: new RegExp("^" +
870 CHILD: RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)", "i"),
871 bool: RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$", "i"),
872 needsContext: RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)",
874 }, ya = /^(?:input|select|textarea|button)$/i,
876 Ca = /^[^{]+\{\s*\[native \w/,
877 Aa = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
880 oa = RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)", "ig"),
881 pa = function(a, l, b) {
882 a = "0x" + l - 65536;
883 return a !== a || b ? l : 0 > a ? String.fromCharCode(a + 65536) : String.fromCharCode(a >> 10 | 55296, a & 1023 | 56320)
886 na.apply(Y = ia.call(W.childNodes), W.childNodes), Y[W.childNodes.length].nodeType
889 apply: Y.length ? function(a, l) {
890 la.apply(a, ia.call(l))
892 for (var b = a.length, c = 0; a[b++] = l[c++];);
898 w = b.isXML = function(a) {
899 return (a = a && (a.ownerDocument || a).documentElement) ? "HTML" !== a.nodeName : !1
901 aa = b.setDocument = function(a) {
902 var l = a ? a.ownerDocument || a : W;
904 if (l === G || 9 !== l.nodeType || !l.documentElement) return G;
906 O = l.documentElement;
908 a && a !== a.top && (a.addEventListener ? a.addEventListener("unload", function() {
910 }, !1) : a.attachEvent && a.attachEvent("onunload", function() {
913 D.attributes = e(function(a) {
916 return !a.getAttribute("className")
918 D.getElementsByTagName = e(function(a) {
919 a.appendChild(l.createComment(""));
920 return !a.getElementsByTagName("*").length
922 D.getElementsByClassName = Ca.test(l.getElementsByClassName) && e(function(a) {
923 a.innerHTML = "<div class='a'></div><div class='a i'></div>";
924 a.firstChild.className = "i";
925 return 2 === a.getElementsByClassName("i").length
927 D.getById = e(function(a) {
928 O.appendChild(a).id = I;
929 return !l.getElementsByName || !l.getElementsByName(I).length
931 D.getById ? (A.find.ID = function(a,
933 if (typeof l.getElementById !== V && ba) {
934 var b = l.getElementById(a);
935 return b && b.parentNode ? [b] : []
937 }, A.filter.ID = function(a) {
938 var l = a.replace(oa, pa);
940 return a.getAttribute("id") === l
942 }) : (delete A.find.ID, A.filter.ID = function(a) {
943 var l = a.replace(oa, pa);
945 return (a = typeof a.getAttributeNode !== V && a.getAttributeNode("id")) && a.value === l
948 A.find.TAG = D.getElementsByTagName ? function(a, l) {
949 if (typeof l.getElementsByTagName !== V) return l.getElementsByTagName(a)
954 e = l.getElementsByTagName(a);
956 for (; b = e[d++];) 1 === b.nodeType && c.push(b);
961 A.find.CLASS = D.getElementsByClassName && function(a, l) {
962 if (typeof l.getElementsByClassName !== V && ba) return l.getElementsByClassName(a)
966 if (D.qsa = Ca.test(l.querySelectorAll)) e(function(a) {
967 a.innerHTML = "<select t=''><option selected=''></option></select>";
968 a.querySelectorAll("[t^='']").length && X.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")");
969 a.querySelectorAll("[selected]").length || X.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)");
970 a.querySelectorAll(":checked").length || X.push(":checked")
972 var b = l.createElement("input");
973 b.setAttribute("type", "hidden");
974 a.appendChild(b).setAttribute("name", "D");
975 a.querySelectorAll("[name=d]").length && X.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=");
976 a.querySelectorAll(":enabled").length || X.push(":enabled", ":disabled");
977 a.querySelectorAll("*,:x");
980 (D.matchesSelector = Ca.test(F = O.webkitMatchesSelector || O.mozMatchesSelector || O.oMatchesSelector || O.msMatchesSelector)) && e(function(a) {
981 D.disconnectedMatch =
983 F.call(a, "[s!='']:x");
986 X = X.length && new RegExp(X.join("|"));
987 H = H.length && new RegExp(H.join("|"));
988 K = (a = Ca.test(O.compareDocumentPosition)) || Ca.test(O.contains) ? function(a, l) {
989 var b = 9 === a.nodeType ? a.documentElement : a,
990 c = l && l.parentNode;
991 return a === c || !! (c && 1 === c.nodeType && (b.contains ? b.contains(c) : a.compareDocumentPosition && a.compareDocumentPosition(c) & 16))
994 for (; l = l.parentNode;)
995 if (l === a) return !0;
998 U = a ? function(a, b) {
999 if (a === b) return z = !0, 0;
1000 var c = !a.compareDocumentPosition - !b.compareDocumentPosition;
1002 c = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1;
1003 return c & 1 || !D.sortDetached && b.compareDocumentPosition(a) === c ? a === l || a.ownerDocument === W && K(W, a) ? -1 : b === l || b.ownerDocument === W && K(W, b) ? 1 : x ? sa.call(x, a) - sa.call(x, b) : 0 : c & 4 ? -1 : 1
1004 } : function(a, b) {
1005 if (a === b) return z = !0, 0;
1008 var e = b.parentNode,
1011 if (!c || !e) return a === l ? -1 : b === l ? 1 : c ? -1 : e ? 1 : x ? sa.call(x, a) - sa.call(x, b) : 0;
1012 if (c === e) return g(a,
1014 for (c = a; c = c.parentNode;) h.unshift(c);
1015 for (c = b; c = c.parentNode;) E.unshift(c);
1016 for (; h[d] === E[d];) d++;
1017 return d ? g(h[d], E[d]) : h[d] === W ? -1 : E[d] === W ? 1 : 0
1021 b.matches = function(a, l) {
1022 return b(a, null, null, l)
1024 b.matchesSelector = function(a, l) {
1025 (a.ownerDocument || a) !== G && aa(a);
1026 l = l.replace(va, "='$1']");
1027 if (D.matchesSelector && ba && !(H && H.test(l) || X && X.test(l))) try {
1028 var c = F.call(a, l);
1029 if (c || D.disconnectedMatch || a.document && 11 !== a.document.nodeType) return c
1031 return 0 < b(l, G, null, [a]).length
1033 b.contains = function(a,
1035 (a.ownerDocument || a) !== G && aa(a);
1038 b.attr = function(a, l) {
1039 (a.ownerDocument || a) !== G && aa(a);
1040 var b = A.attrHandle[l.toLowerCase()],
1041 b = b && fa.call(A.attrHandle, l.toLowerCase()) ? b(a, l, !ba) : void 0;
1042 return void 0 !== b ? b : D.attributes || !ba ? a.getAttribute(l) : (b = a.getAttributeNode(l)) && b.specified ? b.value : null
1044 b.error = function(a) {
1045 throw Error("Syntax error, unrecognized expression: " + a);
1047 b.uniqueSort = function(a) {
1051 z = !D.detectDuplicates;
1052 x = !D.sortStable && a.slice(0);
1056 a[d++];) l === a[d] && (c = b.push(d));
1057 for (; c--;) a.splice(b[c], 1)
1062 N = b.getText = function(a) {
1067 for (; l = a[c++];) b += N(l);
1068 else if (1 === l || 9 === l || 11 === l) {
1069 if ("string" === typeof a.textContent) return a.textContent;
1070 for (a = a.firstChild; a; a = a.nextSibling) b += N(a)
1071 } else if (3 === l || 4 === l) return a.nodeValue;
1089 dir: "previousSibling",
1093 dir: "previousSibling"
1098 a[1] = a[1].replace(oa, pa);
1099 a[3] = (a[4] || a[5] || "").replace(oa, pa);
1100 "~=" === a[2] && (a[3] = " " + a[3] + " ");
1101 return a.slice(0, 4)
1103 CHILD: function(a) {
1104 a[1] = a[1].toLowerCase();
1105 "nth" === a[1].slice(0, 3) ? (a[3] || b.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && b.error(a[0]);
1108 PSEUDO: function(a) {
1109 var l, b = !a[5] && a[2];
1110 if (ra.CHILD.test(a[0])) return null;
1111 a[3] && void 0 !== a[4] ? a[2] = a[4] : b && wa.test(b) &&
1112 (l = t(b, !0)) && (l = b.indexOf(")", b.length - l) - b.length) && (a[0] = a[0].slice(0, l), a[2] = b.slice(0, l));
1113 return a.slice(0, 3)
1118 var l = a.replace(oa, pa).toLowerCase();
1119 return "*" === a ? function() {
1122 return a.nodeName && a.nodeName.toLowerCase() === l
1125 CLASS: function(a) {
1126 var l = da[a + " "];
1127 return l || (l = new RegExp("(^|[\\x20\\t\\r\\n\\f])" + a + "([\\x20\\t\\r\\n\\f]|$)")) && da(a, function(a) {
1128 return l.test("string" === typeof a.className && a.className || typeof a.getAttribute !== V && a.getAttribute("class") ||
1132 ATTR: function(a, l, c) {
1133 return function(d) {
1135 if (null == d) return "!=" === l;
1138 return "=" === l ? d === c : "!=" === l ? d !== c : "^=" === l ? c && 0 === d.indexOf(c) : "*=" === l ? c && -1 < d.indexOf(c) : "$=" === l ? c && d.slice(-c.length) === c : "~=" === l ? -1 < (" " + d + " ").indexOf(c) : "|=" === l ? d === c || d.slice(0, c.length + 1) === c + "-" : !1
1141 CHILD: function(a, l, b, c, d) {
1142 var e = "nth" !== a.slice(0, 3),
1143 h = "last" !== a.slice(-4),
1144 g = "of-type" === l;
1145 return 1 === c && 0 === d ? function(a) {
1146 return !!a.parentNode
1147 } : function(l, b, E) {
1150 h ? "nextSibling" : "previousSibling";
1151 var v = l.parentNode,
1152 Z = g && l.nodeName.toLowerCase();
1157 for (f = l; f = f[b];)
1158 if (g ? f.nodeName.toLowerCase() === Z : 1 === f.nodeType) return !1;
1159 q = b = "only" === a && !q && "nextSibling"
1163 q = [h ? v.firstChild : v.lastChild];
1165 for (E = v[I] || (v[I] = {}), C = E[a] || [], T = C[0] === S && C[1], n = C[0] === S && C[2], f = T && v.childNodes[T]; f = ++T && f && f[b] || (n = T = 0, q.pop());) {
1166 if (1 === f.nodeType && ++n && f === l) {
1170 } else if (E && (C = (l[I] || (l[I] = {}))[a]) && C[0] === S) n = C[1];
1174 ++T && f && f[b] || (n = T = 0, q.pop())) && ((g ? f.nodeName.toLowerCase() !== Z : 1 !== f.nodeType) || !++n || (E && ((f[I] || (f[I] = {}))[a] = [S, n]), f !== l)););
1176 return n === c || 0 === n % c && 0 <= n / c
1180 PSEUDO: function(a, l) {
1181 var c, e = A.pseudos[a] || A.setFilters[a.toLowerCase()] || b.error("unsupported pseudo: " + a);
1182 return e[I] ? e(l) : 1 < e.length ? (c = [a, a, "", l], A.setFilters.hasOwnProperty(a.toLowerCase()) ? d(function(a, b) {
1183 for (var c, d = e(a, l), h = d.length; h--;) c = sa.call(a, d[h]), a[c] = !(b[c] = d[h])
1190 not: d(function(a) {
1193 c = u(a.replace(ga, "$1"));
1194 return c[I] ? d(function(a, l, b, d) {
1195 d = c(a, null, d, []);
1196 for (var e = a.length; e--;)
1197 if (b = d[e]) a[e] = !(l[e] = b)
1198 }) : function(a, d, e) {
1204 has: d(function(a) {
1205 return function(l) {
1206 return 0 < b(a, l).length
1209 contains: d(function(a) {
1210 return function(l) {
1211 return -1 < (l.textContent || l.innerText || N(l)).indexOf(a)
1214 lang: d(function(a) {
1215 xa.test(a || "") || b.error("unsupported lang: " + a);
1216 a = a.replace(oa, pa).toLowerCase();
1217 return function(l) {
1220 if (b = ba ? l.lang : l.getAttribute("xml:lang") ||
1221 l.getAttribute("lang")) return b = b.toLowerCase(), b === a || 0 === b.indexOf(a + "-"); while ((l = l.parentNode) && 1 === l.nodeType);
1225 target: function(b) {
1226 var c = a.location && a.location.hash;
1227 return c && c.slice(1) === b.id
1232 focus: function(a) {
1233 return a === G.activeElement && (!G.hasFocus || G.hasFocus()) && !! (a.type || a.href || ~a.tabIndex)
1235 enabled: function(a) {
1236 return !1 === a.disabled
1238 disabled: function(a) {
1239 return !0 === a.disabled
1241 checked: function(a) {
1242 var l = a.nodeName.toLowerCase();
1244 l && !! a.checked || "option" === l && !! a.selected
1246 selected: function(a) {
1247 a.parentNode && a.parentNode.selectedIndex;
1248 return !0 === a.selected
1250 empty: function(a) {
1251 for (a = a.firstChild; a; a = a.nextSibling)
1252 if (6 > a.nodeType) return !1;
1255 parent: function(a) {
1256 return !A.pseudos.empty(a)
1258 header: function(a) {
1259 return za.test(a.nodeName)
1261 input: function(a) {
1262 return ya.test(a.nodeName)
1264 button: function(a) {
1265 var l = a.nodeName.toLowerCase();
1266 return "input" === l && "button" === a.type || "button" === l
1270 return "input" === a.nodeName.toLowerCase() &&
1271 "text" === a.type && (null == (l = a.getAttribute("type")) || "text" === l.toLowerCase())
1273 first: q(function() {
1276 last: q(function(a, l) {
1279 eq: q(function(a, l, b) {
1280 return [0 > b ? b + l : b]
1282 even: q(function(a, l) {
1283 for (var b = 0; b < l; b += 2) a.push(b);
1286 odd: q(function(a, l) {
1287 for (var b = 1; b < l; b += 2) a.push(b);
1290 lt: q(function(a, l, b) {
1291 for (l = 0 > b ? b + l : b; 0 <= --l;) a.push(l);
1294 gt: q(function(a, l, b) {
1295 for (b = 0 > b ? b + l : b; ++b < l;) a.push(b);
1300 A.pseudos.nth = A.pseudos.eq;
1307 }) A.pseudos[s] = f(s);
1311 }) A.pseudos[s] = n(s);
1312 k.prototype = A.filters = A.pseudos;
1313 A.setFilters = new k;
1314 u = b.compile = function(a, l) {
1320 for (b = l.length; b--;) e = p(l[b]), e[I] ? c.push(e) : d.push(e);
1325 D.sortStable = I.split("").sort(U).join("") === I;
1326 D.detectDuplicates = !! z;
1328 D.sortDetached = e(function(a) {
1329 return a.compareDocumentPosition(G.createElement("div")) & 1
1332 a.innerHTML = "<a href='#'></a>";
1333 return "#" === a.firstChild.getAttribute("href")
1334 }) || h("type|href|height|width", function(a, l, b) {
1335 if (!b) return a.getAttribute(l, "type" === l.toLowerCase() ? 1 : 2)
1337 D.attributes && e(function(a) {
1338 a.innerHTML = "<input/>";
1339 a.firstChild.setAttribute("value", "");
1340 return "" === a.firstChild.getAttribute("value")
1341 }) || h("value", function(a, l, b) {
1342 if (!b && "input" === a.nodeName.toLowerCase()) return a.defaultValue
1345 return null == a.getAttribute("disabled")
1346 }) || h("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
1349 if (!b) return !0 === a[l] ? l.toLowerCase() : (c = a.getAttributeNode(l)) && c.specified ? c.value : null
1354 g.expr = ka.selectors;
1355 g.expr[":"] = g.expr.pseudos;
1356 g.unique = ka.uniqueSort;
1357 g.text = ka.getText;
1358 g.isXMLDoc = ka.isXML;
1359 g.contains = ka.contains;
1360 var Qa = g.expr.match.needsContext,
1361 Ra = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
1362 ib = /^.[^:#\[\.,]*$/;
1363 g.filter = function(a, b, c) {
1365 c && (a = ":not(" + a + ")");
1366 return 1 === b.length && 1 === d.nodeType ? g.find.matchesSelector(d, a) ? [d] : [] : g.find.matches(a, g.grep(b,
1368 return 1 === a.nodeType
1373 var b, c = this.length,
1376 if ("string" !== typeof a) return this.pushStack(g(a).filter(function() {
1377 for (b = 0; b < c; b++)
1378 if (g.contains(e[b], this)) return !0
1380 for (b = 0; b < c; b++) g.find(a, e[b], d);
1381 d = this.pushStack(1 < c ? g.unique(d) : d);
1382 d.selector = this.selector ? this.selector + " " + a : a;
1385 filter: function(l) {
1386 return this.pushStack(a(this, l || [], !1))
1389 return this.pushStack(a(this, l || [], !0))
1392 return !!a(this, "string" ===
1393 typeof l && Qa.test(l) ? g(l) : l || [], !1).length
1396 var za, ub = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;
1397 (g.fn.init = function(a, b) {
1399 if (!a) return this;
1400 if ("string" === typeof a) {
1401 c = "<" === a[0] && ">" === a[a.length - 1] && 3 <= a.length ? [null, a, null] : ub.exec(a);
1402 if (!c || !c[1] && b) return !b || b.jquery ? (b || za).find(a) : this.constructor(b).find(a);
1404 if (b = b instanceof g ? b[0] : b, g.merge(this, g.parseHTML(c[1], b && b.nodeType ? b.ownerDocument || b : M, !0)), Ra.test(c[1]) && g.isPlainObject(b))
1406 if (g.isFunction(this[c])) this[c](b[c]);
1407 else this.attr(c, b[c])
1408 } else(c = M.getElementById(c[2])) && c.parentNode && (this.length = 1, this[0] = c), this.context = M, this.selector = a;
1411 if (a.nodeType) return this.context = this[0] = a, this.length = 1, this;
1412 if (g.isFunction(a)) return "undefined" !== typeof za.ready ? za.ready(a) : a(g);
1413 void 0 !== a.selector && (this.selector = a.selector, this.context = a.context);
1414 return g.makeArray(a, this)
1415 }).prototype = g.fn;
1417 var vb = /^(?:parents|prev(?:Until|All))/,
1427 for (var d = [], e = void 0 !== c;
1428 (a = a[b]) && 9 !== a.nodeType;)
1429 if (1 === a.nodeType) {
1430 if (e && g(a).is(c)) break;
1435 sibling: function(a, b) {
1436 for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a);
1444 return this.filter(function() {
1445 for (var a = 0; a < c; a++)
1446 if (g.contains(this, b[a])) return !0
1449 closest: function(a, b) {
1450 for (var c, d = 0, e = this.length, h = [], f = Qa.test(a) || "string" !== typeof a ? g(a, b || this.context) : 0; d < e; d++)
1451 for (c = this[d]; c && c !==
1452 b; c = c.parentNode)
1453 if (11 > c.nodeType && (f ? -1 < f.index(c) : 1 === c.nodeType && g.find.matchesSelector(c, a))) {
1457 return this.pushStack(1 < h.length ? g.unique(h) : h)
1459 index: function(a) {
1460 return a ? "string" === typeof a ? ua.call(g(a), this[0]) : ua.call(this, a.jquery ? a[0] : a) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
1462 add: function(a, b) {
1463 return this.pushStack(g.unique(g.merge(this.get(), g(a, b))))
1465 addBack: function(a) {
1466 return this.add(null == a ? this.prevObject : this.prevObject.filter(a))
1470 parent: function(a) {
1472 a.parentNode) && 11 !== a.nodeType ? a : null
1474 parents: function(a) {
1475 return g.dir(a, "parentNode")
1477 parentsUntil: function(a, b, c) {
1478 return g.dir(a, "parentNode", c)
1481 return e(a, "nextSibling")
1484 return e(a, "previousSibling")
1486 nextAll: function(a) {
1487 return g.dir(a, "nextSibling")
1489 prevAll: function(a) {
1490 return g.dir(a, "previousSibling")
1492 nextUntil: function(a, b, c) {
1493 return g.dir(a, "nextSibling", c)
1495 prevUntil: function(a, b, c) {
1496 return g.dir(a, "previousSibling", c)
1498 siblings: function(a) {
1499 return g.sibling((a.parentNode || {}).firstChild, a)
1501 children: function(a) {
1502 return g.sibling(a.firstChild)
1504 contents: function(a) {
1505 return a.contentDocument || g.merge([], a.childNodes)
1508 g.fn[a] = function(c, d) {
1509 var e = g.map(this, b, c);
1510 "Until" !== a.slice(-5) && (d = c);
1511 d && "string" === typeof d && (e = g.filter(d, e));
1512 1 < this.length && (wb[a] || g.unique(e), vb.test(a) && e.reverse());
1513 return this.pushStack(e)
1518 g.Callbacks = function(a) {
1519 a = "string" === typeof a ? Ma[a] || f(a) : g.extend({}, a);
1520 var b, c, d, e, h, n, q = [],
1529 for (d = !0; q && n < h; n++)
1530 if (!1 === q[n].apply(g[0], g[1]) && a.stopOnFalse) {
1535 q && (v ? v.length && k(v.shift()) : b ? q = [] : t.disable())
1541 g.each(b, function(b, c) {
1543 "function" === d ? a.unique && t.has(c) || q.push(c) : c && c.length && "string" !== d && tb(c)
1546 d ? h = q.length : b && (e = c, k(b))
1550 remove: function() {
1551 q && g.each(arguments, function(a, b) {
1552 for (var l; - 1 < (l = g.inArray(b, q, l));) q.splice(l, 1), d &&
1553 (l <= h && h--, l <= n && n--)
1558 return a ? -1 < g.inArray(a, q) : !(!q || !q.length)
1565 disable: function() {
1569 disabled: function() {
1577 locked: function() {
1580 fireWith: function(a, b) {
1581 !q || c && !v || (b = b || [], b = [a, b.slice ? b.slice() : b], d ? v.push(b) : k(b));
1585 t.fireWith(this, arguments);
1595 Deferred: function(a) {
1597 ["resolve", "done", g.Callbacks("once memory"), "resolved"],
1598 ["reject", "fail", g.Callbacks("once memory"), "rejected"],
1599 ["notify", "progress", g.Callbacks("memory")]
1606 always: function() {
1607 e.done(arguments).fail(arguments);
1612 return g.Deferred(function(l) {
1613 g.each(b, function(b, c) {
1614 var h = g.isFunction(a[b]) && a[b];
1615 e[c[1]](function() {
1616 var a = h && h.apply(this, arguments);
1617 if (a && g.isFunction(a.promise)) a.promise().done(l.resolve).fail(l.reject).progress(l.notify);
1618 else l[c[0] + "With"](this === d ? l.promise() : this, h ? [a] : arguments)
1624 promise: function(a) {
1625 return null != a ? g.extend(a, d) : d
1629 g.each(b, function(a, l) {
1633 g && h.add(function() {
1635 }, b[a ^ 1][2].disable, b[2][2].lock);
1636 e[l[0]] = function() {
1637 e[l[0] + "With"](this === e ? d : this, arguments);
1640 e[l[0] + "With"] = h.fireWith
1648 c = ea.call(arguments),
1650 e = 1 !== d || a && g.isFunction(a.promise) ?
1652 h = 1 === e ? a : g.Deferred(),
1653 f = function(a, b, l) {
1654 return function(c) {
1656 l[a] = 1 < arguments.length ? ea.call(arguments) : c;
1657 l === n ? h.notifyWith(b, l) : --e || h.resolveWith(b, l)
1661 for (n = Array(d), q = Array(d), v = Array(d); b < d; b++) c[b] && g.isFunction(c[b].promise) ? c[b].promise().done(f(b, v, c)).fail(h.reject).progress(f(b, q, n)) : --e;
1662 e || h.resolveWith(v, c);
1667 g.fn.ready = function(a) {
1668 g.ready.promise().done(a);
1674 holdReady: function(a) {
1678 ready: function(a) {
1679 (!0 === a ? --g.readyWait : g.isReady) || (g.isReady = !0, !0 !== a && 0 < --g.readyWait || (Aa.resolveWith(M, [g]), g.fn.trigger && g(M).trigger("ready").off("ready")))
1682 g.ready.promise = function(a) {
1683 Aa || (Aa = g.Deferred(), "complete" === M.readyState ? setTimeout(g.ready) : (M.addEventListener("DOMContentLoaded", k, !1), d.addEventListener("load", k, !1)));
1684 return Aa.promise(a)
1687 var fa = g.access = function(a, b, c, d, e, h, f) {
1691 if ("object" === g.type(c))
1693 c) g.access(a, b, n, c[n], !0, h, f);
1694 else if (void 0 !== d && (e = !0, g.isFunction(d) || (f = !0), v && (f ? (b.call(a, d), b = null) : (v = b, b = function(a, b, l) {
1695 return v.call(g(a), l)
1697 for (; n < q; n++) b(a[n], c, f ? d : d.call(a[n], n, b(a[n], c)));
1698 return e ? a : v ? b.call(a) : q ? b(a[0], c) : h
1700 g.acceptData = function(a) {
1701 return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType
1704 m.accepts = g.acceptData;
1707 if (!m.accepts(a)) return 0;
1708 var b = {}, c = a[this.expando];
1714 }, Object.defineProperties(a,
1717 b[this.expando] = c, g.extend(a, b)
1720 this.cache[c] || (this.cache[c] = {});
1723 set: function(a, b, c) {
1726 var e = this.cache[a];
1727 if ("string" === typeof b) e[b] = c;
1728 else if (g.isEmptyObject(e)) g.extend(this.cache[a], b);
1730 for (d in b) e[d] = b[d];
1733 get: function(a, b) {
1734 var c = this.cache[this.key(a)];
1735 return void 0 === b ? c : c[b]
1737 access: function(a, b, c) {
1738 if (void 0 === b || b && "string" === typeof b && void 0 === c) return c = this.get(a, b), void 0 !== c ? c : this.get(a, g.camelCase(b));
1743 remove: function(a, b) {
1746 var e = this.cache[c];
1747 if (void 0 === b) this.cache[c] = {};
1749 for (g.isArray(b) ? d = b.concat(b.map(g.camelCase)) : (c = g.camelCase(b), b in e ? d = [b, c] : (d = c, d = d in e ? [d] : d.match(ca) || [])), c = d.length; c--;) delete e[d[c]]
1751 hasData: function(a) {
1752 return !g.isEmptyObject(this.cache[a[this.expando]] || {})
1754 discard: function(a) {
1755 a[this.expando] && delete this.cache[a[this.expando]]
1760 kb = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
1763 hasData: function(a) {
1764 return U.hasData(a) ||
1767 data: function(a, b, c) {
1768 return U.access(a, b, c)
1770 removeData: function(a, b) {
1773 _data: function(a, b, c) {
1774 return F.access(a, b, c)
1776 _removeData: function(a, b) {
1781 data: function(a, b) {
1782 var c, d, e, h = this[0],
1783 f = h && h.attributes;
1785 if (this.length && (e = U.get(h), 1 === h.nodeType && !F.get(h, "hasDataAttrs"))) {
1786 for (c = f.length; c--;) d = f[c].name, 0 === d.indexOf("data-") && (d = g.camelCase(d.slice(5)), s(h, d, e[d]));
1787 F.set(h, "hasDataAttrs", !0)
1791 return "object" === typeof a ?
1792 this.each(function() {
1794 }) : fa(this, function(b) {
1795 var c, d = g.camelCase(a);
1796 if (h && void 0 === b) {
1798 if (void 0 !== c) return c;
1800 if (void 0 !== c) return c;
1801 c = s(h, d, void 0);
1802 if (void 0 !== c) return c
1803 } else this.each(function() {
1804 var c = U.get(this, d);
1805 U.set(this, d, b); - 1 !== a.indexOf("-") && void 0 !== c && U.set(this, a, b)
1807 }, null, b, 1 < arguments.length, null, !0)
1809 removeData: function(a) {
1810 return this.each(function() {
1816 queue: function(a, b, c) {
1818 if (a) return b = (b || "fx") + "queue",
1819 d = F.get(a, b), c && (!d || g.isArray(c) ? d = F.access(a, b, g.makeArray(c)) : d.push(c)), d || []
1821 dequeue: function(a, b) {
1823 var c = g.queue(a, b),
1826 h = g._queueHooks(a, b),
1830 "inprogress" === e && (e = c.shift(), d--);
1831 e && ("fx" === b && c.unshift("inprogress"), delete h.stop, e.call(a, f, h));
1832 !d && h && h.empty.fire()
1834 _queueHooks: function(a, b) {
1835 var c = b + "queueHooks";
1836 return F.get(a, c) || F.access(a, c, {
1837 empty: g.Callbacks("once memory").add(function() {
1838 F.remove(a, [b + "queue", c])
1847 "string" !== typeof a && (b = a, a = "fx", c--);
1848 return arguments.length < c ? g.queue(this[0], a) : void 0 === b ? this : this.each(function() {
1849 var c = g.queue(this, a, b);
1850 g._queueHooks(this, a);
1851 "fx" === a && "inprogress" !== c[0] && g.dequeue(this, a)
1854 dequeue: function(a) {
1855 return this.each(function() {
1859 clearQueue: function(a) {
1860 return this.queue(a || "fx", [])
1862 promise: function(a, b) {
1868 --d || e.resolveWith(h, [h])
1870 "string" !== typeof a && (b = a, a = void 0);
1872 a || "fx"; f--;)(c = F.get(h[f], a + "queueHooks")) && c.empty && (d++, c.empty.add(n));
1877 var qa = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
1878 ha = ["Top", "Right", "Bottom", "Left"],
1879 ma = function(a, b) {
1881 return "none" === g.css(a, "display") || !g.contains(a.ownerDocument, a)
1882 }, Sa = /^(?:checkbox|radio)$/i;
1884 var a = M.createDocumentFragment().appendChild(M.createElement("div"));
1885 a.innerHTML = "<input type='radio' checked='checked' name='t'/>";
1886 Q.checkClone = a.cloneNode(!0).cloneNode(!0).lastChild.checked;
1887 a.innerHTML = "<textarea>x</textarea>";
1888 Q.noCloneChecked = !! a.cloneNode(!0).lastChild.defaultValue
1890 Q.focusinBubbles = "onfocusin" in d;
1892 yb = /^(?:mouse|contextmenu)|click/,
1893 Ta = /^(?:focusinfocus|focusoutblur)$/,
1894 Ua = /^([^.]*)(?:\.(.+)|)$/;
1897 add: function(a, b, c, d, e) {
1898 var h, f, n, q, v, k, t, r, m;
1900 for (c.handler && (h = c, c = h.handler, e = h.selector), c.guid || (c.guid = g.guid++), (q = v.events) || (q = v.events = {}), (f = v.handle) || (f = v.handle = function(b) {
1901 return "undefined" !== typeof g && g.event.triggered !==
1902 b.type ? g.event.dispatch.apply(a, arguments) : void 0
1903 }), b = (b || "").match(ca) || [""], v = b.length; v--;) n = Ua.exec(b[v]) || [], r = k = n[1], m = (n[2] || "").split(".").sort(), r && (n = g.event.special[r] || {}, r = (e ? n.delegateType : n.bindType) || r, n = g.event.special[r] || {}, k = g.extend({
1910 needsContext: e && g.expr.match.needsContext.test(e),
1911 namespace: m.join(".")
1912 }, h), (t = q[r]) || (t = q[r] = [], t.delegateCount = 0, n.setup && !1 !== n.setup.call(a, d, m, f) || a.addEventListener && a.addEventListener(r,
1913 f, !1)), n.add && (n.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)), e ? t.splice(t.delegateCount++, 0, k) : t.push(k), g.event.global[r] = !0)
1915 remove: function(a, b, c, d, e) {
1916 var h, f, n, q, v, k, t, r, m, L, B, J = F.hasData(a) && F.get(a);
1917 if (J && (q = J.events)) {
1918 b = (b || "").match(ca) || [""];
1919 for (v = b.length; v--;)
1920 if (n = Ua.exec(b[v]) || [], m = B = n[1], L = (n[2] || "").split(".").sort(), m) {
1921 t = g.event.special[m] || {};
1922 m = (d ? t.delegateType : t.bindType) || m;
1924 n = n[2] && new RegExp("(^|\\.)" + L.join("\\.(?:.*\\.|)") + "(\\.|$)");
1925 for (f = h = r.length; h--;) k =
1926 r[h], !e && B !== k.origType || c && c.guid !== k.guid || n && !n.test(k.namespace) || d && !(d === k.selector || "**" === d && k.selector) || (r.splice(h, 1), k.selector && r.delegateCount--, t.remove && t.remove.call(a, k));
1927 f && !r.length && (t.teardown && !1 !== t.teardown.call(a, L, J.handle) || g.removeEvent(a, m, J.handle), delete q[m])
1929 for (m in q) g.event.remove(a, m + b[v], c, d, !0);
1930 g.isEmptyObject(q) && (delete J.handle, F.remove(a, "events"))
1933 trigger: function(a, b, c, e) {
1934 var h, f, n, q, v, k, t = [c || M],
1935 r = Ha.call(a, "type") ? a.type : a;
1936 k = Ha.call(a, "namespace") ?
1937 a.namespace.split(".") : [];
1939 if (3 !== c.nodeType && 8 !== c.nodeType && !Ta.test(r + g.event.triggered) && (0 <= r.indexOf(".") && (k = r.split("."), r = k.shift(), k.sort()), q = 0 > r.indexOf(":") && "on" + r, a = a[g.expando] ? a : new g.Event(r, "object" === typeof a && a), a.isTrigger = e ? 2 : 3, a.namespace = k.join("."), a.namespace_re = a.namespace ? new RegExp("(^|\\.)" + k.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, a.result = void 0, a.target || (a.target = c), b = null == b ? [a] : g.makeArray(b, [a]), k = g.event.special[r] || {}, e || !k.trigger || !1 !== k.trigger.apply(c,
1941 if (!e && !k.noBubble && !g.isWindow(c)) {
1942 n = k.delegateType || r;
1943 Ta.test(n + r) || (f = f.parentNode);
1944 for (; f; f = f.parentNode) t.push(f), h = f;
1945 h === (c.ownerDocument || M) && t.push(h.defaultView || h.parentWindow || d)
1948 (f = t[h++]) && !a.isPropagationStopped();) a.type = 1 < h ? n : k.bindType || r, (v = (F.get(f, "events") || {})[a.type] && F.get(f, "handle")) && v.apply(f, b), (v = q && f[q]) && v.apply && g.acceptData(f) && (a.result = v.apply(f, b), !1 === a.result && a.preventDefault());
1950 e || a.isDefaultPrevented() || k._default && !1 !== k._default.apply(t.pop(),
1951 b) || !g.acceptData(c) || !q || !g.isFunction(c[r]) || g.isWindow(c) || ((h = c[q]) && (c[q] = null), g.event.triggered = r, c[r](), g.event.triggered = void 0, h && (c[q] = h));
1955 dispatch: function(a) {
1957 var b, c, d, e, h = [],
1958 f = ea.call(arguments);
1959 b = (F.get(this, "events") || {})[a.type] || [];
1960 var n = g.event.special[a.type] || {};
1962 a.delegateTarget = this;
1963 if (!n.preDispatch || !1 !== n.preDispatch.call(this, a)) {
1964 h = g.event.handlers.call(this, a, b);
1966 (e = h[b++]) && !a.isPropagationStopped();)
1967 for (a.currentTarget =
1969 (d = e.handlers[c++]) && !a.isImmediatePropagationStopped();)
1970 if (!a.namespace_re || a.namespace_re.test(d.namespace)) a.handleObj = d, a.data = d.data, d = ((g.event.special[d.origType] || {}).handle || d.handler).apply(e.elem, f), void 0 !== d && !1 === (a.result = d) && (a.preventDefault(), a.stopPropagation());
1971 n.postDispatch && n.postDispatch.call(this, a);
1975 handlers: function(a, b) {
1976 var c, d, e, h, f = [],
1977 n = b.delegateCount,
1979 if (n && q.nodeType && (!a.button || "click" !== a.type))
1980 for (; q !== this; q = q.parentNode ||
1982 if (!0 !== q.disabled || "click" !== a.type) {
1984 for (c = 0; c < n; c++) h = b[c], e = h.selector + " ", void 0 === d[e] && (d[e] = h.needsContext ? 0 <= g(e, this).index(q) : g.find(e, this, null, [q]).length), d[e] && d.push(h);
1985 d.length && f.push({
1990 n < b.length && f.push({
1992 handlers: b.slice(n)
1996 props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
1999 props: ["char", "charCode", "key", "keyCode"],
2002 null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode);
2007 props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
2008 filter: function(a, b) {
2009 var c, d, e = b.button;
2010 null == a.pageX && null != b.clientX && (c = a.target.ownerDocument || M, d = c.documentElement, c = c.body, a.pageX = b.clientX + (d && d.scrollLeft || c && c.scrollLeft || 0) - (d && d.clientLeft || c && c.clientLeft || 0), a.pageY = b.clientY + (d && d.scrollTop || c && c.scrollTop || 0) - (d && d.clientTop || c && c.clientTop ||
2012 a.which || void 0 === e || (a.which = e & 1 ? 1 : e & 2 ? 3 : e & 4 ? 2 : 0);
2017 if (a[g.expando]) return a;
2021 h = this.fixHooks[b];
2022 h || (this.fixHooks[b] = h = yb.test(b) ? this.mouseHooks : xb.test(b) ? this.keyHooks : {});
2023 d = h.props ? this.props.concat(h.props) : this.props;
2025 for (b = d.length; b--;) c = d[b], a[c] = e[c];
2026 a.target || (a.target = M);
2027 3 === a.target.nodeType && (a.target = a.target.parentNode);
2028 return h.filter ? h.filter(a, e) : a
2035 trigger: function() {
2037 p() && this.focus) return this.focus(), !1
2039 delegateType: "focusin"
2042 trigger: function() {
2043 if (this === p() && this.blur) return this.blur(), !1
2045 delegateType: "focusout"
2048 trigger: function() {
2049 if ("checkbox" === this.type && this.click && g.nodeName(this, "input")) return this.click(), !1
2051 _default: function(a) {
2052 return g.nodeName(a.target, "a")
2056 postDispatch: function(a) {
2057 void 0 !== a.result && (a.originalEvent.returnValue = a.result)
2061 simulate: function(a, b, c, d) {
2062 a = g.extend(new g.Event, c, {
2067 d ? g.event.trigger(a, null, b) : g.event.dispatch.call(b, a);
2068 a.isDefaultPrevented() && c.preventDefault()
2071 g.removeEvent = function(a, b, c) {
2072 a.removeEventListener && a.removeEventListener(b, c, !1)
2074 g.Event = function(a, b) {
2075 if (!(this instanceof g.Event)) return new g.Event(a, b);
2076 a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || void 0 === a.defaultPrevented && a.getPreventDefault && a.getPreventDefault() ? u : x) : this.type = a;
2077 b && g.extend(this, b);
2078 this.timeStamp = a && a.timeStamp ||
2080 this[g.expando] = !0
2082 g.Event.prototype = {
2083 isDefaultPrevented: x,
2084 isPropagationStopped: x,
2085 isImmediatePropagationStopped: x,
2086 preventDefault: function() {
2087 var a = this.originalEvent;
2088 this.isDefaultPrevented = u;
2089 a && a.preventDefault && a.preventDefault()
2091 stopPropagation: function() {
2092 var a = this.originalEvent;
2093 this.isPropagationStopped = u;
2094 a && a.stopPropagation && a.stopPropagation()
2096 stopImmediatePropagation: function() {
2097 this.isImmediatePropagationStopped = u;
2098 this.stopPropagation()
2102 mouseenter: "mouseover",
2103 mouseleave: "mouseout"
2106 g.event.special[a] = {
2109 handle: function(a) {
2110 var c, d = a.relatedTarget,
2112 if (!d || d !== this && !g.contains(this, d)) a.type = l.origType, c = l.handler.apply(this, arguments), a.type = b;
2117 Q.focusinBubbles || g.each({
2121 var c = function(a) {
2122 g.event.simulate(b, a.target, g.event.fix(a), !0)
2124 g.event.special[b] = {
2126 var d = this.ownerDocument || this,
2128 e || d.addEventListener(a, c, !0);
2129 F.access(d, b, (e || 0) +
2132 teardown: function() {
2133 var d = this.ownerDocument || this,
2134 e = F.access(d, b) - 1;
2135 e ? F.access(d, b, e) : (d.removeEventListener(a, c, !0), F.remove(d, b))
2140 on: function(a, b, c, d, e) {
2142 if ("object" === typeof a) {
2143 "string" !== typeof b && (c = c || b, b = void 0);
2144 for (f in a) this.on(f, b, c, a[f], e);
2147 null == c && null == d ? (d = b, c = b = void 0) : null == d && ("string" === typeof b ? (d = c, c = void 0) : (d = c, c = b, b = void 0));
2148 if (!1 === d) d = x;
2149 else if (!d) return this;
2150 1 === e && (h = d, d = function(a) {
2152 return h.apply(this, arguments)
2154 h.guid || (h.guid = g.guid++));
2155 return this.each(function() {
2156 g.event.add(this, a, d, c, b)
2159 one: function(a, b, c, d) {
2160 return this.on(a, b, c, d, 1)
2162 off: function(a, b, c) {
2164 if (a && a.preventDefault && a.handleObj) return d = a.handleObj, g(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this;
2165 if ("object" === typeof a) {
2166 for (d in a) this.off(d, b, a[d]);
2169 if (!1 === b || "function" === typeof b) c = b, b = void 0;
2170 !1 === c && (c = x);
2171 return this.each(function() {
2172 g.event.remove(this, a, c, b)
2175 trigger: function(a, b) {
2176 return this.each(function() {
2177 g.event.trigger(a, b, this)
2180 triggerHandler: function(a, b) {
2182 if (c) return g.event.trigger(a, b, c, !0)
2185 var Va = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
2188 Ab = /<(?:script|style|link)/i,
2189 Bb = /checked\s*(?:[^=]|=\s*.checked.)/i,
2190 Xa = /^$|\/(?:java|ecma)script/i,
2192 Cb = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
2194 option: [1, "<select multiple='multiple'>", "</select>"],
2196 "<table>", "</table>"
2198 col: [2, "<table><colgroup>", "</colgroup></table>"],
2199 tr: [2, "<table><tbody>", "</tbody></table>"],
2200 td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
2201 _default: [0, "", ""]
2203 V.optgroup = V.option;
2204 V.tbody = V.tfoot = V.colgroup = V.caption = V.thead;
2207 clone: function(a, b, c) {
2208 var d, e, f, q, k = a.cloneNode(!0),
2209 r = g.contains(a.ownerDocument, a);
2210 if (!(Q.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || g.isXMLDoc(a)))
2211 for (q = v(k), f = v(a), d = 0, e = f.length; d < e; d++) {
2214 L = m.nodeName.toLowerCase();
2215 if ("input" === L && Sa.test(t.type)) m.checked = t.checked;
2216 else if ("input" === L || "textarea" === L) m.defaultValue = t.defaultValue
2220 for (f = f || v(a), q = q || v(k), d = 0, e = f.length; d < e; d++) n(f[d], q[d]);
2223 0 < q.length && h(q, !r && v(a, "script"));
2226 buildFragment: function(a, b, c, d) {
2227 for (var e, f, n, q = b.createDocumentFragment(), k = [], t = 0, r = a.length; t < r; t++)
2228 if ((e = a[t]) || 0 === e)
2229 if ("object" === g.type(e)) g.merge(k, e.nodeType ? [e] : e);
2230 else if (zb.test(e)) {
2231 f = f || q.appendChild(b.createElement("div"));
2232 n = (Wa.exec(e) || ["", ""])[1].toLowerCase();
2233 n = V[n] || V._default;
2234 f.innerHTML = n[1] + e.replace(Va, "<$1></$2>") + n[2];
2235 for (n = n[0]; n--;) f = f.lastChild;
2236 g.merge(k, f.childNodes);
2239 } else k.push(b.createTextNode(e));
2241 for (t = 0; e = k[t++];)
2242 if (!d || -1 === g.inArray(e, d))
2243 if (a = g.contains(e.ownerDocument, e), f = v(q.appendChild(e), "script"), a && h(f), c)
2244 for (n = 0; e = f[n++];) Xa.test(e.type || "") && c.push(e);
2247 cleanData: function(a) {
2248 for (var b, c, d, e, h, f, n = g.event.special, q = 0; void 0 !== (c = a[q]); q++) {
2249 if (g.acceptData(c) &&
2250 (h = c[F.expando]) && (b = F.cache[h])) {
2251 d = Object.keys(b.events || {});
2253 for (f = 0; void 0 !== (e = d[f]); f++) n[e] ? g.event.remove(c, e) : g.removeEvent(c, e, b.handle);
2254 F.cache[h] && delete F.cache[h]
2256 delete U.cache[c[U.expando]]
2262 return fa(this, function(a) {
2263 return void 0 === a ? g.text(this) : this.empty().each(function() {
2264 if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) this.textContent = a
2266 }, null, a, arguments.length)
2268 append: function() {
2269 return this.domManip(arguments, function(a) {
2271 this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || q(this, a).appendChild(a)
2274 prepend: function() {
2275 return this.domManip(arguments, function(a) {
2276 if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
2278 b.insertBefore(a, b.firstChild)
2282 before: function() {
2283 return this.domManip(arguments, function(a) {
2284 this.parentNode && this.parentNode.insertBefore(a, this)
2288 return this.domManip(arguments, function(a) {
2289 this.parentNode && this.parentNode.insertBefore(a, this.nextSibling)
2292 remove: function(a, b) {
2293 for (var c, d = a ? g.filter(a, this) : this, e = 0; null != (c = d[e]); e++) b || 1 !== c.nodeType || g.cleanData(v(c)), c.parentNode && (b && g.contains(c.ownerDocument, c) && h(v(c, "script")), c.parentNode.removeChild(c));
2297 for (var a, b = 0; null != (a = this[b]); b++) 1 === a.nodeType && (g.cleanData(v(a, !1)), a.textContent = "");
2300 clone: function(a, b) {
2301 a = null == a ? !1 : a;
2302 b = null == b ? a : b;
2303 return this.map(function() {
2304 return g.clone(this, a, b)
2308 return fa(this, function(a) {
2310 this[0] || {}, c = 0,
2312 if (void 0 === a && 1 === b.nodeType) return b.innerHTML;
2313 if ("string" === typeof a && !Ab.test(a) && !V[(Wa.exec(a) || ["", ""])[1].toLowerCase()]) {
2314 a = a.replace(Va, "<$1></$2>");
2316 for (; c < d; c++) b = this[c] || {}, 1 === b.nodeType && (g.cleanData(v(b, !1)), b.innerHTML = a);
2320 b && this.empty().append(a)
2321 }, null, a, arguments.length)
2323 replaceWith: function() {
2324 var a = arguments[0];
2325 this.domManip(arguments, function(b) {
2326 a = this.parentNode;
2327 g.cleanData(v(this));
2328 a && a.replaceChild(b, this)
2330 return a && (a.length ||
2331 a.nodeType) ? this : this.remove()
2333 detach: function(a) {
2334 return this.remove(a, !0)
2336 domManip: function(a, b) {
2337 a = ra.apply([], a);
2338 var c, d, e, h, f = 0,
2343 m = g.isFunction(r);
2344 if (m || 1 < n && "string" === typeof r && !Q.checkClone && Bb.test(r)) return this.each(function(c) {
2346 m && (a[0] = r.call(this, c, d.html()));
2349 if (n && (c = g.buildFragment(a, this[0].ownerDocument, !1, this), d = c.firstChild, 1 === c.childNodes.length && (c = d), d)) {
2350 d = g.map(v(c, "script"), t);
2351 for (e = d.length; f < n; f++) h = c, f !==
2352 k && (h = g.clone(h, !0, !0), e && g.merge(d, v(h, "script"))), b.call(this[f], h, f);
2354 for (c = d[d.length - 1].ownerDocument, g.map(d, B), f = 0; f < e; f++) h = d[f], Xa.test(h.type || "") && !F.access(h, "globalEval") && g.contains(c, h) && (h.src ? g._evalUrl && g._evalUrl(h.src) : g.globalEval(h.textContent.replace(Cb, "")))
2361 prependTo: "prepend",
2362 insertBefore: "before",
2363 insertAfter: "after",
2364 replaceAll: "replaceWith"
2366 g.fn[a] = function(a) {
2367 for (var c = [], d = g(a), e = d.length - 1, h = 0; h <= e; h++) a = h ===
2368 e ? this : this.clone(!0), g(d[h])[b](a), Ga.apply(c, a.get());
2369 return this.pushStack(c)
2372 var va, Na = {}, Oa = /^margin/,
2373 Ea = new RegExp("^(" + qa + ")(?!px)[a-z%]+$", "i"),
2375 return a.ownerDocument.defaultView.getComputedStyle(a, null)
2379 f.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%";
2381 var l = d.getComputedStyle(f, null);
2383 c = "4px" === l.width;
2386 var b, c, e = M.documentElement,
2387 h = M.createElement("div"),
2388 f = M.createElement("div");
2389 f.style.backgroundClip = "content-box";
2390 f.cloneNode(!0).style.backgroundClip = "";
2391 Q.clearCloneStyle = "content-box" === f.style.backgroundClip;
2392 h.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
2394 d.getComputedStyle && g.extend(Q, {
2395 pixelPosition: function() {
2399 boxSizingReliable: function() {
2403 reliableMarginRight: function() {
2405 a = f.appendChild(M.createElement("div"));
2406 a.style.cssText = f.style.cssText = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box";
2407 a.style.marginRight = a.style.width = "0";
2408 f.style.width = "1px";
2410 a = !parseFloat(d.getComputedStyle(a, null).marginRight);
2417 g.swap = function(a, b, c, d) {
2419 for (e in b) h[e] = a.style[e], a.style[e] = b[e];
2420 c = c.apply(a, d || []);
2421 for (e in b) a.style[e] = h[e];
2424 var Db = /^(none|table(?!-c[ea]).+)/,
2425 mb = new RegExp("^(" + qa + ")(.*)$", "i"),
2426 Eb = new RegExp("^([+-])=(" + qa + ")", "i"),
2428 position: "absolute",
2429 visibility: "hidden",
2434 }, Pa = ["Webkit", "O", "Moz", "ms"];
2438 get: function(a, b) {
2440 var c = A(a, "opacity");
2441 return "" === c ? "1" : c
2463 if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) {
2464 var e, h, f, n = g.camelCase(b),
2466 b = g.cssProps[n] || (g.cssProps[n] = r(q, n));
2467 f = g.cssHooks[b] || g.cssHooks[n];
2468 if (void 0 !== c) h = typeof c, "string" === h && (e = Eb.exec(c)) && (c = (e[1] + 1) * e[2] + parseFloat(g.css(a, b)), h = "number"), null != c && c === c && ("number" !== h || g.cssNumber[n] || (c += "px"), Q.clearCloneStyle || "" !== c || 0 !== b.indexOf("background") || (q[b] = "inherit"), f && "set" in f && void 0 === (c = f.set(a, c, d)) || (q[b] = "", q[b] = c));
2469 else return f && "get" in f && void 0 !== (e = f.get(a, !1, d)) ? e : q[b]
2472 css: function(a, b, c, d) {
2475 b = g.cssProps[h] || (g.cssProps[h] = r(a.style, h));
2476 (h = g.cssHooks[b] || g.cssHooks[h]) && "get" in h && (e = h.get(a, !0, c));
2477 void 0 === e && (e = A(a, b, d));
2478 "normal" === e && b in Ya && (e = Ya[b]);
2479 return "" === c || c ? (a = parseFloat(e), !0 === c || g.isNumeric(a) ? a || 0 : e) : e
2482 g.each(["height", "width"], function(a, b) {
2484 get: function(a, c, d) {
2485 if (c) return 0 === a.offsetWidth && Db.test(g.css(a, "display")) ? g.swap(a, Fb, function() {
2492 return J(a, c, d ? D(a, b, d, "border-box" === g.css(a, "boxSizing", !1, e), e) : 0)
2496 g.cssHooks.marginRight = y(Q.reliableMarginRight, function(a, b) {
2497 if (b) return g.swap(a, {
2498 display: "inline-block"
2499 }, A, [a, "marginRight"])
2506 g.cssHooks[a + b] = {
2507 expand: function(c) {
2510 for (c = "string" === typeof c ? c.split(" ") : [c]; 4 > d; d++) e[a + ha[d] + b] = c[d] || c[d - 2] || c[0];
2514 Oa.test(a) || (g.cssHooks[a + b].set = J)
2517 css: function(a, b) {
2520 var d, e = {}, h = 0;
2523 for (d = b.length; h < d; h++) e[b[h]] = g.css(a, b[h], !1, c);
2526 return void 0 !== c ? g.style(a, b, c) : g.css(a, b)
2527 }, a, b, 1 < arguments.length)
2535 toggle: function(a) {
2536 return "boolean" === typeof a ? a ? this.show() : this.hide() : this.each(function() {
2537 ma(this) ? g(this).show() : g(this).hide()
2544 init: function(a, b, c, d, e, h) {
2547 this.easing = e || "swing";
2550 this.start = this.now = this.cur();
2552 this.unit = h || (g.cssNumber[c] ? "" : "px")
2555 var a = w.propHooks[this.prop];
2556 return a && a.get ? a.get(this) : w.propHooks._default.get(this)
2559 var b, c = w.propHooks[this.prop];
2560 this.pos = this.options.duration ? b = g.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : b = a;
2561 this.now = (this.end - this.start) * b + this.start;
2562 this.options.step && this.options.step.call(this.elem, this.now, this);
2563 c && c.set ? c.set(this) : w.propHooks._default.set(this);
2567 w.prototype.init.prototype = w.prototype;
2571 return null == a.elem[a.prop] || a.elem.style && null != a.elem.style[a.prop] ? (a = g.css(a.elem, a.prop, "")) && "auto" !== a ? a : 0 : a.elem[a.prop]
2574 if (g.fx.step[a.prop]) g.fx.step[a.prop](a);
2575 else a.elem.style && (null != a.elem.style[g.cssProps[a.prop]] || g.cssHooks[a.prop]) ? g.style(a.elem, a.prop, a.now + a.unit) : a.elem[a.prop] = a.now
2579 w.propHooks.scrollTop = w.propHooks.scrollLeft = {
2581 a.elem.nodeType && a.elem.parentNode &&
2582 (a.elem[a.prop] = a.now)
2586 linear: function(a) {
2589 swing: function(a) {
2590 return 0.5 - Math.cos(a * Math.PI) / 2
2593 g.fx = w.prototype.init;
2595 var ia, Ba, Gb = /^(?:toggle|show|hide)$/,
2596 Za = new RegExp("^(?:([+-])=|)(" + qa + ")([a-z%]*)$", "i"),
2600 var d, e, h, f, n, q = this,
2601 v = {}, k = a.style,
2602 t = a.nodeType && ma(a),
2603 r = F.get(a, "fxshow");
2604 c.queue || (f = g._queueHooks(a, "fx"), null == f.unqueued && (f.unqueued = 0, n = f.empty.fire, f.empty.fire = function() {
2606 }), f.unqueued++, q.always(function() {
2607 q.always(function() {
2609 g.queue(a, "fx").length || f.empty.fire()
2612 1 === a.nodeType && ("height" in b || "width" in b) && (c.overflow = [k.overflow, k.overflowX, k.overflowY], e = g.css(a, "display"), "none" === e && (e = N(a.nodeName)), "inline" === e && "none" === g.css(a, "float") && (k.display = "inline-block"));
2613 c.overflow && (k.overflow = "hidden", q.always(function() {
2614 k.overflow = c.overflow[0];
2615 k.overflowX = c.overflow[1];
2616 k.overflowY = c.overflow[2]
2619 if (e = b[d], Gb.exec(e)) {
2621 h = h || "toggle" === e;
2622 if (e === (t ? "hide" : "show"))
2623 if ("show" === e && r && void 0 !==
2626 v[d] = r && r[d] || g.style(a, d)
2628 if (!g.isEmptyObject(v))
2629 for (d in r ? "hidden" in r && (t = r.hidden) : r = F.access(a, "fxshow", {}), h && (r.hidden = !t), t ? g(a).show() : q.done(function() {
2631 }), q.done(function() {
2633 F.remove(a, "fxshow");
2634 for (b in v) g.style(a, b, v[b])
2635 }), v) b = K(t ? r[d] : 0, d, q), d in r || (r[d] = b.start, t && (b.end = b.start, b.start = "width" === d || "height" === d ? 1 : 0))
2641 var c = this.createTween(a, b),
2644 h = e && e[3] || (g.cssNumber[a] ? "" : "px"),
2645 f = (g.cssNumber[a] ||
2646 "px" !== h && +d) && Za.exec(g.css(c.elem, a)),
2649 if (f && f[3] !== h) {
2653 do n = n || ".5", f /= n, g.style(c.elem, a, f + h); while (n !== (n = c.cur() / d) && 1 !== n && --q)
2655 e && (f = c.start = +f || +d || 0, c.unit = h, c.end = e[1] ? f + (e[1] + 1) * e[2] : +e[2]);
2660 g.Animation = g.extend(I, {
2661 tweener: function(a, b) {
2662 g.isFunction(a) ? (b = a, a = ["*"]) : a = a.split(" ");
2663 for (var c, d = 0, e = a.length; d < e; d++) c = a[d], ja[c] = ja[c] || [], ja[c].unshift(b)
2665 prefilter: function(a, b) {
2666 b ? xa.unshift(a) : xa.push(a)
2669 g.speed = function(a, b, c) {
2670 var d = a && "object" ===
2671 typeof a ? g.extend({}, a) : {
2672 complete: c || !c && b || g.isFunction(a) && a,
2674 easing: c && b || b && !g.isFunction(b) && b
2676 d.duration = g.fx.off ? 0 : "number" === typeof d.duration ? d.duration : d.duration in g.fx.speeds ? g.fx.speeds[d.duration] : g.fx.speeds._default;
2677 if (null == d.queue || !0 === d.queue) d.queue = "fx";
2679 d.complete = function() {
2680 g.isFunction(d.old) && d.old.call(this);
2681 d.queue && g.dequeue(this, d.queue)
2686 fadeTo: function(a, b, c, d) {
2687 return this.filter(ma).css("opacity", 0).show().end().animate({
2692 animate: function(a, b, c, d) {
2693 var e = g.isEmptyObject(a),
2694 h = g.speed(b, c, d);
2696 var b = I(this, g.extend({}, a), h);
2697 (e || F.get(this, "finish")) && b.stop(!0)
2700 return e || !1 === h.queue ? this.each(b) : this.queue(h.queue, b)
2702 stop: function(a, b, c) {
2703 var d = function(a) {
2708 "string" !== typeof a && (c = b, b = a, a = void 0);
2709 b && !1 !== a && this.queue(a || "fx", []);
2710 return this.each(function() {
2712 e = null != a && a + "queueHooks",
2715 if (e) f[e] && f[e].stop && d(f[e]);
2717 for (e in f) f[e] &&
2718 f[e].stop && Hb.test(e) && d(f[e]);
2719 for (e = h.length; e--;) h[e].elem !== this || null != a && h[e].queue !== a || (h[e].anim.stop(c), b = !1, h.splice(e, 1));
2720 !b && c || g.dequeue(this, a)
2723 finish: function(a) {
2724 !1 !== a && (a = a || "fx");
2725 return this.each(function() {
2726 var b, c = F.get(this),
2728 b = c[a + "queueHooks"];
2730 h = d ? d.length : 0;
2732 g.queue(this, a, []);
2733 b && b.stop && b.stop.call(this, !0);
2734 for (b = e.length; b--;) e[b].elem === this && e[b].queue === a && (e[b].anim.stop(!0), e.splice(b, 1));
2735 for (b = 0; b < h; b++) d[b] && d[b].finish && d[b].finish.call(this);
2740 g.each(["toggle", "show", "hide"], function(a, b) {
2742 g.fn[b] = function(a, d, e) {
2743 return null == a || "boolean" === typeof a ? c.apply(this, arguments) : this.animate(H(b, !0), a, d, e)
2747 slideDown: H("show"),
2749 slideToggle: H("toggle"),
2760 g.fn[a] = function(a, c, d) {
2761 return this.animate(b, a, c, d)
2765 g.fx.tick = function() {
2768 for (ia = g.now(); b < c.length; b++) a =
2769 c[b], a() || c[b] !== a || c.splice(b--, 1);
2770 c.length || g.fx.stop();
2773 g.fx.timer = function(a) {
2775 a() ? g.fx.start() : g.timers.pop()
2778 g.fx.start = function() {
2779 Ba || (Ba = setInterval(g.fx.tick, g.fx.interval))
2781 g.fx.stop = function() {
2790 g.fn.delay = function(a, b) {
2791 a = g.fx ? g.fx.speeds[a] || a : a;
2792 return this.queue(b || "fx", function(b, c) {
2793 var d = setTimeout(b, a);
2794 c.stop = function() {
2800 var a = M.createElement("input"),
2801 b = M.createElement("select"),
2802 c = b.appendChild(M.createElement("option"));
2803 a.type = "checkbox";
2804 Q.checkOn = "" !== a.value;
2805 Q.optSelected = c.selected;
2807 Q.optDisabled = !c.disabled;
2808 a = M.createElement("input");
2811 Q.radioValue = "t" === a.value
2813 var $a, ga = g.expr.attrHandle;
2815 attr: function(a, b) {
2816 return fa(this, g.attr, a, b, 1 < arguments.length)
2818 removeAttr: function(a) {
2819 return this.each(function() {
2820 g.removeAttr(this, a)
2825 attr: function(a, b, c) {
2826 var d, e, h = a.nodeType;
2828 3 !== h && 8 !== h && 2 !== h) {
2829 if ("undefined" === typeof a.getAttribute) return g.prop(a, b, c);
2830 1 === h && g.isXMLDoc(a) || (b = b.toLowerCase(), d = g.attrHooks[b] || (g.expr.match.bool.test(b) ? $a : void 0));
2832 if (null === c) g.removeAttr(a, b);
2834 if (d && "set" in d && void 0 !== (e = d.set(a, c, b))) return e;
2835 a.setAttribute(b, c + "");
2838 if (d && "get" in d && null !== (e = d.get(a, b))) return e;
2839 e = g.find.attr(a, b);
2840 return null == e ? void 0 : e
2844 removeAttr: function(a, b) {
2846 h = b && b.match(ca);
2847 if (h && 1 === a.nodeType)
2848 for (; c = h[e++];) d =
2849 g.propFix[c] || c, g.expr.match.bool.test(c) && (a[d] = !1), a.removeAttribute(c)
2853 set: function(a, b) {
2854 if (!Q.radioValue && "radio" === b && g.nodeName(a, "input")) {
2856 a.setAttribute("type", b);
2865 set: function(a, b, c) {
2866 !1 === b ? g.removeAttr(a, c) : a.setAttribute(c, c);
2870 g.each(g.expr.match.bool.source.match(/\w+/g), function(a, b) {
2871 var c = ga[b] || g.find.attr;
2872 ga[b] = function(a, b, d) {
2874 d || (h = ga[b], ga[b] = e, e = null != c(a, b, d) ? b.toLowerCase() : null, ga[b] = h);
2878 var Ib = /^(?:input|select|textarea|button)$/i;
2880 prop: function(a, b) {
2881 return fa(this, g.prop, a, b, 1 < arguments.length)
2883 removeProp: function(a) {
2884 return this.each(function() {
2885 delete this[g.propFix[a] || a]
2892 "class": "className"
2894 prop: function(a, b, c) {
2897 if (a && 3 !== h && 8 !== h && 2 !== h) {
2898 if (h = 1 !== h || !g.isXMLDoc(a)) b = g.propFix[b] || b, e = g.propHooks[b];
2899 return void 0 !== c ? e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : a[b] = c : e && "get" in e && null !== (d = e.get(a, b)) ?
2906 return a.hasAttribute("tabindex") || Ib.test(a.nodeName) || a.href ? a.tabIndex : -1
2911 Q.optSelected || (g.propHooks.selected = {
2913 (a = a.parentNode) && a.parentNode && a.parentNode.selectedIndex;
2917 g.each("tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable".split(" "), function() {
2918 g.propFix[this.toLowerCase()] = this
2920 var Ia = /[\t\r\n\f]/g;
2922 addClass: function(a) {
2928 if (g.isFunction(a)) return this.each(function(b) {
2929 g(this).addClass(a.call(this, b, this.className))
2932 for (b = (a || "").match(ca) || []; f < n; f++)
2933 if (c = this[f], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ").replace(Ia, " ") : " ")) {
2934 for (h = 0; e = b[h++];) 0 > d.indexOf(" " + e + " ") && (d += e + " ");
2936 c.className !== d && (c.className = d)
2940 removeClass: function(a) {
2942 b = 0 === arguments.length || "string" === typeof a && a;
2945 if (g.isFunction(a)) return this.each(function(b) {
2946 g(this).removeClass(a.call(this,
2950 for (b = (a || "").match(ca) || []; f < n; f++)
2951 if (c = this[f], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ").replace(Ia, " ") : "")) {
2952 for (h = 0; e = b[h++];)
2953 for (; 0 <= d.indexOf(" " + e + " ");) d = d.replace(" " + e + " ", " ");
2954 d = a ? g.trim(d) : "";
2955 c.className !== d && (c.className = d)
2959 toggleClass: function(a, b) {
2961 return "boolean" === typeof b && "string" === c ? b ? this.addClass(a) : this.removeClass(a) : g.isFunction(a) ? this.each(function(c) {
2962 g(this).toggleClass(a.call(this, c, this.className, b), b)
2964 this.each(function() {
2966 for (var b, d = 0, e = g(this), h = a.match(ca) || []; b = h[d++];) e.hasClass(b) ? e.removeClass(b) : e.addClass(b);
2967 else if ("undefined" === c || "boolean" === c) this.className && F.set(this, "__className__", this.className), this.className = this.className || !1 === a ? "" : F.get(this, "__className__") || ""
2970 hasClass: function(a) {
2972 for (var b = 0, c = this.length; b < c; b++)
2973 if (1 === this[b].nodeType && 0 <= (" " + this[b].className + " ").replace(Ia, " ").indexOf(a)) return !0;
2982 if (arguments.length) return d = g.isFunction(a), this.each(function(c) {
2983 1 === this.nodeType && (c = d ? a.call(this, c, g(this).val()) : a, null == c ? c = "" : "number" === typeof c ? c += "" : g.isArray(c) && (c = g.map(c, function(a) {
2984 return null == a ? "" : a + ""
2985 })), b = g.valHooks[this.type] || g.valHooks[this.nodeName.toLowerCase()], b && "set" in b && void 0 !== b.set(this, c, "value") || (this.value = c))
2988 if ((b = g.valHooks[e.type] || g.valHooks[e.nodeName.toLowerCase()]) && "get" in b && void 0 !== (c = b.get(e, "value"))) return c;
2991 typeof c ? c.replace(Jb, "") : null == c ? "" : c
2999 for (var b, c = a.options, d = a.selectedIndex, e = (a = "select-one" === a.type || 0 > d) ? null : [], h = a ? d + 1 : c.length, f = 0 > d ? h : a ? d : 0; f < h; f++)
3000 if (b = c[f], !(!b.selected && f !== d || (Q.optDisabled ? b.disabled : null !== b.getAttribute("disabled")) || b.parentNode.disabled && g.nodeName(b.parentNode, "optgroup"))) {
3007 set: function(a, b) {
3008 for (var c, d, e = a.options, h = g.makeArray(b), f = e.length; f--;)
3009 if (d = e[f], d.selected =
3010 0 <= g.inArray(g(d).val(), h)) c = !0;
3011 c || (a.selectedIndex = -1);
3017 g.each(["radio", "checkbox"], function() {
3018 g.valHooks[this] = {
3019 set: function(a, b) {
3020 if (g.isArray(b)) return a.checked = 0 <= g.inArray(g(a).val(), b)
3023 Q.checkOn || (g.valHooks[this].get = function(a) {
3024 return null === a.getAttribute("value") ? "on" : a.value
3027 g.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),
3029 g.fn[b] = function(a, c) {
3030 return 0 < arguments.length ? this.on(b, null, a, c) : this.trigger(b)
3034 hover: function(a, b) {
3035 return this.mouseenter(a).mouseleave(b || a)
3037 bind: function(a, b, c) {
3038 return this.on(a, null, b, c)
3040 unbind: function(a, b) {
3041 return this.off(a, null, b)
3043 delegate: function(a, b, c, d) {
3044 return this.on(b, a, c, d)
3046 undelegate: function(a, b, c) {
3047 return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c)
3052 g.parseJSON = function(a) {
3053 return JSON.parse(a + "")
3058 if (!a || "string" !== typeof a) return null;
3060 c = new DOMParser, b = c.parseFromString(a, "text/xml")
3064 b && !b.getElementsByTagName("parsererror").length || g.error("Invalid XML: " + a);
3067 var la, Y, Kb = /#.*$/,
3068 ab = /([?&])_=[^&]*/,
3069 Lb = /^(.*?):[ \t]*([^\r\n]*)$/mg,
3070 Mb = /^(?:GET|HEAD)$/,
3072 bb = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
3073 cb = {}, Fa = {}, db = "*/".concat("*");
3077 Y = M.createElement("a"), Y.href = "", Y = Y.href
3079 la = bb.exec(Y.toLowerCase()) || [];
3087 isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(la[1]),
3091 contentType: "application/x-www-form-urlencoded; charset=UTF-8",
3096 xml: "application/xml, text/xml",
3097 json: "application/json, text/javascript"
3106 text: "responseText",
3107 json: "responseJSON"
3112 "text json": g.parseJSON,
3113 "text xml": g.parseXML
3120 ajaxSetup: function(a, b) {
3121 return b ? aa(aa(a, g.ajaxSettings), b) : aa(g.ajaxSettings, a)
3123 ajaxPrefilter: S(cb),
3124 ajaxTransport: S(Fa),
3125 ajax: function(a, b) {
3126 function c(a, b, f, l) {
3131 n && clearTimeout(n);
3134 s.readyState = 0 < a ? 4 : 0;
3135 l = 200 <= a && 300 > a || 304 === a;
3138 for (var D = s, N, C, w, E, u = p.contents, P = p.dataTypes;
3139 "*" === P[0];) P.shift(), void 0 === N && (N = p.mimeType || D.getResponseHeader("Content-Type"));
3142 if (u[C] && u[C].test(N)) {
3146 if (P[0] in f) w = P[0];
3149 if (!P[0] || p.converters[C + " " + P[0]]) {
3157 w ? (w !== P[0] && P.unshift(w), p = f[w]) : p = void 0
3164 var x, G, z, D = {}, u = f.dataTypes.slice();
3166 for (G in f.converters) D[G.toLowerCase()] = f.converters[G];
3167 for (E = u.shift(); E;)
3168 if (f.responseFields[E] && (C[f.responseFields[E]] = N), !z && w && f.dataFilter && (N = f.dataFilter(N, f.dataType)), z = E, E = u.shift())
3169 if ("*" === E) E = z;
3170 else if ("*" !== z && z !== E) {
3172 " " + E] || D["* " + E];
3175 if (p = x.split(" "), p[1] === E && (G = D[z + " " + p[0]] || D["* " + p[0]])) {
3176 !0 === G ? G = D[x] : !0 !== D[x] && (E = p[0], u.unshift(p[1]));
3180 if (G && f["throws"]) N = G(N);
3185 state: "parsererror",
3186 error: G ? aa : "No conversion from " + z + " to " + E
3196 if (l) r.ifModified && ((A = s.getResponseHeader("Last-Modified")) && (g.lastModified[e] = A), (A = s.getResponseHeader("etag")) && (g.etag[e] = A)), 204 === a || "HEAD" === r.type ? A = "nocontent" : 304 === a ? A = "notmodified" :
3197 (A = p.state, q = p.data, k = p.error, l = !k);
3198 else if (k = A, a || !A) A = "error", 0 > a && (a = 0);
3200 s.statusText = (b || A) + "";
3201 l ? L.resolveWith(t, [q, A, s]) : L.rejectWith(t, [s, A, k]);
3204 v && m.trigger(l ? "ajaxSuccess" : "ajaxError", [s, r, l ? q : k]);
3205 B.fireWith(t, [s, A]);
3206 v && (m.trigger("ajaxComplete", [s, r]), --g.active || g.event.trigger("ajaxStop"))
3209 "object" === typeof a && (b = a, a = void 0);
3211 var d, e, h, f, n, q, v, k, r = g.ajaxSetup({}, b),
3213 m = r.context && (t.nodeType || t.jquery) ? g(t) : g.event,
3216 g.Callbacks("once memory"),
3217 J = r.statusCode || {}, p = {}, A = {}, y = 0,
3221 getResponseHeader: function(a) {
3225 for (f = {}; b = Lb.exec(h);) f[b[1].toLowerCase()] = b[2];
3226 b = f[a.toLowerCase()]
3228 return null == b ? null : b
3230 getAllResponseHeaders: function() {
3231 return 2 === y ? h : null
3233 setRequestHeader: function(a, b) {
3234 var c = a.toLowerCase();
3235 y || (a = A[c] = A[c] || a, p[a] = b);
3238 overrideMimeType: function(a) {
3239 y || (r.mimeType = a);
3242 statusCode: function(a) {
3246 for (b in a) J[b] = [J[b],
3249 else s.always(a[s.status]);
3252 abort: function(a) {
3259 L.promise(s).complete = B.add;
3262 r.url = ((a || r.url || Y) + "").replace(Kb, "").replace(Nb, la[1] + "//");
3263 r.type = b.method || b.type || r.method || r.type;
3264 r.dataTypes = g.trim(r.dataType || "*").toLowerCase().match(ca) || [""];
3265 null == r.crossDomain && (q = bb.exec(r.url.toLowerCase()), r.crossDomain = !(!q || q[1] === la[1] && q[2] === la[2] && (q[3] || ("http:" === q[1] ? "80" : "443")) === (la[3] || ("http:" === la[1] ?
3267 r.data && r.processData && "string" !== typeof r.data && (r.data = g.param(r.data, r.traditional));
3269 if (2 === y) return s;
3270 (v = r.global) && 0 === g.active++ && g.event.trigger("ajaxStart");
3271 r.type = r.type.toUpperCase();
3272 r.hasContent = !Mb.test(r.type);
3274 r.hasContent || (r.data && (e = r.url += (Ka.test(e) ? "&" : "?") + r.data, delete r.data), !1 === r.cache && (r.url = ab.test(e) ? e.replace(ab, "$1_=" + Ja++) : e + (Ka.test(e) ? "&" : "?") + "_=" + Ja++));
3275 r.ifModified && (g.lastModified[e] && s.setRequestHeader("If-Modified-Since",
3276 g.lastModified[e]), g.etag[e] && s.setRequestHeader("If-None-Match", g.etag[e]));
3277 (r.data && r.hasContent && !1 !== r.contentType || b.contentType) && s.setRequestHeader("Content-Type", r.contentType);
3278 s.setRequestHeader("Accept", r.dataTypes[0] && r.accepts[r.dataTypes[0]] ? r.accepts[r.dataTypes[0]] + ("*" !== r.dataTypes[0] ? ", " + db + "; q=0.01" : "") : r.accepts["*"]);
3279 for (k in r.headers) s.setRequestHeader(k, r.headers[k]);
3280 if (r.beforeSend && (!1 === r.beforeSend.call(t, s, r) || 2 === y)) return s.abort();
3287 if (d = da(Fa, r, b, s)) {
3289 v && m.trigger("ajaxSend", [s, r]);
3290 r.async && 0 < r.timeout && (n = setTimeout(function() {
3296 if (2 > y) c(-1, N);
3299 } else c(-1, "No Transport");
3302 getJSON: function(a, b, c) {
3303 return g.get(a, b, c, "json")
3305 getScript: function(a, b) {
3306 return g.get(a, void 0, b, "script")
3309 g.each(["get", "post"], function(a, b) {
3310 g[b] = function(a, c, d, e) {
3311 g.isFunction(c) && (e = e || d, d = c, c = void 0);
3321 g.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(a, b) {
3322 g.fn[b] = function(a) {
3323 return this.on(b, a)
3326 g._evalUrl = function(a) {
3337 wrapAll: function(a) {
3339 if (g.isFunction(a)) return this.each(function(b) {
3340 g(this).wrapAll(a.call(this, b))
3342 this[0] && (b = g(a, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && b.insertBefore(this[0]), b.map(function() {
3344 this; a.firstElementChild;) a = a.firstElementChild;
3349 wrapInner: function(a) {
3350 return g.isFunction(a) ? this.each(function(b) {
3351 g(this).wrapInner(a.call(this, b))
3352 }) : this.each(function() {
3355 c.length ? c.wrapAll(a) : b.append(a)
3359 var b = g.isFunction(a);
3360 return this.each(function(c) {
3361 g(this).wrapAll(b ? a.call(this, c) : a)
3364 unwrap: function() {
3365 return this.parent().each(function() {
3366 g.nodeName(this, "body") || g(this).replaceWith(this.childNodes)
3370 g.expr.filters.hidden = function(a) {
3371 return 0 >= a.offsetWidth && 0 >= a.offsetHeight
3373 g.expr.filters.visible = function(a) {
3374 return !g.expr.filters.hidden(a)
3379 Pb = /^(?:submit|button|image|reset|file)$/i,
3380 Qb = /^(?:input|select|textarea|keygen)/i;
3381 g.param = function(a, b) {
3383 e = function(a, b) {
3384 b = g.isFunction(b) ? b() : null == b ? "" : b;
3385 d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
3387 void 0 === b && (b = g.ajaxSettings && g.ajaxSettings.traditional);
3388 if (g.isArray(a) || a.jquery && !g.isPlainObject(a)) g.each(a,
3390 e(this.name, this.value)
3393 for (c in a) ba(c, a[c], b, e);
3394 return d.join("&").replace(Ob, "+")
3397 serialize: function() {
3398 return g.param(this.serializeArray())
3400 serializeArray: function() {
3401 return this.map(function() {
3402 var a = g.prop(this, "elements");
3403 return a ? g.makeArray(a) : this
3404 }).filter(function() {
3406 return this.name && !g(this).is(":disabled") && Qb.test(this.nodeName) && !Pb.test(a) && (this.checked || !Sa.test(a))
3407 }).map(function(a, b) {
3408 var c = g(this).val();
3409 return null == c ? null : g.isArray(c) ?
3410 g.map(c, function(a) {
3413 value: a.replace(eb, "\r\n")
3417 value: c.replace(eb, "\r\n")
3422 g.ajaxSettings.xhr = function() {
3424 return new XMLHttpRequest
3431 }, ta = g.ajaxSettings.xhr();
3432 if (d.ActiveXObject) g(d).on("unload", function() {
3433 for (var a in Da) Da[a]()
3435 Q.cors = !! ta && "withCredentials" in ta;
3436 Q.ajax = ta = !! ta;
3437 g.ajaxTransport(function(a) {
3439 if (Q.cors || ta && !a.crossDomain) return {
3440 send: function(c, d) {
3444 a.url, a.async, a.username, a.password);
3446 for (e in a.xhrFields) h[e] = a.xhrFields[e];
3447 a.mimeType && h.overrideMimeType && h.overrideMimeType(a.mimeType);
3448 a.crossDomain || c["X-Requested-With"] || (c["X-Requested-With"] = "XMLHttpRequest");
3449 for (e in c) h.setRequestHeader(e, c[e]);
3452 b && (delete Da[f], b = h.onload = h.onerror = null, "abort" === a ? h.abort() : "error" === a ? d(h.status, h.statusText) : d(Sb[h.status] || h.status, h.statusText, "string" === typeof h.responseText ? {
3453 text: h.responseText
3455 h.getAllResponseHeaders()))
3459 h.onerror = b("error");
3460 b = Da[f] = b("abort");
3461 h.send(a.hasContent && a.data || null)
3470 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
3473 script: /(?:java|ecma)script/
3476 "text script": function(a) {
3482 g.ajaxPrefilter("script", function(a) {
3483 void 0 === a.cache && (a.cache = !1);
3484 a.crossDomain && (a.type = "GET")
3486 g.ajaxTransport("script",
3488 if (a.crossDomain) {
3491 send: function(d, e) {
3492 b = g("<script>").prop({
3494 charset: a.scriptCharset,
3496 }).on("load error", c = function(a) {
3499 a && e("error" === a.type ? 404 : 200, a.type)
3501 M.head.appendChild(b[0])
3510 La = /(=)\?(?=&|$)|\?\?/;
3513 jsonpCallback: function() {
3514 var a = fb.pop() || g.expando + "_" + Ja++;
3519 g.ajaxPrefilter("json jsonp", function(a, b, c) {
3520 var e, h, f, n = !1 !== a.jsonp && (La.test(a.url) ?
3521 "url" : "string" === typeof a.data && !(a.contentType || "").indexOf("application/x-www-form-urlencoded") && La.test(a.data) && "data");
3522 if (n || "jsonp" === a.dataTypes[0]) return e = a.jsonpCallback = g.isFunction(a.jsonpCallback) ? a.jsonpCallback() : a.jsonpCallback, n ? a[n] = a[n].replace(La, "$1" + e) : !1 !== a.jsonp && (a.url += (Ka.test(a.url) ? "&" : "?") + a.jsonp + "=" + e), a.converters["script json"] = function() {
3523 f || g.error(e + " was not called");
3525 }, a.dataTypes[0] = "json", h = d[e], d[e] = function() {
3527 }, c.always(function() {
3530 a[e] && (a.jsonpCallback = b.jsonpCallback, fb.push(e));
3531 f && g.isFunction(h) && h(f[0]);
3535 g.parseHTML = function(a, b, c) {
3536 if (!a || "string" !== typeof a) return null;
3537 "boolean" === typeof b && (c = b, b = !1);
3541 if (d) return [b.createElement(d[1])];
3542 d = g.buildFragment([a], b, c);
3543 c && c.length && g(c).remove();
3544 return g.merge([], d.childNodes)
3547 g.fn.load = function(a, b, c) {
3548 if ("string" !== typeof a && gb) return gb.apply(this, arguments);
3549 var d, e, h, f = this,
3552 (d = a.slice(n), a = a.slice(0, n));
3553 g.isFunction(b) ? (c = b, b = void 0) : b && "object" === typeof b && (e = "POST");
3554 0 < f.length && g.ajax({
3559 }).done(function(a) {
3561 f.html(d ? g("<div>").append(g.parseHTML(a)).find(d) : a)
3562 }).complete(c && function(a, b) {
3563 f.each(c, h || [a.responseText, b, a])
3567 g.expr.filters.animated = function(a) {
3568 return g.grep(g.timers, function(b) {
3572 var hb = d.document.documentElement;
3574 setOffset: function(a, b, c) {
3575 var d, e, h, f = g.css(a,
3579 "static" === f && (a.style.position = "relative");
3581 e = g.css(a, "top");
3582 d = g.css(a, "left");
3583 ("absolute" === f || "fixed" === f) && -1 < (e + d).indexOf("auto") ? (d = n.position(), e = d.top, d = d.left) : (e = parseFloat(e) || 0, d = parseFloat(d) || 0);
3584 g.isFunction(b) && (b = b.call(a, c, h));
3585 null != b.top && (q.top = b.top - h.top + e);
3586 null != b.left && (q.left = b.left - h.left + d);
3587 "using" in b ? b.using.call(a, q) : n.css(q)
3591 offset: function(a) {
3592 if (arguments.length) return void 0 === a ? this : this.each(function(b) {
3593 g.offset.setOffset(this,
3601 }, e = c && c.ownerDocument;
3603 b = e.documentElement;
3604 if (!g.contains(b, c)) return d;
3605 "undefined" !== typeof c.getBoundingClientRect && (d = c.getBoundingClientRect());
3608 top: d.top + c.pageYOffset - b.clientTop,
3609 left: d.left + c.pageXOffset - b.clientLeft
3613 position: function() {
3615 var a, b, c = this[0],
3620 "fixed" === g.css(c, "position") ? b = c.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), g.nodeName(a[0], "html") || (d = a.offset()), d.top +=
3621 g.css(a[0], "borderTopWidth", !0), d.left += g.css(a[0], "borderLeftWidth", !0));
3623 top: b.top - d.top - g.css(c, "marginTop", !0),
3624 left: b.left - d.left - g.css(c, "marginLeft", !0)
3628 offsetParent: function() {
3629 return this.map(function() {
3630 for (var a = this.offsetParent || hb; a && !g.nodeName(a, "html") && "static" === g.css(a, "position");) a = a.offsetParent;
3636 scrollLeft: "pageXOffset",
3637 scrollTop: "pageYOffset"
3639 var c = "pageYOffset" === b;
3640 g.fn[a] = function(e) {
3641 return fa(this, function(a, e, h) {
3643 if (void 0 === h) return f ? f[b] : a[e];
3644 f ? f.scrollTo(c ? d.pageXOffset : h, c ? h : d.pageYOffset) : a[e] = h
3645 }, a, e, arguments.length, null)
3648 g.each(["top", "left"], function(a, b) {
3649 g.cssHooks[b] = y(Q.pixelPosition, function(a, c) {
3650 if (c) return c = A(a, b), Ea.test(c) ? g(a).position()[b] + "px" : c
3658 padding: "inner" + a,
3662 g.fn[d] = function(d, e) {
3663 var h = arguments.length && (c || "boolean" !== typeof d),
3664 f = c || (!0 === d || !0 === e ? "margin" : "border");
3667 return g.isWindow(b) ? b.document.documentElement["client" + a] : 9 === b.nodeType ? (c = b.documentElement, Math.max(b.body["scroll" + a], c["scroll" + a], b.body["offset" + a], c["offset" + a], c["client" + a])) : void 0 === d ? g.css(b, c, f) : g.style(b, c, d, f)
3668 }, b, h ? d : void 0, h, null)
3672 g.fn.size = function() {
3675 g.fn.andSelf = g.fn.addBack;
3676 "function" === typeof define && define.amd && define("jquery", [], function() {
3681 g.noConflict = function(a) {
3682 d.$ === g && (d.$ = Ub);
3683 a && d.jQuery === g &&
3687 "undefined" === typeof c && (d.jQuery = d.$ = g);
3692 d(document).ajaxComplete(function(a, b, c) {
3693 if (a = b.getResponseHeader("X-Redirect")) window.location = a
3698 d.ajaxPrefilter(function(a, b, c) {
3699 !a.crossDomain && f.getCsrfParam() && c.setRequestHeader("X-CSRF-Token", f.getCsrfToken())
3704 var a = d(document);
3705 a.on("click.yii", f.clickableSelector, function(a) {
3707 if (f.allowAction(b)) return f.handleAction(b);
3708 a.stopImmediatePropagation();
3711 a.on("change.yii", f.changeableSelector, function(a) {
3713 if (f.allowAction(b)) return f.handleAction(b);
3714 a.stopImmediatePropagation();
3720 var a = location.protocol + "//" + location.host,
3721 b = d("script[src]").map(function() {
3722 return "/" === this.src.charAt(0) ? a + this.src : this.src
3724 d.ajaxPrefilter("script", function(c, e, x) {
3725 "jsonp" != c.dataType && (c = "/" === c.url.charAt(0) ? a + c.url : c.url, -1 === d.inArray(c, b) ? b.push(c) : -1 === d.inArray(c, d.map(f.reloadableScripts, function(b) {
3726 return "/" === b.charAt(0) ? a + b : b
3731 reloadableScripts: [],
3732 clickableSelector: 'a, button, input[type="submit"], input[type="button"], input[type="reset"], input[type="image"]',
3733 changeableSelector: "select, input, textarea",
3734 getCsrfParam: function() {
3735 return d("meta[name=csrf-param]").prop("content")
3737 getCsrfToken: function() {
3738 return d("meta[name=csrf-token]").prop("content")
3740 confirm: function(a) {
3743 allowAction: function(a) {
3744 a = a.data("confirm");
3745 return void 0 === a || f.confirm(a)
3747 handleAction: function(a) {
3748 var b = a.data("method");
3749 if (void 0 === b) return !0;
3750 var c = a.closest("form"),
3753 x && (e && e.match(/(^\/|:\/\/)/) || (e = window.location.href), c = d('<form method="' +
3754 b + '" action="' + e + '"></form>'), (e = a.prop("target")) && c.attr("target", e), b.match(/(get|post)/i) || (c.append('<input name="_method" value="' + b + '" type="hidden">'), b = "POST"), b.match(/(get|head|options)/i) || (e = f.getCsrfParam()) && c.append('<input name="' + e + '" value="' + f.getCsrfToken() + '" type="hidden">'), c.hide().appendTo("body"));
3755 if (e = c.data("yiiActiveForm")) e.submitObject = a;
3756 a = c.prop("method");
3757 c.prop("method", b);
3758 c.trigger("submit");
3759 c.prop("method", a);
3763 getQueryParams: function(a) {
3766 if (0 > b) return {};
3767 a = a.substring(b + 1).split("&");
3768 for (var b = 0, c = {}; b < a.length; b++) a[b] = a[b].split("="), c[decodeURIComponent(a[b][0])] = decodeURIComponent(a[b][1]);
3771 initModule: function(a) {
3772 if (void 0 === a.isActive || a.isActive) d.isFunction(a.init) && a.init(), d.each(a, function() {
3773 d.isPlainObject(this) && f.initModule(this)
3785 jQuery(document).ready(function() {
3790 this.config = d.extend({}, b, c);
3792 this.steps = a.find("fieldset");
3793 this.config.showLegend || this.element.addClass("sf-hide-legend");
3794 this.btnFinishTmp = this.config.finishBtn;
3795 this.btnPrevTmp = this.config.prevBtn;
3796 this.btnNextTmp = this.config.nextBtn;
3799 this.stepOffset = this.config.stepOffset;
3800 this.config.startStep >= this.steps.length && (this.config.startStep = this.steps.length - 1);
3801 this.stepActive = this.config.startStep;
3803 a.trigger("sf-loaded");
3808 timingFunction: "swing",
3814 nextBtn: d('<a class="next-btn sf-right sf-btn" href="#">NEXT</a>'),
3815 prevBtn: d('<a class="prev-btn sf-left sf-btn" href="#">PREV</a>'),
3816 finishBtn: d('<input class="finish-btn sf-right sf-btn" type="submit" value="FINISH"/>'),
3817 onNext: function(a, b) {},
3818 onPrev: function(a, b) {},
3819 onFinish: function(a, b) {},
3820 onSlideChanged: function(a, b, c) {},
3827 c.prototype.init = function() {
3828 this.element.append(d("<div>").addClass("sf-viewport"));
3829 this.viewPort = d(".sf-viewport", this.element);
3830 this.element.wrap(d("<div>").addClass("sf-wizard").attr("id", this.element.attr("id") + "-box"));
3831 this.wizard = this.element.parent();
3832 this.wizard.parent().addClass("sf-" + this.config.theme);
3833 this.config.showNavNumbers || this.wizard.addClass("sf-nonumbers");
3834 d(this.viewPort).append(d("<div>").addClass("sf-fieldwrap clearfix"));
3835 this.fieldWrap = d(".sf-fieldwrap", this.element);
3836 this.element.append(d("<div>").addClass("sf-controls clearfix"));
3837 this.controls = d(".sf-controls", this.element);
3838 this.config.showButtons || this.controls.addClass("sf-hide-buttons");
3840 !1 !== this.config.showNav && this.initNav();
3841 this.steps.each(function(b) {
3842 var c = d("<div>").addClass("sf-step sf-step-" + b);
3843 b == a.config.startStep ? c.addClass("sf-step-active") : c.addClass("sf-step-no-active");
3844 d(this).wrap(c).parent().appendTo(a.fieldWrap);
3845 d(this).append(d("<div>").addClass("sf-" + b));
3846 b == a.config.startStep &&
3847 (a.initBtnFinish(a.config.startStep), a.initBtnNext(a.config.startStep), a.initBtnPrev(a.config.startStep), 0 == a.config.startStep && a.element.find(".sf-btn-prev").hide(), a.config.startStep != a.steps.length - 1 ? a.element.find(".sf-btn-finish").hide() : a.element.find(".sf-btn-next").hide())
3849 this.setProportion();
3850 d(window).resize(function() {
3851 a.careNav(a.stepActive, a.stepActive);
3854 a.element.on("click", ".next-btn", function(b, c) {
3856 !1 !== a.config.onNext(a.stepActive, a.wizard) && (k = a.goTo(d(".sf-controls .next-btn",
3857 a.element).data("step")));
3858 void 0 !== c && (c.ret = k);
3861 a.element.on("click", ".prev-btn", function(b, c) {
3863 !1 !== a.config.onPrev(a.stepActive, a.wizard) && (k = a.goTo(d(".sf-controls .prev-btn", a.element).data("step")));
3864 void 0 !== c && (c.ret = k);
3867 a.element.on("click", ".finish-btn", function(b, c) {
3869 m = jQuery.Event("sf-finish");
3870 a.element.trigger(m, [a.stepActive, a.stepActive, a.wizard]);
3871 !1 === a.config.onFinish(a.stepActive, a.wizard) || m.isDefaultPrevented() ? b.preventDefault() :
3873 void 0 !== c && (c.ret = d)
3875 a.element.on("keydown", ":input", function(b) {
3876 13 == (b.keyCode || b.which) && (a.next(), b.preventDefault())
3879 c.prototype.initNav = function() {
3881 b = d("<div>").addClass("sf-nav-wrap clearfix"),
3882 c = d("<ul>").addClass("sf-nav clearfix");
3884 "bottom" == a.config.showNav ? this.element.after(b) : this.element.before(b);
3885 this.navWrap = d(".sf-nav-wrap", a.wizard);
3886 this.steps.each(function(b) {
3887 var c = d("<li>").addClass("sf-nav-step sf-nav-step-" + b).data("step", b);
3888 a.config.markPrevSteps &&
3889 b < a.config.startStep && c.addClass("sf-nav-prev-step");
3890 a.config.showNavNumbers ? c.addClass("sf-li-number") : c.addClass("sf-li-nonumber");
3891 d("<span>").addClass("sf-nav-subtext").html(d(this).find("legend").first().html()).appendTo(c);
3892 var e = d("<div>").addClass("sf-nav-number").appendTo(c);
3893 d("<span>").addClass("sf-nav-number-inner").html(b + 1).appendTo(e);
3894 d("<div>").appendTo(c);
3895 b == a.config.startStep && c.addClass("sf-active");
3896 !0 == a.config.linkNav && c.addClass("sf-nav-link");
3897 "left" == a.config.showNav && (d(".sf-nav-wrap",
3898 a.wizard).addClass("sf-nav-left"), a.element.addClass("sf-nav-on-left"));
3899 "right" == a.config.showNav && (d(".sf-nav-wrap", a.wizard).addClass("sf-nav-right"), a.element.addClass("sf-nav-on-right"));
3900 if ("top" == a.config.showNav || !0 === a.config.showNav) d(".sf-nav-wrap", a.wizard).addClass("sf-nav-top"), a.element.addClass("sf-nav-on-top");
3901 "bottom" == a.config.showNav && (d(".sf-nav-wrap", a.wizard).addClass("sf-nav-bottom"), a.element.addClass("sf-nav-on-bottom"));
3902 a.wizard.find(".sf-nav").append(c)
3904 d(".sf-nav-step.sf-nav-link",
3905 a.wizard).on("click", function(b) {
3906 var c = d(this).data("step"),
3908 if (0 > a.stepActive - c)
3909 for (var f = a.stepActive; f < c; f++)
3910 if (!1 !== a.config.onNext(f)) e = f + 1;
3913 for (f = a.stepActive; f > c; f--)
3914 if (!1 !== a.config.onPrev(f)) e = f - 1;
3919 this.careNav(this.stepActive, this.stepActive)
3921 c.prototype.setProportion = function() {
3922 this.stepWidth = this.viewPort.width();
3923 var a = this.stepWidth * this.steps.length,
3925 if ("auto" == this.config.height && this.steps.length) {
3926 this.viewPort.height("auto");
3927 var c = d(this.steps[this.stepActive]).outerHeight(!0);
3928 this.viewPort.height(c)
3930 "first" == this.config.height && this.steps.length && (d(this.steps[0]).height("auto"), b = d(this.steps[0]).height());
3931 !isNaN(parseInt(this.config.height)) && this.steps.length && (b = this.config.height);
3932 "tallest" == this.config.height && this.steps.length && this.steps.each(function(a) {
3933 d(this).height("auto");
3934 d(this).height() > b && (b = d(this).height())
3937 this.steps.each(function(a) {
3938 d(this).parent().css({
3939 width: k.stepWidth + "px",
3941 "margin-right": k.stepOffset + "px"
3943 b && d(this).height(b)
3945 this.fieldWrap.width(a + this.stepOffset * this.steps.length + "px");
3946 this.fieldWrap.css({
3947 "margin-left": "-" + (this.stepActive * this.stepWidth + this.stepOffset * this.stepActive) + "px"
3950 c.prototype.goTo = function(a) {
3952 c = this.stepActive,
3954 m = jQuery.Event("sf-step-before");
3955 b.element.trigger(m, [c, a, b.wizard]);
3956 if (m.isDefaultPrevented()) return !1;
3957 b.config.markPrevSteps && d(".sf-nav-step", b.navWrap).each(function(b) {
3958 d(this).removeClass("sf-nav-prev-step");
3959 b < a && d(this).addClass("sf-nav-prev-step")
3962 b.element.find(".sf-step").removeClass("sf-step-no-active").addClass("sf-step-active");
3964 0 > k && (m = "-=");
3966 this.fieldWrap.animate({
3967 "margin-left": m + (k * this.stepWidth + this.stepOffset * k)
3968 }, this.config.duration * k, this.config.timingFunction, function() {
3969 b.element.find(".sf-step").removeClass("sf-step-active").addClass("sf-step-no-active");
3970 b.element.find(".sf-step-" + a).removeClass("sf-step-no-active").addClass("sf-step-active");
3971 b.element.trigger("sf-step-after", [c, a, b.wizard]);
3972 b.config.onSlideChanged(c, a, this.wizard)
3974 this.stepActive = a;
3975 d(".sf-nav-step", this.wizard).removeClass("sf-active");
3976 d(".sf-nav-step-" + a, this.wizard).addClass("sf-active");
3977 "auto" == this.config.height && this.steps.length && (k = d(this.steps[this.stepActive]).outerHeight(!0), this.viewPort.animate({
3979 }, this.config.duration, this.config.timingFunction));
3980 a + 1 < this.steps.length ? this.btnNext.data("step", a + 1).fadeIn(100) : this.btnNext.fadeOut(0);
3981 a + 1 >= this.steps.length ? this.btnFinish.data("step",
3982 a - 1).fadeIn(100) : this.btnFinish.fadeOut(0);
3983 0 == a ? this.btnPrev.fadeOut(100) : this.btnPrev.data("step", a - 1).fadeIn(100);
3986 c.prototype.careNav = function(a, b) {
3988 if (!1 !== c.config.showNav) {
3989 var k = c.navWrap.width(),
3991 if (c.navWrap.hasClass("sf-nav-top") || c.navWrap.hasClass("sf-nav-bottom")) {
3994 d(".sf-nav-step", c.navWrap).each(function(b) {
3995 m[b] = d(this).outerWidth(!0);
3997 b < a && (s += m[b])
3999 0 <= b - a && (s -= m[a - 1]);
4004 0 > b - a && (x = a + 1, p = -50);
4005 s > k && (s = k, p = 0);
4007 x, this.wizard).length ? d(".sf-nav", c.navWrap).animate({
4008 left: "-" + (s + p) + "px"
4009 }, this.config.duration) : 0 > x ? d(".sf-nav", c.navWrap).animate({
4011 }, this.config.duration) : d(".sf-nav", c.navWrap).animate({
4012 left: "-" + s + "px"
4013 }, this.config.duration)
4017 d(".sf-nav-step", c.navWrap).each(function(a) {
4018 c.navWrap.css("width", "9999px");
4019 a = d(this).css("float", "left").outerWidth(!0);
4020 c.navWrap.css("width", "");
4021 d(this).css("float", "");
4025 k = c.element.closest(".sf-wizard").width() - q;
4031 c.navWrap.hasClass("sf-nav-left") && c.element.css({
4032 "margin-left": q + "px"
4034 c.navWrap.css("width", q + "px")
4038 c.prototype.refresh = function() {
4039 this.careNav(this.stepActive, this.stepActive);
4040 this.setProportion()
4042 c.prototype.initBtnNext = function(a) {
4043 this.btnNext = this.btnNextTmp.clone(!0).addClass("sf-btn-next").data("step", a + 1);
4044 this.btnNext.appendTo(d(this.controls))
4046 c.prototype.initBtnPrev = function(a) {
4047 this.btnPrev = this.btnPrevTmp.clone(!0).addClass("sf-btn-prev").data("step", a - 1);
4048 this.btnPrev.appendTo(d(this.controls))
4050 c.prototype.initBtnFinish = function(a) {
4051 d(".sf-step-" + a).append(" ");
4052 this.btnFinish = this.btnFinishTmp.clone(!0).addClass("sf-btn-finish").data("step", a - 1);
4053 this.btnFinish.appendTo(d(this.controls))
4055 c.prototype.next = function() {
4059 this.stepActive < this.steps.length - 1 ? d(".sf-controls .next-btn", this.element).trigger("click", [a]) : d(".sf-controls .finish-btn", this.element).trigger("click", [a]);
4062 c.prototype.prev = function() {
4066 d(".sf-controls .prev-btn", this.element).trigger("click", [a]);
4069 c.prototype.finish = function() {
4073 d(".sf-controls .finish-btn", this.element).trigger("click", [a]);
4076 d.fn.stepFormWizard = function(a) {
4077 return new c(this.first(), a)
4082 var hljs = new function() {
4084 return a.replace(/&/gm, "&").replace(/</gm, "<").replace(/>/gm, ">")
4088 var c = a && a.exec(b);
4089 return c && 0 == c.index
4093 return Array.prototype.map.call(a.childNodes, function(a) {
4094 return 3 == a.nodeType ? B.useBR ? a.nodeValue.replace(/\n/g, "") : a.nodeValue : "br" == a.nodeName.toLowerCase() ? "\n" : b(a)
4099 a = (a.className + " " + (a.parentNode ? a.parentNode.className : "")).split(/\s+/);
4100 a = a.map(function(a) {
4101 return a.replace(/^language-/,
4104 return a.filter(function(a) {
4105 return t(a) || "no-highlight" == a
4111 for (d in a) c[d] = a[d];
4113 for (d in b) c[d] = b[d];
4120 for (var d = a.firstChild; d; d = d.nextSibling) 3 == d.nodeType ? c += d.nodeValue.length : "br" == d.nodeName.toLowerCase() ? c += 1 : 1 == d.nodeType && (b.push({
4124 }), c = A(d, c), b.push({
4134 function k(a, b, c) {
4136 return a.length && b.length ? a[0].offset !=
4137 b[0].offset ? a[0].offset < b[0].offset ? a : b : "start" == b[0].event ? a : b : a.length ? a : b
4141 k += "<" + a.nodeName.toLowerCase() + Array.prototype.map.call(a.attributes, function(a) {
4142 return " " + a.nodeName + '="' + d(a.value) + '"'
4147 k += "</" + a.nodeName.toLowerCase() + ">"
4151 ("start" == a.event ? h : f)(a.node)
4153 for (var q = 0, k = "", t = []; a.length || b.length;) {
4155 k = k + d(c.substr(q, m[0].offset - q)),
4158 t.reverse().forEach(f);
4159 do n(m.splice(0, 1)[0]), m = e(); while (m == a && m.length &&
4161 t.reverse().forEach(h)
4162 } else "start" == m[0].event ? t.push(m[0].node) : t.pop(), n(m.splice(0, 1)[0])
4164 return k + d(c.substr(q))
4169 return a && a.source || a
4173 return RegExp(b(d), "m" + (a.cI ? "i" : "") + (e ? "g" : ""))
4181 var n = {}, q = function(b, c) {
4182 a.cI && (c = c.toLowerCase());
4183 c.split(" ").forEach(function(a) {
4185 n[a[0]] = [b, a[1] ? Number(a[1]) : 1]
4188 "string" == typeof h.k ? q("keyword", h.k) : Object.keys(h.k).forEach(function(a) {
4194 h.lR = c(h.l || /\b[A-Za-z0-9_]+\b/, !0);
4195 f && (h.bK && (h.b = h.bK.split(" ").join("|")), h.b || (h.b = /\B|\b/), h.bR = c(h.b), h.e || h.eW || (h.e = /\B|\b/), h.e && (h.eR = c(h.e)), h.tE = b(h.e) || "", h.eW && f.tE && (h.tE += (h.e ? "|" : "") + f.tE));
4196 h.i && (h.iR = c(h.i));
4197 void 0 === h.r && (h.r = 1);
4200 h.c.forEach(function(a) {
4201 a.v ? a.v.forEach(function(b) {
4203 }) : k.push("self" == a ? h : a)
4206 h.c.forEach(function(a) {
4209 h.starts && d(h.starts, f);
4210 var t = h.c.map(function(a) {
4211 return a.bK ? "\\.?\\b(" + a.b + ")\\b\\.?" :
4213 }).concat([h.tE]).concat([h.i]).map(b).filter(Boolean);
4214 h.t = t.length ? c(t.join("|"), !0) : {
4225 function s(a, b, e, f) {
4227 if (c(a.eR, b)) return a;
4228 if (a.eW) return n(a.parent, b)
4231 function q(a, b, c, d) {
4232 d = '<span class="' + (d ? "" : B.classPrefix);
4233 return d + (a + '">') + b + (c ? "" : "</span>")
4238 if (void 0 !== w.sL) w.sL && !h[w.sL] ? a = d(H) : (a = w.sL ? s(w.sL, H, !0, w.continuation.top) : u(H), 0 < w.r && (K += a.r), "continuous" == w.subLanguageMode && (w.continuation.top = a.top),
4239 a = q(a.language, a.value, !1, !0));
4240 else if (a = d(H), w.k) {
4244 for (var e = w.lR.exec(a); e;) {
4245 var b = b + a.substr(c, e.index - c),
4248 f = x.cI ? f[0].toLowerCase() : f[0];
4249 (c = c.k.hasOwnProperty(f) && c.k[f]) ? (K += c[1], b += q(c[0], e[0])) : b += e[0];
4259 var c = a.cN ? q(a.cN, "", !0) : "";
4260 a.rB ? (z += c, H = "") : a.eB ? (z += d(b) + c, H = "") : (z += c, H = b);
4261 w = Object.create(a, {
4270 if (void 0 === b) return z += k(), 0;
4275 0; f < h.c.length; f++)
4276 if (c(h.c[f].bR, b)) {
4282 if (h) return z += k(), p(h, b), h.rB ? 0 : b.length;
4285 f.rE || f.eE || (H += b);
4287 do w.cN && (z += "</span>"), K += w.r, w = w.parent; while (w != h.parent);
4288 f.eE && (z += d(b));
4290 h.starts && p(h.starts, "");
4291 return f.rE ? 0 : b.length
4293 if (!e && c(w.iR, b)) throw Error('Illegal lexeme "' + b + '" for mode "' + (w.cN || "<unnamed>") + '"');
4295 return b.length || 1
4298 if (!x) throw Error('Unknown language: "' + a + '"');
4302 for (f = w; f != x; f = f.parent) f.cN &&
4303 (z = q(f.cN, z, !0));
4307 for (var O, I, S = 0;;) {
4311 I = P(b.substr(S, O.index - S), O[0]);
4315 for (f = w; f.parent; f = f.parent) f.cN && (z += "</span>");
4323 if (-1 != da.message.indexOf("Illegal")) return {
4332 b = b || B.languages || Object.keys(h);
4337 b.forEach(function(b) {
4339 var d = s(b, a, !1);
4341 d.r > e.r && (e = d);
4342 d.r > c.r && (e = c, c = d)
4346 (c.second_best = e);
4351 B.tabReplace && (a = a.replace(/^((<[^>]+>|\t)+)/gm, function(a, b, c, d) {
4352 return b.replace(/\t/g, B.tabReplace)
4354 B.useBR && (a = a.replace(/\n/g, "<br>"));
4361 if ("no-highlight" != e) {
4362 var h = e ? s(e, d, !0) : u(d),
4365 var q = document.createElementNS("http://www.w3.org/1999/xhtml", "pre");
4366 q.innerHTML = h.value;
4367 h.value = k(n, f(q), d)
4369 h.value = x(h.value);
4370 c.innerHTML = h.value;
4371 c.className += " hljs " + (!e && h.language || "");
4373 language: h.language,
4376 h.second_best && (c.second_best = {
4377 language: h.second_best.language,
4386 var a = document.querySelectorAll("pre code");
4387 Array.prototype.forEach.call(a, p)
4392 return h[a] || h[n[a]]
4395 classPrefix: "hljs-",
4401 this.highlightAuto = u;
4403 this.highlightBlock = p;
4404 this.configure = function(a) {
4407 this.initHighlighting = q;
4408 this.initHighlightingOnLoad = function() {
4409 addEventListener("DOMContentLoaded",
4411 addEventListener("load", q, !1)
4413 this.registerLanguage = function(a, b) {
4414 var c = h[a] = b(this);
4415 c.aliases && c.aliases.forEach(function(b) {
4419 this.getLanguage = t;
4421 this.IR = "[a-zA-Z][a-zA-Z0-9_]*";
4422 this.UIR = "[a-zA-Z_][a-zA-Z0-9_]*";
4423 this.NR = "\\b\\d+(\\.\\d+)?";
4424 this.CNR = "(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";
4425 this.BNR = "\\b(0b[01]+)";
4426 this.RSR = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";
4475 this.REGEXP_MODE = {
4498 hljs.registerLanguage("javascript", function(d) {
4502 keyword: "in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",
4503 literal: "true false null undefined NaN Infinity",
4504 built_in: "eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"
4508 b: /^\s*('|")use strict('|")/,
4511 d.ASM, d.QSM, d.CLCM, d.CBLCLM, d.CNM, {
4512 b: "(" + d.RSR + "|\\b(case|return|throw)\\b)\\s*",
4513 k: "return throw case",
4514 c: [d.CLCM, d.CBLCLM, d.REGEXP_MODE, {
4525 c: [d.inherit(d.TM, {
4526 b: /[A-Za-z$_][0-9A-Za-z$_]*/
4531 c: [d.CLCM, d.CBLCLM],
4544 hljs.registerLanguage("css", function(d) {
4547 b: "[a-zA-Z-][a-zA-Z0-9_-]*\\(",
4549 c: ["self", d.NM, d.ASM, d.QSM]
4556 b: "\\#[A-Za-z0-9_-]+"
4559 b: "\\.[A-Za-z0-9_-]+",
4562 cN: "attr_selector",
4568 b: ":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"
4571 b: "@(font-face|page)",
4586 c: [c, d.ASM, d.QSM,
4592 b: "[a-zA-Z-][a-zA-Z0-9_-]*",
4608 b: "[A-Z\\_\\.\\-]+",
4616 c: [c, d.NM, d.QSM, d.ASM, d.CBLCLM, {
4629 hljs.registerLanguage("xml", function(d) {
4631 b: /<\?(php)?(?!\w)/,
4634 subLanguageMode: "continuous"
4642 b: "[A-Za-z0-9\\._:-]+",
4680 b: "<\\!\\[CDATA\\[",
4685 b: "<style(?=\\s|>|$)",
4698 b: "<script(?=\\s|>|$)",
4734 hljs.registerLanguage("http", function(d) {
4739 b: "^HTTP/[0-9\\.]+",
4747 b: "^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",
4777 "function" == typeof define && define.amd ? define(["jquery"], d) : "object" == typeof exports ? module.exports = d : d(jQuery)
4780 var f = c || window.event,
4781 q = m.call(arguments, 1),
4788 if (c = d.event.fix(f), c.type = "mousewheel", "detail" in f && (h = -1 * f.detail), "wheelDelta" in f && (h = f.wheelDelta), "wheelDeltaY" in f && (h = f.wheelDeltaY), "wheelDeltaX" in f && (B = -1 * f.wheelDeltaX), "axis" in f && f.axis === f.HORIZONTAL_AXIS && (B = -1 * h, h = 0), k = 0 === h ? B : h, "deltaY" in f && (h = -1 * f.deltaY, k = h), "deltaX" in
4789 f && (B = f.deltaX, 0 === h && (k = -1 * B)), 0 !== h || 0 !== B) {
4790 if (1 === f.deltaMode) var s = d.data(this, "mousewheel-line-height"),
4791 k = k * s, h = h * s, B = B * s;
4792 else 2 === f.deltaMode && (s = d.data(this, "mousewheel-page-height"), k *= s, h *= s, B *= s); if (n = Math.max(Math.abs(h), Math.abs(B)), (!e || e > n) && (e = n, u.settings.adjustOldDeltas && "mousewheel" === f.type && 0 === n % 120 && (e /= 40)), u.settings.adjustOldDeltas && "mousewheel" === f.type && 0 === n % 120 && (k /= 40, B /= 40, h /= 40), k = Math[1 <= k ? "floor" : "ceil"](k / e), B = Math[1 <= B ? "floor" : "ceil"](B / e), h = Math[1 <= h ? "floor" : "ceil"](h /
4793 e), u.settings.normalizeOffset && this.getBoundingClientRect) f = this.getBoundingClientRect(), v = c.clientX - f.left, L = c.clientY - f.top;
4794 return c.deltaX = B, c.deltaY = h, c.deltaFactor = e, c.offsetX = v, c.offsetY = L, c.deltaMode = 0, q.unshift(c, k, B, h), a && clearTimeout(a), a = setTimeout(b, 200), (d.event.dispatch || d.event.handle).apply(this, q)
4801 var a, e, f = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"],
4802 k = "onwheel" in document || 9 <= document.documentMode ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"],
4803 m = Array.prototype.slice;
4804 if (d.event.fixHooks)
4805 for (var s = f.length; s;) d.event.fixHooks[f[--s]] = d.event.mouseHooks;
4806 var u = d.event.special.mousewheel = {
4809 if (this.addEventListener)
4810 for (var a = k.length; a;) this.addEventListener(k[--a], c, !1);
4811 else this.onmousewheel = c;
4812 d.data(this, "mousewheel-line-height", u.getLineHeight(this));
4813 d.data(this, "mousewheel-page-height", u.getPageHeight(this))
4815 teardown: function() {
4816 if (this.removeEventListener)
4817 for (var a = k.length; a;) this.removeEventListener(k[--a],
4819 else this.onmousewheel = null;
4820 d.removeData(this, "mousewheel-line-height");
4821 d.removeData(this, "mousewheel-page-height")
4823 getLineHeight: function(a) {
4824 a = d(a)["offsetParent" in d.fn ? "offsetParent" : "parent"]();
4825 return a.length || (a = d("body")), parseInt(a.css("fontSize"), 10)
4827 getPageHeight: function(a) {
4828 return d(a).height()
4831 adjustOldDeltas: !0,
4836 mousewheel: function(a) {
4837 return a ? this.bind("mousewheel", a) : this.trigger("mousewheel")
4839 unmousewheel: function(a) {
4840 return this.unbind("mousewheel",
4845 (function(d, c, b) {
4855 scrollbarPosition: "inside",
4857 autoDraggerLength: !0,
4858 autoHideScrollbar: !1,
4859 autoExpandScrollbar: !1,
4860 alwaysShowScrollbar: 0,
4865 scrollAmount: "auto",
4868 deltaFactor: "auto",
4871 disableOver: ["select", "option", "keygen", "datalist", "textarea"]
4875 scrollType: "stepless",
4876 scrollAmount: "auto"
4880 scrollType: "stepless",
4881 scrollAmount: "auto"
4883 contentTouchScroll: 25,
4885 autoExpandHorizontalScroll: !1,
4886 autoScrollOnFocus: "input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",
4887 updateOnContentResize: !0,
4888 updateOnImageLoad: !0,
4889 updateOnSelectorChange: !1
4896 onTotalScrollBack: !1,
4898 onTotalScrollOffset: 0,
4899 onTotalScrollBackOffset: 0,
4900 alwaysTriggerOffsets: !0
4905 k = {}, m = function(a) {
4906 k[a] && (clearTimeout(k[a]), p._delete.call(null, k[a]))
4907 }, s = d.attachEvent && !d.addEventListener ? 1 : 0,
4911 c = a.extend(!0, {}, b, c);
4912 var d = p._selector.call(this);
4914 var B = c.liveSelector || this.selector || ".mCustomScrollbar",
4916 if ("off" === c.live) {
4920 k[B] = setTimeout(function() {
4921 h.mCustomScrollbar(c);
4922 "once" === c.live && h.length && m(B)
4925 c.setWidth = c.set_width ? c.set_width : c.setWidth;
4926 c.setHeight = c.set_height ? c.set_height : c.setHeight;
4927 c.axis = c.horizontalScroll ? "x" : p._findAxis.call(null, c.axis);
4928 c.scrollInertia = 17 > c.scrollInertia ? 17 : c.scrollInertia;
4929 "object" !== typeof c.mouseWheel && !0 == c.mouseWheel && (c.mouseWheel = {
4931 scrollAmount: "auto",
4934 deltaFactor: "auto",
4938 c.mouseWheel.scrollAmount = c.mouseWheelPixels ? c.mouseWheelPixels : c.mouseWheel.scrollAmount;
4939 c.mouseWheel.normalizeDelta = c.advanced.normalizeMouseWheelDelta ? c.advanced.normalizeMouseWheelDelta : c.mouseWheel.normalizeDelta;
4940 c.scrollButtons.scrollType = p._findScrollButtonsType.call(null, c.scrollButtons.scrollType);
4941 p._theme.call(null, c);
4942 return a(d).each(function() {
4944 if (!b.data("mCS")) {
4956 langDir: b.css("direction"),
4960 var d = b.data("mCS").opt,
4961 e = b.data("mcs-axis"),
4962 h = b.data("mcs-scrollbar-position"),
4963 k = b.data("mcs-theme");
4965 h && (d.scrollbarPosition = h);
4967 k, p._theme.call(null, d));
4968 p._pluginMarkup.call(this);
4969 x.update.call(null, b)
4973 update: function(b) {
4974 b = b || p._selector.call(this);
4975 return a(b).each(function() {
4977 if (b.data("mCS")) {
4978 var c = b.data("mCS"),
4980 e = a("#mCSB_" + c.idx + "_container"),
4981 f = [a("#mCSB_" + c.idx + "_dragger_vertical"), a("#mCSB_" + c.idx + "_dragger_horizontal")];
4982 e.length && (c.tweenRunning && p._stop.call(null, b), b.hasClass("mCS_disabled") && b.removeClass("mCS_disabled"), b.hasClass("mCS_destroyed") && b.removeClass("mCS_destroyed"), p._maxHeight.call(this),
4983 p._expandContentHorizontally.call(this), "y" === d.axis || d.advanced.autoExpandHorizontalScroll || e.css("width", p._contentWidth(e.children())), c.overflowed = p._overflowed.call(this), p._scrollbarVisibility.call(this), d.autoDraggerLength && p._setDraggerLength.call(this), p._scrollRatio.call(this), p._bindEvents.call(this), e = [Math.abs(e[0].offsetTop), Math.abs(e[0].offsetLeft)], "x" !== d.axis && (c.overflowed[0] ? f[0].height() > f[0].parent().height() ? p._resetContentPosition.call(this) : p._scrollTo.call(this, b, e[0].toString(), {
4987 }) : (p._resetContentPosition.call(this), "y" === d.axis ? p._unbindEvents.call(this) : "yx" === d.axis && c.overflowed[1] && p._scrollTo.call(this, b, e[1].toString(), {
4991 }))), "y" !== d.axis && (c.overflowed[1] ? f[1].width() > f[1].parent().width() ? p._resetContentPosition.call(this) : p._scrollTo.call(this, b, e[1].toString(), {
4995 }) : (p._resetContentPosition.call(this), "x" === d.axis ? p._unbindEvents.call(this) : "yx" === d.axis && c.overflowed[0] &&
4996 p._scrollTo.call(this, b, e[0].toString(), {
5000 }))), p._autoUpdate.call(this))
5004 scrollTo: function(b, c) {
5005 if ("undefined" != typeof b && null != b) {
5006 var d = p._selector.call(this);
5007 return a(d).each(function() {
5009 if (d.data("mCS")) {
5010 var e = d.data("mCS"),
5012 k = a.extend(!0, {}, {
5013 trigger: "external",
5014 scrollInertia: f.scrollInertia,
5015 scrollEasing: "mcsEaseInOut",
5022 m = p._arr.call(this, b),
5023 B = 17 > k.scrollInertia ? 17 : k.scrollInertia;
5024 m[0] = p._to.call(this, m[0], "y");
5025 m[1] = p._to.call(this, m[1], "x");
5026 k.moveDragger && (m[0] *= e.scrollRatio.y, m[1] *= e.scrollRatio.x);
5028 setTimeout(function() {
5029 null !== m[0] && "undefined" !== typeof m[0] && "x" !== f.axis && e.overflowed[0] && (k.dir = "y", k.overwrite = "all", p._scrollTo.call(this, d, m[0].toString(), k));
5030 null !== m[1] && "undefined" !== typeof m[1] && "y" !== f.axis && e.overflowed[1] && (k.dir = "x", k.overwrite = "none", p._scrollTo.call(this, d, m[1].toString(), k))
5037 var b = p._selector.call(this);
5038 return a(b).each(function() {
5041 b.data("mCS") && p._stop.call(null, b)
5044 disable: function(b) {
5045 var c = p._selector.call(this);
5046 return a(c).each(function() {
5048 c.data("mCS") && (c.data("mCS"), p._autoUpdate.call(this, "remove"), p._unbindEvents.call(this), b && p._resetContentPosition.call(this), p._scrollbarVisibility.call(this, !0), c.addClass("mCS_disabled"))
5051 destroy: function() {
5052 var b = p._selector.call(this);
5053 return a(b).each(function() {
5055 if (c.data("mCS")) {
5056 var d = c.data("mCS"),
5058 f = a("#mCSB_" + d.idx),
5060 d.idx + "_container"),
5061 L = a(".mCSB_" + d.idx + "_scrollbar");
5063 p._autoUpdate.call(this, "remove");
5064 p._unbindEvents.call(this);
5065 p._resetContentPosition.call(this);
5066 c.removeData("mCS");
5067 p._delete.call(null, this.mcs);
5069 f.replaceWith(k.contents());
5070 c.removeClass("mCustomScrollbar _mCS_" + d.idx + " mCS-autoHide mCS-dir-rtl mCS_no_scrollbar mCS_disabled").addClass("mCS_destroyed")
5075 _selector: function() {
5076 return "object" !== typeof a(this) || 1 > a(this).length ? ".mCustomScrollbar" : this
5078 _theme: function(b) {
5079 b.autoDraggerLength = -1 < a.inArray(b.theme, ["rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark"]) ? !1 : b.autoDraggerLength;
5080 b.autoExpandScrollbar = -1 < a.inArray(b.theme, "rounded-dots rounded-dots-dark 3d 3d-dark 3d-thick 3d-thick-dark inset inset-dark inset-2 inset-2-dark inset-3 inset-3-dark".split(" ")) ? !1 : b.autoExpandScrollbar;
5081 b.scrollButtons.enable = -1 < a.inArray(b.theme, ["minimal", "minimal-dark"]) ? !1 : b.scrollButtons.enable;
5082 b.autoHideScrollbar = -1 < a.inArray(b.theme, ["minimal", "minimal-dark"]) ? !0 : b.autoHideScrollbar;
5083 b.scrollbarPosition = -1 < a.inArray(b.theme, ["minimal", "minimal-dark"]) ? "outside" : b.scrollbarPosition
5085 _findAxis: function(a) {
5086 return "yx" === a || "xy" === a || "auto" === a ? "yx" : "x" === a || "horizontal" === a ? "x" : "y"
5088 _findScrollButtonsType: function(a) {
5089 return "stepped" === a || "pixels" === a || "step" === a || "click" === a ? "stepped" : "stepless"
5091 _pluginMarkup: function() {
5095 e = d.autoExpandScrollbar ? " mCSB_scrollTools_onDrag_expand" : "",
5096 e = ["<div id='mCSB_" + c.idx + "_scrollbar_vertical' class='mCSB_scrollTools mCSB_" +
5097 c.idx + "_scrollbar mCS-" + d.theme + " mCSB_scrollTools_vertical" + e + "'><div class='mCSB_draggerContainer'><div id='mCSB_" + c.idx + "_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>", "<div id='mCSB_" + c.idx + "_scrollbar_horizontal' class='mCSB_scrollTools mCSB_" + c.idx + "_scrollbar mCS-" + d.theme + " mCSB_scrollTools_horizontal" + e + "'><div class='mCSB_draggerContainer'><div id='mCSB_" +
5098 c.idx + "_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"
5100 f = "yx" === d.axis ? "mCSB_vertical_horizontal" : "x" === d.axis ? "mCSB_horizontal" : "mCSB_vertical",
5101 e = "yx" === d.axis ? e[0] + e[1] : "x" === d.axis ? e[1] : e[0],
5102 k = "yx" === d.axis ? "<div id='mCSB_" + c.idx + "_container_wrapper' class='mCSB_container_wrapper' />" : "",
5103 m = d.autoHideScrollbar ? " mCS-autoHide" : "",
5104 s = "x" !== d.axis && "rtl" === c.langDir ?
5105 " mCS-dir-rtl" : "";
5106 d.setWidth && b.css("width", d.setWidth);
5107 d.setHeight && b.css("height", d.setHeight);
5108 d.setLeft = "y" !== d.axis && "rtl" === c.langDir ? "989999px" : d.setLeft;
5109 b.addClass("mCustomScrollbar _mCS_" + c.idx + m + s).wrapInner("<div id='mCSB_" + c.idx + "' class='mCustomScrollBox mCS-" + d.theme + " " + f + "'><div id='mCSB_" + c.idx + "_container' class='mCSB_container' style='position:relative; top:" + d.setTop + "; left:" + d.setLeft + ";' dir=" + c.langDir + " /></div>");
5110 f = a("#mCSB_" + c.idx);
5111 m = a("#mCSB_" + c.idx + "_container");
5113 d.axis || d.advanced.autoExpandHorizontalScroll || m.css("width", p._contentWidth(m.children()));
5114 "outside" === d.scrollbarPosition ? ("static" === b.css("position") && b.css("position", "relative"), b.css("overflow", "visible"), f.addClass("mCSB_outside").after(e)) : (f.addClass("mCSB_inside").append(e), m.wrap(k));
5115 p._scrollButtons.call(this);
5116 b = [a("#mCSB_" + c.idx + "_dragger_vertical"), a("#mCSB_" + c.idx + "_dragger_horizontal")];
5117 b[0].css("min-height", b[0].height());
5118 b[1].css("min-width", b[1].width())
5120 _contentWidth: function(b) {
5121 return Math.max.apply(Math,
5123 return a(this).outerWidth(!0)
5126 _expandContentHorizontally: function() {
5127 var b = a(this).data("mCS"),
5129 b = a("#mCSB_" + b.idx + "_container");
5130 c.advanced.autoExpandHorizontalScroll && "y" !== c.axis && b.css({
5131 position: "absolute",
5133 }).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({
5134 width: Math.ceil(b[0].getBoundingClientRect().right + 0.4) - Math.floor(b[0].getBoundingClientRect().left),
5135 position: "relative"
5138 _scrollButtons: function() {
5140 a(this).data("mCS"),
5142 b = a(".mCSB_" + b.idx + "_scrollbar:first"),
5143 d = ["<a href='#' class='mCSB_buttonUp' oncontextmenu='return false;' />", "<a href='#' class='mCSB_buttonDown' oncontextmenu='return false;' />", "<a href='#' class='mCSB_buttonLeft' oncontextmenu='return false;' />", "<a href='#' class='mCSB_buttonRight' oncontextmenu='return false;' />"],
5144 d = ["x" === c.axis ? d[2] : d[0], "x" === c.axis ? d[3] : d[1], d[2], d[3]];
5145 c.scrollButtons.enable && b.prepend(d[0]).append(d[1]).next(".mCSB_scrollTools").prepend(d[2]).append(d[3])
5147 _maxHeight: function() {
5150 c = a("#mCSB_" + c.idx),
5151 d = b.css("max-height"),
5152 e = -1 !== d.indexOf("%"),
5153 f = b.css("box-sizing");
5154 "none" !== d && (d = e ? b.parent().height() * parseInt(d) / 100 : parseInt(d), "border-box" === f && (d -= b.innerHeight() - b.height() + (b.outerHeight() - b.innerHeight())), c.css("max-height", Math.round(d)))
5156 _setDraggerLength: function() {
5157 var b = a(this).data("mCS"),
5158 c = a("#mCSB_" + b.idx),
5159 d = a("#mCSB_" + b.idx + "_container"),
5160 b = [a("#mCSB_" + b.idx + "_dragger_vertical"), a("#mCSB_" + b.idx + "_dragger_horizontal")],
5161 c = [c.height() / d.outerHeight(!1), c.width() / d.outerWidth(!1)],
5162 c = [parseInt(b[0].css("min-height")), Math.round(c[0] * b[0].parent().height()), parseInt(b[1].css("min-width")), Math.round(c[1] * b[1].parent().width())],
5163 d = s && c[3] < c[2] ? c[2] : c[3];
5165 height: s && c[1] < c[0] ? c[0] : c[1],
5166 "max-height": b[0].parent().height() - 10
5167 }).find(".mCSB_dragger_bar").css({
5168 "line-height": c[0] + "px"
5172 "max-width": b[1].parent().width() - 10
5175 _scrollRatio: function() {
5176 var b = a(this).data("mCS"),
5177 c = a("#mCSB_" + b.idx),
5179 a("#mCSB_" + b.idx + "_container"),
5180 e = [a("#mCSB_" + b.idx + "_dragger_vertical"), a("#mCSB_" + b.idx + "_dragger_horizontal")],
5181 c = [d.outerHeight(!1) - c.height(), d.outerWidth(!1) - c.width()],
5182 e = [c[0] / (e[0].parent().height() - e[0].height()), c[1] / (e[1].parent().width() - e[1].width())];
5188 _onDragClasses: function(a, b, c) {
5189 c = c ? "mCSB_dragger_onDrag_expanded" : "";
5190 var d = ["mCSB_dragger_onDrag", "mCSB_scrollTools_onDrag"],
5191 e = a.closest(".mCSB_scrollTools");
5192 "active" === b ? (a.toggleClass(d[0] + " " + c), e.toggleClass(d[1]),
5193 a[0]._draggable = a[0]._draggable ? 0 : 1) : a[0]._draggable || ("hide" === b ? (a.removeClass(d[0]), e.removeClass(d[1])) : (a.addClass(d[0]), e.addClass(d[1])))
5195 _overflowed: function() {
5196 var b = a(this).data("mCS"),
5197 c = a("#mCSB_" + b.idx),
5198 d = a("#mCSB_" + b.idx + "_container"),
5199 e = null == b.overflowed ? d.height() : d.outerHeight(!1),
5200 b = null == b.overflowed ? d.width() : d.outerWidth(!1);
5201 return [e > c.height(), b > c.width()]
5203 _resetContentPosition: function() {
5207 e = a("#mCSB_" + c.idx),
5208 f = a("#mCSB_" + c.idx + "_container"),
5209 k = [a("#mCSB_" + c.idx + "_dragger_vertical"), a("#mCSB_" + c.idx + "_dragger_horizontal")];
5211 ("x" !== d.axis && !c.overflowed[0] || "y" === d.axis && c.overflowed[0]) && k[0].add(f).css("top", 0);
5212 if ("y" !== d.axis && !c.overflowed[1] || "x" === d.axis && c.overflowed[1]) b = dx = 0, "rtl" === c.langDir && (b = e.width() - f.outerWidth(!1), dx = Math.abs(b / c.scrollRatio.x)), f.css("left", b), k[1].css("left", dx)
5214 _bindEvents: function() {
5218 if (!c.bindEvents) {
5219 p._draggable.call(this);
5220 d.contentTouchScroll && p._contentDraggable.call(this);
5221 if (d.mouseWheel.enable) {
5222 var e = function() {
5223 f = setTimeout(function() {
5224 a.event.special.mousewheel ? (clearTimeout(f), p._mousewheel.call(b[0])) : e()
5229 p._draggerRail.call(this);
5230 p._wrapperScroll.call(this);
5231 d.advanced.autoScrollOnFocus && p._focus.call(this);
5232 d.scrollButtons.enable && p._buttons.call(this);
5233 d.keyboard.enable && p._keyboard.call(this);
5237 _unbindEvents: function() {
5241 h = ".mCSB_" + d.idx + "_scrollbar",
5242 h = a("#mCSB_" + d.idx + ",#mCSB_" + d.idx + "_container,#mCSB_" +
5243 d.idx + "_container_wrapper," + h + " .mCSB_draggerContainer,#mCSB_" + d.idx + "_dragger_vertical,#mCSB_" + d.idx + "_dragger_horizontal," + h + ">a"),
5244 f = a("#mCSB_" + d.idx + "_container");
5245 d.bindEvents && (a(c).unbind("." + e), h.each(function() {
5246 a(this).unbind("." + e)
5247 }), clearTimeout(b[0]._focusTimeout), p._delete.call(null, b[0]._focusTimeout), clearTimeout(d.sequential.step), p._delete.call(null, d.sequential.step), clearTimeout(f[0].onCompleteTimeout), p._delete.call(null, f[0].onCompleteTimeout), d.bindEvents = !1)
5249 _scrollbarVisibility: function(b) {
5254 f = a("#mCSB_" + d.idx + "_container_wrapper"),
5255 f = f.length ? f : a("#mCSB_" + d.idx + "_container"),
5256 k = [a("#mCSB_" + d.idx + "_scrollbar_vertical"), a("#mCSB_" + d.idx + "_scrollbar_horizontal")],
5257 m = [k[0].find(".mCSB_dragger"), k[1].find(".mCSB_dragger")];
5258 "x" !== e.axis && (d.overflowed[0] && !b ? (k[0].add(m[0]).add(k[0].children("a")).css("display", "block"), f.removeClass("mCS_no_scrollbar_y mCS_y_hidden")) : (e.alwaysShowScrollbar ? (2 !== e.alwaysShowScrollbar && m[0].add(k[0].children("a")).css("display",
5259 "none"), f.removeClass("mCS_y_hidden")) : (k[0].css("display", "none"), f.addClass("mCS_y_hidden")), f.addClass("mCS_no_scrollbar_y")));
5260 "y" !== e.axis && (d.overflowed[1] && !b ? (k[1].add(m[1]).add(k[1].children("a")).css("display", "block"), f.removeClass("mCS_no_scrollbar_x mCS_x_hidden")) : (e.alwaysShowScrollbar ? (2 !== e.alwaysShowScrollbar && m[1].add(k[1].children("a")).css("display", "none"), f.removeClass("mCS_x_hidden")) : (k[1].css("display", "none"), f.addClass("mCS_x_hidden")), f.addClass("mCS_no_scrollbar_x")));
5261 d.overflowed[0] || d.overflowed[1] ? c.removeClass("mCS_no_scrollbar") : c.addClass("mCS_no_scrollbar")
5263 _coordinates: function(a) {
5266 case "MSPointerDown":
5268 case "MSPointerMove":
5271 return [a.originalEvent.pageY, a.originalEvent.pageX];
5275 return a = a.originalEvent.touches[0] || a.originalEvent.changedTouches[0], [a.pageY, a.pageX];
5277 return [a.pageY, a.pageX]
5280 _draggable: function() {
5284 c.length && c.css("pointer-events", a ? "auto" : "none")
5287 function d(a, b, c, k) {
5288 N[0].idleTimer = 233 > f.scrollInertia ? 250 : 0;
5289 if (y.attr("id") === m[1]) {
5291 a = (y[0].offsetLeft - b + k) * h.scrollRatio.x
5292 } else r = "y", a = (y[0].offsetTop - a + c) * h.scrollRatio.y;
5293 p._scrollTo(e, a.toString(), {
5302 m = ["mCSB_" + h.idx + "_dragger_vertical", "mCSB_" + h.idx + "_dragger_horizontal"],
5303 N = a("#mCSB_" + h.idx + "_container"),
5304 A = a("#" + m[0] + ",#" + m[1]),
5306 A.bind("mousedown." +
5307 k + " touchstart." + k + " pointerdown." + k + " MSPointerDown." + k, function(d) {
5308 d.stopImmediatePropagation();
5310 if (p._mouseBtnLeft(d)) {
5312 s && (c.onselectstart = function() {
5319 k = p._coordinates(d)[0] - h.top;
5320 d = p._coordinates(d)[1] - h.left;
5321 var v = y.height() + h.top,
5322 h = y.width() + h.left;
5323 k < v && 0 < k && d < h && 0 < d && (r = k, J = d);
5324 p._onDragClasses(y, "active", f.autoExpandScrollbar)
5326 }).bind("touchmove." + k, function(a) {
5327 a.stopImmediatePropagation();
5331 c = p._coordinates(a)[0] - b.top;
5332 a = p._coordinates(a)[1] - b.left;
5335 a(c).bind("mousemove." + k + " pointermove." + k + " MSPointerMove." + k, function(a) {
5338 c = p._coordinates(a)[0] - b.top;
5339 a = p._coordinates(a)[1] - b.left;
5340 r !== c && d(r, J, c, a)
5342 }).add(A).bind("mouseup." + k + " touchend." + k + " pointerup." + k + " MSPointerUp." + k, function(a) {
5343 y && (p._onDragClasses(y, "active", f.autoExpandScrollbar), y = null);
5345 s && (c.onselectstart = null);
5349 _contentDraggable: function() {
5351 var d = [1.5 * c, 2 * c, c / 1.5, c / 2];
5352 return 90 < a ? 4 < c ? d[0] : d[3] : 60 < a ? 3 < c ? d[3] : d[2] : 30 < a ? 8 < c ? d[1] : 6 < c ? d[0] : 4 < c ? c : d[2] : 8 < c ? c : d[3]
5355 function c(a, b, e, h, f, n) {
5356 a && p._scrollTo(d, a.toString(), {
5368 m = a("#mCSB_" + e.idx),
5369 s = a("#mCSB_" + e.idx + "_container"),
5370 A = [a("#mCSB_" + e.idx + "_dragger_vertical"), a("#mCSB_" + e.idx + "_dragger_horizontal")],
5373 w, z, H, K, O, I, S, da = "yx" === f.axis ? "none" : "all";
5374 s.bind("touchstart." + k + " pointerdown." +
5375 k + " MSPointerDown." + k, function(a) {
5376 if (p._pointerTouch(a) && !u) {
5378 y = p._coordinates(a)[0] - b.top;
5379 r = p._coordinates(a)[1] - b.left
5381 }).bind("touchmove." + k + " pointermove." + k + " MSPointerMove." + k, function(a) {
5382 if (p._pointerTouch(a) && !u) {
5383 a.stopImmediatePropagation();
5386 d = p._coordinates(a)[0] - b.top,
5387 b = p._coordinates(a)[1] - b.left;
5390 if (e.overflowed[0]) var k = A[0].parent().height() - A[0].height(),
5391 k = 0 < y - d && d - y > -(k * e.scrollRatio.y);
5392 if (e.overflowed[1]) var q = A[1].parent().width() -
5394 q = 0 < r - b && b - r > -(q * e.scrollRatio.x);
5395 (k || q) && a.preventDefault();
5396 I = "yx" === f.axis ? [y - d, r - b] : "x" === f.axis ? [null, r - b] : [y - d, null];
5397 s[0].idleTimer = 250;
5398 e.overflowed[0] && c(I[0], 0, "mcsLinearOut", "y", "all", !0);
5399 e.overflowed[1] && c(I[1], 0, "mcsLinearOut", "x", da, !0)
5402 m.bind("touchstart." + k + " pointerdown." + k + " MSPointerDown." + k, function(a) {
5403 if (p._pointerTouch(a) && !u) {
5404 a.stopImmediatePropagation();
5408 J = p._coordinates(a)[0] - b.top;
5409 D = p._coordinates(a)[1] - b.left;
5413 }).bind("touchend." + k + " pointerup." + k + " MSPointerUp." + k, function(a) {
5414 if (p._pointerTouch(a) && !u) {
5415 a.stopImmediatePropagation();
5418 k = p._coordinates(a)[0] - d.top,
5419 d = p._coordinates(a)[1] - d.left;
5420 if (!(30 < H - z)) {
5422 var r = (a = 2.5 > O) ? [P[P.length - 2], x[x.length - 2]] : [0, 0];
5423 K = a ? [k - r[0], d - r[1]] : [k - J, d - D];
5424 k = [Math.abs(K[0]), Math.abs(K[1])];
5425 O = a ? [Math.abs(K[0] / 4), Math.abs(K[1] / 4)] : [O, O];
5426 a = [Math.abs(s[0].offsetTop) - K[0] * b(k[0] / O[0], O[0]), Math.abs(s[0].offsetLeft) - K[1] * b(k[1] / O[1], O[1])];
5427 I = "yx" === f.axis ? [a[0], a[1]] : "x" === f.axis ? [null, a[1]] : [a[0], null];
5428 S = [4 * k[0] + f.scrollInertia, 4 * k[1] + f.scrollInertia];
5429 a = parseInt(f.contentTouchScroll) || 0;
5430 I[0] = k[0] > a ? I[0] : 0;
5431 I[1] = k[1] > a ? I[1] : 0;
5432 e.overflowed[0] && c(I[0], S[0], "mcsEaseOut", "y", da, !1);
5433 e.overflowed[1] && c(I[1], S[1], "mcsEaseOut", "x", da, !1)
5438 _mousewheel: function() {
5444 f = a("#mCSB_" + c.idx),
5445 k = [a("#mCSB_" + c.idx + "_dragger_vertical"), a("#mCSB_" + c.idx + "_dragger_horizontal")];
5446 f.bind("mousewheel." +
5449 if (!p._disableMousewheel(b, e.target)) {
5450 var m = "auto" !== d.mouseWheel.deltaFactor ? parseInt(d.mouseWheel.deltaFactor) : s && 100 > e.deltaFactor ? 100 : 40 > e.deltaFactor ? 40 : e.deltaFactor || 100;
5451 if ("x" === d.axis || "x" === d.mouseWheel.axis) var y = "x",
5452 m = [Math.round(m * c.scrollRatio.x), parseInt(d.mouseWheel.scrollAmount)], m = "auto" !== d.mouseWheel.scrollAmount ? m[1] : m[0] >= f.width() ? 0.9 * f.width() : m[0], r = Math.abs(a("#mCSB_" + c.idx + "_container")[0].offsetLeft), J = k[1][0].offsetLeft, D = k[1].parent().width() -
5453 k[1].width(), u = e.deltaX || e.deltaY || h;
5454 else y = "y", m = [Math.round(m * c.scrollRatio.y), parseInt(d.mouseWheel.scrollAmount)], m = "auto" !== d.mouseWheel.scrollAmount ? m[1] : m[0] >= f.height() ? 0.9 * f.height() : m[0], r = Math.abs(a("#mCSB_" + c.idx + "_container")[0].offsetTop), J = k[0][0].offsetTop, D = k[0].parent().height() - k[0].height(), u = e.deltaY || h; if (("y" !== y || c.overflowed[0]) && ("x" !== y || c.overflowed[1])) {
5455 d.mouseWheel.invert && (u = -u);
5456 d.mouseWheel.normalizeDelta && (u = 0 > u ? -1 : 1);
5457 if (0 < u && 0 !== J || 0 > u && J !== D || d.mouseWheel.preventDefault) e.stopImmediatePropagation(),
5459 p._scrollTo(b, (r - u * m).toString(), {
5467 _disableMousewheel: function(b, c) {
5468 var d = c.nodeName.toLowerCase(),
5469 e = b.data("mCS").opt.mouseWheel.disableOver,
5470 f = ["select", "textarea"];
5471 return -1 < a.inArray(d, e) && !(-1 < a.inArray(d, f) && !a(c).is(":focus"))
5473 _draggerRail: function() {
5477 e = a("#mCSB_" + c.idx + "_container"),
5479 a(".mCSB_" + c.idx + "_scrollbar .mCSB_draggerContainer").bind("touchstart." + d + " pointerdown." + d + " MSPointerDown." + d, function(a) {
5481 }).bind("touchend." + d + " pointerup." + d + " MSPointerUp." + d, function(a) {
5483 }).bind("click." + d, function(d) {
5484 if (a(d.target).hasClass("mCSB_draggerContainer") || a(d.target).hasClass("mCSB_draggerRail")) {
5487 m = k.find(".mCSB_dragger");
5488 if (0 < k.parent(".mCSB_scrollTools_horizontal").length) {
5489 if (!c.overflowed[1]) return;
5491 d = d.pageX > m.offset().left ? -1 : 1;
5492 d = Math.abs(e[0].offsetLeft) - 0.9 * d * f.width()
5494 if (!c.overflowed[0]) return;
5496 d = d.pageY > m.offset().top ? -1 : 1;
5497 d = Math.abs(e[0].offsetTop) -
5498 0.9 * d * f.height()
5500 p._scrollTo(b, d.toString(), {
5502 scrollEasing: "mcsEaseInOut"
5507 _focus: function() {
5512 f = a("#mCSB_" + d.idx + "_container"),
5514 f.bind("focusin." + h, function(d) {
5515 var h = a(c.activeElement);
5516 d = f.find(".mCustomScrollBox").length;
5517 h.is(e.advanced.autoScrollOnFocus) && (p._stop(b), clearTimeout(b[0]._focusTimeout), b[0]._focusTimer = d ? 17 * d : 0, b[0]._focusTimeout = setTimeout(function() {
5518 var a = [h.offset().top - f.offset().top, h.offset().left - f.offset().left],
5519 c = [f[0].offsetTop, f[0].offsetLeft],
5520 c = [0 <= c[0] + a[0] && c[0] + a[0] < k.height() - h.outerHeight(!1), 0 <= c[1] + a[1] && c[0] + a[1] < k.width() - h.outerWidth(!1)],
5521 d = "yx" !== e.axis || c[0] || c[1] ? "all" : "none";
5522 "x" === e.axis || c[0] || p._scrollTo(b, a[0].toString(), {
5524 scrollEasing: "mcsEaseInOut",
5528 "y" === e.axis || c[1] || p._scrollTo(b, a[1].toString(), {
5530 scrollEasing: "mcsEaseInOut",
5534 }, b[0]._focusTimer))
5537 _wrapperScroll: function() {
5538 var b = a(this).data("mCS"),
5541 b.idx + "_container").parent();
5542 d.bind("scroll." + c, function(a) {
5543 d.scrollTop(0).scrollLeft(0)
5546 _buttons: function() {
5552 a("#mCSB_" + c.idx + "_container");
5553 a(".mCSB_" + c.idx + "_scrollbar>a").bind("mousedown." + f + " touchstart." + f + " pointerdown." + f + " MSPointerDown." + f + " mouseup." + f + " touchend." + f + " pointerup." + f + " MSPointerUp." + f + " mouseout." + f + " pointerout." + f + " MSPointerOut." + f + " click." + f, function(f) {
5555 e.scrollAmount = d.snapAmount ||
5556 d.scrollButtons.scrollAmount;
5557 p._sequentialScroll.call(this, b, a, c)
5560 if (p._mouseBtnLeft(f)) {
5561 var k = a(this).attr("class");
5562 e.type = d.scrollButtons.scrollType;
5567 case "MSPointerDown":
5568 if ("stepped" === e.type) break;
5570 c.tweenRunning = !1;
5579 case "MSPointerOut":
5580 if ("stepped" === e.type) break;
5582 e.dir && n("off", k);
5585 if ("stepped" !== e.type || c.tweenRunning) break;
5591 _keyboard: function() {
5597 k = a("#mCSB_" + d.idx),
5598 m = a("#mCSB_" + d.idx + "_container"),
5600 k.attr("tabindex", "0").bind("blur." + f + " keydown." + f + " keyup." + f, function(f) {
5602 h.type = e.keyboard.scrollType;
5603 h.scrollAmount = e.snapAmount || e.keyboard.scrollAmount;
5604 "stepped" === h.type && d.tweenRunning || p._sequentialScroll.call(this, b, a, c)
5609 h.dir && n("off", null);
5613 var k = f.keyCode ? f.keyCode : f.which,
5615 if ("x" !== e.axis && (38 === k || 40 === k) || "y" !== e.axis && (37 === k || 39 === k)) {
5616 if ((38 === k || 40 === k) && !d.overflowed[0] || (37 === k || 39 === k) && !d.overflowed[1]) break;
5617 "keyup" === f.type && (v = "off");
5618 a(c.activeElement).is("input,textarea,select,datalist,keygen,[contenteditable='true']") || (f.preventDefault(), f.stopImmediatePropagation(), n(v, k))
5619 } else if (33 === k || 34 === k) {
5620 if (d.overflowed[0] || d.overflowed[1]) f.preventDefault(), f.stopImmediatePropagation();
5621 "keyup" === f.type && (p._stop(b), k = 34 === k ? -1 : 1, "x" === e.axis || "yx" === e.axis && d.overflowed[1] && !d.overflowed[0] ? (f = "x", k = Math.abs(m[0].offsetLeft) - 0.9 * k * s.width()) : (f = "y", k = Math.abs(m[0].offsetTop) - 0.9 * k * s.height()), p._scrollTo(b, k.toString(), {
5623 scrollEasing: "mcsEaseInOut"
5625 } else if ((35 === k || 36 === k) && !a(c.activeElement).is("input,textarea,select,datalist,keygen,[contenteditable='true']")) {
5626 if (d.overflowed[0] || d.overflowed[1]) f.preventDefault(), f.stopImmediatePropagation();
5627 "keyup" === f.type && ("x" ===
5628 e.axis || "yx" === e.axis && d.overflowed[1] && !d.overflowed[0] ? (f = "x", k = 35 === k ? Math.abs(s.width() - m.outerWidth(!1)) : 0) : (f = "y", k = 35 === k ? Math.abs(s.height() - m.outerHeight(!1)) : 0), p._scrollTo(b, k.toString(), {
5630 scrollEasing: "mcsEaseInOut"
5636 _sequentialScroll: function(b, c, d) {
5638 var c = "stepped" !== m.type,
5639 d = a ? c ? k.scrollInertia / 1.5 : k.scrollInertia : 1E3 / 60,
5640 t = a ? c ? 7.5 : 40 : 2.5,
5641 u = [Math.abs(s[0].offsetTop), Math.abs(s[0].offsetLeft)],
5642 B = [10 < f.scrollRatio.y ? 10 : f.scrollRatio.y, 10 < f.scrollRatio.x ? 10 : f.scrollRatio.x],
5643 t = "x" === m.dir[0] ? u[1] + m.dir[1] * B[1] * t : u[0] + m.dir[1] * B[0] * t,
5644 B = "x" === m.dir[0] ? u[1] + m.dir[1] * parseInt(m.scrollAmount) : u[0] + m.dir[1] * parseInt(m.scrollAmount),
5645 t = "auto" !== m.scrollAmount ? B : t;
5646 a && 17 > d && (t = "x" === m.dir[0] ? u[1] : u[0]);
5647 p._scrollTo(b, t.toString(), {
5649 scrollEasing: a ? c ? "mcsLinearOut" : "mcsEaseInOut" : "mcsLinear",
5651 onComplete: a ? !0 : !1
5653 a ? m.dir = !1 : (clearTimeout(m.step), m.step = setTimeout(function() {
5657 var f = b.data("mCS"),
5660 s = a("#mCSB_" + f.idx + "_container"),
5665 m.dir = ["mCSB_buttonRight" === d || "mCSB_buttonLeft" === d || 39 === d || 37 === d ? "x" : "y", "mCSB_buttonUp" === d || "mCSB_buttonLeft" === d || 38 === d || 37 === d ? -1 : 1];
5667 if (p._isNumeric(d) && "stepped" === m.type) break;
5671 clearTimeout(m.step), p._stop(b), (u || f.tweenRunning && m.dir) && e(!0)
5675 var c = a(this).data("mCS").opt,
5677 "function" === typeof b && (b = b());
5678 b instanceof Array ? d = 1 < b.length ? [b[0], b[1]] : "x" === c.axis ? [null, b[0]] : [b[0], null] : (d[0] = b.y ? b.y : b.x ||
5679 "x" === c.axis ? null : b, d[1] = b.x ? b.x : b.y || "y" === c.axis ? null : b);
5680 "function" === typeof d[0] && (d[0] = d[0]());
5681 "function" === typeof d[1] && (d[1] = d[1]());
5684 _to: function(b, c) {
5685 if (null != b && "undefined" != typeof b) {
5689 e = a("#mCSB_" + e.idx + "_container"),
5692 c || (c = "x" === f.axis ? "x" : "y");
5693 var s = "x" === c ? e.outerWidth(!1) : e.outerHeight(!1),
5694 f = "x" === c ? e.offset().left : e.offset().top,
5695 u = "x" === c ? e[0].offsetLeft : e[0].offsetTop,
5696 y = "x" === c ? "left" : "top";
5701 if (b.nodeType) var r = "x" === c ? a(b).offset().left : a(b).offset().top;
5702 else if (b.jquery) {
5703 if (!b.length) break;
5704 r = "x" === c ? b.offset().left : b.offset().top
5709 if (p._isNumeric.call(null, b)) return Math.abs(b);
5710 if (-1 !== b.indexOf("%")) return Math.abs(s * parseInt(b) / 100);
5711 if (-1 !== b.indexOf("-=")) return Math.abs(u - parseInt(b.split("-=")[1]));
5712 if (-1 !== b.indexOf("+=")) return d = u + parseInt(b.split("+=")[1]), 0 <= d ? 0 : Math.abs(d);
5713 if (-1 !== b.indexOf("px") && p._isNumeric.call(null,
5714 b.split("px")[0])) return Math.abs(b.split("px")[0]);
5715 if ("top" === b || "left" === b) return 0;
5716 if ("bottom" === b) return Math.abs(k.height() - e.outerHeight(!1));
5717 if ("right" === b) return Math.abs(k.width() - e.outerWidth(!1));
5718 if ("first" === b || "last" === b) return d = e.find(":" + b), r = "x" === c ? a(d).offset().left : a(d).offset().top, r - f;
5719 if (a(b).length) return r = "x" === c ? a(b).offset().left : a(b).offset().top, r - f;
5721 x.update.call(null, d[0])
5725 _autoUpdate: function(b) {
5727 clearTimeout(y[0].autoUpdate);
5729 setTimeout(function() {
5730 if (u.advanced.updateOnSelectorChange && (G = f(), G !== P)) {
5735 u.advanced.updateOnContentResize && (z = [y.outerHeight(!1), y.outerWidth(!1), r.height(), r.width(), D()[0], D()[1]], z[0] !== w[0] || z[1] !== w[1] || z[2] !== w[2] || z[3] !== w[3] || z[4] !== w[4] || z[5] !== w[5]) && (k(), w = z);
5736 u.advanced.updateOnImageLoad && (K = d(), K !== H && (y.find("img").each(function() {
5739 (u.advanced.updateOnSelectorChange || u.advanced.updateOnContentResize || u.advanced.updateOnImageLoad) && c()
5746 u.advanced.updateOnImageLoad && (a = y.find("img").length);
5752 b.onload = function(a, b) {
5754 return b.apply(a, arguments)
5764 !0 === u.advanced.updateOnSelectorChange && (u.advanced.updateOnSelectorChange = "*");
5766 c = y.find(u.advanced.updateOnSelectorChange);
5767 u.advanced.updateOnSelectorChange && 0 < c.length && c.each(function() {
5768 b += a(this).height() + a(this).width()
5774 clearTimeout(y[0].autoUpdate);
5775 x.update.call(null, m[0])
5780 y = a("#mCSB_" + s.idx + "_container");
5781 if (b) clearTimeout(y[0].autoUpdate), p._delete.call(null, y[0].autoUpdate);
5784 J = [a("#mCSB_" + s.idx + "_scrollbar_vertical"), a("#mCSB_" + s.idx + "_scrollbar_horizontal")],
5786 return [J[0].is(":visible") ? J[0].outerHeight(!0) : 0, J[1].is(":visible") ? J[1].outerWidth(!0) : 0]
5788 G, w = [y.outerHeight(!1), y.outerWidth(!1), r.height(), r.width(), D()[0], D()[1]],
5794 _snapAmount: function(a,
5796 return Math.round(a / b) * b - c
5798 _stop: function(b) {
5800 a("#mCSB_" + b.idx + "_container,#mCSB_" + b.idx + "_container_wrapper,#mCSB_" + b.idx + "_dragger_vertical,#mCSB_" + b.idx + "_dragger_horizontal").each(function() {
5801 p._stopTween.call(this)
5804 _scrollTo: function(b, c, d) {
5806 return k && m.callbacks[a] && "function" === typeof m.callbacks[a]
5810 var a = [y[0].offsetTop, y[0].offsetLeft],
5811 c = [D[0].offsetTop, D[0].offsetLeft],
5812 e = [y.outerHeight(!1), y.outerWidth(!1)],
5813 h = [u.height(), u.width()];
5820 topPct: Math.round(100 * Math.abs(a[0]) / (Math.abs(e[0]) - h[0])),
5821 leftPct: Math.round(100 * Math.abs(a[1]) / (Math.abs(e[1]) - h[1])),
5825 var k = b.data("mCS"),
5828 trigger: "internal",
5830 scrollEasing: "mcsEaseOut",
5832 dur: m.scrollInertia,
5839 var s = [d.dur, d.drag ? 0 : d.dur],
5840 u = a("#mCSB_" + k.idx),
5841 y = a("#mCSB_" + k.idx + "_container"),
5842 r = m.callbacks.onTotalScrollOffset ?
5843 p._arr.call(b, m.callbacks.onTotalScrollOffset) : [0, 0],
5844 J = m.callbacks.onTotalScrollBackOffset ? p._arr.call(b, m.callbacks.onTotalScrollBackOffset) : [0, 0];
5845 k.trigger = d.trigger;
5846 m.snapAmount && (c = p._snapAmount(c, m.snapAmount, m.snapOffset));
5849 var D = a("#mCSB_" + k.idx + "_dragger_horizontal"),
5851 G = y[0].offsetLeft,
5852 w = [u.width() - y.outerWidth(!1), D.parent().width() - D.width()],
5853 z = [c, c / k.scrollRatio.x],
5856 O = 0 < H ? H / k.scrollRatio.x : 0,
5857 I = 0 < K ? K / k.scrollRatio.x : 0;
5861 k.idx + "_dragger_vertical"), x = "top", G = y[0].offsetTop, w = [u.height() - y.outerHeight(!1), D.parent().height() - D.height()], z = [c, c / k.scrollRatio.y], H = r[0], K = J[0], O = 0 < H ? H / k.scrollRatio.y : 0, I = 0 < K ? K / k.scrollRatio.y : 0
5863 0 > z[1] ? z = [0, 0] : z[1] >= w[1] ? z = [w[0], w[1]] : z[0] = -z[0];
5864 clearTimeout(y[0].onCompleteTimeout);
5865 if (k.tweenRunning || !(0 === G && 0 <= z[0] || G === w[0] && z[0] <= w[0])) p._tweenTo.call(null, D[0], x, Math.round(z[1]), s[1], d.scrollEasing), p._tweenTo.call(null, y[0], x, Math.round(z[0]), s[0], d.scrollEasing, d.overwrite, {
5866 onStart: function() {
5868 d.onStart && !k.tweenRunning && (e("onScrollStart") && (f(), m.callbacks.onScrollStart.call(b[0])), k.tweenRunning = !0, p._onDragClasses(D), k.cbOffsets = [m.callbacks.alwaysTriggerOffsets || G >= w[0] + H, m.callbacks.alwaysTriggerOffsets || G <= -K])
5870 onUpdate: function() {
5871 d.callbacks && d.onUpdate && e("whileScrolling") && (f(), m.callbacks.whileScrolling.call(b[0]))
5873 onComplete: function() {
5874 d.callbacks && d.onComplete && ("yx" === m.axis && clearTimeout(y[0].onCompleteTimeout), y[0].onCompleteTimeout = setTimeout(function() {
5876 (f(), m.callbacks.onScroll.call(b[0]));
5877 e("onTotalScroll") && z[1] >= w[1] - O && k.cbOffsets[0] && (f(), m.callbacks.onTotalScroll.call(b[0]));
5878 e("onTotalScrollBack") && z[1] <= I && k.cbOffsets[1] && (f(), m.callbacks.onTotalScrollBack.call(b[0]));
5879 k.tweenRunning = !1;
5881 p._onDragClasses(D, "hide")
5882 }, y[0].idleTimer || 0))
5886 _tweenTo: function(a, b, c, e, f, k, m) {
5888 a._mcsstop || (w || r.call(), w = p._getTime() - x, u(), w >= a._mcstime && (a._mcstime = w > a._mcstime ? w + G - (w - a._mcstime) : w + G - 1, a._mcstime < w + 1 && (a._mcstime = w +
5889 1)), a._mcstime < e ? a._mcsid = _request(s) : D.call())
5893 0 < e ? (a._mcscurrVal = y(a._mcstime, z, K, e, f), H[b] = Math.round(a._mcscurrVal) + "px") : H[b] = c + "px";
5897 function y(a, b, c, d, e) {
5901 return c * a / d + b;
5902 case "mcsLinearOut":
5903 return a /= d, a--, c * Math.sqrt(1 - a * a) + b;
5904 case "easeInOutSmooth":
5906 if (1 > a) return c / 2 * a * a + b;
5908 return -c / 2 * (a * (a - 2) - 1) + b;
5909 case "easeInOutStrong":
5911 if (1 > a) return c / 2 * Math.pow(2, 10 * (a - 1)) + b;
5913 return c / 2 * (-Math.pow(2, -10 * a) + 2) + b;
5915 case "mcsEaseInOut":
5918 if (1 > a) return c / 2 * a * a * a + b;
5920 return c / 2 * (a * a * a + 2) + b;
5921 case "easeOutSmooth":
5922 return a /= d, a--, -c * (a * a * a * a - 1) + b;
5923 case "easeOutStrong":
5924 return c * (-Math.pow(2, -10 * a / d) + 1) + b;
5926 return d = (a /= d) * a, e = d * a, b + c * (0.499999999999997 * e * d + -2.5 * d * d + 5.5 * e + -6.5 * d + 4 * a)
5930 var r = m.onStart || function() {}, J = m.onUpdate || function() {}, D = m.onComplete || function() {}, x = p._getTime(),
5934 "left" === b && (z = a.offsetLeft);
5937 "none" !== k && null != a._mcsid && (d.requestAnimationFrame ? d.cancelAnimationFrame(a._mcsid) :
5938 clearTimeout(a._mcsid), a._mcsid = null);
5942 _request = d.requestAnimationFrame ? d.requestAnimationFrame : function(a) {
5944 return setTimeout(a, 0.01)
5946 a._mcsid = _request(s)
5949 _getTime: function() {
5950 return d.performance && d.performance.now ? d.performance.now() : d.performance && d.performance.webkitNow ? d.performance.webkitNow() : Date.now ? Date.now() : (new Date).getTime()
5952 _stopTween: function() {
5953 null != this._mcsid && (d.requestAnimationFrame ? d.cancelAnimationFrame(this._mcsid) : clearTimeout(this._mcsid),
5954 this._mcsid = null, this._mcsstop = 1)
5956 _delete: function(a) {
5959 _mouseBtnLeft: function(a) {
5960 return !(a.which && 1 !== a.which)
5962 _pointerTouch: function(a) {
5963 a = a.originalEvent.pointerType;
5964 return !(a && "touch" !== a && 2 !== a)
5966 _isNumeric: function(a) {
5967 return !isNaN(parseFloat(a)) && isFinite(a)
5970 a.fn.mCustomScrollbar = function(b) {
5971 if (x[b]) return x[b].apply(this, Array.prototype.slice.call(arguments, 1));
5972 if ("object" !== typeof b && b) a.error("Method " + b + " does not exist");
5973 else return x.init.apply(this, arguments)
5975 a.mCustomScrollbar =
5977 if (x[b]) return x[b].apply(this, Array.prototype.slice.call(arguments, 1));
5978 if ("object" !== typeof b && b) a.error("Method " + b + " does not exist");
5979 else return x.init.apply(this, arguments)
5981 a.mCustomScrollbar.defaults = b;
5982 d.mCustomScrollbar = !0;
5983 a(d).load(function() {
5984 a(".mCustomScrollbar").mCustomScrollbar()
5987 })(window, document);
5989 var c = function(b, a) {
5991 this.options = d.extend({}, d.fn.bootstrapValidator.DEFAULT_OPTIONS, a);
5992 this.$invalidFields = d([]);
5993 this.$hiddenButton = this.$submitButton = null;
5994 this.STATUS_NOT_VALIDATED = "NOT_VALIDATED";
5995 this.STATUS_VALIDATING = "VALIDATING";
5996 this.STATUS_INVALID = "INVALID";
5997 this.STATUS_VALID = "VALID";
6000 for (var f = document.createElement("div"), k = f.all || []; f.innerHTML = "\x3c!--[if gt IE " + ++c + "]><br><![endif]--\x3e", k[0];);
6002 f = document.createElement("div");
6004 9 !== c && "oninput" in f ? "input" : "keyup";
6005 this._submitIfValid = null;
6006 this._cacheFields = {};
6014 excluded: this.$form.attr("data-bv-excluded"),
6015 trigger: this.$form.attr("data-bv-trigger"),
6016 message: this.$form.attr("data-bv-message"),
6017 container: this.$form.attr("data-bv-container"),
6018 group: this.$form.attr("data-bv-group"),
6019 submitButtons: this.$form.attr("data-bv-submitbuttons"),
6020 threshold: this.$form.attr("data-bv-threshold"),
6021 live: this.$form.attr("data-bv-live"),
6022 onSuccess: this.$form.attr("data-bv-onsuccess"),
6023 onError: this.$form.attr("data-bv-onerror"),
6026 valid: this.$form.attr("data-bv-feedbackicons-valid"),
6027 invalid: this.$form.attr("data-bv-feedbackicons-invalid"),
6028 validating: this.$form.attr("data-bv-feedbackicons-validating")
6031 formInit: this.$form.attr("data-bv-events-form-init"),
6032 formError: this.$form.attr("data-bv-events-form-error"),
6033 formSuccess: this.$form.attr("data-bv-events-form-success"),
6034 fieldAdded: this.$form.attr("data-bv-events-field-added"),
6035 fieldRemoved: this.$form.attr("data-bv-events-field-removed"),
6036 fieldInit: this.$form.attr("data-bv-events-field-init"),
6037 fieldError: this.$form.attr("data-bv-events-field-error"),
6038 fieldSuccess: this.$form.attr("data-bv-events-field-success"),
6039 fieldStatus: this.$form.attr("data-bv-events-field-status"),
6040 validatorError: this.$form.attr("data-bv-events-validator-error"),
6041 validatorSuccess: this.$form.attr("data-bv-events-validator-success")
6044 this.$form.attr("novalidate", "novalidate").addClass(this.options.elementClass).on("submit.bv",
6048 }).on("click.bv", this.options.submitButtons, function() {
6049 b.$submitButton = d(this);
6050 b._submitIfValid = !0
6051 }).find("[name], [data-bv-field]").each(function() {
6053 e = c.attr("name") || c.attr("data-bv-field"),
6054 m = b._parseOptions(c);
6055 m && (c.attr("data-bv-field", e), a.fields[e] = d.extend({}, m, a.fields[e]))
6057 this.options = d.extend(!0, this.options, a);
6058 this.$hiddenButton = d("<button/>").attr("type", "submit").prependTo(this.$form).addClass("bv-hidden-submit").css({
6063 this.$form.on("click.bv", '[type="submit"]', function(a) {
6064 a = d(a.target).eq(0);
6065 !b.options.submitButtons || a.is(b.options.submitButtons) || a.is(b.$hiddenButton) || b.$form.off("submit.bv").submit()
6067 for (var c in this.options.fields) this._initField(c);
6068 this.$form.trigger(d.Event(this.options.events.formInit), {
6070 options: this.options
6072 this.options.onSuccess && this.$form.on(this.options.events.formSuccess, function(a) {
6073 d.fn.bootstrapValidator.helpers.call(b.options.onSuccess, [a])
6075 this.options.onError &&
6076 this.$form.on(this.options.events.formError, function(a) {
6077 d.fn.bootstrapValidator.helpers.call(b.options.onError, [a])
6080 _parseOptions: function(b) {
6081 var a, c, f, k, m, s, u, x = b.attr("name") || b.attr("data-bv-field"),
6083 for (c in d.fn.bootstrapValidator.validators)
6084 if (a = d.fn.bootstrapValidator.validators[c], f = b.attr("data-bv-" + c.toLowerCase()) + "", u = "function" == typeof a.enableByHtml5 ? a.enableByHtml5(b) : null, u && "false" !== f || !0 !== u && ("" === f || "true" === f))
6085 for (s in a.html5Attributes = d.extend({}, {
6088 onsuccess: "onSuccess"
6089 }, a.html5Attributes), p[c] = d.extend({}, !0 === u ? {} : u, p[c]), a.html5Attributes) k = a.html5Attributes[s], (m = b.attr("data-bv-" + c.toLowerCase() + "-" + s)) && ("true" === m ? m = !0 : "false" === m && (m = !1), p[c][k] = m);
6091 excluded: b.attr("data-bv-excluded"),
6092 feedbackIcons: b.attr("data-bv-feedbackicons"),
6093 trigger: b.attr("data-bv-trigger"),
6094 message: b.attr("data-bv-message"),
6095 container: b.attr("data-bv-container"),
6096 group: b.attr("data-bv-group"),
6097 selector: b.attr("data-bv-selector"),
6098 threshold: b.attr("data-bv-threshold"),
6099 onStatus: b.attr("data-bv-onstatus"),
6100 onSuccess: b.attr("data-bv-onsuccess"),
6101 onError: b.attr("data-bv-onerror"),
6104 a = d.isEmptyObject(b);
6105 return !d.isEmptyObject(p) || !a && this.options.fields && this.options.fields[x] ? (b.validators = p, b) : null
6107 _initField: function(b) {
6112 b = b.attr("data-bv-field");
6115 a = this.getFieldElements(b), a.attr("data-bv-field", b)
6117 if (null !== this.options.fields[b] && null !== this.options.fields[b].validators) {
6118 if (0 === a.length) return void delete this.options.fields[b];
6119 for (var c in this.options.fields[b].validators) d.fn.bootstrapValidator.validators[c] || delete this.options.fields[b].validators[c];
6120 null === this.options.fields[b].enabled && (this.options.fields[b].enabled = !0);
6121 for (var f = this, k = a.length, m = a.attr("type"), s = 1 === k || "radio" === m || "checkbox" === m, u = "radio" === m || "checkbox" === m || "file" === m || "SELECT" === a.eq(0).get(0).tagName ? "change" : this._changeEvent, u = (this.options.fields[b].trigger || this.options.trigger || u).split(" "), x = d.map(u, function(a) {
6122 return a + ".update.bv"
6124 p = 0; k > p; p++) {
6126 t = this.options.fields[b].group || this.options.group,
6128 h = this.options.fields[b].container || this.options.container,
6129 t = h && "tooltip" !== h && "popover" !== h ? d(h) : this._getMessageContainer(q, t);
6130 h && "tooltip" !== h && "popover" !== h && t.addClass("has-error");
6131 t.find('.help-block[data-bv-validator][data-bv-for="' + b + '"]').remove();
6132 B.find('i[data-bv-icon-for="' + b + '"]').remove();
6133 q.off(x).on(x, function() {
6134 f.updateStatus(d(this), f.STATUS_NOT_VALIDATED)
6136 q.data("bv.messages", t);
6137 for (c in this.options.fields[b].validators) q.data("bv.result." +
6138 c, this.STATUS_NOT_VALIDATED), s && p !== k - 1 || d("<small/>").css("display", "none").addClass("help-block").attr("data-bv-validator", c).attr("data-bv-for", b).attr("data-bv-result", this.STATUS_NOT_VALIDATED).html(this._getMessage(b, c)).appendTo(t), this.options.fields[b].validators[c].onSuccess && q.on(this.options.events.validatorSuccess, function(a, h) {
6139 d.fn.bootstrapValidator.helpers.call(f.options.fields[b].validators[c].onSuccess, [a, h])
6140 }), this.options.fields[b].validators[c].onError && q.on(this.options.events.validatorError,
6142 d.fn.bootstrapValidator.helpers.call(f.options.fields[b].validators[c].onError, [a, h])
6144 if (!1 !== this.options.fields[b].feedbackIcons && "false" !== this.options.fields[b].feedbackIcons && this.options.feedbackIcons && this.options.feedbackIcons.validating && this.options.feedbackIcons.invalid && this.options.feedbackIcons.valid && (!s || p === k - 1)) {
6145 B.removeClass("has-success").removeClass("has-error").addClass("has-feedback");
6146 h = d("<i/>").css("display", "none").addClass("form-control-feedback").attr("data-bv-icon-for",
6148 if ("checkbox" === m || "radio" === m) q = q.parent(), q.hasClass(m) ? h.insertAfter(q) : q.parent().hasClass(m) && h.insertAfter(q.parent());
6149 0 === B.find("label").length && h.css("top", 0);
6150 0 !== B.find(".input-group").length && h.css({
6153 }).insertAfter(B.find(".input-group").eq(0))
6156 switch (this.options.fields[b].onSuccess && a.on(this.options.events.fieldSuccess, function(a, c) {
6157 d.fn.bootstrapValidator.helpers.call(f.options.fields[b].onSuccess, [a, c])
6158 }), this.options.fields[b].onError && a.on(this.options.events.fieldError,
6160 d.fn.bootstrapValidator.helpers.call(f.options.fields[b].onError, [a, c])
6161 }), this.options.fields[b].onStatus && a.on(this.options.events.fieldStatus, function(a, c) {
6162 d.fn.bootstrapValidator.helpers.call(f.options.fields[b].onStatus, [a, c])
6163 }), x = d.map(u, function(a) {
6164 return a + ".live.bv"
6165 }).join(" "), this.options.live) {
6172 a.off(x).on(x, function() {
6173 f._exceedThreshold(d(this)) && f.validateField(d(this))
6176 a.trigger(d.Event(this.options.events.fieldInit), {
6183 _getMessage: function(b, a) {
6184 if (!(this.options.fields[b] && d.fn.bootstrapValidator.validators[a] && this.options.fields[b].validators && this.options.fields[b].validators[a])) return "";
6185 var c = this.options.fields[b].validators[a];
6189 case !!this.options.fields[b].message:
6190 return this.options.fields[b].message;
6191 case !!d.fn.bootstrapValidator.i18n[a]:
6192 return d.fn.bootstrapValidator.i18n[a]["default"];
6194 return this.options.message
6197 _getMessageContainer: function(b,
6200 if (c.is(a)) return c;
6201 var d = c.attr("class");
6202 if (!d) return this._getMessageContainer(c, a);
6203 for (var d = d.split(" "), k = d.length, m = 0; k > m; m++)
6204 if (/^col-(xs|sm|md|lg)-\d+$/.test(d[m]) || /^col-(xs|sm|md|lg)-offset-\d+$/.test(d[m])) return c;
6205 return this._getMessageContainer(c, a)
6207 _submit: function() {
6208 var b = this.isValid(),
6209 a = d.Event(b ? this.options.events.formSuccess : this.options.events.formError);
6210 this.$form.trigger(a);
6211 this.$submitButton && (b ? this._onSuccess(a) : this._onError(a))
6213 _isExcluded: function(b) {
6215 b.attr("data-bv-excluded"),
6216 c = b.attr("data-bv-field") || b.attr("name");
6218 case !!c && this.options.fields && this.options.fields[c] && ("true" === this.options.fields[c].excluded || !0 === this.options.fields[c].excluded):
6222 case !!c && this.options.fields && this.options.fields[c] && ("false" === this.options.fields[c].excluded || !1 === this.options.fields[c].excluded):
6226 if (this.options.excluded)
6227 for ("string" == typeof this.options.excluded && (this.options.excluded =
6228 d.map(this.options.excluded.split(","), function(a) {
6230 })), a = this.options.excluded.length, c = 0; a > c; c++)
6231 if ("string" == typeof this.options.excluded[c] && b.is(this.options.excluded[c]) || "function" == typeof this.options.excluded[c] && !0 === this.options.excluded[c].call(this, b, this)) return !0;
6235 _exceedThreshold: function(b) {
6236 var a = b.attr("data-bv-field");
6237 return (a = this.options.fields[a].threshold || this.options.threshold) ? -1 !== d.inArray(b.attr("type"), "button checkbox file hidden image radio reset submit".split(" ")) ||
6238 b.val().length >= a : !0
6240 _onError: function(b) {
6241 if (!b.isDefaultPrevented()) {
6242 if ("submitted" === this.options.live) {
6243 this.options.live = "enabled";
6246 for (c in this.options.fields)! function(b) {
6247 b = a.getFieldElements(b);
6249 var f = d(b[0]).attr("type"),
6250 f = "radio" === f || "checkbox" === f || "file" === f || "SELECT" === d(b[0]).get(0).tagName ? "change" : a._changeEvent,
6251 f = d.map((a.options.fields[c].trigger || a.options.trigger || f).split(" "), function(a) {
6252 return a + ".live.bv"
6254 b.off(f).on(f, function() {
6255 a._exceedThreshold(d(this)) &&
6256 a.validateField(d(this))
6261 if (b = this.$invalidFields.eq(0)) {
6262 var f, k = b.parents(".tab-pane");
6263 k && (f = k.attr("id")) && d('a[href="#' + f + '"][data-toggle="tab"]').tab("show");
6268 _onSuccess: function(b) {
6269 b.isDefaultPrevented() || this.disableSubmitButtons(!0).defaultSubmit()
6271 _onFieldValidated: function(b, a) {
6272 var c = b.attr("data-bv-field"),
6273 f = this.options.fields[c].validators,
6281 if (a) switch (b.data("bv.result." + a)) {
6282 case this.STATUS_INVALID:
6283 b.trigger(d.Event(this.options.events.validatorError),
6286 case this.STATUS_VALID:
6287 b.trigger(d.Event(this.options.events.validatorSuccess), c)
6289 k[this.STATUS_NOT_VALIDATED] = 0;
6290 k[this.STATUS_VALIDATING] = 0;
6291 k[this.STATUS_INVALID] = 0;
6292 k[this.STATUS_VALID] = 0;
6294 if (!1 !== f[s].enabled) {
6296 var u = b.data("bv.result." + s);
6299 k[this.STATUS_VALID] === m ? (this.$invalidFields = this.$invalidFields.not(b), b.trigger(d.Event(this.options.events.fieldSuccess), c)) : 0 === k[this.STATUS_NOT_VALIDATED] && 0 === k[this.STATUS_VALIDATING] && 0 < k[this.STATUS_INVALID] && (this.$invalidFields =
6300 this.$invalidFields.add(b), b.trigger(d.Event(this.options.events.fieldError), c))
6302 getFieldElements: function(b) {
6303 return this._cacheFields[b] || (this._cacheFields[b] = this.options.fields[b] && this.options.fields[b].selector ? d(this.options.fields[b].selector) : this.$form.find('[name="' + b + '"]')), this._cacheFields[b]
6305 disableSubmitButtons: function(b) {
6306 return b ? "disabled" !== this.options.live && this.$form.find(this.options.submitButtons).attr("disabled", "disabled") : this.$form.find(this.options.submitButtons).removeAttr("disabled"),
6309 validate: function() {
6310 if (!this.options.fields) return this;
6311 this.disableSubmitButtons(!0);
6312 for (var b in this.options.fields) this.validateField(b);
6313 return this._submit(), this
6315 validateField: function(b) {
6320 b = b.attr("data-bv-field");
6323 a = this.getFieldElements(b)
6325 if (this.options.fields[b] && !1 === this.options.fields[b].enabled) return this;
6326 for (var c, f, k = this, m = a.attr("type"), s = "radio" === m || "checkbox" === m ? 1 : a.length, u = "radio" === m || "checkbox" ===
6327 m, m = this.options.fields[b].validators, x = 0; s > x; x++) {
6329 if (!this._isExcluded(p))
6331 p.data("bv.dfs." + c) && p.data("bv.dfs." + c).reject();
6332 var q = p.data("bv.result." + c);
6333 q !== this.STATUS_VALID && q !== this.STATUS_INVALID && !1 !== m[c].enabled ? (p.data("bv.result." + c, this.STATUS_VALIDATING), f = d.fn.bootstrapValidator.validators[c].validate(this, p, m[c]), "object" == typeof f && f.resolve ? (this.updateStatus(u ? b : p, this.STATUS_VALIDATING, c), p.data("bv.dfs." + c, f), f.done(function(a, b, c, d) {
6334 a.removeData("bv.dfs." +
6336 d && k.updateMessage(a, b, d);
6337 k.updateStatus(u ? a.attr("data-bv-field") : a, c ? k.STATUS_VALID : k.STATUS_INVALID, b);
6338 c && !0 === k._submitIfValid && k._submit()
6339 })) : "object" == typeof f && void 0 !== f.valid && void 0 !== f.message ? (this.updateMessage(u ? b : p, c, f.message), this.updateStatus(u ? b : p, f.valid ? this.STATUS_VALID : this.STATUS_INVALID, c)) : "boolean" == typeof f && this.updateStatus(u ? b : p, f ? this.STATUS_VALID : this.STATUS_INVALID, c)) : this._onFieldValidated(p, c)
6344 updateMessage: function(b, a, c) {
6350 b = b.attr("data-bv-field");
6353 f = this.getFieldElements(b)
6356 d(this).data("bv.messages").find('.help-block[data-bv-validator="' + a + '"][data-bv-for="' + b + '"]').html(c)
6359 updateStatus: function(b, a, c) {
6364 b = b.attr("data-bv-field");
6367 f = this.getFieldElements(b)
6369 a === this.STATUS_NOT_VALIDATED && (this._submitIfValid = !1);
6370 for (var k = f.attr("type"), m = this.options.fields[b].group || this.options.group, k = "radio" === k || "checkbox" ===
6371 k ? 1 : f.length, s = 0; k > s; s++) {
6373 if (!this._isExcluded(u)) {
6374 var x = u.parents(m),
6375 p = u.data("bv.messages").find('.help-block[data-bv-validator][data-bv-for="' + b + '"]'),
6376 q = c ? p.filter('[data-bv-validator="' + c + '"]') : p,
6377 t = x.find('.form-control-feedback[data-bv-icon-for="' + b + '"]'),
6378 B = this.options.fields[b].container || this.options.container,
6380 if (c) u.data("bv.result." + c, a);
6382 for (var n in this.options.fields[b].validators) u.data("bv.result." + n, a);
6383 q.attr("data-bv-result", a);
6384 var v, L, N = u.parents(".tab-pane");
6385 switch (N && (v = N.attr("id")) && (L = d('a[href="#' + v + '"][data-toggle="tab"]').parent()), a) {
6386 case this.STATUS_VALIDATING:
6388 this.disableSubmitButtons(!0);
6389 x.removeClass("has-success").removeClass("has-error");
6390 t && t.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.invalid).addClass(this.options.feedbackIcons.validating).show();
6391 L && L.removeClass("bv-tab-success").removeClass("bv-tab-error");
6393 case this.STATUS_INVALID:
6395 this.disableSubmitButtons(!0);
6396 x.removeClass("has-success").addClass("has-error");
6397 t && t.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.validating).addClass(this.options.feedbackIcons.invalid).show();
6398 L && L.removeClass("bv-tab-success").addClass("bv-tab-error");
6400 case this.STATUS_VALID:
6401 h = 0 === p.filter('[data-bv-result="' + this.STATUS_NOT_VALIDATED + '"]').length ? p.filter('[data-bv-result="' + this.STATUS_VALID + '"]').length === p.length : null;
6402 null !== h && (this.disableSubmitButtons(this.$submitButton ? !this.isValid() : !h), t && t.removeClass(this.options.feedbackIcons.invalid).removeClass(this.options.feedbackIcons.validating).removeClass(this.options.feedbackIcons.valid).addClass(h ?
6403 this.options.feedbackIcons.valid : this.options.feedbackIcons.invalid).show());
6404 x.removeClass("has-error has-success").addClass(this.isValidContainer(x) ? "has-success" : "has-error");
6405 L && L.removeClass("bv-tab-success").removeClass("bv-tab-error").addClass(this.isValidContainer(N) ? "bv-tab-success" : "bv-tab-error");
6408 h = null, this.disableSubmitButtons(!1), x.removeClass("has-success").removeClass("has-error"), t && t.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.invalid).removeClass(this.options.feedbackIcons.validating).hide(),
6409 L && L.removeClass("bv-tab-success").removeClass("bv-tab-error")
6412 case t && "tooltip" === B:
6413 !1 === h ? t.css("cursor", "pointer").tooltip("destroy").tooltip({
6416 title: p.filter('[data-bv-result="' + this.STATUS_INVALID + '"]').eq(0).html()
6417 }) : t.css("cursor", "").tooltip("destroy");
6419 case t && "popover" === B:
6420 !1 === h ? t.css("cursor", "pointer").popover("destroy").popover({
6421 content: p.filter('[data-bv-result="' + this.STATUS_INVALID + '"]').eq(0).html(),
6424 trigger: "hover click"
6426 t.css("cursor", "").popover("destroy");
6429 a === this.STATUS_INVALID ? q.show() : q.hide()
6431 u.trigger(d.Event(this.options.events.fieldStatus), {
6437 this._onFieldValidated(u, c)
6442 isValid: function() {
6443 for (var b in this.options.fields)
6444 if (!this.isValidField(b)) return !1;
6447 isValidField: function(b) {
6452 b = b.attr("data-bv-field");
6455 a = this.getFieldElements(b)
6457 if (0 === a.length || null === this.options.fields[b] || !1 === this.options.fields[b].enabled) return !0;
6458 for (var c, f, k, m = a.attr("type"), m = "radio" === m || "checkbox" === m ? 1 : a.length, s = 0; m > s; s++)
6459 if (c = a.eq(s), !this._isExcluded(c))
6460 for (f in this.options.fields[b].validators)
6461 if (!1 !== this.options.fields[b].validators[f].enabled && (k = c.data("bv.result." + f), k !== this.STATUS_VALID)) return !1;
6464 isValidContainer: function(b) {
6467 b = "string" == typeof b ? d(b) : b;
6468 if (0 === b.length) return !0;
6469 b.find("[data-bv-field]").each(function() {
6471 f = b.attr("data-bv-field");
6472 a._isExcluded(b) || c[f] || (c[f] = b)
6476 if (0 !== k.data("bv.messages").find('.help-block[data-bv-validator][data-bv-for="' + f + '"]').filter(function() {
6477 var b = d(this).attr("data-bv-validator"),
6478 c = d(this).attr("data-bv-for");
6479 return !1 !== a.options.fields[c].validators[b].enabled && k.data("bv.result." + b) && k.data("bv.result." + b) !== a.STATUS_VALID
6480 }).length) return !1
6484 defaultSubmit: function() {
6485 this.$submitButton && d("<input/>").attr("type", "hidden").attr("data-bv-submit-hidden", "").attr("name",
6486 this.$submitButton.attr("name")).val(this.$submitButton.val()).appendTo(this.$form);
6487 this.$form.off("submit.bv").submit()
6489 getInvalidFields: function() {
6490 return this.$invalidFields
6492 getSubmitButton: function() {
6493 return this.$submitButton
6495 getMessages: function(b, a) {
6500 case b && "object" == typeof b:
6503 case b && "string" == typeof b:
6504 var m = this.getFieldElements(b);
6505 0 < m.length && (k = m.attr("type"), k = "radio" === k || "checkbox" === k ? m.eq(0) : m);
6508 k = this.$invalidFields
6511 a ? '[data-bv-validator="' + a + '"]' : "";
6512 return k.each(function() {
6513 f = f.concat(d(this).data("bv.messages").find('.help-block[data-bv-for="' + d(this).attr("data-bv-field") + '"][data-bv-result="' + c.STATUS_INVALID + '"]' + s).map(function() {
6514 var a = d(this).attr("data-bv-validator"),
6515 b = d(this).attr("data-bv-for");
6516 return !1 === c.options.fields[b].validators[a].enabled ? "" : d(this).html()
6520 getOptions: function(b, a, c) {
6521 if (!b) return this.options;
6522 if ("object" == typeof b && (b = b.attr("data-bv-field")), !this.options.fields[b]) return null;
6523 b = this.options.fields[b];
6524 return a ? b.validators && b.validators[a] ? c ? b.validators[a][c] : b.validators[a] : null : b
6526 updateOption: function(b, a, c, d) {
6527 return "object" == typeof b && (b = b.attr("data-bv-field")), this.options.fields[b] && this.options.fields[b].validators[a] && (this.options.fields[b].validators[a][c] = d, this.updateStatus(b, this.STATUS_NOT_VALIDATED, a)), this
6529 addField: function(b, a) {
6534 b = b.attr("data-bv-field") || b.attr("name");
6537 delete this._cacheFields[b],
6538 c = this.getFieldElements(b)
6540 c.attr("data-bv-field", b);
6541 for (var f = c.attr("type"), k = "radio" === f || "checkbox" === f ? 1 : c.length, m = 0; k > m; m++) {
6543 u = this._parseOptions(s),
6544 u = null === u ? a : d.extend(!0, a, u);
6545 this.options.fields[b] = d.extend(!0, this.options.fields[b], u);
6546 this._cacheFields[b] = this._cacheFields[b] ? this._cacheFields[b].add(s) : s;
6547 this._initField("checkbox" === f || "radio" === f ? b : s)
6549 return this.disableSubmitButtons(!1), this.$form.trigger(d.Event(this.options.events.fieldAdded), {
6552 options: this.options.fields[b]
6556 removeField: function(b) {
6561 b = b.attr("data-bv-field") || b.attr("name");
6562 a.attr("data-bv-field", b);
6565 a = this.getFieldElements(b)
6567 if (0 === a.length) return this;
6568 for (var c = a.attr("type"), f = "radio" === c || "checkbox" === c ? 1 : a.length, k = 0; f > k; k++) {
6570 this.$invalidFields = this.$invalidFields.not(m);
6571 this._cacheFields[b] = this._cacheFields[b].not(m)
6573 return this._cacheFields[b] && 0 !== this._cacheFields[b].length || delete this.options.fields[b], ("checkbox" === c || "radio" === c) && this._initField(b), this.disableSubmitButtons(!1), this.$form.trigger(d.Event(this.options.events.fieldRemoved), {
6578 resetField: function(b, a) {
6583 b = b.attr("data-bv-field");
6586 c = this.getFieldElements(b)
6589 if (this.options.fields[b])
6590 for (var k = 0; f > k; k++)
6591 for (var m in this.options.fields[b].validators) c.eq(k).removeData("bv.dfs." + m);
6592 if (this.updateStatus(b, this.STATUS_NOT_VALIDATED),
6593 a) f = c.attr("type"), "radio" === f || "checkbox" === f ? c.removeAttr("checked").removeAttr("selected") : c.val("");
6596 resetForm: function(b) {
6597 for (var a in this.options.fields) this.resetField(a, b);
6598 return this.$invalidFields = d([]), this.$submitButton = null, this.disableSubmitButtons(!1), this
6600 revalidateField: function(b) {
6601 return this.updateStatus(b, this.STATUS_NOT_VALIDATED).validateField(b), this
6603 enableFieldValidators: function(b, a, c) {
6604 var d = this.options.fields[b].validators;
6605 if (c && d && d[c] && d[c].enabled !== a) this.options.fields[b].validators[c].enabled =
6606 a, this.updateStatus(b, this.STATUS_NOT_VALIDATED, c);
6607 else if (!c && this.options.fields[b].enabled !== a) {
6608 this.options.fields[b].enabled = a;
6609 for (var k in d) this.enableFieldValidators(b, a, k)
6613 getDynamicOption: function(b, a) {
6614 var c = "string" == typeof b ? this.getFieldElements(b) : b,
6616 if ("function" == typeof a) return d.fn.bootstrapValidator.helpers.call(a, [f, this, c]);
6617 if ("string" == typeof a) {
6618 var k = this.getFieldElements(a);
6619 return k.length ? k.val() : d.fn.bootstrapValidator.helpers.call(a, [f, this, c]) || a
6623 destroy: function() {
6624 var b, a, c, d, k, m, s;
6625 for (b in this.options.fields) {
6626 a = this.getFieldElements(b);
6627 m = this.options.fields[b].container || this.options.container;
6628 s = this.options.fields[b].group || this.options.group;
6629 for (var u = 0; u < a.length; u++) {
6630 if (c = a.eq(u), c.data("bv.messages").find('.help-block[data-bv-validator][data-bv-for="' + b + '"]').remove().end().end().removeData("bv.messages").parents(s).removeClass("has-feedback has-error has-success").end().off(".bv").removeAttr("data-bv-field"), k = c.parents(s).find('i[data-bv-icon-for="' +
6631 b + '"]')) switch (m) {
6633 k.tooltip("destroy").remove();
6636 k.popover("destroy").remove();
6641 for (d in this.options.fields[b].validators) c.data("bv.dfs." + d) && c.data("bv.dfs." + d).reject(), c.removeData("bv.result." + d).removeData("bv.dfs." + d)
6644 this.disableSubmitButtons(!1);
6645 this.$hiddenButton.remove();
6646 this.$form.removeClass(this.options.elementClass).off(".bv").removeData("bootstrapValidator").find("[data-bv-submit-hidden]").remove().end().find('[type="submit"]').off("click.bv")
6649 d.fn.bootstrapValidator = function(b) {
6651 return this.each(function() {
6653 f = e.data("bootstrapValidator"),
6654 k = "object" == typeof b && b;
6655 f || (f = new c(this, k), e.data("bootstrapValidator", f));
6656 "string" == typeof b && f[b].apply(f, Array.prototype.slice.call(a, 1))
6659 d.fn.bootstrapValidator.DEFAULT_OPTIONS = {
6660 elementClass: "bv-form",
6661 message: "This value is not valid",
6662 group: ".form-group",
6665 excluded: [":disabled", ":hidden", ":not(:visible)"],
6671 submitButtons: '[type="submit"]',
6675 formInit: "init.form.bv",
6676 formError: "error.form.bv",
6677 formSuccess: "success.form.bv",
6678 fieldAdded: "added.field.bv",
6679 fieldRemoved: "removed.field.bv",
6680 fieldInit: "init.field.bv",
6681 fieldError: "error.field.bv",
6682 fieldSuccess: "success.field.bv",
6683 fieldStatus: "status.field.bv",
6684 validatorError: "error.validator.bv",
6685 validatorSuccess: "success.validator.bv"
6688 d.fn.bootstrapValidator.validators = {};
6689 d.fn.bootstrapValidator.i18n = {};
6690 d.fn.bootstrapValidator.Constructor =
6692 d.fn.bootstrapValidator.helpers = {
6693 call: function(b, a) {
6694 if ("function" == typeof b) return b.apply(this, a);
6695 if ("string" == typeof b) {
6696 "()" === b.substring(b.length - 2) && (b = b.substring(0, b.length - 2));
6697 for (var c = b.split("."), d = c.pop(), k = window, m = 0; m < c.length; m++) k = k[c[m]];
6698 return "undefined" == typeof k[d] ? null : k[d].apply(this, a)
6701 format: function(b, a) {
6702 d.isArray(a) || (a = [a]);
6703 for (var c in a) b = b.replace("%s", a[c]);
6706 date: function(b, a, c, d) {
6707 if (isNaN(b) || isNaN(a) || isNaN(c) || 2 < c.length || 2 < a.length || 4 < b.length || (c = parseInt(c,
6708 10), a = parseInt(a, 10), b = parseInt(b, 10), 1E3 > b || 9999 < b || 0 >= a || 12 < a)) return !1;
6709 var k = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
6710 if ((0 === b % 400 || 0 !== b % 100 && 0 === b % 4) && (k[1] = 29), 0 >= c || c > k[a - 1]) return !1;
6713 d = m.getFullYear();
6716 return d > b || b === d && k > a - 1 || b === d && a - 1 === k && m > c
6721 for (var a = b.length, c = 0, d = [
6722 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
6723 [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]
6724 ], k = 0; a--;) k += d[c][parseInt(b.charAt(a), 10)], c ^= 1;
6725 return 0 === k % 10 && 0 < k
6727 mod11And10: function(b) {
6729 5, c = b.length, d = 0; c > d; d++) a = (2 * (a || 10) % 11 + parseInt(b.charAt(d), 10)) % 10;
6732 mod37And36: function(b, a) {
6733 a = a || "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
6734 for (var c = a.length, d = b.length, k = Math.floor(c / 2), m = 0; d > m; m++) k = (2 * (k || c) % (c + 1) + a.indexOf(b.charAt(m))) % c;
6740 d.fn.bootstrapValidator.i18n.base64 = d.extend(d.fn.bootstrapValidator.i18n.base64 || {}, {
6741 "default": "Please enter a valid base 64 encoded"
6743 d.fn.bootstrapValidator.validators.base64 = {
6744 validate: function(c, b) {
6746 return "" === a ? !0 : /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(a)
6751 d.fn.bootstrapValidator.i18n.between = d.extend(d.fn.bootstrapValidator.i18n.between || {}, {
6752 "default": "Please enter a value between %s and %s",
6753 notInclusive: "Please enter a value between %s and %s strictly"
6755 d.fn.bootstrapValidator.validators.between = {
6760 inclusive: "inclusive"
6762 enableByHtml5: function(c) {
6763 return "range" === c.attr("type") ? {
6768 validate: function(c, b, a) {
6770 if ("" === e) return !0;
6771 if (!d.isNumeric(e)) return !1;
6772 var f = d.isNumeric(a.min) ? a.min : c.getDynamicOption(b, a.min);
6773 c = d.isNumeric(a.max) ? a.max : c.getDynamicOption(b, a.max);
6774 return e = parseFloat(e), !0 === a.inclusive || void 0 === a.inclusive ? {
6775 valid: e >= f && c >= e,
6776 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.between["default"], [f, c])
6778 valid: e > f && c > e,
6779 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.between.notInclusive, [f, c])
6785 d.fn.bootstrapValidator.i18n.callback = d.extend(d.fn.bootstrapValidator.i18n.callback || {}, {
6786 "default": "Please enter a valid value"
6788 d.fn.bootstrapValidator.validators.callback = {
6791 callback: "callback"
6793 validate: function(c, b, a) {
6796 var f = new d.Deferred;
6797 c = d.fn.bootstrapValidator.helpers.call(a.callback, [e, c, b]);
6798 return f.resolve(b, "callback", "boolean" == typeof c ? c : c.valid, "object" == typeof c && c.message ? c.message : null), f
6805 d.fn.bootstrapValidator.i18n.choice = d.extend(d.fn.bootstrapValidator.i18n.choice || {}, {
6806 "default": "Please enter a valid value",
6807 less: "Please choose %s options at minimum",
6808 more: "Please choose %s options at maximum",
6809 between: "Please choose %s - %s options"
6811 d.fn.bootstrapValidator.validators.choice = {
6817 validate: function(c, b, a) {
6818 var e = b.is("select") ? c.getFieldElements(b.attr("data-bv-field")).find("option").filter(":selected").length : c.getFieldElements(b.attr("data-bv-field")).filter(":checked").length,
6819 f = a.min ? d.isNumeric(a.min) ? a.min : c.getDynamicOption(b, a.min) : null;
6820 c = a.max ? d.isNumeric(a.max) ? a.max : c.getDynamicOption(b, a.max) : null;
6822 var k = a.message || d.fn.bootstrapValidator.i18n.choice["default"];
6823 switch ((f && e < parseInt(f, 10) || c && e > parseInt(c, 10)) && (b = !1), !0) {
6825 k = d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.choice.between, [parseInt(f, 10), parseInt(c, 10)]);
6828 k = d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.choice.less,
6832 k = d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.choice.more, parseInt(c, 10))
6842 d.fn.bootstrapValidator.i18n.creditCard = d.extend(d.fn.bootstrapValidator.i18n.creditCard || {}, {
6843 "default": "Please enter a valid credit card number"
6845 d.fn.bootstrapValidator.validators.creditCard = {
6846 validate: function(c, b) {
6848 if ("" === a) return !0;
6849 if (/[^0-9-\s]+/.test(a) || (a = a.replace(/\D/g, ""), !d.fn.bootstrapValidator.helpers.luhn(a))) return !1;
6853 prefix: ["34", "37"]
6857 prefix: "300 301 302 303 304 305 36".split(" ")
6861 prefix: ["54", "55"]
6865 prefix: "6011 622126 622127 622128 622129 62213 62214 62215 62216 62217 62218 62219 6222 6223 6224 6225 6226 6227 6228 62290 62291 622920 622921 622922 622923 622924 622925 644 645 646 647 648 649 65".split(" ")
6869 prefix: "3528 3529 353 354 355 356 357 358".split(" ")
6872 length: [16, 17, 18, 19],
6873 prefix: ["6304", "6706", "6771", "6709"]
6876 length: [12, 13, 14, 15, 16, 17, 18, 19],
6877 prefix: "5018 5020 5038 6304 6759 6761 6762 6763 6764 6765 6766".split(" ")
6881 prefix: ["51", "52", "53", "54", "55"]
6884 length: [16, 18, 19],
6885 prefix: ["6334", "6767"]
6888 length: [16, 17, 18, 19],
6889 prefix: "622126 622127 622128 622129 62213 62214 62215 62216 62217 62218 62219 6222 6223 6224 6225 6226 6227 6228 62290 62291 622920 622921 622922 622923 622924 622925".split(" ")
6897 for (f in k[e].prefix)
6898 if (a.substr(0, k[e].prefix[f].length) === k[e].prefix[f] && -1 !== d.inArray(a.length, k[e].length)) return !0;
6904 d.fn.bootstrapValidator.i18n.cusip = d.extend(d.fn.bootstrapValidator.i18n.cusip || {}, {
6905 "default": "Please enter a valid CUSIP number"
6907 d.fn.bootstrapValidator.validators.cusip = {
6908 validate: function(c, b) {
6910 if ("" === a) return !0;
6911 if (a = a.toUpperCase(), !/^[0-9A-Z]{9}$/.test(a)) return !1;
6912 for (var a = d.map(a.split(""), function(a) {
6913 var b = a.charCodeAt(0);
6914 return 65 <= b && 90 >= b ? b - 65 + 10 : a
6915 }), e = a.length, f = 0, k = 0; e - 1 > k; k++) {
6916 var m = parseInt(a[k], 10);
6917 0 !== k % 2 && (m *= 2);
6921 return f = (10 - f % 10) % 10,
6927 d.fn.bootstrapValidator.i18n.cvv = d.extend(d.fn.bootstrapValidator.i18n.cvv || {}, {
6928 "default": "Please enter a valid CVV number"
6930 d.fn.bootstrapValidator.validators.cvv = {
6933 ccfield: "creditCardField"
6935 validate: function(c, b, a) {
6937 if ("" === b) return !0;
6938 if (!/^[0-9]{3,4}$/.test(b)) return !1;
6939 if (!a.creditCardField) return !0;
6940 c = c.getFieldElements(a.creditCardField).val();
6941 if ("" === c) return !0;
6942 c = c.replace(/\D/g, "");
6953 prefix: "300 301 302 303 304 305 36".split(" ")
6957 prefix: ["54", "55"]
6961 prefix: "6011 622126 622127 622128 622129 62213 62214 62215 62216 62217 62218 62219 6222 6223 6224 6225 6226 6227 6228 62290 62291 622920 622921 622922 622923 622924 622925 644 645 646 647 648 649 65".split(" ")
6965 prefix: "3528 3529 353 354 355 356 357 358".split(" ")
6968 length: [16, 17, 18, 19],
6969 prefix: ["6304", "6706", "6771", "6709"]
6973 13, 14, 15, 16, 17, 18, 19
6975 prefix: "5018 5020 5038 6304 6759 6761 6762 6763 6764 6765 6766".split(" ")
6979 prefix: ["51", "52", "53", "54", "55"]
6982 length: [16, 18, 19],
6983 prefix: ["6334", "6767"]
6986 length: [16, 17, 18, 19],
6987 prefix: "622126 622127 622128 622129 62213 62214 62215 62216 62217 62218 62219 6222 6223 6224 6225 6226 6227 6228 62290 62291 622920 622921 622922 622923 622924 622925".split(" ")
6996 for (f in a[e].prefix)
6998 a[e].prefix[f].length) === a[e].prefix[f] && -1 !== d.inArray(c.length, a[e].length)) {
7002 return null === k ? !1 : "AMERICAN_EXPRESS" === k ? 4 === b.length : 3 === b.length
7007 d.fn.bootstrapValidator.i18n.date = d.extend(d.fn.bootstrapValidator.i18n.date || {}, {
7008 "default": "Please enter a valid date"
7010 d.fn.bootstrapValidator.validators.date = {
7014 separator: "separator"
7016 validate: function(c, b, a) {
7018 if ("" === e) return !0;
7019 a.format = a.format || "MM/DD/YYYY";
7020 "date" === b.attr("type") && (a.format = "YYYY-MM-DD");
7021 var f = a.format.split(" "),
7023 b = 1 < f.length ? f[1] : null;
7024 c = 2 < f.length ? f[2] : null;
7025 var m = e.split(" "),
7029 if (f.length !== m.length) return !1;
7031 if ((a || (a = -1 !== s.indexOf("/") ? "/" : -1 !== s.indexOf("-") ? "-" : null), null === a || -1 === s.indexOf(a)) || (s = s.split(a), k = k.split(a), s.length !== k.length)) return !1;
7032 a = s[d.inArray("YYYY", k)];
7033 f = s[d.inArray("MM", k)];
7034 k = s[d.inArray("DD", k)];
7035 if (!a || !f || !k || 4 !== a.length) return !1;
7036 var u = m = s = null;
7038 if (b = b.split(":"), e = e.split(":"), b.length !== e.length) return !1;
7039 if (m = 0 < e.length ? e[0] : null, s = 1 < e.length ? e[1] : null, u = 2 < e.length ? e[2] : null)
7040 if (isNaN(u) || 2 < u.length || (u = parseInt(u,
7041 10), 0 > u || 60 < u)) return !1;
7042 if (m && (isNaN(m) || 2 < m.length || (m = parseInt(m, 10), 0 > m || 24 <= m || c && 12 < m)) || s && (isNaN(s) || 2 < s.length || (s = parseInt(s, 10), 0 > s || 59 < s))) return !1
7044 return d.fn.bootstrapValidator.helpers.date(a, f, k)
7049 d.fn.bootstrapValidator.i18n.different = d.extend(d.fn.bootstrapValidator.i18n.different || {}, {
7050 "default": "Please enter a different value"
7052 d.fn.bootstrapValidator.validators.different = {
7057 validate: function(c, b, a) {
7059 if ("" === b) return !0;
7060 var d = c.getFieldElements(a.field);
7061 return null === d || 0 === d.length ? !0 : b !== d.val() ? (c.updateStatus(a.field, c.STATUS_VALID, "different"), !0) : !1
7066 d.fn.bootstrapValidator.i18n.digits = d.extend(d.fn.bootstrapValidator.i18n.digits || {}, {
7067 "default": "Please enter only digits"
7069 d.fn.bootstrapValidator.validators.digits = {
7070 validate: function(c, b) {
7072 return "" === a ? !0 : /^\d+$/.test(a)
7077 d.fn.bootstrapValidator.i18n.ean = d.extend(d.fn.bootstrapValidator.i18n.ean || {}, {
7078 "default": "Please enter a valid EAN number"
7080 d.fn.bootstrapValidator.validators.ean = {
7081 validate: function(c, b) {
7083 if ("" === a) return !0;
7084 if (!/^(\d{8}|\d{12}|\d{13})$/.test(a)) return !1;
7085 for (var d = a.length, f = 0, k = 8 === d ? [3, 1] : [1, 3], m = 0; d - 1 > m; m++) f += parseInt(a.charAt(m), 10) * k[m % 2];
7086 return f = (10 - f % 10) % 10, f + "" === a.charAt(d - 1)
7091 d.fn.bootstrapValidator.i18n.emailAddress = d.extend(d.fn.bootstrapValidator.i18n.emailAddress || {}, {
7092 "default": "Please enter a valid email address"
7094 d.fn.bootstrapValidator.validators.emailAddress = {
7095 enableByHtml5: function(c) {
7096 return "email" === c.attr("type")
7098 validate: function(c, b) {
7100 return "" === a ? !0 : /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)
7105 d.fn.bootstrapValidator.i18n.file = d.extend(d.fn.bootstrapValidator.i18n.file || {}, {
7106 "default": "Please choose a valid file"
7108 d.fn.bootstrapValidator.validators.file = {
7110 extension: "extension",
7115 validate: function(c, b, a) {
7117 if ("" === e) return !0;
7119 c = a.extension ? a.extension.toLowerCase().split(",") : null;
7120 var k = a.type ? a.type.toLowerCase().split(",") : null;
7121 if (window.File && window.FileList && window.FileReader) {
7123 for (var e = b.length, m = 0; e > m; m++)
7124 if (a.maxSize && b[m].size > parseInt(a.maxSize, 10) || (f = b[m].name.substr(b[m].name.lastIndexOf(".") + 1), c && -1 === d.inArray(f.toLowerCase(), c)) || b[m].type && k && -1 === d.inArray(b[m].type.toLowerCase(), k)) return !1
7125 } else if (f = e.substr(e.lastIndexOf(".") + 1), c && -1 === d.inArray(f.toLowerCase(), c)) return !1;
7131 d.fn.bootstrapValidator.i18n.greaterThan = d.extend(d.fn.bootstrapValidator.i18n.greaterThan || {}, {
7132 "default": "Please enter a value greater than or equal to %s",
7133 notInclusive: "Please enter a value greater than %s"
7135 d.fn.bootstrapValidator.validators.greaterThan = {
7139 inclusive: "inclusive"
7141 enableByHtml5: function(c) {
7142 var b = c.attr("type");
7143 return (c = c.attr("min")) && "date" !== b ? {
7147 validate: function(c, b, a) {
7149 if ("" === e) return !0;
7150 if (!d.isNumeric(e)) return !1;
7151 c = d.isNumeric(a.value) ? a.value : c.getDynamicOption(b, a.value);
7152 return e = parseFloat(e), !0 === a.inclusive || void 0 === a.inclusive ? {
7154 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.greaterThan["default"], c)
7157 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.greaterThan.notInclusive, c)
7163 d.fn.bootstrapValidator.i18n.grid = d.extend(d.fn.bootstrapValidator.i18n.grid || {}, {
7164 "default": "Please enter a valid GRId number"
7166 d.fn.bootstrapValidator.validators.grid = {
7167 validate: function(c, b) {
7169 return "" === a ? !0 : (a = a.toUpperCase(), /^[GRID:]*([0-9A-Z]{2})[-\s]*([0-9A-Z]{5})[-\s]*([0-9A-Z]{10})[-\s]*([0-9A-Z]{1})$/g.test(a) ? (a = a.replace(/\s/g, "").replace(/-/g, ""), "GRID:" === a.substr(0, 5) && (a = a.substr(5)), d.fn.bootstrapValidator.helpers.mod37And36(a)) : !1)
7174 d.fn.bootstrapValidator.i18n.hex = d.extend(d.fn.bootstrapValidator.i18n.hex || {}, {
7175 "default": "Please enter a valid hexadecimal number"
7177 d.fn.bootstrapValidator.validators.hex = {
7178 validate: function(c, b) {
7180 return "" === a ? !0 : /^[0-9a-fA-F]+$/.test(a)
7185 d.fn.bootstrapValidator.i18n.hexColor = d.extend(d.fn.bootstrapValidator.i18n.hexColor || {}, {
7186 "default": "Please enter a valid hex color"
7188 d.fn.bootstrapValidator.validators.hexColor = {
7189 enableByHtml5: function(c) {
7190 return "color" === c.attr("type")
7192 validate: function(c, b) {
7194 return "" === a ? !0 : /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)
7199 d.fn.bootstrapValidator.i18n.iban = d.extend(d.fn.bootstrapValidator.i18n.iban || {}, {
7200 "default": "Please enter a valid IBAN number",
7201 countryNotSupported: "The country code %s is not supported",
7202 country: "Please enter a valid IBAN number in %s",
7205 AE: "United Arab Emirates",
7210 BA: "Bosnia and Herzegovina",
7224 CZ: "Czech Republic",
7227 DO: "Dominican Republic",
7232 FO: "Faroe Islands",
7234 GB: "United Kingdom",
7251 LI: "Liechtenstein",
7282 VG: "Virgin Islands, British"
7285 d.fn.bootstrapValidator.validators.iban = {
7291 AD: "AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Z0-9]{12}",
7292 AE: "AE[0-9]{2}[0-9]{3}[0-9]{16}",
7293 AL: "AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}",
7294 AO: "AO[0-9]{2}[0-9]{21}",
7295 AT: "AT[0-9]{2}[0-9]{5}[0-9]{11}",
7296 AZ: "AZ[0-9]{2}[A-Z]{4}[A-Z0-9]{20}",
7297 BA: "BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2}",
7298 BE: "BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2}",
7299 BF: "BF[0-9]{2}[0-9]{23}",
7300 BG: "BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}",
7301 BH: "BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}",
7302 BI: "BI[0-9]{2}[0-9]{12}",
7303 BJ: "BJ[0-9]{2}[A-Z]{1}[0-9]{23}",
7304 BR: "BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]",
7305 CH: "CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}",
7306 CI: "CI[0-9]{2}[A-Z]{1}[0-9]{23}",
7307 CM: "CM[0-9]{2}[0-9]{23}",
7308 CR: "CR[0-9]{2}[0-9]{3}[0-9]{14}",
7309 CV: "CV[0-9]{2}[0-9]{21}",
7310 CY: "CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}",
7311 CZ: "CZ[0-9]{2}[0-9]{20}",
7312 DE: "DE[0-9]{2}[0-9]{8}[0-9]{10}",
7313 DK: "DK[0-9]{2}[0-9]{14}",
7314 DO: "DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}",
7315 DZ: "DZ[0-9]{2}[0-9]{20}",
7316 EE: "EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1}",
7317 ES: "ES[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{1}[0-9]{1}[0-9]{10}",
7318 FI: "FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1}",
7319 FO: "FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",
7320 FR: "FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",
7321 GB: "GB[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",
7322 GE: "GE[0-9]{2}[A-Z]{2}[0-9]{16}",
7323 GI: "GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}",
7324 GL: "GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",
7325 GR: "GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Z0-9]{16}",
7326 GT: "GT[0-9]{2}[A-Z0-9]{4}[A-Z0-9]{20}",
7327 HR: "HR[0-9]{2}[0-9]{7}[0-9]{10}",
7328 HU: "HU[0-9]{2}[0-9]{3}[0-9]{4}[0-9]{1}[0-9]{15}[0-9]{1}",
7329 IE: "IE[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",
7330 IL: "IL[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{13}",
7331 IR: "IR[0-9]{2}[0-9]{22}",
7332 IS: "IS[0-9]{2}[0-9]{4}[0-9]{2}[0-9]{6}[0-9]{10}",
7333 IT: "IT[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",
7334 JO: "JO[0-9]{2}[A-Z]{4}[0-9]{4}[0]{8}[A-Z0-9]{10}",
7335 KW: "KW[0-9]{2}[A-Z]{4}[0-9]{22}",
7336 KZ: "KZ[0-9]{2}[0-9]{3}[A-Z0-9]{13}",
7337 LB: "LB[0-9]{2}[0-9]{4}[A-Z0-9]{20}",
7338 LI: "LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}",
7339 LT: "LT[0-9]{2}[0-9]{5}[0-9]{11}",
7340 LU: "LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}",
7341 LV: "LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}",
7342 MC: "MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",
7343 MD: "MD[0-9]{2}[A-Z0-9]{20}",
7344 ME: "ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",
7345 MG: "MG[0-9]{2}[0-9]{23}",
7346 MK: "MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}",
7347 ML: "ML[0-9]{2}[A-Z]{1}[0-9]{23}",
7348 MR: "MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}",
7349 MT: "MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}",
7350 MU: "MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{3}",
7351 MZ: "MZ[0-9]{2}[0-9]{21}",
7352 NL: "NL[0-9]{2}[A-Z]{4}[0-9]{10}",
7353 NO: "NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}",
7354 PK: "PK[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",
7355 PL: "PL[0-9]{2}[0-9]{8}[0-9]{16}",
7356 PS: "PS[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",
7357 PT: "PT[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{11}[0-9]{2}",
7358 QA: "QA[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",
7359 RO: "RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",
7360 RS: "RS[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",
7361 SA: "SA[0-9]{2}[0-9]{2}[A-Z0-9]{18}",
7362 SE: "SE[0-9]{2}[0-9]{3}[0-9]{16}[0-9]{1}",
7363 SI: "SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}",
7364 SK: "SK[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10}",
7365 SM: "SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",
7366 SN: "SN[0-9]{2}[A-Z]{1}[0-9]{23}",
7367 TN: "TN59[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",
7368 TR: "TR[0-9]{2}[0-9]{5}[A-Z0-9]{1}[A-Z0-9]{16}",
7369 VG: "VG[0-9]{2}[A-Z]{4}[0-9]{16}"
7371 validate: function(c, b, a) {
7373 if ("" === e) return !0;
7374 var e = e.replace(/[^a-zA-Z0-9]/g, "").toUpperCase(),
7377 typeof f && this.REGEX[f] || (f = c.getDynamicOption(b, f)) : f = e.substr(0, 2), !this.REGEX[f]) return {
7379 message: d.fn.bootstrapValidator.helpers.format(d.fn.bootstrapValidator.i18n.iban.countryNotSupported, f)
7381 if (!(new RegExp("^" + this.REGEX[f] + "$")).test(e)) return {
7383 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.iban.country, d.fn.bootstrapValidator.i18n.iban.countries[f])
7385 e = e.substr(4) + e.substr(0, 4);
7386 e = d.map(e.split(""), function(a) {
7387 var b = a.charCodeAt(0);
7389 b && 90 >= b ? b - 65 + 10 : a
7392 c = parseInt(e.substr(0, 1), 10);
7394 for (var k = 1; b > k; ++k) c = (10 * c + parseInt(e.substr(k, 1), 10)) % 97;
7397 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.iban.country, d.fn.bootstrapValidator.i18n.iban.countries[f])
7403 d.fn.bootstrapValidator.i18n.id = d.extend(d.fn.bootstrapValidator.i18n.id || {}, {
7404 "default": "Please enter a valid identification number",
7405 countryNotSupported: "The country code %s is not supported",
7406 country: "Please enter a valid %s identification number",
7408 BA: "Bosnia and Herzegovina",
7435 d.fn.bootstrapValidator.validators.id = {
7440 COUNTRY_CODES: "BA BG BR CH CL CZ DK EE ES FI HR IE IS LT LV ME MK NL RO RS SE SI SK SM ZA".split(" "),
7441 validate: function(c, b, a) {
7443 if ("" === e) return !0;
7445 return (f ? ("string" != typeof f || -1 === d.inArray(f.toUpperCase(), this.COUNTRY_CODES)) && (f = c.getDynamicOption(b, f)) : f = e.substr(0,
7446 2), -1 === d.inArray(f, this.COUNTRY_CODES)) ? {
7448 message: d.fn.bootstrapValidator.helpers.format(d.fn.bootstrapValidator.i18n.id.countryNotSupported, f)
7449 } : this[["_", f.toLowerCase()].join("")](e) ? !0 : {
7451 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.id.country, d.fn.bootstrapValidator.i18n.id.countries[f.toUpperCase()])
7454 _validateJMBG: function(c, b) {
7455 if (!/^\d{13}$/.test(c)) return !1;
7456 var a = parseInt(c.substr(0, 2), 10),
7457 d = parseInt(c.substr(2, 2), 10),
7458 f = (parseInt(c.substr(4,
7459 3), 10), parseInt(c.substr(7, 2), 10)),
7460 k = parseInt(c.substr(12, 1), 10);
7461 if (31 < a || 12 < d) return !1;
7462 for (d = a = 0; 6 > d; d++) a += (7 - d) * (parseInt(c.charAt(d), 10) + parseInt(c.charAt(d + 6), 10));
7463 if (a = 11 - a % 11, (10 === a || 11 === a) && (a = 0), a !== k) return !1;
7464 switch (b.toUpperCase()) {
7466 return 10 <= f && 19 >= f;
7468 return 41 <= f && 49 >= f;
7470 return 20 <= f && 29 >= f;
7472 return 70 <= f && 99 >= f;
7474 return 50 <= f && 59 >= f;
7480 return this._validateJMBG(c, "BA")
7483 return this._validateJMBG(c,
7487 return this._validateJMBG(c, "ME")
7490 return this._validateJMBG(c, "RS")
7493 return this._validateJMBG(c, "SI")
7496 if (!/^\d{10}$/.test(c) && !/^\d{6}\s\d{3}\s\d{1}$/.test(c)) return !1;
7497 c = c.replace(/\s/g, "");
7498 var b = parseInt(c.substr(0, 2), 10) + 1900,
7499 a = parseInt(c.substr(2, 2), 10),
7500 e = parseInt(c.substr(4, 2), 10);
7501 if (40 < a ? (b += 100, a -= 40) : 20 < a && (b -= 100, a -= 20), !d.fn.bootstrapValidator.helpers.date(b, a, e)) return !1;
7503 a = [2, 4, 8, 5, 10, 9, 7, 3, 6];
7504 for (e = 0; 9 > e; e++) b +=
7505 parseInt(c.charAt(e), 10) * a[e];
7506 return b = b % 11 % 10, b + "" === c.substr(9, 1)
7509 if (/^1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11}|0{11}$/.test(c) || !/^\d{11}$/.test(c) && !/^\d{3}\.\d{3}\.\d{3}-\d{2}$/.test(c)) return !1;
7510 c = c.replace(/\./g, "").replace(/-/g, "");
7511 for (var b = 0, a = 0; 9 > a; a++) b += (10 - a) * parseInt(c.charAt(a), 10);
7512 if (b = 11 - b % 11, (10 === b || 11 === b) && (b = 0), b + "" !== c.charAt(9)) return !1;
7513 for (a = b = 0; 10 > a; a++) b += (11 - a) * parseInt(c.charAt(a), 10);
7514 return b = 11 - b % 11, (10 === b || 11 === b) && (b = 0), b + "" === c.charAt(10)
7517 if (!/^756[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{2}$/.test(c)) return !1;
7518 c = c.replace(/\D/g, "").substr(3);
7519 for (var b = c.length, a = 0, d = 8 === b ? [3, 1] : [1, 3], f = 0; b - 1 > f; f++) a += parseInt(c.charAt(f), 10) * d[f % 2];
7520 return a = 10 - a % 10, a + "" === c.charAt(b - 1)
7523 if (!/^\d{7,8}[-]{0,1}[0-9K]$/i.test(c)) return !1;
7524 for (c = c.replace(/\-/g, ""); 9 > c.length;) c = "0" + c;
7525 for (var b = 0, a = [3, 2, 7, 6, 5, 4, 3, 2], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
7526 return b = 11 - b % 11, 11 === b ? b = 0 : 10 === b && (b = "K"), b + "" === c.charAt(8).toUpperCase()
7529 if (!/^\d{9,10}$/.test(c)) return !1;
7530 var b = 1900 + parseInt(c.substr(0, 2), 10),
7531 a = parseInt(c.substr(2, 2), 10) % 50 % 20,
7532 e = parseInt(c.substr(4, 2), 10);
7533 if (9 === c.length) {
7534 if (1980 <= b && (b -= 100), 1953 < b) return !1
7535 } else 1954 > b && (b += 100);
7536 return d.fn.bootstrapValidator.helpers.date(b, a, e) ? 10 === c.length ? (a = parseInt(c.substr(0, 9), 10) % 11, 1985 > b && (a %= 10), a + "" === c.substr(9, 1)) : !0 : !1
7539 if (!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(c)) return !1;
7540 c = c.replace(/-/g, "");
7541 var b = parseInt(c.substr(0, 2), 10),
7542 a = parseInt(c.substr(2,
7544 e = parseInt(c.substr(4, 2), 10);
7546 case -1 !== "5678".indexOf(c.charAt(6)) && 58 <= e:
7549 case -1 !== "0123".indexOf(c.charAt(6)):
7550 case -1 !== "49".indexOf(c.charAt(6)) && 37 <= e:
7556 return d.fn.bootstrapValidator.helpers.date(e, a, b)
7562 if (!/^[0-9A-Z]{8}[-]{0,1}[0-9A-Z]$/.test(c) && !/^[XYZ][-]{0,1}[0-9]{7}[-]{0,1}[0-9A-Z]$/.test(c)) return !1;
7563 c = c.replace(/-/g, "");
7564 var b = "XYZ".indexOf(c.charAt(0)); - 1 !== b && (c = b + c.substr(1) +
7566 b = parseInt(c.substr(0, 8), 10);
7567 return b = "TRWAGMYFPDXBNJZSQVHLCKE" [b % 23], b === c.substr(8, 1)
7570 if (!/^[0-9]{6}[-+A][0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/.test(c)) return !1;
7571 var b = parseInt(c.substr(0, 2), 10),
7572 a = parseInt(c.substr(2, 2), 10),
7573 e = parseInt(c.substr(4, 2), 10);
7578 }[c.charAt(6)] + e, !d.fn.bootstrapValidator.helpers.date(e, a, b)) || 2 > parseInt(c.substr(7, 3), 10)) return !1;
7579 b = c.substr(0, 6) + c.substr(7, 3) + "";
7580 return b = parseInt(b, 10), "0123456789ABCDEFHJKLMNPRSTUVWXY".charAt(b %
7581 31) === c.charAt(10)
7584 return /^[0-9]{11}$/.test(c) ? d.fn.bootstrapValidator.helpers.mod11And10(c) : !1
7587 if (!/^\d{7}[A-W][AHWTX]?$/.test(c)) return !1;
7588 var b = function(a) {
7589 for (; 7 > a.length;) a = "0" + a;
7590 for (var b = 0, c = 0; 7 > c; c++) b += parseInt(a.charAt(c), 10) * (8 - c);
7591 return b += 9 * "WABCDEFGHIJKLMNOPQRSTUV".indexOf(a.substr(7)), "WABCDEFGHIJKLMNOPQRSTUV" [b % 23]
7593 return 9 !== c.length || "A" !== c.charAt(8) && "H" !== c.charAt(8) ? c.charAt(7) === b(c.substr(0, 7)) : c.charAt(7) === b(c.substr(0, 7) + c.substr(8) + "")
7596 if (!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(c)) return !1;
7597 c = c.replace(/-/g, "");
7598 var b = parseInt(c.substr(0, 2), 10),
7599 a = parseInt(c.substr(2, 2), 10),
7600 e = parseInt(c.substr(4, 2), 10),
7601 f = parseInt(c.charAt(9), 10);
7602 if (e = 9 === f ? 1900 + e : 100 * (20 + f) + e, !d.fn.bootstrapValidator.helpers.date(e, a, b, !0)) return !1;
7604 a = [3, 2, 7, 6, 5, 4, 3, 2];
7605 for (e = 0; 8 > e; e++) b += parseInt(c.charAt(e), 10) * a[e];
7606 return b = 11 - b % 11, b + "" === c.charAt(8)
7609 if (!/^[0-9]{11}$/.test(c)) return !1;
7610 var b = parseInt(c.charAt(0), 10),
7611 a = parseInt(c.substr(1,
7613 e = parseInt(c.substr(3, 2), 10),
7614 f = parseInt(c.substr(5, 2), 10);
7615 if (a = 100 * (0 === b % 2 ? 17 + b / 2 : 17 + (b + 1) / 2) + a, !d.fn.bootstrapValidator.helpers.date(a, e, f, !0)) return !1;
7617 a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1];
7618 for (e = 0; 10 > e; e++) b += parseInt(c.charAt(e), 10) * a[e];
7619 if (b %= 11, 10 !== b) return b + "" === c.charAt(10);
7621 a = [3, 4, 5, 6, 7, 8, 9, 1, 2, 3];
7622 for (e = 0; 10 > e; e++) b += parseInt(c.charAt(e), 10) * a[e];
7623 return b %= 11, 10 === b && (b = 0), b + "" === c.charAt(10)
7626 if (!/^[0-9]{6}[-]{0,1}[0-9]{5}$/.test(c)) return !1;
7627 c = c.replace(/\D/g, "");
7629 parseInt(c.substr(0, 2), 10),
7630 a = parseInt(c.substr(2, 2), 10),
7631 e = parseInt(c.substr(4, 2), 10);
7632 if (e = e + 1800 + 100 * parseInt(c.charAt(6), 10), !d.fn.bootstrapValidator.helpers.date(e, a, b, !0)) return !1;
7634 a = [10, 5, 8, 4, 2, 1, 6, 3, 7, 9];
7635 for (e = 0; 10 > e; e++) b += parseInt(c.charAt(e), 10) * a[e];
7636 return b = (b + 1) % 11 % 10, b + "" === c.charAt(10)
7639 for (; 9 > c.length;) c = "0" + c;
7640 if (!/^[0-9]{4}[.]{0,1}[0-9]{2}[.]{0,1}[0-9]{3}$/.test(c) || (c = c.replace(/\./g, ""), 0 === parseInt(c, 10))) return !1;
7641 for (var b = 0, a = c.length, d = 0; a - 1 > d; d++) b += (9 - d) *
7642 parseInt(c.charAt(d), 10);
7643 return b %= 11, 10 === b && (b = 0), b + "" === c.charAt(a - 1)
7646 if (!/^[0-9]{13}$/.test(c)) return !1;
7647 var b = parseInt(c.charAt(0), 10);
7648 if (0 === b || 7 === b || 8 === b) return !1;
7649 var a = parseInt(c.substr(1, 2), 10),
7650 e = parseInt(c.substr(3, 2), 10),
7651 f = parseInt(c.substr(5, 2), 10),
7660 if (31 < f && 12 < e || 9 !== b && (a = k[b + ""] + a, !d.fn.bootstrapValidator.helpers.date(a, e, f))) return !1;
7662 a = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9];
7664 for (f = 0; e - 1 > f; f++) b += parseInt(c.charAt(f), 10) *
7666 return b %= 11, 10 === b && (b = 1), b + "" === c.charAt(e - 1)
7669 if (!/^[0-9]{10}$/.test(c) && !/^[0-9]{6}[-|+][0-9]{4}$/.test(c)) return !1;
7670 c = c.replace(/[^0-9]/g, "");
7671 var b = parseInt(c.substr(0, 2), 10) + 1900,
7672 a = parseInt(c.substr(2, 2), 10),
7673 e = parseInt(c.substr(4, 2), 10);
7674 return d.fn.bootstrapValidator.helpers.date(b, a, e) ? d.fn.bootstrapValidator.helpers.luhn(c) : !1
7680 return /^\d{5}$/.test(c)
7683 if (!/^[0-9]{10}[0|1][8|9][0-9]$/.test(c)) return !1;
7684 var b = parseInt(c.substr(0, 2), 10),
7685 a = (new Date).getFullYear() % 100,
7686 e = parseInt(c.substr(2, 2), 10),
7687 f = parseInt(c.substr(4, 2), 10);
7688 return b = b >= a ? b + 1900 : b + 2E3, d.fn.bootstrapValidator.helpers.date(b, e, f) ? d.fn.bootstrapValidator.helpers.luhn(c) : !1
7693 d.fn.bootstrapValidator.i18n.identical = d.extend(d.fn.bootstrapValidator.i18n.identical || {}, {
7694 "default": "Please enter the same value"
7696 d.fn.bootstrapValidator.validators.identical = {
7701 validate: function(c, b, a) {
7703 if ("" === b) return !0;
7704 var d = c.getFieldElements(a.field);
7705 return null === d || 0 === d.length ? !0 : b === d.val() ? (c.updateStatus(a.field, c.STATUS_VALID, "identical"), !0) : !1
7710 d.fn.bootstrapValidator.i18n.imei = d.extend(d.fn.bootstrapValidator.i18n.imei || {}, {
7711 "default": "Please enter a valid IMEI number"
7713 d.fn.bootstrapValidator.validators.imei = {
7714 validate: function(c, b) {
7716 if ("" === a) return !0;
7718 case /^\d{15}$/.test(a):
7719 case /^\d{2}-\d{6}-\d{6}-\d{1}$/.test(a):
7720 case /^\d{2}\s\d{6}\s\d{6}\s\d{1}$/.test(a):
7721 return a = a.replace(/[^0-9]/g, ""), d.fn.bootstrapValidator.helpers.luhn(a);
7722 case /^\d{14}$/.test(a):
7723 case /^\d{16}$/.test(a):
7724 case /^\d{2}-\d{6}-\d{6}(|-\d{2})$/.test(a):
7725 case /^\d{2}\s\d{6}\s\d{6}(|\s\d{2})$/.test(a):
7734 d.fn.bootstrapValidator.i18n.imo = d.extend(d.fn.bootstrapValidator.i18n.imo || {}, {
7735 "default": "Please enter a valid IMO number"
7737 d.fn.bootstrapValidator.validators.imo = {
7738 validate: function(c, b) {
7740 if ("" === a) return !0;
7741 if (!/^IMO \d{7}$/i.test(a)) return !1;
7742 for (var d = 0, a = a.replace(/^.*(\d{7})$/, "$1"), f = 6; 1 <= f; f--) d += a.slice(6 - f, -f) * (f + 1);
7743 return d % 10 === parseInt(a.charAt(6), 10)
7748 d.fn.bootstrapValidator.i18n.integer = d.extend(d.fn.bootstrapValidator.i18n.integer || {}, {
7749 "default": "Please enter a valid number"
7751 d.fn.bootstrapValidator.validators.integer = {
7752 enableByHtml5: function(c) {
7753 return "number" === c.attr("type") && (void 0 === c.attr("step") || 0 === c.attr("step") % 1)
7755 validate: function(c, b) {
7756 if (this.enableByHtml5(b) && b.get(0).validity && !0 === b.get(0).validity.badInput) return !1;
7758 return "" === a ? !0 : /^(?:-?(?:0|[1-9][0-9]*))$/.test(a)
7763 d.fn.bootstrapValidator.i18n.ip = d.extend(d.fn.bootstrapValidator.i18n.ip || {}, {
7764 "default": "Please enter a valid IP address",
7765 ipv4: "Please enter a valid IPv4 address",
7766 ipv6: "Please enter a valid IPv6 address"
7768 d.fn.bootstrapValidator.validators.ip = {
7774 validate: function(c, b, a) {
7776 if ("" === b) return !0;
7781 var e = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
7782 f = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
7785 case a.ipv4 && !a.ipv6:
7787 a = a.message || d.fn.bootstrapValidator.i18n.ip.ipv4;
7789 case !a.ipv4 && a.ipv6:
7791 a = a.message || d.fn.bootstrapValidator.i18n.ip.ipv6;
7794 c = e.test(b) && f.test(b), a = a.message || d.fn.bootstrapValidator.i18n.ip["default"]
7804 d.fn.bootstrapValidator.i18n.isbn = d.extend(d.fn.bootstrapValidator.i18n.isbn || {}, {
7805 "default": "Please enter a valid ISBN number"
7807 d.fn.bootstrapValidator.validators.isbn = {
7808 validate: function(c, b) {
7810 if ("" === a) return !0;
7813 case /^\d{9}[\dX]$/.test(a):
7814 case 13 === a.length && /^(\d+)-(\d+)-(\d+)-([\dX])$/.test(a):
7815 case 13 === a.length && /^(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(a):
7818 case /^(978|979)\d{9}[\dX]$/.test(a):
7819 case 17 === a.length && /^(978|979)-(\d+)-(\d+)-(\d+)-([\dX])$/.test(a):
7821 a.length && /^(978|979)\s(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(a):
7827 var a = a.replace(/[^0-9X]/gi, ""),
7833 for (d = m = 0; k - 1 > d; d++) m += parseInt(a[d], 10) * (10 - d);
7834 return f = 11 - m % 11, 11 === f ? f = 0 : 10 === f && (f = "X"), f + "" === a[k - 1];
7836 for (d = m = 0; k - 1 > d; d++) m += 0 === d % 2 ? parseInt(a[d], 10) : 3 * parseInt(a[d], 10);
7837 return f = 10 - m % 10, 10 === f && (f = "0"), f + "" === a[k - 1];
7845 d.fn.bootstrapValidator.i18n.isin = d.extend(d.fn.bootstrapValidator.i18n.isin || {}, {
7846 "default": "Please enter a valid ISIN number"
7848 d.fn.bootstrapValidator.validators.isin = {
7849 COUNTRY_CODES: "AF|AX|AL|DZ|AS|AD|AO|AI|AQ|AG|AR|AM|AW|AU|AT|AZ|BS|BH|BD|BB|BY|BE|BZ|BJ|BM|BT|BO|BQ|BA|BW|BV|BR|IO|BN|BG|BF|BI|KH|CM|CA|CV|KY|CF|TD|CL|CN|CX|CC|CO|KM|CG|CD|CK|CR|CI|HR|CU|CW|CY|CZ|DK|DJ|DM|DO|EC|EG|SV|GQ|ER|EE|ET|FK|FO|FJ|FI|FR|GF|PF|TF|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GU|GT|GG|GN|GW|GY|HT|HM|VA|HN|HK|HU|IS|IN|ID|IR|IQ|IE|IM|IL|IT|JM|JP|JE|JO|KZ|KE|KI|KP|KR|KW|KG|LA|LV|LB|LS|LR|LY|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MH|MQ|MR|MU|YT|MX|FM|MD|MC|MN|ME|MS|MA|MZ|MM|NA|NR|NP|NL|NC|NZ|NI|NE|NG|NU|NF|MP|NO|OM|PK|PW|PS|PA|PG|PY|PE|PH|PN|PL|PT|PR|QA|RE|RO|RU|RW|BL|SH|KN|LC|MF|PM|VC|WS|SM|ST|SA|SN|RS|SC|SL|SG|SX|SK|SI|SB|SO|ZA|GS|SS|ES|LK|SD|SR|SJ|SZ|SE|CH|SY|TW|TJ|TZ|TH|TL|TG|TK|TO|TT|TN|TR|TM|TC|TV|UG|UA|AE|GB|US|UM|UY|UZ|VU|VE|VN|VG|VI|WF|EH|YE|ZM|ZW",
7850 validate: function(c, b) {
7852 if ("" === a) return !0;
7853 a = a.toUpperCase();
7854 if (!(new RegExp("^(" + this.COUNTRY_CODES + ")[0-9A-Z]{10}$")).test(a)) return !1;
7855 for (var d = "", f = a.length, k = 0; f - 1 > k; k++) var m = a.charCodeAt(k),
7856 d = d + (57 < m ? (m - 55).toString() : a.charAt(k));
7857 for (var m = "", s = d.length, u = 0 !== s % 2 ? 0 : 1, k = 0; s > k; k++) m += parseInt(d[k], 10) * (k % 2 === u ? 2 : 1) + "";
7858 for (k = d = 0; k < m.length; k++) d += parseInt(m.charAt(k), 10);
7859 return d = (10 - d % 10) % 10, d + "" === a.charAt(f - 1)
7864 d.fn.bootstrapValidator.i18n.ismn = d.extend(d.fn.bootstrapValidator.i18n.ismn || {}, {
7865 "default": "Please enter a valid ISMN number"
7867 d.fn.bootstrapValidator.validators.ismn = {
7868 validate: function(c, b) {
7870 if ("" === a) return !0;
7873 case /^M\d{9}$/.test(a):
7874 case /^M-\d{4}-\d{4}-\d{1}$/.test(a):
7875 case /^M\s\d{4}\s\d{4}\s\d{1}$/.test(a):
7878 case /^9790\d{9}$/.test(a):
7879 case /^979-0-\d{4}-\d{4}-\d{1}$/.test(a):
7880 case /^979\s0\s\d{4}\s\d{4}\s\d{1}$/.test(a):
7886 "ISMN10" === d && (a = "9790" + a.substr(1));
7887 a = a.replace(/[^0-9]/gi, "");
7889 for (var f = 0, k = [1, 3], m = 0; d - 1 > m; m++) f += parseInt(a.charAt(m), 10) * k[m % 2];
7890 return f = 10 - f % 10, f + "" === a.charAt(d - 1)
7895 d.fn.bootstrapValidator.i18n.issn = d.extend(d.fn.bootstrapValidator.i18n.issn || {}, {
7896 "default": "Please enter a valid ISSN number"
7898 d.fn.bootstrapValidator.validators.issn = {
7899 validate: function(c, b) {
7901 if ("" === a) return !0;
7902 if (!/^\d{4}\-\d{3}[\dX]$/.test(a)) return !1;
7903 var a = a.replace(/[^0-9X]/gi, ""),
7907 "X" === a[7] && (a[7] = 10);
7908 for (var k = 0; d > k; k++) f += parseInt(a[k], 10) * (8 - k);
7914 d.fn.bootstrapValidator.i18n.lessThan = d.extend(d.fn.bootstrapValidator.i18n.lessThan || {}, {
7915 "default": "Please enter a value less than or equal to %s",
7916 notInclusive: "Please enter a value less than %s"
7918 d.fn.bootstrapValidator.validators.lessThan = {
7922 inclusive: "inclusive"
7924 enableByHtml5: function(c) {
7925 var b = c.attr("type");
7926 return (c = c.attr("max")) && "date" !== b ? {
7930 validate: function(c, b, a) {
7932 if ("" === e) return !0;
7933 if (!d.isNumeric(e)) return !1;
7934 c = d.isNumeric(a.value) ? a.value : c.getDynamicOption(b, a.value);
7935 return e = parseFloat(e), !0 === a.inclusive || void 0 === a.inclusive ? {
7937 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.lessThan["default"], c)
7940 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.lessThan.notInclusive, c)
7946 d.fn.bootstrapValidator.i18n.mac = d.extend(d.fn.bootstrapValidator.i18n.mac || {}, {
7947 "default": "Please enter a valid MAC address"
7949 d.fn.bootstrapValidator.validators.mac = {
7950 validate: function(c, b) {
7952 return "" === a ? !0 : /^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/.test(a)
7957 d.fn.bootstrapValidator.i18n.meid = d.extend(d.fn.bootstrapValidator.i18n.meid || {}, {
7958 "default": "Please enter a valid MEID number"
7960 d.fn.bootstrapValidator.validators.meid = {
7961 validate: function(c, b) {
7963 if ("" === a) return !0;
7965 case /^[0-9A-F]{15}$/i.test(a):
7966 case /^[0-9A-F]{2}[- ][0-9A-F]{6}[- ][0-9A-F]{6}[- ][0-9A-F]$/i.test(a):
7967 case /^\d{19}$/.test(a):
7968 case /^\d{5}[- ]\d{5}[- ]\d{4}[- ]\d{4}[- ]\d$/.test(a):
7969 var e = a.charAt(a.length - 1);
7970 if (a = a.replace(/[- ]/g, ""), a.match(/^\d*$/i)) return d.fn.bootstrapValidator.helpers.luhn(a);
7971 for (var a = a.slice(0, -1), f = "", k = 1; 13 >= k; k += 2) f += (2 * parseInt(a.charAt(k), 16)).toString(16);
7972 for (k = a = 0; k < f.length; k++) a += parseInt(f.charAt(k), 16);
7973 return 0 === a % 10 ? "0" === e : e === (2 * (10 * Math.floor((a + 10) / 10) - a)).toString(16);
7974 case /^[0-9A-F]{14}$/i.test(a):
7975 case /^[0-9A-F]{2}[- ][0-9A-F]{6}[- ][0-9A-F]{6}$/i.test(a):
7976 case /^\d{18}$/.test(a):
7977 case /^\d{5}[- ]\d{5}[- ]\d{4}[- ]\d{4}$/.test(a):
7986 d.fn.bootstrapValidator.i18n.notEmpty = d.extend(d.fn.bootstrapValidator.i18n.notEmpty || {}, {
7987 "default": "Please enter a value"
7989 d.fn.bootstrapValidator.validators.notEmpty = {
7990 enableByHtml5: function(c) {
7991 c = c.attr("required") + "";
7992 return "required" === c || "true" === c
7994 validate: function(c, b) {
7995 var a = b.attr("type");
7996 return "radio" === a || "checkbox" === a ? 0 < c.getFieldElements(b.attr("data-bv-field")).filter(":checked").length : "" !== d.trim(b.val())
8001 d.fn.bootstrapValidator.i18n.numeric = d.extend(d.fn.bootstrapValidator.i18n.numeric || {}, {
8002 "default": "Please enter a valid float number"
8004 d.fn.bootstrapValidator.validators.numeric = {
8007 separator: "separator"
8009 enableByHtml5: function(c) {
8010 return "number" === c.attr("type") && void 0 !== c.attr("step") && 0 !== c.attr("step") % 1
8012 validate: function(c, b, a) {
8013 if (this.enableByHtml5(b) && b.get(0).validity && !0 === b.get(0).validity.badInput) return !1;
8015 if ("" === c) return !0;
8018 return "." !== a && (c = c.replace(a, ".")), !isNaN(parseFloat(c)) && isFinite(c)
8023 d.fn.bootstrapValidator.i18n.phone = d.extend(d.fn.bootstrapValidator.i18n.phone || {}, {
8024 "default": "Please enter a valid phone number",
8025 countryNotSupported: "The country code %s is not supported",
8026 country: "Please enter a valid phone number in %s",
8031 GB: "United Kingdom",
8037 d.fn.bootstrapValidator.validators.phone = {
8042 COUNTRY_CODES: "BR ES FR GB MA PK US".split(" "),
8043 validate: function(c, b, a) {
8045 if ("" === e) return !0;
8047 if (("string" != typeof f || -1 === d.inArray(f, this.COUNTRY_CODES)) && (f = c.getDynamicOption(b, f)), !f || -1 === d.inArray(f.toUpperCase(), this.COUNTRY_CODES)) return {
8049 message: d.fn.bootstrapValidator.helpers.format(d.fn.bootstrapValidator.i18n.phone.countryNotSupported, f)
8052 switch (f.toUpperCase()) {
8055 c = /^(([\d]{4}[-.\s]{1}[\d]{2,3}[-.\s]{1}[\d]{2}[-.\s]{1}[\d]{2})|([\d]{4}[-.\s]{1}[\d]{3}[-.\s]{1}[\d]{4})|((\(?\+?[0-9]{2}\)?\s?)?(\(?\d{2}\)?\s?)?\d{4,5}[-.\s]?\d{4}))$/.test(e);
8059 c = /^(?:(?:(?:\+|00)34\D?))?(?:9|6)(?:\d\D?){8}$/.test(e);
8063 c = /^(?:(?:(?:\+|00)33[ ]?(?:\(0\)[ ]?)?)|0){1}[1-9]{1}([ .-]?)(?:\d{2}\1?){3}\d{2}$/.test(e);
8067 c = /^\(?(?:(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?\(?(?:0\)?[\s-]?\(?)?|0)(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}|\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4}|\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3})|\d{5}\)?[\s-]?\d{4,5}|8(?:00[\s-]?11[\s-]?11|45[\s-]?46[\s-]?4\d))(?:(?:[\s-]?(?:x|ext\.?\s?|\#)\d+)?)$/.test(e);
8071 c = /^(?:(?:(?:\+|00)212[\s]?(?:[\s]?\(0\)[\s]?)?)|0){1}(?:5[\s.-]?[2-3]|6[\s.-]?[13-9]){1}[0-9]{1}(?:[\s.-]?\d{2}){3}$/.test(e);
8075 c = /^0?3[0-9]{2}[0-9]{7}$/.test(e);
8078 e = e.replace(/\D/g, ""), c = /^(?:(1\-?)|(\+1 ?))?\(?(\d{3})[\)\-\.]?(\d{3})[\-\.]?(\d{4})$/.test(e) && 10 === e.length
8082 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.phone.country, d.fn.bootstrapValidator.i18n.phone.countries[f])
8088 d.fn.bootstrapValidator.i18n.regexp = d.extend(d.fn.bootstrapValidator.i18n.regexp || {}, {
8089 "default": "Please enter a value matching the pattern"
8091 d.fn.bootstrapValidator.validators.regexp = {
8096 enableByHtml5: function(c) {
8097 return (c = c.attr("pattern")) ? {
8101 validate: function(c, b, a) {
8103 return "" === c ? !0 : ("string" == typeof a.regexp ? new RegExp(a.regexp) : a.regexp).test(c)
8108 d.fn.bootstrapValidator.i18n.remote = d.extend(d.fn.bootstrapValidator.i18n.remote || {}, {
8109 "default": "Please enter a valid value"
8111 d.fn.bootstrapValidator.validators.remote = {
8118 validate: function(c, b, a) {
8120 if ("" === e) return !0;
8121 var f = b.attr("data-bv-field"),
8122 k = a.data || {}, m = a.url,
8123 s = a.type || "POST",
8124 u = a.headers || {};
8125 "function" == typeof k && (k = k.call(this, c));
8126 "function" == typeof m && (m = m.call(this, c));
8128 var x = new d.Deferred,
8136 return p.then(function(a) {
8137 x.resolve(b, "remote", !0 === a.valid || "true" === a.valid, a.message ? a.message : null)
8138 }), x.fail(function() {
8145 d.fn.bootstrapValidator.i18n.rtn = d.extend(d.fn.bootstrapValidator.i18n.rtn || {}, {
8146 "default": "Please enter a valid RTN number"
8148 d.fn.bootstrapValidator.validators.rtn = {
8149 validate: function(c, b) {
8151 if ("" === a) return !0;
8152 if (!/^\d{9}$/.test(a)) return !1;
8153 for (var d = 0, f = 0; f < a.length; f += 3) d += 3 * parseInt(a.charAt(f), 10) + 7 * parseInt(a.charAt(f + 1), 10) + parseInt(a.charAt(f + 2), 10);
8154 return 0 !== d && 0 === d % 10
8159 d.fn.bootstrapValidator.i18n.sedol = d.extend(d.fn.bootstrapValidator.i18n.sedol || {}, {
8160 "default": "Please enter a valid SEDOL number"
8162 d.fn.bootstrapValidator.validators.sedol = {
8163 validate: function(c, b) {
8165 if ("" === a) return !0;
8166 if (a = a.toUpperCase(), !/^[0-9A-Z]{7}$/.test(a)) return !1;
8167 for (var d = 0, f = [1, 3, 1, 7, 3, 9, 1], k = a.length, m = 0; k - 1 > m; m++) d += f[m] * parseInt(a.charAt(m), 36);
8168 return d = (10 - d % 10) % 10, d + "" === a.charAt(k - 1)
8173 d.fn.bootstrapValidator.i18n.siren = d.extend(d.fn.bootstrapValidator.i18n.siren || {}, {
8174 "default": "Please enter a valid SIREN number"
8176 d.fn.bootstrapValidator.validators.siren = {
8177 validate: function(c, b) {
8179 return "" === a ? !0 : /^\d{9}$/.test(a) ? d.fn.bootstrapValidator.helpers.luhn(a) : !1
8184 d.fn.bootstrapValidator.i18n.siret = d.extend(d.fn.bootstrapValidator.i18n.siret || {}, {
8185 "default": "Please enter a valid SIRET number"
8187 d.fn.bootstrapValidator.validators.siret = {
8188 validate: function(c, b) {
8190 if ("" === a) return !0;
8191 for (var d, f = 0, k = a.length, m = 0; k > m; m++) d = parseInt(a.charAt(m), 10), 0 === m % 2 && (d *= 2, 9 < d && (d -= 9)), f += d;
8197 d.fn.bootstrapValidator.i18n.step = d.extend(d.fn.bootstrapValidator.i18n.step || {}, {
8198 "default": "Please enter a valid step of %s"
8200 d.fn.bootstrapValidator.validators.step = {
8206 validate: function(c, b, a) {
8208 if ("" === c) return !0;
8209 if (a = d.extend({}, {
8212 }, a), c = parseFloat(c), !d.isNumeric(c)) return !1;
8213 var e = c - a.baseValue,
8215 0 === f ? c = 1 : (c = (e + "").split("."), b = (f + "").split("."), e -= f * Math.floor(e / f), c = Math.pow(10, (1 ===
8216 c.length ? 0 : c[1].length) + (1 === b.length ? 0 : b[1].length)), e *= c, b = 0 < e | -(0 > e), c = e % 1 === 0.5 * b ? (Math.floor(e) + (0 < b)) / c : Math.round(e) / c);
8218 valid: 0 === c || c === a.step,
8219 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.step["default"], [a.step])
8225 d.fn.bootstrapValidator.i18n.stringCase = d.extend(d.fn.bootstrapValidator.i18n.stringCase || {}, {
8226 "default": "Please enter only lowercase characters",
8227 upper: "Please enter only uppercase characters"
8229 d.fn.bootstrapValidator.validators.stringCase = {
8234 validate: function(c, b, a) {
8236 if ("" === c) return !0;
8237 b = (a["case"] || "lower").toLowerCase();
8239 valid: "upper" === b ? c === c.toUpperCase() : c === c.toLowerCase(),
8240 message: a.message || ("upper" === b ? d.fn.bootstrapValidator.i18n.stringCase.upper :
8241 d.fn.bootstrapValidator.i18n.stringCase["default"])
8247 d.fn.bootstrapValidator.i18n.stringLength = d.extend(d.fn.bootstrapValidator.i18n.stringLength || {}, {
8248 "default": "Please enter a value with valid length",
8249 less: "Please enter less than %s characters",
8250 more: "Please enter more than %s characters",
8251 between: "Please enter value between %s and %s characters long"
8253 d.fn.bootstrapValidator.validators.stringLength = {
8259 enableByHtml5: function(c) {
8260 return (c = c.attr("maxlength")) ? {
8261 max: parseInt(c, 10)
8264 validate: function(c, b, a) {
8266 if ("" === e) return !0;
8267 var f = d.isNumeric(a.min) ? a.min : c.getDynamicOption(b, a.min);
8268 c = d.isNumeric(a.max) ? a.max : c.getDynamicOption(b, a.max);
8271 var k = a.message || d.fn.bootstrapValidator.i18n.stringLength["default"];
8272 switch ((f && e < parseInt(f, 10) || c && e > parseInt(c, 10)) && (b = !1), !0) {
8274 k = d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.stringLength.between, [parseInt(f, 10), parseInt(c, 10)]);
8277 k = d.fn.bootstrapValidator.helpers.format(a.message ||
8278 d.fn.bootstrapValidator.i18n.stringLength.more, parseInt(f, 10));
8281 k = d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.stringLength.less, parseInt(c, 10))
8291 d.fn.bootstrapValidator.i18n.uri = d.extend(d.fn.bootstrapValidator.i18n.uri || {}, {
8292 "default": "Please enter a valid URI"
8294 d.fn.bootstrapValidator.validators.uri = {
8297 allowlocal: "allowLocal"
8299 enableByHtml5: function(c) {
8300 return "url" === c.attr("type")
8302 validate: function(c, b, a) {
8304 if ("" === c) return !0;
8305 a = !0 === a.allowLocal || "true" === a.allowLocal;
8306 return (new RegExp("^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:" + (a ? "" : "(?!(?: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})") +
8307 "(?:[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,}))" + (a ? "?" : "") + ")(?::\\d{2,5})?(?:/[^\\s]*)?$", "i")).test(c)
8312 d.fn.bootstrapValidator.i18n.uuid = d.extend(d.fn.bootstrapValidator.i18n.uuid || {}, {
8313 "default": "Please enter a valid UUID number",
8314 version: "Please enter a valid UUID version %s number"
8316 d.fn.bootstrapValidator.validators.uuid = {
8321 validate: function(c, b, a) {
8323 if ("" === c) return !0;
8325 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
8326 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
8327 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
8328 all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i
8330 var e = a.version ? a.version + "" : "all";
8332 valid: null === b[e] ? !0 : b[e].test(c),
8333 message: a.version ? d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.uuid.version, a.version) : a.message || d.fn.bootstrapValidator.i18n.uuid["default"]
8339 d.fn.bootstrapValidator.i18n.vat = d.extend(d.fn.bootstrapValidator.i18n.vat || {}, {
8340 "default": "Please enter a valid VAT number",
8341 countryNotSupported: "The country code %s is not supported",
8342 country: "Please enter a valid %s VAT number",
8357 GB: "United Kingdom",
8382 d.fn.bootstrapValidator.validators.vat = {
8387 COUNTRY_CODES: "AT BE BG BR CH CY CZ DE DK EE EL ES FI FR GB GR HR HU IE IS IT LT LU LV MT NL NO PL PT RO RU RS SE SK SI ZA".split(" "),
8388 validate: function(c, b, a) {
8390 if ("" === e) return !0;
8392 return (f ? ("string" != typeof f || -1 === d.inArray(f.toUpperCase(), this.COUNTRY_CODES)) && (f = c.getDynamicOption(b, f)) : f = e.substr(0, 2), -1 === d.inArray(f, this.COUNTRY_CODES)) ? {
8394 message: d.fn.bootstrapValidator.helpers.format(d.fn.bootstrapValidator.i18n.vat.countryNotSupported, f)
8395 } : this[["_", f.toLowerCase()].join("")](e) ? !0 : {
8397 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.vat.country, d.fn.bootstrapValidator.i18n.vat.countries[f.toUpperCase()])
8401 if (!/^ATU[0-9]{8}$/.test(c)) return !1;
8403 for (var b = 0, a = [1, 2, 1, 2, 1, 2, 1], d = 0, f = 0; 7 > f; f++) d = parseInt(c.charAt(f), 10) * a[f], 9 < d && (d = Math.floor(d / 10) + d % 10), b += d;
8404 return b = 10 - (b + 4) % 10, 10 === b && (b = 0), b + "" === c.substr(7, 1)
8407 return /^BE[0]{0,1}[0-9]{9}$/.test(c) && (c = c.substr(2), 9 === c.length && (c = "0" + c), "0" !== c.substr(1, 1)) ? 0 === (parseInt(c.substr(0, 8), 10) + parseInt(c.substr(8, 2), 10)) % 97 : !1
8410 if (!/^BG[0-9]{9,10}$/.test(c)) return !1;
8416 for (a = 0; 8 > a; a++) b += parseInt(c.charAt(a), 10) * (a + 1);
8417 if (b %= 11, 10 === b)
8418 for (a = b = 0; 8 > a; a++) b += parseInt(c.charAt(a), 10) * (a + 3);
8419 return b %= 10, b + "" === c.substr(8)
8421 return 10 === c.length ? (b = function(a) {
8422 for (var b = 0, c = [21, 19, 17, 13, 11, 9, 7, 3, 1], d = 0; 9 > d; d++) b += parseInt(a.charAt(d), 10) * c[d];
8423 return b %= 10, b + "" === a.substr(9, 1)
8424 }, a = function(a) {
8425 for (var b = 0, c = [4, 3, 2, 7, 6, 5, 4, 3, 2], d = 0; 9 > d; d++) b += parseInt(a.charAt(d), 10) * c[d];
8426 return b = 11 - b % 11, 10 === b ? !1 : (11 === b && (b = 0), b + "" === a.substr(9, 1))
8428 var b = parseInt(a.substr(0,
8430 c = parseInt(a.substr(2, 2), 10),
8431 m = parseInt(a.substr(4, 2), 10);
8432 if (40 < c ? (b += 100, c -= 40) : 20 < c && (b -= 100, c -= 20), !d.fn.bootstrapValidator.helpers.date(b, c, m)) return !1;
8434 c = [2, 4, 8, 5, 10, 9, 7, 3, 6];
8435 for (m = 0; 9 > m; m++) b += parseInt(a.charAt(m), 10) * c[m];
8436 return b = b % 11 % 10, b + "" === a.substr(9, 1)
8437 }(c) || b(c) || a(c)) : !1
8440 if ("" === c) return !0;
8441 c = c.replace(/[^\d]+/g, "");
8442 if ("" === c || 14 !== c.length || "00000000000000" === c || "11111111111111" === c || "22222222222222" === c || "33333333333333" === c || "44444444444444" === c || "55555555555555" ===
8443 c || "66666666666666" === c || "77777777777777" === c || "88888888888888" === c || "99999999999999" === c) return !1;
8444 for (var b = c.length - 2, a = c.substring(0, b), d = c.substring(b), f = 0, k = b - 7, m = b; 1 <= m; m--) f += parseInt(a.charAt(b - m), 10) * k--, 2 > k && (k = 9);
8446 if ((2 > f % 11 ? 0 : 11 - f % 11) !== parseInt(d.charAt(0), 10)) return !1;
8448 a = c.substring(0, b);
8451 for (m = b; 1 <= m; m--) f += parseInt(a.charAt(b - m), 10) * k--, 2 > k && (k = 9);
8452 return s = 2 > f % 11 ? 0 : 11 - f % 11, s === parseInt(d.charAt(1), 10)
8455 if (!/^CHE[0-9]{9}(MWST)?$/.test(c)) return !1;
8458 for (var b = 0, a = [5, 4, 3, 2, 7, 6, 5, 4], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8459 return b = 11 - b % 11, 10 === b ? !1 : (11 === b && (b = 0), b + "" === c.substr(8, 1))
8462 if (!/^CY[0-5|9]{1}[0-9]{7}[A-Z]{1}$/.test(c) || (c = c.substr(2), "12" === c.substr(0, 2))) return !1;
8463 for (var b = 0, a = {
8474 }, d = 0; 8 > d; d++) {
8475 var f = parseInt(c.charAt(d), 10);
8476 0 === d % 2 && (f = a[f + ""]);
8479 return b = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" [b % 26], b + "" === c.substr(8, 1)
8482 if (!/^CZ[0-9]{8,10}$/.test(c)) return !1;
8486 if (8 === c.length) {
8487 if ("9" == c.charAt(0) + "") return !1;
8488 for (a = b = 0; 7 > a; a++) b += parseInt(c.charAt(a), 10) * (8 - a);
8489 return b = 11 - b % 11, 10 === b && (b = 0), 11 === b && (b = 1), b + "" === c.substr(7, 1)
8491 if (9 === c.length && "6" == c.charAt(0) + "") {
8492 for (a = b = 0; 7 > a; a++) b += parseInt(c.charAt(a + 1), 10) * (8 - a);
8493 return b = 11 - b % 11, 10 === b && (b = 0), 11 === b && (b = 1), b = [8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 10][b - 1], b + "" === c.substr(8, 1)
8495 if (9 === c.length || 10 === c.length) {
8496 var b = 1900 + parseInt(c.substr(0, 2), 10),
8497 a = parseInt(c.substr(2, 2), 10) % 50 % 20,
8498 e = parseInt(c.substr(4,
8500 if (9 === c.length) {
8501 if (1980 <= b && (b -= 100), 1953 < b) return !1
8502 } else 1954 > b && (b += 100);
8503 return d.fn.bootstrapValidator.helpers.date(b, a, e) ? 10 === c.length ? (a = parseInt(c.substr(0, 9), 10) % 11, 1985 > b && (a %= 10), a + "" === c.substr(9, 1)) : !0 : !1
8508 return /^DE[0-9]{9}$/.test(c) ? (c = c.substr(2), d.fn.bootstrapValidator.helpers.mod11And10(c)) : !1
8511 if (!/^DK[0-9]{8}$/.test(c)) return !1;
8513 for (var b = 0, a = [2, 7, 6, 5, 4, 3, 2, 1], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8518 if (!/^EE[0-9]{9}$/.test(c)) return !1;
8520 for (var b = 0, a = [3, 7, 1, 3, 7, 1, 3, 7, 1], d = 0; 9 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8524 if (!/^ES[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(c)) return !1;
8526 var b = function(a) {
8527 var b = parseInt(a.substr(0, 8), 10);
8528 return b = "TRWAGMYFPDXBNJZSQVHLCKE" [b % 23], b + "" === a.substr(8, 1)
8529 }, a = function(a) {
8530 var b = ["XYZ".indexOf(a.charAt(0)), a.substr(1)].join("");
8531 return b = parseInt(b, 10), b = "TRWAGMYFPDXBNJZSQVHLCKE" [b % 23], b + "" === a.substr(8,
8533 }, d = function(a) {
8534 var b, c = a.charAt(0);
8535 if (-1 !== "KLM".indexOf(c)) return b = parseInt(a.substr(1, 8), 10), b = "TRWAGMYFPDXBNJZSQVHLCKE" [b % 23], b + "" === a.substr(8, 1);
8536 if (-1 !== "ABCDEFGHJNPQRSUVW".indexOf(c)) {
8538 for (var c = [2, 1, 2, 1, 2, 1, 2], d = 0, e = 0; 7 > e; e++) d = parseInt(a.charAt(e + 1), 10) * c[e], 9 < d && (d = Math.floor(d / 10) + d % 10), b += d;
8539 return b = 10 - b % 10, b + "" === a.substr(8, 1) || "JABCDEFGHI" [b] === a.substr(8, 1)
8543 return /^[0-9]$/.test(f) ? b(c) : /^[XYZ]$/.test(f) ? a(c) : d(c)
8546 if (!/^FI[0-9]{8}$/.test(c)) return !1;
8548 for (var b = 0, a = [7, 9, 10, 5, 8, 4, 2, 1], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8552 if (!/^FR[0-9A-Z]{2}[0-9]{9}$/.test(c) || (c = c.substr(2), !d.fn.bootstrapValidator.helpers.luhn(c.substr(2)))) return !1;
8553 if (/^[0-9]{2}$/.test(c.substr(0, 2))) return c.substr(0, 2) === parseInt(c.substr(2) + "12", 10) % 97 + "";
8555 return b = /^[0-9]{1}$/.test(c.charAt(0)) ? 24 * "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ".indexOf(c.charAt(0)) + "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ".indexOf(c.charAt(1)) - 10 :
8556 34 * "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ".indexOf(c.charAt(0)) + "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ".indexOf(c.charAt(1)) - 100, (parseInt(c.substr(2), 10) + 1 + Math.floor(b / 11)) % 11 === b % 11
8559 if (!(/^GB[0-9]{9}$/.test(c) || /^GB[0-9]{12}$/.test(c) || /^GBGD[0-9]{3}$/.test(c) || /^GBHA[0-9]{3}$/.test(c) || /^GB(GD|HA)8888[0-9]{5}$/.test(c))) return !1;
8562 if (5 === b) return b = c.substr(0, 2), c = parseInt(c.substr(2), 10), "GD" === b && 500 > c || "HA" === b && 500 <= c;
8563 if (11 === b && ("GD8888" === c.substr(0,
8564 6) || "HA8888" === c.substr(0, 6))) return "GD" === c.substr(0, 2) && 500 <= parseInt(c.substr(6, 3), 10) || "HA" === c.substr(0, 2) && 500 > parseInt(c.substr(6, 3), 10) ? !1 : parseInt(c.substr(6, 3), 10) % 97 === parseInt(c.substr(9, 2), 10);
8565 if (9 === b || 12 === b) {
8566 for (var b = 0, a = [8, 7, 6, 5, 4, 3, 2, 10, 1], d = 0; 9 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8567 return b %= 97, 100 <= parseInt(c.substr(0, 3), 10) ? 0 === b || 42 === b || 55 === b : 0 === b
8572 if (!/^GR[0-9]{9}$/.test(c)) return !1;
8574 8 === c.length && (c = "0" + c);
8575 for (var b = 0, a = [256, 128, 64,
8577 ], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8578 return b = b % 11 % 10, b + "" === c.substr(8, 1)
8581 return /^EL[0-9]{9}$/.test(c) ? (c = "GR" + c.substr(2), this._gr(c)) : !1
8584 if (!/^HU[0-9]{8}$/.test(c)) return !1;
8586 for (var b = 0, a = [9, 7, 3, 1, 9, 7, 3, 1], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8590 return /^HR[0-9]{11}$/.test(c) ? (c = c.substr(2), d.fn.bootstrapValidator.helpers.mod11And10(c)) : !1
8593 if (!/^IE[0-9]{1}[0-9A-Z\*\+]{1}[0-9]{5}[A-Z]{1,2}$/.test(c)) return !1;
8595 var b = function(a) {
8596 for (; 7 > a.length;) a = "0" + a;
8597 for (var b = 0, c = 0; 7 > c; c++) b += parseInt(a.charAt(c), 10) * (8 - c);
8598 return b += 9 * "WABCDEFGHIJKLMNOPQRSTUV".indexOf(a.substr(7)), "WABCDEFGHIJKLMNOPQRSTUV" [b % 23]
8600 return /^[0-9]+$/.test(c.substr(0, 7)) ? c.charAt(7) === b(c.substr(0, 7) + c.substr(8) + "") : -1 !== "ABCDEFGHIJKLMNOPQRSTUVWXYZ+*".indexOf(c.charAt(1)) ? c.charAt(7) === b(c.substr(2, 5) + c.substr(0, 1) + "") : !0
8603 return /^IS\d{5,6}$/.test(c)
8606 if (!/^IT[0-9]{11}$/.test(c) || (c = c.substr(2),
8607 0 === parseInt(c.substr(0, 7), 10))) return !1;
8608 var b = parseInt(c.substr(7, 3), 10);
8609 return 1 > b || 201 < b && 999 !== b && 888 !== b ? !1 : d.fn.bootstrapValidator.helpers.luhn(c)
8612 if (!/^LT([0-9]{7}1[0-9]{1}|[0-9]{10}1[0-9]{1})$/.test(c)) return !1;
8614 var b, a = c.length,
8616 for (b = 0; a - 1 > b; b++) d += parseInt(c.charAt(b), 10) * (1 + b % 9);
8619 for (b = d = 0; a - 1 > b; b++) d += parseInt(c.charAt(b), 10) * (1 + (b + 2) % 9);
8620 return f = f % 11 % 10, f + "" === c.charAt(a - 1)
8623 return /^LU[0-9]{8}$/.test(c) ? (c = c.substr(2),
8624 parseInt(c.substr(0, 6), 10) % 89 + "" === c.substr(6, 2)) : !1
8627 if (!/^LV[0-9]{11}$/.test(c)) return !1;
8630 b = parseInt(c.charAt(0), 10);
8636 e = [9, 1, 4, 8, 3, 10, 2, 5, 7, 6, 1];
8637 for (b = 0; f > b; b++) a += parseInt(c.charAt(b), 10) * e[b];
8638 return a %= 11, 3 === a
8640 a = parseInt(c.substr(0, 2), 10);
8641 e = parseInt(c.substr(2, 2), 10);
8642 b = parseInt(c.substr(4, 2), 10);
8643 if (b = b + 1800 + 100 * parseInt(c.charAt(6), 10), !d.fn.bootstrapValidator.helpers.date(b, e, a)) return !1;
8645 e = [10, 5, 8, 4, 2, 1, 6, 3, 7, 9];
8647 0; f - 1 > b; b++) a += parseInt(c.charAt(b), 10) * e[b];
8648 return a = (a + 1) % 11 % 10, a + "" === c.charAt(f - 1)
8651 if (!/^MT[0-9]{8}$/.test(c)) return !1;
8653 for (var b = 0, a = [3, 4, 6, 7, 8, 9, 10, 1], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8657 if (!/^NL[0-9]{9}B[0-9]{2}$/.test(c)) return !1;
8659 for (var b = 0, a = [9, 8, 7, 6, 5, 4, 3, 2], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8660 return b %= 11, 9 < b && (b = 0), b + "" === c.substr(8, 1)
8663 if (!/^NO[0-9]{9}$/.test(c)) return !1;
8666 for (var b = 0, a = [3, 2, 7, 6, 5, 4, 3, 2], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8667 return b = 11 - b % 11, 11 === b && (b = 0), b + "" === c.substr(8, 1)
8670 if (!/^PL[0-9]{10}$/.test(c)) return !1;
8672 for (var b = 0, a = [6, 5, 7, 2, 3, 4, 5, 6, 7, -1], d = 0; 10 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8676 if (!/^PT[0-9]{9}$/.test(c)) return !1;
8678 for (var b = 0, a = [9, 8, 7, 6, 5, 4, 3, 2], d = 0; 8 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8679 return b = 11 - b % 11, 9 < b && (b = 0), b + "" === c.substr(8, 1)
8682 if (!/^RO[1-9][0-9]{1,9}$/.test(c)) return !1;
8684 for (var b = c.length, a = [7, 5, 3, 2, 1, 7, 5, 3, 2].slice(10 - b), d = 0, f = 0; b - 1 > f; f++) d += parseInt(c.charAt(f), 10) * a[f];
8685 return d = 10 * d % 11 % 10, d + "" === c.substr(b - 1, 1)
8688 if (!/^RU([0-9]{9}|[0-9]{12})$/.test(c)) return !1;
8691 if (10 === c.length) {
8692 for (var a = 0, d = [2, 4, 10, 3, 5, 9, 4, 6, 8, 0], b = 0; 10 > b; b++) a += parseInt(c.charAt(b), 10) * d[b];
8693 return a %= 11, 9 < a && (a %= 10), a + "" === c.substr(9, 1)
8695 if (12 === c.length) {
8696 for (var a = 0, d = [7, 2, 4, 10, 3, 5,
8698 ], f = 0, k = [3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8, 0], b = 0; 11 > b; b++) a += parseInt(c.charAt(b), 10) * d[b], f += parseInt(c.charAt(b), 10) * k[b];
8699 return a %= 11, 9 < a && (a %= 10), f %= 11, 9 < f && (f %= 10), a + "" === c.substr(10, 1) && f + "" === c.substr(11, 1)
8704 if (!/^RS[0-9]{9}$/.test(c)) return !1;
8706 for (var b = 10, a = 0, d = 0; 8 > d; d++) a = (parseInt(c.charAt(d), 10) + b) % 10, 0 === a && (a = 10), b = 2 * a % 11;
8707 return 1 === (b + parseInt(c.substr(8, 1), 10)) % 10
8710 return /^SE[0-9]{10}01$/.test(c) ? (c = c.substr(2, 10), d.fn.bootstrapValidator.helpers.luhn(c)) : !1
8713 if (!/^SI[0-9]{8}$/.test(c)) return !1;
8715 for (var b = 0, a = [8, 7, 6, 5, 4, 3, 2], d = 0; 7 > d; d++) b += parseInt(c.charAt(d), 10) * a[d];
8716 return b = 11 - b % 11, 10 === b && (b = 0), b + "" === c.substr(7, 1)
8719 return /^SK[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(c) ? 0 === parseInt(c.substr(2), 10) % 11 : !1
8722 return /^ZA4\d{9}$/.test(c)
8727 d.fn.bootstrapValidator.i18n.vin = d.extend(d.fn.bootstrapValidator.i18n.vin || {}, {
8728 "default": "Please enter a valid VIN number"
8730 d.fn.bootstrapValidator.validators.vin = {
8731 validate: function(c, b) {
8733 if ("" === a) return !0;
8734 if (!/^[a-hj-npr-z0-9]{8}[0-9xX][a-hj-npr-z0-9]{8}$/i.test(a)) return !1;
8735 for (var a = a.toUpperCase(), d = {
8769 }, f = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4,
8771 ], k = 0, m = a.length, s = 0; m > s; s++) k += d[a.charAt(s) + ""] * f[s];
8773 return 10 === d && (d = "X"), d + "" === a.charAt(8)
8778 d.fn.bootstrapValidator.i18n.zipCode = d.extend(d.fn.bootstrapValidator.i18n.zipCode || {}, {
8779 "default": "Please enter a valid zip code",
8780 countryNotSupported: "The country code %s is not supported",
8781 country: "Please enter a valid %s",
8783 BR: "Brazilian postal code",
8784 CA: "Canadian postal code",
8785 DK: "Danish postal code",
8786 GB: "United Kingdom postal code",
8787 IT: "Italian postal code",
8788 MA: "Moroccan postal code",
8789 NL: "Dutch postal code",
8790 SE: "Swiss postal code",
8791 SG: "Singapore postal code",
8795 d.fn.bootstrapValidator.validators.zipCode = {
8800 COUNTRY_CODES: "BR CA DK GB IT MA NL SE SG US".split(" "),
8801 validate: function(c, b, a) {
8803 if ("" === e || !a.country) return !0;
8805 if (("string" != typeof f || -1 === d.inArray(f, this.COUNTRY_CODES)) && (f = c.getDynamicOption(b, f)), !f || -1 === d.inArray(f.toUpperCase(), this.COUNTRY_CODES)) return {
8807 message: d.fn.bootstrapValidator.helpers.format(d.fn.bootstrapValidator.i18n.zipCode.countryNotSupported, f)
8810 switch (f = f.toUpperCase()) {
8813 /^(\d{2})([\.]?)(\d{3})([\-]?)(\d{3})$/.test(e);
8816 c = /^(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}\s?[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}[0-9]{1}$/i.test(e);
8819 c = /^(DK(-|\s)?)?\d{4}$/i.test(e);
8825 c = /^(I-|IT-)?\d{5}$/i.test(e);
8828 c = /^[1-9][0-9]{4}$/i.test(e);
8831 c = /^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(e);
8834 c = /^(S-)?\d{3}\s?\d{2}$/i.test(e);
8837 c = /^([0][1-9]|[1-6][0-9]|[7]([0-3]|[5-9])|[8][0-2])(\d{4})$/i.test(e);
8840 c = /^\d{4,5}([\-]?\d{4})?$/.test(e)
8844 message: d.fn.bootstrapValidator.helpers.format(a.message || d.fn.bootstrapValidator.i18n.zipCode.country, d.fn.bootstrapValidator.i18n.zipCode.countries[f])
8848 for (var b = [RegExp("^([ABCDEFGHIJKLMNOPRSTUWYZ]{1}[ABCDEFGHKLMNOPQRSTUVWXY]?[0-9]{1,2})(\\s*)([0-9]{1}[ABDEFGHJLNPQRSTUWXYZ]{2})$", "i"), RegExp("^([ABCDEFGHIJKLMNOPRSTUWYZ]{1}[0-9]{1}[ABCDEFGHJKPMNRSTUVWXY]{1})(\\s*)([0-9]{1}[ABDEFGHJLNPQRSTUWXYZ]{2})$",
8849 "i"), RegExp("^([ABCDEFGHIJKLMNOPRSTUWYZ]{1}[ABCDEFGHKLMNOPQRSTUVWXY]{1}?[0-9]{1}[ABEHMNPRVWXY]{1})(\\s*)([0-9]{1}[ABDEFGHJLNPQRSTUWXYZ]{2})$", "i"), /^(BF1)(\s*)([0-6]{1}[ABDEFGHJLNPQRST]{1}[ABDEFGHJLNPQRSTUWZYZ]{1})$/i, /^(GIR)(\s*)(0AA)$/i, /^(BFPO)(\s*)([0-9]{1,4})$/i, /^(BFPO)(\s*)(c\/o\s*[0-9]{1,3})$/i, /^([A-Z]{4})(\s*)(1ZZ)$/i, /^(AI-2640)$/i], a = 0; a < b.length; a++)
8850 if (b[a].test(c)) return !0;
8856 "function" == typeof define && define.amd ? define(["jquery"], d) : d(jQuery)
8858 "undefined" == typeof d && "undefined" != typeof window.jQuery && (d = window.jQuery);
8860 attr: function(a, b, c) {
8861 var d, e = {}, f = this.msieversion(),
8862 k = new RegExp("^" + b, "i");
8863 if ("undefined" == typeof a || "undefined" == typeof a[0]) return {};
8864 for (var r in a[0].attributes)
8865 if (d = a[0].attributes[r], "undefined" != typeof d && null !== d && (!f || 8 <= f || d.specified) && k.test(d.name)) {
8866 if ("undefined" != typeof c && (new RegExp(c + "$", "i")).test(d.name)) return !0;
8867 e[this.camelize(d.name.replace(b, ""))] = this.deserializeValue(d.value)
8869 return "undefined" == typeof c ? e : !1
8871 setAttr: function(a, b, c, d) {
8872 a[0].setAttribute(this.dasherize(b + c), String(d))
8874 get: function(a, b) {
8875 for (var c = 0, d = (b || "").split("."); this.isObject(a) || this.isArray(a);)
8876 if (a = a[d[c++]], c === d.length) return a
8879 return String(Math.random()).substring(2, a ? a + 2 : 9)
8881 isArray: function(a) {
8882 return "[object Array]" === Object.prototype.toString.call(a)
8884 isObject: function(a) {
8885 return a === Object(a)
8887 deserializeValue: function(a) {
8890 return a ? "true" == a || ("false" == a ? !1 : "null" == a ? null : isNaN(b = Number(a)) ? /^[\[\{]/.test(a) ? d.parseJSON(a) : a : b) : a
8895 camelize: function(a) {
8896 return a.replace(/-+(.)?/g, function(a, b) {
8897 return b ? b.toUpperCase() : ""
8900 dasherize: function(a) {
8901 return a.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase()
8903 msieversion: function() {
8904 var a = window.navigator.userAgent,
8905 b = a.indexOf("MSIE ");
8906 return 0 < b || navigator.userAgent.match(/Trident.*rv\:11\./) ?
8907 parseInt(a.substring(b + 5, a.indexOf(".", b)), 10) : 0
8910 namespace: "data-parsley-",
8911 inputs: "input, textarea, select",
8912 excluded: "input[type=button], input[type=submit], input[type=reset], input[type=hidden]",
8913 priorityEnabled: !0,
8915 validationThreshold: 3,
8918 errorClass: "parsley-error",
8919 successClass: "parsley-success",
8920 classHandler: function() {},
8921 errorsContainer: function() {},
8922 errorsWrapper: '<ul class="parsley-errors-list"></ul>',
8923 errorTemplate: "<li></li>"
8924 }, a = function() {};
8927 actualizeOptions: function() {
8928 return this.options = this.OptionsFactory.get(this), this
8930 validateThroughValidator: function(a, b, c) {
8931 return window.ParsleyValidator.validate.apply(window.ParsleyValidator, [a, b, c])
8933 subscribe: function(a, b) {
8934 return d.listenTo(this, a.toLowerCase(), b), this
8936 unsubscribe: function(a) {
8937 return d.unsubscribeTo(this, a.toLowerCase()), this
8940 if ("ParsleyForm" !== this.__class__) return d.emit("parsley:field:reset", this);
8941 for (var a = 0; a < this.fields.length; a++) d.emit("parsley:field:reset",
8943 d.emit("parsley:form:reset", this)
8945 destroy: function() {
8946 if ("ParsleyForm" !== this.__class__) return this.$element.removeData("Parsley"), this.$element.removeData("ParsleyFieldMultiple"), void d.emit("parsley:field:destroy", this);
8947 for (var a = 0; a < this.fields.length; a++) this.fields[a].destroy();
8948 this.$element.removeData("Parsley");
8949 d.emit("parsley:form:destroy", this)
8952 var e = function() {
8953 var a = {}, b = function(a) {
8954 this.__class__ = "Validator";
8955 this.__version__ = "1.0.0";
8956 this.options = a || {};
8958 this.options.bindingKey || "_validatorjsConstraint"
8962 validate: function(a, b, c) {
8963 if ("string" != typeof a && "object" != typeof a) throw Error("You must validate an object or a string");
8964 return "string" == typeof a || k(a) ? this._validateString(a, b, c) : this.isBinded(a) ? this._validateBindedObject(a, b) : this._validateObject(a, b, c)
8966 bind: function(a, b) {
8967 if ("object" != typeof a) throw Error("Must bind a Constraint to an object");
8968 return a[this.bindingKey] = new c(b), this
8970 unbind: function(a) {
8971 return "undefined" ==
8972 typeof a._validatorjsConstraint ? this : (delete a[this.bindingKey], this)
8974 isBinded: function(a) {
8975 return "undefined" != typeof a[this.bindingKey]
8977 getBinded: function(a) {
8978 return this.isBinded(a) ? a[this.bindingKey] : null
8980 _validateString: function(a, b, c) {
8983 for (var n = 0; n < b.length; n++) {
8984 if (!(b[n] instanceof e)) throw Error("You must give an Assert or an Asserts array to validate a string");
8985 h = b[n].check(a, c);
8986 h instanceof d && f.push(h)
8988 return f.length ? f : !0
8990 _validateObject: function(a, b, d) {
8992 typeof b) throw Error("You must give a constraint to validate an object");
8993 return b instanceof c ? b.check(a, d) : (new c(b)).check(a, d)
8995 _validateBindedObject: function(a, b) {
8996 return a[this.bindingKey].check(a, b)
9000 must_be_a_string: "must_be_a_string",
9001 must_be_an_array: "must_be_an_array",
9002 must_be_a_number: "must_be_a_number",
9003 must_be_a_string_or_array: "must_be_a_string_or_array"
9005 var c = function(a, b) {
9006 if (this.__class__ = "Constraint", this.options = b || {}, this.nodes = {}, a) try {
9009 throw Error("Should give a valid mapping object to Constraint",
9015 check: function(a, b) {
9017 for (h in this.nodes) {
9018 for (var n = !1, m = this.get(h), m = k(m) ? m : [m], v = m.length - 1; 0 <= v; v--) "Required" !== m[v].__class__ || (n = m[v].requiresValidation(b));
9019 if (this.has(h, a) || this.options.strict || n) try {
9020 this.has(h, this.options.strict || n ? a : void 0) || (new e).HaveProperty(h).validate(a), c = this._check(h, a[h], b), (k(c) && 0 < c.length || !k(c) && !f(c)) && (d[h] = c)
9025 return f(d) ? !0 : d
9027 add: function(a, b) {
9028 if (b instanceof e || k(b) && b[0] instanceof e) return this.nodes[a] =
9030 if ("object" == typeof b && !k(b)) return this.nodes[a] = b instanceof c ? b : new c(b), this;
9031 throw Error("Should give an Assert, an Asserts array, a Constraint", b);
9033 has: function(a, b) {
9034 return b = "undefined" != typeof b ? b : this.nodes, "undefined" != typeof b[a]
9036 get: function(a, b) {
9037 return this.has(a) ? this.nodes[a] : b || null
9039 remove: function(a) {
9042 for (c in this.nodes) c !== a && (b[c] = this.nodes[c]);
9043 return this.nodes = b, this
9045 _bootstrap: function(a) {
9046 if (a instanceof c) return this.nodes = a.nodes;
9047 for (var b in a) this.add(b,
9050 _check: function(a, b, d) {
9051 if (this.nodes[a] instanceof e) return this._checkAsserts(b, [this.nodes[a]], d);
9052 if (k(this.nodes[a])) return this._checkAsserts(b, this.nodes[a], d);
9053 if (this.nodes[a] instanceof c) return this.nodes[a].check(b, d);
9054 throw Error("Invalid node", this.nodes[a]);
9056 _checkAsserts: function(a, b, c) {
9057 for (var d, e = [], h = 0; h < b.length; h++) d = b[h].check(a, c), "undefined" != typeof d && !0 !== d && e.push(d);
9061 var d = function(a, b, c) {
9062 if (this.__class__ = "Violation", !(a instanceof e)) throw Error("Should give an assertion implementing the Assert interface");
9065 "undefined" != typeof c && (this.violation = c)
9070 assert: this.assert.__class__,
9073 return this.violation && (a.violation = this.violation), a
9075 __toString: function() {
9076 return "undefined" != typeof this.violation && (this.violation = '", ' + this.getViolation().constraint + " expected was " + this.getViolation().expected), this.assert.__class__ + ' assert failed for "' + this.value + this.violation || ""
9078 getViolation: function() {
9080 for (a in this.violation) b =
9088 var e = function(a) {
9089 this.__parentClass__ = this.__class__ = "Assert";
9091 "undefined" != typeof a && this.addGroup(a)
9095 requiresValidation: function(a) {
9096 return a && !this.hasGroup(a) ? !1 : !a && this.hasGroups() ? !1 : !0
9098 check: function(a, b) {
9099 if (this.requiresValidation(b)) try {
9100 return this.validate(a, b)
9105 hasGroup: function(a) {
9106 return k(a) ? this.hasOneOf(a) : "Any" === a ? !0 : this.hasGroups() ? -1 !== this.groups.indexOf(a) : "Default" ===
9109 hasOneOf: function(a) {
9110 for (var b = 0; b < a.length; b++)
9111 if (this.hasGroup(a[b])) return !0;
9114 hasGroups: function() {
9115 return 0 < this.groups.length
9117 addGroup: function(a) {
9118 return k(a) ? this.addGroups(a) : (this.hasGroup(a) || this.groups.push(a), this)
9120 removeGroup: function(a) {
9121 for (var b = [], c = 0; c < this.groups.length; c++) a !== this.groups[c] && b.push(this.groups[c]);
9122 return this.groups = b, this
9124 addGroups: function(a) {
9125 for (var b = 0; b < a.length; b++) this.addGroup(a[b]);
9128 HaveProperty: function(a) {
9129 return this.__class__ =
9130 "HaveProperty", this.node = a, this.validate = function(a) {
9131 if ("undefined" == typeof a[this.node]) throw new d(this, a, {
9138 return this.__class__ = "Blank", this.validate = function(a) {
9139 if ("string" != typeof a) throw new d(this, a, {
9140 value: b.errorCode.must_be_a_string
9142 if ("" !== a.replace(/^\s+/g, "").replace(/\s+$/g, "")) throw new d(this, a);
9146 Callback: function(a) {
9147 if (this.__class__ = "Callback", this.arguments = Array.prototype.slice.call(arguments), 1 === this.arguments.length ?
9148 this.arguments = [] : this.arguments.splice(0, 1), "function" != typeof a) throw Error("Callback must be instanciated with a function");
9149 return this.fn = a, this.validate = function(a) {
9150 var b = this.fn.apply(this, [a].concat(this.arguments));
9151 if (!0 !== b) throw new d(this, a, {
9157 Choice: function(a) {
9158 if (this.__class__ = "Choice", !k(a) && "function" != typeof a) throw Error("Choice must be instanciated with an array or a function");
9159 return this.list = a, this.validate = function(a) {
9160 for (var b = "function" == typeof this.list ?
9161 this.list() : this.list, c = 0; c < b.length; c++)
9162 if (a === b[c]) return !0;
9163 throw new d(this, a, {
9168 Collection: function(a) {
9169 return this.__class__ = "Collection", this.constraint = "undefined" != typeof a ? a instanceof e ? a : new c(a) : !1, this.validate = function(a, c) {
9172 v = {}, r = this.groups.length ? this.groups : c;
9173 if (!k(a)) throw new d(this, array, {
9174 value: b.errorCode.must_be_an_array
9176 for (var p = 0; p < a.length; p++) e = this.constraint ? h.validate(a[p], this.constraint, r) : h.validate(a[p], r), f(e) || (v[m] = e), m++;
9177 return f(v) ? !0 : v
9180 Count: function(a) {
9181 return this.__class__ = "Count", this.count = a, this.validate = function(a) {
9182 if (!k(a)) throw new d(this, a, {
9183 value: b.errorCode.must_be_an_array
9185 var c = "function" == typeof this.count ? this.count(a) : this.count;
9186 if (isNaN(Number(c))) throw Error("Count must be a valid interger", c);
9187 if (c !== a.length) throw new d(this, a, {
9194 return this.__class__ = "Email", this.validate = function(a) {
9195 if ("string" != typeof a) throw new d(this, a, {
9196 value: b.errorCode.must_be_a_string
9198 if (!/^((([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(a)) throw new d(this,
9203 EqualTo: function(a) {
9204 if (this.__class__ = "EqualTo", "undefined" == typeof a) throw Error("EqualTo must be instanciated with a value or a function");
9205 return this.reference = a, this.validate = function(a) {
9206 var b = "function" == typeof this.reference ? this.reference(a) : this.reference;
9207 if (b !== a) throw new d(this, a, {
9213 GreaterThan: function(a) {
9214 if (this.__class__ = "GreaterThan", "undefined" == typeof a) throw Error("Should give a threshold value");
9215 return this.threshold = a, this.validate = function(a) {
9217 a || isNaN(Number(a))) throw new d(this, a, {
9218 value: b.errorCode.must_be_a_number
9220 if (this.threshold >= a) throw new d(this, a, {
9221 threshold: this.threshold
9226 GreaterThanOrEqual: function(a) {
9227 if (this.__class__ = "GreaterThanOrEqual", "undefined" == typeof a) throw Error("Should give a threshold value");
9228 return this.threshold = a, this.validate = function(a) {
9229 if ("" === a || isNaN(Number(a))) throw new d(this, a, {
9230 value: b.errorCode.must_be_a_number
9232 if (this.threshold > a) throw new d(this, a, {
9233 threshold: this.threshold
9239 InstanceOf: function(a) {
9240 if (this.__class__ = "InstanceOf", "undefined" == typeof a) throw Error("InstanceOf must be instanciated with a value");
9241 return this.classRef = a, this.validate = function(a) {
9242 if (!0 != a instanceof this.classRef) throw new d(this, a, {
9243 classRef: this.classRef
9248 Length: function(a) {
9249 if (this.__class__ = "Length", !a.min && !a.max) throw Error("Lenth assert must be instanciated with a { min: x, max: y } object");
9250 return this.min = a.min, this.max = a.max, this.validate = function(a) {
9252 typeof a && !k(a)) throw new d(this, a, {
9253 value: b.errorCode.must_be_a_string_or_array
9255 if ("undefined" != typeof this.min && this.min === this.max && a.length !== this.min) throw new d(this, a, {
9259 if ("undefined" != typeof this.max && a.length > this.max) throw new d(this, a, {
9262 if ("undefined" != typeof this.min && a.length < this.min) throw new d(this, a, {
9268 LessThan: function(a) {
9269 if (this.__class__ = "LessThan", "undefined" == typeof a) throw Error("Should give a threshold value");
9270 return this.threshold = a, this.validate = function(a) {
9271 if ("" === a || isNaN(Number(a))) throw new d(this, a, {
9272 value: b.errorCode.must_be_a_number
9274 if (this.threshold <= a) throw new d(this, a, {
9275 threshold: this.threshold
9280 LessThanOrEqual: function(a) {
9281 if (this.__class__ = "LessThanOrEqual", "undefined" == typeof a) throw Error("Should give a threshold value");
9282 return this.threshold = a, this.validate = function(a) {
9283 if ("" === a || isNaN(Number(a))) throw new d(this, a, {
9284 value: b.errorCode.must_be_a_number
9286 if (this.threshold <
9287 a) throw new d(this, a, {
9288 threshold: this.threshold
9293 NotNull: function() {
9294 return this.__class__ = "NotNull", this.validate = function(a) {
9295 if (null === a || "undefined" == typeof a) throw new d(this, a);
9299 NotBlank: function() {
9300 return this.__class__ = "NotBlank", this.validate = function(a) {
9301 if ("string" != typeof a) throw new d(this, a, {
9302 value: b.errorCode.must_be_a_string
9304 if ("" === a.replace(/^\s+/g, "").replace(/\s+$/g, "")) throw new d(this, a);
9309 return this.__class__ = "Null",
9310 this.validate = function(a) {
9311 if (null !== a) throw new d(this, a);
9315 Range: function(a, b) {
9316 if (this.__class__ = "Range", "undefined" == typeof a || "undefined" == typeof b) throw Error("Range assert expects min and max values");
9317 return this.min = a, this.max = b, this.validate = function(a) {
9319 return "string" == typeof a && isNaN(Number(a)) || k(a) ? (new e).Length({
9322 }).validate(a) : (new e).GreaterThanOrEqual(this.min).validate(a) && (new e).LessThanOrEqual(this.max).validate(a), !0
9329 Regexp: function(a, c) {
9330 if (this.__class__ = "Regexp", "undefined" == typeof a) throw Error("You must give a regexp");
9331 return this.regexp = a, this.flag = c || "", this.validate = function(a) {
9332 if ("string" != typeof a) throw new d(this, a, {
9333 value: b.errorCode.must_be_a_string
9335 if (!(new RegExp(this.regexp, this.flag)).test(a)) throw new d(this, a, {
9336 regexp: this.regexp,
9342 Required: function() {
9343 return this.__class__ = "Required", this.validate = function(a) {
9344 if ("undefined" == typeof a) throw new d(this,
9347 "string" == typeof a ? (new e).NotNull().validate(a) && (new e).NotBlank().validate(a) : !0 === k(a) && (new e).Length({
9351 throw new d(this, a);
9356 Unique: function(a) {
9357 return this.__class__ = "Unique", "object" == typeof a && (this.key = a.key), this.validate = function(a) {
9359 if (!k(a)) throw new d(this, a, {
9360 value: b.errorCode.must_be_an_array
9362 for (var h = 0; h < a.length; h++)
9363 if (c = "object" == typeof a[h] ? a[h][this.key] : a[h], "undefined" != typeof c) {
9364 if (-1 !== e.indexOf(c)) throw new d(this,
9378 Array.prototype.indexOf || (Array.prototype.indexOf = function(a) {
9379 if (null === this) throw new TypeError;
9380 var b = Object(this),
9382 if (0 === c) return -1;
9384 if (1 < arguments.length && (d = Number(arguments[1]), d != d ? d = 0 : 0 !== d && 1 / 0 != d && d != -1 / 0 && (d = (0 < d || -1) * Math.floor(Math.abs(d)))), d >= c) return -1;
9385 for (d = 0 <= d ? d : Math.max(c - Math.abs(d), 0); c > d; d++)
9386 if (d in b && b[d] === a) return d;
9389 var f = function(a) {
9390 for (var b in a) return !1;
9392 }, k = function(a) {
9393 return "[object Array]" === Object.prototype.toString.call(a)
9395 return "function" == typeof define && define.amd ? define("vendors/validator.js/dist/validator", [], function() {
9397 }) : "undefined" != typeof module && module.exports ? module.exports = a : window["undefined" != typeof validatorjs_ns ? validatorjs_ns : "Validator"] = a, a
9399 e = "undefined" != typeof e ? e : "undefined" != typeof module ? module.exports : null,
9400 f = function(a, b) {
9401 this.__class__ = "ParsleyValidator";
9404 this.init(a || {}, b || {})
9407 init: function(a, b) {
9409 for (var c in a) this.addValidator(c, a[c].fn, a[c].priority, a[c].requirementsTransformer);
9410 d.emit("parsley:validator:init")
9412 setLocale: function(a) {
9413 if ("undefined" == typeof this.catalog[a]) throw Error(a + " is not available in the catalog");
9414 return this.locale = a, this
9416 addCatalog: function(a, b, c) {
9417 return "object" == typeof b && (this.catalog[a] = b), !0 === c ? this.setLocale(a) : this
9419 addMessage: function(a, b, c) {
9420 return "undefined" == typeof this.catalog[a] && (this.catalog[a] = {}), this.catalog[a][b.toLowerCase()] = c, this
9422 validate: function() {
9423 return (new this.Validator.Validator).validate.apply(new e.Validator, arguments)
9425 addValidator: function(a, b, c, f) {
9426 return this.validators[a.toLowerCase()] = function(a) {
9427 return d.extend((new e.Assert).Callback(b, a), {
9429 requirementsTransformer: f
9433 updateValidator: function(a, b, c, d) {
9434 return this.addValidator(a, b, c, d)
9436 removeValidator: function(a) {
9437 return delete this.validators[a], this
9439 getErrorMessage: function(a) {
9441 return b = "type" ===
9442 a.name ? this.catalog[this.locale][a.name][a.requirements] : this.formatMessage(this.catalog[this.locale][a.name], a.requirements), "" !== b ? b : this.catalog[this.locale].defaultMessage
9444 formatMessage: function(a, b) {
9445 if ("object" == typeof b) {
9446 for (var c in b) a = this.formatMessage(a, b[c]);
9449 return "string" == typeof a ? a.replace(/%s/i, b) : ""
9452 notblank: function() {
9453 return d.extend((new e.Assert).NotBlank(), {
9457 required: function() {
9458 return d.extend((new e.Assert).Required(), {
9466 (new e.Assert).Email();
9470 a = (new e.Assert).Regexp("^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$");
9473 a = (new e.Assert).Regexp("^-?\\d+$");
9476 a = (new e.Assert).Regexp("^\\d+$");
9479 a = (new e.Assert).Regexp("^\\w+$", "i");
9482 a = (new e.Assert).Regexp("(https?:\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,4}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)", "i");
9485 throw Error("validator type `" + a + "` is not supported");
9487 return d.extend(a, {
9491 pattern: function(a) {
9493 return /^\/.*\/(?:[gimy]*)$/.test(a) && (b = a.replace(/.*\/([gimy]*)$/, "$1"), a = a.replace(new RegExp("^/(.*?)/" + b + "$"), "$1")), d.extend((new e.Assert).Regexp(a, b), {
9497 minlength: function(a) {
9498 return d.extend((new e.Assert).Length({
9502 requirementsTransformer: function() {
9503 return "string" != typeof a || isNaN(a) ? a : parseInt(a, 10)
9507 maxlength: function(a) {
9508 return d.extend((new e.Assert).Length({
9512 requirementsTransformer: function() {
9514 typeof a || isNaN(a) ? a : parseInt(a, 10)
9518 length: function(a) {
9519 return d.extend((new e.Assert).Length({
9526 mincheck: function(a) {
9527 return this.minlength(a)
9529 maxcheck: function(a) {
9530 return this.maxlength(a)
9532 check: function(a) {
9533 return this.length(a)
9536 return d.extend((new e.Assert).GreaterThanOrEqual(a), {
9538 requirementsTransformer: function() {
9539 return "string" != typeof a || isNaN(a) ? a : parseInt(a, 10)
9544 return d.extend((new e.Assert).LessThanOrEqual(a), {
9546 requirementsTransformer: function() {
9547 return "string" != typeof a || isNaN(a) ? a : parseInt(a, 10)
9551 range: function(a) {
9552 return d.extend((new e.Assert).Range(a[0], a[1]), {
9554 requirementsTransformer: function() {
9555 for (var b = 0; b < a.length; b++) a[b] = "string" != typeof a[b] || isNaN(a[b]) ? a[b] : parseInt(a[b], 10);
9560 equalto: function(a) {
9561 return d.extend((new e.Assert).EqualTo(a), {
9563 requirementsTransformer: function() {
9564 return d(a).length ? d(a).val() : a
9570 var k = function() {
9575 listen: function() {
9576 return d.listen("parsley:form:init", this, this.setupForm), d.listen("parsley:field:init", this, this.setupField), d.listen("parsley:field:validated", this, this.reflow), d.listen("parsley:form:validated", this, this.focus), d.listen("parsley:field:reset", this, this.reset), d.listen("parsley:form:destroy", this, this.destroy), d.listen("parsley:field:destroy", this, this.destroy), this
9578 reflow: function(a) {
9579 if ("undefined" != typeof a._ui && !1 !== a._ui.active) {
9580 var b = this._diff(a.validationResult,
9581 a._ui.lastValidationResult);
9582 a._ui.lastValidationResult = a.validationResult;
9583 a._ui.validatedOnce = !0;
9584 this.manageStatusClass(a);
9585 this.manageErrorsMessages(a, b);
9586 this.actualizeTriggers(a);
9587 (b.kept.length || b.added.length) && "undefined" == typeof a._ui.failedOnce && this.manageFailingFieldTrigger(a)
9590 getErrorsMessages: function(a) {
9591 if (!0 === a.validationResult) return [];
9592 for (var b = [], c = 0; c < a.validationResult.length; c++) b.push(this._getErrorMessage(a, a.validationResult[c].assert));
9595 manageStatusClass: function(a) {
9597 a.validationResult ? this._successClass(a) : 0 < a.validationResult.length ? this._errorClass(a) : this._resetClass(a)
9599 manageErrorsMessages: function(a, b) {
9600 if ("undefined" == typeof a.options.errorsMessagesDisabled) {
9601 if ("undefined" != typeof a.options.errorMessage) return b.added.length || b.kept.length ? (0 === a._ui.$errorsWrapper.find(".parsley-custom-error-message").length && a._ui.$errorsWrapper.append(d(a.options.errorTemplate).addClass("parsley-custom-error-message")), a._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(a.options.errorMessage)) :
9602 a._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();
9603 for (var c = 0; c < b.removed.length; c++) this.removeError(a, b.removed[c].assert.name, !0);
9604 for (c = 0; c < b.added.length; c++) this.addError(a, b.added[c].assert.name, void 0, b.added[c].assert, !0);
9605 for (c = 0; c < b.kept.length; c++) this.updateError(a, b.kept[c].assert.name, void 0, b.kept[c].assert, !0)
9608 addError: function(a, b, c, e, f) {
9609 a._ui.$errorsWrapper.addClass("filled").append(d(a.options.errorTemplate).addClass("parsley-" + b).html(c ||
9610 this._getErrorMessage(a, e)));
9611 !0 !== f && this._errorClass(a)
9613 updateError: function(a, b, c, d, e) {
9614 a._ui.$errorsWrapper.addClass("filled").find(".parsley-" + b).html(c || this._getErrorMessage(a, d));
9615 !0 !== e && this._errorClass(a)
9617 removeError: function(a, b, c) {
9618 a._ui.$errorsWrapper.removeClass("filled").find(".parsley-" + b).remove();
9619 !0 !== c && this.manageStatusClass(a)
9621 focus: function(a) {
9622 if (!0 === a.validationResult || "none" === a.options.focus) return a._focusedField = null;
9623 a._focusedField = null;
9624 for (var b = 0; b < a.fields.length; b++)
9626 a.fields[b].validationResult && 0 < a.fields[b].validationResult.length && "undefined" == typeof a.fields[b].options.noFocus) {
9627 if ("first" === a.options.focus) return a._focusedField = a.fields[b].$element, a._focusedField.focus();
9628 a._focusedField = a.fields[b].$element
9630 return null === a._focusedField ? null : a._focusedField.focus()
9632 _getErrorMessage: function(a, b) {
9633 var c = b.name + "Message";
9634 return "undefined" != typeof a.options[c] ? window.ParsleyValidator.formatMessage(a.options[c], b.requirements) : window.ParsleyValidator.getErrorMessage(b)
9636 _diff: function(a, b, c) {
9637 for (var d = [], e = [], f = 0; f < a.length; f++) {
9638 for (var k = !1, m = 0; m < b.length; m++)
9639 if (a[f].assert.name === b[m].assert.name) {
9643 k ? e.push(a[f]) : d.push(a[f])
9648 removed: c ? [] : this._diff(b, a, !0).added
9651 setupForm: function(a) {
9652 a.$element.on("submit.Parsley", !1, d.proxy(a.onSubmitValidate, a));
9653 !1 !== a.options.uiEnabled && a.$element.attr("novalidate", "")
9655 setupField: function(a) {
9659 !1 !== a.options.uiEnabled && (b.active = !0, a.$element.attr(a.options.namespace + "id",
9660 a.__id__), b.$errorClassHandler = this._manageClassHandler(a), b.errorsWrapperId = "parsley-id-" + ("undefined" != typeof a.options.multiple ? "multiple-" + a.options.multiple : a.__id__), b.$errorsWrapper = d(a.options.errorsWrapper).attr("id", b.errorsWrapperId), b.lastValidationResult = [], b.validatedOnce = !1, b.validationInformationVisible = !1, a._ui = b, a.$element.is(a.options.excluded) || this._insertErrorWrapper(a), this.actualizeTriggers(a))
9662 _manageClassHandler: function(a) {
9663 if ("string" == typeof a.options.classHandler && d(a.options.classHandler).length) return d(a.options.classHandler);
9664 var b = a.options.classHandler(a);
9665 return "undefined" != typeof b && b.length ? b : "undefined" == typeof a.options.multiple || a.$element.is("select") ? a.$element : a.$element.parent()
9667 _insertErrorWrapper: function(a) {
9669 if ("string" == typeof a.options.errorsContainer) {
9670 if (d(a.options.errorsContainer).length) return d(a.options.errorsContainer).append(a._ui.$errorsWrapper);
9671 window.console && window.console.warn && window.console.warn("The errors container `" + a.options.errorsContainer + "` does not exist in DOM")
9672 } else "function" ==
9673 typeof a.options.errorsContainer && (b = a.options.errorsContainer(a));
9674 return "undefined" != typeof b && b.length ? b.append(a._ui.$errorsWrapper) : "undefined" == typeof a.options.multiple ? a.$element.after(a._ui.$errorsWrapper) : a.$element.parent().after(a._ui.$errorsWrapper)
9676 actualizeTriggers: function(a) {
9678 if (a.options.multiple ? d("[" + a.options.namespace + 'multiple="' + a.options.multiple + '"]').each(function() {
9679 d(this).off(".Parsley")
9680 }) : a.$element.off(".Parsley"), !1 !== a.options.trigger) {
9681 var c = a.options.trigger.replace(/^\s+/g,
9682 "").replace(/\s+$/g, "");
9683 "" !== c && (a.options.multiple ? d("[" + a.options.namespace + 'multiple="' + a.options.multiple + '"]').each(function() {
9684 d(this).on(c.split(" ").join(".Parsley ") + ".Parsley", !1, d.proxy("function" == typeof a.eventValidate ? a.eventValidate : b.eventValidate, a))
9685 }) : a.$element.on(c.split(" ").join(".Parsley ") + ".Parsley", !1, d.proxy("function" == typeof a.eventValidate ? a.eventValidate : this.eventValidate, a)))
9688 eventValidate: function(a) {
9689 /key/.test(a.type) && !this._ui.validationInformationVisible && this.getValue().length <=
9690 this.options.validationThreshold || (this._ui.validatedOnce = !0, this.validate())
9692 manageFailingFieldTrigger: function(a) {
9693 return a._ui.failedOnce = !0, a.options.multiple && d("[" + a.options.namespace + 'multiple="' + a.options.multiple + '"]').each(function() {
9694 return /change/i.test(d(this).parsley().options.trigger || "") ? void 0 : d(this).on("change.ParsleyFailedOnce", !1, d.proxy(a.validate, a))
9695 }), a.$element.is("select") && !/change/i.test(a.options.trigger || "") ? a.$element.on("change.ParsleyFailedOnce", !1, d.proxy(a.validate,
9696 a)) : /keyup/i.test(a.options.trigger || "") ? void 0 : a.$element.on("keyup.ParsleyFailedOnce", !1, d.proxy(a.validate, a))
9698 reset: function(a) {
9699 a.$element.off(".Parsley");
9700 a.$element.off(".ParsleyFailedOnce");
9701 "undefined" != typeof a._ui && "ParsleyForm" !== a.__class__ && (a._ui.$errorsWrapper.children().each(function() {
9703 }), this._resetClass(a), a._ui.validatedOnce = !1, a._ui.lastValidationResult = [], a._ui.validationInformationVisible = !1)
9705 destroy: function(a) {
9707 "ParsleyForm" !== a.__class__ && ("undefined" !=
9708 typeof a._ui && a._ui.$errorsWrapper.remove(), delete a._ui)
9710 _successClass: function(a) {
9711 a._ui.validationInformationVisible = !0;
9712 a._ui.$errorClassHandler.removeClass(a.options.errorClass).addClass(a.options.successClass)
9714 _errorClass: function(a) {
9715 a._ui.validationInformationVisible = !0;
9716 a._ui.$errorClassHandler.removeClass(a.options.successClass).addClass(a.options.errorClass)
9718 _resetClass: function(a) {
9719 a._ui.$errorClassHandler.removeClass(a.options.successClass).removeClass(a.options.errorClass)
9724 this.__class__ = "OptionsFactory";
9725 this.__id__ = c.hash(4);
9726 this.fieldOptions = this.formOptions = null;
9727 this.staticOptions = d.extend(!0, {}, a, b, e, {
9733 if ("undefined" == typeof a.__class__) throw Error("Parsley Instance expected");
9734 switch (a.__class__) {
9736 return this.staticOptions;
9738 return this.getFormOptions(a);
9739 case "ParsleyField":
9740 case "ParsleyFieldMultiple":
9741 return this.getFieldOptions(a);
9743 throw Error("Instance " + a.__class__ + " is not supported");
9746 getFormOptions: function(a) {
9747 return this.formOptions = c.attr(a.$element, this.staticOptions.namespace), d.extend({}, this.staticOptions, this.formOptions)
9749 getFieldOptions: function(a) {
9750 return this.fieldOptions = c.attr(a.$element, this.staticOptions.namespace), null === this.formOptions && "undefined" != typeof a.parent && (this.formOptions = this.getFormOptions(a.parent)), d.extend({}, this.staticOptions, this.formOptions, this.fieldOptions)
9753 var s = function(a, b) {
9754 if (this.__class__ = "ParsleyForm", this.__id__ = c.hash(4), "OptionsFactory" !==
9755 c.get(b, "__class__")) throw Error("You must give an OptionsFactory instance");
9756 this.OptionsFactory = b;
9757 this.$element = d(a);
9758 this.validationResult = null;
9759 this.options = this.OptionsFactory.get(this)
9762 onSubmitValidate: function(a) {
9763 return this.validate(void 0, void 0, a), !1 === this.validationResult && a instanceof d.Event && (a.stopImmediatePropagation(), a.preventDefault()), this
9765 validate: function(a, b, c) {
9766 this.submitEvent = c;
9767 this.validationResult = !0;
9769 this._refreshFields();
9770 d.emit("parsley:form:validate",
9772 for (var e = 0; e < this.fields.length; e++)(!a || this._isFieldInGroup(this.fields[e], a)) && (c = this.fields[e].validate(b), !0 !== c && 0 < c.length && this.validationResult && (this.validationResult = !1));
9773 return d.emit("parsley:form:validated", this), this.validationResult
9775 isValid: function(a, b) {
9776 this._refreshFields();
9777 for (var c = 0; c < this.fields.length; c++)
9778 if ((!a || this._isFieldInGroup(this.fields[c], a)) && !1 === this.fields[c].isValid(b)) return !1;
9781 _isFieldInGroup: function(a, b) {
9782 return c.isArray(a.options.group) ? -1 !== d.inArray(a.options.group, b) : a.options.group === b
9784 _refreshFields: function() {
9785 return this.actualizeOptions()._bindFields()
9787 _bindFields: function() {
9789 return this.fields = [], this.fieldsMappedById = {}, this.$element.find(this.options.inputs).each(function() {
9790 var b = new window.Parsley(this, {}, a);
9791 "ParsleyField" !== b.__class__ && "ParsleyFieldMultiple" !== b.__class__ || b.$element.is(b.options.excluded) || "undefined" == typeof a.fieldsMappedById[b.__class__ + "-" + b.__id__] && (a.fieldsMappedById[b.__class__ +
9792 "-" + b.__id__] = b, a.fields.push(b))
9796 var u = function(a, b, e, f, k) {
9797 if (!/ParsleyField/.test(c.get(a, "__class__"))) throw Error("ParsleyField or ParsleyFieldMultiple instance expected");
9798 if ("function" != typeof window.ParsleyValidator.validators[b] && "Assert" !== window.ParsleyValidator.validators[b](e).__parentClass__) throw Error("Valid validator expected");
9799 return f = f || ("undefined" != typeof a.options[b + "Priority"] ? a.options[b + "Priority"] : c.get(window.ParsleyValidator.validators[b](e), "priority") || 2), "function" ==
9800 typeof window.ParsleyValidator.validators[b](e).requirementsTransformer && (e = window.ParsleyValidator.validators[b](e).requirementsTransformer()), d.extend(window.ParsleyValidator.validators[b](e), {
9805 isDomConstraint: k || c.attr(a.$element, a.options.namespace, b)
9807 }, x = function(a, b, e) {
9808 this.__class__ = "ParsleyField";
9809 this.__id__ = c.hash(4);
9810 this.$element = d(a);
9811 "undefined" != typeof e ? (this.parent = e, this.OptionsFactory = this.parent.OptionsFactory, this.options = this.OptionsFactory.get(this)) :
9812 (this.OptionsFactory = b, this.options = this.OptionsFactory.get(this));
9813 this.constraints = [];
9814 this.constraintsByName = {};
9815 this.validationResult = [];
9816 this._bindConstraints()
9819 validate: function(a) {
9820 return this.value = this.getValue(), d.emit("parsley:field:validate", this), d.emit("parsley:field:" + (this.isValid(a, this.value) ? "success" : "error"), this), d.emit("parsley:field:validated", this), this.validationResult
9822 isValid: function(a, b) {
9823 this.refreshConstraints();
9824 var c = this._getConstraintsSortedPriorities();
9825 if (b = b || this.getValue(), 0 === b.length && !this._isRequired() && "undefined" == typeof this.options.validateIfEmpty && !0 !== a) return this.validationResult = [];
9826 if (!1 === this.options.priorityEnabled) return !0 === (this.validationResult = this.validateThroughValidator(b, this.constraints, "Any"));
9827 for (var d = 0; d < c.length; d++)
9828 if (!0 !== (this.validationResult = this.validateThroughValidator(b, this.constraints, c[d]))) return !1;
9831 getValue: function() {
9833 return a = "undefined" != typeof this.options.value ? this.options.value :
9834 this.$element.val(), "undefined" == typeof a || null === a ? "" : !0 === this.options.trimValue ? a.replace(/^\s+|\s+$/g, "") : a
9836 refreshConstraints: function() {
9837 return this.actualizeOptions()._bindConstraints()
9839 addConstraint: function(a, b, c, d) {
9840 if (a = a.toLowerCase(), "function" == typeof window.ParsleyValidator.validators[a]) a = new u(this, a, b, c, d), "undefined" !== this.constraintsByName[a.name] && this.removeConstraint(a.name), this.constraints.push(a), this.constraintsByName[a.name] = a;
9843 removeConstraint: function(a) {
9845 0; b < this.constraints.length; b++)
9846 if (a === this.constraints[b].name) {
9847 this.constraints.splice(b, 1);
9852 updateConstraint: function(a, b, c) {
9853 return this.removeConstraint(a).addConstraint(a, b, c)
9855 _bindConstraints: function() {
9856 for (var a = [], b = 0; b < this.constraints.length; b++)!1 === this.constraints[b].isDomConstraint && a.push(this.constraints[b]);
9857 this.constraints = a;
9858 for (var c in this.options) this.addConstraint(c, this.options[c]);
9859 return this._bindHtml5Constraints()
9861 _bindHtml5Constraints: function() {
9862 (this.$element.hasClass("required") ||
9863 this.$element.attr("required")) && this.addConstraint("required", !0, void 0, !0);
9864 "string" == typeof this.$element.attr("pattern") && this.addConstraint("pattern", this.$element.attr("pattern"), void 0, !0);
9865 "undefined" != typeof this.$element.attr("min") && "undefined" != typeof this.$element.attr("max") ? this.addConstraint("range", [this.$element.attr("min"), this.$element.attr("max")], void 0, !0) : "undefined" != typeof this.$element.attr("min") ? this.addConstraint("min", this.$element.attr("min"), void 0, !0) : "undefined" !=
9866 typeof this.$element.attr("max") && this.addConstraint("max", this.$element.attr("max"), void 0, !0);
9867 var a = this.$element.attr("type");
9868 return "undefined" == typeof a ? this : "number" === a ? this.addConstraint("type", "integer", void 0, !0) : (new RegExp(a, "i")).test("email url range") ? this.addConstraint("type", a, void 0, !0) : this
9870 _isRequired: function() {
9871 return "undefined" == typeof this.constraintsByName.required ? !1 : !1 !== this.constraintsByName.required.requirements
9873 _getConstraintsSortedPriorities: function() {
9875 b = 0; b < this.constraints.length; b++) - 1 === a.indexOf(this.constraints[b].priority) && a.push(this.constraints[b].priority);
9876 return a.sort(function(a, b) {
9881 var p = function() {
9882 this.__class__ = "ParsleyFieldMultiple"
9885 addElement: function(a) {
9886 return this.$elements.push(a), this
9888 refreshConstraints: function() {
9890 if (this.constraints = [], this.$element.is("select")) return this.actualizeOptions()._bindConstraints(), this;
9891 for (var b = 0; b < this.$elements.length; b++)
9892 if (d("html").has(this.$elements[b]).length) {
9894 this.$elements[b].data("ParsleyFieldMultiple").refreshConstraints().constraints;
9895 for (var c = 0; c < a.length; c++) this.addConstraint(a[c].name, a[c].requirements, a[c].priority, a[c].isDomConstraint)
9896 } else this.$elements.splice(b, 1);
9899 getValue: function() {
9900 if ("undefined" != typeof this.options.value) return this.options.value;
9901 if (this.$element.is("input[type=radio]")) return d("[" + this.options.namespace + 'multiple="' + this.options.multiple + '"]:checked').val() || "";
9902 if (this.$element.is("input[type=checkbox]")) {
9904 return d("[" + this.options.namespace + 'multiple="' + this.options.multiple + '"]:checked').each(function() {
9905 a.push(d(this).val())
9906 }), a.length ? a : []
9908 return this.$element.is("select") && null === this.$element.val() ? [] : this.$element.val()
9910 _init: function(a) {
9911 return this.$elements = [this.$element], this.options.multiple = a, this
9916 d.listen = function(a, b, c) {
9917 if ("undefined" == typeof t[a] && (t[a] = []), "function" == typeof b) return t[a].push({
9920 if ("object" == typeof b && "function" == typeof c) return t[a].push({
9924 throw Error("Wrong parameters");
9926 d.listenTo = function(a, b, c) {
9927 if ("undefined" == typeof t[b] && (t[b] = []), !(a instanceof x || a instanceof s)) throw Error("Must give Parsley instance");
9928 if ("string" != typeof b || "function" != typeof c) throw Error("Wrong parameters");
9934 d.unsubscribe = function(a, b) {
9935 if ("undefined" != typeof t[a]) {
9936 if ("string" != typeof a || "function" != typeof b) throw Error("Wrong arguments");
9937 for (var c = 0; c < t[a].length; c++)
9938 if (t[a][c].fn === b) return t[a].splice(c, 1)
9943 if ("undefined" != typeof t[b]) {
9944 if (!(a instanceof x || a instanceof s)) throw Error("Must give Parsley instance");
9945 for (var c = 0; c < t[b].length; c++)
9946 if ("undefined" != typeof t[b][c].instance && t[b][c].instance.__id__ === a.__id__) return t[b].splice(c, 1)
9949 d.unsubscribeAll = function(a) {
9950 "undefined" != typeof t[a] && delete t[a]
9952 d.emit = function(a, b) {
9953 if ("undefined" != typeof t[a])
9954 for (var c = 0; c < t[a].length; c++)
9955 if ("undefined" != typeof t[a][c].instance) {
9956 if (b instanceof x || b instanceof s)
9957 if (t[a][c].instance.__id__ !==
9959 if (t[a][c].instance instanceof s && b instanceof x)
9960 for (var d = 0; d < t[a][c].instance.fields.length; d++) t[a][c].instance.fields[d].__id__ === b.__id__ && t[a][c].fn.apply(q, Array.prototype.slice.call(arguments, 1))
9961 } else t[a][c].fn.apply(q, Array.prototype.slice.call(arguments, 1))
9962 } else t[a][c].fn.apply("undefined" != typeof t[a][c].ctxt ? t[a][c].ctxt : q, Array.prototype.slice.call(arguments, 1))
9964 d.subscribed = function() {
9967 window.ParsleyConfig = window.ParsleyConfig || {};
9968 window.ParsleyConfig.i18n = window.ParsleyConfig.i18n || {};
9969 window.ParsleyConfig.i18n.en = d.extend(window.ParsleyConfig.i18n.en || {}, {
9970 defaultMessage: "This value seems to be invalid.",
9972 email: "This value should be a valid email.",
9973 url: "This value should be a valid url.",
9974 number: "This value should be a valid number.",
9975 integer: "This value should be a valid integer.",
9976 digits: "This value should be digits.",
9977 alphanum: "This value should be alphanumeric."
9979 notblank: "This value should not be blank.",
9980 required: "This value is required.",
9981 pattern: "This value seems to be invalid.",
9982 min: "This value should be greater than or equal to %s.",
9983 max: "This value should be lower than or equal to %s.",
9984 range: "This value should be between %s and %s.",
9985 minlength: "This value is too short. It should have %s characters or more.",
9986 maxlength: "This value is too long. It should have %s characters or fewer.",
9987 length: "This value length is invalid. It should be between %s and %s characters long.",
9988 mincheck: "You must select at least %s choices.",
9989 maxcheck: "You must select %s choices or fewer.",
9990 check: "You must select between %s and %s choices.",
9991 equalto: "This value should be the same."
9993 "undefined" != typeof window.ParsleyValidator && window.ParsleyValidator.addCatalog("en", window.ParsleyConfig.i18n.en, !0);
9994 var B = function(a, b, e) {
9995 if (this.__class__ = "Parsley", this.__version__ = "2.0.5", this.__id__ = c.hash(4), "undefined" == typeof a) throw Error("You must give an element");
9996 if ("undefined" != typeof e && "ParsleyForm" !== e.__class__) throw Error("Parent instance must be a ParsleyForm instance");
9997 return this.init(d(a), b, e)
10000 init: function(a, d, e) {
10001 if (!a.length) throw Error("You must bind Parsley on an existing element.");
10002 return (this.$element = a, this.$element.data("Parsley")) ? (a = this.$element.data("Parsley"), "undefined" != typeof e && (a.parent = e), a) : (this.OptionsFactory = new m(b, c.get(window, "ParsleyConfig") || {}, d, this.getNamespace(d)), this.options = this.OptionsFactory.get(this), this.$element.is("form") || c.attr(this.$element, this.options.namespace, "validate") && !this.$element.is(this.options.inputs) ? this.bind("parsleyForm") : this.$element.is(this.options.inputs) && !this.$element.is(this.options.excluded) ? this.isMultiple() ?
10003 this.handleMultiple(e) : this.bind("parsleyField", e) : this)
10005 isMultiple: function() {
10006 return this.$element.is("input[type=radio], input[type=checkbox]") && "undefined" == typeof this.options.multiple || this.$element.is("select") && "undefined" != typeof this.$element.attr("multiple")
10008 handleMultiple: function(a) {
10009 var b, e, f, k = this;
10010 if (this.options = d.extend(this.options, a ? a.OptionsFactory.get(a) : {}, c.attr(this.$element, this.options.namespace)), this.options.multiple ? e = this.options.multiple : "undefined" != typeof this.$element.attr("name") &&
10011 this.$element.attr("name").length ? e = b = this.$element.attr("name") : "undefined" != typeof this.$element.attr("id") && this.$element.attr("id").length && (e = this.$element.attr("id")), this.$element.is("select") && "undefined" != typeof this.$element.attr("multiple")) return this.bind("parsleyFieldMultiple", a, e || this.__id__);
10012 if ("undefined" == typeof e) return window.console && window.console.warn && window.console.warn("To be binded by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",
10013 this.$element), this;
10014 if (e = e.replace(/(:|\.|\[|\]|\$)/g, ""), "undefined" != typeof b && d('input[name="' + b + '"]').each(function() {
10015 d(this).is("input[type=radio], input[type=checkbox]") && d(this).attr(k.options.namespace + "multiple", e)
10016 }), d("[" + this.options.namespace + "multiple=" + e + "]").length)
10017 for (b = 0; b < d("[" + this.options.namespace + "multiple=" + e + "]").length; b++)
10018 if ("undefined" != typeof d(d("[" + this.options.namespace + "multiple=" + e + "]").get(b)).data("Parsley")) {
10019 f = d(d("[" + this.options.namespace + "multiple=" + e + "]").get(b)).data("Parsley");
10020 this.$element.data("ParsleyFieldMultiple") || (f.addElement(this.$element), this.$element.attr(this.options.namespace + "id", f.__id__));
10023 return this.bind("parsleyField", a, e, !0), f || this.bind("parsleyFieldMultiple", a, e)
10025 getNamespace: function(a) {
10026 return "undefined" != typeof this.$element.data("parsleyNamespace") ? this.$element.data("parsleyNamespace") : "undefined" != typeof c.get(a, "namespace") ? a.namespace : "undefined" != typeof c.get(window, "ParsleyConfig.namespace") ? window.ParsleyConfig.namespace : b.namespace
10028 bind: function(b, e, f, k) {
10030 case "parsleyForm":
10031 e = d.extend(new s(this.$element, this.OptionsFactory), new a, window.ParsleyExtend)._bindFields();
10033 case "parsleyField":
10034 e = d.extend(new x(this.$element, this.OptionsFactory, e), new a, window.ParsleyExtend);
10036 case "parsleyFieldMultiple":
10037 e = d.extend(new x(this.$element, this.OptionsFactory, e), new a, new p, window.ParsleyExtend)._init(f);
10040 throw Error(b + "is not a supported Parsley type");
10042 return "undefined" != typeof f && c.setAttr(this.$element,
10043 this.options.namespace, "multiple", f), "undefined" != typeof k ? (this.$element.data("ParsleyFieldMultiple", e), e) : (/ParsleyF/i.test(e.__class__) && (this.$element.data("Parsley", e), d.emit("parsley:" + ("parsleyForm" === b ? "form" : "field") + ":init", e)), e)
10046 d.fn.parsley = d.fn.psly = function(a) {
10047 if (1 < this.length) {
10049 return this.each(function() {
10050 b.push(d(this).parsley(a))
10053 return d(this).length ? new B(this, a) : void(window.console && window.console.warn && window.console.warn("You must bind Parsley on an existing element."))
10055 window.ParsleyUI = "function" == typeof c.get(window, "ParsleyConfig.ParsleyUI") ? (new window.ParsleyConfig.ParsleyUI).listen() : (new k).listen();
10056 "undefined" == typeof window.ParsleyExtend && (window.ParsleyExtend = {});
10057 "undefined" == typeof window.ParsleyConfig && (window.ParsleyConfig = {});
10058 window.Parsley = window.psly = B;
10059 window.ParsleyUtils = c;
10060 window.ParsleyValidator = new f(window.ParsleyConfig.validators, window.ParsleyConfig.i18n);
10061 !1 !== c.get(window, "ParsleyConfig.autoBind") && d(document).ready(function() {
10062 d("[data-parsley-validate]").length &&
10063 d("[data-parsley-validate]").parsley()