elements don't support innerText even when does.\n contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';\n }\n return contentKey;\n}\n\nmodule.exports = getTextContentAccessor;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getTextContentAccessor.js\n// module id = 86\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\n\nvar ReactCompositeComponent = require('./ReactCompositeComponent');\nvar ReactEmptyComponent = require('./ReactEmptyComponent');\nvar ReactHostComponent = require('./ReactHostComponent');\n\nvar getNextDebugID = require('./getNextDebugID');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n// To avoid a cyclic dependency, we create the final class in this module\nvar ReactCompositeComponentWrapper = function (element) {\n this.construct(element);\n};\n_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {\n _instantiateReactComponent: instantiateReactComponent\n});\n\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Check if the type reference is a known internal type. I.e. not a user\n * provided composite type.\n *\n * @param {function} type\n * @return {boolean} Returns true if this is a valid internal type.\n */\nfunction isInternalComponentType(type) {\n return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';\n}\n\n/**\n * Given a ReactNode, create an instance that will actually be mounted.\n *\n * @param {ReactNode} node\n * @param {boolean} shouldHaveDebugID\n * @return {object} A new instance of the element's constructor.\n * @protected\n */\nfunction instantiateReactComponent(node, shouldHaveDebugID) {\n var instance;\n\n if (node === null || node === false) {\n instance = ReactEmptyComponent.create(instantiateReactComponent);\n } else if (typeof node === 'object') {\n var element = node;\n var type = element.type;\n if (typeof type !== 'function' && typeof type !== 'string') {\n var info = '';\n if (process.env.NODE_ENV !== 'production') {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + 'it\\'s defined in.';\n }\n }\n info += getDeclarationErrorAddendum(element._owner);\n !false ? process.env.NODE_ENV !== '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;\n }\n\n // Special case string values\n if (typeof element.type === 'string') {\n instance = ReactHostComponent.createInternalComponent(element);\n } else if (isInternalComponentType(element.type)) {\n // This is temporarily available for custom components that are not string\n // representations. I.e. ART. Once those are updated to use the string\n // representation, we can drop this code path.\n instance = new element.type(element);\n\n // We renamed this. Allow the old name for compat. :(\n if (!instance.getHostNode) {\n instance.getHostNode = instance.getNativeNode;\n }\n } else {\n instance = new ReactCompositeComponentWrapper(element);\n }\n } else if (typeof node === 'string' || typeof node === 'number') {\n instance = ReactHostComponent.createInstanceForText(node);\n } else {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;\n }\n\n // These two fields are used by the DOM and ART diffing algorithms\n // respectively. Instead of using expandos on components, we should be\n // storing the state needed by the diffing algorithms elsewhere.\n instance._mountIndex = 0;\n instance._mountImage = null;\n\n if (process.env.NODE_ENV !== 'production') {\n instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;\n }\n\n // Internal instances should fully constructed at this point, so they should\n // not get any new fields added to them at this point.\n if (process.env.NODE_ENV !== 'production') {\n if (Object.preventExtensions) {\n Object.preventExtensions(instance);\n }\n }\n\n return instance;\n}\n\nmodule.exports = instantiateReactComponent;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/instantiateReactComponent.js\n// module id = 87\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\n\nvar supportedInputTypes = {\n 'color': true,\n 'date': true,\n 'datetime': true,\n 'datetime-local': true,\n 'email': true,\n 'month': true,\n 'number': true,\n 'password': true,\n 'range': true,\n 'search': true,\n 'tel': true,\n 'text': true,\n 'time': true,\n 'url': true,\n 'week': true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isTextInputElement;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/isTextInputElement.js\n// module id = 88\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar setInnerHTML = require('./setInnerHTML');\n\n/**\n * Set the textContent property of a node, ensuring that whitespace is preserved\n * even in IE8. innerText is a poor substitute for textContent and, among many\n * issues, inserts
instead of the literal newline chars. innerHTML behaves\n * as it should.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n};\n\nif (ExecutionEnvironment.canUseDOM) {\n if (!('textContent' in document.documentElement)) {\n setTextContent = function (node, text) {\n if (node.nodeType === 3) {\n node.nodeValue = text;\n return;\n }\n setInnerHTML(node, escapeTextContentForBrowser(text));\n };\n }\n}\n\nmodule.exports = setTextContent;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/setTextContent.js\n// module id = 89\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar REACT_ELEMENT_TYPE = require('./ReactElementSymbol');\n\nvar getIteratorFn = require('./getIteratorFn');\nvar invariant = require('fbjs/lib/invariant');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar warning = require('fbjs/lib/warning');\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * This is inlined from ReactElement since this file is shared between\n * isomorphic and renderers. We could extract this to a\n *\n */\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (component && typeof component === 'object' && component.key != null) {\n // Explicit key\n return KeyEscapeUtils.escape(component.key);\n }\n // Implicit key determined by the index in the set\n return index.toString(36);\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n if (children === null || type === 'string' || type === 'number' ||\n // The following is inlined from ReactElement. This means we can optimize\n // some checks. React Fiber also inlines this logic for similar purposes.\n type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {\n callback(traverseContext, children,\n // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n if (iteratorFn) {\n var iterator = iteratorFn.call(children);\n var step;\n if (iteratorFn !== children.entries) {\n var ii = 0;\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n var mapsAsChildrenAddendum = '';\n if (ReactCurrentOwner.current) {\n var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();\n if (mapsAsChildrenOwnerName) {\n mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';\n }\n }\n process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;\n didWarnAboutMaps = true;\n }\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n child = entry[1];\n nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n }\n }\n } else if (type === 'object') {\n var addendum = '';\n if (process.env.NODE_ENV !== 'production') {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';\n if (children._isReactElement) {\n addendum = ' It looks like you\\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';\n }\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n addendum += ' Check the render method of `' + name + '`.';\n }\n }\n }\n var childrenString = String(children);\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n\nmodule.exports = traverseAllChildren;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/traverseAllChildren.js\n// module id = 90\n// module chunks = 0","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\n// The Symbol used to tag the ReactElement type. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\n\nvar REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;\n\nmodule.exports = REACT_ELEMENT_TYPE;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactElementSymbol.js\n// module id = 91\n// module chunks = 0","/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\n\n'use strict';\n\nvar ReactCurrentOwner = require('./ReactCurrentOwner');\nvar ReactComponentTreeHook = require('./ReactComponentTreeHook');\nvar ReactElement = require('./ReactElement');\n\nvar checkReactTypeSpec = require('./checkReactTypeSpec');\n\nvar canDefineProperty = require('./canDefineProperty');\nvar getIteratorFn = require('./getIteratorFn');\nvar warning = require('fbjs/lib/warning');\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n if (parentName) {\n info = ' Check the top-level render call using <' + parentName + '>.';\n }\n }\n return info;\n}\n\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n element._store.validated = true;\n\n var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});\n\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n if (memoizer[currentComponentErrorInfo]) {\n return;\n }\n memoizer[currentComponentErrorInfo] = true;\n\n // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n var childOwner = '';\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = ' It was passed a child from ' + element._owner.getName() + '.';\n }\n\n process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique \"key\" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;\n}\n\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n if (ReactElement.isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (ReactElement.isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n // Entry iterators provide implicit keys.\n if (iteratorFn) {\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n while (!(step = iterator.next()).done) {\n if (ReactElement.isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\nfunction validatePropTypes(element) {\n var componentClass = element.type;\n if (typeof componentClass !== 'function') {\n return;\n }\n var name = componentClass.displayName || componentClass.name;\n if (componentClass.propTypes) {\n checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);\n }\n if (typeof componentClass.getDefaultProps === 'function') {\n process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;\n }\n}\n\nvar ReactElementValidator = {\n\n createElement: function (type, props, children) {\n var validType = typeof type === 'string' || typeof type === 'function';\n // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n if (!validType) {\n if (typeof type !== 'function' && typeof type !== 'string') {\n var info = '';\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + 'it\\'s defined in.';\n }\n info += getDeclarationErrorAddendum();\n process.env.NODE_ENV !== '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;\n }\n }\n\n var element = ReactElement.createElement.apply(this, arguments);\n\n // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n if (element == null) {\n return element;\n }\n\n // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n validatePropTypes(element);\n\n return element;\n },\n\n createFactory: function (type) {\n var validatedFactory = ReactElementValidator.createElement.bind(null, type);\n // Legacy hook TODO: Warn if this is accessed\n validatedFactory.type = type;\n\n if (process.env.NODE_ENV !== 'production') {\n if (canDefineProperty) {\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0;\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n }\n\n return validatedFactory;\n },\n\n cloneElement: function (element, props, children) {\n var newElement = ReactElement.cloneElement.apply(this, arguments);\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n validatePropTypes(newElement);\n return newElement;\n }\n\n};\n\nmodule.exports = ReactElementValidator;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactElementValidator.js\n// module id = 92\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactPropTypesSecret.js\n// module id = 93\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _LoggedOutView = require('./LoggedOutView.jsx');\n\nvar _LoggedOutView2 = _interopRequireDefault(_LoggedOutView);\n\nvar _LoggedInView = require('./LoggedInView.jsx');\n\nvar _LoggedInView2 = _interopRequireDefault(_LoggedInView);\n\nvar _client = require('../client');\n\nvar _client2 = _interopRequireDefault(_client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar App = function (_React$Component) {\n _inherits(App, _React$Component);\n\n function App() {\n _classCallCheck(this, App);\n\n var _this = _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).call(this));\n\n _this.state = {\n ready: false,\n loggedIn: false,\n user: {}\n };\n _this.didAuthenticate = _this.didAuthenticate.bind(_this);\n _client2.default.authenticate().then(function (user) {\n _this.setState({\n ready: true,\n loggedIn: true,\n user: user.data\n });\n }).catch(function (error) {\n _this.setState({ ready: true });\n if (!error.message.match(/stored JWT/)) {\n console.error(error);\n }\n });\n return _this;\n }\n\n _createClass(App, [{\n key: 'didAuthenticate',\n value: function didAuthenticate(user) {\n console.log(user);\n this.setState({\n user: user,\n loggedIn: true\n });\n }\n }, {\n key: 'logOut',\n value: function logOut() {\n this.setState({\n user: null,\n loggedIn: false\n });\n }\n }, {\n key: 'render',\n value: function render() {\n if (this.state.ready) {\n if (this.state.loggedIn) {\n return _react2.default.createElement(_LoggedInView2.default, { user: this.state.user });\n } else {\n return _react2.default.createElement(_LoggedOutView2.default, { didAuthenticate: this.didAuthenticate });\n }\n } else {\n return _react2.default.createElement(\n 'div',\n null,\n 'Loading...'\n );\n }\n }\n }]);\n\n return App;\n}(_react2.default.Component);\n\nexports.default = App;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components/App.jsx\n// module id = 94\n// module chunks = 0","'use strict';\n\nmodule.exports = require('./lib/ReactDOM');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/index.js\n// module id = 95\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ModalDialog = require('./ModalDialog.jsx');\n\nvar _ModalDialog2 = _interopRequireDefault(_ModalDialog);\n\nvar _Menu = require('./Menu.jsx');\n\nvar _Menu2 = _interopRequireDefault(_Menu);\n\nvar _UserList = require('./UserList.jsx');\n\nvar _UserList2 = _interopRequireDefault(_UserList);\n\nvar _MealList = require('./MealList.jsx');\n\nvar _MealList2 = _interopRequireDefault(_MealList);\n\nvar _client = require('../client');\n\nvar _client2 = _interopRequireDefault(_client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LoggedInView = function (_React$Component) {\n _inherits(LoggedInView, _React$Component);\n\n function LoggedInView(props) {\n _classCallCheck(this, LoggedInView);\n\n var _this = _possibleConstructorReturn(this, (LoggedInView.__proto__ || Object.getPrototypeOf(LoggedInView)).call(this));\n\n _this.state = {\n user: Object.assign({}, props.user),\n meals: [],\n mode: 'meals'\n };\n _this.updateUser = _this.updateUser.bind(_this);\n _this.updateMeals = _this.updateMeals.bind(_this);\n _this.toggleMode = _this.toggleMode.bind(_this);\n return _this;\n }\n\n _createClass(LoggedInView, [{\n key: 'toggleMode',\n value: function toggleMode() {\n this.setState({ mode: this.state.mode == 'meals' ? 'users' : 'meals' });\n }\n }, {\n key: 'updateUser',\n value: function updateUser(user) {\n this.setState({\n user: user,\n mode: 'meals'\n });\n }\n }, {\n key: 'updateMeals',\n value: function updateMeals(user) {\n this.setState({\n meals: meals\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var activity = null;\n if (this.state.mode == 'meals') {\n activity = _react2.default.createElement(_MealList2.default, { user: this.state.user,\n currentUser: this.props.user,\n onUpdate: this.updateMeals\n });\n } else {\n activity = _react2.default.createElement(_UserList2.default, { user: this.state.user,\n currentUser: this.props.user,\n updateUser: this.updateUser\n });\n }\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_Menu2.default, { mode: this.state.mode,\n user: this.state.user,\n toggleMode: this.toggleMode,\n currentUser: this.props.user,\n updateUser: this.updateUser }),\n activity\n );\n }\n }]);\n\n return LoggedInView;\n}(_react2.default.Component);\n\nexports.default = LoggedInView;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components/LoggedInView.jsx\n// module id = 96\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ModalDialog = require('./ModalDialog.jsx');\n\nvar _ModalDialog2 = _interopRequireDefault(_ModalDialog);\n\nvar _client = require('../client');\n\nvar _client2 = _interopRequireDefault(_client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LoggedOutView = function (_React$Component) {\n _inherits(LoggedOutView, _React$Component);\n\n function LoggedOutView() {\n _classCallCheck(this, LoggedOutView);\n\n var _this = _possibleConstructorReturn(this, (LoggedOutView.__proto__ || Object.getPrototypeOf(LoggedOutView)).call(this));\n\n _this.state = { modal: null };\n _this.showLogin = _this.showLogin.bind(_this);\n _this.showSignup = _this.showSignup.bind(_this);\n _this.closeModal = _this.closeModal.bind(_this);\n return _this;\n }\n\n _createClass(LoggedOutView, [{\n key: 'showLogin',\n value: function showLogin() {\n this.setState({ modal: 'login' });\n }\n }, {\n key: 'showSignup',\n value: function showSignup() {\n this.setState({ modal: 'signup' });\n }\n }, {\n key: 'closeModal',\n value: function closeModal() {\n this.setState({ modal: '' });\n }\n }, {\n key: 'render',\n value: function render() {\n if (this.state.modal == 'login') {\n return _react2.default.createElement(LoginForm, {\n visible: true,\n didAuthenticate: this.props.didAuthenticate,\n onClose: this.closeModal });\n } else if (this.state.modal == 'signup') {\n return _react2.default.createElement(SignupForm, {\n visible: true,\n didAuthenticate: this.props.didAuthenticate,\n onClose: this.closeModal });\n } else {\n return _react2.default.createElement(Welcome, {\n onLoginClick: this.showLogin,\n onSignupClick: this.showSignup });\n }\n }\n }]);\n\n return LoggedOutView;\n}(_react2.default.Component);\n\nexports.default = LoggedOutView;\n\nvar Welcome = function (_React$Component2) {\n _inherits(Welcome, _React$Component2);\n\n function Welcome() {\n _classCallCheck(this, Welcome);\n\n return _possibleConstructorReturn(this, (Welcome.__proto__ || Object.getPrototypeOf(Welcome)).apply(this, arguments));\n }\n\n _createClass(Welcome, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'welcome inner' },\n _react2.default.createElement(\n 'h1',\n null,\n 'Calorie Counter'\n ),\n _react2.default.createElement(\n 'button',\n { onClick: this.props.onLoginClick },\n 'Log In'\n ),\n _react2.default.createElement(\n 'button',\n { onClick: this.props.onSignupClick },\n 'Sign Up'\n )\n );\n }\n }]);\n\n return Welcome;\n}(_react2.default.Component);\n\nvar LoginForm = function (_React$Component3) {\n _inherits(LoginForm, _React$Component3);\n\n function LoginForm() {\n _classCallCheck(this, LoginForm);\n\n var _this3 = _possibleConstructorReturn(this, (LoginForm.__proto__ || Object.getPrototypeOf(LoginForm)).call(this));\n\n _this3.state = {\n email: '',\n password: '',\n error: null\n };\n _this3.updateState = _this3.updateState.bind(_this3);\n _this3.handleSubmit = _this3.handleSubmit.bind(_this3);\n return _this3;\n }\n\n _createClass(LoginForm, [{\n key: 'updateState',\n value: function updateState(event) {\n var _setState;\n\n var name = event.target.name;\n var value = event.target.value;\n this.setState((_setState = {}, _defineProperty(_setState, name, value), _defineProperty(_setState, 'error', null), _setState));\n }\n }, {\n key: 'handleSubmit',\n value: function handleSubmit(event) {\n var _this4 = this;\n\n event.preventDefault();\n _client2.default.authenticate({\n type: 'local',\n email: this.state.email,\n password: this.state.password\n }).then(function (res) {\n console.log('Authenticated!', res);\n _this4.props.didAuthenticate(res.data);\n }).catch(function (error) {\n console.error('Error authenticating!', error);\n _this4.setState({\n error: error.toString()\n });\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n _ModalDialog2.default,\n { visible: this.props.visible, onClose: this.props.onClose },\n _react2.default.createElement(\n 'form',\n { onSubmit: this.handleSubmit },\n _react2.default.createElement('input', { type: 'email',\n name: 'email',\n autoFocus: true,\n placeholder: 'Email address',\n onChange: this.updateState\n }),\n _react2.default.createElement('br', null),\n _react2.default.createElement('input', { type: 'password',\n name: 'password',\n placeholder: 'Password',\n onChange: this.updateState\n }),\n _react2.default.createElement('br', null),\n _react2.default.createElement('input', { type: 'submit',\n value: 'Log In'\n }),\n _react2.default.createElement(\n 'div',\n { className: 'error' },\n this.state.error\n )\n )\n );\n }\n }]);\n\n return LoginForm;\n}(_react2.default.Component);\n\nvar SignupForm = function (_React$Component4) {\n _inherits(SignupForm, _React$Component4);\n\n function SignupForm() {\n _classCallCheck(this, SignupForm);\n\n var _this5 = _possibleConstructorReturn(this, (SignupForm.__proto__ || Object.getPrototypeOf(SignupForm)).call(this));\n\n _this5.state = {\n email: '',\n password: '',\n goal: 0,\n error: null\n };\n _this5.updateState = _this5.updateState.bind(_this5);\n _this5.handleSubmit = _this5.handleSubmit.bind(_this5);\n return _this5;\n }\n\n _createClass(SignupForm, [{\n key: 'updateState',\n value: function updateState(event) {\n var _setState2;\n\n var name = event.target.name;\n var value = event.target.value;\n this.setState((_setState2 = {}, _defineProperty(_setState2, name, value), _defineProperty(_setState2, 'error', null), _setState2));\n }\n }, {\n key: 'handleSubmit',\n value: function handleSubmit(event) {\n var _this6 = this;\n\n event.preventDefault();\n var usersService = _client2.default.service('users');\n usersService.create(this.state).then(function (result) {\n console.log(result);\n return _client2.default.authenticate({\n type: 'local',\n email: _this6.state.email,\n password: _this6.state.password\n });\n }).then(function (res) {\n console.log('Authenticated!', res);\n _this6.props.didAuthenticate(res.data);\n }).catch(function (error) {\n console.error('Error authenticating!', error);\n _this6.setState({\n error: error.toString()\n });\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n _ModalDialog2.default,\n { visible: this.props.visible, onClose: this.props.onClose },\n _react2.default.createElement(\n 'form',\n { onSubmit: this.handleSubmit },\n _react2.default.createElement('input', { type: 'email',\n name: 'email',\n autoFocus: true,\n placeholder: 'Email address',\n onChange: this.updateState\n }),\n _react2.default.createElement('br', null),\n _react2.default.createElement('input', { type: 'password',\n name: 'password',\n placeholder: 'Password',\n onChange: this.updateState\n }),\n _react2.default.createElement('br', null),\n _react2.default.createElement('input', { type: 'number',\n name: 'goal',\n min: '0',\n max: '100000',\n placeholder: 'Goal',\n onChange: this.updateState\n }),\n _react2.default.createElement('br', null),\n _react2.default.createElement('input', { type: 'submit',\n value: 'Sign Up'\n }),\n _react2.default.createElement(\n 'div',\n { className: 'error' },\n this.state.error\n )\n )\n );\n }\n }]);\n\n return SignupForm;\n}(_react2.default.Component);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components/LoggedOutView.jsx\n// module id = 97\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDateRange = require('react-date-range');\n\nvar _moment = require('moment');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _client = require('../client');\n\nvar _client2 = _interopRequireDefault(_client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar MealFilter = function (_React$Component) {\n _inherits(MealFilter, _React$Component);\n\n function MealFilter() {\n _classCallCheck(this, MealFilter);\n\n var _this = _possibleConstructorReturn(this, (MealFilter.__proto__ || Object.getPrototypeOf(MealFilter)).call(this));\n\n var start = new Date();\n start.setHours(0);\n start.setMinutes(0);\n start.setSeconds(0);\n start.setDate(start.getDate() - 6);\n\n var end = new Date();\n end.setHours(23);\n end.setMinutes(59);\n end.setSeconds(59);\n\n _this.state = {\n startDate: (0, _moment2.default)(start),\n endDate: (0, _moment2.default)(end),\n startTime: 0,\n endTime: 23,\n meals: []\n };\n _this.handleSelect = _this.handleSelect.bind(_this);\n _this.fetch = _this.fetch.bind(_this);\n _this.filter = _this.filter.bind(_this);\n return _this;\n }\n\n _createClass(MealFilter, [{\n key: 'fetch',\n value: function fetch(state) {\n var _this2 = this;\n\n state = state || this.state;\n var start = state.startDate;\n var end = state.endDate;\n\n _client2.default.service('meals').find({\n query: {\n userid: this.props.user.id,\n date: { $gte: start.toDate(), $lte: end.toDate() },\n $sort: { 'date': '-1' },\n token: _client2.default.get('token')\n }\n }).then(function (data) {\n _this2.setState({ meals: data.data });\n _this2.filter(data.data);\n }).catch(function (error) {\n console.error(error);\n });\n }\n }, {\n key: 'filter',\n value: function filter(meals, state) {\n meals = meals || this.state.meals;\n state = state || this.state;\n var start = state.startTime;\n var end = state.endTime;\n var filteredMeals = this.state.meals.filter(function (meal) {\n var hours = new Date(meal.date).getHours();\n return start <= hours && hours <= end;\n });\n this.props.onChange(filteredMeals);\n }\n }, {\n key: 'handleSelect',\n value: function handleSelect(range) {\n var start = range.startDate;\n start.hours(0);\n start.minutes(0);\n start.seconds(0);\n\n var end = start.isSame(range.endDate) ? start.clone() : range.endDate;\n end.hours(23);\n end.minutes(59);\n end.seconds(59);\n\n this.setState({\n startDate: start,\n endDate: end\n });\n this.fetch({\n startDate: start,\n endDate: end\n });\n }\n }, {\n key: 'pickTimeRange',\n value: function pickTimeRange(event, start, end) {\n this.setState({ startTime: start, endTime: end });\n this.filter(this.state.meals, { startTime: start, endTime: end });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var times = [[0, 11, 'Breakfast'], [12, 15, 'Lunch'], [16, 23, 'Dinner'], [0, 23, 'All']].map(function (r, i) {\n var start = r[0];\n var end = r[1];\n var name = r[2];\n var className = '';\n if (_this3.state.startTime === start && _this3.state.endTime === end) {\n className = 'selected';\n }\n return _react2.default.createElement(\n 'button',\n {\n key: i,\n className: className,\n onClick: function onClick(e) {\n _this3.pickTimeRange(e, start, end);\n } },\n name\n );\n });\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_reactDateRange.DateRange, {\n onInit: this.handleSelect,\n onChange: this.handleSelect,\n startDate: this.state.startDate,\n endDate: this.state.endDate\n }),\n times\n );\n }\n }]);\n\n return MealFilter;\n}(_react2.default.Component);\n\nexports.default = MealFilter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components/MealFilter.jsx\n// module id = 98\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _MealFilter = require('./MealFilter.jsx');\n\nvar _MealFilter2 = _interopRequireDefault(_MealFilter);\n\nvar _client = require('../client');\n\nvar _client2 = _interopRequireDefault(_client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar MealList = function (_React$Component) {\n _inherits(MealList, _React$Component);\n\n function MealList(props) {\n _classCallCheck(this, MealList);\n\n var _this = _possibleConstructorReturn(this, (MealList.__proto__ || Object.getPrototypeOf(MealList)).call(this));\n\n _this.state = {\n total: 0,\n limit: 0,\n skip: 0,\n data: []\n };\n\n _this.handleCreate = _this.handleCreate.bind(_this);\n _this.handleUpdate = _this.handleUpdate.bind(_this);\n _this.handleDelete = _this.handleDelete.bind(_this);\n _this.pickMeal = _this.pickMeal.bind(_this);\n _this.loadMeals = _this.loadMeals.bind(_this);\n return _this;\n }\n\n _createClass(MealList, [{\n key: 'handleCreate',\n value: function handleCreate(meal) {\n var meals = this.state.data.slice();\n meals.unshift(meal);\n this.setState({\n data: meals.sort(sortByDate)\n });\n }\n }, {\n key: 'handleUpdate',\n value: function handleUpdate(meal) {\n var meals = this.state.data.map(function (data) {\n return data.id === meal.id ? meal : data;\n }).sort(sortByDate);\n this.setState({\n data: meals\n });\n }\n }, {\n key: 'handleDelete',\n value: function handleDelete(mealid) {\n var meals = this.state.data.filter(function (data) {\n return data.id !== mealid;\n }).sort(sortByDate);\n this.setState({\n data: meals\n });\n }\n }, {\n key: 'pickMeal',\n value: function pickMeal(meal) {\n this.mealForm.pick(meal);\n }\n }, {\n key: 'loadMeals',\n value: function loadMeals(meals) {\n this.setState({ data: meals });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var canEdit = canEditUserMeals(this.props.currentUser, this.props.user);\n var groups = groupByDate(this.state.data);\n var items = Object.keys(groups).sort().reverse().map(function (date) {\n var group = groups[date];\n var mealitems = group.meals.map(function (meal) {\n return _react2.default.createElement(MealItem, {\n key: meal.id,\n meal: meal,\n canEdit: canEdit,\n onClick: _this2.pickMeal,\n onDelete: _this2.handleDelete });\n });\n var isOverLimit = group.calories > _this2.props.user.goal ? 'isOverLimit' : 'isUnderLimit';\n return _react2.default.createElement(\n 'div',\n { key: group.date, className: 'group' },\n _react2.default.createElement(\n 'span',\n { className: 'groupDate' },\n group.date\n ),\n _react2.default.createElement(\n 'span',\n { className: 'calories ' + isOverLimit },\n group.calories,\n ' cal'\n ),\n _react2.default.createElement('br', null),\n mealitems\n );\n });\n if (!items.length) {\n items.push(_react2.default.createElement(\n 'div',\n { className: 'quiet', key: 'nomeals' },\n 'No meals found'\n ));\n }\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(MealForm, { user: this.props.user,\n currentUser: this.props.currentUser,\n ref: function ref(mealForm) {\n _this2.mealForm = mealForm;\n },\n onCreate: function onCreate(meal) {\n _this2.handleCreate(meal);\n },\n onUpdate: function onUpdate(meal) {\n _this2.handleUpdate(meal);\n }\n }),\n _react2.default.createElement(_MealFilter2.default, { user: this.props.user,\n ref: function ref(mealFilter) {\n _this2.mealFilter = mealFilter;\n },\n onChange: this.loadMeals\n }),\n _react2.default.createElement(\n 'div',\n null,\n items\n )\n );\n }\n }]);\n\n return MealList;\n}(_react2.default.Component);\n\nexports.default = MealList;\n\nvar MealItem = function (_React$Component2) {\n _inherits(MealItem, _React$Component2);\n\n function MealItem() {\n _classCallCheck(this, MealItem);\n\n var _this3 = _possibleConstructorReturn(this, (MealItem.__proto__ || Object.getPrototypeOf(MealItem)).call(this));\n\n _this3.handleClick = _this3.handleClick.bind(_this3);\n _this3.remove = _this3.remove.bind(_this3);\n return _this3;\n }\n\n _createClass(MealItem, [{\n key: 'handleClick',\n value: function handleClick() {\n if (this.props.canEdit) {\n this.props.onClick(this.props.meal);\n }\n }\n }, {\n key: 'remove',\n value: function remove(e) {\n var _this4 = this;\n\n e.stopPropagation();\n var mealid = this.props.meal.id;\n var mealsService = _client2.default.service('meals');\n var params = { query: { token: _client2.default.get('token') } };\n mealsService.remove(mealid, params).then(function (result) {\n _this4.props.onDelete(mealid);\n }).catch(function (error) {\n console.error(error);\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var meal = this.props.meal;\n // const canEdit = this.props.meal.userid === this.props.currentUser.id ? 'canEdit' : ''\n var canEdit = this.props.canEdit ? 'canEdit' : '';\n var date = parseDate(meal.date);\n var time = parseTime(meal.date);\n return _react2.default.createElement(\n 'div',\n { className: 'meal row ' + canEdit, onClick: this.handleClick },\n _react2.default.createElement(\n 'div',\n { className: 'name' },\n meal.name\n ),\n _react2.default.createElement(\n 'div',\n { className: 'calories' },\n meal.calories,\n ' cal'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'date' },\n date\n ),\n _react2.default.createElement(\n 'div',\n { className: 'time' },\n time\n ),\n _react2.default.createElement(\n 'div',\n { className: 'remove', onClick: this.remove },\n 'x'\n )\n );\n }\n }]);\n\n return MealItem;\n}(_react2.default.Component);\n\nvar MealForm = function (_React$Component3) {\n _inherits(MealForm, _React$Component3);\n\n function MealForm(props) {\n _classCallCheck(this, MealForm);\n\n var _this5 = _possibleConstructorReturn(this, (MealForm.__proto__ || Object.getPrototypeOf(MealForm)).call(this));\n\n _this5.state = {\n id: '',\n userid: props.user.id,\n name: '',\n calories: '',\n date: new Date()\n };\n _this5.updateState = _this5.updateState.bind(_this5);\n _this5.handleSubmit = _this5.handleSubmit.bind(_this5);\n return _this5;\n }\n\n _createClass(MealForm, [{\n key: 'reset',\n value: function reset() {\n this.setState({\n id: '',\n name: '',\n calories: '',\n date: new Date()\n });\n }\n }, {\n key: 'pick',\n value: function pick(meal) {\n this.setState(meal);\n }\n }, {\n key: 'updateState',\n value: function updateState(event) {\n var _setState;\n\n var name = event.target.name;\n var value = event.target.value;\n if (name === 'date') {\n value = new Date(value + 'T' + this.state.date.split(\"T\")[1]).toString();\n } else if (name === 'time') {\n value = new Date(this.state.date.split(\"T\")[0] + value).toString();\n } else if (name === 'calories') {\n value = parseInt(value);\n }\n this.setState((_setState = {}, _defineProperty(_setState, name, value), _defineProperty(_setState, 'error', null), _setState));\n }\n }, {\n key: 'handleSubmit',\n value: function handleSubmit(event) {\n event.preventDefault();\n\n var id = this.state.id;\n\n if (!id) {\n this.create();\n } else {\n this.update();\n }\n }\n }, {\n key: 'create',\n value: function create() {\n var _this6 = this;\n\n var mealsService = _client2.default.service('meals');\n var params = { query: { token: _client2.default.get('token') } };\n\n mealsService.create(this.state, params).then(function (result) {\n _this6.props.onCreate(result);\n _this6.reset();\n }).catch(function (error) {\n console.error(error);\n _this6.setState({\n error: error.toString()\n });\n });\n }\n }, {\n key: 'update',\n value: function update() {\n var _this7 = this;\n\n var mealsService = _client2.default.service('meals');\n var params = { query: { token: _client2.default.get('token') } };\n\n mealsService.update(this.state.id, this.state, params).then(function (result) {\n _this7.props.onUpdate(result);\n _this7.reset();\n }).catch(function (error) {\n console.error(error);\n _this7.setState({\n error: error.toString()\n });\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this8 = this;\n\n var id = this.state.id;\n var action = id ? 'update' : 'create';\n var canEdit = canEditUserMeals(this.props.currentUser, this.props.user);\n if (!canEdit) {\n return _react2.default.createElement('div', null);\n }\n\n var date = parseDate(this.state.date);\n var time = parseTime(this.state.date);\n return _react2.default.createElement(\n 'form',\n { onSubmit: this.handleSubmit, className: action },\n _react2.default.createElement('input', { type: 'hidden', name: 'id', value: this.state.id, readOnly: true }),\n _react2.default.createElement('input', { type: 'hidden', name: 'userid', value: this.state.userid, readOnly: true }),\n _react2.default.createElement('input', { type: 'text', name: 'name', placeholder: 'Name', value: this.state.name, required: true, onChange: this.updateState }),\n _react2.default.createElement('input', { type: 'number', name: 'calories', placeholder: 'Calories', value: this.state.calories, required: true, onChange: this.updateState, min: '0', max: '10000' }),\n _react2.default.createElement('input', { type: 'date', name: 'date', placeholder: 'Date', value: date, required: true, onChange: this.updateState }),\n _react2.default.createElement('input', { type: 'time', name: 'time', placeholder: 'Time', value: time, required: true, onChange: this.updateState, step: '60' }),\n _react2.default.createElement('input', { type: 'submit', value: capitalize(action) }),\n _react2.default.createElement(\n 'span',\n { className: 'clear', onClick: function onClick() {\n return _this8.reset();\n } },\n 'cancel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'error' },\n this.state.error\n )\n );\n }\n }]);\n\n return MealForm;\n}(_react2.default.Component);\n\nfunction canEditUserMeals(currentUser, user) {\n var isValidRole = currentUser.role === 'admin';\n return user.id == currentUser.id || isValidRole;\n}\n\nfunction groupByDate(a) {\n return a.reduce(function (rv, x) {\n var date = parseDate(x.date);\n var ab = rv[date] = rv[date] || { date: date, calories: 0, meals: [] };\n ab.meals.push(x);\n ab.calories += x.calories;\n return rv;\n }, {});\n}\n\nfunction sortByDate(a, b) {\n return new Date(b.date) - new Date(a.date);\n}\n\nfunction parseDate(d) {\n return new Date(d).toISOString().substr(0, 10);\n}\n\nfunction parseTime(d) {\n return new Date(d).toISOString().substr(11, 5);\n}\n\nfunction capitalize(s) {\n s = s || '';\n return (s[0] || '').toUpperCase() + s.substr(1);\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components/MealList.jsx\n// module id = 99\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _client = require('../client');\n\nvar _client2 = _interopRequireDefault(_client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar UserList = function (_React$Component) {\n _inherits(UserList, _React$Component);\n\n function UserList(props) {\n _classCallCheck(this, UserList);\n\n var _this = _possibleConstructorReturn(this, (UserList.__proto__ || Object.getPrototypeOf(UserList)).call(this));\n\n console.log(\"USER\");\n _this.state = {\n data: []\n };\n _client2.default.service('users').find({\n query: {\n '$sort': { 'email': '1' },\n token: _client2.default.get('token')\n }\n }).then(function (data) {\n _this.setState(data);\n }).catch(function (error) {\n console.error(error);\n });\n _this.pick.bind(_this);\n _this.handleDelete.bind(_this);\n return _this;\n }\n\n _createClass(UserList, [{\n key: 'pick',\n value: function pick(user) {\n // bubble this up..\n console.log(user);\n console.log(this);\n this.props.updateUser(user);\n }\n }, {\n key: 'handleDelete',\n value: function handleDelete(userid) {\n var users = this.state.data.filter(function (data) {\n return data.id !== userid;\n });\n this.setState({\n data: users\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n console.log(this.state.data);\n var items = this.state.data.map(function (user, i) {\n return _react2.default.createElement(UserItem, { key: user.id,\n user: user,\n activeUser: _this2.props.user,\n onClick: function onClick(user) {\n return _this2.pick(user);\n },\n onDelete: function onDelete(userid) {\n return _this2.handleDelete(userid);\n } });\n });\n return _react2.default.createElement(\n 'div',\n null,\n items\n );\n }\n }]);\n\n return UserList;\n}(_react2.default.Component);\n\nexports.default = UserList;\n\nvar UserItem = function (_React$Component2) {\n _inherits(UserItem, _React$Component2);\n\n function UserItem() {\n _classCallCheck(this, UserItem);\n\n var _this3 = _possibleConstructorReturn(this, (UserItem.__proto__ || Object.getPrototypeOf(UserItem)).call(this));\n\n _this3.remove = _this3.remove.bind(_this3);\n return _this3;\n }\n\n _createClass(UserItem, [{\n key: 'remove',\n value: function remove(e) {\n var _this4 = this;\n\n e.stopPropagation();\n var userid = this.props.user.id;\n var usersService = _client2.default.service('users');\n var params = { query: { token: _client2.default.get('token') } };\n usersService.remove(userid, params).then(function (result) {\n _this4.props.onDelete(userid);\n }).catch(function (error) {\n console.error(error);\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this5 = this;\n\n var user = this.props.user;\n // const canEdit = this.props.user.userid === this.props.currentUser.id ? 'canEdit' : ''\n var userClass = this.props.user.id == this.props.activeUser.id ? 'active' : '';\n var canEdit = 'canEdit';\n var date = parseDate(user.updatedAt);\n var time = parseTime(user.updatedAt);\n return _react2.default.createElement(\n 'div',\n { className: 'user row ' + canEdit, onClick: function onClick() {\n return _this5.props.onClick(_this5.props.user);\n } },\n _react2.default.createElement(\n 'div',\n { className: 'email ' + userClass },\n user.email\n ),\n _react2.default.createElement(\n 'div',\n { className: 'calories' },\n user.goal,\n ' cal'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'role ' + user.role },\n user.role\n ),\n _react2.default.createElement(\n 'div',\n { className: 'date' },\n date\n ),\n _react2.default.createElement(\n 'div',\n { className: 'time' },\n time\n ),\n _react2.default.createElement(\n 'div',\n { className: 'remove', onClick: this.remove },\n 'x'\n )\n );\n }\n }]);\n\n return UserItem;\n}(_react2.default.Component);\n\nfunction parseDate(d) {\n return new Date(d).toISOString().substr(0, 10);\n}\n\nfunction parseTime(d) {\n return new Date(d).toISOString().substr(11, 5);\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components/UserList.jsx\n// module id = 100\n// module chunks = 0","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n var args = [].slice.call(arguments, 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/component-emitter/index.js\n// module id = 101\n// module chunks = 0","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (namespaces || '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/debug/src/debug.js\n// module id = 102\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar _hyphenPattern = /-(.)/g;\n\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize('background-color')\n * < \"backgroundColor\"\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nmodule.exports = camelize;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/camelize.js\n// module id = 103\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n'use strict';\n\nvar camelize = require('./camelize');\n\nvar msPattern = /^-ms-/;\n\n/**\n * Camelcases a hyphenated CSS property name, for example:\n *\n * > camelizeStyleName('background-color')\n * < \"backgroundColor\"\n * > camelizeStyleName('-moz-transition')\n * < \"MozTransition\"\n * > camelizeStyleName('-ms-transition')\n * < \"msTransition\"\n *\n * As Andi Smith suggests\n * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n * is converted to lowercase `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelizeStyleName(string) {\n return camelize(string.replace(msPattern, 'ms-'));\n}\n\nmodule.exports = camelizeStyleName;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/camelizeStyleName.js\n// module id = 104\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nvar isTextNode = require('./isTextNode');\n\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nmodule.exports = containsNode;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/containsNode.js\n// module id = 105\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar invariant = require('./invariant');\n\n/**\n * Convert array-like objects to arrays.\n *\n * This API assumes the caller knows the contents of the data type. For less\n * well defined inputs use createArrayFromMixed.\n *\n * @param {object|function|filelist} obj\n * @return {array}\n */\nfunction toArray(obj) {\n var length = obj.length;\n\n // Some browsers builtin objects can report typeof 'function' (e.g. NodeList\n // in old versions of Safari).\n !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;\n\n !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;\n\n !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;\n\n !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;\n\n // Old IE doesn't give collections access to hasOwnProperty. Assume inputs\n // without method will throw during the slice call and skip straight to the\n // fallback.\n if (obj.hasOwnProperty) {\n try {\n return Array.prototype.slice.call(obj);\n } catch (e) {\n // IE < 9 does not support Array#slice on collections objects\n }\n }\n\n // Fall back to copying key by key. This assumes all keys have a value,\n // so will not preserve sparsely populated inputs.\n var ret = Array(length);\n for (var ii = 0; ii < length; ii++) {\n ret[ii] = obj[ii];\n }\n return ret;\n}\n\n/**\n * Perform a heuristic test to determine if an object is \"array-like\".\n *\n * A monk asked Joshu, a Zen master, \"Has a dog Buddha nature?\"\n * Joshu replied: \"Mu.\"\n *\n * This function determines if its argument has \"array nature\": it returns\n * true if the argument is an actual array, an `arguments' object, or an\n * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).\n *\n * It will return false for other array-like objects like Filelist.\n *\n * @param {*} obj\n * @return {boolean}\n */\nfunction hasArrayNature(obj) {\n return (\n // not null/false\n !!obj && (\n // arrays are objects, NodeLists are functions in Safari\n typeof obj == 'object' || typeof obj == 'function') &&\n // quacks like an array\n 'length' in obj &&\n // not window\n !('setInterval' in obj) &&\n // no DOM node should be considered an array-like\n // a 'select' element has 'length' and 'item' properties on IE8\n typeof obj.nodeType != 'number' && (\n // a real array\n Array.isArray(obj) ||\n // arguments\n 'callee' in obj ||\n // HTMLCollection/NodeList\n 'item' in obj)\n );\n}\n\n/**\n * Ensure that the argument is an array by wrapping it in an array if it is not.\n * Creates a copy of the argument if it is already an array.\n *\n * This is mostly useful idiomatically:\n *\n * var createArrayFromMixed = require('createArrayFromMixed');\n *\n * function takesOneOrMoreThings(things) {\n * things = createArrayFromMixed(things);\n * ...\n * }\n *\n * This allows you to treat `things' as an array, but accept scalars in the API.\n *\n * If you need to convert an array-like object, like `arguments`, into an array\n * use toArray instead.\n *\n * @param {*} obj\n * @return {array}\n */\nfunction createArrayFromMixed(obj) {\n if (!hasArrayNature(obj)) {\n return [obj];\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else {\n return toArray(obj);\n }\n}\n\nmodule.exports = createArrayFromMixed;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/createArrayFromMixed.js\n// module id = 106\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n/*eslint-disable fb-www/unsafe-html*/\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar createArrayFromMixed = require('./createArrayFromMixed');\nvar getMarkupWrap = require('./getMarkupWrap');\nvar invariant = require('./invariant');\n\n/**\n * Dummy container used to render all markup.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Pattern used by `getNodeName`.\n */\nvar nodeNamePattern = /^\\s*<(\\w+)/;\n\n/**\n * Extracts the `nodeName` of the first element in a string of markup.\n *\n * @param {string} markup String of markup.\n * @return {?string} Node name of the supplied markup.\n */\nfunction getNodeName(markup) {\n var nodeNameMatch = markup.match(nodeNamePattern);\n return nodeNameMatch && nodeNameMatch[1].toLowerCase();\n}\n\n/**\n * Creates an array containing the nodes rendered from the supplied markup. The\n * optionally supplied `handleScript` function will be invoked once for each\n *