mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
1 line
315 KiB
Plaintext
1 line
315 KiB
Plaintext
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap ffaeb74ecc331ec589d8","webpack:///../index.js","webpack:///./dat/index.js","webpack:///./dat/color/Color.js","webpack:///./dat/color/interpret.js","webpack:///./dat/color/toString.js","webpack:///./dat/utils/common.js","webpack:///./dat/color/math.js","webpack:///./dat/controllers/Controller.js","webpack:///./dat/controllers/BooleanController.js","webpack:///./dat/dom/dom.js","webpack:///./dat/controllers/OptionController.js","webpack:///./dat/controllers/StringController.js","webpack:///./dat/controllers/NumberController.js","webpack:///./dat/controllers/NumberControllerBox.js","webpack:///./dat/controllers/NumberControllerSlider.js","webpack:///./dat/controllers/FunctionController.js","webpack:///./dat/controllers/ColorController.js","webpack:///./dat/controllers/BgColorController.js","webpack:///./dat/controllers/NgColorController.js","webpack:///./dat/controllers/GtColorController.js","webpack:///./dat/controllers/HSVColorController.js","webpack:///./dat/gui/GUI.js","webpack:///./dat/utils/css.js","webpack:///./dat/gui/saveDialogue.html","webpack:///./dat/controllers/ControllerFactory.js","webpack:///./dat/utils/requestAnimationFrame.js","webpack:///./dat/dom/CenteredDiv.js","webpack:///./dat/gui/style.scss","webpack:///../~/css-loader/lib/css-base.js"],"names":["color","Color","math","interpret","controllers","Controller","BooleanController","OptionController","StringController","NumberController","NumberControllerBox","NumberControllerSlider","FunctionController","ColorController","BgColorController","NgColorController","HSVColorController","GtColorController","dom","gui","GUI","__state","apply","arguments","Error","a","toString","toHexString","toOriginal","conversion","write","defineRGBComponent","target","component","componentHexIndex","Object","defineProperty","get","space","recalculateRGB","set","v","defineHSVComponent","recalculateHSV","component_from_hex","hex","extend","hsv_to_rgb","h","s","result","rgb_to_hsv","r","g","b","isNaN","isUndefined","COMPONENTS","prototype","rgb_to_hex","INTERPRETATIONS","litmus","isString","conversions","THREE_CHAR_HEX","read","original","test","match","parseInt","SIX_CHAR_HEX","CSS_RGB","parseFloat","CSS_RGBA","isNumber","HEX","conversionName","isArray","RGB_ARRAY","length","RGBA_ARRAY","isObject","RGBA_OBJ","RGB_OBJ","HSVA_OBJ","HSV_OBJ","toReturn","toArray","each","family","BREAK","forceCSSHex","colorFormat","Math","round","toFixed","str","ARR_EACH","Array","forEach","ARR_SLICE","slice","Common","call","obj","keys","key","bind","defaults","compose","toCall","args","i","itr","scope","l","defer","fnc","setTimeout","debounce","func","threshold","callImmediately","timeout","delayed","callNow","clearTimeout","undefined","isNull","constructor","isBoolean","isFunction","tmpComponent","ColorMath","hi","floor","f","p","q","t","c","min","max","delta","NaN","hex_with_component","componentIndex","value","object","property","initialValue","domElement","document","createElement","__onChange","__onFinishChange","onChange","onFinishChange","setValue","newValue","updateDisplay","getValue","isModified","_this","__prev","__checkbox","setAttribute","appendChild","checked","EVENT_MAP","HTMLEvents","MouseEvents","KeyboardEvents","EVENT_MAP_INV","k","e","CSS_VALUE_PIXELS","cssValueToPixels","val","makeSelectable","elem","selectable","style","onselectstart","MozUserSelect","KhtmlUserSelect","unselectable","makeFullscreen","hor","vert","vertical","horizontal","position","left","right","top","bottom","fakeEvent","eventType","pars","aux","params","className","evt","createEvent","clientX","x","clientY","y","initMouseEvent","bubbles","cancelable","window","clickCount","init","initKeyboardEvent","initKeyEvent","ctrlKey","altKey","shiftKey","metaKey","keyCode","charCode","initEvent","dispatchEvent","event","newBool","bool","addEventListener","attachEvent","unbind","removeEventListener","detachEvent","addClass","classes","split","indexOf","push","join","replace","removeClass","removeAttribute","index","splice","hasClass","RegExp","getWidth","getComputedStyle","width","getHeight","height","getOffset","el","offset","offsetParent","offsetLeft","offsetTop","isActive","activeElement","type","href","opts","options","__select","map","element","opt","innerHTML","desiredValue","selectedIndex","__input","onBlur","blur","numDecimals","_x","_params","__min","__max","__step","step","__impliedStep","pow","log","abs","LN10","__precision","_v","roundToDecimal","decimals","tenTo","__truncationSuspended","prevY","attempted","onFinish","onMouseDrag","diff","onMouseUp","onMouseDown","i1","i2","o1","o2","__background","__foreground","preventDefault","bgRect","getBoundingClientRect","pct","text","__button","fire","__color","__temp","__selector","__saturation_field","__field_knob","__field_knob_border","__hue_knob","__hue_field","__input_textShadow","valueField","padding","backgroundColor","boxShadow","border","borderRadius","zIndex","borderRight","marginRight","display","cursor","background","linearGradient","hueGradient","outline","textAlign","fontWeight","textShadow","fieldDown","setH","fieldUpH","setSV","fieldUpSV","fieldRect","mismatch","flip","_flip","marginLeft","marginTop","vendors","vendor","cssText","setValue2","value2","__color2","__temp2","__saturation_field2","__field_knob2","__field_knob_border2","__hue_knob2","__hue_field2","__input2","__input_textShadow2","onBlur2","valueField2","fieldDown2","setH2","fieldUpH2","setSV2","fieldUpSV2","onFinish2","flip2","_flip2","__field_knob3","__field_knob_border3","__hsv_field","__hsv_field2","__hsv_field3","__hsv_fieldLabel","__hsv_fieldLabel2","__hsv_fieldLabel3","font","setS","fieldUpS","setV","fieldUpV","inject","CSS_NAMESPACE","HIDE_KEY_CODE","CLOSE_BUTTON_HEIGHT","DEFAULT_DEFAULT_PRESET_NAME","SUPPORTS_LOCAL_STORAGE","localStorage","SAVE_DIALOGUE","autoPlaceVirgin","autoPlaceContainer","hide","hideableGuis","__ul","__folders","__controllers","__rememberedObjects","__rememberedObjectIndecesToControllers","__listening","closeOnTop","autoPlace","DEFAULT_WIDTH","resizable","hideable","load","preset","parent","scrollable","useLocalStorage","getItem","getLocalStorageHash","saveToLocalStorage","defineProperties","getRoot","setPresetSelectIndex","revert","setWidth","name","titleRowName","closed","CLASS_CLOSED","onResize","__closeButton","TEXT_OPEN","TEXT_CLOSED","setItem","CLASS_MAIN","savedGui","JSON","parse","CLASS_CLOSE_BUTTON","CLASS_CLOSE_TOP","insertBefore","childNodes","CLASS_CLOSE_BOTTOM","createTextNode","titleRow","addRow","onClickTitle","CLASS_AUTO_PLACE_CONTAINER","body","CLASS_AUTO_PLACE","__resizeHandler","onResizeDebounced","addResizeHandle","stringify","getSaveObject","saveToLocalStorageIfPossible","resetWidth","root","toggleHide","CLASS_CONTROLLER_ROW","CLASS_TOO_TALL","CLASS_DRAG","_keydownHandler","which","add","factoryArgs","addColor","addBgColor","addbg","addNgColor","addng","addGtColor","addgt","addHSVColor","addhsv","remove","controller","removeChild","__li","destroy","addFolder","newGuiParams","folders","li","open","close","node","__save_row","innerHeight","__resize_handle","offsetHeight","remember","addSaveMenu","remembered","getCurrentPreset","save","markPresetModified","saveAs","presetName","addPresetOption","recallSavedValue","folder","listen","updateDisplays","newDom","liBefore","modified","__preset_select","augmentController","__gui","nextSibling","nextElementSibling","before","firstElementChild","box","method","pc","pb","returned","oldName","wasListening","newController","stopPropagation","borderLeftColor","matchedIndex","controllerMap","presetMap","concat","container","location","setSelected","showHideExplain","explain","div","firstChild","gears","button","button2","button3","select","getElementById","localStorageCheckBox","saveLocally","newConstructorTextArea","show","focus","prompt","pmouseX","drag","dragStop","dragStart","w","useInitialValues","savedValues","controllerArray","module","exports","url","indoc","doc","link","rel","getElementsByTagName","css","injected","head","ControllerFactory","requestAnimationFrame","callback","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","CenteredDiv","backgroundElement","opacity","WebkitTransition","transition","webkitTransform","layout","innerWidth"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;ACzBA;;;;;;oCAbA;;;;;;;;;;;;;;;;;;;;;;;ACaA;;;;AACA;;;;AACA;;;;AAEA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AAEA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F,EAAE,qBAAqB,qCAAqC,EAAE,mBAAmB,6BAA6B,EAAE,sBAAsB,qCAAqC,EAAE,oBAAoB,qCAAqC,EAAE,uCAAuC,uBAAuB,EAAE,oBAAoB,qCAAqC,EAAE,uCAAuC,uBAAuB,EAAE,mDAAmD,uBAAuB,EAAE,6BAA6B,0BAA0B,oBAAoB,EAAE,qCAAqC,4BAA4B,EAAE,qCAAqC,4BAA4B,oBAAoB,EAAE,oBAAoB,0BAA0B,wBAAwB,EAAE,uBAAuB,0BAA0B,sBAAsB,EAAE,0BAA0B,0BAA0B,EAAE,uCAAuC,4BAA4B,EAAE;;AAEtjR;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAgB,iBAAiB;AACjC;AACA;AACA,yCAAwC,gBAAgB;AACxD,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,aAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"dat.gui.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"dat\"] = factory();\n\telse\n\t\troot[\"dat\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ffaeb74ecc331ec589d8","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport dat from './src/dat/index';\n\nexport default dat;\n\n\n\n// WEBPACK FOOTER //\n// ../index.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Color from './color/Color';\nimport math from './color/math';\nimport interpret from './color/interpret';\n\nimport Controller from './controllers/Controller';\nimport BooleanController from './controllers/BooleanController';\nimport OptionController from './controllers/OptionController';\nimport StringController from './controllers/StringController';\nimport NumberController from './controllers/NumberController';\nimport NumberControllerBox from './controllers/NumberControllerBox';\nimport NumberControllerSlider from './controllers/NumberControllerSlider';\nimport FunctionController from './controllers/FunctionController';\nimport ColorController from './controllers/ColorController';\nimport BgColorController from './controllers/BgColorController';\nimport NgColorController from './controllers/NgColorController';\nimport GtColorController from './controllers/GtColorController';\nimport HSVColorController from './controllers/HSVColorController';\n\nimport dom from './dom/dom';\nimport GUI from './gui/GUI';\n\nexport default {\n color: {\n Color: Color,\n math: math,\n interpret: interpret\n },\n\n controllers: {\n Controller: Controller,\n BooleanController: BooleanController,\n OptionController: OptionController,\n StringController: StringController,\n NumberController: NumberController,\n NumberControllerBox: NumberControllerBox,\n NumberControllerSlider: NumberControllerSlider,\n FunctionController: FunctionController,\n ColorController: ColorController,\n BgColorController: BgColorController,\n NgColorController: NgColorController,\n HSVColorController: HSVColorController,\n GtColorController: GtColorController\n },\n\n dom: {\n dom: dom\n },\n\n gui: {\n GUI: GUI\n },\n\n GUI: GUI\n};\n\n\n\n// WEBPACK FOOTER //\n// ./dat/index.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport interpret from './interpret';\nimport math from './math';\nimport colorToString from './toString';\nimport common from '../utils/common';\n\nclass Color {\n constructor() {\n this.__state = interpret.apply(this, arguments);\n\n if (this.__state === false) {\n throw new Error('Failed to interpret color arguments');\n }\n\n this.__state.a = this.__state.a || 1;\n }\n\n toString() {\n return colorToString(this);\n }\n\n toHexString() {\n return colorToString(this, true);\n }\n\n toOriginal() {\n return this.__state.conversion.write(this);\n }\n}\n\nfunction defineRGBComponent(target, component, componentHexIndex) {\n Object.defineProperty(target, component, {\n get: function() {\n if (this.__state.space === 'RGB') {\n return this.__state[component];\n }\n\n Color.recalculateRGB(this, component, componentHexIndex);\n\n return this.__state[component];\n },\n\n set: function(v) {\n if (this.__state.space !== 'RGB') {\n Color.recalculateRGB(this, component, componentHexIndex);\n this.__state.space = 'RGB';\n }\n\n this.__state[component] = v;\n }\n });\n}\n\nfunction defineHSVComponent(target, component) {\n Object.defineProperty(target, component, {\n get: function() {\n if (this.__state.space === 'HSV') {\n return this.__state[component];\n }\n\n Color.recalculateHSV(this);\n\n return this.__state[component];\n },\n\n set: function(v) {\n if (this.__state.space !== 'HSV') {\n Color.recalculateHSV(this);\n this.__state.space = 'HSV';\n }\n\n this.__state[component] = v;\n }\n });\n}\n\n\nColor.recalculateRGB = function(color, component, componentHexIndex) {\n if (color.__state.space === 'HEX') {\n color.__state[component] = math.component_from_hex(color.__state.hex, componentHexIndex);\n } else if (color.__state.space === 'HSV') {\n common.extend(color.__state, math.hsv_to_rgb(color.__state.h, color.__state.s, color.__state.v));\n } else {\n throw new Error('Corrupted color state');\n }\n};\n\nColor.recalculateHSV = function(color) {\n const result = math.rgb_to_hsv(color.r, color.g, color.b);\n\n common.extend(color.__state,\n {\n s: result.s,\n v: result.v\n }\n );\n\n if (!common.isNaN(result.h)) {\n color.__state.h = result.h;\n } else if (common.isUndefined(color.__state.h)) {\n color.__state.h = 0;\n }\n};\n\nColor.COMPONENTS = ['r', 'g', 'b', 'h', 's', 'v', 'hex', 'a'];\n\ndefineRGBComponent(Color.prototype, 'r', 2);\ndefineRGBComponent(Color.prototype, 'g', 1);\ndefineRGBComponent(Color.prototype, 'b', 0);\n\ndefineHSVComponent(Color.prototype, 'h');\ndefineHSVComponent(Color.prototype, 's');\ndefineHSVComponent(Color.prototype, 'v');\n\nObject.defineProperty(Color.prototype, 'a', {\n get: function() {\n return this.__state.a;\n },\n\n set: function(v) {\n this.__state.a = v;\n }\n});\n\nObject.defineProperty(Color.prototype, 'hex', {\n get: function() {\n if (!this.__state.space !== 'HEX') {\n this.__state.hex = math.rgb_to_hex(this.r, this.g, this.b);\n }\n\n return this.__state.hex;\n },\n\n set: function(v) {\n this.__state.space = 'HEX';\n this.__state.hex = v;\n }\n});\n\nexport default Color;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/color/Color.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport toString from './toString';\nimport common from '../utils/common';\n\nconst INTERPRETATIONS = [\n // Strings\n {\n litmus: common.isString,\n conversions: {\n THREE_CHAR_HEX: {\n read: function(original) {\n const test = original.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);\n if (test === null) {\n return false;\n }\n\n return {\n space: 'HEX',\n hex: parseInt(\n '0x' +\n test[1].toString() + test[1].toString() +\n test[2].toString() + test[2].toString() +\n test[3].toString() + test[3].toString(), 0)\n };\n },\n\n write: toString\n },\n\n SIX_CHAR_HEX: {\n read: function(original) {\n const test = original.match(/^#([A-F0-9]{6})$/i);\n if (test === null) {\n return false;\n }\n\n return {\n space: 'HEX',\n hex: parseInt('0x' + test[1].toString(), 0)\n };\n },\n\n write: toString\n },\n\n CSS_RGB: {\n read: function(original) {\n const test = original.match(/^rgb\\(\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*\\)/);\n if (test === null) {\n return false;\n }\n\n return {\n space: 'RGB',\n r: parseFloat(test[1]),\n g: parseFloat(test[2]),\n b: parseFloat(test[3])\n };\n },\n\n write: toString\n },\n\n CSS_RGBA: {\n read: function(original) {\n const test = original.match(/^rgba\\(\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*\\)/);\n if (test === null) {\n return false;\n }\n\n return {\n space: 'RGB',\n r: parseFloat(test[1]),\n g: parseFloat(test[2]),\n b: parseFloat(test[3]),\n a: parseFloat(test[4])\n };\n },\n\n write: toString\n }\n }\n },\n\n // Numbers\n {\n litmus: common.isNumber,\n\n conversions: {\n\n HEX: {\n read: function(original) {\n return {\n space: 'HEX',\n hex: original,\n conversionName: 'HEX'\n };\n },\n\n write: function(color) {\n return color.hex;\n }\n }\n\n }\n\n },\n\n // Arrays\n {\n litmus: common.isArray,\n conversions: {\n RGB_ARRAY: {\n read: function(original) {\n if (original.length !== 3) {\n return false;\n }\n\n return {\n space: 'RGB',\n r: original[0],\n g: original[1],\n b: original[2]\n };\n },\n\n write: function(color) {\n return [color.r, color.g, color.b];\n }\n },\n\n RGBA_ARRAY: {\n read: function(original) {\n if (original.length !== 4) return false;\n return {\n space: 'RGB',\n r: original[0],\n g: original[1],\n b: original[2],\n a: original[3]\n };\n },\n\n write: function(color) {\n return [color.r, color.g, color.b, color.a];\n }\n }\n }\n },\n\n // Objects\n {\n litmus: common.isObject,\n conversions: {\n\n RGBA_OBJ: {\n read: function(original) {\n if (common.isNumber(original.r) &&\n common.isNumber(original.g) &&\n common.isNumber(original.b) &&\n common.isNumber(original.a)) {\n return {\n space: 'RGB',\n r: original.r,\n g: original.g,\n b: original.b,\n a: original.a\n };\n }\n return false;\n },\n\n write: function(color) {\n return {\n r: color.r,\n g: color.g,\n b: color.b,\n a: color.a\n };\n }\n },\n\n RGB_OBJ: {\n read: function(original) {\n if (common.isNumber(original.r) &&\n common.isNumber(original.g) &&\n common.isNumber(original.b)) {\n return {\n space: 'RGB',\n r: original.r,\n g: original.g,\n b: original.b\n };\n }\n return false;\n },\n\n write: function(color) {\n return {\n r: color.r,\n g: color.g,\n b: color.b\n };\n }\n },\n\n HSVA_OBJ: {\n read: function(original) {\n if (common.isNumber(original.h) &&\n common.isNumber(original.s) &&\n common.isNumber(original.v) &&\n common.isNumber(original.a)) {\n return {\n space: 'HSV',\n h: original.h,\n s: original.s,\n v: original.v,\n a: original.a\n };\n }\n return false;\n },\n\n write: function(color) {\n return {\n h: color.h,\n s: color.s,\n v: color.v,\n a: color.a\n };\n }\n },\n\n HSV_OBJ: {\n read: function(original) {\n if (common.isNumber(original.h) &&\n common.isNumber(original.s) &&\n common.isNumber(original.v)) {\n return {\n space: 'HSV',\n h: original.h,\n s: original.s,\n v: original.v\n };\n }\n return false;\n },\n\n write: function(color) {\n return {\n h: color.h,\n s: color.s,\n v: color.v\n };\n }\n }\n }\n }\n];\n\nlet result;\nlet toReturn;\n\nconst interpret = function() {\n toReturn = false;\n\n const original = arguments.length > 1 ? common.toArray(arguments) : arguments[0];\n common.each(INTERPRETATIONS, function(family) {\n if (family.litmus(original)) {\n common.each(family.conversions, function(conversion, conversionName) {\n result = conversion.read(original);\n\n if (toReturn === false && result !== false) {\n toReturn = result;\n result.conversionName = conversionName;\n result.conversion = conversion;\n return common.BREAK;\n }\n });\n\n return common.BREAK;\n }\n });\n\n return toReturn;\n};\n\nexport default interpret;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/color/interpret.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nexport default function(color, forceCSSHex) {\n const colorFormat = color.__state.conversionName.toString();\n\n const r = Math.round(color.r);\n const g = Math.round(color.g);\n const b = Math.round(color.b);\n const a = color.a;\n const h = Math.round(color.h);\n const s = color.s.toFixed(1);\n const v = color.v.toFixed(1);\n\n if (forceCSSHex || (colorFormat === 'THREE_CHAR_HEX') || (colorFormat === 'SIX_CHAR_HEX')) {\n let str = color.hex.toString(16);\n while (str.length < 6) {\n str = '0' + str;\n }\n return '#' + str;\n } else if (colorFormat === 'CSS_RGB') {\n return 'rgb(' + r + ',' + g + ',' + b + ')';\n } else if (colorFormat === 'CSS_RGBA') {\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n } else if (colorFormat === 'HEX') {\n return '0x' + color.hex.toString(16);\n } else if (colorFormat === 'RGB_ARRAY') {\n return '[' + r + ',' + g + ',' + b + ']';\n } else if (colorFormat === 'RGBA_ARRAY') {\n return '[' + r + ',' + g + ',' + b + ',' + a + ']';\n } else if (colorFormat === 'RGB_OBJ') {\n return '{r:' + r + ',g:' + g + ',b:' + b + '}';\n } else if (colorFormat === 'RGBA_OBJ') {\n return '{r:' + r + ',g:' + g + ',b:' + b + ',a:' + a + '}';\n } else if (colorFormat === 'HSV_OBJ') {\n return '{h:' + h + ',s:' + s + ',v:' + v + '}';\n } else if (colorFormat === 'HSVA_OBJ') {\n return '{h:' + h + ',s:' + s + ',v:' + v + ',a:' + a + '}';\n }\n\n return 'unknown format';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./dat/color/toString.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nconst ARR_EACH = Array.prototype.forEach;\nconst ARR_SLICE = Array.prototype.slice;\n\n/**\n * Band-aid methods for things that should be a lot easier in JavaScript.\n * Implementation and structure inspired by underscore.js\n * http://documentcloud.github.com/underscore/\n */\n\nconst Common = {\n BREAK: {},\n\n extend: function(target) {\n this.each(ARR_SLICE.call(arguments, 1), function(obj) {\n const keys = this.isObject(obj) ? Object.keys(obj) : [];\n keys.forEach(function(key) {\n if (!this.isUndefined(obj[key])) {\n target[key] = obj[key];\n }\n }.bind(this));\n }, this);\n\n return target;\n },\n\n defaults: function(target) {\n this.each(ARR_SLICE.call(arguments, 1), function(obj) {\n const keys = this.isObject(obj) ? Object.keys(obj) : [];\n keys.forEach(function(key) {\n if (this.isUndefined(target[key])) {\n target[key] = obj[key];\n }\n }.bind(this));\n }, this);\n\n return target;\n },\n\n compose: function() {\n const toCall = ARR_SLICE.call(arguments);\n return function() {\n let args = ARR_SLICE.call(arguments);\n for (let i = toCall.length - 1; i >= 0; i--) {\n args = [toCall[i].apply(this, args)];\n }\n return args[0];\n };\n },\n\n each: function(obj, itr, scope) {\n if (!obj) {\n return;\n }\n\n if (ARR_EACH && obj.forEach && obj.forEach === ARR_EACH) {\n obj.forEach(itr, scope);\n } else if (obj.length === obj.length + 0) { // Is number but not NaN\n let key;\n let l;\n for (key = 0, l = obj.length; key < l; key++) {\n if (key in obj && itr.call(scope, obj[key], key) === this.BREAK) {\n return;\n }\n }\n } else {\n for (const key in obj) {\n if (itr.call(scope, obj[key], key) === this.BREAK) {\n return;\n }\n }\n }\n },\n\n defer: function(fnc) {\n setTimeout(fnc, 0);\n },\n\n // if the function is called repeatedly, wait until threshold passes until we execute the function\n debounce: function(func, threshold, callImmediately) {\n let timeout;\n\n return function() {\n const obj = this;\n const args = arguments;\n function delayed() {\n timeout = null;\n if (!callImmediately) func.apply(obj, args);\n }\n\n const callNow = callImmediately || !timeout;\n\n clearTimeout(timeout);\n timeout = setTimeout(delayed, threshold);\n\n if (callNow) {\n func.apply(obj, args);\n }\n };\n },\n\n toArray: function(obj) {\n if (obj.toArray) return obj.toArray();\n return ARR_SLICE.call(obj);\n },\n\n isUndefined: function(obj) {\n return obj === undefined;\n },\n\n isNull: function(obj) {\n return obj === null;\n },\n\n isNaN: function(obj) {\n return isNaN(obj);\n },\n\n isArray: Array.isArray || function(obj) {\n return obj.constructor === Array;\n },\n\n isObject: function(obj) {\n return obj === Object(obj);\n },\n\n isNumber: function(obj) {\n return obj === obj + 0;\n },\n\n isString: function(obj) {\n return obj === obj + '';\n },\n\n isBoolean: function(obj) {\n return obj === false || obj === true;\n },\n\n isFunction: function(obj) {\n return Object.prototype.toString.call(obj) === '[object Function]';\n }\n\n};\n\nexport default Common;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/utils/common.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nlet tmpComponent;\n\nconst ColorMath = {\n hsv_to_rgb: function(h, s, v) {\n const hi = Math.floor(h / 60) % 6;\n\n const f = h / 60 - Math.floor(h / 60);\n const p = v * (1.0 - s);\n const q = v * (1.0 - (f * s));\n const t = v * (1.0 - ((1.0 - f) * s));\n\n const c = [\n [v, t, p],\n [q, v, p],\n [p, v, t],\n [p, q, v],\n [t, p, v],\n [v, p, q]\n ][hi];\n\n return {\n r: c[0] * 255,\n g: c[1] * 255,\n b: c[2] * 255\n };\n },\n\n rgb_to_hsv: function(r, g, b) {\n const min = Math.min(r, g, b);\n const max = Math.max(r, g, b);\n const delta = max - min;\n let h;\n let s;\n\n if (max !== 0) {\n s = delta / max;\n } else {\n return {\n h: NaN,\n s: 0,\n v: 0\n };\n }\n\n if (r === max) {\n h = (g - b) / delta;\n } else if (g === max) {\n h = 2 + (b - r) / delta;\n } else {\n h = 4 + (r - g) / delta;\n }\n h /= 6;\n if (h < 0) {\n h += 1;\n }\n\n return {\n h: h * 360,\n s: s,\n v: max / 255\n };\n },\n\n rgb_to_hex: function(r, g, b) {\n let hex = this.hex_with_component(0, 2, r);\n hex = this.hex_with_component(hex, 1, g);\n hex = this.hex_with_component(hex, 0, b);\n return hex;\n },\n\n component_from_hex: function(hex, componentIndex) {\n return (hex >> (componentIndex * 8)) & 0xFF;\n },\n\n hex_with_component: function(hex, componentIndex, value) {\n return value << (tmpComponent = componentIndex * 8) | (hex & ~(0xFF << tmpComponent));\n }\n};\n\nexport default ColorMath;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/color/math.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n/**\n * @class An \"abstract\" class that represents a given property of an object.\n *\n * @param {Object} object The object to be manipulated\n * @param {string} property The name of the property to be manipulated\n *\n * @member dat.controllers\n */\nclass Controller {\n constructor(object, property) {\n this.initialValue = object[property];\n\n /**\n * Those who extend this class will put their DOM elements in here.\n * @type {DOMElement}\n */\n this.domElement = document.createElement('div');\n\n /**\n * The object to manipulate\n * @type {Object}\n */\n this.object = object;\n\n /**\n * The name of the property to manipulate\n * @type {String}\n */\n this.property = property;\n\n /**\n * The function to be called on change.\n * @type {Function}\n * @ignore\n */\n this.__onChange = undefined;\n\n /**\n * The function to be called on finishing change.\n * @type {Function}\n * @ignore\n */\n this.__onFinishChange = undefined;\n }\n\n /**\n * Specify that a function fire every time someone changes the value with\n * this Controller.\n *\n * @param {Function} fnc This function will be called whenever the value\n * is modified via this Controller.\n * @returns {Controller} this\n */\n onChange(fnc) {\n this.__onChange = fnc;\n return this;\n }\n\n /**\n * Specify that a function fire every time someone \"finishes\" changing\n * the value wih this Controller. Useful for values that change\n * incrementally like numbers or strings.\n *\n * @param {Function} fnc This function will be called whenever\n * someone \"finishes\" changing the value via this Controller.\n * @returns {Controller} this\n */\n onFinishChange(fnc) {\n this.__onFinishChange = fnc;\n return this;\n }\n\n /**\n * Change the value of <code>object[property]</code>\n *\n * @param {Object} newValue The new value of <code>object[property]</code>\n */\n setValue(newValue) {\n this.object[this.property] = newValue;\n if (this.__onChange) {\n this.__onChange.call(this, newValue);\n }\n\n this.updateDisplay();\n return this;\n }\n\n /**\n * Gets the value of <code>object[property]</code>\n *\n * @returns {Object} The current value of <code>object[property]</code>\n */\n getValue() {\n return this.object[this.property];\n }\n\n /**\n * Refreshes the visual display of a Controller in order to keep sync\n * with the object's current value.\n * @returns {Controller} this\n */\n updateDisplay() {\n return this;\n }\n\n /**\n * @returns {Boolean} true if the value has deviated from initialValue\n */\n isModified() {\n return this.initialValue !== this.getValue();\n }\n}\n\nexport default Controller;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/Controller.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\n\n/**\n * @class Provides a checkbox input to alter the boolean property of an object.\n * @extends dat.controllers.Controller\n *\n * @param {Object} object The object to be manipulated\n * @param {string} property The name of the property to be manipulated\n *\n * @member dat.controllers\n */\nclass BooleanController extends Controller {\n constructor(object, property) {\n super(object, property);\n\n const _this = this;\n this.__prev = this.getValue();\n\n this.__checkbox = document.createElement('input');\n this.__checkbox.setAttribute('type', 'checkbox');\n\n function onChange() {\n _this.setValue(!_this.__prev);\n }\n\n dom.bind(this.__checkbox, 'change', onChange, false);\n\n this.domElement.appendChild(this.__checkbox);\n\n // Match original value\n this.updateDisplay();\n }\n\n setValue(v) {\n const toReturn = super.setValue(v);\n if (this.__onFinishChange) {\n this.__onFinishChange.call(this, this.getValue());\n }\n this.__prev = this.getValue();\n return toReturn;\n }\n\n updateDisplay() {\n if (this.getValue() === true) {\n this.__checkbox.setAttribute('checked', 'checked');\n this.__checkbox.checked = true;\n this.__prev = true;\n } else {\n this.__checkbox.checked = false;\n this.__prev = false;\n }\n\n return super.updateDisplay();\n }\n}\n\nexport default BooleanController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/BooleanController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport common from '../utils/common';\n\nconst EVENT_MAP = {\n HTMLEvents: ['change'],\n MouseEvents: ['click', 'mousemove', 'mousedown', 'mouseup', 'mouseover'],\n KeyboardEvents: ['keydown']\n};\n\nconst EVENT_MAP_INV = {};\ncommon.each(EVENT_MAP, function(v, k) {\n common.each(v, function(e) {\n EVENT_MAP_INV[e] = k;\n });\n});\n\nconst CSS_VALUE_PIXELS = /(\\d+(\\.\\d+)?)px/;\n\nfunction cssValueToPixels(val) {\n if (val === '0' || common.isUndefined(val)) {\n return 0;\n }\n\n const match = val.match(CSS_VALUE_PIXELS);\n\n if (!common.isNull(match)) {\n return parseFloat(match[1]);\n }\n\n // TODO ...ems? %?\n\n return 0;\n}\n\n/**\n * @namespace\n * @member dat.dom\n */\nconst dom = {\n\n /**\n *\n * @param elem\n * @param selectable\n */\n makeSelectable: function(elem, selectable) {\n if (elem === undefined || elem.style === undefined) return;\n\n elem.onselectstart = selectable ? function() {\n return false;\n } : function() {\n };\n\n elem.style.MozUserSelect = selectable ? 'auto' : 'none';\n elem.style.KhtmlUserSelect = selectable ? 'auto' : 'none';\n elem.unselectable = selectable ? 'on' : 'off';\n },\n\n /**\n *\n * @param elem\n * @param horizontal\n * @param vert\n */\n makeFullscreen: function(elem, hor, vert) {\n let vertical = vert;\n let horizontal = hor;\n\n if (common.isUndefined(horizontal)) {\n horizontal = true;\n }\n\n if (common.isUndefined(vertical)) {\n vertical = true;\n }\n\n elem.style.position = 'absolute';\n\n if (horizontal) {\n elem.style.left = 0;\n elem.style.right = 0;\n }\n if (vertical) {\n elem.style.top = 0;\n elem.style.bottom = 0;\n }\n },\n\n /**\n *\n * @param elem\n * @param eventType\n * @param params\n */\n fakeEvent: function(elem, eventType, pars, aux) {\n const params = pars || {};\n const className = EVENT_MAP_INV[eventType];\n if (!className) {\n throw new Error('Event type ' + eventType + ' not supported.');\n }\n const evt = document.createEvent(className);\n switch (className) {\n case 'MouseEvents':\n {\n const clientX = params.x || params.clientX || 0;\n const clientY = params.y || params.clientY || 0;\n evt.initMouseEvent(eventType, params.bubbles || false,\n params.cancelable || true, window, params.clickCount || 1,\n 0, // screen X\n 0, // screen Y\n clientX, // client X\n clientY, // client Y\n false, false, false, false, 0, null);\n break;\n }\n case 'KeyboardEvents':\n {\n const init = evt.initKeyboardEvent || evt.initKeyEvent; // webkit || moz\n common.defaults(params, {\n cancelable: true,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n keyCode: undefined,\n charCode: undefined\n });\n init(eventType, params.bubbles || false,\n params.cancelable, window,\n params.ctrlKey, params.altKey,\n params.shiftKey, params.metaKey,\n params.keyCode, params.charCode);\n break;\n }\n default:\n {\n evt.initEvent(eventType, params.bubbles || false, params.cancelable || true);\n break;\n }\n }\n common.defaults(evt, aux);\n elem.dispatchEvent(evt);\n },\n\n /**\n *\n * @param elem\n * @param event\n * @param func\n * @param bool\n */\n bind: function(elem, event, func, newBool) {\n const bool = newBool || false;\n if (elem.addEventListener) {\n elem.addEventListener(event, func, bool);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + event, func);\n }\n return dom;\n },\n\n /**\n *\n * @param elem\n * @param event\n * @param func\n * @param bool\n */\n unbind: function(elem, event, func, newBool) {\n const bool = newBool || false;\n if (elem.removeEventListener) {\n elem.removeEventListener(event, func, bool);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + event, func);\n }\n return dom;\n },\n\n /**\n *\n * @param elem\n * @param className\n */\n addClass: function(elem, className) {\n if (elem.className === undefined) {\n elem.className = className;\n } else if (elem.className !== className) {\n const classes = elem.className.split(/ +/);\n if (classes.indexOf(className) === -1) {\n classes.push(className);\n elem.className = classes.join(' ').replace(/^\\s+/, '').replace(/\\s+$/, '');\n }\n }\n return dom;\n },\n\n /**\n *\n * @param elem\n * @param className\n */\n removeClass: function(elem, className) {\n if (className) {\n if (elem.className === className) {\n elem.removeAttribute('class');\n } else {\n const classes = elem.className.split(/ +/);\n const index = classes.indexOf(className);\n if (index !== -1) {\n classes.splice(index, 1);\n elem.className = classes.join(' ');\n }\n }\n } else {\n elem.className = undefined;\n }\n return dom;\n },\n\n hasClass: function(elem, className) {\n return new RegExp('(?:^|\\\\s+)' + className + '(?:\\\\s+|$)').test(elem.className) || false;\n },\n\n /**\n *\n * @param elem\n */\n getWidth: function(elem) {\n const style = getComputedStyle(elem);\n\n return cssValueToPixels(style['border-left-width']) +\n cssValueToPixels(style['border-right-width']) +\n cssValueToPixels(style['padding-left']) +\n cssValueToPixels(style['padding-right']) +\n cssValueToPixels(style.width);\n },\n\n /**\n *\n * @param elem\n */\n getHeight: function(elem) {\n const style = getComputedStyle(elem);\n\n return cssValueToPixels(style['border-top-width']) +\n cssValueToPixels(style['border-bottom-width']) +\n cssValueToPixels(style['padding-top']) +\n cssValueToPixels(style['padding-bottom']) +\n cssValueToPixels(style.height);\n },\n\n /**\n *\n * @param el\n */\n getOffset: function(el) {\n let elem = el;\n const offset = { left: 0, top: 0 };\n if (elem.offsetParent) {\n do {\n offset.left += elem.offsetLeft;\n offset.top += elem.offsetTop;\n elem = elem.offsetParent;\n } while (elem);\n }\n return offset;\n },\n\n // http://stackoverflow.com/posts/2684561/revisions\n /**\n *\n * @param elem\n */\n isActive: function(elem) {\n return elem === document.activeElement && (elem.type || elem.href);\n }\n\n};\n\nexport default dom;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/dom/dom.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\nimport common from '../utils/common';\n\n/**\n * @class Provides a select input to alter the property of an object, using a\n * list of accepted values.\n *\n * @extends dat.controllers.Controller\n *\n * @param {Object} object The object to be manipulated\n * @param {string} property The name of the property to be manipulated\n * @param {Object|string[]} options A map of labels to acceptable values, or\n * a list of acceptable string values.\n *\n * @member dat.controllers\n */\nclass OptionController extends Controller {\n constructor(object, property, opts) {\n super(object, property);\n\n let options = opts;\n\n const _this = this;\n\n /**\n * The drop down menu\n * @ignore\n */\n this.__select = document.createElement('select');\n\n if (common.isArray(options)) {\n const map = {};\n common.each(options, function(element) {\n map[element] = element;\n });\n options = map;\n }\n\n common.each(options, function(value, key) {\n const opt = document.createElement('option');\n opt.innerHTML = key;\n opt.setAttribute('value', value);\n _this.__select.appendChild(opt);\n });\n\n // Acknowledge original value\n this.updateDisplay();\n\n dom.bind(this.__select, 'change', function() {\n const desiredValue = this.options[this.selectedIndex].value;\n _this.setValue(desiredValue);\n });\n\n this.domElement.appendChild(this.__select);\n }\n\n setValue(v) {\n const toReturn = super.setValue(v);\n\n if (this.__onFinishChange) {\n this.__onFinishChange.call(this, this.getValue());\n }\n return toReturn;\n }\n\n updateDisplay() {\n if (dom.isActive(this.__select)) return this; // prevent number from updating if user is trying to manually update\n this.__select.value = this.getValue();\n return super.updateDisplay();\n }\n}\n\nexport default OptionController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/OptionController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\n\n/**\n * @class Provides a text input to alter the string property of an object.\n *\n * @extends dat.controllers.Controller\n *\n * @param {Object} object The object to be manipulated\n * @param {string} property The name of the property to be manipulated\n *\n * @member dat.controllers\n */\nclass StringController extends Controller {\n constructor(object, property) {\n super(object, property);\n\n const _this = this;\n\n function onChange() {\n _this.setValue(_this.__input.value);\n }\n\n function onBlur() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.getValue());\n }\n }\n\n this.__input = document.createElement('input');\n this.__input.setAttribute('type', 'text');\n\n dom.bind(this.__input, 'keyup', onChange);\n dom.bind(this.__input, 'change', onChange);\n dom.bind(this.__input, 'blur', onBlur);\n dom.bind(this.__input, 'keydown', function(e) {\n if (e.keyCode === 13) {\n this.blur();\n }\n });\n\n this.updateDisplay();\n\n this.domElement.appendChild(this.__input);\n }\n\n updateDisplay() {\n // Stops the caret from moving on account of:\n // keyup -> setValue -> updateDisplay\n if (!dom.isActive(this.__input)) {\n this.__input.value = this.getValue();\n }\n return super.updateDisplay();\n }\n}\n\nexport default StringController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/StringController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport common from '../utils/common';\n\nfunction numDecimals(x) {\n const _x = x.toString();\n if (_x.indexOf('.') > -1) {\n return _x.length - _x.indexOf('.') - 1;\n }\n\n return 0;\n}\n\n/**\n * @class Represents a given property of an object that is a number.\n *\n * @extends dat.controllers.Controller\n *\n * @param {Object} object The object to be manipulated\n * @param {string} property The name of the property to be manipulated\n * @param {Object} [params] Optional parameters\n * @param {Number} [params.min] Minimum allowed value\n * @param {Number} [params.max] Maximum allowed value\n * @param {Number} [params.step] Increment by which to change value\n *\n * @member dat.controllers\n */\nclass NumberController extends Controller {\n constructor(object, property, params) {\n super(object, property);\n\n const _params = params || {};\n\n this.__min = _params.min;\n this.__max = _params.max;\n this.__step = _params.step;\n\n if (common.isUndefined(this.__step)) {\n if (this.initialValue === 0) {\n this.__impliedStep = 1; // What are we, psychics?\n } else {\n // Hey Doug, check this out.\n this.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(this.initialValue)) / Math.LN10)) / 10;\n }\n } else {\n this.__impliedStep = this.__step;\n }\n\n this.__precision = numDecimals(this.__impliedStep);\n }\n\n setValue(v) {\n let _v = v;\n\n if (this.__min !== undefined && _v < this.__min) {\n _v = this.__min;\n } else if (this.__max !== undefined && _v > this.__max) {\n _v = this.__max;\n }\n\n if (this.__step !== undefined && _v % this.__step !== 0) {\n _v = Math.round(_v / this.__step) * this.__step;\n }\n\n return super.setValue(_v);\n }\n\n /**\n * Specify a minimum value for <code>object[property]</code>.\n *\n * @param {Number} minValue The minimum value for\n * <code>object[property]</code>\n * @returns {dat.controllers.NumberController} this\n */\n min(v) {\n this.__min = v;\n return this;\n }\n\n /**\n * Specify a maximum value for <code>object[property]</code>.\n *\n * @param {Number} maxValue The maximum value for\n * <code>object[property]</code>\n * @returns {dat.controllers.NumberController} this\n */\n max(v) {\n this.__max = v;\n return this;\n }\n\n /**\n * Specify a step value that dat.controllers.NumberController\n * increments by.\n *\n * @param {Number} stepValue The step value for\n * dat.controllers.NumberController\n * @default if minimum and maximum specified increment is 1% of the\n * difference otherwise stepValue is 1\n * @returns {dat.controllers.NumberController} this\n */\n step(v) {\n this.__step = v;\n this.__impliedStep = v;\n this.__precision = numDecimals(v);\n return this;\n }\n}\n\nexport default NumberController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/NumberController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport NumberController from './NumberController';\nimport dom from '../dom/dom';\nimport common from '../utils/common';\n\nfunction roundToDecimal(value, decimals) {\n const tenTo = Math.pow(10, decimals);\n return Math.round(value * tenTo) / tenTo;\n}\n\n/**\n * @class Represents a given property of an object that is a number and\n * provides an input element with which to manipulate it.\n *\n * @extends dat.controllers.Controller\n * @extends dat.controllers.NumberController\n *\n * @param {Object} object The object to be manipulated\n * @param {string} property The name of the property to be manipulated\n * @param {Object} [params] Optional parameters\n * @param {Number} [params.min] Minimum allowed value\n * @param {Number} [params.max] Maximum allowed value\n * @param {Number} [params.step] Increment by which to change value\n *\n * @member dat.controllers\n */\nclass NumberControllerBox extends NumberController {\n constructor(object, property, params) {\n super(object, property, params);\n\n this.__truncationSuspended = false;\n\n const _this = this;\n\n /**\n * {Number} Previous mouse y position\n * @ignore\n */\n let prevY;\n\n function onChange() {\n const attempted = parseFloat(_this.__input.value);\n if (!common.isNaN(attempted)) {\n _this.setValue(attempted);\n }\n }\n\n function onFinish() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.getValue());\n }\n }\n\n function onBlur() {\n onFinish();\n }\n\n function onMouseDrag(e) {\n const diff = prevY - e.clientY;\n _this.setValue(_this.getValue() + diff * _this.__impliedStep);\n\n prevY = e.clientY;\n }\n\n function onMouseUp() {\n dom.unbind(window, 'mousemove', onMouseDrag);\n dom.unbind(window, 'mouseup', onMouseUp);\n onFinish();\n }\n\n function onMouseDown(e) {\n dom.bind(window, 'mousemove', onMouseDrag);\n dom.bind(window, 'mouseup', onMouseUp);\n prevY = e.clientY;\n }\n\n this.__input = document.createElement('input');\n this.__input.setAttribute('type', 'text');\n\n // Makes it so manually specified values are not truncated.\n\n dom.bind(this.__input, 'change', onChange);\n dom.bind(this.__input, 'blur', onBlur);\n dom.bind(this.__input, 'mousedown', onMouseDown);\n dom.bind(this.__input, 'keydown', function(e) {\n // When pressing enter, you can be as precise as you want.\n if (e.keyCode === 13) {\n _this.__truncationSuspended = true;\n this.blur();\n _this.__truncationSuspended = false;\n onFinish();\n }\n });\n\n this.updateDisplay();\n\n this.domElement.appendChild(this.__input);\n }\n\n updateDisplay() {\n this.__input.value = this.__truncationSuspended ? this.getValue() : roundToDecimal(this.getValue(), this.__precision);\n return super.updateDisplay();\n }\n}\n\nexport default NumberControllerBox;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/NumberControllerBox.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport NumberController from './NumberController';\nimport dom from '../dom/dom';\n\nfunction map(v, i1, i2, o1, o2) {\n return o1 + (o2 - o1) * ((v - i1) / (i2 - i1));\n}\n\n/**\n * @class Represents a given property of an object that is a number, contains\n * a minimum and maximum, and provides a slider element with which to\n * manipulate it. It should be noted that the slider element is made up of\n * <code><div></code> tags, <strong>not</strong> the html5\n * <code><slider></code> element.\n *\n * @extends dat.controllers.Controller\n * @extends dat.controllers.NumberController\n *\n * @param {Object} object The object to be manipulated\n * @param {string} property The name of the property to be manipulated\n * @param {Number} minValue Minimum allowed value\n * @param {Number} maxValue Maximum allowed value\n * @param {Number} stepValue Increment by which to change value\n *\n * @member dat.controllers\n */\nclass NumberControllerSlider extends NumberController {\n constructor(object, property, min, max, step) {\n super(object, property, { min: min, max: max, step: step });\n\n const _this = this;\n\n this.__background = document.createElement('div');\n this.__foreground = document.createElement('div');\n\n dom.bind(this.__background, 'mousedown', onMouseDown);\n\n dom.addClass(this.__background, 'slider');\n dom.addClass(this.__foreground, 'slider-fg');\n\n function onMouseDown(e) {\n document.activeElement.blur();\n\n dom.bind(window, 'mousemove', onMouseDrag);\n dom.bind(window, 'mouseup', onMouseUp);\n\n onMouseDrag(e);\n }\n\n function onMouseDrag(e) {\n e.preventDefault();\n\n const bgRect = _this.__background.getBoundingClientRect();\n\n _this.setValue(\n map(e.clientX, bgRect.left, bgRect.right, _this.__min, _this.__max)\n );\n\n return false;\n }\n\n function onMouseUp() {\n dom.unbind(window, 'mousemove', onMouseDrag);\n dom.unbind(window, 'mouseup', onMouseUp);\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.getValue());\n }\n }\n\n this.updateDisplay();\n\n this.__background.appendChild(this.__foreground);\n this.domElement.appendChild(this.__background);\n }\n\n updateDisplay() {\n const pct = (this.getValue() - this.__min) / (this.__max - this.__min);\n this.__foreground.style.width = pct * 100 + '%';\n return super.updateDisplay();\n }\n}\n\nexport default NumberControllerSlider;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/NumberControllerSlider.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\n\n/**\n * @class Provides a GUI interface to fire a specified method, a property of an object.\n *\n * @extends dat.controllers.Controller\n *\n * @param {Object} object The object to be manipulated\n * @param {string} property The name of the property to be manipulated\n *\n * @member dat.controllers\n */\nclass FunctionController extends Controller {\n constructor(object, property, text) {\n super(object, property);\n\n const _this = this;\n\n this.__button = document.createElement('div');\n this.__button.innerHTML = text === undefined ? 'Fire' : text;\n\n dom.bind(this.__button, 'click', function(e) {\n e.preventDefault();\n _this.fire();\n return false;\n });\n\n dom.addClass(this.__button, 'button');\n\n this.domElement.appendChild(this.__button);\n }\n\n fire() {\n if (this.__onChange) {\n this.__onChange.call(this);\n }\n this.getValue().call(this.object);\n if (this.__onFinishChange) {\n this.__onFinishChange.call(this, this.getValue());\n }\n }\n}\n\nexport default FunctionController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/FunctionController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\nimport Color from '../color/Color';\nimport interpret from '../color/interpret';\nimport common from '../utils/common';\n\nclass ColorController extends Controller {\n\n\n setValue(newValue) {\n this.object[this.property] = newValue;\n if (this.__onChange) {\n this.__onChange.call(this, newValue);\n }\n this.updateDisplay();\n return this;\n }\n\n getValue() {\n return this.object[this.property];\n }\n\n constructor(object, property) {\n super(object, property);\n\n this.__color = new Color(this.getValue());\n this.__temp = new Color(0);\n\n const _this = this;\n\n this.domElement = document.createElement('div');\n\n dom.makeSelectable(this.domElement, false);\n\n this.__selector = document.createElement('div');\n this.__selector.className = 'selector';\n\n this.__saturation_field = document.createElement('div');\n this.__saturation_field.className = 'saturation-field';\n\n this.__field_knob = document.createElement('div');\n this.__field_knob.className = 'field-knob';\n this.__field_knob_border = '2px solid ';\n\n this.__hue_knob = document.createElement('div');\n this.__hue_knob.className = 'hue-knob';\n\n this.__hue_field = document.createElement('div');\n this.__hue_field.className = 'hue-field';\n\n this.__input = document.createElement('input');\n this.__input.type = 'text';\n this.__input_textShadow = '0 1px 1px ';\n\n dom.bind(this.__input, 'keydown', function(e) {\n if (e.keyCode === 13) { // on enter\n onBlur.call(this);\n }\n });\n\n dom.bind(this.__input, 'blur', onBlur);\n\n dom.bind(this.__selector, 'mousedown', function(/* e */) {\n dom\n .addClass(this, 'drag')\n .bind(window, 'mouseup', function(/* e */) {\n dom.removeClass(_this.__selector, 'drag');\n });\n });\n\n const valueField = document.createElement('div');\n\n common.extend(this.__selector.style, {\n width: '122px',\n height: '102px',\n padding: '3px',\n backgroundColor: '#222',\n boxShadow: '0px 1px 3px rgba(0,0,0,0.3)'\n });\n\n common.extend(this.__field_knob.style, {\n position: 'absolute',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border + (this.__color.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n zIndex: 1\n });\n\n common.extend(this.__hue_knob.style, {\n position: 'absolute',\n width: '15px',\n height: '2px',\n borderRight: '4px solid #fff',\n zIndex: 1\n });\n\n common.extend(this.__saturation_field.style, {\n width: '100px',\n height: '100px',\n border: '1px solid #555',\n marginRight: '3px',\n display: 'inline-block',\n cursor: 'pointer'\n });\n\n common.extend(valueField.style, {\n width: '100%',\n height: '100%',\n background: 'none'\n });\n\n linearGradient(valueField, 'top', 'rgba(0,0,0,0)', '#000');\n\n common.extend(this.__hue_field.style, {\n width: '15px',\n height: '100px',\n border: '1px solid #555',\n cursor: 'ns-resize',\n position: 'absolute',\n top: '3px',\n right: '3px'\n });\n\n hueGradient(this.__hue_field);\n\n common.extend(this.__input.style, {\n outline: 'none',\n// width: '120px',\n textAlign: 'center',\n// padding: '4px',\n // marginBottom: '6px',\n\n color: '#fff',\n border: 0,\n fontWeight: 'bold',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n\n dom.bind(this.__saturation_field, 'mousedown', fieldDown);\n dom.bind(this.__field_knob, 'mousedown', fieldDown);\n\n dom.bind(this.__hue_field, 'mousedown', function(e) {\n setH(e);\n dom.bind(window, 'mousemove', setH);\n dom.bind(window, 'mouseup', fieldUpH);\n });\n\n function fieldDown(e) {\n setSV(e);\n // document.body.style.cursor = 'none';\n dom.bind(window, 'mousemove', setSV);\n dom.bind(window, 'mouseup', fieldUpSV);\n }\n\n function fieldUpSV() {\n dom.unbind(window, 'mousemove', setSV);\n dom.unbind(window, 'mouseup', fieldUpSV);\n // document.body.style.cursor = 'default';\n onFinish();\n }\n\n function onBlur() {\n const i = interpret(this.value);\n if (i !== false) {\n _this.__color.__state = i;\n _this.setValue(_this.__color.toOriginal());\n } else {\n this.value = _this.__color.toString();\n }\n }\n\n function fieldUpH() {\n dom.unbind(window, 'mousemove', setH);\n dom.unbind(window, 'mouseup', fieldUpH);\n onFinish();\n }\n\n function onFinish() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.__color.toOriginal());\n }\n }\n\n this.__saturation_field.appendChild(valueField);\n this.__selector.appendChild(this.__field_knob);\n this.__selector.appendChild(this.__saturation_field);\n this.__selector.appendChild(this.__hue_field);\n this.__hue_field.appendChild(this.__hue_knob);\n\n this.domElement.appendChild(this.__input);\n\n this.domElement.appendChild(this.__selector);\n\n this.updateDisplay();\n\n function setSV(e) {\n e.preventDefault();\n\n const fieldRect = _this.__saturation_field.getBoundingClientRect();\n let s = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n let v = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (v > 1) {\n v = 1;\n } else if (v < 0) {\n v = 0;\n }\n\n if (s > 1) {\n s = 1;\n } else if (s < 0) {\n s = 0;\n }\n\n _this.__color.v = v;\n _this.__color.s = s;\n\n _this.setValue(_this.__color.toOriginal());\n\n\n return false;\n }\n\n function setH(e) {\n e.preventDefault();\n\n const fieldRect = _this.__hue_field.getBoundingClientRect();\n let h = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (h > 1) {\n h = 1;\n } else if (h < 0) {\n h = 0;\n }\n\n _this.__color.h = h * 360;\n\n _this.setValue(_this.__color.toOriginal());\n\n return false;\n }\n }\n\n updateDisplay() {\n const i = interpret(this.getValue());\n\n if (i !== false) {\n let mismatch = false;\n\n // Check for mismatch on the interpreted value.\n\n common.each(Color.COMPONENTS, function(component) {\n if (!common.isUndefined(i[component]) && !common.isUndefined(this.__color.__state[component]) &&\n i[component] !== this.__color.__state[component]) {\n mismatch = true;\n return {}; // break\n }\n }, this);\n\n // If nothing diverges, we keep our previous values\n // for statefulness, otherwise we recalculate fresh\n if (mismatch) {\n common.extend(this.__color.__state, i);\n }\n }\n\n common.extend(this.__temp.__state, this.__color.__state);\n\n this.__temp.a = 1;\n\n const flip = (this.__color.v < 0.5 || this.__color.s > 0.5) ? 255 : 0;\n const _flip = 255 - flip;\n\n common.extend(this.__field_knob.style, {\n marginLeft: 100 * this.__color.s - 7 + 'px',\n marginTop: 100 * (1 - this.__color.v) - 7 + 'px',\n backgroundColor: this.__temp.toHexString(),\n border: this.__field_knob_border + 'rgb(' + flip + ',' + flip + ',' + flip + ')'\n });\n\n this.__hue_knob.style.marginTop = (1 - this.__color.h / 360) * 100 + 'px';\n\n this.__temp.s = 1;\n this.__temp.v = 1;\n\n linearGradient(this.__saturation_field, 'left', '#fff', this.__temp.toHexString());\n\n this.__input.value = this.__color.toString();\n\n common.extend(this.__input.style, {\n backgroundColor: this.__color.toHexString(),\n color: 'rgb(' + flip + ',' + flip + ',' + flip + ')',\n textShadow: this.__input_textShadow + 'rgba(' + _flip + ',' + _flip + ',' + _flip + ',.7)'\n });\n }\n}\n\nconst vendors = ['-moz-', '-o-', '-webkit-', '-ms-', ''];\n\nfunction linearGradient(elem, x, a, b) {\n elem.style.background = '';\n common.each(vendors, function(vendor) {\n elem.style.cssText += 'background: ' + vendor + 'linear-gradient(' + x + ', ' + a + ' 0%, ' + b + ' 100%); ';\n });\n}\n\nfunction hueGradient(elem) {\n elem.style.background = '';\n elem.style.cssText += 'background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);';\n elem.style.cssText += 'background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n}\n\nexport default ColorController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/ColorController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\nimport Color from '../color/Color';\nimport interpret from '../color/interpret';\nimport common from '../utils/common';\n\nclass BgColorController extends Controller {\n\n\n setValue(newValue) {\n this.object[this.property] = newValue;\n if (this.__onChange) {\n this.__onChange.call(this, newValue);\n }\n this.updateDisplay();\n return this;\n }\n setValue2(newValue) {\n this.value2 = newValue;\n if (this.object[this.property + 'bg']) {\n this.object[this.property + 'bg'] = this.value2;\n }\n if (this.__onChange) {\n this.__onChange.call(this, newValue);\n }\n this.updateDisplay();\n return this;\n }\n\n getValue() {\n return this.object[this.property];\n }\n\n constructor(object, property) {\n super(object, property);\n\n this.__color = new Color(this.getValue());\n this.value2 = '#FFee00';\n if (this.object[this.property + 'bg']) {\n this.value2 = this.object[this.property + 'bg'];\n }\n this.__color2 = new Color(this.value2);\n\n this.__temp = new Color(0);\n this.__temp2 = new Color(0);\n\n const _this = this;\n\n this.domElement = document.createElement('div');\n\n dom.makeSelectable(this.domElement, false);\n\n this.__selector = document.createElement('div');\n /* this.__selector.className = 'selector'; */\n\n this.__saturation_field = document.createElement('div');\n this.__saturation_field.className = 'saturation-field';\n this.__saturation_field2 = document.createElement('div');\n this.__saturation_field2.className = 'saturation-field';\n\n this.__field_knob = document.createElement('div');\n this.__field_knob.className = 'field-knob';\n this.__field_knob_border = '2px solid ';\n this.__field_knob2 = document.createElement('div');\n this.__field_knob2.className = 'field-knob';\n this.__field_knob_border2 = '2px solid ';\n\n this.__hue_knob = document.createElement('div');\n this.__hue_knob.className = 'hue-knob';\n this.__hue_knob2 = document.createElement('div');\n this.__hue_knob2.className = 'hue-knob';\n\n this.__hue_field = document.createElement('div');\n this.__hue_field.className = 'hue-field';\n this.__hue_field2 = document.createElement('div');\n this.__hue_field2.className = 'hue-field';\n\n this.__input = document.createElement('input');\n this.__input.type = 'text';\n this.__input_textShadow = '0 1px 1px ';\n this.__input2 = document.createElement('input');\n this.__input2.type = 'text';\n this.__input_textShadow2 = '0 1px 1px ';\n\n dom.bind(this.__input, 'keydown', function(e) {\n if (e.keyCode === 13) { // on enter\n onBlur.call(this);\n }\n });\n dom.bind(this.__input2, 'keydown', function(e) {\n if (e.keyCode === 13) { // on enter\n onBlur2.call(this);\n }\n });\n\n dom.bind(this.__input, 'blur', onBlur);\n dom.bind(this.__input2, 'blur', onBlur2);\n\n /*\n dom.bind(this.__selector, 'mousedown', function( ) {\n dom\n .addClass(this, 'drag')\n .bind(window, 'mouseup', function( ) {\n dom.removeClass(_this.__selector, 'drag');\n });\n });\n */\n\n const valueField = document.createElement('div');\n const valueField2 = document.createElement('div');\n\n common.extend(this.__selector.style, {\n width: '200px',\n height: '102px',\n marginTop: '22px',\n backgroundColor: '#222',\n boxShadow: '0px 1px 3px rgba(0,0,0,0.3)'\n });\n\n common.extend(this.__field_knob.style, {\n position: 'absolute',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border + (this.__color.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n zIndex: 1\n });\n common.extend(this.__field_knob2.style, {\n position: 'absolute',\n left: '100',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border2 + (this.__color2.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n zIndex: 1\n });\n\n common.extend(this.__hue_knob.style, {\n position: 'absolute',\n width: '15px',\n height: '2px',\n left: '-15px',\n borderRight: '4px solid #fff',\n zIndex: 1\n });\n common.extend(this.__hue_knob2.style, {\n position: 'absolute',\n width: '15px',\n height: '2px',\n left: '9px',\n borderRight: '4px solid #fff',\n zIndex: 1\n });\n\n common.extend(this.__saturation_field.style, {\n width: '100px',\n height: '100px',\n border: '1px solid #555',\n marginRight: '3px',\n display: 'inline-block',\n cursor: 'pointer'\n });\n common.extend(this.__saturation_field2.style, {\n left: '100px',\n width: '100px',\n height: '100px',\n border: '1px solid #555',\n marginRight: '3px',\n display: 'inline-block',\n position: 'absolute',\n top: '22px',\n cursor: 'pointer'\n });\n\n common.extend(valueField.style, {\n width: '100%',\n height: '100%',\n background: 'none'\n });\n common.extend(valueField2.style, {\n width: '100%',\n height: '100%',\n background: 'none'\n });\n\n linearGradient(valueField, 'top', 'rgba(0,0,0,0)', '#000');\n linearGradient(valueField2, 'top', 'rgba(0,0,0,0)', '#000');\n\n common.extend(this.__hue_field.style, {\n width: '20px',\n height: '100px',\n border: '1px solid #555',\n cursor: 'ns-resize',\n position: 'absolute',\n top: '3px',\n marginTop: '19px',\n left: '-20px'\n });\n common.extend(this.__hue_field2.style, {\n width: '20px',\n height: '100px',\n border: '1px solid #555',\n cursor: 'ns-resize',\n position: 'absolute',\n top: '3px',\n marginTop: '19px',\n left: '200px'\n });\n\n hueGradient(this.__hue_field);\n hueGradient(this.__hue_field2);\n\n common.extend(this.__input.style, {\n outline: 'none',\n// width: '120px',\n textAlign: 'center',\n// padding: '4px',\n // marginBottom: '6px',\n\n color: '#fff',\n border: 0,\n left: '-20px',\n position: 'absolute',\n fontWeight: 'bold',\n width: '120px',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n common.extend(this.__input2.style, {\n outline: 'none',\n// width: '120px',\n textAlign: 'center',\n// padding: '4px',\n // marginBottom: '6px',\n\n color: '#fff',\n border: 0,\n left: '100px',\n position: 'absolute',\n fontWeight: 'bold',\n width: '120px',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n\n dom.bind(this.__saturation_field, 'mousedown', fieldDown);\n dom.bind(this.__saturation_field2, 'mousedown', fieldDown2);\n dom.bind(this.__field_knob, 'mousedown', fieldDown);\n dom.bind(this.__field_knob2, 'mousedown', fieldDown2);\n\n dom.bind(this.__hue_field, 'mousedown', function(e) {\n setH(e);\n dom.bind(window, 'mousemove', setH);\n dom.bind(window, 'mouseup', fieldUpH);\n });\n dom.bind(this.__hue_field2, 'mousedown', function(e) {\n setH2(e);\n dom.bind(window, 'mousemove', setH2);\n dom.bind(window, 'mouseup', fieldUpH2);\n });\n\n function fieldDown(e) {\n setSV(e);\n // document.body.style.cursor = 'none';\n dom.bind(window, 'mousemove', setSV);\n dom.bind(window, 'mouseup', fieldUpSV);\n }\n function fieldDown2(e) {\n setSV2(e);\n // document.body.style.cursor = 'none';\n dom.bind(window, 'mousemove', setSV2);\n dom.bind(window, 'mouseup', fieldUpSV2);\n }\n\n function fieldUpSV() {\n dom.unbind(window, 'mousemove', setSV);\n dom.unbind(window, 'mouseup', fieldUpSV);\n // document.body.style.cursor = 'default';\n onFinish();\n }\n function fieldUpSV2() {\n dom.unbind(window, 'mousemove', setSV2);\n dom.unbind(window, 'mouseup', fieldUpSV2);\n // document.body.style.cursor = 'default';\n onFinish2();\n }\n\n function onBlur() {\n const i = interpret(this.value);\n if (i !== false) {\n _this.__color.__state = i;\n _this.setValue(_this.__color.toOriginal());\n } else {\n this.value = _this.__color.toString();\n }\n }\n function onBlur2() {\n const i = interpret(this.value);\n if (i !== false) {\n _this.__color2.__state = i;\n _this.setValue2(_this.__color2.toOriginal());\n } else {\n this.value = _this.__color2.toString();\n }\n }\n\n function fieldUpH() {\n dom.unbind(window, 'mousemove', setH);\n dom.unbind(window, 'mouseup', fieldUpH);\n onFinish();\n }\n function fieldUpH2() {\n dom.unbind(window, 'mousemove', setH2);\n dom.unbind(window, 'mouseup', fieldUpH2);\n onFinish2();\n }\n\n function onFinish() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.__color2.toOriginal());\n }\n }\n function onFinish2() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.__color.toOriginal());\n }\n }\n\n this.__saturation_field.appendChild(valueField);\n this.__selector.appendChild(this.__field_knob);\n this.__selector.appendChild(this.__field_knob2);\n this.__selector.appendChild(this.__saturation_field);\n\n this.__saturation_field2.appendChild(valueField2);\n this.__selector.appendChild(this.__saturation_field2);\n\n this.__selector.appendChild(this.__hue_field);\n this.__hue_field.appendChild(this.__hue_knob);\n this.__hue_field2.appendChild(this.__hue_knob2);\n this.__selector.appendChild(this.__hue_field2);\n\n this.domElement.appendChild(this.__input2);\n this.domElement.appendChild(this.__input);\n\n this.domElement.appendChild(this.__selector);\n\n this.updateDisplay();\n\n function setSV2(e) {\n e.preventDefault();\n\n const fieldRect = _this.__saturation_field2.getBoundingClientRect();\n let s = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n let v = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (v > 1) {\n v = 1;\n } else if (v < 0) {\n v = 0;\n }\n\n if (s > 1) {\n s = 1;\n } else if (s < 0) {\n s = 0;\n }\n\n _this.__color2.v = v;\n _this.__color2.s = s;\n\n _this.setValue2(_this.__color2.toOriginal());\n\n\n return false;\n }\n function setSV(e) {\n e.preventDefault();\n\n const fieldRect = _this.__saturation_field.getBoundingClientRect();\n let s = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n let v = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (v > 1) {\n v = 1;\n } else if (v < 0) {\n v = 0;\n }\n\n if (s > 1) {\n s = 1;\n } else if (s < 0) {\n s = 0;\n }\n\n _this.__color.v = v;\n _this.__color.s = s;\n\n _this.setValue(_this.__color.toOriginal());\n\n\n return false;\n }\n\n function setH2(e) {\n e.preventDefault();\n\n const fieldRect = _this.__hue_field2.getBoundingClientRect();\n let h = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (h > 1) {\n h = 1;\n } else if (h < 0) {\n h = 0;\n }\n\n _this.__color2.h = h * 360;\n\n _this.setValue2(_this.__color2.toOriginal());\n\n return false;\n }\n function setH(e) {\n e.preventDefault();\n\n const fieldRect = _this.__hue_field.getBoundingClientRect();\n let h = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (h > 1) {\n h = 1;\n } else if (h < 0) {\n h = 0;\n }\n\n _this.__color.h = h * 360;\n\n _this.setValue(_this.__color.toOriginal());\n\n return false;\n }\n }\n\n updateDisplay() {\n const i = interpret(this.getValue());\n\n if (i !== false) {\n let mismatch = false;\n\n // Check for mismatch on the interpreted value.\n\n common.each(Color.COMPONENTS, function(component) {\n if (!common.isUndefined(i[component]) && !common.isUndefined(this.__color.__state[component]) &&\n i[component] !== this.__color.__state[component]) {\n mismatch = true;\n return {}; // break\n }\n }, this);\n\n // If nothing diverges, we keep our previous values\n // for statefulness, otherwise we recalculate fresh\n if (mismatch) {\n common.extend(this.__color.__state, i);\n }\n }\n\n common.extend(this.__temp.__state, this.__color.__state);\n common.extend(this.__temp2.__state, this.__color2.__state);\n\n this.__temp.a = 1;\n this.__temp2.a = 1;\n\n const flip = (this.__color.v < 0.5 || this.__color.s > 0.5) ? 255 : 0;\n const _flip = 255 - flip;\n const flip2 = (this.__color2.v < 0.5 || this.__color2.s > 0.5) ? 255 : 0;\n const _flip2 = 255 - flip2;\n\n common.extend(this.__field_knob.style, {\n marginLeft: 100 * this.__color.s - 7 + 'px',\n marginTop: 100 * (1 - this.__color.v) - 7 + 'px',\n backgroundColor: this.__temp.toHexString(),\n border: this.__field_knob_border + 'rgb(' + flip + ',' + flip + ',' + flip + ')'\n });\n common.extend(this.__field_knob2.style, {\n marginLeft: 100 * this.__color2.s - 7 + 'px',\n marginTop: 100 * (1 - this.__color2.v) - 7 + 'px',\n backgroundColor: this.__temp2.toHexString(),\n border: this.__field_knob_border2 + 'rgb(' + flip2 + ',' + flip2 + ',' + flip2 + ')'\n });\n\n this.__hue_knob.style.marginTop = (1 - this.__color.h / 360) * 100 + 'px';\n this.__hue_knob2.style.marginTop = (1 - this.__color2.h / 360) * 100 + 'px';\n\n this.__temp.s = 1;\n this.__temp.v = 1;\n this.__temp2.s = 1;\n this.__temp2.v = 1;\n\n linearGradient(this.__saturation_field, 'left', '#fff', this.__temp.toHexString());\n linearGradient(this.__saturation_field2, 'left', '#fff', this.__temp2.toHexString());\n\n this.__input.value = this.__color.toString();\n this.__input2.value = this.__color2.toString();\n\n common.extend(this.__input.style, {\n backgroundColor: this.__color.toHexString(),\n color: 'rgb(' + flip + ',' + flip + ',' + flip + ')',\n textShadow: this.__input_textShadow + 'rgba(' + _flip + ',' + _flip + ',' + _flip + ',.7)'\n });\n common.extend(this.__input2.style, {\n backgroundColor: this.__color2.toHexString(),\n color: 'rgb(' + flip2 + ',' + flip2 + ',' + flip2 + ')',\n textShadow: this.__input_textShadow + 'rgba(' + _flip2 + ',' + _flip2 + ',' + _flip2 + ',.7)'\n });\n }\n}\n\nconst vendors = ['-moz-', '-o-', '-webkit-', '-ms-', ''];\n\nfunction linearGradient(elem, x, a, b) {\n elem.style.background = '';\n common.each(vendors, function(vendor) {\n elem.style.cssText += 'background: ' + vendor + 'linear-gradient(' + x + ', ' + a + ' 0%, ' + b + ' 100%); ';\n });\n}\n\nfunction hueGradient(elem) {\n elem.style.background = '';\n elem.style.cssText += 'background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);';\n elem.style.cssText += 'background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n}\n\nexport default BgColorController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/BgColorController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\nimport Color from '../color/Color';\nimport interpret from '../color/interpret';\nimport common from '../utils/common';\n\nclass NgColorController extends Controller {\n\n\n setValue(newValue) {\n this.object[this.property] = newValue;\n if (this.__onChange) {\n this.__onChange.call(this, newValue);\n }\n this.updateDisplay();\n return this;\n }\n\n getValue() {\n return this.object[this.property];\n }\n\n constructor(object, property) {\n super(object, property);\n\n this.__color = new Color(this.getValue());\n this.__temp = new Color(0);\n\n const _this = this;\n\n this.domElement = document.createElement('div');\n\n dom.makeSelectable(this.domElement, false);\n\n this.__selector = document.createElement('div');\n /* this.__selector.className = 'selector'; */\n\n this.__saturation_field = document.createElement('div');\n this.__saturation_field.className = 'saturation-field';\n\n this.__field_knob = document.createElement('div');\n this.__field_knob.className = 'field-knob';\n this.__field_knob_border = '2px solid ';\n\n this.__hue_knob = document.createElement('div');\n this.__hue_knob.className = 'hue-knob';\n\n this.__hue_field = document.createElement('div');\n this.__hue_field.className = 'hue-field';\n\n this.__input = document.createElement('input');\n this.__input.type = 'text';\n this.__input_textShadow = '0 1px 1px ';\n\n dom.bind(this.__input, 'keydown', function(e) {\n if (e.keyCode === 13) { // on enter\n onBlur.call(this);\n }\n });\n\n dom.bind(this.__input, 'blur', onBlur);\n\n dom.bind(this.__selector, 'mousedown', function(/* e */) {\n dom\n .addClass(this, 'drag')\n .bind(window, 'mouseup', function(/* e */) {\n dom.removeClass(_this.__selector, 'drag');\n });\n });\n\n const valueField = document.createElement('div');\n\n common.extend(this.__selector.style, {\n width: '120px',\n height: '102px',\n marginTop: '22px',\n padding: '3px',\n backgroundColor: '#222',\n boxShadow: '0px 1px 3px rgba(0,0,0,0.3)'\n });\n\n common.extend(this.__field_knob.style, {\n position: 'absolute',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border + (this.__color.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n zIndex: 1\n });\n\n common.extend(this.__hue_knob.style, {\n position: 'absolute',\n width: '15px',\n height: '2px',\n left: '9px',\n borderRight: '4px solid #fff',\n zIndex: 1\n });\n\n common.extend(this.__saturation_field.style, {\n width: '100px',\n height: '100px',\n border: '1px solid #555',\n marginRight: '3px',\n display: 'inline-block',\n position: 'absolute',\n top: '22px',\n cursor: 'pointer'\n });\n\n common.extend(valueField.style, {\n width: '100%',\n height: '100%',\n background: 'none'\n });\n\n linearGradient(valueField, 'top', 'rgba(0,0,0,0)', '#000');\n\n common.extend(this.__hue_field.style, {\n width: '20px',\n height: '100px',\n border: '1px solid #555',\n cursor: 'ns-resize',\n position: 'absolute',\n top: '3px',\n marginTop: '19px',\n left: '100px'\n });\n\n hueGradient(this.__hue_field);\n\n common.extend(this.__input.style, {\n outline: 'none',\n// width: '120px',\n textAlign: 'center',\n// padding: '4px',\n // marginBottom: '6px',\n\n color: '#fff',\n border: 0,\n left: '0',\n position: 'absolute',\n width: '120px',\n fontWeight: 'bold',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n\n dom.bind(this.__saturation_field, 'mousedown', fieldDown);\n dom.bind(this.__field_knob, 'mousedown', fieldDown);\n\n dom.bind(this.__hue_field, 'mousedown', function(e) {\n setH(e);\n dom.bind(window, 'mousemove', setH);\n dom.bind(window, 'mouseup', fieldUpH);\n });\n\n function fieldDown(e) {\n setSV(e);\n // document.body.style.cursor = 'none';\n dom.bind(window, 'mousemove', setSV);\n dom.bind(window, 'mouseup', fieldUpSV);\n }\n\n function fieldUpSV() {\n dom.unbind(window, 'mousemove', setSV);\n dom.unbind(window, 'mouseup', fieldUpSV);\n // document.body.style.cursor = 'default';\n onFinish();\n }\n\n function onBlur() {\n const i = interpret(this.value);\n if (i !== false) {\n _this.__color.__state = i;\n _this.setValue(_this.__color.toOriginal());\n } else {\n this.value = _this.__color.toString();\n }\n }\n\n function fieldUpH() {\n dom.unbind(window, 'mousemove', setH);\n dom.unbind(window, 'mouseup', fieldUpH);\n onFinish();\n }\n\n function onFinish() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.__color.toOriginal());\n }\n }\n\n this.__saturation_field.appendChild(valueField);\n this.__selector.appendChild(this.__field_knob);\n this.__selector.appendChild(this.__saturation_field);\n this.__selector.appendChild(this.__hue_field);\n this.__hue_field.appendChild(this.__hue_knob);\n\n this.domElement.appendChild(this.__input);\n\n this.domElement.appendChild(this.__selector);\n\n this.updateDisplay();\n\n function setSV(e) {\n e.preventDefault();\n\n const fieldRect = _this.__saturation_field.getBoundingClientRect();\n let s = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n let v = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (v > 1) {\n v = 1;\n } else if (v < 0) {\n v = 0;\n }\n\n if (s > 1) {\n s = 1;\n } else if (s < 0) {\n s = 0;\n }\n\n _this.__color.v = v;\n _this.__color.s = s;\n\n _this.setValue(_this.__color.toOriginal());\n\n\n return false;\n }\n\n function setH(e) {\n e.preventDefault();\n\n const fieldRect = _this.__hue_field.getBoundingClientRect();\n let h = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (h > 1) {\n h = 1;\n } else if (h < 0) {\n h = 0;\n }\n\n _this.__color.h = h * 360;\n\n _this.setValue(_this.__color.toOriginal());\n\n return false;\n }\n }\n\n updateDisplay() {\n const i = interpret(this.getValue());\n\n if (i !== false) {\n let mismatch = false;\n\n // Check for mismatch on the interpreted value.\n\n common.each(Color.COMPONENTS, function(component) {\n if (!common.isUndefined(i[component]) && !common.isUndefined(this.__color.__state[component]) &&\n i[component] !== this.__color.__state[component]) {\n mismatch = true;\n return {}; // break\n }\n }, this);\n\n // If nothing diverges, we keep our previous values\n // for statefulness, otherwise we recalculate fresh\n if (mismatch) {\n common.extend(this.__color.__state, i);\n }\n }\n\n common.extend(this.__temp.__state, this.__color.__state);\n\n this.__temp.a = 1;\n\n const flip = (this.__color.v < 0.5 || this.__color.s > 0.5) ? 255 : 0;\n const _flip = 255 - flip;\n\n common.extend(this.__field_knob.style, {\n marginLeft: 100 * this.__color.s - 7 + 'px',\n marginTop: 100 * (1 - this.__color.v) - 7 + 'px',\n backgroundColor: this.__temp.toHexString(),\n border: this.__field_knob_border + 'rgb(' + flip + ',' + flip + ',' + flip + ')'\n });\n\n this.__hue_knob.style.marginTop = (1 - this.__color.h / 360) * 100 + 'px';\n\n this.__temp.s = 1;\n this.__temp.v = 1;\n\n linearGradient(this.__saturation_field, 'left', '#fff', this.__temp.toHexString());\n\n this.__input.value = this.__color.toString();\n\n common.extend(this.__input.style, {\n backgroundColor: this.__color.toHexString(),\n color: 'rgb(' + flip + ',' + flip + ',' + flip + ')',\n textShadow: this.__input_textShadow + 'rgba(' + _flip + ',' + _flip + ',' + _flip + ',.7)'\n });\n }\n}\n\nconst vendors = ['-moz-', '-o-', '-webkit-', '-ms-', ''];\n\nfunction linearGradient(elem, x, a, b) {\n elem.style.background = '';\n common.each(vendors, function(vendor) {\n elem.style.cssText += 'background: ' + vendor + 'linear-gradient(' + x + ', ' + a + ' 0%, ' + b + ' 100%); ';\n });\n}\n\nfunction hueGradient(elem) {\n elem.style.background = '';\n elem.style.cssText += 'background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);';\n elem.style.cssText += 'background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n}\n\nexport default NgColorController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/NgColorController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\nimport Color from '../color/Color';\nimport interpret from '../color/interpret';\nimport common from '../utils/common';\n\nclass GtColorController extends Controller {\n\n\n setValue(newValue) {\n this.object[this.property] = newValue;\n if (this.__onChange) {\n this.__onChange.call(this, newValue);\n }\n this.updateDisplay();\n return this;\n }\n setValue2(newValue) {\n this.value2 = newValue;\n if (this.object[this.property + 'bg']) {\n this.object[this.property + 'bg'] = this.value2;\n }\n if (this.__onChange) {\n this.__onChange.call(this, newValue);\n }\n this.updateDisplay();\n return this;\n }\n\n getValue() {\n return this.object[this.property];\n }\n\n constructor(object, property) {\n super(object, property);\n\n this.__color = new Color(this.getValue());\n this.value2 = '#FFee00';\n if (this.object[this.property + 'bg']) {\n this.value2 = this.object[this.property + 'bg'];\n }\n this.__color2 = new Color(this.value2);\n\n this.__temp = new Color(0);\n this.__temp2 = new Color(0);\n\n const _this = this;\n\n this.domElement = document.createElement('div');\n\n dom.makeSelectable(this.domElement, false);\n\n this.__selector = document.createElement('div');\n /* this.__selector.className = 'selector'; */\n\n this.__saturation_field = document.createElement('div');\n this.__saturation_field.className = 'saturation-field';\n this.__saturation_field2 = document.createElement('div');\n this.__saturation_field2.className = 'saturation-field';\n\n this.__field_knob = document.createElement('div');\n this.__field_knob.className = 'field-knob';\n this.__field_knob_border = '2px solid ';\n this.__field_knob2 = document.createElement('div');\n this.__field_knob2.className = 'field-knob';\n this.__field_knob_border2 = '2px solid ';\n\n this.__hue_knob = document.createElement('div');\n this.__hue_knob.className = 'hue-knob';\n this.__hue_knob2 = document.createElement('div');\n this.__hue_knob2.className = 'hue-knob';\n\n this.__hue_field = document.createElement('div');\n this.__hue_field.className = 'hue-field';\n this.__hue_field2 = document.createElement('div');\n this.__hue_field2.className = 'hue-field';\n\n this.__input = document.createElement('input');\n this.__input.type = 'text';\n this.__input_textShadow = '0 1px 1px ';\n this.__input2 = document.createElement('input');\n this.__input2.type = 'text';\n this.__input_textShadow2 = '0 1px 1px ';\n\n dom.bind(this.__input, 'keydown', function(e) {\n if (e.keyCode === 13) { // on enter\n onBlur.call(this);\n }\n });\n dom.bind(this.__input2, 'keydown', function(e) {\n if (e.keyCode === 13) { // on enter\n onBlur2.call(this);\n }\n });\n\n dom.bind(this.__input, 'blur', onBlur);\n dom.bind(this.__input2, 'blur', onBlur2);\n\n /*\n dom.bind(this.__selector, 'mousedown', function( ) {\n dom\n .addClass(this, 'drag')\n .bind(window, 'mouseup', function( ) {\n dom.removeClass(_this.__selector, 'drag');\n });\n });\n */\n\n const valueField = document.createElement('div');\n const valueField2 = document.createElement('div');\n\n common.extend(this.__selector.style, {\n width: '200px',\n height: '102px',\n marginTop: '22px',\n backgroundColor: '#222',\n boxShadow: '0px 1px 3px rgba(0,0,0,0.3)'\n });\n\n common.extend(this.__field_knob.style, {\n position: 'absolute',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border + (this.__color.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n zIndex: 1\n });\n common.extend(this.__field_knob2.style, {\n position: 'absolute',\n left: '100',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border2 + (this.__color2.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n zIndex: 1\n });\n\n common.extend(this.__hue_knob.style, {\n position: 'absolute',\n width: '15px',\n height: '2px',\n left: '-15px',\n borderRight: '4px solid #fff',\n zIndex: 1\n });\n common.extend(this.__hue_knob2.style, {\n position: 'absolute',\n width: '15px',\n height: '2px',\n left: '9px',\n borderRight: '4px solid #fff',\n zIndex: 1\n });\n\n common.extend(this.__saturation_field.style, {\n width: '100px',\n height: '100px',\n border: '1px solid #555',\n marginRight: '3px',\n display: 'inline-block',\n cursor: 'pointer'\n });\n common.extend(this.__saturation_field2.style, {\n left: '100px',\n width: '100px',\n height: '100px',\n border: '1px solid #555',\n marginRight: '3px',\n display: 'inline-block',\n position: 'absolute',\n top: '22px',\n cursor: 'pointer'\n });\n\n common.extend(valueField.style, {\n width: '100%',\n height: '100%',\n background: 'none'\n });\n common.extend(valueField2.style, {\n width: '100%',\n height: '100%',\n background: 'none'\n });\n\n linearGradient(valueField, 'top', 'rgba(0,0,0,0)', '#000');\n linearGradient(valueField2, 'top', 'rgba(0,0,0,0)', '#000');\n\n common.extend(this.__hue_field.style, {\n width: '20px',\n height: '100px',\n border: '1px solid #555',\n cursor: 'ns-resize',\n position: 'absolute',\n top: '3px',\n marginTop: '19px',\n left: '-20px'\n });\n common.extend(this.__hue_field2.style, {\n width: '20px',\n height: '100px',\n border: '1px solid #555',\n cursor: 'ns-resize',\n position: 'absolute',\n top: '3px',\n marginTop: '19px',\n left: '200px'\n });\n\n hueGradient(this.__hue_field);\n hueGradient(this.__hue_field2);\n\n common.extend(this.__input.style, {\n outline: 'none',\n// width: '120px',\n textAlign: 'center',\n// padding: '4px',\n // marginBottom: '6px',\n\n color: '#fff',\n border: 0,\n left: '-20px',\n position: 'absolute',\n fontWeight: 'bold',\n width: '120px',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n common.extend(this.__input2.style, {\n outline: 'none',\n// width: '120px',\n textAlign: 'center',\n// padding: '4px',\n // marginBottom: '6px',\n\n color: '#fff',\n border: 0,\n left: '100px',\n position: 'absolute',\n fontWeight: 'bold',\n width: '120px',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n\n dom.bind(this.__saturation_field, 'mousedown', fieldDown);\n dom.bind(this.__saturation_field2, 'mousedown', fieldDown2);\n dom.bind(this.__field_knob, 'mousedown', fieldDown);\n dom.bind(this.__field_knob2, 'mousedown', fieldDown2);\n\n dom.bind(this.__hue_field, 'mousedown', function(e) {\n setH(e);\n dom.bind(window, 'mousemove', setH);\n dom.bind(window, 'mouseup', fieldUpH);\n });\n dom.bind(this.__hue_field2, 'mousedown', function(e) {\n setH2(e);\n dom.bind(window, 'mousemove', setH2);\n dom.bind(window, 'mouseup', fieldUpH2);\n });\n\n function fieldDown(e) {\n setSV(e);\n // document.body.style.cursor = 'none';\n dom.bind(window, 'mousemove', setSV);\n dom.bind(window, 'mouseup', fieldUpSV);\n }\n function fieldDown2(e) {\n setSV2(e);\n // document.body.style.cursor = 'none';\n dom.bind(window, 'mousemove', setSV2);\n dom.bind(window, 'mouseup', fieldUpSV2);\n }\n\n function fieldUpSV() {\n dom.unbind(window, 'mousemove', setSV);\n dom.unbind(window, 'mouseup', fieldUpSV);\n // document.body.style.cursor = 'default';\n onFinish();\n }\n function fieldUpSV2() {\n dom.unbind(window, 'mousemove', setSV2);\n dom.unbind(window, 'mouseup', fieldUpSV2);\n // document.body.style.cursor = 'default';\n onFinish2();\n }\n\n function onBlur() {\n const i = interpret(this.value);\n if (i !== false) {\n _this.__color.__state = i;\n _this.setValue(_this.__color.toOriginal());\n } else {\n this.value = _this.__color.toString();\n }\n }\n function onBlur2() {\n const i = interpret(this.value);\n if (i !== false) {\n _this.__color2.__state = i;\n _this.setValue2(_this.__color2.toOriginal());\n } else {\n this.value = _this.__color2.toString();\n }\n }\n\n function fieldUpH() {\n dom.unbind(window, 'mousemove', setH);\n dom.unbind(window, 'mouseup', fieldUpH);\n onFinish();\n }\n function fieldUpH2() {\n dom.unbind(window, 'mousemove', setH2);\n dom.unbind(window, 'mouseup', fieldUpH2);\n onFinish2();\n }\n\n function onFinish() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.__color2.toOriginal());\n }\n }\n function onFinish2() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.__color.toOriginal());\n }\n }\n\n this.__saturation_field.appendChild(valueField);\n this.__selector.appendChild(this.__field_knob);\n this.__selector.appendChild(this.__field_knob2);\n this.__selector.appendChild(this.__saturation_field);\n\n this.__saturation_field2.appendChild(valueField2);\n this.__selector.appendChild(this.__saturation_field2);\n\n this.__selector.appendChild(this.__hue_field);\n this.__hue_field.appendChild(this.__hue_knob);\n this.__hue_field2.appendChild(this.__hue_knob2);\n this.__selector.appendChild(this.__hue_field2);\n\n this.domElement.appendChild(this.__input2);\n this.domElement.appendChild(this.__input);\n\n this.domElement.appendChild(this.__selector);\n\n this.updateDisplay();\n\n function setSV2(e) {\n e.preventDefault();\n\n const fieldRect = _this.__saturation_field2.getBoundingClientRect();\n let s = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n let v = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (v > 1) {\n v = 1;\n } else if (v < 0) {\n v = 0;\n }\n\n if (s > 1) {\n s = 1;\n } else if (s < 0) {\n s = 0;\n }\n\n _this.__color2.v = v;\n _this.__color2.s = s;\n\n _this.setValue2(_this.__color2.toOriginal());\n\n\n return false;\n }\n function setSV(e) {\n e.preventDefault();\n\n const fieldRect = _this.__saturation_field.getBoundingClientRect();\n let s = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n let v = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (v > 1) {\n v = 1;\n } else if (v < 0) {\n v = 0;\n }\n\n if (s > 1) {\n s = 1;\n } else if (s < 0) {\n s = 0;\n }\n\n _this.__color.v = v;\n _this.__color.s = s;\n\n _this.setValue(_this.__color.toOriginal());\n\n\n return false;\n }\n\n function setH2(e) {\n e.preventDefault();\n\n const fieldRect = _this.__hue_field2.getBoundingClientRect();\n let h = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (h > 1) {\n h = 1;\n } else if (h < 0) {\n h = 0;\n }\n\n _this.__color2.h = h * 360;\n\n _this.setValue2(_this.__color2.toOriginal());\n\n return false;\n }\n function setH(e) {\n e.preventDefault();\n\n const fieldRect = _this.__hue_field.getBoundingClientRect();\n let h = 1 - (e.clientY - fieldRect.top) / (fieldRect.bottom - fieldRect.top);\n\n if (h > 1) {\n h = 1;\n } else if (h < 0) {\n h = 0;\n }\n\n _this.__color.h = h * 360;\n\n _this.setValue(_this.__color.toOriginal());\n\n return false;\n }\n }\n\n updateDisplay() {\n const i = interpret(this.getValue());\n\n if (i !== false) {\n let mismatch = false;\n\n // Check for mismatch on the interpreted value.\n\n common.each(Color.COMPONENTS, function(component) {\n if (!common.isUndefined(i[component]) && !common.isUndefined(this.__color.__state[component]) &&\n i[component] !== this.__color.__state[component]) {\n mismatch = true;\n return {}; // break\n }\n }, this);\n\n // If nothing diverges, we keep our previous values\n // for statefulness, otherwise we recalculate fresh\n if (mismatch) {\n common.extend(this.__color.__state, i);\n }\n }\n\n common.extend(this.__temp.__state, this.__color.__state);\n common.extend(this.__temp2.__state, this.__color2.__state);\n\n this.__temp.a = 1;\n this.__temp2.a = 1;\n\n const flip = (this.__color.v < 0.5 || this.__color.s > 0.5) ? 255 : 0;\n const _flip = 255 - flip;\n const flip2 = (this.__color2.v < 0.5 || this.__color2.s > 0.5) ? 255 : 0;\n const _flip2 = 255 - flip2;\n\n common.extend(this.__field_knob.style, {\n marginLeft: 100 * this.__color.s - 7 + 'px',\n marginTop: 100 * (1 - this.__color.v) - 7 + 'px',\n backgroundColor: this.__temp.toHexString(),\n border: this.__field_knob_border + 'rgb(' + flip + ',' + flip + ',' + flip + ')'\n });\n common.extend(this.__field_knob2.style, {\n marginLeft: 100 * this.__color2.s - 7 + 'px',\n marginTop: 100 * (1 - this.__color2.v) - 7 + 'px',\n backgroundColor: this.__temp2.toHexString(),\n border: this.__field_knob_border2 + 'rgb(' + flip2 + ',' + flip2 + ',' + flip2 + ')'\n });\n\n this.__hue_knob.style.marginTop = (1 - this.__color.h / 360) * 100 + 'px';\n this.__hue_knob2.style.marginTop = (1 - this.__color2.h / 360) * 100 + 'px';\n\n this.__temp.s = 1;\n this.__temp.v = 1;\n this.__temp2.s = 1;\n this.__temp2.v = 1;\n\n linearGradient(this.__saturation_field, 'left', '#fff', this.__temp.toHexString());\n linearGradient(this.__saturation_field2, 'left', '#fff', this.__temp2.toHexString());\n\n this.__input.value = this.__color.toString();\n this.__input2.value = this.__color2.toString();\n\n common.extend(this.__input.style, {\n backgroundColor: this.__color.toHexString(),\n color: 'rgb(' + flip + ',' + flip + ',' + flip + ')',\n textShadow: this.__input_textShadow + 'rgba(' + _flip + ',' + _flip + ',' + _flip + ',.7)'\n });\n common.extend(this.__input2.style, {\n backgroundColor: this.__color2.toHexString(),\n color: 'rgb(' + flip2 + ',' + flip2 + ',' + flip2 + ')',\n textShadow: this.__input_textShadow + 'rgba(' + _flip2 + ',' + _flip2 + ',' + _flip2 + ',.7)'\n });\n }\n}\n\nconst vendors = ['-moz-', '-o-', '-webkit-', '-ms-', ''];\n\nfunction linearGradient(elem, x, a, b) {\n elem.style.background = '';\n common.each(vendors, function(vendor) {\n elem.style.cssText += 'background: ' + vendor + 'linear-gradient(' + x + ', ' + a + ' 0%, ' + b + ' 100%); ';\n });\n}\n\nfunction hueGradient(elem) {\n elem.style.background = '';\n elem.style.cssText += 'background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);';\n elem.style.cssText += 'background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n}\n\nexport default GtColorController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/GtColorController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport Controller from './Controller';\nimport dom from '../dom/dom';\nimport Color from '../color/Color';\nimport interpret from '../color/interpret';\nimport common from '../utils/common';\n\nclass HSVColorController extends Controller {\n\n\n constructor(object, property) {\n super(object, property);\n\n this.__color = new Color(this.getValue());\n this.__temp = new Color(0);\n this.__temp2 = new Color(0);\n\n const _this = this;\n this.domElement = document.createElement('div');\n dom.makeSelectable(this.domElement, false);\n this.__selector = document.createElement('div');\n this.__field_knob = document.createElement('div');\n this.__field_knob.className = 'field-knob';\n this.__field_knob_border = '2px solid ';\n this.__field_knob2 = document.createElement('div');\n this.__field_knob2.className = 'field-knob';\n this.__field_knob_border2 = '2px solid ';\n this.__field_knob3 = document.createElement('div');\n this.__field_knob3.className = 'field-knob';\n this.__field_knob_border3 = '2px solid ';\n this.__hsv_field = document.createElement('div');\n this.__hsv_field.className = 'hue-field';\n this.__hsv_field2 = document.createElement('div');\n this.__hsv_field2.className = 'hue-field';\n this.__hsv_field3 = document.createElement('div');\n this.__hsv_field3.className = 'hue-field';\n this.__hsv_fieldLabel = document.createElement('Label');\n this.__hsv_fieldLabel.innerHTML = 'H:';\n this.__hsv_fieldLabel2 = document.createElement('Label');\n this.__hsv_fieldLabel2.innerHTML = 'S:';\n this.__hsv_fieldLabel3 = document.createElement('Label');\n this.__hsv_fieldLabel3.innerHTML = 'V:';\n\n this.__input = document.createElement('input');\n this.__input.type = 'text';\n this.__input_textShadow = '0 1px 1px ';\n\n dom.bind(this.__input, 'keydown', function(e) {\n if (e.keyCode === 13) { // on enter\n onBlur.call(this);\n }\n });\n\n dom.bind(this.__input, 'blur', onBlur);\n\n const valueField = document.createElement('div');\n\n common.extend(this.__selector.style, {\n width: '256px',\n height: '10px',\n marginTop: '22px',\n backgroundColor: '#222',\n boxShadow: '0px 1px 3px rgba(0,0,0,0.3)'\n });\n\n common.extend(this.__field_knob.style, {\n position: 'absolute',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border + (this.__color.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n top: '-2',\n zIndex: 1\n });\n common.extend(this.__field_knob2.style, {\n position: 'absolute',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border + (this.__color.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n top: '-2',\n zIndex: 1\n });\n common.extend(this.__field_knob3.style, {\n position: 'absolute',\n width: '12px',\n height: '12px',\n border: this.__field_knob_border + (this.__color.v < 0.5 ? '#fff' : '#000'),\n boxShadow: '0px 1px 3px rgba(0,0,0,0.5)',\n borderRadius: '12px',\n top: '-2',\n zIndex: 1\n });\n\n\n common.extend(valueField.style, {\n width: '100%',\n height: '100%',\n background: 'none'\n });\n\n\n common.extend(this.__hsv_field.style, {\n width: '256px',\n height: '20px',\n border: '1px solid #555',\n position: 'absolute',\n top: '30px',\n left: '0px'\n });\n common.extend(this.__hsv_field2.style, {\n width: '256px',\n height: '20px',\n border: '1px solid #555',\n position: 'absolute',\n top: '55px',\n left: '0px'\n });\n common.extend(this.__hsv_field3.style, {\n width: '256px',\n height: '20px',\n border: '1px solid #555',\n position: 'absolute',\n top: '80px',\n left: '0px'\n });\n\n hueGradient(this.__hsv_field);\n hueGradient(this.__hsv_field2);\n hueGradient(this.__hsv_field3);\n\n common.extend(this.__input.style, {\n outline: 'none',\n textAlign: 'center',\n color: '#fff',\n border: 0,\n left: '0px',\n position: 'absolute',\n fontWeight: 'bold',\n width: '256px',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n common.extend(this.__hsv_fieldLabel.style, {\n outline: 'none',\n textAlign: 'left',\n color: '#fff',\n border: 0,\n left: '-70px',\n position: 'absolute',\n font: 'bold 12px Courier',\n width: '50px',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n common.extend(this.__hsv_fieldLabel2.style, {\n outline: 'none',\n textAlign: 'left',\n color: '#fff',\n border: 0,\n left: '-70px',\n position: 'absolute',\n font: 'bold 12px Courier',\n width: '50px',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n common.extend(this.__hsv_fieldLabel3.style, {\n outline: 'none',\n textAlign: 'left',\n color: '#fff',\n border: 0,\n left: '-70px',\n position: 'absolute',\n font: 'bold 12px Courier',\n width: '50px',\n textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)'\n });\n\n dom.bind(this.__hsv_field, 'mousedown', function(e) {\n setH(e);\n dom.bind(window, 'mousemove', setH);\n dom.bind(window, 'mouseup', fieldUpH);\n });\n dom.bind(this.__hsv_field2, 'mousedown', function(e) {\n setS(e);\n dom.bind(window, 'mousemove', setS);\n dom.bind(window, 'mouseup', fieldUpS);\n });\n dom.bind(this.__hsv_field3, 'mousedown', function(e) {\n setV(e);\n dom.bind(window, 'mousemove', setV);\n dom.bind(window, 'mouseup', fieldUpV);\n });\n\n function fieldUpH() {\n dom.unbind(window, 'mousemove', setH);\n dom.unbind(window, 'mouseup', fieldUpH);\n onFinish();\n }\n function fieldUpS() {\n dom.unbind(window, 'mousemove', setS);\n dom.unbind(window, 'mouseup', fieldUpS);\n onFinish();\n }\n function fieldUpV() {\n dom.unbind(window, 'mousemove', setV);\n dom.unbind(window, 'mouseup', fieldUpV);\n onFinish();\n }\n\n\n function onBlur() {\n const i = interpret(this.value);\n if (i !== false) {\n _this.__color.__state = i;\n _this.setValue(_this.__color.toOriginal());\n } else {\n this.value = _this.__color.toString();\n }\n }\n\n function onFinish() {\n if (_this.__onFinishChange) {\n _this.__onFinishChange.call(_this, _this.__color.toOriginal());\n }\n }\n\n common.extend(this.domElement.style, { height: '100px' });\n\n this.__hsv_field.appendChild(this.__field_knob);\n this.__hsv_field2.appendChild(this.__field_knob2);\n this.__hsv_field3.appendChild(this.__field_knob3);\n\n this.__selector.appendChild(this.__hsv_field);\n this.__selector.appendChild(this.__hsv_field2);\n this.__selector.appendChild(this.__hsv_field3);\n this.__hsv_field.appendChild(this.__hsv_fieldLabel);\n this.__hsv_field2.appendChild(this.__hsv_fieldLabel2);\n this.__hsv_field3.appendChild(this.__hsv_fieldLabel3);\n this.domElement.appendChild(this.__input);\n this.domElement.appendChild(this.__selector);\n\n this.updateDisplay();\n\n\n function setS(e) {\n const fieldRect = _this.__hsv_field.getBoundingClientRect();\n const s = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n e.preventDefault();\n _this.__color.s = Math.min(Math.max(s, 0), 1);\n _this.setValue(_this.__color.toOriginal());\n return false;\n }\n function setV(e) {\n const fieldRect = _this.__hsv_field.getBoundingClientRect();\n const v = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n e.preventDefault();\n _this.__color.v = Math.min(Math.max(v, 0), 1);\n _this.setValue(_this.__color.toOriginal());\n return false;\n }\n function setH(e) {\n const fieldRect = _this.__hsv_field.getBoundingClientRect();\n const h = (e.clientX - fieldRect.left) / (fieldRect.right - fieldRect.left);\n e.preventDefault();\n _this.__color.h = Math.min(Math.max(h, 0), 1) * 360;\n _this.setValue(_this.__color.toOriginal());\n return false;\n }\n }\n\n updateDisplay() {\n const i = interpret(this.getValue());\n\n if (i !== false) {\n let mismatch = false;\n\n // Check for mismatch on the interpreted value.\n\n common.each(Color.COMPONENTS, function(component) {\n if (!common.isUndefined(i[component]) && !common.isUndefined(this.__color.__state[component]) &&\n i[component] !== this.__color.__state[component]) {\n mismatch = true;\n return {}; // break\n }\n }, this);\n\n // If nothing diverges, we keep our previous values\n // for statefulness, otherwise we recalculate fresh\n if (mismatch) {\n common.extend(this.__color.__state, i);\n }\n }\n\n common.extend(this.__temp.__state, this.__color.__state);\n\n this.__temp.a = 1;\n this.__temp2.a = 1;\n\n const flip = (this.__color.v < 0.5 || this.__color.s > 0.5) ? 255 : 0;\n const _flip = 255 - flip;\n\n common.extend(this.__field_knob.style, {\n marginLeft: (parseInt(this.__color.h / 360 * 256 - 7, 10)) + 'px',\n marginTop: '5px',\n border: this.__field_knob_border + 'rgb(255,255,255)'\n });\n common.extend(this.__field_knob2.style, {\n marginLeft: 256 * this.__color.s - 7 + 'px',\n marginTop: '5px',\n border: this.__field_knob_border + 'rgb(' + flip + ',' + flip + ',' + flip + ')'\n });\n common.extend(this.__field_knob3.style, {\n marginLeft: 256 * this.__color.v - 7 + 'px',\n marginTop: '5px',\n border: this.__field_knob_border + 'rgb(' + flip + ',' + flip + ',' + flip + ')'\n });\n\n this.__hsv_fieldLabel.innerHTML = 'H: ' + parseInt(this.__color.h, 10);\n this.__hsv_fieldLabel2.innerHTML = 'S: ' + parseInt(this.__color.s * 100, 10);\n this.__hsv_fieldLabel3.innerHTML = 'V: ' + parseInt(this.__color.v * 100, 10);\n\n this.__temp.h = this.__color.h;\n this.__temp.v = this.__color.v;\n this.__temp.s = 1;\n this.__temp2.s = this.__color.s;\n this.__temp2.h = this.__color.h;\n this.__temp2.v = 1;\n\n linearGradient(this.__hsv_field2, 'left', '#fff', this.__temp.toHexString());\n linearGradient(this.__hsv_field3, 'left', '#000', this.__temp2.toHexString());\n\n this.__input.value = this.__color.toString();\n\n common.extend(this.__input.style, {\n backgroundColor: this.__color.toHexString(),\n color: 'rgb(' + flip + ',' + flip + ',' + flip + ')',\n textShadow: this.__input_textShadow + 'rgba(' + _flip + ',' + _flip + ',' + _flip + ',.7)'\n });\n }\n}\n\nconst vendors = ['-moz-', '-o-', '-webkit-', '-ms-', ''];\n\nfunction linearGradient(elem, x, a, b) {\n elem.style.background = '';\n common.each(vendors, function(vendor) {\n elem.style.cssText += 'background: ' + vendor + 'linear-gradient(' + x + ', ' + a + ' 0%, ' + b + ' 100%); ';\n });\n}\n\nfunction hueGradient(elem) {\n elem.style.background = '';\n elem.style.cssText += 'background: -moz-linear-gradient(right, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);';\n elem.style.cssText += 'background: -webkit-linear-gradient(right, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -o-linear-gradient(right, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: -ms-linear-gradient(right, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n elem.style.cssText += 'background: linear-gradient(right, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);';\n}\n\nexport default HSVColorController;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/HSVColorController.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport css from '../utils/css';\nimport saveDialogueContents from './saveDialogue.html';\nimport ControllerFactory from '../controllers/ControllerFactory';\nimport Controller from '../controllers/Controller';\nimport BooleanController from '../controllers/BooleanController';\nimport FunctionController from '../controllers/FunctionController';\nimport NumberControllerBox from '../controllers/NumberControllerBox';\nimport NumberControllerSlider from '../controllers/NumberControllerSlider';\nimport ColorController from '../controllers/ColorController';\nimport BgColorController from '../controllers/BgColorController';\nimport NgColorController from '../controllers/NgColorController';\nimport HSVColorController from '../controllers/HSVColorController';\nimport GtColorController from '../controllers/GtColorController';\nimport requestAnimationFrame from '../utils/requestAnimationFrame';\nimport CenteredDiv from '../dom/CenteredDiv';\nimport dom from '../dom/dom';\nimport common from '../utils/common';\n\nimport styleSheet from './style.scss'; // CSS to embed in build\n\ncss.inject(styleSheet);\n\n/** Outer-most className for GUI's */\nconst CSS_NAMESPACE = 'dg';\n\nconst HIDE_KEY_CODE = 72;\n\n/** The only value shared between the JS and SCSS. Use caution. */\nconst CLOSE_BUTTON_HEIGHT = 20;\n\nconst DEFAULT_DEFAULT_PRESET_NAME = 'Default';\n\nconst SUPPORTS_LOCAL_STORAGE = (function() {\n try {\n return 'localStorage' in window && window.localStorage !== null;\n } catch (e) {\n return false;\n }\n}());\n\nlet SAVE_DIALOGUE;\n\n/** Have we yet to create an autoPlace GUI? */\nlet autoPlaceVirgin = true;\n\n/** Fixed position div that auto place GUI's go inside */\nlet autoPlaceContainer;\n\n/** Are we hiding the GUI's ? */\nlet hide = false;\n\n/** GUI's which should be hidden */\nconst hideableGuis = [];\n\n/**\n * A lightweight controller library for JavaScript. It allows you to easily\n * manipulate variables and fire functions on the fly.\n * @class\n *\n * @member dat.gui\n *\n * @param {Object} [params]\n * @param {String} [params.name] The name of this GUI.\n * @param {Object} [params.load] JSON object representing the saved state of\n * this GUI.\n * @param {Boolean} [params.auto=true]\n * @param {dat.gui.GUI} [params.parent] The GUI I'm nested in.\n * @param {Boolean} [params.closed] If true, starts closed\n * @param {Boolean} [params.closeOnTop] If true, close/open button shows on top of the GUI\n */\nconst GUI = function(pars) {\n const _this = this;\n\n let params = pars || {};\n\n /**\n * Outermost DOM Element\n * @type DOMElement\n */\n this.domElement = document.createElement('div');\n this.__ul = document.createElement('ul');\n this.domElement.appendChild(this.__ul);\n\n dom.addClass(this.domElement, CSS_NAMESPACE);\n\n /**\n * Nested GUI's by name\n * @ignore\n */\n this.__folders = {};\n\n this.__controllers = [];\n\n /**\n * List of objects I'm remembering for save, only used in top level GUI\n * @ignore\n */\n this.__rememberedObjects = [];\n\n /**\n * Maps the index of remembered objects to a map of controllers, only used\n * in top level GUI.\n *\n * @private\n * @ignore\n *\n * @example\n * [\n * {\n * propertyName: Controller,\n * anotherPropertyName: Controller\n * },\n * {\n * propertyName: Controller\n * }\n * ]\n */\n this.__rememberedObjectIndecesToControllers = [];\n\n this.__listening = [];\n\n // Default parameters\n params = common.defaults(params, {\n closeOnTop: false,\n autoPlace: true,\n width: GUI.DEFAULT_WIDTH\n });\n\n params = common.defaults(params, {\n resizable: params.autoPlace,\n hideable: params.autoPlace\n });\n\n if (!common.isUndefined(params.load)) {\n // Explicit preset\n if (params.preset) {\n params.load.preset = params.preset;\n }\n } else {\n params.load = { preset: DEFAULT_DEFAULT_PRESET_NAME };\n }\n\n if (common.isUndefined(params.parent) && params.hideable) {\n hideableGuis.push(this);\n }\n\n // Only root level GUI's are resizable.\n params.resizable = common.isUndefined(params.parent) && params.resizable;\n\n if (params.autoPlace && common.isUndefined(params.scrollable)) {\n params.scrollable = true;\n }\n// params.scrollable = common.isUndefined(params.parent) && params.scrollable === true;\n\n // Not part of params because I don't want people passing this in via\n // constructor. Should be a 'remembered' value.\n let useLocalStorage =\n SUPPORTS_LOCAL_STORAGE &&\n localStorage.getItem(getLocalStorageHash(this, 'isLocal')) === 'true';\n\n let saveToLocalStorage;\n\n Object.defineProperties(this,\n /** @lends dat.gui.GUI.prototype */\n {\n /**\n * The parent <code>GUI</code>\n * @type dat.gui.GUI\n */\n parent: {\n get: function() {\n return params.parent;\n }\n },\n\n scrollable: {\n get: function() {\n return params.scrollable;\n }\n },\n\n /**\n * Handles <code>GUI</code>'s element placement for you\n * @type Boolean\n */\n autoPlace: {\n get: function() {\n return params.autoPlace;\n }\n },\n\n /**\n * Handles <code>GUI</code>'s position of open/close button\n * @type Boolean\n */\n closeOnTop: {\n get: function() {\n return params.closeOnTop;\n }\n },\n\n /**\n * The identifier for a set of saved values\n * @type String\n */\n preset: {\n get: function() {\n if (_this.parent) {\n return _this.getRoot().preset;\n }\n\n return params.load.preset;\n },\n\n set: function(v) {\n if (_this.parent) {\n _this.getRoot().preset = v;\n } else {\n params.load.preset = v;\n }\n setPresetSelectIndex(this);\n _this.revert();\n }\n },\n\n /**\n * The width of <code>GUI</code> element\n * @type Number\n */\n width: {\n get: function() {\n return params.width;\n },\n set: function(v) {\n params.width = v;\n setWidth(_this, v);\n }\n },\n\n /**\n * The name of <code>GUI</code>. Used for folders. i.e\n * a folder's name\n * @type String\n */\n name: {\n get: function() {\n return params.name;\n },\n set: function(v) {\n // TODO Check for collisions among sibling folders\n params.name = v;\n if (titleRowName) {\n titleRowName.innerHTML = params.name;\n }\n }\n },\n\n /**\n * Whether the <code>GUI</code> is collapsed or not\n * @type Boolean\n */\n closed: {\n get: function() {\n return params.closed;\n },\n set: function(v) {\n params.closed = v;\n if (params.closed) {\n dom.addClass(_this.__ul, GUI.CLASS_CLOSED);\n } else {\n dom.removeClass(_this.__ul, GUI.CLASS_CLOSED);\n }\n // For browsers that aren't going to respect the CSS transition,\n // Lets just check our height against the window height right off\n // the bat.\n this.onResize();\n\n if (_this.__closeButton) {\n _this.__closeButton.innerHTML = v ? GUI.TEXT_OPEN : GUI.TEXT_CLOSED;\n }\n }\n },\n\n /**\n * Contains all presets\n * @type Object\n */\n load: {\n get: function() {\n return params.load;\n }\n },\n\n /**\n * Determines whether or not to use <a href=\"https://developer.mozilla.org/en/DOM/Storage#localStorage\">localStorage</a> as the means for\n * <code>remember</code>ing\n * @type Boolean\n */\n useLocalStorage: {\n\n get: function() {\n return useLocalStorage;\n },\n set: function(bool) {\n if (SUPPORTS_LOCAL_STORAGE) {\n useLocalStorage = bool;\n if (bool) {\n dom.bind(window, 'unload', saveToLocalStorage);\n } else {\n dom.unbind(window, 'unload', saveToLocalStorage);\n }\n localStorage.setItem(getLocalStorageHash(_this, 'isLocal'), bool);\n }\n }\n }\n });\n\n // Are we a root level GUI?\n if (common.isUndefined(params.parent)) {\n params.closed = false;\n\n dom.addClass(this.domElement, GUI.CLASS_MAIN);\n dom.makeSelectable(this.domElement, false);\n\n // Are we supposed to be loading locally?\n if (SUPPORTS_LOCAL_STORAGE) {\n if (useLocalStorage) {\n _this.useLocalStorage = true;\n\n const savedGui = localStorage.getItem(getLocalStorageHash(this, 'gui'));\n\n if (savedGui) {\n params.load = JSON.parse(savedGui);\n }\n }\n }\n\n this.__closeButton = document.createElement('div');\n this.__closeButton.innerHTML = GUI.TEXT_CLOSED;\n dom.addClass(this.__closeButton, GUI.CLASS_CLOSE_BUTTON);\n if (params.closeOnTop) {\n dom.addClass(this.__closeButton, GUI.CLASS_CLOSE_TOP);\n this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0]);\n } else {\n dom.addClass(this.__closeButton, GUI.CLASS_CLOSE_BOTTOM);\n this.domElement.appendChild(this.__closeButton);\n }\n\n dom.bind(this.__closeButton, 'click', function() {\n _this.closed = !_this.closed;\n });\n // Oh, you're a nested GUI!\n } else {\n if (params.closed === undefined) {\n params.closed = true;\n }\n\n const titleRowName = document.createTextNode(params.name);\n dom.addClass(titleRowName, 'controller-name');\n\n const titleRow = addRow(_this, titleRowName);\n\n const onClickTitle = function(e) {\n e.preventDefault();\n _this.closed = !_this.closed;\n return false;\n };\n\n dom.addClass(this.__ul, GUI.CLASS_CLOSED);\n\n dom.addClass(titleRow, 'title');\n dom.bind(titleRow, 'click', onClickTitle);\n\n if (!params.closed) {\n this.closed = false;\n }\n }\n\n if (params.autoPlace) {\n if (common.isUndefined(params.parent)) {\n if (autoPlaceVirgin) {\n autoPlaceContainer = document.createElement('div');\n dom.addClass(autoPlaceContainer, CSS_NAMESPACE);\n dom.addClass(autoPlaceContainer, GUI.CLASS_AUTO_PLACE_CONTAINER);\n document.body.appendChild(autoPlaceContainer);\n autoPlaceVirgin = false;\n }\n\n // Put it in the dom for you.\n autoPlaceContainer.appendChild(this.domElement);\n\n // Apply the auto styles\n dom.addClass(this.domElement, GUI.CLASS_AUTO_PLACE);\n }\n\n\n // Make it not elastic.\n if (!this.parent) {\n setWidth(_this, params.width);\n }\n }\n\n this.__resizeHandler = function() {\n _this.onResizeDebounced();\n };\n\n dom.bind(window, 'resize', this.__resizeHandler);\n dom.bind(this.__ul, 'webkitTransitionEnd', this.__resizeHandler);\n dom.bind(this.__ul, 'transitionend', this.__resizeHandler);\n dom.bind(this.__ul, 'oTransitionEnd', this.__resizeHandler);\n this.onResize();\n\n if (params.resizable) {\n addResizeHandle(this);\n }\n\n saveToLocalStorage = function() {\n if (SUPPORTS_LOCAL_STORAGE && localStorage.getItem(getLocalStorageHash(_this, 'isLocal')) === 'true') {\n localStorage.setItem(getLocalStorageHash(_this, 'gui'), JSON.stringify(_this.getSaveObject()));\n }\n };\n\n // expose this method publicly\n this.saveToLocalStorageIfPossible = saveToLocalStorage;\n\n function resetWidth() {\n const root = _this.getRoot();\n root.width += 1;\n common.defer(function() {\n root.width -= 1;\n });\n }\n\n if (!params.parent) {\n resetWidth();\n }\n};\n\nGUI.toggleHide = function() {\n hide = !hide;\n common.each(hideableGuis, function(gui) {\n gui.domElement.style.display = hide ? 'none' : '';\n });\n};\n\nGUI.CLASS_AUTO_PLACE = 'a';\nGUI.CLASS_AUTO_PLACE_CONTAINER = 'ac';\nGUI.CLASS_MAIN = 'main';\nGUI.CLASS_CONTROLLER_ROW = 'cr';\nGUI.CLASS_TOO_TALL = 'taller-than-window';\nGUI.CLASS_CLOSED = 'closed';\nGUI.CLASS_CLOSE_BUTTON = 'close-button';\nGUI.CLASS_CLOSE_TOP = 'close-top';\nGUI.CLASS_CLOSE_BOTTOM = 'close-bottom';\nGUI.CLASS_DRAG = 'drag';\n\nGUI.DEFAULT_WIDTH = 245;\nGUI.TEXT_CLOSED = 'Close Controls';\nGUI.TEXT_OPEN = 'Open Controls';\n\nGUI._keydownHandler = function(e) {\n if (document.activeElement.type !== 'text' &&\n (e.which === HIDE_KEY_CODE || e.keyCode === HIDE_KEY_CODE)) {\n GUI.toggleHide();\n }\n};\ndom.bind(window, 'keydown', GUI._keydownHandler, false);\n\ncommon.extend(\n GUI.prototype,\n\n /** @lends dat.gui.GUI */\n {\n\n /**\n * @param object\n * @param property\n * @returns {dat.controllers.Controller} The new controller that was added.\n * @instance\n */\n add: function(object, property) {\n return add(\n this,\n object,\n property,\n {\n factoryArgs: Array.prototype.slice.call(arguments, 2)\n }\n );\n },\n\n /**\n * @param object\n * @param property\n * @returns {dat.controllers.ColorController} The new controller that was added.\n * @instance\n */\n addColor: function(object, property) {\n return add(\n this,\n object,\n property,\n {\n color: true\n }\n );\n },\n addBgColor: function(object, property) {\n return addbg(\n this,\n object,\n property,\n {\n color: true\n }\n );\n },\n addNgColor: function(object, property) {\n return addng(\n this,\n object,\n property,\n {\n color: true\n }\n );\n },\n addGtColor: function(object, property) {\n return addgt(\n this,\n object,\n property,\n {\n color: true\n }\n );\n },\n addHSVColor: function(object, property) {\n return addhsv(\n this,\n object,\n property,\n {\n color: true\n }\n );\n },\n\n /**\n * @param controller\n * @instance\n */\n remove: function(controller) {\n // TODO listening?\n this.__ul.removeChild(controller.__li);\n this.__controllers.splice(this.__controllers.indexOf(controller), 1);\n const _this = this;\n common.defer(function() {\n _this.onResize();\n });\n },\n\n destroy: function() {\n if (this.autoPlace) {\n autoPlaceContainer.removeChild(this.domElement);\n }\n\n dom.unbind(window, 'keydown', GUI._keydownHandler, false);\n dom.unbind(window, 'resize', this.__resizeHandler);\n\n if (this.saveToLocalStorageIfPossible) {\n dom.unbind(window, 'unload', this.saveToLocalStorageIfPossible);\n }\n },\n\n /**\n * @param name\n * @returns {dat.gui.GUI} The new folder.\n * @throws {Error} if this GUI already has a folder by the specified\n * name\n * @instance\n */\n addFolder: function(name) {\n // We have to prevent collisions on names in order to have a key\n // by which to remember saved values\n if (this.__folders[name] !== undefined) {\n throw new Error('You already have a folder in this GUI by the' +\n ' name \"' + name + '\"');\n }\n\n const newGuiParams = { name: name, parent: this };\n\n // We need to pass down the autoPlace trait so that we can\n // attach event listeners to open/close folder actions to\n // ensure that a scrollbar appears if the window is too short.\n newGuiParams.autoPlace = this.autoPlace;\n\n // Do we have saved appearance data for this folder?\n if (this.load && // Anything loaded?\n this.load.folders && // Was my parent a dead-end?\n this.load.folders[name]) { // Did daddy remember me?\n // Start me closed if I was closed\n newGuiParams.closed = this.load.folders[name].closed;\n\n // Pass down the loaded data\n newGuiParams.load = this.load.folders[name];\n }\n\n const gui = new GUI(newGuiParams);\n this.__folders[name] = gui;\n\n const li = addRow(this, gui.domElement);\n dom.addClass(li, 'folder');\n return gui;\n },\n\n open: function() {\n this.closed = false;\n },\n\n close: function() {\n this.closed = true;\n },\n\n\n onResize: function() {\n // we debounce this function to prevent performance issues when rotating on tablet/mobile\n const root = this.getRoot();\n if (root.scrollable) {\n const top = dom.getOffset(root.__ul).top;\n let h = 0;\n\n common.each(root.__ul.childNodes, function(node) {\n if (!(root.autoPlace && node === root.__save_row)) {\n h += dom.getHeight(node);\n }\n });\n\n if (window.innerHeight - top - CLOSE_BUTTON_HEIGHT < h) {\n dom.addClass(root.domElement, GUI.CLASS_TOO_TALL);\n root.__ul.style.height = window.innerHeight - top - CLOSE_BUTTON_HEIGHT + 'px';\n } else {\n dom.removeClass(root.domElement, GUI.CLASS_TOO_TALL);\n root.__ul.style.height = 'auto';\n }\n }\n\n if (root.__resize_handle) {\n common.defer(function() {\n root.__resize_handle.style.height = root.__ul.offsetHeight + 'px';\n });\n }\n\n if (root.__closeButton) {\n root.__closeButton.style.width = root.width + 'px';\n }\n },\n\n onResizeDebounced: common.debounce(function() { this.onResize(); }, 50),\n\n /**\n * Mark objects for saving. The order of these objects cannot change as\n * the GUI grows. When remembering new objects, append them to the end\n * of the list.\n *\n * @param {Object...} objects\n * @throws {Error} if not called on a top level GUI.\n * @instance\n */\n remember: function() {\n if (common.isUndefined(SAVE_DIALOGUE)) {\n SAVE_DIALOGUE = new CenteredDiv();\n SAVE_DIALOGUE.domElement.innerHTML = saveDialogueContents;\n }\n\n if (this.parent) {\n throw new Error('You can only call remember on a top level GUI.');\n }\n\n const _this = this;\n\n common.each(Array.prototype.slice.call(arguments), function(object) {\n if (_this.__rememberedObjects.length === 0) {\n addSaveMenu(_this);\n }\n if (_this.__rememberedObjects.indexOf(object) === -1) {\n _this.__rememberedObjects.push(object);\n }\n });\n\n if (this.autoPlace) {\n // Set save row width\n setWidth(this, this.width);\n }\n },\n\n /**\n * @returns {dat.gui.GUI} the topmost parent GUI of a nested GUI.\n * @instance\n */\n getRoot: function() {\n let gui = this;\n while (gui.parent) {\n gui = gui.parent;\n }\n return gui;\n },\n\n /**\n * @returns {Object} a JSON object representing the current state of\n * this GUI as well as its remembered properties.\n * @instance\n */\n getSaveObject: function() {\n const toReturn = this.load;\n toReturn.closed = this.closed;\n\n // Am I remembering any values?\n if (this.__rememberedObjects.length > 0) {\n toReturn.preset = this.preset;\n\n if (!toReturn.remembered) {\n toReturn.remembered = {};\n }\n\n toReturn.remembered[this.preset] = getCurrentPreset(this);\n }\n\n toReturn.folders = {};\n common.each(this.__folders, function(element, key) {\n toReturn.folders[key] = element.getSaveObject();\n });\n\n return toReturn;\n },\n\n save: function() {\n if (!this.load.remembered) {\n this.load.remembered = {};\n }\n\n this.load.remembered[this.preset] = getCurrentPreset(this);\n markPresetModified(this, false);\n this.saveToLocalStorageIfPossible();\n },\n\n saveAs: function(presetName) {\n if (!this.load.remembered) {\n // Retain default values upon first save\n this.load.remembered = {};\n this.load.remembered[DEFAULT_DEFAULT_PRESET_NAME] = getCurrentPreset(this, true);\n }\n\n this.load.remembered[presetName] = getCurrentPreset(this);\n this.preset = presetName;\n addPresetOption(this, presetName, true);\n this.saveToLocalStorageIfPossible();\n },\n\n revert: function(gui) {\n common.each(this.__controllers, function(controller) {\n // Make revert work on Default.\n if (!this.getRoot().load.remembered) {\n controller.setValue(controller.initialValue);\n } else {\n recallSavedValue(gui || this.getRoot(), controller);\n }\n\n // fire onFinishChange callback\n if (controller.__onFinishChange) {\n controller.__onFinishChange.call(controller, controller.getValue());\n }\n }, this);\n\n common.each(this.__folders, function(folder) {\n folder.revert(folder);\n });\n\n if (!gui) {\n markPresetModified(this.getRoot(), false);\n }\n },\n\n listen: function(controller) {\n const init = this.__listening.length === 0;\n this.__listening.push(controller);\n if (init) {\n updateDisplays(this.__listening);\n }\n },\n\n updateDisplay: function() {\n common.each(this.__controllers, function(controller) {\n controller.updateDisplay();\n });\n common.each(this.__folders, function(folder) {\n folder.updateDisplay();\n });\n }\n }\n);\n\n/**\n * Add a row to the end of the GUI or before another row.\n *\n * @param gui\n * @param [newDom] If specified, inserts the dom content in the new row\n * @param [liBefore] If specified, places the new row before another row\n */\nfunction addRow(gui, newDom, liBefore) {\n const li = document.createElement('li');\n if (newDom) {\n li.appendChild(newDom);\n }\n\n if (liBefore) {\n gui.__ul.insertBefore(li, liBefore);\n } else {\n gui.__ul.appendChild(li);\n }\n gui.onResize();\n return li;\n}\n\nfunction markPresetModified(gui, modified) {\n const opt = gui.__preset_select[gui.__preset_select.selectedIndex];\n\n // console.log('mark', modified, opt);\n if (modified) {\n opt.innerHTML = opt.value + '*';\n } else {\n opt.innerHTML = opt.value;\n }\n}\n\nfunction augmentController(gui, li, controller) {\n controller.__li = li;\n controller.__gui = gui;\n\n common.extend(controller, {\n options: function(options) {\n if (arguments.length > 1) {\n const nextSibling = controller.__li.nextElementSibling;\n controller.remove();\n\n return add(\n gui,\n controller.object,\n controller.property,\n {\n before: nextSibling,\n factoryArgs: [common.toArray(arguments)]\n }\n );\n }\n\n if (common.isArray(options) || common.isObject(options)) {\n const nextSibling = controller.__li.nextElementSibling;\n controller.remove();\n\n return add(\n gui,\n controller.object,\n controller.property,\n {\n before: nextSibling,\n factoryArgs: [options]\n }\n );\n }\n },\n\n name: function(v) {\n controller.__li.firstElementChild.firstElementChild.innerHTML = v;\n return controller;\n },\n\n listen: function() {\n controller.__gui.listen(controller);\n return controller;\n },\n\n remove: function() {\n controller.__gui.remove(controller);\n return controller;\n }\n });\n\n // All sliders should be accompanied by a box.\n if (controller instanceof NumberControllerSlider) {\n const box = new NumberControllerBox(controller.object, controller.property,\n { min: controller.__min, max: controller.__max, step: controller.__step });\n\n common.each(['updateDisplay', 'onChange', 'onFinishChange', 'step'], function(method) {\n const pc = controller[method];\n const pb = box[method];\n controller[method] = box[method] = function() {\n const args = Array.prototype.slice.call(arguments);\n pb.apply(box, args);\n return pc.apply(controller, args);\n };\n });\n\n dom.addClass(li, 'has-slider');\n controller.domElement.insertBefore(box.domElement, controller.domElement.firstElementChild);\n } else if (controller instanceof NumberControllerBox) {\n const r = function(returned) {\n // Have we defined both boundaries?\n if (common.isNumber(controller.__min) && common.isNumber(controller.__max)) {\n // Well, then lets just replace this with a slider.\n\n // lets remember if the old controller had a specific name or was listening\n const oldName = controller.__li.firstElementChild.firstElementChild.innerHTML;\n const wasListening = controller.__gui.__listening.indexOf(controller) > -1;\n\n controller.remove();\n const newController = add(\n gui,\n controller.object,\n controller.property,\n {\n before: controller.__li.nextElementSibling,\n factoryArgs: [controller.__min, controller.__max, controller.__step]\n });\n\n newController.name(oldName);\n if (wasListening) newController.listen();\n\n return newController;\n }\n\n return returned;\n };\n\n controller.min = common.compose(r, controller.min);\n controller.max = common.compose(r, controller.max);\n } else if (controller instanceof BooleanController) {\n dom.bind(li, 'click', function() {\n dom.fakeEvent(controller.__checkbox, 'click');\n });\n\n dom.bind(controller.__checkbox, 'click', function(e) {\n e.stopPropagation(); // Prevents double-toggle\n });\n } else if (controller instanceof FunctionController) {\n dom.bind(li, 'click', function() {\n dom.fakeEvent(controller.__button, 'click');\n });\n\n dom.bind(li, 'mouseover', function() {\n dom.addClass(controller.__button, 'hover');\n });\n\n dom.bind(li, 'mouseout', function() {\n dom.removeClass(controller.__button, 'hover');\n });\n } else if (controller instanceof ColorController) {\n dom.addClass(li, 'color');\n controller.updateDisplay = common.compose(function(val) {\n li.style.borderLeftColor = controller.__color.toString();\n return val;\n }, controller.updateDisplay);\n\n controller.updateDisplay();\n } else if (controller instanceof BgColorController) {\n dom.addClass(li, 'color');\n controller.updateDisplay = common.compose(function(val) {\n li.style.borderLeftColor = controller.__color.toString();\n return val;\n }, controller.updateDisplay);\n\n controller.updateDisplay();\n } else if (controller instanceof NgColorController) {\n dom.addClass(li, 'color');\n controller.updateDisplay = common.compose(function(val) {\n li.style.borderLeftColor = controller.__color.toString();\n return val;\n }, controller.updateDisplay);\n\n controller.updateDisplay();\n } else if (controller instanceof HSVColorController) {\n dom.addClass(li, 'color');\n controller.updateDisplay = common.compose(function(val) {\n li.style.borderLeftColor = controller.__color.toString();\n return val;\n }, controller.updateDisplay);\n\n controller.updateDisplay();\n } else if (controller instanceof GtColorController) {\n dom.addClass(li, 'color');\n controller.updateDisplay = common.compose(function(val) {\n li.style.borderLeftColor = controller.__color.toString();\n return val;\n }, controller.updateDisplay);\n\n controller.updateDisplay();\n }\n\n controller.setValue = common.compose(function(val) {\n if (gui.getRoot().__preset_select && controller.isModified()) {\n markPresetModified(gui.getRoot(), true);\n }\n\n return val;\n }, controller.setValue);\n}\n\nfunction recallSavedValue(gui, controller) {\n // Find the topmost GUI, that's where remembered objects live.\n const root = gui.getRoot();\n\n // Does the object we're controlling match anything we've been told to\n // remember?\n const matchedIndex = root.__rememberedObjects.indexOf(controller.object);\n\n // Why yes, it does!\n if (matchedIndex !== -1) {\n // Let me fetch a map of controllers for thcommon.isObject.\n let controllerMap = root.__rememberedObjectIndecesToControllers[matchedIndex];\n\n // Ohp, I believe this is the first controller we've created for this\n // object. Lets make the map fresh.\n if (controllerMap === undefined) {\n controllerMap = {};\n root.__rememberedObjectIndecesToControllers[matchedIndex] =\n controllerMap;\n }\n\n // Keep track of this controller\n controllerMap[controller.property] = controller;\n\n // Okay, now have we saved any values for this controller?\n if (root.load && root.load.remembered) {\n const presetMap = root.load.remembered;\n\n // Which preset are we trying to load?\n let preset;\n\n if (presetMap[gui.preset]) {\n preset = presetMap[gui.preset];\n } else if (presetMap[DEFAULT_DEFAULT_PRESET_NAME]) {\n // Uhh, you can have the default instead?\n preset = presetMap[DEFAULT_DEFAULT_PRESET_NAME];\n } else {\n // Nada.\n return;\n }\n\n // Did the loaded object remember thcommon.isObject? && Did we remember this particular property?\n if (preset[matchedIndex] && preset[matchedIndex][controller.property] !== undefined) {\n // We did remember something for this guy ...\n const value = preset[matchedIndex][controller.property];\n\n // And that's what it is.\n controller.initialValue = value;\n controller.setValue(value);\n }\n }\n }\n}\n\nfunction addbg(gui, object, property, params) {\n if (object[property] === undefined) {\n throw new Error(`Object \"${object}\" has no property \"${property}\"`);\n }\n\n let controller;\n\n if (params.color) {\n controller = new BgColorController(object, property);\n } else {\n const factoryArgs = [object, property].concat(params.factoryArgs);\n controller = ControllerFactory.apply(gui, factoryArgs);\n }\n\n if (params.before instanceof Controller) {\n params.before = params.before.__li;\n }\n\n recallSavedValue(gui, controller);\n\n dom.addClass(controller.domElement, 'c');\n\n const name = document.createElement('span');\n dom.addClass(name, 'property-name');\n name.innerHTML = controller.property;\n\n const container = document.createElement('div');\n container.appendChild(name);\n container.appendChild(controller.domElement);\n\n const li = addRow(gui, container, params.before);\n\n dom.addClass(li, GUI.CLASS_CONTROLLER_ROW);\n if (controller instanceof ColorController) {\n dom.addClass(li, 'color');\n } else if (controller instanceof BgColorController) {\n dom.addClass(li, 'color');\n } else {\n dom.addClass(li, typeof controller.getValue());\n }\n\n augmentController(gui, li, controller);\n\n gui.__controllers.push(controller);\n\n return controller;\n}\nfunction addng(gui, object, property, params) {\n if (object[property] === undefined) {\n throw new Error(`Object \"${object}\" has no property \"${property}\"`);\n }\n\n let controller;\n\n if (params.color) {\n controller = new NgColorController(object, property);\n } else {\n const factoryArgs = [object, property].concat(params.factoryArgs);\n controller = ControllerFactory.apply(gui, factoryArgs);\n }\n\n if (params.before instanceof Controller) {\n params.before = params.before.__li;\n }\n\n recallSavedValue(gui, controller);\n\n dom.addClass(controller.domElement, 'c');\n\n const name = document.createElement('span');\n dom.addClass(name, 'property-name');\n name.innerHTML = controller.property;\n\n const container = document.createElement('div');\n container.appendChild(name);\n container.appendChild(controller.domElement);\n\n const li = addRow(gui, container, params.before);\n\n dom.addClass(li, GUI.CLASS_CONTROLLER_ROW);\n if (controller instanceof ColorController) {\n dom.addClass(li, 'color');\n } else if (controller instanceof NgColorController) {\n dom.addClass(li, 'color');\n } else {\n dom.addClass(li, typeof controller.getValue());\n }\n\n augmentController(gui, li, controller);\n\n gui.__controllers.push(controller);\n\n return controller;\n}\nfunction addgt(gui, object, property, params) {\n if (object[property] === undefined) {\n throw new Error(`Object \"${object}\" has no property \"${property}\"`);\n }\n\n let controller;\n\n if (params.color) {\n controller = new GtColorController(object, property);\n } else {\n const factoryArgs = [object, property].concat(params.factoryArgs);\n controller = ControllerFactory.apply(gui, factoryArgs);\n }\n\n if (params.before instanceof Controller) {\n params.before = params.before.__li;\n }\n\n recallSavedValue(gui, controller);\n\n dom.addClass(controller.domElement, 'c');\n\n const name = document.createElement('span');\n dom.addClass(name, 'property-name');\n name.innerHTML = controller.property;\n\n const container = document.createElement('div');\n container.appendChild(name);\n container.appendChild(controller.domElement);\n\n const li = addRow(gui, container, params.before);\n\n dom.addClass(li, GUI.CLASS_CONTROLLER_ROW);\n if (controller instanceof ColorController) {\n dom.addClass(li, 'color');\n } else if (controller instanceof NgColorController) {\n dom.addClass(li, 'color');\n } else {\n dom.addClass(li, typeof controller.getValue());\n }\n\n augmentController(gui, li, controller);\n\n gui.__controllers.push(controller);\n\n return controller;\n}\nfunction addhsv(gui, object, property, params) {\n if (object[property] === undefined) {\n throw new Error(`Object \"${object}\" has no property \"${property}\"`);\n }\n\n let controller;\n\n if (params.color) {\n controller = new HSVColorController(object, property);\n } else {\n const factoryArgs = [object, property].concat(params.factoryArgs);\n controller = ControllerFactory.apply(gui, factoryArgs);\n }\n\n if (params.before instanceof Controller) {\n params.before = params.before.__li;\n }\n\n recallSavedValue(gui, controller);\n\n dom.addClass(controller.domElement, 'c');\n\n const name = document.createElement('span');\n dom.addClass(name, 'property-name');\n name.innerHTML = controller.property;\n\n const container = document.createElement('div');\n container.appendChild(name);\n container.appendChild(controller.domElement);\n\n const li = addRow(gui, container, params.before);\n\n dom.addClass(li, GUI.CLASS_CONTROLLER_ROW);\n if (controller instanceof ColorController) {\n dom.addClass(li, 'color');\n } else if (controller instanceof HSVColorController) {\n dom.addClass(li, 'color');\n } else {\n dom.addClass(li, typeof controller.getValue());\n }\n\n augmentController(gui, li, controller);\n\n gui.__controllers.push(controller);\n\n return controller;\n}\n\nfunction add(gui, object, property, params) {\n if (object[property] === undefined) {\n throw new Error(`Object \"${object}\" has no property \"${property}\"`);\n }\n\n let controller;\n\n if (params.color) {\n controller = new ColorController(object, property);\n } else {\n const factoryArgs = [object, property].concat(params.factoryArgs);\n controller = ControllerFactory.apply(gui, factoryArgs);\n }\n\n if (params.before instanceof Controller) {\n params.before = params.before.__li;\n }\n\n recallSavedValue(gui, controller);\n\n dom.addClass(controller.domElement, 'c');\n\n const name = document.createElement('span');\n dom.addClass(name, 'property-name');\n name.innerHTML = controller.property;\n\n const container = document.createElement('div');\n container.appendChild(name);\n container.appendChild(controller.domElement);\n\n const li = addRow(gui, container, params.before);\n\n dom.addClass(li, GUI.CLASS_CONTROLLER_ROW);\n if (controller instanceof ColorController) {\n dom.addClass(li, 'color');\n } else if (controller instanceof BgColorController) {\n dom.addClass(li, 'color');\n } else {\n dom.addClass(li, typeof controller.getValue());\n }\n\n augmentController(gui, li, controller);\n\n gui.__controllers.push(controller);\n\n return controller;\n}\n\nfunction getLocalStorageHash(gui, key) {\n // TODO how does this deal with multiple GUI's?\n return document.location.href + '.' + key;\n}\n\nfunction addPresetOption(gui, name, setSelected) {\n const opt = document.createElement('option');\n opt.innerHTML = name;\n opt.value = name;\n gui.__preset_select.appendChild(opt);\n if (setSelected) {\n gui.__preset_select.selectedIndex = gui.__preset_select.length - 1;\n }\n}\n\nfunction showHideExplain(gui, explain) {\n explain.style.display = gui.useLocalStorage ? 'block' : 'none';\n}\n\nfunction addSaveMenu(gui) {\n const div = gui.__save_row = document.createElement('li');\n\n dom.addClass(gui.domElement, 'has-save');\n\n gui.__ul.insertBefore(div, gui.__ul.firstChild);\n\n dom.addClass(div, 'save-row');\n\n const gears = document.createElement('span');\n gears.innerHTML = ' ';\n dom.addClass(gears, 'button gears');\n\n // TODO replace with FunctionController\n const button = document.createElement('span');\n button.innerHTML = 'Save';\n dom.addClass(button, 'button');\n dom.addClass(button, 'save');\n\n const button2 = document.createElement('span');\n button2.innerHTML = 'New';\n dom.addClass(button2, 'button');\n dom.addClass(button2, 'save-as');\n\n const button3 = document.createElement('span');\n button3.innerHTML = 'Revert';\n dom.addClass(button3, 'button');\n dom.addClass(button3, 'revert');\n\n const select = gui.__preset_select = document.createElement('select');\n\n if (gui.load && gui.load.remembered) {\n common.each(gui.load.remembered, function(value, key) {\n addPresetOption(gui, key, key === gui.preset);\n });\n } else {\n addPresetOption(gui, DEFAULT_DEFAULT_PRESET_NAME, false);\n }\n\n dom.bind(select, 'change', function() {\n for (let index = 0; index < gui.__preset_select.length; index++) {\n gui.__preset_select[index].innerHTML = gui.__preset_select[index].value;\n }\n\n gui.preset = this.value;\n });\n\n div.appendChild(select);\n div.appendChild(gears);\n div.appendChild(button);\n div.appendChild(button2);\n div.appendChild(button3);\n\n if (SUPPORTS_LOCAL_STORAGE) {\n const explain = document.getElementById('dg-local-explain');\n const localStorageCheckBox = document.getElementById('dg-local-storage');\n const saveLocally = document.getElementById('dg-save-locally');\n\n saveLocally.style.display = 'block';\n\n if (localStorage.getItem(getLocalStorageHash(gui, 'isLocal')) === 'true') {\n localStorageCheckBox.setAttribute('checked', 'checked');\n }\n\n showHideExplain(gui, explain);\n\n // TODO: Use a boolean controller, fool!\n dom.bind(localStorageCheckBox, 'change', function() {\n gui.useLocalStorage = !gui.useLocalStorage;\n showHideExplain(gui, explain);\n });\n }\n\n const newConstructorTextArea = document.getElementById('dg-new-constructor');\n\n dom.bind(newConstructorTextArea, 'keydown', function(e) {\n if (e.metaKey && (e.which === 67 || e.keyCode === 67)) {\n SAVE_DIALOGUE.hide();\n }\n });\n\n dom.bind(gears, 'click', function() {\n newConstructorTextArea.innerHTML = JSON.stringify(gui.getSaveObject(), undefined, 2);\n SAVE_DIALOGUE.show();\n newConstructorTextArea.focus();\n newConstructorTextArea.select();\n });\n\n dom.bind(button, 'click', function() {\n gui.save();\n });\n\n dom.bind(button2, 'click', function() {\n const presetName = prompt('Enter a new preset name.');\n if (presetName) {\n gui.saveAs(presetName);\n }\n });\n\n dom.bind(button3, 'click', function() {\n gui.revert();\n });\n\n // div.appendChild(button2);\n}\n\nfunction addResizeHandle(gui) {\n let pmouseX;\n\n gui.__resize_handle = document.createElement('div');\n\n common.extend(gui.__resize_handle.style, {\n\n width: '6px',\n marginLeft: '-3px',\n height: '200px',\n cursor: 'ew-resize',\n position: 'absolute'\n // border: '1px solid blue'\n\n });\n\n function drag(e) {\n e.preventDefault();\n\n gui.width += pmouseX - e.clientX;\n gui.onResize();\n pmouseX = e.clientX;\n\n return false;\n }\n\n function dragStop() {\n dom.removeClass(gui.__closeButton, GUI.CLASS_DRAG);\n dom.unbind(window, 'mousemove', drag);\n dom.unbind(window, 'mouseup', dragStop);\n }\n\n function dragStart(e) {\n e.preventDefault();\n\n pmouseX = e.clientX;\n\n dom.addClass(gui.__closeButton, GUI.CLASS_DRAG);\n dom.bind(window, 'mousemove', drag);\n dom.bind(window, 'mouseup', dragStop);\n\n return false;\n }\n\n dom.bind(gui.__resize_handle, 'mousedown', dragStart);\n dom.bind(gui.__closeButton, 'mousedown', dragStart);\n\n gui.domElement.insertBefore(gui.__resize_handle, gui.domElement.firstElementChild);\n}\n\nfunction setWidth(gui, w) {\n gui.domElement.style.width = w + 'px';\n // Auto placed save-rows are position fixed, so we have to\n // set the width manually if we want it to bleed to the edge\n if (gui.__save_row && gui.autoPlace) {\n gui.__save_row.style.width = w + 'px';\n }\n if (gui.__closeButton) {\n gui.__closeButton.style.width = w + 'px';\n }\n}\n\nfunction getCurrentPreset(gui, useInitialValues) {\n const toReturn = {};\n\n // For each object I'm remembering\n common.each(gui.__rememberedObjects, function(val, index) {\n const savedValues = {};\n\n // The controllers I've made for thcommon.isObject by property\n const controllerMap =\n gui.__rememberedObjectIndecesToControllers[index];\n\n // Remember each value for each property\n common.each(controllerMap, function(controller, property) {\n savedValues[property] = useInitialValues ? controller.initialValue : controller.getValue();\n });\n\n // Save the values for thcommon.isObject\n toReturn[index] = savedValues;\n });\n\n return toReturn;\n}\n\nfunction setPresetSelectIndex(gui) {\n for (let index = 0; index < gui.__preset_select.length; index++) {\n if (gui.__preset_select[index].value === gui.preset) {\n gui.__preset_select.selectedIndex = index;\n }\n }\n}\n\nfunction updateDisplays(controllerArray) {\n if (controllerArray.length !== 0) {\n requestAnimationFrame.call(window, function() {\n updateDisplays(controllerArray);\n });\n }\n\n common.each(controllerArray, function(c) {\n c.updateDisplay();\n });\n}\n\nexport default GUI;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/gui/GUI.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nmodule.exports = {\n load: function(url, indoc) {\n const doc = indoc || document;\n const link = doc.createElement('link');\n link.type = 'text/css';\n link.rel = 'stylesheet';\n link.href = url;\n doc.getElementsByTagName('head')[0].appendChild(link);\n },\n\n inject: function(css, indoc) {\n const doc = indoc || document;\n const injected = document.createElement('style');\n injected.type = 'text/css';\n injected.innerHTML = css;\n const head = doc.getElementsByTagName('head')[0];\n try {\n head.appendChild(injected);\n } catch (e) { // Unable to inject CSS, probably because of a Content Security Policy\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./dat/utils/css.js","module.exports = \"<div id=\\\"dg-save\\\" class=\\\"dg dialogue\\\">\\n\\n Here's the new load parameter for your <code>GUI</code>'s constructor:\\n\\n <textarea id=\\\"dg-new-constructor\\\"></textarea>\\n\\n <div id=\\\"dg-save-locally\\\">\\n\\n <input id=\\\"dg-local-storage\\\" type=\\\"checkbox\\\"/> Automatically save\\n values to <code>localStorage</code> on exit.\\n\\n <div id=\\\"dg-local-explain\\\">The values saved to <code>localStorage</code> will\\n override those passed to <code>dat.GUI</code>'s constructor. This makes it\\n easier to work incrementally, but <code>localStorage</code> is fragile,\\n and your friends may not see the same values you do.\\n\\n </div>\\n\\n </div>\\n\\n</div>\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dat/gui/saveDialogue.html\n// module id = 23\n// module chunks = 0","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport OptionController from './OptionController';\nimport NumberControllerBox from './NumberControllerBox';\nimport NumberControllerSlider from './NumberControllerSlider';\nimport StringController from './StringController';\nimport FunctionController from './FunctionController';\nimport BooleanController from './BooleanController';\nimport common from '../utils/common';\n\nconst ControllerFactory = function(object, property) {\n const initialValue = object[property];\n\n // Providing options?\n if (common.isArray(arguments[2]) || common.isObject(arguments[2])) {\n return new OptionController(object, property, arguments[2]);\n }\n\n // Providing a map?\n if (common.isNumber(initialValue)) {\n // Has min and max? (slider)\n if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {\n // has step?\n if (common.isNumber(arguments[4])) {\n return new NumberControllerSlider(object, property,\n arguments[2], arguments[3], arguments[4]);\n }\n\n return new NumberControllerSlider(object, property, arguments[2], arguments[3]);\n }\n\n // number box\n if (common.isNumber(arguments[4])) { // has step\n return new NumberControllerBox(object, property,\n { min: arguments[2], max: arguments[3], step: arguments[4] });\n }\n return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] });\n }\n\n if (common.isString(initialValue)) {\n return new StringController(object, property);\n }\n\n if (common.isFunction(initialValue)) {\n return new FunctionController(object, property, '');\n }\n\n if (common.isBoolean(initialValue)) {\n return new BooleanController(object, property);\n }\n\n return null;\n};\n\nexport default ControllerFactory;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/controllers/ControllerFactory.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction requestAnimationFrame(callback) {\n setTimeout(callback, 1000 / 60);\n}\n\nexport default window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n requestAnimationFrame;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/utils/requestAnimationFrame.js","/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nimport dom from '../dom/dom';\nimport common from '../utils/common';\n\nclass CenteredDiv {\n constructor() {\n this.backgroundElement = document.createElement('div');\n common.extend(this.backgroundElement.style, {\n backgroundColor: 'rgba(0,0,0,0.8)',\n top: 0,\n left: 0,\n display: 'none',\n zIndex: '1000',\n opacity: 0,\n WebkitTransition: 'opacity 0.2s linear',\n transition: 'opacity 0.2s linear'\n });\n\n dom.makeFullscreen(this.backgroundElement);\n this.backgroundElement.style.position = 'fixed';\n\n this.domElement = document.createElement('div');\n common.extend(this.domElement.style, {\n position: 'fixed',\n display: 'none',\n zIndex: '1001',\n opacity: 0,\n WebkitTransition: '-webkit-transform 0.2s ease-out, opacity 0.2s linear',\n transition: 'transform 0.2s ease-out, opacity 0.2s linear'\n });\n\n\n document.body.appendChild(this.backgroundElement);\n document.body.appendChild(this.domElement);\n\n const _this = this;\n dom.bind(this.backgroundElement, 'click', function() {\n _this.hide();\n });\n }\n\n show() {\n const _this = this;\n\n this.backgroundElement.style.display = 'block';\n\n this.domElement.style.display = 'block';\n this.domElement.style.opacity = 0;\n// this.domElement.style.top = '52%';\n this.domElement.style.webkitTransform = 'scale(1.1)';\n\n this.layout();\n\n common.defer(function() {\n _this.backgroundElement.style.opacity = 1;\n _this.domElement.style.opacity = 1;\n _this.domElement.style.webkitTransform = 'scale(1)';\n });\n }\n\n /**\n * Hide centered div\n */\n hide() {\n const _this = this;\n\n const hide = function() {\n _this.domElement.style.display = 'none';\n _this.backgroundElement.style.display = 'none';\n\n dom.unbind(_this.domElement, 'webkitTransitionEnd', hide);\n dom.unbind(_this.domElement, 'transitionend', hide);\n dom.unbind(_this.domElement, 'oTransitionEnd', hide);\n };\n\n dom.bind(this.domElement, 'webkitTransitionEnd', hide);\n dom.bind(this.domElement, 'transitionend', hide);\n dom.bind(this.domElement, 'oTransitionEnd', hide);\n\n this.backgroundElement.style.opacity = 0;\n// this.domElement.style.top = '48%';\n this.domElement.style.opacity = 0;\n this.domElement.style.webkitTransform = 'scale(1.1)';\n }\n\n layout() {\n this.domElement.style.left = window.innerWidth / 2 - dom.getWidth(this.domElement) / 2 + 'px';\n this.domElement.style.top = window.innerHeight / 2 - dom.getHeight(this.domElement) / 2 + 'px';\n }\n}\n\nexport default CenteredDiv;\n\n\n\n// WEBPACK FOOTER //\n// ./dat/dom/CenteredDiv.js","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".dg {\\n /** Clear list styles */\\n /* Auto-place container */\\n /* Auto-placed GUI's */\\n /* Line items that don't contain folders. */\\n /** Folder names */\\n /** Hides closed items */\\n /** Controller row */\\n /** Name-half (left) */\\n /** Controller-half (right) */\\n /** Controller placement */\\n /** Shorter number boxes when slider is present. */\\n /** Ensure the entire boolean and function row shows a hand */\\n /** allow overflow for color selector */ }\\n .dg ul {\\n list-style: none;\\n margin: 0;\\n padding: 0;\\n width: 100%;\\n clear: both; }\\n .dg.ac {\\n position: fixed;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 0;\\n z-index: 0; }\\n .dg:not(.ac) .main {\\n /** Exclude mains in ac so that we don't hide close button */\\n overflow: hidden; }\\n .dg.main {\\n -webkit-transition: opacity 0.1s linear;\\n -o-transition: opacity 0.1s linear;\\n -moz-transition: opacity 0.1s linear;\\n transition: opacity 0.1s linear; }\\n .dg.main.taller-than-window {\\n overflow-y: auto; }\\n .dg.main.taller-than-window .close-button {\\n opacity: 1;\\n /* TODO, these are style notes */\\n margin-top: -1px;\\n border-top: 1px solid #2c2c2c; }\\n .dg.main ul.closed .close-button {\\n opacity: 1 !important; }\\n .dg.main:hover .close-button,\\n .dg.main .close-button.drag {\\n opacity: 1; }\\n .dg.main .close-button {\\n /*opacity: 0;*/\\n -webkit-transition: opacity 0.1s linear;\\n -o-transition: opacity 0.1s linear;\\n -moz-transition: opacity 0.1s linear;\\n transition: opacity 0.1s linear;\\n border: 0;\\n line-height: 19px;\\n height: 20px;\\n /* TODO, these are style notes */\\n cursor: pointer;\\n text-align: center;\\n background-color: #000; }\\n .dg.main .close-button.close-top {\\n position: relative; }\\n .dg.main .close-button.close-bottom {\\n position: absolute; }\\n .dg.main .close-button:hover {\\n background-color: #111; }\\n .dg.a {\\n float: right;\\n margin-right: 15px;\\n overflow-y: visible; }\\n .dg.a.has-save > ul.close-top {\\n margin-top: 0; }\\n .dg.a.has-save > ul.close-bottom {\\n margin-top: 27px; }\\n .dg.a.has-save > ul.closed {\\n margin-top: 0; }\\n .dg.a .save-row {\\n top: 0;\\n z-index: 1002; }\\n .dg.a .save-row.close-top {\\n position: relative; }\\n .dg.a .save-row.close-bottom {\\n position: fixed; }\\n .dg li {\\n -webkit-transition: height 0.1s ease-out;\\n -o-transition: height 0.1s ease-out;\\n -moz-transition: height 0.1s ease-out;\\n transition: height 0.1s ease-out;\\n -webkit-transition: overflow 0.1s linear;\\n -o-transition: overflow 0.1s linear;\\n -moz-transition: overflow 0.1s linear;\\n transition: overflow 0.1s linear; }\\n .dg li:not(.folder) {\\n cursor: auto;\\n height: 27px;\\n line-height: 27px;\\n padding: 0 4px 0 5px; }\\n .dg li.folder {\\n padding: 0;\\n border-left: 4px solid transparent; }\\n .dg li.title {\\n cursor: pointer;\\n margin-left: -4px; }\\n .dg .closed li:not(.title),\\n .dg .closed ul li,\\n .dg .closed ul li > * {\\n height: 0;\\n overflow: hidden;\\n border: 0; }\\n .dg .cr {\\n clear: both;\\n padding-left: 3px;\\n height: 27px;\\n overflow: hidden; }\\n .dg .property-name {\\n cursor: default;\\n float: left;\\n clear: left;\\n width: 40%;\\n overflow: hidden;\\n text-overflow: ellipsis; }\\n .dg .c {\\n float: left;\\n width: 60%;\\n height: 125px;\\n /*JLA*/\\n position: relative; }\\n .dg .c input[type=text] {\\n border: 0;\\n margin-top: 4px;\\n padding: 3px;\\n width: 100%;\\n float: right; }\\n .dg .has-slider input[type=text] {\\n width: 30%;\\n /*display: none;*/\\n margin-left: 0; }\\n .dg .slider {\\n float: left;\\n width: 66%;\\n margin-left: -5px;\\n margin-right: 0;\\n height: 19px;\\n margin-top: 4px; }\\n .dg .slider-fg {\\n height: 100%; }\\n .dg .c input[type=checkbox] {\\n margin-top: 7px; }\\n .dg .c select {\\n margin-top: 5px; }\\n .dg .cr.function,\\n .dg .cr.function .property-name,\\n .dg .cr.function *,\\n .dg .cr.boolean,\\n .dg .cr.boolean * {\\n cursor: pointer; }\\n .dg .cr.color {\\n overflow: visible; }\\n .dg .selector {\\n display: none;\\n position: absolute;\\n margin-left: -9px;\\n margin-top: 23px;\\n z-index: 10; }\\n .dg .c:hover .selector,\\n .dg .selector.drag {\\n display: block; }\\n .dg li.save-row {\\n padding: 0; }\\n .dg li.save-row .button {\\n display: inline-block;\\n padding: 0px 6px; }\\n .dg.dialogue {\\n background-color: #222;\\n width: 460px;\\n padding: 15px;\\n font-size: 13px;\\n line-height: 15px; }\\n\\n/* TODO Separate style and structure */\\n#dg-new-constructor {\\n padding: 10px;\\n color: #222;\\n font-family: Monaco, monospace;\\n font-size: 10px;\\n border: 0;\\n resize: none;\\n box-shadow: inset 1px 1px 1px #888;\\n word-wrap: break-word;\\n margin: 12px 0;\\n display: block;\\n width: 440px;\\n overflow-y: scroll;\\n height: 100px;\\n position: relative; }\\n\\n#dg-local-explain {\\n display: none;\\n font-size: 11px;\\n line-height: 17px;\\n border-radius: 3px;\\n background-color: #333;\\n padding: 8px;\\n margin-top: 10px; }\\n #dg-local-explain code {\\n font-size: 10px; }\\n\\n#dat-gui-save-locally {\\n display: none; }\\n\\n/** Main type */\\n.dg {\\n color: #eee;\\n font: 11px 'Lucida Grande', sans-serif;\\n text-shadow: 0 -1px 0 #111;\\n /** Auto place */\\n /* Controller row, <li> */\\n /** Controllers */ }\\n .dg.main {\\n /** Scrollbar */ }\\n .dg.main::-webkit-scrollbar {\\n width: 5px;\\n background: #1a1a1a; }\\n .dg.main::-webkit-scrollbar-corner {\\n height: 0;\\n display: none; }\\n .dg.main::-webkit-scrollbar-thumb {\\n border-radius: 5px;\\n background: #676767; }\\n .dg li:not(.folder) {\\n background: #1a1a1a;\\n border-bottom: 1px solid #2c2c2c; }\\n .dg li.save-row {\\n line-height: 25px;\\n background: #dad5cb;\\n border: 0; }\\n .dg li.save-row select {\\n margin-left: 5px;\\n width: 108px; }\\n .dg li.save-row .button {\\n margin-left: 5px;\\n margin-top: 1px;\\n border-radius: 2px;\\n font-size: 9px;\\n line-height: 7px;\\n padding: 4px 4px 5px 4px;\\n background: #c5bdad;\\n color: #fff;\\n text-shadow: 0 1px 0 #b0a58f;\\n box-shadow: 0 -1px 0 #b0a58f;\\n cursor: pointer; }\\n .dg li.save-row .button.gears {\\n 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;\\n height: 7px;\\n width: 8px; }\\n .dg li.save-row .button:hover {\\n background-color: #bab19e;\\n box-shadow: 0 -1px 0 #b0a58f; }\\n .dg li.folder {\\n border-bottom: 0; }\\n .dg li.title {\\n padding-left: 16px;\\n background: #000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;\\n cursor: pointer;\\n border-bottom: 1px solid rgba(255, 255, 255, 0.2); }\\n .dg .closed li.title {\\n background-image: url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==); }\\n .dg .cr.boolean {\\n border-left: 3px solid #806787; }\\n .dg .cr.color {\\n border-left: 3px solid; }\\n .dg .cr.function {\\n border-left: 3px solid #e61d5f; }\\n .dg .cr.number {\\n border-left: 3px solid #2FA1D6; }\\n .dg .cr.number input[type=text] {\\n color: #2FA1D6; }\\n .dg .cr.string {\\n border-left: 3px solid #1ed36f; }\\n .dg .cr.string input[type=text] {\\n color: #1ed36f; }\\n .dg .cr.function:hover, .dg .cr.boolean:hover {\\n background: #111; }\\n .dg .c input[type=text] {\\n background: #303030;\\n outline: none; }\\n .dg .c input[type=text]:hover {\\n background: #3c3c3c; }\\n .dg .c input[type=text]:focus {\\n background: #494949;\\n color: #fff; }\\n .dg .c .slider {\\n background: #303030;\\n cursor: ew-resize; }\\n .dg .c .slider-fg {\\n background: #2FA1D6;\\n max-width: 100%; }\\n .dg .c .slider:hover {\\n background: #3c3c3c; }\\n .dg .c .slider:hover .slider-fg {\\n background: #44abda; }\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dat/gui/style.scss\n// module id = 27\n// module chunks = 0","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/css-loader/lib/css-base.js\n// module id = 28\n// module chunks = 0"],"sourceRoot":""} |