From 9b26780f47e9c4941fdb3b594f7305fbae56a836 Mon Sep 17 00:00:00 2001 From: Fernando Serrano Date: Wed, 11 Jan 2017 23:01:50 +0100 Subject: [PATCH] Updated dist --- dist/aframe-inspector.js | 2138 +++++++++++++++++----------------- dist/aframe-inspector.min.js | 16 +- 2 files changed, 1056 insertions(+), 1098 deletions(-) diff --git a/dist/aframe-inspector.js b/dist/aframe-inspector.js index 87297d6d..3c4f8938 100644 --- a/dist/aframe-inspector.js +++ b/dist/aframe-inspector.js @@ -244,7 +244,7 @@ }); AFRAME.INSPECTOR = INSPECTOR; - console.log('A-Frame Inspector Version:', ("0.4.0"), '(' + ("11-01-2017") + ' Commit: ' + ("40da9176d5bc9a0204905ab90153a4d8ae766466\n").substr(0, 7) + ')'); + console.log('A-Frame Inspector Version:', ("0.4.0"), '(' + ("11-01-2017") + ' Commit: ' + ("5404d8d368f155f73325d582fa1067b78678330a\n").substr(0, 7) + ')'); })(); /***/ }, @@ -705,6 +705,17 @@ } }; + var fiveArgumentPooler = function (a1, a2, a3, a4, a5) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4, a5); + return instance; + } else { + return new Klass(a1, a2, a3, a4, a5); + } + }; + var standardReleaser = function (instance) { var Klass = this; !(instance instanceof Klass) ? (undefined) !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; @@ -744,7 +755,8 @@ oneArgumentPooler: oneArgumentPooler, twoArgumentPooler: twoArgumentPooler, threeArgumentPooler: threeArgumentPooler, - fourArgumentPooler: fourArgumentPooler + fourArgumentPooler: fourArgumentPooler, + fiveArgumentPooler: fiveArgumentPooler }; module.exports = PooledClass; @@ -819,18 +831,12 @@ * will remain to ensure logic does not differ in production. */ - var validateFormat = function validateFormat(format) {}; - - if ((undefined) !== 'production') { - validateFormat = function validateFormat(format) { + function invariant(condition, format, a, b, c, d, e, f) { + if ((undefined) !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } - }; - } - - function invariant(condition, format, a, b, c, d, e, f) { - validateFormat(format); + } if (!condition) { var error; @@ -3072,14 +3078,7 @@ // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { - if (typeof type !== 'function' && typeof type !== 'string') { - var info = ''; - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; - } - info += getDeclarationErrorAddendum(); - (undefined) !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0; - } + (undefined) !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0; } var element = ReactElement.createElement.apply(this, arguments); @@ -3197,38 +3196,30 @@ // Set.prototype.keys Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); - var setItem; - var getItem; - var removeItem; - var getItemIDs; - var addRoot; - var removeRoot; - var getRootIDs; - if (canUseCollections) { var itemMap = new Map(); var rootIDSet = new Set(); - setItem = function (id, item) { + var setItem = function (id, item) { itemMap.set(id, item); }; - getItem = function (id) { + var getItem = function (id) { return itemMap.get(id); }; - removeItem = function (id) { + var removeItem = function (id) { itemMap['delete'](id); }; - getItemIDs = function () { + var getItemIDs = function () { return Array.from(itemMap.keys()); }; - addRoot = function (id) { + var addRoot = function (id) { rootIDSet.add(id); }; - removeRoot = function (id) { + var removeRoot = function (id) { rootIDSet['delete'](id); }; - getRootIDs = function () { + var getRootIDs = function () { return Array.from(rootIDSet.keys()); }; } else { @@ -3244,31 +3235,31 @@ return parseInt(key.substr(1), 10); }; - setItem = function (id, item) { + var setItem = function (id, item) { var key = getKeyFromID(id); itemByKey[key] = item; }; - getItem = function (id) { + var getItem = function (id) { var key = getKeyFromID(id); return itemByKey[key]; }; - removeItem = function (id) { + var removeItem = function (id) { var key = getKeyFromID(id); delete itemByKey[key]; }; - getItemIDs = function () { + var getItemIDs = function () { return Object.keys(itemByKey).map(getIDFromKey); }; - addRoot = function (id) { + var addRoot = function (id) { var key = getKeyFromID(id); rootByKey[key] = true; }; - removeRoot = function (id) { + var removeRoot = function (id) { var key = getKeyFromID(id); delete rootByKey[key]; }; - getRootIDs = function () { + var getRootIDs = function () { return Object.keys(rootByKey).map(getIDFromKey); }; } @@ -4233,7 +4224,7 @@ 'use strict'; - module.exports = '15.4.2'; + module.exports = '15.4.0'; /***/ }, /* 32 */ @@ -4429,13 +4420,6 @@ var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); - /** - * Check if a given node should be cached. - */ - function shouldPrecacheNode(node, nodeID) { - return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' '; - } - /** * Drill down (through composites and empty components) until we get a host or * host text component. @@ -4501,7 +4485,7 @@ } // We assume the child nodes are in the same order as the child instances. for (; childNode !== null; childNode = childNode.nextSibling) { - if (shouldPrecacheNode(childNode, childID)) { + if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') { precacheNode(childInst, childNode); continue outer; } @@ -5640,28 +5624,6 @@ return '.' + inst._rootNodeID; }; - function isInteractive(tag) { - return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; - } - - function shouldPreventMouseEvent(name, type, props) { - switch (name) { - case 'onClick': - case 'onClickCapture': - case 'onDoubleClick': - case 'onDoubleClickCapture': - case 'onMouseDown': - case 'onMouseDownCapture': - case 'onMouseMove': - case 'onMouseMoveCapture': - case 'onMouseUp': - case 'onMouseUpCapture': - return !!(props.disabled && isInteractive(type)); - default: - return false; - } - } - /** * This is a unified interface for event plugins to be installed and configured. * @@ -5730,12 +5692,7 @@ * @return {?function} The stored callback. */ getListener: function (inst, registrationName) { - // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not - // live here; needs to be moved to a better place soon var bankForRegistrationName = listenerBank[registrationName]; - if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) { - return null; - } var key = getDictionaryKey(inst); return bankForRegistrationName && bankForRegistrationName[key]; }, @@ -6734,6 +6691,17 @@ } }; + var fiveArgumentPooler = function (a1, a2, a3, a4, a5) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4, a5); + return instance; + } else { + return new Klass(a1, a2, a3, a4, a5); + } + }; + var standardReleaser = function (instance) { var Klass = this; !(instance instanceof Klass) ? (undefined) !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; @@ -6773,7 +6741,8 @@ oneArgumentPooler: oneArgumentPooler, twoArgumentPooler: twoArgumentPooler, threeArgumentPooler: threeArgumentPooler, - fourArgumentPooler: fourArgumentPooler + fourArgumentPooler: fourArgumentPooler, + fiveArgumentPooler: fiveArgumentPooler }; module.exports = PooledClass; @@ -11576,18 +11545,12 @@ } else { var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; var childrenToUse = contentToUse != null ? null : props.children; - // TODO: Validate that text is allowed as a child of this node if (contentToUse != null) { - // Avoid setting textContent when the text is empty. In IE11 setting - // textContent on a text area will cause the placeholder to not - // show within the textarea until it has been focused and blurred again. - // https://github.com/facebook/react/issues/6731#issuecomment-254874553 - if (contentToUse !== '') { - if ((undefined) !== 'production') { - setAndValidateContentChildDev.call(this, contentToUse); - } - DOMLazyTree.queueText(lazyTree, contentToUse); + // TODO: Validate that text is allowed as a child of this node + if ((undefined) !== 'production') { + setAndValidateContentChildDev.call(this, contentToUse); } + DOMLazyTree.queueText(lazyTree, contentToUse); } else if (childrenToUse != null) { var mountImages = this.mountChildren(childrenToUse, transaction, context); for (var i = 0; i < mountImages.length; i++) { @@ -13503,17 +13466,7 @@ } } else { if (props.value == null && props.defaultValue != null) { - // In Chrome, assigning defaultValue to certain input types triggers input validation. - // For number inputs, the display value loses trailing decimal points. For email inputs, - // Chrome raises "The specified value is not a valid email address". - // - // Here we check to see if the defaultValue has actually changed, avoiding these problems - // when the user is inputting text - // - // https://github.com/facebook/react/issues/7253 - if (node.defaultValue !== '' + props.defaultValue) { - node.defaultValue = '' + props.defaultValue; - } + node.defaultValue = '' + props.defaultValue; } if (props.checked == null && props.defaultChecked != null) { node.defaultChecked = !!props.defaultChecked; @@ -14256,15 +14209,9 @@ // This is in postMount because we need access to the DOM node, which is not // available until after the component has mounted. var node = ReactDOMComponentTree.getNodeFromInstance(inst); - var textContent = node.textContent; - // Only set node.value if textContent is equal to the expected - // initial value. In IE10/IE11 there is a bug where the placeholder attribute - // will populate textContent as well. - // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ - if (textContent === inst._wrapperState.initialValue) { - node.value = textContent; - } + // Warning: node.value may be the empty string at this point (IE11) if placeholder is set. + node.value = node.textContent; // Detach value from defaultValue } }; @@ -15063,17 +15010,7 @@ instance = ReactEmptyComponent.create(instantiateReactComponent); } else if (typeof node === 'object') { var element = node; - var type = element.type; - if (typeof type !== 'function' && typeof type !== 'string') { - var info = ''; - if ((undefined) !== 'production') { - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; - } - } - info += getDeclarationErrorAddendum(element._owner); - true ? (undefined) !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0; - } + !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? (undefined) !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0; // Special case string values if (typeof element.type === 'string') { @@ -15362,7 +15299,7 @@ // Since plain JS classes are defined without any special initialization // logic, we can not catch common errors early. Therefore, we have to // catch them here, at initialization time, instead. - (undefined) !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; + (undefined) !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; (undefined) !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0; (undefined) !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0; (undefined) !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0; @@ -16363,11 +16300,14 @@ 'use strict'; - var _prodInvariant = __webpack_require__(36); + var _prodInvariant = __webpack_require__(36), + _assign = __webpack_require__(4); var invariant = __webpack_require__(8); var genericComponentClass = null; + // This registry keeps track of wrapper classes around host tags. + var tagToComponentClass = {}; var textComponentClass = null; var ReactHostComponentInjection = { @@ -16380,6 +16320,11 @@ // rendered as props. injectTextComponentClass: function (componentClass) { textComponentClass = componentClass; + }, + // This accepts a keyed object with classes as values. Each key represents a + // tag. That particular tag will use this class instead of the generic one. + injectComponentClasses: function (componentClasses) { + _assign(tagToComponentClass, componentClasses); } }; @@ -19792,6 +19737,18 @@ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; } + function shouldPreventMouseEvent(inst) { + if (inst) { + var disabled = inst._currentElement && inst._currentElement.props.disabled; + + if (disabled) { + return isInteractive(inst._tag); + } + } + + return false; + } + var SimpleEventPlugin = { eventTypes: eventTypes, @@ -19862,7 +19819,10 @@ case 'topMouseDown': case 'topMouseMove': case 'topMouseUp': - // TODO: Disabled elements should not respond to mouse events + // Disabled elements should not respond to mouse events + if (shouldPreventMouseEvent(targetInst)) { + return null; + } /* falls through */ case 'topMouseOut': case 'topMouseOver': @@ -21221,7 +21181,7 @@ 'use strict'; - module.exports = '15.4.2'; + module.exports = '15.4.0'; /***/ }, /* 173 */ @@ -21882,9 +21842,9 @@ }, _temp), _possibleConstructorReturn(_this, _ret); } - /** - * Add blank component. - * If component is instanced, generate an ID. + /** + * Add blank component. + * If component is instanced, generate an ID. */ @@ -21892,8 +21852,8 @@ key: 'getComponentsOptions', - /** - * Component dropdown options. + /** + * Component dropdown options. */ value: function getComponentsOptions() { var usedComponents = Object.keys(this.props.entity.components); @@ -21976,8 +21936,8 @@ return AddComponent; }(_react2.default.Component); - /** - * Check if component has multiplicity. + /** + * Check if component has multiplicity. */ @@ -21993,8 +21953,8 @@ } } - /** - * Generate ID for instanced component. + /** + * Generate ID for instanced component. */ function generateComponentInstanceId(entity, componentName) { var i = 2; @@ -25020,8 +24980,8 @@ } Inspector.prototype = { - /** - * Callback once the DOM is completely loaded so we could query the scene + /** + * Callback once the DOM is completely loaded so we could query the scene */ onDomLoaded: function onDomLoaded() { this.componentLoader = new ComponentLoader(); @@ -25035,8 +24995,8 @@ } }, - /** - * Callback when the a-scene is loaded + /** + * Callback when the a-scene is loaded */ onSceneLoaded: function onSceneLoaded() { var _this = this; @@ -25255,8 +25215,8 @@ deselect: function deselect() { this.select(null); }, - /** - * Reset the current scene, removing its content. + /** + * Reset the current scene, removing its content. */ clear: function clear() { this.camera.copy(this.EDITOR_CAMERA); @@ -25264,11 +25224,11 @@ document.querySelector('a-scene').innerHTML = ''; Events.emit('inspectorcleared'); }, - /** - * Helper function to add a new entity with a list of components - * @param {object} definition Entity definition to add: - * {element: 'a-entity', components: {geometry: 'primitive:box'}} - * @return {Element} Entity created + /** + * Helper function to add a new entity with a list of components + * @param {object} definition Entity definition to add: + * {element: 'a-entity', components: {geometry: 'primitive:box'}} + * @return {Element} Entity created */ createNewEntity: function createNewEntity(definition) { var _this4 = this; @@ -25293,8 +25253,8 @@ this.addObject(entity.object3D); this.selectEntity(entity); }, - /** - * Toggle the editor + /** + * Toggle the editor */ toggle: function toggle() { if (this.opened) { @@ -25303,8 +25263,8 @@ this.open(); } }, - /** - * Open the editor UI + /** + * Open the editor UI */ open: function open() { this.opened = true; @@ -25320,9 +25280,9 @@ this.sceneEl.resize(); Shortcuts.enable(); }, - /** - * Closes the editor and gives the control back to the scene - * @return {[type]} [description] + /** + * Closes the editor and gives the control back to the scene + * @return {[type]} [description] */ close: function close() { this.opened = false; @@ -25421,9 +25381,9 @@ var objectRotationOnDown = null; var objectScaleOnDown = null; - /** - * Update the helpers of the object and it childrens - * @param {object3D} object Object to update + /** + * Update the helpers of the object and it childrens + * @param {object3D} object Object to update */ function updateHelpers(object) { if (inspector.helpers[object.id] !== undefined) { @@ -25510,24 +25470,24 @@ }); sceneHelpers.add(transformControls); - /* - signals.objectSelected.add(function (object) { - selectionBox.visible = false; - if (!inspector.selected) { - // if (!inspector.selected || inspector.selected.el.helper) { - return; - } - - if (object !== null) { - if (object.geometry !== undefined && - object instanceof THREE.Sprite === false) { - selectionBox.update(object); - selectionBox.visible = true; - } - - transformControls.attach(object); - } - }); + /* + signals.objectSelected.add(function (object) { + selectionBox.visible = false; + if (!inspector.selected) { + // if (!inspector.selected || inspector.selected.el.helper) { + return; + } + + if (object !== null) { + if (object.geometry !== undefined && + object instanceof THREE.Sprite === false) { + selectionBox.update(object); + selectionBox.visible = true; + } + + transformControls.attach(object); + } + }); */ Events.on('objectchanged', function () { @@ -26154,997 +26114,997 @@ "use strict"; - /** - * @author arodic / https://github.com/arodic + /** + * @author arodic / https://github.com/arodic */ (function () { - 'use strict'; + 'use strict'; - var GizmoMaterial = function GizmoMaterial(parameters) { + var GizmoMaterial = function GizmoMaterial(parameters) { - THREE.MeshBasicMaterial.call(this); + THREE.MeshBasicMaterial.call(this); - this.depthTest = false; - this.depthWrite = false; - this.side = THREE.FrontSide; - this.transparent = true; + this.depthTest = false; + this.depthWrite = false; + this.side = THREE.FrontSide; + this.transparent = true; - this.setValues(parameters); + this.setValues(parameters); - this.oldColor = this.color.clone(); - this.oldOpacity = this.opacity; + this.oldColor = this.color.clone(); + this.oldOpacity = this.opacity; - this.highlight = function (highlighted) { + this.highlight = function (highlighted) { - if (highlighted) { + if (highlighted) { - this.color.setRGB(1, 1, 0); - this.opacity = 1; - } else { + this.color.setRGB(1, 1, 0); + this.opacity = 1; + } else { - this.color.copy(this.oldColor); - this.opacity = this.oldOpacity; - } - }; - }; + this.color.copy(this.oldColor); + this.opacity = this.oldOpacity; + } + }; + }; - GizmoMaterial.prototype = Object.create(THREE.MeshBasicMaterial.prototype); - GizmoMaterial.prototype.constructor = GizmoMaterial; + GizmoMaterial.prototype = Object.create(THREE.MeshBasicMaterial.prototype); + GizmoMaterial.prototype.constructor = GizmoMaterial; - var GizmoLineMaterial = function GizmoLineMaterial(parameters) { + var GizmoLineMaterial = function GizmoLineMaterial(parameters) { - THREE.LineBasicMaterial.call(this); + THREE.LineBasicMaterial.call(this); - this.depthTest = false; - this.depthWrite = false; - this.transparent = true; - this.linewidth = 1; + this.depthTest = false; + this.depthWrite = false; + this.transparent = true; + this.linewidth = 1; - this.setValues(parameters); + this.setValues(parameters); - this.oldColor = this.color.clone(); - this.oldOpacity = this.opacity; + this.oldColor = this.color.clone(); + this.oldOpacity = this.opacity; - this.highlight = function (highlighted) { + this.highlight = function (highlighted) { - if (highlighted) { + if (highlighted) { - this.color.setRGB(1, 1, 0); - this.opacity = 1; - } else { + this.color.setRGB(1, 1, 0); + this.opacity = 1; + } else { - this.color.copy(this.oldColor); - this.opacity = this.oldOpacity; - } - }; - }; + this.color.copy(this.oldColor); + this.opacity = this.oldOpacity; + } + }; + }; - GizmoLineMaterial.prototype = Object.create(THREE.LineBasicMaterial.prototype); - GizmoLineMaterial.prototype.constructor = GizmoLineMaterial; + GizmoLineMaterial.prototype = Object.create(THREE.LineBasicMaterial.prototype); + GizmoLineMaterial.prototype.constructor = GizmoLineMaterial; - var pickerMaterial = new GizmoMaterial({ visible: false, transparent: false }); + var pickerMaterial = new GizmoMaterial({ visible: false, transparent: false }); - THREE.TransformGizmo = function () { + THREE.TransformGizmo = function () { - var scope = this; + var scope = this; - this.init = function () { + this.init = function () { - THREE.Object3D.call(this); + THREE.Object3D.call(this); - this.handles = new THREE.Object3D(); - this.pickers = new THREE.Object3D(); - this.planes = new THREE.Object3D(); + this.handles = new THREE.Object3D(); + this.pickers = new THREE.Object3D(); + this.planes = new THREE.Object3D(); - this.add(this.handles); - this.add(this.pickers); - this.add(this.planes); + this.add(this.handles); + this.add(this.pickers); + this.add(this.planes); - //// PLANES + //// PLANES - var planeGeometry = new THREE.PlaneBufferGeometry(50, 50, 2, 2); - var planeMaterial = new THREE.MeshBasicMaterial({ visible: false, side: THREE.DoubleSide }); + var planeGeometry = new THREE.PlaneBufferGeometry(50, 50, 2, 2); + var planeMaterial = new THREE.MeshBasicMaterial({ visible: false, side: THREE.DoubleSide }); - var planes = { - "XY": new THREE.Mesh(planeGeometry, planeMaterial), - "YZ": new THREE.Mesh(planeGeometry, planeMaterial), - "XZ": new THREE.Mesh(planeGeometry, planeMaterial), - "XYZE": new THREE.Mesh(planeGeometry, planeMaterial) - }; + var planes = { + "XY": new THREE.Mesh(planeGeometry, planeMaterial), + "YZ": new THREE.Mesh(planeGeometry, planeMaterial), + "XZ": new THREE.Mesh(planeGeometry, planeMaterial), + "XYZE": new THREE.Mesh(planeGeometry, planeMaterial) + }; - this.activePlane = planes["XYZE"]; + this.activePlane = planes["XYZE"]; - planes["YZ"].rotation.set(0, Math.PI / 2, 0); - planes["XZ"].rotation.set(-Math.PI / 2, 0, 0); + planes["YZ"].rotation.set(0, Math.PI / 2, 0); + planes["XZ"].rotation.set(-Math.PI / 2, 0, 0); - for (var i in planes) { + for (var i in planes) { - planes[i].name = i; - this.planes.add(planes[i]); - this.planes[i] = planes[i]; - } + planes[i].name = i; + this.planes.add(planes[i]); + this.planes[i] = planes[i]; + } - //// HANDLES AND PICKERS + //// HANDLES AND PICKERS - var setupGizmos = function setupGizmos(gizmoMap, parent) { + var setupGizmos = function setupGizmos(gizmoMap, parent) { - for (var name in gizmoMap) { + for (var name in gizmoMap) { - for (i = gizmoMap[name].length; i--;) { + for (i = gizmoMap[name].length; i--;) { - var object = gizmoMap[name][i][0]; - var position = gizmoMap[name][i][1]; - var rotation = gizmoMap[name][i][2]; + var object = gizmoMap[name][i][0]; + var position = gizmoMap[name][i][1]; + var rotation = gizmoMap[name][i][2]; - object.name = name; + object.name = name; - if (position) object.position.set(position[0], position[1], position[2]); - if (rotation) object.rotation.set(rotation[0], rotation[1], rotation[2]); + if (position) object.position.set(position[0], position[1], position[2]); + if (rotation) object.rotation.set(rotation[0], rotation[1], rotation[2]); - parent.add(object); - } - } - }; + parent.add(object); + } + } + }; - setupGizmos(this.handleGizmos, this.handles); - setupGizmos(this.pickerGizmos, this.pickers); + setupGizmos(this.handleGizmos, this.handles); + setupGizmos(this.pickerGizmos, this.pickers); - // reset Transformations + // reset Transformations - this.traverse(function (child) { + this.traverse(function (child) { - if (child instanceof THREE.Mesh) { + if (child instanceof THREE.Mesh) { - child.updateMatrix(); + child.updateMatrix(); - var tempGeometry = child.geometry.clone(); - tempGeometry.applyMatrix(child.matrix); - child.geometry = tempGeometry; + var tempGeometry = child.geometry.clone(); + tempGeometry.applyMatrix(child.matrix); + child.geometry = tempGeometry; - child.position.set(0, 0, 0); - child.rotation.set(0, 0, 0); - child.scale.set(1, 1, 1); - } - }); - }; + child.position.set(0, 0, 0); + child.rotation.set(0, 0, 0); + child.scale.set(1, 1, 1); + } + }); + }; - this.highlight = function (axis) { + this.highlight = function (axis) { - this.traverse(function (child) { + this.traverse(function (child) { - if (child.material && child.material.highlight) { + if (child.material && child.material.highlight) { - if (child.name === axis) { + if (child.name === axis) { - child.material.highlight(true); - } else { + child.material.highlight(true); + } else { - child.material.highlight(false); - } - } - }); - }; - }; + child.material.highlight(false); + } + } + }); + }; + }; - THREE.TransformGizmo.prototype = Object.create(THREE.Object3D.prototype); - THREE.TransformGizmo.prototype.constructor = THREE.TransformGizmo; + THREE.TransformGizmo.prototype = Object.create(THREE.Object3D.prototype); + THREE.TransformGizmo.prototype.constructor = THREE.TransformGizmo; - THREE.TransformGizmo.prototype.update = function (rotation, eye) { + THREE.TransformGizmo.prototype.update = function (rotation, eye) { - var vec1 = new THREE.Vector3(0, 0, 0); - var vec2 = new THREE.Vector3(0, 1, 0); - var lookAtMatrix = new THREE.Matrix4(); + var vec1 = new THREE.Vector3(0, 0, 0); + var vec2 = new THREE.Vector3(0, 1, 0); + var lookAtMatrix = new THREE.Matrix4(); - this.traverse(function (child) { + this.traverse(function (child) { - if (child.name.search("E") !== -1) { + if (child.name.search("E") !== -1) { - child.quaternion.setFromRotationMatrix(lookAtMatrix.lookAt(eye, vec1, vec2)); - } else if (child.name.search("X") !== -1 || child.name.search("Y") !== -1 || child.name.search("Z") !== -1) { + child.quaternion.setFromRotationMatrix(lookAtMatrix.lookAt(eye, vec1, vec2)); + } else if (child.name.search("X") !== -1 || child.name.search("Y") !== -1 || child.name.search("Z") !== -1) { - child.quaternion.setFromEuler(rotation); - } - }); - }; + child.quaternion.setFromEuler(rotation); + } + }); + }; - THREE.TransformGizmoTranslate = function () { + THREE.TransformGizmoTranslate = function () { - THREE.TransformGizmo.call(this); + THREE.TransformGizmo.call(this); - var arrowGeometry = new THREE.Geometry(); - var mesh = new THREE.Mesh(new THREE.CylinderGeometry(0, 0.05, 0.2, 12, 1, false)); - mesh.position.y = 0.5; - mesh.updateMatrix(); + var arrowGeometry = new THREE.Geometry(); + var mesh = new THREE.Mesh(new THREE.CylinderGeometry(0, 0.05, 0.2, 12, 1, false)); + mesh.position.y = 0.5; + mesh.updateMatrix(); - arrowGeometry.merge(mesh.geometry, mesh.matrix); + arrowGeometry.merge(mesh.geometry, mesh.matrix); - var lineXGeometry = new THREE.BufferGeometry(); - lineXGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); + var lineXGeometry = new THREE.BufferGeometry(); + lineXGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); - var lineYGeometry = new THREE.BufferGeometry(); - lineYGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); + var lineYGeometry = new THREE.BufferGeometry(); + lineYGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); - var lineZGeometry = new THREE.BufferGeometry(); - lineZGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); + var lineZGeometry = new THREE.BufferGeometry(); + lineZGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); - this.handleGizmos = { + this.handleGizmos = { - X: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0xff0000 })), [0.5, 0, 0], [0, 0, -Math.PI / 2]], [new THREE.Line(lineXGeometry, new GizmoLineMaterial({ color: 0xff0000 }))]], + X: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0xff0000 })), [0.5, 0, 0], [0, 0, -Math.PI / 2]], [new THREE.Line(lineXGeometry, new GizmoLineMaterial({ color: 0xff0000 }))]], - Y: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0x00ff00 })), [0, 0.5, 0]], [new THREE.Line(lineYGeometry, new GizmoLineMaterial({ color: 0x00ff00 }))]], + Y: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0x00ff00 })), [0, 0.5, 0]], [new THREE.Line(lineYGeometry, new GizmoLineMaterial({ color: 0x00ff00 }))]], - Z: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0x0000ff })), [0, 0, 0.5], [Math.PI / 2, 0, 0]], [new THREE.Line(lineZGeometry, new GizmoLineMaterial({ color: 0x0000ff }))]], + Z: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0x0000ff })), [0, 0, 0.5], [Math.PI / 2, 0, 0]], [new THREE.Line(lineZGeometry, new GizmoLineMaterial({ color: 0x0000ff }))]], - XYZ: [[new THREE.Mesh(new THREE.OctahedronGeometry(0.1, 0), new GizmoMaterial({ color: 0xffffff, opacity: 0.25 })), [0, 0, 0], [0, 0, 0]]], + XYZ: [[new THREE.Mesh(new THREE.OctahedronGeometry(0.1, 0), new GizmoMaterial({ color: 0xffffff, opacity: 0.25 })), [0, 0, 0], [0, 0, 0]]], - XY: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.29, 0.29), new GizmoMaterial({ color: 0xffff00, opacity: 0.25 })), [0.15, 0.15, 0]]], + XY: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.29, 0.29), new GizmoMaterial({ color: 0xffff00, opacity: 0.25 })), [0.15, 0.15, 0]]], - YZ: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.29, 0.29), new GizmoMaterial({ color: 0x00ffff, opacity: 0.25 })), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]], + YZ: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.29, 0.29), new GizmoMaterial({ color: 0x00ffff, opacity: 0.25 })), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]], - XZ: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.29, 0.29), new GizmoMaterial({ color: 0xff00ff, opacity: 0.25 })), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]] + XZ: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.29, 0.29), new GizmoMaterial({ color: 0xff00ff, opacity: 0.25 })), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]] - }; + }; - this.pickerGizmos = { + this.pickerGizmos = { - X: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0.6, 0, 0], [0, 0, -Math.PI / 2]]], + X: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0.6, 0, 0], [0, 0, -Math.PI / 2]]], - Y: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0, 0.6, 0]]], + Y: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0, 0.6, 0]]], - Z: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0, 0, 0.6], [Math.PI / 2, 0, 0]]], + Z: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0, 0, 0.6], [Math.PI / 2, 0, 0]]], - XYZ: [[new THREE.Mesh(new THREE.OctahedronGeometry(0.2, 0), pickerMaterial)]], + XYZ: [[new THREE.Mesh(new THREE.OctahedronGeometry(0.2, 0), pickerMaterial)]], - XY: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.4, 0.4), pickerMaterial), [0.2, 0.2, 0]]], + XY: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.4, 0.4), pickerMaterial), [0.2, 0.2, 0]]], - YZ: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.4, 0.4), pickerMaterial), [0, 0.2, 0.2], [0, Math.PI / 2, 0]]], + YZ: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.4, 0.4), pickerMaterial), [0, 0.2, 0.2], [0, Math.PI / 2, 0]]], - XZ: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.4, 0.4), pickerMaterial), [0.2, 0, 0.2], [-Math.PI / 2, 0, 0]]] + XZ: [[new THREE.Mesh(new THREE.PlaneBufferGeometry(0.4, 0.4), pickerMaterial), [0.2, 0, 0.2], [-Math.PI / 2, 0, 0]]] - }; + }; - this.setActivePlane = function (axis, eye) { + this.setActivePlane = function (axis, eye) { - var tempMatrix = new THREE.Matrix4(); - eye.applyMatrix4(tempMatrix.getInverse(tempMatrix.extractRotation(this.planes["XY"].matrixWorld))); + var tempMatrix = new THREE.Matrix4(); + eye.applyMatrix4(tempMatrix.getInverse(tempMatrix.extractRotation(this.planes["XY"].matrixWorld))); - if (axis === "X") { + if (axis === "X") { - this.activePlane = this.planes["XY"]; + this.activePlane = this.planes["XY"]; - if (Math.abs(eye.y) > Math.abs(eye.z)) this.activePlane = this.planes["XZ"]; - } + if (Math.abs(eye.y) > Math.abs(eye.z)) this.activePlane = this.planes["XZ"]; + } - if (axis === "Y") { + if (axis === "Y") { - this.activePlane = this.planes["XY"]; + this.activePlane = this.planes["XY"]; - if (Math.abs(eye.x) > Math.abs(eye.z)) this.activePlane = this.planes["YZ"]; - } + if (Math.abs(eye.x) > Math.abs(eye.z)) this.activePlane = this.planes["YZ"]; + } - if (axis === "Z") { + if (axis === "Z") { - this.activePlane = this.planes["XZ"]; + this.activePlane = this.planes["XZ"]; - if (Math.abs(eye.x) > Math.abs(eye.y)) this.activePlane = this.planes["YZ"]; - } + if (Math.abs(eye.x) > Math.abs(eye.y)) this.activePlane = this.planes["YZ"]; + } - if (axis === "XYZ") this.activePlane = this.planes["XYZE"]; + if (axis === "XYZ") this.activePlane = this.planes["XYZE"]; - if (axis === "XY") this.activePlane = this.planes["XY"]; + if (axis === "XY") this.activePlane = this.planes["XY"]; - if (axis === "YZ") this.activePlane = this.planes["YZ"]; + if (axis === "YZ") this.activePlane = this.planes["YZ"]; - if (axis === "XZ") this.activePlane = this.planes["XZ"]; - }; + if (axis === "XZ") this.activePlane = this.planes["XZ"]; + }; - this.init(); - }; + this.init(); + }; - THREE.TransformGizmoTranslate.prototype = Object.create(THREE.TransformGizmo.prototype); - THREE.TransformGizmoTranslate.prototype.constructor = THREE.TransformGizmoTranslate; + THREE.TransformGizmoTranslate.prototype = Object.create(THREE.TransformGizmo.prototype); + THREE.TransformGizmoTranslate.prototype.constructor = THREE.TransformGizmoTranslate; - THREE.TransformGizmoRotate = function () { + THREE.TransformGizmoRotate = function () { - THREE.TransformGizmo.call(this); + THREE.TransformGizmo.call(this); - var CircleGeometry = function CircleGeometry(radius, facing, arc) { + var CircleGeometry = function CircleGeometry(radius, facing, arc) { - var geometry = new THREE.BufferGeometry(); - var vertices = []; - arc = arc ? arc : 1; + var geometry = new THREE.BufferGeometry(); + var vertices = []; + arc = arc ? arc : 1; - for (var i = 0; i <= 64 * arc; ++i) { - if (facing === 'x') vertices.push(0, Math.cos(i / 32 * Math.PI) * radius, Math.sin(i / 32 * Math.PI) * radius); - if (facing === 'y') vertices.push(Math.cos(i / 32 * Math.PI) * radius, 0, Math.sin(i / 32 * Math.PI) * radius); - if (facing === 'z') vertices.push(Math.sin(i / 32 * Math.PI) * radius, Math.cos(i / 32 * Math.PI) * radius, 0); - } + for (var i = 0; i <= 64 * arc; ++i) { + if (facing === 'x') vertices.push(0, Math.cos(i / 32 * Math.PI) * radius, Math.sin(i / 32 * Math.PI) * radius); + if (facing === 'y') vertices.push(Math.cos(i / 32 * Math.PI) * radius, 0, Math.sin(i / 32 * Math.PI) * radius); + if (facing === 'z') vertices.push(Math.sin(i / 32 * Math.PI) * radius, Math.cos(i / 32 * Math.PI) * radius, 0); + } - geometry.addAttribute('position', new THREE.Float32BufferAttribute(vertices, 3)); - return geometry; - }; + geometry.addAttribute('position', new THREE.Float32BufferAttribute(vertices, 3)); + return geometry; + }; - this.handleGizmos = { + this.handleGizmos = { - X: [[new THREE.Line(new CircleGeometry(1, 'x', 0.5), new GizmoLineMaterial({ color: 0xff0000 }))]], + X: [[new THREE.Line(new CircleGeometry(1, 'x', 0.5), new GizmoLineMaterial({ color: 0xff0000 }))]], - Y: [[new THREE.Line(new CircleGeometry(1, 'y', 0.5), new GizmoLineMaterial({ color: 0x00ff00 }))]], + Y: [[new THREE.Line(new CircleGeometry(1, 'y', 0.5), new GizmoLineMaterial({ color: 0x00ff00 }))]], - Z: [[new THREE.Line(new CircleGeometry(1, 'z', 0.5), new GizmoLineMaterial({ color: 0x0000ff }))]], + Z: [[new THREE.Line(new CircleGeometry(1, 'z', 0.5), new GizmoLineMaterial({ color: 0x0000ff }))]], - E: [[new THREE.Line(new CircleGeometry(1.25, 'z', 1), new GizmoLineMaterial({ color: 0xcccc00 }))]], + E: [[new THREE.Line(new CircleGeometry(1.25, 'z', 1), new GizmoLineMaterial({ color: 0xcccc00 }))]], - XYZE: [[new THREE.Line(new CircleGeometry(1, 'z', 1), new GizmoLineMaterial({ color: 0x787878 }))]] + XYZE: [[new THREE.Line(new CircleGeometry(1, 'z', 1), new GizmoLineMaterial({ color: 0x787878 }))]] - }; + }; - this.pickerGizmos = { + this.pickerGizmos = { - X: [[new THREE.Mesh(new THREE.TorusBufferGeometry(1, 0.12, 4, 12, Math.PI), pickerMaterial), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]], + X: [[new THREE.Mesh(new THREE.TorusBufferGeometry(1, 0.12, 4, 12, Math.PI), pickerMaterial), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]], - Y: [[new THREE.Mesh(new THREE.TorusBufferGeometry(1, 0.12, 4, 12, Math.PI), pickerMaterial), [0, 0, 0], [Math.PI / 2, 0, 0]]], + Y: [[new THREE.Mesh(new THREE.TorusBufferGeometry(1, 0.12, 4, 12, Math.PI), pickerMaterial), [0, 0, 0], [Math.PI / 2, 0, 0]]], - Z: [[new THREE.Mesh(new THREE.TorusBufferGeometry(1, 0.12, 4, 12, Math.PI), pickerMaterial), [0, 0, 0], [0, 0, -Math.PI / 2]]], + Z: [[new THREE.Mesh(new THREE.TorusBufferGeometry(1, 0.12, 4, 12, Math.PI), pickerMaterial), [0, 0, 0], [0, 0, -Math.PI / 2]]], - E: [[new THREE.Mesh(new THREE.TorusBufferGeometry(1.25, 0.12, 2, 24), pickerMaterial)]], + E: [[new THREE.Mesh(new THREE.TorusBufferGeometry(1.25, 0.12, 2, 24), pickerMaterial)]], - XYZE: [[new THREE.Mesh(new THREE.Geometry())] // TODO - ] + XYZE: [[new THREE.Mesh(new THREE.Geometry())] // TODO + ] - }; + }; - this.setActivePlane = function (axis) { + this.setActivePlane = function (axis) { - if (axis === "E") this.activePlane = this.planes["XYZE"]; + if (axis === "E") this.activePlane = this.planes["XYZE"]; - if (axis === "X") this.activePlane = this.planes["YZ"]; + if (axis === "X") this.activePlane = this.planes["YZ"]; - if (axis === "Y") this.activePlane = this.planes["XZ"]; + if (axis === "Y") this.activePlane = this.planes["XZ"]; - if (axis === "Z") this.activePlane = this.planes["XY"]; - }; + if (axis === "Z") this.activePlane = this.planes["XY"]; + }; - this.update = function (rotation, eye2) { + this.update = function (rotation, eye2) { - THREE.TransformGizmo.prototype.update.apply(this, arguments); + THREE.TransformGizmo.prototype.update.apply(this, arguments); - var group = { + var group = { - handles: this["handles"], - pickers: this["pickers"] + handles: this["handles"], + pickers: this["pickers"] - }; + }; - var tempMatrix = new THREE.Matrix4(); - var worldRotation = new THREE.Euler(0, 0, 1); - var tempQuaternion = new THREE.Quaternion(); - var unitX = new THREE.Vector3(1, 0, 0); - var unitY = new THREE.Vector3(0, 1, 0); - var unitZ = new THREE.Vector3(0, 0, 1); - var quaternionX = new THREE.Quaternion(); - var quaternionY = new THREE.Quaternion(); - var quaternionZ = new THREE.Quaternion(); - var eye = eye2.clone(); + var tempMatrix = new THREE.Matrix4(); + var worldRotation = new THREE.Euler(0, 0, 1); + var tempQuaternion = new THREE.Quaternion(); + var unitX = new THREE.Vector3(1, 0, 0); + var unitY = new THREE.Vector3(0, 1, 0); + var unitZ = new THREE.Vector3(0, 0, 1); + var quaternionX = new THREE.Quaternion(); + var quaternionY = new THREE.Quaternion(); + var quaternionZ = new THREE.Quaternion(); + var eye = eye2.clone(); - worldRotation.copy(this.planes["XY"].rotation); - tempQuaternion.setFromEuler(worldRotation); + worldRotation.copy(this.planes["XY"].rotation); + tempQuaternion.setFromEuler(worldRotation); - tempMatrix.makeRotationFromQuaternion(tempQuaternion).getInverse(tempMatrix); - eye.applyMatrix4(tempMatrix); + tempMatrix.makeRotationFromQuaternion(tempQuaternion).getInverse(tempMatrix); + eye.applyMatrix4(tempMatrix); - this.traverse(function (child) { + this.traverse(function (child) { - tempQuaternion.setFromEuler(worldRotation); + tempQuaternion.setFromEuler(worldRotation); - if (child.name === "X") { + if (child.name === "X") { - quaternionX.setFromAxisAngle(unitX, Math.atan2(-eye.y, eye.z)); - tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionX); - child.quaternion.copy(tempQuaternion); - } + quaternionX.setFromAxisAngle(unitX, Math.atan2(-eye.y, eye.z)); + tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionX); + child.quaternion.copy(tempQuaternion); + } - if (child.name === "Y") { + if (child.name === "Y") { - quaternionY.setFromAxisAngle(unitY, Math.atan2(eye.x, eye.z)); - tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionY); - child.quaternion.copy(tempQuaternion); - } + quaternionY.setFromAxisAngle(unitY, Math.atan2(eye.x, eye.z)); + tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionY); + child.quaternion.copy(tempQuaternion); + } - if (child.name === "Z") { + if (child.name === "Z") { - quaternionZ.setFromAxisAngle(unitZ, Math.atan2(eye.y, eye.x)); - tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionZ); - child.quaternion.copy(tempQuaternion); - } - }); - }; + quaternionZ.setFromAxisAngle(unitZ, Math.atan2(eye.y, eye.x)); + tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionZ); + child.quaternion.copy(tempQuaternion); + } + }); + }; - this.init(); - }; + this.init(); + }; - THREE.TransformGizmoRotate.prototype = Object.create(THREE.TransformGizmo.prototype); - THREE.TransformGizmoRotate.prototype.constructor = THREE.TransformGizmoRotate; + THREE.TransformGizmoRotate.prototype = Object.create(THREE.TransformGizmo.prototype); + THREE.TransformGizmoRotate.prototype.constructor = THREE.TransformGizmoRotate; - THREE.TransformGizmoScale = function () { + THREE.TransformGizmoScale = function () { - THREE.TransformGizmo.call(this); + THREE.TransformGizmo.call(this); - var arrowGeometry = new THREE.Geometry(); - var mesh = new THREE.Mesh(new THREE.BoxGeometry(0.125, 0.125, 0.125)); - mesh.position.y = 0.5; - mesh.updateMatrix(); + var arrowGeometry = new THREE.Geometry(); + var mesh = new THREE.Mesh(new THREE.BoxGeometry(0.125, 0.125, 0.125)); + mesh.position.y = 0.5; + mesh.updateMatrix(); - arrowGeometry.merge(mesh.geometry, mesh.matrix); + arrowGeometry.merge(mesh.geometry, mesh.matrix); - var lineXGeometry = new THREE.BufferGeometry(); - lineXGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); + var lineXGeometry = new THREE.BufferGeometry(); + lineXGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); - var lineYGeometry = new THREE.BufferGeometry(); - lineYGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); + var lineYGeometry = new THREE.BufferGeometry(); + lineYGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); - var lineZGeometry = new THREE.BufferGeometry(); - lineZGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); + var lineZGeometry = new THREE.BufferGeometry(); + lineZGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); - this.handleGizmos = { + this.handleGizmos = { - X: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0xff0000 })), [0.5, 0, 0], [0, 0, -Math.PI / 2]], [new THREE.Line(lineXGeometry, new GizmoLineMaterial({ color: 0xff0000 }))]], + X: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0xff0000 })), [0.5, 0, 0], [0, 0, -Math.PI / 2]], [new THREE.Line(lineXGeometry, new GizmoLineMaterial({ color: 0xff0000 }))]], - Y: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0x00ff00 })), [0, 0.5, 0]], [new THREE.Line(lineYGeometry, new GizmoLineMaterial({ color: 0x00ff00 }))]], + Y: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0x00ff00 })), [0, 0.5, 0]], [new THREE.Line(lineYGeometry, new GizmoLineMaterial({ color: 0x00ff00 }))]], - Z: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0x0000ff })), [0, 0, 0.5], [Math.PI / 2, 0, 0]], [new THREE.Line(lineZGeometry, new GizmoLineMaterial({ color: 0x0000ff }))]], + Z: [[new THREE.Mesh(arrowGeometry, new GizmoMaterial({ color: 0x0000ff })), [0, 0, 0.5], [Math.PI / 2, 0, 0]], [new THREE.Line(lineZGeometry, new GizmoLineMaterial({ color: 0x0000ff }))]], - XYZ: [[new THREE.Mesh(new THREE.BoxBufferGeometry(0.125, 0.125, 0.125), new GizmoMaterial({ color: 0xffffff, opacity: 0.25 }))]] + XYZ: [[new THREE.Mesh(new THREE.BoxBufferGeometry(0.125, 0.125, 0.125), new GizmoMaterial({ color: 0xffffff, opacity: 0.25 }))]] - }; + }; - this.pickerGizmos = { + this.pickerGizmos = { - X: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0.6, 0, 0], [0, 0, -Math.PI / 2]]], + X: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0.6, 0, 0], [0, 0, -Math.PI / 2]]], - Y: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0, 0.6, 0]]], + Y: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0, 0.6, 0]]], - Z: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0, 0, 0.6], [Math.PI / 2, 0, 0]]], + Z: [[new THREE.Mesh(new THREE.CylinderBufferGeometry(0.2, 0, 1, 4, 1, false), pickerMaterial), [0, 0, 0.6], [Math.PI / 2, 0, 0]]], - XYZ: [[new THREE.Mesh(new THREE.BoxBufferGeometry(0.4, 0.4, 0.4), pickerMaterial)]] + XYZ: [[new THREE.Mesh(new THREE.BoxBufferGeometry(0.4, 0.4, 0.4), pickerMaterial)]] - }; + }; - this.setActivePlane = function (axis, eye) { + this.setActivePlane = function (axis, eye) { - var tempMatrix = new THREE.Matrix4(); - eye.applyMatrix4(tempMatrix.getInverse(tempMatrix.extractRotation(this.planes["XY"].matrixWorld))); + var tempMatrix = new THREE.Matrix4(); + eye.applyMatrix4(tempMatrix.getInverse(tempMatrix.extractRotation(this.planes["XY"].matrixWorld))); - if (axis === "X") { + if (axis === "X") { - this.activePlane = this.planes["XY"]; - if (Math.abs(eye.y) > Math.abs(eye.z)) this.activePlane = this.planes["XZ"]; - } + this.activePlane = this.planes["XY"]; + if (Math.abs(eye.y) > Math.abs(eye.z)) this.activePlane = this.planes["XZ"]; + } - if (axis === "Y") { + if (axis === "Y") { - this.activePlane = this.planes["XY"]; - if (Math.abs(eye.x) > Math.abs(eye.z)) this.activePlane = this.planes["YZ"]; - } + this.activePlane = this.planes["XY"]; + if (Math.abs(eye.x) > Math.abs(eye.z)) this.activePlane = this.planes["YZ"]; + } - if (axis === "Z") { + if (axis === "Z") { - this.activePlane = this.planes["XZ"]; - if (Math.abs(eye.x) > Math.abs(eye.y)) this.activePlane = this.planes["YZ"]; - } + this.activePlane = this.planes["XZ"]; + if (Math.abs(eye.x) > Math.abs(eye.y)) this.activePlane = this.planes["YZ"]; + } - if (axis === "XYZ") this.activePlane = this.planes["XYZE"]; - }; + if (axis === "XYZ") this.activePlane = this.planes["XYZE"]; + }; - this.init(); - }; + this.init(); + }; - THREE.TransformGizmoScale.prototype = Object.create(THREE.TransformGizmo.prototype); - THREE.TransformGizmoScale.prototype.constructor = THREE.TransformGizmoScale; + THREE.TransformGizmoScale.prototype = Object.create(THREE.TransformGizmo.prototype); + THREE.TransformGizmoScale.prototype.constructor = THREE.TransformGizmoScale; - THREE.TransformControls = function (camera, domElement) { + THREE.TransformControls = function (camera, domElement) { - // TODO: Make non-uniform scale and rotate play nice in hierarchies - // TODO: ADD RXYZ contol + // TODO: Make non-uniform scale and rotate play nice in hierarchies + // TODO: ADD RXYZ contol - THREE.Object3D.call(this); + THREE.Object3D.call(this); - domElement = domElement !== undefined ? domElement : document; + domElement = domElement !== undefined ? domElement : document; - this.object = undefined; - this.visible = false; - this.translationSnap = null; - this.rotationSnap = null; - this.space = "world"; - this.size = 1; - this.axis = null; + this.object = undefined; + this.visible = false; + this.translationSnap = null; + this.rotationSnap = null; + this.space = "world"; + this.size = 1; + this.axis = null; - var scope = this; + var scope = this; - var _mode = "translate"; - var _dragging = false; - var _plane = "XY"; - var _gizmo = { + var _mode = "translate"; + var _dragging = false; + var _plane = "XY"; + var _gizmo = { - "translate": new THREE.TransformGizmoTranslate(), - "rotate": new THREE.TransformGizmoRotate(), - "scale": new THREE.TransformGizmoScale() - }; + "translate": new THREE.TransformGizmoTranslate(), + "rotate": new THREE.TransformGizmoRotate(), + "scale": new THREE.TransformGizmoScale() + }; - for (var type in _gizmo) { + for (var type in _gizmo) { - var gizmoObj = _gizmo[type]; + var gizmoObj = _gizmo[type]; - gizmoObj.visible = type === _mode; - this.add(gizmoObj); - } + gizmoObj.visible = type === _mode; + this.add(gizmoObj); + } - var changeEvent = { type: "change" }; - var mouseDownEvent = { type: "mouseDown" }; - var mouseUpEvent = { type: "mouseUp", mode: _mode }; - var objectChangeEvent = { type: "objectChange" }; + var changeEvent = { type: "change" }; + var mouseDownEvent = { type: "mouseDown" }; + var mouseUpEvent = { type: "mouseUp", mode: _mode }; + var objectChangeEvent = { type: "objectChange" }; - var ray = new THREE.Raycaster(); - var pointerVector = new THREE.Vector2(); + var ray = new THREE.Raycaster(); + var pointerVector = new THREE.Vector2(); - var point = new THREE.Vector3(); - var offset = new THREE.Vector3(); + var point = new THREE.Vector3(); + var offset = new THREE.Vector3(); - var rotation = new THREE.Vector3(); - var offsetRotation = new THREE.Vector3(); - var scale = 1; + var rotation = new THREE.Vector3(); + var offsetRotation = new THREE.Vector3(); + var scale = 1; - var lookAtMatrix = new THREE.Matrix4(); - var eye = new THREE.Vector3(); + var lookAtMatrix = new THREE.Matrix4(); + var eye = new THREE.Vector3(); - var tempMatrix = new THREE.Matrix4(); - var tempVector = new THREE.Vector3(); - var tempQuaternion = new THREE.Quaternion(); - var unitX = new THREE.Vector3(1, 0, 0); - var unitY = new THREE.Vector3(0, 1, 0); - var unitZ = new THREE.Vector3(0, 0, 1); + var tempMatrix = new THREE.Matrix4(); + var tempVector = new THREE.Vector3(); + var tempQuaternion = new THREE.Quaternion(); + var unitX = new THREE.Vector3(1, 0, 0); + var unitY = new THREE.Vector3(0, 1, 0); + var unitZ = new THREE.Vector3(0, 0, 1); - var quaternionXYZ = new THREE.Quaternion(); - var quaternionX = new THREE.Quaternion(); - var quaternionY = new THREE.Quaternion(); - var quaternionZ = new THREE.Quaternion(); - var quaternionE = new THREE.Quaternion(); + var quaternionXYZ = new THREE.Quaternion(); + var quaternionX = new THREE.Quaternion(); + var quaternionY = new THREE.Quaternion(); + var quaternionZ = new THREE.Quaternion(); + var quaternionE = new THREE.Quaternion(); - var oldPosition = new THREE.Vector3(); - var oldScale = new THREE.Vector3(); - var oldRotationMatrix = new THREE.Matrix4(); + var oldPosition = new THREE.Vector3(); + var oldScale = new THREE.Vector3(); + var oldRotationMatrix = new THREE.Matrix4(); - var parentRotationMatrix = new THREE.Matrix4(); - var parentScale = new THREE.Vector3(); + var parentRotationMatrix = new THREE.Matrix4(); + var parentScale = new THREE.Vector3(); - var worldPosition = new THREE.Vector3(); - var worldRotation = new THREE.Euler(); - var worldRotationMatrix = new THREE.Matrix4(); - var camPosition = new THREE.Vector3(); - var camRotation = new THREE.Euler(); + var worldPosition = new THREE.Vector3(); + var worldRotation = new THREE.Euler(); + var worldRotationMatrix = new THREE.Matrix4(); + var camPosition = new THREE.Vector3(); + var camRotation = new THREE.Euler(); - domElement.addEventListener("mousedown", onPointerDown, false); - domElement.addEventListener("touchstart", onPointerDown, false); + domElement.addEventListener("mousedown", onPointerDown, false); + domElement.addEventListener("touchstart", onPointerDown, false); - domElement.addEventListener("mousemove", onPointerHover, false); - domElement.addEventListener("touchmove", onPointerHover, false); + domElement.addEventListener("mousemove", onPointerHover, false); + domElement.addEventListener("touchmove", onPointerHover, false); - domElement.addEventListener("mousemove", onPointerMove, false); - domElement.addEventListener("touchmove", onPointerMove, false); + domElement.addEventListener("mousemove", onPointerMove, false); + domElement.addEventListener("touchmove", onPointerMove, false); - domElement.addEventListener("mouseup", onPointerUp, false); - domElement.addEventListener("mouseout", onPointerUp, false); - domElement.addEventListener("touchend", onPointerUp, false); - domElement.addEventListener("touchcancel", onPointerUp, false); - domElement.addEventListener("touchleave", onPointerUp, false); + domElement.addEventListener("mouseup", onPointerUp, false); + domElement.addEventListener("mouseout", onPointerUp, false); + domElement.addEventListener("touchend", onPointerUp, false); + domElement.addEventListener("touchcancel", onPointerUp, false); + domElement.addEventListener("touchleave", onPointerUp, false); - this.dispose = function () { + this.dispose = function () { - domElement.removeEventListener("mousedown", onPointerDown); - domElement.removeEventListener("touchstart", onPointerDown); + domElement.removeEventListener("mousedown", onPointerDown); + domElement.removeEventListener("touchstart", onPointerDown); - domElement.removeEventListener("mousemove", onPointerHover); - domElement.removeEventListener("touchmove", onPointerHover); + domElement.removeEventListener("mousemove", onPointerHover); + domElement.removeEventListener("touchmove", onPointerHover); - domElement.removeEventListener("mousemove", onPointerMove); - domElement.removeEventListener("touchmove", onPointerMove); + domElement.removeEventListener("mousemove", onPointerMove); + domElement.removeEventListener("touchmove", onPointerMove); - domElement.removeEventListener("mouseup", onPointerUp); - domElement.removeEventListener("mouseout", onPointerUp); - domElement.removeEventListener("touchend", onPointerUp); - domElement.removeEventListener("touchcancel", onPointerUp); - domElement.removeEventListener("touchleave", onPointerUp); - }; + domElement.removeEventListener("mouseup", onPointerUp); + domElement.removeEventListener("mouseout", onPointerUp); + domElement.removeEventListener("touchend", onPointerUp); + domElement.removeEventListener("touchcancel", onPointerUp); + domElement.removeEventListener("touchleave", onPointerUp); + }; - this.attach = function (object) { + this.attach = function (object) { - this.object = object; - this.visible = true; - this.update(); - }; + this.object = object; + this.visible = true; + this.update(); + }; - this.detach = function () { + this.detach = function () { - this.object = undefined; - this.visible = false; - this.axis = null; - }; + this.object = undefined; + this.visible = false; + this.axis = null; + }; - this.getMode = function () { + this.getMode = function () { - return _mode; - }; + return _mode; + }; - this.setMode = function (mode) { + this.setMode = function (mode) { - _mode = mode ? mode : _mode; + _mode = mode ? mode : _mode; - // if ( _mode === "scale" ) scope.space = "local"; + // if ( _mode === "scale" ) scope.space = "local"; - for (var type in _gizmo) { - _gizmo[type].visible = type === _mode; - }this.update(); - scope.dispatchEvent(changeEvent); - }; + for (var type in _gizmo) { + _gizmo[type].visible = type === _mode; + }this.update(); + scope.dispatchEvent(changeEvent); + }; - this.setTranslationSnap = function (translationSnap) { + this.setTranslationSnap = function (translationSnap) { - scope.translationSnap = translationSnap; - }; + scope.translationSnap = translationSnap; + }; - this.setRotationSnap = function (rotationSnap) { + this.setRotationSnap = function (rotationSnap) { - scope.rotationSnap = rotationSnap; - }; + scope.rotationSnap = rotationSnap; + }; - this.setSize = function (size) { + this.setSize = function (size) { - scope.size = size; - this.update(); - scope.dispatchEvent(changeEvent); - }; + scope.size = size; + this.update(); + scope.dispatchEvent(changeEvent); + }; - this.toggleSpace = function () { + this.toggleSpace = function () { - this.setSpace(scope.space === 'local' ? 'world' : 'local'); - }; + this.setSpace(scope.space === 'local' ? 'world' : 'local'); + }; - this.setSpace = function (space) { + this.setSpace = function (space) { - scope.space = space; - this.update(); - scope.dispatchEvent(changeEvent); - }; + scope.space = space; + this.update(); + scope.dispatchEvent(changeEvent); + }; - this.update = function () { + this.update = function () { - if (scope.object === undefined) return; + if (scope.object === undefined) return; - scope.object.updateMatrixWorld(); - worldPosition.setFromMatrixPosition(scope.object.matrixWorld); - worldRotation.setFromRotationMatrix(tempMatrix.extractRotation(scope.object.matrixWorld)); + scope.object.updateMatrixWorld(); + worldPosition.setFromMatrixPosition(scope.object.matrixWorld); + worldRotation.setFromRotationMatrix(tempMatrix.extractRotation(scope.object.matrixWorld)); - camera.updateMatrixWorld(); - camPosition.setFromMatrixPosition(camera.matrixWorld); - camRotation.setFromRotationMatrix(tempMatrix.extractRotation(camera.matrixWorld)); + camera.updateMatrixWorld(); + camPosition.setFromMatrixPosition(camera.matrixWorld); + camRotation.setFromRotationMatrix(tempMatrix.extractRotation(camera.matrixWorld)); - scale = worldPosition.distanceTo(camPosition) / 6 * scope.size; - this.position.copy(worldPosition); - this.scale.set(scale, scale, scale); + scale = worldPosition.distanceTo(camPosition) / 6 * scope.size; + this.position.copy(worldPosition); + this.scale.set(scale, scale, scale); - eye.copy(camPosition).sub(worldPosition).normalize(); + eye.copy(camPosition).sub(worldPosition).normalize(); - if (scope.space === "local" || _mode === "scale") { + if (scope.space === "local" || _mode === "scale") { - _gizmo[_mode].update(worldRotation, eye); - } else if (scope.space === "world") { + _gizmo[_mode].update(worldRotation, eye); + } else if (scope.space === "world") { - _gizmo[_mode].update(new THREE.Euler(), eye); - } + _gizmo[_mode].update(new THREE.Euler(), eye); + } - _gizmo[_mode].highlight(scope.axis); - }; + _gizmo[_mode].highlight(scope.axis); + }; - function onPointerHover(event) { + function onPointerHover(event) { - if (scope.object === undefined || _dragging === true || event.button !== undefined && event.button !== 0) return; + if (scope.object === undefined || _dragging === true || event.button !== undefined && event.button !== 0) return; - var pointer = event.changedTouches ? event.changedTouches[0] : event; + var pointer = event.changedTouches ? event.changedTouches[0] : event; - var intersect = intersectObjects(pointer, _gizmo[_mode].pickers.children); + var intersect = intersectObjects(pointer, _gizmo[_mode].pickers.children); - var axis = null; + var axis = null; - if (intersect) { + if (intersect) { - axis = intersect.object.name; + axis = intersect.object.name; - event.preventDefault(); - } + event.preventDefault(); + } - if (scope.axis !== axis) { + if (scope.axis !== axis) { - scope.axis = axis; - scope.update(); - scope.dispatchEvent(changeEvent); - } - } + scope.axis = axis; + scope.update(); + scope.dispatchEvent(changeEvent); + } + } - function onPointerDown(event) { + function onPointerDown(event) { - if (scope.object === undefined || _dragging === true || event.button !== undefined && event.button !== 0) return; + if (scope.object === undefined || _dragging === true || event.button !== undefined && event.button !== 0) return; - var pointer = event.changedTouches ? event.changedTouches[0] : event; + var pointer = event.changedTouches ? event.changedTouches[0] : event; - if (pointer.button === 0 || pointer.button === undefined) { + if (pointer.button === 0 || pointer.button === undefined) { - var intersect = intersectObjects(pointer, _gizmo[_mode].pickers.children); + var intersect = intersectObjects(pointer, _gizmo[_mode].pickers.children); - if (intersect) { + if (intersect) { - event.preventDefault(); - event.stopPropagation(); + event.preventDefault(); + event.stopPropagation(); - scope.dispatchEvent(mouseDownEvent); + scope.dispatchEvent(mouseDownEvent); - scope.axis = intersect.object.name; + scope.axis = intersect.object.name; - scope.update(); + scope.update(); - eye.copy(camPosition).sub(worldPosition).normalize(); + eye.copy(camPosition).sub(worldPosition).normalize(); - _gizmo[_mode].setActivePlane(scope.axis, eye); + _gizmo[_mode].setActivePlane(scope.axis, eye); - var planeIntersect = intersectObjects(pointer, [_gizmo[_mode].activePlane]); + var planeIntersect = intersectObjects(pointer, [_gizmo[_mode].activePlane]); - if (planeIntersect) { + if (planeIntersect) { - oldPosition.copy(scope.object.position); - oldScale.copy(scope.object.scale); + oldPosition.copy(scope.object.position); + oldScale.copy(scope.object.scale); - oldRotationMatrix.extractRotation(scope.object.matrix); - worldRotationMatrix.extractRotation(scope.object.matrixWorld); + oldRotationMatrix.extractRotation(scope.object.matrix); + worldRotationMatrix.extractRotation(scope.object.matrixWorld); - parentRotationMatrix.extractRotation(scope.object.parent.matrixWorld); - parentScale.setFromMatrixScale(tempMatrix.getInverse(scope.object.parent.matrixWorld)); + parentRotationMatrix.extractRotation(scope.object.parent.matrixWorld); + parentScale.setFromMatrixScale(tempMatrix.getInverse(scope.object.parent.matrixWorld)); - offset.copy(planeIntersect.point); - } - } - } + offset.copy(planeIntersect.point); + } + } + } - _dragging = true; - } + _dragging = true; + } - function onPointerMove(event) { + function onPointerMove(event) { - if (scope.object === undefined || scope.axis === null || _dragging === false || event.button !== undefined && event.button !== 0) return; + if (scope.object === undefined || scope.axis === null || _dragging === false || event.button !== undefined && event.button !== 0) return; - var pointer = event.changedTouches ? event.changedTouches[0] : event; + var pointer = event.changedTouches ? event.changedTouches[0] : event; - var planeIntersect = intersectObjects(pointer, [_gizmo[_mode].activePlane]); + var planeIntersect = intersectObjects(pointer, [_gizmo[_mode].activePlane]); - if (planeIntersect === false) return; + if (planeIntersect === false) return; - event.preventDefault(); - event.stopPropagation(); + event.preventDefault(); + event.stopPropagation(); - point.copy(planeIntersect.point); + point.copy(planeIntersect.point); - if (_mode === "translate") { + if (_mode === "translate") { - point.sub(offset); - point.multiply(parentScale); + point.sub(offset); + point.multiply(parentScale); - if (scope.space === "local" || _mode === "scale") { + if (scope.space === "local" || _mode === "scale") { - point.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); + point.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); - if (scope.axis.search("X") === -1) point.x = 0; - if (scope.axis.search("Y") === -1) point.y = 0; - if (scope.axis.search("Z") === -1) point.z = 0; + if (scope.axis.search("X") === -1) point.x = 0; + if (scope.axis.search("Y") === -1) point.y = 0; + if (scope.axis.search("Z") === -1) point.z = 0; - point.applyMatrix4(oldRotationMatrix); + point.applyMatrix4(oldRotationMatrix); - scope.object.position.copy(oldPosition); - scope.object.position.add(point); - } + scope.object.position.copy(oldPosition); + scope.object.position.add(point); + } - if (scope.space === "world" || scope.axis.search("XYZ") !== -1) { + if (scope.space === "world" || scope.axis.search("XYZ") !== -1) { - if (scope.axis.search("X") === -1) point.x = 0; - if (scope.axis.search("Y") === -1) point.y = 0; - if (scope.axis.search("Z") === -1) point.z = 0; + if (scope.axis.search("X") === -1) point.x = 0; + if (scope.axis.search("Y") === -1) point.y = 0; + if (scope.axis.search("Z") === -1) point.z = 0; - point.applyMatrix4(tempMatrix.getInverse(parentRotationMatrix)); + point.applyMatrix4(tempMatrix.getInverse(parentRotationMatrix)); - scope.object.position.copy(oldPosition); - scope.object.position.add(point); - } + scope.object.position.copy(oldPosition); + scope.object.position.add(point); + } - if (scope.translationSnap !== null) { + if (scope.translationSnap !== null) { - if (scope.space === "local" || _mode === "scale") { + if (scope.space === "local" || _mode === "scale") { - scope.object.position.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); - } + scope.object.position.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); + } - if (scope.axis.search("X") !== -1) scope.object.position.x = Math.round(scope.object.position.x / scope.translationSnap) * scope.translationSnap; - if (scope.axis.search("Y") !== -1) scope.object.position.y = Math.round(scope.object.position.y / scope.translationSnap) * scope.translationSnap; - if (scope.axis.search("Z") !== -1) scope.object.position.z = Math.round(scope.object.position.z / scope.translationSnap) * scope.translationSnap; + if (scope.axis.search("X") !== -1) scope.object.position.x = Math.round(scope.object.position.x / scope.translationSnap) * scope.translationSnap; + if (scope.axis.search("Y") !== -1) scope.object.position.y = Math.round(scope.object.position.y / scope.translationSnap) * scope.translationSnap; + if (scope.axis.search("Z") !== -1) scope.object.position.z = Math.round(scope.object.position.z / scope.translationSnap) * scope.translationSnap; - if (scope.space === "local" || _mode === "scale") { + if (scope.space === "local" || _mode === "scale") { - scope.object.position.applyMatrix4(worldRotationMatrix); - } - } - } else if (_mode === "scale") { + scope.object.position.applyMatrix4(worldRotationMatrix); + } + } + } else if (_mode === "scale") { - point.sub(offset); - point.multiply(parentScale); + point.sub(offset); + point.multiply(parentScale); - if (scope.space === "local" || _mode === "scale") { + if (scope.space === "local" || _mode === "scale") { - if (scope.axis === "XYZ") { + if (scope.axis === "XYZ") { - scale = 1 + point.y / Math.max(oldScale.x, oldScale.y, oldScale.z); + scale = 1 + point.y / Math.max(oldScale.x, oldScale.y, oldScale.z); - scope.object.scale.x = oldScale.x * scale; - scope.object.scale.y = oldScale.y * scale; - scope.object.scale.z = oldScale.z * scale; - } else { + scope.object.scale.x = oldScale.x * scale; + scope.object.scale.y = oldScale.y * scale; + scope.object.scale.z = oldScale.z * scale; + } else { - point.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); + point.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); - if (scope.axis === "X") scope.object.scale.x = oldScale.x * (1 + point.x / oldScale.x); - if (scope.axis === "Y") scope.object.scale.y = oldScale.y * (1 + point.y / oldScale.y); - if (scope.axis === "Z") scope.object.scale.z = oldScale.z * (1 + point.z / oldScale.z); - } - } - } else if (_mode === "rotate") { + if (scope.axis === "X") scope.object.scale.x = oldScale.x * (1 + point.x / oldScale.x); + if (scope.axis === "Y") scope.object.scale.y = oldScale.y * (1 + point.y / oldScale.y); + if (scope.axis === "Z") scope.object.scale.z = oldScale.z * (1 + point.z / oldScale.z); + } + } + } else if (_mode === "rotate") { - point.sub(worldPosition); - point.multiply(parentScale); - tempVector.copy(offset).sub(worldPosition); - tempVector.multiply(parentScale); + point.sub(worldPosition); + point.multiply(parentScale); + tempVector.copy(offset).sub(worldPosition); + tempVector.multiply(parentScale); - if (scope.axis === "E") { + if (scope.axis === "E") { - point.applyMatrix4(tempMatrix.getInverse(lookAtMatrix)); - tempVector.applyMatrix4(tempMatrix.getInverse(lookAtMatrix)); + point.applyMatrix4(tempMatrix.getInverse(lookAtMatrix)); + tempVector.applyMatrix4(tempMatrix.getInverse(lookAtMatrix)); - rotation.set(Math.atan2(point.z, point.y), Math.atan2(point.x, point.z), Math.atan2(point.y, point.x)); - offsetRotation.set(Math.atan2(tempVector.z, tempVector.y), Math.atan2(tempVector.x, tempVector.z), Math.atan2(tempVector.y, tempVector.x)); + rotation.set(Math.atan2(point.z, point.y), Math.atan2(point.x, point.z), Math.atan2(point.y, point.x)); + offsetRotation.set(Math.atan2(tempVector.z, tempVector.y), Math.atan2(tempVector.x, tempVector.z), Math.atan2(tempVector.y, tempVector.x)); - tempQuaternion.setFromRotationMatrix(tempMatrix.getInverse(parentRotationMatrix)); + tempQuaternion.setFromRotationMatrix(tempMatrix.getInverse(parentRotationMatrix)); - quaternionE.setFromAxisAngle(eye, rotation.z - offsetRotation.z); - quaternionXYZ.setFromRotationMatrix(worldRotationMatrix); + quaternionE.setFromAxisAngle(eye, rotation.z - offsetRotation.z); + quaternionXYZ.setFromRotationMatrix(worldRotationMatrix); - tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionE); - tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionXYZ); + tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionE); + tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionXYZ); - scope.object.quaternion.copy(tempQuaternion); - } else if (scope.axis === "XYZE") { + scope.object.quaternion.copy(tempQuaternion); + } else if (scope.axis === "XYZE") { - quaternionE.setFromEuler(point.clone().cross(tempVector).normalize()); // rotation axis + quaternionE.setFromEuler(point.clone().cross(tempVector).normalize()); // rotation axis - tempQuaternion.setFromRotationMatrix(tempMatrix.getInverse(parentRotationMatrix)); - quaternionX.setFromAxisAngle(quaternionE, -point.clone().angleTo(tempVector)); - quaternionXYZ.setFromRotationMatrix(worldRotationMatrix); + tempQuaternion.setFromRotationMatrix(tempMatrix.getInverse(parentRotationMatrix)); + quaternionX.setFromAxisAngle(quaternionE, -point.clone().angleTo(tempVector)); + quaternionXYZ.setFromRotationMatrix(worldRotationMatrix); - tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionX); - tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionXYZ); + tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionX); + tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionXYZ); - scope.object.quaternion.copy(tempQuaternion); - } else if (scope.space === "local" || _mode === "scale") { + scope.object.quaternion.copy(tempQuaternion); + } else if (scope.space === "local" || _mode === "scale") { - point.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); + point.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); - tempVector.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); + tempVector.applyMatrix4(tempMatrix.getInverse(worldRotationMatrix)); - rotation.set(Math.atan2(point.z, point.y), Math.atan2(point.x, point.z), Math.atan2(point.y, point.x)); - offsetRotation.set(Math.atan2(tempVector.z, tempVector.y), Math.atan2(tempVector.x, tempVector.z), Math.atan2(tempVector.y, tempVector.x)); + rotation.set(Math.atan2(point.z, point.y), Math.atan2(point.x, point.z), Math.atan2(point.y, point.x)); + offsetRotation.set(Math.atan2(tempVector.z, tempVector.y), Math.atan2(tempVector.x, tempVector.z), Math.atan2(tempVector.y, tempVector.x)); - quaternionXYZ.setFromRotationMatrix(oldRotationMatrix); + quaternionXYZ.setFromRotationMatrix(oldRotationMatrix); - if (scope.rotationSnap !== null) { + if (scope.rotationSnap !== null) { - quaternionX.setFromAxisAngle(unitX, Math.round((rotation.x - offsetRotation.x) / scope.rotationSnap) * scope.rotationSnap); - quaternionY.setFromAxisAngle(unitY, Math.round((rotation.y - offsetRotation.y) / scope.rotationSnap) * scope.rotationSnap); - quaternionZ.setFromAxisAngle(unitZ, Math.round((rotation.z - offsetRotation.z) / scope.rotationSnap) * scope.rotationSnap); - } else { + quaternionX.setFromAxisAngle(unitX, Math.round((rotation.x - offsetRotation.x) / scope.rotationSnap) * scope.rotationSnap); + quaternionY.setFromAxisAngle(unitY, Math.round((rotation.y - offsetRotation.y) / scope.rotationSnap) * scope.rotationSnap); + quaternionZ.setFromAxisAngle(unitZ, Math.round((rotation.z - offsetRotation.z) / scope.rotationSnap) * scope.rotationSnap); + } else { - quaternionX.setFromAxisAngle(unitX, rotation.x - offsetRotation.x); - quaternionY.setFromAxisAngle(unitY, rotation.y - offsetRotation.y); - quaternionZ.setFromAxisAngle(unitZ, rotation.z - offsetRotation.z); - } + quaternionX.setFromAxisAngle(unitX, rotation.x - offsetRotation.x); + quaternionY.setFromAxisAngle(unitY, rotation.y - offsetRotation.y); + quaternionZ.setFromAxisAngle(unitZ, rotation.z - offsetRotation.z); + } - if (scope.axis === "X") quaternionXYZ.multiplyQuaternions(quaternionXYZ, quaternionX); - if (scope.axis === "Y") quaternionXYZ.multiplyQuaternions(quaternionXYZ, quaternionY); - if (scope.axis === "Z") quaternionXYZ.multiplyQuaternions(quaternionXYZ, quaternionZ); + if (scope.axis === "X") quaternionXYZ.multiplyQuaternions(quaternionXYZ, quaternionX); + if (scope.axis === "Y") quaternionXYZ.multiplyQuaternions(quaternionXYZ, quaternionY); + if (scope.axis === "Z") quaternionXYZ.multiplyQuaternions(quaternionXYZ, quaternionZ); - scope.object.quaternion.copy(quaternionXYZ); - } else if (scope.space === "world") { + scope.object.quaternion.copy(quaternionXYZ); + } else if (scope.space === "world") { - rotation.set(Math.atan2(point.z, point.y), Math.atan2(point.x, point.z), Math.atan2(point.y, point.x)); - offsetRotation.set(Math.atan2(tempVector.z, tempVector.y), Math.atan2(tempVector.x, tempVector.z), Math.atan2(tempVector.y, tempVector.x)); + rotation.set(Math.atan2(point.z, point.y), Math.atan2(point.x, point.z), Math.atan2(point.y, point.x)); + offsetRotation.set(Math.atan2(tempVector.z, tempVector.y), Math.atan2(tempVector.x, tempVector.z), Math.atan2(tempVector.y, tempVector.x)); - tempQuaternion.setFromRotationMatrix(tempMatrix.getInverse(parentRotationMatrix)); + tempQuaternion.setFromRotationMatrix(tempMatrix.getInverse(parentRotationMatrix)); - if (scope.rotationSnap !== null) { + if (scope.rotationSnap !== null) { - quaternionX.setFromAxisAngle(unitX, Math.round((rotation.x - offsetRotation.x) / scope.rotationSnap) * scope.rotationSnap); - quaternionY.setFromAxisAngle(unitY, Math.round((rotation.y - offsetRotation.y) / scope.rotationSnap) * scope.rotationSnap); - quaternionZ.setFromAxisAngle(unitZ, Math.round((rotation.z - offsetRotation.z) / scope.rotationSnap) * scope.rotationSnap); - } else { + quaternionX.setFromAxisAngle(unitX, Math.round((rotation.x - offsetRotation.x) / scope.rotationSnap) * scope.rotationSnap); + quaternionY.setFromAxisAngle(unitY, Math.round((rotation.y - offsetRotation.y) / scope.rotationSnap) * scope.rotationSnap); + quaternionZ.setFromAxisAngle(unitZ, Math.round((rotation.z - offsetRotation.z) / scope.rotationSnap) * scope.rotationSnap); + } else { - quaternionX.setFromAxisAngle(unitX, rotation.x - offsetRotation.x); - quaternionY.setFromAxisAngle(unitY, rotation.y - offsetRotation.y); - quaternionZ.setFromAxisAngle(unitZ, rotation.z - offsetRotation.z); - } + quaternionX.setFromAxisAngle(unitX, rotation.x - offsetRotation.x); + quaternionY.setFromAxisAngle(unitY, rotation.y - offsetRotation.y); + quaternionZ.setFromAxisAngle(unitZ, rotation.z - offsetRotation.z); + } - quaternionXYZ.setFromRotationMatrix(worldRotationMatrix); + quaternionXYZ.setFromRotationMatrix(worldRotationMatrix); - if (scope.axis === "X") tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionX); - if (scope.axis === "Y") tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionY); - if (scope.axis === "Z") tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionZ); + if (scope.axis === "X") tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionX); + if (scope.axis === "Y") tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionY); + if (scope.axis === "Z") tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionZ); - tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionXYZ); + tempQuaternion.multiplyQuaternions(tempQuaternion, quaternionXYZ); - scope.object.quaternion.copy(tempQuaternion); - } - } + scope.object.quaternion.copy(tempQuaternion); + } + } - scope.update(); - scope.dispatchEvent(changeEvent); - scope.dispatchEvent(objectChangeEvent); - } + scope.update(); + scope.dispatchEvent(changeEvent); + scope.dispatchEvent(objectChangeEvent); + } - function onPointerUp(event) { + function onPointerUp(event) { - event.preventDefault(); // Prevent MouseEvent on mobile + event.preventDefault(); // Prevent MouseEvent on mobile - if (event.button !== undefined && event.button !== 0) return; + if (event.button !== undefined && event.button !== 0) return; - if (_dragging && scope.axis !== null) { + if (_dragging && scope.axis !== null) { - mouseUpEvent.mode = _mode; - scope.dispatchEvent(mouseUpEvent); - } + mouseUpEvent.mode = _mode; + scope.dispatchEvent(mouseUpEvent); + } - _dragging = false; + _dragging = false; - if ('TouchEvent' in window && event instanceof TouchEvent) { + if ('TouchEvent' in window && event instanceof TouchEvent) { - // Force "rollover" + // Force "rollover" - scope.axis = null; - scope.update(); - scope.dispatchEvent(changeEvent); - } else { + scope.axis = null; + scope.update(); + scope.dispatchEvent(changeEvent); + } else { - onPointerHover(event); - } - } + onPointerHover(event); + } + } - function intersectObjects(pointer, objects) { + function intersectObjects(pointer, objects) { - var rect = domElement.getBoundingClientRect(); - var x = (pointer.clientX - rect.left) / rect.width; - var y = (pointer.clientY - rect.top) / rect.height; + var rect = domElement.getBoundingClientRect(); + var x = (pointer.clientX - rect.left) / rect.width; + var y = (pointer.clientY - rect.top) / rect.height; - pointerVector.set(x * 2 - 1, -(y * 2) + 1); - ray.setFromCamera(pointerVector, camera); + pointerVector.set(x * 2 - 1, -(y * 2) + 1); + ray.setFromCamera(pointerVector, camera); - var intersections = ray.intersectObjects(objects, true); - return intersections[0] ? intersections[0] : false; - } - }; + var intersections = ray.intersectObjects(objects, true); + return intersections[0] ? intersections[0] : false; + } + }; - THREE.TransformControls.prototype = Object.create(THREE.Object3D.prototype); - THREE.TransformControls.prototype.constructor = THREE.TransformControls; + THREE.TransformControls.prototype = Object.create(THREE.Object3D.prototype); + THREE.TransformControls.prototype.constructor = THREE.TransformControls; })(); /***/ }, @@ -27153,312 +27113,312 @@ 'use strict'; - /** - * @author qiao / https://github.com/qiao - * @author mrdoob / http://mrdoob.com - * @author alteredq / http://alteredqualia.com/ - * @author WestLangley / http://github.com/WestLangley + /** + * @author qiao / https://github.com/qiao + * @author mrdoob / http://mrdoob.com + * @author alteredq / http://alteredqualia.com/ + * @author WestLangley / http://github.com/WestLangley */ THREE.EditorControls = function (object, domElement) { - domElement = domElement !== undefined ? domElement : document; + domElement = domElement !== undefined ? domElement : document; - // API + // API - this.enabled = true; - this.center = new THREE.Vector3(); + this.enabled = true; + this.center = new THREE.Vector3(); - // internals + // internals - var scope = this; - var vector = new THREE.Vector3(); + var scope = this; + var vector = new THREE.Vector3(); - var STATE = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2 }; - var stateClass = ['state-rotating', 'state-zooming', 'state-dragging']; - var state = STATE.NONE; + var STATE = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2 }; + var stateClass = ['state-rotating', 'state-zooming', 'state-dragging']; + var state = STATE.NONE; - var center = this.center; - var normalMatrix = new THREE.Matrix3(); - var pointer = new THREE.Vector2(); - var pointerOld = new THREE.Vector2(); + var center = this.center; + var normalMatrix = new THREE.Matrix3(); + var pointer = new THREE.Vector2(); + var pointerOld = new THREE.Vector2(); - // events + // events - var changeEvent = { type: 'change' }; + var changeEvent = { type: 'change' }; - this.focus = function (target, frame) { + this.focus = function (target, frame) { - var scale = new THREE.Vector3(); - target.matrixWorld.decompose(center, new THREE.Quaternion(), scale); + var scale = new THREE.Vector3(); + target.matrixWorld.decompose(center, new THREE.Quaternion(), scale); - if (frame && target.geometry) { + if (frame && target.geometry) { - scale = (scale.x + scale.y + scale.z) / 3; - center.add(target.geometry.boundingSphere.center.clone().multiplyScalar(scale)); - var radius = target.geometry.boundingSphere.radius * scale; - var pos = object.position.clone().sub(center).normalize().multiplyScalar(radius * 2); - object.position.copy(center).add(pos); - } + scale = (scale.x + scale.y + scale.z) / 3; + center.add(target.geometry.boundingSphere.center.clone().multiplyScalar(scale)); + var radius = target.geometry.boundingSphere.radius * scale; + var pos = object.position.clone().sub(center).normalize().multiplyScalar(radius * 2); + object.position.copy(center).add(pos); + } - object.lookAt(center); + object.lookAt(center); - scope.dispatchEvent(changeEvent); - }; + scope.dispatchEvent(changeEvent); + }; - this.pan = function (delta) { + this.pan = function (delta) { - var distance = object.position.distanceTo(center); + var distance = object.position.distanceTo(center); - delta.multiplyScalar(distance * 0.001); - delta.applyMatrix3(normalMatrix.getNormalMatrix(object.matrix)); + delta.multiplyScalar(distance * 0.001); + delta.applyMatrix3(normalMatrix.getNormalMatrix(object.matrix)); - object.position.add(delta); - center.add(delta); + object.position.add(delta); + center.add(delta); - scope.dispatchEvent(changeEvent); - }; + scope.dispatchEvent(changeEvent); + }; - this.zoom = function (delta) { + this.zoom = function (delta) { - var distance = object.position.distanceTo(center); + var distance = object.position.distanceTo(center); - delta.multiplyScalar(distance * 0.001); + delta.multiplyScalar(distance * 0.001); - if (delta.length() > distance) return; + if (delta.length() > distance) return; - delta.applyMatrix3(normalMatrix.getNormalMatrix(object.matrix)); - /* - console.log(object.position); - object.zoom+=delta.z; - console.log(object.zoom,delta); - object.updateProjectionMatrix(); - */ - object.position.add(delta); + delta.applyMatrix3(normalMatrix.getNormalMatrix(object.matrix)); + /* + console.log(object.position); + object.zoom+=delta.z; + console.log(object.zoom,delta); + object.updateProjectionMatrix(); + */ + object.position.add(delta); - scope.dispatchEvent(changeEvent); - }; + scope.dispatchEvent(changeEvent); + }; - this.rotate = function (delta) { + this.rotate = function (delta) { - vector.copy(object.position).sub(center); + vector.copy(object.position).sub(center); - var theta = Math.atan2(vector.x, vector.z); - var phi = Math.atan2(Math.sqrt(vector.x * vector.x + vector.z * vector.z), vector.y); + var theta = Math.atan2(vector.x, vector.z); + var phi = Math.atan2(Math.sqrt(vector.x * vector.x + vector.z * vector.z), vector.y); - theta += delta.x; - phi += delta.y; + theta += delta.x; + phi += delta.y; - var EPS = 0.000001; + var EPS = 0.000001; - phi = Math.max(EPS, Math.min(Math.PI - EPS, phi)); + phi = Math.max(EPS, Math.min(Math.PI - EPS, phi)); - var radius = vector.length(); + var radius = vector.length(); - vector.x = radius * Math.sin(phi) * Math.sin(theta); - vector.y = radius * Math.cos(phi); - vector.z = radius * Math.sin(phi) * Math.cos(theta); + vector.x = radius * Math.sin(phi) * Math.sin(theta); + vector.y = radius * Math.cos(phi); + vector.z = radius * Math.sin(phi) * Math.cos(theta); - object.position.copy(center).add(vector); + object.position.copy(center).add(vector); - object.lookAt(center); + object.lookAt(center); - scope.dispatchEvent(changeEvent); - }; + scope.dispatchEvent(changeEvent); + }; - // mouse + // mouse - function onMouseDown(event) { + function onMouseDown(event) { - if (scope.enabled === false) return; + if (scope.enabled === false) return; - if (event.button === 0) { + if (event.button === 0) { - state = STATE.ROTATE; - } else if (event.button === 1) { + state = STATE.ROTATE; + } else if (event.button === 1) { - state = STATE.ZOOM; - } else if (event.button === 2) { + state = STATE.ZOOM; + } else if (event.button === 2) { - state = STATE.PAN; - } + state = STATE.PAN; + } - domElement.classList.add(stateClass[state]); + domElement.classList.add(stateClass[state]); - pointerOld.set(event.clientX, event.clientY); + pointerOld.set(event.clientX, event.clientY); - domElement.addEventListener('mousemove', onMouseMove, false); - domElement.addEventListener('mouseup', onMouseUp, false); - domElement.addEventListener('mouseout', onMouseUp, false); - domElement.addEventListener('dblclick', onMouseUp, false); - } - - function onMouseMove(event) { + domElement.addEventListener('mousemove', onMouseMove, false); + domElement.addEventListener('mouseup', onMouseUp, false); + domElement.addEventListener('mouseout', onMouseUp, false); + domElement.addEventListener('dblclick', onMouseUp, false); + } - if (scope.enabled === false) return; + function onMouseMove(event) { - pointer.set(event.clientX, event.clientY); + if (scope.enabled === false) return; - var movementX = pointer.x - pointerOld.x; - var movementY = pointer.y - pointerOld.y; + pointer.set(event.clientX, event.clientY); - if (state === STATE.ROTATE) { + var movementX = pointer.x - pointerOld.x; + var movementY = pointer.y - pointerOld.y; - scope.rotate(new THREE.Vector3(-movementX * 0.005, -movementY * 0.005, 0)); - } else if (state === STATE.ZOOM) { + if (state === STATE.ROTATE) { - scope.zoom(new THREE.Vector3(0, 0, movementY)); - } else if (state === STATE.PAN) { + scope.rotate(new THREE.Vector3(-movementX * 0.005, -movementY * 0.005, 0)); + } else if (state === STATE.ZOOM) { - scope.pan(new THREE.Vector3(-movementX, movementY, 0)); - } + scope.zoom(new THREE.Vector3(0, 0, movementY)); + } else if (state === STATE.PAN) { - pointerOld.set(event.clientX, event.clientY); + scope.pan(new THREE.Vector3(-movementX, movementY, 0)); } - function onMouseUp(event) { + pointerOld.set(event.clientX, event.clientY); + } - domElement.removeEventListener('mousemove', onMouseMove, false); - domElement.removeEventListener('mouseup', onMouseUp, false); - domElement.removeEventListener('mouseout', onMouseUp, false); - domElement.removeEventListener('dblclick', onMouseUp, false); + function onMouseUp(event) { - domElement.classList.remove(stateClass[state]); - state = STATE.NONE; - } + domElement.removeEventListener('mousemove', onMouseMove, false); + domElement.removeEventListener('mouseup', onMouseUp, false); + domElement.removeEventListener('mouseout', onMouseUp, false); + domElement.removeEventListener('dblclick', onMouseUp, false); - function onMouseWheel(event) { + domElement.classList.remove(stateClass[state]); + state = STATE.NONE; + } - event.preventDefault(); + function onMouseWheel(event) { - // if ( scope.enabled === false ) return; + event.preventDefault(); - var delta = 0; + // if ( scope.enabled === false ) return; - if (event.wheelDelta) { + var delta = 0; - // WebKit / Opera / Explorer 9 + if (event.wheelDelta) { - delta = -event.wheelDelta; - } else if (event.detail) { + // WebKit / Opera / Explorer 9 - // Firefox + delta = -event.wheelDelta; + } else if (event.detail) { - delta = event.detail * 10; - } + // Firefox - scope.zoom(new THREE.Vector3(0, 0, delta)); + delta = event.detail * 10; } - function contextmenu(event) { + scope.zoom(new THREE.Vector3(0, 0, delta)); + } - event.preventDefault(); - } + function contextmenu(event) { - this.dispose = function () { + event.preventDefault(); + } - domElement.removeEventListener('contextmenu', contextmenu, false); - domElement.removeEventListener('mousedown', onMouseDown, false); - domElement.removeEventListener('mousewheel', onMouseWheel, false); - domElement.removeEventListener('MozMousePixelScroll', onMouseWheel, false); // firefox + this.dispose = function () { - domElement.removeEventListener('mousemove', onMouseMove, false); - domElement.removeEventListener('mouseup', onMouseUp, false); - domElement.removeEventListener('mouseout', onMouseUp, false); - domElement.removeEventListener('dblclick', onMouseUp, false); + domElement.removeEventListener('contextmenu', contextmenu, false); + domElement.removeEventListener('mousedown', onMouseDown, false); + domElement.removeEventListener('mousewheel', onMouseWheel, false); + domElement.removeEventListener('MozMousePixelScroll', onMouseWheel, false); // firefox - domElement.removeEventListener('touchstart', touchStart, false); - domElement.removeEventListener('touchmove', touchMove, false); - }; + domElement.removeEventListener('mousemove', onMouseMove, false); + domElement.removeEventListener('mouseup', onMouseUp, false); + domElement.removeEventListener('mouseout', onMouseUp, false); + domElement.removeEventListener('dblclick', onMouseUp, false); - domElement.addEventListener('contextmenu', contextmenu, false); - domElement.addEventListener('mousedown', onMouseDown, false); - domElement.addEventListener('mousewheel', onMouseWheel, false); - domElement.addEventListener('MozMousePixelScroll', onMouseWheel, false); // firefox + domElement.removeEventListener('touchstart', touchStart, false); + domElement.removeEventListener('touchmove', touchMove, false); + }; - // touch + domElement.addEventListener('contextmenu', contextmenu, false); + domElement.addEventListener('mousedown', onMouseDown, false); + domElement.addEventListener('mousewheel', onMouseWheel, false); + domElement.addEventListener('MozMousePixelScroll', onMouseWheel, false); // firefox - var touch = new THREE.Vector3(); + // touch - var touches = [new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3()]; - var prevTouches = [new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3()]; + var touch = new THREE.Vector3(); - var prevDistance = null; + var touches = [new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3()]; + var prevTouches = [new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3()]; - function touchStart(event) { + var prevDistance = null; - if (scope.enabled === false) return; + function touchStart(event) { - switch (event.touches.length) { + if (scope.enabled === false) return; - case 1: - touches[0].set(event.touches[0].pageX, event.touches[0].pageY, 0); - touches[1].set(event.touches[0].pageX, event.touches[0].pageY, 0); - break; + switch (event.touches.length) { - case 2: - touches[0].set(event.touches[0].pageX, event.touches[0].pageY, 0); - touches[1].set(event.touches[1].pageX, event.touches[1].pageY, 0); - prevDistance = touches[0].distanceTo(touches[1]); - break; + case 1: + touches[0].set(event.touches[0].pageX, event.touches[0].pageY, 0); + touches[1].set(event.touches[0].pageX, event.touches[0].pageY, 0); + break; - } + case 2: + touches[0].set(event.touches[0].pageX, event.touches[0].pageY, 0); + touches[1].set(event.touches[1].pageX, event.touches[1].pageY, 0); + prevDistance = touches[0].distanceTo(touches[1]); + break; - prevTouches[0].copy(touches[0]); - prevTouches[1].copy(touches[1]); } - function touchMove(event) { + prevTouches[0].copy(touches[0]); + prevTouches[1].copy(touches[1]); + } - if (scope.enabled === false) return; + function touchMove(event) { - event.preventDefault(); - event.stopPropagation(); + if (scope.enabled === false) return; - function getClosest(touch, touches) { + event.preventDefault(); + event.stopPropagation(); - var closest = touches[0]; + function getClosest(touch, touches) { - for (var i in touches) { + var closest = touches[0]; - if (closest.distanceTo(touch) > touches[i].distanceTo(touch)) closest = touches[i]; - } + for (var i in touches) { - return closest; - } + if (closest.distanceTo(touch) > touches[i].distanceTo(touch)) closest = touches[i]; + } - switch (event.touches.length) { + return closest; + } - case 1: - touches[0].set(event.touches[0].pageX, event.touches[0].pageY, 0); - touches[1].set(event.touches[0].pageX, event.touches[0].pageY, 0); - scope.rotate(touches[0].sub(getClosest(touches[0], prevTouches)).multiplyScalar(-0.005)); - break; + switch (event.touches.length) { - case 2: - touches[0].set(event.touches[0].pageX, event.touches[0].pageY, 0); - touches[1].set(event.touches[1].pageX, event.touches[1].pageY, 0); - distance = touches[0].distanceTo(touches[1]); - scope.zoom(new THREE.Vector3(0, 0, prevDistance - distance)); - prevDistance = distance; + case 1: + touches[0].set(event.touches[0].pageX, event.touches[0].pageY, 0); + touches[1].set(event.touches[0].pageX, event.touches[0].pageY, 0); + scope.rotate(touches[0].sub(getClosest(touches[0], prevTouches)).multiplyScalar(-0.005)); + break; - var offset0 = touches[0].clone().sub(getClosest(touches[0], prevTouches)); - var offset1 = touches[1].clone().sub(getClosest(touches[1], prevTouches)); - offset0.x = -offset0.x; - offset1.x = -offset1.x; + case 2: + touches[0].set(event.touches[0].pageX, event.touches[0].pageY, 0); + touches[1].set(event.touches[1].pageX, event.touches[1].pageY, 0); + distance = touches[0].distanceTo(touches[1]); + scope.zoom(new THREE.Vector3(0, 0, prevDistance - distance)); + prevDistance = distance; - scope.pan(offset0.add(offset1).multiplyScalar(0.5)); + var offset0 = touches[0].clone().sub(getClosest(touches[0], prevTouches)); + var offset1 = touches[1].clone().sub(getClosest(touches[1], prevTouches)); + offset0.x = -offset0.x; + offset1.x = -offset1.x; - break; + scope.pan(offset0.add(offset1).multiplyScalar(0.5)); - } + break; - prevTouches[0].copy(touches[0]); - prevTouches[1].copy(touches[1]); } - domElement.addEventListener('touchstart', touchStart, false); - domElement.addEventListener('touchmove', touchMove, false); + prevTouches[0].copy(touches[0]); + prevTouches[1].copy(touches[1]); + } + + domElement.addEventListener('touchstart', touchStart, false); + domElement.addEventListener('touchmove', touchMove, false); }; THREE.EditorControls.prototype = Object.create(THREE.EventDispatcher.prototype); @@ -27529,8 +27489,8 @@ var registryBaseUrl = 'https://aframe.io/aframe-registry/build/'; - /** - * Asynchronously load and register components from the registry. + /** + * Asynchronously load and register components from the registry. */ /* global XMLHttpRequest JSON */ function ComponentLoader() { @@ -27539,8 +27499,8 @@ } ComponentLoader.prototype = { - /** - * XHR the registry JSON. + /** + * XHR the registry JSON. */ loadFromRegistry: function loadFromRegistry() { var _this = this; @@ -27564,10 +27524,10 @@ xhr.send(); }, - /** - * Inject component script. If already injected, then resolve. - * - * @returns {Promise} + /** + * Inject component script. If already injected, then resolve. + * + * @returns {Promise} */ addComponentToScene: function addComponentToScene(packageName, componentName) { var component = this.components[packageName]; @@ -27751,13 +27711,13 @@ var components = AFRAME.components; var isSingleProperty = AFRAME.schema.isSingleProperty; - /** - * Update a component. - * - * @param {Element} entity - Entity to modify. - * @param {string} component - Name of the component. - * @param {string} property - Property name. - * @param {string|number} value - New value. + /** + * Update a component. + * + * @param {Element} entity - Entity to modify. + * @param {string} component - Name of the component. + * @param {string} property - Property name. + * @param {string|number} value - New value. */ function updateEntity(entity, propertyName, value) { if (propertyName.indexOf('.') !== -1) { @@ -27784,10 +27744,10 @@ Events.emit('objectchanged', entity.object3D); } - /** - * Remove an entity - * @param {Element} entity Entity to remove. - * @param {boolean} force (Optional) If true it won't ask for confirmation + /** + * Remove an entity + * @param {Element} entity Entity to remove. + * @param {boolean} force (Optional) If true it won't ask for confirmation */ function removeEntity(entity, force) { if (entity) { @@ -27825,9 +27785,9 @@ return null; } - /** - * Remove the selected entity - * @param {boolean} force (Optional) If true it won't ask for confirmation + /** + * Remove the selected entity + * @param {boolean} force (Optional) If true it won't ask for confirmation */ function removeSelectedEntity(force) { if (AFRAME.INSPECTOR.selectedEntity) { @@ -27835,18 +27795,18 @@ } } - /** - * Insert an node after a referenced node. - * @param {Element} newNode Node to insert. - * @param {Element} referenceNode Node used as reference to insert after it. + /** + * Insert an node after a referenced node. + * @param {Element} newNode Node to insert. + * @param {Element} referenceNode Node used as reference to insert after it. */ function insertAfter(newNode, referenceNode) { referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); } - /** - * Clone an entity, inserting it after the cloned one. - * @param {Element} entity Entity to clone + /** + * Clone an entity, inserting it after the cloned one. + * @param {Element} entity Entity to clone */ function cloneEntity(entity) { entity.flushToDOM(); @@ -27866,8 +27826,8 @@ insertAfter(copy, entity); } - /** - * Clone the selected entity + /** + * Clone the selected entity */ function cloneSelectedEntity() { if (AFRAME.INSPECTOR.selectedEntity) { @@ -27875,10 +27835,10 @@ } } - /** - * Returns the clipboard representation to be used to copy to the clipboard - * @param {Element} entity Entity to copy to clipboard - * @return {string} Entity clipboard representation + /** + * Returns the clipboard representation to be used to copy to the clipboard + * @param {Element} entity Entity to copy to clipboard + * @return {string} Entity clipboard representation */ function getClipboardRepresentation(entity) { //entity.flushToDOM(); @@ -27963,10 +27923,10 @@ } } - /** - * Detect element's Id collision and returns a valid one - * @param {string} baseId Proposed Id - * @return {string} Valid Id based on the proposed Id + /** + * Detect element's Id collision and returns a valid one + * @param {string} baseId Proposed Id + * @return {string} Valid Id based on the proposed Id */ function getUniqueId(baseId) { if (!document.getElementById(baseId)) { @@ -28033,8 +27993,8 @@ var isSingleProperty = AFRAME.schema.isSingleProperty; - /** - * Single component. + /** + * Single component. */ var Component = function (_React$Component) { @@ -28115,8 +28075,8 @@ } } - /** - * Render propert(ies) of the component. + /** + * Render propert(ies) of the component. */ }, { @@ -29333,11 +29293,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /** - * Get the list of modified properties - * @param {Element} entity Entity where the component belongs - * @param {string} componentName Component name - * @return {object} List of modified properties with their value + /** + * Get the list of modified properties + * @param {Element} entity Entity where the component belongs + * @param {string} componentName Component name + * @return {object} List of modified properties with their value */ function getModifiedProperties(entity, componentName) { var data = entity.components[componentName].data; @@ -29360,11 +29320,11 @@ return diff; } - /** - * [getClipboardRepresentation description] - * @param {[type]} entity [description] - * @param {[type]} componentName [description] - * @return {[type]} [description] + /** + * [getClipboardRepresentation description] + * @param {[type]} entity [description] + * @param {[type]} componentName [description] + * @return {[type]} [description] */ function getClipboardRepresentation(entity, componentName) { var diff = getModifiedProperties(entity, componentName); @@ -29372,10 +29332,10 @@ return componentName + '="' + attributes + '"'; } - /** - * Get the component docs link - * @param {string} componentName Component's name - * @return {string} URL to the documentation + /** + * Get the component docs link + * @param {string} componentName Component's name + * @return {string} URL to the documentation */ function getComponentDocsUrl(componentName) { if (AFRAME.components[componentName]) { @@ -29384,10 +29344,10 @@ } } - /** - * Get component documentation html link - * @param {string} componentName Component's name - * @return {string} Html icon link to the documentation + /** + * Get component documentation html link + * @param {string} componentName Component's name + * @return {string} Html icon link to the documentation */ function getComponentDocsHtmlLink(componentName) { var url = getComponentDocsUrl(componentName); @@ -30245,8 +30205,6 @@ /* 229 */ /***/ function(module, exports) { - var DOCUMENT_NODE_TYPE = 9; - /** * A polyfill for Element.matches() */ @@ -30268,7 +30226,7 @@ * @return {Function} */ function closest (element, selector) { - while (element && element.nodeType !== DOCUMENT_NODE_TYPE) { + while (element && element !== document) { if (element.matches(selector)) return element; element = element.parentNode; } @@ -31269,19 +31227,19 @@ }); exports.getSceneName = getSceneName; exports.generateHtml = generateHtml; - /** - * Get scene name - * @param {Element} scene Scene element - * @return {string} Scene ID or slugify from the current path + /** + * Get scene name + * @param {Element} scene Scene element + * @return {string} Scene ID or slugify from the current path */ function getSceneName(scene) { return scene.id || slugify(window.location.host + window.location.pathname); } - /** - * Slugify the string removing non-word chars and spaces - * @param {string} text String to slugify - * @return {string} Slugified string + /** + * Slugify the string removing non-word chars and spaces + * @param {string} text String to slugify + * @return {string} Slugified string */ function slugify(text) { return text.toString().toLowerCase().replace(/\s+/g, '-') // Replace spaces with - @@ -31291,9 +31249,9 @@ .replace(/-+$/, ''); // Trim - from end of text } - /** - * Generate a filtered stringify HTML from the current page - * @return {string} String that contains the filtered HTML of the current page + /** + * Generate a filtered stringify HTML from the current page + * @return {string} String that contains the filtered HTML of the current page */ function generateHtml() { var parser = new window.DOMParser(); @@ -31316,10 +31274,10 @@ return xmlToString(xmlDoc); } - /** - * Returns the string representation of a XML - * @param {Document} xmlData XML to stringify - * @return {string} String representation of the XML document + /** + * Returns the string representation of a XML + * @param {Document} xmlData XML to stringify + * @return {string} String representation of the XML document */ function xmlToString(xmlData) { var xmlString; @@ -31476,7 +31434,7 @@ // module - exports.push([module.id, "body.aframe-inspector-opened {\r\n color: #fff;\r\n font-family: 'Roboto', sans-serif;\r\n font-size: 12px;\r\n margin: 0;\r\n overflow: hidden;\r\n}\r\n\r\n.toggle-edit {\r\n background-color: #ed3160;\r\n color: #fff;\r\n font-family: 'Roboto', sans-serif;\r\n font-size: 12px;\r\n left: 3px;\r\n margin: 0;\r\n padding: 6px 10px;\r\n position: fixed;\r\n text-align: center;\r\n text-decoration: none;\r\n top: 3px;\r\n width: 174px;\r\n z-index: 99999;\r\n}\r\n\r\n.toggle-edit:hover {\r\n background-color: rgb(228, 43, 90);\r\n}\r\n\r\nhr {\r\n border: 0;\r\n border-top: 1px solid #ccc;\r\n}\r\n\r\na {\r\n cursor: pointer;\r\n}\r\n\r\nbutton {\r\n position: relative;\r\n}\r\n\r\ncode {\r\n font-family: Consolas, Andale Mono, Monaco, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;\r\n}\r\n\r\ntextarea {\r\n -moz-tab-size: 4;\r\n -o-tab-size: 4;\r\n tab-size: 4;\r\n white-space: pre;\r\n word-wrap: normal;\r\n}\r\n\r\ntextarea.success {\r\n border-color: #8b8 !important;\r\n}\r\n\r\ntextarea.fail {\r\n background-color: rgba(255, 0, 0, 0.05);\r\n border-color: #f00 !important;\r\n}\r\n\r\ntextarea,\r\ninput {\r\n outline: none; /* osx */\r\n}\r\n\r\n#left-sidebar,\r\n#right-panels {\r\n z-index: 9999;\r\n}\r\n\r\n#sidebar,\r\n#left-sidebar,\r\n.panel {\r\n cursor: default;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n\r\n.collapsible .static {\r\n margin: 0;\r\n}\r\n\r\n.collapsible .static .collapse-button {\r\n border: 6px solid transparent;\r\n float: left;\r\n height: 0;\r\n margin-right: 6px;\r\n width: 0;\r\n}\r\n\r\n.collapsible.collapsed .static .collapse-button {\r\n border-left-color: #1faaf2;\r\n margin-top: 2px;\r\n}\r\n\r\n.collapsible:not(.collapsed) .static .collapse-button {\r\n border-top-color: #1faaf2;\r\n margin-top: 6px;\r\n}\r\n\r\n.collapsible.collapsed .content {\r\n display: none;\r\n}\r\n\r\n.scenegraph {\r\n border-top: 1px solid #111;\r\n padding-top: 32px;\r\n}\r\n\r\n.scenegraph .search {\r\n padding: 5px;\r\n}\r\n\r\n.scenegraph-toolbar {\r\n background-color: #333;\r\n position: fixed;\r\n top: 32px;\r\n}\r\n\r\n.scenegraph-actions {\r\n padding: 9px 0 5px;\r\n}\r\n\r\n.search {\r\n color: #aaa;\r\n font-size: 16px;\r\n position: relative;\r\n}\r\n\r\n.search input {\r\n background: #222;\r\n border-radius: 5px;\r\n height: 22px;\r\n width: 185px;\r\n}\r\n\r\n.search input {\r\n text-indent: 10px;\r\n}\r\n\r\n.search .fa-search {\r\n position: absolute;\r\n right: 11px;\r\n top: 10px;\r\n}\r\n\r\ninput {\r\n background-color: transparent;\r\n border: 1px solid #555;\r\n color: #fff;\r\n}\r\n\r\ninput,\r\n.texture canvas {\r\n -webkit-transition: 0.1s background-color ease-in-out, 0.1s border-color ease-in-out, 0.1s color ease-in-out;\r\n transition: 0.1s background-color ease-in-out, 0.1s border-color ease-in-out, 0.1s color ease-in-out;\r\n}\r\n\r\ninput[type=text],\r\ninput[type=number],\r\ninput.string,\r\ninput.number {\r\n min-height: 14px;\r\n outline: none;\r\n}\r\n\r\ninput.number {\r\n background-color: transparent !important;\r\n border: 0;\r\n color: #20b1fb !important;\r\n cursor: col-resize;\r\n font-size: 12px;\r\n padding: 2px;\r\n}\r\n\r\ninput.string:focus,\r\ninput.number:focus {\r\n border: 1px solid #20b1fb;\r\n color: #fff;\r\n cursor: auto;\r\n}\r\n\r\n#left-sidebar {\r\n background: #2b2b2b;\r\n bottom: 0;\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-orient: vertical;\r\n -webkit-box-direction: normal;\r\n -ms-flex-direction: column;\r\n flex-direction: column;\r\n height: 100%;\r\n left: 0;\r\n overflow: auto;\r\n position: fixed;\r\n top: 0;\r\n width: 200px;\r\n}\r\n\r\n#sidebar {\r\n background: #2b2b2b;\r\n width: 330px;\r\n}\r\n\r\n#sidebar * {\r\n vertical-align: middle;\r\n}\r\n\r\ninput,\r\ntextarea,\r\nselect {\r\n background: #222;\r\n border: 1px solid transparent;\r\n color: #888;\r\n}\r\n\r\n.row {\r\n margin-bottom: 10px;\r\n min-height: 20px;\r\n}\r\n\r\ninput[type=color] {\r\n background-color: #333;\r\n border: 1px solid #111;\r\n cursor: pointer;\r\n}\r\n\r\n.texture canvas {\r\n border: 1px solid #222;\r\n}\r\n\r\ninput[type=color] {\r\n cursor: pointer;\r\n height: 16px;\r\n padding: 0;\r\n width: 64px;\r\n}\r\n\r\n/* Note: these vendor-prefixed selectors cannot be grouped! */\r\n\r\ninput[type=color]::-webkit-color-swatch {\r\n border: 0; /* To remove the gray border. */\r\n}\r\n\r\ninput[type=color]::-webkit-color-swatch-wrapper {\r\n padding: 0; /* To remove the inner padding. */\r\n}\r\n\r\ninput[type=color]::-moz-color-swatch {\r\n border: 0;\r\n}\r\n\r\ninput[type=color]::-moz-focus-inner {\r\n border: 0; /* To remove the inner border (specific to Firefox). */\r\n padding: 0;\r\n}\r\n\r\n.components {\r\n background-color: #323232;\r\n color: #bcbcbc;\r\n height: 100%;\r\n overflow: auto;\r\n position: fixed;\r\n width: 330px;\r\n}\r\n\r\ndiv.vec2,\r\ndiv.vec3 {\r\n display: inline;\r\n}\r\n\r\n.vec2 input.number,\r\n.vec3 input.number {\r\n width: 46px;\r\n}\r\n\r\n.collapsible-header {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-pack: justify;\r\n -ms-flex-pack: justify;\r\n justify-content: space-between;\r\n}\r\n\r\n.component-title span {\r\n float: left;\r\n max-width: 110px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n text-transform: uppercase;\r\n white-space: nowrap;\r\n}\r\n\r\n.collapsible .static {\r\n background-color: #323232;\r\n border-bottom: 1px solid #262626;\r\n border-top: 1px solid #262626;\r\n color: #fff;\r\n height: 16px;\r\n padding: 10px;\r\n vertical-align: middle;\r\n}\r\n\r\n.collapsible .menu {\r\n text-align: right;\r\n}\r\n\r\n.collapsible .menu::after {\r\n color: #bbb;\r\n content: '\\2807';\r\n font-size: 12px;\r\n padding: 5px;\r\n text-align: right;\r\n}\r\n\r\n.collapsible .static .collapse-button {\r\n border-left: 5px solid transparent;\r\n border-right: 5px solid transparent;\r\n float: left;\r\n height: 0;\r\n margin-right: 10px;\r\n margin-top: 2px;\r\n width: 0;\r\n}\r\n\r\n.collapsible.collapsed .static .collapse-button {\r\n border-left-color: #bbb;\r\n}\r\n\r\n.collapsible:not(.collapsed) .static .collapse-button {\r\n border-top-color: #bbb;\r\n}\r\n\r\n.collapsible .content {\r\n background-color: #2b2b2b;\r\n padding: 10px;\r\n}\r\n\r\n.components .row {\r\n margin-bottom: 10px;\r\n min-height: 20px;\r\n}\r\n\r\n.components * {\r\n vertical-align: middle;\r\n}\r\n\r\n.components .row .text {\r\n cursor: default;\r\n display: inline-block;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n vertical-align: middle;\r\n width: 120px;\r\n}\r\n\r\n.components .row .map_value {\r\n margin: 0 0 0 5px;\r\n width: 68px;\r\n}\r\n\r\n.hidden {\r\n visibility: hidden;\r\n}\r\n\r\n.texture canvas + input {\r\n margin-left: 5px;\r\n}\r\n\r\n.texture .fa {\r\n padding-right: 5px;\r\n}\r\n\r\n.scenegraph-bottom {\r\n background-color: #323232;\r\n border-top: 1px solid #111;\r\n bottom: 10;\r\n height: 40px;\r\n left: 0;\r\n z-index: 100;\r\n}\r\n\r\na.button {\r\n color: #bcbcbc;\r\n font-size: 16px;\r\n margin-left: 10px;\r\n text-decoration: none;\r\n}\r\n\r\na.button:hover {\r\n color: #1faaf2;\r\n}\r\n\r\n.scenegraph-bottom a {\r\n float: right;\r\n margin: 10px;\r\n}\r\n\r\n.modal {\r\n background-color: rgb(0, 0, 0);\r\n background-color: rgba(0, 0, 0, 0.4);\r\n height: 100%;\r\n left: 0;\r\n overflow: auto;\r\n padding-top: 100px;\r\n position: fixed;\r\n top: 0;\r\n width: 100%;\r\n z-index: 9999;\r\n}\r\n\r\n.modal-content {\r\n -webkit-animation-duration: 0.2s;\r\n animation-duration: 0.2s;\r\n -webkit-animation-name: animatetop;\r\n animation-name: animatetop;\r\n background-color: #232323;\r\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\r\n margin: auto;\r\n padding: 0;\r\n position: relative;\r\n width: 889px;\r\n}\r\n\r\n@-webkit-keyframes animatetop {\r\n from {\r\n opacity: 0;\r\n top: -300px;\r\n }\r\n\r\n to {\r\n opacity: 1;\r\n top: 0;\r\n }\r\n}\r\n\r\n@keyframes animatetop {\r\n from {\r\n opacity: 0;\r\n top: -300px;\r\n }\r\n\r\n to {\r\n opacity: 1;\r\n top: 0;\r\n }\r\n}\r\n\r\n.close {\r\n color: white;\r\n float: right;\r\n font-size: 28px;\r\n font-weight: bold;\r\n}\r\n\r\n.close:hover,\r\n.close:focus {\r\n color: #08f;\r\n cursor: pointer;\r\n text-decoration: none;\r\n}\r\n\r\n.modal-header {\r\n color: white;\r\n padding: 2px 16px;\r\n}\r\n\r\n.modal-body {\r\n overflow: auto;\r\n padding: 16px;\r\n}\r\n\r\n.modal-footer {\r\n color: white;\r\n padding: 2px 16px;\r\n}\r\n\r\n/* Gallery */\r\n\r\n.gallery {\r\n margin: 0 auto;\r\n overflow: auto;\r\n padding: 0;\r\n}\r\n\r\n.gallery li {\r\n box-shadow: 3px 3px 8px -2px rgba(0, 0, 0, 0.63);\r\n cursor: pointer;\r\n display: inline-block;\r\n float: left;\r\n margin: 8px;\r\n overflow: hidden;\r\n width: 155px;\r\n}\r\n\r\n.gallery li:hover {\r\n box-shadow: 0 0 4px 3px rgba(29, 138, 190, 0.63);\r\n}\r\n\r\n.gallery li .detail {\r\n background-color: #323232;\r\n min-height: 60px;\r\n padding: 10px;\r\n}\r\n\r\n.gallery li:hover .detail {\r\n background-color: #444;\r\n}\r\n\r\n.gallery li .detail span {\r\n color: #bbb !important;\r\n}\r\n\r\n.gallery li .detail span.title {\r\n color: #eee !important;\r\n font-weight: bold;\r\n}\r\n\r\n.preview {\r\n float: right;\r\n padding: 10px;\r\n width: 200px;\r\n}\r\n\r\n.new_asset_options {\r\n float: left;\r\n width: 600px;\r\n}\r\n\r\n.modal button {\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n appearance: none;\r\n border-radius: 0;\r\n box-shadow: none;\r\n cursor: pointer;\r\n display: inline-block;\r\n font-size: 12px;\r\n line-height: 1.8;\r\n margin: 0 10px 0 0;\r\n padding: 5px 10px;\r\n}\r\n\r\n.modal button:focus {\r\n outline: none;\r\n}\r\n\r\n.modal button {\r\n background-color: #1eaaf1;\r\n border: none;\r\n color: #fff;\r\n}\r\n\r\n.modal button:hover,\r\n.modal button.hover {\r\n background-color: #346392;\r\n text-shadow: -1px 1px #27496d;\r\n}\r\n\r\n.modal button:active,\r\n.modal button.active {\r\n background-color: #27496d;\r\n text-shadow: -1px 1px #193047;\r\n}\r\n\r\n.newimage {\r\n background-color: #323232;\r\n overflow: auto;\r\n padding: 10px;\r\n}\r\n\r\n.hide {\r\n display: none;\r\n}\r\n\r\nspan.value {\r\n color: #fff;\r\n display: inline-block;\r\n}\r\n\r\nspan.mixinlist {\r\n color: #888 !important;\r\n display: inline-block;\r\n}\r\n\r\nspan.mixinlist ul {\r\n background-color: #222;\r\n list-style-type: none;\r\n margin: 5px 0 0;\r\n padding: 5px;\r\n}\r\n\r\nspan.mixinlist ul li {\r\n font-size: 11px;\r\n margin-bottom: 3px;\r\n}\r\n\r\nspan.mixinlist ul li:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\nspan.mixin {\r\n display: inline-block;\r\n width: 100px;\r\n}\r\n\r\n.mixinlist {\r\n margin-left: 120px;\r\n}\r\n\r\nspan.subcomponent {\r\n color: #999;\r\n float: none !important;\r\n margin-left: 10px;\r\n vertical-align: top !important;\r\n}\r\n\r\n.collapsible .static {\r\n cursor: pointer;\r\n}\r\n\r\n.a-canvas.state-dragging {\r\n cursor: -webkit-grabbing;\r\n cursor: grabbing;\r\n}\r\n\r\ncode,\r\npre,\r\ninput,\r\ntextarea,\r\nselect {\r\n font-family: Consolas, Andale Mono, Monaco, Courier New, monospace;\r\n}\r\n\r\n.Select,\r\n.wf-active code,\r\n.wf-active pre,\r\n.wf-active input,\r\n.wf-active textarea,\r\n.wf-active select {\r\n font-family: Roboto Mono, Consolas, Andale Mono, Monaco, Courier New, monospace;\r\n}\r\n\r\n.tagName {\r\n font-weight: 500;\r\n}\r\n\r\n.sidebar-title {\r\n background-color: #444;\r\n color: #aaa;\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n font-size: 12px;\r\n -webkit-box-pack: justify;\r\n -ms-flex-pack: justify;\r\n justify-content: space-between;\r\n padding: 6px 10px;\r\n position: relative;\r\n text-align: center;\r\n}\r\n\r\n.toolbar {\r\n background-color: #262626;\r\n color: #333;\r\n height: 32px;\r\n position: relative;\r\n}\r\n\r\n.toolbar * {\r\n margin-left: 0;\r\n padding: 8px;\r\n vertical-align: middle;\r\n}\r\n\r\n.toolbar a.button {\r\n margin: 0 6px 0 0;\r\n}\r\n\r\n.toolbar .active {\r\n background-color: #1faaf2;\r\n color: #fff;\r\n}\r\n\r\n.toolbar .active:hover {\r\n color: #fff !important;\r\n}\r\n\r\n.local-transform {\r\n padding-left: 10px;\r\n}\r\n\r\n.local-transform label {\r\n color: #aaa;\r\n padding-left: 5px;\r\n}\r\n\r\n.local-transform a.button {\r\n padding-top: 0;\r\n}\r\n\r\n.outliner {\r\n background: #2b2b2b;\r\n color: #868686;\r\n cursor: default;\r\n -webkit-box-flex: 1;\r\n -ms-flex: 1 1 auto;\r\n flex: 1 1 auto;\r\n font-size: 12px;\r\n height: calc(100% - 98px);\r\n outline: none;\r\n overflow-y: auto;\r\n padding: 0;\r\n position: fixed;\r\n top: 98px;\r\n width: 200px;\r\n}\r\n\r\n.outliner .option {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-pack: justify;\r\n -ms-flex-pack: justify;\r\n justify-content: space-between;\r\n padding: 4px;\r\n white-space: nowrap;\r\n}\r\n\r\n.outliner .option.active {\r\n background-color: #1faaf2;\r\n color: #fff;\r\n}\r\n\r\n.outliner .option .component:hover {\r\n color: #1faaf2;\r\n}\r\n\r\n.outliner .option.active .component:hover {\r\n color: #1888c1;\r\n}\r\n\r\n.outliner .option .icons {\r\n display: none;\r\n margin: 0 3px 0 10px;\r\n}\r\n\r\n.outliner .option .icons .button {\r\n color: #fff;\r\n font-size: 12px;\r\n}\r\n\r\n.outliner .option.active .icons {\r\n display: inline;\r\n}\r\n\r\n.outliner .fa {\r\n color: #aaa;\r\n}\r\n\r\n.outliner .active .fa {\r\n color: #fff;\r\n}\r\n\r\na.flat-button {\r\n background-color: #262626;\r\n color: #bcbcbc;\r\n font-size: 11px;\r\n margin-left: 10px;\r\n padding: 5px;\r\n text-decoration: none;\r\n}\r\n\r\na.flat-button:hover {\r\n color: #1faaf2;\r\n}\r\n\r\n.component-title {\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n}\r\n\r\na.help-link {\r\n opacity: 0.4;\r\n}\r\n\r\na.help-link:hover {\r\n opacity: 1;\r\n}\r\n\r\n#right-panels {\r\n -webkit-box-align: stretch;\r\n -ms-flex-align: stretch;\r\n align-items: stretch;\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-pack: end;\r\n -ms-flex-pack: end;\r\n justify-content: flex-end;\r\n position: fixed;\r\n right: 0;\r\n top: 0;\r\n}\r\n\r\n#aframe-inspector-panels {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-pack: justify;\r\n -ms-flex-pack: justify;\r\n justify-content: space-between;\r\n}\r\n\r\n/* This is a temporaly hack, we should style the editor instead of overwriting\r\n the a-scene to fix the \"display: block\" issue. */\r\n\r\n.aframe-inspector-opened a-scene {\r\n display: inline !important;\r\n}\r\n\r\n.aframe-inspector-opened a-scene .a-canvas {\r\n background-color: #191919;\r\n position: fixed;\r\n z-index: 9999;\r\n zoom: 1;\r\n}\r\n\r\nspan.entity-name {\r\n color: #fff;\r\n font-family: Consolas, Andale Mono, Monaco, Courier New, monospace;\r\n font-size: 16px;\r\n}\r\n\r\n.add-component {\r\n width: 200px;\r\n}\r\n\r\n.Select-control {\r\n background-color: #222 !important;\r\n border: none;\r\n border-radius: 0;\r\n color: #1faaf2;\r\n}\r\n\r\n.Select-menu-outer {\r\n border: none;\r\n}\r\n\r\n.Select-menu-outer .is-focused {\r\n background-color: #1faaf2 !important;\r\n color: #fff;\r\n}\r\n\r\n.Select-option {\r\n background-color: #222 !important;\r\n}\r\n\r\n.select-widget {\r\n display: inline-block;\r\n width: 157px;\r\n}\r\n\r\n.Select-placeholder,\r\n.Select--single > .Select-control .Select-value {\r\n color: #1faaf2 !important;\r\n}\r\n\r\n.Select-value-label {\r\n color: #1faaf2 !important;\r\n}\r\n\r\n.row .Select-control {\r\n font-size: 11px;\r\n height: 24px;\r\n}\r\n\r\n.row .Select-placeholder,\r\n.row .Select--single > .Select-control .Select-value {\r\n line-height: 19px;\r\n}\r\n\r\n.row .Select-input {\r\n height: 22px;\r\n}\r\n\r\n.row input[type=text],\r\n.row input[type=number],\r\n.row input.string,\r\n.row input.number {\r\n background: #222;\r\n border: 1px solid transparent;\r\n color: #1faaf2;\r\n min-height: 20px;\r\n padding-left: 5px;\r\n padding-right: 5px;\r\n}\r\n\r\n/* shortcuts help */\r\n\r\n.help-lists {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -ms-flex-pack: distribute;\r\n justify-content: space-around;\r\n}\r\n\r\n.help-list {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0 0 10px;\r\n width: 350px;\r\n}\r\n\r\n.help-list li {\r\n margin-right: 40px;\r\n}\r\n\r\n.help-key-unit {\r\n line-height: 1.8;\r\n margin-right: 2em;\r\n padding: 5px 0;\r\n}\r\n\r\n.help-key {\r\n bottom: 2px;\r\n margin-right: 4px;\r\n min-width: 60px;\r\n position: relative;\r\n}\r\n\r\n.help-key span {\r\n background-color: #2e2e2e;\r\n background-repeat: repeat-x;\r\n border: 1px solid #666;\r\n border-radius: 3px;\r\n box-shadow: 0 0 5px #000;\r\n color: #999;\r\n display: inline-block;\r\n font-size: 12px;\r\n padding: 0 8px;\r\n text-align: center;\r\n}\r\n\r\n.help-key-def {\r\n color: #bbb;\r\n display: inline-block;\r\n margin-left: 1em;\r\n}\r\n\r\n.add-component {\r\n text-align: left;\r\n}\r\n\r\n.add-component .option {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-pack: justify;\r\n -ms-flex-pack: justify;\r\n justify-content: space-between;\r\n}\r\n\r\n.add-component .option span {\r\n color: #1faaf2;\r\n}\r\n\r\n.Select-menu-outer .is-focused span {\r\n color: #fff;\r\n}\r\n\r\n.add-component-container {\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n background-color: #2b2b2b;\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n padding: 10px;\r\n}\r\n\r\n.aregistry-button {\r\n font-size: 12px;\r\n margin-left: 10px;\r\n padding: 8px;\r\n}\r\n\r\n.aregistry-button:hover {\r\n background-color: #1faaf2;\r\n}\r\n\r\n.aregistry-button img {\r\n height: 20px;\r\n width: 20px;\r\n}\r\n\r\n.components .row .color_value {\r\n margin: 0 0 0 5px;\r\n width: 68px;\r\n}\r\n", ""]); + exports.push([module.id, "body.aframe-inspector-opened {\n color: #fff;\n font-family: 'Roboto', sans-serif;\n font-size: 12px;\n margin: 0;\n overflow: hidden;\n}\n\n.toggle-edit {\n background-color: #ed3160;\n color: #fff;\n font-family: 'Roboto', sans-serif;\n font-size: 12px;\n left: 3px;\n margin: 0;\n padding: 6px 10px;\n position: fixed;\n text-align: center;\n text-decoration: none;\n top: 3px;\n width: 174px;\n z-index: 99999;\n}\n\n.toggle-edit:hover {\n background-color: rgb(228, 43, 90);\n}\n\nhr {\n border: 0;\n border-top: 1px solid #ccc;\n}\n\na {\n cursor: pointer;\n}\n\nbutton {\n position: relative;\n}\n\ncode {\n font-family: Consolas, Andale Mono, Monaco, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;\n}\n\ntextarea {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n white-space: pre;\n word-wrap: normal;\n}\n\ntextarea.success {\n border-color: #8b8 !important;\n}\n\ntextarea.fail {\n background-color: rgba(255, 0, 0, 0.05);\n border-color: #f00 !important;\n}\n\ntextarea,\ninput {\n outline: none; /* osx */\n}\n\n#left-sidebar,\n#right-panels {\n z-index: 9999;\n}\n\n#sidebar,\n#left-sidebar,\n.panel {\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.collapsible .static {\n margin: 0;\n}\n\n.collapsible .static .collapse-button {\n border: 6px solid transparent;\n float: left;\n height: 0;\n margin-right: 6px;\n width: 0;\n}\n\n.collapsible.collapsed .static .collapse-button {\n border-left-color: #1faaf2;\n margin-top: 2px;\n}\n\n.collapsible:not(.collapsed) .static .collapse-button {\n border-top-color: #1faaf2;\n margin-top: 6px;\n}\n\n.collapsible.collapsed .content {\n display: none;\n}\n\n.scenegraph {\n border-top: 1px solid #111;\n padding-top: 32px;\n}\n\n.scenegraph .search {\n padding: 5px;\n}\n\n.scenegraph-toolbar {\n background-color: #333;\n position: fixed;\n top: 32px;\n}\n\n.scenegraph-actions {\n padding: 9px 0 5px;\n}\n\n.search {\n color: #aaa;\n font-size: 16px;\n position: relative;\n}\n\n.search input {\n background: #222;\n border-radius: 5px;\n height: 22px;\n width: 185px;\n}\n\n.search input {\n text-indent: 10px;\n}\n\n.search .fa-search {\n position: absolute;\n right: 11px;\n top: 10px;\n}\n\ninput {\n background-color: transparent;\n border: 1px solid #555;\n color: #fff;\n}\n\ninput,\n.texture canvas {\n -webkit-transition: 0.1s background-color ease-in-out, 0.1s border-color ease-in-out, 0.1s color ease-in-out;\n transition: 0.1s background-color ease-in-out, 0.1s border-color ease-in-out, 0.1s color ease-in-out;\n}\n\ninput[type=text],\ninput[type=number],\ninput.string,\ninput.number {\n min-height: 14px;\n outline: none;\n}\n\ninput.number {\n background-color: transparent !important;\n border: 0;\n color: #20b1fb !important;\n cursor: col-resize;\n font-size: 12px;\n padding: 2px;\n}\n\ninput.string:focus,\ninput.number:focus {\n border: 1px solid #20b1fb;\n color: #fff;\n cursor: auto;\n}\n\n#left-sidebar {\n background: #2b2b2b;\n bottom: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 100%;\n left: 0;\n overflow: auto;\n position: fixed;\n top: 0;\n width: 200px;\n}\n\n#sidebar {\n background: #2b2b2b;\n width: 330px;\n}\n\n#sidebar * {\n vertical-align: middle;\n}\n\ninput,\ntextarea,\nselect {\n background: #222;\n border: 1px solid transparent;\n color: #888;\n}\n\n.row {\n margin-bottom: 10px;\n min-height: 20px;\n}\n\ninput[type=color] {\n background-color: #333;\n border: 1px solid #111;\n cursor: pointer;\n}\n\n.texture canvas {\n border: 1px solid #222;\n}\n\ninput[type=color] {\n cursor: pointer;\n height: 16px;\n padding: 0;\n width: 64px;\n}\n\n/* Note: these vendor-prefixed selectors cannot be grouped! */\n\ninput[type=color]::-webkit-color-swatch {\n border: 0; /* To remove the gray border. */\n}\n\ninput[type=color]::-webkit-color-swatch-wrapper {\n padding: 0; /* To remove the inner padding. */\n}\n\ninput[type=color]::-moz-color-swatch {\n border: 0;\n}\n\ninput[type=color]::-moz-focus-inner {\n border: 0; /* To remove the inner border (specific to Firefox). */\n padding: 0;\n}\n\n.components {\n background-color: #323232;\n color: #bcbcbc;\n height: 100%;\n overflow: auto;\n position: fixed;\n width: 330px;\n}\n\ndiv.vec2,\ndiv.vec3 {\n display: inline;\n}\n\n.vec2 input.number,\n.vec3 input.number {\n width: 46px;\n}\n\n.collapsible-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n\n.component-title span {\n float: left;\n max-width: 110px;\n overflow: hidden;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.collapsible .static {\n background-color: #323232;\n border-bottom: 1px solid #262626;\n border-top: 1px solid #262626;\n color: #fff;\n height: 16px;\n padding: 10px;\n vertical-align: middle;\n}\n\n.collapsible .menu {\n text-align: right;\n}\n\n.collapsible .menu::after {\n color: #bbb;\n content: '\\2807';\n font-size: 12px;\n padding: 5px;\n text-align: right;\n}\n\n.collapsible .static .collapse-button {\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n float: left;\n height: 0;\n margin-right: 10px;\n margin-top: 2px;\n width: 0;\n}\n\n.collapsible.collapsed .static .collapse-button {\n border-left-color: #bbb;\n}\n\n.collapsible:not(.collapsed) .static .collapse-button {\n border-top-color: #bbb;\n}\n\n.collapsible .content {\n background-color: #2b2b2b;\n padding: 10px;\n}\n\n.components .row {\n margin-bottom: 10px;\n min-height: 20px;\n}\n\n.components * {\n vertical-align: middle;\n}\n\n.components .row .text {\n cursor: default;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: middle;\n width: 120px;\n}\n\n.components .row .map_value {\n margin: 0 0 0 5px;\n width: 68px;\n}\n\n.hidden {\n visibility: hidden;\n}\n\n.texture canvas + input {\n margin-left: 5px;\n}\n\n.texture .fa {\n padding-right: 5px;\n}\n\n.scenegraph-bottom {\n background-color: #323232;\n border-top: 1px solid #111;\n bottom: 10;\n height: 40px;\n left: 0;\n z-index: 100;\n}\n\na.button {\n color: #bcbcbc;\n font-size: 16px;\n margin-left: 10px;\n text-decoration: none;\n}\n\na.button:hover {\n color: #1faaf2;\n}\n\n.scenegraph-bottom a {\n float: right;\n margin: 10px;\n}\n\n.modal {\n background-color: rgb(0, 0, 0);\n background-color: rgba(0, 0, 0, 0.4);\n height: 100%;\n left: 0;\n overflow: auto;\n padding-top: 100px;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 9999;\n}\n\n.modal-content {\n -webkit-animation-duration: 0.2s;\n animation-duration: 0.2s;\n -webkit-animation-name: animatetop;\n animation-name: animatetop;\n background-color: #232323;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n margin: auto;\n padding: 0;\n position: relative;\n width: 889px;\n}\n\n@-webkit-keyframes animatetop {\n from {\n opacity: 0;\n top: -300px;\n }\n\n to {\n opacity: 1;\n top: 0;\n }\n}\n\n@keyframes animatetop {\n from {\n opacity: 0;\n top: -300px;\n }\n\n to {\n opacity: 1;\n top: 0;\n }\n}\n\n.close {\n color: white;\n float: right;\n font-size: 28px;\n font-weight: bold;\n}\n\n.close:hover,\n.close:focus {\n color: #08f;\n cursor: pointer;\n text-decoration: none;\n}\n\n.modal-header {\n color: white;\n padding: 2px 16px;\n}\n\n.modal-body {\n overflow: auto;\n padding: 16px;\n}\n\n.modal-footer {\n color: white;\n padding: 2px 16px;\n}\n\n/* Gallery */\n\n.gallery {\n margin: 0 auto;\n overflow: auto;\n padding: 0;\n}\n\n.gallery li {\n box-shadow: 3px 3px 8px -2px rgba(0, 0, 0, 0.63);\n cursor: pointer;\n display: inline-block;\n float: left;\n margin: 8px;\n overflow: hidden;\n width: 155px;\n}\n\n.gallery li:hover {\n box-shadow: 0 0 4px 3px rgba(29, 138, 190, 0.63);\n}\n\n.gallery li .detail {\n background-color: #323232;\n min-height: 60px;\n padding: 10px;\n}\n\n.gallery li:hover .detail {\n background-color: #444;\n}\n\n.gallery li .detail span {\n color: #bbb !important;\n}\n\n.gallery li .detail span.title {\n color: #eee !important;\n font-weight: bold;\n}\n\n.preview {\n float: right;\n padding: 10px;\n width: 200px;\n}\n\n.new_asset_options {\n float: left;\n width: 600px;\n}\n\n.modal button {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border-radius: 0;\n box-shadow: none;\n cursor: pointer;\n display: inline-block;\n font-size: 12px;\n line-height: 1.8;\n margin: 0 10px 0 0;\n padding: 5px 10px;\n}\n\n.modal button:focus {\n outline: none;\n}\n\n.modal button {\n background-color: #1eaaf1;\n border: none;\n color: #fff;\n}\n\n.modal button:hover,\n.modal button.hover {\n background-color: #346392;\n text-shadow: -1px 1px #27496d;\n}\n\n.modal button:active,\n.modal button.active {\n background-color: #27496d;\n text-shadow: -1px 1px #193047;\n}\n\n.newimage {\n background-color: #323232;\n overflow: auto;\n padding: 10px;\n}\n\n.hide {\n display: none;\n}\n\nspan.value {\n color: #fff;\n display: inline-block;\n}\n\nspan.mixinlist {\n color: #888 !important;\n display: inline-block;\n}\n\nspan.mixinlist ul {\n background-color: #222;\n list-style-type: none;\n margin: 5px 0 0;\n padding: 5px;\n}\n\nspan.mixinlist ul li {\n font-size: 11px;\n margin-bottom: 3px;\n}\n\nspan.mixinlist ul li:last-child {\n margin-bottom: 0;\n}\n\nspan.mixin {\n display: inline-block;\n width: 100px;\n}\n\n.mixinlist {\n margin-left: 120px;\n}\n\nspan.subcomponent {\n color: #999;\n float: none !important;\n margin-left: 10px;\n vertical-align: top !important;\n}\n\n.collapsible .static {\n cursor: pointer;\n}\n\n.a-canvas.state-dragging {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n\ncode,\npre,\ninput,\ntextarea,\nselect {\n font-family: Consolas, Andale Mono, Monaco, Courier New, monospace;\n}\n\n.Select,\n.wf-active code,\n.wf-active pre,\n.wf-active input,\n.wf-active textarea,\n.wf-active select {\n font-family: Roboto Mono, Consolas, Andale Mono, Monaco, Courier New, monospace;\n}\n\n.tagName {\n font-weight: 500;\n}\n\n.sidebar-title {\n background-color: #444;\n color: #aaa;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n font-size: 12px;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n padding: 6px 10px;\n position: relative;\n text-align: center;\n}\n\n.toolbar {\n background-color: #262626;\n color: #333;\n height: 32px;\n position: relative;\n}\n\n.toolbar * {\n margin-left: 0;\n padding: 8px;\n vertical-align: middle;\n}\n\n.toolbar a.button {\n margin: 0 6px 0 0;\n}\n\n.toolbar .active {\n background-color: #1faaf2;\n color: #fff;\n}\n\n.toolbar .active:hover {\n color: #fff !important;\n}\n\n.local-transform {\n padding-left: 10px;\n}\n\n.local-transform label {\n color: #aaa;\n padding-left: 5px;\n}\n\n.local-transform a.button {\n padding-top: 0;\n}\n\n.outliner {\n background: #2b2b2b;\n color: #868686;\n cursor: default;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n font-size: 12px;\n height: calc(100% - 98px);\n outline: none;\n overflow-y: auto;\n padding: 0;\n position: fixed;\n top: 98px;\n width: 200px;\n}\n\n.outliner .option {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n padding: 4px;\n white-space: nowrap;\n}\n\n.outliner .option.active {\n background-color: #1faaf2;\n color: #fff;\n}\n\n.outliner .option .component:hover {\n color: #1faaf2;\n}\n\n.outliner .option.active .component:hover {\n color: #1888c1;\n}\n\n.outliner .option .icons {\n display: none;\n margin: 0 3px 0 10px;\n}\n\n.outliner .option .icons .button {\n color: #fff;\n font-size: 12px;\n}\n\n.outliner .option.active .icons {\n display: inline;\n}\n\n.outliner .fa {\n color: #aaa;\n}\n\n.outliner .active .fa {\n color: #fff;\n}\n\na.flat-button {\n background-color: #262626;\n color: #bcbcbc;\n font-size: 11px;\n margin-left: 10px;\n padding: 5px;\n text-decoration: none;\n}\n\na.flat-button:hover {\n color: #1faaf2;\n}\n\n.component-title {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n\na.help-link {\n opacity: 0.4;\n}\n\na.help-link:hover {\n opacity: 1;\n}\n\n#right-panels {\n -webkit-box-align: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n position: fixed;\n right: 0;\n top: 0;\n}\n\n#aframe-inspector-panels {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n\n/* This is a temporaly hack, we should style the editor instead of overwriting\n the a-scene to fix the \"display: block\" issue. */\n\n.aframe-inspector-opened a-scene {\n display: inline !important;\n}\n\n.aframe-inspector-opened a-scene .a-canvas {\n background-color: #191919;\n position: fixed;\n z-index: 9999;\n zoom: 1;\n}\n\nspan.entity-name {\n color: #fff;\n font-family: Consolas, Andale Mono, Monaco, Courier New, monospace;\n font-size: 16px;\n}\n\n.add-component {\n width: 200px;\n}\n\n.Select-control {\n background-color: #222 !important;\n border: none;\n border-radius: 0;\n color: #1faaf2;\n}\n\n.Select-menu-outer {\n border: none;\n}\n\n.Select-menu-outer .is-focused {\n background-color: #1faaf2 !important;\n color: #fff;\n}\n\n.Select-option {\n background-color: #222 !important;\n}\n\n.select-widget {\n display: inline-block;\n width: 157px;\n}\n\n.Select-placeholder,\n.Select--single > .Select-control .Select-value {\n color: #1faaf2 !important;\n}\n\n.Select-value-label {\n color: #1faaf2 !important;\n}\n\n.row .Select-control {\n font-size: 11px;\n height: 24px;\n}\n\n.row .Select-placeholder,\n.row .Select--single > .Select-control .Select-value {\n line-height: 19px;\n}\n\n.row .Select-input {\n height: 22px;\n}\n\n.row input[type=text],\n.row input[type=number],\n.row input.string,\n.row input.number {\n background: #222;\n border: 1px solid transparent;\n color: #1faaf2;\n min-height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n\n/* shortcuts help */\n\n.help-lists {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n}\n\n.help-list {\n list-style: none;\n margin: 0;\n padding: 0 0 10px;\n width: 350px;\n}\n\n.help-list li {\n margin-right: 40px;\n}\n\n.help-key-unit {\n line-height: 1.8;\n margin-right: 2em;\n padding: 5px 0;\n}\n\n.help-key {\n bottom: 2px;\n margin-right: 4px;\n min-width: 60px;\n position: relative;\n}\n\n.help-key span {\n background-color: #2e2e2e;\n background-repeat: repeat-x;\n border: 1px solid #666;\n border-radius: 3px;\n box-shadow: 0 0 5px #000;\n color: #999;\n display: inline-block;\n font-size: 12px;\n padding: 0 8px;\n text-align: center;\n}\n\n.help-key-def {\n color: #bbb;\n display: inline-block;\n margin-left: 1em;\n}\n\n.add-component {\n text-align: left;\n}\n\n.add-component .option {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n\n.add-component .option span {\n color: #1faaf2;\n}\n\n.Select-menu-outer .is-focused span {\n color: #fff;\n}\n\n.add-component-container {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background-color: #2b2b2b;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n padding: 10px;\n}\n\n.aregistry-button {\n font-size: 12px;\n margin-left: 10px;\n padding: 8px;\n}\n\n.aregistry-button:hover {\n background-color: #1faaf2;\n}\n\n.aregistry-button img {\n height: 20px;\n width: 20px;\n}\n\n.components .row .color_value {\n margin: 0 0 0 5px;\n width: 68px;\n}\n", ""]); // exports diff --git a/dist/aframe-inspector.min.js b/dist/aframe-inspector.min.js index f6fcaa28..219a050f 100644 --- a/dist/aframe-inspector.min.js +++ b/dist/aframe-inspector.min.js @@ -1,5 +1,5 @@ -!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="/dist/",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=document.createElement("link");t.href=e,t.type="text/css",t.rel="stylesheet",t.media="screen,print",t.setAttribute("data-aframe-inspector","style"),document.head.appendChild(t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n1){for(var v=Array(m),y=0;y1){for(var b=Array(g),E=0;E>"),O={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:s(),arrayOf:u,element:l(),instanceOf:c,node:h(),objectOf:d,oneOf:p,oneOfType:f,shape:m};r.prototype=Error.prototype,e.exports=O},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t){"use strict";e.exports="15.4.2"},function(e,t,n){"use strict";function o(e){return i.isValidElement(e)?void 0:r("143"),e}var r=n(7),i=n(9);n(8);e.exports=o},function(e,t,n){"use strict";e.exports=n(30)},function(e,t,n){"use strict";var o=n(31),r=n(35),i=n(158),a=n(56),s=n(53),u=n(163),l=n(164),c=n(165),p=n(166);n(11);r.inject();var d={findDOMNode:l,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:u,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:o.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=c(e)),e?o.getNodeFromInstance(e):null}},Mount:i,Reconciler:a});e.exports=d},function(e,t,n){"use strict";function o(e,t){return 1===e.nodeType&&e.getAttribute(h)===String(t)||8===e.nodeType&&e.nodeValue===" react-text: "+t+" "||8===e.nodeType&&e.nodeValue===" react-empty: "+t+" "}function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function i(e,t){var n=r(e);n._hostNode=t,t[v]=n}function a(e){var t=e._hostNode;t&&(delete t[v],e._hostNode=null)}function s(e,t){if(!(e._flags&m.hasCachedChildNodes)){var n=e._renderedChildren,a=t.firstChild;e:for(var s in n)if(n.hasOwnProperty(s)){var u=n[s],l=r(u)._domID;if(0!==l){for(;null!==a;a=a.nextSibling)if(o(a,l)){i(u,a);continue e}p("32",l)}}e._flags|=m.hasCachedChildNodes}}function u(e){if(e[v])return e[v];for(var t=[];!e[v];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,o;e&&(o=e[v]);e=t.pop())n=o,t.length&&s(o,e);return n}function l(e){var t=u(e);return null!=t&&t._hostNode===e?t:null}function c(e){if(void 0===e._hostNode?p("33"):void 0,e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent?void 0:p("34"),e=e._hostParent;for(;t.length;e=t.pop())s(e,e._hostNode);return e._hostNode}var p=n(32),d=n(33),f=n(34),h=(n(8),d.ID_ATTRIBUTE_NAME),m=f,v="__reactInternalInstance$"+Math.random().toString(36).slice(2),y={getClosestInstanceFromNode:u,getInstanceFromNode:l,getNodeFromInstance:c,precacheChildNodes:s,precacheNode:i,uncacheNode:a};e.exports=y},function(e,t){"use strict";function n(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,o=0;o8&&x<=11),T=32,_=String.fromCharCode(T),P={ -beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},O=!1,k=null,S={eventTypes:P,extractEvents:function(e,t,n,o){return[l(e,t,n,o),d(e,t,n,o)]}};e.exports=S},function(e,t,n){"use strict";function o(e,t,n){var o=t.dispatchConfig.phasedRegistrationNames[n];return y(e,o)}function r(e,t,n){var r=o(e,n,t);r&&(n._dispatchListeners=m(n._dispatchListeners,r),n._dispatchInstances=m(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.traverseTwoPhase(e._targetInst,r,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?h.getParentInstance(t):null;h.traverseTwoPhase(n,r,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,r=y(e,o);r&&(n._dispatchListeners=m(n._dispatchListeners,r),n._dispatchInstances=m(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function l(e){v(e,i)}function c(e){v(e,a)}function p(e,t,n,o){h.traverseEnterLeave(n,o,s,e,t)}function d(e){v(e,u)}var f=n(39),h=n(41),m=n(43),v=n(44),y=(n(11),f.getListener),g={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};e.exports=g},function(e,t,n){"use strict";function o(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}function r(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!o(t));default:return!1}}var i=n(32),a=n(40),s=n(41),u=n(42),l=n(43),c=n(44),p=(n(8),{}),d=null,f=function(e,t){e&&(s.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},h=function(e){return f(e,!0)},m=function(e){return f(e,!1)},v=function(e){return"."+e._rootNodeID},y={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?i("94",t,typeof n):void 0;var o=v(e),r=p[t]||(p[t]={});r[o]=n;var s=a.registrationNameModules[t];s&&s.didPutListener&&s.didPutListener(e,t,n)},getListener:function(e,t){var n=p[t];if(r(t,e._currentElement.type,e._currentElement.props))return null;var o=v(e);return n&&n[o]},deleteListener:function(e,t){var n=a.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=p[t];if(o){var r=v(e);delete o[r]}},deleteAllListeners:function(e){var t=v(e);for(var n in p)if(p.hasOwnProperty(n)&&p[n][t]){var o=a.registrationNameModules[n];o&&o.willDeleteListener&&o.willDeleteListener(e,n),delete p[n][t]}},extractEvents:function(e,t,n,o){for(var r,i=a.plugins,s=0;s-1?void 0:a("96",e),!l.plugins[n]){t.extractEvents?void 0:a("97",e),l.plugins[n]=t;var o=t.eventTypes;for(var i in o)r(o[i],t,i)?void 0:a("98",i,e)}}}function r(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,l.eventNameDispatchConfigs[n]=e;var o=e.phasedRegistrationNames;if(o){for(var r in o)if(o.hasOwnProperty(r)){var s=o[r];i(s,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){l.registrationNameModules[e]?a("100",e):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(32),s=(n(8),null),u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),o()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];u.hasOwnProperty(n)&&u[n]===r||(u[n]?a("102",n):void 0,u[n]=r,t=!0)}t&&o()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var o in n)if(n.hasOwnProperty(o)){var r=l.registrationNameModules[n[o]];if(r)return r}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var o=l.registrationNameModules;for(var r in o)o.hasOwnProperty(r)&&delete o[r]}};e.exports=l},function(e,t,n){"use strict";function o(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function r(e){return"topMouseMove"===e||"topTouchMove"===e}function i(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,o){var r=e.type||"unknown-event";e.currentTarget=y.getNodeFromInstance(o),t?m.invokeGuardedCallbackWithCatch(r,n,e):m.invokeGuardedCallback(r,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,o=e._dispatchInstances;if(Array.isArray(n))for(var r=0;r1?1-t:void 0;return this._fallbackText=r.slice(e,s),this._fallbackText}}),i.addPoolingTo(o),e.exports=o},function(e,t,n){"use strict";var o=n(32),r=(n(8),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,e,t),o}return new n(e,t)},a=function(e,t,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,e,t,n),r}return new o(e,t,n)},s=function(e,t,n,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,e,t,n,o),i}return new r(e,t,n,o)},u=function(e){var t=this;e instanceof t?void 0:o("25"),e.destructor(),t.instancePool.length8));var N=!1;E.canUseDOM&&(N=_("input")&&(!document.documentMode||document.documentMode>11));var D={get:function(){return A.get.call(this)},set:function(e){M=""+e,A.set.call(this,e)}},j={eventTypes:O,extractEvents:function(e,t,n,r){var i,a,s=t?x.getNodeFromInstance(t):window;if(o(s)?R?i=u:a=l:P(s)?N?i=f:(i=m,a=h):v(s)&&(i=y),i){var c=i(e,t);if(c){var p=C.getPooled(O.change,c,n,r);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(e,s,t)}};e.exports=j},function(e,t,n){"use strict";function o(){O.ReactReconcileTransaction&&x?void 0:c("123")}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=O.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,r,i,a){return o(),x.batchedUpdates(e,t,n,r,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==y.length?c("124",t,y.length):void 0,y.sort(a),g++;for(var n=0;n1){for(var v=Array(m),y=0;y1){for(var b=Array(g),E=0;E>"),O={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:s(),arrayOf:u,element:l(),instanceOf:c,node:h(),objectOf:d,oneOf:p,oneOfType:f,shape:m};r.prototype=Error.prototype,e.exports=O},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t){"use strict";e.exports="15.4.0"},function(e,t,n){"use strict";function o(e){return i.isValidElement(e)?void 0:r("143"),e}var r=n(7),i=n(9);n(8);e.exports=o},function(e,t,n){"use strict";e.exports=n(30)},function(e,t,n){"use strict";var o=n(31),r=n(35),i=n(158),a=n(56),s=n(53),u=n(163),l=n(164),c=n(165),p=n(166);n(11);r.inject();var d={findDOMNode:l,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:u,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:o.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=c(e)),e?o.getNodeFromInstance(e):null}},Mount:i,Reconciler:a});e.exports=d},function(e,t,n){"use strict";function o(e){for(var t;t=e._renderedComponent;)e=t;return e}function r(e,t){var n=o(e);n._hostNode=t,t[m]=n}function i(e){var t=e._hostNode;t&&(delete t[m],e._hostNode=null)}function a(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,i=t.firstChild;e:for(var a in n)if(n.hasOwnProperty(a)){var s=n[a],u=o(s)._domID;if(0!==u){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(f)===String(u)||8===i.nodeType&&i.nodeValue===" react-text: "+u+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+u+" "){r(s,i);continue e}c("32",u)}}e._flags|=h.hasCachedChildNodes}}function s(e){if(e[m])return e[m];for(var t=[];!e[m];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,o;e&&(o=e[m]);e=t.pop())n=o,t.length&&a(o,e);return n}function u(e){var t=s(e);return null!=t&&t._hostNode===e?t:null}function l(e){if(void 0===e._hostNode?c("33"):void 0,e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent?void 0:c("34"),e=e._hostParent;for(;t.length;e=t.pop())a(e,e._hostNode);return e._hostNode}var c=n(32),p=n(33),d=n(34),f=(n(8),p.ID_ATTRIBUTE_NAME),h=d,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:s,getInstanceFromNode:u,getNodeFromInstance:l,precacheChildNodes:a,precacheNode:r,uncacheNode:i};e.exports=v},function(e,t){"use strict";function n(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,o=0;o8&&x<=11),T=32,_=String.fromCharCode(T),P={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},O=!1,k=null,S={eventTypes:P,extractEvents:function(e,t,n,o){return[l(e,t,n,o),d(e,t,n,o)]}};e.exports=S},function(e,t,n){"use strict";function o(e,t,n){var o=t.dispatchConfig.phasedRegistrationNames[n];return y(e,o)}function r(e,t,n){var r=o(e,n,t);r&&(n._dispatchListeners=m(n._dispatchListeners,r),n._dispatchInstances=m(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.traverseTwoPhase(e._targetInst,r,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?h.getParentInstance(t):null;h.traverseTwoPhase(n,r,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,r=y(e,o);r&&(n._dispatchListeners=m(n._dispatchListeners,r),n._dispatchInstances=m(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function l(e){v(e,i)}function c(e){v(e,a)}function p(e,t,n,o){h.traverseEnterLeave(n,o,s,e,t)}function d(e){v(e,u)}var f=n(39),h=n(41),m=n(43),v=n(44),y=(n(11),f.getListener),g={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};e.exports=g},function(e,t,n){"use strict";var o=n(32),r=n(40),i=n(41),a=n(42),s=n(43),u=n(44),l=(n(8),{}),c=null,p=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return p(e,!0)},f=function(e){return p(e,!1)},h=function(e){return"."+e._rootNodeID},m={injection:{injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?o("94",t,typeof n):void 0;var i=h(e),a=l[t]||(l[t]={});a[i]=n;var s=r.registrationNameModules[t];s&&s.didPutListener&&s.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t],o=h(e);return n&&n[o]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=l[t];if(o){var i=h(e);delete o[i]}},deleteAllListeners:function(e){var t=h(e);for(var n in l)if(l.hasOwnProperty(n)&&l[n][t]){var o=r.registrationNameModules[n];o&&o.willDeleteListener&&o.willDeleteListener(e,n),delete l[n][t]}},extractEvents:function(e,t,n,o){for(var i,a=r.plugins,u=0;u-1?void 0:a("96",e),!l.plugins[n]){t.extractEvents?void 0:a("97",e),l.plugins[n]=t;var o=t.eventTypes;for(var i in o)r(o[i],t,i)?void 0:a("98",i,e)}}}function r(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,l.eventNameDispatchConfigs[n]=e;var o=e.phasedRegistrationNames;if(o){for(var r in o)if(o.hasOwnProperty(r)){var s=o[r];i(s,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){l.registrationNameModules[e]?a("100",e):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(32),s=(n(8),null),u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),o()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];u.hasOwnProperty(n)&&u[n]===r||(u[n]?a("102",n):void 0,u[n]=r,t=!0)}t&&o()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var o in n)if(n.hasOwnProperty(o)){var r=l.registrationNameModules[n[o]];if(r)return r}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var o=l.registrationNameModules;for(var r in o)o.hasOwnProperty(r)&&delete o[r]}};e.exports=l},function(e,t,n){"use strict";function o(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function r(e){return"topMouseMove"===e||"topTouchMove"===e}function i(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,o){var r=e.type||"unknown-event";e.currentTarget=y.getNodeFromInstance(o),t?m.invokeGuardedCallbackWithCatch(r,n,e):m.invokeGuardedCallback(r,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,o=e._dispatchInstances;if(Array.isArray(n))for(var r=0;r1?1-t:void 0;return this._fallbackText=r.slice(e,s),this._fallbackText}}),i.addPoolingTo(o),e.exports=o},function(e,t,n){"use strict";var o=n(32),r=(n(8),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,e,t),o}return new n(e,t)},a=function(e,t,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,e,t,n),r}return new o(e,t,n)},s=function(e,t,n,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,e,t,n,o),i}return new r(e,t,n,o)},u=function(e,t,n,o,r){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,o,r),a}return new i(e,t,n,o,r)},l=function(e){var t=this;e instanceof t?void 0:o("25"),e.destructor(),t.instancePool.length8));var N=!1;E.canUseDOM&&(N=_("input")&&(!document.documentMode||document.documentMode>11));var D={get:function(){return A.get.call(this)},set:function(e){M=""+e,A.set.call(this,e)}},j={eventTypes:O,extractEvents:function(e,t,n,r){var i,a,s=t?x.getNodeFromInstance(t):window;if(o(s)?R?i=u:a=l:P(s)?N?i=f:(i=m,a=h):v(s)&&(i=y),i){var c=i(e,t);if(c){var p=C.getPooled(O.change,c,n,r);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(e,s,t)}};e.exports=j},function(e,t,n){"use strict";function o(){O.ReactReconcileTransaction&&x?void 0:c("123")}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=O.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,r,i,a){return o(),x.batchedUpdates(e,t,n,r,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==y.length?c("124",t,y.length):void 0,y.sort(a),g++;for(var n=0;n]/,u=n(76),l=u(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{o=o||document.createElement("div"),o.innerHTML=""+t+"";for(var n=o.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(r.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}e.exports=l},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,o,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,o,r)})}:e};e.exports=n},function(e,t,n){"use strict";var o=n(45),r=n(78),i=n(75),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};o.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){return 3===e.nodeType?void(e.nodeValue=t):void i(e,r(t))})),e.exports=a},function(e,t){"use strict";function n(e){var t=""+e,n=r.exec(t);if(!n)return t;var o,i="",a=0,s=0;for(a=n.index;a]/;e.exports=o},function(e,t,n){"use strict";var o=n(32),r=n(73),i=n(45),a=n(80),s=n(12),u=(n(8),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:o("56"),t?void 0:o("57"),"HTML"===e.nodeName?o("58"):void 0,"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else r.replaceChildWithTree(e,t)}});e.exports=u},function(e,t,n){"use strict";function o(e){var t=e.match(c);return t&&t[1].toLowerCase()}function r(e,t){var n=l;l?void 0:u(!1);var r=o(e),i=r&&s(r);if(i){n.innerHTML=i[1]+e+i[2];for(var c=i[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:u(!1),a(p).forEach(t));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var i=n(45),a=n(81),s=n(82),u=n(8),l=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=r},function(e,t,n){"use strict";function o(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),o=0;o":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var r=n(45),i=n(8),a=r.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,s[e]=!0}),e.exports=o},function(e,t,n){"use strict";var o=n(72),r=n(31),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=r.getNodeFromInstance(e);o.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";function o(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function r(e,t){t&&(G[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?m("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?m("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&U in t.dangerouslySetInnerHTML?void 0:m("61")),null!=t.style&&"object"!=typeof t.style?m("62",o(e)):void 0)}function i(e,t,n,o){if(!(o instanceof N)){var r=e._hostContainerInfo,i=r._node&&r._node.nodeType===W,s=i?r._node:r._ownerDocument;L(t,s),o.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;C.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;k.postMountWrapper(e)}function u(){var e=this;A.postMountWrapper(e)}function l(){var e=this;S.postMountWrapper(e)}function c(){var e=this;e._rootNodeID?void 0:m("63");var t=F(e);switch(t?void 0:m("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[_.trapBubbledEvent("topLoad","load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in q)q.hasOwnProperty(n)&&e._wrapperState.listeners.push(_.trapBubbledEvent(n,q[n],t));break;case"source":e._wrapperState.listeners=[_.trapBubbledEvent("topError","error",t)];break;case"img":e._wrapperState.listeners=[_.trapBubbledEvent("topError","error",t),_.trapBubbledEvent("topLoad","load",t)];break;case"form":e._wrapperState.listeners=[_.trapBubbledEvent("topReset","reset",t),_.trapBubbledEvent("topSubmit","submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[_.trapBubbledEvent("topInvalid","invalid",t)]}}function p(){M.postUpdateWrapper(this)}function d(e){Q.call(Z,e)||(X.test(e)?void 0:m("65",e),Z[e]=!0)}function f(e,t){return e.indexOf("-")>=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=n(32),v=n(4),y=n(85),g=n(87),b=n(73),E=n(74),x=n(33),w=n(95),C=n(39),T=n(40),_=n(97),P=n(34),O=n(31),k=n(100),S=n(103),M=n(104),A=n(105),R=(n(59),n(106)),N=n(125),D=(n(12),n(78)),j=(n(8),n(62),n(114),n(128),n(11),P),I=C.deleteListener,F=O.getNodeFromInstance,L=_.listenTo,H=T.registrationNameModules,V={string:!0,number:!0},B="style",U="__html",z={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},W=11,q={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},K={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Y={listing:!0,pre:!0,textarea:!0},G=v({menuitem:!0},K),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Z={},Q={}.hasOwnProperty,$=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,o){this._rootNodeID=$++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(c,this);break;case"input":k.mountWrapper(this,i,t),i=k.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"option":S.mountWrapper(this,i,t),i=S.getHostProps(this,i);break;case"select":M.mountWrapper(this,i,t),i=M.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"textarea":A.mountWrapper(this,i,t),i=A.getHostProps(this,i),e.getReactMountReady().enqueue(c,this)}r(this,i);var a,p;null!=t?(a=t._namespaceURI,p=t._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===E.svg&&"foreignobject"===p)&&(a=E.html),a===E.html&&("svg"===this._tag?a=E.svg:"math"===this._tag&&(a=E.mathml)),this._namespaceURI=a;var d;if(e.useCreateElement){var f,h=n._ownerDocument;if(a===E.html)if("script"===this._tag){var m=h.createElement("div"),v=this._currentElement.type;m.innerHTML="<"+v+">",f=m.removeChild(m.firstChild)}else f=i.is?h.createElement(this._currentElement.type,i.is):h.createElement(this._currentElement.type);else f=h.createElementNS(a,this._currentElement.type);O.precacheNode(this,f),this._flags|=j.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(f),this._updateDOMProperties(null,i,e);var g=b(f);this._createInitialChildren(e,i,o,g),d=g}else{var x=this._createOpenTagMarkupAndPutListeners(e,i),C=this._createContentMarkup(e,i,o);d=!C&&K[this._tag]?x+"/>":x+">"+C+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"select":i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"button":i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(l,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var o in t)if(t.hasOwnProperty(o)){var r=t[o];if(null!=r)if(H.hasOwnProperty(o))r&&i(this,o,r,e);else{o===B&&(r&&(r=this._previousStyleCopy=v({},t.style)),r=g.createMarkupForStyles(r,this));var a=null;null!=this._tag&&f(this._tag,t)?z.hasOwnProperty(o)||(a=w.createMarkupForCustomAttribute(o,r)):a=w.createMarkupForProperty(o,r),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var o="",r=t.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&(o=r.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)o=D(i);else if(null!=a){var s=this.mountChildren(a,e,n);o=s.join("")}}return Y[this._tag]&&"\n"===o.charAt(0)?"\n"+o:o},_createInitialChildren:function(e,t,n,o){var r=t.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&b.queueHTML(o,r.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)""!==i&&b.queueText(o,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u1)for(var n=1;n0&&o.length<20?n+" (keys: "+o.join(", ")+")":n}function i(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(32),s=(n(10),n(108)),u=(n(59),n(53)),l=(n(8),n(11),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var r=i(e);return r?(r._pendingCallbacks?r._pendingCallbacks.push(t):r._pendingCallbacks=[t],void o(r)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],o(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,o(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,o(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var r=n._pendingStateQueue||(n._pendingStateQueue=[]);r.push(t),o(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,o(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,r(e)):void 0}});e.exports=l},function(e,t,n){"use strict";var o=(n(4),n(12)),r=(n(11),o);e.exports=r},function(e,t,n){"use strict";var o=n(4),r=n(73),i=n(31),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};o(a.prototype,{mountComponent:function(e,t,n,o){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(e.useCreateElement){var u=n._ownerDocument,l=u.createComment(s);return i.precacheNode(this,l),r(l)}return e.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";function o(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,o=e;o;o=o._hostParent)n++;for(var r=0,i=t;i;i=i._hostParent)r++;for(;n-r>0;)e=e._hostParent,n--;for(;r-n>0;)t=t._hostParent,r--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function r(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0; -t=t._hostParent}return!1}function i(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function a(e,t,n){for(var o=[];e;)o.push(e),e=e._hostParent;var r;for(r=o.length;r-- >0;)t(o[r],"captured",n);for(r=0;r0;)n(u[l],"captured",i)}var u=n(32);n(8);e.exports={isAncestor:r,getLowestCommonAncestor:o,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:s}},function(e,t,n){"use strict";var o=n(32),r=n(4),i=n(72),a=n(73),s=n(31),u=n(78),l=(n(8),n(128),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(l.prototype,{mountComponent:function(e,t,n,o){var r=n._idCounter++,i=" react-text: "+r+" ",l=" /react-text ";if(this._domID=r,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(i),d=c.createComment(l),f=a(c.createDocumentFragment());return a.queueChild(f,a(p)),this._stringText&&a.queueChild(f,a(c.createTextNode(this._stringText))),a.queueChild(f,a(d)),s.precacheNode(this,p),this._closingComment=d,f}var h=u(this._stringText);return e.renderToStaticMarkup?h:""+h+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=this.getHostNode();i.replaceDelimitedText(o[0],o[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?o("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=l},function(e,t,n){"use strict";function o(){this.reinitializeTransaction()}var r=n(4),i=n(53),a=n(60),s=n(12),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[l,u];r(o.prototype,a,{getTransactionWrappers:function(){return c}});var p=new o,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,o,r,i){var a=d.isBatchingUpdates;return d.isBatchingUpdates=!0,a?e(t,n,o,r,i):p.perform(e,null,t,n,o,r,i)}};e.exports=d},function(e,t,n){"use strict";function o(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function r(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=f(e.nativeEvent),n=p.getClosestInstanceFromNode(t),r=n;do e.ancestors.push(r),r=r&&o(r);while(r);for(var i=0;it.end?(n=t.end,o=t.start):(n=t.start,o=t.end),r.moveToElementText(e),r.moveStart("character",n),r.setEndPoint("EndToStart",r),r.moveEnd("character",o-n),r.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),o=e[c()].length,r=Math.min(t.start,o),i=void 0===t.end?r:Math.min(t.end,o);if(!n.extend&&r>i){var a=i;i=r,r=a}var s=l(e,r),u=l(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),r>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(45),l=n(140),c=n(48),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?r:i,setOffsets:p?a:s};e.exports=d},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function r(e,t){for(var r=n(e),i=0,a=0;r;){if(3===r.nodeType){if(a=i+r.textContent.length,i<=t&&a>=t)return{node:r,offset:t-i};i=a}r=n(o(r))}}e.exports=r},function(e,t,n){"use strict";function o(e,t){return!(!e||!t)&&(e===t||!r(e)&&(r(t)?o(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var r=n(142);e.exports=o},function(e,t,n){"use strict";function o(e){return r(e)&&3==e.nodeType}var r=n(143);e.exports=o},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},r={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(e){r.Properties[e]=0,o[e]&&(r.DOMAttributeNames[e]=o[e])}),e.exports=r},function(e,t,n){"use strict";function o(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function r(e,t){if(g||null==m||m!==c())return null;var n=o(m);if(!y||!d(y,n)){y=n;var r=l.getPooled(h.select,v,e,t);return r.type="select",r.target=m,i.accumulateTwoPhaseDispatches(r),r}return null}var i=n(38),a=n(45),s=n(31),u=n(138),l=n(50),c=n(144),p=n(63),d=n(114),f=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,h={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},m=null,v=null,y=null,g=!1,b=!1,E={eventTypes:h,extractEvents:function(e,t,n,o){if(!b)return null;var i=t?s.getNodeFromInstance(t):window;switch(e){case"topFocus":(p(i)||"true"===i.contentEditable)&&(m=i,v=t,y=null);break;case"topBlur":m=null,v=null,y=null;break;case"topMouseDown":g=!0;break;case"topContextMenu":case"topMouseUp":return g=!1,r(n,o);case"topSelectionChange":if(f)break;case"topKeyDown":case"topKeyUp":return r(n,o)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(b=!0)}};e.exports=E},function(e,t,n){"use strict";function o(e){return"."+e._rootNodeID}function r(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}var i=n(32),a=n(134),s=n(38),u=n(31),l=n(148),c=n(149),p=n(50),d=n(150),f=n(151),h=n(66),m=n(154),v=n(155),y=n(156),g=n(67),b=n(157),E=n(12),x=n(152),w=(n(8),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,o="top"+t,r={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[o]};w[e]=r,C[o]=r});var T={},_={eventTypes:w,extractEvents:function(e,t,n,o){var r=C[e];if(!r)return null;var a;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=p;break;case"topKeyPress":if(0===x(n))return null;case"topKeyDown":case"topKeyUp":a=f;break;case"topBlur":case"topFocus":a=d;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=h;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=m;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=v;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=l;break;case"topTransitionEnd":a=y;break;case"topScroll":a=g;break;case"topWheel":a=b;break;case"topCopy":case"topCut":case"topPaste":a=c}a?void 0:i("86",e);var u=a.getPooled(r,t,n,o);return s.accumulateTwoPhaseDispatches(u),u},didPutListener:function(e,t,n){if("onClick"===t&&!r(e._tag)){var i=o(e),s=u.getNodeFromInstance(e);T[i]||(T[i]=a.listen(s,"click",E))}},willDeleteListener:function(e,t){if("onClick"===t&&!r(e._tag)){var n=o(e);T[n].remove(),delete T[n]}}};e.exports=_},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(50),i={animationName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(50),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(67),i={relatedTarget:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(67),i=n(152),a=n(153),s=n(69),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};r.augmentClass(o,u),e.exports=o},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function o(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var r=n(152),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(66),i={dataTransfer:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(67),i=n(69),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};r.augmentClass(o,a),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(50),i={propertyName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(66),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t){for(var n=Math.min(e.length,t.length),o=0;o.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=v.createElement(L,{child:t});if(e){var u=w.get(e);a=u._processChildContext(u._context)}else a=O;var c=d(n);if(c){var p=c._currentElement,h=p.props.child;if(M(h,t)){var m=c._renderedComponent.getPublicInstance(),y=o&&function(){o.call(m)};return H._updateRootComponent(c,s,a,n,y),m}H.unmountComponentAtNode(n)}var g=r(n),b=g&&!!i(g),E=l(n),x=b&&!c&&!E,C=H._renderNewRootComponent(s,n,x,a)._renderedComponent.getPublicInstance();return o&&o.call(C),C},render:function(e,t,n){return H._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)?void 0:f("40");var t=d(e);if(!t){l(e),1===e.nodeType&&e.hasAttribute(R);return!1}return delete I[t._instance.rootID],P.batchedUpdates(u,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(c(t)?void 0:f("41"),i){var s=r(t);if(C.canReuseMarkup(e,s))return void g.precacheNode(n,s);var u=s.getAttribute(C.CHECKSUM_ATTR_NAME);s.removeAttribute(C.CHECKSUM_ATTR_NAME);var l=s.outerHTML;s.setAttribute(C.CHECKSUM_ATTR_NAME,u);var p=e,d=o(p,l),m=" (client) "+p.substring(d-20,d+20)+"\n (server) "+l.substring(d-20,d+20);t.nodeType===D?f("42",m):void 0}if(t.nodeType===D?f("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else S(t,e),g.precacheNode(n,t.firstChild)}};e.exports=H},function(e,t,n){"use strict";function o(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===r?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var r=(n(128),9);e.exports=o},function(e,t){"use strict";var n={useCreateElement:!0,useFiber:!1};e.exports=n},function(e,t,n){"use strict";var o=n(162),r=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=o(e);return i.test(e)?e:e.replace(r," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var r=o(e);return r===n}};e.exports=a},function(e,t){"use strict";function n(e){for(var t=1,n=0,r=0,i=e.length,a=i&-4;r0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,r,a,s;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],o(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){/*! +function o(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,o=n in document;if(!o){var a=document.createElement("div");a.setAttribute(n,"return;"),o="function"==typeof a[n]}return!o&&r&&"wheel"===e&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}var r,i=n(45);i.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=o},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!o[e.type]:"textarea"===t}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t){"use strict";var n=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];e.exports=n},function(e,t,n){"use strict";var o=n(38),r=n(31),i=n(66),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},s={eventTypes:a,extractEvents:function(e,t,n,s){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==e&&"topMouseOver"!==e)return null;var u;if(s.window===s)u=s;else{var l=s.ownerDocument;u=l?l.defaultView||l.parentWindow:window}var c,p;if("topMouseOut"===e){c=t;var d=n.relatedTarget||n.toElement;p=d?r.getClosestInstanceFromNode(d):null}else c=null,p=t;if(c===p)return null;var f=null==c?u:r.getNodeFromInstance(c),h=null==p?u:r.getNodeFromInstance(p),m=i.getPooled(a.mouseLeave,c,n,s);m.type="mouseleave",m.target=f,m.relatedTarget=h;var v=i.getPooled(a.mouseEnter,p,n,s);return v.type="mouseenter",v.target=h,v.relatedTarget=f,o.accumulateEnterLeaveDispatches(m,v,c,p),[m,v]}};e.exports=s},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(67),i=n(68),a=n(69),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};r.augmentClass(o,s),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(50),i=n(61),a={view:function(e){if(e.view)return e.view;var t=i(e);if(t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};r.augmentClass(o,a),e.exports=o},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var o=r[e];return!!o&&!!n[o]}function o(e){return n}var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=o},function(e,t,n){"use strict";var o=n(33),r=o.injection.MUST_USE_PROPERTY,i=o.injection.HAS_BOOLEAN_VALUE,a=o.injection.HAS_NUMERIC_VALUE,s=o.injection.HAS_POSITIVE_NUMERIC_VALUE,u=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+o.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,as:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:r|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:r|i,muted:r|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,playsInline:i,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:r|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=l},function(e,t,n){"use strict";var o=n(72),r=n(83),i={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup};e.exports=i},function(e,t,n){"use strict";function o(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function r(e,t,n){c.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?s(e,t[0],t[1],n):m(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],u(e,t,n),e.removeChild(n)}e.removeChild(t)}function s(e,t,n,o){for(var r=t;;){var i=r.nextSibling;if(m(e,r,o),r===n)break;r=i}}function u(e,t,n){for(;;){var o=t.nextSibling;if(o===n)break;e.removeChild(o)}}function l(e,t,n){var o=e.parentNode,r=e.nextSibling;r===t?n&&m(o,document.createTextNode(n),r):n?(h(r,n),u(o,r,t)):u(o,e,t)}var c=n(73),p=n(79),d=(n(31),n(59),n(76)),f=n(75),h=n(77),m=d(function(e,t,n){e.insertBefore(t,n)}),v=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:v,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;n]/,u=n(76),l=u(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{o=o||document.createElement("div"),o.innerHTML=""+t+"";for(var n=o.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(r.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}e.exports=l},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,o,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,o,r)})}:e};e.exports=n},function(e,t,n){"use strict";var o=n(45),r=n(78),i=n(75),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};o.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){return 3===e.nodeType?void(e.nodeValue=t):void i(e,r(t))})),e.exports=a},function(e,t){"use strict";function n(e){var t=""+e,n=r.exec(t);if(!n)return t;var o,i="",a=0,s=0;for(a=n.index;a]/;e.exports=o},function(e,t,n){"use strict";var o=n(32),r=n(73),i=n(45),a=n(80),s=n(12),u=(n(8),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:o("56"),t?void 0:o("57"),"HTML"===e.nodeName?o("58"):void 0,"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else r.replaceChildWithTree(e,t)}});e.exports=u},function(e,t,n){"use strict";function o(e){var t=e.match(c);return t&&t[1].toLowerCase()}function r(e,t){var n=l;l?void 0:u(!1);var r=o(e),i=r&&s(r);if(i){n.innerHTML=i[1]+e+i[2];for(var c=i[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:u(!1),a(p).forEach(t));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var i=n(45),a=n(81),s=n(82),u=n(8),l=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=r},function(e,t,n){"use strict";function o(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),o=0;o":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var r=n(45),i=n(8),a=r.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,s[e]=!0}),e.exports=o},function(e,t,n){"use strict";var o=n(72),r=n(31),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=r.getNodeFromInstance(e);o.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";function o(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function r(e,t){t&&(G[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?m("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?m("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&U in t.dangerouslySetInnerHTML?void 0:m("61")),null!=t.style&&"object"!=typeof t.style?m("62",o(e)):void 0)}function i(e,t,n,o){if(!(o instanceof N)){var r=e._hostContainerInfo,i=r._node&&r._node.nodeType===W,s=i?r._node:r._ownerDocument;L(t,s),o.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;C.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;k.postMountWrapper(e)}function u(){var e=this;A.postMountWrapper(e)}function l(){var e=this;S.postMountWrapper(e)}function c(){var e=this;e._rootNodeID?void 0:m("63");var t=F(e);switch(t?void 0:m("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[_.trapBubbledEvent("topLoad","load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in q)q.hasOwnProperty(n)&&e._wrapperState.listeners.push(_.trapBubbledEvent(n,q[n],t));break;case"source":e._wrapperState.listeners=[_.trapBubbledEvent("topError","error",t)];break;case"img":e._wrapperState.listeners=[_.trapBubbledEvent("topError","error",t),_.trapBubbledEvent("topLoad","load",t)];break;case"form":e._wrapperState.listeners=[_.trapBubbledEvent("topReset","reset",t),_.trapBubbledEvent("topSubmit","submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[_.trapBubbledEvent("topInvalid","invalid",t)]}}function p(){M.postUpdateWrapper(this)}function d(e){Q.call(Z,e)||(X.test(e)?void 0:m("65",e),Z[e]=!0)}function f(e,t){return e.indexOf("-")>=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=n(32),v=n(4),y=n(85),g=n(87),b=n(73),E=n(74),x=n(33),w=n(95),C=n(39),T=n(40),_=n(97),P=n(34),O=n(31),k=n(100),S=n(103),M=n(104),A=n(105),R=(n(59),n(106)),N=n(125),D=(n(12),n(78)),j=(n(8),n(62),n(114),n(128),n(11),P),I=C.deleteListener,F=O.getNodeFromInstance,L=_.listenTo,H=T.registrationNameModules,V={string:!0,number:!0},B="style",U="__html",z={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},W=11,q={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},K={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Y={listing:!0,pre:!0,textarea:!0},G=v({menuitem:!0},K),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Z={},Q={}.hasOwnProperty,$=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,o){this._rootNodeID=$++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(c,this);break;case"input":k.mountWrapper(this,i,t),i=k.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"option":S.mountWrapper(this,i,t),i=S.getHostProps(this,i);break;case"select":M.mountWrapper(this,i,t),i=M.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"textarea":A.mountWrapper(this,i,t),i=A.getHostProps(this,i),e.getReactMountReady().enqueue(c,this)}r(this,i);var a,p;null!=t?(a=t._namespaceURI,p=t._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===E.svg&&"foreignobject"===p)&&(a=E.html),a===E.html&&("svg"===this._tag?a=E.svg:"math"===this._tag&&(a=E.mathml)),this._namespaceURI=a;var d;if(e.useCreateElement){var f,h=n._ownerDocument;if(a===E.html)if("script"===this._tag){var m=h.createElement("div"),v=this._currentElement.type;m.innerHTML="<"+v+">",f=m.removeChild(m.firstChild)}else f=i.is?h.createElement(this._currentElement.type,i.is):h.createElement(this._currentElement.type);else f=h.createElementNS(a,this._currentElement.type);O.precacheNode(this,f),this._flags|=j.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(f),this._updateDOMProperties(null,i,e);var g=b(f);this._createInitialChildren(e,i,o,g),d=g}else{var x=this._createOpenTagMarkupAndPutListeners(e,i),C=this._createContentMarkup(e,i,o);d=!C&&K[this._tag]?x+"/>":x+">"+C+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"select":i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"button":i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(l,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var o in t)if(t.hasOwnProperty(o)){var r=t[o];if(null!=r)if(H.hasOwnProperty(o))r&&i(this,o,r,e);else{o===B&&(r&&(r=this._previousStyleCopy=v({},t.style)),r=g.createMarkupForStyles(r,this));var a=null;null!=this._tag&&f(this._tag,t)?z.hasOwnProperty(o)||(a=w.createMarkupForCustomAttribute(o,r)):a=w.createMarkupForProperty(o,r),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var o="",r=t.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&(o=r.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)o=D(i);else if(null!=a){var s=this.mountChildren(a,e,n);o=s.join("")}}return Y[this._tag]&&"\n"===o.charAt(0)?"\n"+o:o},_createInitialChildren:function(e,t,n,o){var r=t.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&b.queueHTML(o,r.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)b.queueText(o,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u1)for(var n=1;n0&&o.length<20?n+" (keys: "+o.join(", ")+")":n}function i(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(32),s=(n(10),n(108)),u=(n(59),n(53)),l=(n(8),n(11),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var r=i(e);return r?(r._pendingCallbacks?r._pendingCallbacks.push(t):r._pendingCallbacks=[t],void o(r)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],o(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,o(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,o(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var r=n._pendingStateQueue||(n._pendingStateQueue=[]);r.push(t),o(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,o(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,r(e)):void 0}});e.exports=l},function(e,t,n){"use strict";var o=(n(4),n(12)),r=(n(11),o);e.exports=r},function(e,t,n){"use strict";var o=n(4),r=n(73),i=n(31),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};o(a.prototype,{mountComponent:function(e,t,n,o){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(e.useCreateElement){var u=n._ownerDocument,l=u.createComment(s);return i.precacheNode(this,l),r(l)}return e.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";function o(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,o=e;o;o=o._hostParent)n++;for(var r=0,i=t;i;i=i._hostParent)r++;for(;n-r>0;)e=e._hostParent,n--;for(;r-n>0;)t=t._hostParent,r--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function r(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1; +}function i(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function a(e,t,n){for(var o=[];e;)o.push(e),e=e._hostParent;var r;for(r=o.length;r-- >0;)t(o[r],"captured",n);for(r=0;r0;)n(u[l],"captured",i)}var u=n(32);n(8);e.exports={isAncestor:r,getLowestCommonAncestor:o,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:s}},function(e,t,n){"use strict";var o=n(32),r=n(4),i=n(72),a=n(73),s=n(31),u=n(78),l=(n(8),n(128),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(l.prototype,{mountComponent:function(e,t,n,o){var r=n._idCounter++,i=" react-text: "+r+" ",l=" /react-text ";if(this._domID=r,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(i),d=c.createComment(l),f=a(c.createDocumentFragment());return a.queueChild(f,a(p)),this._stringText&&a.queueChild(f,a(c.createTextNode(this._stringText))),a.queueChild(f,a(d)),s.precacheNode(this,p),this._closingComment=d,f}var h=u(this._stringText);return e.renderToStaticMarkup?h:""+h+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=this.getHostNode();i.replaceDelimitedText(o[0],o[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?o("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=l},function(e,t,n){"use strict";function o(){this.reinitializeTransaction()}var r=n(4),i=n(53),a=n(60),s=n(12),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[l,u];r(o.prototype,a,{getTransactionWrappers:function(){return c}});var p=new o,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,o,r,i){var a=d.isBatchingUpdates;return d.isBatchingUpdates=!0,a?e(t,n,o,r,i):p.perform(e,null,t,n,o,r,i)}};e.exports=d},function(e,t,n){"use strict";function o(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function r(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=f(e.nativeEvent),n=p.getClosestInstanceFromNode(t),r=n;do e.ancestors.push(r),r=r&&o(r);while(r);for(var i=0;it.end?(n=t.end,o=t.start):(n=t.start,o=t.end),r.moveToElementText(e),r.moveStart("character",n),r.setEndPoint("EndToStart",r),r.moveEnd("character",o-n),r.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),o=e[c()].length,r=Math.min(t.start,o),i=void 0===t.end?r:Math.min(t.end,o);if(!n.extend&&r>i){var a=i;i=r,r=a}var s=l(e,r),u=l(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),r>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(45),l=n(140),c=n(48),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?r:i,setOffsets:p?a:s};e.exports=d},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function r(e,t){for(var r=n(e),i=0,a=0;r;){if(3===r.nodeType){if(a=i+r.textContent.length,i<=t&&a>=t)return{node:r,offset:t-i};i=a}r=n(o(r))}}e.exports=r},function(e,t,n){"use strict";function o(e,t){return!(!e||!t)&&(e===t||!r(e)&&(r(t)?o(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var r=n(142);e.exports=o},function(e,t,n){"use strict";function o(e){return r(e)&&3==e.nodeType}var r=n(143);e.exports=o},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},r={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(e){r.Properties[e]=0,o[e]&&(r.DOMAttributeNames[e]=o[e])}),e.exports=r},function(e,t,n){"use strict";function o(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function r(e,t){if(g||null==m||m!==c())return null;var n=o(m);if(!y||!d(y,n)){y=n;var r=l.getPooled(h.select,v,e,t);return r.type="select",r.target=m,i.accumulateTwoPhaseDispatches(r),r}return null}var i=n(38),a=n(45),s=n(31),u=n(138),l=n(50),c=n(144),p=n(63),d=n(114),f=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,h={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},m=null,v=null,y=null,g=!1,b=!1,E={eventTypes:h,extractEvents:function(e,t,n,o){if(!b)return null;var i=t?s.getNodeFromInstance(t):window;switch(e){case"topFocus":(p(i)||"true"===i.contentEditable)&&(m=i,v=t,y=null);break;case"topBlur":m=null,v=null,y=null;break;case"topMouseDown":g=!0;break;case"topContextMenu":case"topMouseUp":return g=!1,r(n,o);case"topSelectionChange":if(f)break;case"topKeyDown":case"topKeyUp":return r(n,o)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(b=!0)}};e.exports=E},function(e,t,n){"use strict";function o(e){return"."+e._rootNodeID}function r(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}function i(e){if(e){var t=e._currentElement&&e._currentElement.props.disabled;if(t)return r(e._tag)}return!1}var a=n(32),s=n(134),u=n(38),l=n(31),c=n(148),p=n(149),d=n(50),f=n(150),h=n(151),m=n(66),v=n(154),y=n(155),g=n(156),b=n(67),E=n(157),x=n(12),w=n(152),C=(n(8),{}),T={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,o="top"+t,r={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[o]};C[e]=r,T[o]=r});var _={},P={eventTypes:C,extractEvents:function(e,t,n,o){var r=T[e];if(!r)return null;var s;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":s=d;break;case"topKeyPress":if(0===w(n))return null;case"topKeyDown":case"topKeyUp":s=h;break;case"topBlur":case"topFocus":s=f;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":if(i(t))return null;case"topMouseOut":case"topMouseOver":case"topContextMenu":s=m;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":s=v;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":s=y;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":s=c;break;case"topTransitionEnd":s=g;break;case"topScroll":s=b;break;case"topWheel":s=E;break;case"topCopy":case"topCut":case"topPaste":s=p}s?void 0:a("86",e);var l=s.getPooled(r,t,n,o);return u.accumulateTwoPhaseDispatches(l),l},didPutListener:function(e,t,n){if("onClick"===t&&!r(e._tag)){var i=o(e),a=l.getNodeFromInstance(e);_[i]||(_[i]=s.listen(a,"click",x))}},willDeleteListener:function(e,t){if("onClick"===t&&!r(e._tag)){var n=o(e);_[n].remove(),delete _[n]}}};e.exports=P},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(50),i={animationName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(50),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(67),i={relatedTarget:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(67),i=n(152),a=n(153),s=n(69),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};r.augmentClass(o,u),e.exports=o},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function o(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var r=n(152),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(66),i={dataTransfer:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(67),i=n(69),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};r.augmentClass(o,a),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(50),i={propertyName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n,o){return r.call(this,e,t,n,o)}var r=n(66),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t){for(var n=Math.min(e.length,t.length),o=0;o.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=v.createElement(L,{child:t});if(e){var u=w.get(e);a=u._processChildContext(u._context)}else a=O;var c=d(n);if(c){var p=c._currentElement,h=p.props.child;if(M(h,t)){var m=c._renderedComponent.getPublicInstance(),y=o&&function(){o.call(m)};return H._updateRootComponent(c,s,a,n,y),m}H.unmountComponentAtNode(n)}var g=r(n),b=g&&!!i(g),E=l(n),x=b&&!c&&!E,C=H._renderNewRootComponent(s,n,x,a)._renderedComponent.getPublicInstance();return o&&o.call(C),C},render:function(e,t,n){return H._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)?void 0:f("40");var t=d(e);if(!t){l(e),1===e.nodeType&&e.hasAttribute(R);return!1}return delete I[t._instance.rootID],P.batchedUpdates(u,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(c(t)?void 0:f("41"),i){var s=r(t);if(C.canReuseMarkup(e,s))return void g.precacheNode(n,s);var u=s.getAttribute(C.CHECKSUM_ATTR_NAME);s.removeAttribute(C.CHECKSUM_ATTR_NAME);var l=s.outerHTML;s.setAttribute(C.CHECKSUM_ATTR_NAME,u);var p=e,d=o(p,l),m=" (client) "+p.substring(d-20,d+20)+"\n (server) "+l.substring(d-20,d+20);t.nodeType===D?f("42",m):void 0}if(t.nodeType===D?f("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else S(t,e),g.precacheNode(n,t.firstChild)}};e.exports=H},function(e,t,n){"use strict";function o(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===r?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var r=(n(128),9);e.exports=o},function(e,t){"use strict";var n={useCreateElement:!0,useFiber:!1};e.exports=n},function(e,t,n){"use strict";var o=n(162),r=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=o(e);return i.test(e)?e:e.replace(r," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var r=o(e);return r===n}};e.exports=a},function(e,t){"use strict";function n(e){for(var t=1,n=0,r=0,i=e.length,a=i&-4;r0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,r,a,s;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],o(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/react-select @@ -29,5 +29,5 @@ entity:e,key:n,name:n,component:t[n]})});return l.default.createElement("div",{c !function(){"use strict";function n(){for(var e=[],t=0;t-1)return!1;if(o.filterOption)return o.filterOption.call(r,e,t);if(!t)return!0;var i=String(e[o.valueKey]),s=String(e[o.labelKey]);return o.ignoreAccents&&("label"!==o.matchProp&&(i=(0,a.default)(i)),"value"!==o.matchProp&&(s=(0,a.default)(s))),o.ignoreCase&&("label"!==o.matchProp&&(i=i.toLowerCase()),"value"!==o.matchProp&&(s=s.toLowerCase())),"start"===o.matchPos?"label"!==o.matchProp&&i.substr(0,t.length)===t||"value"!==o.matchProp&&s.substr(0,t.length)===t:"label"!==o.matchProp&&i.indexOf(t)>=0||"value"!==o.matchProp&&s.indexOf(t)>=0})}var i=n(177),a=o(i);e.exports=r},function(e,t){"use strict";var n=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}];e.exports=function(e){for(var t=0;t-1,m=e===t,v=(0,a.default)(i,{"Select-option":!0,"is-selected":c,"is-focused":m,"is-disabled":e.disabled});return u.default.createElement(h,{className:v,instancePrefix:n,isDisabled:e.disabled,isFocused:m,isSelected:c,key:"option-"+s+"-"+e[d],onFocus:o,onSelect:r,option:e,optionIndex:s,ref:function(e){f(e,m)}},l(e,s))})}var i=n(174),a=o(i),s=n(2),u=o(s);e.exports=r},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(h.default,e)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function i(e){return f.default.createElement(m.default,e)}function a(e){var t=e.option,n=e.options,o=e.labelKey,r=e.valueKey;return 0===n.filter(function(e){return e[o]===t[o]||e[r]===t[r]}).length}function s(e){var t=e.label;return!!t}function u(e){var t=e.label,n=e.labelKey,o=e.valueKey,r={};return r[o]=t,r[n]=t,r.className="Select-create-option-placeholder",r}function l(e){return'Create option "'+e+'"'}function c(e){var t=e.keyCode;switch(t){case 9:case 13:case 188:return!0}return!1}var p=Object.assign||function(e){for(var t=1;t.Select-control{background-color:#f9f9f9}.Select.is-disabled>.Select-control:hover{box-shadow:none}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none;opacity:.35}.Select-control{background-color:#fff;border-color:#d9d9d9 #ccc #b3b3b3;border-radius:4px;border:1px solid #ccc;color:#333;cursor:default;display:table;border-spacing:0;border-collapse:separate;height:36px;outline:none;overflow:hidden;position:relative;width:100%}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.Select-control .Select-input:focus{outline:none}.is-searchable.is-open>.Select-control{cursor:text}.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.is-open>.Select-control>.Select-arrow{border-color:transparent transparent #999;border-width:0 5px 5px}.is-searchable.is-focused:not(.is-open)>.Select-control{cursor:text}.is-focused:not(.is-open)>.Select-control{border-color:#007eff;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 0 3px rgba(0,126,255,.1)}.Select--single>.Select-control .Select-value,.Select-placeholder{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value .Select-value-label,.has-value.Select--single>.Select-control .Select-value .Select-value-label{color:#333}.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label,.has-value.Select--single>.Select-control .Select-value a.Select-value-label{cursor:pointer;text-decoration:none}.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:hover,.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus,.has-value.Select--single>.Select-control .Select-value a.Select-value-label:hover{color:#007eff;outline:none;text-decoration:underline}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{width:100%;background:none transparent;border:0 none;box-shadow:none;cursor:default;display:inline-block;font-family:inherit;font-size:inherit;margin:0;outline:none;line-height:14px;padding:8px 0 12px;-webkit-appearance:none}.is-focused .Select-input>input{cursor:text}.has-value.is-pseudo-focused .Select-input{opacity:0}.Select-control:not(.is-searchable)>.Select-input{outline:none}.Select-loading-zone{cursor:pointer;display:table-cell;text-align:center}.Select-loading,.Select-loading-zone{position:relative;vertical-align:middle;width:16px}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#d0021b}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:25px;padding-right:5px}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;display:inline-block;height:0;width:0}.is-open .Select-arrow,.Select-arrow-zone:hover>.Select-arrow{border-top-color:#666}.Select--multi .Select-multi-value-wrapper{display:inline-block}.Select .Select-aria-only{display:inline-block;height:1px;width:1px;margin:-1px;clip:rect(0,0,0,0);overflow:hidden}@-webkit-keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{box-sizing:border-box;background-color:#fff;color:#666;cursor:pointer;display:block;padding:8px 10px}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-selected{background-color:#f5faff;background-color:rgba(0,126,255,.04);color:#333}.Select-option.is-focused{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);color:#333}.Select-option.is-disabled{color:#ccc;cursor:default}.Select-noresults{box-sizing:border-box;color:#999;cursor:default;display:block;padding:8px 10px}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.has-value .Select-input{margin-left:5px}.Select--multi .Select-value{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);border-radius:2px;border:1px solid #c2e0ff;border:1px solid rgba(0,126,255,.24);color:#007eff;display:inline-block;font-size:.9em;line-height:1.4;margin-left:5px;margin-top:5px;vertical-align:top}.Select--multi .Select-value-icon,.Select--multi .Select-value-label{display:inline-block;vertical-align:middle}.Select--multi .Select-value-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select--multi a.Select-value-label{color:#007eff;cursor:pointer;text-decoration:none}.Select--multi a.Select-value-label:hover{text-decoration:underline}.Select--multi .Select-value-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid #c2e0ff;border-right:1px solid rgba(0,126,255,.24);padding:1px 5px 3px}.Select--multi .Select-value-icon:focus,.Select--multi .Select-value-icon:hover{background-color:#d8eafd;background-color:rgba(0,113,230,.08);color:#0071e6}.Select--multi .Select-value-icon:active{background-color:#c2e0ff;background-color:rgba(0,126,255,.24)}.Select--multi.is-disabled .Select-value{background-color:#fcfcfc;border:1px solid #e3e3e3;color:#333}.Select--multi.is-disabled .Select-value-icon{cursor:not-allowed;border-right:1px solid #e3e3e3}.Select--multi.is-disabled .Select-value-icon:active,.Select--multi.is-disabled .Select-value-icon:focus,.Select--multi.is-disabled .Select-value-icon:hover{background-color:#fcfcfc}@keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function l(e,t){var n,o,r;if(t.singleton){var i=g++;n=y||(y=s(t)),o=c.bind(null,n,i,!1),r=c.bind(null,n,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),o=d.bind(null,n),r=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),o=p.bind(null,n),r=function(){a(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}function c(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=E(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,o=t.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}var f={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,g=0,b=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=r(e);return o(n,t),function(e){for(var i=[],a=0;a0){var o=t[0].object;void 0!==o.userData.object?e.selectEntity(o.userData.object.el):e.selectEntity(o.el)}else e.selectEntity(null)}}function i(t){if(!(t instanceof CustomEvent)){t.preventDefault();var n=o(e.container,t.clientX,t.clientY);S.fromArray(n),document.addEventListener("mouseup",a,!1)}}function a(t){if(!(t instanceof CustomEvent)){var n=o(e.container,t.clientX,t.clientY);M.fromArray(n),r(),document.removeEventListener("mouseup",a,!1)}}function s(t){var n=t.changedTouches[0],r=o(e.container,n.clientX,n.clientY);S.fromArray(r),document.addEventListener("touchend",u,!1)}function u(t){var n=t.changedTouches[0],i=o(e.container,n.clientX,n.clientY);M.fromArray(i),r(),document.removeEventListener("touchend",u,!1)}function f(t){var r=o(e.container,t.clientX,t.clientY);A.fromArray(r);var i=n(A,b);if(i.length>0){var a=i[0];c.emit("objectfocused",a.object)}}function h(){e.container.removeEventListener("mousedown",i),e.container.removeEventListener("touchstart",s),e.container.removeEventListener("dblclick",f),R.enabled=!1}function m(){e.container.addEventListener("mousedown",i,!1),e.container.addEventListener("touchstart",s,!1),e.container.addEventListener("dblclick",f,!1),R.enabled=!0}var v={dom:e.container},y=e.currentCameraEl;e.sceneEl.addEventListener("camera-set-active",function(t){e.opened&&(t.detail.cameraEl!==e.inspectorCameraEl&&(y=t.detail.cameraEl),e.inspectorCameraEl.setAttribute("camera","active","true"))});var g=e.sceneHelpers,b=[],E=new THREE.GridHelper(30,60,12303291,8947848);g.add(E);var x=e.inspectorCameraEl.getObject3D("camera"),w=new THREE.BoxHelper;w.material.depthTest=!1,w.material.transparent=!0,w.material.color.set(2075378),w.visible=!1,g.add(w);var C=null,T=null,_=null,P=new THREE.TransformControls(x,e.container);P.addEventListener("change",function(){var e=P.object;if(void 0!==e){w.update(e),t(e);var n=P.getMode();switch(n){case"translate":e.el.setAttribute("position",{x:(0,l.getNumber)(e.position.x),y:(0,l.getNumber)(e.position.y),z:(0,l.getNumber)(e.position.z)});break;case"rotate":e.el.setAttribute("rotation",{x:THREE.Math.radToDeg((0,l.getNumber)(e.rotation.x)),y:THREE.Math.radToDeg((0,l.getNumber)(e.rotation.y)),z:THREE.Math.radToDeg((0,l.getNumber)(e.rotation.z))});break;case"scale":e.el.setAttribute("scale",{x:(0,l.getNumber)(e.scale.x),y:(0,l.getNumber)(e.scale.y),z:(0,l.getNumber)(e.scale.z)})}c.emit("refreshsidebarobject3d",e),p(n)}}),P.addEventListener("mouseDown",function(){var e=P.object;C=e.position.clone(),T=e.rotation.clone(),_=e.scale.clone(),R.enabled=!1}),P.addEventListener("mouseUp",function(){var e=P.object;if(null!==e)switch(P.getMode()){case"translate":!C.equals(e.position);break;case"rotate":!T.equals(e.rotation);break;case"scale":!_.equals(e.scale)}R.enabled=!0}),g.add(P),c.on("objectchanged",function(){e.selectedEntity.object3DMap.mesh&&w.update(e.selected)});var O=new THREE.Raycaster,k=new THREE.Vector2,S=new THREE.Vector2,M=new THREE.Vector2,A=new THREE.Vector2,R=new THREE.EditorControls(x,e.container);m(),R.addEventListener("change",function(){P.update(),d()}),c.on("inspectorcleared",function(){R.center.set(0,0,0)}),c.on("transformmodechanged",function(e){P.setMode(e)}),c.on("snapchanged",function(e){P.setTranslationSnap(e)}),c.on("spacechanged",function(e){P.setSpace(e)}),c.on("objectselected",function(e){w.visible=!1,P.detach(),e&&e.el&&(e.el.getObject3D("mesh")&&(w.update(e),w.visible=!0),P.attach(e))}),c.on("objectfocused",function(e){R.focus(e),ga("send","event","Viewport","selectEntity")}),c.on("geometrychanged",function(e){null!==e&&w.update(e)}),c.on("objectadded",function(e){e.traverse(function(e){b.indexOf(e)===-1&&b.push(e)})}),c.on("objectchanged",function(n){e.selected===n&&n.geometry&&n.geometry.vertices&&n.geometry.vertices.length>0&&w.update(n),P.update(),n instanceof THREE.PerspectiveCamera&&n.updateProjectionMatrix(),t(n)}),c.on("selectedentitycomponentchanged",function(){c.emit("objectchanged",e.selectedEntity.object3D)}),c.on("objectremoved",function(e){e.traverse(function(e){b.splice(b.indexOf(e),1)})}),c.on("helperadded",function(e){b.push(e.getObjectByName("picker")),t(e.fromObject.parent)}),c.on("helperremoved",function(e){b.splice(b.indexOf(e.getObjectByName("picker")),1)}),c.on("windowresize",function(){x.aspect=v.dom.offsetWidth/v.dom.offsetHeight,x.updateProjectionMatrix()}),c.on("gridvisibilitychanged",function(e){E.visible=e}),c.on("togglegrid",function(){E.visible=!E.visible}),c.on("inspectormodechanged",function(t){t?(m(),e.inspectorCameraEl.setAttribute("camera","active","true"),Array.prototype.slice.call(document.querySelectorAll(".a-enter-vr,.rs-base")).forEach(function(e){e.style.display="none"})):(h(),y.setAttribute("camera","active","true"),Array.prototype.slice.call(document.querySelectorAll(".a-enter-vr,.rs-base")).forEach(function(e){e.style.display="block"})),ga("send","event","Viewport","toggleEditor",t)})}var i=n(190),a=o(i),s=n(191),u=(o(s),n(192)),l=(o(u),n(193)),c=n(170),p=(0,a.default)(function(e){ga("send","event","Viewport","transformEntity",e)},3e3),d=(0,a.default)(function(){ga("send","event","Viewport","changeEditorCamera")},3e3);e.exports=r},function(e,t){(function(t){function n(e,t,n){function r(t){var n=m,o=v;return m=v=void 0,T=t,g=e.apply(o,n)}function i(e){return T=e,b=setTimeout(c,t),_?r(e):g}function u(e){var n=e-C,o=e-T,r=t-n;return P?x(r,y-o):r}function l(e){var n=e-C,o=e-T;return void 0===C||n>=t||n<0||P&&o>=y}function c(){var e=w();return l(e)?p(e):void(b=setTimeout(c,u(e)))}function p(e){return b=void 0,O&&m?r(e):(m=v=void 0,g)}function d(){void 0!==b&&clearTimeout(b),T=0,m=C=v=b=void 0}function f(){return void 0===b?g:p(w())}function h(){var e=w(),n=l(e);if(m=arguments,v=this,C=e,n){if(void 0===b)return i(C);if(P)return b=setTimeout(c,t),r(C)}return void 0===b&&(b=setTimeout(c,t)),g}var m,v,y,g,b,C,T=0,_=!1,P=!1,O=!0;if("function"!=typeof e)throw new TypeError(s);return t=a(t)||0,o(n)&&(_=!!n.leading,P="maxWait"in n,y=P?E(a(n.maxWait)||0,t):y,O="trailing"in n?!!n.trailing:O),h.cancel=d,h.flush=f,h}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==typeof e}function i(e){return"symbol"==typeof e||r(e)&&b.call(e)==l}function a(e){if("number"==typeof e)return e;if(i(e))return u;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=d.test(e);return n||f.test(e)?h(e.slice(2),n?2:8):p.test(e)?u:+e}var s="Expected a function",u=NaN,l="[object Symbol]",c=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,f=/^0o[0-7]+$/i,h=parseInt,m="object"==typeof t&&t&&t.Object===Object&&t,v="object"==typeof self&&self&&self.Object===Object&&self,y=m||v||Function("return this")(),g=Object.prototype,b=g.toString,E=Math.max,x=Math.min,w=function(){return y.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";!function(){var e=function(e){THREE.MeshBasicMaterial.call(this),this.depthTest=!1,this.depthWrite=!1,this.side=THREE.FrontSide,this.transparent=!0,this.setValues(e),this.oldColor=this.color.clone(),this.oldOpacity=this.opacity,this.highlight=function(e){e?(this.color.setRGB(1,1,0),this.opacity=1):(this.color.copy(this.oldColor),this.opacity=this.oldOpacity)}};e.prototype=Object.create(THREE.MeshBasicMaterial.prototype),e.prototype.constructor=e;var t=function(e){THREE.LineBasicMaterial.call(this),this.depthTest=!1,this.depthWrite=!1,this.transparent=!0,this.linewidth=1,this.setValues(e),this.oldColor=this.color.clone(),this.oldOpacity=this.opacity,this.highlight=function(e){e?(this.color.setRGB(1,1,0),this.opacity=1):(this.color.copy(this.oldColor),this.opacity=this.oldOpacity)}};t.prototype=Object.create(THREE.LineBasicMaterial.prototype),t.prototype.constructor=t;var n=new e({visible:!1,transparent:!1});THREE.TransformGizmo=function(){this.init=function(){THREE.Object3D.call(this),this.handles=new THREE.Object3D,this.pickers=new THREE.Object3D,this.planes=new THREE.Object3D,this.add(this.handles),this.add(this.pickers),this.add(this.planes);var e=new THREE.PlaneBufferGeometry(50,50,2,2),t=new THREE.MeshBasicMaterial({visible:!1,side:THREE.DoubleSide}),n={XY:new THREE.Mesh(e,t),YZ:new THREE.Mesh(e,t),XZ:new THREE.Mesh(e,t),XYZE:new THREE.Mesh(e,t)};this.activePlane=n.XYZE,n.YZ.rotation.set(0,Math.PI/2,0),n.XZ.rotation.set(-Math.PI/2,0,0);for(var o in n)n[o].name=o,this.planes.add(n[o]),this.planes[o]=n[o];var r=function(e,t){for(var n in e)for(o=e[n].length;o--;){var r=e[n][o][0],i=e[n][o][1],a=e[n][o][2];r.name=n,i&&r.position.set(i[0],i[1],i[2]),a&&r.rotation.set(a[0],a[1],a[2]),t.add(r)}};r(this.handleGizmos,this.handles),r(this.pickerGizmos,this.pickers),this.traverse(function(e){if(e instanceof THREE.Mesh){e.updateMatrix();var t=e.geometry.clone();t.applyMatrix(e.matrix),e.geometry=t,e.position.set(0,0,0),e.rotation.set(0,0,0),e.scale.set(1,1,1)}})},this.highlight=function(e){this.traverse(function(t){t.material&&t.material.highlight&&(t.name===e?t.material.highlight(!0):t.material.highlight(!1))})}},THREE.TransformGizmo.prototype=Object.create(THREE.Object3D.prototype),THREE.TransformGizmo.prototype.constructor=THREE.TransformGizmo,THREE.TransformGizmo.prototype.update=function(e,t){var n=new THREE.Vector3(0,0,0),o=new THREE.Vector3(0,1,0),r=new THREE.Matrix4;this.traverse(function(i){i.name.search("E")!==-1?i.quaternion.setFromRotationMatrix(r.lookAt(t,n,o)):i.name.search("X")===-1&&i.name.search("Y")===-1&&i.name.search("Z")===-1||i.quaternion.setFromEuler(e)})},THREE.TransformGizmoTranslate=function(){THREE.TransformGizmo.call(this);var o=new THREE.Geometry,r=new THREE.Mesh(new THREE.CylinderGeometry(0,.05,.2,12,1,!1));r.position.y=.5,r.updateMatrix(),o.merge(r.geometry,r.matrix);var i=new THREE.BufferGeometry;i.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,1,0,0],3));var a=new THREE.BufferGeometry;a.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,0,1,0],3));var s=new THREE.BufferGeometry;s.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,0,0,1],3)),this.handleGizmos={X:[[new THREE.Mesh(o,new e({color:16711680})),[.5,0,0],[0,0,-Math.PI/2]],[new THREE.Line(i,new t({color:16711680}))]],Y:[[new THREE.Mesh(o,new e({color:65280})),[0,.5,0]],[new THREE.Line(a,new t({color:65280}))]],Z:[[new THREE.Mesh(o,new e({color:255})),[0,0,.5],[Math.PI/2,0,0]],[new THREE.Line(s,new t({color:255}))]],XYZ:[[new THREE.Mesh(new THREE.OctahedronGeometry(.1,0),new e({color:16777215,opacity:.25})),[0,0,0],[0,0,0]]],XY:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.29,.29),new e({color:16776960,opacity:.25})),[.15,.15,0]]],YZ:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.29,.29),new e({color:65535,opacity:.25})),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.29,.29),new e({color:16711935,opacity:.25})),[.15,0,.15],[-Math.PI/2,0,0]]]},this.pickerGizmos={X:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new THREE.Mesh(new THREE.OctahedronGeometry(.2,0),n)]],XY:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.4,.4),n),[.2,.2,0]]],YZ:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.4,.4),n),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.4,.4),n),[.2,0,.2],[-Math.PI/2,0,0]]]},this.setActivePlane=function(e,t){var n=new THREE.Matrix4;t.applyMatrix4(n.getInverse(n.extractRotation(this.planes.XY.matrixWorld))),"X"===e&&(this.activePlane=this.planes.XY,Math.abs(t.y)>Math.abs(t.z)&&(this.activePlane=this.planes.XZ)),"Y"===e&&(this.activePlane=this.planes.XY,Math.abs(t.x)>Math.abs(t.z)&&(this.activePlane=this.planes.YZ)),"Z"===e&&(this.activePlane=this.planes.XZ,Math.abs(t.x)>Math.abs(t.y)&&(this.activePlane=this.planes.YZ)),"XYZ"===e&&(this.activePlane=this.planes.XYZE),"XY"===e&&(this.activePlane=this.planes.XY),"YZ"===e&&(this.activePlane=this.planes.YZ),"XZ"===e&&(this.activePlane=this.planes.XZ)},this.init()},THREE.TransformGizmoTranslate.prototype=Object.create(THREE.TransformGizmo.prototype),THREE.TransformGizmoTranslate.prototype.constructor=THREE.TransformGizmoTranslate,THREE.TransformGizmoRotate=function(){THREE.TransformGizmo.call(this);var e=function(e,t,n){var o=new THREE.BufferGeometry,r=[];n=n?n:1;for(var i=0;i<=64*n;++i)"x"===t&&r.push(0,Math.cos(i/32*Math.PI)*e,Math.sin(i/32*Math.PI)*e),"y"===t&&r.push(Math.cos(i/32*Math.PI)*e,0,Math.sin(i/32*Math.PI)*e),"z"===t&&r.push(Math.sin(i/32*Math.PI)*e,Math.cos(i/32*Math.PI)*e,0);return o.addAttribute("position",new THREE.Float32BufferAttribute(r,3)),o};this.handleGizmos={X:[[new THREE.Line(new e(1,"x",.5),new t({color:16711680}))]],Y:[[new THREE.Line(new e(1,"y",.5),new t({color:65280}))]],Z:[[new THREE.Line(new e(1,"z",.5),new t({color:255}))]],E:[[new THREE.Line(new e(1.25,"z",1),new t({color:13421568}))]],XYZE:[[new THREE.Line(new e(1,"z",1),new t({color:7895160}))]]},this.pickerGizmos={X:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1,.12,4,12,Math.PI),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1,.12,4,12,Math.PI),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1,.12,4,12,Math.PI),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1.25,.12,2,24),n)]],XYZE:[[new THREE.Mesh(new THREE.Geometry)]]},this.setActivePlane=function(e){"E"===e&&(this.activePlane=this.planes.XYZE),"X"===e&&(this.activePlane=this.planes.YZ),"Y"===e&&(this.activePlane=this.planes.XZ),"Z"===e&&(this.activePlane=this.planes.XY)},this.update=function(e,t){THREE.TransformGizmo.prototype.update.apply(this,arguments);var n=({handles:this.handles,pickers:this.pickers},new THREE.Matrix4),o=new THREE.Euler(0,0,1),r=new THREE.Quaternion,i=new THREE.Vector3(1,0,0),a=new THREE.Vector3(0,1,0),s=new THREE.Vector3(0,0,1),u=new THREE.Quaternion,l=new THREE.Quaternion,c=new THREE.Quaternion,p=t.clone();o.copy(this.planes.XY.rotation),r.setFromEuler(o),n.makeRotationFromQuaternion(r).getInverse(n),p.applyMatrix4(n),this.traverse(function(e){r.setFromEuler(o),"X"===e.name&&(u.setFromAxisAngle(i,Math.atan2(-p.y,p.z)),r.multiplyQuaternions(r,u),e.quaternion.copy(r)),"Y"===e.name&&(l.setFromAxisAngle(a,Math.atan2(p.x,p.z)),r.multiplyQuaternions(r,l),e.quaternion.copy(r)),"Z"===e.name&&(c.setFromAxisAngle(s,Math.atan2(p.y,p.x)),r.multiplyQuaternions(r,c),e.quaternion.copy(r))})},this.init()},THREE.TransformGizmoRotate.prototype=Object.create(THREE.TransformGizmo.prototype),THREE.TransformGizmoRotate.prototype.constructor=THREE.TransformGizmoRotate,THREE.TransformGizmoScale=function(){THREE.TransformGizmo.call(this);var o=new THREE.Geometry,r=new THREE.Mesh(new THREE.BoxGeometry(.125,.125,.125));r.position.y=.5,r.updateMatrix(),o.merge(r.geometry,r.matrix);var i=new THREE.BufferGeometry;i.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,1,0,0],3));var a=new THREE.BufferGeometry;a.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,0,1,0],3));var s=new THREE.BufferGeometry;s.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,0,0,1],3)),this.handleGizmos={X:[[new THREE.Mesh(o,new e({color:16711680})),[.5,0,0],[0,0,-Math.PI/2]],[new THREE.Line(i,new t({color:16711680}))]],Y:[[new THREE.Mesh(o,new e({color:65280})),[0,.5,0]],[new THREE.Line(a,new t({color:65280}))]],Z:[[new THREE.Mesh(o,new e({color:255})),[0,0,.5],[Math.PI/2,0,0]],[new THREE.Line(s,new t({color:255}))]],XYZ:[[new THREE.Mesh(new THREE.BoxBufferGeometry(.125,.125,.125),new e({color:16777215,opacity:.25}))]]},this.pickerGizmos={X:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new THREE.Mesh(new THREE.BoxBufferGeometry(.4,.4,.4),n)]]},this.setActivePlane=function(e,t){var n=new THREE.Matrix4;t.applyMatrix4(n.getInverse(n.extractRotation(this.planes.XY.matrixWorld))),"X"===e&&(this.activePlane=this.planes.XY,Math.abs(t.y)>Math.abs(t.z)&&(this.activePlane=this.planes.XZ)),"Y"===e&&(this.activePlane=this.planes.XY,Math.abs(t.x)>Math.abs(t.z)&&(this.activePlane=this.planes.YZ)),"Z"===e&&(this.activePlane=this.planes.XZ,Math.abs(t.x)>Math.abs(t.y)&&(this.activePlane=this.planes.YZ)),"XYZ"===e&&(this.activePlane=this.planes.XYZE)},this.init()},THREE.TransformGizmoScale.prototype=Object.create(THREE.TransformGizmo.prototype),THREE.TransformGizmoScale.prototype.constructor=THREE.TransformGizmoScale,THREE.TransformControls=function(e,t){function n(e){if(void 0!==s.object&&l!==!0&&(void 0===e.button||0===e.button)){var t=e.changedTouches?e.changedTouches[0]:e,n=a(t,c[u].pickers.children),o=null;n&&(o=n.object.name,e.preventDefault()),s.axis!==o&&(s.axis=o,s.update(),s.dispatchEvent(f))}}function o(e){if(void 0!==s.object&&l!==!0&&(void 0===e.button||0===e.button)){var t=e.changedTouches?e.changedTouches[0]:e;if(0===t.button||void 0===t.button){var n=a(t,c[u].pickers.children);if(n){e.preventDefault(),e.stopPropagation(),s.dispatchEvent(h),s.axis=n.object.name,s.update(),_.copy(q).sub(U).normalize(),c[u].setActivePlane(s.axis,_);var o=a(t,[c[u].activePlane]);o&&(F.copy(s.object.position),L.copy(s.object.scale),H.extractRotation(s.object.matrix),W.extractRotation(s.object.matrixWorld),V.extractRotation(s.object.parent.matrixWorld),B.setFromMatrixScale(P.getInverse(s.object.parent.matrixWorld)),E.copy(o.point))}}l=!0}}function r(e){if(void 0!==s.object&&null!==s.axis&&l!==!1&&(void 0===e.button||0===e.button)){var t=e.changedTouches?e.changedTouches[0]:e,n=a(t,[c[u].activePlane]);n!==!1&&(e.preventDefault(),e.stopPropagation(),b.copy(n.point),"translate"===u?(b.sub(E),b.multiply(B),"local"!==s.space&&"scale"!==u||(b.applyMatrix4(P.getInverse(W)),s.axis.search("X")===-1&&(b.x=0),s.axis.search("Y")===-1&&(b.y=0),s.axis.search("Z")===-1&&(b.z=0),b.applyMatrix4(H),s.object.position.copy(F),s.object.position.add(b)),"world"!==s.space&&s.axis.search("XYZ")===-1||(s.axis.search("X")===-1&&(b.x=0),s.axis.search("Y")===-1&&(b.y=0),s.axis.search("Z")===-1&&(b.z=0),b.applyMatrix4(P.getInverse(V)),s.object.position.copy(F),s.object.position.add(b)),null!==s.translationSnap&&("local"!==s.space&&"scale"!==u||s.object.position.applyMatrix4(P.getInverse(W)),s.axis.search("X")!==-1&&(s.object.position.x=Math.round(s.object.position.x/s.translationSnap)*s.translationSnap),s.axis.search("Y")!==-1&&(s.object.position.y=Math.round(s.object.position.y/s.translationSnap)*s.translationSnap),s.axis.search("Z")!==-1&&(s.object.position.z=Math.round(s.object.position.z/s.translationSnap)*s.translationSnap),"local"!==s.space&&"scale"!==u||s.object.position.applyMatrix4(W))):"scale"===u?(b.sub(E),b.multiply(B),"local"!==s.space&&"scale"!==u||("XYZ"===s.axis?(C=1+b.y/Math.max(L.x,L.y,L.z),s.object.scale.x=L.x*C,s.object.scale.y=L.y*C,s.object.scale.z=L.z*C):(b.applyMatrix4(P.getInverse(W)),"X"===s.axis&&(s.object.scale.x=L.x*(1+b.x/L.x)),"Y"===s.axis&&(s.object.scale.y=L.y*(1+b.y/L.y)),"Z"===s.axis&&(s.object.scale.z=L.z*(1+b.z/L.z))))):"rotate"===u&&(b.sub(U),b.multiply(B),O.copy(E).sub(U),O.multiply(B),"E"===s.axis?(b.applyMatrix4(P.getInverse(T)),O.applyMatrix4(P.getInverse(T)),x.set(Math.atan2(b.z,b.y),Math.atan2(b.x,b.z),Math.atan2(b.y,b.x)),w.set(Math.atan2(O.z,O.y),Math.atan2(O.x,O.z),Math.atan2(O.y,O.x)),k.setFromRotationMatrix(P.getInverse(V)),I.setFromAxisAngle(_,x.z-w.z),R.setFromRotationMatrix(W),k.multiplyQuaternions(k,I),k.multiplyQuaternions(k,R),s.object.quaternion.copy(k)):"XYZE"===s.axis?(I.setFromEuler(b.clone().cross(O).normalize()),k.setFromRotationMatrix(P.getInverse(V)),N.setFromAxisAngle(I,-b.clone().angleTo(O)),R.setFromRotationMatrix(W),k.multiplyQuaternions(k,N),k.multiplyQuaternions(k,R),s.object.quaternion.copy(k)):"local"===s.space||"scale"===u?(b.applyMatrix4(P.getInverse(W)),O.applyMatrix4(P.getInverse(W)),x.set(Math.atan2(b.z,b.y),Math.atan2(b.x,b.z),Math.atan2(b.y,b.x)),w.set(Math.atan2(O.z,O.y),Math.atan2(O.x,O.z),Math.atan2(O.y,O.x)),R.setFromRotationMatrix(H),null!==s.rotationSnap?(N.setFromAxisAngle(S,Math.round((x.x-w.x)/s.rotationSnap)*s.rotationSnap),D.setFromAxisAngle(M,Math.round((x.y-w.y)/s.rotationSnap)*s.rotationSnap),j.setFromAxisAngle(A,Math.round((x.z-w.z)/s.rotationSnap)*s.rotationSnap)):(N.setFromAxisAngle(S,x.x-w.x),D.setFromAxisAngle(M,x.y-w.y),j.setFromAxisAngle(A,x.z-w.z)),"X"===s.axis&&R.multiplyQuaternions(R,N),"Y"===s.axis&&R.multiplyQuaternions(R,D),"Z"===s.axis&&R.multiplyQuaternions(R,j),s.object.quaternion.copy(R)):"world"===s.space&&(x.set(Math.atan2(b.z,b.y),Math.atan2(b.x,b.z),Math.atan2(b.y,b.x)),w.set(Math.atan2(O.z,O.y),Math.atan2(O.x,O.z),Math.atan2(O.y,O.x)),k.setFromRotationMatrix(P.getInverse(V)),null!==s.rotationSnap?(N.setFromAxisAngle(S,Math.round((x.x-w.x)/s.rotationSnap)*s.rotationSnap),D.setFromAxisAngle(M,Math.round((x.y-w.y)/s.rotationSnap)*s.rotationSnap),j.setFromAxisAngle(A,Math.round((x.z-w.z)/s.rotationSnap)*s.rotationSnap)):(N.setFromAxisAngle(S,x.x-w.x),D.setFromAxisAngle(M,x.y-w.y),j.setFromAxisAngle(A,x.z-w.z)),R.setFromRotationMatrix(W),"X"===s.axis&&k.multiplyQuaternions(k,N),"Y"===s.axis&&k.multiplyQuaternions(k,D),"Z"===s.axis&&k.multiplyQuaternions(k,j),k.multiplyQuaternions(k,R),s.object.quaternion.copy(k))),s.update(),s.dispatchEvent(f),s.dispatchEvent(v))}}function i(e){e.preventDefault(),void 0!==e.button&&0!==e.button||(l&&null!==s.axis&&(m.mode=u,s.dispatchEvent(m)),l=!1,"TouchEvent"in window&&e instanceof TouchEvent?(s.axis=null,s.update(),s.dispatchEvent(f)):n(e))}function a(n,o){var r=t.getBoundingClientRect(),i=(n.clientX-r.left)/r.width,a=(n.clientY-r.top)/r.height;g.set(2*i-1,-(2*a)+1),y.setFromCamera(g,e);var s=y.intersectObjects(o,!0);return!!s[0]&&s[0]}THREE.Object3D.call(this),t=void 0!==t?t:document,this.object=void 0,this.visible=!1,this.translationSnap=null,this.rotationSnap=null,this.space="world",this.size=1,this.axis=null;var s=this,u="translate",l=!1,c={translate:new THREE.TransformGizmoTranslate,rotate:new THREE.TransformGizmoRotate,scale:new THREE.TransformGizmoScale};for(var p in c){var d=c[p];d.visible=p===u,this.add(d)}var f={type:"change"},h={type:"mouseDown"},m={type:"mouseUp",mode:u},v={type:"objectChange"},y=new THREE.Raycaster,g=new THREE.Vector2,b=new THREE.Vector3,E=new THREE.Vector3,x=new THREE.Vector3,w=new THREE.Vector3,C=1,T=new THREE.Matrix4,_=new THREE.Vector3,P=new THREE.Matrix4,O=new THREE.Vector3,k=new THREE.Quaternion,S=new THREE.Vector3(1,0,0),M=new THREE.Vector3(0,1,0),A=new THREE.Vector3(0,0,1),R=new THREE.Quaternion,N=new THREE.Quaternion,D=new THREE.Quaternion,j=new THREE.Quaternion,I=new THREE.Quaternion,F=new THREE.Vector3,L=new THREE.Vector3,H=new THREE.Matrix4,V=new THREE.Matrix4,B=new THREE.Vector3,U=new THREE.Vector3,z=new THREE.Euler,W=new THREE.Matrix4,q=new THREE.Vector3,K=new THREE.Euler;t.addEventListener("mousedown",o,!1),t.addEventListener("touchstart",o,!1),t.addEventListener("mousemove",n,!1),t.addEventListener("touchmove",n,!1),t.addEventListener("mousemove",r,!1),t.addEventListener("touchmove",r,!1),t.addEventListener("mouseup",i,!1),t.addEventListener("mouseout",i,!1),t.addEventListener("touchend",i,!1),t.addEventListener("touchcancel",i,!1),t.addEventListener("touchleave",i,!1),this.dispose=function(){t.removeEventListener("mousedown",o),t.removeEventListener("touchstart",o),t.removeEventListener("mousemove",n),t.removeEventListener("touchmove",n),t.removeEventListener("mousemove",r),t.removeEventListener("touchmove",r),t.removeEventListener("mouseup",i),t.removeEventListener("mouseout",i),t.removeEventListener("touchend",i),t.removeEventListener("touchcancel",i),t.removeEventListener("touchleave",i)},this.attach=function(e){this.object=e,this.visible=!0,this.update()},this.detach=function(){this.object=void 0,this.visible=!1,this.axis=null},this.getMode=function(){return u},this.setMode=function(e){u=e?e:u;for(var t in c)c[t].visible=t===u;this.update(),s.dispatchEvent(f)},this.setTranslationSnap=function(e){s.translationSnap=e},this.setRotationSnap=function(e){s.rotationSnap=e},this.setSize=function(e){s.size=e,this.update(),s.dispatchEvent(f)},this.toggleSpace=function(){this.setSpace("local"===s.space?"world":"local")},this.setSpace=function(e){s.space=e,this.update(),s.dispatchEvent(f)},this.update=function(){void 0!==s.object&&(s.object.updateMatrixWorld(),U.setFromMatrixPosition(s.object.matrixWorld),z.setFromRotationMatrix(P.extractRotation(s.object.matrixWorld)),e.updateMatrixWorld(),q.setFromMatrixPosition(e.matrixWorld),K.setFromRotationMatrix(P.extractRotation(e.matrixWorld)),C=U.distanceTo(q)/6*s.size,this.position.copy(U),this.scale.set(C,C,C),_.copy(q).sub(U).normalize(),"local"===s.space||"scale"===u?c[u].update(z,_):"world"===s.space&&c[u].update(new THREE.Euler,_),c[u].highlight(s.axis))}},THREE.TransformControls.prototype=Object.create(THREE.Object3D.prototype),THREE.TransformControls.prototype.constructor=THREE.TransformControls}()},function(e,t){"use strict";THREE.EditorControls=function(e,t){function n(e){l.enabled!==!1&&(0===e.button?f=p.ROTATE:1===e.button?f=p.ZOOM:2===e.button&&(f=p.PAN),t.classList.add(d[f]),y.set(e.clientX,e.clientY),t.addEventListener("mousemove",o,!1),t.addEventListener("mouseup",r,!1),t.addEventListener("mouseout",r,!1),t.addEventListener("dblclick",r,!1))}function o(e){if(l.enabled!==!1){v.set(e.clientX,e.clientY);var t=v.x-y.x,n=v.y-y.y;f===p.ROTATE?l.rotate(new THREE.Vector3(.005*-t,.005*-n,0)):f===p.ZOOM?l.zoom(new THREE.Vector3(0,0,n)):f===p.PAN&&l.pan(new THREE.Vector3(-t,n,0)),y.set(e.clientX,e.clientY); }}function r(e){t.removeEventListener("mousemove",o,!1),t.removeEventListener("mouseup",r,!1),t.removeEventListener("mouseout",r,!1),t.removeEventListener("dblclick",r,!1),t.classList.remove(d[f]),f=p.NONE}function i(e){e.preventDefault();var t=0;e.wheelDelta?t=-e.wheelDelta:e.detail&&(t=10*e.detail),l.zoom(new THREE.Vector3(0,0,t))}function a(e){e.preventDefault()}function s(e){if(l.enabled!==!1){switch(e.touches.length){case 1:b[0].set(e.touches[0].pageX,e.touches[0].pageY,0),b[1].set(e.touches[0].pageX,e.touches[0].pageY,0);break;case 2:b[0].set(e.touches[0].pageX,e.touches[0].pageY,0),b[1].set(e.touches[1].pageX,e.touches[1].pageY,0),x=b[0].distanceTo(b[1])}E[0].copy(b[0]),E[1].copy(b[1])}}function u(e){function t(e,t){var n=t[0];for(var o in t)n.distanceTo(e)>t[o].distanceTo(e)&&(n=t[o]);return n}if(l.enabled!==!1){switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:b[0].set(e.touches[0].pageX,e.touches[0].pageY,0),b[1].set(e.touches[0].pageX,e.touches[0].pageY,0),l.rotate(b[0].sub(t(b[0],E)).multiplyScalar(-.005));break;case 2:b[0].set(e.touches[0].pageX,e.touches[0].pageY,0),b[1].set(e.touches[1].pageX,e.touches[1].pageY,0),distance=b[0].distanceTo(b[1]),l.zoom(new THREE.Vector3(0,0,x-distance)),x=distance;var n=b[0].clone().sub(t(b[0],E)),o=b[1].clone().sub(t(b[1],E));n.x=-n.x,o.x=-o.x,l.pan(n.add(o).multiplyScalar(.5))}E[0].copy(b[0]),E[1].copy(b[1])}}t=void 0!==t?t:document,this.enabled=!0,this.center=new THREE.Vector3;var l=this,c=new THREE.Vector3,p={NONE:-1,ROTATE:0,ZOOM:1,PAN:2},d=["state-rotating","state-zooming","state-dragging"],f=p.NONE,h=this.center,m=new THREE.Matrix3,v=new THREE.Vector2,y=new THREE.Vector2,g={type:"change"};this.focus=function(t,n){var o=new THREE.Vector3;if(t.matrixWorld.decompose(h,new THREE.Quaternion,o),n&&t.geometry){o=(o.x+o.y+o.z)/3,h.add(t.geometry.boundingSphere.center.clone().multiplyScalar(o));var r=t.geometry.boundingSphere.radius*o,i=e.position.clone().sub(h).normalize().multiplyScalar(2*r);e.position.copy(h).add(i)}e.lookAt(h),l.dispatchEvent(g)},this.pan=function(t){var n=e.position.distanceTo(h);t.multiplyScalar(.001*n),t.applyMatrix3(m.getNormalMatrix(e.matrix)),e.position.add(t),h.add(t),l.dispatchEvent(g)},this.zoom=function(t){var n=e.position.distanceTo(h);t.multiplyScalar(.001*n),t.length()>n||(t.applyMatrix3(m.getNormalMatrix(e.matrix)),e.position.add(t),l.dispatchEvent(g))},this.rotate=function(t){c.copy(e.position).sub(h);var n=Math.atan2(c.x,c.z),o=Math.atan2(Math.sqrt(c.x*c.x+c.z*c.z),c.y);n+=t.x,o+=t.y;var r=1e-6;o=Math.max(r,Math.min(Math.PI-r,o));var i=c.length();c.x=i*Math.sin(o)*Math.sin(n),c.y=i*Math.cos(o),c.z=i*Math.sin(o)*Math.cos(n),e.position.copy(h).add(c),e.lookAt(h),l.dispatchEvent(g)},this.dispose=function(){t.removeEventListener("contextmenu",a,!1),t.removeEventListener("mousedown",n,!1),t.removeEventListener("mousewheel",i,!1),t.removeEventListener("MozMousePixelScroll",i,!1),t.removeEventListener("mousemove",o,!1),t.removeEventListener("mouseup",r,!1),t.removeEventListener("mouseout",r,!1),t.removeEventListener("dblclick",r,!1),t.removeEventListener("touchstart",s,!1),t.removeEventListener("touchmove",u,!1)},t.addEventListener("contextmenu",a,!1),t.addEventListener("mousedown",n,!1),t.addEventListener("mousewheel",i,!1),t.addEventListener("MozMousePixelScroll",i,!1);var b=(new THREE.Vector3,[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3]),E=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],x=null;t.addEventListener("touchstart",s,!1),t.addEventListener("touchmove",u,!1)},THREE.EditorControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.EditorControls.prototype.constructor=THREE.EditorControls},function(e,t){"use strict";function n(e){return parseFloat(e.toFixed(2))}function o(e){for(var t=e.split("."),n=!1,o=0;o0)return c.default.createElement(w.default,s({},a,{options:t.schema.oneOf}));if("map"===o||n)return c.default.createElement(T.default,a);switch(o){case"number":return c.default.createElement(E.default,s({},a,u));case"int":return c.default.createElement(E.default,s({},a,u,{precision:0}));case"vec2":return c.default.createElement(k.default,a);case"vec3":return c.default.createElement(P.default,a);case"color":return c.default.createElement(v.default,a);case"boolean":return c.default.createElement(h.default,a);default:return c.default.createElement(g.default,a)}}},{key:"render",value:function(){var e=this.props,t="selector"===e.schema.type?e.entity.getDOMAttribute(e.componentname)[e.name]:JSON.stringify(e.data),n=e.name+"\n - type: "+e.schema.type+"\n - value: "+t,o=e.showHelp?(0,M.getComponentDocsHtmlLink)(e.name):"";return c.default.createElement("div",{className:"row"},c.default.createElement("label",{htmlFor:this.id,className:"text",title:n},e.name,o),this.getWidget(e.schema.type))}}]),t}(c.default.Component);A.propTypes={componentname:c.default.PropTypes.string.isRequired,id:c.default.PropTypes.string,name:c.default.PropTypes.string.isRequired,schema:c.default.PropTypes.object.isRequired},t.default=A},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nthis.props.max&&(e=this.props.max),this.setState({value:e,displayValue:e.toFixed(this.props.precision)}),this.props.onChange&&this.props.onChange(this.props.name,e))}},{key:"componentWillReceiveProps",value:function(e){e.value!==this.state.value&&this.setState({value:e.value,displayValue:e.value.toFixed(this.props.precision)})}},{key:"render",value:function(){return l.default.createElement("input",{ref:"input",className:"number",type:"text",value:this.state.displayValue,onKeyDown:this.onKeyDown,onChange:this.onChange,onMouseDown:this.onMouseDown,onFocus:this.onFocus,onBlur:this.onBlur})}}]),t}(l.default.Component);c.propTypes={componentname:l.default.PropTypes.string,entity:l.default.PropTypes.object,max:l.default.PropTypes.number,min:l.default.PropTypes.number,name:l.default.PropTypes.string,onChange:l.default.PropTypes.func,precision:l.default.PropTypes.number,step:l.default.PropTypes.number,value:l.default.PropTypes.number},c.defaultProps={min:-(1/0),max:1/0,value:0,precision:2,step:1},t.default=c},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1)return t[1]}return""}function u(e,t,n){var o=null;switch(e){case"img":o=document.createElement("img"),o.id=t,o.src=n}o&&document.getElementsByTagName("a-assets")[0].appendChild(o)}function l(e){var t=s(e),n=document.querySelector("a-assets > img[src='"+e+"']");if(n)t=n.id;else{if(isNaN(parseInt(t[0],10))||(t="i"+t),document.getElementById(t)){for(var o=1;document.getElementById(t+"_"+o);)o++;t+="_"+o}u("img",t,e)}return t}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n0){i.title=t;var n=i.width/e.width;a.drawImage(e,0,0,e.width*n,e.height*n)}else a.clearRect(0,0,i.width,i.height)}function n(e){var n=e.image;t(n)}function o(e){for(var t in h.default.sceneEl.systems.material.textureCache)if(JSON.parse(t).src===e)return h.default.sceneEl.systems.material.textureCache[t];return null}var r,i=this.refs.canvas,a=i.getContext("2d");r="#"===e[0]?e.length>1&&document.querySelector(e)&&document.querySelector(e).getAttribute("src"):AFRAME.utils.srcLoader.parseUrl(e);var s=o(e),u="hidden";if(s)s.then(n),u="#"===e[0]?"fa fa-link":"fa fa-external-link";else if(r){u="#"===e[0]?"fa fa-link":"fa fa-external-link";var l=new Image;l.addEventListener("load",function(){t(l)},!1),l.src=r}else a.clearRect(0,0,i.width,i.height);this.setState({value:e,valueType:u})}},{key:"render",value:function(){return d.default.createElement("span",{className:"texture"},d.default.createElement("span",{className:this.state.valueType}),d.default.createElement("canvas",{ref:"canvas",width:"32",height:"16",title:this.props.mapName}),d.default.createElement("input",{className:"map_value string",type:"text",value:this.state.value,onChange:this.onChange}),d.default.createElement("a",{onClick:this.removeMap,className:"button fa fa-times"}))}}]),t}(d.default.Component);v.propTypes={componentname:d.default.PropTypes.string,entity:d.default.PropTypes.object,mapName:d.default.PropTypes.string,name:d.default.PropTypes.string.isRequired,onChange:d.default.PropTypes.func,value:d.default.PropTypes.string},v.defaultProps={value:"",mapName:"nomap",dataURL:""},t.default=v},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{ -value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,p.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(t),target:this.target(t),text:this.text(t),trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return u("action",e)}},{key:"defaultTarget",value:function(e){var t=u("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return u("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),t}(c.default);e.exports=f})},function(e,t,n){var o,r,i;!function(a,s){r=[e,n(212)],o=s,i="function"==typeof o?o.apply(t,r):o,!(void 0!==i&&(e.exports=i))}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(t),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,n)),this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==("undefined"==typeof e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=s})},function(e,t){function n(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)e.focus(),e.setSelectionRange(0,e.value.length),t=e.value;else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(e),n.removeAllRanges(),n.addRange(o),t=n.toString()}return t}e.exports=n},function(e,t){function n(){}n.prototype={on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function o(){r.off(e,o),t.apply(n,arguments)}var r=this;return o._=t,this.on(e,o,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,r=n.length;for(o;o",n=c.default.createElement("div",null,c.default.createElement("a",{href:"#",title:"Copy entity HTML to clipboard","data-action":"copy-entity-to-clipboard",className:"button fa fa-clipboard",onClick:function(e){return e.stopPropagation()}}));return c.default.createElement(y.default,null,c.default.createElement("div",{className:"collapsible-header"},c.default.createElement("span",{className:"entity-name"},t),n),c.default.createElement("div",{className:"collapsible-content"},c.default.createElement("div",{className:"row"},c.default.createElement("span",{className:"text"},"ID"),c.default.createElement(p.InputWidget,{onChange:s,entity:e,name:"id",value:e.id})),this.renderCommonAttributes(),c.default.createElement(b.default,{entity:e})))}}]),t}(c.default.Component);_.propTypes={entity:c.default.PropTypes.object},t.default=_},function(e,t,n){"use strict";e.exports={BooleanWidget:n(200).default,ColorWidget:n(201).default,InputWidget:n(202).default,NumberWidget:n(203).default,SelectWidget:n(204).default,TextureWidget:n(205).default,Vec3Widget:n(206).default,Vec2Widget:n(207).default}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["visible","position","scale","rotation"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n'}();var l="   ".repeat(o),c=a.id?a.id:"<"+a.tagName.toLowerCase()+">",p=l+c+s;t.push({static:!0,value:a,html:p}),e(a,o)}}}}var t=[{static:!0,value:n.props.scene,html:"<a-scene>"}];e(n.props.scene),n.setState({options:t})},n.selectIndex=function(e){e>=0&&e-1||o.tagName.toUpperCase().indexOf(t)>-1}).map(function(t,n){var o="option"+(t.value===e.state.value?" active":""),r=l.default.createElement("a",{onClick:function(){return e.cloneEntity(t.value)},title:"Clone entity",className:"button fa fa-clone"}),i=l.default.createElement("a",{onClick:function(e){e.stopPropagation(),(0,d.removeEntity)(t.value)},title:"Remove entity", -className:"button fa fa-trash-o"});return"A-SCENE"===t.value.tagName&&(r="",i=""),l.default.createElement("div",{key:n,className:o,value:t.value,onClick:function(){return e.setValue(t.value)}},l.default.createElement("span",{dangerouslySetInnerHTML:{__html:t.html}}),l.default.createElement("span",{className:"icons"},r,i))})}},{key:"render",value:function(){return l.default.createElement("div",{className:"scenegraph"},l.default.createElement("div",{className:"scenegraph-toolbar"},l.default.createElement(h.default,null),l.default.createElement("div",{className:"search"},l.default.createElement("input",{placeholder:"Search...",value:this.state.filterText,onChange:this.onChangeFilter}),l.default.createElement("span",{className:"fa fa-search"}))),l.default.createElement("div",{className:"outliner",tabIndex:"0",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp},this.renderOptions()))}}]),t}(l.default.Component);g.propTypes={onChange:l.default.PropTypes.func,scene:l.default.PropTypes.object,value:l.default.PropTypes.string},g.defaultProps={value:"",index:-1},t.default=g},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n.Select-control .Select-value,.Select-placeholder,.Select-value-label{color:#1faaf2!important}.row .Select-control{font-size:11px;height:24px}.row .Select--single>.Select-control .Select-value,.row .Select-placeholder{line-height:19px}.row .Select-input{height:22px}.row input.number,.row input.string,.row input[type=number],.row input[type=text]{background:#222;border:1px solid transparent;color:#1faaf2;min-height:20px;padding-left:5px;padding-right:5px}.help-lists{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.help-list{list-style:none;margin:0;padding:0 0 10px;width:350px}.help-list li{margin-right:40px}.help-key-unit{line-height:1.8;margin-right:2em;padding:5px 0}.help-key{bottom:2px;margin-right:4px;min-width:60px;position:relative}.help-key span{background-color:#2e2e2e;background-repeat:repeat-x;border:1px solid #666;border-radius:3px;box-shadow:0 0 5px #000;color:#999;display:inline-block;font-size:12px;padding:0 8px;text-align:center}.help-key-def{color:#bbb;display:inline-block;margin-left:1em}.add-component{text-align:left}.add-component .option{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.add-component .option span{color:#1faaf2}.Select-menu-outer .is-focused span{color:#fff}.add-component-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#2b2b2b;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:10px}.aregistry-button{font-size:12px;margin-left:10px;padding:8px}.aregistry-button:hover{background-color:#1faaf2}.aregistry-button img{height:20px;width:20px}.components .row .color_value{margin:0 0 0 5px;width:68px}',""])},function(e,t){"use strict";!function(e,t,n,o,r,i,a){e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,i=t.createElement(n),a=t.getElementsByTagName(n)[0],i.async=1,i.src=o,a.parentNode.insertBefore(i,a)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),ga("create","UA-80530812-1","auto"),ga("send","pageview")}]); \ No newline at end of file +value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,p.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(t),target:this.target(t),text:this.text(t),trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return u("action",e)}},{key:"defaultTarget",value:function(e){var t=u("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return u("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),t}(c.default);e.exports=f})},function(e,t,n){var o,r,i;!function(a,s){r=[e,n(212)],o=s,i="function"==typeof o?o.apply(t,r):o,!(void 0!==i&&(e.exports=i))}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(t),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,n)),this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==("undefined"==typeof e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=s})},function(e,t){function n(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)e.focus(),e.setSelectionRange(0,e.value.length),t=e.value;else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(e),n.removeAllRanges(),n.addRange(o),t=n.toString()}return t}e.exports=n},function(e,t){function n(){}n.prototype={on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function o(){r.off(e,o),t.apply(n,arguments)}var r=this;return o._=t,this.on(e,o,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,r=n.length;for(o;o",n=c.default.createElement("div",null,c.default.createElement("a",{href:"#",title:"Copy entity HTML to clipboard","data-action":"copy-entity-to-clipboard",className:"button fa fa-clipboard",onClick:function(e){return e.stopPropagation()}}));return c.default.createElement(y.default,null,c.default.createElement("div",{className:"collapsible-header"},c.default.createElement("span",{className:"entity-name"},t),n),c.default.createElement("div",{className:"collapsible-content"},c.default.createElement("div",{className:"row"},c.default.createElement("span",{className:"text"},"ID"),c.default.createElement(p.InputWidget,{onChange:s,entity:e,name:"id",value:e.id})),this.renderCommonAttributes(),c.default.createElement(b.default,{entity:e})))}}]),t}(c.default.Component);_.propTypes={entity:c.default.PropTypes.object},t.default=_},function(e,t,n){"use strict";e.exports={BooleanWidget:n(200).default,ColorWidget:n(201).default,InputWidget:n(202).default,NumberWidget:n(203).default,SelectWidget:n(204).default,TextureWidget:n(205).default,Vec3Widget:n(206).default,Vec2Widget:n(207).default}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["visible","position","scale","rotation"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n'}();var l="   ".repeat(o),c=a.id?a.id:"<"+a.tagName.toLowerCase()+">",p=l+c+s;t.push({static:!0,value:a,html:p}),e(a,o)}}}}var t=[{static:!0,value:n.props.scene,html:"<a-scene>"}];e(n.props.scene),n.setState({options:t})},n.selectIndex=function(e){e>=0&&e-1||o.tagName.toUpperCase().indexOf(t)>-1}).map(function(t,n){var o="option"+(t.value===e.state.value?" active":""),r=l.default.createElement("a",{onClick:function(){return e.cloneEntity(t.value)},title:"Clone entity",className:"button fa fa-clone"}),i=l.default.createElement("a",{onClick:function(e){e.stopPropagation(),(0,d.removeEntity)(t.value)},title:"Remove entity", +className:"button fa fa-trash-o"});return"A-SCENE"===t.value.tagName&&(r="",i=""),l.default.createElement("div",{key:n,className:o,value:t.value,onClick:function(){return e.setValue(t.value)}},l.default.createElement("span",{dangerouslySetInnerHTML:{__html:t.html}}),l.default.createElement("span",{className:"icons"},r,i))})}},{key:"render",value:function(){return l.default.createElement("div",{className:"scenegraph"},l.default.createElement("div",{className:"scenegraph-toolbar"},l.default.createElement(h.default,null),l.default.createElement("div",{className:"search"},l.default.createElement("input",{placeholder:"Search...",value:this.state.filterText,onChange:this.onChangeFilter}),l.default.createElement("span",{className:"fa fa-search"}))),l.default.createElement("div",{className:"outliner",tabIndex:"0",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp},this.renderOptions()))}}]),t}(l.default.Component);g.propTypes={onChange:l.default.PropTypes.func,scene:l.default.PropTypes.object,value:l.default.PropTypes.string},g.defaultProps={value:"",index:-1},t.default=g},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n.Select-control .Select-value,.Select-placeholder,.Select-value-label{color:#1faaf2!important}.row .Select-control{font-size:11px;height:24px}.row .Select--single>.Select-control .Select-value,.row .Select-placeholder{line-height:19px}.row .Select-input{height:22px}.row input.number,.row input.string,.row input[type=number],.row input[type=text]{background:#222;border:1px solid transparent;color:#1faaf2;min-height:20px;padding-left:5px;padding-right:5px}.help-lists{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.help-list{list-style:none;margin:0;padding:0 0 10px;width:350px}.help-list li{margin-right:40px}.help-key-unit{line-height:1.8;margin-right:2em;padding:5px 0}.help-key{bottom:2px;margin-right:4px;min-width:60px;position:relative}.help-key span{background-color:#2e2e2e;background-repeat:repeat-x;border:1px solid #666;border-radius:3px;box-shadow:0 0 5px #000;color:#999;display:inline-block;font-size:12px;padding:0 8px;text-align:center}.help-key-def{color:#bbb;display:inline-block;margin-left:1em}.add-component{text-align:left}.add-component .option{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.add-component .option span{color:#1faaf2}.Select-menu-outer .is-focused span{color:#fff}.add-component-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#2b2b2b;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:10px}.aregistry-button{font-size:12px;margin-left:10px;padding:8px}.aregistry-button:hover{background-color:#1faaf2}.aregistry-button img{height:20px;width:20px}.components .row .color_value{margin:0 0 0 5px;width:68px}",""])},function(e,t){"use strict";!function(e,t,n,o,r,i,a){e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,i=t.createElement(n),a=t.getElementsByTagName(n)[0],i.async=1,i.src=o,a.parentNode.insertBefore(i,a)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),ga("create","UA-80530812-1","auto"),ga("send","pageview")}]); \ No newline at end of file