face-recognition.js/public_html/js/lib/min/dat.gui.js

98 lines
54 KiB
JavaScript

!function(d,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dat=e():d.dat=e()}(this,function(){return function(d){function e(b){if(c[b])return c[b].exports;var h=c[b]={exports:{},id:b,loaded:!1};return d[b].call(h.exports,h,h.exports,e),h.loaded=!0,h.exports}var c={};return e.m=d,e.c=c,e.p="",e(0)}([function(d,e,c){e=c(1);d.exports=(e&&e.__esModule?e:{"default":e})["default"]},function(d,e,
c){function b(a){return a&&a.__esModule?a:{"default":a}}e.__esModule=!0;d=c(2);d=b(d);var h=c(6),h=b(h),l=c(3),l=b(l),g=c(7),g=b(g),a=c(8),a=b(a),f=c(10),f=b(f),p=c(11),p=b(p),n=c(12),n=b(n),x=c(13),x=b(x),t=c(14),t=b(t),y=c(15),y=b(y),B=c(16),B=b(B),w=c(9),w=b(w);c=c(17);c=b(c);e["default"]={color:{Color:d["default"],math:h["default"],interpret:l["default"]},controllers:{Controller:g["default"],BooleanController:a["default"],OptionController:f["default"],StringController:p["default"],NumberController:n["default"],
NumberControllerBox:x["default"],NumberControllerSlider:t["default"],FunctionController:y["default"],ColorController:B["default"]},dom:{dom:w["default"]},gui:{GUI:c["default"]},GUI:c["default"]}},function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}function h(a,f,b){Object.defineProperty(a,f,{get:function(){return"RGB"===this.__state.space?this.__state[f]:(n.recalculateRGB(this,f,b),this.__state[f])},set:function(a){"RGB"!==this.__state.space&&(n.recalculateRGB(this,f,b),this.__state.space=
"RGB");this.__state[f]=a}})}function l(a,f){Object.defineProperty(a,f,{get:function(){return"HSV"===this.__state.space?this.__state[f]:(n.recalculateHSV(this),this.__state[f])},set:function(a){"HSV"!==this.__state.space&&(n.recalculateHSV(this),this.__state.space="HSV");this.__state[f]=a}})}e.__esModule=!0;d=c(3);var g=b(d);d=c(6);var a=b(d);d=c(4);var f=b(d);c=c(5);var p=b(c),n=function(){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");if(this.__state=
g["default"].apply(this,arguments),!1===this.__state)throw Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return a.prototype.toString=function(){return(0,f["default"])(this)},a.prototype.toOriginal=function(){return this.__state.conversion.write(this)},a}();n.recalculateRGB=function(f,b,c){if("HEX"===f.__state.space)f.__state[b]=a["default"].component_from_hex(f.__state.hex,c);else{if("HSV"!==f.__state.space)throw Error("Corrupted color state");p["default"].extend(f.__state,
a["default"].hsv_to_rgb(f.__state.h,f.__state.s,f.__state.v))}};n.recalculateHSV=function(f){var b=a["default"].rgb_to_hsv(f.r,f.g,f.b);p["default"].extend(f.__state,{s:b.s,v:b.v});p["default"].isNaN(b.h)?p["default"].isUndefined(f.__state.h)&&(f.__state.h=0):f.__state.h=b.h};n.COMPONENTS="r g b h s v hex a".split(" ");h(n.prototype,"r",2);h(n.prototype,"g",1);h(n.prototype,"b",0);l(n.prototype,"h");l(n.prototype,"s");l(n.prototype,"v");Object.defineProperty(n.prototype,"a",{get:function(){return this.__state.a},
set:function(a){this.__state.a=a}});Object.defineProperty(n.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=a["default"].rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(a){this.__state.space="HEX";this.__state.hex=a}});e["default"]=n},function(d,e,c){e.__esModule=!0;d=(d=c(4))&&d.__esModule?d:{"default":d};var b=(c=c(5))&&c.__esModule?c:{"default":c},h=[{litmus:b["default"].isString,conversions:{THREE_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
return null!==a&&{space:"HEX",hex:parseInt("0x"+a[1].toString()+a[1].toString()+a[2].toString()+a[2].toString()+a[3].toString()+a[3].toString(),0)}},write:d["default"]},SIX_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9]{6})$/i);return null!==a&&{space:"HEX",hex:parseInt("0x"+a[1].toString(),0)}},write:d["default"]},CSS_RGB:{read:function(a){a=a.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==a&&{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3])}},write:d["default"]},
CSS_RGBA:{read:function(a){a=a.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==a&&{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3]),a:parseFloat(a[4])}},write:d["default"]}}},{litmus:b["default"].isNumber,conversions:{HEX:{read:function(a){return{space:"HEX",hex:a,conversionName:"HEX"}},write:function(a){return a.hex}}}},{litmus:b["default"].isArray,conversions:{RGB_ARRAY:{read:function(a){return 3===a.length&&{space:"RGB",r:a[0],g:a[1],b:a[2]}},write:function(a){return[a.r,
a.g,a.b]}},RGBA_ARRAY:{read:function(a){return 4===a.length&&{space:"RGB",r:a[0],g:a[1],b:a[2],a:a[3]}},write:function(a){return[a.r,a.g,a.b,a.a]}}}},{litmus:b["default"].isObject,conversions:{RGBA_OBJ:{read:function(a){return!!(b["default"].isNumber(a.r)&&b["default"].isNumber(a.g)&&b["default"].isNumber(a.b)&&b["default"].isNumber(a.a))&&{space:"RGB",r:a.r,g:a.g,b:a.b,a:a.a}},write:function(a){return{r:a.r,g:a.g,b:a.b,a:a.a}}},RGB_OBJ:{read:function(a){return!!(b["default"].isNumber(a.r)&&b["default"].isNumber(a.g)&&
b["default"].isNumber(a.b))&&{space:"RGB",r:a.r,g:a.g,b:a.b}},write:function(a){return{r:a.r,g:a.g,b:a.b}}},HSVA_OBJ:{read:function(a){return!!(b["default"].isNumber(a.h)&&b["default"].isNumber(a.s)&&b["default"].isNumber(a.v)&&b["default"].isNumber(a.a))&&{space:"HSV",h:a.h,s:a.s,v:a.v,a:a.a}},write:function(a){return{h:a.h,s:a.s,v:a.v,a:a.a}}},HSV_OBJ:{read:function(a){return!!(b["default"].isNumber(a.h)&&b["default"].isNumber(a.s)&&b["default"].isNumber(a.v))&&{space:"HSV",h:a.h,s:a.s,v:a.v}},
write:function(a){return{h:a.h,s:a.s,v:a.v}}}}}],l=void 0,g=void 0;e["default"]=function(){g=!1;var a=1<arguments.length?b["default"].toArray(arguments):arguments[0];return b["default"].each(h,function(f){if(f.litmus(a))return b["default"].each(f.conversions,function(f,c){if(l=f.read(a),!1===g&&!1!==l)return g=l,l.conversionName=c,l.conversion=f,b["default"].BREAK}),b["default"].BREAK}),g}},function(d,e,c){e.__esModule=!0;e["default"]=function(c){if(1===c.a||b["default"].isUndefined(c.a)){for(c=c.hex.toString(16);6>
c.length;)c="0"+c;return"#"+c}return"rgba("+Math.round(c.r)+","+Math.round(c.g)+","+Math.round(c.b)+","+c.a+")"};var b=(d=c(5))&&d.__esModule?d:{"default":d}},function(d,e){e.__esModule=!0;var c=Array.prototype.forEach,b=Array.prototype.slice,h={BREAK:{},extend:function(c){return this.each(b.call(arguments,1),function(b){(this.isObject(b)?Object.keys(b):[]).forEach(function(a){this.isUndefined(b[a])||(c[a]=b[a])}.bind(this))},this),c},defaults:function(c){return this.each(b.call(arguments,1),function(b){(this.isObject(b)?
Object.keys(b):[]).forEach(function(a){this.isUndefined(c[a])&&(c[a]=b[a])}.bind(this))},this),c},compose:function(){var c=b.call(arguments);return function(){for(var g=b.call(arguments),a=c.length-1;0<=a;a--)g=[c[a].apply(this,g)];return g[0]}},each:function(b,g,a){if(b)if(c&&b.forEach&&b.forEach===c)b.forEach(g,a);else if(b.length===b.length+0)for(var f=void 0,p=void 0,f=0,p=b.length;f<p&&!(f in b&&g.call(a,b[f],f)===this.BREAK);f++);else for(f in b)if(g.call(a,b[f],f)===this.BREAK)break},defer:function(b){setTimeout(b,
0)},debounce:function(b,c){var a=void 0;return function(){var f=arguments,p=!a;clearTimeout(a);a=setTimeout(function(){a=null},c);p&&b.apply(this,f)}},toArray:function(c){return c.toArray?c.toArray():b.call(c)},isUndefined:function(b){return void 0===b},isNull:function(b){return null===b},isNaN:function(b){function c(a){return b.apply(this,arguments)}return c.toString=function(){return b.toString()},c}(function(b){return isNaN(b)}),isArray:Array.isArray||function(b){return b.constructor===Array},
isObject:function(b){return b===Object(b)},isNumber:function(b){return b===b+0},isString:function(b){return b===b+""},isBoolean:function(b){return!1===b||!0===b},isFunction:function(b){return"[object Function]"===Object.prototype.toString.call(b)}};e["default"]=h},function(d,e){e.__esModule=!0;var c=void 0;e["default"]={hsv_to_rgb:function(b,c,d){var g=b/60-Math.floor(b/60),a=d*(1-c),f=d*(1-g*c);c=d*(1-(1-g)*c);b=[[d,c,a],[f,d,a],[a,d,c],[a,f,d],[c,a,d],[d,a,f]][Math.floor(b/60)%6];return{r:255*b[0],
g:255*b[1],b:255*b[2]}},rgb_to_hsv:function(b,c,d){var g=Math.max(b,c,d),a=g-Math.min(b,c,d),f=void 0,p=void 0;return 0===g?{h:NaN,s:0,v:0}:(p=a/g,f=b===g?(c-d)/a:c===g?2+(d-b)/a:4+(b-c)/a,f/=6,0>f&&(f+=1),{h:360*f,s:p,v:g/255})},rgb_to_hex:function(b,c,d){b=this.hex_with_component(0,2,b);return b=this.hex_with_component(b,1,c),this.hex_with_component(b,0,d)},component_from_hex:function(b,c){return b>>8*c&255},hex_with_component:function(b,d,e){return e<<(c=8*d)|b&~(255<<c)}}},function(d,e){e.__esModule=
!0;var c=function(){function b(c,d){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.initialValue=c[d];this.domElement=document.createElement("div");this.object=c;this.property=d;this.__onFinishChange=this.__onChange=void 0}return b.prototype.onChange=function(b){return this.__onChange=b,this},b.prototype.onFinishChange=function(b){return this.__onFinishChange=b,this},b.prototype.setValue=function(b){return this.object[this.property]=b,this.__onChange&&this.__onChange.call(this,
b),this.updateDisplay(),this},b.prototype.getValue=function(){return this.object[this.property]},b.prototype.updateDisplay=function(){return this},b.prototype.isModified=function(){return this.initialValue!==this.getValue()},b}();e["default"]=c},function(d,e,c){function b(b,a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=typeof a&&"function"!=typeof a?b:a}function h(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+
typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)}e.__esModule=!0;d=(d=c(7))&&d.__esModule?d:{"default":d};var l=(c=c(9))&&c.__esModule?c:{"default":c};c=function(c){function a(f,p){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var n=b(this,c.call(this,f,p));return n.__prev=n.getValue(),n.__checkbox=document.createElement("input"),
n.__checkbox.setAttribute("type","checkbox"),l["default"].bind(n.__checkbox,"change",function(){n.setValue(!n.__prev)},!1),n.domElement.appendChild(n.__checkbox),n.updateDisplay(),n}return h(a,c),a.prototype.setValue=function(a){a=c.prototype.setValue.call(this,a);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),a},a.prototype.updateDisplay=function(){return!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=
!0):this.__checkbox.checked=!1,c.prototype.updateDisplay.call(this)},a}(d["default"]);e["default"]=c},function(d,e,c){function b(a){if("0"===a||h["default"].isUndefined(a))return 0;a=a.match(g);return h["default"].isNull(a)?0:parseFloat(a[1])}e.__esModule=!0;var h=(d=c(5))&&d.__esModule?d:{"default":d},l={};h["default"].each({HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},function(a,b){h["default"].each(a,function(a){l[a]=b})});
var g=/(\d+(\.\d+)?)px/,a={makeSelectable:function(a,b){void 0!==a&&void 0!==a.style&&(a.onselectstart=b?function(){return!1}:function(){},a.style.MozUserSelect=b?"auto":"none",a.style.KhtmlUserSelect=b?"auto":"none",a.unselectable=b?"on":"off")},makeFullscreen:function(a,b,c){h["default"].isUndefined(b)&&(b=!0);h["default"].isUndefined(c)&&(c=!0);a.style.position="absolute";b&&(a.style.left=0,a.style.right=0);c&&(a.style.top=0,a.style.bottom=0)},fakeEvent:function(a,b,c,d){c=c||{};var g=l[b];if(!g)throw Error("Event type "+
b+" not supported.");var e=document.createEvent(g);switch(g){case "MouseEvents":e.initMouseEvent(b,c.bubbles||!1,c.cancelable||!0,window,c.clickCount||1,0,0,c.x||c.clientX||0,c.y||c.clientY||0,!1,!1,!1,!1,0,null);break;case "KeyboardEvents":g=e.initKeyboardEvent||e.initKeyEvent;h["default"].defaults(c,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0});g(b,c.bubbles||!1,c.cancelable,window,c.ctrlKey,c.altKey,c.shiftKey,c.metaKey,c.keyCode,c.charCode);break;
default:e.initEvent(b,c.bubbles||!1,c.cancelable||!0)}h["default"].defaults(e,d);a.dispatchEvent(e)},bind:function(b,c,d,g){return b.addEventListener?b.addEventListener(c,d,g||!1):b.attachEvent&&b.attachEvent("on"+c,d),a},unbind:function(b,c,d,g){return b.removeEventListener?b.removeEventListener(c,d,g||!1):b.detachEvent&&b.detachEvent("on"+c,d),a},addClass:function(b,c){if(void 0===b.className)b.className=c;else if(b.className!==c){var d=b.className.split(/ +/);-1===d.indexOf(c)&&(d.push(c),b.className=
d.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return a},removeClass:function(b,c){if(c)if(b.className===c)b.removeAttribute("class");else{var d=b.className.split(/ +/),g=d.indexOf(c);-1!==g&&(d.splice(g,1),b.className=d.join(" "))}else b.className=void 0;return a},hasClass:function(a,b){return(new RegExp("(?:^|\\s+)"+b+"(?:\\s+|$)")).test(a.className)||!1},getWidth:function(a){a=getComputedStyle(a);return b(a["border-left-width"])+b(a["border-right-width"])+b(a["padding-left"])+b(a["padding-right"])+
b(a.width)},getHeight:function(a){a=getComputedStyle(a);return b(a["border-top-width"])+b(a["border-bottom-width"])+b(a["padding-top"])+b(a["padding-bottom"])+b(a.height)},getOffset:function(a){var b={left:0,top:0};if(a.offsetParent){do b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;while(a)}return b},isActive:function(a){return a===document.activeElement&&(a.type||a.href)}};e["default"]=a},function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}function h(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function l(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}e.__esModule=!0;d=c(7);d=b(d);var g=c(9),a=b(g);c=c(5);var f=b(c);c=function(b){function c(d,g,e){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");
var l=h(this,b.call(this,d,g)),w=e;return l.__select=document.createElement("select"),f["default"].isArray(w)&&!function(){var a={};f["default"].each(w,function(b){a[b]=b});w=a}(),f["default"].each(w,function(a,b){var c=document.createElement("option");c.innerHTML=b;c.setAttribute("value",a);l.__select.appendChild(c)}),l.updateDisplay(),a["default"].bind(l.__select,"change",function(){l.setValue(this.options[this.selectedIndex].value)}),l.domElement.appendChild(l.__select),l}return l(c,b),c.prototype.setValue=
function(a){a=b.prototype.setValue.call(this,a);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),a},c.prototype.updateDisplay=function(){return a["default"].isActive(this.__select)?this:(this.__select.value=this.getValue(),b.prototype.updateDisplay.call(this))},c}(d["default"]);e["default"]=c},function(d,e,c){function b(b,a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=typeof a&&"function"!=typeof a?b:
a}function h(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)}e.__esModule=!0;d=(d=c(7))&&d.__esModule?d:{"default":d};var l=(c=c(9))&&c.__esModule?c:{"default":c};c=function(c){function a(d,e){function n(){t.setValue(t.__input.value)}if(!(this instanceof
a))throw new TypeError("Cannot call a class as a function");var h=b(this,c.call(this,d,e)),t=h;return h.__input=document.createElement("input"),h.__input.setAttribute("type","text"),l["default"].bind(h.__input,"keyup",n),l["default"].bind(h.__input,"change",n),l["default"].bind(h.__input,"blur",function(){t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())}),l["default"].bind(h.__input,"keydown",function(a){13===a.keyCode&&this.blur()}),h.updateDisplay(),h.domElement.appendChild(h.__input),
h}return h(a,c),a.prototype.updateDisplay=function(){return l["default"].isActive(this.__input)||(this.__input.value=this.getValue()),c.prototype.updateDisplay.call(this)},a}(d["default"]);e["default"]=c},function(d,e,c){function b(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,
a):b.__proto__=a)}function h(b){b=b.toString();return-1<b.indexOf(".")?b.length-b.indexOf(".")-1:0}e.__esModule=!0;d=(d=c(7))&&d.__esModule?d:{"default":d};var l=(c=c(5))&&c.__esModule?c:{"default":c};c=function(c){function a(b,d,e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");b=c.call(this,b,d);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");b=!b||"object"!=typeof b&&"function"!=typeof b?this:b;e=e||{};return b.__min=
e.min,b.__max=e.max,b.__step=e.step,l["default"].isUndefined(b.__step)?0===b.initialValue?b.__impliedStep=1:b.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(b.initialValue))/Math.LN10))/10:b.__impliedStep=b.__step,b.__precision=h(b.__impliedStep),b}return b(a,c),a.prototype.setValue=function(a){return void 0!==this.__min&&a<this.__min?a=this.__min:void 0!==this.__max&&a>this.__max&&(a=this.__max),void 0!==this.__step&&0!==a%this.__step&&(a=Math.round(a/this.__step)*this.__step),c.prototype.setValue.call(this,
a)},a.prototype.min=function(a){return this.__min=a,this},a.prototype.max=function(a){return this.__max=a,this},a.prototype.step=function(a){return this.__step=a,this.__impliedStep=a,this.__precision=h(a),this},a}(d["default"]);e["default"]=c},function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}function h(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function l(a,b){if("function"!=
typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}e.__esModule=!0;d=c(12);d=b(d);var g=c(9),a=b(g);c=c(5);var f=b(c);c=function(b){function c(d,e,g){function l(){var a=parseFloat(z.__input.value);f["default"].isNaN(a)||z.setValue(a)}function w(a){document.activeElement.blur();
var b=F-a.clientY;z.setValue(z.getValue()+b*z.__impliedStep);F=a.clientY}function q(){a["default"].unbind(window,"mousemove",w);a["default"].unbind(window,"mouseup",q)}if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");d=h(this,b.call(this,d,e,g));d.__truncationSuspended=!1;var z=d,F=void 0;return d.__input=document.createElement("input"),d.__input.setAttribute("type","text"),a["default"].bind(d.__input,"change",l),a["default"].bind(d.__input,"blur",function(){l();z.__onFinishChange&&
z.__onFinishChange.call(z,z.getValue())}),a["default"].bind(d.__input,"mousedown",function(b){a["default"].bind(window,"mousemove",w);a["default"].bind(window,"mouseup",q);F=b.clientY}),a["default"].bind(d.__input,"keydown",function(a){13===a.keyCode&&(z.__truncationSuspended=!0,this.blur(),z.__truncationSuspended=!1)}),d.updateDisplay(),d.domElement.appendChild(d.__input),d}return l(c,b),c.prototype.updateDisplay=function(){var c;if(a["default"].isActive(this.__input))c=this;else{c=this.__input;
var d;if(this.__truncationSuspended)d=this.getValue();else{d=this.getValue();var f=Math.pow(10,this.__precision);d=Math.round(d*f)/f}c=(c.value=d,b.prototype.updateDisplay.call(this))}return c},c}(d["default"]);e["default"]=c},function(d,e,c){function b(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function l(a,b,c,d,e){return d+(a-b)/(c-b)*(e-d)}e.__esModule=!0;d=(d=c(12))&&d.__esModule?d:{"default":d};var g=(c=c(9))&&c.__esModule?c:{"default":c};c=function(a){function c(d,e,h,t,y){function B(a){a.preventDefault();var b=g["default"].getOffset(q.__background),c=g["default"].getWidth(q.__background);return q.setValue(l(a.clientX,
b.left,b.left+c,q.__min,q.__max)),!1}function w(){g["default"].unbind(window,"mousemove",B);g["default"].unbind(window,"mouseup",w);q.__onFinishChange&&q.__onFinishChange.call(q,q.getValue())}if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var q=d=b(this,a.call(this,d,e,{min:h,max:t,step:y}));return d.__background=document.createElement("div"),d.__foreground=document.createElement("div"),g["default"].bind(d.__background,"mousedown",function(a){document.activeElement.blur();
g["default"].bind(window,"mousemove",B);g["default"].bind(window,"mouseup",w);B(a)}),g["default"].addClass(d.__background,"slider"),g["default"].addClass(d.__foreground,"slider-fg"),d.updateDisplay(),d.__background.appendChild(d.__foreground),d.domElement.appendChild(d.__background),d}return h(c,a),c.prototype.updateDisplay=function(){var b=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*b+"%",a.prototype.updateDisplay.call(this)},c}(d["default"]);e["default"]=
c},function(d,e,c){function b(b,a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=typeof a&&"function"!=typeof a?b:a}function h(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)}e.__esModule=
!0;d=(d=c(7))&&d.__esModule?d:{"default":d};var l=(c=c(9))&&c.__esModule?c:{"default":c};c=function(c){function a(d,e,h){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var x=b(this,c.call(this,d,e));return x.__button=document.createElement("div"),x.__button.innerHTML=void 0===h?"Fire":h,l["default"].bind(x.__button,"click",function(a){return a.preventDefault(),x.fire(),!1}),l["default"].addClass(x.__button,"button"),x.domElement.appendChild(x.__button),x}return h(a,
c),a.prototype.fire=function(){this.__onChange&&this.__onChange.call(this);this.getValue().call(this.object);this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())},a}(d["default"]);e["default"]=c},function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}function h(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function l(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function g(a,b,c,d){a.style.background="";t["default"].each(y,function(e){a.style.cssText+="background: "+e+"linear-gradient("+b+", "+c+" 0%, "+d+" 100%); "})}function a(a){a.style.background="";a.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);";
a.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}
e.__esModule=!0;d=c(7);d=b(d);var f=c(9),p=b(f),f=c(2),n=b(f),f=c(3),x=b(f);c=c(5);var t=b(c);c=function(b){function c(d,e){function f(a){G(a);p["default"].bind(window,"mousemove",G);p["default"].bind(window,"mouseup",l)}function l(){p["default"].unbind(window,"mousemove",G);p["default"].unbind(window,"mouseup",l);H()}function y(){var a=(0,x["default"])(this.value);!1!==a?(v.__color.__state=a,v.setValue(v.__color.toOriginal())):this.value=v.__color.toString()}function K(){p["default"].unbind(window,
"mousemove",C);p["default"].unbind(window,"mouseup",K);H()}function H(){v.__onFinishChange&&v.__onFinishChange.call(v,v.__color.toString())}function G(a){a.preventDefault();var b=p["default"].getWidth(v.__saturation_field),c=p["default"].getOffset(v.__saturation_field),d=(a.clientX-c.left+document.body.scrollLeft)/b;a=1-(a.clientY-c.top+document.body.scrollTop)/b;return 1<a?a=1:0>a&&(a=0),1<d?d=1:0>d&&(d=0),v.__color.v=a,v.__color.s=d,v.setValue(v.__color.toOriginal()),!1}function C(a){a.preventDefault();
var b=p["default"].getHeight(v.__hue_field),c=p["default"].getOffset(v.__hue_field);a=1-(a.clientY-c.top+document.body.scrollTop)/b;return 1<a?a=1:0>a&&(a=0),v.__color.h=360*a,v.setValue(v.__color.toOriginal()),!1}if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var m=h(this,b.call(this,d,e));m.__color=new n["default"](m.getValue());m.__temp=new n["default"](0);var v=m;m.domElement=document.createElement("div");p["default"].makeSelectable(m.domElement,!1);m.__selector=
document.createElement("div");m.__selector.className="selector";m.__saturation_field=document.createElement("div");m.__saturation_field.className="saturation-field";m.__field_knob=document.createElement("div");m.__field_knob.className="field-knob";m.__field_knob_border="2px solid ";m.__hue_knob=document.createElement("div");m.__hue_knob.className="hue-knob";m.__hue_field=document.createElement("div");m.__hue_field.className="hue-field";m.__input=document.createElement("input");m.__input.type="text";
m.__input_textShadow="0 1px 1px ";p["default"].bind(m.__input,"keydown",function(a){13===a.keyCode&&y.call(this)});p["default"].bind(m.__input,"blur",y);p["default"].bind(m.__selector,"mousedown",function(){p["default"].addClass(this,"drag").bind(window,"mouseup",function(){p["default"].removeClass(v.__selector,"drag")})});var k=document.createElement("div");return t["default"].extend(m.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),
t["default"].extend(m.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:m.__field_knob_border+(.5>m.__color.v?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),t["default"].extend(m.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),t["default"].extend(m.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),
t["default"].extend(k.style,{width:"100%",height:"100%",background:"none"}),g(k,"top","rgba(0,0,0,0)","#000"),t["default"].extend(m.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),a(m.__hue_field),t["default"].extend(m.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:m.__input_textShadow+"rgba(0,0,0,0.7)"}),p["default"].bind(m.__saturation_field,"mousedown",f),p["default"].bind(m.__field_knob,
"mousedown",f),p["default"].bind(m.__hue_field,"mousedown",function(a){C(a);p["default"].bind(window,"mousemove",C);p["default"].bind(window,"mouseup",K)}),m.__saturation_field.appendChild(k),m.__selector.appendChild(m.__field_knob),m.__selector.appendChild(m.__saturation_field),m.__selector.appendChild(m.__hue_field),m.__hue_field.appendChild(m.__hue_knob),m.domElement.appendChild(m.__input),m.domElement.appendChild(m.__selector),m.updateDisplay(),m}return l(c,b),c.prototype.updateDisplay=function(){var a=
(0,x["default"])(this.getValue());if(!1!==a){var b=!1;t["default"].each(n["default"].COMPONENTS,function(c){if(!t["default"].isUndefined(a[c])&&!t["default"].isUndefined(this.__color.__state[c])&&a[c]!==this.__color.__state[c])return b=!0,{}},this);b&&t["default"].extend(this.__color.__state,a)}t["default"].extend(this.__temp.__state,this.__color.__state);this.__temp.a=1;var c=.5>this.__color.v||.5<this.__color.s?255:0,d=255-c;t["default"].extend(this.__field_knob.style,{marginLeft:100*this.__color.s-
7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toString(),border:this.__field_knob_border+"rgb("+c+","+c+","+c+")"});this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px";this.__temp.s=1;this.__temp.v=1;g(this.__saturation_field,"left","#fff",this.__temp.toString());t["default"].extend(this.__input.style,{backgroundColor:this.__input.value=this.__color.toString(),color:"rgb("+c+","+c+","+c+")",textShadow:this.__input_textShadow+"rgba("+d+","+d+","+d+",.7)"})},
c}(d["default"]);var y=["-moz-","-o-","-webkit-","-ms-",""];e["default"]=c},function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}function h(a,b,c){var d=document.createElement("li");return b&&d.appendChild(b),c?a.__ul.insertBefore(d,c):a.__ul.appendChild(d),a.onResize(),d}function l(a,b){var c=a.__preset_select[a.__preset_select.selectedIndex];b?c.innerHTML=c.value+"*":c.innerHTML=c.value}function g(a,b,c){if(c.__li=b,c.__gui=a,r["default"].extend(c,{options:function(b){if(1<arguments.length){var d=
c.__li.nextElementSibling;return c.remove(),f(a,c.object,c.property,{before:d,factoryArgs:[r["default"].toArray(arguments)]})}if(r["default"].isArray(b)||r["default"].isObject(b))return d=c.__li.nextElementSibling,c.remove(),f(a,c.object,c.property,{before:d,factoryArgs:[b]})},name:function(a){return c.__li.firstElementChild.firstElementChild.innerHTML=a,c},listen:function(){return c.__gui.listen(c),c},remove:function(){return c.__gui.remove(c),c}}),c instanceof G["default"])!function(){var a=new H["default"](c.object,
c.property,{min:c.__min,max:c.__max,step:c.__step});r["default"].each(["updateDisplay","onChange","onFinishChange","step"],function(b){var d=c[b],A=a[b];c[b]=a[b]=function(){var b=Array.prototype.slice.call(arguments);return A.apply(a,b),d.apply(c,b)}});k["default"].addClass(b,"has-slider");c.domElement.insertBefore(a.domElement,c.domElement.firstElementChild)}();else if(c instanceof H["default"]){var d=function(b){return r["default"].isNumber(c.__min)&&r["default"].isNumber(c.__max)?(c.remove(),
f(a,c.object,c.property,{before:c.__li.nextElementSibling,factoryArgs:[c.__min,c.__max,c.__step]})):b};c.min=r["default"].compose(d,c.min);c.max=r["default"].compose(d,c.max)}else c instanceof P["default"]?(k["default"].bind(b,"click",function(){k["default"].fakeEvent(c.__checkbox,"click")}),k["default"].bind(c.__checkbox,"click",function(a){a.stopPropagation()})):c instanceof K["default"]?(k["default"].bind(b,"click",function(){k["default"].fakeEvent(c.__button,"click")}),k["default"].bind(b,"mouseover",
function(){k["default"].addClass(c.__button,"hover")}),k["default"].bind(b,"mouseout",function(){k["default"].removeClass(c.__button,"hover")})):c instanceof C["default"]&&(k["default"].addClass(b,"color"),c.updateDisplay=r["default"].compose(function(a){return b.style.borderLeftColor=c.__color.toString(),a},c.updateDisplay),c.updateDisplay());c.setValue=r["default"].compose(function(b){return a.getRoot().__preset_select&&c.isModified()&&l(a.getRoot(),!0),b},c.setValue)}function a(a,b){var c=a.getRoot(),
d=c.__rememberedObjects.indexOf(b.object);if(-1!==d){var e=c.__rememberedObjectIndecesToControllers[d];if(void 0===e&&(e={},c.__rememberedObjectIndecesToControllers[d]=e),e[b.property]=b,c.load&&c.load.remembered){c=c.load.remembered;e=void 0;if(c[a.preset])e=c[a.preset];else{if(!c[I])return;e=c[I]}e[d]&&void 0!==e[d][b.property]&&(d=e[d][b.property],b.initialValue=d,b.setValue(d))}}}function f(b,c,d,e){if(void 0===c[d])throw Error('Object "'+c+'" has no property "'+d+'"');var f=void 0;e.color?f=
new C["default"](c,d):(f=[c,d].concat(e.factoryArgs),f=F["default"].apply(b,f));e.before instanceof O["default"]&&(e.before=e.before.__li);a(b,f);k["default"].addClass(f.domElement,"c");c=document.createElement("span");k["default"].addClass(c,"property-name");c.innerHTML=f.property;d=document.createElement("div");d.appendChild(c);d.appendChild(f.domElement);e=h(b,d,e.before);return k["default"].addClass(e,u.CLASS_CONTROLLER_ROW),f instanceof C["default"]?k["default"].addClass(e,"color"):k["default"].addClass(e,
w(f.getValue())),g(b,e,f),b.__controllers.push(f),f}function p(a,b,c){var d=document.createElement("option");d.innerHTML=b;d.value=b;a.__preset_select.appendChild(d);c&&(a.__preset_select.selectedIndex=a.__preset_select.length-1)}function n(a){var b=a.__save_row=document.createElement("li");k["default"].addClass(a.domElement,"has-save");a.__ul.insertBefore(b,a.__ul.firstChild);k["default"].addClass(b,"save-row");var c=document.createElement("span");c.innerHTML="&nbsp;";k["default"].addClass(c,"button gears");
var d=document.createElement("span");d.innerHTML="Save";k["default"].addClass(d,"button");k["default"].addClass(d,"save");var e=document.createElement("span");e.innerHTML="New";k["default"].addClass(e,"button");k["default"].addClass(e,"save-as");var f=document.createElement("span");f.innerHTML="Revert";k["default"].addClass(f,"button");k["default"].addClass(f,"revert");var g=a.__preset_select=document.createElement("select");a.load&&a.load.remembered?r["default"].each(a.load.remembered,function(b,
c){p(a,c,c===a.preset)}):p(a,I,!1);k["default"].bind(g,"change",function(){for(var b=0;b<a.__preset_select.length;b++)a.__preset_select[b].innerHTML=a.__preset_select[b].value;a.preset=this.value});b.appendChild(g);b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(f);D&&!function(){var b=document.getElementById("dg-local-explain"),c=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block";"true"===localStorage.getItem(document.location.href+
".isLocal")&&c.setAttribute("checked","checked");b.style.display=a.useLocalStorage?"block":"none";k["default"].bind(c,"change",function(){a.useLocalStorage=!a.useLocalStorage;b.style.display=a.useLocalStorage?"block":"none"})}();var h=document.getElementById("dg-new-constructor");k["default"].bind(h,"keydown",function(a){!a.metaKey||67!==a.which&&67!==a.keyCode||J.hide()});k["default"].bind(c,"click",function(){h.innerHTML=JSON.stringify(a.getSaveObject(),void 0,2);J.show();h.focus();h.select()});
k["default"].bind(d,"click",function(){a.save()});k["default"].bind(e,"click",function(){var b=prompt("Enter a new preset name.");b&&a.saveAs(b)});k["default"].bind(f,"click",function(){a.revert()})}function x(a){function b(c){return c.preventDefault(),a.width+=e-c.clientX,a.onResize(),e=c.clientX,!1}function c(){k["default"].removeClass(a.__closeButton,u.CLASS_DRAG);k["default"].unbind(window,"mousemove",b);k["default"].unbind(window,"mouseup",c)}function d(f){return f.preventDefault(),e=f.clientX,
k["default"].addClass(a.__closeButton,u.CLASS_DRAG),k["default"].bind(window,"mousemove",b),k["default"].bind(window,"mouseup",c),!1}var e=void 0;a.__resize_handle=document.createElement("div");r["default"].extend(a.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"});k["default"].bind(a.__resize_handle,"mousedown",d);k["default"].bind(a.__closeButton,"mousedown",d);a.domElement.insertBefore(a.__resize_handle,a.domElement.firstElementChild)}
function t(a,b){a.domElement.style.width=b+"px";a.__save_row&&a.autoPlace&&(a.__save_row.style.width=b+"px");a.__closeButton&&(a.__closeButton.style.width=b+"px")}function y(a,b){var c={};return r["default"].each(a.__rememberedObjects,function(d,e){var f={};r["default"].each(a.__rememberedObjectIndecesToControllers[e],function(a,c){f[c]=b?a.initialValue:a.getValue()});c[e]=f}),c}function B(a){0!==a.length&&m["default"].call(window,function(){B(a)});r["default"].each(a,function(a){a.updateDisplay()})}
var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a};e=c(18);e=b(e);var q=c(19),z=b(q),q=c(20),F=b(q),q=c(7),O=b(q),q=c(8),P=b(q),q=c(15),K=b(q),q=c(13),H=b(q),q=c(14),G=b(q),q=c(16),C=b(q),q=c(21),m=b(q),q=c(22),v=b(q),q=c(9),k=b(q),q=c(5),r=b(q);c=c(23);c=b(c);e["default"].inject(c["default"]);var I="Default",D;try{D="localStorage"in window&&null!==window.localStorage}catch(Q){D=
!1}var J=void 0,M=!0,E=void 0,L=!1,N=[],u=function A(a){function b(){var a=c.getRoot();a.width+=1;r["default"].defer(function(){--a.width})}var c=this,d=a||{};this.domElement=document.createElement("div");this.__ul=document.createElement("ul");this.domElement.appendChild(this.__ul);k["default"].addClass(this.domElement,"dg");this.__folders={};this.__controllers=[];this.__rememberedObjects=[];this.__rememberedObjectIndecesToControllers=[];this.__listening=[];d=r["default"].defaults(d,{autoPlace:!0,
width:A.DEFAULT_WIDTH});d=r["default"].defaults(d,{resizable:d.autoPlace,hideable:d.autoPlace});r["default"].isUndefined(d.load)?d.load={preset:I}:d.preset&&(d.load.preset=d.preset);r["default"].isUndefined(d.parent)&&d.hideable&&N.push(this);d.resizable=r["default"].isUndefined(d.parent)&&d.resizable;d.autoPlace&&r["default"].isUndefined(d.scrollable)&&(d.scrollable=!0);var e=D&&"true"===localStorage.getItem(document.location.href+".isLocal"),f=void 0;if(Object.defineProperties(this,{parent:{get:function(){return d.parent}},
scrollable:{get:function(){return d.scrollable}},autoPlace:{get:function(){return d.autoPlace}},preset:{get:function(){return c.parent?c.getRoot().preset:d.load.preset},set:function(a){c.parent?c.getRoot().preset=a:d.load.preset=a;for(a=0;a<this.__preset_select.length;a++)this.__preset_select[a].value===this.preset&&(this.__preset_select.selectedIndex=a);c.revert()}},width:{get:function(){return d.width},set:function(a){d.width=a;t(c,a)}},name:{get:function(){return d.name},set:function(a){d.name=
a;titleRowName&&(titleRowName.innerHTML=d.name)}},closed:{get:function(){return d.closed},set:function(a){d.closed=a;d.closed?k["default"].addClass(c.__ul,A.CLASS_CLOSED):k["default"].removeClass(c.__ul,A.CLASS_CLOSED);this.onResize();c.__closeButton&&(c.__closeButton.innerHTML=a?A.TEXT_OPEN:A.TEXT_CLOSED)}},load:{get:function(){return d.load}},useLocalStorage:{get:function(){return e},set:function(a){D&&(e=a,a?k["default"].bind(window,"unload",f):k["default"].unbind(window,"unload",f),localStorage.setItem(document.location.href+
".isLocal",a))}}}),r["default"].isUndefined(d.parent)){if(d.closed=!1,k["default"].addClass(this.domElement,A.CLASS_MAIN),k["default"].makeSelectable(this.domElement,!1),D&&e)c.useLocalStorage=!0,(a=localStorage.getItem(document.location.href+".gui"))&&(d.load=JSON.parse(a));this.__closeButton=document.createElement("div");this.__closeButton.innerHTML=A.TEXT_CLOSED;k["default"].addClass(this.__closeButton,A.CLASS_CLOSE_BUTTON);this.domElement.appendChild(this.__closeButton);k["default"].bind(this.__closeButton,
"click",function(){c.closed=!c.closed})}else void 0===d.closed&&(d.closed=!0),a=document.createTextNode(d.name),k["default"].addClass(a,"controller-name"),a=h(c,a),k["default"].addClass(this.__ul,A.CLASS_CLOSED),k["default"].addClass(a,"title"),k["default"].bind(a,"click",function(a){return a.preventDefault(),c.closed=!c.closed,!1}),d.closed||(this.closed=!1);d.autoPlace&&(r["default"].isUndefined(d.parent)&&(M&&(E=document.createElement("div"),k["default"].addClass(E,"dg"),k["default"].addClass(E,
A.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(E),M=!1),E.appendChild(this.domElement),k["default"].addClass(this.domElement,A.CLASS_AUTO_PLACE)),this.parent||t(c,d.width));this.__resizeHandler=function(){c.onResize()};k["default"].bind(window,"resize",this.__resizeHandler);k["default"].bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler);k["default"].bind(this.__ul,"transitionend",this.__resizeHandler);k["default"].bind(this.__ul,"oTransitionEnd",this.__resizeHandler);this.onResize();
d.resizable&&x(this);this.saveToLocalStorageIfPossible=f=function(){D&&"true"===localStorage.getItem(document.location.href+".isLocal")&&localStorage.setItem(document.location.href+".gui",JSON.stringify(c.getSaveObject()))};d.parent||b()};u.toggleHide=function(){L=!L;r["default"].each(N,function(a){a.domElement.style.display=L?"none":""})};u.CLASS_AUTO_PLACE="a";u.CLASS_AUTO_PLACE_CONTAINER="ac";u.CLASS_MAIN="main";u.CLASS_CONTROLLER_ROW="cr";u.CLASS_TOO_TALL="taller-than-window";u.CLASS_CLOSED="closed";
u.CLASS_CLOSE_BUTTON="close-button";u.CLASS_DRAG="drag";u.DEFAULT_WIDTH=245;u.TEXT_CLOSED="Close Controls";u.TEXT_OPEN="Open Controls";u._keydownHandler=function(a){"text"===document.activeElement.type||72!==a.which&&72!==a.keyCode||u.toggleHide()};k["default"].bind(window,"keydown",u._keydownHandler,!1);r["default"].extend(u.prototype,{add:function(a,b){return f(this,a,b,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(a,b){return f(this,a,b,{color:!0})},remove:function(a){this.__ul.removeChild(a.__li);
this.__controllers.splice(this.__controllers.indexOf(a),1);var b=this;r["default"].defer(function(){b.onResize()})},destroy:function(){this.autoPlace&&E.removeChild(this.domElement);k["default"].unbind(window,"keydown",u._keydownHandler,!1);k["default"].unbind(window,"resize",this.__resizeHandler);this.saveToLocalStorageIfPossible&&k["default"].unbind(window,"unload",this.saveToLocalStorageIfPossible)},addFolder:function(a){if(void 0!==this.__folders[a])throw Error('You already have a folder in this GUI by the name "'+
a+'"');var b={name:a,parent:this};b.autoPlace=this.autoPlace;this.load&&this.load.folders&&this.load.folders[a]&&(b.closed=this.load.folders[a].closed,b.load=this.load.folders[a]);b=new u(b);this.__folders[a]=b;a=h(this,b.domElement);return k["default"].addClass(a,"folder"),b},open:function(){this.closed=!1},close:function(){this.closed=!0},onResize:r["default"].debounce(function(){var a=this.getRoot();if(a.scrollable){var b=k["default"].getOffset(a.__ul).top,c=0;r["default"].each(a.__ul.childNodes,
function(b){a.autoPlace&&b===a.__save_row||(c+=k["default"].getHeight(b))});window.innerHeight-b-20<c?(k["default"].addClass(a.domElement,u.CLASS_TOO_TALL),a.__ul.style.height=window.innerHeight-b-20+"px"):(k["default"].removeClass(a.domElement,u.CLASS_TOO_TALL),a.__ul.style.height="auto")}a.__resize_handle&&r["default"].defer(function(){a.__resize_handle.style.height=a.__ul.offsetHeight+"px"});a.__closeButton&&(a.__closeButton.style.width=a.width+"px")},200),remember:function(){if(r["default"].isUndefined(J)&&
(J=new v["default"],J.domElement.innerHTML=z["default"]),this.parent)throw Error("You can only call remember on a top level GUI.");var a=this;r["default"].each(Array.prototype.slice.call(arguments),function(b){0===a.__rememberedObjects.length&&n(a);-1===a.__rememberedObjects.indexOf(b)&&a.__rememberedObjects.push(b)});this.autoPlace&&t(this,this.width)},getRoot:function(){for(var a=this;a.parent;)a=a.parent;return a},getSaveObject:function(){var a=this.load;return a.closed=this.closed,0<this.__rememberedObjects.length&&
(a.preset=this.preset,a.remembered||(a.remembered={}),a.remembered[this.preset]=y(this)),a.folders={},r["default"].each(this.__folders,function(b,c){a.folders[c]=b.getSaveObject()}),a},save:function(){this.load.remembered||(this.load.remembered={});this.load.remembered[this.preset]=y(this);l(this,!1);this.saveToLocalStorageIfPossible()},saveAs:function(a){this.load.remembered||(this.load.remembered={},this.load.remembered[I]=y(this,!0));this.load.remembered[a]=y(this);this.preset=a;p(this,a,!0);this.saveToLocalStorageIfPossible()},
revert:function(b){r["default"].each(this.__controllers,function(c){this.getRoot().load.remembered?a(b||this.getRoot(),c):c.setValue(c.initialValue);c.__onFinishChange&&c.__onFinishChange.call(c,c.getValue())},this);r["default"].each(this.__folders,function(a){a.revert(a)});b||l(this.getRoot(),!1)},listen:function(a){var b=0===this.__listening.length;this.__listening.push(a);b&&B(this.__listening)},updateDisplay:function(){r["default"].each(this.__controllers,function(a){a.updateDisplay()});r["default"].each(this.__folders,
function(a){a.updateDisplay()})}});d.exports=u},function(d,e){d.exports={load:function(c,b){var d=b||document,e=d.createElement("link");e.type="text/css";e.rel="stylesheet";e.href=c;d.getElementsByTagName("head")[0].appendChild(e)},inject:function(c,b){var d=b||document,e=document.createElement("style");e.type="text/css";e.innerHTML=c;d=d.getElementsByTagName("head")[0];try{d.appendChild(e)}catch(g){}}}},function(d,e){d.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(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}e.__esModule=!0;d=c(10);var h=b(d);d=c(13);var l=b(d);d=c(14);var g=b(d);d=c(11);var a=b(d);d=c(15);var f=b(d);d=c(8);var p=b(d);c=c(5);var n=b(c);e["default"]=function(b,c,d,e,w){var q=b[c];return n["default"].isArray(d)||n["default"].isObject(d)?new h["default"](b,c,d):n["default"].isNumber(q)?n["default"].isNumber(d)&&n["default"].isNumber(e)?n["default"].isNumber(w)?new g["default"](b,c,d,e,w):new g["default"](b,c,d,e):n["default"].isNumber(w)?
new l["default"](b,c,{min:d,max:e,step:w}):new l["default"](b,c,{min:d,max:e}):n["default"].isString(q)?new a["default"](b,c):n["default"].isFunction(q)?new f["default"](b,c,""):n["default"].isBoolean(q)?new p["default"](b,c):null}},function(d,e){function c(b){setTimeout(b,1E3/60)}e.__esModule=!0;e["default"]=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||c},function(d,e,c){e.__esModule=
!0;var b=(d=c(9))&&d.__esModule?d:{"default":d},h=(c=c(5))&&c.__esModule?c:{"default":c};c=function(){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this.backgroundElement=document.createElement("div");h["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"});b["default"].makeFullscreen(this.backgroundElement);
this.backgroundElement.style.position="fixed";this.domElement=document.createElement("div");h["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 d=this;b["default"].bind(this.backgroundElement,"click",function(){d.hide()})}return c.prototype.show=
function(){var b=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();h["default"].defer(function(){b.backgroundElement.style.opacity=1;b.domElement.style.opacity=1;b.domElement.style.webkitTransform="scale(1)"})},c.prototype.hide=function(){var c=this,a=function p(){c.domElement.style.display="none";c.backgroundElement.style.display="none";b["default"].unbind(c.domElement,
"webkitTransitionEnd",p);b["default"].unbind(c.domElement,"transitionend",p);b["default"].unbind(c.domElement,"oTransitionEnd",p)};b["default"].bind(this.domElement,"webkitTransitionEnd",a);b["default"].bind(this.domElement,"transitionend",a);b["default"].bind(this.domElement,"oTransitionEnd",a);this.backgroundElement.style.opacity=0;this.domElement.style.opacity=0;this.domElement.style.webkitTransform="scale(1.1)"},c.prototype.layout=function(){this.domElement.style.left=window.innerWidth/2-b["default"].getWidth(this.domElement)/
2+"px";this.domElement.style.top=window.innerHeight/2-b["default"].getHeight(this.domElement)/2+"px"},c}();e["default"]=c},function(d,e,c){e=d.exports=c(24)();e.push([d.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{-webkit-transition:opacity .1s linear;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{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;border:0;position:absolute;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-x:hidden}.dg.a.has-save>ul{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{position:fixed;top:0;z-index:1002}.dg li{-webkit-transition:height .1s ease-out;transition:height .1s ease-out}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;overflow:hidden;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{cursor:pointer;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}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%}.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:9px}.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 .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(d,e){d.exports=function(){var c=[];return c.toString=function(){for(var b=[],c=0;c<this.length;c++){var d=this[c];d[2]?b.push("@media "+d[2]+"{"+d[1]+"}"):b.push(d[1])}return b.join("")},c.i=function(b,d){"string"==typeof b&&(b=[[null,b,""]]);for(var e={},g=0;g<this.length;g++){var a=this[g][0];"number"==typeof a&&(e[a]=!0)}for(g=0;g<b.length;g++)a=b[g],"number"==typeof a[0]&&e[a[0]]||(d&&!a[2]?a[2]=d:d&&(a[2]="("+a[2]+") and ("+d+")"),c.push(a))},c}}])});