This repository has been archived by the owner on Oct 31, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctl.singlefile.experimental.min.js
1 lines (1 loc) · 25.4 KB
/
ctl.singlefile.experimental.min.js
1
(function(win,jQuery,module){"use strict";var requestAnimFrame=function(){return"undefined"!==typeof requestAnimationFrame&&win.requestAnimationFrame||win.webkitRequestAnimationFrame||win.mozRequestAnimationFrame||function(callback){win.setTimeout(callback,1e3/60)}}(),console=win.console||{log:function(){},warn:function(){}},Ctl=function(el,_options){if(!(this instanceof Ctl)){return this&&1===this.nodeType?new Ctl(this,el):new Ctl(el,_options)}var that=this,options=parseOptions(el,_options),min=options.min,max=options.max,warp=options.warp||"lin",map=Ctl.warps[warp].map.bind(this),unmap=Ctl.warps[warp].unmap.bind(this),step=options.step,value=options.value,normal=unmap(value);null==options.maxPrecision&&(options.maxPrecision=step?(step.toString().match(/\..*/)||[""])[0].slice(1).length:options.defaultPrecision);if(!options.numCharacters){options.numCharacters=Math.min(options.max.toFixed().length,2);options.maxPrecision&&(options.numCharacters+=1+options.maxPrecision);min<0&&(options.numCharacters+=1)}step||(step=1/Math.pow(10,options.maxPrecision));this.isVertical="vertical"===options.direction;this.formatNumber=formatNumberMemoize({numCharacters:options.numCharacters,maxPrecision:options.maxPrecision,showSign:min<0,fixedWidth:!this.isVertical});createDOM.call(this,options);Object.defineProperties(this,{warp:{enumerable:true,configurable:true,get:function(){return warp},set:function(input){if(input in Ctl.warps){warp=input;map=Ctl.warps[input].map.bind(that);unmap=Ctl.warps[input].unmap.bind(that)}}},normal:{enumerable:true,configurable:true,get:function(){return normal},set:function(input){var old=normal;input.toString()===input&&(input=parseFloat(input,10));if(isNaN(input)){throw new Error("invalid input")}input=Math.min(Math.max(0,input),1);value=map(input);step&&(value=Math.round(value/step)*step);normal=unmap(value);old!==normal&&that.update()}},value:{enumerable:true,configurable:true,get:function(){return value},set:function(input){var old=value;input.toString()===input&&(input=parseFloat(input,10));if(isNaN(input)){throw new Error("invalid input")}step&&(input=Math.round(input/step)*step);value=Math.min(Math.max(this.min,input),this.max);normal=unmap(value);old!==value&&that.update()}},min:{enumerable:true,configurable:true,get:function(){return min},set:function(input){input.toString()===input&&(input=parseFloat(input,10));if(isNaN(input)){throw new Error("invalid minimum value")}if(input>max){min=max;max=input;that.input.max=max;that.input.min=min}else{min=input;that.input.min=min}that.normal=unmap(that.value)}},max:{enumerable:true,configurable:true,get:function(){return max},set:function(input){input.toString()===input&&(input=parseFloat(input,10));if(isNaN(input)){throw new Error("invalid maximum value")}if(input<min){max=min;min=input;that.input.min=min;that.input.max=max}else{max=input;that.input.max=max}that.normal=unmap(that.value)}},step:{enumerable:true,configurable:true,get:function(){return step},set:function(input){input.toString()===input&&(input=parseFloat(input,10));if(isNaN(input)){throw new Error("invalid step value")}step=Math.max(Math.min(0,input),max-min);that.input.step=step;that.value=map(that.normal)}},listeners:{enumerable:false,configurable:true,value:[]}});this.value=value;this.update();return this};Ctl.prototype.update=function(){var that=this,value=this.value,listeners=this.listeners;this.input.value!==value&&(this.input.value=value);requestAnimFrame(function(){that.number.textContent=that.formatNumber(value);that.render()});if(listeners.length){for(var i=0,n=listeners.length;i<n;i++){listeners[i].call(this,value,this.normal)}}dispatchEvent("change",this.input)};Ctl.prototype.bind=function(fn){this.listeners.push(fn)};Ctl.prototype.unbind=function(fn){var i=this.listeners.indexOf(fn);i>-1&&this.listeners.splice(i,1)};function parseOptions(el,_options){var containerElement,inputElement,elementAttributes,options,spec;if(!(el&&1===el.nodeType)){null==_options&&(_options=el)}else{if(/INPUT/i.test(el.tagName)){inputElement=el}else{containerElement=el;if(containerElement.children.length){console.warn("Ctl: container not empty, removing contents");el.innerHTML=""}}elementAttributes=Array.prototype.slice.apply(el.attributes);elementAttributes=elementAttributes.reduce(function(obj,attr){var val=attr.value;obj[attr.nodeName]=isNaN(val)?val.toString():parseFloat(val,10);return obj},{});el.value&&!isNaN(el.value)&&(elementAttributes.value=parseFloat(el.value))}!!elementAttributes&&elementAttributes.spec&&(spec=Ctl.specs[elementAttributes.spec]);!!_options&&_options.spec&&(spec=Ctl.specs[_options.spec]);options=[Ctl.defaultOptions,spec,elementAttributes,_options].reduce(function(finalObj,obj){"object"===typeof obj&&Object.keys(obj).forEach(function(key){null!=obj[key]&&(finalObj[key]=obj[key])});return finalObj},{});options.input=inputElement||document.createElement("input");options.container=containerElement||document.createElement("div");if(!(options.warp in Ctl.warps)){throw new Error("Ctl: "+options.warp+" is not a valid warp value")}if("exp"==options.warp&&options.min<=0){throw new Error("Ctl: cannot use exponential warp with a minimum <= 0")}return options}function createDOM(options){var that=this,container=options.container,input=options.input,theme=options.theme||"",cssPrefix="ctl-",outerClass="box",inputClass="input",innerClasses=["meter","handle","label","range","number"],directionClass=this.isVertical?"vertical":"horizontal",numberWidth=options.numCharacters+3+"ex";toggleClass(container,cssPrefix+outerClass,true);toggleClass(container,cssPrefix+directionClass,true);theme&&toggleClass(container,theme,true);options.width&&(container.style.width=options.width+(isNaN(options.width)?"":"px"));options.height&&(container.style.height=options.height+(isNaN(options.width)?"":"px"));this.el=container;input.step=options.step;input.min=options.min;input.max=options.max;input.value=options.value;input.type="number";toggleClass(input,cssPrefix+inputClass,true);input.style.width=numberWidth;this.input=input;innerClasses.forEach(function(className){var div=document.createElement("div");toggleClass(div,cssPrefix+className,true);container.appendChild(div);that[className]=div});this.number.textContent=this.formatNumber(options.value);this.label.textContent=options.label;this.label.setAttribute("unselectable","on");Object.keys(Ctl.eventHandlers).forEach(function(elementKey){var element=that[elementKey],elementEvents=Ctl.eventHandlers[elementKey];Object.keys(elementEvents).forEach(function(eventName){element.addEventListener(eventName,elementEvents[eventName].bind(that))})});if(!this.isVertical){this.number.style.width=numberWidth;this.range.style.right=numberWidth}this.render=(this.isVertical?renderVertical:renderHorizontal).bind(this);input.parentNode&&input.parentNode.replaceChild(container,input);container.appendChild(input);!this.isVertical&&container.clientHeight&&(container.style.lineHeight=container.clientHeight+"px")}var dispatchEvent=function(){return document.createEvent?function(name,target){var event=document.createEvent("HTMLEvents");event.initEvent(name,true,true);target.dispatchEvent(event)}:function(name,target){target.fireEvent("on"+name)}}();function toggleClass(el,className,toggleOn){var str=el.className,re=new RegExp("\\s+\\b"+className.toString()+"\\b");toggleOn&&!re.test(str)?el.className=str+" "+className:toggleOn||(el.className=str.replace(re,""))}function formatNumberMemoize(options){var MIN_CHARS=3,DEFAULT_CHARS=8,maxPrecision=options.maxPrecision,showSign=options.showSign,numCharacters=Math.max(options.numCharacters||DEFAULT_CHARS,MIN_CHARS),pattern=/(-)?(\d+)(\.)?(\d+)?/,sp=options.isFixedWidth?" ":" ",paddingString="";showSign&&(numCharacters-=1);for(;paddingString.length<numCharacters;){paddingString+=sp}return function(value){var parts=value.toFixed(maxPrecision).match(pattern),sign=showSign?parts[1]||sp:"",places=parts[2].length,precision=Math.max(0,Math.min(numCharacters-places-1,maxPrecision)),decimal=precision?1:0;return sign+paddingString.slice(places+precision+decimal)+Math.abs(value).toFixed(precision)}}var vendorTransform="transform";win.addEventListener("load",function(){var vendorTransformNames=["transform","WebkitTransform","MozTransform","msTransform","OTransform"];vendorTransform=(vendorTransformNames.filter(function(vendorName){return vendorName in document.body.style})||["transform"])[0]});function renderHorizontal(){var normal=this.normal,rangeWidth=this.range.clientWidth,handleMargin=this.handle.clientWidth,handlePosition=normal*(rangeWidth-handleMargin),centerOffset=this.min<0?.5:0,meterWidth=(normal-centerOffset)*rangeWidth,meterOffset;this.handle.style[vendorTransform]="translate("+handlePosition.toFixed()+"px, 0)";this.meter.style.width=Math.abs(meterWidth).toFixed()+"px";if(centerOffset){if(normal>.5!=this.isPositive){this.isPositive=normal>.5;toggleClass(this.meter,"negative",!this.isPositive);toggleClass(this.meter,"positive",this.isPositive)}meterOffset=Math.min(meterWidth,0)+.5*rangeWidth;this.meter.style[vendorTransform]="translate("+meterOffset.toFixed()+"px, 0)"}}function renderVertical(){var normal=this.normal,rangeHeight=this.range.clientHeight,handleMargin=this.handle.clientHeight,handlePosition=(1-normal)*(rangeHeight-handleMargin),centerOffset=this.min<0?.5:0,meterHeight=(normal-centerOffset)*rangeHeight,meterOffset;this.handle.style[vendorTransform]="translate(0, "+handlePosition.toFixed()+"px)";this.meter.style.height=Math.abs(meterHeight).toFixed()+"px";if(centerOffset){if(normal>.5!==this.isPositive){this.isPositive=normal>.5;toggleClass(this.meter,"negative",!this.isPositive);toggleClass(this.meter,"positive",this.isPositive)}meterOffset=.5*rangeHeight-Math.max(meterHeight,0);this.meter.style[vendorTransform]="translate(0, "+meterOffset.toFixed()+"px)"}else{meterOffset=rangeHeight-meterHeight;this.meter.style[vendorTransform]="translate(0, "+meterOffset.toFixed()+"px)"}}Ctl.defaultOptions={theme:"electro",min:0,max:1,step:0,value:0,warp:"lin",direction:"horizontal",numCharacters:0,defaultPrecision:3,label:"",alt_key_step:.05,shift_key_step:10};Ctl.eventHandlers={input:{change:function(event){event instanceof CustomEvent||(this.value=this.input.value)},focus:function(){this.input.setSelectionRange(0,256)},mousewheel:function(event){var delta=event.wheelDelta||-1*event.deltaY,direction=delta>=0?1:-1,step=this.step,SHIFT_SCALE=Ctl.defaultOptions.shift_key_step,ALT_STEP=Ctl.defaultOptions.alt_key_step;event.preventDefault();event.shiftKey?this.value+=direction*step*SHIFT_SCALE:event.altKey?this.normal+=direction*ALT_STEP:this.value+=direction*step},keydown:function(event){var step=this.step,SHIFT_SCALE=Ctl.defaultOptions.shift_key_step,ALT_STEP=Ctl.defaultOptions.alt_key_step,increment;increment=event.shiftKey?step*SHIFT_SCALE:event.altKey?(this.max-this.min)*ALT_STEP:step;switch(event.which){case 38:this.value+=increment;event.preventDefault();break;case 40:this.value-=increment;event.preventDefault();break;case 33:this.normal+=ALT_STEP;event.preventDefault();break;case 34:this.normal-=ALT_STEP;event.preventDefault()}}},range:{mousedown:function(event){event.preventDefault();var that=this,body=document.body,range=this.range,handle=this.handle,bounds=range.getBoundingClientRect(),marginX=.5*handle.offsetWidth,marginY=.5*handle.offsetHeight;function getPosition(evt){evt.touches&&evt.touches.length&&(evt=evt.touches[evt.touches.length-1]);var x=Math.min(Math.max(marginX,evt.clientX-bounds.left),bounds.width-marginX),y=Math.min(Math.max(marginY,evt.clientY-bounds.top),bounds.height-marginY);return[(x-marginX)/(bounds.width-2*marginX),(y-marginY)/(bounds.height-2*marginY)]}function move(evt){var position=getPosition(evt);evt.preventDefault();that.normal=that.isVertical?1-position[1]:position[0]}function end(evt){evt.preventDefault();body.removeEventListener("mousemove",move);body.removeEventListener("mouseup",end);body.removeEventListener("touchmove",move);body.removeEventListener("touchend",end)}body.addEventListener("mousemove",move);body.addEventListener("mouseup",end);body.addEventListener("touchmove",move);body.addEventListener("touchend",end);"activeElement"in document&&document.activeElement!=document.body&&document.activeElement.blur()}}};Ctl.eventHandlers.range.touchstart=Ctl.eventHandlers.range.mousedown;Ctl.eventHandlers.input.wheel=Ctl.eventHandlers.input.mousewheel;Ctl.eventHandlers.range.wheel=Ctl.eventHandlers.input.mousewheel;Ctl.eventHandlers.range.mousewheel=Ctl.eventHandlers.input.mousewheel;Ctl.warps={lin:{map:function(x){var min=this.min,max=this.max;return x<=0?min:x>=1?max:x*(max-min)+min},unmap:function(x){var min=this.min,max=this.max;return x<=min?0:x>=max?1:(x-min)/(max-min)}},exp:{map:function(x){var min=this.min,max=this.max,logMin=Math.log(min),logMax=Math.log(max);return x<=0?min:x>=1?max:Math.exp(logMin+(logMax-logMin)*x)},unmap:function(x){var min=this.min,max=this.max,logMin=Math.log(min),logMax=Math.log(max);return x<=min?0:x>=max?1:(Math.log(x)-logMin)/(logMax-logMin)}},quadIn:{map:function(x){var min=this.min,max=this.max;return x<=0?min:x>=1?max:(max-min)*x*x+min},unmap:function(x){var min=this.min,max=this.max;return x<=min?0:x>=max?1:Math.sqrt(Math.abs(x-min)/(max-min))}},quadOut:{map:function(x){var min=this.min,max=this.max,onesubx=1-x;return x<=0?min:x>=1?max:(max-min)*(1-onesubx*onesubx)+min},unmap:function(x){var min=this.min,max=this.max;return x<=min?0:x>=max?1:1-Math.sqrt(Math.abs(max-x)/(max-min))}}};Ctl.specs={unipolar:{min:0,max:1,warp:"lin",step:0,value:0},bipolar:{min:-1,max:1,value:0},bool:{min:0,max:1,warp:"lin",step:1,value:0},rotate:{min:-180,max:180,warp:"lin",step:1,value:0},freq:{min:20,max:2e4,warp:"exp",step:0,value:440},lofreq:{min:.1,max:100,warp:"exp",step:0,value:6},midfreq:{min:25,max:4200,warp:"exp",step:0,value:440},widefreq:{min:.1,max:2e4,warp:"exp",step:0,value:440},phase:{min:0,max:360},rq:{min:.001,max:2,warp:"exp",step:0,value:.707},midi:{min:0,max:127,step:1,value:64},midinote:{min:0,max:127,step:1,value:60},midivelocity:{min:1,max:127,value:64},amp:{min:0,max:1,warp:"quadIn",step:0,value:0},boostcut:{min:-20,max:20,value:0},pan:{min:-1,max:1,value:0},detune:{min:-20,max:20,value:0},rate:{min:.125,max:8,warp:"exp",step:0,value:1},beats:{min:0,max:20},delay:{min:1e-4,max:1,warp:"exp",step:0,value:.3},integer:{min:-1024,max:1024,warp:"lin",step:1,value:0},"float":{min:-1024,max:1024,warp:"lin",step:0,value:0}};jQuery&&(jQuery.fn.ctl=function(options){var results=this.not(".ctl-box, .ctl-input").map(function(){return new Ctl(this,options)});return results.length?1===results.length?results[0]:results.toArray():null});module?module.exports=Ctl:win.Ctl=Ctl})(this,"undefined"!==typeof jQuery&&jQuery,"object"==typeof module&&module);(function(){var csstext=[".ctl-box.electro {","background: #444;","font-family: -webkit-small-control, sans-serif;","font-size: smaller;","}",".ctl-horizontal.electro .ctl-handle {","width: 3ex;","}",".ctl-vertical.electro {","min-width: 3ex;","min-width: 1.5rem;","}",".ctl-box.electro > .ctl-input, .ctl-box.electro > .ctl-number {","background: #fff;","}",".ctl-box.electro > .ctl-label {","color: #fff;","}",".ctl-box.electro > .ctl-meter {","background-color: #0073ea;","}",".ctl-box.electro > .ctl-handle {","background: #ff0084;","}",".ctl-box.electro > .ctl-input:focus {","box-sizing: border-box;","}",".ctl-box {","position: relative;","border: 1px solid black;","-moz-box-sizing: content-box;","box-sizing: content-box;","display: inline-block;}",".ctl-vertical {","max-width: 4rem;","min-width: 8px;","min-height: 5rem;","}",".ctl-vertical .ctl-range {","bottom: 1.5em;","width: 100%;","cursor: row-resize;","}",".ctl-horizontal .ctl-range {","right: 8ex;","height: 100%;","cursor: col-resize;","}",".ctl-horizontal {","min-height: 1em;","min-height: calc(1em + 2px);","line-height: inherit;","min-width: 10rem;","}",".ctl-vertical .ctl-handle {","width: 100%;","}",".ctl-vertical .ctl-meter {","width: 100%;","height: 0;","}",".ctl-box.ctl-vertical .ctl-label {"," -webkit-transform: rotate(90deg);"," -moz-transform: translate(2ex, 0) rotate(90deg);"," -ms-transform: translate(2ex, 0) rotate(90deg);"," -o-transform: translate(2ex, 0) rotate(90deg);"," transform: translate(2ex, 0) rotate(90deg);"," "," "," "," -webkit-transform-origin: 1ex 1ex;"," -moz-transform-origin: 0 0;"," -ms-transform-origin: 0 0;"," -o-transform-origin: 0 0;"," transform-origin: 0 0;"," white-space: nowrap;"," top: 0.5em;","}",".ctl-horizontal .ctl-meter {","height: 100%;","}",".ctl-horizontal .ctl-handle {","height: 100%;","}",".ctl-box > .ctl-range, .ctl-box > .ctl-number, .ctl-box > .ctl-label {","margin: 0;","border: none;","background: transparent;","-webkit-user-select: none;","user-select: none;","-moz-box-sizing: border-box;"," ","box-sizing: border-box;","font-family: inherit;","font-size: inherit;","}",".ctl-box > .ctl-label {","margin-left: 0.5ex;","min-width: 8ex;","background: transparent;","vertical-align: middle;","position: absolute;","left: 0;","line-height: inherit;","-webkit-user-select: none;"," -moz-user-select: none;"," -ms-user-select: none;"," user-select: none;","pointer-events: none;","}",".ctl-box > .ctl-meter {","position: absolute;","top: 0;","left: 0;","}",".ctl-box > .ctl-range {","position: absolute;","left: 0;","top: 0;","}",".ctl-box > .ctl-handle {","position: absolute;","top: 0;","left: 0;","min-width: 0.5rem;","background: #000;","min-height: 0.5rem;","}",".ctl-box > .ctl-number {","white-space: nowrap;","background: #fff;","}",".ctl-box > .ctl-input {","-webkit-appearance: none;"," -moz-appearance: none;"," -ms-appearance: none;"," -o-appearance: none;"," appearance: none;","opacity: 0;","margin: 0;","font-family: inherit;","font-size: inherit;","box-sizing: content-box;","width: 100%;","border: none;","}",".ctl-box > .ctl-input::-webkit-inner-spin-button,",".ctl-box > .ctl-input::-webkit-outer-spin-button {"," -webkit-appearance: none;"," margin: 0;","}","noindex:-o-prefocus,",".ctl-box > .ctl-input {"," margin-right: -2ex;","}",".ctl-box > .ctl-input:focus {","opacity: 1;","outline: none;","-moz-box-sizing: content-box;","max-width: 300%;","box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.4);","}",".ctl-box > .ctl-input:not(:focus) {","}",".ctl-horizontal .ctl-number, .ctl-horizontal .ctl-input {","height: 100%;","max-width: 100%;","right: 0;","box-sizing: content-box;","line-height: normal;","}",".ctl-vertical > .ctl-number, .ctl-vertical > .ctl-input {"," min-width: 100%;"," right: 0;"," height: 1.5em;"," line-height: 1.5em;","}",".ctl-box > .ctl-handle, .ctl-box > .ctl-meter, .ctl-box > .ctl-label {","-webkit-transform-style: preserve-3d;","}",".ctl-vertical > .ctl-number {","width: 100%;","padding: 1px;","text-align: right;","}",".ctl-box > .ctl-input, .ctl-box > .ctl-number {","position: absolute;","bottom: 0;","min-height: 1em;","text-align: right;","padding: 0 2px;","vertical-align: middle;","overflow: hidden;","box-sizing: border-box;","-moz-box-sizing: border-box;","}",".ctl-box.minimal {","background: #fff;","font: smaller 'Lucida Grande', sans-serif;","border: none;","font-family: 'Lucida Grande', sans-serif;","}",".ctl-vertical.minimal {","min-width: 1em;","}",".ctl-horizontal.minimal {","margin-top: 10px;","}",".ctl-horizontal.minimal .ctl-range {","cursor: ew-resize;","}",".ctl-vertical.minimal .ctl-range {","cursor: ns-resize;","}",".ctl-box.minimal > .ctl-input, .ctl-box.minimal > .ctl-number {","background: #fff;","color: #000;","}",".ctl-box.minimal > .ctl-label {","color: #000;","}",".ctl-box.minimal > .ctl-meter {","background-color: #333;","}",".ctl-box.minimal > .ctl-handle {","}",".ctl-box.minimal > .ctl-range {","}",".ctl-box.minimal > .ctl-input:focus {","}",".ctl-box.ctl-vertical.minimal {","min-width: 3ex;","}",".ctl-box.ctl-vertical.minimal > .ctl-label {","left: 50%;","}",".ctl-box.ctl-horizontal.minimal > .ctl-label {","bottom: 50%;","line-height: 1em;","}",".ctl-box.ctl-vertical.minimal > .ctl-meter {","width: 50%;","left: 0;","border: 1px solid black;","background: transparent;","}",".ctl-box.ctl-horizontal.minimal > .ctl-meter {","height: 50%;","bottom: 0;","top: auto;","border: 1px solid black;","background: transparent;","}",".ctl-box.ctl-vertical.minimal > .ctl-range {","border-color: #000;","border-style: solid;","border-width: 2px 0;","box-sizing: content-box;","-moz-box-sizing: border-box;","}",".ctl-box.ctl-horizontal.minimal > .ctl-range {","border-color: #000;","border-style: solid;","border-width: 0 2px;","box-sizing: border-box;","-moz-box-sizing: border-box;","top: auto;","}",".ctl-box.minimal > .ctl-handle {","background: #000;","border: 1px solid #000;","}",".ctl-box.ctl-vertical.minimal > .ctl-handle {","height: 1ex;","min-height: 1ex;","width: 50%;","}",".ctl-box.ctl-horizontal.minimal > .ctl-handle {","width: 1ex;","min-width: 1ex;","height: 50%;","min-height: 50%;","bottom: 0;","top: auto;","}",".ctl-box.ctl-vertical.minimal > .ctl-input, .ctl-box.ctl-vertical.minimal > .ctl-number {","background: transparent;","padding: 0;","overflow: visible;","width: auto;","min-width: 100%;","}",".ctl-box.ctl-horizontal.minimal > .ctl-input, .ctl-box.ctl-horizontal.minimal > .ctl-number {","background: transparent;","line-height: inherit;","font-size: inherit;","}",".ctl-box.ctl-vertical.minimal > .ctl-number {","max-width: 300%;","user-select: none;","}",".ctl-box.minimal > .ctl-input:focus {","background: #fff;","}",".ctl-box.dat {","background: #404040;","font: 11px 'Lucida Grande', sans-serif;","text-shadow: 0 -1px 0 #111111;","min-height: 27px;","border: 2px solid #303030;","}",".ctl-vertical.dat {","min-width: 27px;","}",".ctl-horizontal.dat {","min-height: 27px;","}",".ctl-horizontal.dat .ctl-range {","cursor: ew-resize;","}",".ctl-vertical.dat .ctl-range {","cursor: ns-resize;","bottom: 27px;","}",".ctl-box.dat > .ctl-input, .ctl-box.dat > .ctl-number {","background: #303030;","color: #2fa1d6;","min-height: 27px;","line-height: 27px;","-moz-box-sizing: border-box;","}",".ctl-box.ctl-vertical.dat > .ctl-input, .ctl-box.ctl-vertical.dat > .ctl-number {","background: #303030;","color: #2fa1d6;","min-height: 27px;","line-height: 27px;","}",".ctl-box.dat > .ctl-label {","color: #fff;","}",".ctl-box.dat > .ctl-meter {","background-color: #2fa1d6;","}",".ctl-box.dat > .ctl-handle {"," display: none;","}",".ctl-box.dat > .ctl-range {","}",".ctl-box.dat > .ctl-input:focus {","box-shadow: 0px 1px 0 1px #404040;","}",".ctl-box.flat {","background: #ebedef;",'font: 14px "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;;;',"border: none;","border-radius: 32px;","}",".ctl-horizontal.flat {","min-height: 12px;","max-height: 12px;","height: 12px;","margin: 30px 0px 10px 0px;","box-sizing: border-box;","}",".ctl-vertical.flat {","max-width: 12px;","width: 12px;","background: transparent;","}",".ctl-horizontal.flat .ctl-handle {","}",".ctl-vertical.flat .ctl-handle {"," top: 20px;","}",".ctl-vertical.flat .ctl-meter {","top: 20px;","}",".ctl-horizontal.flat .ctl-range {","cursor: ew-resize;","right: 0 !important;","}",".ctl-vertical.flat .ctl-range {","cursor: pointer;","top: 20px;","bottom: 28px;","box-sizing: content-box;","}",".ctl-box.ctl-vertical.flat .ctl-label {","-webkit-transform: none;"," -moz-transform: none;"," -ms-transform: none;"," -o-transform: none;"," transform: none;","top: 0;","width: 4ex;","left: -2ex;","text-align: center;","padding: 0;","margin-left: 6px;","overflow: hidden;","min-width: 4ex;","border-radius: 6px;","}",".ctl-box.flat > .ctl-label {","color: #34495e;","top: -20px;","user-select: none;","}",".ctl-vertical.flat > .ctl-input, .ctl-vertical.flat > .ctl-number {","bottom: -4px;","right: auto;","left: -2ex;","min-width: 4ex;","max-width: 4ex;","width: 4ex;","text-align: center;","border: 2px solid rgba(0, 0, 0, 0);","}",".ctl-vertical.flat > .ctl-range:after {","position: absolute;","width: 100%;","height: 100%;","content: ' ';","background-color: #ebedef;","z-index: -1;","border-radius: 37px;","}",".ctl-horizontal.flat > .ctl-input, .ctl-horizontal.flat > .ctl-number {","min-width: 8ex;","max-width: 8ex;","width: 8ex;","right: 0;","bottom: auto;","top: -28px;","}",".ctl-box.ctl-horizontal.flat > .ctl-number {","border: 2px solid rgba(0, 0, 0, 0);","background: rgba(0, 0, 0, 0);","}",".ctl-box.ctl-horizontal.flat > .ctl-number {","border: 2px solid rgba(0, 0, 0, 0);","background: rgba(0, 0, 0, 0);","}",".ctl-box.flat > .ctl-input:focus {","box-shadow: none;","border: 2px solid #1abc9c !important;","background: #fff !important;","max-width: 8ex;","width: 8ex;","min-width: 8ex;","}",".ctl-box.ctl-vertical.flat > .ctl-input:focus {","left: -4ex;","}",".ctl-box.flat > .ctl-number {","background: rgba(0, 0, 0, 0);","}",".ctl-box.flat > .ctl-input, .ctl-box.flat > .ctl-number {","line-height: 18px;","color: #34495E;","padding: 4px 4px;","height: 18px;","border-radius: 6px;","width: auto;","-moz-box-sizing: content-box;","box-sizing: content-box;","cursor: pointer;","}",".ctl-box.flat > .ctl-meter {","background-color: #1abc9c;","border-radius: 37px;","}",".ctl-box.flat > .ctl-handle {"," background-color: #16a085;"," border-radius: 50%;"," height: 12px;"," width: 12px;"," box-shadow: 0 0 0px 3px #16A085;","}",".ctl-box.ctl-vertical.flat > .ctl-meter.negative {","border-top-left-radius: 0;","border-top-right-radius: 0;","}",".ctl-box.ctl-vertical.flat > .ctl-meter.positive {","border-bottom-left-radius: 0;","border-bottom-right-radius: 0;","}",".ctl-box.ctl-horizontal.flat > .ctl-meter.negative {","border-top-right-radius: 0;","border-bottom-right-radius: 0;","}",".ctl-box.ctl-horizontal.flat > .ctl-meter.positive {","border-top-left-radius: 0;","border-bottom-left-radius: 0;","}"].join("\n"),style=document.createElement("style"),csstext;style.type="text/css";style.styleSheet?style.styleSheet.cssText=csstext:style.appendChild(document.createTextNode(csstext));document.head.appendChild(style)})();