From 2de6ba11a501d652a974d586457a13c4aed8e982 Mon Sep 17 00:00:00 2001 From: deranjer Date: Wed, 6 Dec 2017 20:16:38 -0500 Subject: [PATCH] Adding progress bar, fixing progress code, preparing for splitting files. --- engine/engine.go | 0 main.go | 178 +- public/static/js/bundle.js | 2534 ++++++++++++------------ settings.go | 13 +- storage.go | 59 +- torrent-project/src/progressBarCell.js | 40 + torrent-project/src/torrentlist.js | 24 +- 7 files changed, 1536 insertions(+), 1312 deletions(-) create mode 100644 engine/engine.go create mode 100644 torrent-project/src/progressBarCell.js diff --git a/engine/engine.go b/engine/engine.go new file mode 100644 index 00000000..e69de29b diff --git a/main.go b/main.go index 3b3f417c..d602383a 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "log" "net/http" "os" + "path/filepath" "strings" "time" @@ -47,10 +48,10 @@ type clientDB struct { UploadSpeed float32 `json:"UploadSpeed"` DataBytesWritten int64 DataBytesRead int64 - ActivePeers int `json:"ActivePeers"` - TotalPeers int `json:"TotalPeers"` - TorrentHashString string `json:"TorrentHashString"` - PercentDone int64 `json:"Done"` + ActivePeers int `json:"ActivePeers"` + TotalPeers int `json:"TotalPeers"` + TorrentHashString string `json:"TorrentHashString"` + PercentDone float32 `json:"PercentDone"` TorrentHash metainfo.Hash StoragePath string `json:"StorageLocation"` DateAdded string @@ -63,15 +64,24 @@ type clientDB struct { func calculateTorrentSpeed(t *torrent.Torrent, c *clientDB) { now := time.Now() bytes := t.BytesCompleted() - if !c.UpdatedAt.IsZero() { + fmt.Println("UpdatedAt: ", c.UpdatedAt) + if c.UpdatedAt.IsZero() { + c.UpdatedAt = now + fmt.Println("Setting Time", c.UpdatedAt) + + } else { dt := float32(now.Sub(c.UpdatedAt)) + fmt.Println("Delta Time: ", dt) db := float32(bytes - c.BytesCompleted) + fmt.Println("Delta Bytes:", db) rate := db * (float32(time.Second) / dt) + + fmt.Println("form: ", float32(time.Second)) if rate >= 0 { c.DownloadSpeed = rate } } - c.UpdatedAt = now + } func calculateTorrentStatus(t *torrent.Torrent, c *clientDB) { @@ -79,7 +89,9 @@ func calculateTorrentStatus(t *torrent.Torrent, c *clientDB) { c.Status = "Seeding" } else if t.Stats().ActivePeers > 0 && t.BytesMissing() > 0 { c.Status = "Downloading" - } else if t.Stats().ActivePeers == 0 { + } else if t.Stats().ActivePeers == 0 && t.BytesMissing() == 0 { + c.Status = "Completed" + } else if t.Stats().ActivePeers == 0 && t.BytesMissing() > 0 { c.Status = "Awaiting Peers" } else { c.Status = "Unknown" @@ -91,56 +103,104 @@ func serveHome(w http.ResponseWriter, r *http.Request) { s1.ExecuteTemplate(w, "base", map[string]string{"APP_ID": APP_ID}) } -func startTorrent(clientTorrent *torrent.Torrent, torrentLocalStorage *TorrentLocal, Config torrent.Config, torrentDbStorage *bolt.DB, torrentLocal []*TorrentLocal, tclient *torrent.Client) { - <-clientTorrent.GotInfo() //waiting for all of the torrent info to be downloaded +func startTorrent(clientTorrent *torrent.Torrent, torrentLocalStorage *TorrentLocal, torrentDbStorage *bolt.DB, dataDir string, torrentFile string, torrentFileName string) { + + timeout := make(chan bool, 1) //creating a timeout channel for our gotinfo + go func() { + time.Sleep(45 * time.Second) + timeout <- true + }() + select { + case <-clientTorrent.GotInfo(): //attempting to retrieve info for torrent + fmt.Println("Recieved torrent info..") + clientTorrent.DownloadAll() + case <-timeout: // getting info for torrent has timed out so purging the torrent + fmt.Println("Dropping Torrent") + clientTorrent.Drop() + return + } + var TempHash metainfo.Hash TempHash = clientTorrent.InfoHash() fmt.Println(clientTorrent.Info().Source) torrentLocalStorage.Hash = TempHash.String() // we will store the infohash to add it back later on client restart (if needed) torrentLocalStorage.DateAdded = time.Now().Format("Jan _2 2006") - torrentLocalStorage.StoragePath = Config.DataDir //TODO check full path information for torrent storage + torrentLocalStorage.StoragePath = dataDir //TODO check full path information for torrent storage torrentLocalStorage.TorrentName = clientTorrent.Name() torrentLocalStorage.TorrentStatus = "downloading" //by default start all the torrents as downloading. - + torrentLocalStorage.TorrentType = torrentFile //either "file" or "magnet" maybe more in the future + if torrentFile == "file" { + torrentLocalStorage.TorrentFileName = torrentFileName + } else { + torrentLocalStorage.TorrentFileName = "" + } fmt.Printf("%+v\n", torrentLocalStorage) addTorrentLocalStorage(torrentDbStorage, torrentLocalStorage) //writing all of the data to the database - - clientTorrent.DownloadAll() //starting the download - createRunningTorrentArray(tclient, torrentLocal) + clientTorrent.DownloadAll() //starting the download } -func createRunningTorrentArray(tclient *torrent.Client, TorrentLocalArray []*TorrentLocal) (RunningTorrentArray []clientDB) { +func createRunningTorrentArray(tclient *torrent.Client, TorrentLocalArray []*TorrentLocal, config fullClientSettings, db *bolt.DB) (RunningTorrentArray []clientDB) { for _, element := range TorrentLocalArray { //re-adding all the torrents we had stored from last shutdown - elementMagnet := "magnet:?xt=urn:btih:" + element.Hash - singleTorrent, _ := tclient.AddMagnet(elementMagnet) //adding back in the torrents by hash + var singleTorrent *torrent.Torrent - fmt.Println("Here...", elementMagnet) - //<-singleTorrent.GotInfo() - //singleTorrent.DownloadAll() - fmt.Println("Past...") + if element.TorrentType == "file" { //if it is a file pull it from the uploaded torrent folder + fmt.Println("Filename", element.TorrentFileName) + if _, err := os.Stat(element.TorrentFileName); err == nil { //if we CAN find the torrent, add it + fmt.Println("Adding file name...", element.TorrentFileName) + singleTorrent, _ = tclient.AddTorrentFromFile(element.TorrentFileName) + } else { //if we cant find the torrent delete it + fmt.Println("File Error", err) + delTorrentLocalStorage(db, element) + continue + } + + } else { + elementMagnet := "magnet:?xt=urn:btih:" + element.Hash //For magnet links just need to prepend the magnet part to the hash to readd + singleTorrent, _ = tclient.AddMagnet(elementMagnet) + } + + timeout := make(chan bool, 1) //creating a timeout channel for our gotinfo + go func() { + time.Sleep(45 * time.Second) + timeout <- true + }() + select { + case <-singleTorrent.GotInfo(): //attempting to retrieve info for torrent + singleTorrent.DownloadAll() + case <-timeout: // getting info for torrent has timed out so purging the torrent + fmt.Println("Dropping Torrent") + singleTorrent.Drop() + delTorrentLocalStorage(db, element) //purging torrent from the local database + continue + } + + fmt.Println("Recieved info for: ", element.TorrentName) fullClientDB := new(clientDB) fullStruct := singleTorrent.Stats() - //bytesMissing := singleTorrent.BytesMissing() - //bytesTotal := singleTorrent.Length() + bytesTotal := singleTorrent.Length() //bytesCompleted := singleTorrent.BytesCompleted() - // + calculateTorrentSpeed(singleTorrent, fullClientDB) //Setting the downloadSpeed for the torrent + //fullClientDB.UpdatedAt = time.Now() // setting the current time to measure download speed. var TempHash metainfo.Hash TempHash = singleTorrent.InfoHash() - //fullClientDB.DownloadedSize = singleTorrent.BytesCompleted() - //fullClientDB.Size = bytesTotal + fullClientDB.DownloadedSize = singleTorrent.BytesCompleted() / 1024 / 1024 + fullClientDB.Size = bytesTotal / 1024 / 1024 fullClientDB.TorrentHash = TempHash - //fullClientDB.PercentDone = 1 - (bytesMissing / bytesTotal) - //fullClientDB.DataBytesRead = fullStruct.ConnStats.DataBytesRead - //fullClientDB.DataBytesWritten = fullStruct.ConnStats.DataBytesWritten + fullClientDB.PercentDone = (float32(fullClientDB.DownloadedSize) / float32(fullClientDB.Size)) + fullClientDB.DataBytesRead = fullStruct.ConnStats.DataBytesRead + fullClientDB.DataBytesWritten = fullStruct.ConnStats.DataBytesWritten fullClientDB.ActivePeers = fullStruct.ActivePeers fullClientDB.TotalPeers = fullStruct.TotalPeers fullClientDB.TorrentHashString = TempHash.AsString() fullClientDB.StoragePath = element.StoragePath fullClientDB.TorrentName = element.TorrentName fullClientDB.DateAdded = element.DateAdded + fmt.Println("Download Speed: ", fullClientDB.DownloadSpeed) + fmt.Println("Percent Done: ", fullClientDB.PercentDone) + fmt.Println("UpdatedAt: ", fullClientDB.UpdatedAt) calculateTorrentStatus(singleTorrent, fullClientDB) //calculate the status of the torrent @@ -158,9 +218,9 @@ func updateClient(torrentstats []clientDB, conn *websocket.Conn) { //get the tor func main() { //setting up the torrent client - Config := fullClientSettingsNew() //grabbing from settings.go - - torrentLocalStorage := new(TorrentLocal) //creating a new struct that stores all of our local storage info + Config := fullClientSettingsNew() //grabbing from settings.go + os.Mkdir(Config.tFileUploadFolder, os.ModeDir) //creating a directory to store uploaded torrent files + torrentLocalStorage := new(TorrentLocal) //creating a new struct that stores all of our local storage info fmt.Printf("%+v\n", Config) @@ -180,8 +240,9 @@ func main() { TorrentLocalArray = readInTorrents(db) //pulling in all the already added torrents - if TorrentLocalArray != nil { - RunningTorrentArray = createRunningTorrentArray(tclient, TorrentLocalArray) //Updates the RunningTorrentArray with the current client data as well + if TorrentLocalArray != nil { //the first creation of the running torrent array + RunningTorrentArray = createRunningTorrentArray(tclient, TorrentLocalArray, Config, db) //Updates the RunningTorrentArray with the current client data as well + } else { fmt.Println("Database is empty!") } @@ -196,8 +257,9 @@ func main() { if err != nil { fmt.Println("Error with fetching file or request issue", file) } - defer file.Close() //defer closing the file until we are done manipulating it - fileName, err := os.OpenFile(header.Filename, os.O_WRONLY|os.O_CREATE, 0666) //generating the fileName + defer file.Close() //defer closing the file until we are done manipulating it + var filePath = filepath.Join(Config.tFileUploadFolder, header.Filename) //creating a full filepath to store the .torrent files + fileName, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE, 0666) //generating the fileName if err != nil { panic(err) } @@ -207,21 +269,20 @@ func main() { fmt.Println("Error adding Torrent from file: ", fileName.Name()) } else { fmt.Println("Adding Torrent via file", fileName) - startTorrent(clientTorrent, torrentLocalStorage, Config.Config, db, TorrentLocalArray, tclient) + startTorrent(clientTorrent, torrentLocalStorage, db, Config.DataDir, "file", fileName.Name()) } }) http.HandleFunc("/api", func(w http.ResponseWriter, r *http.Request) { //exposing the data to the - if len(RunningTorrentArray) > 0 { - RunningTorrentArray = createRunningTorrentArray(tclient, TorrentLocalArray) //Updates the RunningTorrentArray with the current client data as well - var torrentlistArray = new(torrentList) - torrentlistArray.ClientDBstruct = RunningTorrentArray - torrentlistArray.Totaltorrents = len(RunningTorrentArray) - torrentlistArrayJSON, _ := json.Marshal(torrentlistArray) - w.Header().Set("Content-Type", "application/json") - w.Write(torrentlistArrayJSON) - //updateClient(RunningTorrentArray, conn) // sending the client update information over the websocket - } + TorrentLocalArray = readInTorrents(db) + RunningTorrentArray = createRunningTorrentArray(tclient, TorrentLocalArray, Config, db) //Updates the RunningTorrentArray with the current client data as well + var torrentlistArray = new(torrentList) + torrentlistArray.ClientDBstruct = RunningTorrentArray + torrentlistArray.Totaltorrents = len(RunningTorrentArray) + torrentlistArrayJSON, _ := json.Marshal(torrentlistArray) + w.Header().Set("Content-Type", "application/json") + w.Write(torrentlistArrayJSON) + //updateClient(RunningTorrentArray, conn) // sending the client update information over the websocket }) http.HandleFunc("/websocket", func(w http.ResponseWriter, r *http.Request) { //websocket is the main data pipe to the frontend conn, err := upgrader.Upgrade(w, r, nil) @@ -239,22 +300,21 @@ func main() { } if string(msg) == "clientUpdateRequest" { //6 second update ping fmt.Println("client Requested Update") - time.Sleep(6 * time.Second) + //time.Sleep(6 * time.Second) err = conn.WriteMessage(msgType, []byte("clientUpdate")) if err != nil { fmt.Println("Websocket Write err", err) return } - if len(RunningTorrentArray) > 0 { - RunningTorrentArray = createRunningTorrentArray(tclient, TorrentLocalArray) //Updates the RunningTorrentArray with the current client data as well - var torrentlistArray = new(torrentList) - torrentlistArray.ClientDBstruct = RunningTorrentArray - torrentlistArray.Totaltorrents = len(RunningTorrentArray) - fmt.Printf("%+v\n", torrentlistArray) - conn.WriteJSON(torrentlistArray) - //updateClient(RunningTorrentArray, conn) // sending the client update information over the websocket - } + TorrentLocalArray = readInTorrents(db) + RunningTorrentArray = createRunningTorrentArray(tclient, TorrentLocalArray, Config, db) //Updates the RunningTorrentArray with the current client data as well + var torrentlistArray = new(torrentList) + torrentlistArray.ClientDBstruct = RunningTorrentArray + torrentlistArray.Totaltorrents = len(RunningTorrentArray) + //fmt.Printf("%+v\n", torrentlistArray) + conn.WriteJSON(torrentlistArray) + //updateClient(RunningTorrentArray, conn) // sending the client update information over the websocket } else if strings.HasPrefix(string(msg), "magnet:") { fmt.Println(string(msg)) @@ -263,9 +323,9 @@ func main() { fmt.Println("Magnet Error", err) } fmt.Println(clientTorrent) - fmt.Printf("Adding") + fmt.Printf("Adding Magnet Link") - startTorrent(clientTorrent, torrentLocalStorage, Config.Config, db, TorrentLocalArray, tclient) //starting the torrent and creating local DB entry + startTorrent(clientTorrent, torrentLocalStorage, db, Config.DataDir, "magnet", "") //starting the torrent and creating local DB entry } else { conn.Close() diff --git a/public/static/js/bundle.js b/public/static/js/bundle.js index a308dd25..734c336b 100644 --- a/public/static/js/bundle.js +++ b/public/static/js/bundle.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 297); +/******/ return __webpack_require__(__webpack_require__.s = 298); /******/ }) /************************************************************************/ /******/ ([ @@ -89,11 +89,11 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(430)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(431)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(433)(); + module.exports = __webpack_require__(434)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) @@ -106,9 +106,9 @@ if (process.env.NODE_ENV !== 'production') { /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(298); -} else { module.exports = __webpack_require__(299); +} else { + module.exports = __webpack_require__(300); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) @@ -397,11 +397,11 @@ var _objectWithoutProperties2 = __webpack_require__(4); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _map = __webpack_require__(438); +var _map = __webpack_require__(439); var _map2 = _interopRequireDefault(_map); -var _minSafeInteger = __webpack_require__(454); +var _minSafeInteger = __webpack_require__(455); var _minSafeInteger2 = _interopRequireDefault(_minSafeInteger); @@ -417,7 +417,7 @@ var _warning = __webpack_require__(14); var _warning2 = _interopRequireDefault(_warning); -var _hoistNonReactStatics = __webpack_require__(457); +var _hoistNonReactStatics = __webpack_require__(458); var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); @@ -429,7 +429,7 @@ var _getDisplayName = __webpack_require__(213); var _getDisplayName2 = _interopRequireDefault(_getDisplayName); -var _contextTypes = __webpack_require__(458); +var _contextTypes = __webpack_require__(459); var _contextTypes2 = _interopRequireDefault(_contextTypes); @@ -451,11 +451,11 @@ var _themeListener = __webpack_require__(116); var _themeListener2 = _interopRequireDefault(_themeListener); -var _createGenerateClassName = __webpack_require__(491); +var _createGenerateClassName = __webpack_require__(492); var _createGenerateClassName2 = _interopRequireDefault(_createGenerateClassName); -var _getStylesCreator = __webpack_require__(492); +var _getStylesCreator = __webpack_require__(493); var _getStylesCreator2 = _interopRequireDefault(_getStylesCreator); @@ -872,7 +872,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! /* 8 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(406), __esModule: true }; +module.exports = { "default": __webpack_require__(407), __esModule: true }; /***/ }), /* 9 */ @@ -954,11 +954,11 @@ exports.default = function (self, call) { exports.__esModule = true; -var _setPrototypeOf = __webpack_require__(423); +var _setPrototypeOf = __webpack_require__(424); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); -var _create = __webpack_require__(427); +var _create = __webpack_require__(428); var _create2 = _interopRequireDefault(_create); @@ -1010,11 +1010,11 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(612)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(613)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(615)(); + module.exports = __webpack_require__(616)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) @@ -1098,7 +1098,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _SvgIcon = __webpack_require__(509); +var _SvgIcon = __webpack_require__(510); Object.defineProperty(exports, 'default', { enumerable: true, @@ -1148,9 +1148,9 @@ if (process.env.NODE_ENV === 'production') { // DCE check should happen before ReactDOM bundle executes so that // DevTools can report bad minification during injection. checkDCE(); - module.exports = __webpack_require__(302); + module.exports = __webpack_require__(303); } else { - module.exports = __webpack_require__(305); + module.exports = __webpack_require__(306); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) @@ -1423,11 +1423,11 @@ var babelPluginFlowReactPropTypes_proptype_TransitionClasses = { exports.__esModule = true; -var _shouldUpdate = __webpack_require__(559); +var _shouldUpdate = __webpack_require__(560); var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); -var _shallowEqual = __webpack_require__(562); +var _shallowEqual = __webpack_require__(563); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); @@ -1462,8 +1462,8 @@ exports.default = pure; var global = __webpack_require__(29); var core = __webpack_require__(19); -var ctx = __webpack_require__(39); -var hide = __webpack_require__(35); +var ctx = __webpack_require__(40); +var hide = __webpack_require__(36); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { @@ -1599,7 +1599,7 @@ $exports.store = store; /* 26 */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(40); +var anObject = __webpack_require__(41); var IE8_DOM_DEFINE = __webpack_require__(193); var toPrimitive = __webpack_require__(97); var dP = Object.defineProperty; @@ -1621,7 +1621,7 @@ exports.f = __webpack_require__(30) ? Object.defineProperty : function definePro /* 27 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(436), __esModule: true }; +module.exports = { "default": __webpack_require__(437), __esModule: true }; /***/ }), /* 28 */ @@ -1799,7 +1799,7 @@ if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(41)(function () { +module.exports = !__webpack_require__(42)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); @@ -1813,11 +1813,11 @@ module.exports = !__webpack_require__(41)(function () { exports.__esModule = true; -var _shouldUpdate = __webpack_require__(549); +var _shouldUpdate = __webpack_require__(550); var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); -var _shallowEqual = __webpack_require__(551); +var _shallowEqual = __webpack_require__(552); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); @@ -2001,7 +2001,7 @@ var _warning = __webpack_require__(14); var _warning2 = _interopRequireDefault(_warning); -var _supports = __webpack_require__(522); +var _supports = __webpack_require__(523); var supports = _interopRequireWildcard(_supports); @@ -2178,7 +2178,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _Typography = __webpack_require__(525); +var _Typography = __webpack_require__(526); Object.defineProperty(exports, 'default', { enumerable: true, @@ -2193,29 +2193,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /* 35 */ /***/ (function(module, exports, __webpack_require__) { -var dP = __webpack_require__(26); -var createDesc = __webpack_require__(57); -module.exports = __webpack_require__(30) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), -/* 36 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - "use strict"; @@ -2223,29 +2200,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _ButtonBase = __webpack_require__(495); - -Object.defineProperty(exports, 'default', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_ButtonBase).default; - } -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _MuiThemeProvider = __webpack_require__(398); +var _MuiThemeProvider = __webpack_require__(399); Object.defineProperty(exports, 'MuiThemeProvider', { enumerable: true, @@ -2283,10 +2238,90 @@ Object.defineProperty(exports, 'createMuiTheme', { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(26); +var createDesc = __webpack_require__(57); +module.exports = __webpack_require__(30) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _ButtonBase = __webpack_require__(496); + +Object.defineProperty(exports, 'default', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_ButtonBase).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (process.env.NODE_ENV !== 'production') { + var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; + + var isValidElement = function(object) { + return typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE; + }; + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(329)(isValidElement, throwOnDirectAccess); +} else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(332)(); +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + // optional / simple context binding var aFunction = __webpack_require__(192); module.exports = function (fn, that, length) { @@ -2310,10 +2345,10 @@ module.exports = function (fn, that, length) { /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(36); +var isObject = __webpack_require__(37); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; @@ -2321,7 +2356,7 @@ module.exports = function (it) { /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports) { module.exports = function (exec) { @@ -2334,7 +2369,7 @@ module.exports = function (exec) { /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; @@ -2343,28 +2378,6 @@ module.exports = function (it, key) { }; -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _Icon = __webpack_require__(493); - -Object.defineProperty(exports, 'default', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_Icon).default; - } -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { @@ -2376,12 +2389,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _IconButton = __webpack_require__(494); +var _Icon = __webpack_require__(494); Object.defineProperty(exports, 'default', { enumerable: true, get: function get() { - return _interopRequireDefault(_IconButton).default; + return _interopRequireDefault(_Icon).default; } }); @@ -2397,16 +2410,38 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -module.exports = exports['default']; + +var _IconButton = __webpack_require__(495); + +Object.defineProperty(exports, 'default', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_IconButton).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement); +module.exports = exports['default']; + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + var isObject = __webpack_require__(129), - now = __webpack_require__(514), - toNumber = __webpack_require__(516); + now = __webpack_require__(515), + toNumber = __webpack_require__(517); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -2595,7 +2630,7 @@ module.exports = debounce; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2605,7 +2640,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _Paper = __webpack_require__(541); +var _Paper = __webpack_require__(542); Object.defineProperty(exports, 'default', { enumerable: true, @@ -2616,41 +2651,6 @@ Object.defineProperty(exports, 'default', { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -if (process.env.NODE_ENV !== 'production') { - var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && - Symbol.for && - Symbol.for('react.element')) || - 0xeac7; - - var isValidElement = function(object) { - return typeof object === 'object' && - object !== null && - object.$$typeof === REACT_ELEMENT_TYPE; - }; - - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = __webpack_require__(318)(isValidElement, throwOnDirectAccess); -} else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(321)(); -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) - /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { @@ -2677,11 +2677,11 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(328)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(319)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(331)(); + module.exports = __webpack_require__(322)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) @@ -3742,7 +3742,7 @@ Object.defineProperty(exports, 'default', { } }); -var _InputAdornment = __webpack_require__(524); +var _InputAdornment = __webpack_require__(525); Object.defineProperty(exports, 'InputAdornment', { enumerable: true, @@ -3751,7 +3751,7 @@ Object.defineProperty(exports, 'InputAdornment', { } }); -var _InputLabel = __webpack_require__(526); +var _InputLabel = __webpack_require__(527); Object.defineProperty(exports, 'InputLabel', { enumerable: true, @@ -3943,7 +3943,7 @@ var singleton = null; var singletonCounter = 0; var stylesInsertedAtTop = []; -var fixUrls = __webpack_require__(314); +var fixUrls = __webpack_require__(315); module.exports = function(list, options) { if (typeof DEBUG !== "undefined" && DEBUG) { @@ -4297,11 +4297,11 @@ exports.f = {}.propertyIsEnumerable; exports.__esModule = true; -var _iterator = __webpack_require__(408); +var _iterator = __webpack_require__(409); var _iterator2 = _interopRequireDefault(_iterator); -var _symbol = __webpack_require__(416); +var _symbol = __webpack_require__(417); var _symbol2 = _interopRequireDefault(_symbol); @@ -4320,8 +4320,8 @@ exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.d /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(40); -var dPs = __webpack_require__(412); +var anObject = __webpack_require__(41); +var dPs = __webpack_require__(413); var enumBugKeys = __webpack_require__(104); var IE_PROTO = __webpack_require__(102)('IE_PROTO'); var Empty = function () { /* empty */ }; @@ -4336,7 +4336,7 @@ var createDict = function () { var gt = '>'; var iframeDocument; iframe.style.display = 'none'; - __webpack_require__(413).appendChild(iframe); + __webpack_require__(414).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); @@ -4367,7 +4367,7 @@ module.exports = Object.create || function create(O, Properties) { /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(26).f; -var has = __webpack_require__(42); +var has = __webpack_require__(43); var TAG = __webpack_require__(25)('toStringTag'); module.exports = function (it, tag, stat) { @@ -4379,10 +4379,10 @@ module.exports = function (it, tag, stat) { /* 71 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(39); +var ctx = __webpack_require__(40); var call = __webpack_require__(208); var isArrayIter = __webpack_require__(209); -var anObject = __webpack_require__(40); +var anObject = __webpack_require__(41); var toLength = __webpack_require__(65); var getIterFn = __webpack_require__(210); var BREAK = {}; @@ -4425,7 +4425,7 @@ var _createRule = __webpack_require__(217); var _createRule2 = _interopRequireDefault(_createRule); -var _updateRule = __webpack_require__(462); +var _updateRule = __webpack_require__(463); var _updateRule2 = _interopRequireDefault(_updateRule); @@ -5008,7 +5008,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _inDOM = __webpack_require__(45); +var _inDOM = __webpack_require__(46); var _inDOM2 = _interopRequireDefault(_inDOM); @@ -5612,7 +5612,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _Button = __webpack_require__(511); +var _Button = __webpack_require__(512); Object.defineProperty(exports, 'default', { enumerable: true, @@ -5650,7 +5650,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _List = __webpack_require__(542); +var _List = __webpack_require__(543); Object.defineProperty(exports, 'default', { enumerable: true, @@ -5668,7 +5668,7 @@ Object.defineProperty(exports, 'ListItem', { } }); -var _ListItemAvatar = __webpack_require__(543); +var _ListItemAvatar = __webpack_require__(544); Object.defineProperty(exports, 'ListItemAvatar', { enumerable: true, @@ -5677,7 +5677,7 @@ Object.defineProperty(exports, 'ListItemAvatar', { } }); -var _ListItemText = __webpack_require__(544); +var _ListItemText = __webpack_require__(545); Object.defineProperty(exports, 'ListItemText', { enumerable: true, @@ -5686,7 +5686,7 @@ Object.defineProperty(exports, 'ListItemText', { } }); -var _ListItemIcon = __webpack_require__(545); +var _ListItemIcon = __webpack_require__(546); Object.defineProperty(exports, 'ListItemIcon', { enumerable: true, @@ -5695,7 +5695,7 @@ Object.defineProperty(exports, 'ListItemIcon', { } }); -var _ListItemSecondaryAction = __webpack_require__(546); +var _ListItemSecondaryAction = __webpack_require__(547); Object.defineProperty(exports, 'ListItemSecondaryAction', { enumerable: true, @@ -5704,7 +5704,7 @@ Object.defineProperty(exports, 'ListItemSecondaryAction', { } }); -var _ListSubheader = __webpack_require__(547); +var _ListSubheader = __webpack_require__(548); Object.defineProperty(exports, 'ListSubheader', { enumerable: true, @@ -7888,9 +7888,9 @@ module.exports = ReactPropTypesSecret; "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(347); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(348); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(186); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(355); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(356); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__["a"]; }); @@ -8057,7 +8057,7 @@ function warning(message) { // style-loader: Adds some css to the DOM by adding a