!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define([],t):"object"==typeofexports?exports.dat=t():e.dat=t()}(this,function(){returnfunction(e){functiont(o){if(n[o])returnn[o].exports;vari=n[o]={exports:{},id:o,loaded:!1};returne[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}varn={};returnt.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";functiono(e){returne&&e.__esModule?e:{default:e}}t.__esModule=!0;vari=n(1),a=o(i);t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";functiono(e){returne&&e.__esModule?e:{default:e}}t.__esModule=!0;vari=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";functiono(e){returne&&e.__esModule?e:{default:e}}functioni(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiona(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}})}functionl(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;varr=n(3),d=o(r),u=n(6),s=o(u),f=n(4),_=o(f),c=n(5),p=o(c),h=function(){functione(){if(i(this,e),this.__state=d.default.apply(this,arguments),this.__state===!1)thrownewError("Failed to interpret color arguments");this.__state.a=this.__state.a||1}returne.prototype.toString=function(){return(0,_.default)(this)},e.prototype.toHexString=function(){return(0,_.default)(this,!0)},e.prototype.toOriginal=function(){returnthis.__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)thrownewError("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){vart=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(){returnthis.__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";functiono(e){returne&&e.__esModule?e:{default:e}}t.__esModule=!0;vari=n(4),a=o(i),l=n(5),r=o(l),d=[{litmus:r.default.isString,conversions:{THREE_CHAR_HEX:{read:function(e){vart=e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);returnnull!==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){vart=e.match(/
l(e,f,a),e.__controllers.push(a),a}functionu(e,t,n,o){if(void0===t[n])thrownewError('Object "'+t+'" has no property "'+n+'"');vara=void0;if(o.color)a=newU.default(t,n);else{vard=[t,n].concat(o.factoryArgs);a=A.default.apply(e,d)}o.beforeinstanceofT.default&&(o.before=o.before.__li),r(e,a),q.default.addClass(a.domElement,"c");varu=document.createElement("span");q.default.addClass(u,"property-name"),u.innerHTML=a.property;vars=document.createElement("div");s.appendChild(u),s.appendChild(a.domElement);varf=i(e,s,o.before);returnq.default.addClass(f,_e.CLASS_CONTROLLER_ROW),ainstanceofF.default?q.default.addClass(f,"color"):ainstanceofU.default?q.default.addClass(f,"color"):q.default.addClass(f,v(a.getValue())),l(e,f,a),e.__controllers.push(a),a}functions(e,t,n,o){if(void0===t[n])thrownewError('Object "'+t+'" has no property "'+n+'"');vara=void0;if(o.color)a=newX.default(t,n);else{vard=[t,n].concat(o.factoryArgs);a=A.default.apply(e,d)}o.beforeinstanceofT.default&&(o.before=o.before.__li),r(e,a),q.default.addClass(a.domElement,"c");varu=document.createElement("span");q.default.addClass(u,"property-name"),u.innerHTML=a.property;vars=document.createElement("div");s.appendChild(u),s.appendChild(a.domElement);varf=i(e,s,o.before);returnq.default.addClass(f,_e.CLASS_CONTROLLER_ROW),ainstanceofF.default?q.default.addClass(f,"color"):ainstanceofU.default?q.default.addClass(f,"color"):q.default.addClass(f,v(a.getValue())),l(e,f,a),e.__controllers.push(a),a}functionf(e,t,n,o){if(void0===t[n])thrownewError('Object "'+t+'" has no property "'+n+'"');vara=void0;if(o.color)a=newF.default(t,n);else{vard=[t,n].concat(o.factoryArgs);a=A.default.apply(e,d)}o.beforeinstanceofT.default&&(o.before=o.before.__li),r(e,a),q.default.addClass(a.domElement,"c");varu=document.createElement("span");q.default.addClass(u,"property-name"),u.innerHTML=a.property;vars=document.createElement("div");s.appendChild(u),s.appendChild(a.domElement);varf=i(e,s,o.before);returnq.default.addClass(f,_e.CLASS_CONTROLLER_ROW),ainstanceofF.default?q.default.addClass(f,"color"):ainstanceofz.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){returndocument.location.href+"."+t}functionc(e,t,n){varo=document.createElement("option");o.innerHTML=t,o.value=t,e.__preset_select.appendChild(o),n&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}functionp(e,t){t.style.display=e.useLocalStorage?"block":"none"}functionh(e){vart=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");varn=document.createElement("span");n.innerHTML=" ",q.default.addClass(n,"button gears");varo=document.createElement("span");o.innerHTML="Save",q.default.addClass(o,"button"),q.default.addClass(o,"save");vari=document.createElement("span");i.innerHTML="New",q.default.addClass(i,"button"),q.default.addClass(i,"save-as");vara=document.createElement("span");a.innerHTML="Revert",q.default.addClass(a,"button"),q.default.addClass(a,"revert");varl=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(vart=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){varr=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)})}vars=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