dat.gui/build/dat.gui.min.js
2017-09-26 10:18:17 +02:00

3 lines
87 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dat=t():e.dat=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1),a=o(i);t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(2),a=o(i),l=n(6),r=o(l),d=n(3),u=o(d),s=n(7),f=o(s),_=n(8),c=o(_),p=n(10),h=o(p),b=n(11),m=o(b),g=n(12),x=o(g),y=n(13),v=o(y),w=n(14),C=o(w),E=n(15),k=o(E),S=n(16),A=o(S),O=n(17),T=o(O),R=n(18),N=o(R),L=n(19),j=o(L),B=n(9),M=o(B),H=n(20),V=o(H);t.default={color:{Color:a.default,math:r.default,interpret:u.default},controllers:{Controller:f.default,BooleanController:c.default,OptionController:h.default,StringController:m.default,NumberController:x.default,NumberControllerBox:v.default,NumberControllerSlider:C.default,FunctionController:k.default,ColorController:A.default,BgColorController:T.default,NgColorController:N.default,GtColorController:j.default},dom:{dom:M.default},gui:{GUI:V.default},GUI:V.default},e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){Object.defineProperty(e,t,{get:function(){return"RGB"===this.__state.space?this.__state[t]:(h.recalculateRGB(this,t,n),this.__state[t])},set:function(e){"RGB"!==this.__state.space&&(h.recalculateRGB(this,t,n),this.__state.space="RGB"),this.__state[t]=e}})}function l(e,t){Object.defineProperty(e,t,{get:function(){return"HSV"===this.__state.space?this.__state[t]:(h.recalculateHSV(this),this.__state[t])},set:function(e){"HSV"!==this.__state.space&&(h.recalculateHSV(this),this.__state.space="HSV"),this.__state[t]=e}})}t.__esModule=!0;var r=n(3),d=o(r),u=n(6),s=o(u),f=n(4),_=o(f),c=n(5),p=o(c),h=function(){function e(){if(i(this,e),this.__state=d.default.apply(this,arguments),this.__state===!1)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return e.prototype.toString=function(){return(0,_.default)(this)},e.prototype.toHexString=function(){return(0,_.default)(this,!0)},e.prototype.toOriginal=function(){return this.__state.conversion.write(this)},e}();h.recalculateRGB=function(e,t,n){if("HEX"===e.__state.space)e.__state[t]=s.default.component_from_hex(e.__state.hex,n);else{if("HSV"!==e.__state.space)throw new Error("Corrupted color state");p.default.extend(e.__state,s.default.hsv_to_rgb(e.__state.h,e.__state.s,e.__state.v))}},h.recalculateHSV=function(e){var t=s.default.rgb_to_hsv(e.r,e.g,e.b);p.default.extend(e.__state,{s:t.s,v:t.v}),p.default.isNaN(t.h)?p.default.isUndefined(e.__state.h)&&(e.__state.h=0):e.__state.h=t.h},h.COMPONENTS=["r","g","b","h","s","v","hex","a"],a(h.prototype,"r",2),a(h.prototype,"g",1),a(h.prototype,"b",0),l(h.prototype,"h"),l(h.prototype,"s"),l(h.prototype,"v"),Object.defineProperty(h.prototype,"a",{get:function(){return this.__state.a},set:function(e){this.__state.a=e}}),Object.defineProperty(h.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=s.default.rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(e){this.__state.space="HEX",this.__state.hex=e}}),t.default=h,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(4),a=o(i),l=n(5),r=o(l),d=[{litmus:r.default.isString,conversions:{THREE_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString(),0)}},write:a.default},SIX_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9]{6})$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString(),0)}},write:a.default},CSS_RGB:{read:function(e){var t=e.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:a.default},CSS_RGBA:{read:function(e){var t=e.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:a.default}}},{litmus:r.default.isNumber,conversions:{HEX:{read:function(e){return{space:"HEX",hex:e,conversionName:"HEX"}},write:function(e){return e.hex}}}},{litmus:r.default.isArray,conversions:{RGB_ARRAY:{read:function(e){return 3===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2]}},write:function(e){return[e.r,e.g,e.b]}},RGBA_ARRAY:{read:function(e){return 4===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2],a:e[3]}},write:function(e){return[e.r,e.g,e.b,e.a]}}}},{litmus:r.default.isObject,conversions:{RGBA_OBJ:{read:function(e){return!!(r.default.isNumber(e.r)&&r.default.isNumber(e.g)&&r.default.isNumber(e.b)&&r.default.isNumber(e.a))&&{space:"RGB",r:e.r,g:e.g,b:e.b,a:e.a}},write:function(e){return{r:e.r,g:e.g,b:e.b,a:e.a}}},RGB_OBJ:{read:function(e){return!!(r.default.isNumber(e.r)&&r.default.isNumber(e.g)&&r.default.isNumber(e.b))&&{space:"RGB",r:e.r,g:e.g,b:e.b}},write:function(e){return{r:e.r,g:e.g,b:e.b}}},HSVA_OBJ:{read:function(e){return!!(r.default.isNumber(e.h)&&r.default.isNumber(e.s)&&r.default.isNumber(e.v)&&r.default.isNumber(e.a))&&{space:"HSV",h:e.h,s:e.s,v:e.v,a:e.a}},write:function(e){return{h:e.h,s:e.s,v:e.v,a:e.a}}},HSV_OBJ:{read:function(e){return!!(r.default.isNumber(e.h)&&r.default.isNumber(e.s)&&r.default.isNumber(e.v))&&{space:"HSV",h:e.h,s:e.s,v:e.v}},write:function(e){return{h:e.h,s:e.s,v:e.v}}}}}],u=void 0,s=void 0,f=function(){s=!1;var e=arguments.length>1?r.default.toArray(arguments):arguments[0];return r.default.each(d,function(t){if(t.litmus(e))return r.default.each(t.conversions,function(t,n){if(u=t.read(e),s===!1&&u!==!1)return s=u,u.conversionName=n,u.conversion=t,r.default.BREAK}),r.default.BREAK}),s};t.default=f,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){var n=e.__state.conversionName.toString(),o=Math.round(e.r),i=Math.round(e.g),a=Math.round(e.b),l=e.a,r=Math.round(e.h),d=e.s.toFixed(1),u=e.v.toFixed(1);if(t||"THREE_CHAR_HEX"===n||"SIX_CHAR_HEX"===n){for(var s=e.hex.toString(16);s.length<6;)s="0"+s;return"#"+s}return"CSS_RGB"===n?"rgb("+o+","+i+","+a+")":"CSS_RGBA"===n?"rgba("+o+","+i+","+a+","+l+")":"HEX"===n?"0x"+e.hex.toString(16):"RGB_ARRAY"===n?"["+o+","+i+","+a+"]":"RGBA_ARRAY"===n?"["+o+","+i+","+a+","+l+"]":"RGB_OBJ"===n?"{r:"+o+",g:"+i+",b:"+a+"}":"RGBA_OBJ"===n?"{r:"+o+",g:"+i+",b:"+a+",a:"+l+"}":"HSV_OBJ"===n?"{h:"+r+",s:"+d+",v:"+u+"}":"HSVA_OBJ"===n?"{h:"+r+",s:"+d+",v:"+u+",a:"+l+"}":"unknown format"},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0;var n=Array.prototype.forEach,o=Array.prototype.slice,i={BREAK:{},extend:function(e){return this.each(o.call(arguments,1),function(t){var n=this.isObject(t)?Object.keys(t):[];n.forEach(function(n){this.isUndefined(t[n])||(e[n]=t[n])}.bind(this))},this),e},defaults:function(e){return this.each(o.call(arguments,1),function(t){var n=this.isObject(t)?Object.keys(t):[];n.forEach(function(n){this.isUndefined(e[n])&&(e[n]=t[n])}.bind(this))},this),e},compose:function(){var e=o.call(arguments);return function(){for(var t=o.call(arguments),n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},each:function(e,t,o){if(e)if(n&&e.forEach&&e.forEach===n)e.forEach(t,o);else if(e.length===e.length+0){var i=void 0,a=void 0;for(i=0,a=e.length;i<a;i++)if(i in e&&t.call(o,e[i],i)===this.BREAK)return}else for(var l in e)if(t.call(o,e[l],l)===this.BREAK)return},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var o=void 0;return function(){function i(){o=null,n||e.apply(a,l)}var a=this,l=arguments,r=n||!o;clearTimeout(o),o=setTimeout(i,t),r&&e.apply(a,l)}},toArray:function(e){return e.toArray?e.toArray():o.call(e)},isUndefined:function(e){return void 0===e},isNull:function(e){return null===e},isNaN:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return isNaN(e)}),isArray:Array.isArray||function(e){return e.constructor===Array},isObject:function(e){return e===Object(e)},isNumber:function(e){return e===e+0},isString:function(e){return e===e+""},isBoolean:function(e){return e===!1||e===!0},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)}};t.default=i,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0;var n=void 0,o={hsv_to_rgb:function(e,t,n){var o=Math.floor(e/60)%6,i=e/60-Math.floor(e/60),a=n*(1-t),l=n*(1-i*t),r=n*(1-(1-i)*t),d=[[n,r,a],[l,n,a],[a,n,r],[a,l,n],[r,a,n],[n,a,l]][o];return{r:255*d[0],g:255*d[1],b:255*d[2]}},rgb_to_hsv:function(e,t,n){var o=Math.min(e,t,n),i=Math.max(e,t,n),a=i-o,l=void 0,r=void 0;return 0===i?{h:NaN,s:0,v:0}:(r=a/i,l=e===i?(t-n)/a:t===i?2+(n-e)/a:4+(e-t)/a,l/=6,l<0&&(l+=1),{h:360*l,s:r,v:i/255})},rgb_to_hex:function(e,t,n){var o=this.hex_with_component(0,2,e);return o=this.hex_with_component(o,1,t),o=this.hex_with_component(o,0,n)},component_from_hex:function(e,t){return e>>8*t&255},hex_with_component:function(e,t,o){return o<<(n=8*t)|e&~(255<<n)}};t.default=o,e.exports=t.default},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function e(t,o){n(this,e),this.initialValue=t[o],this.domElement=document.createElement("div"),this.object=t,this.property=o,this.__onChange=void 0,this.__onFinishChange=void 0}return e.prototype.onChange=function(e){return this.__onChange=e,this},e.prototype.onFinishChange=function(e){return this.__onFinishChange=e,this},e.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},e.prototype.getValue=function(){return this.object[this.property]},e.prototype.updateDisplay=function(){return this},e.prototype.isModified=function(){return this.initialValue!==this.getValue()},e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var r=n(7),d=o(r),u=n(9),s=o(u),f=function(e){function t(n,o){function l(){d.setValue(!d.__prev)}i(this,t);var r=a(this,e.call(this,n,o)),d=r;return r.__prev=r.getValue(),r.__checkbox=document.createElement("input"),r.__checkbox.setAttribute("type","checkbox"),s.default.bind(r.__checkbox,"change",l,!1),r.domElement.appendChild(r.__checkbox),r.updateDisplay(),r}return l(t,e),t.prototype.setValue=function(t){var n=e.prototype.setValue.call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),n},t.prototype.updateDisplay=function(){return this.getValue()===!0?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),e.prototype.updateDisplay.call(this)},t}(d.default);t.default=f,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e){if("0"===e||l.default.isUndefined(e))return 0;var t=e.match(u);return l.default.isNull(t)?0:parseFloat(t[1])}t.__esModule=!0;var a=n(5),l=o(a),r={HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},d={};l.default.each(r,function(e,t){l.default.each(e,function(e){d[e]=t})});var u=/(\d+(\.\d+)?)px/,s={makeSelectable:function(e,t){void 0!==e&&void 0!==e.style&&(e.onselectstart=t?function(){return!1}:function(){},e.style.MozUserSelect=t?"auto":"none",e.style.KhtmlUserSelect=t?"auto":"none",e.unselectable=t?"on":"off")},makeFullscreen:function(e,t,n){var o=n,i=t;l.default.isUndefined(i)&&(i=!0),l.default.isUndefined(o)&&(o=!0),e.style.position="absolute",i&&(e.style.left=0,e.style.right=0),o&&(e.style.top=0,e.style.bottom=0)},fakeEvent:function(e,t,n,o){var i=n||{},a=d[t];if(!a)throw new Error("Event type "+t+" not supported.");var r=document.createEvent(a);switch(a){case"MouseEvents":var u=i.x||i.clientX||0,s=i.y||i.clientY||0;r.initMouseEvent(t,i.bubbles||!1,i.cancelable||!0,window,i.clickCount||1,0,0,u,s,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var f=r.initKeyboardEvent||r.initKeyEvent;l.default.defaults(i,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),f(t,i.bubbles||!1,i.cancelable,window,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.keyCode,i.charCode);break;default:r.initEvent(t,i.bubbles||!1,i.cancelable||!0)}l.default.defaults(r,o),e.dispatchEvent(r)},bind:function(e,t,n,o){var i=o||!1;return e.addEventListener?e.addEventListener(t,n,i):e.attachEvent&&e.attachEvent("on"+t,n),s},unbind:function(e,t,n,o){var i=o||!1;return e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent&&e.detachEvent("on"+t,n),s},addClass:function(e,t){if(void 0===e.className)e.className=t;else if(e.className!==t){var n=e.className.split(/ +/);n.indexOf(t)===-1&&(n.push(t),e.className=n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return s},removeClass:function(e,t){if(t)if(e.className===t)e.removeAttribute("class");else{var n=e.className.split(/ +/),o=n.indexOf(t);o!==-1&&(n.splice(o,1),e.className=n.join(" "))}else e.className=void 0;return s},hasClass:function(e,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(e.className)||!1},getWidth:function(e){var t=getComputedStyle(e);return i(t["border-left-width"])+i(t["border-right-width"])+i(t["padding-left"])+i(t["padding-right"])+i(t.width)},getHeight:function(e){var t=getComputedStyle(e);return i(t["border-top-width"])+i(t["border-bottom-width"])+i(t["padding-top"])+i(t["padding-bottom"])+i(t.height)},getOffset:function(e){var t=e,n={left:0,top:0};if(t.offsetParent)do n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;while(t);return n},isActive:function(e){return e===document.activeElement&&(e.type||e.href)}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var r=n(7),d=o(r),u=n(9),s=o(u),f=n(5),_=o(f),c=function(e){function t(n,o,l){i(this,t);var r=a(this,e.call(this,n,o)),d=l,u=r;if(r.__select=document.createElement("select"),_.default.isArray(d)){var f={};_.default.each(d,function(e){f[e]=e}),d=f}return _.default.each(d,function(e,t){var n=document.createElement("option");n.innerHTML=t,n.setAttribute("value",e),u.__select.appendChild(n)}),r.updateDisplay(),s.default.bind(r.__select,"change",function(){var e=this.options[this.selectedIndex].value;u.setValue(e)}),r.domElement.appendChild(r.__select),r}return l(t,e),t.prototype.setValue=function(t){var n=e.prototype.setValue.call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),n},t.prototype.updateDisplay=function(){return s.default.isActive(this.__select)?this:(this.__select.value=this.getValue(),e.prototype.updateDisplay.call(this))},t}(d.default);t.default=c,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var r=n(7),d=o(r),u=n(9),s=o(u),f=function(e){function t(n,o){function l(){u.setValue(u.__input.value)}function r(){u.__onFinishChange&&u.__onFinishChange.call(u,u.getValue())}i(this,t);var d=a(this,e.call(this,n,o)),u=d;return d.__input=document.createElement("input"),d.__input.setAttribute("type","text"),s.default.bind(d.__input,"keyup",l),s.default.bind(d.__input,"change",l),s.default.bind(d.__input,"blur",r),s.default.bind(d.__input,"keydown",function(e){13===e.keyCode&&this.blur()}),d.updateDisplay(),d.domElement.appendChild(d.__input),d}return l(t,e),t.prototype.updateDisplay=function(){return s.default.isActive(this.__input)||(this.__input.value=this.getValue()),e.prototype.updateDisplay.call(this)},t}(d.default);t.default=f,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e){var t=e.toString();return t.indexOf(".")>-1?t.length-t.indexOf(".")-1:0}t.__esModule=!0;var d=n(7),u=o(d),s=n(5),f=o(s),_=function(e){function t(n,o,l){i(this,t);var d=a(this,e.call(this,n,o)),u=l||{};return d.__min=u.min,d.__max=u.max,d.__step=u.step,f.default.isUndefined(d.__step)?0===d.initialValue?d.__impliedStep=1:d.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(d.initialValue))/Math.LN10))/10:d.__impliedStep=d.__step,d.__precision=r(d.__impliedStep),d}return l(t,e),t.prototype.setValue=function(t){var n=t;return void 0!==this.__min&&n<this.__min?n=this.__min:void 0!==this.__max&&n>this.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!==0&&(n=Math.round(n/this.__step)*this.__step),e.prototype.setValue.call(this,n)},t.prototype.min=function(e){return this.__min=e,this},t.prototype.max=function(e){return this.__max=e,this},t.prototype.step=function(e){return this.__step=e,this.__impliedStep=e,this.__precision=r(e),this},t}(u.default);t.default=_,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}t.__esModule=!0;var d=n(12),u=o(d),s=n(9),f=o(s),_=n(5),c=o(_),p=function(e){function t(n,o,l){function r(){var e=parseFloat(b.__input.value);c.default.isNaN(e)||b.setValue(e)}function d(){b.__onFinishChange&&b.__onFinishChange.call(b,b.getValue())}function u(){d()}function s(e){var t=m-e.clientY;b.setValue(b.getValue()+t*b.__impliedStep),m=e.clientY}function _(){f.default.unbind(window,"mousemove",s),f.default.unbind(window,"mouseup",_),d()}function p(e){f.default.bind(window,"mousemove",s),f.default.bind(window,"mouseup",_),m=e.clientY}i(this,t);var h=a(this,e.call(this,n,o,l));h.__truncationSuspended=!1;var b=h,m=void 0;return h.__input=document.createElement("input"),h.__input.setAttribute("type","text"),f.default.bind(h.__input,"change",r),f.default.bind(h.__input,"blur",u),f.default.bind(h.__input,"mousedown",p),f.default.bind(h.__input,"keydown",function(e){13===e.keyCode&&(b.__truncationSuspended=!0,this.blur(),b.__truncationSuspended=!1,d())}),h.updateDisplay(),h.domElement.appendChild(h.__input),h}return l(t,e),t.prototype.updateDisplay=function(){return this.__input.value=this.__truncationSuspended?this.getValue():r(this.getValue(),this.__precision),e.prototype.updateDisplay.call(this)},t}(u.default);t.default=p,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,n,o,i){return o+(i-o)*((e-t)/(n-t))}t.__esModule=!0;var d=n(12),u=o(d),s=n(9),f=o(s),_=function(e){function t(n,o,l,d,u){function s(e){document.activeElement.blur(),f.default.bind(window,"mousemove",_),f.default.bind(window,"mouseup",c),_(e)}function _(e){e.preventDefault();var t=h.__background.getBoundingClientRect();return h.setValue(r(e.clientX,t.left,t.right,h.__min,h.__max)),!1}function c(){f.default.unbind(window,"mousemove",_),f.default.unbind(window,"mouseup",c),h.__onFinishChange&&h.__onFinishChange.call(h,h.getValue())}i(this,t);var p=a(this,e.call(this,n,o,{min:l,max:d,step:u})),h=p;return p.__background=document.createElement("div"),p.__foreground=document.createElement("div"),f.default.bind(p.__background,"mousedown",s),f.default.addClass(p.__background,"slider"),f.default.addClass(p.__foreground,"slider-fg"),p.updateDisplay(),p.__background.appendChild(p.__foreground),p.domElement.appendChild(p.__background),p}return l(t,e),t.prototype.updateDisplay=function(){var t=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*t+"%",e.prototype.updateDisplay.call(this)},t}(u.default);t.default=_,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var r=n(7),d=o(r),u=n(9),s=o(u),f=function(e){function t(n,o,l){i(this,t);var r=a(this,e.call(this,n,o)),d=r;return r.__button=document.createElement("div"),r.__button.innerHTML=void 0===l?"Fire":l,s.default.bind(r.__button,"click",function(e){return e.preventDefault(),d.fire(),!1}),s.default.addClass(r.__button,"button"),r.domElement.appendChild(r.__button),r}return l(t,e),t.prototype.fire=function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())},t}(d.default);t.default=f,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,n,o){e.style.background="",g.default.each(y,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+o+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var u=n(7),s=o(u),f=n(9),_=o(f),c=n(2),p=o(c),h=n(3),b=o(h),m=n(5),g=o(m),x=function(e){function t(n,o){function l(e){h(e),_.default.bind(window,"mousemove",h),_.default.bind(window,"mouseup",u)}function u(){_.default.unbind(window,"mousemove",h),_.default.unbind(window,"mouseup",u),c()}function s(){var e=(0,b.default)(this.value);e!==!1?(y.__color.__state=e,y.setValue(y.__color.toOriginal())):this.value=y.__color.toString()}function f(){_.default.unbind(window,"mousemove",m),_.default.unbind(window,"mouseup",f),c()}function c(){y.__onFinishChange&&y.__onFinishChange.call(y,y.__color.toOriginal())}function h(e){e.preventDefault();var t=y.__saturation_field.getBoundingClientRect(),n=(e.clientX-t.left)/(t.right-t.left),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),n>1?n=1:n<0&&(n=0),y.__color.v=o,y.__color.s=n,y.setValue(y.__color.toOriginal()),!1}function m(e){e.preventDefault();var t=y.__hue_field.getBoundingClientRect(),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),y.__color.h=360*n,y.setValue(y.__color.toOriginal()),!1}i(this,t);var x=a(this,e.call(this,n,o));x.__color=new p.default(x.getValue()),x.__temp=new p.default(0);var y=x;x.domElement=document.createElement("div"),_.default.makeSelectable(x.domElement,!1),x.__selector=document.createElement("div"),x.__selector.className="selector",x.__saturation_field=document.createElement("div"),x.__saturation_field.className="saturation-field",x.__field_knob=document.createElement("div"),x.__field_knob.className="field-knob",x.__field_knob_border="2px solid ",x.__hue_knob=document.createElement("div"),x.__hue_knob.className="hue-knob",x.__hue_field=document.createElement("div"),x.__hue_field.className="hue-field",x.__input=document.createElement("input"),x.__input.type="text",x.__input_textShadow="0 1px 1px ",_.default.bind(x.__input,"keydown",function(e){13===e.keyCode&&s.call(this)}),_.default.bind(x.__input,"blur",s),_.default.bind(x.__selector,"mousedown",function(){_.default.addClass(this,"drag").bind(window,"mouseup",function(){_.default.removeClass(y.__selector,"drag")})});var v=document.createElement("div");return g.default.extend(x.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(x.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:x.__field_knob_border+(x.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(x.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(x.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),g.default.extend(v.style,{width:"100%",height:"100%",background:"none"}),r(v,"top","rgba(0,0,0,0)","#000"),g.default.extend(x.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),d(x.__hue_field),g.default.extend(x.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:x.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(x.__saturation_field,"mousedown",l),_.default.bind(x.__field_knob,"mousedown",l),_.default.bind(x.__hue_field,"mousedown",function(e){m(e),_.default.bind(window,"mousemove",m),_.default.bind(window,"mouseup",f)}),x.__saturation_field.appendChild(v),x.__selector.appendChild(x.__field_knob),x.__selector.appendChild(x.__saturation_field),x.__selector.appendChild(x.__hue_field),x.__hue_field.appendChild(x.__hue_knob),x.domElement.appendChild(x.__input),x.domElement.appendChild(x.__selector),x.updateDisplay(),x}return l(t,e),t.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.getValue=function(){return this.object[this.property]},t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(n){if(!g.default.isUndefined(e[n])&&!g.default.isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n;g.default.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,r(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"})},t}(s.default),y=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t);
}function r(e,t,n,o){e.style.background="",g.default.each(y,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+o+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var u=n(7),s=o(u),f=n(9),_=o(f),c=n(2),p=o(c),h=n(3),b=o(h),m=n(5),g=o(m),x=function(e){function t(n,o){function l(e){C(e),_.default.bind(window,"mousemove",C),_.default.bind(window,"mouseup",s)}function u(e){w(e),_.default.bind(window,"mousemove",w),_.default.bind(window,"mouseup",f)}function s(){_.default.unbind(window,"mousemove",C),_.default.unbind(window,"mouseup",s),y()}function f(){_.default.unbind(window,"mousemove",w),_.default.unbind(window,"mouseup",f),v()}function c(){var e=(0,b.default)(this.value);e!==!1?(A.__color.__state=e,A.setValue(A.__color.toOriginal())):this.value=A.__color.toString()}function h(){var e=(0,b.default)(this.value);e!==!1?(A.__color2.__state=e,A.setValue2(A.__color2.toOriginal())):this.value=A.__color2.toString()}function m(){_.default.unbind(window,"mousemove",k),_.default.unbind(window,"mouseup",m),y()}function x(){_.default.unbind(window,"mousemove",E),_.default.unbind(window,"mouseup",x),v()}function y(){A.__onFinishChange&&A.__onFinishChange.call(A,A.__color2.toOriginal())}function v(){A.__onFinishChange&&A.__onFinishChange.call(A,A.__color.toOriginal())}function w(e){e.preventDefault();var t=A.__saturation_field2.getBoundingClientRect(),n=(e.clientX-t.left)/(t.right-t.left),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),n>1?n=1:n<0&&(n=0),A.__color2.v=o,A.__color2.s=n,A.setValue2(A.__color2.toOriginal()),!1}function C(e){e.preventDefault();var t=A.__saturation_field.getBoundingClientRect(),n=(e.clientX-t.left)/(t.right-t.left),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),n>1?n=1:n<0&&(n=0),A.__color.v=o,A.__color.s=n,A.setValue(A.__color.toOriginal()),!1}function E(e){e.preventDefault();var t=A.__hue_field2.getBoundingClientRect(),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),A.__color2.h=360*n,A.setValue2(A.__color2.toOriginal()),!1}function k(e){e.preventDefault();var t=A.__hue_field.getBoundingClientRect(),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),A.__color.h=360*n,A.setValue(A.__color.toOriginal()),!1}i(this,t);var S=a(this,e.call(this,n,o));S.__color=new p.default(S.getValue()),S.value2="#FFee00",S.object[S.property+"bg"]&&(S.value2=S.object[S.property+"bg"]),S.__color2=new p.default(S.value2),S.__temp=new p.default(0),S.__temp2=new p.default(0);var A=S;S.domElement=document.createElement("div"),_.default.makeSelectable(S.domElement,!1),S.__selector=document.createElement("div"),S.__saturation_field=document.createElement("div"),S.__saturation_field.className="saturation-field",S.__saturation_field2=document.createElement("div"),S.__saturation_field2.className="saturation-field",S.__field_knob=document.createElement("div"),S.__field_knob.className="field-knob",S.__field_knob_border="2px solid ",S.__field_knob2=document.createElement("div"),S.__field_knob2.className="field-knob",S.__field_knob_border2="2px solid ",S.__hue_knob=document.createElement("div"),S.__hue_knob.className="hue-knob",S.__hue_knob2=document.createElement("div"),S.__hue_knob2.className="hue-knob",S.__hue_field=document.createElement("div"),S.__hue_field.className="hue-field",S.__hue_field2=document.createElement("div"),S.__hue_field2.className="hue-field",S.__input=document.createElement("input"),S.__input.type="text",S.__input_textShadow="0 1px 1px ",S.__input2=document.createElement("input"),S.__input2.type="text",S.__input_textShadow2="0 1px 1px ",_.default.bind(S.__input,"keydown",function(e){13===e.keyCode&&c.call(this)}),_.default.bind(S.__input2,"keydown",function(e){13===e.keyCode&&h.call(this)}),_.default.bind(S.__input,"blur",c),_.default.bind(S.__input2,"blur",h);var O=document.createElement("div"),T=document.createElement("div");return g.default.extend(S.__selector.style,{width:"200px",height:"102px",marginTop:"22px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(S.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:S.__field_knob_border+(S.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(S.__field_knob2.style,{position:"absolute",left:"100",width:"12px",height:"12px",border:S.__field_knob_border2+(S.__color2.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(S.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",left:"-15px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(S.__hue_knob2.style,{position:"absolute",width:"15px",height:"2px",left:"9px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(S.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),g.default.extend(S.__saturation_field2.style,{left:"100px",width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",position:"absolute",top:"22px",cursor:"pointer"}),g.default.extend(O.style,{width:"100%",height:"100%",background:"none"}),g.default.extend(T.style,{width:"100%",height:"100%",background:"none"}),r(O,"top","rgba(0,0,0,0)","#000"),r(T,"top","rgba(0,0,0,0)","#000"),g.default.extend(S.__hue_field.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"-20px"}),g.default.extend(S.__hue_field2.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"200px"}),d(S.__hue_field),d(S.__hue_field2),g.default.extend(S.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"-20px",position:"absolute",fontWeight:"bold",width:"120px",textShadow:S.__input_textShadow+"rgba(0,0,0,0.7)"}),g.default.extend(S.__input2.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"100px",position:"absolute",fontWeight:"bold",width:"120px",textShadow:S.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(S.__saturation_field,"mousedown",l),_.default.bind(S.__saturation_field2,"mousedown",u),_.default.bind(S.__field_knob,"mousedown",l),_.default.bind(S.__field_knob2,"mousedown",u),_.default.bind(S.__hue_field,"mousedown",function(e){k(e),_.default.bind(window,"mousemove",k),_.default.bind(window,"mouseup",m)}),_.default.bind(S.__hue_field2,"mousedown",function(e){E(e),_.default.bind(window,"mousemove",E),_.default.bind(window,"mouseup",x)}),S.__saturation_field.appendChild(O),S.__selector.appendChild(S.__field_knob),S.__selector.appendChild(S.__field_knob2),S.__selector.appendChild(S.__saturation_field),S.__saturation_field2.appendChild(T),S.__selector.appendChild(S.__saturation_field2),S.__selector.appendChild(S.__hue_field),S.__hue_field.appendChild(S.__hue_knob),S.__hue_field2.appendChild(S.__hue_knob2),S.__selector.appendChild(S.__hue_field2),S.domElement.appendChild(S.__input2),S.domElement.appendChild(S.__input),S.domElement.appendChild(S.__selector),S.updateDisplay(),S}return l(t,e),t.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.setValue2=function(e){return this.value2=e,this.object[this.property+"bg"]&&(this.object[this.property+"bg"]=this.value2),this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.getValue=function(){return this.object[this.property]},t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(n){if(!g.default.isUndefined(e[n])&&!g.default.isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),g.default.extend(this.__temp2.__state,this.__color2.__state),this.__temp.a=1,this.__temp2.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n,i=this.__color2.v<.5||this.__color2.s>.5?255:0,a=255-i;g.default.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),g.default.extend(this.__field_knob2.style,{marginLeft:100*this.__color2.s-7+"px",marginTop:100*(1-this.__color2.v)-7+"px",backgroundColor:this.__temp2.toHexString(),border:this.__field_knob_border2+"rgb("+i+","+i+","+i+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__hue_knob2.style.marginTop=100*(1-this.__color2.h/360)+"px",this.__temp.s=1,this.__temp.v=1,this.__temp2.s=1,this.__temp2.v=1,r(this.__saturation_field,"left","#fff",this.__temp.toHexString()),r(this.__saturation_field2,"left","#fff",this.__temp2.toHexString()),this.__input.value=this.__color.toString(),this.__input2.value=this.__color2.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"}),g.default.extend(this.__input2.style,{backgroundColor:this.__color2.toHexString(),color:"rgb("+i+","+i+","+i+")",textShadow:this.__input_textShadow+"rgba("+a+","+a+","+a+",.7)"})},t}(s.default),y=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,n,o){e.style.background="",g.default.each(y,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+o+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var u=n(7),s=o(u),f=n(9),_=o(f),c=n(2),p=o(c),h=n(3),b=o(h),m=n(5),g=o(m),x=function(e){function t(n,o){function l(e){h(e),_.default.bind(window,"mousemove",h),_.default.bind(window,"mouseup",u)}function u(){_.default.unbind(window,"mousemove",h),_.default.unbind(window,"mouseup",u),c()}function s(){var e=(0,b.default)(this.value);e!==!1?(y.__color.__state=e,y.setValue(y.__color.toOriginal())):this.value=y.__color.toString()}function f(){_.default.unbind(window,"mousemove",m),_.default.unbind(window,"mouseup",f),c()}function c(){y.__onFinishChange&&y.__onFinishChange.call(y,y.__color.toOriginal())}function h(e){e.preventDefault();var t=y.__saturation_field.getBoundingClientRect(),n=(e.clientX-t.left)/(t.right-t.left),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),n>1?n=1:n<0&&(n=0),y.__color.v=o,y.__color.s=n,y.setValue(y.__color.toOriginal()),!1}function m(e){e.preventDefault();var t=y.__hue_field.getBoundingClientRect(),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),y.__color.h=360*n,y.setValue(y.__color.toOriginal()),!1}i(this,t);var x=a(this,e.call(this,n,o));x.__color=new p.default(x.getValue()),x.__temp=new p.default(0);var y=x;x.domElement=document.createElement("div"),_.default.makeSelectable(x.domElement,!1),x.__selector=document.createElement("div"),x.__saturation_field=document.createElement("div"),x.__saturation_field.className="saturation-field",x.__field_knob=document.createElement("div"),x.__field_knob.className="field-knob",x.__field_knob_border="2px solid ",x.__hue_knob=document.createElement("div"),x.__hue_knob.className="hue-knob",x.__hue_field=document.createElement("div"),x.__hue_field.className="hue-field",x.__input=document.createElement("input"),x.__input.type="text",x.__input_textShadow="0 1px 1px ",_.default.bind(x.__input,"keydown",function(e){13===e.keyCode&&s.call(this)}),_.default.bind(x.__input,"blur",s),_.default.bind(x.__selector,"mousedown",function(){_.default.addClass(this,"drag").bind(window,"mouseup",function(){_.default.removeClass(y.__selector,"drag")})});var v=document.createElement("div");return g.default.extend(x.__selector.style,{width:"120px",height:"102px",marginTop:"22px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(x.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:x.__field_knob_border+(x.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(x.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",left:"9px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(x.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",position:"absolute",top:"22px",cursor:"pointer"}),g.default.extend(v.style,{width:"100%",height:"100%",background:"none"}),r(v,"top","rgba(0,0,0,0)","#000"),g.default.extend(x.__hue_field.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"100px"}),d(x.__hue_field),g.default.extend(x.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"0",position:"absolute",width:"120px",fontWeight:"bold",textShadow:x.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(x.__saturation_field,"mousedown",l),_.default.bind(x.__field_knob,"mousedown",l),_.default.bind(x.__hue_field,"mousedown",function(e){m(e),_.default.bind(window,"mousemove",m),_.default.bind(window,"mouseup",f)}),x.__saturation_field.appendChild(v),x.__selector.appendChild(x.__field_knob),x.__selector.appendChild(x.__saturation_field),x.__selector.appendChild(x.__hue_field),x.__hue_field.appendChild(x.__hue_knob),x.domElement.appendChild(x.__input),x.domElement.appendChild(x.__selector),x.updateDisplay(),x}return l(t,e),t.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.getValue=function(){return this.object[this.property]},t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(n){if(!g.default.isUndefined(e[n])&&!g.default.isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n;g.default.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,r(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"})},t}(s.default),y=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function r(e,t,n,o){e.style.background="",g.default.each(y,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+o+" 100%); "})}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var u=n(7),s=o(u),f=n(9),_=o(f),c=n(2),p=o(c),h=n(3),b=o(h),m=n(5),g=o(m),x=function(e){function t(n,o){function l(e){C(e),_.default.bind(window,"mousemove",C),_.default.bind(window,"mouseup",s)}function u(e){w(e),_.default.bind(window,"mousemove",w),_.default.bind(window,"mouseup",f)}function s(){_.default.unbind(window,"mousemove",C),_.default.unbind(window,"mouseup",s),y()}function f(){_.default.unbind(window,"mousemove",w),_.default.unbind(window,"mouseup",f),v()}function c(){var e=(0,b.default)(this.value);e!==!1?(A.__color.__state=e,A.setValue(A.__color.toOriginal())):this.value=A.__color.toString()}function h(){var e=(0,b.default)(this.value);e!==!1?(A.__color2.__state=e,A.setValue2(A.__color2.toOriginal())):this.value=A.__color2.toString()}function m(){_.default.unbind(window,"mousemove",k),_.default.unbind(window,"mouseup",m),y()}function x(){_.default.unbind(window,"mousemove",E),_.default.unbind(window,"mouseup",x),v()}function y(){A.__onFinishChange&&A.__onFinishChange.call(A,A.__color2.toOriginal())}function v(){A.__onFinishChange&&A.__onFinishChange.call(A,A.__color.toOriginal())}function w(e){e.preventDefault();var t=A.__saturation_field2.getBoundingClientRect(),n=(e.clientX-t.left)/(t.right-t.left),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),n>1?n=1:n<0&&(n=0),A.__color2.v=o,A.__color2.s=n,A.setValue2(A.__color2.toOriginal()),!1}function C(e){e.preventDefault();var t=A.__saturation_field.getBoundingClientRect(),n=(e.clientX-t.left)/(t.right-t.left),o=1-(e.clientY-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),n>1?n=1:n<0&&(n=0),A.__color.v=o,A.__color.s=n,A.setValue(A.__color.toOriginal()),!1}function E(e){e.preventDefault();var t=A.__hue_field2.getBoundingClientRect(),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),A.__color2.h=360*n,A.setValue2(A.__color2.toOriginal()),!1}function k(e){e.preventDefault();var t=A.__hue_field.getBoundingClientRect(),n=1-(e.clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),A.__color.h=360*n,A.setValue(A.__color.toOriginal()),!1}i(this,t);var S=a(this,e.call(this,n,o));S.__color=new p.default(S.getValue()),S.value2="#FFee00",S.object[S.property+"bg"]&&(S.value2=S.object[S.property+"bg"]),S.__color2=new p.default(S.value2),S.__temp=new p.default(0),S.__temp2=new p.default(0);var A=S;S.domElement=document.createElement("div"),_.default.makeSelectable(S.domElement,!1),S.__selector=document.createElement("div"),S.__saturation_field=document.createElement("div"),S.__saturation_field.className="saturation-field",S.__saturation_field2=document.createElement("div"),S.__saturation_field2.className="saturation-field",S.__field_knob=document.createElement("div"),S.__field_knob.className="field-knob",S.__field_knob_border="2px solid ",S.__field_knob2=document.createElement("div"),S.__field_knob2.className="field-knob",S.__field_knob_border2="2px solid ",S.__hue_knob=document.createElement("div"),S.__hue_knob.className="hue-knob",S.__hue_knob2=document.createElement("div"),S.__hue_knob2.className="hue-knob",S.__hue_field=document.createElement("div"),S.__hue_field.className="hue-field",S.__hue_field2=document.createElement("div"),S.__hue_field2.className="hue-field",S.__input=document.createElement("input"),S.__input.type="text",S.__input_textShadow="0 1px 1px ",S.__input2=document.createElement("input"),S.__input2.type="text",S.__input_textShadow2="0 1px 1px ",_.default.bind(S.__input,"keydown",function(e){13===e.keyCode&&c.call(this)}),_.default.bind(S.__input2,"keydown",function(e){13===e.keyCode&&h.call(this)}),_.default.bind(S.__input,"blur",c),_.default.bind(S.__input2,"blur",h);var O=document.createElement("div"),T=document.createElement("div");return g.default.extend(S.__selector.style,{width:"200px",height:"102px",marginTop:"22px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g.default.extend(S.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:S.__field_knob_border+(S.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(S.__field_knob2.style,{position:"absolute",left:"100",width:"12px",height:"12px",border:S.__field_knob_border2+(S.__color2.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g.default.extend(S.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",left:"-15px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(S.__hue_knob2.style,{position:"absolute",width:"15px",height:"2px",left:"9px",borderRight:"4px solid #fff",zIndex:1}),g.default.extend(S.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),g.default.extend(S.__saturation_field2.style,{left:"100px",width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",position:"absolute",top:"22px",cursor:"pointer"}),g.default.extend(O.style,{width:"100%",height:"100%",background:"none"}),g.default.extend(T.style,{width:"100%",height:"100%",background:"none"}),r(O,"top","rgba(0,0,0,0)","#000"),r(T,"top","rgba(0,0,0,0)","#000"),g.default.extend(S.__hue_field.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"-20px"}),g.default.extend(S.__hue_field2.style,{width:"20px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",marginTop:"19px",left:"200px"}),d(S.__hue_field),d(S.__hue_field2),g.default.extend(S.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"-20px",position:"absolute",fontWeight:"bold",width:"120px",textShadow:S.__input_textShadow+"rgba(0,0,0,0.7)"}),g.default.extend(S.__input2.style,{outline:"none",textAlign:"center",color:"#fff",border:0,left:"100px",position:"absolute",fontWeight:"bold",width:"120px",textShadow:S.__input_textShadow+"rgba(0,0,0,0.7)"}),_.default.bind(S.__saturation_field,"mousedown",l),_.default.bind(S.__saturation_field2,"mousedown",u),_.default.bind(S.__field_knob,"mousedown",l),_.default.bind(S.__field_knob2,"mousedown",u),_.default.bind(S.__hue_field,"mousedown",function(e){k(e),_.default.bind(window,"mousemove",k),_.default.bind(window,"mouseup",m)}),_.default.bind(S.__hue_field2,"mousedown",function(e){E(e),_.default.bind(window,"mousemove",E),_.default.bind(window,"mouseup",x)}),S.__saturation_field.appendChild(O),S.__selector.appendChild(S.__field_knob),S.__selector.appendChild(S.__field_knob2),S.__selector.appendChild(S.__saturation_field),S.__saturation_field2.appendChild(T),S.__selector.appendChild(S.__saturation_field2),S.__selector.appendChild(S.__hue_field),S.__hue_field.appendChild(S.__hue_knob),S.__hue_field2.appendChild(S.__hue_knob2),S.__selector.appendChild(S.__hue_field2),S.domElement.appendChild(S.__input2),S.domElement.appendChild(S.__input),S.domElement.appendChild(S.__selector),S.updateDisplay(),S}return l(t,e),t.prototype.setValue=function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.setValue2=function(e){return this.value2=e,this.object[this.property+"bg"]&&(this.object[this.property+"bg"]=this.value2),this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this},t.prototype.getValue=function(){return this.object[this.property]},t.prototype.updateDisplay=function(){var e=(0,b.default)(this.getValue());if(e!==!1){var t=!1;g.default.each(p.default.COMPONENTS,function(n){if(!g.default.isUndefined(e[n])&&!g.default.isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}},this),t&&g.default.extend(this.__color.__state,e)}g.default.extend(this.__temp.__state,this.__color.__state),g.default.extend(this.__temp2.__state,this.__color2.__state),this.__temp.a=1,this.__temp2.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n,i=this.__color2.v<.5||this.__color2.s>.5?255:0,a=255-i;g.default.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),g.default.extend(this.__field_knob2.style,{marginLeft:100*this.__color2.s-7+"px",marginTop:100*(1-this.__color2.v)-7+"px",backgroundColor:this.__temp2.toHexString(),border:this.__field_knob_border2+"rgb("+i+","+i+","+i+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__hue_knob2.style.marginTop=100*(1-this.__color2.h/360)+"px",this.__temp.s=1,this.__temp.v=1,this.__temp2.s=1,this.__temp2.v=1,r(this.__saturation_field,"left","#fff",this.__temp.toHexString()),r(this.__saturation_field2,"left","#fff",this.__temp2.toHexString()),this.__input.value=this.__color.toString(),this.__input2.value=this.__color2.toString(),g.default.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"}),g.default.extend(this.__input2.style,{backgroundColor:this.__color2.toHexString(),color:"rgb("+i+","+i+","+i+")",textShadow:this.__input_textShadow+"rgba("+a+","+a+","+a+",.7)"})},t}(s.default),y=["-moz-","-o-","-webkit-","-ms-",""];t.default=x,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){var o=document.createElement("li");return t&&o.appendChild(t),n?e.__ul.insertBefore(o,n):e.__ul.appendChild(o),e.onResize(),o}function a(e,t){var n=e.__preset_select[e.__preset_select.selectedIndex];t?n.innerHTML=n.value+"*":n.innerHTML=n.value}function l(e,t,n){if(n.__li=t,n.__gui=e,$.default.extend(n,{options:function(t){if(arguments.length>1){var o=n.__li.nextElementSibling;return n.remove(),f(e,n.object,n.property,{before:o,factoryArgs:[$.default.toArray(arguments)]})}if($.default.isArray(t)||$.default.isObject(t)){var i=n.__li.nextElementSibling;return n.remove(),f(e,n.object,n.property,{before:i,factoryArgs:[t]})}},name:function(e){return n.__li.firstElementChild.firstElementChild.innerHTML=e,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof V.default){var o=new M.default(n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});$.default.each(["updateDisplay","onChange","onFinishChange","step"],function(e){var t=n[e],i=o[e];n[e]=o[e]=function(){var e=Array.prototype.slice.call(arguments);return i.apply(o,e),t.apply(n,e)}}),q.default.addClass(t,"has-slider"),n.domElement.insertBefore(o.domElement,n.domElement.firstElementChild)}else if(n instanceof M.default){var i=function(t){if($.default.isNumber(n.__min)&&$.default.isNumber(n.__max)){var o=n.__li.firstElementChild.firstElementChild.innerHTML,i=n.__gui.__listening.indexOf(n)>-1;n.remove();var a=f(e,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return a.name(o),i&&a.listen(),a}return t};n.min=$.default.compose(i,n.min),n.max=$.default.compose(i,n.max)}else n instanceof N.default?(q.default.bind(t,"click",function(){q.default.fakeEvent(n.__checkbox,"click")}),q.default.bind(n.__checkbox,"click",function(e){e.stopPropagation()})):n instanceof j.default?(q.default.bind(t,"click",function(){q.default.fakeEvent(n.__button,"click")}),q.default.bind(t,"mouseover",function(){q.default.addClass(n.__button,"hover")}),q.default.bind(t,"mouseout",function(){q.default.removeClass(n.__button,"hover")})):n instanceof F.default?(q.default.addClass(t,"color"),n.updateDisplay=$.default.compose(function(e){return t.style.borderLeftColor=n.__color.toString(),e},n.updateDisplay),n.updateDisplay()):n instanceof z.default?(q.default.addClass(t,"color"),n.updateDisplay=$.default.compose(function(e){return t.style.borderLeftColor=n.__color.toString(),e},n.updateDisplay),n.updateDisplay()):n instanceof U.default?(q.default.addClass(t,"color"),n.updateDisplay=$.default.compose(function(e){return t.style.borderLeftColor=n.__color.toString(),e},n.updateDisplay),n.updateDisplay()):n instanceof X.default&&(q.default.addClass(t,"color"),n.updateDisplay=$.default.compose(function(e){return t.style.borderLeftColor=n.__color.toString(),e},n.updateDisplay),n.updateDisplay());n.setValue=$.default.compose(function(t){return e.getRoot().__preset_select&&n.isModified()&&a(e.getRoot(),!0),t},n.setValue)}function r(e,t){var n=e.getRoot(),o=n.__rememberedObjects.indexOf(t.object);if(o!==-1){var i=n.__rememberedObjectIndecesToControllers[o];if(void 0===i&&(i={},n.__rememberedObjectIndecesToControllers[o]=i),i[t.property]=t,n.load&&n.load.remembered){var a=n.load.remembered,l=void 0;if(a[e.preset])l=a[e.preset];else{if(!a[ae])return;l=a[ae]}if(l[o]&&void 0!==l[o][t.property]){var r=l[o][t.property];t.initialValue=r,t.setValue(r)}}}}function d(e,t,n,o){if(void 0===t[n])throw new Error('Object "'+t+'" has no property "'+n+'"');var a=void 0;if(o.color)a=new z.default(t,n);else{var d=[t,n].concat(o.factoryArgs);a=A.default.apply(e,d)}o.before instanceof T.default&&(o.before=o.before.__li),r(e,a),q.default.addClass(a.domElement,"c");var u=document.createElement("span");q.default.addClass(u,"property-name"),u.innerHTML=a.property;var s=document.createElement("div");s.appendChild(u),s.appendChild(a.domElement);var f=i(e,s,o.before);return q.default.addClass(f,_e.CLASS_CONTROLLER_ROW),a instanceof F.default?q.default.addClass(f,"color"):a instanceof z.default?q.default.addClass(f,"color"):q.default.addClass(f,v(a.getValue())),
l(e,f,a),e.__controllers.push(a),a}function u(e,t,n,o){if(void 0===t[n])throw new Error('Object "'+t+'" has no property "'+n+'"');var a=void 0;if(o.color)a=new U.default(t,n);else{var d=[t,n].concat(o.factoryArgs);a=A.default.apply(e,d)}o.before instanceof T.default&&(o.before=o.before.__li),r(e,a),q.default.addClass(a.domElement,"c");var u=document.createElement("span");q.default.addClass(u,"property-name"),u.innerHTML=a.property;var s=document.createElement("div");s.appendChild(u),s.appendChild(a.domElement);var f=i(e,s,o.before);return q.default.addClass(f,_e.CLASS_CONTROLLER_ROW),a instanceof F.default?q.default.addClass(f,"color"):a instanceof U.default?q.default.addClass(f,"color"):q.default.addClass(f,v(a.getValue())),l(e,f,a),e.__controllers.push(a),a}function s(e,t,n,o){if(void 0===t[n])throw new Error('Object "'+t+'" has no property "'+n+'"');var a=void 0;if(o.color)a=new X.default(t,n);else{var d=[t,n].concat(o.factoryArgs);a=A.default.apply(e,d)}o.before instanceof T.default&&(o.before=o.before.__li),r(e,a),q.default.addClass(a.domElement,"c");var u=document.createElement("span");q.default.addClass(u,"property-name"),u.innerHTML=a.property;var s=document.createElement("div");s.appendChild(u),s.appendChild(a.domElement);var f=i(e,s,o.before);return q.default.addClass(f,_e.CLASS_CONTROLLER_ROW),a instanceof F.default?q.default.addClass(f,"color"):a instanceof U.default?q.default.addClass(f,"color"):q.default.addClass(f,v(a.getValue())),l(e,f,a),e.__controllers.push(a),a}function f(e,t,n,o){if(void 0===t[n])throw new Error('Object "'+t+'" has no property "'+n+'"');var a=void 0;if(o.color)a=new F.default(t,n);else{var d=[t,n].concat(o.factoryArgs);a=A.default.apply(e,d)}o.before instanceof T.default&&(o.before=o.before.__li),r(e,a),q.default.addClass(a.domElement,"c");var u=document.createElement("span");q.default.addClass(u,"property-name"),u.innerHTML=a.property;var s=document.createElement("div");s.appendChild(u),s.appendChild(a.domElement);var f=i(e,s,o.before);return q.default.addClass(f,_e.CLASS_CONTROLLER_ROW),a instanceof F.default?q.default.addClass(f,"color"):a instanceof z.default?q.default.addClass(f,"color"):q.default.addClass(f,v(a.getValue())),l(e,f,a),e.__controllers.push(a),a}function _(e,t){return document.location.href+"."+t}function c(e,t,n){var o=document.createElement("option");o.innerHTML=t,o.value=t,e.__preset_select.appendChild(o),n&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function p(e,t){t.style.display=e.useLocalStorage?"block":"none"}function h(e){var t=e.__save_row=document.createElement("li");q.default.addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),q.default.addClass(t,"save-row");var n=document.createElement("span");n.innerHTML="&nbsp;",q.default.addClass(n,"button gears");var o=document.createElement("span");o.innerHTML="Save",q.default.addClass(o,"button"),q.default.addClass(o,"save");var i=document.createElement("span");i.innerHTML="New",q.default.addClass(i,"button"),q.default.addClass(i,"save-as");var a=document.createElement("span");a.innerHTML="Revert",q.default.addClass(a,"button"),q.default.addClass(a,"revert");var l=e.__preset_select=document.createElement("select");if(e.load&&e.load.remembered?$.default.each(e.load.remembered,function(t,n){c(e,n,n===e.preset)}):c(e,ae,!1),q.default.bind(l,"change",function(){for(var t=0;t<e.__preset_select.length;t++)e.__preset_select[t].innerHTML=e.__preset_select[t].value;e.preset=this.value}),t.appendChild(l),t.appendChild(n),t.appendChild(o),t.appendChild(i),t.appendChild(a),le){var r=document.getElementById("dg-local-explain"),d=document.getElementById("dg-local-storage"),u=document.getElementById("dg-save-locally");u.style.display="block","true"===localStorage.getItem(_(e,"isLocal"))&&d.setAttribute("checked","checked"),p(e,r),q.default.bind(d,"change",function(){e.useLocalStorage=!e.useLocalStorage,p(e,r)})}var s=document.getElementById("dg-new-constructor");q.default.bind(s,"keydown",function(e){!e.metaKey||67!==e.which&&67!==e.keyCode||re.hide()}),q.default.bind(n,"click",function(){s.innerHTML=JSON.stringify(e.getSaveObject(),void 0,2),re.show(),s.focus(),s.select()}),q.default.bind(o,"click",function(){e.save()}),q.default.bind(i,"click",function(){var t=prompt("Enter a new preset name.");t&&e.saveAs(t)}),q.default.bind(a,"click",function(){e.revert()})}function b(e){function t(t){return t.preventDefault(),e.width+=i-t.clientX,e.onResize(),i=t.clientX,!1}function n(){q.default.removeClass(e.__closeButton,_e.CLASS_DRAG),q.default.unbind(window,"mousemove",t),q.default.unbind(window,"mouseup",n)}function o(o){return o.preventDefault(),i=o.clientX,q.default.addClass(e.__closeButton,_e.CLASS_DRAG),q.default.bind(window,"mousemove",t),q.default.bind(window,"mouseup",n),!1}var i=void 0;e.__resize_handle=document.createElement("div"),$.default.extend(e.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),q.default.bind(e.__resize_handle,"mousedown",o),q.default.bind(e.__closeButton,"mousedown",o),e.domElement.insertBefore(e.__resize_handle,e.domElement.firstElementChild)}function m(e,t){e.domElement.style.width=t+"px",e.__save_row&&e.autoPlace&&(e.__save_row.style.width=t+"px"),e.__closeButton&&(e.__closeButton.style.width=t+"px")}function g(e,t){var n={};return $.default.each(e.__rememberedObjects,function(o,i){var a={},l=e.__rememberedObjectIndecesToControllers[i];$.default.each(l,function(e,n){a[n]=t?e.initialValue:e.getValue()}),n[i]=a}),n}function x(e){for(var t=0;t<e.__preset_select.length;t++)e.__preset_select[t].value===e.preset&&(e.__preset_select.selectedIndex=t)}function y(e){0!==e.length&&W.default.call(window,function(){y(e)}),$.default.each(e,function(e){e.updateDisplay()})}t.__esModule=!0;var v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=n(21),C=o(w),E=n(22),k=o(E),S=n(23),A=o(S),O=n(7),T=o(O),R=n(8),N=o(R),L=n(15),j=o(L),B=n(13),M=o(B),H=n(14),V=o(H),D=n(16),F=o(D),P=n(17),z=o(P),I=n(18),U=o(I),G=n(19),X=o(G),Y=n(24),W=o(Y),K=n(25),J=o(K),Q=n(9),q=o(Q),Z=n(5),$=o(Z),ee=n(26),te=o(ee);C.default.inject(te.default);var ne="dg",oe=72,ie=20,ae="Default",le=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}(),re=void 0,de=!0,ue=void 0,se=!1,fe=[],_e=function e(t){function n(){var e=o.getRoot();e.width+=1,$.default.defer(function(){e.width-=1})}var o=this,a=t||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),q.default.addClass(this.domElement,ne),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],a=$.default.defaults(a,{closeOnTop:!1,autoPlace:!0,width:e.DEFAULT_WIDTH}),a=$.default.defaults(a,{resizable:a.autoPlace,hideable:a.autoPlace}),$.default.isUndefined(a.load)?a.load={preset:ae}:a.preset&&(a.load.preset=a.preset),$.default.isUndefined(a.parent)&&a.hideable&&fe.push(this),a.resizable=$.default.isUndefined(a.parent)&&a.resizable,a.autoPlace&&$.default.isUndefined(a.scrollable)&&(a.scrollable=!0);var l=le&&"true"===localStorage.getItem(_(this,"isLocal")),r=void 0;if(Object.defineProperties(this,{parent:{get:function(){return a.parent}},scrollable:{get:function(){return a.scrollable}},autoPlace:{get:function(){return a.autoPlace}},closeOnTop:{get:function(){return a.closeOnTop}},preset:{get:function(){return o.parent?o.getRoot().preset:a.load.preset},set:function(e){o.parent?o.getRoot().preset=e:a.load.preset=e,x(this),o.revert()}},width:{get:function(){return a.width},set:function(e){a.width=e,m(o,e)}},name:{get:function(){return a.name},set:function(e){a.name=e,titleRowName&&(titleRowName.innerHTML=a.name)}},closed:{get:function(){return a.closed},set:function(t){a.closed=t,a.closed?q.default.addClass(o.__ul,e.CLASS_CLOSED):q.default.removeClass(o.__ul,e.CLASS_CLOSED),this.onResize(),o.__closeButton&&(o.__closeButton.innerHTML=t?e.TEXT_OPEN:e.TEXT_CLOSED)}},load:{get:function(){return a.load}},useLocalStorage:{get:function(){return l},set:function(e){le&&(l=e,e?q.default.bind(window,"unload",r):q.default.unbind(window,"unload",r),localStorage.setItem(_(o,"isLocal"),e))}}}),$.default.isUndefined(a.parent)){if(a.closed=!1,q.default.addClass(this.domElement,e.CLASS_MAIN),q.default.makeSelectable(this.domElement,!1),le&&l){o.useLocalStorage=!0;var d=localStorage.getItem(_(this,"gui"));d&&(a.load=JSON.parse(d))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=e.TEXT_CLOSED,q.default.addClass(this.__closeButton,e.CLASS_CLOSE_BUTTON),a.closeOnTop?(q.default.addClass(this.__closeButton,e.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(q.default.addClass(this.__closeButton,e.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),q.default.bind(this.__closeButton,"click",function(){o.closed=!o.closed})}else{void 0===a.closed&&(a.closed=!0);var u=document.createTextNode(a.name);q.default.addClass(u,"controller-name");var s=i(o,u),f=function(e){return e.preventDefault(),o.closed=!o.closed,!1};q.default.addClass(this.__ul,e.CLASS_CLOSED),q.default.addClass(s,"title"),q.default.bind(s,"click",f),a.closed||(this.closed=!1)}a.autoPlace&&($.default.isUndefined(a.parent)&&(de&&(ue=document.createElement("div"),q.default.addClass(ue,ne),q.default.addClass(ue,e.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(ue),de=!1),ue.appendChild(this.domElement),q.default.addClass(this.domElement,e.CLASS_AUTO_PLACE)),this.parent||m(o,a.width)),this.__resizeHandler=function(){o.onResizeDebounced()},q.default.bind(window,"resize",this.__resizeHandler),q.default.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),q.default.bind(this.__ul,"transitionend",this.__resizeHandler),q.default.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),a.resizable&&b(this),r=function(){le&&"true"===localStorage.getItem(_(o,"isLocal"))&&localStorage.setItem(_(o,"gui"),JSON.stringify(o.getSaveObject()))},this.saveToLocalStorageIfPossible=r,a.parent||n()};_e.toggleHide=function(){se=!se,$.default.each(fe,function(e){e.domElement.style.display=se?"none":""})},_e.CLASS_AUTO_PLACE="a",_e.CLASS_AUTO_PLACE_CONTAINER="ac",_e.CLASS_MAIN="main",_e.CLASS_CONTROLLER_ROW="cr",_e.CLASS_TOO_TALL="taller-than-window",_e.CLASS_CLOSED="closed",_e.CLASS_CLOSE_BUTTON="close-button",_e.CLASS_CLOSE_TOP="close-top",_e.CLASS_CLOSE_BOTTOM="close-bottom",_e.CLASS_DRAG="drag",_e.DEFAULT_WIDTH=245,_e.TEXT_CLOSED="Close Controls",_e.TEXT_OPEN="Open Controls",_e._keydownHandler=function(e){"text"===document.activeElement.type||e.which!==oe&&e.keyCode!==oe||_e.toggleHide()},q.default.bind(window,"keydown",_e._keydownHandler,!1),$.default.extend(_e.prototype,{add:function(e,t){return f(this,e,t,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(e,t){return f(this,e,t,{color:!0})},addBgColor:function(e,t){return d(this,e,t,{color:!0})},addNgColor:function(e,t){return u(this,e,t,{color:!0})},addGtColor:function(e,t){return s(this,e,t,{color:!0})},remove:function(e){this.__ul.removeChild(e.__li),this.__controllers.splice(this.__controllers.indexOf(e),1);var t=this;$.default.defer(function(){t.onResize()})},destroy:function(){this.autoPlace&&ue.removeChild(this.domElement),q.default.unbind(window,"keydown",_e._keydownHandler,!1),q.default.unbind(window,"resize",this.__resizeHandler),this.saveToLocalStorageIfPossible&&q.default.unbind(window,"unload",this.saveToLocalStorageIfPossible)},addFolder:function(e){if(void 0!==this.__folders[e])throw new Error('You already have a folder in this GUI by the name "'+e+'"');var t={name:e,parent:this};t.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[e]&&(t.closed=this.load.folders[e].closed,t.load=this.load.folders[e]);var n=new _e(t);this.__folders[e]=n;var o=i(this,n.domElement);return q.default.addClass(o,"folder"),n},open:function(){this.closed=!1},close:function(){this.closed=!0},onResize:function(){var e=this.getRoot();if(e.scrollable){var t=q.default.getOffset(e.__ul).top,n=0;$.default.each(e.__ul.childNodes,function(t){e.autoPlace&&t===e.__save_row||(n+=q.default.getHeight(t))}),window.innerHeight-t-ie<n?(q.default.addClass(e.domElement,_e.CLASS_TOO_TALL),e.__ul.style.height=window.innerHeight-t-ie+"px"):(q.default.removeClass(e.domElement,_e.CLASS_TOO_TALL),e.__ul.style.height="auto")}e.__resize_handle&&$.default.defer(function(){e.__resize_handle.style.height=e.__ul.offsetHeight+"px"}),e.__closeButton&&(e.__closeButton.style.width=e.width+"px")},onResizeDebounced:$.default.debounce(function(){this.onResize()},50),remember:function(){if($.default.isUndefined(re)&&(re=new J.default,re.domElement.innerHTML=k.default),this.parent)throw new Error("You can only call remember on a top level GUI.");var e=this;$.default.each(Array.prototype.slice.call(arguments),function(t){0===e.__rememberedObjects.length&&h(e),e.__rememberedObjects.indexOf(t)===-1&&e.__rememberedObjects.push(t)}),this.autoPlace&&m(this,this.width)},getRoot:function(){for(var e=this;e.parent;)e=e.parent;return e},getSaveObject:function(){var e=this.load;return e.closed=this.closed,this.__rememberedObjects.length>0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=g(this)),e.folders={},$.default.each(this.__folders,function(t,n){e.folders[n]=t.getSaveObject()}),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=g(this),a(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered[ae]=g(this,!0)),this.load.remembered[e]=g(this),this.preset=e,c(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){$.default.each(this.__controllers,function(t){this.getRoot().load.remembered?r(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())},this),$.default.each(this.__folders,function(e){e.revert(e)}),e||a(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&y(this.__listening)},updateDisplay:function(){$.default.each(this.__controllers,function(e){e.updateDisplay()}),$.default.each(this.__folders,function(e){e.updateDisplay()})}}),t.default=_e,e.exports=t.default},function(e,t){"use strict";e.exports={load:function(e,t){var n=t||document,o=n.createElement("link");o.type="text/css",o.rel="stylesheet",o.href=e,n.getElementsByTagName("head")[0].appendChild(o)},inject:function(e,t){var n=t||document,o=document.createElement("style");o.type="text/css",o.innerHTML=e;var i=n.getElementsByTagName("head")[0];try{i.appendChild(o)}catch(e){}}}},function(e,t){e.exports="<div id=dg-save class=\"dg dialogue\"> Here's the new load parameter for your <code>GUI</code>'s constructor: <textarea id=dg-new-constructor></textarea> <div id=dg-save-locally> <input id=dg-local-storage type=checkbox /> Automatically save values to <code>localStorage</code> on exit. <div id=dg-local-explain>The values saved to <code>localStorage</code> will override those passed to <code>dat.GUI</code>'s constructor. This makes it easier to work incrementally, but <code>localStorage</code> is fragile, and your friends may not see the same values you do. </div> </div> </div>"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(10),a=o(i),l=n(13),r=o(l),d=n(14),u=o(d),s=n(11),f=o(s),_=n(15),c=o(_),p=n(8),h=o(p),b=n(5),m=o(b),g=function(e,t){var n=e[t];return m.default.isArray(arguments[2])||m.default.isObject(arguments[2])?new a.default(e,t,arguments[2]):m.default.isNumber(n)?m.default.isNumber(arguments[2])&&m.default.isNumber(arguments[3])?m.default.isNumber(arguments[4])?new u.default(e,t,arguments[2],arguments[3],arguments[4]):new u.default(e,t,arguments[2],arguments[3]):m.default.isNumber(arguments[4])?new r.default(e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new r.default(e,t,{min:arguments[2],max:arguments[3]}):m.default.isString(n)?new f.default(e,t):m.default.isFunction(n)?new c.default(e,t,""):m.default.isBoolean(n)?new h.default(e,t):null};t.default=g,e.exports=t.default},function(e,t){"use strict";function n(e){setTimeout(e,1e3/60)}t.__esModule=!0,t.default=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||n,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=n(9),l=o(a),r=n(5),d=o(r),u=function(){function e(){i(this,e),this.backgroundElement=document.createElement("div"),d.default.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),l.default.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),d.default.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;l.default.bind(this.backgroundElement,"click",function(){t.hide()})}return e.prototype.show=function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),d.default.defer(function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"})},e.prototype.hide=function e(){var t=this,e=function e(){t.domElement.style.display="none",t.backgroundElement.style.display="none",l.default.unbind(t.domElement,"webkitTransitionEnd",e),l.default.unbind(t.domElement,"transitionend",e),l.default.unbind(t.domElement,"oTransitionEnd",e)};l.default.bind(this.domElement,"webkitTransitionEnd",e),l.default.bind(this.domElement,"transitionend",e),l.default.bind(this.domElement,"oTransitionEnd",e),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"},e.prototype.layout=function(){this.domElement.style.left=window.innerWidth/2-l.default.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-l.default.getHeight(this.domElement)/2+"px"},e}();t.default=u,e.exports=t.default},function(e,t,n){t=e.exports=n(27)(),t.push([e.id,".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1!important}.dg.main .close-button.drag,.dg.main:hover .close-button{opacity:1}.dg.main .close-button{transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{transition:height .1s ease-out;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;height:125px;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.boolean,.dg .cr.boolean *,.dg .cr.function,.dg .cr.function *,.dg .cr.function .property-name{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco,monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px Lucida Grande,sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid hsla(0,0%,100%,.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2fa1d6}.dg .cr.number input[type=text]{color:#2fa1d6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.boolean:hover,.dg .cr.function:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2fa1d6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(o[a]=!0)}for(i=0;i<t.length;i++){var l=t[i];"number"==typeof l[0]&&o[l[0]]||(n&&!l[2]?l[2]=n:n&&(l[2]="("+l[2]+") and ("+n+")"),e.push(l))}},e}}])});