define(["jquery"],(function(){function t(t){var n=t.getBoundingClientRect(),e=t.ownerDocument,i=e.defaultView||e.parentWindow,r=e.documentElement,o=i.pageXOffset;return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o=0),{top:n.top+i.pageYOffset-r.clientTop,left:n.left+o-r.clientLeft}}function n(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function e(t,n,e){o(t,n),setTimeout((function(){a(t,n)}),e)}function i(t){return Math.max(Math.min(t,100),0)}function r(t){return Array.isArray(t)?t:[t]}function o(t,n){t.classList?t.classList.add(n):t.className+=" "+n}function a(t,n){t.classList?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")}var s=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"},c=["noUi-target","noUi-base","noUi-origin","noUi-handle","noUi-horizontal","noUi-vertical","noUi-background","noUi-connect","noUi-ltr","noUi-rtl","noUi-dragable","","noUi-state-drag","","noUi-state-tap","noUi-active","","noUi-stacking"];function u(t,n){return 100/(n-t)}function l(t,n){return 100*n/(t[1]-t[0])}function f(t,n){for(var e=1;t>=n[e];)e+=1;return e}function d(t,n,e){if(e>=t.slice(-1)[0])return 100;var i,r,o,a,s=f(e,t);return i=t[s-1],r=t[s],o=n[s-1],a=n[s],o+function(t,n){return l(t,t[0]<0?n+Math.abs(t[0]):n-t[0])}([i,r],e)/u(o,a)}function p(t,n,e,i){if(100===i)return i;var r,o,a=f(i,t);return e?i-(r=t[a-1])>((o=t[a])-r)/2?o:r:n[a-1]?t[a-1]+function(t,n){return Math.round(t/n)*n}(i-t[a-1],n[a-1]):i}function h(t,e,i){var r;if("number"==typeof e&&(e=[e]),"[object Array]"!==Object.prototype.toString.call(e))throw new Error("noUiSlider: 'range' contains invalid value.");if(!n(r="min"===t?0:"max"===t?100:parseFloat(t))||!n(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");i.xPct.push(r),i.xVal.push(e[0]),r?i.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(i.xSteps[0]=e[1])}function m(t,n,e){if(!n)return!0;e.xSteps[t]=l([e.xVal[t],e.xVal[t+1]],n)/u(e.xPct[t],e.xPct[t+1])}function g(t,n,e,i){this.xPct=[],this.xVal=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.snap=n,this.direction=e;var r,o=[];for(r in t)t.hasOwnProperty(r)&&o.push([t[r],r]);for(o.sort((function(t,n){return t[0]-n[0]})),r=0;r<o.length;r++)h(o[r][1],o[r][0],this);for(this.xNumSteps=this.xSteps.slice(0),r=0;r<this.xNumSteps.length;r++)m(r,this.xNumSteps[r],this)}g.prototype.getMargin=function(t){return 2===this.xPct.length&&l(this.xVal,t)},g.prototype.toStepping=function(t){return t=d(this.xVal,this.xPct,t),this.direction&&(t=100-t),t},g.prototype.fromStepping=function(t){return this.direction&&(t=100-t),n=function(t,n,e){if(e>=100)return t.slice(-1)[0];var i,r=f(e,n);return function(t,n){return n*(t[1]-t[0])/100+t[0]}([t[r-1],t[r]],(e-(i=n[r-1]))*u(i,n[r]))}(this.xVal,this.xPct,t),e=Math.pow(10,7),Number((Math.round(n*e)/e).toFixed(7));var n,e},g.prototype.getStep=function(t){return this.direction&&(t=100-t),t=p(this.xPct,this.xSteps,this.snap,t),this.direction&&(t=100-t),t},g.prototype.getApplicableStep=function(t){var n=f(t,this.xPct),e=100===t?2:1;return[this.xNumSteps[n-2],this.xVal[n-e],this.xNumSteps[n-e]]},g.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var v={to:function(t){return t.toFixed(2)},from:Number};function w(t,e){if(!n(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function b(t,n){if("object"!=typeof n||Array.isArray(n))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===n.min||void 0===n.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new g(n,t.snap,t.dir,t.singleStep)}function S(t,n){if(n=r(n),!Array.isArray(n)||!n.length||n.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=n.length,t.start=n}function x(t,n){if(t.snap=n,"boolean"!=typeof n)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function y(t,n){if(t.animate=n,"boolean"!=typeof n)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function E(t,n){if("lower"===n&&1===t.handles)t.connect=1;else if("upper"===n&&1===t.handles)t.connect=2;else if(!0===n&&2===t.handles)t.connect=3;else{if(!1!==n)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t.connect=0}}function U(t,n){switch(n){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function M(t,e){if(!n(e))throw new Error("noUiSlider: 'margin' option must be numeric.");if(t.margin=t.spectrum.getMargin(e),!t.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function N(t,e){if(!n(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(e),!t.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function P(t,n){switch(n){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 O(t,n){if("string"!=typeof n)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var e=n.indexOf("tap")>=0,i=n.indexOf("drag")>=0,r=n.indexOf("fixed")>=0,o=n.indexOf("snap")>=0;t.events={tap:e||o,drag:i,fixed:r,snap:o}}function L(t,n){if(t.format=n,"function"==typeof n.to&&"function"==typeof n.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function k(t,n){var e=document.createElement("div"),i=document.createElement("div"),r=["-lower","-upper"];return t&&r.reverse(),o(i,c[3]),o(i,c[3]+r[n]),o(e,c[2]),e.appendChild(i),e}function A(n,u){var l,f,d,p,h,m,g,v,w,b=n,S=[-1,-1],x=u.spectrum,y=[],E={};function U(t,n,e){var i=["horizontal","vertical"][u.ort],r=document.createElement("div");function a(t,n,e){return'class="'+n+" "+n+"-"+i+" "+n+(["-normal","-large","-sub"][e[1]]+'" style="')+u.style+": "+t+'%"'}return o(r,"noUi-pips"),o(r,"noUi-pips-"+i),Object.keys(t).forEach((function(i){!function(t,i){x.direction&&(t=100-t),i[1]=i[1]&&n?n(i[0],i[1]):i[1],r.innerHTML+="<div "+a(t,"noUi-marker",i)+"></div>",i[1]&&(r.innerHTML+="<div "+a(t,"noUi-value",i)+">"+e.to(i[0])+"</div>")}(i,t[i])})),r}function M(){return l["offset"+["Width","Height"][u.ort]]}function N(t,n){void 0!==n&&(n=Math.abs(n-u.dir)),Object.keys(E).forEach((function(e){var i=e.split(".")[0];t===i&&E[e].forEach((function(t){t(r(F()),n,P(Array.prototype.slice.call(y)))}))}))}function P(t){return 1===t.length?t[0]:u.dir?t.reverse():t}function O(t,n,e,i){var r=function(n){return!b.hasAttribute("disabled")&&(r=b,o=c[14],!void(r.classList?r.classList.contains(o):new RegExp("(^| )"+o+"( |$)","gi").test(r.className))&&(n=function(t){t.preventDefault();var n,e,i=0===t.type.indexOf("touch"),r=0===t.type.indexOf("mouse"),o=0===t.type.indexOf("pointer"),a=t;return 0===t.type.indexOf("MSPointer")&&(o=!0),i&&(n=t.changedTouches[0].pageX,e=t.changedTouches[0].pageY),(r||o)&&(n=t.clientX+window.pageXOffset,e=t.clientY+window.pageYOffset),a.points=[n,e],a.cursor=r||o,a}(n),!(t===s.start&&void 0!==n.buttons&&n.buttons>1)&&(n.calcPoint=n.points[u.ort],void e(n,i))));var r,o},o=[];return t.split(" ").forEach((function(t){n.addEventListener(t,r,{passive:"touchmove"!=t&&"touchend"!=t&&"touchstart"!=t}),o.push([t,r])})),o}function L(t,n){var e,r,o,a,s,c,u,l=n.handles||f,d=!1,p=100*(t.calcPoint-n.start)/M(),h=l[0]===f[0]?0:1;if(o=p,a=n.positions,s=l.length>1,c=o+a[0],u=o+a[1],e=s?(c<0&&(u+=Math.abs(c)),u>100&&(c-=u-100),[i(c),i(u)]):[c,u],d=C(l[0],e[h],1===l.length),l.length>1){if(d=C(l[1],e[h?0:1],!1)||d)for(r=0;r<n.handles.length;r++)N("slide",r)}else d&&N("slide",h)}function A(t,n){var e=l.getElementsByClassName(c[15]),i=n.handles[0]===f[0]?0:1;e.length&&a(e[0],c[15]),t.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));var r=document.documentElement;r.noUiListeners.forEach((function(t){r.removeEventListener(t[0],t[1])})),a(b,c[12]),N("set",i),N("change",i)}function V(t,n){var e=document.documentElement;if(1===n.handles.length&&(o(n.handles[0].children[0],c[15]),n.handles[0].hasAttribute("disabled")))return!1;t.stopPropagation();var i=O(s.move,e,L,{start:t.calcPoint,handles:n.handles,positions:[S[0],S[f.length-1]]}),r=O(s.end,e,A,{handles:n.handles});if(e.noUiListeners=i.concat(r),t.cursor){document.body.style.cursor=getComputedStyle(t.target).cursor,f.length>1&&o(b,c[12]);var a=function(){return!1};document.body.noUiListener=a,document.body.addEventListener("selectstart",a,!1)}}function j(n){var i,r,o=n.calcPoint,a=0;if(n.stopPropagation(),f.forEach((function(n){a+=t(n)[u.style]})),i=o<a/2||1===f.length?0:1,r=100*(o-=t(l)[u.style])/M(),u.events.snap||e(b,c[14],300),f[i].hasAttribute("disabled"))return!1;C(f[i],r),N("slide",i),N("set",i),N("change",i),u.events.snap&&V(n,{handles:[f[a]]})}function C(t,n,e){var r=t!==f[0]?1:0,s=S[0]+u.margin,l=S[1]-u.margin,d=S[0]+u.limit,p=S[1]-u.limit;return f.length>1&&(n=r?Math.max(n,s):Math.min(n,l)),!1!==e&&u.limit&&f.length>1&&(n=r?Math.min(n,d):Math.max(n,p)),n=x.getStep(n),(n=i(parseFloat(n.toFixed(7))))!==S[r]&&(t.style[u.style]=n+"%",t.previousSibling||(a(t,c[17]),n>50&&o(t,c[17])),S[r]=n,y[r]=x.fromStepping(n),N("update",r),!0)}function F(){var t,n=[];for(t=0;t<u.handles;t+=1)n[t]=u.format.to(y[t]);return P(n)}if(b.noUiSlider)throw new Error("Slider was already initialized.");return l=function(t,n,e){o(e,c[0]),o(e,c[8+t]),o(e,c[4+n]);var i=document.createElement("div");return o(i,c[1]),e.appendChild(i),i}(u.dir,u.ort,b),f=function(t,n,e){var i,r=[];for(i=0;i<t;i+=1)r.push(e.appendChild(k(n,i)));return r}(u.handles,u.dir,l),function(t,n,e){switch(t){case 1:o(n,c[7]),o(e[0],c[6]);break;case 3:o(e[1],c[6]);case 2:o(e[0],c[7]);case 0:o(n,c[6])}}(u.connect,b,f),function(t){var n,e;if(!t.fixed)for(n=0;n<f.length;n+=1)O(s.start,f[n].children[0],V,{handles:[f[n]]});t.tap&&O(s.start,l,j,{handles:f}),t.drag&&(o((e=[l.getElementsByClassName(c[7])[0]])[0],c[10]),t.fixed&&e.push(f[e[0]===f[0]?1:0].children[0]),e.forEach((function(t){O(s.start,t,V,{handles:f})})))}(u.events),u.pips&&(d=u.pips,p=d.mode,h=d.density||1,m=d.filter||!1,g=function(t,n,e){if("range"===t||"steps"===t)return x.xVal;if("count"===t){var i,r=100/(n-1),o=0;for(n=[];(i=o++*r)<=100;)n.push(i);t="positions"}return"positions"===t?n.map((function(t){return x.fromStepping(e?x.getStep(t):t)})):"values"===t?e?n.map((function(t){return x.fromStepping(x.getStep(x.toStepping(t)))})):n:void 0}(p,d.values||!1,d.stepped||!1),v=function(t,n,e){var i,r=x.direction,o={},a=x.xVal[0],s=x.xVal[x.xVal.length-1],c=!1,u=!1,l=0;return x.direction=0,i=e.slice().sort((function(t,n){return t-n})),(e=i.filter((function(t){return!this[t]&&(this[t]=!0)}),{}))[0]!==a&&(e.unshift(a),c=!0),e[e.length-1]!==s&&(e.push(s),u=!0),e.forEach((function(i,r){var a,s,f,d,p,h,m,g,v,w=i,b=e[r+1];if("steps"===n&&(a=x.xNumSteps[r]),a||(a=b-w),!1!==w&&void 0!==b)for(s=w;s<=b;s+=a){for(m=(p=(d=x.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=e.indexOf(s)>-1?1:"steps"===n?2:0,!r&&c&&(h=0),s===b&&u||(o[d.toFixed(5)]=[s,h]),l=d}})),x.direction=r,o}(h,p,g),w=d.format||{to:Math.round},b.appendChild(U(v,m,w))),{destroy:function(){c.forEach((function(t){t&&a(b,t)})),b.innerHTML="",delete b.noUiSlider},steps:function(){return P(S.map((function(t,n){var e,i,r=x.getApplicableStep(t),o=(e=String(r[2]),(i=e.split(".")).length>1?i[1].length:0),a=y[n],s=100===t?null:r[2],c=Number((a-r[2]).toFixed(o));return[0===t?null:c>=r[1]?r[2]:r[0]||!1,s]})))},on:function(t,n){E[t]=E[t]||[],E[t].push(n),"update"===t.split(".")[0]&&f.forEach((function(t,n){N("update",n)}))},off:function(t){var n=t.split(".")[0],e=t.substring(n.length);Object.keys(E).forEach((function(t){var i=t.split(".")[0],r=t.substring(i.length);n&&n!==i||e&&e!==r||delete E[t]}))},get:F,set:function(t){var n,i,o=r(t);for(u.dir&&u.handles>1&&o.reverse(),u.animate&&-1!==S[0]&&e(b,c[14],300),n=f.length>1?3:1,1===o.length&&(n=1),function(t,n){var e,i,r;for(u.limit&&(t+=1),e=0;e<t;e+=1)null!==(r=n[i=e%2])&&!1!==r&&("number"==typeof r&&(r=String(r)),(!1===(r=u.format.from(r))||isNaN(r)||!1===C(f[i],x.toStepping(r),e===3-u.dir))&&N("update",i))}(n,o),i=0;i<f.length;i++)N("set",i)}}}return{create:function(t,n){if(!t.nodeName)throw new Error("noUiSlider.create requires a single element.");var e=function(t){var n,e={margin:0,limit:0,animate:!0,format:v};n={step:{r:!1,t:w},start:{r:!0,t:S},connect:{r:!0,t:E},direction:{r:!0,t:P},snap:{r:!1,t:x},animate:{r:!1,t:y},range:{r:!0,t:b},orientation:{r:!1,t:U},margin:{r:!1,t:M},limit:{r:!1,t:N},behaviour:{r:!0,t:O},format:{r:!1,t:L}};var i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"};return Object.keys(i).forEach((function(n){void 0===t[n]&&(t[n]=i[n])})),Object.keys(n).forEach((function(i){var r=n[i];if(void 0===t[i]){if(r.r)throw new Error("noUiSlider: '"+i+"' is required.");return!0}r.t(e,t[i])})),e.pips=t.pips,e.style=e.ort?"top":"left",e}(n),i=A(t,e);i.set(e.start),t.noUiSlider=i}}}));