/*! nouislider - 8.3.0 - 2016-02-14 17:37:19 */ !function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}((function(){"use strict";function t(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.documentElement,r=s();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(r.x=0),{top:e.top+r.y-n.clientTop,left:e.left+r.x-n.clientLeft}}function e(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function n(t,e,n){o(t,e),setTimeout((function(){a(t,e)}),n)}function r(t){return Math.max(Math.min(t,100),0)}function i(t){return Array.isArray(t)?t:[t]}function o(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function a(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function s(){var t=void 0!==window.pageXOffset,e="CSS1Compat"===(document.compatMode||"");return{x:t?window.pageXOffset:e?document.documentElement.scrollLeft:document.body.scrollLeft,y:t?window.pageYOffset:e?document.documentElement.scrollTop:document.body.scrollTop}}function u(t){t.stopPropagation()}var c=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},l="noUi-";function f(t,e){return 100/(e-t)}function d(t,e){return 100*e/(t[1]-t[0])}function p(t,e){for(var n=1;t>=e[n];)n+=1;return n}function h(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,a,s=p(n,t);return r=t[s-1],i=t[s],o=e[s-1],a=e[s],o+function(t,e){return d(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}([r,i],n)/f(o,a)}function m(t,e,n,r){if(100===r)return r;var i,o,a=p(r,t);return n?r-(i=t[a-1])>((o=t[a])-i)/2?o:i:e[a-1]?t[a-1]+function(t,e){return Math.round(t/e)*e}(r-t[a-1],e[a-1]):r}function g(t,n,r){var i;if("number"==typeof n&&(n=[n]),"[object Array]"!==Object.prototype.toString.call(n))throw new Error("noUiSlider: 'range' contains invalid value.");if(!e(i="min"===t?0:"max"===t?100:parseFloat(t))||!e(n[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");r.xPct.push(i),r.xVal.push(n[0]),i?r.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(r.xSteps[0]=n[1])}function v(t,e,n){if(!e)return!0;n.xSteps[t]=d([n.xVal[t],n.xVal[t+1]],e)/f(n.xPct[t],n.xPct[t+1])}function b(t,e,n,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=e,this.direction=n;var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push([t[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort((function(t,e){return t[0][0]-e[0][0]})):o.sort((function(t,e){return t[0]-e[0]})),i=0;i=100)return t.slice(-1)[0];var r,i=p(n,e);return function(t,e){return e*(t[1]-t[0])/100+t[0]}([t[i-1],t[i]],(n-(r=e[i-1]))*f(r,e[i]))}(this.xVal,this.xPct,t),n=Math.pow(10,7),Number((Math.round(e*n)/n).toFixed(7));var e,n},b.prototype.getStep=function(t){return this.direction&&(t=100-t),t=m(this.xPct,this.xSteps,this.snap,t),this.direction&&(t=100-t),t},b.prototype.getApplicableStep=function(t){var e=p(t,this.xPct),n=100===t?2:1;return[this.xNumSteps[e-2],this.xVal[e-n],this.xNumSteps[e-n]]},b.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var w={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};function x(t,n){if(!e(n))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=n}function y(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");t.spectrum=new b(e,t.snap,t.dir,t.singleStep)}function S(t,e){if(e=i(e),!Array.isArray(e)||!e.length||e.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function E(t,e){if(t.snap=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function N(t,e){if(t.animate=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function M(t,e){if("lower"===e&&1===t.handles)t.connect=1;else if("upper"===e&&1===t.handles)t.connect=2;else if(!0===e&&2===t.handles)t.connect=3;else{if(!1!==e)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t.connect=0}}function U(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function P(t,n){if(!e(n))throw new Error("noUiSlider: 'margin' option must be numeric.");if(0!==n&&(t.margin=t.spectrum.getMargin(n),!t.margin))throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function O(t,n){if(!e(n))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(n),!t.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function L(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1,t.connect=[0,2,1,3][t.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function j(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=e.indexOf("tap")>=0,r=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,a=e.indexOf("hover")>=0;if(r&&!t.connect)throw new Error("noUiSlider: 'drag' behaviour must be used with 'connect': true.");t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:a}}function k(t,e){var n;if(!1!==e)if(!0===e)for(t.tooltips=[],n=0;n",r[1]&&(a+="
"+n.to(r[0])+"
")}(r,t[r])})),i.innerHTML=a,i}function M(t){var e=t.mode,n=t.density||1,r=t.filter||!1,i=function(t,e,n){if("range"===t||"steps"===t)return b.xVal;if("count"===t){var r,i=100/(e-1),o=0;for(e=[];(r=o++*i)<=100;)e.push(r);t="positions"}return"positions"===t?e.map((function(t){return b.fromStepping(n?b.getStep(t):t)})):"values"===t?n?e.map((function(t){return b.fromStepping(b.getStep(b.toStepping(t)))})):e:void 0}(e,t.values||!1,t.stepped||!1),o=function(t,e,n){var r,i=b.direction,o={},a=b.xVal[0],s=b.xVal[b.xVal.length-1],u=!1,c=!1,l=0;return b.direction=0,r=n.slice().sort((function(t,e){return t-e})),(n=r.filter((function(t){return!this[t]&&(this[t]=!0)}),{}))[0]!==a&&(n.unshift(a),u=!0),n[n.length-1]!==s&&(n.push(s),c=!0),n.forEach((function(r,i){var a,s,f,d,p,h,m,g,v,w=r,x=n[i+1];if("steps"===e&&(a=b.xNumSteps[i]),a||(a=x-w),!1!==w&&void 0!==x)for(s=w;s<=x;s=(s+a).toFixed(7)/1){for(m=(p=(d=b.toStepping(s))-l)/t,v=p/(g=Math.round(m)),f=1;f<=g;f+=1)o[(l+f*v).toFixed(5)]=["x",0];h=n.indexOf(s)>-1?1:"steps"===e?2:0,!i&&u&&(h=0),s===x&&c||(o[d.toFixed(5)]=[s,h]),l=d}})),b.direction=i,o}(n,e,i),a=t.format||{to:Math.round};return g.appendChild(N(o,r,a))}function U(){var t=d.getBoundingClientRect(),e="offset"+["Width","Height"][f.ort];return 0===f.ort?t.width||d[e]:t.height||d[e]}function P(t,e,n){void 0!==e&&1!==f.handles&&(e=Math.abs(e-f.dir)),Object.keys(x).forEach((function(r){var o=r.split(".")[0];t===o&&x[r].forEach((function(t){t.call(h,i(B()),e,i(O(Array.prototype.slice.call(w))),n||!1,v)}))}))}function O(t){return 1===t.length?t[0]:f.dir?t.reverse():t}function L(t,e,n,r){var i=function(e){return!g.hasAttribute("disabled")&&(i=g,o=y[14],!(i.classList?i.classList.contains(o):new RegExp("\\b"+o+"\\b").test(i.className))&&(e=function(t,e){t.preventDefault();var n,r,i=0===t.type.indexOf("touch"),o=0===t.type.indexOf("mouse"),a=0===t.type.indexOf("pointer"),u=t;return 0===t.type.indexOf("MSPointer")&&(a=!0),i&&(n=t.changedTouches[0].pageX,r=t.changedTouches[0].pageY),e=e||s(),(o||a)&&(n=t.clientX+e.x,r=t.clientY+e.y),u.pageOffset=e,u.points=[n,r],u.cursor=o||a,u}(e,r.pageOffset),!(t===c.start&&void 0!==e.buttons&&e.buttons>1)&&((!r.hover||!e.buttons)&&(e.calcPoint=e.points[f.ort],void n(e,r)))));var i,o},o=[];return t.split(" ").forEach((function(t){e.addEventListener(t,i,!1),o.push([t,i])})),o}function j(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return k(t,e);var n,i,o,a,s,u,c,l=e.handles||p,f=!1,d=100*(t.calcPoint-e.start)/e.baseSize,h=l[0]===p[0]?0:1;if(o=d,a=e.positions,s=l.length>1,u=o+a[0],c=o+a[1],n=s?(u<0&&(c+=Math.abs(u)),c>100&&(u-=c-100),[r(u),r(c)]):[u,c],f=q(l[0],n[h],1===l.length),l.length>1){if(f=q(l[1],n[h?0:1],!1)||f)for(i=0;i1&&o(g,y[12]);var s=function(){return!1};document.body.noUiListener=s,document.body.addEventListener("selectstart",s,!1)}void 0!==e.handleNumber&&P("start",e.handleNumber)}function V(e){var r,i,o=e.calcPoint,a=0;if(e.stopPropagation(),p.forEach((function(e){a+=t(e)[f.style]})),r=o1&&(e=i?Math.max(e,s):Math.min(e,u)),!1!==n&&f.limit&&p.length>1&&(e=i?Math.min(e,c):Math.max(e,l)),e=b.getStep(e),(e=r(parseFloat(e.toFixed(7))))!==v[i]&&(window.requestAnimationFrame?window.requestAnimationFrame((function(){t.style[f.style]=e+"%"})):t.style[f.style]=e+"%",t.previousSibling||(a(t,y[17]),e>50&&o(t,y[17])),v[i]=e,w[i]=b.fromStepping(e),P("update",i),!0)}function z(t){var e,r,o=i(t);for(f.dir&&f.handles>1&&o.reverse(),f.animate&&-1!==v[0]&&n(g,y[14],300),e=p.length>1?3:1,1===o.length&&(e=1),function(t,e){var n,r,i;for(f.limit&&(t+=1),n=0;n1?r[1].length:0),a=w[e],s=100===t?null:i[2],u=Number((a-i[2]).toFixed(o));return[0===t?null:u>=i[1]?i[2]:i[0]||!1,s]})))},on:D,off:function(t){var e=t.split(".")[0],n=t.substring(e.length);Object.keys(x).forEach((function(t){var r=t.split(".")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||delete x[t]}))},get:B,set:z,updateOptions:function(t){var e,n=B(),r=C({start:[0,0],margin:t.margin,limit:t.limit,step:t.step,range:t.range,animate:t.animate,snap:void 0===t.snap?f.snap:t.snap});for(["margin","limit","step","range","animate"].forEach((function(e){void 0!==t[e]&&(f[e]=t[e])})),r.spectrum.direction=b.direction,b=r.spectrum,v=[-1,-1],z(n),e=0;e=0&&o<8))throw new Error(i);a[i]=o}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof o)throw new Error(i);a[i]=o}else{if("string"!=typeof o)throw new Error(i);a[i]=o}return r(a,"mark","thousand"),r(a,"prefix","negative"),r(a,"prefix","negativeBefore"),a}(n),this.to=function(t){return s(n,o,t)},this.from=function(t){return s(n,a,t)})}}();