From 0a2d8d71e195a518187bbe9ca8433966f8cfba4c Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 20 Dec 2015 16:00:35 +0000 Subject: [PATCH 01/58] Create README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5531047 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Run? :light_rail: :bus: :train2: :running: + +This is going to be a simple web app to help me **commute more efficiently** (and maybe you, if I get round to it). + +This is *not* a transport planning app. +(Citymapper's pretty good at that already.) + +Instead, this is for someone who knows *exactly* where they're going, but **doesn't want to miss their connection**. + +1. You see all the live departures on your commuting route *at a glance*. +2. You work out if you need to run or not. +3. You proceed at your chosen pace. + +Simple as that :smile: + From f26b3af420b5bc1c2b4d0ed20f4cc2ede303b46a Mon Sep 17 00:00:00 2001 From: Mina Date: Tue, 22 Dec 2015 14:15:54 +0000 Subject: [PATCH 02/58] arrivals now stored in parent state --- src/app-container.jsx | 24 +++++++++++++++++++++--- src/bus-arrivals.jsx | 16 ++++------------ src/dlr-arrivals.jsx | 11 ++++------- src/train-arrivals.jsx | 11 ++++------- 4 files changed, 33 insertions(+), 29 deletions(-) diff --git a/src/app-container.jsx b/src/app-container.jsx index dd805bc..8f3e0a9 100644 --- a/src/app-container.jsx +++ b/src/app-container.jsx @@ -6,13 +6,31 @@ var TrainArrivals = require('./train-arrivals.jsx'); var AppContainer = React.createClass({ + getInitialState: function () { + + return { + busArrivals: [], + DLRArrivals: [], + trainArrivals: [] + }; + }, + + updateState: function (transport, data) { + + this.setState({ + [transport]: data + }, function () { + console.log(this.state); + }); + }, + render: function () { return (
- - - + + +
); } diff --git a/src/bus-arrivals.jsx b/src/bus-arrivals.jsx index 76aa1b9..0fc138e 100644 --- a/src/bus-arrivals.jsx +++ b/src/bus-arrivals.jsx @@ -5,12 +5,6 @@ var $ = require('jquery'); var BusArrivals = React.createClass({ - getInitialState: function () { - - return { - busArrivals: [] - }; - }, componentDidMount: function () { @@ -26,19 +20,17 @@ var BusArrivals = React.createClass({ var newData = data || []; - self.setState({ - busArrivals: newData - }, function () { + self.props.updateState('busArrivals', newData) - setTimeout(self.getBusArrivals, 10000); - }); + setTimeout(self.getBusArrivals, 10000); } }); }, render: function () { - var busArrivals = this.state.busArrivals; + var busArrivals = this.props.arrivals; + console.log("busArrivals",busArrivals); return (
diff --git a/src/dlr-arrivals.jsx b/src/dlr-arrivals.jsx index b85b9a5..0d160bb 100644 --- a/src/dlr-arrivals.jsx +++ b/src/dlr-arrivals.jsx @@ -23,22 +23,19 @@ var DLRArrivals = React.createClass({ $.ajax({ url: '/getDLRArrivals', success: function (data) { - + var newData = data || []; - self.setState({ - DLRArrivals: newData - }, function () { + self.props.updateState('DLRArrivals', newData); - setTimeout(self.getDLRArrivals, 10000); - }); + setTimeout(self.getDLRArrivals, 10000); } }); }, render: function () { - var DLRArrivals = this.state.DLRArrivals; + var DLRArrivals = this.props.arrivals; return (
diff --git a/src/train-arrivals.jsx b/src/train-arrivals.jsx index 84f4186..88ce3d3 100644 --- a/src/train-arrivals.jsx +++ b/src/train-arrivals.jsx @@ -23,22 +23,19 @@ var TrainArrivals = React.createClass({ $.ajax({ url: '/getTrainArrivals', success: function (data) { - + var newData = data || []; - self.setState({ - trainArrivals: newData - }, function () { + self.props.updateState('trainArrivals', newData); - setTimeout(self.getTrainArrivals, 30000); - }); + setTimeout(self.getTrainArrivals, 30000); } }); }, render: function () { - var trainArrivals = this.state.trainArrivals; + var trainArrivals = this.props.arrivals; return (
From 7953b69435e4f209a3f78a1aff5017d4231da84d Mon Sep 17 00:00:00 2001 From: Mina Date: Wed, 23 Dec 2015 11:57:09 +0000 Subject: [PATCH 03/58] stash conflicts resolved --- src/bus-arrivals.jsx | 2 +- src/dlr-arrivals.jsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bus-arrivals.jsx b/src/bus-arrivals.jsx index 0fc138e..f918548 100644 --- a/src/bus-arrivals.jsx +++ b/src/bus-arrivals.jsx @@ -30,7 +30,7 @@ var BusArrivals = React.createClass({ render: function () { var busArrivals = this.props.arrivals; - console.log("busArrivals",busArrivals); + console.log("busArrivals"); return (
diff --git a/src/dlr-arrivals.jsx b/src/dlr-arrivals.jsx index 0d160bb..92858d9 100644 --- a/src/dlr-arrivals.jsx +++ b/src/dlr-arrivals.jsx @@ -36,6 +36,7 @@ var DLRArrivals = React.createClass({ render: function () { var DLRArrivals = this.props.arrivals; + console.log('DLRArrivals'); return (
From 4b3dfbdf3c25ea03d283f0e7efa19c267b91a4bc Mon Sep 17 00:00:00 2001 From: Mina Date: Wed, 23 Dec 2015 23:31:54 -1000 Subject: [PATCH 04/58] bus and dlr departures use same endpoint and handler using querystring --- handlers.js | 46 +++++++++++++++++++++++++++++++++--------- routes.js | 9 ++------- src/bus-arrivals.jsx | 2 +- src/dlr-arrivals.jsx | 2 +- src/train-arrivals.jsx | 2 +- 5 files changed, 41 insertions(+), 20 deletions(-) diff --git a/handlers.js b/handlers.js index 5d4600c..76276d5 100644 --- a/handlers.js +++ b/handlers.js @@ -7,21 +7,47 @@ var tfl = request.defaults({ qs: credentials }); +var stBarnabasChurch = '490012633S'; +var westHamDLR = '940GZZDLWHM'; var woolwichDLR = '940GZZDLWLA'; var handlers = { - getBusArrivals: function (request, reply) { + getTfLArrivals: function (request, reply) { - var stBarnabasChurch = '490012633S'; + var query = request.query; + var stopPoint = ''; - tfl.get('StopPoint/' + stBarnabasChurch + '/Arrivals', function (err, response, body) { + if (query.mode === 'dlr') { - var results = body; + stopPoint = westHamDLR; - if (results) { + } else if (query.mode === 'bus') { + + stopPoint = stBarnabasChurch; + + } + + + tfl.get('StopPoint/' + stopPoint + '/Arrivals', function (err, response, body) { + + var results = JSON.parse(body); + + if (!results) { + + throw new Error("Could not get arrivals from TfL"); - var results = JSON.parse(body).sort(function (a, b) { + } else { + + if (stopPoint === westHamDLR) { + + results = results.filter(function (arrival) { + + return arrival.destinationNaptanId === woolwichDLR; + }); + } + + results = results.sort(function (a, b) { if (a.expectedArrival < b.expectedArrival) { return -1; @@ -31,16 +57,16 @@ var handlers = { return 0; } }) - .slice(0, 5); - } + .slice(0, 5) - reply(results); + reply(results); + } }); }, getDLRArrivals: function (request, reply) { - var westHamDLR = '940GZZDLWHM'; + tfl.get('StopPoint/' + westHamDLR + '/Arrivals', function (err, response, body) { diff --git a/routes.js b/routes.js index 511def5..10d59a8 100644 --- a/routes.js +++ b/routes.js @@ -21,13 +21,8 @@ var routes = [ }, { method: 'GET', - path: '/getBusArrivals', - handler: handlers.getBusArrivals - }, - { - method: 'GET', - path: '/getDLRArrivals', - handler: handlers.getDLRArrivals + path: '/getTfLArrivals', + handler: handlers.getTfLArrivals }, { method: 'GET', diff --git a/src/bus-arrivals.jsx b/src/bus-arrivals.jsx index f918548..4d718ec 100644 --- a/src/bus-arrivals.jsx +++ b/src/bus-arrivals.jsx @@ -15,7 +15,7 @@ var BusArrivals = React.createClass({ var self = this; $.ajax({ - url: '/getBusArrivals', + url: '/getTfLArrivals?mode=bus', success: function (data) { var newData = data || []; diff --git a/src/dlr-arrivals.jsx b/src/dlr-arrivals.jsx index 92858d9..181fbdf 100644 --- a/src/dlr-arrivals.jsx +++ b/src/dlr-arrivals.jsx @@ -21,7 +21,7 @@ var DLRArrivals = React.createClass({ var self = this; $.ajax({ - url: '/getDLRArrivals', + url: '/getTfLArrivals?mode=dlr', success: function (data) { var newData = data || []; diff --git a/src/train-arrivals.jsx b/src/train-arrivals.jsx index 88ce3d3..1ac74c3 100644 --- a/src/train-arrivals.jsx +++ b/src/train-arrivals.jsx @@ -36,7 +36,7 @@ var TrainArrivals = React.createClass({ render: function () { var trainArrivals = this.props.arrivals; - + console.log('trainArrivals'); return (

Woolwich

From ef4ec1ac195902ee921e4fa3ca8c4260848af65d Mon Sep 17 00:00:00 2001 From: Mina Date: Thu, 24 Dec 2015 11:46:33 +0000 Subject: [PATCH 05/58] tidy up --- handlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers.js b/handlers.js index 76276d5..fef55f2 100644 --- a/handlers.js +++ b/handlers.js @@ -16,7 +16,7 @@ var handlers = { getTfLArrivals: function (request, reply) { var query = request.query; - var stopPoint = ''; + var stopPoint; if (query.mode === 'dlr') { From 659ad07b89dd0c6547f69544d0fdd6b6b0d10f20 Mon Sep 17 00:00:00 2001 From: Mina Date: Fri, 25 Dec 2015 23:49:01 +0000 Subject: [PATCH 06/58] add testing tools --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 4aa763d..1022cb5 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,8 @@ }, "devDependencies": { "browserify": "^12.0.1", + "jsdom": "^7.2.1", + "mocha": "^2.3.4", "nodemon": "^1.8.1", "react-addons-test-utils": "^0.14.3", "watchify": "^3.6.1" From 0bf1898d576d25744e5f436823d2beb18b482b67 Mon Sep 17 00:00:00 2001 From: Mina Date: Sat, 26 Dec 2015 13:28:41 +0000 Subject: [PATCH 07/58] restructuring of source files --- package.json | 7 +++---- app.jsx => src/app.jsx | 4 ++-- src/test/test-bundle.js | 7 +++++++ src/test/test.jsx | 3 +++ test/app-container.js | 16 ---------------- test/test-bundle.js | 0 test/test.jsx | 3 --- 7 files changed, 15 insertions(+), 25 deletions(-) rename app.jsx => src/app.jsx (72%) create mode 100644 src/test/test-bundle.js create mode 100644 src/test/test.jsx delete mode 100644 test/app-container.js delete mode 100644 test/test-bundle.js delete mode 100644 test/test.jsx diff --git a/package.json b/package.json index 1022cb5..381887d 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,9 @@ "main": "server.js", "scripts": { "start": "npm run build & nodemon server.js", - "build": "watchify app.jsx -t [ babelify --presets [ react ] ] -o public/bundle.js -v", - "build-test": "browserify test/test.jsx -o test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]", - "test": "echo \"You ain't wrote no tests!\" && exit 1", - "testing": "./node_modules/.bin/enzyme ./test/test.js" + "build": "watchify src/app.jsx -t [ babelify --presets [ react ] ] -o public/bundle.js -v", + "build-test": "browserify src/test/test.jsx -o src/test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]", + "test": "echo \"You ain't wrote no tests!\" && exit 1" }, "repository": { "type": "git", diff --git a/app.jsx b/src/app.jsx similarity index 72% rename from app.jsx rename to src/app.jsx index a1ff49b..63df7fc 100644 --- a/app.jsx +++ b/src/app.jsx @@ -1,9 +1,9 @@ var React = require('react'); var ReactDOM = require('react-dom'); -var AppContainer = require('./src/app-container.jsx'); +var AppContainer = require('./app-container.jsx'); ReactDOM.render( - + , document.getElementsByClassName("container")[0] ); diff --git a/src/test/test-bundle.js b/src/test/test-bundle.js new file mode 100644 index 0000000..5e8b823 --- /dev/null +++ b/src/test/test-bundle.js @@ -0,0 +1,7 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o { - - describe('', () => { - - it('should render one div with className "bus"', () => { - - const wrapper = shallow(); - console.log(wrapper); - }); - }) -}; - -export { testAppContainer }; diff --git a/test/test-bundle.js b/test/test-bundle.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/test.jsx b/test/test.jsx deleted file mode 100644 index eff290f..0000000 --- a/test/test.jsx +++ /dev/null @@ -1,3 +0,0 @@ -import { testAppContainer } from './app-container.js'; - -testAppContainer(); From ea81db54c027bc84875af8720d9a582caf0a4637 Mon Sep 17 00:00:00 2001 From: Mina Date: Wed, 30 Dec 2015 21:27:48 +0000 Subject: [PATCH 08/58] add testing WIP --- package.json | 1 + src/test/mocha.opts | 3 +++ src/test/unit/app-container.js | 1 + 3 files changed, 5 insertions(+) create mode 100644 src/test/mocha.opts create mode 100644 src/test/unit/app-container.js diff --git a/package.json b/package.json index 381887d..794de5f 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ }, "devDependencies": { "browserify": "^12.0.1", + "chai": "^3.4.1", "jsdom": "^7.2.1", "mocha": "^2.3.4", "nodemon": "^1.8.1", diff --git a/src/test/mocha.opts b/src/test/mocha.opts new file mode 100644 index 0000000..b5d86f1 --- /dev/null +++ b/src/test/mocha.opts @@ -0,0 +1,3 @@ +--require test/utils/dom.js +--require chai +--reporter nyan diff --git a/src/test/unit/app-container.js b/src/test/unit/app-container.js new file mode 100644 index 0000000..30c3475 --- /dev/null +++ b/src/test/unit/app-container.js @@ -0,0 +1 @@ +import mocha from 'mocha'; From 2825cbe1071616e06a9c613eeca5682e8b1d1b29 Mon Sep 17 00:00:00 2001 From: Mina Date: Fri, 1 Jan 2016 20:29:19 +0000 Subject: [PATCH 09/58] ignore testing-dom.js --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 10f77c5..0befd4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ public/bundle.js -npm-debug.log \ No newline at end of file +npm-debug.log +src/test/testing-dom.js From 9e9d627e58d2227de28c61ffc0ae89aaf569f62b Mon Sep 17 00:00:00 2001 From: Mina Date: Sat, 2 Jan 2016 13:23:57 +0000 Subject: [PATCH 10/58] WIP configuing testing --- .gitignore | 1 + package.json | 7 +++---- src/test/{test.jsx => test.js} | 0 src/test/unit/app-container.js | 19 ++++++++++++++++++- 4 files changed, 22 insertions(+), 5 deletions(-) rename src/test/{test.jsx => test.js} (100%) diff --git a/.gitignore b/.gitignore index 0befd4e..0487dec 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ public/bundle.js npm-debug.log src/test/testing-dom.js +src/test/utils/dom.js diff --git a/package.json b/package.json index 794de5f..4d89de2 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "scripts": { "start": "npm run build & nodemon server.js", "build": "watchify src/app.jsx -t [ babelify --presets [ react ] ] -o public/bundle.js -v", - "build-test": "browserify src/test/test.jsx -o src/test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]", - "test": "echo \"You ain't wrote no tests!\" && exit 1" + "build-test": "browserify src/test/test.js -o src/test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]", + "test": "node_modules/mocha/bin/mocha --compilers js:babel/register src/test/test.js --reporter nyan" }, "repository": { "type": "git", @@ -21,11 +21,10 @@ "author": "minaorangina", "license": "MIT", "dependencies": { - "babel": "^6.3.13", "babel-preset-es2015": "^6.3.13", "babel-preset-react": "^6.3.13", "babelify": "^7.2.0", - "hapi": "^11.1.2", + "hapi": "^11.1.4", "inert": "^3.2.0", "jquery": "^2.1.4", "moment": "^2.10.6", diff --git a/src/test/test.jsx b/src/test/test.js similarity index 100% rename from src/test/test.jsx rename to src/test/test.js diff --git a/src/test/unit/app-container.js b/src/test/unit/app-container.js index 30c3475..0859108 100644 --- a/src/test/unit/app-container.js +++ b/src/test/unit/app-container.js @@ -1 +1,18 @@ -import mocha from 'mocha'; +"use strict"; + +import React from 'react'; +import chai from 'chai'; +import TestUtils from 'react-addons-test-utils'; +import { createRenderer } from 'react-addons-test-utils'; + +const assert = chai.assert; + +const testAppContainer = () => { + + assert.ok("1", "1", "Equality found"); +}; + +export { testAppContainer }; + + +// console.log(TestUtils); From 4ab843c967d67f239a72c917e06f80259a61c16e Mon Sep 17 00:00:00 2001 From: Mina Date: Fri, 22 Jan 2016 13:02:41 +0000 Subject: [PATCH 11/58] testing pre-push script --- public/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/index.html b/public/index.html index 955da20..96e45b2 100644 --- a/public/index.html +++ b/public/index.html @@ -8,5 +8,8 @@
+ From 92ec81028d0997bc1adc1415025996989be500d1 Mon Sep 17 00:00:00 2001 From: Mina Date: Fri, 22 Jan 2016 13:02:41 +0000 Subject: [PATCH 12/58] testing pre-push script --- public/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/index.html b/public/index.html index 955da20..f29bfc2 100644 --- a/public/index.html +++ b/public/index.html @@ -8,5 +8,8 @@
+ From a632ed4add4e43f8da9164c4f7ee59514c174278 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 24 Jan 2016 12:37:51 +0000 Subject: [PATCH 13/58] change port number. add more description keywords --- package.json | 4 +++- server.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4d89de2..04049cd 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ "keywords": [ "tfl", "transport", - "journey" + "journey", + "commute", + "productivity" ], "author": "minaorangina", "license": "MIT", diff --git a/server.js b/server.js index 8928957..6173d57 100644 --- a/server.js +++ b/server.js @@ -15,9 +15,9 @@ var server = new Hapi.Server({ server.register(inert, function () {}); -server.connection({port: 8080}); +server.connection({port: 8000}); server.route(routes); server.start(function () { - + console.log("Server running at port:", server.info.uri); }); From d55ad2f1a0acf361194e5de617bf8bf64fd331db Mon Sep 17 00:00:00 2001 From: Mina Date: Wed, 27 Jan 2016 17:50:44 +0000 Subject: [PATCH 14/58] deals with whitespace --- lib/getTrainArrivals.js | 9 ++++++++- src/app-container.jsx | 2 -- src/bus-arrivals.jsx | 3 +-- src/dlr-arrivals.jsx | 9 +-------- src/train-arrivals.jsx | 15 ++++----------- 5 files changed, 14 insertions(+), 24 deletions(-) diff --git a/lib/getTrainArrivals.js b/lib/getTrainArrivals.js index 004e9af..5428f02 100644 --- a/lib/getTrainArrivals.js +++ b/lib/getTrainArrivals.js @@ -24,12 +24,19 @@ function getTrainArrivals (request, reply) { client.addSoapHeader(accessToken); client.GetDepBoardWithDetails(args, function (err, result) { + var stationBoard = result.GetStationBoardResult; if (err) { console.log('Error getting departures...'); throw err; } - reply(result.GetStationBoardResult.trainServices.service); + if (stationBoard.trainServices) { + + reply(stationBoard.trainServices.service); + } else { + + reply(undefined); + } }); }); } diff --git a/src/app-container.jsx b/src/app-container.jsx index 8f3e0a9..c1bee72 100644 --- a/src/app-container.jsx +++ b/src/app-container.jsx @@ -19,8 +19,6 @@ var AppContainer = React.createClass({ this.setState({ [transport]: data - }, function () { - console.log(this.state); }); }, diff --git a/src/bus-arrivals.jsx b/src/bus-arrivals.jsx index 4d718ec..b1fc32e 100644 --- a/src/bus-arrivals.jsx +++ b/src/bus-arrivals.jsx @@ -5,8 +5,7 @@ var $ = require('jquery'); var BusArrivals = React.createClass({ - - componentDidMount: function () { + componentWillMount: function () { this.getBusArrivals(); }, diff --git a/src/dlr-arrivals.jsx b/src/dlr-arrivals.jsx index 181fbdf..433f307 100644 --- a/src/dlr-arrivals.jsx +++ b/src/dlr-arrivals.jsx @@ -5,14 +5,7 @@ var $ = require('jquery'); var DLRArrivals = React.createClass({ - getInitialState: function () { - - return { - DLRArrivals: [] - }; - }, - - componentDidMount: function () { + componentWillMount: function () { this.getDLRArrivals(); }, diff --git a/src/train-arrivals.jsx b/src/train-arrivals.jsx index 1ac74c3..46ec747 100644 --- a/src/train-arrivals.jsx +++ b/src/train-arrivals.jsx @@ -5,14 +5,7 @@ var $ = require('jquery'); var TrainArrivals = React.createClass({ - getInitialState: function () { - - return { - trainArrivals: [] - }; - }, - - componentDidMount: function () { + componentWillMount: function () { this.getTrainArrivals(); }, @@ -25,7 +18,6 @@ var TrainArrivals = React.createClass({ success: function (data) { var newData = data || []; - self.props.updateState('trainArrivals', newData); setTimeout(self.getTrainArrivals, 30000); @@ -36,12 +28,12 @@ var TrainArrivals = React.createClass({ render: function () { var trainArrivals = this.props.arrivals; - console.log('trainArrivals'); + console.log(trainArrivals); return (

Woolwich

- Ain't got no departures! + No trains to Erith
    { @@ -51,6 +43,7 @@ var TrainArrivals = React.createClass({ var time = moment.duration(arrival.timeToStation, 'seconds').humanize(true); return
    { destination } @ { arrival.std } ->
    + }) }
From 7f0e2465bda83c958858351154871f7091d3c615 Mon Sep 17 00:00:00 2001 From: Mina Date: Wed, 27 Jan 2016 17:59:34 +0000 Subject: [PATCH 15/58] testing pre push hook --- lib/getTrainArrivals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/getTrainArrivals.js b/lib/getTrainArrivals.js index 5428f02..abf16f1 100644 --- a/lib/getTrainArrivals.js +++ b/lib/getTrainArrivals.js @@ -25,7 +25,7 @@ function getTrainArrivals (request, reply) { client.addSoapHeader(accessToken); client.GetDepBoardWithDetails(args, function (err, result) { var stationBoard = result.GetStationBoardResult; - + // here we go if (err) { console.log('Error getting departures...'); throw err; From ce83b5b7f52d0126e5b78cc67b14f54e6d223c18 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 22:37:11 +0000 Subject: [PATCH 16/58] add shouldComponentUpdate to trains component. General tidyup --- .gitignore | 1 + src/bus-arrivals.jsx | 1 - src/dlr-arrivals.jsx | 1 - src/train-arrivals.jsx | 23 +++++++++++++++++++++-- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0487dec..ebbea6d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ public/bundle.js npm-debug.log src/test/testing-dom.js src/test/utils/dom.js +.gitattributes diff --git a/src/bus-arrivals.jsx b/src/bus-arrivals.jsx index b1fc32e..bccd278 100644 --- a/src/bus-arrivals.jsx +++ b/src/bus-arrivals.jsx @@ -29,7 +29,6 @@ var BusArrivals = React.createClass({ render: function () { var busArrivals = this.props.arrivals; - console.log("busArrivals"); return (
diff --git a/src/dlr-arrivals.jsx b/src/dlr-arrivals.jsx index 433f307..b2ce4a8 100644 --- a/src/dlr-arrivals.jsx +++ b/src/dlr-arrivals.jsx @@ -29,7 +29,6 @@ var DLRArrivals = React.createClass({ render: function () { var DLRArrivals = this.props.arrivals; - console.log('DLRArrivals'); return (
diff --git a/src/train-arrivals.jsx b/src/train-arrivals.jsx index 46ec747..bf41f7d 100644 --- a/src/train-arrivals.jsx +++ b/src/train-arrivals.jsx @@ -10,6 +10,25 @@ var TrainArrivals = React.createClass({ this.getTrainArrivals(); }, + shouldComponentUpdate: function (nextProps) { + + var props = this.props; + + if (nextProps.arrivals.length > props.arrivals.length) { + + return true; + } else { + + return nextProps.arrivals.every( function (arrival, i) { + + if (props.arrivals[i]) { + + return arrival.std !== props.arrivals[i].std; + } + }); + } + }, + getTrainArrivals: function () { var self = this; @@ -26,9 +45,9 @@ var TrainArrivals = React.createClass({ }, render: function () { - + var trainArrivals = this.props.arrivals; - console.log(trainArrivals); + return (

Woolwich

From e35cb608c8c4e6feb70ab8cab3e889291202323d Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 22:59:42 +0000 Subject: [PATCH 17/58] moves test directory into root --- package.json | 4 ++-- {src/test => test}/mocha.opts | 0 {src/test => test}/test-bundle.js | 0 {src/test => test}/test.js | 0 test/testing-dom.js | 18 ++++++++++++++++ {src/test => test}/unit/app-container.js | 0 test/utils/dom.js | 26 ++++++++++++++++++++++++ 7 files changed, 46 insertions(+), 2 deletions(-) rename {src/test => test}/mocha.opts (100%) rename {src/test => test}/test-bundle.js (100%) rename {src/test => test}/test.js (100%) create mode 100644 test/testing-dom.js rename {src/test => test}/unit/app-container.js (100%) create mode 100644 test/utils/dom.js diff --git a/package.json b/package.json index 04049cd..e77df10 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "scripts": { "start": "npm run build & nodemon server.js", "build": "watchify src/app.jsx -t [ babelify --presets [ react ] ] -o public/bundle.js -v", - "build-test": "browserify src/test/test.js -o src/test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]", - "test": "node_modules/mocha/bin/mocha --compilers js:babel/register src/test/test.js --reporter nyan" + "build-test": "browserify test/test.js -o test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]", + "test": "node_modules/mocha/bin/mocha --compilers js:babel/register test/test.js --reporter nyan" }, "repository": { "type": "git", diff --git a/src/test/mocha.opts b/test/mocha.opts similarity index 100% rename from src/test/mocha.opts rename to test/mocha.opts diff --git a/src/test/test-bundle.js b/test/test-bundle.js similarity index 100% rename from src/test/test-bundle.js rename to test/test-bundle.js diff --git a/src/test/test.js b/test/test.js similarity index 100% rename from src/test/test.js rename to test/test.js diff --git a/test/testing-dom.js b/test/testing-dom.js new file mode 100644 index 0000000..8042c68 --- /dev/null +++ b/test/testing-dom.js @@ -0,0 +1,18 @@ +var jsdom = require('jsdom'); + +var doc = jsdom.jsdom(""); + +jsdom.env({ + html: 'www.minaorangina.com', + scripts: ['https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'], + done: function (err, window) { + + if (err) { + console.log(err); + } + // console.log(Object.keys(window)); + // console.log(Object.keys(window.document)); + console.log(Object.keys(window.document._defaultView)); + + } +}); diff --git a/src/test/unit/app-container.js b/test/unit/app-container.js similarity index 100% rename from src/test/unit/app-container.js rename to test/unit/app-container.js diff --git a/test/utils/dom.js b/test/utils/dom.js new file mode 100644 index 0000000..261e5f3 --- /dev/null +++ b/test/utils/dom.js @@ -0,0 +1,26 @@ +var jsdom = require('jsdom'); + +// setup the simplest document possible +var doc = jsdom.jsdom(''); + +// get the window object out of the document +var win = doc.defaultView; + +// set globals for mocha that make access to document and window feel +// natural in the test environment +global.document = doc; +global.window = win; + +// take all properties of the window object and also attach it to the +// mocha global object +propagateToGlobal(win); + +// from mocha-jsdom https://github.com/rstacruz/mocha-jsdom/blob/master/index.js#L80 +function propagateToGlobal (window) { + for (let key in window) { + if (!window.hasOwnProperty(key)) continue + if (key in global) continue + + global[key] = window[key] + } +} From 107e4338944111b5a112faceaf2a7f7680da6595 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 23:01:24 +0000 Subject: [PATCH 18/58] ignores unnecessary directories for heroku --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ebbea6d..44f4025 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ node_modules/ public/bundle.js npm-debug.log -src/test/testing-dom.js -src/test/utils/dom.js +test/ +src/ .gitattributes From 7afa2534d76caec8b008fc492339da401a02d4f3 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 23:05:23 +0000 Subject: [PATCH 19/58] adjust package.json script for heroku compatibility --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 04049cd..dc70034 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "Run or walk for your transport?", "main": "server.js", "scripts": { - "start": "npm run build & nodemon server.js", + "start": "node run server.js", + "start:dev": "npm run build & nodemon server.js", "build": "watchify src/app.jsx -t [ babelify --presets [ react ] ] -o public/bundle.js -v", "build-test": "browserify src/test/test.js -o src/test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]", "test": "node_modules/mocha/bin/mocha --compilers js:babel/register src/test/test.js --reporter nyan" From dd2bf273cdb75791a81637eae3de2a30fa0e059f Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 23:08:08 +0000 Subject: [PATCH 20/58] removes idiotic script error --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dc70034..013ffd8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Run or walk for your transport?", "main": "server.js", "scripts": { - "start": "node run server.js", + "start": "node server.js", "start:dev": "npm run build & nodemon server.js", "build": "watchify src/app.jsx -t [ babelify --presets [ react ] ] -o public/bundle.js -v", "build-test": "browserify src/test/test.js -o src/test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]", From 23d2b5a45c0328099ffdf2590cfa7093fe51aa66 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 23:16:06 +0000 Subject: [PATCH 21/58] add port env variable option --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 6173d57..3a49d47 100644 --- a/server.js +++ b/server.js @@ -15,7 +15,9 @@ var server = new Hapi.Server({ server.register(inert, function () {}); -server.connection({port: 8000}); +server.connection({ + port: Number(process.env.PORT || 8000) +}); server.route(routes); server.start(function () { From 9f594621ae9e9870c6e17d98ba4d68abbdc9ad8f Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 23:19:39 +0000 Subject: [PATCH 22/58] stops ignoring crucial files --- .gitignore | 2 -- public/bundle.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 public/bundle.js diff --git a/.gitignore b/.gitignore index 44f4025..fd66f2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ node_modules/ -public/bundle.js npm-debug.log test/ -src/ .gitattributes diff --git a/public/bundle.js b/public/bundle.js new file mode 100644 index 0000000..8beb3b8 --- /dev/null +++ b/public/bundle.js @@ -0,0 +1 @@ +console.error("SyntaxError: {\n \"name\": \"run\",\n \"version\": \"1.0.0\",\n \"description\": \"Run or walk for your transport?\",\n \"main\": \"server.js\",\n \"scripts\": {\n \"start\":\n \"start:dev\": \"npm run build & nodemon server.js\",\n \"build\": \"watchify src/app.jsx -t [ babelify --presets [ react ] ] -o public/bundle.js -v\",\n \"build-test\": \"browserify src/test/test.js -o src/test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]\",\n \"test\": \"node_modules/mocha/bin/mocha --compilers js:babel/register src/test/test.js --reporter nyan\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/minaorangina/run.git\"\n },\n \"keywords\": [\n \"tfl\",\n \"transport\",\n \"journey\",\n \"commute\",\n \"productivity\"\n ],\n \"author\": \"minaorangina\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"babel-preset-es2015\": \"^6.3.13\",\n \"babel-preset-react\": \"^6.3.13\",\n \"babelify\": \"^7.2.0\",\n \"hapi\": \"^11.1.4\",\n \"inert\": \"^3.2.0\",\n \"jquery\": \"^2.1.4\",\n \"moment\": \"^2.10.6\",\n \"react\": \"^0.14.3\",\n \"react-dom\": \"^0.14.3\",\n \"request\": \"^2.67.0\",\n \"soap\": \"^0.11.1\"\n },\n \"devDependencies\": {\n \"browserify\": \"^12.0.1\",\n \"chai\": \"^3.4.1\",\n \"jsdom\": \"^7.2.1\",\n \"mocha\": \"^2.3.4\",\n \"nodemon\": \"^1.8.1\",\n \"react-addons-test-utils\": \"^0.14.3\",\n \"watchify\": \"^3.6.1\"\n }\n}\n : Unexpected token :"); \ No newline at end of file From f53779ee496bed8c4fd990dd20263867009665e3 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 23:49:58 +0000 Subject: [PATCH 23/58] add Procfile --- Procfile | 1 + 1 file changed, 1 insertion(+) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..6f86b16 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: node server.js \ No newline at end of file From b7a91a817bb69307f771e0a1600dd44207549324 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 31 Jan 2016 23:55:40 +0000 Subject: [PATCH 24/58] adjust bundle --- public/bundle.js | 31725 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 31724 insertions(+), 1 deletion(-) diff --git a/public/bundle.js b/public/bundle.js index 8beb3b8..afaab56 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -1 +1,31724 @@ -console.error("SyntaxError: {\n \"name\": \"run\",\n \"version\": \"1.0.0\",\n \"description\": \"Run or walk for your transport?\",\n \"main\": \"server.js\",\n \"scripts\": {\n \"start\":\n \"start:dev\": \"npm run build & nodemon server.js\",\n \"build\": \"watchify src/app.jsx -t [ babelify --presets [ react ] ] -o public/bundle.js -v\",\n \"build-test\": \"browserify src/test/test.js -o src/test/test-bundle.js -t [ babelify --presets [ es2015 react ] ]\",\n \"test\": \"node_modules/mocha/bin/mocha --compilers js:babel/register src/test/test.js --reporter nyan\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/minaorangina/run.git\"\n },\n \"keywords\": [\n \"tfl\",\n \"transport\",\n \"journey\",\n \"commute\",\n \"productivity\"\n ],\n \"author\": \"minaorangina\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"babel-preset-es2015\": \"^6.3.13\",\n \"babel-preset-react\": \"^6.3.13\",\n \"babelify\": \"^7.2.0\",\n \"hapi\": \"^11.1.4\",\n \"inert\": \"^3.2.0\",\n \"jquery\": \"^2.1.4\",\n \"moment\": \"^2.10.6\",\n \"react\": \"^0.14.3\",\n \"react-dom\": \"^0.14.3\",\n \"request\": \"^2.67.0\",\n \"soap\": \"^0.11.1\"\n },\n \"devDependencies\": {\n \"browserify\": \"^12.0.1\",\n \"chai\": \"^3.4.1\",\n \"jsdom\": \"^7.2.1\",\n \"mocha\": \"^2.3.4\",\n \"nodemon\": \"^1.8.1\",\n \"react-addons-test-utils\": \"^0.14.3\",\n \"watchify\": \"^3.6.1\"\n }\n}\n : Unexpected token :"); \ No newline at end of file +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; +},{}],4:[function(require,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 camelizeStyleName + * @typechecks + */ + +'use strict'; + +var camelize = require('./camelize'); + +var msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; +},{"./camelize":3}],5:[function(require,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 containsNode + * @typechecks + */ + +'use strict'; + +var isTextNode = require('./isTextNode'); + +/*eslint-disable no-bitwise */ + +/** + * Checks if a given DOM node contains or is another DOM node. + * + * @param {?DOMNode} outerNode Outer DOM node. + * @param {?DOMNode} innerNode Inner DOM node. + * @return {boolean} True if `outerNode` contains or is `innerNode`. + */ +function containsNode(_x, _x2) { + var _again = true; + + _function: while (_again) { + var outerNode = _x, + innerNode = _x2; + _again = false; + + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + _x = outerNode; + _x2 = innerNode.parentNode; + _again = true; + continue _function; + } else if (outerNode.contains) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } + } +} + +module.exports = containsNode; +},{"./isTextNode":18}],6:[function(require,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 createArrayFromMixed + * @typechecks + */ + +'use strict'; + +var toArray = require('./toArray'); + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; +},{"./toArray":26}],7:[function(require,module,exports){ +(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 createNodesFromMarkup + * @typechecks + */ + +/*eslint-disable fb-www/unsafe-html*/ + +'use strict'; + +var ExecutionEnvironment = require('./ExecutionEnvironment'); + +var createArrayFromMixed = require('./createArrayFromMixed'); +var getMarkupWrap = require('./getMarkupWrap'); +var invariant = require('./invariant'); + +/** + * Dummy container used to render all markup. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +} + +/** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * diff --git a/server.js b/start.js similarity index 100% rename from server.js rename to start.js diff --git a/webpack.config.js b/webpack.config.js index 820d057..f4185fd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,11 @@ 'use strict'; +var webpack = require('webpack'); + module.exports = { - entry: "./public/src/app.jsx", + entry: [ + './public/src/app.jsx' + ], output: { path: __dirname, filename: "./public/bundle.js" From bc15f2785b538b0fa2c06d9fa0f2cf0ab22bbeaf Mon Sep 17 00:00:00 2001 From: Mina Date: Sat, 5 Mar 2016 21:38:10 +0000 Subject: [PATCH 40/58] moves images into img directory --- manifest.json | 2 +- public/bundle.js | 6 +++--- public/{ => img}/bus.gif | Bin public/{ => img}/dlr.jpg | Bin public/{ => img}/rail.png | Bin public/{ => img}/running.png | Bin public/src/components/bus-arrivals.jsx | 2 +- public/src/components/dlr-arrivals.jsx | 2 +- public/src/components/train-arrivals.jsx | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) rename public/{ => img}/bus.gif (100%) rename public/{ => img}/dlr.jpg (100%) rename public/{ => img}/rail.png (100%) rename public/{ => img}/running.png (100%) diff --git a/manifest.json b/manifest.json index 3cc5cd4..f7eed86 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "display": "standalone", "icons": [ { - "src": "./public/running.png", + "src": "./public/img/running.png", "sizes": "128x128", "type": "image/png", "density": "0.75" diff --git a/public/bundle.js b/public/bundle.js index a058568..12fc222 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -19791,7 +19791,7 @@ return React.createElement( 'div', { key: i }, - React.createElement('img', { src: 'static/bus.gif', width: '20px' }), + React.createElement('img', { src: 'static/img/bus.gif', width: '20px' }), arrival.lineName, ' to ', arrival.destinationName, @@ -42523,7 +42523,7 @@ return React.createElement( 'div', { key: i }, - React.createElement('img', { src: 'static/dlr.jpg', width: '20px' }), + React.createElement('img', { src: 'static/img/dlr.jpg', width: '20px' }), arrival.lineName, ' to ', arrival.destinationName, @@ -42617,7 +42617,7 @@ return React.createElement( 'div', { key: i }, - React.createElement('img', { src: 'static/rail.png', width: '20px' }), + React.createElement('img', { src: 'static/img/rail.png', width: '20px' }), ' ', destination, ' @ ', diff --git a/public/bus.gif b/public/img/bus.gif similarity index 100% rename from public/bus.gif rename to public/img/bus.gif diff --git a/public/dlr.jpg b/public/img/dlr.jpg similarity index 100% rename from public/dlr.jpg rename to public/img/dlr.jpg diff --git a/public/rail.png b/public/img/rail.png similarity index 100% rename from public/rail.png rename to public/img/rail.png diff --git a/public/running.png b/public/img/running.png similarity index 100% rename from public/running.png rename to public/img/running.png diff --git a/public/src/components/bus-arrivals.jsx b/public/src/components/bus-arrivals.jsx index bccd278..17b4029 100644 --- a/public/src/components/bus-arrivals.jsx +++ b/public/src/components/bus-arrivals.jsx @@ -52,7 +52,7 @@ var BusArrivals = React.createClass({ var time = moment.duration(arrival.timeToStation, 'seconds').humanize(true); - return
{ arrival.lineName } to { arrival.destinationName } -> { time }
+ return
{ arrival.lineName } to { arrival.destinationName } -> { time }
}) } diff --git a/public/src/components/dlr-arrivals.jsx b/public/src/components/dlr-arrivals.jsx index b2ce4a8..9c37bdc 100644 --- a/public/src/components/dlr-arrivals.jsx +++ b/public/src/components/dlr-arrivals.jsx @@ -42,7 +42,7 @@ var DLRArrivals = React.createClass({ var time = moment.duration(arrival.timeToStation, 'seconds').humanize(true); - return
{ arrival.lineName } to { arrival.destinationName } -> { time }
+ return
{ arrival.lineName } to { arrival.destinationName } -> { time }
}) } diff --git a/public/src/components/train-arrivals.jsx b/public/src/components/train-arrivals.jsx index 99665e1..b04f18b 100644 --- a/public/src/components/train-arrivals.jsx +++ b/public/src/components/train-arrivals.jsx @@ -61,7 +61,7 @@ var TrainArrivals = React.createClass({ var destination = arrival.destination.location[0].locationName; var time = moment.duration(arrival.timeToStation, 'seconds').humanize(true); - return
{ destination } @ { arrival.std } ->
+ return
{ destination } @ { arrival.std } ->
}) } From 21a2330877c37095e7a42f9bcabe313a212b34ba Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 09:55:25 +0000 Subject: [PATCH 41/58] adds whitespace --- start.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/start.js b/start.js index 3a49d47..fdab136 100644 --- a/start.js +++ b/start.js @@ -2,6 +2,7 @@ var Hapi = require('hapi'); var Path = require('path'); var inert = require('inert'); var routes = require('./routes.js'); + var server = new Hapi.Server({ connections: { @@ -18,7 +19,9 @@ server.register(inert, function () {}); server.connection({ port: Number(process.env.PORT || 8000) }); + server.route(routes); + server.start(function () { console.log("Server running at port:", server.info.uri); From 4a2fc3fb04bf854d1fc155497a19ee4b0cd4c9fb Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 10:11:17 +0000 Subject: [PATCH 42/58] change development script command to `npm run dev` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b902345..30d960f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "start.js", "scripts": { "start": "node start.js", - "start:dev": "webpack --progress --colors --inline & node start.js", + "dev": "webpack --progress --colors --inline & node start.js", "build": "webpack --watch", "test": "node_modules/mocha/bin/mocha --compilers js:babel-core/register 'test/unit/**/*.@(js|jsx)'" }, From fa6d2b92d510ca91e56beb44fdc99173ee53a20f Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 10:32:22 +0000 Subject: [PATCH 43/58] updates webpack loaders and babel presets to most recent versions. --- package.json | 6 +++--- public/main.css | 8 -------- public/src/components/landing.jsx | 1 + 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 public/main.css create mode 100644 public/src/components/landing.jsx diff --git a/package.json b/package.json index 30d960f..28a7e5e 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,9 @@ "soap": "^0.11.1" }, "devDependencies": { - "babel-core": "^6.6.4", - "babel-loader": "^6.2.2", - "babel-preset-es2015": "^6.3.13", + "babel-core": "^6.6.5", + "babel-loader": "^6.2.4", + "babel-preset-es2015": "^6.6.0", "babel-preset-react": "^6.5.0", "chai": "^3.4.1", "css-loader": "^0.23.1", diff --git a/public/main.css b/public/main.css deleted file mode 100644 index c4b8834..0000000 --- a/public/main.css +++ /dev/null @@ -1,8 +0,0 @@ -.display-none { - display: none; -} - -body { - font-size: 30px; - font-family: sans-serif; -} diff --git a/public/src/components/landing.jsx b/public/src/components/landing.jsx new file mode 100644 index 0000000..ad9a93a --- /dev/null +++ b/public/src/components/landing.jsx @@ -0,0 +1 @@ +'use strict'; From 063191d1dd08982e1c06a7d217114b84e7244a75 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 11:44:57 +0000 Subject: [PATCH 44/58] sets up DOM testing with es6 --- .babelrc | 2 +- .jshintrc | 4 ++++ package.json | 4 ++-- public/src/components/landing.jsx | 18 ++++++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .jshintrc diff --git a/.babelrc b/.babelrc index a0765e1..2b93ed6 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { - "presets": ["es2015"] + "presets": ["react", "es2015"] } diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..98cf8d7 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,4 @@ +{ + "esversion": 6, + "node": true +} diff --git a/package.json b/package.json index 28a7e5e..40a1ac7 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "node start.js", "dev": "webpack --progress --colors --inline & node start.js", "build": "webpack --watch", - "test": "node_modules/mocha/bin/mocha --compilers js:babel-core/register 'test/unit/**/*.@(js|jsx)'" + "test": "node_modules/mocha/bin/mocha --compilers js:babel-core/register --require ./test/test_helpers.js 'test/unit/**/*.@(js|jsx)'" }, "repository": { "type": "git", @@ -43,7 +43,7 @@ "babel-preset-react": "^6.5.0", "chai": "^3.4.1", "css-loader": "^0.23.1", - "jsdom": "^7.2.1", + "jsdom": "^7.2.2", "mocha": "^2.3.4", "node-sass": "^3.4.2", "nodemon": "^1.9.1", diff --git a/public/src/components/landing.jsx b/public/src/components/landing.jsx index ad9a93a..1fce198 100644 --- a/public/src/components/landing.jsx +++ b/public/src/components/landing.jsx @@ -1 +1,19 @@ 'use strict'; + +import React from 'react'; + +const Landing = React.createClass({ + + render () { + + return ( +
+

+ Home or Away? +

+
+ ); + } +}) + +export default Landing From 14fc01f18123dbc54d582828d2ebb0eeab4842cc Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 11:55:34 +0000 Subject: [PATCH 45/58] TDD for contents of Landing.jsx --- public/src/components/landing.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/components/landing.jsx b/public/src/components/landing.jsx index 1fce198..5432a1e 100644 --- a/public/src/components/landing.jsx +++ b/public/src/components/landing.jsx @@ -1,6 +1,7 @@ 'use strict'; import React from 'react'; +import RaisedButton from 'material-ui/lib/raised-button'; const Landing = React.createClass({ @@ -8,12 +9,11 @@ const Landing = React.createClass({ return (
-

- Home or Away? -

+ +
); } -}) +}); export default Landing From 694ca154260653abb4849e9831bbf122a7d0ee11 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 13:40:35 +0000 Subject: [PATCH 46/58] adds watch flag to webpack npm script --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 40a1ac7..22e69a6 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "start.js", "scripts": { "start": "node start.js", - "dev": "webpack --progress --colors --inline & node start.js", - "build": "webpack --watch", + "dev": "webpack --progress --colors --inline --watch & node start.js", + "build": "webpack", "test": "node_modules/mocha/bin/mocha --compilers js:babel-core/register --require ./test/test_helpers.js 'test/unit/**/*.@(js|jsx)'" }, "repository": { From 4d2537cae5804485278d365607c76b8650d910fd Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 13:43:04 +0000 Subject: [PATCH 47/58] ES6ifys and cleans up code. solves #3 --- public/bundle.js | 9596 ++++++++++++++++++- public/index.html | 1 - public/src/app.jsx | 9 +- public/src/components/app-container.jsx | 27 +- public/src/components/bus-arrivals.jsx | 20 +- public/src/components/direction-buttons.jsx | 17 + public/src/components/dlr-arrivals.jsx | 20 +- public/src/components/landing.jsx | 19 - public/src/components/train-arrivals.jsx | 22 +- test/unit/app-container.js | 14 +- 10 files changed, 9595 insertions(+), 150 deletions(-) create mode 100644 public/src/components/direction-buttons.jsx delete mode 100644 public/src/components/landing.jsx diff --git a/public/bundle.js b/public/bundle.js index 12fc222..da6788b 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -53,13 +53,23 @@ 'use strict'; - var React = __webpack_require__(2); - var ReactDOM = __webpack_require__(159); - var AppContainer = __webpack_require__(160); + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(159); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _appContainer = __webpack_require__(160); + + var _appContainer2 = _interopRequireDefault(_appContainer); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } __webpack_require__(264); - ReactDOM.render(React.createElement(AppContainer, null), document.getElementsByClassName("container")[0]); + _reactDom2.default.render(_react2.default.createElement(_appContainer2.default, null), document.getElementsByClassName("container")[0]); /***/ }, /* 2 */ @@ -19668,17 +19678,36 @@ "use strict"; - function _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; } + Object.defineProperty(exports, "__esModule", { + value: true + }); - var React = __webpack_require__(2); - var BusArrivals = __webpack_require__(161); - var DLRArrivals = __webpack_require__(262); - var TrainArrivals = __webpack_require__(263); + var _react = __webpack_require__(2); - var AppContainer = React.createClass({ - displayName: 'AppContainer', + var _react2 = _interopRequireDefault(_react); + + var _busArrivals = __webpack_require__(161); + + var _busArrivals2 = _interopRequireDefault(_busArrivals); + + var _dlrArrivals = __webpack_require__(262); + + var _dlrArrivals2 = _interopRequireDefault(_dlrArrivals); + + var _trainArrivals = __webpack_require__(263); + + var _trainArrivals2 = _interopRequireDefault(_trainArrivals); + + var _directionButtons = __webpack_require__(268); + var _directionButtons2 = _interopRequireDefault(_directionButtons); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _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; } + + var AppContainer = _react2.default.createClass({ + displayName: 'AppContainer', getInitialState: function getInitialState() { return { @@ -19688,61 +19717,65 @@ toHome: true }; }, - updateState: function updateState(transport, data) { this.setState(_defineProperty({}, transport, data)); }, - changeDirection: function changeDirection() { this.setState({ toHome: !this.state.toHome }); }, - render: function render() { - return React.createElement( + return _react2.default.createElement( 'div', null, - React.createElement(BusArrivals, { arrivals: this.state.busArrivals, updateState: this.updateState, toHome: this.state.toHome }), - React.createElement(DLRArrivals, { arrivals: this.state.DLRArrivals, updateState: this.updateState, toHome: this.state.toHome }), - React.createElement(TrainArrivals, { arrivals: this.state.trainArrivals, updateState: this.updateState, toHome: this.state.toHome }), - React.createElement( - 'button', - { onClick: this.changeDirection }, - 'Switch direction' - ) + _react2.default.createElement(_busArrivals2.default, { arrivals: this.state.busArrivals, updateState: this.updateState, toHome: this.state.toHome }), + _react2.default.createElement(_dlrArrivals2.default, { arrivals: this.state.DLRArrivals, updateState: this.updateState, toHome: this.state.toHome }), + _react2.default.createElement(_trainArrivals2.default, { arrivals: this.state.trainArrivals, updateState: this.updateState, toHome: this.state.toHome }), + _react2.default.createElement(_directionButtons2.default, null) ); } }); - module.exports = AppContainer; + exports.default = AppContainer; /***/ }, /* 161 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; + 'use strict'; - var React = __webpack_require__(2); - var moment = __webpack_require__(162); - var $ = __webpack_require__(261); + Object.defineProperty(exports, "__esModule", { + value: true + }); - var BusArrivals = React.createClass({ - displayName: 'BusArrivals', + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _moment = __webpack_require__(162); + + var _moment2 = _interopRequireDefault(_moment); + + var _jquery = __webpack_require__(261); + var _jquery2 = _interopRequireDefault(_jquery); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var BusArrivals = _react2.default.createClass({ + displayName: 'BusArrivals', componentWillMount: function componentWillMount() { this.getBusArrivals(); }, - getBusArrivals: function getBusArrivals() { var self = this; - $.ajax({ + _jquery2.default.ajax({ url: '/getTfLArrivals?mode=bus', success: function success(data) { @@ -19754,25 +19787,24 @@ } }); }, - render: function render() { var busArrivals = this.props.arrivals; - return React.createElement( + return _react2.default.createElement( 'div', { className: 'bus' }, - React.createElement( + _react2.default.createElement( 'h3', null, 'St Barnabas Church' ), - React.createElement( + _react2.default.createElement( 'div', { className: busArrivals.length === 0 ? "" : "display-none" }, 'Ain\'t got no departures!' ), - React.createElement( + _react2.default.createElement( 'ul', null, busArrivals.sort(function (a, b) { @@ -19786,12 +19818,12 @@ } }).map(function (arrival, i) { - var time = moment.duration(arrival.timeToStation, 'seconds').humanize(true); + var time = _moment2.default.duration(arrival.timeToStation, 'seconds').humanize(true); - return React.createElement( + return _react2.default.createElement( 'div', { key: i }, - React.createElement('img', { src: 'static/img/bus.gif', width: '20px' }), + _react2.default.createElement('img', { src: 'static/img/bus.gif', width: '20px' }), arrival.lineName, ' to ', arrival.destinationName, @@ -19804,7 +19836,7 @@ } }); - module.exports = BusArrivals; + exports.default = BusArrivals; /***/ }, /* 162 */ @@ -42465,25 +42497,36 @@ /* 262 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; + 'use strict'; - var React = __webpack_require__(2); - var moment = __webpack_require__(162); - var $ = __webpack_require__(261); + Object.defineProperty(exports, "__esModule", { + value: true + }); - var DLRArrivals = React.createClass({ - displayName: 'DLRArrivals', + var _react = __webpack_require__(2); + var _react2 = _interopRequireDefault(_react); + var _moment = __webpack_require__(162); + + var _moment2 = _interopRequireDefault(_moment); + + var _jquery = __webpack_require__(261); + + var _jquery2 = _interopRequireDefault(_jquery); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var DLRArrivals = _react2.default.createClass({ + displayName: 'DLRArrivals', componentWillMount: function componentWillMount() { this.getDLRArrivals(); }, - getDLRArrivals: function getDLRArrivals() { var self = this; - $.ajax({ + _jquery2.default.ajax({ url: '/getTfLArrivals?mode=dlr', success: function success(data) { @@ -42495,35 +42538,34 @@ } }); }, - render: function render() { var DLRArrivals = this.props.arrivals; - return React.createElement( + return _react2.default.createElement( 'div', { className: 'dlr' }, - React.createElement( + _react2.default.createElement( 'h3', null, 'West Ham' ), - React.createElement( + _react2.default.createElement( 'div', { className: DLRArrivals.length === 0 ? "" : "display-none" }, 'Ain\'t got no departures!' ), - React.createElement( + _react2.default.createElement( 'ul', null, DLRArrivals.map(function (arrival, i) { - var time = moment.duration(arrival.timeToStation, 'seconds').humanize(true); + var time = _moment2.default.duration(arrival.timeToStation, 'seconds').humanize(true); - return React.createElement( + return _react2.default.createElement( 'div', { key: i }, - React.createElement('img', { src: 'static/img/dlr.jpg', width: '20px' }), + _react2.default.createElement('img', { src: 'static/img/dlr.jpg', width: '20px' }), arrival.lineName, ' to ', arrival.destinationName, @@ -42536,27 +42578,38 @@ } }); - module.exports = DLRArrivals; + exports.default = DLRArrivals; /***/ }, /* 263 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; + 'use strict'; - var React = __webpack_require__(2); - var moment = __webpack_require__(162); - var $ = __webpack_require__(261); + Object.defineProperty(exports, "__esModule", { + value: true + }); - var TrainArrivals = React.createClass({ - displayName: 'TrainArrivals', + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _moment = __webpack_require__(162); + + var _moment2 = _interopRequireDefault(_moment); + + var _jquery = __webpack_require__(261); + var _jquery2 = _interopRequireDefault(_jquery); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var TrainArrivals = _react2.default.createClass({ + displayName: 'TrainArrivals', componentWillMount: function componentWillMount() { this.getTrainArrivals(); }, - shouldComponentUpdate: function shouldComponentUpdate(nextProps) { var currentTrains = this.props.arrivals; @@ -42576,12 +42629,11 @@ }); } }, - getTrainArrivals: function getTrainArrivals() { var self = this; var direction = this.props.toHome ? 'toHome' : 'fromHome'; - $.ajax({ + _jquery2.default.ajax({ url: '/getTrainArrivals?direction=' + direction, success: function success(data) { @@ -42592,32 +42644,31 @@ } }); }, - render: function render() { - return React.createElement( + return _react2.default.createElement( 'div', { className: 'train' }, - this.props.arrivals.arrivals.length > 0 ? React.createElement( + this.props.arrivals.arrivals.length > 0 ? _react2.default.createElement( 'div', null, - React.createElement( + _react2.default.createElement( 'h3', null, this.props.arrivals.destination ), - React.createElement( + _react2.default.createElement( 'ul', null, this.props.arrivals.arrivals.map(function (arrival, i) { var destination = arrival.destination.location[0].locationName; - var time = moment.duration(arrival.timeToStation, 'seconds').humanize(true); + var time = _moment2.default.duration(arrival.timeToStation, 'seconds').humanize(true); - return React.createElement( + return _react2.default.createElement( 'div', { key: i }, - React.createElement('img', { src: 'static/img/rail.png', width: '20px' }), + _react2.default.createElement('img', { src: 'static/img/rail.png', width: '20px' }), ' ', destination, ' @ ', @@ -42626,10 +42677,10 @@ ); }) ) - ) : React.createElement( + ) : _react2.default.createElement( 'div', null, - React.createElement( + _react2.default.createElement( 'h3', null, ' No trains to ', @@ -42640,7 +42691,7 @@ } }); - module.exports = TrainArrivals; + exports.default = TrainArrivals; /***/ }, /* 264 */ @@ -42992,5 +43043,9394 @@ } +/***/ }, +/* 268 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _raisedButton = __webpack_require__(269); + + var _raisedButton2 = _interopRequireDefault(_raisedButton); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var DirectionButtons = function DirectionButtons() { + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_raisedButton2.default, { label: "Home" }), + _react2.default.createElement(_raisedButton2.default, { label: "Away" }) + ); + }; + + exports.default = DirectionButtons; + +/***/ }, +/* 269 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _simpleAssign = __webpack_require__(270); + + var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _transitions = __webpack_require__(271); + + var _transitions2 = _interopRequireDefault(_transitions); + + var _colorManipulator = __webpack_require__(272); + + var _colorManipulator2 = _interopRequireDefault(_colorManipulator); + + var _children = __webpack_require__(274); + + var _children2 = _interopRequireDefault(_children); + + var _enhancedButton = __webpack_require__(277); + + var _enhancedButton2 = _interopRequireDefault(_enhancedButton); + + var _paper = __webpack_require__(330); + + var _paper2 = _interopRequireDefault(_paper); + + var _getMuiTheme = __webpack_require__(290); + + var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + function validateLabel(props, propName, componentName) { + if (!props.children && !props.label) { + return new Error('Required prop label or children was not specified in ' + componentName + '.'); + } + } + + function getStyles(props, state) { + var _state$muiTheme = state.muiTheme; + var baseTheme = _state$muiTheme.baseTheme; + var button = _state$muiTheme.button; + var raisedButton = _state$muiTheme.raisedButton; + var disabled = props.disabled; + var disabledBackgroundColor = props.disabledBackgroundColor; + var disabledLabelColor = props.disabledLabelColor; + var fullWidth = props.fullWidth; + var icon = props.icon; + var labelPosition = props.labelPosition; + var primary = props.primary; + var secondary = props.secondary; + var style = props.style; + + + var amount = primary || secondary ? 0.4 : 0.08; + + var backgroundColor = raisedButton.color; + var labelColor = raisedButton.textColor; + + if (disabled) { + backgroundColor = disabledBackgroundColor || raisedButton.disabledColor; + labelColor = disabledLabelColor || raisedButton.disabledTextColor; + } else if (primary) { + backgroundColor = raisedButton.primaryColor; + labelColor = raisedButton.primaryTextColor; + } else if (secondary) { + backgroundColor = raisedButton.secondaryColor; + labelColor = raisedButton.secondaryTextColor; + } + + return { + root: { + display: 'inline-block', + minWidth: fullWidth ? '100%' : button.minWidth, + height: button.height, + transition: _transitions2.default.easeOut() + }, + container: { + position: 'relative', + height: '100%', + width: '100%', + padding: 0, + overflow: 'hidden', + borderRadius: 2, + transition: _transitions2.default.easeOut(), + backgroundColor: backgroundColor + }, + label: { + position: 'relative', + verticalAlign: 'middle', + opacity: 1, + fontSize: '14px', + letterSpacing: 0, + textTransform: raisedButton.textTransform || button.textTransform || 'uppercase', + fontWeight: raisedButton.fontWeight, + margin: 0, + userSelect: 'none', + paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + lineHeight: style && style.height || button.height + 'px', + color: labelColor + }, + overlay: { + backgroundColor: state.hovered && !disabled && _colorManipulator2.default.fade(labelColor, amount), + transition: _transitions2.default.easeOut(), + top: 0 + }, + overlayWhenHovered: {}, + ripple: { + color: labelColor, + opacity: !(primary || secondary) ? 0.1 : 0.16 + } + }; + } + + var RaisedButton = _react2.default.createClass({ + displayName: 'RaisedButton', + + + propTypes: { + /** + * Override the background color. Always takes precedence unless the button is disabled. + */ + backgroundColor: _react2.default.PropTypes.string, + + /** + * This is what will be displayed inside the button. + * If a label is specified, the text within the label prop will + * be displayed. Otherwise, the component will expect children + * which will then be displayed. (In our example, + * we are nesting an `` and a `span` + * that acts as our label to be displayed.) This only + * applies to flat and raised buttons. + */ + children: _react2.default.PropTypes.node, + + /** + * The css class name of the root element. + */ + className: _react2.default.PropTypes.string, + + /** + * Disables the button if set to true. + */ + disabled: _react2.default.PropTypes.bool, + + /** + * Override the background color if the button is disabled. + */ + disabledBackgroundColor: _react2.default.PropTypes.string, + + /** + * Color of the label if disabled is true. + */ + disabledLabelColor: _react2.default.PropTypes.string, + + /** + * If true, then the button will take up the full + * width of its container. + */ + fullWidth: _react2.default.PropTypes.bool, + + /** + * URL to link to when button clicked if `linkButton` is set to true. + */ + href: _react2.default.PropTypes.string, + + /** + * Use this property to display an icon. + */ + icon: _react2.default.PropTypes.node, + + /** + * The label for the button. + */ + label: validateLabel, + + /** + * The color of the label for the button. + */ + labelColor: _react2.default.PropTypes.string, + + /** + * Place label before or after the passed children. + */ + labelPosition: _react2.default.PropTypes.oneOf(['before', 'after']), + + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react2.default.PropTypes.object, + + /** + * Enables use of `href` property to provide a URL to link to if set to true. + */ + linkButton: _react2.default.PropTypes.bool, + + /** + * Callback function for when the mouse is pressed down inside this element. + */ + onMouseDown: _react2.default.PropTypes.func, + + /** + * Callback function for when the mouse enters this element. + */ + onMouseEnter: _react2.default.PropTypes.func, + + /** + * Callback function for when the mouse leaves this element. + */ + onMouseLeave: _react2.default.PropTypes.func, + + /** + * Callback function for when the mouse is realeased + * above this element. + */ + onMouseUp: _react2.default.PropTypes.func, + + /** + * Callback function for when a touchTap event ends. + */ + onTouchEnd: _react2.default.PropTypes.func, + + /** + * Callback function for when a touchTap event starts. + */ + onTouchStart: _react2.default.PropTypes.func, + + /** + * If true, colors button according to + * primaryTextColor from the Theme. + */ + primary: _react2.default.PropTypes.bool, + + /** + * Override the inline style of ripple element. + */ + rippleStyle: _react2.default.PropTypes.object, + + /** + * If true, colors button according to secondaryTextColor from the theme. + * The primary prop has precendent if set to true. + */ + secondary: _react2.default.PropTypes.bool, + + /** + * Override the inline-styles of the root element. + */ + style: _react2.default.PropTypes.object + }, + + contextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + childContextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + getDefaultProps: function getDefaultProps() { + return { + disabled: false, + labelPosition: 'after', + fullWidth: false, + primary: false, + secondary: false + }; + }, + + getInitialState: function getInitialState() { + var zDepth = this.props.disabled ? 0 : 1; + return { + hovered: false, + touched: false, + initialZDepth: zDepth, + zDepth: zDepth, + muiTheme: this.context.muiTheme || (0, _getMuiTheme2.default)() + }; + }, + getChildContext: function getChildContext() { + return { + muiTheme: this.state.muiTheme + }; + }, + componentWillReceiveProps: function componentWillReceiveProps(nextProps, nextContext) { + var zDepth = nextProps.disabled ? 0 : 1; + this.setState({ + zDepth: zDepth, + initialZDepth: zDepth, + muiTheme: nextContext.muiTheme || this.state.muiTheme + }); + }, + _handleMouseDown: function _handleMouseDown(event) { + //only listen to left clicks + if (event.button === 0) { + this.setState({ zDepth: this.state.initialZDepth + 1 }); + } + if (this.props.onMouseDown) this.props.onMouseDown(event); + }, + _handleMouseUp: function _handleMouseUp(event) { + this.setState({ zDepth: this.state.initialZDepth }); + if (this.props.onMouseUp) this.props.onMouseUp(event); + }, + _handleMouseLeave: function _handleMouseLeave(event) { + if (!this.refs.container.isKeyboardFocused()) this.setState({ zDepth: this.state.initialZDepth, hovered: false }); + if (this.props.onMouseLeave) this.props.onMouseLeave(event); + }, + _handleMouseEnter: function _handleMouseEnter(event) { + if (!this.refs.container.isKeyboardFocused() && !this.state.touch) { + this.setState({ hovered: true }); + } + if (this.props.onMouseEnter) this.props.onMouseEnter(event); + }, + _handleTouchStart: function _handleTouchStart(event) { + this.setState({ + touch: true, + zDepth: this.state.initialZDepth + 1 + }); + if (this.props.onTouchStart) this.props.onTouchStart(event); + }, + _handleTouchEnd: function _handleTouchEnd(event) { + this.setState({ zDepth: this.state.initialZDepth }); + if (this.props.onTouchEnd) this.props.onTouchEnd(event); + }, + + + _handleKeyboardFocus: function _handleKeyboardFocus(styles) { + return function (event, keyboardFocused) { + if (keyboardFocused && !undefined.props.disabled) { + undefined.setState({ zDepth: undefined.state.initialZDepth + 1 }); + var amount = undefined.props.primary || undefined.props.secondary ? 0.4 : 0.08; + undefined.refs.overlay.style.backgroundColor = _colorManipulator2.default.fade((0, _simpleAssign2.default)({}, styles.label, undefined.props.labelStyle).color, amount); + } else if (!undefined.state.hovered) { + undefined.setState({ zDepth: undefined.state.initialZDepth }); + undefined.refs.overlay.style.backgroundColor = 'transparent'; + } + }; + }, + + render: function render() { + var _props = this.props; + var children = _props.children; + var className = _props.className; + var disabled = _props.disabled; + var icon = _props.icon; + var label = _props.label; + var labelPosition = _props.labelPosition; + var labelStyle = _props.labelStyle; + var primary = _props.primary; + var rippleStyle = _props.rippleStyle; + var secondary = _props.secondary; + + var other = _objectWithoutProperties(_props, ['children', 'className', 'disabled', 'icon', 'label', 'labelPosition', 'labelStyle', 'primary', 'rippleStyle', 'secondary']); + + var prepareStyles = this.state.muiTheme.prepareStyles; + + + var styles = getStyles(this.props, this.state); + var mergedRippleStyles = (0, _simpleAssign2.default)({}, styles.ripple, rippleStyle); + + var buttonEventHandlers = disabled && { + onMouseDown: this._handleMouseDown, + onMouseUp: this._handleMouseUp, + onMouseLeave: this._handleMouseLeave, + onMouseEnter: this._handleMouseEnter, + onTouchStart: this._handleTouchStart, + onTouchEnd: this._handleTouchEnd, + onKeyboardFocus: this._handleKeyboardFocus + }; + + var labelElement = label && _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + label + ); + + var iconCloned = icon && _react2.default.cloneElement(icon, { + color: styles.label.color, + style: { + verticalAlign: 'middle', + marginLeft: labelPosition === 'before' ? 0 : 12, + marginRight: labelPosition === 'before' ? 12 : 0 + } + }); + + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; + var enhancedButtonChildren = _children2.default.create(childrenFragment); + + return _react2.default.createElement( + _paper2.default, + { + className: className, + style: (0, _simpleAssign2.default)(styles.root, this.props.style), + zDepth: this.state.zDepth + }, + _react2.default.createElement( + _enhancedButton2.default, + _extends({}, other, buttonEventHandlers, { + ref: 'container', + disabled: disabled, + style: styles.container, + focusRippleColor: mergedRippleStyles.color, + touchRippleColor: mergedRippleStyles.color, + focusRippleOpacity: mergedRippleStyles.opacity, + touchRippleOpacity: mergedRippleStyles.opacity + }), + _react2.default.createElement( + 'div', + { + ref: 'overlay', + style: prepareStyles(styles.overlay) + }, + enhancedButtonChildren + ) + ) + ); + } + }); + + exports.default = RaisedButton; + module.exports = exports['default']; + +/***/ }, +/* 270 */ +/***/ function(module, exports) { + + module.exports = function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + +/***/ }, +/* 271 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + + easeOutFunction: 'cubic-bezier(0.23, 1, 0.32, 1)', + easeInOutFunction: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)', + + easeOut: function easeOut(duration, property, delay, easeFunction) { + easeFunction = easeFunction || this.easeOutFunction; + + if (property && Object.prototype.toString.call(property) === '[object Array]') { + var transitions = ''; + for (var i = 0; i < property.length; i++) { + if (transitions) transitions += ','; + transitions += this.create(duration, property[i], delay, easeFunction); + } + + return transitions; + } else { + return this.create(duration, property, delay, easeFunction); + } + }, + create: function create(duration, property, delay, easeFunction) { + duration = duration || '450ms'; + property = property || 'all'; + delay = delay || '0ms'; + easeFunction = easeFunction || 'linear'; + + return property + ' ' + duration + ' ' + easeFunction + ' ' + delay; + } + }; + module.exports = exports['default']; + +/***/ }, +/* 272 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _warning = __webpack_require__(273); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = { + + /** + * The relative brightness of any point in a colorspace, normalized to 0 for + * darkest black and 1 for lightest white. RGB colors only. Does not take + * into account alpha values. + * + * TODO: + * - Take into account alpha values. + * - Identify why there are minor discrepancies for some use cases + * (i.e. #F0F & #FFF). Note that these cases rarely occur. + * + * Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef + */ + + luminance: function luminance(color) { + color = this._decomposeColor(color); + + if (color.type.indexOf('rgb') > -1) { + var rgb = color.values.map(function (val) { + val /= 255; // normalized + return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); + }); + + return 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]; + } else { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Calculating the relative luminance is not available\n for HSL and HSLA.') : undefined; + + return -1; + } + }, + + + /** + * @params: + * additionalValue = An extra value that has been calculated but not included + * with the original color object, such as an alpha value. + */ + _convertColorToString: function _convertColorToString(color, additonalValue) { + var str = color.type + '(' + parseInt(color.values[0]) + ', ' + parseInt(color.values[1]) + ', ' + parseInt(color.values[2]); + + if (additonalValue !== undefined) { + str += ', ' + additonalValue + ')'; + } else if (color.values.length === 4) { + str += ', ' + color.values[3] + ')'; + } else { + str += ')'; + } + + return str; + }, + + + // Converts a color from hex format to rgb format. + _convertHexToRGB: function _convertHexToRGB(color) { + if (color.length === 4) { + var extendedColor = '#'; + for (var i = 1; i < color.length; i++) { + extendedColor += color.charAt(i) + color.charAt(i); + } + color = extendedColor; + } + + var values = { + r: parseInt(color.substr(1, 2), 16), + g: parseInt(color.substr(3, 2), 16), + b: parseInt(color.substr(5, 2), 16) + }; + + return 'rgb(' + values.r + ', ' + values.g + ', ' + values.b + ')'; + }, + + + // Returns the type and values of a color of any given type. + _decomposeColor: function _decomposeColor(color) { + if (color.charAt(0) === '#') { + return this._decomposeColor(this._convertHexToRGB(color)); + } + + var marker = color.indexOf('('); + var type = color.substring(0, marker); + var values = color.substring(marker + 1, color.length - 1).split(','); + + return { type: type, values: values }; + }, + + + // Set the absolute transparency of a color. + // Any existing alpha values are overwritten. + fade: function fade(color, amount) { + color = this._decomposeColor(color); + if (color.type === 'rgb' || color.type === 'hsl') color.type += 'a'; + return this._convertColorToString(color, amount); + }, + + + // Desaturates rgb and sets opacity (defaults to 0.15) + lighten: function lighten(color, amount) { + var opacity = arguments.length <= 2 || arguments[2] === undefined ? '0.15' : arguments[2]; + + color = this._decomposeColor(color); + + if (color.type.indexOf('hsl') > -1) { + color.values[2] += amount; + return this._decomposeColor(this._convertColorToString(color)); + } else if (color.type.indexOf('rgb') > -1) { + for (var i = 0; i < 3; i++) { + color.values[i] *= 1 + amount; + if (color.values[i] > 255) color.values[i] = 255; + } + } + + if (color.type.indexOf('a') <= -1) color.type += 'a'; + + return this._convertColorToString(color, opacity); + }, + darken: function darken(color, amount) { + color = this._decomposeColor(color); + + if (color.type.indexOf('hsl') > -1) { + color.values[2] += amount; + return this._decomposeColor(this._convertColorToString(color)); + } else if (color.type.indexOf('rgb') > -1) { + for (var i = 0; i < 3; i++) { + color.values[i] *= 1 - amount; + if (color.values[i] < 0) color.values[i] = 0; + } + } + + return this._convertColorToString(color); + }, + + + // Calculates the contrast ratio between two colors. + // + // Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef + contrastRatio: function contrastRatio(background, foreground) { + var lumA = this.luminance(background); + var lumB = this.luminance(foreground); + + if (lumA >= lumB) { + return ((lumA + 0.05) / (lumB + 0.05)).toFixed(2); + } else { + return ((lumB + 0.05) / (lumA + 0.05)).toFixed(2); + } + }, + + + /** + * Determines how readable a color combination is based on its level. + * Levels are defined from @LeaVerou: + * https://github.com/LeaVerou/contrast-ratio/blob/gh-pages/contrast-ratio.js + */ + contrastRatioLevel: function contrastRatioLevel(background, foreground) { + var levels = { + 'fail': { + range: [0, 3], + color: 'hsl(0, 100%, 40%)' + }, + 'aa-large': { + range: [3, 4.5], + color: 'hsl(40, 100%, 45%)' + }, + 'aa': { + range: [4.5, 7], + color: 'hsl(80, 60%, 45%)' + }, + 'aaa': { + range: [7, 22], + color: 'hsl(95, 60%, 41%)' + } + }; + + var ratio = this.contrastRatio(background, foreground); + + for (var level in levels) { + var range = levels[level].range; + if (ratio >= range[0] && ratio <= range[1]) return level; + } + } + }; + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }, +/* 273 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-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. + */ + + 'use strict'; + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = function() {}; + + if (process.env.NODE_ENV !== 'production') { + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || (/^[s\W]*$/).test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; + } + + module.exports = warning; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }, +/* 274 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactAddonsCreateFragment = __webpack_require__(275); + + var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = { + create: function create(fragments) { + var newFragments = {}; + var validChildrenCount = 0; + var firstKey = undefined; + + //Only create non-empty key fragments + for (var key in fragments) { + var currentChild = fragments[key]; + + if (currentChild) { + if (validChildrenCount === 0) firstKey = key; + newFragments[key] = currentChild; + validChildrenCount++; + } + } + + if (validChildrenCount === 0) return undefined; + if (validChildrenCount === 1) return newFragments[firstKey]; + return (0, _reactAddonsCreateFragment2.default)(newFragments); + }, + extend: function extend(children, extendedProps, extendedChildren) { + return _react2.default.isValidElement(children) ? _react2.default.Children.map(children, function (child) { + var newProps = typeof extendedProps === 'function' ? extendedProps(child) : extendedProps; + + var newChildren = typeof extendedChildren === 'function' ? extendedChildren(child) : extendedChildren ? extendedChildren : child.props.children; + + return _react2.default.cloneElement(child, newProps, newChildren); + }) : children; + } + }; + module.exports = exports['default']; + +/***/ }, +/* 275 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(276).create; + +/***/ }, +/* 276 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 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 ReactFragment + */ + + 'use strict'; + + var ReactChildren = __webpack_require__(111); + var ReactElement = __webpack_require__(43); + + var emptyFunction = __webpack_require__(16); + var invariant = __webpack_require__(14); + var warning = __webpack_require__(26); + + /** + * We used to allow keyed objects to serve as a collection of ReactElements, + * or nested sets. This allowed us a way to explicitly key a set a fragment of + * components. This is now being replaced with an opaque data structure. + * The upgrade path is to call React.addons.createFragment({ key: value }) to + * create a keyed fragment. The resulting data structure is an array. + */ + + var numericPropertyRegex = /^\d+$/; + + var warnedAboutNumeric = false; + + var ReactFragment = { + // Wrap a keyed object in an opaque proxy that warns you if you access any + // of its properties. + create: function (object) { + if (typeof object !== 'object' || !object || Array.isArray(object)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : undefined; + return object; + } + if (ReactElement.isValidElement(object)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : undefined; + return object; + } + + !(object.nodeType !== 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM ' + 'elements are not valid children of React components.') : invariant(false) : undefined; + + var result = []; + + for (var key in object) { + if (process.env.NODE_ENV !== 'production') { + if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : undefined; + warnedAboutNumeric = true; + } + } + ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument); + } + + return result; + } + }; + + module.exports = ReactFragment; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }, +/* 277 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _simpleAssign = __webpack_require__(270); + + var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactAddonsPureRenderMixin = __webpack_require__(278); + + var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + + var _children = __webpack_require__(274); + + var _children2 = _interopRequireDefault(_children); + + var _events = __webpack_require__(281); + + var _events2 = _interopRequireDefault(_events); + + var _keycode = __webpack_require__(282); + + var _keycode2 = _interopRequireDefault(_keycode); + + var _focusRipple = __webpack_require__(283); + + var _focusRipple2 = _interopRequireDefault(_focusRipple); + + var _touchRipple = __webpack_require__(325); + + var _touchRipple2 = _interopRequireDefault(_touchRipple); + + var _getMuiTheme = __webpack_require__(290); + + var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var styleInjected = false; + var listening = false; + var tabPressed = false; + + function injectStyle() { + if (!styleInjected) { + // Remove inner padding and border in Firefox 4+. + var style = document.createElement('style'); + style.innerHTML = '\n button::-moz-focus-inner,\n input::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n '; + + document.body.appendChild(style); + styleInjected = true; + } + } + + function listenForTabPresses() { + if (!listening) { + _events2.default.on(window, 'keydown', function (event) { + tabPressed = (0, _keycode2.default)(event) === 'tab'; + }); + listening = true; + } + } + + var EnhancedButton = _react2.default.createClass({ + displayName: 'EnhancedButton', + + + propTypes: { + centerRipple: _react2.default.PropTypes.bool, + children: _react2.default.PropTypes.node, + containerElement: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.string, _react2.default.PropTypes.element]), + disableFocusRipple: _react2.default.PropTypes.bool, + disableKeyboardFocus: _react2.default.PropTypes.bool, + disableTouchRipple: _react2.default.PropTypes.bool, + disabled: _react2.default.PropTypes.bool, + focusRippleColor: _react2.default.PropTypes.string, + focusRippleOpacity: _react2.default.PropTypes.number, + keyboardFocused: _react2.default.PropTypes.bool, + linkButton: _react2.default.PropTypes.bool, + onBlur: _react2.default.PropTypes.func, + onFocus: _react2.default.PropTypes.func, + onKeyDown: _react2.default.PropTypes.func, + onKeyUp: _react2.default.PropTypes.func, + onKeyboardFocus: _react2.default.PropTypes.func, + onTouchTap: _react2.default.PropTypes.func, + + /** + * Override the inline-styles of the root element. + */ + style: _react2.default.PropTypes.object, + tabIndex: _react2.default.PropTypes.number, + touchRippleColor: _react2.default.PropTypes.string, + touchRippleOpacity: _react2.default.PropTypes.number, + type: _react2.default.PropTypes.string + }, + + contextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + childContextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + mixins: [_reactAddonsPureRenderMixin2.default], + + getDefaultProps: function getDefaultProps() { + return { + containerElement: 'button', + onBlur: function onBlur() {}, + onFocus: function onFocus() {}, + onKeyboardFocus: function onKeyboardFocus() {}, + onKeyDown: function onKeyDown() {}, + onKeyUp: function onKeyUp() {}, + onTouchTap: function onTouchTap() {}, + tabIndex: 0, + type: 'button' + }; + }, + getInitialState: function getInitialState() { + return { + isKeyboardFocused: !this.props.disabled && this.props.keyboardFocused && !this.props.disableKeyboardFocus, + muiTheme: this.context.muiTheme || (0, _getMuiTheme2.default)() + }; + }, + getChildContext: function getChildContext() { + return { + muiTheme: this.state.muiTheme + }; + }, + componentDidMount: function componentDidMount() { + injectStyle(); + listenForTabPresses(); + }, + componentWillReceiveProps: function componentWillReceiveProps(nextProps, nextContext) { + this.setState({ + muiTheme: nextContext.muiTheme || this.state.muiTheme + }); + + if ((nextProps.disabled || nextProps.disableKeyboardFocus) && this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: false }); + if (nextProps.onKeyboardFocus) { + nextProps.onKeyboardFocus(null, false); + } + } + }, + componentWillUnmount: function componentWillUnmount() { + clearTimeout(this._focusTimeout); + }, + isKeyboardFocused: function isKeyboardFocused() { + return this.state.isKeyboardFocused; + }, + removeKeyboardFocus: function removeKeyboardFocus(event) { + if (this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: false }); + this.props.onKeyboardFocus(event, false); + } + }, + setKeyboardFocus: function setKeyboardFocus(event) { + if (!this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: true }); + this.props.onKeyboardFocus(event, true); + } + }, + _cancelFocusTimeout: function _cancelFocusTimeout() { + if (this._focusTimeout) { + clearTimeout(this._focusTimeout); + this._focusTimeout = null; + } + }, + _createButtonChildren: function _createButtonChildren() { + var _props = this.props; + var centerRipple = _props.centerRipple; + var children = _props.children; + var disabled = _props.disabled; + var disableFocusRipple = _props.disableFocusRipple; + var disableKeyboardFocus = _props.disableKeyboardFocus; + var disableTouchRipple = _props.disableTouchRipple; + var focusRippleColor = _props.focusRippleColor; + var focusRippleOpacity = _props.focusRippleOpacity; + var touchRippleColor = _props.touchRippleColor; + var touchRippleOpacity = _props.touchRippleOpacity; + var isKeyboardFocused = this.state.isKeyboardFocused; + + //Focus Ripple + + var focusRipple = isKeyboardFocused && !disabled && !disableFocusRipple && !disableKeyboardFocus ? _react2.default.createElement(_focusRipple2.default, { + color: focusRippleColor, + muiTheme: this.state.muiTheme, + opacity: focusRippleOpacity, + show: isKeyboardFocused + }) : undefined; + + //Touch Ripple + var touchRipple = !disabled && !disableTouchRipple ? _react2.default.createElement( + _touchRipple2.default, + { + centerRipple: centerRipple, + color: touchRippleColor, + muiTheme: this.state.muiTheme, + opacity: touchRippleOpacity + }, + children + ) : undefined; + + return _children2.default.create({ + focusRipple: focusRipple, + touchRipple: touchRipple, + children: touchRipple ? undefined : children + }); + }, + _handleKeyDown: function _handleKeyDown(event) { + if (!this.props.disabled && !this.props.disableKeyboardFocus) { + if ((0, _keycode2.default)(event) === 'enter' && this.state.isKeyboardFocused) { + this._handleTouchTap(event); + } + } + this.props.onKeyDown(event); + }, + _handleKeyUp: function _handleKeyUp(event) { + if (!this.props.disabled && !this.props.disableKeyboardFocus) { + if ((0, _keycode2.default)(event) === 'space' && this.state.isKeyboardFocused) { + this._handleTouchTap(event); + } + } + this.props.onKeyUp(event); + }, + _handleBlur: function _handleBlur(event) { + this._cancelFocusTimeout(); + this.removeKeyboardFocus(event); + this.props.onBlur(event); + }, + _handleFocus: function _handleFocus(event) { + var _this = this; + + if (!this.props.disabled && !this.props.disableKeyboardFocus) { + //setTimeout is needed because the focus event fires first + //Wait so that we can capture if this was a keyboard focus + //or touch focus + this._focusTimeout = setTimeout(function () { + if (tabPressed) { + _this.setKeyboardFocus(event); + } + }, 150); + + this.props.onFocus(event); + } + }, + _handleTouchTap: function _handleTouchTap(event) { + this._cancelFocusTimeout(); + if (!this.props.disabled) { + tabPressed = false; + this.removeKeyboardFocus(event); + this.props.onTouchTap(event); + } + }, + render: function render() { + var _props2 = this.props; + var centerRipple = _props2.centerRipple; + var children = _props2.children; + var containerElement = _props2.containerElement; + var disabled = _props2.disabled; + var disableFocusRipple = _props2.disableFocusRipple; + var disableKeyboardFocus = _props2.disableKeyboardFocus; + var disableTouchRipple = _props2.disableTouchRipple; + var focusRippleColor = _props2.focusRippleColor; + var focusRippleOpacity = _props2.focusRippleOpacity; + var linkButton = _props2.linkButton; + var touchRippleColor = _props2.touchRippleColor; + var touchRippleOpacity = _props2.touchRippleOpacity; + var onBlur = _props2.onBlur; + var onFocus = _props2.onFocus; + var onKeyUp = _props2.onKeyUp; + var onKeyDown = _props2.onKeyDown; + var onTouchTap = _props2.onTouchTap; + var style = _props2.style; + var tabIndex = _props2.tabIndex; + var type = _props2.type; + + var other = _objectWithoutProperties(_props2, ['centerRipple', 'children', 'containerElement', 'disabled', 'disableFocusRipple', 'disableKeyboardFocus', 'disableTouchRipple', 'focusRippleColor', 'focusRippleOpacity', 'linkButton', 'touchRippleColor', 'touchRippleOpacity', 'onBlur', 'onFocus', 'onKeyUp', 'onKeyDown', 'onTouchTap', 'style', 'tabIndex', 'type']); + + var _state$muiTheme = this.state.muiTheme; + var prepareStyles = _state$muiTheme.prepareStyles; + var enhancedButton = _state$muiTheme.enhancedButton; + + + var mergedStyles = (0, _simpleAssign2.default)({ + border: 10, + background: 'none', + boxSizing: 'border-box', + display: 'inline-block', + font: 'inherit', + fontFamily: this.state.muiTheme.rawTheme.fontFamily, + WebkitTapHighlightColor: enhancedButton.tapHighlightColor, // Remove mobile color flashing (deprecated) + cursor: disabled ? 'default' : 'pointer', + textDecoration: 'none', + outline: 'none', + /* + This is needed so that ripples do not bleed + past border radius. + See: http://stackoverflow.com/questions/17298739/ + css-overflow-hidden-not-working-in-chrome-when-parent-has-border-radius-and-chil + */ + transform: disableTouchRipple && disableFocusRipple ? null : 'translate3d(0, 0, 0)', + verticalAlign: other.hasOwnProperty('href') ? 'middle' : null + }, style); + + if (disabled && linkButton) { + return _react2.default.createElement( + 'span', + _extends({}, other, { + style: mergedStyles + }), + children + ); + } + + var buttonProps = _extends({}, other, { + style: prepareStyles(mergedStyles), + disabled: disabled, + onBlur: this._handleBlur, + onFocus: this._handleFocus, + onTouchTap: this._handleTouchTap, + onKeyUp: this._handleKeyUp, + onKeyDown: this._handleKeyDown, + tabIndex: tabIndex, + type: type + }); + var buttonChildren = this._createButtonChildren(); + + // Provides backward compatibity. Added to support wrapping around element. + var targetLinkElement = buttonProps.hasOwnProperty('href') ? 'a' : 'span'; + + return _react2.default.isValidElement(containerElement) ? _react2.default.cloneElement(containerElement, buttonProps, buttonChildren) : _react2.default.createElement(linkButton ? targetLinkElement : containerElement, buttonProps, buttonChildren); + } + }); + + exports.default = EnhancedButton; + module.exports = exports['default']; + +/***/ }, +/* 278 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(279); + +/***/ }, +/* 279 */ +/***/ 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 ReactComponentWithPureRenderMixin + */ + + 'use strict'; + + var shallowCompare = __webpack_require__(280); + + /** + * If your React component's render function is "pure", e.g. it will render the + * same result given the same props and state, provide this Mixin for a + * considerable performance boost. + * + * Most React components have pure render functions. + * + * Example: + * + * var ReactComponentWithPureRenderMixin = + * require('ReactComponentWithPureRenderMixin'); + * React.createClass({ + * mixins: [ReactComponentWithPureRenderMixin], + * + * render: function() { + * return
foo
; + * } + * }); + * + * Note: This only checks shallow equality for props and state. If these contain + * complex data structures this mixin may have false-negatives for deeper + * differences. Only mixin to components which have simple props and state, or + * use `forceUpdate()` when you know deep data structures have changed. + */ + var ReactComponentWithPureRenderMixin = { + shouldComponentUpdate: function (nextProps, nextState) { + return shallowCompare(this, nextProps, nextState); + } + }; + + module.exports = ReactComponentWithPureRenderMixin; + +/***/ }, +/* 280 */ +/***/ 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 shallowCompare + */ + + 'use strict'; + + var shallowEqual = __webpack_require__(118); + + /** + * Does a shallow comparison for props and state. + * See ReactComponentWithPureRenderMixin + */ + function shallowCompare(instance, nextProps, nextState) { + return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState); + } + + module.exports = shallowCompare; + +/***/ }, +/* 281 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + once: function once(el, type, callback) { + var typeArray = type ? type.split(' ') : []; + var recursiveFunction = function recursiveFunction(event) { + event.target.removeEventListener(event.type, recursiveFunction); + return callback(event); + }; + + for (var i = typeArray.length - 1; i >= 0; i--) { + this.on(el, typeArray[i], recursiveFunction); + } + }, + on: function on(el, type, callback) { + if (el.addEventListener) { + el.addEventListener(type, callback); + } else { + // IE8+ Support + el.attachEvent('on' + type, function () { + callback.call(el); + }); + } + }, + off: function off(el, type, callback) { + if (el.removeEventListener) { + el.removeEventListener(type, callback); + } else { + // IE8+ Support + el.detachEvent('on' + type, callback); + } + }, + isKeyboard: function isKeyboard(event) { + return ['keydown', 'keypress', 'keyup'].indexOf(event.type) !== -1; + } + }; + module.exports = exports['default']; + +/***/ }, +/* 282 */ +/***/ function(module, exports) { + + // Source: http://jsfiddle.net/vWx8V/ + // http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes + + + + /** + * Conenience method returns corresponding value for given keyName or keyCode. + * + * @param {Mixed} keyCode {Number} or keyName {String} + * @return {Mixed} + * @api public + */ + + exports = module.exports = function(searchInput) { + // Keyboard Events + if (searchInput && 'object' === typeof searchInput) { + var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode + if (hasKeyCode) searchInput = hasKeyCode + } + + // Numbers + if ('number' === typeof searchInput) return names[searchInput] + + // Everything else (cast to string) + var search = String(searchInput) + + // check codes + var foundNamedKey = codes[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey + + // check aliases + var foundNamedKey = aliases[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey + + // weird character? + if (search.length === 1) return search.charCodeAt(0) + + return undefined + } + + /** + * Get by name + * + * exports.code['enter'] // => 13 + */ + + var codes = exports.code = exports.codes = { + 'backspace': 8, + 'tab': 9, + 'enter': 13, + 'shift': 16, + 'ctrl': 17, + 'alt': 18, + 'pause/break': 19, + 'caps lock': 20, + 'esc': 27, + 'space': 32, + 'page up': 33, + 'page down': 34, + 'end': 35, + 'home': 36, + 'left': 37, + 'up': 38, + 'right': 39, + 'down': 40, + 'insert': 45, + 'delete': 46, + 'command': 91, + 'right click': 93, + 'numpad *': 106, + 'numpad +': 107, + 'numpad -': 109, + 'numpad .': 110, + 'numpad /': 111, + 'num lock': 144, + 'scroll lock': 145, + 'my computer': 182, + 'my calculator': 183, + ';': 186, + '=': 187, + ',': 188, + '-': 189, + '.': 190, + '/': 191, + '`': 192, + '[': 219, + '\\': 220, + ']': 221, + "'": 222, + } + + // Helper aliases + + var aliases = exports.aliases = { + 'windows': 91, + '⇧': 16, + '⌥': 18, + '⌃': 17, + '⌘': 91, + 'ctl': 17, + 'control': 17, + 'option': 18, + 'pause': 19, + 'break': 19, + 'caps': 20, + 'return': 13, + 'escape': 27, + 'spc': 32, + 'pgup': 33, + 'pgdn': 33, + 'ins': 45, + 'del': 46, + 'cmd': 91 + } + + + /*! + * Programatically add the following + */ + + // lower case chars + for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 + + // numbers + for (var i = 48; i < 58; i++) codes[i - 48] = i + + // function keys + for (i = 1; i < 13; i++) codes['f'+i] = i + 111 + + // numpad keys + for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 + + /** + * Get by code + * + * exports.name[13] // => 'Enter' + */ + + var names = exports.names = exports.title = {} // title for backward compat + + // Create reverse mapping + for (i in codes) names[codes[i]] = i + + // Add aliases + for (var alias in aliases) { + codes[alias] = aliases[alias] + } + + +/***/ }, +/* 283 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _simpleAssign = __webpack_require__(270); + + var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(159); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _reactAddonsPureRenderMixin = __webpack_require__(278); + + var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + + var _autoPrefix = __webpack_require__(284); + + var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + + var _transitions = __webpack_require__(271); + + var _transitions2 = _interopRequireDefault(_transitions); + + var _scaleIn = __webpack_require__(285); + + var _scaleIn2 = _interopRequireDefault(_scaleIn); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var pulsateDuration = 750; + + var FocusRipple = _react2.default.createClass({ + displayName: 'FocusRipple', + + + propTypes: { + color: _react2.default.PropTypes.string, + innerStyle: _react2.default.PropTypes.object, + + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react2.default.PropTypes.object.isRequired, + + opacity: _react2.default.PropTypes.number, + show: _react2.default.PropTypes.bool, + + /** + * Override the inline-styles of the root element. + */ + style: _react2.default.PropTypes.object + }, + + mixins: [_reactAddonsPureRenderMixin2.default], + + componentDidMount: function componentDidMount() { + if (this.props.show) { + this.setRippleSize(); + this.pulsate(); + } + }, + componentDidUpdate: function componentDidUpdate() { + if (this.props.show) { + this.setRippleSize(); + this.pulsate(); + } else { + if (this.timeout) clearTimeout(this.timeout); + } + }, + componentWillUnmount: function componentWillUnmount() { + clearTimeout(this.timeout); + }, + getRippleElement: function getRippleElement(props) { + var color = props.color; + var innerStyle = props.innerStyle; + var _props$muiTheme = props.muiTheme; + var prepareStyles = _props$muiTheme.prepareStyles; + var ripple = _props$muiTheme.ripple; + var opacity = props.opacity; + + + var innerStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + height: '100%', + width: '100%', + borderRadius: '50%', + opacity: opacity ? opacity : 0.16, + backgroundColor: color || ripple.color, + transition: _transitions2.default.easeOut(pulsateDuration + 'ms', 'transform', null, _transitions2.default.easeInOutFunction) + }, innerStyle); + + return _react2.default.createElement('div', { ref: 'innerCircle', style: prepareStyles((0, _simpleAssign2.default)({}, innerStyles)) }); + }, + pulsate: function pulsate() { + var innerCircle = _reactDom2.default.findDOMNode(this.refs.innerCircle); + if (!innerCircle) return; + + var startScale = 'scale(1)'; + var endScale = 'scale(0.85)'; + var currentScale = innerCircle.style.transform || startScale; + var nextScale = currentScale === startScale ? endScale : startScale; + + _autoPrefix2.default.set(innerCircle.style, 'transform', nextScale, this.props.muiTheme); + this.timeout = setTimeout(this.pulsate, pulsateDuration); + }, + setRippleSize: function setRippleSize() { + var el = _reactDom2.default.findDOMNode(this.refs.innerCircle); + var height = el.offsetHeight; + var width = el.offsetWidth; + var size = Math.max(height, width); + + var oldTop = 0; + // For browsers that don't support endsWith() + if (el.style.top.indexOf('px', el.style.top.length - 2) !== -1) { + oldTop = parseInt(el.style.top); + } + el.style.height = size + 'px'; + el.style.top = height / 2 - size / 2 + oldTop + 'px'; + }, + render: function render() { + var _props = this.props; + var show = _props.show; + var style = _props.style; + + + var mergedRootStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0 + }, style); + + var ripple = show ? this.getRippleElement(this.props) : null; + + return _react2.default.createElement( + _scaleIn2.default, + { + maxScale: 0.85, + style: mergedRootStyles + }, + ripple + ); + } + }); + + exports.default = FocusRipple; + module.exports = exports['default']; + +/***/ }, +/* 284 */ +/***/ function(module, exports) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + set: function set(style, key, value) { + style[key] = value; + } + }; + module.exports = exports['default']; + +/***/ }, +/* 285 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _simpleAssign = __webpack_require__(270); + + var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactAddonsPureRenderMixin = __webpack_require__(278); + + var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + + var _reactAddonsTransitionGroup = __webpack_require__(286); + + var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + + var _scaleInChild = __webpack_require__(289); + + var _scaleInChild2 = _interopRequireDefault(_scaleInChild); + + var _getMuiTheme = __webpack_require__(290); + + var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var ScaleIn = _react2.default.createClass({ + displayName: 'ScaleIn', + + + propTypes: { + childStyle: _react2.default.PropTypes.object, + children: _react2.default.PropTypes.node, + enterDelay: _react2.default.PropTypes.number, + maxScale: _react2.default.PropTypes.number, + minScale: _react2.default.PropTypes.number, + + /** + * Override the inline-styles of the root element. + */ + style: _react2.default.PropTypes.object + }, + + contextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + childContextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + mixins: [_reactAddonsPureRenderMixin2.default], + + getDefaultProps: function getDefaultProps() { + return { + enterDelay: 0 + }; + }, + getInitialState: function getInitialState() { + return { + muiTheme: this.context.muiTheme || (0, _getMuiTheme2.default)() + }; + }, + getChildContext: function getChildContext() { + return { + muiTheme: this.state.muiTheme + }; + }, + componentWillReceiveProps: function componentWillReceiveProps(nextProps, nextContext) { + var newMuiTheme = nextContext.muiTheme ? nextContext.muiTheme : this.state.muiTheme; + this.setState({ muiTheme: newMuiTheme }); + }, + render: function render() { + var _props = this.props; + var children = _props.children; + var childStyle = _props.childStyle; + var enterDelay = _props.enterDelay; + var maxScale = _props.maxScale; + var minScale = _props.minScale; + var style = _props.style; + + var other = _objectWithoutProperties(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']); + + var prepareStyles = this.state.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); + + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _scaleInChild2.default, + { + key: child.key, + enterDelay: enterDelay, + maxScale: maxScale, + minScale: minScale, + style: childStyle + }, + child + ); + }); + + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + _extends({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }); + + exports.default = ScaleIn; + module.exports = exports['default']; + +/***/ }, +/* 286 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(287); + +/***/ }, +/* 287 */ +/***/ 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 ReactTransitionGroup + */ + + 'use strict'; + + var React = __webpack_require__(3); + var ReactTransitionChildMapping = __webpack_require__(288); + + var assign = __webpack_require__(40); + var emptyFunction = __webpack_require__(16); + + var ReactTransitionGroup = React.createClass({ + displayName: 'ReactTransitionGroup', + + propTypes: { + component: React.PropTypes.any, + childFactory: React.PropTypes.func + }, + + getDefaultProps: function () { + return { + component: 'span', + childFactory: emptyFunction.thatReturnsArgument + }; + }, + + getInitialState: function () { + return { + children: ReactTransitionChildMapping.getChildMapping(this.props.children) + }; + }, + + componentWillMount: function () { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }, + + componentDidMount: function () { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key); + } + } + }, + + componentWillReceiveProps: function (nextProps) { + var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children); + var prevChildMapping = this.state.children; + + this.setState({ + children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping) + }); + + var key; + + for (key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); + } + } + + for (key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); + if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) { + this.keysToLeave.push(key); + } + } + + // If we want to someday check for reordering, we could do it here. + }, + + componentDidUpdate: function () { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); + + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + }, + + performAppear: function (key) { + this.currentlyTransitioningKeys[key] = true; + + var component = this.refs[key]; + + if (component.componentWillAppear) { + component.componentWillAppear(this._handleDoneAppearing.bind(this, key)); + } else { + this._handleDoneAppearing(key); + } + }, + + _handleDoneAppearing: function (key) { + var component = this.refs[key]; + if (component.componentDidAppear) { + component.componentDidAppear(); + } + + delete this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + this.performLeave(key); + } + }, + + performEnter: function (key) { + this.currentlyTransitioningKeys[key] = true; + + var component = this.refs[key]; + + if (component.componentWillEnter) { + component.componentWillEnter(this._handleDoneEntering.bind(this, key)); + } else { + this._handleDoneEntering(key); + } + }, + + _handleDoneEntering: function (key) { + var component = this.refs[key]; + if (component.componentDidEnter) { + component.componentDidEnter(); + } + + delete this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + this.performLeave(key); + } + }, + + performLeave: function (key) { + this.currentlyTransitioningKeys[key] = true; + + var component = this.refs[key]; + if (component.componentWillLeave) { + component.componentWillLeave(this._handleDoneLeaving.bind(this, key)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + this._handleDoneLeaving(key); + } + }, + + _handleDoneLeaving: function (key) { + var component = this.refs[key]; + + if (component.componentDidLeave) { + component.componentDidLeave(); + } + + delete this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(this.props.children); + + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + this.performEnter(key); + } else { + this.setState(function (state) { + var newChildren = assign({}, state.children); + delete newChildren[key]; + return { children: newChildren }; + }); + } + }, + + render: function () { + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + for (var key in this.state.children) { + var child = this.state.children[key]; + if (child) { + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push(React.cloneElement(this.props.childFactory(child), { ref: key, key: key })); + } + } + return React.createElement(this.props.component, this.props, childrenToRender); + } + }); + + module.exports = ReactTransitionGroup; + +/***/ }, +/* 288 */ +/***/ 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. + * + * @typechecks static-only + * @providesModule ReactTransitionChildMapping + */ + + 'use strict'; + + var flattenChildren = __webpack_require__(117); + + var ReactTransitionChildMapping = { + /** + * Given `this.props.children`, return an object mapping key to child. Just + * simple syntactic sugar around flattenChildren(). + * + * @param {*} children `this.props.children` + * @return {object} Mapping of key to child + */ + getChildMapping: function (children) { + if (!children) { + return children; + } + return flattenChildren(children); + }, + + /** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + mergeChildMappings: function (prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } else { + return prev[key]; + } + } + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; + } + }; + + module.exports = ReactTransitionChildMapping; + +/***/ }, +/* 289 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _simpleAssign = __webpack_require__(270); + + var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(159); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _reactAddonsPureRenderMixin = __webpack_require__(278); + + var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + + var _autoPrefix = __webpack_require__(284); + + var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + + var _transitions = __webpack_require__(271); + + var _transitions2 = _interopRequireDefault(_transitions); + + var _getMuiTheme = __webpack_require__(290); + + var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var ScaleInChild = _react2.default.createClass({ + displayName: 'ScaleInChild', + + + propTypes: { + children: _react2.default.PropTypes.node, + enterDelay: _react2.default.PropTypes.number, + maxScale: _react2.default.PropTypes.number, + minScale: _react2.default.PropTypes.number, + + /** + * Override the inline-styles of the root element. + */ + style: _react2.default.PropTypes.object + }, + + contextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + childContextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + mixins: [_reactAddonsPureRenderMixin2.default], + + getDefaultProps: function getDefaultProps() { + return { + enterDelay: 0, + maxScale: 1, + minScale: 0 + }; + }, + + getInitialState: function getInitialState() { + return { + muiTheme: this.context.muiTheme || (0, _getMuiTheme2.default)() + }; + }, + getChildContext: function getChildContext() { + return { + muiTheme: this.state.muiTheme + }; + }, + componentWillReceiveProps: function componentWillReceiveProps(nextProps, nextContext) { + var newMuiTheme = nextContext.muiTheme ? nextContext.muiTheme : this.state.muiTheme; + this.setState({ muiTheme: newMuiTheme }); + }, + componentWillUnmount: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + }, + componentWillAppear: function componentWillAppear(callback) { + this._initializeAnimation(callback); + }, + componentWillEnter: function componentWillEnter(callback) { + this._initializeAnimation(callback); + }, + componentDidAppear: function componentDidAppear() { + this._animate(); + }, + componentDidEnter: function componentDidEnter() { + this._animate(); + }, + componentWillLeave: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')', this.state.muiTheme); + + this.leaveTimer = setTimeout(callback, 450); + }, + _animate: function _animate() { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')', this.state.muiTheme); + }, + _initializeAnimation: function _initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(0)', this.state.muiTheme); + + this.enterTimer = setTimeout(callback, this.props.enterDelay); + }, + render: function render() { + var _props = this.props; + var children = _props.children; + var enterDelay = _props.enterDelay; + var style = _props.style; + + var other = _objectWithoutProperties(_props, ['children', 'enterDelay', 'style']); + + var prepareStyles = this.state.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); + + return _react2.default.createElement( + 'div', + _extends({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); + } + }); + + exports.default = ScaleInChild; + module.exports = exports['default']; + +/***/ }, +/* 290 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = getMuiTheme; + + var _lodash = __webpack_require__(291); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _colorManipulator = __webpack_require__(272); + + var _colorManipulator2 = _interopRequireDefault(_colorManipulator); + + var _lightBaseTheme = __webpack_require__(297); + + var _lightBaseTheme2 = _interopRequireDefault(_lightBaseTheme); + + var _zIndex = __webpack_require__(300); + + var _zIndex2 = _interopRequireDefault(_zIndex); + + var _transformers = __webpack_require__(301); + + var _lodash3 = __webpack_require__(323); + + var _lodash4 = _interopRequireDefault(_lodash3); + + var _typography = __webpack_require__(324); + + var _typography2 = _interopRequireDefault(_typography); + + var _colors = __webpack_require__(298); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + /** + * Get the MUI theme corresponding to a base theme. + * It's possible to override the computed theme values + * by providing a second argument. The calculated + * theme will be deeply merged with the second argument. + */ + function getMuiTheme(muiTheme) { + for (var _len = arguments.length, more = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + more[_key - 1] = arguments[_key]; + } + + muiTheme = _lodash2.default.apply(undefined, [{ + zIndex: _zIndex2.default, + isRtl: false, + userAgent: undefined + }, _lightBaseTheme2.default, muiTheme].concat(more)); + + var _muiTheme = muiTheme; + var spacing = _muiTheme.spacing; + var fontFamily = _muiTheme.fontFamily; + var palette = _muiTheme.palette; + + + var baseTheme = { + spacing: spacing, + fontFamily: fontFamily, + palette: palette + }; + + muiTheme = (0, _lodash2.default)({ + appBar: { + color: palette.primary1Color, + textColor: palette.alternateTextColor, + height: spacing.desktopKeylineIncrement, + titleFontWeight: _typography2.default.fontWeightNormal, + padding: spacing.desktopGutter + }, + avatar: { + color: palette.canvasColor, + backgroundColor: _colorManipulator2.default.luminance(palette.canvasColor) > 0.5 ? _colorManipulator2.default.darken(palette.canvasColor, 0.26) : _colorManipulator2.default.lighten(palette.canvasColor, 1.26, 1.0), + borderColor: _colorManipulator2.default.fade(palette.textColor, 0.08) + }, + badge: { + color: palette.alternateTextColor, + textColor: palette.textColor, + primaryColor: palette.accent1Color, + primaryTextColor: palette.alternateTextColor, + secondaryColor: palette.primary1Color, + secondaryTextColor: palette.alternateTextColor, + fontWeight: _typography2.default.fontWeightMedium + }, + button: { + height: 36, + minWidth: 88, + iconButtonSize: spacing.iconSize * 2 + }, + card: { + titleColor: _colorManipulator2.default.fade(palette.textColor, 0.87), + subtitleColor: _colorManipulator2.default.fade(palette.textColor, 0.54), + fontWeight: _typography2.default.fontWeightMedium + }, + cardMedia: { + color: _colors.darkWhite, + overlayContentBackground: _colors.lightBlack, + titleColor: _colors.darkWhite, + subtitleColor: _colors.lightWhite + }, + cardText: { + textColor: palette.textColor + }, + checkbox: { + boxColor: palette.textColor, + checkedColor: palette.primary1Color, + requiredColor: palette.primary1Color, + disabledColor: palette.disabledColor, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor + }, + datePicker: { + color: palette.primary1Color, + textColor: palette.alternateTextColor, + calendarTextColor: palette.textColor, + selectColor: palette.primary2Color, + selectTextColor: palette.alternateTextColor, + calendarYearBackgroundColor: _colors.white + }, + dropDownMenu: { + accentColor: palette.borderColor + }, + enhancedButton: { + tapHighlightColor: _colors.transparent + }, + flatButton: { + color: _colors.transparent, + buttonFilterColor: '#999999', + disabledTextColor: _colorManipulator2.default.fade(palette.textColor, 0.3), + textColor: palette.textColor, + primaryTextColor: palette.accent1Color, + secondaryTextColor: palette.primary1Color, + fontSize: _typography2.default.fontStyleButtonFontSize, + fontWeight: _typography2.default.fontWeightMedium + }, + floatingActionButton: { + buttonSize: 56, + miniSize: 40, + color: palette.accent1Color, + iconColor: palette.alternateTextColor, + secondaryColor: palette.primary1Color, + secondaryIconColor: palette.alternateTextColor, + disabledTextColor: palette.disabledColor, + disabledColor: _colorManipulator2.default.luminance(palette.canvasColor) > 0.5 ? _colorManipulator2.default.darken(palette.canvasColor, 0.12) : _colorManipulator2.default.lighten(palette.canvasColor, 1.12, 1.0) + }, + gridTile: { + textColor: _colors.white + }, + inkBar: { + backgroundColor: palette.accent1Color + }, + leftNav: { + width: spacing.desktopKeylineIncrement * 4, + color: palette.canvasColor + }, + listItem: { + nestedLevelDepth: 18, + secondaryTextColor: _colors.lightBlack, + leftIconColor: _colors.grey600, + rightIconColor: _colors.grey400 + }, + menu: { + backgroundColor: palette.canvasColor, + containerBackgroundColor: palette.canvasColor + }, + menuItem: { + dataHeight: 32, + height: 48, + hoverColor: _colorManipulator2.default.fade(palette.textColor, 0.035), + padding: spacing.desktopGutter, + selectedTextColor: palette.accent1Color, + rightIconDesktopFill: _colors.grey600 + }, + menuSubheader: { + padding: spacing.desktopGutter, + borderColor: palette.borderColor, + textColor: palette.primary1Color + }, + overlay: { + backgroundColor: _colors.lightBlack + }, + paper: { + color: palette.textColor, + backgroundColor: palette.canvasColor, + zDepthShadows: [[1, 6, 0.12, 1, 4, 0.12], [3, 10, 0.16, 3, 10, 0.23], [10, 30, 0.19, 6, 10, 0.23], [14, 45, 0.25, 10, 18, 0.22], [19, 60, 0.30, 15, 20, 0.22]].map(function (d) { + return '0 ' + d[0] + 'px ' + d[1] + 'px ' + _colorManipulator2.default.fade(palette.shadowColor, d[2]) + ',\n 0 ' + d[3] + 'px ' + d[4] + 'px ' + _colorManipulator2.default.fade(palette.shadowColor, d[5]); + }) + }, + radioButton: { + borderColor: palette.textColor, + backgroundColor: palette.alternateTextColor, + checkedColor: palette.primary1Color, + requiredColor: palette.primary1Color, + disabledColor: palette.disabledColor, + size: 24, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor + }, + raisedButton: { + color: palette.alternateTextColor, + textColor: palette.textColor, + primaryColor: palette.accent1Color, + primaryTextColor: palette.alternateTextColor, + secondaryColor: palette.primary1Color, + secondaryTextColor: palette.alternateTextColor, + disabledColor: _colorManipulator2.default.darken(palette.alternateTextColor, 0.1), + disabledTextColor: _colorManipulator2.default.fade(palette.textColor, 0.3), + fontWeight: _typography2.default.fontWeightMedium + }, + refreshIndicator: { + strokeColor: palette.borderColor, + loadingStrokeColor: palette.primary1Color + }, + ripple: { + color: _colorManipulator2.default.fade(palette.textColor, 0.87) + }, + slider: { + trackSize: 2, + trackColor: palette.primary3Color, + trackColorSelected: palette.accent3Color, + handleSize: 12, + handleSizeDisabled: 8, + handleSizeActive: 18, + handleColorZero: palette.primary3Color, + handleFillColor: palette.alternateTextColor, + selectionColor: palette.primary1Color, + rippleColor: palette.primary1Color + }, + snackbar: { + textColor: palette.alternateTextColor, + backgroundColor: palette.textColor, + actionColor: palette.accent1Color + }, + subheader: { + color: _colorManipulator2.default.fade(palette.textColor, 0.54), + fontWeight: _typography2.default.fontWeightMedium + }, + table: { + backgroundColor: palette.canvasColor + }, + tableFooter: { + borderColor: palette.borderColor, + textColor: palette.accent3Color + }, + tableHeader: { + borderColor: palette.borderColor + }, + tableHeaderColumn: { + textColor: palette.accent3Color, + height: 56, + spacing: 24 + }, + tableRow: { + hoverColor: palette.accent2Color, + stripeColor: _colorManipulator2.default.lighten(palette.primary1Color, 0.55), + selectedColor: palette.borderColor, + textColor: palette.textColor, + borderColor: palette.borderColor, + height: 48 + }, + tableRowColumn: { + height: 48, + spacing: 24 + }, + tabs: { + backgroundColor: palette.primary1Color, + textColor: _colorManipulator2.default.fade(palette.alternateTextColor, 0.7), + selectedTextColor: palette.alternateTextColor + }, + textField: { + textColor: palette.textColor, + hintColor: palette.disabledColor, + floatingLabelColor: palette.textColor, + disabledTextColor: palette.disabledColor, + errorColor: _colors.red500, + focusColor: palette.primary1Color, + backgroundColor: 'transparent', + borderColor: palette.borderColor + }, + timePicker: { + color: palette.alternateTextColor, + textColor: palette.accent3Color, + accentColor: palette.primary1Color, + clockColor: palette.textColor, + clockCircleColor: palette.clockCircleColor, + headerColor: palette.pickerHeaderColor || palette.primary1Color, + selectColor: palette.primary2Color, + selectTextColor: palette.alternateTextColor + }, + toggle: { + thumbOnColor: palette.primary1Color, + thumbOffColor: palette.accent2Color, + thumbDisabledColor: palette.borderColor, + thumbRequiredColor: palette.primary1Color, + trackOnColor: _colorManipulator2.default.fade(palette.primary1Color, 0.5), + trackOffColor: palette.primary3Color, + trackDisabledColor: palette.primary3Color, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor, + trackRequiredColor: _colorManipulator2.default.fade(palette.primary1Color, 0.5) + }, + toolbar: { + color: _colorManipulator2.default.fade(palette.textColor, 0.54), + hoverColor: _colorManipulator2.default.fade(palette.textColor, 0.87), + backgroundColor: _colorManipulator2.default.darken(palette.accent2Color, 0.05), + height: 56, + titleFontSize: 20, + iconColor: _colorManipulator2.default.fade(palette.textColor, 0.4), + separatorColor: _colorManipulator2.default.fade(palette.textColor, 0.175), + menuHoverColor: _colorManipulator2.default.fade(palette.textColor, 0.1) + }, + tooltip: { + color: _colors.white, + rippleBackgroundColor: _colors.grey700 + } + }, muiTheme, { + baseTheme: baseTheme, // To provide backward compatibility. + rawTheme: baseTheme }); + + // To provide backward compatibility. + var transformers = [_transformers.autoprefixer, _transformers.rtl, _transformers.callOnce].map(function (t) { + return t(muiTheme); + }).filter(function (t) { + return t; + }); + muiTheme.prepareStyles = _lodash4.default.apply(undefined, _toConsumableArray(transformers)); + + return muiTheme; + } + module.exports = exports['default']; + +/***/ }, +/* 291 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 4.3.2 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var Stack = __webpack_require__(292), + baseClone = __webpack_require__(293), + isPlainObject = __webpack_require__(294), + keysIn = __webpack_require__(295), + rest = __webpack_require__(296); + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dateTag] = typedArrayTags[errorTag] = + typedArrayTags[funcTag] = typedArrayTags[mapTag] = + typedArrayTags[numberTag] = typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = typedArrayTags[setTag] = + typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (typeof key == 'number' && value === undefined && !(key in object))) { + object[key] = value; + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + var props = (isArray(source) || isTypedArray(source)) + ? undefined + : keysIn(source); + + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + newValue = srcValue; + if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else { + isCommon = false; + newValue = baseClone(srcValue, !customizer); + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + isCommon = false; + newValue = baseClone(srcValue, !customizer); + } + else { + newValue = objValue; + } + } + else { + isCommon = false; + } + } + stack.set(srcValue, newValue); + + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + } + stack['delete'](srcValue); + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object) { + return copyObjectWith(source, props, object); + } + + /** + * This function is like `copyObject` except that it accepts a function to + * customize copied values. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObjectWith(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : source[key]; + + assignValue(object, key, newValue); + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return rest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = typeof customizer == 'function' + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + return eq(object[index], value); + } + return false; + } + + /** + * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @type {Function} + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + function isTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + } + + /** + * Converts `value` to a plain object flattening inherited enumerable + * properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable properties of source objects into the destination + * object. Source properties that resolve to `undefined` are skipped if a + * destination value exists. Array and plain object properties are merged + * recursively.Other objects and value types are overridden by assignment. + * Source objects are applied from left to right. Subsequent sources + * overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + module.exports = merge; + + +/***/ }, +/* 292 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module, global) {/** + * lodash 4.1.1 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** `Object#toString` result references. */ + var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Detect free variable `exports`. */ + var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + + /** Detect free variable `module`. */ + var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + + /** Detect free variable `self`. */ + var freeSelf = checkGlobal(objectTypes[typeof self] && self); + + /** Detect free variable `window`. */ + var freeWindow = checkGlobal(objectTypes[typeof window] && window); + + /** Detect `this` as the global object. */ + var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + + /** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ + function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; + } + + /** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ + function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; + } + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var splice = arrayProto.splice; + + /* Built-in method references that are verified to be native. */ + var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + + /** + * Creates an hash object. + * + * @private + * @constructor + * @returns {Object} Returns the new hash object. + */ + function Hash() {} + + /** + * Removes `key` and its value from the hash. + * + * @private + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(hash, key) { + return hashHas(hash, key) && delete hash[key]; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @param {Object} hash The hash to query. + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(hash, key) { + if (nativeCreate) { + var result = hash[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @param {Object} hash The hash to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(hash, key) { + return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + */ + function hashSet(hash, key, value) { + hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + } + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function MapCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.clear(); + while (++index < length) { + var entry = values[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapClear() { + this.__data__ = { + 'hash': new Hash, + 'map': Map ? new Map : [], + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapDelete(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashDelete(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map['delete'](key) : assocDelete(data.map, key); + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapGet(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashGet(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map.get(key) : assocGet(data.map, key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapHas(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashHas(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map.has(key) : assocHas(data.map, key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache object. + */ + function mapSet(key, value) { + var data = this.__data__; + if (isKeyable(key)) { + hashSet(typeof key == 'string' ? data.string : data.hash, key, value); + } else if (Map) { + data.map.set(key, value); + } else { + assocSet(data.map, key, value); + } + return this; + } + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function Stack(values) { + var index = -1, + length = values ? values.length : 0; + + this.clear(); + while (++index < length) { + var entry = values[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = { 'array': [], 'map': null }; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + array = data.array; + + return array ? assocDelete(array, key) : data.map['delete'](key); + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + var data = this.__data__, + array = data.array; + + return array ? assocGet(array, key) : data.map.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + var data = this.__data__, + array = data.array; + + return array ? assocHas(array, key) : data.map.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache object. + */ + function stackSet(key, value) { + var data = this.__data__, + array = data.array; + + if (array) { + if (array.length < (LARGE_ARRAY_SIZE - 1)) { + assocSet(array, key, value); + } else { + data.array = null; + data.map = new MapCache(array); + } + } + var map = data.map; + if (map) { + map.set(key, value); + } + return this; + } + + /** + * Removes `key` and its value from the associative array. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function assocDelete(array, key) { + var index = assocIndexOf(array, key); + if (index < 0) { + return false; + } + var lastIndex = array.length - 1; + if (index == lastIndex) { + array.pop(); + } else { + splice.call(array, index, 1); + } + return true; + } + + /** + * Gets the associative array value for `key`. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function assocGet(array, key) { + var index = assocIndexOf(array, key); + return index < 0 ? undefined : array[index][1]; + } + + /** + * Checks if an associative array value for `key` exists. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function assocHas(array, key) { + return assocIndexOf(array, key) > -1; + } + + /** + * Gets the index at which the first occurrence of `key` is found in `array` + * of key-value pairs. + * + * @private + * @param {Array} array The array to search. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Sets the associative array `key` to `value`. + * + * @private + * @param {Array} array The array to modify. + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + */ + function assocSet(array, key, value) { + var index = assocIndexOf(array, key); + if (index < 0) { + array.push([key, value]); + } else { + array[index][1] = value; + } + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'number' || type == 'boolean' || + (type == 'string' && value != '__proto__') || value == null; + } + + /** + * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(funcToString.call(value)); + } + return isObjectLike(value) && + (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); + } + + // Avoid inheriting from `Object.prototype` when possible. + Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; + + // Add functions to the `MapCache`. + MapCache.prototype.clear = mapClear; + MapCache.prototype['delete'] = mapDelete; + MapCache.prototype.get = mapGet; + MapCache.prototype.has = mapHas; + MapCache.prototype.set = mapSet; + + // Add functions to the `Stack` cache. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + module.exports = Stack; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module), (function() { return this; }()))) + +/***/ }, +/* 293 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module, global) {/** + * lodash 4.5.3 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = + cloneableTags[dateTag] = cloneableTags[float32Tag] = + cloneableTags[float64Tag] = cloneableTags[int8Tag] = + cloneableTags[int16Tag] = cloneableTags[int32Tag] = + cloneableTags[mapTag] = cloneableTags[numberTag] = + cloneableTags[objectTag] = cloneableTags[regexpTag] = + cloneableTags[setTag] = cloneableTags[stringTag] = + cloneableTags[symbolTag] = cloneableTags[uint8Tag] = + cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = + cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Detect free variable `exports`. */ + var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + + /** Detect free variable `module`. */ + var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = (freeModule && freeModule.exports === freeExports) + ? freeExports + : undefined; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + + /** Detect free variable `self`. */ + var freeSelf = checkGlobal(objectTypes[typeof self] && self); + + /** Detect free variable `window`. */ + var freeWindow = checkGlobal(objectTypes[typeof window] && window); + + /** Detect `this` as the global object. */ + var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + + /** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ + function addMapEntry(map, pair) { + // Don't return `Map#set` because it doesn't return the map instance in IE 11. + map.set(pair[0], pair[1]); + return map; + } + + /** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ + function addSetEntry(set, value) { + set.add(value); + return set; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ + function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; + } + + /** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ + function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Converts `map` to an array. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the converted array. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Converts `set` to an array. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the converted array. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototypeOf = Object.getPrototypeOf, + getOwnPropertySymbols = Object.getOwnPropertySymbols, + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = Object.keys; + + /* Built-in method references that are verified to be native. */ + var Map = getNative(root, 'Map'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to detect maps, sets, and weakmaps. */ + var mapCtorString = Map ? funcToString.call(Map) : '', + setCtorString = Set ? funcToString.call(Set) : '', + weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + + /** + * Creates an hash object. + * + * @private + * @constructor + * @returns {Object} Returns the new hash object. + */ + function Hash() {} + + /** + * Removes `key` and its value from the hash. + * + * @private + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(hash, key) { + return hashHas(hash, key) && delete hash[key]; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @param {Object} hash The hash to query. + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(hash, key) { + if (nativeCreate) { + var result = hash[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @param {Object} hash The hash to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(hash, key) { + return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + */ + function hashSet(hash, key, value) { + hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + } + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function MapCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.clear(); + while (++index < length) { + var entry = values[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapClear() { + this.__data__ = { + 'hash': new Hash, + 'map': Map ? new Map : [], + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapDelete(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashDelete(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map['delete'](key) : assocDelete(data.map, key); + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapGet(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashGet(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map.get(key) : assocGet(data.map, key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapHas(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashHas(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map.has(key) : assocHas(data.map, key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache object. + */ + function mapSet(key, value) { + var data = this.__data__; + if (isKeyable(key)) { + hashSet(typeof key == 'string' ? data.string : data.hash, key, value); + } else if (Map) { + data.map.set(key, value); + } else { + assocSet(data.map, key, value); + } + return this; + } + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function Stack(values) { + var index = -1, + length = values ? values.length : 0; + + this.clear(); + while (++index < length) { + var entry = values[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = { 'array': [], 'map': null }; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + array = data.array; + + return array ? assocDelete(array, key) : data.map['delete'](key); + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + var data = this.__data__, + array = data.array; + + return array ? assocGet(array, key) : data.map.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + var data = this.__data__, + array = data.array; + + return array ? assocHas(array, key) : data.map.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache object. + */ + function stackSet(key, value) { + var data = this.__data__, + array = data.array; + + if (array) { + if (array.length < (LARGE_ARRAY_SIZE - 1)) { + assocSet(array, key, value); + } else { + data.array = null; + data.map = new MapCache(array); + } + } + var map = data.map; + if (map) { + map.set(key, value); + } + return this; + } + + /** + * Removes `key` and its value from the associative array. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function assocDelete(array, key) { + var index = assocIndexOf(array, key); + if (index < 0) { + return false; + } + var lastIndex = array.length - 1; + if (index == lastIndex) { + array.pop(); + } else { + splice.call(array, index, 1); + } + return true; + } + + /** + * Gets the associative array value for `key`. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function assocGet(array, key) { + var index = assocIndexOf(array, key); + return index < 0 ? undefined : array[index][1]; + } + + /** + * Checks if an associative array value for `key` exists. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function assocHas(array, key) { + return assocIndexOf(array, key) > -1; + } + + /** + * Gets the index at which the first occurrence of `key` is found in `array` + * of key-value pairs. + * + * @private + * @param {Array} array The array to search. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Sets the associative array `key` to `value`. + * + * @private + * @param {Array} array The array to modify. + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + */ + function assocSet(array, key, value) { + var index = assocIndexOf(array, key); + if (index < 0) { + array.push([key, value]); + } else { + array[index][1] = value; + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + result = baseAssign(result, value); + return isFull ? copySymbols(value, result) : result; + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + // Recursively populate clone (susceptible to call stack limits). + (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return (isFull && !isArr) ? copySymbols(value, result) : result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; + } + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, + // that are composed entirely of index properties, return `false` for + // `hasOwnProperty` checks of them. + return hasOwnProperty.call(object, key) || + (typeof object == 'object' && key in object && getPrototypeOf(object) === null); + } + + /** + * The base implementation of `_.keys` which doesn't skip the constructor + * property of prototypes or treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + return nativeKeys(Object(object)); + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @returns {Object} Returns the cloned map. + */ + function cloneMap(map) { + return arrayReduce(mapToArray(map), addMapEntry, new map.constructor); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @returns {Object} Returns the cloned set. + */ + function cloneSet(set) { + return arrayReduce(setToArray(set), addSetEntry, new set.constructor); + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object) { + return copyObjectWith(source, props, object); + } + + /** + * This function is like `copyObject` except that it accepts a function to + * customize copied values. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObjectWith(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : source[key]; + + assignValue(object, key, newValue); + } + return object; + } + + /** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Creates a base function for methods like `_.forIn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Creates an array of the own symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = getOwnPropertySymbols || function() { + return []; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function getTag(value) { + return objectToString.call(value); + } + + // Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps. + if ((Map && getTag(new Map) != mapTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : null, + ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case mapCtorString: return mapTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototypeOf(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Creates an array of index keys for `object` values of arrays, + * `arguments` objects, and strings, otherwise `null` is returned. + * + * @private + * @param {Object} object The object to query. + * @returns {Array|null} Returns index keys, else `null`. + */ + function indexKeys(object) { + var length = object ? object.length : undefined; + if (isLength(length) && + (isArray(object) || isString(object) || isArguments(object))) { + return baseTimes(length, String); + } + return null; + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'number' || type == 'boolean' || + (type == 'string' && value != '__proto__') || value == null; + } + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @type {Function} + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = !Buffer ? constant(false) : function(value) { + return value instanceof Buffer; + }; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(funcToString.call(value)); + } + return isObjectLike(value) && + (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); + } + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + var isProto = isPrototype(object); + if (!(isProto || isArrayLike(object))) { + return baseKeys(object); + } + var indexes = indexKeys(object), + skipIndexes = !!indexes, + result = indexes || [], + length = result.length; + + for (var key in object) { + if (baseHas(object, key) && + !(skipIndexes && (key == 'length' || isIndex(key, length))) && + !(isProto && key == 'constructor')) { + result.push(key); + } + } + return result; + } + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'user': 'fred' }; + * var getter = _.constant(object); + * + * getter() === object; + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + // Avoid inheriting from `Object.prototype` when possible. + Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; + + // Add functions to the `MapCache`. + MapCache.prototype.clear = mapClear; + MapCache.prototype['delete'] = mapDelete; + MapCache.prototype.get = mapGet; + MapCache.prototype.has = mapHas; + MapCache.prototype.set = mapSet; + + // Add functions to the `Stack` cache. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + module.exports = baseClone; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module), (function() { return this; }()))) + +/***/ }, +/* 294 */ +/***/ function(module, exports) { + + /** + * lodash 4.0.3 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ + function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = Function.prototype.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var getPrototypeOf = Object.getPrototypeOf; + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || + objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototypeOf(value); + if (proto === null) { + return true; + } + var Ctor = proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); + } + + module.exports = isPlainObject; + + +/***/ }, +/* 295 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module, global) {/** + * lodash 4.1.3 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + stringTag = '[object String]'; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Detect free variable `exports`. */ + var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + + /** Detect free variable `module`. */ + var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + + /** Detect free variable `self`. */ + var freeSelf = checkGlobal(objectTypes[typeof self] && self); + + /** Detect free variable `window`. */ + var freeWindow = checkGlobal(objectTypes[typeof window] && window); + + /** Detect `this` as the global object. */ + var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ + function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var Reflect = root.Reflect, + enumerate = Reflect ? Reflect.enumerate : undefined, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * The base implementation of `_.keysIn` which doesn't skip the constructor + * property of prototypes or treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + object = object == null ? object : Object(object); + + var result = []; + for (var key in object) { + result.push(key); + } + return result; + } + + // Fallback for IE < 9 with es6-shim. + if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) { + baseKeysIn = function(object) { + return iteratorToArray(enumerate(object)); + }; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Creates an array of index keys for `object` values of arrays, + * `arguments` objects, and strings, otherwise `null` is returned. + * + * @private + * @param {Object} object The object to query. + * @returns {Array|null} Returns index keys, else `null`. + */ + function indexKeys(object) { + var length = object ? object.length : undefined; + if (isLength(length) && + (isArray(object) || isString(object) || isArguments(object))) { + return baseTimes(length, String); + } + return null; + } + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @type {Function} + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + var index = -1, + isProto = isPrototype(object), + props = baseKeysIn(object), + propsLength = props.length, + indexes = indexKeys(object), + skipIndexes = !!indexes, + result = indexes || [], + length = result.length; + + while (++index < propsLength) { + var key = props[index]; + if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + module.exports = keysIn; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module), (function() { return this; }()))) + +/***/ }, +/* 296 */ +/***/ function(module, exports) { + + /** + * lodash 4.0.1 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** `Object#toString` result references. */ + var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Built-in method references without a dependency on `root`. */ + var freeParseInt = parseInt; + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + var length = args.length; + switch (length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, array); + case 1: return func.call(this, args[0], array); + case 2: return func.call(this, args[0], args[1], array); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array constructors, and + // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3'); + * // => 3 + */ + function toInteger(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + var remainder = value % 1; + return value === value ? (remainder ? value - remainder : value) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3); + * // => 3 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3'); + * // => 3 + */ + function toNumber(value) { + if (isObject(value)) { + var other = isFunction(value.valueOf) ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + module.exports = rest; + + +/***/ }, +/* 297 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _colors = __webpack_require__(298); + + var _colorManipulator = __webpack_require__(272); + + var _colorManipulator2 = _interopRequireDefault(_colorManipulator); + + var _spacing = __webpack_require__(299); + + var _spacing2 = _interopRequireDefault(_spacing); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + /* + * Light Theme is the default theme used in material-ui. It is guaranteed to + * have all theme variables needed for every component. Variables not defined + * in a custom theme will default to these values. + */ + + exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan500, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey400, + accent1Color: _colors.pinkA200, + accent2Color: _colors.grey100, + accent3Color: _colors.grey500, + textColor: _colors.darkBlack, + alternateTextColor: _colors.white, + canvasColor: _colors.white, + borderColor: _colors.grey300, + disabledColor: _colorManipulator2.default.fade(_colors.darkBlack, 0.3), + pickerHeaderColor: _colors.cyan500, + clockCircleColor: _colorManipulator2.default.fade(_colors.darkBlack, 0.07), + shadowColor: _colors.fullBlack + } + }; + module.exports = exports['default']; + +/***/ }, +/* 298 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + var red50 = exports.red50 = '#ffebee'; + var red100 = exports.red100 = '#ffcdd2'; + var red200 = exports.red200 = '#ef9a9a'; + var red300 = exports.red300 = '#e57373'; + var red400 = exports.red400 = '#ef5350'; + var red500 = exports.red500 = '#f44336'; + var red600 = exports.red600 = '#e53935'; + var red700 = exports.red700 = '#d32f2f'; + var red800 = exports.red800 = '#c62828'; + var red900 = exports.red900 = '#b71c1c'; + var redA100 = exports.redA100 = '#ff8a80'; + var redA200 = exports.redA200 = '#ff5252'; + var redA400 = exports.redA400 = '#ff1744'; + var redA700 = exports.redA700 = '#d50000'; + + var pink50 = exports.pink50 = '#fce4ec'; + var pink100 = exports.pink100 = '#f8bbd0'; + var pink200 = exports.pink200 = '#f48fb1'; + var pink300 = exports.pink300 = '#f06292'; + var pink400 = exports.pink400 = '#ec407a'; + var pink500 = exports.pink500 = '#e91e63'; + var pink600 = exports.pink600 = '#d81b60'; + var pink700 = exports.pink700 = '#c2185b'; + var pink800 = exports.pink800 = '#ad1457'; + var pink900 = exports.pink900 = '#880e4f'; + var pinkA100 = exports.pinkA100 = '#ff80ab'; + var pinkA200 = exports.pinkA200 = '#ff4081'; + var pinkA400 = exports.pinkA400 = '#f50057'; + var pinkA700 = exports.pinkA700 = '#c51162'; + + var purple50 = exports.purple50 = '#f3e5f5'; + var purple100 = exports.purple100 = '#e1bee7'; + var purple200 = exports.purple200 = '#ce93d8'; + var purple300 = exports.purple300 = '#ba68c8'; + var purple400 = exports.purple400 = '#ab47bc'; + var purple500 = exports.purple500 = '#9c27b0'; + var purple600 = exports.purple600 = '#8e24aa'; + var purple700 = exports.purple700 = '#7b1fa2'; + var purple800 = exports.purple800 = '#6a1b9a'; + var purple900 = exports.purple900 = '#4a148c'; + var purpleA100 = exports.purpleA100 = '#ea80fc'; + var purpleA200 = exports.purpleA200 = '#e040fb'; + var purpleA400 = exports.purpleA400 = '#d500f9'; + var purpleA700 = exports.purpleA700 = '#aa00ff'; + + var deepPurple50 = exports.deepPurple50 = '#ede7f6'; + var deepPurple100 = exports.deepPurple100 = '#d1c4e9'; + var deepPurple200 = exports.deepPurple200 = '#b39ddb'; + var deepPurple300 = exports.deepPurple300 = '#9575cd'; + var deepPurple400 = exports.deepPurple400 = '#7e57c2'; + var deepPurple500 = exports.deepPurple500 = '#673ab7'; + var deepPurple600 = exports.deepPurple600 = '#5e35b1'; + var deepPurple700 = exports.deepPurple700 = '#512da8'; + var deepPurple800 = exports.deepPurple800 = '#4527a0'; + var deepPurple900 = exports.deepPurple900 = '#311b92'; + var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff'; + var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff'; + var deepPurpleA400 = exports.deepPurpleA400 = '#651fff'; + var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea'; + + var indigo50 = exports.indigo50 = '#e8eaf6'; + var indigo100 = exports.indigo100 = '#c5cae9'; + var indigo200 = exports.indigo200 = '#9fa8da'; + var indigo300 = exports.indigo300 = '#7986cb'; + var indigo400 = exports.indigo400 = '#5c6bc0'; + var indigo500 = exports.indigo500 = '#3f51b5'; + var indigo600 = exports.indigo600 = '#3949ab'; + var indigo700 = exports.indigo700 = '#303f9f'; + var indigo800 = exports.indigo800 = '#283593'; + var indigo900 = exports.indigo900 = '#1a237e'; + var indigoA100 = exports.indigoA100 = '#8c9eff'; + var indigoA200 = exports.indigoA200 = '#536dfe'; + var indigoA400 = exports.indigoA400 = '#3d5afe'; + var indigoA700 = exports.indigoA700 = '#304ffe'; + + var blue50 = exports.blue50 = '#e3f2fd'; + var blue100 = exports.blue100 = '#bbdefb'; + var blue200 = exports.blue200 = '#90caf9'; + var blue300 = exports.blue300 = '#64b5f6'; + var blue400 = exports.blue400 = '#42a5f5'; + var blue500 = exports.blue500 = '#2196f3'; + var blue600 = exports.blue600 = '#1e88e5'; + var blue700 = exports.blue700 = '#1976d2'; + var blue800 = exports.blue800 = '#1565c0'; + var blue900 = exports.blue900 = '#0d47a1'; + var blueA100 = exports.blueA100 = '#82b1ff'; + var blueA200 = exports.blueA200 = '#448aff'; + var blueA400 = exports.blueA400 = '#2979ff'; + var blueA700 = exports.blueA700 = '#2962ff'; + + var lightBlue50 = exports.lightBlue50 = '#e1f5fe'; + var lightBlue100 = exports.lightBlue100 = '#b3e5fc'; + var lightBlue200 = exports.lightBlue200 = '#81d4fa'; + var lightBlue300 = exports.lightBlue300 = '#4fc3f7'; + var lightBlue400 = exports.lightBlue400 = '#29b6f6'; + var lightBlue500 = exports.lightBlue500 = '#03a9f4'; + var lightBlue600 = exports.lightBlue600 = '#039be5'; + var lightBlue700 = exports.lightBlue700 = '#0288d1'; + var lightBlue800 = exports.lightBlue800 = '#0277bd'; + var lightBlue900 = exports.lightBlue900 = '#01579b'; + var lightBlueA100 = exports.lightBlueA100 = '#80d8ff'; + var lightBlueA200 = exports.lightBlueA200 = '#40c4ff'; + var lightBlueA400 = exports.lightBlueA400 = '#00b0ff'; + var lightBlueA700 = exports.lightBlueA700 = '#0091ea'; + + var cyan50 = exports.cyan50 = '#e0f7fa'; + var cyan100 = exports.cyan100 = '#b2ebf2'; + var cyan200 = exports.cyan200 = '#80deea'; + var cyan300 = exports.cyan300 = '#4dd0e1'; + var cyan400 = exports.cyan400 = '#26c6da'; + var cyan500 = exports.cyan500 = '#00bcd4'; + var cyan600 = exports.cyan600 = '#00acc1'; + var cyan700 = exports.cyan700 = '#0097a7'; + var cyan800 = exports.cyan800 = '#00838f'; + var cyan900 = exports.cyan900 = '#006064'; + var cyanA100 = exports.cyanA100 = '#84ffff'; + var cyanA200 = exports.cyanA200 = '#18ffff'; + var cyanA400 = exports.cyanA400 = '#00e5ff'; + var cyanA700 = exports.cyanA700 = '#00b8d4'; + + var teal50 = exports.teal50 = '#e0f2f1'; + var teal100 = exports.teal100 = '#b2dfdb'; + var teal200 = exports.teal200 = '#80cbc4'; + var teal300 = exports.teal300 = '#4db6ac'; + var teal400 = exports.teal400 = '#26a69a'; + var teal500 = exports.teal500 = '#009688'; + var teal600 = exports.teal600 = '#00897b'; + var teal700 = exports.teal700 = '#00796b'; + var teal800 = exports.teal800 = '#00695c'; + var teal900 = exports.teal900 = '#004d40'; + var tealA100 = exports.tealA100 = '#a7ffeb'; + var tealA200 = exports.tealA200 = '#64ffda'; + var tealA400 = exports.tealA400 = '#1de9b6'; + var tealA700 = exports.tealA700 = '#00bfa5'; + + var green50 = exports.green50 = '#e8f5e9'; + var green100 = exports.green100 = '#c8e6c9'; + var green200 = exports.green200 = '#a5d6a7'; + var green300 = exports.green300 = '#81c784'; + var green400 = exports.green400 = '#66bb6a'; + var green500 = exports.green500 = '#4caf50'; + var green600 = exports.green600 = '#43a047'; + var green700 = exports.green700 = '#388e3c'; + var green800 = exports.green800 = '#2e7d32'; + var green900 = exports.green900 = '#1b5e20'; + var greenA100 = exports.greenA100 = '#b9f6ca'; + var greenA200 = exports.greenA200 = '#69f0ae'; + var greenA400 = exports.greenA400 = '#00e676'; + var greenA700 = exports.greenA700 = '#00c853'; + + var lightGreen50 = exports.lightGreen50 = '#f1f8e9'; + var lightGreen100 = exports.lightGreen100 = '#dcedc8'; + var lightGreen200 = exports.lightGreen200 = '#c5e1a5'; + var lightGreen300 = exports.lightGreen300 = '#aed581'; + var lightGreen400 = exports.lightGreen400 = '#9ccc65'; + var lightGreen500 = exports.lightGreen500 = '#8bc34a'; + var lightGreen600 = exports.lightGreen600 = '#7cb342'; + var lightGreen700 = exports.lightGreen700 = '#689f38'; + var lightGreen800 = exports.lightGreen800 = '#558b2f'; + var lightGreen900 = exports.lightGreen900 = '#33691e'; + var lightGreenA100 = exports.lightGreenA100 = '#ccff90'; + var lightGreenA200 = exports.lightGreenA200 = '#b2ff59'; + var lightGreenA400 = exports.lightGreenA400 = '#76ff03'; + var lightGreenA700 = exports.lightGreenA700 = '#64dd17'; + + var lime50 = exports.lime50 = '#f9fbe7'; + var lime100 = exports.lime100 = '#f0f4c3'; + var lime200 = exports.lime200 = '#e6ee9c'; + var lime300 = exports.lime300 = '#dce775'; + var lime400 = exports.lime400 = '#d4e157'; + var lime500 = exports.lime500 = '#cddc39'; + var lime600 = exports.lime600 = '#c0ca33'; + var lime700 = exports.lime700 = '#afb42b'; + var lime800 = exports.lime800 = '#9e9d24'; + var lime900 = exports.lime900 = '#827717'; + var limeA100 = exports.limeA100 = '#f4ff81'; + var limeA200 = exports.limeA200 = '#eeff41'; + var limeA400 = exports.limeA400 = '#c6ff00'; + var limeA700 = exports.limeA700 = '#aeea00'; + + var yellow50 = exports.yellow50 = '#fffde7'; + var yellow100 = exports.yellow100 = '#fff9c4'; + var yellow200 = exports.yellow200 = '#fff59d'; + var yellow300 = exports.yellow300 = '#fff176'; + var yellow400 = exports.yellow400 = '#ffee58'; + var yellow500 = exports.yellow500 = '#ffeb3b'; + var yellow600 = exports.yellow600 = '#fdd835'; + var yellow700 = exports.yellow700 = '#fbc02d'; + var yellow800 = exports.yellow800 = '#f9a825'; + var yellow900 = exports.yellow900 = '#f57f17'; + var yellowA100 = exports.yellowA100 = '#ffff8d'; + var yellowA200 = exports.yellowA200 = '#ffff00'; + var yellowA400 = exports.yellowA400 = '#ffea00'; + var yellowA700 = exports.yellowA700 = '#ffd600'; + + var amber50 = exports.amber50 = '#fff8e1'; + var amber100 = exports.amber100 = '#ffecb3'; + var amber200 = exports.amber200 = '#ffe082'; + var amber300 = exports.amber300 = '#ffd54f'; + var amber400 = exports.amber400 = '#ffca28'; + var amber500 = exports.amber500 = '#ffc107'; + var amber600 = exports.amber600 = '#ffb300'; + var amber700 = exports.amber700 = '#ffa000'; + var amber800 = exports.amber800 = '#ff8f00'; + var amber900 = exports.amber900 = '#ff6f00'; + var amberA100 = exports.amberA100 = '#ffe57f'; + var amberA200 = exports.amberA200 = '#ffd740'; + var amberA400 = exports.amberA400 = '#ffc400'; + var amberA700 = exports.amberA700 = '#ffab00'; + + var orange50 = exports.orange50 = '#fff3e0'; + var orange100 = exports.orange100 = '#ffe0b2'; + var orange200 = exports.orange200 = '#ffcc80'; + var orange300 = exports.orange300 = '#ffb74d'; + var orange400 = exports.orange400 = '#ffa726'; + var orange500 = exports.orange500 = '#ff9800'; + var orange600 = exports.orange600 = '#fb8c00'; + var orange700 = exports.orange700 = '#f57c00'; + var orange800 = exports.orange800 = '#ef6c00'; + var orange900 = exports.orange900 = '#e65100'; + var orangeA100 = exports.orangeA100 = '#ffd180'; + var orangeA200 = exports.orangeA200 = '#ffab40'; + var orangeA400 = exports.orangeA400 = '#ff9100'; + var orangeA700 = exports.orangeA700 = '#ff6d00'; + + var deepOrange50 = exports.deepOrange50 = '#fbe9e7'; + var deepOrange100 = exports.deepOrange100 = '#ffccbc'; + var deepOrange200 = exports.deepOrange200 = '#ffab91'; + var deepOrange300 = exports.deepOrange300 = '#ff8a65'; + var deepOrange400 = exports.deepOrange400 = '#ff7043'; + var deepOrange500 = exports.deepOrange500 = '#ff5722'; + var deepOrange600 = exports.deepOrange600 = '#f4511e'; + var deepOrange700 = exports.deepOrange700 = '#e64a19'; + var deepOrange800 = exports.deepOrange800 = '#d84315'; + var deepOrange900 = exports.deepOrange900 = '#bf360c'; + var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80'; + var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40'; + var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00'; + var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00'; + + var brown50 = exports.brown50 = '#efebe9'; + var brown100 = exports.brown100 = '#d7ccc8'; + var brown200 = exports.brown200 = '#bcaaa4'; + var brown300 = exports.brown300 = '#a1887f'; + var brown400 = exports.brown400 = '#8d6e63'; + var brown500 = exports.brown500 = '#795548'; + var brown600 = exports.brown600 = '#6d4c41'; + var brown700 = exports.brown700 = '#5d4037'; + var brown800 = exports.brown800 = '#4e342e'; + var brown900 = exports.brown900 = '#3e2723'; + + var blueGrey50 = exports.blueGrey50 = '#eceff1'; + var blueGrey100 = exports.blueGrey100 = '#cfd8dc'; + var blueGrey200 = exports.blueGrey200 = '#b0bec5'; + var blueGrey300 = exports.blueGrey300 = '#90a4ae'; + var blueGrey400 = exports.blueGrey400 = '#78909c'; + var blueGrey500 = exports.blueGrey500 = '#607d8b'; + var blueGrey600 = exports.blueGrey600 = '#546e7a'; + var blueGrey700 = exports.blueGrey700 = '#455a64'; + var blueGrey800 = exports.blueGrey800 = '#37474f'; + var blueGrey900 = exports.blueGrey900 = '#263238'; + + var grey50 = exports.grey50 = '#fafafa'; + var grey100 = exports.grey100 = '#f5f5f5'; + var grey200 = exports.grey200 = '#eeeeee'; + var grey300 = exports.grey300 = '#e0e0e0'; + var grey400 = exports.grey400 = '#bdbdbd'; + var grey500 = exports.grey500 = '#9e9e9e'; + var grey600 = exports.grey600 = '#757575'; + var grey700 = exports.grey700 = '#616161'; + var grey800 = exports.grey800 = '#424242'; + var grey900 = exports.grey900 = '#212121'; + + var black = exports.black = '#000000'; + var white = exports.white = '#ffffff'; + + var transparent = exports.transparent = 'rgba(0, 0, 0, 0)'; + var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)'; + var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)'; + var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)'; + var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)'; + var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)'; + var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)'; + var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)'; + var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)'; + +/***/ }, +/* 299 */ +/***/ function(module, exports) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + iconSize: 24, + + desktopGutter: 24, + desktopGutterMore: 32, + desktopGutterLess: 16, + desktopGutterMini: 8, + desktopKeylineIncrement: 64, + desktopDropDownMenuItemHeight: 32, + desktopDropDownMenuFontSize: 15, + desktopLeftNavMenuItemHeight: 48, + desktopSubheaderHeight: 48, + desktopToolbarHeight: 56 + }; + module.exports = exports['default']; + +/***/ }, +/* 300 */ +/***/ function(module, exports) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + menu: 1000, + appBar: 1100, + leftNavOverlay: 1200, + leftNav: 1300, + dialogOverlay: 1400, + dialog: 1500, + layer: 2000, + popover: 2100, + snackbar: 2900, + tooltip: 3000 + }; + module.exports = exports['default']; + +/***/ }, +/* 301 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.rtl = exports.callOnce = exports.autoprefixer = undefined; + + var _autoprefixer = __webpack_require__(302); + + var _autoprefixer2 = _interopRequireDefault(_autoprefixer); + + var _callOnce = __webpack_require__(321); + + var _callOnce2 = _interopRequireDefault(_callOnce); + + var _rtl = __webpack_require__(322); + + var _rtl2 = _interopRequireDefault(_rtl); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.autoprefixer = _autoprefixer2.default; + exports.callOnce = _callOnce2.default; + exports.rtl = _rtl2.default; + +/***/ }, +/* 302 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + + exports.default = function (muiTheme) { + var userAgent = muiTheme.userAgent; + + if (userAgent === undefined && typeof navigator !== 'undefined') { + userAgent = navigator.userAgent; + } + + if (userAgent === undefined && !hasWarnedAboutUserAgent) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : undefined; + + hasWarnedAboutUserAgent = true; + } + + if (userAgent === false) { + // Disabled autoprefixer + return null; + } else if (userAgent === 'all' || userAgent === undefined) { + // Prefix for all user agent + return function (style) { + return _inlineStylePrefixer2.default.prefixAll(style); + }; + } else { + var _ret = function () { + var prefixer = new _inlineStylePrefixer2.default({ + userAgent: userAgent + }); + + return { + v: function v(style) { + return prefixer.prefix(style); + } + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + }; + + var _inlineStylePrefixer = __webpack_require__(303); + + var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer); + + var _warning = __webpack_require__(273); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var hasWarnedAboutUserAgent = false; + + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }, +/* 303 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + 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; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _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; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _utilsGetBrowserInformation = __webpack_require__(304); + + var _utilsGetBrowserInformation2 = _interopRequireDefault(_utilsGetBrowserInformation); + + var _utilsGetPrefixedKeyframes = __webpack_require__(306); + + var _utilsGetPrefixedKeyframes2 = _interopRequireDefault(_utilsGetPrefixedKeyframes); + + var _utilsCapitalizeString = __webpack_require__(307); + + var _utilsCapitalizeString2 = _interopRequireDefault(_utilsCapitalizeString); + + var _utilsAssign = __webpack_require__(308); + + var _utilsAssign2 = _interopRequireDefault(_utilsAssign); + + var _utilsWarn = __webpack_require__(309); + + var _utilsWarn2 = _interopRequireDefault(_utilsWarn); + + var _caniuseData = __webpack_require__(310); + + var _caniuseData2 = _interopRequireDefault(_caniuseData); + + var _Plugins = __webpack_require__(311); + + var _Plugins2 = _interopRequireDefault(_Plugins); + + var browserWhitelist = ['phantom']; + + var Prefixer = (function () { + /** + * Instantiante a new prefixer + * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com + * @param {string} keepUnprefixed - keeps unprefixed properties and values + */ + + function Prefixer() { + var _this = this; + + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + _classCallCheck(this, Prefixer); + + var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined; + + this._userAgent = options.userAgent || defaultUserAgent; + this._keepUnprefixed = options.keepUnprefixed || false; + + this._browserInfo = (0, _utilsGetBrowserInformation2['default'])(this._userAgent); + + // Checks if the userAgent was resolved correctly + if (this._browserInfo && this._browserInfo.prefix) { + // set additional prefix information + this.cssPrefix = this._browserInfo.prefix.css; + this.jsPrefix = this._browserInfo.prefix.inline; + this.prefixedKeyframes = (0, _utilsGetPrefixedKeyframes2['default'])(this._browserInfo); + } else { + this._hasPropsRequiringPrefix = false; + (0, _utilsWarn2['default'])('Either the global navigator was undefined or an invalid userAgent was provided.', 'Using a valid userAgent? Please let us know and create an issue at https://github.com/rofrischmann/inline-style-prefixer/issues'); + return false; + } + + var data = this._browserInfo.browser && _caniuseData2['default'][this._browserInfo.browser]; + if (data) { + this._requiresPrefix = Object.keys(data).filter(function (key) { + return data[key] >= _this._browserInfo.version; + }).reduce(function (result, name) { + return _extends({}, result, _defineProperty({}, name, true)); + }, {}); + this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0; + } else { + // check for whitelisted browsers + browserWhitelist.forEach(function (browser) { + if (_this._browserInfo[browser]) { + _this._isWhitelisted = true; + } + }); + this._hasPropsRequiringPrefix = false; + + // Do not throw a warning if whitelisted + if (this._isWhitelisted) { + return true; + } + (0, _utilsWarn2['default'])('Your userAgent seems to be not supported by inline-style-prefixer. Feel free to open an issue.'); + return false; + } + } + + /** + * Returns a prefixed version of the style object + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + _createClass(Prefixer, [{ + key: 'prefix', + value: function prefix(styles) { + var _this2 = this; + + // only add prefixes if needed + if (!this._hasPropsRequiringPrefix) { + return styles; + } + + styles = (0, _utilsAssign2['default'])({}, styles); + + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object) { + // recurse through nested style objects + styles[property] = _this2.prefix(value); + } else { + // add prefixes if needed + if (_this2._requiresPrefix[property]) { + styles[_this2.jsPrefix + (0, _utilsCapitalizeString2['default'])(property)] = value; + if (!_this2._keepUnprefixed) { + delete styles[property]; + } + } + + // resolve plugins + _Plugins2['default'].forEach(function (plugin) { + // generates a new plugin interface with current data + var resolvedStyles = plugin({ + property: property, + value: value, + styles: styles, + browserInfo: _this2._browserInfo, + prefix: { + js: _this2.jsPrefix, + css: _this2.cssPrefix, + keyframes: _this2.prefixedKeyframes + }, + keepUnprefixed: _this2._keepUnprefixed, + requiresPrefix: _this2._requiresPrefix, + forceRun: false + }); + (0, _utilsAssign2['default'])(styles, resolvedStyles); + }); + } + }); + + return styles; + } + + /** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + }], [{ + key: 'prefixAll', + value: function prefixAll(styles) { + var prefixes = {}; + var browserInfo = (0, _utilsGetBrowserInformation2['default'])('*'); + + browserInfo.browsers.forEach(function (browser) { + var data = _caniuseData2['default'][browser]; + if (data) { + (0, _utilsAssign2['default'])(prefixes, data); + } + }); + + // there should always be at least one prefixed style, but just incase + if (!Object.keys(prefixes).length > 0) { + return styles; + } + + styles = (0, _utilsAssign2['default'])({}, styles); + + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object) { + // recurse through nested style objects + styles[property] = Prefixer.prefixAll(value); + } else { + var browsers = Object.keys(browserInfo.prefixes); + browsers.forEach(function (browser) { + var style = browserInfo.prefixes[browser]; + // add prefixes if needed + if (prefixes[property]) { + styles[style.inline + (0, _utilsCapitalizeString2['default'])(property)] = value; + } + + // resolve plugins for each browser + _Plugins2['default'].forEach(function (plugin) { + var resolvedStyles = plugin({ + property: property, + value: value, + styles: styles, + browserInfo: { + name: browser, + prefix: style, + version: 0 // assume lowest + }, + prefix: {}, + keepUnprefixed: true, + requiresPrefix: prefixes, + forceRun: true + }); + (0, _utilsAssign2['default'])(styles, resolvedStyles); + }); + }); + } + }); + + return styles; + } + }]); + + return Prefixer; + })(); + + exports['default'] = Prefixer; + module.exports = exports['default']; + +/***/ }, +/* 304 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _bowser = __webpack_require__(305); + + var _bowser2 = _interopRequireDefault(_bowser); + + var vendorPrefixes = { + Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen'], + Moz: ['firefox', 'seamonkey', 'sailfish'], + ms: ['msie', 'msedge'] + }; + + var browsers = { + chrome: [['chrome']], + safari: [['safari']], + firefox: [['firefox']], + ie: [['msie']], + edge: [['msedge']], + opera: [['opera']], + ios_saf: [['ios', 'mobile'], ['ios', 'tablet']], + ie_mob: [['windowsphone', 'mobile', 'msie'], ['windowsphone', 'tablet', 'msie'], ['windowsphone', 'mobile', 'msedge'], ['windowsphone', 'tablet', 'msedge']], + op_mini: [['opera', 'mobile'], ['opera', 'tablet']], + and_uc: [['android', 'mobile'], ['android', 'tablet']], + android: [['android', 'mobile'], ['android', 'tablet']] + }; + + /** + * Returns an object containing prefix data associated with a browser + * @param {string} browser - browser to find a prefix for + */ + var getPrefixes = function getPrefixes(browser) { + var prefixKeys = undefined; + var prefix = undefined; + var vendors = undefined; + var conditions = undefined; + var prefixVendor = undefined; + var browserVendors = undefined; + + // Find the prefix for this browser (if any) + prefixKeys = Object.keys(vendorPrefixes); + for (var i = 0; i < prefixKeys.length; i++) { + prefix = prefixKeys[i]; + + // Find a matching vendor + vendors = vendorPrefixes[prefix]; + conditions = browsers[browser]; + + for (var j = 0; j < vendors.length; j++) { + prefixVendor = vendors[j]; + + for (var k = 0; k < conditions.length; k++) { + browserVendors = conditions[k]; + + if (browserVendors.indexOf(prefixVendor) !== -1) { + return { + inline: prefix, + css: '-' + prefix.toLowerCase() + '-' + }; + } + } + } + } + + // No prefix found for this browser + return { inline: '', css: '' }; + }; + + /** + * Uses bowser to get default browser information such as version and name + * Evaluates bowser info and adds vendorPrefix information + * @param {string} userAgent - userAgent that gets evaluated + */ + + exports['default'] = function (userAgent) { + if (!userAgent) { + return false; + } + + var info = {}; + + // Special user agent, return all supported prefixes + // instead of returning a string browser name and a prefix object + // we return an array of browser names and map of prefixes for each browser + if (userAgent === '*') { + // Return an array of supported browsers + info.browsers = Object.keys(browsers); + + // Return prefixes associated by browser + info.prefixes = {}; + + // Iterate browser list, assign prefix to each + info.browsers.forEach(function (browser) { + info.prefixes[browser] = getPrefixes(browser); + }); + + return info; + } + + // Normal user agent, detect browser + info = _bowser2['default']._detect(userAgent); + + Object.keys(vendorPrefixes).forEach(function (prefix) { + vendorPrefixes[prefix].forEach(function (browser) { + if (info[browser]) { + info.prefix = { + inline: prefix, + css: '-' + prefix.toLowerCase() + '-' + }; + } + }); + }); + + var name = ''; + Object.keys(browsers).forEach(function (browser) { + browsers[browser].forEach(function (condition) { + var match = 0; + condition.forEach(function (single) { + if (info[single]) { + match += 1; + } + }); + if (condition.length === match) { + name = browser; + } + }); + }); + + info.browser = name; + // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN + info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10); + + // seperate native android chrome + // https://github.com/rofrischmann/inline-style-prefixer/issues/45 + if (info.browser === 'android' && info.chrome && info.version > 37) { + info.browser = 'and_chr'; + } + info.version = parseFloat(info.version); + info.osversion = parseFloat(info.osversion); + // For android < 4.4 we want to check the osversion + // not the chrome version, see issue #26 + // https://github.com/rofrischmann/inline-style-prefixer/issues/26 + if (info.browser === 'android' && info.osversion < 5) { + info.version = info.osversion; + } + + return info; + }; + + module.exports = exports['default']; + +/***/ }, +/* 305 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 + */ + + !function (name, definition) { + if (typeof module != 'undefined' && module.exports) module.exports = definition() + else if (true) !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) + else this[name] = definition() + }('bowser', function () { + /** + * See useragents.js for examples of navigator.userAgent + */ + + var t = true + + function detect(ua) { + + function getFirstMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[1]) || ''; + } + + function getSecondMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[2]) || ''; + } + + var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() + , likeAndroid = /like android/i.test(ua) + , android = !likeAndroid && /android/i.test(ua) + , chromeBook = /CrOS/.test(ua) + , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) + , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) + , tablet = /tablet/i.test(ua) + , mobile = !tablet && /[^-]mobi/i.test(ua) + , result + + if (/opera|opr/i.test(ua)) { + result = { + name: 'Opera' + , opera: t + , version: versionIdentifier || getFirstMatch(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/yabrowser/i.test(ua)) { + result = { + name: 'Yandex Browser' + , yandexbrowser: t + , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/windows phone/i.test(ua)) { + result = { + name: 'Windows Phone' + , windowsphone: t + } + if (edgeVersion) { + result.msedge = t + result.version = edgeVersion + } + else { + result.msie = t + result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) + } + } + else if (/msie|trident/i.test(ua)) { + result = { + name: 'Internet Explorer' + , msie: t + , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) + } + } else if (chromeBook) { + result = { + name: 'Chrome' + , chromeBook: t + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } else if (/chrome.+? edge/i.test(ua)) { + result = { + name: 'Microsoft Edge' + , msedge: t + , version: edgeVersion + } + } + else if (/chrome|crios|crmo/i.test(ua)) { + result = { + name: 'Chrome' + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } + else if (iosdevice) { + result = { + name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' + } + // WTF: version is not part of user agent in web apps + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if (/sailfish/i.test(ua)) { + result = { + name: 'Sailfish' + , sailfish: t + , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) + } + } + else if (/seamonkey\//i.test(ua)) { + result = { + name: 'SeaMonkey' + , seamonkey: t + , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) + } + } + else if (/firefox|iceweasel/i.test(ua)) { + result = { + name: 'Firefox' + , firefox: t + , version: getFirstMatch(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i) + } + if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { + result.firefoxos = t + } + } + else if (/silk/i.test(ua)) { + result = { + name: 'Amazon Silk' + , silk: t + , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) + } + } + else if (android) { + result = { + name: 'Android' + , version: versionIdentifier + } + } + else if (/phantom/i.test(ua)) { + result = { + name: 'PhantomJS' + , phantom: t + , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) + } + } + else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { + result = { + name: 'BlackBerry' + , blackberry: t + , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) + } + } + else if (/(web|hpw)os/i.test(ua)) { + result = { + name: 'WebOS' + , webos: t + , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) + }; + /touchpad\//i.test(ua) && (result.touchpad = t) + } + else if (/bada/i.test(ua)) { + result = { + name: 'Bada' + , bada: t + , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) + }; + } + else if (/tizen/i.test(ua)) { + result = { + name: 'Tizen' + , tizen: t + , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier + }; + } + else if (/safari/i.test(ua)) { + result = { + name: 'Safari' + , safari: t + , version: versionIdentifier + } + } + else { + result = { + name: getFirstMatch(/^(.*)\/(.*) /), + version: getSecondMatch(/^(.*)\/(.*) /) + }; + } + + // set webkit or gecko flag for browsers based on these engines + if (!result.msedge && /(apple)?webkit/i.test(ua)) { + result.name = result.name || "Webkit" + result.webkit = t + if (!result.version && versionIdentifier) { + result.version = versionIdentifier + } + } else if (!result.opera && /gecko\//i.test(ua)) { + result.name = result.name || "Gecko" + result.gecko = t + result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) + } + + // set OS flags for platforms that have multiple browsers + if (!result.msedge && (android || result.silk)) { + result.android = t + } else if (iosdevice) { + result[iosdevice] = t + result.ios = t + } + + // OS version extraction + var osVersion = ''; + if (result.windowsphone) { + osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); + } else if (iosdevice) { + osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); + osVersion = osVersion.replace(/[_\s]/g, '.'); + } else if (android) { + osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); + } else if (result.webos) { + osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); + } else if (result.blackberry) { + osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); + } else if (result.bada) { + osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); + } else if (result.tizen) { + osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); + } + if (osVersion) { + result.osversion = osVersion; + } + + // device type extraction + var osMajorVersion = osVersion.split('.')[0]; + if (tablet || iosdevice == 'ipad' || (android && (osMajorVersion == 3 || (osMajorVersion == 4 && !mobile))) || result.silk) { + result.tablet = t + } else if (mobile || iosdevice == 'iphone' || iosdevice == 'ipod' || android || result.blackberry || result.webos || result.bada) { + result.mobile = t + } + + // Graded Browser Support + // http://developer.yahoo.com/yui/articles/gbs + if (result.msedge || + (result.msie && result.version >= 10) || + (result.yandexbrowser && result.version >= 15) || + (result.chrome && result.version >= 20) || + (result.firefox && result.version >= 20.0) || + (result.safari && result.version >= 6) || + (result.opera && result.version >= 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || + (result.blackberry && result.version >= 10.1) + ) { + result.a = t; + } + else if ((result.msie && result.version < 10) || + (result.chrome && result.version < 20) || + (result.firefox && result.version < 20.0) || + (result.safari && result.version < 6) || + (result.opera && result.version < 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] < 6) + ) { + result.c = t + } else result.x = t + + return result + } + + var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent : '') + + bowser.test = function (browserList) { + for (var i = 0; i < browserList.length; ++i) { + var browserItem = browserList[i]; + if (typeof browserItem=== 'string') { + if (browserItem in bowser) { + return true; + } + } + } + return false; + } + + /* + * Set our detect method to the main bowser object so we can + * reuse it to test other user agents. + * This is needed to implement future tests. + */ + bowser._detect = detect; + + return bowser + }); + + +/***/ }, +/* 306 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + exports['default'] = function (_ref) { + var browser = _ref.browser; + var version = _ref.version; + var prefix = _ref.prefix; + + var prefixedKeyframes = 'keyframes'; + + if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') { + prefixedKeyframes = prefix.css + prefixedKeyframes; + } + return prefixedKeyframes; + }; + + module.exports = exports['default']; + +/***/ }, +/* 307 */ +/***/ function(module, exports) { + + // helper to capitalize strings + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports["default"] = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); + }; + + module.exports = exports["default"]; + +/***/ }, +/* 308 */ +/***/ function(module, exports) { + + // leight polyfill for Object.assign + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports["default"] = function (base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + Object.keys(extend).forEach(function (key) { + return base[key] = extend[key]; + }); + return base; + }; + + module.exports = exports["default"]; + +/***/ }, +/* 309 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {// only throw warnings if devmode is enabled + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + exports['default'] = function () { + if (process.env.NODE_ENV !== 'production') { + console.warn.apply(console, arguments); + } + }; + + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }, +/* 310 */ +/***/ function(module, exports) { + + var caniuseData = {"chrome":{"transform":35,"transformOrigin":35,"transformOriginX":35,"transformOriginY":35,"backfaceVisibility":35,"perspective":35,"perspectiveOrigin":35,"transformStyle":35,"transformOriginZ":35,"animation":42,"animationDelay":42,"animationDirection":42,"animationFillMode":42,"animationDuration":42,"animationIterationCount":42,"animationName":42,"animationPlayState":42,"animationTimingFunction":42,"appearance":50,"userSelect":50,"fontKerning":32,"textEmphasisPosition":50,"textEmphasis":50,"textEmphasisStyle":50,"textEmphasisColor":50,"boxDecorationBreak":50,"clipPath":50,"maskImage":50,"maskMode":50,"maskRepeat":50,"maskPosition":50,"maskClip":50,"maskOrigin":50,"maskSize":50,"maskComposite":50,"mask":50,"maskBorderSource":50,"maskBorderMode":50,"maskBorderSlice":50,"maskBorderWidth":50,"maskBorderOutset":50,"maskBorderRepeat":50,"maskBorder":50,"maskType":50,"textDecorationStyle":50,"textDecorationSkip":50,"textDecorationLine":50,"textDecorationColor":50,"filter":50,"fontFeatureSettings":47,"breakAfter":50,"breakBefore":50,"breakInside":50,"columnCount":50,"columnFill":50,"columnGap":50,"columnRule":50,"columnRuleColor":50,"columnRuleStyle":50,"columnRuleWidth":50,"columns":50,"columnSpan":50,"columnWidth":50},"safari":{"flex":8,"flexBasis":8,"flexDirection":8,"flexGrow":8,"flexFlow":8,"flexShrink":8,"flexWrap":8,"alignContent":8,"alignItems":8,"alignSelf":8,"justifyContent":8,"order":8,"transition":6,"transitionDelay":6,"transitionDuration":6,"transitionProperty":6,"transitionTimingFunction":6,"transform":8,"transformOrigin":8,"transformOriginX":8,"transformOriginY":8,"backfaceVisibility":8,"perspective":8,"perspectiveOrigin":8,"transformStyle":8,"transformOriginZ":8,"animation":8,"animationDelay":8,"animationDirection":8,"animationFillMode":8,"animationDuration":8,"animationIterationCount":8,"animationName":8,"animationPlayState":8,"animationTimingFunction":8,"appearance":9.1,"userSelect":9.1,"backdropFilter":9.1,"fontKerning":9.1,"scrollSnapType":9.1,"scrollSnapPointsX":9.1,"scrollSnapPointsY":9.1,"scrollSnapDestination":9.1,"scrollSnapCoordinate":9.1,"textEmphasisPosition":7,"textEmphasis":7,"textEmphasisStyle":7,"textEmphasisColor":7,"boxDecorationBreak":9.1,"clipPath":9.1,"maskImage":9.1,"maskMode":9.1,"maskRepeat":9.1,"maskPosition":9.1,"maskClip":9.1,"maskOrigin":9.1,"maskSize":9.1,"maskComposite":9.1,"mask":9.1,"maskBorderSource":9.1,"maskBorderMode":9.1,"maskBorderSlice":9.1,"maskBorderWidth":9.1,"maskBorderOutset":9.1,"maskBorderRepeat":9.1,"maskBorder":9.1,"maskType":9.1,"textDecorationStyle":9.1,"textDecorationSkip":9.1,"textDecorationLine":9.1,"textDecorationColor":9.1,"shapeImageThreshold":9.1,"shapeImageMargin":9.1,"shapeImageOutside":9.1,"filter":9,"hyphens":9.1,"flowInto":9.1,"flowFrom":9.1,"breakBefore":8,"breakAfter":8,"breakInside":8,"regionFragment":9.1,"columnCount":8,"columnFill":8,"columnGap":8,"columnRule":8,"columnRuleColor":8,"columnRuleStyle":8,"columnRuleWidth":8,"columns":8,"columnSpan":8,"columnWidth":8},"firefox":{"appearance":46,"userSelect":46,"boxSizing":28,"textAlignLast":46,"textDecorationStyle":35,"textDecorationSkip":35,"textDecorationLine":35,"textDecorationColor":35,"tabSize":46,"hyphens":42,"fontFeatureSettings":33,"breakAfter":46,"breakBefore":46,"breakInside":46,"columnCount":46,"columnFill":46,"columnGap":46,"columnRule":46,"columnRuleColor":46,"columnRuleStyle":46,"columnRuleWidth":46,"columns":46,"columnSpan":46,"columnWidth":46},"opera":{"flex":16,"flexBasis":16,"flexDirection":16,"flexGrow":16,"flexFlow":16,"flexShrink":16,"flexWrap":16,"alignContent":16,"alignItems":16,"alignSelf":16,"justifyContent":16,"order":16,"transform":22,"transformOrigin":22,"transformOriginX":22,"transformOriginY":22,"backfaceVisibility":22,"perspective":22,"perspectiveOrigin":22,"transformStyle":22,"transformOriginZ":22,"animation":29,"animationDelay":29,"animationDirection":29,"animationFillMode":29,"animationDuration":29,"animationIterationCount":29,"animationName":29,"animationPlayState":29,"animationTimingFunction":29,"appearance":36,"userSelect":36,"fontKerning":19,"textEmphasisPosition":36,"textEmphasis":36,"textEmphasisStyle":36,"textEmphasisColor":36,"boxDecorationBreak":36,"clipPath":36,"maskImage":36,"maskMode":36,"maskRepeat":36,"maskPosition":36,"maskClip":36,"maskOrigin":36,"maskSize":36,"maskComposite":36,"mask":36,"maskBorderSource":36,"maskBorderMode":36,"maskBorderSlice":36,"maskBorderWidth":36,"maskBorderOutset":36,"maskBorderRepeat":36,"maskBorder":36,"maskType":36,"filter":36,"fontFeatureSettings":36,"breakAfter":36,"breakBefore":36,"breakInside":36,"columnCount":36,"columnFill":36,"columnGap":36,"columnRule":36,"columnRuleColor":36,"columnRuleStyle":36,"columnRuleWidth":36,"columns":36,"columnSpan":36,"columnWidth":36},"ie":{"gridArea":11,"gridGap":11,"gridColumnStart":11,"userSelect":11,"grid":11,"breakInside":11,"hyphens":11,"gridTemplateAreas":11,"breakAfter":11,"scrollSnapCoordinate":11,"gridRowStart":11,"gridAutoFlow":11,"scrollSnapDestination":11,"gridTemplate":11,"gridTemplateColumns":11,"transformOrigin":9,"gridAutoRows":11,"gridColumnEnd":11,"transformOriginY":9,"scrollSnapPointsY":11,"breakBefore":11,"gridRowGap":11,"scrollSnapPointsX":11,"regionFragment":11,"flexWrap":10,"wrapFlow":11,"gridRowEnd":11,"flex":10,"flexDirection":10,"flowInto":11,"touchAction":10,"gridColumn":11,"transform":9,"gridTemplateRows":11,"flexFlow":10,"transformOriginX":9,"flowFrom":11,"scrollSnapType":11,"wrapMargin":11,"gridColumnGap":11,"gridRow":11,"wrapThrough":11,"gridAutoColumns":11,"textSizeAdjust":11},"edge":{"userSelect":14,"wrapFlow":14,"wrapThrough":14,"wrapMargin":14,"scrollSnapType":14,"scrollSnapPointsX":14,"scrollSnapPointsY":14,"scrollSnapDestination":14,"scrollSnapCoordinate":14,"hyphens":14,"flowInto":14,"flowFrom":14,"breakBefore":14,"breakAfter":14,"breakInside":14,"regionFragment":14,"gridTemplateColumns":14,"gridTemplateRows":14,"gridTemplateAreas":14,"gridTemplate":14,"gridAutoColumns":14,"gridAutoRows":14,"gridAutoFlow":14,"grid":14,"gridRowStart":14,"gridColumnStart":14,"gridRowEnd":14,"gridRow":14,"gridColumn":14,"gridColumnEnd":14,"gridColumnGap":14,"gridRowGap":14,"gridArea":14,"gridGap":14},"ios_saf":{"flex":8.1,"flexBasis":8.1,"flexDirection":8.1,"flexGrow":8.1,"flexFlow":8.1,"flexShrink":8.1,"flexWrap":8.1,"alignContent":8.1,"alignItems":8.1,"alignSelf":8.1,"justifyContent":8.1,"order":8.1,"transition":6,"transitionDelay":6,"transitionDuration":6,"transitionProperty":6,"transitionTimingFunction":6,"transform":8.1,"transformOrigin":8.1,"transformOriginX":8.1,"transformOriginY":8.1,"backfaceVisibility":8.1,"perspective":8.1,"perspectiveOrigin":8.1,"transformStyle":8.1,"transformOriginZ":8.1,"animation":8.1,"animationDelay":8.1,"animationDirection":8.1,"animationFillMode":8.1,"animationDuration":8.1,"animationIterationCount":8.1,"animationName":8.1,"animationPlayState":8.1,"animationTimingFunction":8.1,"appearance":9.3,"userSelect":9.3,"backdropFilter":9.3,"fontKerning":9.3,"scrollSnapType":9.3,"scrollSnapPointsX":9.3,"scrollSnapPointsY":9.3,"scrollSnapDestination":9.3,"scrollSnapCoordinate":9.3,"boxDecorationBreak":9.3,"clipPath":9.3,"maskImage":9.3,"maskMode":9.3,"maskRepeat":9.3,"maskPosition":9.3,"maskClip":9.3,"maskOrigin":9.3,"maskSize":9.3,"maskComposite":9.3,"mask":9.3,"maskBorderSource":9.3,"maskBorderMode":9.3,"maskBorderSlice":9.3,"maskBorderWidth":9.3,"maskBorderOutset":9.3,"maskBorderRepeat":9.3,"maskBorder":9.3,"maskType":9.3,"textSizeAdjust":9.3,"textDecorationStyle":9.3,"textDecorationSkip":9.3,"textDecorationLine":9.3,"textDecorationColor":9.3,"shapeImageThreshold":9.3,"shapeImageMargin":9.3,"shapeImageOutside":9.3,"filter":9,"hyphens":9.3,"flowInto":9.3,"flowFrom":9.3,"breakBefore":8.1,"breakAfter":8.1,"breakInside":8.1,"regionFragment":9.3,"columnCount":8.1,"columnFill":8.1,"columnGap":8.1,"columnRule":8.1,"columnRuleColor":8.1,"columnRuleStyle":8.1,"columnRuleWidth":8.1,"columns":8.1,"columnSpan":8.1,"columnWidth":8.1},"android":{"borderImage":4.2,"borderImageOutset":4.2,"borderImageRepeat":4.2,"borderImageSlice":4.2,"borderImageSource":4.2,"borderImageWidth":4.2,"flex":4.2,"flexBasis":4.2,"flexDirection":4.2,"flexGrow":4.2,"flexFlow":4.2,"flexShrink":4.2,"flexWrap":4.2,"alignContent":4.2,"alignItems":4.2,"alignSelf":4.2,"justifyContent":4.2,"order":4.2,"transition":4.2,"transitionDelay":4.2,"transitionDuration":4.2,"transitionProperty":4.2,"transitionTimingFunction":4.2,"transform":4.4,"transformOrigin":4.4,"transformOriginX":4.4,"transformOriginY":4.4,"backfaceVisibility":4.4,"perspective":4.4,"perspectiveOrigin":4.4,"transformStyle":4.4,"transformOriginZ":4.4,"animation":4.4,"animationDelay":4.4,"animationDirection":4.4,"animationFillMode":4.4,"animationDuration":4.4,"animationIterationCount":4.4,"animationName":4.4,"animationPlayState":4.4,"animationTimingFunction":4.4,"appearance":46,"userSelect":46,"fontKerning":4.4,"textEmphasisPosition":46,"textEmphasis":46,"textEmphasisStyle":46,"textEmphasisColor":46,"boxDecorationBreak":46,"clipPath":46,"maskImage":46,"maskMode":46,"maskRepeat":46,"maskPosition":46,"maskClip":46,"maskOrigin":46,"maskSize":46,"maskComposite":46,"mask":46,"maskBorderSource":46,"maskBorderMode":46,"maskBorderSlice":46,"maskBorderWidth":46,"maskBorderOutset":46,"maskBorderRepeat":46,"maskBorder":46,"maskType":46,"filter":46,"fontFeatureSettings":46,"breakAfter":46,"breakBefore":46,"breakInside":46,"columnCount":46,"columnFill":46,"columnGap":46,"columnRule":46,"columnRuleColor":46,"columnRuleStyle":46,"columnRuleWidth":46,"columns":46,"columnSpan":46,"columnWidth":46},"and_chr":{"appearance":47,"userSelect":47,"textEmphasisPosition":47,"textEmphasis":47,"textEmphasisStyle":47,"textEmphasisColor":47,"boxDecorationBreak":47,"clipPath":47,"maskImage":47,"maskMode":47,"maskRepeat":47,"maskPosition":47,"maskClip":47,"maskOrigin":47,"maskSize":47,"maskComposite":47,"mask":47,"maskBorderSource":47,"maskBorderMode":47,"maskBorderSlice":47,"maskBorderWidth":47,"maskBorderOutset":47,"maskBorderRepeat":47,"maskBorder":47,"maskType":47,"textDecorationStyle":47,"textDecorationSkip":47,"textDecorationLine":47,"textDecorationColor":47,"filter":47,"fontFeatureSettings":47,"breakAfter":47,"breakBefore":47,"breakInside":47,"columnCount":47,"columnFill":47,"columnGap":47,"columnRule":47,"columnRuleColor":47,"columnRuleStyle":47,"columnRuleWidth":47,"columns":47,"columnSpan":47,"columnWidth":47},"and_uc":{"flex":9.9,"flexBasis":9.9,"flexDirection":9.9,"flexGrow":9.9,"flexFlow":9.9,"flexShrink":9.9,"flexWrap":9.9,"alignContent":9.9,"alignItems":9.9,"alignSelf":9.9,"justifyContent":9.9,"order":9.9,"transition":9.9,"transitionDelay":9.9,"transitionDuration":9.9,"transitionProperty":9.9,"transitionTimingFunction":9.9,"transform":9.9,"transformOrigin":9.9,"transformOriginX":9.9,"transformOriginY":9.9,"backfaceVisibility":9.9,"perspective":9.9,"perspectiveOrigin":9.9,"transformStyle":9.9,"transformOriginZ":9.9,"animation":9.9,"animationDelay":9.9,"animationDirection":9.9,"animationFillMode":9.9,"animationDuration":9.9,"animationIterationCount":9.9,"animationName":9.9,"animationPlayState":9.9,"animationTimingFunction":9.9,"appearance":9.9,"userSelect":9.9,"fontKerning":9.9,"textEmphasisPosition":9.9,"textEmphasis":9.9,"textEmphasisStyle":9.9,"textEmphasisColor":9.9,"maskImage":9.9,"maskMode":9.9,"maskRepeat":9.9,"maskPosition":9.9,"maskClip":9.9,"maskOrigin":9.9,"maskSize":9.9,"maskComposite":9.9,"mask":9.9,"maskBorderSource":9.9,"maskBorderMode":9.9,"maskBorderSlice":9.9,"maskBorderWidth":9.9,"maskBorderOutset":9.9,"maskBorderRepeat":9.9,"maskBorder":9.9,"maskType":9.9,"textSizeAdjust":9.9,"filter":9.9,"hyphens":9.9,"flowInto":9.9,"flowFrom":9.9,"breakBefore":9.9,"breakAfter":9.9,"breakInside":9.9,"regionFragment":9.9,"fontFeatureSettings":9.9,"columnCount":9.9,"columnFill":9.9,"columnGap":9.9,"columnRule":9.9,"columnRuleColor":9.9,"columnRuleStyle":9.9,"columnRuleWidth":9.9,"columns":9.9,"columnSpan":9.9,"columnWidth":9.9},"op_mini":{"borderImage":5,"borderImageOutset":5,"borderImageRepeat":5,"borderImageSlice":5,"borderImageSource":5,"borderImageWidth":5,"tabSize":5,"objectFit":5,"objectPosition":5}}; module.exports = caniuseData + +/***/ }, +/* 311 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _pluginsCalc = __webpack_require__(312); + + var _pluginsCalc2 = _interopRequireDefault(_pluginsCalc); + + var _pluginsCursor = __webpack_require__(313); + + var _pluginsCursor2 = _interopRequireDefault(_pluginsCursor); + + var _pluginsFlex = __webpack_require__(314); + + var _pluginsFlex2 = _interopRequireDefault(_pluginsFlex); + + var _pluginsSizing = __webpack_require__(315); + + var _pluginsSizing2 = _interopRequireDefault(_pluginsSizing); + + var _pluginsGradient = __webpack_require__(316); + + var _pluginsGradient2 = _interopRequireDefault(_pluginsGradient); + + var _pluginsTransition = __webpack_require__(317); + + var _pluginsTransition2 = _interopRequireDefault(_pluginsTransition); + + // special flexbox specifications + + var _pluginsFlexboxIE = __webpack_require__(319); + + var _pluginsFlexboxIE2 = _interopRequireDefault(_pluginsFlexboxIE); + + var _pluginsFlexboxOld = __webpack_require__(320); + + var _pluginsFlexboxOld2 = _interopRequireDefault(_pluginsFlexboxOld); + + exports['default'] = [_pluginsCalc2['default'], _pluginsCursor2['default'], _pluginsSizing2['default'], _pluginsGradient2['default'], _pluginsTransition2['default'], _pluginsFlexboxIE2['default'], _pluginsFlexboxOld2['default'], + // this must be run AFTER the flexbox specs + _pluginsFlex2['default']]; + module.exports = exports['default']; + +/***/ }, +/* 312 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = calc; + + function _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; } + + function calc(pluginInterface) { + var property = pluginInterface.property; + var value = pluginInterface.value; + var browserInfo = pluginInterface.browserInfo; + var prefix = pluginInterface.prefix; + var keepUnprefixed = pluginInterface.keepUnprefixed; + var forceRun = pluginInterface.forceRun; + var browser = browserInfo.browser; + var version = browserInfo.version; + + if (typeof value === 'string' && value.indexOf('calc(') > -1 && (forceRun || browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) { + var newValue = forceRun ? + // prefix all + ['-webkit-', '-moz-'].map(function (prefix) { + return value.replace(/calc\(/g, prefix + 'calc('); + }).join(';' + property + ':') : + // default + value.replace(/calc\(/g, prefix.css + 'calc('); + return _defineProperty({}, property, newValue + (keepUnprefixed ? ';' + property + ':' + value : '')); + } + } + + module.exports = exports['default']; + +/***/ }, +/* 313 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = cursor; + var values = { + 'zoom-in': true, + 'zoom-out': true, + grab: true, + grabbing: true + }; + + function cursor(pluginInterface) { + var property = pluginInterface.property; + var value = pluginInterface.value; + var browserInfo = pluginInterface.browserInfo; + var prefix = pluginInterface.prefix; + var keepUnprefixed = pluginInterface.keepUnprefixed; + var forceRun = pluginInterface.forceRun; + var browser = browserInfo.browser; + var version = browserInfo.version; + + if (property === 'cursor' && values[value] && (forceRun || browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) { + var newValue = forceRun ? + // prefix all + ['-webkit-', '-moz-'].map(function (prefix) { + return prefix + value; + }).join(';' + property + ':') : + // default + prefix.css + value; + return { + cursor: newValue + (keepUnprefixed ? ';' + property + ':' + value : '') + }; + } + } + + module.exports = exports['default']; + +/***/ }, +/* 314 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = flex; + var values = { flex: true, 'inline-flex': true }; + + function flex(pluginInterface) { + var property = pluginInterface.property; + var value = pluginInterface.value; + var browserInfo = pluginInterface.browserInfo; + var prefix = pluginInterface.prefix; + var keepUnprefixed = pluginInterface.keepUnprefixed; + var forceRun = pluginInterface.forceRun; + var browser = browserInfo.browser; + var version = browserInfo.version; + + if (property === 'display' && values[value] && (forceRun || browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) { + var newValue = forceRun ? + // prefix all + ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value].join(';' + property + ':') : + // default + '-webkit-' + value; + return { + display: newValue + (keepUnprefixed ? ';' + property + ':' + value : '') + }; + } + } + + module.exports = exports['default']; + +/***/ }, +/* 315 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = sizing; + + function _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; } + + var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true + }; + var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true + }; + + function sizing(pluginInterface) { + var property = pluginInterface.property; + var value = pluginInterface.value; + var browserInfo = pluginInterface.browserInfo; + var prefix = pluginInterface.prefix; + var keepUnprefixed = pluginInterface.keepUnprefixed; + var forceRun = pluginInterface.forceRun; + var browser = browserInfo.browser; + var version = browserInfo.version; + + // This might change in the future + // Keep an eye on it + if (properties[property] && values[value]) { + var newValue = forceRun ? + // prefix all + ['-webkit-', '-moz-'].map(function (prefix) { + return prefix + value; + }).join(';' + property + ':') : + // default + prefix.css + value; + return _defineProperty({}, property, newValue + (keepUnprefixed ? ';' + property + ':' + value : '')); + } + } + + module.exports = exports['default']; + +/***/ }, +/* 316 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = gradient; + + function _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; } + + var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + + function gradient(pluginInterface) { + var property = pluginInterface.property; + var value = pluginInterface.value; + var browserInfo = pluginInterface.browserInfo; + var prefix = pluginInterface.prefix; + var keepUnprefixed = pluginInterface.keepUnprefixed; + var forceRun = pluginInterface.forceRun; + var browser = browserInfo.browser; + var version = browserInfo.version; + + if (typeof value === 'string' && value.match(values) !== null && (forceRun || browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + var newValue = forceRun ? + // prefix all + ['-webkit-', '-moz-'].map(function (prefix) { + return prefix + value; + }).join(';' + property + ':') : + // default + prefix.css + value; + return _defineProperty({}, property, newValue + (keepUnprefixed ? ';' + property + ':' + value : '')); + } + } + + module.exports = exports['default']; + +/***/ }, +/* 317 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = calc; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _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; } + + var _utilsCamelToDashCase = __webpack_require__(318); + + var _utilsCamelToDashCase2 = _interopRequireDefault(_utilsCamelToDashCase); + + var _utilsCapitalizeString = __webpack_require__(307); + + var _utilsCapitalizeString2 = _interopRequireDefault(_utilsCapitalizeString); + + function calc(pluginInterface) { + var property = pluginInterface.property; + var value = pluginInterface.value; + var browserInfo = pluginInterface.browserInfo; + var prefix = pluginInterface.prefix; + var keepUnprefixed = pluginInterface.keepUnprefixed; + var forceRun = pluginInterface.forceRun; + var requiresPrefix = pluginInterface.requiresPrefix; + var browser = browserInfo.browser; + var version = browserInfo.version; + + if ( + // also check for already prefixed transitions + typeof value === 'string' && (property.toLowerCase().indexOf('transition') > -1 || property.toLowerCase().indexOf('transitionproperty') > -1)) { + var _ref; + + var _ret = (function () { + var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (property) { + return (0, _utilsCamelToDashCase2['default'])(property); + }); + var newValue = value; + + // only split multi values, not cubic beziers + var multipleValues = newValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + requiresPrefixDashCased.forEach(function (property) { + multipleValues.forEach(function (val, index) { + if (val.indexOf(property) > -1) { + var newVal = forceRun ? + // prefix all + ['-webkit-', '-moz-', '-ms-'].map(function (prefix) { + return val.replace(property, prefix + property); + }).join(',') : + // default + val.replace(property, prefix.css + property); + multipleValues[index] = newVal + (keepUnprefixed ? ',' + val : ''); + } + }); + }); + var outputValue = multipleValues.join(','); + if (forceRun) { + return { + v: (_ref = {}, _defineProperty(_ref, 'Webkit' + (0, _utilsCapitalizeString2['default'])(property), outputValue), _defineProperty(_ref, 'Moz' + (0, _utilsCapitalizeString2['default'])(property), outputValue), _defineProperty(_ref, 'ms' + (0, _utilsCapitalizeString2['default'])(property), outputValue), _defineProperty(_ref, property, outputValue), _ref) + }; + } + return { + v: _defineProperty({}, property, outputValue) + }; + })(); + + if (typeof _ret === 'object') return _ret.v; + } + } + + module.exports = exports['default']; + +/***/ }, +/* 318 */ +/***/ function(module, exports) { + + /** + * Converts a camel-case string to a dash-case string + * @param {string} str - str that gets converted to dash-case + */ + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + exports['default'] = function (str) { + return str.replace(/([a-z]|^)([A-Z])/g, function (match, p1, p2) { + return p1 + '-' + p2.toLowerCase(); + }).replace('ms-', '-ms-'); + }; + + module.exports = exports['default']; + +/***/ }, +/* 319 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + exports['default'] = flexboxIE; + + function _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; } + + var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + flex: '-ms-flexbox', + 'inline-flex': '-ms-inline-flexbox' + }; + var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' + }; + + var properties = Object.keys(alternativeProps).concat('display').reduce(function (result, prop) { + return _extends({}, result, _defineProperty({}, prop, true)); + }, {}); + + function flexboxIE(pluginInterface) { + var property = pluginInterface.property; + var value = pluginInterface.value; + var styles = pluginInterface.styles; + var browserInfo = pluginInterface.browserInfo; + var prefix = pluginInterface.prefix; + var keepUnprefixed = pluginInterface.keepUnprefixed; + var forceRun = pluginInterface.forceRun; + var browser = browserInfo.browser; + var version = browserInfo.version; + + if (properties[property] && (forceRun || (browser === 'ie_mob' || browser === 'ie') && version == 10)) { + if (!keepUnprefixed) { + delete styles[property]; + } + + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + if (alternativeValues[value]) { + return _defineProperty({}, property, alternativeValues[value] + (keepUnprefixed ? ';' + property + ':' + value : '')); + } + } + } + + module.exports = exports['default']; + +/***/ }, +/* 320 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + exports['default'] = flexboxOld; + + function _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; } + + var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple', + flex: 'box', + 'inline-flex': 'inline-box' + }; + + var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' + }; + + var properties = Object.keys(alternativeProps).concat(['alignContent', 'alignSelf', 'display', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection']).reduce(function (result, prop) { + return _extends({}, result, _defineProperty({}, prop, true)); + }, {}); + + function flexboxOld(pluginInterface) { + var property = pluginInterface.property; + var value = pluginInterface.value; + var styles = pluginInterface.styles; + var browserInfo = pluginInterface.browserInfo; + var prefix = pluginInterface.prefix; + var keepUnprefixed = pluginInterface.keepUnprefixed; + var forceRun = pluginInterface.forceRun; + var browser = browserInfo.browser; + var version = browserInfo.version; + + if (properties[property] && (forceRun || browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + if (!keepUnprefixed) { + delete styles[property]; + } + if (property === 'flexDirection') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: prefix.css + alternativeValues[value] + (keepUnprefixed ? ';' + property + ':' + value : '') + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + if (alternativeValues[value]) { + return _defineProperty({}, property, alternativeValues[value] + (keepUnprefixed ? ';' + property + ':' + value : '')); + } + } + } + + module.exports = exports['default']; + +/***/ }, +/* 321 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = callOnce; + + var _warning = __webpack_require__(273); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var CALLED_ONCE = 'muiPrepared'; + + function callOnce() { + if (process.env.NODE_ENV !== 'production') { + return function (style) { + if (style[CALLED_ONCE]) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'You cannot call prepareStyles() on the same style object more than once.') : undefined; + } + style[CALLED_ONCE] = true; + return style; + }; + } + } + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }, +/* 322 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = rtl; + var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/; + var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/; + + /** + * This function ensures that `style` supports both ltr and rtl directions by + * checking `styleConstants` in `muiTheme` and replacing attribute keys if + * necessary. + */ + function rtl(muiTheme) { + if (muiTheme.isRtl) { + return function (style) { + var flippedAttributes = { + // Keys and their replacements. + right: 'left', + left: 'right', + marginRight: 'marginLeft', + marginLeft: 'marginRight', + paddingRight: 'paddingLeft', + paddingLeft: 'paddingRight', + borderRight: 'borderLeft', + borderLeft: 'borderRight' + }; + + var newStyle = {}; + + Object.keys(style).forEach(function (attribute) { + var value = style[attribute]; + var key = attribute; + + if (flippedAttributes.hasOwnProperty(attribute)) { + key = flippedAttributes[attribute]; + } + + switch (attribute) { + case 'float': + case 'textAlign': + if (value === 'right') { + value = 'left'; + } else if (value === 'left') { + value = 'right'; + } + break; + + case 'direction': + if (value === 'ltr') { + value = 'rtl'; + } else if (value === 'rtl') { + value = 'ltr'; + } + break; + + case 'transform': + var matches = undefined; + if (matches = value.match(reTranslate)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4])); + } + if (matches = value.match(reSkew)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : ''); + } + break; + + case 'transformOrigin': + if (value.indexOf('right') > -1) { + value = value.replace('right', 'left'); + } else if (value.indexOf('left') > -1) { + value = value.replace('left', 'right'); + } + break; + } + + newStyle[key] = value; + }); + + return newStyle; + }; + } + } + module.exports = exports['default']; + +/***/ }, +/* 323 */ +/***/ function(module, exports) { + + /** + * lodash 3.2.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return function() { + var length = arguments.length, + index = fromRight ? length : -1, + leftIndex = 0, + funcs = Array(length); + + while ((fromRight ? index-- : ++index < length)) { + var func = funcs[leftIndex++] = arguments[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + var index = 0, + result = length ? funcs[index].apply(this, arguments) : arguments[0]; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }; + } + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the provided functions from right to left. + * + * @static + * @memberOf _ + * @alias backflow, compose + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight(square, _.add); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + module.exports = flowRight; + + +/***/ }, +/* 324 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _colors = __webpack_require__(298); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var Typography = function Typography() { + _classCallCheck(this, Typography); + + // text colors + this.textFullBlack = _colors.fullBlack; + this.textDarkBlack = _colors.darkBlack; + this.textLightBlack = _colors.lightBlack; + this.textMinBlack = _colors.minBlack; + this.textFullWhite = _colors.fullWhite; + this.textDarkWhite = _colors.darkWhite; + this.textLightWhite = _colors.lightWhite; + + // font weight + this.fontWeightLight = 300; + this.fontWeightNormal = 400; + this.fontWeightMedium = 500; + + this.fontStyleButtonFontSize = 14; + }; + + exports.default = new Typography(); + module.exports = exports['default']; + +/***/ }, +/* 325 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _simpleAssign = __webpack_require__(270); + + var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(159); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _reactAddonsPureRenderMixin = __webpack_require__(278); + + var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + + var _reactAddonsTransitionGroup = __webpack_require__(286); + + var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + + var _dom = __webpack_require__(326); + + var _dom2 = _interopRequireDefault(_dom); + + var _circleRipple = __webpack_require__(327); + + var _circleRipple2 = _interopRequireDefault(_circleRipple); + + var _reactAddonsUpdate = __webpack_require__(328); + + var _reactAddonsUpdate2 = _interopRequireDefault(_reactAddonsUpdate); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function push(array, obj) { + var newObj = Array.isArray(obj) ? obj : [obj]; + return (0, _reactAddonsUpdate2.default)(array, { $push: newObj }); + } + + function shift(array) { + //Remove the first element in the array using React immutability helpers + return (0, _reactAddonsUpdate2.default)(array, { $splice: [[0, 1]] }); + } + + var TouchRipple = _react2.default.createClass({ + displayName: 'TouchRipple', + + + propTypes: { + abortOnScroll: _react2.default.PropTypes.bool, + centerRipple: _react2.default.PropTypes.bool, + children: _react2.default.PropTypes.node, + color: _react2.default.PropTypes.string, + + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react2.default.PropTypes.object.isRequired, + + opacity: _react2.default.PropTypes.number, + + /** + * Override the inline-styles of the root element. + */ + style: _react2.default.PropTypes.object + }, + + mixins: [_reactAddonsPureRenderMixin2.default], + + getDefaultProps: function getDefaultProps() { + return { + abortOnScroll: true + }; + }, + getInitialState: function getInitialState() { + //Touch start produces a mouse down event for compat reasons. To avoid + //showing ripples twice we skip showing a ripple for the first mouse down + //after a touch start. Note we don't store ignoreNextMouseDown in this.state + //to avoid re-rendering when we change it + this._ignoreNextMouseDown = false; + + return { + //This prop allows us to only render the ReactTransitionGroup + //on the first click of the component, making the inital + //render faster + hasRipples: false, + nextKey: 0, + ripples: [] + }; + }, + start: function start(event, isRippleTouchGenerated) { + var theme = this.props.muiTheme.ripple; + + if (this._ignoreNextMouseDown && !isRippleTouchGenerated) { + this._ignoreNextMouseDown = false; + return; + } + + var ripples = this.state.ripples; + + //Add a ripple to the ripples array + ripples = push(ripples, _react2.default.createElement(_circleRipple2.default, { + key: this.state.nextKey, + muiTheme: this.props.muiTheme, + style: !this.props.centerRipple ? this._getRippleStyle(event) : {}, + color: this.props.color || theme.color, + opacity: this.props.opacity, + touchGenerated: isRippleTouchGenerated + })); + + this._ignoreNextMouseDown = isRippleTouchGenerated; + this.setState({ + hasRipples: true, + nextKey: this.state.nextKey + 1, + ripples: ripples + }); + }, + end: function end() { + var currentRipples = this.state.ripples; + this.setState({ + ripples: shift(currentRipples) + }); + if (this.props.abortOnScroll) { + this._stopListeningForScrollAbort(); + } + }, + _handleMouseDown: function _handleMouseDown(event) { + //only listen to left clicks + if (event.button === 0) this.start(event, false); + }, + _handleMouseUp: function _handleMouseUp() { + this.end(); + }, + _handleMouseLeave: function _handleMouseLeave() { + this.end(); + }, + _handleTouchStart: function _handleTouchStart(event) { + //If the user is swiping (not just tapping), save the position so we can + //abort ripples if the user appears to be scrolling + if (this.props.abortOnScroll && event.touches) { + this._startListeningForScrollAbort(event); + this._startTime = Date.now(); + } + this.start(event, true); + }, + _handleTouchEnd: function _handleTouchEnd() { + this.end(); + }, + + + //Check if the user seems to be scrolling and abort the animation if so + _handleTouchMove: function _handleTouchMove(event) { + var _this = this; + + //Stop trying to abort if we're already 300ms into the animation + var timeSinceStart = Math.abs(Date.now() - this._startTime); + if (timeSinceStart > 300) { + this._stopListeningForScrollAbort(); + return; + } + + //If the user is scrolling... + var deltaY = Math.abs(event.touches[0].clientY - this._firstTouchY); + var deltaX = Math.abs(event.touches[0].clientX - this._firstTouchX); + //Call it a scroll after an arbitrary 6px (feels reasonable in testing) + if (deltaY > 6 || deltaX > 6) { + var currentRipples = this.state.ripples; + var ripple = currentRipples[0]; + //This clone will replace the ripple in ReactTransitionGroup with a + //version that will disappear immediately when removed from the DOM + var abortedRipple = _react2.default.cloneElement(ripple, { aborted: true }); + //Remove the old ripple and replace it with the new updated one + currentRipples = shift(currentRipples); + currentRipples = push(currentRipples, abortedRipple); + this.setState({ ripples: currentRipples }, function () { + //Call end after we've set the ripple to abort otherwise the setState + //in end() merges with this and the ripple abort fails + _this.end(); + }); + } + }, + _startListeningForScrollAbort: function _startListeningForScrollAbort(event) { + this._firstTouchY = event.touches[0].clientY; + this._firstTouchX = event.touches[0].clientX; + //Note that when scolling Chrome throttles this event to every 200ms + //Also note we don't listen for scroll events directly as there's no general + //way to cover cases like scrolling within containers on the page + document.body.addEventListener('touchmove', this._handleTouchMove); + }, + _stopListeningForScrollAbort: function _stopListeningForScrollAbort() { + document.body.removeEventListener('touchmove', this._handleTouchMove); + }, + _getRippleStyle: function _getRippleStyle(event) { + var style = {}; + var el = _reactDom2.default.findDOMNode(this); + var elHeight = el.offsetHeight; + var elWidth = el.offsetWidth; + var offset = _dom2.default.offset(el); + var isTouchEvent = event.touches && event.touches.length; + var pageX = isTouchEvent ? event.touches[0].pageX : event.pageX; + var pageY = isTouchEvent ? event.touches[0].pageY : event.pageY; + var pointerX = pageX - offset.left; + var pointerY = pageY - offset.top; + var topLeftDiag = this._calcDiag(pointerX, pointerY); + var topRightDiag = this._calcDiag(elWidth - pointerX, pointerY); + var botRightDiag = this._calcDiag(elWidth - pointerX, elHeight - pointerY); + var botLeftDiag = this._calcDiag(pointerX, elHeight - pointerY); + var rippleRadius = Math.max(topLeftDiag, topRightDiag, botRightDiag, botLeftDiag); + var rippleSize = rippleRadius * 2; + var left = pointerX - rippleRadius; + var top = pointerY - rippleRadius; + + style.height = rippleSize + 'px'; + style.width = rippleSize + 'px'; + style.top = top + 'px'; + style.left = left + 'px'; + + return style; + }, + _calcDiag: function _calcDiag(a, b) { + return Math.sqrt(a * a + b * b); + }, + render: function render() { + var _props = this.props; + var children = _props.children; + var prepareStyles = _props.muiTheme.prepareStyles; + var style = _props.style; + var _state = this.state; + var hasRipples = _state.hasRipples; + var ripples = _state.ripples; + + + var rippleGroup = undefined; + if (hasRipples) { + var mergedStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0, + overflow: 'hidden' + }, style); + + rippleGroup = _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { style: prepareStyles(mergedStyles) }, + ripples + ); + } + + return _react2.default.createElement( + 'div', + { + onMouseUp: this._handleMouseUp, + onMouseDown: this._handleMouseDown, + onMouseLeave: this._handleMouseLeave, + onTouchStart: this._handleTouchStart, + onTouchEnd: this._handleTouchEnd + }, + rippleGroup, + children + ); + } + }); + + exports.default = TouchRipple; + module.exports = exports['default']; + +/***/ }, +/* 326 */ +/***/ function(module, exports) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = { + isDescendant: function isDescendant(parent, child) { + var node = child.parentNode; + + while (node !== null) { + if (node === parent) return true; + node = node.parentNode; + } + + return false; + }, + offset: function offset(el) { + var rect = el.getBoundingClientRect(); + return { + top: rect.top + document.body.scrollTop, + left: rect.left + document.body.scrollLeft + }; + } + }; + module.exports = exports['default']; + +/***/ }, +/* 327 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _simpleAssign = __webpack_require__(270); + + var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(159); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _reactAddonsPureRenderMixin = __webpack_require__(278); + + var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + + var _autoPrefix = __webpack_require__(284); + + var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + + var _transitions = __webpack_require__(271); + + var _transitions2 = _interopRequireDefault(_transitions); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var CircleRipple = _react2.default.createClass({ + displayName: 'CircleRipple', + + + propTypes: { + aborted: _react2.default.PropTypes.bool, + color: _react2.default.PropTypes.string, + + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react2.default.PropTypes.object.isRequired, + + opacity: _react2.default.PropTypes.number, + + /** + * Override the inline-styles of the root element. + */ + style: _react2.default.PropTypes.object + }, + + mixins: [_reactAddonsPureRenderMixin2.default], + + getDefaultProps: function getDefaultProps() { + return { + opacity: 0.1, + aborted: false + }; + }, + componentWillUnmount: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + }, + componentWillAppear: function componentWillAppear(callback) { + this._initializeAnimation(callback); + }, + componentWillEnter: function componentWillEnter(callback) { + this._initializeAnimation(callback); + }, + componentDidAppear: function componentDidAppear() { + this._animate(); + }, + componentDidEnter: function componentDidEnter() { + this._animate(); + }, + componentWillLeave: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = 0; + //If the animation is aborted, remove from the DOM immediately + var removeAfter = this.props.aborted ? 0 : 2000; + this.enterTimer = setTimeout(callback, removeAfter); + }, + _animate: function _animate() { + var style = _reactDom2.default.findDOMNode(this).style; + var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform'); + _autoPrefix2.default.set(style, 'transition', transitionValue, this.props.muiTheme); + _autoPrefix2.default.set(style, 'transform', 'scale(1)', this.props.muiTheme); + }, + _initializeAnimation: function _initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = this.props.opacity; + _autoPrefix2.default.set(style, 'transform', 'scale(0)', this.props.muiTheme); + this.leaveTimer = setTimeout(callback, 0); + }, + render: function render() { + var _props = this.props; + var color = _props.color; + var prepareStyles = _props.muiTheme.prepareStyles; + var opacity = _props.opacity; + var style = _props.style; + + var other = _objectWithoutProperties(_props, ['color', 'muiTheme', 'opacity', 'style']); + + var mergedStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + top: 0, + left: 0, + height: '100%', + width: '100%', + borderRadius: '50%', + backgroundColor: color + }, style); + + return _react2.default.createElement('div', _extends({}, other, { style: prepareStyles(mergedStyles) })); + } + }); + + exports.default = CircleRipple; + module.exports = exports['default']; + +/***/ }, +/* 328 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(329); + +/***/ }, +/* 329 */ +/***/ 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 update + */ + + /* global hasOwnProperty:true */ + + 'use strict'; + + var assign = __webpack_require__(40); + var keyOf = __webpack_require__(80); + var invariant = __webpack_require__(14); + var hasOwnProperty = ({}).hasOwnProperty; + + function shallowCopy(x) { + if (Array.isArray(x)) { + return x.concat(); + } else if (x && typeof x === 'object') { + return assign(new x.constructor(), x); + } else { + return x; + } + } + + var COMMAND_PUSH = keyOf({ $push: null }); + var COMMAND_UNSHIFT = keyOf({ $unshift: null }); + var COMMAND_SPLICE = keyOf({ $splice: null }); + var COMMAND_SET = keyOf({ $set: null }); + var COMMAND_MERGE = keyOf({ $merge: null }); + var COMMAND_APPLY = keyOf({ $apply: null }); + + var ALL_COMMANDS_LIST = [COMMAND_PUSH, COMMAND_UNSHIFT, COMMAND_SPLICE, COMMAND_SET, COMMAND_MERGE, COMMAND_APPLY]; + + var ALL_COMMANDS_SET = {}; + + ALL_COMMANDS_LIST.forEach(function (command) { + ALL_COMMANDS_SET[command] = true; + }); + + function invariantArrayCase(value, spec, command) { + !Array.isArray(value) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected target of %s to be an array; got %s.', command, value) : invariant(false) : undefined; + var specValue = spec[command]; + !Array.isArray(specValue) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array; got %s. ' + 'Did you forget to wrap your parameter in an array?', command, specValue) : invariant(false) : undefined; + } + + function update(value, spec) { + !(typeof spec === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): You provided a key path to update() that did not contain one ' + 'of %s. Did you forget to include {%s: ...}?', ALL_COMMANDS_LIST.join(', '), COMMAND_SET) : invariant(false) : undefined; + + if (hasOwnProperty.call(spec, COMMAND_SET)) { + !(Object.keys(spec).length === 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot have more than one key in an object with %s', COMMAND_SET) : invariant(false) : undefined; + + return spec[COMMAND_SET]; + } + + var nextValue = shallowCopy(value); + + if (hasOwnProperty.call(spec, COMMAND_MERGE)) { + var mergeObj = spec[COMMAND_MERGE]; + !(mergeObj && typeof mergeObj === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): %s expects a spec of type \'object\'; got %s', COMMAND_MERGE, mergeObj) : invariant(false) : undefined; + !(nextValue && typeof nextValue === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): %s expects a target of type \'object\'; got %s', COMMAND_MERGE, nextValue) : invariant(false) : undefined; + assign(nextValue, spec[COMMAND_MERGE]); + } + + if (hasOwnProperty.call(spec, COMMAND_PUSH)) { + invariantArrayCase(value, spec, COMMAND_PUSH); + spec[COMMAND_PUSH].forEach(function (item) { + nextValue.push(item); + }); + } + + if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) { + invariantArrayCase(value, spec, COMMAND_UNSHIFT); + spec[COMMAND_UNSHIFT].forEach(function (item) { + nextValue.unshift(item); + }); + } + + if (hasOwnProperty.call(spec, COMMAND_SPLICE)) { + !Array.isArray(value) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s target to be an array; got %s', COMMAND_SPLICE, value) : invariant(false) : undefined; + !Array.isArray(spec[COMMAND_SPLICE]) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. ' + 'Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : invariant(false) : undefined; + spec[COMMAND_SPLICE].forEach(function (args) { + !Array.isArray(args) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be an array of arrays; got %s. ' + 'Did you forget to wrap your parameters in an array?', COMMAND_SPLICE, spec[COMMAND_SPLICE]) : invariant(false) : undefined; + nextValue.splice.apply(nextValue, args); + }); + } + + if (hasOwnProperty.call(spec, COMMAND_APPLY)) { + !(typeof spec[COMMAND_APPLY] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'update(): expected spec of %s to be a function; got %s.', COMMAND_APPLY, spec[COMMAND_APPLY]) : invariant(false) : undefined; + nextValue = spec[COMMAND_APPLY](nextValue); + } + + for (var k in spec) { + if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) { + nextValue[k] = update(value[k], spec[k]); + } + } + + return nextValue; + } + + module.exports = update; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }, +/* 330 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _simpleAssign = __webpack_require__(270); + + var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + var _reactAddonsPureRenderMixin = __webpack_require__(278); + + var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin); + + var _propTypes = __webpack_require__(331); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _transitions = __webpack_require__(271); + + var _transitions2 = _interopRequireDefault(_transitions); + + var _getMuiTheme = __webpack_require__(290); + + var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + function getStyles(props, state) { + var circle = props.circle; + var rounded = props.rounded; + var transitionEnabled = props.transitionEnabled; + var zDepth = props.zDepth; + var _state$muiTheme = state.muiTheme; + var baseTheme = _state$muiTheme.baseTheme; + var paper = _state$muiTheme.paper; + + + return { + root: { + color: paper.color, + backgroundColor: paper.backgroundColor, + transition: transitionEnabled && _transitions2.default.easeOut(), + boxSizing: 'border-box', + fontFamily: baseTheme.fontFamily, + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers + borderRadius: circle ? '50%' : rounded ? '2px' : '0px' + } + }; + } + + var Paper = _react2.default.createClass({ + displayName: 'Paper', + + + propTypes: { + /** + * Children passed into the paper element. + */ + children: _react2.default.PropTypes.node, + + /** + * Set to true to generate a circlular paper container. + */ + circle: _react2.default.PropTypes.bool, + + /** + * By default, the paper container will have a border radius. + * Set this to false to generate a container with sharp corners. + */ + rounded: _react2.default.PropTypes.bool, + + /** + * Override the inline-styles of the root element. + */ + style: _react2.default.PropTypes.object, + + /** + * Set to false to disable CSS transitions for the paper element. + */ + transitionEnabled: _react2.default.PropTypes.bool, + + /** + * This number represents the zDepth of the paper shadow. + */ + zDepth: _propTypes2.default.zDepth + }, + + contextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + childContextTypes: { + muiTheme: _react2.default.PropTypes.object + }, + + mixins: [_reactAddonsPureRenderMixin2.default], + + getDefaultProps: function getDefaultProps() { + return { + circle: false, + rounded: true, + transitionEnabled: true, + zDepth: 1 + }; + }, + getInitialState: function getInitialState() { + return { + muiTheme: this.context.muiTheme || (0, _getMuiTheme2.default)() + }; + }, + getChildContext: function getChildContext() { + return { + muiTheme: this.state.muiTheme + }; + }, + componentWillReceiveProps: function componentWillReceiveProps(nextProps, nextContext) { + this.setState({ + muiTheme: nextContext.muiTheme || this.state.muiTheme + }); + }, + render: function render() { + var _props = this.props; + var children = _props.children; + var style = _props.style; + + var other = _objectWithoutProperties(_props, ['children', 'style']); + + var prepareStyles = this.state.muiTheme.prepareStyles; + + + var styles = getStyles(this.props, this.state); + + return _react2.default.createElement( + 'div', + _extends({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); + } + }); + + exports.default = Paper; + module.exports = exports['default']; + +/***/ }, +/* 331 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var horizontal = _react2.default.PropTypes.oneOf(['left', 'middle', 'right']); + var vertical = _react2.default.PropTypes.oneOf(['top', 'center', 'bottom']); + + exports.default = { + + corners: _react2.default.PropTypes.oneOf(['bottom-left', 'bottom-right', 'top-left', 'top-right']), + + horizontal: horizontal, + + vertical: vertical, + + origin: _react2.default.PropTypes.shape({ + horizontal: horizontal, + vertical: vertical + }), + + cornersAndCenter: _react2.default.PropTypes.oneOf(['bottom-center', 'bottom-left', 'bottom-right', 'top-center', 'top-left', 'top-right']), + + stringOrNumber: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.string, _react2.default.PropTypes.number]), + + zDepth: _react2.default.PropTypes.oneOf([0, 1, 2, 3, 4, 5]) + + }; + module.exports = exports['default']; + /***/ } /******/ ]); \ No newline at end of file diff --git a/public/index.html b/public/index.html index a2b4beb..26bffa4 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,6 @@ Run? - diff --git a/public/src/app.jsx b/public/src/app.jsx index f7b602b..3bbc98e 100644 --- a/public/src/app.jsx +++ b/public/src/app.jsx @@ -1,9 +1,12 @@ -var React = require('react'); -var ReactDOM = require('react-dom'); -var AppContainer = require('./components/app-container.jsx'); +'use strict'; + +import React from 'react'; +import ReactDOM from 'react-dom'; +import AppContainer from './components/app-container.jsx'; require('./scss/main.scss'); + ReactDOM.render( , diff --git a/public/src/components/app-container.jsx b/public/src/components/app-container.jsx index 8f64ed9..3b0e361 100644 --- a/public/src/components/app-container.jsx +++ b/public/src/components/app-container.jsx @@ -1,12 +1,15 @@ "use strict"; -var React = require('react'); -var BusArrivals = require('./bus-arrivals.jsx'); -var DLRArrivals = require('./dlr-arrivals.jsx'); -var TrainArrivals = require('./train-arrivals.jsx'); -var AppContainer = React.createClass({ +import React from 'react'; +import BusArrivals from './bus-arrivals.jsx'; +import DLRArrivals from './dlr-arrivals.jsx'; +import TrainArrivals from './train-arrivals.jsx'; +import DirectionButtons from './direction-buttons.jsx'; - getInitialState: function () { + +const AppContainer = React.createClass({ + + getInitialState () { return { busArrivals: [], @@ -16,33 +19,31 @@ var AppContainer = React.createClass({ }; }, - updateState: function (transport, data) { + updateState (transport, data) { this.setState({ [transport]: data }); }, - changeDirection: function () { + changeDirection () { this.setState({ toHome: !this.state.toHome }); }, - render: function () { + render () { return (
- +
); } }); -module.exports = AppContainer; +export default AppContainer; diff --git a/public/src/components/bus-arrivals.jsx b/public/src/components/bus-arrivals.jsx index 17b4029..08608a0 100644 --- a/public/src/components/bus-arrivals.jsx +++ b/public/src/components/bus-arrivals.jsx @@ -1,16 +1,18 @@ -"use strict"; -var React = require('react'); -var moment = require('moment'); -var $ = require('jquery'); +'use strict'; -var BusArrivals = React.createClass({ +import React from 'react'; +import moment from 'moment'; +import $ from 'jquery'; - componentWillMount: function () { + +const BusArrivals = React.createClass({ + + componentWillMount () { this.getBusArrivals(); }, - getBusArrivals: function () { + getBusArrivals () { var self = this; $.ajax({ @@ -26,7 +28,7 @@ var BusArrivals = React.createClass({ }); }, - render: function () { + render () { var busArrivals = this.props.arrivals; @@ -61,4 +63,4 @@ var BusArrivals = React.createClass({ } }); -module.exports = BusArrivals; +export default BusArrivals; diff --git a/public/src/components/direction-buttons.jsx b/public/src/components/direction-buttons.jsx new file mode 100644 index 0000000..d2a4556 --- /dev/null +++ b/public/src/components/direction-buttons.jsx @@ -0,0 +1,17 @@ +'use strict'; + +import React from 'react'; +import RaisedButton from 'material-ui/lib/raised-button'; + + +const DirectionButtons = () => { + + return ( +
+ + +
+ ); +}; + +export default DirectionButtons; diff --git a/public/src/components/dlr-arrivals.jsx b/public/src/components/dlr-arrivals.jsx index 9c37bdc..8c54fd9 100644 --- a/public/src/components/dlr-arrivals.jsx +++ b/public/src/components/dlr-arrivals.jsx @@ -1,16 +1,18 @@ -"use strict"; -var React = require('react'); -var moment = require('moment'); -var $ = require('jquery'); +'use strict'; -var DLRArrivals = React.createClass({ +import React from 'react'; +import moment from 'moment'; +import $ from 'jquery'; - componentWillMount: function () { + +const DLRArrivals = React.createClass({ + + componentWillMount () { this.getDLRArrivals(); }, - getDLRArrivals: function () { + getDLRArrivals () { var self = this; $.ajax({ @@ -26,7 +28,7 @@ var DLRArrivals = React.createClass({ }); }, - render: function () { + render () { var DLRArrivals = this.props.arrivals; @@ -51,4 +53,4 @@ var DLRArrivals = React.createClass({ } }) -module.exports = DLRArrivals; +export default DLRArrivals; diff --git a/public/src/components/landing.jsx b/public/src/components/landing.jsx deleted file mode 100644 index 5432a1e..0000000 --- a/public/src/components/landing.jsx +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -import React from 'react'; -import RaisedButton from 'material-ui/lib/raised-button'; - -const Landing = React.createClass({ - - render () { - - return ( -
- - -
- ); - } -}); - -export default Landing diff --git a/public/src/components/train-arrivals.jsx b/public/src/components/train-arrivals.jsx index b04f18b..d771ed3 100644 --- a/public/src/components/train-arrivals.jsx +++ b/public/src/components/train-arrivals.jsx @@ -1,16 +1,18 @@ -"use strict"; -var React = require('react'); -var moment = require('moment'); -var $ = require('jquery'); +'use strict'; -var TrainArrivals = React.createClass({ +import React from 'react'; +import moment from 'moment'; +import $ from 'jquery'; - componentWillMount: function () { + +const TrainArrivals = React.createClass({ + + componentWillMount () { this.getTrainArrivals(); }, - shouldComponentUpdate: function (nextProps) { + shouldComponentUpdate (nextProps) { var currentTrains = this.props.arrivals; var nextTrains = nextProps.arrivals; @@ -30,7 +32,7 @@ var TrainArrivals = React.createClass({ } }, - getTrainArrivals: function () { + getTrainArrivals () { var self = this; var direction = this.props.toHome ? 'toHome' : 'fromHome'; @@ -46,7 +48,7 @@ var TrainArrivals = React.createClass({ }); }, - render: function () { + render () { return (
@@ -77,4 +79,4 @@ var TrainArrivals = React.createClass({ } }); -module.exports = TrainArrivals; +export default TrainArrivals; diff --git a/test/unit/app-container.js b/test/unit/app-container.js index ad4b073..903a165 100644 --- a/test/unit/app-container.js +++ b/test/unit/app-container.js @@ -1,16 +1,14 @@ -"use strict"; +'use strict'; -import React from 'react'; -import chai from 'chai'; -import TestUtils from 'react-addons-test-utils'; -import { createRenderer } from 'react-addons-test-utils'; +import React from 'react'; +import { expect } from 'chai'; +import { createRenderer } from 'react-addons-test-utils'; -const expect = chai.expect; describe('test', function () { it('returns 1', function () { expect(1).to.equal(1); - }) -}) + }); +}); From 06db68081f3867908e1539999cfe3d27a97ad8b6 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 14:19:07 +0000 Subject: [PATCH 48/58] test tidy up --- .gitignore | 1 - package.json | 2 +- test/testing-dom.js | 18 ------------------ test/utils/test_helpers.js | 18 ++++++++++++++++++ 4 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 test/testing-dom.js create mode 100644 test/utils/test_helpers.js diff --git a/.gitignore b/.gitignore index 821af6a..7012420 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ node_modules/ npm-debug.log -test/ .gitattributes public/.bundle.js *.env diff --git a/package.json b/package.json index 22e69a6..0765ee7 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "node start.js", "dev": "webpack --progress --colors --inline --watch & node start.js", "build": "webpack", - "test": "node_modules/mocha/bin/mocha --compilers js:babel-core/register --require ./test/test_helpers.js 'test/unit/**/*.@(js|jsx)'" + "test": "node_modules/mocha/bin/mocha --compilers js:babel-core/register --require ./test/utils/test_helpers.js 'test/unit/**/*.@(js|jsx)'" }, "repository": { "type": "git", diff --git a/test/testing-dom.js b/test/testing-dom.js deleted file mode 100644 index 8042c68..0000000 --- a/test/testing-dom.js +++ /dev/null @@ -1,18 +0,0 @@ -var jsdom = require('jsdom'); - -var doc = jsdom.jsdom(""); - -jsdom.env({ - html: 'www.minaorangina.com', - scripts: ['https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'], - done: function (err, window) { - - if (err) { - console.log(err); - } - // console.log(Object.keys(window)); - // console.log(Object.keys(window.document)); - console.log(Object.keys(window.document._defaultView)); - - } -}); diff --git a/test/utils/test_helpers.js b/test/utils/test_helpers.js new file mode 100644 index 0000000..b439e39 --- /dev/null +++ b/test/utils/test_helpers.js @@ -0,0 +1,18 @@ +'use strict'; + +import jsdom from 'jsdom'; +import chai from 'chai'; + +const doc = jsdom.jsdom(''); +const win = doc.defaultView; + +global.document = doc; +global.window = win; + +Object.keys(window).forEach( (key) => { + + if (!(key in global)) { + + global[key] = window[key]; + } +}); From db805e9d69a6dfdc17380df10601e1d6c983fb18 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 14:59:07 +0000 Subject: [PATCH 49/58] abstracts shallow rendering into a standalone, generic function --- public/bundle.js | 1020 ++++++++++++++++----------------- src/reducer.js | 10 + test/unit/app-container.js | 29 +- test/utils/shallowRenderer.js | 10 + 4 files changed, 553 insertions(+), 516 deletions(-) create mode 100644 src/reducer.js create mode 100644 test/utils/shallowRenderer.js diff --git a/public/bundle.js b/public/bundle.js index da6788b..eebc33e 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -67,7 +67,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - __webpack_require__(264); + __webpack_require__(328); _reactDom2.default.render(_react2.default.createElement(_appContainer2.default, null), document.getElementsByClassName("container")[0]); @@ -19698,7 +19698,7 @@ var _trainArrivals2 = _interopRequireDefault(_trainArrivals); - var _directionButtons = __webpack_require__(268); + var _directionButtons = __webpack_require__(264); var _directionButtons2 = _interopRequireDefault(_directionButtons); @@ -42695,356 +42695,6 @@ /***/ }, /* 264 */ -/***/ function(module, exports, __webpack_require__) { - - // style-loader: Adds some css to the DOM by adding a