diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..5171c54
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,2 @@
+node_modules
+npm-debug.log
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7280636
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+node_modules
+.idea
+DB_Sto*
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..7ce26f1
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,14 @@
+FROM node:boron
+RUN mkdir -p /usr/src/app
+WORKDIR /usr/src/app
+
+RUN npm install webpack -g
+
+COPY package.json /usr/src/app/
+RUN npm install
+
+COPY . /usr/src/app
+
+EXPOSE 3000
+
+CMD [ "npm", "start" ]
\ No newline at end of file
diff --git a/README.md b/README.md
index d07a1eb..9086506 100644
--- a/README.md
+++ b/README.md
@@ -1,51 +1,2 @@
-## Coding Challenge
-
-In order to be considered for this position, you must complete the following steps.
-
-*Note: This task should take no longer than 1-2 hours at the most.*
-
-
-### Prerequisites
-
-- Please note that this will require some basic knowledge and/or the ability to learn of the following:
- - [JavaScript](http://www.codecademy.com/tracks/javascript)
- - [ExpressJS](http://expressjs.com/)
- - [ReactJS](https://facebook.github.io/react/)
- - [WebpackJS](https://webpack.js.org/)
- - [ES6](http://es6-features.org/)
- - Git
- - [Docker](http://www.docker.com/)
-
-- You will need to have the following installed to complete this task
- - [NodeJS](http://www.nodejs.org/)
- - [Docker](http://www.docker.com/)
-
-## Task
-
-1. Fork this repository
-2. Create a *source* folder to contain your code.
-3. In the *source* directory, please create an WebpackJS/ExpressJS/ReactJS/ES6 app that accomplishes the following:
- - Connect to the [Github API](http://developer.github.com/)
- - Find the [nodejs/node](https://github.com/nodejs/node) repository
- - Find the most recent commits (choose at least 25 or more of the commits)
- - Create a route that displays the recent commits by author.
- - If the commit hash ends in a number, color that row to light blue (#E6F1F6).
-4. Dockerize your application by writing a docker.yml file and test it by running the container locally.
-5. Commit and Push your code to your new repository
-6. Send us a pull request, we will review your code and get back to you
-
-### Tests
-
-Create the following unit tests with the testing framework of your choice:
-
- 1. Verify that rows ending in a number are colored light blue.
-
-## Once Complete
-1. Commit and Push your code to your new repository
-2. Send us a pull request, we will review your code and get back to you
-
-### Notes
-- When building the react application, you are free to use any type of css/html library if you choose to
-- You are free to write and modularize code any way you like just as long as you follow the requirements
-- 4 spaces for indentation! No tabs!
-- If you don't know how to do something, Google is your friend!
\ No newline at end of file
+RUN:
+ docker-compose up
\ No newline at end of file
diff --git a/app.js b/app.js
new file mode 100644
index 0000000..93afeca
--- /dev/null
+++ b/app.js
@@ -0,0 +1,43 @@
+var express = require('express');
+var path = require('path');
+var favicon = require('serve-favicon');
+var logger = require('morgan');
+var cookieParser = require('cookie-parser');
+var bodyParser = require('body-parser');
+
+var index = require('./routes/index');
+var commits = require('./routes/commits');
+
+var app = express();
+
+// view engine setup
+app.set('views', path.join(__dirname, 'views'));
+app.set('view engine', 'jade');
+
+// uncomment after placing your favicon in /public
+//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
+app.use(logger('dev'));
+app.use(bodyParser.json());
+app.use(bodyParser.urlencoded({ extended: false }));
+app.use(cookieParser());
+app.use(express.static(path.join(__dirname, 'public')));
+
+app.use('/', index);
+app.use('/commits', commits);
+app.all('*', function(req, res) {
+ res.redirect("/");
+});
+
+
+// error handler
+app.use(function(err, req, res, next) {
+ // set locals, only providing error in development
+ res.locals.message = err.message;
+ res.locals.error = req.app.get('env') === 'development' ? err : {};
+
+ // render the error page
+ res.status(err.status || 500);
+ res.render('error');
+});
+
+module.exports = app;
diff --git a/bin/www b/bin/www
new file mode 100755
index 0000000..774c09f
--- /dev/null
+++ b/bin/www
@@ -0,0 +1,91 @@
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var app = require('../app');
+var debug = require('debug')('expressnew:server');
+var http = require('http');
+
+/**
+ * Get port from environment and store in Express.
+ */
+
+var port = normalizePort(process.env.PORT || '3000');
+app.set('port', port);
+
+/**
+ * Create HTTP server.
+ */
+
+var server = http.createServer(app);
+
+/**
+ * Listen on provided port, on all network interfaces.
+ */
+
+server.listen(port);
+server.on('error', onError);
+server.on('listening', onListening);
+
+/**
+ * Normalize a port into a number, string, or false.
+ */
+
+function normalizePort(val) {
+ var port = parseInt(val, 10);
+
+ if (isNaN(port)) {
+ // named pipe
+ return val;
+ }
+
+ if (port >= 0) {
+ // port number
+ return port;
+ }
+
+ return false;
+}
+
+/**
+ * Event listener for HTTP server "error" event.
+ */
+
+function onError(error) {
+ if (error.syscall !== 'listen') {
+ throw error;
+ }
+
+ var bind = typeof port === 'string'
+ ? 'Pipe ' + port
+ : 'Port ' + port;
+
+ // handle specific listen errors with friendly messages
+ switch (error.code) {
+ case 'EACCES':
+ console.error(bind + ' requires elevated privileges');
+ process.exit(1);
+ break;
+ case 'EADDRINUSE':
+ console.error(bind + ' is already in use');
+ process.exit(1);
+ break;
+ default:
+ throw error;
+ }
+}
+
+/**
+ * Event listener for HTTP server "listening" event.
+ */
+
+function onListening() {
+ var addr = server.address();
+ var bind = typeof addr === 'string'
+ ? 'pipe ' + addr
+ : 'port ' + addr.port;
+ console.log('Server is listening at port:', addr.port);
+ debug('Listening on ' + bind);
+}
diff --git a/client/components/commitList/commit/commit.css b/client/components/commitList/commit/commit.css
new file mode 100644
index 0000000..a076e1f
--- /dev/null
+++ b/client/components/commitList/commit/commit.css
@@ -0,0 +1,12 @@
+.commit {
+ border-bottom:1px solid gray;
+ padding:10px 0px;
+}
+
+.commit div {
+ padding: 10px 0px;
+}
+
+.commit.lightblue{
+ background-color: #E6F1F6;
+}
\ No newline at end of file
diff --git a/client/components/commitList/commit/commit.jsx b/client/components/commitList/commit/commit.jsx
new file mode 100644
index 0000000..0623da5
--- /dev/null
+++ b/client/components/commitList/commit/commit.jsx
@@ -0,0 +1,51 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import css from './commit.css';
+
+
+export default class Commit extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ commit: this.props.body
+ };
+ }
+
+
+ getUserCommits() {
+ this.props.getUserCommits(this.state.commit.commit.author.email);
+ }
+
+
+ render() {
+ return (
+
+ );
+ }
+
+ resetUser() {
+ this.setState({loading: true});
+ axios.get(`/commits`)
+ .then(res => {
+ const commits = res.data;
+ this.setState({commits, user: null, loading: false});
+ });
+ }
+
+}
+
+ReactDOM.render(, document.getElementById('CommitList'));
\ No newline at end of file
diff --git a/client/main.js b/client/main.js
new file mode 100644
index 0000000..de71a11
--- /dev/null
+++ b/client/main.js
@@ -0,0 +1,4 @@
+
+import CommitList from './components/commitList/commitList.jsx';
+
+
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..da9dc40
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,7 @@
+version: "2"
+services:
+ app:
+ build:
+ context: .
+ ports:
+ - "3000:3000"
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..5cb0a9b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "expressnew",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "start": "webpack; node ./bin/www",
+ "webpack": "webpack"
+ },
+ "dependencies": {
+ "axios": "^0.15.3",
+ "babel-core": "^6.4.5",
+ "babel-loader": "^6.2.1",
+ "babel-preset-es2015": "^6.3.13",
+ "babel-preset-react": "^6.3.13",
+ "body-parser": "~1.16.0",
+ "bootstrap": "^3.3.7",
+ "cookie-parser": "~1.4.3",
+ "css-loader": "^0.26.2",
+ "debug": "~2.6.0",
+ "express": "~4.14.1",
+ "jade": "~1.11.0",
+ "jquery": "^3.1.1",
+ "morgan": "~1.7.0",
+ "react": "^0.14.7",
+ "react-dom": "^0.14.7",
+ "serve-favicon": "~2.3.2",
+ "style-loader": "^0.13.2",
+ "webpack": "^1.14.0"
+ }
+}
diff --git a/public/javascripts/bundle.js b/public/javascripts/bundle.js
new file mode 100644
index 0000000..1b48d15
--- /dev/null
+++ b/public/javascripts/bundle.js
@@ -0,0 +1,21887 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _commitList = __webpack_require__(1);
+
+ var _commitList2 = _interopRequireDefault(_commitList);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _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; }; }();
+
+ var _react = __webpack_require__(2);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactDom = __webpack_require__(159);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _axios = __webpack_require__(160);
+
+ var _axios2 = _interopRequireDefault(_axios);
+
+ var _commitList = __webpack_require__(185);
+
+ var _commitList2 = _interopRequireDefault(_commitList);
+
+ var _commit = __webpack_require__(189);
+
+ var _commit2 = _interopRequireDefault(_commit);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _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; }
+
+ function _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; }
+
+ var CommitList = function (_React$Component) {
+ _inherits(CommitList, _React$Component);
+
+ function CommitList(props) {
+ _classCallCheck(this, CommitList);
+
+ var _this = _possibleConstructorReturn(this, (CommitList.__proto__ || Object.getPrototypeOf(CommitList)).call(this, props));
+
+ _this.state = {
+ commits: [],
+ user: '',
+ loading: true
+
+ };
+ return _this;
+ }
+
+ _createClass(CommitList, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this2 = this;
+
+ _axios2.default.get('/commits').then(function (res) {
+ var commits = res.data;
+ _this2.setState({ commits: commits, loading: false });
+ });
+ }
+ }, {
+ key: 'getUserCommits',
+ value: function getUserCommits(user) {
+ var _this3 = this;
+
+ this.setState({ loading: true });
+ _axios2.default.get('/commits?author=' + user).then(function (res) {
+ var commits = res.data;
+ _this3.setState({ commits: commits, user: user, loading: false });
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this4 = this;
+
+ return _react2.default.createElement(
+ 'div',
+ { className: 'commit-list' },
+ _react2.default.createElement(
+ 'h1',
+ null,
+ 'Commits'
+ ),
+ this.state.user ? _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ 'h2',
+ null,
+ 'for user:',
+ this.state.user
+ ),
+ _react2.default.createElement(
+ 'button',
+ { onClick: this.resetUser.bind(this) },
+ 'Reset User'
+ )
+ ) : '',
+ this.state.loading ? 'Loading ...' : _react2.default.createElement(
+ 'ul',
+ null,
+ this.state.commits.map(function (commit) {
+ return _react2.default.createElement(_commit2.default, { key: commit.sha, body: commit, getUserCommits: _this4.getUserCommits.bind(_this4) });
+ })
+ )
+ );
+ }
+ }, {
+ key: 'resetUser',
+ value: function resetUser() {
+ var _this5 = this;
+
+ this.setState({ loading: true });
+ _axios2.default.get('/commits').then(function (res) {
+ var commits = res.data;
+ _this5.setState({ commits: commits, user: null, loading: false });
+ });
+ }
+ }]);
+
+ return CommitList;
+ }(_react2.default.Component);
+
+ _reactDom2.default.render(_react2.default.createElement(CommitList, null), document.getElementById('CommitList'));
+
+ //
+ // {/*
*/}
+ // {/*
{user.commit.author.name}
*/}
+ // {/*
{user.commit.message}
*/}
+ // {/*
{user.sha}
*/}
+ // {/*
*/}
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(3);
+
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule React
+ */
+
+ 'use strict';
+
+ var ReactDOM = __webpack_require__(4);
+ var ReactDOMServer = __webpack_require__(149);
+ var ReactIsomorphic = __webpack_require__(153);
+
+ var assign = __webpack_require__(40);
+ var deprecated = __webpack_require__(158);
+
+ // `version` will be added here by ReactIsomorphic.
+ var React = {};
+
+ assign(React, ReactIsomorphic);
+
+ assign(React, {
+ // ReactDOM
+ findDOMNode: deprecated('findDOMNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.findDOMNode),
+ render: deprecated('render', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.render),
+ unmountComponentAtNode: deprecated('unmountComponentAtNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.unmountComponentAtNode),
+
+ // ReactDOMServer
+ renderToString: deprecated('renderToString', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToString),
+ renderToStaticMarkup: deprecated('renderToStaticMarkup', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToStaticMarkup)
+ });
+
+ React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOM;
+ React.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOMServer;
+
+ module.exports = React;
+
+/***/ },
+/* 4 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ReactDOM
+ */
+
+ /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/
+
+ 'use strict';
+
+ var ReactCurrentOwner = __webpack_require__(6);
+ var ReactDOMTextComponent = __webpack_require__(7);
+ var ReactDefaultInjection = __webpack_require__(72);
+ var ReactInstanceHandles = __webpack_require__(46);
+ var ReactMount = __webpack_require__(29);
+ var ReactPerf = __webpack_require__(19);
+ var ReactReconciler = __webpack_require__(51);
+ var ReactUpdates = __webpack_require__(55);
+ var ReactVersion = __webpack_require__(147);
+
+ var findDOMNode = __webpack_require__(92);
+ var renderSubtreeIntoContainer = __webpack_require__(148);
+ var warning = __webpack_require__(26);
+
+ ReactDefaultInjection.inject();
+
+ var render = ReactPerf.measure('React', 'render', ReactMount.render);
+
+ var React = {
+ findDOMNode: findDOMNode,
+ render: render,
+ unmountComponentAtNode: ReactMount.unmountComponentAtNode,
+ version: ReactVersion,
+
+ /* eslint-disable camelcase */
+ unstable_batchedUpdates: ReactUpdates.batchedUpdates,
+ unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
+ };
+
+ // Inject the runtime into a devtools global hook regardless of browser.
+ // Allows for debugging when the hook is injected on the page.
+ /* eslint-enable camelcase */
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
+ CurrentOwner: ReactCurrentOwner,
+ InstanceHandles: ReactInstanceHandles,
+ Mount: ReactMount,
+ Reconciler: ReactReconciler,
+ TextComponent: ReactDOMTextComponent
+ });
+ }
+
+ if (process.env.NODE_ENV !== 'production') {
+ var ExecutionEnvironment = __webpack_require__(10);
+ if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
+
+ // First check if devtools is not installed
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
+ // If we're in Chrome or Firefox, provide a download link if not installed.
+ if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
+ console.debug('Download the React DevTools for a better development experience: ' + 'https://fb.me/react-devtools');
+ }
+ }
+
+ // If we're in IE8, check to see if we are in compatibility mode and provide
+ // information on preventing compatibility mode
+ var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
+
+ process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '') : undefined;
+
+ var expectedFeatures = [
+ // shims
+ Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim,
+
+ // shams
+ Object.create, Object.freeze];
+
+ for (var i = 0; i < expectedFeatures.length; i++) {
+ if (!expectedFeatures[i]) {
+ console.error('One or more ES5 shim/shams expected by React are not available: ' + 'https://fb.me/react-warning-polyfills');
+ break;
+ }
+ }
+ }
+ }
+
+ module.exports = React;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
+
+/***/ },
+/* 5 */
+/***/ function(module, exports) {
+
+ // shim for using process in browser
+ var process = module.exports = {};
+
+ // cached from whatever global is present so that test runners that stub it
+ // don't break things. But we need to wrap it in a try catch in case it is
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
+ // function because try/catches deoptimize in certain engines.
+
+ var cachedSetTimeout;
+ var cachedClearTimeout;
+
+ function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+ }
+ function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+ }
+ (function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } ())
+ function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+
+
+ }
+ function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
+
+
+
+ }
+ var queue = [];
+ var draining = false;
+ var currentQueue;
+ var queueIndex = -1;
+
+ function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+ }
+
+ function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+ }
+
+ process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+ };
+
+ // v8 likes predictible objects
+ function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+ }
+ Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+ };
+ process.title = 'browser';
+ process.browser = true;
+ process.env = {};
+ process.argv = [];
+ process.version = ''; // empty string to avoid regexp issues
+ process.versions = {};
+
+ function noop() {}
+
+ process.on = noop;
+ process.addListener = noop;
+ process.once = noop;
+ process.off = noop;
+ process.removeListener = noop;
+ process.removeAllListeners = noop;
+ process.emit = noop;
+
+ process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+ };
+
+ process.cwd = function () { return '/' };
+ process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+ };
+ process.umask = function() { return 0; };
+
+
+/***/ },
+/* 6 */
+/***/ function(module, exports) {
+
+ /**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ReactCurrentOwner
+ */
+
+ 'use strict';
+
+ /**
+ * Keeps track of the current owner.
+ *
+ * The current owner is the component who should own any components that are
+ * currently being constructed.
+ */
+ var ReactCurrentOwner = {
+
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+
+ };
+
+ module.exports = ReactCurrentOwner;
+
+/***/ },
+/* 7 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ReactDOMTextComponent
+ * @typechecks static-only
+ */
+
+ 'use strict';
+
+ var DOMChildrenOperations = __webpack_require__(8);
+ var DOMPropertyOperations = __webpack_require__(23);
+ var ReactComponentBrowserEnvironment = __webpack_require__(27);
+ var ReactMount = __webpack_require__(29);
+
+ var assign = __webpack_require__(40);
+ var escapeTextContentForBrowser = __webpack_require__(22);
+ var setTextContent = __webpack_require__(21);
+ var validateDOMNesting = __webpack_require__(71);
+
+ /**
+ * Text nodes violate a couple assumptions that React makes about components:
+ *
+ * - When mounting text into the DOM, adjacent text nodes are merged.
+ * - Text nodes cannot be assigned a React root ID.
+ *
+ * This component is used to wrap strings in elements so that they can undergo
+ * the same reconciliation that is applied to elements.
+ *
+ * TODO: Investigate representing React components in the DOM with text nodes.
+ *
+ * @class ReactDOMTextComponent
+ * @extends ReactComponent
+ * @internal
+ */
+ var ReactDOMTextComponent = function (props) {
+ // This constructor and its argument is currently used by mocks.
+ };
+
+ assign(ReactDOMTextComponent.prototype, {
+
+ /**
+ * @param {ReactText} text
+ * @internal
+ */
+ construct: function (text) {
+ // TODO: This is really a ReactText (ReactNode), not a ReactElement
+ this._currentElement = text;
+ this._stringText = '' + text;
+
+ // Properties
+ this._rootNodeID = null;
+ this._mountIndex = 0;
+ },
+
+ /**
+ * Creates the markup for this text node. This node is not intended to have
+ * any features besides containing text content.
+ *
+ * @param {string} rootID DOM ID of the root node.
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
+ * @return {string} Markup for this text node.
+ * @internal
+ */
+ mountComponent: function (rootID, transaction, context) {
+ if (process.env.NODE_ENV !== 'production') {
+ if (context[validateDOMNesting.ancestorInfoContextKey]) {
+ validateDOMNesting('span', null, context[validateDOMNesting.ancestorInfoContextKey]);
+ }
+ }
+
+ this._rootNodeID = rootID;
+ if (transaction.useCreateElement) {
+ var ownerDocument = context[ReactMount.ownerDocumentContextKey];
+ var el = ownerDocument.createElement('span');
+ DOMPropertyOperations.setAttributeForID(el, rootID);
+ // Populate node cache
+ ReactMount.getID(el);
+ setTextContent(el, this._stringText);
+ return el;
+ } else {
+ var escapedText = escapeTextContentForBrowser(this._stringText);
+
+ if (transaction.renderToStaticMarkup) {
+ // Normally we'd wrap this in a `span` for the reasons stated above, but
+ // since this is a situation where React won't take over (static pages),
+ // we can simply return the text as it is.
+ return escapedText;
+ }
+
+ return '' + escapedText + '';
+ }
+ },
+
+ /**
+ * Updates this component by updating the text content.
+ *
+ * @param {ReactText} nextText The next text content
+ * @param {ReactReconcileTransaction} transaction
+ * @internal
+ */
+ receiveComponent: function (nextText, transaction) {
+ if (nextText !== this._currentElement) {
+ this._currentElement = nextText;
+ var nextStringText = '' + nextText;
+ if (nextStringText !== this._stringText) {
+ // TODO: Save this as pending props and use performUpdateIfNecessary
+ // and/or updateComponent to do the actual update for consistency with
+ // other component types?
+ this._stringText = nextStringText;
+ var node = ReactMount.getNode(this._rootNodeID);
+ DOMChildrenOperations.updateTextContent(node, nextStringText);
+ }
+ }
+ },
+
+ unmountComponent: function () {
+ ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
+ }
+
+ });
+
+ module.exports = ReactDOMTextComponent;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
+
+/***/ },
+/* 8 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule DOMChildrenOperations
+ * @typechecks static-only
+ */
+
+ 'use strict';
+
+ var Danger = __webpack_require__(9);
+ var ReactMultiChildUpdateTypes = __webpack_require__(17);
+ var ReactPerf = __webpack_require__(19);
+
+ var setInnerHTML = __webpack_require__(20);
+ var setTextContent = __webpack_require__(21);
+ var invariant = __webpack_require__(14);
+
+ /**
+ * Inserts `childNode` as a child of `parentNode` at the `index`.
+ *
+ * @param {DOMElement} parentNode Parent node in which to insert.
+ * @param {DOMElement} childNode Child node to insert.
+ * @param {number} index Index at which to insert the child.
+ * @internal
+ */
+ function insertChildAt(parentNode, childNode, index) {
+ // By exploiting arrays returning `undefined` for an undefined index, we can
+ // rely exclusively on `insertBefore(node, null)` instead of also using
+ // `appendChild(node)`. However, using `undefined` is not allowed by all
+ // browsers so we must replace it with `null`.
+
+ // fix render order error in safari
+ // IE8 will throw error when index out of list size.
+ var beforeChild = index >= parentNode.childNodes.length ? null : parentNode.childNodes.item(index);
+
+ parentNode.insertBefore(childNode, beforeChild);
+ }
+
+ /**
+ * Operations for updating with DOM children.
+ */
+ var DOMChildrenOperations = {
+
+ dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,
+
+ updateTextContent: setTextContent,
+
+ /**
+ * Updates a component's children by processing a series of updates. The
+ * update configurations are each expected to have a `parentNode` property.
+ *
+ * @param {array