/* $.Link (part of noUiSlider) - WTFPL */ (function(c) { function m(a, c, d) { if ((a[c] || a[d]) && a[c] === a[d]) throw Error("(Link) '" + c + "' can't match '" + d + "'.'"); } function r(a) { void 0 === a && (a = {}); if ("object" !== typeof a) throw Error("(Format) 'format' option must be an object."); var h = {}; c(u).each(function(c, n) { if (void 0 === a[n]) h[n] = A[c]; else if (typeof a[n] === typeof A[c]) { if ("decimals" === n && (0 > a[n] || 7 < a[n])) throw Error("(Format) 'format.decimals' option must be between 0 and 7."); h[n] = a[n] } else throw Error("(Format) 'format." + n + "' must be a " + typeof A[c] + "."); }); m(h, "mark", "thousand"); m(h, "prefix", "negative"); m(h, "prefix", "negativeBefore"); this.r = h } function k(a, h) { "object" !== typeof a && c.error("(Link) Initialize with an object."); return new k.prototype.p(a.target || function() {}, a.method, a.format || {}, h) } var u = "decimals mark thousand prefix postfix encoder decoder negative negativeBefore to from".split(" "), A = [2, ".", "", "", "", function(a) { return a }, function(a) { return a }, "-", "", function(a) { return a }, function(a) { return a }]; r.prototype.a = function(a) { return this.r[a] }; r.prototype.L = function(a) { function c(a) { return a.split("").reverse().join("") } a = this.a("encoder")(a); var d = this.a("decimals"), n = "", k = "", m = "", r = ""; 0 === parseFloat(a.toFixed(d)) && (a = "0"); 0 > a && (n = this.a("negative"), k = this.a("negativeBefore")); a = Math.abs(a).toFixed(d).toString(); a = a.split("."); this.a("thousand") ? (m = c(a[0]).match(/.{1,3}/g), m = c(m.join(c(this.a("thousand"))))) : m = a[0]; this.a("mark") && 1 < a.length && (r = this.a("mark") + a[1]); return this.a("to")(k + this.a("prefix") + n + m + r + this.a("postfix")) }; r.prototype.w = function(a) { function c(a) { return a.replace(/[\-\/\\\^$*+?.()|\[\]{}]/g, "\\$&") } var d; if (null === a || void 0 === a) return !1; a = this.a("from")(a); a = a.toString(); d = a.replace(RegExp("^" + c(this.a("negativeBefore"))), ""); a !== d ? (a = d, d = "-") : d = ""; a = a.replace(RegExp("^" + c(this.a("prefix"))), ""); this.a("negative") && (d = "", a = a.replace(RegExp("^" + c(this.a("negative"))), "-")); a = a.replace(RegExp(c(this.a("postfix")) + "$"), "").replace(RegExp(c(this.a("thousand")), "g"), "").replace(this.a("mark"), "."); a = this.a("decoder")(parseFloat(d + a)); return isNaN(a) ? !1 : a }; k.prototype.K = function(a, h) { this.method = h || "html"; this.j = c(a.replace("-tooltip-", "") || "
")[0] }; k.prototype.H = function(a) { this.method = "val"; this.j = document.createElement("input"); this.j.name = a; this.j.type = "hidden" }; k.prototype.G = function(a) { function h(a, c) { return [c ? null : a, c ? a : null] } var d = this; this.method = "val"; this.target = a.on("change", function(a) { d.B.val(h(c(a.target).val(), d.t), { link: d, set: !0 }) }) }; k.prototype.p = function(a, h, d, k) { this.g = d; this.update = !k; if ("string" === typeof a && 0 === a.indexOf("-tooltip-")) this.K(a, h); else if ("string" === typeof a && 0 !== a.indexOf("-")) this.H(a); else if ("function" === typeof a) this.target = !1, this.method = a; else { if (a instanceof c || c.zepto && c.zepto.isZ(a)) { if (!h) { if (a.is("input, select, textarea")) { this.G(a); return } h = "html" } if ("function" === typeof h || "string" === typeof h && a[h]) { this.method = h; this.target = a; return } } throw new RangeError("(Link) Invalid Link."); } }; k.prototype.write = function(a, c, d, k) { if (!this.update || !1 !== k) if (this.u = a, this.F = a = this.format(a), "function" === typeof this.method) this.method.call(this.target[0] || d[0], a, c, d); else this.target[this.method](a, c, d) }; k.prototype.q = function(a) { this.g = new r(c.extend({}, a, this.g instanceof r ? this.g.r : this.g)) }; k.prototype.J = function(a) { this.B = a }; k.prototype.I = function(a) { this.t = a }; k.prototype.format = function(a) { return this.g.L(a) }; k.prototype.A = function(a) { return this.g.w(a) }; k.prototype.p.prototype = k.prototype; c.Link = k })(window.jQuery || window.Zepto); /* $.fn.noUiSlider - WTFPL - refreshless.com/nouislider/ */ (function(c) { function m(e) { return "number" === typeof e && !isNaN(e) && isFinite(e) } function r(e) { return c.isArray(e) ? e : [e] } function k(e, b) { e.addClass(b); setTimeout(function() { e.removeClass(b) }, 300) } function u(e, b) { return 100 * b / (e[1] - e[0]) } function A(e, b) { if (b >= e.d.slice(-1)[0]) return 100; for (var a = 1, c, f, d; b >= e.d[a];) a++; c = e.d[a - 1]; f = e.d[a]; d = e.c[a - 1]; c = [c, f]; return d + u(c, 0 > c[0] ? b + Math.abs(c[0]) : b - c[0]) / (100 / (e.c[a] - d)) } function a(e, b) { if (100 <= b) return e.d.slice(-1)[0]; for (var a = 1, c, f, d; b >= e.c[a];) a++; c = e.d[a - 1]; f = e.d[a]; d = e.c[a - 1]; c = [c, f]; return 100 / (e.c[a] - d) * (b - d) * (c[1] - c[0]) / 100 + c[0] } function h(a, b) { for (var c = 1, g; (a.dir ? 100 - b : b) >= a.c[c];) c++; if (a.m) return g = a.c[c - 1], c = a.c[c], b - g > (c - g) / 2 ? c : g; a.h[c - 1] ? (g = a.h[c - 1], c = a.c[c - 1] + Math.round((b - a.c[c - 1]) / g) * g) : c = b; return c } function d(a, b) { if (!m(b)) throw Error("noUiSlider: 'step' is not numeric."); a.h[0] = b } function n(a, b) { if ("object" !== typeof b || c.isArray(b)) throw Error("noUiSlider: 'range' is not an object."); if (void 0 === b.min || void 0 === b.max) throw Error("noUiSlider: Missing 'min' or 'max' in 'range'."); c.each(b, function(b, g) { var d; "number" === typeof g && (g = [g]); if (!c.isArray(g)) throw Error("noUiSlider: 'range' contains invalid value."); d = "min" === b ? 0 : "max" === b ? 100 : parseFloat(b); if (!m(d) || !m(g[0])) throw Error("noUiSlider: 'range' value isn't numeric."); a.c.push(d); a.d.push(g[0]); d ? a.h.push(isNaN(g[1]) ? !1 : g[1]) : isNaN(g[1]) || (a.h[0] = g[1]) }); c.each(a.h, function(b, c) { if (!c) return !0; a.h[b] = u([a.d[b], a.d[b + 1]], c) / (100 / (a.c[b + 1] - a.c[b])) }) } function E(a, b) { "number" === typeof b && (b = [b]); if (!c.isArray(b) || !b.length || 2 < b.length) throw Error("noUiSlider: 'start' option is incorrect."); a.b = b.length; a.start = b } function I(a, b) { a.m = b; if ("boolean" !== typeof b) throw Error("noUiSlider: 'snap' option must be a boolean."); } function J(a, b) { if ("lower" === b && 1 === a.b) a.i = 1; else if ("upper" === b && 1 === a.b) a.i = 2; else if (!0 === b && 2 === a.b) a.i = 3; else if (!1 === b) a.i = 0; else throw Error("noUiSlider: 'connect' option doesn't match handle count."); } function D(a, b) { switch (b) { case "horizontal": a.k = 0; break; case "vertical": a.k = 1; break; default: throw Error("noUiSlider: 'orientation' option is invalid."); } } function K(a, b) { if (2 < a.c.length) throw Error("noUiSlider: 'margin' option is only supported on linear sliders."); a.margin = u(a.d, b); if (!m(b)) throw Error("noUiSlider: 'margin' option must be numeric."); } function L(a, b) { switch (b) { case "ltr": a.dir = 0; break; case "rtl": a.dir = 1; a.i = [0, 2, 1, 3][a.i]; break; default: throw Error("noUiSlider: 'direction' option was not recognized."); } } function M(a, b) { if ("string" !== typeof b) throw Error("noUiSlider: 'behaviour' must be a string containing options."); var c = 0 <= b.indexOf("snap"); a.n = { s: 0 <= b.indexOf("tap") || c, extend: 0 <= b.indexOf("extend"), v: 0 <= b.indexOf("drag"), fixed: 0 <= b.indexOf("fixed"), m: c } } function N(a, b, d) { a.o = [b.lower, b.upper]; a.g = b.format; c.each(a.o, function(a, e) { if (!c.isArray(e)) throw Error("noUiSlider: 'serialization." + (a ? "upper" : "lower") + "' must be an array."); c.each(e, function() { if (!(this instanceof c.Link)) throw Error("noUiSlider: 'serialization." + (a ? "upper" : "lower") + "' can only contain Link instances."); this.I(a); this.J(d); this.q(b.format) }) }); a.dir && 1 < a.b && a.o.reverse() } function O(a, b) { var f = { c: [], d: [], h: [!1], margin: 0 }, g; g = { step: { e: !1, f: d }, start: { e: !0, f: E }, connect: { e: !0, f: J }, direction: { e: !0, f: L }, range: { e: !0, f: n }, snap: { e: !1, f: I }, orientation: { e: !1, f: D }, margin: { e: !1, f: K }, behaviour: { e: !0, f: M }, serialization: { e: !0, f: N } }; a = c.extend({ connect: !1, direction: "ltr", behaviour: "tap", orientation: "horizontal" }, a); a.serialization = c.extend({ lower: [], upper: [], format: {} }, a.serialization); c.each(g, function(c, d) { if (void 0 === a[c]) { if (d.e) throw Error("noUiSlider: '" + c + "' is required."); return !0 } d.f(f, a[c], b) }); f.style = f.k ? "top" : "left"; return f } function P(a, b) { var d = c("